From 93f6ff98f22ca3c2b4a3034aba840d5fcd869ff5 Mon Sep 17 00:00:00 2001 From: Vibhu Jawa Date: Thu, 30 Jun 2022 16:23:33 -0700 Subject: [PATCH 01/71] Address CuGraphStorage reviews --- python/cugraph/cugraph/gnn/graph_store.py | 82 ++++++++++++++++++----- 1 file changed, 64 insertions(+), 18 deletions(-) diff --git a/python/cugraph/cugraph/gnn/graph_store.py b/python/cugraph/cugraph/gnn/graph_store.py index 6bd46e78f90..407a392acf1 100644 --- a/python/cugraph/cugraph/gnn/graph_store.py +++ b/python/cugraph/cugraph/gnn/graph_store.py @@ -18,6 +18,7 @@ from cugraph.utilities.utils import sample_groups import numpy as np +import cupy as cp class CuGraphStore: @@ -36,19 +37,55 @@ class CuGraphStore: @property def ndata(self): - return self.__G._vertex_prop_dataframe + return {k: self.gdata._vertex_prop_dataframe[col_names] for k,col_names in self.ndata_key_col_d.items()} @property def edata(self): - return self.__G._edge_prop_dataframe + return {k: self.gdata._edge_prop_dataframe[col_names] for k,col_names in self.edata_key_col_d.items()} @property def gdata(self): return self.__G + + def add_node_data(self, df, node_col_name, node_key, ntype=None): + """ + Todo: Add docstring + """ + self.gdata.add_vertex_data(df, vertex_col_name=node_col_name, type_name=ntype) + col_names = list(df.columns) + col_names.remove(node_col_name) + self.ndata_key_col_d[node_key] = col_names + + def add_edge_data(self, df, edge_col_name, edge_key, etype=None): + """ + Todo: Add docstring + """ + self.gdata.add_edge_data(data_df, edge_col_name=node_col_name, type_name=etype) + col_names = list(df.columns) + col_names.remove(edge_col_name) + self.edata_key_col_d[edge_key] = col_names + + def get_node_storage(self, key, ntype=None): + df = self.gdata._vertex_prop_dataframe + col_names = self.ndata_key_col_d[key] + return CuFeatureStorage(df=df, type=ntype, col_names=col_names) + + def get_edge_storage(self, key, etype=None): + col_names = self.edata_key_col_d[key] + df = self.gdata._edge_prop_dataframe + return CuFeatureStorage(df=df, type=etype, col_names=col_names) + + def ntypes(self): + return self.ndata['_TYPE_'].drop_duplicates() + def __init__(self, graph): if isinstance(graph, PropertyGraph): self.__G = graph + #dict to map column names corresponding to edge features of each type + self.edata_key_col_d = {} + #dict to map column names corresponding to node features of each type + self.ndata_key_col_d = {} else: raise ValueError("graph must be a PropertyGraph") @@ -251,31 +288,33 @@ class CuFeatureStorage: is fine. DGL simply uses duck-typing to implement its sampling pipeline. """ - def __getitem__(self, ids): - """Fetch the features of the given node/edge IDs. + def __init__(self, df, type, col_names, backend_lib='torch'): + self.df = df + self.type = type + self.col_names = col_names + if backend_lib=='torch': + from torch.utils.dlpack import from_dlpack + elif backend_lib=='tf': + from tensorflow.experimental.dlpack import from_dlpack + else: + raise NotImplementedError("Only pytorch and tensorflow backends are currently supported") - Parameters - ---------- - ids : Tensor - Node or edge IDs. + self.from_dlpack = from_dlpack - Returns - ------- - Tensor - Feature data stored in PyTorch Tensor. - """ - pass - async def async_fetch(self, ids, device): - """Asynchronously fetch the features of the given node/edge IDs to the + + + def fetch(self, indices, device, pin_memory=False, **kwargs): + """ Fetch the features of the given node/edge IDs to the given device. Parameters ---------- - ids : Tensor + indices : Tensor Node or edge IDs. device : Device Device context. + pin_memory : Returns ------- @@ -283,4 +322,11 @@ async def async_fetch(self, ids, device): Feature data stored in PyTorch Tensor. """ # Default implementation uses synchronous fetch. - return self.__getitem__(ids).to(device) + indices = cp.asarray(indices) + # index first as to avoid transferring the whole frame + # TODO: verify we set index to ids in property graphs + subset_df = self.df.loc[indices] + subset_df = subset_df[subset_df['_TYPE_']==self.type][self.col_names] + tensor = self.from_dlpack(subset_df.to_dlpack()) + + return tensor.to(device) From 71824bd12dee904d35bdf147c0e6cba90887d7af Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Thu, 7 Jul 2022 15:46:39 +0000 Subject: [PATCH 02/71] plc graph creation --- cufile.log | 7 +++ dask-worker-space/global.lock | 0 dask-worker-space/purge.lock | 0 .../simpleDistributedGraph.py | 44 +++++++++++++++++++ .../graph_implementation/simpleGraph.py | 19 ++++++++ 5 files changed, 70 insertions(+) create mode 100644 cufile.log create mode 100644 dask-worker-space/global.lock create mode 100644 dask-worker-space/purge.lock diff --git a/cufile.log b/cufile.log new file mode 100644 index 00000000000..93778337d17 --- /dev/null +++ b/cufile.log @@ -0,0 +1,7 @@ + 06-07-2022 19:37:18:208 [pid=1553933 tid=1553933] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 06-07-2022 19:40:32:232 [pid=1557476 tid=1557955] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 06-07-2022 19:52:45:241 [pid=1565031 tid=1565781] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 06-07-2022 19:57:10:353 [pid=1568263 tid=1569082] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 06-07-2022 20:02:33:154 [pid=1572134 tid=1573312] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 06-07-2022 20:08:02:179 [pid=1576281 tid=1577153] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 06-07-2022 20:11:51:667 [pid=1576278 tid=1577158] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded diff --git a/dask-worker-space/global.lock b/dask-worker-space/global.lock new file mode 100644 index 00000000000..e69de29bb2d diff --git a/dask-worker-space/purge.lock b/dask-worker-space/purge.lock new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py index 90d4e9da549..fb898e37fdc 100644 --- a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py +++ b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py @@ -18,6 +18,15 @@ import cudf import dask_cudf +from pylibcugraph import (MGGraph, + ResourceHandle, + GraphProperties, + ) + +from dask.distributed import wait, default_client +from cugraph.dask.common.input_utils import get_distributed_data +import cugraph.dask.comms.comms as Comms + class simpleDistributedGraphImpl: class EdgeList: @@ -129,6 +138,41 @@ def __from_edgelist( self.source_columns = source self.destination_columns = destination + self.compute_renumber_edge_list( + transposed=False, legacy_renum_only=True + ) + + self.properties.renumbered = self.renumber_map.implementation.numbered + ddf = self.edgelist.edgelist_df + + num_edges = len(ddf) + edge_data = get_distributed_data(ddf) + src_col_name = self.renumber_map.renumbered_src_col_name + dst_col_name = self.renumber_map.renumbered_dst_col_name + graph_props = GraphProperties(is_multigraph=self.properties.multi_edge) + + client = default_client() + self._plc_graph = [ + client.submit( + (lambda sID, edata_x : MGGraph( + resource_handle=ResourceHandle(Comms.get_handle(sID).getHandle()), + graph_properties=graph_props, + src_array=edata_x[0][src_col_name], + dst_array=edata_x[0][dst_col_name], + weight_array=edata_x[0]['value'], + store_transposed=store_transposed, + num_edges=num_edges, + do_expensive_check=False + )), + Comms.get_session_id(), + edata, + workers=[w] + ) + for w, edata in edge_data.worker_to_parts.items() + ] + + wait(self._plc_graph) + @property def renumbered(self): # This property is now used to determine if a dataframe was renumbered diff --git a/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py b/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py index 5929eb75030..a416d48c6aa 100644 --- a/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py +++ b/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py @@ -23,6 +23,11 @@ import numpy as np from cugraph.dask.structure import replication +from pylibcugraph import (ResourceHandle, + GraphProperties, + SGGraph, + ) + # FIXME: Change to consistent camel case naming class simpleGraphImpl: @@ -89,6 +94,7 @@ def __from_edgelist( edge_attr=None, renumber=True, legacy_renum_only=False, + store_transposed=False, ): # Verify column names present in input DataFrame @@ -191,6 +197,19 @@ def __from_edgelist( if self.batch_enabled: self._replicate_edgelist() + + graph_props = GraphProperties(is_multigraph=self.properties.is_multigraph()) + + self._plc_graph = SGGraph( + resource_handle=ResourceHandle(), + graph_properties=graph_props, + src_array=source_col, + dst_array=dest_col, + weight_array=value_col, + store_transposed=store_transposed, + renumber=False, + do_expensive_check=False + ) def to_pandas_edgelist(self, source='src', destination='dst', weight='weights'): From 7a31e80e782dd8f5fdcfc82ac659d2df918ed488 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Thu, 7 Jul 2022 15:47:10 +0000 Subject: [PATCH 03/71] remove useless files --- cufile.log | 7 ------- dask-worker-space/global.lock | 0 dask-worker-space/purge.lock | 0 3 files changed, 7 deletions(-) delete mode 100644 cufile.log delete mode 100644 dask-worker-space/global.lock delete mode 100644 dask-worker-space/purge.lock diff --git a/cufile.log b/cufile.log deleted file mode 100644 index 93778337d17..00000000000 --- a/cufile.log +++ /dev/null @@ -1,7 +0,0 @@ - 06-07-2022 19:37:18:208 [pid=1553933 tid=1553933] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 06-07-2022 19:40:32:232 [pid=1557476 tid=1557955] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 06-07-2022 19:52:45:241 [pid=1565031 tid=1565781] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 06-07-2022 19:57:10:353 [pid=1568263 tid=1569082] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 06-07-2022 20:02:33:154 [pid=1572134 tid=1573312] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 06-07-2022 20:08:02:179 [pid=1576281 tid=1577153] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 06-07-2022 20:11:51:667 [pid=1576278 tid=1577158] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded diff --git a/dask-worker-space/global.lock b/dask-worker-space/global.lock deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/dask-worker-space/purge.lock b/dask-worker-space/purge.lock deleted file mode 100644 index e69de29bb2d..00000000000 From 4203728f443c8b9a3af7e9dd9e9f6c9cb41dbced Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Thu, 7 Jul 2022 15:51:17 +0000 Subject: [PATCH 04/71] fix style --- .../graph_implementation/simpleDistributedGraph.py | 8 +++++--- .../cugraph/structure/graph_implementation/simpleGraph.py | 6 ++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py index fb898e37fdc..cfd53ca0c33 100644 --- a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py +++ b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py @@ -141,7 +141,7 @@ def __from_edgelist( self.compute_renumber_edge_list( transposed=False, legacy_renum_only=True ) - + self.properties.renumbered = self.renumber_map.implementation.numbered ddf = self.edgelist.edgelist_df @@ -154,8 +154,10 @@ def __from_edgelist( client = default_client() self._plc_graph = [ client.submit( - (lambda sID, edata_x : MGGraph( - resource_handle=ResourceHandle(Comms.get_handle(sID).getHandle()), + (lambda sID, edata_x: MGGraph( + resource_handle=ResourceHandle( + Comms.get_handle(sID).getHandle() + ), graph_properties=graph_props, src_array=edata_x[0][src_col_name], dst_array=edata_x[0][dst_col_name], diff --git a/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py b/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py index a416d48c6aa..ff412b8b187 100644 --- a/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py +++ b/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py @@ -197,8 +197,10 @@ def __from_edgelist( if self.batch_enabled: self._replicate_edgelist() - - graph_props = GraphProperties(is_multigraph=self.properties.is_multigraph()) + + graph_props = GraphProperties( + is_multigraph=self.properties.is_multigraph() + ) self._plc_graph = SGGraph( resource_handle=ResourceHandle(), From c25d197b0ccad5fd514fba15d3b07604340c69ea Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Thu, 7 Jul 2022 15:53:57 +0000 Subject: [PATCH 05/71] remove whitespace --- .../structure/graph_implementation/simpleDistributedGraph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py index cfd53ca0c33..de1af4842af 100644 --- a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py +++ b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py @@ -172,7 +172,7 @@ def __from_edgelist( ) for w, edata in edge_data.worker_to_parts.items() ] - + wait(self._plc_graph) @property From 51c2f98445cccae387187686b224394da0bcd8b7 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Thu, 7 Jul 2022 18:16:19 +0000 Subject: [PATCH 06/71] add tests --- python/cufile.log | 48 ++++++++++++++ .../simpleDistributedGraph.py | 41 ++++++++---- .../cugraph/cugraph/tests/mg/test_mg_graph.py | 64 +++++++++++++++++++ 3 files changed, 140 insertions(+), 13 deletions(-) create mode 100644 python/cufile.log diff --git a/python/cufile.log b/python/cufile.log new file mode 100644 index 00000000000..4ba6ea6fefd --- /dev/null +++ b/python/cufile.log @@ -0,0 +1,48 @@ + 07-07-2022 16:00:16:497 [pid=1796222 tid=1796488] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 16:00:16:497 [pid=1796225 tid=1796489] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 16:01:06:871 [pid=1797205 tid=1797473] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 16:01:06:871 [pid=1797208 tid=1797474] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:04:54:527 [pid=1835556 tid=1835821] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:04:54:527 [pid=1835553 tid=1835822] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:05:45:535 [pid=1836522 tid=1836800] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:05:45:536 [pid=1836526 tid=1836801] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:08:06:677 [pid=1838296 tid=1838558] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:08:06:678 [pid=1838301 tid=1838559] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:18:43:560 [pid=1844340 tid=1844605] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:18:43:560 [pid=1844343 tid=1844606] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:19:45:656 [pid=1845430 tid=1845707] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:19:45:657 [pid=1845434 tid=1845708] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:20:31:916 [pid=1846386 tid=1846638] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:20:31:917 [pid=1846383 tid=1846639] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:22:51:589 [pid=1848134 tid=1848407] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:22:51:589 [pid=1848137 tid=1848408] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:29:43:557 [pid=1852246 tid=1852508] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:29:43:557 [pid=1852243 tid=1852509] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:30:31:190 [pid=1853204 tid=1853462] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:30:31:191 [pid=1853207 tid=1853463] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:32:27:722 [pid=1854792 tid=1855060] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:32:27:722 [pid=1854795 tid=1855061] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:35:20:290 [pid=1856840 tid=1857105] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:35:20:291 [pid=1856837 tid=1857106] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:36:35:312 [pid=1858035 tid=1858296] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:36:35:312 [pid=1858041 tid=1858297] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:37:40:557 [pid=1859145 tid=1859409] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:37:40:558 [pid=1859148 tid=1859410] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:39:22:458 [pid=1860585 tid=1860847] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:39:22:458 [pid=1860581 tid=1860848] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:51:29:154 [pid=1867471 tid=1867739] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:51:29:154 [pid=1867477 tid=1867740] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:54:37:856 [pid=1869815 tid=1870077] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 17:54:37:856 [pid=1869818 tid=1870078] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 18:00:13:78 [pid=1873351 tid=1873613] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 18:00:13:79 [pid=1873348 tid=1873614] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 18:01:11:519 [pid=1874404 tid=1874662] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 18:01:11:519 [pid=1874401 tid=1874663] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 18:04:31:404 [pid=1876729 tid=1876995] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 18:04:31:404 [pid=1876727 tid=1876996] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 18:06:50:580 [pid=1878830 tid=1879088] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 18:06:50:581 [pid=1878827 tid=1879089] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 18:12:15:442 [pid=1882202 tid=1882460] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 18:12:15:443 [pid=1882199 tid=1882461] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 18:15:01:597 [pid=1884174 tid=1884440] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 07-07-2022 18:15:01:599 [pid=1884177 tid=1884439] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded diff --git a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py index de1af4842af..2d70c519bb2 100644 --- a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py +++ b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py @@ -62,6 +62,27 @@ def __init__(self, properties): self.source_columns = None self.destination_columns = None + def __make_mg_graph( + sID, + edata_x, + graph_props, + src_col_name, + dst_col_name, + store_transposed, + num_edges): + return MGGraph( + resource_handle=ResourceHandle( + Comms.get_handle(sID).getHandle() + ), + graph_properties=graph_props, + src_array=edata_x[0][src_col_name], + dst_array=edata_x[0][dst_col_name], + weight_array=edata_x[0]['value'], + store_transposed=store_transposed, + num_edges=num_edges, + do_expensive_check=False + ) + # Functions def __from_edgelist( self, @@ -154,21 +175,15 @@ def __from_edgelist( client = default_client() self._plc_graph = [ client.submit( - (lambda sID, edata_x: MGGraph( - resource_handle=ResourceHandle( - Comms.get_handle(sID).getHandle() - ), - graph_properties=graph_props, - src_array=edata_x[0][src_col_name], - dst_array=edata_x[0][dst_col_name], - weight_array=edata_x[0]['value'], - store_transposed=store_transposed, - num_edges=num_edges, - do_expensive_check=False - )), + simpleDistributedGraphImpl.__make_mg_graph, Comms.get_session_id(), edata, - workers=[w] + graph_props, + src_col_name, + dst_col_name, + store_transposed, + num_edges, + workers=[w], ) for w, edata in edge_data.worker_to_parts.items() ] diff --git a/python/cugraph/cugraph/tests/mg/test_mg_graph.py b/python/cugraph/cugraph/tests/mg/test_mg_graph.py index b5d3529926e..18f946f13b1 100644 --- a/python/cugraph/cugraph/tests/mg/test_mg_graph.py +++ b/python/cugraph/cugraph/tests/mg/test_mg_graph.py @@ -19,6 +19,18 @@ import cugraph import random +from pylibcugraph import bfs as pylibcugraph_bfs +from pylibcugraph import ResourceHandle + +from cugraph.dask.traversal.bfs import convert_to_cudf + +import cugraph.dask.comms.comms as Comms +from cugraph.dask.common.input_utils import get_distributed_data +from dask.distributed import wait +import cudf +import pandas +import numpy as np +import networkx as nx # ============================================================================= # Pytest Setup / Teardown - called for each test function @@ -117,3 +129,55 @@ def test_has_node_functionality(dask_client, input_combo): invalid_node = valid_nodes.max() + 1 assert G.has_node(invalid_node) is False + +def test_create_mg_graph(dask_client, input_combo): + G = input_combo['MGGraph'] + + # ensure graph exists + assert G._plc_graph is not None + + # ensure graph is partitioned correctly + assert len(G._plc_graph) == len(dask_client.has_what()) + + + start = dask_cudf.from_cudf(cudf.Series([1]), len(G._plc_graph)) + data_start = get_distributed_data(start) + #assert len(G._plc_graph) == data_start.npartitions + + res = [ + dask_client.submit( + lambda sID, mg_graph_x, st_x: pylibcugraph_bfs( + ResourceHandle(Comms.get_handle(sID).getHandle()), + mg_graph_x, + cudf.Series([1], dtype='int32'), + False, + 0, + True, + False), + Comms.get_session_id(), + mg_graph, + st[0], + workers=[w] + ) + for mg_graph, (w, st) in zip(G._plc_graph, data_start.worker_to_parts.items()) + ] + + wait(res) + + cudf_result = [dask_client.submit(convert_to_cudf, + cp_arrays) + for cp_arrays in res] + wait(cudf_result) + + ddf = dask_cudf.from_delayed(cudf_result).compute() + + if 'dolphins.csv' == input_combo['graph_file'].name: + assert ddf[ddf.vertex==33].distance.to_numpy()[0] == 3 + assert ddf[ddf.vertex==33].predecessor.to_numpy()[0] == 37 + assert ddf[ddf.vertex==11].distance.to_numpy()[0] == 4 + assert ddf[ddf.vertex==11].predecessor.to_numpy()[0] == 51 + else: + assert ddf[ddf.vertex==33].distance.to_numpy()[0] == 2 + assert ddf[ddf.vertex==33].predecessor.to_numpy()[0] == 30 + assert ddf[ddf.vertex==11].distance.to_numpy()[0] == 2 + assert ddf[ddf.vertex==11].predecessor.to_numpy()[0] == 0 \ No newline at end of file From 05bac91c9fa1074b52836618f4112e06b19a46b0 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Thu, 7 Jul 2022 18:17:03 +0000 Subject: [PATCH 07/71] remove cufile --- python/cufile.log | 48 ----------------------------------------------- 1 file changed, 48 deletions(-) delete mode 100644 python/cufile.log diff --git a/python/cufile.log b/python/cufile.log deleted file mode 100644 index 4ba6ea6fefd..00000000000 --- a/python/cufile.log +++ /dev/null @@ -1,48 +0,0 @@ - 07-07-2022 16:00:16:497 [pid=1796222 tid=1796488] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 16:00:16:497 [pid=1796225 tid=1796489] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 16:01:06:871 [pid=1797205 tid=1797473] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 16:01:06:871 [pid=1797208 tid=1797474] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:04:54:527 [pid=1835556 tid=1835821] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:04:54:527 [pid=1835553 tid=1835822] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:05:45:535 [pid=1836522 tid=1836800] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:05:45:536 [pid=1836526 tid=1836801] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:08:06:677 [pid=1838296 tid=1838558] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:08:06:678 [pid=1838301 tid=1838559] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:18:43:560 [pid=1844340 tid=1844605] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:18:43:560 [pid=1844343 tid=1844606] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:19:45:656 [pid=1845430 tid=1845707] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:19:45:657 [pid=1845434 tid=1845708] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:20:31:916 [pid=1846386 tid=1846638] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:20:31:917 [pid=1846383 tid=1846639] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:22:51:589 [pid=1848134 tid=1848407] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:22:51:589 [pid=1848137 tid=1848408] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:29:43:557 [pid=1852246 tid=1852508] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:29:43:557 [pid=1852243 tid=1852509] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:30:31:190 [pid=1853204 tid=1853462] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:30:31:191 [pid=1853207 tid=1853463] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:32:27:722 [pid=1854792 tid=1855060] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:32:27:722 [pid=1854795 tid=1855061] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:35:20:290 [pid=1856840 tid=1857105] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:35:20:291 [pid=1856837 tid=1857106] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:36:35:312 [pid=1858035 tid=1858296] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:36:35:312 [pid=1858041 tid=1858297] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:37:40:557 [pid=1859145 tid=1859409] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:37:40:558 [pid=1859148 tid=1859410] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:39:22:458 [pid=1860585 tid=1860847] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:39:22:458 [pid=1860581 tid=1860848] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:51:29:154 [pid=1867471 tid=1867739] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:51:29:154 [pid=1867477 tid=1867740] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:54:37:856 [pid=1869815 tid=1870077] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 17:54:37:856 [pid=1869818 tid=1870078] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 18:00:13:78 [pid=1873351 tid=1873613] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 18:00:13:79 [pid=1873348 tid=1873614] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 18:01:11:519 [pid=1874404 tid=1874662] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 18:01:11:519 [pid=1874401 tid=1874663] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 18:04:31:404 [pid=1876729 tid=1876995] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 18:04:31:404 [pid=1876727 tid=1876996] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 18:06:50:580 [pid=1878830 tid=1879088] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 18:06:50:581 [pid=1878827 tid=1879089] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 18:12:15:442 [pid=1882202 tid=1882460] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 18:12:15:443 [pid=1882199 tid=1882461] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 18:15:01:597 [pid=1884174 tid=1884440] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 07-07-2022 18:15:01:599 [pid=1884177 tid=1884439] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded From 31b171565b6e21bbe72169b7ee9729e2bd7819a1 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Thu, 7 Jul 2022 18:17:56 +0000 Subject: [PATCH 08/71] add newlines --- python/cugraph/cugraph/tests/mg/test_mg_graph.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/cugraph/cugraph/tests/mg/test_mg_graph.py b/python/cugraph/cugraph/tests/mg/test_mg_graph.py index 18f946f13b1..91a06aedb84 100644 --- a/python/cugraph/cugraph/tests/mg/test_mg_graph.py +++ b/python/cugraph/cugraph/tests/mg/test_mg_graph.py @@ -180,4 +180,5 @@ def test_create_mg_graph(dask_client, input_combo): assert ddf[ddf.vertex==33].distance.to_numpy()[0] == 2 assert ddf[ddf.vertex==33].predecessor.to_numpy()[0] == 30 assert ddf[ddf.vertex==11].distance.to_numpy()[0] == 2 - assert ddf[ddf.vertex==11].predecessor.to_numpy()[0] == 0 \ No newline at end of file + assert ddf[ddf.vertex==11].predecessor.to_numpy()[0] == 0 + From 1ce7fe37305fbd334c053f903121d28163cfffcd Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Fri, 8 Jul 2022 03:29:35 +0000 Subject: [PATCH 09/71] test fixes --- .../graph_implementation/simpleGraph.py | 12 ++++--- python/cugraph/cugraph/tests/test_graph.py | 36 +++++++++++++++++++ 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py b/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py index ff412b8b187..ec0fba9054a 100644 --- a/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py +++ b/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py @@ -16,6 +16,7 @@ from cugraph.structure.symmetrize import symmetrize from cugraph.structure.number_map import NumberMap import cugraph.dask.common.mg_utils as mg_utils +import cupy import cudf import dask_cudf import cugraph.dask.comms.comms as Comms @@ -93,7 +94,7 @@ def __from_edgelist( destination="destination", edge_attr=None, renumber=True, - legacy_renum_only=False, + legacy_renum_only=True, store_transposed=False, ): @@ -199,14 +200,17 @@ def __from_edgelist( self._replicate_edgelist() graph_props = GraphProperties( - is_multigraph=self.properties.is_multigraph() + is_multigraph=self.properties.multi_edge ) + if value_col is None: + value_col = cudf.Series(cupy.ones(len(source_col), dtype='float32')) + self._plc_graph = SGGraph( resource_handle=ResourceHandle(), graph_properties=graph_props, - src_array=source_col, - dst_array=dest_col, + src_array=self.edgelist.edgelist_df['src'], + dst_array=self.edgelist.edgelist_df['dst'], weight_array=value_col, store_transposed=store_transposed, renumber=False, diff --git a/python/cugraph/cugraph/tests/test_graph.py b/python/cugraph/cugraph/tests/test_graph.py index b6c285fb0a7..a1218ca74d3 100644 --- a/python/cugraph/cugraph/tests/test_graph.py +++ b/python/cugraph/cugraph/tests/test_graph.py @@ -30,6 +30,11 @@ from dask.distributed import Client import dask_cudf +from pylibcugraph import bfs as pylibcugraph_bfs +from pylibcugraph import ResourceHandle + +from cugraph.dask.traversal.bfs import convert_to_cudf + # Temporarily suppress warnings till networkX fixes deprecation warnings # (Using or importing the ABCs from 'collections' instead of from # 'collections.abc' is deprecated, and in 3.8 it will stop working) for @@ -696,3 +701,34 @@ def test_graph_init_with_multigraph(): cDiMG = cugraph.MultiDiGraph() # deprecated, but should still work cDiMG.from_cudf_edgelist(gdf, source="src", destination="dst") cugraph.Graph(m_graph=cDiMG) + +@pytest.mark.parametrize("graph_file", utils.DATASETS) +def test_create_sg_graph(graph_file): + el = utils.read_csv_file(graph_file) + G = cugraph.from_cudf_edgelist(el, source='0', destination='1', edge_attr='2') + + # ensure graph exists + assert G._plc_graph is not None + + start = cudf.Series([1], dtype='int32') + start = G.lookup_internal_vertex_id(start) + + if graph_file.name == 'dolphins.csv': + res = pylibcugraph_bfs( + ResourceHandle(), + G._plc_graph, + start, + False, + 0, + True, + False) + + cdr = convert_to_cudf(res) + cdr = G.unrenumber(cdr, column_name='vertex') + cdr = G.unrenumber(cdr, column_name='predecessor') + + assert cdr[cdr.vertex==33].distance.to_numpy()[0] == 3 + assert cdr[cdr.vertex==33].predecessor.to_numpy()[0] == 37 + assert cdr[cdr.vertex==11].distance.to_numpy()[0] == 4 + assert cdr[cdr.vertex==11].predecessor.to_numpy()[0] == 51 + From 17e12fdf48c65556d03b013da54e7f991afc49ea Mon Sep 17 00:00:00 2001 From: Vibhu Jawa Date: Thu, 7 Jul 2022 23:45:21 -0700 Subject: [PATCH 10/71] working ndata,edata with all the updates --- python/cugraph/cugraph/gnn/graph_store.py | 301 +++++++++++++++------- 1 file changed, 201 insertions(+), 100 deletions(-) diff --git a/python/cugraph/cugraph/gnn/graph_store.py b/python/cugraph/cugraph/gnn/graph_store.py index 407a392acf1..ee4f67c5de7 100644 --- a/python/cugraph/cugraph/gnn/graph_store.py +++ b/python/cugraph/cugraph/gnn/graph_store.py @@ -11,16 +11,23 @@ # See the License for the specific language governing permissions and # limitations under the License. +from collections import defaultdict import cudf import cugraph from cugraph.experimental import PropertyGraph from cugraph.community.egonet import batched_ego_graphs from cugraph.utilities.utils import sample_groups -import numpy as np import cupy as cp +src_n = PropertyGraph.src_col_name +dst_n = PropertyGraph.dst_col_name +type_n = PropertyGraph.type_col_name +eid_n = PropertyGraph.edge_id_col_name +vid_n = PropertyGraph.vertex_col_name + + class CuGraphStore: """ A wrapper around a cuGraph Property Graph that @@ -35,90 +42,129 @@ class CuGraphStore: hetrogeneous graphs - use PropertyGraph """ - @property - def ndata(self): - return {k: self.gdata._vertex_prop_dataframe[col_names] for k,col_names in self.ndata_key_col_d.items()} - - @property - def edata(self): - return {k: self.gdata._edge_prop_dataframe[col_names] for k,col_names in self.edata_key_col_d.items()} - - @property - def gdata(self): - return self.__G - + def __init__(self, graph): + if isinstance(graph, PropertyGraph): + self.__G = graph + else: + raise ValueError("graph must be a PropertyGraph") + # dict to map column names corresponding to edge features + # of each type + self.edata_key_col_d = defaultdict(list) + # dict to map column names corresponding to node features + # of each type + self.ndata_key_col_d = defaultdict(list) def add_node_data(self, df, node_col_name, node_key, ntype=None): - """ - Todo: Add docstring - """ self.gdata.add_vertex_data(df, vertex_col_name=node_col_name, type_name=ntype) col_names = list(df.columns) col_names.remove(node_col_name) - self.ndata_key_col_d[node_key] = col_names + self.ndata_key_col_d[node_key] += col_names - def add_edge_data(self, df, edge_col_name, edge_key, etype=None): - """ - Todo: Add docstring - """ - self.gdata.add_edge_data(data_df, edge_col_name=node_col_name, type_name=etype) - col_names = list(df.columns) - col_names.remove(edge_col_name) - self.edata_key_col_d[edge_key] = col_names + def add_edge_data(self, df, vertex_col_names, edge_key, etype=None): + self.gdata.add_edge_data(df, vertex_col_names=vertex_col_names, type_name=etype) + col_names = [col for col in list(df.columns) if col not in vertex_col_names] + self.edata_key_col_d[edge_key] += col_names def get_node_storage(self, key, ntype=None): + + if ntype is None: + ntypes = self.ntypes + if len(self.ntypes) > 1: + raise ValueError( + ( + "Node type name must be specified if there " + "are more than one node types." + ) + ) + ntype = ntypes[0] + df = self.gdata._vertex_prop_dataframe col_names = self.ndata_key_col_d[key] - return CuFeatureStorage(df=df, type=ntype, col_names=col_names) + return CuFeatureStorage(df=df, id_col=vid_n, _type_=ntype, col_names=col_names) def get_edge_storage(self, key, etype=None): + if etype is None: + etypes = self.etypes + if len(self.etypes) > 1: + raise ValueError( + ( + "Edge type name must be specified if there" + "are more than one edge types." + ) + ) + + etype = etypes[0] col_names = self.edata_key_col_d[key] df = self.gdata._edge_prop_dataframe - return CuFeatureStorage(df=df, type=etype, col_names=col_names) + return CuFeatureStorage(df=df, id_col=eid_n, _type_=etype, col_names=col_names) - def ntypes(self): - return self.ndata['_TYPE_'].drop_duplicates() + def num_nodes(self, ntype): + if ntype is not None: + s = self.gdata._vertex_prop_dataframe[type_n] == ntype + return s.sum() + else: + return self.gdata.num_vertices - def __init__(self, graph): - if isinstance(graph, PropertyGraph): - self.__G = graph - #dict to map column names corresponding to edge features of each type - self.edata_key_col_d = {} - #dict to map column names corresponding to node features of each type - self.ndata_key_col_d = {} + def num_edges(self, etype): + if etype is not None: + s = self.gdata._edge_prop_dataframe[type_n] == etype + return s.sum() else: - raise ValueError("graph must be a PropertyGraph") + return self.gdata.num_edges + + @property + def ntypes(self): + s = self.gdata._vertex_prop_dataframe[type_n] + ntypes = s.drop_duplicates().to_arrow().to_pylist() + return ntypes + + @property + def etypes(self): + s = self.gdata._edge_prop_dataframe[type_n] + ntypes = s.drop_duplicates().to_arrow().to_pylist() + return ntypes + + @property + def ndata(self): + return { + k: self.gdata._vertex_prop_dataframe[col_names].dropna(how="all") + for k, col_names in self.ndata_key_col_d.items() + } + + @property + def edata(self): + return { + k: self.gdata._edge_prop_dataframe[col_names].dropna(how="all") + for k, col_names in self.edata_key_col_d.items() + } + + @property + def gdata(self): + return self.__G ###################################### # Utilities ###################################### @property def num_vertices(self): - return self.__G.num_vertices - - @property - def num_edges(self): - return self.__G.num_edges + return self.gdata.num_vertices def get_vertex_ids(self): - return self.__G.vertices_ids() + return self.gdata.vertices_ids() ###################################### # Sampling APIs ###################################### - def sample_neighbors(self, - nodes, - fanout=-1, - edge_dir='in', - prob=None, - replace=False): + def sample_neighbors( + self, nodes, fanout=-1, edge_dir="in", prob=None, replace=False + ): """ Sample neighboring edges of the given nodes and return the subgraph. Parameters ---------- - nodes : array (single dimension) + nodes_cap : Dlpack of Node IDs (single dimension) Node IDs to sample neighbors from. fanout : int The number of edges to be sampled for each node on each edge type. @@ -139,16 +185,22 @@ def sample_neighbors(self, Returns ------- - CuPy array - The sampled arrays for bipartite graph. + DLPack capsule + The src nodes for the sampled bipartite graph. + DLPack capsule + The sampled dst nodes for the sampledbipartite graph. + DLPack capsule + The corresponding eids for the sampled bipartite graph """ + nodes = cudf.from_dlpack(nodes) num_nodes = len(nodes) - current_seeds = nodes.reindex(index=np.arange(0, num_nodes)) - _g = self.__G.extract_subgraph(create_using=cugraph.Graph, - allow_multi_edges=True) - ego_edge_list, seeds_offsets = batched_ego_graphs(_g, - current_seeds, - radius=1) + current_seeds = nodes.reindex(index=cp.arange(0, num_nodes)) + _g = self.__G.extract_subgraph( + create_using=cugraph.Graph, allow_multi_edges=True + ) + ego_edge_list, seeds_offsets = batched_ego_graphs(_g, current_seeds, radius=1) + + del _g # filter and get a certain size neighborhood # Step 1 @@ -162,20 +214,51 @@ def sample_neighbors(self, dst_seeds.index = ego_edge_list.index filtered_list = ego_edge_list[ego_edge_list["dst"] == dst_seeds] + del dst_seeds, offset_lens, seeds_offsets_s + del ego_edge_list, seeds_offsets + # Step 2 # Sample Fan Out # for each dst take maximum of fanout samples - filtered_list = sample_groups(filtered_list, - by="dst", - n_samples=fanout) - - return filtered_list['dst'].values, filtered_list['src'].values - - def node_subgraph(self, - nodes=None, - create_using=cugraph.Graph, - directed=False, - multigraph=True): + filtered_list = sample_groups(filtered_list, by="dst", n_samples=fanout) + + # TODO: Verify order of execution + sample_df = cudf.DataFrame( + {src_n: filtered_list["src"], dst_n: filtered_list["dst"]} + ) + del filtered_list + + # del parents_nodes, children_nodes + edge_df = sample_df.merge( + self.gdata._edge_prop_dataframe[[src_n, dst_n, eid_n]], + on=[src_n, dst_n], + ) + + return ( + edge_df[src_n].to_dlpack(), + edge_df[dst_n].to_dlpack(), + edge_df[eid_n].to_dlpack(), + ) + + def find_edges(self, edge_ids, etype): + """Return the source and destination node IDs given the edge IDs within + the given edge type. + Return type is + cudf.Series, cudf.Series + """ + edge_df = self.gdata._edge_prop_dataframe[[src_n, dst_n, eid_n, type_n]] + subset_df = get_subset_df( + edge_df, PropertyGraph.edge_id_col_name, edge_ids, etype + ) + return subset_df[src_n].to_dlpack(), subset_df[dst_n].to_dlpack() + + def node_subgraph( + self, + nodes=None, + create_using=cugraph.Graph, + directed=False, + multigraph=True, + ): """ Return a subgraph induced on the given nodes. @@ -193,12 +276,12 @@ def node_subgraph(self, The sampled subgraph with the same node ID space with the original graph. """ - + # Values vary b/w cugraph and DGL investigate # expr="(_SRC in nodes) | (_DST_ in nodes)" - _g = self.__G.extract_subgraph( - create_using=cugraph.Graph(directed=directed), - allow_multi_edges=multigraph) + create_using=cugraph.Graph(directed=directed), + allow_multi_edges=multigraph, + ) if nodes is None: return _g @@ -229,18 +312,15 @@ def egonet(self, nodes, k): for each seed. """ - _g = self.__G.extract_subgraph(create_using=cugraph.Graph, - allow_multi_edges=True) + _g = self.__G.extract_subgraph( + create_using=cugraph.Graph, allow_multi_edges=True + ) ego_edge_list, seeds_offsets = batched_ego_graphs(_g, nodes, radius=k) return ego_edge_list, seeds_offsets - def randomwalk(self, - nodes, - length, - prob=None, - restart_prob=None): + def randomwalk(self, nodes, length, prob=None, restart_prob=None): """ Perform randomwalks starting from the given nodes and return the traces. @@ -272,11 +352,11 @@ def randomwalk(self, the node IDs reached by the randomwalk starting from nodes[i]. -1 means the walk has stopped. """ - _g = self.__G.extract_subgraph(create_using=cugraph.Graph, - allow_multi_edges=True) + _g = self.__G.extract_subgraph( + create_using=cugraph.Graph, allow_multi_edges=True + ) - p, w, s = cugraph.random_walks(_g, nodes, - max_depth=length, use_padding=True) + p, w, s = cugraph.random_walks(_g, nodes, max_depth=length, use_padding=True) return p, w, s @@ -288,24 +368,24 @@ class CuFeatureStorage: is fine. DGL simply uses duck-typing to implement its sampling pipeline. """ - def __init__(self, df, type, col_names, backend_lib='torch'): + def __init__(self, df, id_col, _type_, col_names, backend_lib="torch"): self.df = df - self.type = type + self.id_col = id_col + self.type = _type_ self.col_names = col_names - if backend_lib=='torch': + if backend_lib == "torch": from torch.utils.dlpack import from_dlpack - elif backend_lib=='tf': + elif backend_lib == "tf": from tensorflow.experimental.dlpack import from_dlpack else: - raise NotImplementedError("Only pytorch and tensorflow backends are currently supported") + raise NotImplementedError( + "Only pytorch and tensorflow backends are currently supported" + ) self.from_dlpack = from_dlpack - - - def fetch(self, indices, device, pin_memory=False, **kwargs): - """ Fetch the features of the given node/edge IDs to the + """Fetch the features of the given node/edge IDs to the given device. Parameters @@ -314,7 +394,7 @@ def fetch(self, indices, device, pin_memory=False, **kwargs): Node or edge IDs. device : Device Device context. - pin_memory : + pin_memory : Returns ------- @@ -322,11 +402,32 @@ def fetch(self, indices, device, pin_memory=False, **kwargs): Feature data stored in PyTorch Tensor. """ # Default implementation uses synchronous fetch. - indices = cp.asarray(indices) - # index first as to avoid transferring the whole frame - # TODO: verify we set index to ids in property graphs - subset_df = self.df.loc[indices] - subset_df = subset_df[subset_df['_TYPE_']==self.type][self.col_names] - tensor = self.from_dlpack(subset_df.to_dlpack()) + + subset_cols = self.col_names + [type_n, self.id_col] + subset_df = get_subset_df( + self.df[subset_cols], self.id_col, indices, self.type + )[self.col_names] + tensor = self.from_dlpack(subset_df.to_dlpack()) return tensor.to(device) + + +def get_subset_df(df, id_col, indices, _type_): + """ + Util to get the subset dataframe to the indices of the requested type + """ + # We can avoid all of this if we set index to id_col like + # edge_id_col_name and vertex_id_col_name and make it much faster + # by using loc + indices_df = cudf.Series(cp.asarray(indices), name=id_col).to_frame() + id_col_name = id_col + "_index_" + indices_df = indices_df.reset_index(drop=False).rename( + columns={"index": id_col_name} + ) + subset_df = indices_df.merge(df, how="left") + if _type_ is None: + subset_df = subset_df[subset_df[type_n].isnull()] + else: + subset_df = subset_df[subset_df[type_n] == _type_] + subset_df = subset_df.sort_values(by=id_col_name) + return subset_df From 71eae74b724067c035296a49880a86a7af07d138 Mon Sep 17 00:00:00 2001 From: Vibhu Jawa Date: Thu, 7 Jul 2022 23:47:20 -0700 Subject: [PATCH 11/71] fixed style checks --- python/cugraph/cugraph/gnn/graph_store.py | 44 +++++++++++++++++------ 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/python/cugraph/cugraph/gnn/graph_store.py b/python/cugraph/cugraph/gnn/graph_store.py index ee4f67c5de7..531894134a3 100644 --- a/python/cugraph/cugraph/gnn/graph_store.py +++ b/python/cugraph/cugraph/gnn/graph_store.py @@ -55,14 +55,20 @@ def __init__(self, graph): self.ndata_key_col_d = defaultdict(list) def add_node_data(self, df, node_col_name, node_key, ntype=None): - self.gdata.add_vertex_data(df, vertex_col_name=node_col_name, type_name=ntype) + self.gdata.add_vertex_data( + df, vertex_col_name=node_col_name, type_name=ntype + ) col_names = list(df.columns) col_names.remove(node_col_name) self.ndata_key_col_d[node_key] += col_names def add_edge_data(self, df, vertex_col_names, edge_key, etype=None): - self.gdata.add_edge_data(df, vertex_col_names=vertex_col_names, type_name=etype) - col_names = [col for col in list(df.columns) if col not in vertex_col_names] + self.gdata.add_edge_data( + df, vertex_col_names=vertex_col_names, type_name=etype + ) + col_names = [ + col for col in list(df.columns) if col not in vertex_col_names + ] self.edata_key_col_d[edge_key] += col_names def get_node_storage(self, key, ntype=None): @@ -80,7 +86,9 @@ def get_node_storage(self, key, ntype=None): df = self.gdata._vertex_prop_dataframe col_names = self.ndata_key_col_d[key] - return CuFeatureStorage(df=df, id_col=vid_n, _type_=ntype, col_names=col_names) + return CuFeatureStorage( + df=df, id_col=vid_n, _type_=ntype, col_names=col_names + ) def get_edge_storage(self, key, etype=None): if etype is None: @@ -96,7 +104,9 @@ def get_edge_storage(self, key, etype=None): etype = etypes[0] col_names = self.edata_key_col_d[key] df = self.gdata._edge_prop_dataframe - return CuFeatureStorage(df=df, id_col=eid_n, _type_=etype, col_names=col_names) + return CuFeatureStorage( + df=df, id_col=eid_n, _type_=etype, col_names=col_names + ) def num_nodes(self, ntype): if ntype is not None: @@ -127,7 +137,9 @@ def etypes(self): @property def ndata(self): return { - k: self.gdata._vertex_prop_dataframe[col_names].dropna(how="all") + k: self.gdata._vertex_prop_dataframe[col_names].dropna( + how="all" + ) for k, col_names in self.ndata_key_col_d.items() } @@ -198,7 +210,9 @@ def sample_neighbors( _g = self.__G.extract_subgraph( create_using=cugraph.Graph, allow_multi_edges=True ) - ego_edge_list, seeds_offsets = batched_ego_graphs(_g, current_seeds, radius=1) + ego_edge_list, seeds_offsets = batched_ego_graphs( + _g, current_seeds, radius=1 + ) del _g # filter and get a certain size neighborhood @@ -220,7 +234,9 @@ def sample_neighbors( # Step 2 # Sample Fan Out # for each dst take maximum of fanout samples - filtered_list = sample_groups(filtered_list, by="dst", n_samples=fanout) + filtered_list = sample_groups( + filtered_list, by="dst", n_samples=fanout + ) # TODO: Verify order of execution sample_df = cudf.DataFrame( @@ -246,7 +262,9 @@ def find_edges(self, edge_ids, etype): Return type is cudf.Series, cudf.Series """ - edge_df = self.gdata._edge_prop_dataframe[[src_n, dst_n, eid_n, type_n]] + edge_df = self.gdata._edge_prop_dataframe[ + [src_n, dst_n, eid_n, type_n] + ] subset_df = get_subset_df( edge_df, PropertyGraph.edge_id_col_name, edge_ids, etype ) @@ -316,7 +334,9 @@ def egonet(self, nodes, k): create_using=cugraph.Graph, allow_multi_edges=True ) - ego_edge_list, seeds_offsets = batched_ego_graphs(_g, nodes, radius=k) + ego_edge_list, seeds_offsets = batched_ego_graphs( + _g, nodes, radius=k + ) return ego_edge_list, seeds_offsets @@ -356,7 +376,9 @@ def randomwalk(self, nodes, length, prob=None, restart_prob=None): create_using=cugraph.Graph, allow_multi_edges=True ) - p, w, s = cugraph.random_walks(_g, nodes, max_depth=length, use_padding=True) + p, w, s = cugraph.random_walks( + _g, nodes, max_depth=length, use_padding=True + ) return p, w, s From 052b6350c7d37dcb66d2607a8b2a00900c08f267 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Fri, 8 Jul 2022 13:40:01 +0000 Subject: [PATCH 12/71] style --- .../graph_implementation/simpleGraph.py | 4 +- .../cugraph/cugraph/tests/mg/test_mg_graph.py | 56 ++++++++++--------- python/cugraph/cugraph/tests/test_graph.py | 19 ++++--- 3 files changed, 44 insertions(+), 35 deletions(-) diff --git a/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py b/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py index ec0fba9054a..ac2c626734d 100644 --- a/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py +++ b/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py @@ -204,7 +204,9 @@ def __from_edgelist( ) if value_col is None: - value_col = cudf.Series(cupy.ones(len(source_col), dtype='float32')) + value_col = cudf.Series( + cupy.ones(len(source_col), dtype='float32') + ) self._plc_graph = SGGraph( resource_handle=ResourceHandle(), diff --git a/python/cugraph/cugraph/tests/mg/test_mg_graph.py b/python/cugraph/cugraph/tests/mg/test_mg_graph.py index 91a06aedb84..2331fdd8d7f 100644 --- a/python/cugraph/cugraph/tests/mg/test_mg_graph.py +++ b/python/cugraph/cugraph/tests/mg/test_mg_graph.py @@ -28,9 +28,7 @@ from cugraph.dask.common.input_utils import get_distributed_data from dask.distributed import wait import cudf -import pandas -import numpy as np -import networkx as nx + # ============================================================================= # Pytest Setup / Teardown - called for each test function @@ -130,55 +128,59 @@ def test_has_node_functionality(dask_client, input_combo): assert G.has_node(invalid_node) is False + def test_create_mg_graph(dask_client, input_combo): G = input_combo['MGGraph'] - + # ensure graph exists assert G._plc_graph is not None # ensure graph is partitioned correctly assert len(G._plc_graph) == len(dask_client.has_what()) - - start = dask_cudf.from_cudf(cudf.Series([1]), len(G._plc_graph)) + start = dask_cudf.from_cudf( + cudf.Series([1], dtype='int32'), + len(G._plc_graph) + ) data_start = get_distributed_data(start) - #assert len(G._plc_graph) == data_start.npartitions res = [ dask_client.submit( lambda sID, mg_graph_x, st_x: pylibcugraph_bfs( - ResourceHandle(Comms.get_handle(sID).getHandle()), - mg_graph_x, - cudf.Series([1], dtype='int32'), - False, - 0, - True, - False), + ResourceHandle(Comms.get_handle(sID).getHandle()), + mg_graph_x, + st_x, + False, + 0, + True, + False + ), Comms.get_session_id(), mg_graph, st[0], workers=[w] ) - for mg_graph, (w, st) in zip(G._plc_graph, data_start.worker_to_parts.items()) + for mg_graph, (w, st) in \ + zip(G._plc_graph, data_start.worker_to_parts.items()) ] wait(res) - cudf_result = [dask_client.submit(convert_to_cudf, - cp_arrays) - for cp_arrays in res] + cudf_result = [ + dask_client.submit(convert_to_cudf,cp_arrays) + for cp_arrays in res + ] wait(cudf_result) ddf = dask_cudf.from_delayed(cudf_result).compute() if 'dolphins.csv' == input_combo['graph_file'].name: - assert ddf[ddf.vertex==33].distance.to_numpy()[0] == 3 - assert ddf[ddf.vertex==33].predecessor.to_numpy()[0] == 37 - assert ddf[ddf.vertex==11].distance.to_numpy()[0] == 4 - assert ddf[ddf.vertex==11].predecessor.to_numpy()[0] == 51 + assert ddf[ddf.vertex == 33].distance.to_numpy()[0] == 3 + assert ddf[ddf.vertex == 33].predecessor.to_numpy()[0] == 37 + assert ddf[ddf.vertex == 11].distance.to_numpy()[0] == 4 + assert ddf[ddf.vertex == 11].predecessor.to_numpy()[0] == 51 else: - assert ddf[ddf.vertex==33].distance.to_numpy()[0] == 2 - assert ddf[ddf.vertex==33].predecessor.to_numpy()[0] == 30 - assert ddf[ddf.vertex==11].distance.to_numpy()[0] == 2 - assert ddf[ddf.vertex==11].predecessor.to_numpy()[0] == 0 - + assert ddf[ddf.vertex == 33].distance.to_numpy()[0] == 2 + assert ddf[ddf.vertex == 33].predecessor.to_numpy()[0] == 30 + assert ddf[ddf.vertex == 11].distance.to_numpy()[0] == 2 + assert ddf[ddf.vertex == 11].predecessor.to_numpy()[0] == 0 diff --git a/python/cugraph/cugraph/tests/test_graph.py b/python/cugraph/cugraph/tests/test_graph.py index a1218ca74d3..674d3d2969e 100644 --- a/python/cugraph/cugraph/tests/test_graph.py +++ b/python/cugraph/cugraph/tests/test_graph.py @@ -702,11 +702,17 @@ def test_graph_init_with_multigraph(): cDiMG.from_cudf_edgelist(gdf, source="src", destination="dst") cugraph.Graph(m_graph=cDiMG) + @pytest.mark.parametrize("graph_file", utils.DATASETS) def test_create_sg_graph(graph_file): el = utils.read_csv_file(graph_file) - G = cugraph.from_cudf_edgelist(el, source='0', destination='1', edge_attr='2') - + G = cugraph.from_cudf_edgelist( + el, + source='0', + destination='1', + edge_attr='2' + ) + # ensure graph exists assert G._plc_graph is not None @@ -727,8 +733,7 @@ def test_create_sg_graph(graph_file): cdr = G.unrenumber(cdr, column_name='vertex') cdr = G.unrenumber(cdr, column_name='predecessor') - assert cdr[cdr.vertex==33].distance.to_numpy()[0] == 3 - assert cdr[cdr.vertex==33].predecessor.to_numpy()[0] == 37 - assert cdr[cdr.vertex==11].distance.to_numpy()[0] == 4 - assert cdr[cdr.vertex==11].predecessor.to_numpy()[0] == 51 - + assert cdr[cdr.vertex == 33].distance.to_numpy()[0] == 3 + assert cdr[cdr.vertex == 33].predecessor.to_numpy()[0] == 37 + assert cdr[cdr.vertex == 11].distance.to_numpy()[0] == 4 + assert cdr[cdr.vertex == 11].predecessor.to_numpy()[0] == 51 From 3b5127806f96688cfeaf1faffec456c672ef5c14 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Fri, 8 Jul 2022 13:52:29 +0000 Subject: [PATCH 13/71] style --- python/cugraph/cugraph/tests/mg/test_mg_graph.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/cugraph/cugraph/tests/mg/test_mg_graph.py b/python/cugraph/cugraph/tests/mg/test_mg_graph.py index 2331fdd8d7f..4aa96ffa37f 100644 --- a/python/cugraph/cugraph/tests/mg/test_mg_graph.py +++ b/python/cugraph/cugraph/tests/mg/test_mg_graph.py @@ -160,14 +160,14 @@ def test_create_mg_graph(dask_client, input_combo): st[0], workers=[w] ) - for mg_graph, (w, st) in \ - zip(G._plc_graph, data_start.worker_to_parts.items()) + for mg_graph, (w, st) in + zip(G._plc_graph, data_start.worker_to_parts.items()) ] wait(res) cudf_result = [ - dask_client.submit(convert_to_cudf,cp_arrays) + dask_client.submit(convert_to_cudf, cp_arrays) for cp_arrays in res ] wait(cudf_result) From 5a938ebe21683b016f2ae291cd81f0ae74f71cdb Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Fri, 8 Jul 2022 18:01:45 +0000 Subject: [PATCH 14/71] add type checking for weights --- .../cugraph/structure/graph_implementation/simpleGraph.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py b/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py index ac2c626734d..d2d87aecebb 100644 --- a/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py +++ b/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py @@ -207,6 +207,13 @@ def __from_edgelist( value_col = cudf.Series( cupy.ones(len(source_col), dtype='float32') ) + else: + weight_t = value_col.dtype + + if weight_t == "int32": + value_col = value_col.astype("float32") + if weight_t == "int64": + value_col = value_col.astype("float64") self._plc_graph = SGGraph( resource_handle=ResourceHandle(), From 12ebf68460729e587342686781c1cb9c08c0ba62 Mon Sep 17 00:00:00 2001 From: Vibhu Jawa Date: Fri, 8 Jul 2022 14:54:37 -0700 Subject: [PATCH 15/71] Add CuGraphStore tests --- python/cugraph/cugraph/gnn/graph_store.py | 58 ++- .../cugraph/cugraph/tests/test_graph_store.py | 332 ++++++++++++++---- 2 files changed, 287 insertions(+), 103 deletions(-) diff --git a/python/cugraph/cugraph/gnn/graph_store.py b/python/cugraph/cugraph/gnn/graph_store.py index 531894134a3..31f23318bde 100644 --- a/python/cugraph/cugraph/gnn/graph_store.py +++ b/python/cugraph/cugraph/gnn/graph_store.py @@ -17,7 +17,6 @@ from cugraph.experimental import PropertyGraph from cugraph.community.egonet import batched_ego_graphs from cugraph.utilities.utils import sample_groups - import cupy as cp @@ -42,7 +41,7 @@ class CuGraphStore: hetrogeneous graphs - use PropertyGraph """ - def __init__(self, graph): + def __init__(self, graph, backend_lib="torch"): if isinstance(graph, PropertyGraph): self.__G = graph else: @@ -53,22 +52,17 @@ def __init__(self, graph): # dict to map column names corresponding to node features # of each type self.ndata_key_col_d = defaultdict(list) + self.backend_lib = backend_lib def add_node_data(self, df, node_col_name, node_key, ntype=None): - self.gdata.add_vertex_data( - df, vertex_col_name=node_col_name, type_name=ntype - ) + self.gdata.add_vertex_data(df, vertex_col_name=node_col_name, type_name=ntype) col_names = list(df.columns) col_names.remove(node_col_name) self.ndata_key_col_d[node_key] += col_names def add_edge_data(self, df, vertex_col_names, edge_key, etype=None): - self.gdata.add_edge_data( - df, vertex_col_names=vertex_col_names, type_name=etype - ) - col_names = [ - col for col in list(df.columns) if col not in vertex_col_names - ] + self.gdata.add_edge_data(df, vertex_col_names=vertex_col_names, type_name=etype) + col_names = [col for col in list(df.columns) if col not in vertex_col_names] self.edata_key_col_d[edge_key] += col_names def get_node_storage(self, key, ntype=None): @@ -87,7 +81,11 @@ def get_node_storage(self, key, ntype=None): df = self.gdata._vertex_prop_dataframe col_names = self.ndata_key_col_d[key] return CuFeatureStorage( - df=df, id_col=vid_n, _type_=ntype, col_names=col_names + df=df, + id_col=vid_n, + _type_=ntype, + col_names=col_names, + backend_lib=self.backend_lib, ) def get_edge_storage(self, key, etype=None): @@ -105,17 +103,21 @@ def get_edge_storage(self, key, etype=None): col_names = self.edata_key_col_d[key] df = self.gdata._edge_prop_dataframe return CuFeatureStorage( - df=df, id_col=eid_n, _type_=etype, col_names=col_names + df=df, + id_col=eid_n, + _type_=etype, + col_names=col_names, + backend_lib=self.backend_lib, ) - def num_nodes(self, ntype): + def num_nodes(self, ntype=None): if ntype is not None: s = self.gdata._vertex_prop_dataframe[type_n] == ntype return s.sum() else: return self.gdata.num_vertices - def num_edges(self, etype): + def num_edges(self, etype=None): if etype is not None: s = self.gdata._edge_prop_dataframe[type_n] == etype return s.sum() @@ -137,9 +139,7 @@ def etypes(self): @property def ndata(self): return { - k: self.gdata._vertex_prop_dataframe[col_names].dropna( - how="all" - ) + k: self.gdata._vertex_prop_dataframe[col_names].dropna(how="all") for k, col_names in self.ndata_key_col_d.items() } @@ -210,9 +210,7 @@ def sample_neighbors( _g = self.__G.extract_subgraph( create_using=cugraph.Graph, allow_multi_edges=True ) - ego_edge_list, seeds_offsets = batched_ego_graphs( - _g, current_seeds, radius=1 - ) + ego_edge_list, seeds_offsets = batched_ego_graphs(_g, current_seeds, radius=1) del _g # filter and get a certain size neighborhood @@ -234,9 +232,7 @@ def sample_neighbors( # Step 2 # Sample Fan Out # for each dst take maximum of fanout samples - filtered_list = sample_groups( - filtered_list, by="dst", n_samples=fanout - ) + filtered_list = sample_groups(filtered_list, by="dst", n_samples=fanout) # TODO: Verify order of execution sample_df = cudf.DataFrame( @@ -262,9 +258,7 @@ def find_edges(self, edge_ids, etype): Return type is cudf.Series, cudf.Series """ - edge_df = self.gdata._edge_prop_dataframe[ - [src_n, dst_n, eid_n, type_n] - ] + edge_df = self.gdata._edge_prop_dataframe[[src_n, dst_n, eid_n, type_n]] subset_df = get_subset_df( edge_df, PropertyGraph.edge_id_col_name, edge_ids, etype ) @@ -334,9 +328,7 @@ def egonet(self, nodes, k): create_using=cugraph.Graph, allow_multi_edges=True ) - ego_edge_list, seeds_offsets = batched_ego_graphs( - _g, nodes, radius=k - ) + ego_edge_list, seeds_offsets = batched_ego_graphs(_g, nodes, radius=k) return ego_edge_list, seeds_offsets @@ -376,9 +368,7 @@ def randomwalk(self, nodes, length, prob=None, restart_prob=None): create_using=cugraph.Graph, allow_multi_edges=True ) - p, w, s = cugraph.random_walks( - _g, nodes, max_depth=length, use_padding=True - ) + p, w, s = cugraph.random_walks(_g, nodes, max_depth=length, use_padding=True) return p, w, s @@ -399,6 +389,8 @@ def __init__(self, df, id_col, _type_, col_names, backend_lib="torch"): from torch.utils.dlpack import from_dlpack elif backend_lib == "tf": from tensorflow.experimental.dlpack import from_dlpack + elif backend_lib == "cp": + from cupy import from_dlpack else: raise NotImplementedError( "Only pytorch and tensorflow backends are currently supported" diff --git a/python/cugraph/cugraph/tests/test_graph_store.py b/python/cugraph/cugraph/tests/test_graph_store.py index 66843812e16..0161d08c9a4 100644 --- a/python/cugraph/cugraph/tests/test_graph_store.py +++ b/python/cugraph/cugraph/tests/test_graph_store.py @@ -11,13 +11,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +from collections import defaultdict import pytest - import cugraph from cugraph.testing import utils from cugraph.experimental import PropertyGraph import numpy as np import cudf +import cupy as cp +from cugraph.gnn import CuGraphStore # Test @@ -35,8 +37,9 @@ def test_using_graph(graph_file): cu_M = utils.read_csv_file(graph_file) g = cugraph.Graph() - g.from_cudf_edgelist(cu_M, source='0', - destination='1', edge_attr='2', renumber=True) + g.from_cudf_edgelist( + cu_M, source="0", destination="1", edge_attr="2", renumber=True + ) cugraph.gnn.CuGraphStore(graph=g) @@ -46,19 +49,19 @@ def test_using_pgraph(graph_file): cu_M = utils.read_csv_file(graph_file) g = cugraph.Graph(directed=True) - g.from_cudf_edgelist(cu_M, source='0', destination='1', - edge_attr='2', renumber=True) + g.from_cudf_edgelist( + cu_M, source="0", destination="1", edge_attr="2", renumber=True + ) pG = PropertyGraph() - pG.add_edge_data(cu_M, - type_name="edge", - vertex_col_names=("0", "1"), - property_columns=None) + pG.add_edge_data( + cu_M, vertex_col_names=("0", "1"), property_columns=None + ) gstore = cugraph.gnn.CuGraphStore(graph=pG) assert g.number_of_edges() == pG.num_edges - assert g.number_of_edges() == gstore.num_edges + assert g.number_of_edges() == gstore.num_edges() assert g.number_of_vertices() == pG.num_vertices assert g.number_of_vertices() == gstore.num_vertices @@ -69,14 +72,11 @@ def test_node_data_pg(graph_file): cu_M = utils.read_csv_file(graph_file) pG = PropertyGraph() - pG.add_edge_data(cu_M, - type_name="edge", - vertex_col_names=("0", "1"), - property_columns=None) - gstore = cugraph.gnn.CuGraphStore(graph=pG) - - edata = gstore.edata + gstore.add_edge_data( + cu_M, vertex_col_names=("0", "1"), edge_key="feat" + ) + edata = gstore.edata["feat"] assert edata.shape[0] > 0 @@ -89,15 +89,13 @@ def test_egonet(graph_file): cu_M = utils.read_csv_file(graph_file) g = cugraph.Graph(directed=True) - g.from_cudf_edgelist(cu_M, source='0', destination='1', renumber=True) + g.from_cudf_edgelist(cu_M, source="0", destination="1", renumber=True) pG = PropertyGraph() - pG.add_edge_data(cu_M, - type_name="edge", - vertex_col_names=("0", "1"), - property_columns=None) - gstore = cugraph.gnn.CuGraphStore(graph=pG) + gstore.add_edge_data( + cu_M, vertex_col_names=("0", "1"), edge_key="edge_feat" + ) nodes = [1, 2] @@ -115,16 +113,13 @@ def test_workflow(graph_file): cu_M = utils.read_csv_file(graph_file) g = cugraph.Graph(directed=True) - g.from_cudf_edgelist(cu_M, source='0', destination='1', renumber=True) + g.from_cudf_edgelist(cu_M, source="0", destination="1", renumber=True) pg = PropertyGraph() - pg.add_edge_data(cu_M, - type_name="edge", - vertex_col_names=("0", "1"), - property_columns=["2"]) - gstore = cugraph.gnn.CuGraphStore(graph=pg) - + gstore.add_edge_data( + cu_M, vertex_col_names=("0", "1"), edge_key="feat" + ) nodes = gstore.get_vertex_ids() num_nodes = len(nodes) @@ -142,25 +137,26 @@ def test_sample_neighbors(graph_file): cu_M = utils.read_csv_file(graph_file) g = cugraph.Graph(directed=True) - g.from_cudf_edgelist(cu_M, source='0', destination='1', renumber=True) + g.from_cudf_edgelist(cu_M, source="0", destination="1", renumber=True) pg = PropertyGraph() - pg.add_edge_data(cu_M, - type_name="edge", - vertex_col_names=("0", "1"), - property_columns=["2"]) - gstore = cugraph.gnn.CuGraphStore(graph=pg) + gstore.add_edge_data( + cu_M, edge_key="feat", vertex_col_names=("0", "1") + ) nodes = gstore.get_vertex_ids() num_nodes = len(nodes) assert num_nodes > 0 - sampled_nodes = nodes[:5] + sampled_nodes = nodes[:5].to_dlpack() - parents_list, children_list = gstore.sample_neighbors(sampled_nodes, 2) + parents_cap, children_cap, edge_id_cap = gstore.sample_neighbors( + sampled_nodes, 2 + ) + parents_list = cudf.from_dlpack(parents_cap) assert len(parents_list) > 0 @@ -169,21 +165,21 @@ def test_sample_neighbor_neg_one_fanout(graph_file): cu_M = utils.read_csv_file(graph_file) g = cugraph.Graph(directed=True) - g.from_cudf_edgelist(cu_M, source='0', destination='1', renumber=True) + g.from_cudf_edgelist(cu_M, source="0", destination="1", renumber=True) pg = PropertyGraph() - pg.add_edge_data(cu_M, - type_name="edge", - vertex_col_names=("0", "1"), - property_columns=["2"]) - gstore = cugraph.gnn.CuGraphStore(graph=pg) + gstore.add_edge_data( + cu_M, edge_key="edge_k", vertex_col_names=("0", "1") + ) nodes = gstore.get_vertex_ids() - sampled_nodes = nodes[:5] + sampled_nodes = nodes[:5].to_dlpack() # -1, default fan_out - parents_list, children_list = gstore.sample_neighbors(sampled_nodes, -1) - + parents_cap, children_cap, edge_id_cap = gstore.sample_neighbors( + sampled_nodes, -1 + ) + parents_list = cudf.from_dlpack(parents_cap) assert len(parents_list) > 0 @@ -192,26 +188,29 @@ def test_n_data(graph_file): cu_M = utils.read_csv_file(graph_file) g = cugraph.Graph(directed=True) - g.from_cudf_edgelist(cu_M, source='0', destination='1', renumber=True) + g.from_cudf_edgelist(cu_M, source="0", destination="1", renumber=True) pg = PropertyGraph() - pg.add_edge_data(cu_M, - type_name="edge", - vertex_col_names=("0", "1"), - property_columns=["2"]) + gstore = cugraph.gnn.CuGraphStore(graph=pg) + + gstore.add_edge_data( + cu_M, + edge_key="feat", + vertex_col_names=("0", "1"), + ) - num_nodes = g.number_of_nodes() + num_nodes = gstore.num_nodes() df_feat = cudf.DataFrame() - df_feat['node_id'] = np.arange(num_nodes) - df_feat['val0'] = [float(i+1) for i in range(num_nodes)] - df_feat['val1'] = [float(i+2) for i in range(num_nodes)] - pg.add_vertex_data(df_feat, - type_name="test_feat", - vertex_col_name="node_id", - property_columns=None) - gstore = cugraph.gnn.CuGraphStore(graph=pg) + df_feat["node_id"] = np.arange(num_nodes) + df_feat["val0"] = [float(i + 1) for i in range(num_nodes)] + df_feat["val1"] = [float(i + 2) for i in range(num_nodes)] + gstore.add_node_data( + df_feat, + node_key="node_feat", + node_col_name="node_id", + ) - ndata = gstore.ndata + ndata = gstore.ndata["node_feat"] assert ndata.shape[0] > 0 @@ -221,16 +220,209 @@ def test_e_data(graph_file): cu_M = utils.read_csv_file(graph_file) g = cugraph.Graph(directed=True) - g.from_cudf_edgelist(cu_M, source='0', destination='1', renumber=True) + g.from_cudf_edgelist(cu_M, source="0", destination="1", renumber=True) pg = PropertyGraph() - pg.add_edge_data(cu_M, - type_name="edge", - vertex_col_names=("0", "1"), - property_columns=["2"]) - gstore = cugraph.gnn.CuGraphStore(graph=pg) + gstore.add_edge_data( + cu_M, vertex_col_names=("0", "1"), edge_key="edge_k" + ) - edata = gstore.edata - + edata = gstore.edata["edge_k"] assert edata.shape[0] > 0 + + +dataset1 = { + "merchants": [ + [ + "merchant_id", + "merchant_locaton", + "merchant_size", + "merchant_sales", + "merchant_num_employees", + ], + [ + (11, 78750, 44, 123.2, 12), + (4, 78757, 112, 234.99, 18), + (21, 44145, 83, 992.1, 27), + (16, 47906, 92, 32.43, 5), + (86, 47906, 192, 2.43, 51), + ], + ], + "users": [ + ["user_id", "user_location", "vertical"], + [ + (89021, 78757, 0), + (32431, 78750, 1), + (89216, 78757, 1), + (78634, 47906, 0), + ], + ], + "taxpayers": [ + ["payer_id", "amount"], + [ + (11, 1123.98), + (4, 3243.7), + (21, 8932.3), + (16, 3241.77), + (86, 789.2), + (89021, 23.98), + (78634, 41.77), + ], + ], + "transactions": [ + ["user_id", "merchant_id", "volume", "time", "card_num"], + [ + (89021, 11, 33.2, 1639084966.5513437, 123456), + (89216, 4, None, 1639085163.481217, 8832), + (78634, 16, 72.0, 1639084912.567394, 4321), + (32431, 4, 103.2, 1639084721.354346, 98124), + ], + ], + "relationships": [ + ["user_id_1", "user_id_2", "relationship_type"], + [ + (89216, 89021, 9), + (89216, 32431, 9), + (32431, 78634, 8), + (78634, 89216, 8), + ], + ], + "referrals": [ + ["user_id_1", "user_id_2", "merchant_id", "stars"], + [ + (89216, 78634, 11, 5), + (89021, 89216, 4, 4), + (89021, 89216, 21, 3), + (89021, 89216, 11, 3), + (89021, 78634, 21, 4), + (78634, 32431, 11, 4), + ], + ], +} + + +# util to create dataframe +def create_df_from_dataset(col_n, rows): + data_d = defaultdict(list) + for row in rows: + for col_id, col_v in enumerate(row): + data_d[col_n[col_id]].append(col_v) + return cudf.DataFrame(data_d) + + +@pytest.fixture() +def dataset1_CuGraphStore(): + """ + Fixture which returns an instance of a CuGraphStore with vertex and edge + data added from dataset1, parameterized for different DataFrame types. + """ + merchant_df = create_df_from_dataset( + dataset1["merchants"][0], dataset1["merchants"][1] + ) + user_df = create_df_from_dataset( + dataset1["users"][0], dataset1["users"][1] + ) + taxpayers_df = create_df_from_dataset( + dataset1["taxpayers"][0], dataset1["taxpayers"][1] + ) + transactions_df = create_df_from_dataset( + dataset1["transactions"][0], dataset1["transactions"][1] + ) + relationships_df = create_df_from_dataset( + dataset1["relationships"][0], dataset1["relationships"][1] + ) + referrals_df = create_df_from_dataset( + dataset1["referrals"][0], dataset1["referrals"][1] + ) + + pG = PropertyGraph() + graph = CuGraphStore(pG) + # Vertex and edge data is added as one or more DataFrames; either a Pandas + # DataFrame to keep data on the CPU, a cuDF DataFrame to keep data on GPU, + # or a dask_cudf DataFrame to keep data on distributed GPUs. + + # For dataset1: vertices are merchants and users, edges are transactions, + # relationships, and referrals. + + # property_columns=None (the default) means all columns except + # vertex_col_name will be used as properties for the vertices/edges. + + graph.add_node_data( + merchant_df, "merchant_id", "merchant_k", "merchant" + ) + graph.add_node_data(user_df, "user_id", "user_k", "user") + graph.add_node_data( + taxpayers_df, "payer_id", "taxpayers_k", "taxpayers" + ) + + graph.add_edge_data( + referrals_df, + ("user_id_1", "user_id_2"), + "referrals_k", + "referrals", + ) + graph.add_edge_data( + relationships_df, + ("user_id_1", "user_id_2"), + "relationships_k", + "relationships", + ) + graph.add_edge_data( + transactions_df, + ("user_id", "merchant_id"), + "transactions_k", + "transactions", + ) + + return graph + + +def test_num_nodes_gs(dataset1_CuGraphStore): + assert dataset1_CuGraphStore.num_nodes() == 9 + + +def test_num_edges(dataset1_CuGraphStore): + assert dataset1_CuGraphStore.num_edges() == 14 + + +def test_get_node_storage_gs(dataset1_CuGraphStore): + fs = dataset1_CuGraphStore.get_node_storage( + key="merchant_k", ntype="merchant" + ) + merchent_gs = fs.fetch([11, 4, 21, 316, 11], device="cuda") + merchant_df = create_df_from_dataset( + dataset1["merchants"][0], dataset1["merchants"][1] + ) + cudf_ar = ( + merchant_df.set_index("merchant_id") + .loc[[11, 4, 21, 316, 11]] + .values + ) + assert cp.allclose(cudf_ar, merchent_gs) + + +def test_get_edge_storage_gs(dataset1_CuGraphStore): + fs = dataset1_CuGraphStore.get_edge_storage( + "relationships_k", "relationships" + ) + relationship_t = fs.fetch([6, 7, 8], device="cuda") + + relationships_df = create_df_from_dataset( + dataset1["relationships"][0], dataset1["relationships"][1] + ) + cudf_ar = relationships_df["relationship_type"].iloc[[0, 1, 2]].values + + assert cp.allclose(cudf_ar, relationship_t) + + +def test_sampling_gs(dataset1_CuGraphStore): + node_pack = cp.asarray([4]).toDlpack() + ( + parents_cap, + children_cap, + edge_id_cap, + ) = dataset1_CuGraphStore.sample_neighbors(node_pack, fanout=1) + x = cudf.from_dlpack(parents_cap) + + assert x is not None From d70e43ffc4194e8163878aa271d9d664c930b437 Mon Sep 17 00:00:00 2001 From: Vibhu Jawa Date: Fri, 8 Jul 2022 14:57:52 -0700 Subject: [PATCH 16/71] Fixed Style --- python/cugraph/cugraph/gnn/graph_store.py | 28 +++++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/python/cugraph/cugraph/gnn/graph_store.py b/python/cugraph/cugraph/gnn/graph_store.py index 31f23318bde..c1393853df1 100644 --- a/python/cugraph/cugraph/gnn/graph_store.py +++ b/python/cugraph/cugraph/gnn/graph_store.py @@ -55,14 +55,20 @@ def __init__(self, graph, backend_lib="torch"): self.backend_lib = backend_lib def add_node_data(self, df, node_col_name, node_key, ntype=None): - self.gdata.add_vertex_data(df, vertex_col_name=node_col_name, type_name=ntype) + self.gdata.add_vertex_data( + df, vertex_col_name=node_col_name, type_name=ntype + ) col_names = list(df.columns) col_names.remove(node_col_name) self.ndata_key_col_d[node_key] += col_names def add_edge_data(self, df, vertex_col_names, edge_key, etype=None): - self.gdata.add_edge_data(df, vertex_col_names=vertex_col_names, type_name=etype) - col_names = [col for col in list(df.columns) if col not in vertex_col_names] + self.gdata.add_edge_data( + df, vertex_col_names=vertex_col_names, type_name=etype + ) + col_names = [ + col for col in list(df.columns) if col not in vertex_col_names + ] self.edata_key_col_d[edge_key] += col_names def get_node_storage(self, key, ntype=None): @@ -210,7 +216,9 @@ def sample_neighbors( _g = self.__G.extract_subgraph( create_using=cugraph.Graph, allow_multi_edges=True ) - ego_edge_list, seeds_offsets = batched_ego_graphs(_g, current_seeds, radius=1) + ego_edge_list, seeds_offsets = batched_ego_graphs( + _g, current_seeds, radius=1 + ) del _g # filter and get a certain size neighborhood @@ -232,7 +240,9 @@ def sample_neighbors( # Step 2 # Sample Fan Out # for each dst take maximum of fanout samples - filtered_list = sample_groups(filtered_list, by="dst", n_samples=fanout) + filtered_list = sample_groups( + filtered_list, by="dst", n_samples=fanout + ) # TODO: Verify order of execution sample_df = cudf.DataFrame( @@ -258,7 +268,9 @@ def find_edges(self, edge_ids, etype): Return type is cudf.Series, cudf.Series """ - edge_df = self.gdata._edge_prop_dataframe[[src_n, dst_n, eid_n, type_n]] + edge_df = self.gdata._edge_prop_dataframe[ + [src_n, dst_n, eid_n, type_n] + ] subset_df = get_subset_df( edge_df, PropertyGraph.edge_id_col_name, edge_ids, etype ) @@ -368,7 +380,9 @@ def randomwalk(self, nodes, length, prob=None, restart_prob=None): create_using=cugraph.Graph, allow_multi_edges=True ) - p, w, s = cugraph.random_walks(_g, nodes, max_depth=length, use_padding=True) + p, w, s = cugraph.random_walks( + _g, nodes, max_depth=length, use_padding=True + ) return p, w, s From 739b252a1b31c389a0ff3f211c161378a6976c1e Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Mon, 11 Jul 2022 13:43:18 +0000 Subject: [PATCH 17/71] add sg bfs, fix arg in mg bfs --- python/cufile.log | 26 + .../Cython/Build/BuildExecutable.py | 142 + .../Cython/Build/Cythonize.py | 229 + .../Cython/Build/Dependencies.py | 1308 ++ .../Cython/Build/Distutils.py | 1 + .../Cython/Build/Inline.py | 376 + .../Cython/Build/IpythonMagic.py | 565 + .../Cython/Build/Tests/TestCyCache.py | 106 + .../Cython/Build/Tests/TestInline.py | 96 + .../Cython/Build/Tests/TestIpythonMagic.py | 205 + .../Cython/Build/Tests/TestStripLiterals.py | 57 + .../Cython/Build/Tests/__init__.py | 1 + .../Cython/Build/__init__.py | 2 + .../Cython/CodeWriter.py | 816 + .../Cython/Compiler/AnalysedTreeTransforms.py | 99 + .../Cython/Compiler/Annotate.py | 317 + .../Cython/Compiler/AutoDocTransforms.py | 214 + .../Cython/Compiler/Buffer.py | 740 + .../Cython/Compiler/Builtin.py | 444 + .../Cython/Compiler/CmdLine.py | 224 + .../Cython/Compiler/Code.pxd | 124 + .../Cython/Compiler/Code.py | 2597 +++ .../Cython/Compiler/CodeGeneration.py | 35 + .../Cython/Compiler/CythonScope.py | 164 + .../Cython/Compiler/DebugFlags.py | 21 + .../Cython/Compiler/Errors.py | 265 + .../Cython/Compiler/ExprNodes.py | 13692 ++++++++++++++++ .../Cython/Compiler/FlowControl.pxd | 111 + .../Cython/Compiler/FlowControl.py | 1325 ++ .../Cython/Compiler/FusedNode.py | 901 + .../Cython/Compiler/Future.py | 15 + .../Cython/Compiler/Interpreter.py | 64 + .../Cython/Compiler/Lexicon.py | 138 + .../Cython/Compiler/Main.py | 904 + .../Cython/Compiler/MemoryView.py | 858 + .../Cython/Compiler/ModuleNode.py | 3222 ++++ .../Cython/Compiler/Naming.py | 162 + .../Cython/Compiler/Nodes.py | 9447 +++++++++++ .../Cython/Compiler/Optimize.py | 4857 ++++++ .../Cython/Compiler/Options.py | 550 + .../Cython/Compiler/ParseTreeTransforms.pxd | 82 + .../Cython/Compiler/ParseTreeTransforms.py | 3530 ++++ .../Cython/Compiler/Parsing.pxd | 199 + .../Cython/Compiler/Parsing.py | 3844 +++++ .../Cython/Compiler/Pipeline.py | 369 + .../Cython/Compiler/PyrexTypes.py | 4735 ++++++ .../Cython/Compiler/Pythran.py | 227 + .../Cython/Compiler/Scanning.pxd | 67 + .../Cython/Compiler/Scanning.py | 551 + .../Cython/Compiler/StringEncoding.py | 363 + .../Cython/Compiler/Symtab.py | 2552 +++ .../Cython/Compiler/Tests/TestBuffer.py | 105 + .../Cython/Compiler/Tests/TestCmdLine.py | 118 + .../Cython/Compiler/Tests/TestFlowControl.py | 68 + .../Cython/Compiler/Tests/TestGrammar.py | 129 + .../Cython/Compiler/Tests/TestMemView.py | 71 + .../Compiler/Tests/TestParseTreeTransforms.py | 282 + .../Compiler/Tests/TestSignatureMatching.py | 73 + .../Compiler/Tests/TestStringEncoding.py | 44 + .../Cython/Compiler/Tests/TestTreeFragment.py | 64 + .../Cython/Compiler/Tests/TestTreePath.py | 94 + .../Cython/Compiler/Tests/TestTypes.py | 19 + .../Cython/Compiler/Tests/TestUtilityLoad.py | 101 + .../Cython/Compiler/Tests/TestVisitor.py | 61 + .../Cython/Compiler/Tests/__init__.py | 1 + .../Cython/Compiler/TreeFragment.py | 275 + .../Cython/Compiler/TreePath.py | 296 + .../Cython/Compiler/TypeInference.py | 591 + .../Cython/Compiler/TypeSlots.py | 941 ++ .../Cython/Compiler/UtilNodes.py | 359 + .../Cython/Compiler/UtilityCode.py | 237 + .../Cython/Compiler/Version.py | 9 + .../Cython/Compiler/Visitor.pxd | 55 + .../Cython/Compiler/Visitor.py | 840 + .../Cython/Compiler/__init__.py | 1 + .../Cython/Coverage.py | 348 + .../Cython/Debugger/Cygdb.py | 158 + .../Cython/Debugger/DebugWriter.py | 72 + .../Cython/Debugger/Tests/TestLibCython.py | 274 + .../Cython/Debugger/Tests/__init__.py | 1 + .../Cython/Debugger/Tests/cfuncs.c | 8 + .../Cython/Debugger/Tests/codefile | 50 + .../Debugger/Tests/test_libcython_in_gdb.py | 496 + .../Debugger/Tests/test_libpython_in_gdb.py | 115 + .../Cython/Debugger/__init__.py | 1 + .../Cython/Debugger/libcython.py | 1434 ++ .../Cython/Debugger/libpython.py | 2760 ++++ .../Cython/Debugging.py | 20 + .../Cython/Distutils/__init__.py | 2 + .../Cython/Distutils/build_ext.py | 25 + .../Cython/Distutils/extension.py | 128 + .../Cython/Distutils/old_build_ext.py | 355 + .../Cython/Includes/Deprecated/python.pxd | 2 + .../Includes/Deprecated/python_bool.pxd | 2 + .../Includes/Deprecated/python_buffer.pxd | 2 + .../Includes/Deprecated/python_bytes.pxd | 2 + .../Includes/Deprecated/python_cobject.pxd | 2 + .../Includes/Deprecated/python_complex.pxd | 2 + .../Includes/Deprecated/python_dict.pxd | 2 + .../Cython/Includes/Deprecated/python_exc.pxd | 2 + .../Includes/Deprecated/python_float.pxd | 2 + .../Includes/Deprecated/python_function.pxd | 2 + .../Includes/Deprecated/python_getargs.pxd | 2 + .../Includes/Deprecated/python_instance.pxd | 2 + .../Cython/Includes/Deprecated/python_int.pxd | 2 + .../Includes/Deprecated/python_iterator.pxd | 2 + .../Includes/Deprecated/python_list.pxd | 2 + .../Includes/Deprecated/python_long.pxd | 2 + .../Includes/Deprecated/python_mapping.pxd | 2 + .../Cython/Includes/Deprecated/python_mem.pxd | 2 + .../Includes/Deprecated/python_method.pxd | 2 + .../Includes/Deprecated/python_module.pxd | 2 + .../Includes/Deprecated/python_number.pxd | 2 + .../Includes/Deprecated/python_object.pxd | 2 + .../Includes/Deprecated/python_oldbuffer.pxd | 2 + .../Includes/Deprecated/python_pycapsule.pxd | 2 + .../Cython/Includes/Deprecated/python_ref.pxd | 2 + .../Includes/Deprecated/python_sequence.pxd | 2 + .../Cython/Includes/Deprecated/python_set.pxd | 2 + .../Includes/Deprecated/python_string.pxd | 2 + .../Includes/Deprecated/python_tuple.pxd | 2 + .../Includes/Deprecated/python_type.pxd | 2 + .../Includes/Deprecated/python_unicode.pxd | 2 + .../Includes/Deprecated/python_version.pxd | 2 + .../Includes/Deprecated/python_weakref.pxd | 2 + .../Cython/Includes/Deprecated/stdio.pxd | 2 + .../Cython/Includes/Deprecated/stdlib.pxd | 2 + .../Cython/Includes/Deprecated/stl.pxd | 91 + .../Cython/Includes/cpython/__init__.pxd | 184 + .../Cython/Includes/cpython/array.pxd | 163 + .../Cython/Includes/cpython/bool.pxd | 38 + .../Cython/Includes/cpython/buffer.pxd | 112 + .../Cython/Includes/cpython/bytearray.pxd | 33 + .../Cython/Includes/cpython/bytes.pxd | 198 + .../Cython/Includes/cpython/cellobject.pxd | 35 + .../Cython/Includes/cpython/ceval.pxd | 8 + .../Cython/Includes/cpython/cobject.pxd | 36 + .../Cython/Includes/cpython/codecs.pxd | 121 + .../Cython/Includes/cpython/complex.pxd | 50 + .../Cython/Includes/cpython/conversion.pxd | 36 + .../Cython/Includes/cpython/datetime.pxd | 212 + .../Cython/Includes/cpython/dict.pxd | 165 + .../Cython/Includes/cpython/exc.pxd | 257 + .../Cython/Includes/cpython/float.pxd | 39 + .../Cython/Includes/cpython/function.pxd | 65 + .../Cython/Includes/cpython/genobject.pxd | 25 + .../Cython/Includes/cpython/getargs.pxd | 12 + .../Cython/Includes/cpython/instance.pxd | 25 + .../Cython/Includes/cpython/int.pxd | 89 + .../Cython/Includes/cpython/iterator.pxd | 36 + .../Cython/Includes/cpython/iterobject.pxd | 24 + .../Cython/Includes/cpython/list.pxd | 92 + .../Cython/Includes/cpython/long.pxd | 149 + .../Cython/Includes/cpython/longintrepr.pxd | 19 + .../Cython/Includes/cpython/mapping.pxd | 64 + .../Cython/Includes/cpython/mem.pxd | 111 + .../Cython/Includes/cpython/memoryview.pxd | 50 + .../Cython/Includes/cpython/method.pxd | 49 + .../Cython/Includes/cpython/module.pxd | 188 + .../Cython/Includes/cpython/number.pxd | 265 + .../Cython/Includes/cpython/object.pxd | 399 + .../Cython/Includes/cpython/oldbuffer.pxd | 63 + .../Cython/Includes/cpython/pycapsule.pxd | 144 + .../Cython/Includes/cpython/pylifecycle.pxd | 68 + .../Cython/Includes/cpython/pystate.pxd | 92 + .../Cython/Includes/cpython/pythread.pxd | 53 + .../Cython/Includes/cpython/ref.pxd | 51 + .../Cython/Includes/cpython/sequence.pxd | 136 + .../Cython/Includes/cpython/set.pxd | 119 + .../Cython/Includes/cpython/slice.pxd | 70 + .../Cython/Includes/cpython/string.pxd | 198 + .../Cython/Includes/cpython/tuple.pxd | 71 + .../Cython/Includes/cpython/type.pxd | 48 + .../Cython/Includes/cpython/unicode.pxd | 556 + .../Cython/Includes/cpython/version.pxd | 32 + .../Cython/Includes/cpython/weakref.pxd | 42 + .../Cython/Includes/libc/__init__.pxd | 1 + .../Cython/Includes/libc/errno.pxd | 128 + .../Cython/Includes/libc/float.pxd | 43 + .../Cython/Includes/libc/limits.pxd | 28 + .../Cython/Includes/libc/locale.pxd | 46 + .../Cython/Includes/libc/math.pxd | 112 + .../Cython/Includes/libc/setjmp.pxd | 10 + .../Cython/Includes/libc/signal.pxd | 64 + .../Cython/Includes/libc/stddef.pxd | 9 + .../Cython/Includes/libc/stdint.pxd | 105 + .../Cython/Includes/libc/stdio.pxd | 80 + .../Cython/Includes/libc/stdlib.pxd | 72 + .../Cython/Includes/libc/string.pxd | 50 + .../Cython/Includes/libc/time.pxd | 46 + .../Cython/Includes/libcpp/__init__.pxd | 4 + .../Cython/Includes/libcpp/algorithm.pxd | 43 + .../Cython/Includes/libcpp/cast.pxd | 12 + .../Cython/Includes/libcpp/complex.pxd | 101 + .../Cython/Includes/libcpp/deque.pxd | 86 + .../Cython/Includes/libcpp/forward_list.pxd | 62 + .../Cython/Includes/libcpp/functional.pxd | 13 + .../Cython/Includes/libcpp/iterator.pxd | 32 + .../Cython/Includes/libcpp/limits.pxd | 61 + .../Cython/Includes/libcpp/list.pxd | 78 + .../Cython/Includes/libcpp/map.pxd | 68 + .../Cython/Includes/libcpp/memory.pxd | 115 + .../Cython/Includes/libcpp/pair.pxd | 1 + .../Cython/Includes/libcpp/queue.pxd | 25 + .../Cython/Includes/libcpp/set.pxd | 61 + .../Cython/Includes/libcpp/stack.pxd | 11 + .../Cython/Includes/libcpp/string.pxd | 227 + .../Cython/Includes/libcpp/typeindex.pxd | 15 + .../Cython/Includes/libcpp/typeinfo.pxd | 10 + .../Cython/Includes/libcpp/unordered_map.pxd | 74 + .../Cython/Includes/libcpp/unordered_set.pxd | 69 + .../Cython/Includes/libcpp/utility.pxd | 30 + .../Cython/Includes/libcpp/vector.pxd | 88 + .../Cython/Includes/numpy/__init__.pxd | 1049 ++ .../Cython/Includes/numpy/math.pxd | 133 + .../Cython/Includes/openmp.pxd | 51 + .../Cython/Includes/posix/__init__.pxd | 1 + .../Cython/Includes/posix/dlfcn.pxd | 14 + .../Cython/Includes/posix/fcntl.pxd | 68 + .../Cython/Includes/posix/ioctl.pxd | 4 + .../Cython/Includes/posix/mman.pxd | 99 + .../Cython/Includes/posix/resource.pxd | 55 + .../Cython/Includes/posix/select.pxd | 19 + .../Cython/Includes/posix/signal.pxd | 73 + .../Cython/Includes/posix/stat.pxd | 71 + .../Cython/Includes/posix/stdio.pxd | 37 + .../Cython/Includes/posix/stdlib.pxd | 29 + .../Cython/Includes/posix/strings.pxd | 9 + .../Cython/Includes/posix/time.pxd | 71 + .../Cython/Includes/posix/types.pxd | 30 + .../Cython/Includes/posix/unistd.pxd | 271 + .../Cython/Includes/posix/wait.pxd | 38 + .../Cython/Plex/Actions.pxd | 25 + .../Cython/Plex/Actions.py | 110 + .../Cython/Plex/DFA.py | 164 + .../Cython/Plex/Errors.py | 54 + .../Cython/Plex/Lexicons.py | 200 + .../Cython/Plex/Machines.py | 255 + .../Cython/Plex/Regexps.py | 576 + .../Cython/Plex/Scanners.pxd | 50 + .../Cython/Plex/Scanners.py | 338 + .../Cython/Plex/Timing.py | 23 + .../Cython/Plex/Traditional.py | 158 + .../Cython/Plex/Transitions.py | 251 + .../Cython/Plex/__init__.py | 39 + .../Cython/Runtime/__init__.py | 1 + .../Cython/Runtime/refnanny.pyx | 194 + .../Cython/Shadow.py | 474 + .../Cython/StringIOTree.py | 108 + .../Cython/Tempita/__init__.py | 4 + .../Cython/Tempita/_looper.py | 163 + .../Cython/Tempita/_tempita.py | 1182 ++ .../Cython/Tempita/compat3.py | 47 + .../Cython/TestUtils.py | 217 + .../Cython/Tests/TestCodeWriter.py | 82 + .../Cython/Tests/TestCythonUtils.py | 11 + .../Cython/Tests/TestJediTyper.py | 225 + .../Cython/Tests/TestStringIOTree.py | 67 + .../Cython/Tests/__init__.py | 1 + .../Cython/Tests/xmlrunner.py | 397 + .../Cython/Utility/AsyncGen.c | 1133 ++ .../Cython/Utility/Buffer.c | 921 ++ .../Cython/Utility/Builtins.c | 542 + .../Cython/Utility/CConvert.pyx | 132 + .../Cython/Utility/CMath.c | 95 + .../Cython/Utility/Capsule.c | 20 + .../Cython/Utility/CommonStructures.c | 86 + .../Cython/Utility/Complex.c | 291 + .../Cython/Utility/Coroutine.c | 2391 +++ .../Cython/Utility/CpdefEnums.pyx | 66 + .../Cython/Utility/CppConvert.pyx | 237 + .../Cython/Utility/CythonFunction.c | 1339 ++ .../Cython/Utility/Embed.c | 219 + .../Cython/Utility/Exceptions.c | 816 + .../Cython/Utility/ExtensionTypes.c | 301 + .../Cython/Utility/FunctionArguments.c | 352 + .../Cython/Utility/ImportExport.c | 739 + .../Cython/Utility/MemoryView.pyx | 1494 ++ .../Cython/Utility/MemoryView_C.c | 945 ++ .../Cython/Utility/ModuleSetupCode.c | 1640 ++ .../Cython/Utility/ObjectHandling.c | 2504 +++ .../Cython/Utility/Optimize.c | 1195 ++ .../Cython/Utility/Overflow.c | 311 + .../Cython/Utility/Printing.c | 176 + .../Cython/Utility/Profile.c | 377 + .../Cython/Utility/StringTools.c | 1195 ++ .../Cython/Utility/TestCyUtilityLoader.pyx | 8 + .../Cython/Utility/TestCythonScope.pyx | 64 + .../Cython/Utility/TestUtilityLoader.c | 12 + .../Cython/Utility/TypeConversion.c | 1017 ++ .../Cython/Utility/__init__.py | 29 + .../Cython/Utility/arrayarray.h | 149 + .../Cython/Utils.py | 449 + .../Cython/__init__.py | 12 + .../EGG-INFO/COPYING.txt | 19 + .../EGG-INFO/LICENSE.txt | 176 + .../EGG-INFO/PKG-INFO | 57 + .../EGG-INFO/RECORD | 313 + .../EGG-INFO/WHEEL | 7 + .../EGG-INFO/entry_points.txt | 4 + .../EGG-INFO/top_level.txt | 3 + .../cython.py | 24 + .../pyximport/__init__.py | 4 + .../pyximport/pyxbuild.py | 160 + .../pyximport/pyximport.py | 602 + python/cugraph/.eggs/README.txt | 6 + python/cugraph/cugraph/dask/traversal/bfs.py | 79 +- .../simpleDistributedGraph.py | 13 +- python/cugraph/cugraph/traversal/bfs.py | 70 +- 309 files changed, 110579 insertions(+), 106 deletions(-) create mode 100644 python/cufile.log create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/BuildExecutable.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Cythonize.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Dependencies.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Distutils.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Inline.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/IpythonMagic.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestCyCache.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestInline.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestIpythonMagic.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestStripLiterals.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/__init__.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/__init__.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/CodeWriter.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/AnalysedTreeTransforms.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Annotate.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/AutoDocTransforms.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Buffer.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Builtin.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CmdLine.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Code.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Code.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CodeGeneration.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CythonScope.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/DebugFlags.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Errors.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/ExprNodes.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FlowControl.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FlowControl.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FusedNode.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Future.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Interpreter.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Lexicon.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Main.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/MemoryView.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/ModuleNode.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Naming.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Nodes.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Optimize.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Options.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/ParseTreeTransforms.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/ParseTreeTransforms.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Parsing.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Parsing.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Pipeline.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/PyrexTypes.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Pythran.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Scanning.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Scanning.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/StringEncoding.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Symtab.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestBuffer.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestCmdLine.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestFlowControl.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestGrammar.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestMemView.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestParseTreeTransforms.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestSignatureMatching.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestStringEncoding.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestTreeFragment.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestTreePath.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestTypes.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestUtilityLoad.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestVisitor.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/__init__.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/TreeFragment.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/TreePath.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/TypeInference.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/TypeSlots.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/UtilNodes.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/UtilityCode.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Version.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Visitor.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Visitor.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/__init__.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Coverage.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/Cygdb.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/DebugWriter.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/Tests/TestLibCython.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/Tests/__init__.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/Tests/cfuncs.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/Tests/codefile create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/Tests/test_libcython_in_gdb.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/Tests/test_libpython_in_gdb.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/__init__.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/libcython.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/libpython.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugging.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Distutils/__init__.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Distutils/build_ext.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Distutils/extension.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Distutils/old_build_ext.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_bool.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_buffer.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_bytes.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_cobject.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_complex.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_dict.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_exc.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_float.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_function.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_getargs.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_instance.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_int.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_iterator.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_list.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_long.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_mapping.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_mem.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_method.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_module.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_number.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_object.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_oldbuffer.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_pycapsule.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_ref.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_sequence.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_set.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_string.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_tuple.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_type.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_unicode.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_version.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_weakref.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/stdio.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/stdlib.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/stl.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/__init__.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/array.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/bool.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/buffer.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/bytearray.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/bytes.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/cellobject.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/ceval.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/cobject.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/codecs.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/complex.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/conversion.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/datetime.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/dict.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/exc.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/float.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/function.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/genobject.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/getargs.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/instance.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/int.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/iterator.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/iterobject.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/list.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/long.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/longintrepr.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/mapping.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/mem.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/memoryview.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/method.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/module.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/number.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/object.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/oldbuffer.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/pycapsule.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/pylifecycle.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/pystate.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/pythread.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/ref.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/sequence.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/set.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/slice.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/string.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/tuple.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/type.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/unicode.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/version.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/weakref.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/__init__.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/errno.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/float.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/limits.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/locale.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/math.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/setjmp.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/signal.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/stddef.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/stdint.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/stdio.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/stdlib.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/string.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/time.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/__init__.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/algorithm.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/cast.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/complex.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/deque.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/forward_list.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/functional.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/iterator.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/limits.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/list.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/map.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/memory.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/pair.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/queue.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/set.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/stack.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/string.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/typeindex.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/typeinfo.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/unordered_map.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/unordered_set.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/utility.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/vector.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/numpy/__init__.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/numpy/math.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/openmp.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/__init__.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/dlfcn.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/fcntl.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/ioctl.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/mman.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/resource.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/select.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/signal.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/stat.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/stdio.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/stdlib.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/strings.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/time.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/types.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/unistd.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/wait.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Actions.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Actions.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/DFA.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Errors.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Lexicons.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Machines.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Regexps.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Scanners.pxd create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Scanners.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Timing.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Traditional.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Transitions.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/__init__.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Runtime/__init__.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Runtime/refnanny.pyx create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Shadow.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/StringIOTree.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/__init__.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/_looper.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/_tempita.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/compat3.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/TestUtils.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestCodeWriter.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestCythonUtils.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestJediTyper.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestStringIOTree.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/__init__.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/xmlrunner.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/AsyncGen.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Buffer.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Builtins.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CConvert.pyx create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CMath.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Capsule.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CommonStructures.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Complex.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Coroutine.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CpdefEnums.pyx create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CppConvert.pyx create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CythonFunction.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Embed.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Exceptions.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ExtensionTypes.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/FunctionArguments.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ImportExport.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/MemoryView.pyx create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/MemoryView_C.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ModuleSetupCode.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ObjectHandling.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Optimize.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Overflow.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Printing.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Profile.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/StringTools.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestCyUtilityLoader.pyx create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestCythonScope.pyx create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestUtilityLoader.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TypeConversion.c create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/__init__.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/arrayarray.h create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utils.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/__init__.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/COPYING.txt create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/LICENSE.txt create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/PKG-INFO create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/RECORD create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/WHEEL create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/entry_points.txt create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/top_level.txt create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/cython.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/__init__.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/pyxbuild.py create mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/pyximport.py create mode 100644 python/cugraph/.eggs/README.txt diff --git a/python/cufile.log b/python/cufile.log new file mode 100644 index 00000000000..503bd201c41 --- /dev/null +++ b/python/cufile.log @@ -0,0 +1,26 @@ + 08-07-2022 18:30:11:139 [pid=2188895 tid=2188895] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 08-07-2022 18:30:11:250 [pid=2189130 tid=2189387] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 08-07-2022 18:30:11:250 [pid=2189134 tid=2189388] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 08-07-2022 18:34:31:781 [pid=2191754 tid=2191754] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 08-07-2022 18:34:31:905 [pid=2191981 tid=2192234] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 08-07-2022 18:34:31:905 [pid=2191978 tid=2192235] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 08-07-2022 18:42:12:87 [pid=2196473 tid=2196473] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 08-07-2022 18:42:12:200 [pid=2196718 tid=2196970] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 08-07-2022 18:42:12:200 [pid=2196720 tid=2196971] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 08-07-2022 18:44:23:519 [pid=2198207 tid=2198207] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 08-07-2022 18:44:23:631 [pid=2198434 tid=2198687] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 08-07-2022 18:44:23:632 [pid=2198431 tid=2198688] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 08-07-2022 18:44:58:891 [pid=2198933 tid=2198933] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 08-07-2022 18:44:58:999 [pid=2199160 tid=2199413] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 08-07-2022 18:44:59:1 [pid=2199157 tid=2199414] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 11-07-2022 13:20:08:225 [pid=2335263 tid=2335263] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 11-07-2022 13:20:08:338 [pid=2335493 tid=2335742] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 11-07-2022 13:20:08:338 [pid=2335496 tid=2335743] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 11-07-2022 13:23:07:965 [pid=2337247 tid=2337247] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 11-07-2022 13:24:25:75 [pid=2338370 tid=2338370] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 11-07-2022 13:25:16:485 [pid=2339072 tid=2339072] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 11-07-2022 13:25:16:597 [pid=2339295 tid=2339566] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 11-07-2022 13:25:16:597 [pid=2339298 tid=2339567] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 11-07-2022 13:42:19:249 [pid=4345 tid=4345] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 11-07-2022 13:42:19:673 [pid=4577 tid=4848] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 11-07-2022 13:42:19:674 [pid=4571 tid=4849] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/BuildExecutable.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/BuildExecutable.py new file mode 100644 index 00000000000..2db9e5d7457 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/BuildExecutable.py @@ -0,0 +1,142 @@ +""" +Compile a Python script into an executable that embeds CPython and run it. +Requires CPython to be built as a shared library ('libpythonX.Y'). + +Basic usage: + + python cythonrun somefile.py [ARGS] +""" + +from __future__ import absolute_import + +DEBUG = True + +import sys +import os +from distutils import sysconfig + + +def get_config_var(name, default=''): + return sysconfig.get_config_var(name) or default + +INCDIR = sysconfig.get_python_inc() +LIBDIR1 = get_config_var('LIBDIR') +LIBDIR2 = get_config_var('LIBPL') +PYLIB = get_config_var('LIBRARY') +PYLIB_DYN = get_config_var('LDLIBRARY') +if PYLIB_DYN == PYLIB: + # no shared library + PYLIB_DYN = '' +else: + PYLIB_DYN = os.path.splitext(PYLIB_DYN[3:])[0] # 'lib(XYZ).so' -> XYZ + +CC = get_config_var('CC', os.environ.get('CC', '')) +CFLAGS = get_config_var('CFLAGS') + ' ' + os.environ.get('CFLAGS', '') +LINKCC = get_config_var('LINKCC', os.environ.get('LINKCC', CC)) +LINKFORSHARED = get_config_var('LINKFORSHARED') +LIBS = get_config_var('LIBS') +SYSLIBS = get_config_var('SYSLIBS') +EXE_EXT = sysconfig.get_config_var('EXE') + +def _debug(msg, *args): + if DEBUG: + if args: + msg = msg % args + sys.stderr.write(msg + '\n') + +def dump_config(): + _debug('INCDIR: %s', INCDIR) + _debug('LIBDIR1: %s', LIBDIR1) + _debug('LIBDIR2: %s', LIBDIR2) + _debug('PYLIB: %s', PYLIB) + _debug('PYLIB_DYN: %s', PYLIB_DYN) + _debug('CC: %s', CC) + _debug('CFLAGS: %s', CFLAGS) + _debug('LINKCC: %s', LINKCC) + _debug('LINKFORSHARED: %s', LINKFORSHARED) + _debug('LIBS: %s', LIBS) + _debug('SYSLIBS: %s', SYSLIBS) + _debug('EXE_EXT: %s', EXE_EXT) + +def runcmd(cmd, shell=True): + if shell: + cmd = ' '.join(cmd) + _debug(cmd) + else: + _debug(' '.join(cmd)) + + try: + import subprocess + except ImportError: # Python 2.3 ... + returncode = os.system(cmd) + else: + returncode = subprocess.call(cmd, shell=shell) + + if returncode: + sys.exit(returncode) + +def clink(basename): + runcmd([LINKCC, '-o', basename + EXE_EXT, basename+'.o', '-L'+LIBDIR1, '-L'+LIBDIR2] + + [PYLIB_DYN and ('-l'+PYLIB_DYN) or os.path.join(LIBDIR1, PYLIB)] + + LIBS.split() + SYSLIBS.split() + LINKFORSHARED.split()) + +def ccompile(basename): + runcmd([CC, '-c', '-o', basename+'.o', basename+'.c', '-I' + INCDIR] + CFLAGS.split()) + +def cycompile(input_file, options=()): + from ..Compiler import Version, CmdLine, Main + options, sources = CmdLine.parse_command_line(list(options or ()) + ['--embed', input_file]) + _debug('Using Cython %s to compile %s', Version.version, input_file) + result = Main.compile(sources, options) + if result.num_errors > 0: + sys.exit(1) + +def exec_file(program_name, args=()): + runcmd([os.path.abspath(program_name)] + list(args), shell=False) + +def build(input_file, compiler_args=(), force=False): + """ + Build an executable program from a Cython module. + + Returns the name of the executable file. + """ + basename = os.path.splitext(input_file)[0] + exe_file = basename + EXE_EXT + if not force and os.path.abspath(exe_file) == os.path.abspath(input_file): + raise ValueError("Input and output file names are the same, refusing to overwrite") + if (not force and os.path.exists(exe_file) and os.path.exists(input_file) + and os.path.getmtime(input_file) <= os.path.getmtime(exe_file)): + _debug("File is up to date, not regenerating %s", exe_file) + return exe_file + cycompile(input_file, compiler_args) + ccompile(basename) + clink(basename) + return exe_file + +def build_and_run(args): + """ + Build an executable program from a Cython module and runs it. + + Arguments after the module name will be passed verbatimely to the + program. + """ + cy_args = [] + last_arg = None + for i, arg in enumerate(args): + if arg.startswith('-'): + cy_args.append(arg) + elif last_arg in ('-X', '--directive'): + cy_args.append(arg) + else: + input_file = arg + args = args[i+1:] + break + last_arg = arg + else: + raise ValueError('no input file provided') + + program_name = build(input_file, cy_args) + exec_file(program_name, args) + +if __name__ == '__main__': + build_and_run(sys.argv[1:]) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Cythonize.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Cythonize.py new file mode 100644 index 00000000000..c85b6eabab2 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Cythonize.py @@ -0,0 +1,229 @@ +#!/usr/bin/env python + +from __future__ import absolute_import + +import os +import shutil +import tempfile +from distutils.core import setup + +from .Dependencies import cythonize, extended_iglob +from ..Utils import is_package_dir +from ..Compiler import Options + +try: + import multiprocessing + parallel_compiles = int(multiprocessing.cpu_count() * 1.5) +except ImportError: + multiprocessing = None + parallel_compiles = 0 + + +class _FakePool(object): + def map_async(self, func, args): + try: + from itertools import imap + except ImportError: + imap=map + for _ in imap(func, args): + pass + + def close(self): + pass + + def terminate(self): + pass + + def join(self): + pass + + +def parse_directives(option, name, value, parser): + dest = option.dest + old_directives = dict(getattr(parser.values, dest, + Options.get_directive_defaults())) + directives = Options.parse_directive_list( + value, relaxed_bool=True, current_settings=old_directives) + setattr(parser.values, dest, directives) + + +def parse_options(option, name, value, parser): + dest = option.dest + options = dict(getattr(parser.values, dest, {})) + for opt in value.split(','): + if '=' in opt: + n, v = opt.split('=', 1) + v = v.lower() not in ('false', 'f', '0', 'no') + else: + n, v = opt, True + options[n] = v + setattr(parser.values, dest, options) + + +def parse_compile_time_env(option, name, value, parser): + dest = option.dest + old_env = dict(getattr(parser.values, dest, {})) + new_env = Options.parse_compile_time_env(value, current_settings=old_env) + setattr(parser.values, dest, new_env) + + +def find_package_base(path): + base_dir, package_path = os.path.split(path) + while os.path.isfile(os.path.join(base_dir, '__init__.py')): + base_dir, parent = os.path.split(base_dir) + package_path = '%s/%s' % (parent, package_path) + return base_dir, package_path + + +def cython_compile(path_pattern, options): + pool = None + all_paths = map(os.path.abspath, extended_iglob(path_pattern)) + try: + for path in all_paths: + if options.build_inplace: + base_dir = path + while not os.path.isdir(base_dir) or is_package_dir(base_dir): + base_dir = os.path.dirname(base_dir) + else: + base_dir = None + + if os.path.isdir(path): + # recursively compiling a package + paths = [os.path.join(path, '**', '*.{py,pyx}')] + else: + # assume it's a file(-like thing) + paths = [path] + + ext_modules = cythonize( + paths, + nthreads=options.parallel, + exclude_failures=options.keep_going, + exclude=options.excludes, + compiler_directives=options.directives, + compile_time_env=options.compile_time_env, + force=options.force, + quiet=options.quiet, + depfile=options.depfile, + **options.options) + + if ext_modules and options.build: + if len(ext_modules) > 1 and options.parallel > 1: + if pool is None: + try: + pool = multiprocessing.Pool(options.parallel) + except OSError: + pool = _FakePool() + pool.map_async(run_distutils, [ + (base_dir, [ext]) for ext in ext_modules]) + else: + run_distutils((base_dir, ext_modules)) + except: + if pool is not None: + pool.terminate() + raise + else: + if pool is not None: + pool.close() + pool.join() + + +def run_distutils(args): + base_dir, ext_modules = args + script_args = ['build_ext', '-i'] + cwd = os.getcwd() + temp_dir = None + try: + if base_dir: + os.chdir(base_dir) + temp_dir = tempfile.mkdtemp(dir=base_dir) + script_args.extend(['--build-temp', temp_dir]) + setup( + script_name='setup.py', + script_args=script_args, + ext_modules=ext_modules, + ) + finally: + if base_dir: + os.chdir(cwd) + if temp_dir and os.path.isdir(temp_dir): + shutil.rmtree(temp_dir) + + +def parse_args(args): + from optparse import OptionParser + parser = OptionParser(usage='%prog [options] [sources and packages]+') + + parser.add_option('-X', '--directive', metavar='NAME=VALUE,...', + dest='directives', default={}, type="str", + action='callback', callback=parse_directives, + help='set a compiler directive') + parser.add_option('-E', '--compile-time-env', metavar='NAME=VALUE,...', + dest='compile_time_env', default={}, type="str", + action='callback', callback=parse_compile_time_env, + help='set a compile time environment variable') + parser.add_option('-s', '--option', metavar='NAME=VALUE', + dest='options', default={}, type="str", + action='callback', callback=parse_options, + help='set a cythonize option') + parser.add_option('-2', dest='language_level', action='store_const', const=2, default=None, + help='use Python 2 syntax mode by default') + parser.add_option('-3', dest='language_level', action='store_const', const=3, + help='use Python 3 syntax mode by default') + parser.add_option('--3str', dest='language_level', action='store_const', const='3str', + help='use Python 3 syntax mode by default') + parser.add_option('-a', '--annotate', dest='annotate', action='store_true', + help='generate annotated HTML page for source files') + + parser.add_option('-x', '--exclude', metavar='PATTERN', dest='excludes', + action='append', default=[], + help='exclude certain file patterns from the compilation') + + parser.add_option('-b', '--build', dest='build', action='store_true', + help='build extension modules using distutils') + parser.add_option('-i', '--inplace', dest='build_inplace', action='store_true', + help='build extension modules in place using distutils (implies -b)') + parser.add_option('-j', '--parallel', dest='parallel', metavar='N', + type=int, default=parallel_compiles, + help=('run builds in N parallel jobs (default: %d)' % + parallel_compiles or 1)) + parser.add_option('-f', '--force', dest='force', action='store_true', + help='force recompilation') + parser.add_option('-q', '--quiet', dest='quiet', action='store_true', + help='be less verbose during compilation') + + parser.add_option('--lenient', dest='lenient', action='store_true', + help='increase Python compatibility by ignoring some compile time errors') + parser.add_option('-k', '--keep-going', dest='keep_going', action='store_true', + help='compile as much as possible, ignore compilation failures') + parser.add_option('-M', '--depfile', action='store_true', help='produce depfiles for the sources') + + options, args = parser.parse_args(args) + if not args: + parser.error("no source files provided") + if options.build_inplace: + options.build = True + if multiprocessing is None: + options.parallel = 0 + if options.language_level: + assert options.language_level in (2, 3, '3str') + options.options['language_level'] = options.language_level + return options, args + + +def main(args=None): + options, paths = parse_args(args) + + if options.lenient: + # increase Python compatibility by ignoring compile time errors + Options.error_on_unknown_names = False + Options.error_on_uninitialized = False + + if options.annotate: + Options.annotate = True + + for path in paths: + cython_compile(path, options) + + +if __name__ == '__main__': + main() diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Dependencies.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Dependencies.py new file mode 100644 index 00000000000..7eb55e2607d --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Dependencies.py @@ -0,0 +1,1308 @@ +from __future__ import absolute_import, print_function + +import cython +from .. import __version__ + +import collections +import contextlib +import hashlib +import os +import shutil +import subprocess +import re, sys, time +import warnings +from glob import iglob +from io import open as io_open +from os.path import relpath as _relpath +from distutils.extension import Extension +from distutils.util import strtobool +import zipfile + +try: + from collections.abc import Iterable +except ImportError: + from collections import Iterable + +try: + import gzip + gzip_open = gzip.open + gzip_ext = '.gz' +except ImportError: + gzip_open = open + gzip_ext = '' + +try: + import zlib + zipfile_compression_mode = zipfile.ZIP_DEFLATED +except ImportError: + zipfile_compression_mode = zipfile.ZIP_STORED + +try: + import pythran +except: + pythran = None + +from .. import Utils +from ..Utils import (cached_function, cached_method, path_exists, + safe_makedirs, copy_file_to_dir_if_newer, is_package_dir, replace_suffix) +from ..Compiler.Main import Context, CompilationOptions, default_options + +join_path = cached_function(os.path.join) +copy_once_if_newer = cached_function(copy_file_to_dir_if_newer) +safe_makedirs_once = cached_function(safe_makedirs) + +if sys.version_info[0] < 3: + # stupid Py2 distutils enforces str type in list of sources + _fs_encoding = sys.getfilesystemencoding() + if _fs_encoding is None: + _fs_encoding = sys.getdefaultencoding() + def encode_filename_in_py2(filename): + if not isinstance(filename, bytes): + return filename.encode(_fs_encoding) + return filename +else: + def encode_filename_in_py2(filename): + return filename + basestring = str + + +def _make_relative(file_paths, base=None): + if not base: + base = os.getcwd() + if base[-1] != os.path.sep: + base += os.path.sep + return [_relpath(path, base) if path.startswith(base) else path + for path in file_paths] + + +def extended_iglob(pattern): + if '{' in pattern: + m = re.match('(.*){([^}]+)}(.*)', pattern) + if m: + before, switch, after = m.groups() + for case in switch.split(','): + for path in extended_iglob(before + case + after): + yield path + return + if '**/' in pattern: + seen = set() + first, rest = pattern.split('**/', 1) + if first: + first = iglob(first+'/') + else: + first = [''] + for root in first: + for path in extended_iglob(join_path(root, rest)): + if path not in seen: + seen.add(path) + yield path + for path in extended_iglob(join_path(root, '*', '**/' + rest)): + if path not in seen: + seen.add(path) + yield path + else: + for path in iglob(pattern): + yield path + + +def nonempty(it, error_msg="expected non-empty iterator"): + empty = True + for value in it: + empty = False + yield value + if empty: + raise ValueError(error_msg) + + +@cached_function +def file_hash(filename): + path = os.path.normpath(filename) + prefix = ('%d:%s' % (len(path), path)).encode("UTF-8") + m = hashlib.md5(prefix) + with open(path, 'rb') as f: + data = f.read(65000) + while data: + m.update(data) + data = f.read(65000) + return m.hexdigest() + + +def update_pythran_extension(ext): + if pythran is None: + raise RuntimeError("You first need to install Pythran to use the np_pythran directive.") + try: + pythran_ext = pythran.config.make_extension(python=True) + except TypeError: # older pythran version only + pythran_ext = pythran.config.make_extension() + + ext.include_dirs.extend(pythran_ext['include_dirs']) + ext.extra_compile_args.extend(pythran_ext['extra_compile_args']) + ext.extra_link_args.extend(pythran_ext['extra_link_args']) + ext.define_macros.extend(pythran_ext['define_macros']) + ext.undef_macros.extend(pythran_ext['undef_macros']) + ext.library_dirs.extend(pythran_ext['library_dirs']) + ext.libraries.extend(pythran_ext['libraries']) + ext.language = 'c++' + + # These options are not compatible with the way normal Cython extensions work + for bad_option in ["-fwhole-program", "-fvisibility=hidden"]: + try: + ext.extra_compile_args.remove(bad_option) + except ValueError: + pass + + +def parse_list(s): + """ + >>> parse_list("") + [] + >>> parse_list("a") + ['a'] + >>> parse_list("a b c") + ['a', 'b', 'c'] + >>> parse_list("[a, b, c]") + ['a', 'b', 'c'] + >>> parse_list('a " " b') + ['a', ' ', 'b'] + >>> parse_list('[a, ",a", "a,", ",", ]') + ['a', ',a', 'a,', ','] + """ + if len(s) >= 2 and s[0] == '[' and s[-1] == ']': + s = s[1:-1] + delimiter = ',' + else: + delimiter = ' ' + s, literals = strip_string_literals(s) + def unquote(literal): + literal = literal.strip() + if literal[0] in "'\"": + return literals[literal[1:-1]] + else: + return literal + return [unquote(item) for item in s.split(delimiter) if item.strip()] + + +transitive_str = object() +transitive_list = object() +bool_or = object() + +distutils_settings = { + 'name': str, + 'sources': list, + 'define_macros': list, + 'undef_macros': list, + 'libraries': transitive_list, + 'library_dirs': transitive_list, + 'runtime_library_dirs': transitive_list, + 'include_dirs': transitive_list, + 'extra_objects': list, + 'extra_compile_args': transitive_list, + 'extra_link_args': transitive_list, + 'export_symbols': list, + 'depends': transitive_list, + 'language': transitive_str, + 'np_pythran': bool_or +} + + +@cython.locals(start=cython.Py_ssize_t, end=cython.Py_ssize_t) +def line_iter(source): + if isinstance(source, basestring): + start = 0 + while True: + end = source.find('\n', start) + if end == -1: + yield source[start:] + return + yield source[start:end] + start = end+1 + else: + for line in source: + yield line + + +class DistutilsInfo(object): + + def __init__(self, source=None, exn=None): + self.values = {} + if source is not None: + for line in line_iter(source): + line = line.lstrip() + if not line: + continue + if line[0] != '#': + break + line = line[1:].lstrip() + kind = next((k for k in ("distutils:","cython:") if line.startswith(k)), None) + if kind is not None: + key, _, value = [s.strip() for s in line[len(kind):].partition('=')] + type = distutils_settings.get(key, None) + if line.startswith("cython:") and type is None: continue + if type in (list, transitive_list): + value = parse_list(value) + if key == 'define_macros': + value = [tuple(macro.split('=', 1)) + if '=' in macro else (macro, None) + for macro in value] + if type is bool_or: + value = strtobool(value) + self.values[key] = value + elif exn is not None: + for key in distutils_settings: + if key in ('name', 'sources','np_pythran'): + continue + value = getattr(exn, key, None) + if value: + self.values[key] = value + + def merge(self, other): + if other is None: + return self + for key, value in other.values.items(): + type = distutils_settings[key] + if type is transitive_str and key not in self.values: + self.values[key] = value + elif type is transitive_list: + if key in self.values: + # Change a *copy* of the list (Trac #845) + all = self.values[key][:] + for v in value: + if v not in all: + all.append(v) + value = all + self.values[key] = value + elif type is bool_or: + self.values[key] = self.values.get(key, False) | value + return self + + def subs(self, aliases): + if aliases is None: + return self + resolved = DistutilsInfo() + for key, value in self.values.items(): + type = distutils_settings[key] + if type in [list, transitive_list]: + new_value_list = [] + for v in value: + if v in aliases: + v = aliases[v] + if isinstance(v, list): + new_value_list += v + else: + new_value_list.append(v) + value = new_value_list + else: + if value in aliases: + value = aliases[value] + resolved.values[key] = value + return resolved + + def apply(self, extension): + for key, value in self.values.items(): + type = distutils_settings[key] + if type in [list, transitive_list]: + value = getattr(extension, key) + list(value) + setattr(extension, key, value) + + +@cython.locals(start=cython.Py_ssize_t, q=cython.Py_ssize_t, + single_q=cython.Py_ssize_t, double_q=cython.Py_ssize_t, + hash_mark=cython.Py_ssize_t, end=cython.Py_ssize_t, + k=cython.Py_ssize_t, counter=cython.Py_ssize_t, quote_len=cython.Py_ssize_t) +def strip_string_literals(code, prefix='__Pyx_L'): + """ + Normalizes every string literal to be of the form '__Pyx_Lxxx', + returning the normalized code and a mapping of labels to + string literals. + """ + new_code = [] + literals = {} + counter = 0 + start = q = 0 + in_quote = False + hash_mark = single_q = double_q = -1 + code_len = len(code) + quote_type = None + quote_len = -1 + + while True: + if hash_mark < q: + hash_mark = code.find('#', q) + if single_q < q: + single_q = code.find("'", q) + if double_q < q: + double_q = code.find('"', q) + q = min(single_q, double_q) + if q == -1: + q = max(single_q, double_q) + + # We're done. + if q == -1 and hash_mark == -1: + new_code.append(code[start:]) + break + + # Try to close the quote. + elif in_quote: + if code[q-1] == u'\\': + k = 2 + while q >= k and code[q-k] == u'\\': + k += 1 + if k % 2 == 0: + q += 1 + continue + if code[q] == quote_type and ( + quote_len == 1 or (code_len > q + 2 and quote_type == code[q+1] == code[q+2])): + counter += 1 + label = "%s%s_" % (prefix, counter) + literals[label] = code[start+quote_len:q] + full_quote = code[q:q+quote_len] + new_code.append(full_quote) + new_code.append(label) + new_code.append(full_quote) + q += quote_len + in_quote = False + start = q + else: + q += 1 + + # Process comment. + elif -1 != hash_mark and (hash_mark < q or q == -1): + new_code.append(code[start:hash_mark+1]) + end = code.find('\n', hash_mark) + counter += 1 + label = "%s%s_" % (prefix, counter) + if end == -1: + end_or_none = None + else: + end_or_none = end + literals[label] = code[hash_mark+1:end_or_none] + new_code.append(label) + if end == -1: + break + start = q = end + + # Open the quote. + else: + if code_len >= q+3 and (code[q] == code[q+1] == code[q+2]): + quote_len = 3 + else: + quote_len = 1 + in_quote = True + quote_type = code[q] + new_code.append(code[start:q]) + start = q + q += quote_len + + return "".join(new_code), literals + + +# We need to allow spaces to allow for conditional compilation like +# IF ...: +# cimport ... +dependency_regex = re.compile(r"(?:^\s*from +([0-9a-zA-Z_.]+) +cimport)|" + r"(?:^\s*cimport +([0-9a-zA-Z_.]+(?: *, *[0-9a-zA-Z_.]+)*))|" + r"(?:^\s*cdef +extern +from +['\"]([^'\"]+)['\"])|" + r"(?:^\s*include +['\"]([^'\"]+)['\"])", re.M) +dependency_after_from_regex = re.compile( + r"(?:^\s+\(([0-9a-zA-Z_., ]*)\)[#\n])|" + r"(?:^\s+([0-9a-zA-Z_., ]*)[#\n])", + re.M) + + +def normalize_existing(base_path, rel_paths): + return normalize_existing0(os.path.dirname(base_path), tuple(set(rel_paths))) + + +@cached_function +def normalize_existing0(base_dir, rel_paths): + """ + Given some base directory ``base_dir`` and a list of path names + ``rel_paths``, normalize each relative path name ``rel`` by + replacing it by ``os.path.join(base, rel)`` if that file exists. + + Return a couple ``(normalized, needed_base)`` where ``normalized`` + if the list of normalized file names and ``needed_base`` is + ``base_dir`` if we actually needed ``base_dir``. If no paths were + changed (for example, if all paths were already absolute), then + ``needed_base`` is ``None``. + """ + normalized = [] + needed_base = None + for rel in rel_paths: + if os.path.isabs(rel): + normalized.append(rel) + continue + path = join_path(base_dir, rel) + if path_exists(path): + normalized.append(os.path.normpath(path)) + needed_base = base_dir + else: + normalized.append(rel) + return (normalized, needed_base) + + +def resolve_depends(depends, include_dirs): + include_dirs = tuple(include_dirs) + resolved = [] + for depend in depends: + path = resolve_depend(depend, include_dirs) + if path is not None: + resolved.append(path) + return resolved + + +@cached_function +def resolve_depend(depend, include_dirs): + if depend[0] == '<' and depend[-1] == '>': + return None + for dir in include_dirs: + path = join_path(dir, depend) + if path_exists(path): + return os.path.normpath(path) + return None + + +@cached_function +def package(filename): + dir = os.path.dirname(os.path.abspath(str(filename))) + if dir != filename and is_package_dir(dir): + return package(dir) + (os.path.basename(dir),) + else: + return () + + +@cached_function +def fully_qualified_name(filename): + module = os.path.splitext(os.path.basename(filename))[0] + return '.'.join(package(filename) + (module,)) + + +@cached_function +def parse_dependencies(source_filename): + # Actual parsing is way too slow, so we use regular expressions. + # The only catch is that we must strip comments and string + # literals ahead of time. + with Utils.open_source_file(source_filename, error_handling='ignore') as fh: + source = fh.read() + distutils_info = DistutilsInfo(source) + source, literals = strip_string_literals(source) + source = source.replace('\\\n', ' ').replace('\t', ' ') + + # TODO: pure mode + cimports = [] + includes = [] + externs = [] + for m in dependency_regex.finditer(source): + cimport_from, cimport_list, extern, include = m.groups() + if cimport_from: + cimports.append(cimport_from) + m_after_from = dependency_after_from_regex.search(source, pos=m.end()) + if m_after_from: + multiline, one_line = m_after_from.groups() + subimports = multiline or one_line + cimports.extend("{0}.{1}".format(cimport_from, s.strip()) + for s in subimports.split(',')) + + elif cimport_list: + cimports.extend(x.strip() for x in cimport_list.split(",")) + elif extern: + externs.append(literals[extern]) + else: + includes.append(literals[include]) + return cimports, includes, externs, distutils_info + + +class DependencyTree(object): + + def __init__(self, context, quiet=False): + self.context = context + self.quiet = quiet + self._transitive_cache = {} + + def parse_dependencies(self, source_filename): + if path_exists(source_filename): + source_filename = os.path.normpath(source_filename) + return parse_dependencies(source_filename) + + @cached_method + def included_files(self, filename): + # This is messy because included files are textually included, resolving + # cimports (but not includes) relative to the including file. + all = set() + for include in self.parse_dependencies(filename)[1]: + include_path = join_path(os.path.dirname(filename), include) + if not path_exists(include_path): + include_path = self.context.find_include_file(include, None) + if include_path: + if '.' + os.path.sep in include_path: + include_path = os.path.normpath(include_path) + all.add(include_path) + all.update(self.included_files(include_path)) + elif not self.quiet: + print("Unable to locate '%s' referenced from '%s'" % (filename, include)) + return all + + @cached_method + def cimports_externs_incdirs(self, filename): + # This is really ugly. Nested cimports are resolved with respect to the + # includer, but includes are resolved with respect to the includee. + cimports, includes, externs = self.parse_dependencies(filename)[:3] + cimports = set(cimports) + externs = set(externs) + incdirs = set() + for include in self.included_files(filename): + included_cimports, included_externs, included_incdirs = self.cimports_externs_incdirs(include) + cimports.update(included_cimports) + externs.update(included_externs) + incdirs.update(included_incdirs) + externs, incdir = normalize_existing(filename, externs) + if incdir: + incdirs.add(incdir) + return tuple(cimports), externs, incdirs + + def cimports(self, filename): + return self.cimports_externs_incdirs(filename)[0] + + def package(self, filename): + return package(filename) + + def fully_qualified_name(self, filename): + return fully_qualified_name(filename) + + @cached_method + def find_pxd(self, module, filename=None): + is_relative = module[0] == '.' + if is_relative and not filename: + raise NotImplementedError("New relative imports.") + if filename is not None: + module_path = module.split('.') + if is_relative: + module_path.pop(0) # just explicitly relative + package_path = list(self.package(filename)) + while module_path and not module_path[0]: + try: + package_path.pop() + except IndexError: + return None # FIXME: error? + module_path.pop(0) + relative = '.'.join(package_path + module_path) + pxd = self.context.find_pxd_file(relative, None) + if pxd: + return pxd + if is_relative: + return None # FIXME: error? + return self.context.find_pxd_file(module, None) + + @cached_method + def cimported_files(self, filename): + if filename[-4:] == '.pyx' and path_exists(filename[:-4] + '.pxd'): + pxd_list = [filename[:-4] + '.pxd'] + else: + pxd_list = [] + # Cimports generates all possible combinations package.module + # when imported as from package cimport module. + for module in self.cimports(filename): + if module[:7] == 'cython.' or module == 'cython': + continue + pxd_file = self.find_pxd(module, filename) + if pxd_file is not None: + pxd_list.append(pxd_file) + return tuple(pxd_list) + + @cached_method + def immediate_dependencies(self, filename): + all = set([filename]) + all.update(self.cimported_files(filename)) + all.update(self.included_files(filename)) + return all + + def all_dependencies(self, filename): + return self.transitive_merge(filename, self.immediate_dependencies, set.union) + + @cached_method + def timestamp(self, filename): + return os.path.getmtime(filename) + + def extract_timestamp(self, filename): + return self.timestamp(filename), filename + + def newest_dependency(self, filename): + return max([self.extract_timestamp(f) for f in self.all_dependencies(filename)]) + + def transitive_fingerprint(self, filename, module, compilation_options): + r""" + Return a fingerprint of a cython file that is about to be cythonized. + + Fingerprints are looked up in future compilations. If the fingerprint + is found, the cythonization can be skipped. The fingerprint must + incorporate everything that has an influence on the generated code. + """ + try: + m = hashlib.md5(__version__.encode('UTF-8')) + m.update(file_hash(filename).encode('UTF-8')) + for x in sorted(self.all_dependencies(filename)): + if os.path.splitext(x)[1] not in ('.c', '.cpp', '.h'): + m.update(file_hash(x).encode('UTF-8')) + # Include the module attributes that change the compilation result + # in the fingerprint. We do not iterate over module.__dict__ and + # include almost everything here as users might extend Extension + # with arbitrary (random) attributes that would lead to cache + # misses. + m.update(str(( + module.language, + getattr(module, 'py_limited_api', False), + getattr(module, 'np_pythran', False) + )).encode('UTF-8')) + + m.update(compilation_options.get_fingerprint().encode('UTF-8')) + return m.hexdigest() + except IOError: + return None + + def distutils_info0(self, filename): + info = self.parse_dependencies(filename)[3] + kwds = info.values + cimports, externs, incdirs = self.cimports_externs_incdirs(filename) + basedir = os.getcwd() + # Add dependencies on "cdef extern from ..." files + if externs: + externs = _make_relative(externs, basedir) + if 'depends' in kwds: + kwds['depends'] = list(set(kwds['depends']).union(externs)) + else: + kwds['depends'] = list(externs) + # Add include_dirs to ensure that the C compiler will find the + # "cdef extern from ..." files + if incdirs: + include_dirs = list(kwds.get('include_dirs', [])) + for inc in _make_relative(incdirs, basedir): + if inc not in include_dirs: + include_dirs.append(inc) + kwds['include_dirs'] = include_dirs + return info + + def distutils_info(self, filename, aliases=None, base=None): + return (self.transitive_merge(filename, self.distutils_info0, DistutilsInfo.merge) + .subs(aliases) + .merge(base)) + + def transitive_merge(self, node, extract, merge): + try: + seen = self._transitive_cache[extract, merge] + except KeyError: + seen = self._transitive_cache[extract, merge] = {} + return self.transitive_merge_helper( + node, extract, merge, seen, {}, self.cimported_files)[0] + + def transitive_merge_helper(self, node, extract, merge, seen, stack, outgoing): + if node in seen: + return seen[node], None + deps = extract(node) + if node in stack: + return deps, node + try: + stack[node] = len(stack) + loop = None + for next in outgoing(node): + sub_deps, sub_loop = self.transitive_merge_helper(next, extract, merge, seen, stack, outgoing) + if sub_loop is not None: + if loop is not None and stack[loop] < stack[sub_loop]: + pass + else: + loop = sub_loop + deps = merge(deps, sub_deps) + if loop == node: + loop = None + if loop is None: + seen[node] = deps + return deps, loop + finally: + del stack[node] + + +_dep_tree = None + +def create_dependency_tree(ctx=None, quiet=False): + global _dep_tree + if _dep_tree is None: + if ctx is None: + ctx = Context(["."], CompilationOptions(default_options)) + _dep_tree = DependencyTree(ctx, quiet=quiet) + return _dep_tree + + +# If this changes, change also docs/src/reference/compilation.rst +# which mentions this function +def default_create_extension(template, kwds): + if 'depends' in kwds: + include_dirs = kwds.get('include_dirs', []) + ["."] + depends = resolve_depends(kwds['depends'], include_dirs) + kwds['depends'] = sorted(set(depends + template.depends)) + + t = template.__class__ + ext = t(**kwds) + metadata = dict(distutils=kwds, module_name=kwds['name']) + return (ext, metadata) + + +# This may be useful for advanced users? +def create_extension_list(patterns, exclude=None, ctx=None, aliases=None, quiet=False, language=None, + exclude_failures=False): + if language is not None: + print('Warning: passing language={0!r} to cythonize() is deprecated. ' + 'Instead, put "# distutils: language={0}" in your .pyx or .pxd file(s)'.format(language)) + if exclude is None: + exclude = [] + if patterns is None: + return [], {} + elif isinstance(patterns, basestring) or not isinstance(patterns, Iterable): + patterns = [patterns] + explicit_modules = set([m.name for m in patterns if isinstance(m, Extension)]) + seen = set() + deps = create_dependency_tree(ctx, quiet=quiet) + to_exclude = set() + if not isinstance(exclude, list): + exclude = [exclude] + for pattern in exclude: + to_exclude.update(map(os.path.abspath, extended_iglob(pattern))) + + module_list = [] + module_metadata = {} + + # workaround for setuptools + if 'setuptools' in sys.modules: + Extension_distutils = sys.modules['setuptools.extension']._Extension + Extension_setuptools = sys.modules['setuptools'].Extension + else: + # dummy class, in case we do not have setuptools + Extension_distutils = Extension + class Extension_setuptools(Extension): pass + + # if no create_extension() function is defined, use a simple + # default function. + create_extension = ctx.options.create_extension or default_create_extension + + for pattern in patterns: + if isinstance(pattern, str): + filepattern = pattern + template = Extension(pattern, []) # Fake Extension without sources + name = '*' + base = None + ext_language = language + elif isinstance(pattern, (Extension_distutils, Extension_setuptools)): + cython_sources = [s for s in pattern.sources + if os.path.splitext(s)[1] in ('.py', '.pyx')] + if cython_sources: + filepattern = cython_sources[0] + if len(cython_sources) > 1: + print("Warning: Multiple cython sources found for extension '%s': %s\n" + "See http://cython.readthedocs.io/en/latest/src/userguide/sharing_declarations.html " + "for sharing declarations among Cython files." % (pattern.name, cython_sources)) + else: + # ignore non-cython modules + module_list.append(pattern) + continue + template = pattern + name = template.name + base = DistutilsInfo(exn=template) + ext_language = None # do not override whatever the Extension says + else: + msg = str("pattern is not of type str nor subclass of Extension (%s)" + " but of type %s and class %s" % (repr(Extension), + type(pattern), + pattern.__class__)) + raise TypeError(msg) + + for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern): + if os.path.abspath(file) in to_exclude: + continue + module_name = deps.fully_qualified_name(file) + if '*' in name: + if module_name in explicit_modules: + continue + elif name: + module_name = name + + Utils.raise_error_if_module_name_forbidden(module_name) + + if module_name not in seen: + try: + kwds = deps.distutils_info(file, aliases, base).values + except Exception: + if exclude_failures: + continue + raise + if base is not None: + for key, value in base.values.items(): + if key not in kwds: + kwds[key] = value + + kwds['name'] = module_name + + sources = [file] + [m for m in template.sources if m != filepattern] + if 'sources' in kwds: + # allow users to add .c files etc. + for source in kwds['sources']: + source = encode_filename_in_py2(source) + if source not in sources: + sources.append(source) + kwds['sources'] = sources + + if ext_language and 'language' not in kwds: + kwds['language'] = ext_language + + np_pythran = kwds.pop('np_pythran', False) + + # Create the new extension + m, metadata = create_extension(template, kwds) + m.np_pythran = np_pythran or getattr(m, 'np_pythran', False) + if m.np_pythran: + update_pythran_extension(m) + module_list.append(m) + + # Store metadata (this will be written as JSON in the + # generated C file but otherwise has no purpose) + module_metadata[module_name] = metadata + + if file not in m.sources: + # Old setuptools unconditionally replaces .pyx with .c/.cpp + target_file = os.path.splitext(file)[0] + ('.cpp' if m.language == 'c++' else '.c') + try: + m.sources.remove(target_file) + except ValueError: + # never seen this in the wild, but probably better to warn about this unexpected case + print("Warning: Cython source file not found in sources list, adding %s" % file) + m.sources.insert(0, file) + seen.add(name) + return module_list, module_metadata + + +# This is the user-exposed entry point. +def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False, force=False, language=None, + exclude_failures=False, **options): + """ + Compile a set of source modules into C/C++ files and return a list of distutils + Extension objects for them. + + :param module_list: As module list, pass either a glob pattern, a list of glob + patterns or a list of Extension objects. The latter + allows you to configure the extensions separately + through the normal distutils options. + You can also pass Extension objects that have + glob patterns as their sources. Then, cythonize + will resolve the pattern and create a + copy of the Extension for every matching file. + + :param exclude: When passing glob patterns as ``module_list``, you can exclude certain + module names explicitly by passing them into the ``exclude`` option. + + :param nthreads: The number of concurrent builds for parallel compilation + (requires the ``multiprocessing`` module). + + :param aliases: If you want to use compiler directives like ``# distutils: ...`` but + can only know at compile time (when running the ``setup.py``) which values + to use, you can use aliases and pass a dictionary mapping those aliases + to Python strings when calling :func:`cythonize`. As an example, say you + want to use the compiler + directive ``# distutils: include_dirs = ../static_libs/include/`` + but this path isn't always fixed and you want to find it when running + the ``setup.py``. You can then do ``# distutils: include_dirs = MY_HEADERS``, + find the value of ``MY_HEADERS`` in the ``setup.py``, put it in a python + variable called ``foo`` as a string, and then call + ``cythonize(..., aliases={'MY_HEADERS': foo})``. + + :param quiet: If True, Cython won't print error, warning, or status messages during the + compilation. + + :param force: Forces the recompilation of the Cython modules, even if the timestamps + don't indicate that a recompilation is necessary. + + :param language: To globally enable C++ mode, you can pass ``language='c++'``. Otherwise, this + will be determined at a per-file level based on compiler directives. This + affects only modules found based on file names. Extension instances passed + into :func:`cythonize` will not be changed. It is recommended to rather + use the compiler directive ``# distutils: language = c++`` than this option. + + :param exclude_failures: For a broad 'try to compile' mode that ignores compilation + failures and simply excludes the failed extensions, + pass ``exclude_failures=True``. Note that this only + really makes sense for compiling ``.py`` files which can also + be used without compilation. + + :param annotate: If ``True``, will produce a HTML file for each of the ``.pyx`` or ``.py`` + files compiled. The HTML file gives an indication + of how much Python interaction there is in + each of the source code lines, compared to plain C code. + It also allows you to see the C/C++ code + generated for each line of Cython code. This report is invaluable when + optimizing a function for speed, + and for determining when to :ref:`release the GIL `: + in general, a ``nogil`` block may contain only "white" code. + See examples in :ref:`determining_where_to_add_types` or + :ref:`primes`. + + :param compiler_directives: Allow to set compiler directives in the ``setup.py`` like this: + ``compiler_directives={'embedsignature': True}``. + See :ref:`compiler-directives`. + + :param depfile: produce depfiles for the sources if True. + """ + if exclude is None: + exclude = [] + if 'include_path' not in options: + options['include_path'] = ['.'] + if 'common_utility_include_dir' in options: + safe_makedirs(options['common_utility_include_dir']) + + depfile = options.pop('depfile', None) + + if pythran is None: + pythran_options = None + else: + pythran_options = CompilationOptions(**options) + pythran_options.cplus = True + pythran_options.np_pythran = True + + c_options = CompilationOptions(**options) + cpp_options = CompilationOptions(**options); cpp_options.cplus = True + ctx = c_options.create_context() + options = c_options + module_list, module_metadata = create_extension_list( + module_list, + exclude=exclude, + ctx=ctx, + quiet=quiet, + exclude_failures=exclude_failures, + language=language, + aliases=aliases) + deps = create_dependency_tree(ctx, quiet=quiet) + build_dir = getattr(options, 'build_dir', None) + + def copy_to_build_dir(filepath, root=os.getcwd()): + filepath_abs = os.path.abspath(filepath) + if os.path.isabs(filepath): + filepath = filepath_abs + if filepath_abs.startswith(root): + # distutil extension depends are relative to cwd + mod_dir = join_path(build_dir, + os.path.dirname(_relpath(filepath, root))) + copy_once_if_newer(filepath_abs, mod_dir) + + modules_by_cfile = collections.defaultdict(list) + to_compile = [] + for m in module_list: + if build_dir: + for dep in m.depends: + copy_to_build_dir(dep) + + cy_sources = [ + source for source in m.sources + if os.path.splitext(source)[1] in ('.pyx', '.py')] + if len(cy_sources) == 1: + # normal "special" case: believe the Extension module name to allow user overrides + full_module_name = m.name + else: + # infer FQMN from source files + full_module_name = None + + new_sources = [] + for source in m.sources: + base, ext = os.path.splitext(source) + if ext in ('.pyx', '.py'): + if m.np_pythran: + c_file = base + '.cpp' + options = pythran_options + elif m.language == 'c++': + c_file = base + '.cpp' + options = cpp_options + else: + c_file = base + '.c' + options = c_options + + # setup for out of place build directory if enabled + if build_dir: + if os.path.isabs(c_file): + warnings.warn("build_dir has no effect for absolute source paths") + c_file = os.path.join(build_dir, c_file) + dir = os.path.dirname(c_file) + safe_makedirs_once(dir) + + # write out the depfile, if requested + if depfile: + dependencies = deps.all_dependencies(source) + src_base_dir, _ = os.path.split(source) + if not src_base_dir.endswith(os.sep): + src_base_dir += os.sep + # paths below the base_dir are relative, otherwise absolute + paths = [] + for fname in dependencies: + if (fname.startswith(src_base_dir) or + fname.startswith('.' + os.path.sep)): + paths.append(os.path.relpath(fname, src_base_dir)) + else: + paths.append(os.path.abspath(fname)) + + depline = os.path.split(c_file)[1] + ": \\\n " + depline += " \\\n ".join(paths) + "\n" + with open(c_file+'.dep', 'w') as outfile: + outfile.write(depline) + + if os.path.exists(c_file): + c_timestamp = os.path.getmtime(c_file) + else: + c_timestamp = -1 + + # Priority goes first to modified files, second to direct + # dependents, and finally to indirect dependents. + if c_timestamp < deps.timestamp(source): + dep_timestamp, dep = deps.timestamp(source), source + priority = 0 + else: + dep_timestamp, dep = deps.newest_dependency(source) + priority = 2 - (dep in deps.immediate_dependencies(source)) + if force or c_timestamp < dep_timestamp: + if not quiet and not force: + if source == dep: + print("Compiling %s because it changed." % source) + else: + print("Compiling %s because it depends on %s." % (source, dep)) + if not force and options.cache: + fingerprint = deps.transitive_fingerprint(source, m, options) + else: + fingerprint = None + to_compile.append(( + priority, source, c_file, fingerprint, quiet, + options, not exclude_failures, module_metadata.get(m.name), + full_module_name)) + new_sources.append(c_file) + modules_by_cfile[c_file].append(m) + else: + new_sources.append(source) + if build_dir: + copy_to_build_dir(source) + m.sources = new_sources + + if options.cache: + if not os.path.exists(options.cache): + os.makedirs(options.cache) + to_compile.sort() + # Drop "priority" component of "to_compile" entries and add a + # simple progress indicator. + N = len(to_compile) + progress_fmt = "[{0:%d}/{1}] " % len(str(N)) + for i in range(N): + progress = progress_fmt.format(i+1, N) + to_compile[i] = to_compile[i][1:] + (progress,) + + if N <= 1: + nthreads = 0 + if nthreads: + # Requires multiprocessing (or Python >= 2.6) + try: + import multiprocessing + pool = multiprocessing.Pool( + nthreads, initializer=_init_multiprocessing_helper) + except (ImportError, OSError): + print("multiprocessing required for parallel cythonization") + nthreads = 0 + else: + # This is a bit more involved than it should be, because KeyboardInterrupts + # break the multiprocessing workers when using a normal pool.map(). + # See, for example: + # http://noswap.com/blog/python-multiprocessing-keyboardinterrupt + try: + result = pool.map_async(cythonize_one_helper, to_compile, chunksize=1) + pool.close() + while not result.ready(): + try: + result.get(99999) # seconds + except multiprocessing.TimeoutError: + pass + except KeyboardInterrupt: + pool.terminate() + raise + pool.join() + if not nthreads: + for args in to_compile: + cythonize_one(*args) + + if exclude_failures: + failed_modules = set() + for c_file, modules in modules_by_cfile.items(): + if not os.path.exists(c_file): + failed_modules.update(modules) + elif os.path.getsize(c_file) < 200: + f = io_open(c_file, 'r', encoding='iso8859-1') + try: + if f.read(len('#error ')) == '#error ': + # dead compilation result + failed_modules.update(modules) + finally: + f.close() + if failed_modules: + for module in failed_modules: + module_list.remove(module) + print("Failed compilations: %s" % ', '.join(sorted([ + module.name for module in failed_modules]))) + + if options.cache: + cleanup_cache(options.cache, getattr(options, 'cache_size', 1024 * 1024 * 100)) + # cythonize() is often followed by the (non-Python-buffered) + # compiler output, flush now to avoid interleaving output. + sys.stdout.flush() + return module_list + + +if os.environ.get('XML_RESULTS'): + compile_result_dir = os.environ['XML_RESULTS'] + def record_results(func): + def with_record(*args): + t = time.time() + success = True + try: + try: + func(*args) + except: + success = False + finally: + t = time.time() - t + module = fully_qualified_name(args[0]) + name = "cythonize." + module + failures = 1 - success + if success: + failure_item = "" + else: + failure_item = "failure" + output = open(os.path.join(compile_result_dir, name + ".xml"), "w") + output.write(""" + + + + %(failure_item)s + + + """.strip() % locals()) + output.close() + return with_record +else: + def record_results(func): + return func + + +# TODO: Share context? Issue: pyx processing leaks into pxd module +@record_results +def cythonize_one(pyx_file, c_file, fingerprint, quiet, options=None, + raise_on_failure=True, embedded_metadata=None, full_module_name=None, + progress=""): + from ..Compiler.Main import compile_single, default_options + from ..Compiler.Errors import CompileError, PyrexError + + if fingerprint: + if not os.path.exists(options.cache): + safe_makedirs(options.cache) + # Cython-generated c files are highly compressible. + # (E.g. a compression ratio of about 10 for Sage). + fingerprint_file_base = join_path( + options.cache, "%s-%s" % (os.path.basename(c_file), fingerprint)) + gz_fingerprint_file = fingerprint_file_base + gzip_ext + zip_fingerprint_file = fingerprint_file_base + '.zip' + if os.path.exists(gz_fingerprint_file) or os.path.exists(zip_fingerprint_file): + if not quiet: + print("%sFound compiled %s in cache" % (progress, pyx_file)) + if os.path.exists(gz_fingerprint_file): + os.utime(gz_fingerprint_file, None) + with contextlib.closing(gzip_open(gz_fingerprint_file, 'rb')) as g: + with contextlib.closing(open(c_file, 'wb')) as f: + shutil.copyfileobj(g, f) + else: + os.utime(zip_fingerprint_file, None) + dirname = os.path.dirname(c_file) + with contextlib.closing(zipfile.ZipFile(zip_fingerprint_file)) as z: + for artifact in z.namelist(): + z.extract(artifact, os.path.join(dirname, artifact)) + return + if not quiet: + print("%sCythonizing %s" % (progress, pyx_file)) + if options is None: + options = CompilationOptions(default_options) + options.output_file = c_file + options.embedded_metadata = embedded_metadata + + any_failures = 0 + try: + result = compile_single(pyx_file, options, full_module_name=full_module_name) + if result.num_errors > 0: + any_failures = 1 + except (EnvironmentError, PyrexError) as e: + sys.stderr.write('%s\n' % e) + any_failures = 1 + # XXX + import traceback + traceback.print_exc() + except Exception: + if raise_on_failure: + raise + import traceback + traceback.print_exc() + any_failures = 1 + if any_failures: + if raise_on_failure: + raise CompileError(None, pyx_file) + elif os.path.exists(c_file): + os.remove(c_file) + elif fingerprint: + artifacts = list(filter(None, [ + getattr(result, attr, None) + for attr in ('c_file', 'h_file', 'api_file', 'i_file')])) + if len(artifacts) == 1: + fingerprint_file = gz_fingerprint_file + with contextlib.closing(open(c_file, 'rb')) as f: + with contextlib.closing(gzip_open(fingerprint_file + '.tmp', 'wb')) as g: + shutil.copyfileobj(f, g) + else: + fingerprint_file = zip_fingerprint_file + with contextlib.closing(zipfile.ZipFile( + fingerprint_file + '.tmp', 'w', zipfile_compression_mode)) as zip: + for artifact in artifacts: + zip.write(artifact, os.path.basename(artifact)) + os.rename(fingerprint_file + '.tmp', fingerprint_file) + + +def cythonize_one_helper(m): + import traceback + try: + return cythonize_one(*m) + except Exception: + traceback.print_exc() + raise + + +def _init_multiprocessing_helper(): + # KeyboardInterrupt kills workers, so don't let them get it + import signal + signal.signal(signal.SIGINT, signal.SIG_IGN) + + +def cleanup_cache(cache, target_size, ratio=.85): + try: + p = subprocess.Popen(['du', '-s', '-k', os.path.abspath(cache)], stdout=subprocess.PIPE) + res = p.wait() + if res == 0: + total_size = 1024 * int(p.stdout.read().strip().split()[0]) + if total_size < target_size: + return + except (OSError, ValueError): + pass + total_size = 0 + all = [] + for file in os.listdir(cache): + path = join_path(cache, file) + s = os.stat(path) + total_size += s.st_size + all.append((s.st_atime, s.st_size, path)) + if total_size > target_size: + for time, size, file in reversed(sorted(all)): + os.unlink(file) + total_size -= size + if total_size < target_size * ratio: + break diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Distutils.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Distutils.py new file mode 100644 index 00000000000..3efcc0d7b51 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Distutils.py @@ -0,0 +1 @@ +from Cython.Distutils.build_ext import build_ext diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Inline.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Inline.py new file mode 100644 index 00000000000..db6d2640a5e --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Inline.py @@ -0,0 +1,376 @@ +from __future__ import absolute_import + +import hashlib +import inspect +import os +import re +import sys + +from distutils.core import Distribution, Extension +from distutils.command.build_ext import build_ext + +import Cython +from ..Compiler.Main import Context, default_options + +from ..Compiler.Visitor import CythonTransform, EnvTransform +from ..Compiler.ParseTreeTransforms import SkipDeclarations +from ..Compiler.TreeFragment import parse_from_strings +from ..Compiler.StringEncoding import _unicode +from .Dependencies import strip_string_literals, cythonize, cached_function +from ..Compiler import Pipeline +from ..Utils import get_cython_cache_dir +import cython as cython_module + + +IS_PY3 = sys.version_info >= (3,) + +# A utility function to convert user-supplied ASCII strings to unicode. +if not IS_PY3: + def to_unicode(s): + if isinstance(s, bytes): + return s.decode('ascii') + else: + return s +else: + to_unicode = lambda x: x + +if sys.version_info < (3, 5): + import imp + def load_dynamic(name, module_path): + return imp.load_dynamic(name, module_path) +else: + import importlib.util as _importlib_util + def load_dynamic(name, module_path): + spec = _importlib_util.spec_from_file_location(name, module_path) + module = _importlib_util.module_from_spec(spec) + # sys.modules[name] = module + spec.loader.exec_module(module) + return module + +class UnboundSymbols(EnvTransform, SkipDeclarations): + def __init__(self): + CythonTransform.__init__(self, None) + self.unbound = set() + def visit_NameNode(self, node): + if not self.current_env().lookup(node.name): + self.unbound.add(node.name) + return node + def __call__(self, node): + super(UnboundSymbols, self).__call__(node) + return self.unbound + + +@cached_function +def unbound_symbols(code, context=None): + code = to_unicode(code) + if context is None: + context = Context([], default_options) + from ..Compiler.ParseTreeTransforms import AnalyseDeclarationsTransform + tree = parse_from_strings('(tree fragment)', code) + for phase in Pipeline.create_pipeline(context, 'pyx'): + if phase is None: + continue + tree = phase(tree) + if isinstance(phase, AnalyseDeclarationsTransform): + break + try: + import builtins + except ImportError: + import __builtin__ as builtins + return tuple(UnboundSymbols()(tree) - set(dir(builtins))) + + +def unsafe_type(arg, context=None): + py_type = type(arg) + if py_type is int: + return 'long' + else: + return safe_type(arg, context) + + +def safe_type(arg, context=None): + py_type = type(arg) + if py_type in (list, tuple, dict, str): + return py_type.__name__ + elif py_type is complex: + return 'double complex' + elif py_type is float: + return 'double' + elif py_type is bool: + return 'bint' + elif 'numpy' in sys.modules and isinstance(arg, sys.modules['numpy'].ndarray): + return 'numpy.ndarray[numpy.%s_t, ndim=%s]' % (arg.dtype.name, arg.ndim) + else: + for base_type in py_type.__mro__: + if base_type.__module__ in ('__builtin__', 'builtins'): + return 'object' + module = context.find_module(base_type.__module__, need_pxd=False) + if module: + entry = module.lookup(base_type.__name__) + if entry.is_type: + return '%s.%s' % (base_type.__module__, base_type.__name__) + return 'object' + + +def _get_build_extension(): + dist = Distribution() + # Ensure the build respects distutils configuration by parsing + # the configuration files + config_files = dist.find_config_files() + dist.parse_config_files(config_files) + build_extension = build_ext(dist) + build_extension.finalize_options() + return build_extension + + +@cached_function +def _create_context(cython_include_dirs): + return Context(list(cython_include_dirs), default_options) + + +_cython_inline_cache = {} +_cython_inline_default_context = _create_context(('.',)) + + +def _populate_unbound(kwds, unbound_symbols, locals=None, globals=None): + for symbol in unbound_symbols: + if symbol not in kwds: + if locals is None or globals is None: + calling_frame = inspect.currentframe().f_back.f_back.f_back + if locals is None: + locals = calling_frame.f_locals + if globals is None: + globals = calling_frame.f_globals + if symbol in locals: + kwds[symbol] = locals[symbol] + elif symbol in globals: + kwds[symbol] = globals[symbol] + else: + print("Couldn't find %r" % symbol) + + +def _inline_key(orig_code, arg_sigs, language_level): + key = orig_code, arg_sigs, sys.version_info, sys.executable, language_level, Cython.__version__ + return hashlib.sha1(_unicode(key).encode('utf-8')).hexdigest() + + +def cython_inline(code, get_type=unsafe_type, + lib_dir=os.path.join(get_cython_cache_dir(), 'inline'), + cython_include_dirs=None, cython_compiler_directives=None, + force=False, quiet=False, locals=None, globals=None, language_level=None, **kwds): + + if get_type is None: + get_type = lambda x: 'object' + ctx = _create_context(tuple(cython_include_dirs)) if cython_include_dirs else _cython_inline_default_context + + cython_compiler_directives = dict(cython_compiler_directives) if cython_compiler_directives else {} + if language_level is None and 'language_level' not in cython_compiler_directives: + language_level = '3str' + if language_level is not None: + cython_compiler_directives['language_level'] = language_level + + # Fast path if this has been called in this session. + _unbound_symbols = _cython_inline_cache.get(code) + if _unbound_symbols is not None: + _populate_unbound(kwds, _unbound_symbols, locals, globals) + args = sorted(kwds.items()) + arg_sigs = tuple([(get_type(value, ctx), arg) for arg, value in args]) + key_hash = _inline_key(code, arg_sigs, language_level) + invoke = _cython_inline_cache.get((code, arg_sigs, key_hash)) + if invoke is not None: + arg_list = [arg[1] for arg in args] + return invoke(*arg_list) + + orig_code = code + code = to_unicode(code) + code, literals = strip_string_literals(code) + code = strip_common_indent(code) + if locals is None: + locals = inspect.currentframe().f_back.f_back.f_locals + if globals is None: + globals = inspect.currentframe().f_back.f_back.f_globals + try: + _cython_inline_cache[orig_code] = _unbound_symbols = unbound_symbols(code) + _populate_unbound(kwds, _unbound_symbols, locals, globals) + except AssertionError: + if not quiet: + # Parsing from strings not fully supported (e.g. cimports). + print("Could not parse code as a string (to extract unbound symbols).") + + cimports = [] + for name, arg in list(kwds.items()): + if arg is cython_module: + cimports.append('\ncimport cython as %s' % name) + del kwds[name] + arg_names = sorted(kwds) + arg_sigs = tuple([(get_type(kwds[arg], ctx), arg) for arg in arg_names]) + key_hash = _inline_key(orig_code, arg_sigs, language_level) + module_name = "_cython_inline_" + key_hash + + if module_name in sys.modules: + module = sys.modules[module_name] + + else: + build_extension = None + if cython_inline.so_ext is None: + # Figure out and cache current extension suffix + build_extension = _get_build_extension() + cython_inline.so_ext = build_extension.get_ext_filename('') + + module_path = os.path.join(lib_dir, module_name + cython_inline.so_ext) + + if not os.path.exists(lib_dir): + os.makedirs(lib_dir) + if force or not os.path.isfile(module_path): + cflags = [] + c_include_dirs = [] + qualified = re.compile(r'([.\w]+)[.]') + for type, _ in arg_sigs: + m = qualified.match(type) + if m: + cimports.append('\ncimport %s' % m.groups()[0]) + # one special case + if m.groups()[0] == 'numpy': + import numpy + c_include_dirs.append(numpy.get_include()) + # cflags.append('-Wno-unused') + module_body, func_body = extract_func_code(code) + params = ', '.join(['%s %s' % a for a in arg_sigs]) + module_code = """ +%(module_body)s +%(cimports)s +def __invoke(%(params)s): +%(func_body)s + return locals() + """ % {'cimports': '\n'.join(cimports), + 'module_body': module_body, + 'params': params, + 'func_body': func_body } + for key, value in literals.items(): + module_code = module_code.replace(key, value) + pyx_file = os.path.join(lib_dir, module_name + '.pyx') + fh = open(pyx_file, 'w') + try: + fh.write(module_code) + finally: + fh.close() + extension = Extension( + name = module_name, + sources = [pyx_file], + include_dirs = c_include_dirs, + extra_compile_args = cflags) + if build_extension is None: + build_extension = _get_build_extension() + build_extension.extensions = cythonize( + [extension], + include_path=cython_include_dirs or ['.'], + compiler_directives=cython_compiler_directives, + quiet=quiet) + build_extension.build_temp = os.path.dirname(pyx_file) + build_extension.build_lib = lib_dir + build_extension.run() + + module = load_dynamic(module_name, module_path) + + _cython_inline_cache[orig_code, arg_sigs, key_hash] = module.__invoke + arg_list = [kwds[arg] for arg in arg_names] + return module.__invoke(*arg_list) + + +# Cached suffix used by cython_inline above. None should get +# overridden with actual value upon the first cython_inline invocation +cython_inline.so_ext = None + +_find_non_space = re.compile('[^ ]').search + + +def strip_common_indent(code): + min_indent = None + lines = code.splitlines() + for line in lines: + match = _find_non_space(line) + if not match: + continue # blank + indent = match.start() + if line[indent] == '#': + continue # comment + if min_indent is None or min_indent > indent: + min_indent = indent + for ix, line in enumerate(lines): + match = _find_non_space(line) + if not match or not line or line[indent:indent+1] == '#': + continue + lines[ix] = line[min_indent:] + return '\n'.join(lines) + + +module_statement = re.compile(r'^((cdef +(extern|class))|cimport|(from .+ cimport)|(from .+ import +[*]))') +def extract_func_code(code): + module = [] + function = [] + current = function + code = code.replace('\t', ' ') + lines = code.split('\n') + for line in lines: + if not line.startswith(' '): + if module_statement.match(line): + current = module + else: + current = function + current.append(line) + return '\n'.join(module), ' ' + '\n '.join(function) + + +try: + from inspect import getcallargs +except ImportError: + def getcallargs(func, *arg_values, **kwd_values): + all = {} + args, varargs, kwds, defaults = inspect.getargspec(func) + if varargs is not None: + all[varargs] = arg_values[len(args):] + for name, value in zip(args, arg_values): + all[name] = value + for name, value in list(kwd_values.items()): + if name in args: + if name in all: + raise TypeError("Duplicate argument %s" % name) + all[name] = kwd_values.pop(name) + if kwds is not None: + all[kwds] = kwd_values + elif kwd_values: + raise TypeError("Unexpected keyword arguments: %s" % list(kwd_values)) + if defaults is None: + defaults = () + first_default = len(args) - len(defaults) + for ix, name in enumerate(args): + if name not in all: + if ix >= first_default: + all[name] = defaults[ix - first_default] + else: + raise TypeError("Missing argument: %s" % name) + return all + + +def get_body(source): + ix = source.index(':') + if source[:5] == 'lambda': + return "return %s" % source[ix+1:] + else: + return source[ix+1:] + + +# Lots to be done here... It would be especially cool if compiled functions +# could invoke each other quickly. +class RuntimeCompiledFunction(object): + + def __init__(self, f): + self._f = f + self._body = get_body(inspect.getsource(f)) + + def __call__(self, *args, **kwds): + all = getcallargs(self._f, *args, **kwds) + if IS_PY3: + return cython_inline(self._body, locals=self._f.__globals__, globals=self._f.__globals__, **all) + else: + return cython_inline(self._body, locals=self._f.func_globals, globals=self._f.func_globals, **all) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/IpythonMagic.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/IpythonMagic.py new file mode 100644 index 00000000000..7abb97ec70a --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/IpythonMagic.py @@ -0,0 +1,565 @@ +# -*- coding: utf-8 -*- +""" +===================== +Cython related magics +===================== + +Magic command interface for interactive work with Cython + +.. note:: + + The ``Cython`` package needs to be installed separately. It + can be obtained using ``easy_install`` or ``pip``. + +Usage +===== + +To enable the magics below, execute ``%load_ext cython``. + +``%%cython`` + +{CYTHON_DOC} + +``%%cython_inline`` + +{CYTHON_INLINE_DOC} + +``%%cython_pyximport`` + +{CYTHON_PYXIMPORT_DOC} + +Author: +* Brian Granger + +Code moved from IPython and adapted by: +* Martín Gaitán + +Parts of this code were taken from Cython.inline. +""" +#----------------------------------------------------------------------------- +# Copyright (C) 2010-2011, IPython Development Team. +# +# Distributed under the terms of the Modified BSD License. +# +# The full license is in the file ipython-COPYING.rst, distributed with this software. +#----------------------------------------------------------------------------- + +from __future__ import absolute_import, print_function + +import imp +import io +import os +import re +import sys +import time +import copy +import distutils.log +import textwrap + +IO_ENCODING = sys.getfilesystemencoding() +IS_PY2 = sys.version_info[0] < 3 + +try: + reload +except NameError: # Python 3 + from imp import reload + +try: + import hashlib +except ImportError: + import md5 as hashlib + +from distutils.core import Distribution, Extension +from distutils.command.build_ext import build_ext + +from IPython.core import display +from IPython.core import magic_arguments +from IPython.core.magic import Magics, magics_class, cell_magic +try: + from IPython.paths import get_ipython_cache_dir +except ImportError: + # older IPython version + from IPython.utils.path import get_ipython_cache_dir +from IPython.utils.text import dedent + +from ..Shadow import __version__ as cython_version +from ..Compiler.Errors import CompileError +from .Inline import cython_inline +from .Dependencies import cythonize + + +PGO_CONFIG = { + 'gcc': { + 'gen': ['-fprofile-generate', '-fprofile-dir={TEMPDIR}'], + 'use': ['-fprofile-use', '-fprofile-correction', '-fprofile-dir={TEMPDIR}'], + }, + # blind copy from 'configure' script in CPython 3.7 + 'icc': { + 'gen': ['-prof-gen'], + 'use': ['-prof-use'], + } +} +PGO_CONFIG['mingw32'] = PGO_CONFIG['gcc'] + + +if IS_PY2: + def encode_fs(name): + return name if isinstance(name, bytes) else name.encode(IO_ENCODING) +else: + def encode_fs(name): + return name + + +@magics_class +class CythonMagics(Magics): + + def __init__(self, shell): + super(CythonMagics, self).__init__(shell) + self._reloads = {} + self._code_cache = {} + self._pyximport_installed = False + + def _import_all(self, module): + mdict = module.__dict__ + if '__all__' in mdict: + keys = mdict['__all__'] + else: + keys = [k for k in mdict if not k.startswith('_')] + + for k in keys: + try: + self.shell.push({k: mdict[k]}) + except KeyError: + msg = "'module' object has no attribute '%s'" % k + raise AttributeError(msg) + + @cell_magic + def cython_inline(self, line, cell): + """Compile and run a Cython code cell using Cython.inline. + + This magic simply passes the body of the cell to Cython.inline + and returns the result. If the variables `a` and `b` are defined + in the user's namespace, here is a simple example that returns + their sum:: + + %%cython_inline + return a+b + + For most purposes, we recommend the usage of the `%%cython` magic. + """ + locs = self.shell.user_global_ns + globs = self.shell.user_ns + return cython_inline(cell, locals=locs, globals=globs) + + @cell_magic + def cython_pyximport(self, line, cell): + """Compile and import a Cython code cell using pyximport. + + The contents of the cell are written to a `.pyx` file in the current + working directory, which is then imported using `pyximport`. This + magic requires a module name to be passed:: + + %%cython_pyximport modulename + def f(x): + return 2.0*x + + The compiled module is then imported and all of its symbols are + injected into the user's namespace. For most purposes, we recommend + the usage of the `%%cython` magic. + """ + module_name = line.strip() + if not module_name: + raise ValueError('module name must be given') + fname = module_name + '.pyx' + with io.open(fname, 'w', encoding='utf-8') as f: + f.write(cell) + if 'pyximport' not in sys.modules or not self._pyximport_installed: + import pyximport + pyximport.install() + self._pyximport_installed = True + if module_name in self._reloads: + module = self._reloads[module_name] + # Note: reloading extension modules is not actually supported + # (requires PEP-489 reinitialisation support). + # Don't know why this should ever have worked as it reads here. + # All we really need to do is to update the globals below. + #reload(module) + else: + __import__(module_name) + module = sys.modules[module_name] + self._reloads[module_name] = module + self._import_all(module) + + @magic_arguments.magic_arguments() + @magic_arguments.argument( + '-a', '--annotate', action='store_true', default=False, + help="Produce a colorized HTML version of the source." + ) + @magic_arguments.argument( + '-+', '--cplus', action='store_true', default=False, + help="Output a C++ rather than C file." + ) + @magic_arguments.argument( + '-3', dest='language_level', action='store_const', const=3, default=None, + help="Select Python 3 syntax." + ) + @magic_arguments.argument( + '-2', dest='language_level', action='store_const', const=2, default=None, + help="Select Python 2 syntax." + ) + @magic_arguments.argument( + '-f', '--force', action='store_true', default=False, + help="Force the compilation of a new module, even if the source has been " + "previously compiled." + ) + @magic_arguments.argument( + '-c', '--compile-args', action='append', default=[], + help="Extra flags to pass to compiler via the `extra_compile_args` " + "Extension flag (can be specified multiple times)." + ) + @magic_arguments.argument( + '--link-args', action='append', default=[], + help="Extra flags to pass to linker via the `extra_link_args` " + "Extension flag (can be specified multiple times)." + ) + @magic_arguments.argument( + '-l', '--lib', action='append', default=[], + help="Add a library to link the extension against (can be specified " + "multiple times)." + ) + @magic_arguments.argument( + '-n', '--name', + help="Specify a name for the Cython module." + ) + @magic_arguments.argument( + '-L', dest='library_dirs', metavar='dir', action='append', default=[], + help="Add a path to the list of library directories (can be specified " + "multiple times)." + ) + @magic_arguments.argument( + '-I', '--include', action='append', default=[], + help="Add a path to the list of include directories (can be specified " + "multiple times)." + ) + @magic_arguments.argument( + '-S', '--src', action='append', default=[], + help="Add a path to the list of src files (can be specified " + "multiple times)." + ) + @magic_arguments.argument( + '--pgo', dest='pgo', action='store_true', default=False, + help=("Enable profile guided optimisation in the C compiler. " + "Compiles the cell twice and executes it in between to generate a runtime profile.") + ) + @magic_arguments.argument( + '--verbose', dest='quiet', action='store_false', default=True, + help=("Print debug information like generated .c/.cpp file location " + "and exact gcc/g++ command invoked.") + ) + @cell_magic + def cython(self, line, cell): + """Compile and import everything from a Cython code cell. + + The contents of the cell are written to a `.pyx` file in the + directory `IPYTHONDIR/cython` using a filename with the hash of the + code. This file is then cythonized and compiled. The resulting module + is imported and all of its symbols are injected into the user's + namespace. The usage is similar to that of `%%cython_pyximport` but + you don't have to pass a module name:: + + %%cython + def f(x): + return 2.0*x + + To compile OpenMP codes, pass the required `--compile-args` + and `--link-args`. For example with gcc:: + + %%cython --compile-args=-fopenmp --link-args=-fopenmp + ... + + To enable profile guided optimisation, pass the ``--pgo`` option. + Note that the cell itself needs to take care of establishing a suitable + profile when executed. This can be done by implementing the functions to + optimise, and then calling them directly in the same cell on some realistic + training data like this:: + + %%cython --pgo + def critical_function(data): + for item in data: + ... + + # execute function several times to build profile + from somewhere import some_typical_data + for _ in range(100): + critical_function(some_typical_data) + + In Python 3.5 and later, you can distinguish between the profile and + non-profile runs as follows:: + + if "_pgo_" in __name__: + ... # execute critical code here + """ + args = magic_arguments.parse_argstring(self.cython, line) + code = cell if cell.endswith('\n') else cell + '\n' + lib_dir = os.path.join(get_ipython_cache_dir(), 'cython') + key = (code, line, sys.version_info, sys.executable, cython_version) + + if not os.path.exists(lib_dir): + os.makedirs(lib_dir) + + if args.pgo: + key += ('pgo',) + if args.force: + # Force a new module name by adding the current time to the + # key which is hashed to determine the module name. + key += (time.time(),) + + if args.name: + module_name = str(args.name) # no-op in Py3 + else: + module_name = "_cython_magic_" + hashlib.md5(str(key).encode('utf-8')).hexdigest() + html_file = os.path.join(lib_dir, module_name + '.html') + module_path = os.path.join(lib_dir, module_name + self.so_ext) + + have_module = os.path.isfile(module_path) + need_cythonize = args.pgo or not have_module + + if args.annotate: + if not os.path.isfile(html_file): + need_cythonize = True + + extension = None + if need_cythonize: + extensions = self._cythonize(module_name, code, lib_dir, args, quiet=args.quiet) + if extensions is None: + # Compilation failed and printed error message + return None + assert len(extensions) == 1 + extension = extensions[0] + self._code_cache[key] = module_name + + if args.pgo: + self._profile_pgo_wrapper(extension, lib_dir) + + try: + self._build_extension(extension, lib_dir, pgo_step_name='use' if args.pgo else None, + quiet=args.quiet) + except distutils.errors.CompileError: + # Build failed and printed error message + return None + + module = imp.load_dynamic(module_name, module_path) + self._import_all(module) + + if args.annotate: + try: + with io.open(html_file, encoding='utf-8') as f: + annotated_html = f.read() + except IOError as e: + # File could not be opened. Most likely the user has a version + # of Cython before 0.15.1 (when `cythonize` learned the + # `force` keyword argument) and has already compiled this + # exact source without annotation. + print('Cython completed successfully but the annotated ' + 'source could not be read.', file=sys.stderr) + print(e, file=sys.stderr) + else: + return display.HTML(self.clean_annotated_html(annotated_html)) + + def _profile_pgo_wrapper(self, extension, lib_dir): + """ + Generate a .c file for a separate extension module that calls the + module init function of the original module. This makes sure that the + PGO profiler sees the correct .o file of the final module, but it still + allows us to import the module under a different name for profiling, + before recompiling it into the PGO optimised module. Overwriting and + reimporting the same shared library is not portable. + """ + extension = copy.copy(extension) # shallow copy, do not modify sources in place! + module_name = extension.name + pgo_module_name = '_pgo_' + module_name + pgo_wrapper_c_file = os.path.join(lib_dir, pgo_module_name + '.c') + with io.open(pgo_wrapper_c_file, 'w', encoding='utf-8') as f: + f.write(textwrap.dedent(u""" + #include "Python.h" + #if PY_MAJOR_VERSION < 3 + extern PyMODINIT_FUNC init%(module_name)s(void); + PyMODINIT_FUNC init%(pgo_module_name)s(void); /*proto*/ + PyMODINIT_FUNC init%(pgo_module_name)s(void) { + PyObject *sys_modules; + init%(module_name)s(); if (PyErr_Occurred()) return; + sys_modules = PyImport_GetModuleDict(); /* borrowed, no exception, "never" fails */ + if (sys_modules) { + PyObject *module = PyDict_GetItemString(sys_modules, "%(module_name)s"); if (!module) return; + PyDict_SetItemString(sys_modules, "%(pgo_module_name)s", module); + Py_DECREF(module); + } + } + #else + extern PyMODINIT_FUNC PyInit_%(module_name)s(void); + PyMODINIT_FUNC PyInit_%(pgo_module_name)s(void); /*proto*/ + PyMODINIT_FUNC PyInit_%(pgo_module_name)s(void) { + return PyInit_%(module_name)s(); + } + #endif + """ % {'module_name': module_name, 'pgo_module_name': pgo_module_name})) + + extension.sources = extension.sources + [pgo_wrapper_c_file] # do not modify in place! + extension.name = pgo_module_name + + self._build_extension(extension, lib_dir, pgo_step_name='gen') + + # import and execute module code to generate profile + so_module_path = os.path.join(lib_dir, pgo_module_name + self.so_ext) + imp.load_dynamic(pgo_module_name, so_module_path) + + def _cythonize(self, module_name, code, lib_dir, args, quiet=True): + pyx_file = os.path.join(lib_dir, module_name + '.pyx') + pyx_file = encode_fs(pyx_file) + + c_include_dirs = args.include + c_src_files = list(map(str, args.src)) + if 'numpy' in code: + import numpy + c_include_dirs.append(numpy.get_include()) + with io.open(pyx_file, 'w', encoding='utf-8') as f: + f.write(code) + extension = Extension( + name=module_name, + sources=[pyx_file] + c_src_files, + include_dirs=c_include_dirs, + library_dirs=args.library_dirs, + extra_compile_args=args.compile_args, + extra_link_args=args.link_args, + libraries=args.lib, + language='c++' if args.cplus else 'c', + ) + try: + opts = dict( + quiet=quiet, + annotate=args.annotate, + force=True, + ) + if args.language_level is not None: + assert args.language_level in (2, 3) + opts['language_level'] = args.language_level + elif sys.version_info[0] >= 3: + opts['language_level'] = 3 + return cythonize([extension], **opts) + except CompileError: + return None + + def _build_extension(self, extension, lib_dir, temp_dir=None, pgo_step_name=None, quiet=True): + build_extension = self._get_build_extension( + extension, lib_dir=lib_dir, temp_dir=temp_dir, pgo_step_name=pgo_step_name) + old_threshold = None + try: + if not quiet: + old_threshold = distutils.log.set_threshold(distutils.log.DEBUG) + build_extension.run() + finally: + if not quiet and old_threshold is not None: + distutils.log.set_threshold(old_threshold) + + def _add_pgo_flags(self, build_extension, step_name, temp_dir): + compiler_type = build_extension.compiler.compiler_type + if compiler_type == 'unix': + compiler_cmd = build_extension.compiler.compiler_so + # TODO: we could try to call "[cmd] --version" for better insights + if not compiler_cmd: + pass + elif 'clang' in compiler_cmd or 'clang' in compiler_cmd[0]: + compiler_type = 'clang' + elif 'icc' in compiler_cmd or 'icc' in compiler_cmd[0]: + compiler_type = 'icc' + elif 'gcc' in compiler_cmd or 'gcc' in compiler_cmd[0]: + compiler_type = 'gcc' + elif 'g++' in compiler_cmd or 'g++' in compiler_cmd[0]: + compiler_type = 'gcc' + config = PGO_CONFIG.get(compiler_type) + orig_flags = [] + if config and step_name in config: + flags = [f.format(TEMPDIR=temp_dir) for f in config[step_name]] + for extension in build_extension.extensions: + orig_flags.append((extension.extra_compile_args, extension.extra_link_args)) + extension.extra_compile_args = extension.extra_compile_args + flags + extension.extra_link_args = extension.extra_link_args + flags + else: + print("No PGO %s configuration known for C compiler type '%s'" % (step_name, compiler_type), + file=sys.stderr) + return orig_flags + + @property + def so_ext(self): + """The extension suffix for compiled modules.""" + try: + return self._so_ext + except AttributeError: + self._so_ext = self._get_build_extension().get_ext_filename('') + return self._so_ext + + def _clear_distutils_mkpath_cache(self): + """clear distutils mkpath cache + + prevents distutils from skipping re-creation of dirs that have been removed + """ + try: + from distutils.dir_util import _path_created + except ImportError: + pass + else: + _path_created.clear() + + def _get_build_extension(self, extension=None, lib_dir=None, temp_dir=None, + pgo_step_name=None, _build_ext=build_ext): + self._clear_distutils_mkpath_cache() + dist = Distribution() + config_files = dist.find_config_files() + try: + config_files.remove('setup.cfg') + except ValueError: + pass + dist.parse_config_files(config_files) + + if not temp_dir: + temp_dir = lib_dir + add_pgo_flags = self._add_pgo_flags + + if pgo_step_name: + base_build_ext = _build_ext + class _build_ext(_build_ext): + def build_extensions(self): + add_pgo_flags(self, pgo_step_name, temp_dir) + base_build_ext.build_extensions(self) + + build_extension = _build_ext(dist) + build_extension.finalize_options() + if temp_dir: + temp_dir = encode_fs(temp_dir) + build_extension.build_temp = temp_dir + if lib_dir: + lib_dir = encode_fs(lib_dir) + build_extension.build_lib = lib_dir + if extension is not None: + build_extension.extensions = [extension] + return build_extension + + @staticmethod + def clean_annotated_html(html): + """Clean up the annotated HTML source. + + Strips the link to the generated C or C++ file, which we do not + present to the user. + """ + r = re.compile('

Raw output: (.*)') + html = '\n'.join(l for l in html.splitlines() if not r.match(l)) + return html + +__doc__ = __doc__.format( + # rST doesn't see the -+ flag as part of an option list, so we + # hide it from the module-level docstring. + CYTHON_DOC=dedent(CythonMagics.cython.__doc__\ + .replace('-+, --cplus', '--cplus ')), + CYTHON_INLINE_DOC=dedent(CythonMagics.cython_inline.__doc__), + CYTHON_PYXIMPORT_DOC=dedent(CythonMagics.cython_pyximport.__doc__), +) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestCyCache.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestCyCache.py new file mode 100644 index 00000000000..a3224b41750 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestCyCache.py @@ -0,0 +1,106 @@ +import difflib +import glob +import gzip +import os +import tempfile + +import Cython.Build.Dependencies +import Cython.Utils +from Cython.TestUtils import CythonTest + + +class TestCyCache(CythonTest): + + def setUp(self): + CythonTest.setUp(self) + self.temp_dir = tempfile.mkdtemp( + prefix='cycache-test', + dir='TEST_TMP' if os.path.isdir('TEST_TMP') else None) + self.src_dir = tempfile.mkdtemp(prefix='src', dir=self.temp_dir) + self.cache_dir = tempfile.mkdtemp(prefix='cache', dir=self.temp_dir) + + def cache_files(self, file_glob): + return glob.glob(os.path.join(self.cache_dir, file_glob)) + + def fresh_cythonize(self, *args, **kwargs): + Cython.Utils.clear_function_caches() + Cython.Build.Dependencies._dep_tree = None # discard method caches + Cython.Build.Dependencies.cythonize(*args, **kwargs) + + def test_cycache_switch(self): + content1 = 'value = 1\n' + content2 = 'value = 2\n' + a_pyx = os.path.join(self.src_dir, 'a.pyx') + a_c = a_pyx[:-4] + '.c' + + open(a_pyx, 'w').write(content1) + self.fresh_cythonize(a_pyx, cache=self.cache_dir) + self.fresh_cythonize(a_pyx, cache=self.cache_dir) + self.assertEqual(1, len(self.cache_files('a.c*'))) + a_contents1 = open(a_c).read() + os.unlink(a_c) + + open(a_pyx, 'w').write(content2) + self.fresh_cythonize(a_pyx, cache=self.cache_dir) + a_contents2 = open(a_c).read() + os.unlink(a_c) + + self.assertNotEqual(a_contents1, a_contents2, 'C file not changed!') + self.assertEqual(2, len(self.cache_files('a.c*'))) + + open(a_pyx, 'w').write(content1) + self.fresh_cythonize(a_pyx, cache=self.cache_dir) + self.assertEqual(2, len(self.cache_files('a.c*'))) + a_contents = open(a_c).read() + self.assertEqual( + a_contents, a_contents1, + msg='\n'.join(list(difflib.unified_diff( + a_contents.split('\n'), a_contents1.split('\n')))[:10])) + + def test_cycache_uses_cache(self): + a_pyx = os.path.join(self.src_dir, 'a.pyx') + a_c = a_pyx[:-4] + '.c' + open(a_pyx, 'w').write('pass') + self.fresh_cythonize(a_pyx, cache=self.cache_dir) + a_cache = os.path.join(self.cache_dir, os.listdir(self.cache_dir)[0]) + gzip.GzipFile(a_cache, 'wb').write('fake stuff'.encode('ascii')) + os.unlink(a_c) + self.fresh_cythonize(a_pyx, cache=self.cache_dir) + a_contents = open(a_c).read() + self.assertEqual(a_contents, 'fake stuff', + 'Unexpected contents: %s...' % a_contents[:100]) + + def test_multi_file_output(self): + a_pyx = os.path.join(self.src_dir, 'a.pyx') + a_c = a_pyx[:-4] + '.c' + a_h = a_pyx[:-4] + '.h' + a_api_h = a_pyx[:-4] + '_api.h' + open(a_pyx, 'w').write('cdef public api int foo(int x): return x\n') + self.fresh_cythonize(a_pyx, cache=self.cache_dir) + expected = [a_c, a_h, a_api_h] + for output in expected: + self.assertTrue(os.path.exists(output), output) + os.unlink(output) + self.fresh_cythonize(a_pyx, cache=self.cache_dir) + for output in expected: + self.assertTrue(os.path.exists(output), output) + + def test_options_invalidation(self): + hash_pyx = os.path.join(self.src_dir, 'options.pyx') + hash_c = hash_pyx[:-len('.pyx')] + '.c' + + open(hash_pyx, 'w').write('pass') + self.fresh_cythonize(hash_pyx, cache=self.cache_dir, cplus=False) + self.assertEqual(1, len(self.cache_files('options.c*'))) + + os.unlink(hash_c) + self.fresh_cythonize(hash_pyx, cache=self.cache_dir, cplus=True) + self.assertEqual(2, len(self.cache_files('options.c*'))) + + os.unlink(hash_c) + self.fresh_cythonize(hash_pyx, cache=self.cache_dir, cplus=False, show_version=False) + self.assertEqual(2, len(self.cache_files('options.c*'))) + + os.unlink(hash_c) + self.fresh_cythonize(hash_pyx, cache=self.cache_dir, cplus=False, show_version=True) + self.assertEqual(2, len(self.cache_files('options.c*'))) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestInline.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestInline.py new file mode 100644 index 00000000000..d209488083e --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestInline.py @@ -0,0 +1,96 @@ +import os, tempfile +from Cython.Shadow import inline +from Cython.Build.Inline import safe_type +from Cython.TestUtils import CythonTest + +try: + import numpy + has_numpy = True +except: + has_numpy = False + +test_kwds = dict(force=True, quiet=True) + +global_value = 100 + +class TestInline(CythonTest): + def setUp(self): + CythonTest.setUp(self) + self.test_kwds = dict(test_kwds) + if os.path.isdir('TEST_TMP'): + lib_dir = os.path.join('TEST_TMP','inline') + else: + lib_dir = tempfile.mkdtemp(prefix='cython_inline_') + self.test_kwds['lib_dir'] = lib_dir + + def test_simple(self): + self.assertEqual(inline("return 1+2", **self.test_kwds), 3) + + def test_types(self): + self.assertEqual(inline(""" + cimport cython + return cython.typeof(a), cython.typeof(b) + """, a=1.0, b=[], **self.test_kwds), ('double', 'list object')) + + def test_locals(self): + a = 1 + b = 2 + self.assertEqual(inline("return a+b", **self.test_kwds), 3) + + def test_globals(self): + self.assertEqual(inline("return global_value + 1", **self.test_kwds), global_value + 1) + + def test_no_return(self): + self.assertEqual(inline(""" + a = 1 + cdef double b = 2 + cdef c = [] + """, **self.test_kwds), dict(a=1, b=2.0, c=[])) + + def test_def_node(self): + foo = inline("def foo(x): return x * x", **self.test_kwds)['foo'] + self.assertEqual(foo(7), 49) + + def test_class_ref(self): + class Type(object): + pass + tp = inline("Type")['Type'] + self.assertEqual(tp, Type) + + def test_pure(self): + import cython as cy + b = inline(""" + b = cy.declare(float, a) + c = cy.declare(cy.pointer(cy.float), &b) + return b + """, a=3, **self.test_kwds) + self.assertEqual(type(b), float) + + def test_compiler_directives(self): + self.assertEqual( + inline('return sum(x)', + x=[1, 2, 3], + cython_compiler_directives={'boundscheck': False}), + 6 + ) + + def test_lang_version(self): + # GH-3419. Caching for inline code didn't always respect compiler directives. + inline_divcode = "def f(int a, int b): return a/b" + self.assertEqual( + inline(inline_divcode, language_level=2)['f'](5,2), + 2 + ) + self.assertEqual( + inline(inline_divcode, language_level=3)['f'](5,2), + 2.5 + ) + + if has_numpy: + + def test_numpy(self): + import numpy + a = numpy.ndarray((10, 20)) + a[0,0] = 10 + self.assertEqual(safe_type(a), 'numpy.ndarray[numpy.float64_t, ndim=2]') + self.assertEqual(inline("return a[0,0]", a=a, **self.test_kwds), 10.0) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestIpythonMagic.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestIpythonMagic.py new file mode 100644 index 00000000000..24213091b26 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestIpythonMagic.py @@ -0,0 +1,205 @@ +# -*- coding: utf-8 -*- +# tag: ipython + +"""Tests for the Cython magics extension.""" + +from __future__ import absolute_import + +import os +import sys +from contextlib import contextmanager +from Cython.Build import IpythonMagic +from Cython.TestUtils import CythonTest + +try: + import IPython.testing.globalipapp +except ImportError: + # Disable tests and fake helpers for initialisation below. + def skip_if_not_installed(_): + return None +else: + def skip_if_not_installed(c): + return c + +try: + # disable IPython history thread before it gets started to avoid having to clean it up + from IPython.core.history import HistoryManager + HistoryManager.enabled = False +except ImportError: + pass + +code = u"""\ +def f(x): + return 2*x +""" + +cython3_code = u"""\ +def f(int x): + return 2 / x + +def call(x): + return f(*(x,)) +""" + +pgo_cython3_code = cython3_code + u"""\ +def main(): + for _ in range(100): call(5) +main() +""" + + +if sys.platform == 'win32': + # not using IPython's decorators here because they depend on "nose" + try: + from unittest import skip as skip_win32 + except ImportError: + # poor dev's silent @unittest.skip() + def skip_win32(dummy): + def _skip_win32(func): + return None + return _skip_win32 +else: + def skip_win32(dummy): + def _skip_win32(func): + def wrapper(*args, **kwargs): + func(*args, **kwargs) + return wrapper + return _skip_win32 + + +@skip_if_not_installed +class TestIPythonMagic(CythonTest): + + @classmethod + def setUpClass(cls): + CythonTest.setUpClass() + cls._ip = IPython.testing.globalipapp.get_ipython() + + def setUp(self): + CythonTest.setUp(self) + self._ip.extension_manager.load_extension('cython') + + def test_cython_inline(self): + ip = self._ip + ip.ex('a=10; b=20') + result = ip.run_cell_magic('cython_inline', '', 'return a+b') + self.assertEqual(result, 30) + + @skip_win32('Skip on Windows') + def test_cython_pyximport(self): + ip = self._ip + module_name = '_test_cython_pyximport' + ip.run_cell_magic('cython_pyximport', module_name, code) + ip.ex('g = f(10)') + self.assertEqual(ip.user_ns['g'], 20.0) + ip.run_cell_magic('cython_pyximport', module_name, code) + ip.ex('h = f(-10)') + self.assertEqual(ip.user_ns['h'], -20.0) + try: + os.remove(module_name + '.pyx') + except OSError: + pass + + def test_cython(self): + ip = self._ip + ip.run_cell_magic('cython', '', code) + ip.ex('g = f(10)') + self.assertEqual(ip.user_ns['g'], 20.0) + + def test_cython_name(self): + # The Cython module named 'mymodule' defines the function f. + ip = self._ip + ip.run_cell_magic('cython', '--name=mymodule', code) + # This module can now be imported in the interactive namespace. + ip.ex('import mymodule; g = mymodule.f(10)') + self.assertEqual(ip.user_ns['g'], 20.0) + + def test_cython_language_level(self): + # The Cython cell defines the functions f() and call(). + ip = self._ip + ip.run_cell_magic('cython', '', cython3_code) + ip.ex('g = f(10); h = call(10)') + if sys.version_info[0] < 3: + self.assertEqual(ip.user_ns['g'], 2 // 10) + self.assertEqual(ip.user_ns['h'], 2 // 10) + else: + self.assertEqual(ip.user_ns['g'], 2.0 / 10.0) + self.assertEqual(ip.user_ns['h'], 2.0 / 10.0) + + def test_cython3(self): + # The Cython cell defines the functions f() and call(). + ip = self._ip + ip.run_cell_magic('cython', '-3', cython3_code) + ip.ex('g = f(10); h = call(10)') + self.assertEqual(ip.user_ns['g'], 2.0 / 10.0) + self.assertEqual(ip.user_ns['h'], 2.0 / 10.0) + + def test_cython2(self): + # The Cython cell defines the functions f() and call(). + ip = self._ip + ip.run_cell_magic('cython', '-2', cython3_code) + ip.ex('g = f(10); h = call(10)') + self.assertEqual(ip.user_ns['g'], 2 // 10) + self.assertEqual(ip.user_ns['h'], 2 // 10) + + @skip_win32('Skip on Windows') + def test_cython3_pgo(self): + # The Cython cell defines the functions f() and call(). + ip = self._ip + ip.run_cell_magic('cython', '-3 --pgo', pgo_cython3_code) + ip.ex('g = f(10); h = call(10); main()') + self.assertEqual(ip.user_ns['g'], 2.0 / 10.0) + self.assertEqual(ip.user_ns['h'], 2.0 / 10.0) + + @skip_win32('Skip on Windows') + def test_extlibs(self): + ip = self._ip + code = u""" +from libc.math cimport sin +x = sin(0.0) + """ + ip.user_ns['x'] = 1 + ip.run_cell_magic('cython', '-l m', code) + self.assertEqual(ip.user_ns['x'], 0) + + + def test_cython_verbose(self): + ip = self._ip + ip.run_cell_magic('cython', '--verbose', code) + ip.ex('g = f(10)') + self.assertEqual(ip.user_ns['g'], 20.0) + + def test_cython_verbose_thresholds(self): + @contextmanager + def mock_distutils(): + class MockLog: + DEBUG = 1 + INFO = 2 + thresholds = [INFO] + + def set_threshold(self, val): + self.thresholds.append(val) + return self.thresholds[-2] + + + new_log = MockLog() + old_log = IpythonMagic.distutils.log + try: + IpythonMagic.distutils.log = new_log + yield new_log + finally: + IpythonMagic.distutils.log = old_log + + ip = self._ip + with mock_distutils() as verbose_log: + ip.run_cell_magic('cython', '--verbose', code) + ip.ex('g = f(10)') + self.assertEqual(ip.user_ns['g'], 20.0) + self.assertEqual([verbose_log.INFO, verbose_log.DEBUG, verbose_log.INFO], + verbose_log.thresholds) + + with mock_distutils() as normal_log: + ip.run_cell_magic('cython', '', code) + ip.ex('g = f(10)') + self.assertEqual(ip.user_ns['g'], 20.0) + self.assertEqual([normal_log.INFO], normal_log.thresholds) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestStripLiterals.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestStripLiterals.py new file mode 100644 index 00000000000..a7572a50838 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestStripLiterals.py @@ -0,0 +1,57 @@ +from Cython.Build.Dependencies import strip_string_literals + +from Cython.TestUtils import CythonTest + +class TestStripLiterals(CythonTest): + + def t(self, before, expected): + actual, literals = strip_string_literals(before, prefix="_L") + self.assertEqual(expected, actual) + for key, value in literals.items(): + actual = actual.replace(key, value) + self.assertEqual(before, actual) + + def test_empty(self): + self.t("", "") + + def test_single_quote(self): + self.t("'x'", "'_L1_'") + + def test_double_quote(self): + self.t('"x"', '"_L1_"') + + def test_nested_quotes(self): + self.t(""" '"' "'" """, """ '_L1_' "_L2_" """) + + def test_triple_quote(self): + self.t(" '''a\n''' ", " '''_L1_''' ") + + def test_backslash(self): + self.t(r"'a\'b'", "'_L1_'") + self.t(r"'a\\'", "'_L1_'") + self.t(r"'a\\\'b'", "'_L1_'") + + def test_unicode(self): + self.t("u'abc'", "u'_L1_'") + + def test_raw(self): + self.t(r"r'abc\\'", "r'_L1_'") + + def test_raw_unicode(self): + self.t(r"ru'abc\\'", "ru'_L1_'") + + def test_comment(self): + self.t("abc # foo", "abc #_L1_") + + def test_comment_and_quote(self): + self.t("abc # 'x'", "abc #_L1_") + self.t("'abc#'", "'_L1_'") + + def test_include(self): + self.t("include 'a.pxi' # something here", + "include '_L1_' #_L2_") + + def test_extern(self): + self.t("cdef extern from 'a.h': # comment", + "cdef extern from '_L1_': #_L2_") + diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/__init__.py new file mode 100644 index 00000000000..fa81adaff68 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/__init__.py @@ -0,0 +1 @@ +# empty file diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/__init__.py new file mode 100644 index 00000000000..d6f3986597b --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/__init__.py @@ -0,0 +1,2 @@ +from .Dependencies import cythonize +from .Distutils import build_ext diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/CodeWriter.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/CodeWriter.py new file mode 100644 index 00000000000..2e4646a6544 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/CodeWriter.py @@ -0,0 +1,816 @@ +""" +Serializes a Cython code tree to Cython code. This is primarily useful for +debugging and testing purposes. + +The output is in a strict format, no whitespace or comments from the input +is preserved (and it could not be as it is not present in the code tree). +""" + +from __future__ import absolute_import, print_function + +from .Compiler.Visitor import TreeVisitor +from .Compiler.ExprNodes import * + + +class LinesResult(object): + def __init__(self): + self.lines = [] + self.s = u"" + + def put(self, s): + self.s += s + + def newline(self): + self.lines.append(self.s) + self.s = u"" + + def putline(self, s): + self.put(s) + self.newline() + +class DeclarationWriter(TreeVisitor): + + indent_string = u" " + + def __init__(self, result=None): + super(DeclarationWriter, self).__init__() + if result is None: + result = LinesResult() + self.result = result + self.numindents = 0 + self.tempnames = {} + self.tempblockindex = 0 + + def write(self, tree): + self.visit(tree) + return self.result + + def indent(self): + self.numindents += 1 + + def dedent(self): + self.numindents -= 1 + + def startline(self, s=u""): + self.result.put(self.indent_string * self.numindents + s) + + def put(self, s): + self.result.put(s) + + def putline(self, s): + self.result.putline(self.indent_string * self.numindents + s) + + def endline(self, s=u""): + self.result.putline(s) + + def line(self, s): + self.startline(s) + self.endline() + + def comma_separated_list(self, items, output_rhs=False): + if len(items) > 0: + for item in items[:-1]: + self.visit(item) + if output_rhs and item.default is not None: + self.put(u" = ") + self.visit(item.default) + self.put(u", ") + self.visit(items[-1]) + + def visit_Node(self, node): + raise AssertionError("Node not handled by serializer: %r" % node) + + def visit_ModuleNode(self, node): + self.visitchildren(node) + + def visit_StatListNode(self, node): + self.visitchildren(node) + + def visit_CDefExternNode(self, node): + if node.include_file is None: + file = u'*' + else: + file = u'"%s"' % node.include_file + self.putline(u"cdef extern from %s:" % file) + self.indent() + self.visit(node.body) + self.dedent() + + def visit_CPtrDeclaratorNode(self, node): + self.put('*') + self.visit(node.base) + + def visit_CReferenceDeclaratorNode(self, node): + self.put('&') + self.visit(node.base) + + def visit_CArrayDeclaratorNode(self, node): + self.visit(node.base) + self.put(u'[') + if node.dimension is not None: + self.visit(node.dimension) + self.put(u']') + + def visit_CArrayDeclaratorNode(self, node): + self.visit(node.base) + self.put(u'[') + if node.dimension is not None: + self.visit(node.dimension) + self.put(u']') + + def visit_CFuncDeclaratorNode(self, node): + # TODO: except, gil, etc. + self.visit(node.base) + self.put(u'(') + self.comma_separated_list(node.args) + self.endline(u')') + + def visit_CNameDeclaratorNode(self, node): + self.put(node.name) + + def visit_CSimpleBaseTypeNode(self, node): + # See Parsing.p_sign_and_longness + if node.is_basic_c_type: + self.put(("unsigned ", "", "signed ")[node.signed]) + if node.longness < 0: + self.put("short " * -node.longness) + elif node.longness > 0: + self.put("long " * node.longness) + self.put(node.name) + + def visit_CComplexBaseTypeNode(self, node): + self.put(u'(') + self.visit(node.base_type) + self.visit(node.declarator) + self.put(u')') + + def visit_CNestedBaseTypeNode(self, node): + self.visit(node.base_type) + self.put(u'.') + self.put(node.name) + + def visit_TemplatedTypeNode(self, node): + self.visit(node.base_type_node) + self.put(u'[') + self.comma_separated_list(node.positional_args + node.keyword_args.key_value_pairs) + self.put(u']') + + def visit_CVarDefNode(self, node): + self.startline(u"cdef ") + self.visit(node.base_type) + self.put(u" ") + self.comma_separated_list(node.declarators, output_rhs=True) + self.endline() + + def visit_container_node(self, node, decl, extras, attributes): + # TODO: visibility + self.startline(decl) + if node.name: + self.put(u' ') + self.put(node.name) + if node.cname is not None: + self.put(u' "%s"' % node.cname) + if extras: + self.put(extras) + self.endline(':') + self.indent() + if not attributes: + self.putline('pass') + else: + for attribute in attributes: + self.visit(attribute) + self.dedent() + + def visit_CStructOrUnionDefNode(self, node): + if node.typedef_flag: + decl = u'ctypedef ' + else: + decl = u'cdef ' + if node.visibility == 'public': + decl += u'public ' + if node.packed: + decl += u'packed ' + decl += node.kind + self.visit_container_node(node, decl, None, node.attributes) + + def visit_CppClassNode(self, node): + extras = "" + if node.templates: + extras = u"[%s]" % ", ".join(node.templates) + if node.base_classes: + extras += "(%s)" % ", ".join(node.base_classes) + self.visit_container_node(node, u"cdef cppclass", extras, node.attributes) + + def visit_CEnumDefNode(self, node): + self.visit_container_node(node, u"cdef enum", None, node.items) + + def visit_CEnumDefItemNode(self, node): + self.startline(node.name) + if node.cname: + self.put(u' "%s"' % node.cname) + if node.value: + self.put(u" = ") + self.visit(node.value) + self.endline() + + def visit_CClassDefNode(self, node): + assert not node.module_name + if node.decorators: + for decorator in node.decorators: + self.visit(decorator) + self.startline(u"cdef class ") + self.put(node.class_name) + if node.base_class_name: + self.put(u"(") + if node.base_class_module: + self.put(node.base_class_module) + self.put(u".") + self.put(node.base_class_name) + self.put(u")") + self.endline(u":") + self.indent() + self.visit(node.body) + self.dedent() + + def visit_CTypeDefNode(self, node): + self.startline(u"ctypedef ") + self.visit(node.base_type) + self.put(u" ") + self.visit(node.declarator) + self.endline() + + def visit_FuncDefNode(self, node): + self.startline(u"def %s(" % node.name) + self.comma_separated_list(node.args) + self.endline(u"):") + self.indent() + self.visit(node.body) + self.dedent() + + def visit_CArgDeclNode(self, node): + if node.base_type.name is not None: + self.visit(node.base_type) + self.put(u" ") + self.visit(node.declarator) + if node.default is not None: + self.put(u" = ") + self.visit(node.default) + + def visit_CImportStatNode(self, node): + self.startline(u"cimport ") + self.put(node.module_name) + if node.as_name: + self.put(u" as ") + self.put(node.as_name) + self.endline() + + def visit_FromCImportStatNode(self, node): + self.startline(u"from ") + self.put(node.module_name) + self.put(u" cimport ") + first = True + for pos, name, as_name, kind in node.imported_names: + assert kind is None + if first: + first = False + else: + self.put(u", ") + self.put(name) + if as_name: + self.put(u" as ") + self.put(as_name) + self.endline() + + def visit_NameNode(self, node): + self.put(node.name) + + def visit_IntNode(self, node): + self.put(node.value) + + def visit_NoneNode(self, node): + self.put(u"None") + + def visit_NotNode(self, node): + self.put(u"(not ") + self.visit(node.operand) + self.put(u")") + + def visit_DecoratorNode(self, node): + self.startline("@") + self.visit(node.decorator) + self.endline() + + def visit_BinopNode(self, node): + self.visit(node.operand1) + self.put(u" %s " % node.operator) + self.visit(node.operand2) + + def visit_AttributeNode(self, node): + self.visit(node.obj) + self.put(u".%s" % node.attribute) + + def visit_BoolNode(self, node): + self.put(str(node.value)) + + # FIXME: represent string nodes correctly + def visit_StringNode(self, node): + value = node.value + if value.encoding is not None: + value = value.encode(value.encoding) + self.put(repr(value)) + + def visit_PassStatNode(self, node): + self.startline(u"pass") + self.endline() + +class CodeWriter(DeclarationWriter): + + def visit_SingleAssignmentNode(self, node): + self.startline() + self.visit(node.lhs) + self.put(u" = ") + self.visit(node.rhs) + self.endline() + + def visit_CascadedAssignmentNode(self, node): + self.startline() + for lhs in node.lhs_list: + self.visit(lhs) + self.put(u" = ") + self.visit(node.rhs) + self.endline() + + def visit_PrintStatNode(self, node): + self.startline(u"print ") + self.comma_separated_list(node.arg_tuple.args) + if not node.append_newline: + self.put(u",") + self.endline() + + def visit_ForInStatNode(self, node): + self.startline(u"for ") + self.visit(node.target) + self.put(u" in ") + self.visit(node.iterator.sequence) + self.endline(u":") + self.indent() + self.visit(node.body) + self.dedent() + if node.else_clause is not None: + self.line(u"else:") + self.indent() + self.visit(node.else_clause) + self.dedent() + + def visit_IfStatNode(self, node): + # The IfClauseNode is handled directly without a separate match + # for clariy. + self.startline(u"if ") + self.visit(node.if_clauses[0].condition) + self.endline(":") + self.indent() + self.visit(node.if_clauses[0].body) + self.dedent() + for clause in node.if_clauses[1:]: + self.startline("elif ") + self.visit(clause.condition) + self.endline(":") + self.indent() + self.visit(clause.body) + self.dedent() + if node.else_clause is not None: + self.line("else:") + self.indent() + self.visit(node.else_clause) + self.dedent() + + def visit_SequenceNode(self, node): + self.comma_separated_list(node.args) # Might need to discover whether we need () around tuples...hmm... + + def visit_SimpleCallNode(self, node): + self.visit(node.function) + self.put(u"(") + self.comma_separated_list(node.args) + self.put(")") + + def visit_GeneralCallNode(self, node): + self.visit(node.function) + self.put(u"(") + posarg = node.positional_args + if isinstance(posarg, AsTupleNode): + self.visit(posarg.arg) + else: + self.comma_separated_list(posarg.args) # TupleNode.args + if node.keyword_args: + if isinstance(node.keyword_args, DictNode): + for i, (name, value) in enumerate(node.keyword_args.key_value_pairs): + if i > 0: + self.put(', ') + self.visit(name) + self.put('=') + self.visit(value) + else: + raise Exception("Not implemented yet") + self.put(u")") + + def visit_ExprStatNode(self, node): + self.startline() + self.visit(node.expr) + self.endline() + + def visit_InPlaceAssignmentNode(self, node): + self.startline() + self.visit(node.lhs) + self.put(u" %s= " % node.operator) + self.visit(node.rhs) + self.endline() + + def visit_WithStatNode(self, node): + self.startline() + self.put(u"with ") + self.visit(node.manager) + if node.target is not None: + self.put(u" as ") + self.visit(node.target) + self.endline(u":") + self.indent() + self.visit(node.body) + self.dedent() + + def visit_TryFinallyStatNode(self, node): + self.line(u"try:") + self.indent() + self.visit(node.body) + self.dedent() + self.line(u"finally:") + self.indent() + self.visit(node.finally_clause) + self.dedent() + + def visit_TryExceptStatNode(self, node): + self.line(u"try:") + self.indent() + self.visit(node.body) + self.dedent() + for x in node.except_clauses: + self.visit(x) + if node.else_clause is not None: + self.visit(node.else_clause) + + def visit_ExceptClauseNode(self, node): + self.startline(u"except") + if node.pattern is not None: + self.put(u" ") + self.visit(node.pattern) + if node.target is not None: + self.put(u", ") + self.visit(node.target) + self.endline(":") + self.indent() + self.visit(node.body) + self.dedent() + + def visit_ReturnStatNode(self, node): + self.startline("return ") + self.visit(node.value) + self.endline() + + def visit_ReraiseStatNode(self, node): + self.line("raise") + + def visit_ImportNode(self, node): + self.put(u"(import %s)" % node.module_name.value) + + def visit_TempsBlockNode(self, node): + """ + Temporaries are output like $1_1', where the first number is + an index of the TempsBlockNode and the second number is an index + of the temporary which that block allocates. + """ + idx = 0 + for handle in node.temps: + self.tempnames[handle] = "$%d_%d" % (self.tempblockindex, idx) + idx += 1 + self.tempblockindex += 1 + self.visit(node.body) + + def visit_TempRefNode(self, node): + self.put(self.tempnames[node.handle]) + + +class PxdWriter(DeclarationWriter): + def __call__(self, node): + print(u'\n'.join(self.write(node).lines)) + return node + + def visit_CFuncDefNode(self, node): + if 'inline' in node.modifiers: + return + if node.overridable: + self.startline(u'cpdef ') + else: + self.startline(u'cdef ') + if node.visibility != 'private': + self.put(node.visibility) + self.put(u' ') + if node.api: + self.put(u'api ') + self.visit(node.declarator) + + def visit_StatNode(self, node): + pass + + +class ExpressionWriter(TreeVisitor): + + def __init__(self, result=None): + super(ExpressionWriter, self).__init__() + if result is None: + result = u"" + self.result = result + self.precedence = [0] + + def write(self, tree): + self.visit(tree) + return self.result + + def put(self, s): + self.result += s + + def remove(self, s): + if self.result.endswith(s): + self.result = self.result[:-len(s)] + + def comma_separated_list(self, items): + if len(items) > 0: + for item in items[:-1]: + self.visit(item) + self.put(u", ") + self.visit(items[-1]) + + def visit_Node(self, node): + raise AssertionError("Node not handled by serializer: %r" % node) + + def visit_NameNode(self, node): + self.put(node.name) + + def visit_NoneNode(self, node): + self.put(u"None") + + def visit_EllipsisNode(self, node): + self.put(u"...") + + def visit_BoolNode(self, node): + self.put(str(node.value)) + + def visit_ConstNode(self, node): + self.put(str(node.value)) + + def visit_ImagNode(self, node): + self.put(node.value) + self.put(u"j") + + def emit_string(self, node, prefix=u""): + repr_val = repr(node.value) + if repr_val[0] in 'ub': + repr_val = repr_val[1:] + self.put(u"%s%s" % (prefix, repr_val)) + + def visit_BytesNode(self, node): + self.emit_string(node, u"b") + + def visit_StringNode(self, node): + self.emit_string(node) + + def visit_UnicodeNode(self, node): + self.emit_string(node, u"u") + + def emit_sequence(self, node, parens=(u"", u"")): + open_paren, close_paren = parens + items = node.subexpr_nodes() + self.put(open_paren) + self.comma_separated_list(items) + self.put(close_paren) + + def visit_ListNode(self, node): + self.emit_sequence(node, u"[]") + + def visit_TupleNode(self, node): + self.emit_sequence(node, u"()") + + def visit_SetNode(self, node): + if len(node.subexpr_nodes()) > 0: + self.emit_sequence(node, u"{}") + else: + self.put(u"set()") + + def visit_DictNode(self, node): + self.emit_sequence(node, u"{}") + + def visit_DictItemNode(self, node): + self.visit(node.key) + self.put(u": ") + self.visit(node.value) + + unop_precedence = { + 'not': 3, '!': 3, + '+': 11, '-': 11, '~': 11, + } + binop_precedence = { + 'or': 1, + 'and': 2, + # unary: 'not': 3, '!': 3, + 'in': 4, 'not_in': 4, 'is': 4, 'is_not': 4, '<': 4, '<=': 4, '>': 4, '>=': 4, '!=': 4, '==': 4, + '|': 5, + '^': 6, + '&': 7, + '<<': 8, '>>': 8, + '+': 9, '-': 9, + '*': 10, '@': 10, '/': 10, '//': 10, '%': 10, + # unary: '+': 11, '-': 11, '~': 11 + '**': 12, + } + + def operator_enter(self, new_prec): + old_prec = self.precedence[-1] + if old_prec > new_prec: + self.put(u"(") + self.precedence.append(new_prec) + + def operator_exit(self): + old_prec, new_prec = self.precedence[-2:] + if old_prec > new_prec: + self.put(u")") + self.precedence.pop() + + def visit_NotNode(self, node): + op = 'not' + prec = self.unop_precedence[op] + self.operator_enter(prec) + self.put(u"not ") + self.visit(node.operand) + self.operator_exit() + + def visit_UnopNode(self, node): + op = node.operator + prec = self.unop_precedence[op] + self.operator_enter(prec) + self.put(u"%s" % node.operator) + self.visit(node.operand) + self.operator_exit() + + def visit_BinopNode(self, node): + op = node.operator + prec = self.binop_precedence.get(op, 0) + self.operator_enter(prec) + self.visit(node.operand1) + self.put(u" %s " % op.replace('_', ' ')) + self.visit(node.operand2) + self.operator_exit() + + def visit_BoolBinopNode(self, node): + self.visit_BinopNode(node) + + def visit_PrimaryCmpNode(self, node): + self.visit_BinopNode(node) + + def visit_IndexNode(self, node): + self.visit(node.base) + self.put(u"[") + if isinstance(node.index, TupleNode): + self.emit_sequence(node.index) + else: + self.visit(node.index) + self.put(u"]") + + def visit_SliceIndexNode(self, node): + self.visit(node.base) + self.put(u"[") + if node.start: + self.visit(node.start) + self.put(u":") + if node.stop: + self.visit(node.stop) + if node.slice: + self.put(u":") + self.visit(node.slice) + self.put(u"]") + + def visit_SliceNode(self, node): + if not node.start.is_none: + self.visit(node.start) + self.put(u":") + if not node.stop.is_none: + self.visit(node.stop) + if not node.step.is_none: + self.put(u":") + self.visit(node.step) + + def visit_CondExprNode(self, node): + self.visit(node.true_val) + self.put(u" if ") + self.visit(node.test) + self.put(u" else ") + self.visit(node.false_val) + + def visit_AttributeNode(self, node): + self.visit(node.obj) + self.put(u".%s" % node.attribute) + + def visit_SimpleCallNode(self, node): + self.visit(node.function) + self.put(u"(") + self.comma_separated_list(node.args) + self.put(")") + + def emit_pos_args(self, node): + if node is None: + return + if isinstance(node, AddNode): + self.emit_pos_args(node.operand1) + self.emit_pos_args(node.operand2) + elif isinstance(node, TupleNode): + for expr in node.subexpr_nodes(): + self.visit(expr) + self.put(u", ") + elif isinstance(node, AsTupleNode): + self.put("*") + self.visit(node.arg) + self.put(u", ") + else: + self.visit(node) + self.put(u", ") + + def emit_kwd_args(self, node): + if node is None: + return + if isinstance(node, MergedDictNode): + for expr in node.subexpr_nodes(): + self.emit_kwd_args(expr) + elif isinstance(node, DictNode): + for expr in node.subexpr_nodes(): + self.put(u"%s=" % expr.key.value) + self.visit(expr.value) + self.put(u", ") + else: + self.put(u"**") + self.visit(node) + self.put(u", ") + + def visit_GeneralCallNode(self, node): + self.visit(node.function) + self.put(u"(") + self.emit_pos_args(node.positional_args) + self.emit_kwd_args(node.keyword_args) + self.remove(u", ") + self.put(")") + + def emit_comprehension(self, body, target, + sequence, condition, + parens=(u"", u"")): + open_paren, close_paren = parens + self.put(open_paren) + self.visit(body) + self.put(u" for ") + self.visit(target) + self.put(u" in ") + self.visit(sequence) + if condition: + self.put(u" if ") + self.visit(condition) + self.put(close_paren) + + def visit_ComprehensionAppendNode(self, node): + self.visit(node.expr) + + def visit_DictComprehensionAppendNode(self, node): + self.visit(node.key_expr) + self.put(u": ") + self.visit(node.value_expr) + + def visit_ComprehensionNode(self, node): + tpmap = {'list': u"[]", 'dict': u"{}", 'set': u"{}"} + parens = tpmap[node.type.py_type_name()] + body = node.loop.body + target = node.loop.target + sequence = node.loop.iterator.sequence + condition = None + if hasattr(body, 'if_clauses'): + # type(body) is Nodes.IfStatNode + condition = body.if_clauses[0].condition + body = body.if_clauses[0].body + self.emit_comprehension(body, target, sequence, condition, parens) + + def visit_GeneratorExpressionNode(self, node): + body = node.loop.body + target = node.loop.target + sequence = node.loop.iterator.sequence + condition = None + if hasattr(body, 'if_clauses'): + # type(body) is Nodes.IfStatNode + condition = body.if_clauses[0].condition + body = body.if_clauses[0].body.expr.arg + elif hasattr(body, 'expr'): + # type(body) is Nodes.ExprStatNode + body = body.expr.arg + self.emit_comprehension(body, target, sequence, condition, u"()") diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/AnalysedTreeTransforms.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/AnalysedTreeTransforms.py new file mode 100644 index 00000000000..07bf31f3e06 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/AnalysedTreeTransforms.py @@ -0,0 +1,99 @@ +from __future__ import absolute_import + +from .Visitor import ScopeTrackingTransform +from .Nodes import StatListNode, SingleAssignmentNode, CFuncDefNode, DefNode +from .ExprNodes import DictNode, DictItemNode, NameNode, UnicodeNode +from .PyrexTypes import py_object_type +from .StringEncoding import EncodedString +from . import Symtab + +class AutoTestDictTransform(ScopeTrackingTransform): + # Handles autotestdict directive + + blacklist = ['__cinit__', '__dealloc__', '__richcmp__', + '__nonzero__', '__bool__', + '__len__', '__contains__'] + + def visit_ModuleNode(self, node): + if node.is_pxd: + return node + self.scope_type = 'module' + self.scope_node = node + + if not self.current_directives['autotestdict']: + return node + self.all_docstrings = self.current_directives['autotestdict.all'] + self.cdef_docstrings = self.all_docstrings or self.current_directives['autotestdict.cdef'] + + assert isinstance(node.body, StatListNode) + + # First see if __test__ is already created + if u'__test__' in node.scope.entries: + # Do nothing + return node + + pos = node.pos + + self.tests = [] + self.testspos = node.pos + + test_dict_entry = node.scope.declare_var(EncodedString(u'__test__'), + py_object_type, + pos, + visibility='public') + create_test_dict_assignment = SingleAssignmentNode(pos, + lhs=NameNode(pos, name=EncodedString(u'__test__'), + entry=test_dict_entry), + rhs=DictNode(pos, key_value_pairs=self.tests)) + self.visitchildren(node) + node.body.stats.append(create_test_dict_assignment) + return node + + def add_test(self, testpos, path, doctest): + pos = self.testspos + keystr = u'%s (line %d)' % (path, testpos[1]) + key = UnicodeNode(pos, value=EncodedString(keystr)) + value = UnicodeNode(pos, value=doctest) + self.tests.append(DictItemNode(pos, key=key, value=value)) + + def visit_ExprNode(self, node): + # expressions cannot contain functions and lambda expressions + # do not have a docstring + return node + + def visit_FuncDefNode(self, node): + if not node.doc or (isinstance(node, DefNode) and node.fused_py_func): + return node + if not self.cdef_docstrings: + if isinstance(node, CFuncDefNode) and not node.py_func: + return node + if not self.all_docstrings and '>>>' not in node.doc: + return node + + pos = self.testspos + if self.scope_type == 'module': + path = node.entry.name + elif self.scope_type in ('pyclass', 'cclass'): + if isinstance(node, CFuncDefNode): + if node.py_func is not None: + name = node.py_func.name + else: + name = node.entry.name + else: + name = node.name + if self.scope_type == 'cclass' and name in self.blacklist: + return node + if self.scope_type == 'pyclass': + class_name = self.scope_node.name + else: + class_name = self.scope_node.class_name + if isinstance(node.entry.scope, Symtab.PropertyScope): + property_method_name = node.entry.scope.name + path = "%s.%s.%s" % (class_name, node.entry.scope.name, + node.entry.name) + else: + path = "%s.%s" % (class_name, node.entry.name) + else: + assert False + self.add_test(node.pos, path, node.doc) + return node diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Annotate.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Annotate.py new file mode 100644 index 00000000000..5feac02d87f --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Annotate.py @@ -0,0 +1,317 @@ +# Note: Work in progress + +from __future__ import absolute_import + +import os +import os.path +import re +import codecs +import textwrap +from datetime import datetime +from functools import partial +from collections import defaultdict +from xml.sax.saxutils import escape as html_escape +try: + from StringIO import StringIO +except ImportError: + from io import StringIO # does not support writing 'str' in Py2 + +from . import Version +from .Code import CCodeWriter +from .. import Utils + + +class AnnotationCCodeWriter(CCodeWriter): + + def __init__(self, create_from=None, buffer=None, copy_formatting=True): + CCodeWriter.__init__(self, create_from, buffer, copy_formatting=copy_formatting) + if create_from is None: + self.annotation_buffer = StringIO() + self.last_annotated_pos = None + # annotations[filename][line] -> [(column, AnnotationItem)*] + self.annotations = defaultdict(partial(defaultdict, list)) + # code[filename][line] -> str + self.code = defaultdict(partial(defaultdict, str)) + # scopes[filename][line] -> set(scopes) + self.scopes = defaultdict(partial(defaultdict, set)) + else: + # When creating an insertion point, keep references to the same database + self.annotation_buffer = create_from.annotation_buffer + self.annotations = create_from.annotations + self.code = create_from.code + self.scopes = create_from.scopes + self.last_annotated_pos = create_from.last_annotated_pos + + def create_new(self, create_from, buffer, copy_formatting): + return AnnotationCCodeWriter(create_from, buffer, copy_formatting) + + def write(self, s): + CCodeWriter.write(self, s) + self.annotation_buffer.write(s) + + def mark_pos(self, pos, trace=True): + if pos is not None: + CCodeWriter.mark_pos(self, pos, trace) + if self.funcstate and self.funcstate.scope: + # lambdas and genexprs can result in multiple scopes per line => keep them in a set + self.scopes[pos[0].filename][pos[1]].add(self.funcstate.scope) + if self.last_annotated_pos: + source_desc, line, _ = self.last_annotated_pos + pos_code = self.code[source_desc.filename] + pos_code[line] += self.annotation_buffer.getvalue() + self.annotation_buffer = StringIO() + self.last_annotated_pos = pos + + def annotate(self, pos, item): + self.annotations[pos[0].filename][pos[1]].append((pos[2], item)) + + def _css(self): + """css template will later allow to choose a colormap""" + css = [self._css_template] + for i in range(255): + color = u"FFFF%02x" % int(255/(1+i/10.0)) + css.append('.cython.score-%d {background-color: #%s;}' % (i, color)) + try: + from pygments.formatters import HtmlFormatter + except ImportError: + pass + else: + css.append(HtmlFormatter().get_style_defs('.cython')) + return '\n'.join(css) + + _css_template = textwrap.dedent(""" + body.cython { font-family: courier; font-size: 12; } + + .cython.tag { } + .cython.line { margin: 0em } + .cython.code { font-size: 9; color: #444444; display: none; margin: 0px 0px 0px 8px; border-left: 8px none; } + + .cython.line .run { background-color: #B0FFB0; } + .cython.line .mis { background-color: #FFB0B0; } + .cython.code.run { border-left: 8px solid #B0FFB0; } + .cython.code.mis { border-left: 8px solid #FFB0B0; } + + .cython.code .py_c_api { color: red; } + .cython.code .py_macro_api { color: #FF7000; } + .cython.code .pyx_c_api { color: #FF3000; } + .cython.code .pyx_macro_api { color: #FF7000; } + .cython.code .refnanny { color: #FFA000; } + .cython.code .trace { color: #FFA000; } + .cython.code .error_goto { color: #FFA000; } + + .cython.code .coerce { color: #008000; border: 1px dotted #008000 } + .cython.code .py_attr { color: #FF0000; font-weight: bold; } + .cython.code .c_attr { color: #0000FF; } + .cython.code .py_call { color: #FF0000; font-weight: bold; } + .cython.code .c_call { color: #0000FF; } + """) + + # on-click toggle function to show/hide C source code + _onclick_attr = ' onclick="{0}"'.format(( + "(function(s){" + " s.display = s.display === 'block' ? 'none' : 'block'" + "})(this.nextElementSibling.style)" + ).replace(' ', '') # poor dev's JS minification + ) + + def save_annotation(self, source_filename, target_filename, coverage_xml=None): + with Utils.open_source_file(source_filename) as f: + code = f.read() + generated_code = self.code.get(source_filename, {}) + c_file = Utils.decode_filename(os.path.basename(target_filename)) + html_filename = os.path.splitext(target_filename)[0] + ".html" + + with codecs.open(html_filename, "w", encoding="UTF-8") as out_buffer: + out_buffer.write(self._save_annotation(code, generated_code, c_file, source_filename, coverage_xml)) + + def _save_annotation_header(self, c_file, source_filename, coverage_timestamp=None): + coverage_info = '' + if coverage_timestamp: + coverage_info = u' with coverage data from {timestamp}'.format( + timestamp=datetime.fromtimestamp(int(coverage_timestamp) // 1000)) + + outlist = [ + textwrap.dedent(u'''\ + + + + + + Cython: {filename} + + + +

Generated by Cython {watermark}{more_info}

+

+ Yellow lines hint at Python interaction.
+ Click on a line that starts with a "+" to see the C code that Cython generated for it. +

+ ''').format(css=self._css(), watermark=Version.watermark, + filename=os.path.basename(source_filename) if source_filename else '', + more_info=coverage_info) + ] + if c_file: + outlist.append(u'

Raw output: %s

\n' % (c_file, c_file)) + return outlist + + def _save_annotation_footer(self): + return (u'\n',) + + def _save_annotation(self, code, generated_code, c_file=None, source_filename=None, coverage_xml=None): + """ + lines : original cython source code split by lines + generated_code : generated c code keyed by line number in original file + target filename : name of the file in which to store the generated html + c_file : filename in which the c_code has been written + """ + if coverage_xml is not None and source_filename: + coverage_timestamp = coverage_xml.get('timestamp', '').strip() + covered_lines = self._get_line_coverage(coverage_xml, source_filename) + else: + coverage_timestamp = covered_lines = None + annotation_items = dict(self.annotations[source_filename]) + scopes = dict(self.scopes[source_filename]) + + outlist = [] + outlist.extend(self._save_annotation_header(c_file, source_filename, coverage_timestamp)) + outlist.extend(self._save_annotation_body(code, generated_code, annotation_items, scopes, covered_lines)) + outlist.extend(self._save_annotation_footer()) + return ''.join(outlist) + + def _get_line_coverage(self, coverage_xml, source_filename): + coverage_data = None + for entry in coverage_xml.iterfind('.//class'): + if not entry.get('filename'): + continue + if (entry.get('filename') == source_filename or + os.path.abspath(entry.get('filename')) == source_filename): + coverage_data = entry + break + elif source_filename.endswith(entry.get('filename')): + coverage_data = entry # but we might still find a better match... + if coverage_data is None: + return None + return dict( + (int(line.get('number')), int(line.get('hits'))) + for line in coverage_data.iterfind('lines/line') + ) + + def _htmlify_code(self, code): + try: + from pygments import highlight + from pygments.lexers import CythonLexer + from pygments.formatters import HtmlFormatter + except ImportError: + # no Pygments, just escape the code + return html_escape(code) + + html_code = highlight( + code, CythonLexer(stripnl=False, stripall=False), + HtmlFormatter(nowrap=True)) + return html_code + + def _save_annotation_body(self, cython_code, generated_code, annotation_items, scopes, covered_lines=None): + outlist = [u'
'] + pos_comment_marker = u'/* \N{HORIZONTAL ELLIPSIS} */\n' + new_calls_map = dict( + (name, 0) for name in + 'refnanny trace py_macro_api py_c_api pyx_macro_api pyx_c_api error_goto'.split() + ).copy + + self.mark_pos(None) + + def annotate(match): + group_name = match.lastgroup + calls[group_name] += 1 + return u"%s" % ( + group_name, match.group(group_name)) + + lines = self._htmlify_code(cython_code).splitlines() + lineno_width = len(str(len(lines))) + if not covered_lines: + covered_lines = None + + for k, line in enumerate(lines, 1): + try: + c_code = generated_code[k] + except KeyError: + c_code = '' + else: + c_code = _replace_pos_comment(pos_comment_marker, c_code) + if c_code.startswith(pos_comment_marker): + c_code = c_code[len(pos_comment_marker):] + c_code = html_escape(c_code) + + calls = new_calls_map() + c_code = _parse_code(annotate, c_code) + score = (5 * calls['py_c_api'] + 2 * calls['pyx_c_api'] + + calls['py_macro_api'] + calls['pyx_macro_api']) + + if c_code: + onclick = self._onclick_attr + expandsymbol = '+' + else: + onclick = '' + expandsymbol = ' ' + + covered = '' + if covered_lines is not None and k in covered_lines: + hits = covered_lines[k] + if hits is not None: + covered = 'run' if hits else 'mis' + + outlist.append( + u'
'
+                # generate line number with expand symbol in front,
+                # and the right  number of digit
+                u'{expandsymbol}{line:0{lineno_width}d}: {code}
\n'.format( + score=score, + expandsymbol=expandsymbol, + covered=covered, + lineno_width=lineno_width, + line=k, + code=line.rstrip(), + onclick=onclick, + )) + if c_code: + outlist.append(u"
{code}
".format( + score=score, covered=covered, code=c_code)) + outlist.append(u"
") + return outlist + + +_parse_code = re.compile(( + br'(?P__Pyx_X?(?:GOT|GIVE)REF|__Pyx_RefNanny[A-Za-z]+)|' + br'(?P__Pyx_Trace[A-Za-z]+)|' + br'(?:' + br'(?P__Pyx_[A-Z][A-Z_]+)|' + br'(?P(?:__Pyx_[A-Z][a-z_][A-Za-z_]*)|__pyx_convert_[A-Za-z_]*)|' + br'(?PPy[A-Z][a-z]+_[A-Z][A-Z_]+)|' + br'(?PPy[A-Z][a-z]+_[A-Z][a-z][A-Za-z_]*)' + br')(?=\()|' # look-ahead to exclude subsequent '(' from replacement + br'(?P(?:(?<=;) *if [^;]* +)?__PYX_ERR\([^)]+\))' +).decode('ascii')).sub + + +_replace_pos_comment = re.compile( + # this matches what Cython generates as code line marker comment + br'^\s*/\*(?:(?:[^*]|\*[^/])*\n)+\s*\*/\s*\n'.decode('ascii'), + re.M +).sub + + +class AnnotationItem(object): + + def __init__(self, style, text, tag="", size=0): + self.style = style + self.text = text + self.tag = tag + self.size = size + + def start(self): + return u"%s" % (self.style, self.text, self.tag) + + def end(self): + return self.size, u"" diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/AutoDocTransforms.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/AutoDocTransforms.py new file mode 100644 index 00000000000..d3c0a1d0da4 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/AutoDocTransforms.py @@ -0,0 +1,214 @@ +from __future__ import absolute_import, print_function + +from .Visitor import CythonTransform +from .StringEncoding import EncodedString +from . import Options +from . import PyrexTypes, ExprNodes +from ..CodeWriter import ExpressionWriter + + +class AnnotationWriter(ExpressionWriter): + + def visit_Node(self, node): + self.put(u"") + + def visit_LambdaNode(self, node): + # XXX Should we do better? + self.put("") + + +class EmbedSignature(CythonTransform): + + def __init__(self, context): + super(EmbedSignature, self).__init__(context) + self.class_name = None + self.class_node = None + + def _fmt_expr(self, node): + writer = AnnotationWriter() + result = writer.write(node) + # print(type(node).__name__, '-->', result) + return result + + def _fmt_arg(self, arg): + if arg.type is PyrexTypes.py_object_type or arg.is_self_arg: + doc = arg.name + else: + doc = arg.type.declaration_code(arg.name, for_display=1) + + if arg.annotation: + annotation = self._fmt_expr(arg.annotation) + doc = doc + (': %s' % annotation) + if arg.default: + default = self._fmt_expr(arg.default) + doc = doc + (' = %s' % default) + elif arg.default: + default = self._fmt_expr(arg.default) + doc = doc + ('=%s' % default) + return doc + + def _fmt_star_arg(self, arg): + arg_doc = arg.name + if arg.annotation: + annotation = self._fmt_expr(arg.annotation) + arg_doc = arg_doc + (': %s' % annotation) + return arg_doc + + def _fmt_arglist(self, args, + npargs=0, pargs=None, + nkargs=0, kargs=None, + hide_self=False): + arglist = [] + for arg in args: + if not hide_self or not arg.entry.is_self_arg: + arg_doc = self._fmt_arg(arg) + arglist.append(arg_doc) + if pargs: + arg_doc = self._fmt_star_arg(pargs) + arglist.insert(npargs, '*%s' % arg_doc) + elif nkargs: + arglist.insert(npargs, '*') + if kargs: + arg_doc = self._fmt_star_arg(kargs) + arglist.append('**%s' % arg_doc) + return arglist + + def _fmt_ret_type(self, ret): + if ret is PyrexTypes.py_object_type: + return None + else: + return ret.declaration_code("", for_display=1) + + def _fmt_signature(self, cls_name, func_name, args, + npargs=0, pargs=None, + nkargs=0, kargs=None, + return_expr=None, + return_type=None, hide_self=False): + arglist = self._fmt_arglist(args, + npargs, pargs, + nkargs, kargs, + hide_self=hide_self) + arglist_doc = ', '.join(arglist) + func_doc = '%s(%s)' % (func_name, arglist_doc) + if cls_name: + func_doc = '%s.%s' % (cls_name, func_doc) + ret_doc = None + if return_expr: + ret_doc = self._fmt_expr(return_expr) + elif return_type: + ret_doc = self._fmt_ret_type(return_type) + if ret_doc: + func_doc = '%s -> %s' % (func_doc, ret_doc) + return func_doc + + def _embed_signature(self, signature, node_doc): + if node_doc: + return "%s\n%s" % (signature, node_doc) + else: + return signature + + def __call__(self, node): + if not Options.docstrings: + return node + else: + return super(EmbedSignature, self).__call__(node) + + def visit_ClassDefNode(self, node): + oldname = self.class_name + oldclass = self.class_node + self.class_node = node + try: + # PyClassDefNode + self.class_name = node.name + except AttributeError: + # CClassDefNode + self.class_name = node.class_name + self.visitchildren(node) + self.class_name = oldname + self.class_node = oldclass + return node + + def visit_LambdaNode(self, node): + # lambda expressions so not have signature or inner functions + return node + + def visit_DefNode(self, node): + if not self.current_directives['embedsignature']: + return node + + is_constructor = False + hide_self = False + if node.entry.is_special: + is_constructor = self.class_node and node.name == '__init__' + if not is_constructor: + return node + class_name, func_name = None, self.class_name + hide_self = True + else: + class_name, func_name = self.class_name, node.name + + nkargs = getattr(node, 'num_kwonly_args', 0) + npargs = len(node.args) - nkargs + signature = self._fmt_signature( + class_name, func_name, node.args, + npargs, node.star_arg, + nkargs, node.starstar_arg, + return_expr=node.return_type_annotation, + return_type=None, hide_self=hide_self) + if signature: + if is_constructor: + doc_holder = self.class_node.entry.type.scope + else: + doc_holder = node.entry + + if doc_holder.doc is not None: + old_doc = doc_holder.doc + elif not is_constructor and getattr(node, 'py_func', None) is not None: + old_doc = node.py_func.entry.doc + else: + old_doc = None + new_doc = self._embed_signature(signature, old_doc) + doc_holder.doc = EncodedString(new_doc) + if not is_constructor and getattr(node, 'py_func', None) is not None: + node.py_func.entry.doc = EncodedString(new_doc) + return node + + def visit_CFuncDefNode(self, node): + if not self.current_directives['embedsignature']: + return node + if not node.overridable: # not cpdef FOO(...): + return node + + signature = self._fmt_signature( + self.class_name, node.declarator.base.name, + node.declarator.args, + return_type=node.return_type) + if signature: + if node.entry.doc is not None: + old_doc = node.entry.doc + elif getattr(node, 'py_func', None) is not None: + old_doc = node.py_func.entry.doc + else: + old_doc = None + new_doc = self._embed_signature(signature, old_doc) + node.entry.doc = EncodedString(new_doc) + if hasattr(node, 'py_func') and node.py_func is not None: + node.py_func.entry.doc = EncodedString(new_doc) + return node + + def visit_PropertyNode(self, node): + if not self.current_directives['embedsignature']: + return node + + entry = node.entry + if entry.visibility == 'public': + # property synthesised from a cdef public attribute + type_name = entry.type.declaration_code("", for_display=1) + if not entry.type.is_pyobject: + type_name = "'%s'" % type_name + elif entry.type.is_extension_type: + type_name = entry.type.module_name + '.' + type_name + signature = '%s: %s' % (entry.name, type_name) + new_doc = self._embed_signature(signature, entry.doc) + entry.doc = EncodedString(new_doc) + return node diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Buffer.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Buffer.py new file mode 100644 index 00000000000..c62a24f5686 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Buffer.py @@ -0,0 +1,740 @@ +from __future__ import absolute_import + +from .Visitor import CythonTransform +from .ModuleNode import ModuleNode +from .Errors import CompileError +from .UtilityCode import CythonUtilityCode +from .Code import UtilityCode, TempitaUtilityCode + +from . import Options +from . import Interpreter +from . import PyrexTypes +from . import Naming +from . import Symtab + +def dedent(text, reindent=0): + from textwrap import dedent + text = dedent(text) + if reindent > 0: + indent = " " * reindent + text = '\n'.join([indent + x for x in text.split('\n')]) + return text + +class IntroduceBufferAuxiliaryVars(CythonTransform): + + # + # Entry point + # + + buffers_exists = False + using_memoryview = False + + def __call__(self, node): + assert isinstance(node, ModuleNode) + self.max_ndim = 0 + result = super(IntroduceBufferAuxiliaryVars, self).__call__(node) + if self.buffers_exists: + use_bufstruct_declare_code(node.scope) + use_py2_buffer_functions(node.scope) + + return result + + + # + # Basic operations for transforms + # + def handle_scope(self, node, scope): + # For all buffers, insert extra variables in the scope. + # The variables are also accessible from the buffer_info + # on the buffer entry + scope_items = scope.entries.items() + bufvars = [entry for name, entry in scope_items if entry.type.is_buffer] + if len(bufvars) > 0: + bufvars.sort(key=lambda entry: entry.name) + self.buffers_exists = True + + memviewslicevars = [entry for name, entry in scope_items if entry.type.is_memoryviewslice] + if len(memviewslicevars) > 0: + self.buffers_exists = True + + + for (name, entry) in scope_items: + if name == 'memoryview' and isinstance(entry.utility_code_definition, CythonUtilityCode): + self.using_memoryview = True + break + del scope_items + + if isinstance(node, ModuleNode) and len(bufvars) > 0: + # for now...note that pos is wrong + raise CompileError(node.pos, "Buffer vars not allowed in module scope") + for entry in bufvars: + if entry.type.dtype.is_ptr: + raise CompileError(node.pos, "Buffers with pointer types not yet supported.") + + name = entry.name + buftype = entry.type + if buftype.ndim > Options.buffer_max_dims: + raise CompileError(node.pos, + "Buffer ndims exceeds Options.buffer_max_dims = %d" % Options.buffer_max_dims) + if buftype.ndim > self.max_ndim: + self.max_ndim = buftype.ndim + + # Declare auxiliary vars + def decvar(type, prefix): + cname = scope.mangle(prefix, name) + aux_var = scope.declare_var(name=None, cname=cname, + type=type, pos=node.pos) + if entry.is_arg: + aux_var.used = True # otherwise, NameNode will mark whether it is used + + return aux_var + + auxvars = ((PyrexTypes.c_pyx_buffer_nd_type, Naming.pybuffernd_prefix), + (PyrexTypes.c_pyx_buffer_type, Naming.pybufferstruct_prefix)) + pybuffernd, rcbuffer = [decvar(type, prefix) for (type, prefix) in auxvars] + + entry.buffer_aux = Symtab.BufferAux(pybuffernd, rcbuffer) + + scope.buffer_entries = bufvars + self.scope = scope + + def visit_ModuleNode(self, node): + self.handle_scope(node, node.scope) + self.visitchildren(node) + return node + + def visit_FuncDefNode(self, node): + self.handle_scope(node, node.local_scope) + self.visitchildren(node) + return node + +# +# Analysis +# +buffer_options = ("dtype", "ndim", "mode", "negative_indices", "cast") # ordered! +buffer_defaults = {"ndim": 1, "mode": "full", "negative_indices": True, "cast": False} +buffer_positional_options_count = 1 # anything beyond this needs keyword argument + +ERR_BUF_OPTION_UNKNOWN = '"%s" is not a buffer option' +ERR_BUF_TOO_MANY = 'Too many buffer options' +ERR_BUF_DUP = '"%s" buffer option already supplied' +ERR_BUF_MISSING = '"%s" missing' +ERR_BUF_MODE = 'Only allowed buffer modes are: "c", "fortran", "full", "strided" (as a compile-time string)' +ERR_BUF_NDIM = 'ndim must be a non-negative integer' +ERR_BUF_DTYPE = 'dtype must be "object", numeric type or a struct' +ERR_BUF_BOOL = '"%s" must be a boolean' + +def analyse_buffer_options(globalpos, env, posargs, dictargs, defaults=None, need_complete=True): + """ + Must be called during type analysis, as analyse is called + on the dtype argument. + + posargs and dictargs should consist of a list and a dict + of tuples (value, pos). Defaults should be a dict of values. + + Returns a dict containing all the options a buffer can have and + its value (with the positions stripped). + """ + if defaults is None: + defaults = buffer_defaults + + posargs, dictargs = Interpreter.interpret_compiletime_options( + posargs, dictargs, type_env=env, type_args=(0, 'dtype')) + + if len(posargs) > buffer_positional_options_count: + raise CompileError(posargs[-1][1], ERR_BUF_TOO_MANY) + + options = {} + for name, (value, pos) in dictargs.items(): + if not name in buffer_options: + raise CompileError(pos, ERR_BUF_OPTION_UNKNOWN % name) + options[name] = value + + for name, (value, pos) in zip(buffer_options, posargs): + if not name in buffer_options: + raise CompileError(pos, ERR_BUF_OPTION_UNKNOWN % name) + if name in options: + raise CompileError(pos, ERR_BUF_DUP % name) + options[name] = value + + # Check that they are all there and copy defaults + for name in buffer_options: + if not name in options: + try: + options[name] = defaults[name] + except KeyError: + if need_complete: + raise CompileError(globalpos, ERR_BUF_MISSING % name) + + dtype = options.get("dtype") + if dtype and dtype.is_extension_type: + raise CompileError(globalpos, ERR_BUF_DTYPE) + + ndim = options.get("ndim") + if ndim and (not isinstance(ndim, int) or ndim < 0): + raise CompileError(globalpos, ERR_BUF_NDIM) + + mode = options.get("mode") + if mode and not (mode in ('full', 'strided', 'c', 'fortran')): + raise CompileError(globalpos, ERR_BUF_MODE) + + def assert_bool(name): + x = options.get(name) + if not isinstance(x, bool): + raise CompileError(globalpos, ERR_BUF_BOOL % name) + + assert_bool('negative_indices') + assert_bool('cast') + + return options + + +# +# Code generation +# + +class BufferEntry(object): + def __init__(self, entry): + self.entry = entry + self.type = entry.type + self.cname = entry.buffer_aux.buflocal_nd_var.cname + self.buf_ptr = "%s.rcbuffer->pybuffer.buf" % self.cname + self.buf_ptr_type = entry.type.buffer_ptr_type + self.init_attributes() + + def init_attributes(self): + self.shape = self.get_buf_shapevars() + self.strides = self.get_buf_stridevars() + self.suboffsets = self.get_buf_suboffsetvars() + + def get_buf_suboffsetvars(self): + return self._for_all_ndim("%s.diminfo[%d].suboffsets") + + def get_buf_stridevars(self): + return self._for_all_ndim("%s.diminfo[%d].strides") + + def get_buf_shapevars(self): + return self._for_all_ndim("%s.diminfo[%d].shape") + + def _for_all_ndim(self, s): + return [s % (self.cname, i) for i in range(self.type.ndim)] + + def generate_buffer_lookup_code(self, code, index_cnames): + # Create buffer lookup and return it + # This is done via utility macros/inline functions, which vary + # according to the access mode used. + params = [] + nd = self.type.ndim + mode = self.type.mode + if mode == 'full': + for i, s, o in zip(index_cnames, + self.get_buf_stridevars(), + self.get_buf_suboffsetvars()): + params.append(i) + params.append(s) + params.append(o) + funcname = "__Pyx_BufPtrFull%dd" % nd + funcgen = buf_lookup_full_code + else: + if mode == 'strided': + funcname = "__Pyx_BufPtrStrided%dd" % nd + funcgen = buf_lookup_strided_code + elif mode == 'c': + funcname = "__Pyx_BufPtrCContig%dd" % nd + funcgen = buf_lookup_c_code + elif mode == 'fortran': + funcname = "__Pyx_BufPtrFortranContig%dd" % nd + funcgen = buf_lookup_fortran_code + else: + assert False + for i, s in zip(index_cnames, self.get_buf_stridevars()): + params.append(i) + params.append(s) + + # Make sure the utility code is available + if funcname not in code.globalstate.utility_codes: + code.globalstate.utility_codes.add(funcname) + protocode = code.globalstate['utility_code_proto'] + defcode = code.globalstate['utility_code_def'] + funcgen(protocode, defcode, name=funcname, nd=nd) + + buf_ptr_type_code = self.buf_ptr_type.empty_declaration_code() + ptrcode = "%s(%s, %s, %s)" % (funcname, buf_ptr_type_code, self.buf_ptr, + ", ".join(params)) + return ptrcode + + +def get_flags(buffer_aux, buffer_type): + flags = 'PyBUF_FORMAT' + mode = buffer_type.mode + if mode == 'full': + flags += '| PyBUF_INDIRECT' + elif mode == 'strided': + flags += '| PyBUF_STRIDES' + elif mode == 'c': + flags += '| PyBUF_C_CONTIGUOUS' + elif mode == 'fortran': + flags += '| PyBUF_F_CONTIGUOUS' + else: + assert False + if buffer_aux.writable_needed: flags += "| PyBUF_WRITABLE" + return flags + +def used_buffer_aux_vars(entry): + buffer_aux = entry.buffer_aux + buffer_aux.buflocal_nd_var.used = True + buffer_aux.rcbuf_var.used = True + +def put_unpack_buffer_aux_into_scope(buf_entry, code): + # Generate code to copy the needed struct info into local + # variables. + buffer_aux, mode = buf_entry.buffer_aux, buf_entry.type.mode + pybuffernd_struct = buffer_aux.buflocal_nd_var.cname + + fldnames = ['strides', 'shape'] + if mode == 'full': + fldnames.append('suboffsets') + + ln = [] + for i in range(buf_entry.type.ndim): + for fldname in fldnames: + ln.append("%s.diminfo[%d].%s = %s.rcbuffer->pybuffer.%s[%d];" % \ + (pybuffernd_struct, i, fldname, + pybuffernd_struct, fldname, i)) + code.putln(' '.join(ln)) + +def put_init_vars(entry, code): + bufaux = entry.buffer_aux + pybuffernd_struct = bufaux.buflocal_nd_var.cname + pybuffer_struct = bufaux.rcbuf_var.cname + # init pybuffer_struct + code.putln("%s.pybuffer.buf = NULL;" % pybuffer_struct) + code.putln("%s.refcount = 0;" % pybuffer_struct) + # init the buffer object + # code.put_init_var_to_py_none(entry) + # init the pybuffernd_struct + code.putln("%s.data = NULL;" % pybuffernd_struct) + code.putln("%s.rcbuffer = &%s;" % (pybuffernd_struct, pybuffer_struct)) + + +def put_acquire_arg_buffer(entry, code, pos): + buffer_aux = entry.buffer_aux + getbuffer = get_getbuffer_call(code, entry.cname, buffer_aux, entry.type) + + # Acquire any new buffer + code.putln("{") + code.putln("__Pyx_BufFmt_StackElem __pyx_stack[%d];" % entry.type.dtype.struct_nesting_depth()) + code.putln(code.error_goto_if("%s == -1" % getbuffer, pos)) + code.putln("}") + # An exception raised in arg parsing cannot be caught, so no + # need to care about the buffer then. + put_unpack_buffer_aux_into_scope(entry, code) + + +def put_release_buffer_code(code, entry): + code.globalstate.use_utility_code(acquire_utility_code) + code.putln("__Pyx_SafeReleaseBuffer(&%s.rcbuffer->pybuffer);" % entry.buffer_aux.buflocal_nd_var.cname) + + +def get_getbuffer_call(code, obj_cname, buffer_aux, buffer_type): + ndim = buffer_type.ndim + cast = int(buffer_type.cast) + flags = get_flags(buffer_aux, buffer_type) + pybuffernd_struct = buffer_aux.buflocal_nd_var.cname + + dtype_typeinfo = get_type_information_cname(code, buffer_type.dtype) + + code.globalstate.use_utility_code(acquire_utility_code) + return ("__Pyx_GetBufferAndValidate(&%(pybuffernd_struct)s.rcbuffer->pybuffer, " + "(PyObject*)%(obj_cname)s, &%(dtype_typeinfo)s, %(flags)s, %(ndim)d, " + "%(cast)d, __pyx_stack)" % locals()) + + +def put_assign_to_buffer(lhs_cname, rhs_cname, buf_entry, + is_initialized, pos, code): + """ + Generate code for reassigning a buffer variables. This only deals with getting + the buffer auxiliary structure and variables set up correctly, the assignment + itself and refcounting is the responsibility of the caller. + + However, the assignment operation may throw an exception so that the reassignment + never happens. + + Depending on the circumstances there are two possible outcomes: + - Old buffer released, new acquired, rhs assigned to lhs + - Old buffer released, new acquired which fails, reaqcuire old lhs buffer + (which may or may not succeed). + """ + + buffer_aux, buffer_type = buf_entry.buffer_aux, buf_entry.type + pybuffernd_struct = buffer_aux.buflocal_nd_var.cname + flags = get_flags(buffer_aux, buffer_type) + + code.putln("{") # Set up necessary stack for getbuffer + code.putln("__Pyx_BufFmt_StackElem __pyx_stack[%d];" % buffer_type.dtype.struct_nesting_depth()) + + getbuffer = get_getbuffer_call(code, "%s", buffer_aux, buffer_type) # fill in object below + + if is_initialized: + # Release any existing buffer + code.putln('__Pyx_SafeReleaseBuffer(&%s.rcbuffer->pybuffer);' % pybuffernd_struct) + # Acquire + retcode_cname = code.funcstate.allocate_temp(PyrexTypes.c_int_type, manage_ref=False) + code.putln("%s = %s;" % (retcode_cname, getbuffer % rhs_cname)) + code.putln('if (%s) {' % (code.unlikely("%s < 0" % retcode_cname))) + # If acquisition failed, attempt to reacquire the old buffer + # before raising the exception. A failure of reacquisition + # will cause the reacquisition exception to be reported, one + # can consider working around this later. + exc_temps = tuple(code.funcstate.allocate_temp(PyrexTypes.py_object_type, manage_ref=False) + for _ in range(3)) + code.putln('PyErr_Fetch(&%s, &%s, &%s);' % exc_temps) + code.putln('if (%s) {' % code.unlikely("%s == -1" % (getbuffer % lhs_cname))) + code.putln('Py_XDECREF(%s); Py_XDECREF(%s); Py_XDECREF(%s);' % exc_temps) # Do not refnanny these! + code.globalstate.use_utility_code(raise_buffer_fallback_code) + code.putln('__Pyx_RaiseBufferFallbackError();') + code.putln('} else {') + code.putln('PyErr_Restore(%s, %s, %s);' % exc_temps) + code.putln('}') + code.putln('%s = %s = %s = 0;' % exc_temps) + for t in exc_temps: + code.funcstate.release_temp(t) + code.putln('}') + # Unpack indices + put_unpack_buffer_aux_into_scope(buf_entry, code) + code.putln(code.error_goto_if_neg(retcode_cname, pos)) + code.funcstate.release_temp(retcode_cname) + else: + # Our entry had no previous value, so set to None when acquisition fails. + # In this case, auxiliary vars should be set up right in initialization to a zero-buffer, + # so it suffices to set the buf field to NULL. + code.putln('if (%s) {' % code.unlikely("%s == -1" % (getbuffer % rhs_cname))) + code.putln('%s = %s; __Pyx_INCREF(Py_None); %s.rcbuffer->pybuffer.buf = NULL;' % + (lhs_cname, + PyrexTypes.typecast(buffer_type, PyrexTypes.py_object_type, "Py_None"), + pybuffernd_struct)) + code.putln(code.error_goto(pos)) + code.put('} else {') + # Unpack indices + put_unpack_buffer_aux_into_scope(buf_entry, code) + code.putln('}') + + code.putln("}") # Release stack + + +def put_buffer_lookup_code(entry, index_signeds, index_cnames, directives, + pos, code, negative_indices, in_nogil_context): + """ + Generates code to process indices and calculate an offset into + a buffer. Returns a C string which gives a pointer which can be + read from or written to at will (it is an expression so caller should + store it in a temporary if it is used more than once). + + As the bounds checking can have any number of combinations of unsigned + arguments, smart optimizations etc. we insert it directly in the function + body. The lookup however is delegated to a inline function that is instantiated + once per ndim (lookup with suboffsets tend to get quite complicated). + + entry is a BufferEntry + """ + negative_indices = directives['wraparound'] and negative_indices + + if directives['boundscheck']: + # Check bounds and fix negative indices. + # We allocate a temporary which is initialized to -1, meaning OK (!). + # If an error occurs, the temp is set to the index dimension the + # error is occurring at. + failed_dim_temp = code.funcstate.allocate_temp(PyrexTypes.c_int_type, manage_ref=False) + code.putln("%s = -1;" % failed_dim_temp) + for dim, (signed, cname, shape) in enumerate(zip(index_signeds, index_cnames, entry.get_buf_shapevars())): + if signed != 0: + # not unsigned, deal with negative index + code.putln("if (%s < 0) {" % cname) + if negative_indices: + code.putln("%s += %s;" % (cname, shape)) + code.putln("if (%s) %s = %d;" % ( + code.unlikely("%s < 0" % cname), + failed_dim_temp, dim)) + else: + code.putln("%s = %d;" % (failed_dim_temp, dim)) + code.put("} else ") + # check bounds in positive direction + if signed != 0: + cast = "" + else: + cast = "(size_t)" + code.putln("if (%s) %s = %d;" % ( + code.unlikely("%s >= %s%s" % (cname, cast, shape)), + failed_dim_temp, dim)) + + if in_nogil_context: + code.globalstate.use_utility_code(raise_indexerror_nogil) + func = '__Pyx_RaiseBufferIndexErrorNogil' + else: + code.globalstate.use_utility_code(raise_indexerror_code) + func = '__Pyx_RaiseBufferIndexError' + + code.putln("if (%s) {" % code.unlikely("%s != -1" % failed_dim_temp)) + code.putln('%s(%s);' % (func, failed_dim_temp)) + code.putln(code.error_goto(pos)) + code.putln('}') + code.funcstate.release_temp(failed_dim_temp) + elif negative_indices: + # Only fix negative indices. + for signed, cname, shape in zip(index_signeds, index_cnames, entry.get_buf_shapevars()): + if signed != 0: + code.putln("if (%s < 0) %s += %s;" % (cname, cname, shape)) + + return entry.generate_buffer_lookup_code(code, index_cnames) + + +def use_bufstruct_declare_code(env): + env.use_utility_code(buffer_struct_declare_code) + + +def buf_lookup_full_code(proto, defin, name, nd): + """ + Generates a buffer lookup function for the right number + of dimensions. The function gives back a void* at the right location. + """ + # _i_ndex, _s_tride, sub_o_ffset + macroargs = ", ".join(["i%d, s%d, o%d" % (i, i, i) for i in range(nd)]) + proto.putln("#define %s(type, buf, %s) (type)(%s_imp(buf, %s))" % (name, macroargs, name, macroargs)) + + funcargs = ", ".join(["Py_ssize_t i%d, Py_ssize_t s%d, Py_ssize_t o%d" % (i, i, i) for i in range(nd)]) + proto.putln("static CYTHON_INLINE void* %s_imp(void* buf, %s);" % (name, funcargs)) + defin.putln(dedent(""" + static CYTHON_INLINE void* %s_imp(void* buf, %s) { + char* ptr = (char*)buf; + """) % (name, funcargs) + "".join([dedent("""\ + ptr += s%d * i%d; + if (o%d >= 0) ptr = *((char**)ptr) + o%d; + """) % (i, i, i, i) for i in range(nd)] + ) + "\nreturn ptr;\n}") + + +def buf_lookup_strided_code(proto, defin, name, nd): + """ + Generates a buffer lookup function for the right number + of dimensions. The function gives back a void* at the right location. + """ + # _i_ndex, _s_tride + args = ", ".join(["i%d, s%d" % (i, i) for i in range(nd)]) + offset = " + ".join(["i%d * s%d" % (i, i) for i in range(nd)]) + proto.putln("#define %s(type, buf, %s) (type)((char*)buf + %s)" % (name, args, offset)) + + +def buf_lookup_c_code(proto, defin, name, nd): + """ + Similar to strided lookup, but can assume that the last dimension + doesn't need a multiplication as long as. + Still we keep the same signature for now. + """ + if nd == 1: + proto.putln("#define %s(type, buf, i0, s0) ((type)buf + i0)" % name) + else: + args = ", ".join(["i%d, s%d" % (i, i) for i in range(nd)]) + offset = " + ".join(["i%d * s%d" % (i, i) for i in range(nd - 1)]) + proto.putln("#define %s(type, buf, %s) ((type)((char*)buf + %s) + i%d)" % (name, args, offset, nd - 1)) + + +def buf_lookup_fortran_code(proto, defin, name, nd): + """ + Like C lookup, but the first index is optimized instead. + """ + if nd == 1: + proto.putln("#define %s(type, buf, i0, s0) ((type)buf + i0)" % name) + else: + args = ", ".join(["i%d, s%d" % (i, i) for i in range(nd)]) + offset = " + ".join(["i%d * s%d" % (i, i) for i in range(1, nd)]) + proto.putln("#define %s(type, buf, %s) ((type)((char*)buf + %s) + i%d)" % (name, args, offset, 0)) + + +def use_py2_buffer_functions(env): + env.use_utility_code(GetAndReleaseBufferUtilityCode()) + + +class GetAndReleaseBufferUtilityCode(object): + # Emulation of PyObject_GetBuffer and PyBuffer_Release for Python 2. + # For >= 2.6 we do double mode -- use the new buffer interface on objects + # which has the right tp_flags set, but emulation otherwise. + + requires = None + is_cython_utility = False + + def __init__(self): + pass + + def __eq__(self, other): + return isinstance(other, GetAndReleaseBufferUtilityCode) + + def __hash__(self): + return 24342342 + + def get_tree(self, **kwargs): pass + + def put_code(self, output): + code = output['utility_code_def'] + proto_code = output['utility_code_proto'] + env = output.module_node.scope + cython_scope = env.context.cython_scope + + # Search all types for __getbuffer__ overloads + types = [] + visited_scopes = set() + def find_buffer_types(scope): + if scope in visited_scopes: + return + visited_scopes.add(scope) + for m in scope.cimported_modules: + find_buffer_types(m) + for e in scope.type_entries: + if isinstance(e.utility_code_definition, CythonUtilityCode): + continue + t = e.type + if t.is_extension_type: + if scope is cython_scope and not e.used: + continue + release = get = None + for x in t.scope.pyfunc_entries: + if x.name == u"__getbuffer__": get = x.func_cname + elif x.name == u"__releasebuffer__": release = x.func_cname + if get: + types.append((t.typeptr_cname, get, release)) + + find_buffer_types(env) + + util_code = TempitaUtilityCode.load( + "GetAndReleaseBuffer", from_file="Buffer.c", + context=dict(types=types)) + + proto = util_code.format_code(util_code.proto) + impl = util_code.format_code( + util_code.inject_string_constants(util_code.impl, output)[1]) + + proto_code.putln(proto) + code.putln(impl) + + +def mangle_dtype_name(dtype): + # Use prefixes to separate user defined types from builtins + # (consider "typedef float unsigned_int") + if dtype.is_pyobject: + return "object" + elif dtype.is_ptr: + return "ptr" + else: + if dtype.is_typedef or dtype.is_struct_or_union: + prefix = "nn_" + else: + prefix = "" + return prefix + dtype.specialization_name() + +def get_type_information_cname(code, dtype, maxdepth=None): + """ + Output the run-time type information (__Pyx_TypeInfo) for given dtype, + and return the name of the type info struct. + + Structs with two floats of the same size are encoded as complex numbers. + One can separate between complex numbers declared as struct or with native + encoding by inspecting to see if the fields field of the type is + filled in. + """ + namesuffix = mangle_dtype_name(dtype) + name = "__Pyx_TypeInfo_%s" % namesuffix + structinfo_name = "__Pyx_StructFields_%s" % namesuffix + + if dtype.is_error: return "" + + # It's critical that walking the type info doesn't use more stack + # depth than dtype.struct_nesting_depth() returns, so use an assertion for this + if maxdepth is None: maxdepth = dtype.struct_nesting_depth() + if maxdepth <= 0: + assert False + + if name not in code.globalstate.utility_codes: + code.globalstate.utility_codes.add(name) + typecode = code.globalstate['typeinfo'] + + arraysizes = [] + if dtype.is_array: + while dtype.is_array: + arraysizes.append(dtype.size) + dtype = dtype.base_type + + complex_possible = dtype.is_struct_or_union and dtype.can_be_complex() + + declcode = dtype.empty_declaration_code() + if dtype.is_simple_buffer_dtype(): + structinfo_name = "NULL" + elif dtype.is_struct: + struct_scope = dtype.scope + if dtype.is_const: + struct_scope = struct_scope.const_base_type_scope + # Must pre-call all used types in order not to recurse during utility code writing. + fields = struct_scope.var_entries + assert len(fields) > 0 + types = [get_type_information_cname(code, f.type, maxdepth - 1) + for f in fields] + typecode.putln("static __Pyx_StructField %s[] = {" % structinfo_name, safe=True) + for f, typeinfo in zip(fields, types): + typecode.putln(' {&%s, "%s", offsetof(%s, %s)},' % + (typeinfo, f.name, dtype.empty_declaration_code(), f.cname), safe=True) + typecode.putln(' {NULL, NULL, 0}', safe=True) + typecode.putln("};", safe=True) + else: + assert False + + rep = str(dtype) + + flags = "0" + is_unsigned = "0" + if dtype is PyrexTypes.c_char_type: + is_unsigned = "IS_UNSIGNED(%s)" % declcode + typegroup = "'H'" + elif dtype.is_int: + is_unsigned = "IS_UNSIGNED(%s)" % declcode + typegroup = "%s ? 'U' : 'I'" % is_unsigned + elif complex_possible or dtype.is_complex: + typegroup = "'C'" + elif dtype.is_float: + typegroup = "'R'" + elif dtype.is_struct: + typegroup = "'S'" + if dtype.packed: + flags = "__PYX_BUF_FLAGS_PACKED_STRUCT" + elif dtype.is_pyobject: + typegroup = "'O'" + else: + assert False, dtype + + typeinfo = ('static __Pyx_TypeInfo %s = ' + '{ "%s", %s, sizeof(%s), { %s }, %s, %s, %s, %s };') + tup = (name, rep, structinfo_name, declcode, + ', '.join([str(x) for x in arraysizes]) or '0', len(arraysizes), + typegroup, is_unsigned, flags) + typecode.putln(typeinfo % tup, safe=True) + + return name + +def load_buffer_utility(util_code_name, context=None, **kwargs): + if context is None: + return UtilityCode.load(util_code_name, "Buffer.c", **kwargs) + else: + return TempitaUtilityCode.load(util_code_name, "Buffer.c", context=context, **kwargs) + +context = dict(max_dims=Options.buffer_max_dims) +buffer_struct_declare_code = load_buffer_utility("BufferStructDeclare", context=context) +buffer_formats_declare_code = load_buffer_utility("BufferFormatStructs") + +# Utility function to set the right exception +# The caller should immediately goto_error +raise_indexerror_code = load_buffer_utility("BufferIndexError") +raise_indexerror_nogil = load_buffer_utility("BufferIndexErrorNogil") +raise_buffer_fallback_code = load_buffer_utility("BufferFallbackError") + +acquire_utility_code = load_buffer_utility("BufferGetAndValidate", context=context) +buffer_format_check_code = load_buffer_utility("BufferFormatCheck", context=context) + +# See utility code BufferFormatFromTypeInfo +_typeinfo_to_format_code = load_buffer_utility("TypeInfoToFormat") diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Builtin.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Builtin.py new file mode 100644 index 00000000000..e0d203ae027 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Builtin.py @@ -0,0 +1,444 @@ +# +# Builtin Definitions +# + +from __future__ import absolute_import + +from .Symtab import BuiltinScope, StructOrUnionScope +from .Code import UtilityCode +from .TypeSlots import Signature +from . import PyrexTypes +from . import Options + + +# C-level implementations of builtin types, functions and methods + +iter_next_utility_code = UtilityCode.load("IterNext", "ObjectHandling.c") +getattr_utility_code = UtilityCode.load("GetAttr", "ObjectHandling.c") +getattr3_utility_code = UtilityCode.load("GetAttr3", "Builtins.c") +pyexec_utility_code = UtilityCode.load("PyExec", "Builtins.c") +pyexec_globals_utility_code = UtilityCode.load("PyExecGlobals", "Builtins.c") +globals_utility_code = UtilityCode.load("Globals", "Builtins.c") + +builtin_utility_code = { + 'StopAsyncIteration': UtilityCode.load_cached("StopAsyncIteration", "Coroutine.c"), +} + + +# mapping from builtins to their C-level equivalents + +class _BuiltinOverride(object): + def __init__(self, py_name, args, ret_type, cname, py_equiv="*", + utility_code=None, sig=None, func_type=None, + is_strict_signature=False, builtin_return_type=None): + self.py_name, self.cname, self.py_equiv = py_name, cname, py_equiv + self.args, self.ret_type = args, ret_type + self.func_type, self.sig = func_type, sig + self.builtin_return_type = builtin_return_type + self.is_strict_signature = is_strict_signature + self.utility_code = utility_code + + def build_func_type(self, sig=None, self_arg=None): + if sig is None: + sig = Signature(self.args, self.ret_type) + sig.exception_check = False # not needed for the current builtins + func_type = sig.function_type(self_arg) + if self.is_strict_signature: + func_type.is_strict_signature = True + if self.builtin_return_type: + func_type.return_type = builtin_types[self.builtin_return_type] + return func_type + + +class BuiltinAttribute(object): + def __init__(self, py_name, cname=None, field_type=None, field_type_name=None): + self.py_name = py_name + self.cname = cname or py_name + self.field_type_name = field_type_name # can't do the lookup before the type is declared! + self.field_type = field_type + + def declare_in_type(self, self_type): + if self.field_type_name is not None: + # lazy type lookup + field_type = builtin_scope.lookup(self.field_type_name).type + else: + field_type = self.field_type or PyrexTypes.py_object_type + entry = self_type.scope.declare(self.py_name, self.cname, field_type, None, 'private') + entry.is_variable = True + + +class BuiltinFunction(_BuiltinOverride): + def declare_in_scope(self, scope): + func_type, sig = self.func_type, self.sig + if func_type is None: + func_type = self.build_func_type(sig) + scope.declare_builtin_cfunction(self.py_name, func_type, self.cname, + self.py_equiv, self.utility_code) + + +class BuiltinMethod(_BuiltinOverride): + def declare_in_type(self, self_type): + method_type, sig = self.func_type, self.sig + if method_type is None: + # override 'self' type (first argument) + self_arg = PyrexTypes.CFuncTypeArg("", self_type, None) + self_arg.not_none = True + self_arg.accept_builtin_subtypes = True + method_type = self.build_func_type(sig, self_arg) + self_type.scope.declare_builtin_cfunction( + self.py_name, method_type, self.cname, utility_code=self.utility_code) + + +builtin_function_table = [ + # name, args, return, C API func, py equiv = "*" + BuiltinFunction('abs', "d", "d", "fabs", + is_strict_signature = True), + BuiltinFunction('abs', "f", "f", "fabsf", + is_strict_signature = True), + BuiltinFunction('abs', "i", "i", "abs", + is_strict_signature = True), + BuiltinFunction('abs', "l", "l", "labs", + is_strict_signature = True), + BuiltinFunction('abs', None, None, "__Pyx_abs_longlong", + utility_code = UtilityCode.load("abs_longlong", "Builtins.c"), + func_type = PyrexTypes.CFuncType( + PyrexTypes.c_longlong_type, [ + PyrexTypes.CFuncTypeArg("arg", PyrexTypes.c_longlong_type, None) + ], + is_strict_signature = True, nogil=True)), + ] + list( + BuiltinFunction('abs', None, None, "/*abs_{0}*/".format(t.specialization_name()), + func_type = PyrexTypes.CFuncType( + t, + [PyrexTypes.CFuncTypeArg("arg", t, None)], + is_strict_signature = True, nogil=True)) + for t in (PyrexTypes.c_uint_type, PyrexTypes.c_ulong_type, PyrexTypes.c_ulonglong_type) + ) + list( + BuiltinFunction('abs', None, None, "__Pyx_c_abs{0}".format(t.funcsuffix), + func_type = PyrexTypes.CFuncType( + t.real_type, [ + PyrexTypes.CFuncTypeArg("arg", t, None) + ], + is_strict_signature = True, nogil=True)) + for t in (PyrexTypes.c_float_complex_type, + PyrexTypes.c_double_complex_type, + PyrexTypes.c_longdouble_complex_type) + ) + [ + BuiltinFunction('abs', "O", "O", "__Pyx_PyNumber_Absolute", + utility_code=UtilityCode.load("py_abs", "Builtins.c")), + #('all', "", "", ""), + #('any', "", "", ""), + #('ascii', "", "", ""), + #('bin', "", "", ""), + BuiltinFunction('callable', "O", "b", "__Pyx_PyCallable_Check", + utility_code = UtilityCode.load("CallableCheck", "ObjectHandling.c")), + #('chr', "", "", ""), + #('cmp', "", "", "", ""), # int PyObject_Cmp(PyObject *o1, PyObject *o2, int *result) + #('compile', "", "", ""), # PyObject* Py_CompileString( char *str, char *filename, int start) + BuiltinFunction('delattr', "OO", "r", "PyObject_DelAttr"), + BuiltinFunction('dir', "O", "O", "PyObject_Dir"), + BuiltinFunction('divmod', "OO", "O", "PyNumber_Divmod"), + BuiltinFunction('exec', "O", "O", "__Pyx_PyExecGlobals", + utility_code = pyexec_globals_utility_code), + BuiltinFunction('exec', "OO", "O", "__Pyx_PyExec2", + utility_code = pyexec_utility_code), + BuiltinFunction('exec', "OOO", "O", "__Pyx_PyExec3", + utility_code = pyexec_utility_code), + #('eval', "", "", ""), + #('execfile', "", "", ""), + #('filter', "", "", ""), + BuiltinFunction('getattr3', "OOO", "O", "__Pyx_GetAttr3", "getattr", + utility_code=getattr3_utility_code), # Pyrex legacy + BuiltinFunction('getattr', "OOO", "O", "__Pyx_GetAttr3", + utility_code=getattr3_utility_code), + BuiltinFunction('getattr', "OO", "O", "__Pyx_GetAttr", + utility_code=getattr_utility_code), + BuiltinFunction('hasattr', "OO", "b", "__Pyx_HasAttr", + utility_code = UtilityCode.load("HasAttr", "Builtins.c")), + BuiltinFunction('hash', "O", "h", "PyObject_Hash"), + #('hex', "", "", ""), + #('id', "", "", ""), + #('input', "", "", ""), + BuiltinFunction('intern', "O", "O", "__Pyx_Intern", + utility_code = UtilityCode.load("Intern", "Builtins.c")), + BuiltinFunction('isinstance', "OO", "b", "PyObject_IsInstance"), + BuiltinFunction('issubclass', "OO", "b", "PyObject_IsSubclass"), + BuiltinFunction('iter', "OO", "O", "PyCallIter_New"), + BuiltinFunction('iter', "O", "O", "PyObject_GetIter"), + BuiltinFunction('len', "O", "z", "PyObject_Length"), + BuiltinFunction('locals', "", "O", "__pyx_locals"), + #('map', "", "", ""), + #('max', "", "", ""), + #('min', "", "", ""), + BuiltinFunction('next', "O", "O", "__Pyx_PyIter_Next", + utility_code = iter_next_utility_code), # not available in Py2 => implemented here + BuiltinFunction('next', "OO", "O", "__Pyx_PyIter_Next2", + utility_code = iter_next_utility_code), # not available in Py2 => implemented here + #('oct', "", "", ""), + #('open', "ss", "O", "PyFile_FromString"), # not in Py3 +] + [ + BuiltinFunction('ord', None, None, "__Pyx_long_cast", + func_type=PyrexTypes.CFuncType( + PyrexTypes.c_long_type, [PyrexTypes.CFuncTypeArg("c", c_type, None)], + is_strict_signature=True)) + for c_type in [PyrexTypes.c_py_ucs4_type, PyrexTypes.c_py_unicode_type] +] + [ + BuiltinFunction('ord', None, None, "__Pyx_uchar_cast", + func_type=PyrexTypes.CFuncType( + PyrexTypes.c_uchar_type, [PyrexTypes.CFuncTypeArg("c", c_type, None)], + is_strict_signature=True)) + for c_type in [PyrexTypes.c_char_type, PyrexTypes.c_schar_type, PyrexTypes.c_uchar_type] +] + [ + BuiltinFunction('ord', None, None, "__Pyx_PyObject_Ord", + utility_code=UtilityCode.load_cached("object_ord", "Builtins.c"), + func_type=PyrexTypes.CFuncType( + PyrexTypes.c_long_type, [ + PyrexTypes.CFuncTypeArg("c", PyrexTypes.py_object_type, None) + ], + exception_value="(long)(Py_UCS4)-1")), + BuiltinFunction('pow', "OOO", "O", "PyNumber_Power"), + BuiltinFunction('pow', "OO", "O", "__Pyx_PyNumber_Power2", + utility_code = UtilityCode.load("pow2", "Builtins.c")), + #('range', "", "", ""), + #('raw_input', "", "", ""), + #('reduce', "", "", ""), + BuiltinFunction('reload', "O", "O", "PyImport_ReloadModule"), + BuiltinFunction('repr', "O", "O", "PyObject_Repr"), # , builtin_return_type='str'), # add in Cython 3.1 + #('round', "", "", ""), + BuiltinFunction('setattr', "OOO", "r", "PyObject_SetAttr"), + #('sum', "", "", ""), + #('sorted', "", "", ""), + #('type', "O", "O", "PyObject_Type"), + #('unichr', "", "", ""), + #('unicode', "", "", ""), + #('vars', "", "", ""), + #('zip', "", "", ""), + # Can't do these easily until we have builtin type entries. + #('typecheck', "OO", "i", "PyObject_TypeCheck", False), + #('issubtype', "OO", "i", "PyType_IsSubtype", False), + + # Put in namespace append optimization. + BuiltinFunction('__Pyx_PyObject_Append', "OO", "O", "__Pyx_PyObject_Append"), + + # This is conditionally looked up based on a compiler directive. + BuiltinFunction('__Pyx_Globals', "", "O", "__Pyx_Globals", + utility_code=globals_utility_code), +] + + +# Builtin types +# bool +# buffer +# classmethod +# dict +# enumerate +# file +# float +# int +# list +# long +# object +# property +# slice +# staticmethod +# super +# str +# tuple +# type +# xrange + +builtin_types_table = [ + + ("type", "PyType_Type", []), + +# This conflicts with the C++ bool type, and unfortunately +# C++ is too liberal about PyObject* <-> bool conversions, +# resulting in unintuitive runtime behavior and segfaults. +# ("bool", "PyBool_Type", []), + + ("int", "PyInt_Type", []), + ("long", "PyLong_Type", []), + ("float", "PyFloat_Type", []), + + ("complex", "PyComplex_Type", [BuiltinAttribute('cval', field_type_name = 'Py_complex'), + BuiltinAttribute('real', 'cval.real', field_type = PyrexTypes.c_double_type), + BuiltinAttribute('imag', 'cval.imag', field_type = PyrexTypes.c_double_type), + ]), + + ("basestring", "PyBaseString_Type", [ + BuiltinMethod("join", "TO", "T", "__Pyx_PyBaseString_Join", + utility_code=UtilityCode.load("StringJoin", "StringTools.c")), + ]), + ("bytearray", "PyByteArray_Type", [ + ]), + ("bytes", "PyBytes_Type", [BuiltinMethod("join", "TO", "O", "__Pyx_PyBytes_Join", + utility_code=UtilityCode.load("StringJoin", "StringTools.c")), + ]), + ("str", "PyString_Type", [BuiltinMethod("join", "TO", "O", "__Pyx_PyString_Join", + builtin_return_type='basestring', + utility_code=UtilityCode.load("StringJoin", "StringTools.c")), + ]), + ("unicode", "PyUnicode_Type", [BuiltinMethod("__contains__", "TO", "b", "PyUnicode_Contains"), + BuiltinMethod("join", "TO", "T", "PyUnicode_Join"), + ]), + + ("tuple", "PyTuple_Type", []), + + ("list", "PyList_Type", [BuiltinMethod("insert", "TzO", "r", "PyList_Insert"), + BuiltinMethod("reverse", "T", "r", "PyList_Reverse"), + BuiltinMethod("append", "TO", "r", "__Pyx_PyList_Append", + utility_code=UtilityCode.load("ListAppend", "Optimize.c")), + BuiltinMethod("extend", "TO", "r", "__Pyx_PyList_Extend", + utility_code=UtilityCode.load("ListExtend", "Optimize.c")), + ]), + + ("dict", "PyDict_Type", [BuiltinMethod("__contains__", "TO", "b", "PyDict_Contains"), + BuiltinMethod("has_key", "TO", "b", "PyDict_Contains"), + BuiltinMethod("items", "T", "O", "__Pyx_PyDict_Items", + utility_code=UtilityCode.load("py_dict_items", "Builtins.c")), + BuiltinMethod("keys", "T", "O", "__Pyx_PyDict_Keys", + utility_code=UtilityCode.load("py_dict_keys", "Builtins.c")), + BuiltinMethod("values", "T", "O", "__Pyx_PyDict_Values", + utility_code=UtilityCode.load("py_dict_values", "Builtins.c")), + BuiltinMethod("iteritems", "T", "O", "__Pyx_PyDict_IterItems", + utility_code=UtilityCode.load("py_dict_iteritems", "Builtins.c")), + BuiltinMethod("iterkeys", "T", "O", "__Pyx_PyDict_IterKeys", + utility_code=UtilityCode.load("py_dict_iterkeys", "Builtins.c")), + BuiltinMethod("itervalues", "T", "O", "__Pyx_PyDict_IterValues", + utility_code=UtilityCode.load("py_dict_itervalues", "Builtins.c")), + BuiltinMethod("viewitems", "T", "O", "__Pyx_PyDict_ViewItems", + utility_code=UtilityCode.load("py_dict_viewitems", "Builtins.c")), + BuiltinMethod("viewkeys", "T", "O", "__Pyx_PyDict_ViewKeys", + utility_code=UtilityCode.load("py_dict_viewkeys", "Builtins.c")), + BuiltinMethod("viewvalues", "T", "O", "__Pyx_PyDict_ViewValues", + utility_code=UtilityCode.load("py_dict_viewvalues", "Builtins.c")), + BuiltinMethod("clear", "T", "r", "__Pyx_PyDict_Clear", + utility_code=UtilityCode.load("py_dict_clear", "Optimize.c")), + BuiltinMethod("copy", "T", "T", "PyDict_Copy")]), + + ("slice", "PySlice_Type", [BuiltinAttribute('start'), + BuiltinAttribute('stop'), + BuiltinAttribute('step'), + ]), +# ("file", "PyFile_Type", []), # not in Py3 + + ("set", "PySet_Type", [BuiltinMethod("clear", "T", "r", "PySet_Clear"), + # discard() and remove() have a special treatment for unhashable values + BuiltinMethod("discard", "TO", "r", "__Pyx_PySet_Discard", + utility_code=UtilityCode.load("py_set_discard", "Optimize.c")), + BuiltinMethod("remove", "TO", "r", "__Pyx_PySet_Remove", + utility_code=UtilityCode.load("py_set_remove", "Optimize.c")), + # update is actually variadic (see Github issue #1645) +# BuiltinMethod("update", "TO", "r", "__Pyx_PySet_Update", +# utility_code=UtilityCode.load_cached("PySet_Update", "Builtins.c")), + BuiltinMethod("add", "TO", "r", "PySet_Add"), + BuiltinMethod("pop", "T", "O", "PySet_Pop")]), + ("frozenset", "PyFrozenSet_Type", []), + ("Exception", "((PyTypeObject*)PyExc_Exception)[0]", []), + ("StopAsyncIteration", "((PyTypeObject*)__Pyx_PyExc_StopAsyncIteration)[0]", []), +] + + +types_that_construct_their_instance = set([ + # some builtin types do not always return an instance of + # themselves - these do: + 'type', 'bool', 'long', 'float', 'complex', + 'bytes', 'unicode', 'bytearray', + 'tuple', 'list', 'dict', 'set', 'frozenset' + # 'str', # only in Py3.x + # 'file', # only in Py2.x +]) + + +builtin_structs_table = [ + ('Py_buffer', 'Py_buffer', + [("buf", PyrexTypes.c_void_ptr_type), + ("obj", PyrexTypes.py_object_type), + ("len", PyrexTypes.c_py_ssize_t_type), + ("itemsize", PyrexTypes.c_py_ssize_t_type), + ("readonly", PyrexTypes.c_bint_type), + ("ndim", PyrexTypes.c_int_type), + ("format", PyrexTypes.c_char_ptr_type), + ("shape", PyrexTypes.c_py_ssize_t_ptr_type), + ("strides", PyrexTypes.c_py_ssize_t_ptr_type), + ("suboffsets", PyrexTypes.c_py_ssize_t_ptr_type), + ("smalltable", PyrexTypes.CArrayType(PyrexTypes.c_py_ssize_t_type, 2)), + ("internal", PyrexTypes.c_void_ptr_type), + ]), + ('Py_complex', 'Py_complex', + [('real', PyrexTypes.c_double_type), + ('imag', PyrexTypes.c_double_type), + ]) +] + +# set up builtin scope + +builtin_scope = BuiltinScope() + +def init_builtin_funcs(): + for bf in builtin_function_table: + bf.declare_in_scope(builtin_scope) + +builtin_types = {} + +def init_builtin_types(): + global builtin_types + for name, cname, methods in builtin_types_table: + utility = builtin_utility_code.get(name) + if name == 'frozenset': + objstruct_cname = 'PySetObject' + elif name == 'bytearray': + objstruct_cname = 'PyByteArrayObject' + elif name == 'bool': + objstruct_cname = None + elif name == 'Exception': + objstruct_cname = "PyBaseExceptionObject" + elif name == 'StopAsyncIteration': + objstruct_cname = "PyBaseExceptionObject" + else: + objstruct_cname = 'Py%sObject' % name.capitalize() + the_type = builtin_scope.declare_builtin_type(name, cname, utility, objstruct_cname) + builtin_types[name] = the_type + for method in methods: + method.declare_in_type(the_type) + +def init_builtin_structs(): + for name, cname, attribute_types in builtin_structs_table: + scope = StructOrUnionScope(name) + for attribute_name, attribute_type in attribute_types: + scope.declare_var(attribute_name, attribute_type, None, + attribute_name, allow_pyobject=True) + builtin_scope.declare_struct_or_union( + name, "struct", scope, 1, None, cname = cname) + + +def init_builtins(): + init_builtin_structs() + init_builtin_types() + init_builtin_funcs() + + builtin_scope.declare_var( + '__debug__', PyrexTypes.c_const_type(PyrexTypes.c_bint_type), + pos=None, cname='(!Py_OptimizeFlag)', is_cdef=True) + + global list_type, tuple_type, dict_type, set_type, frozenset_type + global bytes_type, str_type, unicode_type, basestring_type, slice_type + global float_type, bool_type, type_type, complex_type, bytearray_type + type_type = builtin_scope.lookup('type').type + list_type = builtin_scope.lookup('list').type + tuple_type = builtin_scope.lookup('tuple').type + dict_type = builtin_scope.lookup('dict').type + set_type = builtin_scope.lookup('set').type + frozenset_type = builtin_scope.lookup('frozenset').type + slice_type = builtin_scope.lookup('slice').type + bytes_type = builtin_scope.lookup('bytes').type + str_type = builtin_scope.lookup('str').type + unicode_type = builtin_scope.lookup('unicode').type + basestring_type = builtin_scope.lookup('basestring').type + bytearray_type = builtin_scope.lookup('bytearray').type + float_type = builtin_scope.lookup('float').type + bool_type = builtin_scope.lookup('bool').type + complex_type = builtin_scope.lookup('complex').type + + +init_builtins() diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CmdLine.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CmdLine.py new file mode 100644 index 00000000000..e89e45ab481 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CmdLine.py @@ -0,0 +1,224 @@ +# +# Cython - Command Line Parsing +# + +from __future__ import absolute_import + +import os +import sys +from . import Options + +usage = """\ +Cython (http://cython.org) is a compiler for code written in the +Cython language. Cython is based on Pyrex by Greg Ewing. + +Usage: cython [options] sourcefile.{pyx,py} ... + +Options: + -V, --version Display version number of cython compiler + -l, --create-listing Write error messages to a listing file + -I, --include-dir Search for include files in named directory + (multiple include directories are allowed). + -o, --output-file Specify name of generated C file + -t, --timestamps Only compile newer source files + -f, --force Compile all source files (overrides implied -t) + -v, --verbose Be verbose, print file names on multiple compilation + -p, --embed-positions If specified, the positions in Cython files of each + function definition is embedded in its docstring. + --cleanup Release interned objects on python exit, for memory debugging. + Level indicates aggressiveness, default 0 releases nothing. + -w, --working Sets the working directory for Cython (the directory modules + are searched from) + --gdb Output debug information for cygdb + --gdb-outdir Specify gdb debug information output directory. Implies --gdb. + + -D, --no-docstrings Strip docstrings from the compiled module. + -a, --annotate Produce a colorized HTML version of the source. + --annotate-coverage Annotate and include coverage information from cov.xml. + --line-directives Produce #line directives pointing to the .pyx source + --cplus Output a C++ rather than C file. + --embed[=] Generate a main() function that embeds the Python interpreter. + -2 Compile based on Python-2 syntax and code semantics. + -3 Compile based on Python-3 syntax and code semantics. + --3str Compile based on Python-3 syntax and code semantics without + assuming unicode by default for string literals under Python 2. + --lenient Change some compile time errors to runtime errors to + improve Python compatibility + --capi-reexport-cincludes Add cincluded headers to any auto-generated header files. + --fast-fail Abort the compilation on the first error + --warning-errors, -Werror Make all warnings into errors + --warning-extra, -Wextra Enable extra warnings + -X, --directive =[, 1: + sys.stderr.write( + "cython: Only one source file allowed when using -o\n") + sys.exit(1) + if len(sources) == 0 and not options.show_version: + bad_usage() + if Options.embed and len(sources) > 1: + sys.stderr.write( + "cython: Only one source file allowed when using -embed\n") + sys.exit(1) + return options, sources + diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Code.pxd b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Code.pxd new file mode 100644 index 00000000000..acad0c1cf44 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Code.pxd @@ -0,0 +1,124 @@ + +from __future__ import absolute_import + +cimport cython +from ..StringIOTree cimport StringIOTree + + +cdef class UtilityCodeBase(object): + cpdef format_code(self, code_string, replace_empty_lines=*) + + +cdef class UtilityCode(UtilityCodeBase): + cdef public object name + cdef public object proto + cdef public object impl + cdef public object init + cdef public object cleanup + cdef public object proto_block + cdef public object requires + cdef public dict _cache + cdef public list specialize_list + cdef public object file + + cpdef none_or_sub(self, s, context) + + +cdef class FunctionState: + cdef public set names_taken + cdef public object owner + cdef public object scope + + cdef public object error_label + cdef public size_t label_counter + cdef public set labels_used + cdef public object return_label + cdef public object continue_label + cdef public object break_label + cdef public list yield_labels + + cdef public object return_from_error_cleanup_label # not used in __init__ ? + + cdef public object exc_vars + cdef public object current_except + cdef public bint in_try_finally + cdef public bint can_trace + cdef public bint gil_owned + + cdef public list temps_allocated + cdef public dict temps_free + cdef public dict temps_used_type + cdef public set zombie_temps + cdef public size_t temp_counter + cdef public list collect_temps_stack + + cdef public object closure_temps + cdef public bint should_declare_error_indicator + cdef public bint uses_error_indicator + + @cython.locals(n=size_t) + cpdef new_label(self, name=*) + cpdef tuple get_loop_labels(self) + cpdef set_loop_labels(self, labels) + cpdef tuple get_all_labels(self) + cpdef set_all_labels(self, labels) + cpdef start_collecting_temps(self) + cpdef stop_collecting_temps(self) + + cpdef list temps_in_use(self) + +cdef class IntConst: + cdef public object cname + cdef public object value + cdef public bint is_long + +cdef class PyObjectConst: + cdef public object cname + cdef public object type + +cdef class StringConst: + cdef public object cname + cdef public object text + cdef public object escaped_value + cdef public dict py_strings + cdef public list py_versions + + @cython.locals(intern=bint, is_str=bint, is_unicode=bint) + cpdef get_py_string_const(self, encoding, identifier=*, is_str=*, py3str_cstring=*) + +## cdef class PyStringConst: +## cdef public object cname +## cdef public object encoding +## cdef public bint is_str +## cdef public bint is_unicode +## cdef public bint intern + +#class GlobalState(object): + +#def funccontext_property(name): + +cdef class CCodeWriter(object): + cdef readonly StringIOTree buffer + cdef readonly list pyclass_stack + cdef readonly object globalstate + cdef readonly object funcstate + cdef object code_config + cdef object last_pos + cdef object last_marked_pos + cdef Py_ssize_t level + cdef public Py_ssize_t call_level # debug-only, see Nodes.py + cdef bint bol + + cpdef write(self, s) + cpdef put(self, code) + cpdef put_safe(self, code) + cpdef putln(self, code=*, bint safe=*) + @cython.final + cdef increase_indent(self) + @cython.final + cdef decrease_indent(self) + + +cdef class PyrexCodeWriter: + cdef public object f + cdef public Py_ssize_t level diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Code.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Code.py new file mode 100644 index 00000000000..45c5a325cf8 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Code.py @@ -0,0 +1,2597 @@ +# cython: language_level = 2 +# cython: auto_pickle=False +# +# Code output module +# + +from __future__ import absolute_import + +import cython +cython.declare(os=object, re=object, operator=object, textwrap=object, + Template=object, Naming=object, Options=object, StringEncoding=object, + Utils=object, SourceDescriptor=object, StringIOTree=object, + DebugFlags=object, basestring=object, defaultdict=object, + closing=object, partial=object) + +import os +import re +import shutil +import sys +import operator +import textwrap +from string import Template +from functools import partial +from contextlib import closing +from collections import defaultdict + +try: + import hashlib +except ImportError: + import md5 as hashlib + +from . import Naming +from . import Options +from . import DebugFlags +from . import StringEncoding +from . import Version +from .. import Utils +from .Scanning import SourceDescriptor +from ..StringIOTree import StringIOTree + +try: + from __builtin__ import basestring +except ImportError: + from builtins import str as basestring + +KEYWORDS_MUST_BE_BYTES = sys.version_info < (2, 7) + + +non_portable_builtins_map = { + # builtins that have different names in different Python versions + 'bytes' : ('PY_MAJOR_VERSION < 3', 'str'), + 'unicode' : ('PY_MAJOR_VERSION >= 3', 'str'), + 'basestring' : ('PY_MAJOR_VERSION >= 3', 'str'), + 'xrange' : ('PY_MAJOR_VERSION >= 3', 'range'), + 'raw_input' : ('PY_MAJOR_VERSION >= 3', 'input'), +} + +ctypedef_builtins_map = { + # types of builtins in "ctypedef class" statements which we don't + # import either because the names conflict with C types or because + # the type simply is not exposed. + 'py_int' : '&PyInt_Type', + 'py_long' : '&PyLong_Type', + 'py_float' : '&PyFloat_Type', + 'wrapper_descriptor' : '&PyWrapperDescr_Type', +} + +basicsize_builtins_map = { + # builtins whose type has a different tp_basicsize than sizeof(...) + 'PyTypeObject': 'PyHeapTypeObject', +} + +uncachable_builtins = [ + # Global/builtin names that cannot be cached because they may or may not + # be available at import time, for various reasons: + ## - Py3.7+ + 'breakpoint', # might deserve an implementation in Cython + ## - Py3.4+ + '__loader__', + '__spec__', + ## - Py3+ + 'BlockingIOError', + 'BrokenPipeError', + 'ChildProcessError', + 'ConnectionAbortedError', + 'ConnectionError', + 'ConnectionRefusedError', + 'ConnectionResetError', + 'FileExistsError', + 'FileNotFoundError', + 'InterruptedError', + 'IsADirectoryError', + 'ModuleNotFoundError', + 'NotADirectoryError', + 'PermissionError', + 'ProcessLookupError', + 'RecursionError', + 'ResourceWarning', + #'StopAsyncIteration', # backported + 'TimeoutError', + '__build_class__', + 'ascii', # might deserve an implementation in Cython + #'exec', # implemented in Cython + ## - Py2.7+ + 'memoryview', + ## - platform specific + 'WindowsError', + ## - others + '_', # e.g. used by gettext +] + +special_py_methods = set([ + '__cinit__', '__dealloc__', '__richcmp__', '__next__', + '__await__', '__aiter__', '__anext__', + '__getreadbuffer__', '__getwritebuffer__', '__getsegcount__', + '__getcharbuffer__', '__getbuffer__', '__releasebuffer__' +]) + +modifier_output_mapper = { + 'inline': 'CYTHON_INLINE' +}.get + + +class IncludeCode(object): + """ + An include file and/or verbatim C code to be included in the + generated sources. + """ + # attributes: + # + # pieces {order: unicode}: pieces of C code to be generated. + # For the included file, the key "order" is zero. + # For verbatim include code, the "order" is the "order" + # attribute of the original IncludeCode where this piece + # of C code was first added. This is needed to prevent + # duplication if the same include code is found through + # multiple cimports. + # location int: where to put this include in the C sources, one + # of the constants INITIAL, EARLY, LATE + # order int: sorting order (automatically set by increasing counter) + + # Constants for location. If the same include occurs with different + # locations, the earliest one takes precedense. + INITIAL = 0 + EARLY = 1 + LATE = 2 + + counter = 1 # Counter for "order" + + def __init__(self, include=None, verbatim=None, late=True, initial=False): + self.order = self.counter + type(self).counter += 1 + self.pieces = {} + + if include: + if include[0] == '<' and include[-1] == '>': + self.pieces[0] = u'#include {0}'.format(include) + late = False # system include is never late + else: + self.pieces[0] = u'#include "{0}"'.format(include) + + if verbatim: + self.pieces[self.order] = verbatim + + if initial: + self.location = self.INITIAL + elif late: + self.location = self.LATE + else: + self.location = self.EARLY + + def dict_update(self, d, key): + """ + Insert `self` in dict `d` with key `key`. If that key already + exists, update the attributes of the existing value with `self`. + """ + if key in d: + other = d[key] + other.location = min(self.location, other.location) + other.pieces.update(self.pieces) + else: + d[key] = self + + def sortkey(self): + return self.order + + def mainpiece(self): + """ + Return the main piece of C code, corresponding to the include + file. If there was no include file, return None. + """ + return self.pieces.get(0) + + def write(self, code): + # Write values of self.pieces dict, sorted by the keys + for k in sorted(self.pieces): + code.putln(self.pieces[k]) + + +def get_utility_dir(): + # make this a function and not global variables: + # http://trac.cython.org/cython_trac/ticket/475 + Cython_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + return os.path.join(Cython_dir, "Utility") + + +class UtilityCodeBase(object): + """ + Support for loading utility code from a file. + + Code sections in the file can be specified as follows: + + ##### MyUtility.proto ##### + + [proto declarations] + + ##### MyUtility.init ##### + + [code run at module initialization] + + ##### MyUtility ##### + #@requires: MyOtherUtility + #@substitute: naming + + [definitions] + + for prototypes and implementation respectively. For non-python or + -cython files backslashes should be used instead. 5 to 30 comment + characters may be used on either side. + + If the @cname decorator is not used and this is a CythonUtilityCode, + one should pass in the 'name' keyword argument to be used for name + mangling of such entries. + """ + + is_cython_utility = False + _utility_cache = {} + + @classmethod + def _add_utility(cls, utility, type, lines, begin_lineno, tags=None): + if utility is None: + return + + code = '\n'.join(lines) + if tags and 'substitute' in tags and tags['substitute'] == set(['naming']): + del tags['substitute'] + try: + code = Template(code).substitute(vars(Naming)) + except (KeyError, ValueError) as e: + raise RuntimeError("Error parsing templated utility code of type '%s' at line %d: %s" % ( + type, begin_lineno, e)) + + # remember correct line numbers at least until after templating + code = '\n' * begin_lineno + code + + if type == 'proto': + utility[0] = code + elif type == 'impl': + utility[1] = code + else: + all_tags = utility[2] + if KEYWORDS_MUST_BE_BYTES: + type = type.encode('ASCII') + all_tags[type] = code + + if tags: + all_tags = utility[2] + for name, values in tags.items(): + if KEYWORDS_MUST_BE_BYTES: + name = name.encode('ASCII') + all_tags.setdefault(name, set()).update(values) + + @classmethod + def load_utilities_from_file(cls, path): + utilities = cls._utility_cache.get(path) + if utilities: + return utilities + + filename = os.path.join(get_utility_dir(), path) + _, ext = os.path.splitext(path) + if ext in ('.pyx', '.py', '.pxd', '.pxi'): + comment = '#' + strip_comments = partial(re.compile(r'^\s*#(?!\s*cython\s*:).*').sub, '') + rstrip = StringEncoding._unicode.rstrip + else: + comment = '/' + strip_comments = partial(re.compile(r'^\s*//.*|/\*[^*]*\*/').sub, '') + rstrip = partial(re.compile(r'\s+(\\?)$').sub, r'\1') + match_special = re.compile( + (r'^%(C)s{5,30}\s*(?P(?:\w|\.)+)\s*%(C)s{5,30}|' + r'^%(C)s+@(?P\w+)\s*:\s*(?P(?:\w|[.:])+)') % + {'C': comment}).match + match_type = re.compile(r'(.+)[.](proto(?:[.]\S+)?|impl|init|cleanup)$').match + + with closing(Utils.open_source_file(filename, encoding='UTF-8')) as f: + all_lines = f.readlines() + + utilities = defaultdict(lambda: [None, None, {}]) + lines = [] + tags = defaultdict(set) + utility = type = None + begin_lineno = 0 + + for lineno, line in enumerate(all_lines): + m = match_special(line) + if m: + if m.group('name'): + cls._add_utility(utility, type, lines, begin_lineno, tags) + + begin_lineno = lineno + 1 + del lines[:] + tags.clear() + + name = m.group('name') + mtype = match_type(name) + if mtype: + name, type = mtype.groups() + else: + type = 'impl' + utility = utilities[name] + else: + tags[m.group('tag')].add(m.group('value')) + lines.append('') # keep line number correct + else: + lines.append(rstrip(strip_comments(line))) + + if utility is None: + raise ValueError("Empty utility code file") + + # Don't forget to add the last utility code + cls._add_utility(utility, type, lines, begin_lineno, tags) + + utilities = dict(utilities) # un-defaultdict-ify + cls._utility_cache[path] = utilities + return utilities + + @classmethod + def load(cls, util_code_name, from_file=None, **kwargs): + """ + Load utility code from a file specified by from_file (relative to + Cython/Utility) and name util_code_name. If from_file is not given, + load it from the file util_code_name.*. There should be only one + file matched by this pattern. + """ + if '::' in util_code_name: + from_file, util_code_name = util_code_name.rsplit('::', 1) + if not from_file: + utility_dir = get_utility_dir() + prefix = util_code_name + '.' + try: + listing = os.listdir(utility_dir) + except OSError: + # XXX the code below assumes as 'zipimport.zipimporter' instance + # XXX should be easy to generalize, but too lazy right now to write it + import zipfile + global __loader__ + loader = __loader__ + archive = loader.archive + with closing(zipfile.ZipFile(archive)) as fileobj: + listing = [os.path.basename(name) + for name in fileobj.namelist() + if os.path.join(archive, name).startswith(utility_dir)] + files = [filename for filename in listing + if filename.startswith(prefix)] + if not files: + raise ValueError("No match found for utility code " + util_code_name) + if len(files) > 1: + raise ValueError("More than one filename match found for utility code " + util_code_name) + from_file = files[0] + + utilities = cls.load_utilities_from_file(from_file) + proto, impl, tags = utilities[util_code_name] + + if tags: + orig_kwargs = kwargs.copy() + for name, values in tags.items(): + if name in kwargs: + continue + # only pass lists when we have to: most argument expect one value or None + if name == 'requires': + if orig_kwargs: + values = [cls.load(dep, from_file, **orig_kwargs) + for dep in sorted(values)] + else: + # dependencies are rarely unique, so use load_cached() when we can + values = [cls.load_cached(dep, from_file) + for dep in sorted(values)] + elif not values: + values = None + elif len(values) == 1: + values = list(values)[0] + kwargs[name] = values + + if proto is not None: + kwargs['proto'] = proto + if impl is not None: + kwargs['impl'] = impl + + if 'name' not in kwargs: + kwargs['name'] = util_code_name + + if 'file' not in kwargs and from_file: + kwargs['file'] = from_file + return cls(**kwargs) + + @classmethod + def load_cached(cls, utility_code_name, from_file=None, __cache={}): + """ + Calls .load(), but using a per-type cache based on utility name and file name. + """ + key = (cls, from_file, utility_code_name) + try: + return __cache[key] + except KeyError: + pass + code = __cache[key] = cls.load(utility_code_name, from_file) + return code + + @classmethod + def load_as_string(cls, util_code_name, from_file=None, **kwargs): + """ + Load a utility code as a string. Returns (proto, implementation) + """ + util = cls.load(util_code_name, from_file, **kwargs) + proto, impl = util.proto, util.impl + return util.format_code(proto), util.format_code(impl) + + def format_code(self, code_string, replace_empty_lines=re.compile(r'\n\n+').sub): + """ + Format a code section for output. + """ + if code_string: + code_string = replace_empty_lines('\n', code_string.strip()) + '\n\n' + return code_string + + def __str__(self): + return "<%s(%s)>" % (type(self).__name__, self.name) + + def get_tree(self, **kwargs): + pass + + def __deepcopy__(self, memodict=None): + # No need to deep-copy utility code since it's essentially immutable. + return self + + +class UtilityCode(UtilityCodeBase): + """ + Stores utility code to add during code generation. + + See GlobalState.put_utility_code. + + hashes/equals by instance + + proto C prototypes + impl implementation code + init code to call on module initialization + requires utility code dependencies + proto_block the place in the resulting file where the prototype should + end up + name name of the utility code (or None) + file filename of the utility code file this utility was loaded + from (or None) + """ + + def __init__(self, proto=None, impl=None, init=None, cleanup=None, requires=None, + proto_block='utility_code_proto', name=None, file=None): + # proto_block: Which code block to dump prototype in. See GlobalState. + self.proto = proto + self.impl = impl + self.init = init + self.cleanup = cleanup + self.requires = requires + self._cache = {} + self.specialize_list = [] + self.proto_block = proto_block + self.name = name + self.file = file + + def __hash__(self): + return hash((self.proto, self.impl)) + + def __eq__(self, other): + if self is other: + return True + self_type, other_type = type(self), type(other) + if self_type is not other_type and not (isinstance(other, self_type) or isinstance(self, other_type)): + return False + + self_proto = getattr(self, 'proto', None) + other_proto = getattr(other, 'proto', None) + return (self_proto, self.impl) == (other_proto, other.impl) + + def none_or_sub(self, s, context): + """ + Format a string in this utility code with context. If None, do nothing. + """ + if s is None: + return None + return s % context + + def specialize(self, pyrex_type=None, **data): + # Dicts aren't hashable... + name = self.name + if pyrex_type is not None: + data['type'] = pyrex_type.empty_declaration_code() + data['type_name'] = pyrex_type.specialization_name() + name = "%s[%s]" % (name, data['type_name']) + key = tuple(sorted(data.items())) + try: + return self._cache[key] + except KeyError: + if self.requires is None: + requires = None + else: + requires = [r.specialize(data) for r in self.requires] + + s = self._cache[key] = UtilityCode( + self.none_or_sub(self.proto, data), + self.none_or_sub(self.impl, data), + self.none_or_sub(self.init, data), + self.none_or_sub(self.cleanup, data), + requires, + self.proto_block, + name, + ) + + self.specialize_list.append(s) + return s + + def inject_string_constants(self, impl, output): + """Replace 'PYIDENT("xyz")' by a constant Python identifier cname. + """ + if 'PYIDENT(' not in impl and 'PYUNICODE(' not in impl: + return False, impl + + replacements = {} + def externalise(matchobj): + key = matchobj.groups() + try: + cname = replacements[key] + except KeyError: + str_type, name = key + cname = replacements[key] = output.get_py_string_const( + StringEncoding.EncodedString(name), identifier=str_type == 'IDENT').cname + return cname + + impl = re.sub(r'PY(IDENT|UNICODE)\("([^"]+)"\)', externalise, impl) + assert 'PYIDENT(' not in impl and 'PYUNICODE(' not in impl + return True, impl + + def inject_unbound_methods(self, impl, output): + """Replace 'UNBOUND_METHOD(type, "name")' by a constant Python identifier cname. + """ + if 'CALL_UNBOUND_METHOD(' not in impl: + return False, impl + + def externalise(matchobj): + type_cname, method_name, obj_cname, args = matchobj.groups() + args = [arg.strip() for arg in args[1:].split(',')] if args else [] + assert len(args) < 3, "CALL_UNBOUND_METHOD() does not support %d call arguments" % len(args) + return output.cached_unbound_method_call_code(obj_cname, type_cname, method_name, args) + + impl = re.sub( + r'CALL_UNBOUND_METHOD\(' + r'([a-zA-Z_]+),' # type cname + r'\s*"([^"]+)",' # method name + r'\s*([^),]+)' # object cname + r'((?:,\s*[^),]+)*)' # args* + r'\)', externalise, impl) + assert 'CALL_UNBOUND_METHOD(' not in impl + + return True, impl + + def wrap_c_strings(self, impl): + """Replace CSTRING('''xyz''') by a C compatible string + """ + if 'CSTRING(' not in impl: + return impl + + def split_string(matchobj): + content = matchobj.group(1).replace('"', '\042') + return ''.join( + '"%s\\n"\n' % line if not line.endswith('\\') or line.endswith('\\\\') else '"%s"\n' % line[:-1] + for line in content.splitlines()) + + impl = re.sub(r'CSTRING\(\s*"""([^"]*(?:"[^"]+)*)"""\s*\)', split_string, impl) + assert 'CSTRING(' not in impl + return impl + + def put_code(self, output): + if self.requires: + for dependency in self.requires: + output.use_utility_code(dependency) + if self.proto: + writer = output[self.proto_block] + writer.putln("/* %s.proto */" % self.name) + writer.put_or_include( + self.format_code(self.proto), '%s_proto' % self.name) + if self.impl: + impl = self.format_code(self.wrap_c_strings(self.impl)) + is_specialised1, impl = self.inject_string_constants(impl, output) + is_specialised2, impl = self.inject_unbound_methods(impl, output) + writer = output['utility_code_def'] + writer.putln("/* %s */" % self.name) + if not (is_specialised1 or is_specialised2): + # no module specific adaptations => can be reused + writer.put_or_include(impl, '%s_impl' % self.name) + else: + writer.put(impl) + if self.init: + writer = output['init_globals'] + writer.putln("/* %s.init */" % self.name) + if isinstance(self.init, basestring): + writer.put(self.format_code(self.init)) + else: + self.init(writer, output.module_pos) + writer.putln(writer.error_goto_if_PyErr(output.module_pos)) + writer.putln() + if self.cleanup and Options.generate_cleanup_code: + writer = output['cleanup_globals'] + writer.putln("/* %s.cleanup */" % self.name) + if isinstance(self.cleanup, basestring): + writer.put_or_include( + self.format_code(self.cleanup), + '%s_cleanup' % self.name) + else: + self.cleanup(writer, output.module_pos) + + +def sub_tempita(s, context, file=None, name=None): + "Run tempita on string s with given context." + if not s: + return None + + if file: + context['__name'] = "%s:%s" % (file, name) + elif name: + context['__name'] = name + + from ..Tempita import sub + return sub(s, **context) + + +class TempitaUtilityCode(UtilityCode): + def __init__(self, name=None, proto=None, impl=None, init=None, file=None, context=None, **kwargs): + if context is None: + context = {} + proto = sub_tempita(proto, context, file, name) + impl = sub_tempita(impl, context, file, name) + init = sub_tempita(init, context, file, name) + super(TempitaUtilityCode, self).__init__( + proto, impl, init=init, name=name, file=file, **kwargs) + + @classmethod + def load_cached(cls, utility_code_name, from_file=None, context=None, __cache={}): + context_key = tuple(sorted(context.items())) if context else None + assert hash(context_key) is not None # raise TypeError if not hashable + key = (cls, from_file, utility_code_name, context_key) + try: + return __cache[key] + except KeyError: + pass + code = __cache[key] = cls.load(utility_code_name, from_file, context=context) + return code + + def none_or_sub(self, s, context): + """ + Format a string in this utility code with context. If None, do nothing. + """ + if s is None: + return None + return sub_tempita(s, context, self.file, self.name) + + +class LazyUtilityCode(UtilityCodeBase): + """ + Utility code that calls a callback with the root code writer when + available. Useful when you only have 'env' but not 'code'. + """ + __name__ = '' + requires = None + + def __init__(self, callback): + self.callback = callback + + def put_code(self, globalstate): + utility = self.callback(globalstate.rootwriter) + globalstate.use_utility_code(utility) + + +class FunctionState(object): + # return_label string function return point label + # error_label string error catch point label + # continue_label string loop continue point label + # break_label string loop break point label + # return_from_error_cleanup_label string + # label_counter integer counter for naming labels + # in_try_finally boolean inside try of try...finally + # exc_vars (string * 3) exception variables for reraise, or None + # can_trace boolean line tracing is supported in the current context + # scope Scope the scope object of the current function + + # Not used for now, perhaps later + def __init__(self, owner, names_taken=set(), scope=None): + self.names_taken = names_taken + self.owner = owner + self.scope = scope + + self.error_label = None + self.label_counter = 0 + self.labels_used = set() + self.return_label = self.new_label() + self.new_error_label() + self.continue_label = None + self.break_label = None + self.yield_labels = [] + + self.in_try_finally = 0 + self.exc_vars = None + self.current_except = None + self.can_trace = False + self.gil_owned = True + + self.temps_allocated = [] # of (name, type, manage_ref, static) + self.temps_free = {} # (type, manage_ref) -> list of free vars with same type/managed status + self.temps_used_type = {} # name -> (type, manage_ref) + self.zombie_temps = set() # temps that must not be reused after release + self.temp_counter = 0 + self.closure_temps = None + + # This is used to collect temporaries, useful to find out which temps + # need to be privatized in parallel sections + self.collect_temps_stack = [] + + # This is used for the error indicator, which needs to be local to the + # function. It used to be global, which relies on the GIL being held. + # However, exceptions may need to be propagated through 'nogil' + # sections, in which case we introduce a race condition. + self.should_declare_error_indicator = False + self.uses_error_indicator = False + + # safety checks + + def validate_exit(self): + # validate that all allocated temps have been freed + if self.temps_allocated: + leftovers = self.temps_in_use() + if leftovers: + msg = "TEMPGUARD: Temps left over at end of '%s': %s" % (self.scope.name, ', '.join([ + '%s [%s]' % (name, ctype) + for name, ctype, is_pytemp in sorted(leftovers)]), + ) + #print(msg) + raise RuntimeError(msg) + + # labels + + def new_label(self, name=None): + n = self.label_counter + self.label_counter = n + 1 + label = "%s%d" % (Naming.label_prefix, n) + if name is not None: + label += '_' + name + return label + + def new_yield_label(self, expr_type='yield'): + label = self.new_label('resume_from_%s' % expr_type) + num_and_label = (len(self.yield_labels) + 1, label) + self.yield_labels.append(num_and_label) + return num_and_label + + def new_error_label(self): + old_err_lbl = self.error_label + self.error_label = self.new_label('error') + return old_err_lbl + + def get_loop_labels(self): + return ( + self.continue_label, + self.break_label) + + def set_loop_labels(self, labels): + (self.continue_label, + self.break_label) = labels + + def new_loop_labels(self): + old_labels = self.get_loop_labels() + self.set_loop_labels( + (self.new_label("continue"), + self.new_label("break"))) + return old_labels + + def get_all_labels(self): + return ( + self.continue_label, + self.break_label, + self.return_label, + self.error_label) + + def set_all_labels(self, labels): + (self.continue_label, + self.break_label, + self.return_label, + self.error_label) = labels + + def all_new_labels(self): + old_labels = self.get_all_labels() + new_labels = [] + for old_label, name in zip(old_labels, ['continue', 'break', 'return', 'error']): + if old_label: + new_labels.append(self.new_label(name)) + else: + new_labels.append(old_label) + self.set_all_labels(new_labels) + return old_labels + + def use_label(self, lbl): + self.labels_used.add(lbl) + + def label_used(self, lbl): + return lbl in self.labels_used + + # temp handling + + def allocate_temp(self, type, manage_ref, static=False, reusable=True): + """ + Allocates a temporary (which may create a new one or get a previously + allocated and released one of the same type). Type is simply registered + and handed back, but will usually be a PyrexType. + + If type.is_pyobject, manage_ref comes into play. If manage_ref is set to + True, the temp will be decref-ed on return statements and in exception + handling clauses. Otherwise the caller has to deal with any reference + counting of the variable. + + If not type.is_pyobject, then manage_ref will be ignored, but it + still has to be passed. It is recommended to pass False by convention + if it is known that type will never be a Python object. + + static=True marks the temporary declaration with "static". + This is only used when allocating backing store for a module-level + C array literals. + + if reusable=False, the temp will not be reused after release. + + A C string referring to the variable is returned. + """ + if type.is_const and not type.is_reference: + type = type.const_base_type + elif type.is_reference and not type.is_fake_reference: + type = type.ref_base_type + elif type.is_cfunction: + from . import PyrexTypes + type = PyrexTypes.c_ptr_type(type) # A function itself isn't an l-value + if not type.is_pyobject and not type.is_memoryviewslice: + # Make manage_ref canonical, so that manage_ref will always mean + # a decref is needed. + manage_ref = False + + freelist = self.temps_free.get((type, manage_ref)) + if reusable and freelist is not None and freelist[0]: + result = freelist[0].pop() + freelist[1].remove(result) + else: + while True: + self.temp_counter += 1 + result = "%s%d" % (Naming.codewriter_temp_prefix, self.temp_counter) + if result not in self.names_taken: break + self.temps_allocated.append((result, type, manage_ref, static)) + if not reusable: + self.zombie_temps.add(result) + self.temps_used_type[result] = (type, manage_ref) + if DebugFlags.debug_temp_code_comments: + self.owner.putln("/* %s allocated (%s)%s */" % (result, type, "" if reusable else " - zombie")) + + if self.collect_temps_stack: + self.collect_temps_stack[-1].add((result, type)) + + return result + + def release_temp(self, name): + """ + Releases a temporary so that it can be reused by other code needing + a temp of the same type. + """ + type, manage_ref = self.temps_used_type[name] + freelist = self.temps_free.get((type, manage_ref)) + if freelist is None: + freelist = ([], set()) # keep order in list and make lookups in set fast + self.temps_free[(type, manage_ref)] = freelist + if name in freelist[1]: + raise RuntimeError("Temp %s freed twice!" % name) + if name not in self.zombie_temps: + freelist[0].append(name) + freelist[1].add(name) + if DebugFlags.debug_temp_code_comments: + self.owner.putln("/* %s released %s*/" % ( + name, " - zombie" if name in self.zombie_temps else "")) + + def temps_in_use(self): + """Return a list of (cname,type,manage_ref) tuples of temp names and their type + that are currently in use. + """ + used = [] + for name, type, manage_ref, static in self.temps_allocated: + freelist = self.temps_free.get((type, manage_ref)) + if freelist is None or name not in freelist[1]: + used.append((name, type, manage_ref and type.is_pyobject)) + return used + + def temps_holding_reference(self): + """Return a list of (cname,type) tuples of temp names and their type + that are currently in use. This includes only temps of a + Python object type which owns its reference. + """ + return [(name, type) + for name, type, manage_ref in self.temps_in_use() + if manage_ref and type.is_pyobject] + + def all_managed_temps(self): + """Return a list of (cname, type) tuples of refcount-managed Python objects. + """ + return [(cname, type) + for cname, type, manage_ref, static in self.temps_allocated + if manage_ref] + + def all_free_managed_temps(self): + """Return a list of (cname, type) tuples of refcount-managed Python + objects that are not currently in use. This is used by + try-except and try-finally blocks to clean up temps in the + error case. + """ + return sorted([ # Enforce deterministic order. + (cname, type) + for (type, manage_ref), freelist in self.temps_free.items() if manage_ref + for cname in freelist[0] + ]) + + def start_collecting_temps(self): + """ + Useful to find out which temps were used in a code block + """ + self.collect_temps_stack.append(set()) + + def stop_collecting_temps(self): + return self.collect_temps_stack.pop() + + def init_closure_temps(self, scope): + self.closure_temps = ClosureTempAllocator(scope) + + +class NumConst(object): + """Global info about a Python number constant held by GlobalState. + + cname string + value string + py_type string int, long, float + value_code string evaluation code if different from value + """ + + def __init__(self, cname, value, py_type, value_code=None): + self.cname = cname + self.value = value + self.py_type = py_type + self.value_code = value_code or value + + +class PyObjectConst(object): + """Global info about a generic constant held by GlobalState. + """ + # cname string + # type PyrexType + + def __init__(self, cname, type): + self.cname = cname + self.type = type + + +cython.declare(possible_unicode_identifier=object, possible_bytes_identifier=object, + replace_identifier=object, find_alphanums=object) +possible_unicode_identifier = re.compile(br"(?![0-9])\w+$".decode('ascii'), re.U).match +possible_bytes_identifier = re.compile(r"(?![0-9])\w+$".encode('ASCII')).match +replace_identifier = re.compile(r'[^a-zA-Z0-9_]+').sub +find_alphanums = re.compile('([a-zA-Z0-9]+)').findall + +class StringConst(object): + """Global info about a C string constant held by GlobalState. + """ + # cname string + # text EncodedString or BytesLiteral + # py_strings {(identifier, encoding) : PyStringConst} + + def __init__(self, cname, text, byte_string): + self.cname = cname + self.text = text + self.escaped_value = StringEncoding.escape_byte_string(byte_string) + self.py_strings = None + self.py_versions = [] + + def add_py_version(self, version): + if not version: + self.py_versions = [2, 3] + elif version not in self.py_versions: + self.py_versions.append(version) + + def get_py_string_const(self, encoding, identifier=None, + is_str=False, py3str_cstring=None): + py_strings = self.py_strings + text = self.text + + is_str = bool(identifier or is_str) + is_unicode = encoding is None and not is_str + + if encoding is None: + # unicode string + encoding_key = None + else: + # bytes or str + encoding = encoding.lower() + if encoding in ('utf8', 'utf-8', 'ascii', 'usascii', 'us-ascii'): + encoding = None + encoding_key = None + else: + encoding_key = ''.join(find_alphanums(encoding)) + + key = (is_str, is_unicode, encoding_key, py3str_cstring) + if py_strings is not None: + try: + return py_strings[key] + except KeyError: + pass + else: + self.py_strings = {} + + if identifier: + intern = True + elif identifier is None: + if isinstance(text, bytes): + intern = bool(possible_bytes_identifier(text)) + else: + intern = bool(possible_unicode_identifier(text)) + else: + intern = False + if intern: + prefix = Naming.interned_prefixes['str'] + else: + prefix = Naming.py_const_prefix + + if encoding_key: + encoding_prefix = '_%s' % encoding_key + else: + encoding_prefix = '' + + pystring_cname = "%s%s%s_%s" % ( + prefix, + (is_str and 's') or (is_unicode and 'u') or 'b', + encoding_prefix, + self.cname[len(Naming.const_prefix):]) + + py_string = PyStringConst( + pystring_cname, encoding, is_unicode, is_str, py3str_cstring, intern) + self.py_strings[key] = py_string + return py_string + +class PyStringConst(object): + """Global info about a Python string constant held by GlobalState. + """ + # cname string + # py3str_cstring string + # encoding string + # intern boolean + # is_unicode boolean + # is_str boolean + + def __init__(self, cname, encoding, is_unicode, is_str=False, + py3str_cstring=None, intern=False): + self.cname = cname + self.py3str_cstring = py3str_cstring + self.encoding = encoding + self.is_str = is_str + self.is_unicode = is_unicode + self.intern = intern + + def __lt__(self, other): + return self.cname < other.cname + + +class GlobalState(object): + # filename_table {string : int} for finding filename table indexes + # filename_list [string] filenames in filename table order + # input_file_contents dict contents (=list of lines) of any file that was used as input + # to create this output C code. This is + # used to annotate the comments. + # + # utility_codes set IDs of used utility code (to avoid reinsertion) + # + # declared_cnames {string:Entry} used in a transition phase to merge pxd-declared + # constants etc. into the pyx-declared ones (i.e, + # check if constants are already added). + # In time, hopefully the literals etc. will be + # supplied directly instead. + # + # const_cnames_used dict global counter for unique constant identifiers + # + + # parts {string:CCodeWriter} + + + # interned_strings + # consts + # interned_nums + + # directives set Temporary variable used to track + # the current set of directives in the code generation + # process. + + directives = {} + + code_layout = [ + 'h_code', + 'filename_table', + 'utility_code_proto_before_types', + 'numeric_typedefs', # Let these detailed individual parts stay!, + 'complex_type_declarations', # as the proper solution is to make a full DAG... + 'type_declarations', # More coarse-grained blocks would simply hide + 'utility_code_proto', # the ugliness, not fix it + 'module_declarations', + 'typeinfo', + 'before_global_var', + 'global_var', + 'string_decls', + 'decls', + 'late_includes', + 'all_the_rest', + 'pystring_table', + 'cached_builtins', + 'cached_constants', + 'init_globals', + 'init_module', + 'cleanup_globals', + 'cleanup_module', + 'main_method', + 'utility_code_def', + 'end' + ] + + + def __init__(self, writer, module_node, code_config, common_utility_include_dir=None): + self.filename_table = {} + self.filename_list = [] + self.input_file_contents = {} + self.utility_codes = set() + self.declared_cnames = {} + self.in_utility_code_generation = False + self.code_config = code_config + self.common_utility_include_dir = common_utility_include_dir + self.parts = {} + self.module_node = module_node # because some utility code generation needs it + # (generating backwards-compatible Get/ReleaseBuffer + + self.const_cnames_used = {} + self.string_const_index = {} + self.dedup_const_index = {} + self.pyunicode_ptr_const_index = {} + self.num_const_index = {} + self.py_constants = [] + self.cached_cmethods = {} + self.initialised_constants = set() + + writer.set_global_state(self) + self.rootwriter = writer + + def initialize_main_c_code(self): + rootwriter = self.rootwriter + for part in self.code_layout: + self.parts[part] = rootwriter.insertion_point() + + if not Options.cache_builtins: + del self.parts['cached_builtins'] + else: + w = self.parts['cached_builtins'] + w.enter_cfunc_scope() + w.putln("static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {") + + w = self.parts['cached_constants'] + w.enter_cfunc_scope() + w.putln("") + w.putln("static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {") + w.put_declare_refcount_context() + w.put_setup_refcount_context("__Pyx_InitCachedConstants") + + w = self.parts['init_globals'] + w.enter_cfunc_scope() + w.putln("") + w.putln("static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {") + + if not Options.generate_cleanup_code: + del self.parts['cleanup_globals'] + else: + w = self.parts['cleanup_globals'] + w.enter_cfunc_scope() + w.putln("") + w.putln("static CYTHON_SMALL_CODE void __Pyx_CleanupGlobals(void) {") + + code = self.parts['utility_code_proto'] + code.putln("") + code.putln("/* --- Runtime support code (head) --- */") + + code = self.parts['utility_code_def'] + if self.code_config.emit_linenums: + code.write('\n#line 1 "cython_utility"\n') + code.putln("") + code.putln("/* --- Runtime support code --- */") + + def finalize_main_c_code(self): + self.close_global_decls() + + # + # utility_code_def + # + code = self.parts['utility_code_def'] + util = TempitaUtilityCode.load_cached("TypeConversions", "TypeConversion.c") + code.put(util.format_code(util.impl)) + code.putln("") + + def __getitem__(self, key): + return self.parts[key] + + # + # Global constants, interned objects, etc. + # + def close_global_decls(self): + # This is called when it is known that no more global declarations will + # declared. + self.generate_const_declarations() + if Options.cache_builtins: + w = self.parts['cached_builtins'] + w.putln("return 0;") + if w.label_used(w.error_label): + w.put_label(w.error_label) + w.putln("return -1;") + w.putln("}") + w.exit_cfunc_scope() + + w = self.parts['cached_constants'] + w.put_finish_refcount_context() + w.putln("return 0;") + if w.label_used(w.error_label): + w.put_label(w.error_label) + w.put_finish_refcount_context() + w.putln("return -1;") + w.putln("}") + w.exit_cfunc_scope() + + w = self.parts['init_globals'] + w.putln("return 0;") + if w.label_used(w.error_label): + w.put_label(w.error_label) + w.putln("return -1;") + w.putln("}") + w.exit_cfunc_scope() + + if Options.generate_cleanup_code: + w = self.parts['cleanup_globals'] + w.putln("}") + w.exit_cfunc_scope() + + if Options.generate_cleanup_code: + w = self.parts['cleanup_module'] + w.putln("}") + w.exit_cfunc_scope() + + def put_pyobject_decl(self, entry): + self['global_var'].putln("static PyObject *%s;" % entry.cname) + + # constant handling at code generation time + + def get_cached_constants_writer(self, target=None): + if target is not None: + if target in self.initialised_constants: + # Return None on second/later calls to prevent duplicate creation code. + return None + self.initialised_constants.add(target) + return self.parts['cached_constants'] + + def get_int_const(self, str_value, longness=False): + py_type = longness and 'long' or 'int' + try: + c = self.num_const_index[(str_value, py_type)] + except KeyError: + c = self.new_num_const(str_value, py_type) + return c + + def get_float_const(self, str_value, value_code): + try: + c = self.num_const_index[(str_value, 'float')] + except KeyError: + c = self.new_num_const(str_value, 'float', value_code) + return c + + def get_py_const(self, type, prefix='', cleanup_level=None, dedup_key=None): + if dedup_key is not None: + const = self.dedup_const_index.get(dedup_key) + if const is not None: + return const + # create a new Python object constant + const = self.new_py_const(type, prefix) + if cleanup_level is not None \ + and cleanup_level <= Options.generate_cleanup_code: + cleanup_writer = self.parts['cleanup_globals'] + cleanup_writer.putln('Py_CLEAR(%s);' % const.cname) + if dedup_key is not None: + self.dedup_const_index[dedup_key] = const + return const + + def get_string_const(self, text, py_version=None): + # return a C string constant, creating a new one if necessary + if text.is_unicode: + byte_string = text.utf8encode() + else: + byte_string = text.byteencode() + try: + c = self.string_const_index[byte_string] + except KeyError: + c = self.new_string_const(text, byte_string) + c.add_py_version(py_version) + return c + + def get_pyunicode_ptr_const(self, text): + # return a Py_UNICODE[] constant, creating a new one if necessary + assert text.is_unicode + try: + c = self.pyunicode_ptr_const_index[text] + except KeyError: + c = self.pyunicode_ptr_const_index[text] = self.new_const_cname() + return c + + def get_py_string_const(self, text, identifier=None, + is_str=False, unicode_value=None): + # return a Python string constant, creating a new one if necessary + py3str_cstring = None + if is_str and unicode_value is not None \ + and unicode_value.utf8encode() != text.byteencode(): + py3str_cstring = self.get_string_const(unicode_value, py_version=3) + c_string = self.get_string_const(text, py_version=2) + else: + c_string = self.get_string_const(text) + py_string = c_string.get_py_string_const( + text.encoding, identifier, is_str, py3str_cstring) + return py_string + + def get_interned_identifier(self, text): + return self.get_py_string_const(text, identifier=True) + + def new_string_const(self, text, byte_string): + cname = self.new_string_const_cname(byte_string) + c = StringConst(cname, text, byte_string) + self.string_const_index[byte_string] = c + return c + + def new_num_const(self, value, py_type, value_code=None): + cname = self.new_num_const_cname(value, py_type) + c = NumConst(cname, value, py_type, value_code) + self.num_const_index[(value, py_type)] = c + return c + + def new_py_const(self, type, prefix=''): + cname = self.new_const_cname(prefix) + c = PyObjectConst(cname, type) + self.py_constants.append(c) + return c + + def new_string_const_cname(self, bytes_value): + # Create a new globally-unique nice name for a C string constant. + value = bytes_value.decode('ASCII', 'ignore') + return self.new_const_cname(value=value) + + def new_num_const_cname(self, value, py_type): + if py_type == 'long': + value += 'L' + py_type = 'int' + prefix = Naming.interned_prefixes[py_type] + cname = "%s%s" % (prefix, value) + cname = cname.replace('+', '_').replace('-', 'neg_').replace('.', '_') + return cname + + def new_const_cname(self, prefix='', value=''): + value = replace_identifier('_', value)[:32].strip('_') + used = self.const_cnames_used + name_suffix = value + while name_suffix in used: + counter = used[value] = used[value] + 1 + name_suffix = '%s_%d' % (value, counter) + used[name_suffix] = 1 + if prefix: + prefix = Naming.interned_prefixes[prefix] + else: + prefix = Naming.const_prefix + return "%s%s" % (prefix, name_suffix) + + def get_cached_unbound_method(self, type_cname, method_name): + key = (type_cname, method_name) + try: + cname = self.cached_cmethods[key] + except KeyError: + cname = self.cached_cmethods[key] = self.new_const_cname( + 'umethod', '%s_%s' % (type_cname, method_name)) + return cname + + def cached_unbound_method_call_code(self, obj_cname, type_cname, method_name, arg_cnames): + # admittedly, not the best place to put this method, but it is reused by UtilityCode and ExprNodes ... + utility_code_name = "CallUnboundCMethod%d" % len(arg_cnames) + self.use_utility_code(UtilityCode.load_cached(utility_code_name, "ObjectHandling.c")) + cache_cname = self.get_cached_unbound_method(type_cname, method_name) + args = [obj_cname] + arg_cnames + return "__Pyx_%s(&%s, %s)" % ( + utility_code_name, + cache_cname, + ', '.join(args), + ) + + def add_cached_builtin_decl(self, entry): + if entry.is_builtin and entry.is_const: + if self.should_declare(entry.cname, entry): + self.put_pyobject_decl(entry) + w = self.parts['cached_builtins'] + condition = None + if entry.name in non_portable_builtins_map: + condition, replacement = non_portable_builtins_map[entry.name] + w.putln('#if %s' % condition) + self.put_cached_builtin_init( + entry.pos, StringEncoding.EncodedString(replacement), + entry.cname) + w.putln('#else') + self.put_cached_builtin_init( + entry.pos, StringEncoding.EncodedString(entry.name), + entry.cname) + if condition: + w.putln('#endif') + + def put_cached_builtin_init(self, pos, name, cname): + w = self.parts['cached_builtins'] + interned_cname = self.get_interned_identifier(name).cname + self.use_utility_code( + UtilityCode.load_cached("GetBuiltinName", "ObjectHandling.c")) + w.putln('%s = __Pyx_GetBuiltinName(%s); if (!%s) %s' % ( + cname, + interned_cname, + cname, + w.error_goto(pos))) + + def generate_const_declarations(self): + self.generate_cached_methods_decls() + self.generate_string_constants() + self.generate_num_constants() + self.generate_object_constant_decls() + + def generate_object_constant_decls(self): + consts = [(len(c.cname), c.cname, c) + for c in self.py_constants] + consts.sort() + decls_writer = self.parts['decls'] + for _, cname, c in consts: + decls_writer.putln( + "static %s;" % c.type.declaration_code(cname)) + + def generate_cached_methods_decls(self): + if not self.cached_cmethods: + return + + decl = self.parts['decls'] + init = self.parts['init_globals'] + cnames = [] + for (type_cname, method_name), cname in sorted(self.cached_cmethods.items()): + cnames.append(cname) + method_name_cname = self.get_interned_identifier(StringEncoding.EncodedString(method_name)).cname + decl.putln('static __Pyx_CachedCFunction %s = {0, &%s, 0, 0, 0};' % ( + cname, method_name_cname)) + # split type reference storage as it might not be static + init.putln('%s.type = (PyObject*)&%s;' % ( + cname, type_cname)) + + if Options.generate_cleanup_code: + cleanup = self.parts['cleanup_globals'] + for cname in cnames: + cleanup.putln("Py_CLEAR(%s.method);" % cname) + + def generate_string_constants(self): + c_consts = [(len(c.cname), c.cname, c) for c in self.string_const_index.values()] + c_consts.sort() + py_strings = [] + + decls_writer = self.parts['string_decls'] + for _, cname, c in c_consts: + conditional = False + if c.py_versions and (2 not in c.py_versions or 3 not in c.py_versions): + conditional = True + decls_writer.putln("#if PY_MAJOR_VERSION %s 3" % ( + (2 in c.py_versions) and '<' or '>=')) + decls_writer.putln('static const char %s[] = "%s";' % ( + cname, StringEncoding.split_string_literal(c.escaped_value))) + if conditional: + decls_writer.putln("#endif") + if c.py_strings is not None: + for py_string in c.py_strings.values(): + py_strings.append((c.cname, len(py_string.cname), py_string)) + + for c, cname in sorted(self.pyunicode_ptr_const_index.items()): + utf16_array, utf32_array = StringEncoding.encode_pyunicode_string(c) + if utf16_array: + # Narrow and wide representations differ + decls_writer.putln("#ifdef Py_UNICODE_WIDE") + decls_writer.putln("static Py_UNICODE %s[] = { %s };" % (cname, utf32_array)) + if utf16_array: + decls_writer.putln("#else") + decls_writer.putln("static Py_UNICODE %s[] = { %s };" % (cname, utf16_array)) + decls_writer.putln("#endif") + + if py_strings: + self.use_utility_code(UtilityCode.load_cached("InitStrings", "StringTools.c")) + py_strings.sort() + w = self.parts['pystring_table'] + w.putln("") + w.putln("static __Pyx_StringTabEntry %s[] = {" % Naming.stringtab_cname) + for c_cname, _, py_string in py_strings: + if not py_string.is_str or not py_string.encoding or \ + py_string.encoding in ('ASCII', 'USASCII', 'US-ASCII', + 'UTF8', 'UTF-8'): + encoding = '0' + else: + encoding = '"%s"' % py_string.encoding.lower() + + decls_writer.putln( + "static PyObject *%s;" % py_string.cname) + if py_string.py3str_cstring: + w.putln("#if PY_MAJOR_VERSION >= 3") + w.putln("{&%s, %s, sizeof(%s), %s, %d, %d, %d}," % ( + py_string.cname, + py_string.py3str_cstring.cname, + py_string.py3str_cstring.cname, + '0', 1, 0, + py_string.intern + )) + w.putln("#else") + w.putln("{&%s, %s, sizeof(%s), %s, %d, %d, %d}," % ( + py_string.cname, + c_cname, + c_cname, + encoding, + py_string.is_unicode, + py_string.is_str, + py_string.intern + )) + if py_string.py3str_cstring: + w.putln("#endif") + w.putln("{0, 0, 0, 0, 0, 0, 0}") + w.putln("};") + + init_globals = self.parts['init_globals'] + init_globals.putln( + "if (__Pyx_InitStrings(%s) < 0) %s;" % ( + Naming.stringtab_cname, + init_globals.error_goto(self.module_pos))) + + def generate_num_constants(self): + consts = [(c.py_type, c.value[0] == '-', len(c.value), c.value, c.value_code, c) + for c in self.num_const_index.values()] + consts.sort() + decls_writer = self.parts['decls'] + init_globals = self.parts['init_globals'] + for py_type, _, _, value, value_code, c in consts: + cname = c.cname + decls_writer.putln("static PyObject *%s;" % cname) + if py_type == 'float': + function = 'PyFloat_FromDouble(%s)' + elif py_type == 'long': + function = 'PyLong_FromString((char *)"%s", 0, 0)' + elif Utils.long_literal(value): + function = 'PyInt_FromString((char *)"%s", 0, 0)' + elif len(value.lstrip('-')) > 4: + function = "PyInt_FromLong(%sL)" + else: + function = "PyInt_FromLong(%s)" + init_globals.putln('%s = %s; %s' % ( + cname, function % value_code, + init_globals.error_goto_if_null(cname, self.module_pos))) + + # The functions below are there in a transition phase only + # and will be deprecated. They are called from Nodes.BlockNode. + # The copy&paste duplication is intentional in order to be able + # to see quickly how BlockNode worked, until this is replaced. + + def should_declare(self, cname, entry): + if cname in self.declared_cnames: + other = self.declared_cnames[cname] + assert str(entry.type) == str(other.type) + assert entry.init == other.init + return False + else: + self.declared_cnames[cname] = entry + return True + + # + # File name state + # + + def lookup_filename(self, source_desc): + entry = source_desc.get_filenametable_entry() + try: + index = self.filename_table[entry] + except KeyError: + index = len(self.filename_list) + self.filename_list.append(source_desc) + self.filename_table[entry] = index + return index + + def commented_file_contents(self, source_desc): + try: + return self.input_file_contents[source_desc] + except KeyError: + pass + source_file = source_desc.get_lines(encoding='ASCII', + error_handling='ignore') + try: + F = [u' * ' + line.rstrip().replace( + u'*/', u'*[inserted by cython to avoid comment closer]/' + ).replace( + u'/*', u'/[inserted by cython to avoid comment start]*' + ) + for line in source_file] + finally: + if hasattr(source_file, 'close'): + source_file.close() + if not F: F.append(u'') + self.input_file_contents[source_desc] = F + return F + + # + # Utility code state + # + + def use_utility_code(self, utility_code): + """ + Adds code to the C file. utility_code should + a) implement __eq__/__hash__ for the purpose of knowing whether the same + code has already been included + b) implement put_code, which takes a globalstate instance + + See UtilityCode. + """ + if utility_code and utility_code not in self.utility_codes: + self.utility_codes.add(utility_code) + utility_code.put_code(self) + + def use_entry_utility_code(self, entry): + if entry is None: + return + if entry.utility_code: + self.use_utility_code(entry.utility_code) + if entry.utility_code_definition: + self.use_utility_code(entry.utility_code_definition) + + +def funccontext_property(func): + name = func.__name__ + attribute_of = operator.attrgetter(name) + def get(self): + return attribute_of(self.funcstate) + def set(self, value): + setattr(self.funcstate, name, value) + return property(get, set) + + +class CCodeConfig(object): + # emit_linenums boolean write #line pragmas? + # emit_code_comments boolean copy the original code into C comments? + # c_line_in_traceback boolean append the c file and line number to the traceback for exceptions? + + def __init__(self, emit_linenums=True, emit_code_comments=True, c_line_in_traceback=True): + self.emit_code_comments = emit_code_comments + self.emit_linenums = emit_linenums + self.c_line_in_traceback = c_line_in_traceback + + +class CCodeWriter(object): + """ + Utility class to output C code. + + When creating an insertion point one must care about the state that is + kept: + - formatting state (level, bol) is cloned and used in insertion points + as well + - labels, temps, exc_vars: One must construct a scope in which these can + exist by calling enter_cfunc_scope/exit_cfunc_scope (these are for + sanity checking and forward compatibility). Created insertion points + looses this scope and cannot access it. + - marker: Not copied to insertion point + - filename_table, filename_list, input_file_contents: All codewriters + coming from the same root share the same instances simultaneously. + """ + + # f file output file + # buffer StringIOTree + + # level int indentation level + # bol bool beginning of line? + # marker string comment to emit before next line + # funcstate FunctionState contains state local to a C function used for code + # generation (labels and temps state etc.) + # globalstate GlobalState contains state global for a C file (input file info, + # utility code, declared constants etc.) + # pyclass_stack list used during recursive code generation to pass information + # about the current class one is in + # code_config CCodeConfig configuration options for the C code writer + + @cython.locals(create_from='CCodeWriter') + def __init__(self, create_from=None, buffer=None, copy_formatting=False): + if buffer is None: buffer = StringIOTree() + self.buffer = buffer + self.last_pos = None + self.last_marked_pos = None + self.pyclass_stack = [] + + self.funcstate = None + self.globalstate = None + self.code_config = None + self.level = 0 + self.call_level = 0 + self.bol = 1 + + if create_from is not None: + # Use same global state + self.set_global_state(create_from.globalstate) + self.funcstate = create_from.funcstate + # Clone formatting state + if copy_formatting: + self.level = create_from.level + self.bol = create_from.bol + self.call_level = create_from.call_level + self.last_pos = create_from.last_pos + self.last_marked_pos = create_from.last_marked_pos + + def create_new(self, create_from, buffer, copy_formatting): + # polymorphic constructor -- very slightly more versatile + # than using __class__ + result = CCodeWriter(create_from, buffer, copy_formatting) + return result + + def set_global_state(self, global_state): + assert self.globalstate is None # prevent overwriting once it's set + self.globalstate = global_state + self.code_config = global_state.code_config + + def copyto(self, f): + self.buffer.copyto(f) + + def getvalue(self): + return self.buffer.getvalue() + + def write(self, s): + # also put invalid markers (lineno 0), to indicate that those lines + # have no Cython source code correspondence + cython_lineno = self.last_marked_pos[1] if self.last_marked_pos else 0 + self.buffer.markers.extend([cython_lineno] * s.count('\n')) + self.buffer.write(s) + + def insertion_point(self): + other = self.create_new(create_from=self, buffer=self.buffer.insertion_point(), copy_formatting=True) + return other + + def new_writer(self): + """ + Creates a new CCodeWriter connected to the same global state, which + can later be inserted using insert. + """ + return CCodeWriter(create_from=self) + + def insert(self, writer): + """ + Inserts the contents of another code writer (created with + the same global state) in the current location. + + It is ok to write to the inserted writer also after insertion. + """ + assert writer.globalstate is self.globalstate + self.buffer.insert(writer.buffer) + + # Properties delegated to function scope + @funccontext_property + def label_counter(self): pass + @funccontext_property + def return_label(self): pass + @funccontext_property + def error_label(self): pass + @funccontext_property + def labels_used(self): pass + @funccontext_property + def continue_label(self): pass + @funccontext_property + def break_label(self): pass + @funccontext_property + def return_from_error_cleanup_label(self): pass + @funccontext_property + def yield_labels(self): pass + + # Functions delegated to function scope + def new_label(self, name=None): return self.funcstate.new_label(name) + def new_error_label(self): return self.funcstate.new_error_label() + def new_yield_label(self, *args): return self.funcstate.new_yield_label(*args) + def get_loop_labels(self): return self.funcstate.get_loop_labels() + def set_loop_labels(self, labels): return self.funcstate.set_loop_labels(labels) + def new_loop_labels(self): return self.funcstate.new_loop_labels() + def get_all_labels(self): return self.funcstate.get_all_labels() + def set_all_labels(self, labels): return self.funcstate.set_all_labels(labels) + def all_new_labels(self): return self.funcstate.all_new_labels() + def use_label(self, lbl): return self.funcstate.use_label(lbl) + def label_used(self, lbl): return self.funcstate.label_used(lbl) + + + def enter_cfunc_scope(self, scope=None): + self.funcstate = FunctionState(self, scope=scope) + + def exit_cfunc_scope(self): + self.funcstate = None + + # constant handling + + def get_py_int(self, str_value, longness): + return self.globalstate.get_int_const(str_value, longness).cname + + def get_py_float(self, str_value, value_code): + return self.globalstate.get_float_const(str_value, value_code).cname + + def get_py_const(self, type, prefix='', cleanup_level=None, dedup_key=None): + return self.globalstate.get_py_const(type, prefix, cleanup_level, dedup_key).cname + + def get_string_const(self, text): + return self.globalstate.get_string_const(text).cname + + def get_pyunicode_ptr_const(self, text): + return self.globalstate.get_pyunicode_ptr_const(text) + + def get_py_string_const(self, text, identifier=None, + is_str=False, unicode_value=None): + return self.globalstate.get_py_string_const( + text, identifier, is_str, unicode_value).cname + + def get_argument_default_const(self, type): + return self.globalstate.get_py_const(type).cname + + def intern(self, text): + return self.get_py_string_const(text) + + def intern_identifier(self, text): + return self.get_py_string_const(text, identifier=True) + + def get_cached_constants_writer(self, target=None): + return self.globalstate.get_cached_constants_writer(target) + + # code generation + + def putln(self, code="", safe=False): + if self.last_pos and self.bol: + self.emit_marker() + if self.code_config.emit_linenums and self.last_marked_pos: + source_desc, line, _ = self.last_marked_pos + self.write('\n#line %s "%s"\n' % (line, source_desc.get_escaped_description())) + if code: + if safe: + self.put_safe(code) + else: + self.put(code) + self.write("\n") + self.bol = 1 + + def mark_pos(self, pos, trace=True): + if pos is None: + return + if self.last_marked_pos and self.last_marked_pos[:2] == pos[:2]: + return + self.last_pos = (pos, trace) + + def emit_marker(self): + pos, trace = self.last_pos + self.last_marked_pos = pos + self.last_pos = None + self.write("\n") + if self.code_config.emit_code_comments: + self.indent() + self.write("/* %s */\n" % self._build_marker(pos)) + if trace and self.funcstate and self.funcstate.can_trace and self.globalstate.directives['linetrace']: + self.indent() + self.write('__Pyx_TraceLine(%d,%d,%s)\n' % ( + pos[1], not self.funcstate.gil_owned, self.error_goto(pos))) + + def _build_marker(self, pos): + source_desc, line, col = pos + assert isinstance(source_desc, SourceDescriptor) + contents = self.globalstate.commented_file_contents(source_desc) + lines = contents[max(0, line-3):line] # line numbers start at 1 + lines[-1] += u' # <<<<<<<<<<<<<<' + lines += contents[line:line+2] + return u'"%s":%d\n%s\n' % (source_desc.get_escaped_description(), line, u'\n'.join(lines)) + + def put_safe(self, code): + # put code, but ignore {} + self.write(code) + self.bol = 0 + + def put_or_include(self, code, name): + include_dir = self.globalstate.common_utility_include_dir + if include_dir and len(code) > 1024: + include_file = "%s_%s.h" % ( + name, hashlib.md5(code.encode('utf8')).hexdigest()) + path = os.path.join(include_dir, include_file) + if not os.path.exists(path): + tmp_path = '%s.tmp%s' % (path, os.getpid()) + with closing(Utils.open_new_file(tmp_path)) as f: + f.write(code) + shutil.move(tmp_path, path) + code = '#include "%s"\n' % path + self.put(code) + + def put(self, code): + fix_indent = False + if "{" in code: + dl = code.count("{") + else: + dl = 0 + if "}" in code: + dl -= code.count("}") + if dl < 0: + self.level += dl + elif dl == 0 and code[0] == "}": + # special cases like "} else {" need a temporary dedent + fix_indent = True + self.level -= 1 + if self.bol: + self.indent() + self.write(code) + self.bol = 0 + if dl > 0: + self.level += dl + elif fix_indent: + self.level += 1 + + def putln_tempita(self, code, **context): + from ..Tempita import sub + self.putln(sub(code, **context)) + + def put_tempita(self, code, **context): + from ..Tempita import sub + self.put(sub(code, **context)) + + def increase_indent(self): + self.level += 1 + + def decrease_indent(self): + self.level -= 1 + + def begin_block(self): + self.putln("{") + self.increase_indent() + + def end_block(self): + self.decrease_indent() + self.putln("}") + + def indent(self): + self.write(" " * self.level) + + def get_py_version_hex(self, pyversion): + return "0x%02X%02X%02X%02X" % (tuple(pyversion) + (0,0,0,0))[:4] + + def put_label(self, lbl): + if lbl in self.funcstate.labels_used: + self.putln("%s:;" % lbl) + + def put_goto(self, lbl): + self.funcstate.use_label(lbl) + self.putln("goto %s;" % lbl) + + def put_var_declaration(self, entry, storage_class="", + dll_linkage=None, definition=True): + #print "Code.put_var_declaration:", entry.name, "definition =", definition ### + if entry.visibility == 'private' and not (definition or entry.defined_in_pxd): + #print "...private and not definition, skipping", entry.cname ### + return + if entry.visibility == "private" and not entry.used: + #print "...private and not used, skipping", entry.cname ### + return + if storage_class: + self.put("%s " % storage_class) + if not entry.cf_used: + self.put('CYTHON_UNUSED ') + self.put(entry.type.declaration_code( + entry.cname, dll_linkage=dll_linkage)) + if entry.init is not None: + self.put_safe(" = %s" % entry.type.literal_code(entry.init)) + elif entry.type.is_pyobject: + self.put(" = NULL") + self.putln(";") + + def put_temp_declarations(self, func_context): + for name, type, manage_ref, static in func_context.temps_allocated: + decl = type.declaration_code(name) + if type.is_pyobject: + self.putln("%s = NULL;" % decl) + elif type.is_memoryviewslice: + from . import MemoryView + self.putln("%s = %s;" % (decl, MemoryView.memslice_entry_init)) + else: + self.putln("%s%s;" % (static and "static " or "", decl)) + + if func_context.should_declare_error_indicator: + if self.funcstate.uses_error_indicator: + unused = '' + else: + unused = 'CYTHON_UNUSED ' + # Initialize these variables to silence compiler warnings + self.putln("%sint %s = 0;" % (unused, Naming.lineno_cname)) + self.putln("%sconst char *%s = NULL;" % (unused, Naming.filename_cname)) + self.putln("%sint %s = 0;" % (unused, Naming.clineno_cname)) + + def put_generated_by(self): + self.putln("/* Generated by Cython %s */" % Version.watermark) + self.putln("") + + def put_h_guard(self, guard): + self.putln("#ifndef %s" % guard) + self.putln("#define %s" % guard) + + def unlikely(self, cond): + if Options.gcc_branch_hints: + return 'unlikely(%s)' % cond + else: + return cond + + def build_function_modifiers(self, modifiers, mapper=modifier_output_mapper): + if not modifiers: + return '' + return '%s ' % ' '.join([mapper(m,m) for m in modifiers]) + + # Python objects and reference counting + + def entry_as_pyobject(self, entry): + type = entry.type + if (not entry.is_self_arg and not entry.type.is_complete() + or entry.type.is_extension_type): + return "(PyObject *)" + entry.cname + else: + return entry.cname + + def as_pyobject(self, cname, type): + from .PyrexTypes import py_object_type, typecast + return typecast(py_object_type, type, cname) + + def put_gotref(self, cname): + self.putln("__Pyx_GOTREF(%s);" % cname) + + def put_giveref(self, cname): + self.putln("__Pyx_GIVEREF(%s);" % cname) + + def put_xgiveref(self, cname): + self.putln("__Pyx_XGIVEREF(%s);" % cname) + + def put_xgotref(self, cname): + self.putln("__Pyx_XGOTREF(%s);" % cname) + + def put_incref(self, cname, type, nanny=True): + if nanny: + self.putln("__Pyx_INCREF(%s);" % self.as_pyobject(cname, type)) + else: + self.putln("Py_INCREF(%s);" % self.as_pyobject(cname, type)) + + def put_decref(self, cname, type, nanny=True): + self._put_decref(cname, type, nanny, null_check=False, clear=False) + + def put_var_gotref(self, entry): + if entry.type.is_pyobject: + self.putln("__Pyx_GOTREF(%s);" % self.entry_as_pyobject(entry)) + + def put_var_giveref(self, entry): + if entry.type.is_pyobject: + self.putln("__Pyx_GIVEREF(%s);" % self.entry_as_pyobject(entry)) + + def put_var_xgotref(self, entry): + if entry.type.is_pyobject: + self.putln("__Pyx_XGOTREF(%s);" % self.entry_as_pyobject(entry)) + + def put_var_xgiveref(self, entry): + if entry.type.is_pyobject: + self.putln("__Pyx_XGIVEREF(%s);" % self.entry_as_pyobject(entry)) + + def put_var_incref(self, entry, nanny=True): + if entry.type.is_pyobject: + if nanny: + self.putln("__Pyx_INCREF(%s);" % self.entry_as_pyobject(entry)) + else: + self.putln("Py_INCREF(%s);" % self.entry_as_pyobject(entry)) + + def put_var_xincref(self, entry): + if entry.type.is_pyobject: + self.putln("__Pyx_XINCREF(%s);" % self.entry_as_pyobject(entry)) + + def put_decref_clear(self, cname, type, nanny=True, clear_before_decref=False): + self._put_decref(cname, type, nanny, null_check=False, + clear=True, clear_before_decref=clear_before_decref) + + def put_xdecref(self, cname, type, nanny=True, have_gil=True): + self._put_decref(cname, type, nanny, null_check=True, + have_gil=have_gil, clear=False) + + def put_xdecref_clear(self, cname, type, nanny=True, clear_before_decref=False): + self._put_decref(cname, type, nanny, null_check=True, + clear=True, clear_before_decref=clear_before_decref) + + def _put_decref(self, cname, type, nanny=True, null_check=False, + have_gil=True, clear=False, clear_before_decref=False): + if type.is_memoryviewslice: + self.put_xdecref_memoryviewslice(cname, have_gil=have_gil) + return + + prefix = '__Pyx' if nanny else 'Py' + X = 'X' if null_check else '' + + if clear: + if clear_before_decref: + if not nanny: + X = '' # CPython doesn't have a Py_XCLEAR() + self.putln("%s_%sCLEAR(%s);" % (prefix, X, cname)) + else: + self.putln("%s_%sDECREF(%s); %s = 0;" % ( + prefix, X, self.as_pyobject(cname, type), cname)) + else: + self.putln("%s_%sDECREF(%s);" % ( + prefix, X, self.as_pyobject(cname, type))) + + def put_decref_set(self, cname, rhs_cname): + self.putln("__Pyx_DECREF_SET(%s, %s);" % (cname, rhs_cname)) + + def put_xdecref_set(self, cname, rhs_cname): + self.putln("__Pyx_XDECREF_SET(%s, %s);" % (cname, rhs_cname)) + + def put_var_decref(self, entry): + if entry.type.is_pyobject: + self.putln("__Pyx_XDECREF(%s);" % self.entry_as_pyobject(entry)) + + def put_var_xdecref(self, entry, nanny=True): + if entry.type.is_pyobject: + if nanny: + self.putln("__Pyx_XDECREF(%s);" % self.entry_as_pyobject(entry)) + else: + self.putln("Py_XDECREF(%s);" % self.entry_as_pyobject(entry)) + + def put_var_decref_clear(self, entry): + self._put_var_decref_clear(entry, null_check=False) + + def put_var_xdecref_clear(self, entry): + self._put_var_decref_clear(entry, null_check=True) + + def _put_var_decref_clear(self, entry, null_check): + if entry.type.is_pyobject: + if entry.in_closure: + # reset before DECREF to make sure closure state is + # consistent during call to DECREF() + self.putln("__Pyx_%sCLEAR(%s);" % ( + null_check and 'X' or '', + entry.cname)) + else: + self.putln("__Pyx_%sDECREF(%s); %s = 0;" % ( + null_check and 'X' or '', + self.entry_as_pyobject(entry), + entry.cname)) + + def put_var_decrefs(self, entries, used_only = 0): + for entry in entries: + if not used_only or entry.used: + if entry.xdecref_cleanup: + self.put_var_xdecref(entry) + else: + self.put_var_decref(entry) + + def put_var_xdecrefs(self, entries): + for entry in entries: + self.put_var_xdecref(entry) + + def put_var_xdecrefs_clear(self, entries): + for entry in entries: + self.put_var_xdecref_clear(entry) + + def put_incref_memoryviewslice(self, slice_cname, have_gil=False): + from . import MemoryView + self.globalstate.use_utility_code(MemoryView.memviewslice_init_code) + self.putln("__PYX_INC_MEMVIEW(&%s, %d);" % (slice_cname, int(have_gil))) + + def put_xdecref_memoryviewslice(self, slice_cname, have_gil=False): + from . import MemoryView + self.globalstate.use_utility_code(MemoryView.memviewslice_init_code) + self.putln("__PYX_XDEC_MEMVIEW(&%s, %d);" % (slice_cname, int(have_gil))) + + def put_xgiveref_memoryviewslice(self, slice_cname): + self.put_xgiveref("%s.memview" % slice_cname) + + def put_init_to_py_none(self, cname, type, nanny=True): + from .PyrexTypes import py_object_type, typecast + py_none = typecast(type, py_object_type, "Py_None") + if nanny: + self.putln("%s = %s; __Pyx_INCREF(Py_None);" % (cname, py_none)) + else: + self.putln("%s = %s; Py_INCREF(Py_None);" % (cname, py_none)) + + def put_init_var_to_py_none(self, entry, template = "%s", nanny=True): + code = template % entry.cname + #if entry.type.is_extension_type: + # code = "((PyObject*)%s)" % code + self.put_init_to_py_none(code, entry.type, nanny) + if entry.in_closure: + self.put_giveref('Py_None') + + def put_pymethoddef(self, entry, term, allow_skip=True, wrapper_code_writer=None): + if entry.is_special or entry.name == '__getattribute__': + if entry.name not in special_py_methods: + if entry.name == '__getattr__' and not self.globalstate.directives['fast_getattr']: + pass + # Python's typeobject.c will automatically fill in our slot + # in add_operators() (called by PyType_Ready) with a value + # that's better than ours. + elif allow_skip: + return + + method_flags = entry.signature.method_flags() + if not method_flags: + return + from . import TypeSlots + if entry.is_special or TypeSlots.is_reverse_number_slot(entry.name): + method_flags += [TypeSlots.method_coexist] + func_ptr = wrapper_code_writer.put_pymethoddef_wrapper(entry) if wrapper_code_writer else entry.func_cname + # Add required casts, but try not to shadow real warnings. + cast = '__Pyx_PyCFunctionFast' if 'METH_FASTCALL' in method_flags else 'PyCFunction' + if 'METH_KEYWORDS' in method_flags: + cast += 'WithKeywords' + if cast != 'PyCFunction': + func_ptr = '(void*)(%s)%s' % (cast, func_ptr) + self.putln( + '{"%s", (PyCFunction)%s, %s, %s}%s' % ( + entry.name, + func_ptr, + "|".join(method_flags), + entry.doc_cname if entry.doc else '0', + term)) + + def put_pymethoddef_wrapper(self, entry): + func_cname = entry.func_cname + if entry.is_special: + method_flags = entry.signature.method_flags() + if method_flags and 'METH_NOARGS' in method_flags: + # Special NOARGS methods really take no arguments besides 'self', but PyCFunction expects one. + func_cname = Naming.method_wrapper_prefix + func_cname + self.putln("static PyObject *%s(PyObject *self, CYTHON_UNUSED PyObject *arg) {return %s(self);}" % ( + func_cname, entry.func_cname)) + return func_cname + + # GIL methods + + def put_ensure_gil(self, declare_gilstate=True, variable=None): + """ + Acquire the GIL. The generated code is safe even when no PyThreadState + has been allocated for this thread (for threads not initialized by + using the Python API). Additionally, the code generated by this method + may be called recursively. + """ + self.globalstate.use_utility_code( + UtilityCode.load_cached("ForceInitThreads", "ModuleSetupCode.c")) + if self.globalstate.directives['fast_gil']: + self.globalstate.use_utility_code(UtilityCode.load_cached("FastGil", "ModuleSetupCode.c")) + else: + self.globalstate.use_utility_code(UtilityCode.load_cached("NoFastGil", "ModuleSetupCode.c")) + self.putln("#ifdef WITH_THREAD") + if not variable: + variable = '__pyx_gilstate_save' + if declare_gilstate: + self.put("PyGILState_STATE ") + self.putln("%s = __Pyx_PyGILState_Ensure();" % variable) + self.putln("#endif") + + def put_release_ensured_gil(self, variable=None): + """ + Releases the GIL, corresponds to `put_ensure_gil`. + """ + if self.globalstate.directives['fast_gil']: + self.globalstate.use_utility_code(UtilityCode.load_cached("FastGil", "ModuleSetupCode.c")) + else: + self.globalstate.use_utility_code(UtilityCode.load_cached("NoFastGil", "ModuleSetupCode.c")) + if not variable: + variable = '__pyx_gilstate_save' + self.putln("#ifdef WITH_THREAD") + self.putln("__Pyx_PyGILState_Release(%s);" % variable) + self.putln("#endif") + + def put_acquire_gil(self, variable=None): + """ + Acquire the GIL. The thread's thread state must have been initialized + by a previous `put_release_gil` + """ + if self.globalstate.directives['fast_gil']: + self.globalstate.use_utility_code(UtilityCode.load_cached("FastGil", "ModuleSetupCode.c")) + else: + self.globalstate.use_utility_code(UtilityCode.load_cached("NoFastGil", "ModuleSetupCode.c")) + self.putln("#ifdef WITH_THREAD") + self.putln("__Pyx_FastGIL_Forget();") + if variable: + self.putln('_save = %s;' % variable) + self.putln("Py_BLOCK_THREADS") + self.putln("#endif") + + def put_release_gil(self, variable=None): + "Release the GIL, corresponds to `put_acquire_gil`." + if self.globalstate.directives['fast_gil']: + self.globalstate.use_utility_code(UtilityCode.load_cached("FastGil", "ModuleSetupCode.c")) + else: + self.globalstate.use_utility_code(UtilityCode.load_cached("NoFastGil", "ModuleSetupCode.c")) + self.putln("#ifdef WITH_THREAD") + self.putln("PyThreadState *_save;") + self.putln("Py_UNBLOCK_THREADS") + if variable: + self.putln('%s = _save;' % variable) + self.putln("__Pyx_FastGIL_Remember();") + self.putln("#endif") + + def declare_gilstate(self): + self.putln("#ifdef WITH_THREAD") + self.putln("PyGILState_STATE __pyx_gilstate_save;") + self.putln("#endif") + + # error handling + + def put_error_if_neg(self, pos, value): + # TODO this path is almost _never_ taken, yet this macro makes is slower! + # return self.putln("if (unlikely(%s < 0)) %s" % (value, self.error_goto(pos))) + return self.putln("if (%s < 0) %s" % (value, self.error_goto(pos))) + + def put_error_if_unbound(self, pos, entry, in_nogil_context=False): + from . import ExprNodes + if entry.from_closure: + func = '__Pyx_RaiseClosureNameError' + self.globalstate.use_utility_code( + ExprNodes.raise_closure_name_error_utility_code) + elif entry.type.is_memoryviewslice and in_nogil_context: + func = '__Pyx_RaiseUnboundMemoryviewSliceNogil' + self.globalstate.use_utility_code( + ExprNodes.raise_unbound_memoryview_utility_code_nogil) + else: + func = '__Pyx_RaiseUnboundLocalError' + self.globalstate.use_utility_code( + ExprNodes.raise_unbound_local_error_utility_code) + + self.putln('if (unlikely(!%s)) { %s("%s"); %s }' % ( + entry.type.check_for_null_code(entry.cname), + func, + entry.name, + self.error_goto(pos))) + + def set_error_info(self, pos, used=False): + self.funcstate.should_declare_error_indicator = True + if used: + self.funcstate.uses_error_indicator = True + return "__PYX_MARK_ERR_POS(%s, %s)" % ( + self.lookup_filename(pos[0]), + pos[1]) + + def error_goto(self, pos, used=True): + lbl = self.funcstate.error_label + self.funcstate.use_label(lbl) + if pos is None: + return 'goto %s;' % lbl + self.funcstate.should_declare_error_indicator = True + if used: + self.funcstate.uses_error_indicator = True + return "__PYX_ERR(%s, %s, %s)" % ( + self.lookup_filename(pos[0]), + pos[1], + lbl) + + def error_goto_if(self, cond, pos): + return "if (%s) %s" % (self.unlikely(cond), self.error_goto(pos)) + + def error_goto_if_null(self, cname, pos): + return self.error_goto_if("!%s" % cname, pos) + + def error_goto_if_neg(self, cname, pos): + return self.error_goto_if("%s < 0" % cname, pos) + + def error_goto_if_PyErr(self, pos): + return self.error_goto_if("PyErr_Occurred()", pos) + + def lookup_filename(self, filename): + return self.globalstate.lookup_filename(filename) + + def put_declare_refcount_context(self): + self.putln('__Pyx_RefNannyDeclarations') + + def put_setup_refcount_context(self, name, acquire_gil=False): + if acquire_gil: + self.globalstate.use_utility_code( + UtilityCode.load_cached("ForceInitThreads", "ModuleSetupCode.c")) + self.putln('__Pyx_RefNannySetupContext("%s", %d);' % (name, acquire_gil and 1 or 0)) + + def put_finish_refcount_context(self): + self.putln("__Pyx_RefNannyFinishContext();") + + def put_add_traceback(self, qualified_name, include_cline=True): + """ + Build a Python traceback for propagating exceptions. + + qualified_name should be the qualified name of the function. + """ + format_tuple = ( + qualified_name, + Naming.clineno_cname if include_cline else 0, + Naming.lineno_cname, + Naming.filename_cname, + ) + self.funcstate.uses_error_indicator = True + self.putln('__Pyx_AddTraceback("%s", %s, %s, %s);' % format_tuple) + + def put_unraisable(self, qualified_name, nogil=False): + """ + Generate code to print a Python warning for an unraisable exception. + + qualified_name should be the qualified name of the function. + """ + format_tuple = ( + qualified_name, + Naming.clineno_cname, + Naming.lineno_cname, + Naming.filename_cname, + self.globalstate.directives['unraisable_tracebacks'], + nogil, + ) + self.funcstate.uses_error_indicator = True + self.putln('__Pyx_WriteUnraisable("%s", %s, %s, %s, %d, %d);' % format_tuple) + self.globalstate.use_utility_code( + UtilityCode.load_cached("WriteUnraisableException", "Exceptions.c")) + + def put_trace_declarations(self): + self.putln('__Pyx_TraceDeclarations') + + def put_trace_frame_init(self, codeobj=None): + if codeobj: + self.putln('__Pyx_TraceFrameInit(%s)' % codeobj) + + def put_trace_call(self, name, pos, nogil=False): + self.putln('__Pyx_TraceCall("%s", %s[%s], %s, %d, %s);' % ( + name, Naming.filetable_cname, self.lookup_filename(pos[0]), pos[1], nogil, self.error_goto(pos))) + + def put_trace_exception(self): + self.putln("__Pyx_TraceException();") + + def put_trace_return(self, retvalue_cname, nogil=False): + self.putln("__Pyx_TraceReturn(%s, %d);" % (retvalue_cname, nogil)) + + def putln_openmp(self, string): + self.putln("#ifdef _OPENMP") + self.putln(string) + self.putln("#endif /* _OPENMP */") + + def undef_builtin_expect(self, cond): + """ + Redefine the macros likely() and unlikely to no-ops, depending on + condition 'cond' + """ + self.putln("#if %s" % cond) + self.putln(" #undef likely") + self.putln(" #undef unlikely") + self.putln(" #define likely(x) (x)") + self.putln(" #define unlikely(x) (x)") + self.putln("#endif") + + def redef_builtin_expect(self, cond): + self.putln("#if %s" % cond) + self.putln(" #undef likely") + self.putln(" #undef unlikely") + self.putln(" #define likely(x) __builtin_expect(!!(x), 1)") + self.putln(" #define unlikely(x) __builtin_expect(!!(x), 0)") + self.putln("#endif") + + +class PyrexCodeWriter(object): + # f file output file + # level int indentation level + + def __init__(self, outfile_name): + self.f = Utils.open_new_file(outfile_name) + self.level = 0 + + def putln(self, code): + self.f.write("%s%s\n" % (" " * self.level, code)) + + def indent(self): + self.level += 1 + + def dedent(self): + self.level -= 1 + +class PyxCodeWriter(object): + """ + Can be used for writing out some Cython code. To use the indenter + functionality, the Cython.Compiler.Importer module will have to be used + to load the code to support python 2.4 + """ + + def __init__(self, buffer=None, indent_level=0, context=None, encoding='ascii'): + self.buffer = buffer or StringIOTree() + self.level = indent_level + self.context = context + self.encoding = encoding + + def indent(self, levels=1): + self.level += levels + return True + + def dedent(self, levels=1): + self.level -= levels + + def indenter(self, line): + """ + Instead of + + with pyx_code.indenter("for i in range(10):"): + pyx_code.putln("print i") + + write + + if pyx_code.indenter("for i in range(10);"): + pyx_code.putln("print i") + pyx_code.dedent() + """ + self.putln(line) + self.indent() + return True + + def getvalue(self): + result = self.buffer.getvalue() + if isinstance(result, bytes): + result = result.decode(self.encoding) + return result + + def putln(self, line, context=None): + context = context or self.context + if context: + line = sub_tempita(line, context) + self._putln(line) + + def _putln(self, line): + self.buffer.write("%s%s\n" % (self.level * " ", line)) + + def put_chunk(self, chunk, context=None): + context = context or self.context + if context: + chunk = sub_tempita(chunk, context) + + chunk = textwrap.dedent(chunk) + for line in chunk.splitlines(): + self._putln(line) + + def insertion_point(self): + return PyxCodeWriter(self.buffer.insertion_point(), self.level, + self.context) + + def named_insertion_point(self, name): + setattr(self, name, self.insertion_point()) + + +class ClosureTempAllocator(object): + def __init__(self, klass): + self.klass = klass + self.temps_allocated = {} + self.temps_free = {} + self.temps_count = 0 + + def reset(self): + for type, cnames in self.temps_allocated.items(): + self.temps_free[type] = list(cnames) + + def allocate_temp(self, type): + if type not in self.temps_allocated: + self.temps_allocated[type] = [] + self.temps_free[type] = [] + elif self.temps_free[type]: + return self.temps_free[type].pop(0) + cname = '%s%d' % (Naming.codewriter_temp_prefix, self.temps_count) + self.klass.declare_var(pos=None, name=cname, cname=cname, type=type, is_cdef=True) + self.temps_allocated[type].append(cname) + self.temps_count += 1 + return cname diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CodeGeneration.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CodeGeneration.py new file mode 100644 index 00000000000..e64049c7f5d --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CodeGeneration.py @@ -0,0 +1,35 @@ +from __future__ import absolute_import + +from .Visitor import VisitorTransform +from .Nodes import StatListNode + + +class ExtractPxdCode(VisitorTransform): + """ + Finds nodes in a pxd file that should generate code, and + returns them in a StatListNode. + + The result is a tuple (StatListNode, ModuleScope), i.e. + everything that is needed from the pxd after it is processed. + + A purer approach would be to separately compile the pxd code, + but the result would have to be slightly more sophisticated + than pure strings (functions + wanted interned strings + + wanted utility code + wanted cached objects) so for now this + approach is taken. + """ + + def __call__(self, root): + self.funcs = [] + self.visitchildren(root) + return (StatListNode(root.pos, stats=self.funcs), root.scope) + + def visit_FuncDefNode(self, node): + self.funcs.append(node) + # Do not visit children, nested funcdefnodes will + # also be moved by this action... + return node + + def visit_Node(self, node): + self.visitchildren(node) + return node diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CythonScope.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CythonScope.py new file mode 100644 index 00000000000..1c25d1a6b4c --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CythonScope.py @@ -0,0 +1,164 @@ +from __future__ import absolute_import + +from .Symtab import ModuleScope +from .PyrexTypes import * +from .UtilityCode import CythonUtilityCode +from .Errors import error +from .Scanning import StringSourceDescriptor +from . import MemoryView + + +class CythonScope(ModuleScope): + is_cython_builtin = 1 + _cythonscope_initialized = False + + def __init__(self, context): + ModuleScope.__init__(self, u'cython', None, None) + self.pxd_file_loaded = True + self.populate_cython_scope() + # The Main.Context object + self.context = context + + for fused_type in (cy_integral_type, cy_floating_type, cy_numeric_type): + entry = self.declare_typedef(fused_type.name, + fused_type, + None, + cname='') + entry.in_cinclude = True + + def is_cpp(self): + # Allow C++ utility code in C++ contexts. + return self.context.cpp + + def lookup_type(self, name): + # This function should go away when types are all first-level objects. + type = parse_basic_type(name) + if type: + return type + + return super(CythonScope, self).lookup_type(name) + + def lookup(self, name): + entry = super(CythonScope, self).lookup(name) + + if entry is None and not self._cythonscope_initialized: + self.load_cythonscope() + entry = super(CythonScope, self).lookup(name) + + return entry + + def find_module(self, module_name, pos): + error("cython.%s is not available" % module_name, pos) + + def find_submodule(self, module_name): + entry = self.entries.get(module_name, None) + if not entry: + self.load_cythonscope() + entry = self.entries.get(module_name, None) + + if entry and entry.as_module: + return entry.as_module + else: + # TODO: fix find_submodule control flow so that we're not + # expected to create a submodule here (to protect CythonScope's + # possible immutability). Hack ourselves out of the situation + # for now. + raise error((StringSourceDescriptor(u"cython", u""), 0, 0), + "cython.%s is not available" % module_name) + + def lookup_qualified_name(self, qname): + # ExprNode.as_cython_attribute generates qnames and we untangle it here... + name_path = qname.split(u'.') + scope = self + while len(name_path) > 1: + scope = scope.lookup_here(name_path[0]) + if scope: + scope = scope.as_module + del name_path[0] + if scope is None: + return None + else: + return scope.lookup_here(name_path[0]) + + def populate_cython_scope(self): + # These are used to optimize isinstance in FinalOptimizePhase + type_object = self.declare_typedef( + 'PyTypeObject', + base_type = c_void_type, + pos = None, + cname = 'PyTypeObject') + type_object.is_void = True + type_object_type = type_object.type + + self.declare_cfunction( + 'PyObject_TypeCheck', + CFuncType(c_bint_type, [CFuncTypeArg("o", py_object_type, None), + CFuncTypeArg("t", c_ptr_type(type_object_type), None)]), + pos = None, + defining = 1, + cname = 'PyObject_TypeCheck') + + def load_cythonscope(self): + """ + Creates some entries for testing purposes and entries for + cython.array() and for cython.view.*. + """ + if self._cythonscope_initialized: + return + + self._cythonscope_initialized = True + cython_testscope_utility_code.declare_in_scope( + self, cython_scope=self) + cython_test_extclass_utility_code.declare_in_scope( + self, cython_scope=self) + + # + # The view sub-scope + # + self.viewscope = viewscope = ModuleScope(u'view', self, None) + self.declare_module('view', viewscope, None).as_module = viewscope + viewscope.is_cython_builtin = True + viewscope.pxd_file_loaded = True + + cythonview_testscope_utility_code.declare_in_scope( + viewscope, cython_scope=self) + + view_utility_scope = MemoryView.view_utility_code.declare_in_scope( + self.viewscope, cython_scope=self, + whitelist=MemoryView.view_utility_whitelist) + + # self.entries["array"] = view_utility_scope.entries.pop("array") + + +def create_cython_scope(context): + # One could in fact probably make it a singleton, + # but not sure yet whether any code mutates it (which would kill reusing + # it across different contexts) + return CythonScope(context) + +# Load test utilities for the cython scope + +def load_testscope_utility(cy_util_name, **kwargs): + return CythonUtilityCode.load(cy_util_name, "TestCythonScope.pyx", **kwargs) + + +undecorated_methods_protos = UtilityCode(proto=u""" + /* These methods are undecorated and have therefore no prototype */ + static PyObject *__pyx_TestClass_cdef_method( + struct __pyx_TestClass_obj *self, int value); + static PyObject *__pyx_TestClass_cpdef_method( + struct __pyx_TestClass_obj *self, int value, int skip_dispatch); + static PyObject *__pyx_TestClass_def_method( + PyObject *self, PyObject *value); +""") + +cython_testscope_utility_code = load_testscope_utility("TestScope") + +test_cython_utility_dep = load_testscope_utility("TestDep") + +cython_test_extclass_utility_code = \ + load_testscope_utility("TestClass", name="TestClass", + requires=[undecorated_methods_protos, + test_cython_utility_dep]) + +cythonview_testscope_utility_code = load_testscope_utility("View.TestScope") diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/DebugFlags.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/DebugFlags.py new file mode 100644 index 00000000000..e830ab1849c --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/DebugFlags.py @@ -0,0 +1,21 @@ +# Can be enabled at the command line with --debug-xxx. + +debug_disposal_code = 0 +debug_temp_alloc = 0 +debug_coercion = 0 + +# Write comments into the C code that show where temporary variables +# are allocated and released. +debug_temp_code_comments = 0 + +# Write a call trace of the code generation phase into the C code. +debug_trace_code_generation = 0 + +# Do not replace exceptions with user-friendly error messages. +debug_no_exception_intercept = 0 + +# Print a message each time a new stage in the pipeline is entered. +debug_verbose_pipeline = 0 + +# Raise an exception when an error is encountered. +debug_exception_on_error = 0 diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Errors.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Errors.py new file mode 100644 index 00000000000..9761b52c32f --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Errors.py @@ -0,0 +1,265 @@ +# +# Errors +# + +from __future__ import absolute_import + +try: + from __builtin__ import basestring as any_string_type +except ImportError: + any_string_type = (bytes, str) + +import sys +from contextlib import contextmanager + +from ..Utils import open_new_file +from . import DebugFlags +from . import Options + + +class PyrexError(Exception): + pass + + +class PyrexWarning(Exception): + pass + + +def context(position): + source = position[0] + assert not (isinstance(source, any_string_type)), ( + "Please replace filename strings with Scanning.FileSourceDescriptor instances %r" % source) + try: + F = source.get_lines() + except UnicodeDecodeError: + # file has an encoding problem + s = u"[unprintable code]\n" + else: + s = u''.join(F[max(0, position[1]-6):position[1]]) + s = u'...\n%s%s^\n' % (s, u' '*(position[2]-1)) + s = u'%s\n%s%s\n' % (u'-'*60, s, u'-'*60) + return s + +def format_position(position): + if position: + return u"%s:%d:%d: " % (position[0].get_error_description(), + position[1], position[2]) + return u'' + +def format_error(message, position): + if position: + pos_str = format_position(position) + cont = context(position) + message = u'\nError compiling Cython file:\n%s\n%s%s' % (cont, pos_str, message or u'') + return message + +class CompileError(PyrexError): + + def __init__(self, position = None, message = u""): + self.position = position + self.message_only = message + self.formatted_message = format_error(message, position) + self.reported = False + # Deprecated and withdrawn in 2.6: + # self.message = message + Exception.__init__(self, self.formatted_message) + # Python Exception subclass pickling is broken, + # see http://bugs.python.org/issue1692335 + self.args = (position, message) + + def __str__(self): + return self.formatted_message + +class CompileWarning(PyrexWarning): + + def __init__(self, position = None, message = ""): + self.position = position + # Deprecated and withdrawn in 2.6: + # self.message = message + Exception.__init__(self, format_position(position) + message) + +class InternalError(Exception): + # If this is ever raised, there is a bug in the compiler. + + def __init__(self, message): + self.message_only = message + Exception.__init__(self, u"Internal compiler error: %s" + % message) + +class AbortError(Exception): + # Throw this to stop the compilation immediately. + + def __init__(self, message): + self.message_only = message + Exception.__init__(self, u"Abort error: %s" % message) + +class CompilerCrash(CompileError): + # raised when an unexpected exception occurs in a transform + def __init__(self, pos, context, message, cause, stacktrace=None): + if message: + message = u'\n' + message + else: + message = u'\n' + self.message_only = message + if context: + message = u"Compiler crash in %s%s" % (context, message) + if stacktrace: + import traceback + message += ( + u'\n\nCompiler crash traceback from this point on:\n' + + u''.join(traceback.format_tb(stacktrace))) + if cause: + if not stacktrace: + message += u'\n' + message += u'%s: %s' % (cause.__class__.__name__, cause) + CompileError.__init__(self, pos, message) + # Python Exception subclass pickling is broken, + # see http://bugs.python.org/issue1692335 + self.args = (pos, context, message, cause, stacktrace) + +class NoElementTreeInstalledException(PyrexError): + """raised when the user enabled options.gdb_debug but no ElementTree + implementation was found + """ + +listing_file = None +num_errors = 0 +echo_file = None + +def open_listing_file(path, echo_to_stderr = 1): + # Begin a new error listing. If path is None, no file + # is opened, the error counter is just reset. + global listing_file, num_errors, echo_file + if path is not None: + listing_file = open_new_file(path) + else: + listing_file = None + if echo_to_stderr: + echo_file = sys.stderr + else: + echo_file = None + num_errors = 0 + +def close_listing_file(): + global listing_file + if listing_file: + listing_file.close() + listing_file = None + +def report_error(err, use_stack=True): + if error_stack and use_stack: + error_stack[-1].append(err) + else: + global num_errors + # See Main.py for why dual reporting occurs. Quick fix for now. + if err.reported: return + err.reported = True + try: line = u"%s\n" % err + except UnicodeEncodeError: + # Python <= 2.5 does this for non-ASCII Unicode exceptions + line = format_error(getattr(err, 'message_only', "[unprintable exception message]"), + getattr(err, 'position', None)) + u'\n' + if listing_file: + try: listing_file.write(line) + except UnicodeEncodeError: + listing_file.write(line.encode('ASCII', 'replace')) + if echo_file: + try: echo_file.write(line) + except UnicodeEncodeError: + echo_file.write(line.encode('ASCII', 'replace')) + num_errors += 1 + if Options.fast_fail: + raise AbortError("fatal errors") + + +def error(position, message): + #print("Errors.error:", repr(position), repr(message)) ### + if position is None: + raise InternalError(message) + err = CompileError(position, message) + if DebugFlags.debug_exception_on_error: raise Exception(err) # debug + report_error(err) + return err + + +LEVEL = 1 # warn about all errors level 1 or higher + + +def message(position, message, level=1): + if level < LEVEL: + return + warn = CompileWarning(position, message) + line = "note: %s\n" % warn + if listing_file: + listing_file.write(line) + if echo_file: + echo_file.write(line) + return warn + + +def warning(position, message, level=0): + if level < LEVEL: + return + if Options.warning_errors and position: + return error(position, message) + warn = CompileWarning(position, message) + line = "warning: %s\n" % warn + if listing_file: + listing_file.write(line) + if echo_file: + echo_file.write(line) + return warn + + +_warn_once_seen = {} +def warn_once(position, message, level=0): + if level < LEVEL or message in _warn_once_seen: + return + warn = CompileWarning(position, message) + line = "warning: %s\n" % warn + if listing_file: + listing_file.write(line) + if echo_file: + echo_file.write(line) + _warn_once_seen[message] = True + return warn + + +# These functions can be used to momentarily suppress errors. + +error_stack = [] + + +def hold_errors(): + error_stack.append([]) + + +def release_errors(ignore=False): + held_errors = error_stack.pop() + if not ignore: + for err in held_errors: + report_error(err) + + +def held_errors(): + return error_stack[-1] + + +# same as context manager: + +@contextmanager +def local_errors(ignore=False): + errors = [] + error_stack.append(errors) + try: + yield errors + finally: + release_errors(ignore=ignore) + + +# this module needs a redesign to support parallel cythonisation, but +# for now, the following works at least in sequential compiler runs + +def reset(): + _warn_once_seen.clear() + del error_stack[:] diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/ExprNodes.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/ExprNodes.py new file mode 100644 index 00000000000..9162eaad918 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/ExprNodes.py @@ -0,0 +1,13692 @@ +# +# Parse tree nodes for expressions +# + +from __future__ import absolute_import + +import cython +cython.declare(error=object, warning=object, warn_once=object, InternalError=object, + CompileError=object, UtilityCode=object, TempitaUtilityCode=object, + StringEncoding=object, operator=object, local_errors=object, report_error=object, + Naming=object, Nodes=object, PyrexTypes=object, py_object_type=object, + list_type=object, tuple_type=object, set_type=object, dict_type=object, + unicode_type=object, str_type=object, bytes_type=object, type_type=object, + Builtin=object, Symtab=object, Utils=object, find_coercion_error=object, + debug_disposal_code=object, debug_temp_alloc=object, debug_coercion=object, + bytearray_type=object, slice_type=object, _py_int_types=object, + IS_PYTHON3=cython.bint) + +import re +import sys +import copy +import os.path +import operator + +from .Errors import ( + error, warning, InternalError, CompileError, report_error, local_errors) +from .Code import UtilityCode, TempitaUtilityCode +from . import StringEncoding +from . import Naming +from . import Nodes +from .Nodes import Node, utility_code_for_imports, analyse_type_annotation +from . import PyrexTypes +from .PyrexTypes import py_object_type, c_long_type, typecast, error_type, \ + unspecified_type +from . import TypeSlots +from .Builtin import list_type, tuple_type, set_type, dict_type, type_type, \ + unicode_type, str_type, bytes_type, bytearray_type, basestring_type, slice_type +from . import Builtin +from . import Symtab +from .. import Utils +from .Annotate import AnnotationItem +from . import Future +from ..Debugging import print_call_chain +from .DebugFlags import debug_disposal_code, debug_temp_alloc, \ + debug_coercion +from .Pythran import (to_pythran, is_pythran_supported_type, is_pythran_supported_operation_type, + is_pythran_expr, pythran_func_type, pythran_binop_type, pythran_unaryop_type, has_np_pythran, + pythran_indexing_code, pythran_indexing_type, is_pythran_supported_node_or_none, pythran_type, + pythran_is_numpy_func_supported, pythran_get_func_include_file, pythran_functor) +from .PyrexTypes import PythranExpr + +try: + from __builtin__ import basestring +except ImportError: + # Python 3 + basestring = str + any_string_type = (bytes, str) +else: + # Python 2 + any_string_type = (bytes, unicode) + + +if sys.version_info[0] >= 3: + IS_PYTHON3 = True + _py_int_types = int +else: + IS_PYTHON3 = False + _py_int_types = (int, long) + + +class NotConstant(object): + _obj = None + + def __new__(cls): + if NotConstant._obj is None: + NotConstant._obj = super(NotConstant, cls).__new__(cls) + + return NotConstant._obj + + def __repr__(self): + return "" + +not_a_constant = NotConstant() +constant_value_not_set = object() + +# error messages when coercing from key[0] to key[1] +coercion_error_dict = { + # string related errors + (unicode_type, str_type): ("Cannot convert Unicode string to 'str' implicitly." + " This is not portable and requires explicit encoding."), + (unicode_type, bytes_type): "Cannot convert Unicode string to 'bytes' implicitly, encoding required.", + (unicode_type, PyrexTypes.c_char_ptr_type): "Unicode objects only support coercion to Py_UNICODE*.", + (unicode_type, PyrexTypes.c_const_char_ptr_type): "Unicode objects only support coercion to Py_UNICODE*.", + (unicode_type, PyrexTypes.c_uchar_ptr_type): "Unicode objects only support coercion to Py_UNICODE*.", + (unicode_type, PyrexTypes.c_const_uchar_ptr_type): "Unicode objects only support coercion to Py_UNICODE*.", + (bytes_type, unicode_type): "Cannot convert 'bytes' object to unicode implicitly, decoding required", + (bytes_type, str_type): "Cannot convert 'bytes' object to str implicitly. This is not portable to Py3.", + (bytes_type, basestring_type): ("Cannot convert 'bytes' object to basestring implicitly." + " This is not portable to Py3."), + (bytes_type, PyrexTypes.c_py_unicode_ptr_type): "Cannot convert 'bytes' object to Py_UNICODE*, use 'unicode'.", + (bytes_type, PyrexTypes.c_const_py_unicode_ptr_type): ( + "Cannot convert 'bytes' object to Py_UNICODE*, use 'unicode'."), + (basestring_type, bytes_type): "Cannot convert 'basestring' object to bytes implicitly. This is not portable.", + (str_type, unicode_type): ("str objects do not support coercion to unicode," + " use a unicode string literal instead (u'')"), + (str_type, bytes_type): "Cannot convert 'str' to 'bytes' implicitly. This is not portable.", + (str_type, PyrexTypes.c_char_ptr_type): "'str' objects do not support coercion to C types (use 'bytes'?).", + (str_type, PyrexTypes.c_const_char_ptr_type): "'str' objects do not support coercion to C types (use 'bytes'?).", + (str_type, PyrexTypes.c_uchar_ptr_type): "'str' objects do not support coercion to C types (use 'bytes'?).", + (str_type, PyrexTypes.c_const_uchar_ptr_type): "'str' objects do not support coercion to C types (use 'bytes'?).", + (str_type, PyrexTypes.c_py_unicode_ptr_type): "'str' objects do not support coercion to C types (use 'unicode'?).", + (str_type, PyrexTypes.c_const_py_unicode_ptr_type): ( + "'str' objects do not support coercion to C types (use 'unicode'?)."), + (PyrexTypes.c_char_ptr_type, unicode_type): "Cannot convert 'char*' to unicode implicitly, decoding required", + (PyrexTypes.c_const_char_ptr_type, unicode_type): ( + "Cannot convert 'char*' to unicode implicitly, decoding required"), + (PyrexTypes.c_uchar_ptr_type, unicode_type): "Cannot convert 'char*' to unicode implicitly, decoding required", + (PyrexTypes.c_const_uchar_ptr_type, unicode_type): ( + "Cannot convert 'char*' to unicode implicitly, decoding required"), +} + +def find_coercion_error(type_tuple, default, env): + err = coercion_error_dict.get(type_tuple) + if err is None: + return default + elif (env.directives['c_string_encoding'] and + any(t in type_tuple for t in (PyrexTypes.c_char_ptr_type, PyrexTypes.c_uchar_ptr_type, + PyrexTypes.c_const_char_ptr_type, PyrexTypes.c_const_uchar_ptr_type))): + if type_tuple[1].is_pyobject: + return default + elif env.directives['c_string_encoding'] in ('ascii', 'default'): + return default + else: + return "'%s' objects do not support coercion to C types with non-ascii or non-default c_string_encoding" % type_tuple[0].name + else: + return err + + +def default_str_type(env): + return { + 'bytes': bytes_type, + 'bytearray': bytearray_type, + 'str': str_type, + 'unicode': unicode_type + }.get(env.directives['c_string_type']) + + +def check_negative_indices(*nodes): + """ + Raise a warning on nodes that are known to have negative numeric values. + Used to find (potential) bugs inside of "wraparound=False" sections. + """ + for node in nodes: + if node is None or ( + not isinstance(node.constant_result, _py_int_types) and + not isinstance(node.constant_result, float)): + continue + if node.constant_result < 0: + warning(node.pos, + "the result of using negative indices inside of " + "code sections marked as 'wraparound=False' is " + "undefined", level=1) + + +def infer_sequence_item_type(env, seq_node, index_node=None, seq_type=None): + if not seq_node.is_sequence_constructor: + if seq_type is None: + seq_type = seq_node.infer_type(env) + if seq_type is tuple_type: + # tuples are immutable => we can safely follow assignments + if seq_node.cf_state and len(seq_node.cf_state) == 1: + try: + seq_node = seq_node.cf_state[0].rhs + except AttributeError: + pass + if seq_node is not None and seq_node.is_sequence_constructor: + if index_node is not None and index_node.has_constant_result(): + try: + item = seq_node.args[index_node.constant_result] + except (ValueError, TypeError, IndexError): + pass + else: + return item.infer_type(env) + # if we're lucky, all items have the same type + item_types = set([item.infer_type(env) for item in seq_node.args]) + if len(item_types) == 1: + return item_types.pop() + return None + + +def make_dedup_key(outer_type, item_nodes): + """ + Recursively generate a deduplication key from a sequence of values. + Includes Cython node types to work around the fact that (1, 2.0) == (1.0, 2), for example. + + @param outer_type: The type of the outer container. + @param item_nodes: A sequence of constant nodes that will be traversed recursively. + @return: A tuple that can be used as a dict key for deduplication. + """ + item_keys = [ + (py_object_type, None, type(None)) if node is None + # For sequences and their "mult_factor", see TupleNode. + else make_dedup_key(node.type, [node.mult_factor if node.is_literal else None] + node.args) if node.is_sequence_constructor + else make_dedup_key(node.type, (node.start, node.stop, node.step)) if node.is_slice + # For constants, look at the Python value type if we don't know the concrete Cython type. + else (node.type, node.constant_result, + type(node.constant_result) if node.type is py_object_type else None) if node.has_constant_result() + else None # something we cannot handle => short-circuit below + for node in item_nodes + ] + if None in item_keys: + return None + return outer_type, tuple(item_keys) + + +# Returns a block of code to translate the exception, +# plus a boolean indicating whether to check for Python exceptions. +def get_exception_handler(exception_value): + if exception_value is None: + return "__Pyx_CppExn2PyErr();", False + elif (exception_value.type == PyrexTypes.c_char_type + and exception_value.value == '*'): + return "__Pyx_CppExn2PyErr();", True + elif exception_value.type.is_pyobject: + return ( + 'try { throw; } catch(const std::exception& exn) {' + 'PyErr_SetString(%s, exn.what());' + '} catch(...) { PyErr_SetNone(%s); }' % ( + exception_value.entry.cname, + exception_value.entry.cname), + False) + else: + return ( + '%s(); if (!PyErr_Occurred())' + 'PyErr_SetString(PyExc_RuntimeError, ' + '"Error converting c++ exception.");' % ( + exception_value.entry.cname), + False) + +def maybe_check_py_error(code, check_py_exception, pos, nogil): + if check_py_exception: + if nogil: + code.putln(code.error_goto_if("__Pyx_ErrOccurredWithGIL()", pos)) + else: + code.putln(code.error_goto_if("PyErr_Occurred()", pos)) + +def translate_cpp_exception(code, pos, inside, py_result, exception_value, nogil): + raise_py_exception, check_py_exception = get_exception_handler(exception_value) + code.putln("try {") + code.putln("%s" % inside) + if py_result: + code.putln(code.error_goto_if_null(py_result, pos)) + maybe_check_py_error(code, check_py_exception, pos, nogil) + code.putln("} catch(...) {") + if nogil: + code.put_ensure_gil(declare_gilstate=True) + code.putln(raise_py_exception) + if nogil: + code.put_release_ensured_gil() + code.putln(code.error_goto(pos)) + code.putln("}") + +# Used to handle the case where an lvalue expression and an overloaded assignment +# both have an exception declaration. +def translate_double_cpp_exception(code, pos, lhs_type, lhs_code, rhs_code, + lhs_exc_val, assign_exc_val, nogil): + handle_lhs_exc, lhc_check_py_exc = get_exception_handler(lhs_exc_val) + handle_assignment_exc, assignment_check_py_exc = get_exception_handler(assign_exc_val) + code.putln("try {") + code.putln(lhs_type.declaration_code("__pyx_local_lvalue = %s;" % lhs_code)) + maybe_check_py_error(code, lhc_check_py_exc, pos, nogil) + code.putln("try {") + code.putln("__pyx_local_lvalue = %s;" % rhs_code) + maybe_check_py_error(code, assignment_check_py_exc, pos, nogil) + # Catch any exception from the overloaded assignment. + code.putln("} catch(...) {") + if nogil: + code.put_ensure_gil(declare_gilstate=True) + code.putln(handle_assignment_exc) + if nogil: + code.put_release_ensured_gil() + code.putln(code.error_goto(pos)) + code.putln("}") + # Catch any exception from evaluating lhs. + code.putln("} catch(...) {") + if nogil: + code.put_ensure_gil(declare_gilstate=True) + code.putln(handle_lhs_exc) + if nogil: + code.put_release_ensured_gil() + code.putln(code.error_goto(pos)) + code.putln('}') + + +class ExprNode(Node): + # subexprs [string] Class var holding names of subexpr node attrs + # type PyrexType Type of the result + # result_code string Code fragment + # result_ctype string C type of result_code if different from type + # is_temp boolean Result is in a temporary variable + # is_sequence_constructor + # boolean Is a list or tuple constructor expression + # is_starred boolean Is a starred expression (e.g. '*a') + # saved_subexpr_nodes + # [ExprNode or [ExprNode or None] or None] + # Cached result of subexpr_nodes() + # use_managed_ref boolean use ref-counted temps/assignments/etc. + # result_is_used boolean indicates that the result will be dropped and the + # is_numpy_attribute boolean Is a Numpy module attribute + # result_code/temp_result can safely be set to None + # annotation ExprNode or None PEP526 annotation for names or expressions + + result_ctype = None + type = None + annotation = None + temp_code = None + old_temp = None # error checker for multiple frees etc. + use_managed_ref = True # can be set by optimisation transforms + result_is_used = True + is_numpy_attribute = False + + # The Analyse Expressions phase for expressions is split + # into two sub-phases: + # + # Analyse Types + # Determines the result type of the expression based + # on the types of its sub-expressions, and inserts + # coercion nodes into the expression tree where needed. + # Marks nodes which will need to have temporary variables + # allocated. + # + # Allocate Temps + # Allocates temporary variables where needed, and fills + # in the result_code field of each node. + # + # ExprNode provides some convenience routines which + # perform both of the above phases. These should only + # be called from statement nodes, and only when no + # coercion nodes need to be added around the expression + # being analysed. In that case, the above two phases + # should be invoked separately. + # + # Framework code in ExprNode provides much of the common + # processing for the various phases. It makes use of the + # 'subexprs' class attribute of ExprNodes, which should + # contain a list of the names of attributes which can + # hold sub-nodes or sequences of sub-nodes. + # + # The framework makes use of a number of abstract methods. + # Their responsibilities are as follows. + # + # Declaration Analysis phase + # + # analyse_target_declaration + # Called during the Analyse Declarations phase to analyse + # the LHS of an assignment or argument of a del statement. + # Nodes which cannot be the LHS of an assignment need not + # implement it. + # + # Expression Analysis phase + # + # analyse_types + # - Call analyse_types on all sub-expressions. + # - Check operand types, and wrap coercion nodes around + # sub-expressions where needed. + # - Set the type of this node. + # - If a temporary variable will be required for the + # result, set the is_temp flag of this node. + # + # analyse_target_types + # Called during the Analyse Types phase to analyse + # the LHS of an assignment or argument of a del + # statement. Similar responsibilities to analyse_types. + # + # target_code + # Called by the default implementation of allocate_target_temps. + # Should return a C lvalue for assigning to the node. The default + # implementation calls calculate_result_code. + # + # check_const + # - Check that this node and its subnodes form a + # legal constant expression. If so, do nothing, + # otherwise call not_const. + # + # The default implementation of check_const + # assumes that the expression is not constant. + # + # check_const_addr + # - Same as check_const, except check that the + # expression is a C lvalue whose address is + # constant. Otherwise, call addr_not_const. + # + # The default implementation of calc_const_addr + # assumes that the expression is not a constant + # lvalue. + # + # Code Generation phase + # + # generate_evaluation_code + # - Call generate_evaluation_code for sub-expressions. + # - Perform the functions of generate_result_code + # (see below). + # - If result is temporary, call generate_disposal_code + # on all sub-expressions. + # + # A default implementation of generate_evaluation_code + # is provided which uses the following abstract methods: + # + # generate_result_code + # - Generate any C statements necessary to calculate + # the result of this node from the results of its + # sub-expressions. + # + # calculate_result_code + # - Should return a C code fragment evaluating to the + # result. This is only called when the result is not + # a temporary. + # + # generate_assignment_code + # Called on the LHS of an assignment. + # - Call generate_evaluation_code for sub-expressions. + # - Generate code to perform the assignment. + # - If the assignment absorbed a reference, call + # generate_post_assignment_code on the RHS, + # otherwise call generate_disposal_code on it. + # + # generate_deletion_code + # Called on an argument of a del statement. + # - Call generate_evaluation_code for sub-expressions. + # - Generate code to perform the deletion. + # - Call generate_disposal_code on all sub-expressions. + # + # + + is_sequence_constructor = False + is_dict_literal = False + is_set_literal = False + is_string_literal = False + is_attribute = False + is_subscript = False + is_slice = False + + is_buffer_access = False + is_memview_index = False + is_memview_slice = False + is_memview_broadcast = False + is_memview_copy_assignment = False + + saved_subexpr_nodes = None + is_temp = False + is_target = False + is_starred = False + + constant_result = constant_value_not_set + + child_attrs = property(fget=operator.attrgetter('subexprs')) + + def not_implemented(self, method_name): + print_call_chain(method_name, "not implemented") ### + raise InternalError( + "%s.%s not implemented" % + (self.__class__.__name__, method_name)) + + def is_lvalue(self): + return 0 + + def is_addressable(self): + return self.is_lvalue() and not self.type.is_memoryviewslice + + def is_ephemeral(self): + # An ephemeral node is one whose result is in + # a Python temporary and we suspect there are no + # other references to it. Certain operations are + # disallowed on such values, since they are + # likely to result in a dangling pointer. + return self.type.is_pyobject and self.is_temp + + def subexpr_nodes(self): + # Extract a list of subexpression nodes based + # on the contents of the subexprs class attribute. + nodes = [] + for name in self.subexprs: + item = getattr(self, name) + if item is not None: + if type(item) is list: + nodes.extend(item) + else: + nodes.append(item) + return nodes + + def result(self): + if self.is_temp: + #if not self.temp_code: + # pos = (os.path.basename(self.pos[0].get_description()),) + self.pos[1:] if self.pos else '(?)' + # raise RuntimeError("temp result name not set in %s at %r" % ( + # self.__class__.__name__, pos)) + return self.temp_code + else: + return self.calculate_result_code() + + def pythran_result(self, type_=None): + if is_pythran_supported_node_or_none(self): + return to_pythran(self) + + assert(type_ is not None) + return to_pythran(self, type_) + + def is_c_result_required(self): + """ + Subtypes may return False here if result temp allocation can be skipped. + """ + return True + + def result_as(self, type = None): + # Return the result code cast to the specified C type. + if (self.is_temp and self.type.is_pyobject and + type != py_object_type): + # Allocated temporaries are always PyObject *, which may not + # reflect the actual type (e.g. an extension type) + return typecast(type, py_object_type, self.result()) + return typecast(type, self.ctype(), self.result()) + + def py_result(self): + # Return the result code cast to PyObject *. + return self.result_as(py_object_type) + + def ctype(self): + # Return the native C type of the result (i.e. the + # C type of the result_code expression). + return self.result_ctype or self.type + + def get_constant_c_result_code(self): + # Return the constant value of this node as a result code + # string, or None if the node is not constant. This method + # can be called when the constant result code is required + # before the code generation phase. + # + # The return value is a string that can represent a simple C + # value, a constant C name or a constant C expression. If the + # node type depends on Python code, this must return None. + return None + + def calculate_constant_result(self): + # Calculate the constant compile time result value of this + # expression and store it in ``self.constant_result``. Does + # nothing by default, thus leaving ``self.constant_result`` + # unknown. If valid, the result can be an arbitrary Python + # value. + # + # This must only be called when it is assured that all + # sub-expressions have a valid constant_result value. The + # ConstantFolding transform will do this. + pass + + def has_constant_result(self): + return self.constant_result is not constant_value_not_set and \ + self.constant_result is not not_a_constant + + def compile_time_value(self, denv): + # Return value of compile-time expression, or report error. + error(self.pos, "Invalid compile-time expression") + + def compile_time_value_error(self, e): + error(self.pos, "Error in compile-time expression: %s: %s" % ( + e.__class__.__name__, e)) + + # ------------- Declaration Analysis ---------------- + + def analyse_target_declaration(self, env): + error(self.pos, "Cannot assign to or delete this") + + # ------------- Expression Analysis ---------------- + + def analyse_const_expression(self, env): + # Called during the analyse_declarations phase of a + # constant expression. Analyses the expression's type, + # checks whether it is a legal const expression, + # and determines its value. + node = self.analyse_types(env) + node.check_const() + return node + + def analyse_expressions(self, env): + # Convenience routine performing both the Type + # Analysis and Temp Allocation phases for a whole + # expression. + return self.analyse_types(env) + + def analyse_target_expression(self, env, rhs): + # Convenience routine performing both the Type + # Analysis and Temp Allocation phases for the LHS of + # an assignment. + return self.analyse_target_types(env) + + def analyse_boolean_expression(self, env): + # Analyse expression and coerce to a boolean. + node = self.analyse_types(env) + bool = node.coerce_to_boolean(env) + return bool + + def analyse_temp_boolean_expression(self, env): + # Analyse boolean expression and coerce result into + # a temporary. This is used when a branch is to be + # performed on the result and we won't have an + # opportunity to ensure disposal code is executed + # afterwards. By forcing the result into a temporary, + # we ensure that all disposal has been done by the + # time we get the result. + node = self.analyse_types(env) + return node.coerce_to_boolean(env).coerce_to_simple(env) + + # --------------- Type Inference ----------------- + + def type_dependencies(self, env): + # Returns the list of entries whose types must be determined + # before the type of self can be inferred. + if hasattr(self, 'type') and self.type is not None: + return () + return sum([node.type_dependencies(env) for node in self.subexpr_nodes()], ()) + + def infer_type(self, env): + # Attempt to deduce the type of self. + # Differs from analyse_types as it avoids unnecessary + # analysis of subexpressions, but can assume everything + # in self.type_dependencies() has been resolved. + if hasattr(self, 'type') and self.type is not None: + return self.type + elif hasattr(self, 'entry') and self.entry is not None: + return self.entry.type + else: + self.not_implemented("infer_type") + + def nonlocally_immutable(self): + # Returns whether this variable is a safe reference, i.e. + # can't be modified as part of globals or closures. + return self.is_literal or self.is_temp or self.type.is_array or self.type.is_cfunction + + def inferable_item_node(self, index=0): + """ + Return a node that represents the (type) result of an indexing operation, + e.g. for tuple unpacking or iteration. + """ + return IndexNode(self.pos, base=self, index=IntNode( + self.pos, value=str(index), constant_result=index, type=PyrexTypes.c_py_ssize_t_type)) + + # --------------- Type Analysis ------------------ + + def analyse_as_module(self, env): + # If this node can be interpreted as a reference to a + # cimported module, return its scope, else None. + return None + + def analyse_as_type(self, env): + # If this node can be interpreted as a reference to a + # type, return that type, else None. + return None + + def analyse_as_extension_type(self, env): + # If this node can be interpreted as a reference to an + # extension type or builtin type, return its type, else None. + return None + + def analyse_types(self, env): + self.not_implemented("analyse_types") + + def analyse_target_types(self, env): + return self.analyse_types(env) + + def nogil_check(self, env): + # By default, any expression based on Python objects is + # prevented in nogil environments. Subtypes must override + # this if they can work without the GIL. + if self.type and self.type.is_pyobject: + self.gil_error() + + def gil_assignment_check(self, env): + if env.nogil and self.type.is_pyobject: + error(self.pos, "Assignment of Python object not allowed without gil") + + def check_const(self): + self.not_const() + return False + + def not_const(self): + error(self.pos, "Not allowed in a constant expression") + + def check_const_addr(self): + self.addr_not_const() + return False + + def addr_not_const(self): + error(self.pos, "Address is not constant") + + # ----------------- Result Allocation ----------------- + + def result_in_temp(self): + # Return true if result is in a temporary owned by + # this node or one of its subexpressions. Overridden + # by certain nodes which can share the result of + # a subnode. + return self.is_temp + + def target_code(self): + # Return code fragment for use as LHS of a C assignment. + return self.calculate_result_code() + + def calculate_result_code(self): + self.not_implemented("calculate_result_code") + +# def release_target_temp(self, env): +# # Release temporaries used by LHS of an assignment. +# self.release_subexpr_temps(env) + + def allocate_temp_result(self, code): + if self.temp_code: + raise RuntimeError("Temp allocated multiple times in %r: %r" % (self.__class__.__name__, self.pos)) + type = self.type + if not type.is_void: + if type.is_pyobject: + type = PyrexTypes.py_object_type + elif not (self.result_is_used or type.is_memoryviewslice or self.is_c_result_required()): + self.temp_code = None + return + self.temp_code = code.funcstate.allocate_temp( + type, manage_ref=self.use_managed_ref) + else: + self.temp_code = None + + def release_temp_result(self, code): + if not self.temp_code: + if not self.result_is_used: + # not used anyway, so ignore if not set up + return + pos = (os.path.basename(self.pos[0].get_description()),) + self.pos[1:] if self.pos else '(?)' + if self.old_temp: + raise RuntimeError("temp %s released multiple times in %s at %r" % ( + self.old_temp, self.__class__.__name__, pos)) + else: + raise RuntimeError("no temp, but release requested in %s at %r" % ( + self.__class__.__name__, pos)) + code.funcstate.release_temp(self.temp_code) + self.old_temp = self.temp_code + self.temp_code = None + + # ---------------- Code Generation ----------------- + + def make_owned_reference(self, code): + """ + If result is a pyobject, make sure we own a reference to it. + If the result is in a temp, it is already a new reference. + """ + if self.type.is_pyobject and not self.result_in_temp(): + code.put_incref(self.result(), self.ctype()) + + def make_owned_memoryviewslice(self, code): + """ + Make sure we own the reference to this memoryview slice. + """ + if not self.result_in_temp(): + code.put_incref_memoryviewslice(self.result(), + have_gil=self.in_nogil_context) + + def generate_evaluation_code(self, code): + # Generate code to evaluate this node and + # its sub-expressions, and dispose of any + # temporary results of its sub-expressions. + self.generate_subexpr_evaluation_code(code) + + code.mark_pos(self.pos) + if self.is_temp: + self.allocate_temp_result(code) + + self.generate_result_code(code) + if self.is_temp and not (self.type.is_string or self.type.is_pyunicode_ptr): + # If we are temp we do not need to wait until this node is disposed + # before disposing children. + self.generate_subexpr_disposal_code(code) + self.free_subexpr_temps(code) + + def generate_subexpr_evaluation_code(self, code): + for node in self.subexpr_nodes(): + node.generate_evaluation_code(code) + + def generate_result_code(self, code): + self.not_implemented("generate_result_code") + + def generate_disposal_code(self, code): + if self.is_temp: + if self.type.is_string or self.type.is_pyunicode_ptr: + # postponed from self.generate_evaluation_code() + self.generate_subexpr_disposal_code(code) + self.free_subexpr_temps(code) + if self.result(): + if self.type.is_pyobject: + code.put_decref_clear(self.result(), self.ctype()) + elif self.type.is_memoryviewslice: + code.put_xdecref_memoryviewslice( + self.result(), have_gil=not self.in_nogil_context) + code.putln("%s.memview = NULL;" % self.result()) + code.putln("%s.data = NULL;" % self.result()) + else: + # Already done if self.is_temp + self.generate_subexpr_disposal_code(code) + + def generate_subexpr_disposal_code(self, code): + # Generate code to dispose of temporary results + # of all sub-expressions. + for node in self.subexpr_nodes(): + node.generate_disposal_code(code) + + def generate_post_assignment_code(self, code): + if self.is_temp: + if self.type.is_string or self.type.is_pyunicode_ptr: + # postponed from self.generate_evaluation_code() + self.generate_subexpr_disposal_code(code) + self.free_subexpr_temps(code) + elif self.type.is_pyobject: + code.putln("%s = 0;" % self.result()) + elif self.type.is_memoryviewslice: + code.putln("%s.memview = NULL;" % self.result()) + code.putln("%s.data = NULL;" % self.result()) + else: + self.generate_subexpr_disposal_code(code) + + def generate_assignment_code(self, rhs, code, overloaded_assignment=False, + exception_check=None, exception_value=None): + # Stub method for nodes which are not legal as + # the LHS of an assignment. An error will have + # been reported earlier. + pass + + def generate_deletion_code(self, code, ignore_nonexisting=False): + # Stub method for nodes that are not legal as + # the argument of a del statement. An error + # will have been reported earlier. + pass + + def free_temps(self, code): + if self.is_temp: + if not self.type.is_void: + self.release_temp_result(code) + else: + self.free_subexpr_temps(code) + + def free_subexpr_temps(self, code): + for sub in self.subexpr_nodes(): + sub.free_temps(code) + + def generate_function_definitions(self, env, code): + pass + + # ---------------- Annotation --------------------- + + def annotate(self, code): + for node in self.subexpr_nodes(): + node.annotate(code) + + # ----------------- Coercion ---------------------- + + def coerce_to(self, dst_type, env): + # Coerce the result so that it can be assigned to + # something of type dst_type. If processing is necessary, + # wraps this node in a coercion node and returns that. + # Otherwise, returns this node unchanged. + # + # This method is called during the analyse_expressions + # phase of the src_node's processing. + # + # Note that subclasses that override this (especially + # ConstNodes) must not (re-)set their own .type attribute + # here. Since expression nodes may turn up in different + # places in the tree (e.g. inside of CloneNodes in cascaded + # assignments), this method must return a new node instance + # if it changes the type. + # + src = self + src_type = self.type + + if self.check_for_coercion_error(dst_type, env): + return self + + used_as_reference = dst_type.is_reference + if used_as_reference and not src_type.is_reference: + dst_type = dst_type.ref_base_type + + if src_type.is_const: + src_type = src_type.const_base_type + + if src_type.is_fused or dst_type.is_fused: + # See if we are coercing a fused function to a pointer to a + # specialized function + if (src_type.is_cfunction and not dst_type.is_fused and + dst_type.is_ptr and dst_type.base_type.is_cfunction): + + dst_type = dst_type.base_type + + for signature in src_type.get_all_specialized_function_types(): + if signature.same_as(dst_type): + src.type = signature + src.entry = src.type.entry + src.entry.used = True + return self + + if src_type.is_fused: + error(self.pos, "Type is not specialized") + elif src_type.is_null_ptr and dst_type.is_ptr: + # NULL can be implicitly cast to any pointer type + return self + else: + error(self.pos, "Cannot coerce to a type that is not specialized") + + self.type = error_type + return self + + if self.coercion_type is not None: + # This is purely for error checking purposes! + node = NameNode(self.pos, name='', type=self.coercion_type) + node.coerce_to(dst_type, env) + + if dst_type.is_memoryviewslice: + from . import MemoryView + if not src.type.is_memoryviewslice: + if src.type.is_pyobject: + src = CoerceToMemViewSliceNode(src, dst_type, env) + elif src.type.is_array: + src = CythonArrayNode.from_carray(src, env).coerce_to(dst_type, env) + elif not src_type.is_error: + error(self.pos, + "Cannot convert '%s' to memoryviewslice" % (src_type,)) + else: + if src.type.writable_needed: + dst_type.writable_needed = True + if not src.type.conforms_to(dst_type, broadcast=self.is_memview_broadcast, + copying=self.is_memview_copy_assignment): + if src.type.dtype.same_as(dst_type.dtype): + msg = "Memoryview '%s' not conformable to memoryview '%s'." + tup = src.type, dst_type + else: + msg = "Different base types for memoryviews (%s, %s)" + tup = src.type.dtype, dst_type.dtype + + error(self.pos, msg % tup) + + elif dst_type.is_pyobject: + if not src.type.is_pyobject: + if dst_type is bytes_type and src.type.is_int: + src = CoerceIntToBytesNode(src, env) + else: + src = CoerceToPyTypeNode(src, env, type=dst_type) + if not src.type.subtype_of(dst_type): + if src.constant_result is not None: + src = PyTypeTestNode(src, dst_type, env) + elif is_pythran_expr(dst_type) and is_pythran_supported_type(src.type): + # We let the compiler decide whether this is valid + return src + elif is_pythran_expr(src.type): + if is_pythran_supported_type(dst_type): + # Match the case were a pythran expr is assigned to a value, or vice versa. + # We let the C++ compiler decide whether this is valid or not! + return src + # Else, we need to convert the Pythran expression to a Python object + src = CoerceToPyTypeNode(src, env, type=dst_type) + elif src.type.is_pyobject: + if used_as_reference and dst_type.is_cpp_class: + warning( + self.pos, + "Cannot pass Python object as C++ data structure reference (%s &), will pass by copy." % dst_type) + src = CoerceFromPyTypeNode(dst_type, src, env) + elif (dst_type.is_complex + and src_type != dst_type + and dst_type.assignable_from(src_type)): + src = CoerceToComplexNode(src, dst_type, env) + else: # neither src nor dst are py types + # Added the string comparison, since for c types that + # is enough, but Cython gets confused when the types are + # in different pxi files. + # TODO: Remove this hack and require shared declarations. + if not (src.type == dst_type or str(src.type) == str(dst_type) or dst_type.assignable_from(src_type)): + self.fail_assignment(dst_type) + return src + + def fail_assignment(self, dst_type): + error(self.pos, "Cannot assign type '%s' to '%s'" % (self.type, dst_type)) + + def check_for_coercion_error(self, dst_type, env, fail=False, default=None): + if fail and not default: + default = "Cannot assign type '%(FROM)s' to '%(TO)s'" + message = find_coercion_error((self.type, dst_type), default, env) + if message is not None: + error(self.pos, message % {'FROM': self.type, 'TO': dst_type}) + return True + if fail: + self.fail_assignment(dst_type) + return True + return False + + def coerce_to_pyobject(self, env): + return self.coerce_to(PyrexTypes.py_object_type, env) + + def coerce_to_boolean(self, env): + # Coerce result to something acceptable as + # a boolean value. + + # if it's constant, calculate the result now + if self.has_constant_result(): + bool_value = bool(self.constant_result) + return BoolNode(self.pos, value=bool_value, + constant_result=bool_value) + + type = self.type + if type.is_enum or type.is_error: + return self + elif type.is_pyobject or type.is_int or type.is_ptr or type.is_float: + return CoerceToBooleanNode(self, env) + elif type.is_cpp_class and type.scope and type.scope.lookup("operator bool"): + return SimpleCallNode( + self.pos, + function=AttributeNode( + self.pos, obj=self, attribute=StringEncoding.EncodedString('operator bool')), + args=[]).analyse_types(env) + elif type.is_ctuple: + bool_value = len(type.components) == 0 + return BoolNode(self.pos, value=bool_value, + constant_result=bool_value) + else: + error(self.pos, "Type '%s' not acceptable as a boolean" % type) + return self + + def coerce_to_integer(self, env): + # If not already some C integer type, coerce to longint. + if self.type.is_int: + return self + else: + return self.coerce_to(PyrexTypes.c_long_type, env) + + def coerce_to_temp(self, env): + # Ensure that the result is in a temporary. + if self.result_in_temp(): + return self + else: + return CoerceToTempNode(self, env) + + def coerce_to_simple(self, env): + # Ensure that the result is simple (see is_simple). + if self.is_simple(): + return self + else: + return self.coerce_to_temp(env) + + def is_simple(self): + # A node is simple if its result is something that can + # be referred to without performing any operations, e.g. + # a constant, local var, C global var, struct member + # reference, or temporary. + return self.result_in_temp() + + def may_be_none(self): + if self.type and not (self.type.is_pyobject or + self.type.is_memoryviewslice): + return False + if self.has_constant_result(): + return self.constant_result is not None + return True + + def as_cython_attribute(self): + return None + + def as_none_safe_node(self, message, error="PyExc_TypeError", format_args=()): + # Wraps the node in a NoneCheckNode if it is not known to be + # not-None (e.g. because it is a Python literal). + if self.may_be_none(): + return NoneCheckNode(self, error, message, format_args) + else: + return self + + @classmethod + def from_node(cls, node, **kwargs): + """Instantiate this node class from another node, properly + copying over all attributes that one would forget otherwise. + """ + attributes = "cf_state cf_maybe_null cf_is_null constant_result".split() + for attr_name in attributes: + if attr_name in kwargs: + continue + try: + value = getattr(node, attr_name) + except AttributeError: + pass + else: + kwargs[attr_name] = value + return cls(node.pos, **kwargs) + + +class AtomicExprNode(ExprNode): + # Abstract base class for expression nodes which have + # no sub-expressions. + + subexprs = [] + + # Override to optimize -- we know we have no children + def generate_subexpr_evaluation_code(self, code): + pass + def generate_subexpr_disposal_code(self, code): + pass + +class PyConstNode(AtomicExprNode): + # Abstract base class for constant Python values. + + is_literal = 1 + type = py_object_type + + def is_simple(self): + return 1 + + def may_be_none(self): + return False + + def analyse_types(self, env): + return self + + def calculate_result_code(self): + return self.value + + def generate_result_code(self, code): + pass + + +class NoneNode(PyConstNode): + # The constant value None + + is_none = 1 + value = "Py_None" + + constant_result = None + + nogil_check = None + + def compile_time_value(self, denv): + return None + + def may_be_none(self): + return True + + def coerce_to(self, dst_type, env): + if not (dst_type.is_pyobject or dst_type.is_memoryviewslice or dst_type.is_error): + # Catch this error early and loudly. + error(self.pos, "Cannot assign None to %s" % dst_type) + return super(NoneNode, self).coerce_to(dst_type, env) + + +class EllipsisNode(PyConstNode): + # '...' in a subscript list. + + value = "Py_Ellipsis" + + constant_result = Ellipsis + + def compile_time_value(self, denv): + return Ellipsis + + +class ConstNode(AtomicExprNode): + # Abstract base type for literal constant nodes. + # + # value string C code fragment + + is_literal = 1 + nogil_check = None + + def is_simple(self): + return 1 + + def nonlocally_immutable(self): + return 1 + + def may_be_none(self): + return False + + def analyse_types(self, env): + return self # Types are held in class variables + + def check_const(self): + return True + + def get_constant_c_result_code(self): + return self.calculate_result_code() + + def calculate_result_code(self): + return str(self.value) + + def generate_result_code(self, code): + pass + + +class BoolNode(ConstNode): + type = PyrexTypes.c_bint_type + # The constant value True or False + + def calculate_constant_result(self): + self.constant_result = self.value + + def compile_time_value(self, denv): + return self.value + + def calculate_result_code(self): + if self.type.is_pyobject: + return self.value and 'Py_True' or 'Py_False' + else: + return str(int(self.value)) + + def coerce_to(self, dst_type, env): + if dst_type == self.type: + return self + if dst_type is py_object_type and self.type is Builtin.bool_type: + return self + if dst_type.is_pyobject and self.type.is_int: + return BoolNode( + self.pos, value=self.value, + constant_result=self.constant_result, + type=Builtin.bool_type) + if dst_type.is_int and self.type.is_pyobject: + return BoolNode( + self.pos, value=self.value, + constant_result=self.constant_result, + type=PyrexTypes.c_bint_type) + return ConstNode.coerce_to(self, dst_type, env) + + +class NullNode(ConstNode): + type = PyrexTypes.c_null_ptr_type + value = "NULL" + constant_result = 0 + + def get_constant_c_result_code(self): + return self.value + + +class CharNode(ConstNode): + type = PyrexTypes.c_char_type + + def calculate_constant_result(self): + self.constant_result = ord(self.value) + + def compile_time_value(self, denv): + return ord(self.value) + + def calculate_result_code(self): + return "'%s'" % StringEncoding.escape_char(self.value) + + +class IntNode(ConstNode): + + # unsigned "" or "U" + # longness "" or "L" or "LL" + # is_c_literal True/False/None creator considers this a C integer literal + + unsigned = "" + longness = "" + is_c_literal = None # unknown + + def __init__(self, pos, **kwds): + ExprNode.__init__(self, pos, **kwds) + if 'type' not in kwds: + self.type = self.find_suitable_type_for_value() + + def find_suitable_type_for_value(self): + if self.constant_result is constant_value_not_set: + try: + self.calculate_constant_result() + except ValueError: + pass + # we ignore 'is_c_literal = True' and instead map signed 32bit + # integers as C long values + if self.is_c_literal or \ + not self.has_constant_result() or \ + self.unsigned or self.longness == 'LL': + # clearly a C literal + rank = (self.longness == 'LL') and 2 or 1 + suitable_type = PyrexTypes.modifiers_and_name_to_type[not self.unsigned, rank, "int"] + if self.type: + suitable_type = PyrexTypes.widest_numeric_type(suitable_type, self.type) + else: + # C literal or Python literal - split at 32bit boundary + if -2**31 <= self.constant_result < 2**31: + if self.type and self.type.is_int: + suitable_type = self.type + else: + suitable_type = PyrexTypes.c_long_type + else: + suitable_type = PyrexTypes.py_object_type + return suitable_type + + def coerce_to(self, dst_type, env): + if self.type is dst_type: + return self + elif dst_type.is_float: + if self.has_constant_result(): + return FloatNode(self.pos, value='%d.0' % int(self.constant_result), type=dst_type, + constant_result=float(self.constant_result)) + else: + return FloatNode(self.pos, value=self.value, type=dst_type, + constant_result=not_a_constant) + if dst_type.is_numeric and not dst_type.is_complex: + node = IntNode(self.pos, value=self.value, constant_result=self.constant_result, + type=dst_type, is_c_literal=True, + unsigned=self.unsigned, longness=self.longness) + return node + elif dst_type.is_pyobject: + node = IntNode(self.pos, value=self.value, constant_result=self.constant_result, + type=PyrexTypes.py_object_type, is_c_literal=False, + unsigned=self.unsigned, longness=self.longness) + else: + # FIXME: not setting the type here to keep it working with + # complex numbers. Should they be special cased? + node = IntNode(self.pos, value=self.value, constant_result=self.constant_result, + unsigned=self.unsigned, longness=self.longness) + # We still need to perform normal coerce_to processing on the + # result, because we might be coercing to an extension type, + # in which case a type test node will be needed. + return ConstNode.coerce_to(node, dst_type, env) + + def coerce_to_boolean(self, env): + return IntNode( + self.pos, value=self.value, + constant_result=self.constant_result, + type=PyrexTypes.c_bint_type, + unsigned=self.unsigned, longness=self.longness) + + def generate_evaluation_code(self, code): + if self.type.is_pyobject: + # pre-allocate a Python version of the number + plain_integer_string = str(Utils.str_to_number(self.value)) + self.result_code = code.get_py_int(plain_integer_string, self.longness) + else: + self.result_code = self.get_constant_c_result_code() + + def get_constant_c_result_code(self): + unsigned, longness = self.unsigned, self.longness + literal = self.value_as_c_integer_string() + if not (unsigned or longness) and self.type.is_int and literal[0] == '-' and literal[1] != '0': + # negative decimal literal => guess longness from type to prevent wrap-around + if self.type.rank >= PyrexTypes.c_longlong_type.rank: + longness = 'LL' + elif self.type.rank >= PyrexTypes.c_long_type.rank: + longness = 'L' + return literal + unsigned + longness + + def value_as_c_integer_string(self): + value = self.value + if len(value) <= 2: + # too short to go wrong (and simplifies code below) + return value + neg_sign = '' + if value[0] == '-': + neg_sign = '-' + value = value[1:] + if value[0] == '0': + literal_type = value[1] # 0'o' - 0'b' - 0'x' + # 0x123 hex literals and 0123 octal literals work nicely in C + # but C-incompatible Py3 oct/bin notations need conversion + if neg_sign and literal_type in 'oOxX0123456789' and value[2:].isdigit(): + # negative hex/octal literal => prevent C compiler from using + # unsigned integer types by converting to decimal (see C standard 6.4.4.1) + value = str(Utils.str_to_number(value)) + elif literal_type in 'oO': + value = '0' + value[2:] # '0o123' => '0123' + elif literal_type in 'bB': + value = str(int(value[2:], 2)) + elif value.isdigit() and not self.unsigned and not self.longness: + if not neg_sign: + # C compilers do not consider unsigned types for decimal literals, + # but they do for hex (see C standard 6.4.4.1) + value = '0x%X' % int(value) + return neg_sign + value + + def calculate_result_code(self): + return self.result_code + + def calculate_constant_result(self): + self.constant_result = Utils.str_to_number(self.value) + + def compile_time_value(self, denv): + return Utils.str_to_number(self.value) + +class FloatNode(ConstNode): + type = PyrexTypes.c_double_type + + def calculate_constant_result(self): + self.constant_result = float(self.value) + + def compile_time_value(self, denv): + return float(self.value) + + def coerce_to(self, dst_type, env): + if dst_type.is_pyobject and self.type.is_float: + return FloatNode( + self.pos, value=self.value, + constant_result=self.constant_result, + type=Builtin.float_type) + if dst_type.is_float and self.type.is_pyobject: + return FloatNode( + self.pos, value=self.value, + constant_result=self.constant_result, + type=dst_type) + return ConstNode.coerce_to(self, dst_type, env) + + def calculate_result_code(self): + return self.result_code + + def get_constant_c_result_code(self): + strval = self.value + assert isinstance(strval, basestring) + cmpval = repr(float(strval)) + if cmpval == 'nan': + return "(Py_HUGE_VAL * 0)" + elif cmpval == 'inf': + return "Py_HUGE_VAL" + elif cmpval == '-inf': + return "(-Py_HUGE_VAL)" + else: + return strval + + def generate_evaluation_code(self, code): + c_value = self.get_constant_c_result_code() + if self.type.is_pyobject: + self.result_code = code.get_py_float(self.value, c_value) + else: + self.result_code = c_value + + +def _analyse_name_as_type(name, pos, env): + type = PyrexTypes.parse_basic_type(name) + if type is not None: + return type + + global_entry = env.global_scope().lookup(name) + if global_entry and global_entry.type and ( + global_entry.type.is_extension_type + or global_entry.type.is_struct_or_union + or global_entry.type.is_builtin_type + or global_entry.type.is_cpp_class): + return global_entry.type + + from .TreeFragment import TreeFragment + with local_errors(ignore=True): + pos = (pos[0], pos[1], pos[2]-7) + try: + declaration = TreeFragment(u"sizeof(%s)" % name, name=pos[0].filename, initial_pos=pos) + except CompileError: + pass + else: + sizeof_node = declaration.root.stats[0].expr + if isinstance(sizeof_node, SizeofTypeNode): + sizeof_node = sizeof_node.analyse_types(env) + if isinstance(sizeof_node, SizeofTypeNode): + return sizeof_node.arg_type + return None + + +class BytesNode(ConstNode): + # A char* or bytes literal + # + # value BytesLiteral + + is_string_literal = True + # start off as Python 'bytes' to support len() in O(1) + type = bytes_type + + def calculate_constant_result(self): + self.constant_result = self.value + + def as_sliced_node(self, start, stop, step=None): + value = StringEncoding.bytes_literal(self.value[start:stop:step], self.value.encoding) + return BytesNode(self.pos, value=value, constant_result=value) + + def compile_time_value(self, denv): + return self.value.byteencode() + + def analyse_as_type(self, env): + return _analyse_name_as_type(self.value.decode('ISO8859-1'), self.pos, env) + + def can_coerce_to_char_literal(self): + return len(self.value) == 1 + + def coerce_to_boolean(self, env): + # This is special because testing a C char* for truth directly + # would yield the wrong result. + bool_value = bool(self.value) + return BoolNode(self.pos, value=bool_value, constant_result=bool_value) + + def coerce_to(self, dst_type, env): + if self.type == dst_type: + return self + if dst_type.is_int: + if not self.can_coerce_to_char_literal(): + error(self.pos, "Only single-character string literals can be coerced into ints.") + return self + if dst_type.is_unicode_char: + error(self.pos, "Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead.") + return self + return CharNode(self.pos, value=self.value, + constant_result=ord(self.value)) + + node = BytesNode(self.pos, value=self.value, constant_result=self.constant_result) + if dst_type.is_pyobject: + if dst_type in (py_object_type, Builtin.bytes_type): + node.type = Builtin.bytes_type + else: + self.check_for_coercion_error(dst_type, env, fail=True) + return node + elif dst_type in (PyrexTypes.c_char_ptr_type, PyrexTypes.c_const_char_ptr_type): + node.type = dst_type + return node + elif dst_type in (PyrexTypes.c_uchar_ptr_type, PyrexTypes.c_const_uchar_ptr_type, PyrexTypes.c_void_ptr_type): + node.type = (PyrexTypes.c_const_char_ptr_type if dst_type == PyrexTypes.c_const_uchar_ptr_type + else PyrexTypes.c_char_ptr_type) + return CastNode(node, dst_type) + elif dst_type.assignable_from(PyrexTypes.c_char_ptr_type): + # Exclude the case of passing a C string literal into a non-const C++ string. + if not dst_type.is_cpp_class or dst_type.is_const: + node.type = dst_type + return node + + # We still need to perform normal coerce_to processing on the + # result, because we might be coercing to an extension type, + # in which case a type test node will be needed. + return ConstNode.coerce_to(node, dst_type, env) + + def generate_evaluation_code(self, code): + if self.type.is_pyobject: + result = code.get_py_string_const(self.value) + elif self.type.is_const: + result = code.get_string_const(self.value) + else: + # not const => use plain C string literal and cast to mutable type + literal = self.value.as_c_string_literal() + # C++ may require a cast + result = typecast(self.type, PyrexTypes.c_void_ptr_type, literal) + self.result_code = result + + def get_constant_c_result_code(self): + return None # FIXME + + def calculate_result_code(self): + return self.result_code + + +class UnicodeNode(ConstNode): + # A Py_UNICODE* or unicode literal + # + # value EncodedString + # bytes_value BytesLiteral the literal parsed as bytes string + # ('-3' unicode literals only) + + is_string_literal = True + bytes_value = None + type = unicode_type + + def calculate_constant_result(self): + self.constant_result = self.value + + def analyse_as_type(self, env): + return _analyse_name_as_type(self.value, self.pos, env) + + def as_sliced_node(self, start, stop, step=None): + if StringEncoding.string_contains_surrogates(self.value[:stop]): + # this is unsafe as it may give different results + # in different runtimes + return None + value = StringEncoding.EncodedString(self.value[start:stop:step]) + value.encoding = self.value.encoding + if self.bytes_value is not None: + bytes_value = StringEncoding.bytes_literal( + self.bytes_value[start:stop:step], self.bytes_value.encoding) + else: + bytes_value = None + return UnicodeNode( + self.pos, value=value, bytes_value=bytes_value, + constant_result=value) + + def coerce_to(self, dst_type, env): + if dst_type is self.type: + pass + elif dst_type.is_unicode_char: + if not self.can_coerce_to_char_literal(): + error(self.pos, + "Only single-character Unicode string literals or " + "surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.") + return self + int_value = ord(self.value) + return IntNode(self.pos, type=dst_type, value=str(int_value), + constant_result=int_value) + elif not dst_type.is_pyobject: + if dst_type.is_string and self.bytes_value is not None: + # special case: '-3' enforced unicode literal used in a + # C char* context + return BytesNode(self.pos, value=self.bytes_value + ).coerce_to(dst_type, env) + if dst_type.is_pyunicode_ptr: + node = UnicodeNode(self.pos, value=self.value) + node.type = dst_type + return node + error(self.pos, + "Unicode literals do not support coercion to C types other " + "than Py_UNICODE/Py_UCS4 (for characters) or Py_UNICODE* " + "(for strings).") + elif dst_type not in (py_object_type, Builtin.basestring_type): + self.check_for_coercion_error(dst_type, env, fail=True) + return self + + def can_coerce_to_char_literal(self): + return len(self.value) == 1 + ## or (len(self.value) == 2 + ## and (0xD800 <= self.value[0] <= 0xDBFF) + ## and (0xDC00 <= self.value[1] <= 0xDFFF)) + + def coerce_to_boolean(self, env): + bool_value = bool(self.value) + return BoolNode(self.pos, value=bool_value, constant_result=bool_value) + + def contains_surrogates(self): + return StringEncoding.string_contains_surrogates(self.value) + + def generate_evaluation_code(self, code): + if self.type.is_pyobject: + # FIXME: this should go away entirely! + # Since string_contains_lone_surrogates() returns False for surrogate pairs in Py2/UCS2, + # Py2 can generate different code from Py3 here. Let's hope we get away with claiming that + # the processing of surrogate pairs in code was always ambiguous and lead to different results + # on P16/32bit Unicode platforms. + if StringEncoding.string_contains_lone_surrogates(self.value): + # lone (unpaired) surrogates are not really portable and cannot be + # decoded by the UTF-8 codec in Py3.3 + self.result_code = code.get_py_const(py_object_type, 'ustring') + data_cname = code.get_string_const( + StringEncoding.BytesLiteral(self.value.encode('unicode_escape'))) + const_code = code.get_cached_constants_writer(self.result_code) + if const_code is None: + return # already initialised + const_code.mark_pos(self.pos) + const_code.putln( + "%s = PyUnicode_DecodeUnicodeEscape(%s, sizeof(%s) - 1, NULL); %s" % ( + self.result_code, + data_cname, + data_cname, + const_code.error_goto_if_null(self.result_code, self.pos))) + const_code.put_error_if_neg( + self.pos, "__Pyx_PyUnicode_READY(%s)" % self.result_code) + else: + self.result_code = code.get_py_string_const(self.value) + else: + self.result_code = code.get_pyunicode_ptr_const(self.value) + + def calculate_result_code(self): + return self.result_code + + def compile_time_value(self, env): + return self.value + + +class StringNode(PyConstNode): + # A Python str object, i.e. a byte string in Python 2.x and a + # unicode string in Python 3.x + # + # value BytesLiteral (or EncodedString with ASCII content) + # unicode_value EncodedString or None + # is_identifier boolean + + type = str_type + is_string_literal = True + is_identifier = None + unicode_value = None + + def calculate_constant_result(self): + if self.unicode_value is not None: + # only the Unicode value is portable across Py2/3 + self.constant_result = self.unicode_value + + def analyse_as_type(self, env): + return _analyse_name_as_type(self.unicode_value or self.value.decode('ISO8859-1'), self.pos, env) + + def as_sliced_node(self, start, stop, step=None): + value = type(self.value)(self.value[start:stop:step]) + value.encoding = self.value.encoding + if self.unicode_value is not None: + if StringEncoding.string_contains_surrogates(self.unicode_value[:stop]): + # this is unsafe as it may give different results in different runtimes + return None + unicode_value = StringEncoding.EncodedString( + self.unicode_value[start:stop:step]) + else: + unicode_value = None + return StringNode( + self.pos, value=value, unicode_value=unicode_value, + constant_result=value, is_identifier=self.is_identifier) + + def coerce_to(self, dst_type, env): + if dst_type is not py_object_type and not str_type.subtype_of(dst_type): +# if dst_type is Builtin.bytes_type: +# # special case: bytes = 'str literal' +# return BytesNode(self.pos, value=self.value) + if not dst_type.is_pyobject: + return BytesNode(self.pos, value=self.value).coerce_to(dst_type, env) + if dst_type is not Builtin.basestring_type: + self.check_for_coercion_error(dst_type, env, fail=True) + return self + + def can_coerce_to_char_literal(self): + return not self.is_identifier and len(self.value) == 1 + + def generate_evaluation_code(self, code): + self.result_code = code.get_py_string_const( + self.value, identifier=self.is_identifier, is_str=True, + unicode_value=self.unicode_value) + + def get_constant_c_result_code(self): + return None + + def calculate_result_code(self): + return self.result_code + + def compile_time_value(self, env): + if self.value.is_unicode: + return self.value + if not IS_PYTHON3: + # use plain str/bytes object in Py2 + return self.value.byteencode() + # in Py3, always return a Unicode string + if self.unicode_value is not None: + return self.unicode_value + return self.value.decode('iso8859-1') + + +class IdentifierStringNode(StringNode): + # A special str value that represents an identifier (bytes in Py2, + # unicode in Py3). + is_identifier = True + + +class ImagNode(AtomicExprNode): + # Imaginary number literal + # + # value string imaginary part (float value) + + type = PyrexTypes.c_double_complex_type + + def calculate_constant_result(self): + self.constant_result = complex(0.0, float(self.value)) + + def compile_time_value(self, denv): + return complex(0.0, float(self.value)) + + def analyse_types(self, env): + self.type.create_declaration_utility_code(env) + return self + + def may_be_none(self): + return False + + def coerce_to(self, dst_type, env): + if self.type is dst_type: + return self + node = ImagNode(self.pos, value=self.value) + if dst_type.is_pyobject: + node.is_temp = 1 + node.type = Builtin.complex_type + # We still need to perform normal coerce_to processing on the + # result, because we might be coercing to an extension type, + # in which case a type test node will be needed. + return AtomicExprNode.coerce_to(node, dst_type, env) + + gil_message = "Constructing complex number" + + def calculate_result_code(self): + if self.type.is_pyobject: + return self.result() + else: + return "%s(0, %r)" % (self.type.from_parts, float(self.value)) + + def generate_result_code(self, code): + if self.type.is_pyobject: + code.putln( + "%s = PyComplex_FromDoubles(0.0, %r); %s" % ( + self.result(), + float(self.value), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + +class NewExprNode(AtomicExprNode): + + # C++ new statement + # + # cppclass node c++ class to create + + type = None + + def infer_type(self, env): + type = self.cppclass.analyse_as_type(env) + if type is None or not type.is_cpp_class: + error(self.pos, "new operator can only be applied to a C++ class") + self.type = error_type + return + self.cpp_check(env) + constructor = type.get_constructor(self.pos) + self.class_type = type + self.entry = constructor + self.type = constructor.type + return self.type + + def analyse_types(self, env): + if self.type is None: + self.infer_type(env) + return self + + def may_be_none(self): + return False + + def generate_result_code(self, code): + pass + + def calculate_result_code(self): + return "new " + self.class_type.empty_declaration_code() + + +class NameNode(AtomicExprNode): + # Reference to a local or global variable name. + # + # name string Python name of the variable + # entry Entry Symbol table entry + # type_entry Entry For extension type names, the original type entry + # cf_is_null boolean Is uninitialized before this node + # cf_maybe_null boolean Maybe uninitialized before this node + # allow_null boolean Don't raise UnboundLocalError + # nogil boolean Whether it is used in a nogil context + + is_name = True + is_cython_module = False + cython_attribute = None + lhs_of_first_assignment = False # TODO: remove me + is_used_as_rvalue = 0 + entry = None + type_entry = None + cf_maybe_null = True + cf_is_null = False + allow_null = False + nogil = False + inferred_type = None + + def as_cython_attribute(self): + return self.cython_attribute + + def type_dependencies(self, env): + if self.entry is None: + self.entry = env.lookup(self.name) + if self.entry is not None and self.entry.type.is_unspecified: + return (self,) + else: + return () + + def infer_type(self, env): + if self.entry is None: + self.entry = env.lookup(self.name) + if self.entry is None or self.entry.type is unspecified_type: + if self.inferred_type is not None: + return self.inferred_type + return py_object_type + elif (self.entry.type.is_extension_type or self.entry.type.is_builtin_type) and \ + self.name == self.entry.type.name: + # Unfortunately the type attribute of type objects + # is used for the pointer to the type they represent. + return type_type + elif self.entry.type.is_cfunction: + if self.entry.scope.is_builtin_scope: + # special case: optimised builtin functions must be treated as Python objects + return py_object_type + else: + # special case: referring to a C function must return its pointer + return PyrexTypes.CPtrType(self.entry.type) + else: + # If entry is inferred as pyobject it's safe to use local + # NameNode's inferred_type. + if self.entry.type.is_pyobject and self.inferred_type: + # Overflow may happen if integer + if not (self.inferred_type.is_int and self.entry.might_overflow): + return self.inferred_type + return self.entry.type + + def compile_time_value(self, denv): + try: + return denv.lookup(self.name) + except KeyError: + error(self.pos, "Compile-time name '%s' not defined" % self.name) + + def get_constant_c_result_code(self): + if not self.entry or self.entry.type.is_pyobject: + return None + return self.entry.cname + + def coerce_to(self, dst_type, env): + # If coercing to a generic pyobject and this is a builtin + # C function with a Python equivalent, manufacture a NameNode + # referring to the Python builtin. + #print "NameNode.coerce_to:", self.name, dst_type ### + if dst_type is py_object_type: + entry = self.entry + if entry and entry.is_cfunction: + var_entry = entry.as_variable + if var_entry: + if var_entry.is_builtin and var_entry.is_const: + var_entry = env.declare_builtin(var_entry.name, self.pos) + node = NameNode(self.pos, name = self.name) + node.entry = var_entry + node.analyse_rvalue_entry(env) + return node + + return super(NameNode, self).coerce_to(dst_type, env) + + def declare_from_annotation(self, env, as_target=False): + """Implements PEP 526 annotation typing in a fairly relaxed way. + + Annotations are ignored for global variables, Python class attributes and already declared variables. + String literals are allowed and ignored. + The ambiguous Python types 'int' and 'long' are ignored and the 'cython.int' form must be used instead. + """ + if not env.directives['annotation_typing']: + return + if env.is_module_scope or env.is_py_class_scope: + # annotations never create global cdef names and Python classes don't support them anyway + return + name = self.name + if self.entry or env.lookup_here(name) is not None: + # already declared => ignore annotation + return + + annotation = self.annotation + if annotation.is_string_literal: + # name: "description" => not a type, but still a declared variable or attribute + atype = None + else: + _, atype = analyse_type_annotation(annotation, env) + if atype is None: + atype = unspecified_type if as_target and env.directives['infer_types'] != False else py_object_type + self.entry = env.declare_var(name, atype, self.pos, is_cdef=not as_target) + self.entry.annotation = annotation + + def analyse_as_module(self, env): + # Try to interpret this as a reference to a cimported module. + # Returns the module scope, or None. + entry = self.entry + if not entry: + entry = env.lookup(self.name) + if entry and entry.as_module: + return entry.as_module + return None + + def analyse_as_type(self, env): + if self.cython_attribute: + type = PyrexTypes.parse_basic_type(self.cython_attribute) + else: + type = PyrexTypes.parse_basic_type(self.name) + if type: + return type + entry = self.entry + if not entry: + entry = env.lookup(self.name) + if entry and entry.is_type: + return entry.type + else: + return None + + def analyse_as_extension_type(self, env): + # Try to interpret this as a reference to an extension type. + # Returns the extension type, or None. + entry = self.entry + if not entry: + entry = env.lookup(self.name) + if entry and entry.is_type: + if entry.type.is_extension_type or entry.type.is_builtin_type: + return entry.type + return None + + def analyse_target_declaration(self, env): + if not self.entry: + self.entry = env.lookup_here(self.name) + if not self.entry and self.annotation is not None: + # name : type = ... + self.declare_from_annotation(env, as_target=True) + if not self.entry: + if env.directives['warn.undeclared']: + warning(self.pos, "implicit declaration of '%s'" % self.name, 1) + if env.directives['infer_types'] != False: + type = unspecified_type + else: + type = py_object_type + self.entry = env.declare_var(self.name, type, self.pos) + if self.entry.is_declared_generic: + self.result_ctype = py_object_type + if self.entry.as_module: + # cimported modules namespace can shadow actual variables + self.entry.is_variable = 1 + + def analyse_types(self, env): + self.initialized_check = env.directives['initializedcheck'] + entry = self.entry + if entry is None: + entry = env.lookup(self.name) + if not entry: + entry = env.declare_builtin(self.name, self.pos) + if entry and entry.is_builtin and entry.is_const: + self.is_literal = True + if not entry: + self.type = PyrexTypes.error_type + return self + self.entry = entry + entry.used = 1 + if entry.type.is_buffer: + from . import Buffer + Buffer.used_buffer_aux_vars(entry) + self.analyse_rvalue_entry(env) + return self + + def analyse_target_types(self, env): + self.analyse_entry(env, is_target=True) + + entry = self.entry + if entry.is_cfunction and entry.as_variable: + # FIXME: unify "is_overridable" flags below + if (entry.is_overridable or entry.type.is_overridable) or not self.is_lvalue() and entry.fused_cfunction: + # We need this for assigning to cpdef names and for the fused 'def' TreeFragment + entry = self.entry = entry.as_variable + self.type = entry.type + + if self.type.is_const: + error(self.pos, "Assignment to const '%s'" % self.name) + if self.type.is_reference: + error(self.pos, "Assignment to reference '%s'" % self.name) + if not self.is_lvalue(): + error(self.pos, "Assignment to non-lvalue '%s'" % self.name) + self.type = PyrexTypes.error_type + entry.used = 1 + if entry.type.is_buffer: + from . import Buffer + Buffer.used_buffer_aux_vars(entry) + return self + + def analyse_rvalue_entry(self, env): + #print "NameNode.analyse_rvalue_entry:", self.name ### + #print "Entry:", self.entry.__dict__ ### + self.analyse_entry(env) + entry = self.entry + + if entry.is_declared_generic: + self.result_ctype = py_object_type + + if entry.is_pyglobal or entry.is_builtin: + if entry.is_builtin and entry.is_const: + self.is_temp = 0 + else: + self.is_temp = 1 + + self.is_used_as_rvalue = 1 + elif entry.type.is_memoryviewslice: + self.is_temp = False + self.is_used_as_rvalue = True + self.use_managed_ref = True + return self + + def nogil_check(self, env): + self.nogil = True + if self.is_used_as_rvalue: + entry = self.entry + if entry.is_builtin: + if not entry.is_const: # cached builtins are ok + self.gil_error() + elif entry.is_pyglobal: + self.gil_error() + + gil_message = "Accessing Python global or builtin" + + def analyse_entry(self, env, is_target=False): + #print "NameNode.analyse_entry:", self.name ### + self.check_identifier_kind() + entry = self.entry + type = entry.type + if (not is_target and type.is_pyobject and self.inferred_type and + self.inferred_type.is_builtin_type): + # assume that type inference is smarter than the static entry + type = self.inferred_type + self.type = type + + def check_identifier_kind(self): + # Check that this is an appropriate kind of name for use in an + # expression. Also finds the variable entry associated with + # an extension type. + entry = self.entry + if entry.is_type and entry.type.is_extension_type: + self.type_entry = entry + if entry.is_type and entry.type.is_enum: + py_entry = Symtab.Entry(self.name, None, py_object_type) + py_entry.is_pyglobal = True + py_entry.scope = self.entry.scope + self.entry = py_entry + elif not (entry.is_const or entry.is_variable or + entry.is_builtin or entry.is_cfunction or + entry.is_cpp_class): + if self.entry.as_variable: + self.entry = self.entry.as_variable + elif not self.is_cython_module: + error(self.pos, "'%s' is not a constant, variable or function identifier" % self.name) + + def is_cimported_module_without_shadow(self, env): + if self.is_cython_module or self.cython_attribute: + return False + entry = self.entry or env.lookup(self.name) + return entry.as_module and not entry.is_variable + + def is_simple(self): + # If it's not a C variable, it'll be in a temp. + return 1 + + def may_be_none(self): + if self.cf_state and self.type and (self.type.is_pyobject or + self.type.is_memoryviewslice): + # gard against infinite recursion on self-dependencies + if getattr(self, '_none_checking', False): + # self-dependency - either this node receives a None + # value from *another* node, or it can not reference + # None at this point => safe to assume "not None" + return False + self._none_checking = True + # evaluate control flow state to see if there were any + # potential None values assigned to the node so far + may_be_none = False + for assignment in self.cf_state: + if assignment.rhs.may_be_none(): + may_be_none = True + break + del self._none_checking + return may_be_none + return super(NameNode, self).may_be_none() + + def nonlocally_immutable(self): + if ExprNode.nonlocally_immutable(self): + return True + entry = self.entry + if not entry or entry.in_closure: + return False + return entry.is_local or entry.is_arg or entry.is_builtin or entry.is_readonly + + def calculate_target_results(self, env): + pass + + def check_const(self): + entry = self.entry + if entry is not None and not ( + entry.is_const or + entry.is_cfunction or + entry.is_builtin or + entry.type.is_const): + self.not_const() + return False + return True + + def check_const_addr(self): + entry = self.entry + if not (entry.is_cglobal or entry.is_cfunction or entry.is_builtin): + self.addr_not_const() + return False + return True + + def is_lvalue(self): + return ( + self.entry.is_variable and + not self.entry.is_readonly + ) or ( + self.entry.is_cfunction and + self.entry.is_overridable + ) + + def is_addressable(self): + return self.entry.is_variable and not self.type.is_memoryviewslice + + def is_ephemeral(self): + # Name nodes are never ephemeral, even if the + # result is in a temporary. + return 0 + + def calculate_result_code(self): + entry = self.entry + if not entry: + return "" # There was an error earlier + return entry.cname + + def generate_result_code(self, code): + assert hasattr(self, 'entry') + entry = self.entry + if entry is None: + return # There was an error earlier + if entry.utility_code: + code.globalstate.use_utility_code(entry.utility_code) + if entry.is_builtin and entry.is_const: + return # Lookup already cached + elif entry.is_pyclass_attr: + assert entry.type.is_pyobject, "Python global or builtin not a Python object" + interned_cname = code.intern_identifier(self.entry.name) + if entry.is_builtin: + namespace = Naming.builtins_cname + else: # entry.is_pyglobal + namespace = entry.scope.namespace_cname + if not self.cf_is_null: + code.putln( + '%s = PyObject_GetItem(%s, %s);' % ( + self.result(), + namespace, + interned_cname)) + code.putln('if (unlikely(!%s)) {' % self.result()) + code.putln('PyErr_Clear();') + code.globalstate.use_utility_code( + UtilityCode.load_cached("GetModuleGlobalName", "ObjectHandling.c")) + code.putln( + '__Pyx_GetModuleGlobalName(%s, %s);' % ( + self.result(), + interned_cname)) + if not self.cf_is_null: + code.putln("}") + code.putln(code.error_goto_if_null(self.result(), self.pos)) + code.put_gotref(self.py_result()) + + elif entry.is_builtin and not entry.scope.is_module_scope: + # known builtin + assert entry.type.is_pyobject, "Python global or builtin not a Python object" + interned_cname = code.intern_identifier(self.entry.name) + code.globalstate.use_utility_code( + UtilityCode.load_cached("GetBuiltinName", "ObjectHandling.c")) + code.putln( + '%s = __Pyx_GetBuiltinName(%s); %s' % ( + self.result(), + interned_cname, + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + elif entry.is_pyglobal or (entry.is_builtin and entry.scope.is_module_scope): + # name in class body, global name or unknown builtin + assert entry.type.is_pyobject, "Python global or builtin not a Python object" + interned_cname = code.intern_identifier(self.entry.name) + if entry.scope.is_module_scope: + code.globalstate.use_utility_code( + UtilityCode.load_cached("GetModuleGlobalName", "ObjectHandling.c")) + code.putln( + '__Pyx_GetModuleGlobalName(%s, %s); %s' % ( + self.result(), + interned_cname, + code.error_goto_if_null(self.result(), self.pos))) + else: + # FIXME: is_pyglobal is also used for class namespace + code.globalstate.use_utility_code( + UtilityCode.load_cached("GetNameInClass", "ObjectHandling.c")) + code.putln( + '__Pyx_GetNameInClass(%s, %s, %s); %s' % ( + self.result(), + entry.scope.namespace_cname, + interned_cname, + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + elif entry.is_local or entry.in_closure or entry.from_closure or entry.type.is_memoryviewslice: + # Raise UnboundLocalError for objects and memoryviewslices + raise_unbound = ( + (self.cf_maybe_null or self.cf_is_null) and not self.allow_null) + null_code = entry.type.check_for_null_code(entry.cname) + + memslice_check = entry.type.is_memoryviewslice and self.initialized_check + + if null_code and raise_unbound and (entry.type.is_pyobject or memslice_check): + code.put_error_if_unbound(self.pos, entry, self.in_nogil_context) + + def generate_assignment_code(self, rhs, code, overloaded_assignment=False, + exception_check=None, exception_value=None): + #print "NameNode.generate_assignment_code:", self.name ### + entry = self.entry + if entry is None: + return # There was an error earlier + + if (self.entry.type.is_ptr and isinstance(rhs, ListNode) + and not self.lhs_of_first_assignment and not rhs.in_module_scope): + error(self.pos, "Literal list must be assigned to pointer at time of declaration") + + # is_pyglobal seems to be True for module level-globals only. + # We use this to access class->tp_dict if necessary. + if entry.is_pyglobal: + assert entry.type.is_pyobject, "Python global or builtin not a Python object" + interned_cname = code.intern_identifier(self.entry.name) + namespace = self.entry.scope.namespace_cname + if entry.is_member: + # if the entry is a member we have to cheat: SetAttr does not work + # on types, so we create a descriptor which is then added to tp_dict + setter = 'PyDict_SetItem' + namespace = '%s->tp_dict' % namespace + elif entry.scope.is_module_scope: + setter = 'PyDict_SetItem' + namespace = Naming.moddict_cname + elif entry.is_pyclass_attr: + code.globalstate.use_utility_code(UtilityCode.load_cached("SetNameInClass", "ObjectHandling.c")) + setter = '__Pyx_SetNameInClass' + else: + assert False, repr(entry) + code.put_error_if_neg( + self.pos, + '%s(%s, %s, %s)' % ( + setter, + namespace, + interned_cname, + rhs.py_result())) + if debug_disposal_code: + print("NameNode.generate_assignment_code:") + print("...generating disposal code for %s" % rhs) + rhs.generate_disposal_code(code) + rhs.free_temps(code) + if entry.is_member: + # in Py2.6+, we need to invalidate the method cache + code.putln("PyType_Modified(%s);" % + entry.scope.parent_type.typeptr_cname) + else: + if self.type.is_memoryviewslice: + self.generate_acquire_memoryviewslice(rhs, code) + + elif self.type.is_buffer: + # Generate code for doing the buffer release/acquisition. + # This might raise an exception in which case the assignment (done + # below) will not happen. + # + # The reason this is not in a typetest-like node is because the + # variables that the acquired buffer info is stored to is allocated + # per entry and coupled with it. + self.generate_acquire_buffer(rhs, code) + assigned = False + if self.type.is_pyobject: + #print "NameNode.generate_assignment_code: to", self.name ### + #print "...from", rhs ### + #print "...LHS type", self.type, "ctype", self.ctype() ### + #print "...RHS type", rhs.type, "ctype", rhs.ctype() ### + if self.use_managed_ref: + rhs.make_owned_reference(code) + is_external_ref = entry.is_cglobal or self.entry.in_closure or self.entry.from_closure + if is_external_ref: + if not self.cf_is_null: + if self.cf_maybe_null: + code.put_xgotref(self.py_result()) + else: + code.put_gotref(self.py_result()) + assigned = True + if entry.is_cglobal: + code.put_decref_set( + self.result(), rhs.result_as(self.ctype())) + else: + if not self.cf_is_null: + if self.cf_maybe_null: + code.put_xdecref_set( + self.result(), rhs.result_as(self.ctype())) + else: + code.put_decref_set( + self.result(), rhs.result_as(self.ctype())) + else: + assigned = False + if is_external_ref: + code.put_giveref(rhs.py_result()) + if not self.type.is_memoryviewslice: + if not assigned: + if overloaded_assignment: + result = rhs.result() + if exception_check == '+': + translate_cpp_exception( + code, self.pos, + '%s = %s;' % (self.result(), result), + self.result() if self.type.is_pyobject else None, + exception_value, self.in_nogil_context) + else: + code.putln('%s = %s;' % (self.result(), result)) + else: + result = rhs.result_as(self.ctype()) + + if is_pythran_expr(self.type): + code.putln('new (&%s) decltype(%s){%s};' % (self.result(), self.result(), result)) + elif result != self.result(): + code.putln('%s = %s;' % (self.result(), result)) + if debug_disposal_code: + print("NameNode.generate_assignment_code:") + print("...generating post-assignment code for %s" % rhs) + rhs.generate_post_assignment_code(code) + elif rhs.result_in_temp(): + rhs.generate_post_assignment_code(code) + + rhs.free_temps(code) + + def generate_acquire_memoryviewslice(self, rhs, code): + """ + Slices, coercions from objects, return values etc are new references. + We have a borrowed reference in case of dst = src + """ + from . import MemoryView + + MemoryView.put_acquire_memoryviewslice( + lhs_cname=self.result(), + lhs_type=self.type, + lhs_pos=self.pos, + rhs=rhs, + code=code, + have_gil=not self.in_nogil_context, + first_assignment=self.cf_is_null) + + def generate_acquire_buffer(self, rhs, code): + # rhstmp is only used in case the rhs is a complicated expression leading to + # the object, to avoid repeating the same C expression for every reference + # to the rhs. It does NOT hold a reference. + pretty_rhs = isinstance(rhs, NameNode) or rhs.is_temp + if pretty_rhs: + rhstmp = rhs.result_as(self.ctype()) + else: + rhstmp = code.funcstate.allocate_temp(self.entry.type, manage_ref=False) + code.putln('%s = %s;' % (rhstmp, rhs.result_as(self.ctype()))) + + from . import Buffer + Buffer.put_assign_to_buffer(self.result(), rhstmp, self.entry, + is_initialized=not self.lhs_of_first_assignment, + pos=self.pos, code=code) + + if not pretty_rhs: + code.putln("%s = 0;" % rhstmp) + code.funcstate.release_temp(rhstmp) + + def generate_deletion_code(self, code, ignore_nonexisting=False): + if self.entry is None: + return # There was an error earlier + elif self.entry.is_pyclass_attr: + namespace = self.entry.scope.namespace_cname + interned_cname = code.intern_identifier(self.entry.name) + if ignore_nonexisting: + key_error_code = 'PyErr_Clear(); else' + else: + # minor hack: fake a NameError on KeyError + key_error_code = ( + '{ PyErr_Clear(); PyErr_Format(PyExc_NameError, "name \'%%s\' is not defined", "%s"); }' % + self.entry.name) + code.putln( + 'if (unlikely(PyObject_DelItem(%s, %s) < 0)) {' + ' if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) %s' + ' %s ' + '}' % (namespace, interned_cname, + key_error_code, + code.error_goto(self.pos))) + elif self.entry.is_pyglobal: + code.globalstate.use_utility_code( + UtilityCode.load_cached("PyObjectSetAttrStr", "ObjectHandling.c")) + interned_cname = code.intern_identifier(self.entry.name) + del_code = '__Pyx_PyObject_DelAttrStr(%s, %s)' % ( + Naming.module_cname, interned_cname) + if ignore_nonexisting: + code.putln( + 'if (unlikely(%s < 0)) {' + ' if (likely(PyErr_ExceptionMatches(PyExc_AttributeError))) PyErr_Clear(); else %s ' + '}' % (del_code, code.error_goto(self.pos))) + else: + code.put_error_if_neg(self.pos, del_code) + elif self.entry.type.is_pyobject or self.entry.type.is_memoryviewslice: + if not self.cf_is_null: + if self.cf_maybe_null and not ignore_nonexisting: + code.put_error_if_unbound(self.pos, self.entry) + + if self.entry.type.is_pyobject: + if self.entry.in_closure: + # generator + if ignore_nonexisting and self.cf_maybe_null: + code.put_xgotref(self.result()) + else: + code.put_gotref(self.result()) + if ignore_nonexisting and self.cf_maybe_null: + code.put_xdecref(self.result(), self.ctype()) + else: + code.put_decref(self.result(), self.ctype()) + code.putln('%s = NULL;' % self.result()) + else: + code.put_xdecref_memoryviewslice(self.entry.cname, + have_gil=not self.nogil) + else: + error(self.pos, "Deletion of C names not supported") + + def annotate(self, code): + if hasattr(self, 'is_called') and self.is_called: + pos = (self.pos[0], self.pos[1], self.pos[2] - len(self.name) - 1) + if self.type.is_pyobject: + style, text = 'py_call', 'python function (%s)' + else: + style, text = 'c_call', 'c function (%s)' + code.annotate(pos, AnnotationItem(style, text % self.type, size=len(self.name))) + +class BackquoteNode(ExprNode): + # `expr` + # + # arg ExprNode + + type = py_object_type + + subexprs = ['arg'] + + def analyse_types(self, env): + self.arg = self.arg.analyse_types(env) + self.arg = self.arg.coerce_to_pyobject(env) + self.is_temp = 1 + return self + + gil_message = "Backquote expression" + + def calculate_constant_result(self): + self.constant_result = repr(self.arg.constant_result) + + def generate_result_code(self, code): + code.putln( + "%s = PyObject_Repr(%s); %s" % ( + self.result(), + self.arg.py_result(), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + +class ImportNode(ExprNode): + # Used as part of import statement implementation. + # Implements result = + # __import__(module_name, globals(), None, name_list, level) + # + # module_name StringNode dotted name of module. Empty module + # name means importing the parent package according + # to level + # name_list ListNode or None list of names to be imported + # level int relative import level: + # -1: attempt both relative import and absolute import; + # 0: absolute import; + # >0: the number of parent directories to search + # relative to the current module. + # None: decide the level according to language level and + # directives + + type = py_object_type + + subexprs = ['module_name', 'name_list'] + + def analyse_types(self, env): + if self.level is None: + if (env.directives['py2_import'] or + Future.absolute_import not in env.global_scope().context.future_directives): + self.level = -1 + else: + self.level = 0 + module_name = self.module_name.analyse_types(env) + self.module_name = module_name.coerce_to_pyobject(env) + if self.name_list: + name_list = self.name_list.analyse_types(env) + self.name_list = name_list.coerce_to_pyobject(env) + self.is_temp = 1 + return self + + gil_message = "Python import" + + def generate_result_code(self, code): + if self.name_list: + name_list_code = self.name_list.py_result() + else: + name_list_code = "0" + + code.globalstate.use_utility_code(UtilityCode.load_cached("Import", "ImportExport.c")) + import_code = "__Pyx_Import(%s, %s, %d)" % ( + self.module_name.py_result(), + name_list_code, + self.level) + + if (self.level <= 0 and + self.module_name.is_string_literal and + self.module_name.value in utility_code_for_imports): + helper_func, code_name, code_file = utility_code_for_imports[self.module_name.value] + code.globalstate.use_utility_code(UtilityCode.load_cached(code_name, code_file)) + import_code = '%s(%s)' % (helper_func, import_code) + + code.putln("%s = %s; %s" % ( + self.result(), + import_code, + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + +class IteratorNode(ExprNode): + # Used as part of for statement implementation. + # + # Implements result = iter(sequence) + # + # sequence ExprNode + + type = py_object_type + iter_func_ptr = None + counter_cname = None + cpp_iterator_cname = None + reversed = False # currently only used for list/tuple types (see Optimize.py) + is_async = False + + subexprs = ['sequence'] + + def analyse_types(self, env): + self.sequence = self.sequence.analyse_types(env) + if (self.sequence.type.is_array or self.sequence.type.is_ptr) and \ + not self.sequence.type.is_string: + # C array iteration will be transformed later on + self.type = self.sequence.type + elif self.sequence.type.is_cpp_class: + self.analyse_cpp_types(env) + else: + self.sequence = self.sequence.coerce_to_pyobject(env) + if self.sequence.type in (list_type, tuple_type): + self.sequence = self.sequence.as_none_safe_node("'NoneType' object is not iterable") + self.is_temp = 1 + return self + + gil_message = "Iterating over Python object" + + _func_iternext_type = PyrexTypes.CPtrType(PyrexTypes.CFuncType( + PyrexTypes.py_object_type, [ + PyrexTypes.CFuncTypeArg("it", PyrexTypes.py_object_type, None), + ])) + + def type_dependencies(self, env): + return self.sequence.type_dependencies(env) + + def infer_type(self, env): + sequence_type = self.sequence.infer_type(env) + if sequence_type.is_array or sequence_type.is_ptr: + return sequence_type + elif sequence_type.is_cpp_class: + begin = sequence_type.scope.lookup("begin") + if begin is not None: + return begin.type.return_type + elif sequence_type.is_pyobject: + return sequence_type + return py_object_type + + def analyse_cpp_types(self, env): + sequence_type = self.sequence.type + if sequence_type.is_ptr: + sequence_type = sequence_type.base_type + begin = sequence_type.scope.lookup("begin") + end = sequence_type.scope.lookup("end") + if (begin is None + or not begin.type.is_cfunction + or begin.type.args): + error(self.pos, "missing begin() on %s" % self.sequence.type) + self.type = error_type + return + if (end is None + or not end.type.is_cfunction + or end.type.args): + error(self.pos, "missing end() on %s" % self.sequence.type) + self.type = error_type + return + iter_type = begin.type.return_type + if iter_type.is_cpp_class: + if env.lookup_operator_for_types( + self.pos, + "!=", + [iter_type, end.type.return_type]) is None: + error(self.pos, "missing operator!= on result of begin() on %s" % self.sequence.type) + self.type = error_type + return + if env.lookup_operator_for_types(self.pos, '++', [iter_type]) is None: + error(self.pos, "missing operator++ on result of begin() on %s" % self.sequence.type) + self.type = error_type + return + if env.lookup_operator_for_types(self.pos, '*', [iter_type]) is None: + error(self.pos, "missing operator* on result of begin() on %s" % self.sequence.type) + self.type = error_type + return + self.type = iter_type + elif iter_type.is_ptr: + if not (iter_type == end.type.return_type): + error(self.pos, "incompatible types for begin() and end()") + self.type = iter_type + else: + error(self.pos, "result type of begin() on %s must be a C++ class or pointer" % self.sequence.type) + self.type = error_type + return + + def generate_result_code(self, code): + sequence_type = self.sequence.type + if sequence_type.is_cpp_class: + if self.sequence.is_name: + # safe: C++ won't allow you to reassign to class references + begin_func = "%s.begin" % self.sequence.result() + else: + sequence_type = PyrexTypes.c_ptr_type(sequence_type) + self.cpp_iterator_cname = code.funcstate.allocate_temp(sequence_type, manage_ref=False) + code.putln("%s = &%s;" % (self.cpp_iterator_cname, self.sequence.result())) + begin_func = "%s->begin" % self.cpp_iterator_cname + # TODO: Limit scope. + code.putln("%s = %s();" % (self.result(), begin_func)) + return + if sequence_type.is_array or sequence_type.is_ptr: + raise InternalError("for in carray slice not transformed") + + is_builtin_sequence = sequence_type in (list_type, tuple_type) + if not is_builtin_sequence: + # reversed() not currently optimised (see Optimize.py) + assert not self.reversed, "internal error: reversed() only implemented for list/tuple objects" + self.may_be_a_sequence = not sequence_type.is_builtin_type + if self.may_be_a_sequence: + code.putln( + "if (likely(PyList_CheckExact(%s)) || PyTuple_CheckExact(%s)) {" % ( + self.sequence.py_result(), + self.sequence.py_result())) + + if is_builtin_sequence or self.may_be_a_sequence: + self.counter_cname = code.funcstate.allocate_temp( + PyrexTypes.c_py_ssize_t_type, manage_ref=False) + if self.reversed: + if sequence_type is list_type: + init_value = 'PyList_GET_SIZE(%s) - 1' % self.result() + else: + init_value = 'PyTuple_GET_SIZE(%s) - 1' % self.result() + else: + init_value = '0' + code.putln("%s = %s; __Pyx_INCREF(%s); %s = %s;" % ( + self.result(), + self.sequence.py_result(), + self.result(), + self.counter_cname, + init_value)) + if not is_builtin_sequence: + self.iter_func_ptr = code.funcstate.allocate_temp(self._func_iternext_type, manage_ref=False) + if self.may_be_a_sequence: + code.putln("%s = NULL;" % self.iter_func_ptr) + code.putln("} else {") + code.put("%s = -1; " % self.counter_cname) + + code.putln("%s = PyObject_GetIter(%s); %s" % ( + self.result(), + self.sequence.py_result(), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + # PyObject_GetIter() fails if "tp_iternext" is not set, but the check below + # makes it visible to the C compiler that the pointer really isn't NULL, so that + # it can distinguish between the special cases and the generic case + code.putln("%s = Py_TYPE(%s)->tp_iternext; %s" % ( + self.iter_func_ptr, self.py_result(), + code.error_goto_if_null(self.iter_func_ptr, self.pos))) + if self.may_be_a_sequence: + code.putln("}") + + def generate_next_sequence_item(self, test_name, result_name, code): + assert self.counter_cname, "internal error: counter_cname temp not prepared" + final_size = 'Py%s_GET_SIZE(%s)' % (test_name, self.py_result()) + if self.sequence.is_sequence_constructor: + item_count = len(self.sequence.args) + if self.sequence.mult_factor is None: + final_size = item_count + elif isinstance(self.sequence.mult_factor.constant_result, _py_int_types): + final_size = item_count * self.sequence.mult_factor.constant_result + code.putln("if (%s >= %s) break;" % (self.counter_cname, final_size)) + if self.reversed: + inc_dec = '--' + else: + inc_dec = '++' + code.putln("#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS") + code.putln( + "%s = Py%s_GET_ITEM(%s, %s); __Pyx_INCREF(%s); %s%s; %s" % ( + result_name, + test_name, + self.py_result(), + self.counter_cname, + result_name, + self.counter_cname, + inc_dec, + # use the error label to avoid C compiler warnings if we only use it below + code.error_goto_if_neg('0', self.pos) + )) + code.putln("#else") + code.putln( + "%s = PySequence_ITEM(%s, %s); %s%s; %s" % ( + result_name, + self.py_result(), + self.counter_cname, + self.counter_cname, + inc_dec, + code.error_goto_if_null(result_name, self.pos))) + code.put_gotref(result_name) + code.putln("#endif") + + def generate_iter_next_result_code(self, result_name, code): + sequence_type = self.sequence.type + if self.reversed: + code.putln("if (%s < 0) break;" % self.counter_cname) + if sequence_type.is_cpp_class: + if self.cpp_iterator_cname: + end_func = "%s->end" % self.cpp_iterator_cname + else: + end_func = "%s.end" % self.sequence.result() + # TODO: Cache end() call? + code.putln("if (!(%s != %s())) break;" % ( + self.result(), + end_func)) + code.putln("%s = *%s;" % ( + result_name, + self.result())) + code.putln("++%s;" % self.result()) + return + elif sequence_type is list_type: + self.generate_next_sequence_item('List', result_name, code) + return + elif sequence_type is tuple_type: + self.generate_next_sequence_item('Tuple', result_name, code) + return + + if self.may_be_a_sequence: + code.putln("if (likely(!%s)) {" % self.iter_func_ptr) + code.putln("if (likely(PyList_CheckExact(%s))) {" % self.py_result()) + self.generate_next_sequence_item('List', result_name, code) + code.putln("} else {") + self.generate_next_sequence_item('Tuple', result_name, code) + code.putln("}") + code.put("} else ") + + code.putln("{") + code.putln( + "%s = %s(%s);" % ( + result_name, + self.iter_func_ptr, + self.py_result())) + code.putln("if (unlikely(!%s)) {" % result_name) + code.putln("PyObject* exc_type = PyErr_Occurred();") + code.putln("if (exc_type) {") + code.putln("if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();") + code.putln("else %s" % code.error_goto(self.pos)) + code.putln("}") + code.putln("break;") + code.putln("}") + code.put_gotref(result_name) + code.putln("}") + + def free_temps(self, code): + if self.counter_cname: + code.funcstate.release_temp(self.counter_cname) + if self.iter_func_ptr: + code.funcstate.release_temp(self.iter_func_ptr) + self.iter_func_ptr = None + if self.cpp_iterator_cname: + code.funcstate.release_temp(self.cpp_iterator_cname) + ExprNode.free_temps(self, code) + + +class NextNode(AtomicExprNode): + # Used as part of for statement implementation. + # Implements result = next(iterator) + # Created during analyse_types phase. + # The iterator is not owned by this node. + # + # iterator IteratorNode + + def __init__(self, iterator): + AtomicExprNode.__init__(self, iterator.pos) + self.iterator = iterator + + def nogil_check(self, env): + # ignore - errors (if any) are already handled by IteratorNode + pass + + def type_dependencies(self, env): + return self.iterator.type_dependencies(env) + + def infer_type(self, env, iterator_type=None): + if iterator_type is None: + iterator_type = self.iterator.infer_type(env) + if iterator_type.is_ptr or iterator_type.is_array: + return iterator_type.base_type + elif iterator_type.is_cpp_class: + item_type = env.lookup_operator_for_types(self.pos, "*", [iterator_type]).type.return_type + if item_type.is_reference: + item_type = item_type.ref_base_type + if item_type.is_const: + item_type = item_type.const_base_type + return item_type + else: + # Avoid duplication of complicated logic. + fake_index_node = IndexNode( + self.pos, + base=self.iterator.sequence, + index=IntNode(self.pos, value='PY_SSIZE_T_MAX', + type=PyrexTypes.c_py_ssize_t_type)) + return fake_index_node.infer_type(env) + + def analyse_types(self, env): + self.type = self.infer_type(env, self.iterator.type) + self.is_temp = 1 + return self + + def generate_result_code(self, code): + self.iterator.generate_iter_next_result_code(self.result(), code) + + +class AsyncIteratorNode(ExprNode): + # Used as part of 'async for' statement implementation. + # + # Implements result = sequence.__aiter__() + # + # sequence ExprNode + + subexprs = ['sequence'] + + is_async = True + type = py_object_type + is_temp = 1 + + def infer_type(self, env): + return py_object_type + + def analyse_types(self, env): + self.sequence = self.sequence.analyse_types(env) + if not self.sequence.type.is_pyobject: + error(self.pos, "async for loops not allowed on C/C++ types") + self.sequence = self.sequence.coerce_to_pyobject(env) + return self + + def generate_result_code(self, code): + code.globalstate.use_utility_code(UtilityCode.load_cached("AsyncIter", "Coroutine.c")) + code.putln("%s = __Pyx_Coroutine_GetAsyncIter(%s); %s" % ( + self.result(), + self.sequence.py_result(), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.result()) + + +class AsyncNextNode(AtomicExprNode): + # Used as part of 'async for' statement implementation. + # Implements result = iterator.__anext__() + # Created during analyse_types phase. + # The iterator is not owned by this node. + # + # iterator IteratorNode + + type = py_object_type + is_temp = 1 + + def __init__(self, iterator): + AtomicExprNode.__init__(self, iterator.pos) + self.iterator = iterator + + def infer_type(self, env): + return py_object_type + + def analyse_types(self, env): + return self + + def generate_result_code(self, code): + code.globalstate.use_utility_code(UtilityCode.load_cached("AsyncIter", "Coroutine.c")) + code.putln("%s = __Pyx_Coroutine_AsyncIterNext(%s); %s" % ( + self.result(), + self.iterator.py_result(), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.result()) + + +class WithExitCallNode(ExprNode): + # The __exit__() call of a 'with' statement. Used in both the + # except and finally clauses. + + # with_stat WithStatNode the surrounding 'with' statement + # args TupleNode or ResultStatNode the exception info tuple + # await_expr AwaitExprNode the await expression of an 'async with' statement + + subexprs = ['args', 'await_expr'] + test_if_run = True + await_expr = None + + def analyse_types(self, env): + self.args = self.args.analyse_types(env) + if self.await_expr: + self.await_expr = self.await_expr.analyse_types(env) + self.type = PyrexTypes.c_bint_type + self.is_temp = True + return self + + def generate_evaluation_code(self, code): + if self.test_if_run: + # call only if it was not already called (and decref-cleared) + code.putln("if (%s) {" % self.with_stat.exit_var) + + self.args.generate_evaluation_code(code) + result_var = code.funcstate.allocate_temp(py_object_type, manage_ref=False) + + code.mark_pos(self.pos) + code.globalstate.use_utility_code(UtilityCode.load_cached( + "PyObjectCall", "ObjectHandling.c")) + code.putln("%s = __Pyx_PyObject_Call(%s, %s, NULL);" % ( + result_var, + self.with_stat.exit_var, + self.args.result())) + code.put_decref_clear(self.with_stat.exit_var, type=py_object_type) + self.args.generate_disposal_code(code) + self.args.free_temps(code) + + code.putln(code.error_goto_if_null(result_var, self.pos)) + code.put_gotref(result_var) + + if self.await_expr: + # FIXME: result_var temp currently leaks into the closure + self.await_expr.generate_evaluation_code(code, source_cname=result_var, decref_source=True) + code.putln("%s = %s;" % (result_var, self.await_expr.py_result())) + self.await_expr.generate_post_assignment_code(code) + self.await_expr.free_temps(code) + + if self.result_is_used: + self.allocate_temp_result(code) + code.putln("%s = __Pyx_PyObject_IsTrue(%s);" % (self.result(), result_var)) + code.put_decref_clear(result_var, type=py_object_type) + if self.result_is_used: + code.put_error_if_neg(self.pos, self.result()) + code.funcstate.release_temp(result_var) + if self.test_if_run: + code.putln("}") + + +class ExcValueNode(AtomicExprNode): + # Node created during analyse_types phase + # of an ExceptClauseNode to fetch the current + # exception value. + + type = py_object_type + + def __init__(self, pos): + ExprNode.__init__(self, pos) + + def set_var(self, var): + self.var = var + + def calculate_result_code(self): + return self.var + + def generate_result_code(self, code): + pass + + def analyse_types(self, env): + return self + + +class TempNode(ExprNode): + # Node created during analyse_types phase + # of some nodes to hold a temporary value. + # + # Note: One must call "allocate" and "release" on + # the node during code generation to get/release the temp. + # This is because the temp result is often used outside of + # the regular cycle. + + subexprs = [] + + def __init__(self, pos, type, env=None): + ExprNode.__init__(self, pos) + self.type = type + if type.is_pyobject: + self.result_ctype = py_object_type + self.is_temp = 1 + + def analyse_types(self, env): + return self + + def analyse_target_declaration(self, env): + pass + + def generate_result_code(self, code): + pass + + def allocate(self, code): + self.temp_cname = code.funcstate.allocate_temp(self.type, manage_ref=True) + + def release(self, code): + code.funcstate.release_temp(self.temp_cname) + self.temp_cname = None + + def result(self): + try: + return self.temp_cname + except: + assert False, "Remember to call allocate/release on TempNode" + raise + + # Do not participate in normal temp alloc/dealloc: + def allocate_temp_result(self, code): + pass + + def release_temp_result(self, code): + pass + +class PyTempNode(TempNode): + # TempNode holding a Python value. + + def __init__(self, pos, env): + TempNode.__init__(self, pos, PyrexTypes.py_object_type, env) + +class RawCNameExprNode(ExprNode): + subexprs = [] + + def __init__(self, pos, type=None, cname=None): + ExprNode.__init__(self, pos, type=type) + if cname is not None: + self.cname = cname + + def analyse_types(self, env): + return self + + def set_cname(self, cname): + self.cname = cname + + def result(self): + return self.cname + + def generate_result_code(self, code): + pass + + +#------------------------------------------------------------------- +# +# F-strings +# +#------------------------------------------------------------------- + + +class JoinedStrNode(ExprNode): + # F-strings + # + # values [UnicodeNode|FormattedValueNode] Substrings of the f-string + # + type = unicode_type + is_temp = True + + subexprs = ['values'] + + def analyse_types(self, env): + self.values = [v.analyse_types(env).coerce_to_pyobject(env) for v in self.values] + return self + + def may_be_none(self): + # PyUnicode_Join() always returns a Unicode string or raises an exception + return False + + def generate_evaluation_code(self, code): + code.mark_pos(self.pos) + num_items = len(self.values) + list_var = code.funcstate.allocate_temp(py_object_type, manage_ref=True) + ulength_var = code.funcstate.allocate_temp(PyrexTypes.c_py_ssize_t_type, manage_ref=False) + max_char_var = code.funcstate.allocate_temp(PyrexTypes.c_py_ucs4_type, manage_ref=False) + + code.putln('%s = PyTuple_New(%s); %s' % ( + list_var, + num_items, + code.error_goto_if_null(list_var, self.pos))) + code.put_gotref(list_var) + code.putln("%s = 0;" % ulength_var) + code.putln("%s = 127;" % max_char_var) # at least ASCII character range + + for i, node in enumerate(self.values): + node.generate_evaluation_code(code) + node.make_owned_reference(code) + + ulength = "__Pyx_PyUnicode_GET_LENGTH(%s)" % node.py_result() + max_char_value = "__Pyx_PyUnicode_MAX_CHAR_VALUE(%s)" % node.py_result() + is_ascii = False + if isinstance(node, UnicodeNode): + try: + # most strings will be ASCII or at least Latin-1 + node.value.encode('iso8859-1') + max_char_value = '255' + node.value.encode('us-ascii') + is_ascii = True + except UnicodeEncodeError: + if max_char_value != '255': + # not ISO8859-1 => check BMP limit + max_char = max(map(ord, node.value)) + if max_char < 0xD800: + # BMP-only, no surrogate pairs used + max_char_value = '65535' + ulength = str(len(node.value)) + elif max_char >= 65536: + # cleary outside of BMP, and not on a 16-bit Unicode system + max_char_value = '1114111' + ulength = str(len(node.value)) + else: + # not really worth implementing a check for surrogate pairs here + # drawback: C code can differ when generating on Py2 with 2-byte Unicode + pass + else: + ulength = str(len(node.value)) + elif isinstance(node, FormattedValueNode) and node.value.type.is_numeric: + is_ascii = True # formatted C numbers are always ASCII + + if not is_ascii: + code.putln("%s = (%s > %s) ? %s : %s;" % ( + max_char_var, max_char_value, max_char_var, max_char_value, max_char_var)) + code.putln("%s += %s;" % (ulength_var, ulength)) + + code.put_giveref(node.py_result()) + code.putln('PyTuple_SET_ITEM(%s, %s, %s);' % (list_var, i, node.py_result())) + node.generate_post_assignment_code(code) + node.free_temps(code) + + code.mark_pos(self.pos) + self.allocate_temp_result(code) + code.globalstate.use_utility_code(UtilityCode.load_cached("JoinPyUnicode", "StringTools.c")) + code.putln('%s = __Pyx_PyUnicode_Join(%s, %d, %s, %s); %s' % ( + self.result(), + list_var, + num_items, + ulength_var, + max_char_var, + code.error_goto_if_null(self.py_result(), self.pos))) + code.put_gotref(self.py_result()) + + code.put_decref_clear(list_var, py_object_type) + code.funcstate.release_temp(list_var) + code.funcstate.release_temp(ulength_var) + code.funcstate.release_temp(max_char_var) + + +class FormattedValueNode(ExprNode): + # {}-delimited portions of an f-string + # + # value ExprNode The expression itself + # conversion_char str or None Type conversion (!s, !r, !a, or none, or 'd' for integer conversion) + # format_spec JoinedStrNode or None Format string passed to __format__ + # c_format_spec str or None If not None, formatting can be done at the C level + + subexprs = ['value', 'format_spec'] + + type = unicode_type + is_temp = True + c_format_spec = None + + find_conversion_func = { + 's': 'PyObject_Unicode', + 'r': 'PyObject_Repr', + 'a': 'PyObject_ASCII', # NOTE: mapped to PyObject_Repr() in Py2 + 'd': '__Pyx_PyNumber_IntOrLong', # NOTE: internal mapping for '%d' formatting + }.get + + def may_be_none(self): + # PyObject_Format() always returns a Unicode string or raises an exception + return False + + def analyse_types(self, env): + self.value = self.value.analyse_types(env) + if not self.format_spec or self.format_spec.is_string_literal: + c_format_spec = self.format_spec.value if self.format_spec else self.value.type.default_format_spec + if self.value.type.can_coerce_to_pystring(env, format_spec=c_format_spec): + self.c_format_spec = c_format_spec + + if self.format_spec: + self.format_spec = self.format_spec.analyse_types(env).coerce_to_pyobject(env) + if self.c_format_spec is None: + self.value = self.value.coerce_to_pyobject(env) + if not self.format_spec and (not self.conversion_char or self.conversion_char == 's'): + if self.value.type is unicode_type and not self.value.may_be_none(): + # value is definitely a unicode string and we don't format it any special + return self.value + return self + + def generate_result_code(self, code): + if self.c_format_spec is not None and not self.value.type.is_pyobject: + convert_func_call = self.value.type.convert_to_pystring( + self.value.result(), code, self.c_format_spec) + code.putln("%s = %s; %s" % ( + self.result(), + convert_func_call, + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + return + + value_result = self.value.py_result() + value_is_unicode = self.value.type is unicode_type and not self.value.may_be_none() + if self.format_spec: + format_func = '__Pyx_PyObject_Format' + format_spec = self.format_spec.py_result() + else: + # common case: expect simple Unicode pass-through if no format spec + format_func = '__Pyx_PyObject_FormatSimple' + # passing a Unicode format string in Py2 forces PyObject_Format() to also return a Unicode string + format_spec = Naming.empty_unicode + + conversion_char = self.conversion_char + if conversion_char == 's' and value_is_unicode: + # no need to pipe unicode strings through str() + conversion_char = None + + if conversion_char: + fn = self.find_conversion_func(conversion_char) + assert fn is not None, "invalid conversion character found: '%s'" % conversion_char + value_result = '%s(%s)' % (fn, value_result) + code.globalstate.use_utility_code( + UtilityCode.load_cached("PyObjectFormatAndDecref", "StringTools.c")) + format_func += 'AndDecref' + elif self.format_spec: + code.globalstate.use_utility_code( + UtilityCode.load_cached("PyObjectFormat", "StringTools.c")) + else: + code.globalstate.use_utility_code( + UtilityCode.load_cached("PyObjectFormatSimple", "StringTools.c")) + + code.putln("%s = %s(%s, %s); %s" % ( + self.result(), + format_func, + value_result, + format_spec, + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + +#------------------------------------------------------------------- +# +# Parallel nodes (cython.parallel.thread(savailable|id)) +# +#------------------------------------------------------------------- + +class ParallelThreadsAvailableNode(AtomicExprNode): + """ + Note: this is disabled and not a valid directive at this moment + + Implements cython.parallel.threadsavailable(). If we are called from the + sequential part of the application, we need to call omp_get_max_threads(), + and in the parallel part we can just call omp_get_num_threads() + """ + + type = PyrexTypes.c_int_type + + def analyse_types(self, env): + self.is_temp = True + # env.add_include_file("omp.h") + return self + + def generate_result_code(self, code): + code.putln("#ifdef _OPENMP") + code.putln("if (omp_in_parallel()) %s = omp_get_max_threads();" % + self.temp_code) + code.putln("else %s = omp_get_num_threads();" % self.temp_code) + code.putln("#else") + code.putln("%s = 1;" % self.temp_code) + code.putln("#endif") + + def result(self): + return self.temp_code + + +class ParallelThreadIdNode(AtomicExprNode): #, Nodes.ParallelNode): + """ + Implements cython.parallel.threadid() + """ + + type = PyrexTypes.c_int_type + + def analyse_types(self, env): + self.is_temp = True + # env.add_include_file("omp.h") + return self + + def generate_result_code(self, code): + code.putln("#ifdef _OPENMP") + code.putln("%s = omp_get_thread_num();" % self.temp_code) + code.putln("#else") + code.putln("%s = 0;" % self.temp_code) + code.putln("#endif") + + def result(self): + return self.temp_code + + +#------------------------------------------------------------------- +# +# Trailer nodes +# +#------------------------------------------------------------------- + + +class _IndexingBaseNode(ExprNode): + # Base class for indexing nodes. + # + # base ExprNode the value being indexed + + def is_ephemeral(self): + # in most cases, indexing will return a safe reference to an object in a container, + # so we consider the result safe if the base object is + return self.base.is_ephemeral() or self.base.type in ( + basestring_type, str_type, bytes_type, bytearray_type, unicode_type) + + def check_const_addr(self): + return self.base.check_const_addr() and self.index.check_const() + + def is_lvalue(self): + # NOTE: references currently have both is_reference and is_ptr + # set. Since pointers and references have different lvalue + # rules, we must be careful to separate the two. + if self.type.is_reference: + if self.type.ref_base_type.is_array: + # fixed-sized arrays aren't l-values + return False + elif self.type.is_ptr: + # non-const pointers can always be reassigned + return True + # Just about everything else returned by the index operator + # can be an lvalue. + return True + + +class IndexNode(_IndexingBaseNode): + # Sequence indexing. + # + # base ExprNode + # index ExprNode + # type_indices [PyrexType] + # + # is_fused_index boolean Whether the index is used to specialize a + # c(p)def function + + subexprs = ['base', 'index'] + type_indices = None + + is_subscript = True + is_fused_index = False + + def calculate_constant_result(self): + self.constant_result = self.base.constant_result[self.index.constant_result] + + def compile_time_value(self, denv): + base = self.base.compile_time_value(denv) + index = self.index.compile_time_value(denv) + try: + return base[index] + except Exception as e: + self.compile_time_value_error(e) + + def is_simple(self): + base = self.base + return (base.is_simple() and self.index.is_simple() + and base.type and (base.type.is_ptr or base.type.is_array)) + + def may_be_none(self): + base_type = self.base.type + if base_type: + if base_type.is_string: + return False + if isinstance(self.index, SliceNode): + # slicing! + if base_type in (bytes_type, bytearray_type, str_type, unicode_type, + basestring_type, list_type, tuple_type): + return False + return ExprNode.may_be_none(self) + + def analyse_target_declaration(self, env): + pass + + def analyse_as_type(self, env): + base_type = self.base.analyse_as_type(env) + if base_type and not base_type.is_pyobject: + if base_type.is_cpp_class: + if isinstance(self.index, TupleNode): + template_values = self.index.args + else: + template_values = [self.index] + type_node = Nodes.TemplatedTypeNode( + pos=self.pos, + positional_args=template_values, + keyword_args=None) + return type_node.analyse(env, base_type=base_type) + elif self.index.is_slice or self.index.is_sequence_constructor: + # memory view + from . import MemoryView + env.use_utility_code(MemoryView.view_utility_code) + axes = [self.index] if self.index.is_slice else list(self.index.args) + return PyrexTypes.MemoryViewSliceType(base_type, MemoryView.get_axes_specs(env, axes)) + else: + # C array + index = self.index.compile_time_value(env) + if index is not None: + try: + index = int(index) + except (ValueError, TypeError): + pass + else: + return PyrexTypes.CArrayType(base_type, index) + error(self.pos, "Array size must be a compile time constant") + return None + + def type_dependencies(self, env): + return self.base.type_dependencies(env) + self.index.type_dependencies(env) + + def infer_type(self, env): + base_type = self.base.infer_type(env) + if self.index.is_slice: + # slicing! + if base_type.is_string: + # sliced C strings must coerce to Python + return bytes_type + elif base_type.is_pyunicode_ptr: + # sliced Py_UNICODE* strings must coerce to Python + return unicode_type + elif base_type in (unicode_type, bytes_type, str_type, + bytearray_type, list_type, tuple_type): + # slicing these returns the same type + return base_type + else: + # TODO: Handle buffers (hopefully without too much redundancy). + return py_object_type + + index_type = self.index.infer_type(env) + if index_type and index_type.is_int or isinstance(self.index, IntNode): + # indexing! + if base_type is unicode_type: + # Py_UCS4 will automatically coerce to a unicode string + # if required, so this is safe. We only infer Py_UCS4 + # when the index is a C integer type. Otherwise, we may + # need to use normal Python item access, in which case + # it's faster to return the one-char unicode string than + # to receive it, throw it away, and potentially rebuild it + # on a subsequent PyObject coercion. + return PyrexTypes.c_py_ucs4_type + elif base_type is str_type: + # always returns str - Py2: bytes, Py3: unicode + return base_type + elif base_type is bytearray_type: + return PyrexTypes.c_uchar_type + elif isinstance(self.base, BytesNode): + #if env.global_scope().context.language_level >= 3: + # # inferring 'char' can be made to work in Python 3 mode + # return PyrexTypes.c_char_type + # Py2/3 return different types on indexing bytes objects + return py_object_type + elif base_type in (tuple_type, list_type): + # if base is a literal, take a look at its values + item_type = infer_sequence_item_type( + env, self.base, self.index, seq_type=base_type) + if item_type is not None: + return item_type + elif base_type.is_ptr or base_type.is_array: + return base_type.base_type + elif base_type.is_ctuple and isinstance(self.index, IntNode): + if self.index.has_constant_result(): + index = self.index.constant_result + if index < 0: + index += base_type.size + if 0 <= index < base_type.size: + return base_type.components[index] + + if base_type.is_cpp_class: + class FakeOperand: + def __init__(self, **kwds): + self.__dict__.update(kwds) + operands = [ + FakeOperand(pos=self.pos, type=base_type), + FakeOperand(pos=self.pos, type=index_type), + ] + index_func = env.lookup_operator('[]', operands) + if index_func is not None: + return index_func.type.return_type + + if is_pythran_expr(base_type) and is_pythran_expr(index_type): + index_with_type = (self.index, index_type) + return PythranExpr(pythran_indexing_type(base_type, [index_with_type])) + + # may be slicing or indexing, we don't know + if base_type in (unicode_type, str_type): + # these types always returns their own type on Python indexing/slicing + return base_type + else: + # TODO: Handle buffers (hopefully without too much redundancy). + return py_object_type + + def analyse_types(self, env): + return self.analyse_base_and_index_types(env, getting=True) + + def analyse_target_types(self, env): + node = self.analyse_base_and_index_types(env, setting=True) + if node.type.is_const: + error(self.pos, "Assignment to const dereference") + if node is self and not node.is_lvalue(): + error(self.pos, "Assignment to non-lvalue of type '%s'" % node.type) + return node + + def analyse_base_and_index_types(self, env, getting=False, setting=False, + analyse_base=True): + # Note: This might be cleaned up by having IndexNode + # parsed in a saner way and only construct the tuple if + # needed. + if analyse_base: + self.base = self.base.analyse_types(env) + + if self.base.type.is_error: + # Do not visit child tree if base is undeclared to avoid confusing + # error messages + self.type = PyrexTypes.error_type + return self + + is_slice = self.index.is_slice + if not env.directives['wraparound']: + if is_slice: + check_negative_indices(self.index.start, self.index.stop) + else: + check_negative_indices(self.index) + + # Potentially overflowing index value. + if not is_slice and isinstance(self.index, IntNode) and Utils.long_literal(self.index.value): + self.index = self.index.coerce_to_pyobject(env) + + is_memslice = self.base.type.is_memoryviewslice + # Handle the case where base is a literal char* (and we expect a string, not an int) + if not is_memslice and (isinstance(self.base, BytesNode) or is_slice): + if self.base.type.is_string or not (self.base.type.is_ptr or self.base.type.is_array): + self.base = self.base.coerce_to_pyobject(env) + + replacement_node = self.analyse_as_buffer_operation(env, getting) + if replacement_node is not None: + return replacement_node + + self.nogil = env.nogil + base_type = self.base.type + + if not base_type.is_cfunction: + self.index = self.index.analyse_types(env) + self.original_index_type = self.index.type + + if base_type.is_unicode_char: + # we infer Py_UNICODE/Py_UCS4 for unicode strings in some + # cases, but indexing must still work for them + if setting: + warning(self.pos, "cannot assign to Unicode string index", level=1) + elif self.index.constant_result in (0, -1): + # uchar[0] => uchar + return self.base + self.base = self.base.coerce_to_pyobject(env) + base_type = self.base.type + + if base_type.is_pyobject: + return self.analyse_as_pyobject(env, is_slice, getting, setting) + elif base_type.is_ptr or base_type.is_array: + return self.analyse_as_c_array(env, is_slice) + elif base_type.is_cpp_class: + return self.analyse_as_cpp(env, setting) + elif base_type.is_cfunction: + return self.analyse_as_c_function(env) + elif base_type.is_ctuple: + return self.analyse_as_c_tuple(env, getting, setting) + else: + error(self.pos, + "Attempting to index non-array type '%s'" % + base_type) + self.type = PyrexTypes.error_type + return self + + def analyse_as_pyobject(self, env, is_slice, getting, setting): + base_type = self.base.type + if self.index.type.is_unicode_char and base_type is not dict_type: + # TODO: eventually fold into case below and remove warning, once people have adapted their code + warning(self.pos, + "Item lookup of unicode character codes now always converts to a Unicode string. " + "Use an explicit C integer cast to get back the previous integer lookup behaviour.", level=1) + self.index = self.index.coerce_to_pyobject(env) + self.is_temp = 1 + elif self.index.type.is_int and base_type is not dict_type: + if (getting + and (base_type in (list_type, tuple_type, bytearray_type)) + and (not self.index.type.signed + or not env.directives['wraparound'] + or (isinstance(self.index, IntNode) and + self.index.has_constant_result() and self.index.constant_result >= 0)) + and not env.directives['boundscheck']): + self.is_temp = 0 + else: + self.is_temp = 1 + self.index = self.index.coerce_to(PyrexTypes.c_py_ssize_t_type, env).coerce_to_simple(env) + self.original_index_type.create_to_py_utility_code(env) + else: + self.index = self.index.coerce_to_pyobject(env) + self.is_temp = 1 + + if self.index.type.is_int and base_type is unicode_type: + # Py_UNICODE/Py_UCS4 will automatically coerce to a unicode string + # if required, so this is fast and safe + self.type = PyrexTypes.c_py_ucs4_type + elif self.index.type.is_int and base_type is bytearray_type: + if setting: + self.type = PyrexTypes.c_uchar_type + else: + # not using 'uchar' to enable fast and safe error reporting as '-1' + self.type = PyrexTypes.c_int_type + elif is_slice and base_type in (bytes_type, bytearray_type, str_type, unicode_type, list_type, tuple_type): + self.type = base_type + else: + item_type = None + if base_type in (list_type, tuple_type) and self.index.type.is_int: + item_type = infer_sequence_item_type( + env, self.base, self.index, seq_type=base_type) + if item_type is None: + item_type = py_object_type + self.type = item_type + if base_type in (list_type, tuple_type, dict_type): + # do the None check explicitly (not in a helper) to allow optimising it away + self.base = self.base.as_none_safe_node("'NoneType' object is not subscriptable") + + self.wrap_in_nonecheck_node(env, getting) + return self + + def analyse_as_c_array(self, env, is_slice): + base_type = self.base.type + self.type = base_type.base_type + if is_slice: + self.type = base_type + elif self.index.type.is_pyobject: + self.index = self.index.coerce_to(PyrexTypes.c_py_ssize_t_type, env) + elif not self.index.type.is_int: + error(self.pos, "Invalid index type '%s'" % self.index.type) + return self + + def analyse_as_cpp(self, env, setting): + base_type = self.base.type + function = env.lookup_operator("[]", [self.base, self.index]) + if function is None: + error(self.pos, "Indexing '%s' not supported for index type '%s'" % (base_type, self.index.type)) + self.type = PyrexTypes.error_type + self.result_code = "" + return self + func_type = function.type + if func_type.is_ptr: + func_type = func_type.base_type + self.exception_check = func_type.exception_check + self.exception_value = func_type.exception_value + if self.exception_check: + if not setting: + self.is_temp = True + if self.exception_value is None: + env.use_utility_code(UtilityCode.load_cached("CppExceptionConversion", "CppSupport.cpp")) + self.index = self.index.coerce_to(func_type.args[0].type, env) + self.type = func_type.return_type + if setting and not func_type.return_type.is_reference: + error(self.pos, "Can't set non-reference result '%s'" % self.type) + return self + + def analyse_as_c_function(self, env): + base_type = self.base.type + if base_type.is_fused: + self.parse_indexed_fused_cdef(env) + else: + self.type_indices = self.parse_index_as_types(env) + self.index = None # FIXME: use a dedicated Node class instead of generic IndexNode + if base_type.templates is None: + error(self.pos, "Can only parameterize template functions.") + self.type = error_type + elif self.type_indices is None: + # Error recorded earlier. + self.type = error_type + elif len(base_type.templates) != len(self.type_indices): + error(self.pos, "Wrong number of template arguments: expected %s, got %s" % ( + (len(base_type.templates), len(self.type_indices)))) + self.type = error_type + else: + self.type = base_type.specialize(dict(zip(base_type.templates, self.type_indices))) + # FIXME: use a dedicated Node class instead of generic IndexNode + return self + + def analyse_as_c_tuple(self, env, getting, setting): + base_type = self.base.type + if isinstance(self.index, IntNode) and self.index.has_constant_result(): + index = self.index.constant_result + if -base_type.size <= index < base_type.size: + if index < 0: + index += base_type.size + self.type = base_type.components[index] + else: + error(self.pos, + "Index %s out of bounds for '%s'" % + (index, base_type)) + self.type = PyrexTypes.error_type + return self + else: + self.base = self.base.coerce_to_pyobject(env) + return self.analyse_base_and_index_types(env, getting=getting, setting=setting, analyse_base=False) + + def analyse_as_buffer_operation(self, env, getting): + """ + Analyse buffer indexing and memoryview indexing/slicing + """ + if isinstance(self.index, TupleNode): + indices = self.index.args + else: + indices = [self.index] + + base = self.base + base_type = base.type + replacement_node = None + if base_type.is_memoryviewslice: + # memoryviewslice indexing or slicing + from . import MemoryView + if base.is_memview_slice: + # For memory views, "view[i][j]" is the same as "view[i, j]" => use the latter for speed. + merged_indices = base.merged_indices(indices) + if merged_indices is not None: + base = base.base + base_type = base.type + indices = merged_indices + have_slices, indices, newaxes = MemoryView.unellipsify(indices, base_type.ndim) + if have_slices: + replacement_node = MemoryViewSliceNode(self.pos, indices=indices, base=base) + else: + replacement_node = MemoryViewIndexNode(self.pos, indices=indices, base=base) + elif base_type.is_buffer or base_type.is_pythran_expr: + if base_type.is_pythran_expr or len(indices) == base_type.ndim: + # Buffer indexing + is_buffer_access = True + indices = [index.analyse_types(env) for index in indices] + if base_type.is_pythran_expr: + do_replacement = all( + index.type.is_int or index.is_slice or index.type.is_pythran_expr + for index in indices) + if do_replacement: + for i,index in enumerate(indices): + if index.is_slice: + index = SliceIntNode(index.pos, start=index.start, stop=index.stop, step=index.step) + index = index.analyse_types(env) + indices[i] = index + else: + do_replacement = all(index.type.is_int for index in indices) + if do_replacement: + replacement_node = BufferIndexNode(self.pos, indices=indices, base=base) + # On cloning, indices is cloned. Otherwise, unpack index into indices. + assert not isinstance(self.index, CloneNode) + + if replacement_node is not None: + replacement_node = replacement_node.analyse_types(env, getting) + return replacement_node + + def wrap_in_nonecheck_node(self, env, getting): + if not env.directives['nonecheck'] or not self.base.may_be_none(): + return + self.base = self.base.as_none_safe_node("'NoneType' object is not subscriptable") + + def parse_index_as_types(self, env, required=True): + if isinstance(self.index, TupleNode): + indices = self.index.args + else: + indices = [self.index] + type_indices = [] + for index in indices: + type_indices.append(index.analyse_as_type(env)) + if type_indices[-1] is None: + if required: + error(index.pos, "not parsable as a type") + return None + return type_indices + + def parse_indexed_fused_cdef(self, env): + """ + Interpret fused_cdef_func[specific_type1, ...] + + Note that if this method is called, we are an indexed cdef function + with fused argument types, and this IndexNode will be replaced by the + NameNode with specific entry just after analysis of expressions by + AnalyseExpressionsTransform. + """ + self.type = PyrexTypes.error_type + + self.is_fused_index = True + + base_type = self.base.type + positions = [] + + if self.index.is_name or self.index.is_attribute: + positions.append(self.index.pos) + elif isinstance(self.index, TupleNode): + for arg in self.index.args: + positions.append(arg.pos) + specific_types = self.parse_index_as_types(env, required=False) + + if specific_types is None: + self.index = self.index.analyse_types(env) + + if not self.base.entry.as_variable: + error(self.pos, "Can only index fused functions with types") + else: + # A cpdef function indexed with Python objects + self.base.entry = self.entry = self.base.entry.as_variable + self.base.type = self.type = self.entry.type + + self.base.is_temp = True + self.is_temp = True + + self.entry.used = True + + self.is_fused_index = False + return + + for i, type in enumerate(specific_types): + specific_types[i] = type.specialize_fused(env) + + fused_types = base_type.get_fused_types() + if len(specific_types) > len(fused_types): + return error(self.pos, "Too many types specified") + elif len(specific_types) < len(fused_types): + t = fused_types[len(specific_types)] + return error(self.pos, "Not enough types specified to specialize " + "the function, %s is still fused" % t) + + # See if our index types form valid specializations + for pos, specific_type, fused_type in zip(positions, + specific_types, + fused_types): + if not any([specific_type.same_as(t) for t in fused_type.types]): + return error(pos, "Type not in fused type") + + if specific_type is None or specific_type.is_error: + return + + fused_to_specific = dict(zip(fused_types, specific_types)) + type = base_type.specialize(fused_to_specific) + + if type.is_fused: + # Only partially specific, this is invalid + error(self.pos, + "Index operation makes function only partially specific") + else: + # Fully specific, find the signature with the specialized entry + for signature in self.base.type.get_all_specialized_function_types(): + if type.same_as(signature): + self.type = signature + + if self.base.is_attribute: + # Pretend to be a normal attribute, for cdef extension + # methods + self.entry = signature.entry + self.is_attribute = True + self.obj = self.base.obj + + self.type.entry.used = True + self.base.type = signature + self.base.entry = signature.entry + + break + else: + # This is a bug + raise InternalError("Couldn't find the right signature") + + gil_message = "Indexing Python object" + + def calculate_result_code(self): + if self.base.type in (list_type, tuple_type, bytearray_type): + if self.base.type is list_type: + index_code = "PyList_GET_ITEM(%s, %s)" + elif self.base.type is tuple_type: + index_code = "PyTuple_GET_ITEM(%s, %s)" + elif self.base.type is bytearray_type: + index_code = "((unsigned char)(PyByteArray_AS_STRING(%s)[%s]))" + else: + assert False, "unexpected base type in indexing: %s" % self.base.type + elif self.base.type.is_cfunction: + return "%s<%s>" % ( + self.base.result(), + ",".join([param.empty_declaration_code() for param in self.type_indices])) + elif self.base.type.is_ctuple: + index = self.index.constant_result + if index < 0: + index += self.base.type.size + return "%s.f%s" % (self.base.result(), index) + else: + if (self.type.is_ptr or self.type.is_array) and self.type == self.base.type: + error(self.pos, "Invalid use of pointer slice") + return + index_code = "(%s[%s])" + return index_code % (self.base.result(), self.index.result()) + + def extra_index_params(self, code): + if self.index.type.is_int: + is_list = self.base.type is list_type + wraparound = ( + bool(code.globalstate.directives['wraparound']) and + self.original_index_type.signed and + not (isinstance(self.index.constant_result, _py_int_types) + and self.index.constant_result >= 0)) + boundscheck = bool(code.globalstate.directives['boundscheck']) + return ", %s, %d, %s, %d, %d, %d" % ( + self.original_index_type.empty_declaration_code(), + self.original_index_type.signed and 1 or 0, + self.original_index_type.to_py_function, + is_list, wraparound, boundscheck) + else: + return "" + + def generate_result_code(self, code): + if not self.is_temp: + # all handled in self.calculate_result_code() + return + + utility_code = None + if self.type.is_pyobject: + error_value = 'NULL' + if self.index.type.is_int: + if self.base.type is list_type: + function = "__Pyx_GetItemInt_List" + elif self.base.type is tuple_type: + function = "__Pyx_GetItemInt_Tuple" + else: + function = "__Pyx_GetItemInt" + utility_code = TempitaUtilityCode.load_cached("GetItemInt", "ObjectHandling.c") + else: + if self.base.type is dict_type: + function = "__Pyx_PyDict_GetItem" + utility_code = UtilityCode.load_cached("DictGetItem", "ObjectHandling.c") + elif self.base.type is py_object_type and self.index.type in (str_type, unicode_type): + # obj[str] is probably doing a dict lookup + function = "__Pyx_PyObject_Dict_GetItem" + utility_code = UtilityCode.load_cached("DictGetItem", "ObjectHandling.c") + else: + function = "__Pyx_PyObject_GetItem" + code.globalstate.use_utility_code( + TempitaUtilityCode.load_cached("GetItemInt", "ObjectHandling.c")) + utility_code = UtilityCode.load_cached("ObjectGetItem", "ObjectHandling.c") + elif self.type.is_unicode_char and self.base.type is unicode_type: + assert self.index.type.is_int + function = "__Pyx_GetItemInt_Unicode" + error_value = '(Py_UCS4)-1' + utility_code = UtilityCode.load_cached("GetItemIntUnicode", "StringTools.c") + elif self.base.type is bytearray_type: + assert self.index.type.is_int + assert self.type.is_int + function = "__Pyx_GetItemInt_ByteArray" + error_value = '-1' + utility_code = UtilityCode.load_cached("GetItemIntByteArray", "StringTools.c") + elif not (self.base.type.is_cpp_class and self.exception_check): + assert False, "unexpected type %s and base type %s for indexing" % ( + self.type, self.base.type) + + if utility_code is not None: + code.globalstate.use_utility_code(utility_code) + + if self.index.type.is_int: + index_code = self.index.result() + else: + index_code = self.index.py_result() + + if self.base.type.is_cpp_class and self.exception_check: + translate_cpp_exception(code, self.pos, + "%s = %s[%s];" % (self.result(), self.base.result(), + self.index.result()), + self.result() if self.type.is_pyobject else None, + self.exception_value, self.in_nogil_context) + else: + error_check = '!%s' if error_value == 'NULL' else '%%s == %s' % error_value + code.putln( + "%s = %s(%s, %s%s); %s" % ( + self.result(), + function, + self.base.py_result(), + index_code, + self.extra_index_params(code), + code.error_goto_if(error_check % self.result(), self.pos))) + if self.type.is_pyobject: + code.put_gotref(self.py_result()) + + def generate_setitem_code(self, value_code, code): + if self.index.type.is_int: + if self.base.type is bytearray_type: + code.globalstate.use_utility_code( + UtilityCode.load_cached("SetItemIntByteArray", "StringTools.c")) + function = "__Pyx_SetItemInt_ByteArray" + else: + code.globalstate.use_utility_code( + UtilityCode.load_cached("SetItemInt", "ObjectHandling.c")) + function = "__Pyx_SetItemInt" + index_code = self.index.result() + else: + index_code = self.index.py_result() + if self.base.type is dict_type: + function = "PyDict_SetItem" + # It would seem that we could specialized lists/tuples, but that + # shouldn't happen here. + # Both PyList_SetItem() and PyTuple_SetItem() take a Py_ssize_t as + # index instead of an object, and bad conversion here would give + # the wrong exception. Also, tuples are supposed to be immutable, + # and raise a TypeError when trying to set their entries + # (PyTuple_SetItem() is for creating new tuples from scratch). + else: + function = "PyObject_SetItem" + code.putln(code.error_goto_if_neg( + "%s(%s, %s, %s%s)" % ( + function, + self.base.py_result(), + index_code, + value_code, + self.extra_index_params(code)), + self.pos)) + + def generate_assignment_code(self, rhs, code, overloaded_assignment=False, + exception_check=None, exception_value=None): + self.generate_subexpr_evaluation_code(code) + + if self.type.is_pyobject: + self.generate_setitem_code(rhs.py_result(), code) + elif self.base.type is bytearray_type: + value_code = self._check_byte_value(code, rhs) + self.generate_setitem_code(value_code, code) + elif self.base.type.is_cpp_class and self.exception_check and self.exception_check == '+': + if overloaded_assignment and exception_check and \ + self.exception_value != exception_value: + # Handle the case that both the index operator and the assignment + # operator have a c++ exception handler and they are not the same. + translate_double_cpp_exception(code, self.pos, self.type, + self.result(), rhs.result(), self.exception_value, + exception_value, self.in_nogil_context) + else: + # Handle the case that only the index operator has a + # c++ exception handler, or that + # both exception handlers are the same. + translate_cpp_exception(code, self.pos, + "%s = %s;" % (self.result(), rhs.result()), + self.result() if self.type.is_pyobject else None, + self.exception_value, self.in_nogil_context) + else: + code.putln( + "%s = %s;" % (self.result(), rhs.result())) + + self.generate_subexpr_disposal_code(code) + self.free_subexpr_temps(code) + rhs.generate_disposal_code(code) + rhs.free_temps(code) + + def _check_byte_value(self, code, rhs): + # TODO: should we do this generally on downcasts, or just here? + assert rhs.type.is_int, repr(rhs.type) + value_code = rhs.result() + if rhs.has_constant_result(): + if 0 <= rhs.constant_result < 256: + return value_code + needs_cast = True # make at least the C compiler happy + warning(rhs.pos, + "value outside of range(0, 256)" + " when assigning to byte: %s" % rhs.constant_result, + level=1) + else: + needs_cast = rhs.type != PyrexTypes.c_uchar_type + + if not self.nogil: + conditions = [] + if rhs.is_literal or rhs.type.signed: + conditions.append('%s < 0' % value_code) + if (rhs.is_literal or not + (rhs.is_temp and rhs.type in ( + PyrexTypes.c_uchar_type, PyrexTypes.c_char_type, + PyrexTypes.c_schar_type))): + conditions.append('%s > 255' % value_code) + if conditions: + code.putln("if (unlikely(%s)) {" % ' || '.join(conditions)) + code.putln( + 'PyErr_SetString(PyExc_ValueError,' + ' "byte must be in range(0, 256)"); %s' % + code.error_goto(self.pos)) + code.putln("}") + + if needs_cast: + value_code = '((unsigned char)%s)' % value_code + return value_code + + def generate_deletion_code(self, code, ignore_nonexisting=False): + self.generate_subexpr_evaluation_code(code) + #if self.type.is_pyobject: + if self.index.type.is_int: + function = "__Pyx_DelItemInt" + index_code = self.index.result() + code.globalstate.use_utility_code( + UtilityCode.load_cached("DelItemInt", "ObjectHandling.c")) + else: + index_code = self.index.py_result() + if self.base.type is dict_type: + function = "PyDict_DelItem" + else: + function = "PyObject_DelItem" + code.putln(code.error_goto_if_neg( + "%s(%s, %s%s)" % ( + function, + self.base.py_result(), + index_code, + self.extra_index_params(code)), + self.pos)) + self.generate_subexpr_disposal_code(code) + self.free_subexpr_temps(code) + + +class BufferIndexNode(_IndexingBaseNode): + """ + Indexing of buffers and memoryviews. This node is created during type + analysis from IndexNode and replaces it. + + Attributes: + base - base node being indexed + indices - list of indexing expressions + """ + + subexprs = ['base', 'indices'] + + is_buffer_access = True + + # Whether we're assigning to a buffer (in that case it needs to be writable) + writable_needed = False + + # Any indexing temp variables that we need to clean up. + index_temps = () + + def analyse_target_types(self, env): + self.analyse_types(env, getting=False) + + def analyse_types(self, env, getting=True): + """ + Analyse types for buffer indexing only. Overridden by memoryview + indexing and slicing subclasses + """ + # self.indices are already analyzed + if not self.base.is_name and not is_pythran_expr(self.base.type): + error(self.pos, "Can only index buffer variables") + self.type = error_type + return self + + if not getting: + if not self.base.entry.type.writable: + error(self.pos, "Writing to readonly buffer") + else: + self.writable_needed = True + if self.base.type.is_buffer: + self.base.entry.buffer_aux.writable_needed = True + + self.none_error_message = "'NoneType' object is not subscriptable" + self.analyse_buffer_index(env, getting) + self.wrap_in_nonecheck_node(env) + return self + + def analyse_buffer_index(self, env, getting): + if is_pythran_expr(self.base.type): + index_with_type_list = [(idx, idx.type) for idx in self.indices] + self.type = PythranExpr(pythran_indexing_type(self.base.type, index_with_type_list)) + else: + self.base = self.base.coerce_to_simple(env) + self.type = self.base.type.dtype + self.buffer_type = self.base.type + + if getting and (self.type.is_pyobject or self.type.is_pythran_expr): + self.is_temp = True + + def analyse_assignment(self, rhs): + """ + Called by IndexNode when this node is assigned to, + with the rhs of the assignment + """ + + def wrap_in_nonecheck_node(self, env): + if not env.directives['nonecheck'] or not self.base.may_be_none(): + return + self.base = self.base.as_none_safe_node(self.none_error_message) + + def nogil_check(self, env): + if self.is_buffer_access or self.is_memview_index: + if self.type.is_pyobject: + error(self.pos, "Cannot access buffer with object dtype without gil") + self.type = error_type + + def calculate_result_code(self): + return "(*%s)" % self.buffer_ptr_code + + def buffer_entry(self): + base = self.base + if self.base.is_nonecheck: + base = base.arg + return base.type.get_entry(base) + + def get_index_in_temp(self, code, ivar): + ret = code.funcstate.allocate_temp( + PyrexTypes.widest_numeric_type( + ivar.type, + PyrexTypes.c_ssize_t_type if ivar.type.signed else PyrexTypes.c_size_t_type), + manage_ref=False) + code.putln("%s = %s;" % (ret, ivar.result())) + return ret + + def buffer_lookup_code(self, code): + """ + ndarray[1, 2, 3] and memslice[1, 2, 3] + """ + if self.in_nogil_context: + if self.is_buffer_access or self.is_memview_index: + if code.globalstate.directives['boundscheck']: + warning(self.pos, "Use boundscheck(False) for faster access", level=1) + + # Assign indices to temps of at least (s)size_t to allow further index calculations. + self.index_temps = index_temps = [self.get_index_in_temp(code,ivar) for ivar in self.indices] + + # Generate buffer access code using these temps + from . import Buffer + buffer_entry = self.buffer_entry() + if buffer_entry.type.is_buffer: + negative_indices = buffer_entry.type.negative_indices + else: + negative_indices = Buffer.buffer_defaults['negative_indices'] + + return buffer_entry, Buffer.put_buffer_lookup_code( + entry=buffer_entry, + index_signeds=[ivar.type.signed for ivar in self.indices], + index_cnames=index_temps, + directives=code.globalstate.directives, + pos=self.pos, code=code, + negative_indices=negative_indices, + in_nogil_context=self.in_nogil_context) + + def generate_assignment_code(self, rhs, code, overloaded_assignment=False): + self.generate_subexpr_evaluation_code(code) + self.generate_buffer_setitem_code(rhs, code) + self.generate_subexpr_disposal_code(code) + self.free_subexpr_temps(code) + rhs.generate_disposal_code(code) + rhs.free_temps(code) + + def generate_buffer_setitem_code(self, rhs, code, op=""): + base_type = self.base.type + if is_pythran_expr(base_type) and is_pythran_supported_type(rhs.type): + obj = code.funcstate.allocate_temp(PythranExpr(pythran_type(self.base.type)), manage_ref=False) + # We have got to do this because we have to declare pythran objects + # at the beginning of the functions. + # Indeed, Cython uses "goto" statement for error management, and + # RAII doesn't work with that kind of construction. + # Moreover, the way Pythran expressions are made is that they don't + # support move-assignation easily. + # This, we explicitly destroy then in-place new objects in this + # case. + code.putln("__Pyx_call_destructor(%s);" % obj) + code.putln("new (&%s) decltype(%s){%s};" % (obj, obj, self.base.pythran_result())) + code.putln("%s%s %s= %s;" % ( + obj, + pythran_indexing_code(self.indices), + op, + rhs.pythran_result())) + code.funcstate.release_temp(obj) + return + + # Used from generate_assignment_code and InPlaceAssignmentNode + buffer_entry, ptrexpr = self.buffer_lookup_code(code) + + if self.buffer_type.dtype.is_pyobject: + # Must manage refcounts. Decref what is already there + # and incref what we put in. + ptr = code.funcstate.allocate_temp(buffer_entry.buf_ptr_type, + manage_ref=False) + rhs_code = rhs.result() + code.putln("%s = %s;" % (ptr, ptrexpr)) + code.put_gotref("*%s" % ptr) + code.putln("__Pyx_INCREF(%s); __Pyx_DECREF(*%s);" % ( + rhs_code, ptr)) + code.putln("*%s %s= %s;" % (ptr, op, rhs_code)) + code.put_giveref("*%s" % ptr) + code.funcstate.release_temp(ptr) + else: + # Simple case + code.putln("*%s %s= %s;" % (ptrexpr, op, rhs.result())) + + def generate_result_code(self, code): + if is_pythran_expr(self.base.type): + res = self.result() + code.putln("__Pyx_call_destructor(%s);" % res) + code.putln("new (&%s) decltype(%s){%s%s};" % ( + res, + res, + self.base.pythran_result(), + pythran_indexing_code(self.indices))) + return + buffer_entry, self.buffer_ptr_code = self.buffer_lookup_code(code) + if self.type.is_pyobject: + # is_temp is True, so must pull out value and incref it. + # NOTE: object temporary results for nodes are declared + # as PyObject *, so we need a cast + code.putln("%s = (PyObject *) *%s;" % (self.result(), self.buffer_ptr_code)) + code.putln("__Pyx_INCREF((PyObject*)%s);" % self.result()) + + def free_subexpr_temps(self, code): + for temp in self.index_temps: + code.funcstate.release_temp(temp) + self.index_temps = () + super(BufferIndexNode, self).free_subexpr_temps(code) + + +class MemoryViewIndexNode(BufferIndexNode): + + is_memview_index = True + is_buffer_access = False + warned_untyped_idx = False + + def analyse_types(self, env, getting=True): + # memoryviewslice indexing or slicing + from . import MemoryView + + self.is_pythran_mode = has_np_pythran(env) + indices = self.indices + have_slices, indices, newaxes = MemoryView.unellipsify(indices, self.base.type.ndim) + + if not getting: + self.writable_needed = True + if self.base.is_name or self.base.is_attribute: + self.base.entry.type.writable_needed = True + + self.memslice_index = (not newaxes and len(indices) == self.base.type.ndim) + axes = [] + + index_type = PyrexTypes.c_py_ssize_t_type + new_indices = [] + + if len(indices) - len(newaxes) > self.base.type.ndim: + self.type = error_type + error(indices[self.base.type.ndim].pos, + "Too many indices specified for type %s" % self.base.type) + return self + + axis_idx = 0 + for i, index in enumerate(indices[:]): + index = index.analyse_types(env) + if index.is_none: + self.is_memview_slice = True + new_indices.append(index) + axes.append(('direct', 'strided')) + continue + + access, packing = self.base.type.axes[axis_idx] + axis_idx += 1 + + if index.is_slice: + self.is_memview_slice = True + if index.step.is_none: + axes.append((access, packing)) + else: + axes.append((access, 'strided')) + + # Coerce start, stop and step to temps of the right type + for attr in ('start', 'stop', 'step'): + value = getattr(index, attr) + if not value.is_none: + value = value.coerce_to(index_type, env) + #value = value.coerce_to_temp(env) + setattr(index, attr, value) + new_indices.append(value) + + elif index.type.is_int or index.type.is_pyobject: + if index.type.is_pyobject and not self.warned_untyped_idx: + warning(index.pos, "Index should be typed for more efficient access", level=2) + MemoryViewIndexNode.warned_untyped_idx = True + + self.is_memview_index = True + index = index.coerce_to(index_type, env) + indices[i] = index + new_indices.append(index) + + else: + self.type = error_type + error(index.pos, "Invalid index for memoryview specified, type %s" % index.type) + return self + + ### FIXME: replace by MemoryViewSliceNode if is_memview_slice ? + self.is_memview_index = self.is_memview_index and not self.is_memview_slice + self.indices = new_indices + # All indices with all start/stop/step for slices. + # We need to keep this around. + self.original_indices = indices + self.nogil = env.nogil + + self.analyse_operation(env, getting, axes) + self.wrap_in_nonecheck_node(env) + return self + + def analyse_operation(self, env, getting, axes): + self.none_error_message = "Cannot index None memoryview slice" + self.analyse_buffer_index(env, getting) + + def analyse_broadcast_operation(self, rhs): + """ + Support broadcasting for slice assignment. + E.g. + m_2d[...] = m_1d # or, + m_1d[...] = m_2d # if the leading dimension has extent 1 + """ + if self.type.is_memoryviewslice: + lhs = self + if lhs.is_memview_broadcast or rhs.is_memview_broadcast: + lhs.is_memview_broadcast = True + rhs.is_memview_broadcast = True + + def analyse_as_memview_scalar_assignment(self, rhs): + lhs = self.analyse_assignment(rhs) + if lhs: + rhs.is_memview_copy_assignment = lhs.is_memview_copy_assignment + return lhs + return self + + +class MemoryViewSliceNode(MemoryViewIndexNode): + + is_memview_slice = True + + # No-op slicing operation, this node will be replaced + is_ellipsis_noop = False + is_memview_scalar_assignment = False + is_memview_index = False + is_memview_broadcast = False + + def analyse_ellipsis_noop(self, env, getting): + """Slicing operations needing no evaluation, i.e. m[...] or m[:, :]""" + ### FIXME: replace directly + self.is_ellipsis_noop = all( + index.is_slice and index.start.is_none and index.stop.is_none and index.step.is_none + for index in self.indices) + + if self.is_ellipsis_noop: + self.type = self.base.type + + def analyse_operation(self, env, getting, axes): + from . import MemoryView + + if not getting: + self.is_memview_broadcast = True + self.none_error_message = "Cannot assign to None memoryview slice" + else: + self.none_error_message = "Cannot slice None memoryview slice" + + self.analyse_ellipsis_noop(env, getting) + if self.is_ellipsis_noop: + return + + self.index = None + self.is_temp = True + self.use_managed_ref = True + + if not MemoryView.validate_axes(self.pos, axes): + self.type = error_type + return + + self.type = PyrexTypes.MemoryViewSliceType(self.base.type.dtype, axes) + + if not (self.base.is_simple() or self.base.result_in_temp()): + self.base = self.base.coerce_to_temp(env) + + def analyse_assignment(self, rhs): + if not rhs.type.is_memoryviewslice and ( + self.type.dtype.assignable_from(rhs.type) or + rhs.type.is_pyobject): + # scalar assignment + return MemoryCopyScalar(self.pos, self) + else: + return MemoryCopySlice(self.pos, self) + + def merged_indices(self, indices): + """Return a new list of indices/slices with 'indices' merged into the current ones + according to slicing rules. + Is used to implement "view[i][j]" => "view[i, j]". + Return None if the indices cannot (easily) be merged at compile time. + """ + if not indices: + return None + # NOTE: Need to evaluate "self.original_indices" here as they might differ from "self.indices". + new_indices = self.original_indices[:] + indices = indices[:] + for i, s in enumerate(self.original_indices): + if s.is_slice: + if s.start.is_none and s.stop.is_none and s.step.is_none: + # Full slice found, replace by index. + new_indices[i] = indices[0] + indices.pop(0) + if not indices: + return new_indices + else: + # Found something non-trivial, e.g. a partial slice. + return None + elif not s.type.is_int: + # Not a slice, not an integer index => could be anything... + return None + if indices: + if len(new_indices) + len(indices) > self.base.type.ndim: + return None + new_indices += indices + return new_indices + + def is_simple(self): + if self.is_ellipsis_noop: + # TODO: fix SimpleCallNode.is_simple() + return self.base.is_simple() or self.base.result_in_temp() + + return self.result_in_temp() + + def calculate_result_code(self): + """This is called in case this is a no-op slicing node""" + return self.base.result() + + def generate_result_code(self, code): + if self.is_ellipsis_noop: + return ### FIXME: remove + buffer_entry = self.buffer_entry() + have_gil = not self.in_nogil_context + + # TODO Mark: this is insane, do it better + have_slices = False + it = iter(self.indices) + for index in self.original_indices: + if index.is_slice: + have_slices = True + if not index.start.is_none: + index.start = next(it) + if not index.stop.is_none: + index.stop = next(it) + if not index.step.is_none: + index.step = next(it) + else: + next(it) + + assert not list(it) + + buffer_entry.generate_buffer_slice_code( + code, self.original_indices, self.result(), + have_gil=have_gil, have_slices=have_slices, + directives=code.globalstate.directives) + + def generate_assignment_code(self, rhs, code, overloaded_assignment=False): + if self.is_ellipsis_noop: + self.generate_subexpr_evaluation_code(code) + else: + self.generate_evaluation_code(code) + + if self.is_memview_scalar_assignment: + self.generate_memoryviewslice_assign_scalar_code(rhs, code) + else: + self.generate_memoryviewslice_setslice_code(rhs, code) + + if self.is_ellipsis_noop: + self.generate_subexpr_disposal_code(code) + else: + self.generate_disposal_code(code) + + rhs.generate_disposal_code(code) + rhs.free_temps(code) + + +class MemoryCopyNode(ExprNode): + """ + Wraps a memoryview slice for slice assignment. + + dst: destination mememoryview slice + """ + + subexprs = ['dst'] + + def __init__(self, pos, dst): + super(MemoryCopyNode, self).__init__(pos) + self.dst = dst + self.type = dst.type + + def generate_assignment_code(self, rhs, code, overloaded_assignment=False): + self.dst.generate_evaluation_code(code) + self._generate_assignment_code(rhs, code) + self.dst.generate_disposal_code(code) + self.dst.free_temps(code) + rhs.generate_disposal_code(code) + rhs.free_temps(code) + + +class MemoryCopySlice(MemoryCopyNode): + """ + Copy the contents of slice src to slice dst. Does not support indirect + slices. + + memslice1[...] = memslice2 + memslice1[:] = memslice2 + """ + + is_memview_copy_assignment = True + copy_slice_cname = "__pyx_memoryview_copy_contents" + + def _generate_assignment_code(self, src, code): + dst = self.dst + + src.type.assert_direct_dims(src.pos) + dst.type.assert_direct_dims(dst.pos) + + code.putln(code.error_goto_if_neg( + "%s(%s, %s, %d, %d, %d)" % (self.copy_slice_cname, + src.result(), dst.result(), + src.type.ndim, dst.type.ndim, + dst.type.dtype.is_pyobject), + dst.pos)) + + +class MemoryCopyScalar(MemoryCopyNode): + """ + Assign a scalar to a slice. dst must be simple, scalar will be assigned + to a correct type and not just something assignable. + + memslice1[...] = 0.0 + memslice1[:] = 0.0 + """ + + def __init__(self, pos, dst): + super(MemoryCopyScalar, self).__init__(pos, dst) + self.type = dst.type.dtype + + def _generate_assignment_code(self, scalar, code): + from . import MemoryView + + self.dst.type.assert_direct_dims(self.dst.pos) + + dtype = self.dst.type.dtype + type_decl = dtype.declaration_code("") + slice_decl = self.dst.type.declaration_code("") + + code.begin_block() + code.putln("%s __pyx_temp_scalar = %s;" % (type_decl, scalar.result())) + if self.dst.result_in_temp() or self.dst.is_simple(): + dst_temp = self.dst.result() + else: + code.putln("%s __pyx_temp_slice = %s;" % (slice_decl, self.dst.result())) + dst_temp = "__pyx_temp_slice" + + slice_iter_obj = MemoryView.slice_iter(self.dst.type, dst_temp, + self.dst.type.ndim, code) + p = slice_iter_obj.start_loops() + + if dtype.is_pyobject: + code.putln("Py_DECREF(*(PyObject **) %s);" % p) + + code.putln("*((%s *) %s) = __pyx_temp_scalar;" % (type_decl, p)) + + if dtype.is_pyobject: + code.putln("Py_INCREF(__pyx_temp_scalar);") + + slice_iter_obj.end_loops() + code.end_block() + + +class SliceIndexNode(ExprNode): + # 2-element slice indexing + # + # base ExprNode + # start ExprNode or None + # stop ExprNode or None + # slice ExprNode or None constant slice object + + subexprs = ['base', 'start', 'stop', 'slice'] + + slice = None + + def infer_type(self, env): + base_type = self.base.infer_type(env) + if base_type.is_string or base_type.is_cpp_class: + return bytes_type + elif base_type.is_pyunicode_ptr: + return unicode_type + elif base_type in (bytes_type, bytearray_type, str_type, unicode_type, + basestring_type, list_type, tuple_type): + return base_type + elif base_type.is_ptr or base_type.is_array: + return PyrexTypes.c_array_type(base_type.base_type, None) + return py_object_type + + def inferable_item_node(self, index=0): + # slicing shouldn't change the result type of the base, but the index might + if index is not not_a_constant and self.start: + if self.start.has_constant_result(): + index += self.start.constant_result + else: + index = not_a_constant + return self.base.inferable_item_node(index) + + def may_be_none(self): + base_type = self.base.type + if base_type: + if base_type.is_string: + return False + if base_type in (bytes_type, str_type, unicode_type, + basestring_type, list_type, tuple_type): + return False + return ExprNode.may_be_none(self) + + def calculate_constant_result(self): + if self.start is None: + start = None + else: + start = self.start.constant_result + if self.stop is None: + stop = None + else: + stop = self.stop.constant_result + self.constant_result = self.base.constant_result[start:stop] + + def compile_time_value(self, denv): + base = self.base.compile_time_value(denv) + if self.start is None: + start = 0 + else: + start = self.start.compile_time_value(denv) + if self.stop is None: + stop = None + else: + stop = self.stop.compile_time_value(denv) + try: + return base[start:stop] + except Exception as e: + self.compile_time_value_error(e) + + def analyse_target_declaration(self, env): + pass + + def analyse_target_types(self, env): + node = self.analyse_types(env, getting=False) + # when assigning, we must accept any Python type + if node.type.is_pyobject: + node.type = py_object_type + return node + + def analyse_types(self, env, getting=True): + self.base = self.base.analyse_types(env) + + if self.base.type.is_buffer or self.base.type.is_pythran_expr or self.base.type.is_memoryviewslice: + none_node = NoneNode(self.pos) + index = SliceNode(self.pos, + start=self.start or none_node, + stop=self.stop or none_node, + step=none_node) + index_node = IndexNode(self.pos, index=index, base=self.base) + return index_node.analyse_base_and_index_types( + env, getting=getting, setting=not getting, + analyse_base=False) + + if self.start: + self.start = self.start.analyse_types(env) + if self.stop: + self.stop = self.stop.analyse_types(env) + + if not env.directives['wraparound']: + check_negative_indices(self.start, self.stop) + + base_type = self.base.type + if base_type.is_array and not getting: + # cannot assign directly to C array => try to assign by making a copy + if not self.start and not self.stop: + self.type = base_type + else: + self.type = PyrexTypes.CPtrType(base_type.base_type) + elif base_type.is_string or base_type.is_cpp_string: + self.type = default_str_type(env) + elif base_type.is_pyunicode_ptr: + self.type = unicode_type + elif base_type.is_ptr: + self.type = base_type + elif base_type.is_array: + # we need a ptr type here instead of an array type, as + # array types can result in invalid type casts in the C + # code + self.type = PyrexTypes.CPtrType(base_type.base_type) + else: + self.base = self.base.coerce_to_pyobject(env) + self.type = py_object_type + if base_type.is_builtin_type: + # slicing builtin types returns something of the same type + self.type = base_type + self.base = self.base.as_none_safe_node("'NoneType' object is not subscriptable") + + if self.type is py_object_type: + if (not self.start or self.start.is_literal) and \ + (not self.stop or self.stop.is_literal): + # cache the constant slice object, in case we need it + none_node = NoneNode(self.pos) + self.slice = SliceNode( + self.pos, + start=copy.deepcopy(self.start or none_node), + stop=copy.deepcopy(self.stop or none_node), + step=none_node + ).analyse_types(env) + else: + c_int = PyrexTypes.c_py_ssize_t_type + + def allow_none(node, default_value, env): + # Coerce to Py_ssize_t, but allow None as meaning the default slice bound. + from .UtilNodes import EvalWithTempExprNode, ResultRefNode + + node_ref = ResultRefNode(node) + new_expr = CondExprNode( + node.pos, + true_val=IntNode( + node.pos, + type=c_int, + value=default_value, + constant_result=int(default_value) if default_value.isdigit() else not_a_constant, + ), + false_val=node_ref.coerce_to(c_int, env), + test=PrimaryCmpNode( + node.pos, + operand1=node_ref, + operator='is', + operand2=NoneNode(node.pos), + ).analyse_types(env) + ).analyse_result_type(env) + return EvalWithTempExprNode(node_ref, new_expr) + + if self.start: + if self.start.type.is_pyobject: + self.start = allow_none(self.start, '0', env) + self.start = self.start.coerce_to(c_int, env) + if self.stop: + if self.stop.type.is_pyobject: + self.stop = allow_none(self.stop, 'PY_SSIZE_T_MAX', env) + self.stop = self.stop.coerce_to(c_int, env) + self.is_temp = 1 + return self + + def analyse_as_type(self, env): + base_type = self.base.analyse_as_type(env) + if base_type and not base_type.is_pyobject: + if not self.start and not self.stop: + # memory view + from . import MemoryView + env.use_utility_code(MemoryView.view_utility_code) + none_node = NoneNode(self.pos) + slice_node = SliceNode( + self.pos, + start=none_node, + stop=none_node, + step=none_node, + ) + return PyrexTypes.MemoryViewSliceType( + base_type, MemoryView.get_axes_specs(env, [slice_node])) + return None + + nogil_check = Node.gil_error + gil_message = "Slicing Python object" + + get_slice_utility_code = TempitaUtilityCode.load( + "SliceObject", "ObjectHandling.c", context={'access': 'Get'}) + + set_slice_utility_code = TempitaUtilityCode.load( + "SliceObject", "ObjectHandling.c", context={'access': 'Set'}) + + def coerce_to(self, dst_type, env): + if ((self.base.type.is_string or self.base.type.is_cpp_string) + and dst_type in (bytes_type, bytearray_type, str_type, unicode_type)): + if (dst_type not in (bytes_type, bytearray_type) + and not env.directives['c_string_encoding']): + error(self.pos, + "default encoding required for conversion from '%s' to '%s'" % + (self.base.type, dst_type)) + self.type = dst_type + if dst_type.is_array and self.base.type.is_array: + if not self.start and not self.stop: + # redundant slice building, copy C arrays directly + return self.base.coerce_to(dst_type, env) + # else: check array size if possible + return super(SliceIndexNode, self).coerce_to(dst_type, env) + + def generate_result_code(self, code): + if not self.type.is_pyobject: + error(self.pos, + "Slicing is not currently supported for '%s'." % self.type) + return + + base_result = self.base.result() + result = self.result() + start_code = self.start_code() + stop_code = self.stop_code() + if self.base.type.is_string: + base_result = self.base.result() + if self.base.type not in (PyrexTypes.c_char_ptr_type, PyrexTypes.c_const_char_ptr_type): + base_result = '((const char*)%s)' % base_result + if self.type is bytearray_type: + type_name = 'ByteArray' + else: + type_name = self.type.name.title() + if self.stop is None: + code.putln( + "%s = __Pyx_Py%s_FromString(%s + %s); %s" % ( + result, + type_name, + base_result, + start_code, + code.error_goto_if_null(result, self.pos))) + else: + code.putln( + "%s = __Pyx_Py%s_FromStringAndSize(%s + %s, %s - %s); %s" % ( + result, + type_name, + base_result, + start_code, + stop_code, + start_code, + code.error_goto_if_null(result, self.pos))) + elif self.base.type.is_pyunicode_ptr: + base_result = self.base.result() + if self.base.type != PyrexTypes.c_py_unicode_ptr_type: + base_result = '((const Py_UNICODE*)%s)' % base_result + if self.stop is None: + code.putln( + "%s = __Pyx_PyUnicode_FromUnicode(%s + %s); %s" % ( + result, + base_result, + start_code, + code.error_goto_if_null(result, self.pos))) + else: + code.putln( + "%s = __Pyx_PyUnicode_FromUnicodeAndLength(%s + %s, %s - %s); %s" % ( + result, + base_result, + start_code, + stop_code, + start_code, + code.error_goto_if_null(result, self.pos))) + + elif self.base.type is unicode_type: + code.globalstate.use_utility_code( + UtilityCode.load_cached("PyUnicode_Substring", "StringTools.c")) + code.putln( + "%s = __Pyx_PyUnicode_Substring(%s, %s, %s); %s" % ( + result, + base_result, + start_code, + stop_code, + code.error_goto_if_null(result, self.pos))) + elif self.type is py_object_type: + code.globalstate.use_utility_code(self.get_slice_utility_code) + (has_c_start, has_c_stop, c_start, c_stop, + py_start, py_stop, py_slice) = self.get_slice_config() + code.putln( + "%s = __Pyx_PyObject_GetSlice(%s, %s, %s, %s, %s, %s, %d, %d, %d); %s" % ( + result, + self.base.py_result(), + c_start, c_stop, + py_start, py_stop, py_slice, + has_c_start, has_c_stop, + bool(code.globalstate.directives['wraparound']), + code.error_goto_if_null(result, self.pos))) + else: + if self.base.type is list_type: + code.globalstate.use_utility_code( + TempitaUtilityCode.load_cached("SliceTupleAndList", "ObjectHandling.c")) + cfunc = '__Pyx_PyList_GetSlice' + elif self.base.type is tuple_type: + code.globalstate.use_utility_code( + TempitaUtilityCode.load_cached("SliceTupleAndList", "ObjectHandling.c")) + cfunc = '__Pyx_PyTuple_GetSlice' + else: + cfunc = 'PySequence_GetSlice' + code.putln( + "%s = %s(%s, %s, %s); %s" % ( + result, + cfunc, + self.base.py_result(), + start_code, + stop_code, + code.error_goto_if_null(result, self.pos))) + code.put_gotref(self.py_result()) + + def generate_assignment_code(self, rhs, code, overloaded_assignment=False, + exception_check=None, exception_value=None): + self.generate_subexpr_evaluation_code(code) + if self.type.is_pyobject: + code.globalstate.use_utility_code(self.set_slice_utility_code) + (has_c_start, has_c_stop, c_start, c_stop, + py_start, py_stop, py_slice) = self.get_slice_config() + code.put_error_if_neg(self.pos, + "__Pyx_PyObject_SetSlice(%s, %s, %s, %s, %s, %s, %s, %d, %d, %d)" % ( + self.base.py_result(), + rhs.py_result(), + c_start, c_stop, + py_start, py_stop, py_slice, + has_c_start, has_c_stop, + bool(code.globalstate.directives['wraparound']))) + else: + start_offset = self.start_code() if self.start else '0' + if rhs.type.is_array: + array_length = rhs.type.size + self.generate_slice_guard_code(code, array_length) + else: + array_length = '%s - %s' % (self.stop_code(), start_offset) + + code.globalstate.use_utility_code(UtilityCode.load_cached("IncludeStringH", "StringTools.c")) + code.putln("memcpy(&(%s[%s]), %s, sizeof(%s[0]) * (%s));" % ( + self.base.result(), start_offset, + rhs.result(), + self.base.result(), array_length + )) + + self.generate_subexpr_disposal_code(code) + self.free_subexpr_temps(code) + rhs.generate_disposal_code(code) + rhs.free_temps(code) + + def generate_deletion_code(self, code, ignore_nonexisting=False): + if not self.base.type.is_pyobject: + error(self.pos, + "Deleting slices is only supported for Python types, not '%s'." % self.type) + return + self.generate_subexpr_evaluation_code(code) + code.globalstate.use_utility_code(self.set_slice_utility_code) + (has_c_start, has_c_stop, c_start, c_stop, + py_start, py_stop, py_slice) = self.get_slice_config() + code.put_error_if_neg(self.pos, + "__Pyx_PyObject_DelSlice(%s, %s, %s, %s, %s, %s, %d, %d, %d)" % ( + self.base.py_result(), + c_start, c_stop, + py_start, py_stop, py_slice, + has_c_start, has_c_stop, + bool(code.globalstate.directives['wraparound']))) + self.generate_subexpr_disposal_code(code) + self.free_subexpr_temps(code) + + def get_slice_config(self): + has_c_start, c_start, py_start = False, '0', 'NULL' + if self.start: + has_c_start = not self.start.type.is_pyobject + if has_c_start: + c_start = self.start.result() + else: + py_start = '&%s' % self.start.py_result() + has_c_stop, c_stop, py_stop = False, '0', 'NULL' + if self.stop: + has_c_stop = not self.stop.type.is_pyobject + if has_c_stop: + c_stop = self.stop.result() + else: + py_stop = '&%s' % self.stop.py_result() + py_slice = self.slice and '&%s' % self.slice.py_result() or 'NULL' + return (has_c_start, has_c_stop, c_start, c_stop, + py_start, py_stop, py_slice) + + def generate_slice_guard_code(self, code, target_size): + if not self.base.type.is_array: + return + slice_size = self.base.type.size + try: + total_length = slice_size = int(slice_size) + except ValueError: + total_length = None + + start = stop = None + if self.stop: + stop = self.stop.result() + try: + stop = int(stop) + if stop < 0: + if total_length is None: + slice_size = '%s + %d' % (slice_size, stop) + else: + slice_size += stop + else: + slice_size = stop + stop = None + except ValueError: + pass + + if self.start: + start = self.start.result() + try: + start = int(start) + if start < 0: + if total_length is None: + start = '%s + %d' % (self.base.type.size, start) + else: + start += total_length + if isinstance(slice_size, _py_int_types): + slice_size -= start + else: + slice_size = '%s - (%s)' % (slice_size, start) + start = None + except ValueError: + pass + + runtime_check = None + compile_time_check = False + try: + int_target_size = int(target_size) + except ValueError: + int_target_size = None + else: + compile_time_check = isinstance(slice_size, _py_int_types) + + if compile_time_check and slice_size < 0: + if int_target_size > 0: + error(self.pos, "Assignment to empty slice.") + elif compile_time_check and start is None and stop is None: + # we know the exact slice length + if int_target_size != slice_size: + error(self.pos, "Assignment to slice of wrong length, expected %s, got %s" % ( + slice_size, target_size)) + elif start is not None: + if stop is None: + stop = slice_size + runtime_check = "(%s)-(%s)" % (stop, start) + elif stop is not None: + runtime_check = stop + else: + runtime_check = slice_size + + if runtime_check: + code.putln("if (unlikely((%s) != (%s))) {" % (runtime_check, target_size)) + code.putln( + 'PyErr_Format(PyExc_ValueError, "Assignment to slice of wrong length,' + ' expected %%" CYTHON_FORMAT_SSIZE_T "d, got %%" CYTHON_FORMAT_SSIZE_T "d",' + ' (Py_ssize_t)(%s), (Py_ssize_t)(%s));' % ( + target_size, runtime_check)) + code.putln(code.error_goto(self.pos)) + code.putln("}") + + def start_code(self): + if self.start: + return self.start.result() + else: + return "0" + + def stop_code(self): + if self.stop: + return self.stop.result() + elif self.base.type.is_array: + return self.base.type.size + else: + return "PY_SSIZE_T_MAX" + + def calculate_result_code(self): + # self.result() is not used, but this method must exist + return "" + + +class SliceNode(ExprNode): + # start:stop:step in subscript list + # + # start ExprNode + # stop ExprNode + # step ExprNode + + subexprs = ['start', 'stop', 'step'] + is_slice = True + type = slice_type + is_temp = 1 + + def calculate_constant_result(self): + self.constant_result = slice( + self.start.constant_result, + self.stop.constant_result, + self.step.constant_result) + + def compile_time_value(self, denv): + start = self.start.compile_time_value(denv) + stop = self.stop.compile_time_value(denv) + step = self.step.compile_time_value(denv) + try: + return slice(start, stop, step) + except Exception as e: + self.compile_time_value_error(e) + + def may_be_none(self): + return False + + def analyse_types(self, env): + start = self.start.analyse_types(env) + stop = self.stop.analyse_types(env) + step = self.step.analyse_types(env) + self.start = start.coerce_to_pyobject(env) + self.stop = stop.coerce_to_pyobject(env) + self.step = step.coerce_to_pyobject(env) + if self.start.is_literal and self.stop.is_literal and self.step.is_literal: + self.is_literal = True + self.is_temp = False + return self + + gil_message = "Constructing Python slice object" + + def calculate_result_code(self): + return self.result_code + + def generate_result_code(self, code): + if self.is_literal: + dedup_key = make_dedup_key(self.type, (self,)) + self.result_code = code.get_py_const(py_object_type, 'slice', cleanup_level=2, dedup_key=dedup_key) + code = code.get_cached_constants_writer(self.result_code) + if code is None: + return # already initialised + code.mark_pos(self.pos) + + code.putln( + "%s = PySlice_New(%s, %s, %s); %s" % ( + self.result(), + self.start.py_result(), + self.stop.py_result(), + self.step.py_result(), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + if self.is_literal: + code.put_giveref(self.py_result()) + +class SliceIntNode(SliceNode): + # start:stop:step in subscript list + # This is just a node to hold start,stop and step nodes that can be + # converted to integers. This does not generate a slice python object. + # + # start ExprNode + # stop ExprNode + # step ExprNode + + is_temp = 0 + + def calculate_constant_result(self): + self.constant_result = slice( + self.start.constant_result, + self.stop.constant_result, + self.step.constant_result) + + def compile_time_value(self, denv): + start = self.start.compile_time_value(denv) + stop = self.stop.compile_time_value(denv) + step = self.step.compile_time_value(denv) + try: + return slice(start, stop, step) + except Exception as e: + self.compile_time_value_error(e) + + def may_be_none(self): + return False + + def analyse_types(self, env): + self.start = self.start.analyse_types(env) + self.stop = self.stop.analyse_types(env) + self.step = self.step.analyse_types(env) + + if not self.start.is_none: + self.start = self.start.coerce_to_integer(env) + if not self.stop.is_none: + self.stop = self.stop.coerce_to_integer(env) + if not self.step.is_none: + self.step = self.step.coerce_to_integer(env) + + if self.start.is_literal and self.stop.is_literal and self.step.is_literal: + self.is_literal = True + self.is_temp = False + return self + + def calculate_result_code(self): + pass + + def generate_result_code(self, code): + for a in self.start,self.stop,self.step: + if isinstance(a, CloneNode): + a.arg.result() + + +class CallNode(ExprNode): + + # allow overriding the default 'may_be_none' behaviour + may_return_none = None + + def infer_type(self, env): + # TODO(robertwb): Reduce redundancy with analyse_types. + function = self.function + func_type = function.infer_type(env) + if isinstance(function, NewExprNode): + # note: needs call to infer_type() above + return PyrexTypes.CPtrType(function.class_type) + if func_type is py_object_type: + # function might have lied for safety => try to find better type + entry = getattr(function, 'entry', None) + if entry is not None: + func_type = entry.type or func_type + if func_type.is_ptr: + func_type = func_type.base_type + if func_type.is_cfunction: + if getattr(self.function, 'entry', None) and hasattr(self, 'args'): + alternatives = self.function.entry.all_alternatives() + arg_types = [arg.infer_type(env) for arg in self.args] + func_entry = PyrexTypes.best_match(arg_types, alternatives) + if func_entry: + func_type = func_entry.type + if func_type.is_ptr: + func_type = func_type.base_type + return func_type.return_type + return func_type.return_type + elif func_type is type_type: + if function.is_name and function.entry and function.entry.type: + result_type = function.entry.type + if result_type.is_extension_type: + return result_type + elif result_type.is_builtin_type: + if function.entry.name == 'float': + return PyrexTypes.c_double_type + elif function.entry.name in Builtin.types_that_construct_their_instance: + return result_type + return py_object_type + + def type_dependencies(self, env): + # TODO: Update when Danilo's C++ code merged in to handle the + # the case of function overloading. + return self.function.type_dependencies(env) + + def is_simple(self): + # C function calls could be considered simple, but they may + # have side-effects that may hit when multiple operations must + # be effected in order, e.g. when constructing the argument + # sequence for a function call or comparing values. + return False + + def may_be_none(self): + if self.may_return_none is not None: + return self.may_return_none + func_type = self.function.type + if func_type is type_type and self.function.is_name: + entry = self.function.entry + if entry.type.is_extension_type: + return False + if (entry.type.is_builtin_type and + entry.name in Builtin.types_that_construct_their_instance): + return False + return ExprNode.may_be_none(self) + + def set_py_result_type(self, function, func_type=None): + if func_type is None: + func_type = function.type + if func_type is Builtin.type_type and ( + function.is_name and + function.entry and + function.entry.is_builtin and + function.entry.name in Builtin.types_that_construct_their_instance): + # calling a builtin type that returns a specific object type + if function.entry.name == 'float': + # the following will come true later on in a transform + self.type = PyrexTypes.c_double_type + self.result_ctype = PyrexTypes.c_double_type + else: + self.type = Builtin.builtin_types[function.entry.name] + self.result_ctype = py_object_type + self.may_return_none = False + elif function.is_name and function.type_entry: + # We are calling an extension type constructor. As long as we do not + # support __new__(), the result type is clear + self.type = function.type_entry.type + self.result_ctype = py_object_type + self.may_return_none = False + else: + self.type = py_object_type + + def analyse_as_type_constructor(self, env): + type = self.function.analyse_as_type(env) + if type and type.is_struct_or_union: + args, kwds = self.explicit_args_kwds() + items = [] + for arg, member in zip(args, type.scope.var_entries): + items.append(DictItemNode(pos=arg.pos, key=StringNode(pos=arg.pos, value=member.name), value=arg)) + if kwds: + items += kwds.key_value_pairs + self.key_value_pairs = items + self.__class__ = DictNode + self.analyse_types(env) # FIXME + self.coerce_to(type, env) + return True + elif type and type.is_cpp_class: + self.args = [ arg.analyse_types(env) for arg in self.args ] + constructor = type.scope.lookup("") + if not constructor: + error(self.function.pos, "no constructor found for C++ type '%s'" % self.function.name) + self.type = error_type + return self + self.function = RawCNameExprNode(self.function.pos, constructor.type) + self.function.entry = constructor + self.function.set_cname(type.empty_declaration_code()) + self.analyse_c_function_call(env) + self.type = type + return True + + def is_lvalue(self): + return self.type.is_reference + + def nogil_check(self, env): + func_type = self.function_type() + if func_type.is_pyobject: + self.gil_error() + elif not func_type.is_error and not getattr(func_type, 'nogil', False): + self.gil_error() + + gil_message = "Calling gil-requiring function" + + +class SimpleCallNode(CallNode): + # Function call without keyword, * or ** args. + # + # function ExprNode + # args [ExprNode] + # arg_tuple ExprNode or None used internally + # self ExprNode or None used internally + # coerced_self ExprNode or None used internally + # wrapper_call bool used internally + # has_optional_args bool used internally + # nogil bool used internally + + subexprs = ['self', 'coerced_self', 'function', 'args', 'arg_tuple'] + + self = None + coerced_self = None + arg_tuple = None + wrapper_call = False + has_optional_args = False + nogil = False + analysed = False + overflowcheck = False + + def compile_time_value(self, denv): + function = self.function.compile_time_value(denv) + args = [arg.compile_time_value(denv) for arg in self.args] + try: + return function(*args) + except Exception as e: + self.compile_time_value_error(e) + + def analyse_as_type(self, env): + attr = self.function.as_cython_attribute() + if attr == 'pointer': + if len(self.args) != 1: + error(self.args.pos, "only one type allowed.") + else: + type = self.args[0].analyse_as_type(env) + if not type: + error(self.args[0].pos, "Unknown type") + else: + return PyrexTypes.CPtrType(type) + elif attr == 'typeof': + if len(self.args) != 1: + error(self.args.pos, "only one type allowed.") + operand = self.args[0].analyse_types(env) + return operand.type + + def explicit_args_kwds(self): + return self.args, None + + def analyse_types(self, env): + if self.analyse_as_type_constructor(env): + return self + if self.analysed: + return self + self.analysed = True + self.function.is_called = 1 + self.function = self.function.analyse_types(env) + function = self.function + + if function.is_attribute and function.entry and function.entry.is_cmethod: + # Take ownership of the object from which the attribute + # was obtained, because we need to pass it as 'self'. + self.self = function.obj + function.obj = CloneNode(self.self) + + func_type = self.function_type() + self.is_numpy_call_with_exprs = False + if (has_np_pythran(env) and function.is_numpy_attribute and + pythran_is_numpy_func_supported(function)): + has_pythran_args = True + self.arg_tuple = TupleNode(self.pos, args = self.args) + self.arg_tuple = self.arg_tuple.analyse_types(env) + for arg in self.arg_tuple.args: + has_pythran_args &= is_pythran_supported_node_or_none(arg) + self.is_numpy_call_with_exprs = bool(has_pythran_args) + if self.is_numpy_call_with_exprs: + env.add_include_file(pythran_get_func_include_file(function)) + return NumPyMethodCallNode.from_node( + self, + function_cname=pythran_functor(function), + arg_tuple=self.arg_tuple, + type=PythranExpr(pythran_func_type(function, self.arg_tuple.args)), + ) + elif func_type.is_pyobject: + self.arg_tuple = TupleNode(self.pos, args = self.args) + self.arg_tuple = self.arg_tuple.analyse_types(env).coerce_to_pyobject(env) + self.args = None + self.set_py_result_type(function, func_type) + self.is_temp = 1 + else: + self.args = [ arg.analyse_types(env) for arg in self.args ] + self.analyse_c_function_call(env) + if func_type.exception_check == '+': + self.is_temp = True + return self + + def function_type(self): + # Return the type of the function being called, coercing a function + # pointer to a function if necessary. If the function has fused + # arguments, return the specific type. + func_type = self.function.type + + if func_type.is_ptr: + func_type = func_type.base_type + + return func_type + + def analyse_c_function_call(self, env): + func_type = self.function.type + if func_type is error_type: + self.type = error_type + return + + if func_type.is_cfunction and func_type.is_static_method: + if self.self and self.self.type.is_extension_type: + # To support this we'd need to pass self to determine whether + # it was overloaded in Python space (possibly via a Cython + # superclass turning a cdef method into a cpdef one). + error(self.pos, "Cannot call a static method on an instance variable.") + args = self.args + elif self.self: + args = [self.self] + self.args + else: + args = self.args + + if func_type.is_cpp_class: + overloaded_entry = self.function.type.scope.lookup("operator()") + if overloaded_entry is None: + self.type = PyrexTypes.error_type + self.result_code = "" + return + elif hasattr(self.function, 'entry'): + overloaded_entry = self.function.entry + elif self.function.is_subscript and self.function.is_fused_index: + overloaded_entry = self.function.type.entry + else: + overloaded_entry = None + + if overloaded_entry: + if self.function.type.is_fused: + functypes = self.function.type.get_all_specialized_function_types() + alternatives = [f.entry for f in functypes] + else: + alternatives = overloaded_entry.all_alternatives() + + entry = PyrexTypes.best_match( + [arg.type for arg in args], alternatives, self.pos, env, args) + + if not entry: + self.type = PyrexTypes.error_type + self.result_code = "" + return + + entry.used = True + if not func_type.is_cpp_class: + self.function.entry = entry + self.function.type = entry.type + func_type = self.function_type() + else: + entry = None + func_type = self.function_type() + if not func_type.is_cfunction: + error(self.pos, "Calling non-function type '%s'" % func_type) + self.type = PyrexTypes.error_type + self.result_code = "" + return + + # Check no. of args + max_nargs = len(func_type.args) + expected_nargs = max_nargs - func_type.optional_arg_count + actual_nargs = len(args) + if func_type.optional_arg_count and expected_nargs != actual_nargs: + self.has_optional_args = 1 + self.is_temp = 1 + + # check 'self' argument + if entry and entry.is_cmethod and func_type.args and not func_type.is_static_method: + formal_arg = func_type.args[0] + arg = args[0] + if formal_arg.not_none: + if self.self: + self.self = self.self.as_none_safe_node( + "'NoneType' object has no attribute '%{0}s'".format('.30' if len(entry.name) <= 30 else ''), + error='PyExc_AttributeError', + format_args=[entry.name]) + else: + # unbound method + arg = arg.as_none_safe_node( + "descriptor '%s' requires a '%s' object but received a 'NoneType'", + format_args=[entry.name, formal_arg.type.name]) + if self.self: + if formal_arg.accept_builtin_subtypes: + arg = CMethodSelfCloneNode(self.self) + else: + arg = CloneNode(self.self) + arg = self.coerced_self = arg.coerce_to(formal_arg.type, env) + elif formal_arg.type.is_builtin_type: + # special case: unbound methods of builtins accept subtypes + arg = arg.coerce_to(formal_arg.type, env) + if arg.type.is_builtin_type and isinstance(arg, PyTypeTestNode): + arg.exact_builtin_type = False + args[0] = arg + + # Coerce arguments + some_args_in_temps = False + for i in range(min(max_nargs, actual_nargs)): + formal_arg = func_type.args[i] + formal_type = formal_arg.type + arg = args[i].coerce_to(formal_type, env) + if formal_arg.not_none: + # C methods must do the None checks at *call* time + arg = arg.as_none_safe_node( + "cannot pass None into a C function argument that is declared 'not None'") + if arg.is_temp: + if i > 0: + # first argument in temp doesn't impact subsequent arguments + some_args_in_temps = True + elif arg.type.is_pyobject and not env.nogil: + if i == 0 and self.self is not None: + # a method's cloned "self" argument is ok + pass + elif arg.nonlocally_immutable(): + # plain local variables are ok + pass + else: + # we do not safely own the argument's reference, + # but we must make sure it cannot be collected + # before we return from the function, so we create + # an owned temp reference to it + if i > 0: # first argument doesn't matter + some_args_in_temps = True + arg = arg.coerce_to_temp(env) + args[i] = arg + + # handle additional varargs parameters + for i in range(max_nargs, actual_nargs): + arg = args[i] + if arg.type.is_pyobject: + if arg.type is str_type: + arg_ctype = PyrexTypes.c_char_ptr_type + else: + arg_ctype = arg.type.default_coerced_ctype() + if arg_ctype is None: + error(self.args[i].pos, + "Python object cannot be passed as a varargs parameter") + else: + args[i] = arg = arg.coerce_to(arg_ctype, env) + if arg.is_temp and i > 0: + some_args_in_temps = True + + if some_args_in_temps: + # if some args are temps and others are not, they may get + # constructed in the wrong order (temps first) => make + # sure they are either all temps or all not temps (except + # for the last argument, which is evaluated last in any + # case) + for i in range(actual_nargs-1): + if i == 0 and self.self is not None: + continue # self is ok + arg = args[i] + if arg.nonlocally_immutable(): + # locals, C functions, unassignable types are safe. + pass + elif arg.type.is_cpp_class: + # Assignment has side effects, avoid. + pass + elif env.nogil and arg.type.is_pyobject: + # can't copy a Python reference into a temp in nogil + # env (this is safe: a construction would fail in + # nogil anyway) + pass + else: + #self.args[i] = arg.coerce_to_temp(env) + # instead: issue a warning + if i > 0 or i == 1 and self.self is not None: # skip first arg + warning(arg.pos, "Argument evaluation order in C function call is undefined and may not be as expected", 0) + break + + self.args[:] = args + + # Calc result type and code fragment + if isinstance(self.function, NewExprNode): + self.type = PyrexTypes.CPtrType(self.function.class_type) + else: + self.type = func_type.return_type + + if self.function.is_name or self.function.is_attribute: + func_entry = self.function.entry + if func_entry and (func_entry.utility_code or func_entry.utility_code_definition): + self.is_temp = 1 # currently doesn't work for self.calculate_result_code() + + if self.type.is_pyobject: + self.result_ctype = py_object_type + self.is_temp = 1 + elif func_type.exception_value is not None or func_type.exception_check: + self.is_temp = 1 + elif self.type.is_memoryviewslice: + self.is_temp = 1 + # func_type.exception_check = True + + if self.is_temp and self.type.is_reference: + self.type = PyrexTypes.CFakeReferenceType(self.type.ref_base_type) + + # Called in 'nogil' context? + self.nogil = env.nogil + if (self.nogil and + func_type.exception_check and + func_type.exception_check != '+'): + env.use_utility_code(pyerr_occurred_withgil_utility_code) + # C++ exception handler + if func_type.exception_check == '+': + if func_type.exception_value is None: + env.use_utility_code(UtilityCode.load_cached("CppExceptionConversion", "CppSupport.cpp")) + + self.overflowcheck = env.directives['overflowcheck'] + + def calculate_result_code(self): + return self.c_call_code() + + def c_call_code(self): + func_type = self.function_type() + if self.type is PyrexTypes.error_type or not func_type.is_cfunction: + return "" + formal_args = func_type.args + arg_list_code = [] + args = list(zip(formal_args, self.args)) + max_nargs = len(func_type.args) + expected_nargs = max_nargs - func_type.optional_arg_count + actual_nargs = len(self.args) + for formal_arg, actual_arg in args[:expected_nargs]: + arg_code = actual_arg.result_as(formal_arg.type) + arg_list_code.append(arg_code) + + if func_type.is_overridable: + arg_list_code.append(str(int(self.wrapper_call or self.function.entry.is_unbound_cmethod))) + + if func_type.optional_arg_count: + if expected_nargs == actual_nargs: + optional_args = 'NULL' + else: + optional_args = "&%s" % self.opt_arg_struct + arg_list_code.append(optional_args) + + for actual_arg in self.args[len(formal_args):]: + arg_list_code.append(actual_arg.result()) + + result = "%s(%s)" % (self.function.result(), ', '.join(arg_list_code)) + return result + + def is_c_result_required(self): + func_type = self.function_type() + if not func_type.exception_value or func_type.exception_check == '+': + return False # skip allocation of unused result temp + return True + + def generate_evaluation_code(self, code): + function = self.function + if function.is_name or function.is_attribute: + code.globalstate.use_entry_utility_code(function.entry) + + abs_function_cnames = ('abs', 'labs', '__Pyx_abs_longlong') + is_signed_int = self.type.is_int and self.type.signed + if self.overflowcheck and is_signed_int and function.result() in abs_function_cnames: + code.globalstate.use_utility_code(UtilityCode.load_cached("Common", "Overflow.c")) + code.putln('if (unlikely(%s == __PYX_MIN(%s))) {\ + PyErr_SetString(PyExc_OverflowError,\ + "Trying to take the absolute value of the most negative integer is not defined."); %s; }' % ( + self.args[0].result(), + self.args[0].type.empty_declaration_code(), + code.error_goto(self.pos))) + + if not function.type.is_pyobject or len(self.arg_tuple.args) > 1 or ( + self.arg_tuple.args and self.arg_tuple.is_literal): + super(SimpleCallNode, self).generate_evaluation_code(code) + return + + # Special case 0-args and try to avoid explicit tuple creation for Python calls with 1 arg. + arg = self.arg_tuple.args[0] if self.arg_tuple.args else None + subexprs = (self.self, self.coerced_self, function, arg) + for subexpr in subexprs: + if subexpr is not None: + subexpr.generate_evaluation_code(code) + + code.mark_pos(self.pos) + assert self.is_temp + self.allocate_temp_result(code) + + if arg is None: + code.globalstate.use_utility_code(UtilityCode.load_cached( + "PyObjectCallNoArg", "ObjectHandling.c")) + code.putln( + "%s = __Pyx_PyObject_CallNoArg(%s); %s" % ( + self.result(), + function.py_result(), + code.error_goto_if_null(self.result(), self.pos))) + else: + code.globalstate.use_utility_code(UtilityCode.load_cached( + "PyObjectCallOneArg", "ObjectHandling.c")) + code.putln( + "%s = __Pyx_PyObject_CallOneArg(%s, %s); %s" % ( + self.result(), + function.py_result(), + arg.py_result(), + code.error_goto_if_null(self.result(), self.pos))) + + code.put_gotref(self.py_result()) + + for subexpr in subexprs: + if subexpr is not None: + subexpr.generate_disposal_code(code) + subexpr.free_temps(code) + + def generate_result_code(self, code): + func_type = self.function_type() + if func_type.is_pyobject: + arg_code = self.arg_tuple.py_result() + code.globalstate.use_utility_code(UtilityCode.load_cached( + "PyObjectCall", "ObjectHandling.c")) + code.putln( + "%s = __Pyx_PyObject_Call(%s, %s, NULL); %s" % ( + self.result(), + self.function.py_result(), + arg_code, + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + elif func_type.is_cfunction: + if self.has_optional_args: + actual_nargs = len(self.args) + expected_nargs = len(func_type.args) - func_type.optional_arg_count + self.opt_arg_struct = code.funcstate.allocate_temp( + func_type.op_arg_struct.base_type, manage_ref=True) + code.putln("%s.%s = %s;" % ( + self.opt_arg_struct, + Naming.pyrex_prefix + "n", + len(self.args) - expected_nargs)) + args = list(zip(func_type.args, self.args)) + for formal_arg, actual_arg in args[expected_nargs:actual_nargs]: + code.putln("%s.%s = %s;" % ( + self.opt_arg_struct, + func_type.opt_arg_cname(formal_arg.name), + actual_arg.result_as(formal_arg.type))) + exc_checks = [] + if self.type.is_pyobject and self.is_temp: + exc_checks.append("!%s" % self.result()) + elif self.type.is_memoryviewslice: + assert self.is_temp + exc_checks.append(self.type.error_condition(self.result())) + elif func_type.exception_check != '+': + exc_val = func_type.exception_value + exc_check = func_type.exception_check + if exc_val is not None: + exc_checks.append("%s == %s" % (self.result(), func_type.return_type.cast_code(exc_val))) + if exc_check: + if self.nogil: + exc_checks.append("__Pyx_ErrOccurredWithGIL()") + else: + exc_checks.append("PyErr_Occurred()") + if self.is_temp or exc_checks: + rhs = self.c_call_code() + if self.result(): + lhs = "%s = " % self.result() + if self.is_temp and self.type.is_pyobject: + #return_type = self.type # func_type.return_type + #print "SimpleCallNode.generate_result_code: casting", rhs, \ + # "from", return_type, "to pyobject" ### + rhs = typecast(py_object_type, self.type, rhs) + else: + lhs = "" + if func_type.exception_check == '+': + translate_cpp_exception(code, self.pos, '%s%s;' % (lhs, rhs), + self.result() if self.type.is_pyobject else None, + func_type.exception_value, self.nogil) + else: + if exc_checks: + goto_error = code.error_goto_if(" && ".join(exc_checks), self.pos) + else: + goto_error = "" + code.putln("%s%s; %s" % (lhs, rhs, goto_error)) + if self.type.is_pyobject and self.result(): + code.put_gotref(self.py_result()) + if self.has_optional_args: + code.funcstate.release_temp(self.opt_arg_struct) + + +class NumPyMethodCallNode(ExprNode): + # Pythran call to a NumPy function or method. + # + # function_cname string the function/method to call + # arg_tuple TupleNode the arguments as an args tuple + + subexprs = ['arg_tuple'] + is_temp = True + may_return_none = True + + def generate_evaluation_code(self, code): + code.mark_pos(self.pos) + self.allocate_temp_result(code) + + assert self.arg_tuple.mult_factor is None + args = self.arg_tuple.args + for arg in args: + arg.generate_evaluation_code(code) + + code.putln("// function evaluation code for numpy function") + code.putln("__Pyx_call_destructor(%s);" % self.result()) + code.putln("new (&%s) decltype(%s){%s{}(%s)};" % ( + self.result(), + self.result(), + self.function_cname, + ", ".join(a.pythran_result() for a in args))) + + +class PyMethodCallNode(SimpleCallNode): + # Specialised call to a (potential) PyMethodObject with non-constant argument tuple. + # Allows the self argument to be injected directly instead of repacking a tuple for it. + # + # function ExprNode the function/method object to call + # arg_tuple TupleNode the arguments for the args tuple + + subexprs = ['function', 'arg_tuple'] + is_temp = True + + def generate_evaluation_code(self, code): + code.mark_pos(self.pos) + self.allocate_temp_result(code) + + self.function.generate_evaluation_code(code) + assert self.arg_tuple.mult_factor is None + args = self.arg_tuple.args + for arg in args: + arg.generate_evaluation_code(code) + + # make sure function is in temp so that we can replace the reference below if it's a method + reuse_function_temp = self.function.is_temp + if reuse_function_temp: + function = self.function.result() + else: + function = code.funcstate.allocate_temp(py_object_type, manage_ref=True) + self.function.make_owned_reference(code) + code.put("%s = %s; " % (function, self.function.py_result())) + self.function.generate_disposal_code(code) + self.function.free_temps(code) + + self_arg = code.funcstate.allocate_temp(py_object_type, manage_ref=True) + code.putln("%s = NULL;" % self_arg) + arg_offset_cname = None + if len(args) > 1: + arg_offset_cname = code.funcstate.allocate_temp(PyrexTypes.c_int_type, manage_ref=False) + code.putln("%s = 0;" % arg_offset_cname) + + def attribute_is_likely_method(attr): + obj = attr.obj + if obj.is_name and obj.entry.is_pyglobal: + return False # more likely to be a function + return True + + if self.function.is_attribute: + likely_method = 'likely' if attribute_is_likely_method(self.function) else 'unlikely' + elif self.function.is_name and self.function.cf_state: + # not an attribute itself, but might have been assigned from one (e.g. bound method) + for assignment in self.function.cf_state: + value = assignment.rhs + if value and value.is_attribute and value.obj.type and value.obj.type.is_pyobject: + if attribute_is_likely_method(value): + likely_method = 'likely' + break + else: + likely_method = 'unlikely' + else: + likely_method = 'unlikely' + + code.putln("if (CYTHON_UNPACK_METHODS && %s(PyMethod_Check(%s))) {" % (likely_method, function)) + code.putln("%s = PyMethod_GET_SELF(%s);" % (self_arg, function)) + # the following is always true in Py3 (kept only for safety), + # but is false for unbound methods in Py2 + code.putln("if (likely(%s)) {" % self_arg) + code.putln("PyObject* function = PyMethod_GET_FUNCTION(%s);" % function) + code.put_incref(self_arg, py_object_type) + code.put_incref("function", py_object_type) + # free method object as early to possible to enable reuse from CPython's freelist + code.put_decref_set(function, "function") + if len(args) > 1: + code.putln("%s = 1;" % arg_offset_cname) + code.putln("}") + code.putln("}") + + if not args: + # fastest special case: try to avoid tuple creation + code.globalstate.use_utility_code( + UtilityCode.load_cached("PyObjectCallNoArg", "ObjectHandling.c")) + code.globalstate.use_utility_code( + UtilityCode.load_cached("PyObjectCallOneArg", "ObjectHandling.c")) + code.putln( + "%s = (%s) ? __Pyx_PyObject_CallOneArg(%s, %s) : __Pyx_PyObject_CallNoArg(%s);" % ( + self.result(), self_arg, + function, self_arg, + function)) + code.put_xdecref_clear(self_arg, py_object_type) + code.funcstate.release_temp(self_arg) + code.putln(code.error_goto_if_null(self.result(), self.pos)) + code.put_gotref(self.py_result()) + elif len(args) == 1: + # fastest special case: try to avoid tuple creation + code.globalstate.use_utility_code( + UtilityCode.load_cached("PyObjectCall2Args", "ObjectHandling.c")) + code.globalstate.use_utility_code( + UtilityCode.load_cached("PyObjectCallOneArg", "ObjectHandling.c")) + arg = args[0] + code.putln( + "%s = (%s) ? __Pyx_PyObject_Call2Args(%s, %s, %s) : __Pyx_PyObject_CallOneArg(%s, %s);" % ( + self.result(), self_arg, + function, self_arg, arg.py_result(), + function, arg.py_result())) + code.put_xdecref_clear(self_arg, py_object_type) + code.funcstate.release_temp(self_arg) + arg.generate_disposal_code(code) + arg.free_temps(code) + code.putln(code.error_goto_if_null(self.result(), self.pos)) + code.put_gotref(self.py_result()) + else: + code.globalstate.use_utility_code( + UtilityCode.load_cached("PyFunctionFastCall", "ObjectHandling.c")) + code.globalstate.use_utility_code( + UtilityCode.load_cached("PyCFunctionFastCall", "ObjectHandling.c")) + for test_func, call_prefix in [('PyFunction_Check', 'Py'), ('__Pyx_PyFastCFunction_Check', 'PyC')]: + code.putln("#if CYTHON_FAST_%sCALL" % call_prefix.upper()) + code.putln("if (%s(%s)) {" % (test_func, function)) + code.putln("PyObject *%s[%d] = {%s, %s};" % ( + Naming.quick_temp_cname, + len(args)+1, + self_arg, + ', '.join(arg.py_result() for arg in args))) + code.putln("%s = __Pyx_%sFunction_FastCall(%s, %s+1-%s, %d+%s); %s" % ( + self.result(), + call_prefix, + function, + Naming.quick_temp_cname, + arg_offset_cname, + len(args), + arg_offset_cname, + code.error_goto_if_null(self.result(), self.pos))) + code.put_xdecref_clear(self_arg, py_object_type) + code.put_gotref(self.py_result()) + for arg in args: + arg.generate_disposal_code(code) + code.putln("} else") + code.putln("#endif") + + code.putln("{") + args_tuple = code.funcstate.allocate_temp(py_object_type, manage_ref=True) + code.putln("%s = PyTuple_New(%d+%s); %s" % ( + args_tuple, len(args), arg_offset_cname, + code.error_goto_if_null(args_tuple, self.pos))) + code.put_gotref(args_tuple) + + if len(args) > 1: + code.putln("if (%s) {" % self_arg) + code.putln("__Pyx_GIVEREF(%s); PyTuple_SET_ITEM(%s, 0, %s); %s = NULL;" % ( + self_arg, args_tuple, self_arg, self_arg)) # stealing owned ref in this case + code.funcstate.release_temp(self_arg) + if len(args) > 1: + code.putln("}") + + for i, arg in enumerate(args): + arg.make_owned_reference(code) + code.put_giveref(arg.py_result()) + code.putln("PyTuple_SET_ITEM(%s, %d+%s, %s);" % ( + args_tuple, i, arg_offset_cname, arg.py_result())) + if len(args) > 1: + code.funcstate.release_temp(arg_offset_cname) + + for arg in args: + arg.generate_post_assignment_code(code) + arg.free_temps(code) + + code.globalstate.use_utility_code( + UtilityCode.load_cached("PyObjectCall", "ObjectHandling.c")) + code.putln( + "%s = __Pyx_PyObject_Call(%s, %s, NULL); %s" % ( + self.result(), + function, args_tuple, + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + code.put_decref_clear(args_tuple, py_object_type) + code.funcstate.release_temp(args_tuple) + + if len(args) == 1: + code.putln("}") + code.putln("}") # !CYTHON_FAST_PYCALL + + if reuse_function_temp: + self.function.generate_disposal_code(code) + self.function.free_temps(code) + else: + code.put_decref_clear(function, py_object_type) + code.funcstate.release_temp(function) + + +class InlinedDefNodeCallNode(CallNode): + # Inline call to defnode + # + # function PyCFunctionNode + # function_name NameNode + # args [ExprNode] + + subexprs = ['args', 'function_name'] + is_temp = 1 + type = py_object_type + function = None + function_name = None + + def can_be_inlined(self): + func_type= self.function.def_node + if func_type.star_arg or func_type.starstar_arg: + return False + if len(func_type.args) != len(self.args): + return False + if func_type.num_kwonly_args: + return False # actually wrong number of arguments + return True + + def analyse_types(self, env): + self.function_name = self.function_name.analyse_types(env) + + self.args = [ arg.analyse_types(env) for arg in self.args ] + func_type = self.function.def_node + actual_nargs = len(self.args) + + # Coerce arguments + some_args_in_temps = False + for i in range(actual_nargs): + formal_type = func_type.args[i].type + arg = self.args[i].coerce_to(formal_type, env) + if arg.is_temp: + if i > 0: + # first argument in temp doesn't impact subsequent arguments + some_args_in_temps = True + elif arg.type.is_pyobject and not env.nogil: + if arg.nonlocally_immutable(): + # plain local variables are ok + pass + else: + # we do not safely own the argument's reference, + # but we must make sure it cannot be collected + # before we return from the function, so we create + # an owned temp reference to it + if i > 0: # first argument doesn't matter + some_args_in_temps = True + arg = arg.coerce_to_temp(env) + self.args[i] = arg + + if some_args_in_temps: + # if some args are temps and others are not, they may get + # constructed in the wrong order (temps first) => make + # sure they are either all temps or all not temps (except + # for the last argument, which is evaluated last in any + # case) + for i in range(actual_nargs-1): + arg = self.args[i] + if arg.nonlocally_immutable(): + # locals, C functions, unassignable types are safe. + pass + elif arg.type.is_cpp_class: + # Assignment has side effects, avoid. + pass + elif env.nogil and arg.type.is_pyobject: + # can't copy a Python reference into a temp in nogil + # env (this is safe: a construction would fail in + # nogil anyway) + pass + else: + #self.args[i] = arg.coerce_to_temp(env) + # instead: issue a warning + if i > 0: + warning(arg.pos, "Argument evaluation order in C function call is undefined and may not be as expected", 0) + break + return self + + def generate_result_code(self, code): + arg_code = [self.function_name.py_result()] + func_type = self.function.def_node + for arg, proto_arg in zip(self.args, func_type.args): + if arg.type.is_pyobject: + arg_code.append(arg.result_as(proto_arg.type)) + else: + arg_code.append(arg.result()) + arg_code = ', '.join(arg_code) + code.putln( + "%s = %s(%s); %s" % ( + self.result(), + self.function.def_node.entry.pyfunc_cname, + arg_code, + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + +class PythonCapiFunctionNode(ExprNode): + subexprs = [] + + def __init__(self, pos, py_name, cname, func_type, utility_code = None): + ExprNode.__init__(self, pos, name=py_name, cname=cname, + type=func_type, utility_code=utility_code) + + def analyse_types(self, env): + return self + + def generate_result_code(self, code): + if self.utility_code: + code.globalstate.use_utility_code(self.utility_code) + + def calculate_result_code(self): + return self.cname + + +class PythonCapiCallNode(SimpleCallNode): + # Python C-API Function call (only created in transforms) + + # By default, we assume that the call never returns None, as this + # is true for most C-API functions in CPython. If this does not + # apply to a call, set the following to True (or None to inherit + # the default behaviour). + may_return_none = False + + def __init__(self, pos, function_name, func_type, + utility_code = None, py_name=None, **kwargs): + self.type = func_type.return_type + self.result_ctype = self.type + self.function = PythonCapiFunctionNode( + pos, py_name, function_name, func_type, + utility_code = utility_code) + # call this last so that we can override the constructed + # attributes above with explicit keyword arguments if required + SimpleCallNode.__init__(self, pos, **kwargs) + + +class CachedBuiltinMethodCallNode(CallNode): + # Python call to a method of a known Python builtin (only created in transforms) + + subexprs = ['obj', 'args'] + is_temp = True + + def __init__(self, call_node, obj, method_name, args): + super(CachedBuiltinMethodCallNode, self).__init__( + call_node.pos, + obj=obj, method_name=method_name, args=args, + may_return_none=call_node.may_return_none, + type=call_node.type) + + def may_be_none(self): + if self.may_return_none is not None: + return self.may_return_none + return ExprNode.may_be_none(self) + + def generate_result_code(self, code): + type_cname = self.obj.type.cname + obj_cname = self.obj.py_result() + args = [arg.py_result() for arg in self.args] + call_code = code.globalstate.cached_unbound_method_call_code( + obj_cname, type_cname, self.method_name, args) + code.putln("%s = %s; %s" % ( + self.result(), call_code, + code.error_goto_if_null(self.result(), self.pos) + )) + code.put_gotref(self.result()) + + +class GeneralCallNode(CallNode): + # General Python function call, including keyword, + # * and ** arguments. + # + # function ExprNode + # positional_args ExprNode Tuple of positional arguments + # keyword_args ExprNode or None Dict of keyword arguments + + type = py_object_type + + subexprs = ['function', 'positional_args', 'keyword_args'] + + nogil_check = Node.gil_error + + def compile_time_value(self, denv): + function = self.function.compile_time_value(denv) + positional_args = self.positional_args.compile_time_value(denv) + keyword_args = self.keyword_args.compile_time_value(denv) + try: + return function(*positional_args, **keyword_args) + except Exception as e: + self.compile_time_value_error(e) + + def explicit_args_kwds(self): + if (self.keyword_args and not self.keyword_args.is_dict_literal or + not self.positional_args.is_sequence_constructor): + raise CompileError(self.pos, + 'Compile-time keyword arguments must be explicit.') + return self.positional_args.args, self.keyword_args + + def analyse_types(self, env): + if self.analyse_as_type_constructor(env): + return self + self.function = self.function.analyse_types(env) + if not self.function.type.is_pyobject: + if self.function.type.is_error: + self.type = error_type + return self + if hasattr(self.function, 'entry'): + node = self.map_to_simple_call_node() + if node is not None and node is not self: + return node.analyse_types(env) + elif self.function.entry.as_variable: + self.function = self.function.coerce_to_pyobject(env) + elif node is self: + error(self.pos, + "Non-trivial keyword arguments and starred " + "arguments not allowed in cdef functions.") + else: + # error was already reported + pass + else: + self.function = self.function.coerce_to_pyobject(env) + if self.keyword_args: + self.keyword_args = self.keyword_args.analyse_types(env) + self.positional_args = self.positional_args.analyse_types(env) + self.positional_args = \ + self.positional_args.coerce_to_pyobject(env) + self.set_py_result_type(self.function) + self.is_temp = 1 + return self + + def map_to_simple_call_node(self): + """ + Tries to map keyword arguments to declared positional arguments. + Returns self to try a Python call, None to report an error + or a SimpleCallNode if the mapping succeeds. + """ + if not isinstance(self.positional_args, TupleNode): + # has starred argument + return self + if not self.keyword_args.is_dict_literal: + # keywords come from arbitrary expression => nothing to do here + return self + function = self.function + entry = getattr(function, 'entry', None) + if not entry: + return self + function_type = entry.type + if function_type.is_ptr: + function_type = function_type.base_type + if not function_type.is_cfunction: + return self + + pos_args = self.positional_args.args + kwargs = self.keyword_args + declared_args = function_type.args + if entry.is_cmethod: + declared_args = declared_args[1:] # skip 'self' + + if len(pos_args) > len(declared_args): + error(self.pos, "function call got too many positional arguments, " + "expected %d, got %s" % (len(declared_args), + len(pos_args))) + return None + + matched_args = set([ arg.name for arg in declared_args[:len(pos_args)] + if arg.name ]) + unmatched_args = declared_args[len(pos_args):] + matched_kwargs_count = 0 + args = list(pos_args) + + # check for duplicate keywords + seen = set(matched_args) + has_errors = False + for arg in kwargs.key_value_pairs: + name = arg.key.value + if name in seen: + error(arg.pos, "argument '%s' passed twice" % name) + has_errors = True + # continue to report more errors if there are any + seen.add(name) + + # match keywords that are passed in order + for decl_arg, arg in zip(unmatched_args, kwargs.key_value_pairs): + name = arg.key.value + if decl_arg.name == name: + matched_args.add(name) + matched_kwargs_count += 1 + args.append(arg.value) + else: + break + + # match keyword arguments that are passed out-of-order, but keep + # the evaluation of non-simple arguments in order by moving them + # into temps + from .UtilNodes import EvalWithTempExprNode, LetRefNode + temps = [] + if len(kwargs.key_value_pairs) > matched_kwargs_count: + unmatched_args = declared_args[len(args):] + keywords = dict([ (arg.key.value, (i+len(pos_args), arg)) + for i, arg in enumerate(kwargs.key_value_pairs) ]) + first_missing_keyword = None + for decl_arg in unmatched_args: + name = decl_arg.name + if name not in keywords: + # missing keyword argument => either done or error + if not first_missing_keyword: + first_missing_keyword = name + continue + elif first_missing_keyword: + if entry.as_variable: + # we might be able to convert the function to a Python + # object, which then allows full calling semantics + # with default values in gaps - currently, we only + # support optional arguments at the end + return self + # wasn't the last keyword => gaps are not supported + error(self.pos, "C function call is missing " + "argument '%s'" % first_missing_keyword) + return None + pos, arg = keywords[name] + matched_args.add(name) + matched_kwargs_count += 1 + if arg.value.is_simple(): + args.append(arg.value) + else: + temp = LetRefNode(arg.value) + assert temp.is_simple() + args.append(temp) + temps.append((pos, temp)) + + if temps: + # may have to move preceding non-simple args into temps + final_args = [] + new_temps = [] + first_temp_arg = temps[0][-1] + for arg_value in args: + if arg_value is first_temp_arg: + break # done + if arg_value.is_simple(): + final_args.append(arg_value) + else: + temp = LetRefNode(arg_value) + new_temps.append(temp) + final_args.append(temp) + if new_temps: + args = final_args + temps = new_temps + [ arg for i,arg in sorted(temps) ] + + # check for unexpected keywords + for arg in kwargs.key_value_pairs: + name = arg.key.value + if name not in matched_args: + has_errors = True + error(arg.pos, + "C function got unexpected keyword argument '%s'" % + name) + + if has_errors: + # error was reported already + return None + + # all keywords mapped to positional arguments + # if we are missing arguments, SimpleCallNode will figure it out + node = SimpleCallNode(self.pos, function=function, args=args) + for temp in temps[::-1]: + node = EvalWithTempExprNode(temp, node) + return node + + def generate_result_code(self, code): + if self.type.is_error: return + if self.keyword_args: + kwargs = self.keyword_args.py_result() + else: + kwargs = 'NULL' + code.globalstate.use_utility_code(UtilityCode.load_cached( + "PyObjectCall", "ObjectHandling.c")) + code.putln( + "%s = __Pyx_PyObject_Call(%s, %s, %s); %s" % ( + self.result(), + self.function.py_result(), + self.positional_args.py_result(), + kwargs, + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + +class AsTupleNode(ExprNode): + # Convert argument to tuple. Used for normalising + # the * argument of a function call. + # + # arg ExprNode + + subexprs = ['arg'] + is_temp = 1 + + def calculate_constant_result(self): + self.constant_result = tuple(self.arg.constant_result) + + def compile_time_value(self, denv): + arg = self.arg.compile_time_value(denv) + try: + return tuple(arg) + except Exception as e: + self.compile_time_value_error(e) + + def analyse_types(self, env): + self.arg = self.arg.analyse_types(env).coerce_to_pyobject(env) + if self.arg.type is tuple_type: + return self.arg.as_none_safe_node("'NoneType' object is not iterable") + self.type = tuple_type + return self + + def may_be_none(self): + return False + + nogil_check = Node.gil_error + gil_message = "Constructing Python tuple" + + def generate_result_code(self, code): + cfunc = "__Pyx_PySequence_Tuple" if self.arg.type in (py_object_type, tuple_type) else "PySequence_Tuple" + code.putln( + "%s = %s(%s); %s" % ( + self.result(), + cfunc, self.arg.py_result(), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + +class MergedDictNode(ExprNode): + # Helper class for keyword arguments and other merged dicts. + # + # keyword_args [DictNode or other ExprNode] + + subexprs = ['keyword_args'] + is_temp = 1 + type = dict_type + reject_duplicates = True + + def calculate_constant_result(self): + result = {} + reject_duplicates = self.reject_duplicates + for item in self.keyword_args: + if item.is_dict_literal: + # process items in order + items = ((key.constant_result, value.constant_result) + for key, value in item.key_value_pairs) + else: + items = item.constant_result.iteritems() + + for key, value in items: + if reject_duplicates and key in result: + raise ValueError("duplicate keyword argument found: %s" % key) + result[key] = value + + self.constant_result = result + + def compile_time_value(self, denv): + result = {} + reject_duplicates = self.reject_duplicates + for item in self.keyword_args: + if item.is_dict_literal: + # process items in order + items = [(key.compile_time_value(denv), value.compile_time_value(denv)) + for key, value in item.key_value_pairs] + else: + items = item.compile_time_value(denv).iteritems() + + try: + for key, value in items: + if reject_duplicates and key in result: + raise ValueError("duplicate keyword argument found: %s" % key) + result[key] = value + except Exception as e: + self.compile_time_value_error(e) + return result + + def type_dependencies(self, env): + return () + + def infer_type(self, env): + return dict_type + + def analyse_types(self, env): + self.keyword_args = [ + arg.analyse_types(env).coerce_to_pyobject(env).as_none_safe_node( + # FIXME: CPython's error message starts with the runtime function name + 'argument after ** must be a mapping, not NoneType') + for arg in self.keyword_args + ] + + return self + + def may_be_none(self): + return False + + gil_message = "Constructing Python dict" + + def generate_evaluation_code(self, code): + code.mark_pos(self.pos) + self.allocate_temp_result(code) + + args = iter(self.keyword_args) + item = next(args) + item.generate_evaluation_code(code) + if item.type is not dict_type: + # CPython supports calling functions with non-dicts, so do we + code.putln('if (likely(PyDict_CheckExact(%s))) {' % + item.py_result()) + + if item.is_dict_literal: + item.make_owned_reference(code) + code.putln("%s = %s;" % (self.result(), item.py_result())) + item.generate_post_assignment_code(code) + else: + code.putln("%s = PyDict_Copy(%s); %s" % ( + self.result(), + item.py_result(), + code.error_goto_if_null(self.result(), item.pos))) + code.put_gotref(self.result()) + item.generate_disposal_code(code) + + if item.type is not dict_type: + code.putln('} else {') + code.putln("%s = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, %s, NULL); %s" % ( + self.result(), + item.py_result(), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + item.generate_disposal_code(code) + code.putln('}') + item.free_temps(code) + + helpers = set() + for item in args: + if item.is_dict_literal: + # inline update instead of creating an intermediate dict + for arg in item.key_value_pairs: + arg.generate_evaluation_code(code) + if self.reject_duplicates: + code.putln("if (unlikely(PyDict_Contains(%s, %s))) {" % ( + self.result(), + arg.key.py_result())) + helpers.add("RaiseDoubleKeywords") + # FIXME: find out function name at runtime! + code.putln('__Pyx_RaiseDoubleKeywordsError("function", %s); %s' % ( + arg.key.py_result(), + code.error_goto(self.pos))) + code.putln("}") + code.put_error_if_neg(arg.key.pos, "PyDict_SetItem(%s, %s, %s)" % ( + self.result(), + arg.key.py_result(), + arg.value.py_result())) + arg.generate_disposal_code(code) + arg.free_temps(code) + else: + item.generate_evaluation_code(code) + if self.reject_duplicates: + # merge mapping into kwdict one by one as we need to check for duplicates + helpers.add("MergeKeywords") + code.put_error_if_neg(item.pos, "__Pyx_MergeKeywords(%s, %s)" % ( + self.result(), item.py_result())) + else: + # simple case, just add all entries + helpers.add("RaiseMappingExpected") + code.putln("if (unlikely(PyDict_Update(%s, %s) < 0)) {" % ( + self.result(), item.py_result())) + code.putln("if (PyErr_ExceptionMatches(PyExc_AttributeError)) " + "__Pyx_RaiseMappingExpectedError(%s);" % item.py_result()) + code.putln(code.error_goto(item.pos)) + code.putln("}") + item.generate_disposal_code(code) + item.free_temps(code) + + for helper in sorted(helpers): + code.globalstate.use_utility_code(UtilityCode.load_cached(helper, "FunctionArguments.c")) + + def annotate(self, code): + for item in self.keyword_args: + item.annotate(code) + + +class AttributeNode(ExprNode): + # obj.attribute + # + # obj ExprNode + # attribute string + # needs_none_check boolean Used if obj is an extension type. + # If set to True, it is known that the type is not None. + # + # Used internally: + # + # is_py_attr boolean Is a Python getattr operation + # member string C name of struct member + # is_called boolean Function call is being done on result + # entry Entry Symbol table entry of attribute + + is_attribute = 1 + subexprs = ['obj'] + + type = PyrexTypes.error_type + entry = None + is_called = 0 + needs_none_check = True + is_memslice_transpose = False + is_special_lookup = False + is_py_attr = 0 + + def as_cython_attribute(self): + if (isinstance(self.obj, NameNode) and + self.obj.is_cython_module and not + self.attribute == u"parallel"): + return self.attribute + + cy = self.obj.as_cython_attribute() + if cy: + return "%s.%s" % (cy, self.attribute) + return None + + def coerce_to(self, dst_type, env): + # If coercing to a generic pyobject and this is a cpdef function + # we can create the corresponding attribute + if dst_type is py_object_type: + entry = self.entry + if entry and entry.is_cfunction and entry.as_variable: + # must be a cpdef function + self.is_temp = 1 + self.entry = entry.as_variable + self.analyse_as_python_attribute(env) + return self + return ExprNode.coerce_to(self, dst_type, env) + + def calculate_constant_result(self): + attr = self.attribute + if attr.startswith("__") and attr.endswith("__"): + return + self.constant_result = getattr(self.obj.constant_result, attr) + + def compile_time_value(self, denv): + attr = self.attribute + if attr.startswith("__") and attr.endswith("__"): + error(self.pos, + "Invalid attribute name '%s' in compile-time expression" % attr) + return None + obj = self.obj.compile_time_value(denv) + try: + return getattr(obj, attr) + except Exception as e: + self.compile_time_value_error(e) + + def type_dependencies(self, env): + return self.obj.type_dependencies(env) + + def infer_type(self, env): + # FIXME: this is way too redundant with analyse_types() + node = self.analyse_as_cimported_attribute_node(env, target=False) + if node is not None: + if node.entry.type and node.entry.type.is_cfunction: + # special-case - function converted to pointer + return PyrexTypes.CPtrType(node.entry.type) + else: + return node.entry.type + node = self.analyse_as_type_attribute(env) + if node is not None: + return node.entry.type + obj_type = self.obj.infer_type(env) + self.analyse_attribute(env, obj_type=obj_type) + if obj_type.is_builtin_type and self.type.is_cfunction: + # special case: C-API replacements for C methods of + # builtin types cannot be inferred as C functions as + # that would prevent their use as bound methods + return py_object_type + elif self.entry and self.entry.is_cmethod: + # special case: bound methods should not be inferred + # as their unbound method types + return py_object_type + return self.type + + def analyse_target_declaration(self, env): + pass + + def analyse_target_types(self, env): + node = self.analyse_types(env, target = 1) + if node.type.is_const: + error(self.pos, "Assignment to const attribute '%s'" % self.attribute) + if not node.is_lvalue(): + error(self.pos, "Assignment to non-lvalue of type '%s'" % self.type) + return node + + def analyse_types(self, env, target = 0): + self.initialized_check = env.directives['initializedcheck'] + node = self.analyse_as_cimported_attribute_node(env, target) + if node is None and not target: + node = self.analyse_as_type_attribute(env) + if node is None: + node = self.analyse_as_ordinary_attribute_node(env, target) + assert node is not None + if node.entry: + node.entry.used = True + if node.is_attribute: + node.wrap_obj_in_nonecheck(env) + return node + + def analyse_as_cimported_attribute_node(self, env, target): + # Try to interpret this as a reference to an imported + # C const, type, var or function. If successful, mutates + # this node into a NameNode and returns 1, otherwise + # returns 0. + module_scope = self.obj.analyse_as_module(env) + if module_scope: + entry = module_scope.lookup_here(self.attribute) + if entry and ( + entry.is_cglobal or entry.is_cfunction + or entry.is_type or entry.is_const): + return self.as_name_node(env, entry, target) + if self.is_cimported_module_without_shadow(env): + error(self.pos, "cimported module has no attribute '%s'" % self.attribute) + return self + return None + + def analyse_as_type_attribute(self, env): + # Try to interpret this as a reference to an unbound + # C method of an extension type or builtin type. If successful, + # creates a corresponding NameNode and returns it, otherwise + # returns None. + if self.obj.is_string_literal: + return + type = self.obj.analyse_as_type(env) + if type: + if type.is_extension_type or type.is_builtin_type or type.is_cpp_class: + entry = type.scope.lookup_here(self.attribute) + if entry and (entry.is_cmethod or type.is_cpp_class and entry.type.is_cfunction): + if type.is_builtin_type: + if not self.is_called: + # must handle this as Python object + return None + ubcm_entry = entry + else: + # Create a temporary entry describing the C method + # as an ordinary function. + if entry.func_cname and not hasattr(entry.type, 'op_arg_struct'): + cname = entry.func_cname + if entry.type.is_static_method or ( + env.parent_scope and env.parent_scope.is_cpp_class_scope): + ctype = entry.type + elif type.is_cpp_class: + error(self.pos, "%s not a static member of %s" % (entry.name, type)) + ctype = PyrexTypes.error_type + else: + # Fix self type. + ctype = copy.copy(entry.type) + ctype.args = ctype.args[:] + ctype.args[0] = PyrexTypes.CFuncTypeArg('self', type, 'self', None) + else: + cname = "%s->%s" % (type.vtabptr_cname, entry.cname) + ctype = entry.type + ubcm_entry = Symtab.Entry(entry.name, cname, ctype) + ubcm_entry.is_cfunction = 1 + ubcm_entry.func_cname = entry.func_cname + ubcm_entry.is_unbound_cmethod = 1 + ubcm_entry.scope = entry.scope + return self.as_name_node(env, ubcm_entry, target=False) + elif type.is_enum: + if self.attribute in type.values: + for entry in type.entry.enum_values: + if entry.name == self.attribute: + return self.as_name_node(env, entry, target=False) + else: + error(self.pos, "%s not a known value of %s" % (self.attribute, type)) + else: + error(self.pos, "%s not a known value of %s" % (self.attribute, type)) + return None + + def analyse_as_type(self, env): + module_scope = self.obj.analyse_as_module(env) + if module_scope: + return module_scope.lookup_type(self.attribute) + if not self.obj.is_string_literal: + base_type = self.obj.analyse_as_type(env) + if base_type and hasattr(base_type, 'scope') and base_type.scope is not None: + return base_type.scope.lookup_type(self.attribute) + return None + + def analyse_as_extension_type(self, env): + # Try to interpret this as a reference to an extension type + # in a cimported module. Returns the extension type, or None. + module_scope = self.obj.analyse_as_module(env) + if module_scope: + entry = module_scope.lookup_here(self.attribute) + if entry and entry.is_type: + if entry.type.is_extension_type or entry.type.is_builtin_type: + return entry.type + return None + + def analyse_as_module(self, env): + # Try to interpret this as a reference to a cimported module + # in another cimported module. Returns the module scope, or None. + module_scope = self.obj.analyse_as_module(env) + if module_scope: + entry = module_scope.lookup_here(self.attribute) + if entry and entry.as_module: + return entry.as_module + return None + + def as_name_node(self, env, entry, target): + # Create a corresponding NameNode from this node and complete the + # analyse_types phase. + node = NameNode.from_node(self, name=self.attribute, entry=entry) + if target: + node = node.analyse_target_types(env) + else: + node = node.analyse_rvalue_entry(env) + node.entry.used = 1 + return node + + def analyse_as_ordinary_attribute_node(self, env, target): + self.obj = self.obj.analyse_types(env) + self.analyse_attribute(env) + if self.entry and self.entry.is_cmethod and not self.is_called: +# error(self.pos, "C method can only be called") + pass + ## Reference to C array turns into pointer to first element. + #while self.type.is_array: + # self.type = self.type.element_ptr_type() + if self.is_py_attr: + if not target: + self.is_temp = 1 + self.result_ctype = py_object_type + elif target and self.obj.type.is_builtin_type: + error(self.pos, "Assignment to an immutable object field") + #elif self.type.is_memoryviewslice and not target: + # self.is_temp = True + return self + + def analyse_attribute(self, env, obj_type = None): + # Look up attribute and set self.type and self.member. + immutable_obj = obj_type is not None # used during type inference + self.is_py_attr = 0 + self.member = self.attribute + if obj_type is None: + if self.obj.type.is_string or self.obj.type.is_pyunicode_ptr: + self.obj = self.obj.coerce_to_pyobject(env) + obj_type = self.obj.type + else: + if obj_type.is_string or obj_type.is_pyunicode_ptr: + obj_type = py_object_type + if obj_type.is_ptr or obj_type.is_array: + obj_type = obj_type.base_type + self.op = "->" + elif obj_type.is_extension_type or obj_type.is_builtin_type: + self.op = "->" + elif obj_type.is_reference and obj_type.is_fake_reference: + self.op = "->" + else: + self.op = "." + if obj_type.has_attributes: + if obj_type.attributes_known(): + entry = obj_type.scope.lookup_here(self.attribute) + if obj_type.is_memoryviewslice and not entry: + if self.attribute == 'T': + self.is_memslice_transpose = True + self.is_temp = True + self.use_managed_ref = True + self.type = self.obj.type.transpose(self.pos) + return + else: + obj_type.declare_attribute(self.attribute, env, self.pos) + entry = obj_type.scope.lookup_here(self.attribute) + if entry and entry.is_member: + entry = None + else: + error(self.pos, + "Cannot select attribute of incomplete type '%s'" + % obj_type) + self.type = PyrexTypes.error_type + return + self.entry = entry + if entry: + if obj_type.is_extension_type and entry.name == "__weakref__": + error(self.pos, "Illegal use of special attribute __weakref__") + + # def methods need the normal attribute lookup + # because they do not have struct entries + # fused function go through assignment synthesis + # (foo = pycfunction(foo_func_obj)) and need to go through + # regular Python lookup as well + if (entry.is_variable and not entry.fused_cfunction) or entry.is_cmethod: + self.type = entry.type + self.member = entry.cname + return + else: + # If it's not a variable or C method, it must be a Python + # method of an extension type, so we treat it like a Python + # attribute. + pass + # If we get here, the base object is not a struct/union/extension + # type, or it is an extension type and the attribute is either not + # declared or is declared as a Python method. Treat it as a Python + # attribute reference. + self.analyse_as_python_attribute(env, obj_type, immutable_obj) + + def analyse_as_python_attribute(self, env, obj_type=None, immutable_obj=False): + if obj_type is None: + obj_type = self.obj.type + # mangle private '__*' Python attributes used inside of a class + self.attribute = env.mangle_class_private_name(self.attribute) + self.member = self.attribute + self.type = py_object_type + self.is_py_attr = 1 + + if not obj_type.is_pyobject and not obj_type.is_error: + # Expose python methods for immutable objects. + if (obj_type.is_string or obj_type.is_cpp_string + or obj_type.is_buffer or obj_type.is_memoryviewslice + or obj_type.is_numeric + or (obj_type.is_ctuple and obj_type.can_coerce_to_pyobject(env)) + or (obj_type.is_struct and obj_type.can_coerce_to_pyobject(env))): + if not immutable_obj: + self.obj = self.obj.coerce_to_pyobject(env) + elif (obj_type.is_cfunction and (self.obj.is_name or self.obj.is_attribute) + and self.obj.entry.as_variable + and self.obj.entry.as_variable.type.is_pyobject): + # might be an optimised builtin function => unpack it + if not immutable_obj: + self.obj = self.obj.coerce_to_pyobject(env) + else: + error(self.pos, + "Object of type '%s' has no attribute '%s'" % + (obj_type, self.attribute)) + + def wrap_obj_in_nonecheck(self, env): + if not env.directives['nonecheck']: + return + + msg = None + format_args = () + if (self.obj.type.is_extension_type and self.needs_none_check and not + self.is_py_attr): + msg = "'NoneType' object has no attribute '%{0}s'".format('.30' if len(self.attribute) <= 30 else '') + format_args = (self.attribute,) + elif self.obj.type.is_memoryviewslice: + if self.is_memslice_transpose: + msg = "Cannot transpose None memoryview slice" + else: + entry = self.obj.type.scope.lookup_here(self.attribute) + if entry: + # copy/is_c_contig/shape/strides etc + msg = "Cannot access '%s' attribute of None memoryview slice" + format_args = (entry.name,) + + if msg: + self.obj = self.obj.as_none_safe_node(msg, 'PyExc_AttributeError', + format_args=format_args) + + def nogil_check(self, env): + if self.is_py_attr: + self.gil_error() + + gil_message = "Accessing Python attribute" + + def is_cimported_module_without_shadow(self, env): + return self.obj.is_cimported_module_without_shadow(env) + + def is_simple(self): + if self.obj: + return self.result_in_temp() or self.obj.is_simple() + else: + return NameNode.is_simple(self) + + def is_lvalue(self): + if self.obj: + return True + else: + return NameNode.is_lvalue(self) + + def is_ephemeral(self): + if self.obj: + return self.obj.is_ephemeral() + else: + return NameNode.is_ephemeral(self) + + def calculate_result_code(self): + #print "AttributeNode.calculate_result_code:", self.member ### + #print "...obj node =", self.obj, "code", self.obj.result() ### + #print "...obj type", self.obj.type, "ctype", self.obj.ctype() ### + obj = self.obj + obj_code = obj.result_as(obj.type) + #print "...obj_code =", obj_code ### + if self.entry and self.entry.is_cmethod: + if obj.type.is_extension_type and not self.entry.is_builtin_cmethod: + if self.entry.final_func_cname: + return self.entry.final_func_cname + + if self.type.from_fused: + # If the attribute was specialized through indexing, make + # sure to get the right fused name, as our entry was + # replaced by our parent index node + # (AnalyseExpressionsTransform) + self.member = self.entry.cname + + return "((struct %s *)%s%s%s)->%s" % ( + obj.type.vtabstruct_cname, obj_code, self.op, + obj.type.vtabslot_cname, self.member) + elif self.result_is_used: + return self.member + # Generating no code at all for unused access to optimised builtin + # methods fixes the problem that some optimisations only exist as + # macros, i.e. there is no function pointer to them, so we would + # generate invalid C code here. + return + elif obj.type.is_complex: + return "__Pyx_C%s(%s)" % (self.member.upper(), obj_code) + else: + if obj.type.is_builtin_type and self.entry and self.entry.is_variable: + # accessing a field of a builtin type, need to cast better than result_as() does + obj_code = obj.type.cast_code(obj.result(), to_object_struct = True) + return "%s%s%s" % (obj_code, self.op, self.member) + + def generate_result_code(self, code): + if self.is_py_attr: + if self.is_special_lookup: + code.globalstate.use_utility_code( + UtilityCode.load_cached("PyObjectLookupSpecial", "ObjectHandling.c")) + lookup_func_name = '__Pyx_PyObject_LookupSpecial' + else: + code.globalstate.use_utility_code( + UtilityCode.load_cached("PyObjectGetAttrStr", "ObjectHandling.c")) + lookup_func_name = '__Pyx_PyObject_GetAttrStr' + code.putln( + '%s = %s(%s, %s); %s' % ( + self.result(), + lookup_func_name, + self.obj.py_result(), + code.intern_identifier(self.attribute), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + elif self.type.is_memoryviewslice: + if self.is_memslice_transpose: + # transpose the slice + for access, packing in self.type.axes: + if access == 'ptr': + error(self.pos, "Transposing not supported for slices " + "with indirect dimensions") + return + + code.putln("%s = %s;" % (self.result(), self.obj.result())) + code.put_incref_memoryviewslice(self.result(), have_gil=True) + + T = "__pyx_memslice_transpose(&%s) == 0" + code.putln(code.error_goto_if(T % self.result(), self.pos)) + elif self.initialized_check: + code.putln( + 'if (unlikely(!%s.memview)) {' + 'PyErr_SetString(PyExc_AttributeError,' + '"Memoryview is not initialized");' + '%s' + '}' % (self.result(), code.error_goto(self.pos))) + else: + # result_code contains what is needed, but we may need to insert + # a check and raise an exception + if self.obj.type and self.obj.type.is_extension_type: + pass + elif self.entry and self.entry.is_cmethod: + # C method implemented as function call with utility code + code.globalstate.use_entry_utility_code(self.entry) + + def generate_disposal_code(self, code): + if self.is_temp and self.type.is_memoryviewslice and self.is_memslice_transpose: + # mirror condition for putting the memview incref here: + code.put_xdecref_memoryviewslice( + self.result(), have_gil=True) + code.putln("%s.memview = NULL;" % self.result()) + code.putln("%s.data = NULL;" % self.result()) + else: + ExprNode.generate_disposal_code(self, code) + + def generate_assignment_code(self, rhs, code, overloaded_assignment=False, + exception_check=None, exception_value=None): + self.obj.generate_evaluation_code(code) + if self.is_py_attr: + code.globalstate.use_utility_code( + UtilityCode.load_cached("PyObjectSetAttrStr", "ObjectHandling.c")) + code.put_error_if_neg(self.pos, + '__Pyx_PyObject_SetAttrStr(%s, %s, %s)' % ( + self.obj.py_result(), + code.intern_identifier(self.attribute), + rhs.py_result())) + rhs.generate_disposal_code(code) + rhs.free_temps(code) + elif self.obj.type.is_complex: + code.putln("__Pyx_SET_C%s(%s, %s);" % ( + self.member.upper(), + self.obj.result_as(self.obj.type), + rhs.result_as(self.ctype()))) + rhs.generate_disposal_code(code) + rhs.free_temps(code) + else: + select_code = self.result() + if self.type.is_pyobject and self.use_managed_ref: + rhs.make_owned_reference(code) + code.put_giveref(rhs.py_result()) + code.put_gotref(select_code) + code.put_decref(select_code, self.ctype()) + elif self.type.is_memoryviewslice: + from . import MemoryView + MemoryView.put_assign_to_memviewslice( + select_code, rhs, rhs.result(), self.type, code) + + if not self.type.is_memoryviewslice: + code.putln( + "%s = %s;" % ( + select_code, + rhs.result_as(self.ctype()))) + #rhs.result())) + rhs.generate_post_assignment_code(code) + rhs.free_temps(code) + self.obj.generate_disposal_code(code) + self.obj.free_temps(code) + + def generate_deletion_code(self, code, ignore_nonexisting=False): + self.obj.generate_evaluation_code(code) + if self.is_py_attr or (self.entry.scope.is_property_scope + and u'__del__' in self.entry.scope.entries): + code.globalstate.use_utility_code( + UtilityCode.load_cached("PyObjectSetAttrStr", "ObjectHandling.c")) + code.put_error_if_neg(self.pos, + '__Pyx_PyObject_DelAttrStr(%s, %s)' % ( + self.obj.py_result(), + code.intern_identifier(self.attribute))) + else: + error(self.pos, "Cannot delete C attribute of extension type") + self.obj.generate_disposal_code(code) + self.obj.free_temps(code) + + def annotate(self, code): + if self.is_py_attr: + style, text = 'py_attr', 'python attribute (%s)' + else: + style, text = 'c_attr', 'c attribute (%s)' + code.annotate(self.pos, AnnotationItem(style, text % self.type, size=len(self.attribute))) + + +#------------------------------------------------------------------- +# +# Constructor nodes +# +#------------------------------------------------------------------- + +class StarredUnpackingNode(ExprNode): + # A starred expression like "*a" + # + # This is only allowed in sequence assignment or construction such as + # + # a, *b = (1,2,3,4) => a = 1 ; b = [2,3,4] + # + # and will be special cased during type analysis (or generate an error + # if it's found at unexpected places). + # + # target ExprNode + + subexprs = ['target'] + is_starred = 1 + type = py_object_type + is_temp = 1 + starred_expr_allowed_here = False + + def __init__(self, pos, target): + ExprNode.__init__(self, pos, target=target) + + def analyse_declarations(self, env): + if not self.starred_expr_allowed_here: + error(self.pos, "starred expression is not allowed here") + self.target.analyse_declarations(env) + + def infer_type(self, env): + return self.target.infer_type(env) + + def analyse_types(self, env): + if not self.starred_expr_allowed_here: + error(self.pos, "starred expression is not allowed here") + self.target = self.target.analyse_types(env) + self.type = self.target.type + return self + + def analyse_target_declaration(self, env): + self.target.analyse_target_declaration(env) + + def analyse_target_types(self, env): + self.target = self.target.analyse_target_types(env) + self.type = self.target.type + return self + + def calculate_result_code(self): + return "" + + def generate_result_code(self, code): + pass + + +class SequenceNode(ExprNode): + # Base class for list and tuple constructor nodes. + # Contains common code for performing sequence unpacking. + # + # args [ExprNode] + # unpacked_items [ExprNode] or None + # coerced_unpacked_items [ExprNode] or None + # mult_factor ExprNode the integer number of content repetitions ([1,2]*3) + + subexprs = ['args', 'mult_factor'] + + is_sequence_constructor = 1 + unpacked_items = None + mult_factor = None + slow = False # trade speed for code size (e.g. use PyTuple_Pack()) + + def compile_time_value_list(self, denv): + return [arg.compile_time_value(denv) for arg in self.args] + + def replace_starred_target_node(self): + # replace a starred node in the targets by the contained expression + self.starred_assignment = False + args = [] + for arg in self.args: + if arg.is_starred: + if self.starred_assignment: + error(arg.pos, "more than 1 starred expression in assignment") + self.starred_assignment = True + arg = arg.target + arg.is_starred = True + args.append(arg) + self.args = args + + def analyse_target_declaration(self, env): + self.replace_starred_target_node() + for arg in self.args: + arg.analyse_target_declaration(env) + + def analyse_types(self, env, skip_children=False): + for i, arg in enumerate(self.args): + if not skip_children: + arg = arg.analyse_types(env) + self.args[i] = arg.coerce_to_pyobject(env) + if self.mult_factor: + self.mult_factor = self.mult_factor.analyse_types(env) + if not self.mult_factor.type.is_int: + self.mult_factor = self.mult_factor.coerce_to_pyobject(env) + self.is_temp = 1 + # not setting self.type here, subtypes do this + return self + + def coerce_to_ctuple(self, dst_type, env): + if self.type == dst_type: + return self + assert not self.mult_factor + if len(self.args) != dst_type.size: + error(self.pos, "trying to coerce sequence to ctuple of wrong length, expected %d, got %d" % ( + dst_type.size, len(self.args))) + coerced_args = [arg.coerce_to(type, env) for arg, type in zip(self.args, dst_type.components)] + return TupleNode(self.pos, args=coerced_args, type=dst_type, is_temp=True) + + def _create_merge_node_if_necessary(self, env): + self._flatten_starred_args() + if not any(arg.is_starred for arg in self.args): + return self + # convert into MergedSequenceNode by building partial sequences + args = [] + values = [] + for arg in self.args: + if arg.is_starred: + if values: + args.append(TupleNode(values[0].pos, args=values).analyse_types(env, skip_children=True)) + values = [] + args.append(arg.target) + else: + values.append(arg) + if values: + args.append(TupleNode(values[0].pos, args=values).analyse_types(env, skip_children=True)) + node = MergedSequenceNode(self.pos, args, self.type) + if self.mult_factor: + node = binop_node( + self.pos, '*', node, self.mult_factor.coerce_to_pyobject(env), + inplace=True, type=self.type, is_temp=True) + return node + + def _flatten_starred_args(self): + args = [] + for arg in self.args: + if arg.is_starred and arg.target.is_sequence_constructor and not arg.target.mult_factor: + args.extend(arg.target.args) + else: + args.append(arg) + self.args[:] = args + + def may_be_none(self): + return False + + def analyse_target_types(self, env): + if self.mult_factor: + error(self.pos, "can't assign to multiplied sequence") + self.unpacked_items = [] + self.coerced_unpacked_items = [] + self.any_coerced_items = False + for i, arg in enumerate(self.args): + arg = self.args[i] = arg.analyse_target_types(env) + if arg.is_starred: + if not arg.type.assignable_from(list_type): + error(arg.pos, + "starred target must have Python object (list) type") + if arg.type is py_object_type: + arg.type = list_type + unpacked_item = PyTempNode(self.pos, env) + coerced_unpacked_item = unpacked_item.coerce_to(arg.type, env) + if unpacked_item is not coerced_unpacked_item: + self.any_coerced_items = True + self.unpacked_items.append(unpacked_item) + self.coerced_unpacked_items.append(coerced_unpacked_item) + self.type = py_object_type + return self + + def generate_result_code(self, code): + self.generate_operation_code(code) + + def generate_sequence_packing_code(self, code, target=None, plain=False): + if target is None: + target = self.result() + size_factor = c_mult = '' + mult_factor = None + + if self.mult_factor and not plain: + mult_factor = self.mult_factor + if mult_factor.type.is_int: + c_mult = mult_factor.result() + if (isinstance(mult_factor.constant_result, _py_int_types) and + mult_factor.constant_result > 0): + size_factor = ' * %s' % mult_factor.constant_result + elif mult_factor.type.signed: + size_factor = ' * ((%s<0) ? 0:%s)' % (c_mult, c_mult) + else: + size_factor = ' * (%s)' % (c_mult,) + + if self.type is tuple_type and (self.is_literal or self.slow) and not c_mult: + # use PyTuple_Pack() to avoid generating huge amounts of one-time code + code.putln('%s = PyTuple_Pack(%d, %s); %s' % ( + target, + len(self.args), + ', '.join(arg.py_result() for arg in self.args), + code.error_goto_if_null(target, self.pos))) + code.put_gotref(target) + elif self.type.is_ctuple: + for i, arg in enumerate(self.args): + code.putln("%s.f%s = %s;" % ( + target, i, arg.result())) + else: + # build the tuple/list step by step, potentially multiplying it as we go + if self.type is list_type: + create_func, set_item_func = 'PyList_New', 'PyList_SET_ITEM' + elif self.type is tuple_type: + create_func, set_item_func = 'PyTuple_New', 'PyTuple_SET_ITEM' + else: + raise InternalError("sequence packing for unexpected type %s" % self.type) + arg_count = len(self.args) + code.putln("%s = %s(%s%s); %s" % ( + target, create_func, arg_count, size_factor, + code.error_goto_if_null(target, self.pos))) + code.put_gotref(target) + + if c_mult: + # FIXME: can't use a temp variable here as the code may + # end up in the constant building function. Temps + # currently don't work there. + + #counter = code.funcstate.allocate_temp(mult_factor.type, manage_ref=False) + counter = Naming.quick_temp_cname + code.putln('{ Py_ssize_t %s;' % counter) + if arg_count == 1: + offset = counter + else: + offset = '%s * %s' % (counter, arg_count) + code.putln('for (%s=0; %s < %s; %s++) {' % ( + counter, counter, c_mult, counter + )) + else: + offset = '' + + for i in range(arg_count): + arg = self.args[i] + if c_mult or not arg.result_in_temp(): + code.put_incref(arg.result(), arg.ctype()) + code.put_giveref(arg.py_result()) + code.putln("%s(%s, %s, %s);" % ( + set_item_func, + target, + (offset and i) and ('%s + %s' % (offset, i)) or (offset or i), + arg.py_result())) + + if c_mult: + code.putln('}') + #code.funcstate.release_temp(counter) + code.putln('}') + + if mult_factor is not None and mult_factor.type.is_pyobject: + code.putln('{ PyObject* %s = PyNumber_InPlaceMultiply(%s, %s); %s' % ( + Naming.quick_temp_cname, target, mult_factor.py_result(), + code.error_goto_if_null(Naming.quick_temp_cname, self.pos) + )) + code.put_gotref(Naming.quick_temp_cname) + code.put_decref(target, py_object_type) + code.putln('%s = %s;' % (target, Naming.quick_temp_cname)) + code.putln('}') + + def generate_subexpr_disposal_code(self, code): + if self.mult_factor and self.mult_factor.type.is_int: + super(SequenceNode, self).generate_subexpr_disposal_code(code) + elif self.type is tuple_type and (self.is_literal or self.slow): + super(SequenceNode, self).generate_subexpr_disposal_code(code) + else: + # We call generate_post_assignment_code here instead + # of generate_disposal_code, because values were stored + # in the tuple using a reference-stealing operation. + for arg in self.args: + arg.generate_post_assignment_code(code) + # Should NOT call free_temps -- this is invoked by the default + # generate_evaluation_code which will do that. + if self.mult_factor: + self.mult_factor.generate_disposal_code(code) + + def generate_assignment_code(self, rhs, code, overloaded_assignment=False, + exception_check=None, exception_value=None): + if self.starred_assignment: + self.generate_starred_assignment_code(rhs, code) + else: + self.generate_parallel_assignment_code(rhs, code) + + for item in self.unpacked_items: + item.release(code) + rhs.free_temps(code) + + _func_iternext_type = PyrexTypes.CPtrType(PyrexTypes.CFuncType( + PyrexTypes.py_object_type, [ + PyrexTypes.CFuncTypeArg("it", PyrexTypes.py_object_type, None), + ])) + + def generate_parallel_assignment_code(self, rhs, code): + # Need to work around the fact that generate_evaluation_code + # allocates the temps in a rather hacky way -- the assignment + # is evaluated twice, within each if-block. + for item in self.unpacked_items: + item.allocate(code) + special_unpack = (rhs.type is py_object_type + or rhs.type in (tuple_type, list_type) + or not rhs.type.is_builtin_type) + long_enough_for_a_loop = len(self.unpacked_items) > 3 + + if special_unpack: + self.generate_special_parallel_unpacking_code( + code, rhs, use_loop=long_enough_for_a_loop) + else: + code.putln("{") + self.generate_generic_parallel_unpacking_code( + code, rhs, self.unpacked_items, use_loop=long_enough_for_a_loop) + code.putln("}") + + for value_node in self.coerced_unpacked_items: + value_node.generate_evaluation_code(code) + for i in range(len(self.args)): + self.args[i].generate_assignment_code( + self.coerced_unpacked_items[i], code) + + def generate_special_parallel_unpacking_code(self, code, rhs, use_loop): + sequence_type_test = '1' + none_check = "likely(%s != Py_None)" % rhs.py_result() + if rhs.type is list_type: + sequence_types = ['List'] + if rhs.may_be_none(): + sequence_type_test = none_check + elif rhs.type is tuple_type: + sequence_types = ['Tuple'] + if rhs.may_be_none(): + sequence_type_test = none_check + else: + sequence_types = ['Tuple', 'List'] + tuple_check = 'likely(PyTuple_CheckExact(%s))' % rhs.py_result() + list_check = 'PyList_CheckExact(%s)' % rhs.py_result() + sequence_type_test = "(%s) || (%s)" % (tuple_check, list_check) + + code.putln("if (%s) {" % sequence_type_test) + code.putln("PyObject* sequence = %s;" % rhs.py_result()) + + # list/tuple => check size + code.putln("Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);") + code.putln("if (unlikely(size != %d)) {" % len(self.args)) + code.globalstate.use_utility_code(raise_too_many_values_to_unpack) + code.putln("if (size > %d) __Pyx_RaiseTooManyValuesError(%d);" % ( + len(self.args), len(self.args))) + code.globalstate.use_utility_code(raise_need_more_values_to_unpack) + code.putln("else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);") + # < 0 => exception + code.putln(code.error_goto(self.pos)) + code.putln("}") + + code.putln("#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS") + # unpack items from list/tuple in unrolled loop (can't fail) + if len(sequence_types) == 2: + code.putln("if (likely(Py%s_CheckExact(sequence))) {" % sequence_types[0]) + for i, item in enumerate(self.unpacked_items): + code.putln("%s = Py%s_GET_ITEM(sequence, %d); " % ( + item.result(), sequence_types[0], i)) + if len(sequence_types) == 2: + code.putln("} else {") + for i, item in enumerate(self.unpacked_items): + code.putln("%s = Py%s_GET_ITEM(sequence, %d); " % ( + item.result(), sequence_types[1], i)) + code.putln("}") + for item in self.unpacked_items: + code.put_incref(item.result(), item.ctype()) + + code.putln("#else") + # in non-CPython, use the PySequence protocol (which can fail) + if not use_loop: + for i, item in enumerate(self.unpacked_items): + code.putln("%s = PySequence_ITEM(sequence, %d); %s" % ( + item.result(), i, + code.error_goto_if_null(item.result(), self.pos))) + code.put_gotref(item.result()) + else: + code.putln("{") + code.putln("Py_ssize_t i;") + code.putln("PyObject** temps[%s] = {%s};" % ( + len(self.unpacked_items), + ','.join(['&%s' % item.result() for item in self.unpacked_items]))) + code.putln("for (i=0; i < %s; i++) {" % len(self.unpacked_items)) + code.putln("PyObject* item = PySequence_ITEM(sequence, i); %s" % ( + code.error_goto_if_null('item', self.pos))) + code.put_gotref('item') + code.putln("*(temps[i]) = item;") + code.putln("}") + code.putln("}") + + code.putln("#endif") + rhs.generate_disposal_code(code) + + if sequence_type_test == '1': + code.putln("}") # all done + elif sequence_type_test == none_check: + # either tuple/list or None => save some code by generating the error directly + code.putln("} else {") + code.globalstate.use_utility_code( + UtilityCode.load_cached("RaiseNoneIterError", "ObjectHandling.c")) + code.putln("__Pyx_RaiseNoneNotIterableError(); %s" % code.error_goto(self.pos)) + code.putln("}") # all done + else: + code.putln("} else {") # needs iteration fallback code + self.generate_generic_parallel_unpacking_code( + code, rhs, self.unpacked_items, use_loop=use_loop) + code.putln("}") + + def generate_generic_parallel_unpacking_code(self, code, rhs, unpacked_items, use_loop, terminate=True): + code.globalstate.use_utility_code(raise_need_more_values_to_unpack) + code.globalstate.use_utility_code(UtilityCode.load_cached("IterFinish", "ObjectHandling.c")) + code.putln("Py_ssize_t index = -1;") # must be at the start of a C block! + + if use_loop: + code.putln("PyObject** temps[%s] = {%s};" % ( + len(self.unpacked_items), + ','.join(['&%s' % item.result() for item in unpacked_items]))) + + iterator_temp = code.funcstate.allocate_temp(py_object_type, manage_ref=True) + code.putln( + "%s = PyObject_GetIter(%s); %s" % ( + iterator_temp, + rhs.py_result(), + code.error_goto_if_null(iterator_temp, self.pos))) + code.put_gotref(iterator_temp) + rhs.generate_disposal_code(code) + + iternext_func = code.funcstate.allocate_temp(self._func_iternext_type, manage_ref=False) + code.putln("%s = Py_TYPE(%s)->tp_iternext;" % ( + iternext_func, iterator_temp)) + + unpacking_error_label = code.new_label('unpacking_failed') + unpack_code = "%s(%s)" % (iternext_func, iterator_temp) + if use_loop: + code.putln("for (index=0; index < %s; index++) {" % len(unpacked_items)) + code.put("PyObject* item = %s; if (unlikely(!item)) " % unpack_code) + code.put_goto(unpacking_error_label) + code.put_gotref("item") + code.putln("*(temps[index]) = item;") + code.putln("}") + else: + for i, item in enumerate(unpacked_items): + code.put( + "index = %d; %s = %s; if (unlikely(!%s)) " % ( + i, + item.result(), + unpack_code, + item.result())) + code.put_goto(unpacking_error_label) + code.put_gotref(item.py_result()) + + if terminate: + code.globalstate.use_utility_code( + UtilityCode.load_cached("UnpackItemEndCheck", "ObjectHandling.c")) + code.put_error_if_neg(self.pos, "__Pyx_IternextUnpackEndCheck(%s, %d)" % ( + unpack_code, + len(unpacked_items))) + code.putln("%s = NULL;" % iternext_func) + code.put_decref_clear(iterator_temp, py_object_type) + + unpacking_done_label = code.new_label('unpacking_done') + code.put_goto(unpacking_done_label) + + code.put_label(unpacking_error_label) + code.put_decref_clear(iterator_temp, py_object_type) + code.putln("%s = NULL;" % iternext_func) + code.putln("if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);") + code.putln(code.error_goto(self.pos)) + code.put_label(unpacking_done_label) + + code.funcstate.release_temp(iternext_func) + if terminate: + code.funcstate.release_temp(iterator_temp) + iterator_temp = None + + return iterator_temp + + def generate_starred_assignment_code(self, rhs, code): + for i, arg in enumerate(self.args): + if arg.is_starred: + starred_target = self.unpacked_items[i] + unpacked_fixed_items_left = self.unpacked_items[:i] + unpacked_fixed_items_right = self.unpacked_items[i+1:] + break + else: + assert False + + iterator_temp = None + if unpacked_fixed_items_left: + for item in unpacked_fixed_items_left: + item.allocate(code) + code.putln('{') + iterator_temp = self.generate_generic_parallel_unpacking_code( + code, rhs, unpacked_fixed_items_left, + use_loop=True, terminate=False) + for i, item in enumerate(unpacked_fixed_items_left): + value_node = self.coerced_unpacked_items[i] + value_node.generate_evaluation_code(code) + code.putln('}') + + starred_target.allocate(code) + target_list = starred_target.result() + code.putln("%s = PySequence_List(%s); %s" % ( + target_list, + iterator_temp or rhs.py_result(), + code.error_goto_if_null(target_list, self.pos))) + code.put_gotref(target_list) + + if iterator_temp: + code.put_decref_clear(iterator_temp, py_object_type) + code.funcstate.release_temp(iterator_temp) + else: + rhs.generate_disposal_code(code) + + if unpacked_fixed_items_right: + code.globalstate.use_utility_code(raise_need_more_values_to_unpack) + length_temp = code.funcstate.allocate_temp(PyrexTypes.c_py_ssize_t_type, manage_ref=False) + code.putln('%s = PyList_GET_SIZE(%s);' % (length_temp, target_list)) + code.putln("if (unlikely(%s < %d)) {" % (length_temp, len(unpacked_fixed_items_right))) + code.putln("__Pyx_RaiseNeedMoreValuesError(%d+%s); %s" % ( + len(unpacked_fixed_items_left), length_temp, + code.error_goto(self.pos))) + code.putln('}') + + for item in unpacked_fixed_items_right[::-1]: + item.allocate(code) + for i, (item, coerced_arg) in enumerate(zip(unpacked_fixed_items_right[::-1], + self.coerced_unpacked_items[::-1])): + code.putln('#if CYTHON_COMPILING_IN_CPYTHON') + code.putln("%s = PyList_GET_ITEM(%s, %s-%d); " % ( + item.py_result(), target_list, length_temp, i+1)) + # resize the list the hard way + code.putln("((PyVarObject*)%s)->ob_size--;" % target_list) + code.putln('#else') + code.putln("%s = PySequence_ITEM(%s, %s-%d); " % ( + item.py_result(), target_list, length_temp, i+1)) + code.putln('#endif') + code.put_gotref(item.py_result()) + coerced_arg.generate_evaluation_code(code) + + code.putln('#if !CYTHON_COMPILING_IN_CPYTHON') + sublist_temp = code.funcstate.allocate_temp(py_object_type, manage_ref=True) + code.putln('%s = PySequence_GetSlice(%s, 0, %s-%d); %s' % ( + sublist_temp, target_list, length_temp, len(unpacked_fixed_items_right), + code.error_goto_if_null(sublist_temp, self.pos))) + code.put_gotref(sublist_temp) + code.funcstate.release_temp(length_temp) + code.put_decref(target_list, py_object_type) + code.putln('%s = %s; %s = NULL;' % (target_list, sublist_temp, sublist_temp)) + code.putln('#else') + code.putln('(void)%s;' % sublist_temp) # avoid warning about unused variable + code.funcstate.release_temp(sublist_temp) + code.putln('#endif') + + for i, arg in enumerate(self.args): + arg.generate_assignment_code(self.coerced_unpacked_items[i], code) + + def annotate(self, code): + for arg in self.args: + arg.annotate(code) + if self.unpacked_items: + for arg in self.unpacked_items: + arg.annotate(code) + for arg in self.coerced_unpacked_items: + arg.annotate(code) + + +class TupleNode(SequenceNode): + # Tuple constructor. + + type = tuple_type + is_partly_literal = False + + gil_message = "Constructing Python tuple" + + def infer_type(self, env): + if self.mult_factor or not self.args: + return tuple_type + arg_types = [arg.infer_type(env) for arg in self.args] + if any(type.is_pyobject or type.is_memoryviewslice or type.is_unspecified or type.is_fused + for type in arg_types): + return tuple_type + return env.declare_tuple_type(self.pos, arg_types).type + + def analyse_types(self, env, skip_children=False): + if len(self.args) == 0: + self.is_temp = False + self.is_literal = True + return self + + if not skip_children: + for i, arg in enumerate(self.args): + if arg.is_starred: + arg.starred_expr_allowed_here = True + self.args[i] = arg.analyse_types(env) + if (not self.mult_factor and + not any((arg.is_starred or arg.type.is_pyobject or arg.type.is_memoryviewslice or arg.type.is_fused) + for arg in self.args)): + self.type = env.declare_tuple_type(self.pos, (arg.type for arg in self.args)).type + self.is_temp = 1 + return self + + node = SequenceNode.analyse_types(self, env, skip_children=True) + node = node._create_merge_node_if_necessary(env) + if not node.is_sequence_constructor: + return node + + if not all(child.is_literal for child in node.args): + return node + if not node.mult_factor or ( + node.mult_factor.is_literal and + isinstance(node.mult_factor.constant_result, _py_int_types)): + node.is_temp = False + node.is_literal = True + else: + if not node.mult_factor.type.is_pyobject: + node.mult_factor = node.mult_factor.coerce_to_pyobject(env) + node.is_temp = True + node.is_partly_literal = True + return node + + def analyse_as_type(self, env): + # ctuple type + if not self.args: + return None + item_types = [arg.analyse_as_type(env) for arg in self.args] + if any(t is None for t in item_types): + return None + entry = env.declare_tuple_type(self.pos, item_types) + return entry.type + + def coerce_to(self, dst_type, env): + if self.type.is_ctuple: + if dst_type.is_ctuple and self.type.size == dst_type.size: + return self.coerce_to_ctuple(dst_type, env) + elif dst_type is tuple_type or dst_type is py_object_type: + coerced_args = [arg.coerce_to_pyobject(env) for arg in self.args] + return TupleNode(self.pos, args=coerced_args, type=tuple_type, is_temp=1).analyse_types(env, skip_children=True) + else: + return self.coerce_to_pyobject(env).coerce_to(dst_type, env) + elif dst_type.is_ctuple and not self.mult_factor: + return self.coerce_to_ctuple(dst_type, env) + else: + return SequenceNode.coerce_to(self, dst_type, env) + + def as_list(self): + t = ListNode(self.pos, args=self.args, mult_factor=self.mult_factor) + if isinstance(self.constant_result, tuple): + t.constant_result = list(self.constant_result) + return t + + def is_simple(self): + # either temp or constant => always simple + return True + + def nonlocally_immutable(self): + # either temp or constant => always safe + return True + + def calculate_result_code(self): + if len(self.args) > 0: + return self.result_code + else: + return Naming.empty_tuple + + def calculate_constant_result(self): + self.constant_result = tuple([ + arg.constant_result for arg in self.args]) + + def compile_time_value(self, denv): + values = self.compile_time_value_list(denv) + try: + return tuple(values) + except Exception as e: + self.compile_time_value_error(e) + + def generate_operation_code(self, code): + if len(self.args) == 0: + # result_code is Naming.empty_tuple + return + + if self.is_literal or self.is_partly_literal: + # The "mult_factor" is part of the deduplication if it is also constant, i.e. when + # we deduplicate the multiplied result. Otherwise, only deduplicate the constant part. + dedup_key = make_dedup_key(self.type, [self.mult_factor if self.is_literal else None] + self.args) + tuple_target = code.get_py_const(py_object_type, 'tuple', cleanup_level=2, dedup_key=dedup_key) + const_code = code.get_cached_constants_writer(tuple_target) + if const_code is not None: + # constant is not yet initialised + const_code.mark_pos(self.pos) + self.generate_sequence_packing_code(const_code, tuple_target, plain=not self.is_literal) + const_code.put_giveref(tuple_target) + if self.is_literal: + self.result_code = tuple_target + else: + code.putln('%s = PyNumber_Multiply(%s, %s); %s' % ( + self.result(), tuple_target, self.mult_factor.py_result(), + code.error_goto_if_null(self.result(), self.pos) + )) + code.put_gotref(self.py_result()) + else: + self.type.entry.used = True + self.generate_sequence_packing_code(code) + + +class ListNode(SequenceNode): + # List constructor. + + # obj_conversion_errors [PyrexError] used internally + # orignial_args [ExprNode] used internally + + obj_conversion_errors = [] + type = list_type + in_module_scope = False + + gil_message = "Constructing Python list" + + def type_dependencies(self, env): + return () + + def infer_type(self, env): + # TODO: Infer non-object list arrays. + return list_type + + def analyse_expressions(self, env): + for arg in self.args: + if arg.is_starred: + arg.starred_expr_allowed_here = True + node = SequenceNode.analyse_expressions(self, env) + return node.coerce_to_pyobject(env) + + def analyse_types(self, env): + with local_errors(ignore=True) as errors: + self.original_args = list(self.args) + node = SequenceNode.analyse_types(self, env) + node.obj_conversion_errors = errors + if env.is_module_scope: + self.in_module_scope = True + node = node._create_merge_node_if_necessary(env) + return node + + def coerce_to(self, dst_type, env): + if dst_type.is_pyobject: + for err in self.obj_conversion_errors: + report_error(err) + self.obj_conversion_errors = [] + if not self.type.subtype_of(dst_type): + error(self.pos, "Cannot coerce list to type '%s'" % dst_type) + elif (dst_type.is_array or dst_type.is_ptr) and dst_type.base_type is not PyrexTypes.c_void_type: + array_length = len(self.args) + if self.mult_factor: + if isinstance(self.mult_factor.constant_result, _py_int_types): + if self.mult_factor.constant_result <= 0: + error(self.pos, "Cannot coerce non-positively multiplied list to '%s'" % dst_type) + else: + array_length *= self.mult_factor.constant_result + else: + error(self.pos, "Cannot coerce dynamically multiplied list to '%s'" % dst_type) + base_type = dst_type.base_type + self.type = PyrexTypes.CArrayType(base_type, array_length) + for i in range(len(self.original_args)): + arg = self.args[i] + if isinstance(arg, CoerceToPyTypeNode): + arg = arg.arg + self.args[i] = arg.coerce_to(base_type, env) + elif dst_type.is_cpp_class: + # TODO(robertwb): Avoid object conversion for vector/list/set. + return TypecastNode(self.pos, operand=self, type=PyrexTypes.py_object_type).coerce_to(dst_type, env) + elif self.mult_factor: + error(self.pos, "Cannot coerce multiplied list to '%s'" % dst_type) + elif dst_type.is_struct: + if len(self.args) > len(dst_type.scope.var_entries): + error(self.pos, "Too many members for '%s'" % dst_type) + else: + if len(self.args) < len(dst_type.scope.var_entries): + warning(self.pos, "Too few members for '%s'" % dst_type, 1) + for i, (arg, member) in enumerate(zip(self.original_args, dst_type.scope.var_entries)): + if isinstance(arg, CoerceToPyTypeNode): + arg = arg.arg + self.args[i] = arg.coerce_to(member.type, env) + self.type = dst_type + elif dst_type.is_ctuple: + return self.coerce_to_ctuple(dst_type, env) + else: + self.type = error_type + error(self.pos, "Cannot coerce list to type '%s'" % dst_type) + return self + + def as_list(self): # dummy for compatibility with TupleNode + return self + + def as_tuple(self): + t = TupleNode(self.pos, args=self.args, mult_factor=self.mult_factor) + if isinstance(self.constant_result, list): + t.constant_result = tuple(self.constant_result) + return t + + def allocate_temp_result(self, code): + if self.type.is_array: + if self.in_module_scope: + self.temp_code = code.funcstate.allocate_temp( + self.type, manage_ref=False, static=True, reusable=False) + else: + # To be valid C++, we must allocate the memory on the stack + # manually and be sure not to reuse it for something else. + # Yes, this means that we leak a temp array variable. + self.temp_code = code.funcstate.allocate_temp( + self.type, manage_ref=False, reusable=False) + else: + SequenceNode.allocate_temp_result(self, code) + + def calculate_constant_result(self): + if self.mult_factor: + raise ValueError() # may exceed the compile time memory + self.constant_result = [ + arg.constant_result for arg in self.args] + + def compile_time_value(self, denv): + l = self.compile_time_value_list(denv) + if self.mult_factor: + l *= self.mult_factor.compile_time_value(denv) + return l + + def generate_operation_code(self, code): + if self.type.is_pyobject: + for err in self.obj_conversion_errors: + report_error(err) + self.generate_sequence_packing_code(code) + elif self.type.is_array: + if self.mult_factor: + code.putln("{") + code.putln("Py_ssize_t %s;" % Naming.quick_temp_cname) + code.putln("for ({i} = 0; {i} < {count}; {i}++) {{".format( + i=Naming.quick_temp_cname, count=self.mult_factor.result())) + offset = '+ (%d * %s)' % (len(self.args), Naming.quick_temp_cname) + else: + offset = '' + for i, arg in enumerate(self.args): + if arg.type.is_array: + code.globalstate.use_utility_code(UtilityCode.load_cached("IncludeStringH", "StringTools.c")) + code.putln("memcpy(&(%s[%s%s]), %s, sizeof(%s[0]));" % ( + self.result(), i, offset, + arg.result(), self.result() + )) + else: + code.putln("%s[%s%s] = %s;" % ( + self.result(), + i, + offset, + arg.result())) + if self.mult_factor: + code.putln("}") + code.putln("}") + elif self.type.is_struct: + for arg, member in zip(self.args, self.type.scope.var_entries): + code.putln("%s.%s = %s;" % ( + self.result(), + member.cname, + arg.result())) + else: + raise InternalError("List type never specified") + + +class ScopedExprNode(ExprNode): + # Abstract base class for ExprNodes that have their own local + # scope, such as generator expressions. + # + # expr_scope Scope the inner scope of the expression + + subexprs = [] + expr_scope = None + + # does this node really have a local scope, e.g. does it leak loop + # variables or not? non-leaking Py3 behaviour is default, except + # for list comprehensions where the behaviour differs in Py2 and + # Py3 (set in Parsing.py based on parser context) + has_local_scope = True + + def init_scope(self, outer_scope, expr_scope=None): + if expr_scope is not None: + self.expr_scope = expr_scope + elif self.has_local_scope: + self.expr_scope = Symtab.GeneratorExpressionScope(outer_scope) + else: + self.expr_scope = None + + def analyse_declarations(self, env): + self.init_scope(env) + + def analyse_scoped_declarations(self, env): + # this is called with the expr_scope as env + pass + + def analyse_types(self, env): + # no recursion here, the children will be analysed separately below + return self + + def analyse_scoped_expressions(self, env): + # this is called with the expr_scope as env + return self + + def generate_evaluation_code(self, code): + # set up local variables and free their references on exit + generate_inner_evaluation_code = super(ScopedExprNode, self).generate_evaluation_code + if not self.has_local_scope or not self.expr_scope.var_entries: + # no local variables => delegate, done + generate_inner_evaluation_code(code) + return + + code.putln('{ /* enter inner scope */') + py_entries = [] + for _, entry in sorted(item for item in self.expr_scope.entries.items() if item[0]): + if not entry.in_closure: + if entry.type.is_pyobject and entry.used: + py_entries.append(entry) + if not py_entries: + # no local Python references => no cleanup required + generate_inner_evaluation_code(code) + code.putln('} /* exit inner scope */') + return + + # must free all local Python references at each exit point + old_loop_labels = code.new_loop_labels() + old_error_label = code.new_error_label() + + generate_inner_evaluation_code(code) + + # normal (non-error) exit + self._generate_vars_cleanup(code, py_entries) + + # error/loop body exit points + exit_scope = code.new_label('exit_scope') + code.put_goto(exit_scope) + for label, old_label in ([(code.error_label, old_error_label)] + + list(zip(code.get_loop_labels(), old_loop_labels))): + if code.label_used(label): + code.put_label(label) + self._generate_vars_cleanup(code, py_entries) + code.put_goto(old_label) + code.put_label(exit_scope) + code.putln('} /* exit inner scope */') + + code.set_loop_labels(old_loop_labels) + code.error_label = old_error_label + + def _generate_vars_cleanup(self, code, py_entries): + for entry in py_entries: + if entry.is_cglobal: + code.put_var_gotref(entry) + code.put_decref_set(entry.cname, "Py_None") + else: + code.put_var_xdecref_clear(entry) + + +class ComprehensionNode(ScopedExprNode): + # A list/set/dict comprehension + + child_attrs = ["loop"] + + is_temp = True + constant_result = not_a_constant + + def infer_type(self, env): + return self.type + + def analyse_declarations(self, env): + self.append.target = self # this is used in the PyList_Append of the inner loop + self.init_scope(env) + + def analyse_scoped_declarations(self, env): + self.loop.analyse_declarations(env) + + def analyse_types(self, env): + if not self.has_local_scope: + self.loop = self.loop.analyse_expressions(env) + return self + + def analyse_scoped_expressions(self, env): + if self.has_local_scope: + self.loop = self.loop.analyse_expressions(env) + return self + + def may_be_none(self): + return False + + def generate_result_code(self, code): + self.generate_operation_code(code) + + def generate_operation_code(self, code): + if self.type is Builtin.list_type: + create_code = 'PyList_New(0)' + elif self.type is Builtin.set_type: + create_code = 'PySet_New(NULL)' + elif self.type is Builtin.dict_type: + create_code = 'PyDict_New()' + else: + raise InternalError("illegal type for comprehension: %s" % self.type) + code.putln('%s = %s; %s' % ( + self.result(), create_code, + code.error_goto_if_null(self.result(), self.pos))) + + code.put_gotref(self.result()) + self.loop.generate_execution_code(code) + + def annotate(self, code): + self.loop.annotate(code) + + +class ComprehensionAppendNode(Node): + # Need to be careful to avoid infinite recursion: + # target must not be in child_attrs/subexprs + + child_attrs = ['expr'] + target = None + + type = PyrexTypes.c_int_type + + def analyse_expressions(self, env): + self.expr = self.expr.analyse_expressions(env) + if not self.expr.type.is_pyobject: + self.expr = self.expr.coerce_to_pyobject(env) + return self + + def generate_execution_code(self, code): + if self.target.type is list_type: + code.globalstate.use_utility_code( + UtilityCode.load_cached("ListCompAppend", "Optimize.c")) + function = "__Pyx_ListComp_Append" + elif self.target.type is set_type: + function = "PySet_Add" + else: + raise InternalError( + "Invalid type for comprehension node: %s" % self.target.type) + + self.expr.generate_evaluation_code(code) + code.putln(code.error_goto_if("%s(%s, (PyObject*)%s)" % ( + function, + self.target.result(), + self.expr.result() + ), self.pos)) + self.expr.generate_disposal_code(code) + self.expr.free_temps(code) + + def generate_function_definitions(self, env, code): + self.expr.generate_function_definitions(env, code) + + def annotate(self, code): + self.expr.annotate(code) + +class DictComprehensionAppendNode(ComprehensionAppendNode): + child_attrs = ['key_expr', 'value_expr'] + + def analyse_expressions(self, env): + self.key_expr = self.key_expr.analyse_expressions(env) + if not self.key_expr.type.is_pyobject: + self.key_expr = self.key_expr.coerce_to_pyobject(env) + self.value_expr = self.value_expr.analyse_expressions(env) + if not self.value_expr.type.is_pyobject: + self.value_expr = self.value_expr.coerce_to_pyobject(env) + return self + + def generate_execution_code(self, code): + self.key_expr.generate_evaluation_code(code) + self.value_expr.generate_evaluation_code(code) + code.putln(code.error_goto_if("PyDict_SetItem(%s, (PyObject*)%s, (PyObject*)%s)" % ( + self.target.result(), + self.key_expr.result(), + self.value_expr.result() + ), self.pos)) + self.key_expr.generate_disposal_code(code) + self.key_expr.free_temps(code) + self.value_expr.generate_disposal_code(code) + self.value_expr.free_temps(code) + + def generate_function_definitions(self, env, code): + self.key_expr.generate_function_definitions(env, code) + self.value_expr.generate_function_definitions(env, code) + + def annotate(self, code): + self.key_expr.annotate(code) + self.value_expr.annotate(code) + + +class InlinedGeneratorExpressionNode(ExprNode): + # An inlined generator expression for which the result is calculated + # inside of the loop and returned as a single, first and only Generator + # return value. + # This will only be created by transforms when replacing safe builtin + # calls on generator expressions. + # + # gen GeneratorExpressionNode the generator, not containing any YieldExprNodes + # orig_func String the name of the builtin function this node replaces + # target ExprNode or None a 'target' for a ComprehensionAppend node + + subexprs = ["gen"] + orig_func = None + target = None + is_temp = True + type = py_object_type + + def __init__(self, pos, gen, comprehension_type=None, **kwargs): + gbody = gen.def_node.gbody + gbody.is_inlined = True + if comprehension_type is not None: + assert comprehension_type in (list_type, set_type, dict_type), comprehension_type + gbody.inlined_comprehension_type = comprehension_type + kwargs.update( + target=RawCNameExprNode(pos, comprehension_type, Naming.retval_cname), + type=comprehension_type, + ) + super(InlinedGeneratorExpressionNode, self).__init__(pos, gen=gen, **kwargs) + + def may_be_none(self): + return self.orig_func not in ('any', 'all', 'sorted') + + def infer_type(self, env): + return self.type + + def analyse_types(self, env): + self.gen = self.gen.analyse_expressions(env) + return self + + def generate_result_code(self, code): + code.putln("%s = __Pyx_Generator_Next(%s); %s" % ( + self.result(), self.gen.result(), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.result()) + + +class MergedSequenceNode(ExprNode): + """ + Merge a sequence of iterables into a set/list/tuple. + + The target collection is determined by self.type, which must be set externally. + + args [ExprNode] + """ + subexprs = ['args'] + is_temp = True + gil_message = "Constructing Python collection" + + def __init__(self, pos, args, type): + if type in (list_type, tuple_type) and args and args[0].is_sequence_constructor: + # construct a list directly from the first argument that we can then extend + if args[0].type is not list_type: + args[0] = ListNode(args[0].pos, args=args[0].args, is_temp=True) + ExprNode.__init__(self, pos, args=args, type=type) + + def calculate_constant_result(self): + result = [] + for item in self.args: + if item.is_sequence_constructor and item.mult_factor: + if item.mult_factor.constant_result <= 0: + continue + # otherwise, adding each item once should be enough + if item.is_set_literal or item.is_sequence_constructor: + # process items in order + items = (arg.constant_result for arg in item.args) + else: + items = item.constant_result + result.extend(items) + if self.type is set_type: + result = set(result) + elif self.type is tuple_type: + result = tuple(result) + else: + assert self.type is list_type + self.constant_result = result + + def compile_time_value(self, denv): + result = [] + for item in self.args: + if item.is_sequence_constructor and item.mult_factor: + if item.mult_factor.compile_time_value(denv) <= 0: + continue + if item.is_set_literal or item.is_sequence_constructor: + # process items in order + items = (arg.compile_time_value(denv) for arg in item.args) + else: + items = item.compile_time_value(denv) + result.extend(items) + if self.type is set_type: + try: + result = set(result) + except Exception as e: + self.compile_time_value_error(e) + elif self.type is tuple_type: + result = tuple(result) + else: + assert self.type is list_type + return result + + def type_dependencies(self, env): + return () + + def infer_type(self, env): + return self.type + + def analyse_types(self, env): + args = [ + arg.analyse_types(env).coerce_to_pyobject(env).as_none_safe_node( + # FIXME: CPython's error message starts with the runtime function name + 'argument after * must be an iterable, not NoneType') + for arg in self.args + ] + + if len(args) == 1 and args[0].type is self.type: + # strip this intermediate node and use the bare collection + return args[0] + + assert self.type in (set_type, list_type, tuple_type) + + self.args = args + return self + + def may_be_none(self): + return False + + def generate_evaluation_code(self, code): + code.mark_pos(self.pos) + self.allocate_temp_result(code) + + is_set = self.type is set_type + + args = iter(self.args) + item = next(args) + item.generate_evaluation_code(code) + if (is_set and item.is_set_literal or + not is_set and item.is_sequence_constructor and item.type is list_type): + code.putln("%s = %s;" % (self.result(), item.py_result())) + item.generate_post_assignment_code(code) + else: + code.putln("%s = %s(%s); %s" % ( + self.result(), + 'PySet_New' if is_set else 'PySequence_List', + item.py_result(), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + item.generate_disposal_code(code) + item.free_temps(code) + + helpers = set() + if is_set: + add_func = "PySet_Add" + extend_func = "__Pyx_PySet_Update" + else: + add_func = "__Pyx_ListComp_Append" + extend_func = "__Pyx_PyList_Extend" + + for item in args: + if (is_set and (item.is_set_literal or item.is_sequence_constructor) or + (item.is_sequence_constructor and not item.mult_factor)): + if not is_set and item.args: + helpers.add(("ListCompAppend", "Optimize.c")) + for arg in item.args: + arg.generate_evaluation_code(code) + code.put_error_if_neg(arg.pos, "%s(%s, %s)" % ( + add_func, + self.result(), + arg.py_result())) + arg.generate_disposal_code(code) + arg.free_temps(code) + continue + + if is_set: + helpers.add(("PySet_Update", "Builtins.c")) + else: + helpers.add(("ListExtend", "Optimize.c")) + + item.generate_evaluation_code(code) + code.put_error_if_neg(item.pos, "%s(%s, %s)" % ( + extend_func, + self.result(), + item.py_result())) + item.generate_disposal_code(code) + item.free_temps(code) + + if self.type is tuple_type: + code.putln("{") + code.putln("PyObject *%s = PyList_AsTuple(%s);" % ( + Naming.quick_temp_cname, + self.result())) + code.put_decref(self.result(), py_object_type) + code.putln("%s = %s; %s" % ( + self.result(), + Naming.quick_temp_cname, + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.result()) + code.putln("}") + + for helper in sorted(helpers): + code.globalstate.use_utility_code(UtilityCode.load_cached(*helper)) + + def annotate(self, code): + for item in self.args: + item.annotate(code) + + +class SetNode(ExprNode): + """ + Set constructor. + """ + subexprs = ['args'] + type = set_type + is_set_literal = True + gil_message = "Constructing Python set" + + def analyse_types(self, env): + for i in range(len(self.args)): + arg = self.args[i] + arg = arg.analyse_types(env) + self.args[i] = arg.coerce_to_pyobject(env) + self.type = set_type + self.is_temp = 1 + return self + + def may_be_none(self): + return False + + def calculate_constant_result(self): + self.constant_result = set([arg.constant_result for arg in self.args]) + + def compile_time_value(self, denv): + values = [arg.compile_time_value(denv) for arg in self.args] + try: + return set(values) + except Exception as e: + self.compile_time_value_error(e) + + def generate_evaluation_code(self, code): + for arg in self.args: + arg.generate_evaluation_code(code) + self.allocate_temp_result(code) + code.putln( + "%s = PySet_New(0); %s" % ( + self.result(), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + for arg in self.args: + code.put_error_if_neg( + self.pos, + "PySet_Add(%s, %s)" % (self.result(), arg.py_result())) + arg.generate_disposal_code(code) + arg.free_temps(code) + + +class DictNode(ExprNode): + # Dictionary constructor. + # + # key_value_pairs [DictItemNode] + # exclude_null_values [boolean] Do not add NULL values to dict + # + # obj_conversion_errors [PyrexError] used internally + + subexprs = ['key_value_pairs'] + is_temp = 1 + exclude_null_values = False + type = dict_type + is_dict_literal = True + reject_duplicates = False + + obj_conversion_errors = [] + + @classmethod + def from_pairs(cls, pos, pairs): + return cls(pos, key_value_pairs=[ + DictItemNode(pos, key=k, value=v) for k, v in pairs]) + + def calculate_constant_result(self): + self.constant_result = dict([ + item.constant_result for item in self.key_value_pairs]) + + def compile_time_value(self, denv): + pairs = [(item.key.compile_time_value(denv), item.value.compile_time_value(denv)) + for item in self.key_value_pairs] + try: + return dict(pairs) + except Exception as e: + self.compile_time_value_error(e) + + def type_dependencies(self, env): + return () + + def infer_type(self, env): + # TODO: Infer struct constructors. + return dict_type + + def analyse_types(self, env): + with local_errors(ignore=True) as errors: + self.key_value_pairs = [ + item.analyse_types(env) + for item in self.key_value_pairs + ] + self.obj_conversion_errors = errors + return self + + def may_be_none(self): + return False + + def coerce_to(self, dst_type, env): + if dst_type.is_pyobject: + self.release_errors() + if self.type.is_struct_or_union: + if not dict_type.subtype_of(dst_type): + error(self.pos, "Cannot interpret struct as non-dict type '%s'" % dst_type) + return DictNode(self.pos, key_value_pairs=[ + DictItemNode(item.pos, key=item.key.coerce_to_pyobject(env), + value=item.value.coerce_to_pyobject(env)) + for item in self.key_value_pairs]) + if not self.type.subtype_of(dst_type): + error(self.pos, "Cannot interpret dict as type '%s'" % dst_type) + elif dst_type.is_struct_or_union: + self.type = dst_type + if not dst_type.is_struct and len(self.key_value_pairs) != 1: + error(self.pos, "Exactly one field must be specified to convert to union '%s'" % dst_type) + elif dst_type.is_struct and len(self.key_value_pairs) < len(dst_type.scope.var_entries): + warning(self.pos, "Not all members given for struct '%s'" % dst_type, 1) + for item in self.key_value_pairs: + if isinstance(item.key, CoerceToPyTypeNode): + item.key = item.key.arg + if not item.key.is_string_literal: + error(item.key.pos, "Invalid struct field identifier") + item.key = StringNode(item.key.pos, value="") + else: + key = str(item.key.value) # converts string literals to unicode in Py3 + member = dst_type.scope.lookup_here(key) + if not member: + error(item.key.pos, "struct '%s' has no field '%s'" % (dst_type, key)) + else: + value = item.value + if isinstance(value, CoerceToPyTypeNode): + value = value.arg + item.value = value.coerce_to(member.type, env) + else: + self.type = error_type + error(self.pos, "Cannot interpret dict as type '%s'" % dst_type) + return self + + def release_errors(self): + for err in self.obj_conversion_errors: + report_error(err) + self.obj_conversion_errors = [] + + gil_message = "Constructing Python dict" + + def generate_evaluation_code(self, code): + # Custom method used here because key-value + # pairs are evaluated and used one at a time. + code.mark_pos(self.pos) + self.allocate_temp_result(code) + + is_dict = self.type.is_pyobject + if is_dict: + self.release_errors() + code.putln( + "%s = __Pyx_PyDict_NewPresized(%d); %s" % ( + self.result(), + len(self.key_value_pairs), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + keys_seen = set() + key_type = None + needs_error_helper = False + + for item in self.key_value_pairs: + item.generate_evaluation_code(code) + if is_dict: + if self.exclude_null_values: + code.putln('if (%s) {' % item.value.py_result()) + key = item.key + if self.reject_duplicates: + if keys_seen is not None: + # avoid runtime 'in' checks for literals that we can do at compile time + if not key.is_string_literal: + keys_seen = None + elif key.value in keys_seen: + # FIXME: this could be a compile time error, at least in Cython code + keys_seen = None + elif key_type is not type(key.value): + if key_type is None: + key_type = type(key.value) + keys_seen.add(key.value) + else: + # different types => may not be able to compare at compile time + keys_seen = None + else: + keys_seen.add(key.value) + + if keys_seen is None: + code.putln('if (unlikely(PyDict_Contains(%s, %s))) {' % ( + self.result(), key.py_result())) + # currently only used in function calls + needs_error_helper = True + code.putln('__Pyx_RaiseDoubleKeywordsError("function", %s); %s' % ( + key.py_result(), + code.error_goto(item.pos))) + code.putln("} else {") + + code.put_error_if_neg(self.pos, "PyDict_SetItem(%s, %s, %s)" % ( + self.result(), + item.key.py_result(), + item.value.py_result())) + if self.reject_duplicates and keys_seen is None: + code.putln('}') + if self.exclude_null_values: + code.putln('}') + else: + code.putln("%s.%s = %s;" % ( + self.result(), + item.key.value, + item.value.result())) + item.generate_disposal_code(code) + item.free_temps(code) + + if needs_error_helper: + code.globalstate.use_utility_code( + UtilityCode.load_cached("RaiseDoubleKeywords", "FunctionArguments.c")) + + def annotate(self, code): + for item in self.key_value_pairs: + item.annotate(code) + + +class DictItemNode(ExprNode): + # Represents a single item in a DictNode + # + # key ExprNode + # value ExprNode + subexprs = ['key', 'value'] + + nogil_check = None # Parent DictNode takes care of it + + def calculate_constant_result(self): + self.constant_result = ( + self.key.constant_result, self.value.constant_result) + + def analyse_types(self, env): + self.key = self.key.analyse_types(env) + self.value = self.value.analyse_types(env) + self.key = self.key.coerce_to_pyobject(env) + self.value = self.value.coerce_to_pyobject(env) + return self + + def generate_evaluation_code(self, code): + self.key.generate_evaluation_code(code) + self.value.generate_evaluation_code(code) + + def generate_disposal_code(self, code): + self.key.generate_disposal_code(code) + self.value.generate_disposal_code(code) + + def free_temps(self, code): + self.key.free_temps(code) + self.value.free_temps(code) + + def __iter__(self): + return iter([self.key, self.value]) + + +class SortedDictKeysNode(ExprNode): + # build sorted list of dict keys, e.g. for dir() + subexprs = ['arg'] + + is_temp = True + + def __init__(self, arg): + ExprNode.__init__(self, arg.pos, arg=arg) + self.type = Builtin.list_type + + def analyse_types(self, env): + arg = self.arg.analyse_types(env) + if arg.type is Builtin.dict_type: + arg = arg.as_none_safe_node( + "'NoneType' object is not iterable") + self.arg = arg + return self + + def may_be_none(self): + return False + + def generate_result_code(self, code): + dict_result = self.arg.py_result() + if self.arg.type is Builtin.dict_type: + code.putln('%s = PyDict_Keys(%s); %s' % ( + self.result(), dict_result, + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + else: + # originally used PyMapping_Keys() here, but that may return a tuple + code.globalstate.use_utility_code(UtilityCode.load_cached( + 'PyObjectCallMethod0', 'ObjectHandling.c')) + keys_cname = code.intern_identifier(StringEncoding.EncodedString("keys")) + code.putln('%s = __Pyx_PyObject_CallMethod0(%s, %s); %s' % ( + self.result(), dict_result, keys_cname, + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + code.putln("if (unlikely(!PyList_Check(%s))) {" % self.result()) + code.put_decref_set(self.result(), "PySequence_List(%s)" % self.result()) + code.putln(code.error_goto_if_null(self.result(), self.pos)) + code.put_gotref(self.py_result()) + code.putln("}") + code.put_error_if_neg( + self.pos, 'PyList_Sort(%s)' % self.py_result()) + + +class ModuleNameMixin(object): + def get_py_mod_name(self, code): + return code.get_py_string_const( + self.module_name, identifier=True) + + def get_py_qualified_name(self, code): + return code.get_py_string_const( + self.qualname, identifier=True) + + +class ClassNode(ExprNode, ModuleNameMixin): + # Helper class used in the implementation of Python + # class definitions. Constructs a class object given + # a name, tuple of bases and class dictionary. + # + # name EncodedString Name of the class + # class_def_node PyClassDefNode PyClassDefNode defining this class + # doc ExprNode or None Doc string + # module_name EncodedString Name of defining module + + subexprs = ['doc'] + type = py_object_type + is_temp = True + + def infer_type(self, env): + # TODO: could return 'type' in some cases + return py_object_type + + def analyse_types(self, env): + if self.doc: + self.doc = self.doc.analyse_types(env) + self.doc = self.doc.coerce_to_pyobject(env) + env.use_utility_code(UtilityCode.load_cached("CreateClass", "ObjectHandling.c")) + return self + + def may_be_none(self): + return True + + gil_message = "Constructing Python class" + + def generate_result_code(self, code): + class_def_node = self.class_def_node + cname = code.intern_identifier(self.name) + + if self.doc: + code.put_error_if_neg(self.pos, + 'PyDict_SetItem(%s, %s, %s)' % ( + class_def_node.dict.py_result(), + code.intern_identifier( + StringEncoding.EncodedString("__doc__")), + self.doc.py_result())) + py_mod_name = self.get_py_mod_name(code) + qualname = self.get_py_qualified_name(code) + code.putln( + '%s = __Pyx_CreateClass(%s, %s, %s, %s, %s); %s' % ( + self.result(), + class_def_node.bases.py_result(), + class_def_node.dict.py_result(), + cname, + qualname, + py_mod_name, + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + +class Py3ClassNode(ExprNode): + # Helper class used in the implementation of Python3+ + # class definitions. Constructs a class object given + # a name, tuple of bases and class dictionary. + # + # name EncodedString Name of the class + # module_name EncodedString Name of defining module + # class_def_node PyClassDefNode PyClassDefNode defining this class + # calculate_metaclass bool should call CalculateMetaclass() + # allow_py2_metaclass bool should look for Py2 metaclass + + subexprs = [] + type = py_object_type + is_temp = True + + def infer_type(self, env): + # TODO: could return 'type' in some cases + return py_object_type + + def analyse_types(self, env): + return self + + def may_be_none(self): + return True + + gil_message = "Constructing Python class" + + def generate_result_code(self, code): + code.globalstate.use_utility_code(UtilityCode.load_cached("Py3ClassCreate", "ObjectHandling.c")) + cname = code.intern_identifier(self.name) + class_def_node = self.class_def_node + mkw = class_def_node.mkw.py_result() if class_def_node.mkw else 'NULL' + if class_def_node.metaclass: + metaclass = class_def_node.metaclass.py_result() + else: + metaclass = "((PyObject*)&__Pyx_DefaultClassType)" + code.putln( + '%s = __Pyx_Py3ClassCreate(%s, %s, %s, %s, %s, %d, %d); %s' % ( + self.result(), + metaclass, + cname, + class_def_node.bases.py_result(), + class_def_node.dict.py_result(), + mkw, + self.calculate_metaclass, + self.allow_py2_metaclass, + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + +class PyClassMetaclassNode(ExprNode): + # Helper class holds Python3 metaclass object + # + # class_def_node PyClassDefNode PyClassDefNode defining this class + + subexprs = [] + + def analyse_types(self, env): + self.type = py_object_type + self.is_temp = True + return self + + def may_be_none(self): + return True + + def generate_result_code(self, code): + bases = self.class_def_node.bases + mkw = self.class_def_node.mkw + if mkw: + code.globalstate.use_utility_code( + UtilityCode.load_cached("Py3MetaclassGet", "ObjectHandling.c")) + call = "__Pyx_Py3MetaclassGet(%s, %s)" % ( + bases.result(), + mkw.result()) + else: + code.globalstate.use_utility_code( + UtilityCode.load_cached("CalculateMetaclass", "ObjectHandling.c")) + call = "__Pyx_CalculateMetaclass(NULL, %s)" % ( + bases.result()) + code.putln( + "%s = %s; %s" % ( + self.result(), call, + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + +class PyClassNamespaceNode(ExprNode, ModuleNameMixin): + # Helper class holds Python3 namespace object + # + # All this are not owned by this node + # class_def_node PyClassDefNode PyClassDefNode defining this class + # doc ExprNode or None Doc string (owned) + + subexprs = ['doc'] + + def analyse_types(self, env): + if self.doc: + self.doc = self.doc.analyse_types(env).coerce_to_pyobject(env) + self.type = py_object_type + self.is_temp = 1 + return self + + def may_be_none(self): + return True + + def generate_result_code(self, code): + cname = code.intern_identifier(self.name) + py_mod_name = self.get_py_mod_name(code) + qualname = self.get_py_qualified_name(code) + class_def_node = self.class_def_node + null = "(PyObject *) NULL" + doc_code = self.doc.result() if self.doc else null + mkw = class_def_node.mkw.py_result() if class_def_node.mkw else null + metaclass = class_def_node.metaclass.py_result() if class_def_node.metaclass else null + code.putln( + "%s = __Pyx_Py3MetaclassPrepare(%s, %s, %s, %s, %s, %s, %s); %s" % ( + self.result(), + metaclass, + class_def_node.bases.result(), + cname, + qualname, + mkw, + py_mod_name, + doc_code, + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + +class ClassCellInjectorNode(ExprNode): + # Initialize CyFunction.func_classobj + is_temp = True + type = py_object_type + subexprs = [] + is_active = False + + def analyse_expressions(self, env): + return self + + def generate_result_code(self, code): + assert self.is_active + code.putln( + '%s = PyList_New(0); %s' % ( + self.result(), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.result()) + + def generate_injection_code(self, code, classobj_cname): + assert self.is_active + code.globalstate.use_utility_code( + UtilityCode.load_cached("CyFunctionClassCell", "CythonFunction.c")) + code.put_error_if_neg(self.pos, '__Pyx_CyFunction_InitClassCell(%s, %s)' % ( + self.result(), classobj_cname)) + + +class ClassCellNode(ExprNode): + # Class Cell for noargs super() + subexprs = [] + is_temp = True + is_generator = False + type = py_object_type + + def analyse_types(self, env): + return self + + def generate_result_code(self, code): + if not self.is_generator: + code.putln('%s = __Pyx_CyFunction_GetClassObj(%s);' % ( + self.result(), + Naming.self_cname)) + else: + code.putln('%s = %s->classobj;' % ( + self.result(), Naming.generator_cname)) + code.putln( + 'if (!%s) { PyErr_SetString(PyExc_SystemError, ' + '"super(): empty __class__ cell"); %s }' % ( + self.result(), + code.error_goto(self.pos))) + code.put_incref(self.result(), py_object_type) + + +class PyCFunctionNode(ExprNode, ModuleNameMixin): + # Helper class used in the implementation of Python + # functions. Constructs a PyCFunction object + # from a PyMethodDef struct. + # + # pymethdef_cname string PyMethodDef structure + # self_object ExprNode or None + # binding bool + # def_node DefNode the Python function node + # module_name EncodedString Name of defining module + # code_object CodeObjectNode the PyCodeObject creator node + + subexprs = ['code_object', 'defaults_tuple', 'defaults_kwdict', + 'annotations_dict'] + + self_object = None + code_object = None + binding = False + def_node = None + defaults = None + defaults_struct = None + defaults_pyobjects = 0 + defaults_tuple = None + defaults_kwdict = None + annotations_dict = None + + type = py_object_type + is_temp = 1 + + specialized_cpdefs = None + is_specialization = False + + @classmethod + def from_defnode(cls, node, binding): + return cls(node.pos, + def_node=node, + pymethdef_cname=node.entry.pymethdef_cname, + binding=binding or node.specialized_cpdefs, + specialized_cpdefs=node.specialized_cpdefs, + code_object=CodeObjectNode(node)) + + def analyse_types(self, env): + if self.binding: + self.analyse_default_args(env) + return self + + def analyse_default_args(self, env): + """ + Handle non-literal function's default arguments. + """ + nonliteral_objects = [] + nonliteral_other = [] + default_args = [] + default_kwargs = [] + annotations = [] + + # For global cpdef functions and def/cpdef methods in cdef classes, we must use global constants + # for default arguments to avoid the dependency on the CyFunction object as 'self' argument + # in the underlying C function. Basically, cpdef functions/methods are static C functions, + # so their optional arguments must be static, too. + # TODO: change CyFunction implementation to pass both function object and owning object for method calls + must_use_constants = env.is_c_class_scope or (self.def_node.is_wrapper and env.is_module_scope) + + for arg in self.def_node.args: + if arg.default and not must_use_constants: + if not arg.default.is_literal: + arg.is_dynamic = True + if arg.type.is_pyobject: + nonliteral_objects.append(arg) + else: + nonliteral_other.append(arg) + else: + arg.default = DefaultLiteralArgNode(arg.pos, arg.default) + if arg.kw_only: + default_kwargs.append(arg) + else: + default_args.append(arg) + if arg.annotation: + arg.annotation = self.analyse_annotation(env, arg.annotation) + annotations.append((arg.pos, arg.name, arg.annotation)) + + for arg in (self.def_node.star_arg, self.def_node.starstar_arg): + if arg and arg.annotation: + arg.annotation = self.analyse_annotation(env, arg.annotation) + annotations.append((arg.pos, arg.name, arg.annotation)) + + annotation = self.def_node.return_type_annotation + if annotation: + annotation = self.analyse_annotation(env, annotation) + self.def_node.return_type_annotation = annotation + annotations.append((annotation.pos, StringEncoding.EncodedString("return"), annotation)) + + if nonliteral_objects or nonliteral_other: + module_scope = env.global_scope() + cname = module_scope.next_id(Naming.defaults_struct_prefix) + scope = Symtab.StructOrUnionScope(cname) + self.defaults = [] + for arg in nonliteral_objects: + entry = scope.declare_var(arg.name, arg.type, None, + Naming.arg_prefix + arg.name, + allow_pyobject=True) + self.defaults.append((arg, entry)) + for arg in nonliteral_other: + entry = scope.declare_var(arg.name, arg.type, None, + Naming.arg_prefix + arg.name, + allow_pyobject=False, allow_memoryview=True) + self.defaults.append((arg, entry)) + entry = module_scope.declare_struct_or_union( + None, 'struct', scope, 1, None, cname=cname) + self.defaults_struct = scope + self.defaults_pyobjects = len(nonliteral_objects) + for arg, entry in self.defaults: + arg.default_value = '%s->%s' % ( + Naming.dynamic_args_cname, entry.cname) + self.def_node.defaults_struct = self.defaults_struct.name + + if default_args or default_kwargs: + if self.defaults_struct is None: + if default_args: + defaults_tuple = TupleNode(self.pos, args=[ + arg.default for arg in default_args]) + self.defaults_tuple = defaults_tuple.analyse_types(env).coerce_to_pyobject(env) + if default_kwargs: + defaults_kwdict = DictNode(self.pos, key_value_pairs=[ + DictItemNode( + arg.pos, + key=IdentifierStringNode(arg.pos, value=arg.name), + value=arg.default) + for arg in default_kwargs]) + self.defaults_kwdict = defaults_kwdict.analyse_types(env) + else: + if default_args: + defaults_tuple = DefaultsTupleNode( + self.pos, default_args, self.defaults_struct) + else: + defaults_tuple = NoneNode(self.pos) + if default_kwargs: + defaults_kwdict = DefaultsKwDictNode( + self.pos, default_kwargs, self.defaults_struct) + else: + defaults_kwdict = NoneNode(self.pos) + + defaults_getter = Nodes.DefNode( + self.pos, args=[], star_arg=None, starstar_arg=None, + body=Nodes.ReturnStatNode( + self.pos, return_type=py_object_type, + value=TupleNode( + self.pos, args=[defaults_tuple, defaults_kwdict])), + decorators=None, + name=StringEncoding.EncodedString("__defaults__")) + # defaults getter must never live in class scopes, it's always a module function + module_scope = env.global_scope() + defaults_getter.analyse_declarations(module_scope) + defaults_getter = defaults_getter.analyse_expressions(module_scope) + defaults_getter.body = defaults_getter.body.analyse_expressions( + defaults_getter.local_scope) + defaults_getter.py_wrapper_required = False + defaults_getter.pymethdef_required = False + self.def_node.defaults_getter = defaults_getter + if annotations: + annotations_dict = DictNode(self.pos, key_value_pairs=[ + DictItemNode( + pos, key=IdentifierStringNode(pos, value=name), + value=value) + for pos, name, value in annotations]) + self.annotations_dict = annotations_dict.analyse_types(env) + + def analyse_annotation(self, env, annotation): + if annotation is None: + return None + atype = annotation.analyse_as_type(env) + if atype is not None: + # Keep parsed types as strings as they might not be Python representable. + annotation = UnicodeNode( + annotation.pos, + value=StringEncoding.EncodedString(atype.declaration_code('', for_display=True))) + annotation = annotation.analyse_types(env) + if not annotation.type.is_pyobject: + annotation = annotation.coerce_to_pyobject(env) + return annotation + + def may_be_none(self): + return False + + gil_message = "Constructing Python function" + + def self_result_code(self): + if self.self_object is None: + self_result = "NULL" + else: + self_result = self.self_object.py_result() + return self_result + + def generate_result_code(self, code): + if self.binding: + self.generate_cyfunction_code(code) + else: + self.generate_pycfunction_code(code) + + def generate_pycfunction_code(self, code): + py_mod_name = self.get_py_mod_name(code) + code.putln( + '%s = PyCFunction_NewEx(&%s, %s, %s); %s' % ( + self.result(), + self.pymethdef_cname, + self.self_result_code(), + py_mod_name, + code.error_goto_if_null(self.result(), self.pos))) + + code.put_gotref(self.py_result()) + + def generate_cyfunction_code(self, code): + if self.specialized_cpdefs: + def_node = self.specialized_cpdefs[0] + else: + def_node = self.def_node + + if self.specialized_cpdefs or self.is_specialization: + code.globalstate.use_utility_code( + UtilityCode.load_cached("FusedFunction", "CythonFunction.c")) + constructor = "__pyx_FusedFunction_New" + else: + code.globalstate.use_utility_code( + UtilityCode.load_cached("CythonFunction", "CythonFunction.c")) + constructor = "__Pyx_CyFunction_New" + + if self.code_object: + code_object_result = self.code_object.py_result() + else: + code_object_result = 'NULL' + + flags = [] + if def_node.is_staticmethod: + flags.append('__Pyx_CYFUNCTION_STATICMETHOD') + elif def_node.is_classmethod: + flags.append('__Pyx_CYFUNCTION_CLASSMETHOD') + + if def_node.local_scope.parent_scope.is_c_class_scope and not def_node.entry.is_anonymous: + flags.append('__Pyx_CYFUNCTION_CCLASS') + + if flags: + flags = ' | '.join(flags) + else: + flags = '0' + + code.putln( + '%s = %s(&%s, %s, %s, %s, %s, %s, %s); %s' % ( + self.result(), + constructor, + self.pymethdef_cname, + flags, + self.get_py_qualified_name(code), + self.self_result_code(), + self.get_py_mod_name(code), + Naming.moddict_cname, + code_object_result, + code.error_goto_if_null(self.result(), self.pos))) + + code.put_gotref(self.py_result()) + + if def_node.requires_classobj: + assert code.pyclass_stack, "pyclass_stack is empty" + class_node = code.pyclass_stack[-1] + code.put_incref(self.py_result(), py_object_type) + code.putln( + 'PyList_Append(%s, %s);' % ( + class_node.class_cell.result(), + self.result())) + code.put_giveref(self.py_result()) + + if self.defaults: + code.putln( + 'if (!__Pyx_CyFunction_InitDefaults(%s, sizeof(%s), %d)) %s' % ( + self.result(), self.defaults_struct.name, + self.defaults_pyobjects, code.error_goto(self.pos))) + defaults = '__Pyx_CyFunction_Defaults(%s, %s)' % ( + self.defaults_struct.name, self.result()) + for arg, entry in self.defaults: + arg.generate_assignment_code(code, target='%s->%s' % ( + defaults, entry.cname)) + + if self.defaults_tuple: + code.putln('__Pyx_CyFunction_SetDefaultsTuple(%s, %s);' % ( + self.result(), self.defaults_tuple.py_result())) + if self.defaults_kwdict: + code.putln('__Pyx_CyFunction_SetDefaultsKwDict(%s, %s);' % ( + self.result(), self.defaults_kwdict.py_result())) + if def_node.defaults_getter and not self.specialized_cpdefs: + # Fused functions do not support dynamic defaults, only their specialisations can have them for now. + code.putln('__Pyx_CyFunction_SetDefaultsGetter(%s, %s);' % ( + self.result(), def_node.defaults_getter.entry.pyfunc_cname)) + if self.annotations_dict: + code.putln('__Pyx_CyFunction_SetAnnotationsDict(%s, %s);' % ( + self.result(), self.annotations_dict.py_result())) + + +class InnerFunctionNode(PyCFunctionNode): + # Special PyCFunctionNode that depends on a closure class + # + + binding = True + needs_self_code = True + + def self_result_code(self): + if self.needs_self_code: + return "((PyObject*)%s)" % Naming.cur_scope_cname + return "NULL" + + +class CodeObjectNode(ExprNode): + # Create a PyCodeObject for a CyFunction instance. + # + # def_node DefNode the Python function node + # varnames TupleNode a tuple with all local variable names + + subexprs = ['varnames'] + is_temp = False + result_code = None + + def __init__(self, def_node): + ExprNode.__init__(self, def_node.pos, def_node=def_node) + args = list(def_node.args) + # if we have args/kwargs, then the first two in var_entries are those + local_vars = [arg for arg in def_node.local_scope.var_entries if arg.name] + self.varnames = TupleNode( + def_node.pos, + args=[IdentifierStringNode(arg.pos, value=arg.name) + for arg in args + local_vars], + is_temp=0, + is_literal=1) + + def may_be_none(self): + return False + + def calculate_result_code(self, code=None): + if self.result_code is None: + self.result_code = code.get_py_const(py_object_type, 'codeobj', cleanup_level=2) + return self.result_code + + def generate_result_code(self, code): + if self.result_code is None: + self.result_code = code.get_py_const(py_object_type, 'codeobj', cleanup_level=2) + + code = code.get_cached_constants_writer(self.result_code) + if code is None: + return # already initialised + code.mark_pos(self.pos) + func = self.def_node + func_name = code.get_py_string_const( + func.name, identifier=True, is_str=False, unicode_value=func.name) + # FIXME: better way to get the module file path at module init time? Encoding to use? + file_path = StringEncoding.bytes_literal(func.pos[0].get_filenametable_entry().encode('utf8'), 'utf8') + file_path_const = code.get_py_string_const(file_path, identifier=False, is_str=True) + + # This combination makes CPython create a new dict for "frame.f_locals" (see GH #1836). + flags = ['CO_OPTIMIZED', 'CO_NEWLOCALS'] + + if self.def_node.star_arg: + flags.append('CO_VARARGS') + if self.def_node.starstar_arg: + flags.append('CO_VARKEYWORDS') + + code.putln("%s = (PyObject*)__Pyx_PyCode_New(%d, %d, %d, 0, %s, %s, %s, %s, %s, %s, %s, %s, %s, %d, %s); %s" % ( + self.result_code, + len(func.args) - func.num_kwonly_args, # argcount + func.num_kwonly_args, # kwonlyargcount (Py3 only) + len(self.varnames.args), # nlocals + '|'.join(flags) or '0', # flags + Naming.empty_bytes, # code + Naming.empty_tuple, # consts + Naming.empty_tuple, # names (FIXME) + self.varnames.result(), # varnames + Naming.empty_tuple, # freevars (FIXME) + Naming.empty_tuple, # cellvars (FIXME) + file_path_const, # filename + func_name, # name + self.pos[1], # firstlineno + Naming.empty_bytes, # lnotab + code.error_goto_if_null(self.result_code, self.pos), + )) + + +class DefaultLiteralArgNode(ExprNode): + # CyFunction's literal argument default value + # + # Evaluate literal only once. + + subexprs = [] + is_literal = True + is_temp = False + + def __init__(self, pos, arg): + super(DefaultLiteralArgNode, self).__init__(pos) + self.arg = arg + self.type = self.arg.type + self.evaluated = False + + def analyse_types(self, env): + return self + + def generate_result_code(self, code): + pass + + def generate_evaluation_code(self, code): + if not self.evaluated: + self.arg.generate_evaluation_code(code) + self.evaluated = True + + def result(self): + return self.type.cast_code(self.arg.result()) + + +class DefaultNonLiteralArgNode(ExprNode): + # CyFunction's non-literal argument default value + + subexprs = [] + + def __init__(self, pos, arg, defaults_struct): + super(DefaultNonLiteralArgNode, self).__init__(pos) + self.arg = arg + self.defaults_struct = defaults_struct + + def analyse_types(self, env): + self.type = self.arg.type + self.is_temp = False + return self + + def generate_result_code(self, code): + pass + + def result(self): + return '__Pyx_CyFunction_Defaults(%s, %s)->%s' % ( + self.defaults_struct.name, Naming.self_cname, + self.defaults_struct.lookup(self.arg.name).cname) + + +class DefaultsTupleNode(TupleNode): + # CyFunction's __defaults__ tuple + + def __init__(self, pos, defaults, defaults_struct): + args = [] + for arg in defaults: + if not arg.default.is_literal: + arg = DefaultNonLiteralArgNode(pos, arg, defaults_struct) + else: + arg = arg.default + args.append(arg) + super(DefaultsTupleNode, self).__init__(pos, args=args) + + def analyse_types(self, env, skip_children=False): + return super(DefaultsTupleNode, self).analyse_types(env, skip_children).coerce_to_pyobject(env) + + +class DefaultsKwDictNode(DictNode): + # CyFunction's __kwdefaults__ dict + + def __init__(self, pos, defaults, defaults_struct): + items = [] + for arg in defaults: + name = IdentifierStringNode(arg.pos, value=arg.name) + if not arg.default.is_literal: + arg = DefaultNonLiteralArgNode(pos, arg, defaults_struct) + else: + arg = arg.default + items.append(DictItemNode(arg.pos, key=name, value=arg)) + super(DefaultsKwDictNode, self).__init__(pos, key_value_pairs=items) + + +class LambdaNode(InnerFunctionNode): + # Lambda expression node (only used as a function reference) + # + # args [CArgDeclNode] formal arguments + # star_arg PyArgDeclNode or None * argument + # starstar_arg PyArgDeclNode or None ** argument + # lambda_name string a module-globally unique lambda name + # result_expr ExprNode + # def_node DefNode the underlying function 'def' node + + child_attrs = ['def_node'] + + name = StringEncoding.EncodedString('') + + def analyse_declarations(self, env): + self.lambda_name = self.def_node.lambda_name = env.next_id('lambda') + self.def_node.no_assignment_synthesis = True + self.def_node.pymethdef_required = True + self.def_node.analyse_declarations(env) + self.def_node.is_cyfunction = True + self.pymethdef_cname = self.def_node.entry.pymethdef_cname + env.add_lambda_def(self.def_node) + + def analyse_types(self, env): + self.def_node = self.def_node.analyse_expressions(env) + return super(LambdaNode, self).analyse_types(env) + + def generate_result_code(self, code): + self.def_node.generate_execution_code(code) + super(LambdaNode, self).generate_result_code(code) + + +class GeneratorExpressionNode(LambdaNode): + # A generator expression, e.g. (i for i in range(10)) + # + # Result is a generator. + # + # loop ForStatNode the for-loop, containing a YieldExprNode + # def_node DefNode the underlying generator 'def' node + + name = StringEncoding.EncodedString('genexpr') + binding = False + + def analyse_declarations(self, env): + self.genexpr_name = env.next_id('genexpr') + super(GeneratorExpressionNode, self).analyse_declarations(env) + # No pymethdef required + self.def_node.pymethdef_required = False + self.def_node.py_wrapper_required = False + self.def_node.is_cyfunction = False + # Force genexpr signature + self.def_node.entry.signature = TypeSlots.pyfunction_noargs + + def generate_result_code(self, code): + code.putln( + '%s = %s(%s); %s' % ( + self.result(), + self.def_node.entry.pyfunc_cname, + self.self_result_code(), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + +class YieldExprNode(ExprNode): + # Yield expression node + # + # arg ExprNode the value to return from the generator + # label_num integer yield label number + # is_yield_from boolean is a YieldFromExprNode to delegate to another generator + + subexprs = ['arg'] + type = py_object_type + label_num = 0 + is_yield_from = False + is_await = False + in_async_gen = False + expr_keyword = 'yield' + + def analyse_types(self, env): + if not self.label_num or (self.is_yield_from and self.in_async_gen): + error(self.pos, "'%s' not supported here" % self.expr_keyword) + self.is_temp = 1 + if self.arg is not None: + self.arg = self.arg.analyse_types(env) + if not self.arg.type.is_pyobject: + self.coerce_yield_argument(env) + return self + + def coerce_yield_argument(self, env): + self.arg = self.arg.coerce_to_pyobject(env) + + def generate_evaluation_code(self, code): + if self.arg: + self.arg.generate_evaluation_code(code) + self.arg.make_owned_reference(code) + code.putln( + "%s = %s;" % ( + Naming.retval_cname, + self.arg.result_as(py_object_type))) + self.arg.generate_post_assignment_code(code) + self.arg.free_temps(code) + else: + code.put_init_to_py_none(Naming.retval_cname, py_object_type) + self.generate_yield_code(code) + + def generate_yield_code(self, code): + """ + Generate the code to return the argument in 'Naming.retval_cname' + and to continue at the yield label. + """ + label_num, label_name = code.new_yield_label( + self.expr_keyword.replace(' ', '_')) + code.use_label(label_name) + + saved = [] + code.funcstate.closure_temps.reset() + for cname, type, manage_ref in code.funcstate.temps_in_use(): + save_cname = code.funcstate.closure_temps.allocate_temp(type) + saved.append((cname, save_cname, type)) + if type.is_pyobject: + code.put_xgiveref(cname) + code.putln('%s->%s = %s;' % (Naming.cur_scope_cname, save_cname, cname)) + + code.put_xgiveref(Naming.retval_cname) + profile = code.globalstate.directives['profile'] + linetrace = code.globalstate.directives['linetrace'] + if profile or linetrace: + code.put_trace_return(Naming.retval_cname, + nogil=not code.funcstate.gil_owned) + code.put_finish_refcount_context() + + if code.funcstate.current_except is not None: + # inside of an except block => save away currently handled exception + code.putln("__Pyx_Coroutine_SwapException(%s);" % Naming.generator_cname) + else: + # no exceptions being handled => restore exception state of caller + code.putln("__Pyx_Coroutine_ResetAndClearException(%s);" % Naming.generator_cname) + + code.putln("/* return from %sgenerator, %sing value */" % ( + 'async ' if self.in_async_gen else '', + 'await' if self.is_await else 'yield')) + code.putln("%s->resume_label = %d;" % ( + Naming.generator_cname, label_num)) + if self.in_async_gen and not self.is_await: + # __Pyx__PyAsyncGenValueWrapperNew() steals a reference to the return value + code.putln("return __Pyx__PyAsyncGenValueWrapperNew(%s);" % Naming.retval_cname) + else: + code.putln("return %s;" % Naming.retval_cname) + + code.put_label(label_name) + for cname, save_cname, type in saved: + code.putln('%s = %s->%s;' % (cname, Naming.cur_scope_cname, save_cname)) + if type.is_pyobject: + code.putln('%s->%s = 0;' % (Naming.cur_scope_cname, save_cname)) + code.put_xgotref(cname) + self.generate_sent_value_handling_code(code, Naming.sent_value_cname) + if self.result_is_used: + self.allocate_temp_result(code) + code.put('%s = %s; ' % (self.result(), Naming.sent_value_cname)) + code.put_incref(self.result(), py_object_type) + + def generate_sent_value_handling_code(self, code, value_cname): + code.putln(code.error_goto_if_null(value_cname, self.pos)) + + +class _YieldDelegationExprNode(YieldExprNode): + def yield_from_func(self, code): + raise NotImplementedError() + + def generate_evaluation_code(self, code, source_cname=None, decref_source=False): + if source_cname is None: + self.arg.generate_evaluation_code(code) + code.putln("%s = %s(%s, %s);" % ( + Naming.retval_cname, + self.yield_from_func(code), + Naming.generator_cname, + self.arg.py_result() if source_cname is None else source_cname)) + if source_cname is None: + self.arg.generate_disposal_code(code) + self.arg.free_temps(code) + elif decref_source: + code.put_decref_clear(source_cname, py_object_type) + code.put_xgotref(Naming.retval_cname) + + code.putln("if (likely(%s)) {" % Naming.retval_cname) + self.generate_yield_code(code) + code.putln("} else {") + # either error or sub-generator has normally terminated: return value => node result + if self.result_is_used: + self.fetch_iteration_result(code) + else: + self.handle_iteration_exception(code) + code.putln("}") + + def fetch_iteration_result(self, code): + # YieldExprNode has allocated the result temp for us + code.putln("%s = NULL;" % self.result()) + code.put_error_if_neg(self.pos, "__Pyx_PyGen_FetchStopIterationValue(&%s)" % self.result()) + code.put_gotref(self.result()) + + def handle_iteration_exception(self, code): + code.putln("PyObject* exc_type = __Pyx_PyErr_Occurred();") + code.putln("if (exc_type) {") + code.putln("if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit &&" + " __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();") + code.putln("else %s" % code.error_goto(self.pos)) + code.putln("}") + + +class YieldFromExprNode(_YieldDelegationExprNode): + # "yield from GEN" expression + is_yield_from = True + expr_keyword = 'yield from' + + def coerce_yield_argument(self, env): + if not self.arg.type.is_string: + # FIXME: support C arrays and C++ iterators? + error(self.pos, "yielding from non-Python object not supported") + self.arg = self.arg.coerce_to_pyobject(env) + + def yield_from_func(self, code): + code.globalstate.use_utility_code(UtilityCode.load_cached("GeneratorYieldFrom", "Coroutine.c")) + return "__Pyx_Generator_Yield_From" + + +class AwaitExprNode(_YieldDelegationExprNode): + # 'await' expression node + # + # arg ExprNode the Awaitable value to await + # label_num integer yield label number + + is_await = True + expr_keyword = 'await' + + def coerce_yield_argument(self, env): + if self.arg is not None: + # FIXME: use same check as in YieldFromExprNode.coerce_yield_argument() ? + self.arg = self.arg.coerce_to_pyobject(env) + + def yield_from_func(self, code): + code.globalstate.use_utility_code(UtilityCode.load_cached("CoroutineYieldFrom", "Coroutine.c")) + return "__Pyx_Coroutine_Yield_From" + + +class AwaitIterNextExprNode(AwaitExprNode): + # 'await' expression node as part of 'async for' iteration + # + # Breaks out of loop on StopAsyncIteration exception. + + def _generate_break(self, code): + code.globalstate.use_utility_code(UtilityCode.load_cached("StopAsyncIteration", "Coroutine.c")) + code.putln("PyObject* exc_type = __Pyx_PyErr_Occurred();") + code.putln("if (unlikely(exc_type && (exc_type == __Pyx_PyExc_StopAsyncIteration || (" + " exc_type != PyExc_StopIteration && exc_type != PyExc_GeneratorExit &&" + " __Pyx_PyErr_GivenExceptionMatches(exc_type, __Pyx_PyExc_StopAsyncIteration))))) {") + code.putln("PyErr_Clear();") + code.putln("break;") + code.putln("}") + + def fetch_iteration_result(self, code): + assert code.break_label, "AwaitIterNextExprNode outside of 'async for' loop" + self._generate_break(code) + super(AwaitIterNextExprNode, self).fetch_iteration_result(code) + + def generate_sent_value_handling_code(self, code, value_cname): + assert code.break_label, "AwaitIterNextExprNode outside of 'async for' loop" + code.putln("if (unlikely(!%s)) {" % value_cname) + self._generate_break(code) + # all non-break exceptions are errors, as in parent class + code.putln(code.error_goto(self.pos)) + code.putln("}") + + +class GlobalsExprNode(AtomicExprNode): + type = dict_type + is_temp = 1 + + def analyse_types(self, env): + env.use_utility_code(Builtin.globals_utility_code) + return self + + gil_message = "Constructing globals dict" + + def may_be_none(self): + return False + + def generate_result_code(self, code): + code.putln('%s = __Pyx_Globals(); %s' % ( + self.result(), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.result()) + + +class LocalsDictItemNode(DictItemNode): + def analyse_types(self, env): + self.key = self.key.analyse_types(env) + self.value = self.value.analyse_types(env) + self.key = self.key.coerce_to_pyobject(env) + if self.value.type.can_coerce_to_pyobject(env): + self.value = self.value.coerce_to_pyobject(env) + else: + self.value = None + return self + + +class FuncLocalsExprNode(DictNode): + def __init__(self, pos, env): + local_vars = sorted([ + entry.name for entry in env.entries.values() if entry.name]) + items = [LocalsDictItemNode( + pos, key=IdentifierStringNode(pos, value=var), + value=NameNode(pos, name=var, allow_null=True)) + for var in local_vars] + DictNode.__init__(self, pos, key_value_pairs=items, + exclude_null_values=True) + + def analyse_types(self, env): + node = super(FuncLocalsExprNode, self).analyse_types(env) + node.key_value_pairs = [ i for i in node.key_value_pairs + if i.value is not None ] + return node + + +class PyClassLocalsExprNode(AtomicExprNode): + def __init__(self, pos, pyclass_dict): + AtomicExprNode.__init__(self, pos) + self.pyclass_dict = pyclass_dict + + def analyse_types(self, env): + self.type = self.pyclass_dict.type + self.is_temp = False + return self + + def may_be_none(self): + return False + + def result(self): + return self.pyclass_dict.result() + + def generate_result_code(self, code): + pass + + +def LocalsExprNode(pos, scope_node, env): + if env.is_module_scope: + return GlobalsExprNode(pos) + if env.is_py_class_scope: + return PyClassLocalsExprNode(pos, scope_node.dict) + return FuncLocalsExprNode(pos, env) + + +#------------------------------------------------------------------- +# +# Unary operator nodes +# +#------------------------------------------------------------------- + +compile_time_unary_operators = { + 'not': operator.not_, + '~': operator.inv, + '-': operator.neg, + '+': operator.pos, +} + +class UnopNode(ExprNode): + # operator string + # operand ExprNode + # + # Processing during analyse_expressions phase: + # + # analyse_c_operation + # Called when the operand is not a pyobject. + # - Check operand type and coerce if needed. + # - Determine result type and result code fragment. + # - Allocate temporary for result if needed. + + subexprs = ['operand'] + infix = True + + def calculate_constant_result(self): + func = compile_time_unary_operators[self.operator] + self.constant_result = func(self.operand.constant_result) + + def compile_time_value(self, denv): + func = compile_time_unary_operators.get(self.operator) + if not func: + error(self.pos, + "Unary '%s' not supported in compile-time expression" + % self.operator) + operand = self.operand.compile_time_value(denv) + try: + return func(operand) + except Exception as e: + self.compile_time_value_error(e) + + def infer_type(self, env): + operand_type = self.operand.infer_type(env) + if operand_type.is_cpp_class or operand_type.is_ptr: + cpp_type = operand_type.find_cpp_operation_type(self.operator) + if cpp_type is not None: + return cpp_type + return self.infer_unop_type(env, operand_type) + + def infer_unop_type(self, env, operand_type): + if operand_type.is_pyobject: + return py_object_type + else: + return operand_type + + def may_be_none(self): + if self.operand.type and self.operand.type.is_builtin_type: + if self.operand.type is not type_type: + return False + return ExprNode.may_be_none(self) + + def analyse_types(self, env): + self.operand = self.operand.analyse_types(env) + if self.is_pythran_operation(env): + self.type = PythranExpr(pythran_unaryop_type(self.operator, self.operand.type)) + self.is_temp = 1 + elif self.is_py_operation(): + self.coerce_operand_to_pyobject(env) + self.type = py_object_type + self.is_temp = 1 + elif self.is_cpp_operation(): + self.analyse_cpp_operation(env) + else: + self.analyse_c_operation(env) + return self + + def check_const(self): + return self.operand.check_const() + + def is_py_operation(self): + return self.operand.type.is_pyobject or self.operand.type.is_ctuple + + def is_pythran_operation(self, env): + np_pythran = has_np_pythran(env) + op_type = self.operand.type + return np_pythran and (op_type.is_buffer or op_type.is_pythran_expr) + + def nogil_check(self, env): + if self.is_py_operation(): + self.gil_error() + + def is_cpp_operation(self): + type = self.operand.type + return type.is_cpp_class + + def coerce_operand_to_pyobject(self, env): + self.operand = self.operand.coerce_to_pyobject(env) + + def generate_result_code(self, code): + if self.type.is_pythran_expr: + code.putln("// Pythran unaryop") + code.putln("__Pyx_call_destructor(%s);" % self.result()) + code.putln("new (&%s) decltype(%s){%s%s};" % ( + self.result(), + self.result(), + self.operator, + self.operand.pythran_result())) + elif self.operand.type.is_pyobject: + self.generate_py_operation_code(code) + elif self.is_temp: + if self.is_cpp_operation() and self.exception_check == '+': + translate_cpp_exception(code, self.pos, + "%s = %s %s;" % (self.result(), self.operator, self.operand.result()), + self.result() if self.type.is_pyobject else None, + self.exception_value, self.in_nogil_context) + else: + code.putln("%s = %s %s;" % (self.result(), self.operator, self.operand.result())) + + def generate_py_operation_code(self, code): + function = self.py_operation_function(code) + code.putln( + "%s = %s(%s); %s" % ( + self.result(), + function, + self.operand.py_result(), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + + def type_error(self): + if not self.operand.type.is_error: + error(self.pos, "Invalid operand type for '%s' (%s)" % + (self.operator, self.operand.type)) + self.type = PyrexTypes.error_type + + def analyse_cpp_operation(self, env, overload_check=True): + entry = env.lookup_operator(self.operator, [self.operand]) + if overload_check and not entry: + self.type_error() + return + if entry: + self.exception_check = entry.type.exception_check + self.exception_value = entry.type.exception_value + if self.exception_check == '+': + self.is_temp = True + if self.exception_value is None: + env.use_utility_code(UtilityCode.load_cached("CppExceptionConversion", "CppSupport.cpp")) + else: + self.exception_check = '' + self.exception_value = '' + cpp_type = self.operand.type.find_cpp_operation_type(self.operator) + if overload_check and cpp_type is None: + error(self.pos, "'%s' operator not defined for %s" % ( + self.operator, type)) + self.type_error() + return + self.type = cpp_type + + +class NotNode(UnopNode): + # 'not' operator + # + # operand ExprNode + operator = '!' + + type = PyrexTypes.c_bint_type + + def calculate_constant_result(self): + self.constant_result = not self.operand.constant_result + + def compile_time_value(self, denv): + operand = self.operand.compile_time_value(denv) + try: + return not operand + except Exception as e: + self.compile_time_value_error(e) + + def infer_unop_type(self, env, operand_type): + return PyrexTypes.c_bint_type + + def analyse_types(self, env): + self.operand = self.operand.analyse_types(env) + operand_type = self.operand.type + if operand_type.is_cpp_class: + self.analyse_cpp_operation(env) + else: + self.operand = self.operand.coerce_to_boolean(env) + return self + + def calculate_result_code(self): + return "(!%s)" % self.operand.result() + + +class UnaryPlusNode(UnopNode): + # unary '+' operator + + operator = '+' + + def analyse_c_operation(self, env): + self.type = PyrexTypes.widest_numeric_type( + self.operand.type, PyrexTypes.c_int_type) + + def py_operation_function(self, code): + return "PyNumber_Positive" + + def calculate_result_code(self): + if self.is_cpp_operation(): + return "(+%s)" % self.operand.result() + else: + return self.operand.result() + + +class UnaryMinusNode(UnopNode): + # unary '-' operator + + operator = '-' + + def analyse_c_operation(self, env): + if self.operand.type.is_numeric: + self.type = PyrexTypes.widest_numeric_type( + self.operand.type, PyrexTypes.c_int_type) + elif self.operand.type.is_enum: + self.type = PyrexTypes.c_int_type + else: + self.type_error() + if self.type.is_complex: + self.infix = False + + def py_operation_function(self, code): + return "PyNumber_Negative" + + def calculate_result_code(self): + if self.infix: + return "(-%s)" % self.operand.result() + else: + return "%s(%s)" % (self.operand.type.unary_op('-'), self.operand.result()) + + def get_constant_c_result_code(self): + value = self.operand.get_constant_c_result_code() + if value: + return "(-%s)" % value + +class TildeNode(UnopNode): + # unary '~' operator + + def analyse_c_operation(self, env): + if self.operand.type.is_int: + self.type = PyrexTypes.widest_numeric_type( + self.operand.type, PyrexTypes.c_int_type) + elif self.operand.type.is_enum: + self.type = PyrexTypes.c_int_type + else: + self.type_error() + + def py_operation_function(self, code): + return "PyNumber_Invert" + + def calculate_result_code(self): + return "(~%s)" % self.operand.result() + + +class CUnopNode(UnopNode): + + def is_py_operation(self): + return False + +class DereferenceNode(CUnopNode): + # unary * operator + + operator = '*' + + def infer_unop_type(self, env, operand_type): + if operand_type.is_ptr: + return operand_type.base_type + else: + return PyrexTypes.error_type + + def analyse_c_operation(self, env): + if self.operand.type.is_ptr: + self.type = self.operand.type.base_type + else: + self.type_error() + + def calculate_result_code(self): + return "(*%s)" % self.operand.result() + + +class DecrementIncrementNode(CUnopNode): + # unary ++/-- operator + + def analyse_c_operation(self, env): + if self.operand.type.is_numeric: + self.type = PyrexTypes.widest_numeric_type( + self.operand.type, PyrexTypes.c_int_type) + elif self.operand.type.is_ptr: + self.type = self.operand.type + else: + self.type_error() + + def calculate_result_code(self): + if self.is_prefix: + return "(%s%s)" % (self.operator, self.operand.result()) + else: + return "(%s%s)" % (self.operand.result(), self.operator) + +def inc_dec_constructor(is_prefix, operator): + return lambda pos, **kwds: DecrementIncrementNode(pos, is_prefix=is_prefix, operator=operator, **kwds) + + +class AmpersandNode(CUnopNode): + # The C address-of operator. + # + # operand ExprNode + operator = '&' + + def infer_unop_type(self, env, operand_type): + return PyrexTypes.c_ptr_type(operand_type) + + def analyse_types(self, env): + self.operand = self.operand.analyse_types(env) + argtype = self.operand.type + if argtype.is_cpp_class: + self.analyse_cpp_operation(env, overload_check=False) + if not (argtype.is_cfunction or argtype.is_reference or self.operand.is_addressable()): + if argtype.is_memoryviewslice: + self.error("Cannot take address of memoryview slice") + else: + self.error("Taking address of non-lvalue (type %s)" % argtype) + return self + if argtype.is_pyobject: + self.error("Cannot take address of Python %s" % ( + "variable '%s'" % self.operand.name if self.operand.is_name else + "object attribute '%s'" % self.operand.attribute if self.operand.is_attribute else + "object")) + return self + if not argtype.is_cpp_class or not self.type: + self.type = PyrexTypes.c_ptr_type(argtype) + return self + + def check_const(self): + return self.operand.check_const_addr() + + def error(self, mess): + error(self.pos, mess) + self.type = PyrexTypes.error_type + self.result_code = "" + + def calculate_result_code(self): + return "(&%s)" % self.operand.result() + + def generate_result_code(self, code): + if (self.operand.type.is_cpp_class and self.exception_check == '+'): + translate_cpp_exception(code, self.pos, + "%s = %s %s;" % (self.result(), self.operator, self.operand.result()), + self.result() if self.type.is_pyobject else None, + self.exception_value, self.in_nogil_context) + + +unop_node_classes = { + "+": UnaryPlusNode, + "-": UnaryMinusNode, + "~": TildeNode, +} + +def unop_node(pos, operator, operand): + # Construct unnop node of appropriate class for + # given operator. + if isinstance(operand, IntNode) and operator == '-': + return IntNode(pos = operand.pos, value = str(-Utils.str_to_number(operand.value)), + longness=operand.longness, unsigned=operand.unsigned) + elif isinstance(operand, UnopNode) and operand.operator == operator in '+-': + warning(pos, "Python has no increment/decrement operator: %s%sx == %s(%sx) == x" % ((operator,)*4), 5) + return unop_node_classes[operator](pos, + operator = operator, + operand = operand) + + +class TypecastNode(ExprNode): + # C type cast + # + # operand ExprNode + # base_type CBaseTypeNode + # declarator CDeclaratorNode + # typecheck boolean + # + # If used from a transform, one can if wanted specify the attribute + # "type" directly and leave base_type and declarator to None + + subexprs = ['operand'] + base_type = declarator = type = None + + def type_dependencies(self, env): + return () + + def infer_type(self, env): + if self.type is None: + base_type = self.base_type.analyse(env) + _, self.type = self.declarator.analyse(base_type, env) + return self.type + + def analyse_types(self, env): + if self.type is None: + base_type = self.base_type.analyse(env) + _, self.type = self.declarator.analyse(base_type, env) + if self.operand.has_constant_result(): + # Must be done after self.type is resolved. + self.calculate_constant_result() + if self.type.is_cfunction: + error(self.pos, + "Cannot cast to a function type") + self.type = PyrexTypes.error_type + self.operand = self.operand.analyse_types(env) + if self.type is PyrexTypes.c_bint_type: + # short circuit this to a coercion + return self.operand.coerce_to_boolean(env) + to_py = self.type.is_pyobject + from_py = self.operand.type.is_pyobject + if from_py and not to_py and self.operand.is_ephemeral(): + if not self.type.is_numeric and not self.type.is_cpp_class: + error(self.pos, "Casting temporary Python object to non-numeric non-Python type") + if to_py and not from_py: + if self.type is bytes_type and self.operand.type.is_int: + return CoerceIntToBytesNode(self.operand, env) + elif self.operand.type.can_coerce_to_pyobject(env): + self.result_ctype = py_object_type + self.operand = self.operand.coerce_to(self.type, env) + else: + if self.operand.type.is_ptr: + if not (self.operand.type.base_type.is_void or self.operand.type.base_type.is_struct): + error(self.pos, "Python objects cannot be cast from pointers of primitive types") + else: + # Should this be an error? + warning(self.pos, "No conversion from %s to %s, python object pointer used." % ( + self.operand.type, self.type)) + self.operand = self.operand.coerce_to_simple(env) + elif from_py and not to_py: + if self.type.create_from_py_utility_code(env): + self.operand = self.operand.coerce_to(self.type, env) + elif self.type.is_ptr: + if not (self.type.base_type.is_void or self.type.base_type.is_struct): + error(self.pos, "Python objects cannot be cast to pointers of primitive types") + else: + warning(self.pos, "No conversion from %s to %s, python object pointer used." % ( + self.type, self.operand.type)) + elif from_py and to_py: + if self.typecheck: + self.operand = PyTypeTestNode(self.operand, self.type, env, notnone=True) + elif isinstance(self.operand, SliceIndexNode): + # This cast can influence the created type of string slices. + self.operand = self.operand.coerce_to(self.type, env) + elif self.type.is_complex and self.operand.type.is_complex: + self.operand = self.operand.coerce_to_simple(env) + elif self.operand.type.is_fused: + self.operand = self.operand.coerce_to(self.type, env) + #self.type = self.operand.type + if self.type.is_ptr and self.type.base_type.is_cfunction and self.type.base_type.nogil: + op_type = self.operand.type + if op_type.is_ptr: + op_type = op_type.base_type + if op_type.is_cfunction and not op_type.nogil: + warning(self.pos, + "Casting a GIL-requiring function into a nogil function circumvents GIL validation", 1) + return self + + def is_simple(self): + # either temp or a C cast => no side effects other than the operand's + return self.operand.is_simple() + + def is_ephemeral(self): + # either temp or a C cast => no side effects other than the operand's + return self.operand.is_ephemeral() + + def nonlocally_immutable(self): + return self.is_temp or self.operand.nonlocally_immutable() + + def nogil_check(self, env): + if self.type and self.type.is_pyobject and self.is_temp: + self.gil_error() + + def check_const(self): + return self.operand.check_const() + + def calculate_constant_result(self): + self.constant_result = self.calculate_result_code(self.operand.constant_result) + + def calculate_result_code(self, operand_result = None): + if operand_result is None: + operand_result = self.operand.result() + if self.type.is_complex: + operand_result = self.operand.result() + if self.operand.type.is_complex: + real_part = self.type.real_type.cast_code("__Pyx_CREAL(%s)" % operand_result) + imag_part = self.type.real_type.cast_code("__Pyx_CIMAG(%s)" % operand_result) + else: + real_part = self.type.real_type.cast_code(operand_result) + imag_part = "0" + return "%s(%s, %s)" % ( + self.type.from_parts, + real_part, + imag_part) + else: + return self.type.cast_code(operand_result) + + def get_constant_c_result_code(self): + operand_result = self.operand.get_constant_c_result_code() + if operand_result: + return self.type.cast_code(operand_result) + + def result_as(self, type): + if self.type.is_pyobject and not self.is_temp: + # Optimise away some unnecessary casting + return self.operand.result_as(type) + else: + return ExprNode.result_as(self, type) + + def generate_result_code(self, code): + if self.is_temp: + code.putln( + "%s = (PyObject *)%s;" % ( + self.result(), + self.operand.result())) + code.put_incref(self.result(), self.ctype()) + + +ERR_START = "Start may not be given" +ERR_NOT_STOP = "Stop must be provided to indicate shape" +ERR_STEPS = ("Strides may only be given to indicate contiguity. " + "Consider slicing it after conversion") +ERR_NOT_POINTER = "Can only create cython.array from pointer or array" +ERR_BASE_TYPE = "Pointer base type does not match cython.array base type" + + +class CythonArrayNode(ExprNode): + """ + Used when a pointer of base_type is cast to a memoryviewslice with that + base type. i.e. + + p + + creates a fortran-contiguous cython.array. + + We leave the type set to object so coercions to object are more efficient + and less work. Acquiring a memoryviewslice from this will be just as + efficient. ExprNode.coerce_to() will do the additional typecheck on + self.compile_time_type + + This also handles my_c_array + + + operand ExprNode the thing we're casting + base_type_node MemoryViewSliceTypeNode the cast expression node + """ + + subexprs = ['operand', 'shapes'] + + shapes = None + is_temp = True + mode = "c" + array_dtype = None + + shape_type = PyrexTypes.c_py_ssize_t_type + + def analyse_types(self, env): + from . import MemoryView + + self.operand = self.operand.analyse_types(env) + if self.array_dtype: + array_dtype = self.array_dtype + else: + array_dtype = self.base_type_node.base_type_node.analyse(env) + axes = self.base_type_node.axes + + self.type = error_type + self.shapes = [] + ndim = len(axes) + + # Base type of the pointer or C array we are converting + base_type = self.operand.type + + if not self.operand.type.is_ptr and not self.operand.type.is_array: + error(self.operand.pos, ERR_NOT_POINTER) + return self + + # Dimension sizes of C array + array_dimension_sizes = [] + if base_type.is_array: + while base_type.is_array: + array_dimension_sizes.append(base_type.size) + base_type = base_type.base_type + elif base_type.is_ptr: + base_type = base_type.base_type + else: + error(self.pos, "unexpected base type %s found" % base_type) + return self + + if not (base_type.same_as(array_dtype) or base_type.is_void): + error(self.operand.pos, ERR_BASE_TYPE) + return self + elif self.operand.type.is_array and len(array_dimension_sizes) != ndim: + error(self.operand.pos, + "Expected %d dimensions, array has %d dimensions" % + (ndim, len(array_dimension_sizes))) + return self + + # Verify the start, stop and step values + # In case of a C array, use the size of C array in each dimension to + # get an automatic cast + for axis_no, axis in enumerate(axes): + if not axis.start.is_none: + error(axis.start.pos, ERR_START) + return self + + if axis.stop.is_none: + if array_dimension_sizes: + dimsize = array_dimension_sizes[axis_no] + axis.stop = IntNode(self.pos, value=str(dimsize), + constant_result=dimsize, + type=PyrexTypes.c_int_type) + else: + error(axis.pos, ERR_NOT_STOP) + return self + + axis.stop = axis.stop.analyse_types(env) + shape = axis.stop.coerce_to(self.shape_type, env) + if not shape.is_literal: + shape.coerce_to_temp(env) + + self.shapes.append(shape) + + first_or_last = axis_no in (0, ndim - 1) + if not axis.step.is_none and first_or_last: + # '1' in the first or last dimension denotes F or C contiguity + axis.step = axis.step.analyse_types(env) + if (not axis.step.type.is_int and axis.step.is_literal and not + axis.step.type.is_error): + error(axis.step.pos, "Expected an integer literal") + return self + + if axis.step.compile_time_value(env) != 1: + error(axis.step.pos, ERR_STEPS) + return self + + if axis_no == 0: + self.mode = "fortran" + + elif not axis.step.is_none and not first_or_last: + # step provided in some other dimension + error(axis.step.pos, ERR_STEPS) + return self + + if not self.operand.is_name: + self.operand = self.operand.coerce_to_temp(env) + + axes = [('direct', 'follow')] * len(axes) + if self.mode == "fortran": + axes[0] = ('direct', 'contig') + else: + axes[-1] = ('direct', 'contig') + + self.coercion_type = PyrexTypes.MemoryViewSliceType(array_dtype, axes) + self.coercion_type.validate_memslice_dtype(self.pos) + self.type = self.get_cython_array_type(env) + MemoryView.use_cython_array_utility_code(env) + env.use_utility_code(MemoryView.typeinfo_to_format_code) + return self + + def allocate_temp_result(self, code): + if self.temp_code: + raise RuntimeError("temp allocated multiple times") + + self.temp_code = code.funcstate.allocate_temp(self.type, True) + + def infer_type(self, env): + return self.get_cython_array_type(env) + + def get_cython_array_type(self, env): + cython_scope = env.global_scope().context.cython_scope + cython_scope.load_cythonscope() + return cython_scope.viewscope.lookup("array").type + + def generate_result_code(self, code): + from . import Buffer + + shapes = [self.shape_type.cast_code(shape.result()) + for shape in self.shapes] + dtype = self.coercion_type.dtype + + shapes_temp = code.funcstate.allocate_temp(py_object_type, True) + format_temp = code.funcstate.allocate_temp(py_object_type, True) + + itemsize = "sizeof(%s)" % dtype.empty_declaration_code() + type_info = Buffer.get_type_information_cname(code, dtype) + + if self.operand.type.is_ptr: + code.putln("if (!%s) {" % self.operand.result()) + code.putln( 'PyErr_SetString(PyExc_ValueError,' + '"Cannot create cython.array from NULL pointer");') + code.putln(code.error_goto(self.operand.pos)) + code.putln("}") + + code.putln("%s = __pyx_format_from_typeinfo(&%s); %s" % ( + format_temp, + type_info, + code.error_goto_if_null(format_temp, self.pos), + )) + code.put_gotref(format_temp) + + buildvalue_fmt = " __PYX_BUILD_PY_SSIZE_T " * len(shapes) + code.putln('%s = Py_BuildValue((char*) "(" %s ")", %s); %s' % ( + shapes_temp, + buildvalue_fmt, + ", ".join(shapes), + code.error_goto_if_null(shapes_temp, self.pos), + )) + code.put_gotref(shapes_temp) + + tup = (self.result(), shapes_temp, itemsize, format_temp, + self.mode, self.operand.result()) + code.putln('%s = __pyx_array_new(' + '%s, %s, PyBytes_AS_STRING(%s), ' + '(char *) "%s", (char *) %s);' % tup) + code.putln(code.error_goto_if_null(self.result(), self.pos)) + code.put_gotref(self.result()) + + def dispose(temp): + code.put_decref_clear(temp, py_object_type) + code.funcstate.release_temp(temp) + + dispose(shapes_temp) + dispose(format_temp) + + @classmethod + def from_carray(cls, src_node, env): + """ + Given a C array type, return a CythonArrayNode + """ + pos = src_node.pos + base_type = src_node.type + + none_node = NoneNode(pos) + axes = [] + + while base_type.is_array: + axes.append(SliceNode(pos, start=none_node, stop=none_node, + step=none_node)) + base_type = base_type.base_type + axes[-1].step = IntNode(pos, value="1", is_c_literal=True) + + memslicenode = Nodes.MemoryViewSliceTypeNode(pos, axes=axes, + base_type_node=base_type) + result = CythonArrayNode(pos, base_type_node=memslicenode, + operand=src_node, array_dtype=base_type) + result = result.analyse_types(env) + return result + +class SizeofNode(ExprNode): + # Abstract base class for sizeof(x) expression nodes. + + type = PyrexTypes.c_size_t_type + + def check_const(self): + return True + + def generate_result_code(self, code): + pass + + +class SizeofTypeNode(SizeofNode): + # C sizeof function applied to a type + # + # base_type CBaseTypeNode + # declarator CDeclaratorNode + + subexprs = [] + arg_type = None + + def analyse_types(self, env): + # we may have incorrectly interpreted a dotted name as a type rather than an attribute + # this could be better handled by more uniformly treating types as runtime-available objects + if 0 and self.base_type.module_path: + path = self.base_type.module_path + obj = env.lookup(path[0]) + if obj.as_module is None: + operand = NameNode(pos=self.pos, name=path[0]) + for attr in path[1:]: + operand = AttributeNode(pos=self.pos, obj=operand, attribute=attr) + operand = AttributeNode(pos=self.pos, obj=operand, attribute=self.base_type.name) + node = SizeofVarNode(self.pos, operand=operand).analyse_types(env) + return node + if self.arg_type is None: + base_type = self.base_type.analyse(env) + _, arg_type = self.declarator.analyse(base_type, env) + self.arg_type = arg_type + self.check_type() + return self + + def check_type(self): + arg_type = self.arg_type + if not arg_type: + return + if arg_type.is_pyobject and not arg_type.is_extension_type: + error(self.pos, "Cannot take sizeof Python object") + elif arg_type.is_void: + error(self.pos, "Cannot take sizeof void") + elif not arg_type.is_complete(): + error(self.pos, "Cannot take sizeof incomplete type '%s'" % arg_type) + + def calculate_result_code(self): + if self.arg_type.is_extension_type: + # the size of the pointer is boring + # we want the size of the actual struct + arg_code = self.arg_type.declaration_code("", deref=1) + else: + arg_code = self.arg_type.empty_declaration_code() + return "(sizeof(%s))" % arg_code + + +class SizeofVarNode(SizeofNode): + # C sizeof function applied to a variable + # + # operand ExprNode + + subexprs = ['operand'] + + def analyse_types(self, env): + # We may actually be looking at a type rather than a variable... + # If we are, traditional analysis would fail... + operand_as_type = self.operand.analyse_as_type(env) + if operand_as_type: + self.arg_type = operand_as_type + if self.arg_type.is_fused: + self.arg_type = self.arg_type.specialize(env.fused_to_specific) + self.__class__ = SizeofTypeNode + self.check_type() + else: + self.operand = self.operand.analyse_types(env) + return self + + def calculate_result_code(self): + return "(sizeof(%s))" % self.operand.result() + + def generate_result_code(self, code): + pass + + +class TypeidNode(ExprNode): + # C++ typeid operator applied to a type or variable + # + # operand ExprNode + # arg_type ExprNode + # is_variable boolean + + type = PyrexTypes.error_type + + subexprs = ['operand'] + + arg_type = None + is_variable = None + is_temp = 1 + + def get_type_info_type(self, env): + env_module = env + while not env_module.is_module_scope: + env_module = env_module.outer_scope + typeinfo_module = env_module.find_module('libcpp.typeinfo', self.pos) + typeinfo_entry = typeinfo_module.lookup('type_info') + return PyrexTypes.CFakeReferenceType(PyrexTypes.c_const_type(typeinfo_entry.type)) + + cpp_message = 'typeid operator' + + def analyse_types(self, env): + self.cpp_check(env) + type_info = self.get_type_info_type(env) + if not type_info: + self.error("The 'libcpp.typeinfo' module must be cimported to use the typeid() operator") + return self + self.type = type_info + as_type = self.operand.analyse_as_type(env) + if as_type: + self.arg_type = as_type + self.is_type = True + else: + self.arg_type = self.operand.analyse_types(env) + self.is_type = False + if self.arg_type.type.is_pyobject: + self.error("Cannot use typeid on a Python object") + return self + elif self.arg_type.type.is_void: + self.error("Cannot use typeid on void") + return self + elif not self.arg_type.type.is_complete(): + self.error("Cannot use typeid on incomplete type '%s'" % self.arg_type.type) + return self + env.use_utility_code(UtilityCode.load_cached("CppExceptionConversion", "CppSupport.cpp")) + return self + + def error(self, mess): + error(self.pos, mess) + self.type = PyrexTypes.error_type + self.result_code = "" + + def check_const(self): + return True + + def calculate_result_code(self): + return self.temp_code + + def generate_result_code(self, code): + if self.is_type: + arg_code = self.arg_type.empty_declaration_code() + else: + arg_code = self.arg_type.result() + translate_cpp_exception(code, self.pos, + "%s = typeid(%s);" % (self.temp_code, arg_code), + None, None, self.in_nogil_context) + +class TypeofNode(ExprNode): + # Compile-time type of an expression, as a string. + # + # operand ExprNode + # literal StringNode # internal + + literal = None + type = py_object_type + + subexprs = ['literal'] # 'operand' will be ignored after type analysis! + + def analyse_types(self, env): + self.operand = self.operand.analyse_types(env) + value = StringEncoding.EncodedString(str(self.operand.type)) #self.operand.type.typeof_name()) + literal = StringNode(self.pos, value=value) + literal = literal.analyse_types(env) + self.literal = literal.coerce_to_pyobject(env) + return self + + def analyse_as_type(self, env): + self.operand = self.operand.analyse_types(env) + return self.operand.type + + def may_be_none(self): + return False + + def generate_evaluation_code(self, code): + self.literal.generate_evaluation_code(code) + + def calculate_result_code(self): + return self.literal.calculate_result_code() + +#------------------------------------------------------------------- +# +# Binary operator nodes +# +#------------------------------------------------------------------- + +try: + matmul_operator = operator.matmul +except AttributeError: + def matmul_operator(a, b): + try: + func = a.__matmul__ + except AttributeError: + func = b.__rmatmul__ + return func(a, b) + +compile_time_binary_operators = { + '<': operator.lt, + '<=': operator.le, + '==': operator.eq, + '!=': operator.ne, + '>=': operator.ge, + '>': operator.gt, + 'is': operator.is_, + 'is_not': operator.is_not, + '+': operator.add, + '&': operator.and_, + '/': operator.truediv, + '//': operator.floordiv, + '<<': operator.lshift, + '%': operator.mod, + '*': operator.mul, + '|': operator.or_, + '**': operator.pow, + '>>': operator.rshift, + '-': operator.sub, + '^': operator.xor, + '@': matmul_operator, + 'in': lambda x, seq: x in seq, + 'not_in': lambda x, seq: x not in seq, +} + +def get_compile_time_binop(node): + func = compile_time_binary_operators.get(node.operator) + if not func: + error(node.pos, + "Binary '%s' not supported in compile-time expression" + % node.operator) + return func + + +class BinopNode(ExprNode): + # operator string + # operand1 ExprNode + # operand2 ExprNode + # + # Processing during analyse_expressions phase: + # + # analyse_c_operation + # Called when neither operand is a pyobject. + # - Check operand types and coerce if needed. + # - Determine result type and result code fragment. + # - Allocate temporary for result if needed. + + subexprs = ['operand1', 'operand2'] + inplace = False + + def calculate_constant_result(self): + func = compile_time_binary_operators[self.operator] + self.constant_result = func( + self.operand1.constant_result, + self.operand2.constant_result) + + def compile_time_value(self, denv): + func = get_compile_time_binop(self) + operand1 = self.operand1.compile_time_value(denv) + operand2 = self.operand2.compile_time_value(denv) + try: + return func(operand1, operand2) + except Exception as e: + self.compile_time_value_error(e) + + def infer_type(self, env): + return self.result_type(self.operand1.infer_type(env), + self.operand2.infer_type(env), env) + + def analyse_types(self, env): + self.operand1 = self.operand1.analyse_types(env) + self.operand2 = self.operand2.analyse_types(env) + self.analyse_operation(env) + return self + + def analyse_operation(self, env): + if self.is_pythran_operation(env): + self.type = self.result_type(self.operand1.type, + self.operand2.type, env) + assert self.type.is_pythran_expr + self.is_temp = 1 + elif self.is_py_operation(): + self.coerce_operands_to_pyobjects(env) + self.type = self.result_type(self.operand1.type, + self.operand2.type, env) + assert self.type.is_pyobject + self.is_temp = 1 + elif self.is_cpp_operation(): + self.analyse_cpp_operation(env) + else: + self.analyse_c_operation(env) + + def is_py_operation(self): + return self.is_py_operation_types(self.operand1.type, self.operand2.type) + + def is_py_operation_types(self, type1, type2): + return type1.is_pyobject or type2.is_pyobject or type1.is_ctuple or type2.is_ctuple + + def is_pythran_operation(self, env): + return self.is_pythran_operation_types(self.operand1.type, self.operand2.type, env) + + def is_pythran_operation_types(self, type1, type2, env): + # Support only expr op supported_type, or supported_type op expr + return has_np_pythran(env) and \ + (is_pythran_supported_operation_type(type1) and is_pythran_supported_operation_type(type2)) and \ + (is_pythran_expr(type1) or is_pythran_expr(type2)) + + def is_cpp_operation(self): + return (self.operand1.type.is_cpp_class + or self.operand2.type.is_cpp_class) + + def analyse_cpp_operation(self, env): + entry = env.lookup_operator(self.operator, [self.operand1, self.operand2]) + if not entry: + self.type_error() + return + func_type = entry.type + self.exception_check = func_type.exception_check + self.exception_value = func_type.exception_value + if self.exception_check == '+': + # Used by NumBinopNodes to break up expressions involving multiple + # operators so that exceptions can be handled properly. + self.is_temp = 1 + if self.exception_value is None: + env.use_utility_code(UtilityCode.load_cached("CppExceptionConversion", "CppSupport.cpp")) + if func_type.is_ptr: + func_type = func_type.base_type + if len(func_type.args) == 1: + self.operand2 = self.operand2.coerce_to(func_type.args[0].type, env) + else: + self.operand1 = self.operand1.coerce_to(func_type.args[0].type, env) + self.operand2 = self.operand2.coerce_to(func_type.args[1].type, env) + self.type = func_type.return_type + + def result_type(self, type1, type2, env): + if self.is_pythran_operation_types(type1, type2, env): + return PythranExpr(pythran_binop_type(self.operator, type1, type2)) + if self.is_py_operation_types(type1, type2): + if type2.is_string: + type2 = Builtin.bytes_type + elif type2.is_pyunicode_ptr: + type2 = Builtin.unicode_type + if type1.is_string: + type1 = Builtin.bytes_type + elif type1.is_pyunicode_ptr: + type1 = Builtin.unicode_type + if type1.is_builtin_type or type2.is_builtin_type: + if type1 is type2 and self.operator in '**%+|&^': + # FIXME: at least these operators should be safe - others? + return type1 + result_type = self.infer_builtin_types_operation(type1, type2) + if result_type is not None: + return result_type + return py_object_type + elif type1.is_error or type2.is_error: + return PyrexTypes.error_type + else: + return self.compute_c_result_type(type1, type2) + + def infer_builtin_types_operation(self, type1, type2): + return None + + def nogil_check(self, env): + if self.is_py_operation(): + self.gil_error() + + def coerce_operands_to_pyobjects(self, env): + self.operand1 = self.operand1.coerce_to_pyobject(env) + self.operand2 = self.operand2.coerce_to_pyobject(env) + + def check_const(self): + return self.operand1.check_const() and self.operand2.check_const() + + def is_ephemeral(self): + return (super(BinopNode, self).is_ephemeral() or + self.operand1.is_ephemeral() or self.operand2.is_ephemeral()) + + def generate_result_code(self, code): + if self.type.is_pythran_expr: + code.putln("// Pythran binop") + code.putln("__Pyx_call_destructor(%s);" % self.result()) + if self.operator == '**': + code.putln("new (&%s) decltype(%s){pythonic::numpy::functor::power{}(%s, %s)};" % ( + self.result(), + self.result(), + self.operand1.pythran_result(), + self.operand2.pythran_result())) + else: + code.putln("new (&%s) decltype(%s){%s %s %s};" % ( + self.result(), + self.result(), + self.operand1.pythran_result(), + self.operator, + self.operand2.pythran_result())) + elif self.operand1.type.is_pyobject: + function = self.py_operation_function(code) + if self.operator == '**': + extra_args = ", Py_None" + else: + extra_args = "" + code.putln( + "%s = %s(%s, %s%s); %s" % ( + self.result(), + function, + self.operand1.py_result(), + self.operand2.py_result(), + extra_args, + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.py_result()) + elif self.is_temp: + # C++ overloaded operators with exception values are currently all + # handled through temporaries. + if self.is_cpp_operation() and self.exception_check == '+': + translate_cpp_exception(code, self.pos, + "%s = %s;" % (self.result(), self.calculate_result_code()), + self.result() if self.type.is_pyobject else None, + self.exception_value, self.in_nogil_context) + else: + code.putln("%s = %s;" % (self.result(), self.calculate_result_code())) + + def type_error(self): + if not (self.operand1.type.is_error + or self.operand2.type.is_error): + error(self.pos, "Invalid operand types for '%s' (%s; %s)" % + (self.operator, self.operand1.type, + self.operand2.type)) + self.type = PyrexTypes.error_type + + +class CBinopNode(BinopNode): + + def analyse_types(self, env): + node = BinopNode.analyse_types(self, env) + if node.is_py_operation(): + node.type = PyrexTypes.error_type + return node + + def py_operation_function(self, code): + return "" + + def calculate_result_code(self): + return "(%s %s %s)" % ( + self.operand1.result(), + self.operator, + self.operand2.result()) + + def compute_c_result_type(self, type1, type2): + cpp_type = None + if type1.is_cpp_class or type1.is_ptr: + cpp_type = type1.find_cpp_operation_type(self.operator, type2) + if cpp_type is None and (type2.is_cpp_class or type2.is_ptr): + cpp_type = type2.find_cpp_operation_type(self.operator, type1) + # FIXME: do we need to handle other cases here? + return cpp_type + + +def c_binop_constructor(operator): + def make_binop_node(pos, **operands): + return CBinopNode(pos, operator=operator, **operands) + return make_binop_node + +class NumBinopNode(BinopNode): + # Binary operation taking numeric arguments. + + infix = True + overflow_check = False + overflow_bit_node = None + + def analyse_c_operation(self, env): + type1 = self.operand1.type + type2 = self.operand2.type + self.type = self.compute_c_result_type(type1, type2) + if not self.type: + self.type_error() + return + if self.type.is_complex: + self.infix = False + if (self.type.is_int + and env.directives['overflowcheck'] + and self.operator in self.overflow_op_names): + if (self.operator in ('+', '*') + and self.operand1.has_constant_result() + and not self.operand2.has_constant_result()): + self.operand1, self.operand2 = self.operand2, self.operand1 + self.overflow_check = True + self.overflow_fold = env.directives['overflowcheck.fold'] + self.func = self.type.overflow_check_binop( + self.overflow_op_names[self.operator], + env, + const_rhs = self.operand2.has_constant_result()) + self.is_temp = True + if not self.infix or (type1.is_numeric and type2.is_numeric): + self.operand1 = self.operand1.coerce_to(self.type, env) + self.operand2 = self.operand2.coerce_to(self.type, env) + + def compute_c_result_type(self, type1, type2): + if self.c_types_okay(type1, type2): + widest_type = PyrexTypes.widest_numeric_type(type1, type2) + if widest_type is PyrexTypes.c_bint_type: + if self.operator not in '|^&': + # False + False == 0 # not False! + widest_type = PyrexTypes.c_int_type + else: + widest_type = PyrexTypes.widest_numeric_type( + widest_type, PyrexTypes.c_int_type) + return widest_type + else: + return None + + def may_be_none(self): + if self.type and self.type.is_builtin_type: + # if we know the result type, we know the operation, so it can't be None + return False + type1 = self.operand1.type + type2 = self.operand2.type + if type1 and type1.is_builtin_type and type2 and type2.is_builtin_type: + # XXX: I can't think of any case where a binary operation + # on builtin types evaluates to None - add a special case + # here if there is one. + return False + return super(NumBinopNode, self).may_be_none() + + def get_constant_c_result_code(self): + value1 = self.operand1.get_constant_c_result_code() + value2 = self.operand2.get_constant_c_result_code() + if value1 and value2: + return "(%s %s %s)" % (value1, self.operator, value2) + else: + return None + + def c_types_okay(self, type1, type2): + #print "NumBinopNode.c_types_okay:", type1, type2 ### + return (type1.is_numeric or type1.is_enum) \ + and (type2.is_numeric or type2.is_enum) + + def generate_evaluation_code(self, code): + if self.overflow_check: + self.overflow_bit_node = self + self.overflow_bit = code.funcstate.allocate_temp(PyrexTypes.c_int_type, manage_ref=False) + code.putln("%s = 0;" % self.overflow_bit) + super(NumBinopNode, self).generate_evaluation_code(code) + if self.overflow_check: + code.putln("if (unlikely(%s)) {" % self.overflow_bit) + code.putln('PyErr_SetString(PyExc_OverflowError, "value too large");') + code.putln(code.error_goto(self.pos)) + code.putln("}") + code.funcstate.release_temp(self.overflow_bit) + + def calculate_result_code(self): + if self.overflow_bit_node is not None: + return "%s(%s, %s, &%s)" % ( + self.func, + self.operand1.result(), + self.operand2.result(), + self.overflow_bit_node.overflow_bit) + elif self.type.is_cpp_class or self.infix: + if is_pythran_expr(self.type): + result1, result2 = self.operand1.pythran_result(), self.operand2.pythran_result() + else: + result1, result2 = self.operand1.result(), self.operand2.result() + return "(%s %s %s)" % (result1, self.operator, result2) + else: + func = self.type.binary_op(self.operator) + if func is None: + error(self.pos, "binary operator %s not supported for %s" % (self.operator, self.type)) + return "%s(%s, %s)" % ( + func, + self.operand1.result(), + self.operand2.result()) + + def is_py_operation_types(self, type1, type2): + return (type1.is_unicode_char or + type2.is_unicode_char or + BinopNode.is_py_operation_types(self, type1, type2)) + + def py_operation_function(self, code): + function_name = self.py_functions[self.operator] + if self.inplace: + function_name = function_name.replace('PyNumber_', 'PyNumber_InPlace') + return function_name + + py_functions = { + "|": "PyNumber_Or", + "^": "PyNumber_Xor", + "&": "PyNumber_And", + "<<": "PyNumber_Lshift", + ">>": "PyNumber_Rshift", + "+": "PyNumber_Add", + "-": "PyNumber_Subtract", + "*": "PyNumber_Multiply", + "@": "__Pyx_PyNumber_MatrixMultiply", + "/": "__Pyx_PyNumber_Divide", + "//": "PyNumber_FloorDivide", + "%": "PyNumber_Remainder", + "**": "PyNumber_Power", + } + + overflow_op_names = { + "+": "add", + "-": "sub", + "*": "mul", + "<<": "lshift", + } + + +class IntBinopNode(NumBinopNode): + # Binary operation taking integer arguments. + + def c_types_okay(self, type1, type2): + #print "IntBinopNode.c_types_okay:", type1, type2 ### + return (type1.is_int or type1.is_enum) \ + and (type2.is_int or type2.is_enum) + + +class AddNode(NumBinopNode): + # '+' operator. + + def is_py_operation_types(self, type1, type2): + if type1.is_string and type2.is_string or type1.is_pyunicode_ptr and type2.is_pyunicode_ptr: + return 1 + else: + return NumBinopNode.is_py_operation_types(self, type1, type2) + + def infer_builtin_types_operation(self, type1, type2): + # b'abc' + 'abc' raises an exception in Py3, + # so we can safely infer the Py2 type for bytes here + string_types = (bytes_type, bytearray_type, str_type, basestring_type, unicode_type) + if type1 in string_types and type2 in string_types: + return string_types[max(string_types.index(type1), + string_types.index(type2))] + return None + + def compute_c_result_type(self, type1, type2): + #print "AddNode.compute_c_result_type:", type1, self.operator, type2 ### + if (type1.is_ptr or type1.is_array) and (type2.is_int or type2.is_enum): + return type1 + elif (type2.is_ptr or type2.is_array) and (type1.is_int or type1.is_enum): + return type2 + else: + return NumBinopNode.compute_c_result_type( + self, type1, type2) + + def py_operation_function(self, code): + type1, type2 = self.operand1.type, self.operand2.type + + if type1 is unicode_type or type2 is unicode_type: + if type1 in (unicode_type, str_type) and type2 in (unicode_type, str_type): + is_unicode_concat = True + elif isinstance(self.operand1, FormattedValueNode) or isinstance(self.operand2, FormattedValueNode): + # Assume that even if we don't know the second type, it's going to be a string. + is_unicode_concat = True + else: + # Operation depends on the second type. + is_unicode_concat = False + + if is_unicode_concat: + if self.operand1.may_be_none() or self.operand2.may_be_none(): + return '__Pyx_PyUnicode_ConcatSafe' + else: + return '__Pyx_PyUnicode_Concat' + + return super(AddNode, self).py_operation_function(code) + + +class SubNode(NumBinopNode): + # '-' operator. + + def compute_c_result_type(self, type1, type2): + if (type1.is_ptr or type1.is_array) and (type2.is_int or type2.is_enum): + return type1 + elif (type1.is_ptr or type1.is_array) and (type2.is_ptr or type2.is_array): + return PyrexTypes.c_ptrdiff_t_type + else: + return NumBinopNode.compute_c_result_type( + self, type1, type2) + + +class MulNode(NumBinopNode): + # '*' operator. + + def is_py_operation_types(self, type1, type2): + if ((type1.is_string and type2.is_int) or + (type2.is_string and type1.is_int)): + return 1 + else: + return NumBinopNode.is_py_operation_types(self, type1, type2) + + def infer_builtin_types_operation(self, type1, type2): + # let's assume that whatever builtin type you multiply a string with + # will either return a string of the same type or fail with an exception + string_types = (bytes_type, bytearray_type, str_type, basestring_type, unicode_type) + if type1 in string_types and type2.is_builtin_type: + return type1 + if type2 in string_types and type1.is_builtin_type: + return type2 + # multiplication of containers/numbers with an integer value + # always (?) returns the same type + if type1.is_int: + return type2 + if type2.is_int: + return type1 + return None + + +class MatMultNode(NumBinopNode): + # '@' operator. + + def is_py_operation_types(self, type1, type2): + return True + + def generate_evaluation_code(self, code): + code.globalstate.use_utility_code(UtilityCode.load_cached("MatrixMultiply", "ObjectHandling.c")) + super(MatMultNode, self).generate_evaluation_code(code) + + +class DivNode(NumBinopNode): + # '/' or '//' operator. + + cdivision = None + truedivision = None # == "unknown" if operator == '/' + ctruedivision = False + cdivision_warnings = False + zerodivision_check = None + + def find_compile_time_binary_operator(self, op1, op2): + func = compile_time_binary_operators[self.operator] + if self.operator == '/' and self.truedivision is None: + # => true div for floats, floor div for integers + if isinstance(op1, _py_int_types) and isinstance(op2, _py_int_types): + func = compile_time_binary_operators['//'] + return func + + def calculate_constant_result(self): + op1 = self.operand1.constant_result + op2 = self.operand2.constant_result + func = self.find_compile_time_binary_operator(op1, op2) + self.constant_result = func( + self.operand1.constant_result, + self.operand2.constant_result) + + def compile_time_value(self, denv): + operand1 = self.operand1.compile_time_value(denv) + operand2 = self.operand2.compile_time_value(denv) + try: + func = self.find_compile_time_binary_operator( + operand1, operand2) + return func(operand1, operand2) + except Exception as e: + self.compile_time_value_error(e) + + def _check_truedivision(self, env): + if self.cdivision or env.directives['cdivision']: + self.ctruedivision = False + else: + self.ctruedivision = self.truedivision + + def infer_type(self, env): + self._check_truedivision(env) + return self.result_type( + self.operand1.infer_type(env), + self.operand2.infer_type(env), env) + + def analyse_operation(self, env): + self._check_truedivision(env) + NumBinopNode.analyse_operation(self, env) + if self.is_cpp_operation(): + self.cdivision = True + if not self.type.is_pyobject: + self.zerodivision_check = ( + self.cdivision is None and not env.directives['cdivision'] + and (not self.operand2.has_constant_result() or + self.operand2.constant_result == 0)) + if self.zerodivision_check or env.directives['cdivision_warnings']: + # Need to check ahead of time to warn or raise zero division error + self.operand1 = self.operand1.coerce_to_simple(env) + self.operand2 = self.operand2.coerce_to_simple(env) + + def compute_c_result_type(self, type1, type2): + if self.operator == '/' and self.ctruedivision and not type1.is_cpp_class and not type2.is_cpp_class: + if not type1.is_float and not type2.is_float: + widest_type = PyrexTypes.widest_numeric_type(type1, PyrexTypes.c_double_type) + widest_type = PyrexTypes.widest_numeric_type(type2, widest_type) + return widest_type + return NumBinopNode.compute_c_result_type(self, type1, type2) + + def zero_division_message(self): + if self.type.is_int: + return "integer division or modulo by zero" + else: + return "float division" + + def generate_evaluation_code(self, code): + if not self.type.is_pyobject and not self.type.is_complex: + if self.cdivision is None: + self.cdivision = ( + code.globalstate.directives['cdivision'] + or self.type.is_float + or ((self.type.is_numeric or self.type.is_enum) and not self.type.signed) + ) + if not self.cdivision: + code.globalstate.use_utility_code( + UtilityCode.load_cached("DivInt", "CMath.c").specialize(self.type)) + NumBinopNode.generate_evaluation_code(self, code) + self.generate_div_warning_code(code) + + def generate_div_warning_code(self, code): + in_nogil = self.in_nogil_context + if not self.type.is_pyobject: + if self.zerodivision_check: + if not self.infix: + zero_test = "%s(%s)" % (self.type.unary_op('zero'), self.operand2.result()) + else: + zero_test = "%s == 0" % self.operand2.result() + code.putln("if (unlikely(%s)) {" % zero_test) + if in_nogil: + code.put_ensure_gil() + code.putln('PyErr_SetString(PyExc_ZeroDivisionError, "%s");' % self.zero_division_message()) + if in_nogil: + code.put_release_ensured_gil() + code.putln(code.error_goto(self.pos)) + code.putln("}") + if self.type.is_int and self.type.signed and self.operator != '%': + code.globalstate.use_utility_code(UtilityCode.load_cached("UnaryNegOverflows", "Overflow.c")) + if self.operand2.type.signed == 2: + # explicitly signed, no runtime check needed + minus1_check = 'unlikely(%s == -1)' % self.operand2.result() + else: + type_of_op2 = self.operand2.type.empty_declaration_code() + minus1_check = '(!(((%s)-1) > 0)) && unlikely(%s == (%s)-1)' % ( + type_of_op2, self.operand2.result(), type_of_op2) + code.putln("else if (sizeof(%s) == sizeof(long) && %s " + " && unlikely(UNARY_NEG_WOULD_OVERFLOW(%s))) {" % ( + self.type.empty_declaration_code(), + minus1_check, + self.operand1.result())) + if in_nogil: + code.put_ensure_gil() + code.putln('PyErr_SetString(PyExc_OverflowError, "value too large to perform division");') + if in_nogil: + code.put_release_ensured_gil() + code.putln(code.error_goto(self.pos)) + code.putln("}") + if code.globalstate.directives['cdivision_warnings'] and self.operator != '/': + code.globalstate.use_utility_code( + UtilityCode.load_cached("CDivisionWarning", "CMath.c")) + code.putln("if (unlikely((%s < 0) ^ (%s < 0))) {" % ( + self.operand1.result(), + self.operand2.result())) + warning_code = "__Pyx_cdivision_warning(%(FILENAME)s, %(LINENO)s)" % { + 'FILENAME': Naming.filename_cname, + 'LINENO': Naming.lineno_cname, + } + + if in_nogil: + result_code = 'result' + code.putln("int %s;" % result_code) + code.put_ensure_gil() + code.putln(code.set_error_info(self.pos, used=True)) + code.putln("%s = %s;" % (result_code, warning_code)) + code.put_release_ensured_gil() + else: + result_code = warning_code + code.putln(code.set_error_info(self.pos, used=True)) + + code.put("if (unlikely(%s)) " % result_code) + code.put_goto(code.error_label) + code.putln("}") + + def calculate_result_code(self): + if self.type.is_complex or self.is_cpp_operation(): + return NumBinopNode.calculate_result_code(self) + elif self.type.is_float and self.operator == '//': + return "floor(%s / %s)" % ( + self.operand1.result(), + self.operand2.result()) + elif self.truedivision or self.cdivision: + op1 = self.operand1.result() + op2 = self.operand2.result() + if self.truedivision: + if self.type != self.operand1.type: + op1 = self.type.cast_code(op1) + if self.type != self.operand2.type: + op2 = self.type.cast_code(op2) + return "(%s / %s)" % (op1, op2) + else: + return "__Pyx_div_%s(%s, %s)" % ( + self.type.specialization_name(), + self.operand1.result(), + self.operand2.result()) + + +_find_formatting_types = re.compile( + br"%" + br"(?:%|" # %% + br"(?:\([^)]+\))?" # %(name) + br"[-+#,0-9 ]*([a-z])" # %.2f etc. + br")").findall + +# These format conversion types can never trigger a Unicode string conversion in Py2. +_safe_bytes_formats = set([ + # Excludes 's' and 'r', which can generate non-bytes strings. + b'd', b'i', b'o', b'u', b'x', b'X', b'e', b'E', b'f', b'F', b'g', b'G', b'c', b'b', b'a', +]) + + +class ModNode(DivNode): + # '%' operator. + + def is_py_operation_types(self, type1, type2): + return (type1.is_string + or type2.is_string + or NumBinopNode.is_py_operation_types(self, type1, type2)) + + def infer_builtin_types_operation(self, type1, type2): + # b'%s' % xyz raises an exception in Py3<3.5, so it's safe to infer the type for Py2 and later Py3's. + if type1 is unicode_type: + # None + xyz may be implemented by RHS + if type2.is_builtin_type or not self.operand1.may_be_none(): + return type1 + elif type1 in (bytes_type, str_type, basestring_type): + if type2 is unicode_type: + return type2 + elif type2.is_numeric: + return type1 + elif self.operand1.is_string_literal: + if type1 is str_type or type1 is bytes_type: + if set(_find_formatting_types(self.operand1.value)) <= _safe_bytes_formats: + return type1 + return basestring_type + elif type1 is bytes_type and not type2.is_builtin_type: + return None # RHS might implement '% operator differently in Py3 + else: + return basestring_type # either str or unicode, can't tell + return None + + def zero_division_message(self): + if self.type.is_int: + return "integer division or modulo by zero" + else: + return "float divmod()" + + def analyse_operation(self, env): + DivNode.analyse_operation(self, env) + if not self.type.is_pyobject: + if self.cdivision is None: + self.cdivision = env.directives['cdivision'] or not self.type.signed + if not self.cdivision and not self.type.is_int and not self.type.is_float: + error(self.pos, "mod operator not supported for type '%s'" % self.type) + + def generate_evaluation_code(self, code): + if not self.type.is_pyobject and not self.cdivision: + if self.type.is_int: + code.globalstate.use_utility_code( + UtilityCode.load_cached("ModInt", "CMath.c").specialize(self.type)) + else: # float + code.globalstate.use_utility_code( + UtilityCode.load_cached("ModFloat", "CMath.c").specialize( + self.type, math_h_modifier=self.type.math_h_modifier)) + # NOTE: skipping over DivNode here + NumBinopNode.generate_evaluation_code(self, code) + self.generate_div_warning_code(code) + + def calculate_result_code(self): + if self.cdivision: + if self.type.is_float: + return "fmod%s(%s, %s)" % ( + self.type.math_h_modifier, + self.operand1.result(), + self.operand2.result()) + else: + return "(%s %% %s)" % ( + self.operand1.result(), + self.operand2.result()) + else: + return "__Pyx_mod_%s(%s, %s)" % ( + self.type.specialization_name(), + self.operand1.result(), + self.operand2.result()) + + def py_operation_function(self, code): + type1, type2 = self.operand1.type, self.operand2.type + # ("..." % x) must call "x.__rmod__()" for string subtypes. + if type1 is unicode_type: + if self.operand1.may_be_none() or ( + type2.is_extension_type and type2.subtype_of(type1) or + type2 is py_object_type and not isinstance(self.operand2, CoerceToPyTypeNode)): + return '__Pyx_PyUnicode_FormatSafe' + else: + return 'PyUnicode_Format' + elif type1 is str_type: + if self.operand1.may_be_none() or ( + type2.is_extension_type and type2.subtype_of(type1) or + type2 is py_object_type and not isinstance(self.operand2, CoerceToPyTypeNode)): + return '__Pyx_PyString_FormatSafe' + else: + return '__Pyx_PyString_Format' + return super(ModNode, self).py_operation_function(code) + + +class PowNode(NumBinopNode): + # '**' operator. + + def analyse_c_operation(self, env): + NumBinopNode.analyse_c_operation(self, env) + if self.type.is_complex: + if self.type.real_type.is_float: + self.operand1 = self.operand1.coerce_to(self.type, env) + self.operand2 = self.operand2.coerce_to(self.type, env) + self.pow_func = self.type.binary_op('**') + else: + error(self.pos, "complex int powers not supported") + self.pow_func = "" + elif self.type.is_float: + self.pow_func = "pow" + self.type.math_h_modifier + elif self.type.is_int: + self.pow_func = "__Pyx_pow_%s" % self.type.empty_declaration_code().replace(' ', '_') + env.use_utility_code( + UtilityCode.load_cached("IntPow", "CMath.c").specialize( + func_name=self.pow_func, + type=self.type.empty_declaration_code(), + signed=self.type.signed and 1 or 0)) + elif not self.type.is_error: + error(self.pos, "got unexpected types for C power operator: %s, %s" % + (self.operand1.type, self.operand2.type)) + + def calculate_result_code(self): + # Work around MSVC overloading ambiguity. + def typecast(operand): + if self.type == operand.type: + return operand.result() + else: + return self.type.cast_code(operand.result()) + return "%s(%s, %s)" % ( + self.pow_func, + typecast(self.operand1), + typecast(self.operand2)) + + def py_operation_function(self, code): + if (self.type.is_pyobject and + self.operand1.constant_result == 2 and + isinstance(self.operand1.constant_result, _py_int_types) and + self.operand2.type is py_object_type): + code.globalstate.use_utility_code(UtilityCode.load_cached('PyNumberPow2', 'Optimize.c')) + if self.inplace: + return '__Pyx_PyNumber_InPlacePowerOf2' + else: + return '__Pyx_PyNumber_PowerOf2' + return super(PowNode, self).py_operation_function(code) + + +class BoolBinopNode(ExprNode): + """ + Short-circuiting boolean operation. + + Note that this node provides the same code generation method as + BoolBinopResultNode to simplify expression nesting. + + operator string "and"/"or" + operand1 BoolBinopNode/BoolBinopResultNode left operand + operand2 BoolBinopNode/BoolBinopResultNode right operand + """ + subexprs = ['operand1', 'operand2'] + is_temp = True + operator = None + operand1 = None + operand2 = None + + def infer_type(self, env): + type1 = self.operand1.infer_type(env) + type2 = self.operand2.infer_type(env) + return PyrexTypes.independent_spanning_type(type1, type2) + + def may_be_none(self): + if self.operator == 'or': + return self.operand2.may_be_none() + else: + return self.operand1.may_be_none() or self.operand2.may_be_none() + + def calculate_constant_result(self): + operand1 = self.operand1.constant_result + operand2 = self.operand2.constant_result + if self.operator == 'and': + self.constant_result = operand1 and operand2 + else: + self.constant_result = operand1 or operand2 + + def compile_time_value(self, denv): + operand1 = self.operand1.compile_time_value(denv) + operand2 = self.operand2.compile_time_value(denv) + if self.operator == 'and': + return operand1 and operand2 + else: + return operand1 or operand2 + + def is_ephemeral(self): + return self.operand1.is_ephemeral() or self.operand2.is_ephemeral() + + def analyse_types(self, env): + # Note: we do not do any coercion here as we most likely do not know the final type anyway. + # We even accept to set self.type to ErrorType if both operands do not have a spanning type. + # The coercion to the final type and to a "simple" value is left to coerce_to(). + operand1 = self.operand1.analyse_types(env) + operand2 = self.operand2.analyse_types(env) + self.type = PyrexTypes.independent_spanning_type( + operand1.type, operand2.type) + self.operand1 = self._wrap_operand(operand1, env) + self.operand2 = self._wrap_operand(operand2, env) + return self + + def _wrap_operand(self, operand, env): + if not isinstance(operand, (BoolBinopNode, BoolBinopResultNode)): + operand = BoolBinopResultNode(operand, self.type, env) + return operand + + def wrap_operands(self, env): + """ + Must get called by transforms that want to create a correct BoolBinopNode + after the type analysis phase. + """ + self.operand1 = self._wrap_operand(self.operand1, env) + self.operand2 = self._wrap_operand(self.operand2, env) + + def coerce_to_boolean(self, env): + return self.coerce_to(PyrexTypes.c_bint_type, env) + + def coerce_to(self, dst_type, env): + operand1 = self.operand1.coerce_to(dst_type, env) + operand2 = self.operand2.coerce_to(dst_type, env) + return BoolBinopNode.from_node( + self, type=dst_type, + operator=self.operator, + operand1=operand1, operand2=operand2) + + def generate_bool_evaluation_code(self, code, final_result_temp, final_result_type, and_label, or_label, end_label, fall_through): + code.mark_pos(self.pos) + + outer_labels = (and_label, or_label) + if self.operator == 'and': + my_label = and_label = code.new_label('next_and') + else: + my_label = or_label = code.new_label('next_or') + self.operand1.generate_bool_evaluation_code( + code, final_result_temp, final_result_type, and_label, or_label, end_label, my_label) + + and_label, or_label = outer_labels + + code.put_label(my_label) + self.operand2.generate_bool_evaluation_code( + code, final_result_temp, final_result_type, and_label, or_label, end_label, fall_through) + + def generate_evaluation_code(self, code): + self.allocate_temp_result(code) + result_type = PyrexTypes.py_object_type if self.type.is_pyobject else self.type + or_label = and_label = None + end_label = code.new_label('bool_binop_done') + self.generate_bool_evaluation_code(code, self.result(), result_type, and_label, or_label, end_label, end_label) + code.put_label(end_label) + + gil_message = "Truth-testing Python object" + + def check_const(self): + return self.operand1.check_const() and self.operand2.check_const() + + def generate_subexpr_disposal_code(self, code): + pass # nothing to do here, all done in generate_evaluation_code() + + def free_subexpr_temps(self, code): + pass # nothing to do here, all done in generate_evaluation_code() + + def generate_operand1_test(self, code): + # Generate code to test the truth of the first operand. + if self.type.is_pyobject: + test_result = code.funcstate.allocate_temp( + PyrexTypes.c_bint_type, manage_ref=False) + code.putln( + "%s = __Pyx_PyObject_IsTrue(%s); %s" % ( + test_result, + self.operand1.py_result(), + code.error_goto_if_neg(test_result, self.pos))) + else: + test_result = self.operand1.result() + return (test_result, self.type.is_pyobject) + + +class BoolBinopResultNode(ExprNode): + """ + Intermediate result of a short-circuiting and/or expression. + Tests the result for 'truthiness' and takes care of coercing the final result + of the overall expression to the target type. + + Note that this node provides the same code generation method as + BoolBinopNode to simplify expression nesting. + + arg ExprNode the argument to test + value ExprNode the coerced result value node + """ + + subexprs = ['arg', 'value'] + is_temp = True + arg = None + value = None + + def __init__(self, arg, result_type, env): + # using 'arg' multiple times, so it must be a simple/temp value + arg = arg.coerce_to_simple(env) + # wrap in ProxyNode, in case a transform wants to replace self.arg later + arg = ProxyNode(arg) + super(BoolBinopResultNode, self).__init__( + arg.pos, arg=arg, type=result_type, + value=CloneNode(arg).coerce_to(result_type, env)) + + def coerce_to_boolean(self, env): + return self.coerce_to(PyrexTypes.c_bint_type, env) + + def coerce_to(self, dst_type, env): + # unwrap, coerce, rewrap + arg = self.arg.arg + if dst_type is PyrexTypes.c_bint_type: + arg = arg.coerce_to_boolean(env) + # TODO: unwrap more coercion nodes? + return BoolBinopResultNode(arg, dst_type, env) + + def nogil_check(self, env): + # let's leave all errors to BoolBinopNode + pass + + def generate_operand_test(self, code): + # Generate code to test the truth of the first operand. + if self.arg.type.is_pyobject: + test_result = code.funcstate.allocate_temp( + PyrexTypes.c_bint_type, manage_ref=False) + code.putln( + "%s = __Pyx_PyObject_IsTrue(%s); %s" % ( + test_result, + self.arg.py_result(), + code.error_goto_if_neg(test_result, self.pos))) + else: + test_result = self.arg.result() + return (test_result, self.arg.type.is_pyobject) + + def generate_bool_evaluation_code(self, code, final_result_temp, final_result_type, and_label, or_label, end_label, fall_through): + code.mark_pos(self.pos) + + # x => x + # x and ... or ... => next 'and' / 'or' + # False ... or x => next 'or' + # True and x => next 'and' + # True or x => True (operand) + + self.arg.generate_evaluation_code(code) + if and_label or or_label: + test_result, uses_temp = self.generate_operand_test(code) + if uses_temp and (and_label and or_label): + # cannot become final result => free early + # disposal: uses_temp and (and_label and or_label) + self.arg.generate_disposal_code(code) + sense = '!' if or_label else '' + code.putln("if (%s%s) {" % (sense, test_result)) + if uses_temp: + code.funcstate.release_temp(test_result) + if not uses_temp or not (and_label and or_label): + # disposal: (not uses_temp) or {not (and_label and or_label) [if]} + self.arg.generate_disposal_code(code) + + if or_label and or_label != fall_through: + # value is false => short-circuit to next 'or' + code.put_goto(or_label) + if and_label: + # value is true => go to next 'and' + if or_label: + code.putln("} else {") + if not uses_temp: + # disposal: (not uses_temp) and {(and_label and or_label) [else]} + self.arg.generate_disposal_code(code) + if and_label != fall_through: + code.put_goto(and_label) + + if not and_label or not or_label: + # if no next 'and' or 'or', we provide the result + if and_label or or_label: + code.putln("} else {") + self.value.generate_evaluation_code(code) + self.value.make_owned_reference(code) + code.putln("%s = %s;" % (final_result_temp, self.value.result_as(final_result_type))) + self.value.generate_post_assignment_code(code) + # disposal: {not (and_label and or_label) [else]} + self.arg.generate_disposal_code(code) + self.value.free_temps(code) + if end_label != fall_through: + code.put_goto(end_label) + + if and_label or or_label: + code.putln("}") + self.arg.free_temps(code) + + +class CondExprNode(ExprNode): + # Short-circuiting conditional expression. + # + # test ExprNode + # true_val ExprNode + # false_val ExprNode + + true_val = None + false_val = None + is_temp = True + + subexprs = ['test', 'true_val', 'false_val'] + + def type_dependencies(self, env): + return self.true_val.type_dependencies(env) + self.false_val.type_dependencies(env) + + def infer_type(self, env): + return PyrexTypes.independent_spanning_type( + self.true_val.infer_type(env), + self.false_val.infer_type(env)) + + def calculate_constant_result(self): + if self.test.constant_result: + self.constant_result = self.true_val.constant_result + else: + self.constant_result = self.false_val.constant_result + + def is_ephemeral(self): + return self.true_val.is_ephemeral() or self.false_val.is_ephemeral() + + def analyse_types(self, env): + self.test = self.test.analyse_types(env).coerce_to_boolean(env) + self.true_val = self.true_val.analyse_types(env) + self.false_val = self.false_val.analyse_types(env) + return self.analyse_result_type(env) + + def analyse_result_type(self, env): + self.type = PyrexTypes.independent_spanning_type( + self.true_val.type, self.false_val.type) + if self.type.is_reference: + self.type = PyrexTypes.CFakeReferenceType(self.type.ref_base_type) + if self.type.is_pyobject: + self.result_ctype = py_object_type + elif self.true_val.is_ephemeral() or self.false_val.is_ephemeral(): + error(self.pos, "Unsafe C derivative of temporary Python reference used in conditional expression") + if self.true_val.type.is_pyobject or self.false_val.type.is_pyobject: + self.true_val = self.true_val.coerce_to(self.type, env) + self.false_val = self.false_val.coerce_to(self.type, env) + if self.type.is_error: + self.type_error() + return self + + def coerce_to_integer(self, env): + self.true_val = self.true_val.coerce_to_integer(env) + self.false_val = self.false_val.coerce_to_integer(env) + self.result_ctype = None + return self.analyse_result_type(env) + + def coerce_to(self, dst_type, env): + self.true_val = self.true_val.coerce_to(dst_type, env) + self.false_val = self.false_val.coerce_to(dst_type, env) + self.result_ctype = None + return self.analyse_result_type(env) + + def type_error(self): + if not (self.true_val.type.is_error or self.false_val.type.is_error): + error(self.pos, "Incompatible types in conditional expression (%s; %s)" % + (self.true_val.type, self.false_val.type)) + self.type = PyrexTypes.error_type + + def check_const(self): + return (self.test.check_const() + and self.true_val.check_const() + and self.false_val.check_const()) + + def generate_evaluation_code(self, code): + # Because subexprs may not be evaluated we can use a more optimal + # subexpr allocation strategy than the default, so override evaluation_code. + + code.mark_pos(self.pos) + self.allocate_temp_result(code) + self.test.generate_evaluation_code(code) + code.putln("if (%s) {" % self.test.result()) + self.eval_and_get(code, self.true_val) + code.putln("} else {") + self.eval_and_get(code, self.false_val) + code.putln("}") + self.test.generate_disposal_code(code) + self.test.free_temps(code) + + def eval_and_get(self, code, expr): + expr.generate_evaluation_code(code) + if self.type.is_memoryviewslice: + expr.make_owned_memoryviewslice(code) + else: + expr.make_owned_reference(code) + code.putln('%s = %s;' % (self.result(), expr.result_as(self.ctype()))) + expr.generate_post_assignment_code(code) + expr.free_temps(code) + + def generate_subexpr_disposal_code(self, code): + pass # done explicitly above (cleanup must separately happen within the if/else blocks) + + def free_subexpr_temps(self, code): + pass # done explicitly above (cleanup must separately happen within the if/else blocks) + + +richcmp_constants = { + "<" : "Py_LT", + "<=": "Py_LE", + "==": "Py_EQ", + "!=": "Py_NE", + "<>": "Py_NE", + ">" : "Py_GT", + ">=": "Py_GE", + # the following are faked by special compare functions + "in" : "Py_EQ", + "not_in": "Py_NE", +} + +class CmpNode(object): + # Mixin class containing code common to PrimaryCmpNodes + # and CascadedCmpNodes. + + special_bool_cmp_function = None + special_bool_cmp_utility_code = None + + def infer_type(self, env): + # TODO: Actually implement this (after merging with -unstable). + return py_object_type + + def calculate_cascaded_constant_result(self, operand1_result): + func = compile_time_binary_operators[self.operator] + operand2_result = self.operand2.constant_result + if (isinstance(operand1_result, any_string_type) and + isinstance(operand2_result, any_string_type) and + type(operand1_result) != type(operand2_result)): + # string comparison of different types isn't portable + return + + if self.operator in ('in', 'not_in'): + if isinstance(self.operand2, (ListNode, TupleNode, SetNode)): + if not self.operand2.args: + self.constant_result = self.operator == 'not_in' + return + elif isinstance(self.operand2, ListNode) and not self.cascade: + # tuples are more efficient to store than lists + self.operand2 = self.operand2.as_tuple() + elif isinstance(self.operand2, DictNode): + if not self.operand2.key_value_pairs: + self.constant_result = self.operator == 'not_in' + return + + self.constant_result = func(operand1_result, operand2_result) + + def cascaded_compile_time_value(self, operand1, denv): + func = get_compile_time_binop(self) + operand2 = self.operand2.compile_time_value(denv) + try: + result = func(operand1, operand2) + except Exception as e: + self.compile_time_value_error(e) + result = None + if result: + cascade = self.cascade + if cascade: + result = result and cascade.cascaded_compile_time_value(operand2, denv) + return result + + def is_cpp_comparison(self): + return self.operand1.type.is_cpp_class or self.operand2.type.is_cpp_class + + def find_common_int_type(self, env, op, operand1, operand2): + # type1 != type2 and at least one of the types is not a C int + type1 = operand1.type + type2 = operand2.type + type1_can_be_int = False + type2_can_be_int = False + + if operand1.is_string_literal and operand1.can_coerce_to_char_literal(): + type1_can_be_int = True + if operand2.is_string_literal and operand2.can_coerce_to_char_literal(): + type2_can_be_int = True + + if type1.is_int: + if type2_can_be_int: + return type1 + elif type2.is_int: + if type1_can_be_int: + return type2 + elif type1_can_be_int: + if type2_can_be_int: + if Builtin.unicode_type in (type1, type2): + return PyrexTypes.c_py_ucs4_type + else: + return PyrexTypes.c_uchar_type + + return None + + def find_common_type(self, env, op, operand1, common_type=None): + operand2 = self.operand2 + type1 = operand1.type + type2 = operand2.type + + new_common_type = None + + # catch general errors + if (type1 == str_type and (type2.is_string or type2 in (bytes_type, unicode_type)) or + type2 == str_type and (type1.is_string or type1 in (bytes_type, unicode_type))): + error(self.pos, "Comparisons between bytes/unicode and str are not portable to Python 3") + new_common_type = error_type + + # try to use numeric comparisons where possible + elif type1.is_complex or type2.is_complex: + if (op not in ('==', '!=') + and (type1.is_complex or type1.is_numeric) + and (type2.is_complex or type2.is_numeric)): + error(self.pos, "complex types are unordered") + new_common_type = error_type + elif type1.is_pyobject: + new_common_type = Builtin.complex_type if type1.subtype_of(Builtin.complex_type) else py_object_type + elif type2.is_pyobject: + new_common_type = Builtin.complex_type if type2.subtype_of(Builtin.complex_type) else py_object_type + else: + new_common_type = PyrexTypes.widest_numeric_type(type1, type2) + elif type1.is_numeric and type2.is_numeric: + new_common_type = PyrexTypes.widest_numeric_type(type1, type2) + elif common_type is None or not common_type.is_pyobject: + new_common_type = self.find_common_int_type(env, op, operand1, operand2) + + if new_common_type is None: + # fall back to generic type compatibility tests + if type1.is_ctuple or type2.is_ctuple: + new_common_type = py_object_type + elif type1 == type2: + new_common_type = type1 + elif type1.is_pyobject or type2.is_pyobject: + if type2.is_numeric or type2.is_string: + if operand2.check_for_coercion_error(type1, env): + new_common_type = error_type + else: + new_common_type = py_object_type + elif type1.is_numeric or type1.is_string: + if operand1.check_for_coercion_error(type2, env): + new_common_type = error_type + else: + new_common_type = py_object_type + elif py_object_type.assignable_from(type1) and py_object_type.assignable_from(type2): + new_common_type = py_object_type + else: + # one Python type and one non-Python type, not assignable + self.invalid_types_error(operand1, op, operand2) + new_common_type = error_type + elif type1.assignable_from(type2): + new_common_type = type1 + elif type2.assignable_from(type1): + new_common_type = type2 + else: + # C types that we couldn't handle up to here are an error + self.invalid_types_error(operand1, op, operand2) + new_common_type = error_type + + if new_common_type.is_string and (isinstance(operand1, BytesNode) or + isinstance(operand2, BytesNode)): + # special case when comparing char* to bytes literal: must + # compare string values! + new_common_type = bytes_type + + # recursively merge types + if common_type is None or new_common_type.is_error: + common_type = new_common_type + else: + # we could do a lot better by splitting the comparison + # into a non-Python part and a Python part, but this is + # safer for now + common_type = PyrexTypes.spanning_type(common_type, new_common_type) + + if self.cascade: + common_type = self.cascade.find_common_type(env, self.operator, operand2, common_type) + + return common_type + + def invalid_types_error(self, operand1, op, operand2): + error(self.pos, "Invalid types for '%s' (%s, %s)" % + (op, operand1.type, operand2.type)) + + def is_python_comparison(self): + return (not self.is_ptr_contains() + and not self.is_c_string_contains() + and (self.has_python_operands() + or (self.cascade and self.cascade.is_python_comparison()) + or self.operator in ('in', 'not_in'))) + + def coerce_operands_to(self, dst_type, env): + operand2 = self.operand2 + if operand2.type != dst_type: + self.operand2 = operand2.coerce_to(dst_type, env) + if self.cascade: + self.cascade.coerce_operands_to(dst_type, env) + + def is_python_result(self): + return ((self.has_python_operands() and + self.special_bool_cmp_function is None and + self.operator not in ('is', 'is_not', 'in', 'not_in') and + not self.is_c_string_contains() and + not self.is_ptr_contains()) + or (self.cascade and self.cascade.is_python_result())) + + def is_c_string_contains(self): + return self.operator in ('in', 'not_in') and \ + ((self.operand1.type.is_int + and (self.operand2.type.is_string or self.operand2.type is bytes_type)) or + (self.operand1.type.is_unicode_char + and self.operand2.type is unicode_type)) + + def is_ptr_contains(self): + if self.operator in ('in', 'not_in'): + container_type = self.operand2.type + return (container_type.is_ptr or container_type.is_array) \ + and not container_type.is_string + + def find_special_bool_compare_function(self, env, operand1, result_is_bool=False): + # note: currently operand1 must get coerced to a Python object if we succeed here! + if self.operator in ('==', '!='): + type1, type2 = operand1.type, self.operand2.type + if result_is_bool or (type1.is_builtin_type and type2.is_builtin_type): + if type1 is Builtin.unicode_type or type2 is Builtin.unicode_type: + self.special_bool_cmp_utility_code = UtilityCode.load_cached("UnicodeEquals", "StringTools.c") + self.special_bool_cmp_function = "__Pyx_PyUnicode_Equals" + return True + elif type1 is Builtin.bytes_type or type2 is Builtin.bytes_type: + self.special_bool_cmp_utility_code = UtilityCode.load_cached("BytesEquals", "StringTools.c") + self.special_bool_cmp_function = "__Pyx_PyBytes_Equals" + return True + elif type1 is Builtin.basestring_type or type2 is Builtin.basestring_type: + self.special_bool_cmp_utility_code = UtilityCode.load_cached("UnicodeEquals", "StringTools.c") + self.special_bool_cmp_function = "__Pyx_PyUnicode_Equals" + return True + elif type1 is Builtin.str_type or type2 is Builtin.str_type: + self.special_bool_cmp_utility_code = UtilityCode.load_cached("StrEquals", "StringTools.c") + self.special_bool_cmp_function = "__Pyx_PyString_Equals" + return True + elif self.operator in ('in', 'not_in'): + if self.operand2.type is Builtin.dict_type: + self.operand2 = self.operand2.as_none_safe_node("'NoneType' object is not iterable") + self.special_bool_cmp_utility_code = UtilityCode.load_cached("PyDictContains", "ObjectHandling.c") + self.special_bool_cmp_function = "__Pyx_PyDict_ContainsTF" + return True + elif self.operand2.type is Builtin.set_type: + self.operand2 = self.operand2.as_none_safe_node("'NoneType' object is not iterable") + self.special_bool_cmp_utility_code = UtilityCode.load_cached("PySetContains", "ObjectHandling.c") + self.special_bool_cmp_function = "__Pyx_PySet_ContainsTF" + return True + elif self.operand2.type is Builtin.unicode_type: + self.operand2 = self.operand2.as_none_safe_node("'NoneType' object is not iterable") + self.special_bool_cmp_utility_code = UtilityCode.load_cached("PyUnicodeContains", "StringTools.c") + self.special_bool_cmp_function = "__Pyx_PyUnicode_ContainsTF" + return True + else: + if not self.operand2.type.is_pyobject: + self.operand2 = self.operand2.coerce_to_pyobject(env) + self.special_bool_cmp_utility_code = UtilityCode.load_cached("PySequenceContains", "ObjectHandling.c") + self.special_bool_cmp_function = "__Pyx_PySequence_ContainsTF" + return True + return False + + def generate_operation_code(self, code, result_code, + operand1, op , operand2): + if self.type.is_pyobject: + error_clause = code.error_goto_if_null + got_ref = "__Pyx_XGOTREF(%s); " % result_code + if self.special_bool_cmp_function: + code.globalstate.use_utility_code( + UtilityCode.load_cached("PyBoolOrNullFromLong", "ObjectHandling.c")) + coerce_result = "__Pyx_PyBoolOrNull_FromLong" + else: + coerce_result = "__Pyx_PyBool_FromLong" + else: + error_clause = code.error_goto_if_neg + got_ref = "" + coerce_result = "" + + if self.special_bool_cmp_function: + if operand1.type.is_pyobject: + result1 = operand1.py_result() + else: + result1 = operand1.result() + if operand2.type.is_pyobject: + result2 = operand2.py_result() + else: + result2 = operand2.result() + if self.special_bool_cmp_utility_code: + code.globalstate.use_utility_code(self.special_bool_cmp_utility_code) + code.putln( + "%s = %s(%s(%s, %s, %s)); %s%s" % ( + result_code, + coerce_result, + self.special_bool_cmp_function, + result1, result2, richcmp_constants[op], + got_ref, + error_clause(result_code, self.pos))) + + elif operand1.type.is_pyobject and op not in ('is', 'is_not'): + assert op not in ('in', 'not_in'), op + code.putln("%s = PyObject_RichCompare(%s, %s, %s); %s%s" % ( + result_code, + operand1.py_result(), + operand2.py_result(), + richcmp_constants[op], + got_ref, + error_clause(result_code, self.pos))) + + elif operand1.type.is_complex: + code.putln("%s = %s(%s%s(%s, %s));" % ( + result_code, + coerce_result, + op == "!=" and "!" or "", + operand1.type.unary_op('eq'), + operand1.result(), + operand2.result())) + + else: + type1 = operand1.type + type2 = operand2.type + if (type1.is_extension_type or type2.is_extension_type) \ + and not type1.same_as(type2): + common_type = py_object_type + elif type1.is_numeric: + common_type = PyrexTypes.widest_numeric_type(type1, type2) + else: + common_type = type1 + code1 = operand1.result_as(common_type) + code2 = operand2.result_as(common_type) + statement = "%s = %s(%s %s %s);" % ( + result_code, + coerce_result, + code1, + self.c_operator(op), + code2) + if self.is_cpp_comparison() and self.exception_check == '+': + translate_cpp_exception( + code, + self.pos, + statement, + result_code if self.type.is_pyobject else None, + self.exception_value, + self.in_nogil_context) + else: + code.putln(statement) + + def c_operator(self, op): + if op == 'is': + return "==" + elif op == 'is_not': + return "!=" + else: + return op + +class PrimaryCmpNode(ExprNode, CmpNode): + # Non-cascaded comparison or first comparison of + # a cascaded sequence. + # + # operator string + # operand1 ExprNode + # operand2 ExprNode + # cascade CascadedCmpNode + + # We don't use the subexprs mechanism, because + # things here are too complicated for it to handle. + # Instead, we override all the framework methods + # which use it. + + child_attrs = ['operand1', 'operand2', 'coerced_operand2', 'cascade'] + + cascade = None + coerced_operand2 = None + is_memslice_nonecheck = False + + def infer_type(self, env): + type1 = self.operand1.infer_type(env) + type2 = self.operand2.infer_type(env) + + if is_pythran_expr(type1) or is_pythran_expr(type2): + if is_pythran_supported_type(type1) and is_pythran_supported_type(type2): + return PythranExpr(pythran_binop_type(self.operator, type1, type2)) + + # TODO: implement this for other types. + return py_object_type + + def type_dependencies(self, env): + return () + + def calculate_constant_result(self): + assert not self.cascade + self.calculate_cascaded_constant_result(self.operand1.constant_result) + + def compile_time_value(self, denv): + operand1 = self.operand1.compile_time_value(denv) + return self.cascaded_compile_time_value(operand1, denv) + + def analyse_types(self, env): + self.operand1 = self.operand1.analyse_types(env) + self.operand2 = self.operand2.analyse_types(env) + if self.is_cpp_comparison(): + self.analyse_cpp_comparison(env) + if self.cascade: + error(self.pos, "Cascading comparison not yet supported for cpp types.") + return self + + type1 = self.operand1.type + type2 = self.operand2.type + if is_pythran_expr(type1) or is_pythran_expr(type2): + if is_pythran_supported_type(type1) and is_pythran_supported_type(type2): + self.type = PythranExpr(pythran_binop_type(self.operator, type1, type2)) + self.is_pycmp = False + return self + + if self.analyse_memoryviewslice_comparison(env): + return self + + if self.cascade: + self.cascade = self.cascade.analyse_types(env) + + if self.operator in ('in', 'not_in'): + if self.is_c_string_contains(): + self.is_pycmp = False + common_type = None + if self.cascade: + error(self.pos, "Cascading comparison not yet supported for 'int_val in string'.") + return self + if self.operand2.type is unicode_type: + env.use_utility_code(UtilityCode.load_cached("PyUCS4InUnicode", "StringTools.c")) + else: + if self.operand1.type is PyrexTypes.c_uchar_type: + self.operand1 = self.operand1.coerce_to(PyrexTypes.c_char_type, env) + if self.operand2.type is not bytes_type: + self.operand2 = self.operand2.coerce_to(bytes_type, env) + env.use_utility_code(UtilityCode.load_cached("BytesContains", "StringTools.c")) + self.operand2 = self.operand2.as_none_safe_node( + "argument of type 'NoneType' is not iterable") + elif self.is_ptr_contains(): + if self.cascade: + error(self.pos, "Cascading comparison not supported for 'val in sliced pointer'.") + self.type = PyrexTypes.c_bint_type + # Will be transformed by IterationTransform + return self + elif self.find_special_bool_compare_function(env, self.operand1): + if not self.operand1.type.is_pyobject: + self.operand1 = self.operand1.coerce_to_pyobject(env) + common_type = None # if coercion needed, the method call above has already done it + self.is_pycmp = False # result is bint + else: + common_type = py_object_type + self.is_pycmp = True + elif self.find_special_bool_compare_function(env, self.operand1): + if not self.operand1.type.is_pyobject: + self.operand1 = self.operand1.coerce_to_pyobject(env) + common_type = None # if coercion needed, the method call above has already done it + self.is_pycmp = False # result is bint + else: + common_type = self.find_common_type(env, self.operator, self.operand1) + self.is_pycmp = common_type.is_pyobject + + if common_type is not None and not common_type.is_error: + if self.operand1.type != common_type: + self.operand1 = self.operand1.coerce_to(common_type, env) + self.coerce_operands_to(common_type, env) + + if self.cascade: + self.operand2 = self.operand2.coerce_to_simple(env) + self.cascade.coerce_cascaded_operands_to_temp(env) + operand2 = self.cascade.optimise_comparison(self.operand2, env) + if operand2 is not self.operand2: + self.coerced_operand2 = operand2 + if self.is_python_result(): + self.type = PyrexTypes.py_object_type + else: + self.type = PyrexTypes.c_bint_type + cdr = self.cascade + while cdr: + cdr.type = self.type + cdr = cdr.cascade + if self.is_pycmp or self.cascade or self.special_bool_cmp_function: + # 1) owned reference, 2) reused value, 3) potential function error return value + self.is_temp = 1 + return self + + def analyse_cpp_comparison(self, env): + type1 = self.operand1.type + type2 = self.operand2.type + self.is_pycmp = False + entry = env.lookup_operator(self.operator, [self.operand1, self.operand2]) + if entry is None: + error(self.pos, "Invalid types for '%s' (%s, %s)" % + (self.operator, type1, type2)) + self.type = PyrexTypes.error_type + self.result_code = "" + return + func_type = entry.type + if func_type.is_ptr: + func_type = func_type.base_type + self.exception_check = func_type.exception_check + self.exception_value = func_type.exception_value + if self.exception_check == '+': + self.is_temp = True + if self.exception_value is None: + env.use_utility_code(UtilityCode.load_cached("CppExceptionConversion", "CppSupport.cpp")) + if len(func_type.args) == 1: + self.operand2 = self.operand2.coerce_to(func_type.args[0].type, env) + else: + self.operand1 = self.operand1.coerce_to(func_type.args[0].type, env) + self.operand2 = self.operand2.coerce_to(func_type.args[1].type, env) + self.type = func_type.return_type + + def analyse_memoryviewslice_comparison(self, env): + have_none = self.operand1.is_none or self.operand2.is_none + have_slice = (self.operand1.type.is_memoryviewslice or + self.operand2.type.is_memoryviewslice) + ops = ('==', '!=', 'is', 'is_not') + if have_slice and have_none and self.operator in ops: + self.is_pycmp = False + self.type = PyrexTypes.c_bint_type + self.is_memslice_nonecheck = True + return True + + return False + + def coerce_to_boolean(self, env): + if self.is_pycmp: + # coercing to bool => may allow for more efficient comparison code + if self.find_special_bool_compare_function( + env, self.operand1, result_is_bool=True): + self.is_pycmp = False + self.type = PyrexTypes.c_bint_type + self.is_temp = 1 + if self.cascade: + operand2 = self.cascade.optimise_comparison( + self.operand2, env, result_is_bool=True) + if operand2 is not self.operand2: + self.coerced_operand2 = operand2 + return self + # TODO: check if we can optimise parts of the cascade here + return ExprNode.coerce_to_boolean(self, env) + + def has_python_operands(self): + return (self.operand1.type.is_pyobject + or self.operand2.type.is_pyobject) + + def check_const(self): + if self.cascade: + self.not_const() + return False + else: + return self.operand1.check_const() and self.operand2.check_const() + + def calculate_result_code(self): + operand1, operand2 = self.operand1, self.operand2 + if operand1.type.is_complex: + if self.operator == "!=": + negation = "!" + else: + negation = "" + return "(%s%s(%s, %s))" % ( + negation, + operand1.type.binary_op('=='), + operand1.result(), + operand2.result()) + elif self.is_c_string_contains(): + if operand2.type is unicode_type: + method = "__Pyx_UnicodeContainsUCS4" + else: + method = "__Pyx_BytesContains" + if self.operator == "not_in": + negation = "!" + else: + negation = "" + return "(%s%s(%s, %s))" % ( + negation, + method, + operand2.result(), + operand1.result()) + else: + if is_pythran_expr(self.type): + result1, result2 = operand1.pythran_result(), operand2.pythran_result() + else: + result1, result2 = operand1.result(), operand2.result() + if self.is_memslice_nonecheck: + if operand1.type.is_memoryviewslice: + result1 = "((PyObject *) %s.memview)" % result1 + else: + result2 = "((PyObject *) %s.memview)" % result2 + + return "(%s %s %s)" % ( + result1, + self.c_operator(self.operator), + result2) + + def generate_evaluation_code(self, code): + self.operand1.generate_evaluation_code(code) + self.operand2.generate_evaluation_code(code) + if self.is_temp: + self.allocate_temp_result(code) + self.generate_operation_code(code, self.result(), + self.operand1, self.operator, self.operand2) + if self.cascade: + self.cascade.generate_evaluation_code( + code, self.result(), self.coerced_operand2 or self.operand2, + needs_evaluation=self.coerced_operand2 is not None) + self.operand1.generate_disposal_code(code) + self.operand1.free_temps(code) + self.operand2.generate_disposal_code(code) + self.operand2.free_temps(code) + + def generate_subexpr_disposal_code(self, code): + # If this is called, it is a non-cascaded cmp, + # so only need to dispose of the two main operands. + self.operand1.generate_disposal_code(code) + self.operand2.generate_disposal_code(code) + + def free_subexpr_temps(self, code): + # If this is called, it is a non-cascaded cmp, + # so only need to dispose of the two main operands. + self.operand1.free_temps(code) + self.operand2.free_temps(code) + + def annotate(self, code): + self.operand1.annotate(code) + self.operand2.annotate(code) + if self.cascade: + self.cascade.annotate(code) + + +class CascadedCmpNode(Node, CmpNode): + # A CascadedCmpNode is not a complete expression node. It + # hangs off the side of another comparison node, shares + # its left operand with that node, and shares its result + # with the PrimaryCmpNode at the head of the chain. + # + # operator string + # operand2 ExprNode + # cascade CascadedCmpNode + + child_attrs = ['operand2', 'coerced_operand2', 'cascade'] + + cascade = None + coerced_operand2 = None + constant_result = constant_value_not_set # FIXME: where to calculate this? + + def infer_type(self, env): + # TODO: Actually implement this (after merging with -unstable). + return py_object_type + + def type_dependencies(self, env): + return () + + def has_constant_result(self): + return self.constant_result is not constant_value_not_set and \ + self.constant_result is not not_a_constant + + def analyse_types(self, env): + self.operand2 = self.operand2.analyse_types(env) + if self.cascade: + self.cascade = self.cascade.analyse_types(env) + return self + + def has_python_operands(self): + return self.operand2.type.is_pyobject + + def is_cpp_comparison(self): + # cascaded comparisons aren't currently implemented for c++ classes. + return False + + def optimise_comparison(self, operand1, env, result_is_bool=False): + if self.find_special_bool_compare_function(env, operand1, result_is_bool): + self.is_pycmp = False + self.type = PyrexTypes.c_bint_type + if not operand1.type.is_pyobject: + operand1 = operand1.coerce_to_pyobject(env) + if self.cascade: + operand2 = self.cascade.optimise_comparison(self.operand2, env, result_is_bool) + if operand2 is not self.operand2: + self.coerced_operand2 = operand2 + return operand1 + + def coerce_operands_to_pyobjects(self, env): + self.operand2 = self.operand2.coerce_to_pyobject(env) + if self.operand2.type is dict_type and self.operator in ('in', 'not_in'): + self.operand2 = self.operand2.as_none_safe_node("'NoneType' object is not iterable") + if self.cascade: + self.cascade.coerce_operands_to_pyobjects(env) + + def coerce_cascaded_operands_to_temp(self, env): + if self.cascade: + #self.operand2 = self.operand2.coerce_to_temp(env) #CTT + self.operand2 = self.operand2.coerce_to_simple(env) + self.cascade.coerce_cascaded_operands_to_temp(env) + + def generate_evaluation_code(self, code, result, operand1, needs_evaluation=False): + if self.type.is_pyobject: + code.putln("if (__Pyx_PyObject_IsTrue(%s)) {" % result) + code.put_decref(result, self.type) + else: + code.putln("if (%s) {" % result) + if needs_evaluation: + operand1.generate_evaluation_code(code) + self.operand2.generate_evaluation_code(code) + self.generate_operation_code(code, result, + operand1, self.operator, self.operand2) + if self.cascade: + self.cascade.generate_evaluation_code( + code, result, self.coerced_operand2 or self.operand2, + needs_evaluation=self.coerced_operand2 is not None) + if needs_evaluation: + operand1.generate_disposal_code(code) + operand1.free_temps(code) + # Cascaded cmp result is always temp + self.operand2.generate_disposal_code(code) + self.operand2.free_temps(code) + code.putln("}") + + def annotate(self, code): + self.operand2.annotate(code) + if self.cascade: + self.cascade.annotate(code) + + +binop_node_classes = { + "or": BoolBinopNode, + "and": BoolBinopNode, + "|": IntBinopNode, + "^": IntBinopNode, + "&": IntBinopNode, + "<<": IntBinopNode, + ">>": IntBinopNode, + "+": AddNode, + "-": SubNode, + "*": MulNode, + "@": MatMultNode, + "/": DivNode, + "//": DivNode, + "%": ModNode, + "**": PowNode, +} + + +def binop_node(pos, operator, operand1, operand2, inplace=False, **kwargs): + # Construct binop node of appropriate class for + # given operator. + return binop_node_classes[operator]( + pos, + operator=operator, + operand1=operand1, + operand2=operand2, + inplace=inplace, + **kwargs) + + +#------------------------------------------------------------------- +# +# Coercion nodes +# +# Coercion nodes are special in that they are created during +# the analyse_types phase of parse tree processing. +# Their __init__ methods consequently incorporate some aspects +# of that phase. +# +#------------------------------------------------------------------- + +class CoercionNode(ExprNode): + # Abstract base class for coercion nodes. + # + # arg ExprNode node being coerced + + subexprs = ['arg'] + constant_result = not_a_constant + + def __init__(self, arg): + super(CoercionNode, self).__init__(arg.pos) + self.arg = arg + if debug_coercion: + print("%s Coercing %s" % (self, self.arg)) + + def calculate_constant_result(self): + # constant folding can break type coercion, so this is disabled + pass + + def annotate(self, code): + self.arg.annotate(code) + if self.arg.type != self.type: + file, line, col = self.pos + code.annotate((file, line, col-1), AnnotationItem( + style='coerce', tag='coerce', text='[%s] to [%s]' % (self.arg.type, self.type))) + + +class CoerceToMemViewSliceNode(CoercionNode): + """ + Coerce an object to a memoryview slice. This holds a new reference in + a managed temp. + """ + + def __init__(self, arg, dst_type, env): + assert dst_type.is_memoryviewslice + assert not arg.type.is_memoryviewslice + CoercionNode.__init__(self, arg) + self.type = dst_type + self.is_temp = 1 + self.use_managed_ref = True + self.arg = arg + self.type.create_from_py_utility_code(env) + + def generate_result_code(self, code): + code.putln(self.type.from_py_call_code( + self.arg.py_result(), + self.result(), + self.pos, + code + )) + + +class CastNode(CoercionNode): + # Wrap a node in a C type cast. + + def __init__(self, arg, new_type): + CoercionNode.__init__(self, arg) + self.type = new_type + + def may_be_none(self): + return self.arg.may_be_none() + + def calculate_result_code(self): + return self.arg.result_as(self.type) + + def generate_result_code(self, code): + self.arg.generate_result_code(code) + + +class PyTypeTestNode(CoercionNode): + # This node is used to check that a generic Python + # object is an instance of a particular extension type. + # This node borrows the result of its argument node. + + exact_builtin_type = True + + def __init__(self, arg, dst_type, env, notnone=False): + # The arg is know to be a Python object, and + # the dst_type is known to be an extension type. + assert dst_type.is_extension_type or dst_type.is_builtin_type, "PyTypeTest on non extension type" + CoercionNode.__init__(self, arg) + self.type = dst_type + self.result_ctype = arg.ctype() + self.notnone = notnone + + nogil_check = Node.gil_error + gil_message = "Python type test" + + def analyse_types(self, env): + return self + + def may_be_none(self): + if self.notnone: + return False + return self.arg.may_be_none() + + def is_simple(self): + return self.arg.is_simple() + + def result_in_temp(self): + return self.arg.result_in_temp() + + def is_ephemeral(self): + return self.arg.is_ephemeral() + + def nonlocally_immutable(self): + return self.arg.nonlocally_immutable() + + def reanalyse(self): + if self.type != self.arg.type or not self.arg.is_temp: + return self + if not self.type.typeobj_is_available(): + return self + if self.arg.may_be_none() and self.notnone: + return self.arg.as_none_safe_node("Cannot convert NoneType to %.200s" % self.type.name) + return self.arg + + def calculate_constant_result(self): + # FIXME + pass + + def calculate_result_code(self): + return self.arg.result() + + def generate_result_code(self, code): + if self.type.typeobj_is_available(): + if self.type.is_builtin_type: + type_test = self.type.type_test_code( + self.arg.py_result(), + self.notnone, exact=self.exact_builtin_type) + else: + type_test = self.type.type_test_code( + self.arg.py_result(), self.notnone) + code.globalstate.use_utility_code( + UtilityCode.load_cached("ExtTypeTest", "ObjectHandling.c")) + code.putln("if (!(%s)) %s" % ( + type_test, code.error_goto(self.pos))) + else: + error(self.pos, "Cannot test type of extern C class " + "without type object name specification") + + def generate_post_assignment_code(self, code): + self.arg.generate_post_assignment_code(code) + + def allocate_temp_result(self, code): + pass + + def release_temp_result(self, code): + pass + + def free_temps(self, code): + self.arg.free_temps(code) + + def free_subexpr_temps(self, code): + self.arg.free_subexpr_temps(code) + + +class NoneCheckNode(CoercionNode): + # This node is used to check that a Python object is not None and + # raises an appropriate exception (as specified by the creating + # transform). + + is_nonecheck = True + + def __init__(self, arg, exception_type_cname, exception_message, + exception_format_args=()): + CoercionNode.__init__(self, arg) + self.type = arg.type + self.result_ctype = arg.ctype() + self.exception_type_cname = exception_type_cname + self.exception_message = exception_message + self.exception_format_args = tuple(exception_format_args or ()) + + nogil_check = None # this node only guards an operation that would fail already + + def analyse_types(self, env): + return self + + def may_be_none(self): + return False + + def is_simple(self): + return self.arg.is_simple() + + def result_in_temp(self): + return self.arg.result_in_temp() + + def nonlocally_immutable(self): + return self.arg.nonlocally_immutable() + + def calculate_result_code(self): + return self.arg.result() + + def condition(self): + if self.type.is_pyobject: + return self.arg.py_result() + elif self.type.is_memoryviewslice: + return "((PyObject *) %s.memview)" % self.arg.result() + else: + raise Exception("unsupported type") + + @classmethod + def generate(cls, arg, code, exception_message, + exception_type_cname="PyExc_TypeError", exception_format_args=(), in_nogil_context=False): + node = cls(arg, exception_type_cname, exception_message, exception_format_args) + node.in_nogil_context = in_nogil_context + node.put_nonecheck(code) + + @classmethod + def generate_if_needed(cls, arg, code, exception_message, + exception_type_cname="PyExc_TypeError", exception_format_args=(), in_nogil_context=False): + if arg.may_be_none(): + cls.generate(arg, code, exception_message, exception_type_cname, exception_format_args, in_nogil_context) + + def put_nonecheck(self, code): + code.putln( + "if (unlikely(%s == Py_None)) {" % self.condition()) + + if self.in_nogil_context: + code.put_ensure_gil() + + escape = StringEncoding.escape_byte_string + if self.exception_format_args: + code.putln('PyErr_Format(%s, "%s", %s);' % ( + self.exception_type_cname, + StringEncoding.escape_byte_string( + self.exception_message.encode('UTF-8')), + ', '.join([ '"%s"' % escape(str(arg).encode('UTF-8')) + for arg in self.exception_format_args ]))) + else: + code.putln('PyErr_SetString(%s, "%s");' % ( + self.exception_type_cname, + escape(self.exception_message.encode('UTF-8')))) + + if self.in_nogil_context: + code.put_release_ensured_gil() + + code.putln(code.error_goto(self.pos)) + code.putln("}") + + def generate_result_code(self, code): + self.put_nonecheck(code) + + def generate_post_assignment_code(self, code): + self.arg.generate_post_assignment_code(code) + + def free_temps(self, code): + self.arg.free_temps(code) + + +class CoerceToPyTypeNode(CoercionNode): + # This node is used to convert a C data type + # to a Python object. + + type = py_object_type + target_type = py_object_type + is_temp = 1 + + def __init__(self, arg, env, type=py_object_type): + if not arg.type.create_to_py_utility_code(env): + error(arg.pos, "Cannot convert '%s' to Python object" % arg.type) + elif arg.type.is_complex: + # special case: complex coercion is so complex that it + # uses a macro ("__pyx_PyComplex_FromComplex()"), for + # which the argument must be simple + arg = arg.coerce_to_simple(env) + CoercionNode.__init__(self, arg) + if type is py_object_type: + # be specific about some known types + if arg.type.is_string or arg.type.is_cpp_string: + self.type = default_str_type(env) + elif arg.type.is_pyunicode_ptr or arg.type.is_unicode_char: + self.type = unicode_type + elif arg.type.is_complex: + self.type = Builtin.complex_type + self.target_type = self.type + elif arg.type.is_string or arg.type.is_cpp_string: + if (type not in (bytes_type, bytearray_type) + and not env.directives['c_string_encoding']): + error(arg.pos, + "default encoding required for conversion from '%s' to '%s'" % + (arg.type, type)) + self.type = self.target_type = type + else: + # FIXME: check that the target type and the resulting type are compatible + self.target_type = type + + gil_message = "Converting to Python object" + + def may_be_none(self): + # FIXME: is this always safe? + return False + + def coerce_to_boolean(self, env): + arg_type = self.arg.type + if (arg_type == PyrexTypes.c_bint_type or + (arg_type.is_pyobject and arg_type.name == 'bool')): + return self.arg.coerce_to_temp(env) + else: + return CoerceToBooleanNode(self, env) + + def coerce_to_integer(self, env): + # If not already some C integer type, coerce to longint. + if self.arg.type.is_int: + return self.arg + else: + return self.arg.coerce_to(PyrexTypes.c_long_type, env) + + def analyse_types(self, env): + # The arg is always already analysed + return self + + def generate_result_code(self, code): + code.putln('%s; %s' % ( + self.arg.type.to_py_call_code( + self.arg.result(), + self.result(), + self.target_type), + code.error_goto_if_null(self.result(), self.pos))) + + code.put_gotref(self.py_result()) + + +class CoerceIntToBytesNode(CoerceToPyTypeNode): + # This node is used to convert a C int type to a Python bytes + # object. + + is_temp = 1 + + def __init__(self, arg, env): + arg = arg.coerce_to_simple(env) + CoercionNode.__init__(self, arg) + self.type = Builtin.bytes_type + + def generate_result_code(self, code): + arg = self.arg + arg_result = arg.result() + if arg.type not in (PyrexTypes.c_char_type, + PyrexTypes.c_uchar_type, + PyrexTypes.c_schar_type): + if arg.type.signed: + code.putln("if ((%s < 0) || (%s > 255)) {" % ( + arg_result, arg_result)) + else: + code.putln("if (%s > 255) {" % arg_result) + code.putln('PyErr_SetString(PyExc_OverflowError, ' + '"value too large to pack into a byte"); %s' % ( + code.error_goto(self.pos))) + code.putln('}') + temp = None + if arg.type is not PyrexTypes.c_char_type: + temp = code.funcstate.allocate_temp(PyrexTypes.c_char_type, manage_ref=False) + code.putln("%s = (char)%s;" % (temp, arg_result)) + arg_result = temp + code.putln('%s = PyBytes_FromStringAndSize(&%s, 1); %s' % ( + self.result(), + arg_result, + code.error_goto_if_null(self.result(), self.pos))) + if temp is not None: + code.funcstate.release_temp(temp) + code.put_gotref(self.py_result()) + + +class CoerceFromPyTypeNode(CoercionNode): + # This node is used to convert a Python object + # to a C data type. + + def __init__(self, result_type, arg, env): + CoercionNode.__init__(self, arg) + self.type = result_type + self.is_temp = 1 + if not result_type.create_from_py_utility_code(env): + error(arg.pos, + "Cannot convert Python object to '%s'" % result_type) + if self.type.is_string or self.type.is_pyunicode_ptr: + if self.arg.is_name and self.arg.entry and self.arg.entry.is_pyglobal: + warning(arg.pos, + "Obtaining '%s' from externally modifiable global Python value" % result_type, + level=1) + + def analyse_types(self, env): + # The arg is always already analysed + return self + + def is_ephemeral(self): + return (self.type.is_ptr and not self.type.is_array) and self.arg.is_ephemeral() + + def generate_result_code(self, code): + from_py_function = None + # for certain source types, we can do better than the generic coercion + if self.type.is_string and self.arg.type is bytes_type: + if self.type.from_py_function.startswith('__Pyx_PyObject_As'): + from_py_function = '__Pyx_PyBytes' + self.type.from_py_function[len('__Pyx_PyObject'):] + NoneCheckNode.generate_if_needed(self.arg, code, "expected bytes, NoneType found") + + code.putln(self.type.from_py_call_code( + self.arg.py_result(), self.result(), self.pos, code, from_py_function=from_py_function)) + if self.type.is_pyobject: + code.put_gotref(self.py_result()) + + def nogil_check(self, env): + error(self.pos, "Coercion from Python not allowed without the GIL") + + +class CoerceToBooleanNode(CoercionNode): + # This node is used when a result needs to be used + # in a boolean context. + + type = PyrexTypes.c_bint_type + + _special_builtins = { + Builtin.list_type: 'PyList_GET_SIZE', + Builtin.tuple_type: 'PyTuple_GET_SIZE', + Builtin.set_type: 'PySet_GET_SIZE', + Builtin.frozenset_type: 'PySet_GET_SIZE', + Builtin.bytes_type: 'PyBytes_GET_SIZE', + Builtin.bytearray_type: 'PyByteArray_GET_SIZE', + Builtin.unicode_type: '__Pyx_PyUnicode_IS_TRUE', + } + + def __init__(self, arg, env): + CoercionNode.__init__(self, arg) + if arg.type.is_pyobject: + self.is_temp = 1 + + def nogil_check(self, env): + if self.arg.type.is_pyobject and self._special_builtins.get(self.arg.type) is None: + self.gil_error() + + gil_message = "Truth-testing Python object" + + def check_const(self): + if self.is_temp: + self.not_const() + return False + return self.arg.check_const() + + def calculate_result_code(self): + return "(%s != 0)" % self.arg.result() + + def generate_result_code(self, code): + if not self.is_temp: + return + test_func = self._special_builtins.get(self.arg.type) + if test_func is not None: + checks = ["(%s != Py_None)" % self.arg.py_result()] if self.arg.may_be_none() else [] + checks.append("(%s(%s) != 0)" % (test_func, self.arg.py_result())) + code.putln("%s = %s;" % (self.result(), '&&'.join(checks))) + else: + code.putln( + "%s = __Pyx_PyObject_IsTrue(%s); %s" % ( + self.result(), + self.arg.py_result(), + code.error_goto_if_neg(self.result(), self.pos))) + + +class CoerceToComplexNode(CoercionNode): + + def __init__(self, arg, dst_type, env): + if arg.type.is_complex: + arg = arg.coerce_to_simple(env) + self.type = dst_type + CoercionNode.__init__(self, arg) + dst_type.create_declaration_utility_code(env) + + def calculate_result_code(self): + if self.arg.type.is_complex: + real_part = "__Pyx_CREAL(%s)" % self.arg.result() + imag_part = "__Pyx_CIMAG(%s)" % self.arg.result() + else: + real_part = self.arg.result() + imag_part = "0" + return "%s(%s, %s)" % ( + self.type.from_parts, + real_part, + imag_part) + + def generate_result_code(self, code): + pass + +class CoerceToTempNode(CoercionNode): + # This node is used to force the result of another node + # to be stored in a temporary. It is only used if the + # argument node's result is not already in a temporary. + + def __init__(self, arg, env): + CoercionNode.__init__(self, arg) + self.type = self.arg.type.as_argument_type() + self.constant_result = self.arg.constant_result + self.is_temp = 1 + if self.type.is_pyobject: + self.result_ctype = py_object_type + + gil_message = "Creating temporary Python reference" + + def analyse_types(self, env): + # The arg is always already analysed + return self + + def coerce_to_boolean(self, env): + self.arg = self.arg.coerce_to_boolean(env) + if self.arg.is_simple(): + return self.arg + self.type = self.arg.type + self.result_ctype = self.type + return self + + def generate_result_code(self, code): + #self.arg.generate_evaluation_code(code) # Already done + # by generic generate_subexpr_evaluation_code! + code.putln("%s = %s;" % ( + self.result(), self.arg.result_as(self.ctype()))) + if self.use_managed_ref: + if self.type.is_pyobject: + code.put_incref(self.result(), self.ctype()) + elif self.type.is_memoryviewslice: + code.put_incref_memoryviewslice(self.result(), + not self.in_nogil_context) + +class ProxyNode(CoercionNode): + """ + A node that should not be replaced by transforms or other means, + and hence can be useful to wrap the argument to a clone node + + MyNode -> ProxyNode -> ArgNode + CloneNode -^ + """ + + nogil_check = None + + def __init__(self, arg): + super(ProxyNode, self).__init__(arg) + self.constant_result = arg.constant_result + self._proxy_type() + + def analyse_types(self, env): + self.arg = self.arg.analyse_expressions(env) + self._proxy_type() + return self + + def infer_type(self, env): + return self.arg.infer_type(env) + + def _proxy_type(self): + if hasattr(self.arg, 'type'): + self.type = self.arg.type + self.result_ctype = self.arg.result_ctype + if hasattr(self.arg, 'entry'): + self.entry = self.arg.entry + + def generate_result_code(self, code): + self.arg.generate_result_code(code) + + def result(self): + return self.arg.result() + + def is_simple(self): + return self.arg.is_simple() + + def may_be_none(self): + return self.arg.may_be_none() + + def generate_evaluation_code(self, code): + self.arg.generate_evaluation_code(code) + + def generate_disposal_code(self, code): + self.arg.generate_disposal_code(code) + + def free_temps(self, code): + self.arg.free_temps(code) + +class CloneNode(CoercionNode): + # This node is employed when the result of another node needs + # to be used multiple times. The argument node's result must + # be in a temporary. This node "borrows" the result from the + # argument node, and does not generate any evaluation or + # disposal code for it. The original owner of the argument + # node is responsible for doing those things. + + subexprs = [] # Arg is not considered a subexpr + nogil_check = None + + def __init__(self, arg): + CoercionNode.__init__(self, arg) + self.constant_result = arg.constant_result + if hasattr(arg, 'type'): + self.type = arg.type + self.result_ctype = arg.result_ctype + if hasattr(arg, 'entry'): + self.entry = arg.entry + + def result(self): + return self.arg.result() + + def may_be_none(self): + return self.arg.may_be_none() + + def type_dependencies(self, env): + return self.arg.type_dependencies(env) + + def infer_type(self, env): + return self.arg.infer_type(env) + + def analyse_types(self, env): + self.type = self.arg.type + self.result_ctype = self.arg.result_ctype + self.is_temp = 1 + if hasattr(self.arg, 'entry'): + self.entry = self.arg.entry + return self + + def coerce_to(self, dest_type, env): + if self.arg.is_literal: + return self.arg.coerce_to(dest_type, env) + return super(CloneNode, self).coerce_to(dest_type, env) + + def is_simple(self): + return True # result is always in a temp (or a name) + + def generate_evaluation_code(self, code): + pass + + def generate_result_code(self, code): + pass + + def generate_disposal_code(self, code): + pass + + def free_temps(self, code): + pass + + +class CMethodSelfCloneNode(CloneNode): + # Special CloneNode for the self argument of builtin C methods + # that accepts subtypes of the builtin type. This is safe only + # for 'final' subtypes, as subtypes of the declared type may + # override the C method. + + def coerce_to(self, dst_type, env): + if dst_type.is_builtin_type and self.type.subtype_of(dst_type): + return self + return CloneNode.coerce_to(self, dst_type, env) + + +class ModuleRefNode(ExprNode): + # Simple returns the module object + + type = py_object_type + is_temp = False + subexprs = [] + + def analyse_types(self, env): + return self + + def may_be_none(self): + return False + + def calculate_result_code(self): + return Naming.module_cname + + def generate_result_code(self, code): + pass + +class DocstringRefNode(ExprNode): + # Extracts the docstring of the body element + + subexprs = ['body'] + type = py_object_type + is_temp = True + + def __init__(self, pos, body): + ExprNode.__init__(self, pos) + assert body.type.is_pyobject + self.body = body + + def analyse_types(self, env): + return self + + def generate_result_code(self, code): + code.putln('%s = __Pyx_GetAttr(%s, %s); %s' % ( + self.result(), self.body.result(), + code.intern_identifier(StringEncoding.EncodedString("__doc__")), + code.error_goto_if_null(self.result(), self.pos))) + code.put_gotref(self.result()) + + + +#------------------------------------------------------------------------------------ +# +# Runtime support code +# +#------------------------------------------------------------------------------------ + +pyerr_occurred_withgil_utility_code= UtilityCode( +proto = """ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); /* proto */ +""", +impl = """ +static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) { + int err; + #ifdef WITH_THREAD + PyGILState_STATE _save = PyGILState_Ensure(); + #endif + err = !!PyErr_Occurred(); + #ifdef WITH_THREAD + PyGILState_Release(_save); + #endif + return err; +} +""" +) + +#------------------------------------------------------------------------------------ + +raise_unbound_local_error_utility_code = UtilityCode( +proto = """ +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); +""", +impl = """ +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { + PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); +} +""") + +raise_closure_name_error_utility_code = UtilityCode( +proto = """ +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); +""", +impl = """ +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { + PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); +} +""") + +# Don't inline the function, it should really never be called in production +raise_unbound_memoryview_utility_code_nogil = UtilityCode( +proto = """ +static void __Pyx_RaiseUnboundMemoryviewSliceNogil(const char *varname); +""", +impl = """ +static void __Pyx_RaiseUnboundMemoryviewSliceNogil(const char *varname) { + #ifdef WITH_THREAD + PyGILState_STATE gilstate = PyGILState_Ensure(); + #endif + __Pyx_RaiseUnboundLocalError(varname); + #ifdef WITH_THREAD + PyGILState_Release(gilstate); + #endif +} +""", +requires = [raise_unbound_local_error_utility_code]) + +#------------------------------------------------------------------------------------ + +raise_too_many_values_to_unpack = UtilityCode.load_cached("RaiseTooManyValuesToUnpack", "ObjectHandling.c") +raise_need_more_values_to_unpack = UtilityCode.load_cached("RaiseNeedMoreValuesToUnpack", "ObjectHandling.c") +tuple_unpacking_error_code = UtilityCode.load_cached("UnpackTupleError", "ObjectHandling.c") diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FlowControl.pxd b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FlowControl.pxd new file mode 100644 index 00000000000..c87370b819a --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FlowControl.pxd @@ -0,0 +1,111 @@ +from __future__ import absolute_import + +cimport cython + +from .Visitor cimport CythonTransform, TreeVisitor + +cdef class ControlBlock: + cdef public set children + cdef public set parents + cdef public set positions + cdef public list stats + cdef public dict gen + cdef public set bounded + + # Big integer bitsets + cdef public object i_input + cdef public object i_output + cdef public object i_gen + cdef public object i_kill + cdef public object i_state + + cpdef bint empty(self) + cpdef detach(self) + cpdef add_child(self, block) + +cdef class ExitBlock(ControlBlock): + cpdef bint empty(self) + +cdef class NameAssignment: + cdef public bint is_arg + cdef public bint is_deletion + cdef public object lhs + cdef public object rhs + cdef public object entry + cdef public object pos + cdef public set refs + cdef public object bit + cdef public object inferred_type + +cdef class AssignmentList: + cdef public object bit + cdef public object mask + cdef public list stats + +cdef class AssignmentCollector(TreeVisitor): + cdef list assignments + +@cython.final +cdef class ControlFlow: + cdef public set blocks + cdef public set entries + cdef public list loops + cdef public list exceptions + + cdef public ControlBlock entry_point + cdef public ExitBlock exit_point + cdef public ControlBlock block + + cdef public dict assmts + + cpdef newblock(self, ControlBlock parent=*) + cpdef nextblock(self, ControlBlock parent=*) + cpdef bint is_tracked(self, entry) + cpdef bint is_statically_assigned(self, entry) + cpdef mark_position(self, node) + cpdef mark_assignment(self, lhs, rhs, entry) + cpdef mark_argument(self, lhs, rhs, entry) + cpdef mark_deletion(self, node, entry) + cpdef mark_reference(self, node, entry) + + @cython.locals(block=ControlBlock, parent=ControlBlock, unreachable=set) + cpdef normalize(self) + + @cython.locals(bit=object, assmts=AssignmentList, + block=ControlBlock) + cpdef initialize(self) + + @cython.locals(assmts=AssignmentList, assmt=NameAssignment) + cpdef set map_one(self, istate, entry) + + @cython.locals(block=ControlBlock, parent=ControlBlock) + cdef reaching_definitions(self) + +cdef class Uninitialized: + pass + +cdef class Unknown: + pass + + +cdef class MessageCollection: + cdef set messages + + +@cython.locals(dirty=bint, block=ControlBlock, parent=ControlBlock, + assmt=NameAssignment) +cdef check_definitions(ControlFlow flow, dict compiler_directives) + +@cython.final +cdef class ControlFlowAnalysis(CythonTransform): + cdef object gv_ctx + cdef object constant_folder + cdef set reductions + cdef list env_stack + cdef list stack + cdef object env + cdef ControlFlow flow + cdef bint in_inplace_assignment + + cpdef mark_assignment(self, lhs, rhs=*) + cpdef mark_position(self, node) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FlowControl.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FlowControl.py new file mode 100644 index 00000000000..df04471f90e --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FlowControl.py @@ -0,0 +1,1325 @@ +from __future__ import absolute_import + +import cython +cython.declare(PyrexTypes=object, ExprNodes=object, Nodes=object, + Builtin=object, InternalError=object, error=object, warning=object, + py_object_type=object, unspecified_type=object, + object_expr=object, fake_rhs_expr=object, TypedExprNode=object) + +from . import Builtin +from . import ExprNodes +from . import Nodes +from . import Options +from .PyrexTypes import py_object_type, unspecified_type +from . import PyrexTypes + +from .Visitor import TreeVisitor, CythonTransform +from .Errors import error, warning, InternalError +from .Optimize import ConstantFolding + + +class TypedExprNode(ExprNodes.ExprNode): + # Used for declaring assignments of a specified type without a known entry. + def __init__(self, type, may_be_none=None, pos=None): + super(TypedExprNode, self).__init__(pos) + self.type = type + self._may_be_none = may_be_none + + def may_be_none(self): + return self._may_be_none != False + +object_expr = TypedExprNode(py_object_type, may_be_none=True) +# Fake rhs to silence "unused variable" warning +fake_rhs_expr = TypedExprNode(unspecified_type) + + +class ControlBlock(object): + """Control flow graph node. Sequence of assignments and name references. + + children set of children nodes + parents set of parent nodes + positions set of position markers + + stats list of block statements + gen dict of assignments generated by this block + bounded set of entries that are definitely bounded in this block + + Example: + + a = 1 + b = a + c # 'c' is already bounded or exception here + + stats = [Assignment(a), NameReference(a), NameReference(c), + Assignment(b)] + gen = {Entry(a): Assignment(a), Entry(b): Assignment(b)} + bounded = set([Entry(a), Entry(c)]) + + """ + + def __init__(self): + self.children = set() + self.parents = set() + self.positions = set() + + self.stats = [] + self.gen = {} + self.bounded = set() + + self.i_input = 0 + self.i_output = 0 + self.i_gen = 0 + self.i_kill = 0 + self.i_state = 0 + + def empty(self): + return (not self.stats and not self.positions) + + def detach(self): + """Detach block from parents and children.""" + for child in self.children: + child.parents.remove(self) + for parent in self.parents: + parent.children.remove(self) + self.parents.clear() + self.children.clear() + + def add_child(self, block): + self.children.add(block) + block.parents.add(self) + + +class ExitBlock(ControlBlock): + """Non-empty exit point block.""" + + def empty(self): + return False + + +class AssignmentList(object): + def __init__(self): + self.stats = [] + + +class ControlFlow(object): + """Control-flow graph. + + entry_point ControlBlock entry point for this graph + exit_point ControlBlock normal exit point + block ControlBlock current block + blocks set children nodes + entries set tracked entries + loops list stack for loop descriptors + exceptions list stack for exception descriptors + """ + + def __init__(self): + self.blocks = set() + self.entries = set() + self.loops = [] + self.exceptions = [] + + self.entry_point = ControlBlock() + self.exit_point = ExitBlock() + self.blocks.add(self.exit_point) + self.block = self.entry_point + + def newblock(self, parent=None): + """Create floating block linked to `parent` if given. + + NOTE: Block is NOT added to self.blocks + """ + block = ControlBlock() + self.blocks.add(block) + if parent: + parent.add_child(block) + return block + + def nextblock(self, parent=None): + """Create block children block linked to current or `parent` if given. + + NOTE: Block is added to self.blocks + """ + block = ControlBlock() + self.blocks.add(block) + if parent: + parent.add_child(block) + elif self.block: + self.block.add_child(block) + self.block = block + return self.block + + def is_tracked(self, entry): + if entry.is_anonymous: + return False + return (entry.is_local or entry.is_pyclass_attr or entry.is_arg or + entry.from_closure or entry.in_closure or + entry.error_on_uninitialized) + + def is_statically_assigned(self, entry): + if (entry.is_local and entry.is_variable and + (entry.type.is_struct_or_union or + entry.type.is_complex or + entry.type.is_array or + entry.type.is_cpp_class)): + # stack allocated structured variable => never uninitialised + return True + return False + + def mark_position(self, node): + """Mark position, will be used to draw graph nodes.""" + if self.block: + self.block.positions.add(node.pos[:2]) + + def mark_assignment(self, lhs, rhs, entry): + if self.block and self.is_tracked(entry): + assignment = NameAssignment(lhs, rhs, entry) + self.block.stats.append(assignment) + self.block.gen[entry] = assignment + self.entries.add(entry) + + def mark_argument(self, lhs, rhs, entry): + if self.block and self.is_tracked(entry): + assignment = Argument(lhs, rhs, entry) + self.block.stats.append(assignment) + self.block.gen[entry] = assignment + self.entries.add(entry) + + def mark_deletion(self, node, entry): + if self.block and self.is_tracked(entry): + assignment = NameDeletion(node, entry) + self.block.stats.append(assignment) + self.block.gen[entry] = Uninitialized + self.entries.add(entry) + + def mark_reference(self, node, entry): + if self.block and self.is_tracked(entry): + self.block.stats.append(NameReference(node, entry)) + ## XXX: We don't track expression evaluation order so we can't use + ## XXX: successful reference as initialization sign. + ## # Local variable is definitely bound after this reference + ## if not node.allow_null: + ## self.block.bounded.add(entry) + self.entries.add(entry) + + def normalize(self): + """Delete unreachable and orphan blocks.""" + queue = set([self.entry_point]) + visited = set() + while queue: + root = queue.pop() + visited.add(root) + for child in root.children: + if child not in visited: + queue.add(child) + unreachable = self.blocks - visited + for block in unreachable: + block.detach() + visited.remove(self.entry_point) + for block in visited: + if block.empty(): + for parent in block.parents: # Re-parent + for child in block.children: + parent.add_child(child) + block.detach() + unreachable.add(block) + self.blocks -= unreachable + + def initialize(self): + """Set initial state, map assignments to bits.""" + self.assmts = {} + + bit = 1 + for entry in self.entries: + assmts = AssignmentList() + assmts.mask = assmts.bit = bit + self.assmts[entry] = assmts + bit <<= 1 + + for block in self.blocks: + for stat in block.stats: + if isinstance(stat, NameAssignment): + stat.bit = bit + assmts = self.assmts[stat.entry] + assmts.stats.append(stat) + assmts.mask |= bit + bit <<= 1 + + for block in self.blocks: + for entry, stat in block.gen.items(): + assmts = self.assmts[entry] + if stat is Uninitialized: + block.i_gen |= assmts.bit + else: + block.i_gen |= stat.bit + block.i_kill |= assmts.mask + block.i_output = block.i_gen + for entry in block.bounded: + block.i_kill |= self.assmts[entry].bit + + for assmts in self.assmts.values(): + self.entry_point.i_gen |= assmts.bit + self.entry_point.i_output = self.entry_point.i_gen + + def map_one(self, istate, entry): + ret = set() + assmts = self.assmts[entry] + if istate & assmts.bit: + if self.is_statically_assigned(entry): + ret.add(StaticAssignment(entry)) + elif entry.from_closure: + ret.add(Unknown) + else: + ret.add(Uninitialized) + for assmt in assmts.stats: + if istate & assmt.bit: + ret.add(assmt) + return ret + + def reaching_definitions(self): + """Per-block reaching definitions analysis.""" + dirty = True + while dirty: + dirty = False + for block in self.blocks: + i_input = 0 + for parent in block.parents: + i_input |= parent.i_output + i_output = (i_input & ~block.i_kill) | block.i_gen + if i_output != block.i_output: + dirty = True + block.i_input = i_input + block.i_output = i_output + + +class LoopDescr(object): + def __init__(self, next_block, loop_block): + self.next_block = next_block + self.loop_block = loop_block + self.exceptions = [] + + +class ExceptionDescr(object): + """Exception handling helper. + + entry_point ControlBlock Exception handling entry point + finally_enter ControlBlock Normal finally clause entry point + finally_exit ControlBlock Normal finally clause exit point + """ + + def __init__(self, entry_point, finally_enter=None, finally_exit=None): + self.entry_point = entry_point + self.finally_enter = finally_enter + self.finally_exit = finally_exit + + +class NameAssignment(object): + def __init__(self, lhs, rhs, entry): + if lhs.cf_state is None: + lhs.cf_state = set() + self.lhs = lhs + self.rhs = rhs + self.entry = entry + self.pos = lhs.pos + self.refs = set() + self.is_arg = False + self.is_deletion = False + self.inferred_type = None + + def __repr__(self): + return '%s(entry=%r)' % (self.__class__.__name__, self.entry) + + def infer_type(self): + self.inferred_type = self.rhs.infer_type(self.entry.scope) + return self.inferred_type + + def type_dependencies(self): + return self.rhs.type_dependencies(self.entry.scope) + + @property + def type(self): + if not self.entry.type.is_unspecified: + return self.entry.type + return self.inferred_type + + +class StaticAssignment(NameAssignment): + """Initialised at declaration time, e.g. stack allocation.""" + def __init__(self, entry): + if not entry.type.is_pyobject: + may_be_none = False + else: + may_be_none = None # unknown + lhs = TypedExprNode( + entry.type, may_be_none=may_be_none, pos=entry.pos) + super(StaticAssignment, self).__init__(lhs, lhs, entry) + + def infer_type(self): + return self.entry.type + + def type_dependencies(self): + return () + + +class Argument(NameAssignment): + def __init__(self, lhs, rhs, entry): + NameAssignment.__init__(self, lhs, rhs, entry) + self.is_arg = True + + +class NameDeletion(NameAssignment): + def __init__(self, lhs, entry): + NameAssignment.__init__(self, lhs, lhs, entry) + self.is_deletion = True + + def infer_type(self): + inferred_type = self.rhs.infer_type(self.entry.scope) + if (not inferred_type.is_pyobject and + inferred_type.can_coerce_to_pyobject(self.entry.scope)): + return py_object_type + self.inferred_type = inferred_type + return inferred_type + + +class Uninitialized(object): + """Definitely not initialised yet.""" + + +class Unknown(object): + """Coming from outer closure, might be initialised or not.""" + + +class NameReference(object): + def __init__(self, node, entry): + if node.cf_state is None: + node.cf_state = set() + self.node = node + self.entry = entry + self.pos = node.pos + + def __repr__(self): + return '%s(entry=%r)' % (self.__class__.__name__, self.entry) + + +class ControlFlowState(list): + # Keeps track of Node's entry assignments + # + # cf_is_null [boolean] It is uninitialized + # cf_maybe_null [boolean] May be uninitialized + # is_single [boolean] Has only one assignment at this point + + cf_maybe_null = False + cf_is_null = False + is_single = False + + def __init__(self, state): + if Uninitialized in state: + state.discard(Uninitialized) + self.cf_maybe_null = True + if not state: + self.cf_is_null = True + elif Unknown in state: + state.discard(Unknown) + self.cf_maybe_null = True + else: + if len(state) == 1: + self.is_single = True + # XXX: Remove fake_rhs_expr + super(ControlFlowState, self).__init__( + [i for i in state if i.rhs is not fake_rhs_expr]) + + def one(self): + return self[0] + + +class GVContext(object): + """Graphviz subgraph object.""" + + def __init__(self): + self.blockids = {} + self.nextid = 0 + self.children = [] + self.sources = {} + + def add(self, child): + self.children.append(child) + + def nodeid(self, block): + if block not in self.blockids: + self.blockids[block] = 'block%d' % self.nextid + self.nextid += 1 + return self.blockids[block] + + def extract_sources(self, block): + if not block.positions: + return '' + start = min(block.positions) + stop = max(block.positions) + srcdescr = start[0] + if not srcdescr in self.sources: + self.sources[srcdescr] = list(srcdescr.get_lines()) + lines = self.sources[srcdescr] + return '\\n'.join([l.strip() for l in lines[start[1] - 1:stop[1]]]) + + def render(self, fp, name, annotate_defs=False): + """Render graphviz dot graph""" + fp.write('digraph %s {\n' % name) + fp.write(' node [shape=box];\n') + for child in self.children: + child.render(fp, self, annotate_defs) + fp.write('}\n') + + def escape(self, text): + return text.replace('"', '\\"').replace('\n', '\\n') + + +class GV(object): + """Graphviz DOT renderer.""" + + def __init__(self, name, flow): + self.name = name + self.flow = flow + + def render(self, fp, ctx, annotate_defs=False): + fp.write(' subgraph %s {\n' % self.name) + for block in self.flow.blocks: + label = ctx.extract_sources(block) + if annotate_defs: + for stat in block.stats: + if isinstance(stat, NameAssignment): + label += '\n %s [%s %s]' % ( + stat.entry.name, 'deletion' if stat.is_deletion else 'definition', stat.pos[1]) + elif isinstance(stat, NameReference): + if stat.entry: + label += '\n %s [reference %s]' % (stat.entry.name, stat.pos[1]) + if not label: + label = 'empty' + pid = ctx.nodeid(block) + fp.write(' %s [label="%s"];\n' % (pid, ctx.escape(label))) + for block in self.flow.blocks: + pid = ctx.nodeid(block) + for child in block.children: + fp.write(' %s -> %s;\n' % (pid, ctx.nodeid(child))) + fp.write(' }\n') + + +class MessageCollection(object): + """Collect error/warnings messages first then sort""" + def __init__(self): + self.messages = set() + + def error(self, pos, message): + self.messages.add((pos, True, message)) + + def warning(self, pos, message): + self.messages.add((pos, False, message)) + + def report(self): + for pos, is_error, message in sorted(self.messages): + if is_error: + error(pos, message) + else: + warning(pos, message, 2) + + +def check_definitions(flow, compiler_directives): + flow.initialize() + flow.reaching_definitions() + + # Track down state + assignments = set() + # Node to entry map + references = {} + assmt_nodes = set() + + for block in flow.blocks: + i_state = block.i_input + for stat in block.stats: + i_assmts = flow.assmts[stat.entry] + state = flow.map_one(i_state, stat.entry) + if isinstance(stat, NameAssignment): + stat.lhs.cf_state.update(state) + assmt_nodes.add(stat.lhs) + i_state = i_state & ~i_assmts.mask + if stat.is_deletion: + i_state |= i_assmts.bit + else: + i_state |= stat.bit + assignments.add(stat) + if stat.rhs is not fake_rhs_expr: + stat.entry.cf_assignments.append(stat) + elif isinstance(stat, NameReference): + references[stat.node] = stat.entry + stat.entry.cf_references.append(stat) + stat.node.cf_state.update(state) + ## if not stat.node.allow_null: + ## i_state &= ~i_assmts.bit + ## # after successful read, the state is known to be initialised + state.discard(Uninitialized) + state.discard(Unknown) + for assmt in state: + assmt.refs.add(stat) + + # Check variable usage + warn_maybe_uninitialized = compiler_directives['warn.maybe_uninitialized'] + warn_unused_result = compiler_directives['warn.unused_result'] + warn_unused = compiler_directives['warn.unused'] + warn_unused_arg = compiler_directives['warn.unused_arg'] + + messages = MessageCollection() + + # assignment hints + for node in assmt_nodes: + if Uninitialized in node.cf_state: + node.cf_maybe_null = True + if len(node.cf_state) == 1: + node.cf_is_null = True + else: + node.cf_is_null = False + elif Unknown in node.cf_state: + node.cf_maybe_null = True + else: + node.cf_is_null = False + node.cf_maybe_null = False + + # Find uninitialized references and cf-hints + for node, entry in references.items(): + if Uninitialized in node.cf_state: + node.cf_maybe_null = True + if not entry.from_closure and len(node.cf_state) == 1: + node.cf_is_null = True + if (node.allow_null or entry.from_closure + or entry.is_pyclass_attr or entry.type.is_error): + pass # Can be uninitialized here + elif node.cf_is_null: + if entry.error_on_uninitialized or ( + Options.error_on_uninitialized and ( + entry.type.is_pyobject or entry.type.is_unspecified)): + messages.error( + node.pos, + "local variable '%s' referenced before assignment" + % entry.name) + else: + messages.warning( + node.pos, + "local variable '%s' referenced before assignment" + % entry.name) + elif warn_maybe_uninitialized: + messages.warning( + node.pos, + "local variable '%s' might be referenced before assignment" + % entry.name) + elif Unknown in node.cf_state: + # TODO: better cross-closure analysis to know when inner functions + # are being called before a variable is being set, and when + # a variable is known to be set before even defining the + # inner function, etc. + node.cf_maybe_null = True + else: + node.cf_is_null = False + node.cf_maybe_null = False + + # Unused result + for assmt in assignments: + if (not assmt.refs and not assmt.entry.is_pyclass_attr + and not assmt.entry.in_closure): + if assmt.entry.cf_references and warn_unused_result: + if assmt.is_arg: + messages.warning(assmt.pos, "Unused argument value '%s'" % + assmt.entry.name) + else: + messages.warning(assmt.pos, "Unused result in '%s'" % + assmt.entry.name) + assmt.lhs.cf_used = False + + # Unused entries + for entry in flow.entries: + if (not entry.cf_references + and not entry.is_pyclass_attr): + if entry.name != '_' and not entry.name.startswith('unused'): + # '_' is often used for unused variables, e.g. in loops + if entry.is_arg: + if warn_unused_arg: + messages.warning(entry.pos, "Unused argument '%s'" % + entry.name) + else: + if warn_unused: + messages.warning(entry.pos, "Unused entry '%s'" % + entry.name) + entry.cf_used = False + + messages.report() + + for node in assmt_nodes: + node.cf_state = ControlFlowState(node.cf_state) + for node in references: + node.cf_state = ControlFlowState(node.cf_state) + + +class AssignmentCollector(TreeVisitor): + def __init__(self): + super(AssignmentCollector, self).__init__() + self.assignments = [] + + def visit_Node(self): + self._visitchildren(self, None) + + def visit_SingleAssignmentNode(self, node): + self.assignments.append((node.lhs, node.rhs)) + + def visit_CascadedAssignmentNode(self, node): + for lhs in node.lhs_list: + self.assignments.append((lhs, node.rhs)) + + +class ControlFlowAnalysis(CythonTransform): + + def visit_ModuleNode(self, node): + self.gv_ctx = GVContext() + self.constant_folder = ConstantFolding() + + # Set of NameNode reductions + self.reductions = set() + + self.in_inplace_assignment = False + self.env_stack = [] + self.env = node.scope + self.stack = [] + self.flow = ControlFlow() + self.visitchildren(node) + + check_definitions(self.flow, self.current_directives) + + dot_output = self.current_directives['control_flow.dot_output'] + if dot_output: + annotate_defs = self.current_directives['control_flow.dot_annotate_defs'] + fp = open(dot_output, 'wt') + try: + self.gv_ctx.render(fp, 'module', annotate_defs=annotate_defs) + finally: + fp.close() + return node + + def visit_FuncDefNode(self, node): + for arg in node.args: + if arg.default: + self.visitchildren(arg) + self.visitchildren(node, ('decorators',)) + self.env_stack.append(self.env) + self.env = node.local_scope + self.stack.append(self.flow) + self.flow = ControlFlow() + + # Collect all entries + for entry in node.local_scope.entries.values(): + if self.flow.is_tracked(entry): + self.flow.entries.add(entry) + + self.mark_position(node) + # Function body block + self.flow.nextblock() + + for arg in node.args: + self._visit(arg) + if node.star_arg: + self.flow.mark_argument(node.star_arg, + TypedExprNode(Builtin.tuple_type, + may_be_none=False), + node.star_arg.entry) + if node.starstar_arg: + self.flow.mark_argument(node.starstar_arg, + TypedExprNode(Builtin.dict_type, + may_be_none=False), + node.starstar_arg.entry) + self._visit(node.body) + # Workaround for generators + if node.is_generator: + self._visit(node.gbody.body) + + # Exit point + if self.flow.block: + self.flow.block.add_child(self.flow.exit_point) + + # Cleanup graph + self.flow.normalize() + check_definitions(self.flow, self.current_directives) + self.flow.blocks.add(self.flow.entry_point) + + self.gv_ctx.add(GV(node.local_scope.name, self.flow)) + + self.flow = self.stack.pop() + self.env = self.env_stack.pop() + return node + + def visit_DefNode(self, node): + node.used = True + return self.visit_FuncDefNode(node) + + def visit_GeneratorBodyDefNode(self, node): + return node + + def visit_CTypeDefNode(self, node): + return node + + def mark_assignment(self, lhs, rhs=None): + if not self.flow.block: + return + if self.flow.exceptions: + exc_descr = self.flow.exceptions[-1] + self.flow.block.add_child(exc_descr.entry_point) + self.flow.nextblock() + + if not rhs: + rhs = object_expr + if lhs.is_name: + if lhs.entry is not None: + entry = lhs.entry + else: + entry = self.env.lookup(lhs.name) + if entry is None: # TODO: This shouldn't happen... + return + self.flow.mark_assignment(lhs, rhs, entry) + elif lhs.is_sequence_constructor: + for i, arg in enumerate(lhs.args): + if not rhs or arg.is_starred: + item_node = None + else: + item_node = rhs.inferable_item_node(i) + self.mark_assignment(arg, item_node) + else: + self._visit(lhs) + + if self.flow.exceptions: + exc_descr = self.flow.exceptions[-1] + self.flow.block.add_child(exc_descr.entry_point) + self.flow.nextblock() + + def mark_position(self, node): + """Mark position if DOT output is enabled.""" + if self.current_directives['control_flow.dot_output']: + self.flow.mark_position(node) + + def visit_FromImportStatNode(self, node): + for name, target in node.items: + if name != "*": + self.mark_assignment(target) + self.visitchildren(node) + return node + + def visit_AssignmentNode(self, node): + raise InternalError("Unhandled assignment node") + + def visit_SingleAssignmentNode(self, node): + self._visit(node.rhs) + self.mark_assignment(node.lhs, node.rhs) + return node + + def visit_CascadedAssignmentNode(self, node): + self._visit(node.rhs) + for lhs in node.lhs_list: + self.mark_assignment(lhs, node.rhs) + return node + + def visit_ParallelAssignmentNode(self, node): + collector = AssignmentCollector() + collector.visitchildren(node) + for lhs, rhs in collector.assignments: + self._visit(rhs) + for lhs, rhs in collector.assignments: + self.mark_assignment(lhs, rhs) + return node + + def visit_InPlaceAssignmentNode(self, node): + self.in_inplace_assignment = True + self.visitchildren(node) + self.in_inplace_assignment = False + self.mark_assignment(node.lhs, self.constant_folder(node.create_binop_node())) + return node + + def visit_DelStatNode(self, node): + for arg in node.args: + if arg.is_name: + entry = arg.entry or self.env.lookup(arg.name) + if entry.in_closure or entry.from_closure: + error(arg.pos, + "can not delete variable '%s' " + "referenced in nested scope" % entry.name) + if not node.ignore_nonexisting: + self._visit(arg) # mark reference + self.flow.mark_deletion(arg, entry) + else: + self._visit(arg) + return node + + def visit_CArgDeclNode(self, node): + entry = self.env.lookup(node.name) + if entry: + may_be_none = not node.not_none + self.flow.mark_argument( + node, TypedExprNode(entry.type, may_be_none), entry) + return node + + def visit_NameNode(self, node): + if self.flow.block: + entry = node.entry or self.env.lookup(node.name) + if entry: + self.flow.mark_reference(node, entry) + + if entry in self.reductions and not self.in_inplace_assignment: + error(node.pos, + "Cannot read reduction variable in loop body") + + return node + + def visit_StatListNode(self, node): + if self.flow.block: + for stat in node.stats: + self._visit(stat) + if not self.flow.block: + stat.is_terminator = True + break + return node + + def visit_Node(self, node): + self.visitchildren(node) + self.mark_position(node) + return node + + def visit_SizeofVarNode(self, node): + return node + + def visit_TypeidNode(self, node): + return node + + def visit_IfStatNode(self, node): + next_block = self.flow.newblock() + parent = self.flow.block + # If clauses + for clause in node.if_clauses: + parent = self.flow.nextblock(parent) + self._visit(clause.condition) + self.flow.nextblock() + self._visit(clause.body) + if self.flow.block: + self.flow.block.add_child(next_block) + # Else clause + if node.else_clause: + self.flow.nextblock(parent=parent) + self._visit(node.else_clause) + if self.flow.block: + self.flow.block.add_child(next_block) + else: + parent.add_child(next_block) + + if next_block.parents: + self.flow.block = next_block + else: + self.flow.block = None + return node + + def visit_WhileStatNode(self, node): + condition_block = self.flow.nextblock() + next_block = self.flow.newblock() + # Condition block + self.flow.loops.append(LoopDescr(next_block, condition_block)) + if node.condition: + self._visit(node.condition) + # Body block + self.flow.nextblock() + self._visit(node.body) + self.flow.loops.pop() + # Loop it + if self.flow.block: + self.flow.block.add_child(condition_block) + self.flow.block.add_child(next_block) + # Else clause + if node.else_clause: + self.flow.nextblock(parent=condition_block) + self._visit(node.else_clause) + if self.flow.block: + self.flow.block.add_child(next_block) + else: + condition_block.add_child(next_block) + + if next_block.parents: + self.flow.block = next_block + else: + self.flow.block = None + return node + + def mark_forloop_target(self, node): + # TODO: Remove redundancy with range optimization... + is_special = False + sequence = node.iterator.sequence + target = node.target + if isinstance(sequence, ExprNodes.SimpleCallNode): + function = sequence.function + if sequence.self is None and function.is_name: + entry = self.env.lookup(function.name) + if not entry or entry.is_builtin: + if function.name == 'reversed' and len(sequence.args) == 1: + sequence = sequence.args[0] + elif function.name == 'enumerate' and len(sequence.args) == 1: + if target.is_sequence_constructor and len(target.args) == 2: + iterator = sequence.args[0] + if iterator.is_name: + iterator_type = iterator.infer_type(self.env) + if iterator_type.is_builtin_type: + # assume that builtin types have a length within Py_ssize_t + self.mark_assignment( + target.args[0], + ExprNodes.IntNode(target.pos, value='PY_SSIZE_T_MAX', + type=PyrexTypes.c_py_ssize_t_type)) + target = target.args[1] + sequence = sequence.args[0] + if isinstance(sequence, ExprNodes.SimpleCallNode): + function = sequence.function + if sequence.self is None and function.is_name: + entry = self.env.lookup(function.name) + if not entry or entry.is_builtin: + if function.name in ('range', 'xrange'): + is_special = True + for arg in sequence.args[:2]: + self.mark_assignment(target, arg) + if len(sequence.args) > 2: + self.mark_assignment(target, self.constant_folder( + ExprNodes.binop_node(node.pos, + '+', + sequence.args[0], + sequence.args[2]))) + + if not is_special: + # A for-loop basically translates to subsequent calls to + # __getitem__(), so using an IndexNode here allows us to + # naturally infer the base type of pointers, C arrays, + # Python strings, etc., while correctly falling back to an + # object type when the base type cannot be handled. + + self.mark_assignment(target, node.item) + + def visit_AsyncForStatNode(self, node): + return self.visit_ForInStatNode(node) + + def visit_ForInStatNode(self, node): + condition_block = self.flow.nextblock() + next_block = self.flow.newblock() + # Condition with iterator + self.flow.loops.append(LoopDescr(next_block, condition_block)) + self._visit(node.iterator) + # Target assignment + self.flow.nextblock() + + if isinstance(node, Nodes.ForInStatNode): + self.mark_forloop_target(node) + elif isinstance(node, Nodes.AsyncForStatNode): + # not entirely correct, but good enough for now + self.mark_assignment(node.target, node.item) + else: # Parallel + self.mark_assignment(node.target) + + # Body block + if isinstance(node, Nodes.ParallelRangeNode): + # In case of an invalid + self._delete_privates(node, exclude=node.target.entry) + + self.flow.nextblock() + self._visit(node.body) + self.flow.loops.pop() + + # Loop it + if self.flow.block: + self.flow.block.add_child(condition_block) + # Else clause + if node.else_clause: + self.flow.nextblock(parent=condition_block) + self._visit(node.else_clause) + if self.flow.block: + self.flow.block.add_child(next_block) + else: + condition_block.add_child(next_block) + + if next_block.parents: + self.flow.block = next_block + else: + self.flow.block = None + return node + + def _delete_privates(self, node, exclude=None): + for private_node in node.assigned_nodes: + if not exclude or private_node.entry is not exclude: + self.flow.mark_deletion(private_node, private_node.entry) + + def visit_ParallelRangeNode(self, node): + reductions = self.reductions + + # if node.target is None or not a NameNode, an error will have + # been previously issued + if hasattr(node.target, 'entry'): + self.reductions = set(reductions) + + for private_node in node.assigned_nodes: + private_node.entry.error_on_uninitialized = True + pos, reduction = node.assignments[private_node.entry] + if reduction: + self.reductions.add(private_node.entry) + + node = self.visit_ForInStatNode(node) + + self.reductions = reductions + return node + + def visit_ParallelWithBlockNode(self, node): + for private_node in node.assigned_nodes: + private_node.entry.error_on_uninitialized = True + + self._delete_privates(node) + self.visitchildren(node) + self._delete_privates(node) + + return node + + def visit_ForFromStatNode(self, node): + condition_block = self.flow.nextblock() + next_block = self.flow.newblock() + # Condition with iterator + self.flow.loops.append(LoopDescr(next_block, condition_block)) + self._visit(node.bound1) + self._visit(node.bound2) + if node.step is not None: + self._visit(node.step) + # Target assignment + self.flow.nextblock() + self.mark_assignment(node.target, node.bound1) + if node.step is not None: + self.mark_assignment(node.target, self.constant_folder( + ExprNodes.binop_node(node.pos, '+', node.bound1, node.step))) + # Body block + self.flow.nextblock() + self._visit(node.body) + self.flow.loops.pop() + # Loop it + if self.flow.block: + self.flow.block.add_child(condition_block) + # Else clause + if node.else_clause: + self.flow.nextblock(parent=condition_block) + self._visit(node.else_clause) + if self.flow.block: + self.flow.block.add_child(next_block) + else: + condition_block.add_child(next_block) + + if next_block.parents: + self.flow.block = next_block + else: + self.flow.block = None + return node + + def visit_LoopNode(self, node): + raise InternalError("Generic loops are not supported") + + def visit_WithTargetAssignmentStatNode(self, node): + self.mark_assignment(node.lhs, node.with_node.enter_call) + return node + + def visit_WithStatNode(self, node): + self._visit(node.manager) + self._visit(node.enter_call) + self._visit(node.body) + return node + + def visit_TryExceptStatNode(self, node): + # After exception handling + next_block = self.flow.newblock() + # Body block + self.flow.newblock() + # Exception entry point + entry_point = self.flow.newblock() + self.flow.exceptions.append(ExceptionDescr(entry_point)) + self.flow.nextblock() + ## XXX: links to exception handling point should be added by + ## XXX: children nodes + self.flow.block.add_child(entry_point) + self.flow.nextblock() + self._visit(node.body) + self.flow.exceptions.pop() + + # After exception + if self.flow.block: + if node.else_clause: + self.flow.nextblock() + self._visit(node.else_clause) + if self.flow.block: + self.flow.block.add_child(next_block) + + for clause in node.except_clauses: + self.flow.block = entry_point + if clause.pattern: + for pattern in clause.pattern: + self._visit(pattern) + else: + # TODO: handle * pattern + pass + entry_point = self.flow.newblock(parent=self.flow.block) + self.flow.nextblock() + if clause.target: + self.mark_assignment(clause.target) + self._visit(clause.body) + if self.flow.block: + self.flow.block.add_child(next_block) + + if self.flow.exceptions: + entry_point.add_child(self.flow.exceptions[-1].entry_point) + + if next_block.parents: + self.flow.block = next_block + else: + self.flow.block = None + return node + + def visit_TryFinallyStatNode(self, node): + body_block = self.flow.nextblock() + + # Exception entry point + entry_point = self.flow.newblock() + self.flow.block = entry_point + self._visit(node.finally_except_clause) + + if self.flow.block and self.flow.exceptions: + self.flow.block.add_child(self.flow.exceptions[-1].entry_point) + + # Normal execution + finally_enter = self.flow.newblock() + self.flow.block = finally_enter + self._visit(node.finally_clause) + finally_exit = self.flow.block + + descr = ExceptionDescr(entry_point, finally_enter, finally_exit) + self.flow.exceptions.append(descr) + if self.flow.loops: + self.flow.loops[-1].exceptions.append(descr) + self.flow.block = body_block + body_block.add_child(entry_point) + self.flow.nextblock() + self._visit(node.body) + self.flow.exceptions.pop() + if self.flow.loops: + self.flow.loops[-1].exceptions.pop() + + if self.flow.block: + self.flow.block.add_child(finally_enter) + if finally_exit: + self.flow.block = self.flow.nextblock(parent=finally_exit) + else: + self.flow.block = None + return node + + def visit_RaiseStatNode(self, node): + self.mark_position(node) + self.visitchildren(node) + if self.flow.exceptions: + self.flow.block.add_child(self.flow.exceptions[-1].entry_point) + self.flow.block = None + return node + + def visit_ReraiseStatNode(self, node): + self.mark_position(node) + if self.flow.exceptions: + self.flow.block.add_child(self.flow.exceptions[-1].entry_point) + self.flow.block = None + return node + + def visit_ReturnStatNode(self, node): + self.mark_position(node) + self.visitchildren(node) + + outer_exception_handlers = iter(self.flow.exceptions[::-1]) + for handler in outer_exception_handlers: + if handler.finally_enter: + self.flow.block.add_child(handler.finally_enter) + if handler.finally_exit: + # 'return' goes to function exit, or to the next outer 'finally' clause + exit_point = self.flow.exit_point + for next_handler in outer_exception_handlers: + if next_handler.finally_enter: + exit_point = next_handler.finally_enter + break + handler.finally_exit.add_child(exit_point) + break + else: + if self.flow.block: + self.flow.block.add_child(self.flow.exit_point) + self.flow.block = None + return node + + def visit_BreakStatNode(self, node): + if not self.flow.loops: + #error(node.pos, "break statement not inside loop") + return node + loop = self.flow.loops[-1] + self.mark_position(node) + for exception in loop.exceptions[::-1]: + if exception.finally_enter: + self.flow.block.add_child(exception.finally_enter) + if exception.finally_exit: + exception.finally_exit.add_child(loop.next_block) + break + else: + self.flow.block.add_child(loop.next_block) + self.flow.block = None + return node + + def visit_ContinueStatNode(self, node): + if not self.flow.loops: + #error(node.pos, "continue statement not inside loop") + return node + loop = self.flow.loops[-1] + self.mark_position(node) + for exception in loop.exceptions[::-1]: + if exception.finally_enter: + self.flow.block.add_child(exception.finally_enter) + if exception.finally_exit: + exception.finally_exit.add_child(loop.loop_block) + break + else: + self.flow.block.add_child(loop.loop_block) + self.flow.block = None + return node + + def visit_ComprehensionNode(self, node): + if node.expr_scope: + self.env_stack.append(self.env) + self.env = node.expr_scope + # Skip append node here + self._visit(node.loop) + if node.expr_scope: + self.env = self.env_stack.pop() + return node + + def visit_ScopedExprNode(self, node): + if node.expr_scope: + self.env_stack.append(self.env) + self.env = node.expr_scope + self.visitchildren(node) + if node.expr_scope: + self.env = self.env_stack.pop() + return node + + def visit_PyClassDefNode(self, node): + self.visitchildren(node, ('dict', 'metaclass', + 'mkw', 'bases', 'class_result')) + self.flow.mark_assignment(node.target, node.classobj, + self.env.lookup(node.name)) + self.env_stack.append(self.env) + self.env = node.scope + self.flow.nextblock() + self.visitchildren(node, ('body',)) + self.flow.nextblock() + self.env = self.env_stack.pop() + return node + + def visit_AmpersandNode(self, node): + if node.operand.is_name: + # Fake assignment to silence warning + self.mark_assignment(node.operand, fake_rhs_expr) + self.visitchildren(node) + return node diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FusedNode.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FusedNode.py new file mode 100644 index 00000000000..26d6ffd3d65 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FusedNode.py @@ -0,0 +1,901 @@ +from __future__ import absolute_import + +import copy + +from . import (ExprNodes, PyrexTypes, MemoryView, + ParseTreeTransforms, StringEncoding, Errors) +from .ExprNodes import CloneNode, ProxyNode, TupleNode +from .Nodes import FuncDefNode, CFuncDefNode, StatListNode, DefNode +from ..Utils import OrderedSet + + +class FusedCFuncDefNode(StatListNode): + """ + This node replaces a function with fused arguments. It deep-copies the + function for every permutation of fused types, and allocates a new local + scope for it. It keeps track of the original function in self.node, and + the entry of the original function in the symbol table is given the + 'fused_cfunction' attribute which points back to us. + Then when a function lookup occurs (to e.g. call it), the call can be + dispatched to the right function. + + node FuncDefNode the original function + nodes [FuncDefNode] list of copies of node with different specific types + py_func DefNode the fused python function subscriptable from + Python space + __signatures__ A DictNode mapping signature specialization strings + to PyCFunction nodes + resulting_fused_function PyCFunction for the fused DefNode that delegates + to specializations + fused_func_assignment Assignment of the fused function to the function name + defaults_tuple TupleNode of defaults (letting PyCFunctionNode build + defaults would result in many different tuples) + specialized_pycfuncs List of synthesized pycfunction nodes for the + specializations + code_object CodeObjectNode shared by all specializations and the + fused function + + fused_compound_types All fused (compound) types (e.g. floating[:]) + """ + + __signatures__ = None + resulting_fused_function = None + fused_func_assignment = None + defaults_tuple = None + decorators = None + + child_attrs = StatListNode.child_attrs + [ + '__signatures__', 'resulting_fused_function', 'fused_func_assignment'] + + def __init__(self, node, env): + super(FusedCFuncDefNode, self).__init__(node.pos) + + self.nodes = [] + self.node = node + + is_def = isinstance(self.node, DefNode) + if is_def: + # self.node.decorators = [] + self.copy_def(env) + else: + self.copy_cdef(env) + + # Perform some sanity checks. If anything fails, it's a bug + for n in self.nodes: + assert not n.entry.type.is_fused + assert not n.local_scope.return_type.is_fused + if node.return_type.is_fused: + assert not n.return_type.is_fused + + if not is_def and n.cfunc_declarator.optional_arg_count: + assert n.type.op_arg_struct + + node.entry.fused_cfunction = self + # Copy the nodes as AnalyseDeclarationsTransform will prepend + # self.py_func to self.stats, as we only want specialized + # CFuncDefNodes in self.nodes + self.stats = self.nodes[:] + + def copy_def(self, env): + """ + Create a copy of the original def or lambda function for specialized + versions. + """ + fused_compound_types = PyrexTypes.unique( + [arg.type for arg in self.node.args if arg.type.is_fused]) + fused_types = self._get_fused_base_types(fused_compound_types) + permutations = PyrexTypes.get_all_specialized_permutations(fused_types) + + self.fused_compound_types = fused_compound_types + + if self.node.entry in env.pyfunc_entries: + env.pyfunc_entries.remove(self.node.entry) + + for cname, fused_to_specific in permutations: + copied_node = copy.deepcopy(self.node) + # keep signature object identity for special casing in DefNode.analyse_declarations() + copied_node.entry.signature = self.node.entry.signature + + self._specialize_function_args(copied_node.args, fused_to_specific) + copied_node.return_type = self.node.return_type.specialize( + fused_to_specific) + + copied_node.analyse_declarations(env) + # copied_node.is_staticmethod = self.node.is_staticmethod + # copied_node.is_classmethod = self.node.is_classmethod + self.create_new_local_scope(copied_node, env, fused_to_specific) + self.specialize_copied_def(copied_node, cname, self.node.entry, + fused_to_specific, fused_compound_types) + + PyrexTypes.specialize_entry(copied_node.entry, cname) + copied_node.entry.used = True + env.entries[copied_node.entry.name] = copied_node.entry + + if not self.replace_fused_typechecks(copied_node): + break + + self.orig_py_func = self.node + self.py_func = self.make_fused_cpdef(self.node, env, is_def=True) + + def copy_cdef(self, env): + """ + Create a copy of the original c(p)def function for all specialized + versions. + """ + permutations = self.node.type.get_all_specialized_permutations() + # print 'Node %s has %d specializations:' % (self.node.entry.name, + # len(permutations)) + # import pprint; pprint.pprint([d for cname, d in permutations]) + + # Prevent copying of the python function + self.orig_py_func = orig_py_func = self.node.py_func + self.node.py_func = None + if orig_py_func: + env.pyfunc_entries.remove(orig_py_func.entry) + + fused_types = self.node.type.get_fused_types() + self.fused_compound_types = fused_types + + new_cfunc_entries = [] + for cname, fused_to_specific in permutations: + copied_node = copy.deepcopy(self.node) + + # Make the types in our CFuncType specific. + type = copied_node.type.specialize(fused_to_specific) + entry = copied_node.entry + type.specialize_entry(entry, cname) + + # Reuse existing Entries (e.g. from .pxd files). + for i, orig_entry in enumerate(env.cfunc_entries): + if entry.cname == orig_entry.cname and type.same_as_resolved_type(orig_entry.type): + copied_node.entry = env.cfunc_entries[i] + if not copied_node.entry.func_cname: + copied_node.entry.func_cname = entry.func_cname + entry = copied_node.entry + type = entry.type + break + else: + new_cfunc_entries.append(entry) + + copied_node.type = type + entry.type, type.entry = type, entry + + entry.used = (entry.used or + self.node.entry.defined_in_pxd or + env.is_c_class_scope or + entry.is_cmethod) + + if self.node.cfunc_declarator.optional_arg_count: + self.node.cfunc_declarator.declare_optional_arg_struct( + type, env, fused_cname=cname) + + copied_node.return_type = type.return_type + self.create_new_local_scope(copied_node, env, fused_to_specific) + + # Make the argument types in the CFuncDeclarator specific + self._specialize_function_args(copied_node.cfunc_declarator.args, + fused_to_specific) + + # If a cpdef, declare all specialized cpdefs (this + # also calls analyse_declarations) + copied_node.declare_cpdef_wrapper(env) + if copied_node.py_func: + env.pyfunc_entries.remove(copied_node.py_func.entry) + + self.specialize_copied_def( + copied_node.py_func, cname, self.node.entry.as_variable, + fused_to_specific, fused_types) + + if not self.replace_fused_typechecks(copied_node): + break + + # replace old entry with new entries + try: + cindex = env.cfunc_entries.index(self.node.entry) + except ValueError: + env.cfunc_entries.extend(new_cfunc_entries) + else: + env.cfunc_entries[cindex:cindex+1] = new_cfunc_entries + + if orig_py_func: + self.py_func = self.make_fused_cpdef(orig_py_func, env, + is_def=False) + else: + self.py_func = orig_py_func + + def _get_fused_base_types(self, fused_compound_types): + """ + Get a list of unique basic fused types, from a list of + (possibly) compound fused types. + """ + base_types = [] + seen = set() + for fused_type in fused_compound_types: + fused_type.get_fused_types(result=base_types, seen=seen) + return base_types + + def _specialize_function_args(self, args, fused_to_specific): + for arg in args: + if arg.type.is_fused: + arg.type = arg.type.specialize(fused_to_specific) + if arg.type.is_memoryviewslice: + arg.type.validate_memslice_dtype(arg.pos) + + def create_new_local_scope(self, node, env, f2s): + """ + Create a new local scope for the copied node and append it to + self.nodes. A new local scope is needed because the arguments with the + fused types are already in the local scope, and we need the specialized + entries created after analyse_declarations on each specialized version + of the (CFunc)DefNode. + f2s is a dict mapping each fused type to its specialized version + """ + node.create_local_scope(env) + node.local_scope.fused_to_specific = f2s + + # This is copied from the original function, set it to false to + # stop recursion + node.has_fused_arguments = False + self.nodes.append(node) + + def specialize_copied_def(self, node, cname, py_entry, f2s, fused_compound_types): + """Specialize the copy of a DefNode given the copied node, + the specialization cname and the original DefNode entry""" + fused_types = self._get_fused_base_types(fused_compound_types) + type_strings = [ + PyrexTypes.specialization_signature_string(fused_type, f2s) + for fused_type in fused_types + ] + + node.specialized_signature_string = '|'.join(type_strings) + + node.entry.pymethdef_cname = PyrexTypes.get_fused_cname( + cname, node.entry.pymethdef_cname) + node.entry.doc = py_entry.doc + node.entry.doc_cname = py_entry.doc_cname + + def replace_fused_typechecks(self, copied_node): + """ + Branch-prune fused type checks like + + if fused_t is int: + ... + + Returns whether an error was issued and whether we should stop in + in order to prevent a flood of errors. + """ + num_errors = Errors.num_errors + transform = ParseTreeTransforms.ReplaceFusedTypeChecks( + copied_node.local_scope) + transform(copied_node) + + if Errors.num_errors > num_errors: + return False + + return True + + def _fused_instance_checks(self, normal_types, pyx_code, env): + """ + Generate Cython code for instance checks, matching an object to + specialized types. + """ + for specialized_type in normal_types: + # all_numeric = all_numeric and specialized_type.is_numeric + pyx_code.context.update( + py_type_name=specialized_type.py_type_name(), + specialized_type_name=specialized_type.specialization_string, + ) + pyx_code.put_chunk( + u""" + if isinstance(arg, {{py_type_name}}): + dest_sig[{{dest_sig_idx}}] = '{{specialized_type_name}}'; break + """) + + def _dtype_name(self, dtype): + if dtype.is_typedef: + return '___pyx_%s' % dtype + return str(dtype).replace(' ', '_') + + def _dtype_type(self, dtype): + if dtype.is_typedef: + return self._dtype_name(dtype) + return str(dtype) + + def _sizeof_dtype(self, dtype): + if dtype.is_pyobject: + return 'sizeof(void *)' + else: + return "sizeof(%s)" % self._dtype_type(dtype) + + def _buffer_check_numpy_dtype_setup_cases(self, pyx_code): + "Setup some common cases to match dtypes against specializations" + if pyx_code.indenter("if kind in b'iu':"): + pyx_code.putln("pass") + pyx_code.named_insertion_point("dtype_int") + pyx_code.dedent() + + if pyx_code.indenter("elif kind == b'f':"): + pyx_code.putln("pass") + pyx_code.named_insertion_point("dtype_float") + pyx_code.dedent() + + if pyx_code.indenter("elif kind == b'c':"): + pyx_code.putln("pass") + pyx_code.named_insertion_point("dtype_complex") + pyx_code.dedent() + + if pyx_code.indenter("elif kind == b'O':"): + pyx_code.putln("pass") + pyx_code.named_insertion_point("dtype_object") + pyx_code.dedent() + + match = "dest_sig[{{dest_sig_idx}}] = '{{specialized_type_name}}'" + no_match = "dest_sig[{{dest_sig_idx}}] = None" + def _buffer_check_numpy_dtype(self, pyx_code, specialized_buffer_types, pythran_types): + """ + Match a numpy dtype object to the individual specializations. + """ + self._buffer_check_numpy_dtype_setup_cases(pyx_code) + + for specialized_type in pythran_types+specialized_buffer_types: + final_type = specialized_type + if specialized_type.is_pythran_expr: + specialized_type = specialized_type.org_buffer + dtype = specialized_type.dtype + pyx_code.context.update( + itemsize_match=self._sizeof_dtype(dtype) + " == itemsize", + signed_match="not (%s_is_signed ^ dtype_signed)" % self._dtype_name(dtype), + dtype=dtype, + specialized_type_name=final_type.specialization_string) + + dtypes = [ + (dtype.is_int, pyx_code.dtype_int), + (dtype.is_float, pyx_code.dtype_float), + (dtype.is_complex, pyx_code.dtype_complex) + ] + + for dtype_category, codewriter in dtypes: + if dtype_category: + cond = '{{itemsize_match}} and (arg.ndim) == %d' % ( + specialized_type.ndim,) + if dtype.is_int: + cond += ' and {{signed_match}}' + + if final_type.is_pythran_expr: + cond += ' and arg_is_pythran_compatible' + + if codewriter.indenter("if %s:" % cond): + #codewriter.putln("print 'buffer match found based on numpy dtype'") + codewriter.putln(self.match) + codewriter.putln("break") + codewriter.dedent() + + def _buffer_parse_format_string_check(self, pyx_code, decl_code, + specialized_type, env): + """ + For each specialized type, try to coerce the object to a memoryview + slice of that type. This means obtaining a buffer and parsing the + format string. + TODO: separate buffer acquisition from format parsing + """ + dtype = specialized_type.dtype + if specialized_type.is_buffer: + axes = [('direct', 'strided')] * specialized_type.ndim + else: + axes = specialized_type.axes + + memslice_type = PyrexTypes.MemoryViewSliceType(dtype, axes) + memslice_type.create_from_py_utility_code(env) + pyx_code.context.update( + coerce_from_py_func=memslice_type.from_py_function, + dtype=dtype) + decl_code.putln( + "{{memviewslice_cname}} {{coerce_from_py_func}}(object, int)") + + pyx_code.context.update( + specialized_type_name=specialized_type.specialization_string, + sizeof_dtype=self._sizeof_dtype(dtype)) + + pyx_code.put_chunk( + u""" + # try {{dtype}} + if itemsize == -1 or itemsize == {{sizeof_dtype}}: + memslice = {{coerce_from_py_func}}(arg, 0) + if memslice.memview: + __PYX_XDEC_MEMVIEW(&memslice, 1) + # print 'found a match for the buffer through format parsing' + %s + break + else: + __pyx_PyErr_Clear() + """ % self.match) + + def _buffer_checks(self, buffer_types, pythran_types, pyx_code, decl_code, env): + """ + Generate Cython code to match objects to buffer specializations. + First try to get a numpy dtype object and match it against the individual + specializations. If that fails, try naively to coerce the object + to each specialization, which obtains the buffer each time and tries + to match the format string. + """ + # The first thing to find a match in this loop breaks out of the loop + pyx_code.put_chunk( + u""" + """ + (u"arg_is_pythran_compatible = False" if pythran_types else u"") + u""" + if ndarray is not None: + if isinstance(arg, ndarray): + dtype = arg.dtype + """ + (u"arg_is_pythran_compatible = True" if pythran_types else u"") + u""" + elif __pyx_memoryview_check(arg): + arg_base = arg.base + if isinstance(arg_base, ndarray): + dtype = arg_base.dtype + else: + dtype = None + else: + dtype = None + + itemsize = -1 + if dtype is not None: + itemsize = dtype.itemsize + kind = ord(dtype.kind) + dtype_signed = kind == 'i' + """) + pyx_code.indent(2) + if pythran_types: + pyx_code.put_chunk( + u""" + # Pythran only supports the endianness of the current compiler + byteorder = dtype.byteorder + if byteorder == "<" and not __Pyx_Is_Little_Endian(): + arg_is_pythran_compatible = False + elif byteorder == ">" and __Pyx_Is_Little_Endian(): + arg_is_pythran_compatible = False + if arg_is_pythran_compatible: + cur_stride = itemsize + shape = arg.shape + strides = arg.strides + for i in range(arg.ndim-1, -1, -1): + if (strides[i]) != cur_stride: + arg_is_pythran_compatible = False + break + cur_stride *= shape[i] + else: + arg_is_pythran_compatible = not (arg.flags.f_contiguous and (arg.ndim) > 1) + """) + pyx_code.named_insertion_point("numpy_dtype_checks") + self._buffer_check_numpy_dtype(pyx_code, buffer_types, pythran_types) + pyx_code.dedent(2) + + for specialized_type in buffer_types: + self._buffer_parse_format_string_check( + pyx_code, decl_code, specialized_type, env) + + def _buffer_declarations(self, pyx_code, decl_code, all_buffer_types, pythran_types): + """ + If we have any buffer specializations, write out some variable + declarations and imports. + """ + decl_code.put_chunk( + u""" + ctypedef struct {{memviewslice_cname}}: + void *memview + + void __PYX_XDEC_MEMVIEW({{memviewslice_cname}} *, int have_gil) + bint __pyx_memoryview_check(object) + """) + + pyx_code.local_variable_declarations.put_chunk( + u""" + cdef {{memviewslice_cname}} memslice + cdef Py_ssize_t itemsize + cdef bint dtype_signed + cdef char kind + + itemsize = -1 + """) + + if pythran_types: + pyx_code.local_variable_declarations.put_chunk(u""" + cdef bint arg_is_pythran_compatible + cdef Py_ssize_t cur_stride + """) + + pyx_code.imports.put_chunk( + u""" + cdef type ndarray + ndarray = __Pyx_ImportNumPyArrayTypeIfAvailable() + """) + + seen_typedefs = set() + seen_int_dtypes = set() + for buffer_type in all_buffer_types: + dtype = buffer_type.dtype + dtype_name = self._dtype_name(dtype) + if dtype.is_typedef: + if dtype_name not in seen_typedefs: + seen_typedefs.add(dtype_name) + decl_code.putln( + 'ctypedef %s %s "%s"' % (dtype.resolve(), dtype_name, + dtype.empty_declaration_code())) + + if buffer_type.dtype.is_int: + if str(dtype) not in seen_int_dtypes: + seen_int_dtypes.add(str(dtype)) + pyx_code.context.update(dtype_name=dtype_name, + dtype_type=self._dtype_type(dtype)) + pyx_code.local_variable_declarations.put_chunk( + u""" + cdef bint {{dtype_name}}_is_signed + {{dtype_name}}_is_signed = not (<{{dtype_type}}> -1 > 0) + """) + + def _split_fused_types(self, arg): + """ + Specialize fused types and split into normal types and buffer types. + """ + specialized_types = PyrexTypes.get_specialized_types(arg.type) + + # Prefer long over int, etc by sorting (see type classes in PyrexTypes.py) + specialized_types.sort() + + seen_py_type_names = set() + normal_types, buffer_types, pythran_types = [], [], [] + has_object_fallback = False + for specialized_type in specialized_types: + py_type_name = specialized_type.py_type_name() + if py_type_name: + if py_type_name in seen_py_type_names: + continue + seen_py_type_names.add(py_type_name) + if py_type_name == 'object': + has_object_fallback = True + else: + normal_types.append(specialized_type) + elif specialized_type.is_pythran_expr: + pythran_types.append(specialized_type) + elif specialized_type.is_buffer or specialized_type.is_memoryviewslice: + buffer_types.append(specialized_type) + + return normal_types, buffer_types, pythran_types, has_object_fallback + + def _unpack_argument(self, pyx_code): + pyx_code.put_chunk( + u""" + # PROCESSING ARGUMENT {{arg_tuple_idx}} + if {{arg_tuple_idx}} < len(args): + arg = (args)[{{arg_tuple_idx}}] + elif kwargs is not None and '{{arg.name}}' in kwargs: + arg = (kwargs)['{{arg.name}}'] + else: + {{if arg.default}} + arg = (defaults)[{{default_idx}}] + {{else}} + {{if arg_tuple_idx < min_positional_args}} + raise TypeError("Expected at least %d argument%s, got %d" % ( + {{min_positional_args}}, {{'"s"' if min_positional_args != 1 else '""'}}, len(args))) + {{else}} + raise TypeError("Missing keyword-only argument: '%s'" % "{{arg.default}}") + {{endif}} + {{endif}} + """) + + def make_fused_cpdef(self, orig_py_func, env, is_def): + """ + This creates the function that is indexable from Python and does + runtime dispatch based on the argument types. The function gets the + arg tuple and kwargs dict (or None) and the defaults tuple + as arguments from the Binding Fused Function's tp_call. + """ + from . import TreeFragment, Code, UtilityCode + + fused_types = self._get_fused_base_types([ + arg.type for arg in self.node.args if arg.type.is_fused]) + + context = { + 'memviewslice_cname': MemoryView.memviewslice_cname, + 'func_args': self.node.args, + 'n_fused': len(fused_types), + 'min_positional_args': + self.node.num_required_args - self.node.num_required_kw_args + if is_def else + sum(1 for arg in self.node.args if arg.default is None), + 'name': orig_py_func.entry.name, + } + + pyx_code = Code.PyxCodeWriter(context=context) + decl_code = Code.PyxCodeWriter(context=context) + decl_code.put_chunk( + u""" + cdef extern from *: + void __pyx_PyErr_Clear "PyErr_Clear" () + type __Pyx_ImportNumPyArrayTypeIfAvailable() + int __Pyx_Is_Little_Endian() + """) + decl_code.indent() + + pyx_code.put_chunk( + u""" + def __pyx_fused_cpdef(signatures, args, kwargs, defaults): + # FIXME: use a typed signature - currently fails badly because + # default arguments inherit the types we specify here! + + dest_sig = [None] * {{n_fused}} + + if kwargs is not None and not kwargs: + kwargs = None + + cdef Py_ssize_t i + + # instance check body + """) + + pyx_code.indent() # indent following code to function body + pyx_code.named_insertion_point("imports") + pyx_code.named_insertion_point("func_defs") + pyx_code.named_insertion_point("local_variable_declarations") + + fused_index = 0 + default_idx = 0 + all_buffer_types = OrderedSet() + seen_fused_types = set() + for i, arg in enumerate(self.node.args): + if arg.type.is_fused: + arg_fused_types = arg.type.get_fused_types() + if len(arg_fused_types) > 1: + raise NotImplementedError("Determination of more than one fused base " + "type per argument is not implemented.") + fused_type = arg_fused_types[0] + + if arg.type.is_fused and fused_type not in seen_fused_types: + seen_fused_types.add(fused_type) + + context.update( + arg_tuple_idx=i, + arg=arg, + dest_sig_idx=fused_index, + default_idx=default_idx, + ) + + normal_types, buffer_types, pythran_types, has_object_fallback = self._split_fused_types(arg) + self._unpack_argument(pyx_code) + + # 'unrolled' loop, first match breaks out of it + if pyx_code.indenter("while 1:"): + if normal_types: + self._fused_instance_checks(normal_types, pyx_code, env) + if buffer_types or pythran_types: + env.use_utility_code(Code.UtilityCode.load_cached("IsLittleEndian", "ModuleSetupCode.c")) + self._buffer_checks(buffer_types, pythran_types, pyx_code, decl_code, env) + if has_object_fallback: + pyx_code.context.update(specialized_type_name='object') + pyx_code.putln(self.match) + else: + pyx_code.putln(self.no_match) + pyx_code.putln("break") + pyx_code.dedent() + + fused_index += 1 + all_buffer_types.update(buffer_types) + all_buffer_types.update(ty.org_buffer for ty in pythran_types) + + if arg.default: + default_idx += 1 + + if all_buffer_types: + self._buffer_declarations(pyx_code, decl_code, all_buffer_types, pythran_types) + env.use_utility_code(Code.UtilityCode.load_cached("Import", "ImportExport.c")) + env.use_utility_code(Code.UtilityCode.load_cached("ImportNumPyArray", "ImportExport.c")) + + pyx_code.put_chunk( + u""" + candidates = [] + for sig in signatures: + match_found = False + src_sig = sig.strip('()').split('|') + for i in range(len(dest_sig)): + dst_type = dest_sig[i] + if dst_type is not None: + if src_sig[i] == dst_type: + match_found = True + else: + match_found = False + break + + if match_found: + candidates.append(sig) + + if not candidates: + raise TypeError("No matching signature found") + elif len(candidates) > 1: + raise TypeError("Function call with ambiguous argument types") + else: + return (signatures)[candidates[0]] + """) + + fragment_code = pyx_code.getvalue() + # print decl_code.getvalue() + # print fragment_code + from .Optimize import ConstantFolding + fragment = TreeFragment.TreeFragment( + fragment_code, level='module', pipeline=[ConstantFolding()]) + ast = TreeFragment.SetPosTransform(self.node.pos)(fragment.root) + UtilityCode.declare_declarations_in_scope( + decl_code.getvalue(), env.global_scope()) + ast.scope = env + # FIXME: for static methods of cdef classes, we build the wrong signature here: first arg becomes 'self' + ast.analyse_declarations(env) + py_func = ast.stats[-1] # the DefNode + self.fragment_scope = ast.scope + + if isinstance(self.node, DefNode): + py_func.specialized_cpdefs = self.nodes[:] + else: + py_func.specialized_cpdefs = [n.py_func for n in self.nodes] + + return py_func + + def update_fused_defnode_entry(self, env): + copy_attributes = ( + 'name', 'pos', 'cname', 'func_cname', 'pyfunc_cname', + 'pymethdef_cname', 'doc', 'doc_cname', 'is_member', + 'scope' + ) + + entry = self.py_func.entry + + for attr in copy_attributes: + setattr(entry, attr, + getattr(self.orig_py_func.entry, attr)) + + self.py_func.name = self.orig_py_func.name + self.py_func.doc = self.orig_py_func.doc + + env.entries.pop('__pyx_fused_cpdef', None) + if isinstance(self.node, DefNode): + env.entries[entry.name] = entry + else: + env.entries[entry.name].as_variable = entry + + env.pyfunc_entries.append(entry) + + self.py_func.entry.fused_cfunction = self + for node in self.nodes: + if isinstance(self.node, DefNode): + node.fused_py_func = self.py_func + else: + node.py_func.fused_py_func = self.py_func + node.entry.as_variable = entry + + self.synthesize_defnodes() + self.stats.append(self.__signatures__) + + def analyse_expressions(self, env): + """ + Analyse the expressions. Take care to only evaluate default arguments + once and clone the result for all specializations + """ + for fused_compound_type in self.fused_compound_types: + for fused_type in fused_compound_type.get_fused_types(): + for specialization_type in fused_type.types: + if specialization_type.is_complex: + specialization_type.create_declaration_utility_code(env) + + if self.py_func: + self.__signatures__ = self.__signatures__.analyse_expressions(env) + self.py_func = self.py_func.analyse_expressions(env) + self.resulting_fused_function = self.resulting_fused_function.analyse_expressions(env) + self.fused_func_assignment = self.fused_func_assignment.analyse_expressions(env) + + self.defaults = defaults = [] + + for arg in self.node.args: + if arg.default: + arg.default = arg.default.analyse_expressions(env) + defaults.append(ProxyNode(arg.default)) + else: + defaults.append(None) + + for i, stat in enumerate(self.stats): + stat = self.stats[i] = stat.analyse_expressions(env) + if isinstance(stat, FuncDefNode): + for arg, default in zip(stat.args, defaults): + if default is not None: + arg.default = CloneNode(default).coerce_to(arg.type, env) + + if self.py_func: + args = [CloneNode(default) for default in defaults if default] + self.defaults_tuple = TupleNode(self.pos, args=args) + self.defaults_tuple = self.defaults_tuple.analyse_types(env, skip_children=True).coerce_to_pyobject(env) + self.defaults_tuple = ProxyNode(self.defaults_tuple) + self.code_object = ProxyNode(self.specialized_pycfuncs[0].code_object) + + fused_func = self.resulting_fused_function.arg + fused_func.defaults_tuple = CloneNode(self.defaults_tuple) + fused_func.code_object = CloneNode(self.code_object) + + for i, pycfunc in enumerate(self.specialized_pycfuncs): + pycfunc.code_object = CloneNode(self.code_object) + pycfunc = self.specialized_pycfuncs[i] = pycfunc.analyse_types(env) + pycfunc.defaults_tuple = CloneNode(self.defaults_tuple) + return self + + def synthesize_defnodes(self): + """ + Create the __signatures__ dict of PyCFunctionNode specializations. + """ + if isinstance(self.nodes[0], CFuncDefNode): + nodes = [node.py_func for node in self.nodes] + else: + nodes = self.nodes + + signatures = [StringEncoding.EncodedString(node.specialized_signature_string) + for node in nodes] + keys = [ExprNodes.StringNode(node.pos, value=sig) + for node, sig in zip(nodes, signatures)] + values = [ExprNodes.PyCFunctionNode.from_defnode(node, binding=True) + for node in nodes] + + self.__signatures__ = ExprNodes.DictNode.from_pairs(self.pos, zip(keys, values)) + + self.specialized_pycfuncs = values + for pycfuncnode in values: + pycfuncnode.is_specialization = True + + def generate_function_definitions(self, env, code): + if self.py_func: + self.py_func.pymethdef_required = True + self.fused_func_assignment.generate_function_definitions(env, code) + + for stat in self.stats: + if isinstance(stat, FuncDefNode) and stat.entry.used: + code.mark_pos(stat.pos) + stat.generate_function_definitions(env, code) + + def generate_execution_code(self, code): + # Note: all def function specialization are wrapped in PyCFunction + # nodes in the self.__signatures__ dictnode. + for default in self.defaults: + if default is not None: + default.generate_evaluation_code(code) + + if self.py_func: + self.defaults_tuple.generate_evaluation_code(code) + self.code_object.generate_evaluation_code(code) + + for stat in self.stats: + code.mark_pos(stat.pos) + if isinstance(stat, ExprNodes.ExprNode): + stat.generate_evaluation_code(code) + else: + stat.generate_execution_code(code) + + if self.__signatures__: + self.resulting_fused_function.generate_evaluation_code(code) + + code.putln( + "((__pyx_FusedFunctionObject *) %s)->__signatures__ = %s;" % + (self.resulting_fused_function.result(), + self.__signatures__.result())) + code.put_giveref(self.__signatures__.result()) + self.__signatures__.generate_post_assignment_code(code) + self.__signatures__.free_temps(code) + + self.fused_func_assignment.generate_execution_code(code) + + # Dispose of results + self.resulting_fused_function.generate_disposal_code(code) + self.resulting_fused_function.free_temps(code) + self.defaults_tuple.generate_disposal_code(code) + self.defaults_tuple.free_temps(code) + self.code_object.generate_disposal_code(code) + self.code_object.free_temps(code) + + for default in self.defaults: + if default is not None: + default.generate_disposal_code(code) + default.free_temps(code) + + def annotate(self, code): + for stat in self.stats: + stat.annotate(code) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Future.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Future.py new file mode 100644 index 00000000000..848792e00bf --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Future.py @@ -0,0 +1,15 @@ +def _get_feature(name): + import __future__ + # fall back to a unique fake object for earlier Python versions or Python 3 + return getattr(__future__, name, object()) + +unicode_literals = _get_feature("unicode_literals") +with_statement = _get_feature("with_statement") # dummy +division = _get_feature("division") +print_function = _get_feature("print_function") +absolute_import = _get_feature("absolute_import") +nested_scopes = _get_feature("nested_scopes") # dummy +generators = _get_feature("generators") # dummy +generator_stop = _get_feature("generator_stop") + +del _get_feature diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Interpreter.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Interpreter.py new file mode 100644 index 00000000000..9ec391f2a02 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Interpreter.py @@ -0,0 +1,64 @@ +""" +This module deals with interpreting the parse tree as Python +would have done, in the compiler. + +For now this only covers parse tree to value conversion of +compile-time values. +""" + +from __future__ import absolute_import + +from .Nodes import * +from .ExprNodes import * +from .Errors import CompileError + + +class EmptyScope(object): + def lookup(self, name): + return None + +empty_scope = EmptyScope() + +def interpret_compiletime_options(optlist, optdict, type_env=None, type_args=()): + """ + Tries to interpret a list of compile time option nodes. + The result will be a tuple (optlist, optdict) but where + all expression nodes have been interpreted. The result is + in the form of tuples (value, pos). + + optlist is a list of nodes, while optdict is a DictNode (the + result optdict is a dict) + + If type_env is set, all type nodes will be analysed and the resulting + type set. Otherwise only interpretateable ExprNodes + are allowed, other nodes raises errors. + + A CompileError will be raised if there are problems. + """ + + def interpret(node, ix): + if ix in type_args: + if type_env: + type = node.analyse_as_type(type_env) + if not type: + raise CompileError(node.pos, "Invalid type.") + return (type, node.pos) + else: + raise CompileError(node.pos, "Type not allowed here.") + else: + if (sys.version_info[0] >=3 and + isinstance(node, StringNode) and + node.unicode_value is not None): + return (node.unicode_value, node.pos) + return (node.compile_time_value(empty_scope), node.pos) + + if optlist: + optlist = [interpret(x, ix) for ix, x in enumerate(optlist)] + if optdict: + assert isinstance(optdict, DictNode) + new_optdict = {} + for item in optdict.key_value_pairs: + new_key, dummy = interpret(item.key, None) + new_optdict[new_key] = interpret(item.value, item.key.value) + optdict = new_optdict + return (optlist, new_optdict) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Lexicon.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Lexicon.py new file mode 100644 index 00000000000..72c9ceaefd5 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Lexicon.py @@ -0,0 +1,138 @@ +# cython: language_level=3, py2_import=True +# +# Cython Scanner - Lexical Definitions +# + +from __future__ import absolute_import, unicode_literals + +raw_prefixes = "rR" +bytes_prefixes = "bB" +string_prefixes = "fFuU" + bytes_prefixes +char_prefixes = "cC" +any_string_prefix = raw_prefixes + string_prefixes + char_prefixes +IDENT = 'IDENT' + + +def make_lexicon(): + from ..Plex import \ + Str, Any, AnyBut, AnyChar, Rep, Rep1, Opt, Bol, Eol, Eof, \ + TEXT, IGNORE, State, Lexicon + from .Scanning import Method + + letter = Any("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_") + digit = Any("0123456789") + bindigit = Any("01") + octdigit = Any("01234567") + hexdigit = Any("0123456789ABCDEFabcdef") + indentation = Bol + Rep(Any(" \t")) + + def underscore_digits(d): + return Rep1(d) + Rep(Str("_") + Rep1(d)) + + decimal = underscore_digits(digit) + dot = Str(".") + exponent = Any("Ee") + Opt(Any("+-")) + decimal + decimal_fract = (decimal + dot + Opt(decimal)) | (dot + decimal) + + name = letter + Rep(letter | digit) + intconst = decimal | (Str("0") + ((Any("Xx") + underscore_digits(hexdigit)) | + (Any("Oo") + underscore_digits(octdigit)) | + (Any("Bb") + underscore_digits(bindigit)) )) + intsuffix = (Opt(Any("Uu")) + Opt(Any("Ll")) + Opt(Any("Ll"))) | (Opt(Any("Ll")) + Opt(Any("Ll")) + Opt(Any("Uu"))) + intliteral = intconst + intsuffix + fltconst = (decimal_fract + Opt(exponent)) | (decimal + exponent) + imagconst = (intconst | fltconst) + Any("jJ") + + # invalid combinations of prefixes are caught in p_string_literal + beginstring = Opt(Rep(Any(string_prefixes + raw_prefixes)) | + Any(char_prefixes) + ) + (Str("'") | Str('"') | Str("'''") | Str('"""')) + two_oct = octdigit + octdigit + three_oct = octdigit + octdigit + octdigit + two_hex = hexdigit + hexdigit + four_hex = two_hex + two_hex + escapeseq = Str("\\") + (two_oct | three_oct | + Str('N{') + Rep(AnyBut('}')) + Str('}') | + Str('u') + four_hex | Str('x') + two_hex | + Str('U') + four_hex + four_hex | AnyChar) + + bra = Any("([{") + ket = Any(")]}") + punct = Any(":,;+-*/|&<>=.%`~^?!@") + diphthong = Str("==", "<>", "!=", "<=", ">=", "<<", ">>", "**", "//", + "+=", "-=", "*=", "/=", "%=", "|=", "^=", "&=", + "<<=", ">>=", "**=", "//=", "->", "@=") + spaces = Rep1(Any(" \t\f")) + escaped_newline = Str("\\\n") + lineterm = Eol + Opt(Str("\n")) + + comment = Str("#") + Rep(AnyBut("\n")) + + return Lexicon([ + (name, IDENT), + (intliteral, Method('strip_underscores', symbol='INT')), + (fltconst, Method('strip_underscores', symbol='FLOAT')), + (imagconst, Method('strip_underscores', symbol='IMAG')), + (punct | diphthong, TEXT), + + (bra, Method('open_bracket_action')), + (ket, Method('close_bracket_action')), + (lineterm, Method('newline_action')), + + (beginstring, Method('begin_string_action')), + + (comment, IGNORE), + (spaces, IGNORE), + (escaped_newline, IGNORE), + + State('INDENT', [ + (comment + lineterm, Method('commentline')), + (Opt(spaces) + Opt(comment) + lineterm, IGNORE), + (indentation, Method('indentation_action')), + (Eof, Method('eof_action')) + ]), + + State('SQ_STRING', [ + (escapeseq, 'ESCAPE'), + (Rep1(AnyBut("'\"\n\\")), 'CHARS'), + (Str('"'), 'CHARS'), + (Str("\n"), Method('unclosed_string_action')), + (Str("'"), Method('end_string_action')), + (Eof, 'EOF') + ]), + + State('DQ_STRING', [ + (escapeseq, 'ESCAPE'), + (Rep1(AnyBut('"\n\\')), 'CHARS'), + (Str("'"), 'CHARS'), + (Str("\n"), Method('unclosed_string_action')), + (Str('"'), Method('end_string_action')), + (Eof, 'EOF') + ]), + + State('TSQ_STRING', [ + (escapeseq, 'ESCAPE'), + (Rep1(AnyBut("'\"\n\\")), 'CHARS'), + (Any("'\""), 'CHARS'), + (Str("\n"), 'NEWLINE'), + (Str("'''"), Method('end_string_action')), + (Eof, 'EOF') + ]), + + State('TDQ_STRING', [ + (escapeseq, 'ESCAPE'), + (Rep1(AnyBut('"\'\n\\')), 'CHARS'), + (Any("'\""), 'CHARS'), + (Str("\n"), 'NEWLINE'), + (Str('"""'), Method('end_string_action')), + (Eof, 'EOF') + ]), + + (Eof, Method('eof_action')) + ], + + # FIXME: Plex 1.9 needs different args here from Plex 1.1.4 + #debug_flags = scanner_debug_flags, + #debug_file = scanner_dump_file + ) + diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Main.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Main.py new file mode 100644 index 00000000000..dc4add541e5 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Main.py @@ -0,0 +1,904 @@ +# +# Cython Top Level +# + +from __future__ import absolute_import + +import os +import re +import sys +import io + +if sys.version_info[:2] < (2, 6) or (3, 0) <= sys.version_info[:2] < (3, 3): + sys.stderr.write("Sorry, Cython requires Python 2.6+ or 3.3+, found %d.%d\n" % tuple(sys.version_info[:2])) + sys.exit(1) + +try: + from __builtin__ import basestring +except ImportError: + basestring = str + +# Do not import Parsing here, import it when needed, because Parsing imports +# Nodes, which globally needs debug command line options initialized to set a +# conditional metaclass. These options are processed by CmdLine called from +# main() in this file. +# import Parsing +from . import Errors +from .StringEncoding import EncodedString +from .Scanning import PyrexScanner, FileSourceDescriptor +from .Errors import PyrexError, CompileError, error, warning +from .Symtab import ModuleScope +from .. import Utils +from . import Options + +from . import Version # legacy import needed by old PyTables versions +version = Version.version # legacy attribute - use "Cython.__version__" instead + +module_name_pattern = re.compile(r"[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*$") + +verbose = 0 + +standard_include_path = os.path.abspath(os.path.join(os.path.dirname(__file__), + os.path.pardir, 'Includes')) + +class CompilationData(object): + # Bundles the information that is passed from transform to transform. + # (For now, this is only) + + # While Context contains every pxd ever loaded, path information etc., + # this only contains the data related to a single compilation pass + # + # pyx ModuleNode Main code tree of this compilation. + # pxds {string : ModuleNode} Trees for the pxds used in the pyx. + # codewriter CCodeWriter Where to output final code. + # options CompilationOptions + # result CompilationResult + pass + + +class Context(object): + # This class encapsulates the context needed for compiling + # one or more Cython implementation files along with their + # associated and imported declaration files. It includes + # the root of the module import namespace and the list + # of directories to search for include files. + # + # modules {string : ModuleScope} + # include_directories [string] + # future_directives [object] + # language_level int currently 2 or 3 for Python 2/3 + + cython_scope = None + language_level = None # warn when not set but default to Py2 + + def __init__(self, include_directories, compiler_directives, cpp=False, + language_level=None, options=None): + # cython_scope is a hack, set to False by subclasses, in order to break + # an infinite loop. + # Better code organization would fix it. + + from . import Builtin, CythonScope + self.modules = {"__builtin__" : Builtin.builtin_scope} + self.cython_scope = CythonScope.create_cython_scope(self) + self.modules["cython"] = self.cython_scope + self.include_directories = include_directories + self.future_directives = set() + self.compiler_directives = compiler_directives + self.cpp = cpp + self.options = options + + self.pxds = {} # full name -> node tree + self._interned = {} # (type(value), value, *key_args) -> interned_value + + if language_level is not None: + self.set_language_level(language_level) + + self.gdb_debug_outputwriter = None + + def set_language_level(self, level): + from .Future import print_function, unicode_literals, absolute_import, division + future_directives = set() + if level == '3str': + level = 3 + else: + level = int(level) + if level >= 3: + future_directives.add(unicode_literals) + if level >= 3: + future_directives.update([print_function, absolute_import, division]) + self.language_level = level + self.future_directives = future_directives + if level >= 3: + self.modules['builtins'] = self.modules['__builtin__'] + + def intern_ustring(self, value, encoding=None): + key = (EncodedString, value, encoding) + try: + return self._interned[key] + except KeyError: + pass + value = EncodedString(value) + if encoding: + value.encoding = encoding + self._interned[key] = value + return value + + def intern_value(self, value, *key): + key = (type(value), value) + key + try: + return self._interned[key] + except KeyError: + pass + self._interned[key] = value + return value + + # pipeline creation functions can now be found in Pipeline.py + + def process_pxd(self, source_desc, scope, module_name): + from . import Pipeline + if isinstance(source_desc, FileSourceDescriptor) and source_desc._file_type == 'pyx': + source = CompilationSource(source_desc, module_name, os.getcwd()) + result_sink = create_default_resultobj(source, self.options) + pipeline = Pipeline.create_pyx_as_pxd_pipeline(self, result_sink) + result = Pipeline.run_pipeline(pipeline, source) + else: + pipeline = Pipeline.create_pxd_pipeline(self, scope, module_name) + result = Pipeline.run_pipeline(pipeline, source_desc) + return result + + def nonfatal_error(self, exc): + return Errors.report_error(exc) + + def find_module(self, module_name, relative_to=None, pos=None, need_pxd=1, + absolute_fallback=True): + # Finds and returns the module scope corresponding to + # the given relative or absolute module name. If this + # is the first time the module has been requested, finds + # the corresponding .pxd file and process it. + # If relative_to is not None, it must be a module scope, + # and the module will first be searched for relative to + # that module, provided its name is not a dotted name. + debug_find_module = 0 + if debug_find_module: + print("Context.find_module: module_name = %s, relative_to = %s, pos = %s, need_pxd = %s" % ( + module_name, relative_to, pos, need_pxd)) + + scope = None + pxd_pathname = None + if relative_to: + if module_name: + # from .module import ... + qualified_name = relative_to.qualify_name(module_name) + else: + # from . import ... + qualified_name = relative_to.qualified_name + scope = relative_to + relative_to = None + else: + qualified_name = module_name + + if not module_name_pattern.match(qualified_name): + raise CompileError(pos or (module_name, 0, 0), + "'%s' is not a valid module name" % module_name) + + if relative_to: + if debug_find_module: + print("...trying relative import") + scope = relative_to.lookup_submodule(module_name) + if not scope: + pxd_pathname = self.find_pxd_file(qualified_name, pos) + if pxd_pathname: + scope = relative_to.find_submodule(module_name) + if not scope: + if debug_find_module: + print("...trying absolute import") + if absolute_fallback: + qualified_name = module_name + scope = self + for name in qualified_name.split("."): + scope = scope.find_submodule(name) + + if debug_find_module: + print("...scope = %s" % scope) + if not scope.pxd_file_loaded: + if debug_find_module: + print("...pxd not loaded") + if not pxd_pathname: + if debug_find_module: + print("...looking for pxd file") + # Only look in sys.path if we are explicitly looking + # for a .pxd file. + pxd_pathname = self.find_pxd_file(qualified_name, pos, sys_path=need_pxd) + if debug_find_module: + print("......found %s" % pxd_pathname) + if not pxd_pathname and need_pxd: + # Set pxd_file_loaded such that we don't need to + # look for the non-existing pxd file next time. + scope.pxd_file_loaded = True + package_pathname = self.search_include_directories(qualified_name, ".py", pos) + if package_pathname and package_pathname.endswith('__init__.py'): + pass + else: + error(pos, "'%s.pxd' not found" % qualified_name.replace('.', os.sep)) + if pxd_pathname: + scope.pxd_file_loaded = True + try: + if debug_find_module: + print("Context.find_module: Parsing %s" % pxd_pathname) + rel_path = module_name.replace('.', os.sep) + os.path.splitext(pxd_pathname)[1] + if not pxd_pathname.endswith(rel_path): + rel_path = pxd_pathname # safety measure to prevent printing incorrect paths + source_desc = FileSourceDescriptor(pxd_pathname, rel_path) + err, result = self.process_pxd(source_desc, scope, qualified_name) + if err: + raise err + (pxd_codenodes, pxd_scope) = result + self.pxds[module_name] = (pxd_codenodes, pxd_scope) + except CompileError: + pass + return scope + + def find_pxd_file(self, qualified_name, pos, sys_path=True): + # Search include path (and sys.path if sys_path is True) for + # the .pxd file corresponding to the given fully-qualified + # module name. + # Will find either a dotted filename or a file in a + # package directory. If a source file position is given, + # the directory containing the source file is searched first + # for a dotted filename, and its containing package root + # directory is searched first for a non-dotted filename. + pxd = self.search_include_directories(qualified_name, ".pxd", pos, sys_path=sys_path) + if pxd is None: # XXX Keep this until Includes/Deprecated is removed + if (qualified_name.startswith('python') or + qualified_name in ('stdlib', 'stdio', 'stl')): + standard_include_path = os.path.abspath(os.path.normpath( + os.path.join(os.path.dirname(__file__), os.path.pardir, 'Includes'))) + deprecated_include_path = os.path.join(standard_include_path, 'Deprecated') + self.include_directories.append(deprecated_include_path) + try: + pxd = self.search_include_directories(qualified_name, ".pxd", pos) + finally: + self.include_directories.pop() + if pxd: + name = qualified_name + if name.startswith('python'): + warning(pos, "'%s' is deprecated, use 'cpython'" % name, 1) + elif name in ('stdlib', 'stdio'): + warning(pos, "'%s' is deprecated, use 'libc.%s'" % (name, name), 1) + elif name in ('stl'): + warning(pos, "'%s' is deprecated, use 'libcpp.*.*'" % name, 1) + if pxd is None and Options.cimport_from_pyx: + return self.find_pyx_file(qualified_name, pos) + return pxd + + def find_pyx_file(self, qualified_name, pos): + # Search include path for the .pyx file corresponding to the + # given fully-qualified module name, as for find_pxd_file(). + return self.search_include_directories(qualified_name, ".pyx", pos) + + def find_include_file(self, filename, pos): + # Search list of include directories for filename. + # Reports an error and returns None if not found. + path = self.search_include_directories(filename, "", pos, + include=True) + if not path: + error(pos, "'%s' not found" % filename) + return path + + def search_include_directories(self, qualified_name, suffix, pos, + include=False, sys_path=False): + include_dirs = self.include_directories + if sys_path: + include_dirs = include_dirs + sys.path + # include_dirs must be hashable for caching in @cached_function + include_dirs = tuple(include_dirs + [standard_include_path]) + return search_include_directories(include_dirs, qualified_name, + suffix, pos, include) + + def find_root_package_dir(self, file_path): + return Utils.find_root_package_dir(file_path) + + def check_package_dir(self, dir, package_names): + return Utils.check_package_dir(dir, tuple(package_names)) + + def c_file_out_of_date(self, source_path, output_path): + if not os.path.exists(output_path): + return 1 + c_time = Utils.modification_time(output_path) + if Utils.file_newer_than(source_path, c_time): + return 1 + pos = [source_path] + pxd_path = Utils.replace_suffix(source_path, ".pxd") + if os.path.exists(pxd_path) and Utils.file_newer_than(pxd_path, c_time): + return 1 + for kind, name in self.read_dependency_file(source_path): + if kind == "cimport": + dep_path = self.find_pxd_file(name, pos) + elif kind == "include": + dep_path = self.search_include_directories(name, pos) + else: + continue + if dep_path and Utils.file_newer_than(dep_path, c_time): + return 1 + return 0 + + def find_cimported_module_names(self, source_path): + return [ name for kind, name in self.read_dependency_file(source_path) + if kind == "cimport" ] + + def is_package_dir(self, dir_path): + return Utils.is_package_dir(dir_path) + + def read_dependency_file(self, source_path): + dep_path = Utils.replace_suffix(source_path, ".dep") + if os.path.exists(dep_path): + f = open(dep_path, "rU") + chunks = [ line.strip().split(" ", 1) + for line in f.readlines() + if " " in line.strip() ] + f.close() + return chunks + else: + return () + + def lookup_submodule(self, name): + # Look up a top-level module. Returns None if not found. + return self.modules.get(name, None) + + def find_submodule(self, name): + # Find a top-level module, creating a new one if needed. + scope = self.lookup_submodule(name) + if not scope: + scope = ModuleScope(name, + parent_module = None, context = self) + self.modules[name] = scope + return scope + + def parse(self, source_desc, scope, pxd, full_module_name): + if not isinstance(source_desc, FileSourceDescriptor): + raise RuntimeError("Only file sources for code supported") + source_filename = source_desc.filename + scope.cpp = self.cpp + # Parse the given source file and return a parse tree. + num_errors = Errors.num_errors + try: + with Utils.open_source_file(source_filename) as f: + from . import Parsing + s = PyrexScanner(f, source_desc, source_encoding = f.encoding, + scope = scope, context = self) + tree = Parsing.p_module(s, pxd, full_module_name) + if self.options.formal_grammar: + try: + from ..Parser import ConcreteSyntaxTree + except ImportError: + raise RuntimeError( + "Formal grammar can only be used with compiled Cython with an available pgen.") + ConcreteSyntaxTree.p_module(source_filename) + except UnicodeDecodeError as e: + #import traceback + #traceback.print_exc() + raise self._report_decode_error(source_desc, e) + + if Errors.num_errors > num_errors: + raise CompileError() + return tree + + def _report_decode_error(self, source_desc, exc): + msg = exc.args[-1] + position = exc.args[2] + encoding = exc.args[0] + + line = 1 + column = idx = 0 + with io.open(source_desc.filename, "r", encoding='iso8859-1', newline='') as f: + for line, data in enumerate(f, 1): + idx += len(data) + if idx >= position: + column = position - (idx - len(data)) + 1 + break + + return error((source_desc, line, column), + "Decoding error, missing or incorrect coding= " + "at top of source (cannot decode with encoding %r: %s)" % (encoding, msg)) + + def extract_module_name(self, path, options): + # Find fully_qualified module name from the full pathname + # of a source file. + dir, filename = os.path.split(path) + module_name, _ = os.path.splitext(filename) + if "." in module_name: + return module_name + names = [module_name] + while self.is_package_dir(dir): + parent, package_name = os.path.split(dir) + if parent == dir: + break + names.append(package_name) + dir = parent + names.reverse() + return ".".join(names) + + def setup_errors(self, options, result): + Errors.reset() # clear any remaining error state + if options.use_listing_file: + path = result.listing_file = Utils.replace_suffix(result.main_source_file, ".lis") + else: + path = None + Errors.open_listing_file(path=path, + echo_to_stderr=options.errors_to_stderr) + + def teardown_errors(self, err, options, result): + source_desc = result.compilation_source.source_desc + if not isinstance(source_desc, FileSourceDescriptor): + raise RuntimeError("Only file sources for code supported") + Errors.close_listing_file() + result.num_errors = Errors.num_errors + if result.num_errors > 0: + err = True + if err and result.c_file: + try: + Utils.castrate_file(result.c_file, os.stat(source_desc.filename)) + except EnvironmentError: + pass + result.c_file = None + + +def get_output_filename(source_filename, cwd, options): + if options.cplus: + c_suffix = ".cpp" + else: + c_suffix = ".c" + suggested_file_name = Utils.replace_suffix(source_filename, c_suffix) + if options.output_file: + out_path = os.path.join(cwd, options.output_file) + if os.path.isdir(out_path): + return os.path.join(out_path, os.path.basename(suggested_file_name)) + else: + return out_path + else: + return suggested_file_name + + +def create_default_resultobj(compilation_source, options): + result = CompilationResult() + result.main_source_file = compilation_source.source_desc.filename + result.compilation_source = compilation_source + source_desc = compilation_source.source_desc + result.c_file = get_output_filename(source_desc.filename, + compilation_source.cwd, options) + result.embedded_metadata = options.embedded_metadata + return result + + +def run_pipeline(source, options, full_module_name=None, context=None): + from . import Pipeline + + source_ext = os.path.splitext(source)[1] + options.configure_language_defaults(source_ext[1:]) # py/pyx + if context is None: + context = options.create_context() + + # Set up source object + cwd = os.getcwd() + abs_path = os.path.abspath(source) + full_module_name = full_module_name or context.extract_module_name(source, options) + + Utils.raise_error_if_module_name_forbidden(full_module_name) + + if options.relative_path_in_code_position_comments: + rel_path = full_module_name.replace('.', os.sep) + source_ext + if not abs_path.endswith(rel_path): + rel_path = source # safety measure to prevent printing incorrect paths + else: + rel_path = abs_path + source_desc = FileSourceDescriptor(abs_path, rel_path) + source = CompilationSource(source_desc, full_module_name, cwd) + + # Set up result object + result = create_default_resultobj(source, options) + + if options.annotate is None: + # By default, decide based on whether an html file already exists. + html_filename = os.path.splitext(result.c_file)[0] + ".html" + if os.path.exists(html_filename): + with io.open(html_filename, "r", encoding="UTF-8") as html_file: + if u' State %d\n" % (key, state['number'])) + for key in ('bol', 'eol', 'eof', 'else'): + state = special_to_state.get(key, None) + if state: + file.write(" %s --> State %d\n" % (key, state['number'])) + + def chars_to_ranges(self, char_list): + char_list.sort() + i = 0 + n = len(char_list) + result = [] + while i < n: + c1 = ord(char_list[i]) + c2 = c1 + i += 1 + while i < n and ord(char_list[i]) == c2 + 1: + i += 1 + c2 += 1 + result.append((chr(c1), chr(c2))) + return tuple(result) + + def ranges_to_string(self, range_list): + return ','.join(map(self.range_to_string, range_list)) + + def range_to_string(self, range_tuple): + (c1, c2) = range_tuple + if c1 == c2: + return repr(c1) + else: + return "%s..%s" % (repr(c1), repr(c2)) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Regexps.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Regexps.py new file mode 100644 index 00000000000..41816c939ac --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Regexps.py @@ -0,0 +1,576 @@ +#======================================================================= +# +# Python Lexical Analyser +# +# Regular Expressions +# +#======================================================================= + +from __future__ import absolute_import + +import types +try: + from sys import maxsize as maxint +except ImportError: + from sys import maxint + +from . import Errors + +# +# Constants +# + +BOL = 'bol' +EOL = 'eol' +EOF = 'eof' + +nl_code = ord('\n') + + +# +# Helper functions +# + +def chars_to_ranges(s): + """ + Return a list of character codes consisting of pairs + [code1a, code1b, code2a, code2b,...] which cover all + the characters in |s|. + """ + char_list = list(s) + char_list.sort() + i = 0 + n = len(char_list) + result = [] + while i < n: + code1 = ord(char_list[i]) + code2 = code1 + 1 + i += 1 + while i < n and code2 >= ord(char_list[i]): + code2 += 1 + i += 1 + result.append(code1) + result.append(code2) + return result + + +def uppercase_range(code1, code2): + """ + If the range of characters from code1 to code2-1 includes any + lower case letters, return the corresponding upper case range. + """ + code3 = max(code1, ord('a')) + code4 = min(code2, ord('z') + 1) + if code3 < code4: + d = ord('A') - ord('a') + return (code3 + d, code4 + d) + else: + return None + + +def lowercase_range(code1, code2): + """ + If the range of characters from code1 to code2-1 includes any + upper case letters, return the corresponding lower case range. + """ + code3 = max(code1, ord('A')) + code4 = min(code2, ord('Z') + 1) + if code3 < code4: + d = ord('a') - ord('A') + return (code3 + d, code4 + d) + else: + return None + + +def CodeRanges(code_list): + """ + Given a list of codes as returned by chars_to_ranges, return + an RE which will match a character in any of the ranges. + """ + re_list = [CodeRange(code_list[i], code_list[i + 1]) for i in range(0, len(code_list), 2)] + return Alt(*re_list) + + +def CodeRange(code1, code2): + """ + CodeRange(code1, code2) is an RE which matches any character + with a code |c| in the range |code1| <= |c| < |code2|. + """ + if code1 <= nl_code < code2: + return Alt(RawCodeRange(code1, nl_code), + RawNewline, + RawCodeRange(nl_code + 1, code2)) + else: + return RawCodeRange(code1, code2) + + +# +# Abstract classes +# + +class RE(object): + """RE is the base class for regular expression constructors. + The following operators are defined on REs: + + re1 + re2 is an RE which matches |re1| followed by |re2| + re1 | re2 is an RE which matches either |re1| or |re2| + """ + + nullable = 1 # True if this RE can match 0 input symbols + match_nl = 1 # True if this RE can match a string ending with '\n' + str = None # Set to a string to override the class's __str__ result + + def build_machine(self, machine, initial_state, final_state, + match_bol, nocase): + """ + This method should add states to |machine| to implement this + RE, starting at |initial_state| and ending at |final_state|. + If |match_bol| is true, the RE must be able to match at the + beginning of a line. If nocase is true, upper and lower case + letters should be treated as equivalent. + """ + raise NotImplementedError("%s.build_machine not implemented" % + self.__class__.__name__) + + def build_opt(self, m, initial_state, c): + """ + Given a state |s| of machine |m|, return a new state + reachable from |s| on character |c| or epsilon. + """ + s = m.new_state() + initial_state.link_to(s) + initial_state.add_transition(c, s) + return s + + def __add__(self, other): + return Seq(self, other) + + def __or__(self, other): + return Alt(self, other) + + def __str__(self): + if self.str: + return self.str + else: + return self.calc_str() + + def check_re(self, num, value): + if not isinstance(value, RE): + self.wrong_type(num, value, "Plex.RE instance") + + def check_string(self, num, value): + if type(value) != type(''): + self.wrong_type(num, value, "string") + + def check_char(self, num, value): + self.check_string(num, value) + if len(value) != 1: + raise Errors.PlexValueError("Invalid value for argument %d of Plex.%s." + "Expected a string of length 1, got: %s" % ( + num, self.__class__.__name__, repr(value))) + + def wrong_type(self, num, value, expected): + if type(value) == types.InstanceType: + got = "%s.%s instance" % ( + value.__class__.__module__, value.__class__.__name__) + else: + got = type(value).__name__ + raise Errors.PlexTypeError("Invalid type for argument %d of Plex.%s " + "(expected %s, got %s" % ( + num, self.__class__.__name__, expected, got)) + +# +# Primitive RE constructors +# ------------------------- +# +# These are the basic REs from which all others are built. +# + +## class Char(RE): +## """ +## Char(c) is an RE which matches the character |c|. +## """ + +## nullable = 0 + +## def __init__(self, char): +## self.char = char +## self.match_nl = char == '\n' + +## def build_machine(self, m, initial_state, final_state, match_bol, nocase): +## c = self.char +## if match_bol and c != BOL: +## s1 = self.build_opt(m, initial_state, BOL) +## else: +## s1 = initial_state +## if c == '\n' or c == EOF: +## s1 = self.build_opt(m, s1, EOL) +## if len(c) == 1: +## code = ord(self.char) +## s1.add_transition((code, code+1), final_state) +## if nocase and is_letter_code(code): +## code2 = other_case_code(code) +## s1.add_transition((code2, code2+1), final_state) +## else: +## s1.add_transition(c, final_state) + +## def calc_str(self): +## return "Char(%s)" % repr(self.char) + + +def Char(c): + """ + Char(c) is an RE which matches the character |c|. + """ + if len(c) == 1: + result = CodeRange(ord(c), ord(c) + 1) + else: + result = SpecialSymbol(c) + result.str = "Char(%s)" % repr(c) + return result + + +class RawCodeRange(RE): + """ + RawCodeRange(code1, code2) is a low-level RE which matches any character + with a code |c| in the range |code1| <= |c| < |code2|, where the range + does not include newline. For internal use only. + """ + nullable = 0 + match_nl = 0 + range = None # (code, code) + uppercase_range = None # (code, code) or None + lowercase_range = None # (code, code) or None + + def __init__(self, code1, code2): + self.range = (code1, code2) + self.uppercase_range = uppercase_range(code1, code2) + self.lowercase_range = lowercase_range(code1, code2) + + def build_machine(self, m, initial_state, final_state, match_bol, nocase): + if match_bol: + initial_state = self.build_opt(m, initial_state, BOL) + initial_state.add_transition(self.range, final_state) + if nocase: + if self.uppercase_range: + initial_state.add_transition(self.uppercase_range, final_state) + if self.lowercase_range: + initial_state.add_transition(self.lowercase_range, final_state) + + def calc_str(self): + return "CodeRange(%d,%d)" % (self.code1, self.code2) + + +class _RawNewline(RE): + """ + RawNewline is a low-level RE which matches a newline character. + For internal use only. + """ + nullable = 0 + match_nl = 1 + + def build_machine(self, m, initial_state, final_state, match_bol, nocase): + if match_bol: + initial_state = self.build_opt(m, initial_state, BOL) + s = self.build_opt(m, initial_state, EOL) + s.add_transition((nl_code, nl_code + 1), final_state) + + +RawNewline = _RawNewline() + + +class SpecialSymbol(RE): + """ + SpecialSymbol(sym) is an RE which matches the special input + symbol |sym|, which is one of BOL, EOL or EOF. + """ + nullable = 0 + match_nl = 0 + sym = None + + def __init__(self, sym): + self.sym = sym + + def build_machine(self, m, initial_state, final_state, match_bol, nocase): + # Sequences 'bol bol' and 'bol eof' are impossible, so only need + # to allow for bol if sym is eol + if match_bol and self.sym == EOL: + initial_state = self.build_opt(m, initial_state, BOL) + initial_state.add_transition(self.sym, final_state) + + +class Seq(RE): + """Seq(re1, re2, re3...) is an RE which matches |re1| followed by + |re2| followed by |re3|...""" + + def __init__(self, *re_list): + nullable = 1 + for i, re in enumerate(re_list): + self.check_re(i, re) + nullable = nullable and re.nullable + self.re_list = re_list + self.nullable = nullable + i = len(re_list) + match_nl = 0 + while i: + i -= 1 + re = re_list[i] + if re.match_nl: + match_nl = 1 + break + if not re.nullable: + break + self.match_nl = match_nl + + def build_machine(self, m, initial_state, final_state, match_bol, nocase): + re_list = self.re_list + if len(re_list) == 0: + initial_state.link_to(final_state) + else: + s1 = initial_state + n = len(re_list) + for i, re in enumerate(re_list): + if i < n - 1: + s2 = m.new_state() + else: + s2 = final_state + re.build_machine(m, s1, s2, match_bol, nocase) + s1 = s2 + match_bol = re.match_nl or (match_bol and re.nullable) + + def calc_str(self): + return "Seq(%s)" % ','.join(map(str, self.re_list)) + + +class Alt(RE): + """Alt(re1, re2, re3...) is an RE which matches either |re1| or + |re2| or |re3|...""" + + def __init__(self, *re_list): + self.re_list = re_list + nullable = 0 + match_nl = 0 + nullable_res = [] + non_nullable_res = [] + i = 1 + for re in re_list: + self.check_re(i, re) + if re.nullable: + nullable_res.append(re) + nullable = 1 + else: + non_nullable_res.append(re) + if re.match_nl: + match_nl = 1 + i += 1 + self.nullable_res = nullable_res + self.non_nullable_res = non_nullable_res + self.nullable = nullable + self.match_nl = match_nl + + def build_machine(self, m, initial_state, final_state, match_bol, nocase): + for re in self.nullable_res: + re.build_machine(m, initial_state, final_state, match_bol, nocase) + if self.non_nullable_res: + if match_bol: + initial_state = self.build_opt(m, initial_state, BOL) + for re in self.non_nullable_res: + re.build_machine(m, initial_state, final_state, 0, nocase) + + def calc_str(self): + return "Alt(%s)" % ','.join(map(str, self.re_list)) + + +class Rep1(RE): + """Rep1(re) is an RE which matches one or more repetitions of |re|.""" + + def __init__(self, re): + self.check_re(1, re) + self.re = re + self.nullable = re.nullable + self.match_nl = re.match_nl + + def build_machine(self, m, initial_state, final_state, match_bol, nocase): + s1 = m.new_state() + s2 = m.new_state() + initial_state.link_to(s1) + self.re.build_machine(m, s1, s2, match_bol or self.re.match_nl, nocase) + s2.link_to(s1) + s2.link_to(final_state) + + def calc_str(self): + return "Rep1(%s)" % self.re + + +class SwitchCase(RE): + """ + SwitchCase(re, nocase) is an RE which matches the same strings as RE, + but treating upper and lower case letters according to |nocase|. If + |nocase| is true, case is ignored, otherwise it is not. + """ + re = None + nocase = None + + def __init__(self, re, nocase): + self.re = re + self.nocase = nocase + self.nullable = re.nullable + self.match_nl = re.match_nl + + def build_machine(self, m, initial_state, final_state, match_bol, nocase): + self.re.build_machine(m, initial_state, final_state, match_bol, + self.nocase) + + def calc_str(self): + if self.nocase: + name = "NoCase" + else: + name = "Case" + return "%s(%s)" % (name, self.re) + +# +# Composite RE constructors +# ------------------------- +# +# These REs are defined in terms of the primitive REs. +# + +Empty = Seq() +Empty.__doc__ = \ + """ + Empty is an RE which matches the empty string. + """ +Empty.str = "Empty" + + +def Str1(s): + """ + Str1(s) is an RE which matches the literal string |s|. + """ + result = Seq(*tuple(map(Char, s))) + result.str = "Str(%s)" % repr(s) + return result + + +def Str(*strs): + """ + Str(s) is an RE which matches the literal string |s|. + Str(s1, s2, s3, ...) is an RE which matches any of |s1| or |s2| or |s3|... + """ + if len(strs) == 1: + return Str1(strs[0]) + else: + result = Alt(*tuple(map(Str1, strs))) + result.str = "Str(%s)" % ','.join(map(repr, strs)) + return result + + +def Any(s): + """ + Any(s) is an RE which matches any character in the string |s|. + """ + #result = apply(Alt, tuple(map(Char, s))) + result = CodeRanges(chars_to_ranges(s)) + result.str = "Any(%s)" % repr(s) + return result + + +def AnyBut(s): + """ + AnyBut(s) is an RE which matches any character (including + newline) which is not in the string |s|. + """ + ranges = chars_to_ranges(s) + ranges.insert(0, -maxint) + ranges.append(maxint) + result = CodeRanges(ranges) + result.str = "AnyBut(%s)" % repr(s) + return result + + +AnyChar = AnyBut("") +AnyChar.__doc__ = \ + """ + AnyChar is an RE which matches any single character (including a newline). + """ +AnyChar.str = "AnyChar" + + +def Range(s1, s2=None): + """ + Range(c1, c2) is an RE which matches any single character in the range + |c1| to |c2| inclusive. + Range(s) where |s| is a string of even length is an RE which matches + any single character in the ranges |s[0]| to |s[1]|, |s[2]| to |s[3]|,... + """ + if s2: + result = CodeRange(ord(s1), ord(s2) + 1) + result.str = "Range(%s,%s)" % (s1, s2) + else: + ranges = [] + for i in range(0, len(s1), 2): + ranges.append(CodeRange(ord(s1[i]), ord(s1[i + 1]) + 1)) + result = Alt(*ranges) + result.str = "Range(%s)" % repr(s1) + return result + + +def Opt(re): + """ + Opt(re) is an RE which matches either |re| or the empty string. + """ + result = Alt(re, Empty) + result.str = "Opt(%s)" % re + return result + + +def Rep(re): + """ + Rep(re) is an RE which matches zero or more repetitions of |re|. + """ + result = Opt(Rep1(re)) + result.str = "Rep(%s)" % re + return result + + +def NoCase(re): + """ + NoCase(re) is an RE which matches the same strings as RE, but treating + upper and lower case letters as equivalent. + """ + return SwitchCase(re, nocase=1) + + +def Case(re): + """ + Case(re) is an RE which matches the same strings as RE, but treating + upper and lower case letters as distinct, i.e. it cancels the effect + of any enclosing NoCase(). + """ + return SwitchCase(re, nocase=0) + +# +# RE Constants +# + +Bol = Char(BOL) +Bol.__doc__ = \ + """ + Bol is an RE which matches the beginning of a line. + """ +Bol.str = "Bol" + +Eol = Char(EOL) +Eol.__doc__ = \ + """ + Eol is an RE which matches the end of a line. + """ +Eol.str = "Eol" + +Eof = Char(EOF) +Eof.__doc__ = \ + """ + Eof is an RE which matches the end of the file. + """ +Eof.str = "Eof" + diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Scanners.pxd b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Scanners.pxd new file mode 100644 index 00000000000..6e75f55e619 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Scanners.pxd @@ -0,0 +1,50 @@ +from __future__ import absolute_import + +import cython + +from Cython.Plex.Actions cimport Action + +cdef class Scanner: + + cdef public lexicon + cdef public stream + cdef public name + cdef public unicode buffer + cdef public Py_ssize_t buf_start_pos + cdef public Py_ssize_t next_pos + cdef public Py_ssize_t cur_pos + cdef public Py_ssize_t cur_line + cdef public Py_ssize_t cur_line_start + cdef public Py_ssize_t start_pos + cdef public Py_ssize_t start_line + cdef public Py_ssize_t start_col + cdef public text + cdef public initial_state # int? + cdef public state_name + cdef public list queue + cdef public bint trace + cdef public cur_char + cdef public long input_state + + cdef public level + + @cython.final + @cython.locals(input_state=long) + cdef next_char(self) + @cython.locals(action=Action) + cpdef tuple read(self) + @cython.final + cdef tuple scan_a_token(self) + ##cdef tuple position(self) # used frequently by Parsing.py + + @cython.final + @cython.locals(cur_pos=Py_ssize_t, cur_line=Py_ssize_t, cur_line_start=Py_ssize_t, + input_state=long, next_pos=Py_ssize_t, state=dict, + buf_start_pos=Py_ssize_t, buf_len=Py_ssize_t, buf_index=Py_ssize_t, + trace=bint, discard=Py_ssize_t, data=unicode, buffer=unicode) + cdef run_machine_inlined(self) + + @cython.final + cdef begin(self, state) + @cython.final + cdef produce(self, value, text = *) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Scanners.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Scanners.py new file mode 100644 index 00000000000..88f7e2da3ba --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Scanners.py @@ -0,0 +1,338 @@ +# cython: auto_pickle=False +#======================================================================= +# +# Python Lexical Analyser +# +# +# Scanning an input stream +# +#======================================================================= + +from __future__ import absolute_import + +import cython + +cython.declare(BOL=object, EOL=object, EOF=object, NOT_FOUND=object) + +from . import Errors +from .Regexps import BOL, EOL, EOF + +NOT_FOUND = object() + + +class Scanner(object): + """ + A Scanner is used to read tokens from a stream of characters + using the token set specified by a Plex.Lexicon. + + Constructor: + + Scanner(lexicon, stream, name = '') + + See the docstring of the __init__ method for details. + + Methods: + + See the docstrings of the individual methods for more + information. + + read() --> (value, text) + Reads the next lexical token from the stream. + + position() --> (name, line, col) + Returns the position of the last token read using the + read() method. + + begin(state_name) + Causes scanner to change state. + + produce(value [, text]) + Causes return of a token value to the caller of the + Scanner. + + """ + + # lexicon = None # Lexicon + # stream = None # file-like object + # name = '' + # buffer = '' + # buf_start_pos = 0 # position in input of start of buffer + # next_pos = 0 # position in input of next char to read + # cur_pos = 0 # position in input of current char + # cur_line = 1 # line number of current char + # cur_line_start = 0 # position in input of start of current line + # start_pos = 0 # position in input of start of token + # start_line = 0 # line number of start of token + # start_col = 0 # position in line of start of token + # text = None # text of last token read + # initial_state = None # Node + # state_name = '' # Name of initial state + # queue = None # list of tokens to be returned + # trace = 0 + + def __init__(self, lexicon, stream, name='', initial_pos=None): + """ + Scanner(lexicon, stream, name = '') + + |lexicon| is a Plex.Lexicon instance specifying the lexical tokens + to be recognised. + + |stream| can be a file object or anything which implements a + compatible read() method. + + |name| is optional, and may be the name of the file being + scanned or any other identifying string. + """ + self.trace = 0 + + self.buffer = u'' + self.buf_start_pos = 0 + self.next_pos = 0 + self.cur_pos = 0 + self.cur_line = 1 + self.start_pos = 0 + self.start_line = 0 + self.start_col = 0 + self.text = None + self.state_name = None + + self.lexicon = lexicon + self.stream = stream + self.name = name + self.queue = [] + self.initial_state = None + self.begin('') + self.next_pos = 0 + self.cur_pos = 0 + self.cur_line_start = 0 + self.cur_char = BOL + self.input_state = 1 + if initial_pos is not None: + self.cur_line, self.cur_line_start = initial_pos[1], -initial_pos[2] + + def read(self): + """ + Read the next lexical token from the stream and return a + tuple (value, text), where |value| is the value associated with + the token as specified by the Lexicon, and |text| is the actual + string read from the stream. Returns (None, '') on end of file. + """ + queue = self.queue + while not queue: + self.text, action = self.scan_a_token() + if action is None: + self.produce(None) + self.eof() + else: + value = action.perform(self, self.text) + if value is not None: + self.produce(value) + result = queue[0] + del queue[0] + return result + + def scan_a_token(self): + """ + Read the next input sequence recognised by the machine + and return (text, action). Returns ('', None) on end of + file. + """ + self.start_pos = self.cur_pos + self.start_line = self.cur_line + self.start_col = self.cur_pos - self.cur_line_start + action = self.run_machine_inlined() + if action is not None: + if self.trace: + print("Scanner: read: Performing %s %d:%d" % ( + action, self.start_pos, self.cur_pos)) + text = self.buffer[ + self.start_pos - self.buf_start_pos: + self.cur_pos - self.buf_start_pos] + return (text, action) + else: + if self.cur_pos == self.start_pos: + if self.cur_char is EOL: + self.next_char() + if self.cur_char is None or self.cur_char is EOF: + return (u'', None) + raise Errors.UnrecognizedInput(self, self.state_name) + + def run_machine_inlined(self): + """ + Inlined version of run_machine for speed. + """ + state = self.initial_state + cur_pos = self.cur_pos + cur_line = self.cur_line + cur_line_start = self.cur_line_start + cur_char = self.cur_char + input_state = self.input_state + next_pos = self.next_pos + buffer = self.buffer + buf_start_pos = self.buf_start_pos + buf_len = len(buffer) + b_action, b_cur_pos, b_cur_line, b_cur_line_start, b_cur_char, b_input_state, b_next_pos = \ + None, 0, 0, 0, u'', 0, 0 + trace = self.trace + while 1: + if trace: #TRACE# + print("State %d, %d/%d:%s -->" % ( #TRACE# + state['number'], input_state, cur_pos, repr(cur_char))) #TRACE# + # Begin inlined self.save_for_backup() + #action = state.action #@slow + action = state['action'] #@fast + if action is not None: + b_action, b_cur_pos, b_cur_line, b_cur_line_start, b_cur_char, b_input_state, b_next_pos = \ + action, cur_pos, cur_line, cur_line_start, cur_char, input_state, next_pos + # End inlined self.save_for_backup() + c = cur_char + #new_state = state.new_state(c) #@slow + new_state = state.get(c, NOT_FOUND) #@fast + if new_state is NOT_FOUND: #@fast + new_state = c and state.get('else') #@fast + if new_state: + if trace: #TRACE# + print("State %d" % new_state['number']) #TRACE# + state = new_state + # Begin inlined: self.next_char() + if input_state == 1: + cur_pos = next_pos + # Begin inlined: c = self.read_char() + buf_index = next_pos - buf_start_pos + if buf_index < buf_len: + c = buffer[buf_index] + next_pos += 1 + else: + discard = self.start_pos - buf_start_pos + data = self.stream.read(0x1000) + buffer = self.buffer[discard:] + data + self.buffer = buffer + buf_start_pos += discard + self.buf_start_pos = buf_start_pos + buf_len = len(buffer) + buf_index -= discard + if data: + c = buffer[buf_index] + next_pos += 1 + else: + c = u'' + # End inlined: c = self.read_char() + if c == u'\n': + cur_char = EOL + input_state = 2 + elif not c: + cur_char = EOL + input_state = 4 + else: + cur_char = c + elif input_state == 2: + cur_char = u'\n' + input_state = 3 + elif input_state == 3: + cur_line += 1 + cur_line_start = cur_pos = next_pos + cur_char = BOL + input_state = 1 + elif input_state == 4: + cur_char = EOF + input_state = 5 + else: # input_state = 5 + cur_char = u'' + # End inlined self.next_char() + else: # not new_state + if trace: #TRACE# + print("blocked") #TRACE# + # Begin inlined: action = self.back_up() + if b_action is not None: + (action, cur_pos, cur_line, cur_line_start, + cur_char, input_state, next_pos) = \ + (b_action, b_cur_pos, b_cur_line, b_cur_line_start, + b_cur_char, b_input_state, b_next_pos) + else: + action = None + break # while 1 + # End inlined: action = self.back_up() + self.cur_pos = cur_pos + self.cur_line = cur_line + self.cur_line_start = cur_line_start + self.cur_char = cur_char + self.input_state = input_state + self.next_pos = next_pos + if trace: #TRACE# + if action is not None: #TRACE# + print("Doing %s" % action) #TRACE# + return action + + def next_char(self): + input_state = self.input_state + if self.trace: + print("Scanner: next: %s [%d] %d" % (" " * 20, input_state, self.cur_pos)) + if input_state == 1: + self.cur_pos = self.next_pos + c = self.read_char() + if c == u'\n': + self.cur_char = EOL + self.input_state = 2 + elif not c: + self.cur_char = EOL + self.input_state = 4 + else: + self.cur_char = c + elif input_state == 2: + self.cur_char = u'\n' + self.input_state = 3 + elif input_state == 3: + self.cur_line += 1 + self.cur_line_start = self.cur_pos = self.next_pos + self.cur_char = BOL + self.input_state = 1 + elif input_state == 4: + self.cur_char = EOF + self.input_state = 5 + else: # input_state = 5 + self.cur_char = u'' + if self.trace: + print("--> [%d] %d %r" % (input_state, self.cur_pos, self.cur_char)) + + def position(self): + """ + Return a tuple (name, line, col) representing the location of + the last token read using the read() method. |name| is the + name that was provided to the Scanner constructor; |line| + is the line number in the stream (1-based); |col| is the + position within the line of the first character of the token + (0-based). + """ + return (self.name, self.start_line, self.start_col) + + def get_position(self): + """Python accessible wrapper around position(), only for error reporting. + """ + return self.position() + + def begin(self, state_name): + """Set the current state of the scanner to the named state.""" + self.initial_state = ( + self.lexicon.get_initial_state(state_name)) + self.state_name = state_name + + def produce(self, value, text=None): + """ + Called from an action procedure, causes |value| to be returned + as the token value from read(). If |text| is supplied, it is + returned in place of the scanned text. + + produce() can be called more than once during a single call to an action + procedure, in which case the tokens are queued up and returned one + at a time by subsequent calls to read(), until the queue is empty, + whereupon scanning resumes. + """ + if text is None: + text = self.text + self.queue.append((value, text)) + + def eof(self): + """ + Override this method if you want something to be done at + end of file. + """ diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Timing.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Timing.py new file mode 100644 index 00000000000..5c3692693bb --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Timing.py @@ -0,0 +1,23 @@ +# +# Get time in platform-dependent way +# + +from __future__ import absolute_import + +import os +from sys import platform, exit, stderr + +if platform == 'mac': + import MacOS + def time(): + return MacOS.GetTicks() / 60.0 + timekind = "real" +elif hasattr(os, 'times'): + def time(): + t = os.times() + return t[0] + t[1] + timekind = "cpu" +else: + stderr.write( + "Don't know how to get time on platform %s\n" % repr(platform)) + exit(1) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Traditional.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Traditional.py new file mode 100644 index 00000000000..ec7252daed9 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Traditional.py @@ -0,0 +1,158 @@ +#======================================================================= +# +# Python Lexical Analyser +# +# Traditional Regular Expression Syntax +# +#======================================================================= + +from __future__ import absolute_import + +from .Regexps import Alt, Seq, Rep, Rep1, Opt, Any, AnyBut, Bol, Eol, Char +from .Errors import PlexError + + +class RegexpSyntaxError(PlexError): + pass + + +def re(s): + """ + Convert traditional string representation of regular expression |s| + into Plex representation. + """ + return REParser(s).parse_re() + + +class REParser(object): + def __init__(self, s): + self.s = s + self.i = -1 + self.end = 0 + self.next() + + def parse_re(self): + re = self.parse_alt() + if not self.end: + self.error("Unexpected %s" % repr(self.c)) + return re + + def parse_alt(self): + """Parse a set of alternative regexps.""" + re = self.parse_seq() + if self.c == '|': + re_list = [re] + while self.c == '|': + self.next() + re_list.append(self.parse_seq()) + re = Alt(*re_list) + return re + + def parse_seq(self): + """Parse a sequence of regexps.""" + re_list = [] + while not self.end and not self.c in "|)": + re_list.append(self.parse_mod()) + return Seq(*re_list) + + def parse_mod(self): + """Parse a primitive regexp followed by *, +, ? modifiers.""" + re = self.parse_prim() + while not self.end and self.c in "*+?": + if self.c == '*': + re = Rep(re) + elif self.c == '+': + re = Rep1(re) + else: # self.c == '?' + re = Opt(re) + self.next() + return re + + def parse_prim(self): + """Parse a primitive regexp.""" + c = self.get() + if c == '.': + re = AnyBut("\n") + elif c == '^': + re = Bol + elif c == '$': + re = Eol + elif c == '(': + re = self.parse_alt() + self.expect(')') + elif c == '[': + re = self.parse_charset() + self.expect(']') + else: + if c == '\\': + c = self.get() + re = Char(c) + return re + + def parse_charset(self): + """Parse a charset. Does not include the surrounding [].""" + char_list = [] + invert = 0 + if self.c == '^': + invert = 1 + self.next() + if self.c == ']': + char_list.append(']') + self.next() + while not self.end and self.c != ']': + c1 = self.get() + if self.c == '-' and self.lookahead(1) != ']': + self.next() + c2 = self.get() + for a in range(ord(c1), ord(c2) + 1): + char_list.append(chr(a)) + else: + char_list.append(c1) + chars = ''.join(char_list) + if invert: + return AnyBut(chars) + else: + return Any(chars) + + def next(self): + """Advance to the next char.""" + s = self.s + i = self.i = self.i + 1 + if i < len(s): + self.c = s[i] + else: + self.c = '' + self.end = 1 + + def get(self): + if self.end: + self.error("Premature end of string") + c = self.c + self.next() + return c + + def lookahead(self, n): + """Look ahead n chars.""" + j = self.i + n + if j < len(self.s): + return self.s[j] + else: + return '' + + def expect(self, c): + """ + Expect to find character |c| at current position. + Raises an exception otherwise. + """ + if self.c == c: + self.next() + else: + self.error("Missing %s" % repr(c)) + + def error(self, mess): + """Raise exception to signal syntax error in regexp.""" + raise RegexpSyntaxError("Syntax error in regexp %s at position %d: %s" % ( + repr(self.s), self.i, mess)) + + + diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Transitions.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Transitions.py new file mode 100644 index 00000000000..3833817946c --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Transitions.py @@ -0,0 +1,251 @@ +# +# Plex - Transition Maps +# +# This version represents state sets directly as dicts for speed. +# + +from __future__ import absolute_import + +try: + from sys import maxsize as maxint +except ImportError: + from sys import maxint + + +class TransitionMap(object): + """ + A TransitionMap maps an input event to a set of states. + An input event is one of: a range of character codes, + the empty string (representing an epsilon move), or one + of the special symbols BOL, EOL, EOF. + + For characters, this implementation compactly represents + the map by means of a list: + + [code_0, states_0, code_1, states_1, code_2, states_2, + ..., code_n-1, states_n-1, code_n] + + where |code_i| is a character code, and |states_i| is a + set of states corresponding to characters with codes |c| + in the range |code_i| <= |c| <= |code_i+1|. + + The following invariants hold: + n >= 1 + code_0 == -maxint + code_n == maxint + code_i < code_i+1 for i in 0..n-1 + states_0 == states_n-1 + + Mappings for the special events '', BOL, EOL, EOF are + kept separately in a dictionary. + """ + + map = None # The list of codes and states + special = None # Mapping for special events + + def __init__(self, map=None, special=None): + if not map: + map = [-maxint, {}, maxint] + if not special: + special = {} + self.map = map + self.special = special + #self.check() ### + + def add(self, event, new_state, + TupleType=tuple): + """ + Add transition to |new_state| on |event|. + """ + if type(event) is TupleType: + code0, code1 = event + i = self.split(code0) + j = self.split(code1) + map = self.map + while i < j: + map[i + 1][new_state] = 1 + i += 2 + else: + self.get_special(event)[new_state] = 1 + + def add_set(self, event, new_set, + TupleType=tuple): + """ + Add transitions to the states in |new_set| on |event|. + """ + if type(event) is TupleType: + code0, code1 = event + i = self.split(code0) + j = self.split(code1) + map = self.map + while i < j: + map[i + 1].update(new_set) + i += 2 + else: + self.get_special(event).update(new_set) + + def get_epsilon(self, + none=None): + """ + Return the mapping for epsilon, or None. + """ + return self.special.get('', none) + + def iteritems(self, + len=len): + """ + Return the mapping as an iterable of ((code1, code2), state_set) and + (special_event, state_set) pairs. + """ + result = [] + map = self.map + else_set = map[1] + i = 0 + n = len(map) - 1 + code0 = map[0] + while i < n: + set = map[i + 1] + code1 = map[i + 2] + if set or else_set: + result.append(((code0, code1), set)) + code0 = code1 + i += 2 + for event, set in self.special.items(): + if set: + result.append((event, set)) + return iter(result) + + items = iteritems + + # ------------------- Private methods -------------------- + + def split(self, code, + len=len, maxint=maxint): + """ + Search the list for the position of the split point for |code|, + inserting a new split point if necessary. Returns index |i| such + that |code| == |map[i]|. + """ + # We use a funky variation on binary search. + map = self.map + hi = len(map) - 1 + # Special case: code == map[-1] + if code == maxint: + return hi + # General case + lo = 0 + # loop invariant: map[lo] <= code < map[hi] and hi - lo >= 2 + while hi - lo >= 4: + # Find midpoint truncated to even index + mid = ((lo + hi) // 2) & ~1 + if code < map[mid]: + hi = mid + else: + lo = mid + # map[lo] <= code < map[hi] and hi - lo == 2 + if map[lo] == code: + return lo + else: + map[hi:hi] = [code, map[hi - 1].copy()] + #self.check() ### + return hi + + def get_special(self, event): + """ + Get state set for special event, adding a new entry if necessary. + """ + special = self.special + set = special.get(event, None) + if not set: + set = {} + special[event] = set + return set + + # --------------------- Conversion methods ----------------------- + + def __str__(self): + map_strs = [] + map = self.map + n = len(map) + i = 0 + while i < n: + code = map[i] + if code == -maxint: + code_str = "-inf" + elif code == maxint: + code_str = "inf" + else: + code_str = str(code) + map_strs.append(code_str) + i += 1 + if i < n: + map_strs.append(state_set_str(map[i])) + i += 1 + special_strs = {} + for event, set in self.special.items(): + special_strs[event] = state_set_str(set) + return "[%s]+%s" % ( + ','.join(map_strs), + special_strs + ) + + # --------------------- Debugging methods ----------------------- + + def check(self): + """Check data structure integrity.""" + if not self.map[-3] < self.map[-1]: + print(self) + assert 0 + + def dump(self, file): + map = self.map + i = 0 + n = len(map) - 1 + while i < n: + self.dump_range(map[i], map[i + 2], map[i + 1], file) + i += 2 + for event, set in self.special.items(): + if set: + if not event: + event = 'empty' + self.dump_trans(event, set, file) + + def dump_range(self, code0, code1, set, file): + if set: + if code0 == -maxint: + if code1 == maxint: + k = "any" + else: + k = "< %s" % self.dump_char(code1) + elif code1 == maxint: + k = "> %s" % self.dump_char(code0 - 1) + elif code0 == code1 - 1: + k = self.dump_char(code0) + else: + k = "%s..%s" % (self.dump_char(code0), + self.dump_char(code1 - 1)) + self.dump_trans(k, set, file) + + def dump_char(self, code): + if 0 <= code <= 255: + return repr(chr(code)) + else: + return "chr(%d)" % code + + def dump_trans(self, key, set, file): + file.write(" %s --> %s\n" % (key, self.dump_set(set))) + + def dump_set(self, set): + return state_set_str(set) + + +# +# State set manipulation functions +# + +#def merge_state_sets(set1, set2): +# for state in set2.keys(): +# set1[state] = 1 + +def state_set_str(set): + return "[%s]" % ','.join(["S%d" % state.number for state in set]) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/__init__.py new file mode 100644 index 00000000000..81a066f782c --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/__init__.py @@ -0,0 +1,39 @@ +#======================================================================= +# +# Python Lexical Analyser +# +#======================================================================= + +""" +The Plex module provides lexical analysers with similar capabilities +to GNU Flex. The following classes and functions are exported; +see the attached docstrings for more information. + + Scanner For scanning a character stream under the + direction of a Lexicon. + + Lexicon For constructing a lexical definition + to be used by a Scanner. + + Str, Any, AnyBut, AnyChar, Seq, Alt, Opt, Rep, Rep1, + Bol, Eol, Eof, Empty + + Regular expression constructors, for building pattern + definitions for a Lexicon. + + State For defining scanner states when creating a + Lexicon. + + TEXT, IGNORE, Begin + + Actions for associating with patterns when + creating a Lexicon. +""" + +from __future__ import absolute_import + +from .Actions import TEXT, IGNORE, Begin +from .Lexicons import Lexicon, State +from .Regexps import RE, Seq, Alt, Rep1, Empty, Str, Any, AnyBut, AnyChar, Range +from .Regexps import Opt, Rep, Bol, Eol, Eof, Case, NoCase +from .Scanners import Scanner diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Runtime/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Runtime/__init__.py new file mode 100644 index 00000000000..fa81adaff68 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Runtime/__init__.py @@ -0,0 +1 @@ +# empty file diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Runtime/refnanny.pyx b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Runtime/refnanny.pyx new file mode 100644 index 00000000000..d4b873fe97a --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Runtime/refnanny.pyx @@ -0,0 +1,194 @@ +# cython: language_level=3, auto_pickle=False + +from cpython.ref cimport PyObject, Py_INCREF, Py_DECREF, Py_XDECREF, Py_XINCREF +from cpython.exc cimport PyErr_Fetch, PyErr_Restore +from cpython.pystate cimport PyThreadState_Get + +cimport cython + +loglevel = 0 +reflog = [] + +cdef log(level, action, obj, lineno): + if loglevel >= level: + reflog.append((lineno, action, id(obj))) + +LOG_NONE, LOG_ALL = range(2) + +@cython.final +cdef class Context(object): + cdef readonly object name, filename + cdef readonly dict refs + cdef readonly list errors + cdef readonly Py_ssize_t start + + def __cinit__(self, name, line=0, filename=None): + self.name = name + self.start = line + self.filename = filename + self.refs = {} # id -> (count, [lineno]) + self.errors = [] + + cdef regref(self, obj, lineno, bint is_null): + log(LOG_ALL, u'regref', u"" if is_null else obj, lineno) + if is_null: + self.errors.append(f"NULL argument on line {lineno}") + return + id_ = id(obj) + count, linenumbers = self.refs.get(id_, (0, [])) + self.refs[id_] = (count + 1, linenumbers) + linenumbers.append(lineno) + + cdef bint delref(self, obj, lineno, bint is_null) except -1: + # returns whether it is ok to do the decref operation + log(LOG_ALL, u'delref', u"" if is_null else obj, lineno) + if is_null: + self.errors.append(f"NULL argument on line {lineno}") + return False + id_ = id(obj) + count, linenumbers = self.refs.get(id_, (0, [])) + if count == 0: + self.errors.append(f"Too many decrefs on line {lineno}, reference acquired on lines {linenumbers!r}") + return False + elif count == 1: + del self.refs[id_] + return True + else: + self.refs[id_] = (count - 1, linenumbers) + return True + + cdef end(self): + if self.refs: + msg = u"References leaked:" + for count, linenos in self.refs.itervalues(): + msg += f"\n ({count}) acquired on lines: {u', '.join([f'{x}' for x in linenos])}" + self.errors.append(msg) + if self.errors: + return u"\n".join([u'REFNANNY: '+error for error in self.errors]) + else: + return None + +cdef void report_unraisable(object e=None): + try: + if e is None: + import sys + e = sys.exc_info()[1] + print(f"refnanny raised an exception: {e}") + except: + pass # We absolutely cannot exit with an exception + +# All Python operations must happen after any existing +# exception has been fetched, in case we are called from +# exception-handling code. + +cdef PyObject* SetupContext(char* funcname, int lineno, char* filename) except NULL: + if Context is None: + # Context may be None during finalize phase. + # In that case, we don't want to be doing anything fancy + # like caching and resetting exceptions. + return NULL + cdef (PyObject*) type = NULL, value = NULL, tb = NULL, result = NULL + PyThreadState_Get() + PyErr_Fetch(&type, &value, &tb) + try: + ctx = Context(funcname, lineno, filename) + Py_INCREF(ctx) + result = ctx + except Exception, e: + report_unraisable(e) + PyErr_Restore(type, value, tb) + return result + +cdef void GOTREF(PyObject* ctx, PyObject* p_obj, int lineno): + if ctx == NULL: return + cdef (PyObject*) type = NULL, value = NULL, tb = NULL + PyErr_Fetch(&type, &value, &tb) + try: + try: + if p_obj is NULL: + (ctx).regref(None, lineno, True) + else: + (ctx).regref(p_obj, lineno, False) + except: + report_unraisable() + except: + # __Pyx_GetException may itself raise errors + pass + PyErr_Restore(type, value, tb) + +cdef int GIVEREF_and_report(PyObject* ctx, PyObject* p_obj, int lineno): + if ctx == NULL: return 1 + cdef (PyObject*) type = NULL, value = NULL, tb = NULL + cdef bint decref_ok = False + PyErr_Fetch(&type, &value, &tb) + try: + try: + if p_obj is NULL: + decref_ok = (ctx).delref(None, lineno, True) + else: + decref_ok = (ctx).delref(p_obj, lineno, False) + except: + report_unraisable() + except: + # __Pyx_GetException may itself raise errors + pass + PyErr_Restore(type, value, tb) + return decref_ok + +cdef void GIVEREF(PyObject* ctx, PyObject* p_obj, int lineno): + GIVEREF_and_report(ctx, p_obj, lineno) + +cdef void INCREF(PyObject* ctx, PyObject* obj, int lineno): + Py_XINCREF(obj) + PyThreadState_Get() + GOTREF(ctx, obj, lineno) + +cdef void DECREF(PyObject* ctx, PyObject* obj, int lineno): + if GIVEREF_and_report(ctx, obj, lineno): + Py_XDECREF(obj) + PyThreadState_Get() + +cdef void FinishContext(PyObject** ctx): + if ctx == NULL or ctx[0] == NULL: return + cdef (PyObject*) type = NULL, value = NULL, tb = NULL + cdef object errors = None + cdef Context context + PyThreadState_Get() + PyErr_Fetch(&type, &value, &tb) + try: + try: + context = ctx[0] + errors = context.end() + if errors: + print(f"{context.filename.decode('latin1')}: {context.name.decode('latin1')}()") + print(errors) + context = None + except: + report_unraisable() + except: + # __Pyx_GetException may itself raise errors + pass + Py_XDECREF(ctx[0]) + ctx[0] = NULL + PyErr_Restore(type, value, tb) + +ctypedef struct RefNannyAPIStruct: + void (*INCREF)(PyObject*, PyObject*, int) + void (*DECREF)(PyObject*, PyObject*, int) + void (*GOTREF)(PyObject*, PyObject*, int) + void (*GIVEREF)(PyObject*, PyObject*, int) + PyObject* (*SetupContext)(char*, int, char*) except NULL + void (*FinishContext)(PyObject**) + +cdef RefNannyAPIStruct api +api.INCREF = INCREF +api.DECREF = DECREF +api.GOTREF = GOTREF +api.GIVEREF = GIVEREF +api.SetupContext = SetupContext +api.FinishContext = FinishContext + +cdef extern from "Python.h": + object PyLong_FromVoidPtr(void*) + +RefNannyAPI = PyLong_FromVoidPtr(&api) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Shadow.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Shadow.py new file mode 100644 index 00000000000..cc8c9b60ad5 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Shadow.py @@ -0,0 +1,474 @@ +# cython.* namespace for pure mode. +from __future__ import absolute_import + +__version__ = "0.29.30" + +try: + from __builtin__ import basestring +except ImportError: + basestring = str + + +# BEGIN shameless copy from Cython/minivect/minitypes.py + +class _ArrayType(object): + + is_array = True + subtypes = ['dtype'] + + def __init__(self, dtype, ndim, is_c_contig=False, is_f_contig=False, + inner_contig=False, broadcasting=None): + self.dtype = dtype + self.ndim = ndim + self.is_c_contig = is_c_contig + self.is_f_contig = is_f_contig + self.inner_contig = inner_contig or is_c_contig or is_f_contig + self.broadcasting = broadcasting + + def __repr__(self): + axes = [":"] * self.ndim + if self.is_c_contig: + axes[-1] = "::1" + elif self.is_f_contig: + axes[0] = "::1" + + return "%s[%s]" % (self.dtype, ", ".join(axes)) + + +def index_type(base_type, item): + """ + Support array type creation by slicing, e.g. double[:, :] specifies + a 2D strided array of doubles. The syntax is the same as for + Cython memoryviews. + """ + class InvalidTypeSpecification(Exception): + pass + + def verify_slice(s): + if s.start or s.stop or s.step not in (None, 1): + raise InvalidTypeSpecification( + "Only a step of 1 may be provided to indicate C or " + "Fortran contiguity") + + if isinstance(item, tuple): + step_idx = None + for idx, s in enumerate(item): + verify_slice(s) + if s.step and (step_idx or idx not in (0, len(item) - 1)): + raise InvalidTypeSpecification( + "Step may only be provided once, and only in the " + "first or last dimension.") + + if s.step == 1: + step_idx = idx + + return _ArrayType(base_type, len(item), + is_c_contig=step_idx == len(item) - 1, + is_f_contig=step_idx == 0) + elif isinstance(item, slice): + verify_slice(item) + return _ArrayType(base_type, 1, is_c_contig=bool(item.step)) + else: + # int[8] etc. + assert int(item) == item # array size must be a plain integer + array(base_type, item) + +# END shameless copy + + +compiled = False + +_Unspecified = object() + +# Function decorators + +def _empty_decorator(x): + return x + +def locals(**arg_types): + return _empty_decorator + +def test_assert_path_exists(*paths): + return _empty_decorator + +def test_fail_if_path_exists(*paths): + return _empty_decorator + +class _EmptyDecoratorAndManager(object): + def __call__(self, x): + return x + def __enter__(self): + pass + def __exit__(self, exc_type, exc_value, traceback): + pass + +class _Optimization(object): + pass + +cclass = ccall = cfunc = _EmptyDecoratorAndManager() + +returns = wraparound = boundscheck = initializedcheck = nonecheck = \ + embedsignature = cdivision = cdivision_warnings = \ + always_allows_keywords = profile = linetrace = infer_types = \ + unraisable_tracebacks = freelist = \ + lambda _: _EmptyDecoratorAndManager() + +exceptval = lambda _=None, check=True: _EmptyDecoratorAndManager() + +overflowcheck = lambda _: _EmptyDecoratorAndManager() +optimization = _Optimization() + +overflowcheck.fold = optimization.use_switch = \ + optimization.unpack_method_calls = lambda arg: _EmptyDecoratorAndManager() + +final = internal = type_version_tag = no_gc_clear = no_gc = _empty_decorator + +binding = lambda _: _empty_decorator + + +_cython_inline = None +def inline(f, *args, **kwds): + if isinstance(f, basestring): + global _cython_inline + if _cython_inline is None: + from Cython.Build.Inline import cython_inline as _cython_inline + return _cython_inline(f, *args, **kwds) + else: + assert len(args) == len(kwds) == 0 + return f + + +def compile(f): + from Cython.Build.Inline import RuntimeCompiledFunction + return RuntimeCompiledFunction(f) + + +# Special functions + +def cdiv(a, b): + q = a / b + if q < 0: + q += 1 + return q + +def cmod(a, b): + r = a % b + if (a*b) < 0: + r -= b + return r + + +# Emulated language constructs + +def cast(type, *args, **kwargs): + kwargs.pop('typecheck', None) + assert not kwargs + if hasattr(type, '__call__'): + return type(*args) + else: + return args[0] + +def sizeof(arg): + return 1 + +def typeof(arg): + return arg.__class__.__name__ + # return type(arg) + +def address(arg): + return pointer(type(arg))([arg]) + +def declare(type=None, value=_Unspecified, **kwds): + if type not in (None, object) and hasattr(type, '__call__'): + if value is not _Unspecified: + return type(value) + else: + return type() + else: + return value + +class _nogil(object): + """Support for 'with nogil' statement and @nogil decorator. + """ + def __call__(self, x): + if callable(x): + # Used as function decorator => return the function unchanged. + return x + # Used as conditional context manager or to create an "@nogil(True/False)" decorator => keep going. + return self + + def __enter__(self): + pass + def __exit__(self, exc_class, exc, tb): + return exc_class is None + +nogil = _nogil() +gil = _nogil() +del _nogil + + +# Emulated types + +class CythonMetaType(type): + + def __getitem__(type, ix): + return array(type, ix) + +CythonTypeObject = CythonMetaType('CythonTypeObject', (object,), {}) + +class CythonType(CythonTypeObject): + + def _pointer(self, n=1): + for i in range(n): + self = pointer(self) + return self + +class PointerType(CythonType): + + def __init__(self, value=None): + if isinstance(value, (ArrayType, PointerType)): + self._items = [cast(self._basetype, a) for a in value._items] + elif isinstance(value, list): + self._items = [cast(self._basetype, a) for a in value] + elif value is None or value == 0: + self._items = [] + else: + raise ValueError + + def __getitem__(self, ix): + if ix < 0: + raise IndexError("negative indexing not allowed in C") + return self._items[ix] + + def __setitem__(self, ix, value): + if ix < 0: + raise IndexError("negative indexing not allowed in C") + self._items[ix] = cast(self._basetype, value) + + def __eq__(self, value): + if value is None and not self._items: + return True + elif type(self) != type(value): + return False + else: + return not self._items and not value._items + + def __repr__(self): + return "%s *" % (self._basetype,) + +class ArrayType(PointerType): + + def __init__(self): + self._items = [None] * self._n + + +class StructType(CythonType): + + def __init__(self, cast_from=_Unspecified, **data): + if cast_from is not _Unspecified: + # do cast + if len(data) > 0: + raise ValueError('Cannot accept keyword arguments when casting.') + if type(cast_from) is not type(self): + raise ValueError('Cannot cast from %s'%cast_from) + for key, value in cast_from.__dict__.items(): + setattr(self, key, value) + else: + for key, value in data.items(): + setattr(self, key, value) + + def __setattr__(self, key, value): + if key in self._members: + self.__dict__[key] = cast(self._members[key], value) + else: + raise AttributeError("Struct has no member '%s'" % key) + + +class UnionType(CythonType): + + def __init__(self, cast_from=_Unspecified, **data): + if cast_from is not _Unspecified: + # do type cast + if len(data) > 0: + raise ValueError('Cannot accept keyword arguments when casting.') + if isinstance(cast_from, dict): + datadict = cast_from + elif type(cast_from) is type(self): + datadict = cast_from.__dict__ + else: + raise ValueError('Cannot cast from %s'%cast_from) + else: + datadict = data + if len(datadict) > 1: + raise AttributeError("Union can only store one field at a time.") + for key, value in datadict.items(): + setattr(self, key, value) + + def __setattr__(self, key, value): + if key == '__dict__': + CythonType.__setattr__(self, key, value) + elif key in self._members: + self.__dict__ = {key: cast(self._members[key], value)} + else: + raise AttributeError("Union has no member '%s'" % key) + +def pointer(basetype): + class PointerInstance(PointerType): + _basetype = basetype + return PointerInstance + +def array(basetype, n): + class ArrayInstance(ArrayType): + _basetype = basetype + _n = n + return ArrayInstance + +def struct(**members): + class StructInstance(StructType): + _members = members + for key in members: + setattr(StructInstance, key, None) + return StructInstance + +def union(**members): + class UnionInstance(UnionType): + _members = members + for key in members: + setattr(UnionInstance, key, None) + return UnionInstance + +class typedef(CythonType): + + def __init__(self, type, name=None): + self._basetype = type + self.name = name + + def __call__(self, *arg): + value = cast(self._basetype, *arg) + return value + + def __repr__(self): + return self.name or str(self._basetype) + + __getitem__ = index_type + +class _FusedType(CythonType): + pass + + +def fused_type(*args): + if not args: + raise TypeError("Expected at least one type as argument") + + # Find the numeric type with biggest rank if all types are numeric + rank = -1 + for type in args: + if type not in (py_int, py_long, py_float, py_complex): + break + + if type_ordering.index(type) > rank: + result_type = type + else: + return result_type + + # Not a simple numeric type, return a fused type instance. The result + # isn't really meant to be used, as we can't keep track of the context in + # pure-mode. Casting won't do anything in this case. + return _FusedType() + + +def _specialized_from_args(signatures, args, kwargs): + "Perhaps this should be implemented in a TreeFragment in Cython code" + raise Exception("yet to be implemented") + + +py_int = typedef(int, "int") +try: + py_long = typedef(long, "long") +except NameError: # Py3 + py_long = typedef(int, "long") +py_float = typedef(float, "float") +py_complex = typedef(complex, "double complex") + + +# Predefined types + +int_types = ['char', 'short', 'Py_UNICODE', 'int', 'Py_UCS4', 'long', 'longlong', 'Py_ssize_t', 'size_t'] +float_types = ['longdouble', 'double', 'float'] +complex_types = ['longdoublecomplex', 'doublecomplex', 'floatcomplex', 'complex'] +other_types = ['bint', 'void', 'Py_tss_t'] + +to_repr = { + 'longlong': 'long long', + 'longdouble': 'long double', + 'longdoublecomplex': 'long double complex', + 'doublecomplex': 'double complex', + 'floatcomplex': 'float complex', +}.get + +gs = globals() + +# note: cannot simply name the unicode type here as 2to3 gets in the way and replaces it by str +try: + import __builtin__ as builtins +except ImportError: # Py3 + import builtins + +gs['unicode'] = typedef(getattr(builtins, 'unicode', str), 'unicode') +del builtins + +for name in int_types: + reprname = to_repr(name, name) + gs[name] = typedef(py_int, reprname) + if name not in ('Py_UNICODE', 'Py_UCS4') and not name.endswith('size_t'): + gs['u'+name] = typedef(py_int, "unsigned " + reprname) + gs['s'+name] = typedef(py_int, "signed " + reprname) + +for name in float_types: + gs[name] = typedef(py_float, to_repr(name, name)) + +for name in complex_types: + gs[name] = typedef(py_complex, to_repr(name, name)) + +bint = typedef(bool, "bint") +void = typedef(None, "void") +Py_tss_t = typedef(None, "Py_tss_t") + +for t in int_types + float_types + complex_types + other_types: + for i in range(1, 4): + gs["%s_%s" % ('p'*i, t)] = gs[t]._pointer(i) + +NULL = gs['p_void'](0) + +# looks like 'gs' has some users out there by now... +#del gs + +integral = floating = numeric = _FusedType() + +type_ordering = [py_int, py_long, py_float, py_complex] + +class CythonDotParallel(object): + """ + The cython.parallel module. + """ + + __all__ = ['parallel', 'prange', 'threadid'] + + def parallel(self, num_threads=None): + return nogil + + def prange(self, start=0, stop=None, step=1, nogil=False, schedule=None, chunksize=None, num_threads=None): + if stop is None: + stop = start + start = 0 + return range(start, stop, step) + + def threadid(self): + return 0 + + # def threadsavailable(self): + # return 1 + +import sys +sys.modules['cython.parallel'] = CythonDotParallel() +del sys diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/StringIOTree.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/StringIOTree.py new file mode 100644 index 00000000000..d8239efeda9 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/StringIOTree.py @@ -0,0 +1,108 @@ +# cython: auto_pickle=False + +r""" +Implements a buffer with insertion points. When you know you need to +"get back" to a place and write more later, simply call insertion_point() +at that spot and get a new StringIOTree object that is "left behind". + +EXAMPLE: + +>>> a = StringIOTree() +>>> _= a.write('first\n') +>>> b = a.insertion_point() +>>> _= a.write('third\n') +>>> _= b.write('second\n') +>>> a.getvalue().split() +['first', 'second', 'third'] + +>>> c = b.insertion_point() +>>> d = c.insertion_point() +>>> _= d.write('alpha\n') +>>> _= b.write('gamma\n') +>>> _= c.write('beta\n') +>>> b.getvalue().split() +['second', 'alpha', 'beta', 'gamma'] + +>>> i = StringIOTree() +>>> d.insert(i) +>>> _= i.write('inserted\n') +>>> out = StringIO() +>>> a.copyto(out) +>>> out.getvalue().split() +['first', 'second', 'alpha', 'inserted', 'beta', 'gamma', 'third'] +""" + +from __future__ import absolute_import #, unicode_literals + +try: + # Prefer cStringIO since io.StringIO() does not support writing 'str' in Py2. + from cStringIO import StringIO +except ImportError: + from io import StringIO + + +class StringIOTree(object): + """ + See module docs. + """ + + def __init__(self, stream=None): + self.prepended_children = [] + if stream is None: + stream = StringIO() + self.stream = stream + self.write = stream.write + self.markers = [] + + def getvalue(self): + content = [x.getvalue() for x in self.prepended_children] + content.append(self.stream.getvalue()) + return "".join(content) + + def copyto(self, target): + """Potentially cheaper than getvalue as no string concatenation + needs to happen.""" + for child in self.prepended_children: + child.copyto(target) + stream_content = self.stream.getvalue() + if stream_content: + target.write(stream_content) + + def commit(self): + # Save what we have written until now so that the buffer + # itself is empty -- this makes it ready for insertion + if self.stream.tell(): + self.prepended_children.append(StringIOTree(self.stream)) + self.prepended_children[-1].markers = self.markers + self.markers = [] + self.stream = StringIO() + self.write = self.stream.write + + def insert(self, iotree): + """ + Insert a StringIOTree (and all of its contents) at this location. + Further writing to self appears after what is inserted. + """ + self.commit() + self.prepended_children.append(iotree) + + def insertion_point(self): + """ + Returns a new StringIOTree, which is left behind at the current position + (it what is written to the result will appear right before whatever is + next written to self). + + Calling getvalue() or copyto() on the result will only return the + contents written to it. + """ + # Save what we have written until now + # This is so that getvalue on the result doesn't include it. + self.commit() + # Construct the new forked object to return + other = StringIOTree() + self.prepended_children.append(other) + return other + + def allmarkers(self): + children = self.prepended_children + return [m for c in children for m in c.allmarkers()] + self.markers diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/__init__.py new file mode 100644 index 00000000000..41a0ce3d0ef --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/__init__.py @@ -0,0 +1,4 @@ +# The original Tempita implements all of its templating code here. +# Moved it to _tempita.py to make the compilation portable. + +from ._tempita import * diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/_looper.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/_looper.py new file mode 100644 index 00000000000..4010988300f --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/_looper.py @@ -0,0 +1,163 @@ +""" +Helper for looping over sequences, particular in templates. + +Often in a loop in a template it's handy to know what's next up, +previously up, if this is the first or last item in the sequence, etc. +These can be awkward to manage in a normal Python loop, but using the +looper you can get a better sense of the context. Use like:: + + >>> for loop, item in looper(['a', 'b', 'c']): + ... print loop.number, item + ... if not loop.last: + ... print '---' + 1 a + --- + 2 b + --- + 3 c + +""" + +import sys +from Cython.Tempita.compat3 import basestring_ + +__all__ = ['looper'] + + +class looper(object): + """ + Helper for looping (particularly in templates) + + Use this like:: + + for loop, item in looper(seq): + if loop.first: + ... + """ + + def __init__(self, seq): + self.seq = seq + + def __iter__(self): + return looper_iter(self.seq) + + def __repr__(self): + return '<%s for %r>' % ( + self.__class__.__name__, self.seq) + + +class looper_iter(object): + + def __init__(self, seq): + self.seq = list(seq) + self.pos = 0 + + def __iter__(self): + return self + + def __next__(self): + if self.pos >= len(self.seq): + raise StopIteration + result = loop_pos(self.seq, self.pos), self.seq[self.pos] + self.pos += 1 + return result + + if sys.version < "3": + next = __next__ + + +class loop_pos(object): + + def __init__(self, seq, pos): + self.seq = seq + self.pos = pos + + def __repr__(self): + return '' % ( + self.seq[self.pos], self.pos) + + def index(self): + return self.pos + index = property(index) + + def number(self): + return self.pos + 1 + number = property(number) + + def item(self): + return self.seq[self.pos] + item = property(item) + + def __next__(self): + try: + return self.seq[self.pos + 1] + except IndexError: + return None + __next__ = property(__next__) + + if sys.version < "3": + next = __next__ + + def previous(self): + if self.pos == 0: + return None + return self.seq[self.pos - 1] + previous = property(previous) + + def odd(self): + return not self.pos % 2 + odd = property(odd) + + def even(self): + return self.pos % 2 + even = property(even) + + def first(self): + return self.pos == 0 + first = property(first) + + def last(self): + return self.pos == len(self.seq) - 1 + last = property(last) + + def length(self): + return len(self.seq) + length = property(length) + + def first_group(self, getter=None): + """ + Returns true if this item is the start of a new group, + where groups mean that some attribute has changed. The getter + can be None (the item itself changes), an attribute name like + ``'.attr'``, a function, or a dict key or list index. + """ + if self.first: + return True + return self._compare_group(self.item, self.previous, getter) + + def last_group(self, getter=None): + """ + Returns true if this item is the end of a new group, + where groups mean that some attribute has changed. The getter + can be None (the item itself changes), an attribute name like + ``'.attr'``, a function, or a dict key or list index. + """ + if self.last: + return True + return self._compare_group(self.item, self.__next__, getter) + + def _compare_group(self, item, other, getter): + if getter is None: + return item != other + elif (isinstance(getter, basestring_) + and getter.startswith('.')): + getter = getter[1:] + if getter.endswith('()'): + getter = getter[:-2] + return getattr(item, getter)() != getattr(other, getter)() + else: + return getattr(item, getter) != getattr(other, getter) + elif hasattr(getter, '__call__'): + return getter(item) != getter(other) + else: + return item[getter] != other[getter] diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/_tempita.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/_tempita.py new file mode 100644 index 00000000000..22a7d233b16 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/_tempita.py @@ -0,0 +1,1182 @@ +""" +A small templating language + +This implements a small templating language. This language implements +if/elif/else, for/continue/break, expressions, and blocks of Python +code. The syntax is:: + + {{any expression (function calls etc)}} + {{any expression | filter}} + {{for x in y}}...{{endfor}} + {{if x}}x{{elif y}}y{{else}}z{{endif}} + {{py:x=1}} + {{py: + def foo(bar): + return 'baz' + }} + {{default var = default_value}} + {{# comment}} + +You use this with the ``Template`` class or the ``sub`` shortcut. +The ``Template`` class takes the template string and the name of +the template (for errors) and a default namespace. Then (like +``string.Template``) you can call the ``tmpl.substitute(**kw)`` +method to make a substitution (or ``tmpl.substitute(a_dict)``). + +``sub(content, **kw)`` substitutes the template immediately. You +can use ``__name='tmpl.html'`` to set the name of the template. + +If there are syntax errors ``TemplateError`` will be raised. +""" + +from __future__ import absolute_import + +import re +import sys +import cgi +try: + from urllib import quote as url_quote +except ImportError: # Py3 + from urllib.parse import quote as url_quote +import os +import tokenize +from io import StringIO + +from ._looper import looper +from .compat3 import bytes, unicode_, basestring_, next, is_unicode, coerce_text + +__all__ = ['TemplateError', 'Template', 'sub', 'HTMLTemplate', + 'sub_html', 'html', 'bunch'] + +in_re = re.compile(r'\s+in\s+') +var_re = re.compile(r'^[a-z_][a-z0-9_]*$', re.I) + + +class TemplateError(Exception): + """Exception raised while parsing a template + """ + + def __init__(self, message, position, name=None): + Exception.__init__(self, message) + self.position = position + self.name = name + + def __str__(self): + msg = ' '.join(self.args) + if self.position: + msg = '%s at line %s column %s' % ( + msg, self.position[0], self.position[1]) + if self.name: + msg += ' in %s' % self.name + return msg + + +class _TemplateContinue(Exception): + pass + + +class _TemplateBreak(Exception): + pass + + +def get_file_template(name, from_template): + path = os.path.join(os.path.dirname(from_template.name), name) + return from_template.__class__.from_filename( + path, namespace=from_template.namespace, + get_template=from_template.get_template) + + +class Template(object): + + default_namespace = { + 'start_braces': '{{', + 'end_braces': '}}', + 'looper': looper, + } + + default_encoding = 'utf8' + default_inherit = None + + def __init__(self, content, name=None, namespace=None, stacklevel=None, + get_template=None, default_inherit=None, line_offset=0, + delimeters=None): + self.content = content + + # set delimeters + if delimeters is None: + delimeters = (self.default_namespace['start_braces'], + self.default_namespace['end_braces']) + else: + #assert len(delimeters) == 2 and all([isinstance(delimeter, basestring) + # for delimeter in delimeters]) + self.default_namespace = self.__class__.default_namespace.copy() + self.default_namespace['start_braces'] = delimeters[0] + self.default_namespace['end_braces'] = delimeters[1] + self.delimeters = delimeters + + self._unicode = is_unicode(content) + if name is None and stacklevel is not None: + try: + caller = sys._getframe(stacklevel) + except ValueError: + pass + else: + globals = caller.f_globals + lineno = caller.f_lineno + if '__file__' in globals: + name = globals['__file__'] + if name.endswith('.pyc') or name.endswith('.pyo'): + name = name[:-1] + elif '__name__' in globals: + name = globals['__name__'] + else: + name = '' + if lineno: + name += ':%s' % lineno + self.name = name + self._parsed = parse(content, name=name, line_offset=line_offset, delimeters=self.delimeters) + if namespace is None: + namespace = {} + self.namespace = namespace + self.get_template = get_template + if default_inherit is not None: + self.default_inherit = default_inherit + + def from_filename(cls, filename, namespace=None, encoding=None, + default_inherit=None, get_template=get_file_template): + f = open(filename, 'rb') + c = f.read() + f.close() + if encoding: + c = c.decode(encoding) + return cls(content=c, name=filename, namespace=namespace, + default_inherit=default_inherit, get_template=get_template) + + from_filename = classmethod(from_filename) + + def __repr__(self): + return '<%s %s name=%r>' % ( + self.__class__.__name__, + hex(id(self))[2:], self.name) + + def substitute(self, *args, **kw): + if args: + if kw: + raise TypeError( + "You can only give positional *or* keyword arguments") + if len(args) > 1: + raise TypeError( + "You can only give one positional argument") + if not hasattr(args[0], 'items'): + raise TypeError( + "If you pass in a single argument, you must pass in a dictionary-like object (with a .items() method); you gave %r" + % (args[0],)) + kw = args[0] + ns = kw + ns['__template_name__'] = self.name + if self.namespace: + ns.update(self.namespace) + result, defs, inherit = self._interpret(ns) + if not inherit: + inherit = self.default_inherit + if inherit: + result = self._interpret_inherit(result, defs, inherit, ns) + return result + + def _interpret(self, ns): + __traceback_hide__ = True + parts = [] + defs = {} + self._interpret_codes(self._parsed, ns, out=parts, defs=defs) + if '__inherit__' in defs: + inherit = defs.pop('__inherit__') + else: + inherit = None + return ''.join(parts), defs, inherit + + def _interpret_inherit(self, body, defs, inherit_template, ns): + __traceback_hide__ = True + if not self.get_template: + raise TemplateError( + 'You cannot use inheritance without passing in get_template', + position=None, name=self.name) + templ = self.get_template(inherit_template, self) + self_ = TemplateObject(self.name) + for name, value in defs.items(): + setattr(self_, name, value) + self_.body = body + ns = ns.copy() + ns['self'] = self_ + return templ.substitute(ns) + + def _interpret_codes(self, codes, ns, out, defs): + __traceback_hide__ = True + for item in codes: + if isinstance(item, basestring_): + out.append(item) + else: + self._interpret_code(item, ns, out, defs) + + def _interpret_code(self, code, ns, out, defs): + __traceback_hide__ = True + name, pos = code[0], code[1] + if name == 'py': + self._exec(code[2], ns, pos) + elif name == 'continue': + raise _TemplateContinue() + elif name == 'break': + raise _TemplateBreak() + elif name == 'for': + vars, expr, content = code[2], code[3], code[4] + expr = self._eval(expr, ns, pos) + self._interpret_for(vars, expr, content, ns, out, defs) + elif name == 'cond': + parts = code[2:] + self._interpret_if(parts, ns, out, defs) + elif name == 'expr': + parts = code[2].split('|') + base = self._eval(parts[0], ns, pos) + for part in parts[1:]: + func = self._eval(part, ns, pos) + base = func(base) + out.append(self._repr(base, pos)) + elif name == 'default': + var, expr = code[2], code[3] + if var not in ns: + result = self._eval(expr, ns, pos) + ns[var] = result + elif name == 'inherit': + expr = code[2] + value = self._eval(expr, ns, pos) + defs['__inherit__'] = value + elif name == 'def': + name = code[2] + signature = code[3] + parts = code[4] + ns[name] = defs[name] = TemplateDef(self, name, signature, body=parts, ns=ns, + pos=pos) + elif name == 'comment': + return + else: + assert 0, "Unknown code: %r" % name + + def _interpret_for(self, vars, expr, content, ns, out, defs): + __traceback_hide__ = True + for item in expr: + if len(vars) == 1: + ns[vars[0]] = item + else: + if len(vars) != len(item): + raise ValueError( + 'Need %i items to unpack (got %i items)' + % (len(vars), len(item))) + for name, value in zip(vars, item): + ns[name] = value + try: + self._interpret_codes(content, ns, out, defs) + except _TemplateContinue: + continue + except _TemplateBreak: + break + + def _interpret_if(self, parts, ns, out, defs): + __traceback_hide__ = True + # @@: if/else/else gets through + for part in parts: + assert not isinstance(part, basestring_) + name, pos = part[0], part[1] + if name == 'else': + result = True + else: + result = self._eval(part[2], ns, pos) + if result: + self._interpret_codes(part[3], ns, out, defs) + break + + def _eval(self, code, ns, pos): + __traceback_hide__ = True + try: + try: + value = eval(code, self.default_namespace, ns) + except SyntaxError as e: + raise SyntaxError( + 'invalid syntax in expression: %s' % code) + return value + except Exception as e: + if getattr(e, 'args', None): + arg0 = e.args[0] + else: + arg0 = coerce_text(e) + e.args = (self._add_line_info(arg0, pos),) + raise + + def _exec(self, code, ns, pos): + __traceback_hide__ = True + try: + exec(code, self.default_namespace, ns) + except Exception as e: + if e.args: + e.args = (self._add_line_info(e.args[0], pos),) + else: + e.args = (self._add_line_info(None, pos),) + raise + + def _repr(self, value, pos): + __traceback_hide__ = True + try: + if value is None: + return '' + if self._unicode: + try: + value = unicode_(value) + except UnicodeDecodeError: + value = bytes(value) + else: + if not isinstance(value, basestring_): + value = coerce_text(value) + if (is_unicode(value) + and self.default_encoding): + value = value.encode(self.default_encoding) + except Exception as e: + e.args = (self._add_line_info(e.args[0], pos),) + raise + else: + if self._unicode and isinstance(value, bytes): + if not self.default_encoding: + raise UnicodeDecodeError( + 'Cannot decode bytes value %r into unicode ' + '(no default_encoding provided)' % value) + try: + value = value.decode(self.default_encoding) + except UnicodeDecodeError as e: + raise UnicodeDecodeError( + e.encoding, + e.object, + e.start, + e.end, + e.reason + ' in string %r' % value) + elif not self._unicode and is_unicode(value): + if not self.default_encoding: + raise UnicodeEncodeError( + 'Cannot encode unicode value %r into bytes ' + '(no default_encoding provided)' % value) + value = value.encode(self.default_encoding) + return value + + def _add_line_info(self, msg, pos): + msg = "%s at line %s column %s" % ( + msg, pos[0], pos[1]) + if self.name: + msg += " in file %s" % self.name + return msg + + +def sub(content, delimeters=None, **kw): + name = kw.get('__name') + tmpl = Template(content, name=name, delimeters=delimeters) + return tmpl.substitute(kw) + + +def paste_script_template_renderer(content, vars, filename=None): + tmpl = Template(content, name=filename) + return tmpl.substitute(vars) + + +class bunch(dict): + + def __init__(self, **kw): + for name, value in kw.items(): + setattr(self, name, value) + + def __setattr__(self, name, value): + self[name] = value + + def __getattr__(self, name): + try: + return self[name] + except KeyError: + raise AttributeError(name) + + def __getitem__(self, key): + if 'default' in self: + try: + return dict.__getitem__(self, key) + except KeyError: + return dict.__getitem__(self, 'default') + else: + return dict.__getitem__(self, key) + + def __repr__(self): + return '<%s %s>' % ( + self.__class__.__name__, + ' '.join(['%s=%r' % (k, v) for k, v in sorted(self.items())])) + +############################################################ +## HTML Templating +############################################################ + + +class html(object): + + def __init__(self, value): + self.value = value + + def __str__(self): + return self.value + + def __html__(self): + return self.value + + def __repr__(self): + return '<%s %r>' % ( + self.__class__.__name__, self.value) + + +def html_quote(value, force=True): + if not force and hasattr(value, '__html__'): + return value.__html__() + if value is None: + return '' + if not isinstance(value, basestring_): + value = coerce_text(value) + if sys.version >= "3" and isinstance(value, bytes): + value = cgi.escape(value.decode('latin1'), 1) + value = value.encode('latin1') + else: + value = cgi.escape(value, 1) + if sys.version < "3": + if is_unicode(value): + value = value.encode('ascii', 'xmlcharrefreplace') + return value + + +def url(v): + v = coerce_text(v) + if is_unicode(v): + v = v.encode('utf8') + return url_quote(v) + + +def attr(**kw): + parts = [] + for name, value in sorted(kw.items()): + if value is None: + continue + if name.endswith('_'): + name = name[:-1] + parts.append('%s="%s"' % (html_quote(name), html_quote(value))) + return html(' '.join(parts)) + + +class HTMLTemplate(Template): + + default_namespace = Template.default_namespace.copy() + default_namespace.update(dict( + html=html, + attr=attr, + url=url, + html_quote=html_quote, + )) + + def _repr(self, value, pos): + if hasattr(value, '__html__'): + value = value.__html__() + quote = False + else: + quote = True + plain = Template._repr(self, value, pos) + if quote: + return html_quote(plain) + else: + return plain + + +def sub_html(content, **kw): + name = kw.get('__name') + tmpl = HTMLTemplate(content, name=name) + return tmpl.substitute(kw) + + +class TemplateDef(object): + def __init__(self, template, func_name, func_signature, + body, ns, pos, bound_self=None): + self._template = template + self._func_name = func_name + self._func_signature = func_signature + self._body = body + self._ns = ns + self._pos = pos + self._bound_self = bound_self + + def __repr__(self): + return '' % ( + self._func_name, self._func_signature, + self._template.name, self._pos) + + def __str__(self): + return self() + + def __call__(self, *args, **kw): + values = self._parse_signature(args, kw) + ns = self._ns.copy() + ns.update(values) + if self._bound_self is not None: + ns['self'] = self._bound_self + out = [] + subdefs = {} + self._template._interpret_codes(self._body, ns, out, subdefs) + return ''.join(out) + + def __get__(self, obj, type=None): + if obj is None: + return self + return self.__class__( + self._template, self._func_name, self._func_signature, + self._body, self._ns, self._pos, bound_self=obj) + + def _parse_signature(self, args, kw): + values = {} + sig_args, var_args, var_kw, defaults = self._func_signature + extra_kw = {} + for name, value in kw.items(): + if not var_kw and name not in sig_args: + raise TypeError( + 'Unexpected argument %s' % name) + if name in sig_args: + values[sig_args] = value + else: + extra_kw[name] = value + args = list(args) + sig_args = list(sig_args) + while args: + while sig_args and sig_args[0] in values: + sig_args.pop(0) + if sig_args: + name = sig_args.pop(0) + values[name] = args.pop(0) + elif var_args: + values[var_args] = tuple(args) + break + else: + raise TypeError( + 'Extra position arguments: %s' + % ', '.join([repr(v) for v in args])) + for name, value_expr in defaults.items(): + if name not in values: + values[name] = self._template._eval( + value_expr, self._ns, self._pos) + for name in sig_args: + if name not in values: + raise TypeError( + 'Missing argument: %s' % name) + if var_kw: + values[var_kw] = extra_kw + return values + + +class TemplateObject(object): + + def __init__(self, name): + self.__name = name + self.get = TemplateObjectGetter(self) + + def __repr__(self): + return '<%s %s>' % (self.__class__.__name__, self.__name) + + +class TemplateObjectGetter(object): + + def __init__(self, template_obj): + self.__template_obj = template_obj + + def __getattr__(self, attr): + return getattr(self.__template_obj, attr, Empty) + + def __repr__(self): + return '<%s around %r>' % (self.__class__.__name__, self.__template_obj) + + +class _Empty(object): + def __call__(self, *args, **kw): + return self + + def __str__(self): + return '' + + def __repr__(self): + return 'Empty' + + def __unicode__(self): + return u'' + + def __iter__(self): + return iter(()) + + def __bool__(self): + return False + + if sys.version < "3": + __nonzero__ = __bool__ + +Empty = _Empty() +del _Empty + +############################################################ +## Lexing and Parsing +############################################################ + + +def lex(s, name=None, trim_whitespace=True, line_offset=0, delimeters=None): + """ + Lex a string into chunks: + + >>> lex('hey') + ['hey'] + >>> lex('hey {{you}}') + ['hey ', ('you', (1, 7))] + >>> lex('hey {{') + Traceback (most recent call last): + ... + TemplateError: No }} to finish last expression at line 1 column 7 + >>> lex('hey }}') + Traceback (most recent call last): + ... + TemplateError: }} outside expression at line 1 column 7 + >>> lex('hey {{ {{') + Traceback (most recent call last): + ... + TemplateError: {{ inside expression at line 1 column 10 + + """ + if delimeters is None: + delimeters = ( Template.default_namespace['start_braces'], + Template.default_namespace['end_braces'] ) + in_expr = False + chunks = [] + last = 0 + last_pos = (line_offset + 1, 1) + + token_re = re.compile(r'%s|%s' % (re.escape(delimeters[0]), + re.escape(delimeters[1]))) + for match in token_re.finditer(s): + expr = match.group(0) + pos = find_position(s, match.end(), last, last_pos) + if expr == delimeters[0] and in_expr: + raise TemplateError('%s inside expression' % delimeters[0], + position=pos, + name=name) + elif expr == delimeters[1] and not in_expr: + raise TemplateError('%s outside expression' % delimeters[1], + position=pos, + name=name) + if expr == delimeters[0]: + part = s[last:match.start()] + if part: + chunks.append(part) + in_expr = True + else: + chunks.append((s[last:match.start()], last_pos)) + in_expr = False + last = match.end() + last_pos = pos + if in_expr: + raise TemplateError('No %s to finish last expression' % delimeters[1], + name=name, position=last_pos) + part = s[last:] + if part: + chunks.append(part) + if trim_whitespace: + chunks = trim_lex(chunks) + return chunks + +statement_re = re.compile(r'^(?:if |elif |for |def |inherit |default |py:)') +single_statements = ['else', 'endif', 'endfor', 'enddef', 'continue', 'break'] +trail_whitespace_re = re.compile(r'\n\r?[\t ]*$') +lead_whitespace_re = re.compile(r'^[\t ]*\n') + + +def trim_lex(tokens): + r""" + Takes a lexed set of tokens, and removes whitespace when there is + a directive on a line by itself: + + >>> tokens = lex('{{if x}}\nx\n{{endif}}\ny', trim_whitespace=False) + >>> tokens + [('if x', (1, 3)), '\nx\n', ('endif', (3, 3)), '\ny'] + >>> trim_lex(tokens) + [('if x', (1, 3)), 'x\n', ('endif', (3, 3)), 'y'] + """ + last_trim = None + for i, current in enumerate(tokens): + if isinstance(current, basestring_): + # we don't trim this + continue + item = current[0] + if not statement_re.search(item) and item not in single_statements: + continue + if not i: + prev = '' + else: + prev = tokens[i - 1] + if i + 1 >= len(tokens): + next_chunk = '' + else: + next_chunk = tokens[i + 1] + if (not isinstance(next_chunk, basestring_) + or not isinstance(prev, basestring_)): + continue + prev_ok = not prev or trail_whitespace_re.search(prev) + if i == 1 and not prev.strip(): + prev_ok = True + if last_trim is not None and last_trim + 2 == i and not prev.strip(): + prev_ok = 'last' + if (prev_ok + and (not next_chunk or lead_whitespace_re.search(next_chunk) + or (i == len(tokens) - 2 and not next_chunk.strip()))): + if prev: + if ((i == 1 and not prev.strip()) + or prev_ok == 'last'): + tokens[i - 1] = '' + else: + m = trail_whitespace_re.search(prev) + # +1 to leave the leading \n on: + prev = prev[:m.start() + 1] + tokens[i - 1] = prev + if next_chunk: + last_trim = i + if i == len(tokens) - 2 and not next_chunk.strip(): + tokens[i + 1] = '' + else: + m = lead_whitespace_re.search(next_chunk) + next_chunk = next_chunk[m.end():] + tokens[i + 1] = next_chunk + return tokens + + +def find_position(string, index, last_index, last_pos): + """Given a string and index, return (line, column)""" + lines = string.count('\n', last_index, index) + if lines > 0: + column = index - string.rfind('\n', last_index, index) + else: + column = last_pos[1] + (index - last_index) + return (last_pos[0] + lines, column) + + +def parse(s, name=None, line_offset=0, delimeters=None): + r""" + Parses a string into a kind of AST + + >>> parse('{{x}}') + [('expr', (1, 3), 'x')] + >>> parse('foo') + ['foo'] + >>> parse('{{if x}}test{{endif}}') + [('cond', (1, 3), ('if', (1, 3), 'x', ['test']))] + >>> parse('series->{{for x in y}}x={{x}}{{endfor}}') + ['series->', ('for', (1, 11), ('x',), 'y', ['x=', ('expr', (1, 27), 'x')])] + >>> parse('{{for x, y in z:}}{{continue}}{{endfor}}') + [('for', (1, 3), ('x', 'y'), 'z', [('continue', (1, 21))])] + >>> parse('{{py:x=1}}') + [('py', (1, 3), 'x=1')] + >>> parse('{{if x}}a{{elif y}}b{{else}}c{{endif}}') + [('cond', (1, 3), ('if', (1, 3), 'x', ['a']), ('elif', (1, 12), 'y', ['b']), ('else', (1, 23), None, ['c']))] + + Some exceptions:: + + >>> parse('{{continue}}') + Traceback (most recent call last): + ... + TemplateError: continue outside of for loop at line 1 column 3 + >>> parse('{{if x}}foo') + Traceback (most recent call last): + ... + TemplateError: No {{endif}} at line 1 column 3 + >>> parse('{{else}}') + Traceback (most recent call last): + ... + TemplateError: else outside of an if block at line 1 column 3 + >>> parse('{{if x}}{{for x in y}}{{endif}}{{endfor}}') + Traceback (most recent call last): + ... + TemplateError: Unexpected endif at line 1 column 25 + >>> parse('{{if}}{{endif}}') + Traceback (most recent call last): + ... + TemplateError: if with no expression at line 1 column 3 + >>> parse('{{for x y}}{{endfor}}') + Traceback (most recent call last): + ... + TemplateError: Bad for (no "in") in 'x y' at line 1 column 3 + >>> parse('{{py:x=1\ny=2}}') + Traceback (most recent call last): + ... + TemplateError: Multi-line py blocks must start with a newline at line 1 column 3 + """ + if delimeters is None: + delimeters = ( Template.default_namespace['start_braces'], + Template.default_namespace['end_braces'] ) + tokens = lex(s, name=name, line_offset=line_offset, delimeters=delimeters) + result = [] + while tokens: + next_chunk, tokens = parse_expr(tokens, name) + result.append(next_chunk) + return result + + +def parse_expr(tokens, name, context=()): + if isinstance(tokens[0], basestring_): + return tokens[0], tokens[1:] + expr, pos = tokens[0] + expr = expr.strip() + if expr.startswith('py:'): + expr = expr[3:].lstrip(' \t') + if expr.startswith('\n') or expr.startswith('\r'): + expr = expr.lstrip('\r\n') + if '\r' in expr: + expr = expr.replace('\r\n', '\n') + expr = expr.replace('\r', '') + expr += '\n' + else: + if '\n' in expr: + raise TemplateError( + 'Multi-line py blocks must start with a newline', + position=pos, name=name) + return ('py', pos, expr), tokens[1:] + elif expr in ('continue', 'break'): + if 'for' not in context: + raise TemplateError( + 'continue outside of for loop', + position=pos, name=name) + return (expr, pos), tokens[1:] + elif expr.startswith('if '): + return parse_cond(tokens, name, context) + elif (expr.startswith('elif ') + or expr == 'else'): + raise TemplateError( + '%s outside of an if block' % expr.split()[0], + position=pos, name=name) + elif expr in ('if', 'elif', 'for'): + raise TemplateError( + '%s with no expression' % expr, + position=pos, name=name) + elif expr in ('endif', 'endfor', 'enddef'): + raise TemplateError( + 'Unexpected %s' % expr, + position=pos, name=name) + elif expr.startswith('for '): + return parse_for(tokens, name, context) + elif expr.startswith('default '): + return parse_default(tokens, name, context) + elif expr.startswith('inherit '): + return parse_inherit(tokens, name, context) + elif expr.startswith('def '): + return parse_def(tokens, name, context) + elif expr.startswith('#'): + return ('comment', pos, tokens[0][0]), tokens[1:] + return ('expr', pos, tokens[0][0]), tokens[1:] + + +def parse_cond(tokens, name, context): + start = tokens[0][1] + pieces = [] + context = context + ('if',) + while 1: + if not tokens: + raise TemplateError( + 'Missing {{endif}}', + position=start, name=name) + if (isinstance(tokens[0], tuple) + and tokens[0][0] == 'endif'): + return ('cond', start) + tuple(pieces), tokens[1:] + next_chunk, tokens = parse_one_cond(tokens, name, context) + pieces.append(next_chunk) + + +def parse_one_cond(tokens, name, context): + (first, pos), tokens = tokens[0], tokens[1:] + content = [] + if first.endswith(':'): + first = first[:-1] + if first.startswith('if '): + part = ('if', pos, first[3:].lstrip(), content) + elif first.startswith('elif '): + part = ('elif', pos, first[5:].lstrip(), content) + elif first == 'else': + part = ('else', pos, None, content) + else: + assert 0, "Unexpected token %r at %s" % (first, pos) + while 1: + if not tokens: + raise TemplateError( + 'No {{endif}}', + position=pos, name=name) + if (isinstance(tokens[0], tuple) + and (tokens[0][0] == 'endif' + or tokens[0][0].startswith('elif ') + or tokens[0][0] == 'else')): + return part, tokens + next_chunk, tokens = parse_expr(tokens, name, context) + content.append(next_chunk) + + +def parse_for(tokens, name, context): + first, pos = tokens[0] + tokens = tokens[1:] + context = ('for',) + context + content = [] + assert first.startswith('for ') + if first.endswith(':'): + first = first[:-1] + first = first[3:].strip() + match = in_re.search(first) + if not match: + raise TemplateError( + 'Bad for (no "in") in %r' % first, + position=pos, name=name) + vars = first[:match.start()] + if '(' in vars: + raise TemplateError( + 'You cannot have () in the variable section of a for loop (%r)' + % vars, position=pos, name=name) + vars = tuple([ + v.strip() for v in first[:match.start()].split(',') + if v.strip()]) + expr = first[match.end():] + while 1: + if not tokens: + raise TemplateError( + 'No {{endfor}}', + position=pos, name=name) + if (isinstance(tokens[0], tuple) + and tokens[0][0] == 'endfor'): + return ('for', pos, vars, expr, content), tokens[1:] + next_chunk, tokens = parse_expr(tokens, name, context) + content.append(next_chunk) + + +def parse_default(tokens, name, context): + first, pos = tokens[0] + assert first.startswith('default ') + first = first.split(None, 1)[1] + parts = first.split('=', 1) + if len(parts) == 1: + raise TemplateError( + "Expression must be {{default var=value}}; no = found in %r" % first, + position=pos, name=name) + var = parts[0].strip() + if ',' in var: + raise TemplateError( + "{{default x, y = ...}} is not supported", + position=pos, name=name) + if not var_re.search(var): + raise TemplateError( + "Not a valid variable name for {{default}}: %r" + % var, position=pos, name=name) + expr = parts[1].strip() + return ('default', pos, var, expr), tokens[1:] + + +def parse_inherit(tokens, name, context): + first, pos = tokens[0] + assert first.startswith('inherit ') + expr = first.split(None, 1)[1] + return ('inherit', pos, expr), tokens[1:] + + +def parse_def(tokens, name, context): + first, start = tokens[0] + tokens = tokens[1:] + assert first.startswith('def ') + first = first.split(None, 1)[1] + if first.endswith(':'): + first = first[:-1] + if '(' not in first: + func_name = first + sig = ((), None, None, {}) + elif not first.endswith(')'): + raise TemplateError("Function definition doesn't end with ): %s" % first, + position=start, name=name) + else: + first = first[:-1] + func_name, sig_text = first.split('(', 1) + sig = parse_signature(sig_text, name, start) + context = context + ('def',) + content = [] + while 1: + if not tokens: + raise TemplateError( + 'Missing {{enddef}}', + position=start, name=name) + if (isinstance(tokens[0], tuple) + and tokens[0][0] == 'enddef'): + return ('def', start, func_name, sig, content), tokens[1:] + next_chunk, tokens = parse_expr(tokens, name, context) + content.append(next_chunk) + + +def parse_signature(sig_text, name, pos): + tokens = tokenize.generate_tokens(StringIO(sig_text).readline) + sig_args = [] + var_arg = None + var_kw = None + defaults = {} + + def get_token(pos=False): + try: + tok_type, tok_string, (srow, scol), (erow, ecol), line = next(tokens) + except StopIteration: + return tokenize.ENDMARKER, '' + if pos: + return tok_type, tok_string, (srow, scol), (erow, ecol) + else: + return tok_type, tok_string + while 1: + var_arg_type = None + tok_type, tok_string = get_token() + if tok_type == tokenize.ENDMARKER: + break + if tok_type == tokenize.OP and (tok_string == '*' or tok_string == '**'): + var_arg_type = tok_string + tok_type, tok_string = get_token() + if tok_type != tokenize.NAME: + raise TemplateError('Invalid signature: (%s)' % sig_text, + position=pos, name=name) + var_name = tok_string + tok_type, tok_string = get_token() + if tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','): + if var_arg_type == '*': + var_arg = var_name + elif var_arg_type == '**': + var_kw = var_name + else: + sig_args.append(var_name) + if tok_type == tokenize.ENDMARKER: + break + continue + if var_arg_type is not None: + raise TemplateError('Invalid signature: (%s)' % sig_text, + position=pos, name=name) + if tok_type == tokenize.OP and tok_string == '=': + nest_type = None + unnest_type = None + nest_count = 0 + start_pos = end_pos = None + parts = [] + while 1: + tok_type, tok_string, s, e = get_token(True) + if start_pos is None: + start_pos = s + end_pos = e + if tok_type == tokenize.ENDMARKER and nest_count: + raise TemplateError('Invalid signature: (%s)' % sig_text, + position=pos, name=name) + if (not nest_count and + (tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','))): + default_expr = isolate_expression(sig_text, start_pos, end_pos) + defaults[var_name] = default_expr + sig_args.append(var_name) + break + parts.append((tok_type, tok_string)) + if nest_count and tok_type == tokenize.OP and tok_string == nest_type: + nest_count += 1 + elif nest_count and tok_type == tokenize.OP and tok_string == unnest_type: + nest_count -= 1 + if not nest_count: + nest_type = unnest_type = None + elif not nest_count and tok_type == tokenize.OP and tok_string in ('(', '[', '{'): + nest_type = tok_string + nest_count = 1 + unnest_type = {'(': ')', '[': ']', '{': '}'}[nest_type] + return sig_args, var_arg, var_kw, defaults + + +def isolate_expression(string, start_pos, end_pos): + srow, scol = start_pos + srow -= 1 + erow, ecol = end_pos + erow -= 1 + lines = string.splitlines(True) + if srow == erow: + return lines[srow][scol:ecol] + parts = [lines[srow][scol:]] + parts.extend(lines[srow+1:erow]) + if erow < len(lines): + # It'll sometimes give (end_row_past_finish, 0) + parts.append(lines[erow][:ecol]) + return ''.join(parts) + +_fill_command_usage = """\ +%prog [OPTIONS] TEMPLATE arg=value + +Use py:arg=value to set a Python value; otherwise all values are +strings. +""" + + +def fill_command(args=None): + import sys + import optparse + import pkg_resources + import os + if args is None: + args = sys.argv[1:] + dist = pkg_resources.get_distribution('Paste') + parser = optparse.OptionParser( + version=coerce_text(dist), + usage=_fill_command_usage) + parser.add_option( + '-o', '--output', + dest='output', + metavar="FILENAME", + help="File to write output to (default stdout)") + parser.add_option( + '--html', + dest='use_html', + action='store_true', + help="Use HTML style filling (including automatic HTML quoting)") + parser.add_option( + '--env', + dest='use_env', + action='store_true', + help="Put the environment in as top-level variables") + options, args = parser.parse_args(args) + if len(args) < 1: + print('You must give a template filename') + sys.exit(2) + template_name = args[0] + args = args[1:] + vars = {} + if options.use_env: + vars.update(os.environ) + for value in args: + if '=' not in value: + print('Bad argument: %r' % value) + sys.exit(2) + name, value = value.split('=', 1) + if name.startswith('py:'): + name = name[:3] + value = eval(value) + vars[name] = value + if template_name == '-': + template_content = sys.stdin.read() + template_name = '' + else: + f = open(template_name, 'rb') + template_content = f.read() + f.close() + if options.use_html: + TemplateClass = HTMLTemplate + else: + TemplateClass = Template + template = TemplateClass(template_content, name=template_name) + result = template.substitute(vars) + if options.output: + f = open(options.output, 'wb') + f.write(result) + f.close() + else: + sys.stdout.write(result) + +if __name__ == '__main__': + fill_command() diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/compat3.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/compat3.py new file mode 100644 index 00000000000..9905530757a --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/compat3.py @@ -0,0 +1,47 @@ +import sys + +__all__ = ['b', 'basestring_', 'bytes', 'unicode_', 'next', 'is_unicode'] + +if sys.version < "3": + b = bytes = str + basestring_ = basestring + unicode_ = unicode +else: + + def b(s): + if isinstance(s, str): + return s.encode('latin1') + return bytes(s) + basestring_ = (bytes, str) + bytes = bytes + unicode_ = str +text = str + +if sys.version < "3": + + def next(obj): + return obj.next() +else: + next = next + +if sys.version < "3": + + def is_unicode(obj): + return isinstance(obj, unicode) +else: + + def is_unicode(obj): + return isinstance(obj, str) + + +def coerce_text(v): + if not isinstance(v, basestring_): + if sys.version < "3": + attr = '__unicode__' + else: + attr = '__str__' + if hasattr(v, attr): + return unicode(v) + else: + return bytes(v) + return v diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/TestUtils.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/TestUtils.py new file mode 100644 index 00000000000..9d6eb67fc3d --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/TestUtils.py @@ -0,0 +1,217 @@ +from __future__ import absolute_import + +import os +import unittest +import tempfile + +from .Compiler import Errors +from .CodeWriter import CodeWriter +from .Compiler.TreeFragment import TreeFragment, strip_common_indent +from .Compiler.Visitor import TreeVisitor, VisitorTransform +from .Compiler import TreePath + + +class NodeTypeWriter(TreeVisitor): + def __init__(self): + super(NodeTypeWriter, self).__init__() + self._indents = 0 + self.result = [] + + def visit_Node(self, node): + if not self.access_path: + name = u"(root)" + else: + tip = self.access_path[-1] + if tip[2] is not None: + name = u"%s[%d]" % tip[1:3] + else: + name = tip[1] + + self.result.append(u" " * self._indents + + u"%s: %s" % (name, node.__class__.__name__)) + self._indents += 1 + self.visitchildren(node) + self._indents -= 1 + + +def treetypes(root): + """Returns a string representing the tree by class names. + There's a leading and trailing whitespace so that it can be + compared by simple string comparison while still making test + cases look ok.""" + w = NodeTypeWriter() + w.visit(root) + return u"\n".join([u""] + w.result + [u""]) + + +class CythonTest(unittest.TestCase): + + def setUp(self): + self.listing_file = Errors.listing_file + self.echo_file = Errors.echo_file + Errors.listing_file = Errors.echo_file = None + + def tearDown(self): + Errors.listing_file = self.listing_file + Errors.echo_file = self.echo_file + + def assertLines(self, expected, result): + "Checks that the given strings or lists of strings are equal line by line" + if not isinstance(expected, list): + expected = expected.split(u"\n") + if not isinstance(result, list): + result = result.split(u"\n") + for idx, (expected_line, result_line) in enumerate(zip(expected, result)): + self.assertEqual(expected_line, result_line, + "Line %d:\nExp: %s\nGot: %s" % (idx, expected_line, result_line)) + self.assertEqual(len(expected), len(result), + "Unmatched lines. Got:\n%s\nExpected:\n%s" % ("\n".join(expected), u"\n".join(result))) + + def codeToLines(self, tree): + writer = CodeWriter() + writer.write(tree) + return writer.result.lines + + def codeToString(self, tree): + return "\n".join(self.codeToLines(tree)) + + def assertCode(self, expected, result_tree): + result_lines = self.codeToLines(result_tree) + + expected_lines = strip_common_indent(expected.split("\n")) + + for idx, (line, expected_line) in enumerate(zip(result_lines, expected_lines)): + self.assertEqual(expected_line, line, + "Line %d:\nGot: %s\nExp: %s" % (idx, line, expected_line)) + self.assertEqual(len(result_lines), len(expected_lines), + "Unmatched lines. Got:\n%s\nExpected:\n%s" % ("\n".join(result_lines), expected)) + + def assertNodeExists(self, path, result_tree): + self.assertNotEqual(TreePath.find_first(result_tree, path), None, + "Path '%s' not found in result tree" % path) + + def fragment(self, code, pxds=None, pipeline=None): + "Simply create a tree fragment using the name of the test-case in parse errors." + if pxds is None: + pxds = {} + if pipeline is None: + pipeline = [] + name = self.id() + if name.startswith("__main__."): + name = name[len("__main__."):] + name = name.replace(".", "_") + return TreeFragment(code, name, pxds, pipeline=pipeline) + + def treetypes(self, root): + return treetypes(root) + + def should_fail(self, func, exc_type=Exception): + """Calls "func" and fails if it doesn't raise the right exception + (any exception by default). Also returns the exception in question. + """ + try: + func() + self.fail("Expected an exception of type %r" % exc_type) + except exc_type as e: + self.assertTrue(isinstance(e, exc_type)) + return e + + def should_not_fail(self, func): + """Calls func and succeeds if and only if no exception is raised + (i.e. converts exception raising into a failed testcase). Returns + the return value of func.""" + try: + return func() + except Exception as exc: + self.fail(str(exc)) + + +class TransformTest(CythonTest): + """ + Utility base class for transform unit tests. It is based around constructing + test trees (either explicitly or by parsing a Cython code string); running + the transform, serialize it using a customized Cython serializer (with + special markup for nodes that cannot be represented in Cython), + and do a string-comparison line-by-line of the result. + + To create a test case: + - Call run_pipeline. The pipeline should at least contain the transform you + are testing; pyx should be either a string (passed to the parser to + create a post-parse tree) or a node representing input to pipeline. + The result will be a transformed result. + + - Check that the tree is correct. If wanted, assertCode can be used, which + takes a code string as expected, and a ModuleNode in result_tree + (it serializes the ModuleNode to a string and compares line-by-line). + + All code strings are first stripped for whitespace lines and then common + indentation. + + Plans: One could have a pxd dictionary parameter to run_pipeline. + """ + + def run_pipeline(self, pipeline, pyx, pxds=None): + if pxds is None: + pxds = {} + tree = self.fragment(pyx, pxds).root + # Run pipeline + for T in pipeline: + tree = T(tree) + return tree + + +class TreeAssertVisitor(VisitorTransform): + # actually, a TreeVisitor would be enough, but this needs to run + # as part of the compiler pipeline + + def visit_CompilerDirectivesNode(self, node): + directives = node.directives + if 'test_assert_path_exists' in directives: + for path in directives['test_assert_path_exists']: + if TreePath.find_first(node, path) is None: + Errors.error( + node.pos, + "Expected path '%s' not found in result tree" % path) + if 'test_fail_if_path_exists' in directives: + for path in directives['test_fail_if_path_exists']: + if TreePath.find_first(node, path) is not None: + Errors.error( + node.pos, + "Unexpected path '%s' found in result tree" % path) + self.visitchildren(node) + return node + + visit_Node = VisitorTransform.recurse_to_children + + +def unpack_source_tree(tree_file, dir=None): + if dir is None: + dir = tempfile.mkdtemp() + header = [] + cur_file = None + f = open(tree_file) + try: + lines = f.readlines() + finally: + f.close() + del f + try: + for line in lines: + if line[:5] == '#####': + filename = line.strip().strip('#').strip().replace('/', os.path.sep) + path = os.path.join(dir, filename) + if not os.path.exists(os.path.dirname(path)): + os.makedirs(os.path.dirname(path)) + if cur_file is not None: + f, cur_file = cur_file, None + f.close() + cur_file = open(path, 'w') + elif cur_file is not None: + cur_file.write(line) + elif line.strip() and not line.lstrip().startswith('#'): + if line.strip() not in ('"""', "'''"): + header.append(line) + finally: + if cur_file is not None: + cur_file.close() + return dir, ''.join(header) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestCodeWriter.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestCodeWriter.py new file mode 100644 index 00000000000..42e457da20e --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestCodeWriter.py @@ -0,0 +1,82 @@ +from Cython.TestUtils import CythonTest + +class TestCodeWriter(CythonTest): + # CythonTest uses the CodeWriter heavily, so do some checking by + # roundtripping Cython code through the test framework. + + # Note that this test is dependent upon the normal Cython parser + # to generate the input trees to the CodeWriter. This save *a lot* + # of time; better to spend that time writing other tests than perfecting + # this one... + + # Whitespace is very significant in this process: + # - always newline on new block (!) + # - indent 4 spaces + # - 1 space around every operator + + def t(self, codestr): + self.assertCode(codestr, self.fragment(codestr).root) + + def test_print(self): + self.t(u""" + print x, y + print x + y ** 2 + print x, y, z, + """) + + def test_if(self): + self.t(u"if x:\n pass") + + def test_ifelifelse(self): + self.t(u""" + if x: + pass + elif y: + pass + elif z + 34 ** 34 - 2: + pass + else: + pass + """) + + def test_def(self): + self.t(u""" + def f(x, y, z): + pass + def f(x = 34, y = 54, z): + pass + """) + + def test_longness_and_signedness(self): + self.t(u"def f(unsigned long long long long long int y):\n pass") + + def test_signed_short(self): + self.t(u"def f(signed short int y):\n pass") + + def test_typed_args(self): + self.t(u"def f(int x, unsigned long int y):\n pass") + + def test_cdef_var(self): + self.t(u""" + cdef int hello + cdef int hello = 4, x = 3, y, z + """) + + def test_for_loop(self): + self.t(u""" + for x, y, z in f(g(h(34) * 2) + 23): + print x, y, z + else: + print 43 + """) + + def test_inplace_assignment(self): + self.t(u"x += 43") + + def test_attribute(self): + self.t(u"a.x") + +if __name__ == "__main__": + import unittest + unittest.main() + diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestCythonUtils.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestCythonUtils.py new file mode 100644 index 00000000000..2641900c012 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestCythonUtils.py @@ -0,0 +1,11 @@ +import unittest + +from ..Utils import build_hex_version + +class TestCythonUtils(unittest.TestCase): + def test_build_hex_version(self): + self.assertEqual('0x001D00A1', build_hex_version('0.29a1')) + self.assertEqual('0x001D00A1', build_hex_version('0.29a1')) + self.assertEqual('0x001D03C4', build_hex_version('0.29.3rc4')) + self.assertEqual('0x001D00F0', build_hex_version('0.29')) + self.assertEqual('0x040000F0', build_hex_version('4.0')) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestJediTyper.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestJediTyper.py new file mode 100644 index 00000000000..253adef1715 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestJediTyper.py @@ -0,0 +1,225 @@ +# -*- coding: utf-8 -*- +# tag: jedi + +from __future__ import absolute_import + +import sys +import os.path + +from textwrap import dedent +from contextlib import contextmanager +from tempfile import NamedTemporaryFile + +from Cython.Compiler.ParseTreeTransforms import NormalizeTree, InterpretCompilerDirectives +from Cython.Compiler import Main, Symtab, Visitor +from Cython.TestUtils import TransformTest + +TOOLS_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'Tools')) + + +@contextmanager +def _tempfile(code): + code = dedent(code) + if not isinstance(code, bytes): + code = code.encode('utf8') + + with NamedTemporaryFile(suffix='.py') as f: + f.write(code) + f.seek(0) + yield f + + +def _test_typing(code, inject=False): + sys.path.insert(0, TOOLS_DIR) + try: + import jedityper + finally: + sys.path.remove(TOOLS_DIR) + lines = [] + with _tempfile(code) as f: + types = jedityper.analyse(f.name) + if inject: + lines = jedityper.inject_types(f.name, types) + return types, lines + + +class DeclarationsFinder(Visitor.VisitorTransform): + directives = None + + visit_Node = Visitor.VisitorTransform.recurse_to_children + + def visit_CompilerDirectivesNode(self, node): + if not self.directives: + self.directives = [] + self.directives.append(node) + self.visitchildren(node) + return node + + +class TestJediTyper(TransformTest): + def _test(self, code): + return _test_typing(code)[0] + + def test_typing_global_int_loop(self): + code = '''\ + for i in range(10): + a = i + 1 + ''' + types = self._test(code) + self.assertIn((None, (1, 0)), types) + variables = types.pop((None, (1, 0))) + self.assertFalse(types) + self.assertEqual({'a': set(['int']), 'i': set(['int'])}, variables) + + def test_typing_function_int_loop(self): + code = '''\ + def func(x): + for i in range(x): + a = i + 1 + return a + ''' + types = self._test(code) + self.assertIn(('func', (1, 0)), types) + variables = types.pop(('func', (1, 0))) + self.assertFalse(types) + self.assertEqual({'a': set(['int']), 'i': set(['int'])}, variables) + + def test_conflicting_types_in_function(self): + code = '''\ + def func(a, b): + print(a) + a = 1 + b += a + a = 'abc' + return a, str(b) + + print(func(1.5, 2)) + ''' + types = self._test(code) + self.assertIn(('func', (1, 0)), types) + variables = types.pop(('func', (1, 0))) + self.assertFalse(types) + self.assertEqual({'a': set(['float', 'int', 'str']), 'b': set(['int'])}, variables) + + def _test_typing_function_char_loop(self): + code = '''\ + def func(x): + l = [] + for c in x: + l.append(c) + return l + + print(func('abcdefg')) + ''' + types = self._test(code) + self.assertIn(('func', (1, 0)), types) + variables = types.pop(('func', (1, 0))) + self.assertFalse(types) + self.assertEqual({'a': set(['int']), 'i': set(['int'])}, variables) + + def test_typing_global_list(self): + code = '''\ + a = [x for x in range(10)] + b = list(range(10)) + c = a + b + d = [0]*10 + ''' + types = self._test(code) + self.assertIn((None, (1, 0)), types) + variables = types.pop((None, (1, 0))) + self.assertFalse(types) + self.assertEqual({'a': set(['list']), 'b': set(['list']), 'c': set(['list']), 'd': set(['list'])}, variables) + + def test_typing_function_list(self): + code = '''\ + def func(x): + a = [[], []] + b = [0]* 10 + a + c = a[0] + + print(func([0]*100)) + ''' + types = self._test(code) + self.assertIn(('func', (1, 0)), types) + variables = types.pop(('func', (1, 0))) + self.assertFalse(types) + self.assertEqual({'a': set(['list']), 'b': set(['list']), 'c': set(['list']), 'x': set(['list'])}, variables) + + def test_typing_global_dict(self): + code = '''\ + a = dict() + b = {i: i**2 for i in range(10)} + c = a + ''' + types = self._test(code) + self.assertIn((None, (1, 0)), types) + variables = types.pop((None, (1, 0))) + self.assertFalse(types) + self.assertEqual({'a': set(['dict']), 'b': set(['dict']), 'c': set(['dict'])}, variables) + + def test_typing_function_dict(self): + code = '''\ + def func(x): + a = dict() + b = {i: i**2 for i in range(10)} + c = x + + print(func({1:2, 'x':7})) + ''' + types = self._test(code) + self.assertIn(('func', (1, 0)), types) + variables = types.pop(('func', (1, 0))) + self.assertFalse(types) + self.assertEqual({'a': set(['dict']), 'b': set(['dict']), 'c': set(['dict']), 'x': set(['dict'])}, variables) + + + def test_typing_global_set(self): + code = '''\ + a = set() + # b = {i for i in range(10)} # jedi does not support set comprehension yet + c = a + d = {1,2,3} + e = a | b + ''' + types = self._test(code) + self.assertIn((None, (1, 0)), types) + variables = types.pop((None, (1, 0))) + self.assertFalse(types) + self.assertEqual({'a': set(['set']), 'c': set(['set']), 'd': set(['set']), 'e': set(['set'])}, variables) + + def test_typing_function_set(self): + code = '''\ + def func(x): + a = set() + # b = {i for i in range(10)} # jedi does not support set comprehension yet + c = a + d = a | b + + print(func({1,2,3})) + ''' + types = self._test(code) + self.assertIn(('func', (1, 0)), types) + variables = types.pop(('func', (1, 0))) + self.assertFalse(types) + self.assertEqual({'a': set(['set']), 'c': set(['set']), 'd': set(['set']), 'x': set(['set'])}, variables) + + +class TestTypeInjection(TestJediTyper): + """ + Subtype of TestJediTyper that additionally tests type injection and compilation. + """ + def setUp(self): + super(TestTypeInjection, self).setUp() + compilation_options = Main.CompilationOptions(Main.default_options) + ctx = compilation_options.create_context() + transform = InterpretCompilerDirectives(ctx, ctx.compiler_directives) + transform.module_scope = Symtab.ModuleScope('__main__', None, ctx) + self.declarations_finder = DeclarationsFinder() + self.pipeline = [NormalizeTree(None), transform, self.declarations_finder] + + def _test(self, code): + types, lines = _test_typing(code, inject=True) + tree = self.run_pipeline(self.pipeline, ''.join(lines)) + directives = self.declarations_finder.directives + # TODO: validate directives + return types diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestStringIOTree.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestStringIOTree.py new file mode 100644 index 00000000000..a15f2cd88d7 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestStringIOTree.py @@ -0,0 +1,67 @@ +import unittest + +from Cython import StringIOTree as stringtree + +code = """ +cdef int spam # line 1 + +cdef ham(): + a = 1 + b = 2 + c = 3 + d = 4 + +def eggs(): + pass + +cpdef bacon(): + print spam + print 'scotch' + print 'tea?' + print 'or coffee?' # line 16 +""" + +linemap = dict(enumerate(code.splitlines())) + +class TestStringIOTree(unittest.TestCase): + + def setUp(self): + self.tree = stringtree.StringIOTree() + + def test_markers(self): + assert not self.tree.allmarkers() + + def test_insertion(self): + self.write_lines((1, 2, 3)) + line_4_to_6_insertion_point = self.tree.insertion_point() + self.write_lines((7, 8)) + line_9_to_13_insertion_point = self.tree.insertion_point() + self.write_lines((14, 15, 16)) + + line_4_insertion_point = line_4_to_6_insertion_point.insertion_point() + self.write_lines((5, 6), tree=line_4_to_6_insertion_point) + + line_9_to_12_insertion_point = ( + line_9_to_13_insertion_point.insertion_point()) + self.write_line(13, tree=line_9_to_13_insertion_point) + + self.write_line(4, tree=line_4_insertion_point) + self.write_line(9, tree=line_9_to_12_insertion_point) + line_10_insertion_point = line_9_to_12_insertion_point.insertion_point() + self.write_line(11, tree=line_9_to_12_insertion_point) + self.write_line(10, tree=line_10_insertion_point) + self.write_line(12, tree=line_9_to_12_insertion_point) + + self.assertEqual(self.tree.allmarkers(), list(range(1, 17))) + self.assertEqual(code.strip(), self.tree.getvalue().strip()) + + + def write_lines(self, linenos, tree=None): + for lineno in linenos: + self.write_line(lineno, tree=tree) + + def write_line(self, lineno, tree=None): + if tree is None: + tree = self.tree + tree.markers.append(lineno) + tree.write(linemap[lineno] + '\n') diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/__init__.py new file mode 100644 index 00000000000..fa81adaff68 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/__init__.py @@ -0,0 +1 @@ +# empty file diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/xmlrunner.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/xmlrunner.py new file mode 100644 index 00000000000..d6838aa22ec --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/xmlrunner.py @@ -0,0 +1,397 @@ +# -*- coding: utf-8 -*- + +"""unittest-xml-reporting is a PyUnit-based TestRunner that can export test +results to XML files that can be consumed by a wide range of tools, such as +build systems, IDEs and Continuous Integration servers. + +This module provides the XMLTestRunner class, which is heavily based on the +default TextTestRunner. This makes the XMLTestRunner very simple to use. + +The script below, adapted from the unittest documentation, shows how to use +XMLTestRunner in a very simple way. In fact, the only difference between this +script and the original one is the last line: + +import random +import unittest +import xmlrunner + +class TestSequenceFunctions(unittest.TestCase): + def setUp(self): + self.seq = range(10) + + def test_shuffle(self): + # make sure the shuffled sequence does not lose any elements + random.shuffle(self.seq) + self.seq.sort() + self.assertEqual(self.seq, range(10)) + + def test_choice(self): + element = random.choice(self.seq) + self.assertTrue(element in self.seq) + + def test_sample(self): + self.assertRaises(ValueError, random.sample, self.seq, 20) + for element in random.sample(self.seq, 5): + self.assertTrue(element in self.seq) + +if __name__ == '__main__': + unittest.main(testRunner=xmlrunner.XMLTestRunner(output='test-reports')) +""" + +from __future__ import absolute_import + +import os +import sys +import time +from unittest import TestResult, TextTestResult, TextTestRunner +import xml.dom.minidom +try: + from StringIO import StringIO +except ImportError: + from io import StringIO # doesn't accept 'str' in Py2 + + +class XMLDocument(xml.dom.minidom.Document): + def createCDATAOrText(self, data): + if ']]>' in data: + return self.createTextNode(data) + return self.createCDATASection(data) + + +class _TestInfo(object): + """This class is used to keep useful information about the execution of a + test method. + """ + + # Possible test outcomes + (SUCCESS, FAILURE, ERROR) = range(3) + + def __init__(self, test_result, test_method, outcome=SUCCESS, err=None): + "Create a new instance of _TestInfo." + self.test_result = test_result + self.test_method = test_method + self.outcome = outcome + self.err = err + self.stdout = test_result.stdout and test_result.stdout.getvalue().strip() or '' + self.stderr = test_result.stdout and test_result.stderr.getvalue().strip() or '' + + def get_elapsed_time(self): + """Return the time that shows how long the test method took to + execute. + """ + return self.test_result.stop_time - self.test_result.start_time + + def get_description(self): + "Return a text representation of the test method." + return self.test_result.getDescription(self.test_method) + + def get_error_info(self): + """Return a text representation of an exception thrown by a test + method. + """ + if not self.err: + return '' + return self.test_result._exc_info_to_string( + self.err, self.test_method) + + +class _XMLTestResult(TextTestResult): + """A test result class that can express test results in a XML report. + + Used by XMLTestRunner. + """ + def __init__(self, stream=sys.stderr, descriptions=1, verbosity=1, + elapsed_times=True): + "Create a new instance of _XMLTestResult." + TextTestResult.__init__(self, stream, descriptions, verbosity) + self.successes = [] + self.callback = None + self.elapsed_times = elapsed_times + self.output_patched = False + + def _prepare_callback(self, test_info, target_list, verbose_str, + short_str): + """Append a _TestInfo to the given target list and sets a callback + method to be called by stopTest method. + """ + target_list.append(test_info) + def callback(): + """This callback prints the test method outcome to the stream, + as well as the elapsed time. + """ + + # Ignore the elapsed times for a more reliable unit testing + if not self.elapsed_times: + self.start_time = self.stop_time = 0 + + if self.showAll: + self.stream.writeln('(%.3fs) %s' % \ + (test_info.get_elapsed_time(), verbose_str)) + elif self.dots: + self.stream.write(short_str) + self.callback = callback + + def _patch_standard_output(self): + """Replace the stdout and stderr streams with string-based streams + in order to capture the tests' output. + """ + if not self.output_patched: + (self.old_stdout, self.old_stderr) = (sys.stdout, sys.stderr) + self.output_patched = True + (sys.stdout, sys.stderr) = (self.stdout, self.stderr) = \ + (StringIO(), StringIO()) + + def _restore_standard_output(self): + "Restore the stdout and stderr streams." + (sys.stdout, sys.stderr) = (self.old_stdout, self.old_stderr) + self.output_patched = False + + def startTest(self, test): + "Called before execute each test method." + self._patch_standard_output() + self.start_time = time.time() + TestResult.startTest(self, test) + + if self.showAll: + self.stream.write(' ' + self.getDescription(test)) + self.stream.write(" ... ") + + def stopTest(self, test): + "Called after execute each test method." + self._restore_standard_output() + TextTestResult.stopTest(self, test) + self.stop_time = time.time() + + if self.callback and callable(self.callback): + self.callback() + self.callback = None + + def addSuccess(self, test): + "Called when a test executes successfully." + self._prepare_callback(_TestInfo(self, test), + self.successes, 'OK', '.') + + def addFailure(self, test, err): + "Called when a test method fails." + self._prepare_callback(_TestInfo(self, test, _TestInfo.FAILURE, err), + self.failures, 'FAIL', 'F') + + def addError(self, test, err): + "Called when a test method raises an error." + self._prepare_callback(_TestInfo(self, test, _TestInfo.ERROR, err), + self.errors, 'ERROR', 'E') + + def printErrorList(self, flavour, errors): + "Write some information about the FAIL or ERROR to the stream." + for test_info in errors: + if isinstance(test_info, tuple): + test_info, exc_info = test_info + + try: + t = test_info.get_elapsed_time() + except AttributeError: + t = 0 + try: + descr = test_info.get_description() + except AttributeError: + try: + descr = test_info.getDescription() + except AttributeError: + descr = str(test_info) + try: + err_info = test_info.get_error_info() + except AttributeError: + err_info = str(test_info) + + self.stream.writeln(self.separator1) + self.stream.writeln('%s [%.3fs]: %s' % (flavour, t, descr)) + self.stream.writeln(self.separator2) + self.stream.writeln('%s' % err_info) + + def _get_info_by_testcase(self): + """This method organizes test results by TestCase module. This + information is used during the report generation, where a XML report + will be generated for each TestCase. + """ + tests_by_testcase = {} + + for tests in (self.successes, self.failures, self.errors): + for test_info in tests: + if not isinstance(test_info, _TestInfo): + print("Unexpected test result type: %r" % (test_info,)) + continue + testcase = type(test_info.test_method) + + # Ignore module name if it is '__main__' + module = testcase.__module__ + '.' + if module == '__main__.': + module = '' + testcase_name = module + testcase.__name__ + + if testcase_name not in tests_by_testcase: + tests_by_testcase[testcase_name] = [] + tests_by_testcase[testcase_name].append(test_info) + + return tests_by_testcase + + def _report_testsuite(suite_name, tests, xml_document): + "Appends the testsuite section to the XML document." + testsuite = xml_document.createElement('testsuite') + xml_document.appendChild(testsuite) + + testsuite.setAttribute('name', str(suite_name)) + testsuite.setAttribute('tests', str(len(tests))) + + testsuite.setAttribute('time', '%.3f' % + sum([e.get_elapsed_time() for e in tests])) + + failures = len([1 for e in tests if e.outcome == _TestInfo.FAILURE]) + testsuite.setAttribute('failures', str(failures)) + + errors = len([1 for e in tests if e.outcome == _TestInfo.ERROR]) + testsuite.setAttribute('errors', str(errors)) + + return testsuite + + _report_testsuite = staticmethod(_report_testsuite) + + def _report_testcase(suite_name, test_result, xml_testsuite, xml_document): + "Appends a testcase section to the XML document." + testcase = xml_document.createElement('testcase') + xml_testsuite.appendChild(testcase) + + testcase.setAttribute('classname', str(suite_name)) + testcase.setAttribute('name', test_result.test_method.shortDescription() + or getattr(test_result.test_method, '_testMethodName', + str(test_result.test_method))) + testcase.setAttribute('time', '%.3f' % test_result.get_elapsed_time()) + + if (test_result.outcome != _TestInfo.SUCCESS): + elem_name = ('failure', 'error')[test_result.outcome-1] + failure = xml_document.createElement(elem_name) + testcase.appendChild(failure) + + failure.setAttribute('type', str(test_result.err[0].__name__)) + failure.setAttribute('message', str(test_result.err[1])) + + error_info = test_result.get_error_info() + failureText = xml_document.createCDATAOrText(error_info) + failure.appendChild(failureText) + + _report_testcase = staticmethod(_report_testcase) + + def _report_output(test_runner, xml_testsuite, xml_document, stdout, stderr): + "Appends the system-out and system-err sections to the XML document." + systemout = xml_document.createElement('system-out') + xml_testsuite.appendChild(systemout) + + systemout_text = xml_document.createCDATAOrText(stdout) + systemout.appendChild(systemout_text) + + systemerr = xml_document.createElement('system-err') + xml_testsuite.appendChild(systemerr) + + systemerr_text = xml_document.createCDATAOrText(stderr) + systemerr.appendChild(systemerr_text) + + _report_output = staticmethod(_report_output) + + def generate_reports(self, test_runner): + "Generates the XML reports to a given XMLTestRunner object." + all_results = self._get_info_by_testcase() + + if type(test_runner.output) == str and not \ + os.path.exists(test_runner.output): + os.makedirs(test_runner.output) + + for suite, tests in all_results.items(): + doc = XMLDocument() + + # Build the XML file + testsuite = _XMLTestResult._report_testsuite(suite, tests, doc) + stdout, stderr = [], [] + for test in tests: + _XMLTestResult._report_testcase(suite, test, testsuite, doc) + if test.stdout: + stdout.extend(['*****************', test.get_description(), test.stdout]) + if test.stderr: + stderr.extend(['*****************', test.get_description(), test.stderr]) + _XMLTestResult._report_output(test_runner, testsuite, doc, + '\n'.join(stdout), '\n'.join(stderr)) + xml_content = doc.toprettyxml(indent='\t') + + if type(test_runner.output) is str: + report_file = open('%s%sTEST-%s.xml' % \ + (test_runner.output, os.sep, suite), 'w') + try: + report_file.write(xml_content) + finally: + report_file.close() + else: + # Assume that test_runner.output is a stream + test_runner.output.write(xml_content) + + +class XMLTestRunner(TextTestRunner): + """A test runner class that outputs the results in JUnit like XML files. + """ + def __init__(self, output='.', stream=None, descriptions=True, verbose=False, elapsed_times=True): + "Create a new instance of XMLTestRunner." + if stream is None: + stream = sys.stderr + verbosity = (1, 2)[verbose] + TextTestRunner.__init__(self, stream, descriptions, verbosity) + self.output = output + self.elapsed_times = elapsed_times + + def _make_result(self): + """Create the TestResult object which will be used to store + information about the executed tests. + """ + return _XMLTestResult(self.stream, self.descriptions, \ + self.verbosity, self.elapsed_times) + + def run(self, test): + "Run the given test case or test suite." + # Prepare the test execution + result = self._make_result() + + # Print a nice header + self.stream.writeln() + self.stream.writeln('Running tests...') + self.stream.writeln(result.separator2) + + # Execute tests + start_time = time.time() + test(result) + stop_time = time.time() + time_taken = stop_time - start_time + + # Generate reports + self.stream.writeln() + self.stream.writeln('Generating XML reports...') + result.generate_reports(self) + + # Print results + result.printErrors() + self.stream.writeln(result.separator2) + run = result.testsRun + self.stream.writeln("Ran %d test%s in %.3fs" % + (run, run != 1 and "s" or "", time_taken)) + self.stream.writeln() + + # Error traces + if not result.wasSuccessful(): + self.stream.write("FAILED (") + failed, errored = (len(result.failures), len(result.errors)) + if failed: + self.stream.write("failures=%d" % failed) + if errored: + if failed: + self.stream.write(", ") + self.stream.write("errors=%d" % errored) + self.stream.writeln(")") + else: + self.stream.writeln("OK") + + return result diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/AsyncGen.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/AsyncGen.c new file mode 100644 index 00000000000..9a11d6a129c --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/AsyncGen.c @@ -0,0 +1,1133 @@ +// This is copied from genobject.c in CPython 3.6. +// Try to keep it in sync by doing this from time to time: +// sed -e 's|__pyx_||ig' Cython/Utility/AsyncGen.c | diff -udw - cpython/Objects/genobject.c | less + +//////////////////// AsyncGenerator.proto //////////////////// +//@requires: Coroutine.c::Coroutine + +#define __Pyx_AsyncGen_USED +typedef struct { + __pyx_CoroutineObject coro; + PyObject *ag_finalizer; + int ag_hooks_inited; + int ag_closed; +} __pyx_PyAsyncGenObject; + +static PyTypeObject *__pyx__PyAsyncGenWrappedValueType = 0; +static PyTypeObject *__pyx__PyAsyncGenASendType = 0; +static PyTypeObject *__pyx__PyAsyncGenAThrowType = 0; +static PyTypeObject *__pyx_AsyncGenType = 0; + +#define __Pyx_AsyncGen_CheckExact(obj) (Py_TYPE(obj) == __pyx_AsyncGenType) +#define __pyx_PyAsyncGenASend_CheckExact(o) \ + (Py_TYPE(o) == __pyx__PyAsyncGenASendType) +#define __pyx_PyAsyncGenAThrow_CheckExact(o) \ + (Py_TYPE(o) == __pyx__PyAsyncGenAThrowType) + +static PyObject *__Pyx_async_gen_anext(PyObject *o); +static CYTHON_INLINE PyObject *__Pyx_async_gen_asend_iternext(PyObject *o); +static PyObject *__Pyx_async_gen_asend_send(PyObject *o, PyObject *arg); +static PyObject *__Pyx_async_gen_asend_close(PyObject *o, PyObject *args); +static PyObject *__Pyx_async_gen_athrow_close(PyObject *o, PyObject *args); + +static PyObject *__Pyx__PyAsyncGenValueWrapperNew(PyObject *val); + + +static __pyx_CoroutineObject *__Pyx_AsyncGen_New( + __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name) { + __pyx_PyAsyncGenObject *gen = PyObject_GC_New(__pyx_PyAsyncGenObject, __pyx_AsyncGenType); + if (unlikely(!gen)) + return NULL; + gen->ag_finalizer = NULL; + gen->ag_closed = 0; + gen->ag_hooks_inited = 0; + return __Pyx__Coroutine_NewInit((__pyx_CoroutineObject*)gen, body, code, closure, name, qualname, module_name); +} + +static int __pyx_AsyncGen_init(void); +static void __Pyx_PyAsyncGen_Fini(void); + +//////////////////// AsyncGenerator.cleanup //////////////////// + +__Pyx_PyAsyncGen_Fini(); + +//////////////////// AsyncGeneratorInitFinalizer //////////////////// + +// this is separated out because it needs more adaptation + +#if PY_VERSION_HEX < 0x030600B0 +static int __Pyx_async_gen_init_hooks(__pyx_PyAsyncGenObject *o) { +#if 0 + // TODO: implement finalizer support in older Python versions + PyThreadState *tstate; + PyObject *finalizer; + PyObject *firstiter; +#endif + + if (likely(o->ag_hooks_inited)) { + return 0; + } + + o->ag_hooks_inited = 1; + +#if 0 + tstate = __Pyx_PyThreadState_Current; + + finalizer = tstate->async_gen_finalizer; + if (finalizer) { + Py_INCREF(finalizer); + o->ag_finalizer = finalizer; + } + + firstiter = tstate->async_gen_firstiter; + if (firstiter) { + PyObject *res; + + Py_INCREF(firstiter); + res = __Pyx_PyObject_CallOneArg(firstiter, (PyObject*)o); + Py_DECREF(firstiter); + if (res == NULL) { + return 1; + } + Py_DECREF(res); + } +#endif + + return 0; +} +#endif + + +//////////////////// AsyncGenerator //////////////////// +//@requires: AsyncGeneratorInitFinalizer +//@requires: Coroutine.c::Coroutine +//@requires: Coroutine.c::ReturnWithStopIteration +//@requires: ObjectHandling.c::PyObjectCall2Args +//@requires: ObjectHandling.c::PyObject_GenericGetAttrNoDict + +PyDoc_STRVAR(__Pyx_async_gen_send_doc, +"send(arg) -> send 'arg' into generator,\n\ +return next yielded value or raise StopIteration."); + +PyDoc_STRVAR(__Pyx_async_gen_close_doc, +"close() -> raise GeneratorExit inside generator."); + +PyDoc_STRVAR(__Pyx_async_gen_throw_doc, +"throw(typ[,val[,tb]]) -> raise exception in generator,\n\ +return next yielded value or raise StopIteration."); + +PyDoc_STRVAR(__Pyx_async_gen_await_doc, +"__await__() -> return a representation that can be passed into the 'await' expression."); + +// COPY STARTS HERE: + +static PyObject *__Pyx_async_gen_asend_new(__pyx_PyAsyncGenObject *, PyObject *); +static PyObject *__Pyx_async_gen_athrow_new(__pyx_PyAsyncGenObject *, PyObject *); + +static const char *__Pyx_NON_INIT_CORO_MSG = "can't send non-None value to a just-started coroutine"; +static const char *__Pyx_ASYNC_GEN_IGNORED_EXIT_MSG = "async generator ignored GeneratorExit"; + +typedef enum { + __PYX_AWAITABLE_STATE_INIT, /* new awaitable, has not yet been iterated */ + __PYX_AWAITABLE_STATE_ITER, /* being iterated */ + __PYX_AWAITABLE_STATE_CLOSED, /* closed */ +} __pyx_AwaitableState; + +typedef struct { + PyObject_HEAD + __pyx_PyAsyncGenObject *ags_gen; + + /* Can be NULL, when in the __anext__() mode (equivalent of "asend(None)") */ + PyObject *ags_sendval; + + __pyx_AwaitableState ags_state; +} __pyx_PyAsyncGenASend; + + +typedef struct { + PyObject_HEAD + __pyx_PyAsyncGenObject *agt_gen; + + /* Can be NULL, when in the "aclose()" mode (equivalent of "athrow(GeneratorExit)") */ + PyObject *agt_args; + + __pyx_AwaitableState agt_state; +} __pyx_PyAsyncGenAThrow; + + +typedef struct { + PyObject_HEAD + PyObject *agw_val; +} __pyx__PyAsyncGenWrappedValue; + + +#ifndef _PyAsyncGen_MAXFREELIST +#define _PyAsyncGen_MAXFREELIST 80 +#endif + +// Freelists boost performance 6-10%; they also reduce memory +// fragmentation, as _PyAsyncGenWrappedValue and PyAsyncGenASend +// are short-living objects that are instantiated for every +// __anext__ call. + +static __pyx__PyAsyncGenWrappedValue *__Pyx_ag_value_freelist[_PyAsyncGen_MAXFREELIST]; +static int __Pyx_ag_value_freelist_free = 0; + +static __pyx_PyAsyncGenASend *__Pyx_ag_asend_freelist[_PyAsyncGen_MAXFREELIST]; +static int __Pyx_ag_asend_freelist_free = 0; + +#define __pyx__PyAsyncGenWrappedValue_CheckExact(o) \ + (Py_TYPE(o) == __pyx__PyAsyncGenWrappedValueType) + + +static int +__Pyx_async_gen_traverse(__pyx_PyAsyncGenObject *gen, visitproc visit, void *arg) +{ + Py_VISIT(gen->ag_finalizer); + return __Pyx_Coroutine_traverse((__pyx_CoroutineObject*)gen, visit, arg); +} + + +static PyObject * +__Pyx_async_gen_repr(__pyx_CoroutineObject *o) +{ + // avoid NULL pointer dereference for qualname during garbage collection + return PyUnicode_FromFormat("", + o->gi_qualname ? o->gi_qualname : Py_None, o); +} + + +#if PY_VERSION_HEX >= 0x030600B0 +static int +__Pyx_async_gen_init_hooks(__pyx_PyAsyncGenObject *o) +{ + PyThreadState *tstate; + PyObject *finalizer; + PyObject *firstiter; + + if (o->ag_hooks_inited) { + return 0; + } + + o->ag_hooks_inited = 1; + + tstate = __Pyx_PyThreadState_Current; + + finalizer = tstate->async_gen_finalizer; + if (finalizer) { + Py_INCREF(finalizer); + o->ag_finalizer = finalizer; + } + + firstiter = tstate->async_gen_firstiter; + if (firstiter) { + PyObject *res; +#if CYTHON_UNPACK_METHODS + PyObject *self; +#endif + + Py_INCREF(firstiter); + // at least asyncio stores methods here => optimise the call +#if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(firstiter)) && likely((self = PyMethod_GET_SELF(firstiter)) != NULL)) { + PyObject *function = PyMethod_GET_FUNCTION(firstiter); + res = __Pyx_PyObject_Call2Args(function, self, (PyObject*)o); + } else +#endif + res = __Pyx_PyObject_CallOneArg(firstiter, (PyObject*)o); + + Py_DECREF(firstiter); + if (unlikely(res == NULL)) { + return 1; + } + Py_DECREF(res); + } + + return 0; +} +#endif + + +static PyObject * +__Pyx_async_gen_anext(PyObject *g) +{ + __pyx_PyAsyncGenObject *o = (__pyx_PyAsyncGenObject*) g; + if (__Pyx_async_gen_init_hooks(o)) { + return NULL; + } + return __Pyx_async_gen_asend_new(o, NULL); +} + +static PyObject * +__Pyx_async_gen_anext_method(PyObject *g, CYTHON_UNUSED PyObject *arg) { + return __Pyx_async_gen_anext(g); +} + + +static PyObject * +__Pyx_async_gen_asend(__pyx_PyAsyncGenObject *o, PyObject *arg) +{ + if (__Pyx_async_gen_init_hooks(o)) { + return NULL; + } + return __Pyx_async_gen_asend_new(o, arg); +} + + +static PyObject * +__Pyx_async_gen_aclose(__pyx_PyAsyncGenObject *o, CYTHON_UNUSED PyObject *arg) +{ + if (__Pyx_async_gen_init_hooks(o)) { + return NULL; + } + return __Pyx_async_gen_athrow_new(o, NULL); +} + + +static PyObject * +__Pyx_async_gen_athrow(__pyx_PyAsyncGenObject *o, PyObject *args) +{ + if (__Pyx_async_gen_init_hooks(o)) { + return NULL; + } + return __Pyx_async_gen_athrow_new(o, args); +} + + +static PyObject * +__Pyx_async_gen_self_method(PyObject *g, CYTHON_UNUSED PyObject *arg) { + return __Pyx_NewRef(g); +} + + +static PyGetSetDef __Pyx_async_gen_getsetlist[] = { + {(char*) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, + (char*) PyDoc_STR("name of the async generator"), 0}, + {(char*) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, + (char*) PyDoc_STR("qualified name of the async generator"), 0}, + //REMOVED: {(char*) "ag_await", (getter)coro_get_cr_await, NULL, + //REMOVED: (char*) PyDoc_STR("object being awaited on, or None")}, + {0, 0, 0, 0, 0} /* Sentinel */ +}; + +static PyMemberDef __Pyx_async_gen_memberlist[] = { + //REMOVED: {(char*) "ag_frame", T_OBJECT, offsetof(__pyx_PyAsyncGenObject, ag_frame), READONLY}, + {(char*) "ag_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL}, + //REMOVED: {(char*) "ag_code", T_OBJECT, offsetof(__pyx_PyAsyncGenObject, ag_code), READONLY}, + //ADDED: "ag_await" + {(char*) "ag_await", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, + (char*) PyDoc_STR("object being awaited on, or None")}, + {0, 0, 0, 0, 0} /* Sentinel */ +}; + +PyDoc_STRVAR(__Pyx_async_aclose_doc, +"aclose() -> raise GeneratorExit inside generator."); + +PyDoc_STRVAR(__Pyx_async_asend_doc, +"asend(v) -> send 'v' in generator."); + +PyDoc_STRVAR(__Pyx_async_athrow_doc, +"athrow(typ[,val[,tb]]) -> raise exception in generator."); + +PyDoc_STRVAR(__Pyx_async_aiter_doc, +"__aiter__(v) -> return an asynchronous iterator."); + +PyDoc_STRVAR(__Pyx_async_anext_doc, +"__anext__(v) -> continue asynchronous iteration and return the next element."); + +static PyMethodDef __Pyx_async_gen_methods[] = { + {"asend", (PyCFunction)__Pyx_async_gen_asend, METH_O, __Pyx_async_asend_doc}, + {"athrow",(PyCFunction)__Pyx_async_gen_athrow, METH_VARARGS, __Pyx_async_athrow_doc}, + {"aclose", (PyCFunction)__Pyx_async_gen_aclose, METH_NOARGS, __Pyx_async_aclose_doc}, + {"__aiter__", (PyCFunction)__Pyx_async_gen_self_method, METH_NOARGS, __Pyx_async_aiter_doc}, + {"__anext__", (PyCFunction)__Pyx_async_gen_anext_method, METH_NOARGS, __Pyx_async_anext_doc}, + {0, 0, 0, 0} /* Sentinel */ +}; + + +#if CYTHON_USE_ASYNC_SLOTS +static __Pyx_PyAsyncMethodsStruct __Pyx_async_gen_as_async = { + 0, /* am_await */ + PyObject_SelfIter, /* am_aiter */ + (unaryfunc)__Pyx_async_gen_anext, /* am_anext */ +#if PY_VERSION_HEX >= 0x030A00A3 + 0, /*am_send*/ +#endif +}; +#endif + +static PyTypeObject __pyx_AsyncGenType_type = { + PyVarObject_HEAD_INIT(0, 0) + "async_generator", /* tp_name */ + sizeof(__pyx_PyAsyncGenObject), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)__Pyx_Coroutine_dealloc, /* tp_dealloc */ + 0, /* tp_print */ + 0, /* tp_getattr */ + 0, /* tp_setattr */ +#if CYTHON_USE_ASYNC_SLOTS + &__Pyx_async_gen_as_async, /* tp_as_async */ +#else + 0, /*tp_reserved*/ +#endif + (reprfunc)__Pyx_async_gen_repr, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + 0, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | + Py_TPFLAGS_HAVE_FINALIZE, /* tp_flags */ + 0, /* tp_doc */ + (traverseproc)__Pyx_async_gen_traverse, /* tp_traverse */ + 0, /* tp_clear */ +#if CYTHON_USE_ASYNC_SLOTS && CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1 + // in order to (mis-)use tp_reserved above, we must also implement tp_richcompare + __Pyx_Coroutine_compare, /*tp_richcompare*/ +#else + 0, /*tp_richcompare*/ +#endif + offsetof(__pyx_CoroutineObject, gi_weakreflist), /* tp_weaklistoffset */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + __Pyx_async_gen_methods, /* tp_methods */ + __Pyx_async_gen_memberlist, /* tp_members */ + __Pyx_async_gen_getsetlist, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ +#if CYTHON_USE_TP_FINALIZE + 0, /*tp_del*/ +#else + __Pyx_Coroutine_del, /*tp_del*/ +#endif + 0, /* tp_version_tag */ +#if CYTHON_USE_TP_FINALIZE + __Pyx_Coroutine_del, /* tp_finalize */ +#elif PY_VERSION_HEX >= 0x030400a1 + 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ +#endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 + 0, /*tp_pypy_flags*/ +#endif +}; + + +static int +__Pyx_PyAsyncGen_ClearFreeLists(void) +{ + int ret = __Pyx_ag_value_freelist_free + __Pyx_ag_asend_freelist_free; + + while (__Pyx_ag_value_freelist_free) { + __pyx__PyAsyncGenWrappedValue *o; + o = __Pyx_ag_value_freelist[--__Pyx_ag_value_freelist_free]; + assert(__pyx__PyAsyncGenWrappedValue_CheckExact(o)); + PyObject_GC_Del(o); + } + + while (__Pyx_ag_asend_freelist_free) { + __pyx_PyAsyncGenASend *o; + o = __Pyx_ag_asend_freelist[--__Pyx_ag_asend_freelist_free]; + assert(Py_TYPE(o) == __pyx__PyAsyncGenASendType); + PyObject_GC_Del(o); + } + + return ret; +} + +static void +__Pyx_PyAsyncGen_Fini(void) +{ + __Pyx_PyAsyncGen_ClearFreeLists(); +} + + +static PyObject * +__Pyx_async_gen_unwrap_value(__pyx_PyAsyncGenObject *gen, PyObject *result) +{ + if (result == NULL) { + PyObject *exc_type = PyErr_Occurred(); + if (!exc_type) { + PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration); + gen->ag_closed = 1; + } else if (__Pyx_PyErr_GivenExceptionMatches2(exc_type, __Pyx_PyExc_StopAsyncIteration, PyExc_GeneratorExit)) { + gen->ag_closed = 1; + } + + return NULL; + } + + if (__pyx__PyAsyncGenWrappedValue_CheckExact(result)) { + /* async yield */ + __Pyx_ReturnWithStopIteration(((__pyx__PyAsyncGenWrappedValue*)result)->agw_val); + Py_DECREF(result); + return NULL; + } + + return result; +} + + +/* ---------- Async Generator ASend Awaitable ------------ */ + + +static void +__Pyx_async_gen_asend_dealloc(__pyx_PyAsyncGenASend *o) +{ + PyObject_GC_UnTrack((PyObject *)o); + Py_CLEAR(o->ags_gen); + Py_CLEAR(o->ags_sendval); + if (__Pyx_ag_asend_freelist_free < _PyAsyncGen_MAXFREELIST) { + assert(__pyx_PyAsyncGenASend_CheckExact(o)); + __Pyx_ag_asend_freelist[__Pyx_ag_asend_freelist_free++] = o; + } else { + PyObject_GC_Del(o); + } +} + +static int +__Pyx_async_gen_asend_traverse(__pyx_PyAsyncGenASend *o, visitproc visit, void *arg) +{ + Py_VISIT(o->ags_gen); + Py_VISIT(o->ags_sendval); + return 0; +} + + +static PyObject * +__Pyx_async_gen_asend_send(PyObject *g, PyObject *arg) +{ + __pyx_PyAsyncGenASend *o = (__pyx_PyAsyncGenASend*) g; + PyObject *result; + + if (unlikely(o->ags_state == __PYX_AWAITABLE_STATE_CLOSED)) { + PyErr_SetNone(PyExc_StopIteration); + return NULL; + } + + if (o->ags_state == __PYX_AWAITABLE_STATE_INIT) { + if (arg == NULL || arg == Py_None) { + arg = o->ags_sendval ? o->ags_sendval : Py_None; + } + o->ags_state = __PYX_AWAITABLE_STATE_ITER; + } + + result = __Pyx_Coroutine_Send((PyObject*)o->ags_gen, arg); + result = __Pyx_async_gen_unwrap_value(o->ags_gen, result); + + if (result == NULL) { + o->ags_state = __PYX_AWAITABLE_STATE_CLOSED; + } + + return result; +} + + +static CYTHON_INLINE PyObject * +__Pyx_async_gen_asend_iternext(PyObject *o) +{ + return __Pyx_async_gen_asend_send(o, Py_None); +} + + +static PyObject * +__Pyx_async_gen_asend_throw(__pyx_PyAsyncGenASend *o, PyObject *args) +{ + PyObject *result; + + if (unlikely(o->ags_state == __PYX_AWAITABLE_STATE_CLOSED)) { + PyErr_SetNone(PyExc_StopIteration); + return NULL; + } + + result = __Pyx_Coroutine_Throw((PyObject*)o->ags_gen, args); + result = __Pyx_async_gen_unwrap_value(o->ags_gen, result); + + if (result == NULL) { + o->ags_state = __PYX_AWAITABLE_STATE_CLOSED; + } + + return result; +} + + +static PyObject * +__Pyx_async_gen_asend_close(PyObject *g, CYTHON_UNUSED PyObject *args) +{ + __pyx_PyAsyncGenASend *o = (__pyx_PyAsyncGenASend*) g; + o->ags_state = __PYX_AWAITABLE_STATE_CLOSED; + Py_RETURN_NONE; +} + + +static PyMethodDef __Pyx_async_gen_asend_methods[] = { + {"send", (PyCFunction)__Pyx_async_gen_asend_send, METH_O, __Pyx_async_gen_send_doc}, + {"throw", (PyCFunction)__Pyx_async_gen_asend_throw, METH_VARARGS, __Pyx_async_gen_throw_doc}, + {"close", (PyCFunction)__Pyx_async_gen_asend_close, METH_NOARGS, __Pyx_async_gen_close_doc}, + {"__await__", (PyCFunction)__Pyx_async_gen_self_method, METH_NOARGS, __Pyx_async_gen_await_doc}, + {0, 0, 0, 0} /* Sentinel */ +}; + + +#if CYTHON_USE_ASYNC_SLOTS +static __Pyx_PyAsyncMethodsStruct __Pyx_async_gen_asend_as_async = { + PyObject_SelfIter, /* am_await */ + 0, /* am_aiter */ + 0, /* am_anext */ +#if PY_VERSION_HEX >= 0x030A00A3 + 0, /*am_send*/ +#endif +}; +#endif + + +static PyTypeObject __pyx__PyAsyncGenASendType_type = { + PyVarObject_HEAD_INIT(0, 0) + "async_generator_asend", /* tp_name */ + sizeof(__pyx_PyAsyncGenASend), /* tp_basicsize */ + 0, /* tp_itemsize */ + /* methods */ + (destructor)__Pyx_async_gen_asend_dealloc, /* tp_dealloc */ + 0, /* tp_print */ + 0, /* tp_getattr */ + 0, /* tp_setattr */ +#if CYTHON_USE_ASYNC_SLOTS + &__Pyx_async_gen_asend_as_async, /* tp_as_async */ +#else + 0, /*tp_reserved*/ +#endif + 0, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + 0, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */ + 0, /* tp_doc */ + (traverseproc)__Pyx_async_gen_asend_traverse, /* tp_traverse */ + 0, /* tp_clear */ +#if CYTHON_USE_ASYNC_SLOTS && CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1 + // in order to (mis-)use tp_reserved above, we must also implement tp_richcompare + __Pyx_Coroutine_compare, /*tp_richcompare*/ +#else + 0, /*tp_richcompare*/ +#endif + 0, /* tp_weaklistoffset */ + PyObject_SelfIter, /* tp_iter */ + (iternextfunc)__Pyx_async_gen_asend_iternext, /* tp_iternext */ + __Pyx_async_gen_asend_methods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ + 0, /* tp_del */ + 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x030400a1 + 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ +#endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 + 0, /*tp_pypy_flags*/ +#endif +}; + + +static PyObject * +__Pyx_async_gen_asend_new(__pyx_PyAsyncGenObject *gen, PyObject *sendval) +{ + __pyx_PyAsyncGenASend *o; + if (__Pyx_ag_asend_freelist_free) { + __Pyx_ag_asend_freelist_free--; + o = __Pyx_ag_asend_freelist[__Pyx_ag_asend_freelist_free]; + _Py_NewReference((PyObject *)o); + } else { + o = PyObject_GC_New(__pyx_PyAsyncGenASend, __pyx__PyAsyncGenASendType); + if (o == NULL) { + return NULL; + } + } + + Py_INCREF(gen); + o->ags_gen = gen; + + Py_XINCREF(sendval); + o->ags_sendval = sendval; + + o->ags_state = __PYX_AWAITABLE_STATE_INIT; + + PyObject_GC_Track((PyObject*)o); + return (PyObject*)o; +} + + +/* ---------- Async Generator Value Wrapper ------------ */ + + +static void +__Pyx_async_gen_wrapped_val_dealloc(__pyx__PyAsyncGenWrappedValue *o) +{ + PyObject_GC_UnTrack((PyObject *)o); + Py_CLEAR(o->agw_val); + if (__Pyx_ag_value_freelist_free < _PyAsyncGen_MAXFREELIST) { + assert(__pyx__PyAsyncGenWrappedValue_CheckExact(o)); + __Pyx_ag_value_freelist[__Pyx_ag_value_freelist_free++] = o; + } else { + PyObject_GC_Del(o); + } +} + + +static int +__Pyx_async_gen_wrapped_val_traverse(__pyx__PyAsyncGenWrappedValue *o, + visitproc visit, void *arg) +{ + Py_VISIT(o->agw_val); + return 0; +} + + +static PyTypeObject __pyx__PyAsyncGenWrappedValueType_type = { + PyVarObject_HEAD_INIT(0, 0) + "async_generator_wrapped_value", /* tp_name */ + sizeof(__pyx__PyAsyncGenWrappedValue), /* tp_basicsize */ + 0, /* tp_itemsize */ + /* methods */ + (destructor)__Pyx_async_gen_wrapped_val_dealloc, /* tp_dealloc */ + 0, /* tp_print */ + 0, /* tp_getattr */ + 0, /* tp_setattr */ + 0, /* tp_as_async */ + 0, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + 0, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */ + 0, /* tp_doc */ + (traverseproc)__Pyx_async_gen_wrapped_val_traverse, /* tp_traverse */ + 0, /* tp_clear */ + 0, /* tp_richcompare */ + 0, /* tp_weaklistoffset */ + 0, /* tp_iter */ + 0, /* tp_iternext */ + 0, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ + 0, /* tp_del */ + 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x030400a1 + 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ +#endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 + 0, /*tp_pypy_flags*/ +#endif +}; + + +static PyObject * +__Pyx__PyAsyncGenValueWrapperNew(PyObject *val) +{ + // NOTE: steals a reference to val ! + __pyx__PyAsyncGenWrappedValue *o; + assert(val); + + if (__Pyx_ag_value_freelist_free) { + __Pyx_ag_value_freelist_free--; + o = __Pyx_ag_value_freelist[__Pyx_ag_value_freelist_free]; + assert(__pyx__PyAsyncGenWrappedValue_CheckExact(o)); + _Py_NewReference((PyObject*)o); + } else { + o = PyObject_GC_New(__pyx__PyAsyncGenWrappedValue, __pyx__PyAsyncGenWrappedValueType); + if (unlikely(!o)) { + Py_DECREF(val); + return NULL; + } + } + o->agw_val = val; + // no Py_INCREF(val) - steals reference! + PyObject_GC_Track((PyObject*)o); + return (PyObject*)o; +} + + +/* ---------- Async Generator AThrow awaitable ------------ */ + + +static void +__Pyx_async_gen_athrow_dealloc(__pyx_PyAsyncGenAThrow *o) +{ + PyObject_GC_UnTrack((PyObject *)o); + Py_CLEAR(o->agt_gen); + Py_CLEAR(o->agt_args); + PyObject_GC_Del(o); +} + + +static int +__Pyx_async_gen_athrow_traverse(__pyx_PyAsyncGenAThrow *o, visitproc visit, void *arg) +{ + Py_VISIT(o->agt_gen); + Py_VISIT(o->agt_args); + return 0; +} + + +static PyObject * +__Pyx_async_gen_athrow_send(__pyx_PyAsyncGenAThrow *o, PyObject *arg) +{ + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*)o->agt_gen; + PyObject *retval; + + if (o->agt_state == __PYX_AWAITABLE_STATE_CLOSED) { + PyErr_SetNone(PyExc_StopIteration); + return NULL; + } + + if (o->agt_state == __PYX_AWAITABLE_STATE_INIT) { + if (o->agt_gen->ag_closed) { + PyErr_SetNone(PyExc_StopIteration); + return NULL; + } + + if (arg != Py_None) { + PyErr_SetString(PyExc_RuntimeError, __Pyx_NON_INIT_CORO_MSG); + return NULL; + } + + o->agt_state = __PYX_AWAITABLE_STATE_ITER; + + if (o->agt_args == NULL) { + /* aclose() mode */ + o->agt_gen->ag_closed = 1; + + retval = __Pyx__Coroutine_Throw((PyObject*)gen, + /* Do not close generator when + PyExc_GeneratorExit is passed */ + PyExc_GeneratorExit, NULL, NULL, NULL, 0); + + if (retval && __pyx__PyAsyncGenWrappedValue_CheckExact(retval)) { + Py_DECREF(retval); + goto yield_close; + } + } else { + PyObject *typ; + PyObject *tb = NULL; + PyObject *val = NULL; + + if (!PyArg_UnpackTuple(o->agt_args, "athrow", 1, 3, + &typ, &val, &tb)) { + return NULL; + } + + retval = __Pyx__Coroutine_Throw((PyObject*)gen, + /* Do not close generator when PyExc_GeneratorExit is passed */ + typ, val, tb, o->agt_args, 0); + retval = __Pyx_async_gen_unwrap_value(o->agt_gen, retval); + } + if (retval == NULL) { + goto check_error; + } + return retval; + } + + assert (o->agt_state == __PYX_AWAITABLE_STATE_ITER); + + retval = __Pyx_Coroutine_Send((PyObject *)gen, arg); + if (o->agt_args) { + return __Pyx_async_gen_unwrap_value(o->agt_gen, retval); + } else { + /* aclose() mode */ + if (retval) { + if (__pyx__PyAsyncGenWrappedValue_CheckExact(retval)) { + Py_DECREF(retval); + goto yield_close; + } + else { + return retval; + } + } + else { + goto check_error; + } + } + +yield_close: + PyErr_SetString( + PyExc_RuntimeError, __Pyx_ASYNC_GEN_IGNORED_EXIT_MSG); + return NULL; + +check_error: + if (PyErr_ExceptionMatches(__Pyx_PyExc_StopAsyncIteration)) { + o->agt_state = __PYX_AWAITABLE_STATE_CLOSED; + if (o->agt_args == NULL) { + // when aclose() is called we don't want to propagate + // StopAsyncIteration; just raise StopIteration, signalling + // that 'aclose()' is done. + PyErr_Clear(); + PyErr_SetNone(PyExc_StopIteration); + } + } + else if (PyErr_ExceptionMatches(PyExc_GeneratorExit)) { + o->agt_state = __PYX_AWAITABLE_STATE_CLOSED; + PyErr_Clear(); /* ignore these errors */ + PyErr_SetNone(PyExc_StopIteration); + } + return NULL; +} + + +static PyObject * +__Pyx_async_gen_athrow_throw(__pyx_PyAsyncGenAThrow *o, PyObject *args) +{ + PyObject *retval; + + if (o->agt_state == __PYX_AWAITABLE_STATE_INIT) { + PyErr_SetString(PyExc_RuntimeError, __Pyx_NON_INIT_CORO_MSG); + return NULL; + } + + if (o->agt_state == __PYX_AWAITABLE_STATE_CLOSED) { + PyErr_SetNone(PyExc_StopIteration); + return NULL; + } + + retval = __Pyx_Coroutine_Throw((PyObject*)o->agt_gen, args); + if (o->agt_args) { + return __Pyx_async_gen_unwrap_value(o->agt_gen, retval); + } else { + /* aclose() mode */ + if (retval && __pyx__PyAsyncGenWrappedValue_CheckExact(retval)) { + Py_DECREF(retval); + PyErr_SetString(PyExc_RuntimeError, __Pyx_ASYNC_GEN_IGNORED_EXIT_MSG); + return NULL; + } + return retval; + } +} + + +static PyObject * +__Pyx_async_gen_athrow_iternext(__pyx_PyAsyncGenAThrow *o) +{ + return __Pyx_async_gen_athrow_send(o, Py_None); +} + + +static PyObject * +__Pyx_async_gen_athrow_close(PyObject *g, CYTHON_UNUSED PyObject *args) +{ + __pyx_PyAsyncGenAThrow *o = (__pyx_PyAsyncGenAThrow*) g; + o->agt_state = __PYX_AWAITABLE_STATE_CLOSED; + Py_RETURN_NONE; +} + + +static PyMethodDef __Pyx_async_gen_athrow_methods[] = { + {"send", (PyCFunction)__Pyx_async_gen_athrow_send, METH_O, __Pyx_async_gen_send_doc}, + {"throw", (PyCFunction)__Pyx_async_gen_athrow_throw, METH_VARARGS, __Pyx_async_gen_throw_doc}, + {"close", (PyCFunction)__Pyx_async_gen_athrow_close, METH_NOARGS, __Pyx_async_gen_close_doc}, + {"__await__", (PyCFunction)__Pyx_async_gen_self_method, METH_NOARGS, __Pyx_async_gen_await_doc}, + {0, 0, 0, 0} /* Sentinel */ +}; + + +#if CYTHON_USE_ASYNC_SLOTS +static __Pyx_PyAsyncMethodsStruct __Pyx_async_gen_athrow_as_async = { + PyObject_SelfIter, /* am_await */ + 0, /* am_aiter */ + 0, /* am_anext */ +#if PY_VERSION_HEX >= 0x030A00A3 + 0, /*am_send*/ +#endif +}; +#endif + + +static PyTypeObject __pyx__PyAsyncGenAThrowType_type = { + PyVarObject_HEAD_INIT(0, 0) + "async_generator_athrow", /* tp_name */ + sizeof(__pyx_PyAsyncGenAThrow), /* tp_basicsize */ + 0, /* tp_itemsize */ + (destructor)__Pyx_async_gen_athrow_dealloc, /* tp_dealloc */ + 0, /* tp_print */ + 0, /* tp_getattr */ + 0, /* tp_setattr */ +#if CYTHON_USE_ASYNC_SLOTS + &__Pyx_async_gen_athrow_as_async, /* tp_as_async */ +#else + 0, /*tp_reserved*/ +#endif + 0, /* tp_repr */ + 0, /* tp_as_number */ + 0, /* tp_as_sequence */ + 0, /* tp_as_mapping */ + 0, /* tp_hash */ + 0, /* tp_call */ + 0, /* tp_str */ + 0, /* tp_getattro */ + 0, /* tp_setattro */ + 0, /* tp_as_buffer */ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */ + 0, /* tp_doc */ + (traverseproc)__Pyx_async_gen_athrow_traverse, /* tp_traverse */ + 0, /* tp_clear */ +#if CYTHON_USE_ASYNC_SLOTS && CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1 + // in order to (mis-)use tp_reserved above, we must also implement tp_richcompare + __Pyx_Coroutine_compare, /*tp_richcompare*/ +#else + 0, /*tp_richcompare*/ +#endif + 0, /* tp_weaklistoffset */ + PyObject_SelfIter, /* tp_iter */ + (iternextfunc)__Pyx_async_gen_athrow_iternext, /* tp_iternext */ + __Pyx_async_gen_athrow_methods, /* tp_methods */ + 0, /* tp_members */ + 0, /* tp_getset */ + 0, /* tp_base */ + 0, /* tp_dict */ + 0, /* tp_descr_get */ + 0, /* tp_descr_set */ + 0, /* tp_dictoffset */ + 0, /* tp_init */ + 0, /* tp_alloc */ + 0, /* tp_new */ + 0, /* tp_free */ + 0, /* tp_is_gc */ + 0, /* tp_bases */ + 0, /* tp_mro */ + 0, /* tp_cache */ + 0, /* tp_subclasses */ + 0, /* tp_weaklist */ + 0, /* tp_del */ + 0, /* tp_version_tag */ +#if PY_VERSION_HEX >= 0x030400a1 + 0, /* tp_finalize */ +#endif +#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ +#endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 + 0, /*tp_pypy_flags*/ +#endif +}; + + +static PyObject * +__Pyx_async_gen_athrow_new(__pyx_PyAsyncGenObject *gen, PyObject *args) +{ + __pyx_PyAsyncGenAThrow *o; + o = PyObject_GC_New(__pyx_PyAsyncGenAThrow, __pyx__PyAsyncGenAThrowType); + if (o == NULL) { + return NULL; + } + o->agt_gen = gen; + o->agt_args = args; + o->agt_state = __PYX_AWAITABLE_STATE_INIT; + Py_INCREF(gen); + Py_XINCREF(args); + PyObject_GC_Track((PyObject*)o); + return (PyObject*)o; +} + + +/* ---------- global type sharing ------------ */ + +static int __pyx_AsyncGen_init(void) { + // on Windows, C-API functions can't be used in slots statically + __pyx_AsyncGenType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + __pyx__PyAsyncGenWrappedValueType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + __pyx__PyAsyncGenAThrowType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + __pyx__PyAsyncGenASendType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + + __pyx_AsyncGenType = __Pyx_FetchCommonType(&__pyx_AsyncGenType_type); + if (unlikely(!__pyx_AsyncGenType)) + return -1; + + __pyx__PyAsyncGenAThrowType = __Pyx_FetchCommonType(&__pyx__PyAsyncGenAThrowType_type); + if (unlikely(!__pyx__PyAsyncGenAThrowType)) + return -1; + + __pyx__PyAsyncGenWrappedValueType = __Pyx_FetchCommonType(&__pyx__PyAsyncGenWrappedValueType_type); + if (unlikely(!__pyx__PyAsyncGenWrappedValueType)) + return -1; + + __pyx__PyAsyncGenASendType = __Pyx_FetchCommonType(&__pyx__PyAsyncGenASendType_type); + if (unlikely(!__pyx__PyAsyncGenASendType)) + return -1; + + return 0; +} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Buffer.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Buffer.c new file mode 100644 index 00000000000..3c7105fa356 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Buffer.c @@ -0,0 +1,921 @@ +/////////////// BufferStructDeclare.proto /////////////// + +/* structs for buffer access */ + +typedef struct { + Py_ssize_t shape, strides, suboffsets; +} __Pyx_Buf_DimInfo; + +typedef struct { + size_t refcount; + Py_buffer pybuffer; +} __Pyx_Buffer; + +typedef struct { + __Pyx_Buffer *rcbuffer; + char *data; + __Pyx_Buf_DimInfo diminfo[{{max_dims}}]; +} __Pyx_LocalBuf_ND; + +/////////////// BufferIndexError.proto /////////////// +static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ + +/////////////// BufferIndexError /////////////// +static void __Pyx_RaiseBufferIndexError(int axis) { + PyErr_Format(PyExc_IndexError, + "Out of bounds on buffer access (axis %d)", axis); +} + +/////////////// BufferIndexErrorNogil.proto /////////////// +//@requires: BufferIndexError + +static void __Pyx_RaiseBufferIndexErrorNogil(int axis); /*proto*/ + +/////////////// BufferIndexErrorNogil /////////////// +static void __Pyx_RaiseBufferIndexErrorNogil(int axis) { + #ifdef WITH_THREAD + PyGILState_STATE gilstate = PyGILState_Ensure(); + #endif + __Pyx_RaiseBufferIndexError(axis); + #ifdef WITH_THREAD + PyGILState_Release(gilstate); + #endif +} + +/////////////// BufferFallbackError.proto /////////////// +static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ + +/////////////// BufferFallbackError /////////////// +static void __Pyx_RaiseBufferFallbackError(void) { + PyErr_SetString(PyExc_ValueError, + "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); +} + +/////////////// BufferFormatStructs.proto /////////////// +//@proto_block: utility_code_proto_before_types + +#define IS_UNSIGNED(type) (((type) -1) > 0) + +/* Run-time type information about structs used with buffers */ +struct __Pyx_StructField_; + +#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) + +typedef struct { + const char* name; /* for error messages only */ + struct __Pyx_StructField_* fields; + size_t size; /* sizeof(type) */ + size_t arraysize[8]; /* length of array in each dimension */ + int ndim; + char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ + char is_unsigned; + int flags; +} __Pyx_TypeInfo; + +typedef struct __Pyx_StructField_ { + __Pyx_TypeInfo* type; + const char* name; + size_t offset; +} __Pyx_StructField; + +typedef struct { + __Pyx_StructField* field; + size_t parent_offset; +} __Pyx_BufFmt_StackElem; + +typedef struct { + __Pyx_StructField root; + __Pyx_BufFmt_StackElem* head; + size_t fmt_offset; + size_t new_count, enc_count; + size_t struct_alignment; + int is_complex; + char enc_type; + char new_packmode; + char enc_packmode; + char is_valid_array; +} __Pyx_BufFmt_Context; + + +/////////////// GetAndReleaseBuffer.proto /////////////// + +#if PY_MAJOR_VERSION < 3 + static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); + static void __Pyx_ReleaseBuffer(Py_buffer *view); +#else + #define __Pyx_GetBuffer PyObject_GetBuffer + #define __Pyx_ReleaseBuffer PyBuffer_Release +#endif + +/////////////// GetAndReleaseBuffer /////////////// + +#if PY_MAJOR_VERSION < 3 +static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { + if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); + + {{for type_ptr, getbuffer, releasebuffer in types}} + {{if getbuffer}} + if (__Pyx_TypeCheck(obj, {{type_ptr}})) return {{getbuffer}}(obj, view, flags); + {{endif}} + {{endfor}} + + PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); + return -1; +} + +static void __Pyx_ReleaseBuffer(Py_buffer *view) { + PyObject *obj = view->obj; + if (!obj) return; + + if (PyObject_CheckBuffer(obj)) { + PyBuffer_Release(view); + return; + } + + if ((0)) {} + {{for type_ptr, getbuffer, releasebuffer in types}} + {{if releasebuffer}} + else if (__Pyx_TypeCheck(obj, {{type_ptr}})) {{releasebuffer}}(obj, view); + {{endif}} + {{endfor}} + + view->obj = NULL; + Py_DECREF(obj); +} + +#endif /* PY_MAJOR_VERSION < 3 */ + + +/////////////// BufferGetAndValidate.proto /////////////// + +#define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack) \ + ((obj == Py_None || obj == NULL) ? \ + (__Pyx_ZeroBuffer(buf), 0) : \ + __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)) + +static int __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj, + __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); +static void __Pyx_ZeroBuffer(Py_buffer* buf); +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);/*proto*/ + +static Py_ssize_t __Pyx_minusones[] = { {{ ", ".join(["-1"] * max_dims) }} }; +static Py_ssize_t __Pyx_zeros[] = { {{ ", ".join(["0"] * max_dims) }} }; + + +/////////////// BufferGetAndValidate /////////////// +//@requires: BufferFormatCheck + +static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { + if (unlikely(info->buf == NULL)) return; + if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; + __Pyx_ReleaseBuffer(info); +} + +static void __Pyx_ZeroBuffer(Py_buffer* buf) { + buf->buf = NULL; + buf->obj = NULL; + buf->strides = __Pyx_zeros; + buf->shape = __Pyx_zeros; + buf->suboffsets = __Pyx_minusones; +} + +static int __Pyx__GetBufferAndValidate( + Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, + int nd, int cast, __Pyx_BufFmt_StackElem* stack) +{ + buf->buf = NULL; + if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) { + __Pyx_ZeroBuffer(buf); + return -1; + } + // From this point on, we have acquired the buffer and must release it on errors. + if (unlikely(buf->ndim != nd)) { + PyErr_Format(PyExc_ValueError, + "Buffer has wrong number of dimensions (expected %d, got %d)", + nd, buf->ndim); + goto fail; + } + if (!cast) { + __Pyx_BufFmt_Context ctx; + __Pyx_BufFmt_Init(&ctx, stack, dtype); + if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; + } + if (unlikely((size_t)buf->itemsize != dtype->size)) { + PyErr_Format(PyExc_ValueError, + "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)", + buf->itemsize, (buf->itemsize > 1) ? "s" : "", + dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); + goto fail; + } + if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; + return 0; +fail:; + __Pyx_SafeReleaseBuffer(buf); + return -1; +} + + +/////////////// BufferFormatCheck.proto /////////////// + +// Buffer format string checking +// +// Buffer type checking. Utility code for checking that acquired +// buffers match our assumptions. We only need to check ndim and +// the format string; the access mode/flags is checked by the +// exporter. See: +// +// http://docs.python.org/3/library/struct.html +// http://legacy.python.org/dev/peps/pep-3118/#additions-to-the-struct-string-syntax +// +// The alignment code is copied from _struct.c in Python. + +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts); +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + __Pyx_TypeInfo* type); /*proto*/ + +/////////////// BufferFormatCheck /////////////// +//@requires: ModuleSetupCode.c::IsLittleEndian +//@requires: BufferFormatStructs + +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, + __Pyx_BufFmt_StackElem* stack, + __Pyx_TypeInfo* type) { + stack[0].field = &ctx->root; + stack[0].parent_offset = 0; + ctx->root.type = type; + ctx->root.name = "buffer dtype"; + ctx->root.offset = 0; + ctx->head = stack; + ctx->head->field = &ctx->root; + ctx->fmt_offset = 0; + ctx->head->parent_offset = 0; + ctx->new_packmode = '@'; + ctx->enc_packmode = '@'; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->is_complex = 0; + ctx->is_valid_array = 0; + ctx->struct_alignment = 0; + while (type->typegroup == 'S') { + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = 0; + type = type->fields->type; + } +} + +static int __Pyx_BufFmt_ParseNumber(const char** ts) { + int count; + const char* t = *ts; + if (*t < '0' || *t > '9') { + return -1; + } else { + count = *t++ - '0'; + while (*t >= '0' && *t <= '9') { + count *= 10; + count += *t++ - '0'; + } + } + *ts = t; + return count; +} + +static int __Pyx_BufFmt_ExpectNumber(const char **ts) { + int number = __Pyx_BufFmt_ParseNumber(ts); + if (number == -1) /* First char was not a digit */ + PyErr_Format(PyExc_ValueError,\ + "Does not understand character buffer dtype format string ('%c')", **ts); + return number; +} + + +static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { + PyErr_Format(PyExc_ValueError, + "Unexpected format string character: '%c'", ch); +} + +static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { + switch (ch) { + case '?': return "'bool'"; + case 'c': return "'char'"; + case 'b': return "'signed char'"; + case 'B': return "'unsigned char'"; + case 'h': return "'short'"; + case 'H': return "'unsigned short'"; + case 'i': return "'int'"; + case 'I': return "'unsigned int'"; + case 'l': return "'long'"; + case 'L': return "'unsigned long'"; + case 'q': return "'long long'"; + case 'Q': return "'unsigned long long'"; + case 'f': return (is_complex ? "'complex float'" : "'float'"); + case 'd': return (is_complex ? "'complex double'" : "'double'"); + case 'g': return (is_complex ? "'complex long double'" : "'long double'"); + case 'T': return "a struct"; + case 'O': return "Python object"; + case 'P': return "a pointer"; + case 's': case 'p': return "a string"; + case 0: return "end"; + default: return "unparseable format string"; + } +} + +static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return 2; + case 'i': case 'I': case 'l': case 'L': return 4; + case 'q': case 'Q': return 8; + case 'f': return (is_complex ? 8 : 4); + case 'd': return (is_complex ? 16 : 8); + case 'g': { + PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); + return 0; + } + case 'O': case 'P': return sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} + +static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(short); + case 'i': case 'I': return sizeof(int); + case 'l': case 'L': return sizeof(long); + #ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(PY_LONG_LONG); + #endif + case 'f': return sizeof(float) * (is_complex ? 2 : 1); + case 'd': return sizeof(double) * (is_complex ? 2 : 1); + case 'g': return sizeof(long double) * (is_complex ? 2 : 1); + case 'O': case 'P': return sizeof(void*); + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} + +typedef struct { char c; short x; } __Pyx_st_short; +typedef struct { char c; int x; } __Pyx_st_int; +typedef struct { char c; long x; } __Pyx_st_long; +typedef struct { char c; float x; } __Pyx_st_float; +typedef struct { char c; double x; } __Pyx_st_double; +typedef struct { char c; long double x; } __Pyx_st_longdouble; +typedef struct { char c; void *x; } __Pyx_st_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; +#endif + +static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_st_float) - sizeof(float); + case 'd': return sizeof(__Pyx_st_double) - sizeof(double); + case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} + +/* These are for computing the padding at the end of the struct to align + on the first member of the struct. This will probably the same as above, + but we don't have any guarantees. + */ +typedef struct { short x; char c; } __Pyx_pad_short; +typedef struct { int x; char c; } __Pyx_pad_int; +typedef struct { long x; char c; } __Pyx_pad_long; +typedef struct { float x; char c; } __Pyx_pad_float; +typedef struct { double x; char c; } __Pyx_pad_double; +typedef struct { long double x; char c; } __Pyx_pad_longdouble; +typedef struct { void *x; char c; } __Pyx_pad_void_p; +#ifdef HAVE_LONG_LONG +typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; +#endif + +static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { + switch (ch) { + case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; + case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); + case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); + case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); +#ifdef HAVE_LONG_LONG + case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); +#endif + case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); + case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); + case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); + case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); + default: + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } +} + +static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { + switch (ch) { + case 'c': + return 'H'; + case 'b': case 'h': case 'i': + case 'l': case 'q': case 's': case 'p': + return 'I'; + case '?': case 'B': case 'H': case 'I': case 'L': case 'Q': + return 'U'; + case 'f': case 'd': case 'g': + return (is_complex ? 'C' : 'R'); + case 'O': + return 'O'; + case 'P': + return 'P'; + default: { + __Pyx_BufFmt_RaiseUnexpectedChar(ch); + return 0; + } + } +} + + +static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { + if (ctx->head == NULL || ctx->head->field == &ctx->root) { + const char* expected; + const char* quote; + if (ctx->head == NULL) { + expected = "end"; + quote = ""; + } else { + expected = ctx->head->field->type->name; + quote = "'"; + } + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected %s%s%s but got %s", + quote, expected, quote, + __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); + } else { + __Pyx_StructField* field = ctx->head->field; + __Pyx_StructField* parent = (ctx->head - 1)->field; + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", + field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), + parent->type->name, field->name); + } +} + +static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { + char group; + size_t size, offset, arraysize = 1; + + /* printf("processing... %s\n", ctx->head->field->type->name); */ + + if (ctx->enc_type == 0) return 0; + + /* Validate array size */ + if (ctx->head->field->type->arraysize[0]) { + int i, ndim = 0; + + /* handle strings ('s' and 'p') */ + if (ctx->enc_type == 's' || ctx->enc_type == 'p') { + ctx->is_valid_array = ctx->head->field->type->ndim == 1; + ndim = 1; + if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { + PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %zu", + ctx->head->field->type->arraysize[0], ctx->enc_count); + return -1; + } + } + + if (!ctx->is_valid_array) { + PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", + ctx->head->field->type->ndim, ndim); + return -1; + } + for (i = 0; i < ctx->head->field->type->ndim; i++) { + arraysize *= ctx->head->field->type->arraysize[i]; + } + ctx->is_valid_array = 0; + ctx->enc_count = 1; + } + + group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); + do { + __Pyx_StructField* field = ctx->head->field; + __Pyx_TypeInfo* type = field->type; + + if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { + size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); + } else { + size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); + } + + if (ctx->enc_packmode == '@') { + size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); + size_t align_mod_offset; + if (align_at == 0) return -1; + align_mod_offset = ctx->fmt_offset % align_at; + if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; + + if (ctx->struct_alignment == 0) + ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, + ctx->is_complex); + } + + if (type->size != size || type->typegroup != group) { + if (type->typegroup == 'C' && type->fields != NULL) { + /* special case -- treat as struct rather than complex number */ + size_t parent_offset = ctx->head->parent_offset + field->offset; + ++ctx->head; + ctx->head->field = type->fields; + ctx->head->parent_offset = parent_offset; + continue; + } + + if ((type->typegroup == 'H' || group == 'H') && type->size == size) { + /* special case -- chars don't care about sign */ + } else { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + } + + offset = ctx->head->parent_offset + field->offset; + if (ctx->fmt_offset != offset) { + PyErr_Format(PyExc_ValueError, + "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", + (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); + return -1; + } + + ctx->fmt_offset += size; + if (arraysize) + ctx->fmt_offset += (arraysize - 1) * size; + + --ctx->enc_count; /* Consume from buffer string */ + + /* Done checking, move to next field, pushing or popping struct stack if needed */ + while (1) { + if (field == &ctx->root) { + ctx->head = NULL; + if (ctx->enc_count != 0) { + __Pyx_BufFmt_RaiseExpected(ctx); + return -1; + } + break; /* breaks both loops as ctx->enc_count == 0 */ + } + ctx->head->field = ++field; + if (field->type == NULL) { + --ctx->head; + field = ctx->head->field; + continue; + } else if (field->type->typegroup == 'S') { + size_t parent_offset = ctx->head->parent_offset + field->offset; + if (field->type->fields->type == NULL) continue; /* empty struct */ + field = field->type->fields; + ++ctx->head; + ctx->head->field = field; + ctx->head->parent_offset = parent_offset; + break; + } else { + break; + } + } + } while (ctx->enc_count); + ctx->enc_type = 0; + ctx->is_complex = 0; + return 0; +} + +/* Parse an array in the format string (e.g. (1,2,3)) */ +static PyObject * +__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) +{ + const char *ts = *tsp; + int i = 0, number, ndim; + + ++ts; + if (ctx->new_count != 1) { + PyErr_SetString(PyExc_ValueError, + "Cannot handle repeated arrays in format string"); + return NULL; + } + + /* Process the previous element */ + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + + // store ndim now, as field advanced by __Pyx_BufFmt_ProcessTypeChunk call + ndim = ctx->head->field->type->ndim; + + /* Parse all numbers in the format string */ + while (*ts && *ts != ')') { + // ignore space characters (not using isspace() due to C/C++ problem on MacOS-X) + switch (*ts) { + case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; + default: break; /* not a 'break' in the loop */ + } + + number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + + if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) + return PyErr_Format(PyExc_ValueError, + "Expected a dimension of size %zu, got %d", + ctx->head->field->type->arraysize[i], number); + + if (*ts != ',' && *ts != ')') + return PyErr_Format(PyExc_ValueError, + "Expected a comma in format string, got '%c'", *ts); + + if (*ts == ',') ts++; + i++; + } + + if (i != ndim) + return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", + ctx->head->field->type->ndim, i); + + if (!*ts) { + PyErr_SetString(PyExc_ValueError, + "Unexpected end of format string, expected ')'"); + return NULL; + } + + ctx->is_valid_array = 1; + ctx->new_count = 1; + *tsp = ++ts; + return Py_None; +} + +static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { + int got_Z = 0; + + while (1) { + /* puts(ts); */ + switch(*ts) { + case 0: + if (ctx->enc_type != 0 && ctx->head == NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + if (ctx->head != NULL) { + __Pyx_BufFmt_RaiseExpected(ctx); + return NULL; + } + return ts; + case ' ': + case '\r': + case '\n': + ++ts; + break; + case '<': + if (!__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '>': + case '!': + if (__Pyx_Is_Little_Endian()) { + PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); + return NULL; + } + ctx->new_packmode = '='; + ++ts; + break; + case '=': + case '@': + case '^': + ctx->new_packmode = *ts++; + break; + case 'T': /* substruct */ + { + const char* ts_after_sub; + size_t i, struct_count = ctx->new_count; + size_t struct_alignment = ctx->struct_alignment; + ctx->new_count = 1; + ++ts; + if (*ts != '{') { + PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); + return NULL; + } + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; /* Erase processed last struct element */ + ctx->enc_count = 0; + ctx->struct_alignment = 0; + ++ts; + ts_after_sub = ts; + for (i = 0; i != struct_count; ++i) { + ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); + if (!ts_after_sub) return NULL; + } + ts = ts_after_sub; + if (struct_alignment) ctx->struct_alignment = struct_alignment; + } + break; + case '}': /* end of substruct; either repeat or move on */ + { + size_t alignment = ctx->struct_alignment; + ++ts; + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_type = 0; /* Erase processed last struct element */ + if (alignment && ctx->fmt_offset % alignment) { + /* Pad struct on size of the first member */ + ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); + } + } + return ts; + case 'x': + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->fmt_offset += ctx->new_count; + ctx->new_count = 1; + ctx->enc_count = 0; + ctx->enc_type = 0; + ctx->enc_packmode = ctx->new_packmode; + ++ts; + break; + case 'Z': + got_Z = 1; + ++ts; + if (*ts != 'f' && *ts != 'd' && *ts != 'g') { + __Pyx_BufFmt_RaiseUnexpectedChar('Z'); + return NULL; + } + CYTHON_FALLTHROUGH; + case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': + case 'l': case 'L': case 'q': case 'Q': + case 'f': case 'd': case 'g': + case 'O': case 'p': + if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && + (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { + /* Continue pooling same type */ + ctx->enc_count += ctx->new_count; + ctx->new_count = 1; + got_Z = 0; + ++ts; + break; + } + CYTHON_FALLTHROUGH; + case 's': + /* 's' or new type (cannot be added to current pool) */ + if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; + ctx->enc_count = ctx->new_count; + ctx->enc_packmode = ctx->new_packmode; + ctx->enc_type = *ts; + ctx->is_complex = got_Z; + ++ts; + ctx->new_count = 1; + got_Z = 0; + break; + case ':': + ++ts; + while(*ts != ':') ++ts; + ++ts; + break; + case '(': + if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL; + break; + default: + { + int number = __Pyx_BufFmt_ExpectNumber(&ts); + if (number == -1) return NULL; + ctx->new_count = (size_t)number; + } + } + } +} + +/////////////// TypeInfoCompare.proto /////////////// +static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b); + +/////////////// TypeInfoCompare /////////////// +//@requires: BufferFormatStructs + +// See if two dtypes are equal +static int +__pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b) +{ + int i; + + if (!a || !b) + return 0; + + if (a == b) + return 1; + + if (a->size != b->size || a->typegroup != b->typegroup || + a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) { + if (a->typegroup == 'H' || b->typegroup == 'H') { + /* Special case for chars */ + return a->size == b->size; + } else { + return 0; + } + } + + if (a->ndim) { + /* Verify multidimensional C arrays */ + for (i = 0; i < a->ndim; i++) + if (a->arraysize[i] != b->arraysize[i]) + return 0; + } + + if (a->typegroup == 'S') { + /* Check for packed struct */ + if (a->flags != b->flags) + return 0; + + /* compare all struct fields */ + if (a->fields || b->fields) { + /* Check if both have fields */ + if (!(a->fields && b->fields)) + return 0; + + /* compare */ + for (i = 0; a->fields[i].type && b->fields[i].type; i++) { + __Pyx_StructField *field_a = a->fields + i; + __Pyx_StructField *field_b = b->fields + i; + + if (field_a->offset != field_b->offset || + !__pyx_typeinfo_cmp(field_a->type, field_b->type)) + return 0; + } + + /* If all fields are processed, we have a match */ + return !a->fields[i].type && !b->fields[i].type; + } + } + + return 1; +} + + +/////////////// TypeInfoToFormat.proto /////////////// +struct __pyx_typeinfo_string { + char string[3]; +}; +static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type); + +/////////////// TypeInfoToFormat /////////////// +//@requires: BufferFormatStructs + +// See also MemoryView.pyx:BufferFormatFromTypeInfo + +static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type) { + struct __pyx_typeinfo_string result = { {0} }; + char *buf = (char *) result.string; + size_t size = type->size; + + switch (type->typegroup) { + case 'H': + *buf = 'c'; + break; + case 'I': + case 'U': + if (size == 1) + *buf = (type->is_unsigned) ? 'B' : 'b'; + else if (size == 2) + *buf = (type->is_unsigned) ? 'H' : 'h'; + else if (size == 4) + *buf = (type->is_unsigned) ? 'I' : 'i'; + else if (size == 8) + *buf = (type->is_unsigned) ? 'Q' : 'q'; + break; + case 'P': + *buf = 'P'; + break; + case 'C': + { + __Pyx_TypeInfo complex_type = *type; + complex_type.typegroup = 'R'; + complex_type.size /= 2; + + *buf++ = 'Z'; + *buf = __Pyx_TypeInfoToFormat(&complex_type).string[0]; + break; + } + case 'R': + if (size == 4) + *buf = 'f'; + else if (size == 8) + *buf = 'd'; + else + *buf = 'g'; + break; + } + + return result; +} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Builtins.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Builtins.c new file mode 100644 index 00000000000..32aeff8f265 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Builtins.c @@ -0,0 +1,542 @@ +/* + * Special implementations of built-in functions and methods. + * + * Optional optimisations for builtins are in Optimize.c. + * + * General object operations and protocols are in ObjectHandling.c. + */ + +//////////////////// Globals.proto //////////////////// + +static PyObject* __Pyx_Globals(void); /*proto*/ + +//////////////////// Globals //////////////////// +//@substitute: naming +//@requires: ObjectHandling.c::GetAttr + +// This is a stub implementation until we have something more complete. +// Currently, we only handle the most common case of a read-only dict +// of Python names. Supporting cdef names in the module and write +// access requires a rewrite as a dedicated class. + +static PyObject* __Pyx_Globals(void) { + Py_ssize_t i; + PyObject *names; + PyObject *globals = $moddict_cname; + Py_INCREF(globals); + names = PyObject_Dir($module_cname); + if (!names) + goto bad; + for (i = PyList_GET_SIZE(names)-1; i >= 0; i--) { +#if CYTHON_COMPILING_IN_PYPY + PyObject* name = PySequence_ITEM(names, i); + if (!name) + goto bad; +#else + PyObject* name = PyList_GET_ITEM(names, i); +#endif + if (!PyDict_Contains(globals, name)) { + PyObject* value = __Pyx_GetAttr($module_cname, name); + if (!value) { +#if CYTHON_COMPILING_IN_PYPY + Py_DECREF(name); +#endif + goto bad; + } + if (PyDict_SetItem(globals, name, value) < 0) { +#if CYTHON_COMPILING_IN_PYPY + Py_DECREF(name); +#endif + Py_DECREF(value); + goto bad; + } + } +#if CYTHON_COMPILING_IN_PYPY + Py_DECREF(name); +#endif + } + Py_DECREF(names); + return globals; +bad: + Py_XDECREF(names); + Py_XDECREF(globals); + return NULL; +} + +//////////////////// PyExecGlobals.proto //////////////////// + +static PyObject* __Pyx_PyExecGlobals(PyObject*); + +//////////////////// PyExecGlobals //////////////////// +//@requires: Globals +//@requires: PyExec + +static PyObject* __Pyx_PyExecGlobals(PyObject* code) { + PyObject* result; + PyObject* globals = __Pyx_Globals(); + if (unlikely(!globals)) + return NULL; + result = __Pyx_PyExec2(code, globals); + Py_DECREF(globals); + return result; +} + +//////////////////// PyExec.proto //////////////////// + +static PyObject* __Pyx_PyExec3(PyObject*, PyObject*, PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyExec2(PyObject*, PyObject*); + +//////////////////// PyExec //////////////////// +//@substitute: naming + +static CYTHON_INLINE PyObject* __Pyx_PyExec2(PyObject* o, PyObject* globals) { + return __Pyx_PyExec3(o, globals, NULL); +} + +static PyObject* __Pyx_PyExec3(PyObject* o, PyObject* globals, PyObject* locals) { + PyObject* result; + PyObject* s = 0; + char *code = 0; + + if (!globals || globals == Py_None) { + globals = $moddict_cname; + } else if (!PyDict_Check(globals)) { + PyErr_Format(PyExc_TypeError, "exec() arg 2 must be a dict, not %.200s", + Py_TYPE(globals)->tp_name); + goto bad; + } + if (!locals || locals == Py_None) { + locals = globals; + } + + if (__Pyx_PyDict_GetItemStr(globals, PYIDENT("__builtins__")) == NULL) { + if (PyDict_SetItem(globals, PYIDENT("__builtins__"), PyEval_GetBuiltins()) < 0) + goto bad; + } + + if (PyCode_Check(o)) { + if (__Pyx_PyCode_HasFreeVars((PyCodeObject *)o)) { + PyErr_SetString(PyExc_TypeError, + "code object passed to exec() may not contain free variables"); + goto bad; + } + #if PY_VERSION_HEX < 0x030200B1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) + result = PyEval_EvalCode((PyCodeObject *)o, globals, locals); + #else + result = PyEval_EvalCode(o, globals, locals); + #endif + } else { + PyCompilerFlags cf; + cf.cf_flags = 0; +#if PY_VERSION_HEX >= 0x030800A3 + cf.cf_feature_version = PY_MINOR_VERSION; +#endif + if (PyUnicode_Check(o)) { + cf.cf_flags = PyCF_SOURCE_IS_UTF8; + s = PyUnicode_AsUTF8String(o); + if (!s) goto bad; + o = s; + #if PY_MAJOR_VERSION >= 3 + } else if (!PyBytes_Check(o)) { + #else + } else if (!PyString_Check(o)) { + #endif + PyErr_Format(PyExc_TypeError, + "exec: arg 1 must be string, bytes or code object, got %.200s", + Py_TYPE(o)->tp_name); + goto bad; + } + #if PY_MAJOR_VERSION >= 3 + code = PyBytes_AS_STRING(o); + #else + code = PyString_AS_STRING(o); + #endif + if (PyEval_MergeCompilerFlags(&cf)) { + result = PyRun_StringFlags(code, Py_file_input, globals, locals, &cf); + } else { + result = PyRun_String(code, Py_file_input, globals, locals); + } + Py_XDECREF(s); + } + + return result; +bad: + Py_XDECREF(s); + return 0; +} + +//////////////////// GetAttr3.proto //////////////////// + +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /*proto*/ + +//////////////////// GetAttr3 //////////////////// +//@requires: ObjectHandling.c::GetAttr +//@requires: Exceptions.c::PyThreadStateGet +//@requires: Exceptions.c::PyErrFetchRestore +//@requires: Exceptions.c::PyErrExceptionMatches + +static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(d); + return d; +} + +static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { + PyObject *r = __Pyx_GetAttr(o, n); + return (likely(r)) ? r : __Pyx_GetAttr3Default(d); +} + +//////////////////// HasAttr.proto //////////////////// + +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); /*proto*/ + +//////////////////// HasAttr //////////////////// +//@requires: ObjectHandling.c::GetAttr + +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { + PyObject *r; + if (unlikely(!__Pyx_PyBaseString_Check(n))) { + PyErr_SetString(PyExc_TypeError, + "hasattr(): attribute name must be string"); + return -1; + } + r = __Pyx_GetAttr(o, n); + if (unlikely(!r)) { + PyErr_Clear(); + return 0; + } else { + Py_DECREF(r); + return 1; + } +} + +//////////////////// Intern.proto //////////////////// + +static PyObject* __Pyx_Intern(PyObject* s); /* proto */ + +//////////////////// Intern //////////////////// + +static PyObject* __Pyx_Intern(PyObject* s) { + if (!(likely(PyString_CheckExact(s)))) { + PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(s)->tp_name); + return 0; + } + Py_INCREF(s); + #if PY_MAJOR_VERSION >= 3 + PyUnicode_InternInPlace(&s); + #else + PyString_InternInPlace(&s); + #endif + return s; +} + +//////////////////// abs_longlong.proto //////////////////// + +static CYTHON_INLINE PY_LONG_LONG __Pyx_abs_longlong(PY_LONG_LONG x) { +#if defined (__cplusplus) && __cplusplus >= 201103L + return std::abs(x); +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + return llabs(x); +#elif defined (_MSC_VER) + // abs() is defined for long, but 64-bits type on MSVC is long long. + // Use MS-specific _abs64() instead, which returns the original (negative) value for abs(-MAX-1) + return _abs64(x); +#elif defined (__GNUC__) + // gcc or clang on 64 bit windows. + return __builtin_llabs(x); +#else + if (sizeof(PY_LONG_LONG) <= sizeof(Py_ssize_t)) + return __Pyx_sst_abs(x); + return (x<0) ? -x : x; +#endif +} + + +//////////////////// py_abs.proto //////////////////// + +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject *__Pyx_PyLong_AbsNeg(PyObject *num);/*proto*/ + +#define __Pyx_PyNumber_Absolute(x) \ + ((likely(PyLong_CheckExact(x))) ? \ + (likely(Py_SIZE(x) >= 0) ? (Py_INCREF(x), (x)) : __Pyx_PyLong_AbsNeg(x)) : \ + PyNumber_Absolute(x)) + +#else +#define __Pyx_PyNumber_Absolute(x) PyNumber_Absolute(x) +#endif + +//////////////////// py_abs //////////////////// + +#if CYTHON_USE_PYLONG_INTERNALS +static PyObject *__Pyx_PyLong_AbsNeg(PyObject *n) { + if (likely(Py_SIZE(n) == -1)) { + // digits are unsigned + return PyLong_FromLong(((PyLongObject*)n)->ob_digit[0]); + } +#if CYTHON_COMPILING_IN_CPYTHON + { + PyObject *copy = _PyLong_Copy((PyLongObject*)n); + if (likely(copy)) { + // negate the size to swap the sign + __Pyx_SET_SIZE(copy, -Py_SIZE(copy)); + } + return copy; + } +#else + return PyNumber_Negative(n); +#endif +} +#endif + + +//////////////////// pow2.proto //////////////////// + +#define __Pyx_PyNumber_Power2(a, b) PyNumber_Power(a, b, Py_None) + + +//////////////////// object_ord.proto //////////////////// +//@requires: TypeConversion.c::UnicodeAsUCS4 + +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyObject_Ord(c) \ + (likely(PyUnicode_Check(c)) ? (long)__Pyx_PyUnicode_AsPy_UCS4(c) : __Pyx__PyObject_Ord(c)) +#else +#define __Pyx_PyObject_Ord(c) __Pyx__PyObject_Ord(c) +#endif +static long __Pyx__PyObject_Ord(PyObject* c); /*proto*/ + +//////////////////// object_ord //////////////////// + +static long __Pyx__PyObject_Ord(PyObject* c) { + Py_ssize_t size; + if (PyBytes_Check(c)) { + size = PyBytes_GET_SIZE(c); + if (likely(size == 1)) { + return (unsigned char) PyBytes_AS_STRING(c)[0]; + } +#if PY_MAJOR_VERSION < 3 + } else if (PyUnicode_Check(c)) { + return (long)__Pyx_PyUnicode_AsPy_UCS4(c); +#endif +#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) + } else if (PyByteArray_Check(c)) { + size = PyByteArray_GET_SIZE(c); + if (likely(size == 1)) { + return (unsigned char) PyByteArray_AS_STRING(c)[0]; + } +#endif + } else { + // FIXME: support character buffers - but CPython doesn't support them either + PyErr_Format(PyExc_TypeError, + "ord() expected string of length 1, but %.200s found", Py_TYPE(c)->tp_name); + return (long)(Py_UCS4)-1; + } + PyErr_Format(PyExc_TypeError, + "ord() expected a character, but string of length %zd found", size); + return (long)(Py_UCS4)-1; +} + + +//////////////////// py_dict_keys.proto //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d); /*proto*/ + +//////////////////// py_dict_keys //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) { + if (PY_MAJOR_VERSION >= 3) + return CALL_UNBOUND_METHOD(PyDict_Type, "keys", d); + else + return PyDict_Keys(d); +} + +//////////////////// py_dict_values.proto //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); /*proto*/ + +//////////////////// py_dict_values //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { + if (PY_MAJOR_VERSION >= 3) + return CALL_UNBOUND_METHOD(PyDict_Type, "values", d); + else + return PyDict_Values(d); +} + +//////////////////// py_dict_items.proto //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); /*proto*/ + +//////////////////// py_dict_items //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { + if (PY_MAJOR_VERSION >= 3) + return CALL_UNBOUND_METHOD(PyDict_Type, "items", d); + else + return PyDict_Items(d); +} + +//////////////////// py_dict_iterkeys.proto //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyDict_IterKeys(PyObject* d); /*proto*/ + +//////////////////// py_dict_iterkeys //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyDict_IterKeys(PyObject* d) { + if (PY_MAJOR_VERSION >= 3) + return CALL_UNBOUND_METHOD(PyDict_Type, "keys", d); + else + return CALL_UNBOUND_METHOD(PyDict_Type, "iterkeys", d); +} + +//////////////////// py_dict_itervalues.proto //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyDict_IterValues(PyObject* d); /*proto*/ + +//////////////////// py_dict_itervalues //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyDict_IterValues(PyObject* d) { + if (PY_MAJOR_VERSION >= 3) + return CALL_UNBOUND_METHOD(PyDict_Type, "values", d); + else + return CALL_UNBOUND_METHOD(PyDict_Type, "itervalues", d); +} + +//////////////////// py_dict_iteritems.proto //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyDict_IterItems(PyObject* d); /*proto*/ + +//////////////////// py_dict_iteritems //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyDict_IterItems(PyObject* d) { + if (PY_MAJOR_VERSION >= 3) + return CALL_UNBOUND_METHOD(PyDict_Type, "items", d); + else + return CALL_UNBOUND_METHOD(PyDict_Type, "iteritems", d); +} + +//////////////////// py_dict_viewkeys.proto //////////////////// + +#if PY_VERSION_HEX < 0x02070000 +#error This module uses dict views, which require Python 2.7 or later +#endif +static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewKeys(PyObject* d); /*proto*/ + +//////////////////// py_dict_viewkeys //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewKeys(PyObject* d) { + if (PY_MAJOR_VERSION >= 3) + return CALL_UNBOUND_METHOD(PyDict_Type, "keys", d); + else + return CALL_UNBOUND_METHOD(PyDict_Type, "viewkeys", d); +} + +//////////////////// py_dict_viewvalues.proto //////////////////// + +#if PY_VERSION_HEX < 0x02070000 +#error This module uses dict views, which require Python 2.7 or later +#endif +static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewValues(PyObject* d); /*proto*/ + +//////////////////// py_dict_viewvalues //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewValues(PyObject* d) { + if (PY_MAJOR_VERSION >= 3) + return CALL_UNBOUND_METHOD(PyDict_Type, "values", d); + else + return CALL_UNBOUND_METHOD(PyDict_Type, "viewvalues", d); +} + +//////////////////// py_dict_viewitems.proto //////////////////// + +#if PY_VERSION_HEX < 0x02070000 +#error This module uses dict views, which require Python 2.7 or later +#endif +static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewItems(PyObject* d); /*proto*/ + +//////////////////// py_dict_viewitems //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewItems(PyObject* d) { + if (PY_MAJOR_VERSION >= 3) + return CALL_UNBOUND_METHOD(PyDict_Type, "items", d); + else + return CALL_UNBOUND_METHOD(PyDict_Type, "viewitems", d); +} + + +//////////////////// pyfrozenset_new.proto //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it); + +//////////////////// pyfrozenset_new //////////////////// +//@substitute: naming + +static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) { + if (it) { + PyObject* result; +#if CYTHON_COMPILING_IN_PYPY + // PyPy currently lacks PyFrozenSet_CheckExact() and PyFrozenSet_New() + PyObject* args; + args = PyTuple_Pack(1, it); + if (unlikely(!args)) + return NULL; + result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL); + Py_DECREF(args); + return result; +#else + if (PyFrozenSet_CheckExact(it)) { + Py_INCREF(it); + return it; + } + result = PyFrozenSet_New(it); + if (unlikely(!result)) + return NULL; + if ((PY_VERSION_HEX >= 0x031000A1) || likely(PySet_GET_SIZE(result))) + return result; + // empty frozenset is a singleton (on Python <3.10) + // seems wasteful, but CPython does the same + Py_DECREF(result); +#endif + } +#if CYTHON_USE_TYPE_SLOTS + return PyFrozenSet_Type.tp_new(&PyFrozenSet_Type, $empty_tuple, NULL); +#else + return PyObject_Call((PyObject*)&PyFrozenSet_Type, $empty_tuple, NULL); +#endif +} + + +//////////////////// PySet_Update.proto //////////////////// + +static CYTHON_INLINE int __Pyx_PySet_Update(PyObject* set, PyObject* it); /*proto*/ + +//////////////////// PySet_Update //////////////////// + +static CYTHON_INLINE int __Pyx_PySet_Update(PyObject* set, PyObject* it) { + PyObject *retval; + #if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY + if (PyAnySet_Check(it)) { + if (PySet_GET_SIZE(it) == 0) + return 0; + // fast and safe case: CPython will update our result set and return it + retval = PySet_Type.tp_as_number->nb_inplace_or(set, it); + if (likely(retval == set)) { + Py_DECREF(retval); + return 0; + } + if (unlikely(!retval)) + return -1; + // unusual result, fall through to set.update() call below + Py_DECREF(retval); + } + #endif + retval = CALL_UNBOUND_METHOD(PySet_Type, "update", set, it); + if (unlikely(!retval)) return -1; + Py_DECREF(retval); + return 0; +} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CConvert.pyx b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CConvert.pyx new file mode 100644 index 00000000000..5969f6a5826 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CConvert.pyx @@ -0,0 +1,132 @@ +#################### FromPyStructUtility #################### + +cdef extern from *: + ctypedef struct PyTypeObject: + char* tp_name + PyTypeObject *Py_TYPE(obj) + bint PyMapping_Check(obj) + object PyErr_Format(exc, const char *format, ...) + +@cname("{{funcname}}") +cdef {{struct_type}} {{funcname}}(obj) except *: + cdef {{struct_type}} result + if not PyMapping_Check(obj): + PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name) + + {{for member in var_entries:}} + try: + value = obj['{{member.name}}'] + except KeyError: + raise ValueError("No value specified for struct attribute '{{member.name}}'") + result.{{member.cname}} = value + {{endfor}} + return result + + +#################### FromPyUnionUtility #################### + +cdef extern from *: + ctypedef struct PyTypeObject: + char* tp_name + PyTypeObject *Py_TYPE(obj) + bint PyMapping_Check(obj) + object PyErr_Format(exc, const char *format, ...) + +@cname("{{funcname}}") +cdef {{struct_type}} {{funcname}}(obj) except *: + cdef {{struct_type}} result + cdef Py_ssize_t length + if not PyMapping_Check(obj): + PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name) + + last_found = None + length = len(obj) + if length: + {{for member in var_entries:}} + if '{{member.name}}' in obj: + if last_found is not None: + raise ValueError("More than one union attribute passed: '%s' and '%s'" % (last_found, '{{member.name}}')) + last_found = '{{member.name}}' + result.{{member.cname}} = obj['{{member.name}}'] + length -= 1 + if not length: + return result + {{endfor}} + if last_found is None: + raise ValueError("No value specified for any of the union attributes (%s)" % + '{{", ".join(member.name for member in var_entries)}}') + return result + + +#################### cfunc.to_py #################### + +@cname("{{cname}}") +cdef object {{cname}}({{return_type.ctype}} (*f)({{ ', '.join(arg.type_cname for arg in args) }}) {{except_clause}}): + def wrap({{ ', '.join('{arg.ctype} {arg.name}'.format(arg=arg) for arg in args) }}): + """wrap({{', '.join(('{arg.name}: {arg.type_displayname}'.format(arg=arg) if arg.type_displayname else arg.name) for arg in args)}}){{if return_type.type_displayname}} -> {{return_type.type_displayname}}{{endif}}""" + {{'' if return_type.type.is_void else 'return '}}f({{ ', '.join(arg.name for arg in args) }}) + return wrap + + +#################### carray.from_py #################### + +cdef extern from *: + object PyErr_Format(exc, const char *format, ...) + +@cname("{{cname}}") +cdef int {{cname}}(object o, {{base_type}} *v, Py_ssize_t length) except -1: + cdef Py_ssize_t i = length + try: + i = len(o) + except (TypeError, OverflowError): + pass + if i == length: + for i, item in enumerate(o): + if i >= length: + break + v[i] = item + else: + i += 1 # convert index to length + if i == length: + return 0 + + PyErr_Format( + IndexError, + ("too many values found during array assignment, expected %zd" + if i >= length else + "not enough values found during array assignment, expected %zd, got %zd"), + length, i) + + +#################### carray.to_py #################### + +cdef extern from *: + void Py_INCREF(object o) + tuple PyTuple_New(Py_ssize_t size) + list PyList_New(Py_ssize_t size) + void PyTuple_SET_ITEM(object p, Py_ssize_t pos, object o) + void PyList_SET_ITEM(object p, Py_ssize_t pos, object o) + + +@cname("{{cname}}") +cdef inline list {{cname}}({{base_type}} *v, Py_ssize_t length): + cdef size_t i + cdef object value + l = PyList_New(length) + for i in range(length): + value = v[i] + Py_INCREF(value) + PyList_SET_ITEM(l, i, value) + return l + + +@cname("{{to_tuple_cname}}") +cdef inline tuple {{to_tuple_cname}}({{base_type}} *v, Py_ssize_t length): + cdef size_t i + cdef object value + t = PyTuple_New(length) + for i in range(length): + value = v[i] + Py_INCREF(value) + PyTuple_SET_ITEM(t, i, value) + return t diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CMath.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CMath.c new file mode 100644 index 00000000000..2cd22231384 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CMath.c @@ -0,0 +1,95 @@ + +/////////////// CDivisionWarning.proto /////////////// + +static int __Pyx_cdivision_warning(const char *, int); /* proto */ + +/////////////// CDivisionWarning /////////////// + +static int __Pyx_cdivision_warning(const char *filename, int lineno) { +#if CYTHON_COMPILING_IN_PYPY + // avoid compiler warnings + filename++; lineno++; + return PyErr_Warn(PyExc_RuntimeWarning, + "division with oppositely signed operands, C and Python semantics differ"); +#else + return PyErr_WarnExplicit(PyExc_RuntimeWarning, + "division with oppositely signed operands, C and Python semantics differ", + filename, + lineno, + __Pyx_MODULE_NAME, + NULL); +#endif +} + + +/////////////// DivInt.proto /////////////// + +static CYTHON_INLINE %(type)s __Pyx_div_%(type_name)s(%(type)s, %(type)s); /* proto */ + +/////////////// DivInt /////////////// + +static CYTHON_INLINE %(type)s __Pyx_div_%(type_name)s(%(type)s a, %(type)s b) { + %(type)s q = a / b; + %(type)s r = a - q*b; + q -= ((r != 0) & ((r ^ b) < 0)); + return q; +} + + +/////////////// ModInt.proto /////////////// + +static CYTHON_INLINE %(type)s __Pyx_mod_%(type_name)s(%(type)s, %(type)s); /* proto */ + +/////////////// ModInt /////////////// + +static CYTHON_INLINE %(type)s __Pyx_mod_%(type_name)s(%(type)s a, %(type)s b) { + %(type)s r = a %% b; + r += ((r != 0) & ((r ^ b) < 0)) * b; + return r; +} + + +/////////////// ModFloat.proto /////////////// + +static CYTHON_INLINE %(type)s __Pyx_mod_%(type_name)s(%(type)s, %(type)s); /* proto */ + +/////////////// ModFloat /////////////// + +static CYTHON_INLINE %(type)s __Pyx_mod_%(type_name)s(%(type)s a, %(type)s b) { + %(type)s r = fmod%(math_h_modifier)s(a, b); + r += ((r != 0) & ((r < 0) ^ (b < 0))) * b; + return r; +} + + +/////////////// IntPow.proto /////////////// + +static CYTHON_INLINE %(type)s %(func_name)s(%(type)s, %(type)s); /* proto */ + +/////////////// IntPow /////////////// + +static CYTHON_INLINE %(type)s %(func_name)s(%(type)s b, %(type)s e) { + %(type)s t = b; + switch (e) { + case 3: + t *= b; + CYTHON_FALLTHROUGH; + case 2: + t *= b; + CYTHON_FALLTHROUGH; + case 1: + return t; + case 0: + return 1; + } + #if %(signed)s + if (unlikely(e<0)) return 0; + #endif + t = 1; + while (likely(e)) { + t *= (b * (e&1)) | ((~e)&1); /* 1 or b */ + b *= b; + e >>= 1; + } + return t; +} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Capsule.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Capsule.c new file mode 100644 index 00000000000..cc4fe0d8871 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Capsule.c @@ -0,0 +1,20 @@ +//////////////// Capsule.proto //////////////// + +/* Todo: wrap the rest of the functionality in similar functions */ +static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig); + +//////////////// Capsule //////////////// + +static CYTHON_INLINE PyObject * +__pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig) +{ + PyObject *cobj; + +#if PY_VERSION_HEX >= 0x02070000 + cobj = PyCapsule_New(p, sig, NULL); +#else + cobj = PyCObject_FromVoidPtr(p, NULL); +#endif + + return cobj; +} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CommonStructures.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CommonStructures.c new file mode 100644 index 00000000000..c7945feb49c --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CommonStructures.c @@ -0,0 +1,86 @@ +/////////////// FetchCommonType.proto /////////////// + +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); + +/////////////// FetchCommonType /////////////// + +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { + PyObject* fake_module; + PyTypeObject* cached_type = NULL; + + fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); + if (!fake_module) return NULL; + Py_INCREF(fake_module); + + cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); + if (cached_type) { + if (!PyType_Check((PyObject*)cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", + type->tp_name); + goto bad; + } + if (cached_type->tp_basicsize != type->tp_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + type->tp_name); + goto bad; + } + } else { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; + PyErr_Clear(); + if (PyType_Ready(type) < 0) goto bad; + if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) + goto bad; + Py_INCREF(type); + cached_type = type; + } + +done: + Py_DECREF(fake_module); + // NOTE: always returns owned reference, or NULL on error + return cached_type; + +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; +} + + +/////////////// FetchCommonPointer.proto /////////////// + +static void* __Pyx_FetchCommonPointer(void* pointer, const char* name); + +/////////////// FetchCommonPointer /////////////// + + +static void* __Pyx_FetchCommonPointer(void* pointer, const char* name) { +#if PY_VERSION_HEX >= 0x02070000 + PyObject* fake_module = NULL; + PyObject* capsule = NULL; + void* value = NULL; + + fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); + if (!fake_module) return NULL; + Py_INCREF(fake_module); + + capsule = PyObject_GetAttrString(fake_module, name); + if (!capsule) { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; + PyErr_Clear(); + capsule = PyCapsule_New(pointer, name, NULL); + if (!capsule) goto bad; + if (PyObject_SetAttrString(fake_module, name, capsule) < 0) + goto bad; + } + value = PyCapsule_GetPointer(capsule, name); + +bad: + Py_XDECREF(capsule); + Py_DECREF(fake_module); + return value; +#else + return pointer; +#endif +} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Complex.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Complex.c new file mode 100644 index 00000000000..28062a06117 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Complex.c @@ -0,0 +1,291 @@ +/////////////// Header.proto /////////////// +//@proto_block: h_code + +#if !defined(CYTHON_CCOMPLEX) + #if defined(__cplusplus) + #define CYTHON_CCOMPLEX 1 + #elif defined(_Complex_I) + #define CYTHON_CCOMPLEX 1 + #else + #define CYTHON_CCOMPLEX 0 + #endif +#endif + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #include + #else + #include + #endif +#endif + +#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) + #undef _Complex_I + #define _Complex_I 1.0fj +#endif + + +/////////////// RealImag.proto /////////////// + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + #define __Pyx_CREAL(z) ((z).real()) + #define __Pyx_CIMAG(z) ((z).imag()) + #else + #define __Pyx_CREAL(z) (__real__(z)) + #define __Pyx_CIMAG(z) (__imag__(z)) + #endif +#else + #define __Pyx_CREAL(z) ((z).real) + #define __Pyx_CIMAG(z) ((z).imag) +#endif + +#if defined(__cplusplus) && CYTHON_CCOMPLEX \ + && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103) + #define __Pyx_SET_CREAL(z,x) ((z).real(x)) + #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) +#else + #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) + #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) +#endif + + +/////////////// Declarations.proto /////////////// +//@proto_block: complex_type_declarations + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + typedef ::std::complex< {{real_type}} > {{type_name}}; + #else + typedef {{real_type}} _Complex {{type_name}}; + #endif +#else + typedef struct { {{real_type}} real, imag; } {{type_name}}; +#endif + +static CYTHON_INLINE {{type}} {{type_name}}_from_parts({{real_type}}, {{real_type}}); + +/////////////// Declarations /////////////// + +#if CYTHON_CCOMPLEX + #ifdef __cplusplus + static CYTHON_INLINE {{type}} {{type_name}}_from_parts({{real_type}} x, {{real_type}} y) { + return ::std::complex< {{real_type}} >(x, y); + } + #else + static CYTHON_INLINE {{type}} {{type_name}}_from_parts({{real_type}} x, {{real_type}} y) { + return x + y*({{type}})_Complex_I; + } + #endif +#else + static CYTHON_INLINE {{type}} {{type_name}}_from_parts({{real_type}} x, {{real_type}} y) { + {{type}} z; + z.real = x; + z.imag = y; + return z; + } +#endif + + +/////////////// ToPy.proto /////////////// + +#define __pyx_PyComplex_FromComplex(z) \ + PyComplex_FromDoubles((double)__Pyx_CREAL(z), \ + (double)__Pyx_CIMAG(z)) + + +/////////////// FromPy.proto /////////////// + +static {{type}} __Pyx_PyComplex_As_{{type_name}}(PyObject*); + +/////////////// FromPy /////////////// + +static {{type}} __Pyx_PyComplex_As_{{type_name}}(PyObject* o) { + Py_complex cval; +#if !CYTHON_COMPILING_IN_PYPY + if (PyComplex_CheckExact(o)) + cval = ((PyComplexObject *)o)->cval; + else +#endif + cval = PyComplex_AsCComplex(o); + return {{type_name}}_from_parts( + ({{real_type}})cval.real, + ({{real_type}})cval.imag); +} + + +/////////////// Arithmetic.proto /////////////// + +#if CYTHON_CCOMPLEX + #define __Pyx_c_eq{{func_suffix}}(a, b) ((a)==(b)) + #define __Pyx_c_sum{{func_suffix}}(a, b) ((a)+(b)) + #define __Pyx_c_diff{{func_suffix}}(a, b) ((a)-(b)) + #define __Pyx_c_prod{{func_suffix}}(a, b) ((a)*(b)) + #define __Pyx_c_quot{{func_suffix}}(a, b) ((a)/(b)) + #define __Pyx_c_neg{{func_suffix}}(a) (-(a)) + #ifdef __cplusplus + #define __Pyx_c_is_zero{{func_suffix}}(z) ((z)==({{real_type}})0) + #define __Pyx_c_conj{{func_suffix}}(z) (::std::conj(z)) + #if {{is_float}} + #define __Pyx_c_abs{{func_suffix}}(z) (::std::abs(z)) + #define __Pyx_c_pow{{func_suffix}}(a, b) (::std::pow(a, b)) + #endif + #else + #define __Pyx_c_is_zero{{func_suffix}}(z) ((z)==0) + #define __Pyx_c_conj{{func_suffix}}(z) (conj{{m}}(z)) + #if {{is_float}} + #define __Pyx_c_abs{{func_suffix}}(z) (cabs{{m}}(z)) + #define __Pyx_c_pow{{func_suffix}}(a, b) (cpow{{m}}(a, b)) + #endif + #endif +#else + static CYTHON_INLINE int __Pyx_c_eq{{func_suffix}}({{type}}, {{type}}); + static CYTHON_INLINE {{type}} __Pyx_c_sum{{func_suffix}}({{type}}, {{type}}); + static CYTHON_INLINE {{type}} __Pyx_c_diff{{func_suffix}}({{type}}, {{type}}); + static CYTHON_INLINE {{type}} __Pyx_c_prod{{func_suffix}}({{type}}, {{type}}); + static CYTHON_INLINE {{type}} __Pyx_c_quot{{func_suffix}}({{type}}, {{type}}); + static CYTHON_INLINE {{type}} __Pyx_c_neg{{func_suffix}}({{type}}); + static CYTHON_INLINE int __Pyx_c_is_zero{{func_suffix}}({{type}}); + static CYTHON_INLINE {{type}} __Pyx_c_conj{{func_suffix}}({{type}}); + #if {{is_float}} + static CYTHON_INLINE {{real_type}} __Pyx_c_abs{{func_suffix}}({{type}}); + static CYTHON_INLINE {{type}} __Pyx_c_pow{{func_suffix}}({{type}}, {{type}}); + #endif +#endif + +/////////////// Arithmetic /////////////// + +#if CYTHON_CCOMPLEX +#else + static CYTHON_INLINE int __Pyx_c_eq{{func_suffix}}({{type}} a, {{type}} b) { + return (a.real == b.real) && (a.imag == b.imag); + } + static CYTHON_INLINE {{type}} __Pyx_c_sum{{func_suffix}}({{type}} a, {{type}} b) { + {{type}} z; + z.real = a.real + b.real; + z.imag = a.imag + b.imag; + return z; + } + static CYTHON_INLINE {{type}} __Pyx_c_diff{{func_suffix}}({{type}} a, {{type}} b) { + {{type}} z; + z.real = a.real - b.real; + z.imag = a.imag - b.imag; + return z; + } + static CYTHON_INLINE {{type}} __Pyx_c_prod{{func_suffix}}({{type}} a, {{type}} b) { + {{type}} z; + z.real = a.real * b.real - a.imag * b.imag; + z.imag = a.real * b.imag + a.imag * b.real; + return z; + } + + #if {{is_float}} + static CYTHON_INLINE {{type}} __Pyx_c_quot{{func_suffix}}({{type}} a, {{type}} b) { + if (b.imag == 0) { + return {{type_name}}_from_parts(a.real / b.real, a.imag / b.real); + } else if (fabs{{m}}(b.real) >= fabs{{m}}(b.imag)) { + if (b.real == 0 && b.imag == 0) { + return {{type_name}}_from_parts(a.real / b.real, a.imag / b.imag); + } else { + {{real_type}} r = b.imag / b.real; + {{real_type}} s = ({{real_type}})(1.0) / (b.real + b.imag * r); + return {{type_name}}_from_parts( + (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); + } + } else { + {{real_type}} r = b.real / b.imag; + {{real_type}} s = ({{real_type}})(1.0) / (b.imag + b.real * r); + return {{type_name}}_from_parts( + (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); + } + } + #else + static CYTHON_INLINE {{type}} __Pyx_c_quot{{func_suffix}}({{type}} a, {{type}} b) { + if (b.imag == 0) { + return {{type_name}}_from_parts(a.real / b.real, a.imag / b.real); + } else { + {{real_type}} denom = b.real * b.real + b.imag * b.imag; + return {{type_name}}_from_parts( + (a.real * b.real + a.imag * b.imag) / denom, + (a.imag * b.real - a.real * b.imag) / denom); + } + } + #endif + + static CYTHON_INLINE {{type}} __Pyx_c_neg{{func_suffix}}({{type}} a) { + {{type}} z; + z.real = -a.real; + z.imag = -a.imag; + return z; + } + static CYTHON_INLINE int __Pyx_c_is_zero{{func_suffix}}({{type}} a) { + return (a.real == 0) && (a.imag == 0); + } + static CYTHON_INLINE {{type}} __Pyx_c_conj{{func_suffix}}({{type}} a) { + {{type}} z; + z.real = a.real; + z.imag = -a.imag; + return z; + } + #if {{is_float}} + static CYTHON_INLINE {{real_type}} __Pyx_c_abs{{func_suffix}}({{type}} z) { + #if !defined(HAVE_HYPOT) || defined(_MSC_VER) + return sqrt{{m}}(z.real*z.real + z.imag*z.imag); + #else + return hypot{{m}}(z.real, z.imag); + #endif + } + static CYTHON_INLINE {{type}} __Pyx_c_pow{{func_suffix}}({{type}} a, {{type}} b) { + {{type}} z; + {{real_type}} r, lnr, theta, z_r, z_theta; + if (b.imag == 0 && b.real == (int)b.real) { + if (b.real < 0) { + {{real_type}} denom = a.real * a.real + a.imag * a.imag; + a.real = a.real / denom; + a.imag = -a.imag / denom; + b.real = -b.real; + } + switch ((int)b.real) { + case 0: + z.real = 1; + z.imag = 0; + return z; + case 1: + return a; + case 2: + return __Pyx_c_prod{{func_suffix}}(a, a); + case 3: + z = __Pyx_c_prod{{func_suffix}}(a, a); + return __Pyx_c_prod{{func_suffix}}(z, a); + case 4: + z = __Pyx_c_prod{{func_suffix}}(a, a); + return __Pyx_c_prod{{func_suffix}}(z, z); + } + } + if (a.imag == 0) { + if (a.real == 0) { + return a; + } else if (b.imag == 0) { + z.real = pow{{m}}(a.real, b.real); + z.imag = 0; + return z; + } else if (a.real > 0) { + r = a.real; + theta = 0; + } else { + r = -a.real; + theta = atan2{{m}}(0.0, -1.0); + } + } else { + r = __Pyx_c_abs{{func_suffix}}(a); + theta = atan2{{m}}(a.imag, a.real); + } + lnr = log{{m}}(r); + z_r = exp{{m}}(lnr * b.real - theta * b.imag); + z_theta = theta * b.real + lnr * b.imag; + z.real = z_r * cos{{m}}(z_theta); + z.imag = z_r * sin{{m}}(z_theta); + return z; + } + #endif +#endif diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Coroutine.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Coroutine.c new file mode 100644 index 00000000000..1ad27df2642 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Coroutine.c @@ -0,0 +1,2391 @@ +//////////////////// GeneratorYieldFrom.proto //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_Generator_Yield_From(__pyx_CoroutineObject *gen, PyObject *source); + +//////////////////// GeneratorYieldFrom //////////////////// +//@requires: Generator + +static void __PyxPyIter_CheckErrorAndDecref(PyObject *source) { + PyErr_Format(PyExc_TypeError, + "iter() returned non-iterator of type '%.100s'", + Py_TYPE(source)->tp_name); + Py_DECREF(source); +} + +static CYTHON_INLINE PyObject* __Pyx_Generator_Yield_From(__pyx_CoroutineObject *gen, PyObject *source) { + PyObject *source_gen, *retval; +#ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(source)) { + // TODO: this should only happen for types.coroutine()ed generators, but we can't determine that here + Py_INCREF(source); + source_gen = source; + retval = __Pyx_Generator_Next(source); + } else +#endif + { +#if CYTHON_USE_TYPE_SLOTS + if (likely(Py_TYPE(source)->tp_iter)) { + source_gen = Py_TYPE(source)->tp_iter(source); + if (unlikely(!source_gen)) + return NULL; + if (unlikely(!PyIter_Check(source_gen))) { + __PyxPyIter_CheckErrorAndDecref(source_gen); + return NULL; + } + } else + // CPython also allows non-iterable sequences to be iterated over +#endif + { + source_gen = PyObject_GetIter(source); + if (unlikely(!source_gen)) + return NULL; + } + // source_gen is now the iterator, make the first next() call +#if CYTHON_USE_TYPE_SLOTS + retval = Py_TYPE(source_gen)->tp_iternext(source_gen); +#else + retval = PyIter_Next(source_gen); +#endif + } + if (likely(retval)) { + gen->yieldfrom = source_gen; + return retval; + } + Py_DECREF(source_gen); + return NULL; +} + + +//////////////////// CoroutineYieldFrom.proto //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_Coroutine_Yield_From(__pyx_CoroutineObject *gen, PyObject *source); + +//////////////////// CoroutineYieldFrom //////////////////// +//@requires: Coroutine +//@requires: GetAwaitIter + +static PyObject* __Pyx__Coroutine_Yield_From_Generic(__pyx_CoroutineObject *gen, PyObject *source) { + PyObject *retval; + PyObject *source_gen = __Pyx__Coroutine_GetAwaitableIter(source); + if (unlikely(!source_gen)) { + return NULL; + } + // source_gen is now the iterator, make the first next() call + if (__Pyx_Coroutine_Check(source_gen)) { + retval = __Pyx_Generator_Next(source_gen); + } else { +#if CYTHON_USE_TYPE_SLOTS + retval = Py_TYPE(source_gen)->tp_iternext(source_gen); +#else + retval = PyIter_Next(source_gen); +#endif + } + if (retval) { + gen->yieldfrom = source_gen; + return retval; + } + Py_DECREF(source_gen); + return NULL; +} + +static CYTHON_INLINE PyObject* __Pyx_Coroutine_Yield_From(__pyx_CoroutineObject *gen, PyObject *source) { + PyObject *retval; + if (__Pyx_Coroutine_Check(source)) { + if (unlikely(((__pyx_CoroutineObject*)source)->yieldfrom)) { + PyErr_SetString( + PyExc_RuntimeError, + "coroutine is being awaited already"); + return NULL; + } + retval = __Pyx_Generator_Next(source); +#ifdef __Pyx_AsyncGen_USED + // inlined "__pyx_PyAsyncGenASend" handling to avoid the series of generic calls + } else if (__pyx_PyAsyncGenASend_CheckExact(source)) { + retval = __Pyx_async_gen_asend_iternext(source); +#endif + } else { + return __Pyx__Coroutine_Yield_From_Generic(gen, source); + } + if (retval) { + Py_INCREF(source); + gen->yieldfrom = source; + } + return retval; +} + + +//////////////////// GetAwaitIter.proto //////////////////// + +static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAwaitableIter(PyObject *o); /*proto*/ +static PyObject *__Pyx__Coroutine_GetAwaitableIter(PyObject *o); /*proto*/ + +//////////////////// GetAwaitIter //////////////////// +//@requires: ObjectHandling.c::PyObjectGetMethod +//@requires: ObjectHandling.c::PyObjectCallNoArg +//@requires: ObjectHandling.c::PyObjectCallOneArg + +static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAwaitableIter(PyObject *o) { +#ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(o)) { + return __Pyx_NewRef(o); + } +#endif + return __Pyx__Coroutine_GetAwaitableIter(o); +} + + +static void __Pyx_Coroutine_AwaitableIterError(PyObject *source) { +#if PY_VERSION_HEX >= 0x030600B3 || defined(_PyErr_FormatFromCause) + _PyErr_FormatFromCause( + PyExc_TypeError, + "'async for' received an invalid object " + "from __anext__: %.100s", + Py_TYPE(source)->tp_name); +#elif PY_MAJOR_VERSION >= 3 + PyObject *exc, *val, *val2, *tb; + assert(PyErr_Occurred()); + PyErr_Fetch(&exc, &val, &tb); + PyErr_NormalizeException(&exc, &val, &tb); + if (tb != NULL) { + PyException_SetTraceback(val, tb); + Py_DECREF(tb); + } + Py_DECREF(exc); + assert(!PyErr_Occurred()); + PyErr_Format( + PyExc_TypeError, + "'async for' received an invalid object " + "from __anext__: %.100s", + Py_TYPE(source)->tp_name); + + PyErr_Fetch(&exc, &val2, &tb); + PyErr_NormalizeException(&exc, &val2, &tb); + Py_INCREF(val); + PyException_SetCause(val2, val); + PyException_SetContext(val2, val); + PyErr_Restore(exc, val2, tb); +#else + // since Py2 does not have exception chaining, it's better to avoid shadowing exceptions there + source++; +#endif +} + +// adapted from genobject.c in Py3.5 +static PyObject *__Pyx__Coroutine_GetAwaitableIter(PyObject *obj) { + PyObject *res; +#if CYTHON_USE_ASYNC_SLOTS + __Pyx_PyAsyncMethodsStruct* am = __Pyx_PyType_AsAsync(obj); + if (likely(am && am->am_await)) { + res = (*am->am_await)(obj); + } else +#endif +#if PY_VERSION_HEX >= 0x030500B2 || defined(PyCoro_CheckExact) + if (PyCoro_CheckExact(obj)) { + return __Pyx_NewRef(obj); + } else +#endif +#if CYTHON_COMPILING_IN_CPYTHON && defined(CO_ITERABLE_COROUTINE) + if (PyGen_CheckExact(obj) && ((PyGenObject*)obj)->gi_code && ((PyCodeObject *)((PyGenObject*)obj)->gi_code)->co_flags & CO_ITERABLE_COROUTINE) { + // Python generator marked with "@types.coroutine" decorator + return __Pyx_NewRef(obj); + } else +#endif + { + PyObject *method = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, PYIDENT("__await__"), &method); + if (likely(is_method)) { + res = __Pyx_PyObject_CallOneArg(method, obj); + } else if (likely(method)) { + res = __Pyx_PyObject_CallNoArg(method); + } else + goto slot_error; + Py_DECREF(method); + } + if (unlikely(!res)) { + // surprisingly, CPython replaces the exception here... + __Pyx_Coroutine_AwaitableIterError(obj); + goto bad; + } + if (unlikely(!PyIter_Check(res))) { + PyErr_Format(PyExc_TypeError, + "__await__() returned non-iterator of type '%.100s'", + Py_TYPE(res)->tp_name); + Py_CLEAR(res); + } else { + int is_coroutine = 0; + #ifdef __Pyx_Coroutine_USED + is_coroutine |= __Pyx_Coroutine_Check(res); + #endif + #if PY_VERSION_HEX >= 0x030500B2 || defined(PyCoro_CheckExact) + is_coroutine |= PyCoro_CheckExact(res); + #endif + if (unlikely(is_coroutine)) { + /* __await__ must return an *iterator*, not + a coroutine or another awaitable (see PEP 492) */ + PyErr_SetString(PyExc_TypeError, + "__await__() returned a coroutine"); + Py_CLEAR(res); + } + } + return res; +slot_error: + PyErr_Format(PyExc_TypeError, + "object %.100s can't be used in 'await' expression", + Py_TYPE(obj)->tp_name); +bad: + return NULL; +} + + +//////////////////// AsyncIter.proto //////////////////// + +static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAsyncIter(PyObject *o); /*proto*/ +static CYTHON_INLINE PyObject *__Pyx_Coroutine_AsyncIterNext(PyObject *o); /*proto*/ + +//////////////////// AsyncIter //////////////////// +//@requires: GetAwaitIter +//@requires: ObjectHandling.c::PyObjectCallMethod0 + +static PyObject *__Pyx_Coroutine_GetAsyncIter_Generic(PyObject *obj) { +#if PY_VERSION_HEX < 0x030500B1 + { + PyObject *iter = __Pyx_PyObject_CallMethod0(obj, PYIDENT("__aiter__")); + if (likely(iter)) + return iter; + // FIXME: for the sake of a nicely conforming exception message, assume any AttributeError meant '__aiter__' + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) + return NULL; + } +#else + // avoid C warning about 'unused function' + if ((0)) (void) __Pyx_PyObject_CallMethod0(obj, PYIDENT("__aiter__")); +#endif + + PyErr_Format(PyExc_TypeError, "'async for' requires an object with __aiter__ method, got %.100s", + Py_TYPE(obj)->tp_name); + return NULL; +} + + +static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAsyncIter(PyObject *obj) { +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(obj)) { + return __Pyx_NewRef(obj); + } +#endif +#if CYTHON_USE_ASYNC_SLOTS + { + __Pyx_PyAsyncMethodsStruct* am = __Pyx_PyType_AsAsync(obj); + if (likely(am && am->am_aiter)) { + return (*am->am_aiter)(obj); + } + } +#endif + return __Pyx_Coroutine_GetAsyncIter_Generic(obj); +} + + +static PyObject *__Pyx__Coroutine_AsyncIterNext(PyObject *obj) { +#if PY_VERSION_HEX < 0x030500B1 + { + PyObject *value = __Pyx_PyObject_CallMethod0(obj, PYIDENT("__anext__")); + if (likely(value)) + return value; + } + // FIXME: for the sake of a nicely conforming exception message, assume any AttributeError meant '__anext__' + if (PyErr_ExceptionMatches(PyExc_AttributeError)) +#endif + PyErr_Format(PyExc_TypeError, "'async for' requires an object with __anext__ method, got %.100s", + Py_TYPE(obj)->tp_name); + return NULL; +} + + +static CYTHON_INLINE PyObject *__Pyx_Coroutine_AsyncIterNext(PyObject *obj) { +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(obj)) { + return __Pyx_async_gen_anext(obj); + } +#endif +#if CYTHON_USE_ASYNC_SLOTS + { + __Pyx_PyAsyncMethodsStruct* am = __Pyx_PyType_AsAsync(obj); + if (likely(am && am->am_anext)) { + return (*am->am_anext)(obj); + } + } +#endif + return __Pyx__Coroutine_AsyncIterNext(obj); +} + + +//////////////////// pep479.proto //////////////////// + +static void __Pyx_Generator_Replace_StopIteration(int in_async_gen); /*proto*/ + +//////////////////// pep479 //////////////////// +//@requires: Exceptions.c::GetException + +static void __Pyx_Generator_Replace_StopIteration(CYTHON_UNUSED int in_async_gen) { + PyObject *exc, *val, *tb, *cur_exc; + __Pyx_PyThreadState_declare + #ifdef __Pyx_StopAsyncIteration_USED + int is_async_stopiteration = 0; + #endif + + cur_exc = PyErr_Occurred(); + if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) { + #ifdef __Pyx_StopAsyncIteration_USED + if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, __Pyx_PyExc_StopAsyncIteration))) { + is_async_stopiteration = 1; + } else + #endif + return; + } + + __Pyx_PyThreadState_assign + // Chain exceptions by moving Stop(Async)Iteration to exc_info before creating the RuntimeError. + // In Py2.x, no chaining happens, but the exception still stays visible in exc_info. + __Pyx_GetException(&exc, &val, &tb); + Py_XDECREF(exc); + Py_XDECREF(val); + Py_XDECREF(tb); + PyErr_SetString(PyExc_RuntimeError, + #ifdef __Pyx_StopAsyncIteration_USED + is_async_stopiteration ? "async generator raised StopAsyncIteration" : + in_async_gen ? "async generator raised StopIteration" : + #endif + "generator raised StopIteration"); +} + + +//////////////////// CoroutineBase.proto //////////////////// +//@substitute: naming + +typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *); + +#if CYTHON_USE_EXC_INFO_STACK +// See https://bugs.python.org/issue25612 +#define __Pyx_ExcInfoStruct _PyErr_StackItem +#else +// Minimal replacement struct for Py<3.7, without the Py3.7 exception state stack. +typedef struct { + PyObject *exc_type; + PyObject *exc_value; + PyObject *exc_traceback; +} __Pyx_ExcInfoStruct; +#endif + +typedef struct { + PyObject_HEAD + __pyx_coroutine_body_t body; + PyObject *closure; + __Pyx_ExcInfoStruct gi_exc_state; + PyObject *gi_weakreflist; + PyObject *classobj; + PyObject *yieldfrom; + PyObject *gi_name; + PyObject *gi_qualname; + PyObject *gi_modulename; + PyObject *gi_code; + PyObject *gi_frame; + int resume_label; + // using T_BOOL for property below requires char value + char is_running; +} __pyx_CoroutineObject; + +static __pyx_CoroutineObject *__Pyx__Coroutine_New( + PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name); /*proto*/ + +static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( + __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name); /*proto*/ + +static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self); +static int __Pyx_Coroutine_clear(PyObject *self); /*proto*/ +static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); /*proto*/ +static PyObject *__Pyx_Coroutine_Close(PyObject *self); /*proto*/ +static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); /*proto*/ + +// macros for exception state swapping instead of inline functions to make use of the local thread state context +#if CYTHON_USE_EXC_INFO_STACK +#define __Pyx_Coroutine_SwapException(self) +#define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) +#else +#define __Pyx_Coroutine_SwapException(self) { \ + __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback); \ + __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state); \ + } +#define __Pyx_Coroutine_ResetAndClearException(self) { \ + __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback); \ + (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL; \ + } +#endif + +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyGen_FetchStopIterationValue(pvalue) \ + __Pyx_PyGen__FetchStopIterationValue($local_tstate_cname, pvalue) +#else +#define __Pyx_PyGen_FetchStopIterationValue(pvalue) \ + __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) +#endif +static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue); /*proto*/ +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state); /*proto*/ + + +//////////////////// Coroutine.proto //////////////////// + +#define __Pyx_Coroutine_USED +static PyTypeObject *__pyx_CoroutineType = 0; +static PyTypeObject *__pyx_CoroutineAwaitType = 0; +#define __Pyx_Coroutine_CheckExact(obj) (Py_TYPE(obj) == __pyx_CoroutineType) +// __Pyx_Coroutine_Check(obj): see override for IterableCoroutine below +#define __Pyx_Coroutine_Check(obj) __Pyx_Coroutine_CheckExact(obj) +#define __Pyx_CoroutineAwait_CheckExact(obj) (Py_TYPE(obj) == __pyx_CoroutineAwaitType) + +#define __Pyx_Coroutine_New(body, code, closure, name, qualname, module_name) \ + __Pyx__Coroutine_New(__pyx_CoroutineType, body, code, closure, name, qualname, module_name) + +static int __pyx_Coroutine_init(void); /*proto*/ +static PyObject *__Pyx__Coroutine_await(PyObject *coroutine); /*proto*/ + +typedef struct { + PyObject_HEAD + PyObject *coroutine; +} __pyx_CoroutineAwaitObject; + +static PyObject *__Pyx_CoroutineAwait_Close(__pyx_CoroutineAwaitObject *self, PyObject *arg); /*proto*/ +static PyObject *__Pyx_CoroutineAwait_Throw(__pyx_CoroutineAwaitObject *self, PyObject *args); /*proto*/ + + +//////////////////// Generator.proto //////////////////// + +#define __Pyx_Generator_USED +static PyTypeObject *__pyx_GeneratorType = 0; +#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType) + +#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name) \ + __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name) + +static PyObject *__Pyx_Generator_Next(PyObject *self); +static int __pyx_Generator_init(void); /*proto*/ + + +//////////////////// AsyncGen //////////////////// +//@requires: AsyncGen.c::AsyncGenerator +// -> empty, only delegates to separate file + + +//////////////////// CoroutineBase //////////////////// +//@substitute: naming +//@requires: Exceptions.c::PyErrFetchRestore +//@requires: Exceptions.c::PyThreadStateGet +//@requires: Exceptions.c::SwapException +//@requires: Exceptions.c::RaiseException +//@requires: Exceptions.c::SaveResetException +//@requires: ObjectHandling.c::PyObjectCallMethod1 +//@requires: ObjectHandling.c::PyObjectGetAttrStr +//@requires: CommonStructures.c::FetchCommonType + +#include +#include +#if PY_VERSION_HEX >= 0x030b00a6 + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif + +#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) + +// If StopIteration exception is set, fetches its 'value' +// attribute if any, otherwise sets pvalue to None. +// +// Returns 0 if no exception or StopIteration is set. +// If any other exception is set, returns -1 and leaves +// pvalue unchanged. +static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *$local_tstate_cname, PyObject **pvalue) { + PyObject *et, *ev, *tb; + PyObject *value = NULL; + + __Pyx_ErrFetch(&et, &ev, &tb); + + if (!et) { + Py_XDECREF(tb); + Py_XDECREF(ev); + Py_INCREF(Py_None); + *pvalue = Py_None; + return 0; + } + + // most common case: plain StopIteration without or with separate argument + if (likely(et == PyExc_StopIteration)) { + if (!ev) { + Py_INCREF(Py_None); + value = Py_None; + } +#if PY_VERSION_HEX >= 0x030300A0 + else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) { + value = ((PyStopIterationObject *)ev)->value; + Py_INCREF(value); + Py_DECREF(ev); + } +#endif + // PyErr_SetObject() and friends put the value directly into ev + else if (unlikely(PyTuple_Check(ev))) { + // if it's a tuple, it is interpreted as separate constructor arguments (surprise!) + if (PyTuple_GET_SIZE(ev) >= 1) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + value = PyTuple_GET_ITEM(ev, 0); + Py_INCREF(value); +#else + value = PySequence_ITEM(ev, 0); +#endif + } else { + Py_INCREF(Py_None); + value = Py_None; + } + Py_DECREF(ev); + } + else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { + // 'steal' reference to ev + value = ev; + } + if (likely(value)) { + Py_XDECREF(tb); + Py_DECREF(et); + *pvalue = value; + return 0; + } + } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + + // otherwise: normalise and check what that gives us + PyErr_NormalizeException(&et, &ev, &tb); + if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { + // looks like normalisation failed - raise the new exception + __Pyx_ErrRestore(et, ev, tb); + return -1; + } + Py_XDECREF(tb); + Py_DECREF(et); +#if PY_VERSION_HEX >= 0x030300A0 + value = ((PyStopIterationObject *)ev)->value; + Py_INCREF(value); + Py_DECREF(ev); +#else + { + PyObject* args = __Pyx_PyObject_GetAttrStr(ev, PYIDENT("args")); + Py_DECREF(ev); + if (likely(args)) { + value = PySequence_GetItem(args, 0); + Py_DECREF(args); + } + if (unlikely(!value)) { + __Pyx_ErrRestore(NULL, NULL, NULL); + Py_INCREF(Py_None); + value = Py_None; + } + } +#endif + *pvalue = value; + return 0; +} + +static CYTHON_INLINE +void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { + PyObject *t, *v, *tb; + t = exc_state->exc_type; + v = exc_state->exc_value; + tb = exc_state->exc_traceback; + + exc_state->exc_type = NULL; + exc_state->exc_value = NULL; + exc_state->exc_traceback = NULL; + + Py_XDECREF(t); + Py_XDECREF(v); + Py_XDECREF(tb); +} + +#define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) +static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) { + const char *msg; + if ((0)) { + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_Coroutine_Check((PyObject*)gen)) { + msg = "coroutine already executing"; + #endif + #ifdef __Pyx_AsyncGen_USED + } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) { + msg = "async generator already executing"; + #endif + } else { + msg = "generator already executing"; + } + PyErr_SetString(PyExc_ValueError, msg); +} + +#define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL) +static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) { + const char *msg; + if ((0)) { + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_Coroutine_Check(gen)) { + msg = "can't send non-None value to a just-started coroutine"; + #endif + #ifdef __Pyx_AsyncGen_USED + } else if (__Pyx_AsyncGen_CheckExact(gen)) { + msg = "can't send non-None value to a just-started async generator"; + #endif + } else { + msg = "can't send non-None value to a just-started generator"; + } + PyErr_SetString(PyExc_TypeError, msg); +} + +#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL) +static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) { + #ifdef __Pyx_Coroutine_USED + if (!closing && __Pyx_Coroutine_Check(gen)) { + // `self` is an exhausted coroutine: raise an error, + // except when called from gen_close(), which should + // always be a silent method. + PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine"); + } else + #endif + if (value) { + // `gen` is an exhausted generator: + // only set exception if called from send(). + #ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(gen)) + PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration); + else + #endif + PyErr_SetNone(PyExc_StopIteration); + } +} + +static +PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) { + __Pyx_PyThreadState_declare + PyThreadState *tstate; + __Pyx_ExcInfoStruct *exc_state; + PyObject *retval; + + assert(!self->is_running); + + if (unlikely(self->resume_label == 0)) { + if (unlikely(value && value != Py_None)) { + return __Pyx_Coroutine_NotStartedError((PyObject*)self); + } + } + + if (unlikely(self->resume_label == -1)) { + return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing); + } + +#if CYTHON_FAST_THREAD_STATE + __Pyx_PyThreadState_assign + tstate = $local_tstate_cname; +#else + tstate = __Pyx_PyThreadState_Current; +#endif + + // Traceback/Frame rules pre-Py3.7: + // - on entry, save external exception state in self->gi_exc_state, restore it on exit + // - on exit, keep internally generated exceptions in self->gi_exc_state, clear everything else + // - on entry, set "f_back" pointer of internal exception traceback to (current) outer call frame + // - on exit, clear "f_back" of internal exception traceback + // - do not touch external frames and tracebacks + + // Traceback/Frame rules for Py3.7+ (CYTHON_USE_EXC_INFO_STACK): + // - on entry, push internal exception state in self->gi_exc_state on the exception stack + // - on exit, keep internally generated exceptions in self->gi_exc_state, clear everything else + // - on entry, set "f_back" pointer of internal exception traceback to (current) outer call frame + // - on exit, clear "f_back" of internal exception traceback + // - do not touch external frames and tracebacks + + exc_state = &self->gi_exc_state; + if (exc_state->exc_type) { + #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON + // FIXME: what to do in PyPy? + #else + // Generators always return to their most recent caller, not + // necessarily their creator. + if (exc_state->exc_traceback) { + PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback; + PyFrameObject *f = tb->tb_frame; + + assert(f->f_back == NULL); + #if PY_VERSION_HEX >= 0x030B00A1 + // PyThreadState_GetFrame returns NULL if there isn't a current frame + // which is a valid state so no need to check + f->f_back = PyThreadState_GetFrame(tstate); + #else + Py_XINCREF(tstate->frame); + f->f_back = tstate->frame; + #endif + } + #endif + } + +#if CYTHON_USE_EXC_INFO_STACK + // See https://bugs.python.org/issue25612 + exc_state->previous_item = tstate->exc_info; + tstate->exc_info = exc_state; +#else + if (exc_state->exc_type) { + // We were in an except handler when we left, + // restore the exception state which was put aside. + __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); + // self->exc_* now holds the exception state of the caller + } else { + // save away the exception state of the caller + __Pyx_Coroutine_ExceptionClear(exc_state); + __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); + } +#endif + + self->is_running = 1; + retval = self->body((PyObject *) self, tstate, value); + self->is_running = 0; + +#if CYTHON_USE_EXC_INFO_STACK + // See https://bugs.python.org/issue25612 + exc_state = &self->gi_exc_state; + tstate->exc_info = exc_state->previous_item; + exc_state->previous_item = NULL; + // Cut off the exception frame chain so that we can reconnect it on re-entry above. + __Pyx_Coroutine_ResetFrameBackpointer(exc_state); +#endif + + return retval; +} + +static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) { + // Don't keep the reference to f_back any longer than necessary. It + // may keep a chain of frames alive or it could create a reference + // cycle. + PyObject *exc_tb = exc_state->exc_traceback; + + if (likely(exc_tb)) { +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON + // FIXME: what to do in PyPy? +#else + PyTracebackObject *tb = (PyTracebackObject *) exc_tb; + PyFrameObject *f = tb->tb_frame; + Py_CLEAR(f->f_back); +#endif + } +} + +static CYTHON_INLINE +PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) { + if (unlikely(!retval)) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (!__Pyx_PyErr_Occurred()) { + // method call must not terminate with NULL without setting an exception + PyObject *exc = PyExc_StopIteration; + #ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(gen)) + exc = __Pyx_PyExc_StopAsyncIteration; + #endif + __Pyx_PyErr_SetNone(exc); + } + } + return retval; +} + +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) +static CYTHON_INLINE +PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { +#if PY_VERSION_HEX <= 0x030A00A1 + return _PyGen_Send(gen, arg); +#else + PyObject *result; + // PyIter_Send() asserts non-NULL arg + if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) { + if (PyAsyncGen_CheckExact(gen)) { + assert(result == Py_None); + PyErr_SetNone(PyExc_StopAsyncIteration); + } + else if (result == Py_None) { + PyErr_SetNone(PyExc_StopIteration); + } + else { + _PyGen_SetStopIterationValue(result); + } + Py_CLEAR(result); + } + return result; +#endif +} +#endif + +static CYTHON_INLINE +PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) { + PyObject *ret; + PyObject *val = NULL; + __Pyx_Coroutine_Undelegate(gen); + __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val); + // val == NULL on failure => pass on exception + ret = __Pyx_Coroutine_SendEx(gen, val, 0); + Py_XDECREF(val); + return ret; +} + +static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { + PyObject *retval; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + PyObject *yf = gen->yieldfrom; + if (unlikely(gen->is_running)) + return __Pyx_Coroutine_AlreadyRunningError(gen); + if (yf) { + PyObject *ret; + // FIXME: does this really need an INCREF() ? + //Py_INCREF(yf); + gen->is_running = 1; + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Coroutine_Send(yf, value); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(yf)) { + ret = __Pyx_Coroutine_Send(yf, value); + } else + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_PyAsyncGenASend_CheckExact(yf)) { + ret = __Pyx_async_gen_asend_send(yf, value); + } else + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) + // _PyGen_Send() is not exported before Py3.6 + if (PyGen_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + } else + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) + // _PyGen_Send() is not exported before Py3.6 + if (PyCoro_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); + } else + #endif + { + if (value == Py_None) + ret = Py_TYPE(yf)->tp_iternext(yf); + else + ret = __Pyx_PyObject_CallMethod1(yf, PYIDENT("send"), value); + } + gen->is_running = 0; + //Py_DECREF(yf); + if (likely(ret)) { + return ret; + } + retval = __Pyx_Coroutine_FinishDelegation(gen); + } else { + retval = __Pyx_Coroutine_SendEx(gen, value, 0); + } + return __Pyx_Coroutine_MethodReturn(self, retval); +} + +// This helper function is used by gen_close and gen_throw to +// close a subiterator being delegated to by yield-from. +static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { + PyObject *retval = NULL; + int err = 0; + + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + retval = __Pyx_Coroutine_Close(yf); + if (!retval) + return -1; + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(yf)) { + retval = __Pyx_Coroutine_Close(yf); + if (!retval) + return -1; + } else + if (__Pyx_CoroutineAwait_CheckExact(yf)) { + retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL); + if (!retval) + return -1; + } else + #endif + #ifdef __Pyx_AsyncGen_USED + if (__pyx_PyAsyncGenASend_CheckExact(yf)) { + retval = __Pyx_async_gen_asend_close(yf, NULL); + // cannot fail + } else + if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) { + retval = __Pyx_async_gen_athrow_close(yf, NULL); + // cannot fail + } else + #endif + { + PyObject *meth; + gen->is_running = 1; + meth = __Pyx_PyObject_GetAttrStr(yf, PYIDENT("close")); + if (unlikely(!meth)) { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_WriteUnraisable(yf); + } + PyErr_Clear(); + } else { + retval = PyObject_CallFunction(meth, NULL); + Py_DECREF(meth); + if (!retval) + err = -1; + } + gen->is_running = 0; + } + Py_XDECREF(retval); + return err; +} + +static PyObject *__Pyx_Generator_Next(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; + PyObject *yf = gen->yieldfrom; + if (unlikely(gen->is_running)) + return __Pyx_Coroutine_AlreadyRunningError(gen); + if (yf) { + PyObject *ret; + // FIXME: does this really need an INCREF() ? + //Py_INCREF(yf); + // YieldFrom code ensures that yf is an iterator + gen->is_running = 1; + #ifdef __Pyx_Generator_USED + if (__Pyx_Generator_CheckExact(yf)) { + ret = __Pyx_Generator_Next(yf); + } else + #endif + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) + // _PyGen_Send() is not exported before Py3.6 + if (PyGen_CheckExact(yf)) { + ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL); + } else + #endif + #ifdef __Pyx_Coroutine_USED + if (__Pyx_Coroutine_Check(yf)) { + ret = __Pyx_Coroutine_Send(yf, Py_None); + } else + #endif + ret = Py_TYPE(yf)->tp_iternext(yf); + gen->is_running = 0; + //Py_DECREF(yf); + if (likely(ret)) { + return ret; + } + return __Pyx_Coroutine_FinishDelegation(gen); + } + return __Pyx_Coroutine_SendEx(gen, Py_None, 0); +} + +static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) { + return __Pyx_Coroutine_Close(self); +} + +static PyObject *__Pyx_Coroutine_Close(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + PyObject *retval, *raised_exception; + PyObject *yf = gen->yieldfrom; + int err = 0; + + if (unlikely(gen->is_running)) + return __Pyx_Coroutine_AlreadyRunningError(gen); + + if (yf) { + Py_INCREF(yf); + err = __Pyx_Coroutine_CloseIter(gen, yf); + __Pyx_Coroutine_Undelegate(gen); + Py_DECREF(yf); + } + if (err == 0) + PyErr_SetNone(PyExc_GeneratorExit); + retval = __Pyx_Coroutine_SendEx(gen, NULL, 1); + if (unlikely(retval)) { + const char *msg; + Py_DECREF(retval); + if ((0)) { + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_Coroutine_Check(self)) { + msg = "coroutine ignored GeneratorExit"; + #endif + #ifdef __Pyx_AsyncGen_USED + } else if (__Pyx_AsyncGen_CheckExact(self)) { +#if PY_VERSION_HEX < 0x03060000 + msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)"; +#else + msg = "async generator ignored GeneratorExit"; +#endif + #endif + } else { + msg = "generator ignored GeneratorExit"; + } + PyErr_SetString(PyExc_RuntimeError, msg); + return NULL; + } + raised_exception = PyErr_Occurred(); + if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) { + // ignore these errors + if (raised_exception) PyErr_Clear(); + Py_INCREF(Py_None); + return Py_None; + } + return NULL; +} + +static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb, + PyObject *args, int close_on_genexit) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + PyObject *yf = gen->yieldfrom; + + if (unlikely(gen->is_running)) + return __Pyx_Coroutine_AlreadyRunningError(gen); + + if (yf) { + PyObject *ret; + Py_INCREF(yf); + if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) { + // Asynchronous generators *should not* be closed right away. + // We have to allow some awaits to work it through, hence the + // `close_on_genexit` parameter here. + int err = __Pyx_Coroutine_CloseIter(gen, yf); + Py_DECREF(yf); + __Pyx_Coroutine_Undelegate(gen); + if (err < 0) + return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0)); + goto throw_here; + } + gen->is_running = 1; + if (0 + #ifdef __Pyx_Generator_USED + || __Pyx_Generator_CheckExact(yf) + #endif + #ifdef __Pyx_Coroutine_USED + || __Pyx_Coroutine_Check(yf) + #endif + ) { + ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit); + #ifdef __Pyx_Coroutine_USED + } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { + ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit); + #endif + } else { + PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, PYIDENT("throw")); + if (unlikely(!meth)) { + Py_DECREF(yf); + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { + gen->is_running = 0; + return NULL; + } + PyErr_Clear(); + __Pyx_Coroutine_Undelegate(gen); + gen->is_running = 0; + goto throw_here; + } + if (likely(args)) { + ret = PyObject_CallObject(meth, args); + } else { + // "tb" or even "val" might be NULL, but that also correctly terminates the argument list + ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL); + } + Py_DECREF(meth); + } + gen->is_running = 0; + Py_DECREF(yf); + if (!ret) { + ret = __Pyx_Coroutine_FinishDelegation(gen); + } + return __Pyx_Coroutine_MethodReturn(self, ret); + } +throw_here: + __Pyx_Raise(typ, val, tb, NULL); + return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0)); +} + +static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { + PyObject *typ; + PyObject *val = NULL; + PyObject *tb = NULL; + + if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)) + return NULL; + + return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1); +} + +static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) { + Py_VISIT(exc_state->exc_type); + Py_VISIT(exc_state->exc_value); + Py_VISIT(exc_state->exc_traceback); + return 0; +} + +static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) { + Py_VISIT(gen->closure); + Py_VISIT(gen->classobj); + Py_VISIT(gen->yieldfrom); + return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg); +} + +static int __Pyx_Coroutine_clear(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + + Py_CLEAR(gen->closure); + Py_CLEAR(gen->classobj); + Py_CLEAR(gen->yieldfrom); + __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state); +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer); + } +#endif + Py_CLEAR(gen->gi_code); + Py_CLEAR(gen->gi_frame); + Py_CLEAR(gen->gi_name); + Py_CLEAR(gen->gi_qualname); + Py_CLEAR(gen->gi_modulename); + return 0; +} + +static void __Pyx_Coroutine_dealloc(PyObject *self) { + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + + PyObject_GC_UnTrack(gen); + if (gen->gi_weakreflist != NULL) + PyObject_ClearWeakRefs(self); + + if (gen->resume_label >= 0) { + // Generator is paused or unstarted, so we need to close + PyObject_GC_Track(self); +#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE + if (PyObject_CallFinalizerFromDealloc(self)) +#else + Py_TYPE(gen)->tp_del(self); + if (Py_REFCNT(self) > 0) +#endif + { + // resurrected. :( + return; + } + PyObject_GC_UnTrack(self); + } + +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + /* We have to handle this case for asynchronous generators + right here, because this code has to be between UNTRACK + and GC_Del. */ + Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer); + } +#endif + __Pyx_Coroutine_clear(self); + PyObject_GC_Del(gen); +} + +static void __Pyx_Coroutine_del(PyObject *self) { + PyObject *error_type, *error_value, *error_traceback; + __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; + __Pyx_PyThreadState_declare + + if (gen->resume_label < 0) { + // already terminated => nothing to clean up + return; + } + +#if !CYTHON_USE_TP_FINALIZE + // Temporarily resurrect the object. + assert(self->ob_refcnt == 0); + __Pyx_SET_REFCNT(self, 1); +#endif + + __Pyx_PyThreadState_assign + + // Save the current exception, if any. + __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); + +#ifdef __Pyx_AsyncGen_USED + if (__Pyx_AsyncGen_CheckExact(self)) { + __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self; + PyObject *finalizer = agen->ag_finalizer; + if (finalizer && !agen->ag_closed) { + PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self); + if (unlikely(!res)) { + PyErr_WriteUnraisable(self); + } else { + Py_DECREF(res); + } + // Restore the saved exception. + __Pyx_ErrRestore(error_type, error_value, error_traceback); + return; + } + } +#endif + + if (unlikely(gen->resume_label == 0 && !error_value)) { +#ifdef __Pyx_Coroutine_USED +#ifdef __Pyx_Generator_USED + // only warn about (async) coroutines + if (!__Pyx_Generator_CheckExact(self)) +#endif + { + // untrack dead object as we are executing Python code (which might trigger GC) + PyObject_GC_UnTrack(self); +#if PY_MAJOR_VERSION >= 3 /* PY_VERSION_HEX >= 0x03030000*/ || defined(PyErr_WarnFormat) + if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0)) + PyErr_WriteUnraisable(self); +#else + {PyObject *msg; + char *cmsg; + #if CYTHON_COMPILING_IN_PYPY + msg = NULL; + cmsg = (char*) "coroutine was never awaited"; + #else + char *cname; + PyObject *qualname; + qualname = gen->gi_qualname; + cname = PyString_AS_STRING(qualname); + msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname); + + if (unlikely(!msg)) { + PyErr_Clear(); + cmsg = (char*) "coroutine was never awaited"; + } else { + cmsg = PyString_AS_STRING(msg); + } + #endif + if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0)) + PyErr_WriteUnraisable(self); + Py_XDECREF(msg);} +#endif + PyObject_GC_Track(self); + } +#endif /*__Pyx_Coroutine_USED*/ + } else { + PyObject *res = __Pyx_Coroutine_Close(self); + if (unlikely(!res)) { + if (PyErr_Occurred()) + PyErr_WriteUnraisable(self); + } else { + Py_DECREF(res); + } + } + + // Restore the saved exception. + __Pyx_ErrRestore(error_type, error_value, error_traceback); + +#if !CYTHON_USE_TP_FINALIZE + // Undo the temporary resurrection; can't use DECREF here, it would + // cause a recursive call. + assert(Py_REFCNT(self) > 0); + if (--self->ob_refcnt == 0) { + // this is the normal path out + return; + } + + // close() resurrected it! Make it look like the original Py_DECREF + // never happened. + { + Py_ssize_t refcnt = Py_REFCNT(self); + _Py_NewReference(self); + __Pyx_SET_REFCNT(self, refcnt); + } +#if CYTHON_COMPILING_IN_CPYTHON + assert(PyType_IS_GC(Py_TYPE(self)) && + _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); + + // If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so + // we need to undo that. + _Py_DEC_REFTOTAL; +#endif + // If Py_TRACE_REFS, _Py_NewReference re-added self to the object + // chain, so no more to do there. + // If COUNT_ALLOCS, the original decref bumped tp_frees, and + // _Py_NewReference bumped tp_allocs: both of those need to be + // undone. +#ifdef COUNT_ALLOCS + --Py_TYPE(self)->tp_frees; + --Py_TYPE(self)->tp_allocs; +#endif +#endif +} + +static PyObject * +__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) +{ + PyObject *name = self->gi_name; + // avoid NULL pointer dereference during garbage collection + if (unlikely(!name)) name = Py_None; + Py_INCREF(name); + return name; +} + +static int +__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; + +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + tmp = self->gi_name; + Py_INCREF(value); + self->gi_name = value; + Py_XDECREF(tmp); + return 0; +} + +static PyObject * +__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) +{ + PyObject *name = self->gi_qualname; + // avoid NULL pointer dereference during garbage collection + if (unlikely(!name)) name = Py_None; + Py_INCREF(name); + return name; +} + +static int +__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; + +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + tmp = self->gi_qualname; + Py_INCREF(value); + self->gi_qualname = value; + Py_XDECREF(tmp); + return 0; +} + + +static PyObject * +__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) +{ + PyObject *frame = self->gi_frame; + if (!frame) { + if (unlikely(!self->gi_code)) { + // Avoid doing something stupid, e.g. during garbage collection. + Py_RETURN_NONE; + } + frame = (PyObject *) PyFrame_New( + PyThreadState_Get(), /*PyThreadState *tstate,*/ + (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/ + $moddict_cname, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (unlikely(!frame)) + return NULL; + // keep the frame cached once it's created + self->gi_frame = frame; + } + Py_INCREF(frame); + return frame; +} + +static __pyx_CoroutineObject *__Pyx__Coroutine_New( + PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name) { + __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); + if (unlikely(!gen)) + return NULL; + return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name); +} + +static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( + __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, + PyObject *name, PyObject *qualname, PyObject *module_name) { + gen->body = body; + gen->closure = closure; + Py_XINCREF(closure); + gen->is_running = 0; + gen->resume_label = 0; + gen->classobj = NULL; + gen->yieldfrom = NULL; + gen->gi_exc_state.exc_type = NULL; + gen->gi_exc_state.exc_value = NULL; + gen->gi_exc_state.exc_traceback = NULL; +#if CYTHON_USE_EXC_INFO_STACK + gen->gi_exc_state.previous_item = NULL; +#endif + gen->gi_weakreflist = NULL; + Py_XINCREF(qualname); + gen->gi_qualname = qualname; + Py_XINCREF(name); + gen->gi_name = name; + Py_XINCREF(module_name); + gen->gi_modulename = module_name; + Py_XINCREF(code); + gen->gi_code = code; + gen->gi_frame = NULL; + + PyObject_GC_Track(gen); + return gen; +} + + +//////////////////// Coroutine //////////////////// +//@requires: CoroutineBase +//@requires: PatchGeneratorABC +//@requires: ObjectHandling.c::PyObject_GenericGetAttrNoDict + +static void __Pyx_CoroutineAwait_dealloc(PyObject *self) { + PyObject_GC_UnTrack(self); + Py_CLEAR(((__pyx_CoroutineAwaitObject*)self)->coroutine); + PyObject_GC_Del(self); +} + +static int __Pyx_CoroutineAwait_traverse(__pyx_CoroutineAwaitObject *self, visitproc visit, void *arg) { + Py_VISIT(self->coroutine); + return 0; +} + +static int __Pyx_CoroutineAwait_clear(__pyx_CoroutineAwaitObject *self) { + Py_CLEAR(self->coroutine); + return 0; +} + +static PyObject *__Pyx_CoroutineAwait_Next(__pyx_CoroutineAwaitObject *self) { + return __Pyx_Generator_Next(self->coroutine); +} + +static PyObject *__Pyx_CoroutineAwait_Send(__pyx_CoroutineAwaitObject *self, PyObject *value) { + return __Pyx_Coroutine_Send(self->coroutine, value); +} + +static PyObject *__Pyx_CoroutineAwait_Throw(__pyx_CoroutineAwaitObject *self, PyObject *args) { + return __Pyx_Coroutine_Throw(self->coroutine, args); +} + +static PyObject *__Pyx_CoroutineAwait_Close(__pyx_CoroutineAwaitObject *self, CYTHON_UNUSED PyObject *arg) { + return __Pyx_Coroutine_Close(self->coroutine); +} + +static PyObject *__Pyx_CoroutineAwait_self(PyObject *self) { + Py_INCREF(self); + return self; +} + +#if !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_CoroutineAwait_no_new(CYTHON_UNUSED PyTypeObject *type, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwargs) { + PyErr_SetString(PyExc_TypeError, "cannot instantiate type, use 'await coroutine' instead"); + return NULL; +} +#endif + +static PyMethodDef __pyx_CoroutineAwait_methods[] = { + {"send", (PyCFunction) __Pyx_CoroutineAwait_Send, METH_O, + (char*) PyDoc_STR("send(arg) -> send 'arg' into coroutine,\nreturn next yielded value or raise StopIteration.")}, + {"throw", (PyCFunction) __Pyx_CoroutineAwait_Throw, METH_VARARGS, + (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in coroutine,\nreturn next yielded value or raise StopIteration.")}, + {"close", (PyCFunction) __Pyx_CoroutineAwait_Close, METH_NOARGS, + (char*) PyDoc_STR("close() -> raise GeneratorExit inside coroutine.")}, + {0, 0, 0, 0} +}; + +static PyTypeObject __pyx_CoroutineAwaitType_type = { + PyVarObject_HEAD_INIT(0, 0) + "coroutine_wrapper", /*tp_name*/ + sizeof(__pyx_CoroutineAwaitObject), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + (destructor) __Pyx_CoroutineAwait_dealloc,/*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_as_async resp. tp_compare*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("A wrapper object implementing __await__ for coroutines."), /*tp_doc*/ + (traverseproc) __Pyx_CoroutineAwait_traverse, /*tp_traverse*/ + (inquiry) __Pyx_CoroutineAwait_clear, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + __Pyx_CoroutineAwait_self, /*tp_iter*/ + (iternextfunc) __Pyx_CoroutineAwait_Next, /*tp_iternext*/ + __pyx_CoroutineAwait_methods, /*tp_methods*/ + 0 , /*tp_members*/ + 0 , /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ +#if !CYTHON_COMPILING_IN_PYPY + __Pyx_CoroutineAwait_no_new, /*tp_new*/ +#else + 0, /*tp_new*/ +#endif + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ +#if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ +#endif +#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ +#endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 + 0, /*tp_pypy_flags*/ +#endif +}; + +#if PY_VERSION_HEX < 0x030500B1 || defined(__Pyx_IterableCoroutine_USED) || CYTHON_USE_ASYNC_SLOTS +static CYTHON_INLINE PyObject *__Pyx__Coroutine_await(PyObject *coroutine) { + __pyx_CoroutineAwaitObject *await = PyObject_GC_New(__pyx_CoroutineAwaitObject, __pyx_CoroutineAwaitType); + if (unlikely(!await)) return NULL; + Py_INCREF(coroutine); + await->coroutine = coroutine; + PyObject_GC_Track(await); + return (PyObject*)await; +} +#endif + +#if PY_VERSION_HEX < 0x030500B1 +static PyObject *__Pyx_Coroutine_await_method(PyObject *coroutine, CYTHON_UNUSED PyObject *arg) { + return __Pyx__Coroutine_await(coroutine); +} +#endif + +#if defined(__Pyx_IterableCoroutine_USED) || CYTHON_USE_ASYNC_SLOTS +static PyObject *__Pyx_Coroutine_await(PyObject *coroutine) { + if (unlikely(!coroutine || !__Pyx_Coroutine_Check(coroutine))) { + PyErr_SetString(PyExc_TypeError, "invalid input, expected coroutine"); + return NULL; + } + return __Pyx__Coroutine_await(coroutine); +} +#endif + +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1 +static PyObject *__Pyx_Coroutine_compare(PyObject *obj, PyObject *other, int op) { + PyObject* result; + switch (op) { + case Py_EQ: result = (other == obj) ? Py_True : Py_False; break; + case Py_NE: result = (other != obj) ? Py_True : Py_False; break; + default: + result = Py_NotImplemented; + } + Py_INCREF(result); + return result; +} +#endif + +static PyMethodDef __pyx_Coroutine_methods[] = { + {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, + (char*) PyDoc_STR("send(arg) -> send 'arg' into coroutine,\nreturn next iterated value or raise StopIteration.")}, + {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, + (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in coroutine,\nreturn next iterated value or raise StopIteration.")}, + {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, + (char*) PyDoc_STR("close() -> raise GeneratorExit inside coroutine.")}, +#if PY_VERSION_HEX < 0x030500B1 + {"__await__", (PyCFunction) __Pyx_Coroutine_await_method, METH_NOARGS, + (char*) PyDoc_STR("__await__() -> return an iterator to be used in await expression.")}, +#endif + {0, 0, 0, 0} +}; + +static PyMemberDef __pyx_Coroutine_memberlist[] = { + {(char *) "cr_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL}, + {(char*) "cr_await", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, + (char*) PyDoc_STR("object being awaited, or None")}, + {(char*) "cr_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL}, + {(char *) "__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), PY_WRITE_RESTRICTED, 0}, + {0, 0, 0, 0, 0} +}; + +static PyGetSetDef __pyx_Coroutine_getsets[] = { + {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, + (char*) PyDoc_STR("name of the coroutine"), 0}, + {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, + (char*) PyDoc_STR("qualified name of the coroutine"), 0}, + {(char *) "cr_frame", (getter)__Pyx_Coroutine_get_frame, NULL, + (char*) PyDoc_STR("Frame of the coroutine"), 0}, + {0, 0, 0, 0, 0} +}; + +#if CYTHON_USE_ASYNC_SLOTS +static __Pyx_PyAsyncMethodsStruct __pyx_Coroutine_as_async = { + __Pyx_Coroutine_await, /*am_await*/ + 0, /*am_aiter*/ + 0, /*am_anext*/ +#if PY_VERSION_HEX >= 0x030A00A3 + 0, /*am_send*/ +#endif +}; +#endif + +static PyTypeObject __pyx_CoroutineType_type = { + PyVarObject_HEAD_INIT(0, 0) + "coroutine", /*tp_name*/ + sizeof(__pyx_CoroutineObject), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + (destructor) __Pyx_Coroutine_dealloc,/*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ +#if CYTHON_USE_ASYNC_SLOTS + &__pyx_Coroutine_as_async, /*tp_as_async (tp_reserved) - Py3 only! */ +#else + 0, /*tp_reserved*/ +#endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ + 0, /*tp_doc*/ + (traverseproc) __Pyx_Coroutine_traverse, /*tp_traverse*/ + 0, /*tp_clear*/ +#if CYTHON_USE_ASYNC_SLOTS && CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1 + // in order to (mis-)use tp_reserved above, we must also implement tp_richcompare + __Pyx_Coroutine_compare, /*tp_richcompare*/ +#else + 0, /*tp_richcompare*/ +#endif + offsetof(__pyx_CoroutineObject, gi_weakreflist), /*tp_weaklistoffset*/ + // no tp_iter() as iterator is only available through __await__() + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_Coroutine_methods, /*tp_methods*/ + __pyx_Coroutine_memberlist, /*tp_members*/ + __pyx_Coroutine_getsets, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + 0, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ +#if CYTHON_USE_TP_FINALIZE + 0, /*tp_del*/ +#else + __Pyx_Coroutine_del, /*tp_del*/ +#endif + 0, /*tp_version_tag*/ +#if CYTHON_USE_TP_FINALIZE + __Pyx_Coroutine_del, /*tp_finalize*/ +#elif PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ +#endif +#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ +#endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 + 0, /*tp_pypy_flags*/ +#endif +}; + +static int __pyx_Coroutine_init(void) { + // on Windows, C-API functions can't be used in slots statically + __pyx_CoroutineType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + __pyx_CoroutineType = __Pyx_FetchCommonType(&__pyx_CoroutineType_type); + if (unlikely(!__pyx_CoroutineType)) + return -1; + +#ifdef __Pyx_IterableCoroutine_USED + if (unlikely(__pyx_IterableCoroutine_init() == -1)) + return -1; +#endif + + __pyx_CoroutineAwaitType = __Pyx_FetchCommonType(&__pyx_CoroutineAwaitType_type); + if (unlikely(!__pyx_CoroutineAwaitType)) + return -1; + return 0; +} + + +//////////////////// IterableCoroutine.proto //////////////////// + +#define __Pyx_IterableCoroutine_USED + +static PyTypeObject *__pyx_IterableCoroutineType = 0; + +#undef __Pyx_Coroutine_Check +#define __Pyx_Coroutine_Check(obj) (__Pyx_Coroutine_CheckExact(obj) || (Py_TYPE(obj) == __pyx_IterableCoroutineType)) + +#define __Pyx_IterableCoroutine_New(body, code, closure, name, qualname, module_name) \ + __Pyx__Coroutine_New(__pyx_IterableCoroutineType, body, code, closure, name, qualname, module_name) + +static int __pyx_IterableCoroutine_init(void);/*proto*/ + + +//////////////////// IterableCoroutine //////////////////// +//@requires: Coroutine +//@requires: CommonStructures.c::FetchCommonType + +static PyTypeObject __pyx_IterableCoroutineType_type = { + PyVarObject_HEAD_INIT(0, 0) + "iterable_coroutine", /*tp_name*/ + sizeof(__pyx_CoroutineObject), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + (destructor) __Pyx_Coroutine_dealloc,/*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ +#if CYTHON_USE_ASYNC_SLOTS + &__pyx_Coroutine_as_async, /*tp_as_async (tp_reserved) - Py3 only! */ +#else + 0, /*tp_reserved*/ +#endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ + 0, /*tp_doc*/ + (traverseproc) __Pyx_Coroutine_traverse, /*tp_traverse*/ + 0, /*tp_clear*/ +#if CYTHON_USE_ASYNC_SLOTS && CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1 + // in order to (mis-)use tp_reserved above, we must also implement tp_richcompare + __Pyx_Coroutine_compare, /*tp_richcompare*/ +#else + 0, /*tp_richcompare*/ +#endif + offsetof(__pyx_CoroutineObject, gi_weakreflist), /*tp_weaklistoffset*/ + // enable iteration for legacy support of asyncio yield-from protocol + __Pyx_Coroutine_await, /*tp_iter*/ + (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/ + __pyx_Coroutine_methods, /*tp_methods*/ + __pyx_Coroutine_memberlist, /*tp_members*/ + __pyx_Coroutine_getsets, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + 0, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ +#if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_del*/ +#else + __Pyx_Coroutine_del, /*tp_del*/ +#endif + 0, /*tp_version_tag*/ +#if PY_VERSION_HEX >= 0x030400a1 + __Pyx_Coroutine_del, /*tp_finalize*/ +#endif +#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ +#endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 + 0, /*tp_pypy_flags*/ +#endif +}; + + +static int __pyx_IterableCoroutine_init(void) { + __pyx_IterableCoroutineType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + __pyx_IterableCoroutineType = __Pyx_FetchCommonType(&__pyx_IterableCoroutineType_type); + if (unlikely(!__pyx_IterableCoroutineType)) + return -1; + return 0; +} + + +//////////////////// Generator //////////////////// +//@requires: CoroutineBase +//@requires: PatchGeneratorABC +//@requires: ObjectHandling.c::PyObject_GenericGetAttrNoDict + +static PyMethodDef __pyx_Generator_methods[] = { + {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, + (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, + {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, + (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, + {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, + (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, + {0, 0, 0, 0} +}; + +static PyMemberDef __pyx_Generator_memberlist[] = { + {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL}, + {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, + (char*) PyDoc_STR("object being iterated by 'yield from', or None")}, + {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL}, + {0, 0, 0, 0, 0} +}; + +static PyGetSetDef __pyx_Generator_getsets[] = { + {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, + (char*) PyDoc_STR("name of the generator"), 0}, + {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, + (char*) PyDoc_STR("qualified name of the generator"), 0}, + {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL, + (char*) PyDoc_STR("Frame of the generator"), 0}, + {0, 0, 0, 0, 0} +}; + +static PyTypeObject __pyx_GeneratorType_type = { + PyVarObject_HEAD_INIT(0, 0) + "generator", /*tp_name*/ + sizeof(__pyx_CoroutineObject), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + (destructor) __Pyx_Coroutine_dealloc,/*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare / tp_as_async*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ + 0, /*tp_doc*/ + (traverseproc) __Pyx_Coroutine_traverse, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + offsetof(__pyx_CoroutineObject, gi_weakreflist), /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/ + __pyx_Generator_methods, /*tp_methods*/ + __pyx_Generator_memberlist, /*tp_members*/ + __pyx_Generator_getsets, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + 0, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ +#if CYTHON_USE_TP_FINALIZE + 0, /*tp_del*/ +#else + __Pyx_Coroutine_del, /*tp_del*/ +#endif + 0, /*tp_version_tag*/ +#if CYTHON_USE_TP_FINALIZE + __Pyx_Coroutine_del, /*tp_finalize*/ +#elif PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ +#endif +#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ +#endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 + 0, /*tp_pypy_flags*/ +#endif +}; + +static int __pyx_Generator_init(void) { + // on Windows, C-API functions can't be used in slots statically + __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; + __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; + + __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type); + if (unlikely(!__pyx_GeneratorType)) { + return -1; + } + return 0; +} + + +/////////////// ReturnWithStopIteration.proto /////////////// + +#define __Pyx_ReturnWithStopIteration(value) \ + if (value == Py_None) PyErr_SetNone(PyExc_StopIteration); else __Pyx__ReturnWithStopIteration(value) +static void __Pyx__ReturnWithStopIteration(PyObject* value); /*proto*/ + +/////////////// ReturnWithStopIteration /////////////// +//@requires: Exceptions.c::PyErrFetchRestore +//@requires: Exceptions.c::PyThreadStateGet +//@substitute: naming + +// 1) Instantiating an exception just to pass back a value is costly. +// 2) CPython 3.3 <= x < 3.5b1 crash in yield-from when the StopIteration is not instantiated. +// 3) Passing a tuple as value into PyErr_SetObject() passes its items on as arguments. +// 4) Passing an exception as value will interpret it as an exception on unpacking and raise it (or unpack its value). +// 5) If there is currently an exception being handled, we need to chain it. + +static void __Pyx__ReturnWithStopIteration(PyObject* value) { + PyObject *exc, *args; +#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_PYSTON + __Pyx_PyThreadState_declare + if ((PY_VERSION_HEX >= 0x03030000 && PY_VERSION_HEX < 0x030500B1) + || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) { + args = PyTuple_New(1); + if (unlikely(!args)) return; + Py_INCREF(value); + PyTuple_SET_ITEM(args, 0, value); + exc = PyType_Type.tp_call(PyExc_StopIteration, args, NULL); + Py_DECREF(args); + if (!exc) return; + } else { + // it's safe to avoid instantiating the exception + Py_INCREF(value); + exc = value; + } + #if CYTHON_FAST_THREAD_STATE + __Pyx_PyThreadState_assign + #if CYTHON_USE_EXC_INFO_STACK + if (!$local_tstate_cname->exc_info->exc_type) + #else + if (!$local_tstate_cname->exc_type) + #endif + { + // no chaining needed => avoid the overhead in PyErr_SetObject() + Py_INCREF(PyExc_StopIteration); + __Pyx_ErrRestore(PyExc_StopIteration, exc, NULL); + return; + } + #endif +#else + args = PyTuple_Pack(1, value); + if (unlikely(!args)) return; + exc = PyObject_Call(PyExc_StopIteration, args, NULL); + Py_DECREF(args); + if (unlikely(!exc)) return; +#endif + PyErr_SetObject(PyExc_StopIteration, exc); + Py_DECREF(exc); +} + + +//////////////////// PatchModuleWithCoroutine.proto //////////////////// + +static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code); /*proto*/ + +//////////////////// PatchModuleWithCoroutine //////////////////// +//@substitute: naming + +static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) { +#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) + int result; + PyObject *globals, *result_obj; + globals = PyDict_New(); if (unlikely(!globals)) goto ignore; + result = PyDict_SetItemString(globals, "_cython_coroutine_type", + #ifdef __Pyx_Coroutine_USED + (PyObject*)__pyx_CoroutineType); + #else + Py_None); + #endif + if (unlikely(result < 0)) goto ignore; + result = PyDict_SetItemString(globals, "_cython_generator_type", + #ifdef __Pyx_Generator_USED + (PyObject*)__pyx_GeneratorType); + #else + Py_None); + #endif + if (unlikely(result < 0)) goto ignore; + if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore; + if (unlikely(PyDict_SetItemString(globals, "__builtins__", $builtins_cname) < 0)) goto ignore; + result_obj = PyRun_String(py_code, Py_file_input, globals, globals); + if (unlikely(!result_obj)) goto ignore; + Py_DECREF(result_obj); + Py_DECREF(globals); + return module; + +ignore: + Py_XDECREF(globals); + PyErr_WriteUnraisable(module); + if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) { + Py_DECREF(module); + module = NULL; + } +#else + // avoid "unused" warning + py_code++; +#endif + return module; +} + + +//////////////////// PatchGeneratorABC.proto //////////////////// + +// register with Generator/Coroutine ABCs in 'collections.abc' +// see https://bugs.python.org/issue24018 +static int __Pyx_patch_abc(void); /*proto*/ + +//////////////////// PatchGeneratorABC //////////////////// +//@requires: PatchModuleWithCoroutine + +#ifndef CYTHON_REGISTER_ABCS +#define CYTHON_REGISTER_ABCS 1 +#endif + +#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) +static PyObject* __Pyx_patch_abc_module(PyObject *module); /*proto*/ +static PyObject* __Pyx_patch_abc_module(PyObject *module) { + module = __Pyx_Coroutine_patch_module( + module, CSTRING("""\ +if _cython_generator_type is not None: + try: Generator = _module.Generator + except AttributeError: pass + else: Generator.register(_cython_generator_type) +if _cython_coroutine_type is not None: + try: Coroutine = _module.Coroutine + except AttributeError: pass + else: Coroutine.register(_cython_coroutine_type) +""") + ); + return module; +} +#endif + +static int __Pyx_patch_abc(void) { +#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) + static int abc_patched = 0; + if (CYTHON_REGISTER_ABCS && !abc_patched) { + PyObject *module; + module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections"); + if (!module) { + PyErr_WriteUnraisable(NULL); + if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, + ((PY_MAJOR_VERSION >= 3) ? + "Cython module failed to register with collections.abc module" : + "Cython module failed to register with collections module"), 1) < 0)) { + return -1; + } + } else { + module = __Pyx_patch_abc_module(module); + abc_patched = 1; + if (unlikely(!module)) + return -1; + Py_DECREF(module); + } + // also register with "backports_abc" module if available, just in case + module = PyImport_ImportModule("backports_abc"); + if (module) { + module = __Pyx_patch_abc_module(module); + Py_XDECREF(module); + } + if (!module) { + PyErr_Clear(); + } + } +#else + // avoid "unused" warning for __Pyx_Coroutine_patch_module() + if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL); +#endif + return 0; +} + + +//////////////////// PatchAsyncIO.proto //////////////////// + +// run after importing "asyncio" to patch Cython generator support into it +static PyObject* __Pyx_patch_asyncio(PyObject* module); /*proto*/ + +//////////////////// PatchAsyncIO //////////////////// +//@requires: ImportExport.c::Import +//@requires: PatchModuleWithCoroutine +//@requires: PatchInspect + +static PyObject* __Pyx_patch_asyncio(PyObject* module) { +#if PY_VERSION_HEX < 0x030500B2 && \ + (defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED)) && \ + (!defined(CYTHON_PATCH_ASYNCIO) || CYTHON_PATCH_ASYNCIO) + PyObject *patch_module = NULL; + static int asyncio_patched = 0; + if (unlikely((!asyncio_patched) && module)) { + PyObject *package; + package = __Pyx_Import(PYIDENT("asyncio.coroutines"), NULL, 0); + if (package) { + patch_module = __Pyx_Coroutine_patch_module( + PyObject_GetAttrString(package, "coroutines"), CSTRING("""\ +try: + coro_types = _module._COROUTINE_TYPES +except AttributeError: pass +else: + if _cython_coroutine_type is not None and _cython_coroutine_type not in coro_types: + coro_types = tuple(coro_types) + (_cython_coroutine_type,) + if _cython_generator_type is not None and _cython_generator_type not in coro_types: + coro_types = tuple(coro_types) + (_cython_generator_type,) +_module._COROUTINE_TYPES = coro_types +""") + ); + } else { + PyErr_Clear(); +// Always enable fallback: even if we compile against 3.4.2, we might be running on 3.4.1 at some point. +//#if PY_VERSION_HEX < 0x03040200 + // Py3.4.1 used to have asyncio.tasks instead of asyncio.coroutines + package = __Pyx_Import(PYIDENT("asyncio.tasks"), NULL, 0); + if (unlikely(!package)) goto asyncio_done; + patch_module = __Pyx_Coroutine_patch_module( + PyObject_GetAttrString(package, "tasks"), CSTRING("""\ +if hasattr(_module, 'iscoroutine'): + old_types = getattr(_module.iscoroutine, '_cython_coroutine_types', None) + if old_types is None or not isinstance(old_types, set): + old_types = set() + def cy_wrap(orig_func, type=type, cython_coroutine_types=old_types): + def cy_iscoroutine(obj): return type(obj) in cython_coroutine_types or orig_func(obj) + cy_iscoroutine._cython_coroutine_types = cython_coroutine_types + return cy_iscoroutine + _module.iscoroutine = cy_wrap(_module.iscoroutine) + if _cython_coroutine_type is not None: + old_types.add(_cython_coroutine_type) + if _cython_generator_type is not None: + old_types.add(_cython_generator_type) +""") + ); +//#endif +// Py < 0x03040200 + } + Py_DECREF(package); + if (unlikely(!patch_module)) goto ignore; +//#if PY_VERSION_HEX < 0x03040200 +asyncio_done: + PyErr_Clear(); +//#endif + asyncio_patched = 1; +#ifdef __Pyx_Generator_USED + // now patch inspect.isgenerator() by looking up the imported module in the patched asyncio module + { + PyObject *inspect_module; + if (patch_module) { + inspect_module = PyObject_GetAttr(patch_module, PYIDENT("inspect")); + Py_DECREF(patch_module); + } else { + inspect_module = __Pyx_Import(PYIDENT("inspect"), NULL, 0); + } + if (unlikely(!inspect_module)) goto ignore; + inspect_module = __Pyx_patch_inspect(inspect_module); + if (unlikely(!inspect_module)) { + Py_DECREF(module); + module = NULL; + } + Py_XDECREF(inspect_module); + } +#else + // avoid "unused" warning for __Pyx_patch_inspect() + if ((0)) return __Pyx_patch_inspect(module); +#endif + } + return module; +ignore: + PyErr_WriteUnraisable(module); + if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch asyncio package with custom generator type", 1) < 0)) { + Py_DECREF(module); + module = NULL; + } +#else + // avoid "unused" warning for __Pyx_Coroutine_patch_module() + if ((0)) return __Pyx_patch_inspect(__Pyx_Coroutine_patch_module(module, NULL)); +#endif + return module; +} + + +//////////////////// PatchInspect.proto //////////////////// + +// run after importing "inspect" to patch Cython generator support into it +static PyObject* __Pyx_patch_inspect(PyObject* module); /*proto*/ + +//////////////////// PatchInspect //////////////////// +//@requires: PatchModuleWithCoroutine + +static PyObject* __Pyx_patch_inspect(PyObject* module) { +#if defined(__Pyx_Generator_USED) && (!defined(CYTHON_PATCH_INSPECT) || CYTHON_PATCH_INSPECT) + static int inspect_patched = 0; + if (unlikely((!inspect_patched) && module)) { + module = __Pyx_Coroutine_patch_module( + module, CSTRING("""\ +old_types = getattr(_module.isgenerator, '_cython_generator_types', None) +if old_types is None or not isinstance(old_types, set): + old_types = set() + def cy_wrap(orig_func, type=type, cython_generator_types=old_types): + def cy_isgenerator(obj): return type(obj) in cython_generator_types or orig_func(obj) + cy_isgenerator._cython_generator_types = cython_generator_types + return cy_isgenerator + _module.isgenerator = cy_wrap(_module.isgenerator) +old_types.add(_cython_generator_type) +""") + ); + inspect_patched = 1; + } +#else + // avoid "unused" warning for __Pyx_Coroutine_patch_module() + if ((0)) return __Pyx_Coroutine_patch_module(module, NULL); +#endif + return module; +} + + +//////////////////// StopAsyncIteration.proto //////////////////// + +#define __Pyx_StopAsyncIteration_USED +static PyObject *__Pyx_PyExc_StopAsyncIteration; +static int __pyx_StopAsyncIteration_init(void); /*proto*/ + +//////////////////// StopAsyncIteration //////////////////// + +#if PY_VERSION_HEX < 0x030500B1 +static PyTypeObject __Pyx__PyExc_StopAsyncIteration_type = { + PyVarObject_HEAD_INIT(0, 0) + "StopAsyncIteration", /*tp_name*/ + sizeof(PyBaseExceptionObject), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + 0, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ + 0, /*tp_compare / reserved*/ + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + 0, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + PyDoc_STR("Signal the end from iterator.__anext__()."), /*tp_doc*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + 0, /*tp_members*/ + 0, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + 0, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + 0, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ +#if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000 + 0, /*tp_pypy_flags*/ +#endif +}; +#endif + +static int __pyx_StopAsyncIteration_init(void) { +#if PY_VERSION_HEX >= 0x030500B1 + __Pyx_PyExc_StopAsyncIteration = PyExc_StopAsyncIteration; +#else + PyObject *builtins = PyEval_GetBuiltins(); + if (likely(builtins)) { + PyObject *exc = PyMapping_GetItemString(builtins, (char*) "StopAsyncIteration"); + if (exc) { + __Pyx_PyExc_StopAsyncIteration = exc; + return 0; + } + } + PyErr_Clear(); + + __Pyx__PyExc_StopAsyncIteration_type.tp_traverse = ((PyTypeObject*)PyExc_BaseException)->tp_traverse; + __Pyx__PyExc_StopAsyncIteration_type.tp_clear = ((PyTypeObject*)PyExc_BaseException)->tp_clear; + __Pyx__PyExc_StopAsyncIteration_type.tp_dictoffset = ((PyTypeObject*)PyExc_BaseException)->tp_dictoffset; + __Pyx__PyExc_StopAsyncIteration_type.tp_base = (PyTypeObject*)PyExc_Exception; + + __Pyx_PyExc_StopAsyncIteration = (PyObject*) __Pyx_FetchCommonType(&__Pyx__PyExc_StopAsyncIteration_type); + if (unlikely(!__Pyx_PyExc_StopAsyncIteration)) + return -1; + if (builtins && unlikely(PyMapping_SetItemString(builtins, (char*) "StopAsyncIteration", __Pyx_PyExc_StopAsyncIteration) < 0)) + return -1; +#endif + return 0; +} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CpdefEnums.pyx b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CpdefEnums.pyx new file mode 100644 index 00000000000..148d776c29c --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CpdefEnums.pyx @@ -0,0 +1,66 @@ +#################### EnumBase #################### + +cimport cython + +cdef extern from *: + int PY_VERSION_HEX + +cdef object __Pyx_OrderedDict +if PY_VERSION_HEX >= 0x02070000: + from collections import OrderedDict as __Pyx_OrderedDict +else: + __Pyx_OrderedDict = dict + +@cython.internal +cdef class __Pyx_EnumMeta(type): + def __init__(cls, name, parents, dct): + type.__init__(cls, name, parents, dct) + cls.__members__ = __Pyx_OrderedDict() + def __iter__(cls): + return iter(cls.__members__.values()) + def __getitem__(cls, name): + return cls.__members__[name] + +# @cython.internal +cdef object __Pyx_EnumBase +class __Pyx_EnumBase(int): + __metaclass__ = __Pyx_EnumMeta + def __new__(cls, value, name=None): + for v in cls: + if v == value: + return v + if name is None: + raise ValueError("Unknown enum value: '%s'" % value) + res = int.__new__(cls, value) + res.name = name + setattr(cls, name, res) + cls.__members__[name] = res + return res + def __repr__(self): + return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self) + def __str__(self): + return "%s.%s" % (self.__class__.__name__, self.name) + +if PY_VERSION_HEX >= 0x03040000: + from enum import IntEnum as __Pyx_EnumBase + +#################### EnumType #################### +#@requires: EnumBase + +cdef dict __Pyx_globals = globals() +if PY_VERSION_HEX >= 0x03040000: + # create new IntEnum() + {{name}} = __Pyx_EnumBase('{{name}}', __Pyx_OrderedDict([ + {{for item in items}} + ('{{item}}', {{item}}), + {{endfor}} + ])) + {{for item in items}} + __Pyx_globals['{{item}}'] = {{name}}.{{item}} + {{endfor}} +else: + class {{name}}(__Pyx_EnumBase): + pass + {{for item in items}} + __Pyx_globals['{{item}}'] = {{name}}({{item}}, '{{item}}') + {{endfor}} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CppConvert.pyx b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CppConvert.pyx new file mode 100644 index 00000000000..03360e51047 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CppConvert.pyx @@ -0,0 +1,237 @@ +# TODO: Figure out how many of the pass-by-value copies the compiler can eliminate. + + +#################### string.from_py #################### + +cdef extern from *: + cdef cppclass string "{{type}}": + string() + string(char* c_str, size_t size) + cdef const char* __Pyx_PyObject_AsStringAndSize(object, Py_ssize_t*) except NULL + +@cname("{{cname}}") +cdef string {{cname}}(object o) except *: + cdef Py_ssize_t length = 0 + cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length) + return string(data, length) + + +#################### string.to_py #################### + +#cimport cython +#from libcpp.string cimport string +cdef extern from *: + cdef cppclass string "{{type}}": + char* data() + size_t size() + +{{for py_type in ['PyObject', 'PyUnicode', 'PyStr', 'PyBytes', 'PyByteArray']}} +cdef extern from *: + cdef object __Pyx_{{py_type}}_FromStringAndSize(const char*, size_t) + +@cname("{{cname.replace("PyObject", py_type, 1)}}") +cdef inline object {{cname.replace("PyObject", py_type, 1)}}(const string& s): + return __Pyx_{{py_type}}_FromStringAndSize(s.data(), s.size()) +{{endfor}} + + +#################### vector.from_py #################### + +cdef extern from *: + cdef cppclass vector "std::vector" [T]: + void push_back(T&) + +@cname("{{cname}}") +cdef vector[X] {{cname}}(object o) except *: + cdef vector[X] v + for item in o: + v.push_back(item) + return v + + +#################### vector.to_py #################### + +cdef extern from *: + cdef cppclass vector "const std::vector" [T]: + size_t size() + T& operator[](size_t) + +@cname("{{cname}}") +cdef object {{cname}}(vector[X]& v): + return [v[i] for i in range(v.size())] + + +#################### list.from_py #################### + +cdef extern from *: + cdef cppclass cpp_list "std::list" [T]: + void push_back(T&) + +@cname("{{cname}}") +cdef cpp_list[X] {{cname}}(object o) except *: + cdef cpp_list[X] l + for item in o: + l.push_back(item) + return l + + +#################### list.to_py #################### + +cimport cython + +cdef extern from *: + cdef cppclass cpp_list "std::list" [T]: + cppclass const_iterator: + T& operator*() + const_iterator operator++() + bint operator!=(const_iterator) + const_iterator begin() + const_iterator end() + +@cname("{{cname}}") +cdef object {{cname}}(const cpp_list[X]& v): + o = [] + cdef cpp_list[X].const_iterator iter = v.begin() + while iter != v.end(): + o.append(cython.operator.dereference(iter)) + cython.operator.preincrement(iter) + return o + + +#################### set.from_py #################### + +cdef extern from *: + cdef cppclass set "std::{{maybe_unordered}}set" [T]: + void insert(T&) + +@cname("{{cname}}") +cdef set[X] {{cname}}(object o) except *: + cdef set[X] s + for item in o: + s.insert(item) + return s + + +#################### set.to_py #################### + +cimport cython + +cdef extern from *: + cdef cppclass cpp_set "std::{{maybe_unordered}}set" [T]: + cppclass const_iterator: + T& operator*() + const_iterator operator++() + bint operator!=(const_iterator) + const_iterator begin() + const_iterator end() + +@cname("{{cname}}") +cdef object {{cname}}(const cpp_set[X]& s): + o = set() + cdef cpp_set[X].const_iterator iter = s.begin() + while iter != s.end(): + o.add(cython.operator.dereference(iter)) + cython.operator.preincrement(iter) + return o + +#################### pair.from_py #################### + +cdef extern from *: + cdef cppclass pair "std::pair" [T, U]: + pair() + pair(T&, U&) + +@cname("{{cname}}") +cdef pair[X,Y] {{cname}}(object o) except *: + x, y = o + return pair[X,Y](x, y) + + +#################### pair.to_py #################### + +cdef extern from *: + cdef cppclass pair "std::pair" [T, U]: + T first + U second + +@cname("{{cname}}") +cdef object {{cname}}(const pair[X,Y]& p): + return p.first, p.second + + +#################### map.from_py #################### + +cdef extern from *: + cdef cppclass pair "std::pair" [T, U]: + pair(T&, U&) + cdef cppclass map "std::{{maybe_unordered}}map" [T, U]: + void insert(pair[T, U]&) + cdef cppclass vector "std::vector" [T]: + pass + + +@cname("{{cname}}") +cdef map[X,Y] {{cname}}(object o) except *: + cdef dict d = o + cdef map[X,Y] m + for key, value in d.iteritems(): + m.insert(pair[X,Y](key, value)) + return m + + +#################### map.to_py #################### +# TODO: Work out const so that this can take a const +# reference rather than pass by value. + +cimport cython + +cdef extern from *: + cdef cppclass map "std::{{maybe_unordered}}map" [T, U]: + cppclass value_type: + T first + U second + cppclass const_iterator: + value_type& operator*() + const_iterator operator++() + bint operator!=(const_iterator) + const_iterator begin() + const_iterator end() + +@cname("{{cname}}") +cdef object {{cname}}(const map[X,Y]& s): + o = {} + cdef const map[X,Y].value_type *key_value + cdef map[X,Y].const_iterator iter = s.begin() + while iter != s.end(): + key_value = &cython.operator.dereference(iter) + o[key_value.first] = key_value.second + cython.operator.preincrement(iter) + return o + + +#################### complex.from_py #################### + +cdef extern from *: + cdef cppclass std_complex "std::complex" [T]: + std_complex() + std_complex(T, T) except + + +@cname("{{cname}}") +cdef std_complex[X] {{cname}}(object o) except *: + cdef double complex z = o + return std_complex[X](z.real, z.imag) + + +#################### complex.to_py #################### + +cdef extern from *: + cdef cppclass std_complex "std::complex" [T]: + X real() + X imag() + +@cname("{{cname}}") +cdef object {{cname}}(const std_complex[X]& z): + cdef double complex tmp + tmp.real = z.real() + tmp.imag = z.imag() + return tmp diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CythonFunction.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CythonFunction.c new file mode 100644 index 00000000000..b2c67dcce0d --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CythonFunction.c @@ -0,0 +1,1339 @@ + +//////////////////// CythonFunctionShared.proto //////////////////// + +#define __Pyx_CyFunction_USED 1 + +#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 +#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 +#define __Pyx_CYFUNCTION_CCLASS 0x04 + +#define __Pyx_CyFunction_GetClosure(f) \ + (((__pyx_CyFunctionObject *) (f))->func_closure) +#define __Pyx_CyFunction_GetClassObj(f) \ + (((__pyx_CyFunctionObject *) (f))->func_classobj) + +#define __Pyx_CyFunction_Defaults(type, f) \ + ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) +#define __Pyx_CyFunction_SetDefaultsGetter(f, g) \ + ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) + + +typedef struct { + PyCFunctionObject func; +#if PY_VERSION_HEX < 0x030500A0 + PyObject *func_weakreflist; +#endif + PyObject *func_dict; + PyObject *func_name; + PyObject *func_qualname; + PyObject *func_doc; + PyObject *func_globals; + PyObject *func_code; + PyObject *func_closure; + // No-args super() class cell + PyObject *func_classobj; + + // Dynamic default args and annotations + void *defaults; + int defaults_pyobjects; + size_t defaults_size; // used by FusedFunction for copying defaults + int flags; + + // Defaults info + PyObject *defaults_tuple; /* Const defaults tuple */ + PyObject *defaults_kwdict; /* Const kwonly defaults dict */ + PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; /* function annotations dict */ +} __pyx_CyFunctionObject; + +static PyTypeObject *__pyx_CyFunctionType = 0; + +#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) + +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *self, + PyObject *module, PyObject *globals, + PyObject* code); + +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, + size_t size, + int pyobjects); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, + PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); + + +static int __pyx_CyFunction_init(void); + + +//////////////////// CythonFunctionShared //////////////////// +//@substitute: naming +//@requires: CommonStructures.c::FetchCommonType +////@requires: ObjectHandling.c::PyObjectGetAttrStr + +#include + +static PyObject * +__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) +{ + if (unlikely(op->func_doc == NULL)) { + if (op->func.m_ml->ml_doc) { +#if PY_MAJOR_VERSION >= 3 + op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); +#else + op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); +#endif + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } + } + Py_INCREF(op->func_doc); + return op->func_doc; +} + +static int +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp = op->func_doc; + if (value == NULL) { + // Mark as deleted + value = Py_None; + } + Py_INCREF(value); + op->func_doc = value; + Py_XDECREF(tmp); + return 0; +} + +static PyObject * +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + if (unlikely(op->func_name == NULL)) { +#if PY_MAJOR_VERSION >= 3 + op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); +#else + op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); +#endif + if (unlikely(op->func_name == NULL)) + return NULL; + } + Py_INCREF(op->func_name); + return op->func_name; +} + +static int +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; + +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__name__ must be set to a string object"); + return -1; + } + tmp = op->func_name; + Py_INCREF(value); + op->func_name = value; + Py_XDECREF(tmp); + return 0; +} + +static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(op->func_qualname); + return op->func_qualname; +} + +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; + +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) +#else + if (unlikely(value == NULL || !PyString_Check(value))) +#endif + { + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + tmp = op->func_qualname; + Py_INCREF(value); + op->func_qualname = value; + Py_XDECREF(tmp); + return 0; +} + +static PyObject * +__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) +{ + PyObject *self; + + self = m->func_closure; + if (self == NULL) + self = Py_None; + Py_INCREF(self); + return self; +} + +static PyObject * +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + if (unlikely(op->func_dict == NULL)) { + op->func_dict = PyDict_New(); + if (unlikely(op->func_dict == NULL)) + return NULL; + } + Py_INCREF(op->func_dict); + return op->func_dict; +} + +static int +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) +{ + PyObject *tmp; + + if (unlikely(value == NULL)) { + PyErr_SetString(PyExc_TypeError, + "function's dictionary may not be deleted"); + return -1; + } + if (unlikely(!PyDict_Check(value))) { + PyErr_SetString(PyExc_TypeError, + "setting function's dictionary to a non-dict"); + return -1; + } + tmp = op->func_dict; + Py_INCREF(value); + op->func_dict = value; + Py_XDECREF(tmp); + return 0; +} + +static PyObject * +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(op->func_globals); + return op->func_globals; +} + +static PyObject * +__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + Py_INCREF(Py_None); + return Py_None; +} + +static PyObject * +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) +{ + PyObject* result = (op->func_code) ? op->func_code : Py_None; + Py_INCREF(result); + return result; +} + +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + int result = 0; + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + + // Cache result + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + #else + op->defaults_tuple = PySequence_ITEM(res, 0); + if (unlikely(!op->defaults_tuple)) result = -1; + else { + op->defaults_kwdict = PySequence_ITEM(res, 1); + if (unlikely(!op->defaults_kwdict)) result = -1; + } + #endif + Py_DECREF(res); + return result; +} + +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value) { + // del => explicit None to prevent rebuilding + value = Py_None; + } else if (value != Py_None && !PyTuple_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_tuple; + op->defaults_tuple = value; + Py_XDECREF(tmp); + return 0; +} + +static PyObject * +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} + +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value) { + // del => explicit None to prevent rebuilding + value = Py_None; + } else if (value != Py_None && !PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_kwdict; + op->defaults_kwdict = value; + Py_XDECREF(tmp); + return 0; +} + +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} + +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { + PyObject* tmp; + if (!value || value == Py_None) { + value = NULL; + } else if (!PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + tmp = op->func_annotations; + op->func_annotations = value; + Py_XDECREF(tmp); + return 0; +} + +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; +} + +//#if PY_VERSION_HEX >= 0x030400C1 +//static PyObject * +//__Pyx_CyFunction_get_signature(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { +// PyObject *inspect_module, *signature_class, *signature; +// // from inspect import Signature +// inspect_module = PyImport_ImportModuleLevelObject(PYIDENT("inspect"), NULL, NULL, NULL, 0); +// if (unlikely(!inspect_module)) +// goto bad; +// signature_class = __Pyx_PyObject_GetAttrStr(inspect_module, PYIDENT("Signature")); +// Py_DECREF(inspect_module); +// if (unlikely(!signature_class)) +// goto bad; +// // return Signature.from_function(op) +// signature = PyObject_CallMethodObjArgs(signature_class, PYIDENT("from_function"), op, NULL); +// Py_DECREF(signature_class); +// if (likely(signature)) +// return signature; +//bad: +// // make sure we raise an AttributeError from this property on any errors +// if (!PyErr_ExceptionMatches(PyExc_AttributeError)) +// PyErr_SetString(PyExc_AttributeError, "failed to calculate __signature__"); +// return NULL; +//} +//#endif + +static PyGetSetDef __pyx_CyFunction_getsets[] = { + {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, + {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, + {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, + {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, + {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, + {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, + {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, + {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, +//#if PY_VERSION_HEX >= 0x030400C1 +// {(char *) "__signature__", (getter)__Pyx_CyFunction_get_signature, 0, 0, 0}, +//#endif + {0, 0, 0, 0, 0} +}; + +static PyMemberDef __pyx_CyFunction_members[] = { + {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0}, + {0, 0, 0, 0, 0} +}; + +static PyObject * +__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) +{ +#if PY_MAJOR_VERSION >= 3 + Py_INCREF(m->func_qualname); + return m->func_qualname; +#else + return PyString_FromString(m->func.m_ml->ml_name); +#endif +} + +static PyMethodDef __pyx_CyFunction_methods[] = { + {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, + {0, 0, 0, 0} +}; + + +#if PY_VERSION_HEX < 0x030500A0 +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) +#else +#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) +#endif + +static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + if (unlikely(op == NULL)) + return NULL; + op->flags = flags; + __Pyx_CyFunction_weakreflist(op) = NULL; + op->func.m_ml = ml; + op->func.m_self = (PyObject *) op; + Py_XINCREF(closure); + op->func_closure = closure; + Py_XINCREF(module); + op->func.m_module = module; + op->func_dict = NULL; + op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; + op->func_doc = NULL; + op->func_classobj = NULL; + op->func_globals = globals; + Py_INCREF(op->func_globals); + Py_XINCREF(code); + op->func_code = code; + // Dynamic Default args + op->defaults_pyobjects = 0; + op->defaults_size = 0; + op->defaults = NULL; + op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; + op->defaults_getter = NULL; + op->func_annotations = NULL; + return (PyObject *) op; +} + +static int +__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) +{ + Py_CLEAR(m->func_closure); + Py_CLEAR(m->func.m_module); + Py_CLEAR(m->func_dict); + Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); + Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); + Py_CLEAR(m->func_code); + Py_CLEAR(m->func_classobj); + Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); + + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + + for (i = 0; i < m->defaults_pyobjects; i++) + Py_XDECREF(pydefaults[i]); + + PyObject_Free(m->defaults); + m->defaults = NULL; + } + + return 0; +} + +static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + if (__Pyx_CyFunction_weakreflist(m) != NULL) + PyObject_ClearWeakRefs((PyObject *) m); + __Pyx_CyFunction_clear(m); + PyObject_GC_Del(m); +} + +static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) +{ + PyObject_GC_UnTrack(m); + __Pyx__CyFunction_dealloc(m); +} + +static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) +{ + Py_VISIT(m->func_closure); + Py_VISIT(m->func.m_module); + Py_VISIT(m->func_dict); + Py_VISIT(m->func_name); + Py_VISIT(m->func_qualname); + Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); + Py_VISIT(m->func_code); + Py_VISIT(m->func_classobj); + Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); + + if (m->defaults) { + PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); + int i; + + for (i = 0; i < m->defaults_pyobjects; i++) + Py_VISIT(pydefaults[i]); + } + + return 0; +} + +static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) +{ +#if PY_MAJOR_VERSION < 3 + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + + if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { + Py_INCREF(func); + return func; + } + + if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { + if (type == NULL) + type = (PyObject *)(Py_TYPE(obj)); + return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); + } + + if (obj == Py_None) + obj = NULL; +#endif + return __Pyx_PyMethod_New(func, obj, type); +} + +static PyObject* +__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) +{ +#if PY_MAJOR_VERSION >= 3 + return PyUnicode_FromFormat("", + op->func_qualname, (void *)op); +#else + return PyString_FromFormat("", + PyString_AsString(op->func_qualname), (void *)op); +#endif +} + +static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { + // originally copied from PyCFunction_Call() in CPython's Objects/methodobject.c + PyCFunctionObject* f = (PyCFunctionObject*)func; + PyCFunction meth = f->m_ml->ml_meth; + Py_ssize_t size; + + switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { + case METH_VARARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) + return (*meth)(self, arg); + break; + case METH_VARARGS | METH_KEYWORDS: + return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); + case METH_NOARGS: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { + size = PyTuple_GET_SIZE(arg); + if (likely(size == 0)) + return (*meth)(self, NULL); + PyErr_Format(PyExc_TypeError, + "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); + return NULL; + } + break; + case METH_O: + if (likely(kw == NULL || PyDict_Size(kw) == 0)) { + size = PyTuple_GET_SIZE(arg); + if (likely(size == 1)) { + PyObject *result, *arg0; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + arg0 = PyTuple_GET_ITEM(arg, 0); + #else + arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; + #endif + result = (*meth)(self, arg0); + #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(arg0); + #endif + return result; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", + f->m_ml->ml_name, size); + return NULL; + } + break; + default: + PyErr_SetString(PyExc_SystemError, "Bad call flags in " + "__Pyx_CyFunction_Call. METH_OLDARGS is no " + "longer supported!"); + + return NULL; + } + PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", + f->m_ml->ml_name); + return NULL; +} + +static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { + return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw); +} + +static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { + PyObject *result; + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; + if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { + Py_ssize_t argc; + PyObject *new_args; + PyObject *self; + + argc = PyTuple_GET_SIZE(args); + new_args = PyTuple_GetSlice(args, 1, argc); + + if (unlikely(!new_args)) + return NULL; + + self = PyTuple_GetItem(args, 0); + if (unlikely(!self)) { + Py_DECREF(new_args); + PyErr_Format(PyExc_TypeError, + "unbound method %.200S() needs an argument", + cyfunc->func_qualname); + return NULL; + } + + result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); + Py_DECREF(new_args); + } else { + result = __Pyx_CyFunction_Call(func, args, kw); + } + return result; +} + +static PyTypeObject __pyx_CyFunctionType_type = { + PyVarObject_HEAD_INIT(0, 0) + "cython_function_or_method", /*tp_name*/ + sizeof(__pyx_CyFunctionObject), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ +#if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ +#else + 0, /*reserved*/ +#endif + (reprfunc) __Pyx_CyFunction_repr, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ + 0, /*tp_hash*/ + __Pyx_CyFunction_CallAsMethod, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_doc*/ + (traverseproc) __Pyx_CyFunction_traverse, /*tp_traverse*/ + (inquiry) __Pyx_CyFunction_clear, /*tp_clear*/ + 0, /*tp_richcompare*/ +#if PY_VERSION_HEX < 0x030500A0 + offsetof(__pyx_CyFunctionObject, func_weakreflist), /*tp_weaklistoffset*/ +#else + offsetof(PyCFunctionObject, m_weakreflist), /*tp_weaklistoffset*/ +#endif + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + __pyx_CyFunction_methods, /*tp_methods*/ + __pyx_CyFunction_members, /*tp_members*/ + __pyx_CyFunction_getsets, /*tp_getset*/ + 0, /*tp_base*/ + 0, /*tp_dict*/ + __Pyx_CyFunction_descr_get, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + 0, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ +#if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ +#endif +#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ +#endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 + 0, /*tp_pypy_flags*/ +#endif +}; + + +static int __pyx_CyFunction_init(void) { + __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); + if (unlikely(__pyx_CyFunctionType == NULL)) { + return -1; + } + return 0; +} + +static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + + m->defaults = PyObject_Malloc(size); + if (unlikely(!m->defaults)) + return PyErr_NoMemory(); + memset(m->defaults, 0, size); + m->defaults_pyobjects = pyobjects; + m->defaults_size = size; + return m->defaults; +} + +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_tuple = tuple; + Py_INCREF(tuple); +} + +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); +} + +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); +} + + +//////////////////// CythonFunction.proto //////////////////// + +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *closure, + PyObject *module, PyObject *globals, + PyObject* code); + +//////////////////// CythonFunction //////////////////// +//@requires: CythonFunctionShared + +static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { + PyObject *op = __Pyx_CyFunction_Init( + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + PyObject_GC_Track(op); + } + return op; +} + + +//////////////////// CyFunctionClassCell.proto //////////////////// +static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj);/*proto*/ + +//////////////////// CyFunctionClassCell //////////////////// +//@requires: CythonFunctionShared + +static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj) { + Py_ssize_t i, count = PyList_GET_SIZE(cyfunctions); + + for (i = 0; i < count; i++) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyList_GET_ITEM(cyfunctions, i); +#else + PySequence_ITEM(cyfunctions, i); + if (unlikely(!m)) + return -1; +#endif + Py_INCREF(classobj); + m->func_classobj = classobj; +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF((PyObject*)m); +#endif + } + return 0; +} + + +//////////////////// FusedFunction.proto //////////////////// + +typedef struct { + __pyx_CyFunctionObject func; + PyObject *__signatures__; + PyObject *type; + PyObject *self; +} __pyx_FusedFunctionObject; + +static PyObject *__pyx_FusedFunction_New(PyMethodDef *ml, int flags, + PyObject *qualname, PyObject *closure, + PyObject *module, PyObject *globals, + PyObject *code); + +static int __pyx_FusedFunction_clear(__pyx_FusedFunctionObject *self); +static PyTypeObject *__pyx_FusedFunctionType = NULL; +static int __pyx_FusedFunction_init(void); + +#define __Pyx_FusedFunction_USED + +//////////////////// FusedFunction //////////////////// +//@requires: CythonFunctionShared + +static PyObject * +__pyx_FusedFunction_New(PyMethodDef *ml, int flags, + PyObject *qualname, PyObject *closure, + PyObject *module, PyObject *globals, + PyObject *code) +{ + PyObject *op = __Pyx_CyFunction_Init( + // __pyx_CyFunctionObject is correct below since that's the cast that we want. + PyObject_GC_New(__pyx_CyFunctionObject, __pyx_FusedFunctionType), + ml, flags, qualname, closure, module, globals, code + ); + if (likely(op)) { + __pyx_FusedFunctionObject *fusedfunc = (__pyx_FusedFunctionObject *) op; + fusedfunc->__signatures__ = NULL; + fusedfunc->type = NULL; + fusedfunc->self = NULL; + PyObject_GC_Track(op); + } + return op; +} + +static void +__pyx_FusedFunction_dealloc(__pyx_FusedFunctionObject *self) +{ + PyObject_GC_UnTrack(self); + Py_CLEAR(self->self); + Py_CLEAR(self->type); + Py_CLEAR(self->__signatures__); + __Pyx__CyFunction_dealloc((__pyx_CyFunctionObject *) self); +} + +static int +__pyx_FusedFunction_traverse(__pyx_FusedFunctionObject *self, + visitproc visit, + void *arg) +{ + Py_VISIT(self->self); + Py_VISIT(self->type); + Py_VISIT(self->__signatures__); + return __Pyx_CyFunction_traverse((__pyx_CyFunctionObject *) self, visit, arg); +} + +static int +__pyx_FusedFunction_clear(__pyx_FusedFunctionObject *self) +{ + Py_CLEAR(self->self); + Py_CLEAR(self->type); + Py_CLEAR(self->__signatures__); + return __Pyx_CyFunction_clear((__pyx_CyFunctionObject *) self); +} + + +static PyObject * +__pyx_FusedFunction_descr_get(PyObject *self, PyObject *obj, PyObject *type) +{ + __pyx_FusedFunctionObject *func, *meth; + + func = (__pyx_FusedFunctionObject *) self; + + if (func->self || func->func.flags & __Pyx_CYFUNCTION_STATICMETHOD) { + // Do not allow rebinding and don't do anything for static methods + Py_INCREF(self); + return self; + } + + if (obj == Py_None) + obj = NULL; + + meth = (__pyx_FusedFunctionObject *) __pyx_FusedFunction_New( + ((PyCFunctionObject *) func)->m_ml, + ((__pyx_CyFunctionObject *) func)->flags, + ((__pyx_CyFunctionObject *) func)->func_qualname, + ((__pyx_CyFunctionObject *) func)->func_closure, + ((PyCFunctionObject *) func)->m_module, + ((__pyx_CyFunctionObject *) func)->func_globals, + ((__pyx_CyFunctionObject *) func)->func_code); + if (!meth) + return NULL; + + // defaults needs copying fully rather than just copying the pointer + // since otherwise it will be freed on destruction of meth despite + // belonging to func rather than meth + if (func->func.defaults) { + PyObject **pydefaults; + int i; + + if (!__Pyx_CyFunction_InitDefaults((PyObject*)meth, + func->func.defaults_size, + func->func.defaults_pyobjects)) { + Py_XDECREF((PyObject*)meth); + return NULL; + } + memcpy(meth->func.defaults, func->func.defaults, func->func.defaults_size); + + pydefaults = __Pyx_CyFunction_Defaults(PyObject *, meth); + for (i = 0; i < meth->func.defaults_pyobjects; i++) + Py_XINCREF(pydefaults[i]); + } + + Py_XINCREF(func->func.func_classobj); + meth->func.func_classobj = func->func.func_classobj; + + Py_XINCREF(func->__signatures__); + meth->__signatures__ = func->__signatures__; + + Py_XINCREF(type); + meth->type = type; + + Py_XINCREF(func->func.defaults_tuple); + meth->func.defaults_tuple = func->func.defaults_tuple; + + if (func->func.flags & __Pyx_CYFUNCTION_CLASSMETHOD) + obj = type; + + Py_XINCREF(obj); + meth->self = obj; + + return (PyObject *) meth; +} + +static PyObject * +_obj_to_str(PyObject *obj) +{ + if (PyType_Check(obj)) + return PyObject_GetAttr(obj, PYIDENT("__name__")); + else + return PyObject_Str(obj); +} + +static PyObject * +__pyx_FusedFunction_getitem(__pyx_FusedFunctionObject *self, PyObject *idx) +{ + PyObject *signature = NULL; + PyObject *unbound_result_func; + PyObject *result_func = NULL; + + if (self->__signatures__ == NULL) { + PyErr_SetString(PyExc_TypeError, "Function is not fused"); + return NULL; + } + + if (PyTuple_Check(idx)) { + PyObject *list = PyList_New(0); + Py_ssize_t n = PyTuple_GET_SIZE(idx); + PyObject *sep = NULL; + int i; + + if (unlikely(!list)) + return NULL; + + for (i = 0; i < n; i++) { + int ret; + PyObject *string; +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *item = PyTuple_GET_ITEM(idx, i); +#else + PyObject *item = PySequence_ITEM(idx, i); if (unlikely(!item)) goto __pyx_err; +#endif + string = _obj_to_str(item); +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(item); +#endif + if (unlikely(!string)) goto __pyx_err; + ret = PyList_Append(list, string); + Py_DECREF(string); + if (unlikely(ret < 0)) goto __pyx_err; + } + + sep = PyUnicode_FromString("|"); + if (likely(sep)) + signature = PyUnicode_Join(sep, list); +__pyx_err: +; + Py_DECREF(list); + Py_XDECREF(sep); + } else { + signature = _obj_to_str(idx); + } + + if (!signature) + return NULL; + + unbound_result_func = PyObject_GetItem(self->__signatures__, signature); + + if (unbound_result_func) { + if (self->self || self->type) { + __pyx_FusedFunctionObject *unbound = (__pyx_FusedFunctionObject *) unbound_result_func; + + // TODO: move this to InitClassCell + Py_CLEAR(unbound->func.func_classobj); + Py_XINCREF(self->func.func_classobj); + unbound->func.func_classobj = self->func.func_classobj; + + result_func = __pyx_FusedFunction_descr_get(unbound_result_func, + self->self, self->type); + } else { + result_func = unbound_result_func; + Py_INCREF(result_func); + } + } + + Py_DECREF(signature); + Py_XDECREF(unbound_result_func); + + return result_func; +} + +static PyObject * +__pyx_FusedFunction_callfunction(PyObject *func, PyObject *args, PyObject *kw) +{ + __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; + int static_specialized = (cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD && + !((__pyx_FusedFunctionObject *) func)->__signatures__); + + if (cyfunc->flags & __Pyx_CYFUNCTION_CCLASS && !static_specialized) { + return __Pyx_CyFunction_CallAsMethod(func, args, kw); + } else { + return __Pyx_CyFunction_Call(func, args, kw); + } +} + +// Note: the 'self' from method binding is passed in in the args tuple, +// whereas PyCFunctionObject's m_self is passed in as the first +// argument to the C function. For extension methods we need +// to pass 'self' as 'm_self' and not as the first element of the +// args tuple. + +static PyObject * +__pyx_FusedFunction_call(PyObject *func, PyObject *args, PyObject *kw) +{ + __pyx_FusedFunctionObject *binding_func = (__pyx_FusedFunctionObject *) func; + Py_ssize_t argc = PyTuple_GET_SIZE(args); + PyObject *new_args = NULL; + __pyx_FusedFunctionObject *new_func = NULL; + PyObject *result = NULL; + PyObject *self = NULL; + int is_staticmethod = binding_func->func.flags & __Pyx_CYFUNCTION_STATICMETHOD; + int is_classmethod = binding_func->func.flags & __Pyx_CYFUNCTION_CLASSMETHOD; + + if (binding_func->self) { + // Bound method call, put 'self' in the args tuple + Py_ssize_t i; + new_args = PyTuple_New(argc + 1); + if (!new_args) + return NULL; + + self = binding_func->self; +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_INCREF(self); +#endif + Py_INCREF(self); + PyTuple_SET_ITEM(new_args, 0, self); + + for (i = 0; i < argc; i++) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *item = PyTuple_GET_ITEM(args, i); + Py_INCREF(item); +#else + PyObject *item = PySequence_ITEM(args, i); if (unlikely(!item)) goto bad; +#endif + PyTuple_SET_ITEM(new_args, i + 1, item); + } + + args = new_args; + } else if (binding_func->type) { + // Unbound method call + if (argc < 1) { + PyErr_SetString(PyExc_TypeError, "Need at least one argument, 0 given."); + return NULL; + } +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + self = PyTuple_GET_ITEM(args, 0); +#else + self = PySequence_ITEM(args, 0); if (unlikely(!self)) return NULL; +#endif + } + + if (self && !is_classmethod && !is_staticmethod) { + int is_instance = PyObject_IsInstance(self, binding_func->type); + if (unlikely(!is_instance)) { + PyErr_Format(PyExc_TypeError, + "First argument should be of type %.200s, got %.200s.", + ((PyTypeObject *) binding_func->type)->tp_name, + Py_TYPE(self)->tp_name); + goto bad; + } else if (unlikely(is_instance == -1)) { + goto bad; + } + } +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_XDECREF(self); + self = NULL; +#endif + + if (binding_func->__signatures__) { + PyObject *tup; + if (is_staticmethod && binding_func->func.flags & __Pyx_CYFUNCTION_CCLASS) { + // FIXME: this seems wrong, but we must currently pass the signatures dict as 'self' argument + tup = PyTuple_Pack(3, args, + kw == NULL ? Py_None : kw, + binding_func->func.defaults_tuple); + if (unlikely(!tup)) goto bad; + new_func = (__pyx_FusedFunctionObject *) __Pyx_CyFunction_CallMethod( + func, binding_func->__signatures__, tup, NULL); + } else { + tup = PyTuple_Pack(4, binding_func->__signatures__, args, + kw == NULL ? Py_None : kw, + binding_func->func.defaults_tuple); + if (unlikely(!tup)) goto bad; + new_func = (__pyx_FusedFunctionObject *) __pyx_FusedFunction_callfunction(func, tup, NULL); + } + Py_DECREF(tup); + + if (unlikely(!new_func)) + goto bad; + + Py_XINCREF(binding_func->func.func_classobj); + Py_CLEAR(new_func->func.func_classobj); + new_func->func.func_classobj = binding_func->func.func_classobj; + + func = (PyObject *) new_func; + } + + result = __pyx_FusedFunction_callfunction(func, args, kw); +bad: +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_XDECREF(self); +#endif + Py_XDECREF(new_args); + Py_XDECREF((PyObject *) new_func); + return result; +} + +static PyMemberDef __pyx_FusedFunction_members[] = { + {(char *) "__signatures__", + T_OBJECT, + offsetof(__pyx_FusedFunctionObject, __signatures__), + READONLY, + 0}, + {0, 0, 0, 0, 0}, +}; + +static PyMappingMethods __pyx_FusedFunction_mapping_methods = { + 0, + (binaryfunc) __pyx_FusedFunction_getitem, + 0, +}; + +static PyTypeObject __pyx_FusedFunctionType_type = { + PyVarObject_HEAD_INIT(0, 0) + "fused_cython_function", /*tp_name*/ + sizeof(__pyx_FusedFunctionObject), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + (destructor) __pyx_FusedFunction_dealloc, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ +#if PY_MAJOR_VERSION < 3 + 0, /*tp_compare*/ +#else + 0, /*reserved*/ +#endif + 0, /*tp_repr*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + &__pyx_FusedFunction_mapping_methods, /*tp_as_mapping*/ + 0, /*tp_hash*/ + (ternaryfunc) __pyx_FusedFunction_call, /*tp_call*/ + 0, /*tp_str*/ + 0, /*tp_getattro*/ + 0, /*tp_setattro*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_doc*/ + (traverseproc) __pyx_FusedFunction_traverse, /*tp_traverse*/ + (inquiry) __pyx_FusedFunction_clear,/*tp_clear*/ + 0, /*tp_richcompare*/ + 0, /*tp_weaklistoffset*/ + 0, /*tp_iter*/ + 0, /*tp_iternext*/ + 0, /*tp_methods*/ + __pyx_FusedFunction_members, /*tp_members*/ + // __doc__ is None for the fused function type, but we need it to be + // a descriptor for the instance's __doc__, so rebuild descriptors in our subclass + __pyx_CyFunction_getsets, /*tp_getset*/ + // NOTE: tp_base may be changed later during module initialisation when importing CyFunction across modules. + &__pyx_CyFunctionType_type, /*tp_base*/ + 0, /*tp_dict*/ + __pyx_FusedFunction_descr_get, /*tp_descr_get*/ + 0, /*tp_descr_set*/ + 0, /*tp_dictoffset*/ + 0, /*tp_init*/ + 0, /*tp_alloc*/ + 0, /*tp_new*/ + 0, /*tp_free*/ + 0, /*tp_is_gc*/ + 0, /*tp_bases*/ + 0, /*tp_mro*/ + 0, /*tp_cache*/ + 0, /*tp_subclasses*/ + 0, /*tp_weaklist*/ + 0, /*tp_del*/ + 0, /*tp_version_tag*/ +#if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ +#endif +#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ +#endif +#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ +#endif +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 + 0, /*tp_pypy_flags*/ +#endif +}; + +static int __pyx_FusedFunction_init(void) { + // Set base from __Pyx_FetchCommonTypeFromSpec, in case it's different from the local static value. + __pyx_FusedFunctionType_type.tp_base = __pyx_CyFunctionType; + __pyx_FusedFunctionType = __Pyx_FetchCommonType(&__pyx_FusedFunctionType_type); + if (__pyx_FusedFunctionType == NULL) { + return -1; + } + return 0; +} + +//////////////////// ClassMethod.proto //////////////////// + +#include "descrobject.h" +static CYTHON_UNUSED PyObject* __Pyx_Method_ClassMethod(PyObject *method); /*proto*/ + +//////////////////// ClassMethod //////////////////// + +static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { +#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000 + if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { + // cdef classes + return PyClassMethod_New(method); + } +#else +#if CYTHON_COMPILING_IN_PYSTON || CYTHON_COMPILING_IN_PYPY + // special C-API function only in Pyston and PyPy >= 5.9 + if (PyMethodDescr_Check(method)) +#else + #if PY_MAJOR_VERSION == 2 + // PyMethodDescr_Type is not exposed in the CPython C-API in Py2. + static PyTypeObject *methoddescr_type = NULL; + if (methoddescr_type == NULL) { + PyObject *meth = PyObject_GetAttrString((PyObject*)&PyList_Type, "append"); + if (!meth) return NULL; + methoddescr_type = Py_TYPE(meth); + Py_DECREF(meth); + } + #else + PyTypeObject *methoddescr_type = &PyMethodDescr_Type; + #endif + if (__Pyx_TypeCheck(method, methoddescr_type)) +#endif + { + // cdef classes + PyMethodDescrObject *descr = (PyMethodDescrObject *)method; + #if PY_VERSION_HEX < 0x03020000 + PyTypeObject *d_type = descr->d_type; + #else + PyTypeObject *d_type = descr->d_common.d_type; + #endif + return PyDescr_NewClassMethod(d_type, descr->d_method); + } +#endif + else if (PyMethod_Check(method)) { + // python classes + return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); + } + else { + return PyClassMethod_New(method); + } +} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Embed.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Embed.c new file mode 100644 index 00000000000..8f7e8f46e92 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Embed.c @@ -0,0 +1,219 @@ +//////////////////// MainFunction //////////////////// + +#ifdef __FreeBSD__ +#include +#endif + +#if PY_MAJOR_VERSION < 3 +int %(main_method)s(int argc, char** argv) { +#elif defined(WIN32) || defined(MS_WINDOWS) +int %(wmain_method)s(int argc, wchar_t **argv) { +#else +static int __Pyx_main(int argc, wchar_t **argv) { +#endif + /* 754 requires that FP exceptions run in "no stop" mode by default, + * and until C vendors implement C99's ways to control FP exceptions, + * Python requires non-stop mode. Alas, some platforms enable FP + * exceptions by default. Here we disable them. + */ +#ifdef __FreeBSD__ + fp_except_t m; + + m = fpgetmask(); + fpsetmask(m & ~FP_X_OFL); +#endif + if (argc && argv) + Py_SetProgramName(argv[0]); + Py_Initialize(); + if (argc && argv) + PySys_SetArgv(argc, argv); + { /* init module '%(module_name)s' as '__main__' */ + PyObject* m = NULL; + %(module_is_main)s = 1; + #if PY_MAJOR_VERSION < 3 + init%(module_name)s(); + #elif CYTHON_PEP489_MULTI_PHASE_INIT + m = PyInit_%(module_name)s(); + if (!PyModule_Check(m)) { + PyModuleDef *mdef = (PyModuleDef *) m; + PyObject *modname = PyUnicode_FromString("__main__"); + m = NULL; + if (modname) { + // FIXME: not currently calling PyModule_FromDefAndSpec() here because we do not have a module spec! + // FIXME: not currently setting __file__, __path__, __spec__, ... + m = PyModule_NewObject(modname); + Py_DECREF(modname); + if (m) PyModule_ExecDef(m, mdef); + } + } + #else + m = PyInit_%(module_name)s(); + #endif + if (PyErr_Occurred()) { + PyErr_Print(); /* This exits with the right code if SystemExit. */ + #if PY_MAJOR_VERSION < 3 + if (Py_FlushLine()) PyErr_Clear(); + #endif + return 1; + } + Py_XDECREF(m); + } +#if PY_VERSION_HEX < 0x03060000 + Py_Finalize(); +#else + if (Py_FinalizeEx() < 0) + return 2; +#endif + return 0; +} + + +#if PY_MAJOR_VERSION >= 3 && !defined(WIN32) && !defined(MS_WINDOWS) +#include + +static wchar_t* +__Pyx_char2wchar(char* arg) +{ + wchar_t *res; +#ifdef HAVE_BROKEN_MBSTOWCS + /* Some platforms have a broken implementation of + * mbstowcs which does not count the characters that + * would result from conversion. Use an upper bound. + */ + size_t argsize = strlen(arg); +#else + size_t argsize = mbstowcs(NULL, arg, 0); +#endif + size_t count; + unsigned char *in; + wchar_t *out; +#ifdef HAVE_MBRTOWC + mbstate_t mbs; +#endif + if (argsize != (size_t)-1) { + res = (wchar_t *)malloc((argsize+1)*sizeof(wchar_t)); + if (!res) + goto oom; + count = mbstowcs(res, arg, argsize+1); + if (count != (size_t)-1) { + wchar_t *tmp; + /* Only use the result if it contains no + surrogate characters. */ + for (tmp = res; *tmp != 0 && + (*tmp < 0xd800 || *tmp > 0xdfff); tmp++) + ; + if (*tmp == 0) + return res; + } + free(res); + } + /* Conversion failed. Fall back to escaping with surrogateescape. */ +#ifdef HAVE_MBRTOWC + /* Try conversion with mbrtwoc (C99), and escape non-decodable bytes. */ + + /* Overallocate; as multi-byte characters are in the argument, the + actual output could use less memory. */ + argsize = strlen(arg) + 1; + res = (wchar_t *)malloc(argsize*sizeof(wchar_t)); + if (!res) goto oom; + in = (unsigned char*)arg; + out = res; + memset(&mbs, 0, sizeof mbs); + while (argsize) { + size_t converted = mbrtowc(out, (char*)in, argsize, &mbs); + if (converted == 0) + /* Reached end of string; null char stored. */ + break; + if (converted == (size_t)-2) { + /* Incomplete character. This should never happen, + since we provide everything that we have - + unless there is a bug in the C library, or I + misunderstood how mbrtowc works. */ + fprintf(stderr, "unexpected mbrtowc result -2\\n"); + free(res); + return NULL; + } + if (converted == (size_t)-1) { + /* Conversion error. Escape as UTF-8b, and start over + in the initial shift state. */ + *out++ = 0xdc00 + *in++; + argsize--; + memset(&mbs, 0, sizeof mbs); + continue; + } + if (*out >= 0xd800 && *out <= 0xdfff) { + /* Surrogate character. Escape the original + byte sequence with surrogateescape. */ + argsize -= converted; + while (converted--) + *out++ = 0xdc00 + *in++; + continue; + } + /* successfully converted some bytes */ + in += converted; + argsize -= converted; + out++; + } +#else + /* Cannot use C locale for escaping; manually escape as if charset + is ASCII (i.e. escape all bytes > 128. This will still roundtrip + correctly in the locale's charset, which must be an ASCII superset. */ + res = (wchar_t *)malloc((strlen(arg)+1)*sizeof(wchar_t)); + if (!res) goto oom; + in = (unsigned char*)arg; + out = res; + while(*in) + if(*in < 128) + *out++ = *in++; + else + *out++ = 0xdc00 + *in++; + *out = 0; +#endif + return res; +oom: + fprintf(stderr, "out of memory\\n"); + return NULL; +} + +int +%(main_method)s(int argc, char **argv) +{ + if (!argc) { + return __Pyx_main(0, NULL); + } + else { + int i, res; + wchar_t **argv_copy = (wchar_t **)malloc(sizeof(wchar_t*)*argc); + /* We need a second copy, as Python might modify the first one. */ + wchar_t **argv_copy2 = (wchar_t **)malloc(sizeof(wchar_t*)*argc); + char *oldloc = strdup(setlocale(LC_ALL, NULL)); + if (!argv_copy || !argv_copy2 || !oldloc) { + fprintf(stderr, "out of memory\\n"); + free(argv_copy); + free(argv_copy2); + free(oldloc); + return 1; + } + res = 0; + setlocale(LC_ALL, ""); + for (i = 0; i < argc; i++) { + argv_copy2[i] = argv_copy[i] = __Pyx_char2wchar(argv[i]); + if (!argv_copy[i]) res = 1; /* failure, but continue to simplify cleanup */ + } + setlocale(LC_ALL, oldloc); + free(oldloc); + if (res == 0) + res = __Pyx_main(argc, argv_copy); + for (i = 0; i < argc; i++) { +#if PY_VERSION_HEX < 0x03050000 + free(argv_copy2[i]); +#else + PyMem_RawFree(argv_copy2[i]); +#endif + } + free(argv_copy); + free(argv_copy2); + return res; + } +} +#endif diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Exceptions.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Exceptions.c new file mode 100644 index 00000000000..2cd4b604e0b --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Exceptions.c @@ -0,0 +1,816 @@ +// Exception raising code +// +// Exceptions are raised by __Pyx_Raise() and stored as plain +// type/value/tb in PyThreadState->curexc_*. When being caught by an +// 'except' statement, curexc_* is moved over to exc_* by +// __Pyx_GetException() + + +/////////////// PyThreadStateGet.proto /////////////// +//@substitute: naming + +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyThreadState_declare PyThreadState *$local_tstate_cname; +#define __Pyx_PyThreadState_assign $local_tstate_cname = __Pyx_PyThreadState_Current; +#define __Pyx_PyErr_Occurred() $local_tstate_cname->curexc_type +#else +#define __Pyx_PyThreadState_declare +#define __Pyx_PyThreadState_assign +#define __Pyx_PyErr_Occurred() PyErr_Occurred() +#endif + + +/////////////// PyErrExceptionMatches.proto /////////////// +//@substitute: naming + +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState($local_tstate_cname, err) +static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); +#else +#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) +#endif + +/////////////// PyErrExceptionMatches /////////////// + +#if CYTHON_FAST_THREAD_STATE +static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + // the tighter subtype checking in Py3 allows faster out-of-order comparison + for (i=0; icurexc_type; + if (exc_type == err) return 1; + if (unlikely(!exc_type)) return 0; + if (unlikely(PyTuple_Check(err))) + return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); + return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); +} +#endif + +/////////////// PyErrFetchRestore.proto /////////////// +//@substitute: naming +//@requires: PyThreadStateGet + +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) +#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState($local_tstate_cname, type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState($local_tstate_cname, type, value, tb) +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); /*proto*/ +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); /*proto*/ + +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) +#else +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#endif + +#else +#define __Pyx_PyErr_Clear() PyErr_Clear() +#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) +#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) +#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) +#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) +#endif + +/////////////// PyErrFetchRestore /////////////// + +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} + +static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +} +#endif + +/////////////// RaiseException.proto /////////////// + +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ + +/////////////// RaiseException /////////////// +//@requires: PyErrFetchRestore +//@requires: PyThreadStateGet + +// The following function is based on do_raise() from ceval.c. There +// are separate versions for Python2 and Python3 as exception handling +// has changed quite a lot between the two versions. + +#if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, + CYTHON_UNUSED PyObject *cause) { + __Pyx_PyThreadState_declare + /* 'cause' is only used in Py3 */ + Py_XINCREF(type); + if (!value || value == Py_None) + value = NULL; + else + Py_INCREF(value); + + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + } + + if (PyType_Check(type)) { + /* instantiate the type now (we don't know when and how it will be caught) */ +#if CYTHON_COMPILING_IN_PYPY + /* PyPy can't handle value == NULL */ + if (!value) { + Py_INCREF(Py_None); + value = Py_None; + } +#endif + PyErr_NormalizeException(&type, &value, &tb); + + } else { + /* Raising an instance. The value should be a dummy. */ + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + /* Normalize to raise , */ + value = type; + type = (PyObject*) Py_TYPE(type); + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } + } + + __Pyx_PyThreadState_assign + __Pyx_ErrRestore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; +} + +#else /* Python 3+ */ + +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; + } + if (value == Py_None) + value = 0; + + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + // make sure value is an exception instance of type + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + int is_subclass = PyObject_IsSubclass(instance_class, type); + if (!is_subclass) { + instance_class = NULL; + } else if (unlikely(is_subclass == -1)) { + // error on subclass test + goto bad; + } else { + // believe the instance + type = instance_class; + } + } + } + if (!instance_class) { + // instantiate the type now (we don't know when and how it will be caught) + // assuming that 'value' is an argument to the type's constructor + // not using PyErr_NormalizeException() to avoid ref-counting problems + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } + + if (cause) { + PyObject *fixed_cause; + if (cause == Py_None) { + // raise ... from None + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + + PyErr_SetObject(type, value); + + if (tb) { +#if CYTHON_COMPILING_IN_PYPY + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); + Py_INCREF(tb); + PyErr_Restore(tmp_type, tmp_value, tb); + Py_XDECREF(tmp_tb); +#else + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } +#endif + } + +bad: + Py_XDECREF(owned_instance); + return; +} +#endif + + +/////////////// GetTopmostException.proto /////////////// + +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + +/////////////// GetTopmostException /////////////// + +#if CYTHON_USE_EXC_INFO_STACK +// Copied from errors.c in CPython. +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + + +/////////////// GetException.proto /////////////// +//@substitute: naming +//@requires: PyThreadStateGet + +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_GetException(type, value, tb) __Pyx__GetException($local_tstate_cname, type, value, tb) +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +#endif + +/////////////// GetException /////////////// + +#if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) +#else +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) +#endif +{ + PyObject *local_type, *local_value, *local_tb; +#if CYTHON_FAST_THREAD_STATE + PyObject *tmp_type, *tmp_value, *tmp_tb; + local_type = tstate->curexc_type; + local_value = tstate->curexc_value; + local_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(&local_type, &local_value, &local_tb); +#endif + PyErr_NormalizeException(&local_type, &local_value, &local_tb); +#if CYTHON_FAST_THREAD_STATE + if (unlikely(tstate->curexc_type)) +#else + if (unlikely(PyErr_Occurred())) +#endif + goto bad; + #if PY_MAJOR_VERSION >= 3 + if (local_tb) { + if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) + goto bad; + } + #endif + // traceback may be NULL for freshly raised exceptions + Py_XINCREF(local_tb); + // exception state may be temporarily empty in parallel loops (race condition) + Py_XINCREF(local_type); + Py_XINCREF(local_value); + *type = local_type; + *value = local_value; + *tb = local_tb; +#if CYTHON_FAST_THREAD_STATE + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + } + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = local_type; + tstate->exc_value = local_value; + tstate->exc_traceback = local_tb; + #endif + // Make sure tstate is in a consistent state when we XDECREF + // these objects (DECREF may run arbitrary code). + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_SetExcInfo(local_type, local_value, local_tb); +#endif + return 0; +bad: + *type = 0; + *value = 0; + *tb = 0; + Py_XDECREF(local_type); + Py_XDECREF(local_value); + Py_XDECREF(local_tb); + return -1; +} + +/////////////// ReRaiseException.proto /////////////// + +static CYTHON_INLINE void __Pyx_ReraiseException(void); /*proto*/ + +/////////////// ReRaiseException /////////////// +//@requires: GetTopmostException + +static CYTHON_INLINE void __Pyx_ReraiseException(void) { + PyObject *type = NULL, *value = NULL, *tb = NULL; +#if CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = PyThreadState_GET(); + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + type = exc_info->exc_type; + value = exc_info->exc_value; + tb = exc_info->exc_traceback; + #else + type = tstate->exc_type; + value = tstate->exc_value; + tb = tstate->exc_traceback; + #endif +#else + PyErr_GetExcInfo(&type, &value, &tb); +#endif + if (!type || type == Py_None) { +#if !CYTHON_FAST_THREAD_STATE + Py_XDECREF(type); + Py_XDECREF(value); + Py_XDECREF(tb); +#endif + // message copied from Py3 + PyErr_SetString(PyExc_RuntimeError, + "No active exception to reraise"); + } else { +#if CYTHON_FAST_THREAD_STATE + Py_INCREF(type); + Py_XINCREF(value); + Py_XINCREF(tb); + +#endif + PyErr_Restore(type, value, tb); + } +} + +/////////////// SaveResetException.proto /////////////// +//@substitute: naming +//@requires: PyThreadStateGet + +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave($local_tstate_cname, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset($local_tstate_cname, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); /*proto*/ + +#else + +#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) +#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) +#endif + +/////////////// SaveResetException /////////////// +//@requires: GetTopmostException + +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; + #else + *type = tstate->exc_type; + *value = tstate->exc_value; + *tb = tstate->exc_traceback; + #endif + Py_XINCREF(*type); + Py_XINCREF(*value); + Py_XINCREF(*tb); +} + +static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + tstate->exc_type = type; + tstate->exc_value = value; + tstate->exc_traceback = tb; + #endif + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +} +#endif + +/////////////// SwapException.proto /////////////// +//@substitute: naming +//@requires: PyThreadStateGet + +#if CYTHON_FAST_THREAD_STATE +#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap($local_tstate_cname, type, value, tb) +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +#else +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +#endif + +/////////////// SwapException /////////////// + +#if CYTHON_FAST_THREAD_STATE +static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + + exc_info->exc_type = *type; + exc_info->exc_value = *value; + exc_info->exc_traceback = *tb; + #else + tmp_type = tstate->exc_type; + tmp_value = tstate->exc_value; + tmp_tb = tstate->exc_traceback; + + tstate->exc_type = *type; + tstate->exc_value = *value; + tstate->exc_traceback = *tb; + #endif + + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} + +#else + +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); + PyErr_SetExcInfo(*type, *value, *tb); + *type = tmp_type; + *value = tmp_value; + *tb = tmp_tb; +} +#endif + +/////////////// WriteUnraisableException.proto /////////////// + +static void __Pyx_WriteUnraisable(const char *name, int clineno, + int lineno, const char *filename, + int full_traceback, int nogil); /*proto*/ + +/////////////// WriteUnraisableException /////////////// +//@requires: PyErrFetchRestore +//@requires: PyThreadStateGet + +static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, + CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, + int full_traceback, CYTHON_UNUSED int nogil) { + PyObject *old_exc, *old_val, *old_tb; + PyObject *ctx; + __Pyx_PyThreadState_declare +#ifdef WITH_THREAD + PyGILState_STATE state; + if (nogil) + state = PyGILState_Ensure(); +#ifdef _MSC_VER + /* arbitrary, to suppress warning */ + else state = (PyGILState_STATE)-1; +#endif +#endif + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); + if (full_traceback) { + Py_XINCREF(old_exc); + Py_XINCREF(old_val); + Py_XINCREF(old_tb); + __Pyx_ErrRestore(old_exc, old_val, old_tb); + PyErr_PrintEx(1); + } + #if PY_MAJOR_VERSION < 3 + ctx = PyString_FromString(name); + #else + ctx = PyUnicode_FromString(name); + #endif + __Pyx_ErrRestore(old_exc, old_val, old_tb); + if (!ctx) { + PyErr_WriteUnraisable(Py_None); + } else { + PyErr_WriteUnraisable(ctx); + Py_DECREF(ctx); + } +#ifdef WITH_THREAD + if (nogil) + PyGILState_Release(state); +#endif +} + +/////////////// CLineInTraceback.proto /////////////// + +#ifdef CYTHON_CLINE_IN_TRACEBACK /* 0 or 1 to disable/enable C line display in tracebacks at C compile time */ +#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) +#else +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);/*proto*/ +#endif + +/////////////// CLineInTraceback /////////////// +//@requires: ObjectHandling.c::PyObjectGetAttrStr +//@requires: ObjectHandling.c::PyDictVersioning +//@requires: PyErrFetchRestore +//@substitute: naming + +#ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { + PyObject *use_cline; + PyObject *ptype, *pvalue, *ptraceback; +#if CYTHON_COMPILING_IN_CPYTHON + PyObject **cython_runtime_dict; +#endif + + if (unlikely(!${cython_runtime_cname})) { + // Very early error where the runtime module is not set up yet. + return c_line; + } + + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + +#if CYTHON_COMPILING_IN_CPYTHON + cython_runtime_dict = _PyObject_GetDictPtr(${cython_runtime_cname}); + if (likely(cython_runtime_dict)) { + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, PYIDENT("cline_in_traceback"))) + } else +#endif + { + PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(${cython_runtime_cname}, PYIDENT("cline_in_traceback")); + if (use_cline_obj) { + use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; + Py_DECREF(use_cline_obj); + } else { + PyErr_Clear(); + use_cline = NULL; + } + } + if (!use_cline) { + c_line = 0; + // No need to handle errors here when we reset the exception state just afterwards. + (void) PyObject_SetAttr(${cython_runtime_cname}, PYIDENT("cline_in_traceback"), Py_False); + } + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { + c_line = 0; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + return c_line; +} +#endif + +/////////////// AddTraceback.proto /////////////// + +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename); /*proto*/ + +/////////////// AddTraceback /////////////// +//@requires: ModuleSetupCode.c::CodeObjectCache +//@requires: CLineInTraceback +//@substitute: naming + +#include "compile.h" +#include "frameobject.h" +#include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif + +static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( + const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = NULL; + PyObject *py_funcname = NULL; + #if PY_MAJOR_VERSION < 3 + PyObject *py_srcfile = NULL; + + py_srcfile = PyString_FromString(filename); + if (!py_srcfile) goto bad; + #endif + + if (c_line) { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, $cfilenm_cname, c_line); + if (!py_funcname) goto bad; + #else + py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, $cfilenm_cname, c_line); + if (!py_funcname) goto bad; + funcname = PyUnicode_AsUTF8(py_funcname); + if (!funcname) goto bad; + #endif + } + else { + #if PY_MAJOR_VERSION < 3 + py_funcname = PyString_FromString(funcname); + if (!py_funcname) goto bad; + #endif + } + #if PY_MAJOR_VERSION < 3 + py_code = __Pyx_PyCode_New( + 0, /*int argcount,*/ + 0, /*int kwonlyargcount,*/ + 0, /*int nlocals,*/ + 0, /*int stacksize,*/ + 0, /*int flags,*/ + $empty_bytes, /*PyObject *code,*/ + $empty_tuple, /*PyObject *consts,*/ + $empty_tuple, /*PyObject *names,*/ + $empty_tuple, /*PyObject *varnames,*/ + $empty_tuple, /*PyObject *freevars,*/ + $empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + py_line, /*int firstlineno,*/ + $empty_bytes /*PyObject *lnotab*/ + ); + Py_DECREF(py_srcfile); + #else + py_code = PyCode_NewEmpty(filename, funcname, py_line); + #endif + Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline + return py_code; +bad: + Py_XDECREF(py_funcname); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_srcfile); + #endif + return NULL; +} + +static void __Pyx_AddTraceback(const char *funcname, int c_line, + int py_line, const char *filename) { + PyCodeObject *py_code = 0; + PyFrameObject *py_frame = 0; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject *ptype, *pvalue, *ptraceback; + + if (c_line) { + c_line = __Pyx_CLineForTraceback(tstate, c_line); + } + + // Negate to avoid collisions between py and c lines. + py_code = $global_code_object_cache_find(c_line ? -c_line : py_line); + if (!py_code) { + __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); + py_code = __Pyx_CreateCodeObjectForTraceback( + funcname, c_line, py_line, filename); + if (!py_code) { + /* If the code object creation fails, then we should clear the + fetched exception references and propagate the new exception */ + Py_XDECREF(ptype); + Py_XDECREF(pvalue); + Py_XDECREF(ptraceback); + goto bad; + } + __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); + $global_code_object_cache_insert(c_line ? -c_line : py_line, py_code); + } + py_frame = PyFrame_New( + tstate, /*PyThreadState *tstate,*/ + py_code, /*PyCodeObject *code,*/ + $moddict_cname, /*PyObject *globals,*/ + 0 /*PyObject *locals*/ + ); + if (!py_frame) goto bad; + __Pyx_PyFrame_SetLineNumber(py_frame, py_line); + PyTraceBack_Here(py_frame); +bad: + Py_XDECREF(py_code); + Py_XDECREF(py_frame); +} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ExtensionTypes.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ExtensionTypes.c new file mode 100644 index 00000000000..dc187ab49e8 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ExtensionTypes.c @@ -0,0 +1,301 @@ +/////////////// PyType_Ready.proto /////////////// + +static int __Pyx_PyType_Ready(PyTypeObject *t); + +/////////////// PyType_Ready /////////////// + +// Wrapper around PyType_Ready() with some runtime checks and fixes +// to deal with multiple inheritance. +static int __Pyx_PyType_Ready(PyTypeObject *t) { + // Loop over all bases (except the first) and check that those + // really are heap types. Otherwise, it would not be safe to + // subclass them. + // + // We also check tp_dictoffset: it is unsafe to inherit + // tp_dictoffset from a base class because the object structures + // would not be compatible. So, if our extension type doesn't set + // tp_dictoffset (i.e. there is no __dict__ attribute in the object + // structure), we need to check that none of the base classes sets + // it either. + int r; + PyObject *bases = t->tp_bases; + if (bases) + { + Py_ssize_t i, n = PyTuple_GET_SIZE(bases); + for (i = 1; i < n; i++) /* Skip first base */ + { + PyObject *b0 = PyTuple_GET_ITEM(bases, i); + PyTypeObject *b; +#if PY_MAJOR_VERSION < 3 + /* Disallow old-style classes */ + if (PyClass_Check(b0)) + { + PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class", + PyString_AS_STRING(((PyClassObject*)b0)->cl_name)); + return -1; + } +#endif + b = (PyTypeObject*)b0; + if (!PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) + { + PyErr_Format(PyExc_TypeError, "base class '%.200s' is not a heap type", + b->tp_name); + return -1; + } + if (t->tp_dictoffset == 0 && b->tp_dictoffset) + { + PyErr_Format(PyExc_TypeError, + "extension type '%.200s' has no __dict__ slot, but base type '%.200s' has: " + "either add 'cdef dict __dict__' to the extension type " + "or add '__slots__ = [...]' to the base type", + t->tp_name, b->tp_name); + return -1; + } + } + } + +#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) + { + // Make sure GC does not pick up our non-heap type as heap type with this hack! + // For details, see https://github.com/cython/cython/issues/3603 + PyObject *ret, *py_status; + int gc_was_enabled; + PyObject *gc = PyImport_Import(PYUNICODE("gc")); + if (unlikely(!gc)) return -1; + py_status = PyObject_CallMethodObjArgs(gc, PYUNICODE("isenabled"), NULL); + if (unlikely(!py_status)) { + Py_DECREF(gc); + return -1; + } + gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); + Py_DECREF(py_status); + if (gc_was_enabled > 0) { + ret = PyObject_CallMethodObjArgs(gc, PYUNICODE("disable"), NULL); + if (unlikely(!ret)) { + Py_DECREF(gc); + return -1; + } + Py_DECREF(ret); + } else if (unlikely(gc_was_enabled == -1)) { + Py_DECREF(gc); + return -1; + } + + // As of https://bugs.python.org/issue22079 + // PyType_Ready enforces that all bases of a non-heap type are + // non-heap. We know that this is the case for the solid base but + // other bases are heap allocated and are kept alive through the + // tp_bases reference. + // Other than this check, the Py_TPFLAGS_HEAPTYPE flag is unused + // in PyType_Ready(). + t->tp_flags |= Py_TPFLAGS_HEAPTYPE; +#endif + + r = PyType_Ready(t); + +#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) + t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; + + if (gc_was_enabled) { + PyObject *t, *v, *tb; + PyErr_Fetch(&t, &v, &tb); + ret = PyObject_CallMethodObjArgs(gc, PYUNICODE("enable"), NULL); + if (likely(ret || r == -1)) { + Py_XDECREF(ret); + // do not overwrite exceptions raised by PyType_Ready() above + PyErr_Restore(t, v, tb); + } else { + // PyType_Ready() succeeded, but gc.enable() failed. + Py_XDECREF(t); + Py_XDECREF(v); + Py_XDECREF(tb); + r = -1; + } + } + Py_DECREF(gc); + } +#endif + + return r; +} + +/////////////// CallNextTpDealloc.proto /////////////// + +static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc); + +/////////////// CallNextTpDealloc /////////////// + +static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) { + PyTypeObject* type = Py_TYPE(obj); + /* try to find the first parent type that has a different tp_dealloc() function */ + while (type && type->tp_dealloc != current_tp_dealloc) + type = type->tp_base; + while (type && type->tp_dealloc == current_tp_dealloc) + type = type->tp_base; + if (type) + type->tp_dealloc(obj); +} + +/////////////// CallNextTpTraverse.proto /////////////// + +static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); + +/////////////// CallNextTpTraverse /////////////// + +static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { + PyTypeObject* type = Py_TYPE(obj); + /* try to find the first parent type that has a different tp_traverse() function */ + while (type && type->tp_traverse != current_tp_traverse) + type = type->tp_base; + while (type && type->tp_traverse == current_tp_traverse) + type = type->tp_base; + if (type && type->tp_traverse) + return type->tp_traverse(obj, v, a); + // FIXME: really ignore? + return 0; +} + +/////////////// CallNextTpClear.proto /////////////// + +static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc); + +/////////////// CallNextTpClear /////////////// + +static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { + PyTypeObject* type = Py_TYPE(obj); + /* try to find the first parent type that has a different tp_clear() function */ + while (type && type->tp_clear != current_tp_clear) + type = type->tp_base; + while (type && type->tp_clear == current_tp_clear) + type = type->tp_base; + if (type && type->tp_clear) + type->tp_clear(obj); +} + +/////////////// SetupReduce.proto /////////////// + +static int __Pyx_setup_reduce(PyObject* type_obj); + +/////////////// SetupReduce /////////////// +//@requires: ObjectHandling.c::PyObjectGetAttrStrNoError +//@requires: ObjectHandling.c::PyObjectGetAttrStr +//@substitute: naming + +static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + int ret; + PyObject *name_attr; + + name_attr = __Pyx_PyObject_GetAttrStr(meth, PYIDENT("__name__")); + if (likely(name_attr)) { + ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); + } else { + ret = -1; + } + + if (unlikely(ret < 0)) { + PyErr_Clear(); + ret = 0; + } + + Py_XDECREF(name_attr); + return ret; +} + +static int __Pyx_setup_reduce(PyObject* type_obj) { + int ret = 0; + PyObject *object_reduce = NULL; + PyObject *object_getstate = NULL; + PyObject *object_reduce_ex = NULL; + PyObject *reduce = NULL; + PyObject *reduce_ex = NULL; + PyObject *reduce_cython = NULL; + PyObject *setstate = NULL; + PyObject *setstate_cython = NULL; + PyObject *getstate = NULL; + +#if CYTHON_USE_PYTYPE_LOOKUP + getstate = _PyType_Lookup((PyTypeObject*)type_obj, PYIDENT("__getstate__")); +#else + getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, PYIDENT("__getstate__")); + if (!getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (getstate) { + // Python 3.11 introduces object.__getstate__. Because it's version-specific failure to find it should not be an error +#if CYTHON_USE_PYTYPE_LOOKUP + object_getstate = _PyType_Lookup(&PyBaseObject_Type, PYIDENT("__getstate__")); +#else + object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, PYIDENT("__getstate__")); + if (!object_getstate && PyErr_Occurred()) { + goto __PYX_BAD; + } +#endif + if (object_getstate != getstate) { + goto __PYX_GOOD; + } + } + +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, PYIDENT("__reduce_ex__")); if (!object_reduce_ex) goto __PYX_BAD; +#else + object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, PYIDENT("__reduce_ex__")); if (!object_reduce_ex) goto __PYX_BAD; +#endif + + reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, PYIDENT("__reduce_ex__")); if (unlikely(!reduce_ex)) goto __PYX_BAD; + if (reduce_ex == object_reduce_ex) { + +#if CYTHON_USE_PYTYPE_LOOKUP + object_reduce = _PyType_Lookup(&PyBaseObject_Type, PYIDENT("__reduce__")); if (!object_reduce) goto __PYX_BAD; +#else + object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, PYIDENT("__reduce__")); if (!object_reduce) goto __PYX_BAD; +#endif + reduce = __Pyx_PyObject_GetAttrStr(type_obj, PYIDENT("__reduce__")); if (unlikely(!reduce)) goto __PYX_BAD; + + if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, PYIDENT("__reduce_cython__"))) { + reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, PYIDENT("__reduce_cython__")); + if (likely(reduce_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, PYIDENT("__reduce__"), reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, PYIDENT("__reduce_cython__")); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (reduce == object_reduce || PyErr_Occurred()) { + // Ignore if we're done, i.e. if 'reduce' already has the right name and the original is gone. + // Otherwise: error. + goto __PYX_BAD; + } + + setstate = __Pyx_PyObject_GetAttrStr(type_obj, PYIDENT("__setstate__")); + if (!setstate) PyErr_Clear(); + if (!setstate || __Pyx_setup_reduce_is_named(setstate, PYIDENT("__setstate_cython__"))) { + setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, PYIDENT("__setstate_cython__")); + if (likely(setstate_cython)) { + ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, PYIDENT("__setstate__"), setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; + ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, PYIDENT("__setstate_cython__")); if (unlikely(ret < 0)) goto __PYX_BAD; + } else if (!setstate || PyErr_Occurred()) { + // Ignore if we're done, i.e. if 'setstate' already has the right name and the original is gone. + // Otherwise: error. + goto __PYX_BAD; + } + } + PyType_Modified((PyTypeObject*)type_obj); + } + } + goto __PYX_GOOD; + +__PYX_BAD: + if (!PyErr_Occurred()) + PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); + ret = -1; +__PYX_GOOD: +#if !CYTHON_USE_PYTYPE_LOOKUP + Py_XDECREF(object_reduce); + Py_XDECREF(object_reduce_ex); + Py_XDECREF(object_getstate); + Py_XDECREF(getstate); +#endif + Py_XDECREF(reduce); + Py_XDECREF(reduce_ex); + Py_XDECREF(reduce_cython); + Py_XDECREF(setstate); + Py_XDECREF(setstate_cython); + return ret; +} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/FunctionArguments.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/FunctionArguments.c new file mode 100644 index 00000000000..8333d936664 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/FunctionArguments.c @@ -0,0 +1,352 @@ +//////////////////// ArgTypeTest.proto //////////////////// + + +#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact) \ + ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 : \ + __Pyx__ArgTypeTest(obj, type, name, exact)) + +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); /*proto*/ + +//////////////////// ArgTypeTest //////////////////// + +static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) +{ + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + else if (exact) { + #if PY_MAJOR_VERSION == 2 + if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif + } + else { + if (likely(__Pyx_TypeCheck(obj, type))) return 1; + } + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); + return 0; +} + +//////////////////// RaiseArgTupleInvalid.proto //////////////////// + +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/ + +//////////////////// RaiseArgTupleInvalid //////////////////// + +// __Pyx_RaiseArgtupleInvalid raises the correct exception when too +// many or too few positional arguments were found. This handles +// Py_ssize_t formatting correctly. + +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + + +//////////////////// RaiseKeywordRequired.proto //////////////////// + +static void __Pyx_RaiseKeywordRequired(const char* func_name, PyObject* kw_name); /*proto*/ + +//////////////////// RaiseKeywordRequired //////////////////// + +static void __Pyx_RaiseKeywordRequired(const char* func_name, PyObject* kw_name) { + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() needs keyword-only argument %U", func_name, kw_name); + #else + "%s() needs keyword-only argument %s", func_name, + PyString_AS_STRING(kw_name)); + #endif +} + + +//////////////////// RaiseDoubleKeywords.proto //////////////////// + +static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ + +//////////////////// RaiseDoubleKeywords //////////////////// + +static void __Pyx_RaiseDoubleKeywordsError( + const char* func_name, + PyObject* kw_name) +{ + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION >= 3 + "%s() got multiple values for keyword argument '%U'", func_name, kw_name); + #else + "%s() got multiple values for keyword argument '%s'", func_name, + PyString_AsString(kw_name)); + #endif +} + + +//////////////////// RaiseMappingExpected.proto //////////////////// + +static void __Pyx_RaiseMappingExpectedError(PyObject* arg); /*proto*/ + +//////////////////// RaiseMappingExpected //////////////////// + +static void __Pyx_RaiseMappingExpectedError(PyObject* arg) { + PyErr_Format(PyExc_TypeError, "'%.200s' object is not a mapping", Py_TYPE(arg)->tp_name); +} + + +//////////////////// KeywordStringCheck.proto //////////////////// + +static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/ + +//////////////////// KeywordStringCheck //////////////////// + +// __Pyx_CheckKeywordStrings raises an error if non-string keywords +// were passed to a function, or if any keywords were passed to a +// function that does not accept them. + +static int __Pyx_CheckKeywordStrings( + PyObject *kwdict, + const char* function_name, + int kw_allowed) +{ + PyObject* key = 0; + Py_ssize_t pos = 0; +#if CYTHON_COMPILING_IN_PYPY + /* PyPy appears to check keywords at call time, not at unpacking time => not much to do here */ + if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) + goto invalid_keyword; + return 1; +#else + while (PyDict_Next(kwdict, &pos, &key, 0)) { + #if PY_MAJOR_VERSION < 3 + if (unlikely(!PyString_Check(key))) + #endif + if (unlikely(!PyUnicode_Check(key))) + goto invalid_keyword_type; + } + if ((!kw_allowed) && unlikely(key)) + goto invalid_keyword; + return 1; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + return 0; +#endif +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif + return 0; +} + + +//////////////////// ParseKeywords.proto //////////////////// + +static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ + PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ + const char* function_name); /*proto*/ + +//////////////////// ParseKeywords //////////////////// +//@requires: RaiseDoubleKeywords + +// __Pyx_ParseOptionalKeywords copies the optional/unknown keyword +// arguments from the kwds dict into kwds2. If kwds2 is NULL, unknown +// keywords will raise an invalid keyword error. +// +// Three kinds of errors are checked: 1) non-string keywords, 2) +// unexpected keywords and 3) overlap with positional arguments. +// +// If num_posargs is greater 0, it denotes the number of positional +// arguments that were passed and that must therefore not appear +// amongst the keywords as well. +// +// This method does not check for required keyword arguments. + +static int __Pyx_ParseOptionalKeywords( + PyObject *kwds, + PyObject **argnames[], + PyObject *kwds2, + PyObject *values[], + Py_ssize_t num_pos_args, + const char* function_name) +{ + PyObject *key = 0, *value = 0; + Py_ssize_t pos = 0; + PyObject*** name; + PyObject*** first_kw_arg = argnames + num_pos_args; + + while (PyDict_Next(kwds, &pos, &key, &value)) { + name = first_kw_arg; + while (*name && (**name != key)) name++; + if (*name) { + values[name-argnames] = value; + continue; + } + + name = first_kw_arg; + #if PY_MAJOR_VERSION < 3 + if (likely(PyString_Check(key))) { + while (*name) { + if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) + && _PyString_Eq(**name, key)) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + // not found after positional args, check for duplicate + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + if ((**argname == key) || ( + (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) + && _PyString_Eq(**argname, key))) { + goto arg_passed_twice; + } + argname++; + } + } + } else + #endif + if (likely(PyUnicode_Check(key))) { + while (*name) { + int cmp = (**name == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + // In Py2, we may need to convert the argument name from str to unicode for comparison. + PyUnicode_Compare(**name, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) { + values[name-argnames] = value; + break; + } + name++; + } + if (*name) continue; + else { + // not found after positional args, check for duplicate + PyObject*** argname = argnames; + while (argname != first_kw_arg) { + int cmp = (**argname == key) ? 0 : + #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 + (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : + #endif + // need to convert argument name from bytes to unicode for comparison + PyUnicode_Compare(**argname, key); + if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; + if (cmp == 0) goto arg_passed_twice; + argname++; + } + } + } else + goto invalid_keyword_type; + + if (kwds2) { + if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; + } else { + goto invalid_keyword; + } + } + return 0; +arg_passed_twice: + __Pyx_RaiseDoubleKeywordsError(function_name, key); + goto bad; +invalid_keyword_type: + PyErr_Format(PyExc_TypeError, + "%.200s() keywords must be strings", function_name); + goto bad; +invalid_keyword: + PyErr_Format(PyExc_TypeError, + #if PY_MAJOR_VERSION < 3 + "%.200s() got an unexpected keyword argument '%.200s'", + function_name, PyString_AsString(key)); + #else + "%s() got an unexpected keyword argument '%U'", + function_name, key); + #endif +bad: + return -1; +} + + +//////////////////// MergeKeywords.proto //////////////////// + +static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping); /*proto*/ + +//////////////////// MergeKeywords //////////////////// +//@requires: RaiseDoubleKeywords +//@requires: Optimize.c::dict_iter + +static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) { + PyObject *iter, *key = NULL, *value = NULL; + int source_is_dict, result; + Py_ssize_t orig_length, ppos = 0; + + iter = __Pyx_dict_iterator(source_mapping, 0, PYIDENT("items"), &orig_length, &source_is_dict); + if (unlikely(!iter)) { + // slow fallback: try converting to dict, then iterate + PyObject *args; + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; + PyErr_Clear(); + args = PyTuple_Pack(1, source_mapping); + if (likely(args)) { + PyObject *fallback = PyObject_Call((PyObject*)&PyDict_Type, args, NULL); + Py_DECREF(args); + if (likely(fallback)) { + iter = __Pyx_dict_iterator(fallback, 1, PYIDENT("items"), &orig_length, &source_is_dict); + Py_DECREF(fallback); + } + } + if (unlikely(!iter)) goto bad; + } + + while (1) { + result = __Pyx_dict_iter_next(iter, orig_length, &ppos, &key, &value, NULL, source_is_dict); + if (unlikely(result < 0)) goto bad; + if (!result) break; + + if (unlikely(PyDict_Contains(kwdict, key))) { + __Pyx_RaiseDoubleKeywordsError("function", key); + result = -1; + } else { + result = PyDict_SetItem(kwdict, key, value); + } + Py_DECREF(key); + Py_DECREF(value); + if (unlikely(result < 0)) goto bad; + } + Py_XDECREF(iter); + return 0; + +bad: + Py_XDECREF(iter); + return -1; +} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ImportExport.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ImportExport.c new file mode 100644 index 00000000000..532ec326f6d --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ImportExport.c @@ -0,0 +1,739 @@ +/////////////// PyIdentifierFromString.proto /////////////// + +#if !defined(__Pyx_PyIdentifier_FromString) +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) +#else + #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) +#endif +#endif + + +/////////////// Import.proto /////////////// + +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ + +/////////////// Import /////////////// +//@requires: ObjectHandling.c::PyObjectGetAttrStr +//@substitute: naming + +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *empty_list = 0; + PyObject *module = 0; + PyObject *global_dict = 0; + PyObject *empty_dict = 0; + PyObject *list; + #if PY_MAJOR_VERSION < 3 + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr($builtins_cname, PYIDENT("__import__")); + if (!py_import) + goto bad; + #endif + if (from_list) + list = from_list; + else { + empty_list = PyList_New(0); + if (!empty_list) + goto bad; + list = empty_list; + } + global_dict = PyModule_GetDict($module_cname); + if (!global_dict) + goto bad; + empty_dict = PyDict_New(); + if (!empty_dict) + goto bad; + { + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + // Avoid C compiler warning if strchr() evaluates to false at compile time. + if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { + /* try package relative import first */ + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, 1); + if (!module) { + if (!PyErr_ExceptionMatches(PyExc_ImportError)) + goto bad; + PyErr_Clear(); + } + } + level = 0; /* try absolute import on failure */ + } + #endif + if (!module) { + #if PY_MAJOR_VERSION < 3 + PyObject *py_level = PyInt_FromLong(level); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, level); + #endif + } + } +bad: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(py_import); + #endif + Py_XDECREF(empty_list); + Py_XDECREF(empty_dict); + return module; +} + + +/////////////// ImportFrom.proto /////////////// + +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ + +/////////////// ImportFrom /////////////// +//@requires: ObjectHandling.c::PyObjectGetAttrStr + +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + + +/////////////// ImportStar /////////////// +//@substitute: naming + +/* import_all_from is an unexposed function from ceval.c */ + +static int +__Pyx_import_all_from(PyObject *locals, PyObject *v) +{ + PyObject *all = PyObject_GetAttrString(v, "__all__"); + PyObject *dict, *name, *value; + int skip_leading_underscores = 0; + int pos, err; + + if (all == NULL) { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) + return -1; /* Unexpected error */ + PyErr_Clear(); + dict = PyObject_GetAttrString(v, "__dict__"); + if (dict == NULL) { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) + return -1; + PyErr_SetString(PyExc_ImportError, + "from-import-* object has no __dict__ and no __all__"); + return -1; + } +#if PY_MAJOR_VERSION < 3 + all = PyObject_CallMethod(dict, (char *)"keys", NULL); +#else + all = PyMapping_Keys(dict); +#endif + Py_DECREF(dict); + if (all == NULL) + return -1; + skip_leading_underscores = 1; + } + + for (pos = 0, err = 0; ; pos++) { + name = PySequence_GetItem(all, pos); + if (name == NULL) { + if (!PyErr_ExceptionMatches(PyExc_IndexError)) + err = -1; + else + PyErr_Clear(); + break; + } + if (skip_leading_underscores && +#if PY_MAJOR_VERSION < 3 + likely(PyString_Check(name)) && + PyString_AS_STRING(name)[0] == '_') +#else + likely(PyUnicode_Check(name)) && + likely(__Pyx_PyUnicode_GET_LENGTH(name)) && + __Pyx_PyUnicode_READ_CHAR(name, 0) == '_') +#endif + { + Py_DECREF(name); + continue; + } + value = PyObject_GetAttr(v, name); + if (value == NULL) + err = -1; + else if (PyDict_CheckExact(locals)) + err = PyDict_SetItem(locals, name, value); + else + err = PyObject_SetItem(locals, name, value); + Py_DECREF(name); + Py_XDECREF(value); + if (err != 0) + break; + } + Py_DECREF(all); + return err; +} + + +static int ${import_star}(PyObject* m) { + + int i; + int ret = -1; + char* s; + PyObject *locals = 0; + PyObject *list = 0; +#if PY_MAJOR_VERSION >= 3 + PyObject *utf8_name = 0; +#endif + PyObject *name; + PyObject *item; + + locals = PyDict_New(); if (!locals) goto bad; + if (__Pyx_import_all_from(locals, m) < 0) goto bad; + list = PyDict_Items(locals); if (!list) goto bad; + + for(i=0; i= 3 + utf8_name = PyUnicode_AsUTF8String(name); + if (!utf8_name) goto bad; + s = PyBytes_AS_STRING(utf8_name); + if (${import_star_set}(item, name, s) < 0) goto bad; + Py_DECREF(utf8_name); utf8_name = 0; +#else + s = PyString_AsString(name); + if (!s) goto bad; + if (${import_star_set}(item, name, s) < 0) goto bad; +#endif + } + ret = 0; + +bad: + Py_XDECREF(locals); + Py_XDECREF(list); +#if PY_MAJOR_VERSION >= 3 + Py_XDECREF(utf8_name); +#endif + return ret; +} + + +/////////////// SetPackagePathFromImportLib.proto /////////////// + +// PY_VERSION_HEX >= 0x03030000 +#if PY_MAJOR_VERSION >= 3 && !CYTHON_PEP489_MULTI_PHASE_INIT +static int __Pyx_SetPackagePathFromImportLib(const char* parent_package_name, PyObject *module_name); +#else +#define __Pyx_SetPackagePathFromImportLib(a, b) 0 +#endif + +/////////////// SetPackagePathFromImportLib /////////////// +//@requires: ObjectHandling.c::PyObjectGetAttrStr +//@substitute: naming + +// PY_VERSION_HEX >= 0x03030000 +#if PY_MAJOR_VERSION >= 3 && !CYTHON_PEP489_MULTI_PHASE_INIT +static int __Pyx_SetPackagePathFromImportLib(const char* parent_package_name, PyObject *module_name) { + PyObject *importlib, *loader, *osmod, *ossep, *parts, *package_path; + PyObject *path = NULL, *file_path = NULL; + int result; + if (parent_package_name) { + PyObject *package = PyImport_ImportModule(parent_package_name); + if (unlikely(!package)) + goto bad; + path = PyObject_GetAttrString(package, "__path__"); + Py_DECREF(package); + if (unlikely(!path) || unlikely(path == Py_None)) + goto bad; + } else { + path = Py_None; Py_INCREF(Py_None); + } + // package_path = [importlib.find_loader(module_name, path).path.rsplit(os.sep, 1)[0]] + importlib = PyImport_ImportModule("importlib"); + if (unlikely(!importlib)) + goto bad; + loader = PyObject_CallMethod(importlib, "find_loader", "(OO)", module_name, path); + Py_DECREF(importlib); + Py_DECREF(path); path = NULL; + if (unlikely(!loader)) + goto bad; + file_path = PyObject_GetAttrString(loader, "path"); + Py_DECREF(loader); + if (unlikely(!file_path)) + goto bad; + + if (unlikely(PyObject_SetAttrString($module_cname, "__file__", file_path) < 0)) + goto bad; + + osmod = PyImport_ImportModule("os"); + if (unlikely(!osmod)) + goto bad; + ossep = PyObject_GetAttrString(osmod, "sep"); + Py_DECREF(osmod); + if (unlikely(!ossep)) + goto bad; + parts = PyObject_CallMethod(file_path, "rsplit", "(Oi)", ossep, 1); + Py_DECREF(file_path); file_path = NULL; + Py_DECREF(ossep); + if (unlikely(!parts)) + goto bad; + package_path = Py_BuildValue("[O]", PyList_GET_ITEM(parts, 0)); + Py_DECREF(parts); + if (unlikely(!package_path)) + goto bad; + goto set_path; + +bad: + PyErr_WriteUnraisable(module_name); + Py_XDECREF(path); + Py_XDECREF(file_path); + + // set an empty path list on failure + PyErr_Clear(); + package_path = PyList_New(0); + if (unlikely(!package_path)) + return -1; + +set_path: + result = PyObject_SetAttrString($module_cname, "__path__", package_path); + Py_DECREF(package_path); + return result; +} +#endif + + +/////////////// TypeImport.proto /////////////// + +#ifndef __PYX_HAVE_RT_ImportType_proto +#define __PYX_HAVE_RT_ImportType_proto + +enum __Pyx_ImportType_CheckSize { + __Pyx_ImportType_CheckSize_Error = 0, + __Pyx_ImportType_CheckSize_Warn = 1, + __Pyx_ImportType_CheckSize_Ignore = 2 +}; + +static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); /*proto*/ + +#endif + +/////////////// TypeImport /////////////// + +#ifndef __PYX_HAVE_RT_ImportType +#define __PYX_HAVE_RT_ImportType +static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, + size_t size, enum __Pyx_ImportType_CheckSize check_size) +{ + PyObject *result = 0; + char warning[200]; + Py_ssize_t basicsize; +#ifdef Py_LIMITED_API + PyObject *py_basicsize; +#endif + + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#ifndef Py_LIMITED_API + basicsize = ((PyTypeObject *)result)->tp_basicsize; +#else + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if ((size_t)basicsize < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; + } + /* check_size == __Pyx_ImportType_CheckSize_Ignore does not warn nor error */ + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + +/////////////// FunctionImport.proto /////////////// + +static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/ + +/////////////// FunctionImport /////////////// +//@substitute: naming + +#ifndef __PYX_HAVE_RT_ImportFunction +#define __PYX_HAVE_RT_ImportFunction +static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + + d = PyObject_GetAttrString(module, (char *)"$api_name"); + if (!d) + goto bad; + cobj = PyDict_GetItemString(d, funcname); + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C function %.200s", + PyModule_GetName(module), funcname); + goto bad; + } +#if PY_VERSION_HEX >= 0x02070000 + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); + goto bad; + } + tmp.p = PyCapsule_GetPointer(cobj, sig); +#else + {const char *desc, *s1, *s2; + desc = (const char *)PyCObject_GetDesc(cobj); + if (!desc) + goto bad; + s1 = desc; s2 = sig; + while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } + if (*s1 != *s2) { + PyErr_Format(PyExc_TypeError, + "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), funcname, sig, desc); + goto bad; + } + tmp.p = PyCObject_AsVoidPtr(cobj);} +#endif + *f = tmp.fp; + if (!(*f)) + goto bad; + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(d); + return -1; +} +#endif + +/////////////// FunctionExport.proto /////////////// + +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); /*proto*/ + +/////////////// FunctionExport /////////////// +//@substitute: naming + +static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + union { + void (*fp)(void); + void *p; + } tmp; + + d = PyObject_GetAttrString($module_cname, (char *)"$api_name"); + if (!d) { + PyErr_Clear(); + d = PyDict_New(); + if (!d) + goto bad; + Py_INCREF(d); + if (PyModule_AddObject($module_cname, (char *)"$api_name", d) < 0) + goto bad; + } + tmp.fp = f; +#if PY_VERSION_HEX >= 0x02070000 + cobj = PyCapsule_New(tmp.p, sig, 0); +#else + cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0); +#endif + if (!cobj) + goto bad; + if (PyDict_SetItemString(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + +/////////////// VoidPtrImport.proto /////////////// + +static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig); /*proto*/ + +/////////////// VoidPtrImport /////////////// +//@substitute: naming + +#ifndef __PYX_HAVE_RT_ImportVoidPtr +#define __PYX_HAVE_RT_ImportVoidPtr +static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig) { + PyObject *d = 0; + PyObject *cobj = 0; + + d = PyObject_GetAttrString(module, (char *)"$api_name"); + if (!d) + goto bad; + cobj = PyDict_GetItemString(d, name); + if (!cobj) { + PyErr_Format(PyExc_ImportError, + "%.200s does not export expected C variable %.200s", + PyModule_GetName(module), name); + goto bad; + } +#if PY_VERSION_HEX >= 0x02070000 + if (!PyCapsule_IsValid(cobj, sig)) { + PyErr_Format(PyExc_TypeError, + "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj)); + goto bad; + } + *p = PyCapsule_GetPointer(cobj, sig); +#else + {const char *desc, *s1, *s2; + desc = (const char *)PyCObject_GetDesc(cobj); + if (!desc) + goto bad; + s1 = desc; s2 = sig; + while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } + if (*s1 != *s2) { + PyErr_Format(PyExc_TypeError, + "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", + PyModule_GetName(module), name, sig, desc); + goto bad; + } + *p = PyCObject_AsVoidPtr(cobj);} +#endif + if (!(*p)) + goto bad; + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(d); + return -1; +} +#endif + +/////////////// VoidPtrExport.proto /////////////// + +static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig); /*proto*/ + +/////////////// VoidPtrExport /////////////// +//@substitute: naming +//@requires: ObjectHandling.c::PyObjectSetAttrStr + +static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig) { + PyObject *d; + PyObject *cobj = 0; + + d = PyDict_GetItem($moddict_cname, PYIDENT("$api_name")); + Py_XINCREF(d); + if (!d) { + d = PyDict_New(); + if (!d) + goto bad; + if (__Pyx_PyObject_SetAttrStr($module_cname, PYIDENT("$api_name"), d) < 0) + goto bad; + } +#if PY_VERSION_HEX >= 0x02070000 + cobj = PyCapsule_New(p, sig, 0); +#else + cobj = PyCObject_FromVoidPtrAndDesc(p, (void *)sig, 0); +#endif + if (!cobj) + goto bad; + if (PyDict_SetItem(d, name, cobj) < 0) + goto bad; + Py_DECREF(cobj); + Py_DECREF(d); + return 0; +bad: + Py_XDECREF(cobj); + Py_XDECREF(d); + return -1; +} + + +/////////////// SetVTable.proto /////////////// + +static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ + +/////////////// SetVTable /////////////// + +static int __Pyx_SetVtable(PyObject *dict, void *vtable) { +#if PY_VERSION_HEX >= 0x02070000 + PyObject *ob = PyCapsule_New(vtable, 0, 0); +#else + PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); +#endif + if (!ob) + goto bad; + if (PyDict_SetItem(dict, PYIDENT("__pyx_vtable__"), ob) < 0) + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + + +/////////////// GetVTable.proto /////////////// + +static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ + +/////////////// GetVTable /////////////// + +static void* __Pyx_GetVtable(PyObject *dict) { + void* ptr; + PyObject *ob = PyObject_GetItem(dict, PYIDENT("__pyx_vtable__")); + if (!ob) + goto bad; +#if PY_VERSION_HEX >= 0x02070000 + ptr = PyCapsule_GetPointer(ob, 0); +#else + ptr = PyCObject_AsVoidPtr(ob); +#endif + if (!ptr && !PyErr_Occurred()) + PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); + Py_DECREF(ob); + return ptr; +bad: + Py_XDECREF(ob); + return NULL; +} + + +/////////////// MergeVTables.proto /////////////// +//@requires: GetVTable + +static int __Pyx_MergeVtables(PyTypeObject *type); /*proto*/ + +/////////////// MergeVTables /////////////// + +static int __Pyx_MergeVtables(PyTypeObject *type) { + int i; + void** base_vtables; + void* unknown = (void*)-1; + PyObject* bases = type->tp_bases; + int base_depth = 0; + { + PyTypeObject* base = type->tp_base; + while (base) { + base_depth += 1; + base = base->tp_base; + } + } + base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1)); + base_vtables[0] = unknown; + // Could do MRO resolution of individual methods in the future, assuming + // compatible vtables, but for now simply require a common vtable base. + // Note that if the vtables of various bases are extended separately, + // resolution isn't possible and we must reject it just as when the + // instance struct is so extended. (It would be good to also do this + // check when a multiple-base class is created in pure Python as well.) + for (i = 1; i < PyTuple_GET_SIZE(bases); i++) { + void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i))->tp_dict); + if (base_vtable != NULL) { + int j; + PyTypeObject* base = type->tp_base; + for (j = 0; j < base_depth; j++) { + if (base_vtables[j] == unknown) { + base_vtables[j] = __Pyx_GetVtable(base->tp_dict); + base_vtables[j + 1] = unknown; + } + if (base_vtables[j] == base_vtable) { + break; + } else if (base_vtables[j] == NULL) { + // No more potential matching bases (with vtables). + goto bad; + } + base = base->tp_base; + } + } + } + PyErr_Clear(); + free(base_vtables); + return 0; +bad: + PyErr_Format( + PyExc_TypeError, + "multiple bases have vtable conflict: '%s' and '%s'", + type->tp_base->tp_name, ((PyTypeObject*)PyTuple_GET_ITEM(bases, i))->tp_name); + free(base_vtables); + return -1; +} + + +/////////////// ImportNumPyArray.proto /////////////// + +static PyObject *__pyx_numpy_ndarray = NULL; + +static PyObject* __Pyx_ImportNumPyArrayTypeIfAvailable(void); /*proto*/ + +/////////////// ImportNumPyArray.cleanup /////////////// +Py_CLEAR(__pyx_numpy_ndarray); + +/////////////// ImportNumPyArray /////////////// +//@requires: ImportExport.c::Import + +static PyObject* __Pyx__ImportNumPyArray(void) { + PyObject *numpy_module, *ndarray_object = NULL; + numpy_module = __Pyx_Import(PYIDENT("numpy"), NULL, 0); + if (likely(numpy_module)) { + ndarray_object = PyObject_GetAttrString(numpy_module, "ndarray"); + Py_DECREF(numpy_module); + } + if (unlikely(!ndarray_object)) { + // ImportError, AttributeError, ... + PyErr_Clear(); + } + if (unlikely(!ndarray_object || !PyObject_TypeCheck(ndarray_object, &PyType_Type))) { + Py_XDECREF(ndarray_object); + Py_INCREF(Py_None); + ndarray_object = Py_None; + } + return ndarray_object; +} + +static CYTHON_INLINE PyObject* __Pyx_ImportNumPyArrayTypeIfAvailable(void) { + if (unlikely(!__pyx_numpy_ndarray)) { + __pyx_numpy_ndarray = __Pyx__ImportNumPyArray(); + } + Py_INCREF(__pyx_numpy_ndarray); + return __pyx_numpy_ndarray; +} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/MemoryView.pyx b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/MemoryView.pyx new file mode 100644 index 00000000000..6ca5fab9baf --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/MemoryView.pyx @@ -0,0 +1,1494 @@ +#################### View.MemoryView #################### + +# This utility provides cython.array and cython.view.memoryview + +from __future__ import absolute_import + +cimport cython + +# from cpython cimport ... +cdef extern from "Python.h": + int PyIndex_Check(object) + object PyLong_FromVoidPtr(void *) + +cdef extern from "pythread.h": + ctypedef void *PyThread_type_lock + + PyThread_type_lock PyThread_allocate_lock() + void PyThread_free_lock(PyThread_type_lock) + int PyThread_acquire_lock(PyThread_type_lock, int mode) nogil + void PyThread_release_lock(PyThread_type_lock) nogil + +cdef extern from "": + void *memset(void *b, int c, size_t len) + +cdef extern from *: + int __Pyx_GetBuffer(object, Py_buffer *, int) except -1 + void __Pyx_ReleaseBuffer(Py_buffer *) + + ctypedef struct PyObject + ctypedef Py_ssize_t Py_intptr_t + void Py_INCREF(PyObject *) + void Py_DECREF(PyObject *) + + void* PyMem_Malloc(size_t n) + void PyMem_Free(void *p) + void* PyObject_Malloc(size_t n) + void PyObject_Free(void *p) + + cdef struct __pyx_memoryview "__pyx_memoryview_obj": + Py_buffer view + PyObject *obj + __Pyx_TypeInfo *typeinfo + + ctypedef struct {{memviewslice_name}}: + __pyx_memoryview *memview + char *data + Py_ssize_t shape[{{max_dims}}] + Py_ssize_t strides[{{max_dims}}] + Py_ssize_t suboffsets[{{max_dims}}] + + void __PYX_INC_MEMVIEW({{memviewslice_name}} *memslice, int have_gil) + void __PYX_XDEC_MEMVIEW({{memviewslice_name}} *memslice, int have_gil) + + ctypedef struct __pyx_buffer "Py_buffer": + PyObject *obj + + PyObject *Py_None + + cdef enum: + PyBUF_C_CONTIGUOUS, + PyBUF_F_CONTIGUOUS, + PyBUF_ANY_CONTIGUOUS + PyBUF_FORMAT + PyBUF_WRITABLE + PyBUF_STRIDES + PyBUF_INDIRECT + PyBUF_ND + PyBUF_RECORDS + PyBUF_RECORDS_RO + + ctypedef struct __Pyx_TypeInfo: + pass + + cdef object capsule "__pyx_capsule_create" (void *p, char *sig) + cdef int __pyx_array_getbuffer(PyObject *obj, Py_buffer view, int flags) + cdef int __pyx_memoryview_getbuffer(PyObject *obj, Py_buffer view, int flags) + +cdef extern from *: + ctypedef int __pyx_atomic_int + {{memviewslice_name}} slice_copy_contig "__pyx_memoryview_copy_new_contig"( + __Pyx_memviewslice *from_mvs, + char *mode, int ndim, + size_t sizeof_dtype, int contig_flag, + bint dtype_is_object) nogil except * + bint slice_is_contig "__pyx_memviewslice_is_contig" ( + {{memviewslice_name}} mvs, char order, int ndim) nogil + bint slices_overlap "__pyx_slices_overlap" ({{memviewslice_name}} *slice1, + {{memviewslice_name}} *slice2, + int ndim, size_t itemsize) nogil + + +cdef extern from "": + void *malloc(size_t) nogil + void free(void *) nogil + void *memcpy(void *dest, void *src, size_t n) nogil + + + + +# +### cython.array class +# + +@cname("__pyx_array") +cdef class array: + + cdef: + char *data + Py_ssize_t len + char *format + int ndim + Py_ssize_t *_shape + Py_ssize_t *_strides + Py_ssize_t itemsize + unicode mode # FIXME: this should have been a simple 'char' + bytes _format + void (*callback_free_data)(void *data) + # cdef object _memview + cdef bint free_data + cdef bint dtype_is_object + + def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, + mode="c", bint allocate_buffer=True): + + cdef int idx + cdef Py_ssize_t i, dim + cdef PyObject **p + + self.ndim = len(shape) + self.itemsize = itemsize + + if not self.ndim: + raise ValueError("Empty shape tuple for cython.array") + + if itemsize <= 0: + raise ValueError("itemsize <= 0 for cython.array") + + if not isinstance(format, bytes): + format = format.encode('ASCII') + self._format = format # keep a reference to the byte string + self.format = self._format + + # use single malloc() for both shape and strides + self._shape = PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) + self._strides = self._shape + self.ndim + + if not self._shape: + raise MemoryError("unable to allocate shape and strides.") + + # cdef Py_ssize_t dim, stride + for idx, dim in enumerate(shape): + if dim <= 0: + raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) + self._shape[idx] = dim + + cdef char order + if mode == 'fortran': + order = b'F' + self.mode = u'fortran' + elif mode == 'c': + order = b'C' + self.mode = u'c' + else: + raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) + + self.len = fill_contig_strides_array(self._shape, self._strides, + itemsize, self.ndim, order) + + self.free_data = allocate_buffer + self.dtype_is_object = format == b'O' + if allocate_buffer: + # use malloc() for backwards compatibility + # in case external code wants to change the data pointer + self.data = malloc(self.len) + if not self.data: + raise MemoryError("unable to allocate array data.") + + if self.dtype_is_object: + p = self.data + for i in range(self.len / itemsize): + p[i] = Py_None + Py_INCREF(Py_None) + + @cname('getbuffer') + def __getbuffer__(self, Py_buffer *info, int flags): + cdef int bufmode = -1 + if self.mode == u"c": + bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + elif self.mode == u"fortran": + bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS + if not (flags & bufmode): + raise ValueError("Can only create a buffer that is contiguous in memory.") + info.buf = self.data + info.len = self.len + info.ndim = self.ndim + info.shape = self._shape + info.strides = self._strides + info.suboffsets = NULL + info.itemsize = self.itemsize + info.readonly = 0 + + if flags & PyBUF_FORMAT: + info.format = self.format + else: + info.format = NULL + + info.obj = self + + __pyx_getbuffer = capsule( &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") + + def __dealloc__(array self): + if self.callback_free_data != NULL: + self.callback_free_data(self.data) + elif self.free_data: + if self.dtype_is_object: + refcount_objects_in_slice(self.data, self._shape, + self._strides, self.ndim, False) + free(self.data) + PyObject_Free(self._shape) + + @property + def memview(self): + return self.get_memview() + + @cname('get_memview') + cdef get_memview(self): + flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE + return memoryview(self, flags, self.dtype_is_object) + + def __len__(self): + return self._shape[0] + + def __getattr__(self, attr): + return getattr(self.memview, attr) + + def __getitem__(self, item): + return self.memview[item] + + def __setitem__(self, item, value): + self.memview[item] = value + + +@cname("__pyx_array_new") +cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, + char *mode, char *buf): + cdef array result + + if buf == NULL: + result = array(shape, itemsize, format, mode.decode('ASCII')) + else: + result = array(shape, itemsize, format, mode.decode('ASCII'), + allocate_buffer=False) + result.data = buf + + return result + + +# +### Memoryview constants and cython.view.memoryview class +# + +# Disable generic_contiguous, as it makes trouble verifying contiguity: +# - 'contiguous' or '::1' means the dimension is contiguous with dtype +# - 'indirect_contiguous' means a contiguous list of pointers +# - dtype contiguous must be contiguous in the first or last dimension +# from the start, or from the dimension following the last indirect dimension +# +# e.g. +# int[::indirect_contiguous, ::contiguous, :] +# +# is valid (list of pointers to 2d fortran-contiguous array), but +# +# int[::generic_contiguous, ::contiguous, :] +# +# would mean you'd have assert dimension 0 to be indirect (and pointer contiguous) at runtime. +# So it doesn't bring any performance benefit, and it's only confusing. + +@cname('__pyx_MemviewEnum') +cdef class Enum(object): + cdef object name + def __init__(self, name): + self.name = name + def __repr__(self): + return self.name + +cdef generic = Enum("") +cdef strided = Enum("") # default +cdef indirect = Enum("") +# Disable generic_contiguous, as it is a troublemaker +#cdef generic_contiguous = Enum("") +cdef contiguous = Enum("") +cdef indirect_contiguous = Enum("") + +# 'follow' is implied when the first or last axis is ::1 + + +@cname('__pyx_align_pointer') +cdef void *align_pointer(void *memory, size_t alignment) nogil: + "Align pointer memory on a given boundary" + cdef Py_intptr_t aligned_p = memory + cdef size_t offset + + with cython.cdivision(True): + offset = aligned_p % alignment + + if offset > 0: + aligned_p += alignment - offset + + return aligned_p + + +# pre-allocate thread locks for reuse +## note that this could be implemented in a more beautiful way in "normal" Cython, +## but this code gets merged into the user module and not everything works there. +DEF THREAD_LOCKS_PREALLOCATED = 8 +cdef int __pyx_memoryview_thread_locks_used = 0 +cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [ + PyThread_allocate_lock(), + PyThread_allocate_lock(), + PyThread_allocate_lock(), + PyThread_allocate_lock(), + PyThread_allocate_lock(), + PyThread_allocate_lock(), + PyThread_allocate_lock(), + PyThread_allocate_lock(), +] + + +@cname('__pyx_memoryview') +cdef class memoryview(object): + + cdef object obj + cdef object _size + cdef object _array_interface + cdef PyThread_type_lock lock + # the following array will contain a single __pyx_atomic int with + # suitable alignment + cdef __pyx_atomic_int acquisition_count[2] + cdef __pyx_atomic_int *acquisition_count_aligned_p + cdef Py_buffer view + cdef int flags + cdef bint dtype_is_object + cdef __Pyx_TypeInfo *typeinfo + + def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): + self.obj = obj + self.flags = flags + if type(self) is memoryview or obj is not None: + __Pyx_GetBuffer(obj, &self.view, flags) + if self.view.obj == NULL: + (<__pyx_buffer *> &self.view).obj = Py_None + Py_INCREF(Py_None) + + global __pyx_memoryview_thread_locks_used + if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: + self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] + __pyx_memoryview_thread_locks_used += 1 + if self.lock is NULL: + self.lock = PyThread_allocate_lock() + if self.lock is NULL: + raise MemoryError + + if flags & PyBUF_FORMAT: + self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') + else: + self.dtype_is_object = dtype_is_object + + self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( + &self.acquisition_count[0], sizeof(__pyx_atomic_int)) + self.typeinfo = NULL + + def __dealloc__(memoryview self): + if self.obj is not None: + __Pyx_ReleaseBuffer(&self.view) + elif (<__pyx_buffer *> &self.view).obj == Py_None: + # Undo the incref in __cinit__() above. + (<__pyx_buffer *> &self.view).obj = NULL + Py_DECREF(Py_None) + + cdef int i + global __pyx_memoryview_thread_locks_used + if self.lock != NULL: + for i in range(__pyx_memoryview_thread_locks_used): + if __pyx_memoryview_thread_locks[i] is self.lock: + __pyx_memoryview_thread_locks_used -= 1 + if i != __pyx_memoryview_thread_locks_used: + __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( + __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) + break + else: + PyThread_free_lock(self.lock) + + cdef char *get_item_pointer(memoryview self, object index) except NULL: + cdef Py_ssize_t dim + cdef char *itemp = self.view.buf + + for dim, idx in enumerate(index): + itemp = pybuffer_index(&self.view, itemp, idx, dim) + + return itemp + + #@cname('__pyx_memoryview_getitem') + def __getitem__(memoryview self, object index): + if index is Ellipsis: + return self + + have_slices, indices = _unellipsify(index, self.view.ndim) + + cdef char *itemp + if have_slices: + return memview_slice(self, indices) + else: + itemp = self.get_item_pointer(indices) + return self.convert_item_to_object(itemp) + + def __setitem__(memoryview self, object index, object value): + if self.view.readonly: + raise TypeError("Cannot assign to read-only memoryview") + + have_slices, index = _unellipsify(index, self.view.ndim) + + if have_slices: + obj = self.is_slice(value) + if obj: + self.setitem_slice_assignment(self[index], obj) + else: + self.setitem_slice_assign_scalar(self[index], value) + else: + self.setitem_indexed(index, value) + + cdef is_slice(self, obj): + if not isinstance(obj, memoryview): + try: + obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, + self.dtype_is_object) + except TypeError: + return None + + return obj + + cdef setitem_slice_assignment(self, dst, src): + cdef {{memviewslice_name}} dst_slice + cdef {{memviewslice_name}} src_slice + + memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], + get_slice_from_memview(dst, &dst_slice)[0], + src.ndim, dst.ndim, self.dtype_is_object) + + cdef setitem_slice_assign_scalar(self, memoryview dst, value): + cdef int array[128] + cdef void *tmp = NULL + cdef void *item + + cdef {{memviewslice_name}} *dst_slice + cdef {{memviewslice_name}} tmp_slice + dst_slice = get_slice_from_memview(dst, &tmp_slice) + + if self.view.itemsize > sizeof(array): + tmp = PyMem_Malloc(self.view.itemsize) + if tmp == NULL: + raise MemoryError + item = tmp + else: + item = array + + try: + if self.dtype_is_object: + ( item)[0] = value + else: + self.assign_item_from_object( item, value) + + # It would be easy to support indirect dimensions, but it's easier + # to disallow :) + if self.view.suboffsets != NULL: + assert_direct_dimensions(self.view.suboffsets, self.view.ndim) + slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, + item, self.dtype_is_object) + finally: + PyMem_Free(tmp) + + cdef setitem_indexed(self, index, value): + cdef char *itemp = self.get_item_pointer(index) + self.assign_item_from_object(itemp, value) + + cdef convert_item_to_object(self, char *itemp): + """Only used if instantiated manually by the user, or if Cython doesn't + know how to convert the type""" + import struct + cdef bytes bytesitem + # Do a manual and complete check here instead of this easy hack + bytesitem = itemp[:self.view.itemsize] + try: + result = struct.unpack(self.view.format, bytesitem) + except struct.error: + raise ValueError("Unable to convert item to object") + else: + if len(self.view.format) == 1: + return result[0] + return result + + cdef assign_item_from_object(self, char *itemp, object value): + """Only used if instantiated manually by the user, or if Cython doesn't + know how to convert the type""" + import struct + cdef char c + cdef bytes bytesvalue + cdef Py_ssize_t i + + if isinstance(value, tuple): + bytesvalue = struct.pack(self.view.format, *value) + else: + bytesvalue = struct.pack(self.view.format, value) + + for i, c in enumerate(bytesvalue): + itemp[i] = c + + @cname('getbuffer') + def __getbuffer__(self, Py_buffer *info, int flags): + if flags & PyBUF_WRITABLE and self.view.readonly: + raise ValueError("Cannot create writable memory view from read-only memoryview") + + if flags & PyBUF_ND: + info.shape = self.view.shape + else: + info.shape = NULL + + if flags & PyBUF_STRIDES: + info.strides = self.view.strides + else: + info.strides = NULL + + if flags & PyBUF_INDIRECT: + info.suboffsets = self.view.suboffsets + else: + info.suboffsets = NULL + + if flags & PyBUF_FORMAT: + info.format = self.view.format + else: + info.format = NULL + + info.buf = self.view.buf + info.ndim = self.view.ndim + info.itemsize = self.view.itemsize + info.len = self.view.len + info.readonly = self.view.readonly + info.obj = self + + __pyx_getbuffer = capsule( &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") + + # Some properties that have the same semantics as in NumPy + @property + def T(self): + cdef _memoryviewslice result = memoryview_copy(self) + transpose_memslice(&result.from_slice) + return result + + @property + def base(self): + return self.obj + + @property + def shape(self): + return tuple([length for length in self.view.shape[:self.view.ndim]]) + + @property + def strides(self): + if self.view.strides == NULL: + # Note: we always ask for strides, so if this is not set it's a bug + raise ValueError("Buffer view does not expose strides") + + return tuple([stride for stride in self.view.strides[:self.view.ndim]]) + + @property + def suboffsets(self): + if self.view.suboffsets == NULL: + return (-1,) * self.view.ndim + + return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) + + @property + def ndim(self): + return self.view.ndim + + @property + def itemsize(self): + return self.view.itemsize + + @property + def nbytes(self): + return self.size * self.view.itemsize + + @property + def size(self): + if self._size is None: + result = 1 + + for length in self.view.shape[:self.view.ndim]: + result *= length + + self._size = result + + return self._size + + def __len__(self): + if self.view.ndim >= 1: + return self.view.shape[0] + + return 0 + + def __repr__(self): + return "" % (self.base.__class__.__name__, + id(self)) + + def __str__(self): + return "" % (self.base.__class__.__name__,) + + # Support the same attributes as memoryview slices + def is_c_contig(self): + cdef {{memviewslice_name}} *mslice + cdef {{memviewslice_name}} tmp + mslice = get_slice_from_memview(self, &tmp) + return slice_is_contig(mslice[0], 'C', self.view.ndim) + + def is_f_contig(self): + cdef {{memviewslice_name}} *mslice + cdef {{memviewslice_name}} tmp + mslice = get_slice_from_memview(self, &tmp) + return slice_is_contig(mslice[0], 'F', self.view.ndim) + + def copy(self): + cdef {{memviewslice_name}} mslice + cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS + + slice_copy(self, &mslice) + mslice = slice_copy_contig(&mslice, "c", self.view.ndim, + self.view.itemsize, + flags|PyBUF_C_CONTIGUOUS, + self.dtype_is_object) + + return memoryview_copy_from_slice(self, &mslice) + + def copy_fortran(self): + cdef {{memviewslice_name}} src, dst + cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS + + slice_copy(self, &src) + dst = slice_copy_contig(&src, "fortran", self.view.ndim, + self.view.itemsize, + flags|PyBUF_F_CONTIGUOUS, + self.dtype_is_object) + + return memoryview_copy_from_slice(self, &dst) + + +@cname('__pyx_memoryview_new') +cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): + cdef memoryview result = memoryview(o, flags, dtype_is_object) + result.typeinfo = typeinfo + return result + +@cname('__pyx_memoryview_check') +cdef inline bint memoryview_check(object o): + return isinstance(o, memoryview) + +cdef tuple _unellipsify(object index, int ndim): + """ + Replace all ellipses with full slices and fill incomplete indices with + full slices. + """ + if not isinstance(index, tuple): + tup = (index,) + else: + tup = index + + result = [] + have_slices = False + seen_ellipsis = False + for idx, item in enumerate(tup): + if item is Ellipsis: + if not seen_ellipsis: + result.extend([slice(None)] * (ndim - len(tup) + 1)) + seen_ellipsis = True + else: + result.append(slice(None)) + have_slices = True + else: + if not isinstance(item, slice) and not PyIndex_Check(item): + raise TypeError("Cannot index with type '%s'" % type(item)) + + have_slices = have_slices or isinstance(item, slice) + result.append(item) + + nslices = ndim - len(result) + if nslices: + result.extend([slice(None)] * nslices) + + return have_slices or nslices, tuple(result) + +cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): + for suboffset in suboffsets[:ndim]: + if suboffset >= 0: + raise ValueError("Indirect dimensions not supported") + +# +### Slicing a memoryview +# + +@cname('__pyx_memview_slice') +cdef memoryview memview_slice(memoryview memview, object indices): + cdef int new_ndim = 0, suboffset_dim = -1, dim + cdef bint negative_step + cdef {{memviewslice_name}} src, dst + cdef {{memviewslice_name}} *p_src + + # dst is copied by value in memoryview_fromslice -- initialize it + # src is never copied + memset(&dst, 0, sizeof(dst)) + + cdef _memoryviewslice memviewsliceobj + + assert memview.view.ndim > 0 + + if isinstance(memview, _memoryviewslice): + memviewsliceobj = memview + p_src = &memviewsliceobj.from_slice + else: + slice_copy(memview, &src) + p_src = &src + + # Note: don't use variable src at this point + # SubNote: we should be able to declare variables in blocks... + + # memoryview_fromslice() will inc our dst slice + dst.memview = p_src.memview + dst.data = p_src.data + + # Put everything in temps to avoid this bloody warning: + # "Argument evaluation order in C function call is undefined and + # may not be as expected" + cdef {{memviewslice_name}} *p_dst = &dst + cdef int *p_suboffset_dim = &suboffset_dim + cdef Py_ssize_t start, stop, step + cdef bint have_start, have_stop, have_step + + for dim, index in enumerate(indices): + if PyIndex_Check(index): + slice_memviewslice( + p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], + dim, new_ndim, p_suboffset_dim, + index, 0, 0, # start, stop, step + 0, 0, 0, # have_{start,stop,step} + False) + elif index is None: + p_dst.shape[new_ndim] = 1 + p_dst.strides[new_ndim] = 0 + p_dst.suboffsets[new_ndim] = -1 + new_ndim += 1 + else: + start = index.start or 0 + stop = index.stop or 0 + step = index.step or 0 + + have_start = index.start is not None + have_stop = index.stop is not None + have_step = index.step is not None + + slice_memviewslice( + p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], + dim, new_ndim, p_suboffset_dim, + start, stop, step, + have_start, have_stop, have_step, + True) + new_ndim += 1 + + if isinstance(memview, _memoryviewslice): + return memoryview_fromslice(dst, new_ndim, + memviewsliceobj.to_object_func, + memviewsliceobj.to_dtype_func, + memview.dtype_is_object) + else: + return memoryview_fromslice(dst, new_ndim, NULL, NULL, + memview.dtype_is_object) + + +# +### Slicing in a single dimension of a memoryviewslice +# + +cdef extern from "": + void abort() nogil + void printf(char *s, ...) nogil + +cdef extern from "": + ctypedef struct FILE + FILE *stderr + int fputs(char *s, FILE *stream) + +cdef extern from "pystate.h": + void PyThreadState_Get() nogil + + # These are not actually nogil, but we check for the GIL before calling them + void PyErr_SetString(PyObject *type, char *msg) nogil + PyObject *PyErr_Format(PyObject *exc, char *msg, ...) nogil + +@cname('__pyx_memoryview_slice_memviewslice') +cdef int slice_memviewslice( + {{memviewslice_name}} *dst, + Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset, + int dim, int new_ndim, int *suboffset_dim, + Py_ssize_t start, Py_ssize_t stop, Py_ssize_t step, + int have_start, int have_stop, int have_step, + bint is_slice) nogil except -1: + """ + Create a new slice dst given slice src. + + dim - the current src dimension (indexing will make dimensions + disappear) + new_dim - the new dst dimension + suboffset_dim - pointer to a single int initialized to -1 to keep track of + where slicing offsets should be added + """ + + cdef Py_ssize_t new_shape + cdef bint negative_step + + if not is_slice: + # index is a normal integer-like index + if start < 0: + start += shape + if not 0 <= start < shape: + _err_dim(IndexError, "Index out of bounds (axis %d)", dim) + else: + # index is a slice + negative_step = have_step != 0 and step < 0 + + if have_step and step == 0: + _err_dim(ValueError, "Step may not be zero (axis %d)", dim) + + # check our bounds and set defaults + if have_start: + if start < 0: + start += shape + if start < 0: + start = 0 + elif start >= shape: + if negative_step: + start = shape - 1 + else: + start = shape + else: + if negative_step: + start = shape - 1 + else: + start = 0 + + if have_stop: + if stop < 0: + stop += shape + if stop < 0: + stop = 0 + elif stop > shape: + stop = shape + else: + if negative_step: + stop = -1 + else: + stop = shape + + if not have_step: + step = 1 + + # len = ceil( (stop - start) / step ) + with cython.cdivision(True): + new_shape = (stop - start) // step + + if (stop - start) - step * new_shape: + new_shape += 1 + + if new_shape < 0: + new_shape = 0 + + # shape/strides/suboffsets + dst.strides[new_ndim] = stride * step + dst.shape[new_ndim] = new_shape + dst.suboffsets[new_ndim] = suboffset + + # Add the slicing or idexing offsets to the right suboffset or base data * + if suboffset_dim[0] < 0: + dst.data += start * stride + else: + dst.suboffsets[suboffset_dim[0]] += start * stride + + if suboffset >= 0: + if not is_slice: + if new_ndim == 0: + dst.data = ( dst.data)[0] + suboffset + else: + _err_dim(IndexError, "All dimensions preceding dimension %d " + "must be indexed and not sliced", dim) + else: + suboffset_dim[0] = new_ndim + + return 0 + +# +### Index a memoryview +# +@cname('__pyx_pybuffer_index') +cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, + Py_ssize_t dim) except NULL: + cdef Py_ssize_t shape, stride, suboffset = -1 + cdef Py_ssize_t itemsize = view.itemsize + cdef char *resultp + + if view.ndim == 0: + shape = view.len / itemsize + stride = itemsize + else: + shape = view.shape[dim] + stride = view.strides[dim] + if view.suboffsets != NULL: + suboffset = view.suboffsets[dim] + + if index < 0: + index += view.shape[dim] + if index < 0: + raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + + if index >= shape: + raise IndexError("Out of bounds on buffer access (axis %d)" % dim) + + resultp = bufp + index * stride + if suboffset >= 0: + resultp = ( resultp)[0] + suboffset + + return resultp + +# +### Transposing a memoryviewslice +# +@cname('__pyx_memslice_transpose') +cdef int transpose_memslice({{memviewslice_name}} *memslice) nogil except 0: + cdef int ndim = memslice.memview.view.ndim + + cdef Py_ssize_t *shape = memslice.shape + cdef Py_ssize_t *strides = memslice.strides + + # reverse strides and shape + cdef int i, j + for i in range(ndim / 2): + j = ndim - 1 - i + strides[i], strides[j] = strides[j], strides[i] + shape[i], shape[j] = shape[j], shape[i] + + if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: + _err(ValueError, "Cannot transpose memoryview with indirect dimensions") + + return 1 + +# +### Creating new memoryview objects from slices and memoryviews +# +@cname('__pyx_memoryviewslice') +cdef class _memoryviewslice(memoryview): + "Internal class for passing memoryview slices to Python" + + # We need this to keep our shape/strides/suboffset pointers valid + cdef {{memviewslice_name}} from_slice + # We need this only to print it's class' name + cdef object from_object + + cdef object (*to_object_func)(char *) + cdef int (*to_dtype_func)(char *, object) except 0 + + def __dealloc__(self): + __PYX_XDEC_MEMVIEW(&self.from_slice, 1) + + cdef convert_item_to_object(self, char *itemp): + if self.to_object_func != NULL: + return self.to_object_func(itemp) + else: + return memoryview.convert_item_to_object(self, itemp) + + cdef assign_item_from_object(self, char *itemp, object value): + if self.to_dtype_func != NULL: + self.to_dtype_func(itemp, value) + else: + memoryview.assign_item_from_object(self, itemp, value) + + @property + def base(self): + return self.from_object + + __pyx_getbuffer = capsule( &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") + + +@cname('__pyx_memoryview_fromslice') +cdef memoryview_fromslice({{memviewslice_name}} memviewslice, + int ndim, + object (*to_object_func)(char *), + int (*to_dtype_func)(char *, object) except 0, + bint dtype_is_object): + + cdef _memoryviewslice result + + if memviewslice.memview == Py_None: + return None + + # assert 0 < ndim <= memviewslice.memview.view.ndim, ( + # ndim, memviewslice.memview.view.ndim) + + result = _memoryviewslice(None, 0, dtype_is_object) + + result.from_slice = memviewslice + __PYX_INC_MEMVIEW(&memviewslice, 1) + + result.from_object = ( memviewslice.memview).base + result.typeinfo = memviewslice.memview.typeinfo + + result.view = memviewslice.memview.view + result.view.buf = memviewslice.data + result.view.ndim = ndim + (<__pyx_buffer *> &result.view).obj = Py_None + Py_INCREF(Py_None) + + if (memviewslice.memview).flags & PyBUF_WRITABLE: + result.flags = PyBUF_RECORDS + else: + result.flags = PyBUF_RECORDS_RO + + result.view.shape = result.from_slice.shape + result.view.strides = result.from_slice.strides + + # only set suboffsets if actually used, otherwise set to NULL to improve compatibility + result.view.suboffsets = NULL + for suboffset in result.from_slice.suboffsets[:ndim]: + if suboffset >= 0: + result.view.suboffsets = result.from_slice.suboffsets + break + + result.view.len = result.view.itemsize + for length in result.view.shape[:ndim]: + result.view.len *= length + + result.to_object_func = to_object_func + result.to_dtype_func = to_dtype_func + + return result + +@cname('__pyx_memoryview_get_slice_from_memoryview') +cdef {{memviewslice_name}} *get_slice_from_memview(memoryview memview, + {{memviewslice_name}} *mslice) except NULL: + cdef _memoryviewslice obj + if isinstance(memview, _memoryviewslice): + obj = memview + return &obj.from_slice + else: + slice_copy(memview, mslice) + return mslice + +@cname('__pyx_memoryview_slice_copy') +cdef void slice_copy(memoryview memview, {{memviewslice_name}} *dst): + cdef int dim + cdef (Py_ssize_t*) shape, strides, suboffsets + + shape = memview.view.shape + strides = memview.view.strides + suboffsets = memview.view.suboffsets + + dst.memview = <__pyx_memoryview *> memview + dst.data = memview.view.buf + + for dim in range(memview.view.ndim): + dst.shape[dim] = shape[dim] + dst.strides[dim] = strides[dim] + dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 + +@cname('__pyx_memoryview_copy_object') +cdef memoryview_copy(memoryview memview): + "Create a new memoryview object" + cdef {{memviewslice_name}} memviewslice + slice_copy(memview, &memviewslice) + return memoryview_copy_from_slice(memview, &memviewslice) + +@cname('__pyx_memoryview_copy_object_from_slice') +cdef memoryview_copy_from_slice(memoryview memview, {{memviewslice_name}} *memviewslice): + """ + Create a new memoryview object from a given memoryview object and slice. + """ + cdef object (*to_object_func)(char *) + cdef int (*to_dtype_func)(char *, object) except 0 + + if isinstance(memview, _memoryviewslice): + to_object_func = (<_memoryviewslice> memview).to_object_func + to_dtype_func = (<_memoryviewslice> memview).to_dtype_func + else: + to_object_func = NULL + to_dtype_func = NULL + + return memoryview_fromslice(memviewslice[0], memview.view.ndim, + to_object_func, to_dtype_func, + memview.dtype_is_object) + + +# +### Copy the contents of a memoryview slices +# +cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: + if arg < 0: + return -arg + else: + return arg + +@cname('__pyx_get_best_slice_order') +cdef char get_best_order({{memviewslice_name}} *mslice, int ndim) nogil: + """ + Figure out the best memory access order for a given slice. + """ + cdef int i + cdef Py_ssize_t c_stride = 0 + cdef Py_ssize_t f_stride = 0 + + for i in range(ndim - 1, -1, -1): + if mslice.shape[i] > 1: + c_stride = mslice.strides[i] + break + + for i in range(ndim): + if mslice.shape[i] > 1: + f_stride = mslice.strides[i] + break + + if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): + return 'C' + else: + return 'F' + +@cython.cdivision(True) +cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, + char *dst_data, Py_ssize_t *dst_strides, + Py_ssize_t *src_shape, Py_ssize_t *dst_shape, + int ndim, size_t itemsize) nogil: + # Note: src_extent is 1 if we're broadcasting + # dst_extent always >= src_extent as we don't do reductions + cdef Py_ssize_t i + cdef Py_ssize_t src_extent = src_shape[0] + cdef Py_ssize_t dst_extent = dst_shape[0] + cdef Py_ssize_t src_stride = src_strides[0] + cdef Py_ssize_t dst_stride = dst_strides[0] + + if ndim == 1: + if (src_stride > 0 and dst_stride > 0 and + src_stride == itemsize == dst_stride): + memcpy(dst_data, src_data, itemsize * dst_extent) + else: + for i in range(dst_extent): + memcpy(dst_data, src_data, itemsize) + src_data += src_stride + dst_data += dst_stride + else: + for i in range(dst_extent): + _copy_strided_to_strided(src_data, src_strides + 1, + dst_data, dst_strides + 1, + src_shape + 1, dst_shape + 1, + ndim - 1, itemsize) + src_data += src_stride + dst_data += dst_stride + +cdef void copy_strided_to_strided({{memviewslice_name}} *src, + {{memviewslice_name}} *dst, + int ndim, size_t itemsize) nogil: + _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, + src.shape, dst.shape, ndim, itemsize) + +@cname('__pyx_memoryview_slice_get_size') +cdef Py_ssize_t slice_get_size({{memviewslice_name}} *src, int ndim) nogil: + "Return the size of the memory occupied by the slice in number of bytes" + cdef Py_ssize_t shape, size = src.memview.view.itemsize + + for shape in src.shape[:ndim]: + size *= shape + + return size + +@cname('__pyx_fill_contig_strides_array') +cdef Py_ssize_t fill_contig_strides_array( + Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride, + int ndim, char order) nogil: + """ + Fill the strides array for a slice with C or F contiguous strides. + This is like PyBuffer_FillContiguousStrides, but compatible with py < 2.6 + """ + cdef int idx + + if order == 'F': + for idx in range(ndim): + strides[idx] = stride + stride *= shape[idx] + else: + for idx in range(ndim - 1, -1, -1): + strides[idx] = stride + stride *= shape[idx] + + return stride + +@cname('__pyx_memoryview_copy_data_to_temp') +cdef void *copy_data_to_temp({{memviewslice_name}} *src, + {{memviewslice_name}} *tmpslice, + char order, + int ndim) nogil except NULL: + """ + Copy a direct slice to temporary contiguous memory. The caller should free + the result when done. + """ + cdef int i + cdef void *result + + cdef size_t itemsize = src.memview.view.itemsize + cdef size_t size = slice_get_size(src, ndim) + + result = malloc(size) + if not result: + _err(MemoryError, NULL) + + # tmpslice[0] = src + tmpslice.data = result + tmpslice.memview = src.memview + for i in range(ndim): + tmpslice.shape[i] = src.shape[i] + tmpslice.suboffsets[i] = -1 + + fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, + ndim, order) + + # We need to broadcast strides again + for i in range(ndim): + if tmpslice.shape[i] == 1: + tmpslice.strides[i] = 0 + + if slice_is_contig(src[0], order, ndim): + memcpy(result, src.data, size) + else: + copy_strided_to_strided(src, tmpslice, ndim, itemsize) + + return result + +# Use 'with gil' functions and avoid 'with gil' blocks, as the code within the blocks +# has temporaries that need the GIL to clean up +@cname('__pyx_memoryview_err_extents') +cdef int _err_extents(int i, Py_ssize_t extent1, + Py_ssize_t extent2) except -1 with gil: + raise ValueError("got differing extents in dimension %d (got %d and %d)" % + (i, extent1, extent2)) + +@cname('__pyx_memoryview_err_dim') +cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: + raise error(msg.decode('ascii') % dim) + +@cname('__pyx_memoryview_err') +cdef int _err(object error, char *msg) except -1 with gil: + if msg != NULL: + raise error(msg.decode('ascii')) + else: + raise error + +@cname('__pyx_memoryview_copy_contents') +cdef int memoryview_copy_contents({{memviewslice_name}} src, + {{memviewslice_name}} dst, + int src_ndim, int dst_ndim, + bint dtype_is_object) nogil except -1: + """ + Copy memory from slice src to slice dst. + Check for overlapping memory and verify the shapes. + """ + cdef void *tmpdata = NULL + cdef size_t itemsize = src.memview.view.itemsize + cdef int i + cdef char order = get_best_order(&src, src_ndim) + cdef bint broadcasting = False + cdef bint direct_copy = False + cdef {{memviewslice_name}} tmp + + if src_ndim < dst_ndim: + broadcast_leading(&src, src_ndim, dst_ndim) + elif dst_ndim < src_ndim: + broadcast_leading(&dst, dst_ndim, src_ndim) + + cdef int ndim = max(src_ndim, dst_ndim) + + for i in range(ndim): + if src.shape[i] != dst.shape[i]: + if src.shape[i] == 1: + broadcasting = True + src.strides[i] = 0 + else: + _err_extents(i, dst.shape[i], src.shape[i]) + + if src.suboffsets[i] >= 0: + _err_dim(ValueError, "Dimension %d is not direct", i) + + if slices_overlap(&src, &dst, ndim, itemsize): + # slices overlap, copy to temp, copy temp to dst + if not slice_is_contig(src, order, ndim): + order = get_best_order(&dst, ndim) + + tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) + src = tmp + + if not broadcasting: + # See if both slices have equal contiguity, in that case perform a + # direct copy. This only works when we are not broadcasting. + if slice_is_contig(src, 'C', ndim): + direct_copy = slice_is_contig(dst, 'C', ndim) + elif slice_is_contig(src, 'F', ndim): + direct_copy = slice_is_contig(dst, 'F', ndim) + + if direct_copy: + # Contiguous slices with same order + refcount_copying(&dst, dtype_is_object, ndim, False) + memcpy(dst.data, src.data, slice_get_size(&src, ndim)) + refcount_copying(&dst, dtype_is_object, ndim, True) + free(tmpdata) + return 0 + + if order == 'F' == get_best_order(&dst, ndim): + # see if both slices have Fortran order, transpose them to match our + # C-style indexing order + transpose_memslice(&src) + transpose_memslice(&dst) + + refcount_copying(&dst, dtype_is_object, ndim, False) + copy_strided_to_strided(&src, &dst, ndim, itemsize) + refcount_copying(&dst, dtype_is_object, ndim, True) + + free(tmpdata) + return 0 + +@cname('__pyx_memoryview_broadcast_leading') +cdef void broadcast_leading({{memviewslice_name}} *mslice, + int ndim, + int ndim_other) nogil: + cdef int i + cdef int offset = ndim_other - ndim + + for i in range(ndim - 1, -1, -1): + mslice.shape[i + offset] = mslice.shape[i] + mslice.strides[i + offset] = mslice.strides[i] + mslice.suboffsets[i + offset] = mslice.suboffsets[i] + + for i in range(offset): + mslice.shape[i] = 1 + mslice.strides[i] = mslice.strides[0] + mslice.suboffsets[i] = -1 + +# +### Take care of refcounting the objects in slices. Do this separately from any copying, +### to minimize acquiring the GIL +# + +@cname('__pyx_memoryview_refcount_copying') +cdef void refcount_copying({{memviewslice_name}} *dst, bint dtype_is_object, + int ndim, bint inc) nogil: + # incref or decref the objects in the destination slice if the dtype is + # object + if dtype_is_object: + refcount_objects_in_slice_with_gil(dst.data, dst.shape, + dst.strides, ndim, inc) + +@cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') +cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, + Py_ssize_t *strides, int ndim, + bint inc) with gil: + refcount_objects_in_slice(data, shape, strides, ndim, inc) + +@cname('__pyx_memoryview_refcount_objects_in_slice') +cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, + Py_ssize_t *strides, int ndim, bint inc): + cdef Py_ssize_t i + + for i in range(shape[0]): + if ndim == 1: + if inc: + Py_INCREF(( data)[0]) + else: + Py_DECREF(( data)[0]) + else: + refcount_objects_in_slice(data, shape + 1, strides + 1, + ndim - 1, inc) + + data += strides[0] + +# +### Scalar to slice assignment +# +@cname('__pyx_memoryview_slice_assign_scalar') +cdef void slice_assign_scalar({{memviewslice_name}} *dst, int ndim, + size_t itemsize, void *item, + bint dtype_is_object) nogil: + refcount_copying(dst, dtype_is_object, ndim, False) + _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, + itemsize, item) + refcount_copying(dst, dtype_is_object, ndim, True) + + +@cname('__pyx_memoryview__slice_assign_scalar') +cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, + Py_ssize_t *strides, int ndim, + size_t itemsize, void *item) nogil: + cdef Py_ssize_t i + cdef Py_ssize_t stride = strides[0] + cdef Py_ssize_t extent = shape[0] + + if ndim == 1: + for i in range(extent): + memcpy(data, item, itemsize) + data += stride + else: + for i in range(extent): + _slice_assign_scalar(data, shape + 1, strides + 1, + ndim - 1, itemsize, item) + data += stride + + +############### BufferFormatFromTypeInfo ############### +cdef extern from *: + ctypedef struct __Pyx_StructField + + cdef enum: + __PYX_BUF_FLAGS_PACKED_STRUCT + __PYX_BUF_FLAGS_INTEGER_COMPLEX + + ctypedef struct __Pyx_TypeInfo: + char* name + __Pyx_StructField* fields + size_t size + size_t arraysize[8] + int ndim + char typegroup + char is_unsigned + int flags + + ctypedef struct __Pyx_StructField: + __Pyx_TypeInfo* type + char* name + size_t offset + + ctypedef struct __Pyx_BufFmt_StackElem: + __Pyx_StructField* field + size_t parent_offset + + #ctypedef struct __Pyx_BufFmt_Context: + # __Pyx_StructField root + __Pyx_BufFmt_StackElem* head + + struct __pyx_typeinfo_string: + char string[3] + + __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *) + + +@cname('__pyx_format_from_typeinfo') +cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): + cdef __Pyx_StructField *field + cdef __pyx_typeinfo_string fmt + cdef bytes part, result + + if type.typegroup == 'S': + assert type.fields != NULL + assert type.fields.type != NULL + + if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: + alignment = b'^' + else: + alignment = b'' + + parts = [b"T{"] + field = type.fields + + while field.type: + part = format_from_typeinfo(field.type) + parts.append(part + b':' + field.name + b':') + field += 1 + + result = alignment.join(parts) + b'}' + else: + fmt = __Pyx_TypeInfoToFormat(type) + if type.arraysize[0]: + extents = [unicode(type.arraysize[i]) for i in range(type.ndim)] + result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string + else: + result = fmt.string + + return result diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/MemoryView_C.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/MemoryView_C.c new file mode 100644 index 00000000000..0a5d8ee2c2f --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/MemoryView_C.c @@ -0,0 +1,945 @@ +////////// MemviewSliceStruct.proto ////////// +//@proto_block: utility_code_proto_before_types + +/* memoryview slice struct */ +struct {{memview_struct_name}}; + +typedef struct { + struct {{memview_struct_name}} *memview; + char *data; + Py_ssize_t shape[{{max_dims}}]; + Py_ssize_t strides[{{max_dims}}]; + Py_ssize_t suboffsets[{{max_dims}}]; +} {{memviewslice_name}}; + +// used for "len(memviewslice)" +#define __Pyx_MemoryView_Len(m) (m.shape[0]) + + +/////////// Atomics.proto ///////////// +//@proto_block: utility_code_proto_before_types + +#include + +#ifndef CYTHON_ATOMICS + #define CYTHON_ATOMICS 1 +#endif + +#define __pyx_atomic_int_type int +// todo: Portland pgcc, maybe OS X's OSAtomicIncrement32, +// libatomic + autotools-like distutils support? Such a pain... +#if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 || \ + (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) && \ + !defined(__i386__) + /* gcc >= 4.1.2 */ + #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1) + #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1) + + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using GNU atomics" + #endif +#elif CYTHON_ATOMICS && defined(_MSC_VER) && 0 + /* msvc */ + #include + #undef __pyx_atomic_int_type + #define __pyx_atomic_int_type LONG + #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value) + #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value) + + #ifdef __PYX_DEBUG_ATOMICS + #pragma message ("Using MSVC atomics") + #endif +#elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0 + #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value) + #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value) + + #ifdef __PYX_DEBUG_ATOMICS + #warning "Using Intel atomics" + #endif +#else + #undef CYTHON_ATOMICS + #define CYTHON_ATOMICS 0 + + #ifdef __PYX_DEBUG_ATOMICS + #warning "Not using atomics" + #endif +#endif + +typedef volatile __pyx_atomic_int_type __pyx_atomic_int; + +#if CYTHON_ATOMICS + #define __pyx_add_acquisition_count(memview) \ + __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview) \ + __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock) +#else + #define __pyx_add_acquisition_count(memview) \ + __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) + #define __pyx_sub_acquisition_count(memview) \ + __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) +#endif + + +/////////////// ObjectToMemviewSlice.proto /////////////// + +static CYTHON_INLINE {{memviewslice_name}} {{funcname}}(PyObject *, int writable_flag); + + +////////// MemviewSliceInit.proto ////////// + +#define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d + +#define __Pyx_MEMVIEW_DIRECT 1 +#define __Pyx_MEMVIEW_PTR 2 +#define __Pyx_MEMVIEW_FULL 4 +#define __Pyx_MEMVIEW_CONTIG 8 +#define __Pyx_MEMVIEW_STRIDED 16 +#define __Pyx_MEMVIEW_FOLLOW 32 + +#define __Pyx_IS_C_CONTIG 1 +#define __Pyx_IS_F_CONTIG 2 + +static int __Pyx_init_memviewslice( + struct __pyx_memoryview_obj *memview, + int ndim, + __Pyx_memviewslice *memviewslice, + int memview_is_new_reference); + +static CYTHON_INLINE int __pyx_add_acquisition_count_locked( + __pyx_atomic_int *acquisition_count, PyThread_type_lock lock); +static CYTHON_INLINE int __pyx_sub_acquisition_count_locked( + __pyx_atomic_int *acquisition_count, PyThread_type_lock lock); + +#define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p) +#define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview)) +#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__) +#define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__) +static CYTHON_INLINE void __Pyx_INC_MEMVIEW({{memviewslice_name}} *, int, int); +static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW({{memviewslice_name}} *, int, int); + + +/////////////// MemviewSliceIndex.proto /////////////// + +static CYTHON_INLINE char *__pyx_memviewslice_index_full( + const char *bufp, Py_ssize_t idx, Py_ssize_t stride, Py_ssize_t suboffset); + + +/////////////// ObjectToMemviewSlice /////////////// +//@requires: MemviewSliceValidateAndInit + +static CYTHON_INLINE {{memviewslice_name}} {{funcname}}(PyObject *obj, int writable_flag) { + {{memviewslice_name}} result = {{memslice_init}}; + __Pyx_BufFmt_StackElem stack[{{struct_nesting_depth}}]; + int axes_specs[] = { {{axes_specs}} }; + int retcode; + + if (obj == Py_None) { + /* We don't bother to refcount None */ + result.memview = (struct __pyx_memoryview_obj *) Py_None; + return result; + } + + retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, {{c_or_f_flag}}, + {{buf_flag}} | writable_flag, {{ndim}}, + &{{dtype_typeinfo}}, stack, + &result, obj); + + if (unlikely(retcode == -1)) + goto __pyx_fail; + + return result; +__pyx_fail: + result.memview = NULL; + result.data = NULL; + return result; +} + + +/////////////// MemviewSliceValidateAndInit.proto /////////////// + +static int __Pyx_ValidateAndInit_memviewslice( + int *axes_specs, + int c_or_f_flag, + int buf_flags, + int ndim, + __Pyx_TypeInfo *dtype, + __Pyx_BufFmt_StackElem stack[], + __Pyx_memviewslice *memviewslice, + PyObject *original_obj); + +/////////////// MemviewSliceValidateAndInit /////////////// +//@requires: Buffer.c::TypeInfoCompare +//@requires: Buffer.c::BufferFormatStructs +//@requires: Buffer.c::BufferFormatCheck + +static int +__pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec) +{ + if (buf->shape[dim] <= 1) + return 1; + + if (buf->strides) { + if (spec & __Pyx_MEMVIEW_CONTIG) { + if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) { + if (unlikely(buf->strides[dim] != sizeof(void *))) { + PyErr_Format(PyExc_ValueError, + "Buffer is not indirectly contiguous " + "in dimension %d.", dim); + goto fail; + } + } else if (unlikely(buf->strides[dim] != buf->itemsize)) { + PyErr_SetString(PyExc_ValueError, + "Buffer and memoryview are not contiguous " + "in the same dimension."); + goto fail; + } + } + + if (spec & __Pyx_MEMVIEW_FOLLOW) { + Py_ssize_t stride = buf->strides[dim]; + if (stride < 0) + stride = -stride; + if (unlikely(stride < buf->itemsize)) { + PyErr_SetString(PyExc_ValueError, + "Buffer and memoryview are not contiguous " + "in the same dimension."); + goto fail; + } + } + } else { + if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) { + PyErr_Format(PyExc_ValueError, + "C-contiguous buffer is not contiguous in " + "dimension %d", dim); + goto fail; + } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) { + PyErr_Format(PyExc_ValueError, + "C-contiguous buffer is not indirect in " + "dimension %d", dim); + goto fail; + } else if (unlikely(buf->suboffsets)) { + PyErr_SetString(PyExc_ValueError, + "Buffer exposes suboffsets but no strides"); + goto fail; + } + } + + return 1; +fail: + return 0; +} + +static int +__pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec) +{ + // Todo: without PyBUF_INDIRECT we may not have suboffset information, i.e., the + // ptr may not be set to NULL but may be uninitialized? + if (spec & __Pyx_MEMVIEW_DIRECT) { + if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) { + PyErr_Format(PyExc_ValueError, + "Buffer not compatible with direct access " + "in dimension %d.", dim); + goto fail; + } + } + + if (spec & __Pyx_MEMVIEW_PTR) { + if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) { + PyErr_Format(PyExc_ValueError, + "Buffer is not indirectly accessible " + "in dimension %d.", dim); + goto fail; + } + } + + return 1; +fail: + return 0; +} + +static int +__pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag) +{ + int i; + + if (c_or_f_flag & __Pyx_IS_F_CONTIG) { + Py_ssize_t stride = 1; + for (i = 0; i < ndim; i++) { + if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) { + PyErr_SetString(PyExc_ValueError, + "Buffer not fortran contiguous."); + goto fail; + } + stride = stride * buf->shape[i]; + } + } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) { + Py_ssize_t stride = 1; + for (i = ndim - 1; i >- 1; i--) { + if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) { + PyErr_SetString(PyExc_ValueError, + "Buffer not C contiguous."); + goto fail; + } + stride = stride * buf->shape[i]; + } + } + + return 1; +fail: + return 0; +} + +static int __Pyx_ValidateAndInit_memviewslice( + int *axes_specs, + int c_or_f_flag, + int buf_flags, + int ndim, + __Pyx_TypeInfo *dtype, + __Pyx_BufFmt_StackElem stack[], + __Pyx_memviewslice *memviewslice, + PyObject *original_obj) +{ + struct __pyx_memoryview_obj *memview, *new_memview; + __Pyx_RefNannyDeclarations + Py_buffer *buf; + int i, spec = 0, retval = -1; + __Pyx_BufFmt_Context ctx; + int from_memoryview = __pyx_memoryview_check(original_obj); + + __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0); + + if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *) + original_obj)->typeinfo)) { + /* We have a matching dtype, skip format parsing */ + memview = (struct __pyx_memoryview_obj *) original_obj; + new_memview = NULL; + } else { + memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( + original_obj, buf_flags, 0, dtype); + new_memview = memview; + if (unlikely(!memview)) + goto fail; + } + + buf = &memview->view; + if (unlikely(buf->ndim != ndim)) { + PyErr_Format(PyExc_ValueError, + "Buffer has wrong number of dimensions (expected %d, got %d)", + ndim, buf->ndim); + goto fail; + } + + if (new_memview) { + __Pyx_BufFmt_Init(&ctx, stack, dtype); + if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail; + } + + if (unlikely((unsigned) buf->itemsize != dtype->size)) { + PyErr_Format(PyExc_ValueError, + "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) " + "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)", + buf->itemsize, + (buf->itemsize > 1) ? "s" : "", + dtype->name, + dtype->size, + (dtype->size > 1) ? "s" : ""); + goto fail; + } + + /* Check axes */ + if (buf->len > 0) { + // 0-sized arrays do not undergo these checks since their strides are + // irrelevant and they are always both C- and F-contiguous. + for (i = 0; i < ndim; i++) { + spec = axes_specs[i]; + if (unlikely(!__pyx_check_strides(buf, i, ndim, spec))) + goto fail; + if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec))) + goto fail; + } + + /* Check contiguity */ + if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag))) + goto fail; + } + + /* Initialize */ + if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice, + new_memview != NULL) == -1)) { + goto fail; + } + + retval = 0; + goto no_fail; + +fail: + Py_XDECREF(new_memview); + retval = -1; + +no_fail: + __Pyx_RefNannyFinishContext(); + return retval; +} + + +////////// MemviewSliceInit ////////// + +static int +__Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview, + int ndim, + {{memviewslice_name}} *memviewslice, + int memview_is_new_reference) +{ + __Pyx_RefNannyDeclarations + int i, retval=-1; + Py_buffer *buf = &memview->view; + __Pyx_RefNannySetupContext("init_memviewslice", 0); + + if (unlikely(memviewslice->memview || memviewslice->data)) { + PyErr_SetString(PyExc_ValueError, + "memviewslice is already initialized!"); + goto fail; + } + + if (buf->strides) { + for (i = 0; i < ndim; i++) { + memviewslice->strides[i] = buf->strides[i]; + } + } else { + Py_ssize_t stride = buf->itemsize; + for (i = ndim - 1; i >= 0; i--) { + memviewslice->strides[i] = stride; + stride *= buf->shape[i]; + } + } + + for (i = 0; i < ndim; i++) { + memviewslice->shape[i] = buf->shape[i]; + if (buf->suboffsets) { + memviewslice->suboffsets[i] = buf->suboffsets[i]; + } else { + memviewslice->suboffsets[i] = -1; + } + } + + memviewslice->memview = memview; + memviewslice->data = (char *)buf->buf; + if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) { + Py_INCREF(memview); + } + retval = 0; + goto no_fail; + +fail: + /* Don't decref, the memoryview may be borrowed. Let the caller do the cleanup */ + /* __Pyx_XDECREF(memviewslice->memview); */ + memviewslice->memview = 0; + memviewslice->data = 0; + retval = -1; +no_fail: + __Pyx_RefNannyFinishContext(); + return retval; +} + +#ifndef Py_NO_RETURN +// available since Py3.3 +#define Py_NO_RETURN +#endif + +static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN { + va_list vargs; + char msg[200]; + +#ifdef HAVE_STDARG_PROTOTYPES + va_start(vargs, fmt); +#else + va_start(vargs); +#endif + vsnprintf(msg, 200, fmt, vargs); + va_end(vargs); + + Py_FatalError(msg); +} + +static CYTHON_INLINE int +__pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count, + PyThread_type_lock lock) +{ + int result; + PyThread_acquire_lock(lock, 1); + result = (*acquisition_count)++; + PyThread_release_lock(lock); + return result; +} + +static CYTHON_INLINE int +__pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count, + PyThread_type_lock lock) +{ + int result; + PyThread_acquire_lock(lock, 1); + result = (*acquisition_count)--; + PyThread_release_lock(lock); + return result; +} + + +static CYTHON_INLINE void +__Pyx_INC_MEMVIEW({{memviewslice_name}} *memslice, int have_gil, int lineno) +{ + int first_time; + struct {{memview_struct_name}} *memview = memslice->memview; + if (unlikely(!memview || (PyObject *) memview == Py_None)) + return; /* allow uninitialized memoryview assignment */ + + if (unlikely(__pyx_get_slice_count(memview) < 0)) + __pyx_fatalerror("Acquisition count is %d (line %d)", + __pyx_get_slice_count(memview), lineno); + + first_time = __pyx_add_acquisition_count(memview) == 0; + + if (unlikely(first_time)) { + if (have_gil) { + Py_INCREF((PyObject *) memview); + } else { + PyGILState_STATE _gilstate = PyGILState_Ensure(); + Py_INCREF((PyObject *) memview); + PyGILState_Release(_gilstate); + } + } +} + +static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW({{memviewslice_name}} *memslice, + int have_gil, int lineno) { + int last_time; + struct {{memview_struct_name}} *memview = memslice->memview; + + if (unlikely(!memview || (PyObject *) memview == Py_None)) { + // we do not ref-count None + memslice->memview = NULL; + return; + } + + if (unlikely(__pyx_get_slice_count(memview) <= 0)) + __pyx_fatalerror("Acquisition count is %d (line %d)", + __pyx_get_slice_count(memview), lineno); + + last_time = __pyx_sub_acquisition_count(memview) == 1; + memslice->data = NULL; + + if (unlikely(last_time)) { + if (have_gil) { + Py_CLEAR(memslice->memview); + } else { + PyGILState_STATE _gilstate = PyGILState_Ensure(); + Py_CLEAR(memslice->memview); + PyGILState_Release(_gilstate); + } + } else { + memslice->memview = NULL; + } +} + + +////////// MemviewSliceCopyTemplate.proto ////////// + +static {{memviewslice_name}} +__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, + const char *mode, int ndim, + size_t sizeof_dtype, int contig_flag, + int dtype_is_object); + + +////////// MemviewSliceCopyTemplate ////////// + +static {{memviewslice_name}} +__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, + const char *mode, int ndim, + size_t sizeof_dtype, int contig_flag, + int dtype_is_object) +{ + __Pyx_RefNannyDeclarations + int i; + __Pyx_memviewslice new_mvs = {{memslice_init}}; + struct __pyx_memoryview_obj *from_memview = from_mvs->memview; + Py_buffer *buf = &from_memview->view; + PyObject *shape_tuple = NULL; + PyObject *temp_int = NULL; + struct __pyx_array_obj *array_obj = NULL; + struct __pyx_memoryview_obj *memview_obj = NULL; + + __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0); + + for (i = 0; i < ndim; i++) { + if (unlikely(from_mvs->suboffsets[i] >= 0)) { + PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with " + "indirect dimensions (axis %d)", i); + goto fail; + } + } + + shape_tuple = PyTuple_New(ndim); + if (unlikely(!shape_tuple)) { + goto fail; + } + __Pyx_GOTREF(shape_tuple); + + + for(i = 0; i < ndim; i++) { + temp_int = PyInt_FromSsize_t(from_mvs->shape[i]); + if(unlikely(!temp_int)) { + goto fail; + } else { + PyTuple_SET_ITEM(shape_tuple, i, temp_int); + temp_int = NULL; + } + } + + array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL); + if (unlikely(!array_obj)) { + goto fail; + } + __Pyx_GOTREF(array_obj); + + memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( + (PyObject *) array_obj, contig_flag, + dtype_is_object, + from_mvs->memview->typeinfo); + if (unlikely(!memview_obj)) + goto fail; + + /* initialize new_mvs */ + if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0)) + goto fail; + + if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim, + dtype_is_object) < 0)) + goto fail; + + goto no_fail; + +fail: + __Pyx_XDECREF(new_mvs.memview); + new_mvs.memview = NULL; + new_mvs.data = NULL; +no_fail: + __Pyx_XDECREF(shape_tuple); + __Pyx_XDECREF(temp_int); + __Pyx_XDECREF(array_obj); + __Pyx_RefNannyFinishContext(); + return new_mvs; +} + + +////////// CopyContentsUtility.proto ///////// + +#define {{func_cname}}(slice) \ + __pyx_memoryview_copy_new_contig(&slice, "{{mode}}", {{ndim}}, \ + sizeof({{dtype_decl}}), {{contig_flag}}, \ + {{dtype_is_object}}) + + +////////// OverlappingSlices.proto ////////// + +static int __pyx_slices_overlap({{memviewslice_name}} *slice1, + {{memviewslice_name}} *slice2, + int ndim, size_t itemsize); + + +////////// OverlappingSlices ////////// + +/* Based on numpy's core/src/multiarray/array_assign.c */ + +/* Gets a half-open range [start, end) which contains the array data */ +static void +__pyx_get_array_memory_extents({{memviewslice_name}} *slice, + void **out_start, void **out_end, + int ndim, size_t itemsize) +{ + char *start, *end; + int i; + + start = end = slice->data; + + for (i = 0; i < ndim; i++) { + Py_ssize_t stride = slice->strides[i]; + Py_ssize_t extent = slice->shape[i]; + + if (extent == 0) { + *out_start = *out_end = start; + return; + } else { + if (stride > 0) + end += stride * (extent - 1); + else + start += stride * (extent - 1); + } + } + + /* Return a half-open range */ + *out_start = start; + *out_end = end + itemsize; +} + +/* Returns 1 if the arrays have overlapping data, 0 otherwise */ +static int +__pyx_slices_overlap({{memviewslice_name}} *slice1, + {{memviewslice_name}} *slice2, + int ndim, size_t itemsize) +{ + void *start1, *end1, *start2, *end2; + + __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize); + __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize); + + return (start1 < end2) && (start2 < end1); +} + + +////////// MemviewSliceCheckContig.proto ////////// + +#define __pyx_memviewslice_is_contig_{{contig_type}}{{ndim}}(slice) \ + __pyx_memviewslice_is_contig(slice, '{{contig_type}}', {{ndim}}) + + +////////// MemviewSliceIsContig.proto ////////// + +static int __pyx_memviewslice_is_contig(const {{memviewslice_name}} mvs, char order, int ndim);/*proto*/ + + +////////// MemviewSliceIsContig ////////// + +static int +__pyx_memviewslice_is_contig(const {{memviewslice_name}} mvs, char order, int ndim) +{ + int i, index, step, start; + Py_ssize_t itemsize = mvs.memview->view.itemsize; + + if (order == 'F') { + step = 1; + start = 0; + } else { + step = -1; + start = ndim - 1; + } + + for (i = 0; i < ndim; i++) { + index = start + step * i; + if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize) + return 0; + + itemsize *= mvs.shape[index]; + } + + return 1; +} + + +/////////////// MemviewSliceIndex /////////////// + +static CYTHON_INLINE char * +__pyx_memviewslice_index_full(const char *bufp, Py_ssize_t idx, + Py_ssize_t stride, Py_ssize_t suboffset) +{ + bufp = bufp + idx * stride; + if (suboffset >= 0) { + bufp = *((char **) bufp) + suboffset; + } + return (char *) bufp; +} + + +/////////////// MemviewDtypeToObject.proto /////////////// + +{{if to_py_function}} +static CYTHON_INLINE PyObject *{{get_function}}(const char *itemp); /* proto */ +{{endif}} + +{{if from_py_function}} +static CYTHON_INLINE int {{set_function}}(const char *itemp, PyObject *obj); /* proto */ +{{endif}} + +/////////////// MemviewDtypeToObject /////////////// + +{{#__pyx_memview__to_object}} + +/* Convert a dtype to or from a Python object */ + +{{if to_py_function}} +static CYTHON_INLINE PyObject *{{get_function}}(const char *itemp) { + return (PyObject *) {{to_py_function}}(*({{dtype}} *) itemp); +} +{{endif}} + +{{if from_py_function}} +static CYTHON_INLINE int {{set_function}}(const char *itemp, PyObject *obj) { + {{dtype}} value = {{from_py_function}}(obj); + if ({{error_condition}}) + return 0; + *({{dtype}} *) itemp = value; + return 1; +} +{{endif}} + + +/////////////// MemviewObjectToObject.proto /////////////// + +/* Function callbacks (for memoryview object) for dtype object */ +static PyObject *{{get_function}}(const char *itemp); /* proto */ +static int {{set_function}}(const char *itemp, PyObject *obj); /* proto */ + + +/////////////// MemviewObjectToObject /////////////// + +static PyObject *{{get_function}}(const char *itemp) { + PyObject *result = *(PyObject **) itemp; + Py_INCREF(result); + return result; +} + +static int {{set_function}}(const char *itemp, PyObject *obj) { + Py_INCREF(obj); + Py_DECREF(*(PyObject **) itemp); + *(PyObject **) itemp = obj; + return 1; +} + +/////////// ToughSlice ////////// + +/* Dimension is indexed with 'start:stop:step' */ + +if (unlikely(__pyx_memoryview_slice_memviewslice( + &{{dst}}, + {{src}}.shape[{{dim}}], {{src}}.strides[{{dim}}], {{src}}.suboffsets[{{dim}}], + {{dim}}, + {{new_ndim}}, + &{{get_suboffset_dim()}}, + {{start}}, + {{stop}}, + {{step}}, + {{int(have_start)}}, + {{int(have_stop)}}, + {{int(have_step)}}, + 1) < 0)) +{ + {{error_goto}} +} + + +////////// SimpleSlice ////////// + +/* Dimension is indexed with ':' only */ + +{{dst}}.shape[{{new_ndim}}] = {{src}}.shape[{{dim}}]; +{{dst}}.strides[{{new_ndim}}] = {{src}}.strides[{{dim}}]; + +{{if access == 'direct'}} + {{dst}}.suboffsets[{{new_ndim}}] = -1; +{{else}} + {{dst}}.suboffsets[{{new_ndim}}] = {{src}}.suboffsets[{{dim}}]; + if ({{src}}.suboffsets[{{dim}}] >= 0) + {{get_suboffset_dim()}} = {{new_ndim}}; +{{endif}} + + +////////// SliceIndex ////////// + +// Dimension is indexed with an integer, we could use the ToughSlice +// approach, but this is faster + +{ + Py_ssize_t __pyx_tmp_idx = {{idx}}; + + {{if wraparound or boundscheck}} + Py_ssize_t __pyx_tmp_shape = {{src}}.shape[{{dim}}]; + {{endif}} + + Py_ssize_t __pyx_tmp_stride = {{src}}.strides[{{dim}}]; + {{if wraparound}} + if (__pyx_tmp_idx < 0) + __pyx_tmp_idx += __pyx_tmp_shape; + {{endif}} + + {{if boundscheck}} + if (unlikely(!__Pyx_is_valid_index(__pyx_tmp_idx, __pyx_tmp_shape))) { + {{if not have_gil}} + #ifdef WITH_THREAD + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); + #endif + {{endif}} + + PyErr_SetString(PyExc_IndexError, + "Index out of bounds (axis {{dim}})"); + + {{if not have_gil}} + #ifdef WITH_THREAD + PyGILState_Release(__pyx_gilstate_save); + #endif + {{endif}} + + {{error_goto}} + } + {{endif}} + + {{if all_dimensions_direct}} + {{dst}}.data += __pyx_tmp_idx * __pyx_tmp_stride; + {{else}} + if ({{get_suboffset_dim()}} < 0) { + {{dst}}.data += __pyx_tmp_idx * __pyx_tmp_stride; + + /* This dimension is the first dimension, or is preceded by */ + /* direct or indirect dimensions that are indexed away. */ + /* Hence suboffset_dim must be less than zero, and we can have */ + /* our data pointer refer to another block by dereferencing. */ + /* slice.data -> B -> C becomes slice.data -> C */ + + {{if indirect}} + { + Py_ssize_t __pyx_tmp_suboffset = {{src}}.suboffsets[{{dim}}]; + + {{if generic}} + if (__pyx_tmp_suboffset >= 0) + {{endif}} + + {{dst}}.data = *((char **) {{dst}}.data) + __pyx_tmp_suboffset; + } + {{endif}} + + } else { + {{dst}}.suboffsets[{{get_suboffset_dim()}}] += __pyx_tmp_idx * __pyx_tmp_stride; + + /* Note: dimension can not be indirect, the compiler will have */ + /* issued an error */ + } + + {{endif}} +} + + +////////// FillStrided1DScalar.proto ////////// + +static void +__pyx_fill_slice_{{dtype_name}}({{type_decl}} *p, Py_ssize_t extent, Py_ssize_t stride, + size_t itemsize, void *itemp); + +////////// FillStrided1DScalar ////////// + +/* Fill a slice with a scalar value. The dimension is direct and strided or contiguous */ +/* This can be used as a callback for the memoryview object to efficienty assign a scalar */ +/* Currently unused */ +static void +__pyx_fill_slice_{{dtype_name}}({{type_decl}} *p, Py_ssize_t extent, Py_ssize_t stride, + size_t itemsize, void *itemp) +{ + Py_ssize_t i; + {{type_decl}} item = *(({{type_decl}} *) itemp); + {{type_decl}} *endp; + + stride /= sizeof({{type_decl}}); + endp = p + stride * extent; + + while (p < endp) { + *p = item; + p += stride; + } +} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ModuleSetupCode.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ModuleSetupCode.c new file mode 100644 index 00000000000..f7af78bfa74 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ModuleSetupCode.c @@ -0,0 +1,1640 @@ +/////////////// CModulePreamble /////////////// + +#include /* For offsetof */ +#ifndef offsetof + #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) +#endif + +#if !defined(WIN32) && !defined(MS_WINDOWS) + #ifndef __stdcall + #define __stdcall + #endif + #ifndef __cdecl + #define __cdecl + #endif + #ifndef __fastcall + #define __fastcall + #endif +#endif + +#ifndef DL_IMPORT + #define DL_IMPORT(t) t +#endif +#ifndef DL_EXPORT + #define DL_EXPORT(t) t +#endif + +// For use in DL_IMPORT/DL_EXPORT macros. +#define __PYX_COMMA , + +#ifndef HAVE_LONG_LONG + // CPython has required PY_LONG_LONG support for years, even if HAVE_LONG_LONG is not defined for us + #if PY_VERSION_HEX >= 0x02070000 + #define HAVE_LONG_LONG + #endif +#endif + +#ifndef PY_LONG_LONG + #define PY_LONG_LONG LONG_LONG +#endif + +#ifndef Py_HUGE_VAL + #define Py_HUGE_VAL HUGE_VAL +#endif + +#ifdef PYPY_VERSION + #define CYTHON_COMPILING_IN_PYPY 1 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 0 + + #undef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 0 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #if PY_VERSION_HEX < 0x03050000 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #undef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 0 + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #undef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 1 + #undef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 0 + #undef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 0 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900) + #endif + +#elif defined(PYSTON_VERSION) + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 1 + #define CYTHON_COMPILING_IN_CPYTHON 0 + + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #undef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 0 + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #undef CYTHON_FAST_PYCALL + #define CYTHON_FAST_PYCALL 0 + #undef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT 0 + #undef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 + #endif + +#else + #define CYTHON_COMPILING_IN_PYPY 0 + #define CYTHON_COMPILING_IN_PYSTON 0 + #define CYTHON_COMPILING_IN_CPYTHON 1 + + #ifndef CYTHON_USE_TYPE_SLOTS + #define CYTHON_USE_TYPE_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + // looks like calling _PyType_Lookup() isn't safe in Py<=2.6/3.1 + #undef CYTHON_USE_PYTYPE_LOOKUP + #define CYTHON_USE_PYTYPE_LOOKUP 0 + #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) + #define CYTHON_USE_PYTYPE_LOOKUP 1 + #endif + #if PY_MAJOR_VERSION < 3 + #undef CYTHON_USE_ASYNC_SLOTS + #define CYTHON_USE_ASYNC_SLOTS 0 + #elif !defined(CYTHON_USE_ASYNC_SLOTS) + #define CYTHON_USE_ASYNC_SLOTS 1 + #endif + #if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_USE_PYLONG_INTERNALS + #define CYTHON_USE_PYLONG_INTERNALS 0 + #elif !defined(CYTHON_USE_PYLONG_INTERNALS) + #define CYTHON_USE_PYLONG_INTERNALS 1 + #endif + #ifndef CYTHON_USE_PYLIST_INTERNALS + #define CYTHON_USE_PYLIST_INTERNALS 1 + #endif + #ifndef CYTHON_USE_UNICODE_INTERNALS + #define CYTHON_USE_UNICODE_INTERNALS 1 + #endif + #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 + // Python 3.11a2 hid _PyLong_FormatAdvancedWriter and _PyFloat_FormatAdvancedWriter + // therefore disable unicode writer until a better alternative appears + #undef CYTHON_USE_UNICODE_WRITER + #define CYTHON_USE_UNICODE_WRITER 0 + #elif !defined(CYTHON_USE_UNICODE_WRITER) + #define CYTHON_USE_UNICODE_WRITER 1 + #endif + #ifndef CYTHON_AVOID_BORROWED_REFS + #define CYTHON_AVOID_BORROWED_REFS 0 + #endif + #ifndef CYTHON_ASSUME_SAFE_MACROS + #define CYTHON_ASSUME_SAFE_MACROS 1 + #endif + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif + #if PY_VERSION_HEX >= 0x030B00A4 + #undef CYTHON_FAST_THREAD_STATE + #define CYTHON_FAST_THREAD_STATE 0 + #elif !defined(CYTHON_FAST_THREAD_STATE) + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #ifndef CYTHON_FAST_PYCALL + // Python 3.11 deleted localplus argument from frame object, which is used in our + // fast_pycall code + // On Python 3.10 it causes issues when used while profiling/debugging + #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000) + #endif + #ifndef CYTHON_PEP489_MULTI_PHASE_INIT + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) + #endif + #ifndef CYTHON_USE_TP_FINALIZE + #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) + #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #if PY_VERSION_HEX >= 0x030B00A4 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 + #elif !defined(CYTHON_USE_EXC_INFO_STACK) + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif + #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC + #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 + #endif +#endif + +#if !defined(CYTHON_FAST_PYCCALL) +#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) +#endif + +#if CYTHON_USE_PYLONG_INTERNALS + #if PY_MAJOR_VERSION < 3 + #include "longintrepr.h" + #endif + /* These short defines can easily conflict with other code */ + #undef SHIFT + #undef BASE + #undef MASK + /* Compile-time sanity check that these are indeed equal. Github issue #2670. */ + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif +#endif + +#ifndef __has_attribute + #define __has_attribute(x) 0 +#endif + +#ifndef __has_cpp_attribute + #define __has_cpp_attribute(x) 0 +#endif + +// restrict +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif + +// unused attribute +#ifndef CYTHON_UNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) +# define CYTHON_UNUSED __attribute__ ((__unused__)) +# else +# define CYTHON_UNUSED +# endif +#endif + +#ifndef CYTHON_MAYBE_UNUSED_VAR +# if defined(__cplusplus) + template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } +# else +# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) +# endif +#endif + +#ifndef CYTHON_NCP_UNUSED +# if CYTHON_COMPILING_IN_CPYTHON +# define CYTHON_NCP_UNUSED +# else +# define CYTHON_NCP_UNUSED CYTHON_UNUSED +# endif +#endif + +#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) + +#ifdef _MSC_VER + #ifndef _MSC_STDINT_H_ + #if _MSC_VER < 1300 + typedef unsigned char uint8_t; + typedef unsigned int uint32_t; + #else + typedef unsigned __int8 uint8_t; + typedef unsigned __int32 uint32_t; + #endif + #endif +#else + #include +#endif + + +#ifndef CYTHON_FALLTHROUGH + #if defined(__cplusplus) && __cplusplus >= 201103L + #if __has_cpp_attribute(fallthrough) + #define CYTHON_FALLTHROUGH [[fallthrough]] + #elif __has_cpp_attribute(clang::fallthrough) + #define CYTHON_FALLTHROUGH [[clang::fallthrough]] + #elif __has_cpp_attribute(gnu::fallthrough) + #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] + #endif + #endif + + #ifndef CYTHON_FALLTHROUGH + #if __has_attribute(fallthrough) + #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) + #else + #define CYTHON_FALLTHROUGH + #endif + #endif + + #if defined(__clang__ ) && defined(__apple_build_version__) + #if __apple_build_version__ < 7000000 /* Xcode < 7.0 */ + #undef CYTHON_FALLTHROUGH + #define CYTHON_FALLTHROUGH + #endif + #endif +#endif + +/////////////// CInitCode /////////////// + +// inline attribute +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #elif defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif + + +/////////////// CppInitCode /////////////// + +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif + +// inline attribute +#ifndef CYTHON_INLINE + #if defined(__clang__) + #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) + #else + #define CYTHON_INLINE inline + #endif +#endif + +// Work around clang bug http://stackoverflow.com/questions/21847816/c-invoke-nested-template-class-destructor +template +void __Pyx_call_destructor(T& x) { + x.~T(); +} + +// Used for temporary variables of "reference" type. +template +class __Pyx_FakeReference { + public: + __Pyx_FakeReference() : ptr(NULL) { } + // __Pyx_FakeReference(T& ref) : ptr(&ref) { } + // Const version needed as Cython doesn't know about const overloads (e.g. for stl containers). + __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } + T *operator->() { return ptr; } + T *operator&() { return ptr; } + operator T&() { return *ptr; } + // TODO(robertwb): Delegate all operators (or auto-generate unwrapping code where needed). + template bool operator ==(U other) { return *ptr == other; } + template bool operator !=(U other) { return *ptr != other; } + private: + T *ptr; +}; + + +/////////////// PythonCompatibility /////////////// + +#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) + #define Py_OptimizeFlag 0 +#endif + +#define __PYX_BUILD_PY_SSIZE_T "n" +#define CYTHON_FORMAT_SSIZE_T "z" + +#if PY_MAJOR_VERSION < 3 + #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ + PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #define __Pyx_DefaultClassType PyClass_Type +#else + #define __Pyx_BUILTIN_MODULE_NAME "builtins" + #define __Pyx_DefaultClassType PyType_Type +#if PY_VERSION_HEX >= 0x030B00A1 + static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, + PyObject *code, PyObject *c, PyObject* n, PyObject *v, + PyObject *fv, PyObject *cell, PyObject* fn, + PyObject *name, int fline, PyObject *lnos) { + // TODO - currently written to be simple and work in limited API etc. + // A more optimized version would be good + PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; + PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; + const char *fn_cstr=NULL; + const char *name_cstr=NULL; + PyCodeObject* co=NULL; + PyObject *type, *value, *traceback; + + // we must be able to call this while an exception is happening - thus clear then restore the state + PyErr_Fetch(&type, &value, &traceback); + + if (!(kwds=PyDict_New())) goto end; + if (!(argcount=PyLong_FromLong(a))) goto end; + if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; + if (!(posonlyargcount=PyLong_FromLong(0))) goto end; + if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; + if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; + if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; + if (!(nlocals=PyLong_FromLong(l))) goto end; + if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; + if (!(stacksize=PyLong_FromLong(s))) goto end; + if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; + if (!(flags=PyLong_FromLong(f))) goto end; + if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; + if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; + if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; + if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; + if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; + if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; + if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; + if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; + + if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; + if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; + if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; + + if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; + if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here + if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; + + Py_XDECREF((PyObject*)co); + co = (PyCodeObject*)call_result; + call_result = NULL; + + if (0) { + cleanup_code_too: + Py_XDECREF((PyObject*)co); + co = NULL; + } + end: + Py_XDECREF(kwds); + Py_XDECREF(argcount); + Py_XDECREF(posonlyargcount); + Py_XDECREF(kwonlyargcount); + Py_XDECREF(nlocals); + Py_XDECREF(stacksize); + Py_XDECREF(replace); + Py_XDECREF(call_result); + Py_XDECREF(empty); + if (type) { + PyErr_Restore(type, value, traceback); + } + return co; + } +#else + #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ + PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) +#endif + #define __Pyx_DefaultClassType PyType_Type +#endif + +#ifndef Py_TPFLAGS_CHECKTYPES + #define Py_TPFLAGS_CHECKTYPES 0 +#endif +#ifndef Py_TPFLAGS_HAVE_INDEX + #define Py_TPFLAGS_HAVE_INDEX 0 +#endif +#ifndef Py_TPFLAGS_HAVE_NEWBUFFER + #define Py_TPFLAGS_HAVE_NEWBUFFER 0 +#endif +#ifndef Py_TPFLAGS_HAVE_FINALIZE + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif + +#ifndef METH_STACKLESS + // already defined for Stackless Python (all versions) and C-Python >= 3.7 + // value if defined: Stackless Python < 3.6: 0x80 else 0x100 + #define METH_STACKLESS 0 +#endif +#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) + // new in CPython 3.6, but changed in 3.7 - see + // positional-only parameters: + // https://bugs.python.org/issue29464 + // const args: + // https://bugs.python.org/issue32240 + #ifndef METH_FASTCALL + #define METH_FASTCALL 0x80 + #endif + typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); + // new in CPython 3.7, used to be old signature of _PyCFunctionFast() in 3.6 + typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, + Py_ssize_t nargs, PyObject *kwnames); +#else + #define __Pyx_PyCFunctionFast _PyCFunctionFast + #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords +#endif +#if CYTHON_FAST_PYCCALL +#define __Pyx_PyFastCFunction_Check(func) \ + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) +#else +#define __Pyx_PyFastCFunction_Check(func) 0 +#endif + +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) + #define PyObject_Malloc(s) PyMem_Malloc(s) + #define PyObject_Free(p) PyMem_Free(p) + #define PyObject_Realloc(p) PyMem_Realloc(p) +#endif + +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif + +#if CYTHON_COMPILING_IN_PYSTON + // special C-API functions only in Pyston + #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) +#else + #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) + #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) +#endif + +#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#elif PY_VERSION_HEX >= 0x03060000 + //#elif PY_VERSION_HEX >= 0x03050200 + // Actually added in 3.5.2, but compiling against that does not guarantee that we get imported there. + #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() +#elif PY_VERSION_HEX >= 0x03000000 + #define __Pyx_PyThreadState_Current PyThreadState_GET() +#else + #define __Pyx_PyThreadState_Current _PyThreadState_Current +#endif + +// TSS (Thread Specific Storage) API +#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) +#include "pythread.h" +#define Py_tss_NEEDS_INIT 0 +typedef int Py_tss_t; +static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { + *key = PyThread_create_key(); + return 0; /* PyThread_create_key reports success always */ +} +static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { + Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); + *key = Py_tss_NEEDS_INIT; + return key; +} +static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { + PyObject_Free(key); +} +static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { + return *key != Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { + PyThread_delete_key(*key); + *key = Py_tss_NEEDS_INIT; +} +static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { + return PyThread_set_key_value(*key, value); +} +static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { + return PyThread_get_key_value(*key); +} +// PyThread_delete_key_value(key) is equalivalent to PyThread_set_key_value(key, NULL) +// PyThread_ReInitTLS() is a no-op +#endif /* TSS (Thread Specific Storage) API */ + +#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) +#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) +#else +#define __Pyx_PyDict_NewPresized(n) PyDict_New() +#endif + +#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION + #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) +#else + #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) + #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) +#endif + +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS +#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) +#else +#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) +#endif + +/* new Py3.3 unicode type (PEP 393) */ +#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) + #define CYTHON_PEP393_ENABLED 1 + + #if defined(PyUnicode_IS_READY) + #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ + 0 : _PyUnicode_Ready((PyObject *)(op))) + #else + // Py3.12 / PEP-623 will remove wstr type unicode strings and all of the PyUnicode_READY() machinery. + #define __Pyx_PyUnicode_READY(op) (0) + #endif + + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) + #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) + #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) + #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 + // Avoid calling deprecated C-API functions in Py3.9+ that PEP-623 schedules for removal in Py3.12. + // https://www.python.org/dev/peps/pep-0623/ + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) + #endif + #else + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) + #endif +#else + #define CYTHON_PEP393_ENABLED 0 + #define PyUnicode_1BYTE_KIND 1 + #define PyUnicode_2BYTE_KIND 2 + #define PyUnicode_4BYTE_KIND 4 + #define __Pyx_PyUnicode_READY(op) (0) + #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) + #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) + #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) + #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) + #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) + /* (void)(k) => avoid unused variable warning due to macro: */ + #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) + #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) + #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) +#endif + +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif + +#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) + #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) +#endif + +#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) + #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) +#endif + +#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) + #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) +#endif + +// ("..." % x) must call PyNumber_Remainder() if x is a string subclass that implements "__rmod__()". +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) + +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) +#else + #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) +#endif + +#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) + #define PyObject_ASCII(o) PyObject_Repr(o) +#endif + +#if PY_MAJOR_VERSION >= 3 + #define PyBaseString_Type PyUnicode_Type + #define PyStringObject PyUnicodeObject + #define PyString_Type PyUnicode_Type + #define PyString_Check PyUnicode_Check + #define PyString_CheckExact PyUnicode_CheckExact + // PyPy3 used to define "PyObject_Unicode" +#ifndef PyObject_Unicode + #define PyObject_Unicode PyObject_Str +#endif +#endif + +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) + #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) +#else + #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) + #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) +#endif + +#ifndef PySet_CheckExact + #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) +#endif + + +#if PY_VERSION_HEX >= 0x030900A4 + #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) +#else + #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) + #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) +#endif + +#if CYTHON_ASSUME_SAFE_MACROS + #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) +#else + // NOTE: might fail with exception => check for -1 + #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) +#endif + +#if PY_MAJOR_VERSION >= 3 + #define PyIntObject PyLongObject + #define PyInt_Type PyLong_Type + #define PyInt_Check(op) PyLong_Check(op) + #define PyInt_CheckExact(op) PyLong_CheckExact(op) + #define PyInt_FromString PyLong_FromString + #define PyInt_FromUnicode PyLong_FromUnicode + #define PyInt_FromLong PyLong_FromLong + #define PyInt_FromSize_t PyLong_FromSize_t + #define PyInt_FromSsize_t PyLong_FromSsize_t + #define PyInt_AsLong PyLong_AsLong + #define PyInt_AS_LONG PyLong_AS_LONG + #define PyInt_AsSsize_t PyLong_AsSsize_t + #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask + #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask + #define PyNumber_Int PyNumber_Long +#endif + +#if PY_MAJOR_VERSION >= 3 + #define PyBoolObject PyLongObject +#endif + +#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY + #ifndef PyUnicode_InternFromString + #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) + #endif +#endif + +#if PY_VERSION_HEX < 0x030200A4 + typedef long Py_hash_t; + #define __Pyx_PyInt_FromHash_t PyInt_FromLong + #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t +#else + #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t + #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t +#endif + +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) +#else + #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) +#endif + +// backport of PyAsyncMethods from Py3.5 to older Py3.x versions +// (mis-)using the "tp_reserved" type slot which is re-activated as "tp_as_async" in Py3.5 +#if CYTHON_USE_ASYNC_SLOTS + #if PY_VERSION_HEX >= 0x030500B1 + #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods + #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) + #else + #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) + #endif +#else + #define __Pyx_PyType_AsAsync(obj) NULL +#endif +#ifndef __Pyx_PyAsyncMethodsStruct + typedef struct { + unaryfunc am_await; + unaryfunc am_aiter; + unaryfunc am_anext; + } __Pyx_PyAsyncMethodsStruct; +#endif + + +/////////////// SmallCodeConfig.proto /////////////// + +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif + + +/////////////// PyModInitFuncType.proto /////////////// + +#ifndef CYTHON_NO_PYINIT_EXPORT +#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC + +#elif PY_MAJOR_VERSION < 3 +// Py2: define this to void manually because PyMODINIT_FUNC adds __declspec(dllexport) to it's definition. +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" void +#else +#define __Pyx_PyMODINIT_FUNC void +#endif + +#else +// Py3+: define this to PyObject * manually because PyMODINIT_FUNC adds __declspec(dllexport) to it's definition. +#ifdef __cplusplus +#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * +#else +#define __Pyx_PyMODINIT_FUNC PyObject * +#endif +#endif + + +/////////////// FastTypeChecks.proto /////////////// + +#if CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);/*proto*/ +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);/*proto*/ +static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);/*proto*/ +#else +#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) +#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) +#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) +#endif + +#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) + +/////////////// FastTypeChecks /////////////// +//@requires: Exceptions.c::PyThreadStateGet +//@requires: Exceptions.c::PyErrFetchRestore + +#if CYTHON_COMPILING_IN_CPYTHON +static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { + while (a) { + a = a->tp_base; + if (a == b) + return 1; + } + return b == &PyBaseObject_Type; +} + +static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { + PyObject *mro; + if (a == b) return 1; + mro = a->tp_mro; + if (likely(mro)) { + Py_ssize_t i, n; + n = PyTuple_GET_SIZE(mro); + for (i = 0; i < n; i++) { + if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) + return 1; + } + return 0; + } + // should only get here for incompletely initialised types, i.e. never under normal usage patterns + return __Pyx_InBases(a, b); +} + + +#if PY_MAJOR_VERSION == 2 +static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { + // PyObject_IsSubclass() can recurse and therefore is not safe + PyObject *exception, *value, *tb; + int res; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + __Pyx_ErrFetch(&exception, &value, &tb); + + res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; + // This function must not fail, so print the error here (which also clears it) + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + if (!res) { + res = PyObject_IsSubclass(err, exc_type2); + // This function must not fail, so print the error here (which also clears it) + if (unlikely(res == -1)) { + PyErr_WriteUnraisable(err); + res = 0; + } + } + + __Pyx_ErrRestore(exception, value, tb); + return res; +} +#else +static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { + int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; + if (!res) { + res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); + } + return res; +} +#endif + +// so far, we only call PyErr_GivenExceptionMatches() with an exception type (not instance) as first argument +// => optimise for that case + +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + // the tighter subtype checking in Py3 allows faster out-of-order comparison + for (i=0; i pure safety check assertions. + assert(PyExceptionClass_Check(exc_type1)); + assert(PyExceptionClass_Check(exc_type2)); + if (likely(err == exc_type1 || err == exc_type2)) return 1; + if (likely(PyExceptionClass_Check(err))) { + return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2); + } + return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2)); +} + +#endif + + +/////////////// MathInitCode /////////////// + +#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) + #if !defined(_USE_MATH_DEFINES) + #define _USE_MATH_DEFINES + #endif +#endif +#include + +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + // Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and + // a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is + // a quiet NaN. + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif + +#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) +#define __Pyx_truncl trunc +#else +#define __Pyx_truncl truncl +#endif + + +/////////////// UtilityFunctionPredeclarations.proto /////////////// + +typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; + const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ + +/////////////// ForceInitThreads.proto /////////////// +//@proto_block: utility_code_proto_before_types + +#ifndef __PYX_FORCE_INIT_THREADS + #define __PYX_FORCE_INIT_THREADS 0 +#endif + +/////////////// InitThreads.init /////////////// + +#if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 +PyEval_InitThreads(); +#endif + + +/////////////// ModuleCreationPEP489 /////////////// +//@substitute: naming + +//#if CYTHON_PEP489_MULTI_PHASE_INIT +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} + +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { + PyObject *value = PyObject_GetAttrString(spec, from_name); + int result = 0; + if (likely(value)) { + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } + Py_DECREF(value); + } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Clear(); + } else { + result = -1; + } + return result; +} + +static CYTHON_SMALL_CODE PyObject* ${pymodule_create_func_cname}(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { + PyObject *module = NULL, *moddict, *modname; + + // For now, we only have exactly one module instance. + if (__Pyx_check_single_interpreter()) + return NULL; + if (${module_cname}) + return __Pyx_NewRef(${module_cname}); + + modname = PyObject_GetAttrString(spec, "name"); + if (unlikely(!modname)) goto bad; + + module = PyModule_NewObject(modname); + Py_DECREF(modname); + if (unlikely(!module)) goto bad; + + moddict = PyModule_GetDict(module); + if (unlikely(!moddict)) goto bad; + // moddict is a borrowed reference + + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; + + return module; +bad: + Py_XDECREF(module); + return NULL; +} +//#endif + + +/////////////// CodeObjectCache.proto /////////////// + +typedef struct { + PyCodeObject* code_object; + int code_line; +} __Pyx_CodeObjectCacheEntry; + +struct __Pyx_CodeObjectCache { + int count; + int max_count; + __Pyx_CodeObjectCacheEntry* entries; +}; + +static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; + +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); +static PyCodeObject *__pyx_find_code_object(int code_line); +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); + +/////////////// CodeObjectCache /////////////// +// Note that errors are simply ignored in the code below. +// This is just a cache, if a lookup or insertion fails - so what? + +static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + int start = 0, mid = 0, end = count - 1; + if (end >= 0 && code_line > entries[end].code_line) { + return count; + } + while (start < end) { + mid = start + (end - start) / 2; + if (code_line < entries[mid].code_line) { + end = mid; + } else if (code_line > entries[mid].code_line) { + start = mid + 1; + } else { + return mid; + } + } + if (code_line <= entries[mid].code_line) { + return mid; + } else { + return mid + 1; + } +} + +static PyCodeObject *__pyx_find_code_object(int code_line) { + PyCodeObject* code_object; + int pos; + if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { + return NULL; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { + return NULL; + } + code_object = __pyx_code_cache.entries[pos].code_object; + Py_INCREF(code_object); + return code_object; +} + +static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { + int pos, i; + __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; + if (unlikely(!code_line)) { + return; + } + if (unlikely(!entries)) { + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); + if (likely(entries)) { + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = 64; + __pyx_code_cache.count = 1; + entries[0].code_line = code_line; + entries[0].code_object = code_object; + Py_INCREF(code_object); + } + return; + } + pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); + if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { + PyCodeObject* tmp = entries[pos].code_object; + entries[pos].code_object = code_object; + Py_DECREF(tmp); + return; + } + if (__pyx_code_cache.count == __pyx_code_cache.max_count) { + int new_max = __pyx_code_cache.max_count + 64; + entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( + __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); + if (unlikely(!entries)) { + return; + } + __pyx_code_cache.entries = entries; + __pyx_code_cache.max_count = new_max; + } + for (i=__pyx_code_cache.count; i>pos; i--) { + entries[i] = entries[i-1]; + } + entries[pos].code_line = code_line; + entries[pos].code_object = code_object; + __pyx_code_cache.count++; + Py_INCREF(code_object); +} + +/////////////// CodeObjectCache.cleanup /////////////// + + if (__pyx_code_cache.entries) { + __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; + int i, count = __pyx_code_cache.count; + __pyx_code_cache.count = 0; + __pyx_code_cache.max_count = 0; + __pyx_code_cache.entries = NULL; + for (i=0; i '9'); + break; + } + if (rt_from_call[i] != ctversion[i]) { + same = 0; + break; + } + } + + if (!same) { + char rtversion[5] = {'\0'}; + // copy the runtime-version for the error message + char message[200]; + for (i=0; i<4; ++i) { + if (rt_from_call[i] == '.') { + if (found_dot) break; + found_dot = 1; + } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') { + break; + } + rtversion[i] = rt_from_call[i]; + } + PyOS_snprintf(message, sizeof(message), + "compiletime version %s of module '%.100s' " + "does not match runtime version %s", + ctversion, __Pyx_MODULE_NAME, rtversion); + return PyErr_WarnEx(NULL, message, 1); + } + return 0; +} + +/////////////// IsLittleEndian.proto /////////////// + +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void); + +/////////////// IsLittleEndian /////////////// + +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) +{ + union { + uint32_t u32; + uint8_t u8[4]; + } S; + S.u32 = 0x01020304; + return S.u8[0] == 4; +} + +/////////////// Refnanny.proto /////////////// + +#ifndef CYTHON_REFNANNY + #define CYTHON_REFNANNY 0 +#endif + +#if CYTHON_REFNANNY + typedef struct { + void (*INCREF)(void*, PyObject*, int); + void (*DECREF)(void*, PyObject*, int); + void (*GOTREF)(void*, PyObject*, int); + void (*GIVEREF)(void*, PyObject*, int); + void* (*SetupContext)(const char*, int, const char*); + void (*FinishContext)(void**); + } __Pyx_RefNannyAPIStruct; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; + static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/ + #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; +#ifdef WITH_THREAD + #define __Pyx_RefNannySetupContext(name, acquire_gil) \ + if (acquire_gil) { \ + PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \ + PyGILState_Release(__pyx_gilstate_save); \ + } else { \ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \ + } +#else + #define __Pyx_RefNannySetupContext(name, acquire_gil) \ + __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) +#endif + #define __Pyx_RefNannyFinishContext() \ + __Pyx_RefNanny->FinishContext(&__pyx_refnanny) + #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) + #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) + #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) + #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) + #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) +#else + #define __Pyx_RefNannyDeclarations + #define __Pyx_RefNannySetupContext(name, acquire_gil) + #define __Pyx_RefNannyFinishContext() + #define __Pyx_INCREF(r) Py_INCREF(r) + #define __Pyx_DECREF(r) Py_DECREF(r) + #define __Pyx_GOTREF(r) + #define __Pyx_GIVEREF(r) + #define __Pyx_XINCREF(r) Py_XINCREF(r) + #define __Pyx_XDECREF(r) Py_XDECREF(r) + #define __Pyx_XGOTREF(r) + #define __Pyx_XGIVEREF(r) +#endif /* CYTHON_REFNANNY */ + +#define __Pyx_XDECREF_SET(r, v) do { \ + PyObject *tmp = (PyObject *) r; \ + r = v; __Pyx_XDECREF(tmp); \ + } while (0) +#define __Pyx_DECREF_SET(r, v) do { \ + PyObject *tmp = (PyObject *) r; \ + r = v; __Pyx_DECREF(tmp); \ + } while (0) + +#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) +#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) + +/////////////// Refnanny /////////////// + +#if CYTHON_REFNANNY +static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { + PyObject *m = NULL, *p = NULL; + void *r = NULL; + m = PyImport_ImportModule(modname); + if (!m) goto end; + p = PyObject_GetAttrString(m, "RefNannyAPI"); + if (!p) goto end; + r = PyLong_AsVoidPtr(p); +end: + Py_XDECREF(p); + Py_XDECREF(m); + return (__Pyx_RefNannyAPIStruct *)r; +} +#endif /* CYTHON_REFNANNY */ + + +/////////////// ImportRefnannyAPI /////////////// + +#if CYTHON_REFNANNY +__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); +if (!__Pyx_RefNanny) { + PyErr_Clear(); + __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); + if (!__Pyx_RefNanny) + Py_FatalError("failed to import 'refnanny' module"); +} +#endif + + +/////////////// RegisterModuleCleanup.proto /////////////// +//@substitute: naming + +static void ${cleanup_cname}(PyObject *self); /*proto*/ + +#if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY +static int __Pyx_RegisterCleanup(void); /*proto*/ +#else +#define __Pyx_RegisterCleanup() (0) +#endif + +/////////////// RegisterModuleCleanup /////////////// +//@substitute: naming + +#if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY +static PyObject* ${cleanup_cname}_atexit(PyObject *module, CYTHON_UNUSED PyObject *unused) { + ${cleanup_cname}(module); + Py_INCREF(Py_None); return Py_None; +} + +static int __Pyx_RegisterCleanup(void) { + // Don't use Py_AtExit because that has a 32-call limit and is called + // after python finalization. + // Also, we try to prepend the cleanup function to "atexit._exithandlers" + // in Py2 because CPython runs them last-to-first. Being run last allows + // user exit code to run before us that may depend on the globals + // and cached objects that we are about to clean up. + + static PyMethodDef cleanup_def = { + "__cleanup", (PyCFunction)${cleanup_cname}_atexit, METH_NOARGS, 0}; + + PyObject *cleanup_func = 0; + PyObject *atexit = 0; + PyObject *reg = 0; + PyObject *args = 0; + PyObject *res = 0; + int ret = -1; + + cleanup_func = PyCFunction_New(&cleanup_def, 0); + if (!cleanup_func) + goto bad; + + atexit = PyImport_ImportModule("atexit"); + if (!atexit) + goto bad; + reg = PyObject_GetAttrString(atexit, "_exithandlers"); + if (reg && PyList_Check(reg)) { + PyObject *a, *kw; + a = PyTuple_New(0); + kw = PyDict_New(); + if (!a || !kw) { + Py_XDECREF(a); + Py_XDECREF(kw); + goto bad; + } + args = PyTuple_Pack(3, cleanup_func, a, kw); + Py_DECREF(a); + Py_DECREF(kw); + if (!args) + goto bad; + ret = PyList_Insert(reg, 0, args); + } else { + if (!reg) + PyErr_Clear(); + Py_XDECREF(reg); + reg = PyObject_GetAttrString(atexit, "register"); + if (!reg) + goto bad; + args = PyTuple_Pack(1, cleanup_func); + if (!args) + goto bad; + res = PyObject_CallObject(reg, args); + if (!res) + goto bad; + ret = 0; + } +bad: + Py_XDECREF(cleanup_func); + Py_XDECREF(atexit); + Py_XDECREF(reg); + Py_XDECREF(args); + Py_XDECREF(res); + return ret; +} +#endif + +/////////////// FastGil.init /////////////// +#ifdef WITH_THREAD +__Pyx_FastGilFuncInit(); +#endif + +/////////////// NoFastGil.proto /////////////// +//@proto_block: utility_code_proto_before_types + +#define __Pyx_PyGILState_Ensure PyGILState_Ensure +#define __Pyx_PyGILState_Release PyGILState_Release +#define __Pyx_FastGIL_Remember() +#define __Pyx_FastGIL_Forget() +#define __Pyx_FastGilFuncInit() + +/////////////// FastGil.proto /////////////// +//@proto_block: utility_code_proto_before_types + +struct __Pyx_FastGilVtab { + PyGILState_STATE (*Fast_PyGILState_Ensure)(void); + void (*Fast_PyGILState_Release)(PyGILState_STATE oldstate); + void (*FastGIL_Remember)(void); + void (*FastGIL_Forget)(void); +}; + +static void __Pyx_FastGIL_Noop(void) {} +static struct __Pyx_FastGilVtab __Pyx_FastGilFuncs = { + PyGILState_Ensure, + PyGILState_Release, + __Pyx_FastGIL_Noop, + __Pyx_FastGIL_Noop +}; + +static void __Pyx_FastGilFuncInit(void); + +#define __Pyx_PyGILState_Ensure __Pyx_FastGilFuncs.Fast_PyGILState_Ensure +#define __Pyx_PyGILState_Release __Pyx_FastGilFuncs.Fast_PyGILState_Release +#define __Pyx_FastGIL_Remember __Pyx_FastGilFuncs.FastGIL_Remember +#define __Pyx_FastGIL_Forget __Pyx_FastGilFuncs.FastGIL_Forget + +#ifdef WITH_THREAD + #ifndef CYTHON_THREAD_LOCAL + #if __STDC_VERSION__ >= 201112 + #define CYTHON_THREAD_LOCAL _Thread_local + #elif defined(__GNUC__) + #define CYTHON_THREAD_LOCAL __thread + #elif defined(_MSC_VER) + #define CYTHON_THREAD_LOCAL __declspec(thread) + #endif + #endif +#endif + +/////////////// FastGil /////////////// +//@requires: CommonStructures.c::FetchCommonPointer +// The implementations of PyGILState_Ensure/Release calls PyThread_get_key_value +// several times which is turns out to be quite slow (slower in fact than +// acquiring the GIL itself). Simply storing it in a thread local for the +// common case is much faster. +// To make optimal use of this thread local, we attempt to share it between +// modules. + +#define __Pyx_FastGIL_ABI_module "_cython_" CYTHON_ABI +#define __Pyx_FastGIL_PyCapsuleName "FastGilFuncs" +#define __Pyx_FastGIL_PyCapsule \ + __Pyx_FastGIL_ABI_module "." __Pyx_FastGIL_PyCapsuleName + +#if PY_VERSION_HEX < 0x02070000 + #undef CYTHON_THREAD_LOCAL +#endif + +#ifdef CYTHON_THREAD_LOCAL + +#include "pythread.h" +#include "pystate.h" + +static CYTHON_THREAD_LOCAL PyThreadState *__Pyx_FastGil_tcur = NULL; +static CYTHON_THREAD_LOCAL int __Pyx_FastGil_tcur_depth = 0; +static int __Pyx_FastGil_autoTLSkey = -1; + +static CYTHON_INLINE void __Pyx_FastGIL_Remember0(void) { + ++__Pyx_FastGil_tcur_depth; +} + +static CYTHON_INLINE void __Pyx_FastGIL_Forget0(void) { + if (--__Pyx_FastGil_tcur_depth == 0) { + __Pyx_FastGil_tcur = NULL; + } +} + +static CYTHON_INLINE PyThreadState *__Pyx_FastGil_get_tcur(void) { + PyThreadState *tcur = __Pyx_FastGil_tcur; + if (tcur == NULL) { + tcur = __Pyx_FastGil_tcur = (PyThreadState*)PyThread_get_key_value(__Pyx_FastGil_autoTLSkey); + } + return tcur; +} + +static PyGILState_STATE __Pyx_FastGil_PyGILState_Ensure(void) { + int current; + PyThreadState *tcur; + __Pyx_FastGIL_Remember0(); + tcur = __Pyx_FastGil_get_tcur(); + if (tcur == NULL) { + // Uninitialized, need to initialize now. + return PyGILState_Ensure(); + } + current = tcur == __Pyx_PyThreadState_Current; + if (current == 0) { + PyEval_RestoreThread(tcur); + } + ++tcur->gilstate_counter; + return current ? PyGILState_LOCKED : PyGILState_UNLOCKED; +} + +static void __Pyx_FastGil_PyGILState_Release(PyGILState_STATE oldstate) { + PyThreadState *tcur = __Pyx_FastGil_get_tcur(); + __Pyx_FastGIL_Forget0(); + if (tcur->gilstate_counter == 1) { + // This is the last lock, do all the cleanup as well. + PyGILState_Release(oldstate); + } else { + --tcur->gilstate_counter; + if (oldstate == PyGILState_UNLOCKED) { + PyEval_SaveThread(); + } + } +} + +static void __Pyx_FastGilFuncInit0(void) { + /* Try to detect autoTLSkey. */ + int key; + void* this_thread_state = (void*) PyGILState_GetThisThreadState(); + for (key = 0; key < 100; key++) { + if (PyThread_get_key_value(key) == this_thread_state) { + __Pyx_FastGil_autoTLSkey = key; + break; + } + } + if (__Pyx_FastGil_autoTLSkey != -1) { + PyObject* capsule = NULL; + PyObject* abi_module = NULL; + __Pyx_PyGILState_Ensure = __Pyx_FastGil_PyGILState_Ensure; + __Pyx_PyGILState_Release = __Pyx_FastGil_PyGILState_Release; + __Pyx_FastGIL_Remember = __Pyx_FastGIL_Remember0; + __Pyx_FastGIL_Forget = __Pyx_FastGIL_Forget0; + capsule = PyCapsule_New(&__Pyx_FastGilFuncs, __Pyx_FastGIL_PyCapsule, NULL); + abi_module = PyImport_AddModule(__Pyx_FastGIL_ABI_module); + if (capsule && abi_module) { + PyObject_SetAttrString(abi_module, __Pyx_FastGIL_PyCapsuleName, capsule); + } + Py_XDECREF(capsule); + } +} + +#else + +static void __Pyx_FastGilFuncInit0(void) { + CYTHON_UNUSED void* force_use = (void*)&__Pyx_FetchCommonPointer; +} + +#endif + +static void __Pyx_FastGilFuncInit(void) { +#if PY_VERSION_HEX >= 0x02070000 + struct __Pyx_FastGilVtab* shared = (struct __Pyx_FastGilVtab*)PyCapsule_Import(__Pyx_FastGIL_PyCapsule, 1); +#else + struct __Pyx_FastGilVtab* shared = NULL; +#endif + if (shared) { + __Pyx_FastGilFuncs = *shared; + } else { + PyErr_Clear(); + __Pyx_FastGilFuncInit0(); + } +} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ObjectHandling.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ObjectHandling.c new file mode 100644 index 00000000000..864b658f745 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ObjectHandling.c @@ -0,0 +1,2504 @@ +/* + * General object operations and protocol implementations, + * including their specialisations for certain builtins. + * + * Optional optimisations for builtins are in Optimize.c. + * + * Required replacements of builtins are in Builtins.c. + */ + +/////////////// RaiseNoneIterError.proto /////////////// + +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); + +/////////////// RaiseNoneIterError /////////////// + +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); +} + +/////////////// RaiseTooManyValuesToUnpack.proto /////////////// + +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); + +/////////////// RaiseTooManyValuesToUnpack /////////////// + +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { + PyErr_Format(PyExc_ValueError, + "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); +} + +/////////////// RaiseNeedMoreValuesToUnpack.proto /////////////// + +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); + +/////////////// RaiseNeedMoreValuesToUnpack /////////////// + +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { + PyErr_Format(PyExc_ValueError, + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", + index, (index == 1) ? "" : "s"); +} + +/////////////// UnpackTupleError.proto /////////////// + +static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/ + +/////////////// UnpackTupleError /////////////// +//@requires: RaiseNoneIterError +//@requires: RaiseNeedMoreValuesToUnpack +//@requires: RaiseTooManyValuesToUnpack + +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { + if (t == Py_None) { + __Pyx_RaiseNoneNotIterableError(); + } else if (PyTuple_GET_SIZE(t) < index) { + __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); + } else { + __Pyx_RaiseTooManyValuesError(index); + } +} + +/////////////// UnpackItemEndCheck.proto /////////////// + +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ + +/////////////// UnpackItemEndCheck /////////////// +//@requires: RaiseTooManyValuesToUnpack +//@requires: IterFinish + +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { + if (unlikely(retval)) { + Py_DECREF(retval); + __Pyx_RaiseTooManyValuesError(expected); + return -1; + } else { + return __Pyx_IterFinish(); + } + return 0; +} + +/////////////// UnpackTuple2.proto /////////////// + +#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple) \ + (likely(is_tuple || PyTuple_Check(tuple)) ? \ + (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ? \ + __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) : \ + (__Pyx_UnpackTupleError(tuple, 2), -1)) : \ + __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple)) + +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); +static int __Pyx_unpack_tuple2_generic( + PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); + +/////////////// UnpackTuple2 /////////////// +//@requires: UnpackItemEndCheck +//@requires: UnpackTupleError +//@requires: RaiseNeedMoreValuesToUnpack + +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( + PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { + PyObject *value1 = NULL, *value2 = NULL; +#if CYTHON_COMPILING_IN_PYPY + value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; + value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; +#else + value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); + value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); +#endif + if (decref_tuple) { + Py_DECREF(tuple); + } + + *pvalue1 = value1; + *pvalue2 = value2; + return 0; +#if CYTHON_COMPILING_IN_PYPY +bad: + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +#endif +} + +static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, + int has_known_size, int decref_tuple) { + Py_ssize_t index; + PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; + iternextfunc iternext; + + iter = PyObject_GetIter(tuple); + if (unlikely(!iter)) goto bad; + if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } + + iternext = Py_TYPE(iter)->tp_iternext; + value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } + value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } + if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; + + Py_DECREF(iter); + *pvalue1 = value1; + *pvalue2 = value2; + return 0; + +unpacking_failed: + if (!has_known_size && __Pyx_IterFinish() == 0) + __Pyx_RaiseNeedMoreValuesError(index); +bad: + Py_XDECREF(iter); + Py_XDECREF(value1); + Py_XDECREF(value2); + if (decref_tuple) { Py_XDECREF(tuple); } + return -1; +} + + +/////////////// IterNext.proto /////////////// + +#define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL) +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *); /*proto*/ + +/////////////// IterNext /////////////// +//@requires: Exceptions.c::PyThreadStateGet +//@requires: Exceptions.c::PyErrFetchRestore + +static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) { + PyObject* exc_type; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + exc_type = __Pyx_PyErr_Occurred(); + if (unlikely(exc_type)) { + if (!defval || unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) + return NULL; + __Pyx_PyErr_Clear(); + Py_INCREF(defval); + return defval; + } + if (defval) { + Py_INCREF(defval); + return defval; + } + __Pyx_PyErr_SetNone(PyExc_StopIteration); + return NULL; +} + +static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) { + PyErr_Format(PyExc_TypeError, + "%.200s object is not an iterator", Py_TYPE(iterator)->tp_name); +} + +// originally copied from Py3's builtin_next() +static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) { + PyObject* next; + // We always do a quick slot check because calling PyIter_Check() is so wasteful. + iternextfunc iternext = Py_TYPE(iterator)->tp_iternext; + if (likely(iternext)) { +#if CYTHON_USE_TYPE_SLOTS + next = iternext(iterator); + if (likely(next)) + return next; + #if PY_VERSION_HEX >= 0x02070000 + if (unlikely(iternext == &_PyObject_NextNotImplemented)) + return NULL; + #endif +#else + // Since the slot was set, assume that PyIter_Next() will likely succeed, and properly fail otherwise. + // Note: PyIter_Next() crashes in CPython if "tp_iternext" is NULL. + next = PyIter_Next(iterator); + if (likely(next)) + return next; +#endif + } else if (CYTHON_USE_TYPE_SLOTS || unlikely(!PyIter_Check(iterator))) { + // If CYTHON_USE_TYPE_SLOTS, then the slot was not set and we don't have an iterable. + // Otherwise, don't trust "tp_iternext" and rely on PyIter_Check(). + __Pyx_PyIter_Next_ErrorNoIterator(iterator); + return NULL; + } +#if !CYTHON_USE_TYPE_SLOTS + else { + // We have an iterator with an empty "tp_iternext", but didn't call next() on it yet. + next = PyIter_Next(iterator); + if (likely(next)) + return next; + } +#endif + return __Pyx_PyIter_Next2Default(defval); +} + +/////////////// IterFinish.proto /////////////// + +static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ + +/////////////// IterFinish /////////////// + +// When PyIter_Next(iter) has returned NULL in order to signal termination, +// this function does the right cleanup and returns 0 on success. If it +// detects an error that occurred in the iterator, it returns -1. + +static CYTHON_INLINE int __Pyx_IterFinish(void) { +#if CYTHON_FAST_THREAD_STATE + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject* exc_type = tstate->curexc_type; + if (unlikely(exc_type)) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) { + PyObject *exc_value, *exc_tb; + exc_value = tstate->curexc_value; + exc_tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; + Py_DECREF(exc_type); + Py_XDECREF(exc_value); + Py_XDECREF(exc_tb); + return 0; + } else { + return -1; + } + } + return 0; +#else + if (unlikely(PyErr_Occurred())) { + if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { + PyErr_Clear(); + return 0; + } else { + return -1; + } + } + return 0; +#endif +} + + +/////////////// ObjectGetItem.proto /////////////// + +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);/*proto*/ +#else +#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) +#endif + +/////////////// ObjectGetItem /////////////// +// //@requires: GetItemInt - added in IndexNode as it uses templating. + +#if CYTHON_USE_TYPE_SLOTS +static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { + PyObject *runerr; + Py_ssize_t key_value; + PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence; + if (unlikely(!(m && m->sq_item))) { + PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name); + return NULL; + } + + key_value = __Pyx_PyIndex_AsSsize_t(index); + if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { + return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); + } + + // Error handling code -- only manage OverflowError differently. + if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { + PyErr_Clear(); + PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name); + } + return NULL; +} + +static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { + PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping; + if (likely(m && m->mp_subscript)) { + return m->mp_subscript(obj, key); + } + return __Pyx_PyObject_GetIndex(obj, key); +} +#endif + + +/////////////// DictGetItem.proto /////////////// + +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);/*proto*/ + +#define __Pyx_PyObject_Dict_GetItem(obj, name) \ + (likely(PyDict_CheckExact(obj)) ? \ + __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) + +#else +#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) +#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) +#endif + +/////////////// DictGetItem /////////////// + +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { + PyObject *value; + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (!PyErr_Occurred()) { + if (unlikely(PyTuple_Check(key))) { + // CPython interprets tuples as separate arguments => must wrap them in another tuple. + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + // Avoid tuple packing if possible. + PyErr_SetObject(PyExc_KeyError, key); + } + } + return NULL; + } + Py_INCREF(value); + return value; +} +#endif + +/////////////// GetItemInt.proto /////////////// + +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) + +{{for type in ['List', 'Tuple']}} +#define __Pyx_GetItemInt_{{type}}(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ + __Pyx_GetItemInt_{{type}}_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ + (PyErr_SetString(PyExc_IndexError, "{{ type.lower() }} index out of range"), (PyObject*)NULL)) + +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_{{type}}_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +{{endfor}} + +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); + +/////////////// GetItemInt /////////////// + +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (!j) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} + +{{for type in ['List', 'Tuple']}} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_{{type}}_Fast(PyObject *o, Py_ssize_t i, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + Py_ssize_t wrapped_i = i; + if (wraparound & unlikely(i < 0)) { + wrapped_i += Py{{type}}_GET_SIZE(o); + } + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, Py{{type}}_GET_SIZE(o)))) { + PyObject *r = Py{{type}}_GET_ITEM(o, wrapped_i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +#else + return PySequence_GetItem(o, i); +#endif +} +{{endfor}} + +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, + CYTHON_NCP_UNUSED int wraparound, + CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { + PyObject *r = PyList_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; + } + } else { + // inlined PySequence_GetItem() + special cased length overflow + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + // if length > max(Py_ssize_t), maybe the object can wrap around itself? + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return NULL; + PyErr_Clear(); + } + } + return m->sq_item(o, i); + } + } +#else + if (is_list || PySequence_Check(o)) { + return PySequence_GetItem(o, i); + } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +/////////////// SetItemInt.proto /////////////// + +#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ + __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) : \ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \ + __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) + +static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); +static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, + int is_list, int wraparound, int boundscheck); + +/////////////// SetItemInt /////////////// + +static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { + int r; + if (!j) return -1; + r = PyObject_SetItem(o, j, v); + Py_DECREF(j); + return r; +} + +static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, + CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) { + PyObject* old = PyList_GET_ITEM(o, n); + Py_INCREF(v); + PyList_SET_ITEM(o, n, v); + Py_DECREF(old); + return 1; + } + } else { + // inlined PySequence_SetItem() + special cased length overflow + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_ass_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + // if length > max(Py_ssize_t), maybe the object can wrap around itself? + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return -1; + PyErr_Clear(); + } + } + return m->sq_ass_item(o, i, v); + } + } +#else +#if CYTHON_COMPILING_IN_PYPY + if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) +#else + if (is_list || PySequence_Check(o)) +#endif + { + return PySequence_SetItem(o, i, v); + } +#endif + return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); +} + + +/////////////// DelItemInt.proto /////////////// + +#define __Pyx_DelItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ + __Pyx_DelItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound) : \ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \ + __Pyx_DelItem_Generic(o, to_py_func(i)))) + +static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j); +static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound); + +/////////////// DelItemInt /////////////// + +static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) { + int r; + if (!j) return -1; + r = PyObject_DelItem(o, j); + Py_DECREF(j); + return r; +} + +static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i, + CYTHON_UNUSED int is_list, CYTHON_NCP_UNUSED int wraparound) { +#if !CYTHON_USE_TYPE_SLOTS + if (is_list || PySequence_Check(o)) { + return PySequence_DelItem(o, i); + } +#else + // inlined PySequence_DelItem() + special cased length overflow + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_ass_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + // if length > max(Py_ssize_t), maybe the object can wrap around itself? + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + return -1; + PyErr_Clear(); + } + } + return m->sq_ass_item(o, i, (PyObject *)NULL); + } +#endif + return __Pyx_DelItem_Generic(o, PyInt_FromSsize_t(i)); +} + + +/////////////// SliceObject.proto /////////////// + +// we pass pointer addresses to show the C compiler what is NULL and what isn't +{{if access == 'Get'}} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( + PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** py_start, PyObject** py_stop, PyObject** py_slice, + int has_cstart, int has_cstop, int wraparound); +{{else}} +#define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) \ + __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) + +// we pass pointer addresses to show the C compiler what is NULL and what isn't +static CYTHON_INLINE int __Pyx_PyObject_SetSlice( + PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** py_start, PyObject** py_stop, PyObject** py_slice, + int has_cstart, int has_cstop, int wraparound); +{{endif}} + +/////////////// SliceObject /////////////// + +{{if access == 'Get'}} +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, +{{else}} +static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, +{{endif}} + Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, + int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { +#if CYTHON_USE_TYPE_SLOTS + PyMappingMethods* mp; +#if PY_MAJOR_VERSION < 3 + PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; + if (likely(ms && ms->sq_{{if access == 'Set'}}ass_{{endif}}slice)) { + if (!has_cstart) { + if (_py_start && (*_py_start != Py_None)) { + cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); + if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstart = 0; + } + if (!has_cstop) { + if (_py_stop && (*_py_stop != Py_None)) { + cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); + if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstop = PY_SSIZE_T_MAX; + } + if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { + Py_ssize_t l = ms->sq_length(obj); + if (likely(l >= 0)) { + if (cstop < 0) { + cstop += l; + if (cstop < 0) cstop = 0; + } + if (cstart < 0) { + cstart += l; + if (cstart < 0) cstart = 0; + } + } else { + // if length > max(Py_ssize_t), maybe the object can wrap around itself? + if (!PyErr_ExceptionMatches(PyExc_OverflowError)) + goto bad; + PyErr_Clear(); + } + } +{{if access == 'Get'}} + return ms->sq_slice(obj, cstart, cstop); +{{else}} + return ms->sq_ass_slice(obj, cstart, cstop, value); +{{endif}} + } +#endif + + mp = Py_TYPE(obj)->tp_as_mapping; +{{if access == 'Get'}} + if (likely(mp && mp->mp_subscript)) +{{else}} + if (likely(mp && mp->mp_ass_subscript)) +{{endif}} +#endif + { + {{if access == 'Get'}}PyObject*{{else}}int{{endif}} result; + PyObject *py_slice, *py_start, *py_stop; + if (_py_slice) { + py_slice = *_py_slice; + } else { + PyObject* owned_start = NULL; + PyObject* owned_stop = NULL; + if (_py_start) { + py_start = *_py_start; + } else { + if (has_cstart) { + owned_start = py_start = PyInt_FromSsize_t(cstart); + if (unlikely(!py_start)) goto bad; + } else + py_start = Py_None; + } + if (_py_stop) { + py_stop = *_py_stop; + } else { + if (has_cstop) { + owned_stop = py_stop = PyInt_FromSsize_t(cstop); + if (unlikely(!py_stop)) { + Py_XDECREF(owned_start); + goto bad; + } + } else + py_stop = Py_None; + } + py_slice = PySlice_New(py_start, py_stop, Py_None); + Py_XDECREF(owned_start); + Py_XDECREF(owned_stop); + if (unlikely(!py_slice)) goto bad; + } +#if CYTHON_USE_TYPE_SLOTS +{{if access == 'Get'}} + result = mp->mp_subscript(obj, py_slice); +#else + result = PyObject_GetItem(obj, py_slice); +{{else}} + result = mp->mp_ass_subscript(obj, py_slice, value); +#else + result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice); +{{endif}} +#endif + if (!_py_slice) { + Py_DECREF(py_slice); + } + return result; + } + PyErr_Format(PyExc_TypeError, +{{if access == 'Get'}} + "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); +{{else}} + "'%.200s' object does not support slice %.10s", + Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion"); +{{endif}} + +bad: + return {{if access == 'Get'}}NULL{{else}}-1{{endif}}; +} + + +/////////////// SliceTupleAndList.proto /////////////// + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); +static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); +#else +#define __Pyx_PyList_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) +#define __Pyx_PyTuple_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) +#endif + +/////////////// SliceTupleAndList /////////////// + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) { + Py_ssize_t start = *_start, stop = *_stop, length = *_length; + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + + if (stop < 0) + stop += length; + else if (stop > length) + stop = length; + + *_length = stop - start; + *_start = start; + *_stop = stop; +} + +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject** CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} + +{{for type in ['List', 'Tuple']}} +static CYTHON_INLINE PyObject* __Pyx_Py{{type}}_GetSlice( + PyObject* src, Py_ssize_t start, Py_ssize_t stop) { + PyObject* dest; + Py_ssize_t length = Py{{type}}_GET_SIZE(src); + __Pyx_crop_slice(&start, &stop, &length); + if (unlikely(length <= 0)) + return Py{{type}}_New(0); + + dest = Py{{type}}_New(length); + if (unlikely(!dest)) + return NULL; + __Pyx_copy_object_array( + ((Py{{type}}Object*)src)->ob_item + start, + ((Py{{type}}Object*)dest)->ob_item, + length); + return dest; +} +{{endfor}} +#endif + + +/////////////// CalculateMetaclass.proto /////////////// + +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); + +/////////////// CalculateMetaclass /////////////// + +static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { + Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); + for (i=0; i < nbases; i++) { + PyTypeObject *tmptype; + PyObject *tmp = PyTuple_GET_ITEM(bases, i); + tmptype = Py_TYPE(tmp); +#if PY_MAJOR_VERSION < 3 + if (tmptype == &PyClass_Type) + continue; +#endif + if (!metaclass) { + metaclass = tmptype; + continue; + } + if (PyType_IsSubtype(metaclass, tmptype)) + continue; + if (PyType_IsSubtype(tmptype, metaclass)) { + metaclass = tmptype; + continue; + } + // else: + PyErr_SetString(PyExc_TypeError, + "metaclass conflict: " + "the metaclass of a derived class " + "must be a (non-strict) subclass " + "of the metaclasses of all its bases"); + return NULL; + } + if (!metaclass) { +#if PY_MAJOR_VERSION < 3 + metaclass = &PyClass_Type; +#else + metaclass = &PyType_Type; +#endif + } + // make owned reference + Py_INCREF((PyObject*) metaclass); + return (PyObject*) metaclass; +} + + +/////////////// FindInheritedMetaclass.proto /////////////// + +static PyObject *__Pyx_FindInheritedMetaclass(PyObject *bases); /*proto*/ + +/////////////// FindInheritedMetaclass /////////////// +//@requires: PyObjectGetAttrStr +//@requires: CalculateMetaclass + +static PyObject *__Pyx_FindInheritedMetaclass(PyObject *bases) { + PyObject *metaclass; + if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { + PyTypeObject *metatype; +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *base = PyTuple_GET_ITEM(bases, 0); +#else + PyObject *base = PySequence_ITEM(bases, 0); +#endif +#if PY_MAJOR_VERSION < 3 + PyObject* basetype = __Pyx_PyObject_GetAttrStr(base, PYIDENT("__class__")); + if (basetype) { + metatype = (PyType_Check(basetype)) ? ((PyTypeObject*) basetype) : NULL; + } else { + PyErr_Clear(); + metatype = Py_TYPE(base); + basetype = (PyObject*) metatype; + Py_INCREF(basetype); + } +#else + metatype = Py_TYPE(base); +#endif + metaclass = __Pyx_CalculateMetaclass(metatype, bases); +#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) + Py_DECREF(base); +#endif +#if PY_MAJOR_VERSION < 3 + Py_DECREF(basetype); +#endif + } else { + // no bases => use default metaclass +#if PY_MAJOR_VERSION < 3 + metaclass = (PyObject *) &PyClass_Type; +#else + metaclass = (PyObject *) &PyType_Type; +#endif + Py_INCREF(metaclass); + } + return metaclass; +} + +/////////////// Py3MetaclassGet.proto /////////////// + +static PyObject *__Pyx_Py3MetaclassGet(PyObject *bases, PyObject *mkw); /*proto*/ + +/////////////// Py3MetaclassGet /////////////// +//@requires: FindInheritedMetaclass +//@requires: CalculateMetaclass + +static PyObject *__Pyx_Py3MetaclassGet(PyObject *bases, PyObject *mkw) { + PyObject *metaclass = mkw ? __Pyx_PyDict_GetItemStr(mkw, PYIDENT("metaclass")) : NULL; + if (metaclass) { + Py_INCREF(metaclass); + if (PyDict_DelItem(mkw, PYIDENT("metaclass")) < 0) { + Py_DECREF(metaclass); + return NULL; + } + if (PyType_Check(metaclass)) { + PyObject* orig = metaclass; + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_DECREF(orig); + } + return metaclass; + } + return __Pyx_FindInheritedMetaclass(bases); +} + +/////////////// CreateClass.proto /////////////// + +static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, + PyObject *qualname, PyObject *modname); /*proto*/ + +/////////////// CreateClass /////////////// +//@requires: FindInheritedMetaclass +//@requires: CalculateMetaclass + +static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, + PyObject *qualname, PyObject *modname) { + PyObject *result; + PyObject *metaclass; + + if (PyDict_SetItem(dict, PYIDENT("__module__"), modname) < 0) + return NULL; + if (PyDict_SetItem(dict, PYIDENT("__qualname__"), qualname) < 0) + return NULL; + + /* Python2 __metaclass__ */ + metaclass = __Pyx_PyDict_GetItemStr(dict, PYIDENT("__metaclass__")); + if (metaclass) { + Py_INCREF(metaclass); + if (PyType_Check(metaclass)) { + PyObject* orig = metaclass; + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_DECREF(orig); + } + } else { + metaclass = __Pyx_FindInheritedMetaclass(bases); + } + if (unlikely(!metaclass)) + return NULL; + result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL); + Py_DECREF(metaclass); + return result; +} + +/////////////// Py3ClassCreate.proto /////////////// + +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, + PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/ +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, + PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*proto*/ + +/////////////// Py3ClassCreate /////////////// +//@requires: PyObjectGetAttrStr +//@requires: CalculateMetaclass + +static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, + PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { + PyObject *ns; + if (metaclass) { + PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, PYIDENT("__prepare__")); + if (prep) { + PyObject *pargs = PyTuple_Pack(2, name, bases); + if (unlikely(!pargs)) { + Py_DECREF(prep); + return NULL; + } + ns = PyObject_Call(prep, pargs, mkw); + Py_DECREF(prep); + Py_DECREF(pargs); + } else { + if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + PyErr_Clear(); + ns = PyDict_New(); + } + } else { + ns = PyDict_New(); + } + + if (unlikely(!ns)) + return NULL; + + /* Required here to emulate assignment order */ + if (unlikely(PyObject_SetItem(ns, PYIDENT("__module__"), modname) < 0)) goto bad; + if (unlikely(PyObject_SetItem(ns, PYIDENT("__qualname__"), qualname) < 0)) goto bad; + if (unlikely(doc && PyObject_SetItem(ns, PYIDENT("__doc__"), doc) < 0)) goto bad; + return ns; +bad: + Py_DECREF(ns); + return NULL; +} + +static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, + PyObject *dict, PyObject *mkw, + int calculate_metaclass, int allow_py2_metaclass) { + PyObject *result, *margs; + PyObject *owned_metaclass = NULL; + if (allow_py2_metaclass) { + /* honour Python2 __metaclass__ for backward compatibility */ + owned_metaclass = PyObject_GetItem(dict, PYIDENT("__metaclass__")); + if (owned_metaclass) { + metaclass = owned_metaclass; + } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { + PyErr_Clear(); + } else { + return NULL; + } + } + if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { + metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); + Py_XDECREF(owned_metaclass); + if (unlikely(!metaclass)) + return NULL; + owned_metaclass = metaclass; + } + margs = PyTuple_Pack(3, name, bases, dict); + if (unlikely(!margs)) { + result = NULL; + } else { + result = PyObject_Call(metaclass, margs, mkw); + Py_DECREF(margs); + } + Py_XDECREF(owned_metaclass); + return result; +} + +/////////////// ExtTypeTest.proto /////////////// + +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ + +/////////////// ExtTypeTest /////////////// + +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); + return 0; + } + if (likely(__Pyx_TypeCheck(obj, type))) + return 1; + PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", + Py_TYPE(obj)->tp_name, type->tp_name); + return 0; +} + +/////////////// CallableCheck.proto /////////////// + +#if CYTHON_USE_TYPE_SLOTS && PY_MAJOR_VERSION >= 3 +#define __Pyx_PyCallable_Check(obj) (Py_TYPE(obj)->tp_call != NULL) +#else +#define __Pyx_PyCallable_Check(obj) PyCallable_Check(obj) +#endif + +/////////////// PyDictContains.proto /////////////// + +static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { + int result = PyDict_Contains(dict, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/////////////// PySetContains.proto /////////////// + +static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq); /* proto */ + +/////////////// PySetContains /////////////// +//@requires: Builtins.c::pyfrozenset_new + +static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) { + int result = -1; + if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) { + /* Convert key to frozenset */ + PyObject *tmpkey; + PyErr_Clear(); + tmpkey = __Pyx_PyFrozenSet_New(key); + if (tmpkey != NULL) { + result = PySet_Contains(set, tmpkey); + Py_DECREF(tmpkey); + } + } + return result; +} + +static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) { + int result = PySet_Contains(set, key); + + if (unlikely(result < 0)) { + result = __Pyx_PySet_ContainsUnhashable(set, key); + } + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/////////////// PySequenceContains.proto /////////////// + +static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { + int result = PySequence_Contains(seq, item); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + +/////////////// PyBoolOrNullFromLong.proto /////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) { + return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b); +} + +/////////////// GetBuiltinName.proto /////////////// + +static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ + +/////////////// GetBuiltinName /////////////// +//@requires: PyObjectGetAttrStr +//@substitute: naming + +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStr($builtins_cname, name); + if (unlikely(!result)) { + PyErr_Format(PyExc_NameError, +#if PY_MAJOR_VERSION >= 3 + "name '%U' is not defined", name); +#else + "name '%.200s' is not defined", PyString_AS_STRING(name)); +#endif + } + return result; +} + +/////////////// GetNameInClass.proto /////////////// + +#define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); /*proto*/ + +/////////////// GetNameInClass /////////////// +//@requires: PyObjectGetAttrStr +//@requires: GetModuleGlobalName +//@requires: Exceptions.c::PyThreadStateGet +//@requires: Exceptions.c::PyErrFetchRestore +//@requires: Exceptions.c::PyErrExceptionMatches + +static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) { + PyObject *result; + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + return NULL; + __Pyx_PyErr_Clear(); + __Pyx_GetModuleGlobalNameUncached(result, name); + return result; +} + +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { + PyObject *result; + result = __Pyx_PyObject_GetAttrStr(nmspace, name); + if (!result) { + result = __Pyx_GetGlobalNameAfterAttributeLookup(name); + } + return result; +} + + +/////////////// SetNameInClass.proto /////////////// + +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 +// Identifier names are always interned and have a pre-calculated hash value. +#define __Pyx_SetNameInClass(ns, name, value) \ + (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) +#elif CYTHON_COMPILING_IN_CPYTHON +#define __Pyx_SetNameInClass(ns, name, value) \ + (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) +#else +#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) +#endif + + +/////////////// GetModuleGlobalName.proto /////////////// +//@requires: PyDictVersioning +//@substitute: naming + +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) { \ + static PY_UINT64_T __pyx_dict_version = 0; \ + static PyObject *__pyx_dict_cached_value = NULL; \ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION($moddict_cname))) ? \ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) : \ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value); \ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) { \ + PY_UINT64_T __pyx_dict_version; \ + PyObject *__pyx_dict_cached_value; \ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value); \ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); /*proto*/ +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); /*proto*/ +#endif + + +/////////////// GetModuleGlobalName /////////////// +//@requires: GetBuiltinName +//@substitute: naming + +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ + PyObject *result; +#if !CYTHON_AVOID_BORROWED_REFS +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 + // Identifier names are always interned and have a pre-calculated hash value. + result = _PyDict_GetItem_KnownHash($moddict_cname, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE($moddict_cname, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } else if (unlikely(PyErr_Occurred())) { + return NULL; + } +#else + result = PyDict_GetItem($moddict_cname, name); + __PYX_UPDATE_DICT_CACHE($moddict_cname, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } +#endif +#else + result = PyObject_GetItem($moddict_cname, name); + __PYX_UPDATE_DICT_CACHE($moddict_cname, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); +} + +//////////////////// GetAttr.proto //////////////////// + +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /*proto*/ + +//////////////////// GetAttr //////////////////// +//@requires: PyObjectGetAttrStr + +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +#if CYTHON_USE_TYPE_SLOTS +#if PY_MAJOR_VERSION >= 3 + if (likely(PyUnicode_Check(n))) +#else + if (likely(PyString_Check(n))) +#endif + return __Pyx_PyObject_GetAttrStr(o, n); +#endif + return PyObject_GetAttr(o, n); +} + +/////////////// PyObjectLookupSpecial.proto /////////////// +//@requires: PyObjectGetAttrStr + +#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) { + PyObject *res; + PyTypeObject *tp = Py_TYPE(obj); +#if PY_MAJOR_VERSION < 3 + if (unlikely(PyInstance_Check(obj))) + return __Pyx_PyObject_GetAttrStr(obj, attr_name); +#endif + // adapted from CPython's special_lookup() in ceval.c + res = _PyType_Lookup(tp, attr_name); + if (likely(res)) { + descrgetfunc f = Py_TYPE(res)->tp_descr_get; + if (!f) { + Py_INCREF(res); + } else { + res = f(res, obj, (PyObject *)tp); + } + } else { + PyErr_SetObject(PyExc_AttributeError, attr_name); + } + return res; +} +#else +#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) +#endif + + +/////////////// PyObject_GenericGetAttrNoDict.proto /////////////// + +// Setting "tp_getattro" to anything but "PyObject_GenericGetAttr" disables fast method calls in Py3.7. +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); +#else +// No-args macro to allow function pointer assignment. +#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr +#endif + +/////////////// PyObject_GenericGetAttrNoDict /////////////// + +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 + +static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, attr_name); +#else + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(attr_name)); +#endif + return NULL; +} + +static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { + // Copied and adapted from _PyObject_GenericGetAttrWithDict() in CPython 2.6/3.7. + // To be used in the "tp_getattro" slot of extension types that have no instance dict and cannot be subclassed. + PyObject *descr; + PyTypeObject *tp = Py_TYPE(obj); + + if (unlikely(!PyString_Check(attr_name))) { + return PyObject_GenericGetAttr(obj, attr_name); + } + + assert(!tp->tp_dictoffset); + descr = _PyType_Lookup(tp, attr_name); + if (unlikely(!descr)) { + return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); + } + + Py_INCREF(descr); + + #if PY_MAJOR_VERSION < 3 + if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) + #endif + { + descrgetfunc f = Py_TYPE(descr)->tp_descr_get; + // Optimise for the non-descriptor case because it is faster. + if (unlikely(f)) { + PyObject *res = f(descr, obj, (PyObject *)tp); + Py_DECREF(descr); + return res; + } + } + return descr; +} +#endif + + +/////////////// PyObject_GenericGetAttr.proto /////////////// + +// Setting "tp_getattro" to anything but "PyObject_GenericGetAttr" disables fast method calls in Py3.7. +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); +#else +// No-args macro to allow function pointer assignment. +#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr +#endif + +/////////////// PyObject_GenericGetAttr /////////////// +//@requires: PyObject_GenericGetAttrNoDict + +#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 +static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { + if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { + return PyObject_GenericGetAttr(obj, attr_name); + } + return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); +} +#endif + + +/////////////// PyObjectGetAttrStrNoError.proto /////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);/*proto*/ + +/////////////// PyObjectGetAttrStrNoError /////////////// +//@requires: PyObjectGetAttrStr +//@requires: Exceptions.c::PyThreadStateGet +//@requires: Exceptions.c::PyErrFetchRestore +//@requires: Exceptions.c::PyErrExceptionMatches + +static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { + __Pyx_PyThreadState_declare + __Pyx_PyThreadState_assign + if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) + __Pyx_PyErr_Clear(); +} + +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { + PyObject *result; +#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 + // _PyObject_GenericGetAttrWithDict() in CPython 3.7+ can avoid raising the AttributeError. + // See https://bugs.python.org/issue32544 + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { + return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); + } +#endif + result = __Pyx_PyObject_GetAttrStr(obj, attr_name); + if (unlikely(!result)) { + __Pyx_PyObject_GetAttrStr_ClearAttributeError(); + } + return result; +} + + +/////////////// PyObjectGetAttrStr.proto /////////////// + +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);/*proto*/ +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +/////////////// PyObjectGetAttrStr /////////////// + +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_getattr)) + return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); +#endif + return PyObject_GetAttr(obj, attr_name); +} +#endif + + +/////////////// PyObjectSetAttrStr.proto /////////////// + +#if CYTHON_USE_TYPE_SLOTS +#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);/*proto*/ +#else +#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) +#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) +#endif + +/////////////// PyObjectSetAttrStr /////////////// + +#if CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_setattro)) + return tp->tp_setattro(obj, attr_name, value); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_setattr)) + return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); +#endif + return PyObject_SetAttr(obj, attr_name, value); +} +#endif + + +/////////////// PyObjectGetMethod.proto /////////////// + +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);/*proto*/ + +/////////////// PyObjectGetMethod /////////////// +//@requires: PyObjectGetAttrStr + +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + // Copied from _PyObject_GetMethod() in CPython 3.7 + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + + assert (*method == NULL); + + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); + // Repeating the condition below accommodates for MSVC's inability to test macros inside of macro expansions. +#if PY_MAJOR_VERSION >= 3 + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type))) + #endif +#else + // "PyMethodDescr_Type" is not part of the C-API in Py2. + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + } + } + + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + + if (meth_found) { + *method = descr; + return 1; + } + + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + + if (descr != NULL) { + *method = descr; + return 0; + } + + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, name); +#else + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(name)); +#endif + return 0; + +// Generic fallback implementation using normal attribute lookup. +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif + +try_unpack: +#if CYTHON_UNPACK_METHODS + // Even if we failed to avoid creating a bound method object, it's still worth unpacking it now, if possible. + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} + + +/////////////// UnpackUnboundCMethod.proto /////////////// + +typedef struct { + PyObject *type; + PyObject **method_name; + // "func" is set on first access (direct C function pointer) + PyCFunction func; + // "method" is set on first access (fallback) + PyObject *method; + int flag; +} __Pyx_CachedCFunction; + +/////////////// UnpackUnboundCMethod /////////////// +//@requires: PyObjectGetAttrStr + +static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + PyObject *method; + method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); + if (unlikely(!method)) + return -1; + target->method = method; +#if CYTHON_COMPILING_IN_CPYTHON + #if PY_MAJOR_VERSION >= 3 + // method dscriptor type isn't exported in Py2.x, cannot easily check the type there + if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) + #endif + { + PyMethodDescrObject *descr = (PyMethodDescrObject*) method; + target->func = descr->d_method->ml_meth; + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); + } +#endif + return 0; +} + + +/////////////// CallUnboundCMethod0.proto /////////////// +//@substitute: naming + +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); /*proto*/ +#if CYTHON_COMPILING_IN_CPYTHON +// FASTCALL methods receive "&empty_tuple" as simple "PyObject[0]*" +#define __Pyx_CallUnboundCMethod0(cfunc, self) \ + (likely((cfunc)->func) ? \ + (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) : \ + (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ? \ + (PY_VERSION_HEX >= 0x030700A0 ? \ + (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &$empty_tuple, 0) : \ + (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &$empty_tuple, 0, NULL)) : \ + (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ? \ + (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &$empty_tuple, 0, NULL) : \ + (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, $empty_tuple, NULL)) : \ + ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, $empty_tuple) : \ + __Pyx__CallUnboundCMethod0(cfunc, self)))))) : \ + __Pyx__CallUnboundCMethod0(cfunc, self)) +#else +#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) +#endif + +/////////////// CallUnboundCMethod0 /////////////// +//@requires: UnpackUnboundCMethod +//@requires: PyObjectCall + +static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + PyObject *args, *result = NULL; + if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_ASSUME_SAFE_MACROS + args = PyTuple_New(1); + if (unlikely(!args)) goto bad; + Py_INCREF(self); + PyTuple_SET_ITEM(args, 0, self); +#else + args = PyTuple_Pack(1, self); + if (unlikely(!args)) goto bad; +#endif + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); + Py_DECREF(args); +bad: + return result; +} + + +/////////////// CallUnboundCMethod1.proto /////////////// + +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);/*proto*/ + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);/*proto*/ +#else +#define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) +#endif + +/////////////// CallUnboundCMethod1 /////////////// +//@requires: UnpackUnboundCMethod +//@requires: PyObjectCall + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { + if (likely(cfunc->func)) { + int flag = cfunc->flag; + // Not using #ifdefs for PY_VERSION_HEX to avoid C compiler warnings about unused functions. + if (flag == METH_O) { + return (*(cfunc->func))(self, arg); + } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) { + if (PY_VERSION_HEX >= 0x030700A0) { + return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1); + } else { + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); + } + } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) { + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); + } + } + return __Pyx__CallUnboundCMethod1(cfunc, self, arg); +} +#endif + +static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ + PyObject *args, *result = NULL; + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + args = PyTuple_New(1); + if (unlikely(!args)) goto bad; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + if (cfunc->flag & METH_KEYWORDS) + result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); + else + result = (*cfunc->func)(self, args); + } else { + args = PyTuple_New(2); + if (unlikely(!args)) goto bad; + Py_INCREF(self); + PyTuple_SET_ITEM(args, 0, self); + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 1, arg); + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); + } +#else + args = PyTuple_Pack(2, self, arg); + if (unlikely(!args)) goto bad; + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); +#endif +bad: + Py_XDECREF(args); + return result; +} + + +/////////////// CallUnboundCMethod2.proto /////////////// + +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); /*proto*/ + +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); /*proto*/ +#else +#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) +#endif + +/////////////// CallUnboundCMethod2 /////////////// +//@requires: UnpackUnboundCMethod +//@requires: PyObjectCall + +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 +static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { + if (likely(cfunc->func)) { + PyObject *args[2] = {arg1, arg2}; + if (cfunc->flag == METH_FASTCALL) { + #if PY_VERSION_HEX >= 0x030700A0 + return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2); + #else + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); + #endif + } + #if PY_VERSION_HEX >= 0x030700A0 + if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); + #endif + } + return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); +} +#endif + +static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ + PyObject *args, *result = NULL; + if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; +#if CYTHON_COMPILING_IN_CPYTHON + if (cfunc->func && (cfunc->flag & METH_VARARGS)) { + args = PyTuple_New(2); + if (unlikely(!args)) goto bad; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + if (cfunc->flag & METH_KEYWORDS) + result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); + else + result = (*cfunc->func)(self, args); + } else { + args = PyTuple_New(3); + if (unlikely(!args)) goto bad; + Py_INCREF(self); + PyTuple_SET_ITEM(args, 0, self); + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 1, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 2, arg2); + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); + } +#else + args = PyTuple_Pack(3, self, arg1, arg2); + if (unlikely(!args)) goto bad; + result = __Pyx_PyObject_Call(cfunc->method, args, NULL); +#endif +bad: + Py_XDECREF(args); + return result; +} + + +/////////////// PyObjectCallMethod0.proto /////////////// + +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); /*proto*/ + +/////////////// PyObjectCallMethod0 /////////////// +//@requires: PyObjectGetMethod +//@requires: PyObjectCallOneArg +//@requires: PyObjectCallNoArg + +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_CallNoArg(method); + Py_DECREF(method); +bad: + return result; +} + + +/////////////// PyObjectCallMethod1.proto /////////////// + +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); /*proto*/ + +/////////////// PyObjectCallMethod1 /////////////// +//@requires: PyObjectGetMethod +//@requires: PyObjectCallOneArg +//@requires: PyObjectCall2Args + +static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { + // Separate function to avoid excessive inlining. + PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); + Py_DECREF(method); + return result; +} + +static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { + PyObject *method = NULL, *result; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call2Args(method, obj, arg); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + return __Pyx__PyObject_CallMethod1(method, arg); +} + + +/////////////// PyObjectCallMethod2.proto /////////////// + +static PyObject* __Pyx_PyObject_CallMethod2(PyObject* obj, PyObject* method_name, PyObject* arg1, PyObject* arg2); /*proto*/ + +/////////////// PyObjectCallMethod2 /////////////// +//@requires: PyObjectCall +//@requires: PyFunctionFastCall +//@requires: PyCFunctionFastCall +//@requires: PyObjectCall2Args + +static PyObject* __Pyx_PyObject_Call3Args(PyObject* function, PyObject* arg1, PyObject* arg2, PyObject* arg3) { + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[3] = {arg1, arg2, arg3}; + return __Pyx_PyFunction_FastCall(function, args, 3); + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[3] = {arg1, arg2, arg3}; + return __Pyx_PyFunction_FastCall(function, args, 3); + } + #endif + + args = PyTuple_New(3); + if (unlikely(!args)) goto done; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + Py_INCREF(arg3); + PyTuple_SET_ITEM(args, 2, arg3); + + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + return result; +} + +static PyObject* __Pyx_PyObject_CallMethod2(PyObject* obj, PyObject* method_name, PyObject* arg1, PyObject* arg2) { + PyObject *args, *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_Call3Args(method, obj, arg1, arg2); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) return NULL; + result = __Pyx_PyObject_Call2Args(method, arg1, arg2); + Py_DECREF(method); + return result; +} + + +/////////////// tp_new.proto /////////////// + +#define __Pyx_tp_new(type_obj, args) __Pyx_tp_new_kwargs(type_obj, args, NULL) +static CYTHON_INLINE PyObject* __Pyx_tp_new_kwargs(PyObject* type_obj, PyObject* args, PyObject* kwargs) { + return (PyObject*) (((PyTypeObject*)type_obj)->tp_new((PyTypeObject*)type_obj, args, kwargs)); +} + + +/////////////// PyObjectCall.proto /////////////// + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/ +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif + +/////////////// PyObjectCall /////////////// + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = Py_TYPE(func)->tp_call; + + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = (*call)(func, arg, kw); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + + +/////////////// PyObjectCallMethO.proto /////////////// + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); /*proto*/ +#endif + +/////////////// PyObjectCallMethO /////////////// + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { + PyObject *self, *result; + PyCFunction cfunc; + cfunc = PyCFunction_GET_FUNCTION(func); + self = PyCFunction_GET_SELF(func); + + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; + result = cfunc(self, arg); + Py_LeaveRecursiveCall(); + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); + } + return result; +} +#endif + + +/////////////// PyFunctionFastCall.proto /////////////// + +#if CYTHON_FAST_PYCALL +#define __Pyx_PyFunction_FastCall(func, args, nargs) \ + __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) + +// let's assume that the non-public C-API function might still change during the 3.6 beta phase +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); +#else +#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) +#endif + +// Backport from Python 3 +// Assert a build-time dependency, as an expression. +// Your compile will fail if the condition isn't true, or can't be evaluated +// by the compiler. This can be used in an expression: its value is 0. +// Example: +// #define foo_to_char(foo) \ +// ((char *)(foo) \ +// + Py_BUILD_ASSERT_EXPR(offsetof(struct foo, string) == 0)) +// +// Written by Rusty Russell, public domain, http://ccodearchive.net/ +#define __Pyx_BUILD_ASSERT_EXPR(cond) \ + (sizeof(char [1 - 2*!(cond)]) - 1) + +#ifndef Py_MEMBER_SIZE +// Get the size of a structure member in bytes +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + +#if CYTHON_FAST_PYCALL + // Initialised by module init code. + static size_t __pyx_pyframe_localsplus_offset = 0; + + #include "frameobject.h" +#if PY_VERSION_HEX >= 0x030b00a6 + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif + + // This is the long runtime version of + // #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) + // offsetof(PyFrameObject, f_localsplus) differs between regular C-Python and Stackless Python. + // Therefore the offset is computed at run time from PyFrame_type.tp_basicsize. That is feasible, + // because f_localsplus is the last field of PyFrameObject (checked by Py_BUILD_ASSERT_EXPR below). + #define __Pxy_PyFrame_Initialize_Offsets() \ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)), \ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame) \ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) +#endif // CYTHON_FAST_PYCALL +#endif + + +/////////////// PyFunctionFastCall /////////////// +// copied from CPython 3.6 ceval.c + +#if CYTHON_FAST_PYCALL + +static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, + PyObject *globals) { + PyFrameObject *f; + PyThreadState *tstate = __Pyx_PyThreadState_Current; + PyObject **fastlocals; + Py_ssize_t i; + PyObject *result; + + assert(globals != NULL); + /* XXX Perhaps we should create a specialized + PyFrame_New() that doesn't take locals, but does + take builtins without sanity checking them. + */ + assert(tstate != NULL); + f = PyFrame_New(tstate, co, globals, NULL); + if (f == NULL) { + return NULL; + } + + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); + + for (i = 0; i < na; i++) { + Py_INCREF(*args); + fastlocals[i] = *args++; + } + result = PyEval_EvalFrameEx(f,0); + + ++tstate->recursion_depth; + Py_DECREF(f); + --tstate->recursion_depth; + + return result; +} + + +#if 1 || PY_VERSION_HEX < 0x030600B1 +static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { + PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); + PyObject *globals = PyFunction_GET_GLOBALS(func); + PyObject *argdefs = PyFunction_GET_DEFAULTS(func); + PyObject *closure; +#if PY_MAJOR_VERSION >= 3 + PyObject *kwdefs; + //#if PY_VERSION_HEX >= 0x03050000 + //PyObject *name, *qualname; + //#endif +#endif + PyObject *kwtuple, **k; + PyObject **d; + Py_ssize_t nd; + Py_ssize_t nk; + PyObject *result; + + assert(kwargs == NULL || PyDict_Check(kwargs)); + nk = kwargs ? PyDict_Size(kwargs) : 0; + + if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { + return NULL; + } + + if ( +#if PY_MAJOR_VERSION >= 3 + co->co_kwonlyargcount == 0 && +#endif + likely(kwargs == NULL || nk == 0) && + co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { + /* Fast paths */ + if (argdefs == NULL && co->co_argcount == nargs) { + result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); + goto done; + } + else if (nargs == 0 && argdefs != NULL + && co->co_argcount == Py_SIZE(argdefs)) { + /* function called with no arguments, but all parameters have + a default value: use default values as arguments .*/ + args = &PyTuple_GET_ITEM(argdefs, 0); + result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); + goto done; + } + } + + if (kwargs != NULL) { + Py_ssize_t pos, i; + kwtuple = PyTuple_New(2 * nk); + if (kwtuple == NULL) { + result = NULL; + goto done; + } + + k = &PyTuple_GET_ITEM(kwtuple, 0); + pos = i = 0; + while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { + Py_INCREF(k[i]); + Py_INCREF(k[i+1]); + i += 2; + } + nk = i / 2; + } + else { + kwtuple = NULL; + k = NULL; + } + + closure = PyFunction_GET_CLOSURE(func); +#if PY_MAJOR_VERSION >= 3 + kwdefs = PyFunction_GET_KW_DEFAULTS(func); + //#if PY_VERSION_HEX >= 0x03050000 + //name = ((PyFunctionObject *)func) -> func_name; + //qualname = ((PyFunctionObject *)func) -> func_qualname; + //#endif +#endif + + if (argdefs != NULL) { + d = &PyTuple_GET_ITEM(argdefs, 0); + nd = Py_SIZE(argdefs); + } + else { + d = NULL; + nd = 0; + } + + //#if PY_VERSION_HEX >= 0x03050000 + //return _PyEval_EvalCodeWithName((PyObject*)co, globals, (PyObject *)NULL, + // args, nargs, + // NULL, 0, + // d, nd, kwdefs, + // closure, name, qualname); + //#elif PY_MAJOR_VERSION >= 3 +#if PY_MAJOR_VERSION >= 3 + result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, kwdefs, closure); +#else + result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, + args, (int)nargs, + k, (int)nk, + d, (int)nd, closure); +#endif + Py_XDECREF(kwtuple); + +done: + Py_LeaveRecursiveCall(); + return result; +} +#endif /* CPython < 3.6 */ +#endif /* CYTHON_FAST_PYCALL */ + + +/////////////// PyCFunctionFastCall.proto /////////////// + +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); +#else +#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) +#endif + +/////////////// PyCFunctionFastCall /////////////// + +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { + PyCFunctionObject *func = (PyCFunctionObject*)func_obj; + PyCFunction meth = PyCFunction_GET_FUNCTION(func); + PyObject *self = PyCFunction_GET_SELF(func); + int flags = PyCFunction_GET_FLAGS(func); + + assert(PyCFunction_Check(func)); + assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); + assert(nargs >= 0); + assert(nargs == 0 || args != NULL); + + /* _PyCFunction_FastCallDict() must not be called with an exception set, + because it may clear it (directly or indirectly) and so the + caller loses its exception */ + assert(!PyErr_Occurred()); + + if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { + return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); + } else { + return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); + } +} +#endif /* CYTHON_FAST_PYCCALL */ + + +/////////////// PyObjectCall2Args.proto /////////////// + +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /*proto*/ + +/////////////// PyObjectCall2Args /////////////// +//@requires: PyObjectCall +//@requires: PyFunctionFastCall +//@requires: PyCFunctionFastCall + +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args, *result = NULL; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyFunction_FastCall(function, args, 2); + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyCFunction_FastCall(function, args, 2); + } + #endif + + args = PyTuple_New(2); + if (unlikely(!args)) goto done; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + + Py_INCREF(function); + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); +done: + return result; +} + + +/////////////// PyObjectCallOneArg.proto /////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /*proto*/ + +/////////////// PyObjectCallOneArg /////////////// +//@requires: PyObjectCallMethO +//@requires: PyObjectCall +//@requires: PyFunctionFastCall +//@requires: PyCFunctionFastCall + +#if CYTHON_COMPILING_IN_CPYTHON +static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_New(1); + if (unlikely(!args)) return NULL; + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 0, arg); + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} + +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, &arg, 1); + } +#endif + if (likely(PyCFunction_Check(func))) { + if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { + // fast and simple case that we are optimising for + return __Pyx_PyObject_CallMethO(func, arg); +#if CYTHON_FAST_PYCCALL + } else if (__Pyx_PyFastCFunction_Check(func)) { + return __Pyx_PyCFunction_FastCall(func, &arg, 1); +#endif + } + } + return __Pyx__PyObject_CallOneArg(func, arg); +} +#else +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { + PyObject *result; + PyObject *args = PyTuple_Pack(1, arg); + if (unlikely(!args)) return NULL; + result = __Pyx_PyObject_Call(func, args, NULL); + Py_DECREF(args); + return result; +} +#endif + + +/////////////// PyObjectCallNoArg.proto /////////////// +//@requires: PyObjectCall +//@substitute: naming + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); /*proto*/ +#else +#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, $empty_tuple, NULL) +#endif + +/////////////// PyObjectCallNoArg /////////////// +//@requires: PyObjectCallMethO +//@requires: PyObjectCall +//@requires: PyFunctionFastCall +//@substitute: naming + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, NULL, 0); + } +#endif +#ifdef __Pyx_CyFunction_USED + if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) +#else + if (likely(PyCFunction_Check(func))) +#endif + { + if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { + // fast and simple case that we are optimising for + return __Pyx_PyObject_CallMethO(func, NULL); + } + } + return __Pyx_PyObject_Call(func, $empty_tuple, NULL); +} +#endif + + +/////////////// MatrixMultiply.proto /////////////// + +#if PY_VERSION_HEX >= 0x03050000 + #define __Pyx_PyNumber_MatrixMultiply(x,y) PyNumber_MatrixMultiply(x,y) + #define __Pyx_PyNumber_InPlaceMatrixMultiply(x,y) PyNumber_InPlaceMatrixMultiply(x,y) +#else +#define __Pyx_PyNumber_MatrixMultiply(x,y) __Pyx__PyNumber_MatrixMultiply(x, y, "@") +static PyObject* __Pyx__PyNumber_MatrixMultiply(PyObject* x, PyObject* y, const char* op_name); +static PyObject* __Pyx_PyNumber_InPlaceMatrixMultiply(PyObject* x, PyObject* y); +#endif + +/////////////// MatrixMultiply /////////////// +//@requires: PyObjectGetAttrStr +//@requires: PyObjectCallOneArg +//@requires: PyFunctionFastCall +//@requires: PyCFunctionFastCall + +#if PY_VERSION_HEX < 0x03050000 +static PyObject* __Pyx_PyObject_CallMatrixMethod(PyObject* method, PyObject* arg) { + // NOTE: eats the method reference + PyObject *result = NULL; +#if CYTHON_UNPACK_METHODS + if (likely(PyMethod_Check(method))) { + PyObject *self = PyMethod_GET_SELF(method); + if (likely(self)) { + PyObject *args; + PyObject *function = PyMethod_GET_FUNCTION(method); + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[2] = {self, arg}; + result = __Pyx_PyFunction_FastCall(function, args, 2); + goto done; + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[2] = {self, arg}; + result = __Pyx_PyCFunction_FastCall(function, args, 2); + goto done; + } + #endif + args = PyTuple_New(2); + if (unlikely(!args)) goto done; + Py_INCREF(self); + PyTuple_SET_ITEM(args, 0, self); + Py_INCREF(arg); + PyTuple_SET_ITEM(args, 1, arg); + Py_INCREF(function); + Py_DECREF(method); method = NULL; + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); + return result; + } + } +#endif + result = __Pyx_PyObject_CallOneArg(method, arg); +done: + Py_DECREF(method); + return result; +} + +#define __Pyx_TryMatrixMethod(x, y, py_method_name) { \ + PyObject *func = __Pyx_PyObject_GetAttrStr(x, py_method_name); \ + if (func) { \ + PyObject *result = __Pyx_PyObject_CallMatrixMethod(func, y); \ + if (result != Py_NotImplemented) \ + return result; \ + Py_DECREF(result); \ + } else { \ + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) \ + return NULL; \ + PyErr_Clear(); \ + } \ +} + +static PyObject* __Pyx__PyNumber_MatrixMultiply(PyObject* x, PyObject* y, const char* op_name) { + int right_is_subtype = PyObject_IsSubclass((PyObject*)Py_TYPE(y), (PyObject*)Py_TYPE(x)); + if (unlikely(right_is_subtype == -1)) + return NULL; + if (right_is_subtype) { + // to allow subtypes to override parent behaviour, try reversed operation first + // see note at https://docs.python.org/3/reference/datamodel.html#emulating-numeric-types + __Pyx_TryMatrixMethod(y, x, PYIDENT("__rmatmul__")) + } + __Pyx_TryMatrixMethod(x, y, PYIDENT("__matmul__")) + if (!right_is_subtype) { + __Pyx_TryMatrixMethod(y, x, PYIDENT("__rmatmul__")) + } + PyErr_Format(PyExc_TypeError, + "unsupported operand type(s) for %.2s: '%.100s' and '%.100s'", + op_name, + Py_TYPE(x)->tp_name, + Py_TYPE(y)->tp_name); + return NULL; +} + +static PyObject* __Pyx_PyNumber_InPlaceMatrixMultiply(PyObject* x, PyObject* y) { + __Pyx_TryMatrixMethod(x, y, PYIDENT("__imatmul__")) + return __Pyx__PyNumber_MatrixMultiply(x, y, "@="); +} + +#undef __Pyx_TryMatrixMethod +#endif + + +/////////////// PyDictVersioning.proto /////////////// + +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) \ + (version_var) = __PYX_GET_DICT_VERSION(dict); \ + (cache_var) = (value); + +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) { \ + static PY_UINT64_T __pyx_dict_version = 0; \ + static PyObject *__pyx_dict_cached_value = NULL; \ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) { \ + (VAR) = __pyx_dict_cached_value; \ + } else { \ + (VAR) = __pyx_dict_cached_value = (LOOKUP); \ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT); \ + } \ +} + +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); /*proto*/ +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); /*proto*/ +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); /*proto*/ + +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif + +/////////////// PyDictVersioning /////////////// + +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS +static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; +} + +static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { + PyObject **dictptr = NULL; + Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; + if (offset) { +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif + } + return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; +} + +static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { + PyObject *dict = Py_TYPE(obj)->tp_dict; + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) + return 0; + return obj_dict_version == __Pyx_get_object_dict_version(obj); +} +#endif diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Optimize.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Optimize.c new file mode 100644 index 00000000000..35f3a67c962 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Optimize.c @@ -0,0 +1,1195 @@ +/* + * Optional optimisations of built-in functions and methods. + * + * Required replacements of builtins are in Builtins.c. + * + * General object operations and protocols are in ObjectHandling.c. + */ + +/////////////// append.proto /////////////// + +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/ + +/////////////// append /////////////// +//@requires: ListAppend +//@requires: ObjectHandling.c::PyObjectCallMethod1 + +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { + if (likely(PyList_CheckExact(L))) { + if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; + } else { + PyObject* retval = __Pyx_PyObject_CallMethod1(L, PYIDENT("append"), x); + if (unlikely(!retval)) + return -1; + Py_DECREF(retval); + } + return 0; +} + +/////////////// ListAppend.proto /////////////// + +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#endif + +/////////////// ListCompAppend.proto /////////////// + +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len)) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + __Pyx_SET_SIZE(list, len + 1); + return 0; + } + return PyList_Append(list, x); +} +#else +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) +#endif + +//////////////////// ListExtend.proto //////////////////// + +static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject* none = _PyList_Extend((PyListObject*)L, v); + if (unlikely(!none)) + return -1; + Py_DECREF(none); + return 0; +#else + return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v); +#endif +} + +/////////////// pop.proto /////////////// + +static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L); /*proto*/ + +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L); /*proto*/ +#define __Pyx_PyObject_Pop(L) (likely(PyList_CheckExact(L)) ? \ + __Pyx_PyList_Pop(L) : __Pyx__PyObject_Pop(L)) + +#else +#define __Pyx_PyList_Pop(L) __Pyx__PyObject_Pop(L) +#define __Pyx_PyObject_Pop(L) __Pyx__PyObject_Pop(L) +#endif + +/////////////// pop /////////////// +//@requires: ObjectHandling.c::PyObjectCallMethod0 + +static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L) { + if (Py_TYPE(L) == &PySet_Type) { + return PySet_Pop(L); + } + return __Pyx_PyObject_CallMethod0(L, PYIDENT("pop")); +} + +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L) { + /* Check that both the size is positive and no reallocation shrinking needs to be done. */ + if (likely(PyList_GET_SIZE(L) > (((PyListObject*)L)->allocated >> 1))) { + __Pyx_SET_SIZE(L, Py_SIZE(L) - 1); + return PyList_GET_ITEM(L, PyList_GET_SIZE(L)); + } + return CALL_UNBOUND_METHOD(PyList_Type, "pop", L); +} +#endif + + +/////////////// pop_index.proto /////////////// + +static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix); /*proto*/ +static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix); /*proto*/ + +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix); /*proto*/ + +#define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) ( \ + (likely(PyList_CheckExact(L) && __Pyx_fits_Py_ssize_t(ix, type, is_signed))) ? \ + __Pyx__PyList_PopIndex(L, py_ix, ix) : ( \ + (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) : \ + __Pyx__PyObject_PopIndex(L, py_ix))) + +#define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) ( \ + __Pyx_fits_Py_ssize_t(ix, type, is_signed) ? \ + __Pyx__PyList_PopIndex(L, py_ix, ix) : ( \ + (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) : \ + __Pyx__PyObject_PopIndex(L, py_ix))) + +#else + +#define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) \ + __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) + +#define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) ( \ + (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) : \ + __Pyx__PyObject_PopIndex(L, py_ix)) +#endif + +/////////////// pop_index /////////////// +//@requires: ObjectHandling.c::PyObjectCallMethod1 + +static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix) { + PyObject *r; + if (unlikely(!py_ix)) return NULL; + r = __Pyx__PyObject_PopIndex(L, py_ix); + Py_DECREF(py_ix); + return r; +} + +static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix) { + return __Pyx_PyObject_CallMethod1(L, PYIDENT("pop"), py_ix); +} + +#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS +static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix) { + Py_ssize_t size = PyList_GET_SIZE(L); + if (likely(size > (((PyListObject*)L)->allocated >> 1))) { + Py_ssize_t cix = ix; + if (cix < 0) { + cix += size; + } + if (likely(__Pyx_is_valid_index(cix, size))) { + PyObject* v = PyList_GET_ITEM(L, cix); + __Pyx_SET_SIZE(L, Py_SIZE(L) - 1); + size -= 1; + memmove(&PyList_GET_ITEM(L, cix), &PyList_GET_ITEM(L, cix+1), (size_t)(size-cix)*sizeof(PyObject*)); + return v; + } + } + if (py_ix == Py_None) { + return __Pyx__PyObject_PopNewIndex(L, PyInt_FromSsize_t(ix)); + } else { + return __Pyx__PyObject_PopIndex(L, py_ix); + } +} +#endif + + +/////////////// dict_getitem_default.proto /////////////// + +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); /*proto*/ + +/////////////// dict_getitem_default /////////////// + +static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { + PyObject* value; +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (unlikely(PyErr_Occurred())) + return NULL; + value = default_value; + } + Py_INCREF(value); + // avoid C compiler warning about unused utility functions + if ((1)); +#else + if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { + /* these presumably have safe hash functions */ + value = PyDict_GetItem(d, key); + if (unlikely(!value)) { + value = default_value; + } + Py_INCREF(value); + } +#endif + else { + if (default_value == Py_None) + value = CALL_UNBOUND_METHOD(PyDict_Type, "get", d, key); + else + value = CALL_UNBOUND_METHOD(PyDict_Type, "get", d, key, default_value); + } + return value; +} + + +/////////////// dict_setdefault.proto /////////////// + +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type); /*proto*/ + +/////////////// dict_setdefault /////////////// + +static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, + CYTHON_UNUSED int is_safe_type) { + PyObject* value; +#if PY_VERSION_HEX >= 0x030400A0 + // we keep the method call at the end to avoid "unused" C compiler warnings + if ((1)) { + value = PyDict_SetDefault(d, key, default_value); + if (unlikely(!value)) return NULL; + Py_INCREF(value); +#else + if (is_safe_type == 1 || (is_safe_type == -1 && + /* the following builtins presumably have repeatably safe and fast hash functions */ +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY + (PyUnicode_CheckExact(key) || PyString_CheckExact(key) || PyLong_CheckExact(key)))) { + value = PyDict_GetItemWithError(d, key); + if (unlikely(!value)) { + if (unlikely(PyErr_Occurred())) + return NULL; + if (unlikely(PyDict_SetItem(d, key, default_value) == -1)) + return NULL; + value = default_value; + } + Py_INCREF(value); +#else + (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key) || PyLong_CheckExact(key)))) { + value = PyDict_GetItem(d, key); + if (unlikely(!value)) { + if (unlikely(PyDict_SetItem(d, key, default_value) == -1)) + return NULL; + value = default_value; + } + Py_INCREF(value); +#endif +#endif + } else { + value = CALL_UNBOUND_METHOD(PyDict_Type, "setdefault", d, key, default_value); + } + return value; +} + + +/////////////// py_dict_clear.proto /////////////// + +#define __Pyx_PyDict_Clear(d) (PyDict_Clear(d), 0) + + +/////////////// py_dict_pop.proto /////////////// + +static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value); /*proto*/ + +/////////////// py_dict_pop /////////////// + +static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B3 + if ((1)) { + return _PyDict_Pop(d, key, default_value); + } else + // avoid "function unused" warnings +#endif + if (default_value) { + return CALL_UNBOUND_METHOD(PyDict_Type, "pop", d, key, default_value); + } else { + return CALL_UNBOUND_METHOD(PyDict_Type, "pop", d, key); + } +} + + +/////////////// dict_iter.proto /////////////// + +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_is_dict); +static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); + +/////////////// dict_iter /////////////// +//@requires: ObjectHandling.c::UnpackTuple2 +//@requires: ObjectHandling.c::IterFinish +//@requires: ObjectHandling.c::PyObjectCallMethod0 + +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, + Py_ssize_t* p_orig_length, int* p_source_is_dict) { + is_dict = is_dict || likely(PyDict_CheckExact(iterable)); + *p_source_is_dict = is_dict; + if (is_dict) { +#if !CYTHON_COMPILING_IN_PYPY + *p_orig_length = PyDict_Size(iterable); + Py_INCREF(iterable); + return iterable; +#elif PY_MAJOR_VERSION >= 3 + // On PyPy3, we need to translate manually a few method names. + // This logic is not needed on CPython thanks to the fast case above. + static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; + PyObject **pp = NULL; + if (method_name) { + const char *name = PyUnicode_AsUTF8(method_name); + if (strcmp(name, "iteritems") == 0) pp = &py_items; + else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; + else if (strcmp(name, "itervalues") == 0) pp = &py_values; + if (pp) { + if (!*pp) { + *pp = PyUnicode_FromString(name + 4); + if (!*pp) + return NULL; + } + method_name = *pp; + } + } +#endif + } + *p_orig_length = 0; + if (method_name) { + PyObject* iter; + iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); + if (!iterable) + return NULL; +#if !CYTHON_COMPILING_IN_PYPY + if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) + return iterable; +#endif + iter = PyObject_GetIter(iterable); + Py_DECREF(iterable); + return iter; + } + return PyObject_GetIter(iterable); +} + +static CYTHON_INLINE int __Pyx_dict_iter_next( + PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, + PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { + PyObject* next_item; +#if !CYTHON_COMPILING_IN_PYPY + if (source_is_dict) { + PyObject *key, *value; + if (unlikely(orig_length != PyDict_Size(iter_obj))) { + PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); + return -1; + } + if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { + return 0; + } + if (pitem) { + PyObject* tuple = PyTuple_New(2); + if (unlikely(!tuple)) { + return -1; + } + Py_INCREF(key); + Py_INCREF(value); + PyTuple_SET_ITEM(tuple, 0, key); + PyTuple_SET_ITEM(tuple, 1, value); + *pitem = tuple; + } else { + if (pkey) { + Py_INCREF(key); + *pkey = key; + } + if (pvalue) { + Py_INCREF(value); + *pvalue = value; + } + } + return 1; + } else if (PyTuple_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; + *ppos = pos + 1; + next_item = PyTuple_GET_ITEM(iter_obj, pos); + Py_INCREF(next_item); + } else if (PyList_CheckExact(iter_obj)) { + Py_ssize_t pos = *ppos; + if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; + *ppos = pos + 1; + next_item = PyList_GET_ITEM(iter_obj, pos); + Py_INCREF(next_item); + } else +#endif + { + next_item = PyIter_Next(iter_obj); + if (unlikely(!next_item)) { + return __Pyx_IterFinish(); + } + } + if (pitem) { + *pitem = next_item; + } else if (pkey && pvalue) { + if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) + return -1; + } else if (pkey) { + *pkey = next_item; + } else { + *pvalue = next_item; + } + return 1; +} + + +/////////////// set_iter.proto /////////////// + +static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set, + Py_ssize_t* p_orig_length, int* p_source_is_set); /*proto*/ +static CYTHON_INLINE int __Pyx_set_iter_next( + PyObject* iter_obj, Py_ssize_t orig_length, + Py_ssize_t* ppos, PyObject **value, + int source_is_set); /*proto*/ + +/////////////// set_iter /////////////// +//@requires: ObjectHandling.c::IterFinish + +static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set, + Py_ssize_t* p_orig_length, int* p_source_is_set) { +#if CYTHON_COMPILING_IN_CPYTHON + is_set = is_set || likely(PySet_CheckExact(iterable) || PyFrozenSet_CheckExact(iterable)); + *p_source_is_set = is_set; + if (likely(is_set)) { + *p_orig_length = PySet_Size(iterable); + Py_INCREF(iterable); + return iterable; + } +#else + (void)is_set; + *p_source_is_set = 0; +#endif + *p_orig_length = 0; + return PyObject_GetIter(iterable); +} + +static CYTHON_INLINE int __Pyx_set_iter_next( + PyObject* iter_obj, Py_ssize_t orig_length, + Py_ssize_t* ppos, PyObject **value, + int source_is_set) { + if (!CYTHON_COMPILING_IN_CPYTHON || unlikely(!source_is_set)) { + *value = PyIter_Next(iter_obj); + if (unlikely(!*value)) { + return __Pyx_IterFinish(); + } + (void)orig_length; + (void)ppos; + return 1; + } +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(PySet_GET_SIZE(iter_obj) != orig_length)) { + PyErr_SetString( + PyExc_RuntimeError, + "set changed size during iteration"); + return -1; + } + { + Py_hash_t hash; + int ret = _PySet_NextEntry(iter_obj, ppos, value, &hash); + // CPython does not raise errors here, only if !isinstance(iter_obj, set/frozenset) + assert (ret != -1); + if (likely(ret)) { + Py_INCREF(*value); + return 1; + } + } +#endif + return 0; +} + +/////////////// py_set_discard_unhashable /////////////// +//@requires: Builtins.c::pyfrozenset_new + +static int __Pyx_PySet_DiscardUnhashable(PyObject *set, PyObject *key) { + PyObject *tmpkey; + int rv; + + if (likely(!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))) + return -1; + PyErr_Clear(); + tmpkey = __Pyx_PyFrozenSet_New(key); + if (tmpkey == NULL) + return -1; + rv = PySet_Discard(set, tmpkey); + Py_DECREF(tmpkey); + return rv; +} + + +/////////////// py_set_discard.proto /////////////// + +static CYTHON_INLINE int __Pyx_PySet_Discard(PyObject *set, PyObject *key); /*proto*/ + +/////////////// py_set_discard /////////////// +//@requires: py_set_discard_unhashable + +static CYTHON_INLINE int __Pyx_PySet_Discard(PyObject *set, PyObject *key) { + int found = PySet_Discard(set, key); + // Convert *key* to frozenset if necessary + if (unlikely(found < 0)) { + found = __Pyx_PySet_DiscardUnhashable(set, key); + } + // note: returns -1 on error, 0 (not found) or 1 (found) otherwise => error check for -1 or < 0 works + return found; +} + + +/////////////// py_set_remove.proto /////////////// + +static CYTHON_INLINE int __Pyx_PySet_Remove(PyObject *set, PyObject *key); /*proto*/ + +/////////////// py_set_remove /////////////// +//@requires: py_set_discard_unhashable + +static int __Pyx_PySet_RemoveNotFound(PyObject *set, PyObject *key, int found) { + // Convert *key* to frozenset if necessary + if (unlikely(found < 0)) { + found = __Pyx_PySet_DiscardUnhashable(set, key); + } + if (likely(found == 0)) { + // Not found + PyObject *tup; + tup = PyTuple_Pack(1, key); + if (!tup) + return -1; + PyErr_SetObject(PyExc_KeyError, tup); + Py_DECREF(tup); + return -1; + } + // note: returns -1 on error, 0 (not found) or 1 (found) otherwise => error check for -1 or < 0 works + return found; +} + +static CYTHON_INLINE int __Pyx_PySet_Remove(PyObject *set, PyObject *key) { + int found = PySet_Discard(set, key); + if (unlikely(found != 1)) { + // note: returns -1 on error, 0 (not found) or 1 (found) otherwise => error check for -1 or < 0 works + return __Pyx_PySet_RemoveNotFound(set, key, found); + } + return 0; +} + + +/////////////// unicode_iter.proto /////////////// + +static CYTHON_INLINE int __Pyx_init_unicode_iteration( + PyObject* ustring, Py_ssize_t *length, void** data, int *kind); /* proto */ + +/////////////// unicode_iter /////////////// + +static CYTHON_INLINE int __Pyx_init_unicode_iteration( + PyObject* ustring, Py_ssize_t *length, void** data, int *kind) { +#if CYTHON_PEP393_ENABLED + if (unlikely(__Pyx_PyUnicode_READY(ustring) < 0)) return -1; + *kind = PyUnicode_KIND(ustring); + *length = PyUnicode_GET_LENGTH(ustring); + *data = PyUnicode_DATA(ustring); +#else + *kind = 0; + *length = PyUnicode_GET_SIZE(ustring); + *data = (void*)PyUnicode_AS_UNICODE(ustring); +#endif + return 0; +} + +/////////////// pyobject_as_double.proto /////////////// + +static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */ + +#if CYTHON_COMPILING_IN_PYPY +#define __Pyx_PyObject_AsDouble(obj) \ +(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \ + likely(PyInt_CheckExact(obj)) ? \ + PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj)) +#else +#define __Pyx_PyObject_AsDouble(obj) \ +((likely(PyFloat_CheckExact(obj))) ? \ + PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj)) +#endif + +/////////////// pyobject_as_double /////////////// + +static double __Pyx__PyObject_AsDouble(PyObject* obj) { + PyObject* float_value; +#if !CYTHON_USE_TYPE_SLOTS + float_value = PyNumber_Float(obj); if ((0)) goto bad; +#else + PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number; + if (likely(nb) && likely(nb->nb_float)) { + float_value = nb->nb_float(obj); + if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) { + PyErr_Format(PyExc_TypeError, + "__float__ returned non-float (type %.200s)", + Py_TYPE(float_value)->tp_name); + Py_DECREF(float_value); + goto bad; + } + } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) { +#if PY_MAJOR_VERSION >= 3 + float_value = PyFloat_FromString(obj); +#else + float_value = PyFloat_FromString(obj, 0); +#endif + } else { + PyObject* args = PyTuple_New(1); + if (unlikely(!args)) goto bad; + PyTuple_SET_ITEM(args, 0, obj); + float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0); + PyTuple_SET_ITEM(args, 0, 0); + Py_DECREF(args); + } +#endif + if (likely(float_value)) { + double value = PyFloat_AS_DOUBLE(float_value); + Py_DECREF(float_value); + return value; + } +bad: + return (double)-1; +} + + +/////////////// PyNumberPow2.proto /////////////// + +#define __Pyx_PyNumber_InPlacePowerOf2(a, b, c) __Pyx__PyNumber_PowerOf2(a, b, c, 1) +#define __Pyx_PyNumber_PowerOf2(a, b, c) __Pyx__PyNumber_PowerOf2(a, b, c, 0) + +static PyObject* __Pyx__PyNumber_PowerOf2(PyObject *two, PyObject *exp, PyObject *none, int inplace); /*proto*/ + +/////////////// PyNumberPow2 /////////////// + +static PyObject* __Pyx__PyNumber_PowerOf2(PyObject *two, PyObject *exp, PyObject *none, int inplace) { +// in CPython, 1<ob_digit[0]; + } else if (size == 0) { + return PyInt_FromLong(1L); + } else if (unlikely(size < 0)) { + goto fallback; + } else { + shiftby = PyLong_AsSsize_t(exp); + } + #else + shiftby = PyLong_AsSsize_t(exp); + #endif + } else { + goto fallback; + } + if (likely(shiftby >= 0)) { + if ((size_t)shiftby <= sizeof(long) * 8 - 2) { + long value = 1L << shiftby; + return PyInt_FromLong(value); +#ifdef HAVE_LONG_LONG + } else if ((size_t)shiftby <= sizeof(unsigned PY_LONG_LONG) * 8 - 1) { + unsigned PY_LONG_LONG value = ((unsigned PY_LONG_LONG)1) << shiftby; + return PyLong_FromUnsignedLongLong(value); +#endif + } else { + PyObject *result, *one = PyInt_FromLong(1L); + if (unlikely(!one)) return NULL; + result = PyNumber_Lshift(one, exp); + Py_DECREF(one); + return result; + } + } else if (shiftby == -1 && PyErr_Occurred()) { + PyErr_Clear(); + } +fallback: +#endif + return (inplace ? PyNumber_InPlacePower : PyNumber_Power)(two, exp, none); +} + + +/////////////// PyIntCompare.proto /////////////// + +{{py: c_ret_type = 'PyObject*' if ret_type.is_pyobject else 'int'}} +static CYTHON_INLINE {{c_ret_type}} __Pyx_PyInt_{{'' if ret_type.is_pyobject else 'Bool'}}{{op}}{{order}}(PyObject *op1, PyObject *op2, long intval, long inplace); /*proto*/ + +/////////////// PyIntCompare /////////////// + +{{py: pyval, ival = ('op2', 'b') if order == 'CObj' else ('op1', 'a') }} +{{py: c_ret_type = 'PyObject*' if ret_type.is_pyobject else 'int'}} +{{py: return_true = 'Py_RETURN_TRUE' if ret_type.is_pyobject else 'return 1'}} +{{py: return_false = 'Py_RETURN_FALSE' if ret_type.is_pyobject else 'return 0'}} +{{py: slot_name = op.lower() }} +{{py: c_op = {'Eq': '==', 'Ne': '!='}[op] }} +{{py: +return_compare = ( + (lambda a,b,c_op, return_true=return_true, return_false=return_false: "if ({a} {c_op} {b}) {return_true}; else {return_false};".format( + a=a, b=b, c_op=c_op, return_true=return_true, return_false=return_false)) + if ret_type.is_pyobject else + (lambda a,b,c_op: "return ({a} {c_op} {b});".format(a=a, b=b, c_op=c_op)) + ) +}} + +static CYTHON_INLINE {{c_ret_type}} __Pyx_PyInt_{{'' if ret_type.is_pyobject else 'Bool'}}{{op}}{{order}}(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { + if (op1 == op2) { + {{return_true if op == 'Eq' else return_false}}; + } + + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact({{pyval}}))) { + const long {{'a' if order == 'CObj' else 'b'}} = intval; + long {{ival}} = PyInt_AS_LONG({{pyval}}); + {{return_compare('a', 'b', c_op)}} + } + #endif + + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact({{pyval}}))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = Py_SIZE({{pyval}}); + const digit* digits = ((PyLongObject*){{pyval}})->ob_digit; + if (intval == 0) { + // == 0 => Py_SIZE(pyval) == 0 + {{return_compare('size', '0', c_op)}} + } else if (intval < 0) { + // < 0 => Py_SIZE(pyval) < 0 + if (size >= 0) + {{return_false if op == 'Eq' else return_true}}; + // both are negative => can use absolute values now. + intval = -intval; + size = -size; + } else { + // > 0 => Py_SIZE(pyval) > 0 + if (size <= 0) + {{return_false if op == 'Eq' else return_true}}; + } + // After checking that the sign is the same (and excluding 0), now compare the absolute values. + // When inlining, the C compiler should select exactly one line from this unrolled loop. + uintval = (unsigned long) intval; + {{for _size in range(4, 0, -1)}} +#if PyLong_SHIFT * {{_size}} < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * {{_size}})) { + // The C integer value is between (PyLong_BASE ** _size) and MIN(PyLong_BASE ** _size, LONG_MAX). + unequal = (size != {{_size+1}}) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + {{for _i in range(1, _size+1)}} | (digits[{{_i}}] != ((uintval >> ({{_i}} * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)){{endfor}}; + } else +#endif + {{endfor}} + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + + {{return_compare('unequal', '0', c_op)}} + } + #endif + + if (PyFloat_CheckExact({{pyval}})) { + const long {{'a' if order == 'CObj' else 'b'}} = intval; + double {{ival}} = PyFloat_AS_DOUBLE({{pyval}}); + {{return_compare('(double)a', '(double)b', c_op)}} + } + + return {{'' if ret_type.is_pyobject else '__Pyx_PyObject_IsTrueAndDecref'}}( + PyObject_RichCompare(op1, op2, Py_{{op.upper()}})); +} + + +/////////////// PyIntBinop.proto /////////////// + +{{py: c_ret_type = 'PyObject*' if ret_type.is_pyobject else 'int'}} +#if !CYTHON_COMPILING_IN_PYPY +static {{c_ret_type}} __Pyx_PyInt_{{'' if ret_type.is_pyobject else 'Bool'}}{{op}}{{order}}(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); /*proto*/ +#else +#define __Pyx_PyInt_{{'' if ret_type.is_pyobject else 'Bool'}}{{op}}{{order}}(op1, op2, intval, inplace, zerodivision_check) \ + {{if op in ('Eq', 'Ne')}}{{'' if ret_type.is_pyobject else '__Pyx_PyObject_IsTrueAndDecref'}}(PyObject_RichCompare(op1, op2, Py_{{op.upper()}})) + {{else}}(inplace ? PyNumber_InPlace{{op}}(op1, op2) : PyNumber_{{op}}(op1, op2)) + {{endif}} +#endif + +/////////////// PyIntBinop /////////////// + +#if !CYTHON_COMPILING_IN_PYPY +{{py: from Cython.Utility import pylong_join }} +{{py: pyval, ival = ('op2', 'b') if order == 'CObj' else ('op1', 'a') }} +{{py: c_ret_type = 'PyObject*' if ret_type.is_pyobject else 'int'}} +{{py: return_true = 'Py_RETURN_TRUE' if ret_type.is_pyobject else 'return 1'}} +{{py: return_false = 'Py_RETURN_FALSE' if ret_type.is_pyobject else 'return 0'}} +{{py: slot_name = {'TrueDivide': 'true_divide', 'FloorDivide': 'floor_divide'}.get(op, op.lower()) }} +{{py: cfunc_name = '__Pyx_PyInt_%s%s%s' % ('' if ret_type.is_pyobject else 'Bool', op, order)}} +{{py: zerodiv_check = lambda operand, _cfunc_name=cfunc_name: '%s_ZeroDivisionError(%s)' % (_cfunc_name, operand)}} +{{py: +c_op = { + 'Add': '+', 'Subtract': '-', 'Remainder': '%', 'TrueDivide': '/', 'FloorDivide': '/', + 'Or': '|', 'Xor': '^', 'And': '&', 'Rshift': '>>', 'Lshift': '<<', + 'Eq': '==', 'Ne': '!=', + }[op] +}} + +{{if op in ('TrueDivide', 'FloorDivide', 'Remainder')}} +#if PY_MAJOR_VERSION < 3 || CYTHON_USE_PYLONG_INTERNALS +#define {{zerodiv_check('operand')}} \ + if (unlikely(zerodivision_check && ((operand) == 0))) { \ + PyErr_SetString(PyExc_ZeroDivisionError, "integer division{{if op == 'Remainder'}} or modulo{{endif}} by zero"); \ + return NULL; \ + } +#endif +{{endif}} + +static {{c_ret_type}} {{cfunc_name}}(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { + // Prevent "unused" warnings. + (void)inplace; + (void)zerodivision_check; + + {{if op in ('Eq', 'Ne')}} + if (op1 == op2) { + {{return_true if op == 'Eq' else return_false}}; + } + {{endif}} + + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact({{pyval}}))) { + const long {{'a' if order == 'CObj' else 'b'}} = intval; + {{if c_op in '+-%' or op == 'FloorDivide'}} + long x; + {{endif}} + long {{ival}} = PyInt_AS_LONG({{pyval}}); + + {{if op in ('Eq', 'Ne')}} + if (a {{c_op}} b) { + {{return_true}}; + } else { + {{return_false}}; + } + {{elif c_op in '+-'}} + // adapted from intobject.c in Py2.7: + // casts in the line below avoid undefined behaviour on overflow + x = (long)((unsigned long)a {{c_op}} b); + if (likely((x^a) >= 0 || (x^{{ '~' if op == 'Subtract' else '' }}b) >= 0)) + return PyInt_FromLong(x); + return PyLong_Type.tp_as_number->nb_{{slot_name}}(op1, op2); + {{elif c_op == '%'}} + {{zerodiv_check('b')}} + // see ExprNodes.py :: mod_int_utility_code + x = a % b; + x += ((x != 0) & ((x ^ b) < 0)) * b; + return PyInt_FromLong(x); + {{elif op == 'TrueDivide'}} + {{zerodiv_check('b')}} + if (8 * sizeof(long) <= 53 || likely(labs({{ival}}) <= ((PY_LONG_LONG)1 << 53))) { + return PyFloat_FromDouble((double)a / (double)b); + } + // let Python do the rounding + return PyInt_Type.tp_as_number->nb_{{slot_name}}(op1, op2); + {{elif op == 'FloorDivide'}} + // INT_MIN / -1 is the only case that overflows, b == 0 is an error case + {{zerodiv_check('b')}} + if (unlikely(b == -1 && ((unsigned long)a) == 0-(unsigned long)a)) + return PyInt_Type.tp_as_number->nb_{{slot_name}}(op1, op2); + else { + long q, r; + // see ExprNodes.py :: div_int_utility_code + q = a / b; + r = a - q*b; + q -= ((r != 0) & ((r ^ b) < 0)); + x = q; + } + return PyInt_FromLong(x); + {{elif op == 'Lshift'}} + if (likely(b < (long) (sizeof(long)*8) && a == (a << b) >> b) || !a) { + return PyInt_FromLong(a {{c_op}} b); + } + {{else}} + // other operations are safe, no overflow + return PyInt_FromLong(a {{c_op}} b); + {{endif}} + } + #endif + + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact({{pyval}}))) { + const long {{'a' if order == 'CObj' else 'b'}} = intval; + long {{ival}}{{if op not in ('Eq', 'Ne')}}, x{{endif}}; + {{if op not in ('Eq', 'Ne', 'TrueDivide')}} +#ifdef HAVE_LONG_LONG + const PY_LONG_LONG ll{{'a' if order == 'CObj' else 'b'}} = intval; + PY_LONG_LONG ll{{ival}}, llx; +#endif + {{endif}} + const digit* digits = ((PyLongObject*){{pyval}})->ob_digit; + const Py_ssize_t size = Py_SIZE({{pyval}}); + // handle most common case first to avoid indirect branch and optimise branch prediction + if (likely(__Pyx_sst_abs(size) <= 1)) { + {{ival}} = likely(size) ? digits[0] : 0; + if (size == -1) {{ival}} = -{{ival}}; + } else { + switch (size) { + {{for _size in range(2, 5)}} + {{for _case in (-_size, _size)}} + case {{_case}}: + if (8 * sizeof(long) - 1 > {{_size}} * PyLong_SHIFT{{if op == 'TrueDivide'}} && {{_size-1}} * PyLong_SHIFT < 53{{endif}}) { + {{ival}} = {{'-' if _case < 0 else ''}}(long) {{pylong_join(_size, 'digits')}}; + break; + {{if op not in ('Eq', 'Ne', 'TrueDivide')}} +#ifdef HAVE_LONG_LONG + } else if (8 * sizeof(PY_LONG_LONG) - 1 > {{_size}} * PyLong_SHIFT) { + ll{{ival}} = {{'-' if _case < 0 else ''}}(PY_LONG_LONG) {{pylong_join(_size, 'digits', 'unsigned PY_LONG_LONG')}}; + goto long_long; +#endif + {{endif}} + } + // if size doesn't fit into a long or PY_LONG_LONG anymore, fall through to default + CYTHON_FALLTHROUGH; + {{endfor}} + {{endfor}} + + {{if op in ('Eq', 'Ne')}} + #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15 + // unusual setup - your fault + default: return {{'' if ret_type.is_pyobject else '__Pyx_PyObject_IsTrueAndDecref'}}( + PyLong_Type.tp_richcompare({{'op1, op2' if order == 'ObjC' else 'op2, op1'}}, Py_{{op.upper()}})); + #else + // too large for the long values we allow => definitely not equal + default: {{return_false if op == 'Eq' else return_true}}; + #endif + {{else}} + default: return PyLong_Type.tp_as_number->nb_{{slot_name}}(op1, op2); + {{endif}} + } + } + {{if op in ('Eq', 'Ne')}} + if (a {{c_op}} b) { + {{return_true}}; + } else { + {{return_false}}; + } + {{else}} + {{if c_op == '%'}} + {{zerodiv_check('b')}} + // see ExprNodes.py :: mod_int_utility_code + x = a % b; + x += ((x != 0) & ((x ^ b) < 0)) * b; + {{elif op == 'TrueDivide'}} + {{zerodiv_check('b')}} + if ((8 * sizeof(long) <= 53 || likely(labs({{ival}}) <= ((PY_LONG_LONG)1 << 53))) + || __Pyx_sst_abs(size) <= 52 / PyLong_SHIFT) { + return PyFloat_FromDouble((double)a / (double)b); + } + return PyLong_Type.tp_as_number->nb_{{slot_name}}(op1, op2); + {{elif op == 'FloorDivide'}} + {{zerodiv_check('b')}} + { + long q, r; + // see ExprNodes.py :: div_int_utility_code + q = a / b; + r = a - q*b; + q -= ((r != 0) & ((r ^ b) < 0)); + x = q; + } + {{else}} + x = a {{c_op}} b; + {{if op == 'Lshift'}} +#ifdef HAVE_LONG_LONG + if (unlikely(!(b < (long) (sizeof(long)*8) && a == x >> b)) && a) { + ll{{ival}} = {{ival}}; + goto long_long; + } +#else + if (likely(b < (long) (sizeof(long)*8) && a == x >> b) || !a) /* execute return statement below */ +#endif + {{endif}} + {{endif}} + return PyLong_FromLong(x); + + {{if op != 'TrueDivide'}} +#ifdef HAVE_LONG_LONG + long_long: + {{if c_op == '%'}} + // see ExprNodes.py :: mod_int_utility_code + llx = lla % llb; + llx += ((llx != 0) & ((llx ^ llb) < 0)) * llb; + {{elif op == 'FloorDivide'}} + { + PY_LONG_LONG q, r; + // see ExprNodes.py :: div_int_utility_code + q = lla / llb; + r = lla - q*llb; + q -= ((r != 0) & ((r ^ llb) < 0)); + llx = q; + } + {{else}} + llx = lla {{c_op}} llb; + {{if op == 'Lshift'}} + if (likely(lla == llx >> llb)) /* then execute 'return' below */ + {{endif}} + {{endif}} + return PyLong_FromLongLong(llx); +#endif + {{endif}}{{# if op != 'TrueDivide' #}} + {{endif}}{{# if op in ('Eq', 'Ne') #}} + } + #endif + + {{if c_op in '+-' or op in ('TrueDivide', 'Eq', 'Ne')}} + if (PyFloat_CheckExact({{pyval}})) { + const long {{'a' if order == 'CObj' else 'b'}} = intval; + double {{ival}} = PyFloat_AS_DOUBLE({{pyval}}); + {{if op in ('Eq', 'Ne')}} + if ((double)a {{c_op}} (double)b) { + {{return_true}}; + } else { + {{return_false}}; + } + {{else}} + double result; + {{if op == 'TrueDivide'}} + if (unlikely(zerodivision_check && b == 0)) { + PyErr_SetString(PyExc_ZeroDivisionError, "float division by zero"); + return NULL; + } + {{endif}} + // copied from floatobject.c in Py3.5: + PyFPE_START_PROTECT("{{op.lower() if not op.endswith('Divide') else 'divide'}}", return NULL) + result = ((double)a) {{c_op}} (double)b; + PyFPE_END_PROTECT(result) + return PyFloat_FromDouble(result); + {{endif}} + } + {{endif}} + + {{if op in ('Eq', 'Ne')}} + return {{'' if ret_type.is_pyobject else '__Pyx_PyObject_IsTrueAndDecref'}}( + PyObject_RichCompare(op1, op2, Py_{{op.upper()}})); + {{else}} + return (inplace ? PyNumber_InPlace{{op}} : PyNumber_{{op}})(op1, op2); + {{endif}} +} +#endif + +/////////////// PyFloatBinop.proto /////////////// + +{{py: c_ret_type = 'PyObject*' if ret_type.is_pyobject else 'int'}} +#if !CYTHON_COMPILING_IN_PYPY +static {{c_ret_type}} __Pyx_PyFloat_{{'' if ret_type.is_pyobject else 'Bool'}}{{op}}{{order}}(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check); /*proto*/ +#else +#define __Pyx_PyFloat_{{'' if ret_type.is_pyobject else 'Bool'}}{{op}}{{order}}(op1, op2, floatval, inplace, zerodivision_check) \ + {{if op in ('Eq', 'Ne')}}{{'' if ret_type.is_pyobject else '__Pyx_PyObject_IsTrueAndDecref'}}(PyObject_RichCompare(op1, op2, Py_{{op.upper()}})) + {{elif op == 'Divide'}}((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2))) + {{else}}(inplace ? PyNumber_InPlace{{op}}(op1, op2) : PyNumber_{{op}}(op1, op2)) + {{endif}} +#endif + +/////////////// PyFloatBinop /////////////// + +#if !CYTHON_COMPILING_IN_PYPY +{{py: from Cython.Utility import pylong_join }} +{{py: c_ret_type = 'PyObject*' if ret_type.is_pyobject else 'int'}} +{{py: return_true = 'Py_RETURN_TRUE' if ret_type.is_pyobject else 'return 1'}} +{{py: return_false = 'Py_RETURN_FALSE' if ret_type.is_pyobject else 'return 0'}} +{{py: pyval, fval = ('op2', 'b') if order == 'CObj' else ('op1', 'a') }} +{{py: cfunc_name = '__Pyx_PyFloat_%s%s%s' % ('' if ret_type.is_pyobject else 'Bool', op, order) }} +{{py: zerodiv_check = lambda operand, _cfunc_name=cfunc_name: '%s_ZeroDivisionError(%s)' % (_cfunc_name, operand)}} +{{py: +c_op = { + 'Add': '+', 'Subtract': '-', 'TrueDivide': '/', 'Divide': '/', 'Remainder': '%', + 'Eq': '==', 'Ne': '!=', + }[op] +}} + +{{if order == 'CObj' and c_op in '%/'}} +#define {{zerodiv_check('operand')}} if (unlikely(zerodivision_check && ((operand) == 0))) { \ + PyErr_SetString(PyExc_ZeroDivisionError, "float division{{if op == 'Remainder'}} or modulo{{endif}} by zero"); \ + return NULL; \ +} +{{endif}} + +static {{c_ret_type}} {{cfunc_name}}(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) { + const double {{'a' if order == 'CObj' else 'b'}} = floatval; + double {{fval}}{{if op not in ('Eq', 'Ne')}}, result{{endif}}; + // Prevent "unused" warnings. + (void)inplace; + (void)zerodivision_check; + + {{if op in ('Eq', 'Ne')}} + if (op1 == op2) { + {{return_true if op == 'Eq' else return_false}}; + } + {{endif}} + + if (likely(PyFloat_CheckExact({{pyval}}))) { + {{fval}} = PyFloat_AS_DOUBLE({{pyval}}); + {{if order == 'CObj' and c_op in '%/'}}{{zerodiv_check(fval)}}{{endif}} + } else + + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact({{pyval}}))) { + {{fval}} = (double) PyInt_AS_LONG({{pyval}}); + {{if order == 'CObj' and c_op in '%/'}}{{zerodiv_check(fval)}}{{endif}} + } else + #endif + + if (likely(PyLong_CheckExact({{pyval}}))) { + #if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*){{pyval}})->ob_digit; + const Py_ssize_t size = Py_SIZE({{pyval}}); + switch (size) { + case 0: {{if order == 'CObj' and c_op in '%/'}}{{zerodiv_check('0')}}{{else}}{{fval}} = 0.0;{{endif}} break; + case -1: {{fval}} = -(double) digits[0]; break; + case 1: {{fval}} = (double) digits[0]; break; + {{for _size in (2, 3, 4)}} + case -{{_size}}: + case {{_size}}: + if (8 * sizeof(unsigned long) > {{_size}} * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || ({{_size-1}} * PyLong_SHIFT < 53))) { + {{fval}} = (double) {{pylong_join(_size, 'digits')}}; + // let CPython do its own float rounding from 2**53 on (max. consecutive integer in double float) + if ((8 * sizeof(unsigned long) < 53) || ({{_size}} * PyLong_SHIFT < 53) || ({{fval}} < (double) ((PY_LONG_LONG)1 << 53))) { + if (size == {{-_size}}) + {{fval}} = -{{fval}}; + break; + } + } + // Fall through if size doesn't fit safely into a double anymore. + // It may not be obvious that this is a safe fall-through given the "fval < 2**53" + // check above. However, the number of digits that CPython uses for a given PyLong + // value is minimal, and together with the "(size-1) * SHIFT < 53" check above, + // this should make it safe. + CYTHON_FALLTHROUGH; + {{endfor}} + default: + #else + { + #endif + {{if op in ('Eq', 'Ne')}} + return {{'' if ret_type.is_pyobject else '__Pyx_PyObject_IsTrueAndDecref'}}( + PyFloat_Type.tp_richcompare({{'op1, op2' if order == 'CObj' else 'op2, op1'}}, Py_{{op.upper()}})); + {{else}} + {{fval}} = PyLong_AsDouble({{pyval}}); + if (unlikely({{fval}} == -1.0 && PyErr_Occurred())) return NULL; + {{if order == 'CObj' and c_op in '%/'}}{{zerodiv_check(fval)}}{{endif}} + {{endif}} + } + } else { + {{if op in ('Eq', 'Ne')}} + return {{'' if ret_type.is_pyobject else '__Pyx_PyObject_IsTrueAndDecref'}}( + PyObject_RichCompare(op1, op2, Py_{{op.upper()}})); + {{elif op == 'Divide'}} + return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)); + {{else}} + return (inplace ? PyNumber_InPlace{{op}} : PyNumber_{{op}})(op1, op2); + {{endif}} + } + + {{if op in ('Eq', 'Ne')}} + if (a {{c_op}} b) { + {{return_true}}; + } else { + {{return_false}}; + } + {{else}} + // copied from floatobject.c in Py3.5: + {{if order == 'CObj' and c_op in '%/'}}{{zerodiv_check('b')}}{{endif}} + PyFPE_START_PROTECT("{{op.lower() if not op.endswith('Divide') else 'divide'}}", return NULL) + {{if c_op == '%'}} + result = fmod(a, b); + if (result) + result += ((result < 0) ^ (b < 0)) * b; + else + result = copysign(0.0, b); + {{else}} + result = a {{c_op}} b; + {{endif}} + PyFPE_END_PROTECT(result) + return PyFloat_FromDouble(result); + {{endif}} +} +#endif diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Overflow.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Overflow.c new file mode 100644 index 00000000000..0259c58f010 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Overflow.c @@ -0,0 +1,311 @@ +/* +These functions provide integer arithmetic with integer checking. They do not +actually raise an exception when an overflow is detected, but rather set a bit +in the overflow parameter. (This parameter may be re-used across several +arithmetic operations, so should be or-ed rather than assigned to.) + +The implementation is divided into two parts, the signed and unsigned basecases, +which is where the magic happens, and a generic template matching a specific +type to an implementation based on its (c-compile-time) size and signedness. + +When possible, branching is avoided, and preference is given to speed over +accuracy (a low rate of falsely "detected" overflows are acceptable, +undetected overflows are not). + + +TODO: Hook up checking. +TODO: Conditionally support 128-bit with intmax_t? +*/ + +/////////////// Common.proto /////////////// + +static int __Pyx_check_twos_complement(void) { + if ((-1 != ~0)) { + PyErr_SetString(PyExc_RuntimeError, "Two's complement required for overflow checks."); + return 1; + } else if ((sizeof(short) == sizeof(int))) { + PyErr_SetString(PyExc_RuntimeError, "sizeof(short) < sizeof(int) required for overflow checks."); + return 1; + } else { + return 0; + } +} + +#define __PYX_IS_UNSIGNED(type) ((((type) -1) > 0)) +#define __PYX_SIGN_BIT(type) ((((unsigned type) 1) << (sizeof(type) * 8 - 1))) +#define __PYX_HALF_MAX(type) ((((type) 1) << (sizeof(type) * 8 - 2))) +#define __PYX_MIN(type) ((__PYX_IS_UNSIGNED(type) ? (type) 0 : 0 - __PYX_HALF_MAX(type) - __PYX_HALF_MAX(type))) +#define __PYX_MAX(type) ((~__PYX_MIN(type))) + +#define __Pyx_add_no_overflow(a, b, overflow) ((a) + (b)) +#define __Pyx_add_const_no_overflow(a, b, overflow) ((a) + (b)) +#define __Pyx_sub_no_overflow(a, b, overflow) ((a) - (b)) +#define __Pyx_sub_const_no_overflow(a, b, overflow) ((a) - (b)) +#define __Pyx_mul_no_overflow(a, b, overflow) ((a) * (b)) +#define __Pyx_mul_const_no_overflow(a, b, overflow) ((a) * (b)) +#define __Pyx_div_no_overflow(a, b, overflow) ((a) / (b)) +#define __Pyx_div_const_no_overflow(a, b, overflow) ((a) / (b)) + +/////////////// Common.init /////////////// +//@substitute: naming + +// FIXME: Propagate the error here instead of just printing it. +if (unlikely(__Pyx_check_twos_complement())) { + PyErr_WriteUnraisable($module_cname); +} + +/////////////// BaseCaseUnsigned.proto /////////////// + +static CYTHON_INLINE {{UINT}} __Pyx_add_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow); +static CYTHON_INLINE {{UINT}} __Pyx_sub_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow); +static CYTHON_INLINE {{UINT}} __Pyx_mul_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow); +static CYTHON_INLINE {{UINT}} __Pyx_div_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow); + +// Use these when b is known at compile time. +#define __Pyx_add_const_{{NAME}}_checking_overflow __Pyx_add_{{NAME}}_checking_overflow +#define __Pyx_sub_const_{{NAME}}_checking_overflow __Pyx_sub_{{NAME}}_checking_overflow +static CYTHON_INLINE {{UINT}} __Pyx_mul_const_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} constant, int *overflow); +#define __Pyx_div_const_{{NAME}}_checking_overflow __Pyx_div_{{NAME}}_checking_overflow + +/////////////// BaseCaseUnsigned /////////////// + +static CYTHON_INLINE {{UINT}} __Pyx_add_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow) { + {{UINT}} r = a + b; + *overflow |= r < a; + return r; +} + +static CYTHON_INLINE {{UINT}} __Pyx_sub_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow) { + {{UINT}} r = a - b; + *overflow |= r > a; + return r; +} + +static CYTHON_INLINE {{UINT}} __Pyx_mul_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow) { + if ((sizeof({{UINT}}) < sizeof(unsigned long))) { + unsigned long big_r = ((unsigned long) a) * ((unsigned long) b); + {{UINT}} r = ({{UINT}}) big_r; + *overflow |= big_r != r; + return r; +#ifdef HAVE_LONG_LONG + } else if ((sizeof({{UINT}}) < sizeof(unsigned PY_LONG_LONG))) { + unsigned PY_LONG_LONG big_r = ((unsigned PY_LONG_LONG) a) * ((unsigned PY_LONG_LONG) b); + {{UINT}} r = ({{UINT}}) big_r; + *overflow |= big_r != r; + return r; +#endif + } else { + {{UINT}} prod = a * b; + double dprod = ((double) a) * ((double) b); + // Overflow results in an error of at least 2^sizeof(UINT), + // whereas rounding represents an error on the order of 2^(sizeof(UINT)-53). + *overflow |= fabs(dprod - prod) > (__PYX_MAX({{UINT}}) / 2); + return prod; + } +} + +static CYTHON_INLINE {{UINT}} __Pyx_mul_const_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow) { + if (b > 1) { + *overflow |= a > __PYX_MAX({{UINT}}) / b; + } + return a * b; +} + + +static CYTHON_INLINE {{UINT}} __Pyx_div_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow) { + if (b == 0) { + *overflow |= 1; + return 0; + } + return a / b; +} + + +/////////////// BaseCaseSigned.proto /////////////// + +static CYTHON_INLINE {{INT}} __Pyx_add_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); +static CYTHON_INLINE {{INT}} __Pyx_sub_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); +static CYTHON_INLINE {{INT}} __Pyx_mul_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); +static CYTHON_INLINE {{INT}} __Pyx_div_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); + + +// Use when b is known at compile time. +static CYTHON_INLINE {{INT}} __Pyx_add_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); +static CYTHON_INLINE {{INT}} __Pyx_sub_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); +static CYTHON_INLINE {{INT}} __Pyx_mul_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} constant, int *overflow); +#define __Pyx_div_const_{{NAME}}_checking_overflow __Pyx_div_{{NAME}}_checking_overflow + +/////////////// BaseCaseSigned /////////////// + +static CYTHON_INLINE {{INT}} __Pyx_add_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { + if ((sizeof({{INT}}) < sizeof(long))) { + long big_r = ((long) a) + ((long) b); + {{INT}} r = ({{INT}}) big_r; + *overflow |= big_r != r; + return r; +#ifdef HAVE_LONG_LONG + } else if ((sizeof({{INT}}) < sizeof(PY_LONG_LONG))) { + PY_LONG_LONG big_r = ((PY_LONG_LONG) a) + ((PY_LONG_LONG) b); + {{INT}} r = ({{INT}}) big_r; + *overflow |= big_r != r; + return r; +#endif + } else { + // Signed overflow undefined, but unsigned overflow is well defined. + {{INT}} r = ({{INT}}) ((unsigned {{INT}}) a + (unsigned {{INT}}) b); + // Overflow happened if the operands have the same sign, but the result + // has opposite sign. + // sign(a) == sign(b) != sign(r) + {{INT}} sign_a = __PYX_SIGN_BIT({{INT}}) & a; + {{INT}} sign_b = __PYX_SIGN_BIT({{INT}}) & b; + {{INT}} sign_r = __PYX_SIGN_BIT({{INT}}) & r; + *overflow |= (sign_a == sign_b) & (sign_a != sign_r); + return r; + } +} + +static CYTHON_INLINE {{INT}} __Pyx_add_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { + if (b > 0) { + *overflow |= a > __PYX_MAX({{INT}}) - b; + } else if (b < 0) { + *overflow |= a < __PYX_MIN({{INT}}) - b; + } + return a + b; +} + +static CYTHON_INLINE {{INT}} __Pyx_sub_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { + *overflow |= b == __PYX_MIN({{INT}}); + return __Pyx_add_{{NAME}}_checking_overflow(a, -b, overflow); +} + +static CYTHON_INLINE {{INT}} __Pyx_sub_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { + *overflow |= b == __PYX_MIN({{INT}}); + return __Pyx_add_const_{{NAME}}_checking_overflow(a, -b, overflow); +} + +static CYTHON_INLINE {{INT}} __Pyx_mul_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { + if ((sizeof({{INT}}) < sizeof(long))) { + long big_r = ((long) a) * ((long) b); + {{INT}} r = ({{INT}}) big_r; + *overflow |= big_r != r; + return ({{INT}}) r; +#ifdef HAVE_LONG_LONG + } else if ((sizeof({{INT}}) < sizeof(PY_LONG_LONG))) { + PY_LONG_LONG big_r = ((PY_LONG_LONG) a) * ((PY_LONG_LONG) b); + {{INT}} r = ({{INT}}) big_r; + *overflow |= big_r != r; + return ({{INT}}) r; +#endif + } else { + {{INT}} prod = a * b; + double dprod = ((double) a) * ((double) b); + // Overflow results in an error of at least 2^sizeof(INT), + // whereas rounding represents an error on the order of 2^(sizeof(INT)-53). + *overflow |= fabs(dprod - prod) > (__PYX_MAX({{INT}}) / 2); + return prod; + } +} + +static CYTHON_INLINE {{INT}} __Pyx_mul_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { + if (b > 1) { + *overflow |= a > __PYX_MAX({{INT}}) / b; + *overflow |= a < __PYX_MIN({{INT}}) / b; + } else if (b == -1) { + *overflow |= a == __PYX_MIN({{INT}}); + } else if (b < -1) { + *overflow |= a > __PYX_MIN({{INT}}) / b; + *overflow |= a < __PYX_MAX({{INT}}) / b; + } + return a * b; +} + +static CYTHON_INLINE {{INT}} __Pyx_div_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { + if (b == 0) { + *overflow |= 1; + return 0; + } + *overflow |= (a == __PYX_MIN({{INT}})) & (b == -1); + return a / b; +} + + +/////////////// SizeCheck.init /////////////// +//@substitute: naming + +// FIXME: Propagate the error here instead of just printing it. +if (unlikely(__Pyx_check_sane_{{NAME}}())) { + PyErr_WriteUnraisable($module_cname); +} + +/////////////// SizeCheck.proto /////////////// + +static int __Pyx_check_sane_{{NAME}}(void) { + if (((sizeof({{TYPE}}) <= sizeof(int)) || +#ifdef HAVE_LONG_LONG + (sizeof({{TYPE}}) == sizeof(PY_LONG_LONG)) || +#endif + (sizeof({{TYPE}}) == sizeof(long)))) { + return 0; + } else { + PyErr_Format(PyExc_RuntimeError, \ + "Bad size for int type %.{{max(60, len(TYPE))}}s: %d", "{{TYPE}}", (int) sizeof({{TYPE}})); + return 1; + } +} + + +/////////////// Binop.proto /////////////// + +static CYTHON_INLINE {{TYPE}} __Pyx_{{BINOP}}_{{NAME}}_checking_overflow({{TYPE}} a, {{TYPE}} b, int *overflow); + +/////////////// Binop /////////////// + +static CYTHON_INLINE {{TYPE}} __Pyx_{{BINOP}}_{{NAME}}_checking_overflow({{TYPE}} a, {{TYPE}} b, int *overflow) { + if ((sizeof({{TYPE}}) < sizeof(int))) { + return __Pyx_{{BINOP}}_no_overflow(a, b, overflow); + } else if (__PYX_IS_UNSIGNED({{TYPE}})) { + if ((sizeof({{TYPE}}) == sizeof(unsigned int))) { + return ({{TYPE}}) __Pyx_{{BINOP}}_unsigned_int_checking_overflow(a, b, overflow); + } else if ((sizeof({{TYPE}}) == sizeof(unsigned long))) { + return ({{TYPE}}) __Pyx_{{BINOP}}_unsigned_long_checking_overflow(a, b, overflow); +#ifdef HAVE_LONG_LONG + } else if ((sizeof({{TYPE}}) == sizeof(unsigned PY_LONG_LONG))) { + return ({{TYPE}}) __Pyx_{{BINOP}}_unsigned_long_long_checking_overflow(a, b, overflow); +#endif + } else { + abort(); return 0; /* handled elsewhere */ + } + } else { + if ((sizeof({{TYPE}}) == sizeof(int))) { + return ({{TYPE}}) __Pyx_{{BINOP}}_int_checking_overflow(a, b, overflow); + } else if ((sizeof({{TYPE}}) == sizeof(long))) { + return ({{TYPE}}) __Pyx_{{BINOP}}_long_checking_overflow(a, b, overflow); +#ifdef HAVE_LONG_LONG + } else if ((sizeof({{TYPE}}) == sizeof(PY_LONG_LONG))) { + return ({{TYPE}}) __Pyx_{{BINOP}}_long_long_checking_overflow(a, b, overflow); +#endif + } else { + abort(); return 0; /* handled elsewhere */ + } + } +} + +/////////////// LeftShift.proto /////////////// + +static CYTHON_INLINE {{TYPE}} __Pyx_lshift_{{NAME}}_checking_overflow({{TYPE}} a, {{TYPE}} b, int *overflow) { + *overflow |= +#if {{SIGNED}} + (b < 0) | +#endif + (b > ({{TYPE}}) (8 * sizeof({{TYPE}}))) | (a > (__PYX_MAX({{TYPE}}) >> b)); + return a << b; +} +#define __Pyx_lshift_const_{{NAME}}_checking_overflow __Pyx_lshift_{{NAME}}_checking_overflow + + +/////////////// UnaryNegOverflows.proto /////////////// + +//FIXME: shouldn't the macro name be prefixed by "__Pyx_" ? Too late now, I guess... +// from intobject.c +#define UNARY_NEG_WOULD_OVERFLOW(x) \ + (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Printing.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Printing.c new file mode 100644 index 00000000000..71aa7eafe95 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Printing.c @@ -0,0 +1,176 @@ +////////////////////// Print.proto ////////////////////// +//@substitute: naming + +static int __Pyx_Print(PyObject*, PyObject *, int); /*proto*/ +#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 +static PyObject* $print_function = 0; +static PyObject* $print_function_kwargs = 0; +#endif + +////////////////////// Print.cleanup ////////////////////// +//@substitute: naming + +#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 +Py_CLEAR($print_function); +Py_CLEAR($print_function_kwargs); +#endif + +////////////////////// Print ////////////////////// +//@substitute: naming + +#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 +static PyObject *__Pyx_GetStdout(void) { + PyObject *f = PySys_GetObject((char *)"stdout"); + if (!f) { + PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); + } + return f; +} + +static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { + int i; + + if (!f) { + if (!(f = __Pyx_GetStdout())) + return -1; + } + Py_INCREF(f); + for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { + PyObject* v; + if (PyFile_SoftSpace(f, 1)) { + if (PyFile_WriteString(" ", f) < 0) + goto error; + } + v = PyTuple_GET_ITEM(arg_tuple, i); + if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) + goto error; + if (PyString_Check(v)) { + char *s = PyString_AsString(v); + Py_ssize_t len = PyString_Size(v); + if (len > 0) { + // append soft-space if necessary (not using isspace() due to C/C++ problem on MacOS-X) + switch (s[len-1]) { + case ' ': break; + case '\f': case '\r': case '\n': case '\t': case '\v': + PyFile_SoftSpace(f, 0); + break; + default: break; + } + } + } + } + if (newline) { + if (PyFile_WriteString("\n", f) < 0) + goto error; + PyFile_SoftSpace(f, 0); + } + Py_DECREF(f); + return 0; +error: + Py_DECREF(f); + return -1; +} + +#else /* Python 3 has a print function */ + +static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { + PyObject* kwargs = 0; + PyObject* result = 0; + PyObject* end_string; + if (unlikely(!$print_function)) { + $print_function = PyObject_GetAttr($builtins_cname, PYIDENT("print")); + if (!$print_function) + return -1; + } + if (stream) { + kwargs = PyDict_New(); + if (unlikely(!kwargs)) + return -1; + if (unlikely(PyDict_SetItem(kwargs, PYIDENT("file"), stream) < 0)) + goto bad; + if (!newline) { + end_string = PyUnicode_FromStringAndSize(" ", 1); + if (unlikely(!end_string)) + goto bad; + if (PyDict_SetItem(kwargs, PYIDENT("end"), end_string) < 0) { + Py_DECREF(end_string); + goto bad; + } + Py_DECREF(end_string); + } + } else if (!newline) { + if (unlikely(!$print_function_kwargs)) { + $print_function_kwargs = PyDict_New(); + if (unlikely(!$print_function_kwargs)) + return -1; + end_string = PyUnicode_FromStringAndSize(" ", 1); + if (unlikely(!end_string)) + return -1; + if (PyDict_SetItem($print_function_kwargs, PYIDENT("end"), end_string) < 0) { + Py_DECREF(end_string); + return -1; + } + Py_DECREF(end_string); + } + kwargs = $print_function_kwargs; + } + result = PyObject_Call($print_function, arg_tuple, kwargs); + if (unlikely(kwargs) && (kwargs != $print_function_kwargs)) + Py_DECREF(kwargs); + if (!result) + return -1; + Py_DECREF(result); + return 0; +bad: + if (kwargs != $print_function_kwargs) + Py_XDECREF(kwargs); + return -1; +} +#endif + +////////////////////// PrintOne.proto ////////////////////// +//@requires: Print + +static int __Pyx_PrintOne(PyObject* stream, PyObject *o); /*proto*/ + +////////////////////// PrintOne ////////////////////// + +#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 + +static int __Pyx_PrintOne(PyObject* f, PyObject *o) { + if (!f) { + if (!(f = __Pyx_GetStdout())) + return -1; + } + Py_INCREF(f); + if (PyFile_SoftSpace(f, 0)) { + if (PyFile_WriteString(" ", f) < 0) + goto error; + } + if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) + goto error; + if (PyFile_WriteString("\n", f) < 0) + goto error; + Py_DECREF(f); + return 0; +error: + Py_DECREF(f); + return -1; + /* the line below is just to avoid C compiler + * warnings about unused functions */ + return __Pyx_Print(f, NULL, 0); +} + +#else /* Python 3 has a print function */ + +static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { + int res; + PyObject* arg_tuple = PyTuple_Pack(1, o); + if (unlikely(!arg_tuple)) + return -1; + res = __Pyx_Print(stream, arg_tuple, 1); + Py_DECREF(arg_tuple); + return res; +} + +#endif diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Profile.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Profile.c new file mode 100644 index 00000000000..a0ab1fa989b --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Profile.c @@ -0,0 +1,377 @@ +/////////////// Profile.proto /////////////// +//@requires: Exceptions.c::PyErrFetchRestore +//@substitute: naming + +// Note that cPython ignores PyTrace_EXCEPTION, +// but maybe some other profilers don't. + +#ifndef CYTHON_PROFILE +#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON + #define CYTHON_PROFILE 0 +#else + #define CYTHON_PROFILE 1 +#endif +#endif + +#ifndef CYTHON_TRACE_NOGIL + #define CYTHON_TRACE_NOGIL 0 +#else + #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE) + #define CYTHON_TRACE 1 + #endif +#endif + +#ifndef CYTHON_TRACE + #define CYTHON_TRACE 0 +#endif + +#if CYTHON_TRACE + #undef CYTHON_PROFILE_REUSE_FRAME +#endif + +#ifndef CYTHON_PROFILE_REUSE_FRAME + #define CYTHON_PROFILE_REUSE_FRAME 0 +#endif + +#if CYTHON_PROFILE || CYTHON_TRACE + + #include "compile.h" + #include "frameobject.h" + #include "traceback.h" +#if PY_VERSION_HEX >= 0x030b00a6 + #ifndef Py_BUILD_CORE + #define Py_BUILD_CORE 1 + #endif + #include "internal/pycore_frame.h" +#endif + + #if CYTHON_PROFILE_REUSE_FRAME + #define CYTHON_FRAME_MODIFIER static + #define CYTHON_FRAME_DEL(frame) + #else + #define CYTHON_FRAME_MODIFIER + #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame) + #endif + + #define __Pyx_TraceDeclarations \ + static PyCodeObject *$frame_code_cname = NULL; \ + CYTHON_FRAME_MODIFIER PyFrameObject *$frame_cname = NULL; \ + int __Pyx_use_tracing = 0; + + #define __Pyx_TraceFrameInit(codeobj) \ + if (codeobj) $frame_code_cname = (PyCodeObject*) codeobj; + +#if PY_VERSION_HEX >= 0x030b00a2 + #define __Pyx_IsTracing(tstate, check_tracing, check_funcs) \ + (unlikely((tstate)->cframe->use_tracing) && \ + (!(check_tracing) || !(tstate)->tracing) && \ + (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) + + #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate) + + #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate) + +#elif PY_VERSION_HEX >= 0x030a00b1 + #define __Pyx_IsTracing(tstate, check_tracing, check_funcs) \ + (unlikely((tstate)->cframe->use_tracing) && \ + (!(check_tracing) || !(tstate)->tracing) && \ + (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) + + #define __Pyx_EnterTracing(tstate) \ + do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0) + + #define __Pyx_LeaveTracing(tstate) \ + do { \ + tstate->tracing--; \ + tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL) \ + || tstate->c_profilefunc != NULL); \ + } while (0) + +#else + #define __Pyx_IsTracing(tstate, check_tracing, check_funcs) \ + (unlikely((tstate)->use_tracing) && \ + (!(check_tracing) || !(tstate)->tracing) && \ + (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) + + #define __Pyx_EnterTracing(tstate) \ + do { tstate->tracing++; tstate->use_tracing = 0; } while (0) + + #define __Pyx_LeaveTracing(tstate) \ + do { \ + tstate->tracing--; \ + tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL) \ + || tstate->c_profilefunc != NULL); \ + } while (0) + +#endif + + #ifdef WITH_THREAD + #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) \ + if (nogil) { \ + if (CYTHON_TRACE_NOGIL) { \ + PyThreadState *tstate; \ + PyGILState_STATE state = PyGILState_Ensure(); \ + tstate = __Pyx_PyThreadState_Current; \ + if (__Pyx_IsTracing(tstate, 1, 1)) { \ + __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, &$frame_cname, tstate, funcname, srcfile, firstlineno); \ + } \ + PyGILState_Release(state); \ + if (unlikely(__Pyx_use_tracing < 0)) goto_error; \ + } \ + } else { \ + PyThreadState* tstate = PyThreadState_GET(); \ + if (__Pyx_IsTracing(tstate, 1, 1)) { \ + __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, &$frame_cname, tstate, funcname, srcfile, firstlineno); \ + if (unlikely(__Pyx_use_tracing < 0)) goto_error; \ + } \ + } + #else + #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) \ + { PyThreadState* tstate = PyThreadState_GET(); \ + if (__Pyx_IsTracing(tstate, 1, 1)) { \ + __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, &$frame_cname, tstate, funcname, srcfile, firstlineno); \ + if (unlikely(__Pyx_use_tracing < 0)) goto_error; \ + } \ + } + #endif + + #define __Pyx_TraceException() \ + if (likely(!__Pyx_use_tracing)); else { \ + PyThreadState* tstate = __Pyx_PyThreadState_Current; \ + if (__Pyx_IsTracing(tstate, 0, 1)) { \ + __Pyx_EnterTracing(tstate); \ + PyObject *exc_info = __Pyx_GetExceptionTuple(tstate); \ + if (exc_info) { \ + if (CYTHON_TRACE && tstate->c_tracefunc) \ + tstate->c_tracefunc( \ + tstate->c_traceobj, $frame_cname, PyTrace_EXCEPTION, exc_info); \ + tstate->c_profilefunc( \ + tstate->c_profileobj, $frame_cname, PyTrace_EXCEPTION, exc_info); \ + Py_DECREF(exc_info); \ + } \ + __Pyx_LeaveTracing(tstate); \ + } \ + } + + static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) { + PyObject *type, *value, *traceback; + __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); + __Pyx_EnterTracing(tstate); + if (CYTHON_TRACE && tstate->c_tracefunc) + tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result); + if (tstate->c_profilefunc) + tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result); + CYTHON_FRAME_DEL(frame); + __Pyx_LeaveTracing(tstate); + __Pyx_ErrRestoreInState(tstate, type, value, traceback); + } + + #ifdef WITH_THREAD + #define __Pyx_TraceReturn(result, nogil) \ + if (likely(!__Pyx_use_tracing)); else { \ + if (nogil) { \ + if (CYTHON_TRACE_NOGIL) { \ + PyThreadState *tstate; \ + PyGILState_STATE state = PyGILState_Ensure(); \ + tstate = __Pyx_PyThreadState_Current; \ + if (__Pyx_IsTracing(tstate, 0, 0)) { \ + __Pyx_call_return_trace_func(tstate, $frame_cname, (PyObject*)result); \ + } \ + PyGILState_Release(state); \ + } \ + } else { \ + PyThreadState* tstate = __Pyx_PyThreadState_Current; \ + if (__Pyx_IsTracing(tstate, 0, 0)) { \ + __Pyx_call_return_trace_func(tstate, $frame_cname, (PyObject*)result); \ + } \ + } \ + } + #else + #define __Pyx_TraceReturn(result, nogil) \ + if (likely(!__Pyx_use_tracing)); else { \ + PyThreadState* tstate = __Pyx_PyThreadState_Current; \ + if (__Pyx_IsTracing(tstate, 0, 0)) { \ + __Pyx_call_return_trace_func(tstate, $frame_cname, (PyObject*)result); \ + } \ + } + #endif + + static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); /*proto*/ + static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno); /*proto*/ + +#else + + #define __Pyx_TraceDeclarations + #define __Pyx_TraceFrameInit(codeobj) + // mark error label as used to avoid compiler warnings + #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) if ((1)); else goto_error; + #define __Pyx_TraceException() + #define __Pyx_TraceReturn(result, nogil) + +#endif /* CYTHON_PROFILE */ + +#if CYTHON_TRACE + // see call_trace_protected() in CPython's ceval.c + static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) { + int ret; + PyObject *type, *value, *traceback; + __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); + __Pyx_PyFrame_SetLineNumber(frame, lineno); + __Pyx_EnterTracing(tstate); + + ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL); + + __Pyx_LeaveTracing(tstate); + if (likely(!ret)) { + __Pyx_ErrRestoreInState(tstate, type, value, traceback); + } else { + Py_XDECREF(type); + Py_XDECREF(value); + Py_XDECREF(traceback); + } + return ret; + } + + #ifdef WITH_THREAD + #define __Pyx_TraceLine(lineno, nogil, goto_error) \ + if (likely(!__Pyx_use_tracing)); else { \ + if (nogil) { \ + if (CYTHON_TRACE_NOGIL) { \ + int ret = 0; \ + PyThreadState *tstate; \ + PyGILState_STATE state = PyGILState_Ensure(); \ + tstate = __Pyx_PyThreadState_Current; \ + if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \ + ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ + } \ + PyGILState_Release(state); \ + if (unlikely(ret)) goto_error; \ + } \ + } else { \ + PyThreadState* tstate = __Pyx_PyThreadState_Current; \ + if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \ + int ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ + if (unlikely(ret)) goto_error; \ + } \ + } \ + } + #else + #define __Pyx_TraceLine(lineno, nogil, goto_error) \ + if (likely(!__Pyx_use_tracing)); else { \ + PyThreadState* tstate = __Pyx_PyThreadState_Current; \ + if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \ + int ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ + if (unlikely(ret)) goto_error; \ + } \ + } + #endif +#else + // mark error label as used to avoid compiler warnings + #define __Pyx_TraceLine(lineno, nogil, goto_error) if ((1)); else goto_error; +#endif + +/////////////// Profile /////////////// +//@substitute: naming + +#if CYTHON_PROFILE + +static int __Pyx_TraceSetupAndCall(PyCodeObject** code, + PyFrameObject** frame, + PyThreadState* tstate, + const char *funcname, + const char *srcfile, + int firstlineno) { + PyObject *type, *value, *traceback; + int retval; + if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) { + if (*code == NULL) { + *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno); + if (*code == NULL) return 0; + } + *frame = PyFrame_New( + tstate, /*PyThreadState *tstate*/ + *code, /*PyCodeObject *code*/ + $moddict_cname, /*PyObject *globals*/ + 0 /*PyObject *locals*/ + ); + if (*frame == NULL) return 0; + if (CYTHON_TRACE && (*frame)->f_trace == NULL) { + // this enables "f_lineno" lookup, at least in CPython ... + Py_INCREF(Py_None); + (*frame)->f_trace = Py_None; + } +#if PY_VERSION_HEX < 0x030400B1 + } else { + (*frame)->f_tstate = tstate; +#endif + } + __Pyx_PyFrame_SetLineNumber(*frame, firstlineno); + + retval = 1; + __Pyx_EnterTracing(tstate); + __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); + + #if CYTHON_TRACE + if (tstate->c_tracefunc) + retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0; + if (retval && tstate->c_profilefunc) + #endif + retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0; + + __Pyx_LeaveTracing(tstate); + if (retval) { + __Pyx_ErrRestoreInState(tstate, type, value, traceback); + return __Pyx_IsTracing(tstate, 0, 0) && retval; + } else { + Py_XDECREF(type); + Py_XDECREF(value); + Py_XDECREF(traceback); + return -1; + } +} + +static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) { + PyCodeObject *py_code = 0; + +#if PY_MAJOR_VERSION >= 3 + py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno); + // make CPython use a fresh dict for "f_locals" at need (see GH #1836) + if (likely(py_code)) { + py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS; + } +#else + PyObject *py_srcfile = 0; + PyObject *py_funcname = 0; + + py_funcname = PyString_FromString(funcname); + if (unlikely(!py_funcname)) goto bad; + py_srcfile = PyString_FromString(srcfile); + if (unlikely(!py_srcfile)) goto bad; + + py_code = PyCode_New( + 0, /*int argcount,*/ + 0, /*int nlocals,*/ + 0, /*int stacksize,*/ + // make CPython use a fresh dict for "f_locals" at need (see GH #1836) + CO_OPTIMIZED | CO_NEWLOCALS, /*int flags,*/ + $empty_bytes, /*PyObject *code,*/ + $empty_tuple, /*PyObject *consts,*/ + $empty_tuple, /*PyObject *names,*/ + $empty_tuple, /*PyObject *varnames,*/ + $empty_tuple, /*PyObject *freevars,*/ + $empty_tuple, /*PyObject *cellvars,*/ + py_srcfile, /*PyObject *filename,*/ + py_funcname, /*PyObject *name,*/ + firstlineno, /*int firstlineno,*/ + $empty_bytes /*PyObject *lnotab*/ + ); + +bad: + Py_XDECREF(py_srcfile); + Py_XDECREF(py_funcname); +#endif + + return py_code; +} + +#endif /* CYTHON_PROFILE */ diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/StringTools.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/StringTools.c new file mode 100644 index 00000000000..35241c64a46 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/StringTools.c @@ -0,0 +1,1195 @@ + +//////////////////// IncludeStringH.proto //////////////////// + +#include + +//////////////////// IncludeCppStringH.proto //////////////////// + +#include + +//////////////////// InitStrings.proto //////////////////// + +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ + +//////////////////// InitStrings //////////////////// + +static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { + while (t->p) { + #if PY_MAJOR_VERSION < 3 + if (t->is_unicode) { + *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); + } else if (t->intern) { + *t->p = PyString_InternFromString(t->s); + } else { + *t->p = PyString_FromStringAndSize(t->s, t->n - 1); + } + #else /* Python 3+ has unicode identifiers */ + if (t->is_unicode | t->is_str) { + if (t->intern) { + *t->p = PyUnicode_InternFromString(t->s); + } else if (t->encoding) { + *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); + } else { + *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); + } + } else { + *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); + } + #endif + if (!*t->p) + return -1; + // initialise cached hash value + if (PyObject_Hash(*t->p) == -1) + return -1; + ++t; + } + return 0; +} + +//////////////////// BytesContains.proto //////////////////// + +static CYTHON_INLINE int __Pyx_BytesContains(PyObject* bytes, char character); /*proto*/ + +//////////////////// BytesContains //////////////////// +//@requires: IncludeStringH + +static CYTHON_INLINE int __Pyx_BytesContains(PyObject* bytes, char character) { + const Py_ssize_t length = PyBytes_GET_SIZE(bytes); + char* char_start = PyBytes_AS_STRING(bytes); + return memchr(char_start, (unsigned char)character, (size_t)length) != NULL; +} + + +//////////////////// PyUCS4InUnicode.proto //////////////////// + +static CYTHON_INLINE int __Pyx_UnicodeContainsUCS4(PyObject* unicode, Py_UCS4 character); /*proto*/ + +//////////////////// PyUCS4InUnicode //////////////////// + +#if PY_VERSION_HEX < 0x03090000 || (defined(PyUnicode_WCHAR_KIND) && defined(PyUnicode_AS_UNICODE)) + +#if PY_VERSION_HEX < 0x03090000 +#define __Pyx_PyUnicode_AS_UNICODE(op) PyUnicode_AS_UNICODE(op) +#define __Pyx_PyUnicode_GET_SIZE(op) PyUnicode_GET_SIZE(op) +#else +// Avoid calling deprecated C-API functions in Py3.9+ that PEP-623 schedules for removal in Py3.12. +// https://www.python.org/dev/peps/pep-0623/ +#define __Pyx_PyUnicode_AS_UNICODE(op) (((PyASCIIObject *)(op))->wstr) +#define __Pyx_PyUnicode_GET_SIZE(op) ((PyCompactUnicodeObject *)(op))->wstr_length +#endif + +#if !defined(Py_UNICODE_SIZE) || Py_UNICODE_SIZE == 2 +static int __Pyx_PyUnicodeBufferContainsUCS4_SP(Py_UNICODE* buffer, Py_ssize_t length, Py_UCS4 character) { + /* handle surrogate pairs for Py_UNICODE buffers in 16bit Unicode builds */ + Py_UNICODE high_val, low_val; + Py_UNICODE* pos; + high_val = (Py_UNICODE) (0xD800 | (((character - 0x10000) >> 10) & ((1<<10)-1))); + low_val = (Py_UNICODE) (0xDC00 | ( (character - 0x10000) & ((1<<10)-1))); + for (pos=buffer; pos < buffer+length-1; pos++) { + if (unlikely((high_val == pos[0]) & (low_val == pos[1]))) return 1; + } + return 0; +} +#endif + +static int __Pyx_PyUnicodeBufferContainsUCS4_BMP(Py_UNICODE* buffer, Py_ssize_t length, Py_UCS4 character) { + Py_UNICODE uchar; + Py_UNICODE* pos; + uchar = (Py_UNICODE) character; + for (pos=buffer; pos < buffer+length; pos++) { + if (unlikely(uchar == pos[0])) return 1; + } + return 0; +} +#endif + +static CYTHON_INLINE int __Pyx_UnicodeContainsUCS4(PyObject* unicode, Py_UCS4 character) { +#if CYTHON_PEP393_ENABLED + const int kind = PyUnicode_KIND(unicode); + #ifdef PyUnicode_WCHAR_KIND + if (likely(kind != PyUnicode_WCHAR_KIND)) + #endif + { + Py_ssize_t i; + const void* udata = PyUnicode_DATA(unicode); + const Py_ssize_t length = PyUnicode_GET_LENGTH(unicode); + for (i=0; i < length; i++) { + if (unlikely(character == PyUnicode_READ(kind, udata, i))) return 1; + } + return 0; + } +#elif PY_VERSION_HEX >= 0x03090000 + #error Cannot use "UChar in Unicode" in Python 3.9 without PEP-393 unicode strings. +#elif !defined(PyUnicode_AS_UNICODE) + #error Cannot use "UChar in Unicode" in Python < 3.9 without Py_UNICODE support. +#endif + +#if PY_VERSION_HEX < 0x03090000 || (defined(PyUnicode_WCHAR_KIND) && defined(PyUnicode_AS_UNICODE)) +#if !defined(Py_UNICODE_SIZE) || Py_UNICODE_SIZE == 2 + if ((sizeof(Py_UNICODE) == 2) && unlikely(character > 65535)) { + return __Pyx_PyUnicodeBufferContainsUCS4_SP( + __Pyx_PyUnicode_AS_UNICODE(unicode), + __Pyx_PyUnicode_GET_SIZE(unicode), + character); + } else +#endif + { + return __Pyx_PyUnicodeBufferContainsUCS4_BMP( + __Pyx_PyUnicode_AS_UNICODE(unicode), + __Pyx_PyUnicode_GET_SIZE(unicode), + character); + + } +#endif +} + + +//////////////////// PyUnicodeContains.proto //////////////////// + +static CYTHON_INLINE int __Pyx_PyUnicode_ContainsTF(PyObject* substring, PyObject* text, int eq) { + int result = PyUnicode_Contains(text, substring); + return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); +} + + +//////////////////// CStringEquals.proto //////////////////// + +static CYTHON_INLINE int __Pyx_StrEq(const char *, const char *); /*proto*/ + +//////////////////// CStringEquals //////////////////// + +static CYTHON_INLINE int __Pyx_StrEq(const char *s1, const char *s2) { + while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } + return *s1 == *s2; +} + + +//////////////////// StrEquals.proto //////////////////// +//@requires: BytesEquals +//@requires: UnicodeEquals + +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals +#else +#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals +#endif + + +//////////////////// UnicodeEquals.proto //////////////////// + +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ + +//////////////////// UnicodeEquals //////////////////// +//@requires: BytesEquals + +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY + return PyObject_RichCompareBool(s1, s2, equals); +#else +#if PY_MAJOR_VERSION < 3 + PyObject* owned_ref = NULL; +#endif + int s1_is_unicode, s2_is_unicode; + if (s1 == s2) { + /* as done by PyObject_RichCompareBool(); also catches the (interned) empty string */ + goto return_eq; + } + s1_is_unicode = PyUnicode_CheckExact(s1); + s2_is_unicode = PyUnicode_CheckExact(s2); +#if PY_MAJOR_VERSION < 3 + if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { + owned_ref = PyUnicode_FromObject(s2); + if (unlikely(!owned_ref)) + return -1; + s2 = owned_ref; + s2_is_unicode = 1; + } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { + owned_ref = PyUnicode_FromObject(s1); + if (unlikely(!owned_ref)) + return -1; + s1 = owned_ref; + s1_is_unicode = 1; + } else if (((!s2_is_unicode) & (!s1_is_unicode))) { + return __Pyx_PyBytes_Equals(s1, s2, equals); + } +#endif + if (s1_is_unicode & s2_is_unicode) { + Py_ssize_t length; + int kind; + void *data1, *data2; + if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) + return -1; + length = __Pyx_PyUnicode_GET_LENGTH(s1); + if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { + goto return_ne; + } +#if CYTHON_USE_UNICODE_INTERNALS + { + Py_hash_t hash1, hash2; + #if CYTHON_PEP393_ENABLED + hash1 = ((PyASCIIObject*)s1)->hash; + hash2 = ((PyASCIIObject*)s2)->hash; + #else + hash1 = ((PyUnicodeObject*)s1)->hash; + hash2 = ((PyUnicodeObject*)s2)->hash; + #endif + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + goto return_ne; + } + } +#endif + // len(s1) == len(s2) >= 1 (empty string is interned, and "s1 is not s2") + kind = __Pyx_PyUnicode_KIND(s1); + if (kind != __Pyx_PyUnicode_KIND(s2)) { + goto return_ne; + } + data1 = __Pyx_PyUnicode_DATA(s1); + data2 = __Pyx_PyUnicode_DATA(s2); + if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { + goto return_ne; + } else if (length == 1) { + goto return_eq; + } else { + int result = memcmp(data1, data2, (size_t)(length * kind)); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & s2_is_unicode) { + goto return_ne; + } else if ((s2 == Py_None) & s1_is_unicode) { + goto return_ne; + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +return_eq: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_EQ); +return_ne: + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif + return (equals == Py_NE); +#endif +} + + +//////////////////// BytesEquals.proto //////////////////// + +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ + +//////////////////// BytesEquals //////////////////// +//@requires: IncludeStringH + +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +#if CYTHON_COMPILING_IN_PYPY + return PyObject_RichCompareBool(s1, s2, equals); +#else + if (s1 == s2) { + /* as done by PyObject_RichCompareBool(); also catches the (interned) empty string */ + return (equals == Py_EQ); + } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { + const char *ps1, *ps2; + Py_ssize_t length = PyBytes_GET_SIZE(s1); + if (length != PyBytes_GET_SIZE(s2)) + return (equals == Py_NE); + // len(s1) == len(s2) >= 1 (empty string is interned, and "s1 is not s2") + ps1 = PyBytes_AS_STRING(s1); + ps2 = PyBytes_AS_STRING(s2); + if (ps1[0] != ps2[0]) { + return (equals == Py_NE); + } else if (length == 1) { + return (equals == Py_EQ); + } else { + int result; +#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) + Py_hash_t hash1, hash2; + hash1 = ((PyBytesObject*)s1)->ob_shash; + hash2 = ((PyBytesObject*)s2)->ob_shash; + if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { + return (equals == Py_NE); + } +#endif + result = memcmp(ps1, ps2, (size_t)length); + return (equals == Py_EQ) ? (result == 0) : (result != 0); + } + } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { + return (equals == Py_NE); + } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { + return (equals == Py_NE); + } else { + int result; + PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + if (!py_result) + return -1; + result = __Pyx_PyObject_IsTrue(py_result); + Py_DECREF(py_result); + return result; + } +#endif +} + +//////////////////// GetItemIntByteArray.proto //////////////////// + +#define __Pyx_GetItemInt_ByteArray(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ + __Pyx_GetItemInt_ByteArray_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ + (PyErr_SetString(PyExc_IndexError, "bytearray index out of range"), -1)) + +static CYTHON_INLINE int __Pyx_GetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i, + int wraparound, int boundscheck); + +//////////////////// GetItemIntByteArray //////////////////// + +static CYTHON_INLINE int __Pyx_GetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i, + int wraparound, int boundscheck) { + Py_ssize_t length; + if (wraparound | boundscheck) { + length = PyByteArray_GET_SIZE(string); + if (wraparound & unlikely(i < 0)) i += length; + if ((!boundscheck) || likely(__Pyx_is_valid_index(i, length))) { + return (unsigned char) (PyByteArray_AS_STRING(string)[i]); + } else { + PyErr_SetString(PyExc_IndexError, "bytearray index out of range"); + return -1; + } + } else { + return (unsigned char) (PyByteArray_AS_STRING(string)[i]); + } +} + + +//////////////////// SetItemIntByteArray.proto //////////////////// + +#define __Pyx_SetItemInt_ByteArray(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ + __Pyx_SetItemInt_ByteArray_Fast(o, (Py_ssize_t)i, v, wraparound, boundscheck) : \ + (PyErr_SetString(PyExc_IndexError, "bytearray index out of range"), -1)) + +static CYTHON_INLINE int __Pyx_SetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i, unsigned char v, + int wraparound, int boundscheck); + +//////////////////// SetItemIntByteArray //////////////////// + +static CYTHON_INLINE int __Pyx_SetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i, unsigned char v, + int wraparound, int boundscheck) { + Py_ssize_t length; + if (wraparound | boundscheck) { + length = PyByteArray_GET_SIZE(string); + if (wraparound & unlikely(i < 0)) i += length; + if ((!boundscheck) || likely(__Pyx_is_valid_index(i, length))) { + PyByteArray_AS_STRING(string)[i] = (char) v; + return 0; + } else { + PyErr_SetString(PyExc_IndexError, "bytearray index out of range"); + return -1; + } + } else { + PyByteArray_AS_STRING(string)[i] = (char) v; + return 0; + } +} + + +//////////////////// GetItemIntUnicode.proto //////////////////// + +#define __Pyx_GetItemInt_Unicode(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ + __Pyx_GetItemInt_Unicode_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ + (PyErr_SetString(PyExc_IndexError, "string index out of range"), (Py_UCS4)-1)) + +static CYTHON_INLINE Py_UCS4 __Pyx_GetItemInt_Unicode_Fast(PyObject* ustring, Py_ssize_t i, + int wraparound, int boundscheck); + +//////////////////// GetItemIntUnicode //////////////////// + +static CYTHON_INLINE Py_UCS4 __Pyx_GetItemInt_Unicode_Fast(PyObject* ustring, Py_ssize_t i, + int wraparound, int boundscheck) { + Py_ssize_t length; + if (unlikely(__Pyx_PyUnicode_READY(ustring) < 0)) return (Py_UCS4)-1; + if (wraparound | boundscheck) { + length = __Pyx_PyUnicode_GET_LENGTH(ustring); + if (wraparound & unlikely(i < 0)) i += length; + if ((!boundscheck) || likely(__Pyx_is_valid_index(i, length))) { + return __Pyx_PyUnicode_READ_CHAR(ustring, i); + } else { + PyErr_SetString(PyExc_IndexError, "string index out of range"); + return (Py_UCS4)-1; + } + } else { + return __Pyx_PyUnicode_READ_CHAR(ustring, i); + } +} + + +/////////////// decode_c_string_utf16.proto /////////////// + +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 0; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = -1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} +static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) { + int byteorder = 1; + return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); +} + +/////////////// decode_cpp_string.proto /////////////// +//@requires: IncludeCppStringH +//@requires: decode_c_bytes + +static CYTHON_INLINE PyObject* __Pyx_decode_cpp_string( + std::string cppstring, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + return __Pyx_decode_c_bytes( + cppstring.data(), cppstring.size(), start, stop, encoding, errors, decode_func); +} + +/////////////// decode_c_string.proto /////////////// + +static CYTHON_INLINE PyObject* __Pyx_decode_c_string( + const char* cstring, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); + +/////////////// decode_c_string /////////////// +//@requires: IncludeStringH +//@requires: decode_c_string_utf16 +//@substitute: naming + +/* duplicate code to avoid calling strlen() if start >= 0 and stop >= 0 */ +static CYTHON_INLINE PyObject* __Pyx_decode_c_string( + const char* cstring, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + Py_ssize_t length; + if (unlikely((start < 0) | (stop < 0))) { + size_t slen = strlen(cstring); + if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) { + PyErr_SetString(PyExc_OverflowError, + "c-string too long to convert to Python"); + return NULL; + } + length = (Py_ssize_t) slen; + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + } + if (unlikely(stop <= start)) + return __Pyx_NewRef($empty_unicode); + length = stop - start; + cstring += start; + if (decode_func) { + return decode_func(cstring, length, errors); + } else { + return PyUnicode_Decode(cstring, length, encoding, errors); + } +} + +/////////////// decode_c_bytes.proto /////////////// + +static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( + const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); + +/////////////// decode_c_bytes /////////////// +//@requires: decode_c_string_utf16 +//@substitute: naming + +static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( + const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + if (unlikely((start < 0) | (stop < 0))) { + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + } + if (stop > length) + stop = length; + if (unlikely(stop <= start)) + return __Pyx_NewRef($empty_unicode); + length = stop - start; + cstring += start; + if (decode_func) { + return decode_func(cstring, length, errors); + } else { + return PyUnicode_Decode(cstring, length, encoding, errors); + } +} + +/////////////// decode_bytes.proto /////////////// +//@requires: decode_c_bytes + +static CYTHON_INLINE PyObject* __Pyx_decode_bytes( + PyObject* string, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + return __Pyx_decode_c_bytes( + PyBytes_AS_STRING(string), PyBytes_GET_SIZE(string), + start, stop, encoding, errors, decode_func); +} + +/////////////// decode_bytearray.proto /////////////// +//@requires: decode_c_bytes + +static CYTHON_INLINE PyObject* __Pyx_decode_bytearray( + PyObject* string, Py_ssize_t start, Py_ssize_t stop, + const char* encoding, const char* errors, + PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { + return __Pyx_decode_c_bytes( + PyByteArray_AS_STRING(string), PyByteArray_GET_SIZE(string), + start, stop, encoding, errors, decode_func); +} + +/////////////// PyUnicode_Substring.proto /////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring( + PyObject* text, Py_ssize_t start, Py_ssize_t stop); + +/////////////// PyUnicode_Substring /////////////// +//@substitute: naming + +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring( + PyObject* text, Py_ssize_t start, Py_ssize_t stop) { + Py_ssize_t length; + if (unlikely(__Pyx_PyUnicode_READY(text) == -1)) return NULL; + length = __Pyx_PyUnicode_GET_LENGTH(text); + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + else if (stop > length) + stop = length; + if (stop <= start) + return __Pyx_NewRef($empty_unicode); +#if CYTHON_PEP393_ENABLED + return PyUnicode_FromKindAndData(PyUnicode_KIND(text), + PyUnicode_1BYTE_DATA(text) + start*PyUnicode_KIND(text), stop-start); +#else + return PyUnicode_FromUnicode(PyUnicode_AS_UNICODE(text)+start, stop-start); +#endif +} + + +/////////////// py_unicode_istitle.proto /////////////// + +// Py_UNICODE_ISTITLE() doesn't match unicode.istitle() as the latter +// additionally allows character that comply with Py_UNICODE_ISUPPER() + +#if PY_VERSION_HEX < 0x030200A2 +static CYTHON_INLINE int __Pyx_Py_UNICODE_ISTITLE(Py_UNICODE uchar) +#else +static CYTHON_INLINE int __Pyx_Py_UNICODE_ISTITLE(Py_UCS4 uchar) +#endif +{ + return Py_UNICODE_ISTITLE(uchar) || Py_UNICODE_ISUPPER(uchar); +} + + +/////////////// unicode_tailmatch.proto /////////////// + +static int __Pyx_PyUnicode_Tailmatch( + PyObject* s, PyObject* substr, Py_ssize_t start, Py_ssize_t end, int direction); /*proto*/ + +/////////////// unicode_tailmatch /////////////// + +// Python's unicode.startswith() and unicode.endswith() support a +// tuple of prefixes/suffixes, whereas it's much more common to +// test for a single unicode string. + +static int __Pyx_PyUnicode_TailmatchTuple(PyObject* s, PyObject* substrings, + Py_ssize_t start, Py_ssize_t end, int direction) { + Py_ssize_t i, count = PyTuple_GET_SIZE(substrings); + for (i = 0; i < count; i++) { + Py_ssize_t result; +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + result = PyUnicode_Tailmatch(s, PyTuple_GET_ITEM(substrings, i), + start, end, direction); +#else + PyObject* sub = PySequence_ITEM(substrings, i); + if (unlikely(!sub)) return -1; + result = PyUnicode_Tailmatch(s, sub, start, end, direction); + Py_DECREF(sub); +#endif + if (result) { + return (int) result; + } + } + return 0; +} + +static int __Pyx_PyUnicode_Tailmatch(PyObject* s, PyObject* substr, + Py_ssize_t start, Py_ssize_t end, int direction) { + if (unlikely(PyTuple_Check(substr))) { + return __Pyx_PyUnicode_TailmatchTuple(s, substr, start, end, direction); + } + return (int) PyUnicode_Tailmatch(s, substr, start, end, direction); +} + + +/////////////// bytes_tailmatch.proto /////////////// + +static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg, + Py_ssize_t start, Py_ssize_t end, int direction); /*proto*/ +static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr, + Py_ssize_t start, Py_ssize_t end, int direction); /*proto*/ + +/////////////// bytes_tailmatch /////////////// + +static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg, + Py_ssize_t start, Py_ssize_t end, int direction) { + const char* self_ptr = PyBytes_AS_STRING(self); + Py_ssize_t self_len = PyBytes_GET_SIZE(self); + const char* sub_ptr; + Py_ssize_t sub_len; + int retval; + + Py_buffer view; + view.obj = NULL; + + if ( PyBytes_Check(arg) ) { + sub_ptr = PyBytes_AS_STRING(arg); + sub_len = PyBytes_GET_SIZE(arg); + } +#if PY_MAJOR_VERSION < 3 + // Python 2.x allows mixing unicode and str + else if ( PyUnicode_Check(arg) ) { + return (int) PyUnicode_Tailmatch(self, arg, start, end, direction); + } +#endif + else { + if (unlikely(PyObject_GetBuffer(self, &view, PyBUF_SIMPLE) == -1)) + return -1; + sub_ptr = (const char*) view.buf; + sub_len = view.len; + } + + if (end > self_len) + end = self_len; + else if (end < 0) + end += self_len; + if (end < 0) + end = 0; + if (start < 0) + start += self_len; + if (start < 0) + start = 0; + + if (direction > 0) { + /* endswith */ + if (end-sub_len > start) + start = end - sub_len; + } + + if (start + sub_len <= end) + retval = !memcmp(self_ptr+start, sub_ptr, (size_t)sub_len); + else + retval = 0; + + if (view.obj) + PyBuffer_Release(&view); + + return retval; +} + +static int __Pyx_PyBytes_TailmatchTuple(PyObject* self, PyObject* substrings, + Py_ssize_t start, Py_ssize_t end, int direction) { + Py_ssize_t i, count = PyTuple_GET_SIZE(substrings); + for (i = 0; i < count; i++) { + int result; +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + result = __Pyx_PyBytes_SingleTailmatch(self, PyTuple_GET_ITEM(substrings, i), + start, end, direction); +#else + PyObject* sub = PySequence_ITEM(substrings, i); + if (unlikely(!sub)) return -1; + result = __Pyx_PyBytes_SingleTailmatch(self, sub, start, end, direction); + Py_DECREF(sub); +#endif + if (result) { + return result; + } + } + return 0; +} + +static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr, + Py_ssize_t start, Py_ssize_t end, int direction) { + if (unlikely(PyTuple_Check(substr))) { + return __Pyx_PyBytes_TailmatchTuple(self, substr, start, end, direction); + } + + return __Pyx_PyBytes_SingleTailmatch(self, substr, start, end, direction); +} + + +/////////////// str_tailmatch.proto /////////////// + +static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py_ssize_t start, + Py_ssize_t end, int direction); /*proto*/ + +/////////////// str_tailmatch /////////////// +//@requires: bytes_tailmatch +//@requires: unicode_tailmatch + +static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py_ssize_t start, + Py_ssize_t end, int direction) +{ + // We do not use a C compiler macro here to avoid "unused function" + // warnings for the *_Tailmatch() function that is not being used in + // the specific CPython version. The C compiler will generate the same + // code anyway, and will usually just remove the unused function. + if (PY_MAJOR_VERSION < 3) + return __Pyx_PyBytes_Tailmatch(self, arg, start, end, direction); + else + return __Pyx_PyUnicode_Tailmatch(self, arg, start, end, direction); +} + + +/////////////// bytes_index.proto /////////////// + +static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds); /*proto*/ + +/////////////// bytes_index /////////////// + +static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds) { + if (index < 0) + index += PyBytes_GET_SIZE(bytes); + if (check_bounds) { + Py_ssize_t size = PyBytes_GET_SIZE(bytes); + if (unlikely(!__Pyx_is_valid_index(index, size))) { + PyErr_SetString(PyExc_IndexError, "string index out of range"); + return (char) -1; + } + } + return PyBytes_AS_STRING(bytes)[index]; +} + + +//////////////////// StringJoin.proto //////////////////// + +#if PY_MAJOR_VERSION < 3 +#define __Pyx_PyString_Join __Pyx_PyBytes_Join +#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v)) +#else +#define __Pyx_PyString_Join PyUnicode_Join +#define __Pyx_PyBaseString_Join PyUnicode_Join +#endif + +#if CYTHON_COMPILING_IN_CPYTHON + #if PY_MAJOR_VERSION < 3 + #define __Pyx_PyBytes_Join _PyString_Join + #else + #define __Pyx_PyBytes_Join _PyBytes_Join + #endif +#else +static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); /*proto*/ +#endif + + +//////////////////// StringJoin //////////////////// + +#if !CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) { + return PyObject_CallMethodObjArgs(sep, PYIDENT("join"), values, NULL); +} +#endif + + +/////////////// JoinPyUnicode.proto /////////////// + +static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, + Py_UCS4 max_char); + +/////////////// JoinPyUnicode /////////////// +//@requires: IncludeStringH +//@substitute: naming + +static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, + CYTHON_UNUSED Py_UCS4 max_char) { +#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + PyObject *result_uval; + int result_ukind; + Py_ssize_t i, char_pos; + void *result_udata; +#if CYTHON_PEP393_ENABLED + // Py 3.3+ (post PEP-393) + result_uval = PyUnicode_New(result_ulength, max_char); + if (unlikely(!result_uval)) return NULL; + result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; + result_udata = PyUnicode_DATA(result_uval); +#else + // Py 2.x/3.2 (pre PEP-393) + result_uval = PyUnicode_FromUnicode(NULL, result_ulength); + if (unlikely(!result_uval)) return NULL; + result_ukind = sizeof(Py_UNICODE); + result_udata = PyUnicode_AS_UNICODE(result_uval); +#endif + + char_pos = 0; + for (i=0; i < value_count; i++) { + int ukind; + Py_ssize_t ulength; + void *udata; + PyObject *uval = PyTuple_GET_ITEM(value_tuple, i); + if (unlikely(__Pyx_PyUnicode_READY(uval))) + goto bad; + ulength = __Pyx_PyUnicode_GET_LENGTH(uval); + if (unlikely(!ulength)) + continue; + if (unlikely(char_pos + ulength < 0)) + goto overflow; + ukind = __Pyx_PyUnicode_KIND(uval); + udata = __Pyx_PyUnicode_DATA(uval); + if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) { + memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind)); + } else { + #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters) + _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); + #else + Py_ssize_t j; + for (j=0; j < ulength; j++) { + Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); + __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); + } + #endif + } + char_pos += ulength; + } + return result_uval; +overflow: + PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); +bad: + Py_DECREF(result_uval); + return NULL; +#else + // non-CPython fallback + result_ulength++; + value_count++; + return PyUnicode_Join($empty_unicode, value_tuple); +#endif +} + + +/////////////// BuildPyUnicode.proto /////////////// + +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, + int prepend_sign, char padding_char); + +/////////////// BuildPyUnicode /////////////// + +// Create a PyUnicode object from an ASCII char*, e.g. a formatted number. + +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, + int prepend_sign, char padding_char) { + PyObject *uval; + Py_ssize_t uoffset = ulength - clength; +#if CYTHON_USE_UNICODE_INTERNALS + Py_ssize_t i; +#if CYTHON_PEP393_ENABLED + // Py 3.3+ (post PEP-393) + void *udata; + uval = PyUnicode_New(ulength, 127); + if (unlikely(!uval)) return NULL; + udata = PyUnicode_DATA(uval); +#else + // Py 2.x/3.2 (pre PEP-393) + Py_UNICODE *udata; + uval = PyUnicode_FromUnicode(NULL, ulength); + if (unlikely(!uval)) return NULL; + udata = PyUnicode_AS_UNICODE(uval); +#endif + if (uoffset > 0) { + i = 0; + if (prepend_sign) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-'); + i++; + } + for (; i < uoffset; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char); + } + } + for (i=0; i < clength; i++) { + __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]); + } + +#else + // non-CPython + { + PyObject *sign = NULL, *padding = NULL; + uval = NULL; + if (uoffset > 0) { + prepend_sign = !!prepend_sign; + if (uoffset > prepend_sign) { + padding = PyUnicode_FromOrdinal(padding_char); + if (likely(padding) && uoffset > prepend_sign + 1) { + PyObject *tmp; + PyObject *repeat = PyInt_FromSize_t(uoffset - prepend_sign); + if (unlikely(!repeat)) goto done_or_error; + tmp = PyNumber_Multiply(padding, repeat); + Py_DECREF(repeat); + Py_DECREF(padding); + padding = tmp; + } + if (unlikely(!padding)) goto done_or_error; + } + if (prepend_sign) { + sign = PyUnicode_FromOrdinal('-'); + if (unlikely(!sign)) goto done_or_error; + } + } + + uval = PyUnicode_DecodeASCII(chars, clength, NULL); + if (likely(uval) && padding) { + PyObject *tmp = PyNumber_Add(padding, uval); + Py_DECREF(uval); + uval = tmp; + } + if (likely(uval) && sign) { + PyObject *tmp = PyNumber_Add(sign, uval); + Py_DECREF(uval); + uval = tmp; + } +done_or_error: + Py_XDECREF(padding); + Py_XDECREF(sign); + } +#endif + + return uval; +} + + +//////////////////// ByteArrayAppendObject.proto //////////////////// + +static CYTHON_INLINE int __Pyx_PyByteArray_AppendObject(PyObject* bytearray, PyObject* value); + +//////////////////// ByteArrayAppendObject //////////////////// +//@requires: ByteArrayAppend + +static CYTHON_INLINE int __Pyx_PyByteArray_AppendObject(PyObject* bytearray, PyObject* value) { + Py_ssize_t ival; +#if PY_MAJOR_VERSION < 3 + if (unlikely(PyString_Check(value))) { + if (unlikely(PyString_GET_SIZE(value) != 1)) { + PyErr_SetString(PyExc_ValueError, "string must be of size 1"); + return -1; + } + ival = (unsigned char) (PyString_AS_STRING(value)[0]); + } else +#endif +#if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(value)) && likely(Py_SIZE(value) == 1 || Py_SIZE(value) == 0)) { + if (Py_SIZE(value) == 0) { + ival = 0; + } else { + ival = ((PyLongObject*)value)->ob_digit[0]; + if (unlikely(ival > 255)) goto bad_range; + } + } else +#endif + { + // CPython calls PyNumber_Index() internally + ival = __Pyx_PyIndex_AsSsize_t(value); + if (unlikely(!__Pyx_is_valid_index(ival, 256))) { + if (ival == -1 && PyErr_Occurred()) + return -1; + goto bad_range; + } + } + return __Pyx_PyByteArray_Append(bytearray, ival); +bad_range: + PyErr_SetString(PyExc_ValueError, "byte must be in range(0, 256)"); + return -1; +} + +//////////////////// ByteArrayAppend.proto //////////////////// + +static CYTHON_INLINE int __Pyx_PyByteArray_Append(PyObject* bytearray, int value); + +//////////////////// ByteArrayAppend //////////////////// +//@requires: ObjectHandling.c::PyObjectCallMethod1 + +static CYTHON_INLINE int __Pyx_PyByteArray_Append(PyObject* bytearray, int value) { + PyObject *pyval, *retval; +#if CYTHON_COMPILING_IN_CPYTHON + if (likely(__Pyx_is_valid_index(value, 256))) { + Py_ssize_t n = Py_SIZE(bytearray); + if (likely(n != PY_SSIZE_T_MAX)) { + if (unlikely(PyByteArray_Resize(bytearray, n + 1) < 0)) + return -1; + PyByteArray_AS_STRING(bytearray)[n] = value; + return 0; + } + } else { + PyErr_SetString(PyExc_ValueError, "byte must be in range(0, 256)"); + return -1; + } +#endif + pyval = PyInt_FromLong(value); + if (unlikely(!pyval)) + return -1; + retval = __Pyx_PyObject_CallMethod1(bytearray, PYIDENT("append"), pyval); + Py_DECREF(pyval); + if (unlikely(!retval)) + return -1; + Py_DECREF(retval); + return 0; +} + + +//////////////////// PyObjectFormat.proto //////////////////// + +#if CYTHON_USE_UNICODE_WRITER +static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f); +#else +#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f) +#endif + +//////////////////// PyObjectFormat //////////////////// + +#if CYTHON_USE_UNICODE_WRITER +static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) { + int ret; + _PyUnicodeWriter writer; + + if (likely(PyFloat_CheckExact(obj))) { + // copied from CPython 3.5 "float__format__()" in floatobject.c +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000 + _PyUnicodeWriter_Init(&writer, 0); +#else + _PyUnicodeWriter_Init(&writer); +#endif + ret = _PyFloat_FormatAdvancedWriter( + &writer, + obj, + format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); + } else if (likely(PyLong_CheckExact(obj))) { + // copied from CPython 3.5 "long__format__()" in longobject.c +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000 + _PyUnicodeWriter_Init(&writer, 0); +#else + _PyUnicodeWriter_Init(&writer); +#endif + ret = _PyLong_FormatAdvancedWriter( + &writer, + obj, + format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); + } else { + return PyObject_Format(obj, format_spec); + } + + if (unlikely(ret == -1)) { + _PyUnicodeWriter_Dealloc(&writer); + return NULL; + } + return _PyUnicodeWriter_Finish(&writer); +} +#endif + + +//////////////////// PyObjectFormatSimple.proto //////////////////// + +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyObject_FormatSimple(s, f) ( \ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) : \ + PyObject_Format(s, f)) +#elif PY_MAJOR_VERSION < 3 + // str is common in Py2, but formatting must return a Unicode string + #define __Pyx_PyObject_FormatSimple(s, f) ( \ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) : \ + likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") : \ + PyObject_Format(s, f)) +#elif CYTHON_USE_TYPE_SLOTS + // Py3 nicely returns unicode strings from str() which makes this quite efficient for builtin types + #define __Pyx_PyObject_FormatSimple(s, f) ( \ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) : \ + likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_str(s) : \ + likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_str(s) : \ + PyObject_Format(s, f)) +#else + #define __Pyx_PyObject_FormatSimple(s, f) ( \ + likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) : \ + PyObject_Format(s, f)) +#endif + + +//////////////////// PyObjectFormatAndDecref.proto //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); + +//////////////////// PyObjectFormatAndDecref //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { + if (unlikely(!s)) return NULL; + if (likely(PyUnicode_CheckExact(s))) return s; + #if PY_MAJOR_VERSION < 3 + // str is common in Py2, but formatting must return a Unicode string + if (likely(PyString_CheckExact(s))) { + PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict"); + Py_DECREF(s); + return result; + } + #endif + return __Pyx_PyObject_FormatAndDecref(s, f); +} + +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { + PyObject *result = PyObject_Format(s, f); + Py_DECREF(s); + return result; +} + + +//////////////////// PyUnicode_Unicode.proto //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj);/*proto*/ + +//////////////////// PyUnicode_Unicode //////////////////// + +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) { + if (unlikely(obj == Py_None)) + obj = PYUNICODE("None"); + return __Pyx_NewRef(obj); +} + + +//////////////////// PyObject_Unicode.proto //////////////////// + +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyObject_Unicode(obj) \ + (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj)) +#else +#define __Pyx_PyObject_Unicode(obj) \ + (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj)) +#endif diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestCyUtilityLoader.pyx b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestCyUtilityLoader.pyx new file mode 100644 index 00000000000..00e7a7681b8 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestCyUtilityLoader.pyx @@ -0,0 +1,8 @@ +########## TestCyUtilityLoader ########## +#@requires: OtherUtility + +test {{cy_loader}} impl + + +########## OtherUtility ########## +req {{cy_loader}} impl diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestCythonScope.pyx b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestCythonScope.pyx new file mode 100644 index 00000000000..f585be29832 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestCythonScope.pyx @@ -0,0 +1,64 @@ +########## TestClass ########## +# These utilities are for testing purposes + +cdef extern from *: + cdef object __pyx_test_dep(object) + +@cname('__pyx_TestClass') +cdef class TestClass(object): + cdef public int value + + def __init__(self, int value): + self.value = value + + def __str__(self): + return 'TestClass(%d)' % self.value + + cdef cdef_method(self, int value): + print 'Hello from cdef_method', value + + cpdef cpdef_method(self, int value): + print 'Hello from cpdef_method', value + + def def_method(self, int value): + print 'Hello from def_method', value + + @cname('cdef_cname') + cdef cdef_cname_method(self, int value): + print "Hello from cdef_cname_method", value + + @cname('cpdef_cname') + cpdef cpdef_cname_method(self, int value): + print "Hello from cpdef_cname_method", value + + @cname('def_cname') + def def_cname_method(self, int value): + print "Hello from def_cname_method", value + +@cname('__pyx_test_call_other_cy_util') +cdef test_call(obj): + print 'test_call' + __pyx_test_dep(obj) + +@cname('__pyx_TestClass_New') +cdef _testclass_new(int value): + return TestClass(value) + +########### TestDep ########## + +@cname('__pyx_test_dep') +cdef test_dep(obj): + print 'test_dep', obj + +########## TestScope ########## + +@cname('__pyx_testscope') +cdef object _testscope(int value): + return "hello from cython scope, value=%d" % value + +########## View.TestScope ########## + +@cname('__pyx_view_testscope') +cdef object _testscope(int value): + return "hello from cython.view scope, value=%d" % value + diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestUtilityLoader.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestUtilityLoader.c new file mode 100644 index 00000000000..595305f211b --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestUtilityLoader.c @@ -0,0 +1,12 @@ +////////// TestUtilityLoader.proto ////////// +test {{loader}} prototype + +////////// TestUtilityLoader ////////// +//@requires: OtherUtility +test {{loader}} impl + +////////// OtherUtility.proto ////////// +req {{loader}} proto + +////////// OtherUtility ////////// +req {{loader}} impl diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TypeConversion.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TypeConversion.c new file mode 100644 index 00000000000..7a7bf0f7999 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TypeConversion.c @@ -0,0 +1,1017 @@ +/////////////// TypeConversions.proto /////////////// + +/* Type Conversion Predeclarations */ + +#define __Pyx_uchar_cast(c) ((unsigned char)c) +#define __Pyx_long_cast(x) ((long)x) + +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) ( \ + (sizeof(type) < sizeof(Py_ssize_t)) || \ + (sizeof(type) > sizeof(Py_ssize_t) && \ + likely(v < (type)PY_SSIZE_T_MAX || \ + v == (type)PY_SSIZE_T_MAX) && \ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \ + v == (type)PY_SSIZE_T_MIN))) || \ + (sizeof(type) == sizeof(Py_ssize_t) && \ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \ + v == (type)PY_SSIZE_T_MAX))) ) + +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + // Optimisation from Section 14.2 "Bounds Checking" in + // https://www.agner.org/optimize/optimizing_cpp.pdf + // See https://bugs.python.org/issue28397 + // The cast to unsigned effectively tests for "0 <= i < limit". + return (size_t) i < (size_t) limit; +} + +// fast and unsafe abs(Py_ssize_t) that ignores the overflow for (-PY_SSIZE_T_MAX-1) +#if defined (__cplusplus) && __cplusplus >= 201103L + #include + #define __Pyx_sst_abs(value) std::abs(value) +#elif SIZEOF_INT >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) abs(value) +#elif SIZEOF_LONG >= SIZEOF_SIZE_T + #define __Pyx_sst_abs(value) labs(value) +#elif defined (_MSC_VER) + // abs() is defined for long, but 64-bits type on MSVC is long long. + // Use MS-specific _abs64 instead. + #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) +#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define __Pyx_sst_abs(value) llabs(value) +#elif defined (__GNUC__) + // gcc or clang on 64 bit windows. + #define __Pyx_sst_abs(value) __builtin_llabs(value) +#else + #define __Pyx_sst_abs(value) ((value<0) ? -value : value) +#endif + +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); + +#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); + +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#else + #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize +#endif + +#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) +#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) +#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) + +// There used to be a Py_UNICODE_strlen() in CPython 3.x, but it is deprecated since Py3.3. +static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { + const Py_UNICODE *u_end = u; + while (*u_end++) ; + return (size_t)(u_end - u - 1); +} + +#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) +#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode + +#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) +#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); + +#define __Pyx_PySequence_Tuple(obj) \ + (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) + +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); + +#if CYTHON_ASSUME_SAFE_MACROS +#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) +#else +#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) +#endif +#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) + +#if PY_MAJOR_VERSION >= 3 +#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) +#else +#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) +#endif +#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) + +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII +static int __Pyx_sys_getdefaultencoding_not_ascii; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + PyObject* ascii_chars_u = NULL; + PyObject* ascii_chars_b = NULL; + const char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + if (strcmp(default_encoding_c, "ascii") == 0) { + __Pyx_sys_getdefaultencoding_not_ascii = 0; + } else { + char ascii_chars[128]; + int c; + for (c = 0; c < 128; c++) { + ascii_chars[c] = c; + } + __Pyx_sys_getdefaultencoding_not_ascii = 1; + ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); + if (!ascii_chars_u) goto bad; + ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); + if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { + PyErr_Format( + PyExc_ValueError, + "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", + default_encoding_c); + goto bad; + } + Py_DECREF(ascii_chars_u); + Py_DECREF(ascii_chars_b); + } + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + Py_XDECREF(ascii_chars_u); + Py_XDECREF(ascii_chars_b); + return -1; +} +#endif + +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#else +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) + +// __PYX_DEFAULT_STRING_ENCODING is either a user provided string constant +// or we need to look it up here +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +static char* __PYX_DEFAULT_STRING_ENCODING; + +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys; + PyObject* default_encoding = NULL; + char* default_encoding_c; + + sys = PyImport_ImportModule("sys"); + if (!sys) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + Py_DECREF(sys); + if (!default_encoding) goto bad; + default_encoding_c = PyBytes_AsString(default_encoding); + if (!default_encoding_c) goto bad; + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); + if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; + strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(default_encoding); + return -1; +} +#endif +#endif + +/////////////// TypeConversions /////////////// + +/* Type Conversion Functions */ + +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); +} + +// Py3.7 returns a "const char*" for unicode strings +static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} + +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +#if !CYTHON_PEP393_ENABLED +static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + char* defenc_c; + // borrowed reference, cached internally in 'o' by CPython + PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); + if (!defenc) return NULL; + defenc_c = PyBytes_AS_STRING(defenc); +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + { + char* end = defenc_c + PyBytes_GET_SIZE(defenc); + char* c; + for (c = defenc_c; c < end; c++) { + if ((unsigned char) (*c) >= 128) { + // raise the error + PyUnicode_AsASCIIString(o); + return NULL; + } + } + } +#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ + *length = PyBytes_GET_SIZE(defenc); + return defenc_c; +} + +#else /* CYTHON_PEP393_ENABLED: */ + +static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { + if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (likely(PyUnicode_IS_ASCII(o))) { + // cached for the lifetime of the object + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + // raise the error + PyUnicode_AsASCIIString(o); + return NULL; + } +#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ + return PyUnicode_AsUTF8AndSize(o, length); +#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ +} +#endif /* CYTHON_PEP393_ENABLED */ +#endif + +// Py3.7 returns a "const char*" for unicode strings +static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT + if ( +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + __Pyx_sys_getdefaultencoding_not_ascii && +#endif + PyUnicode_Check(o)) { + return __Pyx_PyUnicode_AsStringAndSize(o, length); + } else +#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ + +#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) + if (PyByteArray_Check(o)) { + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); + } else +#endif + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} + +/* Note: __Pyx_PyObject_IsTrue is written to minimize branching. */ +static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { + int is_true = x == Py_True; + if (is_true | (x == Py_False) | (x == Py_None)) return is_true; + else return PyObject_IsTrue(x); +} + +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} + +static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { +#if PY_MAJOR_VERSION >= 3 + if (PyLong_Check(result)) { + // CPython issue #17576: warn if 'result' not of exact type int. + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, + "__int__ returned non-int (type %.200s). " + "The ability to return an instance of a strict subclass of int " + "is deprecated, and may be removed in a future version of Python.", + Py_TYPE(result)->tp_name)) { + Py_DECREF(result); + return NULL; + } + return result; + } +#endif + PyErr_Format(PyExc_TypeError, + "__%.4s__ returned non-%.4s (type %.200s)", + type_name, type_name, Py_TYPE(result)->tp_name); + Py_DECREF(result); + return NULL; +} + +static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { +#if CYTHON_USE_TYPE_SLOTS + PyNumberMethods *m; +#endif + const char *name = NULL; + PyObject *res = NULL; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x) || PyLong_Check(x))) +#else + if (likely(PyLong_Check(x))) +#endif + return __Pyx_NewRef(x); +#if CYTHON_USE_TYPE_SLOTS + m = Py_TYPE(x)->tp_as_number; + #if PY_MAJOR_VERSION < 3 + if (m && m->nb_int) { + name = "int"; + res = m->nb_int(x); + } + else if (m && m->nb_long) { + name = "long"; + res = m->nb_long(x); + } + #else + if (likely(m && m->nb_int)) { + name = "int"; + res = m->nb_int(x); + } + #endif +#else + if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { + res = PyNumber_Int(x); + } +#endif + if (likely(res)) { +#if PY_MAJOR_VERSION < 3 + if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { +#else + if (unlikely(!PyLong_CheckExact(res))) { +#endif + return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); + } + } + else if (!PyErr_Occurred()) { + PyErr_SetString(PyExc_TypeError, + "an integer is required"); + } + return res; +} + +{{py: from Cython.Utility import pylong_join }} + +static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { + Py_ssize_t ival; + PyObject *x; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(b))) { + if (sizeof(Py_ssize_t) >= sizeof(long)) + return PyInt_AS_LONG(b); + else + return PyInt_AsSsize_t(b); + } +#endif + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)b)->ob_digit; + const Py_ssize_t size = Py_SIZE(b); + // handle most common case first to avoid indirect branch and optimise branch prediction + if (likely(__Pyx_sst_abs(size) <= 1)) { + ival = likely(size) ? digits[0] : 0; + if (size == -1) ival = -ival; + return ival; + } else { + switch (size) { + {{for _size in (2, 3, 4)}} + {{for _case in (_size, -_size)}} + case {{_case}}: + if (8 * sizeof(Py_ssize_t) > {{_size}} * PyLong_SHIFT) { + return {{'-' if _case < 0 else ''}}(Py_ssize_t) {{pylong_join(_size, 'digits', 'size_t')}}; + } + break; + {{endfor}} + {{endfor}} + } + } + #endif + return PyLong_AsSsize_t(b); + } + x = PyNumber_Index(b); + if (!x) return -1; + ival = PyInt_AsSsize_t(x); + Py_DECREF(x); + return ival; +} + + +static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { + if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { + return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); +#if PY_MAJOR_VERSION < 3 + } else if (likely(PyInt_CheckExact(o))) { + return PyInt_AS_LONG(o); +#endif + } else { + Py_ssize_t ival; + PyObject *x; + x = PyNumber_Index(o); + if (!x) return -1; + ival = PyInt_AsLong(x); + Py_DECREF(x); + return ival; + } +} + + +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} + + +static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { + return PyInt_FromSize_t(ival); +} + + +/////////////// GCCDiagnostics.proto /////////////// + +// GCC diagnostic pragmas were introduced in GCC 4.6 +// Used to silence conversion warnings that are ok but cannot be avoided. +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define __Pyx_HAS_GCC_DIAGNOSTIC +#endif + + +/////////////// ToPyCTupleUtility.proto /////////////// +static PyObject* {{funcname}}({{struct_type_decl}}); + +/////////////// ToPyCTupleUtility /////////////// +static PyObject* {{funcname}}({{struct_type_decl}} value) { + PyObject* item = NULL; + PyObject* result = PyTuple_New({{size}}); + if (!result) goto bad; + + {{for ix, component in enumerate(components):}} + {{py:attr = "value.f%s" % ix}} + item = {{component.to_py_function}}({{attr}}); + if (!item) goto bad; + PyTuple_SET_ITEM(result, {{ix}}, item); + {{endfor}} + + return result; +bad: + Py_XDECREF(item); + Py_XDECREF(result); + return NULL; +} + + +/////////////// FromPyCTupleUtility.proto /////////////// +static {{struct_type_decl}} {{funcname}}(PyObject *); + +/////////////// FromPyCTupleUtility /////////////// +static {{struct_type_decl}} {{funcname}}(PyObject * o) { + {{struct_type_decl}} result; + + if (!PyTuple_Check(o) || PyTuple_GET_SIZE(o) != {{size}}) { + PyErr_Format(PyExc_TypeError, "Expected %.16s of size %d, got %.200s", "a tuple", {{size}}, Py_TYPE(o)->tp_name); + goto bad; + } + +#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + {{for ix, component in enumerate(components):}} + {{py:attr = "result.f%s" % ix}} + {{attr}} = {{component.from_py_function}}(PyTuple_GET_ITEM(o, {{ix}})); + if ({{component.error_condition(attr)}}) goto bad; + {{endfor}} +#else + { + PyObject *item; + {{for ix, component in enumerate(components):}} + {{py:attr = "result.f%s" % ix}} + item = PySequence_ITEM(o, {{ix}}); if (unlikely(!item)) goto bad; + {{attr}} = {{component.from_py_function}}(item); + Py_DECREF(item); + if ({{component.error_condition(attr)}}) goto bad; + {{endfor}} + } +#endif + + return result; +bad: + return result; +} + + +/////////////// UnicodeAsUCS4.proto /////////////// + +static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*); + +/////////////// UnicodeAsUCS4 /////////////// + +static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) { + Py_ssize_t length; + #if CYTHON_PEP393_ENABLED + length = PyUnicode_GET_LENGTH(x); + if (likely(length == 1)) { + return PyUnicode_READ_CHAR(x, 0); + } + #else + length = PyUnicode_GET_SIZE(x); + if (likely(length == 1)) { + return PyUnicode_AS_UNICODE(x)[0]; + } + #if Py_UNICODE_SIZE == 2 + else if (PyUnicode_GET_SIZE(x) == 2) { + Py_UCS4 high_val = PyUnicode_AS_UNICODE(x)[0]; + if (high_val >= 0xD800 && high_val <= 0xDBFF) { + Py_UCS4 low_val = PyUnicode_AS_UNICODE(x)[1]; + if (low_val >= 0xDC00 && low_val <= 0xDFFF) { + return 0x10000 + (((high_val & ((1<<10)-1)) << 10) | (low_val & ((1<<10)-1))); + } + } + } + #endif + #endif + PyErr_Format(PyExc_ValueError, + "only single character unicode strings can be converted to Py_UCS4, " + "got length %" CYTHON_FORMAT_SSIZE_T "d", length); + return (Py_UCS4)-1; +} + + +/////////////// ObjectAsUCS4.proto /////////////// +//@requires: UnicodeAsUCS4 + +#define __Pyx_PyObject_AsPy_UCS4(x) \ + (likely(PyUnicode_Check(x)) ? __Pyx_PyUnicode_AsPy_UCS4(x) : __Pyx__PyObject_AsPy_UCS4(x)) +static Py_UCS4 __Pyx__PyObject_AsPy_UCS4(PyObject*); + +/////////////// ObjectAsUCS4 /////////////// + +static Py_UCS4 __Pyx__PyObject_AsPy_UCS4_raise_error(long ival) { + if (ival < 0) { + if (!PyErr_Occurred()) + PyErr_SetString(PyExc_OverflowError, + "cannot convert negative value to Py_UCS4"); + } else { + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to Py_UCS4"); + } + return (Py_UCS4)-1; +} + +static Py_UCS4 __Pyx__PyObject_AsPy_UCS4(PyObject* x) { + long ival; + ival = __Pyx_PyInt_As_long(x); + if (unlikely(!__Pyx_is_valid_index(ival, 1114111 + 1))) { + return __Pyx__PyObject_AsPy_UCS4_raise_error(ival); + } + return (Py_UCS4)ival; +} + + +/////////////// ObjectAsPyUnicode.proto /////////////// + +static CYTHON_INLINE Py_UNICODE __Pyx_PyObject_AsPy_UNICODE(PyObject*); + +/////////////// ObjectAsPyUnicode /////////////// + +static CYTHON_INLINE Py_UNICODE __Pyx_PyObject_AsPy_UNICODE(PyObject* x) { + long ival; + #if CYTHON_PEP393_ENABLED + #if Py_UNICODE_SIZE > 2 + const long maxval = 1114111; + #else + const long maxval = 65535; + #endif + #else + static long maxval = 0; + #endif + if (PyUnicode_Check(x)) { + if (unlikely(__Pyx_PyUnicode_GET_LENGTH(x) != 1)) { + PyErr_Format(PyExc_ValueError, + "only single character unicode strings can be converted to Py_UNICODE, " + "got length %" CYTHON_FORMAT_SSIZE_T "d", __Pyx_PyUnicode_GET_LENGTH(x)); + return (Py_UNICODE)-1; + } + #if CYTHON_PEP393_ENABLED + ival = PyUnicode_READ_CHAR(x, 0); + #else + return PyUnicode_AS_UNICODE(x)[0]; + #endif + } else { + #if !CYTHON_PEP393_ENABLED + if (unlikely(!maxval)) + maxval = (long)PyUnicode_GetMax(); + #endif + ival = __Pyx_PyInt_As_long(x); + } + if (unlikely(!__Pyx_is_valid_index(ival, maxval + 1))) { + if (ival < 0) { + if (!PyErr_Occurred()) + PyErr_SetString(PyExc_OverflowError, + "cannot convert negative value to Py_UNICODE"); + return (Py_UNICODE)-1; + } else { + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to Py_UNICODE"); + } + return (Py_UNICODE)-1; + } + return (Py_UNICODE)ival; +} + + +/////////////// CIntToPy.proto /////////////// + +static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value); + +/////////////// CIntToPy /////////////// +//@requires: GCCDiagnostics + +static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const {{TYPE}} neg_one = ({{TYPE}}) -1, const_zero = ({{TYPE}}) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + if (is_unsigned) { + if (sizeof({{TYPE}}) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof({{TYPE}}) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof({{TYPE}}) <= sizeof(unsigned PY_LONG_LONG)) { + return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); +#endif + } + } else { + if (sizeof({{TYPE}}) <= sizeof(long)) { + return PyInt_FromLong((long) value); +#ifdef HAVE_LONG_LONG + } else if (sizeof({{TYPE}}) <= sizeof(PY_LONG_LONG)) { + return PyLong_FromLongLong((PY_LONG_LONG) value); +#endif + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof({{TYPE}}), + little, !is_unsigned); + } +} + + +/////////////// CIntToDigits /////////////// + +static const char DIGIT_PAIRS_10[2*10*10+1] = { + "00010203040506070809" + "10111213141516171819" + "20212223242526272829" + "30313233343536373839" + "40414243444546474849" + "50515253545556575859" + "60616263646566676869" + "70717273747576777879" + "80818283848586878889" + "90919293949596979899" +}; + +static const char DIGIT_PAIRS_8[2*8*8+1] = { + "0001020304050607" + "1011121314151617" + "2021222324252627" + "3031323334353637" + "4041424344454647" + "5051525354555657" + "6061626364656667" + "7071727374757677" +}; + +static const char DIGITS_HEX[2*16+1] = { + "0123456789abcdef" + "0123456789ABCDEF" +}; + + +/////////////// CIntToPyUnicode.proto /////////////// + +static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value, Py_ssize_t width, char padding_char, char format_char); + +/////////////// CIntToPyUnicode /////////////// +//@requires: StringTools.c::IncludeStringH +//@requires: StringTools.c::BuildPyUnicode +//@requires: CIntToDigits +//@requires: GCCDiagnostics + +// NOTE: inlining because most arguments are constant, which collapses lots of code below + +static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value, Py_ssize_t width, char padding_char, char format_char) { + // simple and conservative C string allocation on the stack: each byte gives at most 3 digits, plus sign + char digits[sizeof({{TYPE}})*3+2]; + // 'dpos' points to end of digits array + 1 initially to allow for pre-decrement looping + char *dpos, *end = digits + sizeof({{TYPE}})*3+2; + const char *hex_digits = DIGITS_HEX; + Py_ssize_t length, ulength; + int prepend_sign, last_one_off; + {{TYPE}} remaining; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const {{TYPE}} neg_one = ({{TYPE}}) -1, const_zero = ({{TYPE}}) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; + + if (format_char == 'X') { + hex_digits += 16; + format_char = 'x'; + } + + // surprise: even trivial sprintf() calls don't get optimised in gcc (4.8) + remaining = value; /* not using abs(value) to avoid overflow problems */ + last_one_off = 0; + dpos = end; + do { + int digit_pos; + switch (format_char) { + case 'o': + digit_pos = abs((int)(remaining % (8*8))); + remaining = ({{TYPE}}) (remaining / (8*8)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); /* copy 2 digits at a time, unaligned */ + last_one_off = (digit_pos < 8); + break; + case 'd': + digit_pos = abs((int)(remaining % (10*10))); + remaining = ({{TYPE}}) (remaining / (10*10)); + dpos -= 2; + memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); /* copy 2 digits at a time, unaligned */ + last_one_off = (digit_pos < 10); + break; + case 'x': + *(--dpos) = hex_digits[abs((int)(remaining % 16))]; + remaining = ({{TYPE}}) (remaining / 16); + break; + default: + assert(0); + break; + } + } while (unlikely(remaining != 0)); + + if (last_one_off) { + assert(*dpos == '0'); + dpos++; + } + length = end - dpos; + ulength = length; + prepend_sign = 0; + if (!is_unsigned && value <= neg_one) { + if (padding_char == ' ' || width <= length + 1) { + *(--dpos) = '-'; + ++length; + } else { + prepend_sign = 1; + } + ++ulength; + } + if (width > ulength) { + ulength = width; + } + // single character unicode strings are cached in CPython => use PyUnicode_FromOrdinal() for them + if (ulength == 1) { + return PyUnicode_FromOrdinal(*dpos); + } + return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); +} + + +/////////////// CBIntToPyUnicode.proto /////////////// + +#define {{TO_PY_FUNCTION}}(value) \ + ((value) ? __Pyx_NewRef({{TRUE_CONST}}) : __Pyx_NewRef({{FALSE_CONST}})) + + +/////////////// PyIntFromDouble.proto /////////////// + +#if PY_MAJOR_VERSION < 3 +static CYTHON_INLINE PyObject* __Pyx_PyInt_FromDouble(double value); +#else +#define __Pyx_PyInt_FromDouble(value) PyLong_FromDouble(value) +#endif + +/////////////// PyIntFromDouble /////////////// + +#if PY_MAJOR_VERSION < 3 +static CYTHON_INLINE PyObject* __Pyx_PyInt_FromDouble(double value) { + if (value >= (double)LONG_MIN && value <= (double)LONG_MAX) { + return PyInt_FromLong((long)value); + } + return PyLong_FromDouble(value); +} +#endif + + +/////////////// CIntFromPyVerify /////////////// + +// see CIntFromPy +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value) \ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) + +#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value) \ + __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) + +#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc) \ + { \ + func_type value = func_value; \ + if (sizeof(target_type) < sizeof(func_type)) { \ + if (unlikely(value != (func_type) (target_type) value)) { \ + func_type zero = 0; \ + if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred())) \ + return (target_type) -1; \ + if (is_unsigned && unlikely(value < zero)) \ + goto raise_neg_overflow; \ + else \ + goto raise_overflow; \ + } \ + } \ + return (target_type) value; \ + } + + +/////////////// CIntFromPy.proto /////////////// + +static CYTHON_INLINE {{TYPE}} {{FROM_PY_FUNCTION}}(PyObject *); + +/////////////// CIntFromPy /////////////// +//@requires: CIntFromPyVerify +//@requires: GCCDiagnostics + +{{py: from Cython.Utility import pylong_join }} + +static CYTHON_INLINE {{TYPE}} {{FROM_PY_FUNCTION}}(PyObject *x) { +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wconversion" +#endif + const {{TYPE}} neg_one = ({{TYPE}}) -1, const_zero = ({{TYPE}}) 0; +#ifdef __Pyx_HAS_GCC_DIAGNOSTIC +#pragma GCC diagnostic pop +#endif + const int is_unsigned = neg_one > const_zero; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_Check(x))) { + if (sizeof({{TYPE}}) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT({{TYPE}}, long, PyInt_AS_LONG(x)) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + goto raise_neg_overflow; + } + return ({{TYPE}}) val; + } + } else +#endif + if (likely(PyLong_Check(x))) { + if (is_unsigned) { +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return ({{TYPE}}) 0; + case 1: __PYX_VERIFY_RETURN_INT({{TYPE}}, digit, digits[0]) + {{for _size in (2, 3, 4)}} + case {{_size}}: + if (8 * sizeof({{TYPE}}) > {{_size-1}} * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > {{_size}} * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT({{TYPE}}, unsigned long, {{pylong_join(_size, 'digits')}}) + } else if (8 * sizeof({{TYPE}}) >= {{_size}} * PyLong_SHIFT) { + return ({{TYPE}}) {{pylong_join(_size, 'digits', TYPE)}}; + } + } + break; + {{endfor}} + } +#endif +#if CYTHON_COMPILING_IN_CPYTHON + if (unlikely(Py_SIZE(x) < 0)) { + goto raise_neg_overflow; + } +#else + { + // misuse Py_False as a quick way to compare to a '0' int object in PyPy + int result = PyObject_RichCompareBool(x, Py_False, Py_LT); + if (unlikely(result < 0)) + return ({{TYPE}}) -1; + if (unlikely(result == 1)) + goto raise_neg_overflow; + } +#endif + if (sizeof({{TYPE}}) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT_EXC({{TYPE}}, unsigned long, PyLong_AsUnsignedLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof({{TYPE}}) <= sizeof(unsigned PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC({{TYPE}}, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) +#endif + } + } else { + // signed +#if CYTHON_USE_PYLONG_INTERNALS + const digit* digits = ((PyLongObject*)x)->ob_digit; + switch (Py_SIZE(x)) { + case 0: return ({{TYPE}}) 0; + case -1: __PYX_VERIFY_RETURN_INT({{TYPE}}, sdigit, (sdigit) (-(sdigit)digits[0])) + case 1: __PYX_VERIFY_RETURN_INT({{TYPE}}, digit, +digits[0]) + {{for _size in (2, 3, 4)}} + {{for _case in (-_size, _size)}} + case {{_case}}: + if (8 * sizeof({{TYPE}}){{' - 1' if _case < 0 else ''}} > {{_size-1}} * PyLong_SHIFT) { + if (8 * sizeof(unsigned long) > {{_size}} * PyLong_SHIFT) { + __PYX_VERIFY_RETURN_INT({{TYPE}}, {{'long' if _case < 0 else 'unsigned long'}}, {{'-(long) ' if _case < 0 else ''}}{{pylong_join(_size, 'digits')}}) + } else if (8 * sizeof({{TYPE}}) - 1 > {{_size}} * PyLong_SHIFT) { + return ({{TYPE}}) ({{'((%s)-1)*' % TYPE if _case < 0 else ''}}{{pylong_join(_size, 'digits', TYPE)}}); + } + } + break; + {{endfor}} + {{endfor}} + } +#endif + if (sizeof({{TYPE}}) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT_EXC({{TYPE}}, long, PyLong_AsLong(x)) +#ifdef HAVE_LONG_LONG + } else if (sizeof({{TYPE}}) <= sizeof(PY_LONG_LONG)) { + __PYX_VERIFY_RETURN_INT_EXC({{TYPE}}, PY_LONG_LONG, PyLong_AsLongLong(x)) +#endif + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + {{TYPE}} val; + PyObject *v = __Pyx_PyNumber_IntOrLong(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return ({{TYPE}}) -1; + } + } else { + {{TYPE}} val; + PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); + if (!tmp) return ({{TYPE}}) -1; + val = {{FROM_PY_FUNCTION}}(tmp); + Py_DECREF(tmp); + return val; + } + +raise_overflow: + PyErr_SetString(PyExc_OverflowError, + "value too large to convert to {{TYPE}}"); + return ({{TYPE}}) -1; + +raise_neg_overflow: + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to {{TYPE}}"); + return ({{TYPE}}) -1; +} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/__init__.py new file mode 100644 index 00000000000..73ccc1e2cba --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/__init__.py @@ -0,0 +1,29 @@ + +def pylong_join(count, digits_ptr='digits', join_type='unsigned long'): + """ + Generate an unrolled shift-then-or loop over the first 'count' digits. + Assumes that they fit into 'join_type'. + + (((d[2] << n) | d[1]) << n) | d[0] + """ + return ('(' * (count * 2) + ' | '.join( + "(%s)%s[%d])%s)" % (join_type, digits_ptr, _i, " << PyLong_SHIFT" if _i else '') + for _i in range(count-1, -1, -1))) + + +# although it could potentially make use of data independence, +# this implementation is a bit slower than the simpler one above +def _pylong_join(count, digits_ptr='digits', join_type='unsigned long'): + """ + Generate an or-ed series of shifts for the first 'count' digits. + Assumes that they fit into 'join_type'. + + (d[2] << 2*n) | (d[1] << 1*n) | d[0] + """ + def shift(n): + # avoid compiler warnings for overly large shifts that will be discarded anyway + return " << (%d * PyLong_SHIFT < 8 * sizeof(%s) ? %d * PyLong_SHIFT : 0)" % (n, join_type, n) if n else '' + + return '(%s)' % ' | '.join( + "(((%s)%s[%d])%s)" % (join_type, digits_ptr, i, shift(i)) + for i in range(count-1, -1, -1)) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/arrayarray.h b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/arrayarray.h new file mode 100644 index 00000000000..a9e49237856 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/arrayarray.h @@ -0,0 +1,149 @@ +/////////////// ArrayAPI.proto /////////////// + +// arrayarray.h +// +// Artificial C-API for Python's type, +// used by array.pxd +// +// last changes: 2009-05-15 rk +// 2012-05-02 andreasvc +// (see revision control) +// + +#ifndef _ARRAYARRAY_H +#define _ARRAYARRAY_H + +// These two forward declarations are explicitly handled in the type +// declaration code, as including them here is too late for cython-defined +// types to use them. +// struct arrayobject; +// typedef struct arrayobject arrayobject; + +// All possible arraydescr values are defined in the vector "descriptors" +// below. That's defined later because the appropriate get and set +// functions aren't visible yet. +typedef struct arraydescr { + int typecode; + int itemsize; + PyObject * (*getitem)(struct arrayobject *, Py_ssize_t); + int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *); +#if PY_MAJOR_VERSION >= 3 + char *formats; +#endif +} arraydescr; + + +struct arrayobject { + PyObject_HEAD + Py_ssize_t ob_size; + union { + char *ob_item; + float *as_floats; + double *as_doubles; + int *as_ints; + unsigned int *as_uints; + unsigned char *as_uchars; + signed char *as_schars; + char *as_chars; + unsigned long *as_ulongs; + long *as_longs; +#if PY_MAJOR_VERSION >= 3 + unsigned long long *as_ulonglongs; + long long *as_longlongs; +#endif + short *as_shorts; + unsigned short *as_ushorts; + Py_UNICODE *as_pyunicodes; + void *as_voidptr; + } data; + Py_ssize_t allocated; + struct arraydescr *ob_descr; + PyObject *weakreflist; /* List of weak references */ +#if PY_MAJOR_VERSION >= 3 + int ob_exports; /* Number of exported buffers */ +#endif +}; + +#ifndef NO_NEWARRAY_INLINE +// fast creation of a new array +static CYTHON_INLINE PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size, + struct arraydescr *descr) { + arrayobject *op; + size_t nbytes; + + if (size < 0) { + PyErr_BadInternalCall(); + return NULL; + } + + nbytes = size * descr->itemsize; + // Check for overflow + if (nbytes / descr->itemsize != (size_t)size) { + return PyErr_NoMemory(); + } + op = (arrayobject *) type->tp_alloc(type, 0); + if (op == NULL) { + return NULL; + } + op->ob_descr = descr; + op->allocated = size; + op->weakreflist = NULL; + __Pyx_SET_SIZE(op, size); + if (size <= 0) { + op->data.ob_item = NULL; + } + else { + op->data.ob_item = PyMem_NEW(char, nbytes); + if (op->data.ob_item == NULL) { + Py_DECREF(op); + return PyErr_NoMemory(); + } + } + return (PyObject *) op; +} +#else +PyObject* newarrayobject(PyTypeObject *type, Py_ssize_t size, + struct arraydescr *descr); +#endif /* ifndef NO_NEWARRAY_INLINE */ + +// fast resize (reallocation to the point) +// not designed for filing small increments (but for fast opaque array apps) +static CYTHON_INLINE int resize(arrayobject *self, Py_ssize_t n) { + void *items = (void*) self->data.ob_item; + PyMem_Resize(items, char, (size_t)(n * self->ob_descr->itemsize)); + if (items == NULL) { + PyErr_NoMemory(); + return -1; + } + self->data.ob_item = (char*) items; + __Pyx_SET_SIZE(self, n); + self->allocated = n; + return 0; +} + +// suitable for small increments; over allocation 50% ; +static CYTHON_INLINE int resize_smart(arrayobject *self, Py_ssize_t n) { + void *items = (void*) self->data.ob_item; + Py_ssize_t newsize; + if (n < self->allocated && n*4 > self->allocated) { + __Pyx_SET_SIZE(self, n); + return 0; + } + newsize = n + (n / 2) + 1; + if (newsize <= n) { /* overflow */ + PyErr_NoMemory(); + return -1; + } + PyMem_Resize(items, char, (size_t)(newsize * self->ob_descr->itemsize)); + if (items == NULL) { + PyErr_NoMemory(); + return -1; + } + self->data.ob_item = (char*) items; + __Pyx_SET_SIZE(self, n); + self->allocated = newsize; + return 0; +} + +#endif +/* _ARRAYARRAY_H */ diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utils.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utils.py new file mode 100644 index 00000000000..d59d67d78b1 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utils.py @@ -0,0 +1,449 @@ +# +# Cython -- Things that don't belong +# anywhere else in particular +# + +from __future__ import absolute_import + +try: + from __builtin__ import basestring +except ImportError: + basestring = str + +try: + FileNotFoundError +except NameError: + FileNotFoundError = OSError + +import os +import sys +import re +import io +import codecs +import shutil +import tempfile +from contextlib import contextmanager + +modification_time = os.path.getmtime + +_function_caches = [] +def clear_function_caches(): + for cache in _function_caches: + cache.clear() + +def cached_function(f): + cache = {} + _function_caches.append(cache) + uncomputed = object() + def wrapper(*args): + res = cache.get(args, uncomputed) + if res is uncomputed: + res = cache[args] = f(*args) + return res + wrapper.uncached = f + return wrapper + +def cached_method(f): + cache_name = '__%s_cache' % f.__name__ + def wrapper(self, *args): + cache = getattr(self, cache_name, None) + if cache is None: + cache = {} + setattr(self, cache_name, cache) + if args in cache: + return cache[args] + res = cache[args] = f(self, *args) + return res + return wrapper + +def replace_suffix(path, newsuf): + base, _ = os.path.splitext(path) + return base + newsuf + + +def open_new_file(path): + if os.path.exists(path): + # Make sure to create a new file here so we can + # safely hard link the output files. + os.unlink(path) + + # we use the ISO-8859-1 encoding here because we only write pure + # ASCII strings or (e.g. for file names) byte encoded strings as + # Unicode, so we need a direct mapping from the first 256 Unicode + # characters to a byte sequence, which ISO-8859-1 provides + + # note: can't use io.open() in Py2 as we may be writing str objects + return codecs.open(path, "w", encoding="ISO-8859-1") + + +def castrate_file(path, st): + # Remove junk contents from an output file after a + # failed compilation. + # Also sets access and modification times back to + # those specified by st (a stat struct). + try: + f = open_new_file(path) + except EnvironmentError: + pass + else: + f.write( + "#error Do not use this file, it is the result of a failed Cython compilation.\n") + f.close() + if st: + os.utime(path, (st.st_atime, st.st_mtime-1)) + +def file_newer_than(path, time): + ftime = modification_time(path) + return ftime > time + + +def safe_makedirs(path): + try: + os.makedirs(path) + except OSError: + if not os.path.isdir(path): + raise + + +def copy_file_to_dir_if_newer(sourcefile, destdir): + """ + Copy file sourcefile to directory destdir (creating it if needed), + preserving metadata. If the destination file exists and is not + older than the source file, the copying is skipped. + """ + destfile = os.path.join(destdir, os.path.basename(sourcefile)) + try: + desttime = modification_time(destfile) + except OSError: + # New file does not exist, destdir may or may not exist + safe_makedirs(destdir) + else: + # New file already exists + if not file_newer_than(sourcefile, desttime): + return + shutil.copy2(sourcefile, destfile) + + +@cached_function +def find_root_package_dir(file_path): + dir = os.path.dirname(file_path) + if file_path == dir: + return dir + elif is_package_dir(dir): + return find_root_package_dir(dir) + else: + return dir + +@cached_function +def check_package_dir(dir, package_names): + for dirname in package_names: + dir = os.path.join(dir, dirname) + if not is_package_dir(dir): + return None + return dir + +@cached_function +def is_package_dir(dir_path): + for filename in ("__init__.py", + "__init__.pyc", + "__init__.pyx", + "__init__.pxd"): + path = os.path.join(dir_path, filename) + if path_exists(path): + return 1 + +@cached_function +def path_exists(path): + # try on the filesystem first + if os.path.exists(path): + return True + # figure out if a PEP 302 loader is around + try: + loader = __loader__ + # XXX the code below assumes a 'zipimport.zipimporter' instance + # XXX should be easy to generalize, but too lazy right now to write it + archive_path = getattr(loader, 'archive', None) + if archive_path: + normpath = os.path.normpath(path) + if normpath.startswith(archive_path): + arcname = normpath[len(archive_path)+1:] + try: + loader.get_data(arcname) + return True + except IOError: + return False + except NameError: + pass + return False + +# file name encodings + +def decode_filename(filename): + if isinstance(filename, bytes): + try: + filename_encoding = sys.getfilesystemencoding() + if filename_encoding is None: + filename_encoding = sys.getdefaultencoding() + filename = filename.decode(filename_encoding) + except UnicodeDecodeError: + pass + return filename + +# support for source file encoding detection + +_match_file_encoding = re.compile(br"(\w*coding)[:=]\s*([-\w.]+)").search + + +def detect_opened_file_encoding(f): + # PEPs 263 and 3120 + # Most of the time the first two lines fall in the first couple of hundred chars, + # and this bulk read/split is much faster. + lines = () + start = b'' + while len(lines) < 3: + data = f.read(500) + start += data + lines = start.split(b"\n") + if not data: + break + m = _match_file_encoding(lines[0]) + if m and m.group(1) != b'c_string_encoding': + return m.group(2).decode('iso8859-1') + elif len(lines) > 1: + m = _match_file_encoding(lines[1]) + if m: + return m.group(2).decode('iso8859-1') + return "UTF-8" + + +def skip_bom(f): + """ + Read past a BOM at the beginning of a source file. + This could be added to the scanner, but it's *substantially* easier + to keep it at this level. + """ + if f.read(1) != u'\uFEFF': + f.seek(0) + + +def open_source_file(source_filename, encoding=None, error_handling=None): + stream = None + try: + if encoding is None: + # Most of the time the encoding is not specified, so try hard to open the file only once. + f = io.open(source_filename, 'rb') + encoding = detect_opened_file_encoding(f) + f.seek(0) + stream = io.TextIOWrapper(f, encoding=encoding, errors=error_handling) + else: + stream = io.open(source_filename, encoding=encoding, errors=error_handling) + + except OSError: + if os.path.exists(source_filename): + raise # File is there, but something went wrong reading from it. + # Allow source files to be in zip files etc. + try: + loader = __loader__ + if source_filename.startswith(loader.archive): + stream = open_source_from_loader( + loader, source_filename, + encoding, error_handling) + except (NameError, AttributeError): + pass + + if stream is None: + raise FileNotFoundError(source_filename) + skip_bom(stream) + return stream + + +def open_source_from_loader(loader, + source_filename, + encoding=None, error_handling=None): + nrmpath = os.path.normpath(source_filename) + arcname = nrmpath[len(loader.archive)+1:] + data = loader.get_data(arcname) + return io.TextIOWrapper(io.BytesIO(data), + encoding=encoding, + errors=error_handling) + + +def str_to_number(value): + # note: this expects a string as input that was accepted by the + # parser already, with an optional "-" sign in front + is_neg = False + if value[:1] == '-': + is_neg = True + value = value[1:] + if len(value) < 2: + value = int(value, 0) + elif value[0] == '0': + literal_type = value[1] # 0'o' - 0'b' - 0'x' + if literal_type in 'xX': + # hex notation ('0x1AF') + value = int(value[2:], 16) + elif literal_type in 'oO': + # Py3 octal notation ('0o136') + value = int(value[2:], 8) + elif literal_type in 'bB': + # Py3 binary notation ('0b101') + value = int(value[2:], 2) + else: + # Py2 octal notation ('0136') + value = int(value, 8) + else: + value = int(value, 0) + return -value if is_neg else value + + +def long_literal(value): + if isinstance(value, basestring): + value = str_to_number(value) + return not -2**31 <= value < 2**31 + + +@cached_function +def get_cython_cache_dir(): + r""" + Return the base directory containing Cython's caches. + + Priority: + + 1. CYTHON_CACHE_DIR + 2. (OS X): ~/Library/Caches/Cython + (posix not OS X): XDG_CACHE_HOME/cython if XDG_CACHE_HOME defined + 3. ~/.cython + + """ + if 'CYTHON_CACHE_DIR' in os.environ: + return os.environ['CYTHON_CACHE_DIR'] + + parent = None + if os.name == 'posix': + if sys.platform == 'darwin': + parent = os.path.expanduser('~/Library/Caches') + else: + # this could fallback on ~/.cache + parent = os.environ.get('XDG_CACHE_HOME') + + if parent and os.path.isdir(parent): + return os.path.join(parent, 'cython') + + # last fallback: ~/.cython + return os.path.expanduser(os.path.join('~', '.cython')) + + +@contextmanager +def captured_fd(stream=2, encoding=None): + orig_stream = os.dup(stream) # keep copy of original stream + try: + with tempfile.TemporaryFile(mode="a+b") as temp_file: + def read_output(_output=[b'']): + if not temp_file.closed: + temp_file.seek(0) + _output[0] = temp_file.read() + return _output[0] + + os.dup2(temp_file.fileno(), stream) # replace stream by copy of pipe + try: + def get_output(): + result = read_output() + return result.decode(encoding) if encoding else result + + yield get_output + finally: + os.dup2(orig_stream, stream) # restore original stream + read_output() # keep the output in case it's used after closing the context manager + finally: + os.close(orig_stream) + + +def print_bytes(s, header_text=None, end=b'\n', file=sys.stdout, flush=True): + if header_text: + file.write(header_text) # note: text! => file.write() instead of out.write() + file.flush() + try: + out = file.buffer # Py3 + except AttributeError: + out = file # Py2 + out.write(s) + if end: + out.write(end) + if flush: + out.flush() + +class LazyStr: + def __init__(self, callback): + self.callback = callback + def __str__(self): + return self.callback() + def __repr__(self): + return self.callback() + def __add__(self, right): + return self.callback() + right + def __radd__(self, left): + return left + self.callback() + + +class OrderedSet(object): + def __init__(self, elements=()): + self._list = [] + self._set = set() + self.update(elements) + def __iter__(self): + return iter(self._list) + def update(self, elements): + for e in elements: + self.add(e) + def add(self, e): + if e not in self._set: + self._list.append(e) + self._set.add(e) + + +# Class decorator that adds a metaclass and recreates the class with it. +# Copied from 'six'. +def add_metaclass(metaclass): + """Class decorator for creating a class with a metaclass.""" + def wrapper(cls): + orig_vars = cls.__dict__.copy() + slots = orig_vars.get('__slots__') + if slots is not None: + if isinstance(slots, str): + slots = [slots] + for slots_var in slots: + orig_vars.pop(slots_var) + orig_vars.pop('__dict__', None) + orig_vars.pop('__weakref__', None) + return metaclass(cls.__name__, cls.__bases__, orig_vars) + return wrapper + + +def raise_error_if_module_name_forbidden(full_module_name): + #it is bad idea to call the pyx-file cython.pyx, so fail early + if full_module_name == 'cython' or full_module_name.startswith('cython.'): + raise ValueError('cython is a special module, cannot be used as a module name') + + +def build_hex_version(version_string): + """ + Parse and translate '4.3a1' into the readable hex representation '0x040300A1' (like PY_VERSION_HEX). + """ + # First, parse '4.12a1' into [4, 12, 0, 0xA01]. + digits = [] + release_status = 0xF0 + for digit in re.split('([.abrc]+)', version_string): + if digit in ('a', 'b', 'rc'): + release_status = {'a': 0xA0, 'b': 0xB0, 'rc': 0xC0}[digit] + digits = (digits + [0, 0])[:3] # 1.2a1 -> 1.2.0a1 + elif digit != '.': + digits.append(int(digit)) + digits = (digits + [0] * 3)[:4] + digits[3] += release_status + + # Then, build a single hex value, two hex digits per version part. + hexversion = 0 + for digit in digits: + hexversion = (hexversion << 8) + digit + + return '0x%08X' % hexversion diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/__init__.py new file mode 100644 index 00000000000..549246b8a37 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/__init__.py @@ -0,0 +1,12 @@ +from __future__ import absolute_import + +from .Shadow import __version__ + +# Void cython.* directives (for case insensitive operating systems). +from .Shadow import * + + +def load_ipython_extension(ip): + """Load the extension in IPython.""" + from .Build.IpythonMagic import CythonMagics # pylint: disable=cyclic-import + ip.register_magics(CythonMagics) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/COPYING.txt b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/COPYING.txt new file mode 100644 index 00000000000..1a05a211a01 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/COPYING.txt @@ -0,0 +1,19 @@ +The original Pyrex code as of 2006-04 is licensed under the following +license: "Copyright stuff: Pyrex is free of restrictions. You may use, +redistribute, modify and distribute modified versions." + +------------------ + +Cython, which derives from Pyrex, is licensed under the Apache 2.0 +Software License. More precisely, all modifications and new code +made to go from Pyrex to Cython are so licensed. + +See LICENSE.txt for more details. + +------------------ + +The output of a Cython compilation is NOT considered a derivative +work of Cython. Specifically, though the compilation process may +embed snippets of varying lengths into the final output, these +snippets, as embedded in the output, do not encumber the resulting +output with any license restrictions. diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/LICENSE.txt b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/LICENSE.txt new file mode 100644 index 00000000000..d9a10c0d8e8 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/LICENSE.txt @@ -0,0 +1,176 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/PKG-INFO b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/PKG-INFO new file mode 100644 index 00000000000..9e2dc74319a --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/PKG-INFO @@ -0,0 +1,57 @@ +Metadata-Version: 2.1 +Name: Cython +Version: 0.29.30 +Summary: The Cython compiler for writing C extensions for the Python language. +Home-page: http://cython.org/ +Author: Robert Bradshaw, Stefan Behnel, Dag Seljebotn, Greg Ewing, et al. +Author-email: cython-devel@python.org +License: Apache +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Operating System :: OS Independent +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.6 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Programming Language :: Python :: 3.5 +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy +Classifier: Programming Language :: C +Classifier: Programming Language :: Cython +Classifier: Topic :: Software Development :: Code Generators +Classifier: Topic :: Software Development :: Compilers +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Requires-Python: >=2.6, !=3.0.*, !=3.1.*, !=3.2.* +License-File: LICENSE.txt +License-File: COPYING.txt + +The Cython language makes writing C extensions for the Python language as +easy as Python itself. Cython is a source code translator based on Pyrex_, +but supports more cutting edge functionality and optimizations. + +The Cython language is a superset of the Python language (almost all Python +code is also valid Cython code), but Cython additionally supports optional +static typing to natively call C functions, operate with C++ classes and +declare fast C types on variables and class attributes. This allows the +compiler to generate very efficient C code from Cython code. + +This makes Cython the ideal language for writing glue code for external +C/C++ libraries, and for fast C modules that speed up the execution of +Python code. + +Note that for one-time builds, e.g. for CI/testing, on platforms that are not +covered by one of the wheel packages provided on PyPI *and* the pure Python wheel +that we provide is not used, it is substantially faster than a full source build +to install an uncompiled (slower) version of Cython with:: + + pip install Cython --install-option="--no-cython-compile" + +.. _Pyrex: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/ diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/RECORD b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/RECORD new file mode 100644 index 00000000000..ed2294889ca --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/RECORD @@ -0,0 +1,313 @@ +cython.py,sha256=z2AtgHBGh0x0h0ZcGje7IhYlR6nGH_MmOh1fFMjqYn0,520 +Cython-0.29.30.dist-info/WHEEL,sha256=bNo8z0PVtQTBbDGrChMiv5oJrHcjNPuihN_pxw9QNoY,185 +Cython-0.29.30.dist-info/COPYING.txt,sha256=4escSahQjoFz2sMBV-SmQ5pErYhGGUdGxCT7w_wrldc,756 +Cython-0.29.30.dist-info/top_level.txt,sha256=jLV8tZV98iCbIfiJR4DVzTX5Ru1Y_pYMZ59wkMCe6SY,24 +Cython-0.29.30.dist-info/LICENSE.txt,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173 +Cython-0.29.30.dist-info/METADATA,sha256=Xsn0nQNrFW6Kbzr4R9WoLBXLbQGvdHQxQr0VgBsoG1U,2767 +Cython-0.29.30.dist-info/RECORD,, +Cython-0.29.30.dist-info/entry_points.txt,sha256=VU8NX8gnQyFbyqiWMzfh9BHvYMuoQRS3Nbm3kKcKQeY,139 +pyximport/__init__.py,sha256=9hOyKolFtOerPiVEyktKrT1VtzbGexq9UmORzo52iHI,79 +pyximport/pyximport.py,sha256=Vjxp3kbmFRf9j0ya4f0m0Ahytkjjmv2UkFueasXxL5A,23578 +pyximport/pyxbuild.py,sha256=TiAkhtSxSbRW04JKtgO3FP3hfVzQ1mjjzCh5PqZDOrM,5702 +Cython/Utils.py,sha256=YJa4RP6fSQkWpbA_X0DnNREd3Y5NuPDjGwUdNvVW2OM,13458 +Cython/Coverage.py,sha256=FtCMjKLYWvtULxWIzN-y3RhbwQwL4GtLyIjj-B3-07E,13537 +Cython/StringIOTree.py,sha256=GX-TWn9XHwY5ecb4in8ovsTS5CtPTsSxZpanLWmQxgE,3336 +Cython/Shadow.py,sha256=A26lvSypOiCBJkaMRIzwe89i93nhUW8WQunD-rPUqgo,12987 +Cython/__init__.py,sha256=GMnkoIas6hfN_meqZAJF9BEs1NuY4-4B2L0Uls7hXaA,358 +Cython/CodeWriter.py,sha256=Sa1hLmUcIMnCGTNASqyzfGqk70i6v-YslD5ogllCaiY,23901 +Cython/TestUtils.py,sha256=fzpic9xU-LP0wempXqwUQWZapBvXnFgbW_W9--IKpIA,7979 +Cython/Debugging.py,sha256=vFtJhn7QstMf5gnYru2qHIz5ZjPg1KSlZVGHr-pBCwM,552 +Cython/Utility/arrayarray.h,sha256=3Ll8Gd_S4rv8HaTfg5i6-aaoB9taI1vzwTp7NeA7Wy0,4089 +Cython/Utility/Capsule.c,sha256=SOeU7E7T7piQEx894T2QFH2RlSG-MmsiyuY4lVN1yso,505 +Cython/Utility/Embed.c,sha256=sMDv7XVJswaGRTQbQHtEDThZaAmvbn-6yeIqrUzboL4,6854 +Cython/Utility/CythonFunction.c,sha256=m_K3U-13w4dbg_Q3Dy4Webf75Ftj9oz-rahk3OekO84,46154 +Cython/Utility/CConvert.pyx,sha256=fbZVHvm2vlWj2rgm8ajBt5jrbN30nY7dEmHlBCGomlU,4338 +Cython/Utility/MemoryView_C.c,sha256=oz4b-wJSQSxS8e6QFG0zeNJxCognXUohM-FS-RbFBRs,29243 +Cython/Utility/Buffer.c,sha256=VUF4xHKJGX7QMTvpJO40aI1JUL-SERLEvlXXXEk2dHU,29654 +Cython/Utility/Printing.c,sha256=o8XnfjNIT8Ub5KY4FAp_FNw-OE3xqjy0MgmYWgDcWao,5103 +Cython/Utility/TypeConversion.c,sha256=0K3erVzNT9lY-jEygTxsarAirETGZcOzvSK-VDs5EJY,36302 +Cython/Utility/TestUtilityLoader.c,sha256=dGy6ZWL2kBqtmUY7kF75UEox5kadQZ__BmZKscwg2aY,279 +Cython/Utility/TestCyUtilityLoader.pyx,sha256=91lWWJub7l_6xNn3ncrvQZZ94RpkQzEx2NtAaFpvrxY,152 +Cython/Utility/TestCythonScope.pyx,sha256=HQm5E5Eehr3tkDDURURyVnDputKG3-Wn2k2aIAoru9g,1595 +Cython/Utility/Optimize.c,sha256=xtKZ8WhOe8l4UYONGVDilNFhzGMueJxA7nYJn8QIWmc,45184 +Cython/Utility/ModuleSetupCode.c,sha256=ZpsGKdOiRu9vzIZpXCtFDA1ekpBdtZWcG4Rxml6Z5xo,56953 +Cython/Utility/ObjectHandling.c,sha256=AcTgr9Kw0iiFqX8oDQ6m7NrOm7ogny1chNs1HhuEwNc,88765 +Cython/Utility/Profile.c,sha256=3aq_eC7h_nUnZe-Np7td20ublCC4OowfHoV3FoW9UnU,17922 +Cython/Utility/ImportExport.c,sha256=KE8VQNH8IXLjquRCVxw4mKV2ZwbAw2dSk7I2uTh0fLs,22287 +Cython/Utility/MemoryView.pyx,sha256=vCbGT3WDoaB9gxv4eUr4UGS8YhHy3LK3E_r329s-L_k,49621 +Cython/Utility/FunctionArguments.c,sha256=IH9Y5aV_tNrJLo_CWHskEnFai9fp9cKLvRkIZYl2UGQ,12040 +Cython/Utility/__init__.py,sha256=t2bpY-TYSX8lJdbKuBFJ1kBfpWVzgGw4xoZlCKfyj_s,1159 +Cython/Utility/Exceptions.c,sha256=mXEVREHj4zA9a0oY2Dbw1VOXtDhsL2wBSCMUS3ZFhSI,27314 +Cython/Utility/Complex.c,sha256=J4HseVcBOzGo5dye0Gus8bf8rGwWLEzN9sRJM74SWiI,10043 +Cython/Utility/CMath.c,sha256=GIc7gd2WzaZryDJM3tefqXifLJpUJs6_T_c_mFrr-s8,2566 +Cython/Utility/CppConvert.pyx,sha256=-e5i3_J1SS_GbctsflQwylx9cqdk_CJ2SfQSEDHa71k,6098 +Cython/Utility/ExtensionTypes.c,sha256=doPkCDEsyClYfDa1386DxwVj0D4jYvKQlnbXQo2REHM,11664 +Cython/Utility/AsyncGen.c,sha256=iwNH8NdegHZYafEgBpErk6erU5o6GKVtHgqd3Vq9kNc,41023 +Cython/Utility/CppSupport.cpp,sha256=NTnSRCmi2PHuT3J6Qy15xMZGx0bf9l-MaxAbW6OVk6s,2234 +Cython/Utility/Coroutine.c,sha256=YmFtN3eY_MAxEktax_xwsdPhL8qUC86jUgPe1mdlcdU,89569 +Cython/Utility/CpdefEnums.pyx,sha256=XMg8sdltQSNj2wGVfnHIWRvyHFCcLK8ZfpKznKi4lhY,1893 +Cython/Utility/StringTools.c,sha256=vEwYIlZf3ET7eTmUJEC7T2JjdLxX8Q1u5g2MQz4PUZM,42214 +Cython/Utility/CommonStructures.c,sha256=p65HHgTrf7h7Tj7JK7tIgkLrrCrjouL8HL90EHfoMoU,2558 +Cython/Utility/Overflow.c,sha256=_KXlJsbMIi-jzdCotwxkN6mtqo6jHRNnPJ1ZKwXVhpE,12424 +Cython/Utility/Builtins.c,sha256=gYObNoiK_NVWRuzSFRePMb-dtw-XCp_Dx_Ztjmpq7as,16818 +Cython/Tempita/_tempita.py,sha256=4gnJhuVIsGciu_5Besbvw26g82Pm7CiXazMghZO3ejs,39588 +Cython/Tempita/__init__.py,sha256=YHujYHiLoYUwFNNswJCgzSrDuie3sV08JsWT9Nbmp78,152 +Cython/Tempita/_tempita.cpython-39-x86_64-linux-gnu.so,sha256=Xjh396OigUS4SucETYWnyNUCZy5EGEOhKRglIg3wrtc,629992 +Cython/Tempita/compat3.py,sha256=cjW1y266vRF5Xvh8kAu7_qHGT8AGGu2kGSJRK6DI-0E,903 +Cython/Tempita/_looper.py,sha256=jlStYhz9Pgp6NatX86k-netBNBmvwaeWxCRS_S8vcIM,4168 +Cython/Distutils/extension.py,sha256=FHvtK3Tj9MqE17TuZ_jWg1Mh4X7e-CXIPUpJK7nqcQE,4706 +Cython/Distutils/build_ext.py,sha256=Fc_cI5wN0fT1Mf2k5B5nH-PgZ8Gq2lL6OlzF_qzy3dA,1007 +Cython/Distutils/__init__.py,sha256=uyWaN2NJ_mKYLzVsDPi0qZCdIYoW5M_7YYEmAOIL3Ek,98 +Cython/Distutils/old_build_ext.py,sha256=Hy34A1HqhoDOyU-krN2gJUYXK2mYWc8E2EZB-stvmrE,13635 +Cython/Includes/openmp.pxd,sha256=orCIBYFuVPtLdRdhhCm5uhGbeV_fgVCA2Jk2Bts1e2g,1713 +Cython/Includes/cpython/array.pxd,sha256=g6apBiXJG_7a0mjGqkFaqlcQjsg64uKK1VlXFFyXVCk,6056 +Cython/Includes/cpython/complex.pxd,sha256=-bu0Cq91tS_U5tTra18S0jqt1FgSJTHXJ5J8rk-MOAA,1777 +Cython/Includes/cpython/type.pxd,sha256=FOypwX0ZYamPc4uO8bejzO-HzgiaSRaXEPsxxxPIneI,1831 +Cython/Includes/cpython/iterobject.pxd,sha256=5UEZZwG5zyzxoCpknoQuh91zPUV11Uxr6F1taJdTv8k,1036 +Cython/Includes/cpython/buffer.pxd,sha256=wm7aHygGUof_H3-JyICOek_xiU6Oks178ark1Nfk-a0,4870 +Cython/Includes/cpython/conversion.pxd,sha256=dbbFuZJF0SscmcaNCUf0tlBQDRdKYf5tH8yzhTU_XYI,1696 +Cython/Includes/cpython/method.pxd,sha256=UWXflhIlP4y7B5XDbH9rQ15iADciGW-iqV1-dlw2Wwg,2196 +Cython/Includes/cpython/float.pxd,sha256=RD1qEAUocXG9qXrRiT8aCSSfGEyTzjTc9HQkv5xg1ZE,1424 +Cython/Includes/cpython/sequence.pxd,sha256=iTp3C6wOvTdvjLmdj3k9GqQqCGDlQFpzWi07wVQqSS4,6008 +Cython/Includes/cpython/bytes.pxd,sha256=tGLuiBMzQjurK_pq77CM7P0C-Hn0KUIDZCXW9QvlJAI,9906 +Cython/Includes/cpython/pycapsule.pxd,sha256=8vySKea_zyTZZ1H39lICYkpJmnYTqZrun3DLf7d2294,5692 +Cython/Includes/cpython/version.pxd,sha256=l5KXt04isEv3qbGRJZ8fNlCYGO24HsA2l4EM3RxTEhE,847 +Cython/Includes/cpython/ceval.pxd,sha256=h6fBetZCUvWTcCn3bkXZg2kqnIuyC5ZSChyhOocxVus,236 +Cython/Includes/cpython/iterator.pxd,sha256=o52mLHbdm14Kqant2hR2zAdYzqK4fkSWZtBcRmpoP-I,1319 +Cython/Includes/cpython/cellobject.pxd,sha256=DXdTjSN1RP1m4CsaGuggyIA1nGiIO4Kr7-c0ZWfrpRo,1390 +Cython/Includes/cpython/bytearray.pxd,sha256=m0VdoHgouF1T0VtRjFLXZ5fi22vaMdVwFWpF3IxB6m4,1443 +Cython/Includes/cpython/instance.pxd,sha256=qCbxPeHKOJbuszDu3UEaI-KLX9lTopuaNCcpoHJ9ngU,985 +Cython/Includes/cpython/weakref.pxd,sha256=UU9H_ovHG07FFgP_kY2xhGv3yJDr_8iujCZnxH2jnlo,1984 +Cython/Includes/cpython/pystate.pxd,sha256=xgf1BBkv36qvqMaR77zZWYOuonAwe4RfNKE2g91A6fk,3683 +Cython/Includes/cpython/ref.pxd,sha256=2AmgyGDhwA4scts0jcBTdGTCG0b2P8-eYAKFJk44x0I,2557 +Cython/Includes/cpython/genobject.pxd,sha256=emC1JPgkuvBbGC0rgeZapKDaXYEj48uWiDC-xF0Mx2I,1052 +Cython/Includes/cpython/longintrepr.pxd,sha256=czvKr3fQdYIwIRu3gojXssT9LFXH-nstM7f_lPt7lE4,480 +Cython/Includes/cpython/codecs.pxd,sha256=3fyudEljkNGQ7e3dJPst6udXGcAeNKvlMK9U8EB1gXc,5084 +Cython/Includes/cpython/set.pxd,sha256=ewHRPVMbHUGDInZ3NziisCq68LvtmEJ-SXFbzmuJxLc,5383 +Cython/Includes/cpython/object.pxd,sha256=AK5D-LrDbvisO6wpkh29G6xjA71sBF_KfKUyn0k2hzg,18366 +Cython/Includes/cpython/getargs.pxd,sha256=268twKzdiAkQMXMsetNiNlNqaqzlKtiBENKbhOHd8x4,775 +Cython/Includes/cpython/slice.pxd,sha256=Rzgn8diAsN7lS2xGTq4VZucV3ziFNra4oz4tKGEAkMo,3111 +Cython/Includes/cpython/tuple.pxd,sha256=eOLfH75ftJeYszztGFWWZP7LnyFOgw8GNuE7PQ9hAvs,3206 +Cython/Includes/cpython/__init__.pxd,sha256=8URNRvb7JkYhqDZv2J0bVsdeZBEJBu7u2QFYkDyXPG8,8254 +Cython/Includes/cpython/int.pxd,sha256=d9a0zUw_M3pRycCESWIjtfXWRvdvFOWxjdOjkcbX2gs,4131 +Cython/Includes/cpython/datetime.pxd,sha256=wQqB8i3tMZOTw9qrLdbHJRkxgZqscGEqmq0tIDfkkqw,6776 +Cython/Includes/cpython/long.pxd,sha256=d6jHN1XJj7WL5PPAUK8U93IPyjWtlTmyhrBEVmxmGF8,7051 +Cython/Includes/cpython/dict.pxd,sha256=F-mrlcAfNmTSUkpJed63bp1IaO0cwG56t_DLk7f0xv0,6877 +Cython/Includes/cpython/oldbuffer.pxd,sha256=v0-YZ_Iwwj3ZQdM8VE5NPTQcbBlJdWwJGtNO9DonGgw,2916 +Cython/Includes/cpython/mem.pxd,sha256=AWVinanXFBZXvU141we2dD8dkOqMJ8W3KAAzpBJqB5g,5386 +Cython/Includes/cpython/unicode.pxd,sha256=BYaF26EbiStNE62WHjLFFxAygoU9zwSezQDOpjxHse8,26242 +Cython/Includes/cpython/pythread.pxd,sha256=0375TaYmtNCDDkWBh9WY4oJ_jhoTxhu_RR5QiOsXmYg,1946 +Cython/Includes/cpython/mapping.pxd,sha256=OIdvNVUoIpVCSQnkbLceTicSN0D_jRw6wQmbtxtxKuQ,2693 +Cython/Includes/cpython/string.pxd,sha256=EKjDGFnPcjnkndwGMJqRrszDV390Mc6o7AADChnNCiA,9944 +Cython/Includes/cpython/exc.pxd,sha256=29-bGESwfoMqx1XU3MMggkIr8pz_l0UPruzy6KIzHxg,13606 +Cython/Includes/cpython/cobject.pxd,sha256=ZeMdbpZLqpcTywdv2VoppMTWD4X_yghL6Qox7LVfOyg,1524 +Cython/Includes/cpython/bool.pxd,sha256=FaNn8K-Toq8FAws8BguKMk0IPM7IJm9IiUUGARSrKYk,1359 +Cython/Includes/cpython/module.pxd,sha256=Vc0Up7q1Mir38bN293E8RMugxWfuzjLFHM4g2dviPBM,9226 +Cython/Includes/cpython/memoryview.pxd,sha256=l97J5-hbH3hp9aMbdXp3n73hJFNNsng6uyh40pc8P7I,2504 +Cython/Includes/cpython/function.pxd,sha256=IoJUprbz8F10DEKh-vSSpY6nWkCHw7SqG9p2f-4gHek,2671 +Cython/Includes/cpython/list.pxd,sha256=t-xo7ROcewe6-0ztrNjsxMKV2KxD-ILUzemQ2tTuI7E,4084 +Cython/Includes/cpython/pylifecycle.pxd,sha256=LziJZHclGdtsr3yT28fULHNZ_n67bs1DmI9s8YzrBGg,2000 +Cython/Includes/cpython/number.pxd,sha256=tYJ0nn0k_llUx3ilniW9iXd2rKVejA-J5UUiIJ36Kww,11922 +Cython/Includes/numpy/__init__.pxd,sha256=CbLwvA4u-xj7RHxbO9Hs2o6hXd7GaJJlGEn9XJVH4c4,38138 +Cython/Includes/numpy/math.pxd,sha256=qZEdamaPgCFW4J7Itc6BWgOrQSKZdxDT6kbU_gqx2g4,5807 +Cython/Includes/Deprecated/python_cobject.pxd,sha256=V9F0DHQbFZPbJ8RRnN9mft2ipq4wubM8ghBCGHr6NwE,69 +Cython/Includes/Deprecated/python.pxd,sha256=l7crg8H9cVRedMcjDf_9xDLdnUT57Vt1BxlZWom-h88,61 +Cython/Includes/Deprecated/python_float.pxd,sha256=v1Hbpd4SF3hSF7ZL_olMaYJzmBNA9jWn0eO9ggLBlvc,67 +Cython/Includes/Deprecated/python_type.pxd,sha256=2OKmEdSqoyK8fXttlHG3NRguZ-ZikUUet-kjKLq-eEU,66 +Cython/Includes/Deprecated/stdio.pxd,sha256=lNc2YuvWJ-LNSSdN7adDo1lf-C2M0r10hH4bysha9Sg,64 +Cython/Includes/Deprecated/python_dict.pxd,sha256=gYhGkJhMmzWcrXoPnJHUcp-vdtcwUACbGlfv3wtGsKU,66 +Cython/Includes/Deprecated/python_module.pxd,sha256=lKu5VYCgC6S7LSgFa22V2YTY9JfML0vABDZpChhxs60,68 +Cython/Includes/Deprecated/python_sequence.pxd,sha256=9ycCua1ODfECKPd56_GBmeqzWrfdqmkjhbEmdt87NC0,70 +Cython/Includes/Deprecated/python_bool.pxd,sha256=qOaFbsP6_pKoB3HGTjQUkFhQqukXheCmcSnnBQLdKGQ,66 +Cython/Includes/Deprecated/python_string.pxd,sha256=6VgAehwW9PcUC9Kp_HbRVMYPeF_Q-L8yr9o2ezuTzys,68 +Cython/Includes/Deprecated/python_int.pxd,sha256=Cwd4J4KTKjxwEMz1BbCso0g0pOID9AnySKOC1g0kLqA,65 +Cython/Includes/Deprecated/python_getargs.pxd,sha256=NEdeqPqu4di0YJm_7yLfvuS903CAe4K2Pzb13TRfBdE,69 +Cython/Includes/Deprecated/python_instance.pxd,sha256=FX9UlYrSxDrzch7wUvh_Y5Ix-bsDYARkXzZJOg2FvEI,70 +Cython/Includes/Deprecated/stdlib.pxd,sha256=PbCbjT8MjDjVRjx5Rod79gi22-9YI35jTulePAKCPXE,65 +Cython/Includes/Deprecated/python_weakref.pxd,sha256=CUWMSmClrWPoTnlClOFCSHa6Xd55qDgIlcDCD6tfEhM,69 +Cython/Includes/Deprecated/python_object.pxd,sha256=qr2OwYVot4ELK3_-mCfaktXgLJEaKWDyCEblQ2vXV-E,68 +Cython/Includes/Deprecated/python_pycapsule.pxd,sha256=tHJfhgm1TrSwJQwQFdhwP7YE7oQFiegxhNhgCDmlB6A,71 +Cython/Includes/Deprecated/python_complex.pxd,sha256=ITmq55v0b1gibEpLSCTCz68ViljenSuGGjiWn_nvIvI,69 +Cython/Includes/Deprecated/python_exc.pxd,sha256=irWdwDYRWU16-P54uGDNfUSUtkL5Sj_1zBDWext_80g,65 +Cython/Includes/Deprecated/python_buffer.pxd,sha256=gv2a3ngcOnRKZZHSox_bW1WD8jGbxfH9NJm1-iUXf9U,68 +Cython/Includes/Deprecated/python_long.pxd,sha256=pg8hOKNoKaW-Mslugzeq6NCeznJw939LT24AVQn_cqE,66 +Cython/Includes/Deprecated/python_bytes.pxd,sha256=07-Hk3YpN_i4mIlbWYbNgDkjEytQAYOepJLJTY1CrVk,67 +Cython/Includes/Deprecated/python_mem.pxd,sha256=Mxidel5P4yuJxJOvoYr0PN1FD78oCOIJUEMPYMYU7lE,65 +Cython/Includes/Deprecated/python_set.pxd,sha256=_Z5KVXs0V_T8fpgLX-2LbDAZIY1HnuhO-eTUHHRYwu0,65 +Cython/Includes/Deprecated/python_list.pxd,sha256=VHpylsg46-5Ud8rwlPe63bb3zSToXm9R_fPorZrJsUE,66 +Cython/Includes/Deprecated/python_unicode.pxd,sha256=TF8-N0un1WdyccTDo9hZVABc53SYzKnC3MEKrGb3vV0,69 +Cython/Includes/Deprecated/python_oldbuffer.pxd,sha256=QyY4Vn5-cFaOt0oZ27GuRXa3tLawgMZN8KMamn9F1yo,71 +Cython/Includes/Deprecated/stl.pxd,sha256=tHpByeYgNiclr3YtCdKKAeEs3CHJflqacC7YgV7YN8k,2187 +Cython/Includes/Deprecated/python_method.pxd,sha256=x5ye5_8KqtsW2HrEon5NdFJmIkmVDV1KeVpFsuC2UZE,68 +Cython/Includes/Deprecated/python_ref.pxd,sha256=wv39G35V7tN5sIhcL1APpe5NuhCwYwVy6X5DPPm5g5A,65 +Cython/Includes/Deprecated/python_version.pxd,sha256=ZXrK0UGUt8vHbYPxm7PTdhMe1_h7Yj6Lo74oFxjnNns,69 +Cython/Includes/Deprecated/python_number.pxd,sha256=X4MxGoITZuJNPtC2cFJ8lQwui8MOC6rQfEDbFIcWA9k,68 +Cython/Includes/Deprecated/python_tuple.pxd,sha256=_ZTQh7dRBmrRs9mtmOFjP37d0IFItxs20kzFtKtkY-g,67 +Cython/Includes/Deprecated/python_function.pxd,sha256=lkYKySQy1W36hfyyAJsc3E-8d9bsx5k8OhIMFQ6k2jA,70 +Cython/Includes/Deprecated/python_iterator.pxd,sha256=nPJ0nKSmnUVzI1SPrTSt9wSD7SQILyhONJdP0H_-FGc,70 +Cython/Includes/Deprecated/python_mapping.pxd,sha256=AZtJdYm37glDSNChduAsgavz-_DPDkxxQEAO9lDGy84,69 +Cython/Includes/posix/types.pxd,sha256=tWEWxST4EGHIgYS-Ce2SGjZ-KgmM2SVe1eggdcgv3JQ,1162 +Cython/Includes/posix/dlfcn.pxd,sha256=2IFcGBfZEmArdE0BxB71eT_Yb7n9STaVM11AtUcg_pE,355 +Cython/Includes/posix/stdio.pxd,sha256=K8DEH38hWMvy2A8zcKbHRrHSGsgwTIrQ9qCzU-0cWS0,1054 +Cython/Includes/posix/ioctl.pxd,sha256=2RC5zejPOCTkarDZM_6Vd2wc4oBuN7iaiL_C5MPBs90,99 +Cython/Includes/posix/resource.pxd,sha256=MQe1bCTYQFVMsago3pgOvR6t6NElQElg7rhVANxYRcE,1254 +Cython/Includes/posix/strings.pxd,sha256=GNEteqND2wgXXSvkv6U9eKSC9oIom3C7o2zQ6W_J_S4,374 +Cython/Includes/posix/fcntl.pxd,sha256=oRL8-OsgcplHMGcYq5-W5twISvxK-vDfzAaEfuQHC-4,1194 +Cython/Includes/posix/time.pxd,sha256=wPUD7AjxpxmnUYmogTMFjroB2VzcPh8-b_8NEj-yG14,1980 +Cython/Includes/posix/stdlib.pxd,sha256=uGRPa00_HWZ6Chv5E13F96eut0xWHSfR7IioK9rKVLY,934 +Cython/Includes/posix/wait.pxd,sha256=WNogQvKu2hMfEQiCyaANfVWFnyJSk6TxBU0c6npeJrA,1244 +Cython/Includes/posix/unistd.pxd,sha256=w9B4d9NaXBsQ62XOr2xe9UFPGewmEk5BG6sqiRWdoM8,8061 +Cython/Includes/posix/__init__.pxd,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 +Cython/Includes/posix/mman.pxd,sha256=juJcLi92N9Bc6L2p4zrUmYQIgNmrTsZ6hExbl1181pc,3362 +Cython/Includes/posix/stat.pxd,sha256=ZOcPCpXnxlRRHcUkvg559hrFfB75uTbIYRWoQeyBCYs,1734 +Cython/Includes/posix/signal.pxd,sha256=wFJI5UthdtU9mZWjEBeZ9IIfeX252JVwDk2tsbW_q3U,1876 +Cython/Includes/posix/select.pxd,sha256=e4nhGHR8TRw6Xs9du5JoFtkd8U9sm3gX_BHq2FfmU6E,546 +Cython/Includes/libc/stddef.pxd,sha256=0rCyoocCfDL-1OQo3pxHQ-6fW20SAYktOLPoa4d97w8,164 +Cython/Includes/libc/stdio.pxd,sha256=qUaxEwNrQl1-4yHLorzzJZ-a-y5_-Rm_m7Z5meaRqH0,2476 +Cython/Includes/libc/limits.pxd,sha256=xHlIyuDIKpjqclvRRYzZIcfd5G1re5QtbmoDMqZR_Ec,621 +Cython/Includes/libc/float.pxd,sha256=IhvZJljpTG0fZtcIp7EBO2Sqddozxoxwj4RFNVcKLpY,966 +Cython/Includes/libc/time.pxd,sha256=-IRH7fTq3wKBKmQQnpZRhaLsnl7D_qXFz_4BLB9O3u0,1317 +Cython/Includes/libc/errno.pxd,sha256=j5hcKx7zinivU2b6SFMy8LZ9sJIQY5XLrp9cQUKv5AQ,2050 +Cython/Includes/libc/setjmp.pxd,sha256=XRh-gSuhvFLl0nRvz5OhSWYe9eqX2attAck3JI7mwa4,297 +Cython/Includes/libc/stdlib.pxd,sha256=p62xq2XfB24WfNCjRXgD6cOYoRuV47AnYijkjWv4ugE,2444 +Cython/Includes/libc/__init__.pxd,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 +Cython/Includes/libc/stdint.pxd,sha256=qHJXzpWCrbvJWSaHYZL27VJPupQreTZl9VGj0jgLdRU,3449 +Cython/Includes/libc/signal.pxd,sha256=XOScPDA5vzlfEmu4D7DFT1-5Eu3qMpYdUarjt-fqlbw,1170 +Cython/Includes/libc/math.pxd,sha256=51YUxSe01R96_rr3sj4n4MLW-eOmQbcwdNn8YthTxqg,2948 +Cython/Includes/libc/locale.pxd,sha256=sixG8EJ6wiVb0HIR1LWJ3lXTjTv463GJ9C_40HRovN4,1140 +Cython/Includes/libc/string.pxd,sha256=tzYGbRrnccedFLes-KGgJqM0FEtwHF_q4f2fqltNvyE,2038 +Cython/Includes/libcpp/forward_list.pxd,sha256=-So1ExEOkoPfsSdMlJSlI5665-zyWLMoUxlmm2Dlokk,2392 +Cython/Includes/libcpp/complex.pxd,sha256=IjL8y9sAglhGbTKhqsJbW0mgMTYEUbYM1ekr5VDhQgY,3012 +Cython/Includes/libcpp/pair.pxd,sha256=UBJXw43uHkDlNsr0Pu1aP5tZ-ILXhUAyOLam2qdWmZA,27 +Cython/Includes/libcpp/utility.pxd,sha256=hTbvp7c12pnU2yvzzMvflZB-MAc_--3xh3PXtD_VIwg,1040 +Cython/Includes/libcpp/limits.pxd,sha256=RKV3wPvk4tV_vX5CYQRJIK5m5xXav7SeBxltlLyk8es,1661 +Cython/Includes/libcpp/queue.pxd,sha256=FbL4Q7C3lgtZ2YzictU1XBXzQ7G-6y9i_7l2eqzA3Xc,649 +Cython/Includes/libcpp/iterator.pxd,sha256=mVc1rsAYfn_ARrdQ4JG-Ut5il5ynIa1CRXLk8Be8Zks,1432 +Cython/Includes/libcpp/memory.pxd,sha256=Hj20aSnmUTPAhFCrlmF_aeHJKiMiZ2bDKhaYn2yybJo,3600 +Cython/Includes/libcpp/set.pxd,sha256=3y5Ir2TjGD7g3VRvlkXV1a3V3ZYzJvwOAfeTv8ucOCw,2170 +Cython/Includes/libcpp/stack.pxd,sha256=zM3SQOqMWONVqud13ag3bUupA-ozU_YMq4Ad2QkL6fI,292 +Cython/Includes/libcpp/deque.pxd,sha256=aWqZ9j3OgQuqFLkqRO_U2FIwbSe2fKmmYDRAfD0vGqU,3106 +Cython/Includes/libcpp/vector.pxd,sha256=GYqLb74owhMmNQHUCcZSxGcYPgNuw6qULsfWKr7g6OQ,3350 +Cython/Includes/libcpp/__init__.pxd,sha256=PCx8ZRfOeoyMRu41PPlPY9uo2kZmt_7d0KR4Epzfe7c,94 +Cython/Includes/libcpp/functional.pxd,sha256=BXPYkffEOlKO1erTLqlkBLex6Gb5byDMF4hq_MZ2aVI,381 +Cython/Includes/libcpp/unordered_set.pxd,sha256=eUYSOMT5Gt8kZWCUKezQGyXWzatEyNg6-nmAlmcBo-k,2622 +Cython/Includes/libcpp/map.pxd,sha256=GF2sDnFBHZoU3Rcuo1rn6yKh45nhkX0_iH29xj581ow,2551 +Cython/Includes/libcpp/typeinfo.pxd,sha256=tITsqurrdaZjsEGFksem9xZtVhSxQRxHZxcoC-4Y-DY,304 +Cython/Includes/libcpp/algorithm.pxd,sha256=-2V0oR_cFbHHzeWT9RcfLvi5Oy-s_V2lO3OI6ZtX6fM,1770 +Cython/Includes/libcpp/unordered_map.pxd,sha256=eNna4hRAucQLnliBfEMu7Unfd_lB18I42iwKmsCO0-M,2867 +Cython/Includes/libcpp/string.pxd,sha256=zsvzyW6IggIDFqcF-UuLjxiNAHPtToAoc9VhKKG2U5A,8731 +Cython/Includes/libcpp/typeindex.pxd,sha256=mIHr5Mq6Lol0SlzqeK6w_giVERh3uAjZm78yPDLXzc4,524 +Cython/Includes/libcpp/cast.pxd,sha256=En4LBubdinfpm9Rel077tK_LGwg_3k4FAu9mlIbKjuw,501 +Cython/Includes/libcpp/list.pxd,sha256=rGQfB3_mDcRkGKtMBuvDQvAPmgzR5jxSf3eOSRgR4YA,2658 +Cython/Compiler/UtilityCode.py,sha256=PbQtJt9fSwgm5xeXgYWQih6eUSmJL_RwTxOa5T9SrZU,9391 +Cython/Compiler/Scanning.pxd,sha256=vjjPLZb5udPzMpk67DKojTTDUl31QU86oXyAMks7Hsw,2113 +Cython/Compiler/ParseTreeTransforms.pxd,sha256=oDSda3XYP79o8tCAxEm_epWWVPXSaPy8lYrprWYRyNk,2468 +Cython/Compiler/ParseTreeTransforms.py,sha256=cgiG6tvFHkavvL0bFEqKdv9VXz5BucRcgWZvDqSlB68,139102 +Cython/Compiler/Parsing.pxd,sha256=pL_EQdVWaw7EZVTZrxzMcUvoSJeAoXXPRh8kCLudysk,8984 +Cython/Compiler/Version.py,sha256=f2mS6aYYdu0DMRK3B4IuzMlCo-k-ffmehCao_vKlTdk,181 +Cython/Compiler/AutoDocTransforms.py,sha256=le7k-xhGWDkvpRXRppZsqhJzkav6i41GmAOmDetxVmk,7517 +Cython/Compiler/DebugFlags.py,sha256=5Zg9ETp0qPFEma6QMtrGUwu9Fn6NTYMBMWPI_GxFW0A,623 +Cython/Compiler/StringEncoding.py,sha256=dn3jVSL4JScbeYf1f56j5RJR9M58AnCDdJObC-cc3fg,10812 +Cython/Compiler/Options.py,sha256=ryrLc_NNo0QSMaP-jHhmo1L2oZJA6h7KpE6xs_KSyUo,19707 +Cython/Compiler/FlowControl.cpython-39-x86_64-linux-gnu.so,sha256=BTJE8oBoQ2wG7juYWmB5OaqAJ0mNWONjmmH0qqU0yfU,675856 +Cython/Compiler/Parsing.py,sha256=u_5SWON1ws-S_5cCw1xXmZdgxTlLWfTxFAJJEbXX7m8,129791 +Cython/Compiler/CythonScope.py,sha256=mNwmE509uePmR3S2djg3Dq6zOZ3hgK-U8NDeawys9WM,6027 +Cython/Compiler/CodeGeneration.py,sha256=jkcx2uX07nck0UZSgysIThRuJiPbdkSeXR4Z2uzbQU8,1108 +Cython/Compiler/Scanning.cpython-39-x86_64-linux-gnu.so,sha256=HliOLuiHxkR8XBjyDu0NaBrzX94IKWOz7UL-SjF-Q6Q,310616 +Cython/Compiler/Builtin.py,sha256=fdR58NDTWNQWO3tA0JtAzUq9JfXL6pJdEOSHTcz6BZA,22469 +Cython/Compiler/Nodes.py,sha256=oxBksQ2XS6paSKsaEGZlxxS3WEiYJSBMDTxIaNH_wCg,391390 +Cython/Compiler/Optimize.py,sha256=W01lBStxLyXYYRhBUZrr-PZYyfyl9KgY3KPvriVXf8U,210273 +Cython/Compiler/Code.pxd,sha256=XEZU44jXCOFoYTG15-R0X41krTrjpuo1wxRKjyzYwoY,3354 +Cython/Compiler/ModuleNode.py,sha256=n2s-hf3IegF4n32np8l8Lg-EBPNK39K1_FmNdqRdJk4,142244 +Cython/Compiler/Main.py,sha256=_b1cDedgPRDFy4sN7-FZsKx5qbcD4XTefhD9qZwlgWQ,36488 +Cython/Compiler/Visitor.py,sha256=iqtIsNaQwk8lSa6g_LnEU06CZtdnP7MDXbyodl4Ouwk,29984 +Cython/Compiler/UtilNodes.py,sha256=mS6jlZ530p17WGU0ApbwvLecuByT18LFipVrKJg5jrM,11636 +Cython/Compiler/TypeInference.py,sha256=s-GKZcq16KPPgY_OpF8cTlQmX1Cpu-qBMCtmAYDg8fc,22326 +Cython/Compiler/Naming.py,sha256=Z6FLRoOl21F91SMoIoMSu_CqYosGhxDJLO9grYSHhVI,6333 +Cython/Compiler/PyrexTypes.py,sha256=-nGJxm5amgIjkfvBpQFeSLn8zS2fi_cBvOtgBIfr5F8,173958 +Cython/Compiler/FlowControl.py,sha256=-I33Yd9sp1RCENjFkrufBM8Xrj3y5SI7KZ04Vz5Djiw,45981 +Cython/Compiler/AnalysedTreeTransforms.py,sha256=T2r1SLFeG7a4D9tt93hm8YRH_aGLwmK82PNpb1RsbnE,3826 +Cython/Compiler/Code.py,sha256=sOh_jtyZaRsT38QKKXS1wojqYeVa_u7XSlIr94B1_A8,97242 +Cython/Compiler/Buffer.py,sha256=6-YIUiLWtgpC2LRhs7116umzNiEbzA6cz1lnPkSEn30,29035 +Cython/Compiler/Visitor.pxd,sha256=KvOZgHoEREMTVYXr1ZoAk9H4n__rpmhIwE2S11ajeYM,1792 +Cython/Compiler/Lexicon.py,sha256=Cw_wIfQymcTEdkoo82V2xbV8kvCp30O-Pc7qF4hbfCI,4855 +Cython/Compiler/Pythran.py,sha256=NHIml0yx0jPLyTLRAHXZr0LHTyEyfYqspgYuV4vdNKI,7267 +Cython/Compiler/Annotate.py,sha256=bkVgdH3ItuIbaSpi9Qo5bKiIjOX3-J5sZORfcyk_eZY,12950 +Cython/Compiler/__init__.py,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 +Cython/Compiler/Visitor.cpython-39-x86_64-linux-gnu.so,sha256=7rFfAfOG_gwXWbbeUY8HHKXnspaw16NAaadZnl7NV2w,367904 +Cython/Compiler/Scanning.py,sha256=Gl7sU5rI-5H5v8z9QLZBh1hivS2cOGa9H878QdEpUU4,18438 +Cython/Compiler/CmdLine.py,sha256=cRwX-QUfBCVmGXxVKKAeF2CHKiLVtjH4QRGMGaBRmkI,9939 +Cython/Compiler/Future.py,sha256=GwcWZ_Vti0atfbOARfS2kIvZOvRuPu38wbShIn4o4kA,587 +Cython/Compiler/Errors.py,sha256=GATz9x6onls09cM6TeDw3kdBgdCxUiKJBILwukBF6WI,7554 +Cython/Compiler/TreePath.py,sha256=3_lScMAd2Sly2ekZ8HO8dyZstGSruINl2MXXq9OYd2Q,7641 +Cython/Compiler/Symtab.py,sha256=n0tdTnbPkSuU5EgPkr6nGBN98Lhbklbjt8o6NUFt264,111727 +Cython/Compiler/TypeSlots.py,sha256=zvQrFMKa6Pzk8jB187PuqFhdJUa82SQ1thztSV1ArhI,37837 +Cython/Compiler/MemoryView.py,sha256=c6J7PtQ6wccb9uBxvbLngia4jO-h2uea7viIzJNhDYU,30009 +Cython/Compiler/ExprNodes.py,sha256=qsOOc1fQyPtGp89dTTnmfXaO_KppGtaCdw1Ljh47Vo4,549114 +Cython/Compiler/FusedNode.cpython-39-x86_64-linux-gnu.so,sha256=u8df1HOyMIVQOlTjh4pjUTm7pJUoagUF-mtsq-QeMSs,465704 +Cython/Compiler/Interpreter.py,sha256=iNweexX2HDI5nZj2rzkW-lw9Rq3gzM__P7SBqH3uxbU,2106 +Cython/Compiler/FusedNode.py,sha256=qmHVHylEPpllK_x-471xBG-zMzAt0RF52tLxt_-RZqs,37794 +Cython/Compiler/FlowControl.pxd,sha256=W8bqGCJLzvAhnL3d1OF8798ZDJg0QI0eA_ebnA4dkoQ,2918 +Cython/Compiler/TreeFragment.py,sha256=jQn4Lp2dNddJ-tjPquoFcyTcX9EIuTAbZKZAKs9-cGU,9408 +Cython/Compiler/Pipeline.py,sha256=6ravd0QCR5sCoKlz9HEz209A2UqgLp4Qp0VysoKa_mI,14061 +Cython/Compiler/Tests/TestStringEncoding.py,sha256=RL1YDXrOUe1sPLEbWmTJQ5VF-uEZ_KLz0jaeQoMx85k,2315 +Cython/Compiler/Tests/TestGrammar.py,sha256=zWMvYG19nIH85Le8ragXt2vLBlWlGGNeMgrTdQO5JGM,3443 +Cython/Compiler/Tests/TestParseTreeTransforms.py,sha256=CorKAgH9tdoehstG6vBAbdpUhaPdN8EW277KMWNR4Uw,8503 +Cython/Compiler/Tests/TestBuffer.py,sha256=yw-KUu2pu4CnsqYaqxj5rpyYodmjJSEqUvQNxLwPL8I,4155 +Cython/Compiler/Tests/TestVisitor.py,sha256=QAnBpUhnirSFKqXWiawo-OhXhxIRTQidWxEzGjJDz6M,2228 +Cython/Compiler/Tests/TestTypes.py,sha256=YuFib5WCJfSPafrhy5yrCUdwajYw61yGPo4HveTyzUs,669 +Cython/Compiler/Tests/TestSignatureMatching.py,sha256=qMiQZeg5_Eu8VfCY_lMawqpjpKNV0r6p6-9czKec1aY,3338 +Cython/Compiler/Tests/TestTreePath.py,sha256=x-2KBIhSE6-vT-2BPe2q-zaa1oHtc42ibKzVs_y8_So,4238 +Cython/Compiler/Tests/__init__.py,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 +Cython/Compiler/Tests/TestFlowControl.py,sha256=ge3iqBor6xe5MLaLbOtw7ETntJnAh8EequF1aetVzMw,1848 +Cython/Compiler/Tests/TestUtilityLoad.py,sha256=Uzf4_bOjha-zwQaikNbsAOVQs3ZPX3YD7QQ5T4s66YY,3341 +Cython/Compiler/Tests/TestMemView.py,sha256=yBAQ5tN8DVPTFRJ81dAzOepCt5Ly6fiaAssQve5ryy4,2515 +Cython/Compiler/Tests/TestCmdLine.py,sha256=wBtbNserRsU4_Yj_0W6cujG-07PkwORT-r1Z3oLHmcU,4414 +Cython/Compiler/Tests/TestTreeFragment.py,sha256=wHlnF0ApwxeITx9pzg46P9N_2lM-7mrPwhDeNlIQnXM,2206 +Cython/Runtime/__init__.py,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 +Cython/Runtime/refnanny.cpython-39-x86_64-linux-gnu.so,sha256=g36WxQJSIIDoFeLqpPau6NdHmXjZfdak5ip6AYu6CUs,85168 +Cython/Runtime/refnanny.pyx,sha256=f2p1_0YxK25lm8Qfsu2ytvl0Im7GYyix1Q9krEBwC6c,6279 +Cython/Tests/TestCodeWriter.py,sha256=qKad43J3hN7PLp7mVbEDESt96qsk8y3ELRwwIp9jnNw,2316 +Cython/Tests/xmlrunner.py,sha256=N1Z_C4Q_rSWFNQxm3L99qX-SaIWEksXbmfXOd_srg3s,14801 +Cython/Tests/TestCythonUtils.py,sha256=XF4Fw4J5HZ4jUPLVv7ea8ZZcl2i9yXn5cx27WTtrcmU,474 +Cython/Tests/__init__.py,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 +Cython/Tests/TestStringIOTree.py,sha256=vTuu3z32WTcmJaf0fBq62NMghYtaPL2rRnfdl2WM--4,1946 +Cython/Tests/TestJediTyper.py,sha256=F6MUG8SdzGXQwkbw6Wv1PqVlmlIT1z_7lH2buVOFT_I,6996 +Cython/Debugger/libcython.py,sha256=Qs0qGzeUyeY___3jRDy_WWIDFGfSRH4al7On2XxkuNg,44949 +Cython/Debugger/libpython.py,sha256=IyTEdtGLnpQmt2XPgZ7oskQ8qGWWV2_5TMgZ5NhTA0k,90489 +Cython/Debugger/DebugWriter.py,sha256=Yzz28JR4qZepxvxeu_1rJxIjJ4JbNQm5vM5e_UtNuRo,1945 +Cython/Debugger/__init__.py,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 +Cython/Debugger/Cygdb.py,sha256=CH_pXm0Jhl4SAe6sJXa5NS47vMmQ2KBbecyV56vLqFE,5751 +Cython/Debugger/Tests/TestLibCython.py,sha256=xrENLEahnp6WtOfokVtsALR6Ot2jFR6T5ZZRcaX0Vxk,8327 +Cython/Debugger/Tests/test_libcython_in_gdb.py,sha256=EvPTYkd7nzR3JtFim-ASLI6wfcYhgWfI4BQrucLJbHY,15804 +Cython/Debugger/Tests/cfuncs.c,sha256=4SZurmnz5J1SiIs9N26Eu4zc2wvF_qMEKaN0eTcbDPo,71 +Cython/Debugger/Tests/codefile,sha256=ugwpT9GPtYZIKe2Xco4PqikyA-poQAeYfE0icXmfb44,641 +Cython/Debugger/Tests/test_libpython_in_gdb.py,sha256=1BD_FtMkmS4SoSQZq7MgAgDnvqIw3EcYZFVrtoCQmxo,4079 +Cython/Debugger/Tests/__init__.py,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 +Cython/Build/BuildExecutable.py,sha256=9wjcOncQpbCT_Pu2Ljj5jufFLSY6T_oHOFt0uXYTdRk,4318 +Cython/Build/Cythonize.py,sha256=OBSutgd93PXiRi5_6GRuhpfMZehw9YOfRgt1mxi6QLk,8359 +Cython/Build/Dependencies.py,sha256=SkMflfSEXLlyGdkQ0xLMY7zMMoBxq4VgfPyN_BUSvTQ,50391 +Cython/Build/IpythonMagic.py,sha256=j-E-JJYGj03ceWDp5SRmyK-WxyroRkNOEQODA9rCfFc,21126 +Cython/Build/__init__.py,sha256=zBhW6hT9Mwk1ZybfuPi61iCa6A4srId1HJz9OiEd07o,69 +Cython/Build/Distutils.py,sha256=iO5tPX84Kc-ZWMocfuQbl_PqyC9HGGIRS-NiKI60-ZE,49 +Cython/Build/Inline.py,sha256=wd5_xBOup8MWxNtv5uwWgWWG5GrkShYysMMluY7ripE,13451 +Cython/Build/Tests/TestIpythonMagic.py,sha256=H88J6_r3dP5V3-N7eSKZuE2l9G8BtkFF_o8wY7pifKU,6225 +Cython/Build/Tests/TestInline.py,sha256=bp4XGXZYSyxY2zXI0q4bg58a0ARsclUzXSfWykn0dZw,2854 +Cython/Build/Tests/TestStripLiterals.py,sha256=-QeUd22OnoL50rW2EgpfIA01UzRMutcBA5NrhkHiE7M,1550 +Cython/Build/Tests/TestCyCache.py,sha256=olOvphv4q1CLsNzMAhgmXnL77zhGGQKuKbYs_iSFFvA,4151 +Cython/Build/Tests/__init__.py,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 +Cython/Plex/Regexps.py,sha256=qaP-Fr-GgKNmBVsMyXO3ltl2HH1JQcQiFmX2oyUyeOA,16208 +Cython/Plex/Timing.py,sha256=-VgQveS-Ip_2ErjrVxh4w7cXpyVBkUaSaiLadyD3bw0,472 +Cython/Plex/Lexicons.py,sha256=ay3yy9fqI5y5lfgpJ4ubBjYZQ53gFDVgNGbmoSl5DxI,6907 +Cython/Plex/Scanners.cpython-39-x86_64-linux-gnu.so,sha256=PdO2JIzpfrU716YK1iLWYQ2qa-QAtEjfe_pEERr6DeU,111960 +Cython/Plex/Traditional.py,sha256=cAT-pZnqIwCJaqgSqgKODSznFZ5DunUw_MLWx8Y650c,4120 +Cython/Plex/Actions.cpython-39-x86_64-linux-gnu.so,sha256=zjycWVB0TAP37001dqkMmkmoKXBB98GfOHg8vIo-E8g,73752 +Cython/Plex/Transitions.py,sha256=Tvp7cFXR3ZBPPHm0TAhUMC_-uiRR9YdOkF4t0wtk-f0,7187 +Cython/Plex/Actions.pxd,sha256=FC-6ffzWR4i3rR6VSL2C64Xxs1qBhpBEzRsU7WpLn1Y,585 +Cython/Plex/Machines.py,sha256=bIKg3-yxD_r7x-zEowJ7EsPBWlgXm_XhIozqsLQBeTk,7760 +Cython/Plex/__init__.py,sha256=dvMeQpSyZE75W0gkf4Xo5LAxgQLNhkAXiQoIOtcOkZ0,1282 +Cython/Plex/Errors.py,sha256=As5uuGmqZe4w0B7Dm981lZTnDG-nlXSHYqiGUKnhrrY,1169 +Cython/Plex/Scanners.py,sha256=-TXAxKW43ZbQNCSEkMWEJ0SmqYVVCkSOT9UngOCRZnQ,12259 +Cython/Plex/Actions.py,sha256=Caxkx8Kup9m4sx24ZcDTq-fAfPGG06TAHu2NI1D9zPs,2545 +Cython/Plex/DFA.py,sha256=w4vl2ejXv6ptILtkTCbB8NcvF8ylwc6DaQ2gPFrWuo4,6012 +Cython/Plex/Scanners.pxd,sha256=oSfcDUZ3syc2ag73udwU5xoaIGDxiNd8a2F_LLw5PzY,1481 diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/WHEEL b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/WHEEL new file mode 100644 index 00000000000..81aea1b9e2e --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/WHEEL @@ -0,0 +1,7 @@ +Wheel-Version: 1.0 +Generator: bdist_wheel (0.37.1) +Root-Is-Purelib: false +Tag: cp39-cp39-manylinux_2_17_x86_64 +Tag: cp39-cp39-manylinux2014_x86_64 +Tag: cp39-cp39-manylinux_2_24_x86_64 + diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/entry_points.txt b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/entry_points.txt new file mode 100644 index 00000000000..f8b3914454c --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/entry_points.txt @@ -0,0 +1,4 @@ +[console_scripts] +cygdb = Cython.Debugger.Cygdb:main +cython = Cython.Compiler.Main:setuptools_main +cythonize = Cython.Build.Cythonize:main diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/top_level.txt b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/top_level.txt new file mode 100644 index 00000000000..48cccd7fc20 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/top_level.txt @@ -0,0 +1,3 @@ +Cython +cython +pyximport diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/cython.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/cython.py new file mode 100644 index 00000000000..9283c4d9e5e --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/cython.py @@ -0,0 +1,24 @@ +#!/usr/bin/env python + +# +# Cython -- Main Program, generic +# + +if __name__ == '__main__': + + import os + import sys + + # Make sure we import the right Cython + cythonpath, _ = os.path.split(os.path.realpath(__file__)) + sys.path.insert(0, cythonpath) + + from Cython.Compiler.Main import main + main(command_line = 1) + +else: + # Void cython.* directives. + from Cython.Shadow import * + ## and bring in the __version__ + from Cython import __version__ + from Cython import load_ipython_extension diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/__init__.py new file mode 100644 index 00000000000..378c42281f9 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/__init__.py @@ -0,0 +1,4 @@ +from .pyximport import * + +# replicate docstring +from .pyximport import __doc__ diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/pyxbuild.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/pyxbuild.py new file mode 100644 index 00000000000..de4a2241f91 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/pyxbuild.py @@ -0,0 +1,160 @@ +"""Build a Pyrex file from .pyx source to .so loadable module using +the installed distutils infrastructure. Call: + +out_fname = pyx_to_dll("foo.pyx") +""" +import os +import sys + +from distutils.errors import DistutilsArgError, DistutilsError, CCompilerError +from distutils.extension import Extension +from distutils.util import grok_environment_error +try: + from Cython.Distutils.old_build_ext import old_build_ext as build_ext + HAS_CYTHON = True +except ImportError: + HAS_CYTHON = False + +DEBUG = 0 + +_reloads={} + + +def pyx_to_dll(filename, ext=None, force_rebuild=0, build_in_temp=False, pyxbuild_dir=None, + setup_args=None, reload_support=False, inplace=False): + """Compile a PYX file to a DLL and return the name of the generated .so + or .dll .""" + assert os.path.exists(filename), "Could not find %s" % os.path.abspath(filename) + + path, name = os.path.split(os.path.abspath(filename)) + + if not ext: + modname, extension = os.path.splitext(name) + assert extension in (".pyx", ".py"), extension + if not HAS_CYTHON: + filename = filename[:-len(extension)] + '.c' + ext = Extension(name=modname, sources=[filename]) + + if setup_args is None: + setup_args = {} + if not pyxbuild_dir: + pyxbuild_dir = os.path.join(path, "_pyxbld") + + package_base_dir = path + for package_name in ext.name.split('.')[-2::-1]: + package_base_dir, pname = os.path.split(package_base_dir) + if pname != package_name: + # something is wrong - package path doesn't match file path + package_base_dir = None + break + + script_args=setup_args.get("script_args",[]) + if DEBUG or "--verbose" in script_args: + quiet = "--verbose" + else: + quiet = "--quiet" + args = [quiet, "build_ext"] + if force_rebuild: + args.append("--force") + if inplace and package_base_dir: + args.extend(['--build-lib', package_base_dir]) + if ext.name == '__init__' or ext.name.endswith('.__init__'): + # package => provide __path__ early + if not hasattr(ext, 'cython_directives'): + ext.cython_directives = {'set_initial_path' : 'SOURCEFILE'} + elif 'set_initial_path' not in ext.cython_directives: + ext.cython_directives['set_initial_path'] = 'SOURCEFILE' + + if HAS_CYTHON and build_in_temp: + args.append("--pyrex-c-in-temp") + sargs = setup_args.copy() + sargs.update({ + "script_name": None, + "script_args": args + script_args, + }) + # late import, in case setuptools replaced it + from distutils.dist import Distribution + dist = Distribution(sargs) + if not dist.ext_modules: + dist.ext_modules = [] + dist.ext_modules.append(ext) + if HAS_CYTHON: + dist.cmdclass = {'build_ext': build_ext} + build = dist.get_command_obj('build') + build.build_base = pyxbuild_dir + + cfgfiles = dist.find_config_files() + dist.parse_config_files(cfgfiles) + + try: + ok = dist.parse_command_line() + except DistutilsArgError: + raise + + if DEBUG: + print("options (after parsing command line):") + dist.dump_option_dicts() + assert ok + + + try: + obj_build_ext = dist.get_command_obj("build_ext") + dist.run_commands() + so_path = obj_build_ext.get_outputs()[0] + if obj_build_ext.inplace: + # Python distutils get_outputs()[ returns a wrong so_path + # when --inplace ; see http://bugs.python.org/issue5977 + # workaround: + so_path = os.path.join(os.path.dirname(filename), + os.path.basename(so_path)) + if reload_support: + org_path = so_path + timestamp = os.path.getmtime(org_path) + global _reloads + last_timestamp, last_path, count = _reloads.get(org_path, (None,None,0) ) + if last_timestamp == timestamp: + so_path = last_path + else: + basename = os.path.basename(org_path) + while count < 100: + count += 1 + r_path = os.path.join(obj_build_ext.build_lib, + basename + '.reload%s'%count) + try: + import shutil # late import / reload_support is: debugging + try: + # Try to unlink first --- if the .so file + # is mmapped by another process, + # overwriting its contents corrupts the + # loaded image (on Linux) and crashes the + # other process. On Windows, unlinking an + # open file just fails. + if os.path.isfile(r_path): + os.unlink(r_path) + except OSError: + continue + shutil.copy2(org_path, r_path) + so_path = r_path + except IOError: + continue + break + else: + # used up all 100 slots + raise ImportError("reload count for %s reached maximum"%org_path) + _reloads[org_path]=(timestamp, so_path, count) + return so_path + except KeyboardInterrupt: + sys.exit(1) + except (IOError, os.error): + exc = sys.exc_info()[1] + error = grok_environment_error(exc) + + if DEBUG: + sys.stderr.write(error + "\n") + raise + + +if __name__=="__main__": + pyx_to_dll("dummy.pyx") + from . import test + diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/pyximport.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/pyximport.py new file mode 100644 index 00000000000..5628f301b19 --- /dev/null +++ b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/pyximport.py @@ -0,0 +1,602 @@ +""" +Import hooks; when installed with the install() function, these hooks +allow importing .pyx files as if they were Python modules. + +If you want the hook installed every time you run Python +you can add it to your Python version by adding these lines to +sitecustomize.py (which you can create from scratch in site-packages +if it doesn't exist there or somewhere else on your python path):: + + import pyximport + pyximport.install() + +For instance on the Mac with a non-system Python 2.3, you could create +sitecustomize.py with only those two lines at +/usr/local/lib/python2.3/site-packages/sitecustomize.py . + +A custom distutils.core.Extension instance and setup() args +(Distribution) for for the build can be defined by a .pyxbld +file like: + +# examplemod.pyxbld +def make_ext(modname, pyxfilename): + from distutils.extension import Extension + return Extension(name = modname, + sources=[pyxfilename, 'hello.c'], + include_dirs=['/myinclude'] ) +def make_setup_args(): + return dict(script_args=["--compiler=mingw32"]) + +Extra dependencies can be defined by a .pyxdep . +See README. + +Since Cython 0.11, the :mod:`pyximport` module also has experimental +compilation support for normal Python modules. This allows you to +automatically run Cython on every .pyx and .py module that Python +imports, including parts of the standard library and installed +packages. Cython will still fail to compile a lot of Python modules, +in which case the import mechanism will fall back to loading the +Python source modules instead. The .py import mechanism is installed +like this:: + + pyximport.install(pyimport = True) + +Running this module as a top-level script will run a test and then print +the documentation. + +This code is based on the Py2.3+ import protocol as described in PEP 302. +""" + +import glob +import imp +import os +import sys +from zipimport import zipimporter, ZipImportError + +mod_name = "pyximport" + +PYX_EXT = ".pyx" +PYXDEP_EXT = ".pyxdep" +PYXBLD_EXT = ".pyxbld" + +DEBUG_IMPORT = False + + +def _print(message, args): + if args: + message = message % args + print(message) + + +def _debug(message, *args): + if DEBUG_IMPORT: + _print(message, args) + + +def _info(message, *args): + _print(message, args) + + +# Performance problem: for every PYX file that is imported, we will +# invoke the whole distutils infrastructure even if the module is +# already built. It might be more efficient to only do it when the +# mod time of the .pyx is newer than the mod time of the .so but +# the question is how to get distutils to tell me the name of the .so +# before it builds it. Maybe it is easy...but maybe the performance +# issue isn't real. +def _load_pyrex(name, filename): + "Load a pyrex file given a name and filename." + + +def get_distutils_extension(modname, pyxfilename, language_level=None): +# try: +# import hashlib +# except ImportError: +# import md5 as hashlib +# extra = "_" + hashlib.md5(open(pyxfilename).read()).hexdigest() +# modname = modname + extra + extension_mod,setup_args = handle_special_build(modname, pyxfilename) + if not extension_mod: + if not isinstance(pyxfilename, str): + # distutils is stupid in Py2 and requires exactly 'str' + # => encode accidentally coerced unicode strings back to str + pyxfilename = pyxfilename.encode(sys.getfilesystemencoding()) + from distutils.extension import Extension + extension_mod = Extension(name = modname, sources=[pyxfilename]) + if language_level is not None: + extension_mod.cython_directives = {'language_level': language_level} + return extension_mod,setup_args + + +def handle_special_build(modname, pyxfilename): + special_build = os.path.splitext(pyxfilename)[0] + PYXBLD_EXT + ext = None + setup_args={} + if os.path.exists(special_build): + # globls = {} + # locs = {} + # execfile(special_build, globls, locs) + # ext = locs["make_ext"](modname, pyxfilename) + mod = imp.load_source("XXXX", special_build, open(special_build)) + make_ext = getattr(mod,'make_ext',None) + if make_ext: + ext = make_ext(modname, pyxfilename) + assert ext and ext.sources, "make_ext in %s did not return Extension" % special_build + make_setup_args = getattr(mod, 'make_setup_args',None) + if make_setup_args: + setup_args = make_setup_args() + assert isinstance(setup_args,dict), ("make_setup_args in %s did not return a dict" + % special_build) + assert set or setup_args, ("neither make_ext nor make_setup_args %s" + % special_build) + ext.sources = [os.path.join(os.path.dirname(special_build), source) + for source in ext.sources] + return ext, setup_args + + +def handle_dependencies(pyxfilename): + testing = '_test_files' in globals() + dependfile = os.path.splitext(pyxfilename)[0] + PYXDEP_EXT + + # by default let distutils decide whether to rebuild on its own + # (it has a better idea of what the output file will be) + + # but we know more about dependencies so force a rebuild if + # some of the dependencies are newer than the pyxfile. + if os.path.exists(dependfile): + depends = open(dependfile).readlines() + depends = [depend.strip() for depend in depends] + + # gather dependencies in the "files" variable + # the dependency file is itself a dependency + files = [dependfile] + for depend in depends: + fullpath = os.path.join(os.path.dirname(dependfile), + depend) + files.extend(glob.glob(fullpath)) + + # only for unit testing to see we did the right thing + if testing: + _test_files[:] = [] #$pycheck_no + + # if any file that the pyxfile depends upon is newer than + # the pyx file, 'touch' the pyx file so that distutils will + # be tricked into rebuilding it. + for file in files: + from distutils.dep_util import newer + if newer(file, pyxfilename): + _debug("Rebuilding %s because of %s", pyxfilename, file) + filetime = os.path.getmtime(file) + os.utime(pyxfilename, (filetime, filetime)) + if testing: + _test_files.append(file) + + +def build_module(name, pyxfilename, pyxbuild_dir=None, inplace=False, language_level=None): + assert os.path.exists(pyxfilename), "Path does not exist: %s" % pyxfilename + handle_dependencies(pyxfilename) + + extension_mod, setup_args = get_distutils_extension(name, pyxfilename, language_level) + build_in_temp = pyxargs.build_in_temp + sargs = pyxargs.setup_args.copy() + sargs.update(setup_args) + build_in_temp = sargs.pop('build_in_temp',build_in_temp) + + from . import pyxbuild + so_path = pyxbuild.pyx_to_dll(pyxfilename, extension_mod, + build_in_temp=build_in_temp, + pyxbuild_dir=pyxbuild_dir, + setup_args=sargs, + inplace=inplace, + reload_support=pyxargs.reload_support) + assert os.path.exists(so_path), "Cannot find: %s" % so_path + + junkpath = os.path.join(os.path.dirname(so_path), name+"_*") #very dangerous with --inplace ? yes, indeed, trying to eat my files ;) + junkstuff = glob.glob(junkpath) + for path in junkstuff: + if path != so_path: + try: + os.remove(path) + except IOError: + _info("Couldn't remove %s", path) + + return so_path + + +def load_module(name, pyxfilename, pyxbuild_dir=None, is_package=False, + build_inplace=False, language_level=None, so_path=None): + try: + if so_path is None: + if is_package: + module_name = name + '.__init__' + else: + module_name = name + so_path = build_module(module_name, pyxfilename, pyxbuild_dir, + inplace=build_inplace, language_level=language_level) + mod = imp.load_dynamic(name, so_path) + if is_package and not hasattr(mod, '__path__'): + mod.__path__ = [os.path.dirname(so_path)] + assert mod.__file__ == so_path, (mod.__file__, so_path) + except Exception: + if pyxargs.load_py_module_on_import_failure and pyxfilename.endswith('.py'): + # try to fall back to normal import + mod = imp.load_source(name, pyxfilename) + assert mod.__file__ in (pyxfilename, pyxfilename+'c', pyxfilename+'o'), (mod.__file__, pyxfilename) + else: + tb = sys.exc_info()[2] + import traceback + exc = ImportError("Building module %s failed: %s" % ( + name, traceback.format_exception_only(*sys.exc_info()[:2]))) + if sys.version_info[0] >= 3: + raise exc.with_traceback(tb) + else: + exec("raise exc, None, tb", {'exc': exc, 'tb': tb}) + return mod + + +# import hooks + +class PyxImporter(object): + """A meta-path importer for .pyx files. + """ + def __init__(self, extension=PYX_EXT, pyxbuild_dir=None, inplace=False, + language_level=None): + self.extension = extension + self.pyxbuild_dir = pyxbuild_dir + self.inplace = inplace + self.language_level = language_level + + def find_module(self, fullname, package_path=None): + if fullname in sys.modules and not pyxargs.reload_support: + return None # only here when reload() + + # package_path might be a _NamespacePath. Convert that into a list... + if package_path is not None and not isinstance(package_path, list): + package_path = list(package_path) + try: + fp, pathname, (ext,mode,ty) = imp.find_module(fullname,package_path) + if fp: fp.close() # Python should offer a Default-Loader to avoid this double find/open! + if pathname and ty == imp.PKG_DIRECTORY: + pkg_file = os.path.join(pathname, '__init__'+self.extension) + if os.path.isfile(pkg_file): + return PyxLoader(fullname, pathname, + init_path=pkg_file, + pyxbuild_dir=self.pyxbuild_dir, + inplace=self.inplace, + language_level=self.language_level) + if pathname and pathname.endswith(self.extension): + return PyxLoader(fullname, pathname, + pyxbuild_dir=self.pyxbuild_dir, + inplace=self.inplace, + language_level=self.language_level) + if ty != imp.C_EXTENSION: # only when an extension, check if we have a .pyx next! + return None + + # find .pyx fast, when .so/.pyd exist --inplace + pyxpath = os.path.splitext(pathname)[0]+self.extension + if os.path.isfile(pyxpath): + return PyxLoader(fullname, pyxpath, + pyxbuild_dir=self.pyxbuild_dir, + inplace=self.inplace, + language_level=self.language_level) + + # .so/.pyd's on PATH should not be remote from .pyx's + # think no need to implement PyxArgs.importer_search_remote here? + + except ImportError: + pass + + # searching sys.path ... + + #if DEBUG_IMPORT: print "SEARCHING", fullname, package_path + + mod_parts = fullname.split('.') + module_name = mod_parts[-1] + pyx_module_name = module_name + self.extension + + # this may work, but it returns the file content, not its path + #import pkgutil + #pyx_source = pkgutil.get_data(package, pyx_module_name) + + paths = package_path or sys.path + for path in paths: + pyx_data = None + if not path: + path = os.getcwd() + elif os.path.isfile(path): + try: + zi = zipimporter(path) + pyx_data = zi.get_data(pyx_module_name) + except (ZipImportError, IOError, OSError): + continue # Module not found. + # unzip the imported file into the build dir + # FIXME: can interfere with later imports if build dir is in sys.path and comes before zip file + path = self.pyxbuild_dir + elif not os.path.isabs(path): + path = os.path.abspath(path) + + pyx_module_path = os.path.join(path, pyx_module_name) + if pyx_data is not None: + if not os.path.exists(path): + try: + os.makedirs(path) + except OSError: + # concurrency issue? + if not os.path.exists(path): + raise + with open(pyx_module_path, "wb") as f: + f.write(pyx_data) + elif not os.path.isfile(pyx_module_path): + continue # Module not found. + + return PyxLoader(fullname, pyx_module_path, + pyxbuild_dir=self.pyxbuild_dir, + inplace=self.inplace, + language_level=self.language_level) + + # not found, normal package, not a .pyx file, none of our business + _debug("%s not found" % fullname) + return None + + +class PyImporter(PyxImporter): + """A meta-path importer for normal .py files. + """ + def __init__(self, pyxbuild_dir=None, inplace=False, language_level=None): + if language_level is None: + language_level = sys.version_info[0] + self.super = super(PyImporter, self) + self.super.__init__(extension='.py', pyxbuild_dir=pyxbuild_dir, inplace=inplace, + language_level=language_level) + self.uncompilable_modules = {} + self.blocked_modules = ['Cython', 'pyxbuild', 'pyximport.pyxbuild', + 'distutils.extension', 'distutils.sysconfig'] + + def find_module(self, fullname, package_path=None): + if fullname in sys.modules: + return None + if fullname.startswith('Cython.'): + return None + if fullname in self.blocked_modules: + # prevent infinite recursion + return None + if _lib_loader.knows(fullname): + return _lib_loader + _debug("trying import of module '%s'", fullname) + if fullname in self.uncompilable_modules: + path, last_modified = self.uncompilable_modules[fullname] + try: + new_last_modified = os.stat(path).st_mtime + if new_last_modified > last_modified: + # import would fail again + return None + except OSError: + # module is no longer where we found it, retry the import + pass + + self.blocked_modules.append(fullname) + try: + importer = self.super.find_module(fullname, package_path) + if importer is not None: + if importer.init_path: + path = importer.init_path + real_name = fullname + '.__init__' + else: + path = importer.path + real_name = fullname + _debug("importer found path %s for module %s", path, real_name) + try: + so_path = build_module( + real_name, path, + pyxbuild_dir=self.pyxbuild_dir, + language_level=self.language_level, + inplace=self.inplace) + _lib_loader.add_lib(fullname, path, so_path, + is_package=bool(importer.init_path)) + return _lib_loader + except Exception: + if DEBUG_IMPORT: + import traceback + traceback.print_exc() + # build failed, not a compilable Python module + try: + last_modified = os.stat(path).st_mtime + except OSError: + last_modified = 0 + self.uncompilable_modules[fullname] = (path, last_modified) + importer = None + finally: + self.blocked_modules.pop() + return importer + + +class LibLoader(object): + def __init__(self): + self._libs = {} + + def load_module(self, fullname): + try: + source_path, so_path, is_package = self._libs[fullname] + except KeyError: + raise ValueError("invalid module %s" % fullname) + _debug("Loading shared library module '%s' from %s", fullname, so_path) + return load_module(fullname, source_path, so_path=so_path, is_package=is_package) + + def add_lib(self, fullname, path, so_path, is_package): + self._libs[fullname] = (path, so_path, is_package) + + def knows(self, fullname): + return fullname in self._libs + +_lib_loader = LibLoader() + + +class PyxLoader(object): + def __init__(self, fullname, path, init_path=None, pyxbuild_dir=None, + inplace=False, language_level=None): + _debug("PyxLoader created for loading %s from %s (init path: %s)", + fullname, path, init_path) + self.fullname = fullname + self.path, self.init_path = path, init_path + self.pyxbuild_dir = pyxbuild_dir + self.inplace = inplace + self.language_level = language_level + + def load_module(self, fullname): + assert self.fullname == fullname, ( + "invalid module, expected %s, got %s" % ( + self.fullname, fullname)) + if self.init_path: + # package + #print "PACKAGE", fullname + module = load_module(fullname, self.init_path, + self.pyxbuild_dir, is_package=True, + build_inplace=self.inplace, + language_level=self.language_level) + module.__path__ = [self.path] + else: + #print "MODULE", fullname + module = load_module(fullname, self.path, + self.pyxbuild_dir, + build_inplace=self.inplace, + language_level=self.language_level) + return module + + +#install args +class PyxArgs(object): + build_dir=True + build_in_temp=True + setup_args={} #None + +##pyxargs=None + + +def _have_importers(): + has_py_importer = False + has_pyx_importer = False + for importer in sys.meta_path: + if isinstance(importer, PyxImporter): + if isinstance(importer, PyImporter): + has_py_importer = True + else: + has_pyx_importer = True + + return has_py_importer, has_pyx_importer + + +def install(pyximport=True, pyimport=False, build_dir=None, build_in_temp=True, + setup_args=None, reload_support=False, + load_py_module_on_import_failure=False, inplace=False, + language_level=None): + """ Main entry point for pyxinstall. + + Call this to install the ``.pyx`` import hook in + your meta-path for a single Python process. If you want it to be + installed whenever you use Python, add it to your ``sitecustomize`` + (as described above). + + :param pyximport: If set to False, does not try to import ``.pyx`` files. + + :param pyimport: You can pass ``pyimport=True`` to also + install the ``.py`` import hook + in your meta-path. Note, however, that it is rather experimental, + will not work at all for some ``.py`` files and packages, and will + heavily slow down your imports due to search and compilation. + Use at your own risk. + + :param build_dir: By default, compiled modules will end up in a ``.pyxbld`` + directory in the user's home directory. Passing a different path + as ``build_dir`` will override this. + + :param build_in_temp: If ``False``, will produce the C files locally. Working + with complex dependencies and debugging becomes more easy. This + can principally interfere with existing files of the same name. + + :param setup_args: Dict of arguments for Distribution. + See ``distutils.core.setup()``. + + :param reload_support: Enables support for dynamic + ``reload(my_module)``, e.g. after a change in the Cython code. + Additional files ``.reloadNN`` may arise on that account, when + the previously loaded module file cannot be overwritten. + + :param load_py_module_on_import_failure: If the compilation of a ``.py`` + file succeeds, but the subsequent import fails for some reason, + retry the import with the normal ``.py`` module instead of the + compiled module. Note that this may lead to unpredictable results + for modules that change the system state during their import, as + the second import will rerun these modifications in whatever state + the system was left after the import of the compiled module + failed. + + :param inplace: Install the compiled module + (``.so`` for Linux and Mac / ``.pyd`` for Windows) + next to the source file. + + :param language_level: The source language level to use: 2 or 3. + The default is to use the language level of the current Python + runtime for .py files and Py2 for ``.pyx`` files. + """ + if setup_args is None: + setup_args = {} + if not build_dir: + build_dir = os.path.join(os.path.expanduser('~'), '.pyxbld') + + global pyxargs + pyxargs = PyxArgs() #$pycheck_no + pyxargs.build_dir = build_dir + pyxargs.build_in_temp = build_in_temp + pyxargs.setup_args = (setup_args or {}).copy() + pyxargs.reload_support = reload_support + pyxargs.load_py_module_on_import_failure = load_py_module_on_import_failure + + has_py_importer, has_pyx_importer = _have_importers() + py_importer, pyx_importer = None, None + + if pyimport and not has_py_importer: + py_importer = PyImporter(pyxbuild_dir=build_dir, inplace=inplace, + language_level=language_level) + # make sure we import Cython before we install the import hook + import Cython.Compiler.Main, Cython.Compiler.Pipeline, Cython.Compiler.Optimize + sys.meta_path.insert(0, py_importer) + + if pyximport and not has_pyx_importer: + pyx_importer = PyxImporter(pyxbuild_dir=build_dir, inplace=inplace, + language_level=language_level) + sys.meta_path.append(pyx_importer) + + return py_importer, pyx_importer + + +def uninstall(py_importer, pyx_importer): + """ + Uninstall an import hook. + """ + try: + sys.meta_path.remove(py_importer) + except ValueError: + pass + + try: + sys.meta_path.remove(pyx_importer) + except ValueError: + pass + + +# MAIN + +def show_docs(): + import __main__ + __main__.__name__ = mod_name + for name in dir(__main__): + item = getattr(__main__, name) + try: + setattr(item, "__module__", mod_name) + except (AttributeError, TypeError): + pass + help(__main__) + + +if __name__ == '__main__': + show_docs() diff --git a/python/cugraph/.eggs/README.txt b/python/cugraph/.eggs/README.txt new file mode 100644 index 00000000000..5d01668824f --- /dev/null +++ b/python/cugraph/.eggs/README.txt @@ -0,0 +1,6 @@ +This directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins. + +This directory caches those eggs to prevent repeated downloads. + +However, it is safe to delete this directory. + diff --git a/python/cugraph/cugraph/dask/traversal/bfs.py b/python/cugraph/cugraph/dask/traversal/bfs.py index 472627717aa..e8b977f5909 100644 --- a/python/cugraph/cugraph/dask/traversal/bfs.py +++ b/python/cugraph/cugraph/dask/traversal/bfs.py @@ -13,9 +13,7 @@ # limitations under the License. # -from pylibcugraph import (MGGraph, - ResourceHandle, - GraphProperties, +from pylibcugraph import (ResourceHandle, bfs as pylibcugraph_bfs ) @@ -28,40 +26,20 @@ def _call_plc_mg_bfs( sID, - data, + mg_x, sources, depth_limit, - src_col_name, - dst_col_name, - graph_properties, - num_edges, direction_optimizing=False, do_expensive_check=False, return_predecessors=True): comms_handle = Comms.get_handle(sID) resource_handle = ResourceHandle(comms_handle.getHandle()) sources = sources[0] - srcs = cudf.Series(data[0][src_col_name], dtype='int32') - dsts = cudf.Series(data[0][dst_col_name], dtype='int32') - weights = cudf.Series(data[0]['value'], dtype='float32') \ - if 'value' in data[0].columns \ - else cudf.Series((srcs + 1) / (srcs + 1), dtype='float32') - - mg = MGGraph( - resource_handle=resource_handle, - graph_properties=graph_properties, - src_array=srcs, - dst_array=dsts, - weight_array=weights, - store_transposed=False, - num_edges=num_edges, - do_expensive_check=do_expensive_check - ) res = \ pylibcugraph_bfs( resource_handle, - mg, + mg_x, cudf.Series(sources, dtype='int32'), direction_optimizing, depth_limit if depth_limit is not None else 0, @@ -149,25 +127,12 @@ def bfs(input_graph, client = default_client() - input_graph.compute_renumber_edge_list( - transposed=False, legacy_renum_only=True) - ddf = input_graph.edgelist.edgelist_df - - graph_properties = GraphProperties( - is_multigraph=False) - - num_edges = len(ddf) - data = get_distributed_data(ddf) - - src_col_name = input_graph.renumber_map.renumbered_src_col_name - dst_col_name = input_graph.renumber_map.renumbered_dst_col_name - if not isinstance(start, (dask_cudf.DataFrame, dask_cudf.Series)): if not isinstance(start, (cudf.DataFrame, cudf.Series)): start = cudf.Series(start) if isinstance(start, (cudf.DataFrame, cudf.Series)): # convert into a dask_cudf - start = dask_cudf.from_cudf(start, ddf.npartitions) + start = dask_cudf.from_cudf(start, input_graph.npartitions) def check_valid_vertex(G, start): is_valid_vertex = G.has_node(start) @@ -190,23 +155,25 @@ def check_valid_vertex(G, start): data_start = get_distributed_data(start) - cupy_result = [client.submit( - _call_plc_mg_bfs, - Comms.get_session_id(), - wf[1], - wf_start[1], - depth_limit, - src_col_name, - dst_col_name, - graph_properties, - num_edges, - False, - True, - return_distances, - workers=[wf[0]]) - for idx, (wf, wf_start) in enumerate( - zip(data.worker_to_parts.items(), - data_start.worker_to_parts.items()))] + cupy_result = [ + client.submit( + lambda sID, mg_graph_x, st_x: pylibcugraph_bfs( + ResourceHandle(Comms.get_handle(sID).getHandle()), + mg_graph_x, + st_x, + False, + depth_limit if depth_limit is not None else 0, + return_distances, + True + ), + Comms.get_session_id(), + mg_graph, + st[0], + workers=[w], + key='cugraph.dask.traversal.bfs.call_pylibcugraph_bfs' + ) + for mg_graph, (w, st) in zip(input_graph._plc_graph, data_start.worker_to_parts.items()) + ] wait(cupy_result) diff --git a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py index 2d70c519bb2..0824de65fa4 100644 --- a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py +++ b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py @@ -15,6 +15,7 @@ from cugraph.structure.graph_primtypes_wrapper import Direction from cugraph.structure.number_map import NumberMap from cugraph.structure.symmetrize import symmetrize +import cupy import cudf import dask_cudf @@ -70,6 +71,12 @@ def __make_mg_graph( dst_col_name, store_transposed, num_edges): + + if 'value' in edata_x[0]: + values = edata_x[0]['value'] + else: + values = cudf.Series(cupy.ones(len(edata_x[0]))) + return MGGraph( resource_handle=ResourceHandle( Comms.get_handle(sID).getHandle() @@ -77,7 +84,7 @@ def __make_mg_graph( graph_properties=graph_props, src_array=edata_x[0][src_col_name], dst_array=edata_x[0][dst_col_name], - weight_array=edata_x[0]['value'], + weight_array=values, store_transposed=store_transposed, num_edges=num_edges, do_expensive_check=False @@ -758,3 +765,7 @@ def vertex_column_size(self): return self.renumber_map.vertex_column_size() else: return 1 + + @property + def npartitions(self) -> int: + return len(self._plc_graph) \ No newline at end of file diff --git a/python/cugraph/cugraph/traversal/bfs.py b/python/cugraph/cugraph/traversal/bfs.py index dea5f9327db..415776280d5 100644 --- a/python/cugraph/cugraph/traversal/bfs.py +++ b/python/cugraph/cugraph/traversal/bfs.py @@ -127,45 +127,6 @@ def _convert_df_to_output_type(df, input_type): raise TypeError(f"input type {input_type} is not a supported type.") -def _call_plc_bfs(G, sources, depth_limit, do_expensive_check=False, - direction_optimizing=False, return_predecessors=True): - handle = ResourceHandle() - - srcs = G.edgelist.edgelist_df['src'] - dsts = G.edgelist.edgelist_df['dst'] - weights = G.edgelist.edgelist_df['weights'] \ - if 'weights' in G.edgelist.edgelist_df \ - else cudf.Series((srcs + 1) / (srcs + 1), dtype='float32') - - sg = SGGraph( - resource_handle=handle, - graph_properties=GraphProperties(is_multigraph=G.is_multigraph()), - src_array=srcs, - dst_array=dsts, - weight_array=weights, - store_transposed=False, - renumber=False, - do_expensive_check=do_expensive_check - ) - - distances, predecessors, vertices = \ - pylibcugraph_bfs( - handle, - sg, - sources, - direction_optimizing, - depth_limit if depth_limit is not None else -1, - return_predecessors, - do_expensive_check - ) - - return cudf.DataFrame({ - 'distance': cudf.Series(distances), - 'vertex': cudf.Series(vertices), - 'predecessor': cudf.Series(predecessors), - }) - - def bfs(G, start=None, depth_limit=None, @@ -277,18 +238,29 @@ def bfs(G, else: start = cudf.Series(start, name='starts') - df = _call_plc_bfs( - G, - start, - depth_limit, - return_predecessors=return_predecessors - ) + distances, predecessors, vertices = \ + pylibcugraph_bfs( + handle=ResourceHandle(), + graph=G._plc_graph, + sources=start, + direction_optimizing=False, + depth_limit=depth_limit if depth_limit is not None else -1, + compute_predecessors=return_predecessors, + do_expensive_check=False + ) + + result_df = cudf.DataFrame({ + 'vertex': cudf.Series(vertices), + 'distance': cudf.Series(distances), + 'predecessor': cudf.Series(predecessors), + }) + if G.renumbered: - df = G.unrenumber(df, "vertex") - df = G.unrenumber(df, "predecessor") - df.fillna(-1, inplace=True) + result_df = G.unrenumber(result_df, "vertex") + result_df = G.unrenumber(result_df, "predecessor") + result_df.fillna(-1, inplace=True) - return _convert_df_to_output_type(df, input_type) + return _convert_df_to_output_type(result_df, input_type) def bfs_edges(G, source, reverse=False, depth_limit=None, sort_neighbors=None): From e3e1038cfea3bdabfbdf2b498ef1d1c87148f292 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Mon, 11 Jul 2022 13:43:55 +0000 Subject: [PATCH 18/71] remove useless files --- python/cufile.log | 26 - .../Cython/Build/BuildExecutable.py | 142 - .../Cython/Build/Cythonize.py | 229 - .../Cython/Build/Dependencies.py | 1308 -- .../Cython/Build/Distutils.py | 1 - .../Cython/Build/Inline.py | 376 - .../Cython/Build/IpythonMagic.py | 565 - .../Cython/Build/Tests/TestCyCache.py | 106 - .../Cython/Build/Tests/TestInline.py | 96 - .../Cython/Build/Tests/TestIpythonMagic.py | 205 - .../Cython/Build/Tests/TestStripLiterals.py | 57 - .../Cython/Build/Tests/__init__.py | 1 - .../Cython/Build/__init__.py | 2 - .../Cython/CodeWriter.py | 816 - .../Cython/Compiler/AnalysedTreeTransforms.py | 99 - .../Cython/Compiler/Annotate.py | 317 - .../Cython/Compiler/AutoDocTransforms.py | 214 - .../Cython/Compiler/Buffer.py | 740 - .../Cython/Compiler/Builtin.py | 444 - .../Cython/Compiler/CmdLine.py | 224 - .../Cython/Compiler/Code.pxd | 124 - .../Cython/Compiler/Code.py | 2597 --- .../Cython/Compiler/CodeGeneration.py | 35 - .../Cython/Compiler/CythonScope.py | 164 - .../Cython/Compiler/DebugFlags.py | 21 - .../Cython/Compiler/Errors.py | 265 - .../Cython/Compiler/ExprNodes.py | 13692 ---------------- .../Cython/Compiler/FlowControl.pxd | 111 - .../Cython/Compiler/FlowControl.py | 1325 -- .../Cython/Compiler/FusedNode.py | 901 - .../Cython/Compiler/Future.py | 15 - .../Cython/Compiler/Interpreter.py | 64 - .../Cython/Compiler/Lexicon.py | 138 - .../Cython/Compiler/Main.py | 904 - .../Cython/Compiler/MemoryView.py | 858 - .../Cython/Compiler/ModuleNode.py | 3222 ---- .../Cython/Compiler/Naming.py | 162 - .../Cython/Compiler/Nodes.py | 9447 ----------- .../Cython/Compiler/Optimize.py | 4857 ------ .../Cython/Compiler/Options.py | 550 - .../Cython/Compiler/ParseTreeTransforms.pxd | 82 - .../Cython/Compiler/ParseTreeTransforms.py | 3530 ---- .../Cython/Compiler/Parsing.pxd | 199 - .../Cython/Compiler/Parsing.py | 3844 ----- .../Cython/Compiler/Pipeline.py | 369 - .../Cython/Compiler/PyrexTypes.py | 4735 ------ .../Cython/Compiler/Pythran.py | 227 - .../Cython/Compiler/Scanning.pxd | 67 - .../Cython/Compiler/Scanning.py | 551 - .../Cython/Compiler/StringEncoding.py | 363 - .../Cython/Compiler/Symtab.py | 2552 --- .../Cython/Compiler/Tests/TestBuffer.py | 105 - .../Cython/Compiler/Tests/TestCmdLine.py | 118 - .../Cython/Compiler/Tests/TestFlowControl.py | 68 - .../Cython/Compiler/Tests/TestGrammar.py | 129 - .../Cython/Compiler/Tests/TestMemView.py | 71 - .../Compiler/Tests/TestParseTreeTransforms.py | 282 - .../Compiler/Tests/TestSignatureMatching.py | 73 - .../Compiler/Tests/TestStringEncoding.py | 44 - .../Cython/Compiler/Tests/TestTreeFragment.py | 64 - .../Cython/Compiler/Tests/TestTreePath.py | 94 - .../Cython/Compiler/Tests/TestTypes.py | 19 - .../Cython/Compiler/Tests/TestUtilityLoad.py | 101 - .../Cython/Compiler/Tests/TestVisitor.py | 61 - .../Cython/Compiler/Tests/__init__.py | 1 - .../Cython/Compiler/TreeFragment.py | 275 - .../Cython/Compiler/TreePath.py | 296 - .../Cython/Compiler/TypeInference.py | 591 - .../Cython/Compiler/TypeSlots.py | 941 -- .../Cython/Compiler/UtilNodes.py | 359 - .../Cython/Compiler/UtilityCode.py | 237 - .../Cython/Compiler/Version.py | 9 - .../Cython/Compiler/Visitor.pxd | 55 - .../Cython/Compiler/Visitor.py | 840 - .../Cython/Compiler/__init__.py | 1 - .../Cython/Coverage.py | 348 - .../Cython/Debugger/Cygdb.py | 158 - .../Cython/Debugger/DebugWriter.py | 72 - .../Cython/Debugger/Tests/TestLibCython.py | 274 - .../Cython/Debugger/Tests/__init__.py | 1 - .../Cython/Debugger/Tests/cfuncs.c | 8 - .../Cython/Debugger/Tests/codefile | 50 - .../Debugger/Tests/test_libcython_in_gdb.py | 496 - .../Debugger/Tests/test_libpython_in_gdb.py | 115 - .../Cython/Debugger/__init__.py | 1 - .../Cython/Debugger/libcython.py | 1434 -- .../Cython/Debugger/libpython.py | 2760 ---- .../Cython/Debugging.py | 20 - .../Cython/Distutils/__init__.py | 2 - .../Cython/Distutils/build_ext.py | 25 - .../Cython/Distutils/extension.py | 128 - .../Cython/Distutils/old_build_ext.py | 355 - .../Cython/Includes/Deprecated/python.pxd | 2 - .../Includes/Deprecated/python_bool.pxd | 2 - .../Includes/Deprecated/python_buffer.pxd | 2 - .../Includes/Deprecated/python_bytes.pxd | 2 - .../Includes/Deprecated/python_cobject.pxd | 2 - .../Includes/Deprecated/python_complex.pxd | 2 - .../Includes/Deprecated/python_dict.pxd | 2 - .../Cython/Includes/Deprecated/python_exc.pxd | 2 - .../Includes/Deprecated/python_float.pxd | 2 - .../Includes/Deprecated/python_function.pxd | 2 - .../Includes/Deprecated/python_getargs.pxd | 2 - .../Includes/Deprecated/python_instance.pxd | 2 - .../Cython/Includes/Deprecated/python_int.pxd | 2 - .../Includes/Deprecated/python_iterator.pxd | 2 - .../Includes/Deprecated/python_list.pxd | 2 - .../Includes/Deprecated/python_long.pxd | 2 - .../Includes/Deprecated/python_mapping.pxd | 2 - .../Cython/Includes/Deprecated/python_mem.pxd | 2 - .../Includes/Deprecated/python_method.pxd | 2 - .../Includes/Deprecated/python_module.pxd | 2 - .../Includes/Deprecated/python_number.pxd | 2 - .../Includes/Deprecated/python_object.pxd | 2 - .../Includes/Deprecated/python_oldbuffer.pxd | 2 - .../Includes/Deprecated/python_pycapsule.pxd | 2 - .../Cython/Includes/Deprecated/python_ref.pxd | 2 - .../Includes/Deprecated/python_sequence.pxd | 2 - .../Cython/Includes/Deprecated/python_set.pxd | 2 - .../Includes/Deprecated/python_string.pxd | 2 - .../Includes/Deprecated/python_tuple.pxd | 2 - .../Includes/Deprecated/python_type.pxd | 2 - .../Includes/Deprecated/python_unicode.pxd | 2 - .../Includes/Deprecated/python_version.pxd | 2 - .../Includes/Deprecated/python_weakref.pxd | 2 - .../Cython/Includes/Deprecated/stdio.pxd | 2 - .../Cython/Includes/Deprecated/stdlib.pxd | 2 - .../Cython/Includes/Deprecated/stl.pxd | 91 - .../Cython/Includes/cpython/__init__.pxd | 184 - .../Cython/Includes/cpython/array.pxd | 163 - .../Cython/Includes/cpython/bool.pxd | 38 - .../Cython/Includes/cpython/buffer.pxd | 112 - .../Cython/Includes/cpython/bytearray.pxd | 33 - .../Cython/Includes/cpython/bytes.pxd | 198 - .../Cython/Includes/cpython/cellobject.pxd | 35 - .../Cython/Includes/cpython/ceval.pxd | 8 - .../Cython/Includes/cpython/cobject.pxd | 36 - .../Cython/Includes/cpython/codecs.pxd | 121 - .../Cython/Includes/cpython/complex.pxd | 50 - .../Cython/Includes/cpython/conversion.pxd | 36 - .../Cython/Includes/cpython/datetime.pxd | 212 - .../Cython/Includes/cpython/dict.pxd | 165 - .../Cython/Includes/cpython/exc.pxd | 257 - .../Cython/Includes/cpython/float.pxd | 39 - .../Cython/Includes/cpython/function.pxd | 65 - .../Cython/Includes/cpython/genobject.pxd | 25 - .../Cython/Includes/cpython/getargs.pxd | 12 - .../Cython/Includes/cpython/instance.pxd | 25 - .../Cython/Includes/cpython/int.pxd | 89 - .../Cython/Includes/cpython/iterator.pxd | 36 - .../Cython/Includes/cpython/iterobject.pxd | 24 - .../Cython/Includes/cpython/list.pxd | 92 - .../Cython/Includes/cpython/long.pxd | 149 - .../Cython/Includes/cpython/longintrepr.pxd | 19 - .../Cython/Includes/cpython/mapping.pxd | 64 - .../Cython/Includes/cpython/mem.pxd | 111 - .../Cython/Includes/cpython/memoryview.pxd | 50 - .../Cython/Includes/cpython/method.pxd | 49 - .../Cython/Includes/cpython/module.pxd | 188 - .../Cython/Includes/cpython/number.pxd | 265 - .../Cython/Includes/cpython/object.pxd | 399 - .../Cython/Includes/cpython/oldbuffer.pxd | 63 - .../Cython/Includes/cpython/pycapsule.pxd | 144 - .../Cython/Includes/cpython/pylifecycle.pxd | 68 - .../Cython/Includes/cpython/pystate.pxd | 92 - .../Cython/Includes/cpython/pythread.pxd | 53 - .../Cython/Includes/cpython/ref.pxd | 51 - .../Cython/Includes/cpython/sequence.pxd | 136 - .../Cython/Includes/cpython/set.pxd | 119 - .../Cython/Includes/cpython/slice.pxd | 70 - .../Cython/Includes/cpython/string.pxd | 198 - .../Cython/Includes/cpython/tuple.pxd | 71 - .../Cython/Includes/cpython/type.pxd | 48 - .../Cython/Includes/cpython/unicode.pxd | 556 - .../Cython/Includes/cpython/version.pxd | 32 - .../Cython/Includes/cpython/weakref.pxd | 42 - .../Cython/Includes/libc/__init__.pxd | 1 - .../Cython/Includes/libc/errno.pxd | 128 - .../Cython/Includes/libc/float.pxd | 43 - .../Cython/Includes/libc/limits.pxd | 28 - .../Cython/Includes/libc/locale.pxd | 46 - .../Cython/Includes/libc/math.pxd | 112 - .../Cython/Includes/libc/setjmp.pxd | 10 - .../Cython/Includes/libc/signal.pxd | 64 - .../Cython/Includes/libc/stddef.pxd | 9 - .../Cython/Includes/libc/stdint.pxd | 105 - .../Cython/Includes/libc/stdio.pxd | 80 - .../Cython/Includes/libc/stdlib.pxd | 72 - .../Cython/Includes/libc/string.pxd | 50 - .../Cython/Includes/libc/time.pxd | 46 - .../Cython/Includes/libcpp/__init__.pxd | 4 - .../Cython/Includes/libcpp/algorithm.pxd | 43 - .../Cython/Includes/libcpp/cast.pxd | 12 - .../Cython/Includes/libcpp/complex.pxd | 101 - .../Cython/Includes/libcpp/deque.pxd | 86 - .../Cython/Includes/libcpp/forward_list.pxd | 62 - .../Cython/Includes/libcpp/functional.pxd | 13 - .../Cython/Includes/libcpp/iterator.pxd | 32 - .../Cython/Includes/libcpp/limits.pxd | 61 - .../Cython/Includes/libcpp/list.pxd | 78 - .../Cython/Includes/libcpp/map.pxd | 68 - .../Cython/Includes/libcpp/memory.pxd | 115 - .../Cython/Includes/libcpp/pair.pxd | 1 - .../Cython/Includes/libcpp/queue.pxd | 25 - .../Cython/Includes/libcpp/set.pxd | 61 - .../Cython/Includes/libcpp/stack.pxd | 11 - .../Cython/Includes/libcpp/string.pxd | 227 - .../Cython/Includes/libcpp/typeindex.pxd | 15 - .../Cython/Includes/libcpp/typeinfo.pxd | 10 - .../Cython/Includes/libcpp/unordered_map.pxd | 74 - .../Cython/Includes/libcpp/unordered_set.pxd | 69 - .../Cython/Includes/libcpp/utility.pxd | 30 - .../Cython/Includes/libcpp/vector.pxd | 88 - .../Cython/Includes/numpy/__init__.pxd | 1049 -- .../Cython/Includes/numpy/math.pxd | 133 - .../Cython/Includes/openmp.pxd | 51 - .../Cython/Includes/posix/__init__.pxd | 1 - .../Cython/Includes/posix/dlfcn.pxd | 14 - .../Cython/Includes/posix/fcntl.pxd | 68 - .../Cython/Includes/posix/ioctl.pxd | 4 - .../Cython/Includes/posix/mman.pxd | 99 - .../Cython/Includes/posix/resource.pxd | 55 - .../Cython/Includes/posix/select.pxd | 19 - .../Cython/Includes/posix/signal.pxd | 73 - .../Cython/Includes/posix/stat.pxd | 71 - .../Cython/Includes/posix/stdio.pxd | 37 - .../Cython/Includes/posix/stdlib.pxd | 29 - .../Cython/Includes/posix/strings.pxd | 9 - .../Cython/Includes/posix/time.pxd | 71 - .../Cython/Includes/posix/types.pxd | 30 - .../Cython/Includes/posix/unistd.pxd | 271 - .../Cython/Includes/posix/wait.pxd | 38 - .../Cython/Plex/Actions.pxd | 25 - .../Cython/Plex/Actions.py | 110 - .../Cython/Plex/DFA.py | 164 - .../Cython/Plex/Errors.py | 54 - .../Cython/Plex/Lexicons.py | 200 - .../Cython/Plex/Machines.py | 255 - .../Cython/Plex/Regexps.py | 576 - .../Cython/Plex/Scanners.pxd | 50 - .../Cython/Plex/Scanners.py | 338 - .../Cython/Plex/Timing.py | 23 - .../Cython/Plex/Traditional.py | 158 - .../Cython/Plex/Transitions.py | 251 - .../Cython/Plex/__init__.py | 39 - .../Cython/Runtime/__init__.py | 1 - .../Cython/Runtime/refnanny.pyx | 194 - .../Cython/Shadow.py | 474 - .../Cython/StringIOTree.py | 108 - .../Cython/Tempita/__init__.py | 4 - .../Cython/Tempita/_looper.py | 163 - .../Cython/Tempita/_tempita.py | 1182 -- .../Cython/Tempita/compat3.py | 47 - .../Cython/TestUtils.py | 217 - .../Cython/Tests/TestCodeWriter.py | 82 - .../Cython/Tests/TestCythonUtils.py | 11 - .../Cython/Tests/TestJediTyper.py | 225 - .../Cython/Tests/TestStringIOTree.py | 67 - .../Cython/Tests/__init__.py | 1 - .../Cython/Tests/xmlrunner.py | 397 - .../Cython/Utility/AsyncGen.c | 1133 -- .../Cython/Utility/Buffer.c | 921 -- .../Cython/Utility/Builtins.c | 542 - .../Cython/Utility/CConvert.pyx | 132 - .../Cython/Utility/CMath.c | 95 - .../Cython/Utility/Capsule.c | 20 - .../Cython/Utility/CommonStructures.c | 86 - .../Cython/Utility/Complex.c | 291 - .../Cython/Utility/Coroutine.c | 2391 --- .../Cython/Utility/CpdefEnums.pyx | 66 - .../Cython/Utility/CppConvert.pyx | 237 - .../Cython/Utility/CythonFunction.c | 1339 -- .../Cython/Utility/Embed.c | 219 - .../Cython/Utility/Exceptions.c | 816 - .../Cython/Utility/ExtensionTypes.c | 301 - .../Cython/Utility/FunctionArguments.c | 352 - .../Cython/Utility/ImportExport.c | 739 - .../Cython/Utility/MemoryView.pyx | 1494 -- .../Cython/Utility/MemoryView_C.c | 945 -- .../Cython/Utility/ModuleSetupCode.c | 1640 -- .../Cython/Utility/ObjectHandling.c | 2504 --- .../Cython/Utility/Optimize.c | 1195 -- .../Cython/Utility/Overflow.c | 311 - .../Cython/Utility/Printing.c | 176 - .../Cython/Utility/Profile.c | 377 - .../Cython/Utility/StringTools.c | 1195 -- .../Cython/Utility/TestCyUtilityLoader.pyx | 8 - .../Cython/Utility/TestCythonScope.pyx | 64 - .../Cython/Utility/TestUtilityLoader.c | 12 - .../Cython/Utility/TypeConversion.c | 1017 -- .../Cython/Utility/__init__.py | 29 - .../Cython/Utility/arrayarray.h | 149 - .../Cython/Utils.py | 449 - .../Cython/__init__.py | 12 - .../EGG-INFO/COPYING.txt | 19 - .../EGG-INFO/LICENSE.txt | 176 - .../EGG-INFO/PKG-INFO | 57 - .../EGG-INFO/RECORD | 313 - .../EGG-INFO/WHEEL | 7 - .../EGG-INFO/entry_points.txt | 4 - .../EGG-INFO/top_level.txt | 3 - .../cython.py | 24 - .../pyximport/__init__.py | 4 - .../pyximport/pyxbuild.py | 160 - .../pyximport/pyximport.py | 602 - python/cugraph/.eggs/README.txt | 6 - 306 files changed, 110523 deletions(-) delete mode 100644 python/cufile.log delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/BuildExecutable.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Cythonize.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Dependencies.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Distutils.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Inline.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/IpythonMagic.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestCyCache.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestInline.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestIpythonMagic.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestStripLiterals.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/__init__.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/__init__.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/CodeWriter.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/AnalysedTreeTransforms.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Annotate.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/AutoDocTransforms.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Buffer.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Builtin.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CmdLine.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Code.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Code.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CodeGeneration.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CythonScope.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/DebugFlags.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Errors.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/ExprNodes.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FlowControl.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FlowControl.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FusedNode.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Future.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Interpreter.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Lexicon.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Main.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/MemoryView.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/ModuleNode.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Naming.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Nodes.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Optimize.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Options.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/ParseTreeTransforms.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/ParseTreeTransforms.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Parsing.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Parsing.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Pipeline.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/PyrexTypes.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Pythran.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Scanning.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Scanning.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/StringEncoding.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Symtab.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestBuffer.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestCmdLine.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestFlowControl.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestGrammar.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestMemView.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestParseTreeTransforms.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestSignatureMatching.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestStringEncoding.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestTreeFragment.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestTreePath.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestTypes.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestUtilityLoad.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/TestVisitor.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Tests/__init__.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/TreeFragment.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/TreePath.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/TypeInference.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/TypeSlots.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/UtilNodes.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/UtilityCode.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Version.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Visitor.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Visitor.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/__init__.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Coverage.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/Cygdb.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/DebugWriter.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/Tests/TestLibCython.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/Tests/__init__.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/Tests/cfuncs.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/Tests/codefile delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/Tests/test_libcython_in_gdb.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/Tests/test_libpython_in_gdb.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/__init__.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/libcython.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugger/libpython.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Debugging.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Distutils/__init__.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Distutils/build_ext.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Distutils/extension.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Distutils/old_build_ext.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_bool.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_buffer.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_bytes.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_cobject.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_complex.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_dict.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_exc.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_float.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_function.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_getargs.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_instance.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_int.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_iterator.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_list.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_long.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_mapping.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_mem.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_method.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_module.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_number.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_object.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_oldbuffer.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_pycapsule.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_ref.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_sequence.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_set.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_string.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_tuple.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_type.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_unicode.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_version.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/python_weakref.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/stdio.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/stdlib.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/Deprecated/stl.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/__init__.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/array.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/bool.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/buffer.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/bytearray.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/bytes.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/cellobject.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/ceval.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/cobject.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/codecs.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/complex.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/conversion.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/datetime.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/dict.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/exc.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/float.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/function.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/genobject.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/getargs.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/instance.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/int.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/iterator.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/iterobject.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/list.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/long.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/longintrepr.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/mapping.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/mem.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/memoryview.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/method.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/module.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/number.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/object.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/oldbuffer.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/pycapsule.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/pylifecycle.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/pystate.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/pythread.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/ref.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/sequence.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/set.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/slice.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/string.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/tuple.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/type.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/unicode.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/version.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/cpython/weakref.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/__init__.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/errno.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/float.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/limits.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/locale.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/math.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/setjmp.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/signal.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/stddef.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/stdint.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/stdio.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/stdlib.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/string.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libc/time.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/__init__.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/algorithm.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/cast.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/complex.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/deque.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/forward_list.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/functional.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/iterator.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/limits.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/list.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/map.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/memory.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/pair.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/queue.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/set.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/stack.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/string.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/typeindex.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/typeinfo.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/unordered_map.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/unordered_set.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/utility.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/libcpp/vector.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/numpy/__init__.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/numpy/math.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/openmp.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/__init__.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/dlfcn.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/fcntl.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/ioctl.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/mman.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/resource.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/select.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/signal.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/stat.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/stdio.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/stdlib.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/strings.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/time.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/types.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/unistd.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Includes/posix/wait.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Actions.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Actions.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/DFA.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Errors.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Lexicons.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Machines.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Regexps.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Scanners.pxd delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Scanners.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Timing.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Traditional.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Transitions.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/__init__.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Runtime/__init__.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Runtime/refnanny.pyx delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Shadow.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/StringIOTree.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/__init__.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/_looper.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/_tempita.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/compat3.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/TestUtils.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestCodeWriter.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestCythonUtils.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestJediTyper.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestStringIOTree.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/__init__.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/xmlrunner.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/AsyncGen.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Buffer.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Builtins.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CConvert.pyx delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CMath.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Capsule.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CommonStructures.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Complex.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Coroutine.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CpdefEnums.pyx delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CppConvert.pyx delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CythonFunction.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Embed.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Exceptions.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ExtensionTypes.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/FunctionArguments.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ImportExport.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/MemoryView.pyx delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/MemoryView_C.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ModuleSetupCode.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ObjectHandling.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Optimize.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Overflow.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Printing.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Profile.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/StringTools.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestCyUtilityLoader.pyx delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestCythonScope.pyx delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestUtilityLoader.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TypeConversion.c delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/__init__.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/arrayarray.h delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utils.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/__init__.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/COPYING.txt delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/LICENSE.txt delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/PKG-INFO delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/RECORD delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/WHEEL delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/entry_points.txt delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/top_level.txt delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/cython.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/__init__.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/pyxbuild.py delete mode 100644 python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/pyximport.py delete mode 100644 python/cugraph/.eggs/README.txt diff --git a/python/cufile.log b/python/cufile.log deleted file mode 100644 index 503bd201c41..00000000000 --- a/python/cufile.log +++ /dev/null @@ -1,26 +0,0 @@ - 08-07-2022 18:30:11:139 [pid=2188895 tid=2188895] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 08-07-2022 18:30:11:250 [pid=2189130 tid=2189387] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 08-07-2022 18:30:11:250 [pid=2189134 tid=2189388] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 08-07-2022 18:34:31:781 [pid=2191754 tid=2191754] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 08-07-2022 18:34:31:905 [pid=2191981 tid=2192234] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 08-07-2022 18:34:31:905 [pid=2191978 tid=2192235] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 08-07-2022 18:42:12:87 [pid=2196473 tid=2196473] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 08-07-2022 18:42:12:200 [pid=2196718 tid=2196970] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 08-07-2022 18:42:12:200 [pid=2196720 tid=2196971] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 08-07-2022 18:44:23:519 [pid=2198207 tid=2198207] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 08-07-2022 18:44:23:631 [pid=2198434 tid=2198687] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 08-07-2022 18:44:23:632 [pid=2198431 tid=2198688] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 08-07-2022 18:44:58:891 [pid=2198933 tid=2198933] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 08-07-2022 18:44:58:999 [pid=2199160 tid=2199413] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 08-07-2022 18:44:59:1 [pid=2199157 tid=2199414] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 11-07-2022 13:20:08:225 [pid=2335263 tid=2335263] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 11-07-2022 13:20:08:338 [pid=2335493 tid=2335742] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 11-07-2022 13:20:08:338 [pid=2335496 tid=2335743] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 11-07-2022 13:23:07:965 [pid=2337247 tid=2337247] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 11-07-2022 13:24:25:75 [pid=2338370 tid=2338370] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 11-07-2022 13:25:16:485 [pid=2339072 tid=2339072] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 11-07-2022 13:25:16:597 [pid=2339295 tid=2339566] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 11-07-2022 13:25:16:597 [pid=2339298 tid=2339567] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 11-07-2022 13:42:19:249 [pid=4345 tid=4345] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 11-07-2022 13:42:19:673 [pid=4577 tid=4848] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 11-07-2022 13:42:19:674 [pid=4571 tid=4849] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/BuildExecutable.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/BuildExecutable.py deleted file mode 100644 index 2db9e5d7457..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/BuildExecutable.py +++ /dev/null @@ -1,142 +0,0 @@ -""" -Compile a Python script into an executable that embeds CPython and run it. -Requires CPython to be built as a shared library ('libpythonX.Y'). - -Basic usage: - - python cythonrun somefile.py [ARGS] -""" - -from __future__ import absolute_import - -DEBUG = True - -import sys -import os -from distutils import sysconfig - - -def get_config_var(name, default=''): - return sysconfig.get_config_var(name) or default - -INCDIR = sysconfig.get_python_inc() -LIBDIR1 = get_config_var('LIBDIR') -LIBDIR2 = get_config_var('LIBPL') -PYLIB = get_config_var('LIBRARY') -PYLIB_DYN = get_config_var('LDLIBRARY') -if PYLIB_DYN == PYLIB: - # no shared library - PYLIB_DYN = '' -else: - PYLIB_DYN = os.path.splitext(PYLIB_DYN[3:])[0] # 'lib(XYZ).so' -> XYZ - -CC = get_config_var('CC', os.environ.get('CC', '')) -CFLAGS = get_config_var('CFLAGS') + ' ' + os.environ.get('CFLAGS', '') -LINKCC = get_config_var('LINKCC', os.environ.get('LINKCC', CC)) -LINKFORSHARED = get_config_var('LINKFORSHARED') -LIBS = get_config_var('LIBS') -SYSLIBS = get_config_var('SYSLIBS') -EXE_EXT = sysconfig.get_config_var('EXE') - -def _debug(msg, *args): - if DEBUG: - if args: - msg = msg % args - sys.stderr.write(msg + '\n') - -def dump_config(): - _debug('INCDIR: %s', INCDIR) - _debug('LIBDIR1: %s', LIBDIR1) - _debug('LIBDIR2: %s', LIBDIR2) - _debug('PYLIB: %s', PYLIB) - _debug('PYLIB_DYN: %s', PYLIB_DYN) - _debug('CC: %s', CC) - _debug('CFLAGS: %s', CFLAGS) - _debug('LINKCC: %s', LINKCC) - _debug('LINKFORSHARED: %s', LINKFORSHARED) - _debug('LIBS: %s', LIBS) - _debug('SYSLIBS: %s', SYSLIBS) - _debug('EXE_EXT: %s', EXE_EXT) - -def runcmd(cmd, shell=True): - if shell: - cmd = ' '.join(cmd) - _debug(cmd) - else: - _debug(' '.join(cmd)) - - try: - import subprocess - except ImportError: # Python 2.3 ... - returncode = os.system(cmd) - else: - returncode = subprocess.call(cmd, shell=shell) - - if returncode: - sys.exit(returncode) - -def clink(basename): - runcmd([LINKCC, '-o', basename + EXE_EXT, basename+'.o', '-L'+LIBDIR1, '-L'+LIBDIR2] - + [PYLIB_DYN and ('-l'+PYLIB_DYN) or os.path.join(LIBDIR1, PYLIB)] - + LIBS.split() + SYSLIBS.split() + LINKFORSHARED.split()) - -def ccompile(basename): - runcmd([CC, '-c', '-o', basename+'.o', basename+'.c', '-I' + INCDIR] + CFLAGS.split()) - -def cycompile(input_file, options=()): - from ..Compiler import Version, CmdLine, Main - options, sources = CmdLine.parse_command_line(list(options or ()) + ['--embed', input_file]) - _debug('Using Cython %s to compile %s', Version.version, input_file) - result = Main.compile(sources, options) - if result.num_errors > 0: - sys.exit(1) - -def exec_file(program_name, args=()): - runcmd([os.path.abspath(program_name)] + list(args), shell=False) - -def build(input_file, compiler_args=(), force=False): - """ - Build an executable program from a Cython module. - - Returns the name of the executable file. - """ - basename = os.path.splitext(input_file)[0] - exe_file = basename + EXE_EXT - if not force and os.path.abspath(exe_file) == os.path.abspath(input_file): - raise ValueError("Input and output file names are the same, refusing to overwrite") - if (not force and os.path.exists(exe_file) and os.path.exists(input_file) - and os.path.getmtime(input_file) <= os.path.getmtime(exe_file)): - _debug("File is up to date, not regenerating %s", exe_file) - return exe_file - cycompile(input_file, compiler_args) - ccompile(basename) - clink(basename) - return exe_file - -def build_and_run(args): - """ - Build an executable program from a Cython module and runs it. - - Arguments after the module name will be passed verbatimely to the - program. - """ - cy_args = [] - last_arg = None - for i, arg in enumerate(args): - if arg.startswith('-'): - cy_args.append(arg) - elif last_arg in ('-X', '--directive'): - cy_args.append(arg) - else: - input_file = arg - args = args[i+1:] - break - last_arg = arg - else: - raise ValueError('no input file provided') - - program_name = build(input_file, cy_args) - exec_file(program_name, args) - -if __name__ == '__main__': - build_and_run(sys.argv[1:]) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Cythonize.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Cythonize.py deleted file mode 100644 index c85b6eabab2..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Cythonize.py +++ /dev/null @@ -1,229 +0,0 @@ -#!/usr/bin/env python - -from __future__ import absolute_import - -import os -import shutil -import tempfile -from distutils.core import setup - -from .Dependencies import cythonize, extended_iglob -from ..Utils import is_package_dir -from ..Compiler import Options - -try: - import multiprocessing - parallel_compiles = int(multiprocessing.cpu_count() * 1.5) -except ImportError: - multiprocessing = None - parallel_compiles = 0 - - -class _FakePool(object): - def map_async(self, func, args): - try: - from itertools import imap - except ImportError: - imap=map - for _ in imap(func, args): - pass - - def close(self): - pass - - def terminate(self): - pass - - def join(self): - pass - - -def parse_directives(option, name, value, parser): - dest = option.dest - old_directives = dict(getattr(parser.values, dest, - Options.get_directive_defaults())) - directives = Options.parse_directive_list( - value, relaxed_bool=True, current_settings=old_directives) - setattr(parser.values, dest, directives) - - -def parse_options(option, name, value, parser): - dest = option.dest - options = dict(getattr(parser.values, dest, {})) - for opt in value.split(','): - if '=' in opt: - n, v = opt.split('=', 1) - v = v.lower() not in ('false', 'f', '0', 'no') - else: - n, v = opt, True - options[n] = v - setattr(parser.values, dest, options) - - -def parse_compile_time_env(option, name, value, parser): - dest = option.dest - old_env = dict(getattr(parser.values, dest, {})) - new_env = Options.parse_compile_time_env(value, current_settings=old_env) - setattr(parser.values, dest, new_env) - - -def find_package_base(path): - base_dir, package_path = os.path.split(path) - while os.path.isfile(os.path.join(base_dir, '__init__.py')): - base_dir, parent = os.path.split(base_dir) - package_path = '%s/%s' % (parent, package_path) - return base_dir, package_path - - -def cython_compile(path_pattern, options): - pool = None - all_paths = map(os.path.abspath, extended_iglob(path_pattern)) - try: - for path in all_paths: - if options.build_inplace: - base_dir = path - while not os.path.isdir(base_dir) or is_package_dir(base_dir): - base_dir = os.path.dirname(base_dir) - else: - base_dir = None - - if os.path.isdir(path): - # recursively compiling a package - paths = [os.path.join(path, '**', '*.{py,pyx}')] - else: - # assume it's a file(-like thing) - paths = [path] - - ext_modules = cythonize( - paths, - nthreads=options.parallel, - exclude_failures=options.keep_going, - exclude=options.excludes, - compiler_directives=options.directives, - compile_time_env=options.compile_time_env, - force=options.force, - quiet=options.quiet, - depfile=options.depfile, - **options.options) - - if ext_modules and options.build: - if len(ext_modules) > 1 and options.parallel > 1: - if pool is None: - try: - pool = multiprocessing.Pool(options.parallel) - except OSError: - pool = _FakePool() - pool.map_async(run_distutils, [ - (base_dir, [ext]) for ext in ext_modules]) - else: - run_distutils((base_dir, ext_modules)) - except: - if pool is not None: - pool.terminate() - raise - else: - if pool is not None: - pool.close() - pool.join() - - -def run_distutils(args): - base_dir, ext_modules = args - script_args = ['build_ext', '-i'] - cwd = os.getcwd() - temp_dir = None - try: - if base_dir: - os.chdir(base_dir) - temp_dir = tempfile.mkdtemp(dir=base_dir) - script_args.extend(['--build-temp', temp_dir]) - setup( - script_name='setup.py', - script_args=script_args, - ext_modules=ext_modules, - ) - finally: - if base_dir: - os.chdir(cwd) - if temp_dir and os.path.isdir(temp_dir): - shutil.rmtree(temp_dir) - - -def parse_args(args): - from optparse import OptionParser - parser = OptionParser(usage='%prog [options] [sources and packages]+') - - parser.add_option('-X', '--directive', metavar='NAME=VALUE,...', - dest='directives', default={}, type="str", - action='callback', callback=parse_directives, - help='set a compiler directive') - parser.add_option('-E', '--compile-time-env', metavar='NAME=VALUE,...', - dest='compile_time_env', default={}, type="str", - action='callback', callback=parse_compile_time_env, - help='set a compile time environment variable') - parser.add_option('-s', '--option', metavar='NAME=VALUE', - dest='options', default={}, type="str", - action='callback', callback=parse_options, - help='set a cythonize option') - parser.add_option('-2', dest='language_level', action='store_const', const=2, default=None, - help='use Python 2 syntax mode by default') - parser.add_option('-3', dest='language_level', action='store_const', const=3, - help='use Python 3 syntax mode by default') - parser.add_option('--3str', dest='language_level', action='store_const', const='3str', - help='use Python 3 syntax mode by default') - parser.add_option('-a', '--annotate', dest='annotate', action='store_true', - help='generate annotated HTML page for source files') - - parser.add_option('-x', '--exclude', metavar='PATTERN', dest='excludes', - action='append', default=[], - help='exclude certain file patterns from the compilation') - - parser.add_option('-b', '--build', dest='build', action='store_true', - help='build extension modules using distutils') - parser.add_option('-i', '--inplace', dest='build_inplace', action='store_true', - help='build extension modules in place using distutils (implies -b)') - parser.add_option('-j', '--parallel', dest='parallel', metavar='N', - type=int, default=parallel_compiles, - help=('run builds in N parallel jobs (default: %d)' % - parallel_compiles or 1)) - parser.add_option('-f', '--force', dest='force', action='store_true', - help='force recompilation') - parser.add_option('-q', '--quiet', dest='quiet', action='store_true', - help='be less verbose during compilation') - - parser.add_option('--lenient', dest='lenient', action='store_true', - help='increase Python compatibility by ignoring some compile time errors') - parser.add_option('-k', '--keep-going', dest='keep_going', action='store_true', - help='compile as much as possible, ignore compilation failures') - parser.add_option('-M', '--depfile', action='store_true', help='produce depfiles for the sources') - - options, args = parser.parse_args(args) - if not args: - parser.error("no source files provided") - if options.build_inplace: - options.build = True - if multiprocessing is None: - options.parallel = 0 - if options.language_level: - assert options.language_level in (2, 3, '3str') - options.options['language_level'] = options.language_level - return options, args - - -def main(args=None): - options, paths = parse_args(args) - - if options.lenient: - # increase Python compatibility by ignoring compile time errors - Options.error_on_unknown_names = False - Options.error_on_uninitialized = False - - if options.annotate: - Options.annotate = True - - for path in paths: - cython_compile(path, options) - - -if __name__ == '__main__': - main() diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Dependencies.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Dependencies.py deleted file mode 100644 index 7eb55e2607d..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Dependencies.py +++ /dev/null @@ -1,1308 +0,0 @@ -from __future__ import absolute_import, print_function - -import cython -from .. import __version__ - -import collections -import contextlib -import hashlib -import os -import shutil -import subprocess -import re, sys, time -import warnings -from glob import iglob -from io import open as io_open -from os.path import relpath as _relpath -from distutils.extension import Extension -from distutils.util import strtobool -import zipfile - -try: - from collections.abc import Iterable -except ImportError: - from collections import Iterable - -try: - import gzip - gzip_open = gzip.open - gzip_ext = '.gz' -except ImportError: - gzip_open = open - gzip_ext = '' - -try: - import zlib - zipfile_compression_mode = zipfile.ZIP_DEFLATED -except ImportError: - zipfile_compression_mode = zipfile.ZIP_STORED - -try: - import pythran -except: - pythran = None - -from .. import Utils -from ..Utils import (cached_function, cached_method, path_exists, - safe_makedirs, copy_file_to_dir_if_newer, is_package_dir, replace_suffix) -from ..Compiler.Main import Context, CompilationOptions, default_options - -join_path = cached_function(os.path.join) -copy_once_if_newer = cached_function(copy_file_to_dir_if_newer) -safe_makedirs_once = cached_function(safe_makedirs) - -if sys.version_info[0] < 3: - # stupid Py2 distutils enforces str type in list of sources - _fs_encoding = sys.getfilesystemencoding() - if _fs_encoding is None: - _fs_encoding = sys.getdefaultencoding() - def encode_filename_in_py2(filename): - if not isinstance(filename, bytes): - return filename.encode(_fs_encoding) - return filename -else: - def encode_filename_in_py2(filename): - return filename - basestring = str - - -def _make_relative(file_paths, base=None): - if not base: - base = os.getcwd() - if base[-1] != os.path.sep: - base += os.path.sep - return [_relpath(path, base) if path.startswith(base) else path - for path in file_paths] - - -def extended_iglob(pattern): - if '{' in pattern: - m = re.match('(.*){([^}]+)}(.*)', pattern) - if m: - before, switch, after = m.groups() - for case in switch.split(','): - for path in extended_iglob(before + case + after): - yield path - return - if '**/' in pattern: - seen = set() - first, rest = pattern.split('**/', 1) - if first: - first = iglob(first+'/') - else: - first = [''] - for root in first: - for path in extended_iglob(join_path(root, rest)): - if path not in seen: - seen.add(path) - yield path - for path in extended_iglob(join_path(root, '*', '**/' + rest)): - if path not in seen: - seen.add(path) - yield path - else: - for path in iglob(pattern): - yield path - - -def nonempty(it, error_msg="expected non-empty iterator"): - empty = True - for value in it: - empty = False - yield value - if empty: - raise ValueError(error_msg) - - -@cached_function -def file_hash(filename): - path = os.path.normpath(filename) - prefix = ('%d:%s' % (len(path), path)).encode("UTF-8") - m = hashlib.md5(prefix) - with open(path, 'rb') as f: - data = f.read(65000) - while data: - m.update(data) - data = f.read(65000) - return m.hexdigest() - - -def update_pythran_extension(ext): - if pythran is None: - raise RuntimeError("You first need to install Pythran to use the np_pythran directive.") - try: - pythran_ext = pythran.config.make_extension(python=True) - except TypeError: # older pythran version only - pythran_ext = pythran.config.make_extension() - - ext.include_dirs.extend(pythran_ext['include_dirs']) - ext.extra_compile_args.extend(pythran_ext['extra_compile_args']) - ext.extra_link_args.extend(pythran_ext['extra_link_args']) - ext.define_macros.extend(pythran_ext['define_macros']) - ext.undef_macros.extend(pythran_ext['undef_macros']) - ext.library_dirs.extend(pythran_ext['library_dirs']) - ext.libraries.extend(pythran_ext['libraries']) - ext.language = 'c++' - - # These options are not compatible with the way normal Cython extensions work - for bad_option in ["-fwhole-program", "-fvisibility=hidden"]: - try: - ext.extra_compile_args.remove(bad_option) - except ValueError: - pass - - -def parse_list(s): - """ - >>> parse_list("") - [] - >>> parse_list("a") - ['a'] - >>> parse_list("a b c") - ['a', 'b', 'c'] - >>> parse_list("[a, b, c]") - ['a', 'b', 'c'] - >>> parse_list('a " " b') - ['a', ' ', 'b'] - >>> parse_list('[a, ",a", "a,", ",", ]') - ['a', ',a', 'a,', ','] - """ - if len(s) >= 2 and s[0] == '[' and s[-1] == ']': - s = s[1:-1] - delimiter = ',' - else: - delimiter = ' ' - s, literals = strip_string_literals(s) - def unquote(literal): - literal = literal.strip() - if literal[0] in "'\"": - return literals[literal[1:-1]] - else: - return literal - return [unquote(item) for item in s.split(delimiter) if item.strip()] - - -transitive_str = object() -transitive_list = object() -bool_or = object() - -distutils_settings = { - 'name': str, - 'sources': list, - 'define_macros': list, - 'undef_macros': list, - 'libraries': transitive_list, - 'library_dirs': transitive_list, - 'runtime_library_dirs': transitive_list, - 'include_dirs': transitive_list, - 'extra_objects': list, - 'extra_compile_args': transitive_list, - 'extra_link_args': transitive_list, - 'export_symbols': list, - 'depends': transitive_list, - 'language': transitive_str, - 'np_pythran': bool_or -} - - -@cython.locals(start=cython.Py_ssize_t, end=cython.Py_ssize_t) -def line_iter(source): - if isinstance(source, basestring): - start = 0 - while True: - end = source.find('\n', start) - if end == -1: - yield source[start:] - return - yield source[start:end] - start = end+1 - else: - for line in source: - yield line - - -class DistutilsInfo(object): - - def __init__(self, source=None, exn=None): - self.values = {} - if source is not None: - for line in line_iter(source): - line = line.lstrip() - if not line: - continue - if line[0] != '#': - break - line = line[1:].lstrip() - kind = next((k for k in ("distutils:","cython:") if line.startswith(k)), None) - if kind is not None: - key, _, value = [s.strip() for s in line[len(kind):].partition('=')] - type = distutils_settings.get(key, None) - if line.startswith("cython:") and type is None: continue - if type in (list, transitive_list): - value = parse_list(value) - if key == 'define_macros': - value = [tuple(macro.split('=', 1)) - if '=' in macro else (macro, None) - for macro in value] - if type is bool_or: - value = strtobool(value) - self.values[key] = value - elif exn is not None: - for key in distutils_settings: - if key in ('name', 'sources','np_pythran'): - continue - value = getattr(exn, key, None) - if value: - self.values[key] = value - - def merge(self, other): - if other is None: - return self - for key, value in other.values.items(): - type = distutils_settings[key] - if type is transitive_str and key not in self.values: - self.values[key] = value - elif type is transitive_list: - if key in self.values: - # Change a *copy* of the list (Trac #845) - all = self.values[key][:] - for v in value: - if v not in all: - all.append(v) - value = all - self.values[key] = value - elif type is bool_or: - self.values[key] = self.values.get(key, False) | value - return self - - def subs(self, aliases): - if aliases is None: - return self - resolved = DistutilsInfo() - for key, value in self.values.items(): - type = distutils_settings[key] - if type in [list, transitive_list]: - new_value_list = [] - for v in value: - if v in aliases: - v = aliases[v] - if isinstance(v, list): - new_value_list += v - else: - new_value_list.append(v) - value = new_value_list - else: - if value in aliases: - value = aliases[value] - resolved.values[key] = value - return resolved - - def apply(self, extension): - for key, value in self.values.items(): - type = distutils_settings[key] - if type in [list, transitive_list]: - value = getattr(extension, key) + list(value) - setattr(extension, key, value) - - -@cython.locals(start=cython.Py_ssize_t, q=cython.Py_ssize_t, - single_q=cython.Py_ssize_t, double_q=cython.Py_ssize_t, - hash_mark=cython.Py_ssize_t, end=cython.Py_ssize_t, - k=cython.Py_ssize_t, counter=cython.Py_ssize_t, quote_len=cython.Py_ssize_t) -def strip_string_literals(code, prefix='__Pyx_L'): - """ - Normalizes every string literal to be of the form '__Pyx_Lxxx', - returning the normalized code and a mapping of labels to - string literals. - """ - new_code = [] - literals = {} - counter = 0 - start = q = 0 - in_quote = False - hash_mark = single_q = double_q = -1 - code_len = len(code) - quote_type = None - quote_len = -1 - - while True: - if hash_mark < q: - hash_mark = code.find('#', q) - if single_q < q: - single_q = code.find("'", q) - if double_q < q: - double_q = code.find('"', q) - q = min(single_q, double_q) - if q == -1: - q = max(single_q, double_q) - - # We're done. - if q == -1 and hash_mark == -1: - new_code.append(code[start:]) - break - - # Try to close the quote. - elif in_quote: - if code[q-1] == u'\\': - k = 2 - while q >= k and code[q-k] == u'\\': - k += 1 - if k % 2 == 0: - q += 1 - continue - if code[q] == quote_type and ( - quote_len == 1 or (code_len > q + 2 and quote_type == code[q+1] == code[q+2])): - counter += 1 - label = "%s%s_" % (prefix, counter) - literals[label] = code[start+quote_len:q] - full_quote = code[q:q+quote_len] - new_code.append(full_quote) - new_code.append(label) - new_code.append(full_quote) - q += quote_len - in_quote = False - start = q - else: - q += 1 - - # Process comment. - elif -1 != hash_mark and (hash_mark < q or q == -1): - new_code.append(code[start:hash_mark+1]) - end = code.find('\n', hash_mark) - counter += 1 - label = "%s%s_" % (prefix, counter) - if end == -1: - end_or_none = None - else: - end_or_none = end - literals[label] = code[hash_mark+1:end_or_none] - new_code.append(label) - if end == -1: - break - start = q = end - - # Open the quote. - else: - if code_len >= q+3 and (code[q] == code[q+1] == code[q+2]): - quote_len = 3 - else: - quote_len = 1 - in_quote = True - quote_type = code[q] - new_code.append(code[start:q]) - start = q - q += quote_len - - return "".join(new_code), literals - - -# We need to allow spaces to allow for conditional compilation like -# IF ...: -# cimport ... -dependency_regex = re.compile(r"(?:^\s*from +([0-9a-zA-Z_.]+) +cimport)|" - r"(?:^\s*cimport +([0-9a-zA-Z_.]+(?: *, *[0-9a-zA-Z_.]+)*))|" - r"(?:^\s*cdef +extern +from +['\"]([^'\"]+)['\"])|" - r"(?:^\s*include +['\"]([^'\"]+)['\"])", re.M) -dependency_after_from_regex = re.compile( - r"(?:^\s+\(([0-9a-zA-Z_., ]*)\)[#\n])|" - r"(?:^\s+([0-9a-zA-Z_., ]*)[#\n])", - re.M) - - -def normalize_existing(base_path, rel_paths): - return normalize_existing0(os.path.dirname(base_path), tuple(set(rel_paths))) - - -@cached_function -def normalize_existing0(base_dir, rel_paths): - """ - Given some base directory ``base_dir`` and a list of path names - ``rel_paths``, normalize each relative path name ``rel`` by - replacing it by ``os.path.join(base, rel)`` if that file exists. - - Return a couple ``(normalized, needed_base)`` where ``normalized`` - if the list of normalized file names and ``needed_base`` is - ``base_dir`` if we actually needed ``base_dir``. If no paths were - changed (for example, if all paths were already absolute), then - ``needed_base`` is ``None``. - """ - normalized = [] - needed_base = None - for rel in rel_paths: - if os.path.isabs(rel): - normalized.append(rel) - continue - path = join_path(base_dir, rel) - if path_exists(path): - normalized.append(os.path.normpath(path)) - needed_base = base_dir - else: - normalized.append(rel) - return (normalized, needed_base) - - -def resolve_depends(depends, include_dirs): - include_dirs = tuple(include_dirs) - resolved = [] - for depend in depends: - path = resolve_depend(depend, include_dirs) - if path is not None: - resolved.append(path) - return resolved - - -@cached_function -def resolve_depend(depend, include_dirs): - if depend[0] == '<' and depend[-1] == '>': - return None - for dir in include_dirs: - path = join_path(dir, depend) - if path_exists(path): - return os.path.normpath(path) - return None - - -@cached_function -def package(filename): - dir = os.path.dirname(os.path.abspath(str(filename))) - if dir != filename and is_package_dir(dir): - return package(dir) + (os.path.basename(dir),) - else: - return () - - -@cached_function -def fully_qualified_name(filename): - module = os.path.splitext(os.path.basename(filename))[0] - return '.'.join(package(filename) + (module,)) - - -@cached_function -def parse_dependencies(source_filename): - # Actual parsing is way too slow, so we use regular expressions. - # The only catch is that we must strip comments and string - # literals ahead of time. - with Utils.open_source_file(source_filename, error_handling='ignore') as fh: - source = fh.read() - distutils_info = DistutilsInfo(source) - source, literals = strip_string_literals(source) - source = source.replace('\\\n', ' ').replace('\t', ' ') - - # TODO: pure mode - cimports = [] - includes = [] - externs = [] - for m in dependency_regex.finditer(source): - cimport_from, cimport_list, extern, include = m.groups() - if cimport_from: - cimports.append(cimport_from) - m_after_from = dependency_after_from_regex.search(source, pos=m.end()) - if m_after_from: - multiline, one_line = m_after_from.groups() - subimports = multiline or one_line - cimports.extend("{0}.{1}".format(cimport_from, s.strip()) - for s in subimports.split(',')) - - elif cimport_list: - cimports.extend(x.strip() for x in cimport_list.split(",")) - elif extern: - externs.append(literals[extern]) - else: - includes.append(literals[include]) - return cimports, includes, externs, distutils_info - - -class DependencyTree(object): - - def __init__(self, context, quiet=False): - self.context = context - self.quiet = quiet - self._transitive_cache = {} - - def parse_dependencies(self, source_filename): - if path_exists(source_filename): - source_filename = os.path.normpath(source_filename) - return parse_dependencies(source_filename) - - @cached_method - def included_files(self, filename): - # This is messy because included files are textually included, resolving - # cimports (but not includes) relative to the including file. - all = set() - for include in self.parse_dependencies(filename)[1]: - include_path = join_path(os.path.dirname(filename), include) - if not path_exists(include_path): - include_path = self.context.find_include_file(include, None) - if include_path: - if '.' + os.path.sep in include_path: - include_path = os.path.normpath(include_path) - all.add(include_path) - all.update(self.included_files(include_path)) - elif not self.quiet: - print("Unable to locate '%s' referenced from '%s'" % (filename, include)) - return all - - @cached_method - def cimports_externs_incdirs(self, filename): - # This is really ugly. Nested cimports are resolved with respect to the - # includer, but includes are resolved with respect to the includee. - cimports, includes, externs = self.parse_dependencies(filename)[:3] - cimports = set(cimports) - externs = set(externs) - incdirs = set() - for include in self.included_files(filename): - included_cimports, included_externs, included_incdirs = self.cimports_externs_incdirs(include) - cimports.update(included_cimports) - externs.update(included_externs) - incdirs.update(included_incdirs) - externs, incdir = normalize_existing(filename, externs) - if incdir: - incdirs.add(incdir) - return tuple(cimports), externs, incdirs - - def cimports(self, filename): - return self.cimports_externs_incdirs(filename)[0] - - def package(self, filename): - return package(filename) - - def fully_qualified_name(self, filename): - return fully_qualified_name(filename) - - @cached_method - def find_pxd(self, module, filename=None): - is_relative = module[0] == '.' - if is_relative and not filename: - raise NotImplementedError("New relative imports.") - if filename is not None: - module_path = module.split('.') - if is_relative: - module_path.pop(0) # just explicitly relative - package_path = list(self.package(filename)) - while module_path and not module_path[0]: - try: - package_path.pop() - except IndexError: - return None # FIXME: error? - module_path.pop(0) - relative = '.'.join(package_path + module_path) - pxd = self.context.find_pxd_file(relative, None) - if pxd: - return pxd - if is_relative: - return None # FIXME: error? - return self.context.find_pxd_file(module, None) - - @cached_method - def cimported_files(self, filename): - if filename[-4:] == '.pyx' and path_exists(filename[:-4] + '.pxd'): - pxd_list = [filename[:-4] + '.pxd'] - else: - pxd_list = [] - # Cimports generates all possible combinations package.module - # when imported as from package cimport module. - for module in self.cimports(filename): - if module[:7] == 'cython.' or module == 'cython': - continue - pxd_file = self.find_pxd(module, filename) - if pxd_file is not None: - pxd_list.append(pxd_file) - return tuple(pxd_list) - - @cached_method - def immediate_dependencies(self, filename): - all = set([filename]) - all.update(self.cimported_files(filename)) - all.update(self.included_files(filename)) - return all - - def all_dependencies(self, filename): - return self.transitive_merge(filename, self.immediate_dependencies, set.union) - - @cached_method - def timestamp(self, filename): - return os.path.getmtime(filename) - - def extract_timestamp(self, filename): - return self.timestamp(filename), filename - - def newest_dependency(self, filename): - return max([self.extract_timestamp(f) for f in self.all_dependencies(filename)]) - - def transitive_fingerprint(self, filename, module, compilation_options): - r""" - Return a fingerprint of a cython file that is about to be cythonized. - - Fingerprints are looked up in future compilations. If the fingerprint - is found, the cythonization can be skipped. The fingerprint must - incorporate everything that has an influence on the generated code. - """ - try: - m = hashlib.md5(__version__.encode('UTF-8')) - m.update(file_hash(filename).encode('UTF-8')) - for x in sorted(self.all_dependencies(filename)): - if os.path.splitext(x)[1] not in ('.c', '.cpp', '.h'): - m.update(file_hash(x).encode('UTF-8')) - # Include the module attributes that change the compilation result - # in the fingerprint. We do not iterate over module.__dict__ and - # include almost everything here as users might extend Extension - # with arbitrary (random) attributes that would lead to cache - # misses. - m.update(str(( - module.language, - getattr(module, 'py_limited_api', False), - getattr(module, 'np_pythran', False) - )).encode('UTF-8')) - - m.update(compilation_options.get_fingerprint().encode('UTF-8')) - return m.hexdigest() - except IOError: - return None - - def distutils_info0(self, filename): - info = self.parse_dependencies(filename)[3] - kwds = info.values - cimports, externs, incdirs = self.cimports_externs_incdirs(filename) - basedir = os.getcwd() - # Add dependencies on "cdef extern from ..." files - if externs: - externs = _make_relative(externs, basedir) - if 'depends' in kwds: - kwds['depends'] = list(set(kwds['depends']).union(externs)) - else: - kwds['depends'] = list(externs) - # Add include_dirs to ensure that the C compiler will find the - # "cdef extern from ..." files - if incdirs: - include_dirs = list(kwds.get('include_dirs', [])) - for inc in _make_relative(incdirs, basedir): - if inc not in include_dirs: - include_dirs.append(inc) - kwds['include_dirs'] = include_dirs - return info - - def distutils_info(self, filename, aliases=None, base=None): - return (self.transitive_merge(filename, self.distutils_info0, DistutilsInfo.merge) - .subs(aliases) - .merge(base)) - - def transitive_merge(self, node, extract, merge): - try: - seen = self._transitive_cache[extract, merge] - except KeyError: - seen = self._transitive_cache[extract, merge] = {} - return self.transitive_merge_helper( - node, extract, merge, seen, {}, self.cimported_files)[0] - - def transitive_merge_helper(self, node, extract, merge, seen, stack, outgoing): - if node in seen: - return seen[node], None - deps = extract(node) - if node in stack: - return deps, node - try: - stack[node] = len(stack) - loop = None - for next in outgoing(node): - sub_deps, sub_loop = self.transitive_merge_helper(next, extract, merge, seen, stack, outgoing) - if sub_loop is not None: - if loop is not None and stack[loop] < stack[sub_loop]: - pass - else: - loop = sub_loop - deps = merge(deps, sub_deps) - if loop == node: - loop = None - if loop is None: - seen[node] = deps - return deps, loop - finally: - del stack[node] - - -_dep_tree = None - -def create_dependency_tree(ctx=None, quiet=False): - global _dep_tree - if _dep_tree is None: - if ctx is None: - ctx = Context(["."], CompilationOptions(default_options)) - _dep_tree = DependencyTree(ctx, quiet=quiet) - return _dep_tree - - -# If this changes, change also docs/src/reference/compilation.rst -# which mentions this function -def default_create_extension(template, kwds): - if 'depends' in kwds: - include_dirs = kwds.get('include_dirs', []) + ["."] - depends = resolve_depends(kwds['depends'], include_dirs) - kwds['depends'] = sorted(set(depends + template.depends)) - - t = template.__class__ - ext = t(**kwds) - metadata = dict(distutils=kwds, module_name=kwds['name']) - return (ext, metadata) - - -# This may be useful for advanced users? -def create_extension_list(patterns, exclude=None, ctx=None, aliases=None, quiet=False, language=None, - exclude_failures=False): - if language is not None: - print('Warning: passing language={0!r} to cythonize() is deprecated. ' - 'Instead, put "# distutils: language={0}" in your .pyx or .pxd file(s)'.format(language)) - if exclude is None: - exclude = [] - if patterns is None: - return [], {} - elif isinstance(patterns, basestring) or not isinstance(patterns, Iterable): - patterns = [patterns] - explicit_modules = set([m.name for m in patterns if isinstance(m, Extension)]) - seen = set() - deps = create_dependency_tree(ctx, quiet=quiet) - to_exclude = set() - if not isinstance(exclude, list): - exclude = [exclude] - for pattern in exclude: - to_exclude.update(map(os.path.abspath, extended_iglob(pattern))) - - module_list = [] - module_metadata = {} - - # workaround for setuptools - if 'setuptools' in sys.modules: - Extension_distutils = sys.modules['setuptools.extension']._Extension - Extension_setuptools = sys.modules['setuptools'].Extension - else: - # dummy class, in case we do not have setuptools - Extension_distutils = Extension - class Extension_setuptools(Extension): pass - - # if no create_extension() function is defined, use a simple - # default function. - create_extension = ctx.options.create_extension or default_create_extension - - for pattern in patterns: - if isinstance(pattern, str): - filepattern = pattern - template = Extension(pattern, []) # Fake Extension without sources - name = '*' - base = None - ext_language = language - elif isinstance(pattern, (Extension_distutils, Extension_setuptools)): - cython_sources = [s for s in pattern.sources - if os.path.splitext(s)[1] in ('.py', '.pyx')] - if cython_sources: - filepattern = cython_sources[0] - if len(cython_sources) > 1: - print("Warning: Multiple cython sources found for extension '%s': %s\n" - "See http://cython.readthedocs.io/en/latest/src/userguide/sharing_declarations.html " - "for sharing declarations among Cython files." % (pattern.name, cython_sources)) - else: - # ignore non-cython modules - module_list.append(pattern) - continue - template = pattern - name = template.name - base = DistutilsInfo(exn=template) - ext_language = None # do not override whatever the Extension says - else: - msg = str("pattern is not of type str nor subclass of Extension (%s)" - " but of type %s and class %s" % (repr(Extension), - type(pattern), - pattern.__class__)) - raise TypeError(msg) - - for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern): - if os.path.abspath(file) in to_exclude: - continue - module_name = deps.fully_qualified_name(file) - if '*' in name: - if module_name in explicit_modules: - continue - elif name: - module_name = name - - Utils.raise_error_if_module_name_forbidden(module_name) - - if module_name not in seen: - try: - kwds = deps.distutils_info(file, aliases, base).values - except Exception: - if exclude_failures: - continue - raise - if base is not None: - for key, value in base.values.items(): - if key not in kwds: - kwds[key] = value - - kwds['name'] = module_name - - sources = [file] + [m for m in template.sources if m != filepattern] - if 'sources' in kwds: - # allow users to add .c files etc. - for source in kwds['sources']: - source = encode_filename_in_py2(source) - if source not in sources: - sources.append(source) - kwds['sources'] = sources - - if ext_language and 'language' not in kwds: - kwds['language'] = ext_language - - np_pythran = kwds.pop('np_pythran', False) - - # Create the new extension - m, metadata = create_extension(template, kwds) - m.np_pythran = np_pythran or getattr(m, 'np_pythran', False) - if m.np_pythran: - update_pythran_extension(m) - module_list.append(m) - - # Store metadata (this will be written as JSON in the - # generated C file but otherwise has no purpose) - module_metadata[module_name] = metadata - - if file not in m.sources: - # Old setuptools unconditionally replaces .pyx with .c/.cpp - target_file = os.path.splitext(file)[0] + ('.cpp' if m.language == 'c++' else '.c') - try: - m.sources.remove(target_file) - except ValueError: - # never seen this in the wild, but probably better to warn about this unexpected case - print("Warning: Cython source file not found in sources list, adding %s" % file) - m.sources.insert(0, file) - seen.add(name) - return module_list, module_metadata - - -# This is the user-exposed entry point. -def cythonize(module_list, exclude=None, nthreads=0, aliases=None, quiet=False, force=False, language=None, - exclude_failures=False, **options): - """ - Compile a set of source modules into C/C++ files and return a list of distutils - Extension objects for them. - - :param module_list: As module list, pass either a glob pattern, a list of glob - patterns or a list of Extension objects. The latter - allows you to configure the extensions separately - through the normal distutils options. - You can also pass Extension objects that have - glob patterns as their sources. Then, cythonize - will resolve the pattern and create a - copy of the Extension for every matching file. - - :param exclude: When passing glob patterns as ``module_list``, you can exclude certain - module names explicitly by passing them into the ``exclude`` option. - - :param nthreads: The number of concurrent builds for parallel compilation - (requires the ``multiprocessing`` module). - - :param aliases: If you want to use compiler directives like ``# distutils: ...`` but - can only know at compile time (when running the ``setup.py``) which values - to use, you can use aliases and pass a dictionary mapping those aliases - to Python strings when calling :func:`cythonize`. As an example, say you - want to use the compiler - directive ``# distutils: include_dirs = ../static_libs/include/`` - but this path isn't always fixed and you want to find it when running - the ``setup.py``. You can then do ``# distutils: include_dirs = MY_HEADERS``, - find the value of ``MY_HEADERS`` in the ``setup.py``, put it in a python - variable called ``foo`` as a string, and then call - ``cythonize(..., aliases={'MY_HEADERS': foo})``. - - :param quiet: If True, Cython won't print error, warning, or status messages during the - compilation. - - :param force: Forces the recompilation of the Cython modules, even if the timestamps - don't indicate that a recompilation is necessary. - - :param language: To globally enable C++ mode, you can pass ``language='c++'``. Otherwise, this - will be determined at a per-file level based on compiler directives. This - affects only modules found based on file names. Extension instances passed - into :func:`cythonize` will not be changed. It is recommended to rather - use the compiler directive ``# distutils: language = c++`` than this option. - - :param exclude_failures: For a broad 'try to compile' mode that ignores compilation - failures and simply excludes the failed extensions, - pass ``exclude_failures=True``. Note that this only - really makes sense for compiling ``.py`` files which can also - be used without compilation. - - :param annotate: If ``True``, will produce a HTML file for each of the ``.pyx`` or ``.py`` - files compiled. The HTML file gives an indication - of how much Python interaction there is in - each of the source code lines, compared to plain C code. - It also allows you to see the C/C++ code - generated for each line of Cython code. This report is invaluable when - optimizing a function for speed, - and for determining when to :ref:`release the GIL `: - in general, a ``nogil`` block may contain only "white" code. - See examples in :ref:`determining_where_to_add_types` or - :ref:`primes`. - - :param compiler_directives: Allow to set compiler directives in the ``setup.py`` like this: - ``compiler_directives={'embedsignature': True}``. - See :ref:`compiler-directives`. - - :param depfile: produce depfiles for the sources if True. - """ - if exclude is None: - exclude = [] - if 'include_path' not in options: - options['include_path'] = ['.'] - if 'common_utility_include_dir' in options: - safe_makedirs(options['common_utility_include_dir']) - - depfile = options.pop('depfile', None) - - if pythran is None: - pythran_options = None - else: - pythran_options = CompilationOptions(**options) - pythran_options.cplus = True - pythran_options.np_pythran = True - - c_options = CompilationOptions(**options) - cpp_options = CompilationOptions(**options); cpp_options.cplus = True - ctx = c_options.create_context() - options = c_options - module_list, module_metadata = create_extension_list( - module_list, - exclude=exclude, - ctx=ctx, - quiet=quiet, - exclude_failures=exclude_failures, - language=language, - aliases=aliases) - deps = create_dependency_tree(ctx, quiet=quiet) - build_dir = getattr(options, 'build_dir', None) - - def copy_to_build_dir(filepath, root=os.getcwd()): - filepath_abs = os.path.abspath(filepath) - if os.path.isabs(filepath): - filepath = filepath_abs - if filepath_abs.startswith(root): - # distutil extension depends are relative to cwd - mod_dir = join_path(build_dir, - os.path.dirname(_relpath(filepath, root))) - copy_once_if_newer(filepath_abs, mod_dir) - - modules_by_cfile = collections.defaultdict(list) - to_compile = [] - for m in module_list: - if build_dir: - for dep in m.depends: - copy_to_build_dir(dep) - - cy_sources = [ - source for source in m.sources - if os.path.splitext(source)[1] in ('.pyx', '.py')] - if len(cy_sources) == 1: - # normal "special" case: believe the Extension module name to allow user overrides - full_module_name = m.name - else: - # infer FQMN from source files - full_module_name = None - - new_sources = [] - for source in m.sources: - base, ext = os.path.splitext(source) - if ext in ('.pyx', '.py'): - if m.np_pythran: - c_file = base + '.cpp' - options = pythran_options - elif m.language == 'c++': - c_file = base + '.cpp' - options = cpp_options - else: - c_file = base + '.c' - options = c_options - - # setup for out of place build directory if enabled - if build_dir: - if os.path.isabs(c_file): - warnings.warn("build_dir has no effect for absolute source paths") - c_file = os.path.join(build_dir, c_file) - dir = os.path.dirname(c_file) - safe_makedirs_once(dir) - - # write out the depfile, if requested - if depfile: - dependencies = deps.all_dependencies(source) - src_base_dir, _ = os.path.split(source) - if not src_base_dir.endswith(os.sep): - src_base_dir += os.sep - # paths below the base_dir are relative, otherwise absolute - paths = [] - for fname in dependencies: - if (fname.startswith(src_base_dir) or - fname.startswith('.' + os.path.sep)): - paths.append(os.path.relpath(fname, src_base_dir)) - else: - paths.append(os.path.abspath(fname)) - - depline = os.path.split(c_file)[1] + ": \\\n " - depline += " \\\n ".join(paths) + "\n" - with open(c_file+'.dep', 'w') as outfile: - outfile.write(depline) - - if os.path.exists(c_file): - c_timestamp = os.path.getmtime(c_file) - else: - c_timestamp = -1 - - # Priority goes first to modified files, second to direct - # dependents, and finally to indirect dependents. - if c_timestamp < deps.timestamp(source): - dep_timestamp, dep = deps.timestamp(source), source - priority = 0 - else: - dep_timestamp, dep = deps.newest_dependency(source) - priority = 2 - (dep in deps.immediate_dependencies(source)) - if force or c_timestamp < dep_timestamp: - if not quiet and not force: - if source == dep: - print("Compiling %s because it changed." % source) - else: - print("Compiling %s because it depends on %s." % (source, dep)) - if not force and options.cache: - fingerprint = deps.transitive_fingerprint(source, m, options) - else: - fingerprint = None - to_compile.append(( - priority, source, c_file, fingerprint, quiet, - options, not exclude_failures, module_metadata.get(m.name), - full_module_name)) - new_sources.append(c_file) - modules_by_cfile[c_file].append(m) - else: - new_sources.append(source) - if build_dir: - copy_to_build_dir(source) - m.sources = new_sources - - if options.cache: - if not os.path.exists(options.cache): - os.makedirs(options.cache) - to_compile.sort() - # Drop "priority" component of "to_compile" entries and add a - # simple progress indicator. - N = len(to_compile) - progress_fmt = "[{0:%d}/{1}] " % len(str(N)) - for i in range(N): - progress = progress_fmt.format(i+1, N) - to_compile[i] = to_compile[i][1:] + (progress,) - - if N <= 1: - nthreads = 0 - if nthreads: - # Requires multiprocessing (or Python >= 2.6) - try: - import multiprocessing - pool = multiprocessing.Pool( - nthreads, initializer=_init_multiprocessing_helper) - except (ImportError, OSError): - print("multiprocessing required for parallel cythonization") - nthreads = 0 - else: - # This is a bit more involved than it should be, because KeyboardInterrupts - # break the multiprocessing workers when using a normal pool.map(). - # See, for example: - # http://noswap.com/blog/python-multiprocessing-keyboardinterrupt - try: - result = pool.map_async(cythonize_one_helper, to_compile, chunksize=1) - pool.close() - while not result.ready(): - try: - result.get(99999) # seconds - except multiprocessing.TimeoutError: - pass - except KeyboardInterrupt: - pool.terminate() - raise - pool.join() - if not nthreads: - for args in to_compile: - cythonize_one(*args) - - if exclude_failures: - failed_modules = set() - for c_file, modules in modules_by_cfile.items(): - if not os.path.exists(c_file): - failed_modules.update(modules) - elif os.path.getsize(c_file) < 200: - f = io_open(c_file, 'r', encoding='iso8859-1') - try: - if f.read(len('#error ')) == '#error ': - # dead compilation result - failed_modules.update(modules) - finally: - f.close() - if failed_modules: - for module in failed_modules: - module_list.remove(module) - print("Failed compilations: %s" % ', '.join(sorted([ - module.name for module in failed_modules]))) - - if options.cache: - cleanup_cache(options.cache, getattr(options, 'cache_size', 1024 * 1024 * 100)) - # cythonize() is often followed by the (non-Python-buffered) - # compiler output, flush now to avoid interleaving output. - sys.stdout.flush() - return module_list - - -if os.environ.get('XML_RESULTS'): - compile_result_dir = os.environ['XML_RESULTS'] - def record_results(func): - def with_record(*args): - t = time.time() - success = True - try: - try: - func(*args) - except: - success = False - finally: - t = time.time() - t - module = fully_qualified_name(args[0]) - name = "cythonize." + module - failures = 1 - success - if success: - failure_item = "" - else: - failure_item = "failure" - output = open(os.path.join(compile_result_dir, name + ".xml"), "w") - output.write(""" - - - - %(failure_item)s - - - """.strip() % locals()) - output.close() - return with_record -else: - def record_results(func): - return func - - -# TODO: Share context? Issue: pyx processing leaks into pxd module -@record_results -def cythonize_one(pyx_file, c_file, fingerprint, quiet, options=None, - raise_on_failure=True, embedded_metadata=None, full_module_name=None, - progress=""): - from ..Compiler.Main import compile_single, default_options - from ..Compiler.Errors import CompileError, PyrexError - - if fingerprint: - if not os.path.exists(options.cache): - safe_makedirs(options.cache) - # Cython-generated c files are highly compressible. - # (E.g. a compression ratio of about 10 for Sage). - fingerprint_file_base = join_path( - options.cache, "%s-%s" % (os.path.basename(c_file), fingerprint)) - gz_fingerprint_file = fingerprint_file_base + gzip_ext - zip_fingerprint_file = fingerprint_file_base + '.zip' - if os.path.exists(gz_fingerprint_file) or os.path.exists(zip_fingerprint_file): - if not quiet: - print("%sFound compiled %s in cache" % (progress, pyx_file)) - if os.path.exists(gz_fingerprint_file): - os.utime(gz_fingerprint_file, None) - with contextlib.closing(gzip_open(gz_fingerprint_file, 'rb')) as g: - with contextlib.closing(open(c_file, 'wb')) as f: - shutil.copyfileobj(g, f) - else: - os.utime(zip_fingerprint_file, None) - dirname = os.path.dirname(c_file) - with contextlib.closing(zipfile.ZipFile(zip_fingerprint_file)) as z: - for artifact in z.namelist(): - z.extract(artifact, os.path.join(dirname, artifact)) - return - if not quiet: - print("%sCythonizing %s" % (progress, pyx_file)) - if options is None: - options = CompilationOptions(default_options) - options.output_file = c_file - options.embedded_metadata = embedded_metadata - - any_failures = 0 - try: - result = compile_single(pyx_file, options, full_module_name=full_module_name) - if result.num_errors > 0: - any_failures = 1 - except (EnvironmentError, PyrexError) as e: - sys.stderr.write('%s\n' % e) - any_failures = 1 - # XXX - import traceback - traceback.print_exc() - except Exception: - if raise_on_failure: - raise - import traceback - traceback.print_exc() - any_failures = 1 - if any_failures: - if raise_on_failure: - raise CompileError(None, pyx_file) - elif os.path.exists(c_file): - os.remove(c_file) - elif fingerprint: - artifacts = list(filter(None, [ - getattr(result, attr, None) - for attr in ('c_file', 'h_file', 'api_file', 'i_file')])) - if len(artifacts) == 1: - fingerprint_file = gz_fingerprint_file - with contextlib.closing(open(c_file, 'rb')) as f: - with contextlib.closing(gzip_open(fingerprint_file + '.tmp', 'wb')) as g: - shutil.copyfileobj(f, g) - else: - fingerprint_file = zip_fingerprint_file - with contextlib.closing(zipfile.ZipFile( - fingerprint_file + '.tmp', 'w', zipfile_compression_mode)) as zip: - for artifact in artifacts: - zip.write(artifact, os.path.basename(artifact)) - os.rename(fingerprint_file + '.tmp', fingerprint_file) - - -def cythonize_one_helper(m): - import traceback - try: - return cythonize_one(*m) - except Exception: - traceback.print_exc() - raise - - -def _init_multiprocessing_helper(): - # KeyboardInterrupt kills workers, so don't let them get it - import signal - signal.signal(signal.SIGINT, signal.SIG_IGN) - - -def cleanup_cache(cache, target_size, ratio=.85): - try: - p = subprocess.Popen(['du', '-s', '-k', os.path.abspath(cache)], stdout=subprocess.PIPE) - res = p.wait() - if res == 0: - total_size = 1024 * int(p.stdout.read().strip().split()[0]) - if total_size < target_size: - return - except (OSError, ValueError): - pass - total_size = 0 - all = [] - for file in os.listdir(cache): - path = join_path(cache, file) - s = os.stat(path) - total_size += s.st_size - all.append((s.st_atime, s.st_size, path)) - if total_size > target_size: - for time, size, file in reversed(sorted(all)): - os.unlink(file) - total_size -= size - if total_size < target_size * ratio: - break diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Distutils.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Distutils.py deleted file mode 100644 index 3efcc0d7b51..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Distutils.py +++ /dev/null @@ -1 +0,0 @@ -from Cython.Distutils.build_ext import build_ext diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Inline.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Inline.py deleted file mode 100644 index db6d2640a5e..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Inline.py +++ /dev/null @@ -1,376 +0,0 @@ -from __future__ import absolute_import - -import hashlib -import inspect -import os -import re -import sys - -from distutils.core import Distribution, Extension -from distutils.command.build_ext import build_ext - -import Cython -from ..Compiler.Main import Context, default_options - -from ..Compiler.Visitor import CythonTransform, EnvTransform -from ..Compiler.ParseTreeTransforms import SkipDeclarations -from ..Compiler.TreeFragment import parse_from_strings -from ..Compiler.StringEncoding import _unicode -from .Dependencies import strip_string_literals, cythonize, cached_function -from ..Compiler import Pipeline -from ..Utils import get_cython_cache_dir -import cython as cython_module - - -IS_PY3 = sys.version_info >= (3,) - -# A utility function to convert user-supplied ASCII strings to unicode. -if not IS_PY3: - def to_unicode(s): - if isinstance(s, bytes): - return s.decode('ascii') - else: - return s -else: - to_unicode = lambda x: x - -if sys.version_info < (3, 5): - import imp - def load_dynamic(name, module_path): - return imp.load_dynamic(name, module_path) -else: - import importlib.util as _importlib_util - def load_dynamic(name, module_path): - spec = _importlib_util.spec_from_file_location(name, module_path) - module = _importlib_util.module_from_spec(spec) - # sys.modules[name] = module - spec.loader.exec_module(module) - return module - -class UnboundSymbols(EnvTransform, SkipDeclarations): - def __init__(self): - CythonTransform.__init__(self, None) - self.unbound = set() - def visit_NameNode(self, node): - if not self.current_env().lookup(node.name): - self.unbound.add(node.name) - return node - def __call__(self, node): - super(UnboundSymbols, self).__call__(node) - return self.unbound - - -@cached_function -def unbound_symbols(code, context=None): - code = to_unicode(code) - if context is None: - context = Context([], default_options) - from ..Compiler.ParseTreeTransforms import AnalyseDeclarationsTransform - tree = parse_from_strings('(tree fragment)', code) - for phase in Pipeline.create_pipeline(context, 'pyx'): - if phase is None: - continue - tree = phase(tree) - if isinstance(phase, AnalyseDeclarationsTransform): - break - try: - import builtins - except ImportError: - import __builtin__ as builtins - return tuple(UnboundSymbols()(tree) - set(dir(builtins))) - - -def unsafe_type(arg, context=None): - py_type = type(arg) - if py_type is int: - return 'long' - else: - return safe_type(arg, context) - - -def safe_type(arg, context=None): - py_type = type(arg) - if py_type in (list, tuple, dict, str): - return py_type.__name__ - elif py_type is complex: - return 'double complex' - elif py_type is float: - return 'double' - elif py_type is bool: - return 'bint' - elif 'numpy' in sys.modules and isinstance(arg, sys.modules['numpy'].ndarray): - return 'numpy.ndarray[numpy.%s_t, ndim=%s]' % (arg.dtype.name, arg.ndim) - else: - for base_type in py_type.__mro__: - if base_type.__module__ in ('__builtin__', 'builtins'): - return 'object' - module = context.find_module(base_type.__module__, need_pxd=False) - if module: - entry = module.lookup(base_type.__name__) - if entry.is_type: - return '%s.%s' % (base_type.__module__, base_type.__name__) - return 'object' - - -def _get_build_extension(): - dist = Distribution() - # Ensure the build respects distutils configuration by parsing - # the configuration files - config_files = dist.find_config_files() - dist.parse_config_files(config_files) - build_extension = build_ext(dist) - build_extension.finalize_options() - return build_extension - - -@cached_function -def _create_context(cython_include_dirs): - return Context(list(cython_include_dirs), default_options) - - -_cython_inline_cache = {} -_cython_inline_default_context = _create_context(('.',)) - - -def _populate_unbound(kwds, unbound_symbols, locals=None, globals=None): - for symbol in unbound_symbols: - if symbol not in kwds: - if locals is None or globals is None: - calling_frame = inspect.currentframe().f_back.f_back.f_back - if locals is None: - locals = calling_frame.f_locals - if globals is None: - globals = calling_frame.f_globals - if symbol in locals: - kwds[symbol] = locals[symbol] - elif symbol in globals: - kwds[symbol] = globals[symbol] - else: - print("Couldn't find %r" % symbol) - - -def _inline_key(orig_code, arg_sigs, language_level): - key = orig_code, arg_sigs, sys.version_info, sys.executable, language_level, Cython.__version__ - return hashlib.sha1(_unicode(key).encode('utf-8')).hexdigest() - - -def cython_inline(code, get_type=unsafe_type, - lib_dir=os.path.join(get_cython_cache_dir(), 'inline'), - cython_include_dirs=None, cython_compiler_directives=None, - force=False, quiet=False, locals=None, globals=None, language_level=None, **kwds): - - if get_type is None: - get_type = lambda x: 'object' - ctx = _create_context(tuple(cython_include_dirs)) if cython_include_dirs else _cython_inline_default_context - - cython_compiler_directives = dict(cython_compiler_directives) if cython_compiler_directives else {} - if language_level is None and 'language_level' not in cython_compiler_directives: - language_level = '3str' - if language_level is not None: - cython_compiler_directives['language_level'] = language_level - - # Fast path if this has been called in this session. - _unbound_symbols = _cython_inline_cache.get(code) - if _unbound_symbols is not None: - _populate_unbound(kwds, _unbound_symbols, locals, globals) - args = sorted(kwds.items()) - arg_sigs = tuple([(get_type(value, ctx), arg) for arg, value in args]) - key_hash = _inline_key(code, arg_sigs, language_level) - invoke = _cython_inline_cache.get((code, arg_sigs, key_hash)) - if invoke is not None: - arg_list = [arg[1] for arg in args] - return invoke(*arg_list) - - orig_code = code - code = to_unicode(code) - code, literals = strip_string_literals(code) - code = strip_common_indent(code) - if locals is None: - locals = inspect.currentframe().f_back.f_back.f_locals - if globals is None: - globals = inspect.currentframe().f_back.f_back.f_globals - try: - _cython_inline_cache[orig_code] = _unbound_symbols = unbound_symbols(code) - _populate_unbound(kwds, _unbound_symbols, locals, globals) - except AssertionError: - if not quiet: - # Parsing from strings not fully supported (e.g. cimports). - print("Could not parse code as a string (to extract unbound symbols).") - - cimports = [] - for name, arg in list(kwds.items()): - if arg is cython_module: - cimports.append('\ncimport cython as %s' % name) - del kwds[name] - arg_names = sorted(kwds) - arg_sigs = tuple([(get_type(kwds[arg], ctx), arg) for arg in arg_names]) - key_hash = _inline_key(orig_code, arg_sigs, language_level) - module_name = "_cython_inline_" + key_hash - - if module_name in sys.modules: - module = sys.modules[module_name] - - else: - build_extension = None - if cython_inline.so_ext is None: - # Figure out and cache current extension suffix - build_extension = _get_build_extension() - cython_inline.so_ext = build_extension.get_ext_filename('') - - module_path = os.path.join(lib_dir, module_name + cython_inline.so_ext) - - if not os.path.exists(lib_dir): - os.makedirs(lib_dir) - if force or not os.path.isfile(module_path): - cflags = [] - c_include_dirs = [] - qualified = re.compile(r'([.\w]+)[.]') - for type, _ in arg_sigs: - m = qualified.match(type) - if m: - cimports.append('\ncimport %s' % m.groups()[0]) - # one special case - if m.groups()[0] == 'numpy': - import numpy - c_include_dirs.append(numpy.get_include()) - # cflags.append('-Wno-unused') - module_body, func_body = extract_func_code(code) - params = ', '.join(['%s %s' % a for a in arg_sigs]) - module_code = """ -%(module_body)s -%(cimports)s -def __invoke(%(params)s): -%(func_body)s - return locals() - """ % {'cimports': '\n'.join(cimports), - 'module_body': module_body, - 'params': params, - 'func_body': func_body } - for key, value in literals.items(): - module_code = module_code.replace(key, value) - pyx_file = os.path.join(lib_dir, module_name + '.pyx') - fh = open(pyx_file, 'w') - try: - fh.write(module_code) - finally: - fh.close() - extension = Extension( - name = module_name, - sources = [pyx_file], - include_dirs = c_include_dirs, - extra_compile_args = cflags) - if build_extension is None: - build_extension = _get_build_extension() - build_extension.extensions = cythonize( - [extension], - include_path=cython_include_dirs or ['.'], - compiler_directives=cython_compiler_directives, - quiet=quiet) - build_extension.build_temp = os.path.dirname(pyx_file) - build_extension.build_lib = lib_dir - build_extension.run() - - module = load_dynamic(module_name, module_path) - - _cython_inline_cache[orig_code, arg_sigs, key_hash] = module.__invoke - arg_list = [kwds[arg] for arg in arg_names] - return module.__invoke(*arg_list) - - -# Cached suffix used by cython_inline above. None should get -# overridden with actual value upon the first cython_inline invocation -cython_inline.so_ext = None - -_find_non_space = re.compile('[^ ]').search - - -def strip_common_indent(code): - min_indent = None - lines = code.splitlines() - for line in lines: - match = _find_non_space(line) - if not match: - continue # blank - indent = match.start() - if line[indent] == '#': - continue # comment - if min_indent is None or min_indent > indent: - min_indent = indent - for ix, line in enumerate(lines): - match = _find_non_space(line) - if not match or not line or line[indent:indent+1] == '#': - continue - lines[ix] = line[min_indent:] - return '\n'.join(lines) - - -module_statement = re.compile(r'^((cdef +(extern|class))|cimport|(from .+ cimport)|(from .+ import +[*]))') -def extract_func_code(code): - module = [] - function = [] - current = function - code = code.replace('\t', ' ') - lines = code.split('\n') - for line in lines: - if not line.startswith(' '): - if module_statement.match(line): - current = module - else: - current = function - current.append(line) - return '\n'.join(module), ' ' + '\n '.join(function) - - -try: - from inspect import getcallargs -except ImportError: - def getcallargs(func, *arg_values, **kwd_values): - all = {} - args, varargs, kwds, defaults = inspect.getargspec(func) - if varargs is not None: - all[varargs] = arg_values[len(args):] - for name, value in zip(args, arg_values): - all[name] = value - for name, value in list(kwd_values.items()): - if name in args: - if name in all: - raise TypeError("Duplicate argument %s" % name) - all[name] = kwd_values.pop(name) - if kwds is not None: - all[kwds] = kwd_values - elif kwd_values: - raise TypeError("Unexpected keyword arguments: %s" % list(kwd_values)) - if defaults is None: - defaults = () - first_default = len(args) - len(defaults) - for ix, name in enumerate(args): - if name not in all: - if ix >= first_default: - all[name] = defaults[ix - first_default] - else: - raise TypeError("Missing argument: %s" % name) - return all - - -def get_body(source): - ix = source.index(':') - if source[:5] == 'lambda': - return "return %s" % source[ix+1:] - else: - return source[ix+1:] - - -# Lots to be done here... It would be especially cool if compiled functions -# could invoke each other quickly. -class RuntimeCompiledFunction(object): - - def __init__(self, f): - self._f = f - self._body = get_body(inspect.getsource(f)) - - def __call__(self, *args, **kwds): - all = getcallargs(self._f, *args, **kwds) - if IS_PY3: - return cython_inline(self._body, locals=self._f.__globals__, globals=self._f.__globals__, **all) - else: - return cython_inline(self._body, locals=self._f.func_globals, globals=self._f.func_globals, **all) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/IpythonMagic.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/IpythonMagic.py deleted file mode 100644 index 7abb97ec70a..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/IpythonMagic.py +++ /dev/null @@ -1,565 +0,0 @@ -# -*- coding: utf-8 -*- -""" -===================== -Cython related magics -===================== - -Magic command interface for interactive work with Cython - -.. note:: - - The ``Cython`` package needs to be installed separately. It - can be obtained using ``easy_install`` or ``pip``. - -Usage -===== - -To enable the magics below, execute ``%load_ext cython``. - -``%%cython`` - -{CYTHON_DOC} - -``%%cython_inline`` - -{CYTHON_INLINE_DOC} - -``%%cython_pyximport`` - -{CYTHON_PYXIMPORT_DOC} - -Author: -* Brian Granger - -Code moved from IPython and adapted by: -* Martín Gaitán - -Parts of this code were taken from Cython.inline. -""" -#----------------------------------------------------------------------------- -# Copyright (C) 2010-2011, IPython Development Team. -# -# Distributed under the terms of the Modified BSD License. -# -# The full license is in the file ipython-COPYING.rst, distributed with this software. -#----------------------------------------------------------------------------- - -from __future__ import absolute_import, print_function - -import imp -import io -import os -import re -import sys -import time -import copy -import distutils.log -import textwrap - -IO_ENCODING = sys.getfilesystemencoding() -IS_PY2 = sys.version_info[0] < 3 - -try: - reload -except NameError: # Python 3 - from imp import reload - -try: - import hashlib -except ImportError: - import md5 as hashlib - -from distutils.core import Distribution, Extension -from distutils.command.build_ext import build_ext - -from IPython.core import display -from IPython.core import magic_arguments -from IPython.core.magic import Magics, magics_class, cell_magic -try: - from IPython.paths import get_ipython_cache_dir -except ImportError: - # older IPython version - from IPython.utils.path import get_ipython_cache_dir -from IPython.utils.text import dedent - -from ..Shadow import __version__ as cython_version -from ..Compiler.Errors import CompileError -from .Inline import cython_inline -from .Dependencies import cythonize - - -PGO_CONFIG = { - 'gcc': { - 'gen': ['-fprofile-generate', '-fprofile-dir={TEMPDIR}'], - 'use': ['-fprofile-use', '-fprofile-correction', '-fprofile-dir={TEMPDIR}'], - }, - # blind copy from 'configure' script in CPython 3.7 - 'icc': { - 'gen': ['-prof-gen'], - 'use': ['-prof-use'], - } -} -PGO_CONFIG['mingw32'] = PGO_CONFIG['gcc'] - - -if IS_PY2: - def encode_fs(name): - return name if isinstance(name, bytes) else name.encode(IO_ENCODING) -else: - def encode_fs(name): - return name - - -@magics_class -class CythonMagics(Magics): - - def __init__(self, shell): - super(CythonMagics, self).__init__(shell) - self._reloads = {} - self._code_cache = {} - self._pyximport_installed = False - - def _import_all(self, module): - mdict = module.__dict__ - if '__all__' in mdict: - keys = mdict['__all__'] - else: - keys = [k for k in mdict if not k.startswith('_')] - - for k in keys: - try: - self.shell.push({k: mdict[k]}) - except KeyError: - msg = "'module' object has no attribute '%s'" % k - raise AttributeError(msg) - - @cell_magic - def cython_inline(self, line, cell): - """Compile and run a Cython code cell using Cython.inline. - - This magic simply passes the body of the cell to Cython.inline - and returns the result. If the variables `a` and `b` are defined - in the user's namespace, here is a simple example that returns - their sum:: - - %%cython_inline - return a+b - - For most purposes, we recommend the usage of the `%%cython` magic. - """ - locs = self.shell.user_global_ns - globs = self.shell.user_ns - return cython_inline(cell, locals=locs, globals=globs) - - @cell_magic - def cython_pyximport(self, line, cell): - """Compile and import a Cython code cell using pyximport. - - The contents of the cell are written to a `.pyx` file in the current - working directory, which is then imported using `pyximport`. This - magic requires a module name to be passed:: - - %%cython_pyximport modulename - def f(x): - return 2.0*x - - The compiled module is then imported and all of its symbols are - injected into the user's namespace. For most purposes, we recommend - the usage of the `%%cython` magic. - """ - module_name = line.strip() - if not module_name: - raise ValueError('module name must be given') - fname = module_name + '.pyx' - with io.open(fname, 'w', encoding='utf-8') as f: - f.write(cell) - if 'pyximport' not in sys.modules or not self._pyximport_installed: - import pyximport - pyximport.install() - self._pyximport_installed = True - if module_name in self._reloads: - module = self._reloads[module_name] - # Note: reloading extension modules is not actually supported - # (requires PEP-489 reinitialisation support). - # Don't know why this should ever have worked as it reads here. - # All we really need to do is to update the globals below. - #reload(module) - else: - __import__(module_name) - module = sys.modules[module_name] - self._reloads[module_name] = module - self._import_all(module) - - @magic_arguments.magic_arguments() - @magic_arguments.argument( - '-a', '--annotate', action='store_true', default=False, - help="Produce a colorized HTML version of the source." - ) - @magic_arguments.argument( - '-+', '--cplus', action='store_true', default=False, - help="Output a C++ rather than C file." - ) - @magic_arguments.argument( - '-3', dest='language_level', action='store_const', const=3, default=None, - help="Select Python 3 syntax." - ) - @magic_arguments.argument( - '-2', dest='language_level', action='store_const', const=2, default=None, - help="Select Python 2 syntax." - ) - @magic_arguments.argument( - '-f', '--force', action='store_true', default=False, - help="Force the compilation of a new module, even if the source has been " - "previously compiled." - ) - @magic_arguments.argument( - '-c', '--compile-args', action='append', default=[], - help="Extra flags to pass to compiler via the `extra_compile_args` " - "Extension flag (can be specified multiple times)." - ) - @magic_arguments.argument( - '--link-args', action='append', default=[], - help="Extra flags to pass to linker via the `extra_link_args` " - "Extension flag (can be specified multiple times)." - ) - @magic_arguments.argument( - '-l', '--lib', action='append', default=[], - help="Add a library to link the extension against (can be specified " - "multiple times)." - ) - @magic_arguments.argument( - '-n', '--name', - help="Specify a name for the Cython module." - ) - @magic_arguments.argument( - '-L', dest='library_dirs', metavar='dir', action='append', default=[], - help="Add a path to the list of library directories (can be specified " - "multiple times)." - ) - @magic_arguments.argument( - '-I', '--include', action='append', default=[], - help="Add a path to the list of include directories (can be specified " - "multiple times)." - ) - @magic_arguments.argument( - '-S', '--src', action='append', default=[], - help="Add a path to the list of src files (can be specified " - "multiple times)." - ) - @magic_arguments.argument( - '--pgo', dest='pgo', action='store_true', default=False, - help=("Enable profile guided optimisation in the C compiler. " - "Compiles the cell twice and executes it in between to generate a runtime profile.") - ) - @magic_arguments.argument( - '--verbose', dest='quiet', action='store_false', default=True, - help=("Print debug information like generated .c/.cpp file location " - "and exact gcc/g++ command invoked.") - ) - @cell_magic - def cython(self, line, cell): - """Compile and import everything from a Cython code cell. - - The contents of the cell are written to a `.pyx` file in the - directory `IPYTHONDIR/cython` using a filename with the hash of the - code. This file is then cythonized and compiled. The resulting module - is imported and all of its symbols are injected into the user's - namespace. The usage is similar to that of `%%cython_pyximport` but - you don't have to pass a module name:: - - %%cython - def f(x): - return 2.0*x - - To compile OpenMP codes, pass the required `--compile-args` - and `--link-args`. For example with gcc:: - - %%cython --compile-args=-fopenmp --link-args=-fopenmp - ... - - To enable profile guided optimisation, pass the ``--pgo`` option. - Note that the cell itself needs to take care of establishing a suitable - profile when executed. This can be done by implementing the functions to - optimise, and then calling them directly in the same cell on some realistic - training data like this:: - - %%cython --pgo - def critical_function(data): - for item in data: - ... - - # execute function several times to build profile - from somewhere import some_typical_data - for _ in range(100): - critical_function(some_typical_data) - - In Python 3.5 and later, you can distinguish between the profile and - non-profile runs as follows:: - - if "_pgo_" in __name__: - ... # execute critical code here - """ - args = magic_arguments.parse_argstring(self.cython, line) - code = cell if cell.endswith('\n') else cell + '\n' - lib_dir = os.path.join(get_ipython_cache_dir(), 'cython') - key = (code, line, sys.version_info, sys.executable, cython_version) - - if not os.path.exists(lib_dir): - os.makedirs(lib_dir) - - if args.pgo: - key += ('pgo',) - if args.force: - # Force a new module name by adding the current time to the - # key which is hashed to determine the module name. - key += (time.time(),) - - if args.name: - module_name = str(args.name) # no-op in Py3 - else: - module_name = "_cython_magic_" + hashlib.md5(str(key).encode('utf-8')).hexdigest() - html_file = os.path.join(lib_dir, module_name + '.html') - module_path = os.path.join(lib_dir, module_name + self.so_ext) - - have_module = os.path.isfile(module_path) - need_cythonize = args.pgo or not have_module - - if args.annotate: - if not os.path.isfile(html_file): - need_cythonize = True - - extension = None - if need_cythonize: - extensions = self._cythonize(module_name, code, lib_dir, args, quiet=args.quiet) - if extensions is None: - # Compilation failed and printed error message - return None - assert len(extensions) == 1 - extension = extensions[0] - self._code_cache[key] = module_name - - if args.pgo: - self._profile_pgo_wrapper(extension, lib_dir) - - try: - self._build_extension(extension, lib_dir, pgo_step_name='use' if args.pgo else None, - quiet=args.quiet) - except distutils.errors.CompileError: - # Build failed and printed error message - return None - - module = imp.load_dynamic(module_name, module_path) - self._import_all(module) - - if args.annotate: - try: - with io.open(html_file, encoding='utf-8') as f: - annotated_html = f.read() - except IOError as e: - # File could not be opened. Most likely the user has a version - # of Cython before 0.15.1 (when `cythonize` learned the - # `force` keyword argument) and has already compiled this - # exact source without annotation. - print('Cython completed successfully but the annotated ' - 'source could not be read.', file=sys.stderr) - print(e, file=sys.stderr) - else: - return display.HTML(self.clean_annotated_html(annotated_html)) - - def _profile_pgo_wrapper(self, extension, lib_dir): - """ - Generate a .c file for a separate extension module that calls the - module init function of the original module. This makes sure that the - PGO profiler sees the correct .o file of the final module, but it still - allows us to import the module under a different name for profiling, - before recompiling it into the PGO optimised module. Overwriting and - reimporting the same shared library is not portable. - """ - extension = copy.copy(extension) # shallow copy, do not modify sources in place! - module_name = extension.name - pgo_module_name = '_pgo_' + module_name - pgo_wrapper_c_file = os.path.join(lib_dir, pgo_module_name + '.c') - with io.open(pgo_wrapper_c_file, 'w', encoding='utf-8') as f: - f.write(textwrap.dedent(u""" - #include "Python.h" - #if PY_MAJOR_VERSION < 3 - extern PyMODINIT_FUNC init%(module_name)s(void); - PyMODINIT_FUNC init%(pgo_module_name)s(void); /*proto*/ - PyMODINIT_FUNC init%(pgo_module_name)s(void) { - PyObject *sys_modules; - init%(module_name)s(); if (PyErr_Occurred()) return; - sys_modules = PyImport_GetModuleDict(); /* borrowed, no exception, "never" fails */ - if (sys_modules) { - PyObject *module = PyDict_GetItemString(sys_modules, "%(module_name)s"); if (!module) return; - PyDict_SetItemString(sys_modules, "%(pgo_module_name)s", module); - Py_DECREF(module); - } - } - #else - extern PyMODINIT_FUNC PyInit_%(module_name)s(void); - PyMODINIT_FUNC PyInit_%(pgo_module_name)s(void); /*proto*/ - PyMODINIT_FUNC PyInit_%(pgo_module_name)s(void) { - return PyInit_%(module_name)s(); - } - #endif - """ % {'module_name': module_name, 'pgo_module_name': pgo_module_name})) - - extension.sources = extension.sources + [pgo_wrapper_c_file] # do not modify in place! - extension.name = pgo_module_name - - self._build_extension(extension, lib_dir, pgo_step_name='gen') - - # import and execute module code to generate profile - so_module_path = os.path.join(lib_dir, pgo_module_name + self.so_ext) - imp.load_dynamic(pgo_module_name, so_module_path) - - def _cythonize(self, module_name, code, lib_dir, args, quiet=True): - pyx_file = os.path.join(lib_dir, module_name + '.pyx') - pyx_file = encode_fs(pyx_file) - - c_include_dirs = args.include - c_src_files = list(map(str, args.src)) - if 'numpy' in code: - import numpy - c_include_dirs.append(numpy.get_include()) - with io.open(pyx_file, 'w', encoding='utf-8') as f: - f.write(code) - extension = Extension( - name=module_name, - sources=[pyx_file] + c_src_files, - include_dirs=c_include_dirs, - library_dirs=args.library_dirs, - extra_compile_args=args.compile_args, - extra_link_args=args.link_args, - libraries=args.lib, - language='c++' if args.cplus else 'c', - ) - try: - opts = dict( - quiet=quiet, - annotate=args.annotate, - force=True, - ) - if args.language_level is not None: - assert args.language_level in (2, 3) - opts['language_level'] = args.language_level - elif sys.version_info[0] >= 3: - opts['language_level'] = 3 - return cythonize([extension], **opts) - except CompileError: - return None - - def _build_extension(self, extension, lib_dir, temp_dir=None, pgo_step_name=None, quiet=True): - build_extension = self._get_build_extension( - extension, lib_dir=lib_dir, temp_dir=temp_dir, pgo_step_name=pgo_step_name) - old_threshold = None - try: - if not quiet: - old_threshold = distutils.log.set_threshold(distutils.log.DEBUG) - build_extension.run() - finally: - if not quiet and old_threshold is not None: - distutils.log.set_threshold(old_threshold) - - def _add_pgo_flags(self, build_extension, step_name, temp_dir): - compiler_type = build_extension.compiler.compiler_type - if compiler_type == 'unix': - compiler_cmd = build_extension.compiler.compiler_so - # TODO: we could try to call "[cmd] --version" for better insights - if not compiler_cmd: - pass - elif 'clang' in compiler_cmd or 'clang' in compiler_cmd[0]: - compiler_type = 'clang' - elif 'icc' in compiler_cmd or 'icc' in compiler_cmd[0]: - compiler_type = 'icc' - elif 'gcc' in compiler_cmd or 'gcc' in compiler_cmd[0]: - compiler_type = 'gcc' - elif 'g++' in compiler_cmd or 'g++' in compiler_cmd[0]: - compiler_type = 'gcc' - config = PGO_CONFIG.get(compiler_type) - orig_flags = [] - if config and step_name in config: - flags = [f.format(TEMPDIR=temp_dir) for f in config[step_name]] - for extension in build_extension.extensions: - orig_flags.append((extension.extra_compile_args, extension.extra_link_args)) - extension.extra_compile_args = extension.extra_compile_args + flags - extension.extra_link_args = extension.extra_link_args + flags - else: - print("No PGO %s configuration known for C compiler type '%s'" % (step_name, compiler_type), - file=sys.stderr) - return orig_flags - - @property - def so_ext(self): - """The extension suffix for compiled modules.""" - try: - return self._so_ext - except AttributeError: - self._so_ext = self._get_build_extension().get_ext_filename('') - return self._so_ext - - def _clear_distutils_mkpath_cache(self): - """clear distutils mkpath cache - - prevents distutils from skipping re-creation of dirs that have been removed - """ - try: - from distutils.dir_util import _path_created - except ImportError: - pass - else: - _path_created.clear() - - def _get_build_extension(self, extension=None, lib_dir=None, temp_dir=None, - pgo_step_name=None, _build_ext=build_ext): - self._clear_distutils_mkpath_cache() - dist = Distribution() - config_files = dist.find_config_files() - try: - config_files.remove('setup.cfg') - except ValueError: - pass - dist.parse_config_files(config_files) - - if not temp_dir: - temp_dir = lib_dir - add_pgo_flags = self._add_pgo_flags - - if pgo_step_name: - base_build_ext = _build_ext - class _build_ext(_build_ext): - def build_extensions(self): - add_pgo_flags(self, pgo_step_name, temp_dir) - base_build_ext.build_extensions(self) - - build_extension = _build_ext(dist) - build_extension.finalize_options() - if temp_dir: - temp_dir = encode_fs(temp_dir) - build_extension.build_temp = temp_dir - if lib_dir: - lib_dir = encode_fs(lib_dir) - build_extension.build_lib = lib_dir - if extension is not None: - build_extension.extensions = [extension] - return build_extension - - @staticmethod - def clean_annotated_html(html): - """Clean up the annotated HTML source. - - Strips the link to the generated C or C++ file, which we do not - present to the user. - """ - r = re.compile('

Raw output: (.*)') - html = '\n'.join(l for l in html.splitlines() if not r.match(l)) - return html - -__doc__ = __doc__.format( - # rST doesn't see the -+ flag as part of an option list, so we - # hide it from the module-level docstring. - CYTHON_DOC=dedent(CythonMagics.cython.__doc__\ - .replace('-+, --cplus', '--cplus ')), - CYTHON_INLINE_DOC=dedent(CythonMagics.cython_inline.__doc__), - CYTHON_PYXIMPORT_DOC=dedent(CythonMagics.cython_pyximport.__doc__), -) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestCyCache.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestCyCache.py deleted file mode 100644 index a3224b41750..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestCyCache.py +++ /dev/null @@ -1,106 +0,0 @@ -import difflib -import glob -import gzip -import os -import tempfile - -import Cython.Build.Dependencies -import Cython.Utils -from Cython.TestUtils import CythonTest - - -class TestCyCache(CythonTest): - - def setUp(self): - CythonTest.setUp(self) - self.temp_dir = tempfile.mkdtemp( - prefix='cycache-test', - dir='TEST_TMP' if os.path.isdir('TEST_TMP') else None) - self.src_dir = tempfile.mkdtemp(prefix='src', dir=self.temp_dir) - self.cache_dir = tempfile.mkdtemp(prefix='cache', dir=self.temp_dir) - - def cache_files(self, file_glob): - return glob.glob(os.path.join(self.cache_dir, file_glob)) - - def fresh_cythonize(self, *args, **kwargs): - Cython.Utils.clear_function_caches() - Cython.Build.Dependencies._dep_tree = None # discard method caches - Cython.Build.Dependencies.cythonize(*args, **kwargs) - - def test_cycache_switch(self): - content1 = 'value = 1\n' - content2 = 'value = 2\n' - a_pyx = os.path.join(self.src_dir, 'a.pyx') - a_c = a_pyx[:-4] + '.c' - - open(a_pyx, 'w').write(content1) - self.fresh_cythonize(a_pyx, cache=self.cache_dir) - self.fresh_cythonize(a_pyx, cache=self.cache_dir) - self.assertEqual(1, len(self.cache_files('a.c*'))) - a_contents1 = open(a_c).read() - os.unlink(a_c) - - open(a_pyx, 'w').write(content2) - self.fresh_cythonize(a_pyx, cache=self.cache_dir) - a_contents2 = open(a_c).read() - os.unlink(a_c) - - self.assertNotEqual(a_contents1, a_contents2, 'C file not changed!') - self.assertEqual(2, len(self.cache_files('a.c*'))) - - open(a_pyx, 'w').write(content1) - self.fresh_cythonize(a_pyx, cache=self.cache_dir) - self.assertEqual(2, len(self.cache_files('a.c*'))) - a_contents = open(a_c).read() - self.assertEqual( - a_contents, a_contents1, - msg='\n'.join(list(difflib.unified_diff( - a_contents.split('\n'), a_contents1.split('\n')))[:10])) - - def test_cycache_uses_cache(self): - a_pyx = os.path.join(self.src_dir, 'a.pyx') - a_c = a_pyx[:-4] + '.c' - open(a_pyx, 'w').write('pass') - self.fresh_cythonize(a_pyx, cache=self.cache_dir) - a_cache = os.path.join(self.cache_dir, os.listdir(self.cache_dir)[0]) - gzip.GzipFile(a_cache, 'wb').write('fake stuff'.encode('ascii')) - os.unlink(a_c) - self.fresh_cythonize(a_pyx, cache=self.cache_dir) - a_contents = open(a_c).read() - self.assertEqual(a_contents, 'fake stuff', - 'Unexpected contents: %s...' % a_contents[:100]) - - def test_multi_file_output(self): - a_pyx = os.path.join(self.src_dir, 'a.pyx') - a_c = a_pyx[:-4] + '.c' - a_h = a_pyx[:-4] + '.h' - a_api_h = a_pyx[:-4] + '_api.h' - open(a_pyx, 'w').write('cdef public api int foo(int x): return x\n') - self.fresh_cythonize(a_pyx, cache=self.cache_dir) - expected = [a_c, a_h, a_api_h] - for output in expected: - self.assertTrue(os.path.exists(output), output) - os.unlink(output) - self.fresh_cythonize(a_pyx, cache=self.cache_dir) - for output in expected: - self.assertTrue(os.path.exists(output), output) - - def test_options_invalidation(self): - hash_pyx = os.path.join(self.src_dir, 'options.pyx') - hash_c = hash_pyx[:-len('.pyx')] + '.c' - - open(hash_pyx, 'w').write('pass') - self.fresh_cythonize(hash_pyx, cache=self.cache_dir, cplus=False) - self.assertEqual(1, len(self.cache_files('options.c*'))) - - os.unlink(hash_c) - self.fresh_cythonize(hash_pyx, cache=self.cache_dir, cplus=True) - self.assertEqual(2, len(self.cache_files('options.c*'))) - - os.unlink(hash_c) - self.fresh_cythonize(hash_pyx, cache=self.cache_dir, cplus=False, show_version=False) - self.assertEqual(2, len(self.cache_files('options.c*'))) - - os.unlink(hash_c) - self.fresh_cythonize(hash_pyx, cache=self.cache_dir, cplus=False, show_version=True) - self.assertEqual(2, len(self.cache_files('options.c*'))) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestInline.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestInline.py deleted file mode 100644 index d209488083e..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestInline.py +++ /dev/null @@ -1,96 +0,0 @@ -import os, tempfile -from Cython.Shadow import inline -from Cython.Build.Inline import safe_type -from Cython.TestUtils import CythonTest - -try: - import numpy - has_numpy = True -except: - has_numpy = False - -test_kwds = dict(force=True, quiet=True) - -global_value = 100 - -class TestInline(CythonTest): - def setUp(self): - CythonTest.setUp(self) - self.test_kwds = dict(test_kwds) - if os.path.isdir('TEST_TMP'): - lib_dir = os.path.join('TEST_TMP','inline') - else: - lib_dir = tempfile.mkdtemp(prefix='cython_inline_') - self.test_kwds['lib_dir'] = lib_dir - - def test_simple(self): - self.assertEqual(inline("return 1+2", **self.test_kwds), 3) - - def test_types(self): - self.assertEqual(inline(""" - cimport cython - return cython.typeof(a), cython.typeof(b) - """, a=1.0, b=[], **self.test_kwds), ('double', 'list object')) - - def test_locals(self): - a = 1 - b = 2 - self.assertEqual(inline("return a+b", **self.test_kwds), 3) - - def test_globals(self): - self.assertEqual(inline("return global_value + 1", **self.test_kwds), global_value + 1) - - def test_no_return(self): - self.assertEqual(inline(""" - a = 1 - cdef double b = 2 - cdef c = [] - """, **self.test_kwds), dict(a=1, b=2.0, c=[])) - - def test_def_node(self): - foo = inline("def foo(x): return x * x", **self.test_kwds)['foo'] - self.assertEqual(foo(7), 49) - - def test_class_ref(self): - class Type(object): - pass - tp = inline("Type")['Type'] - self.assertEqual(tp, Type) - - def test_pure(self): - import cython as cy - b = inline(""" - b = cy.declare(float, a) - c = cy.declare(cy.pointer(cy.float), &b) - return b - """, a=3, **self.test_kwds) - self.assertEqual(type(b), float) - - def test_compiler_directives(self): - self.assertEqual( - inline('return sum(x)', - x=[1, 2, 3], - cython_compiler_directives={'boundscheck': False}), - 6 - ) - - def test_lang_version(self): - # GH-3419. Caching for inline code didn't always respect compiler directives. - inline_divcode = "def f(int a, int b): return a/b" - self.assertEqual( - inline(inline_divcode, language_level=2)['f'](5,2), - 2 - ) - self.assertEqual( - inline(inline_divcode, language_level=3)['f'](5,2), - 2.5 - ) - - if has_numpy: - - def test_numpy(self): - import numpy - a = numpy.ndarray((10, 20)) - a[0,0] = 10 - self.assertEqual(safe_type(a), 'numpy.ndarray[numpy.float64_t, ndim=2]') - self.assertEqual(inline("return a[0,0]", a=a, **self.test_kwds), 10.0) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestIpythonMagic.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestIpythonMagic.py deleted file mode 100644 index 24213091b26..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestIpythonMagic.py +++ /dev/null @@ -1,205 +0,0 @@ -# -*- coding: utf-8 -*- -# tag: ipython - -"""Tests for the Cython magics extension.""" - -from __future__ import absolute_import - -import os -import sys -from contextlib import contextmanager -from Cython.Build import IpythonMagic -from Cython.TestUtils import CythonTest - -try: - import IPython.testing.globalipapp -except ImportError: - # Disable tests and fake helpers for initialisation below. - def skip_if_not_installed(_): - return None -else: - def skip_if_not_installed(c): - return c - -try: - # disable IPython history thread before it gets started to avoid having to clean it up - from IPython.core.history import HistoryManager - HistoryManager.enabled = False -except ImportError: - pass - -code = u"""\ -def f(x): - return 2*x -""" - -cython3_code = u"""\ -def f(int x): - return 2 / x - -def call(x): - return f(*(x,)) -""" - -pgo_cython3_code = cython3_code + u"""\ -def main(): - for _ in range(100): call(5) -main() -""" - - -if sys.platform == 'win32': - # not using IPython's decorators here because they depend on "nose" - try: - from unittest import skip as skip_win32 - except ImportError: - # poor dev's silent @unittest.skip() - def skip_win32(dummy): - def _skip_win32(func): - return None - return _skip_win32 -else: - def skip_win32(dummy): - def _skip_win32(func): - def wrapper(*args, **kwargs): - func(*args, **kwargs) - return wrapper - return _skip_win32 - - -@skip_if_not_installed -class TestIPythonMagic(CythonTest): - - @classmethod - def setUpClass(cls): - CythonTest.setUpClass() - cls._ip = IPython.testing.globalipapp.get_ipython() - - def setUp(self): - CythonTest.setUp(self) - self._ip.extension_manager.load_extension('cython') - - def test_cython_inline(self): - ip = self._ip - ip.ex('a=10; b=20') - result = ip.run_cell_magic('cython_inline', '', 'return a+b') - self.assertEqual(result, 30) - - @skip_win32('Skip on Windows') - def test_cython_pyximport(self): - ip = self._ip - module_name = '_test_cython_pyximport' - ip.run_cell_magic('cython_pyximport', module_name, code) - ip.ex('g = f(10)') - self.assertEqual(ip.user_ns['g'], 20.0) - ip.run_cell_magic('cython_pyximport', module_name, code) - ip.ex('h = f(-10)') - self.assertEqual(ip.user_ns['h'], -20.0) - try: - os.remove(module_name + '.pyx') - except OSError: - pass - - def test_cython(self): - ip = self._ip - ip.run_cell_magic('cython', '', code) - ip.ex('g = f(10)') - self.assertEqual(ip.user_ns['g'], 20.0) - - def test_cython_name(self): - # The Cython module named 'mymodule' defines the function f. - ip = self._ip - ip.run_cell_magic('cython', '--name=mymodule', code) - # This module can now be imported in the interactive namespace. - ip.ex('import mymodule; g = mymodule.f(10)') - self.assertEqual(ip.user_ns['g'], 20.0) - - def test_cython_language_level(self): - # The Cython cell defines the functions f() and call(). - ip = self._ip - ip.run_cell_magic('cython', '', cython3_code) - ip.ex('g = f(10); h = call(10)') - if sys.version_info[0] < 3: - self.assertEqual(ip.user_ns['g'], 2 // 10) - self.assertEqual(ip.user_ns['h'], 2 // 10) - else: - self.assertEqual(ip.user_ns['g'], 2.0 / 10.0) - self.assertEqual(ip.user_ns['h'], 2.0 / 10.0) - - def test_cython3(self): - # The Cython cell defines the functions f() and call(). - ip = self._ip - ip.run_cell_magic('cython', '-3', cython3_code) - ip.ex('g = f(10); h = call(10)') - self.assertEqual(ip.user_ns['g'], 2.0 / 10.0) - self.assertEqual(ip.user_ns['h'], 2.0 / 10.0) - - def test_cython2(self): - # The Cython cell defines the functions f() and call(). - ip = self._ip - ip.run_cell_magic('cython', '-2', cython3_code) - ip.ex('g = f(10); h = call(10)') - self.assertEqual(ip.user_ns['g'], 2 // 10) - self.assertEqual(ip.user_ns['h'], 2 // 10) - - @skip_win32('Skip on Windows') - def test_cython3_pgo(self): - # The Cython cell defines the functions f() and call(). - ip = self._ip - ip.run_cell_magic('cython', '-3 --pgo', pgo_cython3_code) - ip.ex('g = f(10); h = call(10); main()') - self.assertEqual(ip.user_ns['g'], 2.0 / 10.0) - self.assertEqual(ip.user_ns['h'], 2.0 / 10.0) - - @skip_win32('Skip on Windows') - def test_extlibs(self): - ip = self._ip - code = u""" -from libc.math cimport sin -x = sin(0.0) - """ - ip.user_ns['x'] = 1 - ip.run_cell_magic('cython', '-l m', code) - self.assertEqual(ip.user_ns['x'], 0) - - - def test_cython_verbose(self): - ip = self._ip - ip.run_cell_magic('cython', '--verbose', code) - ip.ex('g = f(10)') - self.assertEqual(ip.user_ns['g'], 20.0) - - def test_cython_verbose_thresholds(self): - @contextmanager - def mock_distutils(): - class MockLog: - DEBUG = 1 - INFO = 2 - thresholds = [INFO] - - def set_threshold(self, val): - self.thresholds.append(val) - return self.thresholds[-2] - - - new_log = MockLog() - old_log = IpythonMagic.distutils.log - try: - IpythonMagic.distutils.log = new_log - yield new_log - finally: - IpythonMagic.distutils.log = old_log - - ip = self._ip - with mock_distutils() as verbose_log: - ip.run_cell_magic('cython', '--verbose', code) - ip.ex('g = f(10)') - self.assertEqual(ip.user_ns['g'], 20.0) - self.assertEqual([verbose_log.INFO, verbose_log.DEBUG, verbose_log.INFO], - verbose_log.thresholds) - - with mock_distutils() as normal_log: - ip.run_cell_magic('cython', '', code) - ip.ex('g = f(10)') - self.assertEqual(ip.user_ns['g'], 20.0) - self.assertEqual([normal_log.INFO], normal_log.thresholds) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestStripLiterals.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestStripLiterals.py deleted file mode 100644 index a7572a50838..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/TestStripLiterals.py +++ /dev/null @@ -1,57 +0,0 @@ -from Cython.Build.Dependencies import strip_string_literals - -from Cython.TestUtils import CythonTest - -class TestStripLiterals(CythonTest): - - def t(self, before, expected): - actual, literals = strip_string_literals(before, prefix="_L") - self.assertEqual(expected, actual) - for key, value in literals.items(): - actual = actual.replace(key, value) - self.assertEqual(before, actual) - - def test_empty(self): - self.t("", "") - - def test_single_quote(self): - self.t("'x'", "'_L1_'") - - def test_double_quote(self): - self.t('"x"', '"_L1_"') - - def test_nested_quotes(self): - self.t(""" '"' "'" """, """ '_L1_' "_L2_" """) - - def test_triple_quote(self): - self.t(" '''a\n''' ", " '''_L1_''' ") - - def test_backslash(self): - self.t(r"'a\'b'", "'_L1_'") - self.t(r"'a\\'", "'_L1_'") - self.t(r"'a\\\'b'", "'_L1_'") - - def test_unicode(self): - self.t("u'abc'", "u'_L1_'") - - def test_raw(self): - self.t(r"r'abc\\'", "r'_L1_'") - - def test_raw_unicode(self): - self.t(r"ru'abc\\'", "ru'_L1_'") - - def test_comment(self): - self.t("abc # foo", "abc #_L1_") - - def test_comment_and_quote(self): - self.t("abc # 'x'", "abc #_L1_") - self.t("'abc#'", "'_L1_'") - - def test_include(self): - self.t("include 'a.pxi' # something here", - "include '_L1_' #_L2_") - - def test_extern(self): - self.t("cdef extern from 'a.h': # comment", - "cdef extern from '_L1_': #_L2_") - diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/__init__.py deleted file mode 100644 index fa81adaff68..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/Tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# empty file diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/__init__.py deleted file mode 100644 index d6f3986597b..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Build/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from .Dependencies import cythonize -from .Distutils import build_ext diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/CodeWriter.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/CodeWriter.py deleted file mode 100644 index 2e4646a6544..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/CodeWriter.py +++ /dev/null @@ -1,816 +0,0 @@ -""" -Serializes a Cython code tree to Cython code. This is primarily useful for -debugging and testing purposes. - -The output is in a strict format, no whitespace or comments from the input -is preserved (and it could not be as it is not present in the code tree). -""" - -from __future__ import absolute_import, print_function - -from .Compiler.Visitor import TreeVisitor -from .Compiler.ExprNodes import * - - -class LinesResult(object): - def __init__(self): - self.lines = [] - self.s = u"" - - def put(self, s): - self.s += s - - def newline(self): - self.lines.append(self.s) - self.s = u"" - - def putline(self, s): - self.put(s) - self.newline() - -class DeclarationWriter(TreeVisitor): - - indent_string = u" " - - def __init__(self, result=None): - super(DeclarationWriter, self).__init__() - if result is None: - result = LinesResult() - self.result = result - self.numindents = 0 - self.tempnames = {} - self.tempblockindex = 0 - - def write(self, tree): - self.visit(tree) - return self.result - - def indent(self): - self.numindents += 1 - - def dedent(self): - self.numindents -= 1 - - def startline(self, s=u""): - self.result.put(self.indent_string * self.numindents + s) - - def put(self, s): - self.result.put(s) - - def putline(self, s): - self.result.putline(self.indent_string * self.numindents + s) - - def endline(self, s=u""): - self.result.putline(s) - - def line(self, s): - self.startline(s) - self.endline() - - def comma_separated_list(self, items, output_rhs=False): - if len(items) > 0: - for item in items[:-1]: - self.visit(item) - if output_rhs and item.default is not None: - self.put(u" = ") - self.visit(item.default) - self.put(u", ") - self.visit(items[-1]) - - def visit_Node(self, node): - raise AssertionError("Node not handled by serializer: %r" % node) - - def visit_ModuleNode(self, node): - self.visitchildren(node) - - def visit_StatListNode(self, node): - self.visitchildren(node) - - def visit_CDefExternNode(self, node): - if node.include_file is None: - file = u'*' - else: - file = u'"%s"' % node.include_file - self.putline(u"cdef extern from %s:" % file) - self.indent() - self.visit(node.body) - self.dedent() - - def visit_CPtrDeclaratorNode(self, node): - self.put('*') - self.visit(node.base) - - def visit_CReferenceDeclaratorNode(self, node): - self.put('&') - self.visit(node.base) - - def visit_CArrayDeclaratorNode(self, node): - self.visit(node.base) - self.put(u'[') - if node.dimension is not None: - self.visit(node.dimension) - self.put(u']') - - def visit_CArrayDeclaratorNode(self, node): - self.visit(node.base) - self.put(u'[') - if node.dimension is not None: - self.visit(node.dimension) - self.put(u']') - - def visit_CFuncDeclaratorNode(self, node): - # TODO: except, gil, etc. - self.visit(node.base) - self.put(u'(') - self.comma_separated_list(node.args) - self.endline(u')') - - def visit_CNameDeclaratorNode(self, node): - self.put(node.name) - - def visit_CSimpleBaseTypeNode(self, node): - # See Parsing.p_sign_and_longness - if node.is_basic_c_type: - self.put(("unsigned ", "", "signed ")[node.signed]) - if node.longness < 0: - self.put("short " * -node.longness) - elif node.longness > 0: - self.put("long " * node.longness) - self.put(node.name) - - def visit_CComplexBaseTypeNode(self, node): - self.put(u'(') - self.visit(node.base_type) - self.visit(node.declarator) - self.put(u')') - - def visit_CNestedBaseTypeNode(self, node): - self.visit(node.base_type) - self.put(u'.') - self.put(node.name) - - def visit_TemplatedTypeNode(self, node): - self.visit(node.base_type_node) - self.put(u'[') - self.comma_separated_list(node.positional_args + node.keyword_args.key_value_pairs) - self.put(u']') - - def visit_CVarDefNode(self, node): - self.startline(u"cdef ") - self.visit(node.base_type) - self.put(u" ") - self.comma_separated_list(node.declarators, output_rhs=True) - self.endline() - - def visit_container_node(self, node, decl, extras, attributes): - # TODO: visibility - self.startline(decl) - if node.name: - self.put(u' ') - self.put(node.name) - if node.cname is not None: - self.put(u' "%s"' % node.cname) - if extras: - self.put(extras) - self.endline(':') - self.indent() - if not attributes: - self.putline('pass') - else: - for attribute in attributes: - self.visit(attribute) - self.dedent() - - def visit_CStructOrUnionDefNode(self, node): - if node.typedef_flag: - decl = u'ctypedef ' - else: - decl = u'cdef ' - if node.visibility == 'public': - decl += u'public ' - if node.packed: - decl += u'packed ' - decl += node.kind - self.visit_container_node(node, decl, None, node.attributes) - - def visit_CppClassNode(self, node): - extras = "" - if node.templates: - extras = u"[%s]" % ", ".join(node.templates) - if node.base_classes: - extras += "(%s)" % ", ".join(node.base_classes) - self.visit_container_node(node, u"cdef cppclass", extras, node.attributes) - - def visit_CEnumDefNode(self, node): - self.visit_container_node(node, u"cdef enum", None, node.items) - - def visit_CEnumDefItemNode(self, node): - self.startline(node.name) - if node.cname: - self.put(u' "%s"' % node.cname) - if node.value: - self.put(u" = ") - self.visit(node.value) - self.endline() - - def visit_CClassDefNode(self, node): - assert not node.module_name - if node.decorators: - for decorator in node.decorators: - self.visit(decorator) - self.startline(u"cdef class ") - self.put(node.class_name) - if node.base_class_name: - self.put(u"(") - if node.base_class_module: - self.put(node.base_class_module) - self.put(u".") - self.put(node.base_class_name) - self.put(u")") - self.endline(u":") - self.indent() - self.visit(node.body) - self.dedent() - - def visit_CTypeDefNode(self, node): - self.startline(u"ctypedef ") - self.visit(node.base_type) - self.put(u" ") - self.visit(node.declarator) - self.endline() - - def visit_FuncDefNode(self, node): - self.startline(u"def %s(" % node.name) - self.comma_separated_list(node.args) - self.endline(u"):") - self.indent() - self.visit(node.body) - self.dedent() - - def visit_CArgDeclNode(self, node): - if node.base_type.name is not None: - self.visit(node.base_type) - self.put(u" ") - self.visit(node.declarator) - if node.default is not None: - self.put(u" = ") - self.visit(node.default) - - def visit_CImportStatNode(self, node): - self.startline(u"cimport ") - self.put(node.module_name) - if node.as_name: - self.put(u" as ") - self.put(node.as_name) - self.endline() - - def visit_FromCImportStatNode(self, node): - self.startline(u"from ") - self.put(node.module_name) - self.put(u" cimport ") - first = True - for pos, name, as_name, kind in node.imported_names: - assert kind is None - if first: - first = False - else: - self.put(u", ") - self.put(name) - if as_name: - self.put(u" as ") - self.put(as_name) - self.endline() - - def visit_NameNode(self, node): - self.put(node.name) - - def visit_IntNode(self, node): - self.put(node.value) - - def visit_NoneNode(self, node): - self.put(u"None") - - def visit_NotNode(self, node): - self.put(u"(not ") - self.visit(node.operand) - self.put(u")") - - def visit_DecoratorNode(self, node): - self.startline("@") - self.visit(node.decorator) - self.endline() - - def visit_BinopNode(self, node): - self.visit(node.operand1) - self.put(u" %s " % node.operator) - self.visit(node.operand2) - - def visit_AttributeNode(self, node): - self.visit(node.obj) - self.put(u".%s" % node.attribute) - - def visit_BoolNode(self, node): - self.put(str(node.value)) - - # FIXME: represent string nodes correctly - def visit_StringNode(self, node): - value = node.value - if value.encoding is not None: - value = value.encode(value.encoding) - self.put(repr(value)) - - def visit_PassStatNode(self, node): - self.startline(u"pass") - self.endline() - -class CodeWriter(DeclarationWriter): - - def visit_SingleAssignmentNode(self, node): - self.startline() - self.visit(node.lhs) - self.put(u" = ") - self.visit(node.rhs) - self.endline() - - def visit_CascadedAssignmentNode(self, node): - self.startline() - for lhs in node.lhs_list: - self.visit(lhs) - self.put(u" = ") - self.visit(node.rhs) - self.endline() - - def visit_PrintStatNode(self, node): - self.startline(u"print ") - self.comma_separated_list(node.arg_tuple.args) - if not node.append_newline: - self.put(u",") - self.endline() - - def visit_ForInStatNode(self, node): - self.startline(u"for ") - self.visit(node.target) - self.put(u" in ") - self.visit(node.iterator.sequence) - self.endline(u":") - self.indent() - self.visit(node.body) - self.dedent() - if node.else_clause is not None: - self.line(u"else:") - self.indent() - self.visit(node.else_clause) - self.dedent() - - def visit_IfStatNode(self, node): - # The IfClauseNode is handled directly without a separate match - # for clariy. - self.startline(u"if ") - self.visit(node.if_clauses[0].condition) - self.endline(":") - self.indent() - self.visit(node.if_clauses[0].body) - self.dedent() - for clause in node.if_clauses[1:]: - self.startline("elif ") - self.visit(clause.condition) - self.endline(":") - self.indent() - self.visit(clause.body) - self.dedent() - if node.else_clause is not None: - self.line("else:") - self.indent() - self.visit(node.else_clause) - self.dedent() - - def visit_SequenceNode(self, node): - self.comma_separated_list(node.args) # Might need to discover whether we need () around tuples...hmm... - - def visit_SimpleCallNode(self, node): - self.visit(node.function) - self.put(u"(") - self.comma_separated_list(node.args) - self.put(")") - - def visit_GeneralCallNode(self, node): - self.visit(node.function) - self.put(u"(") - posarg = node.positional_args - if isinstance(posarg, AsTupleNode): - self.visit(posarg.arg) - else: - self.comma_separated_list(posarg.args) # TupleNode.args - if node.keyword_args: - if isinstance(node.keyword_args, DictNode): - for i, (name, value) in enumerate(node.keyword_args.key_value_pairs): - if i > 0: - self.put(', ') - self.visit(name) - self.put('=') - self.visit(value) - else: - raise Exception("Not implemented yet") - self.put(u")") - - def visit_ExprStatNode(self, node): - self.startline() - self.visit(node.expr) - self.endline() - - def visit_InPlaceAssignmentNode(self, node): - self.startline() - self.visit(node.lhs) - self.put(u" %s= " % node.operator) - self.visit(node.rhs) - self.endline() - - def visit_WithStatNode(self, node): - self.startline() - self.put(u"with ") - self.visit(node.manager) - if node.target is not None: - self.put(u" as ") - self.visit(node.target) - self.endline(u":") - self.indent() - self.visit(node.body) - self.dedent() - - def visit_TryFinallyStatNode(self, node): - self.line(u"try:") - self.indent() - self.visit(node.body) - self.dedent() - self.line(u"finally:") - self.indent() - self.visit(node.finally_clause) - self.dedent() - - def visit_TryExceptStatNode(self, node): - self.line(u"try:") - self.indent() - self.visit(node.body) - self.dedent() - for x in node.except_clauses: - self.visit(x) - if node.else_clause is not None: - self.visit(node.else_clause) - - def visit_ExceptClauseNode(self, node): - self.startline(u"except") - if node.pattern is not None: - self.put(u" ") - self.visit(node.pattern) - if node.target is not None: - self.put(u", ") - self.visit(node.target) - self.endline(":") - self.indent() - self.visit(node.body) - self.dedent() - - def visit_ReturnStatNode(self, node): - self.startline("return ") - self.visit(node.value) - self.endline() - - def visit_ReraiseStatNode(self, node): - self.line("raise") - - def visit_ImportNode(self, node): - self.put(u"(import %s)" % node.module_name.value) - - def visit_TempsBlockNode(self, node): - """ - Temporaries are output like $1_1', where the first number is - an index of the TempsBlockNode and the second number is an index - of the temporary which that block allocates. - """ - idx = 0 - for handle in node.temps: - self.tempnames[handle] = "$%d_%d" % (self.tempblockindex, idx) - idx += 1 - self.tempblockindex += 1 - self.visit(node.body) - - def visit_TempRefNode(self, node): - self.put(self.tempnames[node.handle]) - - -class PxdWriter(DeclarationWriter): - def __call__(self, node): - print(u'\n'.join(self.write(node).lines)) - return node - - def visit_CFuncDefNode(self, node): - if 'inline' in node.modifiers: - return - if node.overridable: - self.startline(u'cpdef ') - else: - self.startline(u'cdef ') - if node.visibility != 'private': - self.put(node.visibility) - self.put(u' ') - if node.api: - self.put(u'api ') - self.visit(node.declarator) - - def visit_StatNode(self, node): - pass - - -class ExpressionWriter(TreeVisitor): - - def __init__(self, result=None): - super(ExpressionWriter, self).__init__() - if result is None: - result = u"" - self.result = result - self.precedence = [0] - - def write(self, tree): - self.visit(tree) - return self.result - - def put(self, s): - self.result += s - - def remove(self, s): - if self.result.endswith(s): - self.result = self.result[:-len(s)] - - def comma_separated_list(self, items): - if len(items) > 0: - for item in items[:-1]: - self.visit(item) - self.put(u", ") - self.visit(items[-1]) - - def visit_Node(self, node): - raise AssertionError("Node not handled by serializer: %r" % node) - - def visit_NameNode(self, node): - self.put(node.name) - - def visit_NoneNode(self, node): - self.put(u"None") - - def visit_EllipsisNode(self, node): - self.put(u"...") - - def visit_BoolNode(self, node): - self.put(str(node.value)) - - def visit_ConstNode(self, node): - self.put(str(node.value)) - - def visit_ImagNode(self, node): - self.put(node.value) - self.put(u"j") - - def emit_string(self, node, prefix=u""): - repr_val = repr(node.value) - if repr_val[0] in 'ub': - repr_val = repr_val[1:] - self.put(u"%s%s" % (prefix, repr_val)) - - def visit_BytesNode(self, node): - self.emit_string(node, u"b") - - def visit_StringNode(self, node): - self.emit_string(node) - - def visit_UnicodeNode(self, node): - self.emit_string(node, u"u") - - def emit_sequence(self, node, parens=(u"", u"")): - open_paren, close_paren = parens - items = node.subexpr_nodes() - self.put(open_paren) - self.comma_separated_list(items) - self.put(close_paren) - - def visit_ListNode(self, node): - self.emit_sequence(node, u"[]") - - def visit_TupleNode(self, node): - self.emit_sequence(node, u"()") - - def visit_SetNode(self, node): - if len(node.subexpr_nodes()) > 0: - self.emit_sequence(node, u"{}") - else: - self.put(u"set()") - - def visit_DictNode(self, node): - self.emit_sequence(node, u"{}") - - def visit_DictItemNode(self, node): - self.visit(node.key) - self.put(u": ") - self.visit(node.value) - - unop_precedence = { - 'not': 3, '!': 3, - '+': 11, '-': 11, '~': 11, - } - binop_precedence = { - 'or': 1, - 'and': 2, - # unary: 'not': 3, '!': 3, - 'in': 4, 'not_in': 4, 'is': 4, 'is_not': 4, '<': 4, '<=': 4, '>': 4, '>=': 4, '!=': 4, '==': 4, - '|': 5, - '^': 6, - '&': 7, - '<<': 8, '>>': 8, - '+': 9, '-': 9, - '*': 10, '@': 10, '/': 10, '//': 10, '%': 10, - # unary: '+': 11, '-': 11, '~': 11 - '**': 12, - } - - def operator_enter(self, new_prec): - old_prec = self.precedence[-1] - if old_prec > new_prec: - self.put(u"(") - self.precedence.append(new_prec) - - def operator_exit(self): - old_prec, new_prec = self.precedence[-2:] - if old_prec > new_prec: - self.put(u")") - self.precedence.pop() - - def visit_NotNode(self, node): - op = 'not' - prec = self.unop_precedence[op] - self.operator_enter(prec) - self.put(u"not ") - self.visit(node.operand) - self.operator_exit() - - def visit_UnopNode(self, node): - op = node.operator - prec = self.unop_precedence[op] - self.operator_enter(prec) - self.put(u"%s" % node.operator) - self.visit(node.operand) - self.operator_exit() - - def visit_BinopNode(self, node): - op = node.operator - prec = self.binop_precedence.get(op, 0) - self.operator_enter(prec) - self.visit(node.operand1) - self.put(u" %s " % op.replace('_', ' ')) - self.visit(node.operand2) - self.operator_exit() - - def visit_BoolBinopNode(self, node): - self.visit_BinopNode(node) - - def visit_PrimaryCmpNode(self, node): - self.visit_BinopNode(node) - - def visit_IndexNode(self, node): - self.visit(node.base) - self.put(u"[") - if isinstance(node.index, TupleNode): - self.emit_sequence(node.index) - else: - self.visit(node.index) - self.put(u"]") - - def visit_SliceIndexNode(self, node): - self.visit(node.base) - self.put(u"[") - if node.start: - self.visit(node.start) - self.put(u":") - if node.stop: - self.visit(node.stop) - if node.slice: - self.put(u":") - self.visit(node.slice) - self.put(u"]") - - def visit_SliceNode(self, node): - if not node.start.is_none: - self.visit(node.start) - self.put(u":") - if not node.stop.is_none: - self.visit(node.stop) - if not node.step.is_none: - self.put(u":") - self.visit(node.step) - - def visit_CondExprNode(self, node): - self.visit(node.true_val) - self.put(u" if ") - self.visit(node.test) - self.put(u" else ") - self.visit(node.false_val) - - def visit_AttributeNode(self, node): - self.visit(node.obj) - self.put(u".%s" % node.attribute) - - def visit_SimpleCallNode(self, node): - self.visit(node.function) - self.put(u"(") - self.comma_separated_list(node.args) - self.put(")") - - def emit_pos_args(self, node): - if node is None: - return - if isinstance(node, AddNode): - self.emit_pos_args(node.operand1) - self.emit_pos_args(node.operand2) - elif isinstance(node, TupleNode): - for expr in node.subexpr_nodes(): - self.visit(expr) - self.put(u", ") - elif isinstance(node, AsTupleNode): - self.put("*") - self.visit(node.arg) - self.put(u", ") - else: - self.visit(node) - self.put(u", ") - - def emit_kwd_args(self, node): - if node is None: - return - if isinstance(node, MergedDictNode): - for expr in node.subexpr_nodes(): - self.emit_kwd_args(expr) - elif isinstance(node, DictNode): - for expr in node.subexpr_nodes(): - self.put(u"%s=" % expr.key.value) - self.visit(expr.value) - self.put(u", ") - else: - self.put(u"**") - self.visit(node) - self.put(u", ") - - def visit_GeneralCallNode(self, node): - self.visit(node.function) - self.put(u"(") - self.emit_pos_args(node.positional_args) - self.emit_kwd_args(node.keyword_args) - self.remove(u", ") - self.put(")") - - def emit_comprehension(self, body, target, - sequence, condition, - parens=(u"", u"")): - open_paren, close_paren = parens - self.put(open_paren) - self.visit(body) - self.put(u" for ") - self.visit(target) - self.put(u" in ") - self.visit(sequence) - if condition: - self.put(u" if ") - self.visit(condition) - self.put(close_paren) - - def visit_ComprehensionAppendNode(self, node): - self.visit(node.expr) - - def visit_DictComprehensionAppendNode(self, node): - self.visit(node.key_expr) - self.put(u": ") - self.visit(node.value_expr) - - def visit_ComprehensionNode(self, node): - tpmap = {'list': u"[]", 'dict': u"{}", 'set': u"{}"} - parens = tpmap[node.type.py_type_name()] - body = node.loop.body - target = node.loop.target - sequence = node.loop.iterator.sequence - condition = None - if hasattr(body, 'if_clauses'): - # type(body) is Nodes.IfStatNode - condition = body.if_clauses[0].condition - body = body.if_clauses[0].body - self.emit_comprehension(body, target, sequence, condition, parens) - - def visit_GeneratorExpressionNode(self, node): - body = node.loop.body - target = node.loop.target - sequence = node.loop.iterator.sequence - condition = None - if hasattr(body, 'if_clauses'): - # type(body) is Nodes.IfStatNode - condition = body.if_clauses[0].condition - body = body.if_clauses[0].body.expr.arg - elif hasattr(body, 'expr'): - # type(body) is Nodes.ExprStatNode - body = body.expr.arg - self.emit_comprehension(body, target, sequence, condition, u"()") diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/AnalysedTreeTransforms.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/AnalysedTreeTransforms.py deleted file mode 100644 index 07bf31f3e06..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/AnalysedTreeTransforms.py +++ /dev/null @@ -1,99 +0,0 @@ -from __future__ import absolute_import - -from .Visitor import ScopeTrackingTransform -from .Nodes import StatListNode, SingleAssignmentNode, CFuncDefNode, DefNode -from .ExprNodes import DictNode, DictItemNode, NameNode, UnicodeNode -from .PyrexTypes import py_object_type -from .StringEncoding import EncodedString -from . import Symtab - -class AutoTestDictTransform(ScopeTrackingTransform): - # Handles autotestdict directive - - blacklist = ['__cinit__', '__dealloc__', '__richcmp__', - '__nonzero__', '__bool__', - '__len__', '__contains__'] - - def visit_ModuleNode(self, node): - if node.is_pxd: - return node - self.scope_type = 'module' - self.scope_node = node - - if not self.current_directives['autotestdict']: - return node - self.all_docstrings = self.current_directives['autotestdict.all'] - self.cdef_docstrings = self.all_docstrings or self.current_directives['autotestdict.cdef'] - - assert isinstance(node.body, StatListNode) - - # First see if __test__ is already created - if u'__test__' in node.scope.entries: - # Do nothing - return node - - pos = node.pos - - self.tests = [] - self.testspos = node.pos - - test_dict_entry = node.scope.declare_var(EncodedString(u'__test__'), - py_object_type, - pos, - visibility='public') - create_test_dict_assignment = SingleAssignmentNode(pos, - lhs=NameNode(pos, name=EncodedString(u'__test__'), - entry=test_dict_entry), - rhs=DictNode(pos, key_value_pairs=self.tests)) - self.visitchildren(node) - node.body.stats.append(create_test_dict_assignment) - return node - - def add_test(self, testpos, path, doctest): - pos = self.testspos - keystr = u'%s (line %d)' % (path, testpos[1]) - key = UnicodeNode(pos, value=EncodedString(keystr)) - value = UnicodeNode(pos, value=doctest) - self.tests.append(DictItemNode(pos, key=key, value=value)) - - def visit_ExprNode(self, node): - # expressions cannot contain functions and lambda expressions - # do not have a docstring - return node - - def visit_FuncDefNode(self, node): - if not node.doc or (isinstance(node, DefNode) and node.fused_py_func): - return node - if not self.cdef_docstrings: - if isinstance(node, CFuncDefNode) and not node.py_func: - return node - if not self.all_docstrings and '>>>' not in node.doc: - return node - - pos = self.testspos - if self.scope_type == 'module': - path = node.entry.name - elif self.scope_type in ('pyclass', 'cclass'): - if isinstance(node, CFuncDefNode): - if node.py_func is not None: - name = node.py_func.name - else: - name = node.entry.name - else: - name = node.name - if self.scope_type == 'cclass' and name in self.blacklist: - return node - if self.scope_type == 'pyclass': - class_name = self.scope_node.name - else: - class_name = self.scope_node.class_name - if isinstance(node.entry.scope, Symtab.PropertyScope): - property_method_name = node.entry.scope.name - path = "%s.%s.%s" % (class_name, node.entry.scope.name, - node.entry.name) - else: - path = "%s.%s" % (class_name, node.entry.name) - else: - assert False - self.add_test(node.pos, path, node.doc) - return node diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Annotate.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Annotate.py deleted file mode 100644 index 5feac02d87f..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Annotate.py +++ /dev/null @@ -1,317 +0,0 @@ -# Note: Work in progress - -from __future__ import absolute_import - -import os -import os.path -import re -import codecs -import textwrap -from datetime import datetime -from functools import partial -from collections import defaultdict -from xml.sax.saxutils import escape as html_escape -try: - from StringIO import StringIO -except ImportError: - from io import StringIO # does not support writing 'str' in Py2 - -from . import Version -from .Code import CCodeWriter -from .. import Utils - - -class AnnotationCCodeWriter(CCodeWriter): - - def __init__(self, create_from=None, buffer=None, copy_formatting=True): - CCodeWriter.__init__(self, create_from, buffer, copy_formatting=copy_formatting) - if create_from is None: - self.annotation_buffer = StringIO() - self.last_annotated_pos = None - # annotations[filename][line] -> [(column, AnnotationItem)*] - self.annotations = defaultdict(partial(defaultdict, list)) - # code[filename][line] -> str - self.code = defaultdict(partial(defaultdict, str)) - # scopes[filename][line] -> set(scopes) - self.scopes = defaultdict(partial(defaultdict, set)) - else: - # When creating an insertion point, keep references to the same database - self.annotation_buffer = create_from.annotation_buffer - self.annotations = create_from.annotations - self.code = create_from.code - self.scopes = create_from.scopes - self.last_annotated_pos = create_from.last_annotated_pos - - def create_new(self, create_from, buffer, copy_formatting): - return AnnotationCCodeWriter(create_from, buffer, copy_formatting) - - def write(self, s): - CCodeWriter.write(self, s) - self.annotation_buffer.write(s) - - def mark_pos(self, pos, trace=True): - if pos is not None: - CCodeWriter.mark_pos(self, pos, trace) - if self.funcstate and self.funcstate.scope: - # lambdas and genexprs can result in multiple scopes per line => keep them in a set - self.scopes[pos[0].filename][pos[1]].add(self.funcstate.scope) - if self.last_annotated_pos: - source_desc, line, _ = self.last_annotated_pos - pos_code = self.code[source_desc.filename] - pos_code[line] += self.annotation_buffer.getvalue() - self.annotation_buffer = StringIO() - self.last_annotated_pos = pos - - def annotate(self, pos, item): - self.annotations[pos[0].filename][pos[1]].append((pos[2], item)) - - def _css(self): - """css template will later allow to choose a colormap""" - css = [self._css_template] - for i in range(255): - color = u"FFFF%02x" % int(255/(1+i/10.0)) - css.append('.cython.score-%d {background-color: #%s;}' % (i, color)) - try: - from pygments.formatters import HtmlFormatter - except ImportError: - pass - else: - css.append(HtmlFormatter().get_style_defs('.cython')) - return '\n'.join(css) - - _css_template = textwrap.dedent(""" - body.cython { font-family: courier; font-size: 12; } - - .cython.tag { } - .cython.line { margin: 0em } - .cython.code { font-size: 9; color: #444444; display: none; margin: 0px 0px 0px 8px; border-left: 8px none; } - - .cython.line .run { background-color: #B0FFB0; } - .cython.line .mis { background-color: #FFB0B0; } - .cython.code.run { border-left: 8px solid #B0FFB0; } - .cython.code.mis { border-left: 8px solid #FFB0B0; } - - .cython.code .py_c_api { color: red; } - .cython.code .py_macro_api { color: #FF7000; } - .cython.code .pyx_c_api { color: #FF3000; } - .cython.code .pyx_macro_api { color: #FF7000; } - .cython.code .refnanny { color: #FFA000; } - .cython.code .trace { color: #FFA000; } - .cython.code .error_goto { color: #FFA000; } - - .cython.code .coerce { color: #008000; border: 1px dotted #008000 } - .cython.code .py_attr { color: #FF0000; font-weight: bold; } - .cython.code .c_attr { color: #0000FF; } - .cython.code .py_call { color: #FF0000; font-weight: bold; } - .cython.code .c_call { color: #0000FF; } - """) - - # on-click toggle function to show/hide C source code - _onclick_attr = ' onclick="{0}"'.format(( - "(function(s){" - " s.display = s.display === 'block' ? 'none' : 'block'" - "})(this.nextElementSibling.style)" - ).replace(' ', '') # poor dev's JS minification - ) - - def save_annotation(self, source_filename, target_filename, coverage_xml=None): - with Utils.open_source_file(source_filename) as f: - code = f.read() - generated_code = self.code.get(source_filename, {}) - c_file = Utils.decode_filename(os.path.basename(target_filename)) - html_filename = os.path.splitext(target_filename)[0] + ".html" - - with codecs.open(html_filename, "w", encoding="UTF-8") as out_buffer: - out_buffer.write(self._save_annotation(code, generated_code, c_file, source_filename, coverage_xml)) - - def _save_annotation_header(self, c_file, source_filename, coverage_timestamp=None): - coverage_info = '' - if coverage_timestamp: - coverage_info = u' with coverage data from {timestamp}'.format( - timestamp=datetime.fromtimestamp(int(coverage_timestamp) // 1000)) - - outlist = [ - textwrap.dedent(u'''\ - - - - - - Cython: {filename} - - - -

Generated by Cython {watermark}{more_info}

-

- Yellow lines hint at Python interaction.
- Click on a line that starts with a "+" to see the C code that Cython generated for it. -

- ''').format(css=self._css(), watermark=Version.watermark, - filename=os.path.basename(source_filename) if source_filename else '', - more_info=coverage_info) - ] - if c_file: - outlist.append(u'

Raw output: %s

\n' % (c_file, c_file)) - return outlist - - def _save_annotation_footer(self): - return (u'\n',) - - def _save_annotation(self, code, generated_code, c_file=None, source_filename=None, coverage_xml=None): - """ - lines : original cython source code split by lines - generated_code : generated c code keyed by line number in original file - target filename : name of the file in which to store the generated html - c_file : filename in which the c_code has been written - """ - if coverage_xml is not None and source_filename: - coverage_timestamp = coverage_xml.get('timestamp', '').strip() - covered_lines = self._get_line_coverage(coverage_xml, source_filename) - else: - coverage_timestamp = covered_lines = None - annotation_items = dict(self.annotations[source_filename]) - scopes = dict(self.scopes[source_filename]) - - outlist = [] - outlist.extend(self._save_annotation_header(c_file, source_filename, coverage_timestamp)) - outlist.extend(self._save_annotation_body(code, generated_code, annotation_items, scopes, covered_lines)) - outlist.extend(self._save_annotation_footer()) - return ''.join(outlist) - - def _get_line_coverage(self, coverage_xml, source_filename): - coverage_data = None - for entry in coverage_xml.iterfind('.//class'): - if not entry.get('filename'): - continue - if (entry.get('filename') == source_filename or - os.path.abspath(entry.get('filename')) == source_filename): - coverage_data = entry - break - elif source_filename.endswith(entry.get('filename')): - coverage_data = entry # but we might still find a better match... - if coverage_data is None: - return None - return dict( - (int(line.get('number')), int(line.get('hits'))) - for line in coverage_data.iterfind('lines/line') - ) - - def _htmlify_code(self, code): - try: - from pygments import highlight - from pygments.lexers import CythonLexer - from pygments.formatters import HtmlFormatter - except ImportError: - # no Pygments, just escape the code - return html_escape(code) - - html_code = highlight( - code, CythonLexer(stripnl=False, stripall=False), - HtmlFormatter(nowrap=True)) - return html_code - - def _save_annotation_body(self, cython_code, generated_code, annotation_items, scopes, covered_lines=None): - outlist = [u'
'] - pos_comment_marker = u'/* \N{HORIZONTAL ELLIPSIS} */\n' - new_calls_map = dict( - (name, 0) for name in - 'refnanny trace py_macro_api py_c_api pyx_macro_api pyx_c_api error_goto'.split() - ).copy - - self.mark_pos(None) - - def annotate(match): - group_name = match.lastgroup - calls[group_name] += 1 - return u"%s" % ( - group_name, match.group(group_name)) - - lines = self._htmlify_code(cython_code).splitlines() - lineno_width = len(str(len(lines))) - if not covered_lines: - covered_lines = None - - for k, line in enumerate(lines, 1): - try: - c_code = generated_code[k] - except KeyError: - c_code = '' - else: - c_code = _replace_pos_comment(pos_comment_marker, c_code) - if c_code.startswith(pos_comment_marker): - c_code = c_code[len(pos_comment_marker):] - c_code = html_escape(c_code) - - calls = new_calls_map() - c_code = _parse_code(annotate, c_code) - score = (5 * calls['py_c_api'] + 2 * calls['pyx_c_api'] + - calls['py_macro_api'] + calls['pyx_macro_api']) - - if c_code: - onclick = self._onclick_attr - expandsymbol = '+' - else: - onclick = '' - expandsymbol = ' ' - - covered = '' - if covered_lines is not None and k in covered_lines: - hits = covered_lines[k] - if hits is not None: - covered = 'run' if hits else 'mis' - - outlist.append( - u'
'
-                # generate line number with expand symbol in front,
-                # and the right  number of digit
-                u'{expandsymbol}{line:0{lineno_width}d}: {code}
\n'.format( - score=score, - expandsymbol=expandsymbol, - covered=covered, - lineno_width=lineno_width, - line=k, - code=line.rstrip(), - onclick=onclick, - )) - if c_code: - outlist.append(u"
{code}
".format( - score=score, covered=covered, code=c_code)) - outlist.append(u"
") - return outlist - - -_parse_code = re.compile(( - br'(?P__Pyx_X?(?:GOT|GIVE)REF|__Pyx_RefNanny[A-Za-z]+)|' - br'(?P__Pyx_Trace[A-Za-z]+)|' - br'(?:' - br'(?P__Pyx_[A-Z][A-Z_]+)|' - br'(?P(?:__Pyx_[A-Z][a-z_][A-Za-z_]*)|__pyx_convert_[A-Za-z_]*)|' - br'(?PPy[A-Z][a-z]+_[A-Z][A-Z_]+)|' - br'(?PPy[A-Z][a-z]+_[A-Z][a-z][A-Za-z_]*)' - br')(?=\()|' # look-ahead to exclude subsequent '(' from replacement - br'(?P(?:(?<=;) *if [^;]* +)?__PYX_ERR\([^)]+\))' -).decode('ascii')).sub - - -_replace_pos_comment = re.compile( - # this matches what Cython generates as code line marker comment - br'^\s*/\*(?:(?:[^*]|\*[^/])*\n)+\s*\*/\s*\n'.decode('ascii'), - re.M -).sub - - -class AnnotationItem(object): - - def __init__(self, style, text, tag="", size=0): - self.style = style - self.text = text - self.tag = tag - self.size = size - - def start(self): - return u"%s" % (self.style, self.text, self.tag) - - def end(self): - return self.size, u"" diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/AutoDocTransforms.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/AutoDocTransforms.py deleted file mode 100644 index d3c0a1d0da4..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/AutoDocTransforms.py +++ /dev/null @@ -1,214 +0,0 @@ -from __future__ import absolute_import, print_function - -from .Visitor import CythonTransform -from .StringEncoding import EncodedString -from . import Options -from . import PyrexTypes, ExprNodes -from ..CodeWriter import ExpressionWriter - - -class AnnotationWriter(ExpressionWriter): - - def visit_Node(self, node): - self.put(u"") - - def visit_LambdaNode(self, node): - # XXX Should we do better? - self.put("") - - -class EmbedSignature(CythonTransform): - - def __init__(self, context): - super(EmbedSignature, self).__init__(context) - self.class_name = None - self.class_node = None - - def _fmt_expr(self, node): - writer = AnnotationWriter() - result = writer.write(node) - # print(type(node).__name__, '-->', result) - return result - - def _fmt_arg(self, arg): - if arg.type is PyrexTypes.py_object_type or arg.is_self_arg: - doc = arg.name - else: - doc = arg.type.declaration_code(arg.name, for_display=1) - - if arg.annotation: - annotation = self._fmt_expr(arg.annotation) - doc = doc + (': %s' % annotation) - if arg.default: - default = self._fmt_expr(arg.default) - doc = doc + (' = %s' % default) - elif arg.default: - default = self._fmt_expr(arg.default) - doc = doc + ('=%s' % default) - return doc - - def _fmt_star_arg(self, arg): - arg_doc = arg.name - if arg.annotation: - annotation = self._fmt_expr(arg.annotation) - arg_doc = arg_doc + (': %s' % annotation) - return arg_doc - - def _fmt_arglist(self, args, - npargs=0, pargs=None, - nkargs=0, kargs=None, - hide_self=False): - arglist = [] - for arg in args: - if not hide_self or not arg.entry.is_self_arg: - arg_doc = self._fmt_arg(arg) - arglist.append(arg_doc) - if pargs: - arg_doc = self._fmt_star_arg(pargs) - arglist.insert(npargs, '*%s' % arg_doc) - elif nkargs: - arglist.insert(npargs, '*') - if kargs: - arg_doc = self._fmt_star_arg(kargs) - arglist.append('**%s' % arg_doc) - return arglist - - def _fmt_ret_type(self, ret): - if ret is PyrexTypes.py_object_type: - return None - else: - return ret.declaration_code("", for_display=1) - - def _fmt_signature(self, cls_name, func_name, args, - npargs=0, pargs=None, - nkargs=0, kargs=None, - return_expr=None, - return_type=None, hide_self=False): - arglist = self._fmt_arglist(args, - npargs, pargs, - nkargs, kargs, - hide_self=hide_self) - arglist_doc = ', '.join(arglist) - func_doc = '%s(%s)' % (func_name, arglist_doc) - if cls_name: - func_doc = '%s.%s' % (cls_name, func_doc) - ret_doc = None - if return_expr: - ret_doc = self._fmt_expr(return_expr) - elif return_type: - ret_doc = self._fmt_ret_type(return_type) - if ret_doc: - func_doc = '%s -> %s' % (func_doc, ret_doc) - return func_doc - - def _embed_signature(self, signature, node_doc): - if node_doc: - return "%s\n%s" % (signature, node_doc) - else: - return signature - - def __call__(self, node): - if not Options.docstrings: - return node - else: - return super(EmbedSignature, self).__call__(node) - - def visit_ClassDefNode(self, node): - oldname = self.class_name - oldclass = self.class_node - self.class_node = node - try: - # PyClassDefNode - self.class_name = node.name - except AttributeError: - # CClassDefNode - self.class_name = node.class_name - self.visitchildren(node) - self.class_name = oldname - self.class_node = oldclass - return node - - def visit_LambdaNode(self, node): - # lambda expressions so not have signature or inner functions - return node - - def visit_DefNode(self, node): - if not self.current_directives['embedsignature']: - return node - - is_constructor = False - hide_self = False - if node.entry.is_special: - is_constructor = self.class_node and node.name == '__init__' - if not is_constructor: - return node - class_name, func_name = None, self.class_name - hide_self = True - else: - class_name, func_name = self.class_name, node.name - - nkargs = getattr(node, 'num_kwonly_args', 0) - npargs = len(node.args) - nkargs - signature = self._fmt_signature( - class_name, func_name, node.args, - npargs, node.star_arg, - nkargs, node.starstar_arg, - return_expr=node.return_type_annotation, - return_type=None, hide_self=hide_self) - if signature: - if is_constructor: - doc_holder = self.class_node.entry.type.scope - else: - doc_holder = node.entry - - if doc_holder.doc is not None: - old_doc = doc_holder.doc - elif not is_constructor and getattr(node, 'py_func', None) is not None: - old_doc = node.py_func.entry.doc - else: - old_doc = None - new_doc = self._embed_signature(signature, old_doc) - doc_holder.doc = EncodedString(new_doc) - if not is_constructor and getattr(node, 'py_func', None) is not None: - node.py_func.entry.doc = EncodedString(new_doc) - return node - - def visit_CFuncDefNode(self, node): - if not self.current_directives['embedsignature']: - return node - if not node.overridable: # not cpdef FOO(...): - return node - - signature = self._fmt_signature( - self.class_name, node.declarator.base.name, - node.declarator.args, - return_type=node.return_type) - if signature: - if node.entry.doc is not None: - old_doc = node.entry.doc - elif getattr(node, 'py_func', None) is not None: - old_doc = node.py_func.entry.doc - else: - old_doc = None - new_doc = self._embed_signature(signature, old_doc) - node.entry.doc = EncodedString(new_doc) - if hasattr(node, 'py_func') and node.py_func is not None: - node.py_func.entry.doc = EncodedString(new_doc) - return node - - def visit_PropertyNode(self, node): - if not self.current_directives['embedsignature']: - return node - - entry = node.entry - if entry.visibility == 'public': - # property synthesised from a cdef public attribute - type_name = entry.type.declaration_code("", for_display=1) - if not entry.type.is_pyobject: - type_name = "'%s'" % type_name - elif entry.type.is_extension_type: - type_name = entry.type.module_name + '.' + type_name - signature = '%s: %s' % (entry.name, type_name) - new_doc = self._embed_signature(signature, entry.doc) - entry.doc = EncodedString(new_doc) - return node diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Buffer.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Buffer.py deleted file mode 100644 index c62a24f5686..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Buffer.py +++ /dev/null @@ -1,740 +0,0 @@ -from __future__ import absolute_import - -from .Visitor import CythonTransform -from .ModuleNode import ModuleNode -from .Errors import CompileError -from .UtilityCode import CythonUtilityCode -from .Code import UtilityCode, TempitaUtilityCode - -from . import Options -from . import Interpreter -from . import PyrexTypes -from . import Naming -from . import Symtab - -def dedent(text, reindent=0): - from textwrap import dedent - text = dedent(text) - if reindent > 0: - indent = " " * reindent - text = '\n'.join([indent + x for x in text.split('\n')]) - return text - -class IntroduceBufferAuxiliaryVars(CythonTransform): - - # - # Entry point - # - - buffers_exists = False - using_memoryview = False - - def __call__(self, node): - assert isinstance(node, ModuleNode) - self.max_ndim = 0 - result = super(IntroduceBufferAuxiliaryVars, self).__call__(node) - if self.buffers_exists: - use_bufstruct_declare_code(node.scope) - use_py2_buffer_functions(node.scope) - - return result - - - # - # Basic operations for transforms - # - def handle_scope(self, node, scope): - # For all buffers, insert extra variables in the scope. - # The variables are also accessible from the buffer_info - # on the buffer entry - scope_items = scope.entries.items() - bufvars = [entry for name, entry in scope_items if entry.type.is_buffer] - if len(bufvars) > 0: - bufvars.sort(key=lambda entry: entry.name) - self.buffers_exists = True - - memviewslicevars = [entry for name, entry in scope_items if entry.type.is_memoryviewslice] - if len(memviewslicevars) > 0: - self.buffers_exists = True - - - for (name, entry) in scope_items: - if name == 'memoryview' and isinstance(entry.utility_code_definition, CythonUtilityCode): - self.using_memoryview = True - break - del scope_items - - if isinstance(node, ModuleNode) and len(bufvars) > 0: - # for now...note that pos is wrong - raise CompileError(node.pos, "Buffer vars not allowed in module scope") - for entry in bufvars: - if entry.type.dtype.is_ptr: - raise CompileError(node.pos, "Buffers with pointer types not yet supported.") - - name = entry.name - buftype = entry.type - if buftype.ndim > Options.buffer_max_dims: - raise CompileError(node.pos, - "Buffer ndims exceeds Options.buffer_max_dims = %d" % Options.buffer_max_dims) - if buftype.ndim > self.max_ndim: - self.max_ndim = buftype.ndim - - # Declare auxiliary vars - def decvar(type, prefix): - cname = scope.mangle(prefix, name) - aux_var = scope.declare_var(name=None, cname=cname, - type=type, pos=node.pos) - if entry.is_arg: - aux_var.used = True # otherwise, NameNode will mark whether it is used - - return aux_var - - auxvars = ((PyrexTypes.c_pyx_buffer_nd_type, Naming.pybuffernd_prefix), - (PyrexTypes.c_pyx_buffer_type, Naming.pybufferstruct_prefix)) - pybuffernd, rcbuffer = [decvar(type, prefix) for (type, prefix) in auxvars] - - entry.buffer_aux = Symtab.BufferAux(pybuffernd, rcbuffer) - - scope.buffer_entries = bufvars - self.scope = scope - - def visit_ModuleNode(self, node): - self.handle_scope(node, node.scope) - self.visitchildren(node) - return node - - def visit_FuncDefNode(self, node): - self.handle_scope(node, node.local_scope) - self.visitchildren(node) - return node - -# -# Analysis -# -buffer_options = ("dtype", "ndim", "mode", "negative_indices", "cast") # ordered! -buffer_defaults = {"ndim": 1, "mode": "full", "negative_indices": True, "cast": False} -buffer_positional_options_count = 1 # anything beyond this needs keyword argument - -ERR_BUF_OPTION_UNKNOWN = '"%s" is not a buffer option' -ERR_BUF_TOO_MANY = 'Too many buffer options' -ERR_BUF_DUP = '"%s" buffer option already supplied' -ERR_BUF_MISSING = '"%s" missing' -ERR_BUF_MODE = 'Only allowed buffer modes are: "c", "fortran", "full", "strided" (as a compile-time string)' -ERR_BUF_NDIM = 'ndim must be a non-negative integer' -ERR_BUF_DTYPE = 'dtype must be "object", numeric type or a struct' -ERR_BUF_BOOL = '"%s" must be a boolean' - -def analyse_buffer_options(globalpos, env, posargs, dictargs, defaults=None, need_complete=True): - """ - Must be called during type analysis, as analyse is called - on the dtype argument. - - posargs and dictargs should consist of a list and a dict - of tuples (value, pos). Defaults should be a dict of values. - - Returns a dict containing all the options a buffer can have and - its value (with the positions stripped). - """ - if defaults is None: - defaults = buffer_defaults - - posargs, dictargs = Interpreter.interpret_compiletime_options( - posargs, dictargs, type_env=env, type_args=(0, 'dtype')) - - if len(posargs) > buffer_positional_options_count: - raise CompileError(posargs[-1][1], ERR_BUF_TOO_MANY) - - options = {} - for name, (value, pos) in dictargs.items(): - if not name in buffer_options: - raise CompileError(pos, ERR_BUF_OPTION_UNKNOWN % name) - options[name] = value - - for name, (value, pos) in zip(buffer_options, posargs): - if not name in buffer_options: - raise CompileError(pos, ERR_BUF_OPTION_UNKNOWN % name) - if name in options: - raise CompileError(pos, ERR_BUF_DUP % name) - options[name] = value - - # Check that they are all there and copy defaults - for name in buffer_options: - if not name in options: - try: - options[name] = defaults[name] - except KeyError: - if need_complete: - raise CompileError(globalpos, ERR_BUF_MISSING % name) - - dtype = options.get("dtype") - if dtype and dtype.is_extension_type: - raise CompileError(globalpos, ERR_BUF_DTYPE) - - ndim = options.get("ndim") - if ndim and (not isinstance(ndim, int) or ndim < 0): - raise CompileError(globalpos, ERR_BUF_NDIM) - - mode = options.get("mode") - if mode and not (mode in ('full', 'strided', 'c', 'fortran')): - raise CompileError(globalpos, ERR_BUF_MODE) - - def assert_bool(name): - x = options.get(name) - if not isinstance(x, bool): - raise CompileError(globalpos, ERR_BUF_BOOL % name) - - assert_bool('negative_indices') - assert_bool('cast') - - return options - - -# -# Code generation -# - -class BufferEntry(object): - def __init__(self, entry): - self.entry = entry - self.type = entry.type - self.cname = entry.buffer_aux.buflocal_nd_var.cname - self.buf_ptr = "%s.rcbuffer->pybuffer.buf" % self.cname - self.buf_ptr_type = entry.type.buffer_ptr_type - self.init_attributes() - - def init_attributes(self): - self.shape = self.get_buf_shapevars() - self.strides = self.get_buf_stridevars() - self.suboffsets = self.get_buf_suboffsetvars() - - def get_buf_suboffsetvars(self): - return self._for_all_ndim("%s.diminfo[%d].suboffsets") - - def get_buf_stridevars(self): - return self._for_all_ndim("%s.diminfo[%d].strides") - - def get_buf_shapevars(self): - return self._for_all_ndim("%s.diminfo[%d].shape") - - def _for_all_ndim(self, s): - return [s % (self.cname, i) for i in range(self.type.ndim)] - - def generate_buffer_lookup_code(self, code, index_cnames): - # Create buffer lookup and return it - # This is done via utility macros/inline functions, which vary - # according to the access mode used. - params = [] - nd = self.type.ndim - mode = self.type.mode - if mode == 'full': - for i, s, o in zip(index_cnames, - self.get_buf_stridevars(), - self.get_buf_suboffsetvars()): - params.append(i) - params.append(s) - params.append(o) - funcname = "__Pyx_BufPtrFull%dd" % nd - funcgen = buf_lookup_full_code - else: - if mode == 'strided': - funcname = "__Pyx_BufPtrStrided%dd" % nd - funcgen = buf_lookup_strided_code - elif mode == 'c': - funcname = "__Pyx_BufPtrCContig%dd" % nd - funcgen = buf_lookup_c_code - elif mode == 'fortran': - funcname = "__Pyx_BufPtrFortranContig%dd" % nd - funcgen = buf_lookup_fortran_code - else: - assert False - for i, s in zip(index_cnames, self.get_buf_stridevars()): - params.append(i) - params.append(s) - - # Make sure the utility code is available - if funcname not in code.globalstate.utility_codes: - code.globalstate.utility_codes.add(funcname) - protocode = code.globalstate['utility_code_proto'] - defcode = code.globalstate['utility_code_def'] - funcgen(protocode, defcode, name=funcname, nd=nd) - - buf_ptr_type_code = self.buf_ptr_type.empty_declaration_code() - ptrcode = "%s(%s, %s, %s)" % (funcname, buf_ptr_type_code, self.buf_ptr, - ", ".join(params)) - return ptrcode - - -def get_flags(buffer_aux, buffer_type): - flags = 'PyBUF_FORMAT' - mode = buffer_type.mode - if mode == 'full': - flags += '| PyBUF_INDIRECT' - elif mode == 'strided': - flags += '| PyBUF_STRIDES' - elif mode == 'c': - flags += '| PyBUF_C_CONTIGUOUS' - elif mode == 'fortran': - flags += '| PyBUF_F_CONTIGUOUS' - else: - assert False - if buffer_aux.writable_needed: flags += "| PyBUF_WRITABLE" - return flags - -def used_buffer_aux_vars(entry): - buffer_aux = entry.buffer_aux - buffer_aux.buflocal_nd_var.used = True - buffer_aux.rcbuf_var.used = True - -def put_unpack_buffer_aux_into_scope(buf_entry, code): - # Generate code to copy the needed struct info into local - # variables. - buffer_aux, mode = buf_entry.buffer_aux, buf_entry.type.mode - pybuffernd_struct = buffer_aux.buflocal_nd_var.cname - - fldnames = ['strides', 'shape'] - if mode == 'full': - fldnames.append('suboffsets') - - ln = [] - for i in range(buf_entry.type.ndim): - for fldname in fldnames: - ln.append("%s.diminfo[%d].%s = %s.rcbuffer->pybuffer.%s[%d];" % \ - (pybuffernd_struct, i, fldname, - pybuffernd_struct, fldname, i)) - code.putln(' '.join(ln)) - -def put_init_vars(entry, code): - bufaux = entry.buffer_aux - pybuffernd_struct = bufaux.buflocal_nd_var.cname - pybuffer_struct = bufaux.rcbuf_var.cname - # init pybuffer_struct - code.putln("%s.pybuffer.buf = NULL;" % pybuffer_struct) - code.putln("%s.refcount = 0;" % pybuffer_struct) - # init the buffer object - # code.put_init_var_to_py_none(entry) - # init the pybuffernd_struct - code.putln("%s.data = NULL;" % pybuffernd_struct) - code.putln("%s.rcbuffer = &%s;" % (pybuffernd_struct, pybuffer_struct)) - - -def put_acquire_arg_buffer(entry, code, pos): - buffer_aux = entry.buffer_aux - getbuffer = get_getbuffer_call(code, entry.cname, buffer_aux, entry.type) - - # Acquire any new buffer - code.putln("{") - code.putln("__Pyx_BufFmt_StackElem __pyx_stack[%d];" % entry.type.dtype.struct_nesting_depth()) - code.putln(code.error_goto_if("%s == -1" % getbuffer, pos)) - code.putln("}") - # An exception raised in arg parsing cannot be caught, so no - # need to care about the buffer then. - put_unpack_buffer_aux_into_scope(entry, code) - - -def put_release_buffer_code(code, entry): - code.globalstate.use_utility_code(acquire_utility_code) - code.putln("__Pyx_SafeReleaseBuffer(&%s.rcbuffer->pybuffer);" % entry.buffer_aux.buflocal_nd_var.cname) - - -def get_getbuffer_call(code, obj_cname, buffer_aux, buffer_type): - ndim = buffer_type.ndim - cast = int(buffer_type.cast) - flags = get_flags(buffer_aux, buffer_type) - pybuffernd_struct = buffer_aux.buflocal_nd_var.cname - - dtype_typeinfo = get_type_information_cname(code, buffer_type.dtype) - - code.globalstate.use_utility_code(acquire_utility_code) - return ("__Pyx_GetBufferAndValidate(&%(pybuffernd_struct)s.rcbuffer->pybuffer, " - "(PyObject*)%(obj_cname)s, &%(dtype_typeinfo)s, %(flags)s, %(ndim)d, " - "%(cast)d, __pyx_stack)" % locals()) - - -def put_assign_to_buffer(lhs_cname, rhs_cname, buf_entry, - is_initialized, pos, code): - """ - Generate code for reassigning a buffer variables. This only deals with getting - the buffer auxiliary structure and variables set up correctly, the assignment - itself and refcounting is the responsibility of the caller. - - However, the assignment operation may throw an exception so that the reassignment - never happens. - - Depending on the circumstances there are two possible outcomes: - - Old buffer released, new acquired, rhs assigned to lhs - - Old buffer released, new acquired which fails, reaqcuire old lhs buffer - (which may or may not succeed). - """ - - buffer_aux, buffer_type = buf_entry.buffer_aux, buf_entry.type - pybuffernd_struct = buffer_aux.buflocal_nd_var.cname - flags = get_flags(buffer_aux, buffer_type) - - code.putln("{") # Set up necessary stack for getbuffer - code.putln("__Pyx_BufFmt_StackElem __pyx_stack[%d];" % buffer_type.dtype.struct_nesting_depth()) - - getbuffer = get_getbuffer_call(code, "%s", buffer_aux, buffer_type) # fill in object below - - if is_initialized: - # Release any existing buffer - code.putln('__Pyx_SafeReleaseBuffer(&%s.rcbuffer->pybuffer);' % pybuffernd_struct) - # Acquire - retcode_cname = code.funcstate.allocate_temp(PyrexTypes.c_int_type, manage_ref=False) - code.putln("%s = %s;" % (retcode_cname, getbuffer % rhs_cname)) - code.putln('if (%s) {' % (code.unlikely("%s < 0" % retcode_cname))) - # If acquisition failed, attempt to reacquire the old buffer - # before raising the exception. A failure of reacquisition - # will cause the reacquisition exception to be reported, one - # can consider working around this later. - exc_temps = tuple(code.funcstate.allocate_temp(PyrexTypes.py_object_type, manage_ref=False) - for _ in range(3)) - code.putln('PyErr_Fetch(&%s, &%s, &%s);' % exc_temps) - code.putln('if (%s) {' % code.unlikely("%s == -1" % (getbuffer % lhs_cname))) - code.putln('Py_XDECREF(%s); Py_XDECREF(%s); Py_XDECREF(%s);' % exc_temps) # Do not refnanny these! - code.globalstate.use_utility_code(raise_buffer_fallback_code) - code.putln('__Pyx_RaiseBufferFallbackError();') - code.putln('} else {') - code.putln('PyErr_Restore(%s, %s, %s);' % exc_temps) - code.putln('}') - code.putln('%s = %s = %s = 0;' % exc_temps) - for t in exc_temps: - code.funcstate.release_temp(t) - code.putln('}') - # Unpack indices - put_unpack_buffer_aux_into_scope(buf_entry, code) - code.putln(code.error_goto_if_neg(retcode_cname, pos)) - code.funcstate.release_temp(retcode_cname) - else: - # Our entry had no previous value, so set to None when acquisition fails. - # In this case, auxiliary vars should be set up right in initialization to a zero-buffer, - # so it suffices to set the buf field to NULL. - code.putln('if (%s) {' % code.unlikely("%s == -1" % (getbuffer % rhs_cname))) - code.putln('%s = %s; __Pyx_INCREF(Py_None); %s.rcbuffer->pybuffer.buf = NULL;' % - (lhs_cname, - PyrexTypes.typecast(buffer_type, PyrexTypes.py_object_type, "Py_None"), - pybuffernd_struct)) - code.putln(code.error_goto(pos)) - code.put('} else {') - # Unpack indices - put_unpack_buffer_aux_into_scope(buf_entry, code) - code.putln('}') - - code.putln("}") # Release stack - - -def put_buffer_lookup_code(entry, index_signeds, index_cnames, directives, - pos, code, negative_indices, in_nogil_context): - """ - Generates code to process indices and calculate an offset into - a buffer. Returns a C string which gives a pointer which can be - read from or written to at will (it is an expression so caller should - store it in a temporary if it is used more than once). - - As the bounds checking can have any number of combinations of unsigned - arguments, smart optimizations etc. we insert it directly in the function - body. The lookup however is delegated to a inline function that is instantiated - once per ndim (lookup with suboffsets tend to get quite complicated). - - entry is a BufferEntry - """ - negative_indices = directives['wraparound'] and negative_indices - - if directives['boundscheck']: - # Check bounds and fix negative indices. - # We allocate a temporary which is initialized to -1, meaning OK (!). - # If an error occurs, the temp is set to the index dimension the - # error is occurring at. - failed_dim_temp = code.funcstate.allocate_temp(PyrexTypes.c_int_type, manage_ref=False) - code.putln("%s = -1;" % failed_dim_temp) - for dim, (signed, cname, shape) in enumerate(zip(index_signeds, index_cnames, entry.get_buf_shapevars())): - if signed != 0: - # not unsigned, deal with negative index - code.putln("if (%s < 0) {" % cname) - if negative_indices: - code.putln("%s += %s;" % (cname, shape)) - code.putln("if (%s) %s = %d;" % ( - code.unlikely("%s < 0" % cname), - failed_dim_temp, dim)) - else: - code.putln("%s = %d;" % (failed_dim_temp, dim)) - code.put("} else ") - # check bounds in positive direction - if signed != 0: - cast = "" - else: - cast = "(size_t)" - code.putln("if (%s) %s = %d;" % ( - code.unlikely("%s >= %s%s" % (cname, cast, shape)), - failed_dim_temp, dim)) - - if in_nogil_context: - code.globalstate.use_utility_code(raise_indexerror_nogil) - func = '__Pyx_RaiseBufferIndexErrorNogil' - else: - code.globalstate.use_utility_code(raise_indexerror_code) - func = '__Pyx_RaiseBufferIndexError' - - code.putln("if (%s) {" % code.unlikely("%s != -1" % failed_dim_temp)) - code.putln('%s(%s);' % (func, failed_dim_temp)) - code.putln(code.error_goto(pos)) - code.putln('}') - code.funcstate.release_temp(failed_dim_temp) - elif negative_indices: - # Only fix negative indices. - for signed, cname, shape in zip(index_signeds, index_cnames, entry.get_buf_shapevars()): - if signed != 0: - code.putln("if (%s < 0) %s += %s;" % (cname, cname, shape)) - - return entry.generate_buffer_lookup_code(code, index_cnames) - - -def use_bufstruct_declare_code(env): - env.use_utility_code(buffer_struct_declare_code) - - -def buf_lookup_full_code(proto, defin, name, nd): - """ - Generates a buffer lookup function for the right number - of dimensions. The function gives back a void* at the right location. - """ - # _i_ndex, _s_tride, sub_o_ffset - macroargs = ", ".join(["i%d, s%d, o%d" % (i, i, i) for i in range(nd)]) - proto.putln("#define %s(type, buf, %s) (type)(%s_imp(buf, %s))" % (name, macroargs, name, macroargs)) - - funcargs = ", ".join(["Py_ssize_t i%d, Py_ssize_t s%d, Py_ssize_t o%d" % (i, i, i) for i in range(nd)]) - proto.putln("static CYTHON_INLINE void* %s_imp(void* buf, %s);" % (name, funcargs)) - defin.putln(dedent(""" - static CYTHON_INLINE void* %s_imp(void* buf, %s) { - char* ptr = (char*)buf; - """) % (name, funcargs) + "".join([dedent("""\ - ptr += s%d * i%d; - if (o%d >= 0) ptr = *((char**)ptr) + o%d; - """) % (i, i, i, i) for i in range(nd)] - ) + "\nreturn ptr;\n}") - - -def buf_lookup_strided_code(proto, defin, name, nd): - """ - Generates a buffer lookup function for the right number - of dimensions. The function gives back a void* at the right location. - """ - # _i_ndex, _s_tride - args = ", ".join(["i%d, s%d" % (i, i) for i in range(nd)]) - offset = " + ".join(["i%d * s%d" % (i, i) for i in range(nd)]) - proto.putln("#define %s(type, buf, %s) (type)((char*)buf + %s)" % (name, args, offset)) - - -def buf_lookup_c_code(proto, defin, name, nd): - """ - Similar to strided lookup, but can assume that the last dimension - doesn't need a multiplication as long as. - Still we keep the same signature for now. - """ - if nd == 1: - proto.putln("#define %s(type, buf, i0, s0) ((type)buf + i0)" % name) - else: - args = ", ".join(["i%d, s%d" % (i, i) for i in range(nd)]) - offset = " + ".join(["i%d * s%d" % (i, i) for i in range(nd - 1)]) - proto.putln("#define %s(type, buf, %s) ((type)((char*)buf + %s) + i%d)" % (name, args, offset, nd - 1)) - - -def buf_lookup_fortran_code(proto, defin, name, nd): - """ - Like C lookup, but the first index is optimized instead. - """ - if nd == 1: - proto.putln("#define %s(type, buf, i0, s0) ((type)buf + i0)" % name) - else: - args = ", ".join(["i%d, s%d" % (i, i) for i in range(nd)]) - offset = " + ".join(["i%d * s%d" % (i, i) for i in range(1, nd)]) - proto.putln("#define %s(type, buf, %s) ((type)((char*)buf + %s) + i%d)" % (name, args, offset, 0)) - - -def use_py2_buffer_functions(env): - env.use_utility_code(GetAndReleaseBufferUtilityCode()) - - -class GetAndReleaseBufferUtilityCode(object): - # Emulation of PyObject_GetBuffer and PyBuffer_Release for Python 2. - # For >= 2.6 we do double mode -- use the new buffer interface on objects - # which has the right tp_flags set, but emulation otherwise. - - requires = None - is_cython_utility = False - - def __init__(self): - pass - - def __eq__(self, other): - return isinstance(other, GetAndReleaseBufferUtilityCode) - - def __hash__(self): - return 24342342 - - def get_tree(self, **kwargs): pass - - def put_code(self, output): - code = output['utility_code_def'] - proto_code = output['utility_code_proto'] - env = output.module_node.scope - cython_scope = env.context.cython_scope - - # Search all types for __getbuffer__ overloads - types = [] - visited_scopes = set() - def find_buffer_types(scope): - if scope in visited_scopes: - return - visited_scopes.add(scope) - for m in scope.cimported_modules: - find_buffer_types(m) - for e in scope.type_entries: - if isinstance(e.utility_code_definition, CythonUtilityCode): - continue - t = e.type - if t.is_extension_type: - if scope is cython_scope and not e.used: - continue - release = get = None - for x in t.scope.pyfunc_entries: - if x.name == u"__getbuffer__": get = x.func_cname - elif x.name == u"__releasebuffer__": release = x.func_cname - if get: - types.append((t.typeptr_cname, get, release)) - - find_buffer_types(env) - - util_code = TempitaUtilityCode.load( - "GetAndReleaseBuffer", from_file="Buffer.c", - context=dict(types=types)) - - proto = util_code.format_code(util_code.proto) - impl = util_code.format_code( - util_code.inject_string_constants(util_code.impl, output)[1]) - - proto_code.putln(proto) - code.putln(impl) - - -def mangle_dtype_name(dtype): - # Use prefixes to separate user defined types from builtins - # (consider "typedef float unsigned_int") - if dtype.is_pyobject: - return "object" - elif dtype.is_ptr: - return "ptr" - else: - if dtype.is_typedef or dtype.is_struct_or_union: - prefix = "nn_" - else: - prefix = "" - return prefix + dtype.specialization_name() - -def get_type_information_cname(code, dtype, maxdepth=None): - """ - Output the run-time type information (__Pyx_TypeInfo) for given dtype, - and return the name of the type info struct. - - Structs with two floats of the same size are encoded as complex numbers. - One can separate between complex numbers declared as struct or with native - encoding by inspecting to see if the fields field of the type is - filled in. - """ - namesuffix = mangle_dtype_name(dtype) - name = "__Pyx_TypeInfo_%s" % namesuffix - structinfo_name = "__Pyx_StructFields_%s" % namesuffix - - if dtype.is_error: return "" - - # It's critical that walking the type info doesn't use more stack - # depth than dtype.struct_nesting_depth() returns, so use an assertion for this - if maxdepth is None: maxdepth = dtype.struct_nesting_depth() - if maxdepth <= 0: - assert False - - if name not in code.globalstate.utility_codes: - code.globalstate.utility_codes.add(name) - typecode = code.globalstate['typeinfo'] - - arraysizes = [] - if dtype.is_array: - while dtype.is_array: - arraysizes.append(dtype.size) - dtype = dtype.base_type - - complex_possible = dtype.is_struct_or_union and dtype.can_be_complex() - - declcode = dtype.empty_declaration_code() - if dtype.is_simple_buffer_dtype(): - structinfo_name = "NULL" - elif dtype.is_struct: - struct_scope = dtype.scope - if dtype.is_const: - struct_scope = struct_scope.const_base_type_scope - # Must pre-call all used types in order not to recurse during utility code writing. - fields = struct_scope.var_entries - assert len(fields) > 0 - types = [get_type_information_cname(code, f.type, maxdepth - 1) - for f in fields] - typecode.putln("static __Pyx_StructField %s[] = {" % structinfo_name, safe=True) - for f, typeinfo in zip(fields, types): - typecode.putln(' {&%s, "%s", offsetof(%s, %s)},' % - (typeinfo, f.name, dtype.empty_declaration_code(), f.cname), safe=True) - typecode.putln(' {NULL, NULL, 0}', safe=True) - typecode.putln("};", safe=True) - else: - assert False - - rep = str(dtype) - - flags = "0" - is_unsigned = "0" - if dtype is PyrexTypes.c_char_type: - is_unsigned = "IS_UNSIGNED(%s)" % declcode - typegroup = "'H'" - elif dtype.is_int: - is_unsigned = "IS_UNSIGNED(%s)" % declcode - typegroup = "%s ? 'U' : 'I'" % is_unsigned - elif complex_possible or dtype.is_complex: - typegroup = "'C'" - elif dtype.is_float: - typegroup = "'R'" - elif dtype.is_struct: - typegroup = "'S'" - if dtype.packed: - flags = "__PYX_BUF_FLAGS_PACKED_STRUCT" - elif dtype.is_pyobject: - typegroup = "'O'" - else: - assert False, dtype - - typeinfo = ('static __Pyx_TypeInfo %s = ' - '{ "%s", %s, sizeof(%s), { %s }, %s, %s, %s, %s };') - tup = (name, rep, structinfo_name, declcode, - ', '.join([str(x) for x in arraysizes]) or '0', len(arraysizes), - typegroup, is_unsigned, flags) - typecode.putln(typeinfo % tup, safe=True) - - return name - -def load_buffer_utility(util_code_name, context=None, **kwargs): - if context is None: - return UtilityCode.load(util_code_name, "Buffer.c", **kwargs) - else: - return TempitaUtilityCode.load(util_code_name, "Buffer.c", context=context, **kwargs) - -context = dict(max_dims=Options.buffer_max_dims) -buffer_struct_declare_code = load_buffer_utility("BufferStructDeclare", context=context) -buffer_formats_declare_code = load_buffer_utility("BufferFormatStructs") - -# Utility function to set the right exception -# The caller should immediately goto_error -raise_indexerror_code = load_buffer_utility("BufferIndexError") -raise_indexerror_nogil = load_buffer_utility("BufferIndexErrorNogil") -raise_buffer_fallback_code = load_buffer_utility("BufferFallbackError") - -acquire_utility_code = load_buffer_utility("BufferGetAndValidate", context=context) -buffer_format_check_code = load_buffer_utility("BufferFormatCheck", context=context) - -# See utility code BufferFormatFromTypeInfo -_typeinfo_to_format_code = load_buffer_utility("TypeInfoToFormat") diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Builtin.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Builtin.py deleted file mode 100644 index e0d203ae027..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Builtin.py +++ /dev/null @@ -1,444 +0,0 @@ -# -# Builtin Definitions -# - -from __future__ import absolute_import - -from .Symtab import BuiltinScope, StructOrUnionScope -from .Code import UtilityCode -from .TypeSlots import Signature -from . import PyrexTypes -from . import Options - - -# C-level implementations of builtin types, functions and methods - -iter_next_utility_code = UtilityCode.load("IterNext", "ObjectHandling.c") -getattr_utility_code = UtilityCode.load("GetAttr", "ObjectHandling.c") -getattr3_utility_code = UtilityCode.load("GetAttr3", "Builtins.c") -pyexec_utility_code = UtilityCode.load("PyExec", "Builtins.c") -pyexec_globals_utility_code = UtilityCode.load("PyExecGlobals", "Builtins.c") -globals_utility_code = UtilityCode.load("Globals", "Builtins.c") - -builtin_utility_code = { - 'StopAsyncIteration': UtilityCode.load_cached("StopAsyncIteration", "Coroutine.c"), -} - - -# mapping from builtins to their C-level equivalents - -class _BuiltinOverride(object): - def __init__(self, py_name, args, ret_type, cname, py_equiv="*", - utility_code=None, sig=None, func_type=None, - is_strict_signature=False, builtin_return_type=None): - self.py_name, self.cname, self.py_equiv = py_name, cname, py_equiv - self.args, self.ret_type = args, ret_type - self.func_type, self.sig = func_type, sig - self.builtin_return_type = builtin_return_type - self.is_strict_signature = is_strict_signature - self.utility_code = utility_code - - def build_func_type(self, sig=None, self_arg=None): - if sig is None: - sig = Signature(self.args, self.ret_type) - sig.exception_check = False # not needed for the current builtins - func_type = sig.function_type(self_arg) - if self.is_strict_signature: - func_type.is_strict_signature = True - if self.builtin_return_type: - func_type.return_type = builtin_types[self.builtin_return_type] - return func_type - - -class BuiltinAttribute(object): - def __init__(self, py_name, cname=None, field_type=None, field_type_name=None): - self.py_name = py_name - self.cname = cname or py_name - self.field_type_name = field_type_name # can't do the lookup before the type is declared! - self.field_type = field_type - - def declare_in_type(self, self_type): - if self.field_type_name is not None: - # lazy type lookup - field_type = builtin_scope.lookup(self.field_type_name).type - else: - field_type = self.field_type or PyrexTypes.py_object_type - entry = self_type.scope.declare(self.py_name, self.cname, field_type, None, 'private') - entry.is_variable = True - - -class BuiltinFunction(_BuiltinOverride): - def declare_in_scope(self, scope): - func_type, sig = self.func_type, self.sig - if func_type is None: - func_type = self.build_func_type(sig) - scope.declare_builtin_cfunction(self.py_name, func_type, self.cname, - self.py_equiv, self.utility_code) - - -class BuiltinMethod(_BuiltinOverride): - def declare_in_type(self, self_type): - method_type, sig = self.func_type, self.sig - if method_type is None: - # override 'self' type (first argument) - self_arg = PyrexTypes.CFuncTypeArg("", self_type, None) - self_arg.not_none = True - self_arg.accept_builtin_subtypes = True - method_type = self.build_func_type(sig, self_arg) - self_type.scope.declare_builtin_cfunction( - self.py_name, method_type, self.cname, utility_code=self.utility_code) - - -builtin_function_table = [ - # name, args, return, C API func, py equiv = "*" - BuiltinFunction('abs', "d", "d", "fabs", - is_strict_signature = True), - BuiltinFunction('abs', "f", "f", "fabsf", - is_strict_signature = True), - BuiltinFunction('abs', "i", "i", "abs", - is_strict_signature = True), - BuiltinFunction('abs', "l", "l", "labs", - is_strict_signature = True), - BuiltinFunction('abs', None, None, "__Pyx_abs_longlong", - utility_code = UtilityCode.load("abs_longlong", "Builtins.c"), - func_type = PyrexTypes.CFuncType( - PyrexTypes.c_longlong_type, [ - PyrexTypes.CFuncTypeArg("arg", PyrexTypes.c_longlong_type, None) - ], - is_strict_signature = True, nogil=True)), - ] + list( - BuiltinFunction('abs', None, None, "/*abs_{0}*/".format(t.specialization_name()), - func_type = PyrexTypes.CFuncType( - t, - [PyrexTypes.CFuncTypeArg("arg", t, None)], - is_strict_signature = True, nogil=True)) - for t in (PyrexTypes.c_uint_type, PyrexTypes.c_ulong_type, PyrexTypes.c_ulonglong_type) - ) + list( - BuiltinFunction('abs', None, None, "__Pyx_c_abs{0}".format(t.funcsuffix), - func_type = PyrexTypes.CFuncType( - t.real_type, [ - PyrexTypes.CFuncTypeArg("arg", t, None) - ], - is_strict_signature = True, nogil=True)) - for t in (PyrexTypes.c_float_complex_type, - PyrexTypes.c_double_complex_type, - PyrexTypes.c_longdouble_complex_type) - ) + [ - BuiltinFunction('abs', "O", "O", "__Pyx_PyNumber_Absolute", - utility_code=UtilityCode.load("py_abs", "Builtins.c")), - #('all', "", "", ""), - #('any', "", "", ""), - #('ascii', "", "", ""), - #('bin', "", "", ""), - BuiltinFunction('callable', "O", "b", "__Pyx_PyCallable_Check", - utility_code = UtilityCode.load("CallableCheck", "ObjectHandling.c")), - #('chr', "", "", ""), - #('cmp', "", "", "", ""), # int PyObject_Cmp(PyObject *o1, PyObject *o2, int *result) - #('compile', "", "", ""), # PyObject* Py_CompileString( char *str, char *filename, int start) - BuiltinFunction('delattr', "OO", "r", "PyObject_DelAttr"), - BuiltinFunction('dir', "O", "O", "PyObject_Dir"), - BuiltinFunction('divmod', "OO", "O", "PyNumber_Divmod"), - BuiltinFunction('exec', "O", "O", "__Pyx_PyExecGlobals", - utility_code = pyexec_globals_utility_code), - BuiltinFunction('exec', "OO", "O", "__Pyx_PyExec2", - utility_code = pyexec_utility_code), - BuiltinFunction('exec', "OOO", "O", "__Pyx_PyExec3", - utility_code = pyexec_utility_code), - #('eval', "", "", ""), - #('execfile', "", "", ""), - #('filter', "", "", ""), - BuiltinFunction('getattr3', "OOO", "O", "__Pyx_GetAttr3", "getattr", - utility_code=getattr3_utility_code), # Pyrex legacy - BuiltinFunction('getattr', "OOO", "O", "__Pyx_GetAttr3", - utility_code=getattr3_utility_code), - BuiltinFunction('getattr', "OO", "O", "__Pyx_GetAttr", - utility_code=getattr_utility_code), - BuiltinFunction('hasattr', "OO", "b", "__Pyx_HasAttr", - utility_code = UtilityCode.load("HasAttr", "Builtins.c")), - BuiltinFunction('hash', "O", "h", "PyObject_Hash"), - #('hex', "", "", ""), - #('id', "", "", ""), - #('input', "", "", ""), - BuiltinFunction('intern', "O", "O", "__Pyx_Intern", - utility_code = UtilityCode.load("Intern", "Builtins.c")), - BuiltinFunction('isinstance', "OO", "b", "PyObject_IsInstance"), - BuiltinFunction('issubclass', "OO", "b", "PyObject_IsSubclass"), - BuiltinFunction('iter', "OO", "O", "PyCallIter_New"), - BuiltinFunction('iter', "O", "O", "PyObject_GetIter"), - BuiltinFunction('len', "O", "z", "PyObject_Length"), - BuiltinFunction('locals', "", "O", "__pyx_locals"), - #('map', "", "", ""), - #('max', "", "", ""), - #('min', "", "", ""), - BuiltinFunction('next', "O", "O", "__Pyx_PyIter_Next", - utility_code = iter_next_utility_code), # not available in Py2 => implemented here - BuiltinFunction('next', "OO", "O", "__Pyx_PyIter_Next2", - utility_code = iter_next_utility_code), # not available in Py2 => implemented here - #('oct', "", "", ""), - #('open', "ss", "O", "PyFile_FromString"), # not in Py3 -] + [ - BuiltinFunction('ord', None, None, "__Pyx_long_cast", - func_type=PyrexTypes.CFuncType( - PyrexTypes.c_long_type, [PyrexTypes.CFuncTypeArg("c", c_type, None)], - is_strict_signature=True)) - for c_type in [PyrexTypes.c_py_ucs4_type, PyrexTypes.c_py_unicode_type] -] + [ - BuiltinFunction('ord', None, None, "__Pyx_uchar_cast", - func_type=PyrexTypes.CFuncType( - PyrexTypes.c_uchar_type, [PyrexTypes.CFuncTypeArg("c", c_type, None)], - is_strict_signature=True)) - for c_type in [PyrexTypes.c_char_type, PyrexTypes.c_schar_type, PyrexTypes.c_uchar_type] -] + [ - BuiltinFunction('ord', None, None, "__Pyx_PyObject_Ord", - utility_code=UtilityCode.load_cached("object_ord", "Builtins.c"), - func_type=PyrexTypes.CFuncType( - PyrexTypes.c_long_type, [ - PyrexTypes.CFuncTypeArg("c", PyrexTypes.py_object_type, None) - ], - exception_value="(long)(Py_UCS4)-1")), - BuiltinFunction('pow', "OOO", "O", "PyNumber_Power"), - BuiltinFunction('pow', "OO", "O", "__Pyx_PyNumber_Power2", - utility_code = UtilityCode.load("pow2", "Builtins.c")), - #('range', "", "", ""), - #('raw_input', "", "", ""), - #('reduce', "", "", ""), - BuiltinFunction('reload', "O", "O", "PyImport_ReloadModule"), - BuiltinFunction('repr', "O", "O", "PyObject_Repr"), # , builtin_return_type='str'), # add in Cython 3.1 - #('round', "", "", ""), - BuiltinFunction('setattr', "OOO", "r", "PyObject_SetAttr"), - #('sum', "", "", ""), - #('sorted', "", "", ""), - #('type', "O", "O", "PyObject_Type"), - #('unichr', "", "", ""), - #('unicode', "", "", ""), - #('vars', "", "", ""), - #('zip', "", "", ""), - # Can't do these easily until we have builtin type entries. - #('typecheck', "OO", "i", "PyObject_TypeCheck", False), - #('issubtype', "OO", "i", "PyType_IsSubtype", False), - - # Put in namespace append optimization. - BuiltinFunction('__Pyx_PyObject_Append', "OO", "O", "__Pyx_PyObject_Append"), - - # This is conditionally looked up based on a compiler directive. - BuiltinFunction('__Pyx_Globals', "", "O", "__Pyx_Globals", - utility_code=globals_utility_code), -] - - -# Builtin types -# bool -# buffer -# classmethod -# dict -# enumerate -# file -# float -# int -# list -# long -# object -# property -# slice -# staticmethod -# super -# str -# tuple -# type -# xrange - -builtin_types_table = [ - - ("type", "PyType_Type", []), - -# This conflicts with the C++ bool type, and unfortunately -# C++ is too liberal about PyObject* <-> bool conversions, -# resulting in unintuitive runtime behavior and segfaults. -# ("bool", "PyBool_Type", []), - - ("int", "PyInt_Type", []), - ("long", "PyLong_Type", []), - ("float", "PyFloat_Type", []), - - ("complex", "PyComplex_Type", [BuiltinAttribute('cval', field_type_name = 'Py_complex'), - BuiltinAttribute('real', 'cval.real', field_type = PyrexTypes.c_double_type), - BuiltinAttribute('imag', 'cval.imag', field_type = PyrexTypes.c_double_type), - ]), - - ("basestring", "PyBaseString_Type", [ - BuiltinMethod("join", "TO", "T", "__Pyx_PyBaseString_Join", - utility_code=UtilityCode.load("StringJoin", "StringTools.c")), - ]), - ("bytearray", "PyByteArray_Type", [ - ]), - ("bytes", "PyBytes_Type", [BuiltinMethod("join", "TO", "O", "__Pyx_PyBytes_Join", - utility_code=UtilityCode.load("StringJoin", "StringTools.c")), - ]), - ("str", "PyString_Type", [BuiltinMethod("join", "TO", "O", "__Pyx_PyString_Join", - builtin_return_type='basestring', - utility_code=UtilityCode.load("StringJoin", "StringTools.c")), - ]), - ("unicode", "PyUnicode_Type", [BuiltinMethod("__contains__", "TO", "b", "PyUnicode_Contains"), - BuiltinMethod("join", "TO", "T", "PyUnicode_Join"), - ]), - - ("tuple", "PyTuple_Type", []), - - ("list", "PyList_Type", [BuiltinMethod("insert", "TzO", "r", "PyList_Insert"), - BuiltinMethod("reverse", "T", "r", "PyList_Reverse"), - BuiltinMethod("append", "TO", "r", "__Pyx_PyList_Append", - utility_code=UtilityCode.load("ListAppend", "Optimize.c")), - BuiltinMethod("extend", "TO", "r", "__Pyx_PyList_Extend", - utility_code=UtilityCode.load("ListExtend", "Optimize.c")), - ]), - - ("dict", "PyDict_Type", [BuiltinMethod("__contains__", "TO", "b", "PyDict_Contains"), - BuiltinMethod("has_key", "TO", "b", "PyDict_Contains"), - BuiltinMethod("items", "T", "O", "__Pyx_PyDict_Items", - utility_code=UtilityCode.load("py_dict_items", "Builtins.c")), - BuiltinMethod("keys", "T", "O", "__Pyx_PyDict_Keys", - utility_code=UtilityCode.load("py_dict_keys", "Builtins.c")), - BuiltinMethod("values", "T", "O", "__Pyx_PyDict_Values", - utility_code=UtilityCode.load("py_dict_values", "Builtins.c")), - BuiltinMethod("iteritems", "T", "O", "__Pyx_PyDict_IterItems", - utility_code=UtilityCode.load("py_dict_iteritems", "Builtins.c")), - BuiltinMethod("iterkeys", "T", "O", "__Pyx_PyDict_IterKeys", - utility_code=UtilityCode.load("py_dict_iterkeys", "Builtins.c")), - BuiltinMethod("itervalues", "T", "O", "__Pyx_PyDict_IterValues", - utility_code=UtilityCode.load("py_dict_itervalues", "Builtins.c")), - BuiltinMethod("viewitems", "T", "O", "__Pyx_PyDict_ViewItems", - utility_code=UtilityCode.load("py_dict_viewitems", "Builtins.c")), - BuiltinMethod("viewkeys", "T", "O", "__Pyx_PyDict_ViewKeys", - utility_code=UtilityCode.load("py_dict_viewkeys", "Builtins.c")), - BuiltinMethod("viewvalues", "T", "O", "__Pyx_PyDict_ViewValues", - utility_code=UtilityCode.load("py_dict_viewvalues", "Builtins.c")), - BuiltinMethod("clear", "T", "r", "__Pyx_PyDict_Clear", - utility_code=UtilityCode.load("py_dict_clear", "Optimize.c")), - BuiltinMethod("copy", "T", "T", "PyDict_Copy")]), - - ("slice", "PySlice_Type", [BuiltinAttribute('start'), - BuiltinAttribute('stop'), - BuiltinAttribute('step'), - ]), -# ("file", "PyFile_Type", []), # not in Py3 - - ("set", "PySet_Type", [BuiltinMethod("clear", "T", "r", "PySet_Clear"), - # discard() and remove() have a special treatment for unhashable values - BuiltinMethod("discard", "TO", "r", "__Pyx_PySet_Discard", - utility_code=UtilityCode.load("py_set_discard", "Optimize.c")), - BuiltinMethod("remove", "TO", "r", "__Pyx_PySet_Remove", - utility_code=UtilityCode.load("py_set_remove", "Optimize.c")), - # update is actually variadic (see Github issue #1645) -# BuiltinMethod("update", "TO", "r", "__Pyx_PySet_Update", -# utility_code=UtilityCode.load_cached("PySet_Update", "Builtins.c")), - BuiltinMethod("add", "TO", "r", "PySet_Add"), - BuiltinMethod("pop", "T", "O", "PySet_Pop")]), - ("frozenset", "PyFrozenSet_Type", []), - ("Exception", "((PyTypeObject*)PyExc_Exception)[0]", []), - ("StopAsyncIteration", "((PyTypeObject*)__Pyx_PyExc_StopAsyncIteration)[0]", []), -] - - -types_that_construct_their_instance = set([ - # some builtin types do not always return an instance of - # themselves - these do: - 'type', 'bool', 'long', 'float', 'complex', - 'bytes', 'unicode', 'bytearray', - 'tuple', 'list', 'dict', 'set', 'frozenset' - # 'str', # only in Py3.x - # 'file', # only in Py2.x -]) - - -builtin_structs_table = [ - ('Py_buffer', 'Py_buffer', - [("buf", PyrexTypes.c_void_ptr_type), - ("obj", PyrexTypes.py_object_type), - ("len", PyrexTypes.c_py_ssize_t_type), - ("itemsize", PyrexTypes.c_py_ssize_t_type), - ("readonly", PyrexTypes.c_bint_type), - ("ndim", PyrexTypes.c_int_type), - ("format", PyrexTypes.c_char_ptr_type), - ("shape", PyrexTypes.c_py_ssize_t_ptr_type), - ("strides", PyrexTypes.c_py_ssize_t_ptr_type), - ("suboffsets", PyrexTypes.c_py_ssize_t_ptr_type), - ("smalltable", PyrexTypes.CArrayType(PyrexTypes.c_py_ssize_t_type, 2)), - ("internal", PyrexTypes.c_void_ptr_type), - ]), - ('Py_complex', 'Py_complex', - [('real', PyrexTypes.c_double_type), - ('imag', PyrexTypes.c_double_type), - ]) -] - -# set up builtin scope - -builtin_scope = BuiltinScope() - -def init_builtin_funcs(): - for bf in builtin_function_table: - bf.declare_in_scope(builtin_scope) - -builtin_types = {} - -def init_builtin_types(): - global builtin_types - for name, cname, methods in builtin_types_table: - utility = builtin_utility_code.get(name) - if name == 'frozenset': - objstruct_cname = 'PySetObject' - elif name == 'bytearray': - objstruct_cname = 'PyByteArrayObject' - elif name == 'bool': - objstruct_cname = None - elif name == 'Exception': - objstruct_cname = "PyBaseExceptionObject" - elif name == 'StopAsyncIteration': - objstruct_cname = "PyBaseExceptionObject" - else: - objstruct_cname = 'Py%sObject' % name.capitalize() - the_type = builtin_scope.declare_builtin_type(name, cname, utility, objstruct_cname) - builtin_types[name] = the_type - for method in methods: - method.declare_in_type(the_type) - -def init_builtin_structs(): - for name, cname, attribute_types in builtin_structs_table: - scope = StructOrUnionScope(name) - for attribute_name, attribute_type in attribute_types: - scope.declare_var(attribute_name, attribute_type, None, - attribute_name, allow_pyobject=True) - builtin_scope.declare_struct_or_union( - name, "struct", scope, 1, None, cname = cname) - - -def init_builtins(): - init_builtin_structs() - init_builtin_types() - init_builtin_funcs() - - builtin_scope.declare_var( - '__debug__', PyrexTypes.c_const_type(PyrexTypes.c_bint_type), - pos=None, cname='(!Py_OptimizeFlag)', is_cdef=True) - - global list_type, tuple_type, dict_type, set_type, frozenset_type - global bytes_type, str_type, unicode_type, basestring_type, slice_type - global float_type, bool_type, type_type, complex_type, bytearray_type - type_type = builtin_scope.lookup('type').type - list_type = builtin_scope.lookup('list').type - tuple_type = builtin_scope.lookup('tuple').type - dict_type = builtin_scope.lookup('dict').type - set_type = builtin_scope.lookup('set').type - frozenset_type = builtin_scope.lookup('frozenset').type - slice_type = builtin_scope.lookup('slice').type - bytes_type = builtin_scope.lookup('bytes').type - str_type = builtin_scope.lookup('str').type - unicode_type = builtin_scope.lookup('unicode').type - basestring_type = builtin_scope.lookup('basestring').type - bytearray_type = builtin_scope.lookup('bytearray').type - float_type = builtin_scope.lookup('float').type - bool_type = builtin_scope.lookup('bool').type - complex_type = builtin_scope.lookup('complex').type - - -init_builtins() diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CmdLine.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CmdLine.py deleted file mode 100644 index e89e45ab481..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CmdLine.py +++ /dev/null @@ -1,224 +0,0 @@ -# -# Cython - Command Line Parsing -# - -from __future__ import absolute_import - -import os -import sys -from . import Options - -usage = """\ -Cython (http://cython.org) is a compiler for code written in the -Cython language. Cython is based on Pyrex by Greg Ewing. - -Usage: cython [options] sourcefile.{pyx,py} ... - -Options: - -V, --version Display version number of cython compiler - -l, --create-listing Write error messages to a listing file - -I, --include-dir Search for include files in named directory - (multiple include directories are allowed). - -o, --output-file Specify name of generated C file - -t, --timestamps Only compile newer source files - -f, --force Compile all source files (overrides implied -t) - -v, --verbose Be verbose, print file names on multiple compilation - -p, --embed-positions If specified, the positions in Cython files of each - function definition is embedded in its docstring. - --cleanup Release interned objects on python exit, for memory debugging. - Level indicates aggressiveness, default 0 releases nothing. - -w, --working Sets the working directory for Cython (the directory modules - are searched from) - --gdb Output debug information for cygdb - --gdb-outdir Specify gdb debug information output directory. Implies --gdb. - - -D, --no-docstrings Strip docstrings from the compiled module. - -a, --annotate Produce a colorized HTML version of the source. - --annotate-coverage Annotate and include coverage information from cov.xml. - --line-directives Produce #line directives pointing to the .pyx source - --cplus Output a C++ rather than C file. - --embed[=] Generate a main() function that embeds the Python interpreter. - -2 Compile based on Python-2 syntax and code semantics. - -3 Compile based on Python-3 syntax and code semantics. - --3str Compile based on Python-3 syntax and code semantics without - assuming unicode by default for string literals under Python 2. - --lenient Change some compile time errors to runtime errors to - improve Python compatibility - --capi-reexport-cincludes Add cincluded headers to any auto-generated header files. - --fast-fail Abort the compilation on the first error - --warning-errors, -Werror Make all warnings into errors - --warning-extra, -Wextra Enable extra warnings - -X, --directive =[, 1: - sys.stderr.write( - "cython: Only one source file allowed when using -o\n") - sys.exit(1) - if len(sources) == 0 and not options.show_version: - bad_usage() - if Options.embed and len(sources) > 1: - sys.stderr.write( - "cython: Only one source file allowed when using -embed\n") - sys.exit(1) - return options, sources - diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Code.pxd b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Code.pxd deleted file mode 100644 index acad0c1cf44..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Code.pxd +++ /dev/null @@ -1,124 +0,0 @@ - -from __future__ import absolute_import - -cimport cython -from ..StringIOTree cimport StringIOTree - - -cdef class UtilityCodeBase(object): - cpdef format_code(self, code_string, replace_empty_lines=*) - - -cdef class UtilityCode(UtilityCodeBase): - cdef public object name - cdef public object proto - cdef public object impl - cdef public object init - cdef public object cleanup - cdef public object proto_block - cdef public object requires - cdef public dict _cache - cdef public list specialize_list - cdef public object file - - cpdef none_or_sub(self, s, context) - - -cdef class FunctionState: - cdef public set names_taken - cdef public object owner - cdef public object scope - - cdef public object error_label - cdef public size_t label_counter - cdef public set labels_used - cdef public object return_label - cdef public object continue_label - cdef public object break_label - cdef public list yield_labels - - cdef public object return_from_error_cleanup_label # not used in __init__ ? - - cdef public object exc_vars - cdef public object current_except - cdef public bint in_try_finally - cdef public bint can_trace - cdef public bint gil_owned - - cdef public list temps_allocated - cdef public dict temps_free - cdef public dict temps_used_type - cdef public set zombie_temps - cdef public size_t temp_counter - cdef public list collect_temps_stack - - cdef public object closure_temps - cdef public bint should_declare_error_indicator - cdef public bint uses_error_indicator - - @cython.locals(n=size_t) - cpdef new_label(self, name=*) - cpdef tuple get_loop_labels(self) - cpdef set_loop_labels(self, labels) - cpdef tuple get_all_labels(self) - cpdef set_all_labels(self, labels) - cpdef start_collecting_temps(self) - cpdef stop_collecting_temps(self) - - cpdef list temps_in_use(self) - -cdef class IntConst: - cdef public object cname - cdef public object value - cdef public bint is_long - -cdef class PyObjectConst: - cdef public object cname - cdef public object type - -cdef class StringConst: - cdef public object cname - cdef public object text - cdef public object escaped_value - cdef public dict py_strings - cdef public list py_versions - - @cython.locals(intern=bint, is_str=bint, is_unicode=bint) - cpdef get_py_string_const(self, encoding, identifier=*, is_str=*, py3str_cstring=*) - -## cdef class PyStringConst: -## cdef public object cname -## cdef public object encoding -## cdef public bint is_str -## cdef public bint is_unicode -## cdef public bint intern - -#class GlobalState(object): - -#def funccontext_property(name): - -cdef class CCodeWriter(object): - cdef readonly StringIOTree buffer - cdef readonly list pyclass_stack - cdef readonly object globalstate - cdef readonly object funcstate - cdef object code_config - cdef object last_pos - cdef object last_marked_pos - cdef Py_ssize_t level - cdef public Py_ssize_t call_level # debug-only, see Nodes.py - cdef bint bol - - cpdef write(self, s) - cpdef put(self, code) - cpdef put_safe(self, code) - cpdef putln(self, code=*, bint safe=*) - @cython.final - cdef increase_indent(self) - @cython.final - cdef decrease_indent(self) - - -cdef class PyrexCodeWriter: - cdef public object f - cdef public Py_ssize_t level diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Code.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Code.py deleted file mode 100644 index 45c5a325cf8..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Code.py +++ /dev/null @@ -1,2597 +0,0 @@ -# cython: language_level = 2 -# cython: auto_pickle=False -# -# Code output module -# - -from __future__ import absolute_import - -import cython -cython.declare(os=object, re=object, operator=object, textwrap=object, - Template=object, Naming=object, Options=object, StringEncoding=object, - Utils=object, SourceDescriptor=object, StringIOTree=object, - DebugFlags=object, basestring=object, defaultdict=object, - closing=object, partial=object) - -import os -import re -import shutil -import sys -import operator -import textwrap -from string import Template -from functools import partial -from contextlib import closing -from collections import defaultdict - -try: - import hashlib -except ImportError: - import md5 as hashlib - -from . import Naming -from . import Options -from . import DebugFlags -from . import StringEncoding -from . import Version -from .. import Utils -from .Scanning import SourceDescriptor -from ..StringIOTree import StringIOTree - -try: - from __builtin__ import basestring -except ImportError: - from builtins import str as basestring - -KEYWORDS_MUST_BE_BYTES = sys.version_info < (2, 7) - - -non_portable_builtins_map = { - # builtins that have different names in different Python versions - 'bytes' : ('PY_MAJOR_VERSION < 3', 'str'), - 'unicode' : ('PY_MAJOR_VERSION >= 3', 'str'), - 'basestring' : ('PY_MAJOR_VERSION >= 3', 'str'), - 'xrange' : ('PY_MAJOR_VERSION >= 3', 'range'), - 'raw_input' : ('PY_MAJOR_VERSION >= 3', 'input'), -} - -ctypedef_builtins_map = { - # types of builtins in "ctypedef class" statements which we don't - # import either because the names conflict with C types or because - # the type simply is not exposed. - 'py_int' : '&PyInt_Type', - 'py_long' : '&PyLong_Type', - 'py_float' : '&PyFloat_Type', - 'wrapper_descriptor' : '&PyWrapperDescr_Type', -} - -basicsize_builtins_map = { - # builtins whose type has a different tp_basicsize than sizeof(...) - 'PyTypeObject': 'PyHeapTypeObject', -} - -uncachable_builtins = [ - # Global/builtin names that cannot be cached because they may or may not - # be available at import time, for various reasons: - ## - Py3.7+ - 'breakpoint', # might deserve an implementation in Cython - ## - Py3.4+ - '__loader__', - '__spec__', - ## - Py3+ - 'BlockingIOError', - 'BrokenPipeError', - 'ChildProcessError', - 'ConnectionAbortedError', - 'ConnectionError', - 'ConnectionRefusedError', - 'ConnectionResetError', - 'FileExistsError', - 'FileNotFoundError', - 'InterruptedError', - 'IsADirectoryError', - 'ModuleNotFoundError', - 'NotADirectoryError', - 'PermissionError', - 'ProcessLookupError', - 'RecursionError', - 'ResourceWarning', - #'StopAsyncIteration', # backported - 'TimeoutError', - '__build_class__', - 'ascii', # might deserve an implementation in Cython - #'exec', # implemented in Cython - ## - Py2.7+ - 'memoryview', - ## - platform specific - 'WindowsError', - ## - others - '_', # e.g. used by gettext -] - -special_py_methods = set([ - '__cinit__', '__dealloc__', '__richcmp__', '__next__', - '__await__', '__aiter__', '__anext__', - '__getreadbuffer__', '__getwritebuffer__', '__getsegcount__', - '__getcharbuffer__', '__getbuffer__', '__releasebuffer__' -]) - -modifier_output_mapper = { - 'inline': 'CYTHON_INLINE' -}.get - - -class IncludeCode(object): - """ - An include file and/or verbatim C code to be included in the - generated sources. - """ - # attributes: - # - # pieces {order: unicode}: pieces of C code to be generated. - # For the included file, the key "order" is zero. - # For verbatim include code, the "order" is the "order" - # attribute of the original IncludeCode where this piece - # of C code was first added. This is needed to prevent - # duplication if the same include code is found through - # multiple cimports. - # location int: where to put this include in the C sources, one - # of the constants INITIAL, EARLY, LATE - # order int: sorting order (automatically set by increasing counter) - - # Constants for location. If the same include occurs with different - # locations, the earliest one takes precedense. - INITIAL = 0 - EARLY = 1 - LATE = 2 - - counter = 1 # Counter for "order" - - def __init__(self, include=None, verbatim=None, late=True, initial=False): - self.order = self.counter - type(self).counter += 1 - self.pieces = {} - - if include: - if include[0] == '<' and include[-1] == '>': - self.pieces[0] = u'#include {0}'.format(include) - late = False # system include is never late - else: - self.pieces[0] = u'#include "{0}"'.format(include) - - if verbatim: - self.pieces[self.order] = verbatim - - if initial: - self.location = self.INITIAL - elif late: - self.location = self.LATE - else: - self.location = self.EARLY - - def dict_update(self, d, key): - """ - Insert `self` in dict `d` with key `key`. If that key already - exists, update the attributes of the existing value with `self`. - """ - if key in d: - other = d[key] - other.location = min(self.location, other.location) - other.pieces.update(self.pieces) - else: - d[key] = self - - def sortkey(self): - return self.order - - def mainpiece(self): - """ - Return the main piece of C code, corresponding to the include - file. If there was no include file, return None. - """ - return self.pieces.get(0) - - def write(self, code): - # Write values of self.pieces dict, sorted by the keys - for k in sorted(self.pieces): - code.putln(self.pieces[k]) - - -def get_utility_dir(): - # make this a function and not global variables: - # http://trac.cython.org/cython_trac/ticket/475 - Cython_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - return os.path.join(Cython_dir, "Utility") - - -class UtilityCodeBase(object): - """ - Support for loading utility code from a file. - - Code sections in the file can be specified as follows: - - ##### MyUtility.proto ##### - - [proto declarations] - - ##### MyUtility.init ##### - - [code run at module initialization] - - ##### MyUtility ##### - #@requires: MyOtherUtility - #@substitute: naming - - [definitions] - - for prototypes and implementation respectively. For non-python or - -cython files backslashes should be used instead. 5 to 30 comment - characters may be used on either side. - - If the @cname decorator is not used and this is a CythonUtilityCode, - one should pass in the 'name' keyword argument to be used for name - mangling of such entries. - """ - - is_cython_utility = False - _utility_cache = {} - - @classmethod - def _add_utility(cls, utility, type, lines, begin_lineno, tags=None): - if utility is None: - return - - code = '\n'.join(lines) - if tags and 'substitute' in tags and tags['substitute'] == set(['naming']): - del tags['substitute'] - try: - code = Template(code).substitute(vars(Naming)) - except (KeyError, ValueError) as e: - raise RuntimeError("Error parsing templated utility code of type '%s' at line %d: %s" % ( - type, begin_lineno, e)) - - # remember correct line numbers at least until after templating - code = '\n' * begin_lineno + code - - if type == 'proto': - utility[0] = code - elif type == 'impl': - utility[1] = code - else: - all_tags = utility[2] - if KEYWORDS_MUST_BE_BYTES: - type = type.encode('ASCII') - all_tags[type] = code - - if tags: - all_tags = utility[2] - for name, values in tags.items(): - if KEYWORDS_MUST_BE_BYTES: - name = name.encode('ASCII') - all_tags.setdefault(name, set()).update(values) - - @classmethod - def load_utilities_from_file(cls, path): - utilities = cls._utility_cache.get(path) - if utilities: - return utilities - - filename = os.path.join(get_utility_dir(), path) - _, ext = os.path.splitext(path) - if ext in ('.pyx', '.py', '.pxd', '.pxi'): - comment = '#' - strip_comments = partial(re.compile(r'^\s*#(?!\s*cython\s*:).*').sub, '') - rstrip = StringEncoding._unicode.rstrip - else: - comment = '/' - strip_comments = partial(re.compile(r'^\s*//.*|/\*[^*]*\*/').sub, '') - rstrip = partial(re.compile(r'\s+(\\?)$').sub, r'\1') - match_special = re.compile( - (r'^%(C)s{5,30}\s*(?P(?:\w|\.)+)\s*%(C)s{5,30}|' - r'^%(C)s+@(?P\w+)\s*:\s*(?P(?:\w|[.:])+)') % - {'C': comment}).match - match_type = re.compile(r'(.+)[.](proto(?:[.]\S+)?|impl|init|cleanup)$').match - - with closing(Utils.open_source_file(filename, encoding='UTF-8')) as f: - all_lines = f.readlines() - - utilities = defaultdict(lambda: [None, None, {}]) - lines = [] - tags = defaultdict(set) - utility = type = None - begin_lineno = 0 - - for lineno, line in enumerate(all_lines): - m = match_special(line) - if m: - if m.group('name'): - cls._add_utility(utility, type, lines, begin_lineno, tags) - - begin_lineno = lineno + 1 - del lines[:] - tags.clear() - - name = m.group('name') - mtype = match_type(name) - if mtype: - name, type = mtype.groups() - else: - type = 'impl' - utility = utilities[name] - else: - tags[m.group('tag')].add(m.group('value')) - lines.append('') # keep line number correct - else: - lines.append(rstrip(strip_comments(line))) - - if utility is None: - raise ValueError("Empty utility code file") - - # Don't forget to add the last utility code - cls._add_utility(utility, type, lines, begin_lineno, tags) - - utilities = dict(utilities) # un-defaultdict-ify - cls._utility_cache[path] = utilities - return utilities - - @classmethod - def load(cls, util_code_name, from_file=None, **kwargs): - """ - Load utility code from a file specified by from_file (relative to - Cython/Utility) and name util_code_name. If from_file is not given, - load it from the file util_code_name.*. There should be only one - file matched by this pattern. - """ - if '::' in util_code_name: - from_file, util_code_name = util_code_name.rsplit('::', 1) - if not from_file: - utility_dir = get_utility_dir() - prefix = util_code_name + '.' - try: - listing = os.listdir(utility_dir) - except OSError: - # XXX the code below assumes as 'zipimport.zipimporter' instance - # XXX should be easy to generalize, but too lazy right now to write it - import zipfile - global __loader__ - loader = __loader__ - archive = loader.archive - with closing(zipfile.ZipFile(archive)) as fileobj: - listing = [os.path.basename(name) - for name in fileobj.namelist() - if os.path.join(archive, name).startswith(utility_dir)] - files = [filename for filename in listing - if filename.startswith(prefix)] - if not files: - raise ValueError("No match found for utility code " + util_code_name) - if len(files) > 1: - raise ValueError("More than one filename match found for utility code " + util_code_name) - from_file = files[0] - - utilities = cls.load_utilities_from_file(from_file) - proto, impl, tags = utilities[util_code_name] - - if tags: - orig_kwargs = kwargs.copy() - for name, values in tags.items(): - if name in kwargs: - continue - # only pass lists when we have to: most argument expect one value or None - if name == 'requires': - if orig_kwargs: - values = [cls.load(dep, from_file, **orig_kwargs) - for dep in sorted(values)] - else: - # dependencies are rarely unique, so use load_cached() when we can - values = [cls.load_cached(dep, from_file) - for dep in sorted(values)] - elif not values: - values = None - elif len(values) == 1: - values = list(values)[0] - kwargs[name] = values - - if proto is not None: - kwargs['proto'] = proto - if impl is not None: - kwargs['impl'] = impl - - if 'name' not in kwargs: - kwargs['name'] = util_code_name - - if 'file' not in kwargs and from_file: - kwargs['file'] = from_file - return cls(**kwargs) - - @classmethod - def load_cached(cls, utility_code_name, from_file=None, __cache={}): - """ - Calls .load(), but using a per-type cache based on utility name and file name. - """ - key = (cls, from_file, utility_code_name) - try: - return __cache[key] - except KeyError: - pass - code = __cache[key] = cls.load(utility_code_name, from_file) - return code - - @classmethod - def load_as_string(cls, util_code_name, from_file=None, **kwargs): - """ - Load a utility code as a string. Returns (proto, implementation) - """ - util = cls.load(util_code_name, from_file, **kwargs) - proto, impl = util.proto, util.impl - return util.format_code(proto), util.format_code(impl) - - def format_code(self, code_string, replace_empty_lines=re.compile(r'\n\n+').sub): - """ - Format a code section for output. - """ - if code_string: - code_string = replace_empty_lines('\n', code_string.strip()) + '\n\n' - return code_string - - def __str__(self): - return "<%s(%s)>" % (type(self).__name__, self.name) - - def get_tree(self, **kwargs): - pass - - def __deepcopy__(self, memodict=None): - # No need to deep-copy utility code since it's essentially immutable. - return self - - -class UtilityCode(UtilityCodeBase): - """ - Stores utility code to add during code generation. - - See GlobalState.put_utility_code. - - hashes/equals by instance - - proto C prototypes - impl implementation code - init code to call on module initialization - requires utility code dependencies - proto_block the place in the resulting file where the prototype should - end up - name name of the utility code (or None) - file filename of the utility code file this utility was loaded - from (or None) - """ - - def __init__(self, proto=None, impl=None, init=None, cleanup=None, requires=None, - proto_block='utility_code_proto', name=None, file=None): - # proto_block: Which code block to dump prototype in. See GlobalState. - self.proto = proto - self.impl = impl - self.init = init - self.cleanup = cleanup - self.requires = requires - self._cache = {} - self.specialize_list = [] - self.proto_block = proto_block - self.name = name - self.file = file - - def __hash__(self): - return hash((self.proto, self.impl)) - - def __eq__(self, other): - if self is other: - return True - self_type, other_type = type(self), type(other) - if self_type is not other_type and not (isinstance(other, self_type) or isinstance(self, other_type)): - return False - - self_proto = getattr(self, 'proto', None) - other_proto = getattr(other, 'proto', None) - return (self_proto, self.impl) == (other_proto, other.impl) - - def none_or_sub(self, s, context): - """ - Format a string in this utility code with context. If None, do nothing. - """ - if s is None: - return None - return s % context - - def specialize(self, pyrex_type=None, **data): - # Dicts aren't hashable... - name = self.name - if pyrex_type is not None: - data['type'] = pyrex_type.empty_declaration_code() - data['type_name'] = pyrex_type.specialization_name() - name = "%s[%s]" % (name, data['type_name']) - key = tuple(sorted(data.items())) - try: - return self._cache[key] - except KeyError: - if self.requires is None: - requires = None - else: - requires = [r.specialize(data) for r in self.requires] - - s = self._cache[key] = UtilityCode( - self.none_or_sub(self.proto, data), - self.none_or_sub(self.impl, data), - self.none_or_sub(self.init, data), - self.none_or_sub(self.cleanup, data), - requires, - self.proto_block, - name, - ) - - self.specialize_list.append(s) - return s - - def inject_string_constants(self, impl, output): - """Replace 'PYIDENT("xyz")' by a constant Python identifier cname. - """ - if 'PYIDENT(' not in impl and 'PYUNICODE(' not in impl: - return False, impl - - replacements = {} - def externalise(matchobj): - key = matchobj.groups() - try: - cname = replacements[key] - except KeyError: - str_type, name = key - cname = replacements[key] = output.get_py_string_const( - StringEncoding.EncodedString(name), identifier=str_type == 'IDENT').cname - return cname - - impl = re.sub(r'PY(IDENT|UNICODE)\("([^"]+)"\)', externalise, impl) - assert 'PYIDENT(' not in impl and 'PYUNICODE(' not in impl - return True, impl - - def inject_unbound_methods(self, impl, output): - """Replace 'UNBOUND_METHOD(type, "name")' by a constant Python identifier cname. - """ - if 'CALL_UNBOUND_METHOD(' not in impl: - return False, impl - - def externalise(matchobj): - type_cname, method_name, obj_cname, args = matchobj.groups() - args = [arg.strip() for arg in args[1:].split(',')] if args else [] - assert len(args) < 3, "CALL_UNBOUND_METHOD() does not support %d call arguments" % len(args) - return output.cached_unbound_method_call_code(obj_cname, type_cname, method_name, args) - - impl = re.sub( - r'CALL_UNBOUND_METHOD\(' - r'([a-zA-Z_]+),' # type cname - r'\s*"([^"]+)",' # method name - r'\s*([^),]+)' # object cname - r'((?:,\s*[^),]+)*)' # args* - r'\)', externalise, impl) - assert 'CALL_UNBOUND_METHOD(' not in impl - - return True, impl - - def wrap_c_strings(self, impl): - """Replace CSTRING('''xyz''') by a C compatible string - """ - if 'CSTRING(' not in impl: - return impl - - def split_string(matchobj): - content = matchobj.group(1).replace('"', '\042') - return ''.join( - '"%s\\n"\n' % line if not line.endswith('\\') or line.endswith('\\\\') else '"%s"\n' % line[:-1] - for line in content.splitlines()) - - impl = re.sub(r'CSTRING\(\s*"""([^"]*(?:"[^"]+)*)"""\s*\)', split_string, impl) - assert 'CSTRING(' not in impl - return impl - - def put_code(self, output): - if self.requires: - for dependency in self.requires: - output.use_utility_code(dependency) - if self.proto: - writer = output[self.proto_block] - writer.putln("/* %s.proto */" % self.name) - writer.put_or_include( - self.format_code(self.proto), '%s_proto' % self.name) - if self.impl: - impl = self.format_code(self.wrap_c_strings(self.impl)) - is_specialised1, impl = self.inject_string_constants(impl, output) - is_specialised2, impl = self.inject_unbound_methods(impl, output) - writer = output['utility_code_def'] - writer.putln("/* %s */" % self.name) - if not (is_specialised1 or is_specialised2): - # no module specific adaptations => can be reused - writer.put_or_include(impl, '%s_impl' % self.name) - else: - writer.put(impl) - if self.init: - writer = output['init_globals'] - writer.putln("/* %s.init */" % self.name) - if isinstance(self.init, basestring): - writer.put(self.format_code(self.init)) - else: - self.init(writer, output.module_pos) - writer.putln(writer.error_goto_if_PyErr(output.module_pos)) - writer.putln() - if self.cleanup and Options.generate_cleanup_code: - writer = output['cleanup_globals'] - writer.putln("/* %s.cleanup */" % self.name) - if isinstance(self.cleanup, basestring): - writer.put_or_include( - self.format_code(self.cleanup), - '%s_cleanup' % self.name) - else: - self.cleanup(writer, output.module_pos) - - -def sub_tempita(s, context, file=None, name=None): - "Run tempita on string s with given context." - if not s: - return None - - if file: - context['__name'] = "%s:%s" % (file, name) - elif name: - context['__name'] = name - - from ..Tempita import sub - return sub(s, **context) - - -class TempitaUtilityCode(UtilityCode): - def __init__(self, name=None, proto=None, impl=None, init=None, file=None, context=None, **kwargs): - if context is None: - context = {} - proto = sub_tempita(proto, context, file, name) - impl = sub_tempita(impl, context, file, name) - init = sub_tempita(init, context, file, name) - super(TempitaUtilityCode, self).__init__( - proto, impl, init=init, name=name, file=file, **kwargs) - - @classmethod - def load_cached(cls, utility_code_name, from_file=None, context=None, __cache={}): - context_key = tuple(sorted(context.items())) if context else None - assert hash(context_key) is not None # raise TypeError if not hashable - key = (cls, from_file, utility_code_name, context_key) - try: - return __cache[key] - except KeyError: - pass - code = __cache[key] = cls.load(utility_code_name, from_file, context=context) - return code - - def none_or_sub(self, s, context): - """ - Format a string in this utility code with context. If None, do nothing. - """ - if s is None: - return None - return sub_tempita(s, context, self.file, self.name) - - -class LazyUtilityCode(UtilityCodeBase): - """ - Utility code that calls a callback with the root code writer when - available. Useful when you only have 'env' but not 'code'. - """ - __name__ = '' - requires = None - - def __init__(self, callback): - self.callback = callback - - def put_code(self, globalstate): - utility = self.callback(globalstate.rootwriter) - globalstate.use_utility_code(utility) - - -class FunctionState(object): - # return_label string function return point label - # error_label string error catch point label - # continue_label string loop continue point label - # break_label string loop break point label - # return_from_error_cleanup_label string - # label_counter integer counter for naming labels - # in_try_finally boolean inside try of try...finally - # exc_vars (string * 3) exception variables for reraise, or None - # can_trace boolean line tracing is supported in the current context - # scope Scope the scope object of the current function - - # Not used for now, perhaps later - def __init__(self, owner, names_taken=set(), scope=None): - self.names_taken = names_taken - self.owner = owner - self.scope = scope - - self.error_label = None - self.label_counter = 0 - self.labels_used = set() - self.return_label = self.new_label() - self.new_error_label() - self.continue_label = None - self.break_label = None - self.yield_labels = [] - - self.in_try_finally = 0 - self.exc_vars = None - self.current_except = None - self.can_trace = False - self.gil_owned = True - - self.temps_allocated = [] # of (name, type, manage_ref, static) - self.temps_free = {} # (type, manage_ref) -> list of free vars with same type/managed status - self.temps_used_type = {} # name -> (type, manage_ref) - self.zombie_temps = set() # temps that must not be reused after release - self.temp_counter = 0 - self.closure_temps = None - - # This is used to collect temporaries, useful to find out which temps - # need to be privatized in parallel sections - self.collect_temps_stack = [] - - # This is used for the error indicator, which needs to be local to the - # function. It used to be global, which relies on the GIL being held. - # However, exceptions may need to be propagated through 'nogil' - # sections, in which case we introduce a race condition. - self.should_declare_error_indicator = False - self.uses_error_indicator = False - - # safety checks - - def validate_exit(self): - # validate that all allocated temps have been freed - if self.temps_allocated: - leftovers = self.temps_in_use() - if leftovers: - msg = "TEMPGUARD: Temps left over at end of '%s': %s" % (self.scope.name, ', '.join([ - '%s [%s]' % (name, ctype) - for name, ctype, is_pytemp in sorted(leftovers)]), - ) - #print(msg) - raise RuntimeError(msg) - - # labels - - def new_label(self, name=None): - n = self.label_counter - self.label_counter = n + 1 - label = "%s%d" % (Naming.label_prefix, n) - if name is not None: - label += '_' + name - return label - - def new_yield_label(self, expr_type='yield'): - label = self.new_label('resume_from_%s' % expr_type) - num_and_label = (len(self.yield_labels) + 1, label) - self.yield_labels.append(num_and_label) - return num_and_label - - def new_error_label(self): - old_err_lbl = self.error_label - self.error_label = self.new_label('error') - return old_err_lbl - - def get_loop_labels(self): - return ( - self.continue_label, - self.break_label) - - def set_loop_labels(self, labels): - (self.continue_label, - self.break_label) = labels - - def new_loop_labels(self): - old_labels = self.get_loop_labels() - self.set_loop_labels( - (self.new_label("continue"), - self.new_label("break"))) - return old_labels - - def get_all_labels(self): - return ( - self.continue_label, - self.break_label, - self.return_label, - self.error_label) - - def set_all_labels(self, labels): - (self.continue_label, - self.break_label, - self.return_label, - self.error_label) = labels - - def all_new_labels(self): - old_labels = self.get_all_labels() - new_labels = [] - for old_label, name in zip(old_labels, ['continue', 'break', 'return', 'error']): - if old_label: - new_labels.append(self.new_label(name)) - else: - new_labels.append(old_label) - self.set_all_labels(new_labels) - return old_labels - - def use_label(self, lbl): - self.labels_used.add(lbl) - - def label_used(self, lbl): - return lbl in self.labels_used - - # temp handling - - def allocate_temp(self, type, manage_ref, static=False, reusable=True): - """ - Allocates a temporary (which may create a new one or get a previously - allocated and released one of the same type). Type is simply registered - and handed back, but will usually be a PyrexType. - - If type.is_pyobject, manage_ref comes into play. If manage_ref is set to - True, the temp will be decref-ed on return statements and in exception - handling clauses. Otherwise the caller has to deal with any reference - counting of the variable. - - If not type.is_pyobject, then manage_ref will be ignored, but it - still has to be passed. It is recommended to pass False by convention - if it is known that type will never be a Python object. - - static=True marks the temporary declaration with "static". - This is only used when allocating backing store for a module-level - C array literals. - - if reusable=False, the temp will not be reused after release. - - A C string referring to the variable is returned. - """ - if type.is_const and not type.is_reference: - type = type.const_base_type - elif type.is_reference and not type.is_fake_reference: - type = type.ref_base_type - elif type.is_cfunction: - from . import PyrexTypes - type = PyrexTypes.c_ptr_type(type) # A function itself isn't an l-value - if not type.is_pyobject and not type.is_memoryviewslice: - # Make manage_ref canonical, so that manage_ref will always mean - # a decref is needed. - manage_ref = False - - freelist = self.temps_free.get((type, manage_ref)) - if reusable and freelist is not None and freelist[0]: - result = freelist[0].pop() - freelist[1].remove(result) - else: - while True: - self.temp_counter += 1 - result = "%s%d" % (Naming.codewriter_temp_prefix, self.temp_counter) - if result not in self.names_taken: break - self.temps_allocated.append((result, type, manage_ref, static)) - if not reusable: - self.zombie_temps.add(result) - self.temps_used_type[result] = (type, manage_ref) - if DebugFlags.debug_temp_code_comments: - self.owner.putln("/* %s allocated (%s)%s */" % (result, type, "" if reusable else " - zombie")) - - if self.collect_temps_stack: - self.collect_temps_stack[-1].add((result, type)) - - return result - - def release_temp(self, name): - """ - Releases a temporary so that it can be reused by other code needing - a temp of the same type. - """ - type, manage_ref = self.temps_used_type[name] - freelist = self.temps_free.get((type, manage_ref)) - if freelist is None: - freelist = ([], set()) # keep order in list and make lookups in set fast - self.temps_free[(type, manage_ref)] = freelist - if name in freelist[1]: - raise RuntimeError("Temp %s freed twice!" % name) - if name not in self.zombie_temps: - freelist[0].append(name) - freelist[1].add(name) - if DebugFlags.debug_temp_code_comments: - self.owner.putln("/* %s released %s*/" % ( - name, " - zombie" if name in self.zombie_temps else "")) - - def temps_in_use(self): - """Return a list of (cname,type,manage_ref) tuples of temp names and their type - that are currently in use. - """ - used = [] - for name, type, manage_ref, static in self.temps_allocated: - freelist = self.temps_free.get((type, manage_ref)) - if freelist is None or name not in freelist[1]: - used.append((name, type, manage_ref and type.is_pyobject)) - return used - - def temps_holding_reference(self): - """Return a list of (cname,type) tuples of temp names and their type - that are currently in use. This includes only temps of a - Python object type which owns its reference. - """ - return [(name, type) - for name, type, manage_ref in self.temps_in_use() - if manage_ref and type.is_pyobject] - - def all_managed_temps(self): - """Return a list of (cname, type) tuples of refcount-managed Python objects. - """ - return [(cname, type) - for cname, type, manage_ref, static in self.temps_allocated - if manage_ref] - - def all_free_managed_temps(self): - """Return a list of (cname, type) tuples of refcount-managed Python - objects that are not currently in use. This is used by - try-except and try-finally blocks to clean up temps in the - error case. - """ - return sorted([ # Enforce deterministic order. - (cname, type) - for (type, manage_ref), freelist in self.temps_free.items() if manage_ref - for cname in freelist[0] - ]) - - def start_collecting_temps(self): - """ - Useful to find out which temps were used in a code block - """ - self.collect_temps_stack.append(set()) - - def stop_collecting_temps(self): - return self.collect_temps_stack.pop() - - def init_closure_temps(self, scope): - self.closure_temps = ClosureTempAllocator(scope) - - -class NumConst(object): - """Global info about a Python number constant held by GlobalState. - - cname string - value string - py_type string int, long, float - value_code string evaluation code if different from value - """ - - def __init__(self, cname, value, py_type, value_code=None): - self.cname = cname - self.value = value - self.py_type = py_type - self.value_code = value_code or value - - -class PyObjectConst(object): - """Global info about a generic constant held by GlobalState. - """ - # cname string - # type PyrexType - - def __init__(self, cname, type): - self.cname = cname - self.type = type - - -cython.declare(possible_unicode_identifier=object, possible_bytes_identifier=object, - replace_identifier=object, find_alphanums=object) -possible_unicode_identifier = re.compile(br"(?![0-9])\w+$".decode('ascii'), re.U).match -possible_bytes_identifier = re.compile(r"(?![0-9])\w+$".encode('ASCII')).match -replace_identifier = re.compile(r'[^a-zA-Z0-9_]+').sub -find_alphanums = re.compile('([a-zA-Z0-9]+)').findall - -class StringConst(object): - """Global info about a C string constant held by GlobalState. - """ - # cname string - # text EncodedString or BytesLiteral - # py_strings {(identifier, encoding) : PyStringConst} - - def __init__(self, cname, text, byte_string): - self.cname = cname - self.text = text - self.escaped_value = StringEncoding.escape_byte_string(byte_string) - self.py_strings = None - self.py_versions = [] - - def add_py_version(self, version): - if not version: - self.py_versions = [2, 3] - elif version not in self.py_versions: - self.py_versions.append(version) - - def get_py_string_const(self, encoding, identifier=None, - is_str=False, py3str_cstring=None): - py_strings = self.py_strings - text = self.text - - is_str = bool(identifier or is_str) - is_unicode = encoding is None and not is_str - - if encoding is None: - # unicode string - encoding_key = None - else: - # bytes or str - encoding = encoding.lower() - if encoding in ('utf8', 'utf-8', 'ascii', 'usascii', 'us-ascii'): - encoding = None - encoding_key = None - else: - encoding_key = ''.join(find_alphanums(encoding)) - - key = (is_str, is_unicode, encoding_key, py3str_cstring) - if py_strings is not None: - try: - return py_strings[key] - except KeyError: - pass - else: - self.py_strings = {} - - if identifier: - intern = True - elif identifier is None: - if isinstance(text, bytes): - intern = bool(possible_bytes_identifier(text)) - else: - intern = bool(possible_unicode_identifier(text)) - else: - intern = False - if intern: - prefix = Naming.interned_prefixes['str'] - else: - prefix = Naming.py_const_prefix - - if encoding_key: - encoding_prefix = '_%s' % encoding_key - else: - encoding_prefix = '' - - pystring_cname = "%s%s%s_%s" % ( - prefix, - (is_str and 's') or (is_unicode and 'u') or 'b', - encoding_prefix, - self.cname[len(Naming.const_prefix):]) - - py_string = PyStringConst( - pystring_cname, encoding, is_unicode, is_str, py3str_cstring, intern) - self.py_strings[key] = py_string - return py_string - -class PyStringConst(object): - """Global info about a Python string constant held by GlobalState. - """ - # cname string - # py3str_cstring string - # encoding string - # intern boolean - # is_unicode boolean - # is_str boolean - - def __init__(self, cname, encoding, is_unicode, is_str=False, - py3str_cstring=None, intern=False): - self.cname = cname - self.py3str_cstring = py3str_cstring - self.encoding = encoding - self.is_str = is_str - self.is_unicode = is_unicode - self.intern = intern - - def __lt__(self, other): - return self.cname < other.cname - - -class GlobalState(object): - # filename_table {string : int} for finding filename table indexes - # filename_list [string] filenames in filename table order - # input_file_contents dict contents (=list of lines) of any file that was used as input - # to create this output C code. This is - # used to annotate the comments. - # - # utility_codes set IDs of used utility code (to avoid reinsertion) - # - # declared_cnames {string:Entry} used in a transition phase to merge pxd-declared - # constants etc. into the pyx-declared ones (i.e, - # check if constants are already added). - # In time, hopefully the literals etc. will be - # supplied directly instead. - # - # const_cnames_used dict global counter for unique constant identifiers - # - - # parts {string:CCodeWriter} - - - # interned_strings - # consts - # interned_nums - - # directives set Temporary variable used to track - # the current set of directives in the code generation - # process. - - directives = {} - - code_layout = [ - 'h_code', - 'filename_table', - 'utility_code_proto_before_types', - 'numeric_typedefs', # Let these detailed individual parts stay!, - 'complex_type_declarations', # as the proper solution is to make a full DAG... - 'type_declarations', # More coarse-grained blocks would simply hide - 'utility_code_proto', # the ugliness, not fix it - 'module_declarations', - 'typeinfo', - 'before_global_var', - 'global_var', - 'string_decls', - 'decls', - 'late_includes', - 'all_the_rest', - 'pystring_table', - 'cached_builtins', - 'cached_constants', - 'init_globals', - 'init_module', - 'cleanup_globals', - 'cleanup_module', - 'main_method', - 'utility_code_def', - 'end' - ] - - - def __init__(self, writer, module_node, code_config, common_utility_include_dir=None): - self.filename_table = {} - self.filename_list = [] - self.input_file_contents = {} - self.utility_codes = set() - self.declared_cnames = {} - self.in_utility_code_generation = False - self.code_config = code_config - self.common_utility_include_dir = common_utility_include_dir - self.parts = {} - self.module_node = module_node # because some utility code generation needs it - # (generating backwards-compatible Get/ReleaseBuffer - - self.const_cnames_used = {} - self.string_const_index = {} - self.dedup_const_index = {} - self.pyunicode_ptr_const_index = {} - self.num_const_index = {} - self.py_constants = [] - self.cached_cmethods = {} - self.initialised_constants = set() - - writer.set_global_state(self) - self.rootwriter = writer - - def initialize_main_c_code(self): - rootwriter = self.rootwriter - for part in self.code_layout: - self.parts[part] = rootwriter.insertion_point() - - if not Options.cache_builtins: - del self.parts['cached_builtins'] - else: - w = self.parts['cached_builtins'] - w.enter_cfunc_scope() - w.putln("static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {") - - w = self.parts['cached_constants'] - w.enter_cfunc_scope() - w.putln("") - w.putln("static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {") - w.put_declare_refcount_context() - w.put_setup_refcount_context("__Pyx_InitCachedConstants") - - w = self.parts['init_globals'] - w.enter_cfunc_scope() - w.putln("") - w.putln("static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {") - - if not Options.generate_cleanup_code: - del self.parts['cleanup_globals'] - else: - w = self.parts['cleanup_globals'] - w.enter_cfunc_scope() - w.putln("") - w.putln("static CYTHON_SMALL_CODE void __Pyx_CleanupGlobals(void) {") - - code = self.parts['utility_code_proto'] - code.putln("") - code.putln("/* --- Runtime support code (head) --- */") - - code = self.parts['utility_code_def'] - if self.code_config.emit_linenums: - code.write('\n#line 1 "cython_utility"\n') - code.putln("") - code.putln("/* --- Runtime support code --- */") - - def finalize_main_c_code(self): - self.close_global_decls() - - # - # utility_code_def - # - code = self.parts['utility_code_def'] - util = TempitaUtilityCode.load_cached("TypeConversions", "TypeConversion.c") - code.put(util.format_code(util.impl)) - code.putln("") - - def __getitem__(self, key): - return self.parts[key] - - # - # Global constants, interned objects, etc. - # - def close_global_decls(self): - # This is called when it is known that no more global declarations will - # declared. - self.generate_const_declarations() - if Options.cache_builtins: - w = self.parts['cached_builtins'] - w.putln("return 0;") - if w.label_used(w.error_label): - w.put_label(w.error_label) - w.putln("return -1;") - w.putln("}") - w.exit_cfunc_scope() - - w = self.parts['cached_constants'] - w.put_finish_refcount_context() - w.putln("return 0;") - if w.label_used(w.error_label): - w.put_label(w.error_label) - w.put_finish_refcount_context() - w.putln("return -1;") - w.putln("}") - w.exit_cfunc_scope() - - w = self.parts['init_globals'] - w.putln("return 0;") - if w.label_used(w.error_label): - w.put_label(w.error_label) - w.putln("return -1;") - w.putln("}") - w.exit_cfunc_scope() - - if Options.generate_cleanup_code: - w = self.parts['cleanup_globals'] - w.putln("}") - w.exit_cfunc_scope() - - if Options.generate_cleanup_code: - w = self.parts['cleanup_module'] - w.putln("}") - w.exit_cfunc_scope() - - def put_pyobject_decl(self, entry): - self['global_var'].putln("static PyObject *%s;" % entry.cname) - - # constant handling at code generation time - - def get_cached_constants_writer(self, target=None): - if target is not None: - if target in self.initialised_constants: - # Return None on second/later calls to prevent duplicate creation code. - return None - self.initialised_constants.add(target) - return self.parts['cached_constants'] - - def get_int_const(self, str_value, longness=False): - py_type = longness and 'long' or 'int' - try: - c = self.num_const_index[(str_value, py_type)] - except KeyError: - c = self.new_num_const(str_value, py_type) - return c - - def get_float_const(self, str_value, value_code): - try: - c = self.num_const_index[(str_value, 'float')] - except KeyError: - c = self.new_num_const(str_value, 'float', value_code) - return c - - def get_py_const(self, type, prefix='', cleanup_level=None, dedup_key=None): - if dedup_key is not None: - const = self.dedup_const_index.get(dedup_key) - if const is not None: - return const - # create a new Python object constant - const = self.new_py_const(type, prefix) - if cleanup_level is not None \ - and cleanup_level <= Options.generate_cleanup_code: - cleanup_writer = self.parts['cleanup_globals'] - cleanup_writer.putln('Py_CLEAR(%s);' % const.cname) - if dedup_key is not None: - self.dedup_const_index[dedup_key] = const - return const - - def get_string_const(self, text, py_version=None): - # return a C string constant, creating a new one if necessary - if text.is_unicode: - byte_string = text.utf8encode() - else: - byte_string = text.byteencode() - try: - c = self.string_const_index[byte_string] - except KeyError: - c = self.new_string_const(text, byte_string) - c.add_py_version(py_version) - return c - - def get_pyunicode_ptr_const(self, text): - # return a Py_UNICODE[] constant, creating a new one if necessary - assert text.is_unicode - try: - c = self.pyunicode_ptr_const_index[text] - except KeyError: - c = self.pyunicode_ptr_const_index[text] = self.new_const_cname() - return c - - def get_py_string_const(self, text, identifier=None, - is_str=False, unicode_value=None): - # return a Python string constant, creating a new one if necessary - py3str_cstring = None - if is_str and unicode_value is not None \ - and unicode_value.utf8encode() != text.byteencode(): - py3str_cstring = self.get_string_const(unicode_value, py_version=3) - c_string = self.get_string_const(text, py_version=2) - else: - c_string = self.get_string_const(text) - py_string = c_string.get_py_string_const( - text.encoding, identifier, is_str, py3str_cstring) - return py_string - - def get_interned_identifier(self, text): - return self.get_py_string_const(text, identifier=True) - - def new_string_const(self, text, byte_string): - cname = self.new_string_const_cname(byte_string) - c = StringConst(cname, text, byte_string) - self.string_const_index[byte_string] = c - return c - - def new_num_const(self, value, py_type, value_code=None): - cname = self.new_num_const_cname(value, py_type) - c = NumConst(cname, value, py_type, value_code) - self.num_const_index[(value, py_type)] = c - return c - - def new_py_const(self, type, prefix=''): - cname = self.new_const_cname(prefix) - c = PyObjectConst(cname, type) - self.py_constants.append(c) - return c - - def new_string_const_cname(self, bytes_value): - # Create a new globally-unique nice name for a C string constant. - value = bytes_value.decode('ASCII', 'ignore') - return self.new_const_cname(value=value) - - def new_num_const_cname(self, value, py_type): - if py_type == 'long': - value += 'L' - py_type = 'int' - prefix = Naming.interned_prefixes[py_type] - cname = "%s%s" % (prefix, value) - cname = cname.replace('+', '_').replace('-', 'neg_').replace('.', '_') - return cname - - def new_const_cname(self, prefix='', value=''): - value = replace_identifier('_', value)[:32].strip('_') - used = self.const_cnames_used - name_suffix = value - while name_suffix in used: - counter = used[value] = used[value] + 1 - name_suffix = '%s_%d' % (value, counter) - used[name_suffix] = 1 - if prefix: - prefix = Naming.interned_prefixes[prefix] - else: - prefix = Naming.const_prefix - return "%s%s" % (prefix, name_suffix) - - def get_cached_unbound_method(self, type_cname, method_name): - key = (type_cname, method_name) - try: - cname = self.cached_cmethods[key] - except KeyError: - cname = self.cached_cmethods[key] = self.new_const_cname( - 'umethod', '%s_%s' % (type_cname, method_name)) - return cname - - def cached_unbound_method_call_code(self, obj_cname, type_cname, method_name, arg_cnames): - # admittedly, not the best place to put this method, but it is reused by UtilityCode and ExprNodes ... - utility_code_name = "CallUnboundCMethod%d" % len(arg_cnames) - self.use_utility_code(UtilityCode.load_cached(utility_code_name, "ObjectHandling.c")) - cache_cname = self.get_cached_unbound_method(type_cname, method_name) - args = [obj_cname] + arg_cnames - return "__Pyx_%s(&%s, %s)" % ( - utility_code_name, - cache_cname, - ', '.join(args), - ) - - def add_cached_builtin_decl(self, entry): - if entry.is_builtin and entry.is_const: - if self.should_declare(entry.cname, entry): - self.put_pyobject_decl(entry) - w = self.parts['cached_builtins'] - condition = None - if entry.name in non_portable_builtins_map: - condition, replacement = non_portable_builtins_map[entry.name] - w.putln('#if %s' % condition) - self.put_cached_builtin_init( - entry.pos, StringEncoding.EncodedString(replacement), - entry.cname) - w.putln('#else') - self.put_cached_builtin_init( - entry.pos, StringEncoding.EncodedString(entry.name), - entry.cname) - if condition: - w.putln('#endif') - - def put_cached_builtin_init(self, pos, name, cname): - w = self.parts['cached_builtins'] - interned_cname = self.get_interned_identifier(name).cname - self.use_utility_code( - UtilityCode.load_cached("GetBuiltinName", "ObjectHandling.c")) - w.putln('%s = __Pyx_GetBuiltinName(%s); if (!%s) %s' % ( - cname, - interned_cname, - cname, - w.error_goto(pos))) - - def generate_const_declarations(self): - self.generate_cached_methods_decls() - self.generate_string_constants() - self.generate_num_constants() - self.generate_object_constant_decls() - - def generate_object_constant_decls(self): - consts = [(len(c.cname), c.cname, c) - for c in self.py_constants] - consts.sort() - decls_writer = self.parts['decls'] - for _, cname, c in consts: - decls_writer.putln( - "static %s;" % c.type.declaration_code(cname)) - - def generate_cached_methods_decls(self): - if not self.cached_cmethods: - return - - decl = self.parts['decls'] - init = self.parts['init_globals'] - cnames = [] - for (type_cname, method_name), cname in sorted(self.cached_cmethods.items()): - cnames.append(cname) - method_name_cname = self.get_interned_identifier(StringEncoding.EncodedString(method_name)).cname - decl.putln('static __Pyx_CachedCFunction %s = {0, &%s, 0, 0, 0};' % ( - cname, method_name_cname)) - # split type reference storage as it might not be static - init.putln('%s.type = (PyObject*)&%s;' % ( - cname, type_cname)) - - if Options.generate_cleanup_code: - cleanup = self.parts['cleanup_globals'] - for cname in cnames: - cleanup.putln("Py_CLEAR(%s.method);" % cname) - - def generate_string_constants(self): - c_consts = [(len(c.cname), c.cname, c) for c in self.string_const_index.values()] - c_consts.sort() - py_strings = [] - - decls_writer = self.parts['string_decls'] - for _, cname, c in c_consts: - conditional = False - if c.py_versions and (2 not in c.py_versions or 3 not in c.py_versions): - conditional = True - decls_writer.putln("#if PY_MAJOR_VERSION %s 3" % ( - (2 in c.py_versions) and '<' or '>=')) - decls_writer.putln('static const char %s[] = "%s";' % ( - cname, StringEncoding.split_string_literal(c.escaped_value))) - if conditional: - decls_writer.putln("#endif") - if c.py_strings is not None: - for py_string in c.py_strings.values(): - py_strings.append((c.cname, len(py_string.cname), py_string)) - - for c, cname in sorted(self.pyunicode_ptr_const_index.items()): - utf16_array, utf32_array = StringEncoding.encode_pyunicode_string(c) - if utf16_array: - # Narrow and wide representations differ - decls_writer.putln("#ifdef Py_UNICODE_WIDE") - decls_writer.putln("static Py_UNICODE %s[] = { %s };" % (cname, utf32_array)) - if utf16_array: - decls_writer.putln("#else") - decls_writer.putln("static Py_UNICODE %s[] = { %s };" % (cname, utf16_array)) - decls_writer.putln("#endif") - - if py_strings: - self.use_utility_code(UtilityCode.load_cached("InitStrings", "StringTools.c")) - py_strings.sort() - w = self.parts['pystring_table'] - w.putln("") - w.putln("static __Pyx_StringTabEntry %s[] = {" % Naming.stringtab_cname) - for c_cname, _, py_string in py_strings: - if not py_string.is_str or not py_string.encoding or \ - py_string.encoding in ('ASCII', 'USASCII', 'US-ASCII', - 'UTF8', 'UTF-8'): - encoding = '0' - else: - encoding = '"%s"' % py_string.encoding.lower() - - decls_writer.putln( - "static PyObject *%s;" % py_string.cname) - if py_string.py3str_cstring: - w.putln("#if PY_MAJOR_VERSION >= 3") - w.putln("{&%s, %s, sizeof(%s), %s, %d, %d, %d}," % ( - py_string.cname, - py_string.py3str_cstring.cname, - py_string.py3str_cstring.cname, - '0', 1, 0, - py_string.intern - )) - w.putln("#else") - w.putln("{&%s, %s, sizeof(%s), %s, %d, %d, %d}," % ( - py_string.cname, - c_cname, - c_cname, - encoding, - py_string.is_unicode, - py_string.is_str, - py_string.intern - )) - if py_string.py3str_cstring: - w.putln("#endif") - w.putln("{0, 0, 0, 0, 0, 0, 0}") - w.putln("};") - - init_globals = self.parts['init_globals'] - init_globals.putln( - "if (__Pyx_InitStrings(%s) < 0) %s;" % ( - Naming.stringtab_cname, - init_globals.error_goto(self.module_pos))) - - def generate_num_constants(self): - consts = [(c.py_type, c.value[0] == '-', len(c.value), c.value, c.value_code, c) - for c in self.num_const_index.values()] - consts.sort() - decls_writer = self.parts['decls'] - init_globals = self.parts['init_globals'] - for py_type, _, _, value, value_code, c in consts: - cname = c.cname - decls_writer.putln("static PyObject *%s;" % cname) - if py_type == 'float': - function = 'PyFloat_FromDouble(%s)' - elif py_type == 'long': - function = 'PyLong_FromString((char *)"%s", 0, 0)' - elif Utils.long_literal(value): - function = 'PyInt_FromString((char *)"%s", 0, 0)' - elif len(value.lstrip('-')) > 4: - function = "PyInt_FromLong(%sL)" - else: - function = "PyInt_FromLong(%s)" - init_globals.putln('%s = %s; %s' % ( - cname, function % value_code, - init_globals.error_goto_if_null(cname, self.module_pos))) - - # The functions below are there in a transition phase only - # and will be deprecated. They are called from Nodes.BlockNode. - # The copy&paste duplication is intentional in order to be able - # to see quickly how BlockNode worked, until this is replaced. - - def should_declare(self, cname, entry): - if cname in self.declared_cnames: - other = self.declared_cnames[cname] - assert str(entry.type) == str(other.type) - assert entry.init == other.init - return False - else: - self.declared_cnames[cname] = entry - return True - - # - # File name state - # - - def lookup_filename(self, source_desc): - entry = source_desc.get_filenametable_entry() - try: - index = self.filename_table[entry] - except KeyError: - index = len(self.filename_list) - self.filename_list.append(source_desc) - self.filename_table[entry] = index - return index - - def commented_file_contents(self, source_desc): - try: - return self.input_file_contents[source_desc] - except KeyError: - pass - source_file = source_desc.get_lines(encoding='ASCII', - error_handling='ignore') - try: - F = [u' * ' + line.rstrip().replace( - u'*/', u'*[inserted by cython to avoid comment closer]/' - ).replace( - u'/*', u'/[inserted by cython to avoid comment start]*' - ) - for line in source_file] - finally: - if hasattr(source_file, 'close'): - source_file.close() - if not F: F.append(u'') - self.input_file_contents[source_desc] = F - return F - - # - # Utility code state - # - - def use_utility_code(self, utility_code): - """ - Adds code to the C file. utility_code should - a) implement __eq__/__hash__ for the purpose of knowing whether the same - code has already been included - b) implement put_code, which takes a globalstate instance - - See UtilityCode. - """ - if utility_code and utility_code not in self.utility_codes: - self.utility_codes.add(utility_code) - utility_code.put_code(self) - - def use_entry_utility_code(self, entry): - if entry is None: - return - if entry.utility_code: - self.use_utility_code(entry.utility_code) - if entry.utility_code_definition: - self.use_utility_code(entry.utility_code_definition) - - -def funccontext_property(func): - name = func.__name__ - attribute_of = operator.attrgetter(name) - def get(self): - return attribute_of(self.funcstate) - def set(self, value): - setattr(self.funcstate, name, value) - return property(get, set) - - -class CCodeConfig(object): - # emit_linenums boolean write #line pragmas? - # emit_code_comments boolean copy the original code into C comments? - # c_line_in_traceback boolean append the c file and line number to the traceback for exceptions? - - def __init__(self, emit_linenums=True, emit_code_comments=True, c_line_in_traceback=True): - self.emit_code_comments = emit_code_comments - self.emit_linenums = emit_linenums - self.c_line_in_traceback = c_line_in_traceback - - -class CCodeWriter(object): - """ - Utility class to output C code. - - When creating an insertion point one must care about the state that is - kept: - - formatting state (level, bol) is cloned and used in insertion points - as well - - labels, temps, exc_vars: One must construct a scope in which these can - exist by calling enter_cfunc_scope/exit_cfunc_scope (these are for - sanity checking and forward compatibility). Created insertion points - looses this scope and cannot access it. - - marker: Not copied to insertion point - - filename_table, filename_list, input_file_contents: All codewriters - coming from the same root share the same instances simultaneously. - """ - - # f file output file - # buffer StringIOTree - - # level int indentation level - # bol bool beginning of line? - # marker string comment to emit before next line - # funcstate FunctionState contains state local to a C function used for code - # generation (labels and temps state etc.) - # globalstate GlobalState contains state global for a C file (input file info, - # utility code, declared constants etc.) - # pyclass_stack list used during recursive code generation to pass information - # about the current class one is in - # code_config CCodeConfig configuration options for the C code writer - - @cython.locals(create_from='CCodeWriter') - def __init__(self, create_from=None, buffer=None, copy_formatting=False): - if buffer is None: buffer = StringIOTree() - self.buffer = buffer - self.last_pos = None - self.last_marked_pos = None - self.pyclass_stack = [] - - self.funcstate = None - self.globalstate = None - self.code_config = None - self.level = 0 - self.call_level = 0 - self.bol = 1 - - if create_from is not None: - # Use same global state - self.set_global_state(create_from.globalstate) - self.funcstate = create_from.funcstate - # Clone formatting state - if copy_formatting: - self.level = create_from.level - self.bol = create_from.bol - self.call_level = create_from.call_level - self.last_pos = create_from.last_pos - self.last_marked_pos = create_from.last_marked_pos - - def create_new(self, create_from, buffer, copy_formatting): - # polymorphic constructor -- very slightly more versatile - # than using __class__ - result = CCodeWriter(create_from, buffer, copy_formatting) - return result - - def set_global_state(self, global_state): - assert self.globalstate is None # prevent overwriting once it's set - self.globalstate = global_state - self.code_config = global_state.code_config - - def copyto(self, f): - self.buffer.copyto(f) - - def getvalue(self): - return self.buffer.getvalue() - - def write(self, s): - # also put invalid markers (lineno 0), to indicate that those lines - # have no Cython source code correspondence - cython_lineno = self.last_marked_pos[1] if self.last_marked_pos else 0 - self.buffer.markers.extend([cython_lineno] * s.count('\n')) - self.buffer.write(s) - - def insertion_point(self): - other = self.create_new(create_from=self, buffer=self.buffer.insertion_point(), copy_formatting=True) - return other - - def new_writer(self): - """ - Creates a new CCodeWriter connected to the same global state, which - can later be inserted using insert. - """ - return CCodeWriter(create_from=self) - - def insert(self, writer): - """ - Inserts the contents of another code writer (created with - the same global state) in the current location. - - It is ok to write to the inserted writer also after insertion. - """ - assert writer.globalstate is self.globalstate - self.buffer.insert(writer.buffer) - - # Properties delegated to function scope - @funccontext_property - def label_counter(self): pass - @funccontext_property - def return_label(self): pass - @funccontext_property - def error_label(self): pass - @funccontext_property - def labels_used(self): pass - @funccontext_property - def continue_label(self): pass - @funccontext_property - def break_label(self): pass - @funccontext_property - def return_from_error_cleanup_label(self): pass - @funccontext_property - def yield_labels(self): pass - - # Functions delegated to function scope - def new_label(self, name=None): return self.funcstate.new_label(name) - def new_error_label(self): return self.funcstate.new_error_label() - def new_yield_label(self, *args): return self.funcstate.new_yield_label(*args) - def get_loop_labels(self): return self.funcstate.get_loop_labels() - def set_loop_labels(self, labels): return self.funcstate.set_loop_labels(labels) - def new_loop_labels(self): return self.funcstate.new_loop_labels() - def get_all_labels(self): return self.funcstate.get_all_labels() - def set_all_labels(self, labels): return self.funcstate.set_all_labels(labels) - def all_new_labels(self): return self.funcstate.all_new_labels() - def use_label(self, lbl): return self.funcstate.use_label(lbl) - def label_used(self, lbl): return self.funcstate.label_used(lbl) - - - def enter_cfunc_scope(self, scope=None): - self.funcstate = FunctionState(self, scope=scope) - - def exit_cfunc_scope(self): - self.funcstate = None - - # constant handling - - def get_py_int(self, str_value, longness): - return self.globalstate.get_int_const(str_value, longness).cname - - def get_py_float(self, str_value, value_code): - return self.globalstate.get_float_const(str_value, value_code).cname - - def get_py_const(self, type, prefix='', cleanup_level=None, dedup_key=None): - return self.globalstate.get_py_const(type, prefix, cleanup_level, dedup_key).cname - - def get_string_const(self, text): - return self.globalstate.get_string_const(text).cname - - def get_pyunicode_ptr_const(self, text): - return self.globalstate.get_pyunicode_ptr_const(text) - - def get_py_string_const(self, text, identifier=None, - is_str=False, unicode_value=None): - return self.globalstate.get_py_string_const( - text, identifier, is_str, unicode_value).cname - - def get_argument_default_const(self, type): - return self.globalstate.get_py_const(type).cname - - def intern(self, text): - return self.get_py_string_const(text) - - def intern_identifier(self, text): - return self.get_py_string_const(text, identifier=True) - - def get_cached_constants_writer(self, target=None): - return self.globalstate.get_cached_constants_writer(target) - - # code generation - - def putln(self, code="", safe=False): - if self.last_pos and self.bol: - self.emit_marker() - if self.code_config.emit_linenums and self.last_marked_pos: - source_desc, line, _ = self.last_marked_pos - self.write('\n#line %s "%s"\n' % (line, source_desc.get_escaped_description())) - if code: - if safe: - self.put_safe(code) - else: - self.put(code) - self.write("\n") - self.bol = 1 - - def mark_pos(self, pos, trace=True): - if pos is None: - return - if self.last_marked_pos and self.last_marked_pos[:2] == pos[:2]: - return - self.last_pos = (pos, trace) - - def emit_marker(self): - pos, trace = self.last_pos - self.last_marked_pos = pos - self.last_pos = None - self.write("\n") - if self.code_config.emit_code_comments: - self.indent() - self.write("/* %s */\n" % self._build_marker(pos)) - if trace and self.funcstate and self.funcstate.can_trace and self.globalstate.directives['linetrace']: - self.indent() - self.write('__Pyx_TraceLine(%d,%d,%s)\n' % ( - pos[1], not self.funcstate.gil_owned, self.error_goto(pos))) - - def _build_marker(self, pos): - source_desc, line, col = pos - assert isinstance(source_desc, SourceDescriptor) - contents = self.globalstate.commented_file_contents(source_desc) - lines = contents[max(0, line-3):line] # line numbers start at 1 - lines[-1] += u' # <<<<<<<<<<<<<<' - lines += contents[line:line+2] - return u'"%s":%d\n%s\n' % (source_desc.get_escaped_description(), line, u'\n'.join(lines)) - - def put_safe(self, code): - # put code, but ignore {} - self.write(code) - self.bol = 0 - - def put_or_include(self, code, name): - include_dir = self.globalstate.common_utility_include_dir - if include_dir and len(code) > 1024: - include_file = "%s_%s.h" % ( - name, hashlib.md5(code.encode('utf8')).hexdigest()) - path = os.path.join(include_dir, include_file) - if not os.path.exists(path): - tmp_path = '%s.tmp%s' % (path, os.getpid()) - with closing(Utils.open_new_file(tmp_path)) as f: - f.write(code) - shutil.move(tmp_path, path) - code = '#include "%s"\n' % path - self.put(code) - - def put(self, code): - fix_indent = False - if "{" in code: - dl = code.count("{") - else: - dl = 0 - if "}" in code: - dl -= code.count("}") - if dl < 0: - self.level += dl - elif dl == 0 and code[0] == "}": - # special cases like "} else {" need a temporary dedent - fix_indent = True - self.level -= 1 - if self.bol: - self.indent() - self.write(code) - self.bol = 0 - if dl > 0: - self.level += dl - elif fix_indent: - self.level += 1 - - def putln_tempita(self, code, **context): - from ..Tempita import sub - self.putln(sub(code, **context)) - - def put_tempita(self, code, **context): - from ..Tempita import sub - self.put(sub(code, **context)) - - def increase_indent(self): - self.level += 1 - - def decrease_indent(self): - self.level -= 1 - - def begin_block(self): - self.putln("{") - self.increase_indent() - - def end_block(self): - self.decrease_indent() - self.putln("}") - - def indent(self): - self.write(" " * self.level) - - def get_py_version_hex(self, pyversion): - return "0x%02X%02X%02X%02X" % (tuple(pyversion) + (0,0,0,0))[:4] - - def put_label(self, lbl): - if lbl in self.funcstate.labels_used: - self.putln("%s:;" % lbl) - - def put_goto(self, lbl): - self.funcstate.use_label(lbl) - self.putln("goto %s;" % lbl) - - def put_var_declaration(self, entry, storage_class="", - dll_linkage=None, definition=True): - #print "Code.put_var_declaration:", entry.name, "definition =", definition ### - if entry.visibility == 'private' and not (definition or entry.defined_in_pxd): - #print "...private and not definition, skipping", entry.cname ### - return - if entry.visibility == "private" and not entry.used: - #print "...private and not used, skipping", entry.cname ### - return - if storage_class: - self.put("%s " % storage_class) - if not entry.cf_used: - self.put('CYTHON_UNUSED ') - self.put(entry.type.declaration_code( - entry.cname, dll_linkage=dll_linkage)) - if entry.init is not None: - self.put_safe(" = %s" % entry.type.literal_code(entry.init)) - elif entry.type.is_pyobject: - self.put(" = NULL") - self.putln(";") - - def put_temp_declarations(self, func_context): - for name, type, manage_ref, static in func_context.temps_allocated: - decl = type.declaration_code(name) - if type.is_pyobject: - self.putln("%s = NULL;" % decl) - elif type.is_memoryviewslice: - from . import MemoryView - self.putln("%s = %s;" % (decl, MemoryView.memslice_entry_init)) - else: - self.putln("%s%s;" % (static and "static " or "", decl)) - - if func_context.should_declare_error_indicator: - if self.funcstate.uses_error_indicator: - unused = '' - else: - unused = 'CYTHON_UNUSED ' - # Initialize these variables to silence compiler warnings - self.putln("%sint %s = 0;" % (unused, Naming.lineno_cname)) - self.putln("%sconst char *%s = NULL;" % (unused, Naming.filename_cname)) - self.putln("%sint %s = 0;" % (unused, Naming.clineno_cname)) - - def put_generated_by(self): - self.putln("/* Generated by Cython %s */" % Version.watermark) - self.putln("") - - def put_h_guard(self, guard): - self.putln("#ifndef %s" % guard) - self.putln("#define %s" % guard) - - def unlikely(self, cond): - if Options.gcc_branch_hints: - return 'unlikely(%s)' % cond - else: - return cond - - def build_function_modifiers(self, modifiers, mapper=modifier_output_mapper): - if not modifiers: - return '' - return '%s ' % ' '.join([mapper(m,m) for m in modifiers]) - - # Python objects and reference counting - - def entry_as_pyobject(self, entry): - type = entry.type - if (not entry.is_self_arg and not entry.type.is_complete() - or entry.type.is_extension_type): - return "(PyObject *)" + entry.cname - else: - return entry.cname - - def as_pyobject(self, cname, type): - from .PyrexTypes import py_object_type, typecast - return typecast(py_object_type, type, cname) - - def put_gotref(self, cname): - self.putln("__Pyx_GOTREF(%s);" % cname) - - def put_giveref(self, cname): - self.putln("__Pyx_GIVEREF(%s);" % cname) - - def put_xgiveref(self, cname): - self.putln("__Pyx_XGIVEREF(%s);" % cname) - - def put_xgotref(self, cname): - self.putln("__Pyx_XGOTREF(%s);" % cname) - - def put_incref(self, cname, type, nanny=True): - if nanny: - self.putln("__Pyx_INCREF(%s);" % self.as_pyobject(cname, type)) - else: - self.putln("Py_INCREF(%s);" % self.as_pyobject(cname, type)) - - def put_decref(self, cname, type, nanny=True): - self._put_decref(cname, type, nanny, null_check=False, clear=False) - - def put_var_gotref(self, entry): - if entry.type.is_pyobject: - self.putln("__Pyx_GOTREF(%s);" % self.entry_as_pyobject(entry)) - - def put_var_giveref(self, entry): - if entry.type.is_pyobject: - self.putln("__Pyx_GIVEREF(%s);" % self.entry_as_pyobject(entry)) - - def put_var_xgotref(self, entry): - if entry.type.is_pyobject: - self.putln("__Pyx_XGOTREF(%s);" % self.entry_as_pyobject(entry)) - - def put_var_xgiveref(self, entry): - if entry.type.is_pyobject: - self.putln("__Pyx_XGIVEREF(%s);" % self.entry_as_pyobject(entry)) - - def put_var_incref(self, entry, nanny=True): - if entry.type.is_pyobject: - if nanny: - self.putln("__Pyx_INCREF(%s);" % self.entry_as_pyobject(entry)) - else: - self.putln("Py_INCREF(%s);" % self.entry_as_pyobject(entry)) - - def put_var_xincref(self, entry): - if entry.type.is_pyobject: - self.putln("__Pyx_XINCREF(%s);" % self.entry_as_pyobject(entry)) - - def put_decref_clear(self, cname, type, nanny=True, clear_before_decref=False): - self._put_decref(cname, type, nanny, null_check=False, - clear=True, clear_before_decref=clear_before_decref) - - def put_xdecref(self, cname, type, nanny=True, have_gil=True): - self._put_decref(cname, type, nanny, null_check=True, - have_gil=have_gil, clear=False) - - def put_xdecref_clear(self, cname, type, nanny=True, clear_before_decref=False): - self._put_decref(cname, type, nanny, null_check=True, - clear=True, clear_before_decref=clear_before_decref) - - def _put_decref(self, cname, type, nanny=True, null_check=False, - have_gil=True, clear=False, clear_before_decref=False): - if type.is_memoryviewslice: - self.put_xdecref_memoryviewslice(cname, have_gil=have_gil) - return - - prefix = '__Pyx' if nanny else 'Py' - X = 'X' if null_check else '' - - if clear: - if clear_before_decref: - if not nanny: - X = '' # CPython doesn't have a Py_XCLEAR() - self.putln("%s_%sCLEAR(%s);" % (prefix, X, cname)) - else: - self.putln("%s_%sDECREF(%s); %s = 0;" % ( - prefix, X, self.as_pyobject(cname, type), cname)) - else: - self.putln("%s_%sDECREF(%s);" % ( - prefix, X, self.as_pyobject(cname, type))) - - def put_decref_set(self, cname, rhs_cname): - self.putln("__Pyx_DECREF_SET(%s, %s);" % (cname, rhs_cname)) - - def put_xdecref_set(self, cname, rhs_cname): - self.putln("__Pyx_XDECREF_SET(%s, %s);" % (cname, rhs_cname)) - - def put_var_decref(self, entry): - if entry.type.is_pyobject: - self.putln("__Pyx_XDECREF(%s);" % self.entry_as_pyobject(entry)) - - def put_var_xdecref(self, entry, nanny=True): - if entry.type.is_pyobject: - if nanny: - self.putln("__Pyx_XDECREF(%s);" % self.entry_as_pyobject(entry)) - else: - self.putln("Py_XDECREF(%s);" % self.entry_as_pyobject(entry)) - - def put_var_decref_clear(self, entry): - self._put_var_decref_clear(entry, null_check=False) - - def put_var_xdecref_clear(self, entry): - self._put_var_decref_clear(entry, null_check=True) - - def _put_var_decref_clear(self, entry, null_check): - if entry.type.is_pyobject: - if entry.in_closure: - # reset before DECREF to make sure closure state is - # consistent during call to DECREF() - self.putln("__Pyx_%sCLEAR(%s);" % ( - null_check and 'X' or '', - entry.cname)) - else: - self.putln("__Pyx_%sDECREF(%s); %s = 0;" % ( - null_check and 'X' or '', - self.entry_as_pyobject(entry), - entry.cname)) - - def put_var_decrefs(self, entries, used_only = 0): - for entry in entries: - if not used_only or entry.used: - if entry.xdecref_cleanup: - self.put_var_xdecref(entry) - else: - self.put_var_decref(entry) - - def put_var_xdecrefs(self, entries): - for entry in entries: - self.put_var_xdecref(entry) - - def put_var_xdecrefs_clear(self, entries): - for entry in entries: - self.put_var_xdecref_clear(entry) - - def put_incref_memoryviewslice(self, slice_cname, have_gil=False): - from . import MemoryView - self.globalstate.use_utility_code(MemoryView.memviewslice_init_code) - self.putln("__PYX_INC_MEMVIEW(&%s, %d);" % (slice_cname, int(have_gil))) - - def put_xdecref_memoryviewslice(self, slice_cname, have_gil=False): - from . import MemoryView - self.globalstate.use_utility_code(MemoryView.memviewslice_init_code) - self.putln("__PYX_XDEC_MEMVIEW(&%s, %d);" % (slice_cname, int(have_gil))) - - def put_xgiveref_memoryviewslice(self, slice_cname): - self.put_xgiveref("%s.memview" % slice_cname) - - def put_init_to_py_none(self, cname, type, nanny=True): - from .PyrexTypes import py_object_type, typecast - py_none = typecast(type, py_object_type, "Py_None") - if nanny: - self.putln("%s = %s; __Pyx_INCREF(Py_None);" % (cname, py_none)) - else: - self.putln("%s = %s; Py_INCREF(Py_None);" % (cname, py_none)) - - def put_init_var_to_py_none(self, entry, template = "%s", nanny=True): - code = template % entry.cname - #if entry.type.is_extension_type: - # code = "((PyObject*)%s)" % code - self.put_init_to_py_none(code, entry.type, nanny) - if entry.in_closure: - self.put_giveref('Py_None') - - def put_pymethoddef(self, entry, term, allow_skip=True, wrapper_code_writer=None): - if entry.is_special or entry.name == '__getattribute__': - if entry.name not in special_py_methods: - if entry.name == '__getattr__' and not self.globalstate.directives['fast_getattr']: - pass - # Python's typeobject.c will automatically fill in our slot - # in add_operators() (called by PyType_Ready) with a value - # that's better than ours. - elif allow_skip: - return - - method_flags = entry.signature.method_flags() - if not method_flags: - return - from . import TypeSlots - if entry.is_special or TypeSlots.is_reverse_number_slot(entry.name): - method_flags += [TypeSlots.method_coexist] - func_ptr = wrapper_code_writer.put_pymethoddef_wrapper(entry) if wrapper_code_writer else entry.func_cname - # Add required casts, but try not to shadow real warnings. - cast = '__Pyx_PyCFunctionFast' if 'METH_FASTCALL' in method_flags else 'PyCFunction' - if 'METH_KEYWORDS' in method_flags: - cast += 'WithKeywords' - if cast != 'PyCFunction': - func_ptr = '(void*)(%s)%s' % (cast, func_ptr) - self.putln( - '{"%s", (PyCFunction)%s, %s, %s}%s' % ( - entry.name, - func_ptr, - "|".join(method_flags), - entry.doc_cname if entry.doc else '0', - term)) - - def put_pymethoddef_wrapper(self, entry): - func_cname = entry.func_cname - if entry.is_special: - method_flags = entry.signature.method_flags() - if method_flags and 'METH_NOARGS' in method_flags: - # Special NOARGS methods really take no arguments besides 'self', but PyCFunction expects one. - func_cname = Naming.method_wrapper_prefix + func_cname - self.putln("static PyObject *%s(PyObject *self, CYTHON_UNUSED PyObject *arg) {return %s(self);}" % ( - func_cname, entry.func_cname)) - return func_cname - - # GIL methods - - def put_ensure_gil(self, declare_gilstate=True, variable=None): - """ - Acquire the GIL. The generated code is safe even when no PyThreadState - has been allocated for this thread (for threads not initialized by - using the Python API). Additionally, the code generated by this method - may be called recursively. - """ - self.globalstate.use_utility_code( - UtilityCode.load_cached("ForceInitThreads", "ModuleSetupCode.c")) - if self.globalstate.directives['fast_gil']: - self.globalstate.use_utility_code(UtilityCode.load_cached("FastGil", "ModuleSetupCode.c")) - else: - self.globalstate.use_utility_code(UtilityCode.load_cached("NoFastGil", "ModuleSetupCode.c")) - self.putln("#ifdef WITH_THREAD") - if not variable: - variable = '__pyx_gilstate_save' - if declare_gilstate: - self.put("PyGILState_STATE ") - self.putln("%s = __Pyx_PyGILState_Ensure();" % variable) - self.putln("#endif") - - def put_release_ensured_gil(self, variable=None): - """ - Releases the GIL, corresponds to `put_ensure_gil`. - """ - if self.globalstate.directives['fast_gil']: - self.globalstate.use_utility_code(UtilityCode.load_cached("FastGil", "ModuleSetupCode.c")) - else: - self.globalstate.use_utility_code(UtilityCode.load_cached("NoFastGil", "ModuleSetupCode.c")) - if not variable: - variable = '__pyx_gilstate_save' - self.putln("#ifdef WITH_THREAD") - self.putln("__Pyx_PyGILState_Release(%s);" % variable) - self.putln("#endif") - - def put_acquire_gil(self, variable=None): - """ - Acquire the GIL. The thread's thread state must have been initialized - by a previous `put_release_gil` - """ - if self.globalstate.directives['fast_gil']: - self.globalstate.use_utility_code(UtilityCode.load_cached("FastGil", "ModuleSetupCode.c")) - else: - self.globalstate.use_utility_code(UtilityCode.load_cached("NoFastGil", "ModuleSetupCode.c")) - self.putln("#ifdef WITH_THREAD") - self.putln("__Pyx_FastGIL_Forget();") - if variable: - self.putln('_save = %s;' % variable) - self.putln("Py_BLOCK_THREADS") - self.putln("#endif") - - def put_release_gil(self, variable=None): - "Release the GIL, corresponds to `put_acquire_gil`." - if self.globalstate.directives['fast_gil']: - self.globalstate.use_utility_code(UtilityCode.load_cached("FastGil", "ModuleSetupCode.c")) - else: - self.globalstate.use_utility_code(UtilityCode.load_cached("NoFastGil", "ModuleSetupCode.c")) - self.putln("#ifdef WITH_THREAD") - self.putln("PyThreadState *_save;") - self.putln("Py_UNBLOCK_THREADS") - if variable: - self.putln('%s = _save;' % variable) - self.putln("__Pyx_FastGIL_Remember();") - self.putln("#endif") - - def declare_gilstate(self): - self.putln("#ifdef WITH_THREAD") - self.putln("PyGILState_STATE __pyx_gilstate_save;") - self.putln("#endif") - - # error handling - - def put_error_if_neg(self, pos, value): - # TODO this path is almost _never_ taken, yet this macro makes is slower! - # return self.putln("if (unlikely(%s < 0)) %s" % (value, self.error_goto(pos))) - return self.putln("if (%s < 0) %s" % (value, self.error_goto(pos))) - - def put_error_if_unbound(self, pos, entry, in_nogil_context=False): - from . import ExprNodes - if entry.from_closure: - func = '__Pyx_RaiseClosureNameError' - self.globalstate.use_utility_code( - ExprNodes.raise_closure_name_error_utility_code) - elif entry.type.is_memoryviewslice and in_nogil_context: - func = '__Pyx_RaiseUnboundMemoryviewSliceNogil' - self.globalstate.use_utility_code( - ExprNodes.raise_unbound_memoryview_utility_code_nogil) - else: - func = '__Pyx_RaiseUnboundLocalError' - self.globalstate.use_utility_code( - ExprNodes.raise_unbound_local_error_utility_code) - - self.putln('if (unlikely(!%s)) { %s("%s"); %s }' % ( - entry.type.check_for_null_code(entry.cname), - func, - entry.name, - self.error_goto(pos))) - - def set_error_info(self, pos, used=False): - self.funcstate.should_declare_error_indicator = True - if used: - self.funcstate.uses_error_indicator = True - return "__PYX_MARK_ERR_POS(%s, %s)" % ( - self.lookup_filename(pos[0]), - pos[1]) - - def error_goto(self, pos, used=True): - lbl = self.funcstate.error_label - self.funcstate.use_label(lbl) - if pos is None: - return 'goto %s;' % lbl - self.funcstate.should_declare_error_indicator = True - if used: - self.funcstate.uses_error_indicator = True - return "__PYX_ERR(%s, %s, %s)" % ( - self.lookup_filename(pos[0]), - pos[1], - lbl) - - def error_goto_if(self, cond, pos): - return "if (%s) %s" % (self.unlikely(cond), self.error_goto(pos)) - - def error_goto_if_null(self, cname, pos): - return self.error_goto_if("!%s" % cname, pos) - - def error_goto_if_neg(self, cname, pos): - return self.error_goto_if("%s < 0" % cname, pos) - - def error_goto_if_PyErr(self, pos): - return self.error_goto_if("PyErr_Occurred()", pos) - - def lookup_filename(self, filename): - return self.globalstate.lookup_filename(filename) - - def put_declare_refcount_context(self): - self.putln('__Pyx_RefNannyDeclarations') - - def put_setup_refcount_context(self, name, acquire_gil=False): - if acquire_gil: - self.globalstate.use_utility_code( - UtilityCode.load_cached("ForceInitThreads", "ModuleSetupCode.c")) - self.putln('__Pyx_RefNannySetupContext("%s", %d);' % (name, acquire_gil and 1 or 0)) - - def put_finish_refcount_context(self): - self.putln("__Pyx_RefNannyFinishContext();") - - def put_add_traceback(self, qualified_name, include_cline=True): - """ - Build a Python traceback for propagating exceptions. - - qualified_name should be the qualified name of the function. - """ - format_tuple = ( - qualified_name, - Naming.clineno_cname if include_cline else 0, - Naming.lineno_cname, - Naming.filename_cname, - ) - self.funcstate.uses_error_indicator = True - self.putln('__Pyx_AddTraceback("%s", %s, %s, %s);' % format_tuple) - - def put_unraisable(self, qualified_name, nogil=False): - """ - Generate code to print a Python warning for an unraisable exception. - - qualified_name should be the qualified name of the function. - """ - format_tuple = ( - qualified_name, - Naming.clineno_cname, - Naming.lineno_cname, - Naming.filename_cname, - self.globalstate.directives['unraisable_tracebacks'], - nogil, - ) - self.funcstate.uses_error_indicator = True - self.putln('__Pyx_WriteUnraisable("%s", %s, %s, %s, %d, %d);' % format_tuple) - self.globalstate.use_utility_code( - UtilityCode.load_cached("WriteUnraisableException", "Exceptions.c")) - - def put_trace_declarations(self): - self.putln('__Pyx_TraceDeclarations') - - def put_trace_frame_init(self, codeobj=None): - if codeobj: - self.putln('__Pyx_TraceFrameInit(%s)' % codeobj) - - def put_trace_call(self, name, pos, nogil=False): - self.putln('__Pyx_TraceCall("%s", %s[%s], %s, %d, %s);' % ( - name, Naming.filetable_cname, self.lookup_filename(pos[0]), pos[1], nogil, self.error_goto(pos))) - - def put_trace_exception(self): - self.putln("__Pyx_TraceException();") - - def put_trace_return(self, retvalue_cname, nogil=False): - self.putln("__Pyx_TraceReturn(%s, %d);" % (retvalue_cname, nogil)) - - def putln_openmp(self, string): - self.putln("#ifdef _OPENMP") - self.putln(string) - self.putln("#endif /* _OPENMP */") - - def undef_builtin_expect(self, cond): - """ - Redefine the macros likely() and unlikely to no-ops, depending on - condition 'cond' - """ - self.putln("#if %s" % cond) - self.putln(" #undef likely") - self.putln(" #undef unlikely") - self.putln(" #define likely(x) (x)") - self.putln(" #define unlikely(x) (x)") - self.putln("#endif") - - def redef_builtin_expect(self, cond): - self.putln("#if %s" % cond) - self.putln(" #undef likely") - self.putln(" #undef unlikely") - self.putln(" #define likely(x) __builtin_expect(!!(x), 1)") - self.putln(" #define unlikely(x) __builtin_expect(!!(x), 0)") - self.putln("#endif") - - -class PyrexCodeWriter(object): - # f file output file - # level int indentation level - - def __init__(self, outfile_name): - self.f = Utils.open_new_file(outfile_name) - self.level = 0 - - def putln(self, code): - self.f.write("%s%s\n" % (" " * self.level, code)) - - def indent(self): - self.level += 1 - - def dedent(self): - self.level -= 1 - -class PyxCodeWriter(object): - """ - Can be used for writing out some Cython code. To use the indenter - functionality, the Cython.Compiler.Importer module will have to be used - to load the code to support python 2.4 - """ - - def __init__(self, buffer=None, indent_level=0, context=None, encoding='ascii'): - self.buffer = buffer or StringIOTree() - self.level = indent_level - self.context = context - self.encoding = encoding - - def indent(self, levels=1): - self.level += levels - return True - - def dedent(self, levels=1): - self.level -= levels - - def indenter(self, line): - """ - Instead of - - with pyx_code.indenter("for i in range(10):"): - pyx_code.putln("print i") - - write - - if pyx_code.indenter("for i in range(10);"): - pyx_code.putln("print i") - pyx_code.dedent() - """ - self.putln(line) - self.indent() - return True - - def getvalue(self): - result = self.buffer.getvalue() - if isinstance(result, bytes): - result = result.decode(self.encoding) - return result - - def putln(self, line, context=None): - context = context or self.context - if context: - line = sub_tempita(line, context) - self._putln(line) - - def _putln(self, line): - self.buffer.write("%s%s\n" % (self.level * " ", line)) - - def put_chunk(self, chunk, context=None): - context = context or self.context - if context: - chunk = sub_tempita(chunk, context) - - chunk = textwrap.dedent(chunk) - for line in chunk.splitlines(): - self._putln(line) - - def insertion_point(self): - return PyxCodeWriter(self.buffer.insertion_point(), self.level, - self.context) - - def named_insertion_point(self, name): - setattr(self, name, self.insertion_point()) - - -class ClosureTempAllocator(object): - def __init__(self, klass): - self.klass = klass - self.temps_allocated = {} - self.temps_free = {} - self.temps_count = 0 - - def reset(self): - for type, cnames in self.temps_allocated.items(): - self.temps_free[type] = list(cnames) - - def allocate_temp(self, type): - if type not in self.temps_allocated: - self.temps_allocated[type] = [] - self.temps_free[type] = [] - elif self.temps_free[type]: - return self.temps_free[type].pop(0) - cname = '%s%d' % (Naming.codewriter_temp_prefix, self.temps_count) - self.klass.declare_var(pos=None, name=cname, cname=cname, type=type, is_cdef=True) - self.temps_allocated[type].append(cname) - self.temps_count += 1 - return cname diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CodeGeneration.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CodeGeneration.py deleted file mode 100644 index e64049c7f5d..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CodeGeneration.py +++ /dev/null @@ -1,35 +0,0 @@ -from __future__ import absolute_import - -from .Visitor import VisitorTransform -from .Nodes import StatListNode - - -class ExtractPxdCode(VisitorTransform): - """ - Finds nodes in a pxd file that should generate code, and - returns them in a StatListNode. - - The result is a tuple (StatListNode, ModuleScope), i.e. - everything that is needed from the pxd after it is processed. - - A purer approach would be to separately compile the pxd code, - but the result would have to be slightly more sophisticated - than pure strings (functions + wanted interned strings + - wanted utility code + wanted cached objects) so for now this - approach is taken. - """ - - def __call__(self, root): - self.funcs = [] - self.visitchildren(root) - return (StatListNode(root.pos, stats=self.funcs), root.scope) - - def visit_FuncDefNode(self, node): - self.funcs.append(node) - # Do not visit children, nested funcdefnodes will - # also be moved by this action... - return node - - def visit_Node(self, node): - self.visitchildren(node) - return node diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CythonScope.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CythonScope.py deleted file mode 100644 index 1c25d1a6b4c..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/CythonScope.py +++ /dev/null @@ -1,164 +0,0 @@ -from __future__ import absolute_import - -from .Symtab import ModuleScope -from .PyrexTypes import * -from .UtilityCode import CythonUtilityCode -from .Errors import error -from .Scanning import StringSourceDescriptor -from . import MemoryView - - -class CythonScope(ModuleScope): - is_cython_builtin = 1 - _cythonscope_initialized = False - - def __init__(self, context): - ModuleScope.__init__(self, u'cython', None, None) - self.pxd_file_loaded = True - self.populate_cython_scope() - # The Main.Context object - self.context = context - - for fused_type in (cy_integral_type, cy_floating_type, cy_numeric_type): - entry = self.declare_typedef(fused_type.name, - fused_type, - None, - cname='') - entry.in_cinclude = True - - def is_cpp(self): - # Allow C++ utility code in C++ contexts. - return self.context.cpp - - def lookup_type(self, name): - # This function should go away when types are all first-level objects. - type = parse_basic_type(name) - if type: - return type - - return super(CythonScope, self).lookup_type(name) - - def lookup(self, name): - entry = super(CythonScope, self).lookup(name) - - if entry is None and not self._cythonscope_initialized: - self.load_cythonscope() - entry = super(CythonScope, self).lookup(name) - - return entry - - def find_module(self, module_name, pos): - error("cython.%s is not available" % module_name, pos) - - def find_submodule(self, module_name): - entry = self.entries.get(module_name, None) - if not entry: - self.load_cythonscope() - entry = self.entries.get(module_name, None) - - if entry and entry.as_module: - return entry.as_module - else: - # TODO: fix find_submodule control flow so that we're not - # expected to create a submodule here (to protect CythonScope's - # possible immutability). Hack ourselves out of the situation - # for now. - raise error((StringSourceDescriptor(u"cython", u""), 0, 0), - "cython.%s is not available" % module_name) - - def lookup_qualified_name(self, qname): - # ExprNode.as_cython_attribute generates qnames and we untangle it here... - name_path = qname.split(u'.') - scope = self - while len(name_path) > 1: - scope = scope.lookup_here(name_path[0]) - if scope: - scope = scope.as_module - del name_path[0] - if scope is None: - return None - else: - return scope.lookup_here(name_path[0]) - - def populate_cython_scope(self): - # These are used to optimize isinstance in FinalOptimizePhase - type_object = self.declare_typedef( - 'PyTypeObject', - base_type = c_void_type, - pos = None, - cname = 'PyTypeObject') - type_object.is_void = True - type_object_type = type_object.type - - self.declare_cfunction( - 'PyObject_TypeCheck', - CFuncType(c_bint_type, [CFuncTypeArg("o", py_object_type, None), - CFuncTypeArg("t", c_ptr_type(type_object_type), None)]), - pos = None, - defining = 1, - cname = 'PyObject_TypeCheck') - - def load_cythonscope(self): - """ - Creates some entries for testing purposes and entries for - cython.array() and for cython.view.*. - """ - if self._cythonscope_initialized: - return - - self._cythonscope_initialized = True - cython_testscope_utility_code.declare_in_scope( - self, cython_scope=self) - cython_test_extclass_utility_code.declare_in_scope( - self, cython_scope=self) - - # - # The view sub-scope - # - self.viewscope = viewscope = ModuleScope(u'view', self, None) - self.declare_module('view', viewscope, None).as_module = viewscope - viewscope.is_cython_builtin = True - viewscope.pxd_file_loaded = True - - cythonview_testscope_utility_code.declare_in_scope( - viewscope, cython_scope=self) - - view_utility_scope = MemoryView.view_utility_code.declare_in_scope( - self.viewscope, cython_scope=self, - whitelist=MemoryView.view_utility_whitelist) - - # self.entries["array"] = view_utility_scope.entries.pop("array") - - -def create_cython_scope(context): - # One could in fact probably make it a singleton, - # but not sure yet whether any code mutates it (which would kill reusing - # it across different contexts) - return CythonScope(context) - -# Load test utilities for the cython scope - -def load_testscope_utility(cy_util_name, **kwargs): - return CythonUtilityCode.load(cy_util_name, "TestCythonScope.pyx", **kwargs) - - -undecorated_methods_protos = UtilityCode(proto=u""" - /* These methods are undecorated and have therefore no prototype */ - static PyObject *__pyx_TestClass_cdef_method( - struct __pyx_TestClass_obj *self, int value); - static PyObject *__pyx_TestClass_cpdef_method( - struct __pyx_TestClass_obj *self, int value, int skip_dispatch); - static PyObject *__pyx_TestClass_def_method( - PyObject *self, PyObject *value); -""") - -cython_testscope_utility_code = load_testscope_utility("TestScope") - -test_cython_utility_dep = load_testscope_utility("TestDep") - -cython_test_extclass_utility_code = \ - load_testscope_utility("TestClass", name="TestClass", - requires=[undecorated_methods_protos, - test_cython_utility_dep]) - -cythonview_testscope_utility_code = load_testscope_utility("View.TestScope") diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/DebugFlags.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/DebugFlags.py deleted file mode 100644 index e830ab1849c..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/DebugFlags.py +++ /dev/null @@ -1,21 +0,0 @@ -# Can be enabled at the command line with --debug-xxx. - -debug_disposal_code = 0 -debug_temp_alloc = 0 -debug_coercion = 0 - -# Write comments into the C code that show where temporary variables -# are allocated and released. -debug_temp_code_comments = 0 - -# Write a call trace of the code generation phase into the C code. -debug_trace_code_generation = 0 - -# Do not replace exceptions with user-friendly error messages. -debug_no_exception_intercept = 0 - -# Print a message each time a new stage in the pipeline is entered. -debug_verbose_pipeline = 0 - -# Raise an exception when an error is encountered. -debug_exception_on_error = 0 diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Errors.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Errors.py deleted file mode 100644 index 9761b52c32f..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Errors.py +++ /dev/null @@ -1,265 +0,0 @@ -# -# Errors -# - -from __future__ import absolute_import - -try: - from __builtin__ import basestring as any_string_type -except ImportError: - any_string_type = (bytes, str) - -import sys -from contextlib import contextmanager - -from ..Utils import open_new_file -from . import DebugFlags -from . import Options - - -class PyrexError(Exception): - pass - - -class PyrexWarning(Exception): - pass - - -def context(position): - source = position[0] - assert not (isinstance(source, any_string_type)), ( - "Please replace filename strings with Scanning.FileSourceDescriptor instances %r" % source) - try: - F = source.get_lines() - except UnicodeDecodeError: - # file has an encoding problem - s = u"[unprintable code]\n" - else: - s = u''.join(F[max(0, position[1]-6):position[1]]) - s = u'...\n%s%s^\n' % (s, u' '*(position[2]-1)) - s = u'%s\n%s%s\n' % (u'-'*60, s, u'-'*60) - return s - -def format_position(position): - if position: - return u"%s:%d:%d: " % (position[0].get_error_description(), - position[1], position[2]) - return u'' - -def format_error(message, position): - if position: - pos_str = format_position(position) - cont = context(position) - message = u'\nError compiling Cython file:\n%s\n%s%s' % (cont, pos_str, message or u'') - return message - -class CompileError(PyrexError): - - def __init__(self, position = None, message = u""): - self.position = position - self.message_only = message - self.formatted_message = format_error(message, position) - self.reported = False - # Deprecated and withdrawn in 2.6: - # self.message = message - Exception.__init__(self, self.formatted_message) - # Python Exception subclass pickling is broken, - # see http://bugs.python.org/issue1692335 - self.args = (position, message) - - def __str__(self): - return self.formatted_message - -class CompileWarning(PyrexWarning): - - def __init__(self, position = None, message = ""): - self.position = position - # Deprecated and withdrawn in 2.6: - # self.message = message - Exception.__init__(self, format_position(position) + message) - -class InternalError(Exception): - # If this is ever raised, there is a bug in the compiler. - - def __init__(self, message): - self.message_only = message - Exception.__init__(self, u"Internal compiler error: %s" - % message) - -class AbortError(Exception): - # Throw this to stop the compilation immediately. - - def __init__(self, message): - self.message_only = message - Exception.__init__(self, u"Abort error: %s" % message) - -class CompilerCrash(CompileError): - # raised when an unexpected exception occurs in a transform - def __init__(self, pos, context, message, cause, stacktrace=None): - if message: - message = u'\n' + message - else: - message = u'\n' - self.message_only = message - if context: - message = u"Compiler crash in %s%s" % (context, message) - if stacktrace: - import traceback - message += ( - u'\n\nCompiler crash traceback from this point on:\n' + - u''.join(traceback.format_tb(stacktrace))) - if cause: - if not stacktrace: - message += u'\n' - message += u'%s: %s' % (cause.__class__.__name__, cause) - CompileError.__init__(self, pos, message) - # Python Exception subclass pickling is broken, - # see http://bugs.python.org/issue1692335 - self.args = (pos, context, message, cause, stacktrace) - -class NoElementTreeInstalledException(PyrexError): - """raised when the user enabled options.gdb_debug but no ElementTree - implementation was found - """ - -listing_file = None -num_errors = 0 -echo_file = None - -def open_listing_file(path, echo_to_stderr = 1): - # Begin a new error listing. If path is None, no file - # is opened, the error counter is just reset. - global listing_file, num_errors, echo_file - if path is not None: - listing_file = open_new_file(path) - else: - listing_file = None - if echo_to_stderr: - echo_file = sys.stderr - else: - echo_file = None - num_errors = 0 - -def close_listing_file(): - global listing_file - if listing_file: - listing_file.close() - listing_file = None - -def report_error(err, use_stack=True): - if error_stack and use_stack: - error_stack[-1].append(err) - else: - global num_errors - # See Main.py for why dual reporting occurs. Quick fix for now. - if err.reported: return - err.reported = True - try: line = u"%s\n" % err - except UnicodeEncodeError: - # Python <= 2.5 does this for non-ASCII Unicode exceptions - line = format_error(getattr(err, 'message_only', "[unprintable exception message]"), - getattr(err, 'position', None)) + u'\n' - if listing_file: - try: listing_file.write(line) - except UnicodeEncodeError: - listing_file.write(line.encode('ASCII', 'replace')) - if echo_file: - try: echo_file.write(line) - except UnicodeEncodeError: - echo_file.write(line.encode('ASCII', 'replace')) - num_errors += 1 - if Options.fast_fail: - raise AbortError("fatal errors") - - -def error(position, message): - #print("Errors.error:", repr(position), repr(message)) ### - if position is None: - raise InternalError(message) - err = CompileError(position, message) - if DebugFlags.debug_exception_on_error: raise Exception(err) # debug - report_error(err) - return err - - -LEVEL = 1 # warn about all errors level 1 or higher - - -def message(position, message, level=1): - if level < LEVEL: - return - warn = CompileWarning(position, message) - line = "note: %s\n" % warn - if listing_file: - listing_file.write(line) - if echo_file: - echo_file.write(line) - return warn - - -def warning(position, message, level=0): - if level < LEVEL: - return - if Options.warning_errors and position: - return error(position, message) - warn = CompileWarning(position, message) - line = "warning: %s\n" % warn - if listing_file: - listing_file.write(line) - if echo_file: - echo_file.write(line) - return warn - - -_warn_once_seen = {} -def warn_once(position, message, level=0): - if level < LEVEL or message in _warn_once_seen: - return - warn = CompileWarning(position, message) - line = "warning: %s\n" % warn - if listing_file: - listing_file.write(line) - if echo_file: - echo_file.write(line) - _warn_once_seen[message] = True - return warn - - -# These functions can be used to momentarily suppress errors. - -error_stack = [] - - -def hold_errors(): - error_stack.append([]) - - -def release_errors(ignore=False): - held_errors = error_stack.pop() - if not ignore: - for err in held_errors: - report_error(err) - - -def held_errors(): - return error_stack[-1] - - -# same as context manager: - -@contextmanager -def local_errors(ignore=False): - errors = [] - error_stack.append(errors) - try: - yield errors - finally: - release_errors(ignore=ignore) - - -# this module needs a redesign to support parallel cythonisation, but -# for now, the following works at least in sequential compiler runs - -def reset(): - _warn_once_seen.clear() - del error_stack[:] diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/ExprNodes.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/ExprNodes.py deleted file mode 100644 index 9162eaad918..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/ExprNodes.py +++ /dev/null @@ -1,13692 +0,0 @@ -# -# Parse tree nodes for expressions -# - -from __future__ import absolute_import - -import cython -cython.declare(error=object, warning=object, warn_once=object, InternalError=object, - CompileError=object, UtilityCode=object, TempitaUtilityCode=object, - StringEncoding=object, operator=object, local_errors=object, report_error=object, - Naming=object, Nodes=object, PyrexTypes=object, py_object_type=object, - list_type=object, tuple_type=object, set_type=object, dict_type=object, - unicode_type=object, str_type=object, bytes_type=object, type_type=object, - Builtin=object, Symtab=object, Utils=object, find_coercion_error=object, - debug_disposal_code=object, debug_temp_alloc=object, debug_coercion=object, - bytearray_type=object, slice_type=object, _py_int_types=object, - IS_PYTHON3=cython.bint) - -import re -import sys -import copy -import os.path -import operator - -from .Errors import ( - error, warning, InternalError, CompileError, report_error, local_errors) -from .Code import UtilityCode, TempitaUtilityCode -from . import StringEncoding -from . import Naming -from . import Nodes -from .Nodes import Node, utility_code_for_imports, analyse_type_annotation -from . import PyrexTypes -from .PyrexTypes import py_object_type, c_long_type, typecast, error_type, \ - unspecified_type -from . import TypeSlots -from .Builtin import list_type, tuple_type, set_type, dict_type, type_type, \ - unicode_type, str_type, bytes_type, bytearray_type, basestring_type, slice_type -from . import Builtin -from . import Symtab -from .. import Utils -from .Annotate import AnnotationItem -from . import Future -from ..Debugging import print_call_chain -from .DebugFlags import debug_disposal_code, debug_temp_alloc, \ - debug_coercion -from .Pythran import (to_pythran, is_pythran_supported_type, is_pythran_supported_operation_type, - is_pythran_expr, pythran_func_type, pythran_binop_type, pythran_unaryop_type, has_np_pythran, - pythran_indexing_code, pythran_indexing_type, is_pythran_supported_node_or_none, pythran_type, - pythran_is_numpy_func_supported, pythran_get_func_include_file, pythran_functor) -from .PyrexTypes import PythranExpr - -try: - from __builtin__ import basestring -except ImportError: - # Python 3 - basestring = str - any_string_type = (bytes, str) -else: - # Python 2 - any_string_type = (bytes, unicode) - - -if sys.version_info[0] >= 3: - IS_PYTHON3 = True - _py_int_types = int -else: - IS_PYTHON3 = False - _py_int_types = (int, long) - - -class NotConstant(object): - _obj = None - - def __new__(cls): - if NotConstant._obj is None: - NotConstant._obj = super(NotConstant, cls).__new__(cls) - - return NotConstant._obj - - def __repr__(self): - return "" - -not_a_constant = NotConstant() -constant_value_not_set = object() - -# error messages when coercing from key[0] to key[1] -coercion_error_dict = { - # string related errors - (unicode_type, str_type): ("Cannot convert Unicode string to 'str' implicitly." - " This is not portable and requires explicit encoding."), - (unicode_type, bytes_type): "Cannot convert Unicode string to 'bytes' implicitly, encoding required.", - (unicode_type, PyrexTypes.c_char_ptr_type): "Unicode objects only support coercion to Py_UNICODE*.", - (unicode_type, PyrexTypes.c_const_char_ptr_type): "Unicode objects only support coercion to Py_UNICODE*.", - (unicode_type, PyrexTypes.c_uchar_ptr_type): "Unicode objects only support coercion to Py_UNICODE*.", - (unicode_type, PyrexTypes.c_const_uchar_ptr_type): "Unicode objects only support coercion to Py_UNICODE*.", - (bytes_type, unicode_type): "Cannot convert 'bytes' object to unicode implicitly, decoding required", - (bytes_type, str_type): "Cannot convert 'bytes' object to str implicitly. This is not portable to Py3.", - (bytes_type, basestring_type): ("Cannot convert 'bytes' object to basestring implicitly." - " This is not portable to Py3."), - (bytes_type, PyrexTypes.c_py_unicode_ptr_type): "Cannot convert 'bytes' object to Py_UNICODE*, use 'unicode'.", - (bytes_type, PyrexTypes.c_const_py_unicode_ptr_type): ( - "Cannot convert 'bytes' object to Py_UNICODE*, use 'unicode'."), - (basestring_type, bytes_type): "Cannot convert 'basestring' object to bytes implicitly. This is not portable.", - (str_type, unicode_type): ("str objects do not support coercion to unicode," - " use a unicode string literal instead (u'')"), - (str_type, bytes_type): "Cannot convert 'str' to 'bytes' implicitly. This is not portable.", - (str_type, PyrexTypes.c_char_ptr_type): "'str' objects do not support coercion to C types (use 'bytes'?).", - (str_type, PyrexTypes.c_const_char_ptr_type): "'str' objects do not support coercion to C types (use 'bytes'?).", - (str_type, PyrexTypes.c_uchar_ptr_type): "'str' objects do not support coercion to C types (use 'bytes'?).", - (str_type, PyrexTypes.c_const_uchar_ptr_type): "'str' objects do not support coercion to C types (use 'bytes'?).", - (str_type, PyrexTypes.c_py_unicode_ptr_type): "'str' objects do not support coercion to C types (use 'unicode'?).", - (str_type, PyrexTypes.c_const_py_unicode_ptr_type): ( - "'str' objects do not support coercion to C types (use 'unicode'?)."), - (PyrexTypes.c_char_ptr_type, unicode_type): "Cannot convert 'char*' to unicode implicitly, decoding required", - (PyrexTypes.c_const_char_ptr_type, unicode_type): ( - "Cannot convert 'char*' to unicode implicitly, decoding required"), - (PyrexTypes.c_uchar_ptr_type, unicode_type): "Cannot convert 'char*' to unicode implicitly, decoding required", - (PyrexTypes.c_const_uchar_ptr_type, unicode_type): ( - "Cannot convert 'char*' to unicode implicitly, decoding required"), -} - -def find_coercion_error(type_tuple, default, env): - err = coercion_error_dict.get(type_tuple) - if err is None: - return default - elif (env.directives['c_string_encoding'] and - any(t in type_tuple for t in (PyrexTypes.c_char_ptr_type, PyrexTypes.c_uchar_ptr_type, - PyrexTypes.c_const_char_ptr_type, PyrexTypes.c_const_uchar_ptr_type))): - if type_tuple[1].is_pyobject: - return default - elif env.directives['c_string_encoding'] in ('ascii', 'default'): - return default - else: - return "'%s' objects do not support coercion to C types with non-ascii or non-default c_string_encoding" % type_tuple[0].name - else: - return err - - -def default_str_type(env): - return { - 'bytes': bytes_type, - 'bytearray': bytearray_type, - 'str': str_type, - 'unicode': unicode_type - }.get(env.directives['c_string_type']) - - -def check_negative_indices(*nodes): - """ - Raise a warning on nodes that are known to have negative numeric values. - Used to find (potential) bugs inside of "wraparound=False" sections. - """ - for node in nodes: - if node is None or ( - not isinstance(node.constant_result, _py_int_types) and - not isinstance(node.constant_result, float)): - continue - if node.constant_result < 0: - warning(node.pos, - "the result of using negative indices inside of " - "code sections marked as 'wraparound=False' is " - "undefined", level=1) - - -def infer_sequence_item_type(env, seq_node, index_node=None, seq_type=None): - if not seq_node.is_sequence_constructor: - if seq_type is None: - seq_type = seq_node.infer_type(env) - if seq_type is tuple_type: - # tuples are immutable => we can safely follow assignments - if seq_node.cf_state and len(seq_node.cf_state) == 1: - try: - seq_node = seq_node.cf_state[0].rhs - except AttributeError: - pass - if seq_node is not None and seq_node.is_sequence_constructor: - if index_node is not None and index_node.has_constant_result(): - try: - item = seq_node.args[index_node.constant_result] - except (ValueError, TypeError, IndexError): - pass - else: - return item.infer_type(env) - # if we're lucky, all items have the same type - item_types = set([item.infer_type(env) for item in seq_node.args]) - if len(item_types) == 1: - return item_types.pop() - return None - - -def make_dedup_key(outer_type, item_nodes): - """ - Recursively generate a deduplication key from a sequence of values. - Includes Cython node types to work around the fact that (1, 2.0) == (1.0, 2), for example. - - @param outer_type: The type of the outer container. - @param item_nodes: A sequence of constant nodes that will be traversed recursively. - @return: A tuple that can be used as a dict key for deduplication. - """ - item_keys = [ - (py_object_type, None, type(None)) if node is None - # For sequences and their "mult_factor", see TupleNode. - else make_dedup_key(node.type, [node.mult_factor if node.is_literal else None] + node.args) if node.is_sequence_constructor - else make_dedup_key(node.type, (node.start, node.stop, node.step)) if node.is_slice - # For constants, look at the Python value type if we don't know the concrete Cython type. - else (node.type, node.constant_result, - type(node.constant_result) if node.type is py_object_type else None) if node.has_constant_result() - else None # something we cannot handle => short-circuit below - for node in item_nodes - ] - if None in item_keys: - return None - return outer_type, tuple(item_keys) - - -# Returns a block of code to translate the exception, -# plus a boolean indicating whether to check for Python exceptions. -def get_exception_handler(exception_value): - if exception_value is None: - return "__Pyx_CppExn2PyErr();", False - elif (exception_value.type == PyrexTypes.c_char_type - and exception_value.value == '*'): - return "__Pyx_CppExn2PyErr();", True - elif exception_value.type.is_pyobject: - return ( - 'try { throw; } catch(const std::exception& exn) {' - 'PyErr_SetString(%s, exn.what());' - '} catch(...) { PyErr_SetNone(%s); }' % ( - exception_value.entry.cname, - exception_value.entry.cname), - False) - else: - return ( - '%s(); if (!PyErr_Occurred())' - 'PyErr_SetString(PyExc_RuntimeError, ' - '"Error converting c++ exception.");' % ( - exception_value.entry.cname), - False) - -def maybe_check_py_error(code, check_py_exception, pos, nogil): - if check_py_exception: - if nogil: - code.putln(code.error_goto_if("__Pyx_ErrOccurredWithGIL()", pos)) - else: - code.putln(code.error_goto_if("PyErr_Occurred()", pos)) - -def translate_cpp_exception(code, pos, inside, py_result, exception_value, nogil): - raise_py_exception, check_py_exception = get_exception_handler(exception_value) - code.putln("try {") - code.putln("%s" % inside) - if py_result: - code.putln(code.error_goto_if_null(py_result, pos)) - maybe_check_py_error(code, check_py_exception, pos, nogil) - code.putln("} catch(...) {") - if nogil: - code.put_ensure_gil(declare_gilstate=True) - code.putln(raise_py_exception) - if nogil: - code.put_release_ensured_gil() - code.putln(code.error_goto(pos)) - code.putln("}") - -# Used to handle the case where an lvalue expression and an overloaded assignment -# both have an exception declaration. -def translate_double_cpp_exception(code, pos, lhs_type, lhs_code, rhs_code, - lhs_exc_val, assign_exc_val, nogil): - handle_lhs_exc, lhc_check_py_exc = get_exception_handler(lhs_exc_val) - handle_assignment_exc, assignment_check_py_exc = get_exception_handler(assign_exc_val) - code.putln("try {") - code.putln(lhs_type.declaration_code("__pyx_local_lvalue = %s;" % lhs_code)) - maybe_check_py_error(code, lhc_check_py_exc, pos, nogil) - code.putln("try {") - code.putln("__pyx_local_lvalue = %s;" % rhs_code) - maybe_check_py_error(code, assignment_check_py_exc, pos, nogil) - # Catch any exception from the overloaded assignment. - code.putln("} catch(...) {") - if nogil: - code.put_ensure_gil(declare_gilstate=True) - code.putln(handle_assignment_exc) - if nogil: - code.put_release_ensured_gil() - code.putln(code.error_goto(pos)) - code.putln("}") - # Catch any exception from evaluating lhs. - code.putln("} catch(...) {") - if nogil: - code.put_ensure_gil(declare_gilstate=True) - code.putln(handle_lhs_exc) - if nogil: - code.put_release_ensured_gil() - code.putln(code.error_goto(pos)) - code.putln('}') - - -class ExprNode(Node): - # subexprs [string] Class var holding names of subexpr node attrs - # type PyrexType Type of the result - # result_code string Code fragment - # result_ctype string C type of result_code if different from type - # is_temp boolean Result is in a temporary variable - # is_sequence_constructor - # boolean Is a list or tuple constructor expression - # is_starred boolean Is a starred expression (e.g. '*a') - # saved_subexpr_nodes - # [ExprNode or [ExprNode or None] or None] - # Cached result of subexpr_nodes() - # use_managed_ref boolean use ref-counted temps/assignments/etc. - # result_is_used boolean indicates that the result will be dropped and the - # is_numpy_attribute boolean Is a Numpy module attribute - # result_code/temp_result can safely be set to None - # annotation ExprNode or None PEP526 annotation for names or expressions - - result_ctype = None - type = None - annotation = None - temp_code = None - old_temp = None # error checker for multiple frees etc. - use_managed_ref = True # can be set by optimisation transforms - result_is_used = True - is_numpy_attribute = False - - # The Analyse Expressions phase for expressions is split - # into two sub-phases: - # - # Analyse Types - # Determines the result type of the expression based - # on the types of its sub-expressions, and inserts - # coercion nodes into the expression tree where needed. - # Marks nodes which will need to have temporary variables - # allocated. - # - # Allocate Temps - # Allocates temporary variables where needed, and fills - # in the result_code field of each node. - # - # ExprNode provides some convenience routines which - # perform both of the above phases. These should only - # be called from statement nodes, and only when no - # coercion nodes need to be added around the expression - # being analysed. In that case, the above two phases - # should be invoked separately. - # - # Framework code in ExprNode provides much of the common - # processing for the various phases. It makes use of the - # 'subexprs' class attribute of ExprNodes, which should - # contain a list of the names of attributes which can - # hold sub-nodes or sequences of sub-nodes. - # - # The framework makes use of a number of abstract methods. - # Their responsibilities are as follows. - # - # Declaration Analysis phase - # - # analyse_target_declaration - # Called during the Analyse Declarations phase to analyse - # the LHS of an assignment or argument of a del statement. - # Nodes which cannot be the LHS of an assignment need not - # implement it. - # - # Expression Analysis phase - # - # analyse_types - # - Call analyse_types on all sub-expressions. - # - Check operand types, and wrap coercion nodes around - # sub-expressions where needed. - # - Set the type of this node. - # - If a temporary variable will be required for the - # result, set the is_temp flag of this node. - # - # analyse_target_types - # Called during the Analyse Types phase to analyse - # the LHS of an assignment or argument of a del - # statement. Similar responsibilities to analyse_types. - # - # target_code - # Called by the default implementation of allocate_target_temps. - # Should return a C lvalue for assigning to the node. The default - # implementation calls calculate_result_code. - # - # check_const - # - Check that this node and its subnodes form a - # legal constant expression. If so, do nothing, - # otherwise call not_const. - # - # The default implementation of check_const - # assumes that the expression is not constant. - # - # check_const_addr - # - Same as check_const, except check that the - # expression is a C lvalue whose address is - # constant. Otherwise, call addr_not_const. - # - # The default implementation of calc_const_addr - # assumes that the expression is not a constant - # lvalue. - # - # Code Generation phase - # - # generate_evaluation_code - # - Call generate_evaluation_code for sub-expressions. - # - Perform the functions of generate_result_code - # (see below). - # - If result is temporary, call generate_disposal_code - # on all sub-expressions. - # - # A default implementation of generate_evaluation_code - # is provided which uses the following abstract methods: - # - # generate_result_code - # - Generate any C statements necessary to calculate - # the result of this node from the results of its - # sub-expressions. - # - # calculate_result_code - # - Should return a C code fragment evaluating to the - # result. This is only called when the result is not - # a temporary. - # - # generate_assignment_code - # Called on the LHS of an assignment. - # - Call generate_evaluation_code for sub-expressions. - # - Generate code to perform the assignment. - # - If the assignment absorbed a reference, call - # generate_post_assignment_code on the RHS, - # otherwise call generate_disposal_code on it. - # - # generate_deletion_code - # Called on an argument of a del statement. - # - Call generate_evaluation_code for sub-expressions. - # - Generate code to perform the deletion. - # - Call generate_disposal_code on all sub-expressions. - # - # - - is_sequence_constructor = False - is_dict_literal = False - is_set_literal = False - is_string_literal = False - is_attribute = False - is_subscript = False - is_slice = False - - is_buffer_access = False - is_memview_index = False - is_memview_slice = False - is_memview_broadcast = False - is_memview_copy_assignment = False - - saved_subexpr_nodes = None - is_temp = False - is_target = False - is_starred = False - - constant_result = constant_value_not_set - - child_attrs = property(fget=operator.attrgetter('subexprs')) - - def not_implemented(self, method_name): - print_call_chain(method_name, "not implemented") ### - raise InternalError( - "%s.%s not implemented" % - (self.__class__.__name__, method_name)) - - def is_lvalue(self): - return 0 - - def is_addressable(self): - return self.is_lvalue() and not self.type.is_memoryviewslice - - def is_ephemeral(self): - # An ephemeral node is one whose result is in - # a Python temporary and we suspect there are no - # other references to it. Certain operations are - # disallowed on such values, since they are - # likely to result in a dangling pointer. - return self.type.is_pyobject and self.is_temp - - def subexpr_nodes(self): - # Extract a list of subexpression nodes based - # on the contents of the subexprs class attribute. - nodes = [] - for name in self.subexprs: - item = getattr(self, name) - if item is not None: - if type(item) is list: - nodes.extend(item) - else: - nodes.append(item) - return nodes - - def result(self): - if self.is_temp: - #if not self.temp_code: - # pos = (os.path.basename(self.pos[0].get_description()),) + self.pos[1:] if self.pos else '(?)' - # raise RuntimeError("temp result name not set in %s at %r" % ( - # self.__class__.__name__, pos)) - return self.temp_code - else: - return self.calculate_result_code() - - def pythran_result(self, type_=None): - if is_pythran_supported_node_or_none(self): - return to_pythran(self) - - assert(type_ is not None) - return to_pythran(self, type_) - - def is_c_result_required(self): - """ - Subtypes may return False here if result temp allocation can be skipped. - """ - return True - - def result_as(self, type = None): - # Return the result code cast to the specified C type. - if (self.is_temp and self.type.is_pyobject and - type != py_object_type): - # Allocated temporaries are always PyObject *, which may not - # reflect the actual type (e.g. an extension type) - return typecast(type, py_object_type, self.result()) - return typecast(type, self.ctype(), self.result()) - - def py_result(self): - # Return the result code cast to PyObject *. - return self.result_as(py_object_type) - - def ctype(self): - # Return the native C type of the result (i.e. the - # C type of the result_code expression). - return self.result_ctype or self.type - - def get_constant_c_result_code(self): - # Return the constant value of this node as a result code - # string, or None if the node is not constant. This method - # can be called when the constant result code is required - # before the code generation phase. - # - # The return value is a string that can represent a simple C - # value, a constant C name or a constant C expression. If the - # node type depends on Python code, this must return None. - return None - - def calculate_constant_result(self): - # Calculate the constant compile time result value of this - # expression and store it in ``self.constant_result``. Does - # nothing by default, thus leaving ``self.constant_result`` - # unknown. If valid, the result can be an arbitrary Python - # value. - # - # This must only be called when it is assured that all - # sub-expressions have a valid constant_result value. The - # ConstantFolding transform will do this. - pass - - def has_constant_result(self): - return self.constant_result is not constant_value_not_set and \ - self.constant_result is not not_a_constant - - def compile_time_value(self, denv): - # Return value of compile-time expression, or report error. - error(self.pos, "Invalid compile-time expression") - - def compile_time_value_error(self, e): - error(self.pos, "Error in compile-time expression: %s: %s" % ( - e.__class__.__name__, e)) - - # ------------- Declaration Analysis ---------------- - - def analyse_target_declaration(self, env): - error(self.pos, "Cannot assign to or delete this") - - # ------------- Expression Analysis ---------------- - - def analyse_const_expression(self, env): - # Called during the analyse_declarations phase of a - # constant expression. Analyses the expression's type, - # checks whether it is a legal const expression, - # and determines its value. - node = self.analyse_types(env) - node.check_const() - return node - - def analyse_expressions(self, env): - # Convenience routine performing both the Type - # Analysis and Temp Allocation phases for a whole - # expression. - return self.analyse_types(env) - - def analyse_target_expression(self, env, rhs): - # Convenience routine performing both the Type - # Analysis and Temp Allocation phases for the LHS of - # an assignment. - return self.analyse_target_types(env) - - def analyse_boolean_expression(self, env): - # Analyse expression and coerce to a boolean. - node = self.analyse_types(env) - bool = node.coerce_to_boolean(env) - return bool - - def analyse_temp_boolean_expression(self, env): - # Analyse boolean expression and coerce result into - # a temporary. This is used when a branch is to be - # performed on the result and we won't have an - # opportunity to ensure disposal code is executed - # afterwards. By forcing the result into a temporary, - # we ensure that all disposal has been done by the - # time we get the result. - node = self.analyse_types(env) - return node.coerce_to_boolean(env).coerce_to_simple(env) - - # --------------- Type Inference ----------------- - - def type_dependencies(self, env): - # Returns the list of entries whose types must be determined - # before the type of self can be inferred. - if hasattr(self, 'type') and self.type is not None: - return () - return sum([node.type_dependencies(env) for node in self.subexpr_nodes()], ()) - - def infer_type(self, env): - # Attempt to deduce the type of self. - # Differs from analyse_types as it avoids unnecessary - # analysis of subexpressions, but can assume everything - # in self.type_dependencies() has been resolved. - if hasattr(self, 'type') and self.type is not None: - return self.type - elif hasattr(self, 'entry') and self.entry is not None: - return self.entry.type - else: - self.not_implemented("infer_type") - - def nonlocally_immutable(self): - # Returns whether this variable is a safe reference, i.e. - # can't be modified as part of globals or closures. - return self.is_literal or self.is_temp or self.type.is_array or self.type.is_cfunction - - def inferable_item_node(self, index=0): - """ - Return a node that represents the (type) result of an indexing operation, - e.g. for tuple unpacking or iteration. - """ - return IndexNode(self.pos, base=self, index=IntNode( - self.pos, value=str(index), constant_result=index, type=PyrexTypes.c_py_ssize_t_type)) - - # --------------- Type Analysis ------------------ - - def analyse_as_module(self, env): - # If this node can be interpreted as a reference to a - # cimported module, return its scope, else None. - return None - - def analyse_as_type(self, env): - # If this node can be interpreted as a reference to a - # type, return that type, else None. - return None - - def analyse_as_extension_type(self, env): - # If this node can be interpreted as a reference to an - # extension type or builtin type, return its type, else None. - return None - - def analyse_types(self, env): - self.not_implemented("analyse_types") - - def analyse_target_types(self, env): - return self.analyse_types(env) - - def nogil_check(self, env): - # By default, any expression based on Python objects is - # prevented in nogil environments. Subtypes must override - # this if they can work without the GIL. - if self.type and self.type.is_pyobject: - self.gil_error() - - def gil_assignment_check(self, env): - if env.nogil and self.type.is_pyobject: - error(self.pos, "Assignment of Python object not allowed without gil") - - def check_const(self): - self.not_const() - return False - - def not_const(self): - error(self.pos, "Not allowed in a constant expression") - - def check_const_addr(self): - self.addr_not_const() - return False - - def addr_not_const(self): - error(self.pos, "Address is not constant") - - # ----------------- Result Allocation ----------------- - - def result_in_temp(self): - # Return true if result is in a temporary owned by - # this node or one of its subexpressions. Overridden - # by certain nodes which can share the result of - # a subnode. - return self.is_temp - - def target_code(self): - # Return code fragment for use as LHS of a C assignment. - return self.calculate_result_code() - - def calculate_result_code(self): - self.not_implemented("calculate_result_code") - -# def release_target_temp(self, env): -# # Release temporaries used by LHS of an assignment. -# self.release_subexpr_temps(env) - - def allocate_temp_result(self, code): - if self.temp_code: - raise RuntimeError("Temp allocated multiple times in %r: %r" % (self.__class__.__name__, self.pos)) - type = self.type - if not type.is_void: - if type.is_pyobject: - type = PyrexTypes.py_object_type - elif not (self.result_is_used or type.is_memoryviewslice or self.is_c_result_required()): - self.temp_code = None - return - self.temp_code = code.funcstate.allocate_temp( - type, manage_ref=self.use_managed_ref) - else: - self.temp_code = None - - def release_temp_result(self, code): - if not self.temp_code: - if not self.result_is_used: - # not used anyway, so ignore if not set up - return - pos = (os.path.basename(self.pos[0].get_description()),) + self.pos[1:] if self.pos else '(?)' - if self.old_temp: - raise RuntimeError("temp %s released multiple times in %s at %r" % ( - self.old_temp, self.__class__.__name__, pos)) - else: - raise RuntimeError("no temp, but release requested in %s at %r" % ( - self.__class__.__name__, pos)) - code.funcstate.release_temp(self.temp_code) - self.old_temp = self.temp_code - self.temp_code = None - - # ---------------- Code Generation ----------------- - - def make_owned_reference(self, code): - """ - If result is a pyobject, make sure we own a reference to it. - If the result is in a temp, it is already a new reference. - """ - if self.type.is_pyobject and not self.result_in_temp(): - code.put_incref(self.result(), self.ctype()) - - def make_owned_memoryviewslice(self, code): - """ - Make sure we own the reference to this memoryview slice. - """ - if not self.result_in_temp(): - code.put_incref_memoryviewslice(self.result(), - have_gil=self.in_nogil_context) - - def generate_evaluation_code(self, code): - # Generate code to evaluate this node and - # its sub-expressions, and dispose of any - # temporary results of its sub-expressions. - self.generate_subexpr_evaluation_code(code) - - code.mark_pos(self.pos) - if self.is_temp: - self.allocate_temp_result(code) - - self.generate_result_code(code) - if self.is_temp and not (self.type.is_string or self.type.is_pyunicode_ptr): - # If we are temp we do not need to wait until this node is disposed - # before disposing children. - self.generate_subexpr_disposal_code(code) - self.free_subexpr_temps(code) - - def generate_subexpr_evaluation_code(self, code): - for node in self.subexpr_nodes(): - node.generate_evaluation_code(code) - - def generate_result_code(self, code): - self.not_implemented("generate_result_code") - - def generate_disposal_code(self, code): - if self.is_temp: - if self.type.is_string or self.type.is_pyunicode_ptr: - # postponed from self.generate_evaluation_code() - self.generate_subexpr_disposal_code(code) - self.free_subexpr_temps(code) - if self.result(): - if self.type.is_pyobject: - code.put_decref_clear(self.result(), self.ctype()) - elif self.type.is_memoryviewslice: - code.put_xdecref_memoryviewslice( - self.result(), have_gil=not self.in_nogil_context) - code.putln("%s.memview = NULL;" % self.result()) - code.putln("%s.data = NULL;" % self.result()) - else: - # Already done if self.is_temp - self.generate_subexpr_disposal_code(code) - - def generate_subexpr_disposal_code(self, code): - # Generate code to dispose of temporary results - # of all sub-expressions. - for node in self.subexpr_nodes(): - node.generate_disposal_code(code) - - def generate_post_assignment_code(self, code): - if self.is_temp: - if self.type.is_string or self.type.is_pyunicode_ptr: - # postponed from self.generate_evaluation_code() - self.generate_subexpr_disposal_code(code) - self.free_subexpr_temps(code) - elif self.type.is_pyobject: - code.putln("%s = 0;" % self.result()) - elif self.type.is_memoryviewslice: - code.putln("%s.memview = NULL;" % self.result()) - code.putln("%s.data = NULL;" % self.result()) - else: - self.generate_subexpr_disposal_code(code) - - def generate_assignment_code(self, rhs, code, overloaded_assignment=False, - exception_check=None, exception_value=None): - # Stub method for nodes which are not legal as - # the LHS of an assignment. An error will have - # been reported earlier. - pass - - def generate_deletion_code(self, code, ignore_nonexisting=False): - # Stub method for nodes that are not legal as - # the argument of a del statement. An error - # will have been reported earlier. - pass - - def free_temps(self, code): - if self.is_temp: - if not self.type.is_void: - self.release_temp_result(code) - else: - self.free_subexpr_temps(code) - - def free_subexpr_temps(self, code): - for sub in self.subexpr_nodes(): - sub.free_temps(code) - - def generate_function_definitions(self, env, code): - pass - - # ---------------- Annotation --------------------- - - def annotate(self, code): - for node in self.subexpr_nodes(): - node.annotate(code) - - # ----------------- Coercion ---------------------- - - def coerce_to(self, dst_type, env): - # Coerce the result so that it can be assigned to - # something of type dst_type. If processing is necessary, - # wraps this node in a coercion node and returns that. - # Otherwise, returns this node unchanged. - # - # This method is called during the analyse_expressions - # phase of the src_node's processing. - # - # Note that subclasses that override this (especially - # ConstNodes) must not (re-)set their own .type attribute - # here. Since expression nodes may turn up in different - # places in the tree (e.g. inside of CloneNodes in cascaded - # assignments), this method must return a new node instance - # if it changes the type. - # - src = self - src_type = self.type - - if self.check_for_coercion_error(dst_type, env): - return self - - used_as_reference = dst_type.is_reference - if used_as_reference and not src_type.is_reference: - dst_type = dst_type.ref_base_type - - if src_type.is_const: - src_type = src_type.const_base_type - - if src_type.is_fused or dst_type.is_fused: - # See if we are coercing a fused function to a pointer to a - # specialized function - if (src_type.is_cfunction and not dst_type.is_fused and - dst_type.is_ptr and dst_type.base_type.is_cfunction): - - dst_type = dst_type.base_type - - for signature in src_type.get_all_specialized_function_types(): - if signature.same_as(dst_type): - src.type = signature - src.entry = src.type.entry - src.entry.used = True - return self - - if src_type.is_fused: - error(self.pos, "Type is not specialized") - elif src_type.is_null_ptr and dst_type.is_ptr: - # NULL can be implicitly cast to any pointer type - return self - else: - error(self.pos, "Cannot coerce to a type that is not specialized") - - self.type = error_type - return self - - if self.coercion_type is not None: - # This is purely for error checking purposes! - node = NameNode(self.pos, name='', type=self.coercion_type) - node.coerce_to(dst_type, env) - - if dst_type.is_memoryviewslice: - from . import MemoryView - if not src.type.is_memoryviewslice: - if src.type.is_pyobject: - src = CoerceToMemViewSliceNode(src, dst_type, env) - elif src.type.is_array: - src = CythonArrayNode.from_carray(src, env).coerce_to(dst_type, env) - elif not src_type.is_error: - error(self.pos, - "Cannot convert '%s' to memoryviewslice" % (src_type,)) - else: - if src.type.writable_needed: - dst_type.writable_needed = True - if not src.type.conforms_to(dst_type, broadcast=self.is_memview_broadcast, - copying=self.is_memview_copy_assignment): - if src.type.dtype.same_as(dst_type.dtype): - msg = "Memoryview '%s' not conformable to memoryview '%s'." - tup = src.type, dst_type - else: - msg = "Different base types for memoryviews (%s, %s)" - tup = src.type.dtype, dst_type.dtype - - error(self.pos, msg % tup) - - elif dst_type.is_pyobject: - if not src.type.is_pyobject: - if dst_type is bytes_type and src.type.is_int: - src = CoerceIntToBytesNode(src, env) - else: - src = CoerceToPyTypeNode(src, env, type=dst_type) - if not src.type.subtype_of(dst_type): - if src.constant_result is not None: - src = PyTypeTestNode(src, dst_type, env) - elif is_pythran_expr(dst_type) and is_pythran_supported_type(src.type): - # We let the compiler decide whether this is valid - return src - elif is_pythran_expr(src.type): - if is_pythran_supported_type(dst_type): - # Match the case were a pythran expr is assigned to a value, or vice versa. - # We let the C++ compiler decide whether this is valid or not! - return src - # Else, we need to convert the Pythran expression to a Python object - src = CoerceToPyTypeNode(src, env, type=dst_type) - elif src.type.is_pyobject: - if used_as_reference and dst_type.is_cpp_class: - warning( - self.pos, - "Cannot pass Python object as C++ data structure reference (%s &), will pass by copy." % dst_type) - src = CoerceFromPyTypeNode(dst_type, src, env) - elif (dst_type.is_complex - and src_type != dst_type - and dst_type.assignable_from(src_type)): - src = CoerceToComplexNode(src, dst_type, env) - else: # neither src nor dst are py types - # Added the string comparison, since for c types that - # is enough, but Cython gets confused when the types are - # in different pxi files. - # TODO: Remove this hack and require shared declarations. - if not (src.type == dst_type or str(src.type) == str(dst_type) or dst_type.assignable_from(src_type)): - self.fail_assignment(dst_type) - return src - - def fail_assignment(self, dst_type): - error(self.pos, "Cannot assign type '%s' to '%s'" % (self.type, dst_type)) - - def check_for_coercion_error(self, dst_type, env, fail=False, default=None): - if fail and not default: - default = "Cannot assign type '%(FROM)s' to '%(TO)s'" - message = find_coercion_error((self.type, dst_type), default, env) - if message is not None: - error(self.pos, message % {'FROM': self.type, 'TO': dst_type}) - return True - if fail: - self.fail_assignment(dst_type) - return True - return False - - def coerce_to_pyobject(self, env): - return self.coerce_to(PyrexTypes.py_object_type, env) - - def coerce_to_boolean(self, env): - # Coerce result to something acceptable as - # a boolean value. - - # if it's constant, calculate the result now - if self.has_constant_result(): - bool_value = bool(self.constant_result) - return BoolNode(self.pos, value=bool_value, - constant_result=bool_value) - - type = self.type - if type.is_enum or type.is_error: - return self - elif type.is_pyobject or type.is_int or type.is_ptr or type.is_float: - return CoerceToBooleanNode(self, env) - elif type.is_cpp_class and type.scope and type.scope.lookup("operator bool"): - return SimpleCallNode( - self.pos, - function=AttributeNode( - self.pos, obj=self, attribute=StringEncoding.EncodedString('operator bool')), - args=[]).analyse_types(env) - elif type.is_ctuple: - bool_value = len(type.components) == 0 - return BoolNode(self.pos, value=bool_value, - constant_result=bool_value) - else: - error(self.pos, "Type '%s' not acceptable as a boolean" % type) - return self - - def coerce_to_integer(self, env): - # If not already some C integer type, coerce to longint. - if self.type.is_int: - return self - else: - return self.coerce_to(PyrexTypes.c_long_type, env) - - def coerce_to_temp(self, env): - # Ensure that the result is in a temporary. - if self.result_in_temp(): - return self - else: - return CoerceToTempNode(self, env) - - def coerce_to_simple(self, env): - # Ensure that the result is simple (see is_simple). - if self.is_simple(): - return self - else: - return self.coerce_to_temp(env) - - def is_simple(self): - # A node is simple if its result is something that can - # be referred to without performing any operations, e.g. - # a constant, local var, C global var, struct member - # reference, or temporary. - return self.result_in_temp() - - def may_be_none(self): - if self.type and not (self.type.is_pyobject or - self.type.is_memoryviewslice): - return False - if self.has_constant_result(): - return self.constant_result is not None - return True - - def as_cython_attribute(self): - return None - - def as_none_safe_node(self, message, error="PyExc_TypeError", format_args=()): - # Wraps the node in a NoneCheckNode if it is not known to be - # not-None (e.g. because it is a Python literal). - if self.may_be_none(): - return NoneCheckNode(self, error, message, format_args) - else: - return self - - @classmethod - def from_node(cls, node, **kwargs): - """Instantiate this node class from another node, properly - copying over all attributes that one would forget otherwise. - """ - attributes = "cf_state cf_maybe_null cf_is_null constant_result".split() - for attr_name in attributes: - if attr_name in kwargs: - continue - try: - value = getattr(node, attr_name) - except AttributeError: - pass - else: - kwargs[attr_name] = value - return cls(node.pos, **kwargs) - - -class AtomicExprNode(ExprNode): - # Abstract base class for expression nodes which have - # no sub-expressions. - - subexprs = [] - - # Override to optimize -- we know we have no children - def generate_subexpr_evaluation_code(self, code): - pass - def generate_subexpr_disposal_code(self, code): - pass - -class PyConstNode(AtomicExprNode): - # Abstract base class for constant Python values. - - is_literal = 1 - type = py_object_type - - def is_simple(self): - return 1 - - def may_be_none(self): - return False - - def analyse_types(self, env): - return self - - def calculate_result_code(self): - return self.value - - def generate_result_code(self, code): - pass - - -class NoneNode(PyConstNode): - # The constant value None - - is_none = 1 - value = "Py_None" - - constant_result = None - - nogil_check = None - - def compile_time_value(self, denv): - return None - - def may_be_none(self): - return True - - def coerce_to(self, dst_type, env): - if not (dst_type.is_pyobject or dst_type.is_memoryviewslice or dst_type.is_error): - # Catch this error early and loudly. - error(self.pos, "Cannot assign None to %s" % dst_type) - return super(NoneNode, self).coerce_to(dst_type, env) - - -class EllipsisNode(PyConstNode): - # '...' in a subscript list. - - value = "Py_Ellipsis" - - constant_result = Ellipsis - - def compile_time_value(self, denv): - return Ellipsis - - -class ConstNode(AtomicExprNode): - # Abstract base type for literal constant nodes. - # - # value string C code fragment - - is_literal = 1 - nogil_check = None - - def is_simple(self): - return 1 - - def nonlocally_immutable(self): - return 1 - - def may_be_none(self): - return False - - def analyse_types(self, env): - return self # Types are held in class variables - - def check_const(self): - return True - - def get_constant_c_result_code(self): - return self.calculate_result_code() - - def calculate_result_code(self): - return str(self.value) - - def generate_result_code(self, code): - pass - - -class BoolNode(ConstNode): - type = PyrexTypes.c_bint_type - # The constant value True or False - - def calculate_constant_result(self): - self.constant_result = self.value - - def compile_time_value(self, denv): - return self.value - - def calculate_result_code(self): - if self.type.is_pyobject: - return self.value and 'Py_True' or 'Py_False' - else: - return str(int(self.value)) - - def coerce_to(self, dst_type, env): - if dst_type == self.type: - return self - if dst_type is py_object_type and self.type is Builtin.bool_type: - return self - if dst_type.is_pyobject and self.type.is_int: - return BoolNode( - self.pos, value=self.value, - constant_result=self.constant_result, - type=Builtin.bool_type) - if dst_type.is_int and self.type.is_pyobject: - return BoolNode( - self.pos, value=self.value, - constant_result=self.constant_result, - type=PyrexTypes.c_bint_type) - return ConstNode.coerce_to(self, dst_type, env) - - -class NullNode(ConstNode): - type = PyrexTypes.c_null_ptr_type - value = "NULL" - constant_result = 0 - - def get_constant_c_result_code(self): - return self.value - - -class CharNode(ConstNode): - type = PyrexTypes.c_char_type - - def calculate_constant_result(self): - self.constant_result = ord(self.value) - - def compile_time_value(self, denv): - return ord(self.value) - - def calculate_result_code(self): - return "'%s'" % StringEncoding.escape_char(self.value) - - -class IntNode(ConstNode): - - # unsigned "" or "U" - # longness "" or "L" or "LL" - # is_c_literal True/False/None creator considers this a C integer literal - - unsigned = "" - longness = "" - is_c_literal = None # unknown - - def __init__(self, pos, **kwds): - ExprNode.__init__(self, pos, **kwds) - if 'type' not in kwds: - self.type = self.find_suitable_type_for_value() - - def find_suitable_type_for_value(self): - if self.constant_result is constant_value_not_set: - try: - self.calculate_constant_result() - except ValueError: - pass - # we ignore 'is_c_literal = True' and instead map signed 32bit - # integers as C long values - if self.is_c_literal or \ - not self.has_constant_result() or \ - self.unsigned or self.longness == 'LL': - # clearly a C literal - rank = (self.longness == 'LL') and 2 or 1 - suitable_type = PyrexTypes.modifiers_and_name_to_type[not self.unsigned, rank, "int"] - if self.type: - suitable_type = PyrexTypes.widest_numeric_type(suitable_type, self.type) - else: - # C literal or Python literal - split at 32bit boundary - if -2**31 <= self.constant_result < 2**31: - if self.type and self.type.is_int: - suitable_type = self.type - else: - suitable_type = PyrexTypes.c_long_type - else: - suitable_type = PyrexTypes.py_object_type - return suitable_type - - def coerce_to(self, dst_type, env): - if self.type is dst_type: - return self - elif dst_type.is_float: - if self.has_constant_result(): - return FloatNode(self.pos, value='%d.0' % int(self.constant_result), type=dst_type, - constant_result=float(self.constant_result)) - else: - return FloatNode(self.pos, value=self.value, type=dst_type, - constant_result=not_a_constant) - if dst_type.is_numeric and not dst_type.is_complex: - node = IntNode(self.pos, value=self.value, constant_result=self.constant_result, - type=dst_type, is_c_literal=True, - unsigned=self.unsigned, longness=self.longness) - return node - elif dst_type.is_pyobject: - node = IntNode(self.pos, value=self.value, constant_result=self.constant_result, - type=PyrexTypes.py_object_type, is_c_literal=False, - unsigned=self.unsigned, longness=self.longness) - else: - # FIXME: not setting the type here to keep it working with - # complex numbers. Should they be special cased? - node = IntNode(self.pos, value=self.value, constant_result=self.constant_result, - unsigned=self.unsigned, longness=self.longness) - # We still need to perform normal coerce_to processing on the - # result, because we might be coercing to an extension type, - # in which case a type test node will be needed. - return ConstNode.coerce_to(node, dst_type, env) - - def coerce_to_boolean(self, env): - return IntNode( - self.pos, value=self.value, - constant_result=self.constant_result, - type=PyrexTypes.c_bint_type, - unsigned=self.unsigned, longness=self.longness) - - def generate_evaluation_code(self, code): - if self.type.is_pyobject: - # pre-allocate a Python version of the number - plain_integer_string = str(Utils.str_to_number(self.value)) - self.result_code = code.get_py_int(plain_integer_string, self.longness) - else: - self.result_code = self.get_constant_c_result_code() - - def get_constant_c_result_code(self): - unsigned, longness = self.unsigned, self.longness - literal = self.value_as_c_integer_string() - if not (unsigned or longness) and self.type.is_int and literal[0] == '-' and literal[1] != '0': - # negative decimal literal => guess longness from type to prevent wrap-around - if self.type.rank >= PyrexTypes.c_longlong_type.rank: - longness = 'LL' - elif self.type.rank >= PyrexTypes.c_long_type.rank: - longness = 'L' - return literal + unsigned + longness - - def value_as_c_integer_string(self): - value = self.value - if len(value) <= 2: - # too short to go wrong (and simplifies code below) - return value - neg_sign = '' - if value[0] == '-': - neg_sign = '-' - value = value[1:] - if value[0] == '0': - literal_type = value[1] # 0'o' - 0'b' - 0'x' - # 0x123 hex literals and 0123 octal literals work nicely in C - # but C-incompatible Py3 oct/bin notations need conversion - if neg_sign and literal_type in 'oOxX0123456789' and value[2:].isdigit(): - # negative hex/octal literal => prevent C compiler from using - # unsigned integer types by converting to decimal (see C standard 6.4.4.1) - value = str(Utils.str_to_number(value)) - elif literal_type in 'oO': - value = '0' + value[2:] # '0o123' => '0123' - elif literal_type in 'bB': - value = str(int(value[2:], 2)) - elif value.isdigit() and not self.unsigned and not self.longness: - if not neg_sign: - # C compilers do not consider unsigned types for decimal literals, - # but they do for hex (see C standard 6.4.4.1) - value = '0x%X' % int(value) - return neg_sign + value - - def calculate_result_code(self): - return self.result_code - - def calculate_constant_result(self): - self.constant_result = Utils.str_to_number(self.value) - - def compile_time_value(self, denv): - return Utils.str_to_number(self.value) - -class FloatNode(ConstNode): - type = PyrexTypes.c_double_type - - def calculate_constant_result(self): - self.constant_result = float(self.value) - - def compile_time_value(self, denv): - return float(self.value) - - def coerce_to(self, dst_type, env): - if dst_type.is_pyobject and self.type.is_float: - return FloatNode( - self.pos, value=self.value, - constant_result=self.constant_result, - type=Builtin.float_type) - if dst_type.is_float and self.type.is_pyobject: - return FloatNode( - self.pos, value=self.value, - constant_result=self.constant_result, - type=dst_type) - return ConstNode.coerce_to(self, dst_type, env) - - def calculate_result_code(self): - return self.result_code - - def get_constant_c_result_code(self): - strval = self.value - assert isinstance(strval, basestring) - cmpval = repr(float(strval)) - if cmpval == 'nan': - return "(Py_HUGE_VAL * 0)" - elif cmpval == 'inf': - return "Py_HUGE_VAL" - elif cmpval == '-inf': - return "(-Py_HUGE_VAL)" - else: - return strval - - def generate_evaluation_code(self, code): - c_value = self.get_constant_c_result_code() - if self.type.is_pyobject: - self.result_code = code.get_py_float(self.value, c_value) - else: - self.result_code = c_value - - -def _analyse_name_as_type(name, pos, env): - type = PyrexTypes.parse_basic_type(name) - if type is not None: - return type - - global_entry = env.global_scope().lookup(name) - if global_entry and global_entry.type and ( - global_entry.type.is_extension_type - or global_entry.type.is_struct_or_union - or global_entry.type.is_builtin_type - or global_entry.type.is_cpp_class): - return global_entry.type - - from .TreeFragment import TreeFragment - with local_errors(ignore=True): - pos = (pos[0], pos[1], pos[2]-7) - try: - declaration = TreeFragment(u"sizeof(%s)" % name, name=pos[0].filename, initial_pos=pos) - except CompileError: - pass - else: - sizeof_node = declaration.root.stats[0].expr - if isinstance(sizeof_node, SizeofTypeNode): - sizeof_node = sizeof_node.analyse_types(env) - if isinstance(sizeof_node, SizeofTypeNode): - return sizeof_node.arg_type - return None - - -class BytesNode(ConstNode): - # A char* or bytes literal - # - # value BytesLiteral - - is_string_literal = True - # start off as Python 'bytes' to support len() in O(1) - type = bytes_type - - def calculate_constant_result(self): - self.constant_result = self.value - - def as_sliced_node(self, start, stop, step=None): - value = StringEncoding.bytes_literal(self.value[start:stop:step], self.value.encoding) - return BytesNode(self.pos, value=value, constant_result=value) - - def compile_time_value(self, denv): - return self.value.byteencode() - - def analyse_as_type(self, env): - return _analyse_name_as_type(self.value.decode('ISO8859-1'), self.pos, env) - - def can_coerce_to_char_literal(self): - return len(self.value) == 1 - - def coerce_to_boolean(self, env): - # This is special because testing a C char* for truth directly - # would yield the wrong result. - bool_value = bool(self.value) - return BoolNode(self.pos, value=bool_value, constant_result=bool_value) - - def coerce_to(self, dst_type, env): - if self.type == dst_type: - return self - if dst_type.is_int: - if not self.can_coerce_to_char_literal(): - error(self.pos, "Only single-character string literals can be coerced into ints.") - return self - if dst_type.is_unicode_char: - error(self.pos, "Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead.") - return self - return CharNode(self.pos, value=self.value, - constant_result=ord(self.value)) - - node = BytesNode(self.pos, value=self.value, constant_result=self.constant_result) - if dst_type.is_pyobject: - if dst_type in (py_object_type, Builtin.bytes_type): - node.type = Builtin.bytes_type - else: - self.check_for_coercion_error(dst_type, env, fail=True) - return node - elif dst_type in (PyrexTypes.c_char_ptr_type, PyrexTypes.c_const_char_ptr_type): - node.type = dst_type - return node - elif dst_type in (PyrexTypes.c_uchar_ptr_type, PyrexTypes.c_const_uchar_ptr_type, PyrexTypes.c_void_ptr_type): - node.type = (PyrexTypes.c_const_char_ptr_type if dst_type == PyrexTypes.c_const_uchar_ptr_type - else PyrexTypes.c_char_ptr_type) - return CastNode(node, dst_type) - elif dst_type.assignable_from(PyrexTypes.c_char_ptr_type): - # Exclude the case of passing a C string literal into a non-const C++ string. - if not dst_type.is_cpp_class or dst_type.is_const: - node.type = dst_type - return node - - # We still need to perform normal coerce_to processing on the - # result, because we might be coercing to an extension type, - # in which case a type test node will be needed. - return ConstNode.coerce_to(node, dst_type, env) - - def generate_evaluation_code(self, code): - if self.type.is_pyobject: - result = code.get_py_string_const(self.value) - elif self.type.is_const: - result = code.get_string_const(self.value) - else: - # not const => use plain C string literal and cast to mutable type - literal = self.value.as_c_string_literal() - # C++ may require a cast - result = typecast(self.type, PyrexTypes.c_void_ptr_type, literal) - self.result_code = result - - def get_constant_c_result_code(self): - return None # FIXME - - def calculate_result_code(self): - return self.result_code - - -class UnicodeNode(ConstNode): - # A Py_UNICODE* or unicode literal - # - # value EncodedString - # bytes_value BytesLiteral the literal parsed as bytes string - # ('-3' unicode literals only) - - is_string_literal = True - bytes_value = None - type = unicode_type - - def calculate_constant_result(self): - self.constant_result = self.value - - def analyse_as_type(self, env): - return _analyse_name_as_type(self.value, self.pos, env) - - def as_sliced_node(self, start, stop, step=None): - if StringEncoding.string_contains_surrogates(self.value[:stop]): - # this is unsafe as it may give different results - # in different runtimes - return None - value = StringEncoding.EncodedString(self.value[start:stop:step]) - value.encoding = self.value.encoding - if self.bytes_value is not None: - bytes_value = StringEncoding.bytes_literal( - self.bytes_value[start:stop:step], self.bytes_value.encoding) - else: - bytes_value = None - return UnicodeNode( - self.pos, value=value, bytes_value=bytes_value, - constant_result=value) - - def coerce_to(self, dst_type, env): - if dst_type is self.type: - pass - elif dst_type.is_unicode_char: - if not self.can_coerce_to_char_literal(): - error(self.pos, - "Only single-character Unicode string literals or " - "surrogate pairs can be coerced into Py_UCS4/Py_UNICODE.") - return self - int_value = ord(self.value) - return IntNode(self.pos, type=dst_type, value=str(int_value), - constant_result=int_value) - elif not dst_type.is_pyobject: - if dst_type.is_string and self.bytes_value is not None: - # special case: '-3' enforced unicode literal used in a - # C char* context - return BytesNode(self.pos, value=self.bytes_value - ).coerce_to(dst_type, env) - if dst_type.is_pyunicode_ptr: - node = UnicodeNode(self.pos, value=self.value) - node.type = dst_type - return node - error(self.pos, - "Unicode literals do not support coercion to C types other " - "than Py_UNICODE/Py_UCS4 (for characters) or Py_UNICODE* " - "(for strings).") - elif dst_type not in (py_object_type, Builtin.basestring_type): - self.check_for_coercion_error(dst_type, env, fail=True) - return self - - def can_coerce_to_char_literal(self): - return len(self.value) == 1 - ## or (len(self.value) == 2 - ## and (0xD800 <= self.value[0] <= 0xDBFF) - ## and (0xDC00 <= self.value[1] <= 0xDFFF)) - - def coerce_to_boolean(self, env): - bool_value = bool(self.value) - return BoolNode(self.pos, value=bool_value, constant_result=bool_value) - - def contains_surrogates(self): - return StringEncoding.string_contains_surrogates(self.value) - - def generate_evaluation_code(self, code): - if self.type.is_pyobject: - # FIXME: this should go away entirely! - # Since string_contains_lone_surrogates() returns False for surrogate pairs in Py2/UCS2, - # Py2 can generate different code from Py3 here. Let's hope we get away with claiming that - # the processing of surrogate pairs in code was always ambiguous and lead to different results - # on P16/32bit Unicode platforms. - if StringEncoding.string_contains_lone_surrogates(self.value): - # lone (unpaired) surrogates are not really portable and cannot be - # decoded by the UTF-8 codec in Py3.3 - self.result_code = code.get_py_const(py_object_type, 'ustring') - data_cname = code.get_string_const( - StringEncoding.BytesLiteral(self.value.encode('unicode_escape'))) - const_code = code.get_cached_constants_writer(self.result_code) - if const_code is None: - return # already initialised - const_code.mark_pos(self.pos) - const_code.putln( - "%s = PyUnicode_DecodeUnicodeEscape(%s, sizeof(%s) - 1, NULL); %s" % ( - self.result_code, - data_cname, - data_cname, - const_code.error_goto_if_null(self.result_code, self.pos))) - const_code.put_error_if_neg( - self.pos, "__Pyx_PyUnicode_READY(%s)" % self.result_code) - else: - self.result_code = code.get_py_string_const(self.value) - else: - self.result_code = code.get_pyunicode_ptr_const(self.value) - - def calculate_result_code(self): - return self.result_code - - def compile_time_value(self, env): - return self.value - - -class StringNode(PyConstNode): - # A Python str object, i.e. a byte string in Python 2.x and a - # unicode string in Python 3.x - # - # value BytesLiteral (or EncodedString with ASCII content) - # unicode_value EncodedString or None - # is_identifier boolean - - type = str_type - is_string_literal = True - is_identifier = None - unicode_value = None - - def calculate_constant_result(self): - if self.unicode_value is not None: - # only the Unicode value is portable across Py2/3 - self.constant_result = self.unicode_value - - def analyse_as_type(self, env): - return _analyse_name_as_type(self.unicode_value or self.value.decode('ISO8859-1'), self.pos, env) - - def as_sliced_node(self, start, stop, step=None): - value = type(self.value)(self.value[start:stop:step]) - value.encoding = self.value.encoding - if self.unicode_value is not None: - if StringEncoding.string_contains_surrogates(self.unicode_value[:stop]): - # this is unsafe as it may give different results in different runtimes - return None - unicode_value = StringEncoding.EncodedString( - self.unicode_value[start:stop:step]) - else: - unicode_value = None - return StringNode( - self.pos, value=value, unicode_value=unicode_value, - constant_result=value, is_identifier=self.is_identifier) - - def coerce_to(self, dst_type, env): - if dst_type is not py_object_type and not str_type.subtype_of(dst_type): -# if dst_type is Builtin.bytes_type: -# # special case: bytes = 'str literal' -# return BytesNode(self.pos, value=self.value) - if not dst_type.is_pyobject: - return BytesNode(self.pos, value=self.value).coerce_to(dst_type, env) - if dst_type is not Builtin.basestring_type: - self.check_for_coercion_error(dst_type, env, fail=True) - return self - - def can_coerce_to_char_literal(self): - return not self.is_identifier and len(self.value) == 1 - - def generate_evaluation_code(self, code): - self.result_code = code.get_py_string_const( - self.value, identifier=self.is_identifier, is_str=True, - unicode_value=self.unicode_value) - - def get_constant_c_result_code(self): - return None - - def calculate_result_code(self): - return self.result_code - - def compile_time_value(self, env): - if self.value.is_unicode: - return self.value - if not IS_PYTHON3: - # use plain str/bytes object in Py2 - return self.value.byteencode() - # in Py3, always return a Unicode string - if self.unicode_value is not None: - return self.unicode_value - return self.value.decode('iso8859-1') - - -class IdentifierStringNode(StringNode): - # A special str value that represents an identifier (bytes in Py2, - # unicode in Py3). - is_identifier = True - - -class ImagNode(AtomicExprNode): - # Imaginary number literal - # - # value string imaginary part (float value) - - type = PyrexTypes.c_double_complex_type - - def calculate_constant_result(self): - self.constant_result = complex(0.0, float(self.value)) - - def compile_time_value(self, denv): - return complex(0.0, float(self.value)) - - def analyse_types(self, env): - self.type.create_declaration_utility_code(env) - return self - - def may_be_none(self): - return False - - def coerce_to(self, dst_type, env): - if self.type is dst_type: - return self - node = ImagNode(self.pos, value=self.value) - if dst_type.is_pyobject: - node.is_temp = 1 - node.type = Builtin.complex_type - # We still need to perform normal coerce_to processing on the - # result, because we might be coercing to an extension type, - # in which case a type test node will be needed. - return AtomicExprNode.coerce_to(node, dst_type, env) - - gil_message = "Constructing complex number" - - def calculate_result_code(self): - if self.type.is_pyobject: - return self.result() - else: - return "%s(0, %r)" % (self.type.from_parts, float(self.value)) - - def generate_result_code(self, code): - if self.type.is_pyobject: - code.putln( - "%s = PyComplex_FromDoubles(0.0, %r); %s" % ( - self.result(), - float(self.value), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class NewExprNode(AtomicExprNode): - - # C++ new statement - # - # cppclass node c++ class to create - - type = None - - def infer_type(self, env): - type = self.cppclass.analyse_as_type(env) - if type is None or not type.is_cpp_class: - error(self.pos, "new operator can only be applied to a C++ class") - self.type = error_type - return - self.cpp_check(env) - constructor = type.get_constructor(self.pos) - self.class_type = type - self.entry = constructor - self.type = constructor.type - return self.type - - def analyse_types(self, env): - if self.type is None: - self.infer_type(env) - return self - - def may_be_none(self): - return False - - def generate_result_code(self, code): - pass - - def calculate_result_code(self): - return "new " + self.class_type.empty_declaration_code() - - -class NameNode(AtomicExprNode): - # Reference to a local or global variable name. - # - # name string Python name of the variable - # entry Entry Symbol table entry - # type_entry Entry For extension type names, the original type entry - # cf_is_null boolean Is uninitialized before this node - # cf_maybe_null boolean Maybe uninitialized before this node - # allow_null boolean Don't raise UnboundLocalError - # nogil boolean Whether it is used in a nogil context - - is_name = True - is_cython_module = False - cython_attribute = None - lhs_of_first_assignment = False # TODO: remove me - is_used_as_rvalue = 0 - entry = None - type_entry = None - cf_maybe_null = True - cf_is_null = False - allow_null = False - nogil = False - inferred_type = None - - def as_cython_attribute(self): - return self.cython_attribute - - def type_dependencies(self, env): - if self.entry is None: - self.entry = env.lookup(self.name) - if self.entry is not None and self.entry.type.is_unspecified: - return (self,) - else: - return () - - def infer_type(self, env): - if self.entry is None: - self.entry = env.lookup(self.name) - if self.entry is None or self.entry.type is unspecified_type: - if self.inferred_type is not None: - return self.inferred_type - return py_object_type - elif (self.entry.type.is_extension_type or self.entry.type.is_builtin_type) and \ - self.name == self.entry.type.name: - # Unfortunately the type attribute of type objects - # is used for the pointer to the type they represent. - return type_type - elif self.entry.type.is_cfunction: - if self.entry.scope.is_builtin_scope: - # special case: optimised builtin functions must be treated as Python objects - return py_object_type - else: - # special case: referring to a C function must return its pointer - return PyrexTypes.CPtrType(self.entry.type) - else: - # If entry is inferred as pyobject it's safe to use local - # NameNode's inferred_type. - if self.entry.type.is_pyobject and self.inferred_type: - # Overflow may happen if integer - if not (self.inferred_type.is_int and self.entry.might_overflow): - return self.inferred_type - return self.entry.type - - def compile_time_value(self, denv): - try: - return denv.lookup(self.name) - except KeyError: - error(self.pos, "Compile-time name '%s' not defined" % self.name) - - def get_constant_c_result_code(self): - if not self.entry or self.entry.type.is_pyobject: - return None - return self.entry.cname - - def coerce_to(self, dst_type, env): - # If coercing to a generic pyobject and this is a builtin - # C function with a Python equivalent, manufacture a NameNode - # referring to the Python builtin. - #print "NameNode.coerce_to:", self.name, dst_type ### - if dst_type is py_object_type: - entry = self.entry - if entry and entry.is_cfunction: - var_entry = entry.as_variable - if var_entry: - if var_entry.is_builtin and var_entry.is_const: - var_entry = env.declare_builtin(var_entry.name, self.pos) - node = NameNode(self.pos, name = self.name) - node.entry = var_entry - node.analyse_rvalue_entry(env) - return node - - return super(NameNode, self).coerce_to(dst_type, env) - - def declare_from_annotation(self, env, as_target=False): - """Implements PEP 526 annotation typing in a fairly relaxed way. - - Annotations are ignored for global variables, Python class attributes and already declared variables. - String literals are allowed and ignored. - The ambiguous Python types 'int' and 'long' are ignored and the 'cython.int' form must be used instead. - """ - if not env.directives['annotation_typing']: - return - if env.is_module_scope or env.is_py_class_scope: - # annotations never create global cdef names and Python classes don't support them anyway - return - name = self.name - if self.entry or env.lookup_here(name) is not None: - # already declared => ignore annotation - return - - annotation = self.annotation - if annotation.is_string_literal: - # name: "description" => not a type, but still a declared variable or attribute - atype = None - else: - _, atype = analyse_type_annotation(annotation, env) - if atype is None: - atype = unspecified_type if as_target and env.directives['infer_types'] != False else py_object_type - self.entry = env.declare_var(name, atype, self.pos, is_cdef=not as_target) - self.entry.annotation = annotation - - def analyse_as_module(self, env): - # Try to interpret this as a reference to a cimported module. - # Returns the module scope, or None. - entry = self.entry - if not entry: - entry = env.lookup(self.name) - if entry and entry.as_module: - return entry.as_module - return None - - def analyse_as_type(self, env): - if self.cython_attribute: - type = PyrexTypes.parse_basic_type(self.cython_attribute) - else: - type = PyrexTypes.parse_basic_type(self.name) - if type: - return type - entry = self.entry - if not entry: - entry = env.lookup(self.name) - if entry and entry.is_type: - return entry.type - else: - return None - - def analyse_as_extension_type(self, env): - # Try to interpret this as a reference to an extension type. - # Returns the extension type, or None. - entry = self.entry - if not entry: - entry = env.lookup(self.name) - if entry and entry.is_type: - if entry.type.is_extension_type or entry.type.is_builtin_type: - return entry.type - return None - - def analyse_target_declaration(self, env): - if not self.entry: - self.entry = env.lookup_here(self.name) - if not self.entry and self.annotation is not None: - # name : type = ... - self.declare_from_annotation(env, as_target=True) - if not self.entry: - if env.directives['warn.undeclared']: - warning(self.pos, "implicit declaration of '%s'" % self.name, 1) - if env.directives['infer_types'] != False: - type = unspecified_type - else: - type = py_object_type - self.entry = env.declare_var(self.name, type, self.pos) - if self.entry.is_declared_generic: - self.result_ctype = py_object_type - if self.entry.as_module: - # cimported modules namespace can shadow actual variables - self.entry.is_variable = 1 - - def analyse_types(self, env): - self.initialized_check = env.directives['initializedcheck'] - entry = self.entry - if entry is None: - entry = env.lookup(self.name) - if not entry: - entry = env.declare_builtin(self.name, self.pos) - if entry and entry.is_builtin and entry.is_const: - self.is_literal = True - if not entry: - self.type = PyrexTypes.error_type - return self - self.entry = entry - entry.used = 1 - if entry.type.is_buffer: - from . import Buffer - Buffer.used_buffer_aux_vars(entry) - self.analyse_rvalue_entry(env) - return self - - def analyse_target_types(self, env): - self.analyse_entry(env, is_target=True) - - entry = self.entry - if entry.is_cfunction and entry.as_variable: - # FIXME: unify "is_overridable" flags below - if (entry.is_overridable or entry.type.is_overridable) or not self.is_lvalue() and entry.fused_cfunction: - # We need this for assigning to cpdef names and for the fused 'def' TreeFragment - entry = self.entry = entry.as_variable - self.type = entry.type - - if self.type.is_const: - error(self.pos, "Assignment to const '%s'" % self.name) - if self.type.is_reference: - error(self.pos, "Assignment to reference '%s'" % self.name) - if not self.is_lvalue(): - error(self.pos, "Assignment to non-lvalue '%s'" % self.name) - self.type = PyrexTypes.error_type - entry.used = 1 - if entry.type.is_buffer: - from . import Buffer - Buffer.used_buffer_aux_vars(entry) - return self - - def analyse_rvalue_entry(self, env): - #print "NameNode.analyse_rvalue_entry:", self.name ### - #print "Entry:", self.entry.__dict__ ### - self.analyse_entry(env) - entry = self.entry - - if entry.is_declared_generic: - self.result_ctype = py_object_type - - if entry.is_pyglobal or entry.is_builtin: - if entry.is_builtin and entry.is_const: - self.is_temp = 0 - else: - self.is_temp = 1 - - self.is_used_as_rvalue = 1 - elif entry.type.is_memoryviewslice: - self.is_temp = False - self.is_used_as_rvalue = True - self.use_managed_ref = True - return self - - def nogil_check(self, env): - self.nogil = True - if self.is_used_as_rvalue: - entry = self.entry - if entry.is_builtin: - if not entry.is_const: # cached builtins are ok - self.gil_error() - elif entry.is_pyglobal: - self.gil_error() - - gil_message = "Accessing Python global or builtin" - - def analyse_entry(self, env, is_target=False): - #print "NameNode.analyse_entry:", self.name ### - self.check_identifier_kind() - entry = self.entry - type = entry.type - if (not is_target and type.is_pyobject and self.inferred_type and - self.inferred_type.is_builtin_type): - # assume that type inference is smarter than the static entry - type = self.inferred_type - self.type = type - - def check_identifier_kind(self): - # Check that this is an appropriate kind of name for use in an - # expression. Also finds the variable entry associated with - # an extension type. - entry = self.entry - if entry.is_type and entry.type.is_extension_type: - self.type_entry = entry - if entry.is_type and entry.type.is_enum: - py_entry = Symtab.Entry(self.name, None, py_object_type) - py_entry.is_pyglobal = True - py_entry.scope = self.entry.scope - self.entry = py_entry - elif not (entry.is_const or entry.is_variable or - entry.is_builtin or entry.is_cfunction or - entry.is_cpp_class): - if self.entry.as_variable: - self.entry = self.entry.as_variable - elif not self.is_cython_module: - error(self.pos, "'%s' is not a constant, variable or function identifier" % self.name) - - def is_cimported_module_without_shadow(self, env): - if self.is_cython_module or self.cython_attribute: - return False - entry = self.entry or env.lookup(self.name) - return entry.as_module and not entry.is_variable - - def is_simple(self): - # If it's not a C variable, it'll be in a temp. - return 1 - - def may_be_none(self): - if self.cf_state and self.type and (self.type.is_pyobject or - self.type.is_memoryviewslice): - # gard against infinite recursion on self-dependencies - if getattr(self, '_none_checking', False): - # self-dependency - either this node receives a None - # value from *another* node, or it can not reference - # None at this point => safe to assume "not None" - return False - self._none_checking = True - # evaluate control flow state to see if there were any - # potential None values assigned to the node so far - may_be_none = False - for assignment in self.cf_state: - if assignment.rhs.may_be_none(): - may_be_none = True - break - del self._none_checking - return may_be_none - return super(NameNode, self).may_be_none() - - def nonlocally_immutable(self): - if ExprNode.nonlocally_immutable(self): - return True - entry = self.entry - if not entry or entry.in_closure: - return False - return entry.is_local or entry.is_arg or entry.is_builtin or entry.is_readonly - - def calculate_target_results(self, env): - pass - - def check_const(self): - entry = self.entry - if entry is not None and not ( - entry.is_const or - entry.is_cfunction or - entry.is_builtin or - entry.type.is_const): - self.not_const() - return False - return True - - def check_const_addr(self): - entry = self.entry - if not (entry.is_cglobal or entry.is_cfunction or entry.is_builtin): - self.addr_not_const() - return False - return True - - def is_lvalue(self): - return ( - self.entry.is_variable and - not self.entry.is_readonly - ) or ( - self.entry.is_cfunction and - self.entry.is_overridable - ) - - def is_addressable(self): - return self.entry.is_variable and not self.type.is_memoryviewslice - - def is_ephemeral(self): - # Name nodes are never ephemeral, even if the - # result is in a temporary. - return 0 - - def calculate_result_code(self): - entry = self.entry - if not entry: - return "" # There was an error earlier - return entry.cname - - def generate_result_code(self, code): - assert hasattr(self, 'entry') - entry = self.entry - if entry is None: - return # There was an error earlier - if entry.utility_code: - code.globalstate.use_utility_code(entry.utility_code) - if entry.is_builtin and entry.is_const: - return # Lookup already cached - elif entry.is_pyclass_attr: - assert entry.type.is_pyobject, "Python global or builtin not a Python object" - interned_cname = code.intern_identifier(self.entry.name) - if entry.is_builtin: - namespace = Naming.builtins_cname - else: # entry.is_pyglobal - namespace = entry.scope.namespace_cname - if not self.cf_is_null: - code.putln( - '%s = PyObject_GetItem(%s, %s);' % ( - self.result(), - namespace, - interned_cname)) - code.putln('if (unlikely(!%s)) {' % self.result()) - code.putln('PyErr_Clear();') - code.globalstate.use_utility_code( - UtilityCode.load_cached("GetModuleGlobalName", "ObjectHandling.c")) - code.putln( - '__Pyx_GetModuleGlobalName(%s, %s);' % ( - self.result(), - interned_cname)) - if not self.cf_is_null: - code.putln("}") - code.putln(code.error_goto_if_null(self.result(), self.pos)) - code.put_gotref(self.py_result()) - - elif entry.is_builtin and not entry.scope.is_module_scope: - # known builtin - assert entry.type.is_pyobject, "Python global or builtin not a Python object" - interned_cname = code.intern_identifier(self.entry.name) - code.globalstate.use_utility_code( - UtilityCode.load_cached("GetBuiltinName", "ObjectHandling.c")) - code.putln( - '%s = __Pyx_GetBuiltinName(%s); %s' % ( - self.result(), - interned_cname, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - elif entry.is_pyglobal or (entry.is_builtin and entry.scope.is_module_scope): - # name in class body, global name or unknown builtin - assert entry.type.is_pyobject, "Python global or builtin not a Python object" - interned_cname = code.intern_identifier(self.entry.name) - if entry.scope.is_module_scope: - code.globalstate.use_utility_code( - UtilityCode.load_cached("GetModuleGlobalName", "ObjectHandling.c")) - code.putln( - '__Pyx_GetModuleGlobalName(%s, %s); %s' % ( - self.result(), - interned_cname, - code.error_goto_if_null(self.result(), self.pos))) - else: - # FIXME: is_pyglobal is also used for class namespace - code.globalstate.use_utility_code( - UtilityCode.load_cached("GetNameInClass", "ObjectHandling.c")) - code.putln( - '__Pyx_GetNameInClass(%s, %s, %s); %s' % ( - self.result(), - entry.scope.namespace_cname, - interned_cname, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - elif entry.is_local or entry.in_closure or entry.from_closure or entry.type.is_memoryviewslice: - # Raise UnboundLocalError for objects and memoryviewslices - raise_unbound = ( - (self.cf_maybe_null or self.cf_is_null) and not self.allow_null) - null_code = entry.type.check_for_null_code(entry.cname) - - memslice_check = entry.type.is_memoryviewslice and self.initialized_check - - if null_code and raise_unbound and (entry.type.is_pyobject or memslice_check): - code.put_error_if_unbound(self.pos, entry, self.in_nogil_context) - - def generate_assignment_code(self, rhs, code, overloaded_assignment=False, - exception_check=None, exception_value=None): - #print "NameNode.generate_assignment_code:", self.name ### - entry = self.entry - if entry is None: - return # There was an error earlier - - if (self.entry.type.is_ptr and isinstance(rhs, ListNode) - and not self.lhs_of_first_assignment and not rhs.in_module_scope): - error(self.pos, "Literal list must be assigned to pointer at time of declaration") - - # is_pyglobal seems to be True for module level-globals only. - # We use this to access class->tp_dict if necessary. - if entry.is_pyglobal: - assert entry.type.is_pyobject, "Python global or builtin not a Python object" - interned_cname = code.intern_identifier(self.entry.name) - namespace = self.entry.scope.namespace_cname - if entry.is_member: - # if the entry is a member we have to cheat: SetAttr does not work - # on types, so we create a descriptor which is then added to tp_dict - setter = 'PyDict_SetItem' - namespace = '%s->tp_dict' % namespace - elif entry.scope.is_module_scope: - setter = 'PyDict_SetItem' - namespace = Naming.moddict_cname - elif entry.is_pyclass_attr: - code.globalstate.use_utility_code(UtilityCode.load_cached("SetNameInClass", "ObjectHandling.c")) - setter = '__Pyx_SetNameInClass' - else: - assert False, repr(entry) - code.put_error_if_neg( - self.pos, - '%s(%s, %s, %s)' % ( - setter, - namespace, - interned_cname, - rhs.py_result())) - if debug_disposal_code: - print("NameNode.generate_assignment_code:") - print("...generating disposal code for %s" % rhs) - rhs.generate_disposal_code(code) - rhs.free_temps(code) - if entry.is_member: - # in Py2.6+, we need to invalidate the method cache - code.putln("PyType_Modified(%s);" % - entry.scope.parent_type.typeptr_cname) - else: - if self.type.is_memoryviewslice: - self.generate_acquire_memoryviewslice(rhs, code) - - elif self.type.is_buffer: - # Generate code for doing the buffer release/acquisition. - # This might raise an exception in which case the assignment (done - # below) will not happen. - # - # The reason this is not in a typetest-like node is because the - # variables that the acquired buffer info is stored to is allocated - # per entry and coupled with it. - self.generate_acquire_buffer(rhs, code) - assigned = False - if self.type.is_pyobject: - #print "NameNode.generate_assignment_code: to", self.name ### - #print "...from", rhs ### - #print "...LHS type", self.type, "ctype", self.ctype() ### - #print "...RHS type", rhs.type, "ctype", rhs.ctype() ### - if self.use_managed_ref: - rhs.make_owned_reference(code) - is_external_ref = entry.is_cglobal or self.entry.in_closure or self.entry.from_closure - if is_external_ref: - if not self.cf_is_null: - if self.cf_maybe_null: - code.put_xgotref(self.py_result()) - else: - code.put_gotref(self.py_result()) - assigned = True - if entry.is_cglobal: - code.put_decref_set( - self.result(), rhs.result_as(self.ctype())) - else: - if not self.cf_is_null: - if self.cf_maybe_null: - code.put_xdecref_set( - self.result(), rhs.result_as(self.ctype())) - else: - code.put_decref_set( - self.result(), rhs.result_as(self.ctype())) - else: - assigned = False - if is_external_ref: - code.put_giveref(rhs.py_result()) - if not self.type.is_memoryviewslice: - if not assigned: - if overloaded_assignment: - result = rhs.result() - if exception_check == '+': - translate_cpp_exception( - code, self.pos, - '%s = %s;' % (self.result(), result), - self.result() if self.type.is_pyobject else None, - exception_value, self.in_nogil_context) - else: - code.putln('%s = %s;' % (self.result(), result)) - else: - result = rhs.result_as(self.ctype()) - - if is_pythran_expr(self.type): - code.putln('new (&%s) decltype(%s){%s};' % (self.result(), self.result(), result)) - elif result != self.result(): - code.putln('%s = %s;' % (self.result(), result)) - if debug_disposal_code: - print("NameNode.generate_assignment_code:") - print("...generating post-assignment code for %s" % rhs) - rhs.generate_post_assignment_code(code) - elif rhs.result_in_temp(): - rhs.generate_post_assignment_code(code) - - rhs.free_temps(code) - - def generate_acquire_memoryviewslice(self, rhs, code): - """ - Slices, coercions from objects, return values etc are new references. - We have a borrowed reference in case of dst = src - """ - from . import MemoryView - - MemoryView.put_acquire_memoryviewslice( - lhs_cname=self.result(), - lhs_type=self.type, - lhs_pos=self.pos, - rhs=rhs, - code=code, - have_gil=not self.in_nogil_context, - first_assignment=self.cf_is_null) - - def generate_acquire_buffer(self, rhs, code): - # rhstmp is only used in case the rhs is a complicated expression leading to - # the object, to avoid repeating the same C expression for every reference - # to the rhs. It does NOT hold a reference. - pretty_rhs = isinstance(rhs, NameNode) or rhs.is_temp - if pretty_rhs: - rhstmp = rhs.result_as(self.ctype()) - else: - rhstmp = code.funcstate.allocate_temp(self.entry.type, manage_ref=False) - code.putln('%s = %s;' % (rhstmp, rhs.result_as(self.ctype()))) - - from . import Buffer - Buffer.put_assign_to_buffer(self.result(), rhstmp, self.entry, - is_initialized=not self.lhs_of_first_assignment, - pos=self.pos, code=code) - - if not pretty_rhs: - code.putln("%s = 0;" % rhstmp) - code.funcstate.release_temp(rhstmp) - - def generate_deletion_code(self, code, ignore_nonexisting=False): - if self.entry is None: - return # There was an error earlier - elif self.entry.is_pyclass_attr: - namespace = self.entry.scope.namespace_cname - interned_cname = code.intern_identifier(self.entry.name) - if ignore_nonexisting: - key_error_code = 'PyErr_Clear(); else' - else: - # minor hack: fake a NameError on KeyError - key_error_code = ( - '{ PyErr_Clear(); PyErr_Format(PyExc_NameError, "name \'%%s\' is not defined", "%s"); }' % - self.entry.name) - code.putln( - 'if (unlikely(PyObject_DelItem(%s, %s) < 0)) {' - ' if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) %s' - ' %s ' - '}' % (namespace, interned_cname, - key_error_code, - code.error_goto(self.pos))) - elif self.entry.is_pyglobal: - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectSetAttrStr", "ObjectHandling.c")) - interned_cname = code.intern_identifier(self.entry.name) - del_code = '__Pyx_PyObject_DelAttrStr(%s, %s)' % ( - Naming.module_cname, interned_cname) - if ignore_nonexisting: - code.putln( - 'if (unlikely(%s < 0)) {' - ' if (likely(PyErr_ExceptionMatches(PyExc_AttributeError))) PyErr_Clear(); else %s ' - '}' % (del_code, code.error_goto(self.pos))) - else: - code.put_error_if_neg(self.pos, del_code) - elif self.entry.type.is_pyobject or self.entry.type.is_memoryviewslice: - if not self.cf_is_null: - if self.cf_maybe_null and not ignore_nonexisting: - code.put_error_if_unbound(self.pos, self.entry) - - if self.entry.type.is_pyobject: - if self.entry.in_closure: - # generator - if ignore_nonexisting and self.cf_maybe_null: - code.put_xgotref(self.result()) - else: - code.put_gotref(self.result()) - if ignore_nonexisting and self.cf_maybe_null: - code.put_xdecref(self.result(), self.ctype()) - else: - code.put_decref(self.result(), self.ctype()) - code.putln('%s = NULL;' % self.result()) - else: - code.put_xdecref_memoryviewslice(self.entry.cname, - have_gil=not self.nogil) - else: - error(self.pos, "Deletion of C names not supported") - - def annotate(self, code): - if hasattr(self, 'is_called') and self.is_called: - pos = (self.pos[0], self.pos[1], self.pos[2] - len(self.name) - 1) - if self.type.is_pyobject: - style, text = 'py_call', 'python function (%s)' - else: - style, text = 'c_call', 'c function (%s)' - code.annotate(pos, AnnotationItem(style, text % self.type, size=len(self.name))) - -class BackquoteNode(ExprNode): - # `expr` - # - # arg ExprNode - - type = py_object_type - - subexprs = ['arg'] - - def analyse_types(self, env): - self.arg = self.arg.analyse_types(env) - self.arg = self.arg.coerce_to_pyobject(env) - self.is_temp = 1 - return self - - gil_message = "Backquote expression" - - def calculate_constant_result(self): - self.constant_result = repr(self.arg.constant_result) - - def generate_result_code(self, code): - code.putln( - "%s = PyObject_Repr(%s); %s" % ( - self.result(), - self.arg.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class ImportNode(ExprNode): - # Used as part of import statement implementation. - # Implements result = - # __import__(module_name, globals(), None, name_list, level) - # - # module_name StringNode dotted name of module. Empty module - # name means importing the parent package according - # to level - # name_list ListNode or None list of names to be imported - # level int relative import level: - # -1: attempt both relative import and absolute import; - # 0: absolute import; - # >0: the number of parent directories to search - # relative to the current module. - # None: decide the level according to language level and - # directives - - type = py_object_type - - subexprs = ['module_name', 'name_list'] - - def analyse_types(self, env): - if self.level is None: - if (env.directives['py2_import'] or - Future.absolute_import not in env.global_scope().context.future_directives): - self.level = -1 - else: - self.level = 0 - module_name = self.module_name.analyse_types(env) - self.module_name = module_name.coerce_to_pyobject(env) - if self.name_list: - name_list = self.name_list.analyse_types(env) - self.name_list = name_list.coerce_to_pyobject(env) - self.is_temp = 1 - return self - - gil_message = "Python import" - - def generate_result_code(self, code): - if self.name_list: - name_list_code = self.name_list.py_result() - else: - name_list_code = "0" - - code.globalstate.use_utility_code(UtilityCode.load_cached("Import", "ImportExport.c")) - import_code = "__Pyx_Import(%s, %s, %d)" % ( - self.module_name.py_result(), - name_list_code, - self.level) - - if (self.level <= 0 and - self.module_name.is_string_literal and - self.module_name.value in utility_code_for_imports): - helper_func, code_name, code_file = utility_code_for_imports[self.module_name.value] - code.globalstate.use_utility_code(UtilityCode.load_cached(code_name, code_file)) - import_code = '%s(%s)' % (helper_func, import_code) - - code.putln("%s = %s; %s" % ( - self.result(), - import_code, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class IteratorNode(ExprNode): - # Used as part of for statement implementation. - # - # Implements result = iter(sequence) - # - # sequence ExprNode - - type = py_object_type - iter_func_ptr = None - counter_cname = None - cpp_iterator_cname = None - reversed = False # currently only used for list/tuple types (see Optimize.py) - is_async = False - - subexprs = ['sequence'] - - def analyse_types(self, env): - self.sequence = self.sequence.analyse_types(env) - if (self.sequence.type.is_array or self.sequence.type.is_ptr) and \ - not self.sequence.type.is_string: - # C array iteration will be transformed later on - self.type = self.sequence.type - elif self.sequence.type.is_cpp_class: - self.analyse_cpp_types(env) - else: - self.sequence = self.sequence.coerce_to_pyobject(env) - if self.sequence.type in (list_type, tuple_type): - self.sequence = self.sequence.as_none_safe_node("'NoneType' object is not iterable") - self.is_temp = 1 - return self - - gil_message = "Iterating over Python object" - - _func_iternext_type = PyrexTypes.CPtrType(PyrexTypes.CFuncType( - PyrexTypes.py_object_type, [ - PyrexTypes.CFuncTypeArg("it", PyrexTypes.py_object_type, None), - ])) - - def type_dependencies(self, env): - return self.sequence.type_dependencies(env) - - def infer_type(self, env): - sequence_type = self.sequence.infer_type(env) - if sequence_type.is_array or sequence_type.is_ptr: - return sequence_type - elif sequence_type.is_cpp_class: - begin = sequence_type.scope.lookup("begin") - if begin is not None: - return begin.type.return_type - elif sequence_type.is_pyobject: - return sequence_type - return py_object_type - - def analyse_cpp_types(self, env): - sequence_type = self.sequence.type - if sequence_type.is_ptr: - sequence_type = sequence_type.base_type - begin = sequence_type.scope.lookup("begin") - end = sequence_type.scope.lookup("end") - if (begin is None - or not begin.type.is_cfunction - or begin.type.args): - error(self.pos, "missing begin() on %s" % self.sequence.type) - self.type = error_type - return - if (end is None - or not end.type.is_cfunction - or end.type.args): - error(self.pos, "missing end() on %s" % self.sequence.type) - self.type = error_type - return - iter_type = begin.type.return_type - if iter_type.is_cpp_class: - if env.lookup_operator_for_types( - self.pos, - "!=", - [iter_type, end.type.return_type]) is None: - error(self.pos, "missing operator!= on result of begin() on %s" % self.sequence.type) - self.type = error_type - return - if env.lookup_operator_for_types(self.pos, '++', [iter_type]) is None: - error(self.pos, "missing operator++ on result of begin() on %s" % self.sequence.type) - self.type = error_type - return - if env.lookup_operator_for_types(self.pos, '*', [iter_type]) is None: - error(self.pos, "missing operator* on result of begin() on %s" % self.sequence.type) - self.type = error_type - return - self.type = iter_type - elif iter_type.is_ptr: - if not (iter_type == end.type.return_type): - error(self.pos, "incompatible types for begin() and end()") - self.type = iter_type - else: - error(self.pos, "result type of begin() on %s must be a C++ class or pointer" % self.sequence.type) - self.type = error_type - return - - def generate_result_code(self, code): - sequence_type = self.sequence.type - if sequence_type.is_cpp_class: - if self.sequence.is_name: - # safe: C++ won't allow you to reassign to class references - begin_func = "%s.begin" % self.sequence.result() - else: - sequence_type = PyrexTypes.c_ptr_type(sequence_type) - self.cpp_iterator_cname = code.funcstate.allocate_temp(sequence_type, manage_ref=False) - code.putln("%s = &%s;" % (self.cpp_iterator_cname, self.sequence.result())) - begin_func = "%s->begin" % self.cpp_iterator_cname - # TODO: Limit scope. - code.putln("%s = %s();" % (self.result(), begin_func)) - return - if sequence_type.is_array or sequence_type.is_ptr: - raise InternalError("for in carray slice not transformed") - - is_builtin_sequence = sequence_type in (list_type, tuple_type) - if not is_builtin_sequence: - # reversed() not currently optimised (see Optimize.py) - assert not self.reversed, "internal error: reversed() only implemented for list/tuple objects" - self.may_be_a_sequence = not sequence_type.is_builtin_type - if self.may_be_a_sequence: - code.putln( - "if (likely(PyList_CheckExact(%s)) || PyTuple_CheckExact(%s)) {" % ( - self.sequence.py_result(), - self.sequence.py_result())) - - if is_builtin_sequence or self.may_be_a_sequence: - self.counter_cname = code.funcstate.allocate_temp( - PyrexTypes.c_py_ssize_t_type, manage_ref=False) - if self.reversed: - if sequence_type is list_type: - init_value = 'PyList_GET_SIZE(%s) - 1' % self.result() - else: - init_value = 'PyTuple_GET_SIZE(%s) - 1' % self.result() - else: - init_value = '0' - code.putln("%s = %s; __Pyx_INCREF(%s); %s = %s;" % ( - self.result(), - self.sequence.py_result(), - self.result(), - self.counter_cname, - init_value)) - if not is_builtin_sequence: - self.iter_func_ptr = code.funcstate.allocate_temp(self._func_iternext_type, manage_ref=False) - if self.may_be_a_sequence: - code.putln("%s = NULL;" % self.iter_func_ptr) - code.putln("} else {") - code.put("%s = -1; " % self.counter_cname) - - code.putln("%s = PyObject_GetIter(%s); %s" % ( - self.result(), - self.sequence.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - # PyObject_GetIter() fails if "tp_iternext" is not set, but the check below - # makes it visible to the C compiler that the pointer really isn't NULL, so that - # it can distinguish between the special cases and the generic case - code.putln("%s = Py_TYPE(%s)->tp_iternext; %s" % ( - self.iter_func_ptr, self.py_result(), - code.error_goto_if_null(self.iter_func_ptr, self.pos))) - if self.may_be_a_sequence: - code.putln("}") - - def generate_next_sequence_item(self, test_name, result_name, code): - assert self.counter_cname, "internal error: counter_cname temp not prepared" - final_size = 'Py%s_GET_SIZE(%s)' % (test_name, self.py_result()) - if self.sequence.is_sequence_constructor: - item_count = len(self.sequence.args) - if self.sequence.mult_factor is None: - final_size = item_count - elif isinstance(self.sequence.mult_factor.constant_result, _py_int_types): - final_size = item_count * self.sequence.mult_factor.constant_result - code.putln("if (%s >= %s) break;" % (self.counter_cname, final_size)) - if self.reversed: - inc_dec = '--' - else: - inc_dec = '++' - code.putln("#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS") - code.putln( - "%s = Py%s_GET_ITEM(%s, %s); __Pyx_INCREF(%s); %s%s; %s" % ( - result_name, - test_name, - self.py_result(), - self.counter_cname, - result_name, - self.counter_cname, - inc_dec, - # use the error label to avoid C compiler warnings if we only use it below - code.error_goto_if_neg('0', self.pos) - )) - code.putln("#else") - code.putln( - "%s = PySequence_ITEM(%s, %s); %s%s; %s" % ( - result_name, - self.py_result(), - self.counter_cname, - self.counter_cname, - inc_dec, - code.error_goto_if_null(result_name, self.pos))) - code.put_gotref(result_name) - code.putln("#endif") - - def generate_iter_next_result_code(self, result_name, code): - sequence_type = self.sequence.type - if self.reversed: - code.putln("if (%s < 0) break;" % self.counter_cname) - if sequence_type.is_cpp_class: - if self.cpp_iterator_cname: - end_func = "%s->end" % self.cpp_iterator_cname - else: - end_func = "%s.end" % self.sequence.result() - # TODO: Cache end() call? - code.putln("if (!(%s != %s())) break;" % ( - self.result(), - end_func)) - code.putln("%s = *%s;" % ( - result_name, - self.result())) - code.putln("++%s;" % self.result()) - return - elif sequence_type is list_type: - self.generate_next_sequence_item('List', result_name, code) - return - elif sequence_type is tuple_type: - self.generate_next_sequence_item('Tuple', result_name, code) - return - - if self.may_be_a_sequence: - code.putln("if (likely(!%s)) {" % self.iter_func_ptr) - code.putln("if (likely(PyList_CheckExact(%s))) {" % self.py_result()) - self.generate_next_sequence_item('List', result_name, code) - code.putln("} else {") - self.generate_next_sequence_item('Tuple', result_name, code) - code.putln("}") - code.put("} else ") - - code.putln("{") - code.putln( - "%s = %s(%s);" % ( - result_name, - self.iter_func_ptr, - self.py_result())) - code.putln("if (unlikely(!%s)) {" % result_name) - code.putln("PyObject* exc_type = PyErr_Occurred();") - code.putln("if (exc_type) {") - code.putln("if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();") - code.putln("else %s" % code.error_goto(self.pos)) - code.putln("}") - code.putln("break;") - code.putln("}") - code.put_gotref(result_name) - code.putln("}") - - def free_temps(self, code): - if self.counter_cname: - code.funcstate.release_temp(self.counter_cname) - if self.iter_func_ptr: - code.funcstate.release_temp(self.iter_func_ptr) - self.iter_func_ptr = None - if self.cpp_iterator_cname: - code.funcstate.release_temp(self.cpp_iterator_cname) - ExprNode.free_temps(self, code) - - -class NextNode(AtomicExprNode): - # Used as part of for statement implementation. - # Implements result = next(iterator) - # Created during analyse_types phase. - # The iterator is not owned by this node. - # - # iterator IteratorNode - - def __init__(self, iterator): - AtomicExprNode.__init__(self, iterator.pos) - self.iterator = iterator - - def nogil_check(self, env): - # ignore - errors (if any) are already handled by IteratorNode - pass - - def type_dependencies(self, env): - return self.iterator.type_dependencies(env) - - def infer_type(self, env, iterator_type=None): - if iterator_type is None: - iterator_type = self.iterator.infer_type(env) - if iterator_type.is_ptr or iterator_type.is_array: - return iterator_type.base_type - elif iterator_type.is_cpp_class: - item_type = env.lookup_operator_for_types(self.pos, "*", [iterator_type]).type.return_type - if item_type.is_reference: - item_type = item_type.ref_base_type - if item_type.is_const: - item_type = item_type.const_base_type - return item_type - else: - # Avoid duplication of complicated logic. - fake_index_node = IndexNode( - self.pos, - base=self.iterator.sequence, - index=IntNode(self.pos, value='PY_SSIZE_T_MAX', - type=PyrexTypes.c_py_ssize_t_type)) - return fake_index_node.infer_type(env) - - def analyse_types(self, env): - self.type = self.infer_type(env, self.iterator.type) - self.is_temp = 1 - return self - - def generate_result_code(self, code): - self.iterator.generate_iter_next_result_code(self.result(), code) - - -class AsyncIteratorNode(ExprNode): - # Used as part of 'async for' statement implementation. - # - # Implements result = sequence.__aiter__() - # - # sequence ExprNode - - subexprs = ['sequence'] - - is_async = True - type = py_object_type - is_temp = 1 - - def infer_type(self, env): - return py_object_type - - def analyse_types(self, env): - self.sequence = self.sequence.analyse_types(env) - if not self.sequence.type.is_pyobject: - error(self.pos, "async for loops not allowed on C/C++ types") - self.sequence = self.sequence.coerce_to_pyobject(env) - return self - - def generate_result_code(self, code): - code.globalstate.use_utility_code(UtilityCode.load_cached("AsyncIter", "Coroutine.c")) - code.putln("%s = __Pyx_Coroutine_GetAsyncIter(%s); %s" % ( - self.result(), - self.sequence.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.result()) - - -class AsyncNextNode(AtomicExprNode): - # Used as part of 'async for' statement implementation. - # Implements result = iterator.__anext__() - # Created during analyse_types phase. - # The iterator is not owned by this node. - # - # iterator IteratorNode - - type = py_object_type - is_temp = 1 - - def __init__(self, iterator): - AtomicExprNode.__init__(self, iterator.pos) - self.iterator = iterator - - def infer_type(self, env): - return py_object_type - - def analyse_types(self, env): - return self - - def generate_result_code(self, code): - code.globalstate.use_utility_code(UtilityCode.load_cached("AsyncIter", "Coroutine.c")) - code.putln("%s = __Pyx_Coroutine_AsyncIterNext(%s); %s" % ( - self.result(), - self.iterator.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.result()) - - -class WithExitCallNode(ExprNode): - # The __exit__() call of a 'with' statement. Used in both the - # except and finally clauses. - - # with_stat WithStatNode the surrounding 'with' statement - # args TupleNode or ResultStatNode the exception info tuple - # await_expr AwaitExprNode the await expression of an 'async with' statement - - subexprs = ['args', 'await_expr'] - test_if_run = True - await_expr = None - - def analyse_types(self, env): - self.args = self.args.analyse_types(env) - if self.await_expr: - self.await_expr = self.await_expr.analyse_types(env) - self.type = PyrexTypes.c_bint_type - self.is_temp = True - return self - - def generate_evaluation_code(self, code): - if self.test_if_run: - # call only if it was not already called (and decref-cleared) - code.putln("if (%s) {" % self.with_stat.exit_var) - - self.args.generate_evaluation_code(code) - result_var = code.funcstate.allocate_temp(py_object_type, manage_ref=False) - - code.mark_pos(self.pos) - code.globalstate.use_utility_code(UtilityCode.load_cached( - "PyObjectCall", "ObjectHandling.c")) - code.putln("%s = __Pyx_PyObject_Call(%s, %s, NULL);" % ( - result_var, - self.with_stat.exit_var, - self.args.result())) - code.put_decref_clear(self.with_stat.exit_var, type=py_object_type) - self.args.generate_disposal_code(code) - self.args.free_temps(code) - - code.putln(code.error_goto_if_null(result_var, self.pos)) - code.put_gotref(result_var) - - if self.await_expr: - # FIXME: result_var temp currently leaks into the closure - self.await_expr.generate_evaluation_code(code, source_cname=result_var, decref_source=True) - code.putln("%s = %s;" % (result_var, self.await_expr.py_result())) - self.await_expr.generate_post_assignment_code(code) - self.await_expr.free_temps(code) - - if self.result_is_used: - self.allocate_temp_result(code) - code.putln("%s = __Pyx_PyObject_IsTrue(%s);" % (self.result(), result_var)) - code.put_decref_clear(result_var, type=py_object_type) - if self.result_is_used: - code.put_error_if_neg(self.pos, self.result()) - code.funcstate.release_temp(result_var) - if self.test_if_run: - code.putln("}") - - -class ExcValueNode(AtomicExprNode): - # Node created during analyse_types phase - # of an ExceptClauseNode to fetch the current - # exception value. - - type = py_object_type - - def __init__(self, pos): - ExprNode.__init__(self, pos) - - def set_var(self, var): - self.var = var - - def calculate_result_code(self): - return self.var - - def generate_result_code(self, code): - pass - - def analyse_types(self, env): - return self - - -class TempNode(ExprNode): - # Node created during analyse_types phase - # of some nodes to hold a temporary value. - # - # Note: One must call "allocate" and "release" on - # the node during code generation to get/release the temp. - # This is because the temp result is often used outside of - # the regular cycle. - - subexprs = [] - - def __init__(self, pos, type, env=None): - ExprNode.__init__(self, pos) - self.type = type - if type.is_pyobject: - self.result_ctype = py_object_type - self.is_temp = 1 - - def analyse_types(self, env): - return self - - def analyse_target_declaration(self, env): - pass - - def generate_result_code(self, code): - pass - - def allocate(self, code): - self.temp_cname = code.funcstate.allocate_temp(self.type, manage_ref=True) - - def release(self, code): - code.funcstate.release_temp(self.temp_cname) - self.temp_cname = None - - def result(self): - try: - return self.temp_cname - except: - assert False, "Remember to call allocate/release on TempNode" - raise - - # Do not participate in normal temp alloc/dealloc: - def allocate_temp_result(self, code): - pass - - def release_temp_result(self, code): - pass - -class PyTempNode(TempNode): - # TempNode holding a Python value. - - def __init__(self, pos, env): - TempNode.__init__(self, pos, PyrexTypes.py_object_type, env) - -class RawCNameExprNode(ExprNode): - subexprs = [] - - def __init__(self, pos, type=None, cname=None): - ExprNode.__init__(self, pos, type=type) - if cname is not None: - self.cname = cname - - def analyse_types(self, env): - return self - - def set_cname(self, cname): - self.cname = cname - - def result(self): - return self.cname - - def generate_result_code(self, code): - pass - - -#------------------------------------------------------------------- -# -# F-strings -# -#------------------------------------------------------------------- - - -class JoinedStrNode(ExprNode): - # F-strings - # - # values [UnicodeNode|FormattedValueNode] Substrings of the f-string - # - type = unicode_type - is_temp = True - - subexprs = ['values'] - - def analyse_types(self, env): - self.values = [v.analyse_types(env).coerce_to_pyobject(env) for v in self.values] - return self - - def may_be_none(self): - # PyUnicode_Join() always returns a Unicode string or raises an exception - return False - - def generate_evaluation_code(self, code): - code.mark_pos(self.pos) - num_items = len(self.values) - list_var = code.funcstate.allocate_temp(py_object_type, manage_ref=True) - ulength_var = code.funcstate.allocate_temp(PyrexTypes.c_py_ssize_t_type, manage_ref=False) - max_char_var = code.funcstate.allocate_temp(PyrexTypes.c_py_ucs4_type, manage_ref=False) - - code.putln('%s = PyTuple_New(%s); %s' % ( - list_var, - num_items, - code.error_goto_if_null(list_var, self.pos))) - code.put_gotref(list_var) - code.putln("%s = 0;" % ulength_var) - code.putln("%s = 127;" % max_char_var) # at least ASCII character range - - for i, node in enumerate(self.values): - node.generate_evaluation_code(code) - node.make_owned_reference(code) - - ulength = "__Pyx_PyUnicode_GET_LENGTH(%s)" % node.py_result() - max_char_value = "__Pyx_PyUnicode_MAX_CHAR_VALUE(%s)" % node.py_result() - is_ascii = False - if isinstance(node, UnicodeNode): - try: - # most strings will be ASCII or at least Latin-1 - node.value.encode('iso8859-1') - max_char_value = '255' - node.value.encode('us-ascii') - is_ascii = True - except UnicodeEncodeError: - if max_char_value != '255': - # not ISO8859-1 => check BMP limit - max_char = max(map(ord, node.value)) - if max_char < 0xD800: - # BMP-only, no surrogate pairs used - max_char_value = '65535' - ulength = str(len(node.value)) - elif max_char >= 65536: - # cleary outside of BMP, and not on a 16-bit Unicode system - max_char_value = '1114111' - ulength = str(len(node.value)) - else: - # not really worth implementing a check for surrogate pairs here - # drawback: C code can differ when generating on Py2 with 2-byte Unicode - pass - else: - ulength = str(len(node.value)) - elif isinstance(node, FormattedValueNode) and node.value.type.is_numeric: - is_ascii = True # formatted C numbers are always ASCII - - if not is_ascii: - code.putln("%s = (%s > %s) ? %s : %s;" % ( - max_char_var, max_char_value, max_char_var, max_char_value, max_char_var)) - code.putln("%s += %s;" % (ulength_var, ulength)) - - code.put_giveref(node.py_result()) - code.putln('PyTuple_SET_ITEM(%s, %s, %s);' % (list_var, i, node.py_result())) - node.generate_post_assignment_code(code) - node.free_temps(code) - - code.mark_pos(self.pos) - self.allocate_temp_result(code) - code.globalstate.use_utility_code(UtilityCode.load_cached("JoinPyUnicode", "StringTools.c")) - code.putln('%s = __Pyx_PyUnicode_Join(%s, %d, %s, %s); %s' % ( - self.result(), - list_var, - num_items, - ulength_var, - max_char_var, - code.error_goto_if_null(self.py_result(), self.pos))) - code.put_gotref(self.py_result()) - - code.put_decref_clear(list_var, py_object_type) - code.funcstate.release_temp(list_var) - code.funcstate.release_temp(ulength_var) - code.funcstate.release_temp(max_char_var) - - -class FormattedValueNode(ExprNode): - # {}-delimited portions of an f-string - # - # value ExprNode The expression itself - # conversion_char str or None Type conversion (!s, !r, !a, or none, or 'd' for integer conversion) - # format_spec JoinedStrNode or None Format string passed to __format__ - # c_format_spec str or None If not None, formatting can be done at the C level - - subexprs = ['value', 'format_spec'] - - type = unicode_type - is_temp = True - c_format_spec = None - - find_conversion_func = { - 's': 'PyObject_Unicode', - 'r': 'PyObject_Repr', - 'a': 'PyObject_ASCII', # NOTE: mapped to PyObject_Repr() in Py2 - 'd': '__Pyx_PyNumber_IntOrLong', # NOTE: internal mapping for '%d' formatting - }.get - - def may_be_none(self): - # PyObject_Format() always returns a Unicode string or raises an exception - return False - - def analyse_types(self, env): - self.value = self.value.analyse_types(env) - if not self.format_spec or self.format_spec.is_string_literal: - c_format_spec = self.format_spec.value if self.format_spec else self.value.type.default_format_spec - if self.value.type.can_coerce_to_pystring(env, format_spec=c_format_spec): - self.c_format_spec = c_format_spec - - if self.format_spec: - self.format_spec = self.format_spec.analyse_types(env).coerce_to_pyobject(env) - if self.c_format_spec is None: - self.value = self.value.coerce_to_pyobject(env) - if not self.format_spec and (not self.conversion_char or self.conversion_char == 's'): - if self.value.type is unicode_type and not self.value.may_be_none(): - # value is definitely a unicode string and we don't format it any special - return self.value - return self - - def generate_result_code(self, code): - if self.c_format_spec is not None and not self.value.type.is_pyobject: - convert_func_call = self.value.type.convert_to_pystring( - self.value.result(), code, self.c_format_spec) - code.putln("%s = %s; %s" % ( - self.result(), - convert_func_call, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - return - - value_result = self.value.py_result() - value_is_unicode = self.value.type is unicode_type and not self.value.may_be_none() - if self.format_spec: - format_func = '__Pyx_PyObject_Format' - format_spec = self.format_spec.py_result() - else: - # common case: expect simple Unicode pass-through if no format spec - format_func = '__Pyx_PyObject_FormatSimple' - # passing a Unicode format string in Py2 forces PyObject_Format() to also return a Unicode string - format_spec = Naming.empty_unicode - - conversion_char = self.conversion_char - if conversion_char == 's' and value_is_unicode: - # no need to pipe unicode strings through str() - conversion_char = None - - if conversion_char: - fn = self.find_conversion_func(conversion_char) - assert fn is not None, "invalid conversion character found: '%s'" % conversion_char - value_result = '%s(%s)' % (fn, value_result) - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectFormatAndDecref", "StringTools.c")) - format_func += 'AndDecref' - elif self.format_spec: - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectFormat", "StringTools.c")) - else: - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectFormatSimple", "StringTools.c")) - - code.putln("%s = %s(%s, %s); %s" % ( - self.result(), - format_func, - value_result, - format_spec, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -#------------------------------------------------------------------- -# -# Parallel nodes (cython.parallel.thread(savailable|id)) -# -#------------------------------------------------------------------- - -class ParallelThreadsAvailableNode(AtomicExprNode): - """ - Note: this is disabled and not a valid directive at this moment - - Implements cython.parallel.threadsavailable(). If we are called from the - sequential part of the application, we need to call omp_get_max_threads(), - and in the parallel part we can just call omp_get_num_threads() - """ - - type = PyrexTypes.c_int_type - - def analyse_types(self, env): - self.is_temp = True - # env.add_include_file("omp.h") - return self - - def generate_result_code(self, code): - code.putln("#ifdef _OPENMP") - code.putln("if (omp_in_parallel()) %s = omp_get_max_threads();" % - self.temp_code) - code.putln("else %s = omp_get_num_threads();" % self.temp_code) - code.putln("#else") - code.putln("%s = 1;" % self.temp_code) - code.putln("#endif") - - def result(self): - return self.temp_code - - -class ParallelThreadIdNode(AtomicExprNode): #, Nodes.ParallelNode): - """ - Implements cython.parallel.threadid() - """ - - type = PyrexTypes.c_int_type - - def analyse_types(self, env): - self.is_temp = True - # env.add_include_file("omp.h") - return self - - def generate_result_code(self, code): - code.putln("#ifdef _OPENMP") - code.putln("%s = omp_get_thread_num();" % self.temp_code) - code.putln("#else") - code.putln("%s = 0;" % self.temp_code) - code.putln("#endif") - - def result(self): - return self.temp_code - - -#------------------------------------------------------------------- -# -# Trailer nodes -# -#------------------------------------------------------------------- - - -class _IndexingBaseNode(ExprNode): - # Base class for indexing nodes. - # - # base ExprNode the value being indexed - - def is_ephemeral(self): - # in most cases, indexing will return a safe reference to an object in a container, - # so we consider the result safe if the base object is - return self.base.is_ephemeral() or self.base.type in ( - basestring_type, str_type, bytes_type, bytearray_type, unicode_type) - - def check_const_addr(self): - return self.base.check_const_addr() and self.index.check_const() - - def is_lvalue(self): - # NOTE: references currently have both is_reference and is_ptr - # set. Since pointers and references have different lvalue - # rules, we must be careful to separate the two. - if self.type.is_reference: - if self.type.ref_base_type.is_array: - # fixed-sized arrays aren't l-values - return False - elif self.type.is_ptr: - # non-const pointers can always be reassigned - return True - # Just about everything else returned by the index operator - # can be an lvalue. - return True - - -class IndexNode(_IndexingBaseNode): - # Sequence indexing. - # - # base ExprNode - # index ExprNode - # type_indices [PyrexType] - # - # is_fused_index boolean Whether the index is used to specialize a - # c(p)def function - - subexprs = ['base', 'index'] - type_indices = None - - is_subscript = True - is_fused_index = False - - def calculate_constant_result(self): - self.constant_result = self.base.constant_result[self.index.constant_result] - - def compile_time_value(self, denv): - base = self.base.compile_time_value(denv) - index = self.index.compile_time_value(denv) - try: - return base[index] - except Exception as e: - self.compile_time_value_error(e) - - def is_simple(self): - base = self.base - return (base.is_simple() and self.index.is_simple() - and base.type and (base.type.is_ptr or base.type.is_array)) - - def may_be_none(self): - base_type = self.base.type - if base_type: - if base_type.is_string: - return False - if isinstance(self.index, SliceNode): - # slicing! - if base_type in (bytes_type, bytearray_type, str_type, unicode_type, - basestring_type, list_type, tuple_type): - return False - return ExprNode.may_be_none(self) - - def analyse_target_declaration(self, env): - pass - - def analyse_as_type(self, env): - base_type = self.base.analyse_as_type(env) - if base_type and not base_type.is_pyobject: - if base_type.is_cpp_class: - if isinstance(self.index, TupleNode): - template_values = self.index.args - else: - template_values = [self.index] - type_node = Nodes.TemplatedTypeNode( - pos=self.pos, - positional_args=template_values, - keyword_args=None) - return type_node.analyse(env, base_type=base_type) - elif self.index.is_slice or self.index.is_sequence_constructor: - # memory view - from . import MemoryView - env.use_utility_code(MemoryView.view_utility_code) - axes = [self.index] if self.index.is_slice else list(self.index.args) - return PyrexTypes.MemoryViewSliceType(base_type, MemoryView.get_axes_specs(env, axes)) - else: - # C array - index = self.index.compile_time_value(env) - if index is not None: - try: - index = int(index) - except (ValueError, TypeError): - pass - else: - return PyrexTypes.CArrayType(base_type, index) - error(self.pos, "Array size must be a compile time constant") - return None - - def type_dependencies(self, env): - return self.base.type_dependencies(env) + self.index.type_dependencies(env) - - def infer_type(self, env): - base_type = self.base.infer_type(env) - if self.index.is_slice: - # slicing! - if base_type.is_string: - # sliced C strings must coerce to Python - return bytes_type - elif base_type.is_pyunicode_ptr: - # sliced Py_UNICODE* strings must coerce to Python - return unicode_type - elif base_type in (unicode_type, bytes_type, str_type, - bytearray_type, list_type, tuple_type): - # slicing these returns the same type - return base_type - else: - # TODO: Handle buffers (hopefully without too much redundancy). - return py_object_type - - index_type = self.index.infer_type(env) - if index_type and index_type.is_int or isinstance(self.index, IntNode): - # indexing! - if base_type is unicode_type: - # Py_UCS4 will automatically coerce to a unicode string - # if required, so this is safe. We only infer Py_UCS4 - # when the index is a C integer type. Otherwise, we may - # need to use normal Python item access, in which case - # it's faster to return the one-char unicode string than - # to receive it, throw it away, and potentially rebuild it - # on a subsequent PyObject coercion. - return PyrexTypes.c_py_ucs4_type - elif base_type is str_type: - # always returns str - Py2: bytes, Py3: unicode - return base_type - elif base_type is bytearray_type: - return PyrexTypes.c_uchar_type - elif isinstance(self.base, BytesNode): - #if env.global_scope().context.language_level >= 3: - # # inferring 'char' can be made to work in Python 3 mode - # return PyrexTypes.c_char_type - # Py2/3 return different types on indexing bytes objects - return py_object_type - elif base_type in (tuple_type, list_type): - # if base is a literal, take a look at its values - item_type = infer_sequence_item_type( - env, self.base, self.index, seq_type=base_type) - if item_type is not None: - return item_type - elif base_type.is_ptr or base_type.is_array: - return base_type.base_type - elif base_type.is_ctuple and isinstance(self.index, IntNode): - if self.index.has_constant_result(): - index = self.index.constant_result - if index < 0: - index += base_type.size - if 0 <= index < base_type.size: - return base_type.components[index] - - if base_type.is_cpp_class: - class FakeOperand: - def __init__(self, **kwds): - self.__dict__.update(kwds) - operands = [ - FakeOperand(pos=self.pos, type=base_type), - FakeOperand(pos=self.pos, type=index_type), - ] - index_func = env.lookup_operator('[]', operands) - if index_func is not None: - return index_func.type.return_type - - if is_pythran_expr(base_type) and is_pythran_expr(index_type): - index_with_type = (self.index, index_type) - return PythranExpr(pythran_indexing_type(base_type, [index_with_type])) - - # may be slicing or indexing, we don't know - if base_type in (unicode_type, str_type): - # these types always returns their own type on Python indexing/slicing - return base_type - else: - # TODO: Handle buffers (hopefully without too much redundancy). - return py_object_type - - def analyse_types(self, env): - return self.analyse_base_and_index_types(env, getting=True) - - def analyse_target_types(self, env): - node = self.analyse_base_and_index_types(env, setting=True) - if node.type.is_const: - error(self.pos, "Assignment to const dereference") - if node is self and not node.is_lvalue(): - error(self.pos, "Assignment to non-lvalue of type '%s'" % node.type) - return node - - def analyse_base_and_index_types(self, env, getting=False, setting=False, - analyse_base=True): - # Note: This might be cleaned up by having IndexNode - # parsed in a saner way and only construct the tuple if - # needed. - if analyse_base: - self.base = self.base.analyse_types(env) - - if self.base.type.is_error: - # Do not visit child tree if base is undeclared to avoid confusing - # error messages - self.type = PyrexTypes.error_type - return self - - is_slice = self.index.is_slice - if not env.directives['wraparound']: - if is_slice: - check_negative_indices(self.index.start, self.index.stop) - else: - check_negative_indices(self.index) - - # Potentially overflowing index value. - if not is_slice and isinstance(self.index, IntNode) and Utils.long_literal(self.index.value): - self.index = self.index.coerce_to_pyobject(env) - - is_memslice = self.base.type.is_memoryviewslice - # Handle the case where base is a literal char* (and we expect a string, not an int) - if not is_memslice and (isinstance(self.base, BytesNode) or is_slice): - if self.base.type.is_string or not (self.base.type.is_ptr or self.base.type.is_array): - self.base = self.base.coerce_to_pyobject(env) - - replacement_node = self.analyse_as_buffer_operation(env, getting) - if replacement_node is not None: - return replacement_node - - self.nogil = env.nogil - base_type = self.base.type - - if not base_type.is_cfunction: - self.index = self.index.analyse_types(env) - self.original_index_type = self.index.type - - if base_type.is_unicode_char: - # we infer Py_UNICODE/Py_UCS4 for unicode strings in some - # cases, but indexing must still work for them - if setting: - warning(self.pos, "cannot assign to Unicode string index", level=1) - elif self.index.constant_result in (0, -1): - # uchar[0] => uchar - return self.base - self.base = self.base.coerce_to_pyobject(env) - base_type = self.base.type - - if base_type.is_pyobject: - return self.analyse_as_pyobject(env, is_slice, getting, setting) - elif base_type.is_ptr or base_type.is_array: - return self.analyse_as_c_array(env, is_slice) - elif base_type.is_cpp_class: - return self.analyse_as_cpp(env, setting) - elif base_type.is_cfunction: - return self.analyse_as_c_function(env) - elif base_type.is_ctuple: - return self.analyse_as_c_tuple(env, getting, setting) - else: - error(self.pos, - "Attempting to index non-array type '%s'" % - base_type) - self.type = PyrexTypes.error_type - return self - - def analyse_as_pyobject(self, env, is_slice, getting, setting): - base_type = self.base.type - if self.index.type.is_unicode_char and base_type is not dict_type: - # TODO: eventually fold into case below and remove warning, once people have adapted their code - warning(self.pos, - "Item lookup of unicode character codes now always converts to a Unicode string. " - "Use an explicit C integer cast to get back the previous integer lookup behaviour.", level=1) - self.index = self.index.coerce_to_pyobject(env) - self.is_temp = 1 - elif self.index.type.is_int and base_type is not dict_type: - if (getting - and (base_type in (list_type, tuple_type, bytearray_type)) - and (not self.index.type.signed - or not env.directives['wraparound'] - or (isinstance(self.index, IntNode) and - self.index.has_constant_result() and self.index.constant_result >= 0)) - and not env.directives['boundscheck']): - self.is_temp = 0 - else: - self.is_temp = 1 - self.index = self.index.coerce_to(PyrexTypes.c_py_ssize_t_type, env).coerce_to_simple(env) - self.original_index_type.create_to_py_utility_code(env) - else: - self.index = self.index.coerce_to_pyobject(env) - self.is_temp = 1 - - if self.index.type.is_int and base_type is unicode_type: - # Py_UNICODE/Py_UCS4 will automatically coerce to a unicode string - # if required, so this is fast and safe - self.type = PyrexTypes.c_py_ucs4_type - elif self.index.type.is_int and base_type is bytearray_type: - if setting: - self.type = PyrexTypes.c_uchar_type - else: - # not using 'uchar' to enable fast and safe error reporting as '-1' - self.type = PyrexTypes.c_int_type - elif is_slice and base_type in (bytes_type, bytearray_type, str_type, unicode_type, list_type, tuple_type): - self.type = base_type - else: - item_type = None - if base_type in (list_type, tuple_type) and self.index.type.is_int: - item_type = infer_sequence_item_type( - env, self.base, self.index, seq_type=base_type) - if item_type is None: - item_type = py_object_type - self.type = item_type - if base_type in (list_type, tuple_type, dict_type): - # do the None check explicitly (not in a helper) to allow optimising it away - self.base = self.base.as_none_safe_node("'NoneType' object is not subscriptable") - - self.wrap_in_nonecheck_node(env, getting) - return self - - def analyse_as_c_array(self, env, is_slice): - base_type = self.base.type - self.type = base_type.base_type - if is_slice: - self.type = base_type - elif self.index.type.is_pyobject: - self.index = self.index.coerce_to(PyrexTypes.c_py_ssize_t_type, env) - elif not self.index.type.is_int: - error(self.pos, "Invalid index type '%s'" % self.index.type) - return self - - def analyse_as_cpp(self, env, setting): - base_type = self.base.type - function = env.lookup_operator("[]", [self.base, self.index]) - if function is None: - error(self.pos, "Indexing '%s' not supported for index type '%s'" % (base_type, self.index.type)) - self.type = PyrexTypes.error_type - self.result_code = "" - return self - func_type = function.type - if func_type.is_ptr: - func_type = func_type.base_type - self.exception_check = func_type.exception_check - self.exception_value = func_type.exception_value - if self.exception_check: - if not setting: - self.is_temp = True - if self.exception_value is None: - env.use_utility_code(UtilityCode.load_cached("CppExceptionConversion", "CppSupport.cpp")) - self.index = self.index.coerce_to(func_type.args[0].type, env) - self.type = func_type.return_type - if setting and not func_type.return_type.is_reference: - error(self.pos, "Can't set non-reference result '%s'" % self.type) - return self - - def analyse_as_c_function(self, env): - base_type = self.base.type - if base_type.is_fused: - self.parse_indexed_fused_cdef(env) - else: - self.type_indices = self.parse_index_as_types(env) - self.index = None # FIXME: use a dedicated Node class instead of generic IndexNode - if base_type.templates is None: - error(self.pos, "Can only parameterize template functions.") - self.type = error_type - elif self.type_indices is None: - # Error recorded earlier. - self.type = error_type - elif len(base_type.templates) != len(self.type_indices): - error(self.pos, "Wrong number of template arguments: expected %s, got %s" % ( - (len(base_type.templates), len(self.type_indices)))) - self.type = error_type - else: - self.type = base_type.specialize(dict(zip(base_type.templates, self.type_indices))) - # FIXME: use a dedicated Node class instead of generic IndexNode - return self - - def analyse_as_c_tuple(self, env, getting, setting): - base_type = self.base.type - if isinstance(self.index, IntNode) and self.index.has_constant_result(): - index = self.index.constant_result - if -base_type.size <= index < base_type.size: - if index < 0: - index += base_type.size - self.type = base_type.components[index] - else: - error(self.pos, - "Index %s out of bounds for '%s'" % - (index, base_type)) - self.type = PyrexTypes.error_type - return self - else: - self.base = self.base.coerce_to_pyobject(env) - return self.analyse_base_and_index_types(env, getting=getting, setting=setting, analyse_base=False) - - def analyse_as_buffer_operation(self, env, getting): - """ - Analyse buffer indexing and memoryview indexing/slicing - """ - if isinstance(self.index, TupleNode): - indices = self.index.args - else: - indices = [self.index] - - base = self.base - base_type = base.type - replacement_node = None - if base_type.is_memoryviewslice: - # memoryviewslice indexing or slicing - from . import MemoryView - if base.is_memview_slice: - # For memory views, "view[i][j]" is the same as "view[i, j]" => use the latter for speed. - merged_indices = base.merged_indices(indices) - if merged_indices is not None: - base = base.base - base_type = base.type - indices = merged_indices - have_slices, indices, newaxes = MemoryView.unellipsify(indices, base_type.ndim) - if have_slices: - replacement_node = MemoryViewSliceNode(self.pos, indices=indices, base=base) - else: - replacement_node = MemoryViewIndexNode(self.pos, indices=indices, base=base) - elif base_type.is_buffer or base_type.is_pythran_expr: - if base_type.is_pythran_expr or len(indices) == base_type.ndim: - # Buffer indexing - is_buffer_access = True - indices = [index.analyse_types(env) for index in indices] - if base_type.is_pythran_expr: - do_replacement = all( - index.type.is_int or index.is_slice or index.type.is_pythran_expr - for index in indices) - if do_replacement: - for i,index in enumerate(indices): - if index.is_slice: - index = SliceIntNode(index.pos, start=index.start, stop=index.stop, step=index.step) - index = index.analyse_types(env) - indices[i] = index - else: - do_replacement = all(index.type.is_int for index in indices) - if do_replacement: - replacement_node = BufferIndexNode(self.pos, indices=indices, base=base) - # On cloning, indices is cloned. Otherwise, unpack index into indices. - assert not isinstance(self.index, CloneNode) - - if replacement_node is not None: - replacement_node = replacement_node.analyse_types(env, getting) - return replacement_node - - def wrap_in_nonecheck_node(self, env, getting): - if not env.directives['nonecheck'] or not self.base.may_be_none(): - return - self.base = self.base.as_none_safe_node("'NoneType' object is not subscriptable") - - def parse_index_as_types(self, env, required=True): - if isinstance(self.index, TupleNode): - indices = self.index.args - else: - indices = [self.index] - type_indices = [] - for index in indices: - type_indices.append(index.analyse_as_type(env)) - if type_indices[-1] is None: - if required: - error(index.pos, "not parsable as a type") - return None - return type_indices - - def parse_indexed_fused_cdef(self, env): - """ - Interpret fused_cdef_func[specific_type1, ...] - - Note that if this method is called, we are an indexed cdef function - with fused argument types, and this IndexNode will be replaced by the - NameNode with specific entry just after analysis of expressions by - AnalyseExpressionsTransform. - """ - self.type = PyrexTypes.error_type - - self.is_fused_index = True - - base_type = self.base.type - positions = [] - - if self.index.is_name or self.index.is_attribute: - positions.append(self.index.pos) - elif isinstance(self.index, TupleNode): - for arg in self.index.args: - positions.append(arg.pos) - specific_types = self.parse_index_as_types(env, required=False) - - if specific_types is None: - self.index = self.index.analyse_types(env) - - if not self.base.entry.as_variable: - error(self.pos, "Can only index fused functions with types") - else: - # A cpdef function indexed with Python objects - self.base.entry = self.entry = self.base.entry.as_variable - self.base.type = self.type = self.entry.type - - self.base.is_temp = True - self.is_temp = True - - self.entry.used = True - - self.is_fused_index = False - return - - for i, type in enumerate(specific_types): - specific_types[i] = type.specialize_fused(env) - - fused_types = base_type.get_fused_types() - if len(specific_types) > len(fused_types): - return error(self.pos, "Too many types specified") - elif len(specific_types) < len(fused_types): - t = fused_types[len(specific_types)] - return error(self.pos, "Not enough types specified to specialize " - "the function, %s is still fused" % t) - - # See if our index types form valid specializations - for pos, specific_type, fused_type in zip(positions, - specific_types, - fused_types): - if not any([specific_type.same_as(t) for t in fused_type.types]): - return error(pos, "Type not in fused type") - - if specific_type is None or specific_type.is_error: - return - - fused_to_specific = dict(zip(fused_types, specific_types)) - type = base_type.specialize(fused_to_specific) - - if type.is_fused: - # Only partially specific, this is invalid - error(self.pos, - "Index operation makes function only partially specific") - else: - # Fully specific, find the signature with the specialized entry - for signature in self.base.type.get_all_specialized_function_types(): - if type.same_as(signature): - self.type = signature - - if self.base.is_attribute: - # Pretend to be a normal attribute, for cdef extension - # methods - self.entry = signature.entry - self.is_attribute = True - self.obj = self.base.obj - - self.type.entry.used = True - self.base.type = signature - self.base.entry = signature.entry - - break - else: - # This is a bug - raise InternalError("Couldn't find the right signature") - - gil_message = "Indexing Python object" - - def calculate_result_code(self): - if self.base.type in (list_type, tuple_type, bytearray_type): - if self.base.type is list_type: - index_code = "PyList_GET_ITEM(%s, %s)" - elif self.base.type is tuple_type: - index_code = "PyTuple_GET_ITEM(%s, %s)" - elif self.base.type is bytearray_type: - index_code = "((unsigned char)(PyByteArray_AS_STRING(%s)[%s]))" - else: - assert False, "unexpected base type in indexing: %s" % self.base.type - elif self.base.type.is_cfunction: - return "%s<%s>" % ( - self.base.result(), - ",".join([param.empty_declaration_code() for param in self.type_indices])) - elif self.base.type.is_ctuple: - index = self.index.constant_result - if index < 0: - index += self.base.type.size - return "%s.f%s" % (self.base.result(), index) - else: - if (self.type.is_ptr or self.type.is_array) and self.type == self.base.type: - error(self.pos, "Invalid use of pointer slice") - return - index_code = "(%s[%s])" - return index_code % (self.base.result(), self.index.result()) - - def extra_index_params(self, code): - if self.index.type.is_int: - is_list = self.base.type is list_type - wraparound = ( - bool(code.globalstate.directives['wraparound']) and - self.original_index_type.signed and - not (isinstance(self.index.constant_result, _py_int_types) - and self.index.constant_result >= 0)) - boundscheck = bool(code.globalstate.directives['boundscheck']) - return ", %s, %d, %s, %d, %d, %d" % ( - self.original_index_type.empty_declaration_code(), - self.original_index_type.signed and 1 or 0, - self.original_index_type.to_py_function, - is_list, wraparound, boundscheck) - else: - return "" - - def generate_result_code(self, code): - if not self.is_temp: - # all handled in self.calculate_result_code() - return - - utility_code = None - if self.type.is_pyobject: - error_value = 'NULL' - if self.index.type.is_int: - if self.base.type is list_type: - function = "__Pyx_GetItemInt_List" - elif self.base.type is tuple_type: - function = "__Pyx_GetItemInt_Tuple" - else: - function = "__Pyx_GetItemInt" - utility_code = TempitaUtilityCode.load_cached("GetItemInt", "ObjectHandling.c") - else: - if self.base.type is dict_type: - function = "__Pyx_PyDict_GetItem" - utility_code = UtilityCode.load_cached("DictGetItem", "ObjectHandling.c") - elif self.base.type is py_object_type and self.index.type in (str_type, unicode_type): - # obj[str] is probably doing a dict lookup - function = "__Pyx_PyObject_Dict_GetItem" - utility_code = UtilityCode.load_cached("DictGetItem", "ObjectHandling.c") - else: - function = "__Pyx_PyObject_GetItem" - code.globalstate.use_utility_code( - TempitaUtilityCode.load_cached("GetItemInt", "ObjectHandling.c")) - utility_code = UtilityCode.load_cached("ObjectGetItem", "ObjectHandling.c") - elif self.type.is_unicode_char and self.base.type is unicode_type: - assert self.index.type.is_int - function = "__Pyx_GetItemInt_Unicode" - error_value = '(Py_UCS4)-1' - utility_code = UtilityCode.load_cached("GetItemIntUnicode", "StringTools.c") - elif self.base.type is bytearray_type: - assert self.index.type.is_int - assert self.type.is_int - function = "__Pyx_GetItemInt_ByteArray" - error_value = '-1' - utility_code = UtilityCode.load_cached("GetItemIntByteArray", "StringTools.c") - elif not (self.base.type.is_cpp_class and self.exception_check): - assert False, "unexpected type %s and base type %s for indexing" % ( - self.type, self.base.type) - - if utility_code is not None: - code.globalstate.use_utility_code(utility_code) - - if self.index.type.is_int: - index_code = self.index.result() - else: - index_code = self.index.py_result() - - if self.base.type.is_cpp_class and self.exception_check: - translate_cpp_exception(code, self.pos, - "%s = %s[%s];" % (self.result(), self.base.result(), - self.index.result()), - self.result() if self.type.is_pyobject else None, - self.exception_value, self.in_nogil_context) - else: - error_check = '!%s' if error_value == 'NULL' else '%%s == %s' % error_value - code.putln( - "%s = %s(%s, %s%s); %s" % ( - self.result(), - function, - self.base.py_result(), - index_code, - self.extra_index_params(code), - code.error_goto_if(error_check % self.result(), self.pos))) - if self.type.is_pyobject: - code.put_gotref(self.py_result()) - - def generate_setitem_code(self, value_code, code): - if self.index.type.is_int: - if self.base.type is bytearray_type: - code.globalstate.use_utility_code( - UtilityCode.load_cached("SetItemIntByteArray", "StringTools.c")) - function = "__Pyx_SetItemInt_ByteArray" - else: - code.globalstate.use_utility_code( - UtilityCode.load_cached("SetItemInt", "ObjectHandling.c")) - function = "__Pyx_SetItemInt" - index_code = self.index.result() - else: - index_code = self.index.py_result() - if self.base.type is dict_type: - function = "PyDict_SetItem" - # It would seem that we could specialized lists/tuples, but that - # shouldn't happen here. - # Both PyList_SetItem() and PyTuple_SetItem() take a Py_ssize_t as - # index instead of an object, and bad conversion here would give - # the wrong exception. Also, tuples are supposed to be immutable, - # and raise a TypeError when trying to set their entries - # (PyTuple_SetItem() is for creating new tuples from scratch). - else: - function = "PyObject_SetItem" - code.putln(code.error_goto_if_neg( - "%s(%s, %s, %s%s)" % ( - function, - self.base.py_result(), - index_code, - value_code, - self.extra_index_params(code)), - self.pos)) - - def generate_assignment_code(self, rhs, code, overloaded_assignment=False, - exception_check=None, exception_value=None): - self.generate_subexpr_evaluation_code(code) - - if self.type.is_pyobject: - self.generate_setitem_code(rhs.py_result(), code) - elif self.base.type is bytearray_type: - value_code = self._check_byte_value(code, rhs) - self.generate_setitem_code(value_code, code) - elif self.base.type.is_cpp_class and self.exception_check and self.exception_check == '+': - if overloaded_assignment and exception_check and \ - self.exception_value != exception_value: - # Handle the case that both the index operator and the assignment - # operator have a c++ exception handler and they are not the same. - translate_double_cpp_exception(code, self.pos, self.type, - self.result(), rhs.result(), self.exception_value, - exception_value, self.in_nogil_context) - else: - # Handle the case that only the index operator has a - # c++ exception handler, or that - # both exception handlers are the same. - translate_cpp_exception(code, self.pos, - "%s = %s;" % (self.result(), rhs.result()), - self.result() if self.type.is_pyobject else None, - self.exception_value, self.in_nogil_context) - else: - code.putln( - "%s = %s;" % (self.result(), rhs.result())) - - self.generate_subexpr_disposal_code(code) - self.free_subexpr_temps(code) - rhs.generate_disposal_code(code) - rhs.free_temps(code) - - def _check_byte_value(self, code, rhs): - # TODO: should we do this generally on downcasts, or just here? - assert rhs.type.is_int, repr(rhs.type) - value_code = rhs.result() - if rhs.has_constant_result(): - if 0 <= rhs.constant_result < 256: - return value_code - needs_cast = True # make at least the C compiler happy - warning(rhs.pos, - "value outside of range(0, 256)" - " when assigning to byte: %s" % rhs.constant_result, - level=1) - else: - needs_cast = rhs.type != PyrexTypes.c_uchar_type - - if not self.nogil: - conditions = [] - if rhs.is_literal or rhs.type.signed: - conditions.append('%s < 0' % value_code) - if (rhs.is_literal or not - (rhs.is_temp and rhs.type in ( - PyrexTypes.c_uchar_type, PyrexTypes.c_char_type, - PyrexTypes.c_schar_type))): - conditions.append('%s > 255' % value_code) - if conditions: - code.putln("if (unlikely(%s)) {" % ' || '.join(conditions)) - code.putln( - 'PyErr_SetString(PyExc_ValueError,' - ' "byte must be in range(0, 256)"); %s' % - code.error_goto(self.pos)) - code.putln("}") - - if needs_cast: - value_code = '((unsigned char)%s)' % value_code - return value_code - - def generate_deletion_code(self, code, ignore_nonexisting=False): - self.generate_subexpr_evaluation_code(code) - #if self.type.is_pyobject: - if self.index.type.is_int: - function = "__Pyx_DelItemInt" - index_code = self.index.result() - code.globalstate.use_utility_code( - UtilityCode.load_cached("DelItemInt", "ObjectHandling.c")) - else: - index_code = self.index.py_result() - if self.base.type is dict_type: - function = "PyDict_DelItem" - else: - function = "PyObject_DelItem" - code.putln(code.error_goto_if_neg( - "%s(%s, %s%s)" % ( - function, - self.base.py_result(), - index_code, - self.extra_index_params(code)), - self.pos)) - self.generate_subexpr_disposal_code(code) - self.free_subexpr_temps(code) - - -class BufferIndexNode(_IndexingBaseNode): - """ - Indexing of buffers and memoryviews. This node is created during type - analysis from IndexNode and replaces it. - - Attributes: - base - base node being indexed - indices - list of indexing expressions - """ - - subexprs = ['base', 'indices'] - - is_buffer_access = True - - # Whether we're assigning to a buffer (in that case it needs to be writable) - writable_needed = False - - # Any indexing temp variables that we need to clean up. - index_temps = () - - def analyse_target_types(self, env): - self.analyse_types(env, getting=False) - - def analyse_types(self, env, getting=True): - """ - Analyse types for buffer indexing only. Overridden by memoryview - indexing and slicing subclasses - """ - # self.indices are already analyzed - if not self.base.is_name and not is_pythran_expr(self.base.type): - error(self.pos, "Can only index buffer variables") - self.type = error_type - return self - - if not getting: - if not self.base.entry.type.writable: - error(self.pos, "Writing to readonly buffer") - else: - self.writable_needed = True - if self.base.type.is_buffer: - self.base.entry.buffer_aux.writable_needed = True - - self.none_error_message = "'NoneType' object is not subscriptable" - self.analyse_buffer_index(env, getting) - self.wrap_in_nonecheck_node(env) - return self - - def analyse_buffer_index(self, env, getting): - if is_pythran_expr(self.base.type): - index_with_type_list = [(idx, idx.type) for idx in self.indices] - self.type = PythranExpr(pythran_indexing_type(self.base.type, index_with_type_list)) - else: - self.base = self.base.coerce_to_simple(env) - self.type = self.base.type.dtype - self.buffer_type = self.base.type - - if getting and (self.type.is_pyobject or self.type.is_pythran_expr): - self.is_temp = True - - def analyse_assignment(self, rhs): - """ - Called by IndexNode when this node is assigned to, - with the rhs of the assignment - """ - - def wrap_in_nonecheck_node(self, env): - if not env.directives['nonecheck'] or not self.base.may_be_none(): - return - self.base = self.base.as_none_safe_node(self.none_error_message) - - def nogil_check(self, env): - if self.is_buffer_access or self.is_memview_index: - if self.type.is_pyobject: - error(self.pos, "Cannot access buffer with object dtype without gil") - self.type = error_type - - def calculate_result_code(self): - return "(*%s)" % self.buffer_ptr_code - - def buffer_entry(self): - base = self.base - if self.base.is_nonecheck: - base = base.arg - return base.type.get_entry(base) - - def get_index_in_temp(self, code, ivar): - ret = code.funcstate.allocate_temp( - PyrexTypes.widest_numeric_type( - ivar.type, - PyrexTypes.c_ssize_t_type if ivar.type.signed else PyrexTypes.c_size_t_type), - manage_ref=False) - code.putln("%s = %s;" % (ret, ivar.result())) - return ret - - def buffer_lookup_code(self, code): - """ - ndarray[1, 2, 3] and memslice[1, 2, 3] - """ - if self.in_nogil_context: - if self.is_buffer_access or self.is_memview_index: - if code.globalstate.directives['boundscheck']: - warning(self.pos, "Use boundscheck(False) for faster access", level=1) - - # Assign indices to temps of at least (s)size_t to allow further index calculations. - self.index_temps = index_temps = [self.get_index_in_temp(code,ivar) for ivar in self.indices] - - # Generate buffer access code using these temps - from . import Buffer - buffer_entry = self.buffer_entry() - if buffer_entry.type.is_buffer: - negative_indices = buffer_entry.type.negative_indices - else: - negative_indices = Buffer.buffer_defaults['negative_indices'] - - return buffer_entry, Buffer.put_buffer_lookup_code( - entry=buffer_entry, - index_signeds=[ivar.type.signed for ivar in self.indices], - index_cnames=index_temps, - directives=code.globalstate.directives, - pos=self.pos, code=code, - negative_indices=negative_indices, - in_nogil_context=self.in_nogil_context) - - def generate_assignment_code(self, rhs, code, overloaded_assignment=False): - self.generate_subexpr_evaluation_code(code) - self.generate_buffer_setitem_code(rhs, code) - self.generate_subexpr_disposal_code(code) - self.free_subexpr_temps(code) - rhs.generate_disposal_code(code) - rhs.free_temps(code) - - def generate_buffer_setitem_code(self, rhs, code, op=""): - base_type = self.base.type - if is_pythran_expr(base_type) and is_pythran_supported_type(rhs.type): - obj = code.funcstate.allocate_temp(PythranExpr(pythran_type(self.base.type)), manage_ref=False) - # We have got to do this because we have to declare pythran objects - # at the beginning of the functions. - # Indeed, Cython uses "goto" statement for error management, and - # RAII doesn't work with that kind of construction. - # Moreover, the way Pythran expressions are made is that they don't - # support move-assignation easily. - # This, we explicitly destroy then in-place new objects in this - # case. - code.putln("__Pyx_call_destructor(%s);" % obj) - code.putln("new (&%s) decltype(%s){%s};" % (obj, obj, self.base.pythran_result())) - code.putln("%s%s %s= %s;" % ( - obj, - pythran_indexing_code(self.indices), - op, - rhs.pythran_result())) - code.funcstate.release_temp(obj) - return - - # Used from generate_assignment_code and InPlaceAssignmentNode - buffer_entry, ptrexpr = self.buffer_lookup_code(code) - - if self.buffer_type.dtype.is_pyobject: - # Must manage refcounts. Decref what is already there - # and incref what we put in. - ptr = code.funcstate.allocate_temp(buffer_entry.buf_ptr_type, - manage_ref=False) - rhs_code = rhs.result() - code.putln("%s = %s;" % (ptr, ptrexpr)) - code.put_gotref("*%s" % ptr) - code.putln("__Pyx_INCREF(%s); __Pyx_DECREF(*%s);" % ( - rhs_code, ptr)) - code.putln("*%s %s= %s;" % (ptr, op, rhs_code)) - code.put_giveref("*%s" % ptr) - code.funcstate.release_temp(ptr) - else: - # Simple case - code.putln("*%s %s= %s;" % (ptrexpr, op, rhs.result())) - - def generate_result_code(self, code): - if is_pythran_expr(self.base.type): - res = self.result() - code.putln("__Pyx_call_destructor(%s);" % res) - code.putln("new (&%s) decltype(%s){%s%s};" % ( - res, - res, - self.base.pythran_result(), - pythran_indexing_code(self.indices))) - return - buffer_entry, self.buffer_ptr_code = self.buffer_lookup_code(code) - if self.type.is_pyobject: - # is_temp is True, so must pull out value and incref it. - # NOTE: object temporary results for nodes are declared - # as PyObject *, so we need a cast - code.putln("%s = (PyObject *) *%s;" % (self.result(), self.buffer_ptr_code)) - code.putln("__Pyx_INCREF((PyObject*)%s);" % self.result()) - - def free_subexpr_temps(self, code): - for temp in self.index_temps: - code.funcstate.release_temp(temp) - self.index_temps = () - super(BufferIndexNode, self).free_subexpr_temps(code) - - -class MemoryViewIndexNode(BufferIndexNode): - - is_memview_index = True - is_buffer_access = False - warned_untyped_idx = False - - def analyse_types(self, env, getting=True): - # memoryviewslice indexing or slicing - from . import MemoryView - - self.is_pythran_mode = has_np_pythran(env) - indices = self.indices - have_slices, indices, newaxes = MemoryView.unellipsify(indices, self.base.type.ndim) - - if not getting: - self.writable_needed = True - if self.base.is_name or self.base.is_attribute: - self.base.entry.type.writable_needed = True - - self.memslice_index = (not newaxes and len(indices) == self.base.type.ndim) - axes = [] - - index_type = PyrexTypes.c_py_ssize_t_type - new_indices = [] - - if len(indices) - len(newaxes) > self.base.type.ndim: - self.type = error_type - error(indices[self.base.type.ndim].pos, - "Too many indices specified for type %s" % self.base.type) - return self - - axis_idx = 0 - for i, index in enumerate(indices[:]): - index = index.analyse_types(env) - if index.is_none: - self.is_memview_slice = True - new_indices.append(index) - axes.append(('direct', 'strided')) - continue - - access, packing = self.base.type.axes[axis_idx] - axis_idx += 1 - - if index.is_slice: - self.is_memview_slice = True - if index.step.is_none: - axes.append((access, packing)) - else: - axes.append((access, 'strided')) - - # Coerce start, stop and step to temps of the right type - for attr in ('start', 'stop', 'step'): - value = getattr(index, attr) - if not value.is_none: - value = value.coerce_to(index_type, env) - #value = value.coerce_to_temp(env) - setattr(index, attr, value) - new_indices.append(value) - - elif index.type.is_int or index.type.is_pyobject: - if index.type.is_pyobject and not self.warned_untyped_idx: - warning(index.pos, "Index should be typed for more efficient access", level=2) - MemoryViewIndexNode.warned_untyped_idx = True - - self.is_memview_index = True - index = index.coerce_to(index_type, env) - indices[i] = index - new_indices.append(index) - - else: - self.type = error_type - error(index.pos, "Invalid index for memoryview specified, type %s" % index.type) - return self - - ### FIXME: replace by MemoryViewSliceNode if is_memview_slice ? - self.is_memview_index = self.is_memview_index and not self.is_memview_slice - self.indices = new_indices - # All indices with all start/stop/step for slices. - # We need to keep this around. - self.original_indices = indices - self.nogil = env.nogil - - self.analyse_operation(env, getting, axes) - self.wrap_in_nonecheck_node(env) - return self - - def analyse_operation(self, env, getting, axes): - self.none_error_message = "Cannot index None memoryview slice" - self.analyse_buffer_index(env, getting) - - def analyse_broadcast_operation(self, rhs): - """ - Support broadcasting for slice assignment. - E.g. - m_2d[...] = m_1d # or, - m_1d[...] = m_2d # if the leading dimension has extent 1 - """ - if self.type.is_memoryviewslice: - lhs = self - if lhs.is_memview_broadcast or rhs.is_memview_broadcast: - lhs.is_memview_broadcast = True - rhs.is_memview_broadcast = True - - def analyse_as_memview_scalar_assignment(self, rhs): - lhs = self.analyse_assignment(rhs) - if lhs: - rhs.is_memview_copy_assignment = lhs.is_memview_copy_assignment - return lhs - return self - - -class MemoryViewSliceNode(MemoryViewIndexNode): - - is_memview_slice = True - - # No-op slicing operation, this node will be replaced - is_ellipsis_noop = False - is_memview_scalar_assignment = False - is_memview_index = False - is_memview_broadcast = False - - def analyse_ellipsis_noop(self, env, getting): - """Slicing operations needing no evaluation, i.e. m[...] or m[:, :]""" - ### FIXME: replace directly - self.is_ellipsis_noop = all( - index.is_slice and index.start.is_none and index.stop.is_none and index.step.is_none - for index in self.indices) - - if self.is_ellipsis_noop: - self.type = self.base.type - - def analyse_operation(self, env, getting, axes): - from . import MemoryView - - if not getting: - self.is_memview_broadcast = True - self.none_error_message = "Cannot assign to None memoryview slice" - else: - self.none_error_message = "Cannot slice None memoryview slice" - - self.analyse_ellipsis_noop(env, getting) - if self.is_ellipsis_noop: - return - - self.index = None - self.is_temp = True - self.use_managed_ref = True - - if not MemoryView.validate_axes(self.pos, axes): - self.type = error_type - return - - self.type = PyrexTypes.MemoryViewSliceType(self.base.type.dtype, axes) - - if not (self.base.is_simple() or self.base.result_in_temp()): - self.base = self.base.coerce_to_temp(env) - - def analyse_assignment(self, rhs): - if not rhs.type.is_memoryviewslice and ( - self.type.dtype.assignable_from(rhs.type) or - rhs.type.is_pyobject): - # scalar assignment - return MemoryCopyScalar(self.pos, self) - else: - return MemoryCopySlice(self.pos, self) - - def merged_indices(self, indices): - """Return a new list of indices/slices with 'indices' merged into the current ones - according to slicing rules. - Is used to implement "view[i][j]" => "view[i, j]". - Return None if the indices cannot (easily) be merged at compile time. - """ - if not indices: - return None - # NOTE: Need to evaluate "self.original_indices" here as they might differ from "self.indices". - new_indices = self.original_indices[:] - indices = indices[:] - for i, s in enumerate(self.original_indices): - if s.is_slice: - if s.start.is_none and s.stop.is_none and s.step.is_none: - # Full slice found, replace by index. - new_indices[i] = indices[0] - indices.pop(0) - if not indices: - return new_indices - else: - # Found something non-trivial, e.g. a partial slice. - return None - elif not s.type.is_int: - # Not a slice, not an integer index => could be anything... - return None - if indices: - if len(new_indices) + len(indices) > self.base.type.ndim: - return None - new_indices += indices - return new_indices - - def is_simple(self): - if self.is_ellipsis_noop: - # TODO: fix SimpleCallNode.is_simple() - return self.base.is_simple() or self.base.result_in_temp() - - return self.result_in_temp() - - def calculate_result_code(self): - """This is called in case this is a no-op slicing node""" - return self.base.result() - - def generate_result_code(self, code): - if self.is_ellipsis_noop: - return ### FIXME: remove - buffer_entry = self.buffer_entry() - have_gil = not self.in_nogil_context - - # TODO Mark: this is insane, do it better - have_slices = False - it = iter(self.indices) - for index in self.original_indices: - if index.is_slice: - have_slices = True - if not index.start.is_none: - index.start = next(it) - if not index.stop.is_none: - index.stop = next(it) - if not index.step.is_none: - index.step = next(it) - else: - next(it) - - assert not list(it) - - buffer_entry.generate_buffer_slice_code( - code, self.original_indices, self.result(), - have_gil=have_gil, have_slices=have_slices, - directives=code.globalstate.directives) - - def generate_assignment_code(self, rhs, code, overloaded_assignment=False): - if self.is_ellipsis_noop: - self.generate_subexpr_evaluation_code(code) - else: - self.generate_evaluation_code(code) - - if self.is_memview_scalar_assignment: - self.generate_memoryviewslice_assign_scalar_code(rhs, code) - else: - self.generate_memoryviewslice_setslice_code(rhs, code) - - if self.is_ellipsis_noop: - self.generate_subexpr_disposal_code(code) - else: - self.generate_disposal_code(code) - - rhs.generate_disposal_code(code) - rhs.free_temps(code) - - -class MemoryCopyNode(ExprNode): - """ - Wraps a memoryview slice for slice assignment. - - dst: destination mememoryview slice - """ - - subexprs = ['dst'] - - def __init__(self, pos, dst): - super(MemoryCopyNode, self).__init__(pos) - self.dst = dst - self.type = dst.type - - def generate_assignment_code(self, rhs, code, overloaded_assignment=False): - self.dst.generate_evaluation_code(code) - self._generate_assignment_code(rhs, code) - self.dst.generate_disposal_code(code) - self.dst.free_temps(code) - rhs.generate_disposal_code(code) - rhs.free_temps(code) - - -class MemoryCopySlice(MemoryCopyNode): - """ - Copy the contents of slice src to slice dst. Does not support indirect - slices. - - memslice1[...] = memslice2 - memslice1[:] = memslice2 - """ - - is_memview_copy_assignment = True - copy_slice_cname = "__pyx_memoryview_copy_contents" - - def _generate_assignment_code(self, src, code): - dst = self.dst - - src.type.assert_direct_dims(src.pos) - dst.type.assert_direct_dims(dst.pos) - - code.putln(code.error_goto_if_neg( - "%s(%s, %s, %d, %d, %d)" % (self.copy_slice_cname, - src.result(), dst.result(), - src.type.ndim, dst.type.ndim, - dst.type.dtype.is_pyobject), - dst.pos)) - - -class MemoryCopyScalar(MemoryCopyNode): - """ - Assign a scalar to a slice. dst must be simple, scalar will be assigned - to a correct type and not just something assignable. - - memslice1[...] = 0.0 - memslice1[:] = 0.0 - """ - - def __init__(self, pos, dst): - super(MemoryCopyScalar, self).__init__(pos, dst) - self.type = dst.type.dtype - - def _generate_assignment_code(self, scalar, code): - from . import MemoryView - - self.dst.type.assert_direct_dims(self.dst.pos) - - dtype = self.dst.type.dtype - type_decl = dtype.declaration_code("") - slice_decl = self.dst.type.declaration_code("") - - code.begin_block() - code.putln("%s __pyx_temp_scalar = %s;" % (type_decl, scalar.result())) - if self.dst.result_in_temp() or self.dst.is_simple(): - dst_temp = self.dst.result() - else: - code.putln("%s __pyx_temp_slice = %s;" % (slice_decl, self.dst.result())) - dst_temp = "__pyx_temp_slice" - - slice_iter_obj = MemoryView.slice_iter(self.dst.type, dst_temp, - self.dst.type.ndim, code) - p = slice_iter_obj.start_loops() - - if dtype.is_pyobject: - code.putln("Py_DECREF(*(PyObject **) %s);" % p) - - code.putln("*((%s *) %s) = __pyx_temp_scalar;" % (type_decl, p)) - - if dtype.is_pyobject: - code.putln("Py_INCREF(__pyx_temp_scalar);") - - slice_iter_obj.end_loops() - code.end_block() - - -class SliceIndexNode(ExprNode): - # 2-element slice indexing - # - # base ExprNode - # start ExprNode or None - # stop ExprNode or None - # slice ExprNode or None constant slice object - - subexprs = ['base', 'start', 'stop', 'slice'] - - slice = None - - def infer_type(self, env): - base_type = self.base.infer_type(env) - if base_type.is_string or base_type.is_cpp_class: - return bytes_type - elif base_type.is_pyunicode_ptr: - return unicode_type - elif base_type in (bytes_type, bytearray_type, str_type, unicode_type, - basestring_type, list_type, tuple_type): - return base_type - elif base_type.is_ptr or base_type.is_array: - return PyrexTypes.c_array_type(base_type.base_type, None) - return py_object_type - - def inferable_item_node(self, index=0): - # slicing shouldn't change the result type of the base, but the index might - if index is not not_a_constant and self.start: - if self.start.has_constant_result(): - index += self.start.constant_result - else: - index = not_a_constant - return self.base.inferable_item_node(index) - - def may_be_none(self): - base_type = self.base.type - if base_type: - if base_type.is_string: - return False - if base_type in (bytes_type, str_type, unicode_type, - basestring_type, list_type, tuple_type): - return False - return ExprNode.may_be_none(self) - - def calculate_constant_result(self): - if self.start is None: - start = None - else: - start = self.start.constant_result - if self.stop is None: - stop = None - else: - stop = self.stop.constant_result - self.constant_result = self.base.constant_result[start:stop] - - def compile_time_value(self, denv): - base = self.base.compile_time_value(denv) - if self.start is None: - start = 0 - else: - start = self.start.compile_time_value(denv) - if self.stop is None: - stop = None - else: - stop = self.stop.compile_time_value(denv) - try: - return base[start:stop] - except Exception as e: - self.compile_time_value_error(e) - - def analyse_target_declaration(self, env): - pass - - def analyse_target_types(self, env): - node = self.analyse_types(env, getting=False) - # when assigning, we must accept any Python type - if node.type.is_pyobject: - node.type = py_object_type - return node - - def analyse_types(self, env, getting=True): - self.base = self.base.analyse_types(env) - - if self.base.type.is_buffer or self.base.type.is_pythran_expr or self.base.type.is_memoryviewslice: - none_node = NoneNode(self.pos) - index = SliceNode(self.pos, - start=self.start or none_node, - stop=self.stop or none_node, - step=none_node) - index_node = IndexNode(self.pos, index=index, base=self.base) - return index_node.analyse_base_and_index_types( - env, getting=getting, setting=not getting, - analyse_base=False) - - if self.start: - self.start = self.start.analyse_types(env) - if self.stop: - self.stop = self.stop.analyse_types(env) - - if not env.directives['wraparound']: - check_negative_indices(self.start, self.stop) - - base_type = self.base.type - if base_type.is_array and not getting: - # cannot assign directly to C array => try to assign by making a copy - if not self.start and not self.stop: - self.type = base_type - else: - self.type = PyrexTypes.CPtrType(base_type.base_type) - elif base_type.is_string or base_type.is_cpp_string: - self.type = default_str_type(env) - elif base_type.is_pyunicode_ptr: - self.type = unicode_type - elif base_type.is_ptr: - self.type = base_type - elif base_type.is_array: - # we need a ptr type here instead of an array type, as - # array types can result in invalid type casts in the C - # code - self.type = PyrexTypes.CPtrType(base_type.base_type) - else: - self.base = self.base.coerce_to_pyobject(env) - self.type = py_object_type - if base_type.is_builtin_type: - # slicing builtin types returns something of the same type - self.type = base_type - self.base = self.base.as_none_safe_node("'NoneType' object is not subscriptable") - - if self.type is py_object_type: - if (not self.start or self.start.is_literal) and \ - (not self.stop or self.stop.is_literal): - # cache the constant slice object, in case we need it - none_node = NoneNode(self.pos) - self.slice = SliceNode( - self.pos, - start=copy.deepcopy(self.start or none_node), - stop=copy.deepcopy(self.stop or none_node), - step=none_node - ).analyse_types(env) - else: - c_int = PyrexTypes.c_py_ssize_t_type - - def allow_none(node, default_value, env): - # Coerce to Py_ssize_t, but allow None as meaning the default slice bound. - from .UtilNodes import EvalWithTempExprNode, ResultRefNode - - node_ref = ResultRefNode(node) - new_expr = CondExprNode( - node.pos, - true_val=IntNode( - node.pos, - type=c_int, - value=default_value, - constant_result=int(default_value) if default_value.isdigit() else not_a_constant, - ), - false_val=node_ref.coerce_to(c_int, env), - test=PrimaryCmpNode( - node.pos, - operand1=node_ref, - operator='is', - operand2=NoneNode(node.pos), - ).analyse_types(env) - ).analyse_result_type(env) - return EvalWithTempExprNode(node_ref, new_expr) - - if self.start: - if self.start.type.is_pyobject: - self.start = allow_none(self.start, '0', env) - self.start = self.start.coerce_to(c_int, env) - if self.stop: - if self.stop.type.is_pyobject: - self.stop = allow_none(self.stop, 'PY_SSIZE_T_MAX', env) - self.stop = self.stop.coerce_to(c_int, env) - self.is_temp = 1 - return self - - def analyse_as_type(self, env): - base_type = self.base.analyse_as_type(env) - if base_type and not base_type.is_pyobject: - if not self.start and not self.stop: - # memory view - from . import MemoryView - env.use_utility_code(MemoryView.view_utility_code) - none_node = NoneNode(self.pos) - slice_node = SliceNode( - self.pos, - start=none_node, - stop=none_node, - step=none_node, - ) - return PyrexTypes.MemoryViewSliceType( - base_type, MemoryView.get_axes_specs(env, [slice_node])) - return None - - nogil_check = Node.gil_error - gil_message = "Slicing Python object" - - get_slice_utility_code = TempitaUtilityCode.load( - "SliceObject", "ObjectHandling.c", context={'access': 'Get'}) - - set_slice_utility_code = TempitaUtilityCode.load( - "SliceObject", "ObjectHandling.c", context={'access': 'Set'}) - - def coerce_to(self, dst_type, env): - if ((self.base.type.is_string or self.base.type.is_cpp_string) - and dst_type in (bytes_type, bytearray_type, str_type, unicode_type)): - if (dst_type not in (bytes_type, bytearray_type) - and not env.directives['c_string_encoding']): - error(self.pos, - "default encoding required for conversion from '%s' to '%s'" % - (self.base.type, dst_type)) - self.type = dst_type - if dst_type.is_array and self.base.type.is_array: - if not self.start and not self.stop: - # redundant slice building, copy C arrays directly - return self.base.coerce_to(dst_type, env) - # else: check array size if possible - return super(SliceIndexNode, self).coerce_to(dst_type, env) - - def generate_result_code(self, code): - if not self.type.is_pyobject: - error(self.pos, - "Slicing is not currently supported for '%s'." % self.type) - return - - base_result = self.base.result() - result = self.result() - start_code = self.start_code() - stop_code = self.stop_code() - if self.base.type.is_string: - base_result = self.base.result() - if self.base.type not in (PyrexTypes.c_char_ptr_type, PyrexTypes.c_const_char_ptr_type): - base_result = '((const char*)%s)' % base_result - if self.type is bytearray_type: - type_name = 'ByteArray' - else: - type_name = self.type.name.title() - if self.stop is None: - code.putln( - "%s = __Pyx_Py%s_FromString(%s + %s); %s" % ( - result, - type_name, - base_result, - start_code, - code.error_goto_if_null(result, self.pos))) - else: - code.putln( - "%s = __Pyx_Py%s_FromStringAndSize(%s + %s, %s - %s); %s" % ( - result, - type_name, - base_result, - start_code, - stop_code, - start_code, - code.error_goto_if_null(result, self.pos))) - elif self.base.type.is_pyunicode_ptr: - base_result = self.base.result() - if self.base.type != PyrexTypes.c_py_unicode_ptr_type: - base_result = '((const Py_UNICODE*)%s)' % base_result - if self.stop is None: - code.putln( - "%s = __Pyx_PyUnicode_FromUnicode(%s + %s); %s" % ( - result, - base_result, - start_code, - code.error_goto_if_null(result, self.pos))) - else: - code.putln( - "%s = __Pyx_PyUnicode_FromUnicodeAndLength(%s + %s, %s - %s); %s" % ( - result, - base_result, - start_code, - stop_code, - start_code, - code.error_goto_if_null(result, self.pos))) - - elif self.base.type is unicode_type: - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyUnicode_Substring", "StringTools.c")) - code.putln( - "%s = __Pyx_PyUnicode_Substring(%s, %s, %s); %s" % ( - result, - base_result, - start_code, - stop_code, - code.error_goto_if_null(result, self.pos))) - elif self.type is py_object_type: - code.globalstate.use_utility_code(self.get_slice_utility_code) - (has_c_start, has_c_stop, c_start, c_stop, - py_start, py_stop, py_slice) = self.get_slice_config() - code.putln( - "%s = __Pyx_PyObject_GetSlice(%s, %s, %s, %s, %s, %s, %d, %d, %d); %s" % ( - result, - self.base.py_result(), - c_start, c_stop, - py_start, py_stop, py_slice, - has_c_start, has_c_stop, - bool(code.globalstate.directives['wraparound']), - code.error_goto_if_null(result, self.pos))) - else: - if self.base.type is list_type: - code.globalstate.use_utility_code( - TempitaUtilityCode.load_cached("SliceTupleAndList", "ObjectHandling.c")) - cfunc = '__Pyx_PyList_GetSlice' - elif self.base.type is tuple_type: - code.globalstate.use_utility_code( - TempitaUtilityCode.load_cached("SliceTupleAndList", "ObjectHandling.c")) - cfunc = '__Pyx_PyTuple_GetSlice' - else: - cfunc = 'PySequence_GetSlice' - code.putln( - "%s = %s(%s, %s, %s); %s" % ( - result, - cfunc, - self.base.py_result(), - start_code, - stop_code, - code.error_goto_if_null(result, self.pos))) - code.put_gotref(self.py_result()) - - def generate_assignment_code(self, rhs, code, overloaded_assignment=False, - exception_check=None, exception_value=None): - self.generate_subexpr_evaluation_code(code) - if self.type.is_pyobject: - code.globalstate.use_utility_code(self.set_slice_utility_code) - (has_c_start, has_c_stop, c_start, c_stop, - py_start, py_stop, py_slice) = self.get_slice_config() - code.put_error_if_neg(self.pos, - "__Pyx_PyObject_SetSlice(%s, %s, %s, %s, %s, %s, %s, %d, %d, %d)" % ( - self.base.py_result(), - rhs.py_result(), - c_start, c_stop, - py_start, py_stop, py_slice, - has_c_start, has_c_stop, - bool(code.globalstate.directives['wraparound']))) - else: - start_offset = self.start_code() if self.start else '0' - if rhs.type.is_array: - array_length = rhs.type.size - self.generate_slice_guard_code(code, array_length) - else: - array_length = '%s - %s' % (self.stop_code(), start_offset) - - code.globalstate.use_utility_code(UtilityCode.load_cached("IncludeStringH", "StringTools.c")) - code.putln("memcpy(&(%s[%s]), %s, sizeof(%s[0]) * (%s));" % ( - self.base.result(), start_offset, - rhs.result(), - self.base.result(), array_length - )) - - self.generate_subexpr_disposal_code(code) - self.free_subexpr_temps(code) - rhs.generate_disposal_code(code) - rhs.free_temps(code) - - def generate_deletion_code(self, code, ignore_nonexisting=False): - if not self.base.type.is_pyobject: - error(self.pos, - "Deleting slices is only supported for Python types, not '%s'." % self.type) - return - self.generate_subexpr_evaluation_code(code) - code.globalstate.use_utility_code(self.set_slice_utility_code) - (has_c_start, has_c_stop, c_start, c_stop, - py_start, py_stop, py_slice) = self.get_slice_config() - code.put_error_if_neg(self.pos, - "__Pyx_PyObject_DelSlice(%s, %s, %s, %s, %s, %s, %d, %d, %d)" % ( - self.base.py_result(), - c_start, c_stop, - py_start, py_stop, py_slice, - has_c_start, has_c_stop, - bool(code.globalstate.directives['wraparound']))) - self.generate_subexpr_disposal_code(code) - self.free_subexpr_temps(code) - - def get_slice_config(self): - has_c_start, c_start, py_start = False, '0', 'NULL' - if self.start: - has_c_start = not self.start.type.is_pyobject - if has_c_start: - c_start = self.start.result() - else: - py_start = '&%s' % self.start.py_result() - has_c_stop, c_stop, py_stop = False, '0', 'NULL' - if self.stop: - has_c_stop = not self.stop.type.is_pyobject - if has_c_stop: - c_stop = self.stop.result() - else: - py_stop = '&%s' % self.stop.py_result() - py_slice = self.slice and '&%s' % self.slice.py_result() or 'NULL' - return (has_c_start, has_c_stop, c_start, c_stop, - py_start, py_stop, py_slice) - - def generate_slice_guard_code(self, code, target_size): - if not self.base.type.is_array: - return - slice_size = self.base.type.size - try: - total_length = slice_size = int(slice_size) - except ValueError: - total_length = None - - start = stop = None - if self.stop: - stop = self.stop.result() - try: - stop = int(stop) - if stop < 0: - if total_length is None: - slice_size = '%s + %d' % (slice_size, stop) - else: - slice_size += stop - else: - slice_size = stop - stop = None - except ValueError: - pass - - if self.start: - start = self.start.result() - try: - start = int(start) - if start < 0: - if total_length is None: - start = '%s + %d' % (self.base.type.size, start) - else: - start += total_length - if isinstance(slice_size, _py_int_types): - slice_size -= start - else: - slice_size = '%s - (%s)' % (slice_size, start) - start = None - except ValueError: - pass - - runtime_check = None - compile_time_check = False - try: - int_target_size = int(target_size) - except ValueError: - int_target_size = None - else: - compile_time_check = isinstance(slice_size, _py_int_types) - - if compile_time_check and slice_size < 0: - if int_target_size > 0: - error(self.pos, "Assignment to empty slice.") - elif compile_time_check and start is None and stop is None: - # we know the exact slice length - if int_target_size != slice_size: - error(self.pos, "Assignment to slice of wrong length, expected %s, got %s" % ( - slice_size, target_size)) - elif start is not None: - if stop is None: - stop = slice_size - runtime_check = "(%s)-(%s)" % (stop, start) - elif stop is not None: - runtime_check = stop - else: - runtime_check = slice_size - - if runtime_check: - code.putln("if (unlikely((%s) != (%s))) {" % (runtime_check, target_size)) - code.putln( - 'PyErr_Format(PyExc_ValueError, "Assignment to slice of wrong length,' - ' expected %%" CYTHON_FORMAT_SSIZE_T "d, got %%" CYTHON_FORMAT_SSIZE_T "d",' - ' (Py_ssize_t)(%s), (Py_ssize_t)(%s));' % ( - target_size, runtime_check)) - code.putln(code.error_goto(self.pos)) - code.putln("}") - - def start_code(self): - if self.start: - return self.start.result() - else: - return "0" - - def stop_code(self): - if self.stop: - return self.stop.result() - elif self.base.type.is_array: - return self.base.type.size - else: - return "PY_SSIZE_T_MAX" - - def calculate_result_code(self): - # self.result() is not used, but this method must exist - return "" - - -class SliceNode(ExprNode): - # start:stop:step in subscript list - # - # start ExprNode - # stop ExprNode - # step ExprNode - - subexprs = ['start', 'stop', 'step'] - is_slice = True - type = slice_type - is_temp = 1 - - def calculate_constant_result(self): - self.constant_result = slice( - self.start.constant_result, - self.stop.constant_result, - self.step.constant_result) - - def compile_time_value(self, denv): - start = self.start.compile_time_value(denv) - stop = self.stop.compile_time_value(denv) - step = self.step.compile_time_value(denv) - try: - return slice(start, stop, step) - except Exception as e: - self.compile_time_value_error(e) - - def may_be_none(self): - return False - - def analyse_types(self, env): - start = self.start.analyse_types(env) - stop = self.stop.analyse_types(env) - step = self.step.analyse_types(env) - self.start = start.coerce_to_pyobject(env) - self.stop = stop.coerce_to_pyobject(env) - self.step = step.coerce_to_pyobject(env) - if self.start.is_literal and self.stop.is_literal and self.step.is_literal: - self.is_literal = True - self.is_temp = False - return self - - gil_message = "Constructing Python slice object" - - def calculate_result_code(self): - return self.result_code - - def generate_result_code(self, code): - if self.is_literal: - dedup_key = make_dedup_key(self.type, (self,)) - self.result_code = code.get_py_const(py_object_type, 'slice', cleanup_level=2, dedup_key=dedup_key) - code = code.get_cached_constants_writer(self.result_code) - if code is None: - return # already initialised - code.mark_pos(self.pos) - - code.putln( - "%s = PySlice_New(%s, %s, %s); %s" % ( - self.result(), - self.start.py_result(), - self.stop.py_result(), - self.step.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - if self.is_literal: - code.put_giveref(self.py_result()) - -class SliceIntNode(SliceNode): - # start:stop:step in subscript list - # This is just a node to hold start,stop and step nodes that can be - # converted to integers. This does not generate a slice python object. - # - # start ExprNode - # stop ExprNode - # step ExprNode - - is_temp = 0 - - def calculate_constant_result(self): - self.constant_result = slice( - self.start.constant_result, - self.stop.constant_result, - self.step.constant_result) - - def compile_time_value(self, denv): - start = self.start.compile_time_value(denv) - stop = self.stop.compile_time_value(denv) - step = self.step.compile_time_value(denv) - try: - return slice(start, stop, step) - except Exception as e: - self.compile_time_value_error(e) - - def may_be_none(self): - return False - - def analyse_types(self, env): - self.start = self.start.analyse_types(env) - self.stop = self.stop.analyse_types(env) - self.step = self.step.analyse_types(env) - - if not self.start.is_none: - self.start = self.start.coerce_to_integer(env) - if not self.stop.is_none: - self.stop = self.stop.coerce_to_integer(env) - if not self.step.is_none: - self.step = self.step.coerce_to_integer(env) - - if self.start.is_literal and self.stop.is_literal and self.step.is_literal: - self.is_literal = True - self.is_temp = False - return self - - def calculate_result_code(self): - pass - - def generate_result_code(self, code): - for a in self.start,self.stop,self.step: - if isinstance(a, CloneNode): - a.arg.result() - - -class CallNode(ExprNode): - - # allow overriding the default 'may_be_none' behaviour - may_return_none = None - - def infer_type(self, env): - # TODO(robertwb): Reduce redundancy with analyse_types. - function = self.function - func_type = function.infer_type(env) - if isinstance(function, NewExprNode): - # note: needs call to infer_type() above - return PyrexTypes.CPtrType(function.class_type) - if func_type is py_object_type: - # function might have lied for safety => try to find better type - entry = getattr(function, 'entry', None) - if entry is not None: - func_type = entry.type or func_type - if func_type.is_ptr: - func_type = func_type.base_type - if func_type.is_cfunction: - if getattr(self.function, 'entry', None) and hasattr(self, 'args'): - alternatives = self.function.entry.all_alternatives() - arg_types = [arg.infer_type(env) for arg in self.args] - func_entry = PyrexTypes.best_match(arg_types, alternatives) - if func_entry: - func_type = func_entry.type - if func_type.is_ptr: - func_type = func_type.base_type - return func_type.return_type - return func_type.return_type - elif func_type is type_type: - if function.is_name and function.entry and function.entry.type: - result_type = function.entry.type - if result_type.is_extension_type: - return result_type - elif result_type.is_builtin_type: - if function.entry.name == 'float': - return PyrexTypes.c_double_type - elif function.entry.name in Builtin.types_that_construct_their_instance: - return result_type - return py_object_type - - def type_dependencies(self, env): - # TODO: Update when Danilo's C++ code merged in to handle the - # the case of function overloading. - return self.function.type_dependencies(env) - - def is_simple(self): - # C function calls could be considered simple, but they may - # have side-effects that may hit when multiple operations must - # be effected in order, e.g. when constructing the argument - # sequence for a function call or comparing values. - return False - - def may_be_none(self): - if self.may_return_none is not None: - return self.may_return_none - func_type = self.function.type - if func_type is type_type and self.function.is_name: - entry = self.function.entry - if entry.type.is_extension_type: - return False - if (entry.type.is_builtin_type and - entry.name in Builtin.types_that_construct_their_instance): - return False - return ExprNode.may_be_none(self) - - def set_py_result_type(self, function, func_type=None): - if func_type is None: - func_type = function.type - if func_type is Builtin.type_type and ( - function.is_name and - function.entry and - function.entry.is_builtin and - function.entry.name in Builtin.types_that_construct_their_instance): - # calling a builtin type that returns a specific object type - if function.entry.name == 'float': - # the following will come true later on in a transform - self.type = PyrexTypes.c_double_type - self.result_ctype = PyrexTypes.c_double_type - else: - self.type = Builtin.builtin_types[function.entry.name] - self.result_ctype = py_object_type - self.may_return_none = False - elif function.is_name and function.type_entry: - # We are calling an extension type constructor. As long as we do not - # support __new__(), the result type is clear - self.type = function.type_entry.type - self.result_ctype = py_object_type - self.may_return_none = False - else: - self.type = py_object_type - - def analyse_as_type_constructor(self, env): - type = self.function.analyse_as_type(env) - if type and type.is_struct_or_union: - args, kwds = self.explicit_args_kwds() - items = [] - for arg, member in zip(args, type.scope.var_entries): - items.append(DictItemNode(pos=arg.pos, key=StringNode(pos=arg.pos, value=member.name), value=arg)) - if kwds: - items += kwds.key_value_pairs - self.key_value_pairs = items - self.__class__ = DictNode - self.analyse_types(env) # FIXME - self.coerce_to(type, env) - return True - elif type and type.is_cpp_class: - self.args = [ arg.analyse_types(env) for arg in self.args ] - constructor = type.scope.lookup("") - if not constructor: - error(self.function.pos, "no constructor found for C++ type '%s'" % self.function.name) - self.type = error_type - return self - self.function = RawCNameExprNode(self.function.pos, constructor.type) - self.function.entry = constructor - self.function.set_cname(type.empty_declaration_code()) - self.analyse_c_function_call(env) - self.type = type - return True - - def is_lvalue(self): - return self.type.is_reference - - def nogil_check(self, env): - func_type = self.function_type() - if func_type.is_pyobject: - self.gil_error() - elif not func_type.is_error and not getattr(func_type, 'nogil', False): - self.gil_error() - - gil_message = "Calling gil-requiring function" - - -class SimpleCallNode(CallNode): - # Function call without keyword, * or ** args. - # - # function ExprNode - # args [ExprNode] - # arg_tuple ExprNode or None used internally - # self ExprNode or None used internally - # coerced_self ExprNode or None used internally - # wrapper_call bool used internally - # has_optional_args bool used internally - # nogil bool used internally - - subexprs = ['self', 'coerced_self', 'function', 'args', 'arg_tuple'] - - self = None - coerced_self = None - arg_tuple = None - wrapper_call = False - has_optional_args = False - nogil = False - analysed = False - overflowcheck = False - - def compile_time_value(self, denv): - function = self.function.compile_time_value(denv) - args = [arg.compile_time_value(denv) for arg in self.args] - try: - return function(*args) - except Exception as e: - self.compile_time_value_error(e) - - def analyse_as_type(self, env): - attr = self.function.as_cython_attribute() - if attr == 'pointer': - if len(self.args) != 1: - error(self.args.pos, "only one type allowed.") - else: - type = self.args[0].analyse_as_type(env) - if not type: - error(self.args[0].pos, "Unknown type") - else: - return PyrexTypes.CPtrType(type) - elif attr == 'typeof': - if len(self.args) != 1: - error(self.args.pos, "only one type allowed.") - operand = self.args[0].analyse_types(env) - return operand.type - - def explicit_args_kwds(self): - return self.args, None - - def analyse_types(self, env): - if self.analyse_as_type_constructor(env): - return self - if self.analysed: - return self - self.analysed = True - self.function.is_called = 1 - self.function = self.function.analyse_types(env) - function = self.function - - if function.is_attribute and function.entry and function.entry.is_cmethod: - # Take ownership of the object from which the attribute - # was obtained, because we need to pass it as 'self'. - self.self = function.obj - function.obj = CloneNode(self.self) - - func_type = self.function_type() - self.is_numpy_call_with_exprs = False - if (has_np_pythran(env) and function.is_numpy_attribute and - pythran_is_numpy_func_supported(function)): - has_pythran_args = True - self.arg_tuple = TupleNode(self.pos, args = self.args) - self.arg_tuple = self.arg_tuple.analyse_types(env) - for arg in self.arg_tuple.args: - has_pythran_args &= is_pythran_supported_node_or_none(arg) - self.is_numpy_call_with_exprs = bool(has_pythran_args) - if self.is_numpy_call_with_exprs: - env.add_include_file(pythran_get_func_include_file(function)) - return NumPyMethodCallNode.from_node( - self, - function_cname=pythran_functor(function), - arg_tuple=self.arg_tuple, - type=PythranExpr(pythran_func_type(function, self.arg_tuple.args)), - ) - elif func_type.is_pyobject: - self.arg_tuple = TupleNode(self.pos, args = self.args) - self.arg_tuple = self.arg_tuple.analyse_types(env).coerce_to_pyobject(env) - self.args = None - self.set_py_result_type(function, func_type) - self.is_temp = 1 - else: - self.args = [ arg.analyse_types(env) for arg in self.args ] - self.analyse_c_function_call(env) - if func_type.exception_check == '+': - self.is_temp = True - return self - - def function_type(self): - # Return the type of the function being called, coercing a function - # pointer to a function if necessary. If the function has fused - # arguments, return the specific type. - func_type = self.function.type - - if func_type.is_ptr: - func_type = func_type.base_type - - return func_type - - def analyse_c_function_call(self, env): - func_type = self.function.type - if func_type is error_type: - self.type = error_type - return - - if func_type.is_cfunction and func_type.is_static_method: - if self.self and self.self.type.is_extension_type: - # To support this we'd need to pass self to determine whether - # it was overloaded in Python space (possibly via a Cython - # superclass turning a cdef method into a cpdef one). - error(self.pos, "Cannot call a static method on an instance variable.") - args = self.args - elif self.self: - args = [self.self] + self.args - else: - args = self.args - - if func_type.is_cpp_class: - overloaded_entry = self.function.type.scope.lookup("operator()") - if overloaded_entry is None: - self.type = PyrexTypes.error_type - self.result_code = "" - return - elif hasattr(self.function, 'entry'): - overloaded_entry = self.function.entry - elif self.function.is_subscript and self.function.is_fused_index: - overloaded_entry = self.function.type.entry - else: - overloaded_entry = None - - if overloaded_entry: - if self.function.type.is_fused: - functypes = self.function.type.get_all_specialized_function_types() - alternatives = [f.entry for f in functypes] - else: - alternatives = overloaded_entry.all_alternatives() - - entry = PyrexTypes.best_match( - [arg.type for arg in args], alternatives, self.pos, env, args) - - if not entry: - self.type = PyrexTypes.error_type - self.result_code = "" - return - - entry.used = True - if not func_type.is_cpp_class: - self.function.entry = entry - self.function.type = entry.type - func_type = self.function_type() - else: - entry = None - func_type = self.function_type() - if not func_type.is_cfunction: - error(self.pos, "Calling non-function type '%s'" % func_type) - self.type = PyrexTypes.error_type - self.result_code = "" - return - - # Check no. of args - max_nargs = len(func_type.args) - expected_nargs = max_nargs - func_type.optional_arg_count - actual_nargs = len(args) - if func_type.optional_arg_count and expected_nargs != actual_nargs: - self.has_optional_args = 1 - self.is_temp = 1 - - # check 'self' argument - if entry and entry.is_cmethod and func_type.args and not func_type.is_static_method: - formal_arg = func_type.args[0] - arg = args[0] - if formal_arg.not_none: - if self.self: - self.self = self.self.as_none_safe_node( - "'NoneType' object has no attribute '%{0}s'".format('.30' if len(entry.name) <= 30 else ''), - error='PyExc_AttributeError', - format_args=[entry.name]) - else: - # unbound method - arg = arg.as_none_safe_node( - "descriptor '%s' requires a '%s' object but received a 'NoneType'", - format_args=[entry.name, formal_arg.type.name]) - if self.self: - if formal_arg.accept_builtin_subtypes: - arg = CMethodSelfCloneNode(self.self) - else: - arg = CloneNode(self.self) - arg = self.coerced_self = arg.coerce_to(formal_arg.type, env) - elif formal_arg.type.is_builtin_type: - # special case: unbound methods of builtins accept subtypes - arg = arg.coerce_to(formal_arg.type, env) - if arg.type.is_builtin_type and isinstance(arg, PyTypeTestNode): - arg.exact_builtin_type = False - args[0] = arg - - # Coerce arguments - some_args_in_temps = False - for i in range(min(max_nargs, actual_nargs)): - formal_arg = func_type.args[i] - formal_type = formal_arg.type - arg = args[i].coerce_to(formal_type, env) - if formal_arg.not_none: - # C methods must do the None checks at *call* time - arg = arg.as_none_safe_node( - "cannot pass None into a C function argument that is declared 'not None'") - if arg.is_temp: - if i > 0: - # first argument in temp doesn't impact subsequent arguments - some_args_in_temps = True - elif arg.type.is_pyobject and not env.nogil: - if i == 0 and self.self is not None: - # a method's cloned "self" argument is ok - pass - elif arg.nonlocally_immutable(): - # plain local variables are ok - pass - else: - # we do not safely own the argument's reference, - # but we must make sure it cannot be collected - # before we return from the function, so we create - # an owned temp reference to it - if i > 0: # first argument doesn't matter - some_args_in_temps = True - arg = arg.coerce_to_temp(env) - args[i] = arg - - # handle additional varargs parameters - for i in range(max_nargs, actual_nargs): - arg = args[i] - if arg.type.is_pyobject: - if arg.type is str_type: - arg_ctype = PyrexTypes.c_char_ptr_type - else: - arg_ctype = arg.type.default_coerced_ctype() - if arg_ctype is None: - error(self.args[i].pos, - "Python object cannot be passed as a varargs parameter") - else: - args[i] = arg = arg.coerce_to(arg_ctype, env) - if arg.is_temp and i > 0: - some_args_in_temps = True - - if some_args_in_temps: - # if some args are temps and others are not, they may get - # constructed in the wrong order (temps first) => make - # sure they are either all temps or all not temps (except - # for the last argument, which is evaluated last in any - # case) - for i in range(actual_nargs-1): - if i == 0 and self.self is not None: - continue # self is ok - arg = args[i] - if arg.nonlocally_immutable(): - # locals, C functions, unassignable types are safe. - pass - elif arg.type.is_cpp_class: - # Assignment has side effects, avoid. - pass - elif env.nogil and arg.type.is_pyobject: - # can't copy a Python reference into a temp in nogil - # env (this is safe: a construction would fail in - # nogil anyway) - pass - else: - #self.args[i] = arg.coerce_to_temp(env) - # instead: issue a warning - if i > 0 or i == 1 and self.self is not None: # skip first arg - warning(arg.pos, "Argument evaluation order in C function call is undefined and may not be as expected", 0) - break - - self.args[:] = args - - # Calc result type and code fragment - if isinstance(self.function, NewExprNode): - self.type = PyrexTypes.CPtrType(self.function.class_type) - else: - self.type = func_type.return_type - - if self.function.is_name or self.function.is_attribute: - func_entry = self.function.entry - if func_entry and (func_entry.utility_code or func_entry.utility_code_definition): - self.is_temp = 1 # currently doesn't work for self.calculate_result_code() - - if self.type.is_pyobject: - self.result_ctype = py_object_type - self.is_temp = 1 - elif func_type.exception_value is not None or func_type.exception_check: - self.is_temp = 1 - elif self.type.is_memoryviewslice: - self.is_temp = 1 - # func_type.exception_check = True - - if self.is_temp and self.type.is_reference: - self.type = PyrexTypes.CFakeReferenceType(self.type.ref_base_type) - - # Called in 'nogil' context? - self.nogil = env.nogil - if (self.nogil and - func_type.exception_check and - func_type.exception_check != '+'): - env.use_utility_code(pyerr_occurred_withgil_utility_code) - # C++ exception handler - if func_type.exception_check == '+': - if func_type.exception_value is None: - env.use_utility_code(UtilityCode.load_cached("CppExceptionConversion", "CppSupport.cpp")) - - self.overflowcheck = env.directives['overflowcheck'] - - def calculate_result_code(self): - return self.c_call_code() - - def c_call_code(self): - func_type = self.function_type() - if self.type is PyrexTypes.error_type or not func_type.is_cfunction: - return "" - formal_args = func_type.args - arg_list_code = [] - args = list(zip(formal_args, self.args)) - max_nargs = len(func_type.args) - expected_nargs = max_nargs - func_type.optional_arg_count - actual_nargs = len(self.args) - for formal_arg, actual_arg in args[:expected_nargs]: - arg_code = actual_arg.result_as(formal_arg.type) - arg_list_code.append(arg_code) - - if func_type.is_overridable: - arg_list_code.append(str(int(self.wrapper_call or self.function.entry.is_unbound_cmethod))) - - if func_type.optional_arg_count: - if expected_nargs == actual_nargs: - optional_args = 'NULL' - else: - optional_args = "&%s" % self.opt_arg_struct - arg_list_code.append(optional_args) - - for actual_arg in self.args[len(formal_args):]: - arg_list_code.append(actual_arg.result()) - - result = "%s(%s)" % (self.function.result(), ', '.join(arg_list_code)) - return result - - def is_c_result_required(self): - func_type = self.function_type() - if not func_type.exception_value or func_type.exception_check == '+': - return False # skip allocation of unused result temp - return True - - def generate_evaluation_code(self, code): - function = self.function - if function.is_name or function.is_attribute: - code.globalstate.use_entry_utility_code(function.entry) - - abs_function_cnames = ('abs', 'labs', '__Pyx_abs_longlong') - is_signed_int = self.type.is_int and self.type.signed - if self.overflowcheck and is_signed_int and function.result() in abs_function_cnames: - code.globalstate.use_utility_code(UtilityCode.load_cached("Common", "Overflow.c")) - code.putln('if (unlikely(%s == __PYX_MIN(%s))) {\ - PyErr_SetString(PyExc_OverflowError,\ - "Trying to take the absolute value of the most negative integer is not defined."); %s; }' % ( - self.args[0].result(), - self.args[0].type.empty_declaration_code(), - code.error_goto(self.pos))) - - if not function.type.is_pyobject or len(self.arg_tuple.args) > 1 or ( - self.arg_tuple.args and self.arg_tuple.is_literal): - super(SimpleCallNode, self).generate_evaluation_code(code) - return - - # Special case 0-args and try to avoid explicit tuple creation for Python calls with 1 arg. - arg = self.arg_tuple.args[0] if self.arg_tuple.args else None - subexprs = (self.self, self.coerced_self, function, arg) - for subexpr in subexprs: - if subexpr is not None: - subexpr.generate_evaluation_code(code) - - code.mark_pos(self.pos) - assert self.is_temp - self.allocate_temp_result(code) - - if arg is None: - code.globalstate.use_utility_code(UtilityCode.load_cached( - "PyObjectCallNoArg", "ObjectHandling.c")) - code.putln( - "%s = __Pyx_PyObject_CallNoArg(%s); %s" % ( - self.result(), - function.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - else: - code.globalstate.use_utility_code(UtilityCode.load_cached( - "PyObjectCallOneArg", "ObjectHandling.c")) - code.putln( - "%s = __Pyx_PyObject_CallOneArg(%s, %s); %s" % ( - self.result(), - function.py_result(), - arg.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - - code.put_gotref(self.py_result()) - - for subexpr in subexprs: - if subexpr is not None: - subexpr.generate_disposal_code(code) - subexpr.free_temps(code) - - def generate_result_code(self, code): - func_type = self.function_type() - if func_type.is_pyobject: - arg_code = self.arg_tuple.py_result() - code.globalstate.use_utility_code(UtilityCode.load_cached( - "PyObjectCall", "ObjectHandling.c")) - code.putln( - "%s = __Pyx_PyObject_Call(%s, %s, NULL); %s" % ( - self.result(), - self.function.py_result(), - arg_code, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - elif func_type.is_cfunction: - if self.has_optional_args: - actual_nargs = len(self.args) - expected_nargs = len(func_type.args) - func_type.optional_arg_count - self.opt_arg_struct = code.funcstate.allocate_temp( - func_type.op_arg_struct.base_type, manage_ref=True) - code.putln("%s.%s = %s;" % ( - self.opt_arg_struct, - Naming.pyrex_prefix + "n", - len(self.args) - expected_nargs)) - args = list(zip(func_type.args, self.args)) - for formal_arg, actual_arg in args[expected_nargs:actual_nargs]: - code.putln("%s.%s = %s;" % ( - self.opt_arg_struct, - func_type.opt_arg_cname(formal_arg.name), - actual_arg.result_as(formal_arg.type))) - exc_checks = [] - if self.type.is_pyobject and self.is_temp: - exc_checks.append("!%s" % self.result()) - elif self.type.is_memoryviewslice: - assert self.is_temp - exc_checks.append(self.type.error_condition(self.result())) - elif func_type.exception_check != '+': - exc_val = func_type.exception_value - exc_check = func_type.exception_check - if exc_val is not None: - exc_checks.append("%s == %s" % (self.result(), func_type.return_type.cast_code(exc_val))) - if exc_check: - if self.nogil: - exc_checks.append("__Pyx_ErrOccurredWithGIL()") - else: - exc_checks.append("PyErr_Occurred()") - if self.is_temp or exc_checks: - rhs = self.c_call_code() - if self.result(): - lhs = "%s = " % self.result() - if self.is_temp and self.type.is_pyobject: - #return_type = self.type # func_type.return_type - #print "SimpleCallNode.generate_result_code: casting", rhs, \ - # "from", return_type, "to pyobject" ### - rhs = typecast(py_object_type, self.type, rhs) - else: - lhs = "" - if func_type.exception_check == '+': - translate_cpp_exception(code, self.pos, '%s%s;' % (lhs, rhs), - self.result() if self.type.is_pyobject else None, - func_type.exception_value, self.nogil) - else: - if exc_checks: - goto_error = code.error_goto_if(" && ".join(exc_checks), self.pos) - else: - goto_error = "" - code.putln("%s%s; %s" % (lhs, rhs, goto_error)) - if self.type.is_pyobject and self.result(): - code.put_gotref(self.py_result()) - if self.has_optional_args: - code.funcstate.release_temp(self.opt_arg_struct) - - -class NumPyMethodCallNode(ExprNode): - # Pythran call to a NumPy function or method. - # - # function_cname string the function/method to call - # arg_tuple TupleNode the arguments as an args tuple - - subexprs = ['arg_tuple'] - is_temp = True - may_return_none = True - - def generate_evaluation_code(self, code): - code.mark_pos(self.pos) - self.allocate_temp_result(code) - - assert self.arg_tuple.mult_factor is None - args = self.arg_tuple.args - for arg in args: - arg.generate_evaluation_code(code) - - code.putln("// function evaluation code for numpy function") - code.putln("__Pyx_call_destructor(%s);" % self.result()) - code.putln("new (&%s) decltype(%s){%s{}(%s)};" % ( - self.result(), - self.result(), - self.function_cname, - ", ".join(a.pythran_result() for a in args))) - - -class PyMethodCallNode(SimpleCallNode): - # Specialised call to a (potential) PyMethodObject with non-constant argument tuple. - # Allows the self argument to be injected directly instead of repacking a tuple for it. - # - # function ExprNode the function/method object to call - # arg_tuple TupleNode the arguments for the args tuple - - subexprs = ['function', 'arg_tuple'] - is_temp = True - - def generate_evaluation_code(self, code): - code.mark_pos(self.pos) - self.allocate_temp_result(code) - - self.function.generate_evaluation_code(code) - assert self.arg_tuple.mult_factor is None - args = self.arg_tuple.args - for arg in args: - arg.generate_evaluation_code(code) - - # make sure function is in temp so that we can replace the reference below if it's a method - reuse_function_temp = self.function.is_temp - if reuse_function_temp: - function = self.function.result() - else: - function = code.funcstate.allocate_temp(py_object_type, manage_ref=True) - self.function.make_owned_reference(code) - code.put("%s = %s; " % (function, self.function.py_result())) - self.function.generate_disposal_code(code) - self.function.free_temps(code) - - self_arg = code.funcstate.allocate_temp(py_object_type, manage_ref=True) - code.putln("%s = NULL;" % self_arg) - arg_offset_cname = None - if len(args) > 1: - arg_offset_cname = code.funcstate.allocate_temp(PyrexTypes.c_int_type, manage_ref=False) - code.putln("%s = 0;" % arg_offset_cname) - - def attribute_is_likely_method(attr): - obj = attr.obj - if obj.is_name and obj.entry.is_pyglobal: - return False # more likely to be a function - return True - - if self.function.is_attribute: - likely_method = 'likely' if attribute_is_likely_method(self.function) else 'unlikely' - elif self.function.is_name and self.function.cf_state: - # not an attribute itself, but might have been assigned from one (e.g. bound method) - for assignment in self.function.cf_state: - value = assignment.rhs - if value and value.is_attribute and value.obj.type and value.obj.type.is_pyobject: - if attribute_is_likely_method(value): - likely_method = 'likely' - break - else: - likely_method = 'unlikely' - else: - likely_method = 'unlikely' - - code.putln("if (CYTHON_UNPACK_METHODS && %s(PyMethod_Check(%s))) {" % (likely_method, function)) - code.putln("%s = PyMethod_GET_SELF(%s);" % (self_arg, function)) - # the following is always true in Py3 (kept only for safety), - # but is false for unbound methods in Py2 - code.putln("if (likely(%s)) {" % self_arg) - code.putln("PyObject* function = PyMethod_GET_FUNCTION(%s);" % function) - code.put_incref(self_arg, py_object_type) - code.put_incref("function", py_object_type) - # free method object as early to possible to enable reuse from CPython's freelist - code.put_decref_set(function, "function") - if len(args) > 1: - code.putln("%s = 1;" % arg_offset_cname) - code.putln("}") - code.putln("}") - - if not args: - # fastest special case: try to avoid tuple creation - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectCallNoArg", "ObjectHandling.c")) - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectCallOneArg", "ObjectHandling.c")) - code.putln( - "%s = (%s) ? __Pyx_PyObject_CallOneArg(%s, %s) : __Pyx_PyObject_CallNoArg(%s);" % ( - self.result(), self_arg, - function, self_arg, - function)) - code.put_xdecref_clear(self_arg, py_object_type) - code.funcstate.release_temp(self_arg) - code.putln(code.error_goto_if_null(self.result(), self.pos)) - code.put_gotref(self.py_result()) - elif len(args) == 1: - # fastest special case: try to avoid tuple creation - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectCall2Args", "ObjectHandling.c")) - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectCallOneArg", "ObjectHandling.c")) - arg = args[0] - code.putln( - "%s = (%s) ? __Pyx_PyObject_Call2Args(%s, %s, %s) : __Pyx_PyObject_CallOneArg(%s, %s);" % ( - self.result(), self_arg, - function, self_arg, arg.py_result(), - function, arg.py_result())) - code.put_xdecref_clear(self_arg, py_object_type) - code.funcstate.release_temp(self_arg) - arg.generate_disposal_code(code) - arg.free_temps(code) - code.putln(code.error_goto_if_null(self.result(), self.pos)) - code.put_gotref(self.py_result()) - else: - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyFunctionFastCall", "ObjectHandling.c")) - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyCFunctionFastCall", "ObjectHandling.c")) - for test_func, call_prefix in [('PyFunction_Check', 'Py'), ('__Pyx_PyFastCFunction_Check', 'PyC')]: - code.putln("#if CYTHON_FAST_%sCALL" % call_prefix.upper()) - code.putln("if (%s(%s)) {" % (test_func, function)) - code.putln("PyObject *%s[%d] = {%s, %s};" % ( - Naming.quick_temp_cname, - len(args)+1, - self_arg, - ', '.join(arg.py_result() for arg in args))) - code.putln("%s = __Pyx_%sFunction_FastCall(%s, %s+1-%s, %d+%s); %s" % ( - self.result(), - call_prefix, - function, - Naming.quick_temp_cname, - arg_offset_cname, - len(args), - arg_offset_cname, - code.error_goto_if_null(self.result(), self.pos))) - code.put_xdecref_clear(self_arg, py_object_type) - code.put_gotref(self.py_result()) - for arg in args: - arg.generate_disposal_code(code) - code.putln("} else") - code.putln("#endif") - - code.putln("{") - args_tuple = code.funcstate.allocate_temp(py_object_type, manage_ref=True) - code.putln("%s = PyTuple_New(%d+%s); %s" % ( - args_tuple, len(args), arg_offset_cname, - code.error_goto_if_null(args_tuple, self.pos))) - code.put_gotref(args_tuple) - - if len(args) > 1: - code.putln("if (%s) {" % self_arg) - code.putln("__Pyx_GIVEREF(%s); PyTuple_SET_ITEM(%s, 0, %s); %s = NULL;" % ( - self_arg, args_tuple, self_arg, self_arg)) # stealing owned ref in this case - code.funcstate.release_temp(self_arg) - if len(args) > 1: - code.putln("}") - - for i, arg in enumerate(args): - arg.make_owned_reference(code) - code.put_giveref(arg.py_result()) - code.putln("PyTuple_SET_ITEM(%s, %d+%s, %s);" % ( - args_tuple, i, arg_offset_cname, arg.py_result())) - if len(args) > 1: - code.funcstate.release_temp(arg_offset_cname) - - for arg in args: - arg.generate_post_assignment_code(code) - arg.free_temps(code) - - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectCall", "ObjectHandling.c")) - code.putln( - "%s = __Pyx_PyObject_Call(%s, %s, NULL); %s" % ( - self.result(), - function, args_tuple, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - code.put_decref_clear(args_tuple, py_object_type) - code.funcstate.release_temp(args_tuple) - - if len(args) == 1: - code.putln("}") - code.putln("}") # !CYTHON_FAST_PYCALL - - if reuse_function_temp: - self.function.generate_disposal_code(code) - self.function.free_temps(code) - else: - code.put_decref_clear(function, py_object_type) - code.funcstate.release_temp(function) - - -class InlinedDefNodeCallNode(CallNode): - # Inline call to defnode - # - # function PyCFunctionNode - # function_name NameNode - # args [ExprNode] - - subexprs = ['args', 'function_name'] - is_temp = 1 - type = py_object_type - function = None - function_name = None - - def can_be_inlined(self): - func_type= self.function.def_node - if func_type.star_arg or func_type.starstar_arg: - return False - if len(func_type.args) != len(self.args): - return False - if func_type.num_kwonly_args: - return False # actually wrong number of arguments - return True - - def analyse_types(self, env): - self.function_name = self.function_name.analyse_types(env) - - self.args = [ arg.analyse_types(env) for arg in self.args ] - func_type = self.function.def_node - actual_nargs = len(self.args) - - # Coerce arguments - some_args_in_temps = False - for i in range(actual_nargs): - formal_type = func_type.args[i].type - arg = self.args[i].coerce_to(formal_type, env) - if arg.is_temp: - if i > 0: - # first argument in temp doesn't impact subsequent arguments - some_args_in_temps = True - elif arg.type.is_pyobject and not env.nogil: - if arg.nonlocally_immutable(): - # plain local variables are ok - pass - else: - # we do not safely own the argument's reference, - # but we must make sure it cannot be collected - # before we return from the function, so we create - # an owned temp reference to it - if i > 0: # first argument doesn't matter - some_args_in_temps = True - arg = arg.coerce_to_temp(env) - self.args[i] = arg - - if some_args_in_temps: - # if some args are temps and others are not, they may get - # constructed in the wrong order (temps first) => make - # sure they are either all temps or all not temps (except - # for the last argument, which is evaluated last in any - # case) - for i in range(actual_nargs-1): - arg = self.args[i] - if arg.nonlocally_immutable(): - # locals, C functions, unassignable types are safe. - pass - elif arg.type.is_cpp_class: - # Assignment has side effects, avoid. - pass - elif env.nogil and arg.type.is_pyobject: - # can't copy a Python reference into a temp in nogil - # env (this is safe: a construction would fail in - # nogil anyway) - pass - else: - #self.args[i] = arg.coerce_to_temp(env) - # instead: issue a warning - if i > 0: - warning(arg.pos, "Argument evaluation order in C function call is undefined and may not be as expected", 0) - break - return self - - def generate_result_code(self, code): - arg_code = [self.function_name.py_result()] - func_type = self.function.def_node - for arg, proto_arg in zip(self.args, func_type.args): - if arg.type.is_pyobject: - arg_code.append(arg.result_as(proto_arg.type)) - else: - arg_code.append(arg.result()) - arg_code = ', '.join(arg_code) - code.putln( - "%s = %s(%s); %s" % ( - self.result(), - self.function.def_node.entry.pyfunc_cname, - arg_code, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class PythonCapiFunctionNode(ExprNode): - subexprs = [] - - def __init__(self, pos, py_name, cname, func_type, utility_code = None): - ExprNode.__init__(self, pos, name=py_name, cname=cname, - type=func_type, utility_code=utility_code) - - def analyse_types(self, env): - return self - - def generate_result_code(self, code): - if self.utility_code: - code.globalstate.use_utility_code(self.utility_code) - - def calculate_result_code(self): - return self.cname - - -class PythonCapiCallNode(SimpleCallNode): - # Python C-API Function call (only created in transforms) - - # By default, we assume that the call never returns None, as this - # is true for most C-API functions in CPython. If this does not - # apply to a call, set the following to True (or None to inherit - # the default behaviour). - may_return_none = False - - def __init__(self, pos, function_name, func_type, - utility_code = None, py_name=None, **kwargs): - self.type = func_type.return_type - self.result_ctype = self.type - self.function = PythonCapiFunctionNode( - pos, py_name, function_name, func_type, - utility_code = utility_code) - # call this last so that we can override the constructed - # attributes above with explicit keyword arguments if required - SimpleCallNode.__init__(self, pos, **kwargs) - - -class CachedBuiltinMethodCallNode(CallNode): - # Python call to a method of a known Python builtin (only created in transforms) - - subexprs = ['obj', 'args'] - is_temp = True - - def __init__(self, call_node, obj, method_name, args): - super(CachedBuiltinMethodCallNode, self).__init__( - call_node.pos, - obj=obj, method_name=method_name, args=args, - may_return_none=call_node.may_return_none, - type=call_node.type) - - def may_be_none(self): - if self.may_return_none is not None: - return self.may_return_none - return ExprNode.may_be_none(self) - - def generate_result_code(self, code): - type_cname = self.obj.type.cname - obj_cname = self.obj.py_result() - args = [arg.py_result() for arg in self.args] - call_code = code.globalstate.cached_unbound_method_call_code( - obj_cname, type_cname, self.method_name, args) - code.putln("%s = %s; %s" % ( - self.result(), call_code, - code.error_goto_if_null(self.result(), self.pos) - )) - code.put_gotref(self.result()) - - -class GeneralCallNode(CallNode): - # General Python function call, including keyword, - # * and ** arguments. - # - # function ExprNode - # positional_args ExprNode Tuple of positional arguments - # keyword_args ExprNode or None Dict of keyword arguments - - type = py_object_type - - subexprs = ['function', 'positional_args', 'keyword_args'] - - nogil_check = Node.gil_error - - def compile_time_value(self, denv): - function = self.function.compile_time_value(denv) - positional_args = self.positional_args.compile_time_value(denv) - keyword_args = self.keyword_args.compile_time_value(denv) - try: - return function(*positional_args, **keyword_args) - except Exception as e: - self.compile_time_value_error(e) - - def explicit_args_kwds(self): - if (self.keyword_args and not self.keyword_args.is_dict_literal or - not self.positional_args.is_sequence_constructor): - raise CompileError(self.pos, - 'Compile-time keyword arguments must be explicit.') - return self.positional_args.args, self.keyword_args - - def analyse_types(self, env): - if self.analyse_as_type_constructor(env): - return self - self.function = self.function.analyse_types(env) - if not self.function.type.is_pyobject: - if self.function.type.is_error: - self.type = error_type - return self - if hasattr(self.function, 'entry'): - node = self.map_to_simple_call_node() - if node is not None and node is not self: - return node.analyse_types(env) - elif self.function.entry.as_variable: - self.function = self.function.coerce_to_pyobject(env) - elif node is self: - error(self.pos, - "Non-trivial keyword arguments and starred " - "arguments not allowed in cdef functions.") - else: - # error was already reported - pass - else: - self.function = self.function.coerce_to_pyobject(env) - if self.keyword_args: - self.keyword_args = self.keyword_args.analyse_types(env) - self.positional_args = self.positional_args.analyse_types(env) - self.positional_args = \ - self.positional_args.coerce_to_pyobject(env) - self.set_py_result_type(self.function) - self.is_temp = 1 - return self - - def map_to_simple_call_node(self): - """ - Tries to map keyword arguments to declared positional arguments. - Returns self to try a Python call, None to report an error - or a SimpleCallNode if the mapping succeeds. - """ - if not isinstance(self.positional_args, TupleNode): - # has starred argument - return self - if not self.keyword_args.is_dict_literal: - # keywords come from arbitrary expression => nothing to do here - return self - function = self.function - entry = getattr(function, 'entry', None) - if not entry: - return self - function_type = entry.type - if function_type.is_ptr: - function_type = function_type.base_type - if not function_type.is_cfunction: - return self - - pos_args = self.positional_args.args - kwargs = self.keyword_args - declared_args = function_type.args - if entry.is_cmethod: - declared_args = declared_args[1:] # skip 'self' - - if len(pos_args) > len(declared_args): - error(self.pos, "function call got too many positional arguments, " - "expected %d, got %s" % (len(declared_args), - len(pos_args))) - return None - - matched_args = set([ arg.name for arg in declared_args[:len(pos_args)] - if arg.name ]) - unmatched_args = declared_args[len(pos_args):] - matched_kwargs_count = 0 - args = list(pos_args) - - # check for duplicate keywords - seen = set(matched_args) - has_errors = False - for arg in kwargs.key_value_pairs: - name = arg.key.value - if name in seen: - error(arg.pos, "argument '%s' passed twice" % name) - has_errors = True - # continue to report more errors if there are any - seen.add(name) - - # match keywords that are passed in order - for decl_arg, arg in zip(unmatched_args, kwargs.key_value_pairs): - name = arg.key.value - if decl_arg.name == name: - matched_args.add(name) - matched_kwargs_count += 1 - args.append(arg.value) - else: - break - - # match keyword arguments that are passed out-of-order, but keep - # the evaluation of non-simple arguments in order by moving them - # into temps - from .UtilNodes import EvalWithTempExprNode, LetRefNode - temps = [] - if len(kwargs.key_value_pairs) > matched_kwargs_count: - unmatched_args = declared_args[len(args):] - keywords = dict([ (arg.key.value, (i+len(pos_args), arg)) - for i, arg in enumerate(kwargs.key_value_pairs) ]) - first_missing_keyword = None - for decl_arg in unmatched_args: - name = decl_arg.name - if name not in keywords: - # missing keyword argument => either done or error - if not first_missing_keyword: - first_missing_keyword = name - continue - elif first_missing_keyword: - if entry.as_variable: - # we might be able to convert the function to a Python - # object, which then allows full calling semantics - # with default values in gaps - currently, we only - # support optional arguments at the end - return self - # wasn't the last keyword => gaps are not supported - error(self.pos, "C function call is missing " - "argument '%s'" % first_missing_keyword) - return None - pos, arg = keywords[name] - matched_args.add(name) - matched_kwargs_count += 1 - if arg.value.is_simple(): - args.append(arg.value) - else: - temp = LetRefNode(arg.value) - assert temp.is_simple() - args.append(temp) - temps.append((pos, temp)) - - if temps: - # may have to move preceding non-simple args into temps - final_args = [] - new_temps = [] - first_temp_arg = temps[0][-1] - for arg_value in args: - if arg_value is first_temp_arg: - break # done - if arg_value.is_simple(): - final_args.append(arg_value) - else: - temp = LetRefNode(arg_value) - new_temps.append(temp) - final_args.append(temp) - if new_temps: - args = final_args - temps = new_temps + [ arg for i,arg in sorted(temps) ] - - # check for unexpected keywords - for arg in kwargs.key_value_pairs: - name = arg.key.value - if name not in matched_args: - has_errors = True - error(arg.pos, - "C function got unexpected keyword argument '%s'" % - name) - - if has_errors: - # error was reported already - return None - - # all keywords mapped to positional arguments - # if we are missing arguments, SimpleCallNode will figure it out - node = SimpleCallNode(self.pos, function=function, args=args) - for temp in temps[::-1]: - node = EvalWithTempExprNode(temp, node) - return node - - def generate_result_code(self, code): - if self.type.is_error: return - if self.keyword_args: - kwargs = self.keyword_args.py_result() - else: - kwargs = 'NULL' - code.globalstate.use_utility_code(UtilityCode.load_cached( - "PyObjectCall", "ObjectHandling.c")) - code.putln( - "%s = __Pyx_PyObject_Call(%s, %s, %s); %s" % ( - self.result(), - self.function.py_result(), - self.positional_args.py_result(), - kwargs, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class AsTupleNode(ExprNode): - # Convert argument to tuple. Used for normalising - # the * argument of a function call. - # - # arg ExprNode - - subexprs = ['arg'] - is_temp = 1 - - def calculate_constant_result(self): - self.constant_result = tuple(self.arg.constant_result) - - def compile_time_value(self, denv): - arg = self.arg.compile_time_value(denv) - try: - return tuple(arg) - except Exception as e: - self.compile_time_value_error(e) - - def analyse_types(self, env): - self.arg = self.arg.analyse_types(env).coerce_to_pyobject(env) - if self.arg.type is tuple_type: - return self.arg.as_none_safe_node("'NoneType' object is not iterable") - self.type = tuple_type - return self - - def may_be_none(self): - return False - - nogil_check = Node.gil_error - gil_message = "Constructing Python tuple" - - def generate_result_code(self, code): - cfunc = "__Pyx_PySequence_Tuple" if self.arg.type in (py_object_type, tuple_type) else "PySequence_Tuple" - code.putln( - "%s = %s(%s); %s" % ( - self.result(), - cfunc, self.arg.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class MergedDictNode(ExprNode): - # Helper class for keyword arguments and other merged dicts. - # - # keyword_args [DictNode or other ExprNode] - - subexprs = ['keyword_args'] - is_temp = 1 - type = dict_type - reject_duplicates = True - - def calculate_constant_result(self): - result = {} - reject_duplicates = self.reject_duplicates - for item in self.keyword_args: - if item.is_dict_literal: - # process items in order - items = ((key.constant_result, value.constant_result) - for key, value in item.key_value_pairs) - else: - items = item.constant_result.iteritems() - - for key, value in items: - if reject_duplicates and key in result: - raise ValueError("duplicate keyword argument found: %s" % key) - result[key] = value - - self.constant_result = result - - def compile_time_value(self, denv): - result = {} - reject_duplicates = self.reject_duplicates - for item in self.keyword_args: - if item.is_dict_literal: - # process items in order - items = [(key.compile_time_value(denv), value.compile_time_value(denv)) - for key, value in item.key_value_pairs] - else: - items = item.compile_time_value(denv).iteritems() - - try: - for key, value in items: - if reject_duplicates and key in result: - raise ValueError("duplicate keyword argument found: %s" % key) - result[key] = value - except Exception as e: - self.compile_time_value_error(e) - return result - - def type_dependencies(self, env): - return () - - def infer_type(self, env): - return dict_type - - def analyse_types(self, env): - self.keyword_args = [ - arg.analyse_types(env).coerce_to_pyobject(env).as_none_safe_node( - # FIXME: CPython's error message starts with the runtime function name - 'argument after ** must be a mapping, not NoneType') - for arg in self.keyword_args - ] - - return self - - def may_be_none(self): - return False - - gil_message = "Constructing Python dict" - - def generate_evaluation_code(self, code): - code.mark_pos(self.pos) - self.allocate_temp_result(code) - - args = iter(self.keyword_args) - item = next(args) - item.generate_evaluation_code(code) - if item.type is not dict_type: - # CPython supports calling functions with non-dicts, so do we - code.putln('if (likely(PyDict_CheckExact(%s))) {' % - item.py_result()) - - if item.is_dict_literal: - item.make_owned_reference(code) - code.putln("%s = %s;" % (self.result(), item.py_result())) - item.generate_post_assignment_code(code) - else: - code.putln("%s = PyDict_Copy(%s); %s" % ( - self.result(), - item.py_result(), - code.error_goto_if_null(self.result(), item.pos))) - code.put_gotref(self.result()) - item.generate_disposal_code(code) - - if item.type is not dict_type: - code.putln('} else {') - code.putln("%s = PyObject_CallFunctionObjArgs((PyObject*)&PyDict_Type, %s, NULL); %s" % ( - self.result(), - item.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - item.generate_disposal_code(code) - code.putln('}') - item.free_temps(code) - - helpers = set() - for item in args: - if item.is_dict_literal: - # inline update instead of creating an intermediate dict - for arg in item.key_value_pairs: - arg.generate_evaluation_code(code) - if self.reject_duplicates: - code.putln("if (unlikely(PyDict_Contains(%s, %s))) {" % ( - self.result(), - arg.key.py_result())) - helpers.add("RaiseDoubleKeywords") - # FIXME: find out function name at runtime! - code.putln('__Pyx_RaiseDoubleKeywordsError("function", %s); %s' % ( - arg.key.py_result(), - code.error_goto(self.pos))) - code.putln("}") - code.put_error_if_neg(arg.key.pos, "PyDict_SetItem(%s, %s, %s)" % ( - self.result(), - arg.key.py_result(), - arg.value.py_result())) - arg.generate_disposal_code(code) - arg.free_temps(code) - else: - item.generate_evaluation_code(code) - if self.reject_duplicates: - # merge mapping into kwdict one by one as we need to check for duplicates - helpers.add("MergeKeywords") - code.put_error_if_neg(item.pos, "__Pyx_MergeKeywords(%s, %s)" % ( - self.result(), item.py_result())) - else: - # simple case, just add all entries - helpers.add("RaiseMappingExpected") - code.putln("if (unlikely(PyDict_Update(%s, %s) < 0)) {" % ( - self.result(), item.py_result())) - code.putln("if (PyErr_ExceptionMatches(PyExc_AttributeError)) " - "__Pyx_RaiseMappingExpectedError(%s);" % item.py_result()) - code.putln(code.error_goto(item.pos)) - code.putln("}") - item.generate_disposal_code(code) - item.free_temps(code) - - for helper in sorted(helpers): - code.globalstate.use_utility_code(UtilityCode.load_cached(helper, "FunctionArguments.c")) - - def annotate(self, code): - for item in self.keyword_args: - item.annotate(code) - - -class AttributeNode(ExprNode): - # obj.attribute - # - # obj ExprNode - # attribute string - # needs_none_check boolean Used if obj is an extension type. - # If set to True, it is known that the type is not None. - # - # Used internally: - # - # is_py_attr boolean Is a Python getattr operation - # member string C name of struct member - # is_called boolean Function call is being done on result - # entry Entry Symbol table entry of attribute - - is_attribute = 1 - subexprs = ['obj'] - - type = PyrexTypes.error_type - entry = None - is_called = 0 - needs_none_check = True - is_memslice_transpose = False - is_special_lookup = False - is_py_attr = 0 - - def as_cython_attribute(self): - if (isinstance(self.obj, NameNode) and - self.obj.is_cython_module and not - self.attribute == u"parallel"): - return self.attribute - - cy = self.obj.as_cython_attribute() - if cy: - return "%s.%s" % (cy, self.attribute) - return None - - def coerce_to(self, dst_type, env): - # If coercing to a generic pyobject and this is a cpdef function - # we can create the corresponding attribute - if dst_type is py_object_type: - entry = self.entry - if entry and entry.is_cfunction and entry.as_variable: - # must be a cpdef function - self.is_temp = 1 - self.entry = entry.as_variable - self.analyse_as_python_attribute(env) - return self - return ExprNode.coerce_to(self, dst_type, env) - - def calculate_constant_result(self): - attr = self.attribute - if attr.startswith("__") and attr.endswith("__"): - return - self.constant_result = getattr(self.obj.constant_result, attr) - - def compile_time_value(self, denv): - attr = self.attribute - if attr.startswith("__") and attr.endswith("__"): - error(self.pos, - "Invalid attribute name '%s' in compile-time expression" % attr) - return None - obj = self.obj.compile_time_value(denv) - try: - return getattr(obj, attr) - except Exception as e: - self.compile_time_value_error(e) - - def type_dependencies(self, env): - return self.obj.type_dependencies(env) - - def infer_type(self, env): - # FIXME: this is way too redundant with analyse_types() - node = self.analyse_as_cimported_attribute_node(env, target=False) - if node is not None: - if node.entry.type and node.entry.type.is_cfunction: - # special-case - function converted to pointer - return PyrexTypes.CPtrType(node.entry.type) - else: - return node.entry.type - node = self.analyse_as_type_attribute(env) - if node is not None: - return node.entry.type - obj_type = self.obj.infer_type(env) - self.analyse_attribute(env, obj_type=obj_type) - if obj_type.is_builtin_type and self.type.is_cfunction: - # special case: C-API replacements for C methods of - # builtin types cannot be inferred as C functions as - # that would prevent their use as bound methods - return py_object_type - elif self.entry and self.entry.is_cmethod: - # special case: bound methods should not be inferred - # as their unbound method types - return py_object_type - return self.type - - def analyse_target_declaration(self, env): - pass - - def analyse_target_types(self, env): - node = self.analyse_types(env, target = 1) - if node.type.is_const: - error(self.pos, "Assignment to const attribute '%s'" % self.attribute) - if not node.is_lvalue(): - error(self.pos, "Assignment to non-lvalue of type '%s'" % self.type) - return node - - def analyse_types(self, env, target = 0): - self.initialized_check = env.directives['initializedcheck'] - node = self.analyse_as_cimported_attribute_node(env, target) - if node is None and not target: - node = self.analyse_as_type_attribute(env) - if node is None: - node = self.analyse_as_ordinary_attribute_node(env, target) - assert node is not None - if node.entry: - node.entry.used = True - if node.is_attribute: - node.wrap_obj_in_nonecheck(env) - return node - - def analyse_as_cimported_attribute_node(self, env, target): - # Try to interpret this as a reference to an imported - # C const, type, var or function. If successful, mutates - # this node into a NameNode and returns 1, otherwise - # returns 0. - module_scope = self.obj.analyse_as_module(env) - if module_scope: - entry = module_scope.lookup_here(self.attribute) - if entry and ( - entry.is_cglobal or entry.is_cfunction - or entry.is_type or entry.is_const): - return self.as_name_node(env, entry, target) - if self.is_cimported_module_without_shadow(env): - error(self.pos, "cimported module has no attribute '%s'" % self.attribute) - return self - return None - - def analyse_as_type_attribute(self, env): - # Try to interpret this as a reference to an unbound - # C method of an extension type or builtin type. If successful, - # creates a corresponding NameNode and returns it, otherwise - # returns None. - if self.obj.is_string_literal: - return - type = self.obj.analyse_as_type(env) - if type: - if type.is_extension_type or type.is_builtin_type or type.is_cpp_class: - entry = type.scope.lookup_here(self.attribute) - if entry and (entry.is_cmethod or type.is_cpp_class and entry.type.is_cfunction): - if type.is_builtin_type: - if not self.is_called: - # must handle this as Python object - return None - ubcm_entry = entry - else: - # Create a temporary entry describing the C method - # as an ordinary function. - if entry.func_cname and not hasattr(entry.type, 'op_arg_struct'): - cname = entry.func_cname - if entry.type.is_static_method or ( - env.parent_scope and env.parent_scope.is_cpp_class_scope): - ctype = entry.type - elif type.is_cpp_class: - error(self.pos, "%s not a static member of %s" % (entry.name, type)) - ctype = PyrexTypes.error_type - else: - # Fix self type. - ctype = copy.copy(entry.type) - ctype.args = ctype.args[:] - ctype.args[0] = PyrexTypes.CFuncTypeArg('self', type, 'self', None) - else: - cname = "%s->%s" % (type.vtabptr_cname, entry.cname) - ctype = entry.type - ubcm_entry = Symtab.Entry(entry.name, cname, ctype) - ubcm_entry.is_cfunction = 1 - ubcm_entry.func_cname = entry.func_cname - ubcm_entry.is_unbound_cmethod = 1 - ubcm_entry.scope = entry.scope - return self.as_name_node(env, ubcm_entry, target=False) - elif type.is_enum: - if self.attribute in type.values: - for entry in type.entry.enum_values: - if entry.name == self.attribute: - return self.as_name_node(env, entry, target=False) - else: - error(self.pos, "%s not a known value of %s" % (self.attribute, type)) - else: - error(self.pos, "%s not a known value of %s" % (self.attribute, type)) - return None - - def analyse_as_type(self, env): - module_scope = self.obj.analyse_as_module(env) - if module_scope: - return module_scope.lookup_type(self.attribute) - if not self.obj.is_string_literal: - base_type = self.obj.analyse_as_type(env) - if base_type and hasattr(base_type, 'scope') and base_type.scope is not None: - return base_type.scope.lookup_type(self.attribute) - return None - - def analyse_as_extension_type(self, env): - # Try to interpret this as a reference to an extension type - # in a cimported module. Returns the extension type, or None. - module_scope = self.obj.analyse_as_module(env) - if module_scope: - entry = module_scope.lookup_here(self.attribute) - if entry and entry.is_type: - if entry.type.is_extension_type or entry.type.is_builtin_type: - return entry.type - return None - - def analyse_as_module(self, env): - # Try to interpret this as a reference to a cimported module - # in another cimported module. Returns the module scope, or None. - module_scope = self.obj.analyse_as_module(env) - if module_scope: - entry = module_scope.lookup_here(self.attribute) - if entry and entry.as_module: - return entry.as_module - return None - - def as_name_node(self, env, entry, target): - # Create a corresponding NameNode from this node and complete the - # analyse_types phase. - node = NameNode.from_node(self, name=self.attribute, entry=entry) - if target: - node = node.analyse_target_types(env) - else: - node = node.analyse_rvalue_entry(env) - node.entry.used = 1 - return node - - def analyse_as_ordinary_attribute_node(self, env, target): - self.obj = self.obj.analyse_types(env) - self.analyse_attribute(env) - if self.entry and self.entry.is_cmethod and not self.is_called: -# error(self.pos, "C method can only be called") - pass - ## Reference to C array turns into pointer to first element. - #while self.type.is_array: - # self.type = self.type.element_ptr_type() - if self.is_py_attr: - if not target: - self.is_temp = 1 - self.result_ctype = py_object_type - elif target and self.obj.type.is_builtin_type: - error(self.pos, "Assignment to an immutable object field") - #elif self.type.is_memoryviewslice and not target: - # self.is_temp = True - return self - - def analyse_attribute(self, env, obj_type = None): - # Look up attribute and set self.type and self.member. - immutable_obj = obj_type is not None # used during type inference - self.is_py_attr = 0 - self.member = self.attribute - if obj_type is None: - if self.obj.type.is_string or self.obj.type.is_pyunicode_ptr: - self.obj = self.obj.coerce_to_pyobject(env) - obj_type = self.obj.type - else: - if obj_type.is_string or obj_type.is_pyunicode_ptr: - obj_type = py_object_type - if obj_type.is_ptr or obj_type.is_array: - obj_type = obj_type.base_type - self.op = "->" - elif obj_type.is_extension_type or obj_type.is_builtin_type: - self.op = "->" - elif obj_type.is_reference and obj_type.is_fake_reference: - self.op = "->" - else: - self.op = "." - if obj_type.has_attributes: - if obj_type.attributes_known(): - entry = obj_type.scope.lookup_here(self.attribute) - if obj_type.is_memoryviewslice and not entry: - if self.attribute == 'T': - self.is_memslice_transpose = True - self.is_temp = True - self.use_managed_ref = True - self.type = self.obj.type.transpose(self.pos) - return - else: - obj_type.declare_attribute(self.attribute, env, self.pos) - entry = obj_type.scope.lookup_here(self.attribute) - if entry and entry.is_member: - entry = None - else: - error(self.pos, - "Cannot select attribute of incomplete type '%s'" - % obj_type) - self.type = PyrexTypes.error_type - return - self.entry = entry - if entry: - if obj_type.is_extension_type and entry.name == "__weakref__": - error(self.pos, "Illegal use of special attribute __weakref__") - - # def methods need the normal attribute lookup - # because they do not have struct entries - # fused function go through assignment synthesis - # (foo = pycfunction(foo_func_obj)) and need to go through - # regular Python lookup as well - if (entry.is_variable and not entry.fused_cfunction) or entry.is_cmethod: - self.type = entry.type - self.member = entry.cname - return - else: - # If it's not a variable or C method, it must be a Python - # method of an extension type, so we treat it like a Python - # attribute. - pass - # If we get here, the base object is not a struct/union/extension - # type, or it is an extension type and the attribute is either not - # declared or is declared as a Python method. Treat it as a Python - # attribute reference. - self.analyse_as_python_attribute(env, obj_type, immutable_obj) - - def analyse_as_python_attribute(self, env, obj_type=None, immutable_obj=False): - if obj_type is None: - obj_type = self.obj.type - # mangle private '__*' Python attributes used inside of a class - self.attribute = env.mangle_class_private_name(self.attribute) - self.member = self.attribute - self.type = py_object_type - self.is_py_attr = 1 - - if not obj_type.is_pyobject and not obj_type.is_error: - # Expose python methods for immutable objects. - if (obj_type.is_string or obj_type.is_cpp_string - or obj_type.is_buffer or obj_type.is_memoryviewslice - or obj_type.is_numeric - or (obj_type.is_ctuple and obj_type.can_coerce_to_pyobject(env)) - or (obj_type.is_struct and obj_type.can_coerce_to_pyobject(env))): - if not immutable_obj: - self.obj = self.obj.coerce_to_pyobject(env) - elif (obj_type.is_cfunction and (self.obj.is_name or self.obj.is_attribute) - and self.obj.entry.as_variable - and self.obj.entry.as_variable.type.is_pyobject): - # might be an optimised builtin function => unpack it - if not immutable_obj: - self.obj = self.obj.coerce_to_pyobject(env) - else: - error(self.pos, - "Object of type '%s' has no attribute '%s'" % - (obj_type, self.attribute)) - - def wrap_obj_in_nonecheck(self, env): - if not env.directives['nonecheck']: - return - - msg = None - format_args = () - if (self.obj.type.is_extension_type and self.needs_none_check and not - self.is_py_attr): - msg = "'NoneType' object has no attribute '%{0}s'".format('.30' if len(self.attribute) <= 30 else '') - format_args = (self.attribute,) - elif self.obj.type.is_memoryviewslice: - if self.is_memslice_transpose: - msg = "Cannot transpose None memoryview slice" - else: - entry = self.obj.type.scope.lookup_here(self.attribute) - if entry: - # copy/is_c_contig/shape/strides etc - msg = "Cannot access '%s' attribute of None memoryview slice" - format_args = (entry.name,) - - if msg: - self.obj = self.obj.as_none_safe_node(msg, 'PyExc_AttributeError', - format_args=format_args) - - def nogil_check(self, env): - if self.is_py_attr: - self.gil_error() - - gil_message = "Accessing Python attribute" - - def is_cimported_module_without_shadow(self, env): - return self.obj.is_cimported_module_without_shadow(env) - - def is_simple(self): - if self.obj: - return self.result_in_temp() or self.obj.is_simple() - else: - return NameNode.is_simple(self) - - def is_lvalue(self): - if self.obj: - return True - else: - return NameNode.is_lvalue(self) - - def is_ephemeral(self): - if self.obj: - return self.obj.is_ephemeral() - else: - return NameNode.is_ephemeral(self) - - def calculate_result_code(self): - #print "AttributeNode.calculate_result_code:", self.member ### - #print "...obj node =", self.obj, "code", self.obj.result() ### - #print "...obj type", self.obj.type, "ctype", self.obj.ctype() ### - obj = self.obj - obj_code = obj.result_as(obj.type) - #print "...obj_code =", obj_code ### - if self.entry and self.entry.is_cmethod: - if obj.type.is_extension_type and not self.entry.is_builtin_cmethod: - if self.entry.final_func_cname: - return self.entry.final_func_cname - - if self.type.from_fused: - # If the attribute was specialized through indexing, make - # sure to get the right fused name, as our entry was - # replaced by our parent index node - # (AnalyseExpressionsTransform) - self.member = self.entry.cname - - return "((struct %s *)%s%s%s)->%s" % ( - obj.type.vtabstruct_cname, obj_code, self.op, - obj.type.vtabslot_cname, self.member) - elif self.result_is_used: - return self.member - # Generating no code at all for unused access to optimised builtin - # methods fixes the problem that some optimisations only exist as - # macros, i.e. there is no function pointer to them, so we would - # generate invalid C code here. - return - elif obj.type.is_complex: - return "__Pyx_C%s(%s)" % (self.member.upper(), obj_code) - else: - if obj.type.is_builtin_type and self.entry and self.entry.is_variable: - # accessing a field of a builtin type, need to cast better than result_as() does - obj_code = obj.type.cast_code(obj.result(), to_object_struct = True) - return "%s%s%s" % (obj_code, self.op, self.member) - - def generate_result_code(self, code): - if self.is_py_attr: - if self.is_special_lookup: - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectLookupSpecial", "ObjectHandling.c")) - lookup_func_name = '__Pyx_PyObject_LookupSpecial' - else: - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectGetAttrStr", "ObjectHandling.c")) - lookup_func_name = '__Pyx_PyObject_GetAttrStr' - code.putln( - '%s = %s(%s, %s); %s' % ( - self.result(), - lookup_func_name, - self.obj.py_result(), - code.intern_identifier(self.attribute), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - elif self.type.is_memoryviewslice: - if self.is_memslice_transpose: - # transpose the slice - for access, packing in self.type.axes: - if access == 'ptr': - error(self.pos, "Transposing not supported for slices " - "with indirect dimensions") - return - - code.putln("%s = %s;" % (self.result(), self.obj.result())) - code.put_incref_memoryviewslice(self.result(), have_gil=True) - - T = "__pyx_memslice_transpose(&%s) == 0" - code.putln(code.error_goto_if(T % self.result(), self.pos)) - elif self.initialized_check: - code.putln( - 'if (unlikely(!%s.memview)) {' - 'PyErr_SetString(PyExc_AttributeError,' - '"Memoryview is not initialized");' - '%s' - '}' % (self.result(), code.error_goto(self.pos))) - else: - # result_code contains what is needed, but we may need to insert - # a check and raise an exception - if self.obj.type and self.obj.type.is_extension_type: - pass - elif self.entry and self.entry.is_cmethod: - # C method implemented as function call with utility code - code.globalstate.use_entry_utility_code(self.entry) - - def generate_disposal_code(self, code): - if self.is_temp and self.type.is_memoryviewslice and self.is_memslice_transpose: - # mirror condition for putting the memview incref here: - code.put_xdecref_memoryviewslice( - self.result(), have_gil=True) - code.putln("%s.memview = NULL;" % self.result()) - code.putln("%s.data = NULL;" % self.result()) - else: - ExprNode.generate_disposal_code(self, code) - - def generate_assignment_code(self, rhs, code, overloaded_assignment=False, - exception_check=None, exception_value=None): - self.obj.generate_evaluation_code(code) - if self.is_py_attr: - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectSetAttrStr", "ObjectHandling.c")) - code.put_error_if_neg(self.pos, - '__Pyx_PyObject_SetAttrStr(%s, %s, %s)' % ( - self.obj.py_result(), - code.intern_identifier(self.attribute), - rhs.py_result())) - rhs.generate_disposal_code(code) - rhs.free_temps(code) - elif self.obj.type.is_complex: - code.putln("__Pyx_SET_C%s(%s, %s);" % ( - self.member.upper(), - self.obj.result_as(self.obj.type), - rhs.result_as(self.ctype()))) - rhs.generate_disposal_code(code) - rhs.free_temps(code) - else: - select_code = self.result() - if self.type.is_pyobject and self.use_managed_ref: - rhs.make_owned_reference(code) - code.put_giveref(rhs.py_result()) - code.put_gotref(select_code) - code.put_decref(select_code, self.ctype()) - elif self.type.is_memoryviewslice: - from . import MemoryView - MemoryView.put_assign_to_memviewslice( - select_code, rhs, rhs.result(), self.type, code) - - if not self.type.is_memoryviewslice: - code.putln( - "%s = %s;" % ( - select_code, - rhs.result_as(self.ctype()))) - #rhs.result())) - rhs.generate_post_assignment_code(code) - rhs.free_temps(code) - self.obj.generate_disposal_code(code) - self.obj.free_temps(code) - - def generate_deletion_code(self, code, ignore_nonexisting=False): - self.obj.generate_evaluation_code(code) - if self.is_py_attr or (self.entry.scope.is_property_scope - and u'__del__' in self.entry.scope.entries): - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyObjectSetAttrStr", "ObjectHandling.c")) - code.put_error_if_neg(self.pos, - '__Pyx_PyObject_DelAttrStr(%s, %s)' % ( - self.obj.py_result(), - code.intern_identifier(self.attribute))) - else: - error(self.pos, "Cannot delete C attribute of extension type") - self.obj.generate_disposal_code(code) - self.obj.free_temps(code) - - def annotate(self, code): - if self.is_py_attr: - style, text = 'py_attr', 'python attribute (%s)' - else: - style, text = 'c_attr', 'c attribute (%s)' - code.annotate(self.pos, AnnotationItem(style, text % self.type, size=len(self.attribute))) - - -#------------------------------------------------------------------- -# -# Constructor nodes -# -#------------------------------------------------------------------- - -class StarredUnpackingNode(ExprNode): - # A starred expression like "*a" - # - # This is only allowed in sequence assignment or construction such as - # - # a, *b = (1,2,3,4) => a = 1 ; b = [2,3,4] - # - # and will be special cased during type analysis (or generate an error - # if it's found at unexpected places). - # - # target ExprNode - - subexprs = ['target'] - is_starred = 1 - type = py_object_type - is_temp = 1 - starred_expr_allowed_here = False - - def __init__(self, pos, target): - ExprNode.__init__(self, pos, target=target) - - def analyse_declarations(self, env): - if not self.starred_expr_allowed_here: - error(self.pos, "starred expression is not allowed here") - self.target.analyse_declarations(env) - - def infer_type(self, env): - return self.target.infer_type(env) - - def analyse_types(self, env): - if not self.starred_expr_allowed_here: - error(self.pos, "starred expression is not allowed here") - self.target = self.target.analyse_types(env) - self.type = self.target.type - return self - - def analyse_target_declaration(self, env): - self.target.analyse_target_declaration(env) - - def analyse_target_types(self, env): - self.target = self.target.analyse_target_types(env) - self.type = self.target.type - return self - - def calculate_result_code(self): - return "" - - def generate_result_code(self, code): - pass - - -class SequenceNode(ExprNode): - # Base class for list and tuple constructor nodes. - # Contains common code for performing sequence unpacking. - # - # args [ExprNode] - # unpacked_items [ExprNode] or None - # coerced_unpacked_items [ExprNode] or None - # mult_factor ExprNode the integer number of content repetitions ([1,2]*3) - - subexprs = ['args', 'mult_factor'] - - is_sequence_constructor = 1 - unpacked_items = None - mult_factor = None - slow = False # trade speed for code size (e.g. use PyTuple_Pack()) - - def compile_time_value_list(self, denv): - return [arg.compile_time_value(denv) for arg in self.args] - - def replace_starred_target_node(self): - # replace a starred node in the targets by the contained expression - self.starred_assignment = False - args = [] - for arg in self.args: - if arg.is_starred: - if self.starred_assignment: - error(arg.pos, "more than 1 starred expression in assignment") - self.starred_assignment = True - arg = arg.target - arg.is_starred = True - args.append(arg) - self.args = args - - def analyse_target_declaration(self, env): - self.replace_starred_target_node() - for arg in self.args: - arg.analyse_target_declaration(env) - - def analyse_types(self, env, skip_children=False): - for i, arg in enumerate(self.args): - if not skip_children: - arg = arg.analyse_types(env) - self.args[i] = arg.coerce_to_pyobject(env) - if self.mult_factor: - self.mult_factor = self.mult_factor.analyse_types(env) - if not self.mult_factor.type.is_int: - self.mult_factor = self.mult_factor.coerce_to_pyobject(env) - self.is_temp = 1 - # not setting self.type here, subtypes do this - return self - - def coerce_to_ctuple(self, dst_type, env): - if self.type == dst_type: - return self - assert not self.mult_factor - if len(self.args) != dst_type.size: - error(self.pos, "trying to coerce sequence to ctuple of wrong length, expected %d, got %d" % ( - dst_type.size, len(self.args))) - coerced_args = [arg.coerce_to(type, env) for arg, type in zip(self.args, dst_type.components)] - return TupleNode(self.pos, args=coerced_args, type=dst_type, is_temp=True) - - def _create_merge_node_if_necessary(self, env): - self._flatten_starred_args() - if not any(arg.is_starred for arg in self.args): - return self - # convert into MergedSequenceNode by building partial sequences - args = [] - values = [] - for arg in self.args: - if arg.is_starred: - if values: - args.append(TupleNode(values[0].pos, args=values).analyse_types(env, skip_children=True)) - values = [] - args.append(arg.target) - else: - values.append(arg) - if values: - args.append(TupleNode(values[0].pos, args=values).analyse_types(env, skip_children=True)) - node = MergedSequenceNode(self.pos, args, self.type) - if self.mult_factor: - node = binop_node( - self.pos, '*', node, self.mult_factor.coerce_to_pyobject(env), - inplace=True, type=self.type, is_temp=True) - return node - - def _flatten_starred_args(self): - args = [] - for arg in self.args: - if arg.is_starred and arg.target.is_sequence_constructor and not arg.target.mult_factor: - args.extend(arg.target.args) - else: - args.append(arg) - self.args[:] = args - - def may_be_none(self): - return False - - def analyse_target_types(self, env): - if self.mult_factor: - error(self.pos, "can't assign to multiplied sequence") - self.unpacked_items = [] - self.coerced_unpacked_items = [] - self.any_coerced_items = False - for i, arg in enumerate(self.args): - arg = self.args[i] = arg.analyse_target_types(env) - if arg.is_starred: - if not arg.type.assignable_from(list_type): - error(arg.pos, - "starred target must have Python object (list) type") - if arg.type is py_object_type: - arg.type = list_type - unpacked_item = PyTempNode(self.pos, env) - coerced_unpacked_item = unpacked_item.coerce_to(arg.type, env) - if unpacked_item is not coerced_unpacked_item: - self.any_coerced_items = True - self.unpacked_items.append(unpacked_item) - self.coerced_unpacked_items.append(coerced_unpacked_item) - self.type = py_object_type - return self - - def generate_result_code(self, code): - self.generate_operation_code(code) - - def generate_sequence_packing_code(self, code, target=None, plain=False): - if target is None: - target = self.result() - size_factor = c_mult = '' - mult_factor = None - - if self.mult_factor and not plain: - mult_factor = self.mult_factor - if mult_factor.type.is_int: - c_mult = mult_factor.result() - if (isinstance(mult_factor.constant_result, _py_int_types) and - mult_factor.constant_result > 0): - size_factor = ' * %s' % mult_factor.constant_result - elif mult_factor.type.signed: - size_factor = ' * ((%s<0) ? 0:%s)' % (c_mult, c_mult) - else: - size_factor = ' * (%s)' % (c_mult,) - - if self.type is tuple_type and (self.is_literal or self.slow) and not c_mult: - # use PyTuple_Pack() to avoid generating huge amounts of one-time code - code.putln('%s = PyTuple_Pack(%d, %s); %s' % ( - target, - len(self.args), - ', '.join(arg.py_result() for arg in self.args), - code.error_goto_if_null(target, self.pos))) - code.put_gotref(target) - elif self.type.is_ctuple: - for i, arg in enumerate(self.args): - code.putln("%s.f%s = %s;" % ( - target, i, arg.result())) - else: - # build the tuple/list step by step, potentially multiplying it as we go - if self.type is list_type: - create_func, set_item_func = 'PyList_New', 'PyList_SET_ITEM' - elif self.type is tuple_type: - create_func, set_item_func = 'PyTuple_New', 'PyTuple_SET_ITEM' - else: - raise InternalError("sequence packing for unexpected type %s" % self.type) - arg_count = len(self.args) - code.putln("%s = %s(%s%s); %s" % ( - target, create_func, arg_count, size_factor, - code.error_goto_if_null(target, self.pos))) - code.put_gotref(target) - - if c_mult: - # FIXME: can't use a temp variable here as the code may - # end up in the constant building function. Temps - # currently don't work there. - - #counter = code.funcstate.allocate_temp(mult_factor.type, manage_ref=False) - counter = Naming.quick_temp_cname - code.putln('{ Py_ssize_t %s;' % counter) - if arg_count == 1: - offset = counter - else: - offset = '%s * %s' % (counter, arg_count) - code.putln('for (%s=0; %s < %s; %s++) {' % ( - counter, counter, c_mult, counter - )) - else: - offset = '' - - for i in range(arg_count): - arg = self.args[i] - if c_mult or not arg.result_in_temp(): - code.put_incref(arg.result(), arg.ctype()) - code.put_giveref(arg.py_result()) - code.putln("%s(%s, %s, %s);" % ( - set_item_func, - target, - (offset and i) and ('%s + %s' % (offset, i)) or (offset or i), - arg.py_result())) - - if c_mult: - code.putln('}') - #code.funcstate.release_temp(counter) - code.putln('}') - - if mult_factor is not None and mult_factor.type.is_pyobject: - code.putln('{ PyObject* %s = PyNumber_InPlaceMultiply(%s, %s); %s' % ( - Naming.quick_temp_cname, target, mult_factor.py_result(), - code.error_goto_if_null(Naming.quick_temp_cname, self.pos) - )) - code.put_gotref(Naming.quick_temp_cname) - code.put_decref(target, py_object_type) - code.putln('%s = %s;' % (target, Naming.quick_temp_cname)) - code.putln('}') - - def generate_subexpr_disposal_code(self, code): - if self.mult_factor and self.mult_factor.type.is_int: - super(SequenceNode, self).generate_subexpr_disposal_code(code) - elif self.type is tuple_type and (self.is_literal or self.slow): - super(SequenceNode, self).generate_subexpr_disposal_code(code) - else: - # We call generate_post_assignment_code here instead - # of generate_disposal_code, because values were stored - # in the tuple using a reference-stealing operation. - for arg in self.args: - arg.generate_post_assignment_code(code) - # Should NOT call free_temps -- this is invoked by the default - # generate_evaluation_code which will do that. - if self.mult_factor: - self.mult_factor.generate_disposal_code(code) - - def generate_assignment_code(self, rhs, code, overloaded_assignment=False, - exception_check=None, exception_value=None): - if self.starred_assignment: - self.generate_starred_assignment_code(rhs, code) - else: - self.generate_parallel_assignment_code(rhs, code) - - for item in self.unpacked_items: - item.release(code) - rhs.free_temps(code) - - _func_iternext_type = PyrexTypes.CPtrType(PyrexTypes.CFuncType( - PyrexTypes.py_object_type, [ - PyrexTypes.CFuncTypeArg("it", PyrexTypes.py_object_type, None), - ])) - - def generate_parallel_assignment_code(self, rhs, code): - # Need to work around the fact that generate_evaluation_code - # allocates the temps in a rather hacky way -- the assignment - # is evaluated twice, within each if-block. - for item in self.unpacked_items: - item.allocate(code) - special_unpack = (rhs.type is py_object_type - or rhs.type in (tuple_type, list_type) - or not rhs.type.is_builtin_type) - long_enough_for_a_loop = len(self.unpacked_items) > 3 - - if special_unpack: - self.generate_special_parallel_unpacking_code( - code, rhs, use_loop=long_enough_for_a_loop) - else: - code.putln("{") - self.generate_generic_parallel_unpacking_code( - code, rhs, self.unpacked_items, use_loop=long_enough_for_a_loop) - code.putln("}") - - for value_node in self.coerced_unpacked_items: - value_node.generate_evaluation_code(code) - for i in range(len(self.args)): - self.args[i].generate_assignment_code( - self.coerced_unpacked_items[i], code) - - def generate_special_parallel_unpacking_code(self, code, rhs, use_loop): - sequence_type_test = '1' - none_check = "likely(%s != Py_None)" % rhs.py_result() - if rhs.type is list_type: - sequence_types = ['List'] - if rhs.may_be_none(): - sequence_type_test = none_check - elif rhs.type is tuple_type: - sequence_types = ['Tuple'] - if rhs.may_be_none(): - sequence_type_test = none_check - else: - sequence_types = ['Tuple', 'List'] - tuple_check = 'likely(PyTuple_CheckExact(%s))' % rhs.py_result() - list_check = 'PyList_CheckExact(%s)' % rhs.py_result() - sequence_type_test = "(%s) || (%s)" % (tuple_check, list_check) - - code.putln("if (%s) {" % sequence_type_test) - code.putln("PyObject* sequence = %s;" % rhs.py_result()) - - # list/tuple => check size - code.putln("Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);") - code.putln("if (unlikely(size != %d)) {" % len(self.args)) - code.globalstate.use_utility_code(raise_too_many_values_to_unpack) - code.putln("if (size > %d) __Pyx_RaiseTooManyValuesError(%d);" % ( - len(self.args), len(self.args))) - code.globalstate.use_utility_code(raise_need_more_values_to_unpack) - code.putln("else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);") - # < 0 => exception - code.putln(code.error_goto(self.pos)) - code.putln("}") - - code.putln("#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS") - # unpack items from list/tuple in unrolled loop (can't fail) - if len(sequence_types) == 2: - code.putln("if (likely(Py%s_CheckExact(sequence))) {" % sequence_types[0]) - for i, item in enumerate(self.unpacked_items): - code.putln("%s = Py%s_GET_ITEM(sequence, %d); " % ( - item.result(), sequence_types[0], i)) - if len(sequence_types) == 2: - code.putln("} else {") - for i, item in enumerate(self.unpacked_items): - code.putln("%s = Py%s_GET_ITEM(sequence, %d); " % ( - item.result(), sequence_types[1], i)) - code.putln("}") - for item in self.unpacked_items: - code.put_incref(item.result(), item.ctype()) - - code.putln("#else") - # in non-CPython, use the PySequence protocol (which can fail) - if not use_loop: - for i, item in enumerate(self.unpacked_items): - code.putln("%s = PySequence_ITEM(sequence, %d); %s" % ( - item.result(), i, - code.error_goto_if_null(item.result(), self.pos))) - code.put_gotref(item.result()) - else: - code.putln("{") - code.putln("Py_ssize_t i;") - code.putln("PyObject** temps[%s] = {%s};" % ( - len(self.unpacked_items), - ','.join(['&%s' % item.result() for item in self.unpacked_items]))) - code.putln("for (i=0; i < %s; i++) {" % len(self.unpacked_items)) - code.putln("PyObject* item = PySequence_ITEM(sequence, i); %s" % ( - code.error_goto_if_null('item', self.pos))) - code.put_gotref('item') - code.putln("*(temps[i]) = item;") - code.putln("}") - code.putln("}") - - code.putln("#endif") - rhs.generate_disposal_code(code) - - if sequence_type_test == '1': - code.putln("}") # all done - elif sequence_type_test == none_check: - # either tuple/list or None => save some code by generating the error directly - code.putln("} else {") - code.globalstate.use_utility_code( - UtilityCode.load_cached("RaiseNoneIterError", "ObjectHandling.c")) - code.putln("__Pyx_RaiseNoneNotIterableError(); %s" % code.error_goto(self.pos)) - code.putln("}") # all done - else: - code.putln("} else {") # needs iteration fallback code - self.generate_generic_parallel_unpacking_code( - code, rhs, self.unpacked_items, use_loop=use_loop) - code.putln("}") - - def generate_generic_parallel_unpacking_code(self, code, rhs, unpacked_items, use_loop, terminate=True): - code.globalstate.use_utility_code(raise_need_more_values_to_unpack) - code.globalstate.use_utility_code(UtilityCode.load_cached("IterFinish", "ObjectHandling.c")) - code.putln("Py_ssize_t index = -1;") # must be at the start of a C block! - - if use_loop: - code.putln("PyObject** temps[%s] = {%s};" % ( - len(self.unpacked_items), - ','.join(['&%s' % item.result() for item in unpacked_items]))) - - iterator_temp = code.funcstate.allocate_temp(py_object_type, manage_ref=True) - code.putln( - "%s = PyObject_GetIter(%s); %s" % ( - iterator_temp, - rhs.py_result(), - code.error_goto_if_null(iterator_temp, self.pos))) - code.put_gotref(iterator_temp) - rhs.generate_disposal_code(code) - - iternext_func = code.funcstate.allocate_temp(self._func_iternext_type, manage_ref=False) - code.putln("%s = Py_TYPE(%s)->tp_iternext;" % ( - iternext_func, iterator_temp)) - - unpacking_error_label = code.new_label('unpacking_failed') - unpack_code = "%s(%s)" % (iternext_func, iterator_temp) - if use_loop: - code.putln("for (index=0; index < %s; index++) {" % len(unpacked_items)) - code.put("PyObject* item = %s; if (unlikely(!item)) " % unpack_code) - code.put_goto(unpacking_error_label) - code.put_gotref("item") - code.putln("*(temps[index]) = item;") - code.putln("}") - else: - for i, item in enumerate(unpacked_items): - code.put( - "index = %d; %s = %s; if (unlikely(!%s)) " % ( - i, - item.result(), - unpack_code, - item.result())) - code.put_goto(unpacking_error_label) - code.put_gotref(item.py_result()) - - if terminate: - code.globalstate.use_utility_code( - UtilityCode.load_cached("UnpackItemEndCheck", "ObjectHandling.c")) - code.put_error_if_neg(self.pos, "__Pyx_IternextUnpackEndCheck(%s, %d)" % ( - unpack_code, - len(unpacked_items))) - code.putln("%s = NULL;" % iternext_func) - code.put_decref_clear(iterator_temp, py_object_type) - - unpacking_done_label = code.new_label('unpacking_done') - code.put_goto(unpacking_done_label) - - code.put_label(unpacking_error_label) - code.put_decref_clear(iterator_temp, py_object_type) - code.putln("%s = NULL;" % iternext_func) - code.putln("if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);") - code.putln(code.error_goto(self.pos)) - code.put_label(unpacking_done_label) - - code.funcstate.release_temp(iternext_func) - if terminate: - code.funcstate.release_temp(iterator_temp) - iterator_temp = None - - return iterator_temp - - def generate_starred_assignment_code(self, rhs, code): - for i, arg in enumerate(self.args): - if arg.is_starred: - starred_target = self.unpacked_items[i] - unpacked_fixed_items_left = self.unpacked_items[:i] - unpacked_fixed_items_right = self.unpacked_items[i+1:] - break - else: - assert False - - iterator_temp = None - if unpacked_fixed_items_left: - for item in unpacked_fixed_items_left: - item.allocate(code) - code.putln('{') - iterator_temp = self.generate_generic_parallel_unpacking_code( - code, rhs, unpacked_fixed_items_left, - use_loop=True, terminate=False) - for i, item in enumerate(unpacked_fixed_items_left): - value_node = self.coerced_unpacked_items[i] - value_node.generate_evaluation_code(code) - code.putln('}') - - starred_target.allocate(code) - target_list = starred_target.result() - code.putln("%s = PySequence_List(%s); %s" % ( - target_list, - iterator_temp or rhs.py_result(), - code.error_goto_if_null(target_list, self.pos))) - code.put_gotref(target_list) - - if iterator_temp: - code.put_decref_clear(iterator_temp, py_object_type) - code.funcstate.release_temp(iterator_temp) - else: - rhs.generate_disposal_code(code) - - if unpacked_fixed_items_right: - code.globalstate.use_utility_code(raise_need_more_values_to_unpack) - length_temp = code.funcstate.allocate_temp(PyrexTypes.c_py_ssize_t_type, manage_ref=False) - code.putln('%s = PyList_GET_SIZE(%s);' % (length_temp, target_list)) - code.putln("if (unlikely(%s < %d)) {" % (length_temp, len(unpacked_fixed_items_right))) - code.putln("__Pyx_RaiseNeedMoreValuesError(%d+%s); %s" % ( - len(unpacked_fixed_items_left), length_temp, - code.error_goto(self.pos))) - code.putln('}') - - for item in unpacked_fixed_items_right[::-1]: - item.allocate(code) - for i, (item, coerced_arg) in enumerate(zip(unpacked_fixed_items_right[::-1], - self.coerced_unpacked_items[::-1])): - code.putln('#if CYTHON_COMPILING_IN_CPYTHON') - code.putln("%s = PyList_GET_ITEM(%s, %s-%d); " % ( - item.py_result(), target_list, length_temp, i+1)) - # resize the list the hard way - code.putln("((PyVarObject*)%s)->ob_size--;" % target_list) - code.putln('#else') - code.putln("%s = PySequence_ITEM(%s, %s-%d); " % ( - item.py_result(), target_list, length_temp, i+1)) - code.putln('#endif') - code.put_gotref(item.py_result()) - coerced_arg.generate_evaluation_code(code) - - code.putln('#if !CYTHON_COMPILING_IN_CPYTHON') - sublist_temp = code.funcstate.allocate_temp(py_object_type, manage_ref=True) - code.putln('%s = PySequence_GetSlice(%s, 0, %s-%d); %s' % ( - sublist_temp, target_list, length_temp, len(unpacked_fixed_items_right), - code.error_goto_if_null(sublist_temp, self.pos))) - code.put_gotref(sublist_temp) - code.funcstate.release_temp(length_temp) - code.put_decref(target_list, py_object_type) - code.putln('%s = %s; %s = NULL;' % (target_list, sublist_temp, sublist_temp)) - code.putln('#else') - code.putln('(void)%s;' % sublist_temp) # avoid warning about unused variable - code.funcstate.release_temp(sublist_temp) - code.putln('#endif') - - for i, arg in enumerate(self.args): - arg.generate_assignment_code(self.coerced_unpacked_items[i], code) - - def annotate(self, code): - for arg in self.args: - arg.annotate(code) - if self.unpacked_items: - for arg in self.unpacked_items: - arg.annotate(code) - for arg in self.coerced_unpacked_items: - arg.annotate(code) - - -class TupleNode(SequenceNode): - # Tuple constructor. - - type = tuple_type - is_partly_literal = False - - gil_message = "Constructing Python tuple" - - def infer_type(self, env): - if self.mult_factor or not self.args: - return tuple_type - arg_types = [arg.infer_type(env) for arg in self.args] - if any(type.is_pyobject or type.is_memoryviewslice or type.is_unspecified or type.is_fused - for type in arg_types): - return tuple_type - return env.declare_tuple_type(self.pos, arg_types).type - - def analyse_types(self, env, skip_children=False): - if len(self.args) == 0: - self.is_temp = False - self.is_literal = True - return self - - if not skip_children: - for i, arg in enumerate(self.args): - if arg.is_starred: - arg.starred_expr_allowed_here = True - self.args[i] = arg.analyse_types(env) - if (not self.mult_factor and - not any((arg.is_starred or arg.type.is_pyobject or arg.type.is_memoryviewslice or arg.type.is_fused) - for arg in self.args)): - self.type = env.declare_tuple_type(self.pos, (arg.type for arg in self.args)).type - self.is_temp = 1 - return self - - node = SequenceNode.analyse_types(self, env, skip_children=True) - node = node._create_merge_node_if_necessary(env) - if not node.is_sequence_constructor: - return node - - if not all(child.is_literal for child in node.args): - return node - if not node.mult_factor or ( - node.mult_factor.is_literal and - isinstance(node.mult_factor.constant_result, _py_int_types)): - node.is_temp = False - node.is_literal = True - else: - if not node.mult_factor.type.is_pyobject: - node.mult_factor = node.mult_factor.coerce_to_pyobject(env) - node.is_temp = True - node.is_partly_literal = True - return node - - def analyse_as_type(self, env): - # ctuple type - if not self.args: - return None - item_types = [arg.analyse_as_type(env) for arg in self.args] - if any(t is None for t in item_types): - return None - entry = env.declare_tuple_type(self.pos, item_types) - return entry.type - - def coerce_to(self, dst_type, env): - if self.type.is_ctuple: - if dst_type.is_ctuple and self.type.size == dst_type.size: - return self.coerce_to_ctuple(dst_type, env) - elif dst_type is tuple_type or dst_type is py_object_type: - coerced_args = [arg.coerce_to_pyobject(env) for arg in self.args] - return TupleNode(self.pos, args=coerced_args, type=tuple_type, is_temp=1).analyse_types(env, skip_children=True) - else: - return self.coerce_to_pyobject(env).coerce_to(dst_type, env) - elif dst_type.is_ctuple and not self.mult_factor: - return self.coerce_to_ctuple(dst_type, env) - else: - return SequenceNode.coerce_to(self, dst_type, env) - - def as_list(self): - t = ListNode(self.pos, args=self.args, mult_factor=self.mult_factor) - if isinstance(self.constant_result, tuple): - t.constant_result = list(self.constant_result) - return t - - def is_simple(self): - # either temp or constant => always simple - return True - - def nonlocally_immutable(self): - # either temp or constant => always safe - return True - - def calculate_result_code(self): - if len(self.args) > 0: - return self.result_code - else: - return Naming.empty_tuple - - def calculate_constant_result(self): - self.constant_result = tuple([ - arg.constant_result for arg in self.args]) - - def compile_time_value(self, denv): - values = self.compile_time_value_list(denv) - try: - return tuple(values) - except Exception as e: - self.compile_time_value_error(e) - - def generate_operation_code(self, code): - if len(self.args) == 0: - # result_code is Naming.empty_tuple - return - - if self.is_literal or self.is_partly_literal: - # The "mult_factor" is part of the deduplication if it is also constant, i.e. when - # we deduplicate the multiplied result. Otherwise, only deduplicate the constant part. - dedup_key = make_dedup_key(self.type, [self.mult_factor if self.is_literal else None] + self.args) - tuple_target = code.get_py_const(py_object_type, 'tuple', cleanup_level=2, dedup_key=dedup_key) - const_code = code.get_cached_constants_writer(tuple_target) - if const_code is not None: - # constant is not yet initialised - const_code.mark_pos(self.pos) - self.generate_sequence_packing_code(const_code, tuple_target, plain=not self.is_literal) - const_code.put_giveref(tuple_target) - if self.is_literal: - self.result_code = tuple_target - else: - code.putln('%s = PyNumber_Multiply(%s, %s); %s' % ( - self.result(), tuple_target, self.mult_factor.py_result(), - code.error_goto_if_null(self.result(), self.pos) - )) - code.put_gotref(self.py_result()) - else: - self.type.entry.used = True - self.generate_sequence_packing_code(code) - - -class ListNode(SequenceNode): - # List constructor. - - # obj_conversion_errors [PyrexError] used internally - # orignial_args [ExprNode] used internally - - obj_conversion_errors = [] - type = list_type - in_module_scope = False - - gil_message = "Constructing Python list" - - def type_dependencies(self, env): - return () - - def infer_type(self, env): - # TODO: Infer non-object list arrays. - return list_type - - def analyse_expressions(self, env): - for arg in self.args: - if arg.is_starred: - arg.starred_expr_allowed_here = True - node = SequenceNode.analyse_expressions(self, env) - return node.coerce_to_pyobject(env) - - def analyse_types(self, env): - with local_errors(ignore=True) as errors: - self.original_args = list(self.args) - node = SequenceNode.analyse_types(self, env) - node.obj_conversion_errors = errors - if env.is_module_scope: - self.in_module_scope = True - node = node._create_merge_node_if_necessary(env) - return node - - def coerce_to(self, dst_type, env): - if dst_type.is_pyobject: - for err in self.obj_conversion_errors: - report_error(err) - self.obj_conversion_errors = [] - if not self.type.subtype_of(dst_type): - error(self.pos, "Cannot coerce list to type '%s'" % dst_type) - elif (dst_type.is_array or dst_type.is_ptr) and dst_type.base_type is not PyrexTypes.c_void_type: - array_length = len(self.args) - if self.mult_factor: - if isinstance(self.mult_factor.constant_result, _py_int_types): - if self.mult_factor.constant_result <= 0: - error(self.pos, "Cannot coerce non-positively multiplied list to '%s'" % dst_type) - else: - array_length *= self.mult_factor.constant_result - else: - error(self.pos, "Cannot coerce dynamically multiplied list to '%s'" % dst_type) - base_type = dst_type.base_type - self.type = PyrexTypes.CArrayType(base_type, array_length) - for i in range(len(self.original_args)): - arg = self.args[i] - if isinstance(arg, CoerceToPyTypeNode): - arg = arg.arg - self.args[i] = arg.coerce_to(base_type, env) - elif dst_type.is_cpp_class: - # TODO(robertwb): Avoid object conversion for vector/list/set. - return TypecastNode(self.pos, operand=self, type=PyrexTypes.py_object_type).coerce_to(dst_type, env) - elif self.mult_factor: - error(self.pos, "Cannot coerce multiplied list to '%s'" % dst_type) - elif dst_type.is_struct: - if len(self.args) > len(dst_type.scope.var_entries): - error(self.pos, "Too many members for '%s'" % dst_type) - else: - if len(self.args) < len(dst_type.scope.var_entries): - warning(self.pos, "Too few members for '%s'" % dst_type, 1) - for i, (arg, member) in enumerate(zip(self.original_args, dst_type.scope.var_entries)): - if isinstance(arg, CoerceToPyTypeNode): - arg = arg.arg - self.args[i] = arg.coerce_to(member.type, env) - self.type = dst_type - elif dst_type.is_ctuple: - return self.coerce_to_ctuple(dst_type, env) - else: - self.type = error_type - error(self.pos, "Cannot coerce list to type '%s'" % dst_type) - return self - - def as_list(self): # dummy for compatibility with TupleNode - return self - - def as_tuple(self): - t = TupleNode(self.pos, args=self.args, mult_factor=self.mult_factor) - if isinstance(self.constant_result, list): - t.constant_result = tuple(self.constant_result) - return t - - def allocate_temp_result(self, code): - if self.type.is_array: - if self.in_module_scope: - self.temp_code = code.funcstate.allocate_temp( - self.type, manage_ref=False, static=True, reusable=False) - else: - # To be valid C++, we must allocate the memory on the stack - # manually and be sure not to reuse it for something else. - # Yes, this means that we leak a temp array variable. - self.temp_code = code.funcstate.allocate_temp( - self.type, manage_ref=False, reusable=False) - else: - SequenceNode.allocate_temp_result(self, code) - - def calculate_constant_result(self): - if self.mult_factor: - raise ValueError() # may exceed the compile time memory - self.constant_result = [ - arg.constant_result for arg in self.args] - - def compile_time_value(self, denv): - l = self.compile_time_value_list(denv) - if self.mult_factor: - l *= self.mult_factor.compile_time_value(denv) - return l - - def generate_operation_code(self, code): - if self.type.is_pyobject: - for err in self.obj_conversion_errors: - report_error(err) - self.generate_sequence_packing_code(code) - elif self.type.is_array: - if self.mult_factor: - code.putln("{") - code.putln("Py_ssize_t %s;" % Naming.quick_temp_cname) - code.putln("for ({i} = 0; {i} < {count}; {i}++) {{".format( - i=Naming.quick_temp_cname, count=self.mult_factor.result())) - offset = '+ (%d * %s)' % (len(self.args), Naming.quick_temp_cname) - else: - offset = '' - for i, arg in enumerate(self.args): - if arg.type.is_array: - code.globalstate.use_utility_code(UtilityCode.load_cached("IncludeStringH", "StringTools.c")) - code.putln("memcpy(&(%s[%s%s]), %s, sizeof(%s[0]));" % ( - self.result(), i, offset, - arg.result(), self.result() - )) - else: - code.putln("%s[%s%s] = %s;" % ( - self.result(), - i, - offset, - arg.result())) - if self.mult_factor: - code.putln("}") - code.putln("}") - elif self.type.is_struct: - for arg, member in zip(self.args, self.type.scope.var_entries): - code.putln("%s.%s = %s;" % ( - self.result(), - member.cname, - arg.result())) - else: - raise InternalError("List type never specified") - - -class ScopedExprNode(ExprNode): - # Abstract base class for ExprNodes that have their own local - # scope, such as generator expressions. - # - # expr_scope Scope the inner scope of the expression - - subexprs = [] - expr_scope = None - - # does this node really have a local scope, e.g. does it leak loop - # variables or not? non-leaking Py3 behaviour is default, except - # for list comprehensions where the behaviour differs in Py2 and - # Py3 (set in Parsing.py based on parser context) - has_local_scope = True - - def init_scope(self, outer_scope, expr_scope=None): - if expr_scope is not None: - self.expr_scope = expr_scope - elif self.has_local_scope: - self.expr_scope = Symtab.GeneratorExpressionScope(outer_scope) - else: - self.expr_scope = None - - def analyse_declarations(self, env): - self.init_scope(env) - - def analyse_scoped_declarations(self, env): - # this is called with the expr_scope as env - pass - - def analyse_types(self, env): - # no recursion here, the children will be analysed separately below - return self - - def analyse_scoped_expressions(self, env): - # this is called with the expr_scope as env - return self - - def generate_evaluation_code(self, code): - # set up local variables and free their references on exit - generate_inner_evaluation_code = super(ScopedExprNode, self).generate_evaluation_code - if not self.has_local_scope or not self.expr_scope.var_entries: - # no local variables => delegate, done - generate_inner_evaluation_code(code) - return - - code.putln('{ /* enter inner scope */') - py_entries = [] - for _, entry in sorted(item for item in self.expr_scope.entries.items() if item[0]): - if not entry.in_closure: - if entry.type.is_pyobject and entry.used: - py_entries.append(entry) - if not py_entries: - # no local Python references => no cleanup required - generate_inner_evaluation_code(code) - code.putln('} /* exit inner scope */') - return - - # must free all local Python references at each exit point - old_loop_labels = code.new_loop_labels() - old_error_label = code.new_error_label() - - generate_inner_evaluation_code(code) - - # normal (non-error) exit - self._generate_vars_cleanup(code, py_entries) - - # error/loop body exit points - exit_scope = code.new_label('exit_scope') - code.put_goto(exit_scope) - for label, old_label in ([(code.error_label, old_error_label)] + - list(zip(code.get_loop_labels(), old_loop_labels))): - if code.label_used(label): - code.put_label(label) - self._generate_vars_cleanup(code, py_entries) - code.put_goto(old_label) - code.put_label(exit_scope) - code.putln('} /* exit inner scope */') - - code.set_loop_labels(old_loop_labels) - code.error_label = old_error_label - - def _generate_vars_cleanup(self, code, py_entries): - for entry in py_entries: - if entry.is_cglobal: - code.put_var_gotref(entry) - code.put_decref_set(entry.cname, "Py_None") - else: - code.put_var_xdecref_clear(entry) - - -class ComprehensionNode(ScopedExprNode): - # A list/set/dict comprehension - - child_attrs = ["loop"] - - is_temp = True - constant_result = not_a_constant - - def infer_type(self, env): - return self.type - - def analyse_declarations(self, env): - self.append.target = self # this is used in the PyList_Append of the inner loop - self.init_scope(env) - - def analyse_scoped_declarations(self, env): - self.loop.analyse_declarations(env) - - def analyse_types(self, env): - if not self.has_local_scope: - self.loop = self.loop.analyse_expressions(env) - return self - - def analyse_scoped_expressions(self, env): - if self.has_local_scope: - self.loop = self.loop.analyse_expressions(env) - return self - - def may_be_none(self): - return False - - def generate_result_code(self, code): - self.generate_operation_code(code) - - def generate_operation_code(self, code): - if self.type is Builtin.list_type: - create_code = 'PyList_New(0)' - elif self.type is Builtin.set_type: - create_code = 'PySet_New(NULL)' - elif self.type is Builtin.dict_type: - create_code = 'PyDict_New()' - else: - raise InternalError("illegal type for comprehension: %s" % self.type) - code.putln('%s = %s; %s' % ( - self.result(), create_code, - code.error_goto_if_null(self.result(), self.pos))) - - code.put_gotref(self.result()) - self.loop.generate_execution_code(code) - - def annotate(self, code): - self.loop.annotate(code) - - -class ComprehensionAppendNode(Node): - # Need to be careful to avoid infinite recursion: - # target must not be in child_attrs/subexprs - - child_attrs = ['expr'] - target = None - - type = PyrexTypes.c_int_type - - def analyse_expressions(self, env): - self.expr = self.expr.analyse_expressions(env) - if not self.expr.type.is_pyobject: - self.expr = self.expr.coerce_to_pyobject(env) - return self - - def generate_execution_code(self, code): - if self.target.type is list_type: - code.globalstate.use_utility_code( - UtilityCode.load_cached("ListCompAppend", "Optimize.c")) - function = "__Pyx_ListComp_Append" - elif self.target.type is set_type: - function = "PySet_Add" - else: - raise InternalError( - "Invalid type for comprehension node: %s" % self.target.type) - - self.expr.generate_evaluation_code(code) - code.putln(code.error_goto_if("%s(%s, (PyObject*)%s)" % ( - function, - self.target.result(), - self.expr.result() - ), self.pos)) - self.expr.generate_disposal_code(code) - self.expr.free_temps(code) - - def generate_function_definitions(self, env, code): - self.expr.generate_function_definitions(env, code) - - def annotate(self, code): - self.expr.annotate(code) - -class DictComprehensionAppendNode(ComprehensionAppendNode): - child_attrs = ['key_expr', 'value_expr'] - - def analyse_expressions(self, env): - self.key_expr = self.key_expr.analyse_expressions(env) - if not self.key_expr.type.is_pyobject: - self.key_expr = self.key_expr.coerce_to_pyobject(env) - self.value_expr = self.value_expr.analyse_expressions(env) - if not self.value_expr.type.is_pyobject: - self.value_expr = self.value_expr.coerce_to_pyobject(env) - return self - - def generate_execution_code(self, code): - self.key_expr.generate_evaluation_code(code) - self.value_expr.generate_evaluation_code(code) - code.putln(code.error_goto_if("PyDict_SetItem(%s, (PyObject*)%s, (PyObject*)%s)" % ( - self.target.result(), - self.key_expr.result(), - self.value_expr.result() - ), self.pos)) - self.key_expr.generate_disposal_code(code) - self.key_expr.free_temps(code) - self.value_expr.generate_disposal_code(code) - self.value_expr.free_temps(code) - - def generate_function_definitions(self, env, code): - self.key_expr.generate_function_definitions(env, code) - self.value_expr.generate_function_definitions(env, code) - - def annotate(self, code): - self.key_expr.annotate(code) - self.value_expr.annotate(code) - - -class InlinedGeneratorExpressionNode(ExprNode): - # An inlined generator expression for which the result is calculated - # inside of the loop and returned as a single, first and only Generator - # return value. - # This will only be created by transforms when replacing safe builtin - # calls on generator expressions. - # - # gen GeneratorExpressionNode the generator, not containing any YieldExprNodes - # orig_func String the name of the builtin function this node replaces - # target ExprNode or None a 'target' for a ComprehensionAppend node - - subexprs = ["gen"] - orig_func = None - target = None - is_temp = True - type = py_object_type - - def __init__(self, pos, gen, comprehension_type=None, **kwargs): - gbody = gen.def_node.gbody - gbody.is_inlined = True - if comprehension_type is not None: - assert comprehension_type in (list_type, set_type, dict_type), comprehension_type - gbody.inlined_comprehension_type = comprehension_type - kwargs.update( - target=RawCNameExprNode(pos, comprehension_type, Naming.retval_cname), - type=comprehension_type, - ) - super(InlinedGeneratorExpressionNode, self).__init__(pos, gen=gen, **kwargs) - - def may_be_none(self): - return self.orig_func not in ('any', 'all', 'sorted') - - def infer_type(self, env): - return self.type - - def analyse_types(self, env): - self.gen = self.gen.analyse_expressions(env) - return self - - def generate_result_code(self, code): - code.putln("%s = __Pyx_Generator_Next(%s); %s" % ( - self.result(), self.gen.result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.result()) - - -class MergedSequenceNode(ExprNode): - """ - Merge a sequence of iterables into a set/list/tuple. - - The target collection is determined by self.type, which must be set externally. - - args [ExprNode] - """ - subexprs = ['args'] - is_temp = True - gil_message = "Constructing Python collection" - - def __init__(self, pos, args, type): - if type in (list_type, tuple_type) and args and args[0].is_sequence_constructor: - # construct a list directly from the first argument that we can then extend - if args[0].type is not list_type: - args[0] = ListNode(args[0].pos, args=args[0].args, is_temp=True) - ExprNode.__init__(self, pos, args=args, type=type) - - def calculate_constant_result(self): - result = [] - for item in self.args: - if item.is_sequence_constructor and item.mult_factor: - if item.mult_factor.constant_result <= 0: - continue - # otherwise, adding each item once should be enough - if item.is_set_literal or item.is_sequence_constructor: - # process items in order - items = (arg.constant_result for arg in item.args) - else: - items = item.constant_result - result.extend(items) - if self.type is set_type: - result = set(result) - elif self.type is tuple_type: - result = tuple(result) - else: - assert self.type is list_type - self.constant_result = result - - def compile_time_value(self, denv): - result = [] - for item in self.args: - if item.is_sequence_constructor and item.mult_factor: - if item.mult_factor.compile_time_value(denv) <= 0: - continue - if item.is_set_literal or item.is_sequence_constructor: - # process items in order - items = (arg.compile_time_value(denv) for arg in item.args) - else: - items = item.compile_time_value(denv) - result.extend(items) - if self.type is set_type: - try: - result = set(result) - except Exception as e: - self.compile_time_value_error(e) - elif self.type is tuple_type: - result = tuple(result) - else: - assert self.type is list_type - return result - - def type_dependencies(self, env): - return () - - def infer_type(self, env): - return self.type - - def analyse_types(self, env): - args = [ - arg.analyse_types(env).coerce_to_pyobject(env).as_none_safe_node( - # FIXME: CPython's error message starts with the runtime function name - 'argument after * must be an iterable, not NoneType') - for arg in self.args - ] - - if len(args) == 1 and args[0].type is self.type: - # strip this intermediate node and use the bare collection - return args[0] - - assert self.type in (set_type, list_type, tuple_type) - - self.args = args - return self - - def may_be_none(self): - return False - - def generate_evaluation_code(self, code): - code.mark_pos(self.pos) - self.allocate_temp_result(code) - - is_set = self.type is set_type - - args = iter(self.args) - item = next(args) - item.generate_evaluation_code(code) - if (is_set and item.is_set_literal or - not is_set and item.is_sequence_constructor and item.type is list_type): - code.putln("%s = %s;" % (self.result(), item.py_result())) - item.generate_post_assignment_code(code) - else: - code.putln("%s = %s(%s); %s" % ( - self.result(), - 'PySet_New' if is_set else 'PySequence_List', - item.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - item.generate_disposal_code(code) - item.free_temps(code) - - helpers = set() - if is_set: - add_func = "PySet_Add" - extend_func = "__Pyx_PySet_Update" - else: - add_func = "__Pyx_ListComp_Append" - extend_func = "__Pyx_PyList_Extend" - - for item in args: - if (is_set and (item.is_set_literal or item.is_sequence_constructor) or - (item.is_sequence_constructor and not item.mult_factor)): - if not is_set and item.args: - helpers.add(("ListCompAppend", "Optimize.c")) - for arg in item.args: - arg.generate_evaluation_code(code) - code.put_error_if_neg(arg.pos, "%s(%s, %s)" % ( - add_func, - self.result(), - arg.py_result())) - arg.generate_disposal_code(code) - arg.free_temps(code) - continue - - if is_set: - helpers.add(("PySet_Update", "Builtins.c")) - else: - helpers.add(("ListExtend", "Optimize.c")) - - item.generate_evaluation_code(code) - code.put_error_if_neg(item.pos, "%s(%s, %s)" % ( - extend_func, - self.result(), - item.py_result())) - item.generate_disposal_code(code) - item.free_temps(code) - - if self.type is tuple_type: - code.putln("{") - code.putln("PyObject *%s = PyList_AsTuple(%s);" % ( - Naming.quick_temp_cname, - self.result())) - code.put_decref(self.result(), py_object_type) - code.putln("%s = %s; %s" % ( - self.result(), - Naming.quick_temp_cname, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.result()) - code.putln("}") - - for helper in sorted(helpers): - code.globalstate.use_utility_code(UtilityCode.load_cached(*helper)) - - def annotate(self, code): - for item in self.args: - item.annotate(code) - - -class SetNode(ExprNode): - """ - Set constructor. - """ - subexprs = ['args'] - type = set_type - is_set_literal = True - gil_message = "Constructing Python set" - - def analyse_types(self, env): - for i in range(len(self.args)): - arg = self.args[i] - arg = arg.analyse_types(env) - self.args[i] = arg.coerce_to_pyobject(env) - self.type = set_type - self.is_temp = 1 - return self - - def may_be_none(self): - return False - - def calculate_constant_result(self): - self.constant_result = set([arg.constant_result for arg in self.args]) - - def compile_time_value(self, denv): - values = [arg.compile_time_value(denv) for arg in self.args] - try: - return set(values) - except Exception as e: - self.compile_time_value_error(e) - - def generate_evaluation_code(self, code): - for arg in self.args: - arg.generate_evaluation_code(code) - self.allocate_temp_result(code) - code.putln( - "%s = PySet_New(0); %s" % ( - self.result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - for arg in self.args: - code.put_error_if_neg( - self.pos, - "PySet_Add(%s, %s)" % (self.result(), arg.py_result())) - arg.generate_disposal_code(code) - arg.free_temps(code) - - -class DictNode(ExprNode): - # Dictionary constructor. - # - # key_value_pairs [DictItemNode] - # exclude_null_values [boolean] Do not add NULL values to dict - # - # obj_conversion_errors [PyrexError] used internally - - subexprs = ['key_value_pairs'] - is_temp = 1 - exclude_null_values = False - type = dict_type - is_dict_literal = True - reject_duplicates = False - - obj_conversion_errors = [] - - @classmethod - def from_pairs(cls, pos, pairs): - return cls(pos, key_value_pairs=[ - DictItemNode(pos, key=k, value=v) for k, v in pairs]) - - def calculate_constant_result(self): - self.constant_result = dict([ - item.constant_result for item in self.key_value_pairs]) - - def compile_time_value(self, denv): - pairs = [(item.key.compile_time_value(denv), item.value.compile_time_value(denv)) - for item in self.key_value_pairs] - try: - return dict(pairs) - except Exception as e: - self.compile_time_value_error(e) - - def type_dependencies(self, env): - return () - - def infer_type(self, env): - # TODO: Infer struct constructors. - return dict_type - - def analyse_types(self, env): - with local_errors(ignore=True) as errors: - self.key_value_pairs = [ - item.analyse_types(env) - for item in self.key_value_pairs - ] - self.obj_conversion_errors = errors - return self - - def may_be_none(self): - return False - - def coerce_to(self, dst_type, env): - if dst_type.is_pyobject: - self.release_errors() - if self.type.is_struct_or_union: - if not dict_type.subtype_of(dst_type): - error(self.pos, "Cannot interpret struct as non-dict type '%s'" % dst_type) - return DictNode(self.pos, key_value_pairs=[ - DictItemNode(item.pos, key=item.key.coerce_to_pyobject(env), - value=item.value.coerce_to_pyobject(env)) - for item in self.key_value_pairs]) - if not self.type.subtype_of(dst_type): - error(self.pos, "Cannot interpret dict as type '%s'" % dst_type) - elif dst_type.is_struct_or_union: - self.type = dst_type - if not dst_type.is_struct and len(self.key_value_pairs) != 1: - error(self.pos, "Exactly one field must be specified to convert to union '%s'" % dst_type) - elif dst_type.is_struct and len(self.key_value_pairs) < len(dst_type.scope.var_entries): - warning(self.pos, "Not all members given for struct '%s'" % dst_type, 1) - for item in self.key_value_pairs: - if isinstance(item.key, CoerceToPyTypeNode): - item.key = item.key.arg - if not item.key.is_string_literal: - error(item.key.pos, "Invalid struct field identifier") - item.key = StringNode(item.key.pos, value="") - else: - key = str(item.key.value) # converts string literals to unicode in Py3 - member = dst_type.scope.lookup_here(key) - if not member: - error(item.key.pos, "struct '%s' has no field '%s'" % (dst_type, key)) - else: - value = item.value - if isinstance(value, CoerceToPyTypeNode): - value = value.arg - item.value = value.coerce_to(member.type, env) - else: - self.type = error_type - error(self.pos, "Cannot interpret dict as type '%s'" % dst_type) - return self - - def release_errors(self): - for err in self.obj_conversion_errors: - report_error(err) - self.obj_conversion_errors = [] - - gil_message = "Constructing Python dict" - - def generate_evaluation_code(self, code): - # Custom method used here because key-value - # pairs are evaluated and used one at a time. - code.mark_pos(self.pos) - self.allocate_temp_result(code) - - is_dict = self.type.is_pyobject - if is_dict: - self.release_errors() - code.putln( - "%s = __Pyx_PyDict_NewPresized(%d); %s" % ( - self.result(), - len(self.key_value_pairs), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - keys_seen = set() - key_type = None - needs_error_helper = False - - for item in self.key_value_pairs: - item.generate_evaluation_code(code) - if is_dict: - if self.exclude_null_values: - code.putln('if (%s) {' % item.value.py_result()) - key = item.key - if self.reject_duplicates: - if keys_seen is not None: - # avoid runtime 'in' checks for literals that we can do at compile time - if not key.is_string_literal: - keys_seen = None - elif key.value in keys_seen: - # FIXME: this could be a compile time error, at least in Cython code - keys_seen = None - elif key_type is not type(key.value): - if key_type is None: - key_type = type(key.value) - keys_seen.add(key.value) - else: - # different types => may not be able to compare at compile time - keys_seen = None - else: - keys_seen.add(key.value) - - if keys_seen is None: - code.putln('if (unlikely(PyDict_Contains(%s, %s))) {' % ( - self.result(), key.py_result())) - # currently only used in function calls - needs_error_helper = True - code.putln('__Pyx_RaiseDoubleKeywordsError("function", %s); %s' % ( - key.py_result(), - code.error_goto(item.pos))) - code.putln("} else {") - - code.put_error_if_neg(self.pos, "PyDict_SetItem(%s, %s, %s)" % ( - self.result(), - item.key.py_result(), - item.value.py_result())) - if self.reject_duplicates and keys_seen is None: - code.putln('}') - if self.exclude_null_values: - code.putln('}') - else: - code.putln("%s.%s = %s;" % ( - self.result(), - item.key.value, - item.value.result())) - item.generate_disposal_code(code) - item.free_temps(code) - - if needs_error_helper: - code.globalstate.use_utility_code( - UtilityCode.load_cached("RaiseDoubleKeywords", "FunctionArguments.c")) - - def annotate(self, code): - for item in self.key_value_pairs: - item.annotate(code) - - -class DictItemNode(ExprNode): - # Represents a single item in a DictNode - # - # key ExprNode - # value ExprNode - subexprs = ['key', 'value'] - - nogil_check = None # Parent DictNode takes care of it - - def calculate_constant_result(self): - self.constant_result = ( - self.key.constant_result, self.value.constant_result) - - def analyse_types(self, env): - self.key = self.key.analyse_types(env) - self.value = self.value.analyse_types(env) - self.key = self.key.coerce_to_pyobject(env) - self.value = self.value.coerce_to_pyobject(env) - return self - - def generate_evaluation_code(self, code): - self.key.generate_evaluation_code(code) - self.value.generate_evaluation_code(code) - - def generate_disposal_code(self, code): - self.key.generate_disposal_code(code) - self.value.generate_disposal_code(code) - - def free_temps(self, code): - self.key.free_temps(code) - self.value.free_temps(code) - - def __iter__(self): - return iter([self.key, self.value]) - - -class SortedDictKeysNode(ExprNode): - # build sorted list of dict keys, e.g. for dir() - subexprs = ['arg'] - - is_temp = True - - def __init__(self, arg): - ExprNode.__init__(self, arg.pos, arg=arg) - self.type = Builtin.list_type - - def analyse_types(self, env): - arg = self.arg.analyse_types(env) - if arg.type is Builtin.dict_type: - arg = arg.as_none_safe_node( - "'NoneType' object is not iterable") - self.arg = arg - return self - - def may_be_none(self): - return False - - def generate_result_code(self, code): - dict_result = self.arg.py_result() - if self.arg.type is Builtin.dict_type: - code.putln('%s = PyDict_Keys(%s); %s' % ( - self.result(), dict_result, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - else: - # originally used PyMapping_Keys() here, but that may return a tuple - code.globalstate.use_utility_code(UtilityCode.load_cached( - 'PyObjectCallMethod0', 'ObjectHandling.c')) - keys_cname = code.intern_identifier(StringEncoding.EncodedString("keys")) - code.putln('%s = __Pyx_PyObject_CallMethod0(%s, %s); %s' % ( - self.result(), dict_result, keys_cname, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - code.putln("if (unlikely(!PyList_Check(%s))) {" % self.result()) - code.put_decref_set(self.result(), "PySequence_List(%s)" % self.result()) - code.putln(code.error_goto_if_null(self.result(), self.pos)) - code.put_gotref(self.py_result()) - code.putln("}") - code.put_error_if_neg( - self.pos, 'PyList_Sort(%s)' % self.py_result()) - - -class ModuleNameMixin(object): - def get_py_mod_name(self, code): - return code.get_py_string_const( - self.module_name, identifier=True) - - def get_py_qualified_name(self, code): - return code.get_py_string_const( - self.qualname, identifier=True) - - -class ClassNode(ExprNode, ModuleNameMixin): - # Helper class used in the implementation of Python - # class definitions. Constructs a class object given - # a name, tuple of bases and class dictionary. - # - # name EncodedString Name of the class - # class_def_node PyClassDefNode PyClassDefNode defining this class - # doc ExprNode or None Doc string - # module_name EncodedString Name of defining module - - subexprs = ['doc'] - type = py_object_type - is_temp = True - - def infer_type(self, env): - # TODO: could return 'type' in some cases - return py_object_type - - def analyse_types(self, env): - if self.doc: - self.doc = self.doc.analyse_types(env) - self.doc = self.doc.coerce_to_pyobject(env) - env.use_utility_code(UtilityCode.load_cached("CreateClass", "ObjectHandling.c")) - return self - - def may_be_none(self): - return True - - gil_message = "Constructing Python class" - - def generate_result_code(self, code): - class_def_node = self.class_def_node - cname = code.intern_identifier(self.name) - - if self.doc: - code.put_error_if_neg(self.pos, - 'PyDict_SetItem(%s, %s, %s)' % ( - class_def_node.dict.py_result(), - code.intern_identifier( - StringEncoding.EncodedString("__doc__")), - self.doc.py_result())) - py_mod_name = self.get_py_mod_name(code) - qualname = self.get_py_qualified_name(code) - code.putln( - '%s = __Pyx_CreateClass(%s, %s, %s, %s, %s); %s' % ( - self.result(), - class_def_node.bases.py_result(), - class_def_node.dict.py_result(), - cname, - qualname, - py_mod_name, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class Py3ClassNode(ExprNode): - # Helper class used in the implementation of Python3+ - # class definitions. Constructs a class object given - # a name, tuple of bases and class dictionary. - # - # name EncodedString Name of the class - # module_name EncodedString Name of defining module - # class_def_node PyClassDefNode PyClassDefNode defining this class - # calculate_metaclass bool should call CalculateMetaclass() - # allow_py2_metaclass bool should look for Py2 metaclass - - subexprs = [] - type = py_object_type - is_temp = True - - def infer_type(self, env): - # TODO: could return 'type' in some cases - return py_object_type - - def analyse_types(self, env): - return self - - def may_be_none(self): - return True - - gil_message = "Constructing Python class" - - def generate_result_code(self, code): - code.globalstate.use_utility_code(UtilityCode.load_cached("Py3ClassCreate", "ObjectHandling.c")) - cname = code.intern_identifier(self.name) - class_def_node = self.class_def_node - mkw = class_def_node.mkw.py_result() if class_def_node.mkw else 'NULL' - if class_def_node.metaclass: - metaclass = class_def_node.metaclass.py_result() - else: - metaclass = "((PyObject*)&__Pyx_DefaultClassType)" - code.putln( - '%s = __Pyx_Py3ClassCreate(%s, %s, %s, %s, %s, %d, %d); %s' % ( - self.result(), - metaclass, - cname, - class_def_node.bases.py_result(), - class_def_node.dict.py_result(), - mkw, - self.calculate_metaclass, - self.allow_py2_metaclass, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class PyClassMetaclassNode(ExprNode): - # Helper class holds Python3 metaclass object - # - # class_def_node PyClassDefNode PyClassDefNode defining this class - - subexprs = [] - - def analyse_types(self, env): - self.type = py_object_type - self.is_temp = True - return self - - def may_be_none(self): - return True - - def generate_result_code(self, code): - bases = self.class_def_node.bases - mkw = self.class_def_node.mkw - if mkw: - code.globalstate.use_utility_code( - UtilityCode.load_cached("Py3MetaclassGet", "ObjectHandling.c")) - call = "__Pyx_Py3MetaclassGet(%s, %s)" % ( - bases.result(), - mkw.result()) - else: - code.globalstate.use_utility_code( - UtilityCode.load_cached("CalculateMetaclass", "ObjectHandling.c")) - call = "__Pyx_CalculateMetaclass(NULL, %s)" % ( - bases.result()) - code.putln( - "%s = %s; %s" % ( - self.result(), call, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class PyClassNamespaceNode(ExprNode, ModuleNameMixin): - # Helper class holds Python3 namespace object - # - # All this are not owned by this node - # class_def_node PyClassDefNode PyClassDefNode defining this class - # doc ExprNode or None Doc string (owned) - - subexprs = ['doc'] - - def analyse_types(self, env): - if self.doc: - self.doc = self.doc.analyse_types(env).coerce_to_pyobject(env) - self.type = py_object_type - self.is_temp = 1 - return self - - def may_be_none(self): - return True - - def generate_result_code(self, code): - cname = code.intern_identifier(self.name) - py_mod_name = self.get_py_mod_name(code) - qualname = self.get_py_qualified_name(code) - class_def_node = self.class_def_node - null = "(PyObject *) NULL" - doc_code = self.doc.result() if self.doc else null - mkw = class_def_node.mkw.py_result() if class_def_node.mkw else null - metaclass = class_def_node.metaclass.py_result() if class_def_node.metaclass else null - code.putln( - "%s = __Pyx_Py3MetaclassPrepare(%s, %s, %s, %s, %s, %s, %s); %s" % ( - self.result(), - metaclass, - class_def_node.bases.result(), - cname, - qualname, - mkw, - py_mod_name, - doc_code, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class ClassCellInjectorNode(ExprNode): - # Initialize CyFunction.func_classobj - is_temp = True - type = py_object_type - subexprs = [] - is_active = False - - def analyse_expressions(self, env): - return self - - def generate_result_code(self, code): - assert self.is_active - code.putln( - '%s = PyList_New(0); %s' % ( - self.result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.result()) - - def generate_injection_code(self, code, classobj_cname): - assert self.is_active - code.globalstate.use_utility_code( - UtilityCode.load_cached("CyFunctionClassCell", "CythonFunction.c")) - code.put_error_if_neg(self.pos, '__Pyx_CyFunction_InitClassCell(%s, %s)' % ( - self.result(), classobj_cname)) - - -class ClassCellNode(ExprNode): - # Class Cell for noargs super() - subexprs = [] - is_temp = True - is_generator = False - type = py_object_type - - def analyse_types(self, env): - return self - - def generate_result_code(self, code): - if not self.is_generator: - code.putln('%s = __Pyx_CyFunction_GetClassObj(%s);' % ( - self.result(), - Naming.self_cname)) - else: - code.putln('%s = %s->classobj;' % ( - self.result(), Naming.generator_cname)) - code.putln( - 'if (!%s) { PyErr_SetString(PyExc_SystemError, ' - '"super(): empty __class__ cell"); %s }' % ( - self.result(), - code.error_goto(self.pos))) - code.put_incref(self.result(), py_object_type) - - -class PyCFunctionNode(ExprNode, ModuleNameMixin): - # Helper class used in the implementation of Python - # functions. Constructs a PyCFunction object - # from a PyMethodDef struct. - # - # pymethdef_cname string PyMethodDef structure - # self_object ExprNode or None - # binding bool - # def_node DefNode the Python function node - # module_name EncodedString Name of defining module - # code_object CodeObjectNode the PyCodeObject creator node - - subexprs = ['code_object', 'defaults_tuple', 'defaults_kwdict', - 'annotations_dict'] - - self_object = None - code_object = None - binding = False - def_node = None - defaults = None - defaults_struct = None - defaults_pyobjects = 0 - defaults_tuple = None - defaults_kwdict = None - annotations_dict = None - - type = py_object_type - is_temp = 1 - - specialized_cpdefs = None - is_specialization = False - - @classmethod - def from_defnode(cls, node, binding): - return cls(node.pos, - def_node=node, - pymethdef_cname=node.entry.pymethdef_cname, - binding=binding or node.specialized_cpdefs, - specialized_cpdefs=node.specialized_cpdefs, - code_object=CodeObjectNode(node)) - - def analyse_types(self, env): - if self.binding: - self.analyse_default_args(env) - return self - - def analyse_default_args(self, env): - """ - Handle non-literal function's default arguments. - """ - nonliteral_objects = [] - nonliteral_other = [] - default_args = [] - default_kwargs = [] - annotations = [] - - # For global cpdef functions and def/cpdef methods in cdef classes, we must use global constants - # for default arguments to avoid the dependency on the CyFunction object as 'self' argument - # in the underlying C function. Basically, cpdef functions/methods are static C functions, - # so their optional arguments must be static, too. - # TODO: change CyFunction implementation to pass both function object and owning object for method calls - must_use_constants = env.is_c_class_scope or (self.def_node.is_wrapper and env.is_module_scope) - - for arg in self.def_node.args: - if arg.default and not must_use_constants: - if not arg.default.is_literal: - arg.is_dynamic = True - if arg.type.is_pyobject: - nonliteral_objects.append(arg) - else: - nonliteral_other.append(arg) - else: - arg.default = DefaultLiteralArgNode(arg.pos, arg.default) - if arg.kw_only: - default_kwargs.append(arg) - else: - default_args.append(arg) - if arg.annotation: - arg.annotation = self.analyse_annotation(env, arg.annotation) - annotations.append((arg.pos, arg.name, arg.annotation)) - - for arg in (self.def_node.star_arg, self.def_node.starstar_arg): - if arg and arg.annotation: - arg.annotation = self.analyse_annotation(env, arg.annotation) - annotations.append((arg.pos, arg.name, arg.annotation)) - - annotation = self.def_node.return_type_annotation - if annotation: - annotation = self.analyse_annotation(env, annotation) - self.def_node.return_type_annotation = annotation - annotations.append((annotation.pos, StringEncoding.EncodedString("return"), annotation)) - - if nonliteral_objects or nonliteral_other: - module_scope = env.global_scope() - cname = module_scope.next_id(Naming.defaults_struct_prefix) - scope = Symtab.StructOrUnionScope(cname) - self.defaults = [] - for arg in nonliteral_objects: - entry = scope.declare_var(arg.name, arg.type, None, - Naming.arg_prefix + arg.name, - allow_pyobject=True) - self.defaults.append((arg, entry)) - for arg in nonliteral_other: - entry = scope.declare_var(arg.name, arg.type, None, - Naming.arg_prefix + arg.name, - allow_pyobject=False, allow_memoryview=True) - self.defaults.append((arg, entry)) - entry = module_scope.declare_struct_or_union( - None, 'struct', scope, 1, None, cname=cname) - self.defaults_struct = scope - self.defaults_pyobjects = len(nonliteral_objects) - for arg, entry in self.defaults: - arg.default_value = '%s->%s' % ( - Naming.dynamic_args_cname, entry.cname) - self.def_node.defaults_struct = self.defaults_struct.name - - if default_args or default_kwargs: - if self.defaults_struct is None: - if default_args: - defaults_tuple = TupleNode(self.pos, args=[ - arg.default for arg in default_args]) - self.defaults_tuple = defaults_tuple.analyse_types(env).coerce_to_pyobject(env) - if default_kwargs: - defaults_kwdict = DictNode(self.pos, key_value_pairs=[ - DictItemNode( - arg.pos, - key=IdentifierStringNode(arg.pos, value=arg.name), - value=arg.default) - for arg in default_kwargs]) - self.defaults_kwdict = defaults_kwdict.analyse_types(env) - else: - if default_args: - defaults_tuple = DefaultsTupleNode( - self.pos, default_args, self.defaults_struct) - else: - defaults_tuple = NoneNode(self.pos) - if default_kwargs: - defaults_kwdict = DefaultsKwDictNode( - self.pos, default_kwargs, self.defaults_struct) - else: - defaults_kwdict = NoneNode(self.pos) - - defaults_getter = Nodes.DefNode( - self.pos, args=[], star_arg=None, starstar_arg=None, - body=Nodes.ReturnStatNode( - self.pos, return_type=py_object_type, - value=TupleNode( - self.pos, args=[defaults_tuple, defaults_kwdict])), - decorators=None, - name=StringEncoding.EncodedString("__defaults__")) - # defaults getter must never live in class scopes, it's always a module function - module_scope = env.global_scope() - defaults_getter.analyse_declarations(module_scope) - defaults_getter = defaults_getter.analyse_expressions(module_scope) - defaults_getter.body = defaults_getter.body.analyse_expressions( - defaults_getter.local_scope) - defaults_getter.py_wrapper_required = False - defaults_getter.pymethdef_required = False - self.def_node.defaults_getter = defaults_getter - if annotations: - annotations_dict = DictNode(self.pos, key_value_pairs=[ - DictItemNode( - pos, key=IdentifierStringNode(pos, value=name), - value=value) - for pos, name, value in annotations]) - self.annotations_dict = annotations_dict.analyse_types(env) - - def analyse_annotation(self, env, annotation): - if annotation is None: - return None - atype = annotation.analyse_as_type(env) - if atype is not None: - # Keep parsed types as strings as they might not be Python representable. - annotation = UnicodeNode( - annotation.pos, - value=StringEncoding.EncodedString(atype.declaration_code('', for_display=True))) - annotation = annotation.analyse_types(env) - if not annotation.type.is_pyobject: - annotation = annotation.coerce_to_pyobject(env) - return annotation - - def may_be_none(self): - return False - - gil_message = "Constructing Python function" - - def self_result_code(self): - if self.self_object is None: - self_result = "NULL" - else: - self_result = self.self_object.py_result() - return self_result - - def generate_result_code(self, code): - if self.binding: - self.generate_cyfunction_code(code) - else: - self.generate_pycfunction_code(code) - - def generate_pycfunction_code(self, code): - py_mod_name = self.get_py_mod_name(code) - code.putln( - '%s = PyCFunction_NewEx(&%s, %s, %s); %s' % ( - self.result(), - self.pymethdef_cname, - self.self_result_code(), - py_mod_name, - code.error_goto_if_null(self.result(), self.pos))) - - code.put_gotref(self.py_result()) - - def generate_cyfunction_code(self, code): - if self.specialized_cpdefs: - def_node = self.specialized_cpdefs[0] - else: - def_node = self.def_node - - if self.specialized_cpdefs or self.is_specialization: - code.globalstate.use_utility_code( - UtilityCode.load_cached("FusedFunction", "CythonFunction.c")) - constructor = "__pyx_FusedFunction_New" - else: - code.globalstate.use_utility_code( - UtilityCode.load_cached("CythonFunction", "CythonFunction.c")) - constructor = "__Pyx_CyFunction_New" - - if self.code_object: - code_object_result = self.code_object.py_result() - else: - code_object_result = 'NULL' - - flags = [] - if def_node.is_staticmethod: - flags.append('__Pyx_CYFUNCTION_STATICMETHOD') - elif def_node.is_classmethod: - flags.append('__Pyx_CYFUNCTION_CLASSMETHOD') - - if def_node.local_scope.parent_scope.is_c_class_scope and not def_node.entry.is_anonymous: - flags.append('__Pyx_CYFUNCTION_CCLASS') - - if flags: - flags = ' | '.join(flags) - else: - flags = '0' - - code.putln( - '%s = %s(&%s, %s, %s, %s, %s, %s, %s); %s' % ( - self.result(), - constructor, - self.pymethdef_cname, - flags, - self.get_py_qualified_name(code), - self.self_result_code(), - self.get_py_mod_name(code), - Naming.moddict_cname, - code_object_result, - code.error_goto_if_null(self.result(), self.pos))) - - code.put_gotref(self.py_result()) - - if def_node.requires_classobj: - assert code.pyclass_stack, "pyclass_stack is empty" - class_node = code.pyclass_stack[-1] - code.put_incref(self.py_result(), py_object_type) - code.putln( - 'PyList_Append(%s, %s);' % ( - class_node.class_cell.result(), - self.result())) - code.put_giveref(self.py_result()) - - if self.defaults: - code.putln( - 'if (!__Pyx_CyFunction_InitDefaults(%s, sizeof(%s), %d)) %s' % ( - self.result(), self.defaults_struct.name, - self.defaults_pyobjects, code.error_goto(self.pos))) - defaults = '__Pyx_CyFunction_Defaults(%s, %s)' % ( - self.defaults_struct.name, self.result()) - for arg, entry in self.defaults: - arg.generate_assignment_code(code, target='%s->%s' % ( - defaults, entry.cname)) - - if self.defaults_tuple: - code.putln('__Pyx_CyFunction_SetDefaultsTuple(%s, %s);' % ( - self.result(), self.defaults_tuple.py_result())) - if self.defaults_kwdict: - code.putln('__Pyx_CyFunction_SetDefaultsKwDict(%s, %s);' % ( - self.result(), self.defaults_kwdict.py_result())) - if def_node.defaults_getter and not self.specialized_cpdefs: - # Fused functions do not support dynamic defaults, only their specialisations can have them for now. - code.putln('__Pyx_CyFunction_SetDefaultsGetter(%s, %s);' % ( - self.result(), def_node.defaults_getter.entry.pyfunc_cname)) - if self.annotations_dict: - code.putln('__Pyx_CyFunction_SetAnnotationsDict(%s, %s);' % ( - self.result(), self.annotations_dict.py_result())) - - -class InnerFunctionNode(PyCFunctionNode): - # Special PyCFunctionNode that depends on a closure class - # - - binding = True - needs_self_code = True - - def self_result_code(self): - if self.needs_self_code: - return "((PyObject*)%s)" % Naming.cur_scope_cname - return "NULL" - - -class CodeObjectNode(ExprNode): - # Create a PyCodeObject for a CyFunction instance. - # - # def_node DefNode the Python function node - # varnames TupleNode a tuple with all local variable names - - subexprs = ['varnames'] - is_temp = False - result_code = None - - def __init__(self, def_node): - ExprNode.__init__(self, def_node.pos, def_node=def_node) - args = list(def_node.args) - # if we have args/kwargs, then the first two in var_entries are those - local_vars = [arg for arg in def_node.local_scope.var_entries if arg.name] - self.varnames = TupleNode( - def_node.pos, - args=[IdentifierStringNode(arg.pos, value=arg.name) - for arg in args + local_vars], - is_temp=0, - is_literal=1) - - def may_be_none(self): - return False - - def calculate_result_code(self, code=None): - if self.result_code is None: - self.result_code = code.get_py_const(py_object_type, 'codeobj', cleanup_level=2) - return self.result_code - - def generate_result_code(self, code): - if self.result_code is None: - self.result_code = code.get_py_const(py_object_type, 'codeobj', cleanup_level=2) - - code = code.get_cached_constants_writer(self.result_code) - if code is None: - return # already initialised - code.mark_pos(self.pos) - func = self.def_node - func_name = code.get_py_string_const( - func.name, identifier=True, is_str=False, unicode_value=func.name) - # FIXME: better way to get the module file path at module init time? Encoding to use? - file_path = StringEncoding.bytes_literal(func.pos[0].get_filenametable_entry().encode('utf8'), 'utf8') - file_path_const = code.get_py_string_const(file_path, identifier=False, is_str=True) - - # This combination makes CPython create a new dict for "frame.f_locals" (see GH #1836). - flags = ['CO_OPTIMIZED', 'CO_NEWLOCALS'] - - if self.def_node.star_arg: - flags.append('CO_VARARGS') - if self.def_node.starstar_arg: - flags.append('CO_VARKEYWORDS') - - code.putln("%s = (PyObject*)__Pyx_PyCode_New(%d, %d, %d, 0, %s, %s, %s, %s, %s, %s, %s, %s, %s, %d, %s); %s" % ( - self.result_code, - len(func.args) - func.num_kwonly_args, # argcount - func.num_kwonly_args, # kwonlyargcount (Py3 only) - len(self.varnames.args), # nlocals - '|'.join(flags) or '0', # flags - Naming.empty_bytes, # code - Naming.empty_tuple, # consts - Naming.empty_tuple, # names (FIXME) - self.varnames.result(), # varnames - Naming.empty_tuple, # freevars (FIXME) - Naming.empty_tuple, # cellvars (FIXME) - file_path_const, # filename - func_name, # name - self.pos[1], # firstlineno - Naming.empty_bytes, # lnotab - code.error_goto_if_null(self.result_code, self.pos), - )) - - -class DefaultLiteralArgNode(ExprNode): - # CyFunction's literal argument default value - # - # Evaluate literal only once. - - subexprs = [] - is_literal = True - is_temp = False - - def __init__(self, pos, arg): - super(DefaultLiteralArgNode, self).__init__(pos) - self.arg = arg - self.type = self.arg.type - self.evaluated = False - - def analyse_types(self, env): - return self - - def generate_result_code(self, code): - pass - - def generate_evaluation_code(self, code): - if not self.evaluated: - self.arg.generate_evaluation_code(code) - self.evaluated = True - - def result(self): - return self.type.cast_code(self.arg.result()) - - -class DefaultNonLiteralArgNode(ExprNode): - # CyFunction's non-literal argument default value - - subexprs = [] - - def __init__(self, pos, arg, defaults_struct): - super(DefaultNonLiteralArgNode, self).__init__(pos) - self.arg = arg - self.defaults_struct = defaults_struct - - def analyse_types(self, env): - self.type = self.arg.type - self.is_temp = False - return self - - def generate_result_code(self, code): - pass - - def result(self): - return '__Pyx_CyFunction_Defaults(%s, %s)->%s' % ( - self.defaults_struct.name, Naming.self_cname, - self.defaults_struct.lookup(self.arg.name).cname) - - -class DefaultsTupleNode(TupleNode): - # CyFunction's __defaults__ tuple - - def __init__(self, pos, defaults, defaults_struct): - args = [] - for arg in defaults: - if not arg.default.is_literal: - arg = DefaultNonLiteralArgNode(pos, arg, defaults_struct) - else: - arg = arg.default - args.append(arg) - super(DefaultsTupleNode, self).__init__(pos, args=args) - - def analyse_types(self, env, skip_children=False): - return super(DefaultsTupleNode, self).analyse_types(env, skip_children).coerce_to_pyobject(env) - - -class DefaultsKwDictNode(DictNode): - # CyFunction's __kwdefaults__ dict - - def __init__(self, pos, defaults, defaults_struct): - items = [] - for arg in defaults: - name = IdentifierStringNode(arg.pos, value=arg.name) - if not arg.default.is_literal: - arg = DefaultNonLiteralArgNode(pos, arg, defaults_struct) - else: - arg = arg.default - items.append(DictItemNode(arg.pos, key=name, value=arg)) - super(DefaultsKwDictNode, self).__init__(pos, key_value_pairs=items) - - -class LambdaNode(InnerFunctionNode): - # Lambda expression node (only used as a function reference) - # - # args [CArgDeclNode] formal arguments - # star_arg PyArgDeclNode or None * argument - # starstar_arg PyArgDeclNode or None ** argument - # lambda_name string a module-globally unique lambda name - # result_expr ExprNode - # def_node DefNode the underlying function 'def' node - - child_attrs = ['def_node'] - - name = StringEncoding.EncodedString('') - - def analyse_declarations(self, env): - self.lambda_name = self.def_node.lambda_name = env.next_id('lambda') - self.def_node.no_assignment_synthesis = True - self.def_node.pymethdef_required = True - self.def_node.analyse_declarations(env) - self.def_node.is_cyfunction = True - self.pymethdef_cname = self.def_node.entry.pymethdef_cname - env.add_lambda_def(self.def_node) - - def analyse_types(self, env): - self.def_node = self.def_node.analyse_expressions(env) - return super(LambdaNode, self).analyse_types(env) - - def generate_result_code(self, code): - self.def_node.generate_execution_code(code) - super(LambdaNode, self).generate_result_code(code) - - -class GeneratorExpressionNode(LambdaNode): - # A generator expression, e.g. (i for i in range(10)) - # - # Result is a generator. - # - # loop ForStatNode the for-loop, containing a YieldExprNode - # def_node DefNode the underlying generator 'def' node - - name = StringEncoding.EncodedString('genexpr') - binding = False - - def analyse_declarations(self, env): - self.genexpr_name = env.next_id('genexpr') - super(GeneratorExpressionNode, self).analyse_declarations(env) - # No pymethdef required - self.def_node.pymethdef_required = False - self.def_node.py_wrapper_required = False - self.def_node.is_cyfunction = False - # Force genexpr signature - self.def_node.entry.signature = TypeSlots.pyfunction_noargs - - def generate_result_code(self, code): - code.putln( - '%s = %s(%s); %s' % ( - self.result(), - self.def_node.entry.pyfunc_cname, - self.self_result_code(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - -class YieldExprNode(ExprNode): - # Yield expression node - # - # arg ExprNode the value to return from the generator - # label_num integer yield label number - # is_yield_from boolean is a YieldFromExprNode to delegate to another generator - - subexprs = ['arg'] - type = py_object_type - label_num = 0 - is_yield_from = False - is_await = False - in_async_gen = False - expr_keyword = 'yield' - - def analyse_types(self, env): - if not self.label_num or (self.is_yield_from and self.in_async_gen): - error(self.pos, "'%s' not supported here" % self.expr_keyword) - self.is_temp = 1 - if self.arg is not None: - self.arg = self.arg.analyse_types(env) - if not self.arg.type.is_pyobject: - self.coerce_yield_argument(env) - return self - - def coerce_yield_argument(self, env): - self.arg = self.arg.coerce_to_pyobject(env) - - def generate_evaluation_code(self, code): - if self.arg: - self.arg.generate_evaluation_code(code) - self.arg.make_owned_reference(code) - code.putln( - "%s = %s;" % ( - Naming.retval_cname, - self.arg.result_as(py_object_type))) - self.arg.generate_post_assignment_code(code) - self.arg.free_temps(code) - else: - code.put_init_to_py_none(Naming.retval_cname, py_object_type) - self.generate_yield_code(code) - - def generate_yield_code(self, code): - """ - Generate the code to return the argument in 'Naming.retval_cname' - and to continue at the yield label. - """ - label_num, label_name = code.new_yield_label( - self.expr_keyword.replace(' ', '_')) - code.use_label(label_name) - - saved = [] - code.funcstate.closure_temps.reset() - for cname, type, manage_ref in code.funcstate.temps_in_use(): - save_cname = code.funcstate.closure_temps.allocate_temp(type) - saved.append((cname, save_cname, type)) - if type.is_pyobject: - code.put_xgiveref(cname) - code.putln('%s->%s = %s;' % (Naming.cur_scope_cname, save_cname, cname)) - - code.put_xgiveref(Naming.retval_cname) - profile = code.globalstate.directives['profile'] - linetrace = code.globalstate.directives['linetrace'] - if profile or linetrace: - code.put_trace_return(Naming.retval_cname, - nogil=not code.funcstate.gil_owned) - code.put_finish_refcount_context() - - if code.funcstate.current_except is not None: - # inside of an except block => save away currently handled exception - code.putln("__Pyx_Coroutine_SwapException(%s);" % Naming.generator_cname) - else: - # no exceptions being handled => restore exception state of caller - code.putln("__Pyx_Coroutine_ResetAndClearException(%s);" % Naming.generator_cname) - - code.putln("/* return from %sgenerator, %sing value */" % ( - 'async ' if self.in_async_gen else '', - 'await' if self.is_await else 'yield')) - code.putln("%s->resume_label = %d;" % ( - Naming.generator_cname, label_num)) - if self.in_async_gen and not self.is_await: - # __Pyx__PyAsyncGenValueWrapperNew() steals a reference to the return value - code.putln("return __Pyx__PyAsyncGenValueWrapperNew(%s);" % Naming.retval_cname) - else: - code.putln("return %s;" % Naming.retval_cname) - - code.put_label(label_name) - for cname, save_cname, type in saved: - code.putln('%s = %s->%s;' % (cname, Naming.cur_scope_cname, save_cname)) - if type.is_pyobject: - code.putln('%s->%s = 0;' % (Naming.cur_scope_cname, save_cname)) - code.put_xgotref(cname) - self.generate_sent_value_handling_code(code, Naming.sent_value_cname) - if self.result_is_used: - self.allocate_temp_result(code) - code.put('%s = %s; ' % (self.result(), Naming.sent_value_cname)) - code.put_incref(self.result(), py_object_type) - - def generate_sent_value_handling_code(self, code, value_cname): - code.putln(code.error_goto_if_null(value_cname, self.pos)) - - -class _YieldDelegationExprNode(YieldExprNode): - def yield_from_func(self, code): - raise NotImplementedError() - - def generate_evaluation_code(self, code, source_cname=None, decref_source=False): - if source_cname is None: - self.arg.generate_evaluation_code(code) - code.putln("%s = %s(%s, %s);" % ( - Naming.retval_cname, - self.yield_from_func(code), - Naming.generator_cname, - self.arg.py_result() if source_cname is None else source_cname)) - if source_cname is None: - self.arg.generate_disposal_code(code) - self.arg.free_temps(code) - elif decref_source: - code.put_decref_clear(source_cname, py_object_type) - code.put_xgotref(Naming.retval_cname) - - code.putln("if (likely(%s)) {" % Naming.retval_cname) - self.generate_yield_code(code) - code.putln("} else {") - # either error or sub-generator has normally terminated: return value => node result - if self.result_is_used: - self.fetch_iteration_result(code) - else: - self.handle_iteration_exception(code) - code.putln("}") - - def fetch_iteration_result(self, code): - # YieldExprNode has allocated the result temp for us - code.putln("%s = NULL;" % self.result()) - code.put_error_if_neg(self.pos, "__Pyx_PyGen_FetchStopIterationValue(&%s)" % self.result()) - code.put_gotref(self.result()) - - def handle_iteration_exception(self, code): - code.putln("PyObject* exc_type = __Pyx_PyErr_Occurred();") - code.putln("if (exc_type) {") - code.putln("if (likely(exc_type == PyExc_StopIteration || (exc_type != PyExc_GeneratorExit &&" - " __Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))) PyErr_Clear();") - code.putln("else %s" % code.error_goto(self.pos)) - code.putln("}") - - -class YieldFromExprNode(_YieldDelegationExprNode): - # "yield from GEN" expression - is_yield_from = True - expr_keyword = 'yield from' - - def coerce_yield_argument(self, env): - if not self.arg.type.is_string: - # FIXME: support C arrays and C++ iterators? - error(self.pos, "yielding from non-Python object not supported") - self.arg = self.arg.coerce_to_pyobject(env) - - def yield_from_func(self, code): - code.globalstate.use_utility_code(UtilityCode.load_cached("GeneratorYieldFrom", "Coroutine.c")) - return "__Pyx_Generator_Yield_From" - - -class AwaitExprNode(_YieldDelegationExprNode): - # 'await' expression node - # - # arg ExprNode the Awaitable value to await - # label_num integer yield label number - - is_await = True - expr_keyword = 'await' - - def coerce_yield_argument(self, env): - if self.arg is not None: - # FIXME: use same check as in YieldFromExprNode.coerce_yield_argument() ? - self.arg = self.arg.coerce_to_pyobject(env) - - def yield_from_func(self, code): - code.globalstate.use_utility_code(UtilityCode.load_cached("CoroutineYieldFrom", "Coroutine.c")) - return "__Pyx_Coroutine_Yield_From" - - -class AwaitIterNextExprNode(AwaitExprNode): - # 'await' expression node as part of 'async for' iteration - # - # Breaks out of loop on StopAsyncIteration exception. - - def _generate_break(self, code): - code.globalstate.use_utility_code(UtilityCode.load_cached("StopAsyncIteration", "Coroutine.c")) - code.putln("PyObject* exc_type = __Pyx_PyErr_Occurred();") - code.putln("if (unlikely(exc_type && (exc_type == __Pyx_PyExc_StopAsyncIteration || (" - " exc_type != PyExc_StopIteration && exc_type != PyExc_GeneratorExit &&" - " __Pyx_PyErr_GivenExceptionMatches(exc_type, __Pyx_PyExc_StopAsyncIteration))))) {") - code.putln("PyErr_Clear();") - code.putln("break;") - code.putln("}") - - def fetch_iteration_result(self, code): - assert code.break_label, "AwaitIterNextExprNode outside of 'async for' loop" - self._generate_break(code) - super(AwaitIterNextExprNode, self).fetch_iteration_result(code) - - def generate_sent_value_handling_code(self, code, value_cname): - assert code.break_label, "AwaitIterNextExprNode outside of 'async for' loop" - code.putln("if (unlikely(!%s)) {" % value_cname) - self._generate_break(code) - # all non-break exceptions are errors, as in parent class - code.putln(code.error_goto(self.pos)) - code.putln("}") - - -class GlobalsExprNode(AtomicExprNode): - type = dict_type - is_temp = 1 - - def analyse_types(self, env): - env.use_utility_code(Builtin.globals_utility_code) - return self - - gil_message = "Constructing globals dict" - - def may_be_none(self): - return False - - def generate_result_code(self, code): - code.putln('%s = __Pyx_Globals(); %s' % ( - self.result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.result()) - - -class LocalsDictItemNode(DictItemNode): - def analyse_types(self, env): - self.key = self.key.analyse_types(env) - self.value = self.value.analyse_types(env) - self.key = self.key.coerce_to_pyobject(env) - if self.value.type.can_coerce_to_pyobject(env): - self.value = self.value.coerce_to_pyobject(env) - else: - self.value = None - return self - - -class FuncLocalsExprNode(DictNode): - def __init__(self, pos, env): - local_vars = sorted([ - entry.name for entry in env.entries.values() if entry.name]) - items = [LocalsDictItemNode( - pos, key=IdentifierStringNode(pos, value=var), - value=NameNode(pos, name=var, allow_null=True)) - for var in local_vars] - DictNode.__init__(self, pos, key_value_pairs=items, - exclude_null_values=True) - - def analyse_types(self, env): - node = super(FuncLocalsExprNode, self).analyse_types(env) - node.key_value_pairs = [ i for i in node.key_value_pairs - if i.value is not None ] - return node - - -class PyClassLocalsExprNode(AtomicExprNode): - def __init__(self, pos, pyclass_dict): - AtomicExprNode.__init__(self, pos) - self.pyclass_dict = pyclass_dict - - def analyse_types(self, env): - self.type = self.pyclass_dict.type - self.is_temp = False - return self - - def may_be_none(self): - return False - - def result(self): - return self.pyclass_dict.result() - - def generate_result_code(self, code): - pass - - -def LocalsExprNode(pos, scope_node, env): - if env.is_module_scope: - return GlobalsExprNode(pos) - if env.is_py_class_scope: - return PyClassLocalsExprNode(pos, scope_node.dict) - return FuncLocalsExprNode(pos, env) - - -#------------------------------------------------------------------- -# -# Unary operator nodes -# -#------------------------------------------------------------------- - -compile_time_unary_operators = { - 'not': operator.not_, - '~': operator.inv, - '-': operator.neg, - '+': operator.pos, -} - -class UnopNode(ExprNode): - # operator string - # operand ExprNode - # - # Processing during analyse_expressions phase: - # - # analyse_c_operation - # Called when the operand is not a pyobject. - # - Check operand type and coerce if needed. - # - Determine result type and result code fragment. - # - Allocate temporary for result if needed. - - subexprs = ['operand'] - infix = True - - def calculate_constant_result(self): - func = compile_time_unary_operators[self.operator] - self.constant_result = func(self.operand.constant_result) - - def compile_time_value(self, denv): - func = compile_time_unary_operators.get(self.operator) - if not func: - error(self.pos, - "Unary '%s' not supported in compile-time expression" - % self.operator) - operand = self.operand.compile_time_value(denv) - try: - return func(operand) - except Exception as e: - self.compile_time_value_error(e) - - def infer_type(self, env): - operand_type = self.operand.infer_type(env) - if operand_type.is_cpp_class or operand_type.is_ptr: - cpp_type = operand_type.find_cpp_operation_type(self.operator) - if cpp_type is not None: - return cpp_type - return self.infer_unop_type(env, operand_type) - - def infer_unop_type(self, env, operand_type): - if operand_type.is_pyobject: - return py_object_type - else: - return operand_type - - def may_be_none(self): - if self.operand.type and self.operand.type.is_builtin_type: - if self.operand.type is not type_type: - return False - return ExprNode.may_be_none(self) - - def analyse_types(self, env): - self.operand = self.operand.analyse_types(env) - if self.is_pythran_operation(env): - self.type = PythranExpr(pythran_unaryop_type(self.operator, self.operand.type)) - self.is_temp = 1 - elif self.is_py_operation(): - self.coerce_operand_to_pyobject(env) - self.type = py_object_type - self.is_temp = 1 - elif self.is_cpp_operation(): - self.analyse_cpp_operation(env) - else: - self.analyse_c_operation(env) - return self - - def check_const(self): - return self.operand.check_const() - - def is_py_operation(self): - return self.operand.type.is_pyobject or self.operand.type.is_ctuple - - def is_pythran_operation(self, env): - np_pythran = has_np_pythran(env) - op_type = self.operand.type - return np_pythran and (op_type.is_buffer or op_type.is_pythran_expr) - - def nogil_check(self, env): - if self.is_py_operation(): - self.gil_error() - - def is_cpp_operation(self): - type = self.operand.type - return type.is_cpp_class - - def coerce_operand_to_pyobject(self, env): - self.operand = self.operand.coerce_to_pyobject(env) - - def generate_result_code(self, code): - if self.type.is_pythran_expr: - code.putln("// Pythran unaryop") - code.putln("__Pyx_call_destructor(%s);" % self.result()) - code.putln("new (&%s) decltype(%s){%s%s};" % ( - self.result(), - self.result(), - self.operator, - self.operand.pythran_result())) - elif self.operand.type.is_pyobject: - self.generate_py_operation_code(code) - elif self.is_temp: - if self.is_cpp_operation() and self.exception_check == '+': - translate_cpp_exception(code, self.pos, - "%s = %s %s;" % (self.result(), self.operator, self.operand.result()), - self.result() if self.type.is_pyobject else None, - self.exception_value, self.in_nogil_context) - else: - code.putln("%s = %s %s;" % (self.result(), self.operator, self.operand.result())) - - def generate_py_operation_code(self, code): - function = self.py_operation_function(code) - code.putln( - "%s = %s(%s); %s" % ( - self.result(), - function, - self.operand.py_result(), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - - def type_error(self): - if not self.operand.type.is_error: - error(self.pos, "Invalid operand type for '%s' (%s)" % - (self.operator, self.operand.type)) - self.type = PyrexTypes.error_type - - def analyse_cpp_operation(self, env, overload_check=True): - entry = env.lookup_operator(self.operator, [self.operand]) - if overload_check and not entry: - self.type_error() - return - if entry: - self.exception_check = entry.type.exception_check - self.exception_value = entry.type.exception_value - if self.exception_check == '+': - self.is_temp = True - if self.exception_value is None: - env.use_utility_code(UtilityCode.load_cached("CppExceptionConversion", "CppSupport.cpp")) - else: - self.exception_check = '' - self.exception_value = '' - cpp_type = self.operand.type.find_cpp_operation_type(self.operator) - if overload_check and cpp_type is None: - error(self.pos, "'%s' operator not defined for %s" % ( - self.operator, type)) - self.type_error() - return - self.type = cpp_type - - -class NotNode(UnopNode): - # 'not' operator - # - # operand ExprNode - operator = '!' - - type = PyrexTypes.c_bint_type - - def calculate_constant_result(self): - self.constant_result = not self.operand.constant_result - - def compile_time_value(self, denv): - operand = self.operand.compile_time_value(denv) - try: - return not operand - except Exception as e: - self.compile_time_value_error(e) - - def infer_unop_type(self, env, operand_type): - return PyrexTypes.c_bint_type - - def analyse_types(self, env): - self.operand = self.operand.analyse_types(env) - operand_type = self.operand.type - if operand_type.is_cpp_class: - self.analyse_cpp_operation(env) - else: - self.operand = self.operand.coerce_to_boolean(env) - return self - - def calculate_result_code(self): - return "(!%s)" % self.operand.result() - - -class UnaryPlusNode(UnopNode): - # unary '+' operator - - operator = '+' - - def analyse_c_operation(self, env): - self.type = PyrexTypes.widest_numeric_type( - self.operand.type, PyrexTypes.c_int_type) - - def py_operation_function(self, code): - return "PyNumber_Positive" - - def calculate_result_code(self): - if self.is_cpp_operation(): - return "(+%s)" % self.operand.result() - else: - return self.operand.result() - - -class UnaryMinusNode(UnopNode): - # unary '-' operator - - operator = '-' - - def analyse_c_operation(self, env): - if self.operand.type.is_numeric: - self.type = PyrexTypes.widest_numeric_type( - self.operand.type, PyrexTypes.c_int_type) - elif self.operand.type.is_enum: - self.type = PyrexTypes.c_int_type - else: - self.type_error() - if self.type.is_complex: - self.infix = False - - def py_operation_function(self, code): - return "PyNumber_Negative" - - def calculate_result_code(self): - if self.infix: - return "(-%s)" % self.operand.result() - else: - return "%s(%s)" % (self.operand.type.unary_op('-'), self.operand.result()) - - def get_constant_c_result_code(self): - value = self.operand.get_constant_c_result_code() - if value: - return "(-%s)" % value - -class TildeNode(UnopNode): - # unary '~' operator - - def analyse_c_operation(self, env): - if self.operand.type.is_int: - self.type = PyrexTypes.widest_numeric_type( - self.operand.type, PyrexTypes.c_int_type) - elif self.operand.type.is_enum: - self.type = PyrexTypes.c_int_type - else: - self.type_error() - - def py_operation_function(self, code): - return "PyNumber_Invert" - - def calculate_result_code(self): - return "(~%s)" % self.operand.result() - - -class CUnopNode(UnopNode): - - def is_py_operation(self): - return False - -class DereferenceNode(CUnopNode): - # unary * operator - - operator = '*' - - def infer_unop_type(self, env, operand_type): - if operand_type.is_ptr: - return operand_type.base_type - else: - return PyrexTypes.error_type - - def analyse_c_operation(self, env): - if self.operand.type.is_ptr: - self.type = self.operand.type.base_type - else: - self.type_error() - - def calculate_result_code(self): - return "(*%s)" % self.operand.result() - - -class DecrementIncrementNode(CUnopNode): - # unary ++/-- operator - - def analyse_c_operation(self, env): - if self.operand.type.is_numeric: - self.type = PyrexTypes.widest_numeric_type( - self.operand.type, PyrexTypes.c_int_type) - elif self.operand.type.is_ptr: - self.type = self.operand.type - else: - self.type_error() - - def calculate_result_code(self): - if self.is_prefix: - return "(%s%s)" % (self.operator, self.operand.result()) - else: - return "(%s%s)" % (self.operand.result(), self.operator) - -def inc_dec_constructor(is_prefix, operator): - return lambda pos, **kwds: DecrementIncrementNode(pos, is_prefix=is_prefix, operator=operator, **kwds) - - -class AmpersandNode(CUnopNode): - # The C address-of operator. - # - # operand ExprNode - operator = '&' - - def infer_unop_type(self, env, operand_type): - return PyrexTypes.c_ptr_type(operand_type) - - def analyse_types(self, env): - self.operand = self.operand.analyse_types(env) - argtype = self.operand.type - if argtype.is_cpp_class: - self.analyse_cpp_operation(env, overload_check=False) - if not (argtype.is_cfunction or argtype.is_reference or self.operand.is_addressable()): - if argtype.is_memoryviewslice: - self.error("Cannot take address of memoryview slice") - else: - self.error("Taking address of non-lvalue (type %s)" % argtype) - return self - if argtype.is_pyobject: - self.error("Cannot take address of Python %s" % ( - "variable '%s'" % self.operand.name if self.operand.is_name else - "object attribute '%s'" % self.operand.attribute if self.operand.is_attribute else - "object")) - return self - if not argtype.is_cpp_class or not self.type: - self.type = PyrexTypes.c_ptr_type(argtype) - return self - - def check_const(self): - return self.operand.check_const_addr() - - def error(self, mess): - error(self.pos, mess) - self.type = PyrexTypes.error_type - self.result_code = "" - - def calculate_result_code(self): - return "(&%s)" % self.operand.result() - - def generate_result_code(self, code): - if (self.operand.type.is_cpp_class and self.exception_check == '+'): - translate_cpp_exception(code, self.pos, - "%s = %s %s;" % (self.result(), self.operator, self.operand.result()), - self.result() if self.type.is_pyobject else None, - self.exception_value, self.in_nogil_context) - - -unop_node_classes = { - "+": UnaryPlusNode, - "-": UnaryMinusNode, - "~": TildeNode, -} - -def unop_node(pos, operator, operand): - # Construct unnop node of appropriate class for - # given operator. - if isinstance(operand, IntNode) and operator == '-': - return IntNode(pos = operand.pos, value = str(-Utils.str_to_number(operand.value)), - longness=operand.longness, unsigned=operand.unsigned) - elif isinstance(operand, UnopNode) and operand.operator == operator in '+-': - warning(pos, "Python has no increment/decrement operator: %s%sx == %s(%sx) == x" % ((operator,)*4), 5) - return unop_node_classes[operator](pos, - operator = operator, - operand = operand) - - -class TypecastNode(ExprNode): - # C type cast - # - # operand ExprNode - # base_type CBaseTypeNode - # declarator CDeclaratorNode - # typecheck boolean - # - # If used from a transform, one can if wanted specify the attribute - # "type" directly and leave base_type and declarator to None - - subexprs = ['operand'] - base_type = declarator = type = None - - def type_dependencies(self, env): - return () - - def infer_type(self, env): - if self.type is None: - base_type = self.base_type.analyse(env) - _, self.type = self.declarator.analyse(base_type, env) - return self.type - - def analyse_types(self, env): - if self.type is None: - base_type = self.base_type.analyse(env) - _, self.type = self.declarator.analyse(base_type, env) - if self.operand.has_constant_result(): - # Must be done after self.type is resolved. - self.calculate_constant_result() - if self.type.is_cfunction: - error(self.pos, - "Cannot cast to a function type") - self.type = PyrexTypes.error_type - self.operand = self.operand.analyse_types(env) - if self.type is PyrexTypes.c_bint_type: - # short circuit this to a coercion - return self.operand.coerce_to_boolean(env) - to_py = self.type.is_pyobject - from_py = self.operand.type.is_pyobject - if from_py and not to_py and self.operand.is_ephemeral(): - if not self.type.is_numeric and not self.type.is_cpp_class: - error(self.pos, "Casting temporary Python object to non-numeric non-Python type") - if to_py and not from_py: - if self.type is bytes_type and self.operand.type.is_int: - return CoerceIntToBytesNode(self.operand, env) - elif self.operand.type.can_coerce_to_pyobject(env): - self.result_ctype = py_object_type - self.operand = self.operand.coerce_to(self.type, env) - else: - if self.operand.type.is_ptr: - if not (self.operand.type.base_type.is_void or self.operand.type.base_type.is_struct): - error(self.pos, "Python objects cannot be cast from pointers of primitive types") - else: - # Should this be an error? - warning(self.pos, "No conversion from %s to %s, python object pointer used." % ( - self.operand.type, self.type)) - self.operand = self.operand.coerce_to_simple(env) - elif from_py and not to_py: - if self.type.create_from_py_utility_code(env): - self.operand = self.operand.coerce_to(self.type, env) - elif self.type.is_ptr: - if not (self.type.base_type.is_void or self.type.base_type.is_struct): - error(self.pos, "Python objects cannot be cast to pointers of primitive types") - else: - warning(self.pos, "No conversion from %s to %s, python object pointer used." % ( - self.type, self.operand.type)) - elif from_py and to_py: - if self.typecheck: - self.operand = PyTypeTestNode(self.operand, self.type, env, notnone=True) - elif isinstance(self.operand, SliceIndexNode): - # This cast can influence the created type of string slices. - self.operand = self.operand.coerce_to(self.type, env) - elif self.type.is_complex and self.operand.type.is_complex: - self.operand = self.operand.coerce_to_simple(env) - elif self.operand.type.is_fused: - self.operand = self.operand.coerce_to(self.type, env) - #self.type = self.operand.type - if self.type.is_ptr and self.type.base_type.is_cfunction and self.type.base_type.nogil: - op_type = self.operand.type - if op_type.is_ptr: - op_type = op_type.base_type - if op_type.is_cfunction and not op_type.nogil: - warning(self.pos, - "Casting a GIL-requiring function into a nogil function circumvents GIL validation", 1) - return self - - def is_simple(self): - # either temp or a C cast => no side effects other than the operand's - return self.operand.is_simple() - - def is_ephemeral(self): - # either temp or a C cast => no side effects other than the operand's - return self.operand.is_ephemeral() - - def nonlocally_immutable(self): - return self.is_temp or self.operand.nonlocally_immutable() - - def nogil_check(self, env): - if self.type and self.type.is_pyobject and self.is_temp: - self.gil_error() - - def check_const(self): - return self.operand.check_const() - - def calculate_constant_result(self): - self.constant_result = self.calculate_result_code(self.operand.constant_result) - - def calculate_result_code(self, operand_result = None): - if operand_result is None: - operand_result = self.operand.result() - if self.type.is_complex: - operand_result = self.operand.result() - if self.operand.type.is_complex: - real_part = self.type.real_type.cast_code("__Pyx_CREAL(%s)" % operand_result) - imag_part = self.type.real_type.cast_code("__Pyx_CIMAG(%s)" % operand_result) - else: - real_part = self.type.real_type.cast_code(operand_result) - imag_part = "0" - return "%s(%s, %s)" % ( - self.type.from_parts, - real_part, - imag_part) - else: - return self.type.cast_code(operand_result) - - def get_constant_c_result_code(self): - operand_result = self.operand.get_constant_c_result_code() - if operand_result: - return self.type.cast_code(operand_result) - - def result_as(self, type): - if self.type.is_pyobject and not self.is_temp: - # Optimise away some unnecessary casting - return self.operand.result_as(type) - else: - return ExprNode.result_as(self, type) - - def generate_result_code(self, code): - if self.is_temp: - code.putln( - "%s = (PyObject *)%s;" % ( - self.result(), - self.operand.result())) - code.put_incref(self.result(), self.ctype()) - - -ERR_START = "Start may not be given" -ERR_NOT_STOP = "Stop must be provided to indicate shape" -ERR_STEPS = ("Strides may only be given to indicate contiguity. " - "Consider slicing it after conversion") -ERR_NOT_POINTER = "Can only create cython.array from pointer or array" -ERR_BASE_TYPE = "Pointer base type does not match cython.array base type" - - -class CythonArrayNode(ExprNode): - """ - Used when a pointer of base_type is cast to a memoryviewslice with that - base type. i.e. - - p - - creates a fortran-contiguous cython.array. - - We leave the type set to object so coercions to object are more efficient - and less work. Acquiring a memoryviewslice from this will be just as - efficient. ExprNode.coerce_to() will do the additional typecheck on - self.compile_time_type - - This also handles my_c_array - - - operand ExprNode the thing we're casting - base_type_node MemoryViewSliceTypeNode the cast expression node - """ - - subexprs = ['operand', 'shapes'] - - shapes = None - is_temp = True - mode = "c" - array_dtype = None - - shape_type = PyrexTypes.c_py_ssize_t_type - - def analyse_types(self, env): - from . import MemoryView - - self.operand = self.operand.analyse_types(env) - if self.array_dtype: - array_dtype = self.array_dtype - else: - array_dtype = self.base_type_node.base_type_node.analyse(env) - axes = self.base_type_node.axes - - self.type = error_type - self.shapes = [] - ndim = len(axes) - - # Base type of the pointer or C array we are converting - base_type = self.operand.type - - if not self.operand.type.is_ptr and not self.operand.type.is_array: - error(self.operand.pos, ERR_NOT_POINTER) - return self - - # Dimension sizes of C array - array_dimension_sizes = [] - if base_type.is_array: - while base_type.is_array: - array_dimension_sizes.append(base_type.size) - base_type = base_type.base_type - elif base_type.is_ptr: - base_type = base_type.base_type - else: - error(self.pos, "unexpected base type %s found" % base_type) - return self - - if not (base_type.same_as(array_dtype) or base_type.is_void): - error(self.operand.pos, ERR_BASE_TYPE) - return self - elif self.operand.type.is_array and len(array_dimension_sizes) != ndim: - error(self.operand.pos, - "Expected %d dimensions, array has %d dimensions" % - (ndim, len(array_dimension_sizes))) - return self - - # Verify the start, stop and step values - # In case of a C array, use the size of C array in each dimension to - # get an automatic cast - for axis_no, axis in enumerate(axes): - if not axis.start.is_none: - error(axis.start.pos, ERR_START) - return self - - if axis.stop.is_none: - if array_dimension_sizes: - dimsize = array_dimension_sizes[axis_no] - axis.stop = IntNode(self.pos, value=str(dimsize), - constant_result=dimsize, - type=PyrexTypes.c_int_type) - else: - error(axis.pos, ERR_NOT_STOP) - return self - - axis.stop = axis.stop.analyse_types(env) - shape = axis.stop.coerce_to(self.shape_type, env) - if not shape.is_literal: - shape.coerce_to_temp(env) - - self.shapes.append(shape) - - first_or_last = axis_no in (0, ndim - 1) - if not axis.step.is_none and first_or_last: - # '1' in the first or last dimension denotes F or C contiguity - axis.step = axis.step.analyse_types(env) - if (not axis.step.type.is_int and axis.step.is_literal and not - axis.step.type.is_error): - error(axis.step.pos, "Expected an integer literal") - return self - - if axis.step.compile_time_value(env) != 1: - error(axis.step.pos, ERR_STEPS) - return self - - if axis_no == 0: - self.mode = "fortran" - - elif not axis.step.is_none and not first_or_last: - # step provided in some other dimension - error(axis.step.pos, ERR_STEPS) - return self - - if not self.operand.is_name: - self.operand = self.operand.coerce_to_temp(env) - - axes = [('direct', 'follow')] * len(axes) - if self.mode == "fortran": - axes[0] = ('direct', 'contig') - else: - axes[-1] = ('direct', 'contig') - - self.coercion_type = PyrexTypes.MemoryViewSliceType(array_dtype, axes) - self.coercion_type.validate_memslice_dtype(self.pos) - self.type = self.get_cython_array_type(env) - MemoryView.use_cython_array_utility_code(env) - env.use_utility_code(MemoryView.typeinfo_to_format_code) - return self - - def allocate_temp_result(self, code): - if self.temp_code: - raise RuntimeError("temp allocated multiple times") - - self.temp_code = code.funcstate.allocate_temp(self.type, True) - - def infer_type(self, env): - return self.get_cython_array_type(env) - - def get_cython_array_type(self, env): - cython_scope = env.global_scope().context.cython_scope - cython_scope.load_cythonscope() - return cython_scope.viewscope.lookup("array").type - - def generate_result_code(self, code): - from . import Buffer - - shapes = [self.shape_type.cast_code(shape.result()) - for shape in self.shapes] - dtype = self.coercion_type.dtype - - shapes_temp = code.funcstate.allocate_temp(py_object_type, True) - format_temp = code.funcstate.allocate_temp(py_object_type, True) - - itemsize = "sizeof(%s)" % dtype.empty_declaration_code() - type_info = Buffer.get_type_information_cname(code, dtype) - - if self.operand.type.is_ptr: - code.putln("if (!%s) {" % self.operand.result()) - code.putln( 'PyErr_SetString(PyExc_ValueError,' - '"Cannot create cython.array from NULL pointer");') - code.putln(code.error_goto(self.operand.pos)) - code.putln("}") - - code.putln("%s = __pyx_format_from_typeinfo(&%s); %s" % ( - format_temp, - type_info, - code.error_goto_if_null(format_temp, self.pos), - )) - code.put_gotref(format_temp) - - buildvalue_fmt = " __PYX_BUILD_PY_SSIZE_T " * len(shapes) - code.putln('%s = Py_BuildValue((char*) "(" %s ")", %s); %s' % ( - shapes_temp, - buildvalue_fmt, - ", ".join(shapes), - code.error_goto_if_null(shapes_temp, self.pos), - )) - code.put_gotref(shapes_temp) - - tup = (self.result(), shapes_temp, itemsize, format_temp, - self.mode, self.operand.result()) - code.putln('%s = __pyx_array_new(' - '%s, %s, PyBytes_AS_STRING(%s), ' - '(char *) "%s", (char *) %s);' % tup) - code.putln(code.error_goto_if_null(self.result(), self.pos)) - code.put_gotref(self.result()) - - def dispose(temp): - code.put_decref_clear(temp, py_object_type) - code.funcstate.release_temp(temp) - - dispose(shapes_temp) - dispose(format_temp) - - @classmethod - def from_carray(cls, src_node, env): - """ - Given a C array type, return a CythonArrayNode - """ - pos = src_node.pos - base_type = src_node.type - - none_node = NoneNode(pos) - axes = [] - - while base_type.is_array: - axes.append(SliceNode(pos, start=none_node, stop=none_node, - step=none_node)) - base_type = base_type.base_type - axes[-1].step = IntNode(pos, value="1", is_c_literal=True) - - memslicenode = Nodes.MemoryViewSliceTypeNode(pos, axes=axes, - base_type_node=base_type) - result = CythonArrayNode(pos, base_type_node=memslicenode, - operand=src_node, array_dtype=base_type) - result = result.analyse_types(env) - return result - -class SizeofNode(ExprNode): - # Abstract base class for sizeof(x) expression nodes. - - type = PyrexTypes.c_size_t_type - - def check_const(self): - return True - - def generate_result_code(self, code): - pass - - -class SizeofTypeNode(SizeofNode): - # C sizeof function applied to a type - # - # base_type CBaseTypeNode - # declarator CDeclaratorNode - - subexprs = [] - arg_type = None - - def analyse_types(self, env): - # we may have incorrectly interpreted a dotted name as a type rather than an attribute - # this could be better handled by more uniformly treating types as runtime-available objects - if 0 and self.base_type.module_path: - path = self.base_type.module_path - obj = env.lookup(path[0]) - if obj.as_module is None: - operand = NameNode(pos=self.pos, name=path[0]) - for attr in path[1:]: - operand = AttributeNode(pos=self.pos, obj=operand, attribute=attr) - operand = AttributeNode(pos=self.pos, obj=operand, attribute=self.base_type.name) - node = SizeofVarNode(self.pos, operand=operand).analyse_types(env) - return node - if self.arg_type is None: - base_type = self.base_type.analyse(env) - _, arg_type = self.declarator.analyse(base_type, env) - self.arg_type = arg_type - self.check_type() - return self - - def check_type(self): - arg_type = self.arg_type - if not arg_type: - return - if arg_type.is_pyobject and not arg_type.is_extension_type: - error(self.pos, "Cannot take sizeof Python object") - elif arg_type.is_void: - error(self.pos, "Cannot take sizeof void") - elif not arg_type.is_complete(): - error(self.pos, "Cannot take sizeof incomplete type '%s'" % arg_type) - - def calculate_result_code(self): - if self.arg_type.is_extension_type: - # the size of the pointer is boring - # we want the size of the actual struct - arg_code = self.arg_type.declaration_code("", deref=1) - else: - arg_code = self.arg_type.empty_declaration_code() - return "(sizeof(%s))" % arg_code - - -class SizeofVarNode(SizeofNode): - # C sizeof function applied to a variable - # - # operand ExprNode - - subexprs = ['operand'] - - def analyse_types(self, env): - # We may actually be looking at a type rather than a variable... - # If we are, traditional analysis would fail... - operand_as_type = self.operand.analyse_as_type(env) - if operand_as_type: - self.arg_type = operand_as_type - if self.arg_type.is_fused: - self.arg_type = self.arg_type.specialize(env.fused_to_specific) - self.__class__ = SizeofTypeNode - self.check_type() - else: - self.operand = self.operand.analyse_types(env) - return self - - def calculate_result_code(self): - return "(sizeof(%s))" % self.operand.result() - - def generate_result_code(self, code): - pass - - -class TypeidNode(ExprNode): - # C++ typeid operator applied to a type or variable - # - # operand ExprNode - # arg_type ExprNode - # is_variable boolean - - type = PyrexTypes.error_type - - subexprs = ['operand'] - - arg_type = None - is_variable = None - is_temp = 1 - - def get_type_info_type(self, env): - env_module = env - while not env_module.is_module_scope: - env_module = env_module.outer_scope - typeinfo_module = env_module.find_module('libcpp.typeinfo', self.pos) - typeinfo_entry = typeinfo_module.lookup('type_info') - return PyrexTypes.CFakeReferenceType(PyrexTypes.c_const_type(typeinfo_entry.type)) - - cpp_message = 'typeid operator' - - def analyse_types(self, env): - self.cpp_check(env) - type_info = self.get_type_info_type(env) - if not type_info: - self.error("The 'libcpp.typeinfo' module must be cimported to use the typeid() operator") - return self - self.type = type_info - as_type = self.operand.analyse_as_type(env) - if as_type: - self.arg_type = as_type - self.is_type = True - else: - self.arg_type = self.operand.analyse_types(env) - self.is_type = False - if self.arg_type.type.is_pyobject: - self.error("Cannot use typeid on a Python object") - return self - elif self.arg_type.type.is_void: - self.error("Cannot use typeid on void") - return self - elif not self.arg_type.type.is_complete(): - self.error("Cannot use typeid on incomplete type '%s'" % self.arg_type.type) - return self - env.use_utility_code(UtilityCode.load_cached("CppExceptionConversion", "CppSupport.cpp")) - return self - - def error(self, mess): - error(self.pos, mess) - self.type = PyrexTypes.error_type - self.result_code = "" - - def check_const(self): - return True - - def calculate_result_code(self): - return self.temp_code - - def generate_result_code(self, code): - if self.is_type: - arg_code = self.arg_type.empty_declaration_code() - else: - arg_code = self.arg_type.result() - translate_cpp_exception(code, self.pos, - "%s = typeid(%s);" % (self.temp_code, arg_code), - None, None, self.in_nogil_context) - -class TypeofNode(ExprNode): - # Compile-time type of an expression, as a string. - # - # operand ExprNode - # literal StringNode # internal - - literal = None - type = py_object_type - - subexprs = ['literal'] # 'operand' will be ignored after type analysis! - - def analyse_types(self, env): - self.operand = self.operand.analyse_types(env) - value = StringEncoding.EncodedString(str(self.operand.type)) #self.operand.type.typeof_name()) - literal = StringNode(self.pos, value=value) - literal = literal.analyse_types(env) - self.literal = literal.coerce_to_pyobject(env) - return self - - def analyse_as_type(self, env): - self.operand = self.operand.analyse_types(env) - return self.operand.type - - def may_be_none(self): - return False - - def generate_evaluation_code(self, code): - self.literal.generate_evaluation_code(code) - - def calculate_result_code(self): - return self.literal.calculate_result_code() - -#------------------------------------------------------------------- -# -# Binary operator nodes -# -#------------------------------------------------------------------- - -try: - matmul_operator = operator.matmul -except AttributeError: - def matmul_operator(a, b): - try: - func = a.__matmul__ - except AttributeError: - func = b.__rmatmul__ - return func(a, b) - -compile_time_binary_operators = { - '<': operator.lt, - '<=': operator.le, - '==': operator.eq, - '!=': operator.ne, - '>=': operator.ge, - '>': operator.gt, - 'is': operator.is_, - 'is_not': operator.is_not, - '+': operator.add, - '&': operator.and_, - '/': operator.truediv, - '//': operator.floordiv, - '<<': operator.lshift, - '%': operator.mod, - '*': operator.mul, - '|': operator.or_, - '**': operator.pow, - '>>': operator.rshift, - '-': operator.sub, - '^': operator.xor, - '@': matmul_operator, - 'in': lambda x, seq: x in seq, - 'not_in': lambda x, seq: x not in seq, -} - -def get_compile_time_binop(node): - func = compile_time_binary_operators.get(node.operator) - if not func: - error(node.pos, - "Binary '%s' not supported in compile-time expression" - % node.operator) - return func - - -class BinopNode(ExprNode): - # operator string - # operand1 ExprNode - # operand2 ExprNode - # - # Processing during analyse_expressions phase: - # - # analyse_c_operation - # Called when neither operand is a pyobject. - # - Check operand types and coerce if needed. - # - Determine result type and result code fragment. - # - Allocate temporary for result if needed. - - subexprs = ['operand1', 'operand2'] - inplace = False - - def calculate_constant_result(self): - func = compile_time_binary_operators[self.operator] - self.constant_result = func( - self.operand1.constant_result, - self.operand2.constant_result) - - def compile_time_value(self, denv): - func = get_compile_time_binop(self) - operand1 = self.operand1.compile_time_value(denv) - operand2 = self.operand2.compile_time_value(denv) - try: - return func(operand1, operand2) - except Exception as e: - self.compile_time_value_error(e) - - def infer_type(self, env): - return self.result_type(self.operand1.infer_type(env), - self.operand2.infer_type(env), env) - - def analyse_types(self, env): - self.operand1 = self.operand1.analyse_types(env) - self.operand2 = self.operand2.analyse_types(env) - self.analyse_operation(env) - return self - - def analyse_operation(self, env): - if self.is_pythran_operation(env): - self.type = self.result_type(self.operand1.type, - self.operand2.type, env) - assert self.type.is_pythran_expr - self.is_temp = 1 - elif self.is_py_operation(): - self.coerce_operands_to_pyobjects(env) - self.type = self.result_type(self.operand1.type, - self.operand2.type, env) - assert self.type.is_pyobject - self.is_temp = 1 - elif self.is_cpp_operation(): - self.analyse_cpp_operation(env) - else: - self.analyse_c_operation(env) - - def is_py_operation(self): - return self.is_py_operation_types(self.operand1.type, self.operand2.type) - - def is_py_operation_types(self, type1, type2): - return type1.is_pyobject or type2.is_pyobject or type1.is_ctuple or type2.is_ctuple - - def is_pythran_operation(self, env): - return self.is_pythran_operation_types(self.operand1.type, self.operand2.type, env) - - def is_pythran_operation_types(self, type1, type2, env): - # Support only expr op supported_type, or supported_type op expr - return has_np_pythran(env) and \ - (is_pythran_supported_operation_type(type1) and is_pythran_supported_operation_type(type2)) and \ - (is_pythran_expr(type1) or is_pythran_expr(type2)) - - def is_cpp_operation(self): - return (self.operand1.type.is_cpp_class - or self.operand2.type.is_cpp_class) - - def analyse_cpp_operation(self, env): - entry = env.lookup_operator(self.operator, [self.operand1, self.operand2]) - if not entry: - self.type_error() - return - func_type = entry.type - self.exception_check = func_type.exception_check - self.exception_value = func_type.exception_value - if self.exception_check == '+': - # Used by NumBinopNodes to break up expressions involving multiple - # operators so that exceptions can be handled properly. - self.is_temp = 1 - if self.exception_value is None: - env.use_utility_code(UtilityCode.load_cached("CppExceptionConversion", "CppSupport.cpp")) - if func_type.is_ptr: - func_type = func_type.base_type - if len(func_type.args) == 1: - self.operand2 = self.operand2.coerce_to(func_type.args[0].type, env) - else: - self.operand1 = self.operand1.coerce_to(func_type.args[0].type, env) - self.operand2 = self.operand2.coerce_to(func_type.args[1].type, env) - self.type = func_type.return_type - - def result_type(self, type1, type2, env): - if self.is_pythran_operation_types(type1, type2, env): - return PythranExpr(pythran_binop_type(self.operator, type1, type2)) - if self.is_py_operation_types(type1, type2): - if type2.is_string: - type2 = Builtin.bytes_type - elif type2.is_pyunicode_ptr: - type2 = Builtin.unicode_type - if type1.is_string: - type1 = Builtin.bytes_type - elif type1.is_pyunicode_ptr: - type1 = Builtin.unicode_type - if type1.is_builtin_type or type2.is_builtin_type: - if type1 is type2 and self.operator in '**%+|&^': - # FIXME: at least these operators should be safe - others? - return type1 - result_type = self.infer_builtin_types_operation(type1, type2) - if result_type is not None: - return result_type - return py_object_type - elif type1.is_error or type2.is_error: - return PyrexTypes.error_type - else: - return self.compute_c_result_type(type1, type2) - - def infer_builtin_types_operation(self, type1, type2): - return None - - def nogil_check(self, env): - if self.is_py_operation(): - self.gil_error() - - def coerce_operands_to_pyobjects(self, env): - self.operand1 = self.operand1.coerce_to_pyobject(env) - self.operand2 = self.operand2.coerce_to_pyobject(env) - - def check_const(self): - return self.operand1.check_const() and self.operand2.check_const() - - def is_ephemeral(self): - return (super(BinopNode, self).is_ephemeral() or - self.operand1.is_ephemeral() or self.operand2.is_ephemeral()) - - def generate_result_code(self, code): - if self.type.is_pythran_expr: - code.putln("// Pythran binop") - code.putln("__Pyx_call_destructor(%s);" % self.result()) - if self.operator == '**': - code.putln("new (&%s) decltype(%s){pythonic::numpy::functor::power{}(%s, %s)};" % ( - self.result(), - self.result(), - self.operand1.pythran_result(), - self.operand2.pythran_result())) - else: - code.putln("new (&%s) decltype(%s){%s %s %s};" % ( - self.result(), - self.result(), - self.operand1.pythran_result(), - self.operator, - self.operand2.pythran_result())) - elif self.operand1.type.is_pyobject: - function = self.py_operation_function(code) - if self.operator == '**': - extra_args = ", Py_None" - else: - extra_args = "" - code.putln( - "%s = %s(%s, %s%s); %s" % ( - self.result(), - function, - self.operand1.py_result(), - self.operand2.py_result(), - extra_args, - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.py_result()) - elif self.is_temp: - # C++ overloaded operators with exception values are currently all - # handled through temporaries. - if self.is_cpp_operation() and self.exception_check == '+': - translate_cpp_exception(code, self.pos, - "%s = %s;" % (self.result(), self.calculate_result_code()), - self.result() if self.type.is_pyobject else None, - self.exception_value, self.in_nogil_context) - else: - code.putln("%s = %s;" % (self.result(), self.calculate_result_code())) - - def type_error(self): - if not (self.operand1.type.is_error - or self.operand2.type.is_error): - error(self.pos, "Invalid operand types for '%s' (%s; %s)" % - (self.operator, self.operand1.type, - self.operand2.type)) - self.type = PyrexTypes.error_type - - -class CBinopNode(BinopNode): - - def analyse_types(self, env): - node = BinopNode.analyse_types(self, env) - if node.is_py_operation(): - node.type = PyrexTypes.error_type - return node - - def py_operation_function(self, code): - return "" - - def calculate_result_code(self): - return "(%s %s %s)" % ( - self.operand1.result(), - self.operator, - self.operand2.result()) - - def compute_c_result_type(self, type1, type2): - cpp_type = None - if type1.is_cpp_class or type1.is_ptr: - cpp_type = type1.find_cpp_operation_type(self.operator, type2) - if cpp_type is None and (type2.is_cpp_class or type2.is_ptr): - cpp_type = type2.find_cpp_operation_type(self.operator, type1) - # FIXME: do we need to handle other cases here? - return cpp_type - - -def c_binop_constructor(operator): - def make_binop_node(pos, **operands): - return CBinopNode(pos, operator=operator, **operands) - return make_binop_node - -class NumBinopNode(BinopNode): - # Binary operation taking numeric arguments. - - infix = True - overflow_check = False - overflow_bit_node = None - - def analyse_c_operation(self, env): - type1 = self.operand1.type - type2 = self.operand2.type - self.type = self.compute_c_result_type(type1, type2) - if not self.type: - self.type_error() - return - if self.type.is_complex: - self.infix = False - if (self.type.is_int - and env.directives['overflowcheck'] - and self.operator in self.overflow_op_names): - if (self.operator in ('+', '*') - and self.operand1.has_constant_result() - and not self.operand2.has_constant_result()): - self.operand1, self.operand2 = self.operand2, self.operand1 - self.overflow_check = True - self.overflow_fold = env.directives['overflowcheck.fold'] - self.func = self.type.overflow_check_binop( - self.overflow_op_names[self.operator], - env, - const_rhs = self.operand2.has_constant_result()) - self.is_temp = True - if not self.infix or (type1.is_numeric and type2.is_numeric): - self.operand1 = self.operand1.coerce_to(self.type, env) - self.operand2 = self.operand2.coerce_to(self.type, env) - - def compute_c_result_type(self, type1, type2): - if self.c_types_okay(type1, type2): - widest_type = PyrexTypes.widest_numeric_type(type1, type2) - if widest_type is PyrexTypes.c_bint_type: - if self.operator not in '|^&': - # False + False == 0 # not False! - widest_type = PyrexTypes.c_int_type - else: - widest_type = PyrexTypes.widest_numeric_type( - widest_type, PyrexTypes.c_int_type) - return widest_type - else: - return None - - def may_be_none(self): - if self.type and self.type.is_builtin_type: - # if we know the result type, we know the operation, so it can't be None - return False - type1 = self.operand1.type - type2 = self.operand2.type - if type1 and type1.is_builtin_type and type2 and type2.is_builtin_type: - # XXX: I can't think of any case where a binary operation - # on builtin types evaluates to None - add a special case - # here if there is one. - return False - return super(NumBinopNode, self).may_be_none() - - def get_constant_c_result_code(self): - value1 = self.operand1.get_constant_c_result_code() - value2 = self.operand2.get_constant_c_result_code() - if value1 and value2: - return "(%s %s %s)" % (value1, self.operator, value2) - else: - return None - - def c_types_okay(self, type1, type2): - #print "NumBinopNode.c_types_okay:", type1, type2 ### - return (type1.is_numeric or type1.is_enum) \ - and (type2.is_numeric or type2.is_enum) - - def generate_evaluation_code(self, code): - if self.overflow_check: - self.overflow_bit_node = self - self.overflow_bit = code.funcstate.allocate_temp(PyrexTypes.c_int_type, manage_ref=False) - code.putln("%s = 0;" % self.overflow_bit) - super(NumBinopNode, self).generate_evaluation_code(code) - if self.overflow_check: - code.putln("if (unlikely(%s)) {" % self.overflow_bit) - code.putln('PyErr_SetString(PyExc_OverflowError, "value too large");') - code.putln(code.error_goto(self.pos)) - code.putln("}") - code.funcstate.release_temp(self.overflow_bit) - - def calculate_result_code(self): - if self.overflow_bit_node is not None: - return "%s(%s, %s, &%s)" % ( - self.func, - self.operand1.result(), - self.operand2.result(), - self.overflow_bit_node.overflow_bit) - elif self.type.is_cpp_class or self.infix: - if is_pythran_expr(self.type): - result1, result2 = self.operand1.pythran_result(), self.operand2.pythran_result() - else: - result1, result2 = self.operand1.result(), self.operand2.result() - return "(%s %s %s)" % (result1, self.operator, result2) - else: - func = self.type.binary_op(self.operator) - if func is None: - error(self.pos, "binary operator %s not supported for %s" % (self.operator, self.type)) - return "%s(%s, %s)" % ( - func, - self.operand1.result(), - self.operand2.result()) - - def is_py_operation_types(self, type1, type2): - return (type1.is_unicode_char or - type2.is_unicode_char or - BinopNode.is_py_operation_types(self, type1, type2)) - - def py_operation_function(self, code): - function_name = self.py_functions[self.operator] - if self.inplace: - function_name = function_name.replace('PyNumber_', 'PyNumber_InPlace') - return function_name - - py_functions = { - "|": "PyNumber_Or", - "^": "PyNumber_Xor", - "&": "PyNumber_And", - "<<": "PyNumber_Lshift", - ">>": "PyNumber_Rshift", - "+": "PyNumber_Add", - "-": "PyNumber_Subtract", - "*": "PyNumber_Multiply", - "@": "__Pyx_PyNumber_MatrixMultiply", - "/": "__Pyx_PyNumber_Divide", - "//": "PyNumber_FloorDivide", - "%": "PyNumber_Remainder", - "**": "PyNumber_Power", - } - - overflow_op_names = { - "+": "add", - "-": "sub", - "*": "mul", - "<<": "lshift", - } - - -class IntBinopNode(NumBinopNode): - # Binary operation taking integer arguments. - - def c_types_okay(self, type1, type2): - #print "IntBinopNode.c_types_okay:", type1, type2 ### - return (type1.is_int or type1.is_enum) \ - and (type2.is_int or type2.is_enum) - - -class AddNode(NumBinopNode): - # '+' operator. - - def is_py_operation_types(self, type1, type2): - if type1.is_string and type2.is_string or type1.is_pyunicode_ptr and type2.is_pyunicode_ptr: - return 1 - else: - return NumBinopNode.is_py_operation_types(self, type1, type2) - - def infer_builtin_types_operation(self, type1, type2): - # b'abc' + 'abc' raises an exception in Py3, - # so we can safely infer the Py2 type for bytes here - string_types = (bytes_type, bytearray_type, str_type, basestring_type, unicode_type) - if type1 in string_types and type2 in string_types: - return string_types[max(string_types.index(type1), - string_types.index(type2))] - return None - - def compute_c_result_type(self, type1, type2): - #print "AddNode.compute_c_result_type:", type1, self.operator, type2 ### - if (type1.is_ptr or type1.is_array) and (type2.is_int or type2.is_enum): - return type1 - elif (type2.is_ptr or type2.is_array) and (type1.is_int or type1.is_enum): - return type2 - else: - return NumBinopNode.compute_c_result_type( - self, type1, type2) - - def py_operation_function(self, code): - type1, type2 = self.operand1.type, self.operand2.type - - if type1 is unicode_type or type2 is unicode_type: - if type1 in (unicode_type, str_type) and type2 in (unicode_type, str_type): - is_unicode_concat = True - elif isinstance(self.operand1, FormattedValueNode) or isinstance(self.operand2, FormattedValueNode): - # Assume that even if we don't know the second type, it's going to be a string. - is_unicode_concat = True - else: - # Operation depends on the second type. - is_unicode_concat = False - - if is_unicode_concat: - if self.operand1.may_be_none() or self.operand2.may_be_none(): - return '__Pyx_PyUnicode_ConcatSafe' - else: - return '__Pyx_PyUnicode_Concat' - - return super(AddNode, self).py_operation_function(code) - - -class SubNode(NumBinopNode): - # '-' operator. - - def compute_c_result_type(self, type1, type2): - if (type1.is_ptr or type1.is_array) and (type2.is_int or type2.is_enum): - return type1 - elif (type1.is_ptr or type1.is_array) and (type2.is_ptr or type2.is_array): - return PyrexTypes.c_ptrdiff_t_type - else: - return NumBinopNode.compute_c_result_type( - self, type1, type2) - - -class MulNode(NumBinopNode): - # '*' operator. - - def is_py_operation_types(self, type1, type2): - if ((type1.is_string and type2.is_int) or - (type2.is_string and type1.is_int)): - return 1 - else: - return NumBinopNode.is_py_operation_types(self, type1, type2) - - def infer_builtin_types_operation(self, type1, type2): - # let's assume that whatever builtin type you multiply a string with - # will either return a string of the same type or fail with an exception - string_types = (bytes_type, bytearray_type, str_type, basestring_type, unicode_type) - if type1 in string_types and type2.is_builtin_type: - return type1 - if type2 in string_types and type1.is_builtin_type: - return type2 - # multiplication of containers/numbers with an integer value - # always (?) returns the same type - if type1.is_int: - return type2 - if type2.is_int: - return type1 - return None - - -class MatMultNode(NumBinopNode): - # '@' operator. - - def is_py_operation_types(self, type1, type2): - return True - - def generate_evaluation_code(self, code): - code.globalstate.use_utility_code(UtilityCode.load_cached("MatrixMultiply", "ObjectHandling.c")) - super(MatMultNode, self).generate_evaluation_code(code) - - -class DivNode(NumBinopNode): - # '/' or '//' operator. - - cdivision = None - truedivision = None # == "unknown" if operator == '/' - ctruedivision = False - cdivision_warnings = False - zerodivision_check = None - - def find_compile_time_binary_operator(self, op1, op2): - func = compile_time_binary_operators[self.operator] - if self.operator == '/' and self.truedivision is None: - # => true div for floats, floor div for integers - if isinstance(op1, _py_int_types) and isinstance(op2, _py_int_types): - func = compile_time_binary_operators['//'] - return func - - def calculate_constant_result(self): - op1 = self.operand1.constant_result - op2 = self.operand2.constant_result - func = self.find_compile_time_binary_operator(op1, op2) - self.constant_result = func( - self.operand1.constant_result, - self.operand2.constant_result) - - def compile_time_value(self, denv): - operand1 = self.operand1.compile_time_value(denv) - operand2 = self.operand2.compile_time_value(denv) - try: - func = self.find_compile_time_binary_operator( - operand1, operand2) - return func(operand1, operand2) - except Exception as e: - self.compile_time_value_error(e) - - def _check_truedivision(self, env): - if self.cdivision or env.directives['cdivision']: - self.ctruedivision = False - else: - self.ctruedivision = self.truedivision - - def infer_type(self, env): - self._check_truedivision(env) - return self.result_type( - self.operand1.infer_type(env), - self.operand2.infer_type(env), env) - - def analyse_operation(self, env): - self._check_truedivision(env) - NumBinopNode.analyse_operation(self, env) - if self.is_cpp_operation(): - self.cdivision = True - if not self.type.is_pyobject: - self.zerodivision_check = ( - self.cdivision is None and not env.directives['cdivision'] - and (not self.operand2.has_constant_result() or - self.operand2.constant_result == 0)) - if self.zerodivision_check or env.directives['cdivision_warnings']: - # Need to check ahead of time to warn or raise zero division error - self.operand1 = self.operand1.coerce_to_simple(env) - self.operand2 = self.operand2.coerce_to_simple(env) - - def compute_c_result_type(self, type1, type2): - if self.operator == '/' and self.ctruedivision and not type1.is_cpp_class and not type2.is_cpp_class: - if not type1.is_float and not type2.is_float: - widest_type = PyrexTypes.widest_numeric_type(type1, PyrexTypes.c_double_type) - widest_type = PyrexTypes.widest_numeric_type(type2, widest_type) - return widest_type - return NumBinopNode.compute_c_result_type(self, type1, type2) - - def zero_division_message(self): - if self.type.is_int: - return "integer division or modulo by zero" - else: - return "float division" - - def generate_evaluation_code(self, code): - if not self.type.is_pyobject and not self.type.is_complex: - if self.cdivision is None: - self.cdivision = ( - code.globalstate.directives['cdivision'] - or self.type.is_float - or ((self.type.is_numeric or self.type.is_enum) and not self.type.signed) - ) - if not self.cdivision: - code.globalstate.use_utility_code( - UtilityCode.load_cached("DivInt", "CMath.c").specialize(self.type)) - NumBinopNode.generate_evaluation_code(self, code) - self.generate_div_warning_code(code) - - def generate_div_warning_code(self, code): - in_nogil = self.in_nogil_context - if not self.type.is_pyobject: - if self.zerodivision_check: - if not self.infix: - zero_test = "%s(%s)" % (self.type.unary_op('zero'), self.operand2.result()) - else: - zero_test = "%s == 0" % self.operand2.result() - code.putln("if (unlikely(%s)) {" % zero_test) - if in_nogil: - code.put_ensure_gil() - code.putln('PyErr_SetString(PyExc_ZeroDivisionError, "%s");' % self.zero_division_message()) - if in_nogil: - code.put_release_ensured_gil() - code.putln(code.error_goto(self.pos)) - code.putln("}") - if self.type.is_int and self.type.signed and self.operator != '%': - code.globalstate.use_utility_code(UtilityCode.load_cached("UnaryNegOverflows", "Overflow.c")) - if self.operand2.type.signed == 2: - # explicitly signed, no runtime check needed - minus1_check = 'unlikely(%s == -1)' % self.operand2.result() - else: - type_of_op2 = self.operand2.type.empty_declaration_code() - minus1_check = '(!(((%s)-1) > 0)) && unlikely(%s == (%s)-1)' % ( - type_of_op2, self.operand2.result(), type_of_op2) - code.putln("else if (sizeof(%s) == sizeof(long) && %s " - " && unlikely(UNARY_NEG_WOULD_OVERFLOW(%s))) {" % ( - self.type.empty_declaration_code(), - minus1_check, - self.operand1.result())) - if in_nogil: - code.put_ensure_gil() - code.putln('PyErr_SetString(PyExc_OverflowError, "value too large to perform division");') - if in_nogil: - code.put_release_ensured_gil() - code.putln(code.error_goto(self.pos)) - code.putln("}") - if code.globalstate.directives['cdivision_warnings'] and self.operator != '/': - code.globalstate.use_utility_code( - UtilityCode.load_cached("CDivisionWarning", "CMath.c")) - code.putln("if (unlikely((%s < 0) ^ (%s < 0))) {" % ( - self.operand1.result(), - self.operand2.result())) - warning_code = "__Pyx_cdivision_warning(%(FILENAME)s, %(LINENO)s)" % { - 'FILENAME': Naming.filename_cname, - 'LINENO': Naming.lineno_cname, - } - - if in_nogil: - result_code = 'result' - code.putln("int %s;" % result_code) - code.put_ensure_gil() - code.putln(code.set_error_info(self.pos, used=True)) - code.putln("%s = %s;" % (result_code, warning_code)) - code.put_release_ensured_gil() - else: - result_code = warning_code - code.putln(code.set_error_info(self.pos, used=True)) - - code.put("if (unlikely(%s)) " % result_code) - code.put_goto(code.error_label) - code.putln("}") - - def calculate_result_code(self): - if self.type.is_complex or self.is_cpp_operation(): - return NumBinopNode.calculate_result_code(self) - elif self.type.is_float and self.operator == '//': - return "floor(%s / %s)" % ( - self.operand1.result(), - self.operand2.result()) - elif self.truedivision or self.cdivision: - op1 = self.operand1.result() - op2 = self.operand2.result() - if self.truedivision: - if self.type != self.operand1.type: - op1 = self.type.cast_code(op1) - if self.type != self.operand2.type: - op2 = self.type.cast_code(op2) - return "(%s / %s)" % (op1, op2) - else: - return "__Pyx_div_%s(%s, %s)" % ( - self.type.specialization_name(), - self.operand1.result(), - self.operand2.result()) - - -_find_formatting_types = re.compile( - br"%" - br"(?:%|" # %% - br"(?:\([^)]+\))?" # %(name) - br"[-+#,0-9 ]*([a-z])" # %.2f etc. - br")").findall - -# These format conversion types can never trigger a Unicode string conversion in Py2. -_safe_bytes_formats = set([ - # Excludes 's' and 'r', which can generate non-bytes strings. - b'd', b'i', b'o', b'u', b'x', b'X', b'e', b'E', b'f', b'F', b'g', b'G', b'c', b'b', b'a', -]) - - -class ModNode(DivNode): - # '%' operator. - - def is_py_operation_types(self, type1, type2): - return (type1.is_string - or type2.is_string - or NumBinopNode.is_py_operation_types(self, type1, type2)) - - def infer_builtin_types_operation(self, type1, type2): - # b'%s' % xyz raises an exception in Py3<3.5, so it's safe to infer the type for Py2 and later Py3's. - if type1 is unicode_type: - # None + xyz may be implemented by RHS - if type2.is_builtin_type or not self.operand1.may_be_none(): - return type1 - elif type1 in (bytes_type, str_type, basestring_type): - if type2 is unicode_type: - return type2 - elif type2.is_numeric: - return type1 - elif self.operand1.is_string_literal: - if type1 is str_type or type1 is bytes_type: - if set(_find_formatting_types(self.operand1.value)) <= _safe_bytes_formats: - return type1 - return basestring_type - elif type1 is bytes_type and not type2.is_builtin_type: - return None # RHS might implement '% operator differently in Py3 - else: - return basestring_type # either str or unicode, can't tell - return None - - def zero_division_message(self): - if self.type.is_int: - return "integer division or modulo by zero" - else: - return "float divmod()" - - def analyse_operation(self, env): - DivNode.analyse_operation(self, env) - if not self.type.is_pyobject: - if self.cdivision is None: - self.cdivision = env.directives['cdivision'] or not self.type.signed - if not self.cdivision and not self.type.is_int and not self.type.is_float: - error(self.pos, "mod operator not supported for type '%s'" % self.type) - - def generate_evaluation_code(self, code): - if not self.type.is_pyobject and not self.cdivision: - if self.type.is_int: - code.globalstate.use_utility_code( - UtilityCode.load_cached("ModInt", "CMath.c").specialize(self.type)) - else: # float - code.globalstate.use_utility_code( - UtilityCode.load_cached("ModFloat", "CMath.c").specialize( - self.type, math_h_modifier=self.type.math_h_modifier)) - # NOTE: skipping over DivNode here - NumBinopNode.generate_evaluation_code(self, code) - self.generate_div_warning_code(code) - - def calculate_result_code(self): - if self.cdivision: - if self.type.is_float: - return "fmod%s(%s, %s)" % ( - self.type.math_h_modifier, - self.operand1.result(), - self.operand2.result()) - else: - return "(%s %% %s)" % ( - self.operand1.result(), - self.operand2.result()) - else: - return "__Pyx_mod_%s(%s, %s)" % ( - self.type.specialization_name(), - self.operand1.result(), - self.operand2.result()) - - def py_operation_function(self, code): - type1, type2 = self.operand1.type, self.operand2.type - # ("..." % x) must call "x.__rmod__()" for string subtypes. - if type1 is unicode_type: - if self.operand1.may_be_none() or ( - type2.is_extension_type and type2.subtype_of(type1) or - type2 is py_object_type and not isinstance(self.operand2, CoerceToPyTypeNode)): - return '__Pyx_PyUnicode_FormatSafe' - else: - return 'PyUnicode_Format' - elif type1 is str_type: - if self.operand1.may_be_none() or ( - type2.is_extension_type and type2.subtype_of(type1) or - type2 is py_object_type and not isinstance(self.operand2, CoerceToPyTypeNode)): - return '__Pyx_PyString_FormatSafe' - else: - return '__Pyx_PyString_Format' - return super(ModNode, self).py_operation_function(code) - - -class PowNode(NumBinopNode): - # '**' operator. - - def analyse_c_operation(self, env): - NumBinopNode.analyse_c_operation(self, env) - if self.type.is_complex: - if self.type.real_type.is_float: - self.operand1 = self.operand1.coerce_to(self.type, env) - self.operand2 = self.operand2.coerce_to(self.type, env) - self.pow_func = self.type.binary_op('**') - else: - error(self.pos, "complex int powers not supported") - self.pow_func = "" - elif self.type.is_float: - self.pow_func = "pow" + self.type.math_h_modifier - elif self.type.is_int: - self.pow_func = "__Pyx_pow_%s" % self.type.empty_declaration_code().replace(' ', '_') - env.use_utility_code( - UtilityCode.load_cached("IntPow", "CMath.c").specialize( - func_name=self.pow_func, - type=self.type.empty_declaration_code(), - signed=self.type.signed and 1 or 0)) - elif not self.type.is_error: - error(self.pos, "got unexpected types for C power operator: %s, %s" % - (self.operand1.type, self.operand2.type)) - - def calculate_result_code(self): - # Work around MSVC overloading ambiguity. - def typecast(operand): - if self.type == operand.type: - return operand.result() - else: - return self.type.cast_code(operand.result()) - return "%s(%s, %s)" % ( - self.pow_func, - typecast(self.operand1), - typecast(self.operand2)) - - def py_operation_function(self, code): - if (self.type.is_pyobject and - self.operand1.constant_result == 2 and - isinstance(self.operand1.constant_result, _py_int_types) and - self.operand2.type is py_object_type): - code.globalstate.use_utility_code(UtilityCode.load_cached('PyNumberPow2', 'Optimize.c')) - if self.inplace: - return '__Pyx_PyNumber_InPlacePowerOf2' - else: - return '__Pyx_PyNumber_PowerOf2' - return super(PowNode, self).py_operation_function(code) - - -class BoolBinopNode(ExprNode): - """ - Short-circuiting boolean operation. - - Note that this node provides the same code generation method as - BoolBinopResultNode to simplify expression nesting. - - operator string "and"/"or" - operand1 BoolBinopNode/BoolBinopResultNode left operand - operand2 BoolBinopNode/BoolBinopResultNode right operand - """ - subexprs = ['operand1', 'operand2'] - is_temp = True - operator = None - operand1 = None - operand2 = None - - def infer_type(self, env): - type1 = self.operand1.infer_type(env) - type2 = self.operand2.infer_type(env) - return PyrexTypes.independent_spanning_type(type1, type2) - - def may_be_none(self): - if self.operator == 'or': - return self.operand2.may_be_none() - else: - return self.operand1.may_be_none() or self.operand2.may_be_none() - - def calculate_constant_result(self): - operand1 = self.operand1.constant_result - operand2 = self.operand2.constant_result - if self.operator == 'and': - self.constant_result = operand1 and operand2 - else: - self.constant_result = operand1 or operand2 - - def compile_time_value(self, denv): - operand1 = self.operand1.compile_time_value(denv) - operand2 = self.operand2.compile_time_value(denv) - if self.operator == 'and': - return operand1 and operand2 - else: - return operand1 or operand2 - - def is_ephemeral(self): - return self.operand1.is_ephemeral() or self.operand2.is_ephemeral() - - def analyse_types(self, env): - # Note: we do not do any coercion here as we most likely do not know the final type anyway. - # We even accept to set self.type to ErrorType if both operands do not have a spanning type. - # The coercion to the final type and to a "simple" value is left to coerce_to(). - operand1 = self.operand1.analyse_types(env) - operand2 = self.operand2.analyse_types(env) - self.type = PyrexTypes.independent_spanning_type( - operand1.type, operand2.type) - self.operand1 = self._wrap_operand(operand1, env) - self.operand2 = self._wrap_operand(operand2, env) - return self - - def _wrap_operand(self, operand, env): - if not isinstance(operand, (BoolBinopNode, BoolBinopResultNode)): - operand = BoolBinopResultNode(operand, self.type, env) - return operand - - def wrap_operands(self, env): - """ - Must get called by transforms that want to create a correct BoolBinopNode - after the type analysis phase. - """ - self.operand1 = self._wrap_operand(self.operand1, env) - self.operand2 = self._wrap_operand(self.operand2, env) - - def coerce_to_boolean(self, env): - return self.coerce_to(PyrexTypes.c_bint_type, env) - - def coerce_to(self, dst_type, env): - operand1 = self.operand1.coerce_to(dst_type, env) - operand2 = self.operand2.coerce_to(dst_type, env) - return BoolBinopNode.from_node( - self, type=dst_type, - operator=self.operator, - operand1=operand1, operand2=operand2) - - def generate_bool_evaluation_code(self, code, final_result_temp, final_result_type, and_label, or_label, end_label, fall_through): - code.mark_pos(self.pos) - - outer_labels = (and_label, or_label) - if self.operator == 'and': - my_label = and_label = code.new_label('next_and') - else: - my_label = or_label = code.new_label('next_or') - self.operand1.generate_bool_evaluation_code( - code, final_result_temp, final_result_type, and_label, or_label, end_label, my_label) - - and_label, or_label = outer_labels - - code.put_label(my_label) - self.operand2.generate_bool_evaluation_code( - code, final_result_temp, final_result_type, and_label, or_label, end_label, fall_through) - - def generate_evaluation_code(self, code): - self.allocate_temp_result(code) - result_type = PyrexTypes.py_object_type if self.type.is_pyobject else self.type - or_label = and_label = None - end_label = code.new_label('bool_binop_done') - self.generate_bool_evaluation_code(code, self.result(), result_type, and_label, or_label, end_label, end_label) - code.put_label(end_label) - - gil_message = "Truth-testing Python object" - - def check_const(self): - return self.operand1.check_const() and self.operand2.check_const() - - def generate_subexpr_disposal_code(self, code): - pass # nothing to do here, all done in generate_evaluation_code() - - def free_subexpr_temps(self, code): - pass # nothing to do here, all done in generate_evaluation_code() - - def generate_operand1_test(self, code): - # Generate code to test the truth of the first operand. - if self.type.is_pyobject: - test_result = code.funcstate.allocate_temp( - PyrexTypes.c_bint_type, manage_ref=False) - code.putln( - "%s = __Pyx_PyObject_IsTrue(%s); %s" % ( - test_result, - self.operand1.py_result(), - code.error_goto_if_neg(test_result, self.pos))) - else: - test_result = self.operand1.result() - return (test_result, self.type.is_pyobject) - - -class BoolBinopResultNode(ExprNode): - """ - Intermediate result of a short-circuiting and/or expression. - Tests the result for 'truthiness' and takes care of coercing the final result - of the overall expression to the target type. - - Note that this node provides the same code generation method as - BoolBinopNode to simplify expression nesting. - - arg ExprNode the argument to test - value ExprNode the coerced result value node - """ - - subexprs = ['arg', 'value'] - is_temp = True - arg = None - value = None - - def __init__(self, arg, result_type, env): - # using 'arg' multiple times, so it must be a simple/temp value - arg = arg.coerce_to_simple(env) - # wrap in ProxyNode, in case a transform wants to replace self.arg later - arg = ProxyNode(arg) - super(BoolBinopResultNode, self).__init__( - arg.pos, arg=arg, type=result_type, - value=CloneNode(arg).coerce_to(result_type, env)) - - def coerce_to_boolean(self, env): - return self.coerce_to(PyrexTypes.c_bint_type, env) - - def coerce_to(self, dst_type, env): - # unwrap, coerce, rewrap - arg = self.arg.arg - if dst_type is PyrexTypes.c_bint_type: - arg = arg.coerce_to_boolean(env) - # TODO: unwrap more coercion nodes? - return BoolBinopResultNode(arg, dst_type, env) - - def nogil_check(self, env): - # let's leave all errors to BoolBinopNode - pass - - def generate_operand_test(self, code): - # Generate code to test the truth of the first operand. - if self.arg.type.is_pyobject: - test_result = code.funcstate.allocate_temp( - PyrexTypes.c_bint_type, manage_ref=False) - code.putln( - "%s = __Pyx_PyObject_IsTrue(%s); %s" % ( - test_result, - self.arg.py_result(), - code.error_goto_if_neg(test_result, self.pos))) - else: - test_result = self.arg.result() - return (test_result, self.arg.type.is_pyobject) - - def generate_bool_evaluation_code(self, code, final_result_temp, final_result_type, and_label, or_label, end_label, fall_through): - code.mark_pos(self.pos) - - # x => x - # x and ... or ... => next 'and' / 'or' - # False ... or x => next 'or' - # True and x => next 'and' - # True or x => True (operand) - - self.arg.generate_evaluation_code(code) - if and_label or or_label: - test_result, uses_temp = self.generate_operand_test(code) - if uses_temp and (and_label and or_label): - # cannot become final result => free early - # disposal: uses_temp and (and_label and or_label) - self.arg.generate_disposal_code(code) - sense = '!' if or_label else '' - code.putln("if (%s%s) {" % (sense, test_result)) - if uses_temp: - code.funcstate.release_temp(test_result) - if not uses_temp or not (and_label and or_label): - # disposal: (not uses_temp) or {not (and_label and or_label) [if]} - self.arg.generate_disposal_code(code) - - if or_label and or_label != fall_through: - # value is false => short-circuit to next 'or' - code.put_goto(or_label) - if and_label: - # value is true => go to next 'and' - if or_label: - code.putln("} else {") - if not uses_temp: - # disposal: (not uses_temp) and {(and_label and or_label) [else]} - self.arg.generate_disposal_code(code) - if and_label != fall_through: - code.put_goto(and_label) - - if not and_label or not or_label: - # if no next 'and' or 'or', we provide the result - if and_label or or_label: - code.putln("} else {") - self.value.generate_evaluation_code(code) - self.value.make_owned_reference(code) - code.putln("%s = %s;" % (final_result_temp, self.value.result_as(final_result_type))) - self.value.generate_post_assignment_code(code) - # disposal: {not (and_label and or_label) [else]} - self.arg.generate_disposal_code(code) - self.value.free_temps(code) - if end_label != fall_through: - code.put_goto(end_label) - - if and_label or or_label: - code.putln("}") - self.arg.free_temps(code) - - -class CondExprNode(ExprNode): - # Short-circuiting conditional expression. - # - # test ExprNode - # true_val ExprNode - # false_val ExprNode - - true_val = None - false_val = None - is_temp = True - - subexprs = ['test', 'true_val', 'false_val'] - - def type_dependencies(self, env): - return self.true_val.type_dependencies(env) + self.false_val.type_dependencies(env) - - def infer_type(self, env): - return PyrexTypes.independent_spanning_type( - self.true_val.infer_type(env), - self.false_val.infer_type(env)) - - def calculate_constant_result(self): - if self.test.constant_result: - self.constant_result = self.true_val.constant_result - else: - self.constant_result = self.false_val.constant_result - - def is_ephemeral(self): - return self.true_val.is_ephemeral() or self.false_val.is_ephemeral() - - def analyse_types(self, env): - self.test = self.test.analyse_types(env).coerce_to_boolean(env) - self.true_val = self.true_val.analyse_types(env) - self.false_val = self.false_val.analyse_types(env) - return self.analyse_result_type(env) - - def analyse_result_type(self, env): - self.type = PyrexTypes.independent_spanning_type( - self.true_val.type, self.false_val.type) - if self.type.is_reference: - self.type = PyrexTypes.CFakeReferenceType(self.type.ref_base_type) - if self.type.is_pyobject: - self.result_ctype = py_object_type - elif self.true_val.is_ephemeral() or self.false_val.is_ephemeral(): - error(self.pos, "Unsafe C derivative of temporary Python reference used in conditional expression") - if self.true_val.type.is_pyobject or self.false_val.type.is_pyobject: - self.true_val = self.true_val.coerce_to(self.type, env) - self.false_val = self.false_val.coerce_to(self.type, env) - if self.type.is_error: - self.type_error() - return self - - def coerce_to_integer(self, env): - self.true_val = self.true_val.coerce_to_integer(env) - self.false_val = self.false_val.coerce_to_integer(env) - self.result_ctype = None - return self.analyse_result_type(env) - - def coerce_to(self, dst_type, env): - self.true_val = self.true_val.coerce_to(dst_type, env) - self.false_val = self.false_val.coerce_to(dst_type, env) - self.result_ctype = None - return self.analyse_result_type(env) - - def type_error(self): - if not (self.true_val.type.is_error or self.false_val.type.is_error): - error(self.pos, "Incompatible types in conditional expression (%s; %s)" % - (self.true_val.type, self.false_val.type)) - self.type = PyrexTypes.error_type - - def check_const(self): - return (self.test.check_const() - and self.true_val.check_const() - and self.false_val.check_const()) - - def generate_evaluation_code(self, code): - # Because subexprs may not be evaluated we can use a more optimal - # subexpr allocation strategy than the default, so override evaluation_code. - - code.mark_pos(self.pos) - self.allocate_temp_result(code) - self.test.generate_evaluation_code(code) - code.putln("if (%s) {" % self.test.result()) - self.eval_and_get(code, self.true_val) - code.putln("} else {") - self.eval_and_get(code, self.false_val) - code.putln("}") - self.test.generate_disposal_code(code) - self.test.free_temps(code) - - def eval_and_get(self, code, expr): - expr.generate_evaluation_code(code) - if self.type.is_memoryviewslice: - expr.make_owned_memoryviewslice(code) - else: - expr.make_owned_reference(code) - code.putln('%s = %s;' % (self.result(), expr.result_as(self.ctype()))) - expr.generate_post_assignment_code(code) - expr.free_temps(code) - - def generate_subexpr_disposal_code(self, code): - pass # done explicitly above (cleanup must separately happen within the if/else blocks) - - def free_subexpr_temps(self, code): - pass # done explicitly above (cleanup must separately happen within the if/else blocks) - - -richcmp_constants = { - "<" : "Py_LT", - "<=": "Py_LE", - "==": "Py_EQ", - "!=": "Py_NE", - "<>": "Py_NE", - ">" : "Py_GT", - ">=": "Py_GE", - # the following are faked by special compare functions - "in" : "Py_EQ", - "not_in": "Py_NE", -} - -class CmpNode(object): - # Mixin class containing code common to PrimaryCmpNodes - # and CascadedCmpNodes. - - special_bool_cmp_function = None - special_bool_cmp_utility_code = None - - def infer_type(self, env): - # TODO: Actually implement this (after merging with -unstable). - return py_object_type - - def calculate_cascaded_constant_result(self, operand1_result): - func = compile_time_binary_operators[self.operator] - operand2_result = self.operand2.constant_result - if (isinstance(operand1_result, any_string_type) and - isinstance(operand2_result, any_string_type) and - type(operand1_result) != type(operand2_result)): - # string comparison of different types isn't portable - return - - if self.operator in ('in', 'not_in'): - if isinstance(self.operand2, (ListNode, TupleNode, SetNode)): - if not self.operand2.args: - self.constant_result = self.operator == 'not_in' - return - elif isinstance(self.operand2, ListNode) and not self.cascade: - # tuples are more efficient to store than lists - self.operand2 = self.operand2.as_tuple() - elif isinstance(self.operand2, DictNode): - if not self.operand2.key_value_pairs: - self.constant_result = self.operator == 'not_in' - return - - self.constant_result = func(operand1_result, operand2_result) - - def cascaded_compile_time_value(self, operand1, denv): - func = get_compile_time_binop(self) - operand2 = self.operand2.compile_time_value(denv) - try: - result = func(operand1, operand2) - except Exception as e: - self.compile_time_value_error(e) - result = None - if result: - cascade = self.cascade - if cascade: - result = result and cascade.cascaded_compile_time_value(operand2, denv) - return result - - def is_cpp_comparison(self): - return self.operand1.type.is_cpp_class or self.operand2.type.is_cpp_class - - def find_common_int_type(self, env, op, operand1, operand2): - # type1 != type2 and at least one of the types is not a C int - type1 = operand1.type - type2 = operand2.type - type1_can_be_int = False - type2_can_be_int = False - - if operand1.is_string_literal and operand1.can_coerce_to_char_literal(): - type1_can_be_int = True - if operand2.is_string_literal and operand2.can_coerce_to_char_literal(): - type2_can_be_int = True - - if type1.is_int: - if type2_can_be_int: - return type1 - elif type2.is_int: - if type1_can_be_int: - return type2 - elif type1_can_be_int: - if type2_can_be_int: - if Builtin.unicode_type in (type1, type2): - return PyrexTypes.c_py_ucs4_type - else: - return PyrexTypes.c_uchar_type - - return None - - def find_common_type(self, env, op, operand1, common_type=None): - operand2 = self.operand2 - type1 = operand1.type - type2 = operand2.type - - new_common_type = None - - # catch general errors - if (type1 == str_type and (type2.is_string or type2 in (bytes_type, unicode_type)) or - type2 == str_type and (type1.is_string or type1 in (bytes_type, unicode_type))): - error(self.pos, "Comparisons between bytes/unicode and str are not portable to Python 3") - new_common_type = error_type - - # try to use numeric comparisons where possible - elif type1.is_complex or type2.is_complex: - if (op not in ('==', '!=') - and (type1.is_complex or type1.is_numeric) - and (type2.is_complex or type2.is_numeric)): - error(self.pos, "complex types are unordered") - new_common_type = error_type - elif type1.is_pyobject: - new_common_type = Builtin.complex_type if type1.subtype_of(Builtin.complex_type) else py_object_type - elif type2.is_pyobject: - new_common_type = Builtin.complex_type if type2.subtype_of(Builtin.complex_type) else py_object_type - else: - new_common_type = PyrexTypes.widest_numeric_type(type1, type2) - elif type1.is_numeric and type2.is_numeric: - new_common_type = PyrexTypes.widest_numeric_type(type1, type2) - elif common_type is None or not common_type.is_pyobject: - new_common_type = self.find_common_int_type(env, op, operand1, operand2) - - if new_common_type is None: - # fall back to generic type compatibility tests - if type1.is_ctuple or type2.is_ctuple: - new_common_type = py_object_type - elif type1 == type2: - new_common_type = type1 - elif type1.is_pyobject or type2.is_pyobject: - if type2.is_numeric or type2.is_string: - if operand2.check_for_coercion_error(type1, env): - new_common_type = error_type - else: - new_common_type = py_object_type - elif type1.is_numeric or type1.is_string: - if operand1.check_for_coercion_error(type2, env): - new_common_type = error_type - else: - new_common_type = py_object_type - elif py_object_type.assignable_from(type1) and py_object_type.assignable_from(type2): - new_common_type = py_object_type - else: - # one Python type and one non-Python type, not assignable - self.invalid_types_error(operand1, op, operand2) - new_common_type = error_type - elif type1.assignable_from(type2): - new_common_type = type1 - elif type2.assignable_from(type1): - new_common_type = type2 - else: - # C types that we couldn't handle up to here are an error - self.invalid_types_error(operand1, op, operand2) - new_common_type = error_type - - if new_common_type.is_string and (isinstance(operand1, BytesNode) or - isinstance(operand2, BytesNode)): - # special case when comparing char* to bytes literal: must - # compare string values! - new_common_type = bytes_type - - # recursively merge types - if common_type is None or new_common_type.is_error: - common_type = new_common_type - else: - # we could do a lot better by splitting the comparison - # into a non-Python part and a Python part, but this is - # safer for now - common_type = PyrexTypes.spanning_type(common_type, new_common_type) - - if self.cascade: - common_type = self.cascade.find_common_type(env, self.operator, operand2, common_type) - - return common_type - - def invalid_types_error(self, operand1, op, operand2): - error(self.pos, "Invalid types for '%s' (%s, %s)" % - (op, operand1.type, operand2.type)) - - def is_python_comparison(self): - return (not self.is_ptr_contains() - and not self.is_c_string_contains() - and (self.has_python_operands() - or (self.cascade and self.cascade.is_python_comparison()) - or self.operator in ('in', 'not_in'))) - - def coerce_operands_to(self, dst_type, env): - operand2 = self.operand2 - if operand2.type != dst_type: - self.operand2 = operand2.coerce_to(dst_type, env) - if self.cascade: - self.cascade.coerce_operands_to(dst_type, env) - - def is_python_result(self): - return ((self.has_python_operands() and - self.special_bool_cmp_function is None and - self.operator not in ('is', 'is_not', 'in', 'not_in') and - not self.is_c_string_contains() and - not self.is_ptr_contains()) - or (self.cascade and self.cascade.is_python_result())) - - def is_c_string_contains(self): - return self.operator in ('in', 'not_in') and \ - ((self.operand1.type.is_int - and (self.operand2.type.is_string or self.operand2.type is bytes_type)) or - (self.operand1.type.is_unicode_char - and self.operand2.type is unicode_type)) - - def is_ptr_contains(self): - if self.operator in ('in', 'not_in'): - container_type = self.operand2.type - return (container_type.is_ptr or container_type.is_array) \ - and not container_type.is_string - - def find_special_bool_compare_function(self, env, operand1, result_is_bool=False): - # note: currently operand1 must get coerced to a Python object if we succeed here! - if self.operator in ('==', '!='): - type1, type2 = operand1.type, self.operand2.type - if result_is_bool or (type1.is_builtin_type and type2.is_builtin_type): - if type1 is Builtin.unicode_type or type2 is Builtin.unicode_type: - self.special_bool_cmp_utility_code = UtilityCode.load_cached("UnicodeEquals", "StringTools.c") - self.special_bool_cmp_function = "__Pyx_PyUnicode_Equals" - return True - elif type1 is Builtin.bytes_type or type2 is Builtin.bytes_type: - self.special_bool_cmp_utility_code = UtilityCode.load_cached("BytesEquals", "StringTools.c") - self.special_bool_cmp_function = "__Pyx_PyBytes_Equals" - return True - elif type1 is Builtin.basestring_type or type2 is Builtin.basestring_type: - self.special_bool_cmp_utility_code = UtilityCode.load_cached("UnicodeEquals", "StringTools.c") - self.special_bool_cmp_function = "__Pyx_PyUnicode_Equals" - return True - elif type1 is Builtin.str_type or type2 is Builtin.str_type: - self.special_bool_cmp_utility_code = UtilityCode.load_cached("StrEquals", "StringTools.c") - self.special_bool_cmp_function = "__Pyx_PyString_Equals" - return True - elif self.operator in ('in', 'not_in'): - if self.operand2.type is Builtin.dict_type: - self.operand2 = self.operand2.as_none_safe_node("'NoneType' object is not iterable") - self.special_bool_cmp_utility_code = UtilityCode.load_cached("PyDictContains", "ObjectHandling.c") - self.special_bool_cmp_function = "__Pyx_PyDict_ContainsTF" - return True - elif self.operand2.type is Builtin.set_type: - self.operand2 = self.operand2.as_none_safe_node("'NoneType' object is not iterable") - self.special_bool_cmp_utility_code = UtilityCode.load_cached("PySetContains", "ObjectHandling.c") - self.special_bool_cmp_function = "__Pyx_PySet_ContainsTF" - return True - elif self.operand2.type is Builtin.unicode_type: - self.operand2 = self.operand2.as_none_safe_node("'NoneType' object is not iterable") - self.special_bool_cmp_utility_code = UtilityCode.load_cached("PyUnicodeContains", "StringTools.c") - self.special_bool_cmp_function = "__Pyx_PyUnicode_ContainsTF" - return True - else: - if not self.operand2.type.is_pyobject: - self.operand2 = self.operand2.coerce_to_pyobject(env) - self.special_bool_cmp_utility_code = UtilityCode.load_cached("PySequenceContains", "ObjectHandling.c") - self.special_bool_cmp_function = "__Pyx_PySequence_ContainsTF" - return True - return False - - def generate_operation_code(self, code, result_code, - operand1, op , operand2): - if self.type.is_pyobject: - error_clause = code.error_goto_if_null - got_ref = "__Pyx_XGOTREF(%s); " % result_code - if self.special_bool_cmp_function: - code.globalstate.use_utility_code( - UtilityCode.load_cached("PyBoolOrNullFromLong", "ObjectHandling.c")) - coerce_result = "__Pyx_PyBoolOrNull_FromLong" - else: - coerce_result = "__Pyx_PyBool_FromLong" - else: - error_clause = code.error_goto_if_neg - got_ref = "" - coerce_result = "" - - if self.special_bool_cmp_function: - if operand1.type.is_pyobject: - result1 = operand1.py_result() - else: - result1 = operand1.result() - if operand2.type.is_pyobject: - result2 = operand2.py_result() - else: - result2 = operand2.result() - if self.special_bool_cmp_utility_code: - code.globalstate.use_utility_code(self.special_bool_cmp_utility_code) - code.putln( - "%s = %s(%s(%s, %s, %s)); %s%s" % ( - result_code, - coerce_result, - self.special_bool_cmp_function, - result1, result2, richcmp_constants[op], - got_ref, - error_clause(result_code, self.pos))) - - elif operand1.type.is_pyobject and op not in ('is', 'is_not'): - assert op not in ('in', 'not_in'), op - code.putln("%s = PyObject_RichCompare(%s, %s, %s); %s%s" % ( - result_code, - operand1.py_result(), - operand2.py_result(), - richcmp_constants[op], - got_ref, - error_clause(result_code, self.pos))) - - elif operand1.type.is_complex: - code.putln("%s = %s(%s%s(%s, %s));" % ( - result_code, - coerce_result, - op == "!=" and "!" or "", - operand1.type.unary_op('eq'), - operand1.result(), - operand2.result())) - - else: - type1 = operand1.type - type2 = operand2.type - if (type1.is_extension_type or type2.is_extension_type) \ - and not type1.same_as(type2): - common_type = py_object_type - elif type1.is_numeric: - common_type = PyrexTypes.widest_numeric_type(type1, type2) - else: - common_type = type1 - code1 = operand1.result_as(common_type) - code2 = operand2.result_as(common_type) - statement = "%s = %s(%s %s %s);" % ( - result_code, - coerce_result, - code1, - self.c_operator(op), - code2) - if self.is_cpp_comparison() and self.exception_check == '+': - translate_cpp_exception( - code, - self.pos, - statement, - result_code if self.type.is_pyobject else None, - self.exception_value, - self.in_nogil_context) - else: - code.putln(statement) - - def c_operator(self, op): - if op == 'is': - return "==" - elif op == 'is_not': - return "!=" - else: - return op - -class PrimaryCmpNode(ExprNode, CmpNode): - # Non-cascaded comparison or first comparison of - # a cascaded sequence. - # - # operator string - # operand1 ExprNode - # operand2 ExprNode - # cascade CascadedCmpNode - - # We don't use the subexprs mechanism, because - # things here are too complicated for it to handle. - # Instead, we override all the framework methods - # which use it. - - child_attrs = ['operand1', 'operand2', 'coerced_operand2', 'cascade'] - - cascade = None - coerced_operand2 = None - is_memslice_nonecheck = False - - def infer_type(self, env): - type1 = self.operand1.infer_type(env) - type2 = self.operand2.infer_type(env) - - if is_pythran_expr(type1) or is_pythran_expr(type2): - if is_pythran_supported_type(type1) and is_pythran_supported_type(type2): - return PythranExpr(pythran_binop_type(self.operator, type1, type2)) - - # TODO: implement this for other types. - return py_object_type - - def type_dependencies(self, env): - return () - - def calculate_constant_result(self): - assert not self.cascade - self.calculate_cascaded_constant_result(self.operand1.constant_result) - - def compile_time_value(self, denv): - operand1 = self.operand1.compile_time_value(denv) - return self.cascaded_compile_time_value(operand1, denv) - - def analyse_types(self, env): - self.operand1 = self.operand1.analyse_types(env) - self.operand2 = self.operand2.analyse_types(env) - if self.is_cpp_comparison(): - self.analyse_cpp_comparison(env) - if self.cascade: - error(self.pos, "Cascading comparison not yet supported for cpp types.") - return self - - type1 = self.operand1.type - type2 = self.operand2.type - if is_pythran_expr(type1) or is_pythran_expr(type2): - if is_pythran_supported_type(type1) and is_pythran_supported_type(type2): - self.type = PythranExpr(pythran_binop_type(self.operator, type1, type2)) - self.is_pycmp = False - return self - - if self.analyse_memoryviewslice_comparison(env): - return self - - if self.cascade: - self.cascade = self.cascade.analyse_types(env) - - if self.operator in ('in', 'not_in'): - if self.is_c_string_contains(): - self.is_pycmp = False - common_type = None - if self.cascade: - error(self.pos, "Cascading comparison not yet supported for 'int_val in string'.") - return self - if self.operand2.type is unicode_type: - env.use_utility_code(UtilityCode.load_cached("PyUCS4InUnicode", "StringTools.c")) - else: - if self.operand1.type is PyrexTypes.c_uchar_type: - self.operand1 = self.operand1.coerce_to(PyrexTypes.c_char_type, env) - if self.operand2.type is not bytes_type: - self.operand2 = self.operand2.coerce_to(bytes_type, env) - env.use_utility_code(UtilityCode.load_cached("BytesContains", "StringTools.c")) - self.operand2 = self.operand2.as_none_safe_node( - "argument of type 'NoneType' is not iterable") - elif self.is_ptr_contains(): - if self.cascade: - error(self.pos, "Cascading comparison not supported for 'val in sliced pointer'.") - self.type = PyrexTypes.c_bint_type - # Will be transformed by IterationTransform - return self - elif self.find_special_bool_compare_function(env, self.operand1): - if not self.operand1.type.is_pyobject: - self.operand1 = self.operand1.coerce_to_pyobject(env) - common_type = None # if coercion needed, the method call above has already done it - self.is_pycmp = False # result is bint - else: - common_type = py_object_type - self.is_pycmp = True - elif self.find_special_bool_compare_function(env, self.operand1): - if not self.operand1.type.is_pyobject: - self.operand1 = self.operand1.coerce_to_pyobject(env) - common_type = None # if coercion needed, the method call above has already done it - self.is_pycmp = False # result is bint - else: - common_type = self.find_common_type(env, self.operator, self.operand1) - self.is_pycmp = common_type.is_pyobject - - if common_type is not None and not common_type.is_error: - if self.operand1.type != common_type: - self.operand1 = self.operand1.coerce_to(common_type, env) - self.coerce_operands_to(common_type, env) - - if self.cascade: - self.operand2 = self.operand2.coerce_to_simple(env) - self.cascade.coerce_cascaded_operands_to_temp(env) - operand2 = self.cascade.optimise_comparison(self.operand2, env) - if operand2 is not self.operand2: - self.coerced_operand2 = operand2 - if self.is_python_result(): - self.type = PyrexTypes.py_object_type - else: - self.type = PyrexTypes.c_bint_type - cdr = self.cascade - while cdr: - cdr.type = self.type - cdr = cdr.cascade - if self.is_pycmp or self.cascade or self.special_bool_cmp_function: - # 1) owned reference, 2) reused value, 3) potential function error return value - self.is_temp = 1 - return self - - def analyse_cpp_comparison(self, env): - type1 = self.operand1.type - type2 = self.operand2.type - self.is_pycmp = False - entry = env.lookup_operator(self.operator, [self.operand1, self.operand2]) - if entry is None: - error(self.pos, "Invalid types for '%s' (%s, %s)" % - (self.operator, type1, type2)) - self.type = PyrexTypes.error_type - self.result_code = "" - return - func_type = entry.type - if func_type.is_ptr: - func_type = func_type.base_type - self.exception_check = func_type.exception_check - self.exception_value = func_type.exception_value - if self.exception_check == '+': - self.is_temp = True - if self.exception_value is None: - env.use_utility_code(UtilityCode.load_cached("CppExceptionConversion", "CppSupport.cpp")) - if len(func_type.args) == 1: - self.operand2 = self.operand2.coerce_to(func_type.args[0].type, env) - else: - self.operand1 = self.operand1.coerce_to(func_type.args[0].type, env) - self.operand2 = self.operand2.coerce_to(func_type.args[1].type, env) - self.type = func_type.return_type - - def analyse_memoryviewslice_comparison(self, env): - have_none = self.operand1.is_none or self.operand2.is_none - have_slice = (self.operand1.type.is_memoryviewslice or - self.operand2.type.is_memoryviewslice) - ops = ('==', '!=', 'is', 'is_not') - if have_slice and have_none and self.operator in ops: - self.is_pycmp = False - self.type = PyrexTypes.c_bint_type - self.is_memslice_nonecheck = True - return True - - return False - - def coerce_to_boolean(self, env): - if self.is_pycmp: - # coercing to bool => may allow for more efficient comparison code - if self.find_special_bool_compare_function( - env, self.operand1, result_is_bool=True): - self.is_pycmp = False - self.type = PyrexTypes.c_bint_type - self.is_temp = 1 - if self.cascade: - operand2 = self.cascade.optimise_comparison( - self.operand2, env, result_is_bool=True) - if operand2 is not self.operand2: - self.coerced_operand2 = operand2 - return self - # TODO: check if we can optimise parts of the cascade here - return ExprNode.coerce_to_boolean(self, env) - - def has_python_operands(self): - return (self.operand1.type.is_pyobject - or self.operand2.type.is_pyobject) - - def check_const(self): - if self.cascade: - self.not_const() - return False - else: - return self.operand1.check_const() and self.operand2.check_const() - - def calculate_result_code(self): - operand1, operand2 = self.operand1, self.operand2 - if operand1.type.is_complex: - if self.operator == "!=": - negation = "!" - else: - negation = "" - return "(%s%s(%s, %s))" % ( - negation, - operand1.type.binary_op('=='), - operand1.result(), - operand2.result()) - elif self.is_c_string_contains(): - if operand2.type is unicode_type: - method = "__Pyx_UnicodeContainsUCS4" - else: - method = "__Pyx_BytesContains" - if self.operator == "not_in": - negation = "!" - else: - negation = "" - return "(%s%s(%s, %s))" % ( - negation, - method, - operand2.result(), - operand1.result()) - else: - if is_pythran_expr(self.type): - result1, result2 = operand1.pythran_result(), operand2.pythran_result() - else: - result1, result2 = operand1.result(), operand2.result() - if self.is_memslice_nonecheck: - if operand1.type.is_memoryviewslice: - result1 = "((PyObject *) %s.memview)" % result1 - else: - result2 = "((PyObject *) %s.memview)" % result2 - - return "(%s %s %s)" % ( - result1, - self.c_operator(self.operator), - result2) - - def generate_evaluation_code(self, code): - self.operand1.generate_evaluation_code(code) - self.operand2.generate_evaluation_code(code) - if self.is_temp: - self.allocate_temp_result(code) - self.generate_operation_code(code, self.result(), - self.operand1, self.operator, self.operand2) - if self.cascade: - self.cascade.generate_evaluation_code( - code, self.result(), self.coerced_operand2 or self.operand2, - needs_evaluation=self.coerced_operand2 is not None) - self.operand1.generate_disposal_code(code) - self.operand1.free_temps(code) - self.operand2.generate_disposal_code(code) - self.operand2.free_temps(code) - - def generate_subexpr_disposal_code(self, code): - # If this is called, it is a non-cascaded cmp, - # so only need to dispose of the two main operands. - self.operand1.generate_disposal_code(code) - self.operand2.generate_disposal_code(code) - - def free_subexpr_temps(self, code): - # If this is called, it is a non-cascaded cmp, - # so only need to dispose of the two main operands. - self.operand1.free_temps(code) - self.operand2.free_temps(code) - - def annotate(self, code): - self.operand1.annotate(code) - self.operand2.annotate(code) - if self.cascade: - self.cascade.annotate(code) - - -class CascadedCmpNode(Node, CmpNode): - # A CascadedCmpNode is not a complete expression node. It - # hangs off the side of another comparison node, shares - # its left operand with that node, and shares its result - # with the PrimaryCmpNode at the head of the chain. - # - # operator string - # operand2 ExprNode - # cascade CascadedCmpNode - - child_attrs = ['operand2', 'coerced_operand2', 'cascade'] - - cascade = None - coerced_operand2 = None - constant_result = constant_value_not_set # FIXME: where to calculate this? - - def infer_type(self, env): - # TODO: Actually implement this (after merging with -unstable). - return py_object_type - - def type_dependencies(self, env): - return () - - def has_constant_result(self): - return self.constant_result is not constant_value_not_set and \ - self.constant_result is not not_a_constant - - def analyse_types(self, env): - self.operand2 = self.operand2.analyse_types(env) - if self.cascade: - self.cascade = self.cascade.analyse_types(env) - return self - - def has_python_operands(self): - return self.operand2.type.is_pyobject - - def is_cpp_comparison(self): - # cascaded comparisons aren't currently implemented for c++ classes. - return False - - def optimise_comparison(self, operand1, env, result_is_bool=False): - if self.find_special_bool_compare_function(env, operand1, result_is_bool): - self.is_pycmp = False - self.type = PyrexTypes.c_bint_type - if not operand1.type.is_pyobject: - operand1 = operand1.coerce_to_pyobject(env) - if self.cascade: - operand2 = self.cascade.optimise_comparison(self.operand2, env, result_is_bool) - if operand2 is not self.operand2: - self.coerced_operand2 = operand2 - return operand1 - - def coerce_operands_to_pyobjects(self, env): - self.operand2 = self.operand2.coerce_to_pyobject(env) - if self.operand2.type is dict_type and self.operator in ('in', 'not_in'): - self.operand2 = self.operand2.as_none_safe_node("'NoneType' object is not iterable") - if self.cascade: - self.cascade.coerce_operands_to_pyobjects(env) - - def coerce_cascaded_operands_to_temp(self, env): - if self.cascade: - #self.operand2 = self.operand2.coerce_to_temp(env) #CTT - self.operand2 = self.operand2.coerce_to_simple(env) - self.cascade.coerce_cascaded_operands_to_temp(env) - - def generate_evaluation_code(self, code, result, operand1, needs_evaluation=False): - if self.type.is_pyobject: - code.putln("if (__Pyx_PyObject_IsTrue(%s)) {" % result) - code.put_decref(result, self.type) - else: - code.putln("if (%s) {" % result) - if needs_evaluation: - operand1.generate_evaluation_code(code) - self.operand2.generate_evaluation_code(code) - self.generate_operation_code(code, result, - operand1, self.operator, self.operand2) - if self.cascade: - self.cascade.generate_evaluation_code( - code, result, self.coerced_operand2 or self.operand2, - needs_evaluation=self.coerced_operand2 is not None) - if needs_evaluation: - operand1.generate_disposal_code(code) - operand1.free_temps(code) - # Cascaded cmp result is always temp - self.operand2.generate_disposal_code(code) - self.operand2.free_temps(code) - code.putln("}") - - def annotate(self, code): - self.operand2.annotate(code) - if self.cascade: - self.cascade.annotate(code) - - -binop_node_classes = { - "or": BoolBinopNode, - "and": BoolBinopNode, - "|": IntBinopNode, - "^": IntBinopNode, - "&": IntBinopNode, - "<<": IntBinopNode, - ">>": IntBinopNode, - "+": AddNode, - "-": SubNode, - "*": MulNode, - "@": MatMultNode, - "/": DivNode, - "//": DivNode, - "%": ModNode, - "**": PowNode, -} - - -def binop_node(pos, operator, operand1, operand2, inplace=False, **kwargs): - # Construct binop node of appropriate class for - # given operator. - return binop_node_classes[operator]( - pos, - operator=operator, - operand1=operand1, - operand2=operand2, - inplace=inplace, - **kwargs) - - -#------------------------------------------------------------------- -# -# Coercion nodes -# -# Coercion nodes are special in that they are created during -# the analyse_types phase of parse tree processing. -# Their __init__ methods consequently incorporate some aspects -# of that phase. -# -#------------------------------------------------------------------- - -class CoercionNode(ExprNode): - # Abstract base class for coercion nodes. - # - # arg ExprNode node being coerced - - subexprs = ['arg'] - constant_result = not_a_constant - - def __init__(self, arg): - super(CoercionNode, self).__init__(arg.pos) - self.arg = arg - if debug_coercion: - print("%s Coercing %s" % (self, self.arg)) - - def calculate_constant_result(self): - # constant folding can break type coercion, so this is disabled - pass - - def annotate(self, code): - self.arg.annotate(code) - if self.arg.type != self.type: - file, line, col = self.pos - code.annotate((file, line, col-1), AnnotationItem( - style='coerce', tag='coerce', text='[%s] to [%s]' % (self.arg.type, self.type))) - - -class CoerceToMemViewSliceNode(CoercionNode): - """ - Coerce an object to a memoryview slice. This holds a new reference in - a managed temp. - """ - - def __init__(self, arg, dst_type, env): - assert dst_type.is_memoryviewslice - assert not arg.type.is_memoryviewslice - CoercionNode.__init__(self, arg) - self.type = dst_type - self.is_temp = 1 - self.use_managed_ref = True - self.arg = arg - self.type.create_from_py_utility_code(env) - - def generate_result_code(self, code): - code.putln(self.type.from_py_call_code( - self.arg.py_result(), - self.result(), - self.pos, - code - )) - - -class CastNode(CoercionNode): - # Wrap a node in a C type cast. - - def __init__(self, arg, new_type): - CoercionNode.__init__(self, arg) - self.type = new_type - - def may_be_none(self): - return self.arg.may_be_none() - - def calculate_result_code(self): - return self.arg.result_as(self.type) - - def generate_result_code(self, code): - self.arg.generate_result_code(code) - - -class PyTypeTestNode(CoercionNode): - # This node is used to check that a generic Python - # object is an instance of a particular extension type. - # This node borrows the result of its argument node. - - exact_builtin_type = True - - def __init__(self, arg, dst_type, env, notnone=False): - # The arg is know to be a Python object, and - # the dst_type is known to be an extension type. - assert dst_type.is_extension_type or dst_type.is_builtin_type, "PyTypeTest on non extension type" - CoercionNode.__init__(self, arg) - self.type = dst_type - self.result_ctype = arg.ctype() - self.notnone = notnone - - nogil_check = Node.gil_error - gil_message = "Python type test" - - def analyse_types(self, env): - return self - - def may_be_none(self): - if self.notnone: - return False - return self.arg.may_be_none() - - def is_simple(self): - return self.arg.is_simple() - - def result_in_temp(self): - return self.arg.result_in_temp() - - def is_ephemeral(self): - return self.arg.is_ephemeral() - - def nonlocally_immutable(self): - return self.arg.nonlocally_immutable() - - def reanalyse(self): - if self.type != self.arg.type or not self.arg.is_temp: - return self - if not self.type.typeobj_is_available(): - return self - if self.arg.may_be_none() and self.notnone: - return self.arg.as_none_safe_node("Cannot convert NoneType to %.200s" % self.type.name) - return self.arg - - def calculate_constant_result(self): - # FIXME - pass - - def calculate_result_code(self): - return self.arg.result() - - def generate_result_code(self, code): - if self.type.typeobj_is_available(): - if self.type.is_builtin_type: - type_test = self.type.type_test_code( - self.arg.py_result(), - self.notnone, exact=self.exact_builtin_type) - else: - type_test = self.type.type_test_code( - self.arg.py_result(), self.notnone) - code.globalstate.use_utility_code( - UtilityCode.load_cached("ExtTypeTest", "ObjectHandling.c")) - code.putln("if (!(%s)) %s" % ( - type_test, code.error_goto(self.pos))) - else: - error(self.pos, "Cannot test type of extern C class " - "without type object name specification") - - def generate_post_assignment_code(self, code): - self.arg.generate_post_assignment_code(code) - - def allocate_temp_result(self, code): - pass - - def release_temp_result(self, code): - pass - - def free_temps(self, code): - self.arg.free_temps(code) - - def free_subexpr_temps(self, code): - self.arg.free_subexpr_temps(code) - - -class NoneCheckNode(CoercionNode): - # This node is used to check that a Python object is not None and - # raises an appropriate exception (as specified by the creating - # transform). - - is_nonecheck = True - - def __init__(self, arg, exception_type_cname, exception_message, - exception_format_args=()): - CoercionNode.__init__(self, arg) - self.type = arg.type - self.result_ctype = arg.ctype() - self.exception_type_cname = exception_type_cname - self.exception_message = exception_message - self.exception_format_args = tuple(exception_format_args or ()) - - nogil_check = None # this node only guards an operation that would fail already - - def analyse_types(self, env): - return self - - def may_be_none(self): - return False - - def is_simple(self): - return self.arg.is_simple() - - def result_in_temp(self): - return self.arg.result_in_temp() - - def nonlocally_immutable(self): - return self.arg.nonlocally_immutable() - - def calculate_result_code(self): - return self.arg.result() - - def condition(self): - if self.type.is_pyobject: - return self.arg.py_result() - elif self.type.is_memoryviewslice: - return "((PyObject *) %s.memview)" % self.arg.result() - else: - raise Exception("unsupported type") - - @classmethod - def generate(cls, arg, code, exception_message, - exception_type_cname="PyExc_TypeError", exception_format_args=(), in_nogil_context=False): - node = cls(arg, exception_type_cname, exception_message, exception_format_args) - node.in_nogil_context = in_nogil_context - node.put_nonecheck(code) - - @classmethod - def generate_if_needed(cls, arg, code, exception_message, - exception_type_cname="PyExc_TypeError", exception_format_args=(), in_nogil_context=False): - if arg.may_be_none(): - cls.generate(arg, code, exception_message, exception_type_cname, exception_format_args, in_nogil_context) - - def put_nonecheck(self, code): - code.putln( - "if (unlikely(%s == Py_None)) {" % self.condition()) - - if self.in_nogil_context: - code.put_ensure_gil() - - escape = StringEncoding.escape_byte_string - if self.exception_format_args: - code.putln('PyErr_Format(%s, "%s", %s);' % ( - self.exception_type_cname, - StringEncoding.escape_byte_string( - self.exception_message.encode('UTF-8')), - ', '.join([ '"%s"' % escape(str(arg).encode('UTF-8')) - for arg in self.exception_format_args ]))) - else: - code.putln('PyErr_SetString(%s, "%s");' % ( - self.exception_type_cname, - escape(self.exception_message.encode('UTF-8')))) - - if self.in_nogil_context: - code.put_release_ensured_gil() - - code.putln(code.error_goto(self.pos)) - code.putln("}") - - def generate_result_code(self, code): - self.put_nonecheck(code) - - def generate_post_assignment_code(self, code): - self.arg.generate_post_assignment_code(code) - - def free_temps(self, code): - self.arg.free_temps(code) - - -class CoerceToPyTypeNode(CoercionNode): - # This node is used to convert a C data type - # to a Python object. - - type = py_object_type - target_type = py_object_type - is_temp = 1 - - def __init__(self, arg, env, type=py_object_type): - if not arg.type.create_to_py_utility_code(env): - error(arg.pos, "Cannot convert '%s' to Python object" % arg.type) - elif arg.type.is_complex: - # special case: complex coercion is so complex that it - # uses a macro ("__pyx_PyComplex_FromComplex()"), for - # which the argument must be simple - arg = arg.coerce_to_simple(env) - CoercionNode.__init__(self, arg) - if type is py_object_type: - # be specific about some known types - if arg.type.is_string or arg.type.is_cpp_string: - self.type = default_str_type(env) - elif arg.type.is_pyunicode_ptr or arg.type.is_unicode_char: - self.type = unicode_type - elif arg.type.is_complex: - self.type = Builtin.complex_type - self.target_type = self.type - elif arg.type.is_string or arg.type.is_cpp_string: - if (type not in (bytes_type, bytearray_type) - and not env.directives['c_string_encoding']): - error(arg.pos, - "default encoding required for conversion from '%s' to '%s'" % - (arg.type, type)) - self.type = self.target_type = type - else: - # FIXME: check that the target type and the resulting type are compatible - self.target_type = type - - gil_message = "Converting to Python object" - - def may_be_none(self): - # FIXME: is this always safe? - return False - - def coerce_to_boolean(self, env): - arg_type = self.arg.type - if (arg_type == PyrexTypes.c_bint_type or - (arg_type.is_pyobject and arg_type.name == 'bool')): - return self.arg.coerce_to_temp(env) - else: - return CoerceToBooleanNode(self, env) - - def coerce_to_integer(self, env): - # If not already some C integer type, coerce to longint. - if self.arg.type.is_int: - return self.arg - else: - return self.arg.coerce_to(PyrexTypes.c_long_type, env) - - def analyse_types(self, env): - # The arg is always already analysed - return self - - def generate_result_code(self, code): - code.putln('%s; %s' % ( - self.arg.type.to_py_call_code( - self.arg.result(), - self.result(), - self.target_type), - code.error_goto_if_null(self.result(), self.pos))) - - code.put_gotref(self.py_result()) - - -class CoerceIntToBytesNode(CoerceToPyTypeNode): - # This node is used to convert a C int type to a Python bytes - # object. - - is_temp = 1 - - def __init__(self, arg, env): - arg = arg.coerce_to_simple(env) - CoercionNode.__init__(self, arg) - self.type = Builtin.bytes_type - - def generate_result_code(self, code): - arg = self.arg - arg_result = arg.result() - if arg.type not in (PyrexTypes.c_char_type, - PyrexTypes.c_uchar_type, - PyrexTypes.c_schar_type): - if arg.type.signed: - code.putln("if ((%s < 0) || (%s > 255)) {" % ( - arg_result, arg_result)) - else: - code.putln("if (%s > 255) {" % arg_result) - code.putln('PyErr_SetString(PyExc_OverflowError, ' - '"value too large to pack into a byte"); %s' % ( - code.error_goto(self.pos))) - code.putln('}') - temp = None - if arg.type is not PyrexTypes.c_char_type: - temp = code.funcstate.allocate_temp(PyrexTypes.c_char_type, manage_ref=False) - code.putln("%s = (char)%s;" % (temp, arg_result)) - arg_result = temp - code.putln('%s = PyBytes_FromStringAndSize(&%s, 1); %s' % ( - self.result(), - arg_result, - code.error_goto_if_null(self.result(), self.pos))) - if temp is not None: - code.funcstate.release_temp(temp) - code.put_gotref(self.py_result()) - - -class CoerceFromPyTypeNode(CoercionNode): - # This node is used to convert a Python object - # to a C data type. - - def __init__(self, result_type, arg, env): - CoercionNode.__init__(self, arg) - self.type = result_type - self.is_temp = 1 - if not result_type.create_from_py_utility_code(env): - error(arg.pos, - "Cannot convert Python object to '%s'" % result_type) - if self.type.is_string or self.type.is_pyunicode_ptr: - if self.arg.is_name and self.arg.entry and self.arg.entry.is_pyglobal: - warning(arg.pos, - "Obtaining '%s' from externally modifiable global Python value" % result_type, - level=1) - - def analyse_types(self, env): - # The arg is always already analysed - return self - - def is_ephemeral(self): - return (self.type.is_ptr and not self.type.is_array) and self.arg.is_ephemeral() - - def generate_result_code(self, code): - from_py_function = None - # for certain source types, we can do better than the generic coercion - if self.type.is_string and self.arg.type is bytes_type: - if self.type.from_py_function.startswith('__Pyx_PyObject_As'): - from_py_function = '__Pyx_PyBytes' + self.type.from_py_function[len('__Pyx_PyObject'):] - NoneCheckNode.generate_if_needed(self.arg, code, "expected bytes, NoneType found") - - code.putln(self.type.from_py_call_code( - self.arg.py_result(), self.result(), self.pos, code, from_py_function=from_py_function)) - if self.type.is_pyobject: - code.put_gotref(self.py_result()) - - def nogil_check(self, env): - error(self.pos, "Coercion from Python not allowed without the GIL") - - -class CoerceToBooleanNode(CoercionNode): - # This node is used when a result needs to be used - # in a boolean context. - - type = PyrexTypes.c_bint_type - - _special_builtins = { - Builtin.list_type: 'PyList_GET_SIZE', - Builtin.tuple_type: 'PyTuple_GET_SIZE', - Builtin.set_type: 'PySet_GET_SIZE', - Builtin.frozenset_type: 'PySet_GET_SIZE', - Builtin.bytes_type: 'PyBytes_GET_SIZE', - Builtin.bytearray_type: 'PyByteArray_GET_SIZE', - Builtin.unicode_type: '__Pyx_PyUnicode_IS_TRUE', - } - - def __init__(self, arg, env): - CoercionNode.__init__(self, arg) - if arg.type.is_pyobject: - self.is_temp = 1 - - def nogil_check(self, env): - if self.arg.type.is_pyobject and self._special_builtins.get(self.arg.type) is None: - self.gil_error() - - gil_message = "Truth-testing Python object" - - def check_const(self): - if self.is_temp: - self.not_const() - return False - return self.arg.check_const() - - def calculate_result_code(self): - return "(%s != 0)" % self.arg.result() - - def generate_result_code(self, code): - if not self.is_temp: - return - test_func = self._special_builtins.get(self.arg.type) - if test_func is not None: - checks = ["(%s != Py_None)" % self.arg.py_result()] if self.arg.may_be_none() else [] - checks.append("(%s(%s) != 0)" % (test_func, self.arg.py_result())) - code.putln("%s = %s;" % (self.result(), '&&'.join(checks))) - else: - code.putln( - "%s = __Pyx_PyObject_IsTrue(%s); %s" % ( - self.result(), - self.arg.py_result(), - code.error_goto_if_neg(self.result(), self.pos))) - - -class CoerceToComplexNode(CoercionNode): - - def __init__(self, arg, dst_type, env): - if arg.type.is_complex: - arg = arg.coerce_to_simple(env) - self.type = dst_type - CoercionNode.__init__(self, arg) - dst_type.create_declaration_utility_code(env) - - def calculate_result_code(self): - if self.arg.type.is_complex: - real_part = "__Pyx_CREAL(%s)" % self.arg.result() - imag_part = "__Pyx_CIMAG(%s)" % self.arg.result() - else: - real_part = self.arg.result() - imag_part = "0" - return "%s(%s, %s)" % ( - self.type.from_parts, - real_part, - imag_part) - - def generate_result_code(self, code): - pass - -class CoerceToTempNode(CoercionNode): - # This node is used to force the result of another node - # to be stored in a temporary. It is only used if the - # argument node's result is not already in a temporary. - - def __init__(self, arg, env): - CoercionNode.__init__(self, arg) - self.type = self.arg.type.as_argument_type() - self.constant_result = self.arg.constant_result - self.is_temp = 1 - if self.type.is_pyobject: - self.result_ctype = py_object_type - - gil_message = "Creating temporary Python reference" - - def analyse_types(self, env): - # The arg is always already analysed - return self - - def coerce_to_boolean(self, env): - self.arg = self.arg.coerce_to_boolean(env) - if self.arg.is_simple(): - return self.arg - self.type = self.arg.type - self.result_ctype = self.type - return self - - def generate_result_code(self, code): - #self.arg.generate_evaluation_code(code) # Already done - # by generic generate_subexpr_evaluation_code! - code.putln("%s = %s;" % ( - self.result(), self.arg.result_as(self.ctype()))) - if self.use_managed_ref: - if self.type.is_pyobject: - code.put_incref(self.result(), self.ctype()) - elif self.type.is_memoryviewslice: - code.put_incref_memoryviewslice(self.result(), - not self.in_nogil_context) - -class ProxyNode(CoercionNode): - """ - A node that should not be replaced by transforms or other means, - and hence can be useful to wrap the argument to a clone node - - MyNode -> ProxyNode -> ArgNode - CloneNode -^ - """ - - nogil_check = None - - def __init__(self, arg): - super(ProxyNode, self).__init__(arg) - self.constant_result = arg.constant_result - self._proxy_type() - - def analyse_types(self, env): - self.arg = self.arg.analyse_expressions(env) - self._proxy_type() - return self - - def infer_type(self, env): - return self.arg.infer_type(env) - - def _proxy_type(self): - if hasattr(self.arg, 'type'): - self.type = self.arg.type - self.result_ctype = self.arg.result_ctype - if hasattr(self.arg, 'entry'): - self.entry = self.arg.entry - - def generate_result_code(self, code): - self.arg.generate_result_code(code) - - def result(self): - return self.arg.result() - - def is_simple(self): - return self.arg.is_simple() - - def may_be_none(self): - return self.arg.may_be_none() - - def generate_evaluation_code(self, code): - self.arg.generate_evaluation_code(code) - - def generate_disposal_code(self, code): - self.arg.generate_disposal_code(code) - - def free_temps(self, code): - self.arg.free_temps(code) - -class CloneNode(CoercionNode): - # This node is employed when the result of another node needs - # to be used multiple times. The argument node's result must - # be in a temporary. This node "borrows" the result from the - # argument node, and does not generate any evaluation or - # disposal code for it. The original owner of the argument - # node is responsible for doing those things. - - subexprs = [] # Arg is not considered a subexpr - nogil_check = None - - def __init__(self, arg): - CoercionNode.__init__(self, arg) - self.constant_result = arg.constant_result - if hasattr(arg, 'type'): - self.type = arg.type - self.result_ctype = arg.result_ctype - if hasattr(arg, 'entry'): - self.entry = arg.entry - - def result(self): - return self.arg.result() - - def may_be_none(self): - return self.arg.may_be_none() - - def type_dependencies(self, env): - return self.arg.type_dependencies(env) - - def infer_type(self, env): - return self.arg.infer_type(env) - - def analyse_types(self, env): - self.type = self.arg.type - self.result_ctype = self.arg.result_ctype - self.is_temp = 1 - if hasattr(self.arg, 'entry'): - self.entry = self.arg.entry - return self - - def coerce_to(self, dest_type, env): - if self.arg.is_literal: - return self.arg.coerce_to(dest_type, env) - return super(CloneNode, self).coerce_to(dest_type, env) - - def is_simple(self): - return True # result is always in a temp (or a name) - - def generate_evaluation_code(self, code): - pass - - def generate_result_code(self, code): - pass - - def generate_disposal_code(self, code): - pass - - def free_temps(self, code): - pass - - -class CMethodSelfCloneNode(CloneNode): - # Special CloneNode for the self argument of builtin C methods - # that accepts subtypes of the builtin type. This is safe only - # for 'final' subtypes, as subtypes of the declared type may - # override the C method. - - def coerce_to(self, dst_type, env): - if dst_type.is_builtin_type and self.type.subtype_of(dst_type): - return self - return CloneNode.coerce_to(self, dst_type, env) - - -class ModuleRefNode(ExprNode): - # Simple returns the module object - - type = py_object_type - is_temp = False - subexprs = [] - - def analyse_types(self, env): - return self - - def may_be_none(self): - return False - - def calculate_result_code(self): - return Naming.module_cname - - def generate_result_code(self, code): - pass - -class DocstringRefNode(ExprNode): - # Extracts the docstring of the body element - - subexprs = ['body'] - type = py_object_type - is_temp = True - - def __init__(self, pos, body): - ExprNode.__init__(self, pos) - assert body.type.is_pyobject - self.body = body - - def analyse_types(self, env): - return self - - def generate_result_code(self, code): - code.putln('%s = __Pyx_GetAttr(%s, %s); %s' % ( - self.result(), self.body.result(), - code.intern_identifier(StringEncoding.EncodedString("__doc__")), - code.error_goto_if_null(self.result(), self.pos))) - code.put_gotref(self.result()) - - - -#------------------------------------------------------------------------------------ -# -# Runtime support code -# -#------------------------------------------------------------------------------------ - -pyerr_occurred_withgil_utility_code= UtilityCode( -proto = """ -static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void); /* proto */ -""", -impl = """ -static CYTHON_INLINE int __Pyx_ErrOccurredWithGIL(void) { - int err; - #ifdef WITH_THREAD - PyGILState_STATE _save = PyGILState_Ensure(); - #endif - err = !!PyErr_Occurred(); - #ifdef WITH_THREAD - PyGILState_Release(_save); - #endif - return err; -} -""" -) - -#------------------------------------------------------------------------------------ - -raise_unbound_local_error_utility_code = UtilityCode( -proto = """ -static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname); -""", -impl = """ -static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { - PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); -} -""") - -raise_closure_name_error_utility_code = UtilityCode( -proto = """ -static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); -""", -impl = """ -static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { - PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); -} -""") - -# Don't inline the function, it should really never be called in production -raise_unbound_memoryview_utility_code_nogil = UtilityCode( -proto = """ -static void __Pyx_RaiseUnboundMemoryviewSliceNogil(const char *varname); -""", -impl = """ -static void __Pyx_RaiseUnboundMemoryviewSliceNogil(const char *varname) { - #ifdef WITH_THREAD - PyGILState_STATE gilstate = PyGILState_Ensure(); - #endif - __Pyx_RaiseUnboundLocalError(varname); - #ifdef WITH_THREAD - PyGILState_Release(gilstate); - #endif -} -""", -requires = [raise_unbound_local_error_utility_code]) - -#------------------------------------------------------------------------------------ - -raise_too_many_values_to_unpack = UtilityCode.load_cached("RaiseTooManyValuesToUnpack", "ObjectHandling.c") -raise_need_more_values_to_unpack = UtilityCode.load_cached("RaiseNeedMoreValuesToUnpack", "ObjectHandling.c") -tuple_unpacking_error_code = UtilityCode.load_cached("UnpackTupleError", "ObjectHandling.c") diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FlowControl.pxd b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FlowControl.pxd deleted file mode 100644 index c87370b819a..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FlowControl.pxd +++ /dev/null @@ -1,111 +0,0 @@ -from __future__ import absolute_import - -cimport cython - -from .Visitor cimport CythonTransform, TreeVisitor - -cdef class ControlBlock: - cdef public set children - cdef public set parents - cdef public set positions - cdef public list stats - cdef public dict gen - cdef public set bounded - - # Big integer bitsets - cdef public object i_input - cdef public object i_output - cdef public object i_gen - cdef public object i_kill - cdef public object i_state - - cpdef bint empty(self) - cpdef detach(self) - cpdef add_child(self, block) - -cdef class ExitBlock(ControlBlock): - cpdef bint empty(self) - -cdef class NameAssignment: - cdef public bint is_arg - cdef public bint is_deletion - cdef public object lhs - cdef public object rhs - cdef public object entry - cdef public object pos - cdef public set refs - cdef public object bit - cdef public object inferred_type - -cdef class AssignmentList: - cdef public object bit - cdef public object mask - cdef public list stats - -cdef class AssignmentCollector(TreeVisitor): - cdef list assignments - -@cython.final -cdef class ControlFlow: - cdef public set blocks - cdef public set entries - cdef public list loops - cdef public list exceptions - - cdef public ControlBlock entry_point - cdef public ExitBlock exit_point - cdef public ControlBlock block - - cdef public dict assmts - - cpdef newblock(self, ControlBlock parent=*) - cpdef nextblock(self, ControlBlock parent=*) - cpdef bint is_tracked(self, entry) - cpdef bint is_statically_assigned(self, entry) - cpdef mark_position(self, node) - cpdef mark_assignment(self, lhs, rhs, entry) - cpdef mark_argument(self, lhs, rhs, entry) - cpdef mark_deletion(self, node, entry) - cpdef mark_reference(self, node, entry) - - @cython.locals(block=ControlBlock, parent=ControlBlock, unreachable=set) - cpdef normalize(self) - - @cython.locals(bit=object, assmts=AssignmentList, - block=ControlBlock) - cpdef initialize(self) - - @cython.locals(assmts=AssignmentList, assmt=NameAssignment) - cpdef set map_one(self, istate, entry) - - @cython.locals(block=ControlBlock, parent=ControlBlock) - cdef reaching_definitions(self) - -cdef class Uninitialized: - pass - -cdef class Unknown: - pass - - -cdef class MessageCollection: - cdef set messages - - -@cython.locals(dirty=bint, block=ControlBlock, parent=ControlBlock, - assmt=NameAssignment) -cdef check_definitions(ControlFlow flow, dict compiler_directives) - -@cython.final -cdef class ControlFlowAnalysis(CythonTransform): - cdef object gv_ctx - cdef object constant_folder - cdef set reductions - cdef list env_stack - cdef list stack - cdef object env - cdef ControlFlow flow - cdef bint in_inplace_assignment - - cpdef mark_assignment(self, lhs, rhs=*) - cpdef mark_position(self, node) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FlowControl.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FlowControl.py deleted file mode 100644 index df04471f90e..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FlowControl.py +++ /dev/null @@ -1,1325 +0,0 @@ -from __future__ import absolute_import - -import cython -cython.declare(PyrexTypes=object, ExprNodes=object, Nodes=object, - Builtin=object, InternalError=object, error=object, warning=object, - py_object_type=object, unspecified_type=object, - object_expr=object, fake_rhs_expr=object, TypedExprNode=object) - -from . import Builtin -from . import ExprNodes -from . import Nodes -from . import Options -from .PyrexTypes import py_object_type, unspecified_type -from . import PyrexTypes - -from .Visitor import TreeVisitor, CythonTransform -from .Errors import error, warning, InternalError -from .Optimize import ConstantFolding - - -class TypedExprNode(ExprNodes.ExprNode): - # Used for declaring assignments of a specified type without a known entry. - def __init__(self, type, may_be_none=None, pos=None): - super(TypedExprNode, self).__init__(pos) - self.type = type - self._may_be_none = may_be_none - - def may_be_none(self): - return self._may_be_none != False - -object_expr = TypedExprNode(py_object_type, may_be_none=True) -# Fake rhs to silence "unused variable" warning -fake_rhs_expr = TypedExprNode(unspecified_type) - - -class ControlBlock(object): - """Control flow graph node. Sequence of assignments and name references. - - children set of children nodes - parents set of parent nodes - positions set of position markers - - stats list of block statements - gen dict of assignments generated by this block - bounded set of entries that are definitely bounded in this block - - Example: - - a = 1 - b = a + c # 'c' is already bounded or exception here - - stats = [Assignment(a), NameReference(a), NameReference(c), - Assignment(b)] - gen = {Entry(a): Assignment(a), Entry(b): Assignment(b)} - bounded = set([Entry(a), Entry(c)]) - - """ - - def __init__(self): - self.children = set() - self.parents = set() - self.positions = set() - - self.stats = [] - self.gen = {} - self.bounded = set() - - self.i_input = 0 - self.i_output = 0 - self.i_gen = 0 - self.i_kill = 0 - self.i_state = 0 - - def empty(self): - return (not self.stats and not self.positions) - - def detach(self): - """Detach block from parents and children.""" - for child in self.children: - child.parents.remove(self) - for parent in self.parents: - parent.children.remove(self) - self.parents.clear() - self.children.clear() - - def add_child(self, block): - self.children.add(block) - block.parents.add(self) - - -class ExitBlock(ControlBlock): - """Non-empty exit point block.""" - - def empty(self): - return False - - -class AssignmentList(object): - def __init__(self): - self.stats = [] - - -class ControlFlow(object): - """Control-flow graph. - - entry_point ControlBlock entry point for this graph - exit_point ControlBlock normal exit point - block ControlBlock current block - blocks set children nodes - entries set tracked entries - loops list stack for loop descriptors - exceptions list stack for exception descriptors - """ - - def __init__(self): - self.blocks = set() - self.entries = set() - self.loops = [] - self.exceptions = [] - - self.entry_point = ControlBlock() - self.exit_point = ExitBlock() - self.blocks.add(self.exit_point) - self.block = self.entry_point - - def newblock(self, parent=None): - """Create floating block linked to `parent` if given. - - NOTE: Block is NOT added to self.blocks - """ - block = ControlBlock() - self.blocks.add(block) - if parent: - parent.add_child(block) - return block - - def nextblock(self, parent=None): - """Create block children block linked to current or `parent` if given. - - NOTE: Block is added to self.blocks - """ - block = ControlBlock() - self.blocks.add(block) - if parent: - parent.add_child(block) - elif self.block: - self.block.add_child(block) - self.block = block - return self.block - - def is_tracked(self, entry): - if entry.is_anonymous: - return False - return (entry.is_local or entry.is_pyclass_attr or entry.is_arg or - entry.from_closure or entry.in_closure or - entry.error_on_uninitialized) - - def is_statically_assigned(self, entry): - if (entry.is_local and entry.is_variable and - (entry.type.is_struct_or_union or - entry.type.is_complex or - entry.type.is_array or - entry.type.is_cpp_class)): - # stack allocated structured variable => never uninitialised - return True - return False - - def mark_position(self, node): - """Mark position, will be used to draw graph nodes.""" - if self.block: - self.block.positions.add(node.pos[:2]) - - def mark_assignment(self, lhs, rhs, entry): - if self.block and self.is_tracked(entry): - assignment = NameAssignment(lhs, rhs, entry) - self.block.stats.append(assignment) - self.block.gen[entry] = assignment - self.entries.add(entry) - - def mark_argument(self, lhs, rhs, entry): - if self.block and self.is_tracked(entry): - assignment = Argument(lhs, rhs, entry) - self.block.stats.append(assignment) - self.block.gen[entry] = assignment - self.entries.add(entry) - - def mark_deletion(self, node, entry): - if self.block and self.is_tracked(entry): - assignment = NameDeletion(node, entry) - self.block.stats.append(assignment) - self.block.gen[entry] = Uninitialized - self.entries.add(entry) - - def mark_reference(self, node, entry): - if self.block and self.is_tracked(entry): - self.block.stats.append(NameReference(node, entry)) - ## XXX: We don't track expression evaluation order so we can't use - ## XXX: successful reference as initialization sign. - ## # Local variable is definitely bound after this reference - ## if not node.allow_null: - ## self.block.bounded.add(entry) - self.entries.add(entry) - - def normalize(self): - """Delete unreachable and orphan blocks.""" - queue = set([self.entry_point]) - visited = set() - while queue: - root = queue.pop() - visited.add(root) - for child in root.children: - if child not in visited: - queue.add(child) - unreachable = self.blocks - visited - for block in unreachable: - block.detach() - visited.remove(self.entry_point) - for block in visited: - if block.empty(): - for parent in block.parents: # Re-parent - for child in block.children: - parent.add_child(child) - block.detach() - unreachable.add(block) - self.blocks -= unreachable - - def initialize(self): - """Set initial state, map assignments to bits.""" - self.assmts = {} - - bit = 1 - for entry in self.entries: - assmts = AssignmentList() - assmts.mask = assmts.bit = bit - self.assmts[entry] = assmts - bit <<= 1 - - for block in self.blocks: - for stat in block.stats: - if isinstance(stat, NameAssignment): - stat.bit = bit - assmts = self.assmts[stat.entry] - assmts.stats.append(stat) - assmts.mask |= bit - bit <<= 1 - - for block in self.blocks: - for entry, stat in block.gen.items(): - assmts = self.assmts[entry] - if stat is Uninitialized: - block.i_gen |= assmts.bit - else: - block.i_gen |= stat.bit - block.i_kill |= assmts.mask - block.i_output = block.i_gen - for entry in block.bounded: - block.i_kill |= self.assmts[entry].bit - - for assmts in self.assmts.values(): - self.entry_point.i_gen |= assmts.bit - self.entry_point.i_output = self.entry_point.i_gen - - def map_one(self, istate, entry): - ret = set() - assmts = self.assmts[entry] - if istate & assmts.bit: - if self.is_statically_assigned(entry): - ret.add(StaticAssignment(entry)) - elif entry.from_closure: - ret.add(Unknown) - else: - ret.add(Uninitialized) - for assmt in assmts.stats: - if istate & assmt.bit: - ret.add(assmt) - return ret - - def reaching_definitions(self): - """Per-block reaching definitions analysis.""" - dirty = True - while dirty: - dirty = False - for block in self.blocks: - i_input = 0 - for parent in block.parents: - i_input |= parent.i_output - i_output = (i_input & ~block.i_kill) | block.i_gen - if i_output != block.i_output: - dirty = True - block.i_input = i_input - block.i_output = i_output - - -class LoopDescr(object): - def __init__(self, next_block, loop_block): - self.next_block = next_block - self.loop_block = loop_block - self.exceptions = [] - - -class ExceptionDescr(object): - """Exception handling helper. - - entry_point ControlBlock Exception handling entry point - finally_enter ControlBlock Normal finally clause entry point - finally_exit ControlBlock Normal finally clause exit point - """ - - def __init__(self, entry_point, finally_enter=None, finally_exit=None): - self.entry_point = entry_point - self.finally_enter = finally_enter - self.finally_exit = finally_exit - - -class NameAssignment(object): - def __init__(self, lhs, rhs, entry): - if lhs.cf_state is None: - lhs.cf_state = set() - self.lhs = lhs - self.rhs = rhs - self.entry = entry - self.pos = lhs.pos - self.refs = set() - self.is_arg = False - self.is_deletion = False - self.inferred_type = None - - def __repr__(self): - return '%s(entry=%r)' % (self.__class__.__name__, self.entry) - - def infer_type(self): - self.inferred_type = self.rhs.infer_type(self.entry.scope) - return self.inferred_type - - def type_dependencies(self): - return self.rhs.type_dependencies(self.entry.scope) - - @property - def type(self): - if not self.entry.type.is_unspecified: - return self.entry.type - return self.inferred_type - - -class StaticAssignment(NameAssignment): - """Initialised at declaration time, e.g. stack allocation.""" - def __init__(self, entry): - if not entry.type.is_pyobject: - may_be_none = False - else: - may_be_none = None # unknown - lhs = TypedExprNode( - entry.type, may_be_none=may_be_none, pos=entry.pos) - super(StaticAssignment, self).__init__(lhs, lhs, entry) - - def infer_type(self): - return self.entry.type - - def type_dependencies(self): - return () - - -class Argument(NameAssignment): - def __init__(self, lhs, rhs, entry): - NameAssignment.__init__(self, lhs, rhs, entry) - self.is_arg = True - - -class NameDeletion(NameAssignment): - def __init__(self, lhs, entry): - NameAssignment.__init__(self, lhs, lhs, entry) - self.is_deletion = True - - def infer_type(self): - inferred_type = self.rhs.infer_type(self.entry.scope) - if (not inferred_type.is_pyobject and - inferred_type.can_coerce_to_pyobject(self.entry.scope)): - return py_object_type - self.inferred_type = inferred_type - return inferred_type - - -class Uninitialized(object): - """Definitely not initialised yet.""" - - -class Unknown(object): - """Coming from outer closure, might be initialised or not.""" - - -class NameReference(object): - def __init__(self, node, entry): - if node.cf_state is None: - node.cf_state = set() - self.node = node - self.entry = entry - self.pos = node.pos - - def __repr__(self): - return '%s(entry=%r)' % (self.__class__.__name__, self.entry) - - -class ControlFlowState(list): - # Keeps track of Node's entry assignments - # - # cf_is_null [boolean] It is uninitialized - # cf_maybe_null [boolean] May be uninitialized - # is_single [boolean] Has only one assignment at this point - - cf_maybe_null = False - cf_is_null = False - is_single = False - - def __init__(self, state): - if Uninitialized in state: - state.discard(Uninitialized) - self.cf_maybe_null = True - if not state: - self.cf_is_null = True - elif Unknown in state: - state.discard(Unknown) - self.cf_maybe_null = True - else: - if len(state) == 1: - self.is_single = True - # XXX: Remove fake_rhs_expr - super(ControlFlowState, self).__init__( - [i for i in state if i.rhs is not fake_rhs_expr]) - - def one(self): - return self[0] - - -class GVContext(object): - """Graphviz subgraph object.""" - - def __init__(self): - self.blockids = {} - self.nextid = 0 - self.children = [] - self.sources = {} - - def add(self, child): - self.children.append(child) - - def nodeid(self, block): - if block not in self.blockids: - self.blockids[block] = 'block%d' % self.nextid - self.nextid += 1 - return self.blockids[block] - - def extract_sources(self, block): - if not block.positions: - return '' - start = min(block.positions) - stop = max(block.positions) - srcdescr = start[0] - if not srcdescr in self.sources: - self.sources[srcdescr] = list(srcdescr.get_lines()) - lines = self.sources[srcdescr] - return '\\n'.join([l.strip() for l in lines[start[1] - 1:stop[1]]]) - - def render(self, fp, name, annotate_defs=False): - """Render graphviz dot graph""" - fp.write('digraph %s {\n' % name) - fp.write(' node [shape=box];\n') - for child in self.children: - child.render(fp, self, annotate_defs) - fp.write('}\n') - - def escape(self, text): - return text.replace('"', '\\"').replace('\n', '\\n') - - -class GV(object): - """Graphviz DOT renderer.""" - - def __init__(self, name, flow): - self.name = name - self.flow = flow - - def render(self, fp, ctx, annotate_defs=False): - fp.write(' subgraph %s {\n' % self.name) - for block in self.flow.blocks: - label = ctx.extract_sources(block) - if annotate_defs: - for stat in block.stats: - if isinstance(stat, NameAssignment): - label += '\n %s [%s %s]' % ( - stat.entry.name, 'deletion' if stat.is_deletion else 'definition', stat.pos[1]) - elif isinstance(stat, NameReference): - if stat.entry: - label += '\n %s [reference %s]' % (stat.entry.name, stat.pos[1]) - if not label: - label = 'empty' - pid = ctx.nodeid(block) - fp.write(' %s [label="%s"];\n' % (pid, ctx.escape(label))) - for block in self.flow.blocks: - pid = ctx.nodeid(block) - for child in block.children: - fp.write(' %s -> %s;\n' % (pid, ctx.nodeid(child))) - fp.write(' }\n') - - -class MessageCollection(object): - """Collect error/warnings messages first then sort""" - def __init__(self): - self.messages = set() - - def error(self, pos, message): - self.messages.add((pos, True, message)) - - def warning(self, pos, message): - self.messages.add((pos, False, message)) - - def report(self): - for pos, is_error, message in sorted(self.messages): - if is_error: - error(pos, message) - else: - warning(pos, message, 2) - - -def check_definitions(flow, compiler_directives): - flow.initialize() - flow.reaching_definitions() - - # Track down state - assignments = set() - # Node to entry map - references = {} - assmt_nodes = set() - - for block in flow.blocks: - i_state = block.i_input - for stat in block.stats: - i_assmts = flow.assmts[stat.entry] - state = flow.map_one(i_state, stat.entry) - if isinstance(stat, NameAssignment): - stat.lhs.cf_state.update(state) - assmt_nodes.add(stat.lhs) - i_state = i_state & ~i_assmts.mask - if stat.is_deletion: - i_state |= i_assmts.bit - else: - i_state |= stat.bit - assignments.add(stat) - if stat.rhs is not fake_rhs_expr: - stat.entry.cf_assignments.append(stat) - elif isinstance(stat, NameReference): - references[stat.node] = stat.entry - stat.entry.cf_references.append(stat) - stat.node.cf_state.update(state) - ## if not stat.node.allow_null: - ## i_state &= ~i_assmts.bit - ## # after successful read, the state is known to be initialised - state.discard(Uninitialized) - state.discard(Unknown) - for assmt in state: - assmt.refs.add(stat) - - # Check variable usage - warn_maybe_uninitialized = compiler_directives['warn.maybe_uninitialized'] - warn_unused_result = compiler_directives['warn.unused_result'] - warn_unused = compiler_directives['warn.unused'] - warn_unused_arg = compiler_directives['warn.unused_arg'] - - messages = MessageCollection() - - # assignment hints - for node in assmt_nodes: - if Uninitialized in node.cf_state: - node.cf_maybe_null = True - if len(node.cf_state) == 1: - node.cf_is_null = True - else: - node.cf_is_null = False - elif Unknown in node.cf_state: - node.cf_maybe_null = True - else: - node.cf_is_null = False - node.cf_maybe_null = False - - # Find uninitialized references and cf-hints - for node, entry in references.items(): - if Uninitialized in node.cf_state: - node.cf_maybe_null = True - if not entry.from_closure and len(node.cf_state) == 1: - node.cf_is_null = True - if (node.allow_null or entry.from_closure - or entry.is_pyclass_attr or entry.type.is_error): - pass # Can be uninitialized here - elif node.cf_is_null: - if entry.error_on_uninitialized or ( - Options.error_on_uninitialized and ( - entry.type.is_pyobject or entry.type.is_unspecified)): - messages.error( - node.pos, - "local variable '%s' referenced before assignment" - % entry.name) - else: - messages.warning( - node.pos, - "local variable '%s' referenced before assignment" - % entry.name) - elif warn_maybe_uninitialized: - messages.warning( - node.pos, - "local variable '%s' might be referenced before assignment" - % entry.name) - elif Unknown in node.cf_state: - # TODO: better cross-closure analysis to know when inner functions - # are being called before a variable is being set, and when - # a variable is known to be set before even defining the - # inner function, etc. - node.cf_maybe_null = True - else: - node.cf_is_null = False - node.cf_maybe_null = False - - # Unused result - for assmt in assignments: - if (not assmt.refs and not assmt.entry.is_pyclass_attr - and not assmt.entry.in_closure): - if assmt.entry.cf_references and warn_unused_result: - if assmt.is_arg: - messages.warning(assmt.pos, "Unused argument value '%s'" % - assmt.entry.name) - else: - messages.warning(assmt.pos, "Unused result in '%s'" % - assmt.entry.name) - assmt.lhs.cf_used = False - - # Unused entries - for entry in flow.entries: - if (not entry.cf_references - and not entry.is_pyclass_attr): - if entry.name != '_' and not entry.name.startswith('unused'): - # '_' is often used for unused variables, e.g. in loops - if entry.is_arg: - if warn_unused_arg: - messages.warning(entry.pos, "Unused argument '%s'" % - entry.name) - else: - if warn_unused: - messages.warning(entry.pos, "Unused entry '%s'" % - entry.name) - entry.cf_used = False - - messages.report() - - for node in assmt_nodes: - node.cf_state = ControlFlowState(node.cf_state) - for node in references: - node.cf_state = ControlFlowState(node.cf_state) - - -class AssignmentCollector(TreeVisitor): - def __init__(self): - super(AssignmentCollector, self).__init__() - self.assignments = [] - - def visit_Node(self): - self._visitchildren(self, None) - - def visit_SingleAssignmentNode(self, node): - self.assignments.append((node.lhs, node.rhs)) - - def visit_CascadedAssignmentNode(self, node): - for lhs in node.lhs_list: - self.assignments.append((lhs, node.rhs)) - - -class ControlFlowAnalysis(CythonTransform): - - def visit_ModuleNode(self, node): - self.gv_ctx = GVContext() - self.constant_folder = ConstantFolding() - - # Set of NameNode reductions - self.reductions = set() - - self.in_inplace_assignment = False - self.env_stack = [] - self.env = node.scope - self.stack = [] - self.flow = ControlFlow() - self.visitchildren(node) - - check_definitions(self.flow, self.current_directives) - - dot_output = self.current_directives['control_flow.dot_output'] - if dot_output: - annotate_defs = self.current_directives['control_flow.dot_annotate_defs'] - fp = open(dot_output, 'wt') - try: - self.gv_ctx.render(fp, 'module', annotate_defs=annotate_defs) - finally: - fp.close() - return node - - def visit_FuncDefNode(self, node): - for arg in node.args: - if arg.default: - self.visitchildren(arg) - self.visitchildren(node, ('decorators',)) - self.env_stack.append(self.env) - self.env = node.local_scope - self.stack.append(self.flow) - self.flow = ControlFlow() - - # Collect all entries - for entry in node.local_scope.entries.values(): - if self.flow.is_tracked(entry): - self.flow.entries.add(entry) - - self.mark_position(node) - # Function body block - self.flow.nextblock() - - for arg in node.args: - self._visit(arg) - if node.star_arg: - self.flow.mark_argument(node.star_arg, - TypedExprNode(Builtin.tuple_type, - may_be_none=False), - node.star_arg.entry) - if node.starstar_arg: - self.flow.mark_argument(node.starstar_arg, - TypedExprNode(Builtin.dict_type, - may_be_none=False), - node.starstar_arg.entry) - self._visit(node.body) - # Workaround for generators - if node.is_generator: - self._visit(node.gbody.body) - - # Exit point - if self.flow.block: - self.flow.block.add_child(self.flow.exit_point) - - # Cleanup graph - self.flow.normalize() - check_definitions(self.flow, self.current_directives) - self.flow.blocks.add(self.flow.entry_point) - - self.gv_ctx.add(GV(node.local_scope.name, self.flow)) - - self.flow = self.stack.pop() - self.env = self.env_stack.pop() - return node - - def visit_DefNode(self, node): - node.used = True - return self.visit_FuncDefNode(node) - - def visit_GeneratorBodyDefNode(self, node): - return node - - def visit_CTypeDefNode(self, node): - return node - - def mark_assignment(self, lhs, rhs=None): - if not self.flow.block: - return - if self.flow.exceptions: - exc_descr = self.flow.exceptions[-1] - self.flow.block.add_child(exc_descr.entry_point) - self.flow.nextblock() - - if not rhs: - rhs = object_expr - if lhs.is_name: - if lhs.entry is not None: - entry = lhs.entry - else: - entry = self.env.lookup(lhs.name) - if entry is None: # TODO: This shouldn't happen... - return - self.flow.mark_assignment(lhs, rhs, entry) - elif lhs.is_sequence_constructor: - for i, arg in enumerate(lhs.args): - if not rhs or arg.is_starred: - item_node = None - else: - item_node = rhs.inferable_item_node(i) - self.mark_assignment(arg, item_node) - else: - self._visit(lhs) - - if self.flow.exceptions: - exc_descr = self.flow.exceptions[-1] - self.flow.block.add_child(exc_descr.entry_point) - self.flow.nextblock() - - def mark_position(self, node): - """Mark position if DOT output is enabled.""" - if self.current_directives['control_flow.dot_output']: - self.flow.mark_position(node) - - def visit_FromImportStatNode(self, node): - for name, target in node.items: - if name != "*": - self.mark_assignment(target) - self.visitchildren(node) - return node - - def visit_AssignmentNode(self, node): - raise InternalError("Unhandled assignment node") - - def visit_SingleAssignmentNode(self, node): - self._visit(node.rhs) - self.mark_assignment(node.lhs, node.rhs) - return node - - def visit_CascadedAssignmentNode(self, node): - self._visit(node.rhs) - for lhs in node.lhs_list: - self.mark_assignment(lhs, node.rhs) - return node - - def visit_ParallelAssignmentNode(self, node): - collector = AssignmentCollector() - collector.visitchildren(node) - for lhs, rhs in collector.assignments: - self._visit(rhs) - for lhs, rhs in collector.assignments: - self.mark_assignment(lhs, rhs) - return node - - def visit_InPlaceAssignmentNode(self, node): - self.in_inplace_assignment = True - self.visitchildren(node) - self.in_inplace_assignment = False - self.mark_assignment(node.lhs, self.constant_folder(node.create_binop_node())) - return node - - def visit_DelStatNode(self, node): - for arg in node.args: - if arg.is_name: - entry = arg.entry or self.env.lookup(arg.name) - if entry.in_closure or entry.from_closure: - error(arg.pos, - "can not delete variable '%s' " - "referenced in nested scope" % entry.name) - if not node.ignore_nonexisting: - self._visit(arg) # mark reference - self.flow.mark_deletion(arg, entry) - else: - self._visit(arg) - return node - - def visit_CArgDeclNode(self, node): - entry = self.env.lookup(node.name) - if entry: - may_be_none = not node.not_none - self.flow.mark_argument( - node, TypedExprNode(entry.type, may_be_none), entry) - return node - - def visit_NameNode(self, node): - if self.flow.block: - entry = node.entry or self.env.lookup(node.name) - if entry: - self.flow.mark_reference(node, entry) - - if entry in self.reductions and not self.in_inplace_assignment: - error(node.pos, - "Cannot read reduction variable in loop body") - - return node - - def visit_StatListNode(self, node): - if self.flow.block: - for stat in node.stats: - self._visit(stat) - if not self.flow.block: - stat.is_terminator = True - break - return node - - def visit_Node(self, node): - self.visitchildren(node) - self.mark_position(node) - return node - - def visit_SizeofVarNode(self, node): - return node - - def visit_TypeidNode(self, node): - return node - - def visit_IfStatNode(self, node): - next_block = self.flow.newblock() - parent = self.flow.block - # If clauses - for clause in node.if_clauses: - parent = self.flow.nextblock(parent) - self._visit(clause.condition) - self.flow.nextblock() - self._visit(clause.body) - if self.flow.block: - self.flow.block.add_child(next_block) - # Else clause - if node.else_clause: - self.flow.nextblock(parent=parent) - self._visit(node.else_clause) - if self.flow.block: - self.flow.block.add_child(next_block) - else: - parent.add_child(next_block) - - if next_block.parents: - self.flow.block = next_block - else: - self.flow.block = None - return node - - def visit_WhileStatNode(self, node): - condition_block = self.flow.nextblock() - next_block = self.flow.newblock() - # Condition block - self.flow.loops.append(LoopDescr(next_block, condition_block)) - if node.condition: - self._visit(node.condition) - # Body block - self.flow.nextblock() - self._visit(node.body) - self.flow.loops.pop() - # Loop it - if self.flow.block: - self.flow.block.add_child(condition_block) - self.flow.block.add_child(next_block) - # Else clause - if node.else_clause: - self.flow.nextblock(parent=condition_block) - self._visit(node.else_clause) - if self.flow.block: - self.flow.block.add_child(next_block) - else: - condition_block.add_child(next_block) - - if next_block.parents: - self.flow.block = next_block - else: - self.flow.block = None - return node - - def mark_forloop_target(self, node): - # TODO: Remove redundancy with range optimization... - is_special = False - sequence = node.iterator.sequence - target = node.target - if isinstance(sequence, ExprNodes.SimpleCallNode): - function = sequence.function - if sequence.self is None and function.is_name: - entry = self.env.lookup(function.name) - if not entry or entry.is_builtin: - if function.name == 'reversed' and len(sequence.args) == 1: - sequence = sequence.args[0] - elif function.name == 'enumerate' and len(sequence.args) == 1: - if target.is_sequence_constructor and len(target.args) == 2: - iterator = sequence.args[0] - if iterator.is_name: - iterator_type = iterator.infer_type(self.env) - if iterator_type.is_builtin_type: - # assume that builtin types have a length within Py_ssize_t - self.mark_assignment( - target.args[0], - ExprNodes.IntNode(target.pos, value='PY_SSIZE_T_MAX', - type=PyrexTypes.c_py_ssize_t_type)) - target = target.args[1] - sequence = sequence.args[0] - if isinstance(sequence, ExprNodes.SimpleCallNode): - function = sequence.function - if sequence.self is None and function.is_name: - entry = self.env.lookup(function.name) - if not entry or entry.is_builtin: - if function.name in ('range', 'xrange'): - is_special = True - for arg in sequence.args[:2]: - self.mark_assignment(target, arg) - if len(sequence.args) > 2: - self.mark_assignment(target, self.constant_folder( - ExprNodes.binop_node(node.pos, - '+', - sequence.args[0], - sequence.args[2]))) - - if not is_special: - # A for-loop basically translates to subsequent calls to - # __getitem__(), so using an IndexNode here allows us to - # naturally infer the base type of pointers, C arrays, - # Python strings, etc., while correctly falling back to an - # object type when the base type cannot be handled. - - self.mark_assignment(target, node.item) - - def visit_AsyncForStatNode(self, node): - return self.visit_ForInStatNode(node) - - def visit_ForInStatNode(self, node): - condition_block = self.flow.nextblock() - next_block = self.flow.newblock() - # Condition with iterator - self.flow.loops.append(LoopDescr(next_block, condition_block)) - self._visit(node.iterator) - # Target assignment - self.flow.nextblock() - - if isinstance(node, Nodes.ForInStatNode): - self.mark_forloop_target(node) - elif isinstance(node, Nodes.AsyncForStatNode): - # not entirely correct, but good enough for now - self.mark_assignment(node.target, node.item) - else: # Parallel - self.mark_assignment(node.target) - - # Body block - if isinstance(node, Nodes.ParallelRangeNode): - # In case of an invalid - self._delete_privates(node, exclude=node.target.entry) - - self.flow.nextblock() - self._visit(node.body) - self.flow.loops.pop() - - # Loop it - if self.flow.block: - self.flow.block.add_child(condition_block) - # Else clause - if node.else_clause: - self.flow.nextblock(parent=condition_block) - self._visit(node.else_clause) - if self.flow.block: - self.flow.block.add_child(next_block) - else: - condition_block.add_child(next_block) - - if next_block.parents: - self.flow.block = next_block - else: - self.flow.block = None - return node - - def _delete_privates(self, node, exclude=None): - for private_node in node.assigned_nodes: - if not exclude or private_node.entry is not exclude: - self.flow.mark_deletion(private_node, private_node.entry) - - def visit_ParallelRangeNode(self, node): - reductions = self.reductions - - # if node.target is None or not a NameNode, an error will have - # been previously issued - if hasattr(node.target, 'entry'): - self.reductions = set(reductions) - - for private_node in node.assigned_nodes: - private_node.entry.error_on_uninitialized = True - pos, reduction = node.assignments[private_node.entry] - if reduction: - self.reductions.add(private_node.entry) - - node = self.visit_ForInStatNode(node) - - self.reductions = reductions - return node - - def visit_ParallelWithBlockNode(self, node): - for private_node in node.assigned_nodes: - private_node.entry.error_on_uninitialized = True - - self._delete_privates(node) - self.visitchildren(node) - self._delete_privates(node) - - return node - - def visit_ForFromStatNode(self, node): - condition_block = self.flow.nextblock() - next_block = self.flow.newblock() - # Condition with iterator - self.flow.loops.append(LoopDescr(next_block, condition_block)) - self._visit(node.bound1) - self._visit(node.bound2) - if node.step is not None: - self._visit(node.step) - # Target assignment - self.flow.nextblock() - self.mark_assignment(node.target, node.bound1) - if node.step is not None: - self.mark_assignment(node.target, self.constant_folder( - ExprNodes.binop_node(node.pos, '+', node.bound1, node.step))) - # Body block - self.flow.nextblock() - self._visit(node.body) - self.flow.loops.pop() - # Loop it - if self.flow.block: - self.flow.block.add_child(condition_block) - # Else clause - if node.else_clause: - self.flow.nextblock(parent=condition_block) - self._visit(node.else_clause) - if self.flow.block: - self.flow.block.add_child(next_block) - else: - condition_block.add_child(next_block) - - if next_block.parents: - self.flow.block = next_block - else: - self.flow.block = None - return node - - def visit_LoopNode(self, node): - raise InternalError("Generic loops are not supported") - - def visit_WithTargetAssignmentStatNode(self, node): - self.mark_assignment(node.lhs, node.with_node.enter_call) - return node - - def visit_WithStatNode(self, node): - self._visit(node.manager) - self._visit(node.enter_call) - self._visit(node.body) - return node - - def visit_TryExceptStatNode(self, node): - # After exception handling - next_block = self.flow.newblock() - # Body block - self.flow.newblock() - # Exception entry point - entry_point = self.flow.newblock() - self.flow.exceptions.append(ExceptionDescr(entry_point)) - self.flow.nextblock() - ## XXX: links to exception handling point should be added by - ## XXX: children nodes - self.flow.block.add_child(entry_point) - self.flow.nextblock() - self._visit(node.body) - self.flow.exceptions.pop() - - # After exception - if self.flow.block: - if node.else_clause: - self.flow.nextblock() - self._visit(node.else_clause) - if self.flow.block: - self.flow.block.add_child(next_block) - - for clause in node.except_clauses: - self.flow.block = entry_point - if clause.pattern: - for pattern in clause.pattern: - self._visit(pattern) - else: - # TODO: handle * pattern - pass - entry_point = self.flow.newblock(parent=self.flow.block) - self.flow.nextblock() - if clause.target: - self.mark_assignment(clause.target) - self._visit(clause.body) - if self.flow.block: - self.flow.block.add_child(next_block) - - if self.flow.exceptions: - entry_point.add_child(self.flow.exceptions[-1].entry_point) - - if next_block.parents: - self.flow.block = next_block - else: - self.flow.block = None - return node - - def visit_TryFinallyStatNode(self, node): - body_block = self.flow.nextblock() - - # Exception entry point - entry_point = self.flow.newblock() - self.flow.block = entry_point - self._visit(node.finally_except_clause) - - if self.flow.block and self.flow.exceptions: - self.flow.block.add_child(self.flow.exceptions[-1].entry_point) - - # Normal execution - finally_enter = self.flow.newblock() - self.flow.block = finally_enter - self._visit(node.finally_clause) - finally_exit = self.flow.block - - descr = ExceptionDescr(entry_point, finally_enter, finally_exit) - self.flow.exceptions.append(descr) - if self.flow.loops: - self.flow.loops[-1].exceptions.append(descr) - self.flow.block = body_block - body_block.add_child(entry_point) - self.flow.nextblock() - self._visit(node.body) - self.flow.exceptions.pop() - if self.flow.loops: - self.flow.loops[-1].exceptions.pop() - - if self.flow.block: - self.flow.block.add_child(finally_enter) - if finally_exit: - self.flow.block = self.flow.nextblock(parent=finally_exit) - else: - self.flow.block = None - return node - - def visit_RaiseStatNode(self, node): - self.mark_position(node) - self.visitchildren(node) - if self.flow.exceptions: - self.flow.block.add_child(self.flow.exceptions[-1].entry_point) - self.flow.block = None - return node - - def visit_ReraiseStatNode(self, node): - self.mark_position(node) - if self.flow.exceptions: - self.flow.block.add_child(self.flow.exceptions[-1].entry_point) - self.flow.block = None - return node - - def visit_ReturnStatNode(self, node): - self.mark_position(node) - self.visitchildren(node) - - outer_exception_handlers = iter(self.flow.exceptions[::-1]) - for handler in outer_exception_handlers: - if handler.finally_enter: - self.flow.block.add_child(handler.finally_enter) - if handler.finally_exit: - # 'return' goes to function exit, or to the next outer 'finally' clause - exit_point = self.flow.exit_point - for next_handler in outer_exception_handlers: - if next_handler.finally_enter: - exit_point = next_handler.finally_enter - break - handler.finally_exit.add_child(exit_point) - break - else: - if self.flow.block: - self.flow.block.add_child(self.flow.exit_point) - self.flow.block = None - return node - - def visit_BreakStatNode(self, node): - if not self.flow.loops: - #error(node.pos, "break statement not inside loop") - return node - loop = self.flow.loops[-1] - self.mark_position(node) - for exception in loop.exceptions[::-1]: - if exception.finally_enter: - self.flow.block.add_child(exception.finally_enter) - if exception.finally_exit: - exception.finally_exit.add_child(loop.next_block) - break - else: - self.flow.block.add_child(loop.next_block) - self.flow.block = None - return node - - def visit_ContinueStatNode(self, node): - if not self.flow.loops: - #error(node.pos, "continue statement not inside loop") - return node - loop = self.flow.loops[-1] - self.mark_position(node) - for exception in loop.exceptions[::-1]: - if exception.finally_enter: - self.flow.block.add_child(exception.finally_enter) - if exception.finally_exit: - exception.finally_exit.add_child(loop.loop_block) - break - else: - self.flow.block.add_child(loop.loop_block) - self.flow.block = None - return node - - def visit_ComprehensionNode(self, node): - if node.expr_scope: - self.env_stack.append(self.env) - self.env = node.expr_scope - # Skip append node here - self._visit(node.loop) - if node.expr_scope: - self.env = self.env_stack.pop() - return node - - def visit_ScopedExprNode(self, node): - if node.expr_scope: - self.env_stack.append(self.env) - self.env = node.expr_scope - self.visitchildren(node) - if node.expr_scope: - self.env = self.env_stack.pop() - return node - - def visit_PyClassDefNode(self, node): - self.visitchildren(node, ('dict', 'metaclass', - 'mkw', 'bases', 'class_result')) - self.flow.mark_assignment(node.target, node.classobj, - self.env.lookup(node.name)) - self.env_stack.append(self.env) - self.env = node.scope - self.flow.nextblock() - self.visitchildren(node, ('body',)) - self.flow.nextblock() - self.env = self.env_stack.pop() - return node - - def visit_AmpersandNode(self, node): - if node.operand.is_name: - # Fake assignment to silence warning - self.mark_assignment(node.operand, fake_rhs_expr) - self.visitchildren(node) - return node diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FusedNode.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FusedNode.py deleted file mode 100644 index 26d6ffd3d65..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/FusedNode.py +++ /dev/null @@ -1,901 +0,0 @@ -from __future__ import absolute_import - -import copy - -from . import (ExprNodes, PyrexTypes, MemoryView, - ParseTreeTransforms, StringEncoding, Errors) -from .ExprNodes import CloneNode, ProxyNode, TupleNode -from .Nodes import FuncDefNode, CFuncDefNode, StatListNode, DefNode -from ..Utils import OrderedSet - - -class FusedCFuncDefNode(StatListNode): - """ - This node replaces a function with fused arguments. It deep-copies the - function for every permutation of fused types, and allocates a new local - scope for it. It keeps track of the original function in self.node, and - the entry of the original function in the symbol table is given the - 'fused_cfunction' attribute which points back to us. - Then when a function lookup occurs (to e.g. call it), the call can be - dispatched to the right function. - - node FuncDefNode the original function - nodes [FuncDefNode] list of copies of node with different specific types - py_func DefNode the fused python function subscriptable from - Python space - __signatures__ A DictNode mapping signature specialization strings - to PyCFunction nodes - resulting_fused_function PyCFunction for the fused DefNode that delegates - to specializations - fused_func_assignment Assignment of the fused function to the function name - defaults_tuple TupleNode of defaults (letting PyCFunctionNode build - defaults would result in many different tuples) - specialized_pycfuncs List of synthesized pycfunction nodes for the - specializations - code_object CodeObjectNode shared by all specializations and the - fused function - - fused_compound_types All fused (compound) types (e.g. floating[:]) - """ - - __signatures__ = None - resulting_fused_function = None - fused_func_assignment = None - defaults_tuple = None - decorators = None - - child_attrs = StatListNode.child_attrs + [ - '__signatures__', 'resulting_fused_function', 'fused_func_assignment'] - - def __init__(self, node, env): - super(FusedCFuncDefNode, self).__init__(node.pos) - - self.nodes = [] - self.node = node - - is_def = isinstance(self.node, DefNode) - if is_def: - # self.node.decorators = [] - self.copy_def(env) - else: - self.copy_cdef(env) - - # Perform some sanity checks. If anything fails, it's a bug - for n in self.nodes: - assert not n.entry.type.is_fused - assert not n.local_scope.return_type.is_fused - if node.return_type.is_fused: - assert not n.return_type.is_fused - - if not is_def and n.cfunc_declarator.optional_arg_count: - assert n.type.op_arg_struct - - node.entry.fused_cfunction = self - # Copy the nodes as AnalyseDeclarationsTransform will prepend - # self.py_func to self.stats, as we only want specialized - # CFuncDefNodes in self.nodes - self.stats = self.nodes[:] - - def copy_def(self, env): - """ - Create a copy of the original def or lambda function for specialized - versions. - """ - fused_compound_types = PyrexTypes.unique( - [arg.type for arg in self.node.args if arg.type.is_fused]) - fused_types = self._get_fused_base_types(fused_compound_types) - permutations = PyrexTypes.get_all_specialized_permutations(fused_types) - - self.fused_compound_types = fused_compound_types - - if self.node.entry in env.pyfunc_entries: - env.pyfunc_entries.remove(self.node.entry) - - for cname, fused_to_specific in permutations: - copied_node = copy.deepcopy(self.node) - # keep signature object identity for special casing in DefNode.analyse_declarations() - copied_node.entry.signature = self.node.entry.signature - - self._specialize_function_args(copied_node.args, fused_to_specific) - copied_node.return_type = self.node.return_type.specialize( - fused_to_specific) - - copied_node.analyse_declarations(env) - # copied_node.is_staticmethod = self.node.is_staticmethod - # copied_node.is_classmethod = self.node.is_classmethod - self.create_new_local_scope(copied_node, env, fused_to_specific) - self.specialize_copied_def(copied_node, cname, self.node.entry, - fused_to_specific, fused_compound_types) - - PyrexTypes.specialize_entry(copied_node.entry, cname) - copied_node.entry.used = True - env.entries[copied_node.entry.name] = copied_node.entry - - if not self.replace_fused_typechecks(copied_node): - break - - self.orig_py_func = self.node - self.py_func = self.make_fused_cpdef(self.node, env, is_def=True) - - def copy_cdef(self, env): - """ - Create a copy of the original c(p)def function for all specialized - versions. - """ - permutations = self.node.type.get_all_specialized_permutations() - # print 'Node %s has %d specializations:' % (self.node.entry.name, - # len(permutations)) - # import pprint; pprint.pprint([d for cname, d in permutations]) - - # Prevent copying of the python function - self.orig_py_func = orig_py_func = self.node.py_func - self.node.py_func = None - if orig_py_func: - env.pyfunc_entries.remove(orig_py_func.entry) - - fused_types = self.node.type.get_fused_types() - self.fused_compound_types = fused_types - - new_cfunc_entries = [] - for cname, fused_to_specific in permutations: - copied_node = copy.deepcopy(self.node) - - # Make the types in our CFuncType specific. - type = copied_node.type.specialize(fused_to_specific) - entry = copied_node.entry - type.specialize_entry(entry, cname) - - # Reuse existing Entries (e.g. from .pxd files). - for i, orig_entry in enumerate(env.cfunc_entries): - if entry.cname == orig_entry.cname and type.same_as_resolved_type(orig_entry.type): - copied_node.entry = env.cfunc_entries[i] - if not copied_node.entry.func_cname: - copied_node.entry.func_cname = entry.func_cname - entry = copied_node.entry - type = entry.type - break - else: - new_cfunc_entries.append(entry) - - copied_node.type = type - entry.type, type.entry = type, entry - - entry.used = (entry.used or - self.node.entry.defined_in_pxd or - env.is_c_class_scope or - entry.is_cmethod) - - if self.node.cfunc_declarator.optional_arg_count: - self.node.cfunc_declarator.declare_optional_arg_struct( - type, env, fused_cname=cname) - - copied_node.return_type = type.return_type - self.create_new_local_scope(copied_node, env, fused_to_specific) - - # Make the argument types in the CFuncDeclarator specific - self._specialize_function_args(copied_node.cfunc_declarator.args, - fused_to_specific) - - # If a cpdef, declare all specialized cpdefs (this - # also calls analyse_declarations) - copied_node.declare_cpdef_wrapper(env) - if copied_node.py_func: - env.pyfunc_entries.remove(copied_node.py_func.entry) - - self.specialize_copied_def( - copied_node.py_func, cname, self.node.entry.as_variable, - fused_to_specific, fused_types) - - if not self.replace_fused_typechecks(copied_node): - break - - # replace old entry with new entries - try: - cindex = env.cfunc_entries.index(self.node.entry) - except ValueError: - env.cfunc_entries.extend(new_cfunc_entries) - else: - env.cfunc_entries[cindex:cindex+1] = new_cfunc_entries - - if orig_py_func: - self.py_func = self.make_fused_cpdef(orig_py_func, env, - is_def=False) - else: - self.py_func = orig_py_func - - def _get_fused_base_types(self, fused_compound_types): - """ - Get a list of unique basic fused types, from a list of - (possibly) compound fused types. - """ - base_types = [] - seen = set() - for fused_type in fused_compound_types: - fused_type.get_fused_types(result=base_types, seen=seen) - return base_types - - def _specialize_function_args(self, args, fused_to_specific): - for arg in args: - if arg.type.is_fused: - arg.type = arg.type.specialize(fused_to_specific) - if arg.type.is_memoryviewslice: - arg.type.validate_memslice_dtype(arg.pos) - - def create_new_local_scope(self, node, env, f2s): - """ - Create a new local scope for the copied node and append it to - self.nodes. A new local scope is needed because the arguments with the - fused types are already in the local scope, and we need the specialized - entries created after analyse_declarations on each specialized version - of the (CFunc)DefNode. - f2s is a dict mapping each fused type to its specialized version - """ - node.create_local_scope(env) - node.local_scope.fused_to_specific = f2s - - # This is copied from the original function, set it to false to - # stop recursion - node.has_fused_arguments = False - self.nodes.append(node) - - def specialize_copied_def(self, node, cname, py_entry, f2s, fused_compound_types): - """Specialize the copy of a DefNode given the copied node, - the specialization cname and the original DefNode entry""" - fused_types = self._get_fused_base_types(fused_compound_types) - type_strings = [ - PyrexTypes.specialization_signature_string(fused_type, f2s) - for fused_type in fused_types - ] - - node.specialized_signature_string = '|'.join(type_strings) - - node.entry.pymethdef_cname = PyrexTypes.get_fused_cname( - cname, node.entry.pymethdef_cname) - node.entry.doc = py_entry.doc - node.entry.doc_cname = py_entry.doc_cname - - def replace_fused_typechecks(self, copied_node): - """ - Branch-prune fused type checks like - - if fused_t is int: - ... - - Returns whether an error was issued and whether we should stop in - in order to prevent a flood of errors. - """ - num_errors = Errors.num_errors - transform = ParseTreeTransforms.ReplaceFusedTypeChecks( - copied_node.local_scope) - transform(copied_node) - - if Errors.num_errors > num_errors: - return False - - return True - - def _fused_instance_checks(self, normal_types, pyx_code, env): - """ - Generate Cython code for instance checks, matching an object to - specialized types. - """ - for specialized_type in normal_types: - # all_numeric = all_numeric and specialized_type.is_numeric - pyx_code.context.update( - py_type_name=specialized_type.py_type_name(), - specialized_type_name=specialized_type.specialization_string, - ) - pyx_code.put_chunk( - u""" - if isinstance(arg, {{py_type_name}}): - dest_sig[{{dest_sig_idx}}] = '{{specialized_type_name}}'; break - """) - - def _dtype_name(self, dtype): - if dtype.is_typedef: - return '___pyx_%s' % dtype - return str(dtype).replace(' ', '_') - - def _dtype_type(self, dtype): - if dtype.is_typedef: - return self._dtype_name(dtype) - return str(dtype) - - def _sizeof_dtype(self, dtype): - if dtype.is_pyobject: - return 'sizeof(void *)' - else: - return "sizeof(%s)" % self._dtype_type(dtype) - - def _buffer_check_numpy_dtype_setup_cases(self, pyx_code): - "Setup some common cases to match dtypes against specializations" - if pyx_code.indenter("if kind in b'iu':"): - pyx_code.putln("pass") - pyx_code.named_insertion_point("dtype_int") - pyx_code.dedent() - - if pyx_code.indenter("elif kind == b'f':"): - pyx_code.putln("pass") - pyx_code.named_insertion_point("dtype_float") - pyx_code.dedent() - - if pyx_code.indenter("elif kind == b'c':"): - pyx_code.putln("pass") - pyx_code.named_insertion_point("dtype_complex") - pyx_code.dedent() - - if pyx_code.indenter("elif kind == b'O':"): - pyx_code.putln("pass") - pyx_code.named_insertion_point("dtype_object") - pyx_code.dedent() - - match = "dest_sig[{{dest_sig_idx}}] = '{{specialized_type_name}}'" - no_match = "dest_sig[{{dest_sig_idx}}] = None" - def _buffer_check_numpy_dtype(self, pyx_code, specialized_buffer_types, pythran_types): - """ - Match a numpy dtype object to the individual specializations. - """ - self._buffer_check_numpy_dtype_setup_cases(pyx_code) - - for specialized_type in pythran_types+specialized_buffer_types: - final_type = specialized_type - if specialized_type.is_pythran_expr: - specialized_type = specialized_type.org_buffer - dtype = specialized_type.dtype - pyx_code.context.update( - itemsize_match=self._sizeof_dtype(dtype) + " == itemsize", - signed_match="not (%s_is_signed ^ dtype_signed)" % self._dtype_name(dtype), - dtype=dtype, - specialized_type_name=final_type.specialization_string) - - dtypes = [ - (dtype.is_int, pyx_code.dtype_int), - (dtype.is_float, pyx_code.dtype_float), - (dtype.is_complex, pyx_code.dtype_complex) - ] - - for dtype_category, codewriter in dtypes: - if dtype_category: - cond = '{{itemsize_match}} and (arg.ndim) == %d' % ( - specialized_type.ndim,) - if dtype.is_int: - cond += ' and {{signed_match}}' - - if final_type.is_pythran_expr: - cond += ' and arg_is_pythran_compatible' - - if codewriter.indenter("if %s:" % cond): - #codewriter.putln("print 'buffer match found based on numpy dtype'") - codewriter.putln(self.match) - codewriter.putln("break") - codewriter.dedent() - - def _buffer_parse_format_string_check(self, pyx_code, decl_code, - specialized_type, env): - """ - For each specialized type, try to coerce the object to a memoryview - slice of that type. This means obtaining a buffer and parsing the - format string. - TODO: separate buffer acquisition from format parsing - """ - dtype = specialized_type.dtype - if specialized_type.is_buffer: - axes = [('direct', 'strided')] * specialized_type.ndim - else: - axes = specialized_type.axes - - memslice_type = PyrexTypes.MemoryViewSliceType(dtype, axes) - memslice_type.create_from_py_utility_code(env) - pyx_code.context.update( - coerce_from_py_func=memslice_type.from_py_function, - dtype=dtype) - decl_code.putln( - "{{memviewslice_cname}} {{coerce_from_py_func}}(object, int)") - - pyx_code.context.update( - specialized_type_name=specialized_type.specialization_string, - sizeof_dtype=self._sizeof_dtype(dtype)) - - pyx_code.put_chunk( - u""" - # try {{dtype}} - if itemsize == -1 or itemsize == {{sizeof_dtype}}: - memslice = {{coerce_from_py_func}}(arg, 0) - if memslice.memview: - __PYX_XDEC_MEMVIEW(&memslice, 1) - # print 'found a match for the buffer through format parsing' - %s - break - else: - __pyx_PyErr_Clear() - """ % self.match) - - def _buffer_checks(self, buffer_types, pythran_types, pyx_code, decl_code, env): - """ - Generate Cython code to match objects to buffer specializations. - First try to get a numpy dtype object and match it against the individual - specializations. If that fails, try naively to coerce the object - to each specialization, which obtains the buffer each time and tries - to match the format string. - """ - # The first thing to find a match in this loop breaks out of the loop - pyx_code.put_chunk( - u""" - """ + (u"arg_is_pythran_compatible = False" if pythran_types else u"") + u""" - if ndarray is not None: - if isinstance(arg, ndarray): - dtype = arg.dtype - """ + (u"arg_is_pythran_compatible = True" if pythran_types else u"") + u""" - elif __pyx_memoryview_check(arg): - arg_base = arg.base - if isinstance(arg_base, ndarray): - dtype = arg_base.dtype - else: - dtype = None - else: - dtype = None - - itemsize = -1 - if dtype is not None: - itemsize = dtype.itemsize - kind = ord(dtype.kind) - dtype_signed = kind == 'i' - """) - pyx_code.indent(2) - if pythran_types: - pyx_code.put_chunk( - u""" - # Pythran only supports the endianness of the current compiler - byteorder = dtype.byteorder - if byteorder == "<" and not __Pyx_Is_Little_Endian(): - arg_is_pythran_compatible = False - elif byteorder == ">" and __Pyx_Is_Little_Endian(): - arg_is_pythran_compatible = False - if arg_is_pythran_compatible: - cur_stride = itemsize - shape = arg.shape - strides = arg.strides - for i in range(arg.ndim-1, -1, -1): - if (strides[i]) != cur_stride: - arg_is_pythran_compatible = False - break - cur_stride *= shape[i] - else: - arg_is_pythran_compatible = not (arg.flags.f_contiguous and (arg.ndim) > 1) - """) - pyx_code.named_insertion_point("numpy_dtype_checks") - self._buffer_check_numpy_dtype(pyx_code, buffer_types, pythran_types) - pyx_code.dedent(2) - - for specialized_type in buffer_types: - self._buffer_parse_format_string_check( - pyx_code, decl_code, specialized_type, env) - - def _buffer_declarations(self, pyx_code, decl_code, all_buffer_types, pythran_types): - """ - If we have any buffer specializations, write out some variable - declarations and imports. - """ - decl_code.put_chunk( - u""" - ctypedef struct {{memviewslice_cname}}: - void *memview - - void __PYX_XDEC_MEMVIEW({{memviewslice_cname}} *, int have_gil) - bint __pyx_memoryview_check(object) - """) - - pyx_code.local_variable_declarations.put_chunk( - u""" - cdef {{memviewslice_cname}} memslice - cdef Py_ssize_t itemsize - cdef bint dtype_signed - cdef char kind - - itemsize = -1 - """) - - if pythran_types: - pyx_code.local_variable_declarations.put_chunk(u""" - cdef bint arg_is_pythran_compatible - cdef Py_ssize_t cur_stride - """) - - pyx_code.imports.put_chunk( - u""" - cdef type ndarray - ndarray = __Pyx_ImportNumPyArrayTypeIfAvailable() - """) - - seen_typedefs = set() - seen_int_dtypes = set() - for buffer_type in all_buffer_types: - dtype = buffer_type.dtype - dtype_name = self._dtype_name(dtype) - if dtype.is_typedef: - if dtype_name not in seen_typedefs: - seen_typedefs.add(dtype_name) - decl_code.putln( - 'ctypedef %s %s "%s"' % (dtype.resolve(), dtype_name, - dtype.empty_declaration_code())) - - if buffer_type.dtype.is_int: - if str(dtype) not in seen_int_dtypes: - seen_int_dtypes.add(str(dtype)) - pyx_code.context.update(dtype_name=dtype_name, - dtype_type=self._dtype_type(dtype)) - pyx_code.local_variable_declarations.put_chunk( - u""" - cdef bint {{dtype_name}}_is_signed - {{dtype_name}}_is_signed = not (<{{dtype_type}}> -1 > 0) - """) - - def _split_fused_types(self, arg): - """ - Specialize fused types and split into normal types and buffer types. - """ - specialized_types = PyrexTypes.get_specialized_types(arg.type) - - # Prefer long over int, etc by sorting (see type classes in PyrexTypes.py) - specialized_types.sort() - - seen_py_type_names = set() - normal_types, buffer_types, pythran_types = [], [], [] - has_object_fallback = False - for specialized_type in specialized_types: - py_type_name = specialized_type.py_type_name() - if py_type_name: - if py_type_name in seen_py_type_names: - continue - seen_py_type_names.add(py_type_name) - if py_type_name == 'object': - has_object_fallback = True - else: - normal_types.append(specialized_type) - elif specialized_type.is_pythran_expr: - pythran_types.append(specialized_type) - elif specialized_type.is_buffer or specialized_type.is_memoryviewslice: - buffer_types.append(specialized_type) - - return normal_types, buffer_types, pythran_types, has_object_fallback - - def _unpack_argument(self, pyx_code): - pyx_code.put_chunk( - u""" - # PROCESSING ARGUMENT {{arg_tuple_idx}} - if {{arg_tuple_idx}} < len(args): - arg = (args)[{{arg_tuple_idx}}] - elif kwargs is not None and '{{arg.name}}' in kwargs: - arg = (kwargs)['{{arg.name}}'] - else: - {{if arg.default}} - arg = (defaults)[{{default_idx}}] - {{else}} - {{if arg_tuple_idx < min_positional_args}} - raise TypeError("Expected at least %d argument%s, got %d" % ( - {{min_positional_args}}, {{'"s"' if min_positional_args != 1 else '""'}}, len(args))) - {{else}} - raise TypeError("Missing keyword-only argument: '%s'" % "{{arg.default}}") - {{endif}} - {{endif}} - """) - - def make_fused_cpdef(self, orig_py_func, env, is_def): - """ - This creates the function that is indexable from Python and does - runtime dispatch based on the argument types. The function gets the - arg tuple and kwargs dict (or None) and the defaults tuple - as arguments from the Binding Fused Function's tp_call. - """ - from . import TreeFragment, Code, UtilityCode - - fused_types = self._get_fused_base_types([ - arg.type for arg in self.node.args if arg.type.is_fused]) - - context = { - 'memviewslice_cname': MemoryView.memviewslice_cname, - 'func_args': self.node.args, - 'n_fused': len(fused_types), - 'min_positional_args': - self.node.num_required_args - self.node.num_required_kw_args - if is_def else - sum(1 for arg in self.node.args if arg.default is None), - 'name': orig_py_func.entry.name, - } - - pyx_code = Code.PyxCodeWriter(context=context) - decl_code = Code.PyxCodeWriter(context=context) - decl_code.put_chunk( - u""" - cdef extern from *: - void __pyx_PyErr_Clear "PyErr_Clear" () - type __Pyx_ImportNumPyArrayTypeIfAvailable() - int __Pyx_Is_Little_Endian() - """) - decl_code.indent() - - pyx_code.put_chunk( - u""" - def __pyx_fused_cpdef(signatures, args, kwargs, defaults): - # FIXME: use a typed signature - currently fails badly because - # default arguments inherit the types we specify here! - - dest_sig = [None] * {{n_fused}} - - if kwargs is not None and not kwargs: - kwargs = None - - cdef Py_ssize_t i - - # instance check body - """) - - pyx_code.indent() # indent following code to function body - pyx_code.named_insertion_point("imports") - pyx_code.named_insertion_point("func_defs") - pyx_code.named_insertion_point("local_variable_declarations") - - fused_index = 0 - default_idx = 0 - all_buffer_types = OrderedSet() - seen_fused_types = set() - for i, arg in enumerate(self.node.args): - if arg.type.is_fused: - arg_fused_types = arg.type.get_fused_types() - if len(arg_fused_types) > 1: - raise NotImplementedError("Determination of more than one fused base " - "type per argument is not implemented.") - fused_type = arg_fused_types[0] - - if arg.type.is_fused and fused_type not in seen_fused_types: - seen_fused_types.add(fused_type) - - context.update( - arg_tuple_idx=i, - arg=arg, - dest_sig_idx=fused_index, - default_idx=default_idx, - ) - - normal_types, buffer_types, pythran_types, has_object_fallback = self._split_fused_types(arg) - self._unpack_argument(pyx_code) - - # 'unrolled' loop, first match breaks out of it - if pyx_code.indenter("while 1:"): - if normal_types: - self._fused_instance_checks(normal_types, pyx_code, env) - if buffer_types or pythran_types: - env.use_utility_code(Code.UtilityCode.load_cached("IsLittleEndian", "ModuleSetupCode.c")) - self._buffer_checks(buffer_types, pythran_types, pyx_code, decl_code, env) - if has_object_fallback: - pyx_code.context.update(specialized_type_name='object') - pyx_code.putln(self.match) - else: - pyx_code.putln(self.no_match) - pyx_code.putln("break") - pyx_code.dedent() - - fused_index += 1 - all_buffer_types.update(buffer_types) - all_buffer_types.update(ty.org_buffer for ty in pythran_types) - - if arg.default: - default_idx += 1 - - if all_buffer_types: - self._buffer_declarations(pyx_code, decl_code, all_buffer_types, pythran_types) - env.use_utility_code(Code.UtilityCode.load_cached("Import", "ImportExport.c")) - env.use_utility_code(Code.UtilityCode.load_cached("ImportNumPyArray", "ImportExport.c")) - - pyx_code.put_chunk( - u""" - candidates = [] - for sig in signatures: - match_found = False - src_sig = sig.strip('()').split('|') - for i in range(len(dest_sig)): - dst_type = dest_sig[i] - if dst_type is not None: - if src_sig[i] == dst_type: - match_found = True - else: - match_found = False - break - - if match_found: - candidates.append(sig) - - if not candidates: - raise TypeError("No matching signature found") - elif len(candidates) > 1: - raise TypeError("Function call with ambiguous argument types") - else: - return (signatures)[candidates[0]] - """) - - fragment_code = pyx_code.getvalue() - # print decl_code.getvalue() - # print fragment_code - from .Optimize import ConstantFolding - fragment = TreeFragment.TreeFragment( - fragment_code, level='module', pipeline=[ConstantFolding()]) - ast = TreeFragment.SetPosTransform(self.node.pos)(fragment.root) - UtilityCode.declare_declarations_in_scope( - decl_code.getvalue(), env.global_scope()) - ast.scope = env - # FIXME: for static methods of cdef classes, we build the wrong signature here: first arg becomes 'self' - ast.analyse_declarations(env) - py_func = ast.stats[-1] # the DefNode - self.fragment_scope = ast.scope - - if isinstance(self.node, DefNode): - py_func.specialized_cpdefs = self.nodes[:] - else: - py_func.specialized_cpdefs = [n.py_func for n in self.nodes] - - return py_func - - def update_fused_defnode_entry(self, env): - copy_attributes = ( - 'name', 'pos', 'cname', 'func_cname', 'pyfunc_cname', - 'pymethdef_cname', 'doc', 'doc_cname', 'is_member', - 'scope' - ) - - entry = self.py_func.entry - - for attr in copy_attributes: - setattr(entry, attr, - getattr(self.orig_py_func.entry, attr)) - - self.py_func.name = self.orig_py_func.name - self.py_func.doc = self.orig_py_func.doc - - env.entries.pop('__pyx_fused_cpdef', None) - if isinstance(self.node, DefNode): - env.entries[entry.name] = entry - else: - env.entries[entry.name].as_variable = entry - - env.pyfunc_entries.append(entry) - - self.py_func.entry.fused_cfunction = self - for node in self.nodes: - if isinstance(self.node, DefNode): - node.fused_py_func = self.py_func - else: - node.py_func.fused_py_func = self.py_func - node.entry.as_variable = entry - - self.synthesize_defnodes() - self.stats.append(self.__signatures__) - - def analyse_expressions(self, env): - """ - Analyse the expressions. Take care to only evaluate default arguments - once and clone the result for all specializations - """ - for fused_compound_type in self.fused_compound_types: - for fused_type in fused_compound_type.get_fused_types(): - for specialization_type in fused_type.types: - if specialization_type.is_complex: - specialization_type.create_declaration_utility_code(env) - - if self.py_func: - self.__signatures__ = self.__signatures__.analyse_expressions(env) - self.py_func = self.py_func.analyse_expressions(env) - self.resulting_fused_function = self.resulting_fused_function.analyse_expressions(env) - self.fused_func_assignment = self.fused_func_assignment.analyse_expressions(env) - - self.defaults = defaults = [] - - for arg in self.node.args: - if arg.default: - arg.default = arg.default.analyse_expressions(env) - defaults.append(ProxyNode(arg.default)) - else: - defaults.append(None) - - for i, stat in enumerate(self.stats): - stat = self.stats[i] = stat.analyse_expressions(env) - if isinstance(stat, FuncDefNode): - for arg, default in zip(stat.args, defaults): - if default is not None: - arg.default = CloneNode(default).coerce_to(arg.type, env) - - if self.py_func: - args = [CloneNode(default) for default in defaults if default] - self.defaults_tuple = TupleNode(self.pos, args=args) - self.defaults_tuple = self.defaults_tuple.analyse_types(env, skip_children=True).coerce_to_pyobject(env) - self.defaults_tuple = ProxyNode(self.defaults_tuple) - self.code_object = ProxyNode(self.specialized_pycfuncs[0].code_object) - - fused_func = self.resulting_fused_function.arg - fused_func.defaults_tuple = CloneNode(self.defaults_tuple) - fused_func.code_object = CloneNode(self.code_object) - - for i, pycfunc in enumerate(self.specialized_pycfuncs): - pycfunc.code_object = CloneNode(self.code_object) - pycfunc = self.specialized_pycfuncs[i] = pycfunc.analyse_types(env) - pycfunc.defaults_tuple = CloneNode(self.defaults_tuple) - return self - - def synthesize_defnodes(self): - """ - Create the __signatures__ dict of PyCFunctionNode specializations. - """ - if isinstance(self.nodes[0], CFuncDefNode): - nodes = [node.py_func for node in self.nodes] - else: - nodes = self.nodes - - signatures = [StringEncoding.EncodedString(node.specialized_signature_string) - for node in nodes] - keys = [ExprNodes.StringNode(node.pos, value=sig) - for node, sig in zip(nodes, signatures)] - values = [ExprNodes.PyCFunctionNode.from_defnode(node, binding=True) - for node in nodes] - - self.__signatures__ = ExprNodes.DictNode.from_pairs(self.pos, zip(keys, values)) - - self.specialized_pycfuncs = values - for pycfuncnode in values: - pycfuncnode.is_specialization = True - - def generate_function_definitions(self, env, code): - if self.py_func: - self.py_func.pymethdef_required = True - self.fused_func_assignment.generate_function_definitions(env, code) - - for stat in self.stats: - if isinstance(stat, FuncDefNode) and stat.entry.used: - code.mark_pos(stat.pos) - stat.generate_function_definitions(env, code) - - def generate_execution_code(self, code): - # Note: all def function specialization are wrapped in PyCFunction - # nodes in the self.__signatures__ dictnode. - for default in self.defaults: - if default is not None: - default.generate_evaluation_code(code) - - if self.py_func: - self.defaults_tuple.generate_evaluation_code(code) - self.code_object.generate_evaluation_code(code) - - for stat in self.stats: - code.mark_pos(stat.pos) - if isinstance(stat, ExprNodes.ExprNode): - stat.generate_evaluation_code(code) - else: - stat.generate_execution_code(code) - - if self.__signatures__: - self.resulting_fused_function.generate_evaluation_code(code) - - code.putln( - "((__pyx_FusedFunctionObject *) %s)->__signatures__ = %s;" % - (self.resulting_fused_function.result(), - self.__signatures__.result())) - code.put_giveref(self.__signatures__.result()) - self.__signatures__.generate_post_assignment_code(code) - self.__signatures__.free_temps(code) - - self.fused_func_assignment.generate_execution_code(code) - - # Dispose of results - self.resulting_fused_function.generate_disposal_code(code) - self.resulting_fused_function.free_temps(code) - self.defaults_tuple.generate_disposal_code(code) - self.defaults_tuple.free_temps(code) - self.code_object.generate_disposal_code(code) - self.code_object.free_temps(code) - - for default in self.defaults: - if default is not None: - default.generate_disposal_code(code) - default.free_temps(code) - - def annotate(self, code): - for stat in self.stats: - stat.annotate(code) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Future.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Future.py deleted file mode 100644 index 848792e00bf..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Future.py +++ /dev/null @@ -1,15 +0,0 @@ -def _get_feature(name): - import __future__ - # fall back to a unique fake object for earlier Python versions or Python 3 - return getattr(__future__, name, object()) - -unicode_literals = _get_feature("unicode_literals") -with_statement = _get_feature("with_statement") # dummy -division = _get_feature("division") -print_function = _get_feature("print_function") -absolute_import = _get_feature("absolute_import") -nested_scopes = _get_feature("nested_scopes") # dummy -generators = _get_feature("generators") # dummy -generator_stop = _get_feature("generator_stop") - -del _get_feature diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Interpreter.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Interpreter.py deleted file mode 100644 index 9ec391f2a02..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Interpreter.py +++ /dev/null @@ -1,64 +0,0 @@ -""" -This module deals with interpreting the parse tree as Python -would have done, in the compiler. - -For now this only covers parse tree to value conversion of -compile-time values. -""" - -from __future__ import absolute_import - -from .Nodes import * -from .ExprNodes import * -from .Errors import CompileError - - -class EmptyScope(object): - def lookup(self, name): - return None - -empty_scope = EmptyScope() - -def interpret_compiletime_options(optlist, optdict, type_env=None, type_args=()): - """ - Tries to interpret a list of compile time option nodes. - The result will be a tuple (optlist, optdict) but where - all expression nodes have been interpreted. The result is - in the form of tuples (value, pos). - - optlist is a list of nodes, while optdict is a DictNode (the - result optdict is a dict) - - If type_env is set, all type nodes will be analysed and the resulting - type set. Otherwise only interpretateable ExprNodes - are allowed, other nodes raises errors. - - A CompileError will be raised if there are problems. - """ - - def interpret(node, ix): - if ix in type_args: - if type_env: - type = node.analyse_as_type(type_env) - if not type: - raise CompileError(node.pos, "Invalid type.") - return (type, node.pos) - else: - raise CompileError(node.pos, "Type not allowed here.") - else: - if (sys.version_info[0] >=3 and - isinstance(node, StringNode) and - node.unicode_value is not None): - return (node.unicode_value, node.pos) - return (node.compile_time_value(empty_scope), node.pos) - - if optlist: - optlist = [interpret(x, ix) for ix, x in enumerate(optlist)] - if optdict: - assert isinstance(optdict, DictNode) - new_optdict = {} - for item in optdict.key_value_pairs: - new_key, dummy = interpret(item.key, None) - new_optdict[new_key] = interpret(item.value, item.key.value) - optdict = new_optdict - return (optlist, new_optdict) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Lexicon.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Lexicon.py deleted file mode 100644 index 72c9ceaefd5..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Lexicon.py +++ /dev/null @@ -1,138 +0,0 @@ -# cython: language_level=3, py2_import=True -# -# Cython Scanner - Lexical Definitions -# - -from __future__ import absolute_import, unicode_literals - -raw_prefixes = "rR" -bytes_prefixes = "bB" -string_prefixes = "fFuU" + bytes_prefixes -char_prefixes = "cC" -any_string_prefix = raw_prefixes + string_prefixes + char_prefixes -IDENT = 'IDENT' - - -def make_lexicon(): - from ..Plex import \ - Str, Any, AnyBut, AnyChar, Rep, Rep1, Opt, Bol, Eol, Eof, \ - TEXT, IGNORE, State, Lexicon - from .Scanning import Method - - letter = Any("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_") - digit = Any("0123456789") - bindigit = Any("01") - octdigit = Any("01234567") - hexdigit = Any("0123456789ABCDEFabcdef") - indentation = Bol + Rep(Any(" \t")) - - def underscore_digits(d): - return Rep1(d) + Rep(Str("_") + Rep1(d)) - - decimal = underscore_digits(digit) - dot = Str(".") - exponent = Any("Ee") + Opt(Any("+-")) + decimal - decimal_fract = (decimal + dot + Opt(decimal)) | (dot + decimal) - - name = letter + Rep(letter | digit) - intconst = decimal | (Str("0") + ((Any("Xx") + underscore_digits(hexdigit)) | - (Any("Oo") + underscore_digits(octdigit)) | - (Any("Bb") + underscore_digits(bindigit)) )) - intsuffix = (Opt(Any("Uu")) + Opt(Any("Ll")) + Opt(Any("Ll"))) | (Opt(Any("Ll")) + Opt(Any("Ll")) + Opt(Any("Uu"))) - intliteral = intconst + intsuffix - fltconst = (decimal_fract + Opt(exponent)) | (decimal + exponent) - imagconst = (intconst | fltconst) + Any("jJ") - - # invalid combinations of prefixes are caught in p_string_literal - beginstring = Opt(Rep(Any(string_prefixes + raw_prefixes)) | - Any(char_prefixes) - ) + (Str("'") | Str('"') | Str("'''") | Str('"""')) - two_oct = octdigit + octdigit - three_oct = octdigit + octdigit + octdigit - two_hex = hexdigit + hexdigit - four_hex = two_hex + two_hex - escapeseq = Str("\\") + (two_oct | three_oct | - Str('N{') + Rep(AnyBut('}')) + Str('}') | - Str('u') + four_hex | Str('x') + two_hex | - Str('U') + four_hex + four_hex | AnyChar) - - bra = Any("([{") - ket = Any(")]}") - punct = Any(":,;+-*/|&<>=.%`~^?!@") - diphthong = Str("==", "<>", "!=", "<=", ">=", "<<", ">>", "**", "//", - "+=", "-=", "*=", "/=", "%=", "|=", "^=", "&=", - "<<=", ">>=", "**=", "//=", "->", "@=") - spaces = Rep1(Any(" \t\f")) - escaped_newline = Str("\\\n") - lineterm = Eol + Opt(Str("\n")) - - comment = Str("#") + Rep(AnyBut("\n")) - - return Lexicon([ - (name, IDENT), - (intliteral, Method('strip_underscores', symbol='INT')), - (fltconst, Method('strip_underscores', symbol='FLOAT')), - (imagconst, Method('strip_underscores', symbol='IMAG')), - (punct | diphthong, TEXT), - - (bra, Method('open_bracket_action')), - (ket, Method('close_bracket_action')), - (lineterm, Method('newline_action')), - - (beginstring, Method('begin_string_action')), - - (comment, IGNORE), - (spaces, IGNORE), - (escaped_newline, IGNORE), - - State('INDENT', [ - (comment + lineterm, Method('commentline')), - (Opt(spaces) + Opt(comment) + lineterm, IGNORE), - (indentation, Method('indentation_action')), - (Eof, Method('eof_action')) - ]), - - State('SQ_STRING', [ - (escapeseq, 'ESCAPE'), - (Rep1(AnyBut("'\"\n\\")), 'CHARS'), - (Str('"'), 'CHARS'), - (Str("\n"), Method('unclosed_string_action')), - (Str("'"), Method('end_string_action')), - (Eof, 'EOF') - ]), - - State('DQ_STRING', [ - (escapeseq, 'ESCAPE'), - (Rep1(AnyBut('"\n\\')), 'CHARS'), - (Str("'"), 'CHARS'), - (Str("\n"), Method('unclosed_string_action')), - (Str('"'), Method('end_string_action')), - (Eof, 'EOF') - ]), - - State('TSQ_STRING', [ - (escapeseq, 'ESCAPE'), - (Rep1(AnyBut("'\"\n\\")), 'CHARS'), - (Any("'\""), 'CHARS'), - (Str("\n"), 'NEWLINE'), - (Str("'''"), Method('end_string_action')), - (Eof, 'EOF') - ]), - - State('TDQ_STRING', [ - (escapeseq, 'ESCAPE'), - (Rep1(AnyBut('"\'\n\\')), 'CHARS'), - (Any("'\""), 'CHARS'), - (Str("\n"), 'NEWLINE'), - (Str('"""'), Method('end_string_action')), - (Eof, 'EOF') - ]), - - (Eof, Method('eof_action')) - ], - - # FIXME: Plex 1.9 needs different args here from Plex 1.1.4 - #debug_flags = scanner_debug_flags, - #debug_file = scanner_dump_file - ) - diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Main.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Main.py deleted file mode 100644 index dc4add541e5..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Compiler/Main.py +++ /dev/null @@ -1,904 +0,0 @@ -# -# Cython Top Level -# - -from __future__ import absolute_import - -import os -import re -import sys -import io - -if sys.version_info[:2] < (2, 6) or (3, 0) <= sys.version_info[:2] < (3, 3): - sys.stderr.write("Sorry, Cython requires Python 2.6+ or 3.3+, found %d.%d\n" % tuple(sys.version_info[:2])) - sys.exit(1) - -try: - from __builtin__ import basestring -except ImportError: - basestring = str - -# Do not import Parsing here, import it when needed, because Parsing imports -# Nodes, which globally needs debug command line options initialized to set a -# conditional metaclass. These options are processed by CmdLine called from -# main() in this file. -# import Parsing -from . import Errors -from .StringEncoding import EncodedString -from .Scanning import PyrexScanner, FileSourceDescriptor -from .Errors import PyrexError, CompileError, error, warning -from .Symtab import ModuleScope -from .. import Utils -from . import Options - -from . import Version # legacy import needed by old PyTables versions -version = Version.version # legacy attribute - use "Cython.__version__" instead - -module_name_pattern = re.compile(r"[A-Za-z_][A-Za-z0-9_]*(\.[A-Za-z_][A-Za-z0-9_]*)*$") - -verbose = 0 - -standard_include_path = os.path.abspath(os.path.join(os.path.dirname(__file__), - os.path.pardir, 'Includes')) - -class CompilationData(object): - # Bundles the information that is passed from transform to transform. - # (For now, this is only) - - # While Context contains every pxd ever loaded, path information etc., - # this only contains the data related to a single compilation pass - # - # pyx ModuleNode Main code tree of this compilation. - # pxds {string : ModuleNode} Trees for the pxds used in the pyx. - # codewriter CCodeWriter Where to output final code. - # options CompilationOptions - # result CompilationResult - pass - - -class Context(object): - # This class encapsulates the context needed for compiling - # one or more Cython implementation files along with their - # associated and imported declaration files. It includes - # the root of the module import namespace and the list - # of directories to search for include files. - # - # modules {string : ModuleScope} - # include_directories [string] - # future_directives [object] - # language_level int currently 2 or 3 for Python 2/3 - - cython_scope = None - language_level = None # warn when not set but default to Py2 - - def __init__(self, include_directories, compiler_directives, cpp=False, - language_level=None, options=None): - # cython_scope is a hack, set to False by subclasses, in order to break - # an infinite loop. - # Better code organization would fix it. - - from . import Builtin, CythonScope - self.modules = {"__builtin__" : Builtin.builtin_scope} - self.cython_scope = CythonScope.create_cython_scope(self) - self.modules["cython"] = self.cython_scope - self.include_directories = include_directories - self.future_directives = set() - self.compiler_directives = compiler_directives - self.cpp = cpp - self.options = options - - self.pxds = {} # full name -> node tree - self._interned = {} # (type(value), value, *key_args) -> interned_value - - if language_level is not None: - self.set_language_level(language_level) - - self.gdb_debug_outputwriter = None - - def set_language_level(self, level): - from .Future import print_function, unicode_literals, absolute_import, division - future_directives = set() - if level == '3str': - level = 3 - else: - level = int(level) - if level >= 3: - future_directives.add(unicode_literals) - if level >= 3: - future_directives.update([print_function, absolute_import, division]) - self.language_level = level - self.future_directives = future_directives - if level >= 3: - self.modules['builtins'] = self.modules['__builtin__'] - - def intern_ustring(self, value, encoding=None): - key = (EncodedString, value, encoding) - try: - return self._interned[key] - except KeyError: - pass - value = EncodedString(value) - if encoding: - value.encoding = encoding - self._interned[key] = value - return value - - def intern_value(self, value, *key): - key = (type(value), value) + key - try: - return self._interned[key] - except KeyError: - pass - self._interned[key] = value - return value - - # pipeline creation functions can now be found in Pipeline.py - - def process_pxd(self, source_desc, scope, module_name): - from . import Pipeline - if isinstance(source_desc, FileSourceDescriptor) and source_desc._file_type == 'pyx': - source = CompilationSource(source_desc, module_name, os.getcwd()) - result_sink = create_default_resultobj(source, self.options) - pipeline = Pipeline.create_pyx_as_pxd_pipeline(self, result_sink) - result = Pipeline.run_pipeline(pipeline, source) - else: - pipeline = Pipeline.create_pxd_pipeline(self, scope, module_name) - result = Pipeline.run_pipeline(pipeline, source_desc) - return result - - def nonfatal_error(self, exc): - return Errors.report_error(exc) - - def find_module(self, module_name, relative_to=None, pos=None, need_pxd=1, - absolute_fallback=True): - # Finds and returns the module scope corresponding to - # the given relative or absolute module name. If this - # is the first time the module has been requested, finds - # the corresponding .pxd file and process it. - # If relative_to is not None, it must be a module scope, - # and the module will first be searched for relative to - # that module, provided its name is not a dotted name. - debug_find_module = 0 - if debug_find_module: - print("Context.find_module: module_name = %s, relative_to = %s, pos = %s, need_pxd = %s" % ( - module_name, relative_to, pos, need_pxd)) - - scope = None - pxd_pathname = None - if relative_to: - if module_name: - # from .module import ... - qualified_name = relative_to.qualify_name(module_name) - else: - # from . import ... - qualified_name = relative_to.qualified_name - scope = relative_to - relative_to = None - else: - qualified_name = module_name - - if not module_name_pattern.match(qualified_name): - raise CompileError(pos or (module_name, 0, 0), - "'%s' is not a valid module name" % module_name) - - if relative_to: - if debug_find_module: - print("...trying relative import") - scope = relative_to.lookup_submodule(module_name) - if not scope: - pxd_pathname = self.find_pxd_file(qualified_name, pos) - if pxd_pathname: - scope = relative_to.find_submodule(module_name) - if not scope: - if debug_find_module: - print("...trying absolute import") - if absolute_fallback: - qualified_name = module_name - scope = self - for name in qualified_name.split("."): - scope = scope.find_submodule(name) - - if debug_find_module: - print("...scope = %s" % scope) - if not scope.pxd_file_loaded: - if debug_find_module: - print("...pxd not loaded") - if not pxd_pathname: - if debug_find_module: - print("...looking for pxd file") - # Only look in sys.path if we are explicitly looking - # for a .pxd file. - pxd_pathname = self.find_pxd_file(qualified_name, pos, sys_path=need_pxd) - if debug_find_module: - print("......found %s" % pxd_pathname) - if not pxd_pathname and need_pxd: - # Set pxd_file_loaded such that we don't need to - # look for the non-existing pxd file next time. - scope.pxd_file_loaded = True - package_pathname = self.search_include_directories(qualified_name, ".py", pos) - if package_pathname and package_pathname.endswith('__init__.py'): - pass - else: - error(pos, "'%s.pxd' not found" % qualified_name.replace('.', os.sep)) - if pxd_pathname: - scope.pxd_file_loaded = True - try: - if debug_find_module: - print("Context.find_module: Parsing %s" % pxd_pathname) - rel_path = module_name.replace('.', os.sep) + os.path.splitext(pxd_pathname)[1] - if not pxd_pathname.endswith(rel_path): - rel_path = pxd_pathname # safety measure to prevent printing incorrect paths - source_desc = FileSourceDescriptor(pxd_pathname, rel_path) - err, result = self.process_pxd(source_desc, scope, qualified_name) - if err: - raise err - (pxd_codenodes, pxd_scope) = result - self.pxds[module_name] = (pxd_codenodes, pxd_scope) - except CompileError: - pass - return scope - - def find_pxd_file(self, qualified_name, pos, sys_path=True): - # Search include path (and sys.path if sys_path is True) for - # the .pxd file corresponding to the given fully-qualified - # module name. - # Will find either a dotted filename or a file in a - # package directory. If a source file position is given, - # the directory containing the source file is searched first - # for a dotted filename, and its containing package root - # directory is searched first for a non-dotted filename. - pxd = self.search_include_directories(qualified_name, ".pxd", pos, sys_path=sys_path) - if pxd is None: # XXX Keep this until Includes/Deprecated is removed - if (qualified_name.startswith('python') or - qualified_name in ('stdlib', 'stdio', 'stl')): - standard_include_path = os.path.abspath(os.path.normpath( - os.path.join(os.path.dirname(__file__), os.path.pardir, 'Includes'))) - deprecated_include_path = os.path.join(standard_include_path, 'Deprecated') - self.include_directories.append(deprecated_include_path) - try: - pxd = self.search_include_directories(qualified_name, ".pxd", pos) - finally: - self.include_directories.pop() - if pxd: - name = qualified_name - if name.startswith('python'): - warning(pos, "'%s' is deprecated, use 'cpython'" % name, 1) - elif name in ('stdlib', 'stdio'): - warning(pos, "'%s' is deprecated, use 'libc.%s'" % (name, name), 1) - elif name in ('stl'): - warning(pos, "'%s' is deprecated, use 'libcpp.*.*'" % name, 1) - if pxd is None and Options.cimport_from_pyx: - return self.find_pyx_file(qualified_name, pos) - return pxd - - def find_pyx_file(self, qualified_name, pos): - # Search include path for the .pyx file corresponding to the - # given fully-qualified module name, as for find_pxd_file(). - return self.search_include_directories(qualified_name, ".pyx", pos) - - def find_include_file(self, filename, pos): - # Search list of include directories for filename. - # Reports an error and returns None if not found. - path = self.search_include_directories(filename, "", pos, - include=True) - if not path: - error(pos, "'%s' not found" % filename) - return path - - def search_include_directories(self, qualified_name, suffix, pos, - include=False, sys_path=False): - include_dirs = self.include_directories - if sys_path: - include_dirs = include_dirs + sys.path - # include_dirs must be hashable for caching in @cached_function - include_dirs = tuple(include_dirs + [standard_include_path]) - return search_include_directories(include_dirs, qualified_name, - suffix, pos, include) - - def find_root_package_dir(self, file_path): - return Utils.find_root_package_dir(file_path) - - def check_package_dir(self, dir, package_names): - return Utils.check_package_dir(dir, tuple(package_names)) - - def c_file_out_of_date(self, source_path, output_path): - if not os.path.exists(output_path): - return 1 - c_time = Utils.modification_time(output_path) - if Utils.file_newer_than(source_path, c_time): - return 1 - pos = [source_path] - pxd_path = Utils.replace_suffix(source_path, ".pxd") - if os.path.exists(pxd_path) and Utils.file_newer_than(pxd_path, c_time): - return 1 - for kind, name in self.read_dependency_file(source_path): - if kind == "cimport": - dep_path = self.find_pxd_file(name, pos) - elif kind == "include": - dep_path = self.search_include_directories(name, pos) - else: - continue - if dep_path and Utils.file_newer_than(dep_path, c_time): - return 1 - return 0 - - def find_cimported_module_names(self, source_path): - return [ name for kind, name in self.read_dependency_file(source_path) - if kind == "cimport" ] - - def is_package_dir(self, dir_path): - return Utils.is_package_dir(dir_path) - - def read_dependency_file(self, source_path): - dep_path = Utils.replace_suffix(source_path, ".dep") - if os.path.exists(dep_path): - f = open(dep_path, "rU") - chunks = [ line.strip().split(" ", 1) - for line in f.readlines() - if " " in line.strip() ] - f.close() - return chunks - else: - return () - - def lookup_submodule(self, name): - # Look up a top-level module. Returns None if not found. - return self.modules.get(name, None) - - def find_submodule(self, name): - # Find a top-level module, creating a new one if needed. - scope = self.lookup_submodule(name) - if not scope: - scope = ModuleScope(name, - parent_module = None, context = self) - self.modules[name] = scope - return scope - - def parse(self, source_desc, scope, pxd, full_module_name): - if not isinstance(source_desc, FileSourceDescriptor): - raise RuntimeError("Only file sources for code supported") - source_filename = source_desc.filename - scope.cpp = self.cpp - # Parse the given source file and return a parse tree. - num_errors = Errors.num_errors - try: - with Utils.open_source_file(source_filename) as f: - from . import Parsing - s = PyrexScanner(f, source_desc, source_encoding = f.encoding, - scope = scope, context = self) - tree = Parsing.p_module(s, pxd, full_module_name) - if self.options.formal_grammar: - try: - from ..Parser import ConcreteSyntaxTree - except ImportError: - raise RuntimeError( - "Formal grammar can only be used with compiled Cython with an available pgen.") - ConcreteSyntaxTree.p_module(source_filename) - except UnicodeDecodeError as e: - #import traceback - #traceback.print_exc() - raise self._report_decode_error(source_desc, e) - - if Errors.num_errors > num_errors: - raise CompileError() - return tree - - def _report_decode_error(self, source_desc, exc): - msg = exc.args[-1] - position = exc.args[2] - encoding = exc.args[0] - - line = 1 - column = idx = 0 - with io.open(source_desc.filename, "r", encoding='iso8859-1', newline='') as f: - for line, data in enumerate(f, 1): - idx += len(data) - if idx >= position: - column = position - (idx - len(data)) + 1 - break - - return error((source_desc, line, column), - "Decoding error, missing or incorrect coding= " - "at top of source (cannot decode with encoding %r: %s)" % (encoding, msg)) - - def extract_module_name(self, path, options): - # Find fully_qualified module name from the full pathname - # of a source file. - dir, filename = os.path.split(path) - module_name, _ = os.path.splitext(filename) - if "." in module_name: - return module_name - names = [module_name] - while self.is_package_dir(dir): - parent, package_name = os.path.split(dir) - if parent == dir: - break - names.append(package_name) - dir = parent - names.reverse() - return ".".join(names) - - def setup_errors(self, options, result): - Errors.reset() # clear any remaining error state - if options.use_listing_file: - path = result.listing_file = Utils.replace_suffix(result.main_source_file, ".lis") - else: - path = None - Errors.open_listing_file(path=path, - echo_to_stderr=options.errors_to_stderr) - - def teardown_errors(self, err, options, result): - source_desc = result.compilation_source.source_desc - if not isinstance(source_desc, FileSourceDescriptor): - raise RuntimeError("Only file sources for code supported") - Errors.close_listing_file() - result.num_errors = Errors.num_errors - if result.num_errors > 0: - err = True - if err and result.c_file: - try: - Utils.castrate_file(result.c_file, os.stat(source_desc.filename)) - except EnvironmentError: - pass - result.c_file = None - - -def get_output_filename(source_filename, cwd, options): - if options.cplus: - c_suffix = ".cpp" - else: - c_suffix = ".c" - suggested_file_name = Utils.replace_suffix(source_filename, c_suffix) - if options.output_file: - out_path = os.path.join(cwd, options.output_file) - if os.path.isdir(out_path): - return os.path.join(out_path, os.path.basename(suggested_file_name)) - else: - return out_path - else: - return suggested_file_name - - -def create_default_resultobj(compilation_source, options): - result = CompilationResult() - result.main_source_file = compilation_source.source_desc.filename - result.compilation_source = compilation_source - source_desc = compilation_source.source_desc - result.c_file = get_output_filename(source_desc.filename, - compilation_source.cwd, options) - result.embedded_metadata = options.embedded_metadata - return result - - -def run_pipeline(source, options, full_module_name=None, context=None): - from . import Pipeline - - source_ext = os.path.splitext(source)[1] - options.configure_language_defaults(source_ext[1:]) # py/pyx - if context is None: - context = options.create_context() - - # Set up source object - cwd = os.getcwd() - abs_path = os.path.abspath(source) - full_module_name = full_module_name or context.extract_module_name(source, options) - - Utils.raise_error_if_module_name_forbidden(full_module_name) - - if options.relative_path_in_code_position_comments: - rel_path = full_module_name.replace('.', os.sep) + source_ext - if not abs_path.endswith(rel_path): - rel_path = source # safety measure to prevent printing incorrect paths - else: - rel_path = abs_path - source_desc = FileSourceDescriptor(abs_path, rel_path) - source = CompilationSource(source_desc, full_module_name, cwd) - - # Set up result object - result = create_default_resultobj(source, options) - - if options.annotate is None: - # By default, decide based on whether an html file already exists. - html_filename = os.path.splitext(result.c_file)[0] + ".html" - if os.path.exists(html_filename): - with io.open(html_filename, "r", encoding="UTF-8") as html_file: - if u' State %d\n" % (key, state['number'])) - for key in ('bol', 'eol', 'eof', 'else'): - state = special_to_state.get(key, None) - if state: - file.write(" %s --> State %d\n" % (key, state['number'])) - - def chars_to_ranges(self, char_list): - char_list.sort() - i = 0 - n = len(char_list) - result = [] - while i < n: - c1 = ord(char_list[i]) - c2 = c1 - i += 1 - while i < n and ord(char_list[i]) == c2 + 1: - i += 1 - c2 += 1 - result.append((chr(c1), chr(c2))) - return tuple(result) - - def ranges_to_string(self, range_list): - return ','.join(map(self.range_to_string, range_list)) - - def range_to_string(self, range_tuple): - (c1, c2) = range_tuple - if c1 == c2: - return repr(c1) - else: - return "%s..%s" % (repr(c1), repr(c2)) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Regexps.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Regexps.py deleted file mode 100644 index 41816c939ac..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Regexps.py +++ /dev/null @@ -1,576 +0,0 @@ -#======================================================================= -# -# Python Lexical Analyser -# -# Regular Expressions -# -#======================================================================= - -from __future__ import absolute_import - -import types -try: - from sys import maxsize as maxint -except ImportError: - from sys import maxint - -from . import Errors - -# -# Constants -# - -BOL = 'bol' -EOL = 'eol' -EOF = 'eof' - -nl_code = ord('\n') - - -# -# Helper functions -# - -def chars_to_ranges(s): - """ - Return a list of character codes consisting of pairs - [code1a, code1b, code2a, code2b,...] which cover all - the characters in |s|. - """ - char_list = list(s) - char_list.sort() - i = 0 - n = len(char_list) - result = [] - while i < n: - code1 = ord(char_list[i]) - code2 = code1 + 1 - i += 1 - while i < n and code2 >= ord(char_list[i]): - code2 += 1 - i += 1 - result.append(code1) - result.append(code2) - return result - - -def uppercase_range(code1, code2): - """ - If the range of characters from code1 to code2-1 includes any - lower case letters, return the corresponding upper case range. - """ - code3 = max(code1, ord('a')) - code4 = min(code2, ord('z') + 1) - if code3 < code4: - d = ord('A') - ord('a') - return (code3 + d, code4 + d) - else: - return None - - -def lowercase_range(code1, code2): - """ - If the range of characters from code1 to code2-1 includes any - upper case letters, return the corresponding lower case range. - """ - code3 = max(code1, ord('A')) - code4 = min(code2, ord('Z') + 1) - if code3 < code4: - d = ord('a') - ord('A') - return (code3 + d, code4 + d) - else: - return None - - -def CodeRanges(code_list): - """ - Given a list of codes as returned by chars_to_ranges, return - an RE which will match a character in any of the ranges. - """ - re_list = [CodeRange(code_list[i], code_list[i + 1]) for i in range(0, len(code_list), 2)] - return Alt(*re_list) - - -def CodeRange(code1, code2): - """ - CodeRange(code1, code2) is an RE which matches any character - with a code |c| in the range |code1| <= |c| < |code2|. - """ - if code1 <= nl_code < code2: - return Alt(RawCodeRange(code1, nl_code), - RawNewline, - RawCodeRange(nl_code + 1, code2)) - else: - return RawCodeRange(code1, code2) - - -# -# Abstract classes -# - -class RE(object): - """RE is the base class for regular expression constructors. - The following operators are defined on REs: - - re1 + re2 is an RE which matches |re1| followed by |re2| - re1 | re2 is an RE which matches either |re1| or |re2| - """ - - nullable = 1 # True if this RE can match 0 input symbols - match_nl = 1 # True if this RE can match a string ending with '\n' - str = None # Set to a string to override the class's __str__ result - - def build_machine(self, machine, initial_state, final_state, - match_bol, nocase): - """ - This method should add states to |machine| to implement this - RE, starting at |initial_state| and ending at |final_state|. - If |match_bol| is true, the RE must be able to match at the - beginning of a line. If nocase is true, upper and lower case - letters should be treated as equivalent. - """ - raise NotImplementedError("%s.build_machine not implemented" % - self.__class__.__name__) - - def build_opt(self, m, initial_state, c): - """ - Given a state |s| of machine |m|, return a new state - reachable from |s| on character |c| or epsilon. - """ - s = m.new_state() - initial_state.link_to(s) - initial_state.add_transition(c, s) - return s - - def __add__(self, other): - return Seq(self, other) - - def __or__(self, other): - return Alt(self, other) - - def __str__(self): - if self.str: - return self.str - else: - return self.calc_str() - - def check_re(self, num, value): - if not isinstance(value, RE): - self.wrong_type(num, value, "Plex.RE instance") - - def check_string(self, num, value): - if type(value) != type(''): - self.wrong_type(num, value, "string") - - def check_char(self, num, value): - self.check_string(num, value) - if len(value) != 1: - raise Errors.PlexValueError("Invalid value for argument %d of Plex.%s." - "Expected a string of length 1, got: %s" % ( - num, self.__class__.__name__, repr(value))) - - def wrong_type(self, num, value, expected): - if type(value) == types.InstanceType: - got = "%s.%s instance" % ( - value.__class__.__module__, value.__class__.__name__) - else: - got = type(value).__name__ - raise Errors.PlexTypeError("Invalid type for argument %d of Plex.%s " - "(expected %s, got %s" % ( - num, self.__class__.__name__, expected, got)) - -# -# Primitive RE constructors -# ------------------------- -# -# These are the basic REs from which all others are built. -# - -## class Char(RE): -## """ -## Char(c) is an RE which matches the character |c|. -## """ - -## nullable = 0 - -## def __init__(self, char): -## self.char = char -## self.match_nl = char == '\n' - -## def build_machine(self, m, initial_state, final_state, match_bol, nocase): -## c = self.char -## if match_bol and c != BOL: -## s1 = self.build_opt(m, initial_state, BOL) -## else: -## s1 = initial_state -## if c == '\n' or c == EOF: -## s1 = self.build_opt(m, s1, EOL) -## if len(c) == 1: -## code = ord(self.char) -## s1.add_transition((code, code+1), final_state) -## if nocase and is_letter_code(code): -## code2 = other_case_code(code) -## s1.add_transition((code2, code2+1), final_state) -## else: -## s1.add_transition(c, final_state) - -## def calc_str(self): -## return "Char(%s)" % repr(self.char) - - -def Char(c): - """ - Char(c) is an RE which matches the character |c|. - """ - if len(c) == 1: - result = CodeRange(ord(c), ord(c) + 1) - else: - result = SpecialSymbol(c) - result.str = "Char(%s)" % repr(c) - return result - - -class RawCodeRange(RE): - """ - RawCodeRange(code1, code2) is a low-level RE which matches any character - with a code |c| in the range |code1| <= |c| < |code2|, where the range - does not include newline. For internal use only. - """ - nullable = 0 - match_nl = 0 - range = None # (code, code) - uppercase_range = None # (code, code) or None - lowercase_range = None # (code, code) or None - - def __init__(self, code1, code2): - self.range = (code1, code2) - self.uppercase_range = uppercase_range(code1, code2) - self.lowercase_range = lowercase_range(code1, code2) - - def build_machine(self, m, initial_state, final_state, match_bol, nocase): - if match_bol: - initial_state = self.build_opt(m, initial_state, BOL) - initial_state.add_transition(self.range, final_state) - if nocase: - if self.uppercase_range: - initial_state.add_transition(self.uppercase_range, final_state) - if self.lowercase_range: - initial_state.add_transition(self.lowercase_range, final_state) - - def calc_str(self): - return "CodeRange(%d,%d)" % (self.code1, self.code2) - - -class _RawNewline(RE): - """ - RawNewline is a low-level RE which matches a newline character. - For internal use only. - """ - nullable = 0 - match_nl = 1 - - def build_machine(self, m, initial_state, final_state, match_bol, nocase): - if match_bol: - initial_state = self.build_opt(m, initial_state, BOL) - s = self.build_opt(m, initial_state, EOL) - s.add_transition((nl_code, nl_code + 1), final_state) - - -RawNewline = _RawNewline() - - -class SpecialSymbol(RE): - """ - SpecialSymbol(sym) is an RE which matches the special input - symbol |sym|, which is one of BOL, EOL or EOF. - """ - nullable = 0 - match_nl = 0 - sym = None - - def __init__(self, sym): - self.sym = sym - - def build_machine(self, m, initial_state, final_state, match_bol, nocase): - # Sequences 'bol bol' and 'bol eof' are impossible, so only need - # to allow for bol if sym is eol - if match_bol and self.sym == EOL: - initial_state = self.build_opt(m, initial_state, BOL) - initial_state.add_transition(self.sym, final_state) - - -class Seq(RE): - """Seq(re1, re2, re3...) is an RE which matches |re1| followed by - |re2| followed by |re3|...""" - - def __init__(self, *re_list): - nullable = 1 - for i, re in enumerate(re_list): - self.check_re(i, re) - nullable = nullable and re.nullable - self.re_list = re_list - self.nullable = nullable - i = len(re_list) - match_nl = 0 - while i: - i -= 1 - re = re_list[i] - if re.match_nl: - match_nl = 1 - break - if not re.nullable: - break - self.match_nl = match_nl - - def build_machine(self, m, initial_state, final_state, match_bol, nocase): - re_list = self.re_list - if len(re_list) == 0: - initial_state.link_to(final_state) - else: - s1 = initial_state - n = len(re_list) - for i, re in enumerate(re_list): - if i < n - 1: - s2 = m.new_state() - else: - s2 = final_state - re.build_machine(m, s1, s2, match_bol, nocase) - s1 = s2 - match_bol = re.match_nl or (match_bol and re.nullable) - - def calc_str(self): - return "Seq(%s)" % ','.join(map(str, self.re_list)) - - -class Alt(RE): - """Alt(re1, re2, re3...) is an RE which matches either |re1| or - |re2| or |re3|...""" - - def __init__(self, *re_list): - self.re_list = re_list - nullable = 0 - match_nl = 0 - nullable_res = [] - non_nullable_res = [] - i = 1 - for re in re_list: - self.check_re(i, re) - if re.nullable: - nullable_res.append(re) - nullable = 1 - else: - non_nullable_res.append(re) - if re.match_nl: - match_nl = 1 - i += 1 - self.nullable_res = nullable_res - self.non_nullable_res = non_nullable_res - self.nullable = nullable - self.match_nl = match_nl - - def build_machine(self, m, initial_state, final_state, match_bol, nocase): - for re in self.nullable_res: - re.build_machine(m, initial_state, final_state, match_bol, nocase) - if self.non_nullable_res: - if match_bol: - initial_state = self.build_opt(m, initial_state, BOL) - for re in self.non_nullable_res: - re.build_machine(m, initial_state, final_state, 0, nocase) - - def calc_str(self): - return "Alt(%s)" % ','.join(map(str, self.re_list)) - - -class Rep1(RE): - """Rep1(re) is an RE which matches one or more repetitions of |re|.""" - - def __init__(self, re): - self.check_re(1, re) - self.re = re - self.nullable = re.nullable - self.match_nl = re.match_nl - - def build_machine(self, m, initial_state, final_state, match_bol, nocase): - s1 = m.new_state() - s2 = m.new_state() - initial_state.link_to(s1) - self.re.build_machine(m, s1, s2, match_bol or self.re.match_nl, nocase) - s2.link_to(s1) - s2.link_to(final_state) - - def calc_str(self): - return "Rep1(%s)" % self.re - - -class SwitchCase(RE): - """ - SwitchCase(re, nocase) is an RE which matches the same strings as RE, - but treating upper and lower case letters according to |nocase|. If - |nocase| is true, case is ignored, otherwise it is not. - """ - re = None - nocase = None - - def __init__(self, re, nocase): - self.re = re - self.nocase = nocase - self.nullable = re.nullable - self.match_nl = re.match_nl - - def build_machine(self, m, initial_state, final_state, match_bol, nocase): - self.re.build_machine(m, initial_state, final_state, match_bol, - self.nocase) - - def calc_str(self): - if self.nocase: - name = "NoCase" - else: - name = "Case" - return "%s(%s)" % (name, self.re) - -# -# Composite RE constructors -# ------------------------- -# -# These REs are defined in terms of the primitive REs. -# - -Empty = Seq() -Empty.__doc__ = \ - """ - Empty is an RE which matches the empty string. - """ -Empty.str = "Empty" - - -def Str1(s): - """ - Str1(s) is an RE which matches the literal string |s|. - """ - result = Seq(*tuple(map(Char, s))) - result.str = "Str(%s)" % repr(s) - return result - - -def Str(*strs): - """ - Str(s) is an RE which matches the literal string |s|. - Str(s1, s2, s3, ...) is an RE which matches any of |s1| or |s2| or |s3|... - """ - if len(strs) == 1: - return Str1(strs[0]) - else: - result = Alt(*tuple(map(Str1, strs))) - result.str = "Str(%s)" % ','.join(map(repr, strs)) - return result - - -def Any(s): - """ - Any(s) is an RE which matches any character in the string |s|. - """ - #result = apply(Alt, tuple(map(Char, s))) - result = CodeRanges(chars_to_ranges(s)) - result.str = "Any(%s)" % repr(s) - return result - - -def AnyBut(s): - """ - AnyBut(s) is an RE which matches any character (including - newline) which is not in the string |s|. - """ - ranges = chars_to_ranges(s) - ranges.insert(0, -maxint) - ranges.append(maxint) - result = CodeRanges(ranges) - result.str = "AnyBut(%s)" % repr(s) - return result - - -AnyChar = AnyBut("") -AnyChar.__doc__ = \ - """ - AnyChar is an RE which matches any single character (including a newline). - """ -AnyChar.str = "AnyChar" - - -def Range(s1, s2=None): - """ - Range(c1, c2) is an RE which matches any single character in the range - |c1| to |c2| inclusive. - Range(s) where |s| is a string of even length is an RE which matches - any single character in the ranges |s[0]| to |s[1]|, |s[2]| to |s[3]|,... - """ - if s2: - result = CodeRange(ord(s1), ord(s2) + 1) - result.str = "Range(%s,%s)" % (s1, s2) - else: - ranges = [] - for i in range(0, len(s1), 2): - ranges.append(CodeRange(ord(s1[i]), ord(s1[i + 1]) + 1)) - result = Alt(*ranges) - result.str = "Range(%s)" % repr(s1) - return result - - -def Opt(re): - """ - Opt(re) is an RE which matches either |re| or the empty string. - """ - result = Alt(re, Empty) - result.str = "Opt(%s)" % re - return result - - -def Rep(re): - """ - Rep(re) is an RE which matches zero or more repetitions of |re|. - """ - result = Opt(Rep1(re)) - result.str = "Rep(%s)" % re - return result - - -def NoCase(re): - """ - NoCase(re) is an RE which matches the same strings as RE, but treating - upper and lower case letters as equivalent. - """ - return SwitchCase(re, nocase=1) - - -def Case(re): - """ - Case(re) is an RE which matches the same strings as RE, but treating - upper and lower case letters as distinct, i.e. it cancels the effect - of any enclosing NoCase(). - """ - return SwitchCase(re, nocase=0) - -# -# RE Constants -# - -Bol = Char(BOL) -Bol.__doc__ = \ - """ - Bol is an RE which matches the beginning of a line. - """ -Bol.str = "Bol" - -Eol = Char(EOL) -Eol.__doc__ = \ - """ - Eol is an RE which matches the end of a line. - """ -Eol.str = "Eol" - -Eof = Char(EOF) -Eof.__doc__ = \ - """ - Eof is an RE which matches the end of the file. - """ -Eof.str = "Eof" - diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Scanners.pxd b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Scanners.pxd deleted file mode 100644 index 6e75f55e619..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Scanners.pxd +++ /dev/null @@ -1,50 +0,0 @@ -from __future__ import absolute_import - -import cython - -from Cython.Plex.Actions cimport Action - -cdef class Scanner: - - cdef public lexicon - cdef public stream - cdef public name - cdef public unicode buffer - cdef public Py_ssize_t buf_start_pos - cdef public Py_ssize_t next_pos - cdef public Py_ssize_t cur_pos - cdef public Py_ssize_t cur_line - cdef public Py_ssize_t cur_line_start - cdef public Py_ssize_t start_pos - cdef public Py_ssize_t start_line - cdef public Py_ssize_t start_col - cdef public text - cdef public initial_state # int? - cdef public state_name - cdef public list queue - cdef public bint trace - cdef public cur_char - cdef public long input_state - - cdef public level - - @cython.final - @cython.locals(input_state=long) - cdef next_char(self) - @cython.locals(action=Action) - cpdef tuple read(self) - @cython.final - cdef tuple scan_a_token(self) - ##cdef tuple position(self) # used frequently by Parsing.py - - @cython.final - @cython.locals(cur_pos=Py_ssize_t, cur_line=Py_ssize_t, cur_line_start=Py_ssize_t, - input_state=long, next_pos=Py_ssize_t, state=dict, - buf_start_pos=Py_ssize_t, buf_len=Py_ssize_t, buf_index=Py_ssize_t, - trace=bint, discard=Py_ssize_t, data=unicode, buffer=unicode) - cdef run_machine_inlined(self) - - @cython.final - cdef begin(self, state) - @cython.final - cdef produce(self, value, text = *) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Scanners.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Scanners.py deleted file mode 100644 index 88f7e2da3ba..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Scanners.py +++ /dev/null @@ -1,338 +0,0 @@ -# cython: auto_pickle=False -#======================================================================= -# -# Python Lexical Analyser -# -# -# Scanning an input stream -# -#======================================================================= - -from __future__ import absolute_import - -import cython - -cython.declare(BOL=object, EOL=object, EOF=object, NOT_FOUND=object) - -from . import Errors -from .Regexps import BOL, EOL, EOF - -NOT_FOUND = object() - - -class Scanner(object): - """ - A Scanner is used to read tokens from a stream of characters - using the token set specified by a Plex.Lexicon. - - Constructor: - - Scanner(lexicon, stream, name = '') - - See the docstring of the __init__ method for details. - - Methods: - - See the docstrings of the individual methods for more - information. - - read() --> (value, text) - Reads the next lexical token from the stream. - - position() --> (name, line, col) - Returns the position of the last token read using the - read() method. - - begin(state_name) - Causes scanner to change state. - - produce(value [, text]) - Causes return of a token value to the caller of the - Scanner. - - """ - - # lexicon = None # Lexicon - # stream = None # file-like object - # name = '' - # buffer = '' - # buf_start_pos = 0 # position in input of start of buffer - # next_pos = 0 # position in input of next char to read - # cur_pos = 0 # position in input of current char - # cur_line = 1 # line number of current char - # cur_line_start = 0 # position in input of start of current line - # start_pos = 0 # position in input of start of token - # start_line = 0 # line number of start of token - # start_col = 0 # position in line of start of token - # text = None # text of last token read - # initial_state = None # Node - # state_name = '' # Name of initial state - # queue = None # list of tokens to be returned - # trace = 0 - - def __init__(self, lexicon, stream, name='', initial_pos=None): - """ - Scanner(lexicon, stream, name = '') - - |lexicon| is a Plex.Lexicon instance specifying the lexical tokens - to be recognised. - - |stream| can be a file object or anything which implements a - compatible read() method. - - |name| is optional, and may be the name of the file being - scanned or any other identifying string. - """ - self.trace = 0 - - self.buffer = u'' - self.buf_start_pos = 0 - self.next_pos = 0 - self.cur_pos = 0 - self.cur_line = 1 - self.start_pos = 0 - self.start_line = 0 - self.start_col = 0 - self.text = None - self.state_name = None - - self.lexicon = lexicon - self.stream = stream - self.name = name - self.queue = [] - self.initial_state = None - self.begin('') - self.next_pos = 0 - self.cur_pos = 0 - self.cur_line_start = 0 - self.cur_char = BOL - self.input_state = 1 - if initial_pos is not None: - self.cur_line, self.cur_line_start = initial_pos[1], -initial_pos[2] - - def read(self): - """ - Read the next lexical token from the stream and return a - tuple (value, text), where |value| is the value associated with - the token as specified by the Lexicon, and |text| is the actual - string read from the stream. Returns (None, '') on end of file. - """ - queue = self.queue - while not queue: - self.text, action = self.scan_a_token() - if action is None: - self.produce(None) - self.eof() - else: - value = action.perform(self, self.text) - if value is not None: - self.produce(value) - result = queue[0] - del queue[0] - return result - - def scan_a_token(self): - """ - Read the next input sequence recognised by the machine - and return (text, action). Returns ('', None) on end of - file. - """ - self.start_pos = self.cur_pos - self.start_line = self.cur_line - self.start_col = self.cur_pos - self.cur_line_start - action = self.run_machine_inlined() - if action is not None: - if self.trace: - print("Scanner: read: Performing %s %d:%d" % ( - action, self.start_pos, self.cur_pos)) - text = self.buffer[ - self.start_pos - self.buf_start_pos: - self.cur_pos - self.buf_start_pos] - return (text, action) - else: - if self.cur_pos == self.start_pos: - if self.cur_char is EOL: - self.next_char() - if self.cur_char is None or self.cur_char is EOF: - return (u'', None) - raise Errors.UnrecognizedInput(self, self.state_name) - - def run_machine_inlined(self): - """ - Inlined version of run_machine for speed. - """ - state = self.initial_state - cur_pos = self.cur_pos - cur_line = self.cur_line - cur_line_start = self.cur_line_start - cur_char = self.cur_char - input_state = self.input_state - next_pos = self.next_pos - buffer = self.buffer - buf_start_pos = self.buf_start_pos - buf_len = len(buffer) - b_action, b_cur_pos, b_cur_line, b_cur_line_start, b_cur_char, b_input_state, b_next_pos = \ - None, 0, 0, 0, u'', 0, 0 - trace = self.trace - while 1: - if trace: #TRACE# - print("State %d, %d/%d:%s -->" % ( #TRACE# - state['number'], input_state, cur_pos, repr(cur_char))) #TRACE# - # Begin inlined self.save_for_backup() - #action = state.action #@slow - action = state['action'] #@fast - if action is not None: - b_action, b_cur_pos, b_cur_line, b_cur_line_start, b_cur_char, b_input_state, b_next_pos = \ - action, cur_pos, cur_line, cur_line_start, cur_char, input_state, next_pos - # End inlined self.save_for_backup() - c = cur_char - #new_state = state.new_state(c) #@slow - new_state = state.get(c, NOT_FOUND) #@fast - if new_state is NOT_FOUND: #@fast - new_state = c and state.get('else') #@fast - if new_state: - if trace: #TRACE# - print("State %d" % new_state['number']) #TRACE# - state = new_state - # Begin inlined: self.next_char() - if input_state == 1: - cur_pos = next_pos - # Begin inlined: c = self.read_char() - buf_index = next_pos - buf_start_pos - if buf_index < buf_len: - c = buffer[buf_index] - next_pos += 1 - else: - discard = self.start_pos - buf_start_pos - data = self.stream.read(0x1000) - buffer = self.buffer[discard:] + data - self.buffer = buffer - buf_start_pos += discard - self.buf_start_pos = buf_start_pos - buf_len = len(buffer) - buf_index -= discard - if data: - c = buffer[buf_index] - next_pos += 1 - else: - c = u'' - # End inlined: c = self.read_char() - if c == u'\n': - cur_char = EOL - input_state = 2 - elif not c: - cur_char = EOL - input_state = 4 - else: - cur_char = c - elif input_state == 2: - cur_char = u'\n' - input_state = 3 - elif input_state == 3: - cur_line += 1 - cur_line_start = cur_pos = next_pos - cur_char = BOL - input_state = 1 - elif input_state == 4: - cur_char = EOF - input_state = 5 - else: # input_state = 5 - cur_char = u'' - # End inlined self.next_char() - else: # not new_state - if trace: #TRACE# - print("blocked") #TRACE# - # Begin inlined: action = self.back_up() - if b_action is not None: - (action, cur_pos, cur_line, cur_line_start, - cur_char, input_state, next_pos) = \ - (b_action, b_cur_pos, b_cur_line, b_cur_line_start, - b_cur_char, b_input_state, b_next_pos) - else: - action = None - break # while 1 - # End inlined: action = self.back_up() - self.cur_pos = cur_pos - self.cur_line = cur_line - self.cur_line_start = cur_line_start - self.cur_char = cur_char - self.input_state = input_state - self.next_pos = next_pos - if trace: #TRACE# - if action is not None: #TRACE# - print("Doing %s" % action) #TRACE# - return action - - def next_char(self): - input_state = self.input_state - if self.trace: - print("Scanner: next: %s [%d] %d" % (" " * 20, input_state, self.cur_pos)) - if input_state == 1: - self.cur_pos = self.next_pos - c = self.read_char() - if c == u'\n': - self.cur_char = EOL - self.input_state = 2 - elif not c: - self.cur_char = EOL - self.input_state = 4 - else: - self.cur_char = c - elif input_state == 2: - self.cur_char = u'\n' - self.input_state = 3 - elif input_state == 3: - self.cur_line += 1 - self.cur_line_start = self.cur_pos = self.next_pos - self.cur_char = BOL - self.input_state = 1 - elif input_state == 4: - self.cur_char = EOF - self.input_state = 5 - else: # input_state = 5 - self.cur_char = u'' - if self.trace: - print("--> [%d] %d %r" % (input_state, self.cur_pos, self.cur_char)) - - def position(self): - """ - Return a tuple (name, line, col) representing the location of - the last token read using the read() method. |name| is the - name that was provided to the Scanner constructor; |line| - is the line number in the stream (1-based); |col| is the - position within the line of the first character of the token - (0-based). - """ - return (self.name, self.start_line, self.start_col) - - def get_position(self): - """Python accessible wrapper around position(), only for error reporting. - """ - return self.position() - - def begin(self, state_name): - """Set the current state of the scanner to the named state.""" - self.initial_state = ( - self.lexicon.get_initial_state(state_name)) - self.state_name = state_name - - def produce(self, value, text=None): - """ - Called from an action procedure, causes |value| to be returned - as the token value from read(). If |text| is supplied, it is - returned in place of the scanned text. - - produce() can be called more than once during a single call to an action - procedure, in which case the tokens are queued up and returned one - at a time by subsequent calls to read(), until the queue is empty, - whereupon scanning resumes. - """ - if text is None: - text = self.text - self.queue.append((value, text)) - - def eof(self): - """ - Override this method if you want something to be done at - end of file. - """ diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Timing.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Timing.py deleted file mode 100644 index 5c3692693bb..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Timing.py +++ /dev/null @@ -1,23 +0,0 @@ -# -# Get time in platform-dependent way -# - -from __future__ import absolute_import - -import os -from sys import platform, exit, stderr - -if platform == 'mac': - import MacOS - def time(): - return MacOS.GetTicks() / 60.0 - timekind = "real" -elif hasattr(os, 'times'): - def time(): - t = os.times() - return t[0] + t[1] - timekind = "cpu" -else: - stderr.write( - "Don't know how to get time on platform %s\n" % repr(platform)) - exit(1) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Traditional.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Traditional.py deleted file mode 100644 index ec7252daed9..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Traditional.py +++ /dev/null @@ -1,158 +0,0 @@ -#======================================================================= -# -# Python Lexical Analyser -# -# Traditional Regular Expression Syntax -# -#======================================================================= - -from __future__ import absolute_import - -from .Regexps import Alt, Seq, Rep, Rep1, Opt, Any, AnyBut, Bol, Eol, Char -from .Errors import PlexError - - -class RegexpSyntaxError(PlexError): - pass - - -def re(s): - """ - Convert traditional string representation of regular expression |s| - into Plex representation. - """ - return REParser(s).parse_re() - - -class REParser(object): - def __init__(self, s): - self.s = s - self.i = -1 - self.end = 0 - self.next() - - def parse_re(self): - re = self.parse_alt() - if not self.end: - self.error("Unexpected %s" % repr(self.c)) - return re - - def parse_alt(self): - """Parse a set of alternative regexps.""" - re = self.parse_seq() - if self.c == '|': - re_list = [re] - while self.c == '|': - self.next() - re_list.append(self.parse_seq()) - re = Alt(*re_list) - return re - - def parse_seq(self): - """Parse a sequence of regexps.""" - re_list = [] - while not self.end and not self.c in "|)": - re_list.append(self.parse_mod()) - return Seq(*re_list) - - def parse_mod(self): - """Parse a primitive regexp followed by *, +, ? modifiers.""" - re = self.parse_prim() - while not self.end and self.c in "*+?": - if self.c == '*': - re = Rep(re) - elif self.c == '+': - re = Rep1(re) - else: # self.c == '?' - re = Opt(re) - self.next() - return re - - def parse_prim(self): - """Parse a primitive regexp.""" - c = self.get() - if c == '.': - re = AnyBut("\n") - elif c == '^': - re = Bol - elif c == '$': - re = Eol - elif c == '(': - re = self.parse_alt() - self.expect(')') - elif c == '[': - re = self.parse_charset() - self.expect(']') - else: - if c == '\\': - c = self.get() - re = Char(c) - return re - - def parse_charset(self): - """Parse a charset. Does not include the surrounding [].""" - char_list = [] - invert = 0 - if self.c == '^': - invert = 1 - self.next() - if self.c == ']': - char_list.append(']') - self.next() - while not self.end and self.c != ']': - c1 = self.get() - if self.c == '-' and self.lookahead(1) != ']': - self.next() - c2 = self.get() - for a in range(ord(c1), ord(c2) + 1): - char_list.append(chr(a)) - else: - char_list.append(c1) - chars = ''.join(char_list) - if invert: - return AnyBut(chars) - else: - return Any(chars) - - def next(self): - """Advance to the next char.""" - s = self.s - i = self.i = self.i + 1 - if i < len(s): - self.c = s[i] - else: - self.c = '' - self.end = 1 - - def get(self): - if self.end: - self.error("Premature end of string") - c = self.c - self.next() - return c - - def lookahead(self, n): - """Look ahead n chars.""" - j = self.i + n - if j < len(self.s): - return self.s[j] - else: - return '' - - def expect(self, c): - """ - Expect to find character |c| at current position. - Raises an exception otherwise. - """ - if self.c == c: - self.next() - else: - self.error("Missing %s" % repr(c)) - - def error(self, mess): - """Raise exception to signal syntax error in regexp.""" - raise RegexpSyntaxError("Syntax error in regexp %s at position %d: %s" % ( - repr(self.s), self.i, mess)) - - - diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Transitions.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Transitions.py deleted file mode 100644 index 3833817946c..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/Transitions.py +++ /dev/null @@ -1,251 +0,0 @@ -# -# Plex - Transition Maps -# -# This version represents state sets directly as dicts for speed. -# - -from __future__ import absolute_import - -try: - from sys import maxsize as maxint -except ImportError: - from sys import maxint - - -class TransitionMap(object): - """ - A TransitionMap maps an input event to a set of states. - An input event is one of: a range of character codes, - the empty string (representing an epsilon move), or one - of the special symbols BOL, EOL, EOF. - - For characters, this implementation compactly represents - the map by means of a list: - - [code_0, states_0, code_1, states_1, code_2, states_2, - ..., code_n-1, states_n-1, code_n] - - where |code_i| is a character code, and |states_i| is a - set of states corresponding to characters with codes |c| - in the range |code_i| <= |c| <= |code_i+1|. - - The following invariants hold: - n >= 1 - code_0 == -maxint - code_n == maxint - code_i < code_i+1 for i in 0..n-1 - states_0 == states_n-1 - - Mappings for the special events '', BOL, EOL, EOF are - kept separately in a dictionary. - """ - - map = None # The list of codes and states - special = None # Mapping for special events - - def __init__(self, map=None, special=None): - if not map: - map = [-maxint, {}, maxint] - if not special: - special = {} - self.map = map - self.special = special - #self.check() ### - - def add(self, event, new_state, - TupleType=tuple): - """ - Add transition to |new_state| on |event|. - """ - if type(event) is TupleType: - code0, code1 = event - i = self.split(code0) - j = self.split(code1) - map = self.map - while i < j: - map[i + 1][new_state] = 1 - i += 2 - else: - self.get_special(event)[new_state] = 1 - - def add_set(self, event, new_set, - TupleType=tuple): - """ - Add transitions to the states in |new_set| on |event|. - """ - if type(event) is TupleType: - code0, code1 = event - i = self.split(code0) - j = self.split(code1) - map = self.map - while i < j: - map[i + 1].update(new_set) - i += 2 - else: - self.get_special(event).update(new_set) - - def get_epsilon(self, - none=None): - """ - Return the mapping for epsilon, or None. - """ - return self.special.get('', none) - - def iteritems(self, - len=len): - """ - Return the mapping as an iterable of ((code1, code2), state_set) and - (special_event, state_set) pairs. - """ - result = [] - map = self.map - else_set = map[1] - i = 0 - n = len(map) - 1 - code0 = map[0] - while i < n: - set = map[i + 1] - code1 = map[i + 2] - if set or else_set: - result.append(((code0, code1), set)) - code0 = code1 - i += 2 - for event, set in self.special.items(): - if set: - result.append((event, set)) - return iter(result) - - items = iteritems - - # ------------------- Private methods -------------------- - - def split(self, code, - len=len, maxint=maxint): - """ - Search the list for the position of the split point for |code|, - inserting a new split point if necessary. Returns index |i| such - that |code| == |map[i]|. - """ - # We use a funky variation on binary search. - map = self.map - hi = len(map) - 1 - # Special case: code == map[-1] - if code == maxint: - return hi - # General case - lo = 0 - # loop invariant: map[lo] <= code < map[hi] and hi - lo >= 2 - while hi - lo >= 4: - # Find midpoint truncated to even index - mid = ((lo + hi) // 2) & ~1 - if code < map[mid]: - hi = mid - else: - lo = mid - # map[lo] <= code < map[hi] and hi - lo == 2 - if map[lo] == code: - return lo - else: - map[hi:hi] = [code, map[hi - 1].copy()] - #self.check() ### - return hi - - def get_special(self, event): - """ - Get state set for special event, adding a new entry if necessary. - """ - special = self.special - set = special.get(event, None) - if not set: - set = {} - special[event] = set - return set - - # --------------------- Conversion methods ----------------------- - - def __str__(self): - map_strs = [] - map = self.map - n = len(map) - i = 0 - while i < n: - code = map[i] - if code == -maxint: - code_str = "-inf" - elif code == maxint: - code_str = "inf" - else: - code_str = str(code) - map_strs.append(code_str) - i += 1 - if i < n: - map_strs.append(state_set_str(map[i])) - i += 1 - special_strs = {} - for event, set in self.special.items(): - special_strs[event] = state_set_str(set) - return "[%s]+%s" % ( - ','.join(map_strs), - special_strs - ) - - # --------------------- Debugging methods ----------------------- - - def check(self): - """Check data structure integrity.""" - if not self.map[-3] < self.map[-1]: - print(self) - assert 0 - - def dump(self, file): - map = self.map - i = 0 - n = len(map) - 1 - while i < n: - self.dump_range(map[i], map[i + 2], map[i + 1], file) - i += 2 - for event, set in self.special.items(): - if set: - if not event: - event = 'empty' - self.dump_trans(event, set, file) - - def dump_range(self, code0, code1, set, file): - if set: - if code0 == -maxint: - if code1 == maxint: - k = "any" - else: - k = "< %s" % self.dump_char(code1) - elif code1 == maxint: - k = "> %s" % self.dump_char(code0 - 1) - elif code0 == code1 - 1: - k = self.dump_char(code0) - else: - k = "%s..%s" % (self.dump_char(code0), - self.dump_char(code1 - 1)) - self.dump_trans(k, set, file) - - def dump_char(self, code): - if 0 <= code <= 255: - return repr(chr(code)) - else: - return "chr(%d)" % code - - def dump_trans(self, key, set, file): - file.write(" %s --> %s\n" % (key, self.dump_set(set))) - - def dump_set(self, set): - return state_set_str(set) - - -# -# State set manipulation functions -# - -#def merge_state_sets(set1, set2): -# for state in set2.keys(): -# set1[state] = 1 - -def state_set_str(set): - return "[%s]" % ','.join(["S%d" % state.number for state in set]) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/__init__.py deleted file mode 100644 index 81a066f782c..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Plex/__init__.py +++ /dev/null @@ -1,39 +0,0 @@ -#======================================================================= -# -# Python Lexical Analyser -# -#======================================================================= - -""" -The Plex module provides lexical analysers with similar capabilities -to GNU Flex. The following classes and functions are exported; -see the attached docstrings for more information. - - Scanner For scanning a character stream under the - direction of a Lexicon. - - Lexicon For constructing a lexical definition - to be used by a Scanner. - - Str, Any, AnyBut, AnyChar, Seq, Alt, Opt, Rep, Rep1, - Bol, Eol, Eof, Empty - - Regular expression constructors, for building pattern - definitions for a Lexicon. - - State For defining scanner states when creating a - Lexicon. - - TEXT, IGNORE, Begin - - Actions for associating with patterns when - creating a Lexicon. -""" - -from __future__ import absolute_import - -from .Actions import TEXT, IGNORE, Begin -from .Lexicons import Lexicon, State -from .Regexps import RE, Seq, Alt, Rep1, Empty, Str, Any, AnyBut, AnyChar, Range -from .Regexps import Opt, Rep, Bol, Eol, Eof, Case, NoCase -from .Scanners import Scanner diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Runtime/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Runtime/__init__.py deleted file mode 100644 index fa81adaff68..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Runtime/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# empty file diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Runtime/refnanny.pyx b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Runtime/refnanny.pyx deleted file mode 100644 index d4b873fe97a..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Runtime/refnanny.pyx +++ /dev/null @@ -1,194 +0,0 @@ -# cython: language_level=3, auto_pickle=False - -from cpython.ref cimport PyObject, Py_INCREF, Py_DECREF, Py_XDECREF, Py_XINCREF -from cpython.exc cimport PyErr_Fetch, PyErr_Restore -from cpython.pystate cimport PyThreadState_Get - -cimport cython - -loglevel = 0 -reflog = [] - -cdef log(level, action, obj, lineno): - if loglevel >= level: - reflog.append((lineno, action, id(obj))) - -LOG_NONE, LOG_ALL = range(2) - -@cython.final -cdef class Context(object): - cdef readonly object name, filename - cdef readonly dict refs - cdef readonly list errors - cdef readonly Py_ssize_t start - - def __cinit__(self, name, line=0, filename=None): - self.name = name - self.start = line - self.filename = filename - self.refs = {} # id -> (count, [lineno]) - self.errors = [] - - cdef regref(self, obj, lineno, bint is_null): - log(LOG_ALL, u'regref', u"" if is_null else obj, lineno) - if is_null: - self.errors.append(f"NULL argument on line {lineno}") - return - id_ = id(obj) - count, linenumbers = self.refs.get(id_, (0, [])) - self.refs[id_] = (count + 1, linenumbers) - linenumbers.append(lineno) - - cdef bint delref(self, obj, lineno, bint is_null) except -1: - # returns whether it is ok to do the decref operation - log(LOG_ALL, u'delref', u"" if is_null else obj, lineno) - if is_null: - self.errors.append(f"NULL argument on line {lineno}") - return False - id_ = id(obj) - count, linenumbers = self.refs.get(id_, (0, [])) - if count == 0: - self.errors.append(f"Too many decrefs on line {lineno}, reference acquired on lines {linenumbers!r}") - return False - elif count == 1: - del self.refs[id_] - return True - else: - self.refs[id_] = (count - 1, linenumbers) - return True - - cdef end(self): - if self.refs: - msg = u"References leaked:" - for count, linenos in self.refs.itervalues(): - msg += f"\n ({count}) acquired on lines: {u', '.join([f'{x}' for x in linenos])}" - self.errors.append(msg) - if self.errors: - return u"\n".join([u'REFNANNY: '+error for error in self.errors]) - else: - return None - -cdef void report_unraisable(object e=None): - try: - if e is None: - import sys - e = sys.exc_info()[1] - print(f"refnanny raised an exception: {e}") - except: - pass # We absolutely cannot exit with an exception - -# All Python operations must happen after any existing -# exception has been fetched, in case we are called from -# exception-handling code. - -cdef PyObject* SetupContext(char* funcname, int lineno, char* filename) except NULL: - if Context is None: - # Context may be None during finalize phase. - # In that case, we don't want to be doing anything fancy - # like caching and resetting exceptions. - return NULL - cdef (PyObject*) type = NULL, value = NULL, tb = NULL, result = NULL - PyThreadState_Get() - PyErr_Fetch(&type, &value, &tb) - try: - ctx = Context(funcname, lineno, filename) - Py_INCREF(ctx) - result = ctx - except Exception, e: - report_unraisable(e) - PyErr_Restore(type, value, tb) - return result - -cdef void GOTREF(PyObject* ctx, PyObject* p_obj, int lineno): - if ctx == NULL: return - cdef (PyObject*) type = NULL, value = NULL, tb = NULL - PyErr_Fetch(&type, &value, &tb) - try: - try: - if p_obj is NULL: - (ctx).regref(None, lineno, True) - else: - (ctx).regref(p_obj, lineno, False) - except: - report_unraisable() - except: - # __Pyx_GetException may itself raise errors - pass - PyErr_Restore(type, value, tb) - -cdef int GIVEREF_and_report(PyObject* ctx, PyObject* p_obj, int lineno): - if ctx == NULL: return 1 - cdef (PyObject*) type = NULL, value = NULL, tb = NULL - cdef bint decref_ok = False - PyErr_Fetch(&type, &value, &tb) - try: - try: - if p_obj is NULL: - decref_ok = (ctx).delref(None, lineno, True) - else: - decref_ok = (ctx).delref(p_obj, lineno, False) - except: - report_unraisable() - except: - # __Pyx_GetException may itself raise errors - pass - PyErr_Restore(type, value, tb) - return decref_ok - -cdef void GIVEREF(PyObject* ctx, PyObject* p_obj, int lineno): - GIVEREF_and_report(ctx, p_obj, lineno) - -cdef void INCREF(PyObject* ctx, PyObject* obj, int lineno): - Py_XINCREF(obj) - PyThreadState_Get() - GOTREF(ctx, obj, lineno) - -cdef void DECREF(PyObject* ctx, PyObject* obj, int lineno): - if GIVEREF_and_report(ctx, obj, lineno): - Py_XDECREF(obj) - PyThreadState_Get() - -cdef void FinishContext(PyObject** ctx): - if ctx == NULL or ctx[0] == NULL: return - cdef (PyObject*) type = NULL, value = NULL, tb = NULL - cdef object errors = None - cdef Context context - PyThreadState_Get() - PyErr_Fetch(&type, &value, &tb) - try: - try: - context = ctx[0] - errors = context.end() - if errors: - print(f"{context.filename.decode('latin1')}: {context.name.decode('latin1')}()") - print(errors) - context = None - except: - report_unraisable() - except: - # __Pyx_GetException may itself raise errors - pass - Py_XDECREF(ctx[0]) - ctx[0] = NULL - PyErr_Restore(type, value, tb) - -ctypedef struct RefNannyAPIStruct: - void (*INCREF)(PyObject*, PyObject*, int) - void (*DECREF)(PyObject*, PyObject*, int) - void (*GOTREF)(PyObject*, PyObject*, int) - void (*GIVEREF)(PyObject*, PyObject*, int) - PyObject* (*SetupContext)(char*, int, char*) except NULL - void (*FinishContext)(PyObject**) - -cdef RefNannyAPIStruct api -api.INCREF = INCREF -api.DECREF = DECREF -api.GOTREF = GOTREF -api.GIVEREF = GIVEREF -api.SetupContext = SetupContext -api.FinishContext = FinishContext - -cdef extern from "Python.h": - object PyLong_FromVoidPtr(void*) - -RefNannyAPI = PyLong_FromVoidPtr(&api) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Shadow.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Shadow.py deleted file mode 100644 index cc8c9b60ad5..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Shadow.py +++ /dev/null @@ -1,474 +0,0 @@ -# cython.* namespace for pure mode. -from __future__ import absolute_import - -__version__ = "0.29.30" - -try: - from __builtin__ import basestring -except ImportError: - basestring = str - - -# BEGIN shameless copy from Cython/minivect/minitypes.py - -class _ArrayType(object): - - is_array = True - subtypes = ['dtype'] - - def __init__(self, dtype, ndim, is_c_contig=False, is_f_contig=False, - inner_contig=False, broadcasting=None): - self.dtype = dtype - self.ndim = ndim - self.is_c_contig = is_c_contig - self.is_f_contig = is_f_contig - self.inner_contig = inner_contig or is_c_contig or is_f_contig - self.broadcasting = broadcasting - - def __repr__(self): - axes = [":"] * self.ndim - if self.is_c_contig: - axes[-1] = "::1" - elif self.is_f_contig: - axes[0] = "::1" - - return "%s[%s]" % (self.dtype, ", ".join(axes)) - - -def index_type(base_type, item): - """ - Support array type creation by slicing, e.g. double[:, :] specifies - a 2D strided array of doubles. The syntax is the same as for - Cython memoryviews. - """ - class InvalidTypeSpecification(Exception): - pass - - def verify_slice(s): - if s.start or s.stop or s.step not in (None, 1): - raise InvalidTypeSpecification( - "Only a step of 1 may be provided to indicate C or " - "Fortran contiguity") - - if isinstance(item, tuple): - step_idx = None - for idx, s in enumerate(item): - verify_slice(s) - if s.step and (step_idx or idx not in (0, len(item) - 1)): - raise InvalidTypeSpecification( - "Step may only be provided once, and only in the " - "first or last dimension.") - - if s.step == 1: - step_idx = idx - - return _ArrayType(base_type, len(item), - is_c_contig=step_idx == len(item) - 1, - is_f_contig=step_idx == 0) - elif isinstance(item, slice): - verify_slice(item) - return _ArrayType(base_type, 1, is_c_contig=bool(item.step)) - else: - # int[8] etc. - assert int(item) == item # array size must be a plain integer - array(base_type, item) - -# END shameless copy - - -compiled = False - -_Unspecified = object() - -# Function decorators - -def _empty_decorator(x): - return x - -def locals(**arg_types): - return _empty_decorator - -def test_assert_path_exists(*paths): - return _empty_decorator - -def test_fail_if_path_exists(*paths): - return _empty_decorator - -class _EmptyDecoratorAndManager(object): - def __call__(self, x): - return x - def __enter__(self): - pass - def __exit__(self, exc_type, exc_value, traceback): - pass - -class _Optimization(object): - pass - -cclass = ccall = cfunc = _EmptyDecoratorAndManager() - -returns = wraparound = boundscheck = initializedcheck = nonecheck = \ - embedsignature = cdivision = cdivision_warnings = \ - always_allows_keywords = profile = linetrace = infer_types = \ - unraisable_tracebacks = freelist = \ - lambda _: _EmptyDecoratorAndManager() - -exceptval = lambda _=None, check=True: _EmptyDecoratorAndManager() - -overflowcheck = lambda _: _EmptyDecoratorAndManager() -optimization = _Optimization() - -overflowcheck.fold = optimization.use_switch = \ - optimization.unpack_method_calls = lambda arg: _EmptyDecoratorAndManager() - -final = internal = type_version_tag = no_gc_clear = no_gc = _empty_decorator - -binding = lambda _: _empty_decorator - - -_cython_inline = None -def inline(f, *args, **kwds): - if isinstance(f, basestring): - global _cython_inline - if _cython_inline is None: - from Cython.Build.Inline import cython_inline as _cython_inline - return _cython_inline(f, *args, **kwds) - else: - assert len(args) == len(kwds) == 0 - return f - - -def compile(f): - from Cython.Build.Inline import RuntimeCompiledFunction - return RuntimeCompiledFunction(f) - - -# Special functions - -def cdiv(a, b): - q = a / b - if q < 0: - q += 1 - return q - -def cmod(a, b): - r = a % b - if (a*b) < 0: - r -= b - return r - - -# Emulated language constructs - -def cast(type, *args, **kwargs): - kwargs.pop('typecheck', None) - assert not kwargs - if hasattr(type, '__call__'): - return type(*args) - else: - return args[0] - -def sizeof(arg): - return 1 - -def typeof(arg): - return arg.__class__.__name__ - # return type(arg) - -def address(arg): - return pointer(type(arg))([arg]) - -def declare(type=None, value=_Unspecified, **kwds): - if type not in (None, object) and hasattr(type, '__call__'): - if value is not _Unspecified: - return type(value) - else: - return type() - else: - return value - -class _nogil(object): - """Support for 'with nogil' statement and @nogil decorator. - """ - def __call__(self, x): - if callable(x): - # Used as function decorator => return the function unchanged. - return x - # Used as conditional context manager or to create an "@nogil(True/False)" decorator => keep going. - return self - - def __enter__(self): - pass - def __exit__(self, exc_class, exc, tb): - return exc_class is None - -nogil = _nogil() -gil = _nogil() -del _nogil - - -# Emulated types - -class CythonMetaType(type): - - def __getitem__(type, ix): - return array(type, ix) - -CythonTypeObject = CythonMetaType('CythonTypeObject', (object,), {}) - -class CythonType(CythonTypeObject): - - def _pointer(self, n=1): - for i in range(n): - self = pointer(self) - return self - -class PointerType(CythonType): - - def __init__(self, value=None): - if isinstance(value, (ArrayType, PointerType)): - self._items = [cast(self._basetype, a) for a in value._items] - elif isinstance(value, list): - self._items = [cast(self._basetype, a) for a in value] - elif value is None or value == 0: - self._items = [] - else: - raise ValueError - - def __getitem__(self, ix): - if ix < 0: - raise IndexError("negative indexing not allowed in C") - return self._items[ix] - - def __setitem__(self, ix, value): - if ix < 0: - raise IndexError("negative indexing not allowed in C") - self._items[ix] = cast(self._basetype, value) - - def __eq__(self, value): - if value is None and not self._items: - return True - elif type(self) != type(value): - return False - else: - return not self._items and not value._items - - def __repr__(self): - return "%s *" % (self._basetype,) - -class ArrayType(PointerType): - - def __init__(self): - self._items = [None] * self._n - - -class StructType(CythonType): - - def __init__(self, cast_from=_Unspecified, **data): - if cast_from is not _Unspecified: - # do cast - if len(data) > 0: - raise ValueError('Cannot accept keyword arguments when casting.') - if type(cast_from) is not type(self): - raise ValueError('Cannot cast from %s'%cast_from) - for key, value in cast_from.__dict__.items(): - setattr(self, key, value) - else: - for key, value in data.items(): - setattr(self, key, value) - - def __setattr__(self, key, value): - if key in self._members: - self.__dict__[key] = cast(self._members[key], value) - else: - raise AttributeError("Struct has no member '%s'" % key) - - -class UnionType(CythonType): - - def __init__(self, cast_from=_Unspecified, **data): - if cast_from is not _Unspecified: - # do type cast - if len(data) > 0: - raise ValueError('Cannot accept keyword arguments when casting.') - if isinstance(cast_from, dict): - datadict = cast_from - elif type(cast_from) is type(self): - datadict = cast_from.__dict__ - else: - raise ValueError('Cannot cast from %s'%cast_from) - else: - datadict = data - if len(datadict) > 1: - raise AttributeError("Union can only store one field at a time.") - for key, value in datadict.items(): - setattr(self, key, value) - - def __setattr__(self, key, value): - if key == '__dict__': - CythonType.__setattr__(self, key, value) - elif key in self._members: - self.__dict__ = {key: cast(self._members[key], value)} - else: - raise AttributeError("Union has no member '%s'" % key) - -def pointer(basetype): - class PointerInstance(PointerType): - _basetype = basetype - return PointerInstance - -def array(basetype, n): - class ArrayInstance(ArrayType): - _basetype = basetype - _n = n - return ArrayInstance - -def struct(**members): - class StructInstance(StructType): - _members = members - for key in members: - setattr(StructInstance, key, None) - return StructInstance - -def union(**members): - class UnionInstance(UnionType): - _members = members - for key in members: - setattr(UnionInstance, key, None) - return UnionInstance - -class typedef(CythonType): - - def __init__(self, type, name=None): - self._basetype = type - self.name = name - - def __call__(self, *arg): - value = cast(self._basetype, *arg) - return value - - def __repr__(self): - return self.name or str(self._basetype) - - __getitem__ = index_type - -class _FusedType(CythonType): - pass - - -def fused_type(*args): - if not args: - raise TypeError("Expected at least one type as argument") - - # Find the numeric type with biggest rank if all types are numeric - rank = -1 - for type in args: - if type not in (py_int, py_long, py_float, py_complex): - break - - if type_ordering.index(type) > rank: - result_type = type - else: - return result_type - - # Not a simple numeric type, return a fused type instance. The result - # isn't really meant to be used, as we can't keep track of the context in - # pure-mode. Casting won't do anything in this case. - return _FusedType() - - -def _specialized_from_args(signatures, args, kwargs): - "Perhaps this should be implemented in a TreeFragment in Cython code" - raise Exception("yet to be implemented") - - -py_int = typedef(int, "int") -try: - py_long = typedef(long, "long") -except NameError: # Py3 - py_long = typedef(int, "long") -py_float = typedef(float, "float") -py_complex = typedef(complex, "double complex") - - -# Predefined types - -int_types = ['char', 'short', 'Py_UNICODE', 'int', 'Py_UCS4', 'long', 'longlong', 'Py_ssize_t', 'size_t'] -float_types = ['longdouble', 'double', 'float'] -complex_types = ['longdoublecomplex', 'doublecomplex', 'floatcomplex', 'complex'] -other_types = ['bint', 'void', 'Py_tss_t'] - -to_repr = { - 'longlong': 'long long', - 'longdouble': 'long double', - 'longdoublecomplex': 'long double complex', - 'doublecomplex': 'double complex', - 'floatcomplex': 'float complex', -}.get - -gs = globals() - -# note: cannot simply name the unicode type here as 2to3 gets in the way and replaces it by str -try: - import __builtin__ as builtins -except ImportError: # Py3 - import builtins - -gs['unicode'] = typedef(getattr(builtins, 'unicode', str), 'unicode') -del builtins - -for name in int_types: - reprname = to_repr(name, name) - gs[name] = typedef(py_int, reprname) - if name not in ('Py_UNICODE', 'Py_UCS4') and not name.endswith('size_t'): - gs['u'+name] = typedef(py_int, "unsigned " + reprname) - gs['s'+name] = typedef(py_int, "signed " + reprname) - -for name in float_types: - gs[name] = typedef(py_float, to_repr(name, name)) - -for name in complex_types: - gs[name] = typedef(py_complex, to_repr(name, name)) - -bint = typedef(bool, "bint") -void = typedef(None, "void") -Py_tss_t = typedef(None, "Py_tss_t") - -for t in int_types + float_types + complex_types + other_types: - for i in range(1, 4): - gs["%s_%s" % ('p'*i, t)] = gs[t]._pointer(i) - -NULL = gs['p_void'](0) - -# looks like 'gs' has some users out there by now... -#del gs - -integral = floating = numeric = _FusedType() - -type_ordering = [py_int, py_long, py_float, py_complex] - -class CythonDotParallel(object): - """ - The cython.parallel module. - """ - - __all__ = ['parallel', 'prange', 'threadid'] - - def parallel(self, num_threads=None): - return nogil - - def prange(self, start=0, stop=None, step=1, nogil=False, schedule=None, chunksize=None, num_threads=None): - if stop is None: - stop = start - start = 0 - return range(start, stop, step) - - def threadid(self): - return 0 - - # def threadsavailable(self): - # return 1 - -import sys -sys.modules['cython.parallel'] = CythonDotParallel() -del sys diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/StringIOTree.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/StringIOTree.py deleted file mode 100644 index d8239efeda9..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/StringIOTree.py +++ /dev/null @@ -1,108 +0,0 @@ -# cython: auto_pickle=False - -r""" -Implements a buffer with insertion points. When you know you need to -"get back" to a place and write more later, simply call insertion_point() -at that spot and get a new StringIOTree object that is "left behind". - -EXAMPLE: - ->>> a = StringIOTree() ->>> _= a.write('first\n') ->>> b = a.insertion_point() ->>> _= a.write('third\n') ->>> _= b.write('second\n') ->>> a.getvalue().split() -['first', 'second', 'third'] - ->>> c = b.insertion_point() ->>> d = c.insertion_point() ->>> _= d.write('alpha\n') ->>> _= b.write('gamma\n') ->>> _= c.write('beta\n') ->>> b.getvalue().split() -['second', 'alpha', 'beta', 'gamma'] - ->>> i = StringIOTree() ->>> d.insert(i) ->>> _= i.write('inserted\n') ->>> out = StringIO() ->>> a.copyto(out) ->>> out.getvalue().split() -['first', 'second', 'alpha', 'inserted', 'beta', 'gamma', 'third'] -""" - -from __future__ import absolute_import #, unicode_literals - -try: - # Prefer cStringIO since io.StringIO() does not support writing 'str' in Py2. - from cStringIO import StringIO -except ImportError: - from io import StringIO - - -class StringIOTree(object): - """ - See module docs. - """ - - def __init__(self, stream=None): - self.prepended_children = [] - if stream is None: - stream = StringIO() - self.stream = stream - self.write = stream.write - self.markers = [] - - def getvalue(self): - content = [x.getvalue() for x in self.prepended_children] - content.append(self.stream.getvalue()) - return "".join(content) - - def copyto(self, target): - """Potentially cheaper than getvalue as no string concatenation - needs to happen.""" - for child in self.prepended_children: - child.copyto(target) - stream_content = self.stream.getvalue() - if stream_content: - target.write(stream_content) - - def commit(self): - # Save what we have written until now so that the buffer - # itself is empty -- this makes it ready for insertion - if self.stream.tell(): - self.prepended_children.append(StringIOTree(self.stream)) - self.prepended_children[-1].markers = self.markers - self.markers = [] - self.stream = StringIO() - self.write = self.stream.write - - def insert(self, iotree): - """ - Insert a StringIOTree (and all of its contents) at this location. - Further writing to self appears after what is inserted. - """ - self.commit() - self.prepended_children.append(iotree) - - def insertion_point(self): - """ - Returns a new StringIOTree, which is left behind at the current position - (it what is written to the result will appear right before whatever is - next written to self). - - Calling getvalue() or copyto() on the result will only return the - contents written to it. - """ - # Save what we have written until now - # This is so that getvalue on the result doesn't include it. - self.commit() - # Construct the new forked object to return - other = StringIOTree() - self.prepended_children.append(other) - return other - - def allmarkers(self): - children = self.prepended_children - return [m for c in children for m in c.allmarkers()] + self.markers diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/__init__.py deleted file mode 100644 index 41a0ce3d0ef..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# The original Tempita implements all of its templating code here. -# Moved it to _tempita.py to make the compilation portable. - -from ._tempita import * diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/_looper.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/_looper.py deleted file mode 100644 index 4010988300f..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/_looper.py +++ /dev/null @@ -1,163 +0,0 @@ -""" -Helper for looping over sequences, particular in templates. - -Often in a loop in a template it's handy to know what's next up, -previously up, if this is the first or last item in the sequence, etc. -These can be awkward to manage in a normal Python loop, but using the -looper you can get a better sense of the context. Use like:: - - >>> for loop, item in looper(['a', 'b', 'c']): - ... print loop.number, item - ... if not loop.last: - ... print '---' - 1 a - --- - 2 b - --- - 3 c - -""" - -import sys -from Cython.Tempita.compat3 import basestring_ - -__all__ = ['looper'] - - -class looper(object): - """ - Helper for looping (particularly in templates) - - Use this like:: - - for loop, item in looper(seq): - if loop.first: - ... - """ - - def __init__(self, seq): - self.seq = seq - - def __iter__(self): - return looper_iter(self.seq) - - def __repr__(self): - return '<%s for %r>' % ( - self.__class__.__name__, self.seq) - - -class looper_iter(object): - - def __init__(self, seq): - self.seq = list(seq) - self.pos = 0 - - def __iter__(self): - return self - - def __next__(self): - if self.pos >= len(self.seq): - raise StopIteration - result = loop_pos(self.seq, self.pos), self.seq[self.pos] - self.pos += 1 - return result - - if sys.version < "3": - next = __next__ - - -class loop_pos(object): - - def __init__(self, seq, pos): - self.seq = seq - self.pos = pos - - def __repr__(self): - return '' % ( - self.seq[self.pos], self.pos) - - def index(self): - return self.pos - index = property(index) - - def number(self): - return self.pos + 1 - number = property(number) - - def item(self): - return self.seq[self.pos] - item = property(item) - - def __next__(self): - try: - return self.seq[self.pos + 1] - except IndexError: - return None - __next__ = property(__next__) - - if sys.version < "3": - next = __next__ - - def previous(self): - if self.pos == 0: - return None - return self.seq[self.pos - 1] - previous = property(previous) - - def odd(self): - return not self.pos % 2 - odd = property(odd) - - def even(self): - return self.pos % 2 - even = property(even) - - def first(self): - return self.pos == 0 - first = property(first) - - def last(self): - return self.pos == len(self.seq) - 1 - last = property(last) - - def length(self): - return len(self.seq) - length = property(length) - - def first_group(self, getter=None): - """ - Returns true if this item is the start of a new group, - where groups mean that some attribute has changed. The getter - can be None (the item itself changes), an attribute name like - ``'.attr'``, a function, or a dict key or list index. - """ - if self.first: - return True - return self._compare_group(self.item, self.previous, getter) - - def last_group(self, getter=None): - """ - Returns true if this item is the end of a new group, - where groups mean that some attribute has changed. The getter - can be None (the item itself changes), an attribute name like - ``'.attr'``, a function, or a dict key or list index. - """ - if self.last: - return True - return self._compare_group(self.item, self.__next__, getter) - - def _compare_group(self, item, other, getter): - if getter is None: - return item != other - elif (isinstance(getter, basestring_) - and getter.startswith('.')): - getter = getter[1:] - if getter.endswith('()'): - getter = getter[:-2] - return getattr(item, getter)() != getattr(other, getter)() - else: - return getattr(item, getter) != getattr(other, getter) - elif hasattr(getter, '__call__'): - return getter(item) != getter(other) - else: - return item[getter] != other[getter] diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/_tempita.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/_tempita.py deleted file mode 100644 index 22a7d233b16..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/_tempita.py +++ /dev/null @@ -1,1182 +0,0 @@ -""" -A small templating language - -This implements a small templating language. This language implements -if/elif/else, for/continue/break, expressions, and blocks of Python -code. The syntax is:: - - {{any expression (function calls etc)}} - {{any expression | filter}} - {{for x in y}}...{{endfor}} - {{if x}}x{{elif y}}y{{else}}z{{endif}} - {{py:x=1}} - {{py: - def foo(bar): - return 'baz' - }} - {{default var = default_value}} - {{# comment}} - -You use this with the ``Template`` class or the ``sub`` shortcut. -The ``Template`` class takes the template string and the name of -the template (for errors) and a default namespace. Then (like -``string.Template``) you can call the ``tmpl.substitute(**kw)`` -method to make a substitution (or ``tmpl.substitute(a_dict)``). - -``sub(content, **kw)`` substitutes the template immediately. You -can use ``__name='tmpl.html'`` to set the name of the template. - -If there are syntax errors ``TemplateError`` will be raised. -""" - -from __future__ import absolute_import - -import re -import sys -import cgi -try: - from urllib import quote as url_quote -except ImportError: # Py3 - from urllib.parse import quote as url_quote -import os -import tokenize -from io import StringIO - -from ._looper import looper -from .compat3 import bytes, unicode_, basestring_, next, is_unicode, coerce_text - -__all__ = ['TemplateError', 'Template', 'sub', 'HTMLTemplate', - 'sub_html', 'html', 'bunch'] - -in_re = re.compile(r'\s+in\s+') -var_re = re.compile(r'^[a-z_][a-z0-9_]*$', re.I) - - -class TemplateError(Exception): - """Exception raised while parsing a template - """ - - def __init__(self, message, position, name=None): - Exception.__init__(self, message) - self.position = position - self.name = name - - def __str__(self): - msg = ' '.join(self.args) - if self.position: - msg = '%s at line %s column %s' % ( - msg, self.position[0], self.position[1]) - if self.name: - msg += ' in %s' % self.name - return msg - - -class _TemplateContinue(Exception): - pass - - -class _TemplateBreak(Exception): - pass - - -def get_file_template(name, from_template): - path = os.path.join(os.path.dirname(from_template.name), name) - return from_template.__class__.from_filename( - path, namespace=from_template.namespace, - get_template=from_template.get_template) - - -class Template(object): - - default_namespace = { - 'start_braces': '{{', - 'end_braces': '}}', - 'looper': looper, - } - - default_encoding = 'utf8' - default_inherit = None - - def __init__(self, content, name=None, namespace=None, stacklevel=None, - get_template=None, default_inherit=None, line_offset=0, - delimeters=None): - self.content = content - - # set delimeters - if delimeters is None: - delimeters = (self.default_namespace['start_braces'], - self.default_namespace['end_braces']) - else: - #assert len(delimeters) == 2 and all([isinstance(delimeter, basestring) - # for delimeter in delimeters]) - self.default_namespace = self.__class__.default_namespace.copy() - self.default_namespace['start_braces'] = delimeters[0] - self.default_namespace['end_braces'] = delimeters[1] - self.delimeters = delimeters - - self._unicode = is_unicode(content) - if name is None and stacklevel is not None: - try: - caller = sys._getframe(stacklevel) - except ValueError: - pass - else: - globals = caller.f_globals - lineno = caller.f_lineno - if '__file__' in globals: - name = globals['__file__'] - if name.endswith('.pyc') or name.endswith('.pyo'): - name = name[:-1] - elif '__name__' in globals: - name = globals['__name__'] - else: - name = '' - if lineno: - name += ':%s' % lineno - self.name = name - self._parsed = parse(content, name=name, line_offset=line_offset, delimeters=self.delimeters) - if namespace is None: - namespace = {} - self.namespace = namespace - self.get_template = get_template - if default_inherit is not None: - self.default_inherit = default_inherit - - def from_filename(cls, filename, namespace=None, encoding=None, - default_inherit=None, get_template=get_file_template): - f = open(filename, 'rb') - c = f.read() - f.close() - if encoding: - c = c.decode(encoding) - return cls(content=c, name=filename, namespace=namespace, - default_inherit=default_inherit, get_template=get_template) - - from_filename = classmethod(from_filename) - - def __repr__(self): - return '<%s %s name=%r>' % ( - self.__class__.__name__, - hex(id(self))[2:], self.name) - - def substitute(self, *args, **kw): - if args: - if kw: - raise TypeError( - "You can only give positional *or* keyword arguments") - if len(args) > 1: - raise TypeError( - "You can only give one positional argument") - if not hasattr(args[0], 'items'): - raise TypeError( - "If you pass in a single argument, you must pass in a dictionary-like object (with a .items() method); you gave %r" - % (args[0],)) - kw = args[0] - ns = kw - ns['__template_name__'] = self.name - if self.namespace: - ns.update(self.namespace) - result, defs, inherit = self._interpret(ns) - if not inherit: - inherit = self.default_inherit - if inherit: - result = self._interpret_inherit(result, defs, inherit, ns) - return result - - def _interpret(self, ns): - __traceback_hide__ = True - parts = [] - defs = {} - self._interpret_codes(self._parsed, ns, out=parts, defs=defs) - if '__inherit__' in defs: - inherit = defs.pop('__inherit__') - else: - inherit = None - return ''.join(parts), defs, inherit - - def _interpret_inherit(self, body, defs, inherit_template, ns): - __traceback_hide__ = True - if not self.get_template: - raise TemplateError( - 'You cannot use inheritance without passing in get_template', - position=None, name=self.name) - templ = self.get_template(inherit_template, self) - self_ = TemplateObject(self.name) - for name, value in defs.items(): - setattr(self_, name, value) - self_.body = body - ns = ns.copy() - ns['self'] = self_ - return templ.substitute(ns) - - def _interpret_codes(self, codes, ns, out, defs): - __traceback_hide__ = True - for item in codes: - if isinstance(item, basestring_): - out.append(item) - else: - self._interpret_code(item, ns, out, defs) - - def _interpret_code(self, code, ns, out, defs): - __traceback_hide__ = True - name, pos = code[0], code[1] - if name == 'py': - self._exec(code[2], ns, pos) - elif name == 'continue': - raise _TemplateContinue() - elif name == 'break': - raise _TemplateBreak() - elif name == 'for': - vars, expr, content = code[2], code[3], code[4] - expr = self._eval(expr, ns, pos) - self._interpret_for(vars, expr, content, ns, out, defs) - elif name == 'cond': - parts = code[2:] - self._interpret_if(parts, ns, out, defs) - elif name == 'expr': - parts = code[2].split('|') - base = self._eval(parts[0], ns, pos) - for part in parts[1:]: - func = self._eval(part, ns, pos) - base = func(base) - out.append(self._repr(base, pos)) - elif name == 'default': - var, expr = code[2], code[3] - if var not in ns: - result = self._eval(expr, ns, pos) - ns[var] = result - elif name == 'inherit': - expr = code[2] - value = self._eval(expr, ns, pos) - defs['__inherit__'] = value - elif name == 'def': - name = code[2] - signature = code[3] - parts = code[4] - ns[name] = defs[name] = TemplateDef(self, name, signature, body=parts, ns=ns, - pos=pos) - elif name == 'comment': - return - else: - assert 0, "Unknown code: %r" % name - - def _interpret_for(self, vars, expr, content, ns, out, defs): - __traceback_hide__ = True - for item in expr: - if len(vars) == 1: - ns[vars[0]] = item - else: - if len(vars) != len(item): - raise ValueError( - 'Need %i items to unpack (got %i items)' - % (len(vars), len(item))) - for name, value in zip(vars, item): - ns[name] = value - try: - self._interpret_codes(content, ns, out, defs) - except _TemplateContinue: - continue - except _TemplateBreak: - break - - def _interpret_if(self, parts, ns, out, defs): - __traceback_hide__ = True - # @@: if/else/else gets through - for part in parts: - assert not isinstance(part, basestring_) - name, pos = part[0], part[1] - if name == 'else': - result = True - else: - result = self._eval(part[2], ns, pos) - if result: - self._interpret_codes(part[3], ns, out, defs) - break - - def _eval(self, code, ns, pos): - __traceback_hide__ = True - try: - try: - value = eval(code, self.default_namespace, ns) - except SyntaxError as e: - raise SyntaxError( - 'invalid syntax in expression: %s' % code) - return value - except Exception as e: - if getattr(e, 'args', None): - arg0 = e.args[0] - else: - arg0 = coerce_text(e) - e.args = (self._add_line_info(arg0, pos),) - raise - - def _exec(self, code, ns, pos): - __traceback_hide__ = True - try: - exec(code, self.default_namespace, ns) - except Exception as e: - if e.args: - e.args = (self._add_line_info(e.args[0], pos),) - else: - e.args = (self._add_line_info(None, pos),) - raise - - def _repr(self, value, pos): - __traceback_hide__ = True - try: - if value is None: - return '' - if self._unicode: - try: - value = unicode_(value) - except UnicodeDecodeError: - value = bytes(value) - else: - if not isinstance(value, basestring_): - value = coerce_text(value) - if (is_unicode(value) - and self.default_encoding): - value = value.encode(self.default_encoding) - except Exception as e: - e.args = (self._add_line_info(e.args[0], pos),) - raise - else: - if self._unicode and isinstance(value, bytes): - if not self.default_encoding: - raise UnicodeDecodeError( - 'Cannot decode bytes value %r into unicode ' - '(no default_encoding provided)' % value) - try: - value = value.decode(self.default_encoding) - except UnicodeDecodeError as e: - raise UnicodeDecodeError( - e.encoding, - e.object, - e.start, - e.end, - e.reason + ' in string %r' % value) - elif not self._unicode and is_unicode(value): - if not self.default_encoding: - raise UnicodeEncodeError( - 'Cannot encode unicode value %r into bytes ' - '(no default_encoding provided)' % value) - value = value.encode(self.default_encoding) - return value - - def _add_line_info(self, msg, pos): - msg = "%s at line %s column %s" % ( - msg, pos[0], pos[1]) - if self.name: - msg += " in file %s" % self.name - return msg - - -def sub(content, delimeters=None, **kw): - name = kw.get('__name') - tmpl = Template(content, name=name, delimeters=delimeters) - return tmpl.substitute(kw) - - -def paste_script_template_renderer(content, vars, filename=None): - tmpl = Template(content, name=filename) - return tmpl.substitute(vars) - - -class bunch(dict): - - def __init__(self, **kw): - for name, value in kw.items(): - setattr(self, name, value) - - def __setattr__(self, name, value): - self[name] = value - - def __getattr__(self, name): - try: - return self[name] - except KeyError: - raise AttributeError(name) - - def __getitem__(self, key): - if 'default' in self: - try: - return dict.__getitem__(self, key) - except KeyError: - return dict.__getitem__(self, 'default') - else: - return dict.__getitem__(self, key) - - def __repr__(self): - return '<%s %s>' % ( - self.__class__.__name__, - ' '.join(['%s=%r' % (k, v) for k, v in sorted(self.items())])) - -############################################################ -## HTML Templating -############################################################ - - -class html(object): - - def __init__(self, value): - self.value = value - - def __str__(self): - return self.value - - def __html__(self): - return self.value - - def __repr__(self): - return '<%s %r>' % ( - self.__class__.__name__, self.value) - - -def html_quote(value, force=True): - if not force and hasattr(value, '__html__'): - return value.__html__() - if value is None: - return '' - if not isinstance(value, basestring_): - value = coerce_text(value) - if sys.version >= "3" and isinstance(value, bytes): - value = cgi.escape(value.decode('latin1'), 1) - value = value.encode('latin1') - else: - value = cgi.escape(value, 1) - if sys.version < "3": - if is_unicode(value): - value = value.encode('ascii', 'xmlcharrefreplace') - return value - - -def url(v): - v = coerce_text(v) - if is_unicode(v): - v = v.encode('utf8') - return url_quote(v) - - -def attr(**kw): - parts = [] - for name, value in sorted(kw.items()): - if value is None: - continue - if name.endswith('_'): - name = name[:-1] - parts.append('%s="%s"' % (html_quote(name), html_quote(value))) - return html(' '.join(parts)) - - -class HTMLTemplate(Template): - - default_namespace = Template.default_namespace.copy() - default_namespace.update(dict( - html=html, - attr=attr, - url=url, - html_quote=html_quote, - )) - - def _repr(self, value, pos): - if hasattr(value, '__html__'): - value = value.__html__() - quote = False - else: - quote = True - plain = Template._repr(self, value, pos) - if quote: - return html_quote(plain) - else: - return plain - - -def sub_html(content, **kw): - name = kw.get('__name') - tmpl = HTMLTemplate(content, name=name) - return tmpl.substitute(kw) - - -class TemplateDef(object): - def __init__(self, template, func_name, func_signature, - body, ns, pos, bound_self=None): - self._template = template - self._func_name = func_name - self._func_signature = func_signature - self._body = body - self._ns = ns - self._pos = pos - self._bound_self = bound_self - - def __repr__(self): - return '' % ( - self._func_name, self._func_signature, - self._template.name, self._pos) - - def __str__(self): - return self() - - def __call__(self, *args, **kw): - values = self._parse_signature(args, kw) - ns = self._ns.copy() - ns.update(values) - if self._bound_self is not None: - ns['self'] = self._bound_self - out = [] - subdefs = {} - self._template._interpret_codes(self._body, ns, out, subdefs) - return ''.join(out) - - def __get__(self, obj, type=None): - if obj is None: - return self - return self.__class__( - self._template, self._func_name, self._func_signature, - self._body, self._ns, self._pos, bound_self=obj) - - def _parse_signature(self, args, kw): - values = {} - sig_args, var_args, var_kw, defaults = self._func_signature - extra_kw = {} - for name, value in kw.items(): - if not var_kw and name not in sig_args: - raise TypeError( - 'Unexpected argument %s' % name) - if name in sig_args: - values[sig_args] = value - else: - extra_kw[name] = value - args = list(args) - sig_args = list(sig_args) - while args: - while sig_args and sig_args[0] in values: - sig_args.pop(0) - if sig_args: - name = sig_args.pop(0) - values[name] = args.pop(0) - elif var_args: - values[var_args] = tuple(args) - break - else: - raise TypeError( - 'Extra position arguments: %s' - % ', '.join([repr(v) for v in args])) - for name, value_expr in defaults.items(): - if name not in values: - values[name] = self._template._eval( - value_expr, self._ns, self._pos) - for name in sig_args: - if name not in values: - raise TypeError( - 'Missing argument: %s' % name) - if var_kw: - values[var_kw] = extra_kw - return values - - -class TemplateObject(object): - - def __init__(self, name): - self.__name = name - self.get = TemplateObjectGetter(self) - - def __repr__(self): - return '<%s %s>' % (self.__class__.__name__, self.__name) - - -class TemplateObjectGetter(object): - - def __init__(self, template_obj): - self.__template_obj = template_obj - - def __getattr__(self, attr): - return getattr(self.__template_obj, attr, Empty) - - def __repr__(self): - return '<%s around %r>' % (self.__class__.__name__, self.__template_obj) - - -class _Empty(object): - def __call__(self, *args, **kw): - return self - - def __str__(self): - return '' - - def __repr__(self): - return 'Empty' - - def __unicode__(self): - return u'' - - def __iter__(self): - return iter(()) - - def __bool__(self): - return False - - if sys.version < "3": - __nonzero__ = __bool__ - -Empty = _Empty() -del _Empty - -############################################################ -## Lexing and Parsing -############################################################ - - -def lex(s, name=None, trim_whitespace=True, line_offset=0, delimeters=None): - """ - Lex a string into chunks: - - >>> lex('hey') - ['hey'] - >>> lex('hey {{you}}') - ['hey ', ('you', (1, 7))] - >>> lex('hey {{') - Traceback (most recent call last): - ... - TemplateError: No }} to finish last expression at line 1 column 7 - >>> lex('hey }}') - Traceback (most recent call last): - ... - TemplateError: }} outside expression at line 1 column 7 - >>> lex('hey {{ {{') - Traceback (most recent call last): - ... - TemplateError: {{ inside expression at line 1 column 10 - - """ - if delimeters is None: - delimeters = ( Template.default_namespace['start_braces'], - Template.default_namespace['end_braces'] ) - in_expr = False - chunks = [] - last = 0 - last_pos = (line_offset + 1, 1) - - token_re = re.compile(r'%s|%s' % (re.escape(delimeters[0]), - re.escape(delimeters[1]))) - for match in token_re.finditer(s): - expr = match.group(0) - pos = find_position(s, match.end(), last, last_pos) - if expr == delimeters[0] and in_expr: - raise TemplateError('%s inside expression' % delimeters[0], - position=pos, - name=name) - elif expr == delimeters[1] and not in_expr: - raise TemplateError('%s outside expression' % delimeters[1], - position=pos, - name=name) - if expr == delimeters[0]: - part = s[last:match.start()] - if part: - chunks.append(part) - in_expr = True - else: - chunks.append((s[last:match.start()], last_pos)) - in_expr = False - last = match.end() - last_pos = pos - if in_expr: - raise TemplateError('No %s to finish last expression' % delimeters[1], - name=name, position=last_pos) - part = s[last:] - if part: - chunks.append(part) - if trim_whitespace: - chunks = trim_lex(chunks) - return chunks - -statement_re = re.compile(r'^(?:if |elif |for |def |inherit |default |py:)') -single_statements = ['else', 'endif', 'endfor', 'enddef', 'continue', 'break'] -trail_whitespace_re = re.compile(r'\n\r?[\t ]*$') -lead_whitespace_re = re.compile(r'^[\t ]*\n') - - -def trim_lex(tokens): - r""" - Takes a lexed set of tokens, and removes whitespace when there is - a directive on a line by itself: - - >>> tokens = lex('{{if x}}\nx\n{{endif}}\ny', trim_whitespace=False) - >>> tokens - [('if x', (1, 3)), '\nx\n', ('endif', (3, 3)), '\ny'] - >>> trim_lex(tokens) - [('if x', (1, 3)), 'x\n', ('endif', (3, 3)), 'y'] - """ - last_trim = None - for i, current in enumerate(tokens): - if isinstance(current, basestring_): - # we don't trim this - continue - item = current[0] - if not statement_re.search(item) and item not in single_statements: - continue - if not i: - prev = '' - else: - prev = tokens[i - 1] - if i + 1 >= len(tokens): - next_chunk = '' - else: - next_chunk = tokens[i + 1] - if (not isinstance(next_chunk, basestring_) - or not isinstance(prev, basestring_)): - continue - prev_ok = not prev or trail_whitespace_re.search(prev) - if i == 1 and not prev.strip(): - prev_ok = True - if last_trim is not None and last_trim + 2 == i and not prev.strip(): - prev_ok = 'last' - if (prev_ok - and (not next_chunk or lead_whitespace_re.search(next_chunk) - or (i == len(tokens) - 2 and not next_chunk.strip()))): - if prev: - if ((i == 1 and not prev.strip()) - or prev_ok == 'last'): - tokens[i - 1] = '' - else: - m = trail_whitespace_re.search(prev) - # +1 to leave the leading \n on: - prev = prev[:m.start() + 1] - tokens[i - 1] = prev - if next_chunk: - last_trim = i - if i == len(tokens) - 2 and not next_chunk.strip(): - tokens[i + 1] = '' - else: - m = lead_whitespace_re.search(next_chunk) - next_chunk = next_chunk[m.end():] - tokens[i + 1] = next_chunk - return tokens - - -def find_position(string, index, last_index, last_pos): - """Given a string and index, return (line, column)""" - lines = string.count('\n', last_index, index) - if lines > 0: - column = index - string.rfind('\n', last_index, index) - else: - column = last_pos[1] + (index - last_index) - return (last_pos[0] + lines, column) - - -def parse(s, name=None, line_offset=0, delimeters=None): - r""" - Parses a string into a kind of AST - - >>> parse('{{x}}') - [('expr', (1, 3), 'x')] - >>> parse('foo') - ['foo'] - >>> parse('{{if x}}test{{endif}}') - [('cond', (1, 3), ('if', (1, 3), 'x', ['test']))] - >>> parse('series->{{for x in y}}x={{x}}{{endfor}}') - ['series->', ('for', (1, 11), ('x',), 'y', ['x=', ('expr', (1, 27), 'x')])] - >>> parse('{{for x, y in z:}}{{continue}}{{endfor}}') - [('for', (1, 3), ('x', 'y'), 'z', [('continue', (1, 21))])] - >>> parse('{{py:x=1}}') - [('py', (1, 3), 'x=1')] - >>> parse('{{if x}}a{{elif y}}b{{else}}c{{endif}}') - [('cond', (1, 3), ('if', (1, 3), 'x', ['a']), ('elif', (1, 12), 'y', ['b']), ('else', (1, 23), None, ['c']))] - - Some exceptions:: - - >>> parse('{{continue}}') - Traceback (most recent call last): - ... - TemplateError: continue outside of for loop at line 1 column 3 - >>> parse('{{if x}}foo') - Traceback (most recent call last): - ... - TemplateError: No {{endif}} at line 1 column 3 - >>> parse('{{else}}') - Traceback (most recent call last): - ... - TemplateError: else outside of an if block at line 1 column 3 - >>> parse('{{if x}}{{for x in y}}{{endif}}{{endfor}}') - Traceback (most recent call last): - ... - TemplateError: Unexpected endif at line 1 column 25 - >>> parse('{{if}}{{endif}}') - Traceback (most recent call last): - ... - TemplateError: if with no expression at line 1 column 3 - >>> parse('{{for x y}}{{endfor}}') - Traceback (most recent call last): - ... - TemplateError: Bad for (no "in") in 'x y' at line 1 column 3 - >>> parse('{{py:x=1\ny=2}}') - Traceback (most recent call last): - ... - TemplateError: Multi-line py blocks must start with a newline at line 1 column 3 - """ - if delimeters is None: - delimeters = ( Template.default_namespace['start_braces'], - Template.default_namespace['end_braces'] ) - tokens = lex(s, name=name, line_offset=line_offset, delimeters=delimeters) - result = [] - while tokens: - next_chunk, tokens = parse_expr(tokens, name) - result.append(next_chunk) - return result - - -def parse_expr(tokens, name, context=()): - if isinstance(tokens[0], basestring_): - return tokens[0], tokens[1:] - expr, pos = tokens[0] - expr = expr.strip() - if expr.startswith('py:'): - expr = expr[3:].lstrip(' \t') - if expr.startswith('\n') or expr.startswith('\r'): - expr = expr.lstrip('\r\n') - if '\r' in expr: - expr = expr.replace('\r\n', '\n') - expr = expr.replace('\r', '') - expr += '\n' - else: - if '\n' in expr: - raise TemplateError( - 'Multi-line py blocks must start with a newline', - position=pos, name=name) - return ('py', pos, expr), tokens[1:] - elif expr in ('continue', 'break'): - if 'for' not in context: - raise TemplateError( - 'continue outside of for loop', - position=pos, name=name) - return (expr, pos), tokens[1:] - elif expr.startswith('if '): - return parse_cond(tokens, name, context) - elif (expr.startswith('elif ') - or expr == 'else'): - raise TemplateError( - '%s outside of an if block' % expr.split()[0], - position=pos, name=name) - elif expr in ('if', 'elif', 'for'): - raise TemplateError( - '%s with no expression' % expr, - position=pos, name=name) - elif expr in ('endif', 'endfor', 'enddef'): - raise TemplateError( - 'Unexpected %s' % expr, - position=pos, name=name) - elif expr.startswith('for '): - return parse_for(tokens, name, context) - elif expr.startswith('default '): - return parse_default(tokens, name, context) - elif expr.startswith('inherit '): - return parse_inherit(tokens, name, context) - elif expr.startswith('def '): - return parse_def(tokens, name, context) - elif expr.startswith('#'): - return ('comment', pos, tokens[0][0]), tokens[1:] - return ('expr', pos, tokens[0][0]), tokens[1:] - - -def parse_cond(tokens, name, context): - start = tokens[0][1] - pieces = [] - context = context + ('if',) - while 1: - if not tokens: - raise TemplateError( - 'Missing {{endif}}', - position=start, name=name) - if (isinstance(tokens[0], tuple) - and tokens[0][0] == 'endif'): - return ('cond', start) + tuple(pieces), tokens[1:] - next_chunk, tokens = parse_one_cond(tokens, name, context) - pieces.append(next_chunk) - - -def parse_one_cond(tokens, name, context): - (first, pos), tokens = tokens[0], tokens[1:] - content = [] - if first.endswith(':'): - first = first[:-1] - if first.startswith('if '): - part = ('if', pos, first[3:].lstrip(), content) - elif first.startswith('elif '): - part = ('elif', pos, first[5:].lstrip(), content) - elif first == 'else': - part = ('else', pos, None, content) - else: - assert 0, "Unexpected token %r at %s" % (first, pos) - while 1: - if not tokens: - raise TemplateError( - 'No {{endif}}', - position=pos, name=name) - if (isinstance(tokens[0], tuple) - and (tokens[0][0] == 'endif' - or tokens[0][0].startswith('elif ') - or tokens[0][0] == 'else')): - return part, tokens - next_chunk, tokens = parse_expr(tokens, name, context) - content.append(next_chunk) - - -def parse_for(tokens, name, context): - first, pos = tokens[0] - tokens = tokens[1:] - context = ('for',) + context - content = [] - assert first.startswith('for ') - if first.endswith(':'): - first = first[:-1] - first = first[3:].strip() - match = in_re.search(first) - if not match: - raise TemplateError( - 'Bad for (no "in") in %r' % first, - position=pos, name=name) - vars = first[:match.start()] - if '(' in vars: - raise TemplateError( - 'You cannot have () in the variable section of a for loop (%r)' - % vars, position=pos, name=name) - vars = tuple([ - v.strip() for v in first[:match.start()].split(',') - if v.strip()]) - expr = first[match.end():] - while 1: - if not tokens: - raise TemplateError( - 'No {{endfor}}', - position=pos, name=name) - if (isinstance(tokens[0], tuple) - and tokens[0][0] == 'endfor'): - return ('for', pos, vars, expr, content), tokens[1:] - next_chunk, tokens = parse_expr(tokens, name, context) - content.append(next_chunk) - - -def parse_default(tokens, name, context): - first, pos = tokens[0] - assert first.startswith('default ') - first = first.split(None, 1)[1] - parts = first.split('=', 1) - if len(parts) == 1: - raise TemplateError( - "Expression must be {{default var=value}}; no = found in %r" % first, - position=pos, name=name) - var = parts[0].strip() - if ',' in var: - raise TemplateError( - "{{default x, y = ...}} is not supported", - position=pos, name=name) - if not var_re.search(var): - raise TemplateError( - "Not a valid variable name for {{default}}: %r" - % var, position=pos, name=name) - expr = parts[1].strip() - return ('default', pos, var, expr), tokens[1:] - - -def parse_inherit(tokens, name, context): - first, pos = tokens[0] - assert first.startswith('inherit ') - expr = first.split(None, 1)[1] - return ('inherit', pos, expr), tokens[1:] - - -def parse_def(tokens, name, context): - first, start = tokens[0] - tokens = tokens[1:] - assert first.startswith('def ') - first = first.split(None, 1)[1] - if first.endswith(':'): - first = first[:-1] - if '(' not in first: - func_name = first - sig = ((), None, None, {}) - elif not first.endswith(')'): - raise TemplateError("Function definition doesn't end with ): %s" % first, - position=start, name=name) - else: - first = first[:-1] - func_name, sig_text = first.split('(', 1) - sig = parse_signature(sig_text, name, start) - context = context + ('def',) - content = [] - while 1: - if not tokens: - raise TemplateError( - 'Missing {{enddef}}', - position=start, name=name) - if (isinstance(tokens[0], tuple) - and tokens[0][0] == 'enddef'): - return ('def', start, func_name, sig, content), tokens[1:] - next_chunk, tokens = parse_expr(tokens, name, context) - content.append(next_chunk) - - -def parse_signature(sig_text, name, pos): - tokens = tokenize.generate_tokens(StringIO(sig_text).readline) - sig_args = [] - var_arg = None - var_kw = None - defaults = {} - - def get_token(pos=False): - try: - tok_type, tok_string, (srow, scol), (erow, ecol), line = next(tokens) - except StopIteration: - return tokenize.ENDMARKER, '' - if pos: - return tok_type, tok_string, (srow, scol), (erow, ecol) - else: - return tok_type, tok_string - while 1: - var_arg_type = None - tok_type, tok_string = get_token() - if tok_type == tokenize.ENDMARKER: - break - if tok_type == tokenize.OP and (tok_string == '*' or tok_string == '**'): - var_arg_type = tok_string - tok_type, tok_string = get_token() - if tok_type != tokenize.NAME: - raise TemplateError('Invalid signature: (%s)' % sig_text, - position=pos, name=name) - var_name = tok_string - tok_type, tok_string = get_token() - if tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','): - if var_arg_type == '*': - var_arg = var_name - elif var_arg_type == '**': - var_kw = var_name - else: - sig_args.append(var_name) - if tok_type == tokenize.ENDMARKER: - break - continue - if var_arg_type is not None: - raise TemplateError('Invalid signature: (%s)' % sig_text, - position=pos, name=name) - if tok_type == tokenize.OP and tok_string == '=': - nest_type = None - unnest_type = None - nest_count = 0 - start_pos = end_pos = None - parts = [] - while 1: - tok_type, tok_string, s, e = get_token(True) - if start_pos is None: - start_pos = s - end_pos = e - if tok_type == tokenize.ENDMARKER and nest_count: - raise TemplateError('Invalid signature: (%s)' % sig_text, - position=pos, name=name) - if (not nest_count and - (tok_type == tokenize.ENDMARKER or (tok_type == tokenize.OP and tok_string == ','))): - default_expr = isolate_expression(sig_text, start_pos, end_pos) - defaults[var_name] = default_expr - sig_args.append(var_name) - break - parts.append((tok_type, tok_string)) - if nest_count and tok_type == tokenize.OP and tok_string == nest_type: - nest_count += 1 - elif nest_count and tok_type == tokenize.OP and tok_string == unnest_type: - nest_count -= 1 - if not nest_count: - nest_type = unnest_type = None - elif not nest_count and tok_type == tokenize.OP and tok_string in ('(', '[', '{'): - nest_type = tok_string - nest_count = 1 - unnest_type = {'(': ')', '[': ']', '{': '}'}[nest_type] - return sig_args, var_arg, var_kw, defaults - - -def isolate_expression(string, start_pos, end_pos): - srow, scol = start_pos - srow -= 1 - erow, ecol = end_pos - erow -= 1 - lines = string.splitlines(True) - if srow == erow: - return lines[srow][scol:ecol] - parts = [lines[srow][scol:]] - parts.extend(lines[srow+1:erow]) - if erow < len(lines): - # It'll sometimes give (end_row_past_finish, 0) - parts.append(lines[erow][:ecol]) - return ''.join(parts) - -_fill_command_usage = """\ -%prog [OPTIONS] TEMPLATE arg=value - -Use py:arg=value to set a Python value; otherwise all values are -strings. -""" - - -def fill_command(args=None): - import sys - import optparse - import pkg_resources - import os - if args is None: - args = sys.argv[1:] - dist = pkg_resources.get_distribution('Paste') - parser = optparse.OptionParser( - version=coerce_text(dist), - usage=_fill_command_usage) - parser.add_option( - '-o', '--output', - dest='output', - metavar="FILENAME", - help="File to write output to (default stdout)") - parser.add_option( - '--html', - dest='use_html', - action='store_true', - help="Use HTML style filling (including automatic HTML quoting)") - parser.add_option( - '--env', - dest='use_env', - action='store_true', - help="Put the environment in as top-level variables") - options, args = parser.parse_args(args) - if len(args) < 1: - print('You must give a template filename') - sys.exit(2) - template_name = args[0] - args = args[1:] - vars = {} - if options.use_env: - vars.update(os.environ) - for value in args: - if '=' not in value: - print('Bad argument: %r' % value) - sys.exit(2) - name, value = value.split('=', 1) - if name.startswith('py:'): - name = name[:3] - value = eval(value) - vars[name] = value - if template_name == '-': - template_content = sys.stdin.read() - template_name = '' - else: - f = open(template_name, 'rb') - template_content = f.read() - f.close() - if options.use_html: - TemplateClass = HTMLTemplate - else: - TemplateClass = Template - template = TemplateClass(template_content, name=template_name) - result = template.substitute(vars) - if options.output: - f = open(options.output, 'wb') - f.write(result) - f.close() - else: - sys.stdout.write(result) - -if __name__ == '__main__': - fill_command() diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/compat3.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/compat3.py deleted file mode 100644 index 9905530757a..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tempita/compat3.py +++ /dev/null @@ -1,47 +0,0 @@ -import sys - -__all__ = ['b', 'basestring_', 'bytes', 'unicode_', 'next', 'is_unicode'] - -if sys.version < "3": - b = bytes = str - basestring_ = basestring - unicode_ = unicode -else: - - def b(s): - if isinstance(s, str): - return s.encode('latin1') - return bytes(s) - basestring_ = (bytes, str) - bytes = bytes - unicode_ = str -text = str - -if sys.version < "3": - - def next(obj): - return obj.next() -else: - next = next - -if sys.version < "3": - - def is_unicode(obj): - return isinstance(obj, unicode) -else: - - def is_unicode(obj): - return isinstance(obj, str) - - -def coerce_text(v): - if not isinstance(v, basestring_): - if sys.version < "3": - attr = '__unicode__' - else: - attr = '__str__' - if hasattr(v, attr): - return unicode(v) - else: - return bytes(v) - return v diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/TestUtils.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/TestUtils.py deleted file mode 100644 index 9d6eb67fc3d..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/TestUtils.py +++ /dev/null @@ -1,217 +0,0 @@ -from __future__ import absolute_import - -import os -import unittest -import tempfile - -from .Compiler import Errors -from .CodeWriter import CodeWriter -from .Compiler.TreeFragment import TreeFragment, strip_common_indent -from .Compiler.Visitor import TreeVisitor, VisitorTransform -from .Compiler import TreePath - - -class NodeTypeWriter(TreeVisitor): - def __init__(self): - super(NodeTypeWriter, self).__init__() - self._indents = 0 - self.result = [] - - def visit_Node(self, node): - if not self.access_path: - name = u"(root)" - else: - tip = self.access_path[-1] - if tip[2] is not None: - name = u"%s[%d]" % tip[1:3] - else: - name = tip[1] - - self.result.append(u" " * self._indents + - u"%s: %s" % (name, node.__class__.__name__)) - self._indents += 1 - self.visitchildren(node) - self._indents -= 1 - - -def treetypes(root): - """Returns a string representing the tree by class names. - There's a leading and trailing whitespace so that it can be - compared by simple string comparison while still making test - cases look ok.""" - w = NodeTypeWriter() - w.visit(root) - return u"\n".join([u""] + w.result + [u""]) - - -class CythonTest(unittest.TestCase): - - def setUp(self): - self.listing_file = Errors.listing_file - self.echo_file = Errors.echo_file - Errors.listing_file = Errors.echo_file = None - - def tearDown(self): - Errors.listing_file = self.listing_file - Errors.echo_file = self.echo_file - - def assertLines(self, expected, result): - "Checks that the given strings or lists of strings are equal line by line" - if not isinstance(expected, list): - expected = expected.split(u"\n") - if not isinstance(result, list): - result = result.split(u"\n") - for idx, (expected_line, result_line) in enumerate(zip(expected, result)): - self.assertEqual(expected_line, result_line, - "Line %d:\nExp: %s\nGot: %s" % (idx, expected_line, result_line)) - self.assertEqual(len(expected), len(result), - "Unmatched lines. Got:\n%s\nExpected:\n%s" % ("\n".join(expected), u"\n".join(result))) - - def codeToLines(self, tree): - writer = CodeWriter() - writer.write(tree) - return writer.result.lines - - def codeToString(self, tree): - return "\n".join(self.codeToLines(tree)) - - def assertCode(self, expected, result_tree): - result_lines = self.codeToLines(result_tree) - - expected_lines = strip_common_indent(expected.split("\n")) - - for idx, (line, expected_line) in enumerate(zip(result_lines, expected_lines)): - self.assertEqual(expected_line, line, - "Line %d:\nGot: %s\nExp: %s" % (idx, line, expected_line)) - self.assertEqual(len(result_lines), len(expected_lines), - "Unmatched lines. Got:\n%s\nExpected:\n%s" % ("\n".join(result_lines), expected)) - - def assertNodeExists(self, path, result_tree): - self.assertNotEqual(TreePath.find_first(result_tree, path), None, - "Path '%s' not found in result tree" % path) - - def fragment(self, code, pxds=None, pipeline=None): - "Simply create a tree fragment using the name of the test-case in parse errors." - if pxds is None: - pxds = {} - if pipeline is None: - pipeline = [] - name = self.id() - if name.startswith("__main__."): - name = name[len("__main__."):] - name = name.replace(".", "_") - return TreeFragment(code, name, pxds, pipeline=pipeline) - - def treetypes(self, root): - return treetypes(root) - - def should_fail(self, func, exc_type=Exception): - """Calls "func" and fails if it doesn't raise the right exception - (any exception by default). Also returns the exception in question. - """ - try: - func() - self.fail("Expected an exception of type %r" % exc_type) - except exc_type as e: - self.assertTrue(isinstance(e, exc_type)) - return e - - def should_not_fail(self, func): - """Calls func and succeeds if and only if no exception is raised - (i.e. converts exception raising into a failed testcase). Returns - the return value of func.""" - try: - return func() - except Exception as exc: - self.fail(str(exc)) - - -class TransformTest(CythonTest): - """ - Utility base class for transform unit tests. It is based around constructing - test trees (either explicitly or by parsing a Cython code string); running - the transform, serialize it using a customized Cython serializer (with - special markup for nodes that cannot be represented in Cython), - and do a string-comparison line-by-line of the result. - - To create a test case: - - Call run_pipeline. The pipeline should at least contain the transform you - are testing; pyx should be either a string (passed to the parser to - create a post-parse tree) or a node representing input to pipeline. - The result will be a transformed result. - - - Check that the tree is correct. If wanted, assertCode can be used, which - takes a code string as expected, and a ModuleNode in result_tree - (it serializes the ModuleNode to a string and compares line-by-line). - - All code strings are first stripped for whitespace lines and then common - indentation. - - Plans: One could have a pxd dictionary parameter to run_pipeline. - """ - - def run_pipeline(self, pipeline, pyx, pxds=None): - if pxds is None: - pxds = {} - tree = self.fragment(pyx, pxds).root - # Run pipeline - for T in pipeline: - tree = T(tree) - return tree - - -class TreeAssertVisitor(VisitorTransform): - # actually, a TreeVisitor would be enough, but this needs to run - # as part of the compiler pipeline - - def visit_CompilerDirectivesNode(self, node): - directives = node.directives - if 'test_assert_path_exists' in directives: - for path in directives['test_assert_path_exists']: - if TreePath.find_first(node, path) is None: - Errors.error( - node.pos, - "Expected path '%s' not found in result tree" % path) - if 'test_fail_if_path_exists' in directives: - for path in directives['test_fail_if_path_exists']: - if TreePath.find_first(node, path) is not None: - Errors.error( - node.pos, - "Unexpected path '%s' found in result tree" % path) - self.visitchildren(node) - return node - - visit_Node = VisitorTransform.recurse_to_children - - -def unpack_source_tree(tree_file, dir=None): - if dir is None: - dir = tempfile.mkdtemp() - header = [] - cur_file = None - f = open(tree_file) - try: - lines = f.readlines() - finally: - f.close() - del f - try: - for line in lines: - if line[:5] == '#####': - filename = line.strip().strip('#').strip().replace('/', os.path.sep) - path = os.path.join(dir, filename) - if not os.path.exists(os.path.dirname(path)): - os.makedirs(os.path.dirname(path)) - if cur_file is not None: - f, cur_file = cur_file, None - f.close() - cur_file = open(path, 'w') - elif cur_file is not None: - cur_file.write(line) - elif line.strip() and not line.lstrip().startswith('#'): - if line.strip() not in ('"""', "'''"): - header.append(line) - finally: - if cur_file is not None: - cur_file.close() - return dir, ''.join(header) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestCodeWriter.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestCodeWriter.py deleted file mode 100644 index 42e457da20e..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestCodeWriter.py +++ /dev/null @@ -1,82 +0,0 @@ -from Cython.TestUtils import CythonTest - -class TestCodeWriter(CythonTest): - # CythonTest uses the CodeWriter heavily, so do some checking by - # roundtripping Cython code through the test framework. - - # Note that this test is dependent upon the normal Cython parser - # to generate the input trees to the CodeWriter. This save *a lot* - # of time; better to spend that time writing other tests than perfecting - # this one... - - # Whitespace is very significant in this process: - # - always newline on new block (!) - # - indent 4 spaces - # - 1 space around every operator - - def t(self, codestr): - self.assertCode(codestr, self.fragment(codestr).root) - - def test_print(self): - self.t(u""" - print x, y - print x + y ** 2 - print x, y, z, - """) - - def test_if(self): - self.t(u"if x:\n pass") - - def test_ifelifelse(self): - self.t(u""" - if x: - pass - elif y: - pass - elif z + 34 ** 34 - 2: - pass - else: - pass - """) - - def test_def(self): - self.t(u""" - def f(x, y, z): - pass - def f(x = 34, y = 54, z): - pass - """) - - def test_longness_and_signedness(self): - self.t(u"def f(unsigned long long long long long int y):\n pass") - - def test_signed_short(self): - self.t(u"def f(signed short int y):\n pass") - - def test_typed_args(self): - self.t(u"def f(int x, unsigned long int y):\n pass") - - def test_cdef_var(self): - self.t(u""" - cdef int hello - cdef int hello = 4, x = 3, y, z - """) - - def test_for_loop(self): - self.t(u""" - for x, y, z in f(g(h(34) * 2) + 23): - print x, y, z - else: - print 43 - """) - - def test_inplace_assignment(self): - self.t(u"x += 43") - - def test_attribute(self): - self.t(u"a.x") - -if __name__ == "__main__": - import unittest - unittest.main() - diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestCythonUtils.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestCythonUtils.py deleted file mode 100644 index 2641900c012..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestCythonUtils.py +++ /dev/null @@ -1,11 +0,0 @@ -import unittest - -from ..Utils import build_hex_version - -class TestCythonUtils(unittest.TestCase): - def test_build_hex_version(self): - self.assertEqual('0x001D00A1', build_hex_version('0.29a1')) - self.assertEqual('0x001D00A1', build_hex_version('0.29a1')) - self.assertEqual('0x001D03C4', build_hex_version('0.29.3rc4')) - self.assertEqual('0x001D00F0', build_hex_version('0.29')) - self.assertEqual('0x040000F0', build_hex_version('4.0')) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestJediTyper.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestJediTyper.py deleted file mode 100644 index 253adef1715..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestJediTyper.py +++ /dev/null @@ -1,225 +0,0 @@ -# -*- coding: utf-8 -*- -# tag: jedi - -from __future__ import absolute_import - -import sys -import os.path - -from textwrap import dedent -from contextlib import contextmanager -from tempfile import NamedTemporaryFile - -from Cython.Compiler.ParseTreeTransforms import NormalizeTree, InterpretCompilerDirectives -from Cython.Compiler import Main, Symtab, Visitor -from Cython.TestUtils import TransformTest - -TOOLS_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'Tools')) - - -@contextmanager -def _tempfile(code): - code = dedent(code) - if not isinstance(code, bytes): - code = code.encode('utf8') - - with NamedTemporaryFile(suffix='.py') as f: - f.write(code) - f.seek(0) - yield f - - -def _test_typing(code, inject=False): - sys.path.insert(0, TOOLS_DIR) - try: - import jedityper - finally: - sys.path.remove(TOOLS_DIR) - lines = [] - with _tempfile(code) as f: - types = jedityper.analyse(f.name) - if inject: - lines = jedityper.inject_types(f.name, types) - return types, lines - - -class DeclarationsFinder(Visitor.VisitorTransform): - directives = None - - visit_Node = Visitor.VisitorTransform.recurse_to_children - - def visit_CompilerDirectivesNode(self, node): - if not self.directives: - self.directives = [] - self.directives.append(node) - self.visitchildren(node) - return node - - -class TestJediTyper(TransformTest): - def _test(self, code): - return _test_typing(code)[0] - - def test_typing_global_int_loop(self): - code = '''\ - for i in range(10): - a = i + 1 - ''' - types = self._test(code) - self.assertIn((None, (1, 0)), types) - variables = types.pop((None, (1, 0))) - self.assertFalse(types) - self.assertEqual({'a': set(['int']), 'i': set(['int'])}, variables) - - def test_typing_function_int_loop(self): - code = '''\ - def func(x): - for i in range(x): - a = i + 1 - return a - ''' - types = self._test(code) - self.assertIn(('func', (1, 0)), types) - variables = types.pop(('func', (1, 0))) - self.assertFalse(types) - self.assertEqual({'a': set(['int']), 'i': set(['int'])}, variables) - - def test_conflicting_types_in_function(self): - code = '''\ - def func(a, b): - print(a) - a = 1 - b += a - a = 'abc' - return a, str(b) - - print(func(1.5, 2)) - ''' - types = self._test(code) - self.assertIn(('func', (1, 0)), types) - variables = types.pop(('func', (1, 0))) - self.assertFalse(types) - self.assertEqual({'a': set(['float', 'int', 'str']), 'b': set(['int'])}, variables) - - def _test_typing_function_char_loop(self): - code = '''\ - def func(x): - l = [] - for c in x: - l.append(c) - return l - - print(func('abcdefg')) - ''' - types = self._test(code) - self.assertIn(('func', (1, 0)), types) - variables = types.pop(('func', (1, 0))) - self.assertFalse(types) - self.assertEqual({'a': set(['int']), 'i': set(['int'])}, variables) - - def test_typing_global_list(self): - code = '''\ - a = [x for x in range(10)] - b = list(range(10)) - c = a + b - d = [0]*10 - ''' - types = self._test(code) - self.assertIn((None, (1, 0)), types) - variables = types.pop((None, (1, 0))) - self.assertFalse(types) - self.assertEqual({'a': set(['list']), 'b': set(['list']), 'c': set(['list']), 'd': set(['list'])}, variables) - - def test_typing_function_list(self): - code = '''\ - def func(x): - a = [[], []] - b = [0]* 10 + a - c = a[0] - - print(func([0]*100)) - ''' - types = self._test(code) - self.assertIn(('func', (1, 0)), types) - variables = types.pop(('func', (1, 0))) - self.assertFalse(types) - self.assertEqual({'a': set(['list']), 'b': set(['list']), 'c': set(['list']), 'x': set(['list'])}, variables) - - def test_typing_global_dict(self): - code = '''\ - a = dict() - b = {i: i**2 for i in range(10)} - c = a - ''' - types = self._test(code) - self.assertIn((None, (1, 0)), types) - variables = types.pop((None, (1, 0))) - self.assertFalse(types) - self.assertEqual({'a': set(['dict']), 'b': set(['dict']), 'c': set(['dict'])}, variables) - - def test_typing_function_dict(self): - code = '''\ - def func(x): - a = dict() - b = {i: i**2 for i in range(10)} - c = x - - print(func({1:2, 'x':7})) - ''' - types = self._test(code) - self.assertIn(('func', (1, 0)), types) - variables = types.pop(('func', (1, 0))) - self.assertFalse(types) - self.assertEqual({'a': set(['dict']), 'b': set(['dict']), 'c': set(['dict']), 'x': set(['dict'])}, variables) - - - def test_typing_global_set(self): - code = '''\ - a = set() - # b = {i for i in range(10)} # jedi does not support set comprehension yet - c = a - d = {1,2,3} - e = a | b - ''' - types = self._test(code) - self.assertIn((None, (1, 0)), types) - variables = types.pop((None, (1, 0))) - self.assertFalse(types) - self.assertEqual({'a': set(['set']), 'c': set(['set']), 'd': set(['set']), 'e': set(['set'])}, variables) - - def test_typing_function_set(self): - code = '''\ - def func(x): - a = set() - # b = {i for i in range(10)} # jedi does not support set comprehension yet - c = a - d = a | b - - print(func({1,2,3})) - ''' - types = self._test(code) - self.assertIn(('func', (1, 0)), types) - variables = types.pop(('func', (1, 0))) - self.assertFalse(types) - self.assertEqual({'a': set(['set']), 'c': set(['set']), 'd': set(['set']), 'x': set(['set'])}, variables) - - -class TestTypeInjection(TestJediTyper): - """ - Subtype of TestJediTyper that additionally tests type injection and compilation. - """ - def setUp(self): - super(TestTypeInjection, self).setUp() - compilation_options = Main.CompilationOptions(Main.default_options) - ctx = compilation_options.create_context() - transform = InterpretCompilerDirectives(ctx, ctx.compiler_directives) - transform.module_scope = Symtab.ModuleScope('__main__', None, ctx) - self.declarations_finder = DeclarationsFinder() - self.pipeline = [NormalizeTree(None), transform, self.declarations_finder] - - def _test(self, code): - types, lines = _test_typing(code, inject=True) - tree = self.run_pipeline(self.pipeline, ''.join(lines)) - directives = self.declarations_finder.directives - # TODO: validate directives - return types diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestStringIOTree.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestStringIOTree.py deleted file mode 100644 index a15f2cd88d7..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/TestStringIOTree.py +++ /dev/null @@ -1,67 +0,0 @@ -import unittest - -from Cython import StringIOTree as stringtree - -code = """ -cdef int spam # line 1 - -cdef ham(): - a = 1 - b = 2 - c = 3 - d = 4 - -def eggs(): - pass - -cpdef bacon(): - print spam - print 'scotch' - print 'tea?' - print 'or coffee?' # line 16 -""" - -linemap = dict(enumerate(code.splitlines())) - -class TestStringIOTree(unittest.TestCase): - - def setUp(self): - self.tree = stringtree.StringIOTree() - - def test_markers(self): - assert not self.tree.allmarkers() - - def test_insertion(self): - self.write_lines((1, 2, 3)) - line_4_to_6_insertion_point = self.tree.insertion_point() - self.write_lines((7, 8)) - line_9_to_13_insertion_point = self.tree.insertion_point() - self.write_lines((14, 15, 16)) - - line_4_insertion_point = line_4_to_6_insertion_point.insertion_point() - self.write_lines((5, 6), tree=line_4_to_6_insertion_point) - - line_9_to_12_insertion_point = ( - line_9_to_13_insertion_point.insertion_point()) - self.write_line(13, tree=line_9_to_13_insertion_point) - - self.write_line(4, tree=line_4_insertion_point) - self.write_line(9, tree=line_9_to_12_insertion_point) - line_10_insertion_point = line_9_to_12_insertion_point.insertion_point() - self.write_line(11, tree=line_9_to_12_insertion_point) - self.write_line(10, tree=line_10_insertion_point) - self.write_line(12, tree=line_9_to_12_insertion_point) - - self.assertEqual(self.tree.allmarkers(), list(range(1, 17))) - self.assertEqual(code.strip(), self.tree.getvalue().strip()) - - - def write_lines(self, linenos, tree=None): - for lineno in linenos: - self.write_line(lineno, tree=tree) - - def write_line(self, lineno, tree=None): - if tree is None: - tree = self.tree - tree.markers.append(lineno) - tree.write(linemap[lineno] + '\n') diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/__init__.py deleted file mode 100644 index fa81adaff68..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# empty file diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/xmlrunner.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/xmlrunner.py deleted file mode 100644 index d6838aa22ec..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Tests/xmlrunner.py +++ /dev/null @@ -1,397 +0,0 @@ -# -*- coding: utf-8 -*- - -"""unittest-xml-reporting is a PyUnit-based TestRunner that can export test -results to XML files that can be consumed by a wide range of tools, such as -build systems, IDEs and Continuous Integration servers. - -This module provides the XMLTestRunner class, which is heavily based on the -default TextTestRunner. This makes the XMLTestRunner very simple to use. - -The script below, adapted from the unittest documentation, shows how to use -XMLTestRunner in a very simple way. In fact, the only difference between this -script and the original one is the last line: - -import random -import unittest -import xmlrunner - -class TestSequenceFunctions(unittest.TestCase): - def setUp(self): - self.seq = range(10) - - def test_shuffle(self): - # make sure the shuffled sequence does not lose any elements - random.shuffle(self.seq) - self.seq.sort() - self.assertEqual(self.seq, range(10)) - - def test_choice(self): - element = random.choice(self.seq) - self.assertTrue(element in self.seq) - - def test_sample(self): - self.assertRaises(ValueError, random.sample, self.seq, 20) - for element in random.sample(self.seq, 5): - self.assertTrue(element in self.seq) - -if __name__ == '__main__': - unittest.main(testRunner=xmlrunner.XMLTestRunner(output='test-reports')) -""" - -from __future__ import absolute_import - -import os -import sys -import time -from unittest import TestResult, TextTestResult, TextTestRunner -import xml.dom.minidom -try: - from StringIO import StringIO -except ImportError: - from io import StringIO # doesn't accept 'str' in Py2 - - -class XMLDocument(xml.dom.minidom.Document): - def createCDATAOrText(self, data): - if ']]>' in data: - return self.createTextNode(data) - return self.createCDATASection(data) - - -class _TestInfo(object): - """This class is used to keep useful information about the execution of a - test method. - """ - - # Possible test outcomes - (SUCCESS, FAILURE, ERROR) = range(3) - - def __init__(self, test_result, test_method, outcome=SUCCESS, err=None): - "Create a new instance of _TestInfo." - self.test_result = test_result - self.test_method = test_method - self.outcome = outcome - self.err = err - self.stdout = test_result.stdout and test_result.stdout.getvalue().strip() or '' - self.stderr = test_result.stdout and test_result.stderr.getvalue().strip() or '' - - def get_elapsed_time(self): - """Return the time that shows how long the test method took to - execute. - """ - return self.test_result.stop_time - self.test_result.start_time - - def get_description(self): - "Return a text representation of the test method." - return self.test_result.getDescription(self.test_method) - - def get_error_info(self): - """Return a text representation of an exception thrown by a test - method. - """ - if not self.err: - return '' - return self.test_result._exc_info_to_string( - self.err, self.test_method) - - -class _XMLTestResult(TextTestResult): - """A test result class that can express test results in a XML report. - - Used by XMLTestRunner. - """ - def __init__(self, stream=sys.stderr, descriptions=1, verbosity=1, - elapsed_times=True): - "Create a new instance of _XMLTestResult." - TextTestResult.__init__(self, stream, descriptions, verbosity) - self.successes = [] - self.callback = None - self.elapsed_times = elapsed_times - self.output_patched = False - - def _prepare_callback(self, test_info, target_list, verbose_str, - short_str): - """Append a _TestInfo to the given target list and sets a callback - method to be called by stopTest method. - """ - target_list.append(test_info) - def callback(): - """This callback prints the test method outcome to the stream, - as well as the elapsed time. - """ - - # Ignore the elapsed times for a more reliable unit testing - if not self.elapsed_times: - self.start_time = self.stop_time = 0 - - if self.showAll: - self.stream.writeln('(%.3fs) %s' % \ - (test_info.get_elapsed_time(), verbose_str)) - elif self.dots: - self.stream.write(short_str) - self.callback = callback - - def _patch_standard_output(self): - """Replace the stdout and stderr streams with string-based streams - in order to capture the tests' output. - """ - if not self.output_patched: - (self.old_stdout, self.old_stderr) = (sys.stdout, sys.stderr) - self.output_patched = True - (sys.stdout, sys.stderr) = (self.stdout, self.stderr) = \ - (StringIO(), StringIO()) - - def _restore_standard_output(self): - "Restore the stdout and stderr streams." - (sys.stdout, sys.stderr) = (self.old_stdout, self.old_stderr) - self.output_patched = False - - def startTest(self, test): - "Called before execute each test method." - self._patch_standard_output() - self.start_time = time.time() - TestResult.startTest(self, test) - - if self.showAll: - self.stream.write(' ' + self.getDescription(test)) - self.stream.write(" ... ") - - def stopTest(self, test): - "Called after execute each test method." - self._restore_standard_output() - TextTestResult.stopTest(self, test) - self.stop_time = time.time() - - if self.callback and callable(self.callback): - self.callback() - self.callback = None - - def addSuccess(self, test): - "Called when a test executes successfully." - self._prepare_callback(_TestInfo(self, test), - self.successes, 'OK', '.') - - def addFailure(self, test, err): - "Called when a test method fails." - self._prepare_callback(_TestInfo(self, test, _TestInfo.FAILURE, err), - self.failures, 'FAIL', 'F') - - def addError(self, test, err): - "Called when a test method raises an error." - self._prepare_callback(_TestInfo(self, test, _TestInfo.ERROR, err), - self.errors, 'ERROR', 'E') - - def printErrorList(self, flavour, errors): - "Write some information about the FAIL or ERROR to the stream." - for test_info in errors: - if isinstance(test_info, tuple): - test_info, exc_info = test_info - - try: - t = test_info.get_elapsed_time() - except AttributeError: - t = 0 - try: - descr = test_info.get_description() - except AttributeError: - try: - descr = test_info.getDescription() - except AttributeError: - descr = str(test_info) - try: - err_info = test_info.get_error_info() - except AttributeError: - err_info = str(test_info) - - self.stream.writeln(self.separator1) - self.stream.writeln('%s [%.3fs]: %s' % (flavour, t, descr)) - self.stream.writeln(self.separator2) - self.stream.writeln('%s' % err_info) - - def _get_info_by_testcase(self): - """This method organizes test results by TestCase module. This - information is used during the report generation, where a XML report - will be generated for each TestCase. - """ - tests_by_testcase = {} - - for tests in (self.successes, self.failures, self.errors): - for test_info in tests: - if not isinstance(test_info, _TestInfo): - print("Unexpected test result type: %r" % (test_info,)) - continue - testcase = type(test_info.test_method) - - # Ignore module name if it is '__main__' - module = testcase.__module__ + '.' - if module == '__main__.': - module = '' - testcase_name = module + testcase.__name__ - - if testcase_name not in tests_by_testcase: - tests_by_testcase[testcase_name] = [] - tests_by_testcase[testcase_name].append(test_info) - - return tests_by_testcase - - def _report_testsuite(suite_name, tests, xml_document): - "Appends the testsuite section to the XML document." - testsuite = xml_document.createElement('testsuite') - xml_document.appendChild(testsuite) - - testsuite.setAttribute('name', str(suite_name)) - testsuite.setAttribute('tests', str(len(tests))) - - testsuite.setAttribute('time', '%.3f' % - sum([e.get_elapsed_time() for e in tests])) - - failures = len([1 for e in tests if e.outcome == _TestInfo.FAILURE]) - testsuite.setAttribute('failures', str(failures)) - - errors = len([1 for e in tests if e.outcome == _TestInfo.ERROR]) - testsuite.setAttribute('errors', str(errors)) - - return testsuite - - _report_testsuite = staticmethod(_report_testsuite) - - def _report_testcase(suite_name, test_result, xml_testsuite, xml_document): - "Appends a testcase section to the XML document." - testcase = xml_document.createElement('testcase') - xml_testsuite.appendChild(testcase) - - testcase.setAttribute('classname', str(suite_name)) - testcase.setAttribute('name', test_result.test_method.shortDescription() - or getattr(test_result.test_method, '_testMethodName', - str(test_result.test_method))) - testcase.setAttribute('time', '%.3f' % test_result.get_elapsed_time()) - - if (test_result.outcome != _TestInfo.SUCCESS): - elem_name = ('failure', 'error')[test_result.outcome-1] - failure = xml_document.createElement(elem_name) - testcase.appendChild(failure) - - failure.setAttribute('type', str(test_result.err[0].__name__)) - failure.setAttribute('message', str(test_result.err[1])) - - error_info = test_result.get_error_info() - failureText = xml_document.createCDATAOrText(error_info) - failure.appendChild(failureText) - - _report_testcase = staticmethod(_report_testcase) - - def _report_output(test_runner, xml_testsuite, xml_document, stdout, stderr): - "Appends the system-out and system-err sections to the XML document." - systemout = xml_document.createElement('system-out') - xml_testsuite.appendChild(systemout) - - systemout_text = xml_document.createCDATAOrText(stdout) - systemout.appendChild(systemout_text) - - systemerr = xml_document.createElement('system-err') - xml_testsuite.appendChild(systemerr) - - systemerr_text = xml_document.createCDATAOrText(stderr) - systemerr.appendChild(systemerr_text) - - _report_output = staticmethod(_report_output) - - def generate_reports(self, test_runner): - "Generates the XML reports to a given XMLTestRunner object." - all_results = self._get_info_by_testcase() - - if type(test_runner.output) == str and not \ - os.path.exists(test_runner.output): - os.makedirs(test_runner.output) - - for suite, tests in all_results.items(): - doc = XMLDocument() - - # Build the XML file - testsuite = _XMLTestResult._report_testsuite(suite, tests, doc) - stdout, stderr = [], [] - for test in tests: - _XMLTestResult._report_testcase(suite, test, testsuite, doc) - if test.stdout: - stdout.extend(['*****************', test.get_description(), test.stdout]) - if test.stderr: - stderr.extend(['*****************', test.get_description(), test.stderr]) - _XMLTestResult._report_output(test_runner, testsuite, doc, - '\n'.join(stdout), '\n'.join(stderr)) - xml_content = doc.toprettyxml(indent='\t') - - if type(test_runner.output) is str: - report_file = open('%s%sTEST-%s.xml' % \ - (test_runner.output, os.sep, suite), 'w') - try: - report_file.write(xml_content) - finally: - report_file.close() - else: - # Assume that test_runner.output is a stream - test_runner.output.write(xml_content) - - -class XMLTestRunner(TextTestRunner): - """A test runner class that outputs the results in JUnit like XML files. - """ - def __init__(self, output='.', stream=None, descriptions=True, verbose=False, elapsed_times=True): - "Create a new instance of XMLTestRunner." - if stream is None: - stream = sys.stderr - verbosity = (1, 2)[verbose] - TextTestRunner.__init__(self, stream, descriptions, verbosity) - self.output = output - self.elapsed_times = elapsed_times - - def _make_result(self): - """Create the TestResult object which will be used to store - information about the executed tests. - """ - return _XMLTestResult(self.stream, self.descriptions, \ - self.verbosity, self.elapsed_times) - - def run(self, test): - "Run the given test case or test suite." - # Prepare the test execution - result = self._make_result() - - # Print a nice header - self.stream.writeln() - self.stream.writeln('Running tests...') - self.stream.writeln(result.separator2) - - # Execute tests - start_time = time.time() - test(result) - stop_time = time.time() - time_taken = stop_time - start_time - - # Generate reports - self.stream.writeln() - self.stream.writeln('Generating XML reports...') - result.generate_reports(self) - - # Print results - result.printErrors() - self.stream.writeln(result.separator2) - run = result.testsRun - self.stream.writeln("Ran %d test%s in %.3fs" % - (run, run != 1 and "s" or "", time_taken)) - self.stream.writeln() - - # Error traces - if not result.wasSuccessful(): - self.stream.write("FAILED (") - failed, errored = (len(result.failures), len(result.errors)) - if failed: - self.stream.write("failures=%d" % failed) - if errored: - if failed: - self.stream.write(", ") - self.stream.write("errors=%d" % errored) - self.stream.writeln(")") - else: - self.stream.writeln("OK") - - return result diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/AsyncGen.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/AsyncGen.c deleted file mode 100644 index 9a11d6a129c..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/AsyncGen.c +++ /dev/null @@ -1,1133 +0,0 @@ -// This is copied from genobject.c in CPython 3.6. -// Try to keep it in sync by doing this from time to time: -// sed -e 's|__pyx_||ig' Cython/Utility/AsyncGen.c | diff -udw - cpython/Objects/genobject.c | less - -//////////////////// AsyncGenerator.proto //////////////////// -//@requires: Coroutine.c::Coroutine - -#define __Pyx_AsyncGen_USED -typedef struct { - __pyx_CoroutineObject coro; - PyObject *ag_finalizer; - int ag_hooks_inited; - int ag_closed; -} __pyx_PyAsyncGenObject; - -static PyTypeObject *__pyx__PyAsyncGenWrappedValueType = 0; -static PyTypeObject *__pyx__PyAsyncGenASendType = 0; -static PyTypeObject *__pyx__PyAsyncGenAThrowType = 0; -static PyTypeObject *__pyx_AsyncGenType = 0; - -#define __Pyx_AsyncGen_CheckExact(obj) (Py_TYPE(obj) == __pyx_AsyncGenType) -#define __pyx_PyAsyncGenASend_CheckExact(o) \ - (Py_TYPE(o) == __pyx__PyAsyncGenASendType) -#define __pyx_PyAsyncGenAThrow_CheckExact(o) \ - (Py_TYPE(o) == __pyx__PyAsyncGenAThrowType) - -static PyObject *__Pyx_async_gen_anext(PyObject *o); -static CYTHON_INLINE PyObject *__Pyx_async_gen_asend_iternext(PyObject *o); -static PyObject *__Pyx_async_gen_asend_send(PyObject *o, PyObject *arg); -static PyObject *__Pyx_async_gen_asend_close(PyObject *o, PyObject *args); -static PyObject *__Pyx_async_gen_athrow_close(PyObject *o, PyObject *args); - -static PyObject *__Pyx__PyAsyncGenValueWrapperNew(PyObject *val); - - -static __pyx_CoroutineObject *__Pyx_AsyncGen_New( - __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, - PyObject *name, PyObject *qualname, PyObject *module_name) { - __pyx_PyAsyncGenObject *gen = PyObject_GC_New(__pyx_PyAsyncGenObject, __pyx_AsyncGenType); - if (unlikely(!gen)) - return NULL; - gen->ag_finalizer = NULL; - gen->ag_closed = 0; - gen->ag_hooks_inited = 0; - return __Pyx__Coroutine_NewInit((__pyx_CoroutineObject*)gen, body, code, closure, name, qualname, module_name); -} - -static int __pyx_AsyncGen_init(void); -static void __Pyx_PyAsyncGen_Fini(void); - -//////////////////// AsyncGenerator.cleanup //////////////////// - -__Pyx_PyAsyncGen_Fini(); - -//////////////////// AsyncGeneratorInitFinalizer //////////////////// - -// this is separated out because it needs more adaptation - -#if PY_VERSION_HEX < 0x030600B0 -static int __Pyx_async_gen_init_hooks(__pyx_PyAsyncGenObject *o) { -#if 0 - // TODO: implement finalizer support in older Python versions - PyThreadState *tstate; - PyObject *finalizer; - PyObject *firstiter; -#endif - - if (likely(o->ag_hooks_inited)) { - return 0; - } - - o->ag_hooks_inited = 1; - -#if 0 - tstate = __Pyx_PyThreadState_Current; - - finalizer = tstate->async_gen_finalizer; - if (finalizer) { - Py_INCREF(finalizer); - o->ag_finalizer = finalizer; - } - - firstiter = tstate->async_gen_firstiter; - if (firstiter) { - PyObject *res; - - Py_INCREF(firstiter); - res = __Pyx_PyObject_CallOneArg(firstiter, (PyObject*)o); - Py_DECREF(firstiter); - if (res == NULL) { - return 1; - } - Py_DECREF(res); - } -#endif - - return 0; -} -#endif - - -//////////////////// AsyncGenerator //////////////////// -//@requires: AsyncGeneratorInitFinalizer -//@requires: Coroutine.c::Coroutine -//@requires: Coroutine.c::ReturnWithStopIteration -//@requires: ObjectHandling.c::PyObjectCall2Args -//@requires: ObjectHandling.c::PyObject_GenericGetAttrNoDict - -PyDoc_STRVAR(__Pyx_async_gen_send_doc, -"send(arg) -> send 'arg' into generator,\n\ -return next yielded value or raise StopIteration."); - -PyDoc_STRVAR(__Pyx_async_gen_close_doc, -"close() -> raise GeneratorExit inside generator."); - -PyDoc_STRVAR(__Pyx_async_gen_throw_doc, -"throw(typ[,val[,tb]]) -> raise exception in generator,\n\ -return next yielded value or raise StopIteration."); - -PyDoc_STRVAR(__Pyx_async_gen_await_doc, -"__await__() -> return a representation that can be passed into the 'await' expression."); - -// COPY STARTS HERE: - -static PyObject *__Pyx_async_gen_asend_new(__pyx_PyAsyncGenObject *, PyObject *); -static PyObject *__Pyx_async_gen_athrow_new(__pyx_PyAsyncGenObject *, PyObject *); - -static const char *__Pyx_NON_INIT_CORO_MSG = "can't send non-None value to a just-started coroutine"; -static const char *__Pyx_ASYNC_GEN_IGNORED_EXIT_MSG = "async generator ignored GeneratorExit"; - -typedef enum { - __PYX_AWAITABLE_STATE_INIT, /* new awaitable, has not yet been iterated */ - __PYX_AWAITABLE_STATE_ITER, /* being iterated */ - __PYX_AWAITABLE_STATE_CLOSED, /* closed */ -} __pyx_AwaitableState; - -typedef struct { - PyObject_HEAD - __pyx_PyAsyncGenObject *ags_gen; - - /* Can be NULL, when in the __anext__() mode (equivalent of "asend(None)") */ - PyObject *ags_sendval; - - __pyx_AwaitableState ags_state; -} __pyx_PyAsyncGenASend; - - -typedef struct { - PyObject_HEAD - __pyx_PyAsyncGenObject *agt_gen; - - /* Can be NULL, when in the "aclose()" mode (equivalent of "athrow(GeneratorExit)") */ - PyObject *agt_args; - - __pyx_AwaitableState agt_state; -} __pyx_PyAsyncGenAThrow; - - -typedef struct { - PyObject_HEAD - PyObject *agw_val; -} __pyx__PyAsyncGenWrappedValue; - - -#ifndef _PyAsyncGen_MAXFREELIST -#define _PyAsyncGen_MAXFREELIST 80 -#endif - -// Freelists boost performance 6-10%; they also reduce memory -// fragmentation, as _PyAsyncGenWrappedValue and PyAsyncGenASend -// are short-living objects that are instantiated for every -// __anext__ call. - -static __pyx__PyAsyncGenWrappedValue *__Pyx_ag_value_freelist[_PyAsyncGen_MAXFREELIST]; -static int __Pyx_ag_value_freelist_free = 0; - -static __pyx_PyAsyncGenASend *__Pyx_ag_asend_freelist[_PyAsyncGen_MAXFREELIST]; -static int __Pyx_ag_asend_freelist_free = 0; - -#define __pyx__PyAsyncGenWrappedValue_CheckExact(o) \ - (Py_TYPE(o) == __pyx__PyAsyncGenWrappedValueType) - - -static int -__Pyx_async_gen_traverse(__pyx_PyAsyncGenObject *gen, visitproc visit, void *arg) -{ - Py_VISIT(gen->ag_finalizer); - return __Pyx_Coroutine_traverse((__pyx_CoroutineObject*)gen, visit, arg); -} - - -static PyObject * -__Pyx_async_gen_repr(__pyx_CoroutineObject *o) -{ - // avoid NULL pointer dereference for qualname during garbage collection - return PyUnicode_FromFormat("", - o->gi_qualname ? o->gi_qualname : Py_None, o); -} - - -#if PY_VERSION_HEX >= 0x030600B0 -static int -__Pyx_async_gen_init_hooks(__pyx_PyAsyncGenObject *o) -{ - PyThreadState *tstate; - PyObject *finalizer; - PyObject *firstiter; - - if (o->ag_hooks_inited) { - return 0; - } - - o->ag_hooks_inited = 1; - - tstate = __Pyx_PyThreadState_Current; - - finalizer = tstate->async_gen_finalizer; - if (finalizer) { - Py_INCREF(finalizer); - o->ag_finalizer = finalizer; - } - - firstiter = tstate->async_gen_firstiter; - if (firstiter) { - PyObject *res; -#if CYTHON_UNPACK_METHODS - PyObject *self; -#endif - - Py_INCREF(firstiter); - // at least asyncio stores methods here => optimise the call -#if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(firstiter)) && likely((self = PyMethod_GET_SELF(firstiter)) != NULL)) { - PyObject *function = PyMethod_GET_FUNCTION(firstiter); - res = __Pyx_PyObject_Call2Args(function, self, (PyObject*)o); - } else -#endif - res = __Pyx_PyObject_CallOneArg(firstiter, (PyObject*)o); - - Py_DECREF(firstiter); - if (unlikely(res == NULL)) { - return 1; - } - Py_DECREF(res); - } - - return 0; -} -#endif - - -static PyObject * -__Pyx_async_gen_anext(PyObject *g) -{ - __pyx_PyAsyncGenObject *o = (__pyx_PyAsyncGenObject*) g; - if (__Pyx_async_gen_init_hooks(o)) { - return NULL; - } - return __Pyx_async_gen_asend_new(o, NULL); -} - -static PyObject * -__Pyx_async_gen_anext_method(PyObject *g, CYTHON_UNUSED PyObject *arg) { - return __Pyx_async_gen_anext(g); -} - - -static PyObject * -__Pyx_async_gen_asend(__pyx_PyAsyncGenObject *o, PyObject *arg) -{ - if (__Pyx_async_gen_init_hooks(o)) { - return NULL; - } - return __Pyx_async_gen_asend_new(o, arg); -} - - -static PyObject * -__Pyx_async_gen_aclose(__pyx_PyAsyncGenObject *o, CYTHON_UNUSED PyObject *arg) -{ - if (__Pyx_async_gen_init_hooks(o)) { - return NULL; - } - return __Pyx_async_gen_athrow_new(o, NULL); -} - - -static PyObject * -__Pyx_async_gen_athrow(__pyx_PyAsyncGenObject *o, PyObject *args) -{ - if (__Pyx_async_gen_init_hooks(o)) { - return NULL; - } - return __Pyx_async_gen_athrow_new(o, args); -} - - -static PyObject * -__Pyx_async_gen_self_method(PyObject *g, CYTHON_UNUSED PyObject *arg) { - return __Pyx_NewRef(g); -} - - -static PyGetSetDef __Pyx_async_gen_getsetlist[] = { - {(char*) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, - (char*) PyDoc_STR("name of the async generator"), 0}, - {(char*) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, - (char*) PyDoc_STR("qualified name of the async generator"), 0}, - //REMOVED: {(char*) "ag_await", (getter)coro_get_cr_await, NULL, - //REMOVED: (char*) PyDoc_STR("object being awaited on, or None")}, - {0, 0, 0, 0, 0} /* Sentinel */ -}; - -static PyMemberDef __Pyx_async_gen_memberlist[] = { - //REMOVED: {(char*) "ag_frame", T_OBJECT, offsetof(__pyx_PyAsyncGenObject, ag_frame), READONLY}, - {(char*) "ag_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL}, - //REMOVED: {(char*) "ag_code", T_OBJECT, offsetof(__pyx_PyAsyncGenObject, ag_code), READONLY}, - //ADDED: "ag_await" - {(char*) "ag_await", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, - (char*) PyDoc_STR("object being awaited on, or None")}, - {0, 0, 0, 0, 0} /* Sentinel */ -}; - -PyDoc_STRVAR(__Pyx_async_aclose_doc, -"aclose() -> raise GeneratorExit inside generator."); - -PyDoc_STRVAR(__Pyx_async_asend_doc, -"asend(v) -> send 'v' in generator."); - -PyDoc_STRVAR(__Pyx_async_athrow_doc, -"athrow(typ[,val[,tb]]) -> raise exception in generator."); - -PyDoc_STRVAR(__Pyx_async_aiter_doc, -"__aiter__(v) -> return an asynchronous iterator."); - -PyDoc_STRVAR(__Pyx_async_anext_doc, -"__anext__(v) -> continue asynchronous iteration and return the next element."); - -static PyMethodDef __Pyx_async_gen_methods[] = { - {"asend", (PyCFunction)__Pyx_async_gen_asend, METH_O, __Pyx_async_asend_doc}, - {"athrow",(PyCFunction)__Pyx_async_gen_athrow, METH_VARARGS, __Pyx_async_athrow_doc}, - {"aclose", (PyCFunction)__Pyx_async_gen_aclose, METH_NOARGS, __Pyx_async_aclose_doc}, - {"__aiter__", (PyCFunction)__Pyx_async_gen_self_method, METH_NOARGS, __Pyx_async_aiter_doc}, - {"__anext__", (PyCFunction)__Pyx_async_gen_anext_method, METH_NOARGS, __Pyx_async_anext_doc}, - {0, 0, 0, 0} /* Sentinel */ -}; - - -#if CYTHON_USE_ASYNC_SLOTS -static __Pyx_PyAsyncMethodsStruct __Pyx_async_gen_as_async = { - 0, /* am_await */ - PyObject_SelfIter, /* am_aiter */ - (unaryfunc)__Pyx_async_gen_anext, /* am_anext */ -#if PY_VERSION_HEX >= 0x030A00A3 - 0, /*am_send*/ -#endif -}; -#endif - -static PyTypeObject __pyx_AsyncGenType_type = { - PyVarObject_HEAD_INIT(0, 0) - "async_generator", /* tp_name */ - sizeof(__pyx_PyAsyncGenObject), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)__Pyx_Coroutine_dealloc, /* tp_dealloc */ - 0, /* tp_print */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ -#if CYTHON_USE_ASYNC_SLOTS - &__Pyx_async_gen_as_async, /* tp_as_async */ -#else - 0, /*tp_reserved*/ -#endif - (reprfunc)__Pyx_async_gen_repr, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | - Py_TPFLAGS_HAVE_FINALIZE, /* tp_flags */ - 0, /* tp_doc */ - (traverseproc)__Pyx_async_gen_traverse, /* tp_traverse */ - 0, /* tp_clear */ -#if CYTHON_USE_ASYNC_SLOTS && CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1 - // in order to (mis-)use tp_reserved above, we must also implement tp_richcompare - __Pyx_Coroutine_compare, /*tp_richcompare*/ -#else - 0, /*tp_richcompare*/ -#endif - offsetof(__pyx_CoroutineObject, gi_weakreflist), /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ - __Pyx_async_gen_methods, /* tp_methods */ - __Pyx_async_gen_memberlist, /* tp_members */ - __Pyx_async_gen_getsetlist, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ -#if CYTHON_USE_TP_FINALIZE - 0, /*tp_del*/ -#else - __Pyx_Coroutine_del, /*tp_del*/ -#endif - 0, /* tp_version_tag */ -#if CYTHON_USE_TP_FINALIZE - __Pyx_Coroutine_del, /* tp_finalize */ -#elif PY_VERSION_HEX >= 0x030400a1 - 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, /*tp_vectorcall*/ -#endif -#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ -#endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 - 0, /*tp_pypy_flags*/ -#endif -}; - - -static int -__Pyx_PyAsyncGen_ClearFreeLists(void) -{ - int ret = __Pyx_ag_value_freelist_free + __Pyx_ag_asend_freelist_free; - - while (__Pyx_ag_value_freelist_free) { - __pyx__PyAsyncGenWrappedValue *o; - o = __Pyx_ag_value_freelist[--__Pyx_ag_value_freelist_free]; - assert(__pyx__PyAsyncGenWrappedValue_CheckExact(o)); - PyObject_GC_Del(o); - } - - while (__Pyx_ag_asend_freelist_free) { - __pyx_PyAsyncGenASend *o; - o = __Pyx_ag_asend_freelist[--__Pyx_ag_asend_freelist_free]; - assert(Py_TYPE(o) == __pyx__PyAsyncGenASendType); - PyObject_GC_Del(o); - } - - return ret; -} - -static void -__Pyx_PyAsyncGen_Fini(void) -{ - __Pyx_PyAsyncGen_ClearFreeLists(); -} - - -static PyObject * -__Pyx_async_gen_unwrap_value(__pyx_PyAsyncGenObject *gen, PyObject *result) -{ - if (result == NULL) { - PyObject *exc_type = PyErr_Occurred(); - if (!exc_type) { - PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration); - gen->ag_closed = 1; - } else if (__Pyx_PyErr_GivenExceptionMatches2(exc_type, __Pyx_PyExc_StopAsyncIteration, PyExc_GeneratorExit)) { - gen->ag_closed = 1; - } - - return NULL; - } - - if (__pyx__PyAsyncGenWrappedValue_CheckExact(result)) { - /* async yield */ - __Pyx_ReturnWithStopIteration(((__pyx__PyAsyncGenWrappedValue*)result)->agw_val); - Py_DECREF(result); - return NULL; - } - - return result; -} - - -/* ---------- Async Generator ASend Awaitable ------------ */ - - -static void -__Pyx_async_gen_asend_dealloc(__pyx_PyAsyncGenASend *o) -{ - PyObject_GC_UnTrack((PyObject *)o); - Py_CLEAR(o->ags_gen); - Py_CLEAR(o->ags_sendval); - if (__Pyx_ag_asend_freelist_free < _PyAsyncGen_MAXFREELIST) { - assert(__pyx_PyAsyncGenASend_CheckExact(o)); - __Pyx_ag_asend_freelist[__Pyx_ag_asend_freelist_free++] = o; - } else { - PyObject_GC_Del(o); - } -} - -static int -__Pyx_async_gen_asend_traverse(__pyx_PyAsyncGenASend *o, visitproc visit, void *arg) -{ - Py_VISIT(o->ags_gen); - Py_VISIT(o->ags_sendval); - return 0; -} - - -static PyObject * -__Pyx_async_gen_asend_send(PyObject *g, PyObject *arg) -{ - __pyx_PyAsyncGenASend *o = (__pyx_PyAsyncGenASend*) g; - PyObject *result; - - if (unlikely(o->ags_state == __PYX_AWAITABLE_STATE_CLOSED)) { - PyErr_SetNone(PyExc_StopIteration); - return NULL; - } - - if (o->ags_state == __PYX_AWAITABLE_STATE_INIT) { - if (arg == NULL || arg == Py_None) { - arg = o->ags_sendval ? o->ags_sendval : Py_None; - } - o->ags_state = __PYX_AWAITABLE_STATE_ITER; - } - - result = __Pyx_Coroutine_Send((PyObject*)o->ags_gen, arg); - result = __Pyx_async_gen_unwrap_value(o->ags_gen, result); - - if (result == NULL) { - o->ags_state = __PYX_AWAITABLE_STATE_CLOSED; - } - - return result; -} - - -static CYTHON_INLINE PyObject * -__Pyx_async_gen_asend_iternext(PyObject *o) -{ - return __Pyx_async_gen_asend_send(o, Py_None); -} - - -static PyObject * -__Pyx_async_gen_asend_throw(__pyx_PyAsyncGenASend *o, PyObject *args) -{ - PyObject *result; - - if (unlikely(o->ags_state == __PYX_AWAITABLE_STATE_CLOSED)) { - PyErr_SetNone(PyExc_StopIteration); - return NULL; - } - - result = __Pyx_Coroutine_Throw((PyObject*)o->ags_gen, args); - result = __Pyx_async_gen_unwrap_value(o->ags_gen, result); - - if (result == NULL) { - o->ags_state = __PYX_AWAITABLE_STATE_CLOSED; - } - - return result; -} - - -static PyObject * -__Pyx_async_gen_asend_close(PyObject *g, CYTHON_UNUSED PyObject *args) -{ - __pyx_PyAsyncGenASend *o = (__pyx_PyAsyncGenASend*) g; - o->ags_state = __PYX_AWAITABLE_STATE_CLOSED; - Py_RETURN_NONE; -} - - -static PyMethodDef __Pyx_async_gen_asend_methods[] = { - {"send", (PyCFunction)__Pyx_async_gen_asend_send, METH_O, __Pyx_async_gen_send_doc}, - {"throw", (PyCFunction)__Pyx_async_gen_asend_throw, METH_VARARGS, __Pyx_async_gen_throw_doc}, - {"close", (PyCFunction)__Pyx_async_gen_asend_close, METH_NOARGS, __Pyx_async_gen_close_doc}, - {"__await__", (PyCFunction)__Pyx_async_gen_self_method, METH_NOARGS, __Pyx_async_gen_await_doc}, - {0, 0, 0, 0} /* Sentinel */ -}; - - -#if CYTHON_USE_ASYNC_SLOTS -static __Pyx_PyAsyncMethodsStruct __Pyx_async_gen_asend_as_async = { - PyObject_SelfIter, /* am_await */ - 0, /* am_aiter */ - 0, /* am_anext */ -#if PY_VERSION_HEX >= 0x030A00A3 - 0, /*am_send*/ -#endif -}; -#endif - - -static PyTypeObject __pyx__PyAsyncGenASendType_type = { - PyVarObject_HEAD_INIT(0, 0) - "async_generator_asend", /* tp_name */ - sizeof(__pyx_PyAsyncGenASend), /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)__Pyx_async_gen_asend_dealloc, /* tp_dealloc */ - 0, /* tp_print */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ -#if CYTHON_USE_ASYNC_SLOTS - &__Pyx_async_gen_asend_as_async, /* tp_as_async */ -#else - 0, /*tp_reserved*/ -#endif - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */ - 0, /* tp_doc */ - (traverseproc)__Pyx_async_gen_asend_traverse, /* tp_traverse */ - 0, /* tp_clear */ -#if CYTHON_USE_ASYNC_SLOTS && CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1 - // in order to (mis-)use tp_reserved above, we must also implement tp_richcompare - __Pyx_Coroutine_compare, /*tp_richcompare*/ -#else - 0, /*tp_richcompare*/ -#endif - 0, /* tp_weaklistoffset */ - PyObject_SelfIter, /* tp_iter */ - (iternextfunc)__Pyx_async_gen_asend_iternext, /* tp_iternext */ - __Pyx_async_gen_asend_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ - 0, /* tp_del */ - 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x030400a1 - 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, /*tp_vectorcall*/ -#endif -#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ -#endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 - 0, /*tp_pypy_flags*/ -#endif -}; - - -static PyObject * -__Pyx_async_gen_asend_new(__pyx_PyAsyncGenObject *gen, PyObject *sendval) -{ - __pyx_PyAsyncGenASend *o; - if (__Pyx_ag_asend_freelist_free) { - __Pyx_ag_asend_freelist_free--; - o = __Pyx_ag_asend_freelist[__Pyx_ag_asend_freelist_free]; - _Py_NewReference((PyObject *)o); - } else { - o = PyObject_GC_New(__pyx_PyAsyncGenASend, __pyx__PyAsyncGenASendType); - if (o == NULL) { - return NULL; - } - } - - Py_INCREF(gen); - o->ags_gen = gen; - - Py_XINCREF(sendval); - o->ags_sendval = sendval; - - o->ags_state = __PYX_AWAITABLE_STATE_INIT; - - PyObject_GC_Track((PyObject*)o); - return (PyObject*)o; -} - - -/* ---------- Async Generator Value Wrapper ------------ */ - - -static void -__Pyx_async_gen_wrapped_val_dealloc(__pyx__PyAsyncGenWrappedValue *o) -{ - PyObject_GC_UnTrack((PyObject *)o); - Py_CLEAR(o->agw_val); - if (__Pyx_ag_value_freelist_free < _PyAsyncGen_MAXFREELIST) { - assert(__pyx__PyAsyncGenWrappedValue_CheckExact(o)); - __Pyx_ag_value_freelist[__Pyx_ag_value_freelist_free++] = o; - } else { - PyObject_GC_Del(o); - } -} - - -static int -__Pyx_async_gen_wrapped_val_traverse(__pyx__PyAsyncGenWrappedValue *o, - visitproc visit, void *arg) -{ - Py_VISIT(o->agw_val); - return 0; -} - - -static PyTypeObject __pyx__PyAsyncGenWrappedValueType_type = { - PyVarObject_HEAD_INIT(0, 0) - "async_generator_wrapped_value", /* tp_name */ - sizeof(__pyx__PyAsyncGenWrappedValue), /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)__Pyx_async_gen_wrapped_val_dealloc, /* tp_dealloc */ - 0, /* tp_print */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_as_async */ - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */ - 0, /* tp_doc */ - (traverseproc)__Pyx_async_gen_wrapped_val_traverse, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - 0, /* tp_iternext */ - 0, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ - 0, /* tp_del */ - 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x030400a1 - 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, /*tp_vectorcall*/ -#endif -#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ -#endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 - 0, /*tp_pypy_flags*/ -#endif -}; - - -static PyObject * -__Pyx__PyAsyncGenValueWrapperNew(PyObject *val) -{ - // NOTE: steals a reference to val ! - __pyx__PyAsyncGenWrappedValue *o; - assert(val); - - if (__Pyx_ag_value_freelist_free) { - __Pyx_ag_value_freelist_free--; - o = __Pyx_ag_value_freelist[__Pyx_ag_value_freelist_free]; - assert(__pyx__PyAsyncGenWrappedValue_CheckExact(o)); - _Py_NewReference((PyObject*)o); - } else { - o = PyObject_GC_New(__pyx__PyAsyncGenWrappedValue, __pyx__PyAsyncGenWrappedValueType); - if (unlikely(!o)) { - Py_DECREF(val); - return NULL; - } - } - o->agw_val = val; - // no Py_INCREF(val) - steals reference! - PyObject_GC_Track((PyObject*)o); - return (PyObject*)o; -} - - -/* ---------- Async Generator AThrow awaitable ------------ */ - - -static void -__Pyx_async_gen_athrow_dealloc(__pyx_PyAsyncGenAThrow *o) -{ - PyObject_GC_UnTrack((PyObject *)o); - Py_CLEAR(o->agt_gen); - Py_CLEAR(o->agt_args); - PyObject_GC_Del(o); -} - - -static int -__Pyx_async_gen_athrow_traverse(__pyx_PyAsyncGenAThrow *o, visitproc visit, void *arg) -{ - Py_VISIT(o->agt_gen); - Py_VISIT(o->agt_args); - return 0; -} - - -static PyObject * -__Pyx_async_gen_athrow_send(__pyx_PyAsyncGenAThrow *o, PyObject *arg) -{ - __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*)o->agt_gen; - PyObject *retval; - - if (o->agt_state == __PYX_AWAITABLE_STATE_CLOSED) { - PyErr_SetNone(PyExc_StopIteration); - return NULL; - } - - if (o->agt_state == __PYX_AWAITABLE_STATE_INIT) { - if (o->agt_gen->ag_closed) { - PyErr_SetNone(PyExc_StopIteration); - return NULL; - } - - if (arg != Py_None) { - PyErr_SetString(PyExc_RuntimeError, __Pyx_NON_INIT_CORO_MSG); - return NULL; - } - - o->agt_state = __PYX_AWAITABLE_STATE_ITER; - - if (o->agt_args == NULL) { - /* aclose() mode */ - o->agt_gen->ag_closed = 1; - - retval = __Pyx__Coroutine_Throw((PyObject*)gen, - /* Do not close generator when - PyExc_GeneratorExit is passed */ - PyExc_GeneratorExit, NULL, NULL, NULL, 0); - - if (retval && __pyx__PyAsyncGenWrappedValue_CheckExact(retval)) { - Py_DECREF(retval); - goto yield_close; - } - } else { - PyObject *typ; - PyObject *tb = NULL; - PyObject *val = NULL; - - if (!PyArg_UnpackTuple(o->agt_args, "athrow", 1, 3, - &typ, &val, &tb)) { - return NULL; - } - - retval = __Pyx__Coroutine_Throw((PyObject*)gen, - /* Do not close generator when PyExc_GeneratorExit is passed */ - typ, val, tb, o->agt_args, 0); - retval = __Pyx_async_gen_unwrap_value(o->agt_gen, retval); - } - if (retval == NULL) { - goto check_error; - } - return retval; - } - - assert (o->agt_state == __PYX_AWAITABLE_STATE_ITER); - - retval = __Pyx_Coroutine_Send((PyObject *)gen, arg); - if (o->agt_args) { - return __Pyx_async_gen_unwrap_value(o->agt_gen, retval); - } else { - /* aclose() mode */ - if (retval) { - if (__pyx__PyAsyncGenWrappedValue_CheckExact(retval)) { - Py_DECREF(retval); - goto yield_close; - } - else { - return retval; - } - } - else { - goto check_error; - } - } - -yield_close: - PyErr_SetString( - PyExc_RuntimeError, __Pyx_ASYNC_GEN_IGNORED_EXIT_MSG); - return NULL; - -check_error: - if (PyErr_ExceptionMatches(__Pyx_PyExc_StopAsyncIteration)) { - o->agt_state = __PYX_AWAITABLE_STATE_CLOSED; - if (o->agt_args == NULL) { - // when aclose() is called we don't want to propagate - // StopAsyncIteration; just raise StopIteration, signalling - // that 'aclose()' is done. - PyErr_Clear(); - PyErr_SetNone(PyExc_StopIteration); - } - } - else if (PyErr_ExceptionMatches(PyExc_GeneratorExit)) { - o->agt_state = __PYX_AWAITABLE_STATE_CLOSED; - PyErr_Clear(); /* ignore these errors */ - PyErr_SetNone(PyExc_StopIteration); - } - return NULL; -} - - -static PyObject * -__Pyx_async_gen_athrow_throw(__pyx_PyAsyncGenAThrow *o, PyObject *args) -{ - PyObject *retval; - - if (o->agt_state == __PYX_AWAITABLE_STATE_INIT) { - PyErr_SetString(PyExc_RuntimeError, __Pyx_NON_INIT_CORO_MSG); - return NULL; - } - - if (o->agt_state == __PYX_AWAITABLE_STATE_CLOSED) { - PyErr_SetNone(PyExc_StopIteration); - return NULL; - } - - retval = __Pyx_Coroutine_Throw((PyObject*)o->agt_gen, args); - if (o->agt_args) { - return __Pyx_async_gen_unwrap_value(o->agt_gen, retval); - } else { - /* aclose() mode */ - if (retval && __pyx__PyAsyncGenWrappedValue_CheckExact(retval)) { - Py_DECREF(retval); - PyErr_SetString(PyExc_RuntimeError, __Pyx_ASYNC_GEN_IGNORED_EXIT_MSG); - return NULL; - } - return retval; - } -} - - -static PyObject * -__Pyx_async_gen_athrow_iternext(__pyx_PyAsyncGenAThrow *o) -{ - return __Pyx_async_gen_athrow_send(o, Py_None); -} - - -static PyObject * -__Pyx_async_gen_athrow_close(PyObject *g, CYTHON_UNUSED PyObject *args) -{ - __pyx_PyAsyncGenAThrow *o = (__pyx_PyAsyncGenAThrow*) g; - o->agt_state = __PYX_AWAITABLE_STATE_CLOSED; - Py_RETURN_NONE; -} - - -static PyMethodDef __Pyx_async_gen_athrow_methods[] = { - {"send", (PyCFunction)__Pyx_async_gen_athrow_send, METH_O, __Pyx_async_gen_send_doc}, - {"throw", (PyCFunction)__Pyx_async_gen_athrow_throw, METH_VARARGS, __Pyx_async_gen_throw_doc}, - {"close", (PyCFunction)__Pyx_async_gen_athrow_close, METH_NOARGS, __Pyx_async_gen_close_doc}, - {"__await__", (PyCFunction)__Pyx_async_gen_self_method, METH_NOARGS, __Pyx_async_gen_await_doc}, - {0, 0, 0, 0} /* Sentinel */ -}; - - -#if CYTHON_USE_ASYNC_SLOTS -static __Pyx_PyAsyncMethodsStruct __Pyx_async_gen_athrow_as_async = { - PyObject_SelfIter, /* am_await */ - 0, /* am_aiter */ - 0, /* am_anext */ -#if PY_VERSION_HEX >= 0x030A00A3 - 0, /*am_send*/ -#endif -}; -#endif - - -static PyTypeObject __pyx__PyAsyncGenAThrowType_type = { - PyVarObject_HEAD_INIT(0, 0) - "async_generator_athrow", /* tp_name */ - sizeof(__pyx_PyAsyncGenAThrow), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)__Pyx_async_gen_athrow_dealloc, /* tp_dealloc */ - 0, /* tp_print */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ -#if CYTHON_USE_ASYNC_SLOTS - &__Pyx_async_gen_athrow_as_async, /* tp_as_async */ -#else - 0, /*tp_reserved*/ -#endif - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags */ - 0, /* tp_doc */ - (traverseproc)__Pyx_async_gen_athrow_traverse, /* tp_traverse */ - 0, /* tp_clear */ -#if CYTHON_USE_ASYNC_SLOTS && CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1 - // in order to (mis-)use tp_reserved above, we must also implement tp_richcompare - __Pyx_Coroutine_compare, /*tp_richcompare*/ -#else - 0, /*tp_richcompare*/ -#endif - 0, /* tp_weaklistoffset */ - PyObject_SelfIter, /* tp_iter */ - (iternextfunc)__Pyx_async_gen_athrow_iternext, /* tp_iternext */ - __Pyx_async_gen_athrow_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - 0, /* tp_base */ - 0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - 0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - 0, /* tp_is_gc */ - 0, /* tp_bases */ - 0, /* tp_mro */ - 0, /* tp_cache */ - 0, /* tp_subclasses */ - 0, /* tp_weaklist */ - 0, /* tp_del */ - 0, /* tp_version_tag */ -#if PY_VERSION_HEX >= 0x030400a1 - 0, /* tp_finalize */ -#endif -#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, /*tp_vectorcall*/ -#endif -#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ -#endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 - 0, /*tp_pypy_flags*/ -#endif -}; - - -static PyObject * -__Pyx_async_gen_athrow_new(__pyx_PyAsyncGenObject *gen, PyObject *args) -{ - __pyx_PyAsyncGenAThrow *o; - o = PyObject_GC_New(__pyx_PyAsyncGenAThrow, __pyx__PyAsyncGenAThrowType); - if (o == NULL) { - return NULL; - } - o->agt_gen = gen; - o->agt_args = args; - o->agt_state = __PYX_AWAITABLE_STATE_INIT; - Py_INCREF(gen); - Py_XINCREF(args); - PyObject_GC_Track((PyObject*)o); - return (PyObject*)o; -} - - -/* ---------- global type sharing ------------ */ - -static int __pyx_AsyncGen_init(void) { - // on Windows, C-API functions can't be used in slots statically - __pyx_AsyncGenType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; - __pyx__PyAsyncGenWrappedValueType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; - __pyx__PyAsyncGenAThrowType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; - __pyx__PyAsyncGenASendType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; - - __pyx_AsyncGenType = __Pyx_FetchCommonType(&__pyx_AsyncGenType_type); - if (unlikely(!__pyx_AsyncGenType)) - return -1; - - __pyx__PyAsyncGenAThrowType = __Pyx_FetchCommonType(&__pyx__PyAsyncGenAThrowType_type); - if (unlikely(!__pyx__PyAsyncGenAThrowType)) - return -1; - - __pyx__PyAsyncGenWrappedValueType = __Pyx_FetchCommonType(&__pyx__PyAsyncGenWrappedValueType_type); - if (unlikely(!__pyx__PyAsyncGenWrappedValueType)) - return -1; - - __pyx__PyAsyncGenASendType = __Pyx_FetchCommonType(&__pyx__PyAsyncGenASendType_type); - if (unlikely(!__pyx__PyAsyncGenASendType)) - return -1; - - return 0; -} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Buffer.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Buffer.c deleted file mode 100644 index 3c7105fa356..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Buffer.c +++ /dev/null @@ -1,921 +0,0 @@ -/////////////// BufferStructDeclare.proto /////////////// - -/* structs for buffer access */ - -typedef struct { - Py_ssize_t shape, strides, suboffsets; -} __Pyx_Buf_DimInfo; - -typedef struct { - size_t refcount; - Py_buffer pybuffer; -} __Pyx_Buffer; - -typedef struct { - __Pyx_Buffer *rcbuffer; - char *data; - __Pyx_Buf_DimInfo diminfo[{{max_dims}}]; -} __Pyx_LocalBuf_ND; - -/////////////// BufferIndexError.proto /////////////// -static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/ - -/////////////// BufferIndexError /////////////// -static void __Pyx_RaiseBufferIndexError(int axis) { - PyErr_Format(PyExc_IndexError, - "Out of bounds on buffer access (axis %d)", axis); -} - -/////////////// BufferIndexErrorNogil.proto /////////////// -//@requires: BufferIndexError - -static void __Pyx_RaiseBufferIndexErrorNogil(int axis); /*proto*/ - -/////////////// BufferIndexErrorNogil /////////////// -static void __Pyx_RaiseBufferIndexErrorNogil(int axis) { - #ifdef WITH_THREAD - PyGILState_STATE gilstate = PyGILState_Ensure(); - #endif - __Pyx_RaiseBufferIndexError(axis); - #ifdef WITH_THREAD - PyGILState_Release(gilstate); - #endif -} - -/////////////// BufferFallbackError.proto /////////////// -static void __Pyx_RaiseBufferFallbackError(void); /*proto*/ - -/////////////// BufferFallbackError /////////////// -static void __Pyx_RaiseBufferFallbackError(void) { - PyErr_SetString(PyExc_ValueError, - "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); -} - -/////////////// BufferFormatStructs.proto /////////////// -//@proto_block: utility_code_proto_before_types - -#define IS_UNSIGNED(type) (((type) -1) > 0) - -/* Run-time type information about structs used with buffers */ -struct __Pyx_StructField_; - -#define __PYX_BUF_FLAGS_PACKED_STRUCT (1 << 0) - -typedef struct { - const char* name; /* for error messages only */ - struct __Pyx_StructField_* fields; - size_t size; /* sizeof(type) */ - size_t arraysize[8]; /* length of array in each dimension */ - int ndim; - char typegroup; /* _R_eal, _C_omplex, Signed _I_nt, _U_nsigned int, _S_truct, _P_ointer, _O_bject, c_H_ar */ - char is_unsigned; - int flags; -} __Pyx_TypeInfo; - -typedef struct __Pyx_StructField_ { - __Pyx_TypeInfo* type; - const char* name; - size_t offset; -} __Pyx_StructField; - -typedef struct { - __Pyx_StructField* field; - size_t parent_offset; -} __Pyx_BufFmt_StackElem; - -typedef struct { - __Pyx_StructField root; - __Pyx_BufFmt_StackElem* head; - size_t fmt_offset; - size_t new_count, enc_count; - size_t struct_alignment; - int is_complex; - char enc_type; - char new_packmode; - char enc_packmode; - char is_valid_array; -} __Pyx_BufFmt_Context; - - -/////////////// GetAndReleaseBuffer.proto /////////////// - -#if PY_MAJOR_VERSION < 3 - static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags); - static void __Pyx_ReleaseBuffer(Py_buffer *view); -#else - #define __Pyx_GetBuffer PyObject_GetBuffer - #define __Pyx_ReleaseBuffer PyBuffer_Release -#endif - -/////////////// GetAndReleaseBuffer /////////////// - -#if PY_MAJOR_VERSION < 3 -static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { - if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); - - {{for type_ptr, getbuffer, releasebuffer in types}} - {{if getbuffer}} - if (__Pyx_TypeCheck(obj, {{type_ptr}})) return {{getbuffer}}(obj, view, flags); - {{endif}} - {{endfor}} - - PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); - return -1; -} - -static void __Pyx_ReleaseBuffer(Py_buffer *view) { - PyObject *obj = view->obj; - if (!obj) return; - - if (PyObject_CheckBuffer(obj)) { - PyBuffer_Release(view); - return; - } - - if ((0)) {} - {{for type_ptr, getbuffer, releasebuffer in types}} - {{if releasebuffer}} - else if (__Pyx_TypeCheck(obj, {{type_ptr}})) {{releasebuffer}}(obj, view); - {{endif}} - {{endfor}} - - view->obj = NULL; - Py_DECREF(obj); -} - -#endif /* PY_MAJOR_VERSION < 3 */ - - -/////////////// BufferGetAndValidate.proto /////////////// - -#define __Pyx_GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack) \ - ((obj == Py_None || obj == NULL) ? \ - (__Pyx_ZeroBuffer(buf), 0) : \ - __Pyx__GetBufferAndValidate(buf, obj, dtype, flags, nd, cast, stack)) - -static int __Pyx__GetBufferAndValidate(Py_buffer* buf, PyObject* obj, - __Pyx_TypeInfo* dtype, int flags, int nd, int cast, __Pyx_BufFmt_StackElem* stack); -static void __Pyx_ZeroBuffer(Py_buffer* buf); -static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info);/*proto*/ - -static Py_ssize_t __Pyx_minusones[] = { {{ ", ".join(["-1"] * max_dims) }} }; -static Py_ssize_t __Pyx_zeros[] = { {{ ", ".join(["0"] * max_dims) }} }; - - -/////////////// BufferGetAndValidate /////////////// -//@requires: BufferFormatCheck - -static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { - if (unlikely(info->buf == NULL)) return; - if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; - __Pyx_ReleaseBuffer(info); -} - -static void __Pyx_ZeroBuffer(Py_buffer* buf) { - buf->buf = NULL; - buf->obj = NULL; - buf->strides = __Pyx_zeros; - buf->shape = __Pyx_zeros; - buf->suboffsets = __Pyx_minusones; -} - -static int __Pyx__GetBufferAndValidate( - Py_buffer* buf, PyObject* obj, __Pyx_TypeInfo* dtype, int flags, - int nd, int cast, __Pyx_BufFmt_StackElem* stack) -{ - buf->buf = NULL; - if (unlikely(__Pyx_GetBuffer(obj, buf, flags) == -1)) { - __Pyx_ZeroBuffer(buf); - return -1; - } - // From this point on, we have acquired the buffer and must release it on errors. - if (unlikely(buf->ndim != nd)) { - PyErr_Format(PyExc_ValueError, - "Buffer has wrong number of dimensions (expected %d, got %d)", - nd, buf->ndim); - goto fail; - } - if (!cast) { - __Pyx_BufFmt_Context ctx; - __Pyx_BufFmt_Init(&ctx, stack, dtype); - if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; - } - if (unlikely((size_t)buf->itemsize != dtype->size)) { - PyErr_Format(PyExc_ValueError, - "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)", - buf->itemsize, (buf->itemsize > 1) ? "s" : "", - dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); - goto fail; - } - if (buf->suboffsets == NULL) buf->suboffsets = __Pyx_minusones; - return 0; -fail:; - __Pyx_SafeReleaseBuffer(buf); - return -1; -} - - -/////////////// BufferFormatCheck.proto /////////////// - -// Buffer format string checking -// -// Buffer type checking. Utility code for checking that acquired -// buffers match our assumptions. We only need to check ndim and -// the format string; the access mode/flags is checked by the -// exporter. See: -// -// http://docs.python.org/3/library/struct.html -// http://legacy.python.org/dev/peps/pep-3118/#additions-to-the-struct-string-syntax -// -// The alignment code is copied from _struct.c in Python. - -static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts); -static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, - __Pyx_BufFmt_StackElem* stack, - __Pyx_TypeInfo* type); /*proto*/ - -/////////////// BufferFormatCheck /////////////// -//@requires: ModuleSetupCode.c::IsLittleEndian -//@requires: BufferFormatStructs - -static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, - __Pyx_BufFmt_StackElem* stack, - __Pyx_TypeInfo* type) { - stack[0].field = &ctx->root; - stack[0].parent_offset = 0; - ctx->root.type = type; - ctx->root.name = "buffer dtype"; - ctx->root.offset = 0; - ctx->head = stack; - ctx->head->field = &ctx->root; - ctx->fmt_offset = 0; - ctx->head->parent_offset = 0; - ctx->new_packmode = '@'; - ctx->enc_packmode = '@'; - ctx->new_count = 1; - ctx->enc_count = 0; - ctx->enc_type = 0; - ctx->is_complex = 0; - ctx->is_valid_array = 0; - ctx->struct_alignment = 0; - while (type->typegroup == 'S') { - ++ctx->head; - ctx->head->field = type->fields; - ctx->head->parent_offset = 0; - type = type->fields->type; - } -} - -static int __Pyx_BufFmt_ParseNumber(const char** ts) { - int count; - const char* t = *ts; - if (*t < '0' || *t > '9') { - return -1; - } else { - count = *t++ - '0'; - while (*t >= '0' && *t <= '9') { - count *= 10; - count += *t++ - '0'; - } - } - *ts = t; - return count; -} - -static int __Pyx_BufFmt_ExpectNumber(const char **ts) { - int number = __Pyx_BufFmt_ParseNumber(ts); - if (number == -1) /* First char was not a digit */ - PyErr_Format(PyExc_ValueError,\ - "Does not understand character buffer dtype format string ('%c')", **ts); - return number; -} - - -static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { - PyErr_Format(PyExc_ValueError, - "Unexpected format string character: '%c'", ch); -} - -static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { - switch (ch) { - case '?': return "'bool'"; - case 'c': return "'char'"; - case 'b': return "'signed char'"; - case 'B': return "'unsigned char'"; - case 'h': return "'short'"; - case 'H': return "'unsigned short'"; - case 'i': return "'int'"; - case 'I': return "'unsigned int'"; - case 'l': return "'long'"; - case 'L': return "'unsigned long'"; - case 'q': return "'long long'"; - case 'Q': return "'unsigned long long'"; - case 'f': return (is_complex ? "'complex float'" : "'float'"); - case 'd': return (is_complex ? "'complex double'" : "'double'"); - case 'g': return (is_complex ? "'complex long double'" : "'long double'"); - case 'T': return "a struct"; - case 'O': return "Python object"; - case 'P': return "a pointer"; - case 's': case 'p': return "a string"; - case 0: return "end"; - default: return "unparseable format string"; - } -} - -static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { - switch (ch) { - case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; - case 'h': case 'H': return 2; - case 'i': case 'I': case 'l': case 'L': return 4; - case 'q': case 'Q': return 8; - case 'f': return (is_complex ? 8 : 4); - case 'd': return (is_complex ? 16 : 8); - case 'g': { - PyErr_SetString(PyExc_ValueError, "Python does not define a standard format string size for long double ('g').."); - return 0; - } - case 'O': case 'P': return sizeof(void*); - default: - __Pyx_BufFmt_RaiseUnexpectedChar(ch); - return 0; - } -} - -static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { - switch (ch) { - case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; - case 'h': case 'H': return sizeof(short); - case 'i': case 'I': return sizeof(int); - case 'l': case 'L': return sizeof(long); - #ifdef HAVE_LONG_LONG - case 'q': case 'Q': return sizeof(PY_LONG_LONG); - #endif - case 'f': return sizeof(float) * (is_complex ? 2 : 1); - case 'd': return sizeof(double) * (is_complex ? 2 : 1); - case 'g': return sizeof(long double) * (is_complex ? 2 : 1); - case 'O': case 'P': return sizeof(void*); - default: { - __Pyx_BufFmt_RaiseUnexpectedChar(ch); - return 0; - } - } -} - -typedef struct { char c; short x; } __Pyx_st_short; -typedef struct { char c; int x; } __Pyx_st_int; -typedef struct { char c; long x; } __Pyx_st_long; -typedef struct { char c; float x; } __Pyx_st_float; -typedef struct { char c; double x; } __Pyx_st_double; -typedef struct { char c; long double x; } __Pyx_st_longdouble; -typedef struct { char c; void *x; } __Pyx_st_void_p; -#ifdef HAVE_LONG_LONG -typedef struct { char c; PY_LONG_LONG x; } __Pyx_st_longlong; -#endif - -static size_t __Pyx_BufFmt_TypeCharToAlignment(char ch, CYTHON_UNUSED int is_complex) { - switch (ch) { - case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; - case 'h': case 'H': return sizeof(__Pyx_st_short) - sizeof(short); - case 'i': case 'I': return sizeof(__Pyx_st_int) - sizeof(int); - case 'l': case 'L': return sizeof(__Pyx_st_long) - sizeof(long); -#ifdef HAVE_LONG_LONG - case 'q': case 'Q': return sizeof(__Pyx_st_longlong) - sizeof(PY_LONG_LONG); -#endif - case 'f': return sizeof(__Pyx_st_float) - sizeof(float); - case 'd': return sizeof(__Pyx_st_double) - sizeof(double); - case 'g': return sizeof(__Pyx_st_longdouble) - sizeof(long double); - case 'P': case 'O': return sizeof(__Pyx_st_void_p) - sizeof(void*); - default: - __Pyx_BufFmt_RaiseUnexpectedChar(ch); - return 0; - } -} - -/* These are for computing the padding at the end of the struct to align - on the first member of the struct. This will probably the same as above, - but we don't have any guarantees. - */ -typedef struct { short x; char c; } __Pyx_pad_short; -typedef struct { int x; char c; } __Pyx_pad_int; -typedef struct { long x; char c; } __Pyx_pad_long; -typedef struct { float x; char c; } __Pyx_pad_float; -typedef struct { double x; char c; } __Pyx_pad_double; -typedef struct { long double x; char c; } __Pyx_pad_longdouble; -typedef struct { void *x; char c; } __Pyx_pad_void_p; -#ifdef HAVE_LONG_LONG -typedef struct { PY_LONG_LONG x; char c; } __Pyx_pad_longlong; -#endif - -static size_t __Pyx_BufFmt_TypeCharToPadding(char ch, CYTHON_UNUSED int is_complex) { - switch (ch) { - case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; - case 'h': case 'H': return sizeof(__Pyx_pad_short) - sizeof(short); - case 'i': case 'I': return sizeof(__Pyx_pad_int) - sizeof(int); - case 'l': case 'L': return sizeof(__Pyx_pad_long) - sizeof(long); -#ifdef HAVE_LONG_LONG - case 'q': case 'Q': return sizeof(__Pyx_pad_longlong) - sizeof(PY_LONG_LONG); -#endif - case 'f': return sizeof(__Pyx_pad_float) - sizeof(float); - case 'd': return sizeof(__Pyx_pad_double) - sizeof(double); - case 'g': return sizeof(__Pyx_pad_longdouble) - sizeof(long double); - case 'P': case 'O': return sizeof(__Pyx_pad_void_p) - sizeof(void*); - default: - __Pyx_BufFmt_RaiseUnexpectedChar(ch); - return 0; - } -} - -static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { - switch (ch) { - case 'c': - return 'H'; - case 'b': case 'h': case 'i': - case 'l': case 'q': case 's': case 'p': - return 'I'; - case '?': case 'B': case 'H': case 'I': case 'L': case 'Q': - return 'U'; - case 'f': case 'd': case 'g': - return (is_complex ? 'C' : 'R'); - case 'O': - return 'O'; - case 'P': - return 'P'; - default: { - __Pyx_BufFmt_RaiseUnexpectedChar(ch); - return 0; - } - } -} - - -static void __Pyx_BufFmt_RaiseExpected(__Pyx_BufFmt_Context* ctx) { - if (ctx->head == NULL || ctx->head->field == &ctx->root) { - const char* expected; - const char* quote; - if (ctx->head == NULL) { - expected = "end"; - quote = ""; - } else { - expected = ctx->head->field->type->name; - quote = "'"; - } - PyErr_Format(PyExc_ValueError, - "Buffer dtype mismatch, expected %s%s%s but got %s", - quote, expected, quote, - __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex)); - } else { - __Pyx_StructField* field = ctx->head->field; - __Pyx_StructField* parent = (ctx->head - 1)->field; - PyErr_Format(PyExc_ValueError, - "Buffer dtype mismatch, expected '%s' but got %s in '%s.%s'", - field->type->name, __Pyx_BufFmt_DescribeTypeChar(ctx->enc_type, ctx->is_complex), - parent->type->name, field->name); - } -} - -static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { - char group; - size_t size, offset, arraysize = 1; - - /* printf("processing... %s\n", ctx->head->field->type->name); */ - - if (ctx->enc_type == 0) return 0; - - /* Validate array size */ - if (ctx->head->field->type->arraysize[0]) { - int i, ndim = 0; - - /* handle strings ('s' and 'p') */ - if (ctx->enc_type == 's' || ctx->enc_type == 'p') { - ctx->is_valid_array = ctx->head->field->type->ndim == 1; - ndim = 1; - if (ctx->enc_count != ctx->head->field->type->arraysize[0]) { - PyErr_Format(PyExc_ValueError, - "Expected a dimension of size %zu, got %zu", - ctx->head->field->type->arraysize[0], ctx->enc_count); - return -1; - } - } - - if (!ctx->is_valid_array) { - PyErr_Format(PyExc_ValueError, "Expected %d dimensions, got %d", - ctx->head->field->type->ndim, ndim); - return -1; - } - for (i = 0; i < ctx->head->field->type->ndim; i++) { - arraysize *= ctx->head->field->type->arraysize[i]; - } - ctx->is_valid_array = 0; - ctx->enc_count = 1; - } - - group = __Pyx_BufFmt_TypeCharToGroup(ctx->enc_type, ctx->is_complex); - do { - __Pyx_StructField* field = ctx->head->field; - __Pyx_TypeInfo* type = field->type; - - if (ctx->enc_packmode == '@' || ctx->enc_packmode == '^') { - size = __Pyx_BufFmt_TypeCharToNativeSize(ctx->enc_type, ctx->is_complex); - } else { - size = __Pyx_BufFmt_TypeCharToStandardSize(ctx->enc_type, ctx->is_complex); - } - - if (ctx->enc_packmode == '@') { - size_t align_at = __Pyx_BufFmt_TypeCharToAlignment(ctx->enc_type, ctx->is_complex); - size_t align_mod_offset; - if (align_at == 0) return -1; - align_mod_offset = ctx->fmt_offset % align_at; - if (align_mod_offset > 0) ctx->fmt_offset += align_at - align_mod_offset; - - if (ctx->struct_alignment == 0) - ctx->struct_alignment = __Pyx_BufFmt_TypeCharToPadding(ctx->enc_type, - ctx->is_complex); - } - - if (type->size != size || type->typegroup != group) { - if (type->typegroup == 'C' && type->fields != NULL) { - /* special case -- treat as struct rather than complex number */ - size_t parent_offset = ctx->head->parent_offset + field->offset; - ++ctx->head; - ctx->head->field = type->fields; - ctx->head->parent_offset = parent_offset; - continue; - } - - if ((type->typegroup == 'H' || group == 'H') && type->size == size) { - /* special case -- chars don't care about sign */ - } else { - __Pyx_BufFmt_RaiseExpected(ctx); - return -1; - } - } - - offset = ctx->head->parent_offset + field->offset; - if (ctx->fmt_offset != offset) { - PyErr_Format(PyExc_ValueError, - "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected", - (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); - return -1; - } - - ctx->fmt_offset += size; - if (arraysize) - ctx->fmt_offset += (arraysize - 1) * size; - - --ctx->enc_count; /* Consume from buffer string */ - - /* Done checking, move to next field, pushing or popping struct stack if needed */ - while (1) { - if (field == &ctx->root) { - ctx->head = NULL; - if (ctx->enc_count != 0) { - __Pyx_BufFmt_RaiseExpected(ctx); - return -1; - } - break; /* breaks both loops as ctx->enc_count == 0 */ - } - ctx->head->field = ++field; - if (field->type == NULL) { - --ctx->head; - field = ctx->head->field; - continue; - } else if (field->type->typegroup == 'S') { - size_t parent_offset = ctx->head->parent_offset + field->offset; - if (field->type->fields->type == NULL) continue; /* empty struct */ - field = field->type->fields; - ++ctx->head; - ctx->head->field = field; - ctx->head->parent_offset = parent_offset; - break; - } else { - break; - } - } - } while (ctx->enc_count); - ctx->enc_type = 0; - ctx->is_complex = 0; - return 0; -} - -/* Parse an array in the format string (e.g. (1,2,3)) */ -static PyObject * -__pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) -{ - const char *ts = *tsp; - int i = 0, number, ndim; - - ++ts; - if (ctx->new_count != 1) { - PyErr_SetString(PyExc_ValueError, - "Cannot handle repeated arrays in format string"); - return NULL; - } - - /* Process the previous element */ - if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; - - // store ndim now, as field advanced by __Pyx_BufFmt_ProcessTypeChunk call - ndim = ctx->head->field->type->ndim; - - /* Parse all numbers in the format string */ - while (*ts && *ts != ')') { - // ignore space characters (not using isspace() due to C/C++ problem on MacOS-X) - switch (*ts) { - case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; - default: break; /* not a 'break' in the loop */ - } - - number = __Pyx_BufFmt_ExpectNumber(&ts); - if (number == -1) return NULL; - - if (i < ndim && (size_t) number != ctx->head->field->type->arraysize[i]) - return PyErr_Format(PyExc_ValueError, - "Expected a dimension of size %zu, got %d", - ctx->head->field->type->arraysize[i], number); - - if (*ts != ',' && *ts != ')') - return PyErr_Format(PyExc_ValueError, - "Expected a comma in format string, got '%c'", *ts); - - if (*ts == ',') ts++; - i++; - } - - if (i != ndim) - return PyErr_Format(PyExc_ValueError, "Expected %d dimension(s), got %d", - ctx->head->field->type->ndim, i); - - if (!*ts) { - PyErr_SetString(PyExc_ValueError, - "Unexpected end of format string, expected ')'"); - return NULL; - } - - ctx->is_valid_array = 1; - ctx->new_count = 1; - *tsp = ++ts; - return Py_None; -} - -static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const char* ts) { - int got_Z = 0; - - while (1) { - /* puts(ts); */ - switch(*ts) { - case 0: - if (ctx->enc_type != 0 && ctx->head == NULL) { - __Pyx_BufFmt_RaiseExpected(ctx); - return NULL; - } - if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; - if (ctx->head != NULL) { - __Pyx_BufFmt_RaiseExpected(ctx); - return NULL; - } - return ts; - case ' ': - case '\r': - case '\n': - ++ts; - break; - case '<': - if (!__Pyx_Is_Little_Endian()) { - PyErr_SetString(PyExc_ValueError, "Little-endian buffer not supported on big-endian compiler"); - return NULL; - } - ctx->new_packmode = '='; - ++ts; - break; - case '>': - case '!': - if (__Pyx_Is_Little_Endian()) { - PyErr_SetString(PyExc_ValueError, "Big-endian buffer not supported on little-endian compiler"); - return NULL; - } - ctx->new_packmode = '='; - ++ts; - break; - case '=': - case '@': - case '^': - ctx->new_packmode = *ts++; - break; - case 'T': /* substruct */ - { - const char* ts_after_sub; - size_t i, struct_count = ctx->new_count; - size_t struct_alignment = ctx->struct_alignment; - ctx->new_count = 1; - ++ts; - if (*ts != '{') { - PyErr_SetString(PyExc_ValueError, "Buffer acquisition: Expected '{' after 'T'"); - return NULL; - } - if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; - ctx->enc_type = 0; /* Erase processed last struct element */ - ctx->enc_count = 0; - ctx->struct_alignment = 0; - ++ts; - ts_after_sub = ts; - for (i = 0; i != struct_count; ++i) { - ts_after_sub = __Pyx_BufFmt_CheckString(ctx, ts); - if (!ts_after_sub) return NULL; - } - ts = ts_after_sub; - if (struct_alignment) ctx->struct_alignment = struct_alignment; - } - break; - case '}': /* end of substruct; either repeat or move on */ - { - size_t alignment = ctx->struct_alignment; - ++ts; - if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; - ctx->enc_type = 0; /* Erase processed last struct element */ - if (alignment && ctx->fmt_offset % alignment) { - /* Pad struct on size of the first member */ - ctx->fmt_offset += alignment - (ctx->fmt_offset % alignment); - } - } - return ts; - case 'x': - if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; - ctx->fmt_offset += ctx->new_count; - ctx->new_count = 1; - ctx->enc_count = 0; - ctx->enc_type = 0; - ctx->enc_packmode = ctx->new_packmode; - ++ts; - break; - case 'Z': - got_Z = 1; - ++ts; - if (*ts != 'f' && *ts != 'd' && *ts != 'g') { - __Pyx_BufFmt_RaiseUnexpectedChar('Z'); - return NULL; - } - CYTHON_FALLTHROUGH; - case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': - case 'l': case 'L': case 'q': case 'Q': - case 'f': case 'd': case 'g': - case 'O': case 'p': - if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && - (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { - /* Continue pooling same type */ - ctx->enc_count += ctx->new_count; - ctx->new_count = 1; - got_Z = 0; - ++ts; - break; - } - CYTHON_FALLTHROUGH; - case 's': - /* 's' or new type (cannot be added to current pool) */ - if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; - ctx->enc_count = ctx->new_count; - ctx->enc_packmode = ctx->new_packmode; - ctx->enc_type = *ts; - ctx->is_complex = got_Z; - ++ts; - ctx->new_count = 1; - got_Z = 0; - break; - case ':': - ++ts; - while(*ts != ':') ++ts; - ++ts; - break; - case '(': - if (!__pyx_buffmt_parse_array(ctx, &ts)) return NULL; - break; - default: - { - int number = __Pyx_BufFmt_ExpectNumber(&ts); - if (number == -1) return NULL; - ctx->new_count = (size_t)number; - } - } - } -} - -/////////////// TypeInfoCompare.proto /////////////// -static int __pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b); - -/////////////// TypeInfoCompare /////////////// -//@requires: BufferFormatStructs - -// See if two dtypes are equal -static int -__pyx_typeinfo_cmp(__Pyx_TypeInfo *a, __Pyx_TypeInfo *b) -{ - int i; - - if (!a || !b) - return 0; - - if (a == b) - return 1; - - if (a->size != b->size || a->typegroup != b->typegroup || - a->is_unsigned != b->is_unsigned || a->ndim != b->ndim) { - if (a->typegroup == 'H' || b->typegroup == 'H') { - /* Special case for chars */ - return a->size == b->size; - } else { - return 0; - } - } - - if (a->ndim) { - /* Verify multidimensional C arrays */ - for (i = 0; i < a->ndim; i++) - if (a->arraysize[i] != b->arraysize[i]) - return 0; - } - - if (a->typegroup == 'S') { - /* Check for packed struct */ - if (a->flags != b->flags) - return 0; - - /* compare all struct fields */ - if (a->fields || b->fields) { - /* Check if both have fields */ - if (!(a->fields && b->fields)) - return 0; - - /* compare */ - for (i = 0; a->fields[i].type && b->fields[i].type; i++) { - __Pyx_StructField *field_a = a->fields + i; - __Pyx_StructField *field_b = b->fields + i; - - if (field_a->offset != field_b->offset || - !__pyx_typeinfo_cmp(field_a->type, field_b->type)) - return 0; - } - - /* If all fields are processed, we have a match */ - return !a->fields[i].type && !b->fields[i].type; - } - } - - return 1; -} - - -/////////////// TypeInfoToFormat.proto /////////////// -struct __pyx_typeinfo_string { - char string[3]; -}; -static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type); - -/////////////// TypeInfoToFormat /////////////// -//@requires: BufferFormatStructs - -// See also MemoryView.pyx:BufferFormatFromTypeInfo - -static struct __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *type) { - struct __pyx_typeinfo_string result = { {0} }; - char *buf = (char *) result.string; - size_t size = type->size; - - switch (type->typegroup) { - case 'H': - *buf = 'c'; - break; - case 'I': - case 'U': - if (size == 1) - *buf = (type->is_unsigned) ? 'B' : 'b'; - else if (size == 2) - *buf = (type->is_unsigned) ? 'H' : 'h'; - else if (size == 4) - *buf = (type->is_unsigned) ? 'I' : 'i'; - else if (size == 8) - *buf = (type->is_unsigned) ? 'Q' : 'q'; - break; - case 'P': - *buf = 'P'; - break; - case 'C': - { - __Pyx_TypeInfo complex_type = *type; - complex_type.typegroup = 'R'; - complex_type.size /= 2; - - *buf++ = 'Z'; - *buf = __Pyx_TypeInfoToFormat(&complex_type).string[0]; - break; - } - case 'R': - if (size == 4) - *buf = 'f'; - else if (size == 8) - *buf = 'd'; - else - *buf = 'g'; - break; - } - - return result; -} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Builtins.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Builtins.c deleted file mode 100644 index 32aeff8f265..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Builtins.c +++ /dev/null @@ -1,542 +0,0 @@ -/* - * Special implementations of built-in functions and methods. - * - * Optional optimisations for builtins are in Optimize.c. - * - * General object operations and protocols are in ObjectHandling.c. - */ - -//////////////////// Globals.proto //////////////////// - -static PyObject* __Pyx_Globals(void); /*proto*/ - -//////////////////// Globals //////////////////// -//@substitute: naming -//@requires: ObjectHandling.c::GetAttr - -// This is a stub implementation until we have something more complete. -// Currently, we only handle the most common case of a read-only dict -// of Python names. Supporting cdef names in the module and write -// access requires a rewrite as a dedicated class. - -static PyObject* __Pyx_Globals(void) { - Py_ssize_t i; - PyObject *names; - PyObject *globals = $moddict_cname; - Py_INCREF(globals); - names = PyObject_Dir($module_cname); - if (!names) - goto bad; - for (i = PyList_GET_SIZE(names)-1; i >= 0; i--) { -#if CYTHON_COMPILING_IN_PYPY - PyObject* name = PySequence_ITEM(names, i); - if (!name) - goto bad; -#else - PyObject* name = PyList_GET_ITEM(names, i); -#endif - if (!PyDict_Contains(globals, name)) { - PyObject* value = __Pyx_GetAttr($module_cname, name); - if (!value) { -#if CYTHON_COMPILING_IN_PYPY - Py_DECREF(name); -#endif - goto bad; - } - if (PyDict_SetItem(globals, name, value) < 0) { -#if CYTHON_COMPILING_IN_PYPY - Py_DECREF(name); -#endif - Py_DECREF(value); - goto bad; - } - } -#if CYTHON_COMPILING_IN_PYPY - Py_DECREF(name); -#endif - } - Py_DECREF(names); - return globals; -bad: - Py_XDECREF(names); - Py_XDECREF(globals); - return NULL; -} - -//////////////////// PyExecGlobals.proto //////////////////// - -static PyObject* __Pyx_PyExecGlobals(PyObject*); - -//////////////////// PyExecGlobals //////////////////// -//@requires: Globals -//@requires: PyExec - -static PyObject* __Pyx_PyExecGlobals(PyObject* code) { - PyObject* result; - PyObject* globals = __Pyx_Globals(); - if (unlikely(!globals)) - return NULL; - result = __Pyx_PyExec2(code, globals); - Py_DECREF(globals); - return result; -} - -//////////////////// PyExec.proto //////////////////// - -static PyObject* __Pyx_PyExec3(PyObject*, PyObject*, PyObject*); -static CYTHON_INLINE PyObject* __Pyx_PyExec2(PyObject*, PyObject*); - -//////////////////// PyExec //////////////////// -//@substitute: naming - -static CYTHON_INLINE PyObject* __Pyx_PyExec2(PyObject* o, PyObject* globals) { - return __Pyx_PyExec3(o, globals, NULL); -} - -static PyObject* __Pyx_PyExec3(PyObject* o, PyObject* globals, PyObject* locals) { - PyObject* result; - PyObject* s = 0; - char *code = 0; - - if (!globals || globals == Py_None) { - globals = $moddict_cname; - } else if (!PyDict_Check(globals)) { - PyErr_Format(PyExc_TypeError, "exec() arg 2 must be a dict, not %.200s", - Py_TYPE(globals)->tp_name); - goto bad; - } - if (!locals || locals == Py_None) { - locals = globals; - } - - if (__Pyx_PyDict_GetItemStr(globals, PYIDENT("__builtins__")) == NULL) { - if (PyDict_SetItem(globals, PYIDENT("__builtins__"), PyEval_GetBuiltins()) < 0) - goto bad; - } - - if (PyCode_Check(o)) { - if (__Pyx_PyCode_HasFreeVars((PyCodeObject *)o)) { - PyErr_SetString(PyExc_TypeError, - "code object passed to exec() may not contain free variables"); - goto bad; - } - #if PY_VERSION_HEX < 0x030200B1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400) - result = PyEval_EvalCode((PyCodeObject *)o, globals, locals); - #else - result = PyEval_EvalCode(o, globals, locals); - #endif - } else { - PyCompilerFlags cf; - cf.cf_flags = 0; -#if PY_VERSION_HEX >= 0x030800A3 - cf.cf_feature_version = PY_MINOR_VERSION; -#endif - if (PyUnicode_Check(o)) { - cf.cf_flags = PyCF_SOURCE_IS_UTF8; - s = PyUnicode_AsUTF8String(o); - if (!s) goto bad; - o = s; - #if PY_MAJOR_VERSION >= 3 - } else if (!PyBytes_Check(o)) { - #else - } else if (!PyString_Check(o)) { - #endif - PyErr_Format(PyExc_TypeError, - "exec: arg 1 must be string, bytes or code object, got %.200s", - Py_TYPE(o)->tp_name); - goto bad; - } - #if PY_MAJOR_VERSION >= 3 - code = PyBytes_AS_STRING(o); - #else - code = PyString_AS_STRING(o); - #endif - if (PyEval_MergeCompilerFlags(&cf)) { - result = PyRun_StringFlags(code, Py_file_input, globals, locals, &cf); - } else { - result = PyRun_String(code, Py_file_input, globals, locals); - } - Py_XDECREF(s); - } - - return result; -bad: - Py_XDECREF(s); - return 0; -} - -//////////////////// GetAttr3.proto //////////////////// - -static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *); /*proto*/ - -//////////////////// GetAttr3 //////////////////// -//@requires: ObjectHandling.c::GetAttr -//@requires: Exceptions.c::PyThreadStateGet -//@requires: Exceptions.c::PyErrFetchRestore -//@requires: Exceptions.c::PyErrExceptionMatches - -static PyObject *__Pyx_GetAttr3Default(PyObject *d) { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) - return NULL; - __Pyx_PyErr_Clear(); - Py_INCREF(d); - return d; -} - -static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) { - PyObject *r = __Pyx_GetAttr(o, n); - return (likely(r)) ? r : __Pyx_GetAttr3Default(d); -} - -//////////////////// HasAttr.proto //////////////////// - -static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); /*proto*/ - -//////////////////// HasAttr //////////////////// -//@requires: ObjectHandling.c::GetAttr - -static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { - PyObject *r; - if (unlikely(!__Pyx_PyBaseString_Check(n))) { - PyErr_SetString(PyExc_TypeError, - "hasattr(): attribute name must be string"); - return -1; - } - r = __Pyx_GetAttr(o, n); - if (unlikely(!r)) { - PyErr_Clear(); - return 0; - } else { - Py_DECREF(r); - return 1; - } -} - -//////////////////// Intern.proto //////////////////// - -static PyObject* __Pyx_Intern(PyObject* s); /* proto */ - -//////////////////// Intern //////////////////// - -static PyObject* __Pyx_Intern(PyObject* s) { - if (!(likely(PyString_CheckExact(s)))) { - PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(s)->tp_name); - return 0; - } - Py_INCREF(s); - #if PY_MAJOR_VERSION >= 3 - PyUnicode_InternInPlace(&s); - #else - PyString_InternInPlace(&s); - #endif - return s; -} - -//////////////////// abs_longlong.proto //////////////////// - -static CYTHON_INLINE PY_LONG_LONG __Pyx_abs_longlong(PY_LONG_LONG x) { -#if defined (__cplusplus) && __cplusplus >= 201103L - return std::abs(x); -#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - return llabs(x); -#elif defined (_MSC_VER) - // abs() is defined for long, but 64-bits type on MSVC is long long. - // Use MS-specific _abs64() instead, which returns the original (negative) value for abs(-MAX-1) - return _abs64(x); -#elif defined (__GNUC__) - // gcc or clang on 64 bit windows. - return __builtin_llabs(x); -#else - if (sizeof(PY_LONG_LONG) <= sizeof(Py_ssize_t)) - return __Pyx_sst_abs(x); - return (x<0) ? -x : x; -#endif -} - - -//////////////////// py_abs.proto //////////////////// - -#if CYTHON_USE_PYLONG_INTERNALS -static PyObject *__Pyx_PyLong_AbsNeg(PyObject *num);/*proto*/ - -#define __Pyx_PyNumber_Absolute(x) \ - ((likely(PyLong_CheckExact(x))) ? \ - (likely(Py_SIZE(x) >= 0) ? (Py_INCREF(x), (x)) : __Pyx_PyLong_AbsNeg(x)) : \ - PyNumber_Absolute(x)) - -#else -#define __Pyx_PyNumber_Absolute(x) PyNumber_Absolute(x) -#endif - -//////////////////// py_abs //////////////////// - -#if CYTHON_USE_PYLONG_INTERNALS -static PyObject *__Pyx_PyLong_AbsNeg(PyObject *n) { - if (likely(Py_SIZE(n) == -1)) { - // digits are unsigned - return PyLong_FromLong(((PyLongObject*)n)->ob_digit[0]); - } -#if CYTHON_COMPILING_IN_CPYTHON - { - PyObject *copy = _PyLong_Copy((PyLongObject*)n); - if (likely(copy)) { - // negate the size to swap the sign - __Pyx_SET_SIZE(copy, -Py_SIZE(copy)); - } - return copy; - } -#else - return PyNumber_Negative(n); -#endif -} -#endif - - -//////////////////// pow2.proto //////////////////// - -#define __Pyx_PyNumber_Power2(a, b) PyNumber_Power(a, b, Py_None) - - -//////////////////// object_ord.proto //////////////////// -//@requires: TypeConversion.c::UnicodeAsUCS4 - -#if PY_MAJOR_VERSION >= 3 -#define __Pyx_PyObject_Ord(c) \ - (likely(PyUnicode_Check(c)) ? (long)__Pyx_PyUnicode_AsPy_UCS4(c) : __Pyx__PyObject_Ord(c)) -#else -#define __Pyx_PyObject_Ord(c) __Pyx__PyObject_Ord(c) -#endif -static long __Pyx__PyObject_Ord(PyObject* c); /*proto*/ - -//////////////////// object_ord //////////////////// - -static long __Pyx__PyObject_Ord(PyObject* c) { - Py_ssize_t size; - if (PyBytes_Check(c)) { - size = PyBytes_GET_SIZE(c); - if (likely(size == 1)) { - return (unsigned char) PyBytes_AS_STRING(c)[0]; - } -#if PY_MAJOR_VERSION < 3 - } else if (PyUnicode_Check(c)) { - return (long)__Pyx_PyUnicode_AsPy_UCS4(c); -#endif -#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) - } else if (PyByteArray_Check(c)) { - size = PyByteArray_GET_SIZE(c); - if (likely(size == 1)) { - return (unsigned char) PyByteArray_AS_STRING(c)[0]; - } -#endif - } else { - // FIXME: support character buffers - but CPython doesn't support them either - PyErr_Format(PyExc_TypeError, - "ord() expected string of length 1, but %.200s found", Py_TYPE(c)->tp_name); - return (long)(Py_UCS4)-1; - } - PyErr_Format(PyExc_TypeError, - "ord() expected a character, but string of length %zd found", size); - return (long)(Py_UCS4)-1; -} - - -//////////////////// py_dict_keys.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d); /*proto*/ - -//////////////////// py_dict_keys //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) { - if (PY_MAJOR_VERSION >= 3) - return CALL_UNBOUND_METHOD(PyDict_Type, "keys", d); - else - return PyDict_Keys(d); -} - -//////////////////// py_dict_values.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); /*proto*/ - -//////////////////// py_dict_values //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { - if (PY_MAJOR_VERSION >= 3) - return CALL_UNBOUND_METHOD(PyDict_Type, "values", d); - else - return PyDict_Values(d); -} - -//////////////////// py_dict_items.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d); /*proto*/ - -//////////////////// py_dict_items //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_Items(PyObject* d) { - if (PY_MAJOR_VERSION >= 3) - return CALL_UNBOUND_METHOD(PyDict_Type, "items", d); - else - return PyDict_Items(d); -} - -//////////////////// py_dict_iterkeys.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_IterKeys(PyObject* d); /*proto*/ - -//////////////////// py_dict_iterkeys //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_IterKeys(PyObject* d) { - if (PY_MAJOR_VERSION >= 3) - return CALL_UNBOUND_METHOD(PyDict_Type, "keys", d); - else - return CALL_UNBOUND_METHOD(PyDict_Type, "iterkeys", d); -} - -//////////////////// py_dict_itervalues.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_IterValues(PyObject* d); /*proto*/ - -//////////////////// py_dict_itervalues //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_IterValues(PyObject* d) { - if (PY_MAJOR_VERSION >= 3) - return CALL_UNBOUND_METHOD(PyDict_Type, "values", d); - else - return CALL_UNBOUND_METHOD(PyDict_Type, "itervalues", d); -} - -//////////////////// py_dict_iteritems.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_IterItems(PyObject* d); /*proto*/ - -//////////////////// py_dict_iteritems //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_IterItems(PyObject* d) { - if (PY_MAJOR_VERSION >= 3) - return CALL_UNBOUND_METHOD(PyDict_Type, "items", d); - else - return CALL_UNBOUND_METHOD(PyDict_Type, "iteritems", d); -} - -//////////////////// py_dict_viewkeys.proto //////////////////// - -#if PY_VERSION_HEX < 0x02070000 -#error This module uses dict views, which require Python 2.7 or later -#endif -static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewKeys(PyObject* d); /*proto*/ - -//////////////////// py_dict_viewkeys //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewKeys(PyObject* d) { - if (PY_MAJOR_VERSION >= 3) - return CALL_UNBOUND_METHOD(PyDict_Type, "keys", d); - else - return CALL_UNBOUND_METHOD(PyDict_Type, "viewkeys", d); -} - -//////////////////// py_dict_viewvalues.proto //////////////////// - -#if PY_VERSION_HEX < 0x02070000 -#error This module uses dict views, which require Python 2.7 or later -#endif -static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewValues(PyObject* d); /*proto*/ - -//////////////////// py_dict_viewvalues //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewValues(PyObject* d) { - if (PY_MAJOR_VERSION >= 3) - return CALL_UNBOUND_METHOD(PyDict_Type, "values", d); - else - return CALL_UNBOUND_METHOD(PyDict_Type, "viewvalues", d); -} - -//////////////////// py_dict_viewitems.proto //////////////////// - -#if PY_VERSION_HEX < 0x02070000 -#error This module uses dict views, which require Python 2.7 or later -#endif -static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewItems(PyObject* d); /*proto*/ - -//////////////////// py_dict_viewitems //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyDict_ViewItems(PyObject* d) { - if (PY_MAJOR_VERSION >= 3) - return CALL_UNBOUND_METHOD(PyDict_Type, "items", d); - else - return CALL_UNBOUND_METHOD(PyDict_Type, "viewitems", d); -} - - -//////////////////// pyfrozenset_new.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it); - -//////////////////// pyfrozenset_new //////////////////// -//@substitute: naming - -static CYTHON_INLINE PyObject* __Pyx_PyFrozenSet_New(PyObject* it) { - if (it) { - PyObject* result; -#if CYTHON_COMPILING_IN_PYPY - // PyPy currently lacks PyFrozenSet_CheckExact() and PyFrozenSet_New() - PyObject* args; - args = PyTuple_Pack(1, it); - if (unlikely(!args)) - return NULL; - result = PyObject_Call((PyObject*)&PyFrozenSet_Type, args, NULL); - Py_DECREF(args); - return result; -#else - if (PyFrozenSet_CheckExact(it)) { - Py_INCREF(it); - return it; - } - result = PyFrozenSet_New(it); - if (unlikely(!result)) - return NULL; - if ((PY_VERSION_HEX >= 0x031000A1) || likely(PySet_GET_SIZE(result))) - return result; - // empty frozenset is a singleton (on Python <3.10) - // seems wasteful, but CPython does the same - Py_DECREF(result); -#endif - } -#if CYTHON_USE_TYPE_SLOTS - return PyFrozenSet_Type.tp_new(&PyFrozenSet_Type, $empty_tuple, NULL); -#else - return PyObject_Call((PyObject*)&PyFrozenSet_Type, $empty_tuple, NULL); -#endif -} - - -//////////////////// PySet_Update.proto //////////////////// - -static CYTHON_INLINE int __Pyx_PySet_Update(PyObject* set, PyObject* it); /*proto*/ - -//////////////////// PySet_Update //////////////////// - -static CYTHON_INLINE int __Pyx_PySet_Update(PyObject* set, PyObject* it) { - PyObject *retval; - #if CYTHON_USE_TYPE_SLOTS && !CYTHON_COMPILING_IN_PYPY - if (PyAnySet_Check(it)) { - if (PySet_GET_SIZE(it) == 0) - return 0; - // fast and safe case: CPython will update our result set and return it - retval = PySet_Type.tp_as_number->nb_inplace_or(set, it); - if (likely(retval == set)) { - Py_DECREF(retval); - return 0; - } - if (unlikely(!retval)) - return -1; - // unusual result, fall through to set.update() call below - Py_DECREF(retval); - } - #endif - retval = CALL_UNBOUND_METHOD(PySet_Type, "update", set, it); - if (unlikely(!retval)) return -1; - Py_DECREF(retval); - return 0; -} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CConvert.pyx b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CConvert.pyx deleted file mode 100644 index 5969f6a5826..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CConvert.pyx +++ /dev/null @@ -1,132 +0,0 @@ -#################### FromPyStructUtility #################### - -cdef extern from *: - ctypedef struct PyTypeObject: - char* tp_name - PyTypeObject *Py_TYPE(obj) - bint PyMapping_Check(obj) - object PyErr_Format(exc, const char *format, ...) - -@cname("{{funcname}}") -cdef {{struct_type}} {{funcname}}(obj) except *: - cdef {{struct_type}} result - if not PyMapping_Check(obj): - PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name) - - {{for member in var_entries:}} - try: - value = obj['{{member.name}}'] - except KeyError: - raise ValueError("No value specified for struct attribute '{{member.name}}'") - result.{{member.cname}} = value - {{endfor}} - return result - - -#################### FromPyUnionUtility #################### - -cdef extern from *: - ctypedef struct PyTypeObject: - char* tp_name - PyTypeObject *Py_TYPE(obj) - bint PyMapping_Check(obj) - object PyErr_Format(exc, const char *format, ...) - -@cname("{{funcname}}") -cdef {{struct_type}} {{funcname}}(obj) except *: - cdef {{struct_type}} result - cdef Py_ssize_t length - if not PyMapping_Check(obj): - PyErr_Format(TypeError, b"Expected %.16s, got %.200s", b"a mapping", Py_TYPE(obj).tp_name) - - last_found = None - length = len(obj) - if length: - {{for member in var_entries:}} - if '{{member.name}}' in obj: - if last_found is not None: - raise ValueError("More than one union attribute passed: '%s' and '%s'" % (last_found, '{{member.name}}')) - last_found = '{{member.name}}' - result.{{member.cname}} = obj['{{member.name}}'] - length -= 1 - if not length: - return result - {{endfor}} - if last_found is None: - raise ValueError("No value specified for any of the union attributes (%s)" % - '{{", ".join(member.name for member in var_entries)}}') - return result - - -#################### cfunc.to_py #################### - -@cname("{{cname}}") -cdef object {{cname}}({{return_type.ctype}} (*f)({{ ', '.join(arg.type_cname for arg in args) }}) {{except_clause}}): - def wrap({{ ', '.join('{arg.ctype} {arg.name}'.format(arg=arg) for arg in args) }}): - """wrap({{', '.join(('{arg.name}: {arg.type_displayname}'.format(arg=arg) if arg.type_displayname else arg.name) for arg in args)}}){{if return_type.type_displayname}} -> {{return_type.type_displayname}}{{endif}}""" - {{'' if return_type.type.is_void else 'return '}}f({{ ', '.join(arg.name for arg in args) }}) - return wrap - - -#################### carray.from_py #################### - -cdef extern from *: - object PyErr_Format(exc, const char *format, ...) - -@cname("{{cname}}") -cdef int {{cname}}(object o, {{base_type}} *v, Py_ssize_t length) except -1: - cdef Py_ssize_t i = length - try: - i = len(o) - except (TypeError, OverflowError): - pass - if i == length: - for i, item in enumerate(o): - if i >= length: - break - v[i] = item - else: - i += 1 # convert index to length - if i == length: - return 0 - - PyErr_Format( - IndexError, - ("too many values found during array assignment, expected %zd" - if i >= length else - "not enough values found during array assignment, expected %zd, got %zd"), - length, i) - - -#################### carray.to_py #################### - -cdef extern from *: - void Py_INCREF(object o) - tuple PyTuple_New(Py_ssize_t size) - list PyList_New(Py_ssize_t size) - void PyTuple_SET_ITEM(object p, Py_ssize_t pos, object o) - void PyList_SET_ITEM(object p, Py_ssize_t pos, object o) - - -@cname("{{cname}}") -cdef inline list {{cname}}({{base_type}} *v, Py_ssize_t length): - cdef size_t i - cdef object value - l = PyList_New(length) - for i in range(length): - value = v[i] - Py_INCREF(value) - PyList_SET_ITEM(l, i, value) - return l - - -@cname("{{to_tuple_cname}}") -cdef inline tuple {{to_tuple_cname}}({{base_type}} *v, Py_ssize_t length): - cdef size_t i - cdef object value - t = PyTuple_New(length) - for i in range(length): - value = v[i] - Py_INCREF(value) - PyTuple_SET_ITEM(t, i, value) - return t diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CMath.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CMath.c deleted file mode 100644 index 2cd22231384..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CMath.c +++ /dev/null @@ -1,95 +0,0 @@ - -/////////////// CDivisionWarning.proto /////////////// - -static int __Pyx_cdivision_warning(const char *, int); /* proto */ - -/////////////// CDivisionWarning /////////////// - -static int __Pyx_cdivision_warning(const char *filename, int lineno) { -#if CYTHON_COMPILING_IN_PYPY - // avoid compiler warnings - filename++; lineno++; - return PyErr_Warn(PyExc_RuntimeWarning, - "division with oppositely signed operands, C and Python semantics differ"); -#else - return PyErr_WarnExplicit(PyExc_RuntimeWarning, - "division with oppositely signed operands, C and Python semantics differ", - filename, - lineno, - __Pyx_MODULE_NAME, - NULL); -#endif -} - - -/////////////// DivInt.proto /////////////// - -static CYTHON_INLINE %(type)s __Pyx_div_%(type_name)s(%(type)s, %(type)s); /* proto */ - -/////////////// DivInt /////////////// - -static CYTHON_INLINE %(type)s __Pyx_div_%(type_name)s(%(type)s a, %(type)s b) { - %(type)s q = a / b; - %(type)s r = a - q*b; - q -= ((r != 0) & ((r ^ b) < 0)); - return q; -} - - -/////////////// ModInt.proto /////////////// - -static CYTHON_INLINE %(type)s __Pyx_mod_%(type_name)s(%(type)s, %(type)s); /* proto */ - -/////////////// ModInt /////////////// - -static CYTHON_INLINE %(type)s __Pyx_mod_%(type_name)s(%(type)s a, %(type)s b) { - %(type)s r = a %% b; - r += ((r != 0) & ((r ^ b) < 0)) * b; - return r; -} - - -/////////////// ModFloat.proto /////////////// - -static CYTHON_INLINE %(type)s __Pyx_mod_%(type_name)s(%(type)s, %(type)s); /* proto */ - -/////////////// ModFloat /////////////// - -static CYTHON_INLINE %(type)s __Pyx_mod_%(type_name)s(%(type)s a, %(type)s b) { - %(type)s r = fmod%(math_h_modifier)s(a, b); - r += ((r != 0) & ((r < 0) ^ (b < 0))) * b; - return r; -} - - -/////////////// IntPow.proto /////////////// - -static CYTHON_INLINE %(type)s %(func_name)s(%(type)s, %(type)s); /* proto */ - -/////////////// IntPow /////////////// - -static CYTHON_INLINE %(type)s %(func_name)s(%(type)s b, %(type)s e) { - %(type)s t = b; - switch (e) { - case 3: - t *= b; - CYTHON_FALLTHROUGH; - case 2: - t *= b; - CYTHON_FALLTHROUGH; - case 1: - return t; - case 0: - return 1; - } - #if %(signed)s - if (unlikely(e<0)) return 0; - #endif - t = 1; - while (likely(e)) { - t *= (b * (e&1)) | ((~e)&1); /* 1 or b */ - b *= b; - e >>= 1; - } - return t; -} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Capsule.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Capsule.c deleted file mode 100644 index cc4fe0d8871..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Capsule.c +++ /dev/null @@ -1,20 +0,0 @@ -//////////////// Capsule.proto //////////////// - -/* Todo: wrap the rest of the functionality in similar functions */ -static CYTHON_INLINE PyObject *__pyx_capsule_create(void *p, const char *sig); - -//////////////// Capsule //////////////// - -static CYTHON_INLINE PyObject * -__pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig) -{ - PyObject *cobj; - -#if PY_VERSION_HEX >= 0x02070000 - cobj = PyCapsule_New(p, sig, NULL); -#else - cobj = PyCObject_FromVoidPtr(p, NULL); -#endif - - return cobj; -} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CommonStructures.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CommonStructures.c deleted file mode 100644 index c7945feb49c..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CommonStructures.c +++ /dev/null @@ -1,86 +0,0 @@ -/////////////// FetchCommonType.proto /////////////// - -static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); - -/////////////// FetchCommonType /////////////// - -static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { - PyObject* fake_module; - PyTypeObject* cached_type = NULL; - - fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); - if (!fake_module) return NULL; - Py_INCREF(fake_module); - - cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); - if (cached_type) { - if (!PyType_Check((PyObject*)cached_type)) { - PyErr_Format(PyExc_TypeError, - "Shared Cython type %.200s is not a type object", - type->tp_name); - goto bad; - } - if (cached_type->tp_basicsize != type->tp_basicsize) { - PyErr_Format(PyExc_TypeError, - "Shared Cython type %.200s has the wrong size, try recompiling", - type->tp_name); - goto bad; - } - } else { - if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; - PyErr_Clear(); - if (PyType_Ready(type) < 0) goto bad; - if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) - goto bad; - Py_INCREF(type); - cached_type = type; - } - -done: - Py_DECREF(fake_module); - // NOTE: always returns owned reference, or NULL on error - return cached_type; - -bad: - Py_XDECREF(cached_type); - cached_type = NULL; - goto done; -} - - -/////////////// FetchCommonPointer.proto /////////////// - -static void* __Pyx_FetchCommonPointer(void* pointer, const char* name); - -/////////////// FetchCommonPointer /////////////// - - -static void* __Pyx_FetchCommonPointer(void* pointer, const char* name) { -#if PY_VERSION_HEX >= 0x02070000 - PyObject* fake_module = NULL; - PyObject* capsule = NULL; - void* value = NULL; - - fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); - if (!fake_module) return NULL; - Py_INCREF(fake_module); - - capsule = PyObject_GetAttrString(fake_module, name); - if (!capsule) { - if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; - PyErr_Clear(); - capsule = PyCapsule_New(pointer, name, NULL); - if (!capsule) goto bad; - if (PyObject_SetAttrString(fake_module, name, capsule) < 0) - goto bad; - } - value = PyCapsule_GetPointer(capsule, name); - -bad: - Py_XDECREF(capsule); - Py_DECREF(fake_module); - return value; -#else - return pointer; -#endif -} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Complex.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Complex.c deleted file mode 100644 index 28062a06117..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Complex.c +++ /dev/null @@ -1,291 +0,0 @@ -/////////////// Header.proto /////////////// -//@proto_block: h_code - -#if !defined(CYTHON_CCOMPLEX) - #if defined(__cplusplus) - #define CYTHON_CCOMPLEX 1 - #elif defined(_Complex_I) - #define CYTHON_CCOMPLEX 1 - #else - #define CYTHON_CCOMPLEX 0 - #endif -#endif - -#if CYTHON_CCOMPLEX - #ifdef __cplusplus - #include - #else - #include - #endif -#endif - -#if CYTHON_CCOMPLEX && !defined(__cplusplus) && defined(__sun__) && defined(__GNUC__) - #undef _Complex_I - #define _Complex_I 1.0fj -#endif - - -/////////////// RealImag.proto /////////////// - -#if CYTHON_CCOMPLEX - #ifdef __cplusplus - #define __Pyx_CREAL(z) ((z).real()) - #define __Pyx_CIMAG(z) ((z).imag()) - #else - #define __Pyx_CREAL(z) (__real__(z)) - #define __Pyx_CIMAG(z) (__imag__(z)) - #endif -#else - #define __Pyx_CREAL(z) ((z).real) - #define __Pyx_CIMAG(z) ((z).imag) -#endif - -#if defined(__cplusplus) && CYTHON_CCOMPLEX \ - && (defined(_WIN32) || defined(__clang__) || (defined(__GNUC__) && (__GNUC__ >= 5 || __GNUC__ == 4 && __GNUC_MINOR__ >= 4 )) || __cplusplus >= 201103) - #define __Pyx_SET_CREAL(z,x) ((z).real(x)) - #define __Pyx_SET_CIMAG(z,y) ((z).imag(y)) -#else - #define __Pyx_SET_CREAL(z,x) __Pyx_CREAL(z) = (x) - #define __Pyx_SET_CIMAG(z,y) __Pyx_CIMAG(z) = (y) -#endif - - -/////////////// Declarations.proto /////////////// -//@proto_block: complex_type_declarations - -#if CYTHON_CCOMPLEX - #ifdef __cplusplus - typedef ::std::complex< {{real_type}} > {{type_name}}; - #else - typedef {{real_type}} _Complex {{type_name}}; - #endif -#else - typedef struct { {{real_type}} real, imag; } {{type_name}}; -#endif - -static CYTHON_INLINE {{type}} {{type_name}}_from_parts({{real_type}}, {{real_type}}); - -/////////////// Declarations /////////////// - -#if CYTHON_CCOMPLEX - #ifdef __cplusplus - static CYTHON_INLINE {{type}} {{type_name}}_from_parts({{real_type}} x, {{real_type}} y) { - return ::std::complex< {{real_type}} >(x, y); - } - #else - static CYTHON_INLINE {{type}} {{type_name}}_from_parts({{real_type}} x, {{real_type}} y) { - return x + y*({{type}})_Complex_I; - } - #endif -#else - static CYTHON_INLINE {{type}} {{type_name}}_from_parts({{real_type}} x, {{real_type}} y) { - {{type}} z; - z.real = x; - z.imag = y; - return z; - } -#endif - - -/////////////// ToPy.proto /////////////// - -#define __pyx_PyComplex_FromComplex(z) \ - PyComplex_FromDoubles((double)__Pyx_CREAL(z), \ - (double)__Pyx_CIMAG(z)) - - -/////////////// FromPy.proto /////////////// - -static {{type}} __Pyx_PyComplex_As_{{type_name}}(PyObject*); - -/////////////// FromPy /////////////// - -static {{type}} __Pyx_PyComplex_As_{{type_name}}(PyObject* o) { - Py_complex cval; -#if !CYTHON_COMPILING_IN_PYPY - if (PyComplex_CheckExact(o)) - cval = ((PyComplexObject *)o)->cval; - else -#endif - cval = PyComplex_AsCComplex(o); - return {{type_name}}_from_parts( - ({{real_type}})cval.real, - ({{real_type}})cval.imag); -} - - -/////////////// Arithmetic.proto /////////////// - -#if CYTHON_CCOMPLEX - #define __Pyx_c_eq{{func_suffix}}(a, b) ((a)==(b)) - #define __Pyx_c_sum{{func_suffix}}(a, b) ((a)+(b)) - #define __Pyx_c_diff{{func_suffix}}(a, b) ((a)-(b)) - #define __Pyx_c_prod{{func_suffix}}(a, b) ((a)*(b)) - #define __Pyx_c_quot{{func_suffix}}(a, b) ((a)/(b)) - #define __Pyx_c_neg{{func_suffix}}(a) (-(a)) - #ifdef __cplusplus - #define __Pyx_c_is_zero{{func_suffix}}(z) ((z)==({{real_type}})0) - #define __Pyx_c_conj{{func_suffix}}(z) (::std::conj(z)) - #if {{is_float}} - #define __Pyx_c_abs{{func_suffix}}(z) (::std::abs(z)) - #define __Pyx_c_pow{{func_suffix}}(a, b) (::std::pow(a, b)) - #endif - #else - #define __Pyx_c_is_zero{{func_suffix}}(z) ((z)==0) - #define __Pyx_c_conj{{func_suffix}}(z) (conj{{m}}(z)) - #if {{is_float}} - #define __Pyx_c_abs{{func_suffix}}(z) (cabs{{m}}(z)) - #define __Pyx_c_pow{{func_suffix}}(a, b) (cpow{{m}}(a, b)) - #endif - #endif -#else - static CYTHON_INLINE int __Pyx_c_eq{{func_suffix}}({{type}}, {{type}}); - static CYTHON_INLINE {{type}} __Pyx_c_sum{{func_suffix}}({{type}}, {{type}}); - static CYTHON_INLINE {{type}} __Pyx_c_diff{{func_suffix}}({{type}}, {{type}}); - static CYTHON_INLINE {{type}} __Pyx_c_prod{{func_suffix}}({{type}}, {{type}}); - static CYTHON_INLINE {{type}} __Pyx_c_quot{{func_suffix}}({{type}}, {{type}}); - static CYTHON_INLINE {{type}} __Pyx_c_neg{{func_suffix}}({{type}}); - static CYTHON_INLINE int __Pyx_c_is_zero{{func_suffix}}({{type}}); - static CYTHON_INLINE {{type}} __Pyx_c_conj{{func_suffix}}({{type}}); - #if {{is_float}} - static CYTHON_INLINE {{real_type}} __Pyx_c_abs{{func_suffix}}({{type}}); - static CYTHON_INLINE {{type}} __Pyx_c_pow{{func_suffix}}({{type}}, {{type}}); - #endif -#endif - -/////////////// Arithmetic /////////////// - -#if CYTHON_CCOMPLEX -#else - static CYTHON_INLINE int __Pyx_c_eq{{func_suffix}}({{type}} a, {{type}} b) { - return (a.real == b.real) && (a.imag == b.imag); - } - static CYTHON_INLINE {{type}} __Pyx_c_sum{{func_suffix}}({{type}} a, {{type}} b) { - {{type}} z; - z.real = a.real + b.real; - z.imag = a.imag + b.imag; - return z; - } - static CYTHON_INLINE {{type}} __Pyx_c_diff{{func_suffix}}({{type}} a, {{type}} b) { - {{type}} z; - z.real = a.real - b.real; - z.imag = a.imag - b.imag; - return z; - } - static CYTHON_INLINE {{type}} __Pyx_c_prod{{func_suffix}}({{type}} a, {{type}} b) { - {{type}} z; - z.real = a.real * b.real - a.imag * b.imag; - z.imag = a.real * b.imag + a.imag * b.real; - return z; - } - - #if {{is_float}} - static CYTHON_INLINE {{type}} __Pyx_c_quot{{func_suffix}}({{type}} a, {{type}} b) { - if (b.imag == 0) { - return {{type_name}}_from_parts(a.real / b.real, a.imag / b.real); - } else if (fabs{{m}}(b.real) >= fabs{{m}}(b.imag)) { - if (b.real == 0 && b.imag == 0) { - return {{type_name}}_from_parts(a.real / b.real, a.imag / b.imag); - } else { - {{real_type}} r = b.imag / b.real; - {{real_type}} s = ({{real_type}})(1.0) / (b.real + b.imag * r); - return {{type_name}}_from_parts( - (a.real + a.imag * r) * s, (a.imag - a.real * r) * s); - } - } else { - {{real_type}} r = b.real / b.imag; - {{real_type}} s = ({{real_type}})(1.0) / (b.imag + b.real * r); - return {{type_name}}_from_parts( - (a.real * r + a.imag) * s, (a.imag * r - a.real) * s); - } - } - #else - static CYTHON_INLINE {{type}} __Pyx_c_quot{{func_suffix}}({{type}} a, {{type}} b) { - if (b.imag == 0) { - return {{type_name}}_from_parts(a.real / b.real, a.imag / b.real); - } else { - {{real_type}} denom = b.real * b.real + b.imag * b.imag; - return {{type_name}}_from_parts( - (a.real * b.real + a.imag * b.imag) / denom, - (a.imag * b.real - a.real * b.imag) / denom); - } - } - #endif - - static CYTHON_INLINE {{type}} __Pyx_c_neg{{func_suffix}}({{type}} a) { - {{type}} z; - z.real = -a.real; - z.imag = -a.imag; - return z; - } - static CYTHON_INLINE int __Pyx_c_is_zero{{func_suffix}}({{type}} a) { - return (a.real == 0) && (a.imag == 0); - } - static CYTHON_INLINE {{type}} __Pyx_c_conj{{func_suffix}}({{type}} a) { - {{type}} z; - z.real = a.real; - z.imag = -a.imag; - return z; - } - #if {{is_float}} - static CYTHON_INLINE {{real_type}} __Pyx_c_abs{{func_suffix}}({{type}} z) { - #if !defined(HAVE_HYPOT) || defined(_MSC_VER) - return sqrt{{m}}(z.real*z.real + z.imag*z.imag); - #else - return hypot{{m}}(z.real, z.imag); - #endif - } - static CYTHON_INLINE {{type}} __Pyx_c_pow{{func_suffix}}({{type}} a, {{type}} b) { - {{type}} z; - {{real_type}} r, lnr, theta, z_r, z_theta; - if (b.imag == 0 && b.real == (int)b.real) { - if (b.real < 0) { - {{real_type}} denom = a.real * a.real + a.imag * a.imag; - a.real = a.real / denom; - a.imag = -a.imag / denom; - b.real = -b.real; - } - switch ((int)b.real) { - case 0: - z.real = 1; - z.imag = 0; - return z; - case 1: - return a; - case 2: - return __Pyx_c_prod{{func_suffix}}(a, a); - case 3: - z = __Pyx_c_prod{{func_suffix}}(a, a); - return __Pyx_c_prod{{func_suffix}}(z, a); - case 4: - z = __Pyx_c_prod{{func_suffix}}(a, a); - return __Pyx_c_prod{{func_suffix}}(z, z); - } - } - if (a.imag == 0) { - if (a.real == 0) { - return a; - } else if (b.imag == 0) { - z.real = pow{{m}}(a.real, b.real); - z.imag = 0; - return z; - } else if (a.real > 0) { - r = a.real; - theta = 0; - } else { - r = -a.real; - theta = atan2{{m}}(0.0, -1.0); - } - } else { - r = __Pyx_c_abs{{func_suffix}}(a); - theta = atan2{{m}}(a.imag, a.real); - } - lnr = log{{m}}(r); - z_r = exp{{m}}(lnr * b.real - theta * b.imag); - z_theta = theta * b.real + lnr * b.imag; - z.real = z_r * cos{{m}}(z_theta); - z.imag = z_r * sin{{m}}(z_theta); - return z; - } - #endif -#endif diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Coroutine.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Coroutine.c deleted file mode 100644 index 1ad27df2642..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Coroutine.c +++ /dev/null @@ -1,2391 +0,0 @@ -//////////////////// GeneratorYieldFrom.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_Generator_Yield_From(__pyx_CoroutineObject *gen, PyObject *source); - -//////////////////// GeneratorYieldFrom //////////////////// -//@requires: Generator - -static void __PyxPyIter_CheckErrorAndDecref(PyObject *source) { - PyErr_Format(PyExc_TypeError, - "iter() returned non-iterator of type '%.100s'", - Py_TYPE(source)->tp_name); - Py_DECREF(source); -} - -static CYTHON_INLINE PyObject* __Pyx_Generator_Yield_From(__pyx_CoroutineObject *gen, PyObject *source) { - PyObject *source_gen, *retval; -#ifdef __Pyx_Coroutine_USED - if (__Pyx_Coroutine_Check(source)) { - // TODO: this should only happen for types.coroutine()ed generators, but we can't determine that here - Py_INCREF(source); - source_gen = source; - retval = __Pyx_Generator_Next(source); - } else -#endif - { -#if CYTHON_USE_TYPE_SLOTS - if (likely(Py_TYPE(source)->tp_iter)) { - source_gen = Py_TYPE(source)->tp_iter(source); - if (unlikely(!source_gen)) - return NULL; - if (unlikely(!PyIter_Check(source_gen))) { - __PyxPyIter_CheckErrorAndDecref(source_gen); - return NULL; - } - } else - // CPython also allows non-iterable sequences to be iterated over -#endif - { - source_gen = PyObject_GetIter(source); - if (unlikely(!source_gen)) - return NULL; - } - // source_gen is now the iterator, make the first next() call -#if CYTHON_USE_TYPE_SLOTS - retval = Py_TYPE(source_gen)->tp_iternext(source_gen); -#else - retval = PyIter_Next(source_gen); -#endif - } - if (likely(retval)) { - gen->yieldfrom = source_gen; - return retval; - } - Py_DECREF(source_gen); - return NULL; -} - - -//////////////////// CoroutineYieldFrom.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_Coroutine_Yield_From(__pyx_CoroutineObject *gen, PyObject *source); - -//////////////////// CoroutineYieldFrom //////////////////// -//@requires: Coroutine -//@requires: GetAwaitIter - -static PyObject* __Pyx__Coroutine_Yield_From_Generic(__pyx_CoroutineObject *gen, PyObject *source) { - PyObject *retval; - PyObject *source_gen = __Pyx__Coroutine_GetAwaitableIter(source); - if (unlikely(!source_gen)) { - return NULL; - } - // source_gen is now the iterator, make the first next() call - if (__Pyx_Coroutine_Check(source_gen)) { - retval = __Pyx_Generator_Next(source_gen); - } else { -#if CYTHON_USE_TYPE_SLOTS - retval = Py_TYPE(source_gen)->tp_iternext(source_gen); -#else - retval = PyIter_Next(source_gen); -#endif - } - if (retval) { - gen->yieldfrom = source_gen; - return retval; - } - Py_DECREF(source_gen); - return NULL; -} - -static CYTHON_INLINE PyObject* __Pyx_Coroutine_Yield_From(__pyx_CoroutineObject *gen, PyObject *source) { - PyObject *retval; - if (__Pyx_Coroutine_Check(source)) { - if (unlikely(((__pyx_CoroutineObject*)source)->yieldfrom)) { - PyErr_SetString( - PyExc_RuntimeError, - "coroutine is being awaited already"); - return NULL; - } - retval = __Pyx_Generator_Next(source); -#ifdef __Pyx_AsyncGen_USED - // inlined "__pyx_PyAsyncGenASend" handling to avoid the series of generic calls - } else if (__pyx_PyAsyncGenASend_CheckExact(source)) { - retval = __Pyx_async_gen_asend_iternext(source); -#endif - } else { - return __Pyx__Coroutine_Yield_From_Generic(gen, source); - } - if (retval) { - Py_INCREF(source); - gen->yieldfrom = source; - } - return retval; -} - - -//////////////////// GetAwaitIter.proto //////////////////// - -static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAwaitableIter(PyObject *o); /*proto*/ -static PyObject *__Pyx__Coroutine_GetAwaitableIter(PyObject *o); /*proto*/ - -//////////////////// GetAwaitIter //////////////////// -//@requires: ObjectHandling.c::PyObjectGetMethod -//@requires: ObjectHandling.c::PyObjectCallNoArg -//@requires: ObjectHandling.c::PyObjectCallOneArg - -static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAwaitableIter(PyObject *o) { -#ifdef __Pyx_Coroutine_USED - if (__Pyx_Coroutine_Check(o)) { - return __Pyx_NewRef(o); - } -#endif - return __Pyx__Coroutine_GetAwaitableIter(o); -} - - -static void __Pyx_Coroutine_AwaitableIterError(PyObject *source) { -#if PY_VERSION_HEX >= 0x030600B3 || defined(_PyErr_FormatFromCause) - _PyErr_FormatFromCause( - PyExc_TypeError, - "'async for' received an invalid object " - "from __anext__: %.100s", - Py_TYPE(source)->tp_name); -#elif PY_MAJOR_VERSION >= 3 - PyObject *exc, *val, *val2, *tb; - assert(PyErr_Occurred()); - PyErr_Fetch(&exc, &val, &tb); - PyErr_NormalizeException(&exc, &val, &tb); - if (tb != NULL) { - PyException_SetTraceback(val, tb); - Py_DECREF(tb); - } - Py_DECREF(exc); - assert(!PyErr_Occurred()); - PyErr_Format( - PyExc_TypeError, - "'async for' received an invalid object " - "from __anext__: %.100s", - Py_TYPE(source)->tp_name); - - PyErr_Fetch(&exc, &val2, &tb); - PyErr_NormalizeException(&exc, &val2, &tb); - Py_INCREF(val); - PyException_SetCause(val2, val); - PyException_SetContext(val2, val); - PyErr_Restore(exc, val2, tb); -#else - // since Py2 does not have exception chaining, it's better to avoid shadowing exceptions there - source++; -#endif -} - -// adapted from genobject.c in Py3.5 -static PyObject *__Pyx__Coroutine_GetAwaitableIter(PyObject *obj) { - PyObject *res; -#if CYTHON_USE_ASYNC_SLOTS - __Pyx_PyAsyncMethodsStruct* am = __Pyx_PyType_AsAsync(obj); - if (likely(am && am->am_await)) { - res = (*am->am_await)(obj); - } else -#endif -#if PY_VERSION_HEX >= 0x030500B2 || defined(PyCoro_CheckExact) - if (PyCoro_CheckExact(obj)) { - return __Pyx_NewRef(obj); - } else -#endif -#if CYTHON_COMPILING_IN_CPYTHON && defined(CO_ITERABLE_COROUTINE) - if (PyGen_CheckExact(obj) && ((PyGenObject*)obj)->gi_code && ((PyCodeObject *)((PyGenObject*)obj)->gi_code)->co_flags & CO_ITERABLE_COROUTINE) { - // Python generator marked with "@types.coroutine" decorator - return __Pyx_NewRef(obj); - } else -#endif - { - PyObject *method = NULL; - int is_method = __Pyx_PyObject_GetMethod(obj, PYIDENT("__await__"), &method); - if (likely(is_method)) { - res = __Pyx_PyObject_CallOneArg(method, obj); - } else if (likely(method)) { - res = __Pyx_PyObject_CallNoArg(method); - } else - goto slot_error; - Py_DECREF(method); - } - if (unlikely(!res)) { - // surprisingly, CPython replaces the exception here... - __Pyx_Coroutine_AwaitableIterError(obj); - goto bad; - } - if (unlikely(!PyIter_Check(res))) { - PyErr_Format(PyExc_TypeError, - "__await__() returned non-iterator of type '%.100s'", - Py_TYPE(res)->tp_name); - Py_CLEAR(res); - } else { - int is_coroutine = 0; - #ifdef __Pyx_Coroutine_USED - is_coroutine |= __Pyx_Coroutine_Check(res); - #endif - #if PY_VERSION_HEX >= 0x030500B2 || defined(PyCoro_CheckExact) - is_coroutine |= PyCoro_CheckExact(res); - #endif - if (unlikely(is_coroutine)) { - /* __await__ must return an *iterator*, not - a coroutine or another awaitable (see PEP 492) */ - PyErr_SetString(PyExc_TypeError, - "__await__() returned a coroutine"); - Py_CLEAR(res); - } - } - return res; -slot_error: - PyErr_Format(PyExc_TypeError, - "object %.100s can't be used in 'await' expression", - Py_TYPE(obj)->tp_name); -bad: - return NULL; -} - - -//////////////////// AsyncIter.proto //////////////////// - -static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAsyncIter(PyObject *o); /*proto*/ -static CYTHON_INLINE PyObject *__Pyx_Coroutine_AsyncIterNext(PyObject *o); /*proto*/ - -//////////////////// AsyncIter //////////////////// -//@requires: GetAwaitIter -//@requires: ObjectHandling.c::PyObjectCallMethod0 - -static PyObject *__Pyx_Coroutine_GetAsyncIter_Generic(PyObject *obj) { -#if PY_VERSION_HEX < 0x030500B1 - { - PyObject *iter = __Pyx_PyObject_CallMethod0(obj, PYIDENT("__aiter__")); - if (likely(iter)) - return iter; - // FIXME: for the sake of a nicely conforming exception message, assume any AttributeError meant '__aiter__' - if (!PyErr_ExceptionMatches(PyExc_AttributeError)) - return NULL; - } -#else - // avoid C warning about 'unused function' - if ((0)) (void) __Pyx_PyObject_CallMethod0(obj, PYIDENT("__aiter__")); -#endif - - PyErr_Format(PyExc_TypeError, "'async for' requires an object with __aiter__ method, got %.100s", - Py_TYPE(obj)->tp_name); - return NULL; -} - - -static CYTHON_INLINE PyObject *__Pyx_Coroutine_GetAsyncIter(PyObject *obj) { -#ifdef __Pyx_AsyncGen_USED - if (__Pyx_AsyncGen_CheckExact(obj)) { - return __Pyx_NewRef(obj); - } -#endif -#if CYTHON_USE_ASYNC_SLOTS - { - __Pyx_PyAsyncMethodsStruct* am = __Pyx_PyType_AsAsync(obj); - if (likely(am && am->am_aiter)) { - return (*am->am_aiter)(obj); - } - } -#endif - return __Pyx_Coroutine_GetAsyncIter_Generic(obj); -} - - -static PyObject *__Pyx__Coroutine_AsyncIterNext(PyObject *obj) { -#if PY_VERSION_HEX < 0x030500B1 - { - PyObject *value = __Pyx_PyObject_CallMethod0(obj, PYIDENT("__anext__")); - if (likely(value)) - return value; - } - // FIXME: for the sake of a nicely conforming exception message, assume any AttributeError meant '__anext__' - if (PyErr_ExceptionMatches(PyExc_AttributeError)) -#endif - PyErr_Format(PyExc_TypeError, "'async for' requires an object with __anext__ method, got %.100s", - Py_TYPE(obj)->tp_name); - return NULL; -} - - -static CYTHON_INLINE PyObject *__Pyx_Coroutine_AsyncIterNext(PyObject *obj) { -#ifdef __Pyx_AsyncGen_USED - if (__Pyx_AsyncGen_CheckExact(obj)) { - return __Pyx_async_gen_anext(obj); - } -#endif -#if CYTHON_USE_ASYNC_SLOTS - { - __Pyx_PyAsyncMethodsStruct* am = __Pyx_PyType_AsAsync(obj); - if (likely(am && am->am_anext)) { - return (*am->am_anext)(obj); - } - } -#endif - return __Pyx__Coroutine_AsyncIterNext(obj); -} - - -//////////////////// pep479.proto //////////////////// - -static void __Pyx_Generator_Replace_StopIteration(int in_async_gen); /*proto*/ - -//////////////////// pep479 //////////////////// -//@requires: Exceptions.c::GetException - -static void __Pyx_Generator_Replace_StopIteration(CYTHON_UNUSED int in_async_gen) { - PyObject *exc, *val, *tb, *cur_exc; - __Pyx_PyThreadState_declare - #ifdef __Pyx_StopAsyncIteration_USED - int is_async_stopiteration = 0; - #endif - - cur_exc = PyErr_Occurred(); - if (likely(!__Pyx_PyErr_GivenExceptionMatches(cur_exc, PyExc_StopIteration))) { - #ifdef __Pyx_StopAsyncIteration_USED - if (in_async_gen && unlikely(__Pyx_PyErr_GivenExceptionMatches(cur_exc, __Pyx_PyExc_StopAsyncIteration))) { - is_async_stopiteration = 1; - } else - #endif - return; - } - - __Pyx_PyThreadState_assign - // Chain exceptions by moving Stop(Async)Iteration to exc_info before creating the RuntimeError. - // In Py2.x, no chaining happens, but the exception still stays visible in exc_info. - __Pyx_GetException(&exc, &val, &tb); - Py_XDECREF(exc); - Py_XDECREF(val); - Py_XDECREF(tb); - PyErr_SetString(PyExc_RuntimeError, - #ifdef __Pyx_StopAsyncIteration_USED - is_async_stopiteration ? "async generator raised StopAsyncIteration" : - in_async_gen ? "async generator raised StopIteration" : - #endif - "generator raised StopIteration"); -} - - -//////////////////// CoroutineBase.proto //////////////////// -//@substitute: naming - -typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *); - -#if CYTHON_USE_EXC_INFO_STACK -// See https://bugs.python.org/issue25612 -#define __Pyx_ExcInfoStruct _PyErr_StackItem -#else -// Minimal replacement struct for Py<3.7, without the Py3.7 exception state stack. -typedef struct { - PyObject *exc_type; - PyObject *exc_value; - PyObject *exc_traceback; -} __Pyx_ExcInfoStruct; -#endif - -typedef struct { - PyObject_HEAD - __pyx_coroutine_body_t body; - PyObject *closure; - __Pyx_ExcInfoStruct gi_exc_state; - PyObject *gi_weakreflist; - PyObject *classobj; - PyObject *yieldfrom; - PyObject *gi_name; - PyObject *gi_qualname; - PyObject *gi_modulename; - PyObject *gi_code; - PyObject *gi_frame; - int resume_label; - // using T_BOOL for property below requires char value - char is_running; -} __pyx_CoroutineObject; - -static __pyx_CoroutineObject *__Pyx__Coroutine_New( - PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, - PyObject *name, PyObject *qualname, PyObject *module_name); /*proto*/ - -static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( - __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, - PyObject *name, PyObject *qualname, PyObject *module_name); /*proto*/ - -static CYTHON_INLINE void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *self); -static int __Pyx_Coroutine_clear(PyObject *self); /*proto*/ -static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value); /*proto*/ -static PyObject *__Pyx_Coroutine_Close(PyObject *self); /*proto*/ -static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args); /*proto*/ - -// macros for exception state swapping instead of inline functions to make use of the local thread state context -#if CYTHON_USE_EXC_INFO_STACK -#define __Pyx_Coroutine_SwapException(self) -#define __Pyx_Coroutine_ResetAndClearException(self) __Pyx_Coroutine_ExceptionClear(&(self)->gi_exc_state) -#else -#define __Pyx_Coroutine_SwapException(self) { \ - __Pyx_ExceptionSwap(&(self)->gi_exc_state.exc_type, &(self)->gi_exc_state.exc_value, &(self)->gi_exc_state.exc_traceback); \ - __Pyx_Coroutine_ResetFrameBackpointer(&(self)->gi_exc_state); \ - } -#define __Pyx_Coroutine_ResetAndClearException(self) { \ - __Pyx_ExceptionReset((self)->gi_exc_state.exc_type, (self)->gi_exc_state.exc_value, (self)->gi_exc_state.exc_traceback); \ - (self)->gi_exc_state.exc_type = (self)->gi_exc_state.exc_value = (self)->gi_exc_state.exc_traceback = NULL; \ - } -#endif - -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_PyGen_FetchStopIterationValue(pvalue) \ - __Pyx_PyGen__FetchStopIterationValue($local_tstate_cname, pvalue) -#else -#define __Pyx_PyGen_FetchStopIterationValue(pvalue) \ - __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue) -#endif -static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue); /*proto*/ -static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state); /*proto*/ - - -//////////////////// Coroutine.proto //////////////////// - -#define __Pyx_Coroutine_USED -static PyTypeObject *__pyx_CoroutineType = 0; -static PyTypeObject *__pyx_CoroutineAwaitType = 0; -#define __Pyx_Coroutine_CheckExact(obj) (Py_TYPE(obj) == __pyx_CoroutineType) -// __Pyx_Coroutine_Check(obj): see override for IterableCoroutine below -#define __Pyx_Coroutine_Check(obj) __Pyx_Coroutine_CheckExact(obj) -#define __Pyx_CoroutineAwait_CheckExact(obj) (Py_TYPE(obj) == __pyx_CoroutineAwaitType) - -#define __Pyx_Coroutine_New(body, code, closure, name, qualname, module_name) \ - __Pyx__Coroutine_New(__pyx_CoroutineType, body, code, closure, name, qualname, module_name) - -static int __pyx_Coroutine_init(void); /*proto*/ -static PyObject *__Pyx__Coroutine_await(PyObject *coroutine); /*proto*/ - -typedef struct { - PyObject_HEAD - PyObject *coroutine; -} __pyx_CoroutineAwaitObject; - -static PyObject *__Pyx_CoroutineAwait_Close(__pyx_CoroutineAwaitObject *self, PyObject *arg); /*proto*/ -static PyObject *__Pyx_CoroutineAwait_Throw(__pyx_CoroutineAwaitObject *self, PyObject *args); /*proto*/ - - -//////////////////// Generator.proto //////////////////// - -#define __Pyx_Generator_USED -static PyTypeObject *__pyx_GeneratorType = 0; -#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType) - -#define __Pyx_Generator_New(body, code, closure, name, qualname, module_name) \ - __Pyx__Coroutine_New(__pyx_GeneratorType, body, code, closure, name, qualname, module_name) - -static PyObject *__Pyx_Generator_Next(PyObject *self); -static int __pyx_Generator_init(void); /*proto*/ - - -//////////////////// AsyncGen //////////////////// -//@requires: AsyncGen.c::AsyncGenerator -// -> empty, only delegates to separate file - - -//////////////////// CoroutineBase //////////////////// -//@substitute: naming -//@requires: Exceptions.c::PyErrFetchRestore -//@requires: Exceptions.c::PyThreadStateGet -//@requires: Exceptions.c::SwapException -//@requires: Exceptions.c::RaiseException -//@requires: Exceptions.c::SaveResetException -//@requires: ObjectHandling.c::PyObjectCallMethod1 -//@requires: ObjectHandling.c::PyObjectGetAttrStr -//@requires: CommonStructures.c::FetchCommonType - -#include -#include -#if PY_VERSION_HEX >= 0x030b00a6 - #ifndef Py_BUILD_CORE - #define Py_BUILD_CORE 1 - #endif - #include "internal/pycore_frame.h" -#endif - -#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) - -// If StopIteration exception is set, fetches its 'value' -// attribute if any, otherwise sets pvalue to None. -// -// Returns 0 if no exception or StopIteration is set. -// If any other exception is set, returns -1 and leaves -// pvalue unchanged. -static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *$local_tstate_cname, PyObject **pvalue) { - PyObject *et, *ev, *tb; - PyObject *value = NULL; - - __Pyx_ErrFetch(&et, &ev, &tb); - - if (!et) { - Py_XDECREF(tb); - Py_XDECREF(ev); - Py_INCREF(Py_None); - *pvalue = Py_None; - return 0; - } - - // most common case: plain StopIteration without or with separate argument - if (likely(et == PyExc_StopIteration)) { - if (!ev) { - Py_INCREF(Py_None); - value = Py_None; - } -#if PY_VERSION_HEX >= 0x030300A0 - else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) { - value = ((PyStopIterationObject *)ev)->value; - Py_INCREF(value); - Py_DECREF(ev); - } -#endif - // PyErr_SetObject() and friends put the value directly into ev - else if (unlikely(PyTuple_Check(ev))) { - // if it's a tuple, it is interpreted as separate constructor arguments (surprise!) - if (PyTuple_GET_SIZE(ev) >= 1) { -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - value = PyTuple_GET_ITEM(ev, 0); - Py_INCREF(value); -#else - value = PySequence_ITEM(ev, 0); -#endif - } else { - Py_INCREF(Py_None); - value = Py_None; - } - Py_DECREF(ev); - } - else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) { - // 'steal' reference to ev - value = ev; - } - if (likely(value)) { - Py_XDECREF(tb); - Py_DECREF(et); - *pvalue = value; - return 0; - } - } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) { - __Pyx_ErrRestore(et, ev, tb); - return -1; - } - - // otherwise: normalise and check what that gives us - PyErr_NormalizeException(&et, &ev, &tb); - if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) { - // looks like normalisation failed - raise the new exception - __Pyx_ErrRestore(et, ev, tb); - return -1; - } - Py_XDECREF(tb); - Py_DECREF(et); -#if PY_VERSION_HEX >= 0x030300A0 - value = ((PyStopIterationObject *)ev)->value; - Py_INCREF(value); - Py_DECREF(ev); -#else - { - PyObject* args = __Pyx_PyObject_GetAttrStr(ev, PYIDENT("args")); - Py_DECREF(ev); - if (likely(args)) { - value = PySequence_GetItem(args, 0); - Py_DECREF(args); - } - if (unlikely(!value)) { - __Pyx_ErrRestore(NULL, NULL, NULL); - Py_INCREF(Py_None); - value = Py_None; - } - } -#endif - *pvalue = value; - return 0; -} - -static CYTHON_INLINE -void __Pyx_Coroutine_ExceptionClear(__Pyx_ExcInfoStruct *exc_state) { - PyObject *t, *v, *tb; - t = exc_state->exc_type; - v = exc_state->exc_value; - tb = exc_state->exc_traceback; - - exc_state->exc_type = NULL; - exc_state->exc_value = NULL; - exc_state->exc_traceback = NULL; - - Py_XDECREF(t); - Py_XDECREF(v); - Py_XDECREF(tb); -} - -#define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL) -static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) { - const char *msg; - if ((0)) { - #ifdef __Pyx_Coroutine_USED - } else if (__Pyx_Coroutine_Check((PyObject*)gen)) { - msg = "coroutine already executing"; - #endif - #ifdef __Pyx_AsyncGen_USED - } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) { - msg = "async generator already executing"; - #endif - } else { - msg = "generator already executing"; - } - PyErr_SetString(PyExc_ValueError, msg); -} - -#define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL) -static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) { - const char *msg; - if ((0)) { - #ifdef __Pyx_Coroutine_USED - } else if (__Pyx_Coroutine_Check(gen)) { - msg = "can't send non-None value to a just-started coroutine"; - #endif - #ifdef __Pyx_AsyncGen_USED - } else if (__Pyx_AsyncGen_CheckExact(gen)) { - msg = "can't send non-None value to a just-started async generator"; - #endif - } else { - msg = "can't send non-None value to a just-started generator"; - } - PyErr_SetString(PyExc_TypeError, msg); -} - -#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL) -static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) { - #ifdef __Pyx_Coroutine_USED - if (!closing && __Pyx_Coroutine_Check(gen)) { - // `self` is an exhausted coroutine: raise an error, - // except when called from gen_close(), which should - // always be a silent method. - PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine"); - } else - #endif - if (value) { - // `gen` is an exhausted generator: - // only set exception if called from send(). - #ifdef __Pyx_AsyncGen_USED - if (__Pyx_AsyncGen_CheckExact(gen)) - PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration); - else - #endif - PyErr_SetNone(PyExc_StopIteration); - } -} - -static -PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) { - __Pyx_PyThreadState_declare - PyThreadState *tstate; - __Pyx_ExcInfoStruct *exc_state; - PyObject *retval; - - assert(!self->is_running); - - if (unlikely(self->resume_label == 0)) { - if (unlikely(value && value != Py_None)) { - return __Pyx_Coroutine_NotStartedError((PyObject*)self); - } - } - - if (unlikely(self->resume_label == -1)) { - return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing); - } - -#if CYTHON_FAST_THREAD_STATE - __Pyx_PyThreadState_assign - tstate = $local_tstate_cname; -#else - tstate = __Pyx_PyThreadState_Current; -#endif - - // Traceback/Frame rules pre-Py3.7: - // - on entry, save external exception state in self->gi_exc_state, restore it on exit - // - on exit, keep internally generated exceptions in self->gi_exc_state, clear everything else - // - on entry, set "f_back" pointer of internal exception traceback to (current) outer call frame - // - on exit, clear "f_back" of internal exception traceback - // - do not touch external frames and tracebacks - - // Traceback/Frame rules for Py3.7+ (CYTHON_USE_EXC_INFO_STACK): - // - on entry, push internal exception state in self->gi_exc_state on the exception stack - // - on exit, keep internally generated exceptions in self->gi_exc_state, clear everything else - // - on entry, set "f_back" pointer of internal exception traceback to (current) outer call frame - // - on exit, clear "f_back" of internal exception traceback - // - do not touch external frames and tracebacks - - exc_state = &self->gi_exc_state; - if (exc_state->exc_type) { - #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON - // FIXME: what to do in PyPy? - #else - // Generators always return to their most recent caller, not - // necessarily their creator. - if (exc_state->exc_traceback) { - PyTracebackObject *tb = (PyTracebackObject *) exc_state->exc_traceback; - PyFrameObject *f = tb->tb_frame; - - assert(f->f_back == NULL); - #if PY_VERSION_HEX >= 0x030B00A1 - // PyThreadState_GetFrame returns NULL if there isn't a current frame - // which is a valid state so no need to check - f->f_back = PyThreadState_GetFrame(tstate); - #else - Py_XINCREF(tstate->frame); - f->f_back = tstate->frame; - #endif - } - #endif - } - -#if CYTHON_USE_EXC_INFO_STACK - // See https://bugs.python.org/issue25612 - exc_state->previous_item = tstate->exc_info; - tstate->exc_info = exc_state; -#else - if (exc_state->exc_type) { - // We were in an except handler when we left, - // restore the exception state which was put aside. - __Pyx_ExceptionSwap(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); - // self->exc_* now holds the exception state of the caller - } else { - // save away the exception state of the caller - __Pyx_Coroutine_ExceptionClear(exc_state); - __Pyx_ExceptionSave(&exc_state->exc_type, &exc_state->exc_value, &exc_state->exc_traceback); - } -#endif - - self->is_running = 1; - retval = self->body((PyObject *) self, tstate, value); - self->is_running = 0; - -#if CYTHON_USE_EXC_INFO_STACK - // See https://bugs.python.org/issue25612 - exc_state = &self->gi_exc_state; - tstate->exc_info = exc_state->previous_item; - exc_state->previous_item = NULL; - // Cut off the exception frame chain so that we can reconnect it on re-entry above. - __Pyx_Coroutine_ResetFrameBackpointer(exc_state); -#endif - - return retval; -} - -static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__Pyx_ExcInfoStruct *exc_state) { - // Don't keep the reference to f_back any longer than necessary. It - // may keep a chain of frames alive or it could create a reference - // cycle. - PyObject *exc_tb = exc_state->exc_traceback; - - if (likely(exc_tb)) { -#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON - // FIXME: what to do in PyPy? -#else - PyTracebackObject *tb = (PyTracebackObject *) exc_tb; - PyFrameObject *f = tb->tb_frame; - Py_CLEAR(f->f_back); -#endif - } -} - -static CYTHON_INLINE -PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) { - if (unlikely(!retval)) { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - if (!__Pyx_PyErr_Occurred()) { - // method call must not terminate with NULL without setting an exception - PyObject *exc = PyExc_StopIteration; - #ifdef __Pyx_AsyncGen_USED - if (__Pyx_AsyncGen_CheckExact(gen)) - exc = __Pyx_PyExc_StopAsyncIteration; - #endif - __Pyx_PyErr_SetNone(exc); - } - } - return retval; -} - -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) -static CYTHON_INLINE -PyObject *__Pyx_PyGen_Send(PyGenObject *gen, PyObject *arg) { -#if PY_VERSION_HEX <= 0x030A00A1 - return _PyGen_Send(gen, arg); -#else - PyObject *result; - // PyIter_Send() asserts non-NULL arg - if (PyIter_Send((PyObject*)gen, arg ? arg : Py_None, &result) == PYGEN_RETURN) { - if (PyAsyncGen_CheckExact(gen)) { - assert(result == Py_None); - PyErr_SetNone(PyExc_StopAsyncIteration); - } - else if (result == Py_None) { - PyErr_SetNone(PyExc_StopIteration); - } - else { - _PyGen_SetStopIterationValue(result); - } - Py_CLEAR(result); - } - return result; -#endif -} -#endif - -static CYTHON_INLINE -PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) { - PyObject *ret; - PyObject *val = NULL; - __Pyx_Coroutine_Undelegate(gen); - __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val); - // val == NULL on failure => pass on exception - ret = __Pyx_Coroutine_SendEx(gen, val, 0); - Py_XDECREF(val); - return ret; -} - -static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { - PyObject *retval; - __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; - PyObject *yf = gen->yieldfrom; - if (unlikely(gen->is_running)) - return __Pyx_Coroutine_AlreadyRunningError(gen); - if (yf) { - PyObject *ret; - // FIXME: does this really need an INCREF() ? - //Py_INCREF(yf); - gen->is_running = 1; - #ifdef __Pyx_Generator_USED - if (__Pyx_Generator_CheckExact(yf)) { - ret = __Pyx_Coroutine_Send(yf, value); - } else - #endif - #ifdef __Pyx_Coroutine_USED - if (__Pyx_Coroutine_Check(yf)) { - ret = __Pyx_Coroutine_Send(yf, value); - } else - #endif - #ifdef __Pyx_AsyncGen_USED - if (__pyx_PyAsyncGenASend_CheckExact(yf)) { - ret = __Pyx_async_gen_asend_send(yf, value); - } else - #endif - #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) - // _PyGen_Send() is not exported before Py3.6 - if (PyGen_CheckExact(yf)) { - ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); - } else - #endif - #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) - // _PyGen_Send() is not exported before Py3.6 - if (PyCoro_CheckExact(yf)) { - ret = __Pyx_PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); - } else - #endif - { - if (value == Py_None) - ret = Py_TYPE(yf)->tp_iternext(yf); - else - ret = __Pyx_PyObject_CallMethod1(yf, PYIDENT("send"), value); - } - gen->is_running = 0; - //Py_DECREF(yf); - if (likely(ret)) { - return ret; - } - retval = __Pyx_Coroutine_FinishDelegation(gen); - } else { - retval = __Pyx_Coroutine_SendEx(gen, value, 0); - } - return __Pyx_Coroutine_MethodReturn(self, retval); -} - -// This helper function is used by gen_close and gen_throw to -// close a subiterator being delegated to by yield-from. -static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) { - PyObject *retval = NULL; - int err = 0; - - #ifdef __Pyx_Generator_USED - if (__Pyx_Generator_CheckExact(yf)) { - retval = __Pyx_Coroutine_Close(yf); - if (!retval) - return -1; - } else - #endif - #ifdef __Pyx_Coroutine_USED - if (__Pyx_Coroutine_Check(yf)) { - retval = __Pyx_Coroutine_Close(yf); - if (!retval) - return -1; - } else - if (__Pyx_CoroutineAwait_CheckExact(yf)) { - retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf, NULL); - if (!retval) - return -1; - } else - #endif - #ifdef __Pyx_AsyncGen_USED - if (__pyx_PyAsyncGenASend_CheckExact(yf)) { - retval = __Pyx_async_gen_asend_close(yf, NULL); - // cannot fail - } else - if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) { - retval = __Pyx_async_gen_athrow_close(yf, NULL); - // cannot fail - } else - #endif - { - PyObject *meth; - gen->is_running = 1; - meth = __Pyx_PyObject_GetAttrStr(yf, PYIDENT("close")); - if (unlikely(!meth)) { - if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { - PyErr_WriteUnraisable(yf); - } - PyErr_Clear(); - } else { - retval = PyObject_CallFunction(meth, NULL); - Py_DECREF(meth); - if (!retval) - err = -1; - } - gen->is_running = 0; - } - Py_XDECREF(retval); - return err; -} - -static PyObject *__Pyx_Generator_Next(PyObject *self) { - __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self; - PyObject *yf = gen->yieldfrom; - if (unlikely(gen->is_running)) - return __Pyx_Coroutine_AlreadyRunningError(gen); - if (yf) { - PyObject *ret; - // FIXME: does this really need an INCREF() ? - //Py_INCREF(yf); - // YieldFrom code ensures that yf is an iterator - gen->is_running = 1; - #ifdef __Pyx_Generator_USED - if (__Pyx_Generator_CheckExact(yf)) { - ret = __Pyx_Generator_Next(yf); - } else - #endif - #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3) - // _PyGen_Send() is not exported before Py3.6 - if (PyGen_CheckExact(yf)) { - ret = __Pyx_PyGen_Send((PyGenObject*)yf, NULL); - } else - #endif - #ifdef __Pyx_Coroutine_USED - if (__Pyx_Coroutine_Check(yf)) { - ret = __Pyx_Coroutine_Send(yf, Py_None); - } else - #endif - ret = Py_TYPE(yf)->tp_iternext(yf); - gen->is_running = 0; - //Py_DECREF(yf); - if (likely(ret)) { - return ret; - } - return __Pyx_Coroutine_FinishDelegation(gen); - } - return __Pyx_Coroutine_SendEx(gen, Py_None, 0); -} - -static PyObject *__Pyx_Coroutine_Close_Method(PyObject *self, CYTHON_UNUSED PyObject *arg) { - return __Pyx_Coroutine_Close(self); -} - -static PyObject *__Pyx_Coroutine_Close(PyObject *self) { - __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; - PyObject *retval, *raised_exception; - PyObject *yf = gen->yieldfrom; - int err = 0; - - if (unlikely(gen->is_running)) - return __Pyx_Coroutine_AlreadyRunningError(gen); - - if (yf) { - Py_INCREF(yf); - err = __Pyx_Coroutine_CloseIter(gen, yf); - __Pyx_Coroutine_Undelegate(gen); - Py_DECREF(yf); - } - if (err == 0) - PyErr_SetNone(PyExc_GeneratorExit); - retval = __Pyx_Coroutine_SendEx(gen, NULL, 1); - if (unlikely(retval)) { - const char *msg; - Py_DECREF(retval); - if ((0)) { - #ifdef __Pyx_Coroutine_USED - } else if (__Pyx_Coroutine_Check(self)) { - msg = "coroutine ignored GeneratorExit"; - #endif - #ifdef __Pyx_AsyncGen_USED - } else if (__Pyx_AsyncGen_CheckExact(self)) { -#if PY_VERSION_HEX < 0x03060000 - msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)"; -#else - msg = "async generator ignored GeneratorExit"; -#endif - #endif - } else { - msg = "generator ignored GeneratorExit"; - } - PyErr_SetString(PyExc_RuntimeError, msg); - return NULL; - } - raised_exception = PyErr_Occurred(); - if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) { - // ignore these errors - if (raised_exception) PyErr_Clear(); - Py_INCREF(Py_None); - return Py_None; - } - return NULL; -} - -static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb, - PyObject *args, int close_on_genexit) { - __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; - PyObject *yf = gen->yieldfrom; - - if (unlikely(gen->is_running)) - return __Pyx_Coroutine_AlreadyRunningError(gen); - - if (yf) { - PyObject *ret; - Py_INCREF(yf); - if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) { - // Asynchronous generators *should not* be closed right away. - // We have to allow some awaits to work it through, hence the - // `close_on_genexit` parameter here. - int err = __Pyx_Coroutine_CloseIter(gen, yf); - Py_DECREF(yf); - __Pyx_Coroutine_Undelegate(gen); - if (err < 0) - return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0)); - goto throw_here; - } - gen->is_running = 1; - if (0 - #ifdef __Pyx_Generator_USED - || __Pyx_Generator_CheckExact(yf) - #endif - #ifdef __Pyx_Coroutine_USED - || __Pyx_Coroutine_Check(yf) - #endif - ) { - ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit); - #ifdef __Pyx_Coroutine_USED - } else if (__Pyx_CoroutineAwait_CheckExact(yf)) { - ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit); - #endif - } else { - PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, PYIDENT("throw")); - if (unlikely(!meth)) { - Py_DECREF(yf); - if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { - gen->is_running = 0; - return NULL; - } - PyErr_Clear(); - __Pyx_Coroutine_Undelegate(gen); - gen->is_running = 0; - goto throw_here; - } - if (likely(args)) { - ret = PyObject_CallObject(meth, args); - } else { - // "tb" or even "val" might be NULL, but that also correctly terminates the argument list - ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL); - } - Py_DECREF(meth); - } - gen->is_running = 0; - Py_DECREF(yf); - if (!ret) { - ret = __Pyx_Coroutine_FinishDelegation(gen); - } - return __Pyx_Coroutine_MethodReturn(self, ret); - } -throw_here: - __Pyx_Raise(typ, val, tb, NULL); - return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0)); -} - -static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) { - PyObject *typ; - PyObject *val = NULL; - PyObject *tb = NULL; - - if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb)) - return NULL; - - return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1); -} - -static CYTHON_INLINE int __Pyx_Coroutine_traverse_excstate(__Pyx_ExcInfoStruct *exc_state, visitproc visit, void *arg) { - Py_VISIT(exc_state->exc_type); - Py_VISIT(exc_state->exc_value); - Py_VISIT(exc_state->exc_traceback); - return 0; -} - -static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) { - Py_VISIT(gen->closure); - Py_VISIT(gen->classobj); - Py_VISIT(gen->yieldfrom); - return __Pyx_Coroutine_traverse_excstate(&gen->gi_exc_state, visit, arg); -} - -static int __Pyx_Coroutine_clear(PyObject *self) { - __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; - - Py_CLEAR(gen->closure); - Py_CLEAR(gen->classobj); - Py_CLEAR(gen->yieldfrom); - __Pyx_Coroutine_ExceptionClear(&gen->gi_exc_state); -#ifdef __Pyx_AsyncGen_USED - if (__Pyx_AsyncGen_CheckExact(self)) { - Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer); - } -#endif - Py_CLEAR(gen->gi_code); - Py_CLEAR(gen->gi_frame); - Py_CLEAR(gen->gi_name); - Py_CLEAR(gen->gi_qualname); - Py_CLEAR(gen->gi_modulename); - return 0; -} - -static void __Pyx_Coroutine_dealloc(PyObject *self) { - __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; - - PyObject_GC_UnTrack(gen); - if (gen->gi_weakreflist != NULL) - PyObject_ClearWeakRefs(self); - - if (gen->resume_label >= 0) { - // Generator is paused or unstarted, so we need to close - PyObject_GC_Track(self); -#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE - if (PyObject_CallFinalizerFromDealloc(self)) -#else - Py_TYPE(gen)->tp_del(self); - if (Py_REFCNT(self) > 0) -#endif - { - // resurrected. :( - return; - } - PyObject_GC_UnTrack(self); - } - -#ifdef __Pyx_AsyncGen_USED - if (__Pyx_AsyncGen_CheckExact(self)) { - /* We have to handle this case for asynchronous generators - right here, because this code has to be between UNTRACK - and GC_Del. */ - Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer); - } -#endif - __Pyx_Coroutine_clear(self); - PyObject_GC_Del(gen); -} - -static void __Pyx_Coroutine_del(PyObject *self) { - PyObject *error_type, *error_value, *error_traceback; - __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self; - __Pyx_PyThreadState_declare - - if (gen->resume_label < 0) { - // already terminated => nothing to clean up - return; - } - -#if !CYTHON_USE_TP_FINALIZE - // Temporarily resurrect the object. - assert(self->ob_refcnt == 0); - __Pyx_SET_REFCNT(self, 1); -#endif - - __Pyx_PyThreadState_assign - - // Save the current exception, if any. - __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); - -#ifdef __Pyx_AsyncGen_USED - if (__Pyx_AsyncGen_CheckExact(self)) { - __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self; - PyObject *finalizer = agen->ag_finalizer; - if (finalizer && !agen->ag_closed) { - PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self); - if (unlikely(!res)) { - PyErr_WriteUnraisable(self); - } else { - Py_DECREF(res); - } - // Restore the saved exception. - __Pyx_ErrRestore(error_type, error_value, error_traceback); - return; - } - } -#endif - - if (unlikely(gen->resume_label == 0 && !error_value)) { -#ifdef __Pyx_Coroutine_USED -#ifdef __Pyx_Generator_USED - // only warn about (async) coroutines - if (!__Pyx_Generator_CheckExact(self)) -#endif - { - // untrack dead object as we are executing Python code (which might trigger GC) - PyObject_GC_UnTrack(self); -#if PY_MAJOR_VERSION >= 3 /* PY_VERSION_HEX >= 0x03030000*/ || defined(PyErr_WarnFormat) - if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0)) - PyErr_WriteUnraisable(self); -#else - {PyObject *msg; - char *cmsg; - #if CYTHON_COMPILING_IN_PYPY - msg = NULL; - cmsg = (char*) "coroutine was never awaited"; - #else - char *cname; - PyObject *qualname; - qualname = gen->gi_qualname; - cname = PyString_AS_STRING(qualname); - msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname); - - if (unlikely(!msg)) { - PyErr_Clear(); - cmsg = (char*) "coroutine was never awaited"; - } else { - cmsg = PyString_AS_STRING(msg); - } - #endif - if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0)) - PyErr_WriteUnraisable(self); - Py_XDECREF(msg);} -#endif - PyObject_GC_Track(self); - } -#endif /*__Pyx_Coroutine_USED*/ - } else { - PyObject *res = __Pyx_Coroutine_Close(self); - if (unlikely(!res)) { - if (PyErr_Occurred()) - PyErr_WriteUnraisable(self); - } else { - Py_DECREF(res); - } - } - - // Restore the saved exception. - __Pyx_ErrRestore(error_type, error_value, error_traceback); - -#if !CYTHON_USE_TP_FINALIZE - // Undo the temporary resurrection; can't use DECREF here, it would - // cause a recursive call. - assert(Py_REFCNT(self) > 0); - if (--self->ob_refcnt == 0) { - // this is the normal path out - return; - } - - // close() resurrected it! Make it look like the original Py_DECREF - // never happened. - { - Py_ssize_t refcnt = Py_REFCNT(self); - _Py_NewReference(self); - __Pyx_SET_REFCNT(self, refcnt); - } -#if CYTHON_COMPILING_IN_CPYTHON - assert(PyType_IS_GC(Py_TYPE(self)) && - _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); - - // If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so - // we need to undo that. - _Py_DEC_REFTOTAL; -#endif - // If Py_TRACE_REFS, _Py_NewReference re-added self to the object - // chain, so no more to do there. - // If COUNT_ALLOCS, the original decref bumped tp_frees, and - // _Py_NewReference bumped tp_allocs: both of those need to be - // undone. -#ifdef COUNT_ALLOCS - --Py_TYPE(self)->tp_frees; - --Py_TYPE(self)->tp_allocs; -#endif -#endif -} - -static PyObject * -__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) -{ - PyObject *name = self->gi_name; - // avoid NULL pointer dereference during garbage collection - if (unlikely(!name)) name = Py_None; - Py_INCREF(name); - return name; -} - -static int -__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context) -{ - PyObject *tmp; - -#if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) -#else - if (unlikely(value == NULL || !PyString_Check(value))) -#endif - { - PyErr_SetString(PyExc_TypeError, - "__name__ must be set to a string object"); - return -1; - } - tmp = self->gi_name; - Py_INCREF(value); - self->gi_name = value; - Py_XDECREF(tmp); - return 0; -} - -static PyObject * -__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) -{ - PyObject *name = self->gi_qualname; - // avoid NULL pointer dereference during garbage collection - if (unlikely(!name)) name = Py_None; - Py_INCREF(name); - return name; -} - -static int -__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value, CYTHON_UNUSED void *context) -{ - PyObject *tmp; - -#if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) -#else - if (unlikely(value == NULL || !PyString_Check(value))) -#endif - { - PyErr_SetString(PyExc_TypeError, - "__qualname__ must be set to a string object"); - return -1; - } - tmp = self->gi_qualname; - Py_INCREF(value); - self->gi_qualname = value; - Py_XDECREF(tmp); - return 0; -} - - -static PyObject * -__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self, CYTHON_UNUSED void *context) -{ - PyObject *frame = self->gi_frame; - if (!frame) { - if (unlikely(!self->gi_code)) { - // Avoid doing something stupid, e.g. during garbage collection. - Py_RETURN_NONE; - } - frame = (PyObject *) PyFrame_New( - PyThreadState_Get(), /*PyThreadState *tstate,*/ - (PyCodeObject*) self->gi_code, /*PyCodeObject *code,*/ - $moddict_cname, /*PyObject *globals,*/ - 0 /*PyObject *locals*/ - ); - if (unlikely(!frame)) - return NULL; - // keep the frame cached once it's created - self->gi_frame = frame; - } - Py_INCREF(frame); - return frame; -} - -static __pyx_CoroutineObject *__Pyx__Coroutine_New( - PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, - PyObject *name, PyObject *qualname, PyObject *module_name) { - __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type); - if (unlikely(!gen)) - return NULL; - return __Pyx__Coroutine_NewInit(gen, body, code, closure, name, qualname, module_name); -} - -static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit( - __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *code, PyObject *closure, - PyObject *name, PyObject *qualname, PyObject *module_name) { - gen->body = body; - gen->closure = closure; - Py_XINCREF(closure); - gen->is_running = 0; - gen->resume_label = 0; - gen->classobj = NULL; - gen->yieldfrom = NULL; - gen->gi_exc_state.exc_type = NULL; - gen->gi_exc_state.exc_value = NULL; - gen->gi_exc_state.exc_traceback = NULL; -#if CYTHON_USE_EXC_INFO_STACK - gen->gi_exc_state.previous_item = NULL; -#endif - gen->gi_weakreflist = NULL; - Py_XINCREF(qualname); - gen->gi_qualname = qualname; - Py_XINCREF(name); - gen->gi_name = name; - Py_XINCREF(module_name); - gen->gi_modulename = module_name; - Py_XINCREF(code); - gen->gi_code = code; - gen->gi_frame = NULL; - - PyObject_GC_Track(gen); - return gen; -} - - -//////////////////// Coroutine //////////////////// -//@requires: CoroutineBase -//@requires: PatchGeneratorABC -//@requires: ObjectHandling.c::PyObject_GenericGetAttrNoDict - -static void __Pyx_CoroutineAwait_dealloc(PyObject *self) { - PyObject_GC_UnTrack(self); - Py_CLEAR(((__pyx_CoroutineAwaitObject*)self)->coroutine); - PyObject_GC_Del(self); -} - -static int __Pyx_CoroutineAwait_traverse(__pyx_CoroutineAwaitObject *self, visitproc visit, void *arg) { - Py_VISIT(self->coroutine); - return 0; -} - -static int __Pyx_CoroutineAwait_clear(__pyx_CoroutineAwaitObject *self) { - Py_CLEAR(self->coroutine); - return 0; -} - -static PyObject *__Pyx_CoroutineAwait_Next(__pyx_CoroutineAwaitObject *self) { - return __Pyx_Generator_Next(self->coroutine); -} - -static PyObject *__Pyx_CoroutineAwait_Send(__pyx_CoroutineAwaitObject *self, PyObject *value) { - return __Pyx_Coroutine_Send(self->coroutine, value); -} - -static PyObject *__Pyx_CoroutineAwait_Throw(__pyx_CoroutineAwaitObject *self, PyObject *args) { - return __Pyx_Coroutine_Throw(self->coroutine, args); -} - -static PyObject *__Pyx_CoroutineAwait_Close(__pyx_CoroutineAwaitObject *self, CYTHON_UNUSED PyObject *arg) { - return __Pyx_Coroutine_Close(self->coroutine); -} - -static PyObject *__Pyx_CoroutineAwait_self(PyObject *self) { - Py_INCREF(self); - return self; -} - -#if !CYTHON_COMPILING_IN_PYPY -static PyObject *__Pyx_CoroutineAwait_no_new(CYTHON_UNUSED PyTypeObject *type, CYTHON_UNUSED PyObject *args, CYTHON_UNUSED PyObject *kwargs) { - PyErr_SetString(PyExc_TypeError, "cannot instantiate type, use 'await coroutine' instead"); - return NULL; -} -#endif - -static PyMethodDef __pyx_CoroutineAwait_methods[] = { - {"send", (PyCFunction) __Pyx_CoroutineAwait_Send, METH_O, - (char*) PyDoc_STR("send(arg) -> send 'arg' into coroutine,\nreturn next yielded value or raise StopIteration.")}, - {"throw", (PyCFunction) __Pyx_CoroutineAwait_Throw, METH_VARARGS, - (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in coroutine,\nreturn next yielded value or raise StopIteration.")}, - {"close", (PyCFunction) __Pyx_CoroutineAwait_Close, METH_NOARGS, - (char*) PyDoc_STR("close() -> raise GeneratorExit inside coroutine.")}, - {0, 0, 0, 0} -}; - -static PyTypeObject __pyx_CoroutineAwaitType_type = { - PyVarObject_HEAD_INIT(0, 0) - "coroutine_wrapper", /*tp_name*/ - sizeof(__pyx_CoroutineAwaitObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - (destructor) __Pyx_CoroutineAwait_dealloc,/*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_as_async resp. tp_compare*/ - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - PyDoc_STR("A wrapper object implementing __await__ for coroutines."), /*tp_doc*/ - (traverseproc) __Pyx_CoroutineAwait_traverse, /*tp_traverse*/ - (inquiry) __Pyx_CoroutineAwait_clear, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - __Pyx_CoroutineAwait_self, /*tp_iter*/ - (iternextfunc) __Pyx_CoroutineAwait_Next, /*tp_iternext*/ - __pyx_CoroutineAwait_methods, /*tp_methods*/ - 0 , /*tp_members*/ - 0 , /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ -#if !CYTHON_COMPILING_IN_PYPY - __Pyx_CoroutineAwait_no_new, /*tp_new*/ -#else - 0, /*tp_new*/ -#endif - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ - 0, /*tp_del*/ - 0, /*tp_version_tag*/ -#if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ -#endif -#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, /*tp_vectorcall*/ -#endif -#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ -#endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 - 0, /*tp_pypy_flags*/ -#endif -}; - -#if PY_VERSION_HEX < 0x030500B1 || defined(__Pyx_IterableCoroutine_USED) || CYTHON_USE_ASYNC_SLOTS -static CYTHON_INLINE PyObject *__Pyx__Coroutine_await(PyObject *coroutine) { - __pyx_CoroutineAwaitObject *await = PyObject_GC_New(__pyx_CoroutineAwaitObject, __pyx_CoroutineAwaitType); - if (unlikely(!await)) return NULL; - Py_INCREF(coroutine); - await->coroutine = coroutine; - PyObject_GC_Track(await); - return (PyObject*)await; -} -#endif - -#if PY_VERSION_HEX < 0x030500B1 -static PyObject *__Pyx_Coroutine_await_method(PyObject *coroutine, CYTHON_UNUSED PyObject *arg) { - return __Pyx__Coroutine_await(coroutine); -} -#endif - -#if defined(__Pyx_IterableCoroutine_USED) || CYTHON_USE_ASYNC_SLOTS -static PyObject *__Pyx_Coroutine_await(PyObject *coroutine) { - if (unlikely(!coroutine || !__Pyx_Coroutine_Check(coroutine))) { - PyErr_SetString(PyExc_TypeError, "invalid input, expected coroutine"); - return NULL; - } - return __Pyx__Coroutine_await(coroutine); -} -#endif - -#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1 -static PyObject *__Pyx_Coroutine_compare(PyObject *obj, PyObject *other, int op) { - PyObject* result; - switch (op) { - case Py_EQ: result = (other == obj) ? Py_True : Py_False; break; - case Py_NE: result = (other != obj) ? Py_True : Py_False; break; - default: - result = Py_NotImplemented; - } - Py_INCREF(result); - return result; -} -#endif - -static PyMethodDef __pyx_Coroutine_methods[] = { - {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, - (char*) PyDoc_STR("send(arg) -> send 'arg' into coroutine,\nreturn next iterated value or raise StopIteration.")}, - {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, - (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in coroutine,\nreturn next iterated value or raise StopIteration.")}, - {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, - (char*) PyDoc_STR("close() -> raise GeneratorExit inside coroutine.")}, -#if PY_VERSION_HEX < 0x030500B1 - {"__await__", (PyCFunction) __Pyx_Coroutine_await_method, METH_NOARGS, - (char*) PyDoc_STR("__await__() -> return an iterator to be used in await expression.")}, -#endif - {0, 0, 0, 0} -}; - -static PyMemberDef __pyx_Coroutine_memberlist[] = { - {(char *) "cr_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL}, - {(char*) "cr_await", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, - (char*) PyDoc_STR("object being awaited, or None")}, - {(char*) "cr_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL}, - {(char *) "__module__", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_modulename), PY_WRITE_RESTRICTED, 0}, - {0, 0, 0, 0, 0} -}; - -static PyGetSetDef __pyx_Coroutine_getsets[] = { - {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, - (char*) PyDoc_STR("name of the coroutine"), 0}, - {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, - (char*) PyDoc_STR("qualified name of the coroutine"), 0}, - {(char *) "cr_frame", (getter)__Pyx_Coroutine_get_frame, NULL, - (char*) PyDoc_STR("Frame of the coroutine"), 0}, - {0, 0, 0, 0, 0} -}; - -#if CYTHON_USE_ASYNC_SLOTS -static __Pyx_PyAsyncMethodsStruct __pyx_Coroutine_as_async = { - __Pyx_Coroutine_await, /*am_await*/ - 0, /*am_aiter*/ - 0, /*am_anext*/ -#if PY_VERSION_HEX >= 0x030A00A3 - 0, /*am_send*/ -#endif -}; -#endif - -static PyTypeObject __pyx_CoroutineType_type = { - PyVarObject_HEAD_INIT(0, 0) - "coroutine", /*tp_name*/ - sizeof(__pyx_CoroutineObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - (destructor) __Pyx_Coroutine_dealloc,/*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ -#if CYTHON_USE_ASYNC_SLOTS - &__pyx_Coroutine_as_async, /*tp_as_async (tp_reserved) - Py3 only! */ -#else - 0, /*tp_reserved*/ -#endif - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ - 0, /*tp_doc*/ - (traverseproc) __Pyx_Coroutine_traverse, /*tp_traverse*/ - 0, /*tp_clear*/ -#if CYTHON_USE_ASYNC_SLOTS && CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1 - // in order to (mis-)use tp_reserved above, we must also implement tp_richcompare - __Pyx_Coroutine_compare, /*tp_richcompare*/ -#else - 0, /*tp_richcompare*/ -#endif - offsetof(__pyx_CoroutineObject, gi_weakreflist), /*tp_weaklistoffset*/ - // no tp_iter() as iterator is only available through __await__() - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_Coroutine_methods, /*tp_methods*/ - __pyx_Coroutine_memberlist, /*tp_members*/ - __pyx_Coroutine_getsets, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - 0, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ -#if CYTHON_USE_TP_FINALIZE - 0, /*tp_del*/ -#else - __Pyx_Coroutine_del, /*tp_del*/ -#endif - 0, /*tp_version_tag*/ -#if CYTHON_USE_TP_FINALIZE - __Pyx_Coroutine_del, /*tp_finalize*/ -#elif PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ -#endif -#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, /*tp_vectorcall*/ -#endif -#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ -#endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 - 0, /*tp_pypy_flags*/ -#endif -}; - -static int __pyx_Coroutine_init(void) { - // on Windows, C-API functions can't be used in slots statically - __pyx_CoroutineType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; - __pyx_CoroutineType = __Pyx_FetchCommonType(&__pyx_CoroutineType_type); - if (unlikely(!__pyx_CoroutineType)) - return -1; - -#ifdef __Pyx_IterableCoroutine_USED - if (unlikely(__pyx_IterableCoroutine_init() == -1)) - return -1; -#endif - - __pyx_CoroutineAwaitType = __Pyx_FetchCommonType(&__pyx_CoroutineAwaitType_type); - if (unlikely(!__pyx_CoroutineAwaitType)) - return -1; - return 0; -} - - -//////////////////// IterableCoroutine.proto //////////////////// - -#define __Pyx_IterableCoroutine_USED - -static PyTypeObject *__pyx_IterableCoroutineType = 0; - -#undef __Pyx_Coroutine_Check -#define __Pyx_Coroutine_Check(obj) (__Pyx_Coroutine_CheckExact(obj) || (Py_TYPE(obj) == __pyx_IterableCoroutineType)) - -#define __Pyx_IterableCoroutine_New(body, code, closure, name, qualname, module_name) \ - __Pyx__Coroutine_New(__pyx_IterableCoroutineType, body, code, closure, name, qualname, module_name) - -static int __pyx_IterableCoroutine_init(void);/*proto*/ - - -//////////////////// IterableCoroutine //////////////////// -//@requires: Coroutine -//@requires: CommonStructures.c::FetchCommonType - -static PyTypeObject __pyx_IterableCoroutineType_type = { - PyVarObject_HEAD_INIT(0, 0) - "iterable_coroutine", /*tp_name*/ - sizeof(__pyx_CoroutineObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - (destructor) __Pyx_Coroutine_dealloc,/*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ -#if CYTHON_USE_ASYNC_SLOTS - &__pyx_Coroutine_as_async, /*tp_as_async (tp_reserved) - Py3 only! */ -#else - 0, /*tp_reserved*/ -#endif - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ - 0, /*tp_doc*/ - (traverseproc) __Pyx_Coroutine_traverse, /*tp_traverse*/ - 0, /*tp_clear*/ -#if CYTHON_USE_ASYNC_SLOTS && CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 && PY_VERSION_HEX < 0x030500B1 - // in order to (mis-)use tp_reserved above, we must also implement tp_richcompare - __Pyx_Coroutine_compare, /*tp_richcompare*/ -#else - 0, /*tp_richcompare*/ -#endif - offsetof(__pyx_CoroutineObject, gi_weakreflist), /*tp_weaklistoffset*/ - // enable iteration for legacy support of asyncio yield-from protocol - __Pyx_Coroutine_await, /*tp_iter*/ - (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/ - __pyx_Coroutine_methods, /*tp_methods*/ - __pyx_Coroutine_memberlist, /*tp_members*/ - __pyx_Coroutine_getsets, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - 0, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ -#if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_del*/ -#else - __Pyx_Coroutine_del, /*tp_del*/ -#endif - 0, /*tp_version_tag*/ -#if PY_VERSION_HEX >= 0x030400a1 - __Pyx_Coroutine_del, /*tp_finalize*/ -#endif -#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, /*tp_vectorcall*/ -#endif -#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ -#endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 - 0, /*tp_pypy_flags*/ -#endif -}; - - -static int __pyx_IterableCoroutine_init(void) { - __pyx_IterableCoroutineType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; - __pyx_IterableCoroutineType = __Pyx_FetchCommonType(&__pyx_IterableCoroutineType_type); - if (unlikely(!__pyx_IterableCoroutineType)) - return -1; - return 0; -} - - -//////////////////// Generator //////////////////// -//@requires: CoroutineBase -//@requires: PatchGeneratorABC -//@requires: ObjectHandling.c::PyObject_GenericGetAttrNoDict - -static PyMethodDef __pyx_Generator_methods[] = { - {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O, - (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")}, - {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS, - (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")}, - {"close", (PyCFunction) __Pyx_Coroutine_Close_Method, METH_NOARGS, - (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")}, - {0, 0, 0, 0} -}; - -static PyMemberDef __pyx_Generator_memberlist[] = { - {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL}, - {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY, - (char*) PyDoc_STR("object being iterated by 'yield from', or None")}, - {(char*) "gi_code", T_OBJECT, offsetof(__pyx_CoroutineObject, gi_code), READONLY, NULL}, - {0, 0, 0, 0, 0} -}; - -static PyGetSetDef __pyx_Generator_getsets[] = { - {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name, - (char*) PyDoc_STR("name of the generator"), 0}, - {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, - (char*) PyDoc_STR("qualified name of the generator"), 0}, - {(char *) "gi_frame", (getter)__Pyx_Coroutine_get_frame, NULL, - (char*) PyDoc_STR("Frame of the generator"), 0}, - {0, 0, 0, 0, 0} -}; - -static PyTypeObject __pyx_GeneratorType_type = { - PyVarObject_HEAD_INIT(0, 0) - "generator", /*tp_name*/ - sizeof(__pyx_CoroutineObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - (destructor) __Pyx_Coroutine_dealloc,/*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare / tp_as_async*/ - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/ - 0, /*tp_doc*/ - (traverseproc) __Pyx_Coroutine_traverse, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - offsetof(__pyx_CoroutineObject, gi_weakreflist), /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - (iternextfunc) __Pyx_Generator_Next, /*tp_iternext*/ - __pyx_Generator_methods, /*tp_methods*/ - __pyx_Generator_memberlist, /*tp_members*/ - __pyx_Generator_getsets, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - 0, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ -#if CYTHON_USE_TP_FINALIZE - 0, /*tp_del*/ -#else - __Pyx_Coroutine_del, /*tp_del*/ -#endif - 0, /*tp_version_tag*/ -#if CYTHON_USE_TP_FINALIZE - __Pyx_Coroutine_del, /*tp_finalize*/ -#elif PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ -#endif -#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, /*tp_vectorcall*/ -#endif -#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ -#endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 - 0, /*tp_pypy_flags*/ -#endif -}; - -static int __pyx_Generator_init(void) { - // on Windows, C-API functions can't be used in slots statically - __pyx_GeneratorType_type.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; - __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; - - __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type); - if (unlikely(!__pyx_GeneratorType)) { - return -1; - } - return 0; -} - - -/////////////// ReturnWithStopIteration.proto /////////////// - -#define __Pyx_ReturnWithStopIteration(value) \ - if (value == Py_None) PyErr_SetNone(PyExc_StopIteration); else __Pyx__ReturnWithStopIteration(value) -static void __Pyx__ReturnWithStopIteration(PyObject* value); /*proto*/ - -/////////////// ReturnWithStopIteration /////////////// -//@requires: Exceptions.c::PyErrFetchRestore -//@requires: Exceptions.c::PyThreadStateGet -//@substitute: naming - -// 1) Instantiating an exception just to pass back a value is costly. -// 2) CPython 3.3 <= x < 3.5b1 crash in yield-from when the StopIteration is not instantiated. -// 3) Passing a tuple as value into PyErr_SetObject() passes its items on as arguments. -// 4) Passing an exception as value will interpret it as an exception on unpacking and raise it (or unpack its value). -// 5) If there is currently an exception being handled, we need to chain it. - -static void __Pyx__ReturnWithStopIteration(PyObject* value) { - PyObject *exc, *args; -#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_PYSTON - __Pyx_PyThreadState_declare - if ((PY_VERSION_HEX >= 0x03030000 && PY_VERSION_HEX < 0x030500B1) - || unlikely(PyTuple_Check(value) || PyExceptionInstance_Check(value))) { - args = PyTuple_New(1); - if (unlikely(!args)) return; - Py_INCREF(value); - PyTuple_SET_ITEM(args, 0, value); - exc = PyType_Type.tp_call(PyExc_StopIteration, args, NULL); - Py_DECREF(args); - if (!exc) return; - } else { - // it's safe to avoid instantiating the exception - Py_INCREF(value); - exc = value; - } - #if CYTHON_FAST_THREAD_STATE - __Pyx_PyThreadState_assign - #if CYTHON_USE_EXC_INFO_STACK - if (!$local_tstate_cname->exc_info->exc_type) - #else - if (!$local_tstate_cname->exc_type) - #endif - { - // no chaining needed => avoid the overhead in PyErr_SetObject() - Py_INCREF(PyExc_StopIteration); - __Pyx_ErrRestore(PyExc_StopIteration, exc, NULL); - return; - } - #endif -#else - args = PyTuple_Pack(1, value); - if (unlikely(!args)) return; - exc = PyObject_Call(PyExc_StopIteration, args, NULL); - Py_DECREF(args); - if (unlikely(!exc)) return; -#endif - PyErr_SetObject(PyExc_StopIteration, exc); - Py_DECREF(exc); -} - - -//////////////////// PatchModuleWithCoroutine.proto //////////////////// - -static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code); /*proto*/ - -//////////////////// PatchModuleWithCoroutine //////////////////// -//@substitute: naming - -static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) { -#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) - int result; - PyObject *globals, *result_obj; - globals = PyDict_New(); if (unlikely(!globals)) goto ignore; - result = PyDict_SetItemString(globals, "_cython_coroutine_type", - #ifdef __Pyx_Coroutine_USED - (PyObject*)__pyx_CoroutineType); - #else - Py_None); - #endif - if (unlikely(result < 0)) goto ignore; - result = PyDict_SetItemString(globals, "_cython_generator_type", - #ifdef __Pyx_Generator_USED - (PyObject*)__pyx_GeneratorType); - #else - Py_None); - #endif - if (unlikely(result < 0)) goto ignore; - if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore; - if (unlikely(PyDict_SetItemString(globals, "__builtins__", $builtins_cname) < 0)) goto ignore; - result_obj = PyRun_String(py_code, Py_file_input, globals, globals); - if (unlikely(!result_obj)) goto ignore; - Py_DECREF(result_obj); - Py_DECREF(globals); - return module; - -ignore: - Py_XDECREF(globals); - PyErr_WriteUnraisable(module); - if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) { - Py_DECREF(module); - module = NULL; - } -#else - // avoid "unused" warning - py_code++; -#endif - return module; -} - - -//////////////////// PatchGeneratorABC.proto //////////////////// - -// register with Generator/Coroutine ABCs in 'collections.abc' -// see https://bugs.python.org/issue24018 -static int __Pyx_patch_abc(void); /*proto*/ - -//////////////////// PatchGeneratorABC //////////////////// -//@requires: PatchModuleWithCoroutine - -#ifndef CYTHON_REGISTER_ABCS -#define CYTHON_REGISTER_ABCS 1 -#endif - -#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) -static PyObject* __Pyx_patch_abc_module(PyObject *module); /*proto*/ -static PyObject* __Pyx_patch_abc_module(PyObject *module) { - module = __Pyx_Coroutine_patch_module( - module, CSTRING("""\ -if _cython_generator_type is not None: - try: Generator = _module.Generator - except AttributeError: pass - else: Generator.register(_cython_generator_type) -if _cython_coroutine_type is not None: - try: Coroutine = _module.Coroutine - except AttributeError: pass - else: Coroutine.register(_cython_coroutine_type) -""") - ); - return module; -} -#endif - -static int __Pyx_patch_abc(void) { -#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) - static int abc_patched = 0; - if (CYTHON_REGISTER_ABCS && !abc_patched) { - PyObject *module; - module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections"); - if (!module) { - PyErr_WriteUnraisable(NULL); - if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, - ((PY_MAJOR_VERSION >= 3) ? - "Cython module failed to register with collections.abc module" : - "Cython module failed to register with collections module"), 1) < 0)) { - return -1; - } - } else { - module = __Pyx_patch_abc_module(module); - abc_patched = 1; - if (unlikely(!module)) - return -1; - Py_DECREF(module); - } - // also register with "backports_abc" module if available, just in case - module = PyImport_ImportModule("backports_abc"); - if (module) { - module = __Pyx_patch_abc_module(module); - Py_XDECREF(module); - } - if (!module) { - PyErr_Clear(); - } - } -#else - // avoid "unused" warning for __Pyx_Coroutine_patch_module() - if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL); -#endif - return 0; -} - - -//////////////////// PatchAsyncIO.proto //////////////////// - -// run after importing "asyncio" to patch Cython generator support into it -static PyObject* __Pyx_patch_asyncio(PyObject* module); /*proto*/ - -//////////////////// PatchAsyncIO //////////////////// -//@requires: ImportExport.c::Import -//@requires: PatchModuleWithCoroutine -//@requires: PatchInspect - -static PyObject* __Pyx_patch_asyncio(PyObject* module) { -#if PY_VERSION_HEX < 0x030500B2 && \ - (defined(__Pyx_Coroutine_USED) || defined(__Pyx_Generator_USED)) && \ - (!defined(CYTHON_PATCH_ASYNCIO) || CYTHON_PATCH_ASYNCIO) - PyObject *patch_module = NULL; - static int asyncio_patched = 0; - if (unlikely((!asyncio_patched) && module)) { - PyObject *package; - package = __Pyx_Import(PYIDENT("asyncio.coroutines"), NULL, 0); - if (package) { - patch_module = __Pyx_Coroutine_patch_module( - PyObject_GetAttrString(package, "coroutines"), CSTRING("""\ -try: - coro_types = _module._COROUTINE_TYPES -except AttributeError: pass -else: - if _cython_coroutine_type is not None and _cython_coroutine_type not in coro_types: - coro_types = tuple(coro_types) + (_cython_coroutine_type,) - if _cython_generator_type is not None and _cython_generator_type not in coro_types: - coro_types = tuple(coro_types) + (_cython_generator_type,) -_module._COROUTINE_TYPES = coro_types -""") - ); - } else { - PyErr_Clear(); -// Always enable fallback: even if we compile against 3.4.2, we might be running on 3.4.1 at some point. -//#if PY_VERSION_HEX < 0x03040200 - // Py3.4.1 used to have asyncio.tasks instead of asyncio.coroutines - package = __Pyx_Import(PYIDENT("asyncio.tasks"), NULL, 0); - if (unlikely(!package)) goto asyncio_done; - patch_module = __Pyx_Coroutine_patch_module( - PyObject_GetAttrString(package, "tasks"), CSTRING("""\ -if hasattr(_module, 'iscoroutine'): - old_types = getattr(_module.iscoroutine, '_cython_coroutine_types', None) - if old_types is None or not isinstance(old_types, set): - old_types = set() - def cy_wrap(orig_func, type=type, cython_coroutine_types=old_types): - def cy_iscoroutine(obj): return type(obj) in cython_coroutine_types or orig_func(obj) - cy_iscoroutine._cython_coroutine_types = cython_coroutine_types - return cy_iscoroutine - _module.iscoroutine = cy_wrap(_module.iscoroutine) - if _cython_coroutine_type is not None: - old_types.add(_cython_coroutine_type) - if _cython_generator_type is not None: - old_types.add(_cython_generator_type) -""") - ); -//#endif -// Py < 0x03040200 - } - Py_DECREF(package); - if (unlikely(!patch_module)) goto ignore; -//#if PY_VERSION_HEX < 0x03040200 -asyncio_done: - PyErr_Clear(); -//#endif - asyncio_patched = 1; -#ifdef __Pyx_Generator_USED - // now patch inspect.isgenerator() by looking up the imported module in the patched asyncio module - { - PyObject *inspect_module; - if (patch_module) { - inspect_module = PyObject_GetAttr(patch_module, PYIDENT("inspect")); - Py_DECREF(patch_module); - } else { - inspect_module = __Pyx_Import(PYIDENT("inspect"), NULL, 0); - } - if (unlikely(!inspect_module)) goto ignore; - inspect_module = __Pyx_patch_inspect(inspect_module); - if (unlikely(!inspect_module)) { - Py_DECREF(module); - module = NULL; - } - Py_XDECREF(inspect_module); - } -#else - // avoid "unused" warning for __Pyx_patch_inspect() - if ((0)) return __Pyx_patch_inspect(module); -#endif - } - return module; -ignore: - PyErr_WriteUnraisable(module); - if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch asyncio package with custom generator type", 1) < 0)) { - Py_DECREF(module); - module = NULL; - } -#else - // avoid "unused" warning for __Pyx_Coroutine_patch_module() - if ((0)) return __Pyx_patch_inspect(__Pyx_Coroutine_patch_module(module, NULL)); -#endif - return module; -} - - -//////////////////// PatchInspect.proto //////////////////// - -// run after importing "inspect" to patch Cython generator support into it -static PyObject* __Pyx_patch_inspect(PyObject* module); /*proto*/ - -//////////////////// PatchInspect //////////////////// -//@requires: PatchModuleWithCoroutine - -static PyObject* __Pyx_patch_inspect(PyObject* module) { -#if defined(__Pyx_Generator_USED) && (!defined(CYTHON_PATCH_INSPECT) || CYTHON_PATCH_INSPECT) - static int inspect_patched = 0; - if (unlikely((!inspect_patched) && module)) { - module = __Pyx_Coroutine_patch_module( - module, CSTRING("""\ -old_types = getattr(_module.isgenerator, '_cython_generator_types', None) -if old_types is None or not isinstance(old_types, set): - old_types = set() - def cy_wrap(orig_func, type=type, cython_generator_types=old_types): - def cy_isgenerator(obj): return type(obj) in cython_generator_types or orig_func(obj) - cy_isgenerator._cython_generator_types = cython_generator_types - return cy_isgenerator - _module.isgenerator = cy_wrap(_module.isgenerator) -old_types.add(_cython_generator_type) -""") - ); - inspect_patched = 1; - } -#else - // avoid "unused" warning for __Pyx_Coroutine_patch_module() - if ((0)) return __Pyx_Coroutine_patch_module(module, NULL); -#endif - return module; -} - - -//////////////////// StopAsyncIteration.proto //////////////////// - -#define __Pyx_StopAsyncIteration_USED -static PyObject *__Pyx_PyExc_StopAsyncIteration; -static int __pyx_StopAsyncIteration_init(void); /*proto*/ - -//////////////////// StopAsyncIteration //////////////////// - -#if PY_VERSION_HEX < 0x030500B1 -static PyTypeObject __Pyx__PyExc_StopAsyncIteration_type = { - PyVarObject_HEAD_INIT(0, 0) - "StopAsyncIteration", /*tp_name*/ - sizeof(PyBaseExceptionObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - 0, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - 0, /*tp_compare / reserved*/ - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - 0, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - PyDoc_STR("Signal the end from iterator.__anext__()."), /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - 0, /*tp_methods*/ - 0, /*tp_members*/ - 0, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - 0, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - 0, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ - 0, /*tp_del*/ - 0, /*tp_version_tag*/ -#if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ -#endif -#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM+0 >= 0x06000000 - 0, /*tp_pypy_flags*/ -#endif -}; -#endif - -static int __pyx_StopAsyncIteration_init(void) { -#if PY_VERSION_HEX >= 0x030500B1 - __Pyx_PyExc_StopAsyncIteration = PyExc_StopAsyncIteration; -#else - PyObject *builtins = PyEval_GetBuiltins(); - if (likely(builtins)) { - PyObject *exc = PyMapping_GetItemString(builtins, (char*) "StopAsyncIteration"); - if (exc) { - __Pyx_PyExc_StopAsyncIteration = exc; - return 0; - } - } - PyErr_Clear(); - - __Pyx__PyExc_StopAsyncIteration_type.tp_traverse = ((PyTypeObject*)PyExc_BaseException)->tp_traverse; - __Pyx__PyExc_StopAsyncIteration_type.tp_clear = ((PyTypeObject*)PyExc_BaseException)->tp_clear; - __Pyx__PyExc_StopAsyncIteration_type.tp_dictoffset = ((PyTypeObject*)PyExc_BaseException)->tp_dictoffset; - __Pyx__PyExc_StopAsyncIteration_type.tp_base = (PyTypeObject*)PyExc_Exception; - - __Pyx_PyExc_StopAsyncIteration = (PyObject*) __Pyx_FetchCommonType(&__Pyx__PyExc_StopAsyncIteration_type); - if (unlikely(!__Pyx_PyExc_StopAsyncIteration)) - return -1; - if (builtins && unlikely(PyMapping_SetItemString(builtins, (char*) "StopAsyncIteration", __Pyx_PyExc_StopAsyncIteration) < 0)) - return -1; -#endif - return 0; -} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CpdefEnums.pyx b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CpdefEnums.pyx deleted file mode 100644 index 148d776c29c..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CpdefEnums.pyx +++ /dev/null @@ -1,66 +0,0 @@ -#################### EnumBase #################### - -cimport cython - -cdef extern from *: - int PY_VERSION_HEX - -cdef object __Pyx_OrderedDict -if PY_VERSION_HEX >= 0x02070000: - from collections import OrderedDict as __Pyx_OrderedDict -else: - __Pyx_OrderedDict = dict - -@cython.internal -cdef class __Pyx_EnumMeta(type): - def __init__(cls, name, parents, dct): - type.__init__(cls, name, parents, dct) - cls.__members__ = __Pyx_OrderedDict() - def __iter__(cls): - return iter(cls.__members__.values()) - def __getitem__(cls, name): - return cls.__members__[name] - -# @cython.internal -cdef object __Pyx_EnumBase -class __Pyx_EnumBase(int): - __metaclass__ = __Pyx_EnumMeta - def __new__(cls, value, name=None): - for v in cls: - if v == value: - return v - if name is None: - raise ValueError("Unknown enum value: '%s'" % value) - res = int.__new__(cls, value) - res.name = name - setattr(cls, name, res) - cls.__members__[name] = res - return res - def __repr__(self): - return "<%s.%s: %d>" % (self.__class__.__name__, self.name, self) - def __str__(self): - return "%s.%s" % (self.__class__.__name__, self.name) - -if PY_VERSION_HEX >= 0x03040000: - from enum import IntEnum as __Pyx_EnumBase - -#################### EnumType #################### -#@requires: EnumBase - -cdef dict __Pyx_globals = globals() -if PY_VERSION_HEX >= 0x03040000: - # create new IntEnum() - {{name}} = __Pyx_EnumBase('{{name}}', __Pyx_OrderedDict([ - {{for item in items}} - ('{{item}}', {{item}}), - {{endfor}} - ])) - {{for item in items}} - __Pyx_globals['{{item}}'] = {{name}}.{{item}} - {{endfor}} -else: - class {{name}}(__Pyx_EnumBase): - pass - {{for item in items}} - __Pyx_globals['{{item}}'] = {{name}}({{item}}, '{{item}}') - {{endfor}} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CppConvert.pyx b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CppConvert.pyx deleted file mode 100644 index 03360e51047..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CppConvert.pyx +++ /dev/null @@ -1,237 +0,0 @@ -# TODO: Figure out how many of the pass-by-value copies the compiler can eliminate. - - -#################### string.from_py #################### - -cdef extern from *: - cdef cppclass string "{{type}}": - string() - string(char* c_str, size_t size) - cdef const char* __Pyx_PyObject_AsStringAndSize(object, Py_ssize_t*) except NULL - -@cname("{{cname}}") -cdef string {{cname}}(object o) except *: - cdef Py_ssize_t length = 0 - cdef const char* data = __Pyx_PyObject_AsStringAndSize(o, &length) - return string(data, length) - - -#################### string.to_py #################### - -#cimport cython -#from libcpp.string cimport string -cdef extern from *: - cdef cppclass string "{{type}}": - char* data() - size_t size() - -{{for py_type in ['PyObject', 'PyUnicode', 'PyStr', 'PyBytes', 'PyByteArray']}} -cdef extern from *: - cdef object __Pyx_{{py_type}}_FromStringAndSize(const char*, size_t) - -@cname("{{cname.replace("PyObject", py_type, 1)}}") -cdef inline object {{cname.replace("PyObject", py_type, 1)}}(const string& s): - return __Pyx_{{py_type}}_FromStringAndSize(s.data(), s.size()) -{{endfor}} - - -#################### vector.from_py #################### - -cdef extern from *: - cdef cppclass vector "std::vector" [T]: - void push_back(T&) - -@cname("{{cname}}") -cdef vector[X] {{cname}}(object o) except *: - cdef vector[X] v - for item in o: - v.push_back(item) - return v - - -#################### vector.to_py #################### - -cdef extern from *: - cdef cppclass vector "const std::vector" [T]: - size_t size() - T& operator[](size_t) - -@cname("{{cname}}") -cdef object {{cname}}(vector[X]& v): - return [v[i] for i in range(v.size())] - - -#################### list.from_py #################### - -cdef extern from *: - cdef cppclass cpp_list "std::list" [T]: - void push_back(T&) - -@cname("{{cname}}") -cdef cpp_list[X] {{cname}}(object o) except *: - cdef cpp_list[X] l - for item in o: - l.push_back(item) - return l - - -#################### list.to_py #################### - -cimport cython - -cdef extern from *: - cdef cppclass cpp_list "std::list" [T]: - cppclass const_iterator: - T& operator*() - const_iterator operator++() - bint operator!=(const_iterator) - const_iterator begin() - const_iterator end() - -@cname("{{cname}}") -cdef object {{cname}}(const cpp_list[X]& v): - o = [] - cdef cpp_list[X].const_iterator iter = v.begin() - while iter != v.end(): - o.append(cython.operator.dereference(iter)) - cython.operator.preincrement(iter) - return o - - -#################### set.from_py #################### - -cdef extern from *: - cdef cppclass set "std::{{maybe_unordered}}set" [T]: - void insert(T&) - -@cname("{{cname}}") -cdef set[X] {{cname}}(object o) except *: - cdef set[X] s - for item in o: - s.insert(item) - return s - - -#################### set.to_py #################### - -cimport cython - -cdef extern from *: - cdef cppclass cpp_set "std::{{maybe_unordered}}set" [T]: - cppclass const_iterator: - T& operator*() - const_iterator operator++() - bint operator!=(const_iterator) - const_iterator begin() - const_iterator end() - -@cname("{{cname}}") -cdef object {{cname}}(const cpp_set[X]& s): - o = set() - cdef cpp_set[X].const_iterator iter = s.begin() - while iter != s.end(): - o.add(cython.operator.dereference(iter)) - cython.operator.preincrement(iter) - return o - -#################### pair.from_py #################### - -cdef extern from *: - cdef cppclass pair "std::pair" [T, U]: - pair() - pair(T&, U&) - -@cname("{{cname}}") -cdef pair[X,Y] {{cname}}(object o) except *: - x, y = o - return pair[X,Y](x, y) - - -#################### pair.to_py #################### - -cdef extern from *: - cdef cppclass pair "std::pair" [T, U]: - T first - U second - -@cname("{{cname}}") -cdef object {{cname}}(const pair[X,Y]& p): - return p.first, p.second - - -#################### map.from_py #################### - -cdef extern from *: - cdef cppclass pair "std::pair" [T, U]: - pair(T&, U&) - cdef cppclass map "std::{{maybe_unordered}}map" [T, U]: - void insert(pair[T, U]&) - cdef cppclass vector "std::vector" [T]: - pass - - -@cname("{{cname}}") -cdef map[X,Y] {{cname}}(object o) except *: - cdef dict d = o - cdef map[X,Y] m - for key, value in d.iteritems(): - m.insert(pair[X,Y](key, value)) - return m - - -#################### map.to_py #################### -# TODO: Work out const so that this can take a const -# reference rather than pass by value. - -cimport cython - -cdef extern from *: - cdef cppclass map "std::{{maybe_unordered}}map" [T, U]: - cppclass value_type: - T first - U second - cppclass const_iterator: - value_type& operator*() - const_iterator operator++() - bint operator!=(const_iterator) - const_iterator begin() - const_iterator end() - -@cname("{{cname}}") -cdef object {{cname}}(const map[X,Y]& s): - o = {} - cdef const map[X,Y].value_type *key_value - cdef map[X,Y].const_iterator iter = s.begin() - while iter != s.end(): - key_value = &cython.operator.dereference(iter) - o[key_value.first] = key_value.second - cython.operator.preincrement(iter) - return o - - -#################### complex.from_py #################### - -cdef extern from *: - cdef cppclass std_complex "std::complex" [T]: - std_complex() - std_complex(T, T) except + - -@cname("{{cname}}") -cdef std_complex[X] {{cname}}(object o) except *: - cdef double complex z = o - return std_complex[X](z.real, z.imag) - - -#################### complex.to_py #################### - -cdef extern from *: - cdef cppclass std_complex "std::complex" [T]: - X real() - X imag() - -@cname("{{cname}}") -cdef object {{cname}}(const std_complex[X]& z): - cdef double complex tmp - tmp.real = z.real() - tmp.imag = z.imag() - return tmp diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CythonFunction.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CythonFunction.c deleted file mode 100644 index b2c67dcce0d..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/CythonFunction.c +++ /dev/null @@ -1,1339 +0,0 @@ - -//////////////////// CythonFunctionShared.proto //////////////////// - -#define __Pyx_CyFunction_USED 1 - -#define __Pyx_CYFUNCTION_STATICMETHOD 0x01 -#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02 -#define __Pyx_CYFUNCTION_CCLASS 0x04 - -#define __Pyx_CyFunction_GetClosure(f) \ - (((__pyx_CyFunctionObject *) (f))->func_closure) -#define __Pyx_CyFunction_GetClassObj(f) \ - (((__pyx_CyFunctionObject *) (f))->func_classobj) - -#define __Pyx_CyFunction_Defaults(type, f) \ - ((type *)(((__pyx_CyFunctionObject *) (f))->defaults)) -#define __Pyx_CyFunction_SetDefaultsGetter(f, g) \ - ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) - - -typedef struct { - PyCFunctionObject func; -#if PY_VERSION_HEX < 0x030500A0 - PyObject *func_weakreflist; -#endif - PyObject *func_dict; - PyObject *func_name; - PyObject *func_qualname; - PyObject *func_doc; - PyObject *func_globals; - PyObject *func_code; - PyObject *func_closure; - // No-args super() class cell - PyObject *func_classobj; - - // Dynamic default args and annotations - void *defaults; - int defaults_pyobjects; - size_t defaults_size; // used by FusedFunction for copying defaults - int flags; - - // Defaults info - PyObject *defaults_tuple; /* Const defaults tuple */ - PyObject *defaults_kwdict; /* Const kwonly defaults dict */ - PyObject *(*defaults_getter)(PyObject *); - PyObject *func_annotations; /* function annotations dict */ -} __pyx_CyFunctionObject; - -static PyTypeObject *__pyx_CyFunctionType = 0; - -#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) - -static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml, - int flags, PyObject* qualname, - PyObject *self, - PyObject *module, PyObject *globals, - PyObject* code); - -static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, - size_t size, - int pyobjects); -static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, - PyObject *tuple); -static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, - PyObject *dict); -static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, - PyObject *dict); - - -static int __pyx_CyFunction_init(void); - - -//////////////////// CythonFunctionShared //////////////////// -//@substitute: naming -//@requires: CommonStructures.c::FetchCommonType -////@requires: ObjectHandling.c::PyObjectGetAttrStr - -#include - -static PyObject * -__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) -{ - if (unlikely(op->func_doc == NULL)) { - if (op->func.m_ml->ml_doc) { -#if PY_MAJOR_VERSION >= 3 - op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); -#else - op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); -#endif - if (unlikely(op->func_doc == NULL)) - return NULL; - } else { - Py_INCREF(Py_None); - return Py_None; - } - } - Py_INCREF(op->func_doc); - return op->func_doc; -} - -static int -__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) -{ - PyObject *tmp = op->func_doc; - if (value == NULL) { - // Mark as deleted - value = Py_None; - } - Py_INCREF(value); - op->func_doc = value; - Py_XDECREF(tmp); - return 0; -} - -static PyObject * -__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) -{ - if (unlikely(op->func_name == NULL)) { -#if PY_MAJOR_VERSION >= 3 - op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); -#else - op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); -#endif - if (unlikely(op->func_name == NULL)) - return NULL; - } - Py_INCREF(op->func_name); - return op->func_name; -} - -static int -__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) -{ - PyObject *tmp; - -#if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) -#else - if (unlikely(value == NULL || !PyString_Check(value))) -#endif - { - PyErr_SetString(PyExc_TypeError, - "__name__ must be set to a string object"); - return -1; - } - tmp = op->func_name; - Py_INCREF(value); - op->func_name = value; - Py_XDECREF(tmp); - return 0; -} - -static PyObject * -__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) -{ - Py_INCREF(op->func_qualname); - return op->func_qualname; -} - -static int -__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) -{ - PyObject *tmp; - -#if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) -#else - if (unlikely(value == NULL || !PyString_Check(value))) -#endif - { - PyErr_SetString(PyExc_TypeError, - "__qualname__ must be set to a string object"); - return -1; - } - tmp = op->func_qualname; - Py_INCREF(value); - op->func_qualname = value; - Py_XDECREF(tmp); - return 0; -} - -static PyObject * -__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) -{ - PyObject *self; - - self = m->func_closure; - if (self == NULL) - self = Py_None; - Py_INCREF(self); - return self; -} - -static PyObject * -__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) -{ - if (unlikely(op->func_dict == NULL)) { - op->func_dict = PyDict_New(); - if (unlikely(op->func_dict == NULL)) - return NULL; - } - Py_INCREF(op->func_dict); - return op->func_dict; -} - -static int -__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) -{ - PyObject *tmp; - - if (unlikely(value == NULL)) { - PyErr_SetString(PyExc_TypeError, - "function's dictionary may not be deleted"); - return -1; - } - if (unlikely(!PyDict_Check(value))) { - PyErr_SetString(PyExc_TypeError, - "setting function's dictionary to a non-dict"); - return -1; - } - tmp = op->func_dict; - Py_INCREF(value); - op->func_dict = value; - Py_XDECREF(tmp); - return 0; -} - -static PyObject * -__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) -{ - Py_INCREF(op->func_globals); - return op->func_globals; -} - -static PyObject * -__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) -{ - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) -{ - PyObject* result = (op->func_code) ? op->func_code : Py_None; - Py_INCREF(result); - return result; -} - -static int -__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { - int result = 0; - PyObject *res = op->defaults_getter((PyObject *) op); - if (unlikely(!res)) - return -1; - - // Cache result - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - op->defaults_tuple = PyTuple_GET_ITEM(res, 0); - Py_INCREF(op->defaults_tuple); - op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); - Py_INCREF(op->defaults_kwdict); - #else - op->defaults_tuple = PySequence_ITEM(res, 0); - if (unlikely(!op->defaults_tuple)) result = -1; - else { - op->defaults_kwdict = PySequence_ITEM(res, 1); - if (unlikely(!op->defaults_kwdict)) result = -1; - } - #endif - Py_DECREF(res); - return result; -} - -static int -__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { - PyObject* tmp; - if (!value) { - // del => explicit None to prevent rebuilding - value = Py_None; - } else if (value != Py_None && !PyTuple_Check(value)) { - PyErr_SetString(PyExc_TypeError, - "__defaults__ must be set to a tuple object"); - return -1; - } - Py_INCREF(value); - tmp = op->defaults_tuple; - op->defaults_tuple = value; - Py_XDECREF(tmp); - return 0; -} - -static PyObject * -__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { - PyObject* result = op->defaults_tuple; - if (unlikely(!result)) { - if (op->defaults_getter) { - if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; - result = op->defaults_tuple; - } else { - result = Py_None; - } - } - Py_INCREF(result); - return result; -} - -static int -__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { - PyObject* tmp; - if (!value) { - // del => explicit None to prevent rebuilding - value = Py_None; - } else if (value != Py_None && !PyDict_Check(value)) { - PyErr_SetString(PyExc_TypeError, - "__kwdefaults__ must be set to a dict object"); - return -1; - } - Py_INCREF(value); - tmp = op->defaults_kwdict; - op->defaults_kwdict = value; - Py_XDECREF(tmp); - return 0; -} - -static PyObject * -__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { - PyObject* result = op->defaults_kwdict; - if (unlikely(!result)) { - if (op->defaults_getter) { - if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; - result = op->defaults_kwdict; - } else { - result = Py_None; - } - } - Py_INCREF(result); - return result; -} - -static int -__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { - PyObject* tmp; - if (!value || value == Py_None) { - value = NULL; - } else if (!PyDict_Check(value)) { - PyErr_SetString(PyExc_TypeError, - "__annotations__ must be set to a dict object"); - return -1; - } - Py_XINCREF(value); - tmp = op->func_annotations; - op->func_annotations = value; - Py_XDECREF(tmp); - return 0; -} - -static PyObject * -__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { - PyObject* result = op->func_annotations; - if (unlikely(!result)) { - result = PyDict_New(); - if (unlikely(!result)) return NULL; - op->func_annotations = result; - } - Py_INCREF(result); - return result; -} - -//#if PY_VERSION_HEX >= 0x030400C1 -//static PyObject * -//__Pyx_CyFunction_get_signature(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { -// PyObject *inspect_module, *signature_class, *signature; -// // from inspect import Signature -// inspect_module = PyImport_ImportModuleLevelObject(PYIDENT("inspect"), NULL, NULL, NULL, 0); -// if (unlikely(!inspect_module)) -// goto bad; -// signature_class = __Pyx_PyObject_GetAttrStr(inspect_module, PYIDENT("Signature")); -// Py_DECREF(inspect_module); -// if (unlikely(!signature_class)) -// goto bad; -// // return Signature.from_function(op) -// signature = PyObject_CallMethodObjArgs(signature_class, PYIDENT("from_function"), op, NULL); -// Py_DECREF(signature_class); -// if (likely(signature)) -// return signature; -//bad: -// // make sure we raise an AttributeError from this property on any errors -// if (!PyErr_ExceptionMatches(PyExc_AttributeError)) -// PyErr_SetString(PyExc_AttributeError, "failed to calculate __signature__"); -// return NULL; -//} -//#endif - -static PyGetSetDef __pyx_CyFunction_getsets[] = { - {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, - {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, - {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, - {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, - {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, - {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, - {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, - {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, - {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, - {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0}, - {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, - {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, - {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, - {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, - {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, - {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, - {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, - {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, -//#if PY_VERSION_HEX >= 0x030400C1 -// {(char *) "__signature__", (getter)__Pyx_CyFunction_get_signature, 0, 0, 0}, -//#endif - {0, 0, 0, 0, 0} -}; - -static PyMemberDef __pyx_CyFunction_members[] = { - {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0}, - {0, 0, 0, 0, 0} -}; - -static PyObject * -__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args) -{ -#if PY_MAJOR_VERSION >= 3 - Py_INCREF(m->func_qualname); - return m->func_qualname; -#else - return PyString_FromString(m->func.m_ml->ml_name); -#endif -} - -static PyMethodDef __pyx_CyFunction_methods[] = { - {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, - {0, 0, 0, 0} -}; - - -#if PY_VERSION_HEX < 0x030500A0 -#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist) -#else -#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist) -#endif - -static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname, - PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { - if (unlikely(op == NULL)) - return NULL; - op->flags = flags; - __Pyx_CyFunction_weakreflist(op) = NULL; - op->func.m_ml = ml; - op->func.m_self = (PyObject *) op; - Py_XINCREF(closure); - op->func_closure = closure; - Py_XINCREF(module); - op->func.m_module = module; - op->func_dict = NULL; - op->func_name = NULL; - Py_INCREF(qualname); - op->func_qualname = qualname; - op->func_doc = NULL; - op->func_classobj = NULL; - op->func_globals = globals; - Py_INCREF(op->func_globals); - Py_XINCREF(code); - op->func_code = code; - // Dynamic Default args - op->defaults_pyobjects = 0; - op->defaults_size = 0; - op->defaults = NULL; - op->defaults_tuple = NULL; - op->defaults_kwdict = NULL; - op->defaults_getter = NULL; - op->func_annotations = NULL; - return (PyObject *) op; -} - -static int -__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) -{ - Py_CLEAR(m->func_closure); - Py_CLEAR(m->func.m_module); - Py_CLEAR(m->func_dict); - Py_CLEAR(m->func_name); - Py_CLEAR(m->func_qualname); - Py_CLEAR(m->func_doc); - Py_CLEAR(m->func_globals); - Py_CLEAR(m->func_code); - Py_CLEAR(m->func_classobj); - Py_CLEAR(m->defaults_tuple); - Py_CLEAR(m->defaults_kwdict); - Py_CLEAR(m->func_annotations); - - if (m->defaults) { - PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); - int i; - - for (i = 0; i < m->defaults_pyobjects; i++) - Py_XDECREF(pydefaults[i]); - - PyObject_Free(m->defaults); - m->defaults = NULL; - } - - return 0; -} - -static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m) -{ - if (__Pyx_CyFunction_weakreflist(m) != NULL) - PyObject_ClearWeakRefs((PyObject *) m); - __Pyx_CyFunction_clear(m); - PyObject_GC_Del(m); -} - -static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m) -{ - PyObject_GC_UnTrack(m); - __Pyx__CyFunction_dealloc(m); -} - -static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg) -{ - Py_VISIT(m->func_closure); - Py_VISIT(m->func.m_module); - Py_VISIT(m->func_dict); - Py_VISIT(m->func_name); - Py_VISIT(m->func_qualname); - Py_VISIT(m->func_doc); - Py_VISIT(m->func_globals); - Py_VISIT(m->func_code); - Py_VISIT(m->func_classobj); - Py_VISIT(m->defaults_tuple); - Py_VISIT(m->defaults_kwdict); - - if (m->defaults) { - PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); - int i; - - for (i = 0; i < m->defaults_pyobjects; i++) - Py_VISIT(pydefaults[i]); - } - - return 0; -} - -static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type) -{ -#if PY_MAJOR_VERSION < 3 - __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; - - if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) { - Py_INCREF(func); - return func; - } - - if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) { - if (type == NULL) - type = (PyObject *)(Py_TYPE(obj)); - return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type))); - } - - if (obj == Py_None) - obj = NULL; -#endif - return __Pyx_PyMethod_New(func, obj, type); -} - -static PyObject* -__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) -{ -#if PY_MAJOR_VERSION >= 3 - return PyUnicode_FromFormat("", - op->func_qualname, (void *)op); -#else - return PyString_FromFormat("", - PyString_AsString(op->func_qualname), (void *)op); -#endif -} - -static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) { - // originally copied from PyCFunction_Call() in CPython's Objects/methodobject.c - PyCFunctionObject* f = (PyCFunctionObject*)func; - PyCFunction meth = f->m_ml->ml_meth; - Py_ssize_t size; - - switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) { - case METH_VARARGS: - if (likely(kw == NULL || PyDict_Size(kw) == 0)) - return (*meth)(self, arg); - break; - case METH_VARARGS | METH_KEYWORDS: - return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); - case METH_NOARGS: - if (likely(kw == NULL || PyDict_Size(kw) == 0)) { - size = PyTuple_GET_SIZE(arg); - if (likely(size == 0)) - return (*meth)(self, NULL); - PyErr_Format(PyExc_TypeError, - "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)", - f->m_ml->ml_name, size); - return NULL; - } - break; - case METH_O: - if (likely(kw == NULL || PyDict_Size(kw) == 0)) { - size = PyTuple_GET_SIZE(arg); - if (likely(size == 1)) { - PyObject *result, *arg0; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - arg0 = PyTuple_GET_ITEM(arg, 0); - #else - arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL; - #endif - result = (*meth)(self, arg0); - #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) - Py_DECREF(arg0); - #endif - return result; - } - PyErr_Format(PyExc_TypeError, - "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)", - f->m_ml->ml_name, size); - return NULL; - } - break; - default: - PyErr_SetString(PyExc_SystemError, "Bad call flags in " - "__Pyx_CyFunction_Call. METH_OLDARGS is no " - "longer supported!"); - - return NULL; - } - PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments", - f->m_ml->ml_name); - return NULL; -} - -static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) { - return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw); -} - -static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) { - PyObject *result; - __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; - if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) { - Py_ssize_t argc; - PyObject *new_args; - PyObject *self; - - argc = PyTuple_GET_SIZE(args); - new_args = PyTuple_GetSlice(args, 1, argc); - - if (unlikely(!new_args)) - return NULL; - - self = PyTuple_GetItem(args, 0); - if (unlikely(!self)) { - Py_DECREF(new_args); - PyErr_Format(PyExc_TypeError, - "unbound method %.200S() needs an argument", - cyfunc->func_qualname); - return NULL; - } - - result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw); - Py_DECREF(new_args); - } else { - result = __Pyx_CyFunction_Call(func, args, kw); - } - return result; -} - -static PyTypeObject __pyx_CyFunctionType_type = { - PyVarObject_HEAD_INIT(0, 0) - "cython_function_or_method", /*tp_name*/ - sizeof(__pyx_CyFunctionObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - (destructor) __Pyx_CyFunction_dealloc, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ -#if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ -#else - 0, /*reserved*/ -#endif - (reprfunc) __Pyx_CyFunction_repr, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - 0, /*tp_as_mapping*/ - 0, /*tp_hash*/ - __Pyx_CyFunction_CallAsMethod, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /*tp_flags*/ - 0, /*tp_doc*/ - (traverseproc) __Pyx_CyFunction_traverse, /*tp_traverse*/ - (inquiry) __Pyx_CyFunction_clear, /*tp_clear*/ - 0, /*tp_richcompare*/ -#if PY_VERSION_HEX < 0x030500A0 - offsetof(__pyx_CyFunctionObject, func_weakreflist), /*tp_weaklistoffset*/ -#else - offsetof(PyCFunctionObject, m_weakreflist), /*tp_weaklistoffset*/ -#endif - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - __pyx_CyFunction_methods, /*tp_methods*/ - __pyx_CyFunction_members, /*tp_members*/ - __pyx_CyFunction_getsets, /*tp_getset*/ - 0, /*tp_base*/ - 0, /*tp_dict*/ - __Pyx_CyFunction_descr_get, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - offsetof(__pyx_CyFunctionObject, func_dict),/*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - 0, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ - 0, /*tp_del*/ - 0, /*tp_version_tag*/ -#if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ -#endif -#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, /*tp_vectorcall*/ -#endif -#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ -#endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 - 0, /*tp_pypy_flags*/ -#endif -}; - - -static int __pyx_CyFunction_init(void) { - __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); - if (unlikely(__pyx_CyFunctionType == NULL)) { - return -1; - } - return 0; -} - -static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { - __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; - - m->defaults = PyObject_Malloc(size); - if (unlikely(!m->defaults)) - return PyErr_NoMemory(); - memset(m->defaults, 0, size); - m->defaults_pyobjects = pyobjects; - m->defaults_size = size; - return m->defaults; -} - -static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) { - __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; - m->defaults_tuple = tuple; - Py_INCREF(tuple); -} - -static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { - __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; - m->defaults_kwdict = dict; - Py_INCREF(dict); -} - -static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { - __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; - m->func_annotations = dict; - Py_INCREF(dict); -} - - -//////////////////// CythonFunction.proto //////////////////// - -static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, - int flags, PyObject* qualname, - PyObject *closure, - PyObject *module, PyObject *globals, - PyObject* code); - -//////////////////// CythonFunction //////////////////// -//@requires: CythonFunctionShared - -static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname, - PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { - PyObject *op = __Pyx_CyFunction_Init( - PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType), - ml, flags, qualname, closure, module, globals, code - ); - if (likely(op)) { - PyObject_GC_Track(op); - } - return op; -} - - -//////////////////// CyFunctionClassCell.proto //////////////////// -static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj);/*proto*/ - -//////////////////// CyFunctionClassCell //////////////////// -//@requires: CythonFunctionShared - -static int __Pyx_CyFunction_InitClassCell(PyObject *cyfunctions, PyObject *classobj) { - Py_ssize_t i, count = PyList_GET_SIZE(cyfunctions); - - for (i = 0; i < count; i++) { - __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - PyList_GET_ITEM(cyfunctions, i); -#else - PySequence_ITEM(cyfunctions, i); - if (unlikely(!m)) - return -1; -#endif - Py_INCREF(classobj); - m->func_classobj = classobj; -#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) - Py_DECREF((PyObject*)m); -#endif - } - return 0; -} - - -//////////////////// FusedFunction.proto //////////////////// - -typedef struct { - __pyx_CyFunctionObject func; - PyObject *__signatures__; - PyObject *type; - PyObject *self; -} __pyx_FusedFunctionObject; - -static PyObject *__pyx_FusedFunction_New(PyMethodDef *ml, int flags, - PyObject *qualname, PyObject *closure, - PyObject *module, PyObject *globals, - PyObject *code); - -static int __pyx_FusedFunction_clear(__pyx_FusedFunctionObject *self); -static PyTypeObject *__pyx_FusedFunctionType = NULL; -static int __pyx_FusedFunction_init(void); - -#define __Pyx_FusedFunction_USED - -//////////////////// FusedFunction //////////////////// -//@requires: CythonFunctionShared - -static PyObject * -__pyx_FusedFunction_New(PyMethodDef *ml, int flags, - PyObject *qualname, PyObject *closure, - PyObject *module, PyObject *globals, - PyObject *code) -{ - PyObject *op = __Pyx_CyFunction_Init( - // __pyx_CyFunctionObject is correct below since that's the cast that we want. - PyObject_GC_New(__pyx_CyFunctionObject, __pyx_FusedFunctionType), - ml, flags, qualname, closure, module, globals, code - ); - if (likely(op)) { - __pyx_FusedFunctionObject *fusedfunc = (__pyx_FusedFunctionObject *) op; - fusedfunc->__signatures__ = NULL; - fusedfunc->type = NULL; - fusedfunc->self = NULL; - PyObject_GC_Track(op); - } - return op; -} - -static void -__pyx_FusedFunction_dealloc(__pyx_FusedFunctionObject *self) -{ - PyObject_GC_UnTrack(self); - Py_CLEAR(self->self); - Py_CLEAR(self->type); - Py_CLEAR(self->__signatures__); - __Pyx__CyFunction_dealloc((__pyx_CyFunctionObject *) self); -} - -static int -__pyx_FusedFunction_traverse(__pyx_FusedFunctionObject *self, - visitproc visit, - void *arg) -{ - Py_VISIT(self->self); - Py_VISIT(self->type); - Py_VISIT(self->__signatures__); - return __Pyx_CyFunction_traverse((__pyx_CyFunctionObject *) self, visit, arg); -} - -static int -__pyx_FusedFunction_clear(__pyx_FusedFunctionObject *self) -{ - Py_CLEAR(self->self); - Py_CLEAR(self->type); - Py_CLEAR(self->__signatures__); - return __Pyx_CyFunction_clear((__pyx_CyFunctionObject *) self); -} - - -static PyObject * -__pyx_FusedFunction_descr_get(PyObject *self, PyObject *obj, PyObject *type) -{ - __pyx_FusedFunctionObject *func, *meth; - - func = (__pyx_FusedFunctionObject *) self; - - if (func->self || func->func.flags & __Pyx_CYFUNCTION_STATICMETHOD) { - // Do not allow rebinding and don't do anything for static methods - Py_INCREF(self); - return self; - } - - if (obj == Py_None) - obj = NULL; - - meth = (__pyx_FusedFunctionObject *) __pyx_FusedFunction_New( - ((PyCFunctionObject *) func)->m_ml, - ((__pyx_CyFunctionObject *) func)->flags, - ((__pyx_CyFunctionObject *) func)->func_qualname, - ((__pyx_CyFunctionObject *) func)->func_closure, - ((PyCFunctionObject *) func)->m_module, - ((__pyx_CyFunctionObject *) func)->func_globals, - ((__pyx_CyFunctionObject *) func)->func_code); - if (!meth) - return NULL; - - // defaults needs copying fully rather than just copying the pointer - // since otherwise it will be freed on destruction of meth despite - // belonging to func rather than meth - if (func->func.defaults) { - PyObject **pydefaults; - int i; - - if (!__Pyx_CyFunction_InitDefaults((PyObject*)meth, - func->func.defaults_size, - func->func.defaults_pyobjects)) { - Py_XDECREF((PyObject*)meth); - return NULL; - } - memcpy(meth->func.defaults, func->func.defaults, func->func.defaults_size); - - pydefaults = __Pyx_CyFunction_Defaults(PyObject *, meth); - for (i = 0; i < meth->func.defaults_pyobjects; i++) - Py_XINCREF(pydefaults[i]); - } - - Py_XINCREF(func->func.func_classobj); - meth->func.func_classobj = func->func.func_classobj; - - Py_XINCREF(func->__signatures__); - meth->__signatures__ = func->__signatures__; - - Py_XINCREF(type); - meth->type = type; - - Py_XINCREF(func->func.defaults_tuple); - meth->func.defaults_tuple = func->func.defaults_tuple; - - if (func->func.flags & __Pyx_CYFUNCTION_CLASSMETHOD) - obj = type; - - Py_XINCREF(obj); - meth->self = obj; - - return (PyObject *) meth; -} - -static PyObject * -_obj_to_str(PyObject *obj) -{ - if (PyType_Check(obj)) - return PyObject_GetAttr(obj, PYIDENT("__name__")); - else - return PyObject_Str(obj); -} - -static PyObject * -__pyx_FusedFunction_getitem(__pyx_FusedFunctionObject *self, PyObject *idx) -{ - PyObject *signature = NULL; - PyObject *unbound_result_func; - PyObject *result_func = NULL; - - if (self->__signatures__ == NULL) { - PyErr_SetString(PyExc_TypeError, "Function is not fused"); - return NULL; - } - - if (PyTuple_Check(idx)) { - PyObject *list = PyList_New(0); - Py_ssize_t n = PyTuple_GET_SIZE(idx); - PyObject *sep = NULL; - int i; - - if (unlikely(!list)) - return NULL; - - for (i = 0; i < n; i++) { - int ret; - PyObject *string; -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - PyObject *item = PyTuple_GET_ITEM(idx, i); -#else - PyObject *item = PySequence_ITEM(idx, i); if (unlikely(!item)) goto __pyx_err; -#endif - string = _obj_to_str(item); -#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) - Py_DECREF(item); -#endif - if (unlikely(!string)) goto __pyx_err; - ret = PyList_Append(list, string); - Py_DECREF(string); - if (unlikely(ret < 0)) goto __pyx_err; - } - - sep = PyUnicode_FromString("|"); - if (likely(sep)) - signature = PyUnicode_Join(sep, list); -__pyx_err: -; - Py_DECREF(list); - Py_XDECREF(sep); - } else { - signature = _obj_to_str(idx); - } - - if (!signature) - return NULL; - - unbound_result_func = PyObject_GetItem(self->__signatures__, signature); - - if (unbound_result_func) { - if (self->self || self->type) { - __pyx_FusedFunctionObject *unbound = (__pyx_FusedFunctionObject *) unbound_result_func; - - // TODO: move this to InitClassCell - Py_CLEAR(unbound->func.func_classobj); - Py_XINCREF(self->func.func_classobj); - unbound->func.func_classobj = self->func.func_classobj; - - result_func = __pyx_FusedFunction_descr_get(unbound_result_func, - self->self, self->type); - } else { - result_func = unbound_result_func; - Py_INCREF(result_func); - } - } - - Py_DECREF(signature); - Py_XDECREF(unbound_result_func); - - return result_func; -} - -static PyObject * -__pyx_FusedFunction_callfunction(PyObject *func, PyObject *args, PyObject *kw) -{ - __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func; - int static_specialized = (cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD && - !((__pyx_FusedFunctionObject *) func)->__signatures__); - - if (cyfunc->flags & __Pyx_CYFUNCTION_CCLASS && !static_specialized) { - return __Pyx_CyFunction_CallAsMethod(func, args, kw); - } else { - return __Pyx_CyFunction_Call(func, args, kw); - } -} - -// Note: the 'self' from method binding is passed in in the args tuple, -// whereas PyCFunctionObject's m_self is passed in as the first -// argument to the C function. For extension methods we need -// to pass 'self' as 'm_self' and not as the first element of the -// args tuple. - -static PyObject * -__pyx_FusedFunction_call(PyObject *func, PyObject *args, PyObject *kw) -{ - __pyx_FusedFunctionObject *binding_func = (__pyx_FusedFunctionObject *) func; - Py_ssize_t argc = PyTuple_GET_SIZE(args); - PyObject *new_args = NULL; - __pyx_FusedFunctionObject *new_func = NULL; - PyObject *result = NULL; - PyObject *self = NULL; - int is_staticmethod = binding_func->func.flags & __Pyx_CYFUNCTION_STATICMETHOD; - int is_classmethod = binding_func->func.flags & __Pyx_CYFUNCTION_CLASSMETHOD; - - if (binding_func->self) { - // Bound method call, put 'self' in the args tuple - Py_ssize_t i; - new_args = PyTuple_New(argc + 1); - if (!new_args) - return NULL; - - self = binding_func->self; -#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) - Py_INCREF(self); -#endif - Py_INCREF(self); - PyTuple_SET_ITEM(new_args, 0, self); - - for (i = 0; i < argc; i++) { -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - PyObject *item = PyTuple_GET_ITEM(args, i); - Py_INCREF(item); -#else - PyObject *item = PySequence_ITEM(args, i); if (unlikely(!item)) goto bad; -#endif - PyTuple_SET_ITEM(new_args, i + 1, item); - } - - args = new_args; - } else if (binding_func->type) { - // Unbound method call - if (argc < 1) { - PyErr_SetString(PyExc_TypeError, "Need at least one argument, 0 given."); - return NULL; - } -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - self = PyTuple_GET_ITEM(args, 0); -#else - self = PySequence_ITEM(args, 0); if (unlikely(!self)) return NULL; -#endif - } - - if (self && !is_classmethod && !is_staticmethod) { - int is_instance = PyObject_IsInstance(self, binding_func->type); - if (unlikely(!is_instance)) { - PyErr_Format(PyExc_TypeError, - "First argument should be of type %.200s, got %.200s.", - ((PyTypeObject *) binding_func->type)->tp_name, - Py_TYPE(self)->tp_name); - goto bad; - } else if (unlikely(is_instance == -1)) { - goto bad; - } - } -#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) - Py_XDECREF(self); - self = NULL; -#endif - - if (binding_func->__signatures__) { - PyObject *tup; - if (is_staticmethod && binding_func->func.flags & __Pyx_CYFUNCTION_CCLASS) { - // FIXME: this seems wrong, but we must currently pass the signatures dict as 'self' argument - tup = PyTuple_Pack(3, args, - kw == NULL ? Py_None : kw, - binding_func->func.defaults_tuple); - if (unlikely(!tup)) goto bad; - new_func = (__pyx_FusedFunctionObject *) __Pyx_CyFunction_CallMethod( - func, binding_func->__signatures__, tup, NULL); - } else { - tup = PyTuple_Pack(4, binding_func->__signatures__, args, - kw == NULL ? Py_None : kw, - binding_func->func.defaults_tuple); - if (unlikely(!tup)) goto bad; - new_func = (__pyx_FusedFunctionObject *) __pyx_FusedFunction_callfunction(func, tup, NULL); - } - Py_DECREF(tup); - - if (unlikely(!new_func)) - goto bad; - - Py_XINCREF(binding_func->func.func_classobj); - Py_CLEAR(new_func->func.func_classobj); - new_func->func.func_classobj = binding_func->func.func_classobj; - - func = (PyObject *) new_func; - } - - result = __pyx_FusedFunction_callfunction(func, args, kw); -bad: -#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) - Py_XDECREF(self); -#endif - Py_XDECREF(new_args); - Py_XDECREF((PyObject *) new_func); - return result; -} - -static PyMemberDef __pyx_FusedFunction_members[] = { - {(char *) "__signatures__", - T_OBJECT, - offsetof(__pyx_FusedFunctionObject, __signatures__), - READONLY, - 0}, - {0, 0, 0, 0, 0}, -}; - -static PyMappingMethods __pyx_FusedFunction_mapping_methods = { - 0, - (binaryfunc) __pyx_FusedFunction_getitem, - 0, -}; - -static PyTypeObject __pyx_FusedFunctionType_type = { - PyVarObject_HEAD_INIT(0, 0) - "fused_cython_function", /*tp_name*/ - sizeof(__pyx_FusedFunctionObject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - (destructor) __pyx_FusedFunction_dealloc, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ -#if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ -#else - 0, /*reserved*/ -#endif - 0, /*tp_repr*/ - 0, /*tp_as_number*/ - 0, /*tp_as_sequence*/ - &__pyx_FusedFunction_mapping_methods, /*tp_as_mapping*/ - 0, /*tp_hash*/ - (ternaryfunc) __pyx_FusedFunction_call, /*tp_call*/ - 0, /*tp_str*/ - 0, /*tp_getattro*/ - 0, /*tp_setattro*/ - 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE, /*tp_flags*/ - 0, /*tp_doc*/ - (traverseproc) __pyx_FusedFunction_traverse, /*tp_traverse*/ - (inquiry) __pyx_FusedFunction_clear,/*tp_clear*/ - 0, /*tp_richcompare*/ - 0, /*tp_weaklistoffset*/ - 0, /*tp_iter*/ - 0, /*tp_iternext*/ - 0, /*tp_methods*/ - __pyx_FusedFunction_members, /*tp_members*/ - // __doc__ is None for the fused function type, but we need it to be - // a descriptor for the instance's __doc__, so rebuild descriptors in our subclass - __pyx_CyFunction_getsets, /*tp_getset*/ - // NOTE: tp_base may be changed later during module initialisation when importing CyFunction across modules. - &__pyx_CyFunctionType_type, /*tp_base*/ - 0, /*tp_dict*/ - __pyx_FusedFunction_descr_get, /*tp_descr_get*/ - 0, /*tp_descr_set*/ - 0, /*tp_dictoffset*/ - 0, /*tp_init*/ - 0, /*tp_alloc*/ - 0, /*tp_new*/ - 0, /*tp_free*/ - 0, /*tp_is_gc*/ - 0, /*tp_bases*/ - 0, /*tp_mro*/ - 0, /*tp_cache*/ - 0, /*tp_subclasses*/ - 0, /*tp_weaklist*/ - 0, /*tp_del*/ - 0, /*tp_version_tag*/ -#if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ -#endif -#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, /*tp_vectorcall*/ -#endif -#if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ -#endif -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 - 0, /*tp_pypy_flags*/ -#endif -}; - -static int __pyx_FusedFunction_init(void) { - // Set base from __Pyx_FetchCommonTypeFromSpec, in case it's different from the local static value. - __pyx_FusedFunctionType_type.tp_base = __pyx_CyFunctionType; - __pyx_FusedFunctionType = __Pyx_FetchCommonType(&__pyx_FusedFunctionType_type); - if (__pyx_FusedFunctionType == NULL) { - return -1; - } - return 0; -} - -//////////////////// ClassMethod.proto //////////////////// - -#include "descrobject.h" -static CYTHON_UNUSED PyObject* __Pyx_Method_ClassMethod(PyObject *method); /*proto*/ - -//////////////////// ClassMethod //////////////////// - -static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { -#if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000 - if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { - // cdef classes - return PyClassMethod_New(method); - } -#else -#if CYTHON_COMPILING_IN_PYSTON || CYTHON_COMPILING_IN_PYPY - // special C-API function only in Pyston and PyPy >= 5.9 - if (PyMethodDescr_Check(method)) -#else - #if PY_MAJOR_VERSION == 2 - // PyMethodDescr_Type is not exposed in the CPython C-API in Py2. - static PyTypeObject *methoddescr_type = NULL; - if (methoddescr_type == NULL) { - PyObject *meth = PyObject_GetAttrString((PyObject*)&PyList_Type, "append"); - if (!meth) return NULL; - methoddescr_type = Py_TYPE(meth); - Py_DECREF(meth); - } - #else - PyTypeObject *methoddescr_type = &PyMethodDescr_Type; - #endif - if (__Pyx_TypeCheck(method, methoddescr_type)) -#endif - { - // cdef classes - PyMethodDescrObject *descr = (PyMethodDescrObject *)method; - #if PY_VERSION_HEX < 0x03020000 - PyTypeObject *d_type = descr->d_type; - #else - PyTypeObject *d_type = descr->d_common.d_type; - #endif - return PyDescr_NewClassMethod(d_type, descr->d_method); - } -#endif - else if (PyMethod_Check(method)) { - // python classes - return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); - } - else { - return PyClassMethod_New(method); - } -} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Embed.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Embed.c deleted file mode 100644 index 8f7e8f46e92..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Embed.c +++ /dev/null @@ -1,219 +0,0 @@ -//////////////////// MainFunction //////////////////// - -#ifdef __FreeBSD__ -#include -#endif - -#if PY_MAJOR_VERSION < 3 -int %(main_method)s(int argc, char** argv) { -#elif defined(WIN32) || defined(MS_WINDOWS) -int %(wmain_method)s(int argc, wchar_t **argv) { -#else -static int __Pyx_main(int argc, wchar_t **argv) { -#endif - /* 754 requires that FP exceptions run in "no stop" mode by default, - * and until C vendors implement C99's ways to control FP exceptions, - * Python requires non-stop mode. Alas, some platforms enable FP - * exceptions by default. Here we disable them. - */ -#ifdef __FreeBSD__ - fp_except_t m; - - m = fpgetmask(); - fpsetmask(m & ~FP_X_OFL); -#endif - if (argc && argv) - Py_SetProgramName(argv[0]); - Py_Initialize(); - if (argc && argv) - PySys_SetArgv(argc, argv); - { /* init module '%(module_name)s' as '__main__' */ - PyObject* m = NULL; - %(module_is_main)s = 1; - #if PY_MAJOR_VERSION < 3 - init%(module_name)s(); - #elif CYTHON_PEP489_MULTI_PHASE_INIT - m = PyInit_%(module_name)s(); - if (!PyModule_Check(m)) { - PyModuleDef *mdef = (PyModuleDef *) m; - PyObject *modname = PyUnicode_FromString("__main__"); - m = NULL; - if (modname) { - // FIXME: not currently calling PyModule_FromDefAndSpec() here because we do not have a module spec! - // FIXME: not currently setting __file__, __path__, __spec__, ... - m = PyModule_NewObject(modname); - Py_DECREF(modname); - if (m) PyModule_ExecDef(m, mdef); - } - } - #else - m = PyInit_%(module_name)s(); - #endif - if (PyErr_Occurred()) { - PyErr_Print(); /* This exits with the right code if SystemExit. */ - #if PY_MAJOR_VERSION < 3 - if (Py_FlushLine()) PyErr_Clear(); - #endif - return 1; - } - Py_XDECREF(m); - } -#if PY_VERSION_HEX < 0x03060000 - Py_Finalize(); -#else - if (Py_FinalizeEx() < 0) - return 2; -#endif - return 0; -} - - -#if PY_MAJOR_VERSION >= 3 && !defined(WIN32) && !defined(MS_WINDOWS) -#include - -static wchar_t* -__Pyx_char2wchar(char* arg) -{ - wchar_t *res; -#ifdef HAVE_BROKEN_MBSTOWCS - /* Some platforms have a broken implementation of - * mbstowcs which does not count the characters that - * would result from conversion. Use an upper bound. - */ - size_t argsize = strlen(arg); -#else - size_t argsize = mbstowcs(NULL, arg, 0); -#endif - size_t count; - unsigned char *in; - wchar_t *out; -#ifdef HAVE_MBRTOWC - mbstate_t mbs; -#endif - if (argsize != (size_t)-1) { - res = (wchar_t *)malloc((argsize+1)*sizeof(wchar_t)); - if (!res) - goto oom; - count = mbstowcs(res, arg, argsize+1); - if (count != (size_t)-1) { - wchar_t *tmp; - /* Only use the result if it contains no - surrogate characters. */ - for (tmp = res; *tmp != 0 && - (*tmp < 0xd800 || *tmp > 0xdfff); tmp++) - ; - if (*tmp == 0) - return res; - } - free(res); - } - /* Conversion failed. Fall back to escaping with surrogateescape. */ -#ifdef HAVE_MBRTOWC - /* Try conversion with mbrtwoc (C99), and escape non-decodable bytes. */ - - /* Overallocate; as multi-byte characters are in the argument, the - actual output could use less memory. */ - argsize = strlen(arg) + 1; - res = (wchar_t *)malloc(argsize*sizeof(wchar_t)); - if (!res) goto oom; - in = (unsigned char*)arg; - out = res; - memset(&mbs, 0, sizeof mbs); - while (argsize) { - size_t converted = mbrtowc(out, (char*)in, argsize, &mbs); - if (converted == 0) - /* Reached end of string; null char stored. */ - break; - if (converted == (size_t)-2) { - /* Incomplete character. This should never happen, - since we provide everything that we have - - unless there is a bug in the C library, or I - misunderstood how mbrtowc works. */ - fprintf(stderr, "unexpected mbrtowc result -2\\n"); - free(res); - return NULL; - } - if (converted == (size_t)-1) { - /* Conversion error. Escape as UTF-8b, and start over - in the initial shift state. */ - *out++ = 0xdc00 + *in++; - argsize--; - memset(&mbs, 0, sizeof mbs); - continue; - } - if (*out >= 0xd800 && *out <= 0xdfff) { - /* Surrogate character. Escape the original - byte sequence with surrogateescape. */ - argsize -= converted; - while (converted--) - *out++ = 0xdc00 + *in++; - continue; - } - /* successfully converted some bytes */ - in += converted; - argsize -= converted; - out++; - } -#else - /* Cannot use C locale for escaping; manually escape as if charset - is ASCII (i.e. escape all bytes > 128. This will still roundtrip - correctly in the locale's charset, which must be an ASCII superset. */ - res = (wchar_t *)malloc((strlen(arg)+1)*sizeof(wchar_t)); - if (!res) goto oom; - in = (unsigned char*)arg; - out = res; - while(*in) - if(*in < 128) - *out++ = *in++; - else - *out++ = 0xdc00 + *in++; - *out = 0; -#endif - return res; -oom: - fprintf(stderr, "out of memory\\n"); - return NULL; -} - -int -%(main_method)s(int argc, char **argv) -{ - if (!argc) { - return __Pyx_main(0, NULL); - } - else { - int i, res; - wchar_t **argv_copy = (wchar_t **)malloc(sizeof(wchar_t*)*argc); - /* We need a second copy, as Python might modify the first one. */ - wchar_t **argv_copy2 = (wchar_t **)malloc(sizeof(wchar_t*)*argc); - char *oldloc = strdup(setlocale(LC_ALL, NULL)); - if (!argv_copy || !argv_copy2 || !oldloc) { - fprintf(stderr, "out of memory\\n"); - free(argv_copy); - free(argv_copy2); - free(oldloc); - return 1; - } - res = 0; - setlocale(LC_ALL, ""); - for (i = 0; i < argc; i++) { - argv_copy2[i] = argv_copy[i] = __Pyx_char2wchar(argv[i]); - if (!argv_copy[i]) res = 1; /* failure, but continue to simplify cleanup */ - } - setlocale(LC_ALL, oldloc); - free(oldloc); - if (res == 0) - res = __Pyx_main(argc, argv_copy); - for (i = 0; i < argc; i++) { -#if PY_VERSION_HEX < 0x03050000 - free(argv_copy2[i]); -#else - PyMem_RawFree(argv_copy2[i]); -#endif - } - free(argv_copy); - free(argv_copy2); - return res; - } -} -#endif diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Exceptions.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Exceptions.c deleted file mode 100644 index 2cd4b604e0b..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Exceptions.c +++ /dev/null @@ -1,816 +0,0 @@ -// Exception raising code -// -// Exceptions are raised by __Pyx_Raise() and stored as plain -// type/value/tb in PyThreadState->curexc_*. When being caught by an -// 'except' statement, curexc_* is moved over to exc_* by -// __Pyx_GetException() - - -/////////////// PyThreadStateGet.proto /////////////// -//@substitute: naming - -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_PyThreadState_declare PyThreadState *$local_tstate_cname; -#define __Pyx_PyThreadState_assign $local_tstate_cname = __Pyx_PyThreadState_Current; -#define __Pyx_PyErr_Occurred() $local_tstate_cname->curexc_type -#else -#define __Pyx_PyThreadState_declare -#define __Pyx_PyThreadState_assign -#define __Pyx_PyErr_Occurred() PyErr_Occurred() -#endif - - -/////////////// PyErrExceptionMatches.proto /////////////// -//@substitute: naming - -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState($local_tstate_cname, err) -static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); -#else -#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) -#endif - -/////////////// PyErrExceptionMatches /////////////// - -#if CYTHON_FAST_THREAD_STATE -static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { - Py_ssize_t i, n; - n = PyTuple_GET_SIZE(tuple); -#if PY_MAJOR_VERSION >= 3 - // the tighter subtype checking in Py3 allows faster out-of-order comparison - for (i=0; icurexc_type; - if (exc_type == err) return 1; - if (unlikely(!exc_type)) return 0; - if (unlikely(PyTuple_Check(err))) - return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); - return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); -} -#endif - -/////////////// PyErrFetchRestore.proto /////////////// -//@substitute: naming -//@requires: PyThreadStateGet - -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) -#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb) -#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb) -#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState($local_tstate_cname, type, value, tb) -#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState($local_tstate_cname, type, value, tb) -static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); /*proto*/ - -#if CYTHON_COMPILING_IN_CPYTHON -#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL)) -#else -#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) -#endif - -#else -#define __Pyx_PyErr_Clear() PyErr_Clear() -#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc) -#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb) -#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb) -#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb) -#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb) -#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb) -#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb) -#endif - -/////////////// PyErrFetchRestore /////////////// - -#if CYTHON_FAST_THREAD_STATE -static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { - PyObject *tmp_type, *tmp_value, *tmp_tb; - tmp_type = tstate->curexc_type; - tmp_value = tstate->curexc_value; - tmp_tb = tstate->curexc_traceback; - tstate->curexc_type = type; - tstate->curexc_value = value; - tstate->curexc_traceback = tb; - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); -} - -static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { - *type = tstate->curexc_type; - *value = tstate->curexc_value; - *tb = tstate->curexc_traceback; - tstate->curexc_type = 0; - tstate->curexc_value = 0; - tstate->curexc_traceback = 0; -} -#endif - -/////////////// RaiseException.proto /////////////// - -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ - -/////////////// RaiseException /////////////// -//@requires: PyErrFetchRestore -//@requires: PyThreadStateGet - -// The following function is based on do_raise() from ceval.c. There -// are separate versions for Python2 and Python3 as exception handling -// has changed quite a lot between the two versions. - -#if PY_MAJOR_VERSION < 3 -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, - CYTHON_UNUSED PyObject *cause) { - __Pyx_PyThreadState_declare - /* 'cause' is only used in Py3 */ - Py_XINCREF(type); - if (!value || value == Py_None) - value = NULL; - else - Py_INCREF(value); - - if (!tb || tb == Py_None) - tb = NULL; - else { - Py_INCREF(tb); - if (!PyTraceBack_Check(tb)) { - PyErr_SetString(PyExc_TypeError, - "raise: arg 3 must be a traceback or None"); - goto raise_error; - } - } - - if (PyType_Check(type)) { - /* instantiate the type now (we don't know when and how it will be caught) */ -#if CYTHON_COMPILING_IN_PYPY - /* PyPy can't handle value == NULL */ - if (!value) { - Py_INCREF(Py_None); - value = Py_None; - } -#endif - PyErr_NormalizeException(&type, &value, &tb); - - } else { - /* Raising an instance. The value should be a dummy. */ - if (value) { - PyErr_SetString(PyExc_TypeError, - "instance exception may not have a separate value"); - goto raise_error; - } - /* Normalize to raise , */ - value = type; - type = (PyObject*) Py_TYPE(type); - Py_INCREF(type); - if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { - PyErr_SetString(PyExc_TypeError, - "raise: exception class must be a subclass of BaseException"); - goto raise_error; - } - } - - __Pyx_PyThreadState_assign - __Pyx_ErrRestore(type, value, tb); - return; -raise_error: - Py_XDECREF(value); - Py_XDECREF(type); - Py_XDECREF(tb); - return; -} - -#else /* Python 3+ */ - -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { - PyObject* owned_instance = NULL; - if (tb == Py_None) { - tb = 0; - } else if (tb && !PyTraceBack_Check(tb)) { - PyErr_SetString(PyExc_TypeError, - "raise: arg 3 must be a traceback or None"); - goto bad; - } - if (value == Py_None) - value = 0; - - if (PyExceptionInstance_Check(type)) { - if (value) { - PyErr_SetString(PyExc_TypeError, - "instance exception may not have a separate value"); - goto bad; - } - value = type; - type = (PyObject*) Py_TYPE(value); - } else if (PyExceptionClass_Check(type)) { - // make sure value is an exception instance of type - PyObject *instance_class = NULL; - if (value && PyExceptionInstance_Check(value)) { - instance_class = (PyObject*) Py_TYPE(value); - if (instance_class != type) { - int is_subclass = PyObject_IsSubclass(instance_class, type); - if (!is_subclass) { - instance_class = NULL; - } else if (unlikely(is_subclass == -1)) { - // error on subclass test - goto bad; - } else { - // believe the instance - type = instance_class; - } - } - } - if (!instance_class) { - // instantiate the type now (we don't know when and how it will be caught) - // assuming that 'value' is an argument to the type's constructor - // not using PyErr_NormalizeException() to avoid ref-counting problems - PyObject *args; - if (!value) - args = PyTuple_New(0); - else if (PyTuple_Check(value)) { - Py_INCREF(value); - args = value; - } else - args = PyTuple_Pack(1, value); - if (!args) - goto bad; - owned_instance = PyObject_Call(type, args, NULL); - Py_DECREF(args); - if (!owned_instance) - goto bad; - value = owned_instance; - if (!PyExceptionInstance_Check(value)) { - PyErr_Format(PyExc_TypeError, - "calling %R should have returned an instance of " - "BaseException, not %R", - type, Py_TYPE(value)); - goto bad; - } - } - } else { - PyErr_SetString(PyExc_TypeError, - "raise: exception class must be a subclass of BaseException"); - goto bad; - } - - if (cause) { - PyObject *fixed_cause; - if (cause == Py_None) { - // raise ... from None - fixed_cause = NULL; - } else if (PyExceptionClass_Check(cause)) { - fixed_cause = PyObject_CallObject(cause, NULL); - if (fixed_cause == NULL) - goto bad; - } else if (PyExceptionInstance_Check(cause)) { - fixed_cause = cause; - Py_INCREF(fixed_cause); - } else { - PyErr_SetString(PyExc_TypeError, - "exception causes must derive from " - "BaseException"); - goto bad; - } - PyException_SetCause(value, fixed_cause); - } - - PyErr_SetObject(type, value); - - if (tb) { -#if CYTHON_COMPILING_IN_PYPY - PyObject *tmp_type, *tmp_value, *tmp_tb; - PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb); - Py_INCREF(tb); - PyErr_Restore(tmp_type, tmp_value, tb); - Py_XDECREF(tmp_tb); -#else - PyThreadState *tstate = __Pyx_PyThreadState_Current; - PyObject* tmp_tb = tstate->curexc_traceback; - if (tb != tmp_tb) { - Py_INCREF(tb); - tstate->curexc_traceback = tb; - Py_XDECREF(tmp_tb); - } -#endif - } - -bad: - Py_XDECREF(owned_instance); - return; -} -#endif - - -/////////////// GetTopmostException.proto /////////////// - -#if CYTHON_USE_EXC_INFO_STACK -static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -#endif - -/////////////// GetTopmostException /////////////// - -#if CYTHON_USE_EXC_INFO_STACK -// Copied from errors.c in CPython. -static _PyErr_StackItem * -__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) -{ - _PyErr_StackItem *exc_info = tstate->exc_info; - while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && - exc_info->previous_item != NULL) - { - exc_info = exc_info->previous_item; - } - return exc_info; -} -#endif - - -/////////////// GetException.proto /////////////// -//@substitute: naming -//@requires: PyThreadStateGet - -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_GetException(type, value, tb) __Pyx__GetException($local_tstate_cname, type, value, tb) -static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -#else -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -#endif - -/////////////// GetException /////////////// - -#if CYTHON_FAST_THREAD_STATE -static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) -#else -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) -#endif -{ - PyObject *local_type, *local_value, *local_tb; -#if CYTHON_FAST_THREAD_STATE - PyObject *tmp_type, *tmp_value, *tmp_tb; - local_type = tstate->curexc_type; - local_value = tstate->curexc_value; - local_tb = tstate->curexc_traceback; - tstate->curexc_type = 0; - tstate->curexc_value = 0; - tstate->curexc_traceback = 0; -#else - PyErr_Fetch(&local_type, &local_value, &local_tb); -#endif - PyErr_NormalizeException(&local_type, &local_value, &local_tb); -#if CYTHON_FAST_THREAD_STATE - if (unlikely(tstate->curexc_type)) -#else - if (unlikely(PyErr_Occurred())) -#endif - goto bad; - #if PY_MAJOR_VERSION >= 3 - if (local_tb) { - if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) - goto bad; - } - #endif - // traceback may be NULL for freshly raised exceptions - Py_XINCREF(local_tb); - // exception state may be temporarily empty in parallel loops (race condition) - Py_XINCREF(local_type); - Py_XINCREF(local_value); - *type = local_type; - *value = local_value; - *tb = local_tb; -#if CYTHON_FAST_THREAD_STATE - #if CYTHON_USE_EXC_INFO_STACK - { - _PyErr_StackItem *exc_info = tstate->exc_info; - tmp_type = exc_info->exc_type; - tmp_value = exc_info->exc_value; - tmp_tb = exc_info->exc_traceback; - exc_info->exc_type = local_type; - exc_info->exc_value = local_value; - exc_info->exc_traceback = local_tb; - } - #else - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - tstate->exc_type = local_type; - tstate->exc_value = local_value; - tstate->exc_traceback = local_tb; - #endif - // Make sure tstate is in a consistent state when we XDECREF - // these objects (DECREF may run arbitrary code). - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); -#else - PyErr_SetExcInfo(local_type, local_value, local_tb); -#endif - return 0; -bad: - *type = 0; - *value = 0; - *tb = 0; - Py_XDECREF(local_type); - Py_XDECREF(local_value); - Py_XDECREF(local_tb); - return -1; -} - -/////////////// ReRaiseException.proto /////////////// - -static CYTHON_INLINE void __Pyx_ReraiseException(void); /*proto*/ - -/////////////// ReRaiseException /////////////// -//@requires: GetTopmostException - -static CYTHON_INLINE void __Pyx_ReraiseException(void) { - PyObject *type = NULL, *value = NULL, *tb = NULL; -#if CYTHON_FAST_THREAD_STATE - PyThreadState *tstate = PyThreadState_GET(); - #if CYTHON_USE_EXC_INFO_STACK - _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); - type = exc_info->exc_type; - value = exc_info->exc_value; - tb = exc_info->exc_traceback; - #else - type = tstate->exc_type; - value = tstate->exc_value; - tb = tstate->exc_traceback; - #endif -#else - PyErr_GetExcInfo(&type, &value, &tb); -#endif - if (!type || type == Py_None) { -#if !CYTHON_FAST_THREAD_STATE - Py_XDECREF(type); - Py_XDECREF(value); - Py_XDECREF(tb); -#endif - // message copied from Py3 - PyErr_SetString(PyExc_RuntimeError, - "No active exception to reraise"); - } else { -#if CYTHON_FAST_THREAD_STATE - Py_INCREF(type); - Py_XINCREF(value); - Py_XINCREF(tb); - -#endif - PyErr_Restore(type, value, tb); - } -} - -/////////////// SaveResetException.proto /////////////// -//@substitute: naming -//@requires: PyThreadStateGet - -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave($local_tstate_cname, type, value, tb) -static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset($local_tstate_cname, type, value, tb) -static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); /*proto*/ - -#else - -#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) -#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) -#endif - -/////////////// SaveResetException /////////////// -//@requires: GetTopmostException - -#if CYTHON_FAST_THREAD_STATE -static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { - #if CYTHON_USE_EXC_INFO_STACK - _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); - *type = exc_info->exc_type; - *value = exc_info->exc_value; - *tb = exc_info->exc_traceback; - #else - *type = tstate->exc_type; - *value = tstate->exc_value; - *tb = tstate->exc_traceback; - #endif - Py_XINCREF(*type); - Py_XINCREF(*value); - Py_XINCREF(*tb); -} - -static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { - PyObject *tmp_type, *tmp_value, *tmp_tb; - - #if CYTHON_USE_EXC_INFO_STACK - _PyErr_StackItem *exc_info = tstate->exc_info; - tmp_type = exc_info->exc_type; - tmp_value = exc_info->exc_value; - tmp_tb = exc_info->exc_traceback; - exc_info->exc_type = type; - exc_info->exc_value = value; - exc_info->exc_traceback = tb; - #else - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - tstate->exc_type = type; - tstate->exc_value = value; - tstate->exc_traceback = tb; - #endif - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); -} -#endif - -/////////////// SwapException.proto /////////////// -//@substitute: naming -//@requires: PyThreadStateGet - -#if CYTHON_FAST_THREAD_STATE -#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap($local_tstate_cname, type, value, tb) -static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -#else -static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ -#endif - -/////////////// SwapException /////////////// - -#if CYTHON_FAST_THREAD_STATE -static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { - PyObject *tmp_type, *tmp_value, *tmp_tb; - - #if CYTHON_USE_EXC_INFO_STACK - _PyErr_StackItem *exc_info = tstate->exc_info; - tmp_type = exc_info->exc_type; - tmp_value = exc_info->exc_value; - tmp_tb = exc_info->exc_traceback; - - exc_info->exc_type = *type; - exc_info->exc_value = *value; - exc_info->exc_traceback = *tb; - #else - tmp_type = tstate->exc_type; - tmp_value = tstate->exc_value; - tmp_tb = tstate->exc_traceback; - - tstate->exc_type = *type; - tstate->exc_value = *value; - tstate->exc_traceback = *tb; - #endif - - *type = tmp_type; - *value = tmp_value; - *tb = tmp_tb; -} - -#else - -static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) { - PyObject *tmp_type, *tmp_value, *tmp_tb; - PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb); - PyErr_SetExcInfo(*type, *value, *tb); - *type = tmp_type; - *value = tmp_value; - *tb = tmp_tb; -} -#endif - -/////////////// WriteUnraisableException.proto /////////////// - -static void __Pyx_WriteUnraisable(const char *name, int clineno, - int lineno, const char *filename, - int full_traceback, int nogil); /*proto*/ - -/////////////// WriteUnraisableException /////////////// -//@requires: PyErrFetchRestore -//@requires: PyThreadStateGet - -static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno, - CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename, - int full_traceback, CYTHON_UNUSED int nogil) { - PyObject *old_exc, *old_val, *old_tb; - PyObject *ctx; - __Pyx_PyThreadState_declare -#ifdef WITH_THREAD - PyGILState_STATE state; - if (nogil) - state = PyGILState_Ensure(); -#ifdef _MSC_VER - /* arbitrary, to suppress warning */ - else state = (PyGILState_STATE)-1; -#endif -#endif - __Pyx_PyThreadState_assign - __Pyx_ErrFetch(&old_exc, &old_val, &old_tb); - if (full_traceback) { - Py_XINCREF(old_exc); - Py_XINCREF(old_val); - Py_XINCREF(old_tb); - __Pyx_ErrRestore(old_exc, old_val, old_tb); - PyErr_PrintEx(1); - } - #if PY_MAJOR_VERSION < 3 - ctx = PyString_FromString(name); - #else - ctx = PyUnicode_FromString(name); - #endif - __Pyx_ErrRestore(old_exc, old_val, old_tb); - if (!ctx) { - PyErr_WriteUnraisable(Py_None); - } else { - PyErr_WriteUnraisable(ctx); - Py_DECREF(ctx); - } -#ifdef WITH_THREAD - if (nogil) - PyGILState_Release(state); -#endif -} - -/////////////// CLineInTraceback.proto /////////////// - -#ifdef CYTHON_CLINE_IN_TRACEBACK /* 0 or 1 to disable/enable C line display in tracebacks at C compile time */ -#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0) -#else -static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);/*proto*/ -#endif - -/////////////// CLineInTraceback /////////////// -//@requires: ObjectHandling.c::PyObjectGetAttrStr -//@requires: ObjectHandling.c::PyDictVersioning -//@requires: PyErrFetchRestore -//@substitute: naming - -#ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; -#if CYTHON_COMPILING_IN_CPYTHON - PyObject **cython_runtime_dict; -#endif - - if (unlikely(!${cython_runtime_cname})) { - // Very early error where the runtime module is not set up yet. - return c_line; - } - - __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); - -#if CYTHON_COMPILING_IN_CPYTHON - cython_runtime_dict = _PyObject_GetDictPtr(${cython_runtime_cname}); - if (likely(cython_runtime_dict)) { - __PYX_PY_DICT_LOOKUP_IF_MODIFIED( - use_cline, *cython_runtime_dict, - __Pyx_PyDict_GetItemStr(*cython_runtime_dict, PYIDENT("cline_in_traceback"))) - } else -#endif - { - PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(${cython_runtime_cname}, PYIDENT("cline_in_traceback")); - if (use_cline_obj) { - use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True; - Py_DECREF(use_cline_obj); - } else { - PyErr_Clear(); - use_cline = NULL; - } - } - if (!use_cline) { - c_line = 0; - // No need to handle errors here when we reset the exception state just afterwards. - (void) PyObject_SetAttr(${cython_runtime_cname}, PYIDENT("cline_in_traceback"), Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; - } - __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); - return c_line; -} -#endif - -/////////////// AddTraceback.proto /////////////// - -static void __Pyx_AddTraceback(const char *funcname, int c_line, - int py_line, const char *filename); /*proto*/ - -/////////////// AddTraceback /////////////// -//@requires: ModuleSetupCode.c::CodeObjectCache -//@requires: CLineInTraceback -//@substitute: naming - -#include "compile.h" -#include "frameobject.h" -#include "traceback.h" -#if PY_VERSION_HEX >= 0x030b00a6 - #ifndef Py_BUILD_CORE - #define Py_BUILD_CORE 1 - #endif - #include "internal/pycore_frame.h" -#endif - -static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { - PyCodeObject *py_code = NULL; - PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 - PyObject *py_srcfile = NULL; - - py_srcfile = PyString_FromString(filename); - if (!py_srcfile) goto bad; - #endif - - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, $cfilenm_cname, c_line); - if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, $cfilenm_cname, c_line); - if (!py_funcname) goto bad; - funcname = PyUnicode_AsUTF8(py_funcname); - if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); - if (!py_funcname) goto bad; - #endif - } - #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, /*int argcount,*/ - 0, /*int kwonlyargcount,*/ - 0, /*int nlocals,*/ - 0, /*int stacksize,*/ - 0, /*int flags,*/ - $empty_bytes, /*PyObject *code,*/ - $empty_tuple, /*PyObject *consts,*/ - $empty_tuple, /*PyObject *names,*/ - $empty_tuple, /*PyObject *varnames,*/ - $empty_tuple, /*PyObject *freevars,*/ - $empty_tuple, /*PyObject *cellvars,*/ - py_srcfile, /*PyObject *filename,*/ - py_funcname, /*PyObject *name,*/ - py_line, /*int firstlineno,*/ - $empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); - #else - py_code = PyCode_NewEmpty(filename, funcname, py_line); - #endif - Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; -bad: - Py_XDECREF(py_funcname); - #if PY_MAJOR_VERSION < 3 - Py_XDECREF(py_srcfile); - #endif - return NULL; -} - -static void __Pyx_AddTraceback(const char *funcname, int c_line, - int py_line, const char *filename) { - PyCodeObject *py_code = 0; - PyFrameObject *py_frame = 0; - PyThreadState *tstate = __Pyx_PyThreadState_Current; - PyObject *ptype, *pvalue, *ptraceback; - - if (c_line) { - c_line = __Pyx_CLineForTraceback(tstate, c_line); - } - - // Negate to avoid collisions between py and c lines. - py_code = $global_code_object_cache_find(c_line ? -c_line : py_line); - if (!py_code) { - __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); - py_code = __Pyx_CreateCodeObjectForTraceback( - funcname, c_line, py_line, filename); - if (!py_code) { - /* If the code object creation fails, then we should clear the - fetched exception references and propagate the new exception */ - Py_XDECREF(ptype); - Py_XDECREF(pvalue); - Py_XDECREF(ptraceback); - goto bad; - } - __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); - $global_code_object_cache_insert(c_line ? -c_line : py_line, py_code); - } - py_frame = PyFrame_New( - tstate, /*PyThreadState *tstate,*/ - py_code, /*PyCodeObject *code,*/ - $moddict_cname, /*PyObject *globals,*/ - 0 /*PyObject *locals*/ - ); - if (!py_frame) goto bad; - __Pyx_PyFrame_SetLineNumber(py_frame, py_line); - PyTraceBack_Here(py_frame); -bad: - Py_XDECREF(py_code); - Py_XDECREF(py_frame); -} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ExtensionTypes.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ExtensionTypes.c deleted file mode 100644 index dc187ab49e8..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ExtensionTypes.c +++ /dev/null @@ -1,301 +0,0 @@ -/////////////// PyType_Ready.proto /////////////// - -static int __Pyx_PyType_Ready(PyTypeObject *t); - -/////////////// PyType_Ready /////////////// - -// Wrapper around PyType_Ready() with some runtime checks and fixes -// to deal with multiple inheritance. -static int __Pyx_PyType_Ready(PyTypeObject *t) { - // Loop over all bases (except the first) and check that those - // really are heap types. Otherwise, it would not be safe to - // subclass them. - // - // We also check tp_dictoffset: it is unsafe to inherit - // tp_dictoffset from a base class because the object structures - // would not be compatible. So, if our extension type doesn't set - // tp_dictoffset (i.e. there is no __dict__ attribute in the object - // structure), we need to check that none of the base classes sets - // it either. - int r; - PyObject *bases = t->tp_bases; - if (bases) - { - Py_ssize_t i, n = PyTuple_GET_SIZE(bases); - for (i = 1; i < n; i++) /* Skip first base */ - { - PyObject *b0 = PyTuple_GET_ITEM(bases, i); - PyTypeObject *b; -#if PY_MAJOR_VERSION < 3 - /* Disallow old-style classes */ - if (PyClass_Check(b0)) - { - PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class", - PyString_AS_STRING(((PyClassObject*)b0)->cl_name)); - return -1; - } -#endif - b = (PyTypeObject*)b0; - if (!PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE)) - { - PyErr_Format(PyExc_TypeError, "base class '%.200s' is not a heap type", - b->tp_name); - return -1; - } - if (t->tp_dictoffset == 0 && b->tp_dictoffset) - { - PyErr_Format(PyExc_TypeError, - "extension type '%.200s' has no __dict__ slot, but base type '%.200s' has: " - "either add 'cdef dict __dict__' to the extension type " - "or add '__slots__ = [...]' to the base type", - t->tp_name, b->tp_name); - return -1; - } - } - } - -#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) - { - // Make sure GC does not pick up our non-heap type as heap type with this hack! - // For details, see https://github.com/cython/cython/issues/3603 - PyObject *ret, *py_status; - int gc_was_enabled; - PyObject *gc = PyImport_Import(PYUNICODE("gc")); - if (unlikely(!gc)) return -1; - py_status = PyObject_CallMethodObjArgs(gc, PYUNICODE("isenabled"), NULL); - if (unlikely(!py_status)) { - Py_DECREF(gc); - return -1; - } - gc_was_enabled = __Pyx_PyObject_IsTrue(py_status); - Py_DECREF(py_status); - if (gc_was_enabled > 0) { - ret = PyObject_CallMethodObjArgs(gc, PYUNICODE("disable"), NULL); - if (unlikely(!ret)) { - Py_DECREF(gc); - return -1; - } - Py_DECREF(ret); - } else if (unlikely(gc_was_enabled == -1)) { - Py_DECREF(gc); - return -1; - } - - // As of https://bugs.python.org/issue22079 - // PyType_Ready enforces that all bases of a non-heap type are - // non-heap. We know that this is the case for the solid base but - // other bases are heap allocated and are kept alive through the - // tp_bases reference. - // Other than this check, the Py_TPFLAGS_HEAPTYPE flag is unused - // in PyType_Ready(). - t->tp_flags |= Py_TPFLAGS_HEAPTYPE; -#endif - - r = PyType_Ready(t); - -#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION) - t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE; - - if (gc_was_enabled) { - PyObject *t, *v, *tb; - PyErr_Fetch(&t, &v, &tb); - ret = PyObject_CallMethodObjArgs(gc, PYUNICODE("enable"), NULL); - if (likely(ret || r == -1)) { - Py_XDECREF(ret); - // do not overwrite exceptions raised by PyType_Ready() above - PyErr_Restore(t, v, tb); - } else { - // PyType_Ready() succeeded, but gc.enable() failed. - Py_XDECREF(t); - Py_XDECREF(v); - Py_XDECREF(tb); - r = -1; - } - } - Py_DECREF(gc); - } -#endif - - return r; -} - -/////////////// CallNextTpDealloc.proto /////////////// - -static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc); - -/////////////// CallNextTpDealloc /////////////// - -static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) { - PyTypeObject* type = Py_TYPE(obj); - /* try to find the first parent type that has a different tp_dealloc() function */ - while (type && type->tp_dealloc != current_tp_dealloc) - type = type->tp_base; - while (type && type->tp_dealloc == current_tp_dealloc) - type = type->tp_base; - if (type) - type->tp_dealloc(obj); -} - -/////////////// CallNextTpTraverse.proto /////////////// - -static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); - -/////////////// CallNextTpTraverse /////////////// - -static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { - PyTypeObject* type = Py_TYPE(obj); - /* try to find the first parent type that has a different tp_traverse() function */ - while (type && type->tp_traverse != current_tp_traverse) - type = type->tp_base; - while (type && type->tp_traverse == current_tp_traverse) - type = type->tp_base; - if (type && type->tp_traverse) - return type->tp_traverse(obj, v, a); - // FIXME: really ignore? - return 0; -} - -/////////////// CallNextTpClear.proto /////////////// - -static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc); - -/////////////// CallNextTpClear /////////////// - -static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { - PyTypeObject* type = Py_TYPE(obj); - /* try to find the first parent type that has a different tp_clear() function */ - while (type && type->tp_clear != current_tp_clear) - type = type->tp_base; - while (type && type->tp_clear == current_tp_clear) - type = type->tp_base; - if (type && type->tp_clear) - type->tp_clear(obj); -} - -/////////////// SetupReduce.proto /////////////// - -static int __Pyx_setup_reduce(PyObject* type_obj); - -/////////////// SetupReduce /////////////// -//@requires: ObjectHandling.c::PyObjectGetAttrStrNoError -//@requires: ObjectHandling.c::PyObjectGetAttrStr -//@substitute: naming - -static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; - PyObject *name_attr; - - name_attr = __Pyx_PyObject_GetAttrStr(meth, PYIDENT("__name__")); - if (likely(name_attr)) { - ret = PyObject_RichCompareBool(name_attr, name, Py_EQ); - } else { - ret = -1; - } - - if (unlikely(ret < 0)) { - PyErr_Clear(); - ret = 0; - } - - Py_XDECREF(name_attr); - return ret; -} - -static int __Pyx_setup_reduce(PyObject* type_obj) { - int ret = 0; - PyObject *object_reduce = NULL; - PyObject *object_getstate = NULL; - PyObject *object_reduce_ex = NULL; - PyObject *reduce = NULL; - PyObject *reduce_ex = NULL; - PyObject *reduce_cython = NULL; - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - PyObject *getstate = NULL; - -#if CYTHON_USE_PYTYPE_LOOKUP - getstate = _PyType_Lookup((PyTypeObject*)type_obj, PYIDENT("__getstate__")); -#else - getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, PYIDENT("__getstate__")); - if (!getstate && PyErr_Occurred()) { - goto __PYX_BAD; - } -#endif - if (getstate) { - // Python 3.11 introduces object.__getstate__. Because it's version-specific failure to find it should not be an error -#if CYTHON_USE_PYTYPE_LOOKUP - object_getstate = _PyType_Lookup(&PyBaseObject_Type, PYIDENT("__getstate__")); -#else - object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, PYIDENT("__getstate__")); - if (!object_getstate && PyErr_Occurred()) { - goto __PYX_BAD; - } -#endif - if (object_getstate != getstate) { - goto __PYX_GOOD; - } - } - -#if CYTHON_USE_PYTYPE_LOOKUP - object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, PYIDENT("__reduce_ex__")); if (!object_reduce_ex) goto __PYX_BAD; -#else - object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, PYIDENT("__reduce_ex__")); if (!object_reduce_ex) goto __PYX_BAD; -#endif - - reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, PYIDENT("__reduce_ex__")); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - -#if CYTHON_USE_PYTYPE_LOOKUP - object_reduce = _PyType_Lookup(&PyBaseObject_Type, PYIDENT("__reduce__")); if (!object_reduce) goto __PYX_BAD; -#else - object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, PYIDENT("__reduce__")); if (!object_reduce) goto __PYX_BAD; -#endif - reduce = __Pyx_PyObject_GetAttrStr(type_obj, PYIDENT("__reduce__")); if (unlikely(!reduce)) goto __PYX_BAD; - - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, PYIDENT("__reduce_cython__"))) { - reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, PYIDENT("__reduce_cython__")); - if (likely(reduce_cython)) { - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, PYIDENT("__reduce__"), reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, PYIDENT("__reduce_cython__")); if (unlikely(ret < 0)) goto __PYX_BAD; - } else if (reduce == object_reduce || PyErr_Occurred()) { - // Ignore if we're done, i.e. if 'reduce' already has the right name and the original is gone. - // Otherwise: error. - goto __PYX_BAD; - } - - setstate = __Pyx_PyObject_GetAttrStr(type_obj, PYIDENT("__setstate__")); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, PYIDENT("__setstate_cython__"))) { - setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, PYIDENT("__setstate_cython__")); - if (likely(setstate_cython)) { - ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, PYIDENT("__setstate__"), setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; - ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, PYIDENT("__setstate_cython__")); if (unlikely(ret < 0)) goto __PYX_BAD; - } else if (!setstate || PyErr_Occurred()) { - // Ignore if we're done, i.e. if 'setstate' already has the right name and the original is gone. - // Otherwise: error. - goto __PYX_BAD; - } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } - goto __PYX_GOOD; - -__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; -__PYX_GOOD: -#if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); - Py_XDECREF(object_getstate); - Py_XDECREF(getstate); -#endif - Py_XDECREF(reduce); - Py_XDECREF(reduce_ex); - Py_XDECREF(reduce_cython); - Py_XDECREF(setstate); - Py_XDECREF(setstate_cython); - return ret; -} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/FunctionArguments.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/FunctionArguments.c deleted file mode 100644 index 8333d936664..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/FunctionArguments.c +++ /dev/null @@ -1,352 +0,0 @@ -//////////////////// ArgTypeTest.proto //////////////////// - - -#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact) \ - ((likely((Py_TYPE(obj) == type) | (none_allowed && (obj == Py_None)))) ? 1 : \ - __Pyx__ArgTypeTest(obj, type, name, exact)) - -static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact); /*proto*/ - -//////////////////// ArgTypeTest //////////////////// - -static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact) -{ - if (unlikely(!type)) { - PyErr_SetString(PyExc_SystemError, "Missing type object"); - return 0; - } - else if (exact) { - #if PY_MAJOR_VERSION == 2 - if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; - #endif - } - else { - if (likely(__Pyx_TypeCheck(obj, type))) return 1; - } - PyErr_Format(PyExc_TypeError, - "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", - name, type->tp_name, Py_TYPE(obj)->tp_name); - return 0; -} - -//////////////////// RaiseArgTupleInvalid.proto //////////////////// - -static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, - Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/ - -//////////////////// RaiseArgTupleInvalid //////////////////// - -// __Pyx_RaiseArgtupleInvalid raises the correct exception when too -// many or too few positional arguments were found. This handles -// Py_ssize_t formatting correctly. - -static void __Pyx_RaiseArgtupleInvalid( - const char* func_name, - int exact, - Py_ssize_t num_min, - Py_ssize_t num_max, - Py_ssize_t num_found) -{ - Py_ssize_t num_expected; - const char *more_or_less; - - if (num_found < num_min) { - num_expected = num_min; - more_or_less = "at least"; - } else { - num_expected = num_max; - more_or_less = "at most"; - } - if (exact) { - more_or_less = "exactly"; - } - PyErr_Format(PyExc_TypeError, - "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", - func_name, more_or_less, num_expected, - (num_expected == 1) ? "" : "s", num_found); -} - - -//////////////////// RaiseKeywordRequired.proto //////////////////// - -static void __Pyx_RaiseKeywordRequired(const char* func_name, PyObject* kw_name); /*proto*/ - -//////////////////// RaiseKeywordRequired //////////////////// - -static void __Pyx_RaiseKeywordRequired(const char* func_name, PyObject* kw_name) { - PyErr_Format(PyExc_TypeError, - #if PY_MAJOR_VERSION >= 3 - "%s() needs keyword-only argument %U", func_name, kw_name); - #else - "%s() needs keyword-only argument %s", func_name, - PyString_AS_STRING(kw_name)); - #endif -} - - -//////////////////// RaiseDoubleKeywords.proto //////////////////// - -static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ - -//////////////////// RaiseDoubleKeywords //////////////////// - -static void __Pyx_RaiseDoubleKeywordsError( - const char* func_name, - PyObject* kw_name) -{ - PyErr_Format(PyExc_TypeError, - #if PY_MAJOR_VERSION >= 3 - "%s() got multiple values for keyword argument '%U'", func_name, kw_name); - #else - "%s() got multiple values for keyword argument '%s'", func_name, - PyString_AsString(kw_name)); - #endif -} - - -//////////////////// RaiseMappingExpected.proto //////////////////// - -static void __Pyx_RaiseMappingExpectedError(PyObject* arg); /*proto*/ - -//////////////////// RaiseMappingExpected //////////////////// - -static void __Pyx_RaiseMappingExpectedError(PyObject* arg) { - PyErr_Format(PyExc_TypeError, "'%.200s' object is not a mapping", Py_TYPE(arg)->tp_name); -} - - -//////////////////// KeywordStringCheck.proto //////////////////// - -static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed); /*proto*/ - -//////////////////// KeywordStringCheck //////////////////// - -// __Pyx_CheckKeywordStrings raises an error if non-string keywords -// were passed to a function, or if any keywords were passed to a -// function that does not accept them. - -static int __Pyx_CheckKeywordStrings( - PyObject *kwdict, - const char* function_name, - int kw_allowed) -{ - PyObject* key = 0; - Py_ssize_t pos = 0; -#if CYTHON_COMPILING_IN_PYPY - /* PyPy appears to check keywords at call time, not at unpacking time => not much to do here */ - if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0)) - goto invalid_keyword; - return 1; -#else - while (PyDict_Next(kwdict, &pos, &key, 0)) { - #if PY_MAJOR_VERSION < 3 - if (unlikely(!PyString_Check(key))) - #endif - if (unlikely(!PyUnicode_Check(key))) - goto invalid_keyword_type; - } - if ((!kw_allowed) && unlikely(key)) - goto invalid_keyword; - return 1; -invalid_keyword_type: - PyErr_Format(PyExc_TypeError, - "%.200s() keywords must be strings", function_name); - return 0; -#endif -invalid_keyword: - PyErr_Format(PyExc_TypeError, - #if PY_MAJOR_VERSION < 3 - "%.200s() got an unexpected keyword argument '%.200s'", - function_name, PyString_AsString(key)); - #else - "%s() got an unexpected keyword argument '%U'", - function_name, key); - #endif - return 0; -} - - -//////////////////// ParseKeywords.proto //////////////////// - -static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ - PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ - const char* function_name); /*proto*/ - -//////////////////// ParseKeywords //////////////////// -//@requires: RaiseDoubleKeywords - -// __Pyx_ParseOptionalKeywords copies the optional/unknown keyword -// arguments from the kwds dict into kwds2. If kwds2 is NULL, unknown -// keywords will raise an invalid keyword error. -// -// Three kinds of errors are checked: 1) non-string keywords, 2) -// unexpected keywords and 3) overlap with positional arguments. -// -// If num_posargs is greater 0, it denotes the number of positional -// arguments that were passed and that must therefore not appear -// amongst the keywords as well. -// -// This method does not check for required keyword arguments. - -static int __Pyx_ParseOptionalKeywords( - PyObject *kwds, - PyObject **argnames[], - PyObject *kwds2, - PyObject *values[], - Py_ssize_t num_pos_args, - const char* function_name) -{ - PyObject *key = 0, *value = 0; - Py_ssize_t pos = 0; - PyObject*** name; - PyObject*** first_kw_arg = argnames + num_pos_args; - - while (PyDict_Next(kwds, &pos, &key, &value)) { - name = first_kw_arg; - while (*name && (**name != key)) name++; - if (*name) { - values[name-argnames] = value; - continue; - } - - name = first_kw_arg; - #if PY_MAJOR_VERSION < 3 - if (likely(PyString_Check(key))) { - while (*name) { - if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) - && _PyString_Eq(**name, key)) { - values[name-argnames] = value; - break; - } - name++; - } - if (*name) continue; - else { - // not found after positional args, check for duplicate - PyObject*** argname = argnames; - while (argname != first_kw_arg) { - if ((**argname == key) || ( - (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key)) - && _PyString_Eq(**argname, key))) { - goto arg_passed_twice; - } - argname++; - } - } - } else - #endif - if (likely(PyUnicode_Check(key))) { - while (*name) { - int cmp = (**name == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - // In Py2, we may need to convert the argument name from str to unicode for comparison. - PyUnicode_Compare(**name, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; - if (cmp == 0) { - values[name-argnames] = value; - break; - } - name++; - } - if (*name) continue; - else { - // not found after positional args, check for duplicate - PyObject*** argname = argnames; - while (argname != first_kw_arg) { - int cmp = (**argname == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 - (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - // need to convert argument name from bytes to unicode for comparison - PyUnicode_Compare(**argname, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; - if (cmp == 0) goto arg_passed_twice; - argname++; - } - } - } else - goto invalid_keyword_type; - - if (kwds2) { - if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad; - } else { - goto invalid_keyword; - } - } - return 0; -arg_passed_twice: - __Pyx_RaiseDoubleKeywordsError(function_name, key); - goto bad; -invalid_keyword_type: - PyErr_Format(PyExc_TypeError, - "%.200s() keywords must be strings", function_name); - goto bad; -invalid_keyword: - PyErr_Format(PyExc_TypeError, - #if PY_MAJOR_VERSION < 3 - "%.200s() got an unexpected keyword argument '%.200s'", - function_name, PyString_AsString(key)); - #else - "%s() got an unexpected keyword argument '%U'", - function_name, key); - #endif -bad: - return -1; -} - - -//////////////////// MergeKeywords.proto //////////////////// - -static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping); /*proto*/ - -//////////////////// MergeKeywords //////////////////// -//@requires: RaiseDoubleKeywords -//@requires: Optimize.c::dict_iter - -static int __Pyx_MergeKeywords(PyObject *kwdict, PyObject *source_mapping) { - PyObject *iter, *key = NULL, *value = NULL; - int source_is_dict, result; - Py_ssize_t orig_length, ppos = 0; - - iter = __Pyx_dict_iterator(source_mapping, 0, PYIDENT("items"), &orig_length, &source_is_dict); - if (unlikely(!iter)) { - // slow fallback: try converting to dict, then iterate - PyObject *args; - if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; - PyErr_Clear(); - args = PyTuple_Pack(1, source_mapping); - if (likely(args)) { - PyObject *fallback = PyObject_Call((PyObject*)&PyDict_Type, args, NULL); - Py_DECREF(args); - if (likely(fallback)) { - iter = __Pyx_dict_iterator(fallback, 1, PYIDENT("items"), &orig_length, &source_is_dict); - Py_DECREF(fallback); - } - } - if (unlikely(!iter)) goto bad; - } - - while (1) { - result = __Pyx_dict_iter_next(iter, orig_length, &ppos, &key, &value, NULL, source_is_dict); - if (unlikely(result < 0)) goto bad; - if (!result) break; - - if (unlikely(PyDict_Contains(kwdict, key))) { - __Pyx_RaiseDoubleKeywordsError("function", key); - result = -1; - } else { - result = PyDict_SetItem(kwdict, key, value); - } - Py_DECREF(key); - Py_DECREF(value); - if (unlikely(result < 0)) goto bad; - } - Py_XDECREF(iter); - return 0; - -bad: - Py_XDECREF(iter); - return -1; -} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ImportExport.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ImportExport.c deleted file mode 100644 index 532ec326f6d..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ImportExport.c +++ /dev/null @@ -1,739 +0,0 @@ -/////////////// PyIdentifierFromString.proto /////////////// - -#if !defined(__Pyx_PyIdentifier_FromString) -#if PY_MAJOR_VERSION < 3 - #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) -#else - #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) -#endif -#endif - - -/////////////// Import.proto /////////////// - -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ - -/////////////// Import /////////////// -//@requires: ObjectHandling.c::PyObjectGetAttrStr -//@substitute: naming - -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { - PyObject *empty_list = 0; - PyObject *module = 0; - PyObject *global_dict = 0; - PyObject *empty_dict = 0; - PyObject *list; - #if PY_MAJOR_VERSION < 3 - PyObject *py_import; - py_import = __Pyx_PyObject_GetAttrStr($builtins_cname, PYIDENT("__import__")); - if (!py_import) - goto bad; - #endif - if (from_list) - list = from_list; - else { - empty_list = PyList_New(0); - if (!empty_list) - goto bad; - list = empty_list; - } - global_dict = PyModule_GetDict($module_cname); - if (!global_dict) - goto bad; - empty_dict = PyDict_New(); - if (!empty_dict) - goto bad; - { - #if PY_MAJOR_VERSION >= 3 - if (level == -1) { - // Avoid C compiler warning if strchr() evaluates to false at compile time. - if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { - /* try package relative import first */ - module = PyImport_ImportModuleLevelObject( - name, global_dict, empty_dict, list, 1); - if (!module) { - if (!PyErr_ExceptionMatches(PyExc_ImportError)) - goto bad; - PyErr_Clear(); - } - } - level = 0; /* try absolute import on failure */ - } - #endif - if (!module) { - #if PY_MAJOR_VERSION < 3 - PyObject *py_level = PyInt_FromLong(level); - if (!py_level) - goto bad; - module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); - Py_DECREF(py_level); - #else - module = PyImport_ImportModuleLevelObject( - name, global_dict, empty_dict, list, level); - #endif - } - } -bad: - #if PY_MAJOR_VERSION < 3 - Py_XDECREF(py_import); - #endif - Py_XDECREF(empty_list); - Py_XDECREF(empty_dict); - return module; -} - - -/////////////// ImportFrom.proto /////////////// - -static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ - -/////////////// ImportFrom /////////////// -//@requires: ObjectHandling.c::PyObjectGetAttrStr - -static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { - PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); - if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { - PyErr_Format(PyExc_ImportError, - #if PY_MAJOR_VERSION < 3 - "cannot import name %.230s", PyString_AS_STRING(name)); - #else - "cannot import name %S", name); - #endif - } - return value; -} - - -/////////////// ImportStar /////////////// -//@substitute: naming - -/* import_all_from is an unexposed function from ceval.c */ - -static int -__Pyx_import_all_from(PyObject *locals, PyObject *v) -{ - PyObject *all = PyObject_GetAttrString(v, "__all__"); - PyObject *dict, *name, *value; - int skip_leading_underscores = 0; - int pos, err; - - if (all == NULL) { - if (!PyErr_ExceptionMatches(PyExc_AttributeError)) - return -1; /* Unexpected error */ - PyErr_Clear(); - dict = PyObject_GetAttrString(v, "__dict__"); - if (dict == NULL) { - if (!PyErr_ExceptionMatches(PyExc_AttributeError)) - return -1; - PyErr_SetString(PyExc_ImportError, - "from-import-* object has no __dict__ and no __all__"); - return -1; - } -#if PY_MAJOR_VERSION < 3 - all = PyObject_CallMethod(dict, (char *)"keys", NULL); -#else - all = PyMapping_Keys(dict); -#endif - Py_DECREF(dict); - if (all == NULL) - return -1; - skip_leading_underscores = 1; - } - - for (pos = 0, err = 0; ; pos++) { - name = PySequence_GetItem(all, pos); - if (name == NULL) { - if (!PyErr_ExceptionMatches(PyExc_IndexError)) - err = -1; - else - PyErr_Clear(); - break; - } - if (skip_leading_underscores && -#if PY_MAJOR_VERSION < 3 - likely(PyString_Check(name)) && - PyString_AS_STRING(name)[0] == '_') -#else - likely(PyUnicode_Check(name)) && - likely(__Pyx_PyUnicode_GET_LENGTH(name)) && - __Pyx_PyUnicode_READ_CHAR(name, 0) == '_') -#endif - { - Py_DECREF(name); - continue; - } - value = PyObject_GetAttr(v, name); - if (value == NULL) - err = -1; - else if (PyDict_CheckExact(locals)) - err = PyDict_SetItem(locals, name, value); - else - err = PyObject_SetItem(locals, name, value); - Py_DECREF(name); - Py_XDECREF(value); - if (err != 0) - break; - } - Py_DECREF(all); - return err; -} - - -static int ${import_star}(PyObject* m) { - - int i; - int ret = -1; - char* s; - PyObject *locals = 0; - PyObject *list = 0; -#if PY_MAJOR_VERSION >= 3 - PyObject *utf8_name = 0; -#endif - PyObject *name; - PyObject *item; - - locals = PyDict_New(); if (!locals) goto bad; - if (__Pyx_import_all_from(locals, m) < 0) goto bad; - list = PyDict_Items(locals); if (!list) goto bad; - - for(i=0; i= 3 - utf8_name = PyUnicode_AsUTF8String(name); - if (!utf8_name) goto bad; - s = PyBytes_AS_STRING(utf8_name); - if (${import_star_set}(item, name, s) < 0) goto bad; - Py_DECREF(utf8_name); utf8_name = 0; -#else - s = PyString_AsString(name); - if (!s) goto bad; - if (${import_star_set}(item, name, s) < 0) goto bad; -#endif - } - ret = 0; - -bad: - Py_XDECREF(locals); - Py_XDECREF(list); -#if PY_MAJOR_VERSION >= 3 - Py_XDECREF(utf8_name); -#endif - return ret; -} - - -/////////////// SetPackagePathFromImportLib.proto /////////////// - -// PY_VERSION_HEX >= 0x03030000 -#if PY_MAJOR_VERSION >= 3 && !CYTHON_PEP489_MULTI_PHASE_INIT -static int __Pyx_SetPackagePathFromImportLib(const char* parent_package_name, PyObject *module_name); -#else -#define __Pyx_SetPackagePathFromImportLib(a, b) 0 -#endif - -/////////////// SetPackagePathFromImportLib /////////////// -//@requires: ObjectHandling.c::PyObjectGetAttrStr -//@substitute: naming - -// PY_VERSION_HEX >= 0x03030000 -#if PY_MAJOR_VERSION >= 3 && !CYTHON_PEP489_MULTI_PHASE_INIT -static int __Pyx_SetPackagePathFromImportLib(const char* parent_package_name, PyObject *module_name) { - PyObject *importlib, *loader, *osmod, *ossep, *parts, *package_path; - PyObject *path = NULL, *file_path = NULL; - int result; - if (parent_package_name) { - PyObject *package = PyImport_ImportModule(parent_package_name); - if (unlikely(!package)) - goto bad; - path = PyObject_GetAttrString(package, "__path__"); - Py_DECREF(package); - if (unlikely(!path) || unlikely(path == Py_None)) - goto bad; - } else { - path = Py_None; Py_INCREF(Py_None); - } - // package_path = [importlib.find_loader(module_name, path).path.rsplit(os.sep, 1)[0]] - importlib = PyImport_ImportModule("importlib"); - if (unlikely(!importlib)) - goto bad; - loader = PyObject_CallMethod(importlib, "find_loader", "(OO)", module_name, path); - Py_DECREF(importlib); - Py_DECREF(path); path = NULL; - if (unlikely(!loader)) - goto bad; - file_path = PyObject_GetAttrString(loader, "path"); - Py_DECREF(loader); - if (unlikely(!file_path)) - goto bad; - - if (unlikely(PyObject_SetAttrString($module_cname, "__file__", file_path) < 0)) - goto bad; - - osmod = PyImport_ImportModule("os"); - if (unlikely(!osmod)) - goto bad; - ossep = PyObject_GetAttrString(osmod, "sep"); - Py_DECREF(osmod); - if (unlikely(!ossep)) - goto bad; - parts = PyObject_CallMethod(file_path, "rsplit", "(Oi)", ossep, 1); - Py_DECREF(file_path); file_path = NULL; - Py_DECREF(ossep); - if (unlikely(!parts)) - goto bad; - package_path = Py_BuildValue("[O]", PyList_GET_ITEM(parts, 0)); - Py_DECREF(parts); - if (unlikely(!package_path)) - goto bad; - goto set_path; - -bad: - PyErr_WriteUnraisable(module_name); - Py_XDECREF(path); - Py_XDECREF(file_path); - - // set an empty path list on failure - PyErr_Clear(); - package_path = PyList_New(0); - if (unlikely(!package_path)) - return -1; - -set_path: - result = PyObject_SetAttrString($module_cname, "__path__", package_path); - Py_DECREF(package_path); - return result; -} -#endif - - -/////////////// TypeImport.proto /////////////// - -#ifndef __PYX_HAVE_RT_ImportType_proto -#define __PYX_HAVE_RT_ImportType_proto - -enum __Pyx_ImportType_CheckSize { - __Pyx_ImportType_CheckSize_Error = 0, - __Pyx_ImportType_CheckSize_Warn = 1, - __Pyx_ImportType_CheckSize_Ignore = 2 -}; - -static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); /*proto*/ - -#endif - -/////////////// TypeImport /////////////// - -#ifndef __PYX_HAVE_RT_ImportType -#define __PYX_HAVE_RT_ImportType -static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, - size_t size, enum __Pyx_ImportType_CheckSize check_size) -{ - PyObject *result = 0; - char warning[200]; - Py_ssize_t basicsize; -#ifdef Py_LIMITED_API - PyObject *py_basicsize; -#endif - - result = PyObject_GetAttrString(module, class_name); - if (!result) - goto bad; - if (!PyType_Check(result)) { - PyErr_Format(PyExc_TypeError, - "%.200s.%.200s is not a type object", - module_name, class_name); - goto bad; - } -#ifndef Py_LIMITED_API - basicsize = ((PyTypeObject *)result)->tp_basicsize; -#else - py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); - if (!py_basicsize) - goto bad; - basicsize = PyLong_AsSsize_t(py_basicsize); - Py_DECREF(py_basicsize); - py_basicsize = 0; - if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) - goto bad; -#endif - if ((size_t)basicsize < size) { - PyErr_Format(PyExc_ValueError, - "%.200s.%.200s size changed, may indicate binary incompatibility. " - "Expected %zd from C header, got %zd from PyObject", - module_name, class_name, size, basicsize); - goto bad; - } - if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { - PyErr_Format(PyExc_ValueError, - "%.200s.%.200s size changed, may indicate binary incompatibility. " - "Expected %zd from C header, got %zd from PyObject", - module_name, class_name, size, basicsize); - goto bad; - } - else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { - PyOS_snprintf(warning, sizeof(warning), - "%s.%s size changed, may indicate binary incompatibility. " - "Expected %zd from C header, got %zd from PyObject", - module_name, class_name, size, basicsize); - if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; - } - /* check_size == __Pyx_ImportType_CheckSize_Ignore does not warn nor error */ - return (PyTypeObject *)result; -bad: - Py_XDECREF(result); - return NULL; -} -#endif - -/////////////// FunctionImport.proto /////////////// - -static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig); /*proto*/ - -/////////////// FunctionImport /////////////// -//@substitute: naming - -#ifndef __PYX_HAVE_RT_ImportFunction -#define __PYX_HAVE_RT_ImportFunction -static int __Pyx_ImportFunction(PyObject *module, const char *funcname, void (**f)(void), const char *sig) { - PyObject *d = 0; - PyObject *cobj = 0; - union { - void (*fp)(void); - void *p; - } tmp; - - d = PyObject_GetAttrString(module, (char *)"$api_name"); - if (!d) - goto bad; - cobj = PyDict_GetItemString(d, funcname); - if (!cobj) { - PyErr_Format(PyExc_ImportError, - "%.200s does not export expected C function %.200s", - PyModule_GetName(module), funcname); - goto bad; - } -#if PY_VERSION_HEX >= 0x02070000 - if (!PyCapsule_IsValid(cobj, sig)) { - PyErr_Format(PyExc_TypeError, - "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", - PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj)); - goto bad; - } - tmp.p = PyCapsule_GetPointer(cobj, sig); -#else - {const char *desc, *s1, *s2; - desc = (const char *)PyCObject_GetDesc(cobj); - if (!desc) - goto bad; - s1 = desc; s2 = sig; - while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } - if (*s1 != *s2) { - PyErr_Format(PyExc_TypeError, - "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", - PyModule_GetName(module), funcname, sig, desc); - goto bad; - } - tmp.p = PyCObject_AsVoidPtr(cobj);} -#endif - *f = tmp.fp; - if (!(*f)) - goto bad; - Py_DECREF(d); - return 0; -bad: - Py_XDECREF(d); - return -1; -} -#endif - -/////////////// FunctionExport.proto /////////////// - -static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); /*proto*/ - -/////////////// FunctionExport /////////////// -//@substitute: naming - -static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) { - PyObject *d = 0; - PyObject *cobj = 0; - union { - void (*fp)(void); - void *p; - } tmp; - - d = PyObject_GetAttrString($module_cname, (char *)"$api_name"); - if (!d) { - PyErr_Clear(); - d = PyDict_New(); - if (!d) - goto bad; - Py_INCREF(d); - if (PyModule_AddObject($module_cname, (char *)"$api_name", d) < 0) - goto bad; - } - tmp.fp = f; -#if PY_VERSION_HEX >= 0x02070000 - cobj = PyCapsule_New(tmp.p, sig, 0); -#else - cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0); -#endif - if (!cobj) - goto bad; - if (PyDict_SetItemString(d, name, cobj) < 0) - goto bad; - Py_DECREF(cobj); - Py_DECREF(d); - return 0; -bad: - Py_XDECREF(cobj); - Py_XDECREF(d); - return -1; -} - -/////////////// VoidPtrImport.proto /////////////// - -static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig); /*proto*/ - -/////////////// VoidPtrImport /////////////// -//@substitute: naming - -#ifndef __PYX_HAVE_RT_ImportVoidPtr -#define __PYX_HAVE_RT_ImportVoidPtr -static int __Pyx_ImportVoidPtr(PyObject *module, const char *name, void **p, const char *sig) { - PyObject *d = 0; - PyObject *cobj = 0; - - d = PyObject_GetAttrString(module, (char *)"$api_name"); - if (!d) - goto bad; - cobj = PyDict_GetItemString(d, name); - if (!cobj) { - PyErr_Format(PyExc_ImportError, - "%.200s does not export expected C variable %.200s", - PyModule_GetName(module), name); - goto bad; - } -#if PY_VERSION_HEX >= 0x02070000 - if (!PyCapsule_IsValid(cobj, sig)) { - PyErr_Format(PyExc_TypeError, - "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", - PyModule_GetName(module), name, sig, PyCapsule_GetName(cobj)); - goto bad; - } - *p = PyCapsule_GetPointer(cobj, sig); -#else - {const char *desc, *s1, *s2; - desc = (const char *)PyCObject_GetDesc(cobj); - if (!desc) - goto bad; - s1 = desc; s2 = sig; - while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } - if (*s1 != *s2) { - PyErr_Format(PyExc_TypeError, - "C variable %.200s.%.200s has wrong signature (expected %.500s, got %.500s)", - PyModule_GetName(module), name, sig, desc); - goto bad; - } - *p = PyCObject_AsVoidPtr(cobj);} -#endif - if (!(*p)) - goto bad; - Py_DECREF(d); - return 0; -bad: - Py_XDECREF(d); - return -1; -} -#endif - -/////////////// VoidPtrExport.proto /////////////// - -static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig); /*proto*/ - -/////////////// VoidPtrExport /////////////// -//@substitute: naming -//@requires: ObjectHandling.c::PyObjectSetAttrStr - -static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig) { - PyObject *d; - PyObject *cobj = 0; - - d = PyDict_GetItem($moddict_cname, PYIDENT("$api_name")); - Py_XINCREF(d); - if (!d) { - d = PyDict_New(); - if (!d) - goto bad; - if (__Pyx_PyObject_SetAttrStr($module_cname, PYIDENT("$api_name"), d) < 0) - goto bad; - } -#if PY_VERSION_HEX >= 0x02070000 - cobj = PyCapsule_New(p, sig, 0); -#else - cobj = PyCObject_FromVoidPtrAndDesc(p, (void *)sig, 0); -#endif - if (!cobj) - goto bad; - if (PyDict_SetItem(d, name, cobj) < 0) - goto bad; - Py_DECREF(cobj); - Py_DECREF(d); - return 0; -bad: - Py_XDECREF(cobj); - Py_XDECREF(d); - return -1; -} - - -/////////////// SetVTable.proto /////////////// - -static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ - -/////////////// SetVTable /////////////// - -static int __Pyx_SetVtable(PyObject *dict, void *vtable) { -#if PY_VERSION_HEX >= 0x02070000 - PyObject *ob = PyCapsule_New(vtable, 0, 0); -#else - PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); -#endif - if (!ob) - goto bad; - if (PyDict_SetItem(dict, PYIDENT("__pyx_vtable__"), ob) < 0) - goto bad; - Py_DECREF(ob); - return 0; -bad: - Py_XDECREF(ob); - return -1; -} - - -/////////////// GetVTable.proto /////////////// - -static void* __Pyx_GetVtable(PyObject *dict); /*proto*/ - -/////////////// GetVTable /////////////// - -static void* __Pyx_GetVtable(PyObject *dict) { - void* ptr; - PyObject *ob = PyObject_GetItem(dict, PYIDENT("__pyx_vtable__")); - if (!ob) - goto bad; -#if PY_VERSION_HEX >= 0x02070000 - ptr = PyCapsule_GetPointer(ob, 0); -#else - ptr = PyCObject_AsVoidPtr(ob); -#endif - if (!ptr && !PyErr_Occurred()) - PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type"); - Py_DECREF(ob); - return ptr; -bad: - Py_XDECREF(ob); - return NULL; -} - - -/////////////// MergeVTables.proto /////////////// -//@requires: GetVTable - -static int __Pyx_MergeVtables(PyTypeObject *type); /*proto*/ - -/////////////// MergeVTables /////////////// - -static int __Pyx_MergeVtables(PyTypeObject *type) { - int i; - void** base_vtables; - void* unknown = (void*)-1; - PyObject* bases = type->tp_bases; - int base_depth = 0; - { - PyTypeObject* base = type->tp_base; - while (base) { - base_depth += 1; - base = base->tp_base; - } - } - base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1)); - base_vtables[0] = unknown; - // Could do MRO resolution of individual methods in the future, assuming - // compatible vtables, but for now simply require a common vtable base. - // Note that if the vtables of various bases are extended separately, - // resolution isn't possible and we must reject it just as when the - // instance struct is so extended. (It would be good to also do this - // check when a multiple-base class is created in pure Python as well.) - for (i = 1; i < PyTuple_GET_SIZE(bases); i++) { - void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i))->tp_dict); - if (base_vtable != NULL) { - int j; - PyTypeObject* base = type->tp_base; - for (j = 0; j < base_depth; j++) { - if (base_vtables[j] == unknown) { - base_vtables[j] = __Pyx_GetVtable(base->tp_dict); - base_vtables[j + 1] = unknown; - } - if (base_vtables[j] == base_vtable) { - break; - } else if (base_vtables[j] == NULL) { - // No more potential matching bases (with vtables). - goto bad; - } - base = base->tp_base; - } - } - } - PyErr_Clear(); - free(base_vtables); - return 0; -bad: - PyErr_Format( - PyExc_TypeError, - "multiple bases have vtable conflict: '%s' and '%s'", - type->tp_base->tp_name, ((PyTypeObject*)PyTuple_GET_ITEM(bases, i))->tp_name); - free(base_vtables); - return -1; -} - - -/////////////// ImportNumPyArray.proto /////////////// - -static PyObject *__pyx_numpy_ndarray = NULL; - -static PyObject* __Pyx_ImportNumPyArrayTypeIfAvailable(void); /*proto*/ - -/////////////// ImportNumPyArray.cleanup /////////////// -Py_CLEAR(__pyx_numpy_ndarray); - -/////////////// ImportNumPyArray /////////////// -//@requires: ImportExport.c::Import - -static PyObject* __Pyx__ImportNumPyArray(void) { - PyObject *numpy_module, *ndarray_object = NULL; - numpy_module = __Pyx_Import(PYIDENT("numpy"), NULL, 0); - if (likely(numpy_module)) { - ndarray_object = PyObject_GetAttrString(numpy_module, "ndarray"); - Py_DECREF(numpy_module); - } - if (unlikely(!ndarray_object)) { - // ImportError, AttributeError, ... - PyErr_Clear(); - } - if (unlikely(!ndarray_object || !PyObject_TypeCheck(ndarray_object, &PyType_Type))) { - Py_XDECREF(ndarray_object); - Py_INCREF(Py_None); - ndarray_object = Py_None; - } - return ndarray_object; -} - -static CYTHON_INLINE PyObject* __Pyx_ImportNumPyArrayTypeIfAvailable(void) { - if (unlikely(!__pyx_numpy_ndarray)) { - __pyx_numpy_ndarray = __Pyx__ImportNumPyArray(); - } - Py_INCREF(__pyx_numpy_ndarray); - return __pyx_numpy_ndarray; -} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/MemoryView.pyx b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/MemoryView.pyx deleted file mode 100644 index 6ca5fab9baf..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/MemoryView.pyx +++ /dev/null @@ -1,1494 +0,0 @@ -#################### View.MemoryView #################### - -# This utility provides cython.array and cython.view.memoryview - -from __future__ import absolute_import - -cimport cython - -# from cpython cimport ... -cdef extern from "Python.h": - int PyIndex_Check(object) - object PyLong_FromVoidPtr(void *) - -cdef extern from "pythread.h": - ctypedef void *PyThread_type_lock - - PyThread_type_lock PyThread_allocate_lock() - void PyThread_free_lock(PyThread_type_lock) - int PyThread_acquire_lock(PyThread_type_lock, int mode) nogil - void PyThread_release_lock(PyThread_type_lock) nogil - -cdef extern from "": - void *memset(void *b, int c, size_t len) - -cdef extern from *: - int __Pyx_GetBuffer(object, Py_buffer *, int) except -1 - void __Pyx_ReleaseBuffer(Py_buffer *) - - ctypedef struct PyObject - ctypedef Py_ssize_t Py_intptr_t - void Py_INCREF(PyObject *) - void Py_DECREF(PyObject *) - - void* PyMem_Malloc(size_t n) - void PyMem_Free(void *p) - void* PyObject_Malloc(size_t n) - void PyObject_Free(void *p) - - cdef struct __pyx_memoryview "__pyx_memoryview_obj": - Py_buffer view - PyObject *obj - __Pyx_TypeInfo *typeinfo - - ctypedef struct {{memviewslice_name}}: - __pyx_memoryview *memview - char *data - Py_ssize_t shape[{{max_dims}}] - Py_ssize_t strides[{{max_dims}}] - Py_ssize_t suboffsets[{{max_dims}}] - - void __PYX_INC_MEMVIEW({{memviewslice_name}} *memslice, int have_gil) - void __PYX_XDEC_MEMVIEW({{memviewslice_name}} *memslice, int have_gil) - - ctypedef struct __pyx_buffer "Py_buffer": - PyObject *obj - - PyObject *Py_None - - cdef enum: - PyBUF_C_CONTIGUOUS, - PyBUF_F_CONTIGUOUS, - PyBUF_ANY_CONTIGUOUS - PyBUF_FORMAT - PyBUF_WRITABLE - PyBUF_STRIDES - PyBUF_INDIRECT - PyBUF_ND - PyBUF_RECORDS - PyBUF_RECORDS_RO - - ctypedef struct __Pyx_TypeInfo: - pass - - cdef object capsule "__pyx_capsule_create" (void *p, char *sig) - cdef int __pyx_array_getbuffer(PyObject *obj, Py_buffer view, int flags) - cdef int __pyx_memoryview_getbuffer(PyObject *obj, Py_buffer view, int flags) - -cdef extern from *: - ctypedef int __pyx_atomic_int - {{memviewslice_name}} slice_copy_contig "__pyx_memoryview_copy_new_contig"( - __Pyx_memviewslice *from_mvs, - char *mode, int ndim, - size_t sizeof_dtype, int contig_flag, - bint dtype_is_object) nogil except * - bint slice_is_contig "__pyx_memviewslice_is_contig" ( - {{memviewslice_name}} mvs, char order, int ndim) nogil - bint slices_overlap "__pyx_slices_overlap" ({{memviewslice_name}} *slice1, - {{memviewslice_name}} *slice2, - int ndim, size_t itemsize) nogil - - -cdef extern from "": - void *malloc(size_t) nogil - void free(void *) nogil - void *memcpy(void *dest, void *src, size_t n) nogil - - - - -# -### cython.array class -# - -@cname("__pyx_array") -cdef class array: - - cdef: - char *data - Py_ssize_t len - char *format - int ndim - Py_ssize_t *_shape - Py_ssize_t *_strides - Py_ssize_t itemsize - unicode mode # FIXME: this should have been a simple 'char' - bytes _format - void (*callback_free_data)(void *data) - # cdef object _memview - cdef bint free_data - cdef bint dtype_is_object - - def __cinit__(array self, tuple shape, Py_ssize_t itemsize, format not None, - mode="c", bint allocate_buffer=True): - - cdef int idx - cdef Py_ssize_t i, dim - cdef PyObject **p - - self.ndim = len(shape) - self.itemsize = itemsize - - if not self.ndim: - raise ValueError("Empty shape tuple for cython.array") - - if itemsize <= 0: - raise ValueError("itemsize <= 0 for cython.array") - - if not isinstance(format, bytes): - format = format.encode('ASCII') - self._format = format # keep a reference to the byte string - self.format = self._format - - # use single malloc() for both shape and strides - self._shape = PyObject_Malloc(sizeof(Py_ssize_t)*self.ndim*2) - self._strides = self._shape + self.ndim - - if not self._shape: - raise MemoryError("unable to allocate shape and strides.") - - # cdef Py_ssize_t dim, stride - for idx, dim in enumerate(shape): - if dim <= 0: - raise ValueError("Invalid shape in axis %d: %d." % (idx, dim)) - self._shape[idx] = dim - - cdef char order - if mode == 'fortran': - order = b'F' - self.mode = u'fortran' - elif mode == 'c': - order = b'C' - self.mode = u'c' - else: - raise ValueError("Invalid mode, expected 'c' or 'fortran', got %s" % mode) - - self.len = fill_contig_strides_array(self._shape, self._strides, - itemsize, self.ndim, order) - - self.free_data = allocate_buffer - self.dtype_is_object = format == b'O' - if allocate_buffer: - # use malloc() for backwards compatibility - # in case external code wants to change the data pointer - self.data = malloc(self.len) - if not self.data: - raise MemoryError("unable to allocate array data.") - - if self.dtype_is_object: - p = self.data - for i in range(self.len / itemsize): - p[i] = Py_None - Py_INCREF(Py_None) - - @cname('getbuffer') - def __getbuffer__(self, Py_buffer *info, int flags): - cdef int bufmode = -1 - if self.mode == u"c": - bufmode = PyBUF_C_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS - elif self.mode == u"fortran": - bufmode = PyBUF_F_CONTIGUOUS | PyBUF_ANY_CONTIGUOUS - if not (flags & bufmode): - raise ValueError("Can only create a buffer that is contiguous in memory.") - info.buf = self.data - info.len = self.len - info.ndim = self.ndim - info.shape = self._shape - info.strides = self._strides - info.suboffsets = NULL - info.itemsize = self.itemsize - info.readonly = 0 - - if flags & PyBUF_FORMAT: - info.format = self.format - else: - info.format = NULL - - info.obj = self - - __pyx_getbuffer = capsule( &__pyx_array_getbuffer, "getbuffer(obj, view, flags)") - - def __dealloc__(array self): - if self.callback_free_data != NULL: - self.callback_free_data(self.data) - elif self.free_data: - if self.dtype_is_object: - refcount_objects_in_slice(self.data, self._shape, - self._strides, self.ndim, False) - free(self.data) - PyObject_Free(self._shape) - - @property - def memview(self): - return self.get_memview() - - @cname('get_memview') - cdef get_memview(self): - flags = PyBUF_ANY_CONTIGUOUS|PyBUF_FORMAT|PyBUF_WRITABLE - return memoryview(self, flags, self.dtype_is_object) - - def __len__(self): - return self._shape[0] - - def __getattr__(self, attr): - return getattr(self.memview, attr) - - def __getitem__(self, item): - return self.memview[item] - - def __setitem__(self, item, value): - self.memview[item] = value - - -@cname("__pyx_array_new") -cdef array array_cwrapper(tuple shape, Py_ssize_t itemsize, char *format, - char *mode, char *buf): - cdef array result - - if buf == NULL: - result = array(shape, itemsize, format, mode.decode('ASCII')) - else: - result = array(shape, itemsize, format, mode.decode('ASCII'), - allocate_buffer=False) - result.data = buf - - return result - - -# -### Memoryview constants and cython.view.memoryview class -# - -# Disable generic_contiguous, as it makes trouble verifying contiguity: -# - 'contiguous' or '::1' means the dimension is contiguous with dtype -# - 'indirect_contiguous' means a contiguous list of pointers -# - dtype contiguous must be contiguous in the first or last dimension -# from the start, or from the dimension following the last indirect dimension -# -# e.g. -# int[::indirect_contiguous, ::contiguous, :] -# -# is valid (list of pointers to 2d fortran-contiguous array), but -# -# int[::generic_contiguous, ::contiguous, :] -# -# would mean you'd have assert dimension 0 to be indirect (and pointer contiguous) at runtime. -# So it doesn't bring any performance benefit, and it's only confusing. - -@cname('__pyx_MemviewEnum') -cdef class Enum(object): - cdef object name - def __init__(self, name): - self.name = name - def __repr__(self): - return self.name - -cdef generic = Enum("") -cdef strided = Enum("") # default -cdef indirect = Enum("") -# Disable generic_contiguous, as it is a troublemaker -#cdef generic_contiguous = Enum("") -cdef contiguous = Enum("") -cdef indirect_contiguous = Enum("") - -# 'follow' is implied when the first or last axis is ::1 - - -@cname('__pyx_align_pointer') -cdef void *align_pointer(void *memory, size_t alignment) nogil: - "Align pointer memory on a given boundary" - cdef Py_intptr_t aligned_p = memory - cdef size_t offset - - with cython.cdivision(True): - offset = aligned_p % alignment - - if offset > 0: - aligned_p += alignment - offset - - return aligned_p - - -# pre-allocate thread locks for reuse -## note that this could be implemented in a more beautiful way in "normal" Cython, -## but this code gets merged into the user module and not everything works there. -DEF THREAD_LOCKS_PREALLOCATED = 8 -cdef int __pyx_memoryview_thread_locks_used = 0 -cdef PyThread_type_lock[THREAD_LOCKS_PREALLOCATED] __pyx_memoryview_thread_locks = [ - PyThread_allocate_lock(), - PyThread_allocate_lock(), - PyThread_allocate_lock(), - PyThread_allocate_lock(), - PyThread_allocate_lock(), - PyThread_allocate_lock(), - PyThread_allocate_lock(), - PyThread_allocate_lock(), -] - - -@cname('__pyx_memoryview') -cdef class memoryview(object): - - cdef object obj - cdef object _size - cdef object _array_interface - cdef PyThread_type_lock lock - # the following array will contain a single __pyx_atomic int with - # suitable alignment - cdef __pyx_atomic_int acquisition_count[2] - cdef __pyx_atomic_int *acquisition_count_aligned_p - cdef Py_buffer view - cdef int flags - cdef bint dtype_is_object - cdef __Pyx_TypeInfo *typeinfo - - def __cinit__(memoryview self, object obj, int flags, bint dtype_is_object=False): - self.obj = obj - self.flags = flags - if type(self) is memoryview or obj is not None: - __Pyx_GetBuffer(obj, &self.view, flags) - if self.view.obj == NULL: - (<__pyx_buffer *> &self.view).obj = Py_None - Py_INCREF(Py_None) - - global __pyx_memoryview_thread_locks_used - if __pyx_memoryview_thread_locks_used < THREAD_LOCKS_PREALLOCATED: - self.lock = __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] - __pyx_memoryview_thread_locks_used += 1 - if self.lock is NULL: - self.lock = PyThread_allocate_lock() - if self.lock is NULL: - raise MemoryError - - if flags & PyBUF_FORMAT: - self.dtype_is_object = (self.view.format[0] == b'O' and self.view.format[1] == b'\0') - else: - self.dtype_is_object = dtype_is_object - - self.acquisition_count_aligned_p = <__pyx_atomic_int *> align_pointer( - &self.acquisition_count[0], sizeof(__pyx_atomic_int)) - self.typeinfo = NULL - - def __dealloc__(memoryview self): - if self.obj is not None: - __Pyx_ReleaseBuffer(&self.view) - elif (<__pyx_buffer *> &self.view).obj == Py_None: - # Undo the incref in __cinit__() above. - (<__pyx_buffer *> &self.view).obj = NULL - Py_DECREF(Py_None) - - cdef int i - global __pyx_memoryview_thread_locks_used - if self.lock != NULL: - for i in range(__pyx_memoryview_thread_locks_used): - if __pyx_memoryview_thread_locks[i] is self.lock: - __pyx_memoryview_thread_locks_used -= 1 - if i != __pyx_memoryview_thread_locks_used: - __pyx_memoryview_thread_locks[i], __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used] = ( - __pyx_memoryview_thread_locks[__pyx_memoryview_thread_locks_used], __pyx_memoryview_thread_locks[i]) - break - else: - PyThread_free_lock(self.lock) - - cdef char *get_item_pointer(memoryview self, object index) except NULL: - cdef Py_ssize_t dim - cdef char *itemp = self.view.buf - - for dim, idx in enumerate(index): - itemp = pybuffer_index(&self.view, itemp, idx, dim) - - return itemp - - #@cname('__pyx_memoryview_getitem') - def __getitem__(memoryview self, object index): - if index is Ellipsis: - return self - - have_slices, indices = _unellipsify(index, self.view.ndim) - - cdef char *itemp - if have_slices: - return memview_slice(self, indices) - else: - itemp = self.get_item_pointer(indices) - return self.convert_item_to_object(itemp) - - def __setitem__(memoryview self, object index, object value): - if self.view.readonly: - raise TypeError("Cannot assign to read-only memoryview") - - have_slices, index = _unellipsify(index, self.view.ndim) - - if have_slices: - obj = self.is_slice(value) - if obj: - self.setitem_slice_assignment(self[index], obj) - else: - self.setitem_slice_assign_scalar(self[index], value) - else: - self.setitem_indexed(index, value) - - cdef is_slice(self, obj): - if not isinstance(obj, memoryview): - try: - obj = memoryview(obj, self.flags & ~PyBUF_WRITABLE | PyBUF_ANY_CONTIGUOUS, - self.dtype_is_object) - except TypeError: - return None - - return obj - - cdef setitem_slice_assignment(self, dst, src): - cdef {{memviewslice_name}} dst_slice - cdef {{memviewslice_name}} src_slice - - memoryview_copy_contents(get_slice_from_memview(src, &src_slice)[0], - get_slice_from_memview(dst, &dst_slice)[0], - src.ndim, dst.ndim, self.dtype_is_object) - - cdef setitem_slice_assign_scalar(self, memoryview dst, value): - cdef int array[128] - cdef void *tmp = NULL - cdef void *item - - cdef {{memviewslice_name}} *dst_slice - cdef {{memviewslice_name}} tmp_slice - dst_slice = get_slice_from_memview(dst, &tmp_slice) - - if self.view.itemsize > sizeof(array): - tmp = PyMem_Malloc(self.view.itemsize) - if tmp == NULL: - raise MemoryError - item = tmp - else: - item = array - - try: - if self.dtype_is_object: - ( item)[0] = value - else: - self.assign_item_from_object( item, value) - - # It would be easy to support indirect dimensions, but it's easier - # to disallow :) - if self.view.suboffsets != NULL: - assert_direct_dimensions(self.view.suboffsets, self.view.ndim) - slice_assign_scalar(dst_slice, dst.view.ndim, self.view.itemsize, - item, self.dtype_is_object) - finally: - PyMem_Free(tmp) - - cdef setitem_indexed(self, index, value): - cdef char *itemp = self.get_item_pointer(index) - self.assign_item_from_object(itemp, value) - - cdef convert_item_to_object(self, char *itemp): - """Only used if instantiated manually by the user, or if Cython doesn't - know how to convert the type""" - import struct - cdef bytes bytesitem - # Do a manual and complete check here instead of this easy hack - bytesitem = itemp[:self.view.itemsize] - try: - result = struct.unpack(self.view.format, bytesitem) - except struct.error: - raise ValueError("Unable to convert item to object") - else: - if len(self.view.format) == 1: - return result[0] - return result - - cdef assign_item_from_object(self, char *itemp, object value): - """Only used if instantiated manually by the user, or if Cython doesn't - know how to convert the type""" - import struct - cdef char c - cdef bytes bytesvalue - cdef Py_ssize_t i - - if isinstance(value, tuple): - bytesvalue = struct.pack(self.view.format, *value) - else: - bytesvalue = struct.pack(self.view.format, value) - - for i, c in enumerate(bytesvalue): - itemp[i] = c - - @cname('getbuffer') - def __getbuffer__(self, Py_buffer *info, int flags): - if flags & PyBUF_WRITABLE and self.view.readonly: - raise ValueError("Cannot create writable memory view from read-only memoryview") - - if flags & PyBUF_ND: - info.shape = self.view.shape - else: - info.shape = NULL - - if flags & PyBUF_STRIDES: - info.strides = self.view.strides - else: - info.strides = NULL - - if flags & PyBUF_INDIRECT: - info.suboffsets = self.view.suboffsets - else: - info.suboffsets = NULL - - if flags & PyBUF_FORMAT: - info.format = self.view.format - else: - info.format = NULL - - info.buf = self.view.buf - info.ndim = self.view.ndim - info.itemsize = self.view.itemsize - info.len = self.view.len - info.readonly = self.view.readonly - info.obj = self - - __pyx_getbuffer = capsule( &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") - - # Some properties that have the same semantics as in NumPy - @property - def T(self): - cdef _memoryviewslice result = memoryview_copy(self) - transpose_memslice(&result.from_slice) - return result - - @property - def base(self): - return self.obj - - @property - def shape(self): - return tuple([length for length in self.view.shape[:self.view.ndim]]) - - @property - def strides(self): - if self.view.strides == NULL: - # Note: we always ask for strides, so if this is not set it's a bug - raise ValueError("Buffer view does not expose strides") - - return tuple([stride for stride in self.view.strides[:self.view.ndim]]) - - @property - def suboffsets(self): - if self.view.suboffsets == NULL: - return (-1,) * self.view.ndim - - return tuple([suboffset for suboffset in self.view.suboffsets[:self.view.ndim]]) - - @property - def ndim(self): - return self.view.ndim - - @property - def itemsize(self): - return self.view.itemsize - - @property - def nbytes(self): - return self.size * self.view.itemsize - - @property - def size(self): - if self._size is None: - result = 1 - - for length in self.view.shape[:self.view.ndim]: - result *= length - - self._size = result - - return self._size - - def __len__(self): - if self.view.ndim >= 1: - return self.view.shape[0] - - return 0 - - def __repr__(self): - return "" % (self.base.__class__.__name__, - id(self)) - - def __str__(self): - return "" % (self.base.__class__.__name__,) - - # Support the same attributes as memoryview slices - def is_c_contig(self): - cdef {{memviewslice_name}} *mslice - cdef {{memviewslice_name}} tmp - mslice = get_slice_from_memview(self, &tmp) - return slice_is_contig(mslice[0], 'C', self.view.ndim) - - def is_f_contig(self): - cdef {{memviewslice_name}} *mslice - cdef {{memviewslice_name}} tmp - mslice = get_slice_from_memview(self, &tmp) - return slice_is_contig(mslice[0], 'F', self.view.ndim) - - def copy(self): - cdef {{memviewslice_name}} mslice - cdef int flags = self.flags & ~PyBUF_F_CONTIGUOUS - - slice_copy(self, &mslice) - mslice = slice_copy_contig(&mslice, "c", self.view.ndim, - self.view.itemsize, - flags|PyBUF_C_CONTIGUOUS, - self.dtype_is_object) - - return memoryview_copy_from_slice(self, &mslice) - - def copy_fortran(self): - cdef {{memviewslice_name}} src, dst - cdef int flags = self.flags & ~PyBUF_C_CONTIGUOUS - - slice_copy(self, &src) - dst = slice_copy_contig(&src, "fortran", self.view.ndim, - self.view.itemsize, - flags|PyBUF_F_CONTIGUOUS, - self.dtype_is_object) - - return memoryview_copy_from_slice(self, &dst) - - -@cname('__pyx_memoryview_new') -cdef memoryview_cwrapper(object o, int flags, bint dtype_is_object, __Pyx_TypeInfo *typeinfo): - cdef memoryview result = memoryview(o, flags, dtype_is_object) - result.typeinfo = typeinfo - return result - -@cname('__pyx_memoryview_check') -cdef inline bint memoryview_check(object o): - return isinstance(o, memoryview) - -cdef tuple _unellipsify(object index, int ndim): - """ - Replace all ellipses with full slices and fill incomplete indices with - full slices. - """ - if not isinstance(index, tuple): - tup = (index,) - else: - tup = index - - result = [] - have_slices = False - seen_ellipsis = False - for idx, item in enumerate(tup): - if item is Ellipsis: - if not seen_ellipsis: - result.extend([slice(None)] * (ndim - len(tup) + 1)) - seen_ellipsis = True - else: - result.append(slice(None)) - have_slices = True - else: - if not isinstance(item, slice) and not PyIndex_Check(item): - raise TypeError("Cannot index with type '%s'" % type(item)) - - have_slices = have_slices or isinstance(item, slice) - result.append(item) - - nslices = ndim - len(result) - if nslices: - result.extend([slice(None)] * nslices) - - return have_slices or nslices, tuple(result) - -cdef assert_direct_dimensions(Py_ssize_t *suboffsets, int ndim): - for suboffset in suboffsets[:ndim]: - if suboffset >= 0: - raise ValueError("Indirect dimensions not supported") - -# -### Slicing a memoryview -# - -@cname('__pyx_memview_slice') -cdef memoryview memview_slice(memoryview memview, object indices): - cdef int new_ndim = 0, suboffset_dim = -1, dim - cdef bint negative_step - cdef {{memviewslice_name}} src, dst - cdef {{memviewslice_name}} *p_src - - # dst is copied by value in memoryview_fromslice -- initialize it - # src is never copied - memset(&dst, 0, sizeof(dst)) - - cdef _memoryviewslice memviewsliceobj - - assert memview.view.ndim > 0 - - if isinstance(memview, _memoryviewslice): - memviewsliceobj = memview - p_src = &memviewsliceobj.from_slice - else: - slice_copy(memview, &src) - p_src = &src - - # Note: don't use variable src at this point - # SubNote: we should be able to declare variables in blocks... - - # memoryview_fromslice() will inc our dst slice - dst.memview = p_src.memview - dst.data = p_src.data - - # Put everything in temps to avoid this bloody warning: - # "Argument evaluation order in C function call is undefined and - # may not be as expected" - cdef {{memviewslice_name}} *p_dst = &dst - cdef int *p_suboffset_dim = &suboffset_dim - cdef Py_ssize_t start, stop, step - cdef bint have_start, have_stop, have_step - - for dim, index in enumerate(indices): - if PyIndex_Check(index): - slice_memviewslice( - p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], - dim, new_ndim, p_suboffset_dim, - index, 0, 0, # start, stop, step - 0, 0, 0, # have_{start,stop,step} - False) - elif index is None: - p_dst.shape[new_ndim] = 1 - p_dst.strides[new_ndim] = 0 - p_dst.suboffsets[new_ndim] = -1 - new_ndim += 1 - else: - start = index.start or 0 - stop = index.stop or 0 - step = index.step or 0 - - have_start = index.start is not None - have_stop = index.stop is not None - have_step = index.step is not None - - slice_memviewslice( - p_dst, p_src.shape[dim], p_src.strides[dim], p_src.suboffsets[dim], - dim, new_ndim, p_suboffset_dim, - start, stop, step, - have_start, have_stop, have_step, - True) - new_ndim += 1 - - if isinstance(memview, _memoryviewslice): - return memoryview_fromslice(dst, new_ndim, - memviewsliceobj.to_object_func, - memviewsliceobj.to_dtype_func, - memview.dtype_is_object) - else: - return memoryview_fromslice(dst, new_ndim, NULL, NULL, - memview.dtype_is_object) - - -# -### Slicing in a single dimension of a memoryviewslice -# - -cdef extern from "": - void abort() nogil - void printf(char *s, ...) nogil - -cdef extern from "": - ctypedef struct FILE - FILE *stderr - int fputs(char *s, FILE *stream) - -cdef extern from "pystate.h": - void PyThreadState_Get() nogil - - # These are not actually nogil, but we check for the GIL before calling them - void PyErr_SetString(PyObject *type, char *msg) nogil - PyObject *PyErr_Format(PyObject *exc, char *msg, ...) nogil - -@cname('__pyx_memoryview_slice_memviewslice') -cdef int slice_memviewslice( - {{memviewslice_name}} *dst, - Py_ssize_t shape, Py_ssize_t stride, Py_ssize_t suboffset, - int dim, int new_ndim, int *suboffset_dim, - Py_ssize_t start, Py_ssize_t stop, Py_ssize_t step, - int have_start, int have_stop, int have_step, - bint is_slice) nogil except -1: - """ - Create a new slice dst given slice src. - - dim - the current src dimension (indexing will make dimensions - disappear) - new_dim - the new dst dimension - suboffset_dim - pointer to a single int initialized to -1 to keep track of - where slicing offsets should be added - """ - - cdef Py_ssize_t new_shape - cdef bint negative_step - - if not is_slice: - # index is a normal integer-like index - if start < 0: - start += shape - if not 0 <= start < shape: - _err_dim(IndexError, "Index out of bounds (axis %d)", dim) - else: - # index is a slice - negative_step = have_step != 0 and step < 0 - - if have_step and step == 0: - _err_dim(ValueError, "Step may not be zero (axis %d)", dim) - - # check our bounds and set defaults - if have_start: - if start < 0: - start += shape - if start < 0: - start = 0 - elif start >= shape: - if negative_step: - start = shape - 1 - else: - start = shape - else: - if negative_step: - start = shape - 1 - else: - start = 0 - - if have_stop: - if stop < 0: - stop += shape - if stop < 0: - stop = 0 - elif stop > shape: - stop = shape - else: - if negative_step: - stop = -1 - else: - stop = shape - - if not have_step: - step = 1 - - # len = ceil( (stop - start) / step ) - with cython.cdivision(True): - new_shape = (stop - start) // step - - if (stop - start) - step * new_shape: - new_shape += 1 - - if new_shape < 0: - new_shape = 0 - - # shape/strides/suboffsets - dst.strides[new_ndim] = stride * step - dst.shape[new_ndim] = new_shape - dst.suboffsets[new_ndim] = suboffset - - # Add the slicing or idexing offsets to the right suboffset or base data * - if suboffset_dim[0] < 0: - dst.data += start * stride - else: - dst.suboffsets[suboffset_dim[0]] += start * stride - - if suboffset >= 0: - if not is_slice: - if new_ndim == 0: - dst.data = ( dst.data)[0] + suboffset - else: - _err_dim(IndexError, "All dimensions preceding dimension %d " - "must be indexed and not sliced", dim) - else: - suboffset_dim[0] = new_ndim - - return 0 - -# -### Index a memoryview -# -@cname('__pyx_pybuffer_index') -cdef char *pybuffer_index(Py_buffer *view, char *bufp, Py_ssize_t index, - Py_ssize_t dim) except NULL: - cdef Py_ssize_t shape, stride, suboffset = -1 - cdef Py_ssize_t itemsize = view.itemsize - cdef char *resultp - - if view.ndim == 0: - shape = view.len / itemsize - stride = itemsize - else: - shape = view.shape[dim] - stride = view.strides[dim] - if view.suboffsets != NULL: - suboffset = view.suboffsets[dim] - - if index < 0: - index += view.shape[dim] - if index < 0: - raise IndexError("Out of bounds on buffer access (axis %d)" % dim) - - if index >= shape: - raise IndexError("Out of bounds on buffer access (axis %d)" % dim) - - resultp = bufp + index * stride - if suboffset >= 0: - resultp = ( resultp)[0] + suboffset - - return resultp - -# -### Transposing a memoryviewslice -# -@cname('__pyx_memslice_transpose') -cdef int transpose_memslice({{memviewslice_name}} *memslice) nogil except 0: - cdef int ndim = memslice.memview.view.ndim - - cdef Py_ssize_t *shape = memslice.shape - cdef Py_ssize_t *strides = memslice.strides - - # reverse strides and shape - cdef int i, j - for i in range(ndim / 2): - j = ndim - 1 - i - strides[i], strides[j] = strides[j], strides[i] - shape[i], shape[j] = shape[j], shape[i] - - if memslice.suboffsets[i] >= 0 or memslice.suboffsets[j] >= 0: - _err(ValueError, "Cannot transpose memoryview with indirect dimensions") - - return 1 - -# -### Creating new memoryview objects from slices and memoryviews -# -@cname('__pyx_memoryviewslice') -cdef class _memoryviewslice(memoryview): - "Internal class for passing memoryview slices to Python" - - # We need this to keep our shape/strides/suboffset pointers valid - cdef {{memviewslice_name}} from_slice - # We need this only to print it's class' name - cdef object from_object - - cdef object (*to_object_func)(char *) - cdef int (*to_dtype_func)(char *, object) except 0 - - def __dealloc__(self): - __PYX_XDEC_MEMVIEW(&self.from_slice, 1) - - cdef convert_item_to_object(self, char *itemp): - if self.to_object_func != NULL: - return self.to_object_func(itemp) - else: - return memoryview.convert_item_to_object(self, itemp) - - cdef assign_item_from_object(self, char *itemp, object value): - if self.to_dtype_func != NULL: - self.to_dtype_func(itemp, value) - else: - memoryview.assign_item_from_object(self, itemp, value) - - @property - def base(self): - return self.from_object - - __pyx_getbuffer = capsule( &__pyx_memoryview_getbuffer, "getbuffer(obj, view, flags)") - - -@cname('__pyx_memoryview_fromslice') -cdef memoryview_fromslice({{memviewslice_name}} memviewslice, - int ndim, - object (*to_object_func)(char *), - int (*to_dtype_func)(char *, object) except 0, - bint dtype_is_object): - - cdef _memoryviewslice result - - if memviewslice.memview == Py_None: - return None - - # assert 0 < ndim <= memviewslice.memview.view.ndim, ( - # ndim, memviewslice.memview.view.ndim) - - result = _memoryviewslice(None, 0, dtype_is_object) - - result.from_slice = memviewslice - __PYX_INC_MEMVIEW(&memviewslice, 1) - - result.from_object = ( memviewslice.memview).base - result.typeinfo = memviewslice.memview.typeinfo - - result.view = memviewslice.memview.view - result.view.buf = memviewslice.data - result.view.ndim = ndim - (<__pyx_buffer *> &result.view).obj = Py_None - Py_INCREF(Py_None) - - if (memviewslice.memview).flags & PyBUF_WRITABLE: - result.flags = PyBUF_RECORDS - else: - result.flags = PyBUF_RECORDS_RO - - result.view.shape = result.from_slice.shape - result.view.strides = result.from_slice.strides - - # only set suboffsets if actually used, otherwise set to NULL to improve compatibility - result.view.suboffsets = NULL - for suboffset in result.from_slice.suboffsets[:ndim]: - if suboffset >= 0: - result.view.suboffsets = result.from_slice.suboffsets - break - - result.view.len = result.view.itemsize - for length in result.view.shape[:ndim]: - result.view.len *= length - - result.to_object_func = to_object_func - result.to_dtype_func = to_dtype_func - - return result - -@cname('__pyx_memoryview_get_slice_from_memoryview') -cdef {{memviewslice_name}} *get_slice_from_memview(memoryview memview, - {{memviewslice_name}} *mslice) except NULL: - cdef _memoryviewslice obj - if isinstance(memview, _memoryviewslice): - obj = memview - return &obj.from_slice - else: - slice_copy(memview, mslice) - return mslice - -@cname('__pyx_memoryview_slice_copy') -cdef void slice_copy(memoryview memview, {{memviewslice_name}} *dst): - cdef int dim - cdef (Py_ssize_t*) shape, strides, suboffsets - - shape = memview.view.shape - strides = memview.view.strides - suboffsets = memview.view.suboffsets - - dst.memview = <__pyx_memoryview *> memview - dst.data = memview.view.buf - - for dim in range(memview.view.ndim): - dst.shape[dim] = shape[dim] - dst.strides[dim] = strides[dim] - dst.suboffsets[dim] = suboffsets[dim] if suboffsets else -1 - -@cname('__pyx_memoryview_copy_object') -cdef memoryview_copy(memoryview memview): - "Create a new memoryview object" - cdef {{memviewslice_name}} memviewslice - slice_copy(memview, &memviewslice) - return memoryview_copy_from_slice(memview, &memviewslice) - -@cname('__pyx_memoryview_copy_object_from_slice') -cdef memoryview_copy_from_slice(memoryview memview, {{memviewslice_name}} *memviewslice): - """ - Create a new memoryview object from a given memoryview object and slice. - """ - cdef object (*to_object_func)(char *) - cdef int (*to_dtype_func)(char *, object) except 0 - - if isinstance(memview, _memoryviewslice): - to_object_func = (<_memoryviewslice> memview).to_object_func - to_dtype_func = (<_memoryviewslice> memview).to_dtype_func - else: - to_object_func = NULL - to_dtype_func = NULL - - return memoryview_fromslice(memviewslice[0], memview.view.ndim, - to_object_func, to_dtype_func, - memview.dtype_is_object) - - -# -### Copy the contents of a memoryview slices -# -cdef Py_ssize_t abs_py_ssize_t(Py_ssize_t arg) nogil: - if arg < 0: - return -arg - else: - return arg - -@cname('__pyx_get_best_slice_order') -cdef char get_best_order({{memviewslice_name}} *mslice, int ndim) nogil: - """ - Figure out the best memory access order for a given slice. - """ - cdef int i - cdef Py_ssize_t c_stride = 0 - cdef Py_ssize_t f_stride = 0 - - for i in range(ndim - 1, -1, -1): - if mslice.shape[i] > 1: - c_stride = mslice.strides[i] - break - - for i in range(ndim): - if mslice.shape[i] > 1: - f_stride = mslice.strides[i] - break - - if abs_py_ssize_t(c_stride) <= abs_py_ssize_t(f_stride): - return 'C' - else: - return 'F' - -@cython.cdivision(True) -cdef void _copy_strided_to_strided(char *src_data, Py_ssize_t *src_strides, - char *dst_data, Py_ssize_t *dst_strides, - Py_ssize_t *src_shape, Py_ssize_t *dst_shape, - int ndim, size_t itemsize) nogil: - # Note: src_extent is 1 if we're broadcasting - # dst_extent always >= src_extent as we don't do reductions - cdef Py_ssize_t i - cdef Py_ssize_t src_extent = src_shape[0] - cdef Py_ssize_t dst_extent = dst_shape[0] - cdef Py_ssize_t src_stride = src_strides[0] - cdef Py_ssize_t dst_stride = dst_strides[0] - - if ndim == 1: - if (src_stride > 0 and dst_stride > 0 and - src_stride == itemsize == dst_stride): - memcpy(dst_data, src_data, itemsize * dst_extent) - else: - for i in range(dst_extent): - memcpy(dst_data, src_data, itemsize) - src_data += src_stride - dst_data += dst_stride - else: - for i in range(dst_extent): - _copy_strided_to_strided(src_data, src_strides + 1, - dst_data, dst_strides + 1, - src_shape + 1, dst_shape + 1, - ndim - 1, itemsize) - src_data += src_stride - dst_data += dst_stride - -cdef void copy_strided_to_strided({{memviewslice_name}} *src, - {{memviewslice_name}} *dst, - int ndim, size_t itemsize) nogil: - _copy_strided_to_strided(src.data, src.strides, dst.data, dst.strides, - src.shape, dst.shape, ndim, itemsize) - -@cname('__pyx_memoryview_slice_get_size') -cdef Py_ssize_t slice_get_size({{memviewslice_name}} *src, int ndim) nogil: - "Return the size of the memory occupied by the slice in number of bytes" - cdef Py_ssize_t shape, size = src.memview.view.itemsize - - for shape in src.shape[:ndim]: - size *= shape - - return size - -@cname('__pyx_fill_contig_strides_array') -cdef Py_ssize_t fill_contig_strides_array( - Py_ssize_t *shape, Py_ssize_t *strides, Py_ssize_t stride, - int ndim, char order) nogil: - """ - Fill the strides array for a slice with C or F contiguous strides. - This is like PyBuffer_FillContiguousStrides, but compatible with py < 2.6 - """ - cdef int idx - - if order == 'F': - for idx in range(ndim): - strides[idx] = stride - stride *= shape[idx] - else: - for idx in range(ndim - 1, -1, -1): - strides[idx] = stride - stride *= shape[idx] - - return stride - -@cname('__pyx_memoryview_copy_data_to_temp') -cdef void *copy_data_to_temp({{memviewslice_name}} *src, - {{memviewslice_name}} *tmpslice, - char order, - int ndim) nogil except NULL: - """ - Copy a direct slice to temporary contiguous memory. The caller should free - the result when done. - """ - cdef int i - cdef void *result - - cdef size_t itemsize = src.memview.view.itemsize - cdef size_t size = slice_get_size(src, ndim) - - result = malloc(size) - if not result: - _err(MemoryError, NULL) - - # tmpslice[0] = src - tmpslice.data = result - tmpslice.memview = src.memview - for i in range(ndim): - tmpslice.shape[i] = src.shape[i] - tmpslice.suboffsets[i] = -1 - - fill_contig_strides_array(&tmpslice.shape[0], &tmpslice.strides[0], itemsize, - ndim, order) - - # We need to broadcast strides again - for i in range(ndim): - if tmpslice.shape[i] == 1: - tmpslice.strides[i] = 0 - - if slice_is_contig(src[0], order, ndim): - memcpy(result, src.data, size) - else: - copy_strided_to_strided(src, tmpslice, ndim, itemsize) - - return result - -# Use 'with gil' functions and avoid 'with gil' blocks, as the code within the blocks -# has temporaries that need the GIL to clean up -@cname('__pyx_memoryview_err_extents') -cdef int _err_extents(int i, Py_ssize_t extent1, - Py_ssize_t extent2) except -1 with gil: - raise ValueError("got differing extents in dimension %d (got %d and %d)" % - (i, extent1, extent2)) - -@cname('__pyx_memoryview_err_dim') -cdef int _err_dim(object error, char *msg, int dim) except -1 with gil: - raise error(msg.decode('ascii') % dim) - -@cname('__pyx_memoryview_err') -cdef int _err(object error, char *msg) except -1 with gil: - if msg != NULL: - raise error(msg.decode('ascii')) - else: - raise error - -@cname('__pyx_memoryview_copy_contents') -cdef int memoryview_copy_contents({{memviewslice_name}} src, - {{memviewslice_name}} dst, - int src_ndim, int dst_ndim, - bint dtype_is_object) nogil except -1: - """ - Copy memory from slice src to slice dst. - Check for overlapping memory and verify the shapes. - """ - cdef void *tmpdata = NULL - cdef size_t itemsize = src.memview.view.itemsize - cdef int i - cdef char order = get_best_order(&src, src_ndim) - cdef bint broadcasting = False - cdef bint direct_copy = False - cdef {{memviewslice_name}} tmp - - if src_ndim < dst_ndim: - broadcast_leading(&src, src_ndim, dst_ndim) - elif dst_ndim < src_ndim: - broadcast_leading(&dst, dst_ndim, src_ndim) - - cdef int ndim = max(src_ndim, dst_ndim) - - for i in range(ndim): - if src.shape[i] != dst.shape[i]: - if src.shape[i] == 1: - broadcasting = True - src.strides[i] = 0 - else: - _err_extents(i, dst.shape[i], src.shape[i]) - - if src.suboffsets[i] >= 0: - _err_dim(ValueError, "Dimension %d is not direct", i) - - if slices_overlap(&src, &dst, ndim, itemsize): - # slices overlap, copy to temp, copy temp to dst - if not slice_is_contig(src, order, ndim): - order = get_best_order(&dst, ndim) - - tmpdata = copy_data_to_temp(&src, &tmp, order, ndim) - src = tmp - - if not broadcasting: - # See if both slices have equal contiguity, in that case perform a - # direct copy. This only works when we are not broadcasting. - if slice_is_contig(src, 'C', ndim): - direct_copy = slice_is_contig(dst, 'C', ndim) - elif slice_is_contig(src, 'F', ndim): - direct_copy = slice_is_contig(dst, 'F', ndim) - - if direct_copy: - # Contiguous slices with same order - refcount_copying(&dst, dtype_is_object, ndim, False) - memcpy(dst.data, src.data, slice_get_size(&src, ndim)) - refcount_copying(&dst, dtype_is_object, ndim, True) - free(tmpdata) - return 0 - - if order == 'F' == get_best_order(&dst, ndim): - # see if both slices have Fortran order, transpose them to match our - # C-style indexing order - transpose_memslice(&src) - transpose_memslice(&dst) - - refcount_copying(&dst, dtype_is_object, ndim, False) - copy_strided_to_strided(&src, &dst, ndim, itemsize) - refcount_copying(&dst, dtype_is_object, ndim, True) - - free(tmpdata) - return 0 - -@cname('__pyx_memoryview_broadcast_leading') -cdef void broadcast_leading({{memviewslice_name}} *mslice, - int ndim, - int ndim_other) nogil: - cdef int i - cdef int offset = ndim_other - ndim - - for i in range(ndim - 1, -1, -1): - mslice.shape[i + offset] = mslice.shape[i] - mslice.strides[i + offset] = mslice.strides[i] - mslice.suboffsets[i + offset] = mslice.suboffsets[i] - - for i in range(offset): - mslice.shape[i] = 1 - mslice.strides[i] = mslice.strides[0] - mslice.suboffsets[i] = -1 - -# -### Take care of refcounting the objects in slices. Do this separately from any copying, -### to minimize acquiring the GIL -# - -@cname('__pyx_memoryview_refcount_copying') -cdef void refcount_copying({{memviewslice_name}} *dst, bint dtype_is_object, - int ndim, bint inc) nogil: - # incref or decref the objects in the destination slice if the dtype is - # object - if dtype_is_object: - refcount_objects_in_slice_with_gil(dst.data, dst.shape, - dst.strides, ndim, inc) - -@cname('__pyx_memoryview_refcount_objects_in_slice_with_gil') -cdef void refcount_objects_in_slice_with_gil(char *data, Py_ssize_t *shape, - Py_ssize_t *strides, int ndim, - bint inc) with gil: - refcount_objects_in_slice(data, shape, strides, ndim, inc) - -@cname('__pyx_memoryview_refcount_objects_in_slice') -cdef void refcount_objects_in_slice(char *data, Py_ssize_t *shape, - Py_ssize_t *strides, int ndim, bint inc): - cdef Py_ssize_t i - - for i in range(shape[0]): - if ndim == 1: - if inc: - Py_INCREF(( data)[0]) - else: - Py_DECREF(( data)[0]) - else: - refcount_objects_in_slice(data, shape + 1, strides + 1, - ndim - 1, inc) - - data += strides[0] - -# -### Scalar to slice assignment -# -@cname('__pyx_memoryview_slice_assign_scalar') -cdef void slice_assign_scalar({{memviewslice_name}} *dst, int ndim, - size_t itemsize, void *item, - bint dtype_is_object) nogil: - refcount_copying(dst, dtype_is_object, ndim, False) - _slice_assign_scalar(dst.data, dst.shape, dst.strides, ndim, - itemsize, item) - refcount_copying(dst, dtype_is_object, ndim, True) - - -@cname('__pyx_memoryview__slice_assign_scalar') -cdef void _slice_assign_scalar(char *data, Py_ssize_t *shape, - Py_ssize_t *strides, int ndim, - size_t itemsize, void *item) nogil: - cdef Py_ssize_t i - cdef Py_ssize_t stride = strides[0] - cdef Py_ssize_t extent = shape[0] - - if ndim == 1: - for i in range(extent): - memcpy(data, item, itemsize) - data += stride - else: - for i in range(extent): - _slice_assign_scalar(data, shape + 1, strides + 1, - ndim - 1, itemsize, item) - data += stride - - -############### BufferFormatFromTypeInfo ############### -cdef extern from *: - ctypedef struct __Pyx_StructField - - cdef enum: - __PYX_BUF_FLAGS_PACKED_STRUCT - __PYX_BUF_FLAGS_INTEGER_COMPLEX - - ctypedef struct __Pyx_TypeInfo: - char* name - __Pyx_StructField* fields - size_t size - size_t arraysize[8] - int ndim - char typegroup - char is_unsigned - int flags - - ctypedef struct __Pyx_StructField: - __Pyx_TypeInfo* type - char* name - size_t offset - - ctypedef struct __Pyx_BufFmt_StackElem: - __Pyx_StructField* field - size_t parent_offset - - #ctypedef struct __Pyx_BufFmt_Context: - # __Pyx_StructField root - __Pyx_BufFmt_StackElem* head - - struct __pyx_typeinfo_string: - char string[3] - - __pyx_typeinfo_string __Pyx_TypeInfoToFormat(__Pyx_TypeInfo *) - - -@cname('__pyx_format_from_typeinfo') -cdef bytes format_from_typeinfo(__Pyx_TypeInfo *type): - cdef __Pyx_StructField *field - cdef __pyx_typeinfo_string fmt - cdef bytes part, result - - if type.typegroup == 'S': - assert type.fields != NULL - assert type.fields.type != NULL - - if type.flags & __PYX_BUF_FLAGS_PACKED_STRUCT: - alignment = b'^' - else: - alignment = b'' - - parts = [b"T{"] - field = type.fields - - while field.type: - part = format_from_typeinfo(field.type) - parts.append(part + b':' + field.name + b':') - field += 1 - - result = alignment.join(parts) + b'}' - else: - fmt = __Pyx_TypeInfoToFormat(type) - if type.arraysize[0]: - extents = [unicode(type.arraysize[i]) for i in range(type.ndim)] - result = (u"(%s)" % u','.join(extents)).encode('ascii') + fmt.string - else: - result = fmt.string - - return result diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/MemoryView_C.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/MemoryView_C.c deleted file mode 100644 index 0a5d8ee2c2f..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/MemoryView_C.c +++ /dev/null @@ -1,945 +0,0 @@ -////////// MemviewSliceStruct.proto ////////// -//@proto_block: utility_code_proto_before_types - -/* memoryview slice struct */ -struct {{memview_struct_name}}; - -typedef struct { - struct {{memview_struct_name}} *memview; - char *data; - Py_ssize_t shape[{{max_dims}}]; - Py_ssize_t strides[{{max_dims}}]; - Py_ssize_t suboffsets[{{max_dims}}]; -} {{memviewslice_name}}; - -// used for "len(memviewslice)" -#define __Pyx_MemoryView_Len(m) (m.shape[0]) - - -/////////// Atomics.proto ///////////// -//@proto_block: utility_code_proto_before_types - -#include - -#ifndef CYTHON_ATOMICS - #define CYTHON_ATOMICS 1 -#endif - -#define __pyx_atomic_int_type int -// todo: Portland pgcc, maybe OS X's OSAtomicIncrement32, -// libatomic + autotools-like distutils support? Such a pain... -#if CYTHON_ATOMICS && __GNUC__ >= 4 && (__GNUC_MINOR__ > 1 || \ - (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL >= 2)) && \ - !defined(__i386__) - /* gcc >= 4.1.2 */ - #define __pyx_atomic_incr_aligned(value, lock) __sync_fetch_and_add(value, 1) - #define __pyx_atomic_decr_aligned(value, lock) __sync_fetch_and_sub(value, 1) - - #ifdef __PYX_DEBUG_ATOMICS - #warning "Using GNU atomics" - #endif -#elif CYTHON_ATOMICS && defined(_MSC_VER) && 0 - /* msvc */ - #include - #undef __pyx_atomic_int_type - #define __pyx_atomic_int_type LONG - #define __pyx_atomic_incr_aligned(value, lock) InterlockedIncrement(value) - #define __pyx_atomic_decr_aligned(value, lock) InterlockedDecrement(value) - - #ifdef __PYX_DEBUG_ATOMICS - #pragma message ("Using MSVC atomics") - #endif -#elif CYTHON_ATOMICS && (defined(__ICC) || defined(__INTEL_COMPILER)) && 0 - #define __pyx_atomic_incr_aligned(value, lock) _InterlockedIncrement(value) - #define __pyx_atomic_decr_aligned(value, lock) _InterlockedDecrement(value) - - #ifdef __PYX_DEBUG_ATOMICS - #warning "Using Intel atomics" - #endif -#else - #undef CYTHON_ATOMICS - #define CYTHON_ATOMICS 0 - - #ifdef __PYX_DEBUG_ATOMICS - #warning "Not using atomics" - #endif -#endif - -typedef volatile __pyx_atomic_int_type __pyx_atomic_int; - -#if CYTHON_ATOMICS - #define __pyx_add_acquisition_count(memview) \ - __pyx_atomic_incr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock) - #define __pyx_sub_acquisition_count(memview) \ - __pyx_atomic_decr_aligned(__pyx_get_slice_count_pointer(memview), memview->lock) -#else - #define __pyx_add_acquisition_count(memview) \ - __pyx_add_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) - #define __pyx_sub_acquisition_count(memview) \ - __pyx_sub_acquisition_count_locked(__pyx_get_slice_count_pointer(memview), memview->lock) -#endif - - -/////////////// ObjectToMemviewSlice.proto /////////////// - -static CYTHON_INLINE {{memviewslice_name}} {{funcname}}(PyObject *, int writable_flag); - - -////////// MemviewSliceInit.proto ////////// - -#define __Pyx_BUF_MAX_NDIMS %(BUF_MAX_NDIMS)d - -#define __Pyx_MEMVIEW_DIRECT 1 -#define __Pyx_MEMVIEW_PTR 2 -#define __Pyx_MEMVIEW_FULL 4 -#define __Pyx_MEMVIEW_CONTIG 8 -#define __Pyx_MEMVIEW_STRIDED 16 -#define __Pyx_MEMVIEW_FOLLOW 32 - -#define __Pyx_IS_C_CONTIG 1 -#define __Pyx_IS_F_CONTIG 2 - -static int __Pyx_init_memviewslice( - struct __pyx_memoryview_obj *memview, - int ndim, - __Pyx_memviewslice *memviewslice, - int memview_is_new_reference); - -static CYTHON_INLINE int __pyx_add_acquisition_count_locked( - __pyx_atomic_int *acquisition_count, PyThread_type_lock lock); -static CYTHON_INLINE int __pyx_sub_acquisition_count_locked( - __pyx_atomic_int *acquisition_count, PyThread_type_lock lock); - -#define __pyx_get_slice_count_pointer(memview) (memview->acquisition_count_aligned_p) -#define __pyx_get_slice_count(memview) (*__pyx_get_slice_count_pointer(memview)) -#define __PYX_INC_MEMVIEW(slice, have_gil) __Pyx_INC_MEMVIEW(slice, have_gil, __LINE__) -#define __PYX_XDEC_MEMVIEW(slice, have_gil) __Pyx_XDEC_MEMVIEW(slice, have_gil, __LINE__) -static CYTHON_INLINE void __Pyx_INC_MEMVIEW({{memviewslice_name}} *, int, int); -static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW({{memviewslice_name}} *, int, int); - - -/////////////// MemviewSliceIndex.proto /////////////// - -static CYTHON_INLINE char *__pyx_memviewslice_index_full( - const char *bufp, Py_ssize_t idx, Py_ssize_t stride, Py_ssize_t suboffset); - - -/////////////// ObjectToMemviewSlice /////////////// -//@requires: MemviewSliceValidateAndInit - -static CYTHON_INLINE {{memviewslice_name}} {{funcname}}(PyObject *obj, int writable_flag) { - {{memviewslice_name}} result = {{memslice_init}}; - __Pyx_BufFmt_StackElem stack[{{struct_nesting_depth}}]; - int axes_specs[] = { {{axes_specs}} }; - int retcode; - - if (obj == Py_None) { - /* We don't bother to refcount None */ - result.memview = (struct __pyx_memoryview_obj *) Py_None; - return result; - } - - retcode = __Pyx_ValidateAndInit_memviewslice(axes_specs, {{c_or_f_flag}}, - {{buf_flag}} | writable_flag, {{ndim}}, - &{{dtype_typeinfo}}, stack, - &result, obj); - - if (unlikely(retcode == -1)) - goto __pyx_fail; - - return result; -__pyx_fail: - result.memview = NULL; - result.data = NULL; - return result; -} - - -/////////////// MemviewSliceValidateAndInit.proto /////////////// - -static int __Pyx_ValidateAndInit_memviewslice( - int *axes_specs, - int c_or_f_flag, - int buf_flags, - int ndim, - __Pyx_TypeInfo *dtype, - __Pyx_BufFmt_StackElem stack[], - __Pyx_memviewslice *memviewslice, - PyObject *original_obj); - -/////////////// MemviewSliceValidateAndInit /////////////// -//@requires: Buffer.c::TypeInfoCompare -//@requires: Buffer.c::BufferFormatStructs -//@requires: Buffer.c::BufferFormatCheck - -static int -__pyx_check_strides(Py_buffer *buf, int dim, int ndim, int spec) -{ - if (buf->shape[dim] <= 1) - return 1; - - if (buf->strides) { - if (spec & __Pyx_MEMVIEW_CONTIG) { - if (spec & (__Pyx_MEMVIEW_PTR|__Pyx_MEMVIEW_FULL)) { - if (unlikely(buf->strides[dim] != sizeof(void *))) { - PyErr_Format(PyExc_ValueError, - "Buffer is not indirectly contiguous " - "in dimension %d.", dim); - goto fail; - } - } else if (unlikely(buf->strides[dim] != buf->itemsize)) { - PyErr_SetString(PyExc_ValueError, - "Buffer and memoryview are not contiguous " - "in the same dimension."); - goto fail; - } - } - - if (spec & __Pyx_MEMVIEW_FOLLOW) { - Py_ssize_t stride = buf->strides[dim]; - if (stride < 0) - stride = -stride; - if (unlikely(stride < buf->itemsize)) { - PyErr_SetString(PyExc_ValueError, - "Buffer and memoryview are not contiguous " - "in the same dimension."); - goto fail; - } - } - } else { - if (unlikely(spec & __Pyx_MEMVIEW_CONTIG && dim != ndim - 1)) { - PyErr_Format(PyExc_ValueError, - "C-contiguous buffer is not contiguous in " - "dimension %d", dim); - goto fail; - } else if (unlikely(spec & (__Pyx_MEMVIEW_PTR))) { - PyErr_Format(PyExc_ValueError, - "C-contiguous buffer is not indirect in " - "dimension %d", dim); - goto fail; - } else if (unlikely(buf->suboffsets)) { - PyErr_SetString(PyExc_ValueError, - "Buffer exposes suboffsets but no strides"); - goto fail; - } - } - - return 1; -fail: - return 0; -} - -static int -__pyx_check_suboffsets(Py_buffer *buf, int dim, CYTHON_UNUSED int ndim, int spec) -{ - // Todo: without PyBUF_INDIRECT we may not have suboffset information, i.e., the - // ptr may not be set to NULL but may be uninitialized? - if (spec & __Pyx_MEMVIEW_DIRECT) { - if (unlikely(buf->suboffsets && buf->suboffsets[dim] >= 0)) { - PyErr_Format(PyExc_ValueError, - "Buffer not compatible with direct access " - "in dimension %d.", dim); - goto fail; - } - } - - if (spec & __Pyx_MEMVIEW_PTR) { - if (unlikely(!buf->suboffsets || (buf->suboffsets[dim] < 0))) { - PyErr_Format(PyExc_ValueError, - "Buffer is not indirectly accessible " - "in dimension %d.", dim); - goto fail; - } - } - - return 1; -fail: - return 0; -} - -static int -__pyx_verify_contig(Py_buffer *buf, int ndim, int c_or_f_flag) -{ - int i; - - if (c_or_f_flag & __Pyx_IS_F_CONTIG) { - Py_ssize_t stride = 1; - for (i = 0; i < ndim; i++) { - if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) { - PyErr_SetString(PyExc_ValueError, - "Buffer not fortran contiguous."); - goto fail; - } - stride = stride * buf->shape[i]; - } - } else if (c_or_f_flag & __Pyx_IS_C_CONTIG) { - Py_ssize_t stride = 1; - for (i = ndim - 1; i >- 1; i--) { - if (unlikely(stride * buf->itemsize != buf->strides[i] && buf->shape[i] > 1)) { - PyErr_SetString(PyExc_ValueError, - "Buffer not C contiguous."); - goto fail; - } - stride = stride * buf->shape[i]; - } - } - - return 1; -fail: - return 0; -} - -static int __Pyx_ValidateAndInit_memviewslice( - int *axes_specs, - int c_or_f_flag, - int buf_flags, - int ndim, - __Pyx_TypeInfo *dtype, - __Pyx_BufFmt_StackElem stack[], - __Pyx_memviewslice *memviewslice, - PyObject *original_obj) -{ - struct __pyx_memoryview_obj *memview, *new_memview; - __Pyx_RefNannyDeclarations - Py_buffer *buf; - int i, spec = 0, retval = -1; - __Pyx_BufFmt_Context ctx; - int from_memoryview = __pyx_memoryview_check(original_obj); - - __Pyx_RefNannySetupContext("ValidateAndInit_memviewslice", 0); - - if (from_memoryview && __pyx_typeinfo_cmp(dtype, ((struct __pyx_memoryview_obj *) - original_obj)->typeinfo)) { - /* We have a matching dtype, skip format parsing */ - memview = (struct __pyx_memoryview_obj *) original_obj; - new_memview = NULL; - } else { - memview = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( - original_obj, buf_flags, 0, dtype); - new_memview = memview; - if (unlikely(!memview)) - goto fail; - } - - buf = &memview->view; - if (unlikely(buf->ndim != ndim)) { - PyErr_Format(PyExc_ValueError, - "Buffer has wrong number of dimensions (expected %d, got %d)", - ndim, buf->ndim); - goto fail; - } - - if (new_memview) { - __Pyx_BufFmt_Init(&ctx, stack, dtype); - if (unlikely(!__Pyx_BufFmt_CheckString(&ctx, buf->format))) goto fail; - } - - if (unlikely((unsigned) buf->itemsize != dtype->size)) { - PyErr_Format(PyExc_ValueError, - "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "u byte%s) " - "does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "u byte%s)", - buf->itemsize, - (buf->itemsize > 1) ? "s" : "", - dtype->name, - dtype->size, - (dtype->size > 1) ? "s" : ""); - goto fail; - } - - /* Check axes */ - if (buf->len > 0) { - // 0-sized arrays do not undergo these checks since their strides are - // irrelevant and they are always both C- and F-contiguous. - for (i = 0; i < ndim; i++) { - spec = axes_specs[i]; - if (unlikely(!__pyx_check_strides(buf, i, ndim, spec))) - goto fail; - if (unlikely(!__pyx_check_suboffsets(buf, i, ndim, spec))) - goto fail; - } - - /* Check contiguity */ - if (unlikely(buf->strides && !__pyx_verify_contig(buf, ndim, c_or_f_flag))) - goto fail; - } - - /* Initialize */ - if (unlikely(__Pyx_init_memviewslice(memview, ndim, memviewslice, - new_memview != NULL) == -1)) { - goto fail; - } - - retval = 0; - goto no_fail; - -fail: - Py_XDECREF(new_memview); - retval = -1; - -no_fail: - __Pyx_RefNannyFinishContext(); - return retval; -} - - -////////// MemviewSliceInit ////////// - -static int -__Pyx_init_memviewslice(struct __pyx_memoryview_obj *memview, - int ndim, - {{memviewslice_name}} *memviewslice, - int memview_is_new_reference) -{ - __Pyx_RefNannyDeclarations - int i, retval=-1; - Py_buffer *buf = &memview->view; - __Pyx_RefNannySetupContext("init_memviewslice", 0); - - if (unlikely(memviewslice->memview || memviewslice->data)) { - PyErr_SetString(PyExc_ValueError, - "memviewslice is already initialized!"); - goto fail; - } - - if (buf->strides) { - for (i = 0; i < ndim; i++) { - memviewslice->strides[i] = buf->strides[i]; - } - } else { - Py_ssize_t stride = buf->itemsize; - for (i = ndim - 1; i >= 0; i--) { - memviewslice->strides[i] = stride; - stride *= buf->shape[i]; - } - } - - for (i = 0; i < ndim; i++) { - memviewslice->shape[i] = buf->shape[i]; - if (buf->suboffsets) { - memviewslice->suboffsets[i] = buf->suboffsets[i]; - } else { - memviewslice->suboffsets[i] = -1; - } - } - - memviewslice->memview = memview; - memviewslice->data = (char *)buf->buf; - if (__pyx_add_acquisition_count(memview) == 0 && !memview_is_new_reference) { - Py_INCREF(memview); - } - retval = 0; - goto no_fail; - -fail: - /* Don't decref, the memoryview may be borrowed. Let the caller do the cleanup */ - /* __Pyx_XDECREF(memviewslice->memview); */ - memviewslice->memview = 0; - memviewslice->data = 0; - retval = -1; -no_fail: - __Pyx_RefNannyFinishContext(); - return retval; -} - -#ifndef Py_NO_RETURN -// available since Py3.3 -#define Py_NO_RETURN -#endif - -static void __pyx_fatalerror(const char *fmt, ...) Py_NO_RETURN { - va_list vargs; - char msg[200]; - -#ifdef HAVE_STDARG_PROTOTYPES - va_start(vargs, fmt); -#else - va_start(vargs); -#endif - vsnprintf(msg, 200, fmt, vargs); - va_end(vargs); - - Py_FatalError(msg); -} - -static CYTHON_INLINE int -__pyx_add_acquisition_count_locked(__pyx_atomic_int *acquisition_count, - PyThread_type_lock lock) -{ - int result; - PyThread_acquire_lock(lock, 1); - result = (*acquisition_count)++; - PyThread_release_lock(lock); - return result; -} - -static CYTHON_INLINE int -__pyx_sub_acquisition_count_locked(__pyx_atomic_int *acquisition_count, - PyThread_type_lock lock) -{ - int result; - PyThread_acquire_lock(lock, 1); - result = (*acquisition_count)--; - PyThread_release_lock(lock); - return result; -} - - -static CYTHON_INLINE void -__Pyx_INC_MEMVIEW({{memviewslice_name}} *memslice, int have_gil, int lineno) -{ - int first_time; - struct {{memview_struct_name}} *memview = memslice->memview; - if (unlikely(!memview || (PyObject *) memview == Py_None)) - return; /* allow uninitialized memoryview assignment */ - - if (unlikely(__pyx_get_slice_count(memview) < 0)) - __pyx_fatalerror("Acquisition count is %d (line %d)", - __pyx_get_slice_count(memview), lineno); - - first_time = __pyx_add_acquisition_count(memview) == 0; - - if (unlikely(first_time)) { - if (have_gil) { - Py_INCREF((PyObject *) memview); - } else { - PyGILState_STATE _gilstate = PyGILState_Ensure(); - Py_INCREF((PyObject *) memview); - PyGILState_Release(_gilstate); - } - } -} - -static CYTHON_INLINE void __Pyx_XDEC_MEMVIEW({{memviewslice_name}} *memslice, - int have_gil, int lineno) { - int last_time; - struct {{memview_struct_name}} *memview = memslice->memview; - - if (unlikely(!memview || (PyObject *) memview == Py_None)) { - // we do not ref-count None - memslice->memview = NULL; - return; - } - - if (unlikely(__pyx_get_slice_count(memview) <= 0)) - __pyx_fatalerror("Acquisition count is %d (line %d)", - __pyx_get_slice_count(memview), lineno); - - last_time = __pyx_sub_acquisition_count(memview) == 1; - memslice->data = NULL; - - if (unlikely(last_time)) { - if (have_gil) { - Py_CLEAR(memslice->memview); - } else { - PyGILState_STATE _gilstate = PyGILState_Ensure(); - Py_CLEAR(memslice->memview); - PyGILState_Release(_gilstate); - } - } else { - memslice->memview = NULL; - } -} - - -////////// MemviewSliceCopyTemplate.proto ////////// - -static {{memviewslice_name}} -__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, - const char *mode, int ndim, - size_t sizeof_dtype, int contig_flag, - int dtype_is_object); - - -////////// MemviewSliceCopyTemplate ////////// - -static {{memviewslice_name}} -__pyx_memoryview_copy_new_contig(const __Pyx_memviewslice *from_mvs, - const char *mode, int ndim, - size_t sizeof_dtype, int contig_flag, - int dtype_is_object) -{ - __Pyx_RefNannyDeclarations - int i; - __Pyx_memviewslice new_mvs = {{memslice_init}}; - struct __pyx_memoryview_obj *from_memview = from_mvs->memview; - Py_buffer *buf = &from_memview->view; - PyObject *shape_tuple = NULL; - PyObject *temp_int = NULL; - struct __pyx_array_obj *array_obj = NULL; - struct __pyx_memoryview_obj *memview_obj = NULL; - - __Pyx_RefNannySetupContext("__pyx_memoryview_copy_new_contig", 0); - - for (i = 0; i < ndim; i++) { - if (unlikely(from_mvs->suboffsets[i] >= 0)) { - PyErr_Format(PyExc_ValueError, "Cannot copy memoryview slice with " - "indirect dimensions (axis %d)", i); - goto fail; - } - } - - shape_tuple = PyTuple_New(ndim); - if (unlikely(!shape_tuple)) { - goto fail; - } - __Pyx_GOTREF(shape_tuple); - - - for(i = 0; i < ndim; i++) { - temp_int = PyInt_FromSsize_t(from_mvs->shape[i]); - if(unlikely(!temp_int)) { - goto fail; - } else { - PyTuple_SET_ITEM(shape_tuple, i, temp_int); - temp_int = NULL; - } - } - - array_obj = __pyx_array_new(shape_tuple, sizeof_dtype, buf->format, (char *) mode, NULL); - if (unlikely(!array_obj)) { - goto fail; - } - __Pyx_GOTREF(array_obj); - - memview_obj = (struct __pyx_memoryview_obj *) __pyx_memoryview_new( - (PyObject *) array_obj, contig_flag, - dtype_is_object, - from_mvs->memview->typeinfo); - if (unlikely(!memview_obj)) - goto fail; - - /* initialize new_mvs */ - if (unlikely(__Pyx_init_memviewslice(memview_obj, ndim, &new_mvs, 1) < 0)) - goto fail; - - if (unlikely(__pyx_memoryview_copy_contents(*from_mvs, new_mvs, ndim, ndim, - dtype_is_object) < 0)) - goto fail; - - goto no_fail; - -fail: - __Pyx_XDECREF(new_mvs.memview); - new_mvs.memview = NULL; - new_mvs.data = NULL; -no_fail: - __Pyx_XDECREF(shape_tuple); - __Pyx_XDECREF(temp_int); - __Pyx_XDECREF(array_obj); - __Pyx_RefNannyFinishContext(); - return new_mvs; -} - - -////////// CopyContentsUtility.proto ///////// - -#define {{func_cname}}(slice) \ - __pyx_memoryview_copy_new_contig(&slice, "{{mode}}", {{ndim}}, \ - sizeof({{dtype_decl}}), {{contig_flag}}, \ - {{dtype_is_object}}) - - -////////// OverlappingSlices.proto ////////// - -static int __pyx_slices_overlap({{memviewslice_name}} *slice1, - {{memviewslice_name}} *slice2, - int ndim, size_t itemsize); - - -////////// OverlappingSlices ////////// - -/* Based on numpy's core/src/multiarray/array_assign.c */ - -/* Gets a half-open range [start, end) which contains the array data */ -static void -__pyx_get_array_memory_extents({{memviewslice_name}} *slice, - void **out_start, void **out_end, - int ndim, size_t itemsize) -{ - char *start, *end; - int i; - - start = end = slice->data; - - for (i = 0; i < ndim; i++) { - Py_ssize_t stride = slice->strides[i]; - Py_ssize_t extent = slice->shape[i]; - - if (extent == 0) { - *out_start = *out_end = start; - return; - } else { - if (stride > 0) - end += stride * (extent - 1); - else - start += stride * (extent - 1); - } - } - - /* Return a half-open range */ - *out_start = start; - *out_end = end + itemsize; -} - -/* Returns 1 if the arrays have overlapping data, 0 otherwise */ -static int -__pyx_slices_overlap({{memviewslice_name}} *slice1, - {{memviewslice_name}} *slice2, - int ndim, size_t itemsize) -{ - void *start1, *end1, *start2, *end2; - - __pyx_get_array_memory_extents(slice1, &start1, &end1, ndim, itemsize); - __pyx_get_array_memory_extents(slice2, &start2, &end2, ndim, itemsize); - - return (start1 < end2) && (start2 < end1); -} - - -////////// MemviewSliceCheckContig.proto ////////// - -#define __pyx_memviewslice_is_contig_{{contig_type}}{{ndim}}(slice) \ - __pyx_memviewslice_is_contig(slice, '{{contig_type}}', {{ndim}}) - - -////////// MemviewSliceIsContig.proto ////////// - -static int __pyx_memviewslice_is_contig(const {{memviewslice_name}} mvs, char order, int ndim);/*proto*/ - - -////////// MemviewSliceIsContig ////////// - -static int -__pyx_memviewslice_is_contig(const {{memviewslice_name}} mvs, char order, int ndim) -{ - int i, index, step, start; - Py_ssize_t itemsize = mvs.memview->view.itemsize; - - if (order == 'F') { - step = 1; - start = 0; - } else { - step = -1; - start = ndim - 1; - } - - for (i = 0; i < ndim; i++) { - index = start + step * i; - if (mvs.suboffsets[index] >= 0 || mvs.strides[index] != itemsize) - return 0; - - itemsize *= mvs.shape[index]; - } - - return 1; -} - - -/////////////// MemviewSliceIndex /////////////// - -static CYTHON_INLINE char * -__pyx_memviewslice_index_full(const char *bufp, Py_ssize_t idx, - Py_ssize_t stride, Py_ssize_t suboffset) -{ - bufp = bufp + idx * stride; - if (suboffset >= 0) { - bufp = *((char **) bufp) + suboffset; - } - return (char *) bufp; -} - - -/////////////// MemviewDtypeToObject.proto /////////////// - -{{if to_py_function}} -static CYTHON_INLINE PyObject *{{get_function}}(const char *itemp); /* proto */ -{{endif}} - -{{if from_py_function}} -static CYTHON_INLINE int {{set_function}}(const char *itemp, PyObject *obj); /* proto */ -{{endif}} - -/////////////// MemviewDtypeToObject /////////////// - -{{#__pyx_memview__to_object}} - -/* Convert a dtype to or from a Python object */ - -{{if to_py_function}} -static CYTHON_INLINE PyObject *{{get_function}}(const char *itemp) { - return (PyObject *) {{to_py_function}}(*({{dtype}} *) itemp); -} -{{endif}} - -{{if from_py_function}} -static CYTHON_INLINE int {{set_function}}(const char *itemp, PyObject *obj) { - {{dtype}} value = {{from_py_function}}(obj); - if ({{error_condition}}) - return 0; - *({{dtype}} *) itemp = value; - return 1; -} -{{endif}} - - -/////////////// MemviewObjectToObject.proto /////////////// - -/* Function callbacks (for memoryview object) for dtype object */ -static PyObject *{{get_function}}(const char *itemp); /* proto */ -static int {{set_function}}(const char *itemp, PyObject *obj); /* proto */ - - -/////////////// MemviewObjectToObject /////////////// - -static PyObject *{{get_function}}(const char *itemp) { - PyObject *result = *(PyObject **) itemp; - Py_INCREF(result); - return result; -} - -static int {{set_function}}(const char *itemp, PyObject *obj) { - Py_INCREF(obj); - Py_DECREF(*(PyObject **) itemp); - *(PyObject **) itemp = obj; - return 1; -} - -/////////// ToughSlice ////////// - -/* Dimension is indexed with 'start:stop:step' */ - -if (unlikely(__pyx_memoryview_slice_memviewslice( - &{{dst}}, - {{src}}.shape[{{dim}}], {{src}}.strides[{{dim}}], {{src}}.suboffsets[{{dim}}], - {{dim}}, - {{new_ndim}}, - &{{get_suboffset_dim()}}, - {{start}}, - {{stop}}, - {{step}}, - {{int(have_start)}}, - {{int(have_stop)}}, - {{int(have_step)}}, - 1) < 0)) -{ - {{error_goto}} -} - - -////////// SimpleSlice ////////// - -/* Dimension is indexed with ':' only */ - -{{dst}}.shape[{{new_ndim}}] = {{src}}.shape[{{dim}}]; -{{dst}}.strides[{{new_ndim}}] = {{src}}.strides[{{dim}}]; - -{{if access == 'direct'}} - {{dst}}.suboffsets[{{new_ndim}}] = -1; -{{else}} - {{dst}}.suboffsets[{{new_ndim}}] = {{src}}.suboffsets[{{dim}}]; - if ({{src}}.suboffsets[{{dim}}] >= 0) - {{get_suboffset_dim()}} = {{new_ndim}}; -{{endif}} - - -////////// SliceIndex ////////// - -// Dimension is indexed with an integer, we could use the ToughSlice -// approach, but this is faster - -{ - Py_ssize_t __pyx_tmp_idx = {{idx}}; - - {{if wraparound or boundscheck}} - Py_ssize_t __pyx_tmp_shape = {{src}}.shape[{{dim}}]; - {{endif}} - - Py_ssize_t __pyx_tmp_stride = {{src}}.strides[{{dim}}]; - {{if wraparound}} - if (__pyx_tmp_idx < 0) - __pyx_tmp_idx += __pyx_tmp_shape; - {{endif}} - - {{if boundscheck}} - if (unlikely(!__Pyx_is_valid_index(__pyx_tmp_idx, __pyx_tmp_shape))) { - {{if not have_gil}} - #ifdef WITH_THREAD - PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); - #endif - {{endif}} - - PyErr_SetString(PyExc_IndexError, - "Index out of bounds (axis {{dim}})"); - - {{if not have_gil}} - #ifdef WITH_THREAD - PyGILState_Release(__pyx_gilstate_save); - #endif - {{endif}} - - {{error_goto}} - } - {{endif}} - - {{if all_dimensions_direct}} - {{dst}}.data += __pyx_tmp_idx * __pyx_tmp_stride; - {{else}} - if ({{get_suboffset_dim()}} < 0) { - {{dst}}.data += __pyx_tmp_idx * __pyx_tmp_stride; - - /* This dimension is the first dimension, or is preceded by */ - /* direct or indirect dimensions that are indexed away. */ - /* Hence suboffset_dim must be less than zero, and we can have */ - /* our data pointer refer to another block by dereferencing. */ - /* slice.data -> B -> C becomes slice.data -> C */ - - {{if indirect}} - { - Py_ssize_t __pyx_tmp_suboffset = {{src}}.suboffsets[{{dim}}]; - - {{if generic}} - if (__pyx_tmp_suboffset >= 0) - {{endif}} - - {{dst}}.data = *((char **) {{dst}}.data) + __pyx_tmp_suboffset; - } - {{endif}} - - } else { - {{dst}}.suboffsets[{{get_suboffset_dim()}}] += __pyx_tmp_idx * __pyx_tmp_stride; - - /* Note: dimension can not be indirect, the compiler will have */ - /* issued an error */ - } - - {{endif}} -} - - -////////// FillStrided1DScalar.proto ////////// - -static void -__pyx_fill_slice_{{dtype_name}}({{type_decl}} *p, Py_ssize_t extent, Py_ssize_t stride, - size_t itemsize, void *itemp); - -////////// FillStrided1DScalar ////////// - -/* Fill a slice with a scalar value. The dimension is direct and strided or contiguous */ -/* This can be used as a callback for the memoryview object to efficienty assign a scalar */ -/* Currently unused */ -static void -__pyx_fill_slice_{{dtype_name}}({{type_decl}} *p, Py_ssize_t extent, Py_ssize_t stride, - size_t itemsize, void *itemp) -{ - Py_ssize_t i; - {{type_decl}} item = *(({{type_decl}} *) itemp); - {{type_decl}} *endp; - - stride /= sizeof({{type_decl}}); - endp = p + stride * extent; - - while (p < endp) { - *p = item; - p += stride; - } -} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ModuleSetupCode.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ModuleSetupCode.c deleted file mode 100644 index f7af78bfa74..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ModuleSetupCode.c +++ /dev/null @@ -1,1640 +0,0 @@ -/////////////// CModulePreamble /////////////// - -#include /* For offsetof */ -#ifndef offsetof - #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) -#endif - -#if !defined(WIN32) && !defined(MS_WINDOWS) - #ifndef __stdcall - #define __stdcall - #endif - #ifndef __cdecl - #define __cdecl - #endif - #ifndef __fastcall - #define __fastcall - #endif -#endif - -#ifndef DL_IMPORT - #define DL_IMPORT(t) t -#endif -#ifndef DL_EXPORT - #define DL_EXPORT(t) t -#endif - -// For use in DL_IMPORT/DL_EXPORT macros. -#define __PYX_COMMA , - -#ifndef HAVE_LONG_LONG - // CPython has required PY_LONG_LONG support for years, even if HAVE_LONG_LONG is not defined for us - #if PY_VERSION_HEX >= 0x02070000 - #define HAVE_LONG_LONG - #endif -#endif - -#ifndef PY_LONG_LONG - #define PY_LONG_LONG LONG_LONG -#endif - -#ifndef Py_HUGE_VAL - #define Py_HUGE_VAL HUGE_VAL -#endif - -#ifdef PYPY_VERSION - #define CYTHON_COMPILING_IN_PYPY 1 - #define CYTHON_COMPILING_IN_PYSTON 0 - #define CYTHON_COMPILING_IN_CPYTHON 0 - - #undef CYTHON_USE_TYPE_SLOTS - #define CYTHON_USE_TYPE_SLOTS 0 - #undef CYTHON_USE_PYTYPE_LOOKUP - #define CYTHON_USE_PYTYPE_LOOKUP 0 - #if PY_VERSION_HEX < 0x03050000 - #undef CYTHON_USE_ASYNC_SLOTS - #define CYTHON_USE_ASYNC_SLOTS 0 - #elif !defined(CYTHON_USE_ASYNC_SLOTS) - #define CYTHON_USE_ASYNC_SLOTS 1 - #endif - #undef CYTHON_USE_PYLIST_INTERNALS - #define CYTHON_USE_PYLIST_INTERNALS 0 - #undef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 0 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #undef CYTHON_USE_PYLONG_INTERNALS - #define CYTHON_USE_PYLONG_INTERNALS 0 - #undef CYTHON_AVOID_BORROWED_REFS - #define CYTHON_AVOID_BORROWED_REFS 1 - #undef CYTHON_ASSUME_SAFE_MACROS - #define CYTHON_ASSUME_SAFE_MACROS 0 - #undef CYTHON_UNPACK_METHODS - #define CYTHON_UNPACK_METHODS 0 - #undef CYTHON_FAST_THREAD_STATE - #define CYTHON_FAST_THREAD_STATE 0 - #undef CYTHON_FAST_PYCALL - #define CYTHON_FAST_PYCALL 0 - #undef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT 0 - #undef CYTHON_USE_TP_FINALIZE - #define CYTHON_USE_TP_FINALIZE 0 - #undef CYTHON_USE_DICT_VERSIONS - #define CYTHON_USE_DICT_VERSIONS 0 - #undef CYTHON_USE_EXC_INFO_STACK - #define CYTHON_USE_EXC_INFO_STACK 0 - #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC - #define CYTHON_UPDATE_DESCRIPTOR_DOC (PYPY_VERSION_HEX >= 0x07030900) - #endif - -#elif defined(PYSTON_VERSION) - #define CYTHON_COMPILING_IN_PYPY 0 - #define CYTHON_COMPILING_IN_PYSTON 1 - #define CYTHON_COMPILING_IN_CPYTHON 0 - - #ifndef CYTHON_USE_TYPE_SLOTS - #define CYTHON_USE_TYPE_SLOTS 1 - #endif - #undef CYTHON_USE_PYTYPE_LOOKUP - #define CYTHON_USE_PYTYPE_LOOKUP 0 - #undef CYTHON_USE_ASYNC_SLOTS - #define CYTHON_USE_ASYNC_SLOTS 0 - #undef CYTHON_USE_PYLIST_INTERNALS - #define CYTHON_USE_PYLIST_INTERNALS 0 - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #undef CYTHON_USE_PYLONG_INTERNALS - #define CYTHON_USE_PYLONG_INTERNALS 0 - #ifndef CYTHON_AVOID_BORROWED_REFS - #define CYTHON_AVOID_BORROWED_REFS 0 - #endif - #ifndef CYTHON_ASSUME_SAFE_MACROS - #define CYTHON_ASSUME_SAFE_MACROS 1 - #endif - #ifndef CYTHON_UNPACK_METHODS - #define CYTHON_UNPACK_METHODS 1 - #endif - #undef CYTHON_FAST_THREAD_STATE - #define CYTHON_FAST_THREAD_STATE 0 - #undef CYTHON_FAST_PYCALL - #define CYTHON_FAST_PYCALL 0 - #undef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT 0 - #undef CYTHON_USE_TP_FINALIZE - #define CYTHON_USE_TP_FINALIZE 0 - #undef CYTHON_USE_DICT_VERSIONS - #define CYTHON_USE_DICT_VERSIONS 0 - #undef CYTHON_USE_EXC_INFO_STACK - #define CYTHON_USE_EXC_INFO_STACK 0 - #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC - #define CYTHON_UPDATE_DESCRIPTOR_DOC 0 - #endif - -#else - #define CYTHON_COMPILING_IN_PYPY 0 - #define CYTHON_COMPILING_IN_PYSTON 0 - #define CYTHON_COMPILING_IN_CPYTHON 1 - - #ifndef CYTHON_USE_TYPE_SLOTS - #define CYTHON_USE_TYPE_SLOTS 1 - #endif - #if PY_VERSION_HEX < 0x02070000 - // looks like calling _PyType_Lookup() isn't safe in Py<=2.6/3.1 - #undef CYTHON_USE_PYTYPE_LOOKUP - #define CYTHON_USE_PYTYPE_LOOKUP 0 - #elif !defined(CYTHON_USE_PYTYPE_LOOKUP) - #define CYTHON_USE_PYTYPE_LOOKUP 1 - #endif - #if PY_MAJOR_VERSION < 3 - #undef CYTHON_USE_ASYNC_SLOTS - #define CYTHON_USE_ASYNC_SLOTS 0 - #elif !defined(CYTHON_USE_ASYNC_SLOTS) - #define CYTHON_USE_ASYNC_SLOTS 1 - #endif - #if PY_VERSION_HEX < 0x02070000 - #undef CYTHON_USE_PYLONG_INTERNALS - #define CYTHON_USE_PYLONG_INTERNALS 0 - #elif !defined(CYTHON_USE_PYLONG_INTERNALS) - #define CYTHON_USE_PYLONG_INTERNALS 1 - #endif - #ifndef CYTHON_USE_PYLIST_INTERNALS - #define CYTHON_USE_PYLIST_INTERNALS 1 - #endif - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif - #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - // Python 3.11a2 hid _PyLong_FormatAdvancedWriter and _PyFloat_FormatAdvancedWriter - // therefore disable unicode writer until a better alternative appears - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) - #define CYTHON_USE_UNICODE_WRITER 1 - #endif - #ifndef CYTHON_AVOID_BORROWED_REFS - #define CYTHON_AVOID_BORROWED_REFS 0 - #endif - #ifndef CYTHON_ASSUME_SAFE_MACROS - #define CYTHON_ASSUME_SAFE_MACROS 1 - #endif - #ifndef CYTHON_UNPACK_METHODS - #define CYTHON_UNPACK_METHODS 1 - #endif - #if PY_VERSION_HEX >= 0x030B00A4 - #undef CYTHON_FAST_THREAD_STATE - #define CYTHON_FAST_THREAD_STATE 0 - #elif !defined(CYTHON_FAST_THREAD_STATE) - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL - // Python 3.11 deleted localplus argument from frame object, which is used in our - // fast_pycall code - // On Python 3.10 it causes issues when used while profiling/debugging - #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030A0000) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) - #endif - #ifndef CYTHON_USE_TP_FINALIZE - #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) - #endif - #ifndef CYTHON_USE_DICT_VERSIONS - #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) - #endif - #if PY_VERSION_HEX >= 0x030B00A4 - #undef CYTHON_USE_EXC_INFO_STACK - #define CYTHON_USE_EXC_INFO_STACK 0 - #elif !defined(CYTHON_USE_EXC_INFO_STACK) - #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) - #endif - #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC - #define CYTHON_UPDATE_DESCRIPTOR_DOC 1 - #endif -#endif - -#if !defined(CYTHON_FAST_PYCCALL) -#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) -#endif - -#if CYTHON_USE_PYLONG_INTERNALS - #if PY_MAJOR_VERSION < 3 - #include "longintrepr.h" - #endif - /* These short defines can easily conflict with other code */ - #undef SHIFT - #undef BASE - #undef MASK - /* Compile-time sanity check that these are indeed equal. Github issue #2670. */ - #ifdef SIZEOF_VOID_P - enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; - #endif -#endif - -#ifndef __has_attribute - #define __has_attribute(x) 0 -#endif - -#ifndef __has_cpp_attribute - #define __has_cpp_attribute(x) 0 -#endif - -// restrict -#ifndef CYTHON_RESTRICT - #if defined(__GNUC__) - #define CYTHON_RESTRICT __restrict__ - #elif defined(_MSC_VER) && _MSC_VER >= 1400 - #define CYTHON_RESTRICT __restrict - #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - #define CYTHON_RESTRICT restrict - #else - #define CYTHON_RESTRICT - #endif -#endif - -// unused attribute -#ifndef CYTHON_UNUSED -# if defined(__GNUC__) -# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) -# define CYTHON_UNUSED __attribute__ ((__unused__)) -# else -# define CYTHON_UNUSED -# endif -# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER)) -# define CYTHON_UNUSED __attribute__ ((__unused__)) -# else -# define CYTHON_UNUSED -# endif -#endif - -#ifndef CYTHON_MAYBE_UNUSED_VAR -# if defined(__cplusplus) - template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { } -# else -# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x) -# endif -#endif - -#ifndef CYTHON_NCP_UNUSED -# if CYTHON_COMPILING_IN_CPYTHON -# define CYTHON_NCP_UNUSED -# else -# define CYTHON_NCP_UNUSED CYTHON_UNUSED -# endif -#endif - -#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None) - -#ifdef _MSC_VER - #ifndef _MSC_STDINT_H_ - #if _MSC_VER < 1300 - typedef unsigned char uint8_t; - typedef unsigned int uint32_t; - #else - typedef unsigned __int8 uint8_t; - typedef unsigned __int32 uint32_t; - #endif - #endif -#else - #include -#endif - - -#ifndef CYTHON_FALLTHROUGH - #if defined(__cplusplus) && __cplusplus >= 201103L - #if __has_cpp_attribute(fallthrough) - #define CYTHON_FALLTHROUGH [[fallthrough]] - #elif __has_cpp_attribute(clang::fallthrough) - #define CYTHON_FALLTHROUGH [[clang::fallthrough]] - #elif __has_cpp_attribute(gnu::fallthrough) - #define CYTHON_FALLTHROUGH [[gnu::fallthrough]] - #endif - #endif - - #ifndef CYTHON_FALLTHROUGH - #if __has_attribute(fallthrough) - #define CYTHON_FALLTHROUGH __attribute__((fallthrough)) - #else - #define CYTHON_FALLTHROUGH - #endif - #endif - - #if defined(__clang__ ) && defined(__apple_build_version__) - #if __apple_build_version__ < 7000000 /* Xcode < 7.0 */ - #undef CYTHON_FALLTHROUGH - #define CYTHON_FALLTHROUGH - #endif - #endif -#endif - -/////////////// CInitCode /////////////// - -// inline attribute -#ifndef CYTHON_INLINE - #if defined(__clang__) - #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) - #elif defined(__GNUC__) - #define CYTHON_INLINE __inline__ - #elif defined(_MSC_VER) - #define CYTHON_INLINE __inline - #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - #define CYTHON_INLINE inline - #else - #define CYTHON_INLINE - #endif -#endif - - -/////////////// CppInitCode /////////////// - -#ifndef __cplusplus - #error "Cython files generated with the C++ option must be compiled with a C++ compiler." -#endif - -// inline attribute -#ifndef CYTHON_INLINE - #if defined(__clang__) - #define CYTHON_INLINE __inline__ __attribute__ ((__unused__)) - #else - #define CYTHON_INLINE inline - #endif -#endif - -// Work around clang bug http://stackoverflow.com/questions/21847816/c-invoke-nested-template-class-destructor -template -void __Pyx_call_destructor(T& x) { - x.~T(); -} - -// Used for temporary variables of "reference" type. -template -class __Pyx_FakeReference { - public: - __Pyx_FakeReference() : ptr(NULL) { } - // __Pyx_FakeReference(T& ref) : ptr(&ref) { } - // Const version needed as Cython doesn't know about const overloads (e.g. for stl containers). - __Pyx_FakeReference(const T& ref) : ptr(const_cast(&ref)) { } - T *operator->() { return ptr; } - T *operator&() { return ptr; } - operator T&() { return *ptr; } - // TODO(robertwb): Delegate all operators (or auto-generate unwrapping code where needed). - template bool operator ==(U other) { return *ptr == other; } - template bool operator !=(U other) { return *ptr != other; } - private: - T *ptr; -}; - - -/////////////// PythonCompatibility /////////////// - -#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag) - #define Py_OptimizeFlag 0 -#endif - -#define __PYX_BUILD_PY_SSIZE_T "n" -#define CYTHON_FORMAT_SSIZE_T "z" - -#if PY_MAJOR_VERSION < 3 - #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ - PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) - #define __Pyx_DefaultClassType PyClass_Type -#else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" - #define __Pyx_DefaultClassType PyType_Type -#if PY_VERSION_HEX >= 0x030B00A1 - static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, - PyObject *code, PyObject *c, PyObject* n, PyObject *v, - PyObject *fv, PyObject *cell, PyObject* fn, - PyObject *name, int fline, PyObject *lnos) { - // TODO - currently written to be simple and work in limited API etc. - // A more optimized version would be good - PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; - PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; - const char *fn_cstr=NULL; - const char *name_cstr=NULL; - PyCodeObject* co=NULL; - PyObject *type, *value, *traceback; - - // we must be able to call this while an exception is happening - thus clear then restore the state - PyErr_Fetch(&type, &value, &traceback); - - if (!(kwds=PyDict_New())) goto end; - if (!(argcount=PyLong_FromLong(a))) goto end; - if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; - if (!(posonlyargcount=PyLong_FromLong(0))) goto end; - if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; - if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; - if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; - if (!(nlocals=PyLong_FromLong(l))) goto end; - if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; - if (!(stacksize=PyLong_FromLong(s))) goto end; - if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; - if (!(flags=PyLong_FromLong(f))) goto end; - if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; - if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; - if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; - if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; - if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; - if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; - if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; - if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; - - if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; - if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; - if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; - - if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; - if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here - if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; - - Py_XDECREF((PyObject*)co); - co = (PyCodeObject*)call_result; - call_result = NULL; - - if (0) { - cleanup_code_too: - Py_XDECREF((PyObject*)co); - co = NULL; - } - end: - Py_XDECREF(kwds); - Py_XDECREF(argcount); - Py_XDECREF(posonlyargcount); - Py_XDECREF(kwonlyargcount); - Py_XDECREF(nlocals); - Py_XDECREF(stacksize); - Py_XDECREF(replace); - Py_XDECREF(call_result); - Py_XDECREF(empty); - if (type) { - PyErr_Restore(type, value, traceback); - } - return co; - } -#else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -#endif - #define __Pyx_DefaultClassType PyType_Type -#endif - -#ifndef Py_TPFLAGS_CHECKTYPES - #define Py_TPFLAGS_CHECKTYPES 0 -#endif -#ifndef Py_TPFLAGS_HAVE_INDEX - #define Py_TPFLAGS_HAVE_INDEX 0 -#endif -#ifndef Py_TPFLAGS_HAVE_NEWBUFFER - #define Py_TPFLAGS_HAVE_NEWBUFFER 0 -#endif -#ifndef Py_TPFLAGS_HAVE_FINALIZE - #define Py_TPFLAGS_HAVE_FINALIZE 0 -#endif - -#ifndef METH_STACKLESS - // already defined for Stackless Python (all versions) and C-Python >= 3.7 - // value if defined: Stackless Python < 3.6: 0x80 else 0x100 - #define METH_STACKLESS 0 -#endif -#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) - // new in CPython 3.6, but changed in 3.7 - see - // positional-only parameters: - // https://bugs.python.org/issue29464 - // const args: - // https://bugs.python.org/issue32240 - #ifndef METH_FASTCALL - #define METH_FASTCALL 0x80 - #endif - typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs); - // new in CPython 3.7, used to be old signature of _PyCFunctionFast() in 3.6 - typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args, - Py_ssize_t nargs, PyObject *kwnames); -#else - #define __Pyx_PyCFunctionFast _PyCFunctionFast - #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords -#endif -#if CYTHON_FAST_PYCCALL -#define __Pyx_PyFastCFunction_Check(func) \ - ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) -#else -#define __Pyx_PyFastCFunction_Check(func) 0 -#endif - -#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) - #define PyObject_Malloc(s) PyMem_Malloc(s) - #define PyObject_Free(p) PyMem_Free(p) - #define PyObject_Realloc(p) PyMem_Realloc(p) -#endif - -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 - #define PyMem_RawMalloc(n) PyMem_Malloc(n) - #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) - #define PyMem_RawFree(p) PyMem_Free(p) -#endif - -#if CYTHON_COMPILING_IN_PYSTON - // special C-API functions only in Pyston - #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) - #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) -#else - #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0) - #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno) -#endif - -#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000 - #define __Pyx_PyThreadState_Current PyThreadState_GET() -#elif PY_VERSION_HEX >= 0x03060000 - //#elif PY_VERSION_HEX >= 0x03050200 - // Actually added in 3.5.2, but compiling against that does not guarantee that we get imported there. - #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet() -#elif PY_VERSION_HEX >= 0x03000000 - #define __Pyx_PyThreadState_Current PyThreadState_GET() -#else - #define __Pyx_PyThreadState_Current _PyThreadState_Current -#endif - -// TSS (Thread Specific Storage) API -#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT) -#include "pythread.h" -#define Py_tss_NEEDS_INIT 0 -typedef int Py_tss_t; -static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) { - *key = PyThread_create_key(); - return 0; /* PyThread_create_key reports success always */ -} -static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) { - Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t)); - *key = Py_tss_NEEDS_INIT; - return key; -} -static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) { - PyObject_Free(key); -} -static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) { - return *key != Py_tss_NEEDS_INIT; -} -static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) { - PyThread_delete_key(*key); - *key = Py_tss_NEEDS_INIT; -} -static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) { - return PyThread_set_key_value(*key, value); -} -static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - return PyThread_get_key_value(*key); -} -// PyThread_delete_key_value(key) is equalivalent to PyThread_set_key_value(key, NULL) -// PyThread_ReInitTLS() is a no-op -#endif /* TSS (Thread Specific Storage) API */ - -#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized) -#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n)) -#else -#define __Pyx_PyDict_NewPresized(n) PyDict_New() -#endif - -#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION - #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y) - #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y) -#else - #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y) - #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y) -#endif - -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && CYTHON_USE_UNICODE_INTERNALS -#define __Pyx_PyDict_GetItemStr(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash) -#else -#define __Pyx_PyDict_GetItemStr(dict, name) PyDict_GetItem(dict, name) -#endif - -/* new Py3.3 unicode type (PEP 393) */ -#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 - - #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ - 0 : _PyUnicode_Ready((PyObject *)(op))) - #else - // Py3.12 / PEP-623 will remove wstr type unicode strings and all of the PyUnicode_READY() machinery. - #define __Pyx_PyUnicode_READY(op) (0) - #endif - - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) - #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) - #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) - #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 - // Avoid calling deprecated C-API functions in Py3.9+ that PEP-623 schedules for removal in Py3.12. - // https://www.python.org/dev/peps/pep-0623/ - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) - #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) - #endif - #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) - #endif -#else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 - #define PyUnicode_2BYTE_KIND 2 - #define PyUnicode_4BYTE_KIND 4 - #define __Pyx_PyUnicode_READY(op) (0) - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111) - #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) - #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) - /* (void)(k) => avoid unused variable warning due to macro: */ - #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch) - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u)) -#endif - -#if CYTHON_COMPILING_IN_PYPY - #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) - #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) -#else - #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) - #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \ - PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) -#endif - -#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains) - #define PyUnicode_Contains(u, s) PySequence_Contains(u, s) -#endif - -#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check) - #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type) -#endif - -#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) - #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) -#endif - -// ("..." % x) must call PyNumber_Remainder() if x is a string subclass that implements "__rmod__()". -#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) -#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) - -#if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) -#else - #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) -#endif - -#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII) - #define PyObject_ASCII(o) PyObject_Repr(o) -#endif - -#if PY_MAJOR_VERSION >= 3 - #define PyBaseString_Type PyUnicode_Type - #define PyStringObject PyUnicodeObject - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact - // PyPy3 used to define "PyObject_Unicode" -#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str -#endif -#endif - -#if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -#else - #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj)) - #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) -#endif - -#ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) -#endif - - -#if PY_VERSION_HEX >= 0x030900A4 - #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) - #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -#else - #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) - #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -#endif - -#if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) -#else - // NOTE: might fail with exception => check for -1 - #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq) -#endif - -#if PY_MAJOR_VERSION >= 3 - #define PyIntObject PyLongObject - #define PyInt_Type PyLong_Type - #define PyInt_Check(op) PyLong_Check(op) - #define PyInt_CheckExact(op) PyLong_CheckExact(op) - #define PyInt_FromString PyLong_FromString - #define PyInt_FromUnicode PyLong_FromUnicode - #define PyInt_FromLong PyLong_FromLong - #define PyInt_FromSize_t PyLong_FromSize_t - #define PyInt_FromSsize_t PyLong_FromSsize_t - #define PyInt_AsLong PyLong_AsLong - #define PyInt_AS_LONG PyLong_AS_LONG - #define PyInt_AsSsize_t PyLong_AsSsize_t - #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask - #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask - #define PyNumber_Int PyNumber_Long -#endif - -#if PY_MAJOR_VERSION >= 3 - #define PyBoolObject PyLongObject -#endif - -#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY - #ifndef PyUnicode_InternFromString - #define PyUnicode_InternFromString(s) PyUnicode_FromString(s) - #endif -#endif - -#if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong - #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t -#else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t - #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t -#endif - -#if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) -#else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) -#endif - -// backport of PyAsyncMethods from Py3.5 to older Py3.x versions -// (mis-)using the "tp_reserved" type slot which is re-activated as "tp_as_async" in Py3.5 -#if CYTHON_USE_ASYNC_SLOTS - #if PY_VERSION_HEX >= 0x030500B1 - #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods - #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async) - #else - #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved)) - #endif -#else - #define __Pyx_PyType_AsAsync(obj) NULL -#endif -#ifndef __Pyx_PyAsyncMethodsStruct - typedef struct { - unaryfunc am_await; - unaryfunc am_aiter; - unaryfunc am_anext; - } __Pyx_PyAsyncMethodsStruct; -#endif - - -/////////////// SmallCodeConfig.proto /////////////// - -#ifndef CYTHON_SMALL_CODE -#if defined(__clang__) - #define CYTHON_SMALL_CODE -#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) - #define CYTHON_SMALL_CODE __attribute__((cold)) -#else - #define CYTHON_SMALL_CODE -#endif -#endif - - -/////////////// PyModInitFuncType.proto /////////////// - -#ifndef CYTHON_NO_PYINIT_EXPORT -#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC - -#elif PY_MAJOR_VERSION < 3 -// Py2: define this to void manually because PyMODINIT_FUNC adds __declspec(dllexport) to it's definition. -#ifdef __cplusplus -#define __Pyx_PyMODINIT_FUNC extern "C" void -#else -#define __Pyx_PyMODINIT_FUNC void -#endif - -#else -// Py3+: define this to PyObject * manually because PyMODINIT_FUNC adds __declspec(dllexport) to it's definition. -#ifdef __cplusplus -#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * -#else -#define __Pyx_PyMODINIT_FUNC PyObject * -#endif -#endif - - -/////////////// FastTypeChecks.proto /////////////// - -#if CYTHON_COMPILING_IN_CPYTHON -#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) -static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);/*proto*/ -static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);/*proto*/ -static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);/*proto*/ -#else -#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type) -#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type) -#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2)) -#endif - -#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception) - -/////////////// FastTypeChecks /////////////// -//@requires: Exceptions.c::PyThreadStateGet -//@requires: Exceptions.c::PyErrFetchRestore - -#if CYTHON_COMPILING_IN_CPYTHON -static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { - while (a) { - a = a->tp_base; - if (a == b) - return 1; - } - return b == &PyBaseObject_Type; -} - -static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) { - PyObject *mro; - if (a == b) return 1; - mro = a->tp_mro; - if (likely(mro)) { - Py_ssize_t i, n; - n = PyTuple_GET_SIZE(mro); - for (i = 0; i < n; i++) { - if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b) - return 1; - } - return 0; - } - // should only get here for incompletely initialised types, i.e. never under normal usage patterns - return __Pyx_InBases(a, b); -} - - -#if PY_MAJOR_VERSION == 2 -static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) { - // PyObject_IsSubclass() can recurse and therefore is not safe - PyObject *exception, *value, *tb; - int res; - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - __Pyx_ErrFetch(&exception, &value, &tb); - - res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0; - // This function must not fail, so print the error here (which also clears it) - if (unlikely(res == -1)) { - PyErr_WriteUnraisable(err); - res = 0; - } - if (!res) { - res = PyObject_IsSubclass(err, exc_type2); - // This function must not fail, so print the error here (which also clears it) - if (unlikely(res == -1)) { - PyErr_WriteUnraisable(err); - res = 0; - } - } - - __Pyx_ErrRestore(exception, value, tb); - return res; -} -#else -static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) { - int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0; - if (!res) { - res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2); - } - return res; -} -#endif - -// so far, we only call PyErr_GivenExceptionMatches() with an exception type (not instance) as first argument -// => optimise for that case - -static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { - Py_ssize_t i, n; - assert(PyExceptionClass_Check(exc_type)); - n = PyTuple_GET_SIZE(tuple); -#if PY_MAJOR_VERSION >= 3 - // the tighter subtype checking in Py3 allows faster out-of-order comparison - for (i=0; i pure safety check assertions. - assert(PyExceptionClass_Check(exc_type1)); - assert(PyExceptionClass_Check(exc_type2)); - if (likely(err == exc_type1 || err == exc_type2)) return 1; - if (likely(PyExceptionClass_Check(err))) { - return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2); - } - return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2)); -} - -#endif - - -/////////////// MathInitCode /////////////// - -#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS) - #if !defined(_USE_MATH_DEFINES) - #define _USE_MATH_DEFINES - #endif -#endif -#include - -#ifdef NAN -#define __PYX_NAN() ((float) NAN) -#else -static CYTHON_INLINE float __PYX_NAN() { - // Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and - // a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is - // a quiet NaN. - float value; - memset(&value, 0xFF, sizeof(value)); - return value; -} -#endif - -#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL) -#define __Pyx_truncl trunc -#else -#define __Pyx_truncl truncl -#endif - - -/////////////// UtilityFunctionPredeclarations.proto /////////////// - -typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding; - const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ - -/////////////// ForceInitThreads.proto /////////////// -//@proto_block: utility_code_proto_before_types - -#ifndef __PYX_FORCE_INIT_THREADS - #define __PYX_FORCE_INIT_THREADS 0 -#endif - -/////////////// InitThreads.init /////////////// - -#if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 -PyEval_InitThreads(); -#endif - - -/////////////// ModuleCreationPEP489 /////////////// -//@substitute: naming - -//#if CYTHON_PEP489_MULTI_PHASE_INIT -static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { - #if PY_VERSION_HEX >= 0x030700A1 - static PY_INT64_T main_interpreter_id = -1; - PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); - if (main_interpreter_id == -1) { - main_interpreter_id = current_id; - return (unlikely(current_id == -1)) ? -1 : 0; - } else if (unlikely(main_interpreter_id != current_id)) - - #else - static PyInterpreterState *main_interpreter = NULL; - PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; - if (!main_interpreter) { - main_interpreter = current_interpreter; - } else if (unlikely(main_interpreter != current_interpreter)) - #endif - - { - PyErr_SetString( - PyExc_ImportError, - "Interpreter change detected - this module can only be loaded into one interpreter per process."); - return -1; - } - return 0; -} - -static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { - PyObject *value = PyObject_GetAttrString(spec, from_name); - int result = 0; - if (likely(value)) { - if (allow_none || value != Py_None) { - result = PyDict_SetItemString(moddict, to_name, value); - } - Py_DECREF(value); - } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { - PyErr_Clear(); - } else { - result = -1; - } - return result; -} - -static CYTHON_SMALL_CODE PyObject* ${pymodule_create_func_cname}(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { - PyObject *module = NULL, *moddict, *modname; - - // For now, we only have exactly one module instance. - if (__Pyx_check_single_interpreter()) - return NULL; - if (${module_cname}) - return __Pyx_NewRef(${module_cname}); - - modname = PyObject_GetAttrString(spec, "name"); - if (unlikely(!modname)) goto bad; - - module = PyModule_NewObject(modname); - Py_DECREF(modname); - if (unlikely(!module)) goto bad; - - moddict = PyModule_GetDict(module); - if (unlikely(!moddict)) goto bad; - // moddict is a borrowed reference - - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; - - return module; -bad: - Py_XDECREF(module); - return NULL; -} -//#endif - - -/////////////// CodeObjectCache.proto /////////////// - -typedef struct { - PyCodeObject* code_object; - int code_line; -} __Pyx_CodeObjectCacheEntry; - -struct __Pyx_CodeObjectCache { - int count; - int max_count; - __Pyx_CodeObjectCacheEntry* entries; -}; - -static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL}; - -static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line); -static PyCodeObject *__pyx_find_code_object(int code_line); -static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); - -/////////////// CodeObjectCache /////////////// -// Note that errors are simply ignored in the code below. -// This is just a cache, if a lookup or insertion fails - so what? - -static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { - int start = 0, mid = 0, end = count - 1; - if (end >= 0 && code_line > entries[end].code_line) { - return count; - } - while (start < end) { - mid = start + (end - start) / 2; - if (code_line < entries[mid].code_line) { - end = mid; - } else if (code_line > entries[mid].code_line) { - start = mid + 1; - } else { - return mid; - } - } - if (code_line <= entries[mid].code_line) { - return mid; - } else { - return mid + 1; - } -} - -static PyCodeObject *__pyx_find_code_object(int code_line) { - PyCodeObject* code_object; - int pos; - if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) { - return NULL; - } - pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); - if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) { - return NULL; - } - code_object = __pyx_code_cache.entries[pos].code_object; - Py_INCREF(code_object); - return code_object; -} - -static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - int pos, i; - __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; - if (unlikely(!code_line)) { - return; - } - if (unlikely(!entries)) { - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry)); - if (likely(entries)) { - __pyx_code_cache.entries = entries; - __pyx_code_cache.max_count = 64; - __pyx_code_cache.count = 1; - entries[0].code_line = code_line; - entries[0].code_object = code_object; - Py_INCREF(code_object); - } - return; - } - pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line); - if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) { - PyCodeObject* tmp = entries[pos].code_object; - entries[pos].code_object = code_object; - Py_DECREF(tmp); - return; - } - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( - __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } - __pyx_code_cache.entries = entries; - __pyx_code_cache.max_count = new_max; - } - for (i=__pyx_code_cache.count; i>pos; i--) { - entries[i] = entries[i-1]; - } - entries[pos].code_line = code_line; - entries[pos].code_object = code_object; - __pyx_code_cache.count++; - Py_INCREF(code_object); -} - -/////////////// CodeObjectCache.cleanup /////////////// - - if (__pyx_code_cache.entries) { - __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries; - int i, count = __pyx_code_cache.count; - __pyx_code_cache.count = 0; - __pyx_code_cache.max_count = 0; - __pyx_code_cache.entries = NULL; - for (i=0; i '9'); - break; - } - if (rt_from_call[i] != ctversion[i]) { - same = 0; - break; - } - } - - if (!same) { - char rtversion[5] = {'\0'}; - // copy the runtime-version for the error message - char message[200]; - for (i=0; i<4; ++i) { - if (rt_from_call[i] == '.') { - if (found_dot) break; - found_dot = 1; - } else if (rt_from_call[i] < '0' || rt_from_call[i] > '9') { - break; - } - rtversion[i] = rt_from_call[i]; - } - PyOS_snprintf(message, sizeof(message), - "compiletime version %s of module '%.100s' " - "does not match runtime version %s", - ctversion, __Pyx_MODULE_NAME, rtversion); - return PyErr_WarnEx(NULL, message, 1); - } - return 0; -} - -/////////////// IsLittleEndian.proto /////////////// - -static CYTHON_INLINE int __Pyx_Is_Little_Endian(void); - -/////////////// IsLittleEndian /////////////// - -static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) -{ - union { - uint32_t u32; - uint8_t u8[4]; - } S; - S.u32 = 0x01020304; - return S.u8[0] == 4; -} - -/////////////// Refnanny.proto /////////////// - -#ifndef CYTHON_REFNANNY - #define CYTHON_REFNANNY 0 -#endif - -#if CYTHON_REFNANNY - typedef struct { - void (*INCREF)(void*, PyObject*, int); - void (*DECREF)(void*, PyObject*, int); - void (*GOTREF)(void*, PyObject*, int); - void (*GIVEREF)(void*, PyObject*, int); - void* (*SetupContext)(const char*, int, const char*); - void (*FinishContext)(void**); - } __Pyx_RefNannyAPIStruct; - static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL; - static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/ - #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL; -#ifdef WITH_THREAD - #define __Pyx_RefNannySetupContext(name, acquire_gil) \ - if (acquire_gil) { \ - PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure(); \ - __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \ - PyGILState_Release(__pyx_gilstate_save); \ - } else { \ - __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__); \ - } -#else - #define __Pyx_RefNannySetupContext(name, acquire_gil) \ - __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__) -#endif - #define __Pyx_RefNannyFinishContext() \ - __Pyx_RefNanny->FinishContext(&__pyx_refnanny) - #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__) - #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__) - #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__) - #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__) - #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0) - #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0) - #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0) - #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0) -#else - #define __Pyx_RefNannyDeclarations - #define __Pyx_RefNannySetupContext(name, acquire_gil) - #define __Pyx_RefNannyFinishContext() - #define __Pyx_INCREF(r) Py_INCREF(r) - #define __Pyx_DECREF(r) Py_DECREF(r) - #define __Pyx_GOTREF(r) - #define __Pyx_GIVEREF(r) - #define __Pyx_XINCREF(r) Py_XINCREF(r) - #define __Pyx_XDECREF(r) Py_XDECREF(r) - #define __Pyx_XGOTREF(r) - #define __Pyx_XGIVEREF(r) -#endif /* CYTHON_REFNANNY */ - -#define __Pyx_XDECREF_SET(r, v) do { \ - PyObject *tmp = (PyObject *) r; \ - r = v; __Pyx_XDECREF(tmp); \ - } while (0) -#define __Pyx_DECREF_SET(r, v) do { \ - PyObject *tmp = (PyObject *) r; \ - r = v; __Pyx_DECREF(tmp); \ - } while (0) - -#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) -#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) - -/////////////// Refnanny /////////////// - -#if CYTHON_REFNANNY -static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { - PyObject *m = NULL, *p = NULL; - void *r = NULL; - m = PyImport_ImportModule(modname); - if (!m) goto end; - p = PyObject_GetAttrString(m, "RefNannyAPI"); - if (!p) goto end; - r = PyLong_AsVoidPtr(p); -end: - Py_XDECREF(p); - Py_XDECREF(m); - return (__Pyx_RefNannyAPIStruct *)r; -} -#endif /* CYTHON_REFNANNY */ - - -/////////////// ImportRefnannyAPI /////////////// - -#if CYTHON_REFNANNY -__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); -if (!__Pyx_RefNanny) { - PyErr_Clear(); - __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny"); - if (!__Pyx_RefNanny) - Py_FatalError("failed to import 'refnanny' module"); -} -#endif - - -/////////////// RegisterModuleCleanup.proto /////////////// -//@substitute: naming - -static void ${cleanup_cname}(PyObject *self); /*proto*/ - -#if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY -static int __Pyx_RegisterCleanup(void); /*proto*/ -#else -#define __Pyx_RegisterCleanup() (0) -#endif - -/////////////// RegisterModuleCleanup /////////////// -//@substitute: naming - -#if PY_MAJOR_VERSION < 3 || CYTHON_COMPILING_IN_PYPY -static PyObject* ${cleanup_cname}_atexit(PyObject *module, CYTHON_UNUSED PyObject *unused) { - ${cleanup_cname}(module); - Py_INCREF(Py_None); return Py_None; -} - -static int __Pyx_RegisterCleanup(void) { - // Don't use Py_AtExit because that has a 32-call limit and is called - // after python finalization. - // Also, we try to prepend the cleanup function to "atexit._exithandlers" - // in Py2 because CPython runs them last-to-first. Being run last allows - // user exit code to run before us that may depend on the globals - // and cached objects that we are about to clean up. - - static PyMethodDef cleanup_def = { - "__cleanup", (PyCFunction)${cleanup_cname}_atexit, METH_NOARGS, 0}; - - PyObject *cleanup_func = 0; - PyObject *atexit = 0; - PyObject *reg = 0; - PyObject *args = 0; - PyObject *res = 0; - int ret = -1; - - cleanup_func = PyCFunction_New(&cleanup_def, 0); - if (!cleanup_func) - goto bad; - - atexit = PyImport_ImportModule("atexit"); - if (!atexit) - goto bad; - reg = PyObject_GetAttrString(atexit, "_exithandlers"); - if (reg && PyList_Check(reg)) { - PyObject *a, *kw; - a = PyTuple_New(0); - kw = PyDict_New(); - if (!a || !kw) { - Py_XDECREF(a); - Py_XDECREF(kw); - goto bad; - } - args = PyTuple_Pack(3, cleanup_func, a, kw); - Py_DECREF(a); - Py_DECREF(kw); - if (!args) - goto bad; - ret = PyList_Insert(reg, 0, args); - } else { - if (!reg) - PyErr_Clear(); - Py_XDECREF(reg); - reg = PyObject_GetAttrString(atexit, "register"); - if (!reg) - goto bad; - args = PyTuple_Pack(1, cleanup_func); - if (!args) - goto bad; - res = PyObject_CallObject(reg, args); - if (!res) - goto bad; - ret = 0; - } -bad: - Py_XDECREF(cleanup_func); - Py_XDECREF(atexit); - Py_XDECREF(reg); - Py_XDECREF(args); - Py_XDECREF(res); - return ret; -} -#endif - -/////////////// FastGil.init /////////////// -#ifdef WITH_THREAD -__Pyx_FastGilFuncInit(); -#endif - -/////////////// NoFastGil.proto /////////////// -//@proto_block: utility_code_proto_before_types - -#define __Pyx_PyGILState_Ensure PyGILState_Ensure -#define __Pyx_PyGILState_Release PyGILState_Release -#define __Pyx_FastGIL_Remember() -#define __Pyx_FastGIL_Forget() -#define __Pyx_FastGilFuncInit() - -/////////////// FastGil.proto /////////////// -//@proto_block: utility_code_proto_before_types - -struct __Pyx_FastGilVtab { - PyGILState_STATE (*Fast_PyGILState_Ensure)(void); - void (*Fast_PyGILState_Release)(PyGILState_STATE oldstate); - void (*FastGIL_Remember)(void); - void (*FastGIL_Forget)(void); -}; - -static void __Pyx_FastGIL_Noop(void) {} -static struct __Pyx_FastGilVtab __Pyx_FastGilFuncs = { - PyGILState_Ensure, - PyGILState_Release, - __Pyx_FastGIL_Noop, - __Pyx_FastGIL_Noop -}; - -static void __Pyx_FastGilFuncInit(void); - -#define __Pyx_PyGILState_Ensure __Pyx_FastGilFuncs.Fast_PyGILState_Ensure -#define __Pyx_PyGILState_Release __Pyx_FastGilFuncs.Fast_PyGILState_Release -#define __Pyx_FastGIL_Remember __Pyx_FastGilFuncs.FastGIL_Remember -#define __Pyx_FastGIL_Forget __Pyx_FastGilFuncs.FastGIL_Forget - -#ifdef WITH_THREAD - #ifndef CYTHON_THREAD_LOCAL - #if __STDC_VERSION__ >= 201112 - #define CYTHON_THREAD_LOCAL _Thread_local - #elif defined(__GNUC__) - #define CYTHON_THREAD_LOCAL __thread - #elif defined(_MSC_VER) - #define CYTHON_THREAD_LOCAL __declspec(thread) - #endif - #endif -#endif - -/////////////// FastGil /////////////// -//@requires: CommonStructures.c::FetchCommonPointer -// The implementations of PyGILState_Ensure/Release calls PyThread_get_key_value -// several times which is turns out to be quite slow (slower in fact than -// acquiring the GIL itself). Simply storing it in a thread local for the -// common case is much faster. -// To make optimal use of this thread local, we attempt to share it between -// modules. - -#define __Pyx_FastGIL_ABI_module "_cython_" CYTHON_ABI -#define __Pyx_FastGIL_PyCapsuleName "FastGilFuncs" -#define __Pyx_FastGIL_PyCapsule \ - __Pyx_FastGIL_ABI_module "." __Pyx_FastGIL_PyCapsuleName - -#if PY_VERSION_HEX < 0x02070000 - #undef CYTHON_THREAD_LOCAL -#endif - -#ifdef CYTHON_THREAD_LOCAL - -#include "pythread.h" -#include "pystate.h" - -static CYTHON_THREAD_LOCAL PyThreadState *__Pyx_FastGil_tcur = NULL; -static CYTHON_THREAD_LOCAL int __Pyx_FastGil_tcur_depth = 0; -static int __Pyx_FastGil_autoTLSkey = -1; - -static CYTHON_INLINE void __Pyx_FastGIL_Remember0(void) { - ++__Pyx_FastGil_tcur_depth; -} - -static CYTHON_INLINE void __Pyx_FastGIL_Forget0(void) { - if (--__Pyx_FastGil_tcur_depth == 0) { - __Pyx_FastGil_tcur = NULL; - } -} - -static CYTHON_INLINE PyThreadState *__Pyx_FastGil_get_tcur(void) { - PyThreadState *tcur = __Pyx_FastGil_tcur; - if (tcur == NULL) { - tcur = __Pyx_FastGil_tcur = (PyThreadState*)PyThread_get_key_value(__Pyx_FastGil_autoTLSkey); - } - return tcur; -} - -static PyGILState_STATE __Pyx_FastGil_PyGILState_Ensure(void) { - int current; - PyThreadState *tcur; - __Pyx_FastGIL_Remember0(); - tcur = __Pyx_FastGil_get_tcur(); - if (tcur == NULL) { - // Uninitialized, need to initialize now. - return PyGILState_Ensure(); - } - current = tcur == __Pyx_PyThreadState_Current; - if (current == 0) { - PyEval_RestoreThread(tcur); - } - ++tcur->gilstate_counter; - return current ? PyGILState_LOCKED : PyGILState_UNLOCKED; -} - -static void __Pyx_FastGil_PyGILState_Release(PyGILState_STATE oldstate) { - PyThreadState *tcur = __Pyx_FastGil_get_tcur(); - __Pyx_FastGIL_Forget0(); - if (tcur->gilstate_counter == 1) { - // This is the last lock, do all the cleanup as well. - PyGILState_Release(oldstate); - } else { - --tcur->gilstate_counter; - if (oldstate == PyGILState_UNLOCKED) { - PyEval_SaveThread(); - } - } -} - -static void __Pyx_FastGilFuncInit0(void) { - /* Try to detect autoTLSkey. */ - int key; - void* this_thread_state = (void*) PyGILState_GetThisThreadState(); - for (key = 0; key < 100; key++) { - if (PyThread_get_key_value(key) == this_thread_state) { - __Pyx_FastGil_autoTLSkey = key; - break; - } - } - if (__Pyx_FastGil_autoTLSkey != -1) { - PyObject* capsule = NULL; - PyObject* abi_module = NULL; - __Pyx_PyGILState_Ensure = __Pyx_FastGil_PyGILState_Ensure; - __Pyx_PyGILState_Release = __Pyx_FastGil_PyGILState_Release; - __Pyx_FastGIL_Remember = __Pyx_FastGIL_Remember0; - __Pyx_FastGIL_Forget = __Pyx_FastGIL_Forget0; - capsule = PyCapsule_New(&__Pyx_FastGilFuncs, __Pyx_FastGIL_PyCapsule, NULL); - abi_module = PyImport_AddModule(__Pyx_FastGIL_ABI_module); - if (capsule && abi_module) { - PyObject_SetAttrString(abi_module, __Pyx_FastGIL_PyCapsuleName, capsule); - } - Py_XDECREF(capsule); - } -} - -#else - -static void __Pyx_FastGilFuncInit0(void) { - CYTHON_UNUSED void* force_use = (void*)&__Pyx_FetchCommonPointer; -} - -#endif - -static void __Pyx_FastGilFuncInit(void) { -#if PY_VERSION_HEX >= 0x02070000 - struct __Pyx_FastGilVtab* shared = (struct __Pyx_FastGilVtab*)PyCapsule_Import(__Pyx_FastGIL_PyCapsule, 1); -#else - struct __Pyx_FastGilVtab* shared = NULL; -#endif - if (shared) { - __Pyx_FastGilFuncs = *shared; - } else { - PyErr_Clear(); - __Pyx_FastGilFuncInit0(); - } -} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ObjectHandling.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ObjectHandling.c deleted file mode 100644 index 864b658f745..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/ObjectHandling.c +++ /dev/null @@ -1,2504 +0,0 @@ -/* - * General object operations and protocol implementations, - * including their specialisations for certain builtins. - * - * Optional optimisations for builtins are in Optimize.c. - * - * Required replacements of builtins are in Builtins.c. - */ - -/////////////// RaiseNoneIterError.proto /////////////// - -static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); - -/////////////// RaiseNoneIterError /////////////// - -static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -} - -/////////////// RaiseTooManyValuesToUnpack.proto /////////////// - -static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); - -/////////////// RaiseTooManyValuesToUnpack /////////////// - -static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { - PyErr_Format(PyExc_ValueError, - "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); -} - -/////////////// RaiseNeedMoreValuesToUnpack.proto /////////////// - -static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); - -/////////////// RaiseNeedMoreValuesToUnpack /////////////// - -static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { - PyErr_Format(PyExc_ValueError, - "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", - index, (index == 1) ? "" : "s"); -} - -/////////////// UnpackTupleError.proto /////////////// - -static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index); /*proto*/ - -/////////////// UnpackTupleError /////////////// -//@requires: RaiseNoneIterError -//@requires: RaiseNeedMoreValuesToUnpack -//@requires: RaiseTooManyValuesToUnpack - -static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { - if (t == Py_None) { - __Pyx_RaiseNoneNotIterableError(); - } else if (PyTuple_GET_SIZE(t) < index) { - __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t)); - } else { - __Pyx_RaiseTooManyValuesError(index); - } -} - -/////////////// UnpackItemEndCheck.proto /////////////// - -static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ - -/////////////// UnpackItemEndCheck /////////////// -//@requires: RaiseTooManyValuesToUnpack -//@requires: IterFinish - -static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { - if (unlikely(retval)) { - Py_DECREF(retval); - __Pyx_RaiseTooManyValuesError(expected); - return -1; - } else { - return __Pyx_IterFinish(); - } - return 0; -} - -/////////////// UnpackTuple2.proto /////////////// - -#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple) \ - (likely(is_tuple || PyTuple_Check(tuple)) ? \ - (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ? \ - __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) : \ - (__Pyx_UnpackTupleError(tuple, 2), -1)) : \ - __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple)) - -static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( - PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple); -static int __Pyx_unpack_tuple2_generic( - PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple); - -/////////////// UnpackTuple2 /////////////// -//@requires: UnpackItemEndCheck -//@requires: UnpackTupleError -//@requires: RaiseNeedMoreValuesToUnpack - -static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( - PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { - PyObject *value1 = NULL, *value2 = NULL; -#if CYTHON_COMPILING_IN_PYPY - value1 = PySequence_ITEM(tuple, 0); if (unlikely(!value1)) goto bad; - value2 = PySequence_ITEM(tuple, 1); if (unlikely(!value2)) goto bad; -#else - value1 = PyTuple_GET_ITEM(tuple, 0); Py_INCREF(value1); - value2 = PyTuple_GET_ITEM(tuple, 1); Py_INCREF(value2); -#endif - if (decref_tuple) { - Py_DECREF(tuple); - } - - *pvalue1 = value1; - *pvalue2 = value2; - return 0; -#if CYTHON_COMPILING_IN_PYPY -bad: - Py_XDECREF(value1); - Py_XDECREF(value2); - if (decref_tuple) { Py_XDECREF(tuple); } - return -1; -#endif -} - -static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, - int has_known_size, int decref_tuple) { - Py_ssize_t index; - PyObject *value1 = NULL, *value2 = NULL, *iter = NULL; - iternextfunc iternext; - - iter = PyObject_GetIter(tuple); - if (unlikely(!iter)) goto bad; - if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; } - - iternext = Py_TYPE(iter)->tp_iternext; - value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; } - value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; } - if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad; - - Py_DECREF(iter); - *pvalue1 = value1; - *pvalue2 = value2; - return 0; - -unpacking_failed: - if (!has_known_size && __Pyx_IterFinish() == 0) - __Pyx_RaiseNeedMoreValuesError(index); -bad: - Py_XDECREF(iter); - Py_XDECREF(value1); - Py_XDECREF(value2); - if (decref_tuple) { Py_XDECREF(tuple); } - return -1; -} - - -/////////////// IterNext.proto /////////////// - -#define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL) -static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *); /*proto*/ - -/////////////// IterNext /////////////// -//@requires: Exceptions.c::PyThreadStateGet -//@requires: Exceptions.c::PyErrFetchRestore - -static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) { - PyObject* exc_type; - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - exc_type = __Pyx_PyErr_Occurred(); - if (unlikely(exc_type)) { - if (!defval || unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) - return NULL; - __Pyx_PyErr_Clear(); - Py_INCREF(defval); - return defval; - } - if (defval) { - Py_INCREF(defval); - return defval; - } - __Pyx_PyErr_SetNone(PyExc_StopIteration); - return NULL; -} - -static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) { - PyErr_Format(PyExc_TypeError, - "%.200s object is not an iterator", Py_TYPE(iterator)->tp_name); -} - -// originally copied from Py3's builtin_next() -static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) { - PyObject* next; - // We always do a quick slot check because calling PyIter_Check() is so wasteful. - iternextfunc iternext = Py_TYPE(iterator)->tp_iternext; - if (likely(iternext)) { -#if CYTHON_USE_TYPE_SLOTS - next = iternext(iterator); - if (likely(next)) - return next; - #if PY_VERSION_HEX >= 0x02070000 - if (unlikely(iternext == &_PyObject_NextNotImplemented)) - return NULL; - #endif -#else - // Since the slot was set, assume that PyIter_Next() will likely succeed, and properly fail otherwise. - // Note: PyIter_Next() crashes in CPython if "tp_iternext" is NULL. - next = PyIter_Next(iterator); - if (likely(next)) - return next; -#endif - } else if (CYTHON_USE_TYPE_SLOTS || unlikely(!PyIter_Check(iterator))) { - // If CYTHON_USE_TYPE_SLOTS, then the slot was not set and we don't have an iterable. - // Otherwise, don't trust "tp_iternext" and rely on PyIter_Check(). - __Pyx_PyIter_Next_ErrorNoIterator(iterator); - return NULL; - } -#if !CYTHON_USE_TYPE_SLOTS - else { - // We have an iterator with an empty "tp_iternext", but didn't call next() on it yet. - next = PyIter_Next(iterator); - if (likely(next)) - return next; - } -#endif - return __Pyx_PyIter_Next2Default(defval); -} - -/////////////// IterFinish.proto /////////////// - -static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ - -/////////////// IterFinish /////////////// - -// When PyIter_Next(iter) has returned NULL in order to signal termination, -// this function does the right cleanup and returns 0 on success. If it -// detects an error that occurred in the iterator, it returns -1. - -static CYTHON_INLINE int __Pyx_IterFinish(void) { -#if CYTHON_FAST_THREAD_STATE - PyThreadState *tstate = __Pyx_PyThreadState_Current; - PyObject* exc_type = tstate->curexc_type; - if (unlikely(exc_type)) { - if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) { - PyObject *exc_value, *exc_tb; - exc_value = tstate->curexc_value; - exc_tb = tstate->curexc_traceback; - tstate->curexc_type = 0; - tstate->curexc_value = 0; - tstate->curexc_traceback = 0; - Py_DECREF(exc_type); - Py_XDECREF(exc_value); - Py_XDECREF(exc_tb); - return 0; - } else { - return -1; - } - } - return 0; -#else - if (unlikely(PyErr_Occurred())) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) { - PyErr_Clear(); - return 0; - } else { - return -1; - } - } - return 0; -#endif -} - - -/////////////// ObjectGetItem.proto /////////////// - -#if CYTHON_USE_TYPE_SLOTS -static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key);/*proto*/ -#else -#define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key) -#endif - -/////////////// ObjectGetItem /////////////// -// //@requires: GetItemInt - added in IndexNode as it uses templating. - -#if CYTHON_USE_TYPE_SLOTS -static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { - PyObject *runerr; - Py_ssize_t key_value; - PySequenceMethods *m = Py_TYPE(obj)->tp_as_sequence; - if (unlikely(!(m && m->sq_item))) { - PyErr_Format(PyExc_TypeError, "'%.200s' object is not subscriptable", Py_TYPE(obj)->tp_name); - return NULL; - } - - key_value = __Pyx_PyIndex_AsSsize_t(index); - if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) { - return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1); - } - - // Error handling code -- only manage OverflowError differently. - if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) { - PyErr_Clear(); - PyErr_Format(PyExc_IndexError, "cannot fit '%.200s' into an index-sized integer", Py_TYPE(index)->tp_name); - } - return NULL; -} - -static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { - PyMappingMethods *m = Py_TYPE(obj)->tp_as_mapping; - if (likely(m && m->mp_subscript)) { - return m->mp_subscript(obj, key); - } - return __Pyx_PyObject_GetIndex(obj, key); -} -#endif - - -/////////////// DictGetItem.proto /////////////// - -#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY -static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);/*proto*/ - -#define __Pyx_PyObject_Dict_GetItem(obj, name) \ - (likely(PyDict_CheckExact(obj)) ? \ - __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) - -#else -#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) -#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) -#endif - -/////////////// DictGetItem /////////////// - -#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY -static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { - PyObject *value; - value = PyDict_GetItemWithError(d, key); - if (unlikely(!value)) { - if (!PyErr_Occurred()) { - if (unlikely(PyTuple_Check(key))) { - // CPython interprets tuples as separate arguments => must wrap them in another tuple. - PyObject* args = PyTuple_Pack(1, key); - if (likely(args)) { - PyErr_SetObject(PyExc_KeyError, args); - Py_DECREF(args); - } - } else { - // Avoid tuple packing if possible. - PyErr_SetObject(PyExc_KeyError, key); - } - } - return NULL; - } - Py_INCREF(value); - return value; -} -#endif - -/////////////// GetItemInt.proto /////////////// - -#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ - __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \ - (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i)))) - -{{for type in ['List', 'Tuple']}} -#define __Pyx_GetItemInt_{{type}}(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ - __Pyx_GetItemInt_{{type}}_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ - (PyErr_SetString(PyExc_IndexError, "{{ type.lower() }} index out of range"), (PyObject*)NULL)) - -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_{{type}}_Fast(PyObject *o, Py_ssize_t i, - int wraparound, int boundscheck); -{{endfor}} - -static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, - int is_list, int wraparound, int boundscheck); - -/////////////// GetItemInt /////////////// - -static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { - PyObject *r; - if (!j) return NULL; - r = PyObject_GetItem(o, j); - Py_DECREF(j); - return r; -} - -{{for type in ['List', 'Tuple']}} -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_{{type}}_Fast(PyObject *o, Py_ssize_t i, - CYTHON_NCP_UNUSED int wraparound, - CYTHON_NCP_UNUSED int boundscheck) { -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - Py_ssize_t wrapped_i = i; - if (wraparound & unlikely(i < 0)) { - wrapped_i += Py{{type}}_GET_SIZE(o); - } - if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, Py{{type}}_GET_SIZE(o)))) { - PyObject *r = Py{{type}}_GET_ITEM(o, wrapped_i); - Py_INCREF(r); - return r; - } - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -#else - return PySequence_GetItem(o, i); -#endif -} -{{endfor}} - -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, - CYTHON_NCP_UNUSED int wraparound, - CYTHON_NCP_UNUSED int boundscheck) { -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS - if (is_list || PyList_CheckExact(o)) { - Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); - if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { - PyObject *r = PyList_GET_ITEM(o, n); - Py_INCREF(r); - return r; - } - } - else if (PyTuple_CheckExact(o)) { - Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); - if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, n); - Py_INCREF(r); - return r; - } - } else { - // inlined PySequence_GetItem() + special cased length overflow - PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; - if (likely(m && m->sq_item)) { - if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { - Py_ssize_t l = m->sq_length(o); - if (likely(l >= 0)) { - i += l; - } else { - // if length > max(Py_ssize_t), maybe the object can wrap around itself? - if (!PyErr_ExceptionMatches(PyExc_OverflowError)) - return NULL; - PyErr_Clear(); - } - } - return m->sq_item(o, i); - } - } -#else - if (is_list || PySequence_Check(o)) { - return PySequence_GetItem(o, i); - } -#endif - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -} - -/////////////// SetItemInt.proto /////////////// - -#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ - __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) : \ - (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \ - __Pyx_SetItemInt_Generic(o, to_py_func(i), v))) - -static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v); -static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, - int is_list, int wraparound, int boundscheck); - -/////////////// SetItemInt /////////////// - -static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { - int r; - if (!j) return -1; - r = PyObject_SetItem(o, j, v); - Py_DECREF(j); - return r; -} - -static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list, - CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) { -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS - if (is_list || PyList_CheckExact(o)) { - Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); - if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) { - PyObject* old = PyList_GET_ITEM(o, n); - Py_INCREF(v); - PyList_SET_ITEM(o, n, v); - Py_DECREF(old); - return 1; - } - } else { - // inlined PySequence_SetItem() + special cased length overflow - PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; - if (likely(m && m->sq_ass_item)) { - if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { - Py_ssize_t l = m->sq_length(o); - if (likely(l >= 0)) { - i += l; - } else { - // if length > max(Py_ssize_t), maybe the object can wrap around itself? - if (!PyErr_ExceptionMatches(PyExc_OverflowError)) - return -1; - PyErr_Clear(); - } - } - return m->sq_ass_item(o, i, v); - } - } -#else -#if CYTHON_COMPILING_IN_PYPY - if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) -#else - if (is_list || PySequence_Check(o)) -#endif - { - return PySequence_SetItem(o, i, v); - } -#endif - return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v); -} - - -/////////////// DelItemInt.proto /////////////// - -#define __Pyx_DelItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ - __Pyx_DelItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound) : \ - (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) : \ - __Pyx_DelItem_Generic(o, to_py_func(i)))) - -static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j); -static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i, - int is_list, int wraparound); - -/////////////// DelItemInt /////////////// - -static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j) { - int r; - if (!j) return -1; - r = PyObject_DelItem(o, j); - Py_DECREF(j); - return r; -} - -static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i, - CYTHON_UNUSED int is_list, CYTHON_NCP_UNUSED int wraparound) { -#if !CYTHON_USE_TYPE_SLOTS - if (is_list || PySequence_Check(o)) { - return PySequence_DelItem(o, i); - } -#else - // inlined PySequence_DelItem() + special cased length overflow - PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; - if (likely(m && m->sq_ass_item)) { - if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { - Py_ssize_t l = m->sq_length(o); - if (likely(l >= 0)) { - i += l; - } else { - // if length > max(Py_ssize_t), maybe the object can wrap around itself? - if (!PyErr_ExceptionMatches(PyExc_OverflowError)) - return -1; - PyErr_Clear(); - } - } - return m->sq_ass_item(o, i, (PyObject *)NULL); - } -#endif - return __Pyx_DelItem_Generic(o, PyInt_FromSsize_t(i)); -} - - -/////////////// SliceObject.proto /////////////// - -// we pass pointer addresses to show the C compiler what is NULL and what isn't -{{if access == 'Get'}} -static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( - PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, - PyObject** py_start, PyObject** py_stop, PyObject** py_slice, - int has_cstart, int has_cstop, int wraparound); -{{else}} -#define __Pyx_PyObject_DelSlice(obj, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) \ - __Pyx_PyObject_SetSlice(obj, (PyObject*)NULL, cstart, cstop, py_start, py_stop, py_slice, has_cstart, has_cstop, wraparound) - -// we pass pointer addresses to show the C compiler what is NULL and what isn't -static CYTHON_INLINE int __Pyx_PyObject_SetSlice( - PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, - PyObject** py_start, PyObject** py_stop, PyObject** py_slice, - int has_cstart, int has_cstop, int wraparound); -{{endif}} - -/////////////// SliceObject /////////////// - -{{if access == 'Get'}} -static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, -{{else}} -static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, -{{endif}} - Py_ssize_t cstart, Py_ssize_t cstop, - PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, - int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { -#if CYTHON_USE_TYPE_SLOTS - PyMappingMethods* mp; -#if PY_MAJOR_VERSION < 3 - PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; - if (likely(ms && ms->sq_{{if access == 'Set'}}ass_{{endif}}slice)) { - if (!has_cstart) { - if (_py_start && (*_py_start != Py_None)) { - cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); - if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; - } else - cstart = 0; - } - if (!has_cstop) { - if (_py_stop && (*_py_stop != Py_None)) { - cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); - if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; - } else - cstop = PY_SSIZE_T_MAX; - } - if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { - Py_ssize_t l = ms->sq_length(obj); - if (likely(l >= 0)) { - if (cstop < 0) { - cstop += l; - if (cstop < 0) cstop = 0; - } - if (cstart < 0) { - cstart += l; - if (cstart < 0) cstart = 0; - } - } else { - // if length > max(Py_ssize_t), maybe the object can wrap around itself? - if (!PyErr_ExceptionMatches(PyExc_OverflowError)) - goto bad; - PyErr_Clear(); - } - } -{{if access == 'Get'}} - return ms->sq_slice(obj, cstart, cstop); -{{else}} - return ms->sq_ass_slice(obj, cstart, cstop, value); -{{endif}} - } -#endif - - mp = Py_TYPE(obj)->tp_as_mapping; -{{if access == 'Get'}} - if (likely(mp && mp->mp_subscript)) -{{else}} - if (likely(mp && mp->mp_ass_subscript)) -{{endif}} -#endif - { - {{if access == 'Get'}}PyObject*{{else}}int{{endif}} result; - PyObject *py_slice, *py_start, *py_stop; - if (_py_slice) { - py_slice = *_py_slice; - } else { - PyObject* owned_start = NULL; - PyObject* owned_stop = NULL; - if (_py_start) { - py_start = *_py_start; - } else { - if (has_cstart) { - owned_start = py_start = PyInt_FromSsize_t(cstart); - if (unlikely(!py_start)) goto bad; - } else - py_start = Py_None; - } - if (_py_stop) { - py_stop = *_py_stop; - } else { - if (has_cstop) { - owned_stop = py_stop = PyInt_FromSsize_t(cstop); - if (unlikely(!py_stop)) { - Py_XDECREF(owned_start); - goto bad; - } - } else - py_stop = Py_None; - } - py_slice = PySlice_New(py_start, py_stop, Py_None); - Py_XDECREF(owned_start); - Py_XDECREF(owned_stop); - if (unlikely(!py_slice)) goto bad; - } -#if CYTHON_USE_TYPE_SLOTS -{{if access == 'Get'}} - result = mp->mp_subscript(obj, py_slice); -#else - result = PyObject_GetItem(obj, py_slice); -{{else}} - result = mp->mp_ass_subscript(obj, py_slice, value); -#else - result = value ? PyObject_SetItem(obj, py_slice, value) : PyObject_DelItem(obj, py_slice); -{{endif}} -#endif - if (!_py_slice) { - Py_DECREF(py_slice); - } - return result; - } - PyErr_Format(PyExc_TypeError, -{{if access == 'Get'}} - "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); -{{else}} - "'%.200s' object does not support slice %.10s", - Py_TYPE(obj)->tp_name, value ? "assignment" : "deletion"); -{{endif}} - -bad: - return {{if access == 'Get'}}NULL{{else}}-1{{endif}}; -} - - -/////////////// SliceTupleAndList.proto /////////////// - -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); -static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); -#else -#define __Pyx_PyList_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) -#define __Pyx_PyTuple_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) -#endif - -/////////////// SliceTupleAndList /////////////// - -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) { - Py_ssize_t start = *_start, stop = *_stop, length = *_length; - if (start < 0) { - start += length; - if (start < 0) - start = 0; - } - - if (stop < 0) - stop += length; - else if (stop > length) - stop = length; - - *_length = stop - start; - *_start = start; - *_stop = stop; -} - -static CYTHON_INLINE void __Pyx_copy_object_array(PyObject** CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { - PyObject *v; - Py_ssize_t i; - for (i = 0; i < length; i++) { - v = dest[i] = src[i]; - Py_INCREF(v); - } -} - -{{for type in ['List', 'Tuple']}} -static CYTHON_INLINE PyObject* __Pyx_Py{{type}}_GetSlice( - PyObject* src, Py_ssize_t start, Py_ssize_t stop) { - PyObject* dest; - Py_ssize_t length = Py{{type}}_GET_SIZE(src); - __Pyx_crop_slice(&start, &stop, &length); - if (unlikely(length <= 0)) - return Py{{type}}_New(0); - - dest = Py{{type}}_New(length); - if (unlikely(!dest)) - return NULL; - __Pyx_copy_object_array( - ((Py{{type}}Object*)src)->ob_item + start, - ((Py{{type}}Object*)dest)->ob_item, - length); - return dest; -} -{{endfor}} -#endif - - -/////////////// CalculateMetaclass.proto /////////////// - -static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases); - -/////////////// CalculateMetaclass /////////////// - -static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) { - Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases); - for (i=0; i < nbases; i++) { - PyTypeObject *tmptype; - PyObject *tmp = PyTuple_GET_ITEM(bases, i); - tmptype = Py_TYPE(tmp); -#if PY_MAJOR_VERSION < 3 - if (tmptype == &PyClass_Type) - continue; -#endif - if (!metaclass) { - metaclass = tmptype; - continue; - } - if (PyType_IsSubtype(metaclass, tmptype)) - continue; - if (PyType_IsSubtype(tmptype, metaclass)) { - metaclass = tmptype; - continue; - } - // else: - PyErr_SetString(PyExc_TypeError, - "metaclass conflict: " - "the metaclass of a derived class " - "must be a (non-strict) subclass " - "of the metaclasses of all its bases"); - return NULL; - } - if (!metaclass) { -#if PY_MAJOR_VERSION < 3 - metaclass = &PyClass_Type; -#else - metaclass = &PyType_Type; -#endif - } - // make owned reference - Py_INCREF((PyObject*) metaclass); - return (PyObject*) metaclass; -} - - -/////////////// FindInheritedMetaclass.proto /////////////// - -static PyObject *__Pyx_FindInheritedMetaclass(PyObject *bases); /*proto*/ - -/////////////// FindInheritedMetaclass /////////////// -//@requires: PyObjectGetAttrStr -//@requires: CalculateMetaclass - -static PyObject *__Pyx_FindInheritedMetaclass(PyObject *bases) { - PyObject *metaclass; - if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { - PyTypeObject *metatype; -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - PyObject *base = PyTuple_GET_ITEM(bases, 0); -#else - PyObject *base = PySequence_ITEM(bases, 0); -#endif -#if PY_MAJOR_VERSION < 3 - PyObject* basetype = __Pyx_PyObject_GetAttrStr(base, PYIDENT("__class__")); - if (basetype) { - metatype = (PyType_Check(basetype)) ? ((PyTypeObject*) basetype) : NULL; - } else { - PyErr_Clear(); - metatype = Py_TYPE(base); - basetype = (PyObject*) metatype; - Py_INCREF(basetype); - } -#else - metatype = Py_TYPE(base); -#endif - metaclass = __Pyx_CalculateMetaclass(metatype, bases); -#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS) - Py_DECREF(base); -#endif -#if PY_MAJOR_VERSION < 3 - Py_DECREF(basetype); -#endif - } else { - // no bases => use default metaclass -#if PY_MAJOR_VERSION < 3 - metaclass = (PyObject *) &PyClass_Type; -#else - metaclass = (PyObject *) &PyType_Type; -#endif - Py_INCREF(metaclass); - } - return metaclass; -} - -/////////////// Py3MetaclassGet.proto /////////////// - -static PyObject *__Pyx_Py3MetaclassGet(PyObject *bases, PyObject *mkw); /*proto*/ - -/////////////// Py3MetaclassGet /////////////// -//@requires: FindInheritedMetaclass -//@requires: CalculateMetaclass - -static PyObject *__Pyx_Py3MetaclassGet(PyObject *bases, PyObject *mkw) { - PyObject *metaclass = mkw ? __Pyx_PyDict_GetItemStr(mkw, PYIDENT("metaclass")) : NULL; - if (metaclass) { - Py_INCREF(metaclass); - if (PyDict_DelItem(mkw, PYIDENT("metaclass")) < 0) { - Py_DECREF(metaclass); - return NULL; - } - if (PyType_Check(metaclass)) { - PyObject* orig = metaclass; - metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); - Py_DECREF(orig); - } - return metaclass; - } - return __Pyx_FindInheritedMetaclass(bases); -} - -/////////////// CreateClass.proto /////////////// - -static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, - PyObject *qualname, PyObject *modname); /*proto*/ - -/////////////// CreateClass /////////////// -//@requires: FindInheritedMetaclass -//@requires: CalculateMetaclass - -static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name, - PyObject *qualname, PyObject *modname) { - PyObject *result; - PyObject *metaclass; - - if (PyDict_SetItem(dict, PYIDENT("__module__"), modname) < 0) - return NULL; - if (PyDict_SetItem(dict, PYIDENT("__qualname__"), qualname) < 0) - return NULL; - - /* Python2 __metaclass__ */ - metaclass = __Pyx_PyDict_GetItemStr(dict, PYIDENT("__metaclass__")); - if (metaclass) { - Py_INCREF(metaclass); - if (PyType_Check(metaclass)) { - PyObject* orig = metaclass; - metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); - Py_DECREF(orig); - } - } else { - metaclass = __Pyx_FindInheritedMetaclass(bases); - } - if (unlikely(!metaclass)) - return NULL; - result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL); - Py_DECREF(metaclass); - return result; -} - -/////////////// Py3ClassCreate.proto /////////////// - -static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname, - PyObject *mkw, PyObject *modname, PyObject *doc); /*proto*/ -static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict, - PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass); /*proto*/ - -/////////////// Py3ClassCreate /////////////// -//@requires: PyObjectGetAttrStr -//@requires: CalculateMetaclass - -static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, - PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) { - PyObject *ns; - if (metaclass) { - PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, PYIDENT("__prepare__")); - if (prep) { - PyObject *pargs = PyTuple_Pack(2, name, bases); - if (unlikely(!pargs)) { - Py_DECREF(prep); - return NULL; - } - ns = PyObject_Call(prep, pargs, mkw); - Py_DECREF(prep); - Py_DECREF(pargs); - } else { - if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError))) - return NULL; - PyErr_Clear(); - ns = PyDict_New(); - } - } else { - ns = PyDict_New(); - } - - if (unlikely(!ns)) - return NULL; - - /* Required here to emulate assignment order */ - if (unlikely(PyObject_SetItem(ns, PYIDENT("__module__"), modname) < 0)) goto bad; - if (unlikely(PyObject_SetItem(ns, PYIDENT("__qualname__"), qualname) < 0)) goto bad; - if (unlikely(doc && PyObject_SetItem(ns, PYIDENT("__doc__"), doc) < 0)) goto bad; - return ns; -bad: - Py_DECREF(ns); - return NULL; -} - -static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, - PyObject *dict, PyObject *mkw, - int calculate_metaclass, int allow_py2_metaclass) { - PyObject *result, *margs; - PyObject *owned_metaclass = NULL; - if (allow_py2_metaclass) { - /* honour Python2 __metaclass__ for backward compatibility */ - owned_metaclass = PyObject_GetItem(dict, PYIDENT("__metaclass__")); - if (owned_metaclass) { - metaclass = owned_metaclass; - } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) { - PyErr_Clear(); - } else { - return NULL; - } - } - if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) { - metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases); - Py_XDECREF(owned_metaclass); - if (unlikely(!metaclass)) - return NULL; - owned_metaclass = metaclass; - } - margs = PyTuple_Pack(3, name, bases, dict); - if (unlikely(!margs)) { - result = NULL; - } else { - result = PyObject_Call(metaclass, margs, mkw); - Py_DECREF(margs); - } - Py_XDECREF(owned_metaclass); - return result; -} - -/////////////// ExtTypeTest.proto /////////////// - -static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ - -/////////////// ExtTypeTest /////////////// - -static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { - if (unlikely(!type)) { - PyErr_SetString(PyExc_SystemError, "Missing type object"); - return 0; - } - if (likely(__Pyx_TypeCheck(obj, type))) - return 1; - PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", - Py_TYPE(obj)->tp_name, type->tp_name); - return 0; -} - -/////////////// CallableCheck.proto /////////////// - -#if CYTHON_USE_TYPE_SLOTS && PY_MAJOR_VERSION >= 3 -#define __Pyx_PyCallable_Check(obj) (Py_TYPE(obj)->tp_call != NULL) -#else -#define __Pyx_PyCallable_Check(obj) PyCallable_Check(obj) -#endif - -/////////////// PyDictContains.proto /////////////// - -static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) { - int result = PyDict_Contains(dict, item); - return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); -} - -/////////////// PySetContains.proto /////////////// - -static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq); /* proto */ - -/////////////// PySetContains /////////////// -//@requires: Builtins.c::pyfrozenset_new - -static int __Pyx_PySet_ContainsUnhashable(PyObject *set, PyObject *key) { - int result = -1; - if (PySet_Check(key) && PyErr_ExceptionMatches(PyExc_TypeError)) { - /* Convert key to frozenset */ - PyObject *tmpkey; - PyErr_Clear(); - tmpkey = __Pyx_PyFrozenSet_New(key); - if (tmpkey != NULL) { - result = PySet_Contains(set, tmpkey); - Py_DECREF(tmpkey); - } - } - return result; -} - -static CYTHON_INLINE int __Pyx_PySet_ContainsTF(PyObject* key, PyObject* set, int eq) { - int result = PySet_Contains(set, key); - - if (unlikely(result < 0)) { - result = __Pyx_PySet_ContainsUnhashable(set, key); - } - return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); -} - -/////////////// PySequenceContains.proto /////////////// - -static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) { - int result = PySequence_Contains(seq, item); - return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); -} - -/////////////// PyBoolOrNullFromLong.proto /////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) { - return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b); -} - -/////////////// GetBuiltinName.proto /////////////// - -static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ - -/////////////// GetBuiltinName /////////////// -//@requires: PyObjectGetAttrStr -//@substitute: naming - -static PyObject *__Pyx_GetBuiltinName(PyObject *name) { - PyObject* result = __Pyx_PyObject_GetAttrStr($builtins_cname, name); - if (unlikely(!result)) { - PyErr_Format(PyExc_NameError, -#if PY_MAJOR_VERSION >= 3 - "name '%U' is not defined", name); -#else - "name '%.200s' is not defined", PyString_AS_STRING(name)); -#endif - } - return result; -} - -/////////////// GetNameInClass.proto /////////////// - -#define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) -static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); /*proto*/ - -/////////////// GetNameInClass /////////////// -//@requires: PyObjectGetAttrStr -//@requires: GetModuleGlobalName -//@requires: Exceptions.c::PyThreadStateGet -//@requires: Exceptions.c::PyErrFetchRestore -//@requires: Exceptions.c::PyErrExceptionMatches - -static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) { - PyObject *result; - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) - return NULL; - __Pyx_PyErr_Clear(); - __Pyx_GetModuleGlobalNameUncached(result, name); - return result; -} - -static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { - PyObject *result; - result = __Pyx_PyObject_GetAttrStr(nmspace, name); - if (!result) { - result = __Pyx_GetGlobalNameAfterAttributeLookup(name); - } - return result; -} - - -/////////////// SetNameInClass.proto /////////////// - -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 -// Identifier names are always interned and have a pre-calculated hash value. -#define __Pyx_SetNameInClass(ns, name, value) \ - (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value)) -#elif CYTHON_COMPILING_IN_CPYTHON -#define __Pyx_SetNameInClass(ns, name, value) \ - (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value)) -#else -#define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value) -#endif - - -/////////////// GetModuleGlobalName.proto /////////////// -//@requires: PyDictVersioning -//@substitute: naming - -#if CYTHON_USE_DICT_VERSIONS -#define __Pyx_GetModuleGlobalName(var, name) { \ - static PY_UINT64_T __pyx_dict_version = 0; \ - static PyObject *__pyx_dict_cached_value = NULL; \ - (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION($moddict_cname))) ? \ - (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) : \ - __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value); \ -} -#define __Pyx_GetModuleGlobalNameUncached(var, name) { \ - PY_UINT64_T __pyx_dict_version; \ - PyObject *__pyx_dict_cached_value; \ - (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value); \ -} -static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); /*proto*/ -#else -#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) -#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) -static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); /*proto*/ -#endif - - -/////////////// GetModuleGlobalName /////////////// -//@requires: GetBuiltinName -//@substitute: naming - -#if CYTHON_USE_DICT_VERSIONS -static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) -#else -static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) -#endif -{ - PyObject *result; -#if !CYTHON_AVOID_BORROWED_REFS -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 - // Identifier names are always interned and have a pre-calculated hash value. - result = _PyDict_GetItem_KnownHash($moddict_cname, name, ((PyASCIIObject *) name)->hash); - __PYX_UPDATE_DICT_CACHE($moddict_cname, result, *dict_cached_value, *dict_version) - if (likely(result)) { - return __Pyx_NewRef(result); - } else if (unlikely(PyErr_Occurred())) { - return NULL; - } -#else - result = PyDict_GetItem($moddict_cname, name); - __PYX_UPDATE_DICT_CACHE($moddict_cname, result, *dict_cached_value, *dict_version) - if (likely(result)) { - return __Pyx_NewRef(result); - } -#endif -#else - result = PyObject_GetItem($moddict_cname, name); - __PYX_UPDATE_DICT_CACHE($moddict_cname, result, *dict_cached_value, *dict_version) - if (likely(result)) { - return __Pyx_NewRef(result); - } - PyErr_Clear(); -#endif - return __Pyx_GetBuiltinName(name); -} - -//////////////////// GetAttr.proto //////////////////// - -static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *); /*proto*/ - -//////////////////// GetAttr //////////////////// -//@requires: PyObjectGetAttrStr - -static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { -#if CYTHON_USE_TYPE_SLOTS -#if PY_MAJOR_VERSION >= 3 - if (likely(PyUnicode_Check(n))) -#else - if (likely(PyString_Check(n))) -#endif - return __Pyx_PyObject_GetAttrStr(o, n); -#endif - return PyObject_GetAttr(o, n); -} - -/////////////// PyObjectLookupSpecial.proto /////////////// -//@requires: PyObjectGetAttrStr - -#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS -static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) { - PyObject *res; - PyTypeObject *tp = Py_TYPE(obj); -#if PY_MAJOR_VERSION < 3 - if (unlikely(PyInstance_Check(obj))) - return __Pyx_PyObject_GetAttrStr(obj, attr_name); -#endif - // adapted from CPython's special_lookup() in ceval.c - res = _PyType_Lookup(tp, attr_name); - if (likely(res)) { - descrgetfunc f = Py_TYPE(res)->tp_descr_get; - if (!f) { - Py_INCREF(res); - } else { - res = f(res, obj, (PyObject *)tp); - } - } else { - PyErr_SetObject(PyExc_AttributeError, attr_name); - } - return res; -} -#else -#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n) -#endif - - -/////////////// PyObject_GenericGetAttrNoDict.proto /////////////// - -// Setting "tp_getattro" to anything but "PyObject_GenericGetAttr" disables fast method calls in Py3.7. -#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 -static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); -#else -// No-args macro to allow function pointer assignment. -#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr -#endif - -/////////////// PyObject_GenericGetAttrNoDict /////////////// - -#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 - -static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { - PyErr_Format(PyExc_AttributeError, -#if PY_MAJOR_VERSION >= 3 - "'%.50s' object has no attribute '%U'", - tp->tp_name, attr_name); -#else - "'%.50s' object has no attribute '%.400s'", - tp->tp_name, PyString_AS_STRING(attr_name)); -#endif - return NULL; -} - -static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) { - // Copied and adapted from _PyObject_GenericGetAttrWithDict() in CPython 2.6/3.7. - // To be used in the "tp_getattro" slot of extension types that have no instance dict and cannot be subclassed. - PyObject *descr; - PyTypeObject *tp = Py_TYPE(obj); - - if (unlikely(!PyString_Check(attr_name))) { - return PyObject_GenericGetAttr(obj, attr_name); - } - - assert(!tp->tp_dictoffset); - descr = _PyType_Lookup(tp, attr_name); - if (unlikely(!descr)) { - return __Pyx_RaiseGenericGetAttributeError(tp, attr_name); - } - - Py_INCREF(descr); - - #if PY_MAJOR_VERSION < 3 - if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS))) - #endif - { - descrgetfunc f = Py_TYPE(descr)->tp_descr_get; - // Optimise for the non-descriptor case because it is faster. - if (unlikely(f)) { - PyObject *res = f(descr, obj, (PyObject *)tp); - Py_DECREF(descr); - return res; - } - } - return descr; -} -#endif - - -/////////////// PyObject_GenericGetAttr.proto /////////////// - -// Setting "tp_getattro" to anything but "PyObject_GenericGetAttr" disables fast method calls in Py3.7. -#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 -static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name); -#else -// No-args macro to allow function pointer assignment. -#define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr -#endif - -/////////////// PyObject_GenericGetAttr /////////////// -//@requires: PyObject_GenericGetAttrNoDict - -#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 -static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { - if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { - return PyObject_GenericGetAttr(obj, attr_name); - } - return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name); -} -#endif - - -/////////////// PyObjectGetAttrStrNoError.proto /////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);/*proto*/ - -/////////////// PyObjectGetAttrStrNoError /////////////// -//@requires: PyObjectGetAttrStr -//@requires: Exceptions.c::PyThreadStateGet -//@requires: Exceptions.c::PyErrFetchRestore -//@requires: Exceptions.c::PyErrExceptionMatches - -static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { - __Pyx_PyThreadState_declare - __Pyx_PyThreadState_assign - if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) - __Pyx_PyErr_Clear(); -} - -static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { - PyObject *result; -#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 - // _PyObject_GenericGetAttrWithDict() in CPython 3.7+ can avoid raising the AttributeError. - // See https://bugs.python.org/issue32544 - PyTypeObject* tp = Py_TYPE(obj); - if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { - return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); - } -#endif - result = __Pyx_PyObject_GetAttrStr(obj, attr_name); - if (unlikely(!result)) { - __Pyx_PyObject_GetAttrStr_ClearAttributeError(); - } - return result; -} - - -/////////////// PyObjectGetAttrStr.proto /////////////// - -#if CYTHON_USE_TYPE_SLOTS -static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);/*proto*/ -#else -#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) -#endif - -/////////////// PyObjectGetAttrStr /////////////// - -#if CYTHON_USE_TYPE_SLOTS -static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { - PyTypeObject* tp = Py_TYPE(obj); - if (likely(tp->tp_getattro)) - return tp->tp_getattro(obj, attr_name); -#if PY_MAJOR_VERSION < 3 - if (likely(tp->tp_getattr)) - return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); -#endif - return PyObject_GetAttr(obj, attr_name); -} -#endif - - -/////////////// PyObjectSetAttrStr.proto /////////////// - -#if CYTHON_USE_TYPE_SLOTS -#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL) -static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);/*proto*/ -#else -#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n) -#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) -#endif - -/////////////// PyObjectSetAttrStr /////////////// - -#if CYTHON_USE_TYPE_SLOTS -static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) { - PyTypeObject* tp = Py_TYPE(obj); - if (likely(tp->tp_setattro)) - return tp->tp_setattro(obj, attr_name, value); -#if PY_MAJOR_VERSION < 3 - if (likely(tp->tp_setattr)) - return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value); -#endif - return PyObject_SetAttr(obj, attr_name, value); -} -#endif - - -/////////////// PyObjectGetMethod.proto /////////////// - -static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);/*proto*/ - -/////////////// PyObjectGetMethod /////////////// -//@requires: PyObjectGetAttrStr - -static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { - PyObject *attr; -#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP - // Copied from _PyObject_GetMethod() in CPython 3.7 - PyTypeObject *tp = Py_TYPE(obj); - PyObject *descr; - descrgetfunc f = NULL; - PyObject **dictptr, *dict; - int meth_found = 0; - - assert (*method == NULL); - - if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { - attr = __Pyx_PyObject_GetAttrStr(obj, name); - goto try_unpack; - } - if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { - return 0; - } - - descr = _PyType_Lookup(tp, name); - if (likely(descr != NULL)) { - Py_INCREF(descr); - // Repeating the condition below accommodates for MSVC's inability to test macros inside of macro expansions. -#if PY_MAJOR_VERSION >= 3 - #ifdef __Pyx_CyFunction_USED - if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) - #else - if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type))) - #endif -#else - // "PyMethodDescr_Type" is not part of the C-API in Py2. - #ifdef __Pyx_CyFunction_USED - if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) - #else - if (likely(PyFunction_Check(descr))) - #endif -#endif - { - meth_found = 1; - } else { - f = Py_TYPE(descr)->tp_descr_get; - if (f != NULL && PyDescr_IsData(descr)) { - attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); - Py_DECREF(descr); - goto try_unpack; - } - } - } - - dictptr = _PyObject_GetDictPtr(obj); - if (dictptr != NULL && (dict = *dictptr) != NULL) { - Py_INCREF(dict); - attr = __Pyx_PyDict_GetItemStr(dict, name); - if (attr != NULL) { - Py_INCREF(attr); - Py_DECREF(dict); - Py_XDECREF(descr); - goto try_unpack; - } - Py_DECREF(dict); - } - - if (meth_found) { - *method = descr; - return 1; - } - - if (f != NULL) { - attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); - Py_DECREF(descr); - goto try_unpack; - } - - if (descr != NULL) { - *method = descr; - return 0; - } - - PyErr_Format(PyExc_AttributeError, -#if PY_MAJOR_VERSION >= 3 - "'%.50s' object has no attribute '%U'", - tp->tp_name, name); -#else - "'%.50s' object has no attribute '%.400s'", - tp->tp_name, PyString_AS_STRING(name)); -#endif - return 0; - -// Generic fallback implementation using normal attribute lookup. -#else - attr = __Pyx_PyObject_GetAttrStr(obj, name); - goto try_unpack; -#endif - -try_unpack: -#if CYTHON_UNPACK_METHODS - // Even if we failed to avoid creating a bound method object, it's still worth unpacking it now, if possible. - if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { - PyObject *function = PyMethod_GET_FUNCTION(attr); - Py_INCREF(function); - Py_DECREF(attr); - *method = function; - return 1; - } -#endif - *method = attr; - return 0; -} - - -/////////////// UnpackUnboundCMethod.proto /////////////// - -typedef struct { - PyObject *type; - PyObject **method_name; - // "func" is set on first access (direct C function pointer) - PyCFunction func; - // "method" is set on first access (fallback) - PyObject *method; - int flag; -} __Pyx_CachedCFunction; - -/////////////// UnpackUnboundCMethod /////////////// -//@requires: PyObjectGetAttrStr - -static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { - PyObject *method; - method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); - if (unlikely(!method)) - return -1; - target->method = method; -#if CYTHON_COMPILING_IN_CPYTHON - #if PY_MAJOR_VERSION >= 3 - // method dscriptor type isn't exported in Py2.x, cannot easily check the type there - if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type))) - #endif - { - PyMethodDescrObject *descr = (PyMethodDescrObject*) method; - target->func = descr->d_method->ml_meth; - target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); - } -#endif - return 0; -} - - -/////////////// CallUnboundCMethod0.proto /////////////// -//@substitute: naming - -static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self); /*proto*/ -#if CYTHON_COMPILING_IN_CPYTHON -// FASTCALL methods receive "&empty_tuple" as simple "PyObject[0]*" -#define __Pyx_CallUnboundCMethod0(cfunc, self) \ - (likely((cfunc)->func) ? \ - (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) : \ - (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ? \ - (PY_VERSION_HEX >= 0x030700A0 ? \ - (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &$empty_tuple, 0) : \ - (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &$empty_tuple, 0, NULL)) : \ - (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ? \ - (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &$empty_tuple, 0, NULL) : \ - (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, $empty_tuple, NULL)) : \ - ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, $empty_tuple) : \ - __Pyx__CallUnboundCMethod0(cfunc, self)))))) : \ - __Pyx__CallUnboundCMethod0(cfunc, self)) -#else -#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self) -#endif - -/////////////// CallUnboundCMethod0 /////////////// -//@requires: UnpackUnboundCMethod -//@requires: PyObjectCall - -static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { - PyObject *args, *result = NULL; - if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; -#if CYTHON_ASSUME_SAFE_MACROS - args = PyTuple_New(1); - if (unlikely(!args)) goto bad; - Py_INCREF(self); - PyTuple_SET_ITEM(args, 0, self); -#else - args = PyTuple_Pack(1, self); - if (unlikely(!args)) goto bad; -#endif - result = __Pyx_PyObject_Call(cfunc->method, args, NULL); - Py_DECREF(args); -bad: - return result; -} - - -/////////////// CallUnboundCMethod1.proto /////////////// - -static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);/*proto*/ - -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg);/*proto*/ -#else -#define __Pyx_CallUnboundCMethod1(cfunc, self, arg) __Pyx__CallUnboundCMethod1(cfunc, self, arg) -#endif - -/////////////// CallUnboundCMethod1 /////////////// -//@requires: UnpackUnboundCMethod -//@requires: PyObjectCall - -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { - if (likely(cfunc->func)) { - int flag = cfunc->flag; - // Not using #ifdefs for PY_VERSION_HEX to avoid C compiler warnings about unused functions. - if (flag == METH_O) { - return (*(cfunc->func))(self, arg); - } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) { - if (PY_VERSION_HEX >= 0x030700A0) { - return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1); - } else { - return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); - } - } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) { - return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); - } - } - return __Pyx__CallUnboundCMethod1(cfunc, self, arg); -} -#endif - -static PyObject* __Pyx__CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg){ - PyObject *args, *result = NULL; - if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; -#if CYTHON_COMPILING_IN_CPYTHON - if (cfunc->func && (cfunc->flag & METH_VARARGS)) { - args = PyTuple_New(1); - if (unlikely(!args)) goto bad; - Py_INCREF(arg); - PyTuple_SET_ITEM(args, 0, arg); - if (cfunc->flag & METH_KEYWORDS) - result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); - else - result = (*cfunc->func)(self, args); - } else { - args = PyTuple_New(2); - if (unlikely(!args)) goto bad; - Py_INCREF(self); - PyTuple_SET_ITEM(args, 0, self); - Py_INCREF(arg); - PyTuple_SET_ITEM(args, 1, arg); - result = __Pyx_PyObject_Call(cfunc->method, args, NULL); - } -#else - args = PyTuple_Pack(2, self, arg); - if (unlikely(!args)) goto bad; - result = __Pyx_PyObject_Call(cfunc->method, args, NULL); -#endif -bad: - Py_XDECREF(args); - return result; -} - - -/////////////// CallUnboundCMethod2.proto /////////////// - -static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2); /*proto*/ - -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 -static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2); /*proto*/ -#else -#define __Pyx_CallUnboundCMethod2(cfunc, self, arg1, arg2) __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2) -#endif - -/////////////// CallUnboundCMethod2 /////////////// -//@requires: UnpackUnboundCMethod -//@requires: PyObjectCall - -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030600B1 -static CYTHON_INLINE PyObject *__Pyx_CallUnboundCMethod2(__Pyx_CachedCFunction *cfunc, PyObject *self, PyObject *arg1, PyObject *arg2) { - if (likely(cfunc->func)) { - PyObject *args[2] = {arg1, arg2}; - if (cfunc->flag == METH_FASTCALL) { - #if PY_VERSION_HEX >= 0x030700A0 - return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, args, 2); - #else - return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); - #endif - } - #if PY_VERSION_HEX >= 0x030700A0 - if (cfunc->flag == (METH_FASTCALL | METH_KEYWORDS)) - return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, 2, NULL); - #endif - } - return __Pyx__CallUnboundCMethod2(cfunc, self, arg1, arg2); -} -#endif - -static PyObject* __Pyx__CallUnboundCMethod2(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg1, PyObject* arg2){ - PyObject *args, *result = NULL; - if (unlikely(!cfunc->func && !cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; -#if CYTHON_COMPILING_IN_CPYTHON - if (cfunc->func && (cfunc->flag & METH_VARARGS)) { - args = PyTuple_New(2); - if (unlikely(!args)) goto bad; - Py_INCREF(arg1); - PyTuple_SET_ITEM(args, 0, arg1); - Py_INCREF(arg2); - PyTuple_SET_ITEM(args, 1, arg2); - if (cfunc->flag & METH_KEYWORDS) - result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); - else - result = (*cfunc->func)(self, args); - } else { - args = PyTuple_New(3); - if (unlikely(!args)) goto bad; - Py_INCREF(self); - PyTuple_SET_ITEM(args, 0, self); - Py_INCREF(arg1); - PyTuple_SET_ITEM(args, 1, arg1); - Py_INCREF(arg2); - PyTuple_SET_ITEM(args, 2, arg2); - result = __Pyx_PyObject_Call(cfunc->method, args, NULL); - } -#else - args = PyTuple_Pack(3, self, arg1, arg2); - if (unlikely(!args)) goto bad; - result = __Pyx_PyObject_Call(cfunc->method, args, NULL); -#endif -bad: - Py_XDECREF(args); - return result; -} - - -/////////////// PyObjectCallMethod0.proto /////////////// - -static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); /*proto*/ - -/////////////// PyObjectCallMethod0 /////////////// -//@requires: PyObjectGetMethod -//@requires: PyObjectCallOneArg -//@requires: PyObjectCallNoArg - -static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { - PyObject *method = NULL, *result = NULL; - int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); - if (likely(is_method)) { - result = __Pyx_PyObject_CallOneArg(method, obj); - Py_DECREF(method); - return result; - } - if (unlikely(!method)) goto bad; - result = __Pyx_PyObject_CallNoArg(method); - Py_DECREF(method); -bad: - return result; -} - - -/////////////// PyObjectCallMethod1.proto /////////////// - -static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg); /*proto*/ - -/////////////// PyObjectCallMethod1 /////////////// -//@requires: PyObjectGetMethod -//@requires: PyObjectCallOneArg -//@requires: PyObjectCall2Args - -static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) { - // Separate function to avoid excessive inlining. - PyObject *result = __Pyx_PyObject_CallOneArg(method, arg); - Py_DECREF(method); - return result; -} - -static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) { - PyObject *method = NULL, *result; - int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); - if (likely(is_method)) { - result = __Pyx_PyObject_Call2Args(method, obj, arg); - Py_DECREF(method); - return result; - } - if (unlikely(!method)) return NULL; - return __Pyx__PyObject_CallMethod1(method, arg); -} - - -/////////////// PyObjectCallMethod2.proto /////////////// - -static PyObject* __Pyx_PyObject_CallMethod2(PyObject* obj, PyObject* method_name, PyObject* arg1, PyObject* arg2); /*proto*/ - -/////////////// PyObjectCallMethod2 /////////////// -//@requires: PyObjectCall -//@requires: PyFunctionFastCall -//@requires: PyCFunctionFastCall -//@requires: PyObjectCall2Args - -static PyObject* __Pyx_PyObject_Call3Args(PyObject* function, PyObject* arg1, PyObject* arg2, PyObject* arg3) { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(function)) { - PyObject *args[3] = {arg1, arg2, arg3}; - return __Pyx_PyFunction_FastCall(function, args, 3); - } - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(function)) { - PyObject *args[3] = {arg1, arg2, arg3}; - return __Pyx_PyFunction_FastCall(function, args, 3); - } - #endif - - args = PyTuple_New(3); - if (unlikely(!args)) goto done; - Py_INCREF(arg1); - PyTuple_SET_ITEM(args, 0, arg1); - Py_INCREF(arg2); - PyTuple_SET_ITEM(args, 1, arg2); - Py_INCREF(arg3); - PyTuple_SET_ITEM(args, 2, arg3); - - result = __Pyx_PyObject_Call(function, args, NULL); - Py_DECREF(args); - return result; -} - -static PyObject* __Pyx_PyObject_CallMethod2(PyObject* obj, PyObject* method_name, PyObject* arg1, PyObject* arg2) { - PyObject *args, *method = NULL, *result = NULL; - int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); - if (likely(is_method)) { - result = __Pyx_PyObject_Call3Args(method, obj, arg1, arg2); - Py_DECREF(method); - return result; - } - if (unlikely(!method)) return NULL; - result = __Pyx_PyObject_Call2Args(method, arg1, arg2); - Py_DECREF(method); - return result; -} - - -/////////////// tp_new.proto /////////////// - -#define __Pyx_tp_new(type_obj, args) __Pyx_tp_new_kwargs(type_obj, args, NULL) -static CYTHON_INLINE PyObject* __Pyx_tp_new_kwargs(PyObject* type_obj, PyObject* args, PyObject* kwargs) { - return (PyObject*) (((PyTypeObject*)type_obj)->tp_new((PyTypeObject*)type_obj, args, kwargs)); -} - - -/////////////// PyObjectCall.proto /////////////// - -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/ -#else -#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) -#endif - -/////////////// PyObjectCall /////////////// - -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; - ternaryfunc call = Py_TYPE(func)->tp_call; - - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) - return NULL; - result = (*call)(func, arg, kw); - Py_LeaveRecursiveCall(); - if (unlikely(!result) && unlikely(!PyErr_Occurred())) { - PyErr_SetString( - PyExc_SystemError, - "NULL result without error in PyObject_Call"); - } - return result; -} -#endif - - -/////////////// PyObjectCallMethO.proto /////////////// - -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); /*proto*/ -#endif - -/////////////// PyObjectCallMethO /////////////// - -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { - PyObject *self, *result; - PyCFunction cfunc; - cfunc = PyCFunction_GET_FUNCTION(func); - self = PyCFunction_GET_SELF(func); - - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) - return NULL; - result = cfunc(self, arg); - Py_LeaveRecursiveCall(); - if (unlikely(!result) && unlikely(!PyErr_Occurred())) { - PyErr_SetString( - PyExc_SystemError, - "NULL result without error in PyObject_Call"); - } - return result; -} -#endif - - -/////////////// PyFunctionFastCall.proto /////////////// - -#if CYTHON_FAST_PYCALL -#define __Pyx_PyFunction_FastCall(func, args, nargs) \ - __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) - -// let's assume that the non-public C-API function might still change during the 3.6 beta phase -#if 1 || PY_VERSION_HEX < 0x030600B1 -static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); -#else -#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) -#endif - -// Backport from Python 3 -// Assert a build-time dependency, as an expression. -// Your compile will fail if the condition isn't true, or can't be evaluated -// by the compiler. This can be used in an expression: its value is 0. -// Example: -// #define foo_to_char(foo) \ -// ((char *)(foo) \ -// + Py_BUILD_ASSERT_EXPR(offsetof(struct foo, string) == 0)) -// -// Written by Rusty Russell, public domain, http://ccodearchive.net/ -#define __Pyx_BUILD_ASSERT_EXPR(cond) \ - (sizeof(char [1 - 2*!(cond)]) - 1) - -#ifndef Py_MEMBER_SIZE -// Get the size of a structure member in bytes -#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) -#endif - -#if CYTHON_FAST_PYCALL - // Initialised by module init code. - static size_t __pyx_pyframe_localsplus_offset = 0; - - #include "frameobject.h" -#if PY_VERSION_HEX >= 0x030b00a6 - #ifndef Py_BUILD_CORE - #define Py_BUILD_CORE 1 - #endif - #include "internal/pycore_frame.h" -#endif - - // This is the long runtime version of - // #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) - // offsetof(PyFrameObject, f_localsplus) differs between regular C-Python and Stackless Python. - // Therefore the offset is computed at run time from PyFrame_type.tp_basicsize. That is feasible, - // because f_localsplus is the last field of PyFrameObject (checked by Py_BUILD_ASSERT_EXPR below). - #define __Pxy_PyFrame_Initialize_Offsets() \ - ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)), \ - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame) \ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -#endif // CYTHON_FAST_PYCALL -#endif - - -/////////////// PyFunctionFastCall /////////////// -// copied from CPython 3.6 ceval.c - -#if CYTHON_FAST_PYCALL - -static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, - PyObject *globals) { - PyFrameObject *f; - PyThreadState *tstate = __Pyx_PyThreadState_Current; - PyObject **fastlocals; - Py_ssize_t i; - PyObject *result; - - assert(globals != NULL); - /* XXX Perhaps we should create a specialized - PyFrame_New() that doesn't take locals, but does - take builtins without sanity checking them. - */ - assert(tstate != NULL); - f = PyFrame_New(tstate, co, globals, NULL); - if (f == NULL) { - return NULL; - } - - fastlocals = __Pyx_PyFrame_GetLocalsplus(f); - - for (i = 0; i < na; i++) { - Py_INCREF(*args); - fastlocals[i] = *args++; - } - result = PyEval_EvalFrameEx(f,0); - - ++tstate->recursion_depth; - Py_DECREF(f); - --tstate->recursion_depth; - - return result; -} - - -#if 1 || PY_VERSION_HEX < 0x030600B1 -static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { - PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); - PyObject *globals = PyFunction_GET_GLOBALS(func); - PyObject *argdefs = PyFunction_GET_DEFAULTS(func); - PyObject *closure; -#if PY_MAJOR_VERSION >= 3 - PyObject *kwdefs; - //#if PY_VERSION_HEX >= 0x03050000 - //PyObject *name, *qualname; - //#endif -#endif - PyObject *kwtuple, **k; - PyObject **d; - Py_ssize_t nd; - Py_ssize_t nk; - PyObject *result; - - assert(kwargs == NULL || PyDict_Check(kwargs)); - nk = kwargs ? PyDict_Size(kwargs) : 0; - - if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { - return NULL; - } - - if ( -#if PY_MAJOR_VERSION >= 3 - co->co_kwonlyargcount == 0 && -#endif - likely(kwargs == NULL || nk == 0) && - co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { - /* Fast paths */ - if (argdefs == NULL && co->co_argcount == nargs) { - result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); - goto done; - } - else if (nargs == 0 && argdefs != NULL - && co->co_argcount == Py_SIZE(argdefs)) { - /* function called with no arguments, but all parameters have - a default value: use default values as arguments .*/ - args = &PyTuple_GET_ITEM(argdefs, 0); - result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); - goto done; - } - } - - if (kwargs != NULL) { - Py_ssize_t pos, i; - kwtuple = PyTuple_New(2 * nk); - if (kwtuple == NULL) { - result = NULL; - goto done; - } - - k = &PyTuple_GET_ITEM(kwtuple, 0); - pos = i = 0; - while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { - Py_INCREF(k[i]); - Py_INCREF(k[i+1]); - i += 2; - } - nk = i / 2; - } - else { - kwtuple = NULL; - k = NULL; - } - - closure = PyFunction_GET_CLOSURE(func); -#if PY_MAJOR_VERSION >= 3 - kwdefs = PyFunction_GET_KW_DEFAULTS(func); - //#if PY_VERSION_HEX >= 0x03050000 - //name = ((PyFunctionObject *)func) -> func_name; - //qualname = ((PyFunctionObject *)func) -> func_qualname; - //#endif -#endif - - if (argdefs != NULL) { - d = &PyTuple_GET_ITEM(argdefs, 0); - nd = Py_SIZE(argdefs); - } - else { - d = NULL; - nd = 0; - } - - //#if PY_VERSION_HEX >= 0x03050000 - //return _PyEval_EvalCodeWithName((PyObject*)co, globals, (PyObject *)NULL, - // args, nargs, - // NULL, 0, - // d, nd, kwdefs, - // closure, name, qualname); - //#elif PY_MAJOR_VERSION >= 3 -#if PY_MAJOR_VERSION >= 3 - result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, - args, (int)nargs, - k, (int)nk, - d, (int)nd, kwdefs, closure); -#else - result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, - args, (int)nargs, - k, (int)nk, - d, (int)nd, closure); -#endif - Py_XDECREF(kwtuple); - -done: - Py_LeaveRecursiveCall(); - return result; -} -#endif /* CPython < 3.6 */ -#endif /* CYTHON_FAST_PYCALL */ - - -/////////////// PyCFunctionFastCall.proto /////////////// - -#if CYTHON_FAST_PYCCALL -static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); -#else -#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) -#endif - -/////////////// PyCFunctionFastCall /////////////// - -#if CYTHON_FAST_PYCCALL -static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { - PyCFunctionObject *func = (PyCFunctionObject*)func_obj; - PyCFunction meth = PyCFunction_GET_FUNCTION(func); - PyObject *self = PyCFunction_GET_SELF(func); - int flags = PyCFunction_GET_FLAGS(func); - - assert(PyCFunction_Check(func)); - assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); - assert(nargs >= 0); - assert(nargs == 0 || args != NULL); - - /* _PyCFunction_FastCallDict() must not be called with an exception set, - because it may clear it (directly or indirectly) and so the - caller loses its exception */ - assert(!PyErr_Occurred()); - - if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { - return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); - } else { - return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); - } -} -#endif /* CYTHON_FAST_PYCCALL */ - - -/////////////// PyObjectCall2Args.proto /////////////// - -static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /*proto*/ - -/////////////// PyObjectCall2Args /////////////// -//@requires: PyObjectCall -//@requires: PyFunctionFastCall -//@requires: PyCFunctionFastCall - -static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { - PyObject *args, *result = NULL; - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(function)) { - PyObject *args[2] = {arg1, arg2}; - return __Pyx_PyFunction_FastCall(function, args, 2); - } - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(function)) { - PyObject *args[2] = {arg1, arg2}; - return __Pyx_PyCFunction_FastCall(function, args, 2); - } - #endif - - args = PyTuple_New(2); - if (unlikely(!args)) goto done; - Py_INCREF(arg1); - PyTuple_SET_ITEM(args, 0, arg1); - Py_INCREF(arg2); - PyTuple_SET_ITEM(args, 1, arg2); - - Py_INCREF(function); - result = __Pyx_PyObject_Call(function, args, NULL); - Py_DECREF(args); - Py_DECREF(function); -done: - return result; -} - - -/////////////// PyObjectCallOneArg.proto /////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /*proto*/ - -/////////////// PyObjectCallOneArg /////////////// -//@requires: PyObjectCallMethO -//@requires: PyObjectCall -//@requires: PyFunctionFastCall -//@requires: PyCFunctionFastCall - -#if CYTHON_COMPILING_IN_CPYTHON -static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { - PyObject *result; - PyObject *args = PyTuple_New(1); - if (unlikely(!args)) return NULL; - Py_INCREF(arg); - PyTuple_SET_ITEM(args, 0, arg); - result = __Pyx_PyObject_Call(func, args, NULL); - Py_DECREF(args); - return result; -} - -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { -#if CYTHON_FAST_PYCALL - if (PyFunction_Check(func)) { - return __Pyx_PyFunction_FastCall(func, &arg, 1); - } -#endif - if (likely(PyCFunction_Check(func))) { - if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { - // fast and simple case that we are optimising for - return __Pyx_PyObject_CallMethO(func, arg); -#if CYTHON_FAST_PYCCALL - } else if (__Pyx_PyFastCFunction_Check(func)) { - return __Pyx_PyCFunction_FastCall(func, &arg, 1); -#endif - } - } - return __Pyx__PyObject_CallOneArg(func, arg); -} -#else -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { - PyObject *result; - PyObject *args = PyTuple_Pack(1, arg); - if (unlikely(!args)) return NULL; - result = __Pyx_PyObject_Call(func, args, NULL); - Py_DECREF(args); - return result; -} -#endif - - -/////////////// PyObjectCallNoArg.proto /////////////// -//@requires: PyObjectCall -//@substitute: naming - -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); /*proto*/ -#else -#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, $empty_tuple, NULL) -#endif - -/////////////// PyObjectCallNoArg /////////////// -//@requires: PyObjectCallMethO -//@requires: PyObjectCall -//@requires: PyFunctionFastCall -//@substitute: naming - -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { -#if CYTHON_FAST_PYCALL - if (PyFunction_Check(func)) { - return __Pyx_PyFunction_FastCall(func, NULL, 0); - } -#endif -#ifdef __Pyx_CyFunction_USED - if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) -#else - if (likely(PyCFunction_Check(func))) -#endif - { - if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { - // fast and simple case that we are optimising for - return __Pyx_PyObject_CallMethO(func, NULL); - } - } - return __Pyx_PyObject_Call(func, $empty_tuple, NULL); -} -#endif - - -/////////////// MatrixMultiply.proto /////////////// - -#if PY_VERSION_HEX >= 0x03050000 - #define __Pyx_PyNumber_MatrixMultiply(x,y) PyNumber_MatrixMultiply(x,y) - #define __Pyx_PyNumber_InPlaceMatrixMultiply(x,y) PyNumber_InPlaceMatrixMultiply(x,y) -#else -#define __Pyx_PyNumber_MatrixMultiply(x,y) __Pyx__PyNumber_MatrixMultiply(x, y, "@") -static PyObject* __Pyx__PyNumber_MatrixMultiply(PyObject* x, PyObject* y, const char* op_name); -static PyObject* __Pyx_PyNumber_InPlaceMatrixMultiply(PyObject* x, PyObject* y); -#endif - -/////////////// MatrixMultiply /////////////// -//@requires: PyObjectGetAttrStr -//@requires: PyObjectCallOneArg -//@requires: PyFunctionFastCall -//@requires: PyCFunctionFastCall - -#if PY_VERSION_HEX < 0x03050000 -static PyObject* __Pyx_PyObject_CallMatrixMethod(PyObject* method, PyObject* arg) { - // NOTE: eats the method reference - PyObject *result = NULL; -#if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(method))) { - PyObject *self = PyMethod_GET_SELF(method); - if (likely(self)) { - PyObject *args; - PyObject *function = PyMethod_GET_FUNCTION(method); - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(function)) { - PyObject *args[2] = {self, arg}; - result = __Pyx_PyFunction_FastCall(function, args, 2); - goto done; - } - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(function)) { - PyObject *args[2] = {self, arg}; - result = __Pyx_PyCFunction_FastCall(function, args, 2); - goto done; - } - #endif - args = PyTuple_New(2); - if (unlikely(!args)) goto done; - Py_INCREF(self); - PyTuple_SET_ITEM(args, 0, self); - Py_INCREF(arg); - PyTuple_SET_ITEM(args, 1, arg); - Py_INCREF(function); - Py_DECREF(method); method = NULL; - result = __Pyx_PyObject_Call(function, args, NULL); - Py_DECREF(args); - Py_DECREF(function); - return result; - } - } -#endif - result = __Pyx_PyObject_CallOneArg(method, arg); -done: - Py_DECREF(method); - return result; -} - -#define __Pyx_TryMatrixMethod(x, y, py_method_name) { \ - PyObject *func = __Pyx_PyObject_GetAttrStr(x, py_method_name); \ - if (func) { \ - PyObject *result = __Pyx_PyObject_CallMatrixMethod(func, y); \ - if (result != Py_NotImplemented) \ - return result; \ - Py_DECREF(result); \ - } else { \ - if (!PyErr_ExceptionMatches(PyExc_AttributeError)) \ - return NULL; \ - PyErr_Clear(); \ - } \ -} - -static PyObject* __Pyx__PyNumber_MatrixMultiply(PyObject* x, PyObject* y, const char* op_name) { - int right_is_subtype = PyObject_IsSubclass((PyObject*)Py_TYPE(y), (PyObject*)Py_TYPE(x)); - if (unlikely(right_is_subtype == -1)) - return NULL; - if (right_is_subtype) { - // to allow subtypes to override parent behaviour, try reversed operation first - // see note at https://docs.python.org/3/reference/datamodel.html#emulating-numeric-types - __Pyx_TryMatrixMethod(y, x, PYIDENT("__rmatmul__")) - } - __Pyx_TryMatrixMethod(x, y, PYIDENT("__matmul__")) - if (!right_is_subtype) { - __Pyx_TryMatrixMethod(y, x, PYIDENT("__rmatmul__")) - } - PyErr_Format(PyExc_TypeError, - "unsupported operand type(s) for %.2s: '%.100s' and '%.100s'", - op_name, - Py_TYPE(x)->tp_name, - Py_TYPE(y)->tp_name); - return NULL; -} - -static PyObject* __Pyx_PyNumber_InPlaceMatrixMultiply(PyObject* x, PyObject* y) { - __Pyx_TryMatrixMethod(x, y, PYIDENT("__imatmul__")) - return __Pyx__PyNumber_MatrixMultiply(x, y, "@="); -} - -#undef __Pyx_TryMatrixMethod -#endif - - -/////////////// PyDictVersioning.proto /////////////// - -#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS -#define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) -#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) -#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) \ - (version_var) = __PYX_GET_DICT_VERSION(dict); \ - (cache_var) = (value); - -#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) { \ - static PY_UINT64_T __pyx_dict_version = 0; \ - static PyObject *__pyx_dict_cached_value = NULL; \ - if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) { \ - (VAR) = __pyx_dict_cached_value; \ - } else { \ - (VAR) = __pyx_dict_cached_value = (LOOKUP); \ - __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT); \ - } \ -} - -static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj); /*proto*/ -static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj); /*proto*/ -static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version); /*proto*/ - -#else -#define __PYX_GET_DICT_VERSION(dict) (0) -#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) -#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); -#endif - -/////////////// PyDictVersioning /////////////// - -#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS -static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { - PyObject *dict = Py_TYPE(obj)->tp_dict; - return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; -} - -static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { - PyObject **dictptr = NULL; - Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; - if (offset) { -#if CYTHON_COMPILING_IN_CPYTHON - dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); -#else - dictptr = _PyObject_GetDictPtr(obj); -#endif - } - return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; -} - -static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { - PyObject *dict = Py_TYPE(obj)->tp_dict; - if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) - return 0; - return obj_dict_version == __Pyx_get_object_dict_version(obj); -} -#endif diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Optimize.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Optimize.c deleted file mode 100644 index 35f3a67c962..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Optimize.c +++ /dev/null @@ -1,1195 +0,0 @@ -/* - * Optional optimisations of built-in functions and methods. - * - * Required replacements of builtins are in Builtins.c. - * - * General object operations and protocols are in ObjectHandling.c. - */ - -/////////////// append.proto /////////////// - -static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/ - -/////////////// append /////////////// -//@requires: ListAppend -//@requires: ObjectHandling.c::PyObjectCallMethod1 - -static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { - if (likely(PyList_CheckExact(L))) { - if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; - } else { - PyObject* retval = __Pyx_PyObject_CallMethod1(L, PYIDENT("append"), x); - if (unlikely(!retval)) - return -1; - Py_DECREF(retval); - } - return 0; -} - -/////////////// ListAppend.proto /////////////// - -#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS -static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { - PyListObject* L = (PyListObject*) list; - Py_ssize_t len = Py_SIZE(list); - if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { - Py_INCREF(x); - PyList_SET_ITEM(list, len, x); - __Pyx_SET_SIZE(list, len + 1); - return 0; - } - return PyList_Append(list, x); -} -#else -#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) -#endif - -/////////////// ListCompAppend.proto /////////////// - -#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS -static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { - PyListObject* L = (PyListObject*) list; - Py_ssize_t len = Py_SIZE(list); - if (likely(L->allocated > len)) { - Py_INCREF(x); - PyList_SET_ITEM(list, len, x); - __Pyx_SET_SIZE(list, len + 1); - return 0; - } - return PyList_Append(list, x); -} -#else -#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) -#endif - -//////////////////// ListExtend.proto //////////////////// - -static CYTHON_INLINE int __Pyx_PyList_Extend(PyObject* L, PyObject* v) { -#if CYTHON_COMPILING_IN_CPYTHON - PyObject* none = _PyList_Extend((PyListObject*)L, v); - if (unlikely(!none)) - return -1; - Py_DECREF(none); - return 0; -#else - return PyList_SetSlice(L, PY_SSIZE_T_MAX, PY_SSIZE_T_MAX, v); -#endif -} - -/////////////// pop.proto /////////////// - -static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L); /*proto*/ - -#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS -static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L); /*proto*/ -#define __Pyx_PyObject_Pop(L) (likely(PyList_CheckExact(L)) ? \ - __Pyx_PyList_Pop(L) : __Pyx__PyObject_Pop(L)) - -#else -#define __Pyx_PyList_Pop(L) __Pyx__PyObject_Pop(L) -#define __Pyx_PyObject_Pop(L) __Pyx__PyObject_Pop(L) -#endif - -/////////////// pop /////////////// -//@requires: ObjectHandling.c::PyObjectCallMethod0 - -static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L) { - if (Py_TYPE(L) == &PySet_Type) { - return PySet_Pop(L); - } - return __Pyx_PyObject_CallMethod0(L, PYIDENT("pop")); -} - -#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS -static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L) { - /* Check that both the size is positive and no reallocation shrinking needs to be done. */ - if (likely(PyList_GET_SIZE(L) > (((PyListObject*)L)->allocated >> 1))) { - __Pyx_SET_SIZE(L, Py_SIZE(L) - 1); - return PyList_GET_ITEM(L, PyList_GET_SIZE(L)); - } - return CALL_UNBOUND_METHOD(PyList_Type, "pop", L); -} -#endif - - -/////////////// pop_index.proto /////////////// - -static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix); /*proto*/ -static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix); /*proto*/ - -#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS -static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix); /*proto*/ - -#define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) ( \ - (likely(PyList_CheckExact(L) && __Pyx_fits_Py_ssize_t(ix, type, is_signed))) ? \ - __Pyx__PyList_PopIndex(L, py_ix, ix) : ( \ - (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) : \ - __Pyx__PyObject_PopIndex(L, py_ix))) - -#define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) ( \ - __Pyx_fits_Py_ssize_t(ix, type, is_signed) ? \ - __Pyx__PyList_PopIndex(L, py_ix, ix) : ( \ - (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) : \ - __Pyx__PyObject_PopIndex(L, py_ix))) - -#else - -#define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) \ - __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) - -#define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) ( \ - (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) : \ - __Pyx__PyObject_PopIndex(L, py_ix)) -#endif - -/////////////// pop_index /////////////// -//@requires: ObjectHandling.c::PyObjectCallMethod1 - -static PyObject* __Pyx__PyObject_PopNewIndex(PyObject* L, PyObject* py_ix) { - PyObject *r; - if (unlikely(!py_ix)) return NULL; - r = __Pyx__PyObject_PopIndex(L, py_ix); - Py_DECREF(py_ix); - return r; -} - -static PyObject* __Pyx__PyObject_PopIndex(PyObject* L, PyObject* py_ix) { - return __Pyx_PyObject_CallMethod1(L, PYIDENT("pop"), py_ix); -} - -#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS -static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t ix) { - Py_ssize_t size = PyList_GET_SIZE(L); - if (likely(size > (((PyListObject*)L)->allocated >> 1))) { - Py_ssize_t cix = ix; - if (cix < 0) { - cix += size; - } - if (likely(__Pyx_is_valid_index(cix, size))) { - PyObject* v = PyList_GET_ITEM(L, cix); - __Pyx_SET_SIZE(L, Py_SIZE(L) - 1); - size -= 1; - memmove(&PyList_GET_ITEM(L, cix), &PyList_GET_ITEM(L, cix+1), (size_t)(size-cix)*sizeof(PyObject*)); - return v; - } - } - if (py_ix == Py_None) { - return __Pyx__PyObject_PopNewIndex(L, PyInt_FromSsize_t(ix)); - } else { - return __Pyx__PyObject_PopIndex(L, py_ix); - } -} -#endif - - -/////////////// dict_getitem_default.proto /////////////// - -static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value); /*proto*/ - -/////////////// dict_getitem_default /////////////// - -static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) { - PyObject* value; -#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY - value = PyDict_GetItemWithError(d, key); - if (unlikely(!value)) { - if (unlikely(PyErr_Occurred())) - return NULL; - value = default_value; - } - Py_INCREF(value); - // avoid C compiler warning about unused utility functions - if ((1)); -#else - if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) { - /* these presumably have safe hash functions */ - value = PyDict_GetItem(d, key); - if (unlikely(!value)) { - value = default_value; - } - Py_INCREF(value); - } -#endif - else { - if (default_value == Py_None) - value = CALL_UNBOUND_METHOD(PyDict_Type, "get", d, key); - else - value = CALL_UNBOUND_METHOD(PyDict_Type, "get", d, key, default_value); - } - return value; -} - - -/////////////// dict_setdefault.proto /////////////// - -static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, int is_safe_type); /*proto*/ - -/////////////// dict_setdefault /////////////// - -static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *key, PyObject *default_value, - CYTHON_UNUSED int is_safe_type) { - PyObject* value; -#if PY_VERSION_HEX >= 0x030400A0 - // we keep the method call at the end to avoid "unused" C compiler warnings - if ((1)) { - value = PyDict_SetDefault(d, key, default_value); - if (unlikely(!value)) return NULL; - Py_INCREF(value); -#else - if (is_safe_type == 1 || (is_safe_type == -1 && - /* the following builtins presumably have repeatably safe and fast hash functions */ -#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY - (PyUnicode_CheckExact(key) || PyString_CheckExact(key) || PyLong_CheckExact(key)))) { - value = PyDict_GetItemWithError(d, key); - if (unlikely(!value)) { - if (unlikely(PyErr_Occurred())) - return NULL; - if (unlikely(PyDict_SetItem(d, key, default_value) == -1)) - return NULL; - value = default_value; - } - Py_INCREF(value); -#else - (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key) || PyLong_CheckExact(key)))) { - value = PyDict_GetItem(d, key); - if (unlikely(!value)) { - if (unlikely(PyDict_SetItem(d, key, default_value) == -1)) - return NULL; - value = default_value; - } - Py_INCREF(value); -#endif -#endif - } else { - value = CALL_UNBOUND_METHOD(PyDict_Type, "setdefault", d, key, default_value); - } - return value; -} - - -/////////////// py_dict_clear.proto /////////////// - -#define __Pyx_PyDict_Clear(d) (PyDict_Clear(d), 0) - - -/////////////// py_dict_pop.proto /////////////// - -static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value); /*proto*/ - -/////////////// py_dict_pop /////////////// - -static CYTHON_INLINE PyObject *__Pyx_PyDict_Pop(PyObject *d, PyObject *key, PyObject *default_value) { -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B3 - if ((1)) { - return _PyDict_Pop(d, key, default_value); - } else - // avoid "function unused" warnings -#endif - if (default_value) { - return CALL_UNBOUND_METHOD(PyDict_Type, "pop", d, key, default_value); - } else { - return CALL_UNBOUND_METHOD(PyDict_Type, "pop", d, key); - } -} - - -/////////////// dict_iter.proto /////////////// - -static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name, - Py_ssize_t* p_orig_length, int* p_is_dict); -static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos, - PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict); - -/////////////// dict_iter /////////////// -//@requires: ObjectHandling.c::UnpackTuple2 -//@requires: ObjectHandling.c::IterFinish -//@requires: ObjectHandling.c::PyObjectCallMethod0 - -static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, - Py_ssize_t* p_orig_length, int* p_source_is_dict) { - is_dict = is_dict || likely(PyDict_CheckExact(iterable)); - *p_source_is_dict = is_dict; - if (is_dict) { -#if !CYTHON_COMPILING_IN_PYPY - *p_orig_length = PyDict_Size(iterable); - Py_INCREF(iterable); - return iterable; -#elif PY_MAJOR_VERSION >= 3 - // On PyPy3, we need to translate manually a few method names. - // This logic is not needed on CPython thanks to the fast case above. - static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL; - PyObject **pp = NULL; - if (method_name) { - const char *name = PyUnicode_AsUTF8(method_name); - if (strcmp(name, "iteritems") == 0) pp = &py_items; - else if (strcmp(name, "iterkeys") == 0) pp = &py_keys; - else if (strcmp(name, "itervalues") == 0) pp = &py_values; - if (pp) { - if (!*pp) { - *pp = PyUnicode_FromString(name + 4); - if (!*pp) - return NULL; - } - method_name = *pp; - } - } -#endif - } - *p_orig_length = 0; - if (method_name) { - PyObject* iter; - iterable = __Pyx_PyObject_CallMethod0(iterable, method_name); - if (!iterable) - return NULL; -#if !CYTHON_COMPILING_IN_PYPY - if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable)) - return iterable; -#endif - iter = PyObject_GetIter(iterable); - Py_DECREF(iterable); - return iter; - } - return PyObject_GetIter(iterable); -} - -static CYTHON_INLINE int __Pyx_dict_iter_next( - PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos, - PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) { - PyObject* next_item; -#if !CYTHON_COMPILING_IN_PYPY - if (source_is_dict) { - PyObject *key, *value; - if (unlikely(orig_length != PyDict_Size(iter_obj))) { - PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); - return -1; - } - if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) { - return 0; - } - if (pitem) { - PyObject* tuple = PyTuple_New(2); - if (unlikely(!tuple)) { - return -1; - } - Py_INCREF(key); - Py_INCREF(value); - PyTuple_SET_ITEM(tuple, 0, key); - PyTuple_SET_ITEM(tuple, 1, value); - *pitem = tuple; - } else { - if (pkey) { - Py_INCREF(key); - *pkey = key; - } - if (pvalue) { - Py_INCREF(value); - *pvalue = value; - } - } - return 1; - } else if (PyTuple_CheckExact(iter_obj)) { - Py_ssize_t pos = *ppos; - if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0; - *ppos = pos + 1; - next_item = PyTuple_GET_ITEM(iter_obj, pos); - Py_INCREF(next_item); - } else if (PyList_CheckExact(iter_obj)) { - Py_ssize_t pos = *ppos; - if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0; - *ppos = pos + 1; - next_item = PyList_GET_ITEM(iter_obj, pos); - Py_INCREF(next_item); - } else -#endif - { - next_item = PyIter_Next(iter_obj); - if (unlikely(!next_item)) { - return __Pyx_IterFinish(); - } - } - if (pitem) { - *pitem = next_item; - } else if (pkey && pvalue) { - if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1)) - return -1; - } else if (pkey) { - *pkey = next_item; - } else { - *pvalue = next_item; - } - return 1; -} - - -/////////////// set_iter.proto /////////////// - -static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set, - Py_ssize_t* p_orig_length, int* p_source_is_set); /*proto*/ -static CYTHON_INLINE int __Pyx_set_iter_next( - PyObject* iter_obj, Py_ssize_t orig_length, - Py_ssize_t* ppos, PyObject **value, - int source_is_set); /*proto*/ - -/////////////// set_iter /////////////// -//@requires: ObjectHandling.c::IterFinish - -static CYTHON_INLINE PyObject* __Pyx_set_iterator(PyObject* iterable, int is_set, - Py_ssize_t* p_orig_length, int* p_source_is_set) { -#if CYTHON_COMPILING_IN_CPYTHON - is_set = is_set || likely(PySet_CheckExact(iterable) || PyFrozenSet_CheckExact(iterable)); - *p_source_is_set = is_set; - if (likely(is_set)) { - *p_orig_length = PySet_Size(iterable); - Py_INCREF(iterable); - return iterable; - } -#else - (void)is_set; - *p_source_is_set = 0; -#endif - *p_orig_length = 0; - return PyObject_GetIter(iterable); -} - -static CYTHON_INLINE int __Pyx_set_iter_next( - PyObject* iter_obj, Py_ssize_t orig_length, - Py_ssize_t* ppos, PyObject **value, - int source_is_set) { - if (!CYTHON_COMPILING_IN_CPYTHON || unlikely(!source_is_set)) { - *value = PyIter_Next(iter_obj); - if (unlikely(!*value)) { - return __Pyx_IterFinish(); - } - (void)orig_length; - (void)ppos; - return 1; - } -#if CYTHON_COMPILING_IN_CPYTHON - if (unlikely(PySet_GET_SIZE(iter_obj) != orig_length)) { - PyErr_SetString( - PyExc_RuntimeError, - "set changed size during iteration"); - return -1; - } - { - Py_hash_t hash; - int ret = _PySet_NextEntry(iter_obj, ppos, value, &hash); - // CPython does not raise errors here, only if !isinstance(iter_obj, set/frozenset) - assert (ret != -1); - if (likely(ret)) { - Py_INCREF(*value); - return 1; - } - } -#endif - return 0; -} - -/////////////// py_set_discard_unhashable /////////////// -//@requires: Builtins.c::pyfrozenset_new - -static int __Pyx_PySet_DiscardUnhashable(PyObject *set, PyObject *key) { - PyObject *tmpkey; - int rv; - - if (likely(!PySet_Check(key) || !PyErr_ExceptionMatches(PyExc_TypeError))) - return -1; - PyErr_Clear(); - tmpkey = __Pyx_PyFrozenSet_New(key); - if (tmpkey == NULL) - return -1; - rv = PySet_Discard(set, tmpkey); - Py_DECREF(tmpkey); - return rv; -} - - -/////////////// py_set_discard.proto /////////////// - -static CYTHON_INLINE int __Pyx_PySet_Discard(PyObject *set, PyObject *key); /*proto*/ - -/////////////// py_set_discard /////////////// -//@requires: py_set_discard_unhashable - -static CYTHON_INLINE int __Pyx_PySet_Discard(PyObject *set, PyObject *key) { - int found = PySet_Discard(set, key); - // Convert *key* to frozenset if necessary - if (unlikely(found < 0)) { - found = __Pyx_PySet_DiscardUnhashable(set, key); - } - // note: returns -1 on error, 0 (not found) or 1 (found) otherwise => error check for -1 or < 0 works - return found; -} - - -/////////////// py_set_remove.proto /////////////// - -static CYTHON_INLINE int __Pyx_PySet_Remove(PyObject *set, PyObject *key); /*proto*/ - -/////////////// py_set_remove /////////////// -//@requires: py_set_discard_unhashable - -static int __Pyx_PySet_RemoveNotFound(PyObject *set, PyObject *key, int found) { - // Convert *key* to frozenset if necessary - if (unlikely(found < 0)) { - found = __Pyx_PySet_DiscardUnhashable(set, key); - } - if (likely(found == 0)) { - // Not found - PyObject *tup; - tup = PyTuple_Pack(1, key); - if (!tup) - return -1; - PyErr_SetObject(PyExc_KeyError, tup); - Py_DECREF(tup); - return -1; - } - // note: returns -1 on error, 0 (not found) or 1 (found) otherwise => error check for -1 or < 0 works - return found; -} - -static CYTHON_INLINE int __Pyx_PySet_Remove(PyObject *set, PyObject *key) { - int found = PySet_Discard(set, key); - if (unlikely(found != 1)) { - // note: returns -1 on error, 0 (not found) or 1 (found) otherwise => error check for -1 or < 0 works - return __Pyx_PySet_RemoveNotFound(set, key, found); - } - return 0; -} - - -/////////////// unicode_iter.proto /////////////// - -static CYTHON_INLINE int __Pyx_init_unicode_iteration( - PyObject* ustring, Py_ssize_t *length, void** data, int *kind); /* proto */ - -/////////////// unicode_iter /////////////// - -static CYTHON_INLINE int __Pyx_init_unicode_iteration( - PyObject* ustring, Py_ssize_t *length, void** data, int *kind) { -#if CYTHON_PEP393_ENABLED - if (unlikely(__Pyx_PyUnicode_READY(ustring) < 0)) return -1; - *kind = PyUnicode_KIND(ustring); - *length = PyUnicode_GET_LENGTH(ustring); - *data = PyUnicode_DATA(ustring); -#else - *kind = 0; - *length = PyUnicode_GET_SIZE(ustring); - *data = (void*)PyUnicode_AS_UNICODE(ustring); -#endif - return 0; -} - -/////////////// pyobject_as_double.proto /////////////// - -static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */ - -#if CYTHON_COMPILING_IN_PYPY -#define __Pyx_PyObject_AsDouble(obj) \ -(likely(PyFloat_CheckExact(obj)) ? PyFloat_AS_DOUBLE(obj) : \ - likely(PyInt_CheckExact(obj)) ? \ - PyFloat_AsDouble(obj) : __Pyx__PyObject_AsDouble(obj)) -#else -#define __Pyx_PyObject_AsDouble(obj) \ -((likely(PyFloat_CheckExact(obj))) ? \ - PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj)) -#endif - -/////////////// pyobject_as_double /////////////// - -static double __Pyx__PyObject_AsDouble(PyObject* obj) { - PyObject* float_value; -#if !CYTHON_USE_TYPE_SLOTS - float_value = PyNumber_Float(obj); if ((0)) goto bad; -#else - PyNumberMethods *nb = Py_TYPE(obj)->tp_as_number; - if (likely(nb) && likely(nb->nb_float)) { - float_value = nb->nb_float(obj); - if (likely(float_value) && unlikely(!PyFloat_Check(float_value))) { - PyErr_Format(PyExc_TypeError, - "__float__ returned non-float (type %.200s)", - Py_TYPE(float_value)->tp_name); - Py_DECREF(float_value); - goto bad; - } - } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) { -#if PY_MAJOR_VERSION >= 3 - float_value = PyFloat_FromString(obj); -#else - float_value = PyFloat_FromString(obj, 0); -#endif - } else { - PyObject* args = PyTuple_New(1); - if (unlikely(!args)) goto bad; - PyTuple_SET_ITEM(args, 0, obj); - float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0); - PyTuple_SET_ITEM(args, 0, 0); - Py_DECREF(args); - } -#endif - if (likely(float_value)) { - double value = PyFloat_AS_DOUBLE(float_value); - Py_DECREF(float_value); - return value; - } -bad: - return (double)-1; -} - - -/////////////// PyNumberPow2.proto /////////////// - -#define __Pyx_PyNumber_InPlacePowerOf2(a, b, c) __Pyx__PyNumber_PowerOf2(a, b, c, 1) -#define __Pyx_PyNumber_PowerOf2(a, b, c) __Pyx__PyNumber_PowerOf2(a, b, c, 0) - -static PyObject* __Pyx__PyNumber_PowerOf2(PyObject *two, PyObject *exp, PyObject *none, int inplace); /*proto*/ - -/////////////// PyNumberPow2 /////////////// - -static PyObject* __Pyx__PyNumber_PowerOf2(PyObject *two, PyObject *exp, PyObject *none, int inplace) { -// in CPython, 1<ob_digit[0]; - } else if (size == 0) { - return PyInt_FromLong(1L); - } else if (unlikely(size < 0)) { - goto fallback; - } else { - shiftby = PyLong_AsSsize_t(exp); - } - #else - shiftby = PyLong_AsSsize_t(exp); - #endif - } else { - goto fallback; - } - if (likely(shiftby >= 0)) { - if ((size_t)shiftby <= sizeof(long) * 8 - 2) { - long value = 1L << shiftby; - return PyInt_FromLong(value); -#ifdef HAVE_LONG_LONG - } else if ((size_t)shiftby <= sizeof(unsigned PY_LONG_LONG) * 8 - 1) { - unsigned PY_LONG_LONG value = ((unsigned PY_LONG_LONG)1) << shiftby; - return PyLong_FromUnsignedLongLong(value); -#endif - } else { - PyObject *result, *one = PyInt_FromLong(1L); - if (unlikely(!one)) return NULL; - result = PyNumber_Lshift(one, exp); - Py_DECREF(one); - return result; - } - } else if (shiftby == -1 && PyErr_Occurred()) { - PyErr_Clear(); - } -fallback: -#endif - return (inplace ? PyNumber_InPlacePower : PyNumber_Power)(two, exp, none); -} - - -/////////////// PyIntCompare.proto /////////////// - -{{py: c_ret_type = 'PyObject*' if ret_type.is_pyobject else 'int'}} -static CYTHON_INLINE {{c_ret_type}} __Pyx_PyInt_{{'' if ret_type.is_pyobject else 'Bool'}}{{op}}{{order}}(PyObject *op1, PyObject *op2, long intval, long inplace); /*proto*/ - -/////////////// PyIntCompare /////////////// - -{{py: pyval, ival = ('op2', 'b') if order == 'CObj' else ('op1', 'a') }} -{{py: c_ret_type = 'PyObject*' if ret_type.is_pyobject else 'int'}} -{{py: return_true = 'Py_RETURN_TRUE' if ret_type.is_pyobject else 'return 1'}} -{{py: return_false = 'Py_RETURN_FALSE' if ret_type.is_pyobject else 'return 0'}} -{{py: slot_name = op.lower() }} -{{py: c_op = {'Eq': '==', 'Ne': '!='}[op] }} -{{py: -return_compare = ( - (lambda a,b,c_op, return_true=return_true, return_false=return_false: "if ({a} {c_op} {b}) {return_true}; else {return_false};".format( - a=a, b=b, c_op=c_op, return_true=return_true, return_false=return_false)) - if ret_type.is_pyobject else - (lambda a,b,c_op: "return ({a} {c_op} {b});".format(a=a, b=b, c_op=c_op)) - ) -}} - -static CYTHON_INLINE {{c_ret_type}} __Pyx_PyInt_{{'' if ret_type.is_pyobject else 'Bool'}}{{op}}{{order}}(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { - if (op1 == op2) { - {{return_true if op == 'Eq' else return_false}}; - } - - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_CheckExact({{pyval}}))) { - const long {{'a' if order == 'CObj' else 'b'}} = intval; - long {{ival}} = PyInt_AS_LONG({{pyval}}); - {{return_compare('a', 'b', c_op)}} - } - #endif - - #if CYTHON_USE_PYLONG_INTERNALS - if (likely(PyLong_CheckExact({{pyval}}))) { - int unequal; - unsigned long uintval; - Py_ssize_t size = Py_SIZE({{pyval}}); - const digit* digits = ((PyLongObject*){{pyval}})->ob_digit; - if (intval == 0) { - // == 0 => Py_SIZE(pyval) == 0 - {{return_compare('size', '0', c_op)}} - } else if (intval < 0) { - // < 0 => Py_SIZE(pyval) < 0 - if (size >= 0) - {{return_false if op == 'Eq' else return_true}}; - // both are negative => can use absolute values now. - intval = -intval; - size = -size; - } else { - // > 0 => Py_SIZE(pyval) > 0 - if (size <= 0) - {{return_false if op == 'Eq' else return_true}}; - } - // After checking that the sign is the same (and excluding 0), now compare the absolute values. - // When inlining, the C compiler should select exactly one line from this unrolled loop. - uintval = (unsigned long) intval; - {{for _size in range(4, 0, -1)}} -#if PyLong_SHIFT * {{_size}} < SIZEOF_LONG*8 - if (uintval >> (PyLong_SHIFT * {{_size}})) { - // The C integer value is between (PyLong_BASE ** _size) and MIN(PyLong_BASE ** _size, LONG_MAX). - unequal = (size != {{_size+1}}) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) - {{for _i in range(1, _size+1)}} | (digits[{{_i}}] != ((uintval >> ({{_i}} * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)){{endfor}}; - } else -#endif - {{endfor}} - unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); - - {{return_compare('unequal', '0', c_op)}} - } - #endif - - if (PyFloat_CheckExact({{pyval}})) { - const long {{'a' if order == 'CObj' else 'b'}} = intval; - double {{ival}} = PyFloat_AS_DOUBLE({{pyval}}); - {{return_compare('(double)a', '(double)b', c_op)}} - } - - return {{'' if ret_type.is_pyobject else '__Pyx_PyObject_IsTrueAndDecref'}}( - PyObject_RichCompare(op1, op2, Py_{{op.upper()}})); -} - - -/////////////// PyIntBinop.proto /////////////// - -{{py: c_ret_type = 'PyObject*' if ret_type.is_pyobject else 'int'}} -#if !CYTHON_COMPILING_IN_PYPY -static {{c_ret_type}} __Pyx_PyInt_{{'' if ret_type.is_pyobject else 'Bool'}}{{op}}{{order}}(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check); /*proto*/ -#else -#define __Pyx_PyInt_{{'' if ret_type.is_pyobject else 'Bool'}}{{op}}{{order}}(op1, op2, intval, inplace, zerodivision_check) \ - {{if op in ('Eq', 'Ne')}}{{'' if ret_type.is_pyobject else '__Pyx_PyObject_IsTrueAndDecref'}}(PyObject_RichCompare(op1, op2, Py_{{op.upper()}})) - {{else}}(inplace ? PyNumber_InPlace{{op}}(op1, op2) : PyNumber_{{op}}(op1, op2)) - {{endif}} -#endif - -/////////////// PyIntBinop /////////////// - -#if !CYTHON_COMPILING_IN_PYPY -{{py: from Cython.Utility import pylong_join }} -{{py: pyval, ival = ('op2', 'b') if order == 'CObj' else ('op1', 'a') }} -{{py: c_ret_type = 'PyObject*' if ret_type.is_pyobject else 'int'}} -{{py: return_true = 'Py_RETURN_TRUE' if ret_type.is_pyobject else 'return 1'}} -{{py: return_false = 'Py_RETURN_FALSE' if ret_type.is_pyobject else 'return 0'}} -{{py: slot_name = {'TrueDivide': 'true_divide', 'FloorDivide': 'floor_divide'}.get(op, op.lower()) }} -{{py: cfunc_name = '__Pyx_PyInt_%s%s%s' % ('' if ret_type.is_pyobject else 'Bool', op, order)}} -{{py: zerodiv_check = lambda operand, _cfunc_name=cfunc_name: '%s_ZeroDivisionError(%s)' % (_cfunc_name, operand)}} -{{py: -c_op = { - 'Add': '+', 'Subtract': '-', 'Remainder': '%', 'TrueDivide': '/', 'FloorDivide': '/', - 'Or': '|', 'Xor': '^', 'And': '&', 'Rshift': '>>', 'Lshift': '<<', - 'Eq': '==', 'Ne': '!=', - }[op] -}} - -{{if op in ('TrueDivide', 'FloorDivide', 'Remainder')}} -#if PY_MAJOR_VERSION < 3 || CYTHON_USE_PYLONG_INTERNALS -#define {{zerodiv_check('operand')}} \ - if (unlikely(zerodivision_check && ((operand) == 0))) { \ - PyErr_SetString(PyExc_ZeroDivisionError, "integer division{{if op == 'Remainder'}} or modulo{{endif}} by zero"); \ - return NULL; \ - } -#endif -{{endif}} - -static {{c_ret_type}} {{cfunc_name}}(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, int inplace, int zerodivision_check) { - // Prevent "unused" warnings. - (void)inplace; - (void)zerodivision_check; - - {{if op in ('Eq', 'Ne')}} - if (op1 == op2) { - {{return_true if op == 'Eq' else return_false}}; - } - {{endif}} - - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_CheckExact({{pyval}}))) { - const long {{'a' if order == 'CObj' else 'b'}} = intval; - {{if c_op in '+-%' or op == 'FloorDivide'}} - long x; - {{endif}} - long {{ival}} = PyInt_AS_LONG({{pyval}}); - - {{if op in ('Eq', 'Ne')}} - if (a {{c_op}} b) { - {{return_true}}; - } else { - {{return_false}}; - } - {{elif c_op in '+-'}} - // adapted from intobject.c in Py2.7: - // casts in the line below avoid undefined behaviour on overflow - x = (long)((unsigned long)a {{c_op}} b); - if (likely((x^a) >= 0 || (x^{{ '~' if op == 'Subtract' else '' }}b) >= 0)) - return PyInt_FromLong(x); - return PyLong_Type.tp_as_number->nb_{{slot_name}}(op1, op2); - {{elif c_op == '%'}} - {{zerodiv_check('b')}} - // see ExprNodes.py :: mod_int_utility_code - x = a % b; - x += ((x != 0) & ((x ^ b) < 0)) * b; - return PyInt_FromLong(x); - {{elif op == 'TrueDivide'}} - {{zerodiv_check('b')}} - if (8 * sizeof(long) <= 53 || likely(labs({{ival}}) <= ((PY_LONG_LONG)1 << 53))) { - return PyFloat_FromDouble((double)a / (double)b); - } - // let Python do the rounding - return PyInt_Type.tp_as_number->nb_{{slot_name}}(op1, op2); - {{elif op == 'FloorDivide'}} - // INT_MIN / -1 is the only case that overflows, b == 0 is an error case - {{zerodiv_check('b')}} - if (unlikely(b == -1 && ((unsigned long)a) == 0-(unsigned long)a)) - return PyInt_Type.tp_as_number->nb_{{slot_name}}(op1, op2); - else { - long q, r; - // see ExprNodes.py :: div_int_utility_code - q = a / b; - r = a - q*b; - q -= ((r != 0) & ((r ^ b) < 0)); - x = q; - } - return PyInt_FromLong(x); - {{elif op == 'Lshift'}} - if (likely(b < (long) (sizeof(long)*8) && a == (a << b) >> b) || !a) { - return PyInt_FromLong(a {{c_op}} b); - } - {{else}} - // other operations are safe, no overflow - return PyInt_FromLong(a {{c_op}} b); - {{endif}} - } - #endif - - #if CYTHON_USE_PYLONG_INTERNALS - if (likely(PyLong_CheckExact({{pyval}}))) { - const long {{'a' if order == 'CObj' else 'b'}} = intval; - long {{ival}}{{if op not in ('Eq', 'Ne')}}, x{{endif}}; - {{if op not in ('Eq', 'Ne', 'TrueDivide')}} -#ifdef HAVE_LONG_LONG - const PY_LONG_LONG ll{{'a' if order == 'CObj' else 'b'}} = intval; - PY_LONG_LONG ll{{ival}}, llx; -#endif - {{endif}} - const digit* digits = ((PyLongObject*){{pyval}})->ob_digit; - const Py_ssize_t size = Py_SIZE({{pyval}}); - // handle most common case first to avoid indirect branch and optimise branch prediction - if (likely(__Pyx_sst_abs(size) <= 1)) { - {{ival}} = likely(size) ? digits[0] : 0; - if (size == -1) {{ival}} = -{{ival}}; - } else { - switch (size) { - {{for _size in range(2, 5)}} - {{for _case in (-_size, _size)}} - case {{_case}}: - if (8 * sizeof(long) - 1 > {{_size}} * PyLong_SHIFT{{if op == 'TrueDivide'}} && {{_size-1}} * PyLong_SHIFT < 53{{endif}}) { - {{ival}} = {{'-' if _case < 0 else ''}}(long) {{pylong_join(_size, 'digits')}}; - break; - {{if op not in ('Eq', 'Ne', 'TrueDivide')}} -#ifdef HAVE_LONG_LONG - } else if (8 * sizeof(PY_LONG_LONG) - 1 > {{_size}} * PyLong_SHIFT) { - ll{{ival}} = {{'-' if _case < 0 else ''}}(PY_LONG_LONG) {{pylong_join(_size, 'digits', 'unsigned PY_LONG_LONG')}}; - goto long_long; -#endif - {{endif}} - } - // if size doesn't fit into a long or PY_LONG_LONG anymore, fall through to default - CYTHON_FALLTHROUGH; - {{endfor}} - {{endfor}} - - {{if op in ('Eq', 'Ne')}} - #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15 - // unusual setup - your fault - default: return {{'' if ret_type.is_pyobject else '__Pyx_PyObject_IsTrueAndDecref'}}( - PyLong_Type.tp_richcompare({{'op1, op2' if order == 'ObjC' else 'op2, op1'}}, Py_{{op.upper()}})); - #else - // too large for the long values we allow => definitely not equal - default: {{return_false if op == 'Eq' else return_true}}; - #endif - {{else}} - default: return PyLong_Type.tp_as_number->nb_{{slot_name}}(op1, op2); - {{endif}} - } - } - {{if op in ('Eq', 'Ne')}} - if (a {{c_op}} b) { - {{return_true}}; - } else { - {{return_false}}; - } - {{else}} - {{if c_op == '%'}} - {{zerodiv_check('b')}} - // see ExprNodes.py :: mod_int_utility_code - x = a % b; - x += ((x != 0) & ((x ^ b) < 0)) * b; - {{elif op == 'TrueDivide'}} - {{zerodiv_check('b')}} - if ((8 * sizeof(long) <= 53 || likely(labs({{ival}}) <= ((PY_LONG_LONG)1 << 53))) - || __Pyx_sst_abs(size) <= 52 / PyLong_SHIFT) { - return PyFloat_FromDouble((double)a / (double)b); - } - return PyLong_Type.tp_as_number->nb_{{slot_name}}(op1, op2); - {{elif op == 'FloorDivide'}} - {{zerodiv_check('b')}} - { - long q, r; - // see ExprNodes.py :: div_int_utility_code - q = a / b; - r = a - q*b; - q -= ((r != 0) & ((r ^ b) < 0)); - x = q; - } - {{else}} - x = a {{c_op}} b; - {{if op == 'Lshift'}} -#ifdef HAVE_LONG_LONG - if (unlikely(!(b < (long) (sizeof(long)*8) && a == x >> b)) && a) { - ll{{ival}} = {{ival}}; - goto long_long; - } -#else - if (likely(b < (long) (sizeof(long)*8) && a == x >> b) || !a) /* execute return statement below */ -#endif - {{endif}} - {{endif}} - return PyLong_FromLong(x); - - {{if op != 'TrueDivide'}} -#ifdef HAVE_LONG_LONG - long_long: - {{if c_op == '%'}} - // see ExprNodes.py :: mod_int_utility_code - llx = lla % llb; - llx += ((llx != 0) & ((llx ^ llb) < 0)) * llb; - {{elif op == 'FloorDivide'}} - { - PY_LONG_LONG q, r; - // see ExprNodes.py :: div_int_utility_code - q = lla / llb; - r = lla - q*llb; - q -= ((r != 0) & ((r ^ llb) < 0)); - llx = q; - } - {{else}} - llx = lla {{c_op}} llb; - {{if op == 'Lshift'}} - if (likely(lla == llx >> llb)) /* then execute 'return' below */ - {{endif}} - {{endif}} - return PyLong_FromLongLong(llx); -#endif - {{endif}}{{# if op != 'TrueDivide' #}} - {{endif}}{{# if op in ('Eq', 'Ne') #}} - } - #endif - - {{if c_op in '+-' or op in ('TrueDivide', 'Eq', 'Ne')}} - if (PyFloat_CheckExact({{pyval}})) { - const long {{'a' if order == 'CObj' else 'b'}} = intval; - double {{ival}} = PyFloat_AS_DOUBLE({{pyval}}); - {{if op in ('Eq', 'Ne')}} - if ((double)a {{c_op}} (double)b) { - {{return_true}}; - } else { - {{return_false}}; - } - {{else}} - double result; - {{if op == 'TrueDivide'}} - if (unlikely(zerodivision_check && b == 0)) { - PyErr_SetString(PyExc_ZeroDivisionError, "float division by zero"); - return NULL; - } - {{endif}} - // copied from floatobject.c in Py3.5: - PyFPE_START_PROTECT("{{op.lower() if not op.endswith('Divide') else 'divide'}}", return NULL) - result = ((double)a) {{c_op}} (double)b; - PyFPE_END_PROTECT(result) - return PyFloat_FromDouble(result); - {{endif}} - } - {{endif}} - - {{if op in ('Eq', 'Ne')}} - return {{'' if ret_type.is_pyobject else '__Pyx_PyObject_IsTrueAndDecref'}}( - PyObject_RichCompare(op1, op2, Py_{{op.upper()}})); - {{else}} - return (inplace ? PyNumber_InPlace{{op}} : PyNumber_{{op}})(op1, op2); - {{endif}} -} -#endif - -/////////////// PyFloatBinop.proto /////////////// - -{{py: c_ret_type = 'PyObject*' if ret_type.is_pyobject else 'int'}} -#if !CYTHON_COMPILING_IN_PYPY -static {{c_ret_type}} __Pyx_PyFloat_{{'' if ret_type.is_pyobject else 'Bool'}}{{op}}{{order}}(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check); /*proto*/ -#else -#define __Pyx_PyFloat_{{'' if ret_type.is_pyobject else 'Bool'}}{{op}}{{order}}(op1, op2, floatval, inplace, zerodivision_check) \ - {{if op in ('Eq', 'Ne')}}{{'' if ret_type.is_pyobject else '__Pyx_PyObject_IsTrueAndDecref'}}(PyObject_RichCompare(op1, op2, Py_{{op.upper()}})) - {{elif op == 'Divide'}}((inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2))) - {{else}}(inplace ? PyNumber_InPlace{{op}}(op1, op2) : PyNumber_{{op}}(op1, op2)) - {{endif}} -#endif - -/////////////// PyFloatBinop /////////////// - -#if !CYTHON_COMPILING_IN_PYPY -{{py: from Cython.Utility import pylong_join }} -{{py: c_ret_type = 'PyObject*' if ret_type.is_pyobject else 'int'}} -{{py: return_true = 'Py_RETURN_TRUE' if ret_type.is_pyobject else 'return 1'}} -{{py: return_false = 'Py_RETURN_FALSE' if ret_type.is_pyobject else 'return 0'}} -{{py: pyval, fval = ('op2', 'b') if order == 'CObj' else ('op1', 'a') }} -{{py: cfunc_name = '__Pyx_PyFloat_%s%s%s' % ('' if ret_type.is_pyobject else 'Bool', op, order) }} -{{py: zerodiv_check = lambda operand, _cfunc_name=cfunc_name: '%s_ZeroDivisionError(%s)' % (_cfunc_name, operand)}} -{{py: -c_op = { - 'Add': '+', 'Subtract': '-', 'TrueDivide': '/', 'Divide': '/', 'Remainder': '%', - 'Eq': '==', 'Ne': '!=', - }[op] -}} - -{{if order == 'CObj' and c_op in '%/'}} -#define {{zerodiv_check('operand')}} if (unlikely(zerodivision_check && ((operand) == 0))) { \ - PyErr_SetString(PyExc_ZeroDivisionError, "float division{{if op == 'Remainder'}} or modulo{{endif}} by zero"); \ - return NULL; \ -} -{{endif}} - -static {{c_ret_type}} {{cfunc_name}}(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) { - const double {{'a' if order == 'CObj' else 'b'}} = floatval; - double {{fval}}{{if op not in ('Eq', 'Ne')}}, result{{endif}}; - // Prevent "unused" warnings. - (void)inplace; - (void)zerodivision_check; - - {{if op in ('Eq', 'Ne')}} - if (op1 == op2) { - {{return_true if op == 'Eq' else return_false}}; - } - {{endif}} - - if (likely(PyFloat_CheckExact({{pyval}}))) { - {{fval}} = PyFloat_AS_DOUBLE({{pyval}}); - {{if order == 'CObj' and c_op in '%/'}}{{zerodiv_check(fval)}}{{endif}} - } else - - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_CheckExact({{pyval}}))) { - {{fval}} = (double) PyInt_AS_LONG({{pyval}}); - {{if order == 'CObj' and c_op in '%/'}}{{zerodiv_check(fval)}}{{endif}} - } else - #endif - - if (likely(PyLong_CheckExact({{pyval}}))) { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*){{pyval}})->ob_digit; - const Py_ssize_t size = Py_SIZE({{pyval}}); - switch (size) { - case 0: {{if order == 'CObj' and c_op in '%/'}}{{zerodiv_check('0')}}{{else}}{{fval}} = 0.0;{{endif}} break; - case -1: {{fval}} = -(double) digits[0]; break; - case 1: {{fval}} = (double) digits[0]; break; - {{for _size in (2, 3, 4)}} - case -{{_size}}: - case {{_size}}: - if (8 * sizeof(unsigned long) > {{_size}} * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || ({{_size-1}} * PyLong_SHIFT < 53))) { - {{fval}} = (double) {{pylong_join(_size, 'digits')}}; - // let CPython do its own float rounding from 2**53 on (max. consecutive integer in double float) - if ((8 * sizeof(unsigned long) < 53) || ({{_size}} * PyLong_SHIFT < 53) || ({{fval}} < (double) ((PY_LONG_LONG)1 << 53))) { - if (size == {{-_size}}) - {{fval}} = -{{fval}}; - break; - } - } - // Fall through if size doesn't fit safely into a double anymore. - // It may not be obvious that this is a safe fall-through given the "fval < 2**53" - // check above. However, the number of digits that CPython uses for a given PyLong - // value is minimal, and together with the "(size-1) * SHIFT < 53" check above, - // this should make it safe. - CYTHON_FALLTHROUGH; - {{endfor}} - default: - #else - { - #endif - {{if op in ('Eq', 'Ne')}} - return {{'' if ret_type.is_pyobject else '__Pyx_PyObject_IsTrueAndDecref'}}( - PyFloat_Type.tp_richcompare({{'op1, op2' if order == 'CObj' else 'op2, op1'}}, Py_{{op.upper()}})); - {{else}} - {{fval}} = PyLong_AsDouble({{pyval}}); - if (unlikely({{fval}} == -1.0 && PyErr_Occurred())) return NULL; - {{if order == 'CObj' and c_op in '%/'}}{{zerodiv_check(fval)}}{{endif}} - {{endif}} - } - } else { - {{if op in ('Eq', 'Ne')}} - return {{'' if ret_type.is_pyobject else '__Pyx_PyObject_IsTrueAndDecref'}}( - PyObject_RichCompare(op1, op2, Py_{{op.upper()}})); - {{elif op == 'Divide'}} - return (inplace ? __Pyx_PyNumber_InPlaceDivide(op1, op2) : __Pyx_PyNumber_Divide(op1, op2)); - {{else}} - return (inplace ? PyNumber_InPlace{{op}} : PyNumber_{{op}})(op1, op2); - {{endif}} - } - - {{if op in ('Eq', 'Ne')}} - if (a {{c_op}} b) { - {{return_true}}; - } else { - {{return_false}}; - } - {{else}} - // copied from floatobject.c in Py3.5: - {{if order == 'CObj' and c_op in '%/'}}{{zerodiv_check('b')}}{{endif}} - PyFPE_START_PROTECT("{{op.lower() if not op.endswith('Divide') else 'divide'}}", return NULL) - {{if c_op == '%'}} - result = fmod(a, b); - if (result) - result += ((result < 0) ^ (b < 0)) * b; - else - result = copysign(0.0, b); - {{else}} - result = a {{c_op}} b; - {{endif}} - PyFPE_END_PROTECT(result) - return PyFloat_FromDouble(result); - {{endif}} -} -#endif diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Overflow.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Overflow.c deleted file mode 100644 index 0259c58f010..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Overflow.c +++ /dev/null @@ -1,311 +0,0 @@ -/* -These functions provide integer arithmetic with integer checking. They do not -actually raise an exception when an overflow is detected, but rather set a bit -in the overflow parameter. (This parameter may be re-used across several -arithmetic operations, so should be or-ed rather than assigned to.) - -The implementation is divided into two parts, the signed and unsigned basecases, -which is where the magic happens, and a generic template matching a specific -type to an implementation based on its (c-compile-time) size and signedness. - -When possible, branching is avoided, and preference is given to speed over -accuracy (a low rate of falsely "detected" overflows are acceptable, -undetected overflows are not). - - -TODO: Hook up checking. -TODO: Conditionally support 128-bit with intmax_t? -*/ - -/////////////// Common.proto /////////////// - -static int __Pyx_check_twos_complement(void) { - if ((-1 != ~0)) { - PyErr_SetString(PyExc_RuntimeError, "Two's complement required for overflow checks."); - return 1; - } else if ((sizeof(short) == sizeof(int))) { - PyErr_SetString(PyExc_RuntimeError, "sizeof(short) < sizeof(int) required for overflow checks."); - return 1; - } else { - return 0; - } -} - -#define __PYX_IS_UNSIGNED(type) ((((type) -1) > 0)) -#define __PYX_SIGN_BIT(type) ((((unsigned type) 1) << (sizeof(type) * 8 - 1))) -#define __PYX_HALF_MAX(type) ((((type) 1) << (sizeof(type) * 8 - 2))) -#define __PYX_MIN(type) ((__PYX_IS_UNSIGNED(type) ? (type) 0 : 0 - __PYX_HALF_MAX(type) - __PYX_HALF_MAX(type))) -#define __PYX_MAX(type) ((~__PYX_MIN(type))) - -#define __Pyx_add_no_overflow(a, b, overflow) ((a) + (b)) -#define __Pyx_add_const_no_overflow(a, b, overflow) ((a) + (b)) -#define __Pyx_sub_no_overflow(a, b, overflow) ((a) - (b)) -#define __Pyx_sub_const_no_overflow(a, b, overflow) ((a) - (b)) -#define __Pyx_mul_no_overflow(a, b, overflow) ((a) * (b)) -#define __Pyx_mul_const_no_overflow(a, b, overflow) ((a) * (b)) -#define __Pyx_div_no_overflow(a, b, overflow) ((a) / (b)) -#define __Pyx_div_const_no_overflow(a, b, overflow) ((a) / (b)) - -/////////////// Common.init /////////////// -//@substitute: naming - -// FIXME: Propagate the error here instead of just printing it. -if (unlikely(__Pyx_check_twos_complement())) { - PyErr_WriteUnraisable($module_cname); -} - -/////////////// BaseCaseUnsigned.proto /////////////// - -static CYTHON_INLINE {{UINT}} __Pyx_add_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow); -static CYTHON_INLINE {{UINT}} __Pyx_sub_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow); -static CYTHON_INLINE {{UINT}} __Pyx_mul_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow); -static CYTHON_INLINE {{UINT}} __Pyx_div_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow); - -// Use these when b is known at compile time. -#define __Pyx_add_const_{{NAME}}_checking_overflow __Pyx_add_{{NAME}}_checking_overflow -#define __Pyx_sub_const_{{NAME}}_checking_overflow __Pyx_sub_{{NAME}}_checking_overflow -static CYTHON_INLINE {{UINT}} __Pyx_mul_const_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} constant, int *overflow); -#define __Pyx_div_const_{{NAME}}_checking_overflow __Pyx_div_{{NAME}}_checking_overflow - -/////////////// BaseCaseUnsigned /////////////// - -static CYTHON_INLINE {{UINT}} __Pyx_add_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow) { - {{UINT}} r = a + b; - *overflow |= r < a; - return r; -} - -static CYTHON_INLINE {{UINT}} __Pyx_sub_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow) { - {{UINT}} r = a - b; - *overflow |= r > a; - return r; -} - -static CYTHON_INLINE {{UINT}} __Pyx_mul_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow) { - if ((sizeof({{UINT}}) < sizeof(unsigned long))) { - unsigned long big_r = ((unsigned long) a) * ((unsigned long) b); - {{UINT}} r = ({{UINT}}) big_r; - *overflow |= big_r != r; - return r; -#ifdef HAVE_LONG_LONG - } else if ((sizeof({{UINT}}) < sizeof(unsigned PY_LONG_LONG))) { - unsigned PY_LONG_LONG big_r = ((unsigned PY_LONG_LONG) a) * ((unsigned PY_LONG_LONG) b); - {{UINT}} r = ({{UINT}}) big_r; - *overflow |= big_r != r; - return r; -#endif - } else { - {{UINT}} prod = a * b; - double dprod = ((double) a) * ((double) b); - // Overflow results in an error of at least 2^sizeof(UINT), - // whereas rounding represents an error on the order of 2^(sizeof(UINT)-53). - *overflow |= fabs(dprod - prod) > (__PYX_MAX({{UINT}}) / 2); - return prod; - } -} - -static CYTHON_INLINE {{UINT}} __Pyx_mul_const_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow) { - if (b > 1) { - *overflow |= a > __PYX_MAX({{UINT}}) / b; - } - return a * b; -} - - -static CYTHON_INLINE {{UINT}} __Pyx_div_{{NAME}}_checking_overflow({{UINT}} a, {{UINT}} b, int *overflow) { - if (b == 0) { - *overflow |= 1; - return 0; - } - return a / b; -} - - -/////////////// BaseCaseSigned.proto /////////////// - -static CYTHON_INLINE {{INT}} __Pyx_add_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); -static CYTHON_INLINE {{INT}} __Pyx_sub_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); -static CYTHON_INLINE {{INT}} __Pyx_mul_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); -static CYTHON_INLINE {{INT}} __Pyx_div_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); - - -// Use when b is known at compile time. -static CYTHON_INLINE {{INT}} __Pyx_add_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); -static CYTHON_INLINE {{INT}} __Pyx_sub_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow); -static CYTHON_INLINE {{INT}} __Pyx_mul_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} constant, int *overflow); -#define __Pyx_div_const_{{NAME}}_checking_overflow __Pyx_div_{{NAME}}_checking_overflow - -/////////////// BaseCaseSigned /////////////// - -static CYTHON_INLINE {{INT}} __Pyx_add_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { - if ((sizeof({{INT}}) < sizeof(long))) { - long big_r = ((long) a) + ((long) b); - {{INT}} r = ({{INT}}) big_r; - *overflow |= big_r != r; - return r; -#ifdef HAVE_LONG_LONG - } else if ((sizeof({{INT}}) < sizeof(PY_LONG_LONG))) { - PY_LONG_LONG big_r = ((PY_LONG_LONG) a) + ((PY_LONG_LONG) b); - {{INT}} r = ({{INT}}) big_r; - *overflow |= big_r != r; - return r; -#endif - } else { - // Signed overflow undefined, but unsigned overflow is well defined. - {{INT}} r = ({{INT}}) ((unsigned {{INT}}) a + (unsigned {{INT}}) b); - // Overflow happened if the operands have the same sign, but the result - // has opposite sign. - // sign(a) == sign(b) != sign(r) - {{INT}} sign_a = __PYX_SIGN_BIT({{INT}}) & a; - {{INT}} sign_b = __PYX_SIGN_BIT({{INT}}) & b; - {{INT}} sign_r = __PYX_SIGN_BIT({{INT}}) & r; - *overflow |= (sign_a == sign_b) & (sign_a != sign_r); - return r; - } -} - -static CYTHON_INLINE {{INT}} __Pyx_add_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { - if (b > 0) { - *overflow |= a > __PYX_MAX({{INT}}) - b; - } else if (b < 0) { - *overflow |= a < __PYX_MIN({{INT}}) - b; - } - return a + b; -} - -static CYTHON_INLINE {{INT}} __Pyx_sub_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { - *overflow |= b == __PYX_MIN({{INT}}); - return __Pyx_add_{{NAME}}_checking_overflow(a, -b, overflow); -} - -static CYTHON_INLINE {{INT}} __Pyx_sub_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { - *overflow |= b == __PYX_MIN({{INT}}); - return __Pyx_add_const_{{NAME}}_checking_overflow(a, -b, overflow); -} - -static CYTHON_INLINE {{INT}} __Pyx_mul_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { - if ((sizeof({{INT}}) < sizeof(long))) { - long big_r = ((long) a) * ((long) b); - {{INT}} r = ({{INT}}) big_r; - *overflow |= big_r != r; - return ({{INT}}) r; -#ifdef HAVE_LONG_LONG - } else if ((sizeof({{INT}}) < sizeof(PY_LONG_LONG))) { - PY_LONG_LONG big_r = ((PY_LONG_LONG) a) * ((PY_LONG_LONG) b); - {{INT}} r = ({{INT}}) big_r; - *overflow |= big_r != r; - return ({{INT}}) r; -#endif - } else { - {{INT}} prod = a * b; - double dprod = ((double) a) * ((double) b); - // Overflow results in an error of at least 2^sizeof(INT), - // whereas rounding represents an error on the order of 2^(sizeof(INT)-53). - *overflow |= fabs(dprod - prod) > (__PYX_MAX({{INT}}) / 2); - return prod; - } -} - -static CYTHON_INLINE {{INT}} __Pyx_mul_const_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { - if (b > 1) { - *overflow |= a > __PYX_MAX({{INT}}) / b; - *overflow |= a < __PYX_MIN({{INT}}) / b; - } else if (b == -1) { - *overflow |= a == __PYX_MIN({{INT}}); - } else if (b < -1) { - *overflow |= a > __PYX_MIN({{INT}}) / b; - *overflow |= a < __PYX_MAX({{INT}}) / b; - } - return a * b; -} - -static CYTHON_INLINE {{INT}} __Pyx_div_{{NAME}}_checking_overflow({{INT}} a, {{INT}} b, int *overflow) { - if (b == 0) { - *overflow |= 1; - return 0; - } - *overflow |= (a == __PYX_MIN({{INT}})) & (b == -1); - return a / b; -} - - -/////////////// SizeCheck.init /////////////// -//@substitute: naming - -// FIXME: Propagate the error here instead of just printing it. -if (unlikely(__Pyx_check_sane_{{NAME}}())) { - PyErr_WriteUnraisable($module_cname); -} - -/////////////// SizeCheck.proto /////////////// - -static int __Pyx_check_sane_{{NAME}}(void) { - if (((sizeof({{TYPE}}) <= sizeof(int)) || -#ifdef HAVE_LONG_LONG - (sizeof({{TYPE}}) == sizeof(PY_LONG_LONG)) || -#endif - (sizeof({{TYPE}}) == sizeof(long)))) { - return 0; - } else { - PyErr_Format(PyExc_RuntimeError, \ - "Bad size for int type %.{{max(60, len(TYPE))}}s: %d", "{{TYPE}}", (int) sizeof({{TYPE}})); - return 1; - } -} - - -/////////////// Binop.proto /////////////// - -static CYTHON_INLINE {{TYPE}} __Pyx_{{BINOP}}_{{NAME}}_checking_overflow({{TYPE}} a, {{TYPE}} b, int *overflow); - -/////////////// Binop /////////////// - -static CYTHON_INLINE {{TYPE}} __Pyx_{{BINOP}}_{{NAME}}_checking_overflow({{TYPE}} a, {{TYPE}} b, int *overflow) { - if ((sizeof({{TYPE}}) < sizeof(int))) { - return __Pyx_{{BINOP}}_no_overflow(a, b, overflow); - } else if (__PYX_IS_UNSIGNED({{TYPE}})) { - if ((sizeof({{TYPE}}) == sizeof(unsigned int))) { - return ({{TYPE}}) __Pyx_{{BINOP}}_unsigned_int_checking_overflow(a, b, overflow); - } else if ((sizeof({{TYPE}}) == sizeof(unsigned long))) { - return ({{TYPE}}) __Pyx_{{BINOP}}_unsigned_long_checking_overflow(a, b, overflow); -#ifdef HAVE_LONG_LONG - } else if ((sizeof({{TYPE}}) == sizeof(unsigned PY_LONG_LONG))) { - return ({{TYPE}}) __Pyx_{{BINOP}}_unsigned_long_long_checking_overflow(a, b, overflow); -#endif - } else { - abort(); return 0; /* handled elsewhere */ - } - } else { - if ((sizeof({{TYPE}}) == sizeof(int))) { - return ({{TYPE}}) __Pyx_{{BINOP}}_int_checking_overflow(a, b, overflow); - } else if ((sizeof({{TYPE}}) == sizeof(long))) { - return ({{TYPE}}) __Pyx_{{BINOP}}_long_checking_overflow(a, b, overflow); -#ifdef HAVE_LONG_LONG - } else if ((sizeof({{TYPE}}) == sizeof(PY_LONG_LONG))) { - return ({{TYPE}}) __Pyx_{{BINOP}}_long_long_checking_overflow(a, b, overflow); -#endif - } else { - abort(); return 0; /* handled elsewhere */ - } - } -} - -/////////////// LeftShift.proto /////////////// - -static CYTHON_INLINE {{TYPE}} __Pyx_lshift_{{NAME}}_checking_overflow({{TYPE}} a, {{TYPE}} b, int *overflow) { - *overflow |= -#if {{SIGNED}} - (b < 0) | -#endif - (b > ({{TYPE}}) (8 * sizeof({{TYPE}}))) | (a > (__PYX_MAX({{TYPE}}) >> b)); - return a << b; -} -#define __Pyx_lshift_const_{{NAME}}_checking_overflow __Pyx_lshift_{{NAME}}_checking_overflow - - -/////////////// UnaryNegOverflows.proto /////////////// - -//FIXME: shouldn't the macro name be prefixed by "__Pyx_" ? Too late now, I guess... -// from intobject.c -#define UNARY_NEG_WOULD_OVERFLOW(x) \ - (((x) < 0) & ((unsigned long)(x) == 0-(unsigned long)(x))) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Printing.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Printing.c deleted file mode 100644 index 71aa7eafe95..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Printing.c +++ /dev/null @@ -1,176 +0,0 @@ -////////////////////// Print.proto ////////////////////// -//@substitute: naming - -static int __Pyx_Print(PyObject*, PyObject *, int); /*proto*/ -#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 -static PyObject* $print_function = 0; -static PyObject* $print_function_kwargs = 0; -#endif - -////////////////////// Print.cleanup ////////////////////// -//@substitute: naming - -#if CYTHON_COMPILING_IN_PYPY || PY_MAJOR_VERSION >= 3 -Py_CLEAR($print_function); -Py_CLEAR($print_function_kwargs); -#endif - -////////////////////// Print ////////////////////// -//@substitute: naming - -#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 -static PyObject *__Pyx_GetStdout(void) { - PyObject *f = PySys_GetObject((char *)"stdout"); - if (!f) { - PyErr_SetString(PyExc_RuntimeError, "lost sys.stdout"); - } - return f; -} - -static int __Pyx_Print(PyObject* f, PyObject *arg_tuple, int newline) { - int i; - - if (!f) { - if (!(f = __Pyx_GetStdout())) - return -1; - } - Py_INCREF(f); - for (i=0; i < PyTuple_GET_SIZE(arg_tuple); i++) { - PyObject* v; - if (PyFile_SoftSpace(f, 1)) { - if (PyFile_WriteString(" ", f) < 0) - goto error; - } - v = PyTuple_GET_ITEM(arg_tuple, i); - if (PyFile_WriteObject(v, f, Py_PRINT_RAW) < 0) - goto error; - if (PyString_Check(v)) { - char *s = PyString_AsString(v); - Py_ssize_t len = PyString_Size(v); - if (len > 0) { - // append soft-space if necessary (not using isspace() due to C/C++ problem on MacOS-X) - switch (s[len-1]) { - case ' ': break; - case '\f': case '\r': case '\n': case '\t': case '\v': - PyFile_SoftSpace(f, 0); - break; - default: break; - } - } - } - } - if (newline) { - if (PyFile_WriteString("\n", f) < 0) - goto error; - PyFile_SoftSpace(f, 0); - } - Py_DECREF(f); - return 0; -error: - Py_DECREF(f); - return -1; -} - -#else /* Python 3 has a print function */ - -static int __Pyx_Print(PyObject* stream, PyObject *arg_tuple, int newline) { - PyObject* kwargs = 0; - PyObject* result = 0; - PyObject* end_string; - if (unlikely(!$print_function)) { - $print_function = PyObject_GetAttr($builtins_cname, PYIDENT("print")); - if (!$print_function) - return -1; - } - if (stream) { - kwargs = PyDict_New(); - if (unlikely(!kwargs)) - return -1; - if (unlikely(PyDict_SetItem(kwargs, PYIDENT("file"), stream) < 0)) - goto bad; - if (!newline) { - end_string = PyUnicode_FromStringAndSize(" ", 1); - if (unlikely(!end_string)) - goto bad; - if (PyDict_SetItem(kwargs, PYIDENT("end"), end_string) < 0) { - Py_DECREF(end_string); - goto bad; - } - Py_DECREF(end_string); - } - } else if (!newline) { - if (unlikely(!$print_function_kwargs)) { - $print_function_kwargs = PyDict_New(); - if (unlikely(!$print_function_kwargs)) - return -1; - end_string = PyUnicode_FromStringAndSize(" ", 1); - if (unlikely(!end_string)) - return -1; - if (PyDict_SetItem($print_function_kwargs, PYIDENT("end"), end_string) < 0) { - Py_DECREF(end_string); - return -1; - } - Py_DECREF(end_string); - } - kwargs = $print_function_kwargs; - } - result = PyObject_Call($print_function, arg_tuple, kwargs); - if (unlikely(kwargs) && (kwargs != $print_function_kwargs)) - Py_DECREF(kwargs); - if (!result) - return -1; - Py_DECREF(result); - return 0; -bad: - if (kwargs != $print_function_kwargs) - Py_XDECREF(kwargs); - return -1; -} -#endif - -////////////////////// PrintOne.proto ////////////////////// -//@requires: Print - -static int __Pyx_PrintOne(PyObject* stream, PyObject *o); /*proto*/ - -////////////////////// PrintOne ////////////////////// - -#if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION < 3 - -static int __Pyx_PrintOne(PyObject* f, PyObject *o) { - if (!f) { - if (!(f = __Pyx_GetStdout())) - return -1; - } - Py_INCREF(f); - if (PyFile_SoftSpace(f, 0)) { - if (PyFile_WriteString(" ", f) < 0) - goto error; - } - if (PyFile_WriteObject(o, f, Py_PRINT_RAW) < 0) - goto error; - if (PyFile_WriteString("\n", f) < 0) - goto error; - Py_DECREF(f); - return 0; -error: - Py_DECREF(f); - return -1; - /* the line below is just to avoid C compiler - * warnings about unused functions */ - return __Pyx_Print(f, NULL, 0); -} - -#else /* Python 3 has a print function */ - -static int __Pyx_PrintOne(PyObject* stream, PyObject *o) { - int res; - PyObject* arg_tuple = PyTuple_Pack(1, o); - if (unlikely(!arg_tuple)) - return -1; - res = __Pyx_Print(stream, arg_tuple, 1); - Py_DECREF(arg_tuple); - return res; -} - -#endif diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Profile.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Profile.c deleted file mode 100644 index a0ab1fa989b..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/Profile.c +++ /dev/null @@ -1,377 +0,0 @@ -/////////////// Profile.proto /////////////// -//@requires: Exceptions.c::PyErrFetchRestore -//@substitute: naming - -// Note that cPython ignores PyTrace_EXCEPTION, -// but maybe some other profilers don't. - -#ifndef CYTHON_PROFILE -#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON - #define CYTHON_PROFILE 0 -#else - #define CYTHON_PROFILE 1 -#endif -#endif - -#ifndef CYTHON_TRACE_NOGIL - #define CYTHON_TRACE_NOGIL 0 -#else - #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE) - #define CYTHON_TRACE 1 - #endif -#endif - -#ifndef CYTHON_TRACE - #define CYTHON_TRACE 0 -#endif - -#if CYTHON_TRACE - #undef CYTHON_PROFILE_REUSE_FRAME -#endif - -#ifndef CYTHON_PROFILE_REUSE_FRAME - #define CYTHON_PROFILE_REUSE_FRAME 0 -#endif - -#if CYTHON_PROFILE || CYTHON_TRACE - - #include "compile.h" - #include "frameobject.h" - #include "traceback.h" -#if PY_VERSION_HEX >= 0x030b00a6 - #ifndef Py_BUILD_CORE - #define Py_BUILD_CORE 1 - #endif - #include "internal/pycore_frame.h" -#endif - - #if CYTHON_PROFILE_REUSE_FRAME - #define CYTHON_FRAME_MODIFIER static - #define CYTHON_FRAME_DEL(frame) - #else - #define CYTHON_FRAME_MODIFIER - #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame) - #endif - - #define __Pyx_TraceDeclarations \ - static PyCodeObject *$frame_code_cname = NULL; \ - CYTHON_FRAME_MODIFIER PyFrameObject *$frame_cname = NULL; \ - int __Pyx_use_tracing = 0; - - #define __Pyx_TraceFrameInit(codeobj) \ - if (codeobj) $frame_code_cname = (PyCodeObject*) codeobj; - -#if PY_VERSION_HEX >= 0x030b00a2 - #define __Pyx_IsTracing(tstate, check_tracing, check_funcs) \ - (unlikely((tstate)->cframe->use_tracing) && \ - (!(check_tracing) || !(tstate)->tracing) && \ - (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) - - #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate) - - #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate) - -#elif PY_VERSION_HEX >= 0x030a00b1 - #define __Pyx_IsTracing(tstate, check_tracing, check_funcs) \ - (unlikely((tstate)->cframe->use_tracing) && \ - (!(check_tracing) || !(tstate)->tracing) && \ - (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) - - #define __Pyx_EnterTracing(tstate) \ - do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0) - - #define __Pyx_LeaveTracing(tstate) \ - do { \ - tstate->tracing--; \ - tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL) \ - || tstate->c_profilefunc != NULL); \ - } while (0) - -#else - #define __Pyx_IsTracing(tstate, check_tracing, check_funcs) \ - (unlikely((tstate)->use_tracing) && \ - (!(check_tracing) || !(tstate)->tracing) && \ - (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) - - #define __Pyx_EnterTracing(tstate) \ - do { tstate->tracing++; tstate->use_tracing = 0; } while (0) - - #define __Pyx_LeaveTracing(tstate) \ - do { \ - tstate->tracing--; \ - tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL) \ - || tstate->c_profilefunc != NULL); \ - } while (0) - -#endif - - #ifdef WITH_THREAD - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) \ - if (nogil) { \ - if (CYTHON_TRACE_NOGIL) { \ - PyThreadState *tstate; \ - PyGILState_STATE state = PyGILState_Ensure(); \ - tstate = __Pyx_PyThreadState_Current; \ - if (__Pyx_IsTracing(tstate, 1, 1)) { \ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, &$frame_cname, tstate, funcname, srcfile, firstlineno); \ - } \ - PyGILState_Release(state); \ - if (unlikely(__Pyx_use_tracing < 0)) goto_error; \ - } \ - } else { \ - PyThreadState* tstate = PyThreadState_GET(); \ - if (__Pyx_IsTracing(tstate, 1, 1)) { \ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, &$frame_cname, tstate, funcname, srcfile, firstlineno); \ - if (unlikely(__Pyx_use_tracing < 0)) goto_error; \ - } \ - } - #else - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) \ - { PyThreadState* tstate = PyThreadState_GET(); \ - if (__Pyx_IsTracing(tstate, 1, 1)) { \ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, &$frame_cname, tstate, funcname, srcfile, firstlineno); \ - if (unlikely(__Pyx_use_tracing < 0)) goto_error; \ - } \ - } - #endif - - #define __Pyx_TraceException() \ - if (likely(!__Pyx_use_tracing)); else { \ - PyThreadState* tstate = __Pyx_PyThreadState_Current; \ - if (__Pyx_IsTracing(tstate, 0, 1)) { \ - __Pyx_EnterTracing(tstate); \ - PyObject *exc_info = __Pyx_GetExceptionTuple(tstate); \ - if (exc_info) { \ - if (CYTHON_TRACE && tstate->c_tracefunc) \ - tstate->c_tracefunc( \ - tstate->c_traceobj, $frame_cname, PyTrace_EXCEPTION, exc_info); \ - tstate->c_profilefunc( \ - tstate->c_profileobj, $frame_cname, PyTrace_EXCEPTION, exc_info); \ - Py_DECREF(exc_info); \ - } \ - __Pyx_LeaveTracing(tstate); \ - } \ - } - - static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) { - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - __Pyx_EnterTracing(tstate); - if (CYTHON_TRACE && tstate->c_tracefunc) - tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result); - if (tstate->c_profilefunc) - tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result); - CYTHON_FRAME_DEL(frame); - __Pyx_LeaveTracing(tstate); - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } - - #ifdef WITH_THREAD - #define __Pyx_TraceReturn(result, nogil) \ - if (likely(!__Pyx_use_tracing)); else { \ - if (nogil) { \ - if (CYTHON_TRACE_NOGIL) { \ - PyThreadState *tstate; \ - PyGILState_STATE state = PyGILState_Ensure(); \ - tstate = __Pyx_PyThreadState_Current; \ - if (__Pyx_IsTracing(tstate, 0, 0)) { \ - __Pyx_call_return_trace_func(tstate, $frame_cname, (PyObject*)result); \ - } \ - PyGILState_Release(state); \ - } \ - } else { \ - PyThreadState* tstate = __Pyx_PyThreadState_Current; \ - if (__Pyx_IsTracing(tstate, 0, 0)) { \ - __Pyx_call_return_trace_func(tstate, $frame_cname, (PyObject*)result); \ - } \ - } \ - } - #else - #define __Pyx_TraceReturn(result, nogil) \ - if (likely(!__Pyx_use_tracing)); else { \ - PyThreadState* tstate = __Pyx_PyThreadState_Current; \ - if (__Pyx_IsTracing(tstate, 0, 0)) { \ - __Pyx_call_return_trace_func(tstate, $frame_cname, (PyObject*)result); \ - } \ - } - #endif - - static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); /*proto*/ - static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno); /*proto*/ - -#else - - #define __Pyx_TraceDeclarations - #define __Pyx_TraceFrameInit(codeobj) - // mark error label as used to avoid compiler warnings - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) if ((1)); else goto_error; - #define __Pyx_TraceException() - #define __Pyx_TraceReturn(result, nogil) - -#endif /* CYTHON_PROFILE */ - -#if CYTHON_TRACE - // see call_trace_protected() in CPython's ceval.c - static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) { - int ret; - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - __Pyx_PyFrame_SetLineNumber(frame, lineno); - __Pyx_EnterTracing(tstate); - - ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL); - - __Pyx_LeaveTracing(tstate); - if (likely(!ret)) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } else { - Py_XDECREF(type); - Py_XDECREF(value); - Py_XDECREF(traceback); - } - return ret; - } - - #ifdef WITH_THREAD - #define __Pyx_TraceLine(lineno, nogil, goto_error) \ - if (likely(!__Pyx_use_tracing)); else { \ - if (nogil) { \ - if (CYTHON_TRACE_NOGIL) { \ - int ret = 0; \ - PyThreadState *tstate; \ - PyGILState_STATE state = PyGILState_Ensure(); \ - tstate = __Pyx_PyThreadState_Current; \ - if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \ - ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ - } \ - PyGILState_Release(state); \ - if (unlikely(ret)) goto_error; \ - } \ - } else { \ - PyThreadState* tstate = __Pyx_PyThreadState_Current; \ - if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \ - int ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ - if (unlikely(ret)) goto_error; \ - } \ - } \ - } - #else - #define __Pyx_TraceLine(lineno, nogil, goto_error) \ - if (likely(!__Pyx_use_tracing)); else { \ - PyThreadState* tstate = __Pyx_PyThreadState_Current; \ - if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \ - int ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \ - if (unlikely(ret)) goto_error; \ - } \ - } - #endif -#else - // mark error label as used to avoid compiler warnings - #define __Pyx_TraceLine(lineno, nogil, goto_error) if ((1)); else goto_error; -#endif - -/////////////// Profile /////////////// -//@substitute: naming - -#if CYTHON_PROFILE - -static int __Pyx_TraceSetupAndCall(PyCodeObject** code, - PyFrameObject** frame, - PyThreadState* tstate, - const char *funcname, - const char *srcfile, - int firstlineno) { - PyObject *type, *value, *traceback; - int retval; - if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) { - if (*code == NULL) { - *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno); - if (*code == NULL) return 0; - } - *frame = PyFrame_New( - tstate, /*PyThreadState *tstate*/ - *code, /*PyCodeObject *code*/ - $moddict_cname, /*PyObject *globals*/ - 0 /*PyObject *locals*/ - ); - if (*frame == NULL) return 0; - if (CYTHON_TRACE && (*frame)->f_trace == NULL) { - // this enables "f_lineno" lookup, at least in CPython ... - Py_INCREF(Py_None); - (*frame)->f_trace = Py_None; - } -#if PY_VERSION_HEX < 0x030400B1 - } else { - (*frame)->f_tstate = tstate; -#endif - } - __Pyx_PyFrame_SetLineNumber(*frame, firstlineno); - - retval = 1; - __Pyx_EnterTracing(tstate); - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - - #if CYTHON_TRACE - if (tstate->c_tracefunc) - retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0; - if (retval && tstate->c_profilefunc) - #endif - retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0; - - __Pyx_LeaveTracing(tstate); - if (retval) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - return __Pyx_IsTracing(tstate, 0, 0) && retval; - } else { - Py_XDECREF(type); - Py_XDECREF(value); - Py_XDECREF(traceback); - return -1; - } -} - -static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) { - PyCodeObject *py_code = 0; - -#if PY_MAJOR_VERSION >= 3 - py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno); - // make CPython use a fresh dict for "f_locals" at need (see GH #1836) - if (likely(py_code)) { - py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS; - } -#else - PyObject *py_srcfile = 0; - PyObject *py_funcname = 0; - - py_funcname = PyString_FromString(funcname); - if (unlikely(!py_funcname)) goto bad; - py_srcfile = PyString_FromString(srcfile); - if (unlikely(!py_srcfile)) goto bad; - - py_code = PyCode_New( - 0, /*int argcount,*/ - 0, /*int nlocals,*/ - 0, /*int stacksize,*/ - // make CPython use a fresh dict for "f_locals" at need (see GH #1836) - CO_OPTIMIZED | CO_NEWLOCALS, /*int flags,*/ - $empty_bytes, /*PyObject *code,*/ - $empty_tuple, /*PyObject *consts,*/ - $empty_tuple, /*PyObject *names,*/ - $empty_tuple, /*PyObject *varnames,*/ - $empty_tuple, /*PyObject *freevars,*/ - $empty_tuple, /*PyObject *cellvars,*/ - py_srcfile, /*PyObject *filename,*/ - py_funcname, /*PyObject *name,*/ - firstlineno, /*int firstlineno,*/ - $empty_bytes /*PyObject *lnotab*/ - ); - -bad: - Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -#endif - - return py_code; -} - -#endif /* CYTHON_PROFILE */ diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/StringTools.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/StringTools.c deleted file mode 100644 index 35241c64a46..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/StringTools.c +++ /dev/null @@ -1,1195 +0,0 @@ - -//////////////////// IncludeStringH.proto //////////////////// - -#include - -//////////////////// IncludeCppStringH.proto //////////////////// - -#include - -//////////////////// InitStrings.proto //////////////////// - -static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/ - -//////////////////// InitStrings //////////////////// - -static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { - while (t->p) { - #if PY_MAJOR_VERSION < 3 - if (t->is_unicode) { - *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL); - } else if (t->intern) { - *t->p = PyString_InternFromString(t->s); - } else { - *t->p = PyString_FromStringAndSize(t->s, t->n - 1); - } - #else /* Python 3+ has unicode identifiers */ - if (t->is_unicode | t->is_str) { - if (t->intern) { - *t->p = PyUnicode_InternFromString(t->s); - } else if (t->encoding) { - *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL); - } else { - *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1); - } - } else { - *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1); - } - #endif - if (!*t->p) - return -1; - // initialise cached hash value - if (PyObject_Hash(*t->p) == -1) - return -1; - ++t; - } - return 0; -} - -//////////////////// BytesContains.proto //////////////////// - -static CYTHON_INLINE int __Pyx_BytesContains(PyObject* bytes, char character); /*proto*/ - -//////////////////// BytesContains //////////////////// -//@requires: IncludeStringH - -static CYTHON_INLINE int __Pyx_BytesContains(PyObject* bytes, char character) { - const Py_ssize_t length = PyBytes_GET_SIZE(bytes); - char* char_start = PyBytes_AS_STRING(bytes); - return memchr(char_start, (unsigned char)character, (size_t)length) != NULL; -} - - -//////////////////// PyUCS4InUnicode.proto //////////////////// - -static CYTHON_INLINE int __Pyx_UnicodeContainsUCS4(PyObject* unicode, Py_UCS4 character); /*proto*/ - -//////////////////// PyUCS4InUnicode //////////////////// - -#if PY_VERSION_HEX < 0x03090000 || (defined(PyUnicode_WCHAR_KIND) && defined(PyUnicode_AS_UNICODE)) - -#if PY_VERSION_HEX < 0x03090000 -#define __Pyx_PyUnicode_AS_UNICODE(op) PyUnicode_AS_UNICODE(op) -#define __Pyx_PyUnicode_GET_SIZE(op) PyUnicode_GET_SIZE(op) -#else -// Avoid calling deprecated C-API functions in Py3.9+ that PEP-623 schedules for removal in Py3.12. -// https://www.python.org/dev/peps/pep-0623/ -#define __Pyx_PyUnicode_AS_UNICODE(op) (((PyASCIIObject *)(op))->wstr) -#define __Pyx_PyUnicode_GET_SIZE(op) ((PyCompactUnicodeObject *)(op))->wstr_length -#endif - -#if !defined(Py_UNICODE_SIZE) || Py_UNICODE_SIZE == 2 -static int __Pyx_PyUnicodeBufferContainsUCS4_SP(Py_UNICODE* buffer, Py_ssize_t length, Py_UCS4 character) { - /* handle surrogate pairs for Py_UNICODE buffers in 16bit Unicode builds */ - Py_UNICODE high_val, low_val; - Py_UNICODE* pos; - high_val = (Py_UNICODE) (0xD800 | (((character - 0x10000) >> 10) & ((1<<10)-1))); - low_val = (Py_UNICODE) (0xDC00 | ( (character - 0x10000) & ((1<<10)-1))); - for (pos=buffer; pos < buffer+length-1; pos++) { - if (unlikely((high_val == pos[0]) & (low_val == pos[1]))) return 1; - } - return 0; -} -#endif - -static int __Pyx_PyUnicodeBufferContainsUCS4_BMP(Py_UNICODE* buffer, Py_ssize_t length, Py_UCS4 character) { - Py_UNICODE uchar; - Py_UNICODE* pos; - uchar = (Py_UNICODE) character; - for (pos=buffer; pos < buffer+length; pos++) { - if (unlikely(uchar == pos[0])) return 1; - } - return 0; -} -#endif - -static CYTHON_INLINE int __Pyx_UnicodeContainsUCS4(PyObject* unicode, Py_UCS4 character) { -#if CYTHON_PEP393_ENABLED - const int kind = PyUnicode_KIND(unicode); - #ifdef PyUnicode_WCHAR_KIND - if (likely(kind != PyUnicode_WCHAR_KIND)) - #endif - { - Py_ssize_t i; - const void* udata = PyUnicode_DATA(unicode); - const Py_ssize_t length = PyUnicode_GET_LENGTH(unicode); - for (i=0; i < length; i++) { - if (unlikely(character == PyUnicode_READ(kind, udata, i))) return 1; - } - return 0; - } -#elif PY_VERSION_HEX >= 0x03090000 - #error Cannot use "UChar in Unicode" in Python 3.9 without PEP-393 unicode strings. -#elif !defined(PyUnicode_AS_UNICODE) - #error Cannot use "UChar in Unicode" in Python < 3.9 without Py_UNICODE support. -#endif - -#if PY_VERSION_HEX < 0x03090000 || (defined(PyUnicode_WCHAR_KIND) && defined(PyUnicode_AS_UNICODE)) -#if !defined(Py_UNICODE_SIZE) || Py_UNICODE_SIZE == 2 - if ((sizeof(Py_UNICODE) == 2) && unlikely(character > 65535)) { - return __Pyx_PyUnicodeBufferContainsUCS4_SP( - __Pyx_PyUnicode_AS_UNICODE(unicode), - __Pyx_PyUnicode_GET_SIZE(unicode), - character); - } else -#endif - { - return __Pyx_PyUnicodeBufferContainsUCS4_BMP( - __Pyx_PyUnicode_AS_UNICODE(unicode), - __Pyx_PyUnicode_GET_SIZE(unicode), - character); - - } -#endif -} - - -//////////////////// PyUnicodeContains.proto //////////////////// - -static CYTHON_INLINE int __Pyx_PyUnicode_ContainsTF(PyObject* substring, PyObject* text, int eq) { - int result = PyUnicode_Contains(text, substring); - return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); -} - - -//////////////////// CStringEquals.proto //////////////////// - -static CYTHON_INLINE int __Pyx_StrEq(const char *, const char *); /*proto*/ - -//////////////////// CStringEquals //////////////////// - -static CYTHON_INLINE int __Pyx_StrEq(const char *s1, const char *s2) { - while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; } - return *s1 == *s2; -} - - -//////////////////// StrEquals.proto //////////////////// -//@requires: BytesEquals -//@requires: UnicodeEquals - -#if PY_MAJOR_VERSION >= 3 -#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals -#else -#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals -#endif - - -//////////////////// UnicodeEquals.proto //////////////////// - -static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ - -//////////////////// UnicodeEquals //////////////////// -//@requires: BytesEquals - -static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { -#if CYTHON_COMPILING_IN_PYPY - return PyObject_RichCompareBool(s1, s2, equals); -#else -#if PY_MAJOR_VERSION < 3 - PyObject* owned_ref = NULL; -#endif - int s1_is_unicode, s2_is_unicode; - if (s1 == s2) { - /* as done by PyObject_RichCompareBool(); also catches the (interned) empty string */ - goto return_eq; - } - s1_is_unicode = PyUnicode_CheckExact(s1); - s2_is_unicode = PyUnicode_CheckExact(s2); -#if PY_MAJOR_VERSION < 3 - if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) { - owned_ref = PyUnicode_FromObject(s2); - if (unlikely(!owned_ref)) - return -1; - s2 = owned_ref; - s2_is_unicode = 1; - } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) { - owned_ref = PyUnicode_FromObject(s1); - if (unlikely(!owned_ref)) - return -1; - s1 = owned_ref; - s1_is_unicode = 1; - } else if (((!s2_is_unicode) & (!s1_is_unicode))) { - return __Pyx_PyBytes_Equals(s1, s2, equals); - } -#endif - if (s1_is_unicode & s2_is_unicode) { - Py_ssize_t length; - int kind; - void *data1, *data2; - if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0)) - return -1; - length = __Pyx_PyUnicode_GET_LENGTH(s1); - if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) { - goto return_ne; - } -#if CYTHON_USE_UNICODE_INTERNALS - { - Py_hash_t hash1, hash2; - #if CYTHON_PEP393_ENABLED - hash1 = ((PyASCIIObject*)s1)->hash; - hash2 = ((PyASCIIObject*)s2)->hash; - #else - hash1 = ((PyUnicodeObject*)s1)->hash; - hash2 = ((PyUnicodeObject*)s2)->hash; - #endif - if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { - goto return_ne; - } - } -#endif - // len(s1) == len(s2) >= 1 (empty string is interned, and "s1 is not s2") - kind = __Pyx_PyUnicode_KIND(s1); - if (kind != __Pyx_PyUnicode_KIND(s2)) { - goto return_ne; - } - data1 = __Pyx_PyUnicode_DATA(s1); - data2 = __Pyx_PyUnicode_DATA(s2); - if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) { - goto return_ne; - } else if (length == 1) { - goto return_eq; - } else { - int result = memcmp(data1, data2, (size_t)(length * kind)); - #if PY_MAJOR_VERSION < 3 - Py_XDECREF(owned_ref); - #endif - return (equals == Py_EQ) ? (result == 0) : (result != 0); - } - } else if ((s1 == Py_None) & s2_is_unicode) { - goto return_ne; - } else if ((s2 == Py_None) & s1_is_unicode) { - goto return_ne; - } else { - int result; - PyObject* py_result = PyObject_RichCompare(s1, s2, equals); - #if PY_MAJOR_VERSION < 3 - Py_XDECREF(owned_ref); - #endif - if (!py_result) - return -1; - result = __Pyx_PyObject_IsTrue(py_result); - Py_DECREF(py_result); - return result; - } -return_eq: - #if PY_MAJOR_VERSION < 3 - Py_XDECREF(owned_ref); - #endif - return (equals == Py_EQ); -return_ne: - #if PY_MAJOR_VERSION < 3 - Py_XDECREF(owned_ref); - #endif - return (equals == Py_NE); -#endif -} - - -//////////////////// BytesEquals.proto //////////////////// - -static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/ - -//////////////////// BytesEquals //////////////////// -//@requires: IncludeStringH - -static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { -#if CYTHON_COMPILING_IN_PYPY - return PyObject_RichCompareBool(s1, s2, equals); -#else - if (s1 == s2) { - /* as done by PyObject_RichCompareBool(); also catches the (interned) empty string */ - return (equals == Py_EQ); - } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) { - const char *ps1, *ps2; - Py_ssize_t length = PyBytes_GET_SIZE(s1); - if (length != PyBytes_GET_SIZE(s2)) - return (equals == Py_NE); - // len(s1) == len(s2) >= 1 (empty string is interned, and "s1 is not s2") - ps1 = PyBytes_AS_STRING(s1); - ps2 = PyBytes_AS_STRING(s2); - if (ps1[0] != ps2[0]) { - return (equals == Py_NE); - } else if (length == 1) { - return (equals == Py_EQ); - } else { - int result; -#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000) - Py_hash_t hash1, hash2; - hash1 = ((PyBytesObject*)s1)->ob_shash; - hash2 = ((PyBytesObject*)s2)->ob_shash; - if (hash1 != hash2 && hash1 != -1 && hash2 != -1) { - return (equals == Py_NE); - } -#endif - result = memcmp(ps1, ps2, (size_t)length); - return (equals == Py_EQ) ? (result == 0) : (result != 0); - } - } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) { - return (equals == Py_NE); - } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) { - return (equals == Py_NE); - } else { - int result; - PyObject* py_result = PyObject_RichCompare(s1, s2, equals); - if (!py_result) - return -1; - result = __Pyx_PyObject_IsTrue(py_result); - Py_DECREF(py_result); - return result; - } -#endif -} - -//////////////////// GetItemIntByteArray.proto //////////////////// - -#define __Pyx_GetItemInt_ByteArray(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ - __Pyx_GetItemInt_ByteArray_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ - (PyErr_SetString(PyExc_IndexError, "bytearray index out of range"), -1)) - -static CYTHON_INLINE int __Pyx_GetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i, - int wraparound, int boundscheck); - -//////////////////// GetItemIntByteArray //////////////////// - -static CYTHON_INLINE int __Pyx_GetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i, - int wraparound, int boundscheck) { - Py_ssize_t length; - if (wraparound | boundscheck) { - length = PyByteArray_GET_SIZE(string); - if (wraparound & unlikely(i < 0)) i += length; - if ((!boundscheck) || likely(__Pyx_is_valid_index(i, length))) { - return (unsigned char) (PyByteArray_AS_STRING(string)[i]); - } else { - PyErr_SetString(PyExc_IndexError, "bytearray index out of range"); - return -1; - } - } else { - return (unsigned char) (PyByteArray_AS_STRING(string)[i]); - } -} - - -//////////////////// SetItemIntByteArray.proto //////////////////// - -#define __Pyx_SetItemInt_ByteArray(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ - __Pyx_SetItemInt_ByteArray_Fast(o, (Py_ssize_t)i, v, wraparound, boundscheck) : \ - (PyErr_SetString(PyExc_IndexError, "bytearray index out of range"), -1)) - -static CYTHON_INLINE int __Pyx_SetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i, unsigned char v, - int wraparound, int boundscheck); - -//////////////////// SetItemIntByteArray //////////////////// - -static CYTHON_INLINE int __Pyx_SetItemInt_ByteArray_Fast(PyObject* string, Py_ssize_t i, unsigned char v, - int wraparound, int boundscheck) { - Py_ssize_t length; - if (wraparound | boundscheck) { - length = PyByteArray_GET_SIZE(string); - if (wraparound & unlikely(i < 0)) i += length; - if ((!boundscheck) || likely(__Pyx_is_valid_index(i, length))) { - PyByteArray_AS_STRING(string)[i] = (char) v; - return 0; - } else { - PyErr_SetString(PyExc_IndexError, "bytearray index out of range"); - return -1; - } - } else { - PyByteArray_AS_STRING(string)[i] = (char) v; - return 0; - } -} - - -//////////////////// GetItemIntUnicode.proto //////////////////// - -#define __Pyx_GetItemInt_Unicode(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ - (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ - __Pyx_GetItemInt_Unicode_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ - (PyErr_SetString(PyExc_IndexError, "string index out of range"), (Py_UCS4)-1)) - -static CYTHON_INLINE Py_UCS4 __Pyx_GetItemInt_Unicode_Fast(PyObject* ustring, Py_ssize_t i, - int wraparound, int boundscheck); - -//////////////////// GetItemIntUnicode //////////////////// - -static CYTHON_INLINE Py_UCS4 __Pyx_GetItemInt_Unicode_Fast(PyObject* ustring, Py_ssize_t i, - int wraparound, int boundscheck) { - Py_ssize_t length; - if (unlikely(__Pyx_PyUnicode_READY(ustring) < 0)) return (Py_UCS4)-1; - if (wraparound | boundscheck) { - length = __Pyx_PyUnicode_GET_LENGTH(ustring); - if (wraparound & unlikely(i < 0)) i += length; - if ((!boundscheck) || likely(__Pyx_is_valid_index(i, length))) { - return __Pyx_PyUnicode_READ_CHAR(ustring, i); - } else { - PyErr_SetString(PyExc_IndexError, "string index out of range"); - return (Py_UCS4)-1; - } - } else { - return __Pyx_PyUnicode_READ_CHAR(ustring, i); - } -} - - -/////////////// decode_c_string_utf16.proto /////////////// - -static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16(const char *s, Py_ssize_t size, const char *errors) { - int byteorder = 0; - return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); -} -static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16LE(const char *s, Py_ssize_t size, const char *errors) { - int byteorder = -1; - return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); -} -static CYTHON_INLINE PyObject *__Pyx_PyUnicode_DecodeUTF16BE(const char *s, Py_ssize_t size, const char *errors) { - int byteorder = 1; - return PyUnicode_DecodeUTF16(s, size, errors, &byteorder); -} - -/////////////// decode_cpp_string.proto /////////////// -//@requires: IncludeCppStringH -//@requires: decode_c_bytes - -static CYTHON_INLINE PyObject* __Pyx_decode_cpp_string( - std::string cppstring, Py_ssize_t start, Py_ssize_t stop, - const char* encoding, const char* errors, - PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { - return __Pyx_decode_c_bytes( - cppstring.data(), cppstring.size(), start, stop, encoding, errors, decode_func); -} - -/////////////// decode_c_string.proto /////////////// - -static CYTHON_INLINE PyObject* __Pyx_decode_c_string( - const char* cstring, Py_ssize_t start, Py_ssize_t stop, - const char* encoding, const char* errors, - PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); - -/////////////// decode_c_string /////////////// -//@requires: IncludeStringH -//@requires: decode_c_string_utf16 -//@substitute: naming - -/* duplicate code to avoid calling strlen() if start >= 0 and stop >= 0 */ -static CYTHON_INLINE PyObject* __Pyx_decode_c_string( - const char* cstring, Py_ssize_t start, Py_ssize_t stop, - const char* encoding, const char* errors, - PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { - Py_ssize_t length; - if (unlikely((start < 0) | (stop < 0))) { - size_t slen = strlen(cstring); - if (unlikely(slen > (size_t) PY_SSIZE_T_MAX)) { - PyErr_SetString(PyExc_OverflowError, - "c-string too long to convert to Python"); - return NULL; - } - length = (Py_ssize_t) slen; - if (start < 0) { - start += length; - if (start < 0) - start = 0; - } - if (stop < 0) - stop += length; - } - if (unlikely(stop <= start)) - return __Pyx_NewRef($empty_unicode); - length = stop - start; - cstring += start; - if (decode_func) { - return decode_func(cstring, length, errors); - } else { - return PyUnicode_Decode(cstring, length, encoding, errors); - } -} - -/////////////// decode_c_bytes.proto /////////////// - -static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( - const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, - const char* encoding, const char* errors, - PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)); - -/////////////// decode_c_bytes /////////////// -//@requires: decode_c_string_utf16 -//@substitute: naming - -static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( - const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, - const char* encoding, const char* errors, - PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { - if (unlikely((start < 0) | (stop < 0))) { - if (start < 0) { - start += length; - if (start < 0) - start = 0; - } - if (stop < 0) - stop += length; - } - if (stop > length) - stop = length; - if (unlikely(stop <= start)) - return __Pyx_NewRef($empty_unicode); - length = stop - start; - cstring += start; - if (decode_func) { - return decode_func(cstring, length, errors); - } else { - return PyUnicode_Decode(cstring, length, encoding, errors); - } -} - -/////////////// decode_bytes.proto /////////////// -//@requires: decode_c_bytes - -static CYTHON_INLINE PyObject* __Pyx_decode_bytes( - PyObject* string, Py_ssize_t start, Py_ssize_t stop, - const char* encoding, const char* errors, - PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { - return __Pyx_decode_c_bytes( - PyBytes_AS_STRING(string), PyBytes_GET_SIZE(string), - start, stop, encoding, errors, decode_func); -} - -/////////////// decode_bytearray.proto /////////////// -//@requires: decode_c_bytes - -static CYTHON_INLINE PyObject* __Pyx_decode_bytearray( - PyObject* string, Py_ssize_t start, Py_ssize_t stop, - const char* encoding, const char* errors, - PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { - return __Pyx_decode_c_bytes( - PyByteArray_AS_STRING(string), PyByteArray_GET_SIZE(string), - start, stop, encoding, errors, decode_func); -} - -/////////////// PyUnicode_Substring.proto /////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring( - PyObject* text, Py_ssize_t start, Py_ssize_t stop); - -/////////////// PyUnicode_Substring /////////////// -//@substitute: naming - -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring( - PyObject* text, Py_ssize_t start, Py_ssize_t stop) { - Py_ssize_t length; - if (unlikely(__Pyx_PyUnicode_READY(text) == -1)) return NULL; - length = __Pyx_PyUnicode_GET_LENGTH(text); - if (start < 0) { - start += length; - if (start < 0) - start = 0; - } - if (stop < 0) - stop += length; - else if (stop > length) - stop = length; - if (stop <= start) - return __Pyx_NewRef($empty_unicode); -#if CYTHON_PEP393_ENABLED - return PyUnicode_FromKindAndData(PyUnicode_KIND(text), - PyUnicode_1BYTE_DATA(text) + start*PyUnicode_KIND(text), stop-start); -#else - return PyUnicode_FromUnicode(PyUnicode_AS_UNICODE(text)+start, stop-start); -#endif -} - - -/////////////// py_unicode_istitle.proto /////////////// - -// Py_UNICODE_ISTITLE() doesn't match unicode.istitle() as the latter -// additionally allows character that comply with Py_UNICODE_ISUPPER() - -#if PY_VERSION_HEX < 0x030200A2 -static CYTHON_INLINE int __Pyx_Py_UNICODE_ISTITLE(Py_UNICODE uchar) -#else -static CYTHON_INLINE int __Pyx_Py_UNICODE_ISTITLE(Py_UCS4 uchar) -#endif -{ - return Py_UNICODE_ISTITLE(uchar) || Py_UNICODE_ISUPPER(uchar); -} - - -/////////////// unicode_tailmatch.proto /////////////// - -static int __Pyx_PyUnicode_Tailmatch( - PyObject* s, PyObject* substr, Py_ssize_t start, Py_ssize_t end, int direction); /*proto*/ - -/////////////// unicode_tailmatch /////////////// - -// Python's unicode.startswith() and unicode.endswith() support a -// tuple of prefixes/suffixes, whereas it's much more common to -// test for a single unicode string. - -static int __Pyx_PyUnicode_TailmatchTuple(PyObject* s, PyObject* substrings, - Py_ssize_t start, Py_ssize_t end, int direction) { - Py_ssize_t i, count = PyTuple_GET_SIZE(substrings); - for (i = 0; i < count; i++) { - Py_ssize_t result; -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - result = PyUnicode_Tailmatch(s, PyTuple_GET_ITEM(substrings, i), - start, end, direction); -#else - PyObject* sub = PySequence_ITEM(substrings, i); - if (unlikely(!sub)) return -1; - result = PyUnicode_Tailmatch(s, sub, start, end, direction); - Py_DECREF(sub); -#endif - if (result) { - return (int) result; - } - } - return 0; -} - -static int __Pyx_PyUnicode_Tailmatch(PyObject* s, PyObject* substr, - Py_ssize_t start, Py_ssize_t end, int direction) { - if (unlikely(PyTuple_Check(substr))) { - return __Pyx_PyUnicode_TailmatchTuple(s, substr, start, end, direction); - } - return (int) PyUnicode_Tailmatch(s, substr, start, end, direction); -} - - -/////////////// bytes_tailmatch.proto /////////////// - -static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg, - Py_ssize_t start, Py_ssize_t end, int direction); /*proto*/ -static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr, - Py_ssize_t start, Py_ssize_t end, int direction); /*proto*/ - -/////////////// bytes_tailmatch /////////////// - -static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg, - Py_ssize_t start, Py_ssize_t end, int direction) { - const char* self_ptr = PyBytes_AS_STRING(self); - Py_ssize_t self_len = PyBytes_GET_SIZE(self); - const char* sub_ptr; - Py_ssize_t sub_len; - int retval; - - Py_buffer view; - view.obj = NULL; - - if ( PyBytes_Check(arg) ) { - sub_ptr = PyBytes_AS_STRING(arg); - sub_len = PyBytes_GET_SIZE(arg); - } -#if PY_MAJOR_VERSION < 3 - // Python 2.x allows mixing unicode and str - else if ( PyUnicode_Check(arg) ) { - return (int) PyUnicode_Tailmatch(self, arg, start, end, direction); - } -#endif - else { - if (unlikely(PyObject_GetBuffer(self, &view, PyBUF_SIMPLE) == -1)) - return -1; - sub_ptr = (const char*) view.buf; - sub_len = view.len; - } - - if (end > self_len) - end = self_len; - else if (end < 0) - end += self_len; - if (end < 0) - end = 0; - if (start < 0) - start += self_len; - if (start < 0) - start = 0; - - if (direction > 0) { - /* endswith */ - if (end-sub_len > start) - start = end - sub_len; - } - - if (start + sub_len <= end) - retval = !memcmp(self_ptr+start, sub_ptr, (size_t)sub_len); - else - retval = 0; - - if (view.obj) - PyBuffer_Release(&view); - - return retval; -} - -static int __Pyx_PyBytes_TailmatchTuple(PyObject* self, PyObject* substrings, - Py_ssize_t start, Py_ssize_t end, int direction) { - Py_ssize_t i, count = PyTuple_GET_SIZE(substrings); - for (i = 0; i < count; i++) { - int result; -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - result = __Pyx_PyBytes_SingleTailmatch(self, PyTuple_GET_ITEM(substrings, i), - start, end, direction); -#else - PyObject* sub = PySequence_ITEM(substrings, i); - if (unlikely(!sub)) return -1; - result = __Pyx_PyBytes_SingleTailmatch(self, sub, start, end, direction); - Py_DECREF(sub); -#endif - if (result) { - return result; - } - } - return 0; -} - -static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr, - Py_ssize_t start, Py_ssize_t end, int direction) { - if (unlikely(PyTuple_Check(substr))) { - return __Pyx_PyBytes_TailmatchTuple(self, substr, start, end, direction); - } - - return __Pyx_PyBytes_SingleTailmatch(self, substr, start, end, direction); -} - - -/////////////// str_tailmatch.proto /////////////// - -static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py_ssize_t start, - Py_ssize_t end, int direction); /*proto*/ - -/////////////// str_tailmatch /////////////// -//@requires: bytes_tailmatch -//@requires: unicode_tailmatch - -static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py_ssize_t start, - Py_ssize_t end, int direction) -{ - // We do not use a C compiler macro here to avoid "unused function" - // warnings for the *_Tailmatch() function that is not being used in - // the specific CPython version. The C compiler will generate the same - // code anyway, and will usually just remove the unused function. - if (PY_MAJOR_VERSION < 3) - return __Pyx_PyBytes_Tailmatch(self, arg, start, end, direction); - else - return __Pyx_PyUnicode_Tailmatch(self, arg, start, end, direction); -} - - -/////////////// bytes_index.proto /////////////// - -static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds); /*proto*/ - -/////////////// bytes_index /////////////// - -static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds) { - if (index < 0) - index += PyBytes_GET_SIZE(bytes); - if (check_bounds) { - Py_ssize_t size = PyBytes_GET_SIZE(bytes); - if (unlikely(!__Pyx_is_valid_index(index, size))) { - PyErr_SetString(PyExc_IndexError, "string index out of range"); - return (char) -1; - } - } - return PyBytes_AS_STRING(bytes)[index]; -} - - -//////////////////// StringJoin.proto //////////////////// - -#if PY_MAJOR_VERSION < 3 -#define __Pyx_PyString_Join __Pyx_PyBytes_Join -#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v)) -#else -#define __Pyx_PyString_Join PyUnicode_Join -#define __Pyx_PyBaseString_Join PyUnicode_Join -#endif - -#if CYTHON_COMPILING_IN_CPYTHON - #if PY_MAJOR_VERSION < 3 - #define __Pyx_PyBytes_Join _PyString_Join - #else - #define __Pyx_PyBytes_Join _PyBytes_Join - #endif -#else -static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); /*proto*/ -#endif - - -//////////////////// StringJoin //////////////////// - -#if !CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) { - return PyObject_CallMethodObjArgs(sep, PYIDENT("join"), values, NULL); -} -#endif - - -/////////////// JoinPyUnicode.proto /////////////// - -static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, - Py_UCS4 max_char); - -/////////////// JoinPyUnicode /////////////// -//@requires: IncludeStringH -//@substitute: naming - -static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, - CYTHON_UNUSED Py_UCS4 max_char) { -#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - PyObject *result_uval; - int result_ukind; - Py_ssize_t i, char_pos; - void *result_udata; -#if CYTHON_PEP393_ENABLED - // Py 3.3+ (post PEP-393) - result_uval = PyUnicode_New(result_ulength, max_char); - if (unlikely(!result_uval)) return NULL; - result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND; - result_udata = PyUnicode_DATA(result_uval); -#else - // Py 2.x/3.2 (pre PEP-393) - result_uval = PyUnicode_FromUnicode(NULL, result_ulength); - if (unlikely(!result_uval)) return NULL; - result_ukind = sizeof(Py_UNICODE); - result_udata = PyUnicode_AS_UNICODE(result_uval); -#endif - - char_pos = 0; - for (i=0; i < value_count; i++) { - int ukind; - Py_ssize_t ulength; - void *udata; - PyObject *uval = PyTuple_GET_ITEM(value_tuple, i); - if (unlikely(__Pyx_PyUnicode_READY(uval))) - goto bad; - ulength = __Pyx_PyUnicode_GET_LENGTH(uval); - if (unlikely(!ulength)) - continue; - if (unlikely(char_pos + ulength < 0)) - goto overflow; - ukind = __Pyx_PyUnicode_KIND(uval); - udata = __Pyx_PyUnicode_DATA(uval); - if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) { - memcpy((char *)result_udata + char_pos * result_ukind, udata, (size_t) (ulength * result_ukind)); - } else { - #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters) - _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength); - #else - Py_ssize_t j; - for (j=0; j < ulength; j++) { - Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j); - __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar); - } - #endif - } - char_pos += ulength; - } - return result_uval; -overflow: - PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string"); -bad: - Py_DECREF(result_uval); - return NULL; -#else - // non-CPython fallback - result_ulength++; - value_count++; - return PyUnicode_Join($empty_unicode, value_tuple); -#endif -} - - -/////////////// BuildPyUnicode.proto /////////////// - -static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, - int prepend_sign, char padding_char); - -/////////////// BuildPyUnicode /////////////// - -// Create a PyUnicode object from an ASCII char*, e.g. a formatted number. - -static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, - int prepend_sign, char padding_char) { - PyObject *uval; - Py_ssize_t uoffset = ulength - clength; -#if CYTHON_USE_UNICODE_INTERNALS - Py_ssize_t i; -#if CYTHON_PEP393_ENABLED - // Py 3.3+ (post PEP-393) - void *udata; - uval = PyUnicode_New(ulength, 127); - if (unlikely(!uval)) return NULL; - udata = PyUnicode_DATA(uval); -#else - // Py 2.x/3.2 (pre PEP-393) - Py_UNICODE *udata; - uval = PyUnicode_FromUnicode(NULL, ulength); - if (unlikely(!uval)) return NULL; - udata = PyUnicode_AS_UNICODE(uval); -#endif - if (uoffset > 0) { - i = 0; - if (prepend_sign) { - __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, 0, '-'); - i++; - } - for (; i < uoffset; i++) { - __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, i, padding_char); - } - } - for (i=0; i < clength; i++) { - __Pyx_PyUnicode_WRITE(PyUnicode_1BYTE_KIND, udata, uoffset+i, chars[i]); - } - -#else - // non-CPython - { - PyObject *sign = NULL, *padding = NULL; - uval = NULL; - if (uoffset > 0) { - prepend_sign = !!prepend_sign; - if (uoffset > prepend_sign) { - padding = PyUnicode_FromOrdinal(padding_char); - if (likely(padding) && uoffset > prepend_sign + 1) { - PyObject *tmp; - PyObject *repeat = PyInt_FromSize_t(uoffset - prepend_sign); - if (unlikely(!repeat)) goto done_or_error; - tmp = PyNumber_Multiply(padding, repeat); - Py_DECREF(repeat); - Py_DECREF(padding); - padding = tmp; - } - if (unlikely(!padding)) goto done_or_error; - } - if (prepend_sign) { - sign = PyUnicode_FromOrdinal('-'); - if (unlikely(!sign)) goto done_or_error; - } - } - - uval = PyUnicode_DecodeASCII(chars, clength, NULL); - if (likely(uval) && padding) { - PyObject *tmp = PyNumber_Add(padding, uval); - Py_DECREF(uval); - uval = tmp; - } - if (likely(uval) && sign) { - PyObject *tmp = PyNumber_Add(sign, uval); - Py_DECREF(uval); - uval = tmp; - } -done_or_error: - Py_XDECREF(padding); - Py_XDECREF(sign); - } -#endif - - return uval; -} - - -//////////////////// ByteArrayAppendObject.proto //////////////////// - -static CYTHON_INLINE int __Pyx_PyByteArray_AppendObject(PyObject* bytearray, PyObject* value); - -//////////////////// ByteArrayAppendObject //////////////////// -//@requires: ByteArrayAppend - -static CYTHON_INLINE int __Pyx_PyByteArray_AppendObject(PyObject* bytearray, PyObject* value) { - Py_ssize_t ival; -#if PY_MAJOR_VERSION < 3 - if (unlikely(PyString_Check(value))) { - if (unlikely(PyString_GET_SIZE(value) != 1)) { - PyErr_SetString(PyExc_ValueError, "string must be of size 1"); - return -1; - } - ival = (unsigned char) (PyString_AS_STRING(value)[0]); - } else -#endif -#if CYTHON_USE_PYLONG_INTERNALS - if (likely(PyLong_CheckExact(value)) && likely(Py_SIZE(value) == 1 || Py_SIZE(value) == 0)) { - if (Py_SIZE(value) == 0) { - ival = 0; - } else { - ival = ((PyLongObject*)value)->ob_digit[0]; - if (unlikely(ival > 255)) goto bad_range; - } - } else -#endif - { - // CPython calls PyNumber_Index() internally - ival = __Pyx_PyIndex_AsSsize_t(value); - if (unlikely(!__Pyx_is_valid_index(ival, 256))) { - if (ival == -1 && PyErr_Occurred()) - return -1; - goto bad_range; - } - } - return __Pyx_PyByteArray_Append(bytearray, ival); -bad_range: - PyErr_SetString(PyExc_ValueError, "byte must be in range(0, 256)"); - return -1; -} - -//////////////////// ByteArrayAppend.proto //////////////////// - -static CYTHON_INLINE int __Pyx_PyByteArray_Append(PyObject* bytearray, int value); - -//////////////////// ByteArrayAppend //////////////////// -//@requires: ObjectHandling.c::PyObjectCallMethod1 - -static CYTHON_INLINE int __Pyx_PyByteArray_Append(PyObject* bytearray, int value) { - PyObject *pyval, *retval; -#if CYTHON_COMPILING_IN_CPYTHON - if (likely(__Pyx_is_valid_index(value, 256))) { - Py_ssize_t n = Py_SIZE(bytearray); - if (likely(n != PY_SSIZE_T_MAX)) { - if (unlikely(PyByteArray_Resize(bytearray, n + 1) < 0)) - return -1; - PyByteArray_AS_STRING(bytearray)[n] = value; - return 0; - } - } else { - PyErr_SetString(PyExc_ValueError, "byte must be in range(0, 256)"); - return -1; - } -#endif - pyval = PyInt_FromLong(value); - if (unlikely(!pyval)) - return -1; - retval = __Pyx_PyObject_CallMethod1(bytearray, PYIDENT("append"), pyval); - Py_DECREF(pyval); - if (unlikely(!retval)) - return -1; - Py_DECREF(retval); - return 0; -} - - -//////////////////// PyObjectFormat.proto //////////////////// - -#if CYTHON_USE_UNICODE_WRITER -static PyObject* __Pyx_PyObject_Format(PyObject* s, PyObject* f); -#else -#define __Pyx_PyObject_Format(s, f) PyObject_Format(s, f) -#endif - -//////////////////// PyObjectFormat //////////////////// - -#if CYTHON_USE_UNICODE_WRITER -static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) { - int ret; - _PyUnicodeWriter writer; - - if (likely(PyFloat_CheckExact(obj))) { - // copied from CPython 3.5 "float__format__()" in floatobject.c -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000 - _PyUnicodeWriter_Init(&writer, 0); -#else - _PyUnicodeWriter_Init(&writer); -#endif - ret = _PyFloat_FormatAdvancedWriter( - &writer, - obj, - format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); - } else if (likely(PyLong_CheckExact(obj))) { - // copied from CPython 3.5 "long__format__()" in longobject.c -#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x03040000 - _PyUnicodeWriter_Init(&writer, 0); -#else - _PyUnicodeWriter_Init(&writer); -#endif - ret = _PyLong_FormatAdvancedWriter( - &writer, - obj, - format_spec, 0, PyUnicode_GET_LENGTH(format_spec)); - } else { - return PyObject_Format(obj, format_spec); - } - - if (unlikely(ret == -1)) { - _PyUnicodeWriter_Dealloc(&writer); - return NULL; - } - return _PyUnicodeWriter_Finish(&writer); -} -#endif - - -//////////////////// PyObjectFormatSimple.proto //////////////////// - -#if CYTHON_COMPILING_IN_PYPY - #define __Pyx_PyObject_FormatSimple(s, f) ( \ - likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) : \ - PyObject_Format(s, f)) -#elif PY_MAJOR_VERSION < 3 - // str is common in Py2, but formatting must return a Unicode string - #define __Pyx_PyObject_FormatSimple(s, f) ( \ - likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) : \ - likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") : \ - PyObject_Format(s, f)) -#elif CYTHON_USE_TYPE_SLOTS - // Py3 nicely returns unicode strings from str() which makes this quite efficient for builtin types - #define __Pyx_PyObject_FormatSimple(s, f) ( \ - likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) : \ - likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_str(s) : \ - likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_str(s) : \ - PyObject_Format(s, f)) -#else - #define __Pyx_PyObject_FormatSimple(s, f) ( \ - likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) : \ - PyObject_Format(s, f)) -#endif - - -//////////////////// PyObjectFormatAndDecref.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f); -static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f); - -//////////////////// PyObjectFormatAndDecref //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { - if (unlikely(!s)) return NULL; - if (likely(PyUnicode_CheckExact(s))) return s; - #if PY_MAJOR_VERSION < 3 - // str is common in Py2, but formatting must return a Unicode string - if (likely(PyString_CheckExact(s))) { - PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict"); - Py_DECREF(s); - return result; - } - #endif - return __Pyx_PyObject_FormatAndDecref(s, f); -} - -static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) { - PyObject *result = PyObject_Format(s, f); - Py_DECREF(s); - return result; -} - - -//////////////////// PyUnicode_Unicode.proto //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj);/*proto*/ - -//////////////////// PyUnicode_Unicode //////////////////// - -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) { - if (unlikely(obj == Py_None)) - obj = PYUNICODE("None"); - return __Pyx_NewRef(obj); -} - - -//////////////////// PyObject_Unicode.proto //////////////////// - -#if PY_MAJOR_VERSION >= 3 -#define __Pyx_PyObject_Unicode(obj) \ - (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj)) -#else -#define __Pyx_PyObject_Unicode(obj) \ - (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj)) -#endif diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestCyUtilityLoader.pyx b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestCyUtilityLoader.pyx deleted file mode 100644 index 00e7a7681b8..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestCyUtilityLoader.pyx +++ /dev/null @@ -1,8 +0,0 @@ -########## TestCyUtilityLoader ########## -#@requires: OtherUtility - -test {{cy_loader}} impl - - -########## OtherUtility ########## -req {{cy_loader}} impl diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestCythonScope.pyx b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestCythonScope.pyx deleted file mode 100644 index f585be29832..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestCythonScope.pyx +++ /dev/null @@ -1,64 +0,0 @@ -########## TestClass ########## -# These utilities are for testing purposes - -cdef extern from *: - cdef object __pyx_test_dep(object) - -@cname('__pyx_TestClass') -cdef class TestClass(object): - cdef public int value - - def __init__(self, int value): - self.value = value - - def __str__(self): - return 'TestClass(%d)' % self.value - - cdef cdef_method(self, int value): - print 'Hello from cdef_method', value - - cpdef cpdef_method(self, int value): - print 'Hello from cpdef_method', value - - def def_method(self, int value): - print 'Hello from def_method', value - - @cname('cdef_cname') - cdef cdef_cname_method(self, int value): - print "Hello from cdef_cname_method", value - - @cname('cpdef_cname') - cpdef cpdef_cname_method(self, int value): - print "Hello from cpdef_cname_method", value - - @cname('def_cname') - def def_cname_method(self, int value): - print "Hello from def_cname_method", value - -@cname('__pyx_test_call_other_cy_util') -cdef test_call(obj): - print 'test_call' - __pyx_test_dep(obj) - -@cname('__pyx_TestClass_New') -cdef _testclass_new(int value): - return TestClass(value) - -########### TestDep ########## - -@cname('__pyx_test_dep') -cdef test_dep(obj): - print 'test_dep', obj - -########## TestScope ########## - -@cname('__pyx_testscope') -cdef object _testscope(int value): - return "hello from cython scope, value=%d" % value - -########## View.TestScope ########## - -@cname('__pyx_view_testscope') -cdef object _testscope(int value): - return "hello from cython.view scope, value=%d" % value - diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestUtilityLoader.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestUtilityLoader.c deleted file mode 100644 index 595305f211b..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TestUtilityLoader.c +++ /dev/null @@ -1,12 +0,0 @@ -////////// TestUtilityLoader.proto ////////// -test {{loader}} prototype - -////////// TestUtilityLoader ////////// -//@requires: OtherUtility -test {{loader}} impl - -////////// OtherUtility.proto ////////// -req {{loader}} proto - -////////// OtherUtility ////////// -req {{loader}} impl diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TypeConversion.c b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TypeConversion.c deleted file mode 100644 index 7a7bf0f7999..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/TypeConversion.c +++ /dev/null @@ -1,1017 +0,0 @@ -/////////////// TypeConversions.proto /////////////// - -/* Type Conversion Predeclarations */ - -#define __Pyx_uchar_cast(c) ((unsigned char)c) -#define __Pyx_long_cast(x) ((long)x) - -#define __Pyx_fits_Py_ssize_t(v, type, is_signed) ( \ - (sizeof(type) < sizeof(Py_ssize_t)) || \ - (sizeof(type) > sizeof(Py_ssize_t) && \ - likely(v < (type)PY_SSIZE_T_MAX || \ - v == (type)PY_SSIZE_T_MAX) && \ - (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \ - v == (type)PY_SSIZE_T_MIN))) || \ - (sizeof(type) == sizeof(Py_ssize_t) && \ - (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \ - v == (type)PY_SSIZE_T_MAX))) ) - -static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { - // Optimisation from Section 14.2 "Bounds Checking" in - // https://www.agner.org/optimize/optimizing_cpp.pdf - // See https://bugs.python.org/issue28397 - // The cast to unsigned effectively tests for "0 <= i < limit". - return (size_t) i < (size_t) limit; -} - -// fast and unsafe abs(Py_ssize_t) that ignores the overflow for (-PY_SSIZE_T_MAX-1) -#if defined (__cplusplus) && __cplusplus >= 201103L - #include - #define __Pyx_sst_abs(value) std::abs(value) -#elif SIZEOF_INT >= SIZEOF_SIZE_T - #define __Pyx_sst_abs(value) abs(value) -#elif SIZEOF_LONG >= SIZEOF_SIZE_T - #define __Pyx_sst_abs(value) labs(value) -#elif defined (_MSC_VER) - // abs() is defined for long, but 64-bits type on MSVC is long long. - // Use MS-specific _abs64 instead. - #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value)) -#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - #define __Pyx_sst_abs(value) llabs(value) -#elif defined (__GNUC__) - // gcc or clang on 64 bit windows. - #define __Pyx_sst_abs(value) __builtin_llabs(value) -#else - #define __Pyx_sst_abs(value) ((value<0) ? -value : value) -#endif - -static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*); -static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); - -#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) -#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) -#define __Pyx_PyBytes_FromString PyBytes_FromString -#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); - -#if PY_MAJOR_VERSION < 3 - #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString - #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize -#else - #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString - #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize -#endif - -#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s)) -#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s)) -#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s)) -#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s)) -#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s)) -#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s)) -#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s)) -#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s) -#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s) -#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s) -#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s) -#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s) - -// There used to be a Py_UNICODE_strlen() in CPython 3.x, but it is deprecated since Py3.3. -static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) { - const Py_UNICODE *u_end = u; - while (*u_end++) ; - return (size_t)(u_end - u - 1); -} - -#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) -#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode -#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode - -#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) -#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) -static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); -static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); -static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); -static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - -#define __Pyx_PySequence_Tuple(obj) \ - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - -static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); -static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - -#if CYTHON_ASSUME_SAFE_MACROS -#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) -#else -#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) -#endif -#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) - -#if PY_MAJOR_VERSION >= 3 -#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x)) -#else -#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x)) -#endif -#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x)) - -#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII -static int __Pyx_sys_getdefaultencoding_not_ascii; -static int __Pyx_init_sys_getdefaultencoding_params(void) { - PyObject* sys; - PyObject* default_encoding = NULL; - PyObject* ascii_chars_u = NULL; - PyObject* ascii_chars_b = NULL; - const char* default_encoding_c; - sys = PyImport_ImportModule("sys"); - if (!sys) goto bad; - default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL); - Py_DECREF(sys); - if (!default_encoding) goto bad; - default_encoding_c = PyBytes_AsString(default_encoding); - if (!default_encoding_c) goto bad; - if (strcmp(default_encoding_c, "ascii") == 0) { - __Pyx_sys_getdefaultencoding_not_ascii = 0; - } else { - char ascii_chars[128]; - int c; - for (c = 0; c < 128; c++) { - ascii_chars[c] = c; - } - __Pyx_sys_getdefaultencoding_not_ascii = 1; - ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); - if (!ascii_chars_u) goto bad; - ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); - if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { - PyErr_Format( - PyExc_ValueError, - "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", - default_encoding_c); - goto bad; - } - Py_DECREF(ascii_chars_u); - Py_DECREF(ascii_chars_b); - } - Py_DECREF(default_encoding); - return 0; -bad: - Py_XDECREF(default_encoding); - Py_XDECREF(ascii_chars_u); - Py_XDECREF(ascii_chars_b); - return -1; -} -#endif - -#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 -#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) -#else -#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) - -// __PYX_DEFAULT_STRING_ENCODING is either a user provided string constant -// or we need to look it up here -#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT -static char* __PYX_DEFAULT_STRING_ENCODING; - -static int __Pyx_init_sys_getdefaultencoding_params(void) { - PyObject* sys; - PyObject* default_encoding = NULL; - char* default_encoding_c; - - sys = PyImport_ImportModule("sys"); - if (!sys) goto bad; - default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); - Py_DECREF(sys); - if (!default_encoding) goto bad; - default_encoding_c = PyBytes_AsString(default_encoding); - if (!default_encoding_c) goto bad; - __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); - if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; - strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); - Py_DECREF(default_encoding); - return 0; -bad: - Py_XDECREF(default_encoding); - return -1; -} -#endif -#endif - -/////////////// TypeConversions /////////////// - -/* Type Conversion Functions */ - -static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { - return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str)); -} - -// Py3.7 returns a "const char*" for unicode strings -static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) { - Py_ssize_t ignore; - return __Pyx_PyObject_AsStringAndSize(o, &ignore); -} - -#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT -#if !CYTHON_PEP393_ENABLED -static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { - char* defenc_c; - // borrowed reference, cached internally in 'o' by CPython - PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); - if (!defenc) return NULL; - defenc_c = PyBytes_AS_STRING(defenc); -#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII - { - char* end = defenc_c + PyBytes_GET_SIZE(defenc); - char* c; - for (c = defenc_c; c < end; c++) { - if ((unsigned char) (*c) >= 128) { - // raise the error - PyUnicode_AsASCIIString(o); - return NULL; - } - } - } -#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ - *length = PyBytes_GET_SIZE(defenc); - return defenc_c; -} - -#else /* CYTHON_PEP393_ENABLED: */ - -static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) { - if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL; -#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII - if (likely(PyUnicode_IS_ASCII(o))) { - // cached for the lifetime of the object - *length = PyUnicode_GET_LENGTH(o); - return PyUnicode_AsUTF8(o); - } else { - // raise the error - PyUnicode_AsASCIIString(o); - return NULL; - } -#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ - return PyUnicode_AsUTF8AndSize(o, length); -#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ -} -#endif /* CYTHON_PEP393_ENABLED */ -#endif - -// Py3.7 returns a "const char*" for unicode strings -static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { -#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT - if ( -#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII - __Pyx_sys_getdefaultencoding_not_ascii && -#endif - PyUnicode_Check(o)) { - return __Pyx_PyUnicode_AsStringAndSize(o, length); - } else -#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ - -#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE)) - if (PyByteArray_Check(o)) { - *length = PyByteArray_GET_SIZE(o); - return PyByteArray_AS_STRING(o); - } else -#endif - { - char* result; - int r = PyBytes_AsStringAndSize(o, &result, length); - if (unlikely(r < 0)) { - return NULL; - } else { - return result; - } - } -} - -/* Note: __Pyx_PyObject_IsTrue is written to minimize branching. */ -static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { - int is_true = x == Py_True; - if (is_true | (x == Py_False) | (x == Py_None)) return is_true; - else return PyObject_IsTrue(x); -} - -static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { - int retval; - if (unlikely(!x)) return -1; - retval = __Pyx_PyObject_IsTrue(x); - Py_DECREF(x); - return retval; -} - -static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { -#if PY_MAJOR_VERSION >= 3 - if (PyLong_Check(result)) { - // CPython issue #17576: warn if 'result' not of exact type int. - if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, - "__int__ returned non-int (type %.200s). " - "The ability to return an instance of a strict subclass of int " - "is deprecated, and may be removed in a future version of Python.", - Py_TYPE(result)->tp_name)) { - Py_DECREF(result); - return NULL; - } - return result; - } -#endif - PyErr_Format(PyExc_TypeError, - "__%.4s__ returned non-%.4s (type %.200s)", - type_name, type_name, Py_TYPE(result)->tp_name); - Py_DECREF(result); - return NULL; -} - -static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) { -#if CYTHON_USE_TYPE_SLOTS - PyNumberMethods *m; -#endif - const char *name = NULL; - PyObject *res = NULL; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x) || PyLong_Check(x))) -#else - if (likely(PyLong_Check(x))) -#endif - return __Pyx_NewRef(x); -#if CYTHON_USE_TYPE_SLOTS - m = Py_TYPE(x)->tp_as_number; - #if PY_MAJOR_VERSION < 3 - if (m && m->nb_int) { - name = "int"; - res = m->nb_int(x); - } - else if (m && m->nb_long) { - name = "long"; - res = m->nb_long(x); - } - #else - if (likely(m && m->nb_int)) { - name = "int"; - res = m->nb_int(x); - } - #endif -#else - if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) { - res = PyNumber_Int(x); - } -#endif - if (likely(res)) { -#if PY_MAJOR_VERSION < 3 - if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) { -#else - if (unlikely(!PyLong_CheckExact(res))) { -#endif - return __Pyx_PyNumber_IntOrLongWrongResultType(res, name); - } - } - else if (!PyErr_Occurred()) { - PyErr_SetString(PyExc_TypeError, - "an integer is required"); - } - return res; -} - -{{py: from Cython.Utility import pylong_join }} - -static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_ssize_t ival; - PyObject *x; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_CheckExact(b))) { - if (sizeof(Py_ssize_t) >= sizeof(long)) - return PyInt_AS_LONG(b); - else - return PyInt_AsSsize_t(b); - } -#endif - if (likely(PyLong_CheckExact(b))) { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)b)->ob_digit; - const Py_ssize_t size = Py_SIZE(b); - // handle most common case first to avoid indirect branch and optimise branch prediction - if (likely(__Pyx_sst_abs(size) <= 1)) { - ival = likely(size) ? digits[0] : 0; - if (size == -1) ival = -ival; - return ival; - } else { - switch (size) { - {{for _size in (2, 3, 4)}} - {{for _case in (_size, -_size)}} - case {{_case}}: - if (8 * sizeof(Py_ssize_t) > {{_size}} * PyLong_SHIFT) { - return {{'-' if _case < 0 else ''}}(Py_ssize_t) {{pylong_join(_size, 'digits', 'size_t')}}; - } - break; - {{endfor}} - {{endfor}} - } - } - #endif - return PyLong_AsSsize_t(b); - } - x = PyNumber_Index(b); - if (!x) return -1; - ival = PyInt_AsSsize_t(x); - Py_DECREF(x); - return ival; -} - - -static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { - if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { - return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -#if PY_MAJOR_VERSION < 3 - } else if (likely(PyInt_CheckExact(o))) { - return PyInt_AS_LONG(o); -#endif - } else { - Py_ssize_t ival; - PyObject *x; - x = PyNumber_Index(o); - if (!x) return -1; - ival = PyInt_AsLong(x); - Py_DECREF(x); - return ival; - } -} - - -static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); -} - - -static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { - return PyInt_FromSize_t(ival); -} - - -/////////////// GCCDiagnostics.proto /////////////// - -// GCC diagnostic pragmas were introduced in GCC 4.6 -// Used to silence conversion warnings that are ok but cannot be avoided. -#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -#define __Pyx_HAS_GCC_DIAGNOSTIC -#endif - - -/////////////// ToPyCTupleUtility.proto /////////////// -static PyObject* {{funcname}}({{struct_type_decl}}); - -/////////////// ToPyCTupleUtility /////////////// -static PyObject* {{funcname}}({{struct_type_decl}} value) { - PyObject* item = NULL; - PyObject* result = PyTuple_New({{size}}); - if (!result) goto bad; - - {{for ix, component in enumerate(components):}} - {{py:attr = "value.f%s" % ix}} - item = {{component.to_py_function}}({{attr}}); - if (!item) goto bad; - PyTuple_SET_ITEM(result, {{ix}}, item); - {{endfor}} - - return result; -bad: - Py_XDECREF(item); - Py_XDECREF(result); - return NULL; -} - - -/////////////// FromPyCTupleUtility.proto /////////////// -static {{struct_type_decl}} {{funcname}}(PyObject *); - -/////////////// FromPyCTupleUtility /////////////// -static {{struct_type_decl}} {{funcname}}(PyObject * o) { - {{struct_type_decl}} result; - - if (!PyTuple_Check(o) || PyTuple_GET_SIZE(o) != {{size}}) { - PyErr_Format(PyExc_TypeError, "Expected %.16s of size %d, got %.200s", "a tuple", {{size}}, Py_TYPE(o)->tp_name); - goto bad; - } - -#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - {{for ix, component in enumerate(components):}} - {{py:attr = "result.f%s" % ix}} - {{attr}} = {{component.from_py_function}}(PyTuple_GET_ITEM(o, {{ix}})); - if ({{component.error_condition(attr)}}) goto bad; - {{endfor}} -#else - { - PyObject *item; - {{for ix, component in enumerate(components):}} - {{py:attr = "result.f%s" % ix}} - item = PySequence_ITEM(o, {{ix}}); if (unlikely(!item)) goto bad; - {{attr}} = {{component.from_py_function}}(item); - Py_DECREF(item); - if ({{component.error_condition(attr)}}) goto bad; - {{endfor}} - } -#endif - - return result; -bad: - return result; -} - - -/////////////// UnicodeAsUCS4.proto /////////////// - -static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*); - -/////////////// UnicodeAsUCS4 /////////////// - -static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) { - Py_ssize_t length; - #if CYTHON_PEP393_ENABLED - length = PyUnicode_GET_LENGTH(x); - if (likely(length == 1)) { - return PyUnicode_READ_CHAR(x, 0); - } - #else - length = PyUnicode_GET_SIZE(x); - if (likely(length == 1)) { - return PyUnicode_AS_UNICODE(x)[0]; - } - #if Py_UNICODE_SIZE == 2 - else if (PyUnicode_GET_SIZE(x) == 2) { - Py_UCS4 high_val = PyUnicode_AS_UNICODE(x)[0]; - if (high_val >= 0xD800 && high_val <= 0xDBFF) { - Py_UCS4 low_val = PyUnicode_AS_UNICODE(x)[1]; - if (low_val >= 0xDC00 && low_val <= 0xDFFF) { - return 0x10000 + (((high_val & ((1<<10)-1)) << 10) | (low_val & ((1<<10)-1))); - } - } - } - #endif - #endif - PyErr_Format(PyExc_ValueError, - "only single character unicode strings can be converted to Py_UCS4, " - "got length %" CYTHON_FORMAT_SSIZE_T "d", length); - return (Py_UCS4)-1; -} - - -/////////////// ObjectAsUCS4.proto /////////////// -//@requires: UnicodeAsUCS4 - -#define __Pyx_PyObject_AsPy_UCS4(x) \ - (likely(PyUnicode_Check(x)) ? __Pyx_PyUnicode_AsPy_UCS4(x) : __Pyx__PyObject_AsPy_UCS4(x)) -static Py_UCS4 __Pyx__PyObject_AsPy_UCS4(PyObject*); - -/////////////// ObjectAsUCS4 /////////////// - -static Py_UCS4 __Pyx__PyObject_AsPy_UCS4_raise_error(long ival) { - if (ival < 0) { - if (!PyErr_Occurred()) - PyErr_SetString(PyExc_OverflowError, - "cannot convert negative value to Py_UCS4"); - } else { - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to Py_UCS4"); - } - return (Py_UCS4)-1; -} - -static Py_UCS4 __Pyx__PyObject_AsPy_UCS4(PyObject* x) { - long ival; - ival = __Pyx_PyInt_As_long(x); - if (unlikely(!__Pyx_is_valid_index(ival, 1114111 + 1))) { - return __Pyx__PyObject_AsPy_UCS4_raise_error(ival); - } - return (Py_UCS4)ival; -} - - -/////////////// ObjectAsPyUnicode.proto /////////////// - -static CYTHON_INLINE Py_UNICODE __Pyx_PyObject_AsPy_UNICODE(PyObject*); - -/////////////// ObjectAsPyUnicode /////////////// - -static CYTHON_INLINE Py_UNICODE __Pyx_PyObject_AsPy_UNICODE(PyObject* x) { - long ival; - #if CYTHON_PEP393_ENABLED - #if Py_UNICODE_SIZE > 2 - const long maxval = 1114111; - #else - const long maxval = 65535; - #endif - #else - static long maxval = 0; - #endif - if (PyUnicode_Check(x)) { - if (unlikely(__Pyx_PyUnicode_GET_LENGTH(x) != 1)) { - PyErr_Format(PyExc_ValueError, - "only single character unicode strings can be converted to Py_UNICODE, " - "got length %" CYTHON_FORMAT_SSIZE_T "d", __Pyx_PyUnicode_GET_LENGTH(x)); - return (Py_UNICODE)-1; - } - #if CYTHON_PEP393_ENABLED - ival = PyUnicode_READ_CHAR(x, 0); - #else - return PyUnicode_AS_UNICODE(x)[0]; - #endif - } else { - #if !CYTHON_PEP393_ENABLED - if (unlikely(!maxval)) - maxval = (long)PyUnicode_GetMax(); - #endif - ival = __Pyx_PyInt_As_long(x); - } - if (unlikely(!__Pyx_is_valid_index(ival, maxval + 1))) { - if (ival < 0) { - if (!PyErr_Occurred()) - PyErr_SetString(PyExc_OverflowError, - "cannot convert negative value to Py_UNICODE"); - return (Py_UNICODE)-1; - } else { - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to Py_UNICODE"); - } - return (Py_UNICODE)-1; - } - return (Py_UNICODE)ival; -} - - -/////////////// CIntToPy.proto /////////////// - -static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value); - -/////////////// CIntToPy /////////////// -//@requires: GCCDiagnostics - -static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const {{TYPE}} neg_one = ({{TYPE}}) -1, const_zero = ({{TYPE}}) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof({{TYPE}}) < sizeof(long)) { - return PyInt_FromLong((long) value); - } else if (sizeof({{TYPE}}) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof({{TYPE}}) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -#endif - } - } else { - if (sizeof({{TYPE}}) <= sizeof(long)) { - return PyInt_FromLong((long) value); -#ifdef HAVE_LONG_LONG - } else if (sizeof({{TYPE}}) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); -#endif - } - } - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; - return _PyLong_FromByteArray(bytes, sizeof({{TYPE}}), - little, !is_unsigned); - } -} - - -/////////////// CIntToDigits /////////////// - -static const char DIGIT_PAIRS_10[2*10*10+1] = { - "00010203040506070809" - "10111213141516171819" - "20212223242526272829" - "30313233343536373839" - "40414243444546474849" - "50515253545556575859" - "60616263646566676869" - "70717273747576777879" - "80818283848586878889" - "90919293949596979899" -}; - -static const char DIGIT_PAIRS_8[2*8*8+1] = { - "0001020304050607" - "1011121314151617" - "2021222324252627" - "3031323334353637" - "4041424344454647" - "5051525354555657" - "6061626364656667" - "7071727374757677" -}; - -static const char DIGITS_HEX[2*16+1] = { - "0123456789abcdef" - "0123456789ABCDEF" -}; - - -/////////////// CIntToPyUnicode.proto /////////////// - -static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value, Py_ssize_t width, char padding_char, char format_char); - -/////////////// CIntToPyUnicode /////////////// -//@requires: StringTools.c::IncludeStringH -//@requires: StringTools.c::BuildPyUnicode -//@requires: CIntToDigits -//@requires: GCCDiagnostics - -// NOTE: inlining because most arguments are constant, which collapses lots of code below - -static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value, Py_ssize_t width, char padding_char, char format_char) { - // simple and conservative C string allocation on the stack: each byte gives at most 3 digits, plus sign - char digits[sizeof({{TYPE}})*3+2]; - // 'dpos' points to end of digits array + 1 initially to allow for pre-decrement looping - char *dpos, *end = digits + sizeof({{TYPE}})*3+2; - const char *hex_digits = DIGITS_HEX; - Py_ssize_t length, ulength; - int prepend_sign, last_one_off; - {{TYPE}} remaining; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const {{TYPE}} neg_one = ({{TYPE}}) -1, const_zero = ({{TYPE}}) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; - - if (format_char == 'X') { - hex_digits += 16; - format_char = 'x'; - } - - // surprise: even trivial sprintf() calls don't get optimised in gcc (4.8) - remaining = value; /* not using abs(value) to avoid overflow problems */ - last_one_off = 0; - dpos = end; - do { - int digit_pos; - switch (format_char) { - case 'o': - digit_pos = abs((int)(remaining % (8*8))); - remaining = ({{TYPE}}) (remaining / (8*8)); - dpos -= 2; - memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); /* copy 2 digits at a time, unaligned */ - last_one_off = (digit_pos < 8); - break; - case 'd': - digit_pos = abs((int)(remaining % (10*10))); - remaining = ({{TYPE}}) (remaining / (10*10)); - dpos -= 2; - memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); /* copy 2 digits at a time, unaligned */ - last_one_off = (digit_pos < 10); - break; - case 'x': - *(--dpos) = hex_digits[abs((int)(remaining % 16))]; - remaining = ({{TYPE}}) (remaining / 16); - break; - default: - assert(0); - break; - } - } while (unlikely(remaining != 0)); - - if (last_one_off) { - assert(*dpos == '0'); - dpos++; - } - length = end - dpos; - ulength = length; - prepend_sign = 0; - if (!is_unsigned && value <= neg_one) { - if (padding_char == ' ' || width <= length + 1) { - *(--dpos) = '-'; - ++length; - } else { - prepend_sign = 1; - } - ++ulength; - } - if (width > ulength) { - ulength = width; - } - // single character unicode strings are cached in CPython => use PyUnicode_FromOrdinal() for them - if (ulength == 1) { - return PyUnicode_FromOrdinal(*dpos); - } - return __Pyx_PyUnicode_BuildFromAscii(ulength, dpos, (int) length, prepend_sign, padding_char); -} - - -/////////////// CBIntToPyUnicode.proto /////////////// - -#define {{TO_PY_FUNCTION}}(value) \ - ((value) ? __Pyx_NewRef({{TRUE_CONST}}) : __Pyx_NewRef({{FALSE_CONST}})) - - -/////////////// PyIntFromDouble.proto /////////////// - -#if PY_MAJOR_VERSION < 3 -static CYTHON_INLINE PyObject* __Pyx_PyInt_FromDouble(double value); -#else -#define __Pyx_PyInt_FromDouble(value) PyLong_FromDouble(value) -#endif - -/////////////// PyIntFromDouble /////////////// - -#if PY_MAJOR_VERSION < 3 -static CYTHON_INLINE PyObject* __Pyx_PyInt_FromDouble(double value) { - if (value >= (double)LONG_MIN && value <= (double)LONG_MAX) { - return PyInt_FromLong((long)value); - } - return PyLong_FromDouble(value); -} -#endif - - -/////////////// CIntFromPyVerify /////////////// - -// see CIntFromPy -#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value) \ - __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) - -#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value) \ - __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) - -#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc) \ - { \ - func_type value = func_value; \ - if (sizeof(target_type) < sizeof(func_type)) { \ - if (unlikely(value != (func_type) (target_type) value)) { \ - func_type zero = 0; \ - if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred())) \ - return (target_type) -1; \ - if (is_unsigned && unlikely(value < zero)) \ - goto raise_neg_overflow; \ - else \ - goto raise_overflow; \ - } \ - } \ - return (target_type) value; \ - } - - -/////////////// CIntFromPy.proto /////////////// - -static CYTHON_INLINE {{TYPE}} {{FROM_PY_FUNCTION}}(PyObject *); - -/////////////// CIntFromPy /////////////// -//@requires: CIntFromPyVerify -//@requires: GCCDiagnostics - -{{py: from Cython.Utility import pylong_join }} - -static CYTHON_INLINE {{TYPE}} {{FROM_PY_FUNCTION}}(PyObject *x) { -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wconversion" -#endif - const {{TYPE}} neg_one = ({{TYPE}}) -1, const_zero = ({{TYPE}}) 0; -#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -#pragma GCC diagnostic pop -#endif - const int is_unsigned = neg_one > const_zero; -#if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { - if (sizeof({{TYPE}}) < sizeof(long)) { - __PYX_VERIFY_RETURN_INT({{TYPE}}, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } - return ({{TYPE}}) val; - } - } else -#endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { -#if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { - case 0: return ({{TYPE}}) 0; - case 1: __PYX_VERIFY_RETURN_INT({{TYPE}}, digit, digits[0]) - {{for _size in (2, 3, 4)}} - case {{_size}}: - if (8 * sizeof({{TYPE}}) > {{_size-1}} * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > {{_size}} * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT({{TYPE}}, unsigned long, {{pylong_join(_size, 'digits')}}) - } else if (8 * sizeof({{TYPE}}) >= {{_size}} * PyLong_SHIFT) { - return ({{TYPE}}) {{pylong_join(_size, 'digits', TYPE)}}; - } - } - break; - {{endfor}} - } -#endif -#if CYTHON_COMPILING_IN_CPYTHON - if (unlikely(Py_SIZE(x) < 0)) { - goto raise_neg_overflow; - } -#else - { - // misuse Py_False as a quick way to compare to a '0' int object in PyPy - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) - return ({{TYPE}}) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } -#endif - if (sizeof({{TYPE}}) <= sizeof(unsigned long)) { - __PYX_VERIFY_RETURN_INT_EXC({{TYPE}}, unsigned long, PyLong_AsUnsignedLong(x)) -#ifdef HAVE_LONG_LONG - } else if (sizeof({{TYPE}}) <= sizeof(unsigned PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC({{TYPE}}, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -#endif - } - } else { - // signed -#if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { - case 0: return ({{TYPE}}) 0; - case -1: __PYX_VERIFY_RETURN_INT({{TYPE}}, sdigit, (sdigit) (-(sdigit)digits[0])) - case 1: __PYX_VERIFY_RETURN_INT({{TYPE}}, digit, +digits[0]) - {{for _size in (2, 3, 4)}} - {{for _case in (-_size, _size)}} - case {{_case}}: - if (8 * sizeof({{TYPE}}){{' - 1' if _case < 0 else ''}} > {{_size-1}} * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > {{_size}} * PyLong_SHIFT) { - __PYX_VERIFY_RETURN_INT({{TYPE}}, {{'long' if _case < 0 else 'unsigned long'}}, {{'-(long) ' if _case < 0 else ''}}{{pylong_join(_size, 'digits')}}) - } else if (8 * sizeof({{TYPE}}) - 1 > {{_size}} * PyLong_SHIFT) { - return ({{TYPE}}) ({{'((%s)-1)*' % TYPE if _case < 0 else ''}}{{pylong_join(_size, 'digits', TYPE)}}); - } - } - break; - {{endfor}} - {{endfor}} - } -#endif - if (sizeof({{TYPE}}) <= sizeof(long)) { - __PYX_VERIFY_RETURN_INT_EXC({{TYPE}}, long, PyLong_AsLong(x)) -#ifdef HAVE_LONG_LONG - } else if (sizeof({{TYPE}}) <= sizeof(PY_LONG_LONG)) { - __PYX_VERIFY_RETURN_INT_EXC({{TYPE}}, PY_LONG_LONG, PyLong_AsLongLong(x)) -#endif - } - } - { -#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); -#else - {{TYPE}} val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { - PyObject *tmp = v; - v = PyNumber_Long(tmp); - Py_DECREF(tmp); - } - #endif - if (likely(v)) { - int one = 1; int is_little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&val; - int ret = _PyLong_AsByteArray((PyLongObject *)v, - bytes, sizeof(val), - is_little, !is_unsigned); - Py_DECREF(v); - if (likely(!ret)) - return val; - } -#endif - return ({{TYPE}}) -1; - } - } else { - {{TYPE}} val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); - if (!tmp) return ({{TYPE}}) -1; - val = {{FROM_PY_FUNCTION}}(tmp); - Py_DECREF(tmp); - return val; - } - -raise_overflow: - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to {{TYPE}}"); - return ({{TYPE}}) -1; - -raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to {{TYPE}}"); - return ({{TYPE}}) -1; -} diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/__init__.py deleted file mode 100644 index 73ccc1e2cba..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/__init__.py +++ /dev/null @@ -1,29 +0,0 @@ - -def pylong_join(count, digits_ptr='digits', join_type='unsigned long'): - """ - Generate an unrolled shift-then-or loop over the first 'count' digits. - Assumes that they fit into 'join_type'. - - (((d[2] << n) | d[1]) << n) | d[0] - """ - return ('(' * (count * 2) + ' | '.join( - "(%s)%s[%d])%s)" % (join_type, digits_ptr, _i, " << PyLong_SHIFT" if _i else '') - for _i in range(count-1, -1, -1))) - - -# although it could potentially make use of data independence, -# this implementation is a bit slower than the simpler one above -def _pylong_join(count, digits_ptr='digits', join_type='unsigned long'): - """ - Generate an or-ed series of shifts for the first 'count' digits. - Assumes that they fit into 'join_type'. - - (d[2] << 2*n) | (d[1] << 1*n) | d[0] - """ - def shift(n): - # avoid compiler warnings for overly large shifts that will be discarded anyway - return " << (%d * PyLong_SHIFT < 8 * sizeof(%s) ? %d * PyLong_SHIFT : 0)" % (n, join_type, n) if n else '' - - return '(%s)' % ' | '.join( - "(((%s)%s[%d])%s)" % (join_type, digits_ptr, i, shift(i)) - for i in range(count-1, -1, -1)) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/arrayarray.h b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/arrayarray.h deleted file mode 100644 index a9e49237856..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utility/arrayarray.h +++ /dev/null @@ -1,149 +0,0 @@ -/////////////// ArrayAPI.proto /////////////// - -// arrayarray.h -// -// Artificial C-API for Python's type, -// used by array.pxd -// -// last changes: 2009-05-15 rk -// 2012-05-02 andreasvc -// (see revision control) -// - -#ifndef _ARRAYARRAY_H -#define _ARRAYARRAY_H - -// These two forward declarations are explicitly handled in the type -// declaration code, as including them here is too late for cython-defined -// types to use them. -// struct arrayobject; -// typedef struct arrayobject arrayobject; - -// All possible arraydescr values are defined in the vector "descriptors" -// below. That's defined later because the appropriate get and set -// functions aren't visible yet. -typedef struct arraydescr { - int typecode; - int itemsize; - PyObject * (*getitem)(struct arrayobject *, Py_ssize_t); - int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *); -#if PY_MAJOR_VERSION >= 3 - char *formats; -#endif -} arraydescr; - - -struct arrayobject { - PyObject_HEAD - Py_ssize_t ob_size; - union { - char *ob_item; - float *as_floats; - double *as_doubles; - int *as_ints; - unsigned int *as_uints; - unsigned char *as_uchars; - signed char *as_schars; - char *as_chars; - unsigned long *as_ulongs; - long *as_longs; -#if PY_MAJOR_VERSION >= 3 - unsigned long long *as_ulonglongs; - long long *as_longlongs; -#endif - short *as_shorts; - unsigned short *as_ushorts; - Py_UNICODE *as_pyunicodes; - void *as_voidptr; - } data; - Py_ssize_t allocated; - struct arraydescr *ob_descr; - PyObject *weakreflist; /* List of weak references */ -#if PY_MAJOR_VERSION >= 3 - int ob_exports; /* Number of exported buffers */ -#endif -}; - -#ifndef NO_NEWARRAY_INLINE -// fast creation of a new array -static CYTHON_INLINE PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size, - struct arraydescr *descr) { - arrayobject *op; - size_t nbytes; - - if (size < 0) { - PyErr_BadInternalCall(); - return NULL; - } - - nbytes = size * descr->itemsize; - // Check for overflow - if (nbytes / descr->itemsize != (size_t)size) { - return PyErr_NoMemory(); - } - op = (arrayobject *) type->tp_alloc(type, 0); - if (op == NULL) { - return NULL; - } - op->ob_descr = descr; - op->allocated = size; - op->weakreflist = NULL; - __Pyx_SET_SIZE(op, size); - if (size <= 0) { - op->data.ob_item = NULL; - } - else { - op->data.ob_item = PyMem_NEW(char, nbytes); - if (op->data.ob_item == NULL) { - Py_DECREF(op); - return PyErr_NoMemory(); - } - } - return (PyObject *) op; -} -#else -PyObject* newarrayobject(PyTypeObject *type, Py_ssize_t size, - struct arraydescr *descr); -#endif /* ifndef NO_NEWARRAY_INLINE */ - -// fast resize (reallocation to the point) -// not designed for filing small increments (but for fast opaque array apps) -static CYTHON_INLINE int resize(arrayobject *self, Py_ssize_t n) { - void *items = (void*) self->data.ob_item; - PyMem_Resize(items, char, (size_t)(n * self->ob_descr->itemsize)); - if (items == NULL) { - PyErr_NoMemory(); - return -1; - } - self->data.ob_item = (char*) items; - __Pyx_SET_SIZE(self, n); - self->allocated = n; - return 0; -} - -// suitable for small increments; over allocation 50% ; -static CYTHON_INLINE int resize_smart(arrayobject *self, Py_ssize_t n) { - void *items = (void*) self->data.ob_item; - Py_ssize_t newsize; - if (n < self->allocated && n*4 > self->allocated) { - __Pyx_SET_SIZE(self, n); - return 0; - } - newsize = n + (n / 2) + 1; - if (newsize <= n) { /* overflow */ - PyErr_NoMemory(); - return -1; - } - PyMem_Resize(items, char, (size_t)(newsize * self->ob_descr->itemsize)); - if (items == NULL) { - PyErr_NoMemory(); - return -1; - } - self->data.ob_item = (char*) items; - __Pyx_SET_SIZE(self, n); - self->allocated = newsize; - return 0; -} - -#endif -/* _ARRAYARRAY_H */ diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utils.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utils.py deleted file mode 100644 index d59d67d78b1..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/Utils.py +++ /dev/null @@ -1,449 +0,0 @@ -# -# Cython -- Things that don't belong -# anywhere else in particular -# - -from __future__ import absolute_import - -try: - from __builtin__ import basestring -except ImportError: - basestring = str - -try: - FileNotFoundError -except NameError: - FileNotFoundError = OSError - -import os -import sys -import re -import io -import codecs -import shutil -import tempfile -from contextlib import contextmanager - -modification_time = os.path.getmtime - -_function_caches = [] -def clear_function_caches(): - for cache in _function_caches: - cache.clear() - -def cached_function(f): - cache = {} - _function_caches.append(cache) - uncomputed = object() - def wrapper(*args): - res = cache.get(args, uncomputed) - if res is uncomputed: - res = cache[args] = f(*args) - return res - wrapper.uncached = f - return wrapper - -def cached_method(f): - cache_name = '__%s_cache' % f.__name__ - def wrapper(self, *args): - cache = getattr(self, cache_name, None) - if cache is None: - cache = {} - setattr(self, cache_name, cache) - if args in cache: - return cache[args] - res = cache[args] = f(self, *args) - return res - return wrapper - -def replace_suffix(path, newsuf): - base, _ = os.path.splitext(path) - return base + newsuf - - -def open_new_file(path): - if os.path.exists(path): - # Make sure to create a new file here so we can - # safely hard link the output files. - os.unlink(path) - - # we use the ISO-8859-1 encoding here because we only write pure - # ASCII strings or (e.g. for file names) byte encoded strings as - # Unicode, so we need a direct mapping from the first 256 Unicode - # characters to a byte sequence, which ISO-8859-1 provides - - # note: can't use io.open() in Py2 as we may be writing str objects - return codecs.open(path, "w", encoding="ISO-8859-1") - - -def castrate_file(path, st): - # Remove junk contents from an output file after a - # failed compilation. - # Also sets access and modification times back to - # those specified by st (a stat struct). - try: - f = open_new_file(path) - except EnvironmentError: - pass - else: - f.write( - "#error Do not use this file, it is the result of a failed Cython compilation.\n") - f.close() - if st: - os.utime(path, (st.st_atime, st.st_mtime-1)) - -def file_newer_than(path, time): - ftime = modification_time(path) - return ftime > time - - -def safe_makedirs(path): - try: - os.makedirs(path) - except OSError: - if not os.path.isdir(path): - raise - - -def copy_file_to_dir_if_newer(sourcefile, destdir): - """ - Copy file sourcefile to directory destdir (creating it if needed), - preserving metadata. If the destination file exists and is not - older than the source file, the copying is skipped. - """ - destfile = os.path.join(destdir, os.path.basename(sourcefile)) - try: - desttime = modification_time(destfile) - except OSError: - # New file does not exist, destdir may or may not exist - safe_makedirs(destdir) - else: - # New file already exists - if not file_newer_than(sourcefile, desttime): - return - shutil.copy2(sourcefile, destfile) - - -@cached_function -def find_root_package_dir(file_path): - dir = os.path.dirname(file_path) - if file_path == dir: - return dir - elif is_package_dir(dir): - return find_root_package_dir(dir) - else: - return dir - -@cached_function -def check_package_dir(dir, package_names): - for dirname in package_names: - dir = os.path.join(dir, dirname) - if not is_package_dir(dir): - return None - return dir - -@cached_function -def is_package_dir(dir_path): - for filename in ("__init__.py", - "__init__.pyc", - "__init__.pyx", - "__init__.pxd"): - path = os.path.join(dir_path, filename) - if path_exists(path): - return 1 - -@cached_function -def path_exists(path): - # try on the filesystem first - if os.path.exists(path): - return True - # figure out if a PEP 302 loader is around - try: - loader = __loader__ - # XXX the code below assumes a 'zipimport.zipimporter' instance - # XXX should be easy to generalize, but too lazy right now to write it - archive_path = getattr(loader, 'archive', None) - if archive_path: - normpath = os.path.normpath(path) - if normpath.startswith(archive_path): - arcname = normpath[len(archive_path)+1:] - try: - loader.get_data(arcname) - return True - except IOError: - return False - except NameError: - pass - return False - -# file name encodings - -def decode_filename(filename): - if isinstance(filename, bytes): - try: - filename_encoding = sys.getfilesystemencoding() - if filename_encoding is None: - filename_encoding = sys.getdefaultencoding() - filename = filename.decode(filename_encoding) - except UnicodeDecodeError: - pass - return filename - -# support for source file encoding detection - -_match_file_encoding = re.compile(br"(\w*coding)[:=]\s*([-\w.]+)").search - - -def detect_opened_file_encoding(f): - # PEPs 263 and 3120 - # Most of the time the first two lines fall in the first couple of hundred chars, - # and this bulk read/split is much faster. - lines = () - start = b'' - while len(lines) < 3: - data = f.read(500) - start += data - lines = start.split(b"\n") - if not data: - break - m = _match_file_encoding(lines[0]) - if m and m.group(1) != b'c_string_encoding': - return m.group(2).decode('iso8859-1') - elif len(lines) > 1: - m = _match_file_encoding(lines[1]) - if m: - return m.group(2).decode('iso8859-1') - return "UTF-8" - - -def skip_bom(f): - """ - Read past a BOM at the beginning of a source file. - This could be added to the scanner, but it's *substantially* easier - to keep it at this level. - """ - if f.read(1) != u'\uFEFF': - f.seek(0) - - -def open_source_file(source_filename, encoding=None, error_handling=None): - stream = None - try: - if encoding is None: - # Most of the time the encoding is not specified, so try hard to open the file only once. - f = io.open(source_filename, 'rb') - encoding = detect_opened_file_encoding(f) - f.seek(0) - stream = io.TextIOWrapper(f, encoding=encoding, errors=error_handling) - else: - stream = io.open(source_filename, encoding=encoding, errors=error_handling) - - except OSError: - if os.path.exists(source_filename): - raise # File is there, but something went wrong reading from it. - # Allow source files to be in zip files etc. - try: - loader = __loader__ - if source_filename.startswith(loader.archive): - stream = open_source_from_loader( - loader, source_filename, - encoding, error_handling) - except (NameError, AttributeError): - pass - - if stream is None: - raise FileNotFoundError(source_filename) - skip_bom(stream) - return stream - - -def open_source_from_loader(loader, - source_filename, - encoding=None, error_handling=None): - nrmpath = os.path.normpath(source_filename) - arcname = nrmpath[len(loader.archive)+1:] - data = loader.get_data(arcname) - return io.TextIOWrapper(io.BytesIO(data), - encoding=encoding, - errors=error_handling) - - -def str_to_number(value): - # note: this expects a string as input that was accepted by the - # parser already, with an optional "-" sign in front - is_neg = False - if value[:1] == '-': - is_neg = True - value = value[1:] - if len(value) < 2: - value = int(value, 0) - elif value[0] == '0': - literal_type = value[1] # 0'o' - 0'b' - 0'x' - if literal_type in 'xX': - # hex notation ('0x1AF') - value = int(value[2:], 16) - elif literal_type in 'oO': - # Py3 octal notation ('0o136') - value = int(value[2:], 8) - elif literal_type in 'bB': - # Py3 binary notation ('0b101') - value = int(value[2:], 2) - else: - # Py2 octal notation ('0136') - value = int(value, 8) - else: - value = int(value, 0) - return -value if is_neg else value - - -def long_literal(value): - if isinstance(value, basestring): - value = str_to_number(value) - return not -2**31 <= value < 2**31 - - -@cached_function -def get_cython_cache_dir(): - r""" - Return the base directory containing Cython's caches. - - Priority: - - 1. CYTHON_CACHE_DIR - 2. (OS X): ~/Library/Caches/Cython - (posix not OS X): XDG_CACHE_HOME/cython if XDG_CACHE_HOME defined - 3. ~/.cython - - """ - if 'CYTHON_CACHE_DIR' in os.environ: - return os.environ['CYTHON_CACHE_DIR'] - - parent = None - if os.name == 'posix': - if sys.platform == 'darwin': - parent = os.path.expanduser('~/Library/Caches') - else: - # this could fallback on ~/.cache - parent = os.environ.get('XDG_CACHE_HOME') - - if parent and os.path.isdir(parent): - return os.path.join(parent, 'cython') - - # last fallback: ~/.cython - return os.path.expanduser(os.path.join('~', '.cython')) - - -@contextmanager -def captured_fd(stream=2, encoding=None): - orig_stream = os.dup(stream) # keep copy of original stream - try: - with tempfile.TemporaryFile(mode="a+b") as temp_file: - def read_output(_output=[b'']): - if not temp_file.closed: - temp_file.seek(0) - _output[0] = temp_file.read() - return _output[0] - - os.dup2(temp_file.fileno(), stream) # replace stream by copy of pipe - try: - def get_output(): - result = read_output() - return result.decode(encoding) if encoding else result - - yield get_output - finally: - os.dup2(orig_stream, stream) # restore original stream - read_output() # keep the output in case it's used after closing the context manager - finally: - os.close(orig_stream) - - -def print_bytes(s, header_text=None, end=b'\n', file=sys.stdout, flush=True): - if header_text: - file.write(header_text) # note: text! => file.write() instead of out.write() - file.flush() - try: - out = file.buffer # Py3 - except AttributeError: - out = file # Py2 - out.write(s) - if end: - out.write(end) - if flush: - out.flush() - -class LazyStr: - def __init__(self, callback): - self.callback = callback - def __str__(self): - return self.callback() - def __repr__(self): - return self.callback() - def __add__(self, right): - return self.callback() + right - def __radd__(self, left): - return left + self.callback() - - -class OrderedSet(object): - def __init__(self, elements=()): - self._list = [] - self._set = set() - self.update(elements) - def __iter__(self): - return iter(self._list) - def update(self, elements): - for e in elements: - self.add(e) - def add(self, e): - if e not in self._set: - self._list.append(e) - self._set.add(e) - - -# Class decorator that adds a metaclass and recreates the class with it. -# Copied from 'six'. -def add_metaclass(metaclass): - """Class decorator for creating a class with a metaclass.""" - def wrapper(cls): - orig_vars = cls.__dict__.copy() - slots = orig_vars.get('__slots__') - if slots is not None: - if isinstance(slots, str): - slots = [slots] - for slots_var in slots: - orig_vars.pop(slots_var) - orig_vars.pop('__dict__', None) - orig_vars.pop('__weakref__', None) - return metaclass(cls.__name__, cls.__bases__, orig_vars) - return wrapper - - -def raise_error_if_module_name_forbidden(full_module_name): - #it is bad idea to call the pyx-file cython.pyx, so fail early - if full_module_name == 'cython' or full_module_name.startswith('cython.'): - raise ValueError('cython is a special module, cannot be used as a module name') - - -def build_hex_version(version_string): - """ - Parse and translate '4.3a1' into the readable hex representation '0x040300A1' (like PY_VERSION_HEX). - """ - # First, parse '4.12a1' into [4, 12, 0, 0xA01]. - digits = [] - release_status = 0xF0 - for digit in re.split('([.abrc]+)', version_string): - if digit in ('a', 'b', 'rc'): - release_status = {'a': 0xA0, 'b': 0xB0, 'rc': 0xC0}[digit] - digits = (digits + [0, 0])[:3] # 1.2a1 -> 1.2.0a1 - elif digit != '.': - digits.append(int(digit)) - digits = (digits + [0] * 3)[:4] - digits[3] += release_status - - # Then, build a single hex value, two hex digits per version part. - hexversion = 0 - for digit in digits: - hexversion = (hexversion << 8) + digit - - return '0x%08X' % hexversion diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/__init__.py deleted file mode 100644 index 549246b8a37..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/Cython/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -from __future__ import absolute_import - -from .Shadow import __version__ - -# Void cython.* directives (for case insensitive operating systems). -from .Shadow import * - - -def load_ipython_extension(ip): - """Load the extension in IPython.""" - from .Build.IpythonMagic import CythonMagics # pylint: disable=cyclic-import - ip.register_magics(CythonMagics) diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/COPYING.txt b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/COPYING.txt deleted file mode 100644 index 1a05a211a01..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/COPYING.txt +++ /dev/null @@ -1,19 +0,0 @@ -The original Pyrex code as of 2006-04 is licensed under the following -license: "Copyright stuff: Pyrex is free of restrictions. You may use, -redistribute, modify and distribute modified versions." - ------------------- - -Cython, which derives from Pyrex, is licensed under the Apache 2.0 -Software License. More precisely, all modifications and new code -made to go from Pyrex to Cython are so licensed. - -See LICENSE.txt for more details. - ------------------- - -The output of a Cython compilation is NOT considered a derivative -work of Cython. Specifically, though the compilation process may -embed snippets of varying lengths into the final output, these -snippets, as embedded in the output, do not encumber the resulting -output with any license restrictions. diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/LICENSE.txt b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/LICENSE.txt deleted file mode 100644 index d9a10c0d8e8..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/LICENSE.txt +++ /dev/null @@ -1,176 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/PKG-INFO b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/PKG-INFO deleted file mode 100644 index 9e2dc74319a..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/PKG-INFO +++ /dev/null @@ -1,57 +0,0 @@ -Metadata-Version: 2.1 -Name: Cython -Version: 0.29.30 -Summary: The Cython compiler for writing C extensions for the Python language. -Home-page: http://cython.org/ -Author: Robert Bradshaw, Stefan Behnel, Dag Seljebotn, Greg Ewing, et al. -Author-email: cython-devel@python.org -License: Apache -Classifier: Development Status :: 5 - Production/Stable -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: Apache Software License -Classifier: Operating System :: OS Independent -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 2 -Classifier: Programming Language :: Python :: 2.6 -Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.4 -Classifier: Programming Language :: Python :: 3.5 -Classifier: Programming Language :: Python :: 3.6 -Classifier: Programming Language :: Python :: 3.7 -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Programming Language :: Python :: 3.10 -Classifier: Programming Language :: Python :: Implementation :: CPython -Classifier: Programming Language :: Python :: Implementation :: PyPy -Classifier: Programming Language :: C -Classifier: Programming Language :: Cython -Classifier: Topic :: Software Development :: Code Generators -Classifier: Topic :: Software Development :: Compilers -Classifier: Topic :: Software Development :: Libraries :: Python Modules -Requires-Python: >=2.6, !=3.0.*, !=3.1.*, !=3.2.* -License-File: LICENSE.txt -License-File: COPYING.txt - -The Cython language makes writing C extensions for the Python language as -easy as Python itself. Cython is a source code translator based on Pyrex_, -but supports more cutting edge functionality and optimizations. - -The Cython language is a superset of the Python language (almost all Python -code is also valid Cython code), but Cython additionally supports optional -static typing to natively call C functions, operate with C++ classes and -declare fast C types on variables and class attributes. This allows the -compiler to generate very efficient C code from Cython code. - -This makes Cython the ideal language for writing glue code for external -C/C++ libraries, and for fast C modules that speed up the execution of -Python code. - -Note that for one-time builds, e.g. for CI/testing, on platforms that are not -covered by one of the wheel packages provided on PyPI *and* the pure Python wheel -that we provide is not used, it is substantially faster than a full source build -to install an uncompiled (slower) version of Cython with:: - - pip install Cython --install-option="--no-cython-compile" - -.. _Pyrex: http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/ diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/RECORD b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/RECORD deleted file mode 100644 index ed2294889ca..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/RECORD +++ /dev/null @@ -1,313 +0,0 @@ -cython.py,sha256=z2AtgHBGh0x0h0ZcGje7IhYlR6nGH_MmOh1fFMjqYn0,520 -Cython-0.29.30.dist-info/WHEEL,sha256=bNo8z0PVtQTBbDGrChMiv5oJrHcjNPuihN_pxw9QNoY,185 -Cython-0.29.30.dist-info/COPYING.txt,sha256=4escSahQjoFz2sMBV-SmQ5pErYhGGUdGxCT7w_wrldc,756 -Cython-0.29.30.dist-info/top_level.txt,sha256=jLV8tZV98iCbIfiJR4DVzTX5Ru1Y_pYMZ59wkMCe6SY,24 -Cython-0.29.30.dist-info/LICENSE.txt,sha256=psuoW8kuDP96RQsdhzwOqi6fyWv0ct8CR6Jr7He_P_k,10173 -Cython-0.29.30.dist-info/METADATA,sha256=Xsn0nQNrFW6Kbzr4R9WoLBXLbQGvdHQxQr0VgBsoG1U,2767 -Cython-0.29.30.dist-info/RECORD,, -Cython-0.29.30.dist-info/entry_points.txt,sha256=VU8NX8gnQyFbyqiWMzfh9BHvYMuoQRS3Nbm3kKcKQeY,139 -pyximport/__init__.py,sha256=9hOyKolFtOerPiVEyktKrT1VtzbGexq9UmORzo52iHI,79 -pyximport/pyximport.py,sha256=Vjxp3kbmFRf9j0ya4f0m0Ahytkjjmv2UkFueasXxL5A,23578 -pyximport/pyxbuild.py,sha256=TiAkhtSxSbRW04JKtgO3FP3hfVzQ1mjjzCh5PqZDOrM,5702 -Cython/Utils.py,sha256=YJa4RP6fSQkWpbA_X0DnNREd3Y5NuPDjGwUdNvVW2OM,13458 -Cython/Coverage.py,sha256=FtCMjKLYWvtULxWIzN-y3RhbwQwL4GtLyIjj-B3-07E,13537 -Cython/StringIOTree.py,sha256=GX-TWn9XHwY5ecb4in8ovsTS5CtPTsSxZpanLWmQxgE,3336 -Cython/Shadow.py,sha256=A26lvSypOiCBJkaMRIzwe89i93nhUW8WQunD-rPUqgo,12987 -Cython/__init__.py,sha256=GMnkoIas6hfN_meqZAJF9BEs1NuY4-4B2L0Uls7hXaA,358 -Cython/CodeWriter.py,sha256=Sa1hLmUcIMnCGTNASqyzfGqk70i6v-YslD5ogllCaiY,23901 -Cython/TestUtils.py,sha256=fzpic9xU-LP0wempXqwUQWZapBvXnFgbW_W9--IKpIA,7979 -Cython/Debugging.py,sha256=vFtJhn7QstMf5gnYru2qHIz5ZjPg1KSlZVGHr-pBCwM,552 -Cython/Utility/arrayarray.h,sha256=3Ll8Gd_S4rv8HaTfg5i6-aaoB9taI1vzwTp7NeA7Wy0,4089 -Cython/Utility/Capsule.c,sha256=SOeU7E7T7piQEx894T2QFH2RlSG-MmsiyuY4lVN1yso,505 -Cython/Utility/Embed.c,sha256=sMDv7XVJswaGRTQbQHtEDThZaAmvbn-6yeIqrUzboL4,6854 -Cython/Utility/CythonFunction.c,sha256=m_K3U-13w4dbg_Q3Dy4Webf75Ftj9oz-rahk3OekO84,46154 -Cython/Utility/CConvert.pyx,sha256=fbZVHvm2vlWj2rgm8ajBt5jrbN30nY7dEmHlBCGomlU,4338 -Cython/Utility/MemoryView_C.c,sha256=oz4b-wJSQSxS8e6QFG0zeNJxCognXUohM-FS-RbFBRs,29243 -Cython/Utility/Buffer.c,sha256=VUF4xHKJGX7QMTvpJO40aI1JUL-SERLEvlXXXEk2dHU,29654 -Cython/Utility/Printing.c,sha256=o8XnfjNIT8Ub5KY4FAp_FNw-OE3xqjy0MgmYWgDcWao,5103 -Cython/Utility/TypeConversion.c,sha256=0K3erVzNT9lY-jEygTxsarAirETGZcOzvSK-VDs5EJY,36302 -Cython/Utility/TestUtilityLoader.c,sha256=dGy6ZWL2kBqtmUY7kF75UEox5kadQZ__BmZKscwg2aY,279 -Cython/Utility/TestCyUtilityLoader.pyx,sha256=91lWWJub7l_6xNn3ncrvQZZ94RpkQzEx2NtAaFpvrxY,152 -Cython/Utility/TestCythonScope.pyx,sha256=HQm5E5Eehr3tkDDURURyVnDputKG3-Wn2k2aIAoru9g,1595 -Cython/Utility/Optimize.c,sha256=xtKZ8WhOe8l4UYONGVDilNFhzGMueJxA7nYJn8QIWmc,45184 -Cython/Utility/ModuleSetupCode.c,sha256=ZpsGKdOiRu9vzIZpXCtFDA1ekpBdtZWcG4Rxml6Z5xo,56953 -Cython/Utility/ObjectHandling.c,sha256=AcTgr9Kw0iiFqX8oDQ6m7NrOm7ogny1chNs1HhuEwNc,88765 -Cython/Utility/Profile.c,sha256=3aq_eC7h_nUnZe-Np7td20ublCC4OowfHoV3FoW9UnU,17922 -Cython/Utility/ImportExport.c,sha256=KE8VQNH8IXLjquRCVxw4mKV2ZwbAw2dSk7I2uTh0fLs,22287 -Cython/Utility/MemoryView.pyx,sha256=vCbGT3WDoaB9gxv4eUr4UGS8YhHy3LK3E_r329s-L_k,49621 -Cython/Utility/FunctionArguments.c,sha256=IH9Y5aV_tNrJLo_CWHskEnFai9fp9cKLvRkIZYl2UGQ,12040 -Cython/Utility/__init__.py,sha256=t2bpY-TYSX8lJdbKuBFJ1kBfpWVzgGw4xoZlCKfyj_s,1159 -Cython/Utility/Exceptions.c,sha256=mXEVREHj4zA9a0oY2Dbw1VOXtDhsL2wBSCMUS3ZFhSI,27314 -Cython/Utility/Complex.c,sha256=J4HseVcBOzGo5dye0Gus8bf8rGwWLEzN9sRJM74SWiI,10043 -Cython/Utility/CMath.c,sha256=GIc7gd2WzaZryDJM3tefqXifLJpUJs6_T_c_mFrr-s8,2566 -Cython/Utility/CppConvert.pyx,sha256=-e5i3_J1SS_GbctsflQwylx9cqdk_CJ2SfQSEDHa71k,6098 -Cython/Utility/ExtensionTypes.c,sha256=doPkCDEsyClYfDa1386DxwVj0D4jYvKQlnbXQo2REHM,11664 -Cython/Utility/AsyncGen.c,sha256=iwNH8NdegHZYafEgBpErk6erU5o6GKVtHgqd3Vq9kNc,41023 -Cython/Utility/CppSupport.cpp,sha256=NTnSRCmi2PHuT3J6Qy15xMZGx0bf9l-MaxAbW6OVk6s,2234 -Cython/Utility/Coroutine.c,sha256=YmFtN3eY_MAxEktax_xwsdPhL8qUC86jUgPe1mdlcdU,89569 -Cython/Utility/CpdefEnums.pyx,sha256=XMg8sdltQSNj2wGVfnHIWRvyHFCcLK8ZfpKznKi4lhY,1893 -Cython/Utility/StringTools.c,sha256=vEwYIlZf3ET7eTmUJEC7T2JjdLxX8Q1u5g2MQz4PUZM,42214 -Cython/Utility/CommonStructures.c,sha256=p65HHgTrf7h7Tj7JK7tIgkLrrCrjouL8HL90EHfoMoU,2558 -Cython/Utility/Overflow.c,sha256=_KXlJsbMIi-jzdCotwxkN6mtqo6jHRNnPJ1ZKwXVhpE,12424 -Cython/Utility/Builtins.c,sha256=gYObNoiK_NVWRuzSFRePMb-dtw-XCp_Dx_Ztjmpq7as,16818 -Cython/Tempita/_tempita.py,sha256=4gnJhuVIsGciu_5Besbvw26g82Pm7CiXazMghZO3ejs,39588 -Cython/Tempita/__init__.py,sha256=YHujYHiLoYUwFNNswJCgzSrDuie3sV08JsWT9Nbmp78,152 -Cython/Tempita/_tempita.cpython-39-x86_64-linux-gnu.so,sha256=Xjh396OigUS4SucETYWnyNUCZy5EGEOhKRglIg3wrtc,629992 -Cython/Tempita/compat3.py,sha256=cjW1y266vRF5Xvh8kAu7_qHGT8AGGu2kGSJRK6DI-0E,903 -Cython/Tempita/_looper.py,sha256=jlStYhz9Pgp6NatX86k-netBNBmvwaeWxCRS_S8vcIM,4168 -Cython/Distutils/extension.py,sha256=FHvtK3Tj9MqE17TuZ_jWg1Mh4X7e-CXIPUpJK7nqcQE,4706 -Cython/Distutils/build_ext.py,sha256=Fc_cI5wN0fT1Mf2k5B5nH-PgZ8Gq2lL6OlzF_qzy3dA,1007 -Cython/Distutils/__init__.py,sha256=uyWaN2NJ_mKYLzVsDPi0qZCdIYoW5M_7YYEmAOIL3Ek,98 -Cython/Distutils/old_build_ext.py,sha256=Hy34A1HqhoDOyU-krN2gJUYXK2mYWc8E2EZB-stvmrE,13635 -Cython/Includes/openmp.pxd,sha256=orCIBYFuVPtLdRdhhCm5uhGbeV_fgVCA2Jk2Bts1e2g,1713 -Cython/Includes/cpython/array.pxd,sha256=g6apBiXJG_7a0mjGqkFaqlcQjsg64uKK1VlXFFyXVCk,6056 -Cython/Includes/cpython/complex.pxd,sha256=-bu0Cq91tS_U5tTra18S0jqt1FgSJTHXJ5J8rk-MOAA,1777 -Cython/Includes/cpython/type.pxd,sha256=FOypwX0ZYamPc4uO8bejzO-HzgiaSRaXEPsxxxPIneI,1831 -Cython/Includes/cpython/iterobject.pxd,sha256=5UEZZwG5zyzxoCpknoQuh91zPUV11Uxr6F1taJdTv8k,1036 -Cython/Includes/cpython/buffer.pxd,sha256=wm7aHygGUof_H3-JyICOek_xiU6Oks178ark1Nfk-a0,4870 -Cython/Includes/cpython/conversion.pxd,sha256=dbbFuZJF0SscmcaNCUf0tlBQDRdKYf5tH8yzhTU_XYI,1696 -Cython/Includes/cpython/method.pxd,sha256=UWXflhIlP4y7B5XDbH9rQ15iADciGW-iqV1-dlw2Wwg,2196 -Cython/Includes/cpython/float.pxd,sha256=RD1qEAUocXG9qXrRiT8aCSSfGEyTzjTc9HQkv5xg1ZE,1424 -Cython/Includes/cpython/sequence.pxd,sha256=iTp3C6wOvTdvjLmdj3k9GqQqCGDlQFpzWi07wVQqSS4,6008 -Cython/Includes/cpython/bytes.pxd,sha256=tGLuiBMzQjurK_pq77CM7P0C-Hn0KUIDZCXW9QvlJAI,9906 -Cython/Includes/cpython/pycapsule.pxd,sha256=8vySKea_zyTZZ1H39lICYkpJmnYTqZrun3DLf7d2294,5692 -Cython/Includes/cpython/version.pxd,sha256=l5KXt04isEv3qbGRJZ8fNlCYGO24HsA2l4EM3RxTEhE,847 -Cython/Includes/cpython/ceval.pxd,sha256=h6fBetZCUvWTcCn3bkXZg2kqnIuyC5ZSChyhOocxVus,236 -Cython/Includes/cpython/iterator.pxd,sha256=o52mLHbdm14Kqant2hR2zAdYzqK4fkSWZtBcRmpoP-I,1319 -Cython/Includes/cpython/cellobject.pxd,sha256=DXdTjSN1RP1m4CsaGuggyIA1nGiIO4Kr7-c0ZWfrpRo,1390 -Cython/Includes/cpython/bytearray.pxd,sha256=m0VdoHgouF1T0VtRjFLXZ5fi22vaMdVwFWpF3IxB6m4,1443 -Cython/Includes/cpython/instance.pxd,sha256=qCbxPeHKOJbuszDu3UEaI-KLX9lTopuaNCcpoHJ9ngU,985 -Cython/Includes/cpython/weakref.pxd,sha256=UU9H_ovHG07FFgP_kY2xhGv3yJDr_8iujCZnxH2jnlo,1984 -Cython/Includes/cpython/pystate.pxd,sha256=xgf1BBkv36qvqMaR77zZWYOuonAwe4RfNKE2g91A6fk,3683 -Cython/Includes/cpython/ref.pxd,sha256=2AmgyGDhwA4scts0jcBTdGTCG0b2P8-eYAKFJk44x0I,2557 -Cython/Includes/cpython/genobject.pxd,sha256=emC1JPgkuvBbGC0rgeZapKDaXYEj48uWiDC-xF0Mx2I,1052 -Cython/Includes/cpython/longintrepr.pxd,sha256=czvKr3fQdYIwIRu3gojXssT9LFXH-nstM7f_lPt7lE4,480 -Cython/Includes/cpython/codecs.pxd,sha256=3fyudEljkNGQ7e3dJPst6udXGcAeNKvlMK9U8EB1gXc,5084 -Cython/Includes/cpython/set.pxd,sha256=ewHRPVMbHUGDInZ3NziisCq68LvtmEJ-SXFbzmuJxLc,5383 -Cython/Includes/cpython/object.pxd,sha256=AK5D-LrDbvisO6wpkh29G6xjA71sBF_KfKUyn0k2hzg,18366 -Cython/Includes/cpython/getargs.pxd,sha256=268twKzdiAkQMXMsetNiNlNqaqzlKtiBENKbhOHd8x4,775 -Cython/Includes/cpython/slice.pxd,sha256=Rzgn8diAsN7lS2xGTq4VZucV3ziFNra4oz4tKGEAkMo,3111 -Cython/Includes/cpython/tuple.pxd,sha256=eOLfH75ftJeYszztGFWWZP7LnyFOgw8GNuE7PQ9hAvs,3206 -Cython/Includes/cpython/__init__.pxd,sha256=8URNRvb7JkYhqDZv2J0bVsdeZBEJBu7u2QFYkDyXPG8,8254 -Cython/Includes/cpython/int.pxd,sha256=d9a0zUw_M3pRycCESWIjtfXWRvdvFOWxjdOjkcbX2gs,4131 -Cython/Includes/cpython/datetime.pxd,sha256=wQqB8i3tMZOTw9qrLdbHJRkxgZqscGEqmq0tIDfkkqw,6776 -Cython/Includes/cpython/long.pxd,sha256=d6jHN1XJj7WL5PPAUK8U93IPyjWtlTmyhrBEVmxmGF8,7051 -Cython/Includes/cpython/dict.pxd,sha256=F-mrlcAfNmTSUkpJed63bp1IaO0cwG56t_DLk7f0xv0,6877 -Cython/Includes/cpython/oldbuffer.pxd,sha256=v0-YZ_Iwwj3ZQdM8VE5NPTQcbBlJdWwJGtNO9DonGgw,2916 -Cython/Includes/cpython/mem.pxd,sha256=AWVinanXFBZXvU141we2dD8dkOqMJ8W3KAAzpBJqB5g,5386 -Cython/Includes/cpython/unicode.pxd,sha256=BYaF26EbiStNE62WHjLFFxAygoU9zwSezQDOpjxHse8,26242 -Cython/Includes/cpython/pythread.pxd,sha256=0375TaYmtNCDDkWBh9WY4oJ_jhoTxhu_RR5QiOsXmYg,1946 -Cython/Includes/cpython/mapping.pxd,sha256=OIdvNVUoIpVCSQnkbLceTicSN0D_jRw6wQmbtxtxKuQ,2693 -Cython/Includes/cpython/string.pxd,sha256=EKjDGFnPcjnkndwGMJqRrszDV390Mc6o7AADChnNCiA,9944 -Cython/Includes/cpython/exc.pxd,sha256=29-bGESwfoMqx1XU3MMggkIr8pz_l0UPruzy6KIzHxg,13606 -Cython/Includes/cpython/cobject.pxd,sha256=ZeMdbpZLqpcTywdv2VoppMTWD4X_yghL6Qox7LVfOyg,1524 -Cython/Includes/cpython/bool.pxd,sha256=FaNn8K-Toq8FAws8BguKMk0IPM7IJm9IiUUGARSrKYk,1359 -Cython/Includes/cpython/module.pxd,sha256=Vc0Up7q1Mir38bN293E8RMugxWfuzjLFHM4g2dviPBM,9226 -Cython/Includes/cpython/memoryview.pxd,sha256=l97J5-hbH3hp9aMbdXp3n73hJFNNsng6uyh40pc8P7I,2504 -Cython/Includes/cpython/function.pxd,sha256=IoJUprbz8F10DEKh-vSSpY6nWkCHw7SqG9p2f-4gHek,2671 -Cython/Includes/cpython/list.pxd,sha256=t-xo7ROcewe6-0ztrNjsxMKV2KxD-ILUzemQ2tTuI7E,4084 -Cython/Includes/cpython/pylifecycle.pxd,sha256=LziJZHclGdtsr3yT28fULHNZ_n67bs1DmI9s8YzrBGg,2000 -Cython/Includes/cpython/number.pxd,sha256=tYJ0nn0k_llUx3ilniW9iXd2rKVejA-J5UUiIJ36Kww,11922 -Cython/Includes/numpy/__init__.pxd,sha256=CbLwvA4u-xj7RHxbO9Hs2o6hXd7GaJJlGEn9XJVH4c4,38138 -Cython/Includes/numpy/math.pxd,sha256=qZEdamaPgCFW4J7Itc6BWgOrQSKZdxDT6kbU_gqx2g4,5807 -Cython/Includes/Deprecated/python_cobject.pxd,sha256=V9F0DHQbFZPbJ8RRnN9mft2ipq4wubM8ghBCGHr6NwE,69 -Cython/Includes/Deprecated/python.pxd,sha256=l7crg8H9cVRedMcjDf_9xDLdnUT57Vt1BxlZWom-h88,61 -Cython/Includes/Deprecated/python_float.pxd,sha256=v1Hbpd4SF3hSF7ZL_olMaYJzmBNA9jWn0eO9ggLBlvc,67 -Cython/Includes/Deprecated/python_type.pxd,sha256=2OKmEdSqoyK8fXttlHG3NRguZ-ZikUUet-kjKLq-eEU,66 -Cython/Includes/Deprecated/stdio.pxd,sha256=lNc2YuvWJ-LNSSdN7adDo1lf-C2M0r10hH4bysha9Sg,64 -Cython/Includes/Deprecated/python_dict.pxd,sha256=gYhGkJhMmzWcrXoPnJHUcp-vdtcwUACbGlfv3wtGsKU,66 -Cython/Includes/Deprecated/python_module.pxd,sha256=lKu5VYCgC6S7LSgFa22V2YTY9JfML0vABDZpChhxs60,68 -Cython/Includes/Deprecated/python_sequence.pxd,sha256=9ycCua1ODfECKPd56_GBmeqzWrfdqmkjhbEmdt87NC0,70 -Cython/Includes/Deprecated/python_bool.pxd,sha256=qOaFbsP6_pKoB3HGTjQUkFhQqukXheCmcSnnBQLdKGQ,66 -Cython/Includes/Deprecated/python_string.pxd,sha256=6VgAehwW9PcUC9Kp_HbRVMYPeF_Q-L8yr9o2ezuTzys,68 -Cython/Includes/Deprecated/python_int.pxd,sha256=Cwd4J4KTKjxwEMz1BbCso0g0pOID9AnySKOC1g0kLqA,65 -Cython/Includes/Deprecated/python_getargs.pxd,sha256=NEdeqPqu4di0YJm_7yLfvuS903CAe4K2Pzb13TRfBdE,69 -Cython/Includes/Deprecated/python_instance.pxd,sha256=FX9UlYrSxDrzch7wUvh_Y5Ix-bsDYARkXzZJOg2FvEI,70 -Cython/Includes/Deprecated/stdlib.pxd,sha256=PbCbjT8MjDjVRjx5Rod79gi22-9YI35jTulePAKCPXE,65 -Cython/Includes/Deprecated/python_weakref.pxd,sha256=CUWMSmClrWPoTnlClOFCSHa6Xd55qDgIlcDCD6tfEhM,69 -Cython/Includes/Deprecated/python_object.pxd,sha256=qr2OwYVot4ELK3_-mCfaktXgLJEaKWDyCEblQ2vXV-E,68 -Cython/Includes/Deprecated/python_pycapsule.pxd,sha256=tHJfhgm1TrSwJQwQFdhwP7YE7oQFiegxhNhgCDmlB6A,71 -Cython/Includes/Deprecated/python_complex.pxd,sha256=ITmq55v0b1gibEpLSCTCz68ViljenSuGGjiWn_nvIvI,69 -Cython/Includes/Deprecated/python_exc.pxd,sha256=irWdwDYRWU16-P54uGDNfUSUtkL5Sj_1zBDWext_80g,65 -Cython/Includes/Deprecated/python_buffer.pxd,sha256=gv2a3ngcOnRKZZHSox_bW1WD8jGbxfH9NJm1-iUXf9U,68 -Cython/Includes/Deprecated/python_long.pxd,sha256=pg8hOKNoKaW-Mslugzeq6NCeznJw939LT24AVQn_cqE,66 -Cython/Includes/Deprecated/python_bytes.pxd,sha256=07-Hk3YpN_i4mIlbWYbNgDkjEytQAYOepJLJTY1CrVk,67 -Cython/Includes/Deprecated/python_mem.pxd,sha256=Mxidel5P4yuJxJOvoYr0PN1FD78oCOIJUEMPYMYU7lE,65 -Cython/Includes/Deprecated/python_set.pxd,sha256=_Z5KVXs0V_T8fpgLX-2LbDAZIY1HnuhO-eTUHHRYwu0,65 -Cython/Includes/Deprecated/python_list.pxd,sha256=VHpylsg46-5Ud8rwlPe63bb3zSToXm9R_fPorZrJsUE,66 -Cython/Includes/Deprecated/python_unicode.pxd,sha256=TF8-N0un1WdyccTDo9hZVABc53SYzKnC3MEKrGb3vV0,69 -Cython/Includes/Deprecated/python_oldbuffer.pxd,sha256=QyY4Vn5-cFaOt0oZ27GuRXa3tLawgMZN8KMamn9F1yo,71 -Cython/Includes/Deprecated/stl.pxd,sha256=tHpByeYgNiclr3YtCdKKAeEs3CHJflqacC7YgV7YN8k,2187 -Cython/Includes/Deprecated/python_method.pxd,sha256=x5ye5_8KqtsW2HrEon5NdFJmIkmVDV1KeVpFsuC2UZE,68 -Cython/Includes/Deprecated/python_ref.pxd,sha256=wv39G35V7tN5sIhcL1APpe5NuhCwYwVy6X5DPPm5g5A,65 -Cython/Includes/Deprecated/python_version.pxd,sha256=ZXrK0UGUt8vHbYPxm7PTdhMe1_h7Yj6Lo74oFxjnNns,69 -Cython/Includes/Deprecated/python_number.pxd,sha256=X4MxGoITZuJNPtC2cFJ8lQwui8MOC6rQfEDbFIcWA9k,68 -Cython/Includes/Deprecated/python_tuple.pxd,sha256=_ZTQh7dRBmrRs9mtmOFjP37d0IFItxs20kzFtKtkY-g,67 -Cython/Includes/Deprecated/python_function.pxd,sha256=lkYKySQy1W36hfyyAJsc3E-8d9bsx5k8OhIMFQ6k2jA,70 -Cython/Includes/Deprecated/python_iterator.pxd,sha256=nPJ0nKSmnUVzI1SPrTSt9wSD7SQILyhONJdP0H_-FGc,70 -Cython/Includes/Deprecated/python_mapping.pxd,sha256=AZtJdYm37glDSNChduAsgavz-_DPDkxxQEAO9lDGy84,69 -Cython/Includes/posix/types.pxd,sha256=tWEWxST4EGHIgYS-Ce2SGjZ-KgmM2SVe1eggdcgv3JQ,1162 -Cython/Includes/posix/dlfcn.pxd,sha256=2IFcGBfZEmArdE0BxB71eT_Yb7n9STaVM11AtUcg_pE,355 -Cython/Includes/posix/stdio.pxd,sha256=K8DEH38hWMvy2A8zcKbHRrHSGsgwTIrQ9qCzU-0cWS0,1054 -Cython/Includes/posix/ioctl.pxd,sha256=2RC5zejPOCTkarDZM_6Vd2wc4oBuN7iaiL_C5MPBs90,99 -Cython/Includes/posix/resource.pxd,sha256=MQe1bCTYQFVMsago3pgOvR6t6NElQElg7rhVANxYRcE,1254 -Cython/Includes/posix/strings.pxd,sha256=GNEteqND2wgXXSvkv6U9eKSC9oIom3C7o2zQ6W_J_S4,374 -Cython/Includes/posix/fcntl.pxd,sha256=oRL8-OsgcplHMGcYq5-W5twISvxK-vDfzAaEfuQHC-4,1194 -Cython/Includes/posix/time.pxd,sha256=wPUD7AjxpxmnUYmogTMFjroB2VzcPh8-b_8NEj-yG14,1980 -Cython/Includes/posix/stdlib.pxd,sha256=uGRPa00_HWZ6Chv5E13F96eut0xWHSfR7IioK9rKVLY,934 -Cython/Includes/posix/wait.pxd,sha256=WNogQvKu2hMfEQiCyaANfVWFnyJSk6TxBU0c6npeJrA,1244 -Cython/Includes/posix/unistd.pxd,sha256=w9B4d9NaXBsQ62XOr2xe9UFPGewmEk5BG6sqiRWdoM8,8061 -Cython/Includes/posix/__init__.pxd,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 -Cython/Includes/posix/mman.pxd,sha256=juJcLi92N9Bc6L2p4zrUmYQIgNmrTsZ6hExbl1181pc,3362 -Cython/Includes/posix/stat.pxd,sha256=ZOcPCpXnxlRRHcUkvg559hrFfB75uTbIYRWoQeyBCYs,1734 -Cython/Includes/posix/signal.pxd,sha256=wFJI5UthdtU9mZWjEBeZ9IIfeX252JVwDk2tsbW_q3U,1876 -Cython/Includes/posix/select.pxd,sha256=e4nhGHR8TRw6Xs9du5JoFtkd8U9sm3gX_BHq2FfmU6E,546 -Cython/Includes/libc/stddef.pxd,sha256=0rCyoocCfDL-1OQo3pxHQ-6fW20SAYktOLPoa4d97w8,164 -Cython/Includes/libc/stdio.pxd,sha256=qUaxEwNrQl1-4yHLorzzJZ-a-y5_-Rm_m7Z5meaRqH0,2476 -Cython/Includes/libc/limits.pxd,sha256=xHlIyuDIKpjqclvRRYzZIcfd5G1re5QtbmoDMqZR_Ec,621 -Cython/Includes/libc/float.pxd,sha256=IhvZJljpTG0fZtcIp7EBO2Sqddozxoxwj4RFNVcKLpY,966 -Cython/Includes/libc/time.pxd,sha256=-IRH7fTq3wKBKmQQnpZRhaLsnl7D_qXFz_4BLB9O3u0,1317 -Cython/Includes/libc/errno.pxd,sha256=j5hcKx7zinivU2b6SFMy8LZ9sJIQY5XLrp9cQUKv5AQ,2050 -Cython/Includes/libc/setjmp.pxd,sha256=XRh-gSuhvFLl0nRvz5OhSWYe9eqX2attAck3JI7mwa4,297 -Cython/Includes/libc/stdlib.pxd,sha256=p62xq2XfB24WfNCjRXgD6cOYoRuV47AnYijkjWv4ugE,2444 -Cython/Includes/libc/__init__.pxd,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 -Cython/Includes/libc/stdint.pxd,sha256=qHJXzpWCrbvJWSaHYZL27VJPupQreTZl9VGj0jgLdRU,3449 -Cython/Includes/libc/signal.pxd,sha256=XOScPDA5vzlfEmu4D7DFT1-5Eu3qMpYdUarjt-fqlbw,1170 -Cython/Includes/libc/math.pxd,sha256=51YUxSe01R96_rr3sj4n4MLW-eOmQbcwdNn8YthTxqg,2948 -Cython/Includes/libc/locale.pxd,sha256=sixG8EJ6wiVb0HIR1LWJ3lXTjTv463GJ9C_40HRovN4,1140 -Cython/Includes/libc/string.pxd,sha256=tzYGbRrnccedFLes-KGgJqM0FEtwHF_q4f2fqltNvyE,2038 -Cython/Includes/libcpp/forward_list.pxd,sha256=-So1ExEOkoPfsSdMlJSlI5665-zyWLMoUxlmm2Dlokk,2392 -Cython/Includes/libcpp/complex.pxd,sha256=IjL8y9sAglhGbTKhqsJbW0mgMTYEUbYM1ekr5VDhQgY,3012 -Cython/Includes/libcpp/pair.pxd,sha256=UBJXw43uHkDlNsr0Pu1aP5tZ-ILXhUAyOLam2qdWmZA,27 -Cython/Includes/libcpp/utility.pxd,sha256=hTbvp7c12pnU2yvzzMvflZB-MAc_--3xh3PXtD_VIwg,1040 -Cython/Includes/libcpp/limits.pxd,sha256=RKV3wPvk4tV_vX5CYQRJIK5m5xXav7SeBxltlLyk8es,1661 -Cython/Includes/libcpp/queue.pxd,sha256=FbL4Q7C3lgtZ2YzictU1XBXzQ7G-6y9i_7l2eqzA3Xc,649 -Cython/Includes/libcpp/iterator.pxd,sha256=mVc1rsAYfn_ARrdQ4JG-Ut5il5ynIa1CRXLk8Be8Zks,1432 -Cython/Includes/libcpp/memory.pxd,sha256=Hj20aSnmUTPAhFCrlmF_aeHJKiMiZ2bDKhaYn2yybJo,3600 -Cython/Includes/libcpp/set.pxd,sha256=3y5Ir2TjGD7g3VRvlkXV1a3V3ZYzJvwOAfeTv8ucOCw,2170 -Cython/Includes/libcpp/stack.pxd,sha256=zM3SQOqMWONVqud13ag3bUupA-ozU_YMq4Ad2QkL6fI,292 -Cython/Includes/libcpp/deque.pxd,sha256=aWqZ9j3OgQuqFLkqRO_U2FIwbSe2fKmmYDRAfD0vGqU,3106 -Cython/Includes/libcpp/vector.pxd,sha256=GYqLb74owhMmNQHUCcZSxGcYPgNuw6qULsfWKr7g6OQ,3350 -Cython/Includes/libcpp/__init__.pxd,sha256=PCx8ZRfOeoyMRu41PPlPY9uo2kZmt_7d0KR4Epzfe7c,94 -Cython/Includes/libcpp/functional.pxd,sha256=BXPYkffEOlKO1erTLqlkBLex6Gb5byDMF4hq_MZ2aVI,381 -Cython/Includes/libcpp/unordered_set.pxd,sha256=eUYSOMT5Gt8kZWCUKezQGyXWzatEyNg6-nmAlmcBo-k,2622 -Cython/Includes/libcpp/map.pxd,sha256=GF2sDnFBHZoU3Rcuo1rn6yKh45nhkX0_iH29xj581ow,2551 -Cython/Includes/libcpp/typeinfo.pxd,sha256=tITsqurrdaZjsEGFksem9xZtVhSxQRxHZxcoC-4Y-DY,304 -Cython/Includes/libcpp/algorithm.pxd,sha256=-2V0oR_cFbHHzeWT9RcfLvi5Oy-s_V2lO3OI6ZtX6fM,1770 -Cython/Includes/libcpp/unordered_map.pxd,sha256=eNna4hRAucQLnliBfEMu7Unfd_lB18I42iwKmsCO0-M,2867 -Cython/Includes/libcpp/string.pxd,sha256=zsvzyW6IggIDFqcF-UuLjxiNAHPtToAoc9VhKKG2U5A,8731 -Cython/Includes/libcpp/typeindex.pxd,sha256=mIHr5Mq6Lol0SlzqeK6w_giVERh3uAjZm78yPDLXzc4,524 -Cython/Includes/libcpp/cast.pxd,sha256=En4LBubdinfpm9Rel077tK_LGwg_3k4FAu9mlIbKjuw,501 -Cython/Includes/libcpp/list.pxd,sha256=rGQfB3_mDcRkGKtMBuvDQvAPmgzR5jxSf3eOSRgR4YA,2658 -Cython/Compiler/UtilityCode.py,sha256=PbQtJt9fSwgm5xeXgYWQih6eUSmJL_RwTxOa5T9SrZU,9391 -Cython/Compiler/Scanning.pxd,sha256=vjjPLZb5udPzMpk67DKojTTDUl31QU86oXyAMks7Hsw,2113 -Cython/Compiler/ParseTreeTransforms.pxd,sha256=oDSda3XYP79o8tCAxEm_epWWVPXSaPy8lYrprWYRyNk,2468 -Cython/Compiler/ParseTreeTransforms.py,sha256=cgiG6tvFHkavvL0bFEqKdv9VXz5BucRcgWZvDqSlB68,139102 -Cython/Compiler/Parsing.pxd,sha256=pL_EQdVWaw7EZVTZrxzMcUvoSJeAoXXPRh8kCLudysk,8984 -Cython/Compiler/Version.py,sha256=f2mS6aYYdu0DMRK3B4IuzMlCo-k-ffmehCao_vKlTdk,181 -Cython/Compiler/AutoDocTransforms.py,sha256=le7k-xhGWDkvpRXRppZsqhJzkav6i41GmAOmDetxVmk,7517 -Cython/Compiler/DebugFlags.py,sha256=5Zg9ETp0qPFEma6QMtrGUwu9Fn6NTYMBMWPI_GxFW0A,623 -Cython/Compiler/StringEncoding.py,sha256=dn3jVSL4JScbeYf1f56j5RJR9M58AnCDdJObC-cc3fg,10812 -Cython/Compiler/Options.py,sha256=ryrLc_NNo0QSMaP-jHhmo1L2oZJA6h7KpE6xs_KSyUo,19707 -Cython/Compiler/FlowControl.cpython-39-x86_64-linux-gnu.so,sha256=BTJE8oBoQ2wG7juYWmB5OaqAJ0mNWONjmmH0qqU0yfU,675856 -Cython/Compiler/Parsing.py,sha256=u_5SWON1ws-S_5cCw1xXmZdgxTlLWfTxFAJJEbXX7m8,129791 -Cython/Compiler/CythonScope.py,sha256=mNwmE509uePmR3S2djg3Dq6zOZ3hgK-U8NDeawys9WM,6027 -Cython/Compiler/CodeGeneration.py,sha256=jkcx2uX07nck0UZSgysIThRuJiPbdkSeXR4Z2uzbQU8,1108 -Cython/Compiler/Scanning.cpython-39-x86_64-linux-gnu.so,sha256=HliOLuiHxkR8XBjyDu0NaBrzX94IKWOz7UL-SjF-Q6Q,310616 -Cython/Compiler/Builtin.py,sha256=fdR58NDTWNQWO3tA0JtAzUq9JfXL6pJdEOSHTcz6BZA,22469 -Cython/Compiler/Nodes.py,sha256=oxBksQ2XS6paSKsaEGZlxxS3WEiYJSBMDTxIaNH_wCg,391390 -Cython/Compiler/Optimize.py,sha256=W01lBStxLyXYYRhBUZrr-PZYyfyl9KgY3KPvriVXf8U,210273 -Cython/Compiler/Code.pxd,sha256=XEZU44jXCOFoYTG15-R0X41krTrjpuo1wxRKjyzYwoY,3354 -Cython/Compiler/ModuleNode.py,sha256=n2s-hf3IegF4n32np8l8Lg-EBPNK39K1_FmNdqRdJk4,142244 -Cython/Compiler/Main.py,sha256=_b1cDedgPRDFy4sN7-FZsKx5qbcD4XTefhD9qZwlgWQ,36488 -Cython/Compiler/Visitor.py,sha256=iqtIsNaQwk8lSa6g_LnEU06CZtdnP7MDXbyodl4Ouwk,29984 -Cython/Compiler/UtilNodes.py,sha256=mS6jlZ530p17WGU0ApbwvLecuByT18LFipVrKJg5jrM,11636 -Cython/Compiler/TypeInference.py,sha256=s-GKZcq16KPPgY_OpF8cTlQmX1Cpu-qBMCtmAYDg8fc,22326 -Cython/Compiler/Naming.py,sha256=Z6FLRoOl21F91SMoIoMSu_CqYosGhxDJLO9grYSHhVI,6333 -Cython/Compiler/PyrexTypes.py,sha256=-nGJxm5amgIjkfvBpQFeSLn8zS2fi_cBvOtgBIfr5F8,173958 -Cython/Compiler/FlowControl.py,sha256=-I33Yd9sp1RCENjFkrufBM8Xrj3y5SI7KZ04Vz5Djiw,45981 -Cython/Compiler/AnalysedTreeTransforms.py,sha256=T2r1SLFeG7a4D9tt93hm8YRH_aGLwmK82PNpb1RsbnE,3826 -Cython/Compiler/Code.py,sha256=sOh_jtyZaRsT38QKKXS1wojqYeVa_u7XSlIr94B1_A8,97242 -Cython/Compiler/Buffer.py,sha256=6-YIUiLWtgpC2LRhs7116umzNiEbzA6cz1lnPkSEn30,29035 -Cython/Compiler/Visitor.pxd,sha256=KvOZgHoEREMTVYXr1ZoAk9H4n__rpmhIwE2S11ajeYM,1792 -Cython/Compiler/Lexicon.py,sha256=Cw_wIfQymcTEdkoo82V2xbV8kvCp30O-Pc7qF4hbfCI,4855 -Cython/Compiler/Pythran.py,sha256=NHIml0yx0jPLyTLRAHXZr0LHTyEyfYqspgYuV4vdNKI,7267 -Cython/Compiler/Annotate.py,sha256=bkVgdH3ItuIbaSpi9Qo5bKiIjOX3-J5sZORfcyk_eZY,12950 -Cython/Compiler/__init__.py,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 -Cython/Compiler/Visitor.cpython-39-x86_64-linux-gnu.so,sha256=7rFfAfOG_gwXWbbeUY8HHKXnspaw16NAaadZnl7NV2w,367904 -Cython/Compiler/Scanning.py,sha256=Gl7sU5rI-5H5v8z9QLZBh1hivS2cOGa9H878QdEpUU4,18438 -Cython/Compiler/CmdLine.py,sha256=cRwX-QUfBCVmGXxVKKAeF2CHKiLVtjH4QRGMGaBRmkI,9939 -Cython/Compiler/Future.py,sha256=GwcWZ_Vti0atfbOARfS2kIvZOvRuPu38wbShIn4o4kA,587 -Cython/Compiler/Errors.py,sha256=GATz9x6onls09cM6TeDw3kdBgdCxUiKJBILwukBF6WI,7554 -Cython/Compiler/TreePath.py,sha256=3_lScMAd2Sly2ekZ8HO8dyZstGSruINl2MXXq9OYd2Q,7641 -Cython/Compiler/Symtab.py,sha256=n0tdTnbPkSuU5EgPkr6nGBN98Lhbklbjt8o6NUFt264,111727 -Cython/Compiler/TypeSlots.py,sha256=zvQrFMKa6Pzk8jB187PuqFhdJUa82SQ1thztSV1ArhI,37837 -Cython/Compiler/MemoryView.py,sha256=c6J7PtQ6wccb9uBxvbLngia4jO-h2uea7viIzJNhDYU,30009 -Cython/Compiler/ExprNodes.py,sha256=qsOOc1fQyPtGp89dTTnmfXaO_KppGtaCdw1Ljh47Vo4,549114 -Cython/Compiler/FusedNode.cpython-39-x86_64-linux-gnu.so,sha256=u8df1HOyMIVQOlTjh4pjUTm7pJUoagUF-mtsq-QeMSs,465704 -Cython/Compiler/Interpreter.py,sha256=iNweexX2HDI5nZj2rzkW-lw9Rq3gzM__P7SBqH3uxbU,2106 -Cython/Compiler/FusedNode.py,sha256=qmHVHylEPpllK_x-471xBG-zMzAt0RF52tLxt_-RZqs,37794 -Cython/Compiler/FlowControl.pxd,sha256=W8bqGCJLzvAhnL3d1OF8798ZDJg0QI0eA_ebnA4dkoQ,2918 -Cython/Compiler/TreeFragment.py,sha256=jQn4Lp2dNddJ-tjPquoFcyTcX9EIuTAbZKZAKs9-cGU,9408 -Cython/Compiler/Pipeline.py,sha256=6ravd0QCR5sCoKlz9HEz209A2UqgLp4Qp0VysoKa_mI,14061 -Cython/Compiler/Tests/TestStringEncoding.py,sha256=RL1YDXrOUe1sPLEbWmTJQ5VF-uEZ_KLz0jaeQoMx85k,2315 -Cython/Compiler/Tests/TestGrammar.py,sha256=zWMvYG19nIH85Le8ragXt2vLBlWlGGNeMgrTdQO5JGM,3443 -Cython/Compiler/Tests/TestParseTreeTransforms.py,sha256=CorKAgH9tdoehstG6vBAbdpUhaPdN8EW277KMWNR4Uw,8503 -Cython/Compiler/Tests/TestBuffer.py,sha256=yw-KUu2pu4CnsqYaqxj5rpyYodmjJSEqUvQNxLwPL8I,4155 -Cython/Compiler/Tests/TestVisitor.py,sha256=QAnBpUhnirSFKqXWiawo-OhXhxIRTQidWxEzGjJDz6M,2228 -Cython/Compiler/Tests/TestTypes.py,sha256=YuFib5WCJfSPafrhy5yrCUdwajYw61yGPo4HveTyzUs,669 -Cython/Compiler/Tests/TestSignatureMatching.py,sha256=qMiQZeg5_Eu8VfCY_lMawqpjpKNV0r6p6-9czKec1aY,3338 -Cython/Compiler/Tests/TestTreePath.py,sha256=x-2KBIhSE6-vT-2BPe2q-zaa1oHtc42ibKzVs_y8_So,4238 -Cython/Compiler/Tests/__init__.py,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 -Cython/Compiler/Tests/TestFlowControl.py,sha256=ge3iqBor6xe5MLaLbOtw7ETntJnAh8EequF1aetVzMw,1848 -Cython/Compiler/Tests/TestUtilityLoad.py,sha256=Uzf4_bOjha-zwQaikNbsAOVQs3ZPX3YD7QQ5T4s66YY,3341 -Cython/Compiler/Tests/TestMemView.py,sha256=yBAQ5tN8DVPTFRJ81dAzOepCt5Ly6fiaAssQve5ryy4,2515 -Cython/Compiler/Tests/TestCmdLine.py,sha256=wBtbNserRsU4_Yj_0W6cujG-07PkwORT-r1Z3oLHmcU,4414 -Cython/Compiler/Tests/TestTreeFragment.py,sha256=wHlnF0ApwxeITx9pzg46P9N_2lM-7mrPwhDeNlIQnXM,2206 -Cython/Runtime/__init__.py,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 -Cython/Runtime/refnanny.cpython-39-x86_64-linux-gnu.so,sha256=g36WxQJSIIDoFeLqpPau6NdHmXjZfdak5ip6AYu6CUs,85168 -Cython/Runtime/refnanny.pyx,sha256=f2p1_0YxK25lm8Qfsu2ytvl0Im7GYyix1Q9krEBwC6c,6279 -Cython/Tests/TestCodeWriter.py,sha256=qKad43J3hN7PLp7mVbEDESt96qsk8y3ELRwwIp9jnNw,2316 -Cython/Tests/xmlrunner.py,sha256=N1Z_C4Q_rSWFNQxm3L99qX-SaIWEksXbmfXOd_srg3s,14801 -Cython/Tests/TestCythonUtils.py,sha256=XF4Fw4J5HZ4jUPLVv7ea8ZZcl2i9yXn5cx27WTtrcmU,474 -Cython/Tests/__init__.py,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 -Cython/Tests/TestStringIOTree.py,sha256=vTuu3z32WTcmJaf0fBq62NMghYtaPL2rRnfdl2WM--4,1946 -Cython/Tests/TestJediTyper.py,sha256=F6MUG8SdzGXQwkbw6Wv1PqVlmlIT1z_7lH2buVOFT_I,6996 -Cython/Debugger/libcython.py,sha256=Qs0qGzeUyeY___3jRDy_WWIDFGfSRH4al7On2XxkuNg,44949 -Cython/Debugger/libpython.py,sha256=IyTEdtGLnpQmt2XPgZ7oskQ8qGWWV2_5TMgZ5NhTA0k,90489 -Cython/Debugger/DebugWriter.py,sha256=Yzz28JR4qZepxvxeu_1rJxIjJ4JbNQm5vM5e_UtNuRo,1945 -Cython/Debugger/__init__.py,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 -Cython/Debugger/Cygdb.py,sha256=CH_pXm0Jhl4SAe6sJXa5NS47vMmQ2KBbecyV56vLqFE,5751 -Cython/Debugger/Tests/TestLibCython.py,sha256=xrENLEahnp6WtOfokVtsALR6Ot2jFR6T5ZZRcaX0Vxk,8327 -Cython/Debugger/Tests/test_libcython_in_gdb.py,sha256=EvPTYkd7nzR3JtFim-ASLI6wfcYhgWfI4BQrucLJbHY,15804 -Cython/Debugger/Tests/cfuncs.c,sha256=4SZurmnz5J1SiIs9N26Eu4zc2wvF_qMEKaN0eTcbDPo,71 -Cython/Debugger/Tests/codefile,sha256=ugwpT9GPtYZIKe2Xco4PqikyA-poQAeYfE0icXmfb44,641 -Cython/Debugger/Tests/test_libpython_in_gdb.py,sha256=1BD_FtMkmS4SoSQZq7MgAgDnvqIw3EcYZFVrtoCQmxo,4079 -Cython/Debugger/Tests/__init__.py,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 -Cython/Build/BuildExecutable.py,sha256=9wjcOncQpbCT_Pu2Ljj5jufFLSY6T_oHOFt0uXYTdRk,4318 -Cython/Build/Cythonize.py,sha256=OBSutgd93PXiRi5_6GRuhpfMZehw9YOfRgt1mxi6QLk,8359 -Cython/Build/Dependencies.py,sha256=SkMflfSEXLlyGdkQ0xLMY7zMMoBxq4VgfPyN_BUSvTQ,50391 -Cython/Build/IpythonMagic.py,sha256=j-E-JJYGj03ceWDp5SRmyK-WxyroRkNOEQODA9rCfFc,21126 -Cython/Build/__init__.py,sha256=zBhW6hT9Mwk1ZybfuPi61iCa6A4srId1HJz9OiEd07o,69 -Cython/Build/Distutils.py,sha256=iO5tPX84Kc-ZWMocfuQbl_PqyC9HGGIRS-NiKI60-ZE,49 -Cython/Build/Inline.py,sha256=wd5_xBOup8MWxNtv5uwWgWWG5GrkShYysMMluY7ripE,13451 -Cython/Build/Tests/TestIpythonMagic.py,sha256=H88J6_r3dP5V3-N7eSKZuE2l9G8BtkFF_o8wY7pifKU,6225 -Cython/Build/Tests/TestInline.py,sha256=bp4XGXZYSyxY2zXI0q4bg58a0ARsclUzXSfWykn0dZw,2854 -Cython/Build/Tests/TestStripLiterals.py,sha256=-QeUd22OnoL50rW2EgpfIA01UzRMutcBA5NrhkHiE7M,1550 -Cython/Build/Tests/TestCyCache.py,sha256=olOvphv4q1CLsNzMAhgmXnL77zhGGQKuKbYs_iSFFvA,4151 -Cython/Build/Tests/__init__.py,sha256=jOqtmPLCvMCq0xVMwGekuLpBmVgq0xtPFmUePySdOjs,13 -Cython/Plex/Regexps.py,sha256=qaP-Fr-GgKNmBVsMyXO3ltl2HH1JQcQiFmX2oyUyeOA,16208 -Cython/Plex/Timing.py,sha256=-VgQveS-Ip_2ErjrVxh4w7cXpyVBkUaSaiLadyD3bw0,472 -Cython/Plex/Lexicons.py,sha256=ay3yy9fqI5y5lfgpJ4ubBjYZQ53gFDVgNGbmoSl5DxI,6907 -Cython/Plex/Scanners.cpython-39-x86_64-linux-gnu.so,sha256=PdO2JIzpfrU716YK1iLWYQ2qa-QAtEjfe_pEERr6DeU,111960 -Cython/Plex/Traditional.py,sha256=cAT-pZnqIwCJaqgSqgKODSznFZ5DunUw_MLWx8Y650c,4120 -Cython/Plex/Actions.cpython-39-x86_64-linux-gnu.so,sha256=zjycWVB0TAP37001dqkMmkmoKXBB98GfOHg8vIo-E8g,73752 -Cython/Plex/Transitions.py,sha256=Tvp7cFXR3ZBPPHm0TAhUMC_-uiRR9YdOkF4t0wtk-f0,7187 -Cython/Plex/Actions.pxd,sha256=FC-6ffzWR4i3rR6VSL2C64Xxs1qBhpBEzRsU7WpLn1Y,585 -Cython/Plex/Machines.py,sha256=bIKg3-yxD_r7x-zEowJ7EsPBWlgXm_XhIozqsLQBeTk,7760 -Cython/Plex/__init__.py,sha256=dvMeQpSyZE75W0gkf4Xo5LAxgQLNhkAXiQoIOtcOkZ0,1282 -Cython/Plex/Errors.py,sha256=As5uuGmqZe4w0B7Dm981lZTnDG-nlXSHYqiGUKnhrrY,1169 -Cython/Plex/Scanners.py,sha256=-TXAxKW43ZbQNCSEkMWEJ0SmqYVVCkSOT9UngOCRZnQ,12259 -Cython/Plex/Actions.py,sha256=Caxkx8Kup9m4sx24ZcDTq-fAfPGG06TAHu2NI1D9zPs,2545 -Cython/Plex/DFA.py,sha256=w4vl2ejXv6ptILtkTCbB8NcvF8ylwc6DaQ2gPFrWuo4,6012 -Cython/Plex/Scanners.pxd,sha256=oSfcDUZ3syc2ag73udwU5xoaIGDxiNd8a2F_LLw5PzY,1481 diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/WHEEL b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/WHEEL deleted file mode 100644 index 81aea1b9e2e..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/WHEEL +++ /dev/null @@ -1,7 +0,0 @@ -Wheel-Version: 1.0 -Generator: bdist_wheel (0.37.1) -Root-Is-Purelib: false -Tag: cp39-cp39-manylinux_2_17_x86_64 -Tag: cp39-cp39-manylinux2014_x86_64 -Tag: cp39-cp39-manylinux_2_24_x86_64 - diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/entry_points.txt b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/entry_points.txt deleted file mode 100644 index f8b3914454c..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/entry_points.txt +++ /dev/null @@ -1,4 +0,0 @@ -[console_scripts] -cygdb = Cython.Debugger.Cygdb:main -cython = Cython.Compiler.Main:setuptools_main -cythonize = Cython.Build.Cythonize:main diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/top_level.txt b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/top_level.txt deleted file mode 100644 index 48cccd7fc20..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/EGG-INFO/top_level.txt +++ /dev/null @@ -1,3 +0,0 @@ -Cython -cython -pyximport diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/cython.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/cython.py deleted file mode 100644 index 9283c4d9e5e..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/cython.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python - -# -# Cython -- Main Program, generic -# - -if __name__ == '__main__': - - import os - import sys - - # Make sure we import the right Cython - cythonpath, _ = os.path.split(os.path.realpath(__file__)) - sys.path.insert(0, cythonpath) - - from Cython.Compiler.Main import main - main(command_line = 1) - -else: - # Void cython.* directives. - from Cython.Shadow import * - ## and bring in the __version__ - from Cython import __version__ - from Cython import load_ipython_extension diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/__init__.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/__init__.py deleted file mode 100644 index 378c42281f9..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from .pyximport import * - -# replicate docstring -from .pyximport import __doc__ diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/pyxbuild.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/pyxbuild.py deleted file mode 100644 index de4a2241f91..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/pyxbuild.py +++ /dev/null @@ -1,160 +0,0 @@ -"""Build a Pyrex file from .pyx source to .so loadable module using -the installed distutils infrastructure. Call: - -out_fname = pyx_to_dll("foo.pyx") -""" -import os -import sys - -from distutils.errors import DistutilsArgError, DistutilsError, CCompilerError -from distutils.extension import Extension -from distutils.util import grok_environment_error -try: - from Cython.Distutils.old_build_ext import old_build_ext as build_ext - HAS_CYTHON = True -except ImportError: - HAS_CYTHON = False - -DEBUG = 0 - -_reloads={} - - -def pyx_to_dll(filename, ext=None, force_rebuild=0, build_in_temp=False, pyxbuild_dir=None, - setup_args=None, reload_support=False, inplace=False): - """Compile a PYX file to a DLL and return the name of the generated .so - or .dll .""" - assert os.path.exists(filename), "Could not find %s" % os.path.abspath(filename) - - path, name = os.path.split(os.path.abspath(filename)) - - if not ext: - modname, extension = os.path.splitext(name) - assert extension in (".pyx", ".py"), extension - if not HAS_CYTHON: - filename = filename[:-len(extension)] + '.c' - ext = Extension(name=modname, sources=[filename]) - - if setup_args is None: - setup_args = {} - if not pyxbuild_dir: - pyxbuild_dir = os.path.join(path, "_pyxbld") - - package_base_dir = path - for package_name in ext.name.split('.')[-2::-1]: - package_base_dir, pname = os.path.split(package_base_dir) - if pname != package_name: - # something is wrong - package path doesn't match file path - package_base_dir = None - break - - script_args=setup_args.get("script_args",[]) - if DEBUG or "--verbose" in script_args: - quiet = "--verbose" - else: - quiet = "--quiet" - args = [quiet, "build_ext"] - if force_rebuild: - args.append("--force") - if inplace and package_base_dir: - args.extend(['--build-lib', package_base_dir]) - if ext.name == '__init__' or ext.name.endswith('.__init__'): - # package => provide __path__ early - if not hasattr(ext, 'cython_directives'): - ext.cython_directives = {'set_initial_path' : 'SOURCEFILE'} - elif 'set_initial_path' not in ext.cython_directives: - ext.cython_directives['set_initial_path'] = 'SOURCEFILE' - - if HAS_CYTHON and build_in_temp: - args.append("--pyrex-c-in-temp") - sargs = setup_args.copy() - sargs.update({ - "script_name": None, - "script_args": args + script_args, - }) - # late import, in case setuptools replaced it - from distutils.dist import Distribution - dist = Distribution(sargs) - if not dist.ext_modules: - dist.ext_modules = [] - dist.ext_modules.append(ext) - if HAS_CYTHON: - dist.cmdclass = {'build_ext': build_ext} - build = dist.get_command_obj('build') - build.build_base = pyxbuild_dir - - cfgfiles = dist.find_config_files() - dist.parse_config_files(cfgfiles) - - try: - ok = dist.parse_command_line() - except DistutilsArgError: - raise - - if DEBUG: - print("options (after parsing command line):") - dist.dump_option_dicts() - assert ok - - - try: - obj_build_ext = dist.get_command_obj("build_ext") - dist.run_commands() - so_path = obj_build_ext.get_outputs()[0] - if obj_build_ext.inplace: - # Python distutils get_outputs()[ returns a wrong so_path - # when --inplace ; see http://bugs.python.org/issue5977 - # workaround: - so_path = os.path.join(os.path.dirname(filename), - os.path.basename(so_path)) - if reload_support: - org_path = so_path - timestamp = os.path.getmtime(org_path) - global _reloads - last_timestamp, last_path, count = _reloads.get(org_path, (None,None,0) ) - if last_timestamp == timestamp: - so_path = last_path - else: - basename = os.path.basename(org_path) - while count < 100: - count += 1 - r_path = os.path.join(obj_build_ext.build_lib, - basename + '.reload%s'%count) - try: - import shutil # late import / reload_support is: debugging - try: - # Try to unlink first --- if the .so file - # is mmapped by another process, - # overwriting its contents corrupts the - # loaded image (on Linux) and crashes the - # other process. On Windows, unlinking an - # open file just fails. - if os.path.isfile(r_path): - os.unlink(r_path) - except OSError: - continue - shutil.copy2(org_path, r_path) - so_path = r_path - except IOError: - continue - break - else: - # used up all 100 slots - raise ImportError("reload count for %s reached maximum"%org_path) - _reloads[org_path]=(timestamp, so_path, count) - return so_path - except KeyboardInterrupt: - sys.exit(1) - except (IOError, os.error): - exc = sys.exc_info()[1] - error = grok_environment_error(exc) - - if DEBUG: - sys.stderr.write(error + "\n") - raise - - -if __name__=="__main__": - pyx_to_dll("dummy.pyx") - from . import test - diff --git a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/pyximport.py b/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/pyximport.py deleted file mode 100644 index 5628f301b19..00000000000 --- a/python/cugraph/.eggs/Cython-0.29.30-py3.9-linux-x86_64.egg/pyximport/pyximport.py +++ /dev/null @@ -1,602 +0,0 @@ -""" -Import hooks; when installed with the install() function, these hooks -allow importing .pyx files as if they were Python modules. - -If you want the hook installed every time you run Python -you can add it to your Python version by adding these lines to -sitecustomize.py (which you can create from scratch in site-packages -if it doesn't exist there or somewhere else on your python path):: - - import pyximport - pyximport.install() - -For instance on the Mac with a non-system Python 2.3, you could create -sitecustomize.py with only those two lines at -/usr/local/lib/python2.3/site-packages/sitecustomize.py . - -A custom distutils.core.Extension instance and setup() args -(Distribution) for for the build can be defined by a .pyxbld -file like: - -# examplemod.pyxbld -def make_ext(modname, pyxfilename): - from distutils.extension import Extension - return Extension(name = modname, - sources=[pyxfilename, 'hello.c'], - include_dirs=['/myinclude'] ) -def make_setup_args(): - return dict(script_args=["--compiler=mingw32"]) - -Extra dependencies can be defined by a .pyxdep . -See README. - -Since Cython 0.11, the :mod:`pyximport` module also has experimental -compilation support for normal Python modules. This allows you to -automatically run Cython on every .pyx and .py module that Python -imports, including parts of the standard library and installed -packages. Cython will still fail to compile a lot of Python modules, -in which case the import mechanism will fall back to loading the -Python source modules instead. The .py import mechanism is installed -like this:: - - pyximport.install(pyimport = True) - -Running this module as a top-level script will run a test and then print -the documentation. - -This code is based on the Py2.3+ import protocol as described in PEP 302. -""" - -import glob -import imp -import os -import sys -from zipimport import zipimporter, ZipImportError - -mod_name = "pyximport" - -PYX_EXT = ".pyx" -PYXDEP_EXT = ".pyxdep" -PYXBLD_EXT = ".pyxbld" - -DEBUG_IMPORT = False - - -def _print(message, args): - if args: - message = message % args - print(message) - - -def _debug(message, *args): - if DEBUG_IMPORT: - _print(message, args) - - -def _info(message, *args): - _print(message, args) - - -# Performance problem: for every PYX file that is imported, we will -# invoke the whole distutils infrastructure even if the module is -# already built. It might be more efficient to only do it when the -# mod time of the .pyx is newer than the mod time of the .so but -# the question is how to get distutils to tell me the name of the .so -# before it builds it. Maybe it is easy...but maybe the performance -# issue isn't real. -def _load_pyrex(name, filename): - "Load a pyrex file given a name and filename." - - -def get_distutils_extension(modname, pyxfilename, language_level=None): -# try: -# import hashlib -# except ImportError: -# import md5 as hashlib -# extra = "_" + hashlib.md5(open(pyxfilename).read()).hexdigest() -# modname = modname + extra - extension_mod,setup_args = handle_special_build(modname, pyxfilename) - if not extension_mod: - if not isinstance(pyxfilename, str): - # distutils is stupid in Py2 and requires exactly 'str' - # => encode accidentally coerced unicode strings back to str - pyxfilename = pyxfilename.encode(sys.getfilesystemencoding()) - from distutils.extension import Extension - extension_mod = Extension(name = modname, sources=[pyxfilename]) - if language_level is not None: - extension_mod.cython_directives = {'language_level': language_level} - return extension_mod,setup_args - - -def handle_special_build(modname, pyxfilename): - special_build = os.path.splitext(pyxfilename)[0] + PYXBLD_EXT - ext = None - setup_args={} - if os.path.exists(special_build): - # globls = {} - # locs = {} - # execfile(special_build, globls, locs) - # ext = locs["make_ext"](modname, pyxfilename) - mod = imp.load_source("XXXX", special_build, open(special_build)) - make_ext = getattr(mod,'make_ext',None) - if make_ext: - ext = make_ext(modname, pyxfilename) - assert ext and ext.sources, "make_ext in %s did not return Extension" % special_build - make_setup_args = getattr(mod, 'make_setup_args',None) - if make_setup_args: - setup_args = make_setup_args() - assert isinstance(setup_args,dict), ("make_setup_args in %s did not return a dict" - % special_build) - assert set or setup_args, ("neither make_ext nor make_setup_args %s" - % special_build) - ext.sources = [os.path.join(os.path.dirname(special_build), source) - for source in ext.sources] - return ext, setup_args - - -def handle_dependencies(pyxfilename): - testing = '_test_files' in globals() - dependfile = os.path.splitext(pyxfilename)[0] + PYXDEP_EXT - - # by default let distutils decide whether to rebuild on its own - # (it has a better idea of what the output file will be) - - # but we know more about dependencies so force a rebuild if - # some of the dependencies are newer than the pyxfile. - if os.path.exists(dependfile): - depends = open(dependfile).readlines() - depends = [depend.strip() for depend in depends] - - # gather dependencies in the "files" variable - # the dependency file is itself a dependency - files = [dependfile] - for depend in depends: - fullpath = os.path.join(os.path.dirname(dependfile), - depend) - files.extend(glob.glob(fullpath)) - - # only for unit testing to see we did the right thing - if testing: - _test_files[:] = [] #$pycheck_no - - # if any file that the pyxfile depends upon is newer than - # the pyx file, 'touch' the pyx file so that distutils will - # be tricked into rebuilding it. - for file in files: - from distutils.dep_util import newer - if newer(file, pyxfilename): - _debug("Rebuilding %s because of %s", pyxfilename, file) - filetime = os.path.getmtime(file) - os.utime(pyxfilename, (filetime, filetime)) - if testing: - _test_files.append(file) - - -def build_module(name, pyxfilename, pyxbuild_dir=None, inplace=False, language_level=None): - assert os.path.exists(pyxfilename), "Path does not exist: %s" % pyxfilename - handle_dependencies(pyxfilename) - - extension_mod, setup_args = get_distutils_extension(name, pyxfilename, language_level) - build_in_temp = pyxargs.build_in_temp - sargs = pyxargs.setup_args.copy() - sargs.update(setup_args) - build_in_temp = sargs.pop('build_in_temp',build_in_temp) - - from . import pyxbuild - so_path = pyxbuild.pyx_to_dll(pyxfilename, extension_mod, - build_in_temp=build_in_temp, - pyxbuild_dir=pyxbuild_dir, - setup_args=sargs, - inplace=inplace, - reload_support=pyxargs.reload_support) - assert os.path.exists(so_path), "Cannot find: %s" % so_path - - junkpath = os.path.join(os.path.dirname(so_path), name+"_*") #very dangerous with --inplace ? yes, indeed, trying to eat my files ;) - junkstuff = glob.glob(junkpath) - for path in junkstuff: - if path != so_path: - try: - os.remove(path) - except IOError: - _info("Couldn't remove %s", path) - - return so_path - - -def load_module(name, pyxfilename, pyxbuild_dir=None, is_package=False, - build_inplace=False, language_level=None, so_path=None): - try: - if so_path is None: - if is_package: - module_name = name + '.__init__' - else: - module_name = name - so_path = build_module(module_name, pyxfilename, pyxbuild_dir, - inplace=build_inplace, language_level=language_level) - mod = imp.load_dynamic(name, so_path) - if is_package and not hasattr(mod, '__path__'): - mod.__path__ = [os.path.dirname(so_path)] - assert mod.__file__ == so_path, (mod.__file__, so_path) - except Exception: - if pyxargs.load_py_module_on_import_failure and pyxfilename.endswith('.py'): - # try to fall back to normal import - mod = imp.load_source(name, pyxfilename) - assert mod.__file__ in (pyxfilename, pyxfilename+'c', pyxfilename+'o'), (mod.__file__, pyxfilename) - else: - tb = sys.exc_info()[2] - import traceback - exc = ImportError("Building module %s failed: %s" % ( - name, traceback.format_exception_only(*sys.exc_info()[:2]))) - if sys.version_info[0] >= 3: - raise exc.with_traceback(tb) - else: - exec("raise exc, None, tb", {'exc': exc, 'tb': tb}) - return mod - - -# import hooks - -class PyxImporter(object): - """A meta-path importer for .pyx files. - """ - def __init__(self, extension=PYX_EXT, pyxbuild_dir=None, inplace=False, - language_level=None): - self.extension = extension - self.pyxbuild_dir = pyxbuild_dir - self.inplace = inplace - self.language_level = language_level - - def find_module(self, fullname, package_path=None): - if fullname in sys.modules and not pyxargs.reload_support: - return None # only here when reload() - - # package_path might be a _NamespacePath. Convert that into a list... - if package_path is not None and not isinstance(package_path, list): - package_path = list(package_path) - try: - fp, pathname, (ext,mode,ty) = imp.find_module(fullname,package_path) - if fp: fp.close() # Python should offer a Default-Loader to avoid this double find/open! - if pathname and ty == imp.PKG_DIRECTORY: - pkg_file = os.path.join(pathname, '__init__'+self.extension) - if os.path.isfile(pkg_file): - return PyxLoader(fullname, pathname, - init_path=pkg_file, - pyxbuild_dir=self.pyxbuild_dir, - inplace=self.inplace, - language_level=self.language_level) - if pathname and pathname.endswith(self.extension): - return PyxLoader(fullname, pathname, - pyxbuild_dir=self.pyxbuild_dir, - inplace=self.inplace, - language_level=self.language_level) - if ty != imp.C_EXTENSION: # only when an extension, check if we have a .pyx next! - return None - - # find .pyx fast, when .so/.pyd exist --inplace - pyxpath = os.path.splitext(pathname)[0]+self.extension - if os.path.isfile(pyxpath): - return PyxLoader(fullname, pyxpath, - pyxbuild_dir=self.pyxbuild_dir, - inplace=self.inplace, - language_level=self.language_level) - - # .so/.pyd's on PATH should not be remote from .pyx's - # think no need to implement PyxArgs.importer_search_remote here? - - except ImportError: - pass - - # searching sys.path ... - - #if DEBUG_IMPORT: print "SEARCHING", fullname, package_path - - mod_parts = fullname.split('.') - module_name = mod_parts[-1] - pyx_module_name = module_name + self.extension - - # this may work, but it returns the file content, not its path - #import pkgutil - #pyx_source = pkgutil.get_data(package, pyx_module_name) - - paths = package_path or sys.path - for path in paths: - pyx_data = None - if not path: - path = os.getcwd() - elif os.path.isfile(path): - try: - zi = zipimporter(path) - pyx_data = zi.get_data(pyx_module_name) - except (ZipImportError, IOError, OSError): - continue # Module not found. - # unzip the imported file into the build dir - # FIXME: can interfere with later imports if build dir is in sys.path and comes before zip file - path = self.pyxbuild_dir - elif not os.path.isabs(path): - path = os.path.abspath(path) - - pyx_module_path = os.path.join(path, pyx_module_name) - if pyx_data is not None: - if not os.path.exists(path): - try: - os.makedirs(path) - except OSError: - # concurrency issue? - if not os.path.exists(path): - raise - with open(pyx_module_path, "wb") as f: - f.write(pyx_data) - elif not os.path.isfile(pyx_module_path): - continue # Module not found. - - return PyxLoader(fullname, pyx_module_path, - pyxbuild_dir=self.pyxbuild_dir, - inplace=self.inplace, - language_level=self.language_level) - - # not found, normal package, not a .pyx file, none of our business - _debug("%s not found" % fullname) - return None - - -class PyImporter(PyxImporter): - """A meta-path importer for normal .py files. - """ - def __init__(self, pyxbuild_dir=None, inplace=False, language_level=None): - if language_level is None: - language_level = sys.version_info[0] - self.super = super(PyImporter, self) - self.super.__init__(extension='.py', pyxbuild_dir=pyxbuild_dir, inplace=inplace, - language_level=language_level) - self.uncompilable_modules = {} - self.blocked_modules = ['Cython', 'pyxbuild', 'pyximport.pyxbuild', - 'distutils.extension', 'distutils.sysconfig'] - - def find_module(self, fullname, package_path=None): - if fullname in sys.modules: - return None - if fullname.startswith('Cython.'): - return None - if fullname in self.blocked_modules: - # prevent infinite recursion - return None - if _lib_loader.knows(fullname): - return _lib_loader - _debug("trying import of module '%s'", fullname) - if fullname in self.uncompilable_modules: - path, last_modified = self.uncompilable_modules[fullname] - try: - new_last_modified = os.stat(path).st_mtime - if new_last_modified > last_modified: - # import would fail again - return None - except OSError: - # module is no longer where we found it, retry the import - pass - - self.blocked_modules.append(fullname) - try: - importer = self.super.find_module(fullname, package_path) - if importer is not None: - if importer.init_path: - path = importer.init_path - real_name = fullname + '.__init__' - else: - path = importer.path - real_name = fullname - _debug("importer found path %s for module %s", path, real_name) - try: - so_path = build_module( - real_name, path, - pyxbuild_dir=self.pyxbuild_dir, - language_level=self.language_level, - inplace=self.inplace) - _lib_loader.add_lib(fullname, path, so_path, - is_package=bool(importer.init_path)) - return _lib_loader - except Exception: - if DEBUG_IMPORT: - import traceback - traceback.print_exc() - # build failed, not a compilable Python module - try: - last_modified = os.stat(path).st_mtime - except OSError: - last_modified = 0 - self.uncompilable_modules[fullname] = (path, last_modified) - importer = None - finally: - self.blocked_modules.pop() - return importer - - -class LibLoader(object): - def __init__(self): - self._libs = {} - - def load_module(self, fullname): - try: - source_path, so_path, is_package = self._libs[fullname] - except KeyError: - raise ValueError("invalid module %s" % fullname) - _debug("Loading shared library module '%s' from %s", fullname, so_path) - return load_module(fullname, source_path, so_path=so_path, is_package=is_package) - - def add_lib(self, fullname, path, so_path, is_package): - self._libs[fullname] = (path, so_path, is_package) - - def knows(self, fullname): - return fullname in self._libs - -_lib_loader = LibLoader() - - -class PyxLoader(object): - def __init__(self, fullname, path, init_path=None, pyxbuild_dir=None, - inplace=False, language_level=None): - _debug("PyxLoader created for loading %s from %s (init path: %s)", - fullname, path, init_path) - self.fullname = fullname - self.path, self.init_path = path, init_path - self.pyxbuild_dir = pyxbuild_dir - self.inplace = inplace - self.language_level = language_level - - def load_module(self, fullname): - assert self.fullname == fullname, ( - "invalid module, expected %s, got %s" % ( - self.fullname, fullname)) - if self.init_path: - # package - #print "PACKAGE", fullname - module = load_module(fullname, self.init_path, - self.pyxbuild_dir, is_package=True, - build_inplace=self.inplace, - language_level=self.language_level) - module.__path__ = [self.path] - else: - #print "MODULE", fullname - module = load_module(fullname, self.path, - self.pyxbuild_dir, - build_inplace=self.inplace, - language_level=self.language_level) - return module - - -#install args -class PyxArgs(object): - build_dir=True - build_in_temp=True - setup_args={} #None - -##pyxargs=None - - -def _have_importers(): - has_py_importer = False - has_pyx_importer = False - for importer in sys.meta_path: - if isinstance(importer, PyxImporter): - if isinstance(importer, PyImporter): - has_py_importer = True - else: - has_pyx_importer = True - - return has_py_importer, has_pyx_importer - - -def install(pyximport=True, pyimport=False, build_dir=None, build_in_temp=True, - setup_args=None, reload_support=False, - load_py_module_on_import_failure=False, inplace=False, - language_level=None): - """ Main entry point for pyxinstall. - - Call this to install the ``.pyx`` import hook in - your meta-path for a single Python process. If you want it to be - installed whenever you use Python, add it to your ``sitecustomize`` - (as described above). - - :param pyximport: If set to False, does not try to import ``.pyx`` files. - - :param pyimport: You can pass ``pyimport=True`` to also - install the ``.py`` import hook - in your meta-path. Note, however, that it is rather experimental, - will not work at all for some ``.py`` files and packages, and will - heavily slow down your imports due to search and compilation. - Use at your own risk. - - :param build_dir: By default, compiled modules will end up in a ``.pyxbld`` - directory in the user's home directory. Passing a different path - as ``build_dir`` will override this. - - :param build_in_temp: If ``False``, will produce the C files locally. Working - with complex dependencies and debugging becomes more easy. This - can principally interfere with existing files of the same name. - - :param setup_args: Dict of arguments for Distribution. - See ``distutils.core.setup()``. - - :param reload_support: Enables support for dynamic - ``reload(my_module)``, e.g. after a change in the Cython code. - Additional files ``.reloadNN`` may arise on that account, when - the previously loaded module file cannot be overwritten. - - :param load_py_module_on_import_failure: If the compilation of a ``.py`` - file succeeds, but the subsequent import fails for some reason, - retry the import with the normal ``.py`` module instead of the - compiled module. Note that this may lead to unpredictable results - for modules that change the system state during their import, as - the second import will rerun these modifications in whatever state - the system was left after the import of the compiled module - failed. - - :param inplace: Install the compiled module - (``.so`` for Linux and Mac / ``.pyd`` for Windows) - next to the source file. - - :param language_level: The source language level to use: 2 or 3. - The default is to use the language level of the current Python - runtime for .py files and Py2 for ``.pyx`` files. - """ - if setup_args is None: - setup_args = {} - if not build_dir: - build_dir = os.path.join(os.path.expanduser('~'), '.pyxbld') - - global pyxargs - pyxargs = PyxArgs() #$pycheck_no - pyxargs.build_dir = build_dir - pyxargs.build_in_temp = build_in_temp - pyxargs.setup_args = (setup_args or {}).copy() - pyxargs.reload_support = reload_support - pyxargs.load_py_module_on_import_failure = load_py_module_on_import_failure - - has_py_importer, has_pyx_importer = _have_importers() - py_importer, pyx_importer = None, None - - if pyimport and not has_py_importer: - py_importer = PyImporter(pyxbuild_dir=build_dir, inplace=inplace, - language_level=language_level) - # make sure we import Cython before we install the import hook - import Cython.Compiler.Main, Cython.Compiler.Pipeline, Cython.Compiler.Optimize - sys.meta_path.insert(0, py_importer) - - if pyximport and not has_pyx_importer: - pyx_importer = PyxImporter(pyxbuild_dir=build_dir, inplace=inplace, - language_level=language_level) - sys.meta_path.append(pyx_importer) - - return py_importer, pyx_importer - - -def uninstall(py_importer, pyx_importer): - """ - Uninstall an import hook. - """ - try: - sys.meta_path.remove(py_importer) - except ValueError: - pass - - try: - sys.meta_path.remove(pyx_importer) - except ValueError: - pass - - -# MAIN - -def show_docs(): - import __main__ - __main__.__name__ = mod_name - for name in dir(__main__): - item = getattr(__main__, name) - try: - setattr(item, "__module__", mod_name) - except (AttributeError, TypeError): - pass - help(__main__) - - -if __name__ == '__main__': - show_docs() diff --git a/python/cugraph/.eggs/README.txt b/python/cugraph/.eggs/README.txt deleted file mode 100644 index 5d01668824f..00000000000 --- a/python/cugraph/.eggs/README.txt +++ /dev/null @@ -1,6 +0,0 @@ -This directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins. - -This directory caches those eggs to prevent repeated downloads. - -However, it is safe to delete this directory. - From 7d7fad44d2a8b42a4706e36f95b0f181a4bd7d31 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Mon, 11 Jul 2022 17:21:22 +0000 Subject: [PATCH 19/71] neighbor sampling using stored plc graph --- .../dask/sampling/uniform_neighbor_sample.py | 103 ++++++------------ .../sampling/uniform_neighbor_sample.py | 36 ++---- .../simpleDistributedGraph.py | 4 + 3 files changed, 46 insertions(+), 97 deletions(-) diff --git a/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py b/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py index 8a745b15262..7636e966e1b 100644 --- a/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py +++ b/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py @@ -30,46 +30,6 @@ from cugraph.dask.comms import comms as Comms -def call_nbr_sampling(sID, - data, - src_col_name, - dst_col_name, - num_edges, - do_expensive_check, - start_list, - h_fan_out, - with_replacement): - - # Preparation for graph creation - handle = Comms.get_handle(sID) - handle = ResourceHandle(handle.getHandle()) - graph_properties = GraphProperties(is_symmetric=False, is_multigraph=False) - srcs = data[0][src_col_name] - dsts = data[0][dst_col_name] - weights = None - if "value" in data[0].columns: - weights = data[0]['value'] - - store_transposed = False - - mg = MGGraph(handle, - graph_properties, - srcs, - dsts, - weights, - store_transposed, - num_edges, - do_expensive_check) - - ret_val = pylibcugraph_uniform_neighbor_sample(handle, - mg, - start_list, - h_fan_out, - with_replacement, - do_expensive_check) - return ret_val - - def convert_to_cudf(cp_arrays, weight_t): """ Creates a cudf DataFrame from cupy arrays from pylibcugraph wrapper @@ -140,10 +100,11 @@ def uniform_neighbor_sample(input_graph, start_list = [start_list] if isinstance(start_list, list): - start_list = cudf.Series(start_list) - if start_list.dtype != "int32": - raise ValueError(f"'start_list' must have int32 values, " - f"got: {start_list.dtype}") + start_list = cudf.Series(start_list, dtype='int32') + + if start_list.dtype != "int32": + raise ValueError(f"'start_list' must have int32 values, " + f"got: {start_list.dtype}") # fanout_vals must be a host array! # FIXME: ensure other sequence types (eg. cudf Series) can be handled. @@ -153,39 +114,39 @@ def uniform_neighbor_sample(input_graph, raise TypeError("fanout_vals must be a list, " f"got: {type(fanout_vals)}") - ddf = input_graph.edgelist.edgelist_df - src_col_name = input_graph.renumber_map.renumbered_src_col_name - dst_col_name = input_graph.renumber_map.renumbered_dst_col_name - - weight_t = ddf["value"].dtype - if weight_t == "int32": - ddf = ddf.astype({"value": "float32"}) - elif weight_t == "int64": - ddf = ddf.astype({"value": "float64"}) - - num_edges = len(ddf) - data = get_distributed_data(ddf) + weight_t = input_graph.edgelist.edgelist_df["value"].dtype # start_list uses "external" vertex IDs, but if the graph has been # renumbered, the start vertex IDs must also be renumbered. if input_graph.renumbered: start_list = input_graph.lookup_internal_vertex_id( start_list).compute() - # FIXME: should we add this parameter as an option? - do_expensive_check = False - - result = [client.submit(call_nbr_sampling, - Comms.get_session_id(), - wf[1], - src_col_name, - dst_col_name, - num_edges, - do_expensive_check, - start_list, - fanout_vals, - with_replacement, - workers=[wf[0]]) - for idx, wf in enumerate(data.worker_to_parts.items())] + + start_list = dask_cudf.from_cudf(start_list, npartitions=input_graph.npartitions) + start_list = get_distributed_data(start_list) + + result = [ + client.submit( + lambda sID, mg_graph_x, st_x: \ + pylibcugraph_uniform_neighbor_sample( + resource_handle=ResourceHandle( + Comms.get_handle(sID).getHandle() + ), + input_graph=mg_graph_x, + start_list=st_x[0].to_cupy(), + h_fan_out=fanout_vals, + with_replacement=with_replacement, + # FIXME: should we add this parameter as an option? + do_expensive_check=False + ), + Comms.get_session_id(), + mg_graph, + st, + workers=[w], + key='cugraph.dask.sampling.uniform_neighbor_sample.call_plc_uni_nbr_smpl' + ) + for mg_graph, (w, st) in zip(input_graph._plc_graph, start_list.worker_to_parts.items()) + ] wait(result) diff --git a/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py b/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py index 21125601dcb..ab1d1d3043b 100644 --- a/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py +++ b/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py @@ -79,6 +79,8 @@ def uniform_neighbor_sample(G, raise TypeError("fanout_vals must be a list, " f"got: {type(fanout_vals)}") + weight_t = G.edgelist.edgelist_df['weights'].dtype + if G.renumbered is True: if isinstance(start_list, cudf.DataFrame): start_list = G.lookup_internal_vertex_id( @@ -86,33 +88,15 @@ def uniform_neighbor_sample(G, else: start_list = G.lookup_internal_vertex_id(start_list) - srcs = G.edgelist.edgelist_df['src'] - dsts = G.edgelist.edgelist_df['dst'] - weights = G.edgelist.edgelist_df['weights'] - weight_t = weights.dtype - - if weight_t == "int32": - weights = weights.astype("float32") - if weight_t == "int64": - weights = weights.astype("float64") - - if srcs.dtype != 'int32': - raise ValueError(f"Graph vertices must have int32 values, " - f"got: {srcs.dtype}") - - resource_handle = ResourceHandle() - graph_props = GraphProperties(is_multigraph=G.is_multigraph()) - store_transposed = False - renumber = False - do_expensive_check = False - - sg = SGGraph(resource_handle, graph_props, srcs, dsts, weights, - store_transposed, renumber, do_expensive_check) - sources, destinations, indices = \ - pylibcugraph_uniform_neighbor_sample(resource_handle, sg, start_list, - fanout_vals, with_replacement, - do_expensive_check) + pylibcugraph_uniform_neighbor_sample( + resource_handle=ResourceHandle(), + input_graph=G._plc_graph, + start_list=start_list, + h_fan_out=fanout_vals, + with_replacement=with_replacement, + do_expensive_check=False + ) df = cudf.DataFrame() df["sources"] = sources diff --git a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py index 0824de65fa4..60f3554d5e3 100644 --- a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py +++ b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py @@ -74,6 +74,10 @@ def __make_mg_graph( if 'value' in edata_x[0]: values = edata_x[0]['value'] + if values.dtype == 'int32': + values = values.astype('float32') + elif values.dtype == 'int64': + values = values.astype('float64') else: values = cudf.Series(cupy.ones(len(edata_x[0]))) From d95fac7f19957912455a660f297438c26a490ced Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Mon, 11 Jul 2022 17:28:51 +0000 Subject: [PATCH 20/71] style --- .../dask/sampling/uniform_neighbor_sample.py | 45 ++++++++++--------- .../sampling/uniform_neighbor_sample.py | 5 +-- .../simpleDistributedGraph.py | 2 +- python/cugraph/cugraph/traversal/bfs.py | 7 +-- 4 files changed, 28 insertions(+), 31 deletions(-) diff --git a/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py b/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py index 7636e966e1b..52adcf51a9d 100644 --- a/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py +++ b/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py @@ -18,10 +18,7 @@ import dask_cudf import cudf -from pylibcugraph import (ResourceHandle, - GraphProperties, - MGGraph - ) +from pylibcugraph import ResourceHandle from pylibcugraph import \ uniform_neighbor_sample as pylibcugraph_uniform_neighbor_sample @@ -101,10 +98,10 @@ def uniform_neighbor_sample(input_graph, if isinstance(start_list, list): start_list = cudf.Series(start_list, dtype='int32') - + if start_list.dtype != "int32": raise ValueError(f"'start_list' must have int32 values, " - f"got: {start_list.dtype}") + f"got: {start_list.dtype}") # fanout_vals must be a host array! # FIXME: ensure other sequence types (eg. cudf Series) can be handled. @@ -121,31 +118,37 @@ def uniform_neighbor_sample(input_graph, if input_graph.renumbered: start_list = input_graph.lookup_internal_vertex_id( start_list).compute() - - start_list = dask_cudf.from_cudf(start_list, npartitions=input_graph.npartitions) + + start_list = dask_cudf.from_cudf( + start_list, + npartitions=input_graph.npartitions + ) start_list = get_distributed_data(start_list) result = [ client.submit( - lambda sID, mg_graph_x, st_x: \ - pylibcugraph_uniform_neighbor_sample( - resource_handle=ResourceHandle( - Comms.get_handle(sID).getHandle() - ), - input_graph=mg_graph_x, - start_list=st_x[0].to_cupy(), - h_fan_out=fanout_vals, - with_replacement=with_replacement, - # FIXME: should we add this parameter as an option? - do_expensive_check=False + lambda sID, mg_graph_x, st_x: + pylibcugraph_uniform_neighbor_sample( + resource_handle=ResourceHandle( + Comms.get_handle(sID).getHandle() ), + input_graph=mg_graph_x, + start_list=st_x[0].to_cupy(), + h_fan_out=fanout_vals, + with_replacement=with_replacement, + # FIXME: should we add this parameter as an option? + do_expensive_check=False + ), Comms.get_session_id(), mg_graph, st, workers=[w], - key='cugraph.dask.sampling.uniform_neighbor_sample.call_plc_uni_nbr_smpl' + key='cugraph.dask.sampling.' + 'uniform_neighbor_sample.call_plc_uni_nbr_smpl' + ) + for mg_graph, (w, st) in zip( + input_graph._plc_graph, start_list.worker_to_parts.items() ) - for mg_graph, (w, st) in zip(input_graph._plc_graph, start_list.worker_to_parts.items()) ] wait(result) diff --git a/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py b/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py index ab1d1d3043b..1dc02af24a4 100644 --- a/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py +++ b/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py @@ -11,10 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from pylibcugraph import (ResourceHandle, - GraphProperties, - SGGraph, - ) +from pylibcugraph import ResourceHandle from pylibcugraph import uniform_neighbor_sample as \ pylibcugraph_uniform_neighbor_sample diff --git a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py index 60f3554d5e3..775219e0d0b 100644 --- a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py +++ b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py @@ -772,4 +772,4 @@ def vertex_column_size(self): @property def npartitions(self) -> int: - return len(self._plc_graph) \ No newline at end of file + return len(self._plc_graph) diff --git a/python/cugraph/cugraph/traversal/bfs.py b/python/cugraph/cugraph/traversal/bfs.py index 415776280d5..6141ea8ebfc 100644 --- a/python/cugraph/cugraph/traversal/bfs.py +++ b/python/cugraph/cugraph/traversal/bfs.py @@ -14,11 +14,8 @@ import cudf import dask_cudf -from pylibcugraph import (ResourceHandle, - GraphProperties, - SGGraph, - bfs as pylibcugraph_bfs - ) +from pylibcugraph import ResourceHandle +from pylibcugraph import bfs as pylibcugraph_bfs from cugraph.structure.graph_classes import Graph, DiGraph from cugraph.utilities import (ensure_cugraph_obj, From 81dcb0755a3e48b4c70c5cc35a85508791512aab Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Mon, 11 Jul 2022 17:38:28 +0000 Subject: [PATCH 21/71] style --- .../dask/sampling/uniform_neighbor_sample.py | 2 +- python/cugraph/cugraph/dask/traversal/bfs.py | 30 ++----------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py b/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py index 52adcf51a9d..1642008739d 100644 --- a/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py +++ b/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py @@ -120,7 +120,7 @@ def uniform_neighbor_sample(input_graph, start_list).compute() start_list = dask_cudf.from_cudf( - start_list, + start_list, npartitions=input_graph.npartitions ) start_list = get_distributed_data(start_list) diff --git a/python/cugraph/cugraph/dask/traversal/bfs.py b/python/cugraph/cugraph/dask/traversal/bfs.py index e8b977f5909..0e264a99438 100644 --- a/python/cugraph/cugraph/dask/traversal/bfs.py +++ b/python/cugraph/cugraph/dask/traversal/bfs.py @@ -24,32 +24,6 @@ import dask_cudf -def _call_plc_mg_bfs( - sID, - mg_x, - sources, - depth_limit, - direction_optimizing=False, - do_expensive_check=False, - return_predecessors=True): - comms_handle = Comms.get_handle(sID) - resource_handle = ResourceHandle(comms_handle.getHandle()) - sources = sources[0] - - res = \ - pylibcugraph_bfs( - resource_handle, - mg_x, - cudf.Series(sources, dtype='int32'), - direction_optimizing, - depth_limit if depth_limit is not None else 0, - return_predecessors, - True - ) - - return res - - def convert_to_cudf(cp_arrays): """ create a cudf DataFrame from cupy arrays @@ -172,7 +146,9 @@ def check_valid_vertex(G, start): workers=[w], key='cugraph.dask.traversal.bfs.call_pylibcugraph_bfs' ) - for mg_graph, (w, st) in zip(input_graph._plc_graph, data_start.worker_to_parts.items()) + for mg_graph, (w, st) in zip( + input_graph._plc_graph, data_start.worker_to_parts.items() + ) ] wait(cupy_result) From 80b90415da9f42cd6b7d82a62c774802190274d1 Mon Sep 17 00:00:00 2001 From: Vibhu Jawa Date: Mon, 11 Jul 2022 11:47:45 -0700 Subject: [PATCH 22/71] Added graph_store.py and test_graph_store.py --- python/cugraph/cugraph/gnn/graph_store.py | 2 +- python/cugraph/cugraph/tests/test_graph_store.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/cugraph/cugraph/gnn/graph_store.py b/python/cugraph/cugraph/gnn/graph_store.py index c1393853df1..33d0ced6f73 100644 --- a/python/cugraph/cugraph/gnn/graph_store.py +++ b/python/cugraph/cugraph/gnn/graph_store.py @@ -403,7 +403,7 @@ def __init__(self, df, id_col, _type_, col_names, backend_lib="torch"): from torch.utils.dlpack import from_dlpack elif backend_lib == "tf": from tensorflow.experimental.dlpack import from_dlpack - elif backend_lib == "cp": + elif backend_lib == "cupy": from cupy import from_dlpack else: raise NotImplementedError( diff --git a/python/cugraph/cugraph/tests/test_graph_store.py b/python/cugraph/cugraph/tests/test_graph_store.py index 0161d08c9a4..3da3248be61 100644 --- a/python/cugraph/cugraph/tests/test_graph_store.py +++ b/python/cugraph/cugraph/tests/test_graph_store.py @@ -92,7 +92,7 @@ def test_egonet(graph_file): g.from_cudf_edgelist(cu_M, source="0", destination="1", renumber=True) pG = PropertyGraph() - gstore = cugraph.gnn.CuGraphStore(graph=pG) + gstore = cugraph.gnn.CuGraphStore(graph=pG, backend_lib='cupy') gstore.add_edge_data( cu_M, vertex_col_names=("0", "1"), edge_key="edge_feat" ) From 834f8a86d9883efdea30a8fb101c1f5521b2c3dc Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Mon, 11 Jul 2022 19:05:06 +0000 Subject: [PATCH 23/71] stop hanging for mg bfs, sampling --- .../dask/sampling/uniform_neighbor_sample.py | 55 ++++++++++--------- python/cugraph/cugraph/dask/traversal/bfs.py | 29 ++++++---- .../simpleDistributedGraph.py | 4 +- 3 files changed, 49 insertions(+), 39 deletions(-) diff --git a/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py b/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py index 1642008739d..864abd39ea8 100644 --- a/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py +++ b/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py @@ -45,6 +45,18 @@ def convert_to_cudf(cp_arrays, weight_t): return df +def _call_plc_uniform_neighbor_sample(sID, mg_graph_x, st_x, fanout_vals, with_replacement): + return pylibcugraph_uniform_neighbor_sample( + resource_handle=ResourceHandle( + Comms.get_handle(sID).getHandle() + ), + input_graph=mg_graph_x, + start_list=st_x.to_cupy(), + h_fan_out=fanout_vals, + with_replacement=with_replacement, + # FIXME: should we add this parameter as an option? + do_expensive_check=True + ) def uniform_neighbor_sample(input_graph, start_list, @@ -84,14 +96,6 @@ def uniform_neighbor_sample(input_graph, Contains the indices from the sampling result for path reconstruction """ - # Initialize dask client - client = default_client() - # FIXME: 'legacy_renum_only' will not trigger the C++ renumbering - # In the future, once all the algos follow the C/Pylibcugraph path, - # compute_renumber_edge_list will only be used for multicolumn and - # string vertices since the renumbering will be done in pylibcugraph - input_graph.compute_renumber_edge_list( - transposed=False, legacy_renum_only=True) if isinstance(start_list, int): start_list = [start_list] @@ -119,35 +123,35 @@ def uniform_neighbor_sample(input_graph, start_list = input_graph.lookup_internal_vertex_id( start_list).compute() + ''' start_list = dask_cudf.from_cudf( start_list, npartitions=input_graph.npartitions ) start_list = get_distributed_data(start_list) + wait(start_list) + ''' + import cupy + dummy = dask_cudf.from_cudf( + cudf.Series(cupy.ones(input_graph.npartitions)), + npartitions=input_graph.npartitions + ) + dummy = get_distributed_data(dummy) + + client = input_graph._client result = [ client.submit( - lambda sID, mg_graph_x, st_x: - pylibcugraph_uniform_neighbor_sample( - resource_handle=ResourceHandle( - Comms.get_handle(sID).getHandle() - ), - input_graph=mg_graph_x, - start_list=st_x[0].to_cupy(), - h_fan_out=fanout_vals, - with_replacement=with_replacement, - # FIXME: should we add this parameter as an option? - do_expensive_check=False - ), + _call_plc_uniform_neighbor_sample, Comms.get_session_id(), mg_graph, - st, + start_list, + fanout_vals, + with_replacement, workers=[w], - key='cugraph.dask.sampling.' - 'uniform_neighbor_sample.call_plc_uni_nbr_smpl' ) - for mg_graph, (w, st) in zip( - input_graph._plc_graph, start_list.worker_to_parts.items() + for mg_graph, (w, _) in zip( + input_graph._plc_graph, dummy.worker_to_parts.items() ) ] @@ -160,6 +164,7 @@ def uniform_neighbor_sample(input_graph, wait(cudf_result) ddf = dask_cudf.from_delayed(cudf_result) + if input_graph.renumbered: ddf = input_graph.unrenumber(ddf, "sources", preserve_order=True) ddf = input_graph.unrenumber(ddf, "destinations", preserve_order=True) diff --git a/python/cugraph/cugraph/dask/traversal/bfs.py b/python/cugraph/cugraph/dask/traversal/bfs.py index 0e264a99438..22243ff02f2 100644 --- a/python/cugraph/cugraph/dask/traversal/bfs.py +++ b/python/cugraph/cugraph/dask/traversal/bfs.py @@ -36,6 +36,18 @@ def convert_to_cudf(cp_arrays): return df +def _call_plc_bfs(sID, mg_graph_x, st_x, depth_limit=None, return_distances=True): + return pylibcugraph_bfs( + ResourceHandle(Comms.get_handle(sID).getHandle()), + mg_graph_x, + cudf.Series(st_x, dtype='int32'), + False, + depth_limit if depth_limit is not None else 0, + return_distances, + True + ) + + def bfs(input_graph, start, depth_limit=None, @@ -99,7 +111,7 @@ def bfs(input_graph, """ - client = default_client() + client = input_graph._client if not isinstance(start, (dask_cudf.DataFrame, dask_cudf.Series)): if not isinstance(start, (cudf.DataFrame, cudf.Series)): @@ -131,20 +143,13 @@ def check_valid_vertex(G, start): cupy_result = [ client.submit( - lambda sID, mg_graph_x, st_x: pylibcugraph_bfs( - ResourceHandle(Comms.get_handle(sID).getHandle()), - mg_graph_x, - st_x, - False, - depth_limit if depth_limit is not None else 0, - return_distances, - True - ), + _call_plc_bfs, Comms.get_session_id(), mg_graph, st[0], - workers=[w], - key='cugraph.dask.traversal.bfs.call_pylibcugraph_bfs' + depth_limit, + return_distances, + workers=[w] ) for mg_graph, (w, st) in zip( input_graph._plc_graph, data_start.worker_to_parts.items() diff --git a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py index 775219e0d0b..e66eab8fc2e 100644 --- a/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py +++ b/python/cugraph/cugraph/structure/graph_implementation/simpleDistributedGraph.py @@ -183,9 +183,9 @@ def __from_edgelist( dst_col_name = self.renumber_map.renumbered_dst_col_name graph_props = GraphProperties(is_multigraph=self.properties.multi_edge) - client = default_client() + self._client = default_client() self._plc_graph = [ - client.submit( + self._client.submit( simpleDistributedGraphImpl.__make_mg_graph, Comms.get_session_id(), edata, From 568cc8681af668e7d54edf832837da696071fc2e Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Mon, 11 Jul 2022 19:19:06 +0000 Subject: [PATCH 24/71] style --- .../dask/sampling/uniform_neighbor_sample.py | 14 ++++++++++---- python/cugraph/cugraph/dask/traversal/bfs.py | 8 ++++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py b/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py index 864abd39ea8..1a871005f08 100644 --- a/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py +++ b/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py @@ -13,7 +13,7 @@ # limitations under the License. import numpy -from dask.distributed import wait, default_client +from dask.distributed import wait import dask_cudf import cudf @@ -45,7 +45,12 @@ def convert_to_cudf(cp_arrays, weight_t): return df -def _call_plc_uniform_neighbor_sample(sID, mg_graph_x, st_x, fanout_vals, with_replacement): + +def _call_plc_uniform_neighbor_sample(sID, + mg_graph_x, + st_x, + fanout_vals, + with_replacement): return pylibcugraph_uniform_neighbor_sample( resource_handle=ResourceHandle( Comms.get_handle(sID).getHandle() @@ -58,6 +63,7 @@ def _call_plc_uniform_neighbor_sample(sID, mg_graph_x, st_x, fanout_vals, with_r do_expensive_check=True ) + def uniform_neighbor_sample(input_graph, start_list, fanout_vals, @@ -137,7 +143,7 @@ def uniform_neighbor_sample(input_graph, npartitions=input_graph.npartitions ) dummy = get_distributed_data(dummy) - + client = input_graph._client result = [ @@ -164,7 +170,7 @@ def uniform_neighbor_sample(input_graph, wait(cudf_result) ddf = dask_cudf.from_delayed(cudf_result) - + if input_graph.renumbered: ddf = input_graph.unrenumber(ddf, "sources", preserve_order=True) ddf = input_graph.unrenumber(ddf, "destinations", preserve_order=True) diff --git a/python/cugraph/cugraph/dask/traversal/bfs.py b/python/cugraph/cugraph/dask/traversal/bfs.py index 22243ff02f2..bca52e554ca 100644 --- a/python/cugraph/cugraph/dask/traversal/bfs.py +++ b/python/cugraph/cugraph/dask/traversal/bfs.py @@ -17,7 +17,7 @@ bfs as pylibcugraph_bfs ) -from dask.distributed import wait, default_client +from dask.distributed import wait from cugraph.dask.common.input_utils import get_distributed_data import cugraph.dask.comms.comms as Comms import cudf @@ -36,7 +36,11 @@ def convert_to_cudf(cp_arrays): return df -def _call_plc_bfs(sID, mg_graph_x, st_x, depth_limit=None, return_distances=True): +def _call_plc_bfs(sID, + mg_graph_x, + st_x, + depth_limit=None, + return_distances=True): return pylibcugraph_bfs( ResourceHandle(Comms.get_handle(sID).getHandle()), mg_graph_x, From 18b3515f191097e257961e94c41855c93a40d430 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Mon, 11 Jul 2022 21:52:43 +0000 Subject: [PATCH 25/71] cugraph --- python/cugraph/cugraph/dask/traversal/bfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cugraph/cugraph/dask/traversal/bfs.py b/python/cugraph/cugraph/dask/traversal/bfs.py index bca52e554ca..08aecabf8ed 100644 --- a/python/cugraph/cugraph/dask/traversal/bfs.py +++ b/python/cugraph/cugraph/dask/traversal/bfs.py @@ -60,7 +60,7 @@ def bfs(input_graph, """ Find the distances and predecessors for a breadth first traversal of a graph. - The input graph must contain edge list as dask-cudf dataframe with + The input graph must contain edge list as a dask-cudf dataframe with one partition per GPU. Parameters From 5df2d63983ce2aef94515febfac10ed5f50670bd Mon Sep 17 00:00:00 2001 From: Vibhu Jawa Date: Wed, 13 Jul 2022 10:23:27 -0700 Subject: [PATCH 26/71] fix pytorch import error --- python/cugraph/cugraph/tests/test_graph_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cugraph/cugraph/tests/test_graph_store.py b/python/cugraph/cugraph/tests/test_graph_store.py index 3da3248be61..7cb535da5da 100644 --- a/python/cugraph/cugraph/tests/test_graph_store.py +++ b/python/cugraph/cugraph/tests/test_graph_store.py @@ -337,7 +337,7 @@ def dataset1_CuGraphStore(): ) pG = PropertyGraph() - graph = CuGraphStore(pG) + graph = CuGraphStore(pG, backend_lib='cupy') # Vertex and edge data is added as one or more DataFrames; either a Pandas # DataFrame to keep data on the CPU, a cuDF DataFrame to keep data on GPU, # or a dask_cudf DataFrame to keep data on distributed GPUs. From c6d1fbf34347c2bbd20e89d0219a6e1a767b76bd Mon Sep 17 00:00:00 2001 From: Vibhu Jawa Date: Wed, 13 Jul 2022 13:12:37 -0700 Subject: [PATCH 27/71] Fix to(device) for cupy --- python/cugraph/cugraph/gnn/graph_store.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/cugraph/cugraph/gnn/graph_store.py b/python/cugraph/cugraph/gnn/graph_store.py index 33d0ced6f73..7e77ffcf594 100644 --- a/python/cugraph/cugraph/gnn/graph_store.py +++ b/python/cugraph/cugraph/gnn/graph_store.py @@ -437,7 +437,12 @@ def fetch(self, indices, device, pin_memory=False, **kwargs): )[self.col_names] tensor = self.from_dlpack(subset_df.to_dlpack()) - return tensor.to(device) + if isinstance(tensor, cp.ndarray): + # can not transfer to + # a different device for cupy + return tensor + else: + return tensor.to(device) def get_subset_df(df, id_col, indices, _type_): From 66aa800047dfa63989b030684541dca26d9ada9d Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Fri, 15 Jul 2022 03:56:44 +0000 Subject: [PATCH 28/71] minor --- python/cufile.log | 14 ++++ python/cugraph/cugraph/dask/traversal/bfs.py | 2 +- .../graph_implementation/simpleGraph.py | 72 ++++++++++++------- python/cugraph/cugraph/tests/test_graph.py | 2 + 4 files changed, 62 insertions(+), 28 deletions(-) create mode 100644 python/cufile.log diff --git a/python/cufile.log b/python/cufile.log new file mode 100644 index 00000000000..c0b70c5dc6e --- /dev/null +++ b/python/cufile.log @@ -0,0 +1,14 @@ + 14-07-2022 17:35:56:948 [pid=1105697 tid=1105697] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 14-07-2022 17:36:03:600 [pid=1106030 tid=1106233] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 14-07-2022 17:36:03:612 [pid=1106028 tid=1106234] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 14-07-2022 17:36:07:21 [pid=1106250 tid=1106436] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 14-07-2022 17:36:07:46 [pid=1106252 tid=1106437] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 14-07-2022 17:36:10:451 [pid=1106462 tid=1106645] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 14-07-2022 17:36:10:462 [pid=1106458 tid=1106646] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 14-07-2022 17:43:34:825 [pid=1110885 tid=1110885] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 14-07-2022 17:43:40:679 [pid=1111211 tid=1111394] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 14-07-2022 17:43:40:705 [pid=1111214 tid=1111395] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 14-07-2022 17:43:44:131 [pid=1111416 tid=1111609] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 14-07-2022 17:43:44:155 [pid=1111414 tid=1111614] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 14-07-2022 17:43:47:536 [pid=1111632 tid=1111817] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded + 14-07-2022 17:43:47:551 [pid=1111635 tid=1111819] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded diff --git a/python/cugraph/cugraph/dask/traversal/bfs.py b/python/cugraph/cugraph/dask/traversal/bfs.py index 08aecabf8ed..dd21dcd2857 100644 --- a/python/cugraph/cugraph/dask/traversal/bfs.py +++ b/python/cugraph/cugraph/dask/traversal/bfs.py @@ -58,7 +58,7 @@ def bfs(input_graph, return_distances=True, check_start=True): """ - Find the distances and predecessors for a breadth first traversal of a + Find the distances and predecessors for a breadth-first traversal of a graph. The input graph must contain edge list as a dask-cudf dataframe with one partition per GPU. diff --git a/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py b/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py index d2d87aecebb..68ec7b6aa00 100644 --- a/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py +++ b/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py @@ -199,32 +199,8 @@ def __from_edgelist( if self.batch_enabled: self._replicate_edgelist() - graph_props = GraphProperties( - is_multigraph=self.properties.multi_edge - ) - if value_col is None: - value_col = cudf.Series( - cupy.ones(len(source_col), dtype='float32') - ) - else: - weight_t = value_col.dtype - - if weight_t == "int32": - value_col = value_col.astype("float32") - if weight_t == "int64": - value_col = value_col.astype("float64") - - self._plc_graph = SGGraph( - resource_handle=ResourceHandle(), - graph_properties=graph_props, - src_array=self.edgelist.edgelist_df['src'], - dst_array=self.edgelist.edgelist_df['dst'], - weight_array=value_col, - store_transposed=store_transposed, - renumber=False, - do_expensive_check=False - ) + self.make_plc_graph(value_col=value_col, store_transposed=store_transposed) def to_pandas_edgelist(self, source='src', destination='dst', weight='weights'): @@ -785,7 +761,35 @@ def _degree(self, vertex_subset, direction=Direction.ALL): return df - def to_directed(self, DiG): + def make_plc_graph(self, value_col=None, store_transposed=False): + if value_col is None: + value_col = cudf.Series( + cupy.ones(len(self.edgelist.edgelist_df), dtype='float32') + ) + else: + weight_t = value_col.dtype + + if weight_t == "int32": + value_col = value_col.astype("float32") + if weight_t == "int64": + value_col = value_col.astype("float64") + + graph_props = GraphProperties( + is_multigraph=self.properties.multi_edge + ) + + self._plc_graph = SGGraph( + resource_handle=ResourceHandle(), + graph_properties=graph_props, + src_array=self.edgelist.edgelist_df['src'], + dst_array=self.edgelist.edgelist_df['dst'], + weight_array=value_col, + store_transposed=store_transposed, + renumber=False, + do_expensive_check=False + ) + + def to_directed(self, DiG, store_transposed=False): """ Return a directed representation of the graph Implementation. This function copies the internal structures and returns the @@ -797,7 +801,14 @@ def to_directed(self, DiG): DiG.adjlist = self.adjlist DiG.transposedadjlist = self.transposedadjlist - def to_undirected(self, G): + if 'weights' in self.edgelist.edgelist_df: + value_col = self.edgelist.edgelist_df['weights'] + else: + value_col = None + + DiG.make_plc_graph(value_col, store_transposed) + + def to_undirected(self, G, store_transposed=False): """ Return an undirected copy of the graph. """ @@ -818,6 +829,13 @@ def to_undirected(self, G): value_col = None G.edgelist = simpleGraphImpl.EdgeList(source_col, dest_col, value_col) + + if 'weights' in self.edgelist.edgelist_df: + value_col = self.edgelist.edgelist_df['weights'] + else: + value_col = None + + G.make_plc_graph(value_col, store_transposed) def has_node(self, n): """ diff --git a/python/cugraph/cugraph/tests/test_graph.py b/python/cugraph/cugraph/tests/test_graph.py index 674d3d2969e..19c09e27cc4 100644 --- a/python/cugraph/cugraph/tests/test_graph.py +++ b/python/cugraph/cugraph/tests/test_graph.py @@ -544,6 +544,7 @@ def test_to_directed(graph_file): assert DiG.is_directed() assert DiG.number_of_nodes() == DiGnx.number_of_nodes() assert DiG.number_of_edges() == DiGnx.number_of_edges() + assert DiG._plc_graph is not None for index, row in cu_M.to_pandas().iterrows(): assert G.has_edge(row['0'], row['1']) @@ -579,6 +580,7 @@ def test_to_undirected(graph_file): assert not G.is_directed() assert G.number_of_nodes() == Gnx.number_of_nodes() assert G.number_of_edges() == Gnx.number_of_edges() + assert G._plc_graph is not None for index, row in cu_M.to_pandas().iterrows(): assert G.has_edge(row['0'], row['1']) From 3324b818d8d32fa26a28f7844682db651c53dcc1 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Fri, 15 Jul 2022 03:57:01 +0000 Subject: [PATCH 29/71] remove cufile --- python/cufile.log | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 python/cufile.log diff --git a/python/cufile.log b/python/cufile.log deleted file mode 100644 index c0b70c5dc6e..00000000000 --- a/python/cufile.log +++ /dev/null @@ -1,14 +0,0 @@ - 14-07-2022 17:35:56:948 [pid=1105697 tid=1105697] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 14-07-2022 17:36:03:600 [pid=1106030 tid=1106233] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 14-07-2022 17:36:03:612 [pid=1106028 tid=1106234] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 14-07-2022 17:36:07:21 [pid=1106250 tid=1106436] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 14-07-2022 17:36:07:46 [pid=1106252 tid=1106437] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 14-07-2022 17:36:10:451 [pid=1106462 tid=1106645] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 14-07-2022 17:36:10:462 [pid=1106458 tid=1106646] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 14-07-2022 17:43:34:825 [pid=1110885 tid=1110885] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 14-07-2022 17:43:40:679 [pid=1111211 tid=1111394] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 14-07-2022 17:43:40:705 [pid=1111214 tid=1111395] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 14-07-2022 17:43:44:131 [pid=1111416 tid=1111609] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 14-07-2022 17:43:44:155 [pid=1111414 tid=1111614] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 14-07-2022 17:43:47:536 [pid=1111632 tid=1111817] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded - 14-07-2022 17:43:47:551 [pid=1111635 tid=1111819] ERROR cufio-drv:632 nvidia-fs.ko driver not loaded From 0f4e3a82dd4a5c7b6162848635984d5652a5136e Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Fri, 15 Jul 2022 13:41:47 +0000 Subject: [PATCH 30/71] add cugraph pyg code --- .../cugraph/gnn/gaas_extensions/__init__.py | 1 + .../gaas_extensions/reddit_gaas_extension.py | 37 ++ .../cugraph/gnn/pyg_extensions/__init__.py | 3 + .../gnn/pyg_extensions/data/__init__.py | 6 + .../gnn/pyg_extensions/data/cudf_storage.py | 258 ++++++++++++++ .../gnn/pyg_extensions/data/cugraph_data.py | 334 ++++++++++++++++++ .../pyg_extensions/data/cugraph_storage.py | 0 .../gnn/pyg_extensions/data/gaas_data.py | 83 +++++ .../gnn/pyg_extensions/data/gaas_storage.py | 202 +++++++++++ 9 files changed, 924 insertions(+) create mode 100644 python/cugraph/cugraph/gnn/gaas_extensions/__init__.py create mode 100644 python/cugraph/cugraph/gnn/gaas_extensions/reddit_gaas_extension.py create mode 100644 python/cugraph/cugraph/gnn/pyg_extensions/__init__.py create mode 100644 python/cugraph/cugraph/gnn/pyg_extensions/data/__init__.py create mode 100644 python/cugraph/cugraph/gnn/pyg_extensions/data/cudf_storage.py create mode 100644 python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_data.py create mode 100644 python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_storage.py create mode 100644 python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_data.py create mode 100644 python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_storage.py diff --git a/python/cugraph/cugraph/gnn/gaas_extensions/__init__.py b/python/cugraph/cugraph/gnn/gaas_extensions/__init__.py new file mode 100644 index 00000000000..d736c476b48 --- /dev/null +++ b/python/cugraph/cugraph/gnn/gaas_extensions/__init__.py @@ -0,0 +1 @@ +from .reddit_gaas_extension import load_reddit diff --git a/python/cugraph/cugraph/gnn/gaas_extensions/reddit_gaas_extension.py b/python/cugraph/cugraph/gnn/gaas_extensions/reddit_gaas_extension.py new file mode 100644 index 00000000000..d037300e8f6 --- /dev/null +++ b/python/cugraph/cugraph/gnn/gaas_extensions/reddit_gaas_extension.py @@ -0,0 +1,37 @@ +''' +Naming this with the _extension suffix allows it to be read by GaaS +as a graph creation extension. This extension loads in the reddit +graph. +''' + +import os +import numpy as np +import scipy.sparse as sp +import cudf +import cugraph +import networkx as nx +from cugraph.experimental import PropertyGraph + +def load_reddit(data_dir): + G = PropertyGraph() + + with open(os.path.join(data_dir, 'reddit_data.npz'), 'rb') as f: + reddit_data = np.load(f) + features = cudf.DataFrame(reddit_data["feature"], dtype='float32') + features['id'] = cudf.Series(reddit_data['node_ids'], dtype='int32') + features['y'] = cudf.Series(reddit_data['label'], dtype='int32') + features['type'] = cudf.Series(reddit_data['node_types'], dtype='int32') + features.columns = features.columns.astype('str') + + G.add_vertex_data(features, vertex_col_name='id') + + with open(os.path.join(data_dir, 'reddit_graph.npz'), 'rb') as f: + M = sp.load_npz(f).tocsr() + offsets = cudf.Series(M.indptr) + indices = cudf.Series(M.indices) + + H = cugraph.Graph() + H.from_cudf_adjlist(offsets, indices) + G.add_edge_data(H.view_edge_list(), vertex_col_names=['src','dst']) + + return G \ No newline at end of file diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/__init__.py b/python/cugraph/cugraph/gnn/pyg_extensions/__init__.py new file mode 100644 index 00000000000..32b8ba09db8 --- /dev/null +++ b/python/cugraph/cugraph/gnn/pyg_extensions/__init__.py @@ -0,0 +1,3 @@ +from cugraph.gnn.pyg_extensions.data import CuGraphData +from cugraph.gnn.pyg_extensions.data import GaasData +from cugraph.gnn.pyg_extensions.data import TorchTensorGaasGraphDataProxy diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/__init__.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/__init__.py new file mode 100644 index 00000000000..e9b69ae8273 --- /dev/null +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/__init__.py @@ -0,0 +1,6 @@ +from cugraph.gnn.pyg_extensions.data.cugraph_data import CuGraphData +from cugraph.gnn.pyg_extensions.data.gaas_data import GaasData +from cugraph.gnn.pyg_extensions.data.gaas_storage import TorchTensorGaasGraphDataProxy +from cugraph.gnn.pyg_extensions.data.cudf_storage import CudfNodeStorage +from cugraph.gnn.pyg_extensions.data.cudf_storage import CudfEdgeStorage +from cugraph.gnn.pyg_extensions.data.cudf_storage import CudfStorage diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cudf_storage.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cudf_storage.py new file mode 100644 index 00000000000..21aac69c3ad --- /dev/null +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cudf_storage.py @@ -0,0 +1,258 @@ +from typing import Any, List +from collections.abc import Mapping + +import torch +from torch import Tensor +from torch import device as TorchDevice + +from torch_geometric.data.storage import EdgeStorage, NodeStorage + +import cudf +import cupy + + +class CudfStorage(): + """ + Should be compatible with both cudf and dask_cudf + """ + def __init__( + self, + dataframe: cudf.DataFrame=cudf.DataFrame(), + device: TorchDevice=TorchDevice('cpu'), + parent:Any=None, + reserved_keys:list=[], + cached_keys:list=['x','y'], + **kwargs): + self._data = dataframe + self._parent = parent + self.__device = device + self.__reserved_keys = list(reserved_keys) + self.__cached_keys = list(cached_keys) + self.__x_cupy = None + self.__feature_names=None + + @property + def device(self): + return self.__device + + @property + def _reserved_keys(self): + return self.__reserved_keys + + @property + def _cached_keys(self): + return self.__cached_keys + + @property + def _feature_names(self) -> List[str]: + if self.__feature_names is None: + self.__feature_names = self.__remove_internal_columns(self._data.columns, ['y']) + + return self.__feature_names + + def to(self, to_device: TorchDevice): + return CudfStorage( + self._data, + device=to_device, + parent=self._parent(), + reserved_keys=self.__reserved_keys, + cached_keys=self.__cached_keys + ) + + def __getattr__(self, key:str) -> Any: + if key in self.__dict__: + return self.__dict__[key] + + elif key in self._data: + if ('__' + key) not in self.__dict__: + t = torch.from_dlpack(self._data[key].to_dlpack()) + if self.__device != t.device: + t = t.to(self.__device) + if key in self.__cached_keys: + self.__dict__['__' + key] = t + return t + return self.__dict__['__' + key] + + elif key == 'x': + x = torch.from_dlpack(self._x_cupy.toDlpack()) + if self.__device != x.device: + x = x.to(self.__device) + return x + + raise AttributeError(key) + + def __getitem__(self, key:str) -> Any: + return getattr(self, key) + + @property + def _x_cupy(self) -> cupy.array: + if self.__x_cupy is None: + all_keys = list(self._data.columns) + for k in self.__reserved_keys + ['y']: + if k in list(all_keys): + all_keys.remove(k) + + x_cupy = self._data[all_keys].to_cupy(dtype='float32') + if 'x' in self.__cached_keys: + self.__x_cupy = x_cupy + return x_cupy + else: + return self.__x_cupy + + @property + def shape(self) -> tuple: + return self._data.shape + + @property + def num_features(self) -> int: + feature_count = self.shape[1] + for k in self.__reserved_keys: + if k in list(self._data.columns): + feature_count -= 1 + + return feature_count + + def __remove_internal_columns(self, input_cols, additional_columns_to_remove=[]): + internal_columns = self.__reserved_keys + additional_columns_to_remove + + # Create a list of user-visible columns by removing the internals while + # preserving order + output_cols = list(input_cols) + for col_name in internal_columns: + if col_name in output_cols: + output_cols.remove(col_name) + + return output_cols + + def __repr__(self) -> str: + return f'cudf storage ({self.shape[0]}x{self.shape[1]})' + + +class CudfNodeStorage(CudfStorage, NodeStorage): + def __init__(self, dataframe: cudf.DataFrame, device: TorchDevice=TorchDevice('cpu'), parent:Any=None, vertex_col_name='v', reserved_keys:list=[], key=None, **kwargs): + super().__init__(dataframe=dataframe, device=device, parent=parent, reserved_keys=reserved_keys, **kwargs) + + self.__vertex_col_name = vertex_col_name + self.__key = key + + @property + def _key(self): + return self.__key + + @property + def num_nodes(self): + return self.shape[0] + + @property + def num_node_features(self) -> int: + feature_count = self.num_features + if 'y' in list(self._data.columns): + feature_count -= 1 + return feature_count + + @property + def node_index(self) -> Tensor: + return self[self.__vertex_col_name].to(torch.long) + + def node_feature_names(self) -> List[str]: + return self._feature_names + + def to(self, to_device: TorchDevice): + return CudfNodeStorage( + dataframe=self._data, + device=to_device, + parent=self._parent(), + reserved_keys=self._reserved_keys, + vertex_col_name=self.__vertex_col_name, + key=self.__key, + cached_keys=self._cached_keys + ) + + def keys(self, *args): + key_list = [ + 'num_nodes', + 'num_node_features', + 'node_index', + 'x', + 'y', + ] + + for a in args: + key_list.remove(a) + + return key_list + + @property + def _mapping(self) -> Mapping: + mapping = {} + + for k in self.keys(): + mapping[k] = self[k] + + return mapping + + +class CudfEdgeStorage(CudfStorage, EdgeStorage): + def __init__(self, dataframe: cudf.DataFrame, device: TorchDevice=TorchDevice('cpu'), parent:Any=None, src_col_name='src', dst_col_name='dst', reserved_keys:list=[], key=None, **kwargs): + super().__init__(dataframe=dataframe, device=device, parent=parent, reserved_keys=reserved_keys, **kwargs) + + self.__src_col_name = src_col_name + self.__dst_col_name = dst_col_name + self.__key = key + + @property + def _key(self): + return self.__key + + @property + def num_edges(self): + return self.shape[0] + + @property + def num_edge_features(self) -> int: + return self.num_features + + @property + def edge_index(self) -> Tensor: + src = self[self.__src_col_name].to(torch.long) + dst = self[self.__dst_col_name].to(torch.long) + assert src.shape[0] == dst.shape[0] + + # dst/src are flipped in PyG + return torch.concat([dst,src]).reshape((2,src.shape[0])) + + def edge_feature_names(self) -> List[str]: + return self._feature_names + + def to(self, to_device: TorchDevice): + return CudfEdgeStorage( + dataframe=self._data, + device=to_device, + parent=self._parent(), + reserved_keys=self._reserved_keys, + src_col_name=self.__src_col_name, + dst_col_name=self.__dst_col_name, + key=self.__key, + cached_keys=self._cached_keys + ) + + def keys(self, *args): + key_list = [ + 'num_edges', + 'num_edge_features', + 'edge_index', + ] + + for a in args: + key_list.remove(a) + + return key_list + + @property + def _mapping(self) -> Mapping: + mapping = {} + + for k in self.keys(): + mapping[k] = self[k] + + return mapping diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_data.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_data.py new file mode 100644 index 00000000000..716afd0ef08 --- /dev/null +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_data.py @@ -0,0 +1,334 @@ +from typing import Any, Union, List +from torch_geometric.data.storage import BaseStorage, EdgeStorage, NodeStorage + +import torch +from torch_geometric.data.data import BaseData, RemoteData, Data +from torch import device as TorchDevice +from torch import Tensor +from torch_sparse import SparseTensor +from cugraph.gnn.pyg_extensions.data.cudf_storage import CudfEdgeStorage, CudfNodeStorage + +import numpy as np +import cupy +import cudf + +import cugraph +from cugraph import Graph +from cugraph.experimental import PropertyGraph +from datetime import datetime + +from numba import cuda as ncuda + +class CuGraphData(BaseData, RemoteData): + reserved_keys = [ + PropertyGraph.vertex_col_name, + PropertyGraph.src_col_name, + PropertyGraph.dst_col_name, + PropertyGraph.type_col_name, + PropertyGraph.edge_id_col_name, + PropertyGraph.vertex_id_col_name, + PropertyGraph.weight_col_name + ] + def __init__(self, graph:Union[Graph,PropertyGraph], device:TorchDevice=TorchDevice('cpu'), node_storage:CudfNodeStorage=None, edge_storage:CudfEdgeStorage=None, reserved_keys=[], **kwargs): + super().__init__() + + is_property_graph = isinstance(graph, PropertyGraph) + if is_property_graph: + if graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe.index.name != PropertyGraph.vertex_col_name: + graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe = graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe.set_index(PropertyGraph.vertex_col_name) + + graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe = graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe.fillna(0) + + if node_storage is None: + self.__node_storage = CudfNodeStorage( + dataframe=graph._vertex_prop_dataframe if is_property_graph \ + else cudf.DataFrame( + cudf.Series(cupy.arange(graph.number_of_vertices()), + name=PropertyGraph.vertex_col_name) + ), + device=device, + parent=self, + reserved_keys=CuGraphData.reserved_keys + reserved_keys, + vertex_col_name=PropertyGraph.vertex_col_name, + **kwargs + ) + else: + self.__node_storage = node_storage + + if edge_storage is None: + self.__edge_storage = CudfEdgeStorage( + dataframe=graph._edge_prop_dataframe if is_property_graph else graph.edgelist_df, + device=device, + parent=self, + reserved_keys=CuGraphData.reserved_keys + reserved_keys, + src_col_name=PropertyGraph.src_col_name if is_property_graph else 'src', + dst_col_name=PropertyGraph.dst_col_name if is_property_graph else 'dst', + **kwargs + ) + else: + self.__edge_storage = edge_storage + + self.graph = graph + self.device = device + self.__extracted_subgraph = None + + @property + def _extracted_subgraph(self) -> cugraph.Graph: + if self.__extracted_subgraph is None: + self.__extracted_subgraph = cugraph.Graph(directed=True) + self.__extracted_subgraph.from_cudf_edgelist( + self.graph._edge_prop_dataframe.join(cudf.Series(cupy.ones(len(self.graph._edge_prop_dataframe), dtype='float32'), name='weight')), + source=PropertyGraph.src_col_name, + destination=PropertyGraph.dst_col_name, + edge_attr='weight', + renumber=False, + ) + + return self.__extracted_subgraph + + def to(self, to_device: TorchDevice) -> BaseData: + return CuGraphData( + graph=self.graph, + device=TorchDevice(to_device), + node_storage=self.__node_storage.to(to_device), + edge_storage=self.__edge_storage.to(to_device) + ) + + def cuda(self): + return self.to('cuda') + + def cpu(self): + return self.to('cpu') + + def stores_as(self, data: 'CuGraphData'): + print('store as') + print(type(data)) + print(data.x.shape) + print(data.num_nodes) + print(data.num_edges) + return self + + @ncuda.jit + def select(A, B, I): + i, j = ncuda.grid(2) + stride_i, stride_j = ncuda.gridsize(2) + for irow in range(i, I.shape[0], stride_i): + for icol in range(j, B.shape[1], stride_j): + B[irow, icol] = A[I[irow], icol] + + @torch.no_grad() + def neighbor_sample( + self, + index: Tensor, + num_neighbors: Tensor, + replace: bool, + directed: bool) -> Any: + + start_time = datetime.now() + + if not isinstance(index, Tensor): + index = Tensor(index).to(torch.long) + if not isinstance(num_neighbors, Tensor): + num_neighbors = Tensor(num_neighbors).to(torch.long) + + index = index.to(self.device) + num_neighbors = num_neighbors.to(self.device) + + if self.device == 'cpu': + index = np.array(index) + # num_neighbors is required to be on the cpu per cugraph api + num_neighbors = np.array(num_neighbors) + else: + index = cupy.from_dlpack(index.__dlpack__()) + # num_neighbors is required to be on the cpu per cugraph api + num_neighbors = cupy.from_dlpack(num_neighbors.__dlpack__()).get() + + is_property_graph = isinstance(self.graph, PropertyGraph) + + if is_property_graph: + # FIXME resolve the renumbering issue with extract_subgraph so it can be used here + #G = self.graph.extract_subgraph(add_edge_data=False, default_edge_weight=1.0, allow_multi_edges=True) + G = self._extracted_subgraph + else: + if self.graph.is_directed() == directed: + G = self.graph + elif directed: + G = self.graph.to_directed() + else: + G = self.graph.to_undirected() + + sampling_start = datetime.now() + index = cudf.Series(index) + sampling_results = cugraph.uniform_neighbor_sample( + G, + index, + list(num_neighbors), # conversion required by cugraph api + replace + ) + + VERBOSE = False + + end_time = datetime.now() + td = end_time - start_time + if VERBOSE: + print('first half', td.total_seconds()) + print('sampling', (end_time - sampling_start).total_seconds()) + + start_time = datetime.now() + + noi_start = datetime.now() + nodes_of_interest = cudf.concat([sampling_results.destinations, sampling_results.sources]).unique().to_cupy(dtype='long') + noi_tensor = torch.from_dlpack(nodes_of_interest.toDlpack()) + noi_end = datetime.now() + if VERBOSE: + print('noi time:', (noi_end - noi_start).total_seconds()) + + renumber_start = datetime.now() + rda = cupy.stack([nodes_of_interest, cupy.arange(len(nodes_of_interest), dtype='long')], axis=-1) + rda = cupy.sort(rda,axis=0) + + ixe = cupy.searchsorted(rda[:,0], cupy.concatenate([sampling_results.destinations.to_cupy(), sampling_results.sources.to_cupy()])) + eix = rda[ixe,1].reshape((2, len(sampling_results.sources))) + + ei = torch.from_dlpack(eix.toDlpack()) + + renumber_end = datetime.now() + if VERBOSE: + print('renumber time:', (renumber_end - renumber_start).total_seconds()) + + if is_property_graph: + iloc_start = datetime.now() + + sampled_y = self.y + if sampled_y is not None: + sampled_y = sampled_y[noi_tensor] + #sampled_y = torch.from_dlpack(self.__node_storage.y[nodes_of_interest].toDlpack()) + + + #sampled_x = self.x[noi_tensor] + #sampled_x = torch.from_dlpack(self.__node_storage._data[self.__node_storage._feature_names].to_cupy()[nodes_of_interest].toDlpack()) + cupy_start = datetime.now() + A = self.__node_storage._x_cupy + cupy_end = datetime.now() + if VERBOSE: + print('cupy time:', (cupy_end - cupy_start).total_seconds()) + B = cupy.empty((len(nodes_of_interest), A.shape[1]), dtype='float32') + I = nodes_of_interest + kernel_start = datetime.now() + CuGraphData.select[128,1024](A, B, I) + kernel_end = datetime.now() + if VERBOSE: + print('kernel time:', (kernel_end - kernel_start).total_seconds()) + sampled_x = torch.from_dlpack(B.toDlpack()) + + #CuGraphData.select(self.__node_storage._data[self.__node_storage._feature_names].to_cupy(), B, nodes_of_interest.to_cupy()) + + iloc_end = datetime.now() + if VERBOSE: + print('iloc time:', (iloc_end - iloc_start).total_seconds()) + + data = Data( + x=sampled_x, + edge_index=ei, + edge_attr=None, + y=sampled_y + ) + + else: + data = Data( + x=None, + edge_index=ei, + edge_attr=None, + y=None + ) + + end_time = datetime.now() + td = end_time - start_time + if VERBOSE: + print('second half', td.total_seconds()) + + return data + + def __remove_internal_columns(self, input_cols, additional_columns_to_remove=[]): + internal_columns = CuGraphData.reserved_keys + additional_columns_to_remove + + # Create a list of user-visible columns by removing the internals while + # preserving order + output_cols = list(input_cols) + for col_name in internal_columns: + if col_name in output_cols: + output_cols.remove(col_name) + + return output_cols + + def extract_subgraph( + self, + node: Tensor, + edges: Tensor, + enumerated_edges: Tensor, + perm: Tensor) -> Any: + """ + node: Nodes to extract + edges: Edges to extract (0: src, 1: dst) + enumerated_edges: Numbered edges to extract + """ + raise NotImplementedError + + @property + def stores(self) -> List[BaseStorage]: + return [self.__node_storage, self.__edge_storage] + + @property + def node_stores(self) -> List[NodeStorage]: + return [self.__node_storage] + + @property + def edge_stores(self) -> List[EdgeStorage]: + return [self.__edge_storage] + + def __getattr__(self, key:str) -> Any: + if key in self.__dict__: + return self.__dict__[key] + + try: + return self.__node_storage[key] + except AttributeError: + try: + return self.__edge_storage[key] + except AttributeError: + raise AttributeError(key) + + + def __setattr__(self, key:str, value:Any): + self.__dict__[key] = value + + def __getitem__(self, key: str) -> Any: + if not isinstance(key, str): + print(key, 'is not string') + return getattr(self, key) + + def __setitem__(self, key: str, value: Any): + raise NotImplementedError() + + def stores_as(self, data: 'CuGraphData'): + return self + + @property + def is_cuda(self) -> bool: + return self.device.type == 'cuda' + + def __cat_dim__(self, key: str, value: Any, *args, **kwargs) -> Any: + if isinstance(value, SparseTensor) and 'adj' in key: + return (0, 1) + elif 'index' in key or key == 'face': + return -1 + else: + return 0 + + def __inc__(self, key: str, value: Any, *args, **kwargs) -> Any: + if 'batch' in key: + return int(value.max()) + 1 + elif 'index' in key or key == 'face': + return self.num_nodes + else: + return 0 \ No newline at end of file diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_storage.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_storage.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_data.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_data.py new file mode 100644 index 00000000000..8604b6160f8 --- /dev/null +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_data.py @@ -0,0 +1,83 @@ +from typing import Any +from torch_geometric.typing import Tensor + +import torch +from torch import device as TorchDevice +from torch_geometric.data import Data, RemoteData +from cugraph.gnn.pyg_extensions.data.gaas_storage import GaasStorage + +from gaas_client.client import GaasClient +from gaas_client.defaults import graph_id as DEFAULT_GRAPH_ID + +import numpy as np + +class GaasData(Data, RemoteData): + def __init__(self, gaas_client: GaasClient, graph_id: int=DEFAULT_GRAPH_ID, device=TorchDevice('cpu'), ephemeral=False): + super().__init__() + + # have to access __dict__ here to ensure the store is a CuGraphStorage + storage = GaasStorage(gaas_client, graph_id, device=device, parent=self) + self.__dict__['_store'] = storage + self.device = device + self.ephemeral = ephemeral + + def __del__(self): + print('destroying a gaasdata object') + if self.ephemeral: + self.gaas_client.delete_graph(self.gaas_graph_id) + + def to(self, to_device: TorchDevice) -> Data: + return GaasData( + self.gaas_client, + self.gaas_graph_id, + TorchDevice(to_device) + ) + + def cuda(self): + return self.to('cuda') + + def cpu(self): + return self.to('cpu') + + def stores_as(self, data: 'Data'): + return self + + def neighbor_sample( + self, + index: Tensor, + num_neighbors: Tensor, + replace: bool, + directed: bool) -> Any: + + if directed is False: + raise NotImplementedError('Undirected support not available') + + if isinstance(index, torch.Tensor): + index = index.to('cpu') + if isinstance(num_neighbors, torch.Tensor): + num_neighbors = num_neighbors.to('cpu') + + new_graph_id = self.gaas_client.uniform_neighbor_sample( + np.array(index, dtype='int32'), + np.array(num_neighbors, dtype='int32'), + replace, + self.gaas_graph_id + ) + + return GaasData(self.gaas_client, + new_graph_id, + device=self.device, + ephemeral=True) + + def extract_subgraph( + self, + node: Tensor, + edges: Tensor, + enumerated_edges: Tensor, + perm: Tensor) -> Any: + """ + node: Nodes to extract + edges: Edges to extract (0: src, 1: dst) + enumerated_edges: Numbered edges to extract + """ + raise NotImplementedError \ No newline at end of file diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_storage.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_storage.py new file mode 100644 index 00000000000..d9fc6060a00 --- /dev/null +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_storage.py @@ -0,0 +1,202 @@ +from typing import Any +from typing import List +from typing import Union + +import torch +from torch import device as TorchDevice +from torch_geometric.typing import ProxyTensor +from torch_geometric.data.storage import GlobalStorage + +from gaas_client.client import GaasClient + +EDGE_KEYS = ["_DST_", "_SRC_"] # reversed order in PyG +VERTEX_KEYS = ["_VERTEX_"] + + +class TorchTensorGaasGraphDataProxy(ProxyTensor): + """ + Implements a partial Torch Tensor interface that forwards requests to a + GaaS server maintaining the actual data in a graph instance. + The interface supported consists of only the APIs specific DGL workflows + need - anything else will raise AttributeError. + """ + _data_categories = ["vertex", "edge"] + + def __init__(self, + gaas_client: GaasClient, + gaas_graph_id: int, + data_category: str, + device:TorchDevice=TorchDevice('cpu'), + property_keys: List[str]=None, + transposed: bool=False, + dtype: torch.dtype=torch.float32): + if data_category not in self._data_categories: + raise ValueError("data_category must be one of " + f"{self._data_categories}, got {data_category}") + + if property_keys is None: + if data_category == 'vertex': + property_keys = VERTEX_KEYS + else: + property_keys = EDGE_KEYS + + self.__client = gaas_client + self.__graph_id = gaas_graph_id + self.__category = data_category + self.__device = device + self.__property_keys = property_keys + self.__transposed = transposed + self.dtype = dtype + + def __getitem__(self, index: Union[int, tuple]) -> Any: + """ + Returns a torch.Tensor containing the edge or vertex data (based on the + instance's data_category) for index, retrieved from graph data on the + instance's GaaS server. + """ + # tensor is a transposed dataframe (tensor[0] is df.iloc[0]) + if isinstance(index, torch.Tensor): + index = [int(i) for i in index] + + if self.__transposed: + if isinstance(index, (list, tuple)) and len(index) == 2: + idx = index[1] + index = index[0] + else: + idx = -1 + + if self.__category == "edge": + data = self.__client.get_graph_edge_dataframe_rows( + index_or_indices=idx, graph_id=self.__graph_id, + property_keys=self.__property_keys) + + else: + data = self.__client.get_graph_vertex_dataframe_rows( + index_or_indices=index, graph_id=self.__graph_id, + property_keys=self.__property_keys) + + if self.__transposed: + if idx == -1: + torch_data = torch.from_numpy(data.T)[index].to(self.device) + else: + torch_data = torch.from_numpy(data)[index].to(self.device) + else: + # FIXME handle non-numeric datatypes + torch_data = torch.from_numpy(data) + + return torch_data.to(self.dtype).to(self.__device) + + @property + def shape(self) -> torch.Size: + keys = [k for k in self.__property_keys if k[0] != '~'] + num_properties = len(keys) + num_removed_properties = len(self.__property_keys) - num_properties + + if self.__category == "edge": + # Handle Edge properties + if num_properties == 0: + s = list(self.__client.get_graph_edge_dataframe_shape(self.__graph_id)) + s[1] -= num_removed_properties + return torch.Size(s) + + num_edges = self.__client.get_num_edges(self.__graph_id) + return torch.Size([num_properties, num_edges]) + elif self.__category == "vertex": + # Handle Vertex properties + if num_properties == 0: + s = list(self.__client.get_graph_vertex_dataframe_shape(self.__graph_id)) + s[1] -= num_removed_properties + return torch.Size(s) + + num_vertices = self.__client.get_num_vertices(self.__graph_id) + return torch.Size([num_properties, num_vertices]) + + raise AttributeError(f'invalid category {self.__category}') + + @property + def device(self) -> TorchDevice: + return self.__device + + @property + def is_cuda(self) -> bool: + return self.__device._type == 'cuda' + + def to(self, to_device: TorchDevice): + return TorchTensorGaasGraphDataProxy( + self.__client, + self.__graph_id, + self.__category, + to_device, + property_keys=self.__property_keys, + transposed=self.__transposed + ) + + def dim(self) -> int: + return self.shape[0] + + def size(self, idx=None) -> Any: + if idx is None: + return self.shape + else: + return self.shape[idx] + + +class GaasStorage(GlobalStorage): + def __init__(self, gaas_client: GaasClient, gaas_graph_id: int, device: TorchDevice=TorchDevice('cpu'), parent=None): + super().__init__(_parent=parent) + setattr(self, 'gaas_client', gaas_client) + setattr(self, 'gaas_graph_id', gaas_graph_id) + setattr(self, 'node_index', TorchTensorGaasGraphDataProxy(gaas_client, gaas_graph_id, 'vertex', device, dtype=torch.long)) + setattr(self, 'edge_index', TorchTensorGaasGraphDataProxy(gaas_client, gaas_graph_id, 'edge', device, transposed=True, dtype=torch.long)) + setattr(self, 'x', TorchTensorGaasGraphDataProxy(gaas_client, gaas_graph_id, 'vertex', device, dtype=torch.float, property_keys=['~y'])) + + # The y attribute is special and needs to be overridden + if self.is_node_attr('y'): + setattr(self, 'y', TorchTensorGaasGraphDataProxy(gaas_client, gaas_graph_id, 'vertex', device, dtype=torch.float, property_keys=['y'], transposed=False)) + + @property + def num_nodes(self) -> int: + return self.gaas_client.get_num_vertices(self.gaas_graph_id) + + @property + def num_node_features(self) -> int: + return self.gaas_client.get_graph_vertex_dataframe_shape(self.gaas_graph_id)[1] + + @property + def num_edge_features(self) -> int: + # includes the original src and dst columns w/ original names + return self.gaas_client.get_graph_edge_dataframe_shape(self.gaas_graph_id)[1] + + @property + def num_edges(self) -> int: + return self.gaas_client.get_num_edges(self.gaas_graph_id) + + def is_node_attr(self, key: str) -> bool: + if key == 'x': + return True + return self.gaas_client.is_vertex_property(key, self.gaas_graph_id) + + def is_edge_attr(self, key: str) -> bool: + return self.gaas_client.is_edge_property(key, self.gaas_graph_id) + + def __getattr__(self, key: str) -> Any: + if key in self: + return self[key] + elif self.gaas_client.is_vertex_property(key, self.gaas_graph_id): + return TorchTensorGaasGraphDataProxy( + self.gaas_client, + self.gaas_graph_id, + 'vertex', + self.node_index.device, + [key] + ) + elif self.gaas_client.is_edge_property(key, self.gaas_graph_id): + return TorchTensorGaasGraphDataProxy( + self.gaas_client, + self.gaas_graph_id, + 'edge', + self.edge_index.device, + [key] + ) + + raise AttributeError(key) \ No newline at end of file From 0913be8324fea1dc5b01b5da2fca6974a1888887 Mon Sep 17 00:00:00 2001 From: Rick Ratzel Date: Fri, 15 Jul 2022 17:35:54 -0500 Subject: [PATCH 31/71] Added options to extract_subgraph() to bypass renumbering and adding edge_data to extraced subgraph, fixed issue with internal weight column being returned by property names API, added tests for new features and bug fix. --- .../dask/structure/mg_property_graph.py | 87 ++++++---- .../cugraph/structure/property_graph.py | 54 ++++--- python/cugraph/cugraph/tests/conftest.py | 5 +- .../tests/mg/test_mg_property_graph.py | 90 ++++++++--- .../cugraph/tests/test_property_graph.py | 150 ++++++++++-------- 5 files changed, 234 insertions(+), 152 deletions(-) diff --git a/python/cugraph/cugraph/dask/structure/mg_property_graph.py b/python/cugraph/cugraph/dask/structure/mg_property_graph.py index 4d9ed9b3a98..6cf6c213ff5 100644 --- a/python/cugraph/cugraph/dask/structure/mg_property_graph.py +++ b/python/cugraph/cugraph/dask/structure/mg_property_graph.py @@ -176,6 +176,8 @@ def edge_property_names(self): props.remove(self.dst_col_name) props.remove(self.edge_id_col_name) props.remove(self.type_col_name) # should "type" be removed? + if self.weight_col_name in props: + props.remove(self.weight_col_name) return props return [] @@ -467,7 +469,9 @@ def extract_subgraph(self, selection=None, edge_weight_property=None, default_edge_weight=None, - allow_multi_edges=False + allow_multi_edges=False, + renumber_graph=True, + add_edge_data=True ): """ Return a subgraph of the overall PropertyGraph containing vertices @@ -495,7 +499,13 @@ def extract_subgraph(self, allow_multi_edges : bool If True, multiple edges should be used to create the return Graph, otherwise multiple edges will be detected and an exception raised. - + renumber_graph : bool (default is True) + If True, return a Graph that has been renumbered for use by graph + algorithms. If False, the returned graph will need to be manually + renumbered prior to calling graph algos. + add_edge_data : bool (default is True) + If True, add meta data about the edges contained in the extracted + graph which are required for future calls to annotate_dataframe(). Returns ------- A Graph instance of the same type as create_using containing only the @@ -556,7 +566,9 @@ def extract_subgraph(self, create_using=create_using, edge_weight_property=edge_weight_property, default_edge_weight=default_edge_weight, - allow_multi_edges=allow_multi_edges) + allow_multi_edges=allow_multi_edges, + renumber_graph=renumber_graph, + add_edge_data=add_edge_data) def annotate_dataframe(self, df, G, edge_vertex_col_names): raise NotImplementedError() @@ -566,7 +578,9 @@ def edge_props_to_graph(self, create_using, edge_weight_property=None, default_edge_weight=None, - allow_multi_edges=False): + allow_multi_edges=False, + renumber_graph=True, + add_edge_data=True): """ Create and return a Graph from the edges in edge_prop_df. """ @@ -594,10 +608,8 @@ def edge_props_to_graph(self, # If a default_edge_weight was specified but an edge_weight_property # was not, a new edge weight column must be added. elif default_edge_weight: - edge_attr = self.__gen_unique_name(edge_prop_df.columns, - prefix=self.weight_col_name) + edge_attr = self.weight_col_name edge_prop_df[edge_attr] = default_edge_weight - else: edge_attr = None @@ -630,18 +642,43 @@ def edge_props_to_graph(self, msg = "default Graph graph type" raise RuntimeError("query resulted in duplicate edges which " f"cannot be represented with the {msg}") - G.from_dask_cudf_edgelist( - edge_prop_df, - source=self.src_col_name, - destination=self.dst_col_name, - edge_attr=edge_attr, renumber=True) - # Set the edge_data on the resulting Graph to a DataFrame containing - # the edges and the edge ID for each. Edge IDs are needed for future - # calls to annotate_dataframe() in order to associate edges with their - # properties, since the PG can contain multiple edges between vertrices - # with different properties. - G.edge_data = self.__create_property_lookup_table(edge_prop_df) - # FIXME: also add vertex_data + + # FIXME: MNMG Graphs required renumber to be True due to requirements on + # legacy code that needed segment offsets, partition offsets, etc. which + # were previously computed during the "legacy" C renumbering. + # The workaround is to pass renumber=True, then manually call + # G.compute_renumber_edge_list(legacy_renum_only=True) to compute the + # required meta-data without changing vertex IDs. + if renumber_graph is False: + renumber = True + else: + renumber = renumber_graph + + col_names = [self.src_col_name, self.dst_col_name] + if edge_attr is not None: + col_names.append(edge_attr) + + G.from_dask_cudf_edgelist(edge_prop_df[col_names], + source=self.src_col_name, + destination=self.dst_col_name, + edge_attr=edge_attr, + renumber=renumber) + # FIXME: see FIXME above - to generate the edgelist, + # compute_renumber_edge_list() must be called, but legacy mode needs to + # be used based on if renumbering was to be done or not. + if renumber_graph is False: + G.compute_renumber_edge_list(legacy_renum_only=True) + else: + G.compute_renumber_edge_list(legacy_renum_only=False) + + if add_edge_data: + # Set the edge_data on the resulting Graph to a DataFrame containing + # the edges and the edge ID for each. Edge IDs are needed for future + # calls to annotate_dataframe() in order to associate edges with + # their properties, since the PG can contain multiple edges between + # vertrices with different properties. + # FIXME: also add vertex_data + G.edge_data = self.__create_property_lookup_table(edge_prop_df) return G @@ -685,18 +722,6 @@ def __get_all_vertices_series(self): vert_sers.append(epd[self.dst_col_name]) return vert_sers - @staticmethod - def __gen_unique_name(current_names, prefix="col"): - """ - Helper function to generate a currently unused name. - """ - name = prefix - counter = 2 - while name in current_names: - name = f"{prefix}{counter}" - counter += 1 - return name - @staticmethod def __get_new_column_dtypes(from_df, to_df): """ diff --git a/python/cugraph/cugraph/structure/property_graph.py b/python/cugraph/cugraph/structure/property_graph.py index 4169537efe8..ff60a2974af 100644 --- a/python/cugraph/cugraph/structure/property_graph.py +++ b/python/cugraph/cugraph/structure/property_graph.py @@ -183,6 +183,8 @@ def edge_property_names(self): props.remove(self.dst_col_name) props.remove(self.edge_id_col_name) props.remove(self.type_col_name) # should "type" be removed? + if self.weight_col_name in props: + props.remove(self.weight_col_name) return props return [] @@ -551,7 +553,9 @@ def extract_subgraph(self, selection=None, edge_weight_property=None, default_edge_weight=None, - allow_multi_edges=False + allow_multi_edges=False, + renumber_graph=True, + add_edge_data=True ): """ Return a subgraph of the overall PropertyGraph containing vertices @@ -579,6 +583,13 @@ def extract_subgraph(self, allow_multi_edges : bool If True, multiple edges should be used to create the return Graph, otherwise multiple edges will be detected and an exception raised. + renumber_graph : bool (default is True) + If True, return a Graph that has been renumbered for use by graph + algorithms. If False, the returned graph will need to be manually + renumbered prior to calling graph algos. + add_edge_data : bool (default is True) + If True, add meta data about the edges contained in the extracted + graph which are required for future calls to annotate_dataframe(). Returns ------- @@ -641,7 +652,9 @@ def extract_subgraph(self, create_using=create_using, edge_weight_property=edge_weight_property, default_edge_weight=default_edge_weight, - allow_multi_edges=allow_multi_edges) + allow_multi_edges=allow_multi_edges, + renumber_graph=renumber_graph, + add_edge_data=add_edge_data) def annotate_dataframe(self, df, G, edge_vertex_col_names): """ @@ -713,7 +726,9 @@ def edge_props_to_graph(self, create_using, edge_weight_property=None, default_edge_weight=None, - allow_multi_edges=False): + allow_multi_edges=False, + renumber_graph=True, + add_edge_data=True): """ Create and return a Graph from the edges in edge_prop_df. """ @@ -742,10 +757,8 @@ def edge_props_to_graph(self, # If a default_edge_weight was specified but an edge_weight_property # was not, a new edge weight column must be added. elif default_edge_weight: - edge_attr = self.__gen_unique_name(edge_prop_df.columns, - prefix=self.weight_col_name) + edge_attr = self.weight_col_name edge_prop_df[edge_attr] = default_edge_weight - else: edge_attr = None @@ -782,20 +795,21 @@ def edge_props_to_graph(self, create_args = {"source": self.src_col_name, "destination": self.dst_col_name, "edge_attr": edge_attr, - "renumber": True, + "renumber": renumber_graph, } if type(edge_prop_df) is cudf.DataFrame: G.from_cudf_edgelist(edge_prop_df, **create_args) else: G.from_pandas_edgelist(edge_prop_df, **create_args) - # Set the edge_data on the resulting Graph to a DataFrame containing - # the edges and the edge ID for each. Edge IDs are needed for future - # calls to annotate_dataframe() in order to associate edges with their - # properties, since the PG can contain multiple edges between vertrices - # with different properties. - G.edge_data = self.__create_property_lookup_table(edge_prop_df) - # FIXME: also add vertex_data + if add_edge_data: + # Set the edge_data on the resulting Graph to a DataFrame containing + # the edges and the edge ID for each. Edge IDs are needed for future + # calls to annotate_dataframe() in order to associate edges with + # their properties, since the PG can contain multiple edges between + # vertrices with different properties. + # FIXME: also add vertex_data + G.edge_data = self.__create_property_lookup_table(edge_prop_df) return G @@ -861,18 +875,6 @@ def __get_all_vertices_series(self): vert_sers.append(epd[self.dst_col_name]) return vert_sers - @staticmethod - def __gen_unique_name(current_names, prefix="col"): - """ - Helper function to generate a currently unused name. - """ - name = prefix - counter = 2 - while name in current_names: - name = f"{prefix}{counter}" - counter += 1 - return name - @staticmethod def __get_new_column_dtypes(from_df, to_df): """ diff --git a/python/cugraph/cugraph/tests/conftest.py b/python/cugraph/cugraph/tests/conftest.py index f5bcb35995e..775f365042b 100644 --- a/python/cugraph/cugraph/tests/conftest.py +++ b/python/cugraph/cugraph/tests/conftest.py @@ -58,10 +58,7 @@ def dask_client(): yield client Comms.destroy() - # Shut down the connected scheduler and workers - # therefore we will no longer rely on killing the dask cluster ID - # for MNMG runs - client.shutdown() + client.close() if cluster: cluster.close() print("\ndask_client fixture: client.close() called") diff --git a/python/cugraph/cugraph/tests/mg/test_mg_property_graph.py b/python/cugraph/cugraph/tests/mg/test_mg_property_graph.py index f1ff0a3184e..ded94171de5 100644 --- a/python/cugraph/cugraph/tests/mg/test_mg_property_graph.py +++ b/python/cugraph/cugraph/tests/mg/test_mg_property_graph.py @@ -12,11 +12,14 @@ # limitations under the License. import gc -import cugraph.dask as dcg + import dask_cudf import pytest import pandas as pd import cudf +from cudf.testing import assert_frame_equal + +import cugraph.dask as dcg from cugraph.testing.utils import RAPIDS_DATASET_ROOT_DIR_PATH from cugraph.testing import utils @@ -51,17 +54,6 @@ (78634, 47906, 0), ] ], - "taxpayers": [ - ["payer_id", "amount"], - [(11, 1123.98), - (4, 3243.7), - (21, 8932.3), - (16, 3241.77), - (86, 789.2), - (89021, 23.98), - (78634, 41.77), - ] - ], "transactions": [ ["user_id", "merchant_id", "volume", "time", "card_num", "card_type"], [(89021, 11, 33.2, 1639084966.5513437, 123456, "MC"), @@ -170,7 +162,7 @@ def dataset1_PropertyGraph(request): dataframe_type = request.param[0] from cugraph.experimental import PropertyGraph - (merchants, users, taxpayers, + (merchants, users, transactions, relationships, referrals) = dataset1.values() pG = PropertyGraph() @@ -195,11 +187,6 @@ def dataset1_PropertyGraph(request): type_name="users", vertex_col_name="user_id", property_columns=None) - pG.add_vertex_data(dataframe_type(columns=taxpayers[0], - data=taxpayers[1]), - type_name="taxpayers", - vertex_col_name="payer_id", - property_columns=None) pG.add_edge_data(dataframe_type(columns=transactions[0], data=transactions[1]), @@ -227,7 +214,7 @@ def dataset1_MGPropertyGraph(dask_client): data added from dataset1, parameterized for different DataFrame types. """ dataframe_type = cudf.DataFrame - (merchants, users, taxpayers, + (merchants, users, transactions, relationships, referrals) = dataset1.values() from cugraph.experimental import MGPropertyGraph mpG = MGPropertyGraph() @@ -256,13 +243,6 @@ def dataset1_MGPropertyGraph(dask_client): vertex_col_name="user_id", property_columns=None) - sg_df = dataframe_type(columns=taxpayers[0], data=taxpayers[1]) - mg_df = dask_cudf.from_cudf(sg_df, npartitions=2) - mpG.add_vertex_data(mg_df, - type_name="taxpayers", - vertex_col_name="payer_id", - property_columns=None) - sg_df = dataframe_type(columns=transactions[0], data=transactions[1]) mg_df = dask_cudf.from_cudf(sg_df, npartitions=2) mpG.add_edge_data(mg_df, @@ -377,3 +357,61 @@ def test_frame_data(dataset1_PropertyGraph, dataset1_MGPropertyGraph): mg_ep_df = mgpG._edge_prop_dataframe\ .compute().sort_values(by=edge_sort_col).reset_index(drop=True) assert (sg_ep_df['_SRC_'].equals(mg_ep_df['_SRC_'])) + +def test_property_names_attrs(dataset1_MGPropertyGraph): + """ + Ensure the correct number of user-visible properties for vertices and edges + are returned. This should exclude the internal bookkeeping properties. + """ + pG = dataset1_MGPropertyGraph + + expected_vert_prop_names = ["merchant_id", "merchant_location", + "merchant_size", "merchant_sales", + "merchant_num_employees", "merchant_name", + "user_id", "user_location", "vertical"] + expected_edge_prop_names = ["user_id", "merchant_id", "volume", "time", + "card_num", "card_type", "user_id_1", + "user_id_2", "relationship_type", "stars"] + + # Extracting a subgraph with weights has/had a side-effect of adding a + # weight column, so call extract_subgraph() to ensure the internal weight + # column name is not present. + pG.extract_subgraph(default_edge_weight=1.0, allow_multi_edges=True) + + actual_vert_prop_names = pG.vertex_property_names + actual_edge_prop_names = pG.edge_property_names + + assert sorted(actual_vert_prop_names) == sorted(expected_vert_prop_names) + assert sorted(actual_edge_prop_names) == sorted(expected_edge_prop_names) + +def test_extract_subgraph_nonrenumbered_noedgedata(dask_client): + """ + Ensure a subgraph can be extracted that is not renumbered and contains no + edge_data. + """ + from cugraph.experimental import MGPropertyGraph + from cugraph import Graph + + pG = MGPropertyGraph() + df = cudf.DataFrame({"src": [99, 98, 97], + "dst": [22, 34, 56], + "some_property": ["a", "b", "c"], + }) + mgdf = dask_cudf.from_cudf(df, npartitions=2) + pG.add_edge_data(mgdf, vertex_col_names=("src", "dst")) + + G = pG.extract_subgraph(create_using=Graph(directed=True), + renumber_graph=False, + add_edge_data=False) + + actual_edgelist = G.edgelist.edgelist_df.compute() + + expected_edgelist = cudf.DataFrame({pG.src_col_name: [99, 98, 97], + pG.dst_col_name: [22, 34, 56], + }) + + assert_frame_equal(expected_edgelist.sort_values(by=pG.src_col_name, + ignore_index=True), + actual_edgelist.sort_values(by=pG.src_col_name, + ignore_index=True)) + assert hasattr(G, "edge_data") is False diff --git a/python/cugraph/cugraph/tests/test_property_graph.py b/python/cugraph/cugraph/tests/test_property_graph.py index 56d0c43bd04..7d7ca74b147 100644 --- a/python/cugraph/cugraph/tests/test_property_graph.py +++ b/python/cugraph/cugraph/tests/test_property_graph.py @@ -170,12 +170,19 @@ def dataset1_PropertyGraph(request): type_name="users", vertex_col_name="user_id", property_columns=None) + # Do not add taxpayers since that may now be considered invalid input (it + # adds the same vertices under different types, which leads to the same + # vertex ID appearing in the internal vertex prop table. + # + # FIXME: determine if this should be allowed or not then either remove + # "taxpayers" or uncomment it. + """ pG.add_vertex_data(dataframe_type(columns=taxpayers[0], data=taxpayers[1]), type_name="taxpayers", vertex_col_name="payer_id", property_columns=None) - + """ pG.add_edge_data(dataframe_type(columns=transactions[0], data=transactions[1]), type_name="transactions", @@ -326,8 +333,9 @@ def test_num_vertices(df_type): assert pG.num_vertices == 9 assert pG.num_edges == 0 - # The taxpayers table does not add new vertices, it only adds properties to - # vertices already present in the merchants and users tables. + # The taxpayers table does not add new unique vertices, it only adds + # properties to vertices already present in the merchants and users + # tables. taxpayers = dataset1["taxpayers"] taxpayers_df = df_type(columns=taxpayers[0], data=taxpayers[1]) @@ -508,13 +516,18 @@ def test_extract_subgraph_vertex_prop_condition_only(dataset1_PropertyGraph): pG = dataset1_PropertyGraph - selection = pG.select_vertices("(_TYPE_=='taxpayers') & (amount<100)") + # This should result in two users: 78634 and 89216 + selection = pG.select_vertices( + f"({pG.type_col_name}=='users') " + "& ((user_location<78750) | ((user_location==78757) & (vertical==1)))") G = pG.extract_subgraph(selection=selection, create_using=DiGraph_inst, - edge_weight_property="stars") - - expected_edgelist = cudf.DataFrame({"src": [89021], "dst": [78634], - "weights": [4]}) + edge_weight_property="relationship_type", + default_edge_weight=99) + # Should result in two edges, one a "relationship", the other a "referral" + expected_edgelist = cudf.DataFrame({"src": [89216, 78634], + "dst": [78634, 89216], + "weights": [99, 8]}) actual_edgelist = G.unrenumber(G.edgelist.edgelist_df, "src", preserve_order=True) actual_edgelist = G.unrenumber(actual_edgelist, "dst", @@ -620,51 +633,6 @@ def test_extract_subgraph_specific_query(dataset1_PropertyGraph): assert_frame_equal(expected_edgelist, actual_edgelist, check_like=True) -def test_edge_props_to_graph(dataset1_PropertyGraph): - """ - Access the property DataFrames directly and use them to perform a more - complex query, then call edge_props_to_graph() to create the corresponding - graph. - """ - from cugraph.experimental import PropertyGraph - - pG = dataset1_PropertyGraph - vcn = PropertyGraph.vertex_col_name - tcn = PropertyGraph.type_col_name - scn = PropertyGraph.src_col_name - dcn = PropertyGraph.dst_col_name - - # Select referrals from only taxpayers who are users (should be 1) - - # Find the list of vertices that are both users and taxpayers - def contains_both(df): - return (df[tcn] == "taxpayers").any() and \ - (df[tcn] == "users").any() - verts = pG._vertex_prop_dataframe.groupby(vcn)\ - .apply(contains_both) - verts = verts[verts].keys() # get an array of only verts that have both - - # Find the "referral" edge_props containing only those verts - referrals = pG._edge_prop_dataframe[tcn] == "referrals" - srcs = pG._edge_prop_dataframe[referrals][scn].isin(verts) - dsts = pG._edge_prop_dataframe[referrals][dcn].isin(verts) - matching_edges = (srcs & dsts) - indices = matching_edges.index[matching_edges] - edge_props = pG._edge_prop_dataframe.loc[indices] - - G = pG.edge_props_to_graph(edge_props, - create_using=DiGraph_inst) - - expected_edgelist = cudf.DataFrame({"src": [89021], "dst": [78634]}) - actual_edgelist = G.unrenumber(G.edgelist.edgelist_df, "src", - preserve_order=True) - actual_edgelist = G.unrenumber(actual_edgelist, "dst", - preserve_order=True) - - assert G.is_directed() - assert_frame_equal(expected_edgelist, actual_edgelist, check_like=True) - - def test_select_vertices_from_previous_selection(dataset1_PropertyGraph): """ Ensures that the intersection of vertices of multiple types (only vertices @@ -675,14 +643,17 @@ def test_select_vertices_from_previous_selection(dataset1_PropertyGraph): pG = dataset1_PropertyGraph tcn = PropertyGraph.type_col_name - # Select referrals from only taxpayers who are users (should be 1) - selection = pG.select_vertices(f"{tcn} == 'taxpayers'") - selection = pG.select_vertices(f"{tcn} == 'users'", - from_previous_selection=selection) + # Select referrals from only users 89216 and 78634 using an intentionally + # awkward query with separate select calls to test from_previous_selection + selection = pG.select_vertices(f"{tcn} == 'users'") + selection = pG.select_vertices( + "((user_location == 78757) & (vertical == 1)) " + "| (user_location == 47906)", + from_previous_selection=selection) selection += pG.select_edges(f"{tcn} == 'referrals'") G = pG.extract_subgraph(create_using=DiGraph_inst, selection=selection) - expected_edgelist = cudf.DataFrame({"src": [89021], "dst": [78634]}) + expected_edgelist = cudf.DataFrame({"src": [89216], "dst": [78634]}) actual_edgelist = G.unrenumber(G.edgelist.edgelist_df, "src", preserve_order=True) actual_edgelist = G.unrenumber(actual_edgelist, "dst", @@ -869,6 +840,35 @@ def test_extract_subgraph_default_edge_weight_no_property( assert (G.edgelist.edgelist_df["weights"] == edge_weight).all() +def test_extract_subgraph_nonrenumbered_noedgedata(): + """ + Ensure a subgraph can be extracted that is not renumbered and contains no + edge_data. + """ + from cugraph.experimental import PropertyGraph + from cugraph import Graph + + pG = PropertyGraph() + df = cudf.DataFrame({"src": [99, 98, 97], + "dst": [22, 34, 56], + "some_property": ["a", "b", "c"], + }) + pG.add_edge_data(df, vertex_col_names=("src", "dst")) + + G = pG.extract_subgraph(create_using=Graph(directed=True), + renumber_graph=False, + add_edge_data=False) + + expected_edgelist = cudf.DataFrame({"src": [99, 98, 97], + "dst": [22, 34, 56], + }) + assert_frame_equal(expected_edgelist.sort_values(by="src", + ignore_index=True), + G.edgelist.edgelist_df.sort_values(by="src", + ignore_index=True)) + assert hasattr(G, "edge_data") is False + + def test_graph_edge_data_added(dataset1_PropertyGraph): """ Ensures the subgraph returned from extract_subgraph() has the edge_data @@ -1031,6 +1031,33 @@ def test_get_edges(dataset1_PropertyGraph): assert (src, dst) in expected_edges +def test_property_names_attrs(dataset1_PropertyGraph): + """ + Ensure the correct number of user-visible properties for vertices and edges + are returned. This should exclude the internal bookkeeping properties. + """ + pG = dataset1_PropertyGraph + + expected_vert_prop_names = ["merchant_id", "merchant_location", + "merchant_size", "merchant_sales", + "merchant_num_employees", "merchant_name", + "user_id", "user_location", "vertical"] + expected_edge_prop_names = ["user_id", "merchant_id", "volume", "time", + "card_num", "card_type", "user_id_1", + "user_id_2", "relationship_type", "stars"] + + # Extracting a subgraph with weights has/had a side-effect of adding a + # weight column, so call extract_subgraph() to ensure the internal weight + # column name is not present. + pG.extract_subgraph(default_edge_weight=1.0, allow_multi_edges=True) + + actual_vert_prop_names = pG.vertex_property_names + actual_edge_prop_names = pG.edge_property_names + + assert sorted(actual_vert_prop_names) == sorted(expected_vert_prop_names) + assert sorted(actual_edge_prop_names) == sorted(expected_edge_prop_names) + + @pytest.mark.skip(reason="unfinished") def test_extract_subgraph_with_vertex_ids(): """ @@ -1042,13 +1069,6 @@ def test_extract_subgraph_with_vertex_ids(): raise NotImplementedError -@pytest.mark.skip(reason="unfinished") -def test_dgl_use_case(): - """ - FIXME: add a test demonstrating typical DGL use cases - """ - raise NotImplementedError - # ============================================================================= # Benchmarks From b7b7a7df5e2d132ba0812d8cc01406291a128fd5 Mon Sep 17 00:00:00 2001 From: Rick Ratzel Date: Fri, 15 Jul 2022 17:44:28 -0500 Subject: [PATCH 32/71] flake8 fixes. --- .../dask/structure/mg_property_graph.py | 22 +++++++++---------- .../cugraph/structure/property_graph.py | 10 ++++----- .../tests/mg/test_mg_property_graph.py | 2 ++ .../cugraph/tests/test_property_graph.py | 1 - 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/python/cugraph/cugraph/dask/structure/mg_property_graph.py b/python/cugraph/cugraph/dask/structure/mg_property_graph.py index 6cf6c213ff5..2821fbdec15 100644 --- a/python/cugraph/cugraph/dask/structure/mg_property_graph.py +++ b/python/cugraph/cugraph/dask/structure/mg_property_graph.py @@ -643,12 +643,12 @@ def edge_props_to_graph(self, raise RuntimeError("query resulted in duplicate edges which " f"cannot be represented with the {msg}") - # FIXME: MNMG Graphs required renumber to be True due to requirements on - # legacy code that needed segment offsets, partition offsets, etc. which - # were previously computed during the "legacy" C renumbering. - # The workaround is to pass renumber=True, then manually call - # G.compute_renumber_edge_list(legacy_renum_only=True) to compute the - # required meta-data without changing vertex IDs. + # FIXME: MNMG Graphs required renumber to be True due to requirements + # on legacy code that needed segment offsets, partition offsets, + # etc. which were previously computed during the "legacy" C + # renumbering. The workaround is to pass renumber=True, then manually + # call G.compute_renumber_edge_list(legacy_renum_only=True) to compute + # the required meta-data without changing vertex IDs. if renumber_graph is False: renumber = True else: @@ -672,11 +672,11 @@ def edge_props_to_graph(self, G.compute_renumber_edge_list(legacy_renum_only=False) if add_edge_data: - # Set the edge_data on the resulting Graph to a DataFrame containing - # the edges and the edge ID for each. Edge IDs are needed for future - # calls to annotate_dataframe() in order to associate edges with - # their properties, since the PG can contain multiple edges between - # vertrices with different properties. + # Set the edge_data on the resulting Graph to a DataFrame + # containing the edges and the edge ID for each. Edge IDs are + # needed for future calls to annotate_dataframe() in order to + # associate edges with their properties, since the PG can contain + # multiple edges between vertrices with different properties. # FIXME: also add vertex_data G.edge_data = self.__create_property_lookup_table(edge_prop_df) diff --git a/python/cugraph/cugraph/structure/property_graph.py b/python/cugraph/cugraph/structure/property_graph.py index ff60a2974af..c39223894bf 100644 --- a/python/cugraph/cugraph/structure/property_graph.py +++ b/python/cugraph/cugraph/structure/property_graph.py @@ -803,11 +803,11 @@ def edge_props_to_graph(self, G.from_pandas_edgelist(edge_prop_df, **create_args) if add_edge_data: - # Set the edge_data on the resulting Graph to a DataFrame containing - # the edges and the edge ID for each. Edge IDs are needed for future - # calls to annotate_dataframe() in order to associate edges with - # their properties, since the PG can contain multiple edges between - # vertrices with different properties. + # Set the edge_data on the resulting Graph to a DataFrame + # containing the edges and the edge ID for each. Edge IDs are + # needed for future calls to annotate_dataframe() in order to + # associate edges with their properties, since the PG can contain + # multiple edges between vertrices with different properties. # FIXME: also add vertex_data G.edge_data = self.__create_property_lookup_table(edge_prop_df) diff --git a/python/cugraph/cugraph/tests/mg/test_mg_property_graph.py b/python/cugraph/cugraph/tests/mg/test_mg_property_graph.py index ded94171de5..a183f8588c3 100644 --- a/python/cugraph/cugraph/tests/mg/test_mg_property_graph.py +++ b/python/cugraph/cugraph/tests/mg/test_mg_property_graph.py @@ -358,6 +358,7 @@ def test_frame_data(dataset1_PropertyGraph, dataset1_MGPropertyGraph): .compute().sort_values(by=edge_sort_col).reset_index(drop=True) assert (sg_ep_df['_SRC_'].equals(mg_ep_df['_SRC_'])) + def test_property_names_attrs(dataset1_MGPropertyGraph): """ Ensure the correct number of user-visible properties for vertices and edges @@ -384,6 +385,7 @@ def test_property_names_attrs(dataset1_MGPropertyGraph): assert sorted(actual_vert_prop_names) == sorted(expected_vert_prop_names) assert sorted(actual_edge_prop_names) == sorted(expected_edge_prop_names) + def test_extract_subgraph_nonrenumbered_noedgedata(dask_client): """ Ensure a subgraph can be extracted that is not renumbered and contains no diff --git a/python/cugraph/cugraph/tests/test_property_graph.py b/python/cugraph/cugraph/tests/test_property_graph.py index 7d7ca74b147..e1a35efc058 100644 --- a/python/cugraph/cugraph/tests/test_property_graph.py +++ b/python/cugraph/cugraph/tests/test_property_graph.py @@ -1069,7 +1069,6 @@ def test_extract_subgraph_with_vertex_ids(): raise NotImplementedError - # ============================================================================= # Benchmarks # ============================================================================= From 9998a9538374188507cd124cb3ca061852266f29 Mon Sep 17 00:00:00 2001 From: Rick Ratzel Date: Fri, 15 Jul 2022 20:21:58 -0500 Subject: [PATCH 33/71] Added code and tests for PG.num_vertices_with_properties attribute, which returns the number of verts that have properties (different than the number of verts). This is needed for GNN use cases. --- .../dask/structure/mg_property_graph.py | 15 ++++++++--- .../cugraph/structure/property_graph.py | 15 ++++++++--- .../tests/mg/test_mg_property_graph.py | 26 +++++++++++++++++++ .../cugraph/tests/test_property_graph.py | 25 ++++++++++++++++++ 4 files changed, 75 insertions(+), 6 deletions(-) diff --git a/python/cugraph/cugraph/dask/structure/mg_property_graph.py b/python/cugraph/cugraph/dask/structure/mg_property_graph.py index 2821fbdec15..78fabc0fdb1 100644 --- a/python/cugraph/cugraph/dask/structure/mg_property_graph.py +++ b/python/cugraph/cugraph/dask/structure/mg_property_graph.py @@ -126,6 +126,7 @@ def __init__(self, num_workers=None): # Cached property values self.__num_vertices = None + self.__num_vertices_with_properties = None # number of gpu's to use if num_workers is None: @@ -145,6 +146,13 @@ def num_vertices(self): self.__num_vertices = vert_count.compute() return self.__num_vertices + @property + def num_vertices_with_properties(self): + if self.__num_vertices_with_properties is not None: + return self.__num_vertices_with_properties + self.__num_vertices_with_properties = len(self.__vertex_prop_dataframe) + return self.__num_vertices_with_properties + @property def num_edges(self): if self.__edge_prop_dataframe is not None: @@ -262,9 +270,10 @@ def add_vertex_data(self, "found in dataframe: " f"{list(invalid_columns)}") - # Clear the cached value for num_vertices since more could be added in - # this method. + # Clear the cached values related to the number of vertices since more + # could be added in this method. self.__num_vertices = None + self.__num_vertices_with_properties = None # Initialize the __vertex_prop_dataframe if necessary using the same # type as the incoming dataframe. @@ -375,7 +384,7 @@ def add_edge_data(self, f"{list(invalid_columns)}") # Clear the cached value for num_vertices since more could be added in - # this method. + # this method. This method cannot affect num_vertices_with_properties self.__num_vertices = None default_edge_columns = [self.src_col_name, diff --git a/python/cugraph/cugraph/structure/property_graph.py b/python/cugraph/cugraph/structure/property_graph.py index c39223894bf..eb872ffeb06 100644 --- a/python/cugraph/cugraph/structure/property_graph.py +++ b/python/cugraph/cugraph/structure/property_graph.py @@ -135,6 +135,7 @@ def __init__(self): # Cached property values self.__num_vertices = None + self.__num_vertices_with_properties = None # PropertyGraph read-only attributes @property @@ -152,6 +153,13 @@ def num_vertices(self): return self.__num_vertices + @property + def num_vertices_with_properties(self): + if self.__num_vertices_with_properties is not None: + return self.__num_vertices_with_properties + self.__num_vertices_with_properties = len(self.__vertex_prop_dataframe) + return self.__num_vertices_with_properties + @property def num_edges(self): if self.__edge_prop_dataframe is not None: @@ -280,9 +288,10 @@ def add_vertex_data(self, "the PropertyGraph was already initialized " f"using type {self.__dataframe_type}") - # Clear the cached value for num_vertices since more could be added in - # this method. + # Clear the cached values related to the number of vertices since more + # could be added in this method. self.__num_vertices = None + self.__num_vertices_with_properties = None # Initialize the __vertex_prop_dataframe if necessary using the same # type as the incoming dataframe. @@ -402,7 +411,7 @@ def add_edge_data(self, f"using type {self.__dataframe_type}") # Clear the cached value for num_vertices since more could be added in - # this method. + # this method. This method cannot affect num_vertices_with_properties self.__num_vertices = None default_edge_columns = [self.src_col_name, diff --git a/python/cugraph/cugraph/tests/mg/test_mg_property_graph.py b/python/cugraph/cugraph/tests/mg/test_mg_property_graph.py index a183f8588c3..2462e75a489 100644 --- a/python/cugraph/cugraph/tests/mg/test_mg_property_graph.py +++ b/python/cugraph/cugraph/tests/mg/test_mg_property_graph.py @@ -417,3 +417,29 @@ def test_extract_subgraph_nonrenumbered_noedgedata(dask_client): actual_edgelist.sort_values(by=pG.src_col_name, ignore_index=True)) assert hasattr(G, "edge_data") is False + + +def test_num_vertices_with_properties(dask_client): + """ + Checks that the num_vertices_with_properties attr is set to the number of + vertices that have properties, as opposed to just num_vertices which also + includes all verts in the graph edgelist. + """ + from cugraph.experimental import MGPropertyGraph + + pG = MGPropertyGraph() + df = cudf.DataFrame({"src": [99, 98, 97], + "dst": [22, 34, 56], + "some_property": ["a", "b", "c"], + }) + mgdf = dask_cudf.from_cudf(df, npartitions=2) + pG.add_edge_data(mgdf, vertex_col_names=("src", "dst")) + + df = cudf.DataFrame({"vertex": [98, 97], + "some_property": ["a", "b"], + }) + mgdf = dask_cudf.from_cudf(df, npartitions=2) + pG.add_vertex_data(mgdf, vertex_col_name="vertex") + + assert pG.num_vertices == 6 + assert pG.num_vertices_with_properties == 2 diff --git a/python/cugraph/cugraph/tests/test_property_graph.py b/python/cugraph/cugraph/tests/test_property_graph.py index e1a35efc058..9dbbd87bf2f 100644 --- a/python/cugraph/cugraph/tests/test_property_graph.py +++ b/python/cugraph/cugraph/tests/test_property_graph.py @@ -349,6 +349,31 @@ def test_num_vertices(df_type): assert pG.num_edges == 0 +@pytest.mark.parametrize("df_type", df_types, ids=df_type_id) +def test_num_vertices_with_properties(df_type): + """ + Checks that the num_vertices_with_properties attr is set to the number of + vertices that have properties, as opposed to just num_vertices which also + includes all verts in the graph edgelist. + """ + from cugraph.experimental import PropertyGraph + + pG = PropertyGraph() + df = df_type({"src": [99, 98, 97], + "dst": [22, 34, 56], + "some_property": ["a", "b", "c"], + }) + pG.add_edge_data(df, vertex_col_names=("src", "dst")) + + df = df_type({"vertex": [98, 97], + "some_property": ["a", "b"], + }) + pG.add_vertex_data(df, vertex_col_name="vertex") + + assert pG.num_vertices == 6 + assert pG.num_vertices_with_properties == 2 + + @pytest.mark.parametrize("df_type", df_types, ids=df_type_id) def test_null_data(df_type): """ From eb7d928af5bf6acf38fba54a8c8b09b4b6d64a8b Mon Sep 17 00:00:00 2001 From: Rick Ratzel Date: Fri, 15 Jul 2022 20:36:30 -0500 Subject: [PATCH 34/71] Added code and test for handling no vertex data when accessing num_vertices_with_properties. --- .../cugraph/cugraph/dask/structure/mg_property_graph.py | 9 +++++++-- python/cugraph/cugraph/structure/property_graph.py | 9 +++++++-- .../cugraph/cugraph/tests/mg/test_mg_property_graph.py | 3 +++ python/cugraph/cugraph/tests/test_property_graph.py | 3 +++ 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/python/cugraph/cugraph/dask/structure/mg_property_graph.py b/python/cugraph/cugraph/dask/structure/mg_property_graph.py index 78fabc0fdb1..d4c58b7737e 100644 --- a/python/cugraph/cugraph/dask/structure/mg_property_graph.py +++ b/python/cugraph/cugraph/dask/structure/mg_property_graph.py @@ -150,8 +150,13 @@ def num_vertices(self): def num_vertices_with_properties(self): if self.__num_vertices_with_properties is not None: return self.__num_vertices_with_properties - self.__num_vertices_with_properties = len(self.__vertex_prop_dataframe) - return self.__num_vertices_with_properties + + if self.__vertex_prop_dataframe is not None: + self.__num_vertices_with_properties = \ + len(self.__vertex_prop_dataframe) + return self.__num_vertices_with_properties + + return 0 @property def num_edges(self): diff --git a/python/cugraph/cugraph/structure/property_graph.py b/python/cugraph/cugraph/structure/property_graph.py index eb872ffeb06..71b1188b745 100644 --- a/python/cugraph/cugraph/structure/property_graph.py +++ b/python/cugraph/cugraph/structure/property_graph.py @@ -157,8 +157,13 @@ def num_vertices(self): def num_vertices_with_properties(self): if self.__num_vertices_with_properties is not None: return self.__num_vertices_with_properties - self.__num_vertices_with_properties = len(self.__vertex_prop_dataframe) - return self.__num_vertices_with_properties + + if self.__vertex_prop_dataframe is not None: + self.__num_vertices_with_properties = \ + len(self.__vertex_prop_dataframe) + return self.__num_vertices_with_properties + + return 0 @property def num_edges(self): diff --git a/python/cugraph/cugraph/tests/mg/test_mg_property_graph.py b/python/cugraph/cugraph/tests/mg/test_mg_property_graph.py index 2462e75a489..3c5e1a8bfe3 100644 --- a/python/cugraph/cugraph/tests/mg/test_mg_property_graph.py +++ b/python/cugraph/cugraph/tests/mg/test_mg_property_graph.py @@ -435,6 +435,9 @@ def test_num_vertices_with_properties(dask_client): mgdf = dask_cudf.from_cudf(df, npartitions=2) pG.add_edge_data(mgdf, vertex_col_names=("src", "dst")) + assert pG.num_vertices == 6 + assert pG.num_vertices_with_properties == 0 + df = cudf.DataFrame({"vertex": [98, 97], "some_property": ["a", "b"], }) diff --git a/python/cugraph/cugraph/tests/test_property_graph.py b/python/cugraph/cugraph/tests/test_property_graph.py index 9dbbd87bf2f..d4d185dac18 100644 --- a/python/cugraph/cugraph/tests/test_property_graph.py +++ b/python/cugraph/cugraph/tests/test_property_graph.py @@ -365,6 +365,9 @@ def test_num_vertices_with_properties(df_type): }) pG.add_edge_data(df, vertex_col_names=("src", "dst")) + assert pG.num_vertices == 6 + assert pG.num_vertices_with_properties == 0 + df = df_type({"vertex": [98, 97], "some_property": ["a", "b"], }) From b487909c41e44972c1b1029720dcb006487ec3ef Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Thu, 21 Jul 2022 19:24:32 +0000 Subject: [PATCH 35/71] cugraph-pyg --- .../gaas_extensions/reddit_gaas_extension.py | 2 +- .../gnn/pyg_extensions/data/gaas_data.py | 76 +++++++++++-- .../gnn/pyg_extensions/data/gaas_storage.py | 103 +++++++++++------- 3 files changed, 131 insertions(+), 50 deletions(-) diff --git a/python/cugraph/cugraph/gnn/gaas_extensions/reddit_gaas_extension.py b/python/cugraph/cugraph/gnn/gaas_extensions/reddit_gaas_extension.py index d037300e8f6..12c6052abbd 100644 --- a/python/cugraph/cugraph/gnn/gaas_extensions/reddit_gaas_extension.py +++ b/python/cugraph/cugraph/gnn/gaas_extensions/reddit_gaas_extension.py @@ -12,7 +12,7 @@ import networkx as nx from cugraph.experimental import PropertyGraph -def load_reddit(data_dir): +def load_reddit(sv, data_dir): G = PropertyGraph() with open(os.path.join(data_dir, 'reddit_data.npz'), 'rb') as f: diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_data.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_data.py index 8604b6160f8..14457e9c632 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_data.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_data.py @@ -10,21 +10,27 @@ from gaas_client.defaults import graph_id as DEFAULT_GRAPH_ID import numpy as np +import pandas as pd +import cupy +import cudf class GaasData(Data, RemoteData): def __init__(self, gaas_client: GaasClient, graph_id: int=DEFAULT_GRAPH_ID, device=TorchDevice('cpu'), ephemeral=False): super().__init__() - # have to access __dict__ here to ensure the store is a CuGraphStorage + # have to access __dict__ here to ensure the store is a GaasStorage storage = GaasStorage(gaas_client, graph_id, device=device, parent=self) self.__dict__['_store'] = storage self.device = device self.ephemeral = ephemeral + self.__extracted_subgraph = None def __del__(self): print('destroying a gaasdata object') if self.ephemeral: self.gaas_client.delete_graph(self.gaas_graph_id) + if self.__extracted_subgraph is not None: + self.gaas_client.delete_graph(self.__extracted_subgraph) def to(self, to_device: TorchDevice) -> Data: return GaasData( @@ -57,17 +63,73 @@ def neighbor_sample( if isinstance(num_neighbors, torch.Tensor): num_neighbors = num_neighbors.to('cpu') - new_graph_id = self.gaas_client.uniform_neighbor_sample( + sampling_results = self.gaas_client.uniform_neighbor_sample( np.array(index, dtype='int32'), np.array(num_neighbors, dtype='int32'), replace, - self.gaas_graph_id + self.extracted_subgraph ) - return GaasData(self.gaas_client, - new_graph_id, - device=self.device, - ephemeral=True) + toseries_fn = pd.Series if self.device == 'cpu' else cudf.Series + concat_fn = pd.concat if self.device == 'cpu' else cudf.concat + stack_fn = np.stack if self.device == 'cpu' else cupy.stack + sort_fn = np.sort if self.device == 'cpu' else cupy.sort + searchsorted_fn = np.searchsorted if self.device == 'cpu' else cupy.searchsorted + arrayconcat_fn = np.concatenate if self.device == 'cpu' else cupy.concatenate + arange_fn = np.arange if self.device == 'cpu' else cupy.arange + toarray_fn = pd.Series.to_numpy if self.device == 'cpu' else cudf.Series.to_cupy + + destinations = toseries_fn(sampling_results.destinations) + sources = toseries_fn(sampling_results.sources) + + nodes_of_interest = toarray_fn(concat_fn([destinations, sources], axis=0).unique(), dtype='long') + if self.device == 'cpu': + noi_tensor = Tensor(nodes_of_interest) + else: + noi_tensor = torch.from_dlpack(nodes_of_interest.toDlpack()) + + + rda = stack_fn([nodes_of_interest, arange_fn(len(nodes_of_interest), dtype='long')], axis=-1) + rda = sort_fn(rda,axis=0) + + ixe = searchsorted_fn(rda[:,0], arrayconcat_fn([toarray_fn(destinations), toarray_fn(sources)])) + eix = rda[ixe,1].reshape((2, len(sources))) + + if self.device == 'cpu': + ei = Tensor(eix) + else: + ei = torch.from_dlpack(eix.toDlpack()) + + sampled_y = self.y + if sampled_y is not None: + sampled_y = sampled_y[noi_tensor] + + sampled_x = self.x[noi_tensor] + + data = Data( + x=sampled_x, + edge_index=ei, + edge_attr=None, + y=sampled_y + ) + + return data + + @property + def extracted_subgraph(self) -> int: + if self.__extracted_subgraph is None: + sG = self.gaas_client.extract_subgraph( + default_edge_weight=1.0, + allow_multi_edges=True, + renumber_graph=False, + add_edge_data=False, + graph_id=self.gaas_graph_id + ) + self.__extracted_subgraph = sG + + return self.__extracted_subgraph + + def extract_subgraph( self, diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_storage.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_storage.py index d9fc6060a00..0c2abaacf7d 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_storage.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_storage.py @@ -9,6 +9,8 @@ from gaas_client.client import GaasClient +import numpy as np + EDGE_KEYS = ["_DST_", "_SRC_"] # reversed order in PyG VERTEX_KEYS = ["_VERTEX_"] @@ -44,7 +46,7 @@ def __init__(self, self.__graph_id = gaas_graph_id self.__category = data_category self.__device = device - self.__property_keys = property_keys + self.__property_keys = np.array(property_keys) self.__transposed = transposed self.dtype = dtype @@ -54,32 +56,41 @@ def __getitem__(self, index: Union[int, tuple]) -> Any: instance's data_category) for index, retrieved from graph data on the instance's GaaS server. """ - # tensor is a transposed dataframe (tensor[0] is df.iloc[0]) + if isinstance(index, torch.Tensor): index = [int(i) for i in index] + + property_keys = self.__property_keys + + if isinstance(index, (list, tuple)): + assert len(index) == 2 + else: + index = [index, -1] if self.__transposed: - if isinstance(index, (list, tuple)) and len(index) == 2: - idx = index[1] - index = index[0] - else: - idx = -1 + index = [index[1], index[0]] - if self.__category == "edge": + if index[1] != -1: + property_keys = property_keys[index[1]] + if isinstance(property_keys, str): + property_keys = [property_keys] + + print('index:',index) + print('all property keys:', self.__property_keys) + print('property keys:', property_keys) + + if self.__category == "edge": data = self.__client.get_graph_edge_dataframe_rows( - index_or_indices=idx, graph_id=self.__graph_id, - property_keys=self.__property_keys) + index_or_indices=index[0], graph_id=self.__graph_id, + property_keys=property_keys) else: data = self.__client.get_graph_vertex_dataframe_rows( - index_or_indices=index, graph_id=self.__graph_id, - property_keys=self.__property_keys) + index_or_indices=index[0], graph_id=self.__graph_id, + property_keys=property_keys) if self.__transposed: - if idx == -1: - torch_data = torch.from_numpy(data.T)[index].to(self.device) - else: - torch_data = torch.from_numpy(data)[index].to(self.device) + torch_data = torch.from_numpy(data.T).to(self.device) else: # FIXME handle non-numeric datatypes torch_data = torch.from_numpy(data) @@ -88,30 +99,19 @@ def __getitem__(self, index: Union[int, tuple]) -> Any: @property def shape(self) -> torch.Size: - keys = [k for k in self.__property_keys if k[0] != '~'] - num_properties = len(keys) - num_removed_properties = len(self.__property_keys) - num_properties - if self.__category == "edge": # Handle Edge properties - if num_properties == 0: - s = list(self.__client.get_graph_edge_dataframe_shape(self.__graph_id)) - s[1] -= num_removed_properties - return torch.Size(s) - - num_edges = self.__client.get_num_edges(self.__graph_id) - return torch.Size([num_properties, num_edges]) + s = [self.__client.get_num_edges(self.__graph_id), len(self.__property_keys)] elif self.__category == "vertex": # Handle Vertex properties - if num_properties == 0: - s = list(self.__client.get_graph_vertex_dataframe_shape(self.__graph_id)) - s[1] -= num_removed_properties - return torch.Size(s) - - num_vertices = self.__client.get_num_vertices(self.__graph_id) - return torch.Size([num_properties, num_vertices]) - - raise AttributeError(f'invalid category {self.__category}') + s = [self.__client.get_num_vertices(self.__graph_id), len(self.__property_keys)] + else: + raise AttributeError(f'invalid category {self.__category}') + + if self.__transposed: + s = [s[1],s[0]] + + return torch.Size(s) @property def device(self) -> TorchDevice: @@ -148,28 +148,47 @@ def __init__(self, gaas_client: GaasClient, gaas_graph_id: int, device: TorchDev setattr(self, 'gaas_graph_id', gaas_graph_id) setattr(self, 'node_index', TorchTensorGaasGraphDataProxy(gaas_client, gaas_graph_id, 'vertex', device, dtype=torch.long)) setattr(self, 'edge_index', TorchTensorGaasGraphDataProxy(gaas_client, gaas_graph_id, 'edge', device, transposed=True, dtype=torch.long)) - setattr(self, 'x', TorchTensorGaasGraphDataProxy(gaas_client, gaas_graph_id, 'vertex', device, dtype=torch.float, property_keys=['~y'])) + + vertex_property_keys = gaas_client.get_graph_vertex_property_keys(graph_id=gaas_graph_id) + if 'y' in vertex_property_keys: + vertex_property_keys.remove('y') + #edge_property_keys = gaas_client.get_graph_edge_property_keys(graph_id=gaas_graph_id) + + setattr(self, 'x', TorchTensorGaasGraphDataProxy(gaas_client, gaas_graph_id, 'vertex', device, dtype=torch.float, property_keys=vertex_property_keys)) # The y attribute is special and needs to be overridden if self.is_node_attr('y'): setattr(self, 'y', TorchTensorGaasGraphDataProxy(gaas_client, gaas_graph_id, 'vertex', device, dtype=torch.float, property_keys=['y'], transposed=False)) + + setattr( + self, + 'graph_info', + gaas_client.get_graph_info( + keys=[ + 'num_vertices', + 'num_edges', + 'num_vertex_properties', + 'num_edge_properties' + ], + graph_id=gaas_graph_id + ) + ) @property def num_nodes(self) -> int: - return self.gaas_client.get_num_vertices(self.gaas_graph_id) + return self.graph_info['num_vertices'] @property def num_node_features(self) -> int: - return self.gaas_client.get_graph_vertex_dataframe_shape(self.gaas_graph_id)[1] + return self.graph_info['num_vertex_properties'] @property def num_edge_features(self) -> int: - # includes the original src and dst columns w/ original names - return self.gaas_client.get_graph_edge_dataframe_shape(self.gaas_graph_id)[1] + return self.graph_info['num_edge_properties'] @property def num_edges(self) -> int: - return self.gaas_client.get_num_edges(self.gaas_graph_id) + return self.graph_info['num_edges'] def is_node_attr(self, key: str) -> bool: if key == 'x': From 2ce5bcc78093566e92deae04b556303efeef4203 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Thu, 21 Jul 2022 19:25:12 +0000 Subject: [PATCH 36/71] blergh --- .../cugraph/structure/graph_implementation/simpleGraph.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py b/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py index 68ec7b6aa00..3cd0b3de4aa 100644 --- a/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py +++ b/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py @@ -775,7 +775,8 @@ def make_plc_graph(self, value_col=None, store_transposed=False): value_col = value_col.astype("float64") graph_props = GraphProperties( - is_multigraph=self.properties.multi_edge + is_multigraph=self.properties.multi_edge, + is_symmetric=not self.properties.directed ) self._plc_graph = SGGraph( From d46570b72130228bac13d8996b04c9576087e7a8 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Wed, 27 Jul 2022 02:43:23 +0000 Subject: [PATCH 37/71] minor --- .../dask/sampling/uniform_neighbor_sample.py | 5 ++- .../gnn/pyg_extensions/data/gaas_data.py | 45 ++++++++++++++++--- .../gnn/pyg_extensions/data/gaas_storage.py | 13 +++--- .../sampling/uniform_neighbor_sample.py | 5 ++- .../cugraph/structure/property_graph.py | 6 ++- 5 files changed, 59 insertions(+), 15 deletions(-) diff --git a/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py b/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py index 3de90e64a80..c94a130bc13 100644 --- a/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py +++ b/python/cugraph/cugraph/dask/sampling/uniform_neighbor_sample.py @@ -123,7 +123,10 @@ def uniform_neighbor_sample(input_graph, raise TypeError("fanout_vals must be a list, " f"got: {type(fanout_vals)}") - weight_t = input_graph.edgelist.edgelist_df["value"].dtype + if 'value' in input_graph.edgelist.edgelist_df: + weight_t = input_graph.edgelist.edgelist_df["value"].dtype + else: + weight_t = 'float32' # start_list uses "external" vertex IDs, but if the graph has been # renumbered, the start vertex IDs must also be renumbered. diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_data.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_data.py index 14457e9c632..482a1ba0a1e 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_data.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_data.py @@ -3,6 +3,7 @@ import torch from torch import device as TorchDevice +from torch.utils.data import IterableDataset from torch_geometric.data import Data, RemoteData from cugraph.gnn.pyg_extensions.data.gaas_storage import GaasStorage @@ -14,8 +15,9 @@ import cupy import cudf -class GaasData(Data, RemoteData): - def __init__(self, gaas_client: GaasClient, graph_id: int=DEFAULT_GRAPH_ID, device=TorchDevice('cpu'), ephemeral=False): +class GaasData(Data, RemoteData, IterableDataset): + def __init__(self, gaas_client: GaasClient, graph_id: int=DEFAULT_GRAPH_ID, device=TorchDevice('cpu'), + ephemeral=False, batch_size=1, shuffle=False): super().__init__() # have to access __dict__ here to ensure the store is a GaasStorage @@ -23,7 +25,10 @@ def __init__(self, gaas_client: GaasClient, graph_id: int=DEFAULT_GRAPH_ID, devi self.__dict__['_store'] = storage self.device = device self.ephemeral = ephemeral + self.batch_size = batch_size + self.shuffle = shuffle self.__extracted_subgraph = None + self.__iters = 0 def __del__(self): print('destroying a gaasdata object') @@ -31,12 +36,42 @@ def __del__(self): self.gaas_client.delete_graph(self.gaas_graph_id) if self.__extracted_subgraph is not None: self.gaas_client.delete_graph(self.__extracted_subgraph) + + def __next__(self): + #FIXME handle shuffle + if self.shuffle: + raise NotImplementedError('shuffle currently not supported') + + start = self.__iters * self.batch_size + end = min(self.num_edges, (1 + self.__iters) * self.batch_size) + if start >= self.num_edges: + raise StopIteration + batch_idx = range(start, end) + + self.__iters += 1 + + eix = self.edge_index[-1, batch_idx] + + #FIXME property handle edge labels + eli = torch.zeros(eix.shape[1], dtype=torch.long, device=self.device) + + yield eix, eli + + def __iter__(self): + self.reset_iter() + return self + + def reset_iter(self): + self.__iters__ = 0 def to(self, to_device: TorchDevice) -> Data: return GaasData( - self.gaas_client, - self.gaas_graph_id, - TorchDevice(to_device) + gaas_client=self.gaas_client, + graph_id=self.gaas_graph_id, + device=TorchDevice(to_device), + ephemeral=self.ephemeral, + batch_size=self.batch_size, + shuffle=self.shuffle ) def cuda(self): diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_storage.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_storage.py index 0c2abaacf7d..d86ba6a68b9 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_storage.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_storage.py @@ -63,7 +63,10 @@ def __getitem__(self, index: Union[int, tuple]) -> Any: property_keys = self.__property_keys if isinstance(index, (list, tuple)): - assert len(index) == 2 + if len(index) == 2: + index = [index[0], index[1]] + else: + index = [index, -1] else: index = [index, -1] @@ -74,20 +77,16 @@ def __getitem__(self, index: Union[int, tuple]) -> Any: property_keys = property_keys[index[1]] if isinstance(property_keys, str): property_keys = [property_keys] - - print('index:',index) - print('all property keys:', self.__property_keys) - print('property keys:', property_keys) if self.__category == "edge": data = self.__client.get_graph_edge_dataframe_rows( index_or_indices=index[0], graph_id=self.__graph_id, - property_keys=property_keys) + property_keys=list(property_keys)) else: data = self.__client.get_graph_vertex_dataframe_rows( index_or_indices=index[0], graph_id=self.__graph_id, - property_keys=property_keys) + property_keys=list(property_keys)) if self.__transposed: torch_data = torch.from_numpy(data.T).to(self.device) diff --git a/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py b/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py index c9ce13de831..9104c1a42e0 100644 --- a/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py +++ b/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py @@ -79,7 +79,10 @@ def uniform_neighbor_sample(G, raise TypeError("fanout_vals must be a list, " f"got: {type(fanout_vals)}") - weight_t = G.edgelist.edgelist_df['weights'].dtype + if 'weights' in G.edgelist.edgelist_df: + weight_t = G.edgelist.edgelist_df['weights'].dtype + else: + weight_t = 'float32' if G.renumbered is True: if isinstance(start_list, cudf.DataFrame): diff --git a/python/cugraph/cugraph/structure/property_graph.py b/python/cugraph/cugraph/structure/property_graph.py index 815192ef7b4..221a7c80ae8 100644 --- a/python/cugraph/cugraph/structure/property_graph.py +++ b/python/cugraph/cugraph/structure/property_graph.py @@ -569,7 +569,8 @@ def extract_subgraph(self, default_edge_weight=None, allow_multi_edges=False, renumber_graph=True, - add_edge_data=True + add_edge_data=True, + legacy_renum_only=False, ): """ Return a subgraph of the overall PropertyGraph containing vertices @@ -604,6 +605,9 @@ def extract_subgraph(self, add_edge_data : bool (default is True) If True, add meta data about the edges contained in the extracted graph which are required for future calls to annotate_dataframe(). + legacy_renum_only : bool (default is False) + If True, skips the C++ renumbering. Should be True if using a + pylibcugraph algorithm, otherwise should be false. Returns ------- From f6fd431683c761bba57dfb33db3798fb1b8d5978 Mon Sep 17 00:00:00 2001 From: Charles Hastings Date: Mon, 1 Aug 2022 18:08:24 -0700 Subject: [PATCH 38/71] fix non-deterministic bug in uniform neighborhood sampling (bad memory reference) --- .../cugraph/detail/decompress_edge_partition.cuh | 9 ++++----- cpp/src/c_api/uniform_neighbor_sampling.cpp | 14 ++++++++++++++ cpp/src/sampling/detail/sampling_utils_impl.cuh | 2 ++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/cpp/include/cugraph/detail/decompress_edge_partition.cuh b/cpp/include/cugraph/detail/decompress_edge_partition.cuh index cc4445af392..1eb0cfc5fc1 100644 --- a/cpp/include/cugraph/detail/decompress_edge_partition.cuh +++ b/cpp/include/cugraph/detail/decompress_edge_partition.cuh @@ -285,6 +285,7 @@ void partially_decompress_edge_partition_to_fill_edgelist( edge_partition_device_view_t edge_partition, vertex_t const* input_majors, edge_t const* input_major_start_offsets, + vertex_t input_majors_size, std::vector const& segment_offsets, vertex_t* majors, vertex_t* minors, @@ -458,7 +459,7 @@ void partially_decompress_edge_partition_to_fill_edgelist( thrust::for_each( handle.get_thrust_policy(), thrust::make_counting_iterator(vertex_t{0}), - thrust::make_counting_iterator(edge_partition.major_range_size()), + thrust::make_counting_iterator(input_majors_size), [edge_partition, input_majors, input_major_start_offsets, @@ -471,13 +472,11 @@ void partially_decompress_edge_partition_to_fill_edgelist( global_edge_index] __device__(auto idx) { auto major = input_majors[idx]; auto major_offset = input_major_start_offsets[idx]; - auto major_partition_offset = - static_cast(major - edge_partition.major_range_first()); vertex_t const* indices{nullptr}; thrust::optional weights{thrust::nullopt}; edge_t local_degree{}; thrust::tie(indices, weights, local_degree) = - edge_partition.local_edges(major_partition_offset); + edge_partition.local_edges(major); // FIXME: This can lead to thread divergence if local_degree varies significantly // within threads in this warp @@ -497,7 +496,7 @@ void partially_decompress_edge_partition_to_fill_edgelist( major_input_property); } if (global_edge_index) { - auto adjacency_list_offset = thrust::get<0>(*global_edge_index)[major_partition_offset]; + auto adjacency_list_offset = thrust::get<0>(*global_edge_index)[major]; auto minor_map = thrust::get<1>(*global_edge_index); thrust::sequence(thrust::seq, minor_map + major_offset, diff --git a/cpp/src/c_api/uniform_neighbor_sampling.cpp b/cpp/src/c_api/uniform_neighbor_sampling.cpp index ed458eaf1cd..7348f5e3a85 100644 --- a/cpp/src/c_api/uniform_neighbor_sampling.cpp +++ b/cpp/src/c_api/uniform_neighbor_sampling.cpp @@ -165,6 +165,20 @@ extern "C" cugraph_error_code_t cugraph_uniform_neighbor_sample( cugraph_sample_result_t** result, cugraph_error_t** error) { + CAPI_EXPECTS( + reinterpret_cast(graph)->vertex_type_ == + reinterpret_cast(start)->type_, + CUGRAPH_INVALID_INPUT, + "vertex type of graph and start must match", + *error); + + CAPI_EXPECTS( + reinterpret_cast(fan_out)->type_ == + INT32, + CUGRAPH_INVALID_INPUT, + "fan_out should be of type int", + *error); + uniform_neighbor_sampling_functor functor{ handle, graph, start, fan_out, with_replacement, do_expensive_check}; return cugraph::c_api::run_algorithm(graph, functor, result, error); diff --git a/cpp/src/sampling/detail/sampling_utils_impl.cuh b/cpp/src/sampling/detail/sampling_utils_impl.cuh index 8a88b274c94..47c02054466 100644 --- a/cpp/src/sampling/detail/sampling_utils_impl.cuh +++ b/cpp/src/sampling/detail/sampling_utils_impl.cuh @@ -775,6 +775,7 @@ gather_one_hop_edgelist( partition, active_majors.cbegin(), active_majors_out_offsets.cbegin(), + static_cast(active_majors.size()), majors_segments, output_offset + majors.data(), output_offset + minors.data(), @@ -834,6 +835,7 @@ gather_one_hop_edgelist( partition, active_majors.cbegin(), active_majors_out_offsets.cbegin(), + static_cast(active_majors.size()), *majors_segments, majors.data(), minors.data(), From 1aa0e2d6b56b6310bdd3b1f413d4c98ba1387a38 Mon Sep 17 00:00:00 2001 From: Charles Hastings Date: Mon, 1 Aug 2022 18:12:35 -0700 Subject: [PATCH 39/71] fix clang-format issues --- cpp/include/cugraph/detail/decompress_edge_partition.cuh | 3 +-- cpp/src/c_api/uniform_neighbor_sampling.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cpp/include/cugraph/detail/decompress_edge_partition.cuh b/cpp/include/cugraph/detail/decompress_edge_partition.cuh index 1eb0cfc5fc1..aa682b01dfd 100644 --- a/cpp/include/cugraph/detail/decompress_edge_partition.cuh +++ b/cpp/include/cugraph/detail/decompress_edge_partition.cuh @@ -475,8 +475,7 @@ void partially_decompress_edge_partition_to_fill_edgelist( vertex_t const* indices{nullptr}; thrust::optional weights{thrust::nullopt}; edge_t local_degree{}; - thrust::tie(indices, weights, local_degree) = - edge_partition.local_edges(major); + thrust::tie(indices, weights, local_degree) = edge_partition.local_edges(major); // FIXME: This can lead to thread divergence if local_degree varies significantly // within threads in this warp diff --git a/cpp/src/c_api/uniform_neighbor_sampling.cpp b/cpp/src/c_api/uniform_neighbor_sampling.cpp index 7348f5e3a85..6d35dfe2dbc 100644 --- a/cpp/src/c_api/uniform_neighbor_sampling.cpp +++ b/cpp/src/c_api/uniform_neighbor_sampling.cpp @@ -166,15 +166,16 @@ extern "C" cugraph_error_code_t cugraph_uniform_neighbor_sample( cugraph_error_t** error) { CAPI_EXPECTS( - reinterpret_cast(graph)->vertex_type_ == - reinterpret_cast(start)->type_, + reinterpret_cast(graph)->vertex_type_ == + reinterpret_cast(start) + ->type_, CUGRAPH_INVALID_INPUT, "vertex type of graph and start must match", *error); CAPI_EXPECTS( - reinterpret_cast(fan_out)->type_ == - INT32, + reinterpret_cast(fan_out) + ->type_ == INT32, CUGRAPH_INVALID_INPUT, "fan_out should be of type int", *error); From 928dd5f08af6314cb20018c5a21bc9b94b01e746 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Wed, 3 Aug 2022 04:07:59 +0000 Subject: [PATCH 40/71] clean up and add graph sage example notebook --- notebooks/gnn/pyg_graphSAGE_reddit.ipynb | 3549 ++++++++++++++++++++++ 1 file changed, 3549 insertions(+) create mode 100644 notebooks/gnn/pyg_graphSAGE_reddit.ipynb diff --git a/notebooks/gnn/pyg_graphSAGE_reddit.ipynb b/notebooks/gnn/pyg_graphSAGE_reddit.ipynb new file mode 100644 index 00000000000..9a6c5c30f2e --- /dev/null +++ b/notebooks/gnn/pyg_graphSAGE_reddit.ipynb @@ -0,0 +1,3549 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Load Data

" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "import sys\n", + "sys.path += ['/work/pytorch_geometric', '/work/gaas/python']" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "import rmm\n", + "\n", + "rmm.reinitialize(pool_allocator=True,initial_pool_size=5e+9, maximum_pool_size=20e+9)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import cudf\n", + "import cugraph\n", + "from cugraph.experimental import PropertyGraph\n", + "from cugraph.gnn.gaas_extensions import load_reddit\n", + "G = load_reddit(None, '/work/data/reddit')\n", + "G" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "from cugraph.gnn.pyg_extensions import CuGraphData\n", + "cd = CuGraphData(G, reserved_keys=['id','type'])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Training

" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "import torch\n", + "from torch_geometric.data import Data\n", + "\n", + "TRAINING_ARGS = {\n", + " 'batch_size':1000,\n", + " 'fanout':[10,25],\n", + " 'num_epochs':1,\n", + "}\n", + "\n", + "device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')\n", + "\n", + "data = cd.to(device)\n", + "#data = Data(x=cd.x, edge_index = cd.edge_index, y = cd.y) #uncomment to run w/o cugraph" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Create the Data Loader

" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "from torch_geometric.loader import LinkNeighborLoader\n", + "import numpy as np\n", + "\n", + "train_loader = LinkNeighborLoader(\n", + " data,\n", + " num_neighbors=TRAINING_ARGS['fanout'],\n", + " batch_size=TRAINING_ARGS['batch_size'],\n", + " shuffle=True\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "

Define the GraphSAGE Model

" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "import torch\n", + "from torch.nn import LSTM\n", + "import torch.nn as nn\n", + "import torch.nn.functional as F\n", + "\n", + "from torch_geometric.nn import GCNConv as SAGEConv\n", + "\n", + "class SAGE(nn.Module):\n", + " def __init__(self, in_channels, hidden_channels, num_classes, num_layers):\n", + " super().__init__()\n", + " self.num_layers = num_layers\n", + " self.convs = nn.ModuleList()\n", + " for i in range(num_layers):\n", + " in_channels = in_channels if i == 0 else hidden_channels\n", + " out_channels = num_classes if i == num_layers - 1 else hidden_channels\n", + " self.convs.append(SAGEConv(in_channels, out_channels))\n", + "\n", + " def forward(self, x, edge_index):\n", + " for i, conv in enumerate(self.convs):\n", + " x = conv(x, edge_index)\n", + " if i != self.num_layers - 1:\n", + " x = x.relu()\n", + " x = F.dropout(x, p=0.3, training=self.training)\n", + " return F.log_softmax(x, dim=1)\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "41" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import pandas as pd\n", + "num_classes = len(pd.Series(np.array(cd.y, dtype=int)).unique())\n", + "num_classes" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + " 0%| | 0/57308 [00:00 Date: Wed, 3 Aug 2022 04:10:22 +0000 Subject: [PATCH 41/71] remove garbage from notebook --- notebooks/gnn/pyg_graphSAGE_reddit.ipynb | 3297 +--------------------- 1 file changed, 13 insertions(+), 3284 deletions(-) diff --git a/notebooks/gnn/pyg_graphSAGE_reddit.ipynb b/notebooks/gnn/pyg_graphSAGE_reddit.ipynb index 9a6c5c30f2e..4cfc61dc30c 100644 --- a/notebooks/gnn/pyg_graphSAGE_reddit.ipynb +++ b/notebooks/gnn/pyg_graphSAGE_reddit.ipynb @@ -9,7 +9,7 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -19,7 +19,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -30,20 +30,9 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "import cudf\n", "import cugraph\n", @@ -55,7 +44,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -72,7 +61,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -100,7 +89,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -124,7 +113,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -133,7 +122,7 @@ "import torch.nn as nn\n", "import torch.nn.functional as F\n", "\n", - "from torch_geometric.nn import GCNConv as SAGEConv\n", + "from torch_geometric.nn import SAGEConv\n", "\n", "class SAGE(nn.Module):\n", " def __init__(self, in_channels, hidden_channels, num_classes, num_layers):\n", @@ -157,20 +146,9 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "41" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "import pandas as pd\n", "num_classes = len(pd.Series(np.array(cd.y, dtype=int)).unique())\n", @@ -179,2754 +157,9 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - " 0%| | 0/57308 [00:00 Date: Thu, 11 Aug 2022 21:49:25 +0000 Subject: [PATCH 42/71] updates, mg, hetero --- notebooks/gnn/pyg_multi_gpu2.ipynb | 30976 ++++++++++++++++ .../datasets/metadata/karate.yaml | 8 +- .../gaas_extensions/reddit_gaas_extension.py | 23 +- .../cugraph/gnn/pyg_extensions/__init__.py | 2 + .../gnn/pyg_extensions/data/__init__.py | 3 + .../gnn/pyg_extensions/data/cugraph_data.py | 18 +- .../pyg_extensions/data/cugraph_storage.py | 0 .../gnn/pyg_extensions/data/cugraph_store.py | 433 + .../gnn/pyg_extensions/loader/__init__.py | 2 + .../loader/link_neighbor_loader.py | 297 + .../pyg_extensions/loader/neighbor_loader.py | 262 + 11 files changed, 32004 insertions(+), 20 deletions(-) create mode 100644 notebooks/gnn/pyg_multi_gpu2.ipynb delete mode 100644 python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_storage.py create mode 100644 python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py create mode 100644 python/cugraph/cugraph/gnn/pyg_extensions/loader/__init__.py create mode 100644 python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py create mode 100644 python/cugraph/cugraph/gnn/pyg_extensions/loader/neighbor_loader.py diff --git a/notebooks/gnn/pyg_multi_gpu2.ipynb b/notebooks/gnn/pyg_multi_gpu2.ipynb new file mode 100644 index 00000000000..8c120647d4d --- /dev/null +++ b/notebooks/gnn/pyg_multi_gpu2.ipynb @@ -0,0 +1,30976 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import sys\n", + "import rmm\n", + "\n", + "rmm.reinitialize(pool_allocator=True,initial_pool_size=5e+9, maximum_pool_size=20e+9)\n", + "sys.path += ['/work/pytorch_geometric', '/work/gaas/python']" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "import cugraph\n", + "import cudf\n", + "from ogb.nodeproppred import NodePropPredDataset\n", + "\n", + "dataset = NodePropPredDataset(name = 'ogbn-mag') \n", + "\n", + "data = dataset[0]" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "{'author': 0,\n", + " 'field_of_study': 1134649,\n", + " 'institution': 1194614,\n", + " 'paper': 1203354}" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import cudf\n", + "import dask_cudf\n", + "import cugraph\n", + "from cugraph.experimental import MGPropertyGraph\n", + "from cugraph.experimental import PropertyGraph\n", + "pG = PropertyGraph()\n", + "\n", + "vertex_offsets = {}\n", + "last_offset = 0\n", + "\n", + "for node_type, num_nodes in data[0]['num_nodes_dict'].items():\n", + " vertex_offsets[node_type] = last_offset\n", + " last_offset += num_nodes\n", + " \n", + " blank_df = cudf.DataFrame({'id':range(vertex_offsets[node_type], vertex_offsets[node_type] + num_nodes)})\n", + " blank_df.id = blank_df.id.astype('int32')\n", + " if isinstance(pG, MGPropertyGraph):\n", + " blank_df = dask_cudf.from_cudf(blank_df, npartitions=2)\n", + " pG.add_vertex_data(blank_df, vertex_col_name='id', type_name=node_type)\n", + "\n", + "vertex_offsets" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "for i, (node_type, node_features) in enumerate(data[0]['node_feat_dict'].items()):\n", + " vertex_offset = vertex_offsets[node_type]\n", + "\n", + " feature_df = cudf.DataFrame(node_features)\n", + " feature_df.columns = [str(c) for c in range(feature_df.shape[1])]\n", + " feature_df['id'] = range(vertex_offset, vertex_offset + node_features.shape[0])\n", + " feature_df.id = feature_df.id.astype('int32')\n", + " if isinstance(pG, MGPropertyGraph):\n", + " feature_df = dask_cudf.from_cudf(feature_df, npartitions=2)\n", + "\n", + " pG.add_vertex_data(feature_df, vertex_col_name='id', type_name=node_type)" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "author affiliated_with institution\n", + "author writes paper\n", + "paper cites paper\n", + "paper has_topic field_of_study\n" + ] + } + ], + "source": [ + "for i, (edge_key, eidx) in enumerate(data[0]['edge_index_dict'].items()):\n", + " node_type_src, edge_type, node_type_dst = edge_key\n", + " print(node_type_src, edge_type, node_type_dst)\n", + " vertex_offset_src = vertex_offsets[node_type_src]\n", + " vertex_offset_dst = vertex_offsets[node_type_dst]\n", + " eidx = [n + vertex_offset_src for n in eidx[0]], [n + vertex_offset_dst for n in eidx[1]]\n", + "\n", + " edge_df = cudf.DataFrame({'src':eidx[0], 'dst':eidx[1]})\n", + " edge_df.src = edge_df.src.astype('int32')\n", + " edge_df.dst = edge_df.dst.astype('int32')\n", + " edge_df['type'] = edge_type\n", + " if isinstance(pG, MGPropertyGraph):\n", + " edge_df = dask_cudf.from_cudf(edge_df, npartitions=2)\n", + "\n", + " pG.add_edge_data(edge_df, vertex_col_names=['src','dst'], type_name=edge_type)\n", + " pG.add_edge_data(edge_df, vertex_col_names=['dst','src'], type_name=f'{edge_type}_bw')" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "y_df = cudf.DataFrame(data[1]['paper'], columns=['y'])\n", + "y_df['id'] = range(vertex_offsets['paper'], vertex_offsets['paper'] + len(y_df))\n", + "y_df.id = y_df.id.astype('int32')\n", + "if isinstance(pG, MGPropertyGraph):\n", + " y_df = dask_cudf.from_cudf(y_df, npartitions=2)\n", + "\n", + "pG.add_vertex_data(y_df, vertex_col_name='id', type_name='paper')" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [], + "source": [ + "from cugraph.gnn.pyg_extensions.data.cugraph_store import to_pyg\n", + "\n", + "feature_store, graph_store = to_pyg(pG)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "from torch_geometric.loader import LinkNeighborLoader\n", + "from cugraph.gnn.pyg_extensions import CuGraphLinkNeighborLoader\n", + "loader = CuGraphLinkNeighborLoader(\n", + " data=(feature_store, graph_store),\n", + " edge_label_index='writes',\n", + " shuffle=True,\n", + " num_neighbors=[10,25],\n", + " batch_size=50,\n", + ")\n", + "\n", + "test_loader = CuGraphLinkNeighborLoader(\n", + " data=(feature_store, graph_store),\n", + " edge_label_index='writes',\n", + " shuffle=True,\n", + " num_neighbors=[10,25],\n", + " batch_size=50,\n", + ")\n" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[('author', 'affiliated_with', 'institution'),\n", + " ('paper', 'cites_bw', 'paper'),\n", + " ('institution', 'affiliated_with_bw', 'author'),\n", + " ('paper', 'has_topic', 'field_of_study'),\n", + " ('field_of_study', 'has_topic_bw', 'paper'),\n", + " ('paper', 'writes_bw', 'author'),\n", + " ('paper', 'cites', 'paper'),\n", + " ('author', 'writes', 'paper')]" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "edge_types = [attr.edge_type for attr in graph_store.get_all_edge_attrs()]\n", + "edge_types" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "349" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "num_classes = pG.get_vertex_data(columns=['y'])['y'].max() + 1\n", + "if isinstance(pG, MGPropertyGraph):\n", + " num_classes = num_classes.compute()\n", + "num_classes" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
_VERTEX__TYPE_01234567...119120121122123124125126127y
19371181939695paper-0.179181-0.052097-0.377248-0.077404-0.029473-0.009189-0.310679-0.458934...-0.265351-0.3386740.0182070.197812-0.1587860.0241970.324385-0.207437-0.17253635
\n", + "

1 rows × 131 columns

\n", + "
" + ], + "text/plain": [ + " _VERTEX_ _TYPE_ 0 1 2 3 4 \\\n", + "1937118 1939695 paper -0.179181 -0.052097 -0.377248 -0.077404 -0.029473 \n", + "\n", + " 5 6 7 ... 119 120 121 \\\n", + "1937118 -0.009189 -0.310679 -0.458934 ... -0.265351 -0.338674 0.018207 \n", + "\n", + " 122 123 124 125 126 127 y \n", + "1937118 0.197812 -0.158786 0.024197 0.324385 -0.207437 -0.172536 35 \n", + "\n", + "[1 rows x 131 columns]" + ] + }, + "execution_count": 12, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "pG._vertex_prop_dataframe[pG._vertex_prop_dataframe._VERTEX_==1939695]" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.020461\n", + "sampling 0.019958\n", + "noi time: 0.002007\n", + "get_vertex_data call: 0.070973\n", + "noi group time: 0.00405\n", + "eoi_group_time: 0.016979\n", + "second half: 0.25943\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 16823, 31145, ..., 1130635, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 16823, 31145, ..., 1130635, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210831, 1209795, 1209807, ..., 1937004, 1936996, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210831, 1209795, 1209807, ..., 1937004, 1936996, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1137435, 1135061, 1137204, 1137212, 1141424, 1140285, 1135926,\n", + " 1135160, 1137784, 1140799, 1141758, 1138335, 1142327, 1136969, 1139811,\n", + " 1137937, 1145999, 1139143, 1143372, 1146640, 1146644, 1140783, 1148977,\n", + " 1139866, 1149216, 1155686, 1155689, 1149633, 1149646, 1147473, 1147487,\n", + " 1149283, 1142881, 1153938, 1144632, 1148346, 1146661, 1152665, 1152664,\n", + " 1138347, 1153220, 1139371, 1147211, 1136683, 1150330, 1152427, 1136256,\n", + " 1146376, 1138745, 1140308, 1140537, 1140542, 1138112, 1137254, 1137182,\n", + " 1140151, 1134729, 1140953, 1135367, 1135202, 1135903, 1137804, 1141036,\n", + " 1136770, 1134794, 1157443, 1135953, 1143377, 1138504, 1137342, 1143068,\n", + " 1157088, 1137693, 1137687, 1136619, 1144786, 1144791, 1144390, 1144395,\n", + " 1136826, 1137532, 1135423, 1157393, 1136581, 1137441, 1143320, 1136941,\n", + " 1135265, 1135268, 1156149, 1156159, 1139161, 1135583, 1135828, 1138514,\n", + " 1153099, 1158136, 1145127, 1137019, 1156899, 1137287, 1138436, 1138440,\n", + " 1138461, 1157186, 1136594, 1158386, 1149331, 1138834, 1156606, 1147112,\n", + " 1142611, 1135352, 1135624, 1158987, 1145842, 1148531, 1150948, 1137109,\n", + " 1139667, 1139664, 1138069, 1136081, 1136087, 1134992, 1142434, 1139754,\n", + " 1158974, 1159019, 1141065, 1153537, 1143631, 1139084, 1136065, 1138148,\n", + " 1138151, 1141963, 1146075, 1140557, 1152042, 1152044, 1142299, 1137728,\n", + " 1147317, 1134922, 1134750, 1141088, 1144134, 1149001, 1139889, 1141979,\n", + " 1142021, 1154855, 1139025, 1161971, 1141695, 1136426, 1136625, 1140467,\n", + " 1141111, 1139386, 1136917, 1143677, 1143676, 1137190, 1144237, 1140598,\n", + " 1144650, 1134979, 1136862, 1147850, 1138482, 1142056, 1143153, 1142093,\n", + " 1158749, 1149114, 1138708, 1140102, 1140110, 1142913, 1138424, 1143113,\n", + " 1143114, 1144596, 1136864, 1145298, 1145302, 1135315, 1140442, 1139560,\n", + " 1137854, 1147153, 1136378, 1136371, 1142641, 1142646, 1141365, 1153068,\n", + " 1149090, 1149097, 1139022, 1138292, 1138293, 1144279, 1139508, 1139510,\n", + " 1138815, 1139127, 1144992, 1140616, 1140990, 1146695, 1135040, 1147050,\n", + " 1145885, 1145873, 1143543, 1152980, 1141925, 1141841, 1137149, 1143643,\n", + " 1145974, 1143851, 1146024, 1154328, 1141642, 1149928, 1139990, 1146296,\n", + " 1146302, 1143293, 1143283, 1143294, 1147543, 1147540, 1148763, 1147282,\n", + " 1147293, 1142816, 1143656, 1142637, 1139408, 1148003, 1136167, 1138927,\n", + " 1136836, 1146105, 1139329, 1139341, 1141490, 1136445, 1143345, 1144611,\n", + " 1144615, 1145808, 1145816, 1140844, 1144088, 1135876, 1150755, 1150294,\n", + " 1146514, 1146523, 1143460, 1143470, 1143457, 1137697, 1144291, 1144303,\n", + " 1140483, 1140829, 1146578, 1147574, 1155700, 1155709, 1146636, 1147521,\n", + " 1147530, 1140364, 1143080, 1168914, 1168921, 1144219, 1144222, 1147999,\n", + " 1139252, 1139249, 1148704, 1148715, 1148719, 1143310, 1150996, 1142700,\n", + " 1149722, 1147032, 1158226, 1158230, 1158235, 1151644, 1145240, 1145750,\n", + " 1145751, 1142377, 1142369, 1138632, 1148391, 1146178, 1148214, 1152530,\n", + " 1152531, 1152537, 1151182, 1150438, 1150445, 1148940, 1148819, 1155006,\n", + " 1151870, 1149791, 1144514, 1144526, 1144523, 1145833, 1150342, 1165253,\n", + " 1151482, 1152023, 1152024, 1152026, 1145255, 1145262, 1139914, 1140566,\n", + " 1150112, 1147019, 1147021, 1141187, 1150745, 1141267, 1141266, 1144825,\n", + " 1148744, 1153574, 1153580, 1147653, 1143560, 1143564, 1168504, 1149412,\n", + " 1148288, 1152073, 1135087, 1148623, 1148608, 1139090, 1154420, 1151363,\n", + " 1146686, 1138404, 1148720, 1171341, 1146547, 1146549, 1149812, 1148204,\n", + " 1154168, 1153192, 1153188, 1150935, 1143092, 1144863, 1150352, 1143129,\n", + " 1143134, 1141017, 1147442, 1151816, 1151913, 1160687, 1148498, 1148505,\n", + " 1141420, 1141419, 1150637, 1151352, 1146975, 1146974, 1156402, 1146623,\n", + " 1164774, 1144472, 1156320, 1153032, 1153038, 1150085, 1137746, 1137759,\n", + " 1140521, 1136401, 1136410, 1149203, 1157107, 1157115, 1152753, 1152826,\n", + " 1155337, 1154123, 1155356, 1152673, 1154633, 1151573, 1164756, 1151617,\n", + " 1151622, 1150579, 1136134, 1136798, 1152944, 1152946, 1152952, 1140451,\n", + " 1153387, 1138990, 1151311, 1152341, 1156830, 1153311, 1138279, 1138281,\n", + " 1136028, 1136031, 1136029, 1158704, 1156621, 1140687, 1152928, 1154733,\n", + " 1142777, 1150150, 1150159, 1150168, 1150164, 1149273, 1144016, 1148033,\n", + " 1148040, 1152603, 1145652, 1149792, 1137048, 1168183, 1148628, 1137458,\n", + " 1135698, 1178122, 1157466, 1142387, 1150872, 1156500, 1157064, 1145191,\n", + " 1145196, 1137811, 1137819, 1150465, 1146854, 1149045, 1135730, 1135740,\n", + " 1152183, 1152182, 1156638, 1165703, 1156942, 1135645, 1147810, 1147818,\n", + " 1157779, 1158308, 1158311, 1155441, 1162120, 1156207, 1138777, 1151379,\n", + " 1155366, 1152527, 1153479, 1155755, 1151424, 1135396, 1146924, 1145806,\n", + " 1145793, 1155628, 1155631, 1155572, 1136466, 1158823, 1158824, 1158829,\n", + " 1153715, 1157000, 1148836, 1148838, 1148647, 1143254, 1143263, 1154250,\n", + " 1151317, 1154902, 1143189, 1143526, 1150371, 1153326, 1155606, 1155613,\n", + " 1150981, 1150983, 1150984, 1150987, 1155293, 1137167, 1157650, 1158126,\n", + " 1137381, 1159116, 1138268, 1145690, 1145681, 1140916, 1140918, 1140919,\n", + " 1140913, 1134677, 1135601, 1163894, 1155848, 1157685, 1146321, 1149145,\n", + " 1144463, 1152209, 1152220, 1140380, 1140381, 1156016, 1159130, 1144843,\n", + " 1155975, 1161670, 1155403, 1154600, 1154605, 1136899, 1136896, 1158760,\n", + " 1158764, 1158882, 1158886, 1158891, 1140213, 1157304, 1159155, 1158806,\n", + " 1158815, 1158278, 1164188, 1161625, 1156665, 1156657, 1147599, 1155304,\n", + " 1156488, 1153808, 1136640, 1134757, 1158558, 1153827, 1156516, 1146126,\n", + " 1155856, 1158007, 1161539, 1169888, 1164276, 1142666, 1150674, 1159042,\n", + " 1159052, 1159057, 1157944, 1153052, 1153045, 1144156, 1153842, 1138393,\n", + " 1149063, 1154299, 1154300, 1153514, 1153519, 1147300, 1142405, 1146870,\n", + " 1161652, 1138161, 1156787, 1149956, 1146063, 1146356, 1162308, 1165309,\n", + " 1158866, 1140641, 1140643, 1141862, 1148600, 1143139, 1159646, 1156361,\n", + " 1185124, 1141800, 1141802, 1158653, 1158655, 1156187, 1156181, 1159025,\n", + " 1159029, 1159032, 1168096, 1152247, 1160470, 1155588, 1159551, 1138674,\n", + " 1153924, 1144977, 1146500, 1153232, 1153247, 1164580, 1161240, 1144739,\n", + " 1152776, 1163527, 1145139, 1141471, 1141459, 1151650, 1147426, 1147427,\n", + " 1179979, 1156739, 1157955, 1153663, 1144812, 1177077, 1162088, 1135567,\n", + " 1164741, 1142722, 1156293, 1156300, 1156303, 1145732, 1145229, 1146042,\n", + " 1155320, 1142136, 1139351, 1145902, 1153520, 1151752, 1152203, 1143395,\n", + " 1143404, 1171227, 1158724, 1166670, 1154076, 1147331, 1147339, 1147338,\n", + " 1170766, 1192410, 1179488, 1167817, 1167821, 1171785, 1155172, 1144336,\n", + " 1157534, 1138383, 1147746, 1154670, 1154882, 1169162, 1157331, 1151664,\n", + " 1151669, 1151674, 1169359, 1154353, 1154364, 1154354, 1146344, 1138609,\n", + " 1149688, 1158611, 1158623, 1147423, 1152353, 1168380, 1143170, 1168451,\n", + " 1168400, 1168049, 1149402, 1148667, 1148324, 1177990, 1171560, 1173307,\n", + " 1145028, 1160934, 1154027, 1152150, 1152152, 1153754, 1169583, 1157158,\n", + " 1157153, 1155461, 1157373, 1167232, 1147708, 1147711, 1157592, 1169687,\n", + " 1160990, 1146755, 1170016, 1170874, 1154148, 1154150, 1149173, 1181608,\n", + " 1168481, 1143410, 1143420, 1166299, 1177656, 1181241, 1153803, 1170520,\n", + " 1153141, 1178466, 1153619, 1180921, 1175567, 1155253, 1155262, 1157792,\n", + " 1172033, 1172548, 1171623, 1164032, 1163225, 1185582, 1183118, 1153890,\n", + " 1153898, 1188790, 1164564, 1164203, 1162403, 1145626, 1156443, 1154840,\n", + " 1178025, 1180383, 1157474, 1161911, 1149753, 1149755, 1146252, 1153609,\n", + " 1157761, 1158779, 1158940, 1167636, 1158370, 1155892, 1155899, 1189597,\n", + " 1160402, 1178696, 1168273, 1182330, 1168886, 1165474, 1185422, 1164231,\n", + " 1166442, 1184277, 1165082, 1170341, 1170342, 1147182, 1156162, 1178246,\n", + " 1159524, 1162757, 1167668, 1167670, 1191540, 1181475, 1156528, 1156532,\n", + " 1139828, 1139831, 1150265, 1154812, 1164927, 1187899, 1156055, 1151977,\n", + " 1146394, 1190668, 1156838, 1169964, 1190246, 1153733, 1152124, 1191604,\n", + " 1169707, 1178637, 1194303, 1171201, 1179317, 1172429, 1158064, 1145392,\n", + " 1180528, 1155959, 1155962, 1193401, 1187846, 1176833, 1187547, 1188738,\n", + " 1191877], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1137435, 1135061, 1137204, 1137212, 1141424, 1140285, 1135926,\n", + " 1135160, 1137784, 1140799, 1141758, 1138335, 1142327, 1136969, 1139811,\n", + " 1137937, 1145999, 1139143, 1143372, 1146640, 1146644, 1140783, 1148977,\n", + " 1139866, 1149216, 1155686, 1155689, 1149633, 1149646, 1147473, 1147487,\n", + " 1149283, 1142881, 1153938, 1144632, 1148346, 1146661, 1152665, 1152664,\n", + " 1138347, 1153220, 1139371, 1147211, 1136683, 1150330, 1152427, 1136256,\n", + " 1146376, 1138745, 1140308, 1140537, 1140542, 1138112, 1137254, 1137182,\n", + " 1140151, 1134729, 1140953, 1135367, 1135202, 1135903, 1137804, 1141036,\n", + " 1136770, 1134794, 1157443, 1135953, 1143377, 1138504, 1137342, 1143068,\n", + " 1157088, 1137693, 1137687, 1136619, 1144786, 1144791, 1144390, 1144395,\n", + " 1136826, 1137532, 1135423, 1157393, 1136581, 1137441, 1143320, 1136941,\n", + " 1135265, 1135268, 1156149, 1156159, 1139161, 1135583, 1135828, 1138514,\n", + " 1153099, 1158136, 1145127, 1137019, 1156899, 1137287, 1138436, 1138440,\n", + " 1138461, 1157186, 1136594, 1158386, 1149331, 1138834, 1156606, 1147112,\n", + " 1142611, 1135352, 1135624, 1158987, 1145842, 1148531, 1150948, 1137109,\n", + " 1139667, 1139664, 1138069, 1136081, 1136087, 1134992, 1142434, 1139754,\n", + " 1158974, 1159019, 1141065, 1153537, 1143631, 1139084, 1136065, 1138148,\n", + " 1138151, 1141963, 1146075, 1140557, 1152042, 1152044, 1142299, 1137728,\n", + " 1147317, 1134922, 1134750, 1141088, 1144134, 1149001, 1139889, 1141979,\n", + " 1142021, 1154855, 1139025, 1161971, 1141695, 1136426, 1136625, 1140467,\n", + " 1141111, 1139386, 1136917, 1143677, 1143676, 1137190, 1144237, 1140598,\n", + " 1144650, 1134979, 1136862, 1147850, 1138482, 1142056, 1143153, 1142093,\n", + " 1158749, 1149114, 1138708, 1140102, 1140110, 1142913, 1138424, 1143113,\n", + " 1143114, 1144596, 1136864, 1145298, 1145302, 1135315, 1140442, 1139560,\n", + " 1137854, 1147153, 1136378, 1136371, 1142641, 1142646, 1141365, 1153068,\n", + " 1149090, 1149097, 1139022, 1138292, 1138293, 1144279, 1139508, 1139510,\n", + " 1138815, 1139127, 1144992, 1140616, 1140990, 1146695, 1135040, 1147050,\n", + " 1145885, 1145873, 1143543, 1152980, 1141925, 1141841, 1137149, 1143643,\n", + " 1145974, 1143851, 1146024, 1154328, 1141642, 1149928, 1139990, 1146296,\n", + " 1146302, 1143293, 1143283, 1143294, 1147543, 1147540, 1148763, 1147282,\n", + " 1147293, 1142816, 1143656, 1142637, 1139408, 1148003, 1136167, 1138927,\n", + " 1136836, 1146105, 1139329, 1139341, 1141490, 1136445, 1143345, 1144611,\n", + " 1144615, 1145808, 1145816, 1140844, 1144088, 1135876, 1150755, 1150294,\n", + " 1146514, 1146523, 1143460, 1143470, 1143457, 1137697, 1144291, 1144303,\n", + " 1140483, 1140829, 1146578, 1147574, 1155700, 1155709, 1146636, 1147521,\n", + " 1147530, 1140364, 1143080, 1168914, 1168921, 1144219, 1144222, 1147999,\n", + " 1139252, 1139249, 1148704, 1148715, 1148719, 1143310, 1150996, 1142700,\n", + " 1149722, 1147032, 1158226, 1158230, 1158235, 1151644, 1145240, 1145750,\n", + " 1145751, 1142377, 1142369, 1138632, 1148391, 1146178, 1148214, 1152530,\n", + " 1152531, 1152537, 1151182, 1150438, 1150445, 1148940, 1148819, 1155006,\n", + " 1151870, 1149791, 1144514, 1144526, 1144523, 1145833, 1150342, 1165253,\n", + " 1151482, 1152023, 1152024, 1152026, 1145255, 1145262, 1139914, 1140566,\n", + " 1150112, 1147019, 1147021, 1141187, 1150745, 1141267, 1141266, 1144825,\n", + " 1148744, 1153574, 1153580, 1147653, 1143560, 1143564, 1168504, 1149412,\n", + " 1148288, 1152073, 1135087, 1148623, 1148608, 1139090, 1154420, 1151363,\n", + " 1146686, 1138404, 1148720, 1171341, 1146547, 1146549, 1149812, 1148204,\n", + " 1154168, 1153192, 1153188, 1150935, 1143092, 1144863, 1150352, 1143129,\n", + " 1143134, 1141017, 1147442, 1151816, 1151913, 1160687, 1148498, 1148505,\n", + " 1141420, 1141419, 1150637, 1151352, 1146975, 1146974, 1156402, 1146623,\n", + " 1164774, 1144472, 1156320, 1153032, 1153038, 1150085, 1137746, 1137759,\n", + " 1140521, 1136401, 1136410, 1149203, 1157107, 1157115, 1152753, 1152826,\n", + " 1155337, 1154123, 1155356, 1152673, 1154633, 1151573, 1164756, 1151617,\n", + " 1151622, 1150579, 1136134, 1136798, 1152944, 1152946, 1152952, 1140451,\n", + " 1153387, 1138990, 1151311, 1152341, 1156830, 1153311, 1138279, 1138281,\n", + " 1136028, 1136031, 1136029, 1158704, 1156621, 1140687, 1152928, 1154733,\n", + " 1142777, 1150150, 1150159, 1150168, 1150164, 1149273, 1144016, 1148033,\n", + " 1148040, 1152603, 1145652, 1149792, 1137048, 1168183, 1148628, 1137458,\n", + " 1135698, 1178122, 1157466, 1142387, 1150872, 1156500, 1157064, 1145191,\n", + " 1145196, 1137811, 1137819, 1150465, 1146854, 1149045, 1135730, 1135740,\n", + " 1152183, 1152182, 1156638, 1165703, 1156942, 1135645, 1147810, 1147818,\n", + " 1157779, 1158308, 1158311, 1155441, 1162120, 1156207, 1138777, 1151379,\n", + " 1155366, 1152527, 1153479, 1155755, 1151424, 1135396, 1146924, 1145806,\n", + " 1145793, 1155628, 1155631, 1155572, 1136466, 1158823, 1158824, 1158829,\n", + " 1153715, 1157000, 1148836, 1148838, 1148647, 1143254, 1143263, 1154250,\n", + " 1151317, 1154902, 1143189, 1143526, 1150371, 1153326, 1155606, 1155613,\n", + " 1150981, 1150983, 1150984, 1150987, 1155293, 1137167, 1157650, 1158126,\n", + " 1137381, 1159116, 1138268, 1145690, 1145681, 1140916, 1140918, 1140919,\n", + " 1140913, 1134677, 1135601, 1163894, 1155848, 1157685, 1146321, 1149145,\n", + " 1144463, 1152209, 1152220, 1140380, 1140381, 1156016, 1159130, 1144843,\n", + " 1155975, 1161670, 1155403, 1154600, 1154605, 1136899, 1136896, 1158760,\n", + " 1158764, 1158882, 1158886, 1158891, 1140213, 1157304, 1159155, 1158806,\n", + " 1158815, 1158278, 1164188, 1161625, 1156665, 1156657, 1147599, 1155304,\n", + " 1156488, 1153808, 1136640, 1134757, 1158558, 1153827, 1156516, 1146126,\n", + " 1155856, 1158007, 1161539, 1169888, 1164276, 1142666, 1150674, 1159042,\n", + " 1159052, 1159057, 1157944, 1153052, 1153045, 1144156, 1153842, 1138393,\n", + " 1149063, 1154299, 1154300, 1153514, 1153519, 1147300, 1142405, 1146870,\n", + " 1161652, 1138161, 1156787, 1149956, 1146063, 1146356, 1162308, 1165309,\n", + " 1158866, 1140641, 1140643, 1141862, 1148600, 1143139, 1159646, 1156361,\n", + " 1185124, 1141800, 1141802, 1158653, 1158655, 1156187, 1156181, 1159025,\n", + " 1159029, 1159032, 1168096, 1152247, 1160470, 1155588, 1159551, 1138674,\n", + " 1153924, 1144977, 1146500, 1153232, 1153247, 1164580, 1161240, 1144739,\n", + " 1152776, 1163527, 1145139, 1141471, 1141459, 1151650, 1147426, 1147427,\n", + " 1179979, 1156739, 1157955, 1153663, 1144812, 1177077, 1162088, 1135567,\n", + " 1164741, 1142722, 1156293, 1156300, 1156303, 1145732, 1145229, 1146042,\n", + " 1155320, 1142136, 1139351, 1145902, 1153520, 1151752, 1152203, 1143395,\n", + " 1143404, 1171227, 1158724, 1166670, 1154076, 1147331, 1147339, 1147338,\n", + " 1170766, 1192410, 1179488, 1167817, 1167821, 1171785, 1155172, 1144336,\n", + " 1157534, 1138383, 1147746, 1154670, 1154882, 1169162, 1157331, 1151664,\n", + " 1151669, 1151674, 1169359, 1154353, 1154364, 1154354, 1146344, 1138609,\n", + " 1149688, 1158611, 1158623, 1147423, 1152353, 1168380, 1143170, 1168451,\n", + " 1168400, 1168049, 1149402, 1148667, 1148324, 1177990, 1171560, 1173307,\n", + " 1145028, 1160934, 1154027, 1152150, 1152152, 1153754, 1169583, 1157158,\n", + " 1157153, 1155461, 1157373, 1167232, 1147708, 1147711, 1157592, 1169687,\n", + " 1160990, 1146755, 1170016, 1170874, 1154148, 1154150, 1149173, 1181608,\n", + " 1168481, 1143410, 1143420, 1166299, 1177656, 1181241, 1153803, 1170520,\n", + " 1153141, 1178466, 1153619, 1180921, 1175567, 1155253, 1155262, 1157792,\n", + " 1172033, 1172548, 1171623, 1164032, 1163225, 1185582, 1183118, 1153890,\n", + " 1153898, 1188790, 1164564, 1164203, 1162403, 1145626, 1156443, 1154840,\n", + " 1178025, 1180383, 1157474, 1161911, 1149753, 1149755, 1146252, 1153609,\n", + " 1157761, 1158779, 1158940, 1167636, 1158370, 1155892, 1155899, 1189597,\n", + " 1160402, 1178696, 1168273, 1182330, 1168886, 1165474, 1185422, 1164231,\n", + " 1166442, 1184277, 1165082, 1170341, 1170342, 1147182, 1156162, 1178246,\n", + " 1159524, 1162757, 1167668, 1167670, 1191540, 1181475, 1156528, 1156532,\n", + " 1139828, 1139831, 1150265, 1154812, 1164927, 1187899, 1156055, 1151977,\n", + " 1146394, 1190668, 1156838, 1169964, 1190246, 1153733, 1152124, 1191604,\n", + " 1169707, 1178637, 1194303, 1171201, 1179317, 1172429, 1158064, 1145392,\n", + " 1180528, 1155959, 1155962, 1193401, 1187846, 1176833, 1187547, 1188738,\n", + " 1191877], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195442, 1197717, 1198730, 1199282, 1199292, 1198459, 1202255, 1198840,\n", + " 1201581, 1194626, 1197777, 1201016, 1201660, 1197351, 1197359, 1198624,\n", + " 1202804, 1197383, 1194866, 1194743, 1194780, 1194783, 1196631, 1196591,\n", + " 1195507, 1195263, 1197921, 1201992, 1198543, 1199519, 1194952, 1195888,\n", + " 1195740, 1196359, 1198106, 1194754, 1195313, 1195130, 1195571, 1198958,\n", + " 1198647, 1195143, 1195270, 1197141, 1197140, 1197273, 1196109, 1195852,\n", + " 1195659, 1197248, 1197186, 1196283, 1195353, 1198282, 1199060, 1199059,\n", + " 1197291, 1202747, 1196851, 1194928, 1199628, 1197676, 1200075, 1200403,\n", + " 1198407, 1195017, 1199676, 1200048, 1200060, 1199948, 1201511, 1202582,\n", + " 1199014, 1197970, 1197601, 1196727, 1195771, 1202618, 1200887, 1203239,\n", + " 1198416, 1198428, 1200596, 1198811, 1201824, 1201169, 1200169, 1198593,\n", + " 1196477, 1201075, 1201156, 1200991, 1201056, 1201405, 1194803, 1199539,\n", + " 1202640, 1202144, 1202508, 1201740, 1200553, 1200558, 1203071, 1197097,\n", + " 1203183, 1196889, 1199908, 1202239, 1202937, 1200899, 1202170, 1202669,\n", + " 1201291, 1197561, 1202889, 1198562, 1195048, 1202545, 1196827, 1195664,\n", + " 1202870, 1202432, 1200445, 1198929, 1198932, 1195421, 1197816, 1197822,\n", + " 1199778, 1200967, 1196605, 1201970, 1200585, 1203102, 1201143, 1194728,\n", + " 1199403, 1198824, 1197593, 1195066, 1195298, 1200301, 1195082, 1202323,\n", + " 1199007], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195442, 1197717, 1198730, 1199282, 1199292, 1198459, 1202255, 1198840,\n", + " 1201581, 1194626, 1197777, 1201016, 1201660, 1197351, 1197359, 1198624,\n", + " 1202804, 1197383, 1194866, 1194743, 1194780, 1194783, 1196631, 1196591,\n", + " 1195507, 1195263, 1197921, 1201992, 1198543, 1199519, 1194952, 1195888,\n", + " 1195740, 1196359, 1198106, 1194754, 1195313, 1195130, 1195571, 1198958,\n", + " 1198647, 1195143, 1195270, 1197141, 1197140, 1197273, 1196109, 1195852,\n", + " 1195659, 1197248, 1197186, 1196283, 1195353, 1198282, 1199060, 1199059,\n", + " 1197291, 1202747, 1196851, 1194928, 1199628, 1197676, 1200075, 1200403,\n", + " 1198407, 1195017, 1199676, 1200048, 1200060, 1199948, 1201511, 1202582,\n", + " 1199014, 1197970, 1197601, 1196727, 1195771, 1202618, 1200887, 1203239,\n", + " 1198416, 1198428, 1200596, 1198811, 1201824, 1201169, 1200169, 1198593,\n", + " 1196477, 1201075, 1201156, 1200991, 1201056, 1201405, 1194803, 1199539,\n", + " 1202640, 1202144, 1202508, 1201740, 1200553, 1200558, 1203071, 1197097,\n", + " 1203183, 1196889, 1199908, 1202239, 1202937, 1200899, 1202170, 1202669,\n", + " 1201291, 1197561, 1202889, 1198562, 1195048, 1202545, 1196827, 1195664,\n", + " 1202870, 1202432, 1200445, 1198929, 1198932, 1195421, 1197816, 1197822,\n", + " 1199778, 1200967, 1196605, 1201970, 1200585, 1203102, 1201143, 1194728,\n", + " 1199403, 1198824, 1197593, 1195066, 1195298, 1200301, 1195082, 1202323,\n", + " 1199007], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.7431e-02, -4.5182e-04, -7.1012e-04, ..., 5.5480e-02,\n", + " -2.9852e-04, -9.5734e-04],\n", + " [ 3.1083e-02, -5.1622e-04, -5.4608e-04, ..., 2.9270e-02,\n", + " -6.0375e-04, -5.2297e-04],\n", + " [ 5.1445e-03, -7.1320e-04, -1.5664e-04, ..., 4.3095e-02,\n", + " -7.1094e-04, -1.0171e-03],\n", + " ...,\n", + " [-2.4940e-04, -4.4784e-04, -1.4353e-05, ..., 3.2675e-02,\n", + " -9.6665e-04, -1.1089e-03],\n", + " [-5.1486e-05, -6.5495e-04, -4.2983e-05, ..., 6.7964e-02,\n", + " -3.4781e-04, -6.9628e-04],\n", + " [-3.4740e-04, -5.2016e-04, -5.0772e-05, ..., 6.5354e-02,\n", + " -2.3363e-04, -8.1344e-04]], device='cuda:0'), 'paper': tensor([[ 2.2871e-01, 5.1640e-01, -1.4549e-04, ..., -8.4123e-03,\n", + " -8.6248e-03, -1.5690e-03],\n", + " [ 2.3817e-02, 5.7933e-01, 2.0933e-01, ..., -6.9752e-03,\n", + " -6.5416e-03, -2.2890e-03],\n", + " [-2.2360e-03, 5.3797e-01, 2.0712e-01, ..., -7.5770e-03,\n", + " -8.4878e-03, -1.2718e-03],\n", + " ...,\n", + " [-5.6958e-04, 2.9594e-01, 3.6816e-01, ..., -7.4491e-03,\n", + " -7.8553e-03, -1.7304e-03],\n", + " [ 1.9831e-01, 7.5484e-02, 4.7227e-01, ..., -5.6610e-03,\n", + " -6.9593e-03, -1.3683e-03],\n", + " [ 3.5985e-02, 4.6099e-01, 1.4834e-01, ..., -4.9104e-03,\n", + " -4.2297e-03, -3.9683e-03]], device='cuda:0'), 'author': tensor([[ 9.7880e-02, -1.4598e-03, 1.4972e-01, ..., 2.4732e-01,\n", + " 2.6305e-02, -6.6921e-04],\n", + " [ 1.0829e-01, -9.8513e-04, 1.5266e-01, ..., 2.1159e-01,\n", + " 5.4805e-03, -3.9735e-04],\n", + " [ 8.9126e-02, -9.1099e-04, 5.3315e-02, ..., 2.3446e-01,\n", + " 6.1036e-02, -6.2949e-04],\n", + " ...,\n", + " [ 2.0879e-01, -1.3630e-03, 2.2950e-01, ..., 2.9158e-01,\n", + " -1.6125e-04, 6.7726e-02],\n", + " [ 8.5093e-02, -7.6771e-04, 8.4680e-02, ..., 2.1450e-01,\n", + " 7.0723e-02, -7.8829e-04],\n", + " [ 1.1475e-01, -8.5111e-04, 7.8376e-02, ..., 2.3301e-01,\n", + " 9.1721e-02, -4.8785e-04]], device='cuda:0'), 'field_of_study': tensor([[-3.7482e-04, -5.4988e-05, 2.0065e-01, ..., -7.3602e-04,\n", + " -1.9279e-03, -1.3838e-03],\n", + " [ 1.5298e-01, -8.9608e-04, 1.6817e-01, ..., -1.6158e-03,\n", + " -8.5545e-04, -1.2718e-03],\n", + " [ 1.1732e-01, 5.5552e-02, 2.0643e-01, ..., -1.5016e-03,\n", + " -6.7786e-04, -2.1718e-03],\n", + " ...,\n", + " [ 1.5516e-01, -3.1527e-04, 2.7135e-01, ..., -1.8977e-03,\n", + " -3.6342e-04, -1.4042e-03],\n", + " [-2.0252e-03, 3.9023e-02, 1.6524e-01, ..., -6.3102e-04,\n", + " 9.6026e-02, -1.4801e-05],\n", + " [ 1.3747e-01, -8.4025e-04, 2.1932e-01, ..., -1.1312e-03,\n", + " 5.7330e-03, -2.2624e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 8, 94, 168, 54, 184, 146, 72, 94, 94, 169, 88, 142,\n", + " 109, 109, 392, 50, 511, 260, 295, 379, 271, 341, 344, 657,\n", + " 657, 959, 374, 826, 606, 606, 825, 825, 759, 759, 1206, 1206,\n", + " 982, 982, 899, 1068, 1082, 1082, 1082, 1108, 1108, 1366, 1585, 1585,\n", + " 1190, 1382, 1468, 1468, 1468, 1479, 1502, 1502, 1502, 1645, 1784, 1698,\n", + " 1698, 1709, 1709, 1850, 1656, 1741, 1741, 1729, 1729, 1709, 1709, 1865,\n", + " 1910, 1935, 1842, 1966, 1954, 2078, 2142, 1945, 1962, 1962, 1962, 1962,\n", + " 1966, 2008, 2008, 2141, 2059, 2212, 2023, 2145, 2177, 2263, 2051, 2255,\n", + " 2255, 2255, 2362, 2372, 2390, 2310, 2444, 2533, 2477, 2533, 2424, 2455,\n", + " 2518, 2547, 2794, 2474, 2474, 2474, 2474, 2474, 2692, 2601, 2593, 2593,\n", + " 2842, 2842, 2650, 2729, 2927, 3095, 3095, 3095, 3095, 2990, 3149, 3075,\n", + " 3192, 3267, 3278, 3286, 3592, 3584, 3623, 3623, 3676, 3609, 3609, 3712,\n", + " 3737, 3737, 3839, 3818, 3860, 3836, 3924, 3915, 3915, 3893, 3850, 3951,\n", + " 3976, 4075, 4304, 4325, 4325, 4325, 4325, 4564, 4482, 4482, 4376, 4376,\n", + " 4703, 4650, 4395, 4395, 4395, 4395, 4435, 4458, 4642, 4419, 4419, 4588,\n", + " 4689, 4683, 4689, 4869, 4839, 4839, 4869, 4857, 4857, 4845, 5045, 5000,\n", + " 4995, 5242, 5242, 5214, 5214, 5378, 5287, 5389, 5389, 5398, 5398, 5791,\n", + " 5878, 5878, 5524, 5524, 5711, 5711, 5928, 5928, 5531, 5636, 5654, 5654,\n", + " 5480, 5480, 5775, 5686, 5532, 5532, 5949, 5742, 5633, 5633, 5633, 5781,\n", + " 5781, 5589, 5589, 5589, 5597, 5874, 5944, 5895, 5750],\n", + " [ 66, 126, 116, 75, 107, 101, 57, 54, 112, 8, 10, 67,\n", + " 35, 84, 60, 131, 111, 99, 3, 15, 8, 61, 67, 133,\n", + " 5, 8, 121, 72, 30, 143, 82, 77, 37, 64, 102, 134,\n", + " 40, 111, 33, 114, 106, 90, 11, 78, 49, 22, 103, 136,\n", + " 73, 99, 122, 9, 18, 3, 91, 14, 80, 71, 128, 1,\n", + " 79, 53, 109, 144, 120, 95, 84, 32, 137, 75, 21, 84,\n", + " 66, 44, 97, 39, 36, 85, 50, 75, 62, 117, 64, 37,\n", + " 98, 52, 34, 31, 29, 5, 55, 3, 119, 3, 26, 133,\n", + " 35, 84, 110, 60, 47, 5, 67, 69, 43, 25, 132, 140,\n", + " 3, 140, 23, 126, 38, 112, 4, 27, 113, 17, 129, 13,\n", + " 86, 68, 75, 21, 18, 3, 104, 25, 108, 135, 8, 5,\n", + " 94, 105, 56, 140, 20, 27, 60, 59, 6, 59, 70, 88,\n", + " 139, 115, 3, 23, 23, 0, 99, 60, 59, 138, 81, 23,\n", + " 3, 13, 75, 122, 31, 21, 83, 60, 114, 89, 8, 16,\n", + " 63, 16, 42, 48, 123, 2, 75, 141, 83, 24, 12, 25,\n", + " 30, 112, 31, 96, 29, 100, 75, 22, 93, 118, 75, 75,\n", + " 41, 28, 75, 106, 112, 51, 12, 75, 76, 130, 75, 74,\n", + " 65, 75, 75, 92, 75, 142, 32, 75, 127, 3, 75, 51,\n", + " 6, 75, 45, 123, 112, 87, 3, 46, 19, 75, 7, 65,\n", + " 112, 58, 60, 100, 125, 3, 3, 3, 124]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 30, 812, 4786, ..., 4561, 537, 1804],\n", + " [ 23, 208, 73, ..., 7434, 7275, 7428]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 122, 122, 99, ..., 3, 75, 66],\n", + " [ 163, 496, 58, ..., 5956, 5901, 5838]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 32, 32, 32, ..., 7360, 7360, 7360],\n", + " [ 65, 186, 825, ..., 781, 290, 265]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 450, 384, 254, ..., 290, 125, 820],\n", + " [ 215, 9, 72, ..., 7416, 7432, 7316]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 815, 330, 6200, ..., 3391, 5817, 7476],\n", + " [ 92, 11, 32, ..., 5868, 5953, 5881]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 32, 124, 102, ..., 7360, 7360, 7425],\n", + " [ 697, 814, 758, ..., 5034, 6791, 3212]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 168, 168, 168, ..., 5944, 5874, 5949],\n", + " [5425, 6002, 6199, ..., 7360, 7360, 7360]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005701\n", + "sampling 0.004675\n", + "noi time: 0.001112\n", + "get_vertex_data call: 0.06286\n", + "noi group time: 0.003081\n", + "eoi_group_time: 0.014039\n", + "second half: 0.23844\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 21471, 32616, 16542, ..., 1119184, 1132473, 1120124],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 21471, 32616, 16542, ..., 1119184, 1132473, 1120124],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1231427, 1210591, 1219066, ..., 1929435, 1938416, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1231427, 1210591, 1219066, ..., 1929435, 1938416, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1137435, 1141424, 1140282, 1140284, 1140285, 1136349, 1135926,\n", + " 1135726, 1140785, 1140799, 1141758, 1136216, 1141251, 1140294, 1136971,\n", + " 1138942, 1139142, 1143363, 1139241, 1139615, 1150509, 1142963, 1139865,\n", + " 1139866, 1149216, 1149228, 1142958, 1155683, 1155689, 1149644, 1147221,\n", + " 1147228, 1153936, 1144632, 1134694, 1135947, 1135111, 1146656, 1147095,\n", + " 1147094, 1155008, 1155019, 1139373, 1152427, 1134710, 1136268, 1146376,\n", + " 1134804, 1138742, 1134657, 1137835, 1136308, 1140537, 1138112, 1138118,\n", + " 1138119, 1137254, 1138356, 1140153, 1140020, 1140027, 1135367, 1135202,\n", + " 1154739, 1134970, 1141036, 1136770, 1134794, 1157443, 1138504, 1136178,\n", + " 1143069, 1137693, 1144389, 1144390, 1144395, 1137532, 1137534, 1135408,\n", + " 1136662, 1136942, 1156149, 1148488, 1139161, 1134841, 1135579, 1140970,\n", + " 1156342, 1137957, 1158136, 1156975, 1154132, 1136982, 1156899, 1135522,\n", + " 1139684, 1138305, 1138436, 1138440, 1138445, 1138461, 1138449, 1137932,\n", + " 1154097, 1158390, 1149328, 1138882, 1156606, 1147112, 1142611, 1158984,\n", + " 1150948, 1137109, 1139846, 1141530, 1139667, 1139668, 1138069, 1142255,\n", + " 1134992, 1142436, 1136730, 1140192, 1140197, 1139327, 1159018, 1153543,\n", + " 1140034, 1141963, 1141967, 1152044, 1139062, 1139069, 1142299, 1142302,\n", + " 1136059, 1140660, 1137734, 1137728, 1134922, 1134750, 1140228, 1141088,\n", + " 1144129, 1148996, 1149001, 1142021, 1139643, 1143767, 1143224, 1143225,\n", + " 1137670, 1139025, 1139039, 1139032, 1140003, 1149979, 1146834, 1146844,\n", + " 1135861, 1140467, 1139386, 1163301, 1136917, 1145056, 1144237, 1141785,\n", + " 1139495, 1141609, 1144650, 1136854, 1147844, 1164807, 1149434, 1139798,\n", + " 1144428, 1142050, 1141810, 1141821, 1143166, 1165098, 1142093, 1145152,\n", + " 1149111, 1139190, 1138708, 1140110, 1137662, 1144445, 1144596, 1142837,\n", + " 1136864, 1145302, 1140894, 1140432, 1144182, 1144179, 1137606, 1150906,\n", + " 1146201, 1139559, 1158698, 1158703, 1137846, 1147158, 1136378, 1142640,\n", + " 1162804, 1153068, 1149101, 1144279, 1139510, 1139769, 1140093, 1138815,\n", + " 1140990, 1140984, 1147047, 1155836, 1143543, 1152976, 1152989, 1139453,\n", + " 1141925, 1145339, 1150692, 1136885, 1134861, 1145971, 1145978, 1143845,\n", + " 1143851, 1136275, 1146024, 1146131, 1154327, 1141646, 1141585, 1139990,\n", + " 1151124, 1147543, 1147540, 1148762, 1147282, 1143721, 1136330, 1140337,\n", + " 1140345, 1140349, 1143663, 1142628, 1142637, 1149366, 1139415, 1143051,\n", + " 1136167, 1136161, 1142588, 1138923, 1157713, 1157718, 1157720, 1136836,\n", + " 1139297, 1139051, 1144957, 1143345, 1144765, 1144753, 1144619, 1135876,\n", + " 1150755, 1150294, 1143960, 1143457, 1144564, 1142003, 1146636, 1147521,\n", + " 1140364, 1149581, 1168921, 1147996, 1147999, 1134899, 1144013, 1144014,\n", + " 1148704, 1141319, 1141327, 1149714, 1147025, 1147027, 1147032, 1147971,\n", + " 1147982, 1139549, 1147196, 1158226, 1158229, 1154526, 1145237, 1145240,\n", + " 1145751, 1138638, 1146178, 1146188, 1151242, 1148223, 1152530, 1150438,\n", + " 1148819, 1155006, 1149791, 1144514, 1153983, 1147794, 1151480, 1154263,\n", + " 1139906, 1134869, 1149534, 1149530, 1135805, 1158949, 1141951, 1141949,\n", + " 1146776, 1141193, 1141199, 1144824, 1137641, 1153574, 1148461, 1147653,\n", + " 1149412, 1152068, 1152073, 1154420, 1158786, 1158794, 1148180, 1151367,\n", + " 1152561, 1157968, 1157977, 1157983, 1144110, 1151942, 1143895, 1171943,\n", + " 1153124, 1153188, 1145106, 1152921, 1150935, 1150352, 1150356, 1155088,\n", + " 1143129, 1147446, 1151811, 1154177, 1148498, 1148510, 1146565, 1141420,\n", + " 1147602, 1147737, 1153448, 1145079, 1156413, 1156402, 1153249, 1153255,\n", + " 1150219, 1146623, 1142986, 1144476, 1152098, 1150086, 1145539, 1137746,\n", + " 1146304, 1152622, 1140521, 1155148, 1136410, 1149205, 1152826, 1155337,\n", + " 1154119, 1154123, 1157842, 1157832, 1157835, 1154633, 1151580, 1151617,\n", + " 1150578, 1136798, 1153378, 1145952, 1138982, 1143988, 1156826, 1138281,\n", + " 1152294, 1136028, 1156622, 1151187, 1152928, 1156387, 1153914, 1149273,\n", + " 1148033, 1148040, 1155202, 1149300, 1149804, 1148628, 1158530, 1158540,\n", + " 1137458, 1137465, 1154564, 1135698, 1155379, 1155381, 1142041, 1157229,\n", + " 1135430, 1157547, 1142385, 1158860, 1150873, 1158916, 1154934, 1157064,\n", + " 1157069, 1157071, 1145191, 1145187, 1157560, 1135730, 1156638, 1152740,\n", + " 1150824, 1147810, 1147818, 1158308, 1155441, 1155514, 1150132, 1150136,\n", + " 1162120, 1138569, 1140866, 1154528, 1138969, 1156919, 1156921, 1156923,\n", + " 1142755, 1164631, 1156207, 1172954, 1156265, 1156269, 1157637, 1151379,\n", + " 1155360, 1155375, 1155122, 1155755, 1151431, 1135402, 1146920, 1158096,\n", + " 1168230, 1155670, 1155628, 1155630, 1155631, 1158824, 1157313, 1148836,\n", + " 1155646, 1158355, 1143256, 1143262, 1143189, 1143524, 1150371, 1153326,\n", + " 1155615, 1155613, 1150983, 1157933, 1157934, 1137152, 1153786, 1158192,\n", + " 1159116, 1140920, 1166187, 1164161, 1135601, 1135602, 1145514, 1148149,\n", + " 1150661, 1150671, 1155848, 1157684, 1146321, 1152209, 1159213, 1155434,\n", + " 1155439, 1152502, 1140374, 1156027, 1144843, 1155971, 1155975, 1156948,\n", + " 1153768, 1158841, 1158846, 1156811, 1155393, 1154592, 1154600, 1160163,\n", + " 1136896, 1158760, 1158886, 1140218, 1158815, 1158285, 1136491, 1136640,\n", + " 1140049, 1158558, 1146126, 1138110, 1158007, 1142487, 1142662, 1150684,\n", + " 1167359, 1161635, 1159042, 1159052, 1155196, 1153052, 1153045, 1159738,\n", + " 1153842, 1142674, 1142677, 1150046, 1149063, 1145948, 1153514, 1153519,\n", + " 1147300, 1161652, 1161656, 1164997, 1138161, 1156787, 1154590, 1139592,\n", + " 1139281, 1166032, 1166073, 1146058, 1146063, 1146055, 1170415, 1169493,\n", + " 1140643, 1148600, 1148607, 1165047, 1156355, 1158643, 1159032, 1188506,\n", + " 1152244, 1152247, 1171155, 1143729, 1158902, 1158907, 1162556, 1168426,\n", + " 1167933, 1147830, 1146510, 1164580, 1144750, 1152776, 1163522, 1145137,\n", + " 1145139, 1141471, 1141459, 1147426, 1147427, 1157042, 1157050, 1157052,\n", + " 1156737, 1156739, 1160849, 1157955, 1165171, 1171040, 1168748, 1168750,\n", + " 1144812, 1135567, 1164741, 1180505, 1167339, 1148683, 1154701, 1146038,\n", + " 1147674, 1171687, 1144972, 1144973, 1145441, 1145451, 1165746, 1147355,\n", + " 1152624, 1152626, 1139345, 1145902, 1153520, 1152206, 1169739, 1166661,\n", + " 1154076, 1177560, 1145671, 1145674, 1192410, 1151594, 1162893, 1167817,\n", + " 1171979, 1193345, 1149480, 1155172, 1150522, 1150518, 1161791, 1144336,\n", + " 1154670, 1142357, 1169162, 1169157, 1157331, 1157337, 1151668, 1151674,\n", + " 1169359, 1154364, 1154354, 1172750, 1149452, 1158611, 1158623, 1173047,\n", + " 1157385, 1154869, 1169945, 1155502, 1152353, 1152360, 1143858, 1168400,\n", + " 1164642, 1169921, 1148667, 1148666, 1148335, 1177215, 1169264, 1168464,\n", + " 1173307, 1154027, 1153755, 1178422, 1157158, 1157153, 1157373, 1147711,\n", + " 1151850, 1148131, 1149247, 1170490, 1167712, 1171293, 1173121, 1178415,\n", + " 1172234, 1146765, 1182091, 1140326, 1166016, 1172932, 1181134, 1144545,\n", + " 1144557, 1171823, 1154149, 1154148, 1149179, 1169979, 1143420, 1153803,\n", + " 1170519, 1153624, 1182106, 1172309, 1184093, 1179807, 1161255, 1176512,\n", + " 1182361, 1155262, 1172005, 1154718, 1157795, 1171629, 1171623, 1164034,\n", + " 1155804, 1190812, 1157991, 1158253, 1134650, 1178214, 1145626, 1179075,\n", + " 1149755, 1163718, 1179776, 1158512, 1158378, 1155890, 1155892, 1157268,\n", + " 1164404, 1140393, 1164798, 1162253, 1159329, 1168621, 1168866, 1168546,\n", + " 1165142, 1166442, 1164339, 1164264, 1161819, 1146169, 1156861, 1156170,\n", + " 1159535, 1182963, 1168930, 1168939, 1168943, 1168940, 1156528, 1139828,\n", + " 1139831, 1150265, 1154812, 1183956, 1190585, 1149626, 1156055, 1191993,\n", + " 1146392, 1146394, 1173057, 1172369, 1188803, 1177477, 1191015, 1169954,\n", + " 1141002, 1194454, 1181284, 1189970, 1151774, 1152113, 1177129, 1179001,\n", + " 1170128, 1160350, 1166788, 1145395, 1167730, 1180531, 1170168, 1179750,\n", + " 1155958, 1155959, 1155962, 1185607, 1188278, 1157022, 1185730],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1137435, 1141424, 1140282, 1140284, 1140285, 1136349, 1135926,\n", + " 1135726, 1140785, 1140799, 1141758, 1136216, 1141251, 1140294, 1136971,\n", + " 1138942, 1139142, 1143363, 1139241, 1139615, 1150509, 1142963, 1139865,\n", + " 1139866, 1149216, 1149228, 1142958, 1155683, 1155689, 1149644, 1147221,\n", + " 1147228, 1153936, 1144632, 1134694, 1135947, 1135111, 1146656, 1147095,\n", + " 1147094, 1155008, 1155019, 1139373, 1152427, 1134710, 1136268, 1146376,\n", + " 1134804, 1138742, 1134657, 1137835, 1136308, 1140537, 1138112, 1138118,\n", + " 1138119, 1137254, 1138356, 1140153, 1140020, 1140027, 1135367, 1135202,\n", + " 1154739, 1134970, 1141036, 1136770, 1134794, 1157443, 1138504, 1136178,\n", + " 1143069, 1137693, 1144389, 1144390, 1144395, 1137532, 1137534, 1135408,\n", + " 1136662, 1136942, 1156149, 1148488, 1139161, 1134841, 1135579, 1140970,\n", + " 1156342, 1137957, 1158136, 1156975, 1154132, 1136982, 1156899, 1135522,\n", + " 1139684, 1138305, 1138436, 1138440, 1138445, 1138461, 1138449, 1137932,\n", + " 1154097, 1158390, 1149328, 1138882, 1156606, 1147112, 1142611, 1158984,\n", + " 1150948, 1137109, 1139846, 1141530, 1139667, 1139668, 1138069, 1142255,\n", + " 1134992, 1142436, 1136730, 1140192, 1140197, 1139327, 1159018, 1153543,\n", + " 1140034, 1141963, 1141967, 1152044, 1139062, 1139069, 1142299, 1142302,\n", + " 1136059, 1140660, 1137734, 1137728, 1134922, 1134750, 1140228, 1141088,\n", + " 1144129, 1148996, 1149001, 1142021, 1139643, 1143767, 1143224, 1143225,\n", + " 1137670, 1139025, 1139039, 1139032, 1140003, 1149979, 1146834, 1146844,\n", + " 1135861, 1140467, 1139386, 1163301, 1136917, 1145056, 1144237, 1141785,\n", + " 1139495, 1141609, 1144650, 1136854, 1147844, 1164807, 1149434, 1139798,\n", + " 1144428, 1142050, 1141810, 1141821, 1143166, 1165098, 1142093, 1145152,\n", + " 1149111, 1139190, 1138708, 1140110, 1137662, 1144445, 1144596, 1142837,\n", + " 1136864, 1145302, 1140894, 1140432, 1144182, 1144179, 1137606, 1150906,\n", + " 1146201, 1139559, 1158698, 1158703, 1137846, 1147158, 1136378, 1142640,\n", + " 1162804, 1153068, 1149101, 1144279, 1139510, 1139769, 1140093, 1138815,\n", + " 1140990, 1140984, 1147047, 1155836, 1143543, 1152976, 1152989, 1139453,\n", + " 1141925, 1145339, 1150692, 1136885, 1134861, 1145971, 1145978, 1143845,\n", + " 1143851, 1136275, 1146024, 1146131, 1154327, 1141646, 1141585, 1139990,\n", + " 1151124, 1147543, 1147540, 1148762, 1147282, 1143721, 1136330, 1140337,\n", + " 1140345, 1140349, 1143663, 1142628, 1142637, 1149366, 1139415, 1143051,\n", + " 1136167, 1136161, 1142588, 1138923, 1157713, 1157718, 1157720, 1136836,\n", + " 1139297, 1139051, 1144957, 1143345, 1144765, 1144753, 1144619, 1135876,\n", + " 1150755, 1150294, 1143960, 1143457, 1144564, 1142003, 1146636, 1147521,\n", + " 1140364, 1149581, 1168921, 1147996, 1147999, 1134899, 1144013, 1144014,\n", + " 1148704, 1141319, 1141327, 1149714, 1147025, 1147027, 1147032, 1147971,\n", + " 1147982, 1139549, 1147196, 1158226, 1158229, 1154526, 1145237, 1145240,\n", + " 1145751, 1138638, 1146178, 1146188, 1151242, 1148223, 1152530, 1150438,\n", + " 1148819, 1155006, 1149791, 1144514, 1153983, 1147794, 1151480, 1154263,\n", + " 1139906, 1134869, 1149534, 1149530, 1135805, 1158949, 1141951, 1141949,\n", + " 1146776, 1141193, 1141199, 1144824, 1137641, 1153574, 1148461, 1147653,\n", + " 1149412, 1152068, 1152073, 1154420, 1158786, 1158794, 1148180, 1151367,\n", + " 1152561, 1157968, 1157977, 1157983, 1144110, 1151942, 1143895, 1171943,\n", + " 1153124, 1153188, 1145106, 1152921, 1150935, 1150352, 1150356, 1155088,\n", + " 1143129, 1147446, 1151811, 1154177, 1148498, 1148510, 1146565, 1141420,\n", + " 1147602, 1147737, 1153448, 1145079, 1156413, 1156402, 1153249, 1153255,\n", + " 1150219, 1146623, 1142986, 1144476, 1152098, 1150086, 1145539, 1137746,\n", + " 1146304, 1152622, 1140521, 1155148, 1136410, 1149205, 1152826, 1155337,\n", + " 1154119, 1154123, 1157842, 1157832, 1157835, 1154633, 1151580, 1151617,\n", + " 1150578, 1136798, 1153378, 1145952, 1138982, 1143988, 1156826, 1138281,\n", + " 1152294, 1136028, 1156622, 1151187, 1152928, 1156387, 1153914, 1149273,\n", + " 1148033, 1148040, 1155202, 1149300, 1149804, 1148628, 1158530, 1158540,\n", + " 1137458, 1137465, 1154564, 1135698, 1155379, 1155381, 1142041, 1157229,\n", + " 1135430, 1157547, 1142385, 1158860, 1150873, 1158916, 1154934, 1157064,\n", + " 1157069, 1157071, 1145191, 1145187, 1157560, 1135730, 1156638, 1152740,\n", + " 1150824, 1147810, 1147818, 1158308, 1155441, 1155514, 1150132, 1150136,\n", + " 1162120, 1138569, 1140866, 1154528, 1138969, 1156919, 1156921, 1156923,\n", + " 1142755, 1164631, 1156207, 1172954, 1156265, 1156269, 1157637, 1151379,\n", + " 1155360, 1155375, 1155122, 1155755, 1151431, 1135402, 1146920, 1158096,\n", + " 1168230, 1155670, 1155628, 1155630, 1155631, 1158824, 1157313, 1148836,\n", + " 1155646, 1158355, 1143256, 1143262, 1143189, 1143524, 1150371, 1153326,\n", + " 1155615, 1155613, 1150983, 1157933, 1157934, 1137152, 1153786, 1158192,\n", + " 1159116, 1140920, 1166187, 1164161, 1135601, 1135602, 1145514, 1148149,\n", + " 1150661, 1150671, 1155848, 1157684, 1146321, 1152209, 1159213, 1155434,\n", + " 1155439, 1152502, 1140374, 1156027, 1144843, 1155971, 1155975, 1156948,\n", + " 1153768, 1158841, 1158846, 1156811, 1155393, 1154592, 1154600, 1160163,\n", + " 1136896, 1158760, 1158886, 1140218, 1158815, 1158285, 1136491, 1136640,\n", + " 1140049, 1158558, 1146126, 1138110, 1158007, 1142487, 1142662, 1150684,\n", + " 1167359, 1161635, 1159042, 1159052, 1155196, 1153052, 1153045, 1159738,\n", + " 1153842, 1142674, 1142677, 1150046, 1149063, 1145948, 1153514, 1153519,\n", + " 1147300, 1161652, 1161656, 1164997, 1138161, 1156787, 1154590, 1139592,\n", + " 1139281, 1166032, 1166073, 1146058, 1146063, 1146055, 1170415, 1169493,\n", + " 1140643, 1148600, 1148607, 1165047, 1156355, 1158643, 1159032, 1188506,\n", + " 1152244, 1152247, 1171155, 1143729, 1158902, 1158907, 1162556, 1168426,\n", + " 1167933, 1147830, 1146510, 1164580, 1144750, 1152776, 1163522, 1145137,\n", + " 1145139, 1141471, 1141459, 1147426, 1147427, 1157042, 1157050, 1157052,\n", + " 1156737, 1156739, 1160849, 1157955, 1165171, 1171040, 1168748, 1168750,\n", + " 1144812, 1135567, 1164741, 1180505, 1167339, 1148683, 1154701, 1146038,\n", + " 1147674, 1171687, 1144972, 1144973, 1145441, 1145451, 1165746, 1147355,\n", + " 1152624, 1152626, 1139345, 1145902, 1153520, 1152206, 1169739, 1166661,\n", + " 1154076, 1177560, 1145671, 1145674, 1192410, 1151594, 1162893, 1167817,\n", + " 1171979, 1193345, 1149480, 1155172, 1150522, 1150518, 1161791, 1144336,\n", + " 1154670, 1142357, 1169162, 1169157, 1157331, 1157337, 1151668, 1151674,\n", + " 1169359, 1154364, 1154354, 1172750, 1149452, 1158611, 1158623, 1173047,\n", + " 1157385, 1154869, 1169945, 1155502, 1152353, 1152360, 1143858, 1168400,\n", + " 1164642, 1169921, 1148667, 1148666, 1148335, 1177215, 1169264, 1168464,\n", + " 1173307, 1154027, 1153755, 1178422, 1157158, 1157153, 1157373, 1147711,\n", + " 1151850, 1148131, 1149247, 1170490, 1167712, 1171293, 1173121, 1178415,\n", + " 1172234, 1146765, 1182091, 1140326, 1166016, 1172932, 1181134, 1144545,\n", + " 1144557, 1171823, 1154149, 1154148, 1149179, 1169979, 1143420, 1153803,\n", + " 1170519, 1153624, 1182106, 1172309, 1184093, 1179807, 1161255, 1176512,\n", + " 1182361, 1155262, 1172005, 1154718, 1157795, 1171629, 1171623, 1164034,\n", + " 1155804, 1190812, 1157991, 1158253, 1134650, 1178214, 1145626, 1179075,\n", + " 1149755, 1163718, 1179776, 1158512, 1158378, 1155890, 1155892, 1157268,\n", + " 1164404, 1140393, 1164798, 1162253, 1159329, 1168621, 1168866, 1168546,\n", + " 1165142, 1166442, 1164339, 1164264, 1161819, 1146169, 1156861, 1156170,\n", + " 1159535, 1182963, 1168930, 1168939, 1168943, 1168940, 1156528, 1139828,\n", + " 1139831, 1150265, 1154812, 1183956, 1190585, 1149626, 1156055, 1191993,\n", + " 1146392, 1146394, 1173057, 1172369, 1188803, 1177477, 1191015, 1169954,\n", + " 1141002, 1194454, 1181284, 1189970, 1151774, 1152113, 1177129, 1179001,\n", + " 1170128, 1160350, 1166788, 1145395, 1167730, 1180531, 1170168, 1179750,\n", + " 1155958, 1155959, 1155962, 1185607, 1188278, 1157022, 1185730],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196011, 1197717, 1199827, 1195860, 1199282, 1199283, 1198449, 1198459,\n", + " 1202243, 1202255, 1196195, 1198844, 1201577, 1201582, 1194626, 1201016,\n", + " 1198633, 1198690, 1196956, 1198557, 1196685, 1198190, 1194783, 1194648,\n", + " 1195511, 1195263, 1201992, 1196031, 1198542, 1198543, 1197697, 1197701,\n", + " 1199519, 1195888, 1194759, 1198668, 1196171, 1197795, 1198264, 1198357,\n", + " 1198163, 1198167, 1196711, 1196247, 1197273, 1194859, 1195038, 1198925,\n", + " 1199377, 1195541, 1196311, 1197640, 1195918, 1199710, 1199329, 1200949,\n", + " 1199059, 1197291, 1194928, 1197583, 1199685, 1199628, 1197676, 1197990,\n", + " 1200872, 1198404, 1199579, 1199231, 1196498, 1200668, 1197601, 1201117,\n", + " 1196727, 1203239, 1198416, 1198428, 1198811, 1199555, 1201824, 1200452,\n", + " 1200503, 1201079, 1202631, 1199546, 1201732, 1201737, 1200526, 1200553,\n", + " 1200557, 1197100, 1202102, 1201726, 1202541, 1200087, 1202138, 1196889,\n", + " 1199908, 1199917, 1200194, 1201442, 1202834, 1195876, 1195885, 1198474,\n", + " 1202205, 1195607, 1201590, 1201596, 1201796, 1200784, 1200793, 1199606,\n", + " 1195676, 1195664, 1200276, 1198911, 1197822, 1196597, 1197491, 1202269,\n", + " 1199659, 1196375, 1197735, 1199782, 1198819, 1198848, 1203077, 1201886,\n", + " 1200296, 1197035, 1197039, 1201877, 1196551, 1194907], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196011, 1197717, 1199827, 1195860, 1199282, 1199283, 1198449, 1198459,\n", + " 1202243, 1202255, 1196195, 1198844, 1201577, 1201582, 1194626, 1201016,\n", + " 1198633, 1198690, 1196956, 1198557, 1196685, 1198190, 1194783, 1194648,\n", + " 1195511, 1195263, 1201992, 1196031, 1198542, 1198543, 1197697, 1197701,\n", + " 1199519, 1195888, 1194759, 1198668, 1196171, 1197795, 1198264, 1198357,\n", + " 1198163, 1198167, 1196711, 1196247, 1197273, 1194859, 1195038, 1198925,\n", + " 1199377, 1195541, 1196311, 1197640, 1195918, 1199710, 1199329, 1200949,\n", + " 1199059, 1197291, 1194928, 1197583, 1199685, 1199628, 1197676, 1197990,\n", + " 1200872, 1198404, 1199579, 1199231, 1196498, 1200668, 1197601, 1201117,\n", + " 1196727, 1203239, 1198416, 1198428, 1198811, 1199555, 1201824, 1200452,\n", + " 1200503, 1201079, 1202631, 1199546, 1201732, 1201737, 1200526, 1200553,\n", + " 1200557, 1197100, 1202102, 1201726, 1202541, 1200087, 1202138, 1196889,\n", + " 1199908, 1199917, 1200194, 1201442, 1202834, 1195876, 1195885, 1198474,\n", + " 1202205, 1195607, 1201590, 1201596, 1201796, 1200784, 1200793, 1199606,\n", + " 1195676, 1195664, 1200276, 1198911, 1197822, 1196597, 1197491, 1202269,\n", + " 1199659, 1196375, 1197735, 1199782, 1198819, 1198848, 1203077, 1201886,\n", + " 1200296, 1197035, 1197039, 1201877, 1196551, 1194907], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[-2.8969e-04, -3.7513e-04, -4.1051e-04, ..., 6.1328e-02,\n", + " -6.8699e-04, -8.6784e-04],\n", + " [-7.0364e-05, -4.4445e-04, -5.5764e-04, ..., 6.0750e-02,\n", + " -5.3214e-04, -8.2146e-04],\n", + " [-5.4090e-04, -4.3103e-04, 1.6156e-02, ..., 8.4858e-02,\n", + " -1.0210e-03, -1.1232e-03],\n", + " ...,\n", + " [-7.2457e-05, -6.3565e-04, -8.3487e-05, ..., 6.2734e-02,\n", + " -2.8737e-04, -9.3870e-04],\n", + " [-2.2539e-06, -4.4004e-04, -2.1510e-04, ..., 6.1254e-02,\n", + " -6.0050e-04, -7.8816e-04],\n", + " [ 1.1060e-02, -4.3904e-04, -2.0045e-04, ..., 7.7166e-02,\n", + " -7.0092e-04, -9.1195e-04]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[-5.6414e-04, 6.3313e-01, 5.1790e-02, ..., -7.5988e-03,\n", + " -8.2001e-03, -2.2438e-03],\n", + " [ 2.1663e-02, 4.9150e-01, 3.7310e-01, ..., -6.3520e-03,\n", + " -7.4913e-03, -1.8673e-04],\n", + " [ 9.7289e-02, 2.8867e-01, 2.3320e-01, ..., -7.7379e-03,\n", + " -6.0595e-03, -2.7805e-03],\n", + " ...,\n", + " [ 6.7868e-02, 6.7335e-01, 1.4665e-01, ..., -4.6672e-03,\n", + " -6.3650e-03, -2.6325e-03],\n", + " [ 1.5348e-01, 1.2896e-01, 3.2575e-01, ..., -8.3606e-03,\n", + " -6.4938e-03, -5.0877e-03],\n", + " [ 3.6245e-02, 4.4061e-01, 1.4512e-01, ..., -4.8414e-03,\n", + " -4.2104e-03, -3.8255e-03]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-1.4046e-04, -2.0768e-03, 1.3466e-01, ..., 2.1598e-01,\n", + " -1.6707e-04, -9.2284e-05],\n", + " [ 7.2882e-02, -1.1622e-03, 7.9841e-02, ..., 2.5223e-01,\n", + " 3.0519e-02, -6.2904e-04],\n", + " [ 1.0236e-01, -1.8245e-03, 2.3238e-01, ..., 1.5530e-01,\n", + " -1.1444e-03, 6.3228e-02],\n", + " ...,\n", + " [ 8.8126e-02, -1.8024e-03, 2.6673e-01, ..., 1.7395e-01,\n", + " 9.0272e-02, -1.3586e-03],\n", + " [ 1.6054e-01, -1.6516e-03, 6.3852e-02, ..., 2.4682e-01,\n", + " 6.8403e-02, -4.6933e-04],\n", + " [ 1.3607e-01, -5.8137e-04, 1.7181e-01, ..., 2.3722e-01,\n", + " 1.0944e-01, -1.1320e-03]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[ 1.2958e-01, -9.3899e-04, 1.9506e-01, ..., -1.1655e-03,\n", + " -4.5781e-04, -9.3207e-04],\n", + " [ 1.4737e-01, -7.5470e-04, 2.1989e-01, ..., -1.9515e-03,\n", + " -1.3099e-03, -1.0351e-03],\n", + " [ 9.9590e-02, -5.7059e-04, 1.9298e-01, ..., -1.2252e-03,\n", + " -7.4886e-04, -1.8311e-03],\n", + " ...,\n", + " [ 8.7466e-02, -9.8278e-04, 1.7588e-01, ..., -1.8071e-03,\n", + " -1.1187e-03, -1.0108e-03],\n", + " [ 5.2126e-02, -1.1142e-04, 2.4839e-01, ..., -1.7268e-03,\n", + " -5.8183e-04, -2.1813e-03],\n", + " [ 1.5240e-01, -9.9509e-04, 1.8791e-01, ..., -1.4482e-03,\n", + " -7.7214e-04, -5.7369e-04]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 205, 37, 156, 217, 85, 13, 43, 473, 473, 75, 438, 438,\n", + " 415, 251, 251, 332, 332, 792, 386, 692, 575, 619, 619, 700,\n", + " 611, 611, 1092, 839, 839, 570, 756, 865, 969, 1005, 1368, 1368,\n", + " 1219, 1219, 1205, 1368, 1368, 1368, 1393, 1420, 1531, 1531, 1608, 1608,\n", + " 1608, 1586, 1580, 1549, 1664, 1763, 1822, 1565, 1565, 1842, 1544, 1927,\n", + " 1905, 2026, 1991, 2142, 2142, 2194, 2194, 2400, 2400, 2400, 2130, 2324,\n", + " 2324, 2317, 2374, 2112, 2397, 2397, 2516, 2516, 2283, 2283, 2321, 2326,\n", + " 2523, 2523, 2383, 2333, 2463, 2463, 2642, 2698, 2746, 2746, 2746, 2976,\n", + " 3058, 3058, 2819, 2784, 2646, 2771, 3016, 3136, 3033, 2934, 3053, 3162,\n", + " 3146, 3156, 3099, 3004, 3183, 3198, 3371, 3444, 3412, 3412, 3524, 3376,\n", + " 3457, 3976, 3871, 3783, 3865, 4059, 4133, 4170, 4147, 4303, 4199, 4199,\n", + " 4320, 4320, 4420, 4434, 4536, 4263, 4436, 4399, 4386, 4562, 4754, 4754,\n", + " 4776, 5025, 4884, 4970, 4923, 4923, 4943, 4946, 5083, 5069, 5069, 5069,\n", + " 5069, 5103, 5037, 5037, 5037, 5666, 5316, 5436, 5436, 5485, 5375, 5511,\n", + " 5509, 5509, 5406, 5614, 5729, 5846, 5717, 5509, 5532, 5723, 5814, 5814,\n", + " 5853, 5907, 5907, 5907, 6005, 6079, 6013, 6013],\n", + " [ 39, 3, 69, 17, 56, 63, 81, 27, 26, 95, 127, 53,\n", + " 41, 94, 42, 28, 117, 72, 113, 68, 111, 16, 8, 4,\n", + " 93, 133, 113, 36, 50, 111, 22, 93, 73, 123, 76, 72,\n", + " 69, 82, 21, 12, 77, 67, 52, 76, 74, 87, 98, 115,\n", + " 0, 58, 71, 6, 64, 25, 14, 92, 20, 76, 119, 18,\n", + " 10, 10, 98, 11, 48, 51, 107, 9, 132, 104, 103, 123,\n", + " 76, 25, 51, 20, 100, 1, 129, 121, 4, 85, 14, 56,\n", + " 19, 98, 51, 127, 37, 8, 2, 42, 60, 7, 40, 13,\n", + " 75, 86, 109, 108, 14, 72, 24, 30, 127, 99, 76, 9,\n", + " 118, 131, 2, 54, 72, 112, 37, 108, 50, 97, 4, 120,\n", + " 55, 64, 103, 62, 124, 25, 118, 105, 103, 2, 65, 11,\n", + " 33, 49, 118, 90, 114, 83, 43, 96, 5, 59, 79, 12,\n", + " 31, 88, 128, 29, 6, 91, 36, 45, 110, 76, 70, 67,\n", + " 66, 23, 63, 61, 32, 93, 125, 47, 34, 32, 44, 57,\n", + " 80, 112, 38, 46, 28, 102, 35, 106, 72, 130, 89, 126,\n", + " 116, 15, 56, 101, 78, 122, 84, 93]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2724, 875, 875, ..., 967, 6961, 967],\n", + " [ 61, 105, 20, ..., 7597, 7585, 7585]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 31, 3, 10, ..., 40, 112, 127],\n", + " [ 24, 27, 20, ..., 5986, 5936, 5881]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 38, 38, 38, ..., 7594, 7441, 7441],\n", + " [ 723, 285, 421, ..., 298, 244, 734]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 120, 275, 488, ..., 662, 68, 408],\n", + " [ 121, 321, 5, ..., 7425, 7586, 7502]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[7166, 6540, 6136, ..., 212, 7363, 3691],\n", + " [ 197, 197, 40, ..., 6064, 6028, 6021]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 38, 38, 38, ..., 7441, 7441, 7441],\n", + " [4751, 1577, 4178, ..., 3955, 53, 633]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 156, 43, 43, ..., 6005, 6005, 6005],\n", + " [4907, 6233, 6387, ..., 6250, 7071, 5857]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006105\n", + "sampling 0.005944\n", + "noi time: 0.001539\n", + "get_vertex_data call: 0.025431\n", + "noi group time: 0.003223\n", + "eoi_group_time: 0.016232\n", + "second half: 0.192641\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31145, 24187, 32616, ..., 1119684, 1100728, 1119041],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31145, 24187, 32616, ..., 1119684, 1100728, 1119041],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1208555, 1216134, ..., 1935650, 1936995, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1208555, 1216134, ..., 1935650, 1936995, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1141424, 1135933, 1138553, 1135726, 1141758, 1140297, 1138057,\n", + " 1138897, 1139811, 1146981, 1137947, 1138930, 1145055, 1143372, 1146640,\n", + " 1146641, 1139615, 1140781, 1150506, 1150509, 1145281, 1139866, 1155689,\n", + " 1147473, 1141882, 1142881, 1135251, 1149038, 1146992, 1135950, 1136122,\n", + " 1152658, 1137220, 1145412, 1155019, 1139371, 1136683, 1150329, 1134657,\n", + " 1137254, 1140158, 1134720, 1135367, 1135202, 1134794, 1137329, 1136178,\n", + " 1157088, 1137693, 1136619, 1136623, 1139215, 1157397, 1152376, 1137472,\n", + " 1137025, 1156149, 1156159, 1148481, 1135579, 1135583, 1136097, 1135670,\n", + " 1140970, 1158136, 1154132, 1139685, 1136352, 1138436, 1138440, 1138449,\n", + " 1136594, 1138846, 1138697, 1142611, 1142616, 1135036, 1135359, 1135618,\n", + " 1135631, 1156141, 1156139, 1138185, 1145843, 1134992, 1134771, 1136548,\n", + " 1135776, 1158965, 1158968, 1158974, 1159009, 1144406, 1153543, 1140034,\n", + " 1139072, 1138150, 1140557, 1141985, 1152044, 1139064, 1137728, 1135540,\n", + " 1135543, 1140228, 1141088, 1141100, 1144130, 1143224, 1143225, 1141690,\n", + " 1135860, 1141224, 1136917, 1145057, 1140598, 1141786, 1139495, 1144941,\n", + " 1144650, 1147850, 1137087, 1144428, 1138482, 1142052, 1143153, 1140160,\n", + " 1158749, 1139190, 1141479, 1141482, 1142925, 1144596, 1136867, 1136864,\n", + " 1150906, 1137369, 1158703, 1147153, 1136369, 1141365, 1153068, 1141678,\n", + " 1141664, 1144281, 1139510, 1139763, 1139653, 1143779, 1140976, 1140990,\n", + " 1141560, 1147050, 1145873, 1152976, 1152980, 1152985, 1139455, 1141925,\n", + " 1144242, 1150695, 1140689, 1145983, 1143845, 1146019, 1146024, 1146140,\n", + " 1154323, 1154328, 1141235, 1139990, 1143283, 1147543, 1147282, 1136330,\n", + " 1149159, 1140348, 1142630, 1149608, 1143051, 1136167, 1136836, 1136843,\n", + " 1139329, 1142153, 1158043, 1143345, 1144765, 1144615, 1140844, 1135876,\n", + " 1144319, 1150294, 1143456, 1143457, 1144291, 1143937, 1135454, 1147574,\n", + " 1143798, 1140364, 1149581, 1143082, 1166410, 1148962, 1144219, 1147984,\n", + " 1147999, 1148704, 1141319, 1146751, 1148473, 1153702, 1147056, 1149722,\n", + " 1147249, 1145011, 1145012, 1139549, 1158224, 1158226, 1150463, 1147874,\n", + " 1147880, 1145240, 1145751, 1148387, 1152530, 1152533, 1152540, 1150445,\n", + " 1149787, 1149791, 1144514, 1144526, 1150348, 1154819, 1147794, 1151480,\n", + " 1152024, 1152026, 1139914, 1150112, 1147019, 1153152, 1141936, 1150736,\n", + " 1150748, 1150843, 1148743, 1149991, 1148461, 1147653, 1143560, 1149412,\n", + " 1148288, 1148300, 1152070, 1154420, 1158794, 1148180, 1151363, 1146682,\n", + " 1152436, 1157968, 1148734, 1148729, 1139936, 1141739, 1153121, 1153124,\n", + " 1153197, 1145111, 1159828, 1148060, 1150356, 1155098, 1152581, 1135311,\n", + " 1154183, 1150715, 1148504, 1141420, 1136002, 1145079, 1150210, 1146623,\n", + " 1152409, 1152100, 1153032, 1145539, 1137746, 1152622, 1140521, 1152673,\n", + " 1151617, 1150578, 1148916, 1152944, 1138982, 1151311, 1152341, 1138279,\n", + " 1138281, 1136028, 1136029, 1158704, 1140678, 1152928, 1151071, 1156422,\n", + " 1150104, 1148033, 1148040, 1149300, 1155221, 1149792, 1137048, 1148628,\n", + " 1158530, 1158533, 1137458, 1149943, 1149947, 1154575, 1135707, 1135706,\n", + " 1154381, 1150872, 1154942, 1157064, 1155418, 1137809, 1151260, 1135729,\n", + " 1152181, 1156638, 1151788, 1151777, 1153413, 1147810, 1139530, 1158304,\n", + " 1158308, 1151271, 1151342, 1155441, 1150129, 1150132, 1150136, 1140865,\n", + " 1154536, 1145606, 1150495, 1142755, 1151379, 1155122, 1157174, 1153486,\n", + " 1155755, 1146920, 1145793, 1155626, 1155628, 1154550, 1158824, 1161796,\n", + " 1160223, 1154240, 1157439, 1159618, 1157934, 1151030, 1157653, 1155026,\n", + " 1167064, 1140920, 1166187, 1135601, 1158665, 1158671, 1157685, 1155724,\n", + " 1144451, 1157728, 1144843, 1155971, 1155975, 1155402, 1158753, 1161575,\n", + " 1158886, 1140213, 1140215, 1156778, 1152463, 1144127, 1166421, 1157867,\n", + " 1147785, 1158558, 1153824, 1155866, 1154340, 1144589, 1158257, 1155521,\n", + " 1171195, 1137563, 1167359, 1159042, 1159057, 1151075, 1151077, 1157945,\n", + " 1153042, 1153045, 1172998, 1159738, 1167708, 1156381, 1156096, 1138393,\n", + " 1142679, 1150046, 1149063, 1153519, 1147300, 1156252, 1161652, 1138161,\n", + " 1156785, 1156795, 1164909, 1163390, 1148025, 1146063, 1159928, 1165309,\n", + " 1141862, 1148600, 1148603, 1148607, 1143139, 1166805, 1166815, 1151872,\n", + " 1155809, 1185130, 1158655, 1156181, 1159029, 1159032, 1159038, 1152244,\n", + " 1152247, 1143729, 1144490, 1158905, 1160605, 1155588, 1160509, 1144989,\n", + " 1164580, 1152776, 1165422, 1141471, 1156739, 1153663, 1144810, 1144812,\n", + " 1165719, 1165721, 1165727, 1164741, 1161748, 1145743, 1163935, 1145228,\n", + " 1163518, 1142136, 1152626, 1155905, 1148124, 1193481, 1147723, 1153520,\n", + " 1143402, 1166670, 1154076, 1168754, 1168756, 1163646, 1145673, 1169602,\n", + " 1166653, 1150515, 1167905, 1145535, 1144336, 1169162, 1157331, 1151668,\n", + " 1169359, 1154353, 1149452, 1138609, 1158623, 1158052, 1158062, 1173047,\n", + " 1155502, 1152353, 1152360, 1172212, 1148667, 1172139, 1173307, 1145033,\n", + " 1160936, 1152151, 1151697, 1157153, 1157368, 1147708, 1147711, 1151850,\n", + " 1148131, 1157592, 1170488, 1169037, 1183427, 1178415, 1171881, 1166746,\n", + " 1160990, 1140326, 1172606, 1171614, 1153427, 1159099, 1159100, 1169084,\n", + " 1166684, 1182131, 1150234, 1154148, 1179965, 1158178, 1167517, 1149173,\n", + " 1179860, 1143279, 1143420, 1171302, 1170176, 1153803, 1171318, 1172309,\n", + " 1155260, 1154717, 1157792, 1157795, 1171623, 1158253, 1153890, 1145626,\n", + " 1172022, 1186793, 1157483, 1149755, 1146252, 1152279, 1155990, 1158517,\n", + " 1163862, 1158374, 1158380, 1155890, 1155892, 1191383, 1171644, 1185421,\n", + " 1166442, 1163422, 1163421, 1176976, 1165078, 1161819, 1147182, 1168943,\n", + " 1170822, 1139828, 1139825, 1139831, 1150265, 1154812, 1183966, 1156055,\n", + " 1149536, 1191018, 1169964, 1189545, 1140997, 1151774, 1166841, 1170128,\n", + " 1156672, 1172429, 1174606, 1187677, 1179282, 1184971, 1193629, 1186375,\n", + " 1182852, 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1141424, 1135933, 1138553, 1135726, 1141758, 1140297, 1138057,\n", + " 1138897, 1139811, 1146981, 1137947, 1138930, 1145055, 1143372, 1146640,\n", + " 1146641, 1139615, 1140781, 1150506, 1150509, 1145281, 1139866, 1155689,\n", + " 1147473, 1141882, 1142881, 1135251, 1149038, 1146992, 1135950, 1136122,\n", + " 1152658, 1137220, 1145412, 1155019, 1139371, 1136683, 1150329, 1134657,\n", + " 1137254, 1140158, 1134720, 1135367, 1135202, 1134794, 1137329, 1136178,\n", + " 1157088, 1137693, 1136619, 1136623, 1139215, 1157397, 1152376, 1137472,\n", + " 1137025, 1156149, 1156159, 1148481, 1135579, 1135583, 1136097, 1135670,\n", + " 1140970, 1158136, 1154132, 1139685, 1136352, 1138436, 1138440, 1138449,\n", + " 1136594, 1138846, 1138697, 1142611, 1142616, 1135036, 1135359, 1135618,\n", + " 1135631, 1156141, 1156139, 1138185, 1145843, 1134992, 1134771, 1136548,\n", + " 1135776, 1158965, 1158968, 1158974, 1159009, 1144406, 1153543, 1140034,\n", + " 1139072, 1138150, 1140557, 1141985, 1152044, 1139064, 1137728, 1135540,\n", + " 1135543, 1140228, 1141088, 1141100, 1144130, 1143224, 1143225, 1141690,\n", + " 1135860, 1141224, 1136917, 1145057, 1140598, 1141786, 1139495, 1144941,\n", + " 1144650, 1147850, 1137087, 1144428, 1138482, 1142052, 1143153, 1140160,\n", + " 1158749, 1139190, 1141479, 1141482, 1142925, 1144596, 1136867, 1136864,\n", + " 1150906, 1137369, 1158703, 1147153, 1136369, 1141365, 1153068, 1141678,\n", + " 1141664, 1144281, 1139510, 1139763, 1139653, 1143779, 1140976, 1140990,\n", + " 1141560, 1147050, 1145873, 1152976, 1152980, 1152985, 1139455, 1141925,\n", + " 1144242, 1150695, 1140689, 1145983, 1143845, 1146019, 1146024, 1146140,\n", + " 1154323, 1154328, 1141235, 1139990, 1143283, 1147543, 1147282, 1136330,\n", + " 1149159, 1140348, 1142630, 1149608, 1143051, 1136167, 1136836, 1136843,\n", + " 1139329, 1142153, 1158043, 1143345, 1144765, 1144615, 1140844, 1135876,\n", + " 1144319, 1150294, 1143456, 1143457, 1144291, 1143937, 1135454, 1147574,\n", + " 1143798, 1140364, 1149581, 1143082, 1166410, 1148962, 1144219, 1147984,\n", + " 1147999, 1148704, 1141319, 1146751, 1148473, 1153702, 1147056, 1149722,\n", + " 1147249, 1145011, 1145012, 1139549, 1158224, 1158226, 1150463, 1147874,\n", + " 1147880, 1145240, 1145751, 1148387, 1152530, 1152533, 1152540, 1150445,\n", + " 1149787, 1149791, 1144514, 1144526, 1150348, 1154819, 1147794, 1151480,\n", + " 1152024, 1152026, 1139914, 1150112, 1147019, 1153152, 1141936, 1150736,\n", + " 1150748, 1150843, 1148743, 1149991, 1148461, 1147653, 1143560, 1149412,\n", + " 1148288, 1148300, 1152070, 1154420, 1158794, 1148180, 1151363, 1146682,\n", + " 1152436, 1157968, 1148734, 1148729, 1139936, 1141739, 1153121, 1153124,\n", + " 1153197, 1145111, 1159828, 1148060, 1150356, 1155098, 1152581, 1135311,\n", + " 1154183, 1150715, 1148504, 1141420, 1136002, 1145079, 1150210, 1146623,\n", + " 1152409, 1152100, 1153032, 1145539, 1137746, 1152622, 1140521, 1152673,\n", + " 1151617, 1150578, 1148916, 1152944, 1138982, 1151311, 1152341, 1138279,\n", + " 1138281, 1136028, 1136029, 1158704, 1140678, 1152928, 1151071, 1156422,\n", + " 1150104, 1148033, 1148040, 1149300, 1155221, 1149792, 1137048, 1148628,\n", + " 1158530, 1158533, 1137458, 1149943, 1149947, 1154575, 1135707, 1135706,\n", + " 1154381, 1150872, 1154942, 1157064, 1155418, 1137809, 1151260, 1135729,\n", + " 1152181, 1156638, 1151788, 1151777, 1153413, 1147810, 1139530, 1158304,\n", + " 1158308, 1151271, 1151342, 1155441, 1150129, 1150132, 1150136, 1140865,\n", + " 1154536, 1145606, 1150495, 1142755, 1151379, 1155122, 1157174, 1153486,\n", + " 1155755, 1146920, 1145793, 1155626, 1155628, 1154550, 1158824, 1161796,\n", + " 1160223, 1154240, 1157439, 1159618, 1157934, 1151030, 1157653, 1155026,\n", + " 1167064, 1140920, 1166187, 1135601, 1158665, 1158671, 1157685, 1155724,\n", + " 1144451, 1157728, 1144843, 1155971, 1155975, 1155402, 1158753, 1161575,\n", + " 1158886, 1140213, 1140215, 1156778, 1152463, 1144127, 1166421, 1157867,\n", + " 1147785, 1158558, 1153824, 1155866, 1154340, 1144589, 1158257, 1155521,\n", + " 1171195, 1137563, 1167359, 1159042, 1159057, 1151075, 1151077, 1157945,\n", + " 1153042, 1153045, 1172998, 1159738, 1167708, 1156381, 1156096, 1138393,\n", + " 1142679, 1150046, 1149063, 1153519, 1147300, 1156252, 1161652, 1138161,\n", + " 1156785, 1156795, 1164909, 1163390, 1148025, 1146063, 1159928, 1165309,\n", + " 1141862, 1148600, 1148603, 1148607, 1143139, 1166805, 1166815, 1151872,\n", + " 1155809, 1185130, 1158655, 1156181, 1159029, 1159032, 1159038, 1152244,\n", + " 1152247, 1143729, 1144490, 1158905, 1160605, 1155588, 1160509, 1144989,\n", + " 1164580, 1152776, 1165422, 1141471, 1156739, 1153663, 1144810, 1144812,\n", + " 1165719, 1165721, 1165727, 1164741, 1161748, 1145743, 1163935, 1145228,\n", + " 1163518, 1142136, 1152626, 1155905, 1148124, 1193481, 1147723, 1153520,\n", + " 1143402, 1166670, 1154076, 1168754, 1168756, 1163646, 1145673, 1169602,\n", + " 1166653, 1150515, 1167905, 1145535, 1144336, 1169162, 1157331, 1151668,\n", + " 1169359, 1154353, 1149452, 1138609, 1158623, 1158052, 1158062, 1173047,\n", + " 1155502, 1152353, 1152360, 1172212, 1148667, 1172139, 1173307, 1145033,\n", + " 1160936, 1152151, 1151697, 1157153, 1157368, 1147708, 1147711, 1151850,\n", + " 1148131, 1157592, 1170488, 1169037, 1183427, 1178415, 1171881, 1166746,\n", + " 1160990, 1140326, 1172606, 1171614, 1153427, 1159099, 1159100, 1169084,\n", + " 1166684, 1182131, 1150234, 1154148, 1179965, 1158178, 1167517, 1149173,\n", + " 1179860, 1143279, 1143420, 1171302, 1170176, 1153803, 1171318, 1172309,\n", + " 1155260, 1154717, 1157792, 1157795, 1171623, 1158253, 1153890, 1145626,\n", + " 1172022, 1186793, 1157483, 1149755, 1146252, 1152279, 1155990, 1158517,\n", + " 1163862, 1158374, 1158380, 1155890, 1155892, 1191383, 1171644, 1185421,\n", + " 1166442, 1163422, 1163421, 1176976, 1165078, 1161819, 1147182, 1168943,\n", + " 1170822, 1139828, 1139825, 1139831, 1150265, 1154812, 1183966, 1156055,\n", + " 1149536, 1191018, 1169964, 1189545, 1140997, 1151774, 1166841, 1170128,\n", + " 1156672, 1172429, 1174606, 1187677, 1179282, 1184971, 1193629, 1186375,\n", + " 1182852, 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196007, 1196013, 1195406, 1197719, 1199282, 1198458, 1194626, 1200650,\n", + " 1197777, 1197791, 1201660, 1198690, 1202804, 1196669, 1194866, 1194741,\n", + " 1198180, 1194783, 1194655, 1196586, 1195511, 1195514, 1198609, 1195263,\n", + " 1196534, 1201992, 1196030, 1196031, 1198543, 1197697, 1197698, 1194889,\n", + " 1194880, 1195895, 1195740, 1197856, 1196359, 1196979, 1195313, 1196165,\n", + " 1198264, 1198036, 1195982, 1198163, 1196717, 1195146, 1195265, 1197141,\n", + " 1198884, 1197273, 1195027, 1198915, 1195541, 1202915, 1199352, 1199699,\n", + " 1196283, 1198272, 1200949, 1200959, 1202009, 1194928, 1199685, 1199628,\n", + " 1200878, 1200746, 1195021, 1196498, 1195807, 1197601, 1197603, 1197609,\n", + " 1196727, 1196734, 1195773, 1198428, 1199418, 1198811, 1200169, 1200507,\n", + " 1198066, 1196479, 1202627, 1202629, 1200991, 1200913, 1194803, 1201041,\n", + " 1201358, 1200526, 1202858, 1200546, 1197097, 1202138, 1200699, 1199099,\n", + " 1200194, 1200201, 1201442, 1197945, 1202239, 1195880, 1201291, 1198478,\n", + " 1202207, 1201871, 1202217, 1200398, 1196966, 1194846, 1203112, 1195679,\n", + " 1195664, 1198057, 1197334, 1198929, 1197816, 1194898, 1198587, 1199660,\n", + " 1199469, 1194720, 1194730, 1198824, 1201001, 1200468, 1197655, 1197335,\n", + " 1195082, 1202078, 1197872], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196007, 1196013, 1195406, 1197719, 1199282, 1198458, 1194626, 1200650,\n", + " 1197777, 1197791, 1201660, 1198690, 1202804, 1196669, 1194866, 1194741,\n", + " 1198180, 1194783, 1194655, 1196586, 1195511, 1195514, 1198609, 1195263,\n", + " 1196534, 1201992, 1196030, 1196031, 1198543, 1197697, 1197698, 1194889,\n", + " 1194880, 1195895, 1195740, 1197856, 1196359, 1196979, 1195313, 1196165,\n", + " 1198264, 1198036, 1195982, 1198163, 1196717, 1195146, 1195265, 1197141,\n", + " 1198884, 1197273, 1195027, 1198915, 1195541, 1202915, 1199352, 1199699,\n", + " 1196283, 1198272, 1200949, 1200959, 1202009, 1194928, 1199685, 1199628,\n", + " 1200878, 1200746, 1195021, 1196498, 1195807, 1197601, 1197603, 1197609,\n", + " 1196727, 1196734, 1195773, 1198428, 1199418, 1198811, 1200169, 1200507,\n", + " 1198066, 1196479, 1202627, 1202629, 1200991, 1200913, 1194803, 1201041,\n", + " 1201358, 1200526, 1202858, 1200546, 1197097, 1202138, 1200699, 1199099,\n", + " 1200194, 1200201, 1201442, 1197945, 1202239, 1195880, 1201291, 1198478,\n", + " 1202207, 1201871, 1202217, 1200398, 1196966, 1194846, 1203112, 1195679,\n", + " 1195664, 1198057, 1197334, 1198929, 1197816, 1194898, 1198587, 1199660,\n", + " 1199469, 1194720, 1194730, 1198824, 1201001, 1200468, 1197655, 1197335,\n", + " 1195082, 1202078, 1197872], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[-6.1371e-04, -3.9418e-04, 1.3237e-01, ..., 5.7292e-02,\n", + " -6.5825e-04, -6.6352e-04],\n", + " [-7.4511e-05, -8.6955e-04, 1.1496e-01, ..., 3.0648e-02,\n", + " -4.5016e-04, -1.2038e-03],\n", + " [-1.0807e-04, -7.1569e-04, 1.2188e-01, ..., 1.6376e-02,\n", + " -5.1246e-04, -1.1142e-03],\n", + " ...,\n", + " [ 5.6336e-03, -7.1940e-04, 1.0906e-01, ..., 3.3881e-02,\n", + " -5.3735e-04, -1.0763e-03],\n", + " [-6.6409e-04, -4.3175e-04, 1.2651e-01, ..., 2.7617e-02,\n", + " -2.0796e-04, -1.3746e-03],\n", + " [-4.2719e-05, -5.6031e-04, 9.6961e-02, ..., 4.4213e-02,\n", + " -6.8219e-04, -7.4224e-04]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[-9.2524e-06, -8.8036e-05, 5.3466e-01, ..., -1.4823e-03,\n", + " -2.8199e-03, -8.9009e-05],\n", + " [ 9.1585e-02, -1.9280e-03, 3.1051e-01, ..., -2.7518e-03,\n", + " -1.8417e-03, -2.9616e-04],\n", + " [ 5.1612e-02, -1.2178e-04, 3.7027e-01, ..., -1.2648e-03,\n", + " -2.0347e-03, 1.6739e-01],\n", + " ...,\n", + " [ 1.2226e-01, -7.4839e-04, 4.6801e-01, ..., -9.8685e-04,\n", + " -1.4788e-03, -1.5626e-04],\n", + " [ 1.2531e-01, -8.6967e-04, 4.0281e-01, ..., -4.5929e-03,\n", + " -2.7199e-03, -1.7427e-03],\n", + " [-9.3191e-04, 7.2431e-02, 4.0898e-01, ..., -2.4345e-04,\n", + " -1.1246e-03, 2.0824e-02]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[ 1.2313e-01, -1.2315e-03, 4.3235e-02, ..., 1.5604e-01,\n", + " 1.3184e-01, -1.1647e-04],\n", + " [ 6.0121e-02, -9.3868e-04, 1.7182e-02, ..., 1.2408e-01,\n", + " 6.2158e-02, -3.9533e-04],\n", + " [ 1.0428e-01, -1.5407e-03, 1.8209e-03, ..., 1.4183e-01,\n", + " 1.5025e-01, 3.2017e-03],\n", + " ...,\n", + " [ 1.2287e-01, -1.2837e-03, 5.9439e-02, ..., 2.1829e-01,\n", + " 9.3009e-02, 2.9073e-02],\n", + " [ 9.8447e-02, -7.6273e-04, 3.9412e-02, ..., 1.9853e-01,\n", + " 1.3036e-01, 2.1036e-02],\n", + " [ 1.2678e-01, -1.1433e-03, 9.9589e-02, ..., 1.6589e-01,\n", + " 1.6371e-01, 2.6737e-02]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-3.3088e-03, 7.5622e-02, -3.4418e-04, ..., 3.1724e-01,\n", + " -7.8832e-04, -2.3204e-03],\n", + " [-3.4688e-03, 1.3810e-01, -1.3776e-03, ..., 4.1719e-01,\n", + " -5.9370e-04, -2.3076e-03],\n", + " [-3.0483e-03, 1.5522e-01, -1.2272e-03, ..., 3.8512e-01,\n", + " -1.0215e-03, -3.5009e-03],\n", + " ...,\n", + " [-4.2063e-03, 1.5270e-01, -9.7728e-04, ..., 2.9216e-01,\n", + " 1.2131e-01, -3.1365e-03],\n", + " [-1.7146e-03, 1.9333e-01, -1.6479e-04, ..., 1.7186e-01,\n", + " 2.8836e-02, -2.9647e-03],\n", + " [-2.0086e-03, 1.8205e-01, 4.2381e-02, ..., 2.8405e-01,\n", + " -2.3128e-04, -2.9348e-03]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 32, 168, 32, 50, 114, 78, 96, 179, 179, 139, 139, 32,\n", + " 179, 179, 179, 179, 9, 9, 711, 512, 416, 492, 492, 388,\n", + " 507, 238, 250, 250, 409, 409, 634, 489, 235, 667, 667, 816,\n", + " 562, 873, 984, 1131, 1078, 792, 1283, 1063, 1063, 791, 876, 1336,\n", + " 1202, 1290, 1197, 1153, 1359, 1137, 1137, 1323, 1323, 1323, 1359, 1251,\n", + " 1251, 1482, 1663, 1602, 1707, 2106, 2106, 1839, 1839, 1876, 1773, 1920,\n", + " 1983, 1983, 1809, 1962, 1983, 1856, 2086, 2197, 2067, 2028, 2397, 2140,\n", + " 2140, 2140, 2268, 2400, 2505, 2505, 2548, 2548, 2521, 2544, 2544, 2756,\n", + " 3108, 2832, 2832, 2805, 3029, 3029, 3029, 3029, 2903, 3094, 3188, 3029,\n", + " 3250, 3325, 3227, 3227, 3227, 3227, 3534, 3564, 3494, 3519, 3445, 3662,\n", + " 3806, 3658, 3869, 3682, 3977, 3993, 3993, 4143, 4521, 4585, 4672, 4970,\n", + " 4576, 4676, 4823, 4650, 4650, 4650, 4788, 4788, 4788, 4731, 4998, 5131,\n", + " 5211, 5605, 5357, 5582, 5515, 5614, 5653, 5703, 5821, 5780, 6059, 6098,\n", + " 6098, 5653, 6098, 5620, 5844, 5903, 5936, 5856, 6345, 6263, 6253, 6338,\n", + " 6284, 6565, 6408, 6408, 6321, 6298, 6405, 6405, 6509, 6432, 6550, 6323,\n", + " 6551, 6589, 6417, 6544, 6581, 6542],\n", + " [ 58, 100, 17, 60, 4, 112, 52, 25, 79, 112, 4, 72,\n", + " 38, 112, 6, 1, 88, 66, 84, 100, 84, 63, 115, 67,\n", + " 17, 4, 100, 48, 102, 129, 64, 116, 59, 100, 70, 44,\n", + " 100, 128, 19, 107, 39, 71, 32, 37, 3, 92, 5, 64,\n", + " 23, 16, 100, 8, 91, 72, 116, 110, 45, 0, 6, 28,\n", + " 69, 32, 18, 53, 23, 74, 90, 120, 11, 106, 86, 123,\n", + " 73, 46, 101, 68, 91, 13, 4, 82, 23, 96, 119, 30,\n", + " 94, 25, 57, 23, 35, 15, 113, 65, 31, 33, 21, 124,\n", + " 14, 21, 93, 29, 43, 108, 56, 4, 72, 18, 72, 7,\n", + " 54, 100, 80, 89, 69, 93, 101, 76, 103, 18, 97, 127,\n", + " 4, 130, 52, 26, 83, 81, 55, 62, 104, 9, 60, 23,\n", + " 77, 87, 123, 63, 105, 98, 75, 4, 111, 10, 72, 87,\n", + " 49, 117, 121, 57, 42, 105, 3, 34, 111, 50, 78, 21,\n", + " 27, 118, 22, 41, 95, 126, 126, 12, 20, 72, 125, 12,\n", + " 47, 36, 114, 99, 51, 80, 124, 85, 117, 29, 102, 122,\n", + " 2, 61, 40, 24, 75, 109]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[5349, 2658, 1512, ..., 2751, 3921, 4661],\n", + " [ 53, 195, 62, ..., 5360, 5360, 5478]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 100, 101, 100, 78, 28, 12, 114, 100, 100, 126, 100, 126,\n", + " 28, 101, 12, 99, 30, 30, 72, 126, 100, 100, 114, 18,\n", + " 114, 114, 100, 101, 30, 72, 87, 69, 87, 87, 44, 28,\n", + " 99, 114, 12, 12, 100, 99, 72, 72, 126, 78, 30, 126,\n", + " 44, 100, 87, 30, 101, 44, 12, 28, 100, 18, 30, 101,\n", + " 101, 101, 101, 44, 99, 100, 126, 78, 87, 78, 78, 72,\n", + " 18, 114, 100, 114, 126, 44, 114, 30, 30, 99, 114, 12,\n", + " 18, 101, 78, 126, 18, 101, 18, 69, 28, 78, 101, 30,\n", + " 28, 114, 18, 99, 28, 44, 78, 69, 44, 18, 99, 12,\n", + " 99, 101, 100, 78, 100, 44, 114, 100, 18, 44, 100, 44,\n", + " 78, 69, 126, 18, 28, 78, 126, 101, 18, 78, 101, 101,\n", + " 87, 126, 99, 126, 69, 87, 126, 114, 30, 101, 126, 100,\n", + " 12, 100, 18, 101, 18, 78, 126, 69, 100, 100, 69, 72,\n", + " 101, 87, 30, 101, 87, 101, 101, 12, 114, 30, 100, 100,\n", + " 100, 78, 30, 69, 126, 28, 101, 28, 69, 100, 72, 18,\n", + " 126, 114, 114, 78, 101, 87, 87, 12, 30, 100, 114, 12,\n", + " 87, 18, 30, 30, 126, 69, 99, 18, 87, 44, 28, 100,\n", + " 100, 87, 30, 18, 30, 12, 69, 100, 12, 100, 28, 78,\n", + " 30, 99, 87, 126, 87, 114, 87, 30, 100, 126, 18, 100,\n", + " 78, 100, 100, 18, 12, 100, 87, 100, 12, 12, 28, 12,\n", + " 100, 18, 18, 12, 100, 126, 78, 12, 87, 100, 18, 100,\n", + " 78, 78, 114, 72, 12, 18, 30, 78, 114, 44, 72, 126,\n", + " 44, 30, 69, 12, 100, 114, 99, 87, 12, 12, 28, 126,\n", + " 44, 44, 30, 99, 44, 69, 100, 100, 30, 72, 99, 99,\n", + " 30, 28, 44, 44, 28, 12, 99, 44, 28, 72, 100, 100,\n", + " 72, 114, 78, 44, 69, 69, 12, 28, 99, 114, 100, 69,\n", + " 114, 78, 87, 87, 69, 114, 87, 18, 72, 72, 72, 69,\n", + " 101, 44, 18, 72, 99, 44, 101, 100, 78, 99, 69, 28,\n", + " 69, 44, 28, 72, 126, 99, 72, 100, 99, 72, 72, 114,\n", + " 69, 44, 72, 99, 69, 69, 72, 126, 72, 28, 99, 28,\n", + " 78, 28, 100, 69, 99, 44, 28, 99, 87, 69, 72, 87,\n", + " 28, 100, 72],\n", + " [ 122, 99, 164, 193, 47, 199, 64, 92, 143, 75, 218, 90,\n", + " 654, 480, 296, 88, 521, 664, 478, 870, 608, 573, 855, 683,\n", + " 585, 201, 833, 754, 699, 861, 834, 733, 583, 680, 549, 885,\n", + " 1125, 826, 963, 789, 1046, 1260, 1114, 523, 1062, 998, 983, 1250,\n", + " 979, 1076, 1203, 986, 1194, 1213, 1121, 1382, 1259, 1221, 1544, 1206,\n", + " 1491, 1310, 1444, 1331, 1340, 1464, 1477, 1704, 1456, 1523, 1338, 1497,\n", + " 1684, 1551, 1610, 1599, 1639, 1419, 1579, 1761, 1764, 1833, 1677, 1819,\n", + " 1712, 1658, 1961, 1535, 1755, 1799, 2166, 1849, 1874, 2068, 1817, 1858,\n", + " 2126, 1992, 1973, 1954, 2190, 2073, 2073, 2206, 2226, 2105, 2436, 2141,\n", + " 2224, 2466, 2271, 2273, 2382, 2369, 2307, 2405, 2402, 2337, 2504, 2301,\n", + " 2232, 2333, 2360, 2484, 2510, 2557, 2424, 2556, 2475, 2539, 2507, 2618,\n", + " 2592, 2559, 2489, 2573, 2601, 2643, 2740, 2631, 2720, 2683, 2664, 2699,\n", + " 2542, 2760, 2701, 2729, 2841, 2956, 2895, 2874, 3160, 3058, 3035, 3079,\n", + " 2952, 3201, 3178, 3151, 3155, 3323, 3207, 3154, 3196, 3228, 3372, 3285,\n", + " 3189, 3380, 3438, 3321, 3216, 3517, 3437, 3451, 3545, 3353, 3357, 3526,\n", + " 3581, 3468, 3788, 3636, 3574, 3593, 3817, 3575, 3776, 3602, 3820, 3728,\n", + " 3657, 3964, 3930, 3895, 3963, 4037, 3873, 3982, 3922, 3913, 4253, 4021,\n", + " 3928, 4154, 4277, 4260, 4151, 4009, 4210, 4098, 4299, 4249, 4196, 4329,\n", + " 4349, 4365, 4359, 4332, 4348, 4369, 4390, 4393, 4371, 4395, 4415, 4405,\n", + " 4438, 4392, 4431, 4389, 4422, 4450, 4426, 4475, 4411, 4402, 4474, 4473,\n", + " 4441, 4477, 4465, 4503, 4487, 4493, 4489, 4501, 4506, 4490, 4486, 4552,\n", + " 4540, 4570, 4538, 4643, 4479, 4500, 4635, 4498, 4534, 4708, 4772, 4667,\n", + " 4683, 4684, 4597, 4671, 4664, 4883, 4860, 4855, 4950, 4990, 4936, 4770,\n", + " 5220, 5179, 4892, 4980, 5231, 5199, 5085, 5163, 5282, 5186, 5061, 5232,\n", + " 5185, 5319, 5246, 5067, 5137, 5315, 5376, 5125, 5168, 5075, 5460, 5227,\n", + " 5209, 5471, 5104, 5370, 5408, 5337, 5483, 5253, 5451, 5423, 5347, 5506,\n", + " 5369, 5442, 5536, 5510, 5538, 5629, 5548, 5621, 5535, 5661, 5927, 5669,\n", + " 5596, 5625, 5771, 5796, 5619, 5523, 5784, 5820, 5649, 5791, 5755, 5860,\n", + " 5914, 5611, 5765, 5714, 5863, 5921, 5831, 5942, 6039, 6086, 6072, 6191,\n", + " 6026, 5957, 6017, 6315, 5758, 6214, 6489, 6319, 6234, 6369, 6187, 6201,\n", + " 6510, 6497, 6538, 6211, 6439, 6548, 6318, 6357, 6254, 6520, 6575, 6537,\n", + " 6607, 6452, 6178]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 135, 135, 246, ..., 5485, 5485, 5481],\n", + " [ 209, 388, 209, ..., 124, 43, 95]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 209, 209, 209, ..., 554, 318, 95],\n", + " [ 114, 6, 240, ..., 5445, 5406, 5473]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5518, 5226, 1043, ..., 3949, 4981, 4901],\n", + " [ 136, 82, 58, ..., 6534, 6602, 6478]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 53, 135, 135, ..., 5518, 5490, 5518],\n", + " [5349, 50, 157, ..., 1845, 344, 3540]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 82, 82, 82, ..., 6550, 6550, 6550],\n", + " [4126, 4032, 4498, ..., 5494, 5513, 4690]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005844\n", + "sampling 0.005686\n", + "noi time: 0.001766\n", + "get_vertex_data call: 0.02579\n", + "noi group time: 0.002822\n", + "eoi_group_time: 0.013616\n", + "second half: 0.181616\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27905, 31149, 31145, ..., 1132473, 1120069, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27905, 31149, 31145, ..., 1132473, 1120069, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224374, 1203797, 1231356, ..., 1935650, 1937149, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224374, 1203797, 1231356, ..., 1935650, 1937149, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1141424, 1136230, 1140275, 1140282, 1136349, 1135926, 1135726,\n", + " 1137784, 1141758, 1137509, 1138335, 1136971, 1143615, 1143609, 1139811,\n", + " 1137947, 1145999, 1138938, 1139241, 1150390, 1150395, 1146640, 1139615,\n", + " 1150497, 1150506, 1150509, 1142963, 1142964, 1149216, 1149219, 1142958,\n", + " 1141883, 1147007, 1153012, 1153016, 1135119, 1148337, 1146661, 1136122,\n", + " 1152666, 1153231, 1137220, 1139365, 1147202, 1136682, 1136685, 1152421,\n", + " 1134718, 1140537, 1154407, 1153463, 1140158, 1134735, 1135913, 1140949,\n", + " 1162456, 1135367, 1135202, 1134960, 1141036, 1134794, 1143381, 1138504,\n", + " 1137329, 1137693, 1137441, 1156159, 1135579, 1141086, 1136097, 1138514,\n", + " 1153099, 1145120, 1137008, 1156909, 1135522, 1135535, 1138436, 1138440,\n", + " 1138447, 1138461, 1138449, 1154790, 1137924, 1136594, 1158390, 1149328,\n", + " 1142611, 1135359, 1148531, 1148533, 1148540, 1137109, 1135769, 1139667,\n", + " 1139673, 1142244, 1134992, 1136551, 1152640, 1135782, 1140201, 1142906,\n", + " 1159009, 1144410, 1153543, 1139933, 1146075, 1152044, 1139071, 1136057,\n", + " 1140662, 1140670, 1137734, 1137728, 1135549, 1140228, 1137898, 1141088,\n", + " 1141098, 1144138, 1139889, 1136392, 1143767, 1154855, 1143224, 1139025,\n", + " 1139033, 1140003, 1149977, 1135860, 1142932, 1136917, 1144230, 1140607,\n", + " 1139495, 1141609, 1134979, 1134987, 1137087, 1137074, 1138482, 1142056,\n", + " 1143153, 1138470, 1149111, 1158595, 1141479, 1138708, 1140110, 1144596,\n", + " 1157414, 1140882, 1135327, 1141403, 1144182, 1144184, 1138539, 1137854,\n", + " 1147153, 1141365, 1141367, 1141375, 1151107, 1140815, 1141725, 1141664,\n", + " 1149101, 1144279, 1143917, 1139508, 1139510, 1139763, 1145004, 1140990,\n", + " 1147050, 1147047, 1141925, 1144242, 1140580, 1141853, 1137149, 1143643,\n", + " 1145982, 1146024, 1146141, 1154328, 1142533, 1149928, 1141236, 1139990,\n", + " 1143294, 1147543, 1147549, 1147540, 1147282, 1142816, 1149366, 1147363,\n", + " 1148003, 1143040, 1136167, 1142586, 1144923, 1157720, 1136836, 1136843,\n", + " 1139329, 1139341, 1139328, 1150188, 1141496, 1144957, 1142159, 1143345,\n", + " 1144766, 1144753, 1144080, 1146514, 1143960, 1138022, 1143456, 1143457,\n", + " 1137697, 1142015, 1146578, 1147574, 1140364, 1143075, 1143087, 1147996,\n", + " 1147999, 1134907, 1144013, 1139252, 1147131, 1148704, 1142690, 1141320,\n", + " 1148473, 1152330, 1143434, 1147249, 1158226, 1141137, 1154526, 1145240,\n", + " 1145751, 1146157, 1138626, 1138638, 1135588, 1146178, 1146189, 1151242,\n", + " 1148223, 1152537, 1150438, 1150445, 1149258, 1144514, 1144526, 1141358,\n", + " 1144203, 1151997, 1151473, 1152022, 1152031, 1154267, 1147019, 1158949,\n", + " 1153568, 1153574, 1147653, 1143560, 1149416, 1148300, 1135079, 1154420,\n", + " 1148180, 1139714, 1139721, 1152436, 1149810, 1148204, 1153124, 1153188,\n", + " 1152921, 1150935, 1150355, 1141017, 1141020, 1147446, 1151816, 1152581,\n", + " 1135307, 1135303, 1154190, 1148505, 1141420, 1150636, 1151356, 1153449,\n", + " 1146969, 1146616, 1146623, 1142989, 1142976, 1150794, 1152100, 1152107,\n", + " 1156325, 1153030, 1153026, 1153037, 1137746, 1137755, 1146307, 1146304,\n", + " 1152623, 1140521, 1154123, 1157824, 1151573, 1151617, 1150578, 1145278,\n", + " 1136134, 1140451, 1153387, 1145963, 1152233, 1152341, 1152342, 1153311,\n", + " 1138283, 1157147, 1152300, 1136028, 1156622, 1151187, 1140675, 1151064,\n", + " 1151071, 1150110, 1153909, 1149273, 1148040, 1155202, 1167408, 1157627,\n", + " 1145652, 1137048, 1148628, 1158530, 1158540, 1137458, 1149940, 1149942,\n", + " 1135705, 1153085, 1135434, 1157547, 1142387, 1158860, 1158857, 1157064,\n", + " 1155412, 1137809, 1137814, 1139473, 1150475, 1146854, 1135729, 1135730,\n", + " 1152179, 1150824, 1150828, 1156935, 1135643, 1147810, 1151469, 1158308,\n", + " 1158311, 1155441, 1137972, 1150494, 1138775, 1172954, 1151379, 1158639,\n", + " 1155374, 1140176, 1155122, 1152527, 1157183, 1149320, 1145793, 1145796,\n", + " 1156463, 1155675, 1156563, 1154555, 1161430, 1136466, 1158824, 1155646,\n", + " 1154644, 1146935, 1154240, 1154091, 1151327, 1154909, 1143524, 1153320,\n", + " 1153326, 1155606, 1150983, 1157288, 1137152, 1153781, 1159108, 1134677,\n", + " 1134685, 1135601, 1135614, 1150661, 1155852, 1158665, 1149138, 1149145,\n", + " 1161116, 1140633, 1152220, 1155439, 1167618, 1151095, 1155884, 1157732,\n", + " 1157735, 1157031, 1144843, 1142466, 1155971, 1155975, 1155950, 1136899,\n", + " 1136896, 1158753, 1158760, 1140215, 1157303, 1159164, 1158815, 1158285,\n", + " 1151615, 1136494, 1159241, 1155299, 1156490, 1153808, 1136640, 1136646,\n", + " 1179175, 1134757, 1166421, 1162021, 1155868, 1155871, 1150011, 1161539,\n", + " 1142666, 1157747, 1167346, 1159042, 1159068, 1159138, 1158300, 1155191,\n", + " 1157939, 1153052, 1153045, 1162835, 1156107, 1138393, 1142679, 1160646,\n", + " 1150032, 1153514, 1153519, 1146870, 1156787, 1154590, 1148025, 1166073,\n", + " 1146063, 1160189, 1165306, 1170415, 1140643, 1148600, 1148603, 1148607,\n", + " 1144501, 1151875, 1158643, 1158651, 1159025, 1159032, 1160892, 1152247,\n", + " 1166909, 1155588, 1156582, 1138679, 1144977, 1147397, 1147837, 1146500,\n", + " 1164580, 1161240, 1152776, 1165415, 1151650, 1159380, 1156739, 1165172,\n", + " 1165182, 1171040, 1144812, 1135564, 1135567, 1180500, 1156303, 1145228,\n", + " 1169282, 1166462, 1144973, 1160730, 1191920, 1166063, 1147689, 1145451,\n", + " 1165744, 1152624, 1145902, 1169544, 1143395, 1171867, 1166657, 1167503,\n", + " 1154076, 1144702, 1154917, 1167817, 1144681, 1169298, 1150518, 1144336,\n", + " 1157531, 1157534, 1147746, 1154660, 1171414, 1154893, 1169154, 1157331,\n", + " 1141043, 1151671, 1169359, 1149688, 1158615, 1158623, 1158049, 1158062,\n", + " 1163292, 1149846, 1172642, 1171479, 1155494, 1152353, 1152360, 1170907,\n", + " 1149404, 1148666, 1167012, 1148335, 1145033, 1154027, 1154023, 1152150,\n", + " 1152152, 1167857, 1194551, 1178097, 1157158, 1157153, 1147711, 1151850,\n", + " 1148128, 1147933, 1166827, 1169038, 1168604, 1177611, 1180475, 1171614,\n", + " 1153436, 1172062, 1171823, 1154148, 1154150, 1179962, 1158176, 1178887,\n", + " 1149173, 1179811, 1178648, 1169772, 1143420, 1156554, 1187247, 1153141,\n", + " 1164818, 1153628, 1182651, 1168771, 1181721, 1161255, 1162129, 1155262,\n", + " 1157792, 1157795, 1171623, 1178361, 1153898, 1153902, 1145626, 1149755,\n", + " 1146252, 1153609, 1153612, 1165225, 1163713, 1183165, 1158768, 1158512,\n", + " 1187090, 1158382, 1155892, 1155895, 1162984, 1157268, 1140399, 1167762,\n", + " 1188243, 1178324, 1181340, 1161819, 1146161, 1166772, 1141516, 1172623,\n", + " 1167670, 1190967, 1139828, 1139831, 1139837, 1150268, 1167135, 1154812,\n", + " 1149666, 1156049, 1156055, 1156057, 1151972, 1181888, 1173058, 1149539,\n", + " 1141002, 1183384, 1169560, 1181283, 1171675, 1178983, 1151774, 1172339,\n", + " 1162502, 1166838, 1174822, 1150413, 1166757, 1182277, 1182817, 1166788,\n", + " 1178135, 1172718, 1155956, 1191501, 1169833, 1191768, 1167471, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1141424, 1136230, 1140275, 1140282, 1136349, 1135926, 1135726,\n", + " 1137784, 1141758, 1137509, 1138335, 1136971, 1143615, 1143609, 1139811,\n", + " 1137947, 1145999, 1138938, 1139241, 1150390, 1150395, 1146640, 1139615,\n", + " 1150497, 1150506, 1150509, 1142963, 1142964, 1149216, 1149219, 1142958,\n", + " 1141883, 1147007, 1153012, 1153016, 1135119, 1148337, 1146661, 1136122,\n", + " 1152666, 1153231, 1137220, 1139365, 1147202, 1136682, 1136685, 1152421,\n", + " 1134718, 1140537, 1154407, 1153463, 1140158, 1134735, 1135913, 1140949,\n", + " 1162456, 1135367, 1135202, 1134960, 1141036, 1134794, 1143381, 1138504,\n", + " 1137329, 1137693, 1137441, 1156159, 1135579, 1141086, 1136097, 1138514,\n", + " 1153099, 1145120, 1137008, 1156909, 1135522, 1135535, 1138436, 1138440,\n", + " 1138447, 1138461, 1138449, 1154790, 1137924, 1136594, 1158390, 1149328,\n", + " 1142611, 1135359, 1148531, 1148533, 1148540, 1137109, 1135769, 1139667,\n", + " 1139673, 1142244, 1134992, 1136551, 1152640, 1135782, 1140201, 1142906,\n", + " 1159009, 1144410, 1153543, 1139933, 1146075, 1152044, 1139071, 1136057,\n", + " 1140662, 1140670, 1137734, 1137728, 1135549, 1140228, 1137898, 1141088,\n", + " 1141098, 1144138, 1139889, 1136392, 1143767, 1154855, 1143224, 1139025,\n", + " 1139033, 1140003, 1149977, 1135860, 1142932, 1136917, 1144230, 1140607,\n", + " 1139495, 1141609, 1134979, 1134987, 1137087, 1137074, 1138482, 1142056,\n", + " 1143153, 1138470, 1149111, 1158595, 1141479, 1138708, 1140110, 1144596,\n", + " 1157414, 1140882, 1135327, 1141403, 1144182, 1144184, 1138539, 1137854,\n", + " 1147153, 1141365, 1141367, 1141375, 1151107, 1140815, 1141725, 1141664,\n", + " 1149101, 1144279, 1143917, 1139508, 1139510, 1139763, 1145004, 1140990,\n", + " 1147050, 1147047, 1141925, 1144242, 1140580, 1141853, 1137149, 1143643,\n", + " 1145982, 1146024, 1146141, 1154328, 1142533, 1149928, 1141236, 1139990,\n", + " 1143294, 1147543, 1147549, 1147540, 1147282, 1142816, 1149366, 1147363,\n", + " 1148003, 1143040, 1136167, 1142586, 1144923, 1157720, 1136836, 1136843,\n", + " 1139329, 1139341, 1139328, 1150188, 1141496, 1144957, 1142159, 1143345,\n", + " 1144766, 1144753, 1144080, 1146514, 1143960, 1138022, 1143456, 1143457,\n", + " 1137697, 1142015, 1146578, 1147574, 1140364, 1143075, 1143087, 1147996,\n", + " 1147999, 1134907, 1144013, 1139252, 1147131, 1148704, 1142690, 1141320,\n", + " 1148473, 1152330, 1143434, 1147249, 1158226, 1141137, 1154526, 1145240,\n", + " 1145751, 1146157, 1138626, 1138638, 1135588, 1146178, 1146189, 1151242,\n", + " 1148223, 1152537, 1150438, 1150445, 1149258, 1144514, 1144526, 1141358,\n", + " 1144203, 1151997, 1151473, 1152022, 1152031, 1154267, 1147019, 1158949,\n", + " 1153568, 1153574, 1147653, 1143560, 1149416, 1148300, 1135079, 1154420,\n", + " 1148180, 1139714, 1139721, 1152436, 1149810, 1148204, 1153124, 1153188,\n", + " 1152921, 1150935, 1150355, 1141017, 1141020, 1147446, 1151816, 1152581,\n", + " 1135307, 1135303, 1154190, 1148505, 1141420, 1150636, 1151356, 1153449,\n", + " 1146969, 1146616, 1146623, 1142989, 1142976, 1150794, 1152100, 1152107,\n", + " 1156325, 1153030, 1153026, 1153037, 1137746, 1137755, 1146307, 1146304,\n", + " 1152623, 1140521, 1154123, 1157824, 1151573, 1151617, 1150578, 1145278,\n", + " 1136134, 1140451, 1153387, 1145963, 1152233, 1152341, 1152342, 1153311,\n", + " 1138283, 1157147, 1152300, 1136028, 1156622, 1151187, 1140675, 1151064,\n", + " 1151071, 1150110, 1153909, 1149273, 1148040, 1155202, 1167408, 1157627,\n", + " 1145652, 1137048, 1148628, 1158530, 1158540, 1137458, 1149940, 1149942,\n", + " 1135705, 1153085, 1135434, 1157547, 1142387, 1158860, 1158857, 1157064,\n", + " 1155412, 1137809, 1137814, 1139473, 1150475, 1146854, 1135729, 1135730,\n", + " 1152179, 1150824, 1150828, 1156935, 1135643, 1147810, 1151469, 1158308,\n", + " 1158311, 1155441, 1137972, 1150494, 1138775, 1172954, 1151379, 1158639,\n", + " 1155374, 1140176, 1155122, 1152527, 1157183, 1149320, 1145793, 1145796,\n", + " 1156463, 1155675, 1156563, 1154555, 1161430, 1136466, 1158824, 1155646,\n", + " 1154644, 1146935, 1154240, 1154091, 1151327, 1154909, 1143524, 1153320,\n", + " 1153326, 1155606, 1150983, 1157288, 1137152, 1153781, 1159108, 1134677,\n", + " 1134685, 1135601, 1135614, 1150661, 1155852, 1158665, 1149138, 1149145,\n", + " 1161116, 1140633, 1152220, 1155439, 1167618, 1151095, 1155884, 1157732,\n", + " 1157735, 1157031, 1144843, 1142466, 1155971, 1155975, 1155950, 1136899,\n", + " 1136896, 1158753, 1158760, 1140215, 1157303, 1159164, 1158815, 1158285,\n", + " 1151615, 1136494, 1159241, 1155299, 1156490, 1153808, 1136640, 1136646,\n", + " 1179175, 1134757, 1166421, 1162021, 1155868, 1155871, 1150011, 1161539,\n", + " 1142666, 1157747, 1167346, 1159042, 1159068, 1159138, 1158300, 1155191,\n", + " 1157939, 1153052, 1153045, 1162835, 1156107, 1138393, 1142679, 1160646,\n", + " 1150032, 1153514, 1153519, 1146870, 1156787, 1154590, 1148025, 1166073,\n", + " 1146063, 1160189, 1165306, 1170415, 1140643, 1148600, 1148603, 1148607,\n", + " 1144501, 1151875, 1158643, 1158651, 1159025, 1159032, 1160892, 1152247,\n", + " 1166909, 1155588, 1156582, 1138679, 1144977, 1147397, 1147837, 1146500,\n", + " 1164580, 1161240, 1152776, 1165415, 1151650, 1159380, 1156739, 1165172,\n", + " 1165182, 1171040, 1144812, 1135564, 1135567, 1180500, 1156303, 1145228,\n", + " 1169282, 1166462, 1144973, 1160730, 1191920, 1166063, 1147689, 1145451,\n", + " 1165744, 1152624, 1145902, 1169544, 1143395, 1171867, 1166657, 1167503,\n", + " 1154076, 1144702, 1154917, 1167817, 1144681, 1169298, 1150518, 1144336,\n", + " 1157531, 1157534, 1147746, 1154660, 1171414, 1154893, 1169154, 1157331,\n", + " 1141043, 1151671, 1169359, 1149688, 1158615, 1158623, 1158049, 1158062,\n", + " 1163292, 1149846, 1172642, 1171479, 1155494, 1152353, 1152360, 1170907,\n", + " 1149404, 1148666, 1167012, 1148335, 1145033, 1154027, 1154023, 1152150,\n", + " 1152152, 1167857, 1194551, 1178097, 1157158, 1157153, 1147711, 1151850,\n", + " 1148128, 1147933, 1166827, 1169038, 1168604, 1177611, 1180475, 1171614,\n", + " 1153436, 1172062, 1171823, 1154148, 1154150, 1179962, 1158176, 1178887,\n", + " 1149173, 1179811, 1178648, 1169772, 1143420, 1156554, 1187247, 1153141,\n", + " 1164818, 1153628, 1182651, 1168771, 1181721, 1161255, 1162129, 1155262,\n", + " 1157792, 1157795, 1171623, 1178361, 1153898, 1153902, 1145626, 1149755,\n", + " 1146252, 1153609, 1153612, 1165225, 1163713, 1183165, 1158768, 1158512,\n", + " 1187090, 1158382, 1155892, 1155895, 1162984, 1157268, 1140399, 1167762,\n", + " 1188243, 1178324, 1181340, 1161819, 1146161, 1166772, 1141516, 1172623,\n", + " 1167670, 1190967, 1139828, 1139831, 1139837, 1150268, 1167135, 1154812,\n", + " 1149666, 1156049, 1156055, 1156057, 1151972, 1181888, 1173058, 1149539,\n", + " 1141002, 1183384, 1169560, 1181283, 1171675, 1178983, 1151774, 1172339,\n", + " 1162502, 1166838, 1174822, 1150413, 1166757, 1182277, 1182817, 1166788,\n", + " 1178135, 1172718, 1155956, 1191501, 1169833, 1191768, 1167471, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195452, 1198242, 1197228, 1201307, 1200108, 1198449, 1198458, 1202255,\n", + " 1201582, 1202119, 1194626, 1199248, 1201016, 1201660, 1198697, 1198702,\n", + " 1196871, 1202804, 1198546, 1194866, 1196672, 1198180, 1194783, 1196631,\n", + " 1194649, 1195514, 1195263, 1201992, 1198542, 1199519, 1195888, 1195895,\n", + " 1199172, 1195740, 1196359, 1198036, 1196704, 1196717, 1195145, 1195265,\n", + " 1195270, 1196242, 1194859, 1198219, 1195847, 1198915, 1195541, 1197474,\n", + " 1200032, 1199697, 1196393, 1196283, 1196272, 1198282, 1199333, 1200959,\n", + " 1199060, 1199185, 1197628, 1199628, 1197676, 1197990, 1200872, 1198400,\n", + " 1199231, 1201911, 1195017, 1200116, 1200118, 1199676, 1194795, 1198762,\n", + " 1198763, 1200052, 1197609, 1196727, 1195771, 1195773, 1202618, 1200887,\n", + " 1200893, 1198434, 1198428, 1200592, 1201534, 1201547, 1199087, 1200570,\n", + " 1200501, 1200507, 1198066, 1199445, 1198797, 1201153, 1202401, 1200927,\n", + " 1200363, 1202499, 1200546, 1200553, 1200315, 1200429, 1200351, 1202103,\n", + " 1199909, 1196779, 1201455, 1201442, 1197945, 1202239, 1202338, 1195876,\n", + " 1195887, 1201291, 1195607, 1195610, 1203336, 1199929, 1196960, 1200784,\n", + " 1200785, 1199606, 1203112, 1195679, 1195664, 1197334, 1198897, 1198898,\n", + " 1197816, 1197822, 1197499, 1195074, 1194898, 1196602, 1196605, 1198299,\n", + " 1203102, 1194720, 1195157, 1198147, 1198824, 1197735, 1199782, 1195070,\n", + " 1201880, 1201886, 1200296, 1197652, 1197335, 1201361, 1202321, 1197872],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195452, 1198242, 1197228, 1201307, 1200108, 1198449, 1198458, 1202255,\n", + " 1201582, 1202119, 1194626, 1199248, 1201016, 1201660, 1198697, 1198702,\n", + " 1196871, 1202804, 1198546, 1194866, 1196672, 1198180, 1194783, 1196631,\n", + " 1194649, 1195514, 1195263, 1201992, 1198542, 1199519, 1195888, 1195895,\n", + " 1199172, 1195740, 1196359, 1198036, 1196704, 1196717, 1195145, 1195265,\n", + " 1195270, 1196242, 1194859, 1198219, 1195847, 1198915, 1195541, 1197474,\n", + " 1200032, 1199697, 1196393, 1196283, 1196272, 1198282, 1199333, 1200959,\n", + " 1199060, 1199185, 1197628, 1199628, 1197676, 1197990, 1200872, 1198400,\n", + " 1199231, 1201911, 1195017, 1200116, 1200118, 1199676, 1194795, 1198762,\n", + " 1198763, 1200052, 1197609, 1196727, 1195771, 1195773, 1202618, 1200887,\n", + " 1200893, 1198434, 1198428, 1200592, 1201534, 1201547, 1199087, 1200570,\n", + " 1200501, 1200507, 1198066, 1199445, 1198797, 1201153, 1202401, 1200927,\n", + " 1200363, 1202499, 1200546, 1200553, 1200315, 1200429, 1200351, 1202103,\n", + " 1199909, 1196779, 1201455, 1201442, 1197945, 1202239, 1202338, 1195876,\n", + " 1195887, 1201291, 1195607, 1195610, 1203336, 1199929, 1196960, 1200784,\n", + " 1200785, 1199606, 1203112, 1195679, 1195664, 1197334, 1198897, 1198898,\n", + " 1197816, 1197822, 1197499, 1195074, 1194898, 1196602, 1196605, 1198299,\n", + " 1203102, 1194720, 1195157, 1198147, 1198824, 1197735, 1199782, 1195070,\n", + " 1201880, 1201886, 1200296, 1197652, 1197335, 1201361, 1202321, 1197872],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[-3.3855e-04, -5.2821e-04, 1.6372e-01, ..., 2.1640e-02,\n", + " -3.7389e-04, -1.4769e-03],\n", + " [-3.5606e-05, -3.9514e-05, 1.2650e-01, ..., 4.7621e-02,\n", + " -7.0798e-04, -1.6990e-03],\n", + " [-2.9742e-04, -5.3830e-04, 1.7134e-01, ..., 2.6033e-02,\n", + " -3.8603e-04, -1.5203e-03],\n", + " ...,\n", + " [-2.7015e-04, -4.0198e-04, 1.4124e-01, ..., 4.3703e-02,\n", + " -3.4471e-04, -1.6911e-03],\n", + " [-2.2163e-04, -3.3995e-04, 1.6741e-01, ..., 2.7298e-02,\n", + " -6.0981e-04, -1.6975e-03],\n", + " [-1.7838e-04, -4.1599e-04, 1.7554e-02, ..., 2.9953e-02,\n", + " -9.3234e-04, -1.2398e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 4.0853e-01, -7.8893e-03, 5.4460e-01, ..., 1.1122e-01,\n", + " -9.7684e-04, 3.7077e-01],\n", + " [ 4.5245e-01, -6.9063e-03, 6.7434e-01, ..., -3.6337e-04,\n", + " -1.0425e-03, 3.4880e-01],\n", + " [ 4.1256e-01, -7.9137e-03, 5.8686e-01, ..., -7.5619e-04,\n", + " -2.6393e-03, 5.5072e-01],\n", + " ...,\n", + " [ 3.8066e-01, -5.8842e-03, 7.0199e-01, ..., 5.7336e-02,\n", + " -1.1370e-03, 2.9465e-01],\n", + " [ 3.8590e-01, -6.7215e-03, 5.8850e-01, ..., 8.1367e-02,\n", + " -2.1122e-03, 5.4876e-01],\n", + " [ 1.4104e-01, -5.0527e-03, 7.4033e-01, ..., 1.8577e-01,\n", + " -6.5082e-05, 3.4324e-01]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[ 2.3824e-01, -1.0684e-03, 4.6512e-02, ..., 7.2125e-02,\n", + " 8.7540e-02, 6.7963e-03],\n", + " [ 1.6396e-01, -7.2379e-04, 3.7181e-02, ..., 5.4701e-02,\n", + " 4.3050e-02, 8.4836e-02],\n", + " [ 1.4473e-01, -1.9317e-03, 7.3142e-02, ..., 3.7268e-02,\n", + " 1.0653e-01, 7.9459e-03],\n", + " ...,\n", + " [ 2.0639e-01, -2.2806e-03, -1.3830e-04, ..., 1.6120e-02,\n", + " 1.7929e-01, 1.1757e-01],\n", + " [ 2.0159e-01, -1.3868e-03, 2.7979e-02, ..., 1.9554e-02,\n", + " 7.6159e-02, 5.7358e-02],\n", + " [ 2.0789e-01, -1.7571e-03, 4.5025e-02, ..., -1.4587e-04,\n", + " 1.5028e-01, 9.3147e-02]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-3.3753e-03, 1.3101e-01, -1.9763e-03, ..., 4.0760e-01,\n", + " -7.4483e-04, -3.8665e-03],\n", + " [-6.5380e-03, 2.3802e-01, -2.2896e-03, ..., 6.2246e-01,\n", + " -6.9901e-04, -4.1383e-03],\n", + " [-4.1073e-03, 1.9721e-01, -1.1560e-03, ..., 4.9050e-01,\n", + " -1.4560e-03, -4.3834e-03],\n", + " ...,\n", + " [-5.2481e-03, 1.9079e-01, -2.4388e-03, ..., 6.7728e-01,\n", + " -1.3333e-03, -4.5971e-03],\n", + " [-4.9956e-03, 9.8415e-02, -2.0765e-03, ..., 4.2126e-01,\n", + " -8.5526e-04, -3.7268e-03],\n", + " [-5.5851e-03, 2.2843e-01, -1.9299e-03, ..., 7.0051e-01,\n", + " -1.1909e-03, -5.2776e-03]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 32, 79, 79, 170, 114, 143, 168, 168, 168, 295, 398, 671,\n", + " 385, 316, 316, 592, 424, 441, 737, 678, 539, 539, 759, 715,\n", + " 715, 407, 777, 1275, 1046, 1007, 1178, 1096, 1093, 1093, 800, 1254,\n", + " 793, 1102, 903, 903, 1299, 1101, 1101, 1356, 1371, 1316, 1278, 1289,\n", + " 1282, 1282, 1282, 1299, 1299, 1450, 1605, 1605, 1610, 1592, 1592, 1729,\n", + " 1495, 1782, 1804, 1811, 1845, 1570, 1570, 1570, 1675, 1752, 1706, 2117,\n", + " 1993, 1777, 1861, 2158, 2215, 2199, 2419, 2318, 2346, 2371, 2346, 2346,\n", + " 2360, 2481, 2680, 2680, 2481, 2705, 3042, 2678, 2929, 2929, 2929, 3072,\n", + " 2846, 2949, 3199, 3168, 3335, 2961, 3361, 3437, 3602, 3590, 3555, 3820,\n", + " 3816, 3747, 3975, 3681, 3753, 3753, 3803, 3848, 3848, 4030, 4030, 4139,\n", + " 4142, 4200, 4178, 4197, 4195, 4195, 4193, 4251, 4248, 4349, 4594, 4400,\n", + " 4360, 4501, 4364, 4506, 4532, 4532, 4532, 4648, 4733, 4441, 4549, 4731,\n", + " 4610, 4786, 4898, 4898, 5133, 4890, 5093, 4918, 5100, 4788, 4788, 5074,\n", + " 5039, 5039, 5192, 5039, 5340, 5284, 5467, 5427, 5427, 5379, 5420, 5590,\n", + " 5598, 5776, 5776, 5365, 5552, 5493, 5621, 5525, 5986, 6019, 6019, 5748,\n", + " 5872, 6085, 6085, 5790, 5931, 6135, 6287, 6216, 6111, 6111, 5981, 6132,\n", + " 6274, 6173, 6140, 6140, 6290, 6064, 5917, 6376, 5737, 6383, 6420, 6420,\n", + " 6420, 6168, 6286, 6186, 6187, 6187, 6186, 6186, 6098, 6098, 6423, 6604,\n", + " 6468, 6468, 6446, 6303, 6444, 6444, 6363, 6363, 6363, 6592, 6592, 6547,\n", + " 6547],\n", + " [ 12, 7, 126, 105, 140, 129, 144, 68, 127, 28, 67, 43,\n", + " 38, 136, 147, 118, 5, 13, 89, 14, 78, 25, 148, 31,\n", + " 7, 21, 48, 56, 10, 147, 63, 39, 103, 17, 111, 15,\n", + " 3, 0, 109, 98, 26, 39, 17, 108, 86, 12, 115, 71,\n", + " 7, 30, 133, 128, 27, 147, 123, 33, 53, 134, 94, 1,\n", + " 103, 25, 35, 61, 119, 2, 0, 81, 33, 86, 100, 123,\n", + " 63, 1, 103, 106, 65, 113, 41, 1, 115, 139, 52, 64,\n", + " 49, 98, 7, 54, 104, 88, 60, 93, 36, 75, 57, 75,\n", + " 65, 65, 18, 150, 79, 119, 34, 148, 78, 26, 23, 151,\n", + " 112, 104, 100, 45, 70, 31, 105, 99, 83, 78, 25, 150,\n", + " 80, 90, 102, 96, 122, 107, 88, 58, 137, 125, 102, 116,\n", + " 75, 102, 102, 102, 28, 13, 62, 143, 0, 22, 145, 11,\n", + " 117, 69, 28, 51, 62, 85, 32, 34, 70, 75, 132, 78,\n", + " 75, 37, 0, 9, 59, 72, 75, 82, 97, 24, 149, 77,\n", + " 118, 92, 59, 25, 135, 141, 7, 147, 131, 75, 146, 124,\n", + " 124, 123, 147, 6, 75, 74, 40, 4, 44, 75, 29, 95,\n", + " 110, 55, 28, 62, 47, 124, 63, 75, 19, 120, 138, 7,\n", + " 20, 8, 76, 133, 75, 57, 19, 46, 73, 130, 87, 78,\n", + " 77, 66, 121, 50, 42, 142, 114, 16, 84, 75, 91, 101,\n", + " 75]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 948, 1476, 1825, ..., 2905, 1206, 2649],\n", + " [ 95, 302, 55, ..., 5909, 6017, 6083]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 70, 70, 102, ..., 31, 119, 87],\n", + " [ 16, 202, 63, ..., 6284, 6245, 6623]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 160, 160, 160, ..., 5990, 6057, 6074],\n", + " [ 191, 506, 237, ..., 63, 539, 664]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 486, 486, 141, ..., 634, 237, 215],\n", + " [ 95, 161, 254, ..., 6070, 6045, 6001]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1509, 6073, 1916, ..., 5464, 147, 3561],\n", + " [ 112, 22, 92, ..., 6556, 6519, 6585]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 147, 298, 227, ..., 6059, 6050, 6050],\n", + " [3096, 104, 2623, ..., 2139, 4398, 4362]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 170, 170, 170, ..., 6547, 6547, 6547],\n", + " [3663, 3616, 4542, ..., 4192, 5543, 3305]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006499\n", + "sampling 0.006341\n", + "noi time: 0.003235\n", + "get_vertex_data call: 0.031288\n", + "noi group time: 0.009071\n", + "eoi_group_time: 0.014969\n", + "second half: 0.193184\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24187, 32616, 3253, ..., 1119693, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24187, 32616, 3253, ..., 1119693, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210591, 1209798, 1205183, ..., 1933652, 1929319, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210591, 1209798, 1205183, ..., 1933652, 1929319, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137426, 1137429, 1141424, 1140282, 1135926, 1135716, 1137783, 1141756,\n", + " 1141758, 1137506, 1138335, 1136215, 1141251, 1141257, 1140293, 1142802,\n", + " 1136971, 1141440, 1141443, 1138897, 1138909, 1143615, 1154771, 1145374,\n", + " 1138938, 1139143, 1143372, 1139613, 1140781, 1148584, 1149216, 1149220,\n", + " 1142947, 1155683, 1155689, 1143820, 1149633, 1147473, 1147483, 1147484,\n", + " 1144636, 1144632, 1135251, 1149038, 1153009, 1134701, 1135950, 1148346,\n", + " 1146669, 1146472, 1136112, 1152666, 1152667, 1153231, 1147095, 1137220,\n", + " 1145419, 1155014, 1155013, 1139371, 1147202, 1136683, 1136685, 1134710,\n", + " 1134807, 1138742, 1140304, 1140537, 1138112, 1137254, 1137172, 1140953,\n", + " 1135367, 1135202, 1135903, 1154739, 1136291, 1136297, 1134794, 1143377,\n", + " 1138504, 1137329, 1136189, 1137693, 1135333, 1135337, 1144786, 1136826,\n", + " 1157400, 1152376, 1137441, 1136199, 1136928, 1156159, 1139161, 1135579,\n", + " 1135583, 1141078, 1141081, 1140970, 1138514, 1138525, 1153099, 1137957,\n", + " 1158136, 1154132, 1135522, 1139684, 1137287, 1157706, 1138436, 1138440,\n", + " 1138461, 1138449, 1160590, 1154790, 1149328, 1135088, 1147111, 1147112,\n", + " 1142611, 1158987, 1145843, 1145845, 1148531, 1139844, 1136457, 1138069,\n", + " 1142255, 1134992, 1142785, 1152654, 1148805, 1135781, 1135789, 1136723,\n", + " 1158961, 1158974, 1139327, 1159012, 1144410, 1153544, 1140856, 1143631,\n", + " 1140034, 1137587, 1141963, 1152042, 1152044, 1139064, 1142299, 1137734,\n", + " 1137728, 1146222, 1140228, 1141088, 1141094, 1141098, 1144138, 1141980,\n", + " 1143767, 1137297, 1137299, 1143225, 1140005, 1140009, 1140000, 1142499,\n", + " 1141695, 1154467, 1139436, 1161175, 1141224, 1141223, 1139386, 1136917,\n", + " 1139739, 1137185, 1144230, 1140607, 1141155, 1141161, 1146449, 1141785,\n", + " 1141786, 1139495, 1144934, 1168566, 1141300, 1144650, 1134987, 1136851,\n", + " 1136852, 1137072, 1137074, 1149435, 1144428, 1141810, 1141821, 1139266,\n", + " 1158749, 1138464, 1138469, 1137766, 1149111, 1148872, 1137058, 1138708,\n", + " 1142913, 1144596, 1136867, 1136864, 1140432, 1144180, 1150906, 1146201,\n", + " 1139559, 1158690, 1137841, 1147153, 1136376, 1141365, 1141367, 1153068,\n", + " 1141672, 1149097, 1143907, 1143915, 1143917, 1139508, 1139510, 1139519,\n", + " 1139763, 1139127, 1144992, 1145001, 1145200, 1145213, 1140979, 1140990,\n", + " 1146695, 1147050, 1145885, 1145873, 1149876, 1143551, 1152976, 1135457,\n", + " 1139453, 1141925, 1146901, 1144242, 1145328, 1140582, 1150692, 1148313,\n", + " 1137570, 1143845, 1143851, 1136277, 1136275, 1146019, 1146024, 1146017,\n", + " 1141646, 1141585, 1147084, 1139990, 1143293, 1143283, 1143294, 1151120,\n", + " 1143876, 1147541, 1147540, 1147282, 1142816, 1147469, 1143656, 1139417,\n", + " 1139415, 1146084, 1143040, 1142586, 1136836, 1136843, 1139329, 1139328,\n", + " 1141490, 1141496, 1144957, 1142149, 1142158, 1143345, 1144765, 1144753,\n", + " 1144609, 1144619, 1140844, 1140836, 1137098, 1144310, 1135813, 1146523,\n", + " 1143960, 1143959, 1143456, 1143457, 1137697, 1143937, 1135451, 1147574,\n", + " 1147523, 1140364, 1137990, 1168914, 1148962, 1148966, 1148969, 1147999,\n", + " 1134902, 1147128, 1147131, 1148704, 1141327, 1153701, 1152328, 1143434,\n", + " 1147071, 1147025, 1141131, 1145017, 1139547, 1158226, 1158235, 1148365,\n", + " 1154526, 1145240, 1145246, 1145750, 1145751, 1142370, 1142376, 1142383,\n", + " 1146178, 1138861, 1151242, 1152530, 1149258, 1149263, 1148826, 1144514,\n", + " 1144526, 1151994, 1151997, 1151480, 1152022, 1152024, 1145263, 1145262,\n", + " 1146723, 1149588, 1150127, 1147021, 1147023, 1158959, 1141949, 1144828,\n", + " 1151803, 1150722, 1153574, 1147653, 1147659, 1149412, 1137727, 1148615,\n", + " 1148623, 1154420, 1158797, 1139721, 1146679, 1146682, 1146686, 1146547,\n", + " 1146559, 1150053, 1148204, 1153124, 1153192, 1153188, 1153197, 1145111,\n", + " 1167960, 1155547, 1150929, 1150935, 1152875, 1143092, 1144849, 1150356,\n", + " 1143127, 1143134, 1147442, 1151816, 1152581, 1151906, 1150708, 1150715,\n", + " 1148498, 1148502, 1149732, 1141420, 1136002, 1155156, 1147737, 1145080,\n", + " 1148949, 1146975, 1156402, 1146616, 1146623, 1152407, 1152415, 1150794,\n", + " 1152097, 1153030, 1153037, 1150085, 1137746, 1137755, 1146307, 1146304,\n", + " 1152622, 1140521, 1155140, 1136410, 1157104, 1152819, 1155337, 1154123,\n", + " 1157824, 1157833, 1139581, 1151627, 1151617, 1150578, 1150588, 1136131,\n", + " 1136134, 1136798, 1145952, 1152233, 1138991, 1152903, 1152341, 1146816,\n", + " 1156831, 1138275, 1138276, 1138279, 1138281, 1156007, 1156000, 1156005,\n", + " 1136028, 1158712, 1158704, 1156619, 1151187, 1152928, 1142777, 1156420,\n", + " 1150164, 1144018, 1148033, 1148035, 1148040, 1152601, 1155226, 1145656,\n", + " 1149794, 1144659, 1144667, 1137041, 1137047, 1137048, 1148628, 1158530,\n", + " 1158540, 1137458, 1149942, 1149943, 1135705, 1135707, 1142047, 1157229,\n", + " 1157546, 1158860, 1158856, 1150872, 1150877, 1158919, 1156505, 1157069,\n", + " 1157063, 1155408, 1155418, 1152833, 1137823, 1139479, 1150465, 1146851,\n", + " 1135222, 1135729, 1135740, 1152182, 1156638, 1151788, 1156935, 1135645,\n", + " 1147810, 1137625, 1139525, 1139524, 1158308, 1158311, 1151271, 1151340,\n", + " 1155441, 1153359, 1150132, 1150136, 1138573, 1145768, 1142755, 1160440,\n", + " 1157637, 1151386, 1151379, 1158639, 1155374, 1155375, 1140187, 1155122,\n", + " 1152519, 1152526, 1152527, 1157172, 1149321, 1149519, 1151424, 1156463,\n", + " 1158096, 1154763, 1155628, 1158491, 1158494, 1158824, 1153715, 1158325,\n", + " 1155646, 1143257, 1146935, 1154250, 1164292, 1156711, 1137359, 1154909,\n", + " 1157439, 1157430, 1150068, 1144711, 1155613, 1141627, 1150976, 1150987,\n", + " 1155281, 1155284, 1157928, 1137152, 1157663, 1158996, 1153786, 1155026,\n", + " 1158085, 1145682, 1134683, 1135601, 1148149, 1148159, 1155848, 1158671,\n", + " 1149145, 1156085, 1140634, 1144463, 1152209, 1152220, 1152208, 1140374,\n", + " 1155884, 1157031, 1144843, 1155971, 1155975, 1161676, 1158841, 1156811,\n", + " 1156812, 1161472, 1149700, 1166126, 1136899, 1136909, 1136896, 1157304,\n", + " 1158285, 1152463, 1136480, 1136494, 1164181, 1154387, 1152143, 1153808,\n", + " 1156278, 1156286, 1136646, 1163116, 1140049, 1157858, 1142178, 1158545,\n", + " 1158558, 1156525, 1146123, 1146126, 1138108, 1138110, 1155866, 1158006,\n", + " 1155521, 1161539, 1135662, 1157759, 1157751, 1159287, 1167359, 1159054,\n", + " 1163556, 1172279, 1153052, 1153045, 1171551, 1163075, 1155763, 1156235,\n", + " 1161925, 1166256, 1142865, 1156104, 1138393, 1150046, 1149063, 1145945,\n", + " 1155479, 1151020, 1153514, 1157600, 1138161, 1138163, 1164006, 1149963,\n", + " 1154590, 1160764, 1139286, 1139281, 1136813, 1162737, 1148771, 1171509,\n", + " 1146059, 1146356, 1158461, 1164048, 1140130, 1158868, 1158866, 1140641,\n", + " 1140643, 1148600, 1148603, 1148604, 1156363, 1141792, 1158643, 1159032,\n", + " 1165604, 1169105, 1178154, 1163968, 1163972, 1158911, 1160600, 1162550,\n", + " 1156589, 1151227, 1153931, 1168527, 1146500, 1146510, 1164580, 1144747,\n", + " 1152776, 1153204, 1141471, 1147426, 1147427, 1157044, 1157051, 1149890,\n", + " 1182247, 1156739, 1163480, 1167373, 1150648, 1150651, 1166638, 1144810,\n", + " 1144812, 1164750, 1142722, 1142733, 1156300, 1163777, 1166919, 1145567,\n", + " 1171683, 1184040, 1143037, 1143025, 1166054, 1169233, 1147694, 1147355,\n", + " 1152635, 1152624, 1139359, 1147724, 1145900, 1145902, 1153520, 1168659,\n", + " 1168660, 1171578, 1175240, 1143397, 1143402, 1143404, 1170982, 1158722,\n", + " 1154076, 1147336, 1145674, 1150773, 1170676, 1149130, 1169602, 1166653,\n", + " 1169304, 1145326, 1155180, 1155170, 1154212, 1150525, 1150518, 1156119,\n", + " 1154618, 1154617, 1144344, 1144346, 1144336, 1157534, 1147751, 1147745,\n", + " 1147757, 1154670, 1169162, 1157331, 1138129, 1141043, 1169359, 1150026,\n", + " 1154364, 1154354, 1149452, 1147495, 1147502, 1158611, 1158623, 1158060,\n", + " 1158062, 1173047, 1149847, 1169951, 1152353, 1175689, 1152546, 1155932,\n", + " 1161130, 1149402, 1171847, 1172838, 1173307, 1176768, 1145033, 1157158,\n", + " 1157153, 1155471, 1147711, 1151850, 1148131, 1169913, 1147925, 1169687,\n", + " 1135021, 1170688, 1155739, 1168819, 1175818, 1166028, 1174845, 1171080,\n", + " 1166684, 1171823, 1150234, 1154151, 1154148, 1158176, 1158187, 1149169,\n", + " 1149173, 1171931, 1186117, 1167658, 1143420, 1171302, 1159404, 1153803,\n", + " 1164826, 1177162, 1171122, 1180831, 1158027, 1158031, 1157795, 1181389,\n", + " 1155804, 1155796, 1157126, 1158253, 1153898, 1153902, 1164560, 1145626,\n", + " 1156433, 1178774, 1178757, 1179444, 1149753, 1149755, 1166959, 1163717,\n", + " 1157760, 1157761, 1155990, 1182703, 1158512, 1158517, 1155892, 1155899,\n", + " 1162977, 1140399, 1185405, 1171594, 1169064, 1177764, 1171633, 1180517,\n", + " 1185698, 1188842, 1182337, 1163422, 1154957, 1170349, 1147182, 1193440,\n", + " 1168943, 1190733, 1139828, 1139831, 1149677, 1192076, 1182067, 1156055,\n", + " 1146396, 1182891, 1186750, 1178523, 1170710, 1169959, 1181939, 1182555,\n", + " 1182060, 1193471, 1188360, 1170881, 1192331, 1188817, 1153729, 1193232,\n", + " 1185869, 1162502, 1181824, 1186573, 1191587, 1175349, 1167089, 1161857,\n", + " 1180786, 1158064, 1145395, 1178136, 1179750, 1179757, 1155959, 1172896,\n", + " 1186393, 1163071, 1189794, 1188718, 1157008, 1157017, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137426, 1137429, 1141424, 1140282, 1135926, 1135716, 1137783, 1141756,\n", + " 1141758, 1137506, 1138335, 1136215, 1141251, 1141257, 1140293, 1142802,\n", + " 1136971, 1141440, 1141443, 1138897, 1138909, 1143615, 1154771, 1145374,\n", + " 1138938, 1139143, 1143372, 1139613, 1140781, 1148584, 1149216, 1149220,\n", + " 1142947, 1155683, 1155689, 1143820, 1149633, 1147473, 1147483, 1147484,\n", + " 1144636, 1144632, 1135251, 1149038, 1153009, 1134701, 1135950, 1148346,\n", + " 1146669, 1146472, 1136112, 1152666, 1152667, 1153231, 1147095, 1137220,\n", + " 1145419, 1155014, 1155013, 1139371, 1147202, 1136683, 1136685, 1134710,\n", + " 1134807, 1138742, 1140304, 1140537, 1138112, 1137254, 1137172, 1140953,\n", + " 1135367, 1135202, 1135903, 1154739, 1136291, 1136297, 1134794, 1143377,\n", + " 1138504, 1137329, 1136189, 1137693, 1135333, 1135337, 1144786, 1136826,\n", + " 1157400, 1152376, 1137441, 1136199, 1136928, 1156159, 1139161, 1135579,\n", + " 1135583, 1141078, 1141081, 1140970, 1138514, 1138525, 1153099, 1137957,\n", + " 1158136, 1154132, 1135522, 1139684, 1137287, 1157706, 1138436, 1138440,\n", + " 1138461, 1138449, 1160590, 1154790, 1149328, 1135088, 1147111, 1147112,\n", + " 1142611, 1158987, 1145843, 1145845, 1148531, 1139844, 1136457, 1138069,\n", + " 1142255, 1134992, 1142785, 1152654, 1148805, 1135781, 1135789, 1136723,\n", + " 1158961, 1158974, 1139327, 1159012, 1144410, 1153544, 1140856, 1143631,\n", + " 1140034, 1137587, 1141963, 1152042, 1152044, 1139064, 1142299, 1137734,\n", + " 1137728, 1146222, 1140228, 1141088, 1141094, 1141098, 1144138, 1141980,\n", + " 1143767, 1137297, 1137299, 1143225, 1140005, 1140009, 1140000, 1142499,\n", + " 1141695, 1154467, 1139436, 1161175, 1141224, 1141223, 1139386, 1136917,\n", + " 1139739, 1137185, 1144230, 1140607, 1141155, 1141161, 1146449, 1141785,\n", + " 1141786, 1139495, 1144934, 1168566, 1141300, 1144650, 1134987, 1136851,\n", + " 1136852, 1137072, 1137074, 1149435, 1144428, 1141810, 1141821, 1139266,\n", + " 1158749, 1138464, 1138469, 1137766, 1149111, 1148872, 1137058, 1138708,\n", + " 1142913, 1144596, 1136867, 1136864, 1140432, 1144180, 1150906, 1146201,\n", + " 1139559, 1158690, 1137841, 1147153, 1136376, 1141365, 1141367, 1153068,\n", + " 1141672, 1149097, 1143907, 1143915, 1143917, 1139508, 1139510, 1139519,\n", + " 1139763, 1139127, 1144992, 1145001, 1145200, 1145213, 1140979, 1140990,\n", + " 1146695, 1147050, 1145885, 1145873, 1149876, 1143551, 1152976, 1135457,\n", + " 1139453, 1141925, 1146901, 1144242, 1145328, 1140582, 1150692, 1148313,\n", + " 1137570, 1143845, 1143851, 1136277, 1136275, 1146019, 1146024, 1146017,\n", + " 1141646, 1141585, 1147084, 1139990, 1143293, 1143283, 1143294, 1151120,\n", + " 1143876, 1147541, 1147540, 1147282, 1142816, 1147469, 1143656, 1139417,\n", + " 1139415, 1146084, 1143040, 1142586, 1136836, 1136843, 1139329, 1139328,\n", + " 1141490, 1141496, 1144957, 1142149, 1142158, 1143345, 1144765, 1144753,\n", + " 1144609, 1144619, 1140844, 1140836, 1137098, 1144310, 1135813, 1146523,\n", + " 1143960, 1143959, 1143456, 1143457, 1137697, 1143937, 1135451, 1147574,\n", + " 1147523, 1140364, 1137990, 1168914, 1148962, 1148966, 1148969, 1147999,\n", + " 1134902, 1147128, 1147131, 1148704, 1141327, 1153701, 1152328, 1143434,\n", + " 1147071, 1147025, 1141131, 1145017, 1139547, 1158226, 1158235, 1148365,\n", + " 1154526, 1145240, 1145246, 1145750, 1145751, 1142370, 1142376, 1142383,\n", + " 1146178, 1138861, 1151242, 1152530, 1149258, 1149263, 1148826, 1144514,\n", + " 1144526, 1151994, 1151997, 1151480, 1152022, 1152024, 1145263, 1145262,\n", + " 1146723, 1149588, 1150127, 1147021, 1147023, 1158959, 1141949, 1144828,\n", + " 1151803, 1150722, 1153574, 1147653, 1147659, 1149412, 1137727, 1148615,\n", + " 1148623, 1154420, 1158797, 1139721, 1146679, 1146682, 1146686, 1146547,\n", + " 1146559, 1150053, 1148204, 1153124, 1153192, 1153188, 1153197, 1145111,\n", + " 1167960, 1155547, 1150929, 1150935, 1152875, 1143092, 1144849, 1150356,\n", + " 1143127, 1143134, 1147442, 1151816, 1152581, 1151906, 1150708, 1150715,\n", + " 1148498, 1148502, 1149732, 1141420, 1136002, 1155156, 1147737, 1145080,\n", + " 1148949, 1146975, 1156402, 1146616, 1146623, 1152407, 1152415, 1150794,\n", + " 1152097, 1153030, 1153037, 1150085, 1137746, 1137755, 1146307, 1146304,\n", + " 1152622, 1140521, 1155140, 1136410, 1157104, 1152819, 1155337, 1154123,\n", + " 1157824, 1157833, 1139581, 1151627, 1151617, 1150578, 1150588, 1136131,\n", + " 1136134, 1136798, 1145952, 1152233, 1138991, 1152903, 1152341, 1146816,\n", + " 1156831, 1138275, 1138276, 1138279, 1138281, 1156007, 1156000, 1156005,\n", + " 1136028, 1158712, 1158704, 1156619, 1151187, 1152928, 1142777, 1156420,\n", + " 1150164, 1144018, 1148033, 1148035, 1148040, 1152601, 1155226, 1145656,\n", + " 1149794, 1144659, 1144667, 1137041, 1137047, 1137048, 1148628, 1158530,\n", + " 1158540, 1137458, 1149942, 1149943, 1135705, 1135707, 1142047, 1157229,\n", + " 1157546, 1158860, 1158856, 1150872, 1150877, 1158919, 1156505, 1157069,\n", + " 1157063, 1155408, 1155418, 1152833, 1137823, 1139479, 1150465, 1146851,\n", + " 1135222, 1135729, 1135740, 1152182, 1156638, 1151788, 1156935, 1135645,\n", + " 1147810, 1137625, 1139525, 1139524, 1158308, 1158311, 1151271, 1151340,\n", + " 1155441, 1153359, 1150132, 1150136, 1138573, 1145768, 1142755, 1160440,\n", + " 1157637, 1151386, 1151379, 1158639, 1155374, 1155375, 1140187, 1155122,\n", + " 1152519, 1152526, 1152527, 1157172, 1149321, 1149519, 1151424, 1156463,\n", + " 1158096, 1154763, 1155628, 1158491, 1158494, 1158824, 1153715, 1158325,\n", + " 1155646, 1143257, 1146935, 1154250, 1164292, 1156711, 1137359, 1154909,\n", + " 1157439, 1157430, 1150068, 1144711, 1155613, 1141627, 1150976, 1150987,\n", + " 1155281, 1155284, 1157928, 1137152, 1157663, 1158996, 1153786, 1155026,\n", + " 1158085, 1145682, 1134683, 1135601, 1148149, 1148159, 1155848, 1158671,\n", + " 1149145, 1156085, 1140634, 1144463, 1152209, 1152220, 1152208, 1140374,\n", + " 1155884, 1157031, 1144843, 1155971, 1155975, 1161676, 1158841, 1156811,\n", + " 1156812, 1161472, 1149700, 1166126, 1136899, 1136909, 1136896, 1157304,\n", + " 1158285, 1152463, 1136480, 1136494, 1164181, 1154387, 1152143, 1153808,\n", + " 1156278, 1156286, 1136646, 1163116, 1140049, 1157858, 1142178, 1158545,\n", + " 1158558, 1156525, 1146123, 1146126, 1138108, 1138110, 1155866, 1158006,\n", + " 1155521, 1161539, 1135662, 1157759, 1157751, 1159287, 1167359, 1159054,\n", + " 1163556, 1172279, 1153052, 1153045, 1171551, 1163075, 1155763, 1156235,\n", + " 1161925, 1166256, 1142865, 1156104, 1138393, 1150046, 1149063, 1145945,\n", + " 1155479, 1151020, 1153514, 1157600, 1138161, 1138163, 1164006, 1149963,\n", + " 1154590, 1160764, 1139286, 1139281, 1136813, 1162737, 1148771, 1171509,\n", + " 1146059, 1146356, 1158461, 1164048, 1140130, 1158868, 1158866, 1140641,\n", + " 1140643, 1148600, 1148603, 1148604, 1156363, 1141792, 1158643, 1159032,\n", + " 1165604, 1169105, 1178154, 1163968, 1163972, 1158911, 1160600, 1162550,\n", + " 1156589, 1151227, 1153931, 1168527, 1146500, 1146510, 1164580, 1144747,\n", + " 1152776, 1153204, 1141471, 1147426, 1147427, 1157044, 1157051, 1149890,\n", + " 1182247, 1156739, 1163480, 1167373, 1150648, 1150651, 1166638, 1144810,\n", + " 1144812, 1164750, 1142722, 1142733, 1156300, 1163777, 1166919, 1145567,\n", + " 1171683, 1184040, 1143037, 1143025, 1166054, 1169233, 1147694, 1147355,\n", + " 1152635, 1152624, 1139359, 1147724, 1145900, 1145902, 1153520, 1168659,\n", + " 1168660, 1171578, 1175240, 1143397, 1143402, 1143404, 1170982, 1158722,\n", + " 1154076, 1147336, 1145674, 1150773, 1170676, 1149130, 1169602, 1166653,\n", + " 1169304, 1145326, 1155180, 1155170, 1154212, 1150525, 1150518, 1156119,\n", + " 1154618, 1154617, 1144344, 1144346, 1144336, 1157534, 1147751, 1147745,\n", + " 1147757, 1154670, 1169162, 1157331, 1138129, 1141043, 1169359, 1150026,\n", + " 1154364, 1154354, 1149452, 1147495, 1147502, 1158611, 1158623, 1158060,\n", + " 1158062, 1173047, 1149847, 1169951, 1152353, 1175689, 1152546, 1155932,\n", + " 1161130, 1149402, 1171847, 1172838, 1173307, 1176768, 1145033, 1157158,\n", + " 1157153, 1155471, 1147711, 1151850, 1148131, 1169913, 1147925, 1169687,\n", + " 1135021, 1170688, 1155739, 1168819, 1175818, 1166028, 1174845, 1171080,\n", + " 1166684, 1171823, 1150234, 1154151, 1154148, 1158176, 1158187, 1149169,\n", + " 1149173, 1171931, 1186117, 1167658, 1143420, 1171302, 1159404, 1153803,\n", + " 1164826, 1177162, 1171122, 1180831, 1158027, 1158031, 1157795, 1181389,\n", + " 1155804, 1155796, 1157126, 1158253, 1153898, 1153902, 1164560, 1145626,\n", + " 1156433, 1178774, 1178757, 1179444, 1149753, 1149755, 1166959, 1163717,\n", + " 1157760, 1157761, 1155990, 1182703, 1158512, 1158517, 1155892, 1155899,\n", + " 1162977, 1140399, 1185405, 1171594, 1169064, 1177764, 1171633, 1180517,\n", + " 1185698, 1188842, 1182337, 1163422, 1154957, 1170349, 1147182, 1193440,\n", + " 1168943, 1190733, 1139828, 1139831, 1149677, 1192076, 1182067, 1156055,\n", + " 1146396, 1182891, 1186750, 1178523, 1170710, 1169959, 1181939, 1182555,\n", + " 1182060, 1193471, 1188360, 1170881, 1192331, 1188817, 1153729, 1193232,\n", + " 1185869, 1162502, 1181824, 1186573, 1191587, 1175349, 1167089, 1161857,\n", + " 1180786, 1158064, 1145395, 1178136, 1179750, 1179757, 1155959, 1172896,\n", + " 1186393, 1163071, 1189794, 1188718, 1157008, 1157017, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199434, 1199305, 1195397, 1197719, 1197727, 1198730, 1199282, 1202255,\n", + " 1201577, 1201582, 1194626, 1200644, 1197777, 1201016, 1203047, 1197232,\n", + " 1198694, 1196867, 1194864, 1194770, 1194771, 1196631, 1195103, 1195511,\n", + " 1195926, 1197924, 1196534, 1201992, 1198539, 1197697, 1198095, 1194949,\n", + " 1197760, 1195895, 1199171, 1196699, 1195313, 1198668, 1195998, 1195132,\n", + " 1195571, 1196711, 1199810, 1199823, 1195145, 1195221, 1195223, 1195265,\n", + " 1197273, 1196101, 1194854, 1198915, 1198924, 1195541, 1196117, 1198504,\n", + " 1197408, 1195358, 1199329, 1200950, 1200959, 1199856, 1199060, 1194928,\n", + " 1199628, 1200866, 1200872, 1199154, 1199038, 1198400, 1199231, 1199676,\n", + " 1200060, 1197601, 1196727, 1195773, 1200887, 1198428, 1199410, 1201547,\n", + " 1200166, 1200169, 1200507, 1198797, 1201421, 1201156, 1202631, 1199721,\n", + " 1200553, 1200429, 1201627, 1199887, 1196883, 1199908, 1201442, 1202337,\n", + " 1202175, 1197537, 1197544, 1201559, 1201291, 1198472, 1198478, 1203329,\n", + " 1202889, 1199925, 1196966, 1200784, 1199606, 1195438, 1195679, 1195664,\n", + " 1198055, 1200445, 1197334, 1198929, 1198911, 1195421, 1201789, 1195181,\n", + " 1197822, 1195074, 1199661, 1194730, 1199786, 1198819, 1200974, 1197035,\n", + " 1200211, 1194908], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199434, 1199305, 1195397, 1197719, 1197727, 1198730, 1199282, 1202255,\n", + " 1201577, 1201582, 1194626, 1200644, 1197777, 1201016, 1203047, 1197232,\n", + " 1198694, 1196867, 1194864, 1194770, 1194771, 1196631, 1195103, 1195511,\n", + " 1195926, 1197924, 1196534, 1201992, 1198539, 1197697, 1198095, 1194949,\n", + " 1197760, 1195895, 1199171, 1196699, 1195313, 1198668, 1195998, 1195132,\n", + " 1195571, 1196711, 1199810, 1199823, 1195145, 1195221, 1195223, 1195265,\n", + " 1197273, 1196101, 1194854, 1198915, 1198924, 1195541, 1196117, 1198504,\n", + " 1197408, 1195358, 1199329, 1200950, 1200959, 1199856, 1199060, 1194928,\n", + " 1199628, 1200866, 1200872, 1199154, 1199038, 1198400, 1199231, 1199676,\n", + " 1200060, 1197601, 1196727, 1195773, 1200887, 1198428, 1199410, 1201547,\n", + " 1200166, 1200169, 1200507, 1198797, 1201421, 1201156, 1202631, 1199721,\n", + " 1200553, 1200429, 1201627, 1199887, 1196883, 1199908, 1201442, 1202337,\n", + " 1202175, 1197537, 1197544, 1201559, 1201291, 1198472, 1198478, 1203329,\n", + " 1202889, 1199925, 1196966, 1200784, 1199606, 1195438, 1195679, 1195664,\n", + " 1198055, 1200445, 1197334, 1198929, 1198911, 1195421, 1201789, 1195181,\n", + " 1197822, 1195074, 1199661, 1194730, 1199786, 1198819, 1200974, 1197035,\n", + " 1200211, 1194908], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[-2.8453e-04, -1.5291e-04, 1.9592e-01, ..., 4.7854e-02,\n", + " -7.4410e-04, -2.1318e-03],\n", + " [-4.1389e-04, 1.4037e-02, 1.5951e-01, ..., 6.1028e-02,\n", + " -8.4176e-04, -1.8979e-03],\n", + " [-1.5681e-04, -1.0947e-05, 1.7249e-01, ..., 3.3520e-02,\n", + " -7.5673e-04, -2.3114e-03],\n", + " ...,\n", + " [-2.1102e-04, 1.2033e-02, 1.8334e-01, ..., 9.0940e-03,\n", + " -5.3726e-04, -2.1668e-03],\n", + " [-2.2422e-04, -1.4828e-04, 1.8665e-01, ..., 1.9892e-02,\n", + " -3.9805e-04, -2.0360e-03],\n", + " [ 1.7374e-03, -5.9832e-04, 2.2415e-01, ..., 7.9060e-03,\n", + " -3.9859e-04, -2.3470e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 6.9745e-01, -1.3679e-02, 1.0588e+00, ..., 5.0961e-02,\n", + " -1.8219e-03, 6.0336e-01],\n", + " [ 1.4956e+00, -2.7222e-02, 7.3571e-01, ..., -4.2561e-03,\n", + " -8.9166e-04, 7.5469e-01],\n", + " [ 9.4440e-01, -1.3005e-02, 8.7193e-01, ..., -1.2008e-03,\n", + " -3.8680e-03, 1.0930e+00],\n", + " ...,\n", + " [ 1.4938e+00, -3.2907e-02, 7.5440e-01, ..., -6.6876e-03,\n", + " -2.7153e-03, 4.9890e-01],\n", + " [ 9.8533e-01, -1.2744e-02, 9.2613e-01, ..., 1.4743e-01,\n", + " -1.3903e-03, 8.1953e-01],\n", + " [ 6.3358e-01, -1.3895e-02, 1.1931e+00, ..., 6.7598e-02,\n", + " -1.4916e-03, 8.7285e-01]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[ 1.8724e-01, -3.0749e-03, 9.1537e-02, ..., -1.4300e-03,\n", + " 1.5230e-01, 8.2414e-02],\n", + " [ 2.6750e-01, -3.4651e-03, -2.1022e-05, ..., -8.5285e-04,\n", + " 5.4993e-02, 1.5926e-01],\n", + " [ 3.0037e-01, -3.2242e-03, 3.5194e-02, ..., -2.5395e-03,\n", + " -4.3355e-04, 1.5248e-01],\n", + " ...,\n", + " [-3.9907e-04, -5.1697e-04, 1.5885e-01, ..., 7.5320e-02,\n", + " -1.7575e-04, -9.0663e-04],\n", + " [ 2.6360e-01, -3.0196e-03, 3.1380e-02, ..., -1.2630e-03,\n", + " 9.4294e-02, 1.3287e-01],\n", + " [ 3.5567e-01, -3.4443e-03, 3.1923e-02, ..., -1.6210e-03,\n", + " 8.7054e-02, 1.4060e-01]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-0.0073, 0.2050, -0.0025, ..., 0.7686, -0.0022, -0.0054],\n", + " [-0.0082, 0.1354, -0.0027, ..., 0.8438, -0.0016, -0.0047],\n", + " [-0.0101, 0.2382, -0.0034, ..., 1.1476, -0.0012, -0.0058],\n", + " ...,\n", + " [-0.0068, 0.1293, -0.0017, ..., 0.6205, -0.0023, -0.0049],\n", + " [-0.0071, 0.2200, -0.0024, ..., 0.7854, -0.0014, -0.0068],\n", + " [-0.0075, 0.2697, -0.0031, ..., 0.9977, -0.0016, -0.0063]],\n", + " device='cuda:0', grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 186, 115, 109, 228, 147, 323, 373, 373, 819, 565, 779, 779,\n", + " 756, 586, 586, 572, 626, 711, 711, 768, 632, 756, 617, 656,\n", + " 974, 951, 891, 891, 909, 780, 967, 995, 1109, 1109, 1277, 1362,\n", + " 1244, 1239, 1292, 1386, 1240, 1240, 1240, 1395, 1395, 1395, 1395, 1418,\n", + " 1418, 1573, 1573, 1565, 1565, 1602, 1602, 1442, 1602, 1639, 1832, 1688,\n", + " 1775, 1775, 1775, 1775, 1730, 1950, 1940, 2076, 1867, 1991, 2157, 2094,\n", + " 2121, 2172, 2153, 2235, 2341, 2327, 2370, 2512, 2239, 2239, 2239, 2704,\n", + " 2452, 2451, 2498, 2498, 2466, 2798, 2822, 2900, 2602, 2602, 2884, 3045,\n", + " 3045, 3091, 3124, 3228, 3107, 3177, 3249, 3249, 3249, 3298, 3489, 3452,\n", + " 3514, 3471, 3480, 3514, 3666, 3621, 3828, 3660, 3823, 3823, 3859, 3859,\n", + " 3849, 3856, 3934, 3967, 3977, 4109, 4150, 4063, 4346, 4285, 4265, 4354,\n", + " 4333, 4333, 4394, 4598, 4503, 4430, 4457, 4384, 4384, 4384, 4627, 4462,\n", + " 4618, 4752, 4740, 4814, 4799, 4969, 4915, 5033, 5092, 5023, 5023, 5156,\n", + " 5046, 5005, 5224, 5224, 5239, 5413, 5413, 5264, 5573, 5573, 5573, 5200,\n", + " 5487, 5929, 5222, 5660, 5627, 5911, 5911, 5725, 5725, 5982, 5854, 5814,\n", + " 5931, 5954, 5954, 5922],\n", + " [ 93, 100, 58, 64, 51, 114, 90, 27, 0, 112, 78, 80,\n", + " 39, 75, 103, 112, 112, 80, 50, 69, 72, 51, 49, 61,\n", + " 126, 25, 70, 73, 21, 17, 110, 6, 98, 25, 43, 10,\n", + " 106, 6, 13, 127, 11, 30, 46, 105, 118, 85, 82, 80,\n", + " 55, 33, 75, 31, 42, 34, 106, 29, 118, 129, 120, 81,\n", + " 96, 102, 67, 125, 27, 16, 119, 40, 10, 108, 45, 5,\n", + " 31, 2, 1, 127, 112, 23, 30, 1, 3, 91, 95, 20,\n", + " 112, 17, 126, 128, 24, 66, 32, 9, 37, 77, 19, 39,\n", + " 51, 8, 121, 74, 117, 26, 70, 103, 73, 48, 74, 57,\n", + " 115, 4, 111, 123, 120, 104, 2, 74, 24, 79, 116, 51,\n", + " 47, 84, 59, 104, 77, 28, 111, 6, 83, 87, 52, 120,\n", + " 99, 97, 88, 129, 21, 65, 86, 35, 109, 88, 44, 19,\n", + " 3, 113, 104, 15, 64, 12, 86, 94, 22, 101, 56, 36,\n", + " 122, 53, 113, 68, 124, 100, 62, 126, 54, 92, 60, 89,\n", + " 7, 84, 107, 14, 74, 2, 38, 74, 13, 71, 74, 76,\n", + " 18, 63, 88, 41]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1564, 7563, 830, ..., 3410, 4499, 5457],\n", + " [ 271, 182, 37, ..., 7604, 7639, 7572]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 73, 126, 21, ..., 47, 3, 21],\n", + " [ 179, 234, 142, ..., 5973, 5953, 5909]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 239, 239, 239, ..., 7544, 7544, 7738],\n", + " [ 150, 274, 524, ..., 766, 560, 323]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 820, 260, 43, ..., 249, 364, 303],\n", + " [ 102, 257, 2, ..., 7522, 7675, 7595]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3153, 4188, 6923, ..., 5149, 6989, 4445],\n", + " [ 22, 22, 209, ..., 5916, 5915, 5920]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 346, 346, 394, ..., 7544, 7544, 7738],\n", + " [3791, 2098, 3231, ..., 5828, 5061, 6440]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 2, 2, 2, ..., 5954, 5954, 5922],\n", + " [7499, 3049, 3573, ..., 239, 815, 5080]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.007104\n", + "sampling 0.006938\n", + "noi time: 0.002213\n", + "get_vertex_data call: 0.03326\n", + "noi group time: 0.002153\n", + "eoi_group_time: 0.014306\n", + "second half: 0.194884\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 468, 31145, 32616, ..., 1122197, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 468, 31145, 32616, ..., 1122197, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1203800, 1215819, 1231357, ..., 1930686, 1936967, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1203800, 1215819, 1231357, ..., 1930686, 1936967, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1137204, 1141424, 1136230, 1140282, 1136349, 1136339, 1135926,\n", + " 1135928, 1138544, 1135160, 1135719, 1137780, 1140785, 1139698, 1141751,\n", + " 1141756, 1141758, 1138322, 1138335, 1136965, 1136969, 1136970, 1141443,\n", + " 1138059, 1138058, 1137271, 1138933, 1138942, 1143372, 1143363, 1146644,\n", + " 1139615, 1150497, 1150509, 1142958, 1155689, 1143820, 1147483, 1135989,\n", + " 1153940, 1144636, 1153012, 1148337, 1148343, 1146666, 1146472, 1147094,\n", + " 1155009, 1155014, 1136683, 1150329, 1134712, 1146369, 1134804, 1140313,\n", + " 1140540, 1138112, 1138119, 1149461, 1151520, 1153461, 1153467, 1140159,\n", + " 1140947, 1140952, 1135367, 1135201, 1135202, 1135210, 1140753, 1135903,\n", + " 1141036, 1134794, 1138504, 1137329, 1137330, 1136179, 1143069, 1144390,\n", + " 1144394, 1144395, 1137521, 1137534, 1152376, 1137441, 1139161, 1141702,\n", + " 1135583, 1136100, 1138514, 1153094, 1153099, 1153092, 1137957, 1137959,\n", + " 1138584, 1158136, 1154141, 1137019, 1136985, 1156899, 1135522, 1135535,\n", + " 1139684, 1138319, 1139878, 1157697, 1138440, 1138445, 1136534, 1138461,\n", + " 1138449, 1136594, 1149328, 1138846, 1138882, 1156603, 1156602, 1142611,\n", + " 1142615, 1135359, 1135355, 1148531, 1150956, 1137108, 1137109, 1135769,\n", + " 1135772, 1139844, 1139667, 1139673, 1138069, 1134776, 1142434, 1152654,\n", + " 1148810, 1140195, 1158974, 1144406, 1153544, 1140853, 1140036, 1136065,\n", + " 1139929, 1139934, 1138148, 1137135, 1134891, 1141992, 1152044, 1136057,\n", + " 1137734, 1137728, 1140901, 1134750, 1138246, 1135546, 1141088, 1141098,\n", + " 1141091, 1139898, 1139889, 1137297, 1159672, 1149982, 1142504, 1152719,\n", + " 1154467, 1154472, 1161173, 1140467, 1141224, 1139386, 1136921, 1139730,\n", + " 1143667, 1143679, 1144233, 1144237, 1140598, 1140597, 1141786, 1139495,\n", + " 1144650, 1134979, 1136862, 1138482, 1143166, 1143202, 1140160, 1140173,\n", + " 1158749, 1158750, 1138469, 1149118, 1142712, 1139192, 1141479, 1137071,\n", + " 1138710, 1138708, 1142913, 1138423, 1143111, 1144596, 1142843, 1136866,\n", + " 1136864, 1144041, 1140880, 1141397, 1144180, 1144182, 1150906, 1144865,\n", + " 1146201, 1138539, 1137854, 1147153, 1136375, 1142646, 1141365, 1141367,\n", + " 1153068, 1151112, 1138293, 1139510, 1139127, 1145001, 1145202, 1143791,\n", + " 1140619, 1139171, 1140976, 1140979, 1140990, 1146695, 1147050, 1145873,\n", + " 1155835, 1152976, 1152988, 1135464, 1142556, 1139453, 1141925, 1146901,\n", + " 1144242, 1141841, 1138721, 1137574, 1134850, 1145983, 1145974, 1145982,\n", + " 1143851, 1146024, 1150599, 1150606, 1146140, 1154328, 1142533, 1139990,\n", + " 1143293, 1147543, 1147282, 1136330, 1149160, 1139408, 1148001, 1146084,\n", + " 1149608, 1143051, 1136168, 1157720, 1136836, 1165629, 1139297, 1141488,\n", + " 1141490, 1141496, 1144957, 1142149, 1143345, 1144766, 1144753, 1145818,\n", + " 1150294, 1150296, 1146514, 1146523, 1143957, 1143960, 1143961, 1143456,\n", + " 1143460, 1143470, 1143457, 1143937, 1147574, 1147521, 1147523, 1140364,\n", + " 1149569, 1137990, 1137995, 1143080, 1143082, 1147984, 1147995, 1147999,\n", + " 1144013, 1139252, 1145467, 1147244, 1148704, 1148715, 1150996, 1141327,\n", + " 1141836, 1146745, 1146742, 1152328, 1149722, 1147025, 1142858, 1147248,\n", + " 1141124, 1141128, 1158226, 1154526, 1145240, 1145750, 1145751, 1142377,\n", + " 1138638, 1146178, 1151242, 1152530, 1150280, 1150445, 1148928, 1148930,\n", + " 1154998, 1149791, 1150350, 1152013, 1154819, 1147794, 1151473, 1152023,\n", + " 1152027, 1154263, 1145255, 1145256, 1135504, 1146723, 1134869, 1150127,\n", + " 1147019, 1147020, 1147009, 1153962, 1158949, 1158950, 1141941, 1141949,\n", + " 1146782, 1144825, 1148744, 1148448, 1147653, 1147654, 1151717, 1148300,\n", + " 1137724, 1135087, 1148623, 1147863, 1147866, 1154420, 1158786, 1136247,\n", + " 1146679, 1146686, 1157983, 1139936, 1139941, 1154200, 1153124, 1153193,\n", + " 1153188, 1150932, 1150935, 1152877, 1143092, 1150356, 1148095, 1141016,\n", + " 1147440, 1135307, 1135311, 1151906, 1154183, 1150715, 1148498, 1141420,\n", + " 1152784, 1151352, 1157210, 1147737, 1146969, 1146975, 1156403, 1146623,\n", + " 1151691, 1151694, 1152109, 1146280, 1146287, 1156321, 1156325, 1153030,\n", + " 1153038, 1145539, 1137746, 1146304, 1152608, 1152622, 1140521, 1149203,\n", + " 1155337, 1155349, 1152673, 1152675, 1154633, 1154638, 1151576, 1151617,\n", + " 1151623, 1150588, 1136131, 1148914, 1148916, 1152944, 1144530, 1140929,\n", + " 1145952, 1152224, 1138989, 1143995, 1152341, 1158423, 1153311, 1138276,\n", + " 1138281, 1157147, 1136028, 1136031, 1158704, 1156622, 1151187, 1152928,\n", + " 1152934, 1151067, 1151071, 1153913, 1150164, 1148033, 1148040, 1149300,\n", + " 1155223, 1155231, 1157630, 1149807, 1137048, 1158477, 1148628, 1158530,\n", + " 1137458, 1154569, 1147635, 1139229, 1157547, 1158854, 1150877, 1156500,\n", + " 1156504, 1157064, 1155418, 1151257, 1150465, 1135230, 1135729, 1135730,\n", + " 1135734, 1156638, 1151788, 1150824, 1135634, 1147810, 1151469, 1158306,\n", + " 1158311, 1151271, 1155441, 1150129, 1150130, 1150132, 1154528, 1150490,\n", + " 1142758, 1156207, 1138775, 1151379, 1158624, 1155122, 1157183, 1149321,\n", + " 1149519, 1155746, 1135396, 1145799, 1156463, 1168230, 1157893, 1155628,\n", + " 1156563, 1154555, 1155574, 1136469, 1158824, 1177952, 1148835, 1148647,\n", + " 1155646, 1154240, 1163362, 1154902, 1154909, 1143189, 1143531, 1150371,\n", + " 1153325, 1150068, 1144707, 1155613, 1150987, 1155281, 1143517, 1159618,\n", + " 1159629, 1153776, 1159116, 1145694, 1134674, 1135601, 1135614, 1148149,\n", + " 1158665, 1157684, 1146325, 1149145, 1159258, 1156090, 1156692, 1140380,\n", + " 1156018, 1155881, 1142466, 1164215, 1155975, 1153765, 1156811, 1156812,\n", + " 1161892, 1149705, 1154600, 1136899, 1136905, 1136896, 1158753, 1185567,\n", + " 1158815, 1155246, 1152463, 1151615, 1136480, 1136494, 1136491, 1156664,\n", + " 1156665, 1152129, 1156490, 1136646, 1140049, 1157858, 1147787, 1158558,\n", + " 1153827, 1146126, 1154342, 1150011, 1164276, 1192532, 1142663, 1142666,\n", + " 1156045, 1159042, 1142426, 1157946, 1162044, 1153052, 1162833, 1163072,\n", + " 1163075, 1167698, 1167566, 1166256, 1163706, 1156107, 1138393, 1149063,\n", + " 1145948, 1145945, 1153514, 1153519, 1147307, 1147300, 1138161, 1156795,\n", + " 1156784, 1149952, 1164909, 1139281, 1166935, 1156983, 1156987, 1148771,\n", + " 1171255, 1171257, 1162305, 1158868, 1140650, 1140643, 1148603, 1148607,\n", + " 1143143, 1159646, 1144509, 1151872, 1163019, 1156357, 1156358, 1158653,\n", + " 1159025, 1159026, 1159029, 1159032, 1184734, 1171373, 1165877, 1152247,\n", + " 1143735, 1155588, 1162546, 1151227, 1138674, 1168426, 1148571, 1158405,\n", + " 1168521, 1144989, 1146500, 1146510, 1153247, 1144739, 1144747, 1152776,\n", + " 1155279, 1165415, 1141471, 1141459, 1147426, 1179979, 1156739, 1157955,\n", + " 1171040, 1168750, 1144810, 1144812, 1140112, 1135567, 1142733, 1156293,\n", + " 1156303, 1144057, 1145179, 1148683, 1145228, 1154695, 1155324, 1166462,\n", + " 1147677, 1138953, 1138954, 1142136, 1143025, 1147355, 1170502, 1170612,\n", + " 1152639, 1152624, 1139351, 1147723, 1145902, 1163606, 1152198, 1152203,\n", + " 1181049, 1170389, 1171230, 1158722, 1158734, 1170738, 1147331, 1150783,\n", + " 1149128, 1167817, 1144681, 1149487, 1149483, 1169298, 1155172, 1155170,\n", + " 1150526, 1156117, 1145531, 1154618, 1144336, 1157534, 1138376, 1147746,\n", + " 1154670, 1154893, 1169154, 1157331, 1141051, 1151668, 1150027, 1147495,\n", + " 1158611, 1158060, 1158061, 1158062, 1149847, 1157380, 1157383, 1165903,\n", + " 1171475, 1155502, 1152353, 1152360, 1175687, 1143177, 1169133, 1149398,\n", + " 1148667, 1172838, 1148324, 1148325, 1173307, 1145033, 1169144, 1154027,\n", + " 1153755, 1172791, 1167857, 1169583, 1157153, 1155465, 1147711, 1148131,\n", + " 1169914, 1157592, 1157593, 1170488, 1172961, 1155738, 1155739, 1174418,\n", + " 1168389, 1160979, 1174433, 1177614, 1172606, 1163990, 1182128, 1176452,\n", + " 1150234, 1154148, 1167517, 1184584, 1178889, 1149169, 1149173, 1143279,\n", + " 1169772, 1175620, 1168481, 1143420, 1156559, 1166299, 1184751, 1153803,\n", + " 1178467, 1171122, 1179714, 1171744, 1169387, 1184093, 1182651, 1182476,\n", + " 1158031, 1166554, 1161262, 1155262, 1175260, 1154718, 1157795, 1172034,\n", + " 1177585, 1172546, 1171623, 1179199, 1157132, 1157994, 1177357, 1158249,\n", + " 1158253, 1153898, 1154500, 1178208, 1145624, 1145626, 1156436, 1156437,\n", + " 1154840, 1178769, 1182632, 1157483, 1157487, 1161063, 1146241, 1146252,\n", + " 1181356, 1152274, 1155990, 1158512, 1155892, 1177090, 1162968, 1182786,\n", + " 1168540, 1168886, 1168621, 1164228, 1163422, 1164262, 1154957, 1170806,\n", + " 1156860, 1156861, 1166772, 1170341, 1169335, 1147180, 1156162, 1178246,\n", + " 1188411, 1139828, 1139831, 1139837, 1150265, 1170433, 1156055, 1190316,\n", + " 1180122, 1146394, 1146395, 1173058, 1149544, 1181803, 1193427, 1178523,\n", + " 1169964, 1189189, 1189096, 1140993, 1141006, 1140995, 1189256, 1162156,\n", + " 1151774, 1191859, 1193879, 1159169, 1191242, 1190076, 1191604, 1162502,\n", + " 1169707, 1169700, 1190747, 1191429, 1189662, 1192567, 1193727, 1156676,\n", + " 1174284, 1158064, 1167730, 1186248, 1155959, 1155962, 1186072, 1188280,\n", + " 1188272, 1191488, 1167471, 1182401, 1169398, 1184978, 1157022, 1161940],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1137204, 1141424, 1136230, 1140282, 1136349, 1136339, 1135926,\n", + " 1135928, 1138544, 1135160, 1135719, 1137780, 1140785, 1139698, 1141751,\n", + " 1141756, 1141758, 1138322, 1138335, 1136965, 1136969, 1136970, 1141443,\n", + " 1138059, 1138058, 1137271, 1138933, 1138942, 1143372, 1143363, 1146644,\n", + " 1139615, 1150497, 1150509, 1142958, 1155689, 1143820, 1147483, 1135989,\n", + " 1153940, 1144636, 1153012, 1148337, 1148343, 1146666, 1146472, 1147094,\n", + " 1155009, 1155014, 1136683, 1150329, 1134712, 1146369, 1134804, 1140313,\n", + " 1140540, 1138112, 1138119, 1149461, 1151520, 1153461, 1153467, 1140159,\n", + " 1140947, 1140952, 1135367, 1135201, 1135202, 1135210, 1140753, 1135903,\n", + " 1141036, 1134794, 1138504, 1137329, 1137330, 1136179, 1143069, 1144390,\n", + " 1144394, 1144395, 1137521, 1137534, 1152376, 1137441, 1139161, 1141702,\n", + " 1135583, 1136100, 1138514, 1153094, 1153099, 1153092, 1137957, 1137959,\n", + " 1138584, 1158136, 1154141, 1137019, 1136985, 1156899, 1135522, 1135535,\n", + " 1139684, 1138319, 1139878, 1157697, 1138440, 1138445, 1136534, 1138461,\n", + " 1138449, 1136594, 1149328, 1138846, 1138882, 1156603, 1156602, 1142611,\n", + " 1142615, 1135359, 1135355, 1148531, 1150956, 1137108, 1137109, 1135769,\n", + " 1135772, 1139844, 1139667, 1139673, 1138069, 1134776, 1142434, 1152654,\n", + " 1148810, 1140195, 1158974, 1144406, 1153544, 1140853, 1140036, 1136065,\n", + " 1139929, 1139934, 1138148, 1137135, 1134891, 1141992, 1152044, 1136057,\n", + " 1137734, 1137728, 1140901, 1134750, 1138246, 1135546, 1141088, 1141098,\n", + " 1141091, 1139898, 1139889, 1137297, 1159672, 1149982, 1142504, 1152719,\n", + " 1154467, 1154472, 1161173, 1140467, 1141224, 1139386, 1136921, 1139730,\n", + " 1143667, 1143679, 1144233, 1144237, 1140598, 1140597, 1141786, 1139495,\n", + " 1144650, 1134979, 1136862, 1138482, 1143166, 1143202, 1140160, 1140173,\n", + " 1158749, 1158750, 1138469, 1149118, 1142712, 1139192, 1141479, 1137071,\n", + " 1138710, 1138708, 1142913, 1138423, 1143111, 1144596, 1142843, 1136866,\n", + " 1136864, 1144041, 1140880, 1141397, 1144180, 1144182, 1150906, 1144865,\n", + " 1146201, 1138539, 1137854, 1147153, 1136375, 1142646, 1141365, 1141367,\n", + " 1153068, 1151112, 1138293, 1139510, 1139127, 1145001, 1145202, 1143791,\n", + " 1140619, 1139171, 1140976, 1140979, 1140990, 1146695, 1147050, 1145873,\n", + " 1155835, 1152976, 1152988, 1135464, 1142556, 1139453, 1141925, 1146901,\n", + " 1144242, 1141841, 1138721, 1137574, 1134850, 1145983, 1145974, 1145982,\n", + " 1143851, 1146024, 1150599, 1150606, 1146140, 1154328, 1142533, 1139990,\n", + " 1143293, 1147543, 1147282, 1136330, 1149160, 1139408, 1148001, 1146084,\n", + " 1149608, 1143051, 1136168, 1157720, 1136836, 1165629, 1139297, 1141488,\n", + " 1141490, 1141496, 1144957, 1142149, 1143345, 1144766, 1144753, 1145818,\n", + " 1150294, 1150296, 1146514, 1146523, 1143957, 1143960, 1143961, 1143456,\n", + " 1143460, 1143470, 1143457, 1143937, 1147574, 1147521, 1147523, 1140364,\n", + " 1149569, 1137990, 1137995, 1143080, 1143082, 1147984, 1147995, 1147999,\n", + " 1144013, 1139252, 1145467, 1147244, 1148704, 1148715, 1150996, 1141327,\n", + " 1141836, 1146745, 1146742, 1152328, 1149722, 1147025, 1142858, 1147248,\n", + " 1141124, 1141128, 1158226, 1154526, 1145240, 1145750, 1145751, 1142377,\n", + " 1138638, 1146178, 1151242, 1152530, 1150280, 1150445, 1148928, 1148930,\n", + " 1154998, 1149791, 1150350, 1152013, 1154819, 1147794, 1151473, 1152023,\n", + " 1152027, 1154263, 1145255, 1145256, 1135504, 1146723, 1134869, 1150127,\n", + " 1147019, 1147020, 1147009, 1153962, 1158949, 1158950, 1141941, 1141949,\n", + " 1146782, 1144825, 1148744, 1148448, 1147653, 1147654, 1151717, 1148300,\n", + " 1137724, 1135087, 1148623, 1147863, 1147866, 1154420, 1158786, 1136247,\n", + " 1146679, 1146686, 1157983, 1139936, 1139941, 1154200, 1153124, 1153193,\n", + " 1153188, 1150932, 1150935, 1152877, 1143092, 1150356, 1148095, 1141016,\n", + " 1147440, 1135307, 1135311, 1151906, 1154183, 1150715, 1148498, 1141420,\n", + " 1152784, 1151352, 1157210, 1147737, 1146969, 1146975, 1156403, 1146623,\n", + " 1151691, 1151694, 1152109, 1146280, 1146287, 1156321, 1156325, 1153030,\n", + " 1153038, 1145539, 1137746, 1146304, 1152608, 1152622, 1140521, 1149203,\n", + " 1155337, 1155349, 1152673, 1152675, 1154633, 1154638, 1151576, 1151617,\n", + " 1151623, 1150588, 1136131, 1148914, 1148916, 1152944, 1144530, 1140929,\n", + " 1145952, 1152224, 1138989, 1143995, 1152341, 1158423, 1153311, 1138276,\n", + " 1138281, 1157147, 1136028, 1136031, 1158704, 1156622, 1151187, 1152928,\n", + " 1152934, 1151067, 1151071, 1153913, 1150164, 1148033, 1148040, 1149300,\n", + " 1155223, 1155231, 1157630, 1149807, 1137048, 1158477, 1148628, 1158530,\n", + " 1137458, 1154569, 1147635, 1139229, 1157547, 1158854, 1150877, 1156500,\n", + " 1156504, 1157064, 1155418, 1151257, 1150465, 1135230, 1135729, 1135730,\n", + " 1135734, 1156638, 1151788, 1150824, 1135634, 1147810, 1151469, 1158306,\n", + " 1158311, 1151271, 1155441, 1150129, 1150130, 1150132, 1154528, 1150490,\n", + " 1142758, 1156207, 1138775, 1151379, 1158624, 1155122, 1157183, 1149321,\n", + " 1149519, 1155746, 1135396, 1145799, 1156463, 1168230, 1157893, 1155628,\n", + " 1156563, 1154555, 1155574, 1136469, 1158824, 1177952, 1148835, 1148647,\n", + " 1155646, 1154240, 1163362, 1154902, 1154909, 1143189, 1143531, 1150371,\n", + " 1153325, 1150068, 1144707, 1155613, 1150987, 1155281, 1143517, 1159618,\n", + " 1159629, 1153776, 1159116, 1145694, 1134674, 1135601, 1135614, 1148149,\n", + " 1158665, 1157684, 1146325, 1149145, 1159258, 1156090, 1156692, 1140380,\n", + " 1156018, 1155881, 1142466, 1164215, 1155975, 1153765, 1156811, 1156812,\n", + " 1161892, 1149705, 1154600, 1136899, 1136905, 1136896, 1158753, 1185567,\n", + " 1158815, 1155246, 1152463, 1151615, 1136480, 1136494, 1136491, 1156664,\n", + " 1156665, 1152129, 1156490, 1136646, 1140049, 1157858, 1147787, 1158558,\n", + " 1153827, 1146126, 1154342, 1150011, 1164276, 1192532, 1142663, 1142666,\n", + " 1156045, 1159042, 1142426, 1157946, 1162044, 1153052, 1162833, 1163072,\n", + " 1163075, 1167698, 1167566, 1166256, 1163706, 1156107, 1138393, 1149063,\n", + " 1145948, 1145945, 1153514, 1153519, 1147307, 1147300, 1138161, 1156795,\n", + " 1156784, 1149952, 1164909, 1139281, 1166935, 1156983, 1156987, 1148771,\n", + " 1171255, 1171257, 1162305, 1158868, 1140650, 1140643, 1148603, 1148607,\n", + " 1143143, 1159646, 1144509, 1151872, 1163019, 1156357, 1156358, 1158653,\n", + " 1159025, 1159026, 1159029, 1159032, 1184734, 1171373, 1165877, 1152247,\n", + " 1143735, 1155588, 1162546, 1151227, 1138674, 1168426, 1148571, 1158405,\n", + " 1168521, 1144989, 1146500, 1146510, 1153247, 1144739, 1144747, 1152776,\n", + " 1155279, 1165415, 1141471, 1141459, 1147426, 1179979, 1156739, 1157955,\n", + " 1171040, 1168750, 1144810, 1144812, 1140112, 1135567, 1142733, 1156293,\n", + " 1156303, 1144057, 1145179, 1148683, 1145228, 1154695, 1155324, 1166462,\n", + " 1147677, 1138953, 1138954, 1142136, 1143025, 1147355, 1170502, 1170612,\n", + " 1152639, 1152624, 1139351, 1147723, 1145902, 1163606, 1152198, 1152203,\n", + " 1181049, 1170389, 1171230, 1158722, 1158734, 1170738, 1147331, 1150783,\n", + " 1149128, 1167817, 1144681, 1149487, 1149483, 1169298, 1155172, 1155170,\n", + " 1150526, 1156117, 1145531, 1154618, 1144336, 1157534, 1138376, 1147746,\n", + " 1154670, 1154893, 1169154, 1157331, 1141051, 1151668, 1150027, 1147495,\n", + " 1158611, 1158060, 1158061, 1158062, 1149847, 1157380, 1157383, 1165903,\n", + " 1171475, 1155502, 1152353, 1152360, 1175687, 1143177, 1169133, 1149398,\n", + " 1148667, 1172838, 1148324, 1148325, 1173307, 1145033, 1169144, 1154027,\n", + " 1153755, 1172791, 1167857, 1169583, 1157153, 1155465, 1147711, 1148131,\n", + " 1169914, 1157592, 1157593, 1170488, 1172961, 1155738, 1155739, 1174418,\n", + " 1168389, 1160979, 1174433, 1177614, 1172606, 1163990, 1182128, 1176452,\n", + " 1150234, 1154148, 1167517, 1184584, 1178889, 1149169, 1149173, 1143279,\n", + " 1169772, 1175620, 1168481, 1143420, 1156559, 1166299, 1184751, 1153803,\n", + " 1178467, 1171122, 1179714, 1171744, 1169387, 1184093, 1182651, 1182476,\n", + " 1158031, 1166554, 1161262, 1155262, 1175260, 1154718, 1157795, 1172034,\n", + " 1177585, 1172546, 1171623, 1179199, 1157132, 1157994, 1177357, 1158249,\n", + " 1158253, 1153898, 1154500, 1178208, 1145624, 1145626, 1156436, 1156437,\n", + " 1154840, 1178769, 1182632, 1157483, 1157487, 1161063, 1146241, 1146252,\n", + " 1181356, 1152274, 1155990, 1158512, 1155892, 1177090, 1162968, 1182786,\n", + " 1168540, 1168886, 1168621, 1164228, 1163422, 1164262, 1154957, 1170806,\n", + " 1156860, 1156861, 1166772, 1170341, 1169335, 1147180, 1156162, 1178246,\n", + " 1188411, 1139828, 1139831, 1139837, 1150265, 1170433, 1156055, 1190316,\n", + " 1180122, 1146394, 1146395, 1173058, 1149544, 1181803, 1193427, 1178523,\n", + " 1169964, 1189189, 1189096, 1140993, 1141006, 1140995, 1189256, 1162156,\n", + " 1151774, 1191859, 1193879, 1159169, 1191242, 1190076, 1191604, 1162502,\n", + " 1169707, 1169700, 1190747, 1191429, 1189662, 1192567, 1193727, 1156676,\n", + " 1174284, 1158064, 1167730, 1186248, 1155959, 1155962, 1186072, 1188280,\n", + " 1188272, 1191488, 1167471, 1182401, 1169398, 1184978, 1157022, 1161940],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197727, 1199833, 1195860, 1195862, 1199281, 1199282, 1198449, 1202255,\n", + " 1198844, 1201577, 1201581, 1194626, 1200649, 1200650, 1197791, 1199248,\n", + " 1199250, 1198624, 1198557, 1194743, 1194770, 1196631, 1194642, 1194648,\n", + " 1195514, 1195263, 1199135, 1201992, 1196030, 1196031, 1195895, 1199171,\n", + " 1195740, 1197858, 1196977, 1198668, 1198034, 1198167, 1198161, 1199823,\n", + " 1195145, 1195148, 1195265, 1195278, 1200765, 1196242, 1196247, 1196109,\n", + " 1194859, 1195850, 1198915, 1195541, 1197474, 1196122, 1195758, 1196283,\n", + " 1199339, 1197291, 1199185, 1197629, 1199628, 1202374, 1199152, 1200751,\n", + " 1199231, 1195017, 1194786, 1194795, 1201511, 1195807, 1201116, 1196727,\n", + " 1198428, 1201547, 1202430, 1197214, 1197021, 1198066, 1201421, 1201156,\n", + " 1201405, 1201054, 1201691, 1201737, 1200553, 1200555, 1197097, 1200690,\n", + " 1196775, 1201442, 1202239, 1199976, 1202707, 1202706, 1198467, 1203329,\n", + " 1202210, 1200391, 1199606, 1198525, 1195664, 1200445, 1198929, 1198911,\n", + " 1195415, 1195181, 1201314, 1197816, 1197406, 1198973, 1203102, 1200221,\n", + " 1197735, 1198819, 1198848, 1201001, 1195066, 1200298, 1197652, 1197335,\n", + " 1195082, 1196552, 1197872], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197727, 1199833, 1195860, 1195862, 1199281, 1199282, 1198449, 1202255,\n", + " 1198844, 1201577, 1201581, 1194626, 1200649, 1200650, 1197791, 1199248,\n", + " 1199250, 1198624, 1198557, 1194743, 1194770, 1196631, 1194642, 1194648,\n", + " 1195514, 1195263, 1199135, 1201992, 1196030, 1196031, 1195895, 1199171,\n", + " 1195740, 1197858, 1196977, 1198668, 1198034, 1198167, 1198161, 1199823,\n", + " 1195145, 1195148, 1195265, 1195278, 1200765, 1196242, 1196247, 1196109,\n", + " 1194859, 1195850, 1198915, 1195541, 1197474, 1196122, 1195758, 1196283,\n", + " 1199339, 1197291, 1199185, 1197629, 1199628, 1202374, 1199152, 1200751,\n", + " 1199231, 1195017, 1194786, 1194795, 1201511, 1195807, 1201116, 1196727,\n", + " 1198428, 1201547, 1202430, 1197214, 1197021, 1198066, 1201421, 1201156,\n", + " 1201405, 1201054, 1201691, 1201737, 1200553, 1200555, 1197097, 1200690,\n", + " 1196775, 1201442, 1202239, 1199976, 1202707, 1202706, 1198467, 1203329,\n", + " 1202210, 1200391, 1199606, 1198525, 1195664, 1200445, 1198929, 1198911,\n", + " 1195415, 1195181, 1201314, 1197816, 1197406, 1198973, 1203102, 1200221,\n", + " 1197735, 1198819, 1198848, 1201001, 1195066, 1200298, 1197652, 1197335,\n", + " 1195082, 1196552, 1197872], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 4.4366e-02, -5.4618e-04, 2.5725e-01, ..., -3.3009e-05,\n", + " -3.1645e-04, -2.3455e-03],\n", + " [ 4.0473e-02, -5.8639e-04, 2.8487e-01, ..., -2.6589e-04,\n", + " -2.1081e-04, -2.7439e-03],\n", + " [ 3.0155e-02, 2.3248e-02, 1.7339e-01, ..., 1.5125e-02,\n", + " -1.6336e-04, -2.5772e-03],\n", + " ...,\n", + " [ 3.0107e-02, -4.9032e-04, 2.5297e-01, ..., -3.4257e-05,\n", + " -3.0870e-04, -2.6933e-03],\n", + " [-3.9694e-05, -2.8949e-04, 2.5678e-01, ..., 2.6113e-02,\n", + " -4.1975e-04, -2.4948e-03],\n", + " [ 4.4702e-02, -6.5625e-04, 2.8865e-01, ..., -1.4950e-04,\n", + " -1.1745e-04, -2.5406e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 1.4148, -0.0228, 1.8688, ..., -0.0039, -0.0087, 1.9058],\n", + " [ 2.6002, -0.0426, 2.8654, ..., -0.0099, -0.0197, 2.8420],\n", + " [ 1.8446, -0.0283, 2.0389, ..., -0.0065, -0.0095, 1.7227],\n", + " ...,\n", + " [ 1.8083, -0.0245, 1.7898, ..., -0.0059, -0.0083, 2.1891],\n", + " [ 2.4086, -0.0439, 1.6764, ..., -0.0134, -0.0089, 1.3453],\n", + " [ 1.4510, -0.0256, 2.0864, ..., -0.0034, -0.0073, 1.8283]],\n", + " device='cuda:0', grad_fn=), 'author': tensor([[ 2.8715e-01, -3.1700e-03, 3.8616e-02, ..., -1.6443e-03,\n", + " -2.7150e-04, 1.0888e-01],\n", + " [ 4.3228e-01, -4.1415e-03, 5.7999e-02, ..., -2.2744e-03,\n", + " 8.3019e-02, 1.9656e-01],\n", + " [ 3.7156e-01, -3.6573e-03, 5.4683e-02, ..., -2.0848e-03,\n", + " 1.9758e-02, 1.2341e-01],\n", + " ...,\n", + " [ 3.9355e-01, -2.7970e-03, 5.2608e-03, ..., -2.4192e-03,\n", + " -1.0386e-03, 6.5049e-02],\n", + " [ 4.6124e-01, -3.9446e-03, 2.1759e-02, ..., -2.3516e-03,\n", + " 1.2272e-02, 2.0323e-01],\n", + " [ 4.0229e-01, -3.8271e-03, 4.4277e-02, ..., -1.9746e-03,\n", + " -2.0978e-04, 1.3170e-01]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-0.0112, 0.3360, -0.0053, ..., 1.4925, -0.0021, -0.0086],\n", + " [-0.0093, 0.1654, -0.0034, ..., 0.9973, -0.0022, -0.0067],\n", + " [-0.0097, 0.1947, -0.0039, ..., 1.1270, -0.0020, -0.0074],\n", + " ...,\n", + " [-0.0104, 0.0772, -0.0045, ..., 1.1264, -0.0029, -0.0067],\n", + " [-0.0070, 0.0281, -0.0038, ..., 0.8162, -0.0027, -0.0064],\n", + " [-0.0104, 0.1985, -0.0044, ..., 1.3034, -0.0029, -0.0079]],\n", + " device='cuda:0', grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 168, 18, 130, 144, 57, 140, 140, 140, 140, 14, 374, 406,\n", + " 476, 476, 476, 231, 876, 876, 511, 511, 641, 778, 367, 367,\n", + " 367, 367, 639, 639, 733, 720, 1023, 1023, 1134, 816, 816, 816,\n", + " 930, 789, 795, 805, 873, 1264, 1228, 1053, 1053, 1053, 942, 1385,\n", + " 1115, 1194, 1603, 1368, 1250, 1276, 1276, 1508, 1508, 1508, 1418, 1418,\n", + " 1418, 1487, 1488, 1515, 1568, 1614, 1614, 1614, 1595, 1570, 1570, 1570,\n", + " 1529, 1529, 1650, 1650, 1650, 1791, 1760, 1807, 1664, 2113, 1868, 1868,\n", + " 1841, 1982, 1982, 1982, 2099, 1983, 1983, 1945, 1945, 1945, 2015, 2097,\n", + " 1869, 1894, 1894, 2008, 1973, 1998, 2005, 2214, 2136, 2151, 2181, 2269,\n", + " 2269, 2368, 2368, 2368, 2465, 2420, 2588, 2623, 2623, 2623, 2623, 2623,\n", + " 2623, 2732, 2732, 2582, 2616, 2688, 2751, 2953, 2929, 2919, 2669, 2669,\n", + " 2669, 2822, 2914, 3014, 3063, 3063, 3134, 3109, 3183, 3170, 3170, 3260,\n", + " 3329, 3412, 3293, 3320, 3320, 3672, 3605, 3731, 3782, 3769, 3769, 4080,\n", + " 4316, 4137, 4174, 4223, 4067, 4260, 4260, 4260, 4339, 4389, 4658, 4602,\n", + " 4725, 4790, 4790, 4790, 5743, 4857, 4863, 5126, 4943, 5018, 4971, 5018,\n", + " 4943, 4904, 5128, 5128, 5175, 5387, 5387, 5387, 5597, 5480, 5403, 5407,\n", + " 5658, 5658, 5473, 5471, 5471, 5687, 5687, 5539, 5539, 5719, 5556, 5770],\n", + " [ 41, 21, 42, 90, 116, 22, 71, 17, 100, 7, 15, 121,\n", + " 5, 117, 72, 55, 1, 5, 5, 42, 28, 10, 44, 30,\n", + " 26, 91, 11, 8, 42, 12, 93, 24, 88, 62, 71, 50,\n", + " 20, 23, 7, 118, 42, 3, 82, 16, 77, 112, 25, 0,\n", + " 5, 18, 25, 5, 54, 71, 64, 57, 83, 96, 60, 108,\n", + " 52, 99, 119, 99, 121, 70, 65, 40, 111, 18, 114, 44,\n", + " 9, 92, 118, 110, 61, 53, 52, 87, 29, 88, 101, 26,\n", + " 55, 36, 78, 89, 84, 35, 12, 5, 73, 25, 25, 26,\n", + " 21, 26, 115, 88, 75, 63, 106, 74, 109, 21, 104, 110,\n", + " 118, 98, 107, 82, 42, 79, 6, 110, 37, 39, 104, 17,\n", + " 113, 81, 111, 22, 99, 59, 52, 68, 110, 64, 76, 69,\n", + " 53, 3, 82, 90, 57, 105, 3, 112, 3, 97, 56, 13,\n", + " 90, 85, 71, 5, 79, 66, 71, 82, 25, 94, 4, 48,\n", + " 71, 58, 52, 80, 71, 95, 122, 71, 25, 90, 86, 2,\n", + " 88, 109, 8, 33, 84, 71, 103, 19, 51, 7, 71, 71,\n", + " 15, 103, 71, 80, 71, 67, 38, 35, 14, 46, 102, 27,\n", + " 71, 120, 31, 43, 71, 71, 34, 71, 49, 47, 32, 45]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 595, 3954, 3055, ..., 3666, 6192, 5609],\n", + " [ 79, 79, 53, ..., 7586, 7670, 7579]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 52, 52, 99, ..., 25, 42, 42],\n", + " [ 90, 58, 112, ..., 5837, 5868, 5911]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 70, 70, 70, ..., 7571, 7571, 7571],\n", + " [ 561, 532, 153, ..., 794, 828, 379]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 73, 171, 650, ..., 171, 389, 213],\n", + " [ 276, 80, 3, ..., 7502, 7515, 7660]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3346, 2834, 2528, ..., 950, 157, 4232],\n", + " [ 0, 139, 134, ..., 5870, 5824, 5668]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 70, 95, 70, ..., 7571, 7571, 7642],\n", + " [ 964, 1964, 2113, ..., 178, 5047, 2715]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 10, 10, 10, ..., 5556, 5556, 5556],\n", + " [3483, 3368, 5375, ..., 2765, 3664, 2340]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005199\n", + "sampling 0.005043\n", + "noi time: 0.000877\n", + "get_vertex_data call: 0.028057\n", + "noi group time: 0.003492\n", + "eoi_group_time: 0.014628\n", + "second half: 0.200426\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 477, 28262, 31145, ..., 1119043, 1117253, 1117256],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 477, 28262, 31145, ..., 1119043, 1117253, 1117256],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210551, 1224370, 1231427, ..., 1934862, 1937007, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210551, 1224370, 1231427, ..., 1934862, 1937007, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1137212, 1141424, 1136237, 1140282, 1136349, 1138553, 1135716,\n", + " 1137784, 1137791, 1140785, 1141756, 1141758, 1138335, 1136223, 1142810,\n", + " 1139462, 1142521, 1136969, 1141448, 1138897, 1151164, 1143615, 1146978,\n", + " 1146983, 1137264, 1143360, 1146644, 1139958, 1148983, 1148987, 1150497,\n", + " 1150509, 1142968, 1139866, 1148576, 1149228, 1142947, 1142958, 1143820,\n", + " 1147473, 1147483, 1135992, 1142881, 1149037, 1149038, 1135119, 1146666,\n", + " 1150193, 1150203, 1146472, 1152666, 1148546, 1153217, 1153220, 1147094,\n", + " 1137220, 1155014, 1155018, 1139364, 1139371, 1147211, 1150329, 1152427,\n", + " 1136268, 1146374, 1140535, 1140540, 1138112, 1154407, 1137254, 1137181,\n", + " 1138356, 1153463, 1140149, 1140159, 1134735, 1135367, 1135202, 1135903,\n", + " 1136037, 1141036, 1134791, 1134794, 1134797, 1137329, 1137684, 1136609,\n", + " 1139204, 1144395, 1135408, 1135413, 1157397, 1137441, 1136204, 1156159,\n", + " 1139153, 1155084, 1138514, 1153099, 1137957, 1135522, 1139875, 1157703,\n", + " 1157702, 1138436, 1138440, 1138457, 1138449, 1137498, 1154784, 1157190,\n", + " 1137932, 1136594, 1149328, 1138846, 1138882, 1156603, 1156606, 1147112,\n", + " 1142611, 1135352, 1135359, 1156141, 1138185, 1158985, 1158987, 1148531,\n", + " 1137109, 1137423, 1139667, 1139673, 1138067, 1134992, 1152648, 1135789,\n", + " 1136734, 1140199, 1158961, 1142909, 1144410, 1153543, 1153544, 1139074,\n", + " 1139929, 1139933, 1137598, 1155660, 1152042, 1152044, 1137734, 1137728,\n", + " 1136993, 1136994, 1138255, 1135549, 1137896, 1141088, 1141097, 1141098,\n", + " 1144138, 1145347, 1145357, 1145358, 1145346, 1156875, 1136392, 1143767,\n", + " 1154860, 1137298, 1139032, 1149979, 1146834, 1135860, 1154466, 1142932,\n", + " 1141224, 1136917, 1143667, 1143679, 1144230, 1141785, 1139495, 1141300,\n", + " 1144650, 1139798, 1138482, 1141810, 1141812, 1141821, 1143153, 1145161,\n", + " 1138477, 1149111, 1137058, 1138717, 1142917, 1142913, 1143107, 1144596,\n", + " 1136867, 1136864, 1144041, 1140885, 1135315, 1140442, 1144182, 1137606,\n", + " 1146194, 1158698, 1138539, 1161701, 1147153, 1142641, 1149193, 1149197,\n", + " 1141365, 1141375, 1138292, 1143917, 1139508, 1139510, 1139769, 1139774,\n", + " 1144998, 1145000, 1145001, 1140983, 1140990, 1147046, 1147050, 1147047,\n", + " 1145873, 1143543, 1152976, 1152982, 1135457, 1139448, 1141925, 1141928,\n", + " 1146898, 1144242, 1140580, 1141841, 1137146, 1166363, 1150700, 1140696,\n", + " 1136891, 1143637, 1137571, 1145983, 1145974, 1143845, 1143851, 1136277,\n", + " 1136275, 1142098, 1146024, 1146140, 1142533, 1141235, 1139990, 1143293,\n", + " 1143294, 1151124, 1147543, 1147540, 1148763, 1147282, 1140348, 1149366,\n", + " 1139417, 1136160, 1136161, 1136836, 1136843, 1144779, 1139048, 1142159,\n", + " 1142146, 1143345, 1144753, 1144619, 1144615, 1145808, 1144088, 1144095,\n", + " 1138000, 1150919, 1146523, 1143957, 1138018, 1143456, 1143467, 1137697,\n", + " 1143937, 1135441, 1140830, 1140829, 1146580, 1149082, 1140364, 1137990,\n", + " 1143080, 1166410, 1148965, 1144219, 1147999, 1144010, 1139252, 1148704,\n", + " 1159719, 1150996, 1141319, 1146742, 1153701, 1152328, 1149725, 1147025,\n", + " 1147259, 1147970, 1145012, 1147188, 1158226, 1147880, 1141137, 1154526,\n", + " 1145750, 1145751, 1148394, 1148397, 1146178, 1150274, 1150445, 1149250,\n", + " 1144526, 1152012, 1151994, 1142304, 1142316, 1151480, 1151487, 1152027,\n", + " 1151041, 1146723, 1134875, 1148693, 1150112, 1147019, 1147021, 1141937,\n", + " 1141194, 1150736, 1141269, 1148744, 1154977, 1154987, 1147653, 1147654,\n", + " 1147650, 1149412, 1146402, 1148288, 1148300, 1152079, 1151412, 1154420,\n", + " 1158790, 1148180, 1151363, 1136247, 1139723, 1146682, 1146683, 1152436,\n", + " 1148729, 1149810, 1151943, 1143981, 1143888, 1148204, 1148110, 1154206,\n", + " 1153124, 1153192, 1153197, 1155540, 1150356, 1143134, 1141014, 1151816,\n", + " 1152578, 1152581, 1151906, 1151918, 1154183, 1154190, 1160681, 1148505,\n", + " 1141420, 1150636, 1155164, 1147737, 1147743, 1145086, 1146969, 1146967,\n", + " 1156402, 1146616, 1146623, 1151399, 1152858, 1152409, 1146280, 1153028,\n", + " 1153030, 1153032, 1153038, 1137746, 1146307, 1152622, 1140521, 1140527,\n", + " 1136401, 1149203, 1152816, 1155337, 1154112, 1157833, 1154633, 1154638,\n", + " 1139578, 1151617, 1150578, 1145278, 1148913, 1148914, 1152950, 1138982,\n", + " 1151306, 1151311, 1152342, 1146816, 1156823, 1156826, 1156816, 1156004,\n", + " 1156007, 1156010, 1156001, 1136028, 1136024, 1152928, 1151064, 1156399,\n", + " 1154733, 1154734, 1142781, 1143480, 1137550, 1160545, 1148033, 1148040,\n", + " 1149300, 1157631, 1149792, 1149794, 1137048, 1177026, 1148628, 1158530,\n", + " 1158540, 1148373, 1137458, 1149940, 1153083, 1142047, 1157459, 1154374,\n", + " 1157229, 1157547, 1148890, 1158916, 1158918, 1158924, 1156505, 1157064,\n", + " 1157069, 1155412, 1152833, 1151256, 1150465, 1142221, 1135730, 1152179,\n", + " 1156935, 1147810, 1139525, 1158308, 1158311, 1151273, 1155441, 1153359,\n", + " 1150136, 1162113, 1142755, 1138775, 1154235, 1151379, 1140188, 1155122,\n", + " 1152527, 1155758, 1151424, 1135398, 1158096, 1168230, 1154763, 1155667,\n", + " 1155626, 1155628, 1169993, 1156563, 1154555, 1158824, 1155646, 1143263,\n", + " 1154240, 1154908, 1143189, 1157430, 1150077, 1157928, 1140749, 1158126,\n", + " 1158578, 1153781, 1153786, 1149911, 1145689, 1140920, 1164307, 1134677,\n", + " 1134674, 1135601, 1135614, 1148153, 1159586, 1155854, 1149145, 1159258,\n", + " 1152209, 1152220, 1156693, 1140381, 1140375, 1156027, 1144843, 1142466,\n", + " 1155975, 1159956, 1161667, 1158846, 1183177, 1156812, 1155402, 1149702,\n", + " 1149700, 1159790, 1159452, 1161305, 1160163, 1136909, 1136896, 1158753,\n", + " 1158760, 1159164, 1158815, 1158285, 1158274, 1151615, 1136491, 1153632,\n", + " 1153635, 1147586, 1147599, 1155301, 1153112, 1153808, 1156281, 1180568,\n", + " 1142178, 1153826, 1153829, 1151146, 1151144, 1165500, 1165497, 1146123,\n", + " 1159943, 1155871, 1158003, 1158007, 1150011, 1155521, 1142493, 1157759,\n", + " 1157751, 1167357, 1156044, 1162683, 1159071, 1151824, 1158300, 1160563,\n", + " 1153052, 1171551, 1155769, 1144158, 1142869, 1142875, 1153841, 1161317,\n", + " 1156107, 1138393, 1142681, 1160646, 1150033, 1150046, 1149063, 1149070,\n", + " 1145948, 1153519, 1147300, 1138161, 1164006, 1149963, 1163873, 1154590,\n", + " 1154578, 1159985, 1146063, 1146356, 1165306, 1158873, 1148600, 1148603,\n", + " 1164979, 1164986, 1143139, 1141792, 1158643, 1158653, 1158655, 1156177,\n", + " 1159025, 1159032, 1159038, 1152247, 1158896, 1158905, 1164623, 1162550,\n", + " 1156576, 1144977, 1144986, 1144989, 1146500, 1146510, 1164580, 1144739,\n", + " 1144747, 1144750, 1141471, 1147427, 1147438, 1156739, 1167372, 1150649,\n", + " 1168748, 1144810, 1144812, 1153268, 1153273, 1135567, 1165714, 1142733,\n", + " 1156293, 1156303, 1166137, 1145732, 1166922, 1145228, 1167751, 1169282,\n", + " 1144973, 1142136, 1143025, 1145447, 1147346, 1139350, 1147723, 1145902,\n", + " 1153534, 1163955, 1181040, 1160845, 1158724, 1158722, 1166670, 1167503,\n", + " 1164397, 1154076, 1167317, 1145674, 1145502, 1169602, 1167817, 1144686,\n", + " 1166653, 1155172, 1150518, 1156119, 1144336, 1157534, 1147746, 1154670,\n", + " 1154893, 1138129, 1138130, 1141043, 1169359, 1149452, 1158623, 1158054,\n", + " 1149846, 1149847, 1157380, 1157384, 1165903, 1147416, 1152353, 1152546,\n", + " 1143858, 1168055, 1149398, 1167016, 1177211, 1177998, 1173307, 1145033,\n", + " 1154027, 1152150, 1157158, 1157153, 1172101, 1147711, 1151850, 1147934,\n", + " 1157593, 1170495, 1135018, 1135021, 1163036, 1155738, 1175216, 1175418,\n", + " 1166028, 1163989, 1169073, 1166682, 1183662, 1150234, 1154151, 1154148,\n", + " 1167531, 1158176, 1149169, 1149173, 1177452, 1184636, 1178619, 1179525,\n", + " 1170290, 1168481, 1143420, 1179243, 1178344, 1171297, 1172313, 1151509,\n", + " 1151519, 1179807, 1161255, 1176527, 1155260, 1155262, 1160206, 1154718,\n", + " 1154713, 1157792, 1157795, 1177275, 1171623, 1155804, 1153890, 1153898,\n", + " 1153899, 1188790, 1161846, 1178216, 1145626, 1172022, 1185115, 1149753,\n", + " 1149755, 1152272, 1163045, 1157761, 1158512, 1167638, 1158379, 1155892,\n", + " 1180856, 1177090, 1140399, 1168277, 1187887, 1187779, 1168889, 1189469,\n", + " 1171644, 1165448, 1161819, 1189603, 1146161, 1180019, 1190101, 1147179,\n", + " 1141507, 1168989, 1170034, 1156528, 1139828, 1139825, 1139831, 1150265,\n", + " 1167135, 1154804, 1149677, 1156055, 1151972, 1193847, 1187358, 1146392,\n", + " 1146394, 1190955, 1194024, 1149544, 1180098, 1172696, 1169963, 1182060,\n", + " 1162156, 1189970, 1153733, 1159180, 1152123, 1162504, 1169707, 1171722,\n", + " 1177845, 1161189, 1178268, 1172424, 1158064, 1158071, 1183552, 1178135,\n", + " 1191445, 1155959, 1187547, 1188313, 1186773, 1191760, 1167471],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1137212, 1141424, 1136237, 1140282, 1136349, 1138553, 1135716,\n", + " 1137784, 1137791, 1140785, 1141756, 1141758, 1138335, 1136223, 1142810,\n", + " 1139462, 1142521, 1136969, 1141448, 1138897, 1151164, 1143615, 1146978,\n", + " 1146983, 1137264, 1143360, 1146644, 1139958, 1148983, 1148987, 1150497,\n", + " 1150509, 1142968, 1139866, 1148576, 1149228, 1142947, 1142958, 1143820,\n", + " 1147473, 1147483, 1135992, 1142881, 1149037, 1149038, 1135119, 1146666,\n", + " 1150193, 1150203, 1146472, 1152666, 1148546, 1153217, 1153220, 1147094,\n", + " 1137220, 1155014, 1155018, 1139364, 1139371, 1147211, 1150329, 1152427,\n", + " 1136268, 1146374, 1140535, 1140540, 1138112, 1154407, 1137254, 1137181,\n", + " 1138356, 1153463, 1140149, 1140159, 1134735, 1135367, 1135202, 1135903,\n", + " 1136037, 1141036, 1134791, 1134794, 1134797, 1137329, 1137684, 1136609,\n", + " 1139204, 1144395, 1135408, 1135413, 1157397, 1137441, 1136204, 1156159,\n", + " 1139153, 1155084, 1138514, 1153099, 1137957, 1135522, 1139875, 1157703,\n", + " 1157702, 1138436, 1138440, 1138457, 1138449, 1137498, 1154784, 1157190,\n", + " 1137932, 1136594, 1149328, 1138846, 1138882, 1156603, 1156606, 1147112,\n", + " 1142611, 1135352, 1135359, 1156141, 1138185, 1158985, 1158987, 1148531,\n", + " 1137109, 1137423, 1139667, 1139673, 1138067, 1134992, 1152648, 1135789,\n", + " 1136734, 1140199, 1158961, 1142909, 1144410, 1153543, 1153544, 1139074,\n", + " 1139929, 1139933, 1137598, 1155660, 1152042, 1152044, 1137734, 1137728,\n", + " 1136993, 1136994, 1138255, 1135549, 1137896, 1141088, 1141097, 1141098,\n", + " 1144138, 1145347, 1145357, 1145358, 1145346, 1156875, 1136392, 1143767,\n", + " 1154860, 1137298, 1139032, 1149979, 1146834, 1135860, 1154466, 1142932,\n", + " 1141224, 1136917, 1143667, 1143679, 1144230, 1141785, 1139495, 1141300,\n", + " 1144650, 1139798, 1138482, 1141810, 1141812, 1141821, 1143153, 1145161,\n", + " 1138477, 1149111, 1137058, 1138717, 1142917, 1142913, 1143107, 1144596,\n", + " 1136867, 1136864, 1144041, 1140885, 1135315, 1140442, 1144182, 1137606,\n", + " 1146194, 1158698, 1138539, 1161701, 1147153, 1142641, 1149193, 1149197,\n", + " 1141365, 1141375, 1138292, 1143917, 1139508, 1139510, 1139769, 1139774,\n", + " 1144998, 1145000, 1145001, 1140983, 1140990, 1147046, 1147050, 1147047,\n", + " 1145873, 1143543, 1152976, 1152982, 1135457, 1139448, 1141925, 1141928,\n", + " 1146898, 1144242, 1140580, 1141841, 1137146, 1166363, 1150700, 1140696,\n", + " 1136891, 1143637, 1137571, 1145983, 1145974, 1143845, 1143851, 1136277,\n", + " 1136275, 1142098, 1146024, 1146140, 1142533, 1141235, 1139990, 1143293,\n", + " 1143294, 1151124, 1147543, 1147540, 1148763, 1147282, 1140348, 1149366,\n", + " 1139417, 1136160, 1136161, 1136836, 1136843, 1144779, 1139048, 1142159,\n", + " 1142146, 1143345, 1144753, 1144619, 1144615, 1145808, 1144088, 1144095,\n", + " 1138000, 1150919, 1146523, 1143957, 1138018, 1143456, 1143467, 1137697,\n", + " 1143937, 1135441, 1140830, 1140829, 1146580, 1149082, 1140364, 1137990,\n", + " 1143080, 1166410, 1148965, 1144219, 1147999, 1144010, 1139252, 1148704,\n", + " 1159719, 1150996, 1141319, 1146742, 1153701, 1152328, 1149725, 1147025,\n", + " 1147259, 1147970, 1145012, 1147188, 1158226, 1147880, 1141137, 1154526,\n", + " 1145750, 1145751, 1148394, 1148397, 1146178, 1150274, 1150445, 1149250,\n", + " 1144526, 1152012, 1151994, 1142304, 1142316, 1151480, 1151487, 1152027,\n", + " 1151041, 1146723, 1134875, 1148693, 1150112, 1147019, 1147021, 1141937,\n", + " 1141194, 1150736, 1141269, 1148744, 1154977, 1154987, 1147653, 1147654,\n", + " 1147650, 1149412, 1146402, 1148288, 1148300, 1152079, 1151412, 1154420,\n", + " 1158790, 1148180, 1151363, 1136247, 1139723, 1146682, 1146683, 1152436,\n", + " 1148729, 1149810, 1151943, 1143981, 1143888, 1148204, 1148110, 1154206,\n", + " 1153124, 1153192, 1153197, 1155540, 1150356, 1143134, 1141014, 1151816,\n", + " 1152578, 1152581, 1151906, 1151918, 1154183, 1154190, 1160681, 1148505,\n", + " 1141420, 1150636, 1155164, 1147737, 1147743, 1145086, 1146969, 1146967,\n", + " 1156402, 1146616, 1146623, 1151399, 1152858, 1152409, 1146280, 1153028,\n", + " 1153030, 1153032, 1153038, 1137746, 1146307, 1152622, 1140521, 1140527,\n", + " 1136401, 1149203, 1152816, 1155337, 1154112, 1157833, 1154633, 1154638,\n", + " 1139578, 1151617, 1150578, 1145278, 1148913, 1148914, 1152950, 1138982,\n", + " 1151306, 1151311, 1152342, 1146816, 1156823, 1156826, 1156816, 1156004,\n", + " 1156007, 1156010, 1156001, 1136028, 1136024, 1152928, 1151064, 1156399,\n", + " 1154733, 1154734, 1142781, 1143480, 1137550, 1160545, 1148033, 1148040,\n", + " 1149300, 1157631, 1149792, 1149794, 1137048, 1177026, 1148628, 1158530,\n", + " 1158540, 1148373, 1137458, 1149940, 1153083, 1142047, 1157459, 1154374,\n", + " 1157229, 1157547, 1148890, 1158916, 1158918, 1158924, 1156505, 1157064,\n", + " 1157069, 1155412, 1152833, 1151256, 1150465, 1142221, 1135730, 1152179,\n", + " 1156935, 1147810, 1139525, 1158308, 1158311, 1151273, 1155441, 1153359,\n", + " 1150136, 1162113, 1142755, 1138775, 1154235, 1151379, 1140188, 1155122,\n", + " 1152527, 1155758, 1151424, 1135398, 1158096, 1168230, 1154763, 1155667,\n", + " 1155626, 1155628, 1169993, 1156563, 1154555, 1158824, 1155646, 1143263,\n", + " 1154240, 1154908, 1143189, 1157430, 1150077, 1157928, 1140749, 1158126,\n", + " 1158578, 1153781, 1153786, 1149911, 1145689, 1140920, 1164307, 1134677,\n", + " 1134674, 1135601, 1135614, 1148153, 1159586, 1155854, 1149145, 1159258,\n", + " 1152209, 1152220, 1156693, 1140381, 1140375, 1156027, 1144843, 1142466,\n", + " 1155975, 1159956, 1161667, 1158846, 1183177, 1156812, 1155402, 1149702,\n", + " 1149700, 1159790, 1159452, 1161305, 1160163, 1136909, 1136896, 1158753,\n", + " 1158760, 1159164, 1158815, 1158285, 1158274, 1151615, 1136491, 1153632,\n", + " 1153635, 1147586, 1147599, 1155301, 1153112, 1153808, 1156281, 1180568,\n", + " 1142178, 1153826, 1153829, 1151146, 1151144, 1165500, 1165497, 1146123,\n", + " 1159943, 1155871, 1158003, 1158007, 1150011, 1155521, 1142493, 1157759,\n", + " 1157751, 1167357, 1156044, 1162683, 1159071, 1151824, 1158300, 1160563,\n", + " 1153052, 1171551, 1155769, 1144158, 1142869, 1142875, 1153841, 1161317,\n", + " 1156107, 1138393, 1142681, 1160646, 1150033, 1150046, 1149063, 1149070,\n", + " 1145948, 1153519, 1147300, 1138161, 1164006, 1149963, 1163873, 1154590,\n", + " 1154578, 1159985, 1146063, 1146356, 1165306, 1158873, 1148600, 1148603,\n", + " 1164979, 1164986, 1143139, 1141792, 1158643, 1158653, 1158655, 1156177,\n", + " 1159025, 1159032, 1159038, 1152247, 1158896, 1158905, 1164623, 1162550,\n", + " 1156576, 1144977, 1144986, 1144989, 1146500, 1146510, 1164580, 1144739,\n", + " 1144747, 1144750, 1141471, 1147427, 1147438, 1156739, 1167372, 1150649,\n", + " 1168748, 1144810, 1144812, 1153268, 1153273, 1135567, 1165714, 1142733,\n", + " 1156293, 1156303, 1166137, 1145732, 1166922, 1145228, 1167751, 1169282,\n", + " 1144973, 1142136, 1143025, 1145447, 1147346, 1139350, 1147723, 1145902,\n", + " 1153534, 1163955, 1181040, 1160845, 1158724, 1158722, 1166670, 1167503,\n", + " 1164397, 1154076, 1167317, 1145674, 1145502, 1169602, 1167817, 1144686,\n", + " 1166653, 1155172, 1150518, 1156119, 1144336, 1157534, 1147746, 1154670,\n", + " 1154893, 1138129, 1138130, 1141043, 1169359, 1149452, 1158623, 1158054,\n", + " 1149846, 1149847, 1157380, 1157384, 1165903, 1147416, 1152353, 1152546,\n", + " 1143858, 1168055, 1149398, 1167016, 1177211, 1177998, 1173307, 1145033,\n", + " 1154027, 1152150, 1157158, 1157153, 1172101, 1147711, 1151850, 1147934,\n", + " 1157593, 1170495, 1135018, 1135021, 1163036, 1155738, 1175216, 1175418,\n", + " 1166028, 1163989, 1169073, 1166682, 1183662, 1150234, 1154151, 1154148,\n", + " 1167531, 1158176, 1149169, 1149173, 1177452, 1184636, 1178619, 1179525,\n", + " 1170290, 1168481, 1143420, 1179243, 1178344, 1171297, 1172313, 1151509,\n", + " 1151519, 1179807, 1161255, 1176527, 1155260, 1155262, 1160206, 1154718,\n", + " 1154713, 1157792, 1157795, 1177275, 1171623, 1155804, 1153890, 1153898,\n", + " 1153899, 1188790, 1161846, 1178216, 1145626, 1172022, 1185115, 1149753,\n", + " 1149755, 1152272, 1163045, 1157761, 1158512, 1167638, 1158379, 1155892,\n", + " 1180856, 1177090, 1140399, 1168277, 1187887, 1187779, 1168889, 1189469,\n", + " 1171644, 1165448, 1161819, 1189603, 1146161, 1180019, 1190101, 1147179,\n", + " 1141507, 1168989, 1170034, 1156528, 1139828, 1139825, 1139831, 1150265,\n", + " 1167135, 1154804, 1149677, 1156055, 1151972, 1193847, 1187358, 1146392,\n", + " 1146394, 1190955, 1194024, 1149544, 1180098, 1172696, 1169963, 1182060,\n", + " 1162156, 1189970, 1153733, 1159180, 1152123, 1162504, 1169707, 1171722,\n", + " 1177845, 1161189, 1178268, 1172424, 1158064, 1158071, 1183552, 1178135,\n", + " 1191445, 1155959, 1187547, 1188313, 1186773, 1191760, 1167471],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197841, 1198769, 1198731, 1202255, 1198844, 1201577, 1199278, 1194635,\n", + " 1197777, 1201016, 1198633, 1196956, 1196871, 1197512, 1194866, 1194743,\n", + " 1194745, 1194783, 1196624, 1196631, 1195511, 1195514, 1195263, 1197924,\n", + " 1199135, 1196534, 1201992, 1196030, 1197697, 1194882, 1194883, 1195888,\n", + " 1195895, 1196359, 1197831, 1199371, 1198666, 1195571, 1199810, 1199823,\n", + " 1195270, 1197141, 1197273, 1196109, 1198209, 1195841, 1198915, 1199377,\n", + " 1195659, 1197474, 1197478, 1197483, 1197640, 1197191, 1199699, 1196393,\n", + " 1198282, 1200949, 1194928, 1197583, 1199628, 1197994, 1199152, 1199572,\n", + " 1199231, 1197601, 1201116, 1201117, 1196727, 1202618, 1198428, 1199421,\n", + " 1199555, 1201547, 1199083, 1200171, 1200503, 1202630, 1202401, 1201056,\n", + " 1200913, 1197097, 1196883, 1199908, 1196779, 1201442, 1202239, 1200831,\n", + " 1200899, 1202669, 1201291, 1199925, 1200242, 1200398, 1196960, 1196963,\n", + " 1202687, 1194996, 1202432, 1198908, 1198911, 1195181, 1197816, 1197822,\n", + " 1198967, 1199659, 1199662, 1203102, 1194730, 1198147, 1197735, 1198819,\n", + " 1201001, 1200466, 1200468, 1201886, 1197335, 1196073, 1197035, 1195165,\n", + " 1194908, 1196424], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197841, 1198769, 1198731, 1202255, 1198844, 1201577, 1199278, 1194635,\n", + " 1197777, 1201016, 1198633, 1196956, 1196871, 1197512, 1194866, 1194743,\n", + " 1194745, 1194783, 1196624, 1196631, 1195511, 1195514, 1195263, 1197924,\n", + " 1199135, 1196534, 1201992, 1196030, 1197697, 1194882, 1194883, 1195888,\n", + " 1195895, 1196359, 1197831, 1199371, 1198666, 1195571, 1199810, 1199823,\n", + " 1195270, 1197141, 1197273, 1196109, 1198209, 1195841, 1198915, 1199377,\n", + " 1195659, 1197474, 1197478, 1197483, 1197640, 1197191, 1199699, 1196393,\n", + " 1198282, 1200949, 1194928, 1197583, 1199628, 1197994, 1199152, 1199572,\n", + " 1199231, 1197601, 1201116, 1201117, 1196727, 1202618, 1198428, 1199421,\n", + " 1199555, 1201547, 1199083, 1200171, 1200503, 1202630, 1202401, 1201056,\n", + " 1200913, 1197097, 1196883, 1199908, 1196779, 1201442, 1202239, 1200831,\n", + " 1200899, 1202669, 1201291, 1199925, 1200242, 1200398, 1196960, 1196963,\n", + " 1202687, 1194996, 1202432, 1198908, 1198911, 1195181, 1197816, 1197822,\n", + " 1198967, 1199659, 1199662, 1203102, 1194730, 1198147, 1197735, 1198819,\n", + " 1201001, 1200466, 1200468, 1201886, 1197335, 1196073, 1197035, 1195165,\n", + " 1194908, 1196424], device='cuda:0', dtype=torch.int32))\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.004248\n", + "sampling 0.003722\n", + "noi time: 0.000728\n", + "get_vertex_data call: 0.046673\n", + "noi group time: 0.003839\n", + "eoi_group_time: 0.01085\n", + "second half: 0.189936\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 18183, 16140, 27122, ..., 1120069, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 18183, 16140, 27122, ..., 1120069, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1203800, 1212294, 1224534, ..., 1929325, 1934170, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1203800, 1212294, 1224534, ..., 1929325, 1934170, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1141424, 1140282, 1136339, 1135926, 1135160, 1135716, 1141758,\n", + " 1138335, 1136215, 1140297, 1142807, 1142525, 1136971, 1138897, 1139811,\n", + " 1146982, 1137947, 1138938, 1143372, 1143363, 1150390, 1150395, 1146647,\n", + " 1150497, 1145281, 1134943, 1155689, 1143820, 1149646, 1141877, 1135989,\n", + " 1142881, 1153938, 1144636, 1144625, 1135262, 1153012, 1153019, 1146472,\n", + " 1152666, 1138347, 1148546, 1147094, 1141904, 1137220, 1139365, 1139373,\n", + " 1147211, 1150322, 1152427, 1134807, 1140304, 1140313, 1151546, 1140537,\n", + " 1140540, 1138112, 1138119, 1138356, 1135906, 1140953, 1135367, 1135202,\n", + " 1135210, 1140758, 1136041, 1134969, 1141036, 1136783, 1134794, 1157443,\n", + " 1136519, 1138504, 1137342, 1143068, 1137685, 1137693, 1136619, 1144395,\n", + " 1157406, 1157397, 1137441, 1156152, 1148481, 1148484, 1139161, 1135579,\n", + " 1142602, 1140704, 1138514, 1153099, 1153100, 1137953, 1137957, 1156899,\n", + " 1135522, 1138305, 1137287, 1139874, 1157703, 1138440, 1138445, 1136534,\n", + " 1138461, 1154785, 1137924, 1136594, 1149328, 1156606, 1147112, 1147119,\n", + " 1142611, 1142616, 1135352, 1135355, 1135631, 1156141, 1158984, 1145843,\n", + " 1148531, 1137109, 1143586, 1136449, 1138067, 1134992, 1148805, 1135789,\n", + " 1158961, 1158974, 1142906, 1159009, 1159011, 1141065, 1153543, 1153544,\n", + " 1143626, 1139085, 1139934, 1138648, 1138148, 1153396, 1146075, 1152044,\n", + " 1140670, 1137734, 1137728, 1147327, 1146222, 1134738, 1135547, 1136697,\n", + " 1141088, 1144130, 1149001, 1139889, 1141979, 1141980, 1143767, 1137297,\n", + " 1143225, 1139033, 1149979, 1146844, 1135860, 1136637, 1141224, 1139386,\n", + " 1163301, 1136917, 1143673, 1137186, 1137188, 1144237, 1146462, 1139495,\n", + " 1136752, 1136753, 1141603, 1134979, 1136854, 1137087, 1137074, 1139798,\n", + " 1138482, 1142050, 1141810, 1145154, 1158749, 1148872, 1138709, 1138717,\n", + " 1138719, 1142913, 1142562, 1143111, 1143113, 1148443, 1148444, 1144596,\n", + " 1142453, 1136867, 1136864, 1145298, 1141392, 1141405, 1144182, 1144179,\n", + " 1150906, 1146202, 1137364, 1137375, 1139559, 1138537, 1140510, 1137854,\n", + " 1137841, 1137844, 1147153, 1141365, 1141367, 1153068, 1141678, 1141664,\n", + " 1149090, 1149093, 1139013, 1138292, 1143917, 1139510, 1139764, 1139127,\n", + " 1144997, 1145000, 1140619, 1164534, 1140976, 1140990, 1141555, 1141565,\n", + " 1147050, 1145872, 1145873, 1152976, 1152977, 1152988, 1141925, 1146905,\n", + " 1144242, 1168730, 1140689, 1139405, 1137570, 1145971, 1145980, 1144073,\n", + " 1143851, 1146003, 1146024, 1146140, 1141646, 1141585, 1141592, 1141234,\n", + " 1141235, 1139990, 1150418, 1147543, 1147545, 1147540, 1147282, 1149155,\n", + " 1149366, 1147375, 1148003, 1146091, 1149608, 1143051, 1143040, 1148408,\n", + " 1136167, 1138927, 1136836, 1139301, 1139329, 1143345, 1144766, 1144767,\n", + " 1144619, 1144081, 1139976, 1135876, 1150755, 1150758, 1144306, 1138024,\n", + " 1143456, 1143467, 1137697, 1142015, 1146590, 1147574, 1140360, 1140364,\n", + " 1143075, 1166410, 1144219, 1147984, 1147995, 1147999, 1134899, 1134902,\n", + " 1144013, 1139252, 1148704, 1141836, 1146742, 1152321, 1152328, 1147025,\n", + " 1147249, 1147196, 1158226, 1150452, 1154526, 1151646, 1145240, 1145751,\n", + " 1142376, 1138638, 1146178, 1151239, 1151242, 1169870, 1150280, 1150285,\n", + " 1150441, 1149263, 1148819, 1154442, 1151856, 1149791, 1144514, 1146887,\n", + " 1150339, 1152013, 1165252, 1147794, 1147796, 1151475, 1151480, 1145256,\n", + " 1145261, 1139915, 1139919, 1146723, 1149588, 1134866, 1140566, 1149534,\n", + " 1150122, 1148273, 1147021, 1147023, 1153959, 1141949, 1148744, 1153578,\n", + " 1147653, 1143560, 1149420, 1149412, 1148294, 1152073, 1135079, 1139088,\n", + " 1154420, 1158792, 1148180, 1136251, 1136247, 1139712, 1146682, 1146686,\n", + " 1157983, 1146549, 1149815, 1150048, 1154166, 1153124, 1153192, 1153197,\n", + " 1145104, 1168626, 1152877, 1150352, 1150356, 1155088, 1143129, 1151810,\n", + " 1151816, 1152581, 1135311, 1151906, 1154183, 1148505, 1148510, 1141420,\n", + " 1150630, 1147602, 1147737, 1148949, 1146969, 1146967, 1156402, 1146623,\n", + " 1144476, 1144472, 1135688, 1152849, 1152409, 1154063, 1152098, 1146287,\n", + " 1153032, 1153038, 1137746, 1146304, 1152622, 1155148, 1149203, 1149207,\n", + " 1155358, 1164760, 1151617, 1150578, 1136134, 1148916, 1148927, 1144529,\n", + " 1145952, 1138991, 1138987, 1152903, 1151311, 1152341, 1158429, 1156826,\n", + " 1146708, 1138279, 1138281, 1156004, 1136028, 1158712, 1158704, 1162192,\n", + " 1152928, 1151071, 1156387, 1142777, 1156422, 1148033, 1148040, 1155202,\n", + " 1149300, 1155223, 1145649, 1145656, 1137048, 1148628, 1148637, 1158530,\n", + " 1158540, 1169177, 1137458, 1157518, 1135708, 1142047, 1154381, 1143448,\n", + " 1157540, 1137872, 1156501, 1156505, 1157064, 1157069, 1155422, 1155418,\n", + " 1146854, 1142221, 1135730, 1152179, 1152182, 1156633, 1156935, 1147812,\n", + " 1147818, 1158311, 1151342, 1155441, 1150136, 1154529, 1145600, 1142755,\n", + " 1156207, 1156258, 1156271, 1151379, 1137918, 1158629, 1155122, 1152527,\n", + " 1157172, 1149324, 1153482, 1155755, 1151432, 1146924, 1158104, 1157894,\n", + " 1155628, 1155629, 1156563, 1155574, 1136469, 1158824, 1158325, 1148640,\n", + " 1155646, 1143263, 1146938, 1154240, 1156711, 1152307, 1154909, 1143189,\n", + " 1143185, 1150371, 1153322, 1151030, 1137152, 1157663, 1157650, 1158123,\n", + " 1158578, 1153786, 1149904, 1137381, 1137387, 1159116, 1138264, 1145682,\n", + " 1145694, 1135601, 1145507, 1148149, 1150671, 1150659, 1155853, 1158664,\n", + " 1149145, 1152220, 1152498, 1140380, 1155884, 1144843, 1155970, 1155971,\n", + " 1155975, 1154682, 1142064, 1158841, 1158846, 1161900, 1149696, 1154600,\n", + " 1136909, 1136896, 1158753, 1158881, 1158891, 1140218, 1159164, 1158815,\n", + " 1158285, 1136494, 1155305, 1156488, 1153808, 1134757, 1183285, 1142178,\n", + " 1158545, 1158558, 1153834, 1151146, 1146123, 1146126, 1155871, 1144581,\n", + " 1144584, 1158260, 1150011, 1155529, 1142487, 1164276, 1142665, 1150684,\n", + " 1159042, 1159052, 1159065, 1159070, 1159137, 1153052, 1153045, 1156235,\n", + " 1156101, 1138393, 1150035, 1159475, 1149070, 1145948, 1155480, 1153514,\n", + " 1153519, 1147300, 1171994, 1138161, 1164006, 1156787, 1156795, 1149956,\n", + " 1154590, 1139586, 1139290, 1156983, 1157236, 1140731, 1157351, 1146063,\n", + " 1163455, 1158868, 1140643, 1148603, 1143143, 1144504, 1155810, 1156361,\n", + " 1156367, 1141800, 1156187, 1159025, 1159029, 1159032, 1159038, 1152247,\n", + " 1143729, 1155588, 1155598, 1158405, 1146500, 1146509, 1169263, 1144739,\n", + " 1144750, 1152776, 1155046, 1155267, 1160664, 1165422, 1141471, 1151650,\n", + " 1147426, 1147427, 1165867, 1156737, 1156739, 1156741, 1150646, 1144812,\n", + " 1162085, 1135567, 1164750, 1142722, 1161758, 1145743, 1148683, 1145567,\n", + " 1145228, 1145229, 1169282, 1154700, 1166454, 1166462, 1150531, 1142129,\n", + " 1146444, 1165746, 1170949, 1152624, 1139350, 1139351, 1145902, 1181049,\n", + " 1175240, 1143395, 1143402, 1143407, 1171219, 1167503, 1171279, 1154070,\n", + " 1154076, 1147331, 1147338, 1150773, 1145502, 1149130, 1154917, 1167817,\n", + " 1155172, 1155183, 1154212, 1150518, 1156113, 1145531, 1144346, 1144336,\n", + " 1157534, 1138376, 1138378, 1138383, 1154670, 1135854, 1157331, 1141051,\n", + " 1141043, 1151668, 1169359, 1154364, 1172744, 1149452, 1158146, 1149688,\n", + " 1158623, 1158062, 1173047, 1149846, 1157383, 1165899, 1160540, 1152353,\n", + " 1166594, 1168369, 1168371, 1188547, 1148667, 1172838, 1148325, 1169049,\n", + " 1173392, 1173307, 1145033, 1189239, 1160936, 1154027, 1152152, 1159658,\n", + " 1159655, 1169578, 1157158, 1157153, 1157373, 1167232, 1147711, 1151850,\n", + " 1148128, 1148131, 1145783, 1157593, 1167717, 1163027, 1155739, 1167892,\n", + " 1182093, 1140326, 1168340, 1171604, 1166682, 1166680, 1183661, 1154148,\n", + " 1149169, 1149173, 1177440, 1170473, 1170380, 1167657, 1156557, 1181246,\n", + " 1169628, 1181582, 1183024, 1173957, 1161025, 1161031, 1151509, 1179807,\n", + " 1158029, 1155260, 1176675, 1171773, 1157792, 1157795, 1182812, 1171623,\n", + " 1164034, 1155799, 1174958, 1157992, 1171738, 1183106, 1153889, 1153898,\n", + " 1153899, 1164564, 1145626, 1172024, 1154840, 1180383, 1178757, 1149755,\n", + " 1146252, 1153609, 1153605, 1183215, 1155990, 1158940, 1155890, 1155899,\n", + " 1157272, 1182797, 1159872, 1140395, 1166984, 1170597, 1185394, 1169064,\n", + " 1168886, 1179090, 1182337, 1163422, 1192897, 1154944, 1161819, 1172623,\n", + " 1186893, 1159529, 1139828, 1139831, 1150265, 1154812, 1151288, 1156055,\n", + " 1191984, 1188873, 1146386, 1146392, 1146389, 1146395, 1190958, 1173061,\n", + " 1149536, 1188421, 1178523, 1169964, 1181951, 1194472, 1140993, 1193012,\n", + " 1194221, 1167840, 1151774, 1190452, 1171458, 1182226, 1171201, 1170128,\n", + " 1194059, 1172423, 1158071, 1178135, 1155959, 1155962, 1178301, 1192351,\n", + " 1187339, 1182769, 1189798, 1184941, 1186149, 1157022, 1161940],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1141424, 1140282, 1136339, 1135926, 1135160, 1135716, 1141758,\n", + " 1138335, 1136215, 1140297, 1142807, 1142525, 1136971, 1138897, 1139811,\n", + " 1146982, 1137947, 1138938, 1143372, 1143363, 1150390, 1150395, 1146647,\n", + " 1150497, 1145281, 1134943, 1155689, 1143820, 1149646, 1141877, 1135989,\n", + " 1142881, 1153938, 1144636, 1144625, 1135262, 1153012, 1153019, 1146472,\n", + " 1152666, 1138347, 1148546, 1147094, 1141904, 1137220, 1139365, 1139373,\n", + " 1147211, 1150322, 1152427, 1134807, 1140304, 1140313, 1151546, 1140537,\n", + " 1140540, 1138112, 1138119, 1138356, 1135906, 1140953, 1135367, 1135202,\n", + " 1135210, 1140758, 1136041, 1134969, 1141036, 1136783, 1134794, 1157443,\n", + " 1136519, 1138504, 1137342, 1143068, 1137685, 1137693, 1136619, 1144395,\n", + " 1157406, 1157397, 1137441, 1156152, 1148481, 1148484, 1139161, 1135579,\n", + " 1142602, 1140704, 1138514, 1153099, 1153100, 1137953, 1137957, 1156899,\n", + " 1135522, 1138305, 1137287, 1139874, 1157703, 1138440, 1138445, 1136534,\n", + " 1138461, 1154785, 1137924, 1136594, 1149328, 1156606, 1147112, 1147119,\n", + " 1142611, 1142616, 1135352, 1135355, 1135631, 1156141, 1158984, 1145843,\n", + " 1148531, 1137109, 1143586, 1136449, 1138067, 1134992, 1148805, 1135789,\n", + " 1158961, 1158974, 1142906, 1159009, 1159011, 1141065, 1153543, 1153544,\n", + " 1143626, 1139085, 1139934, 1138648, 1138148, 1153396, 1146075, 1152044,\n", + " 1140670, 1137734, 1137728, 1147327, 1146222, 1134738, 1135547, 1136697,\n", + " 1141088, 1144130, 1149001, 1139889, 1141979, 1141980, 1143767, 1137297,\n", + " 1143225, 1139033, 1149979, 1146844, 1135860, 1136637, 1141224, 1139386,\n", + " 1163301, 1136917, 1143673, 1137186, 1137188, 1144237, 1146462, 1139495,\n", + " 1136752, 1136753, 1141603, 1134979, 1136854, 1137087, 1137074, 1139798,\n", + " 1138482, 1142050, 1141810, 1145154, 1158749, 1148872, 1138709, 1138717,\n", + " 1138719, 1142913, 1142562, 1143111, 1143113, 1148443, 1148444, 1144596,\n", + " 1142453, 1136867, 1136864, 1145298, 1141392, 1141405, 1144182, 1144179,\n", + " 1150906, 1146202, 1137364, 1137375, 1139559, 1138537, 1140510, 1137854,\n", + " 1137841, 1137844, 1147153, 1141365, 1141367, 1153068, 1141678, 1141664,\n", + " 1149090, 1149093, 1139013, 1138292, 1143917, 1139510, 1139764, 1139127,\n", + " 1144997, 1145000, 1140619, 1164534, 1140976, 1140990, 1141555, 1141565,\n", + " 1147050, 1145872, 1145873, 1152976, 1152977, 1152988, 1141925, 1146905,\n", + " 1144242, 1168730, 1140689, 1139405, 1137570, 1145971, 1145980, 1144073,\n", + " 1143851, 1146003, 1146024, 1146140, 1141646, 1141585, 1141592, 1141234,\n", + " 1141235, 1139990, 1150418, 1147543, 1147545, 1147540, 1147282, 1149155,\n", + " 1149366, 1147375, 1148003, 1146091, 1149608, 1143051, 1143040, 1148408,\n", + " 1136167, 1138927, 1136836, 1139301, 1139329, 1143345, 1144766, 1144767,\n", + " 1144619, 1144081, 1139976, 1135876, 1150755, 1150758, 1144306, 1138024,\n", + " 1143456, 1143467, 1137697, 1142015, 1146590, 1147574, 1140360, 1140364,\n", + " 1143075, 1166410, 1144219, 1147984, 1147995, 1147999, 1134899, 1134902,\n", + " 1144013, 1139252, 1148704, 1141836, 1146742, 1152321, 1152328, 1147025,\n", + " 1147249, 1147196, 1158226, 1150452, 1154526, 1151646, 1145240, 1145751,\n", + " 1142376, 1138638, 1146178, 1151239, 1151242, 1169870, 1150280, 1150285,\n", + " 1150441, 1149263, 1148819, 1154442, 1151856, 1149791, 1144514, 1146887,\n", + " 1150339, 1152013, 1165252, 1147794, 1147796, 1151475, 1151480, 1145256,\n", + " 1145261, 1139915, 1139919, 1146723, 1149588, 1134866, 1140566, 1149534,\n", + " 1150122, 1148273, 1147021, 1147023, 1153959, 1141949, 1148744, 1153578,\n", + " 1147653, 1143560, 1149420, 1149412, 1148294, 1152073, 1135079, 1139088,\n", + " 1154420, 1158792, 1148180, 1136251, 1136247, 1139712, 1146682, 1146686,\n", + " 1157983, 1146549, 1149815, 1150048, 1154166, 1153124, 1153192, 1153197,\n", + " 1145104, 1168626, 1152877, 1150352, 1150356, 1155088, 1143129, 1151810,\n", + " 1151816, 1152581, 1135311, 1151906, 1154183, 1148505, 1148510, 1141420,\n", + " 1150630, 1147602, 1147737, 1148949, 1146969, 1146967, 1156402, 1146623,\n", + " 1144476, 1144472, 1135688, 1152849, 1152409, 1154063, 1152098, 1146287,\n", + " 1153032, 1153038, 1137746, 1146304, 1152622, 1155148, 1149203, 1149207,\n", + " 1155358, 1164760, 1151617, 1150578, 1136134, 1148916, 1148927, 1144529,\n", + " 1145952, 1138991, 1138987, 1152903, 1151311, 1152341, 1158429, 1156826,\n", + " 1146708, 1138279, 1138281, 1156004, 1136028, 1158712, 1158704, 1162192,\n", + " 1152928, 1151071, 1156387, 1142777, 1156422, 1148033, 1148040, 1155202,\n", + " 1149300, 1155223, 1145649, 1145656, 1137048, 1148628, 1148637, 1158530,\n", + " 1158540, 1169177, 1137458, 1157518, 1135708, 1142047, 1154381, 1143448,\n", + " 1157540, 1137872, 1156501, 1156505, 1157064, 1157069, 1155422, 1155418,\n", + " 1146854, 1142221, 1135730, 1152179, 1152182, 1156633, 1156935, 1147812,\n", + " 1147818, 1158311, 1151342, 1155441, 1150136, 1154529, 1145600, 1142755,\n", + " 1156207, 1156258, 1156271, 1151379, 1137918, 1158629, 1155122, 1152527,\n", + " 1157172, 1149324, 1153482, 1155755, 1151432, 1146924, 1158104, 1157894,\n", + " 1155628, 1155629, 1156563, 1155574, 1136469, 1158824, 1158325, 1148640,\n", + " 1155646, 1143263, 1146938, 1154240, 1156711, 1152307, 1154909, 1143189,\n", + " 1143185, 1150371, 1153322, 1151030, 1137152, 1157663, 1157650, 1158123,\n", + " 1158578, 1153786, 1149904, 1137381, 1137387, 1159116, 1138264, 1145682,\n", + " 1145694, 1135601, 1145507, 1148149, 1150671, 1150659, 1155853, 1158664,\n", + " 1149145, 1152220, 1152498, 1140380, 1155884, 1144843, 1155970, 1155971,\n", + " 1155975, 1154682, 1142064, 1158841, 1158846, 1161900, 1149696, 1154600,\n", + " 1136909, 1136896, 1158753, 1158881, 1158891, 1140218, 1159164, 1158815,\n", + " 1158285, 1136494, 1155305, 1156488, 1153808, 1134757, 1183285, 1142178,\n", + " 1158545, 1158558, 1153834, 1151146, 1146123, 1146126, 1155871, 1144581,\n", + " 1144584, 1158260, 1150011, 1155529, 1142487, 1164276, 1142665, 1150684,\n", + " 1159042, 1159052, 1159065, 1159070, 1159137, 1153052, 1153045, 1156235,\n", + " 1156101, 1138393, 1150035, 1159475, 1149070, 1145948, 1155480, 1153514,\n", + " 1153519, 1147300, 1171994, 1138161, 1164006, 1156787, 1156795, 1149956,\n", + " 1154590, 1139586, 1139290, 1156983, 1157236, 1140731, 1157351, 1146063,\n", + " 1163455, 1158868, 1140643, 1148603, 1143143, 1144504, 1155810, 1156361,\n", + " 1156367, 1141800, 1156187, 1159025, 1159029, 1159032, 1159038, 1152247,\n", + " 1143729, 1155588, 1155598, 1158405, 1146500, 1146509, 1169263, 1144739,\n", + " 1144750, 1152776, 1155046, 1155267, 1160664, 1165422, 1141471, 1151650,\n", + " 1147426, 1147427, 1165867, 1156737, 1156739, 1156741, 1150646, 1144812,\n", + " 1162085, 1135567, 1164750, 1142722, 1161758, 1145743, 1148683, 1145567,\n", + " 1145228, 1145229, 1169282, 1154700, 1166454, 1166462, 1150531, 1142129,\n", + " 1146444, 1165746, 1170949, 1152624, 1139350, 1139351, 1145902, 1181049,\n", + " 1175240, 1143395, 1143402, 1143407, 1171219, 1167503, 1171279, 1154070,\n", + " 1154076, 1147331, 1147338, 1150773, 1145502, 1149130, 1154917, 1167817,\n", + " 1155172, 1155183, 1154212, 1150518, 1156113, 1145531, 1144346, 1144336,\n", + " 1157534, 1138376, 1138378, 1138383, 1154670, 1135854, 1157331, 1141051,\n", + " 1141043, 1151668, 1169359, 1154364, 1172744, 1149452, 1158146, 1149688,\n", + " 1158623, 1158062, 1173047, 1149846, 1157383, 1165899, 1160540, 1152353,\n", + " 1166594, 1168369, 1168371, 1188547, 1148667, 1172838, 1148325, 1169049,\n", + " 1173392, 1173307, 1145033, 1189239, 1160936, 1154027, 1152152, 1159658,\n", + " 1159655, 1169578, 1157158, 1157153, 1157373, 1167232, 1147711, 1151850,\n", + " 1148128, 1148131, 1145783, 1157593, 1167717, 1163027, 1155739, 1167892,\n", + " 1182093, 1140326, 1168340, 1171604, 1166682, 1166680, 1183661, 1154148,\n", + " 1149169, 1149173, 1177440, 1170473, 1170380, 1167657, 1156557, 1181246,\n", + " 1169628, 1181582, 1183024, 1173957, 1161025, 1161031, 1151509, 1179807,\n", + " 1158029, 1155260, 1176675, 1171773, 1157792, 1157795, 1182812, 1171623,\n", + " 1164034, 1155799, 1174958, 1157992, 1171738, 1183106, 1153889, 1153898,\n", + " 1153899, 1164564, 1145626, 1172024, 1154840, 1180383, 1178757, 1149755,\n", + " 1146252, 1153609, 1153605, 1183215, 1155990, 1158940, 1155890, 1155899,\n", + " 1157272, 1182797, 1159872, 1140395, 1166984, 1170597, 1185394, 1169064,\n", + " 1168886, 1179090, 1182337, 1163422, 1192897, 1154944, 1161819, 1172623,\n", + " 1186893, 1159529, 1139828, 1139831, 1150265, 1154812, 1151288, 1156055,\n", + " 1191984, 1188873, 1146386, 1146392, 1146389, 1146395, 1190958, 1173061,\n", + " 1149536, 1188421, 1178523, 1169964, 1181951, 1194472, 1140993, 1193012,\n", + " 1194221, 1167840, 1151774, 1190452, 1171458, 1182226, 1171201, 1170128,\n", + " 1194059, 1172423, 1158071, 1178135, 1155959, 1155962, 1178301, 1192351,\n", + " 1187339, 1182769, 1189798, 1184941, 1186149, 1157022, 1161940],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1195393, 1195394, 1198248, 1197719, 1199835, 1195860, 1199281,\n", + " 1199282, 1198459, 1202255, 1201577, 1201016, 1197359, 1198694, 1196871,\n", + " 1202804, 1194783, 1196631, 1194648, 1195514, 1195263, 1198543, 1194956,\n", + " 1195888, 1195895, 1202902, 1199171, 1196977, 1196979, 1196610, 1196840,\n", + " 1195980, 1195982, 1196704, 1199810, 1195278, 1197140, 1197367, 1196109,\n", + " 1195038, 1195039, 1202916, 1196311, 1202017, 1202021, 1195626, 1195918,\n", + " 1196283, 1195351, 1198280, 1200959, 1194928, 1200869, 1199154, 1198410,\n", + " 1199579, 1199231, 1201916, 1201511, 1196496, 1196508, 1197601, 1196727,\n", + " 1202618, 1198416, 1198428, 1198800, 1199555, 1201547, 1200612, 1201827,\n", + " 1198066, 1196477, 1201155, 1201156, 1201061, 1199539, 1201737, 1200526,\n", + " 1200551, 1200429, 1200861, 1196885, 1201442, 1202239, 1200899, 1201291,\n", + " 1195607, 1202308, 1196966, 1200784, 1202759, 1197334, 1198929, 1200684,\n", + " 1195181, 1197059, 1202269, 1199661, 1203102, 1197735, 1201981, 1202690,\n", + " 1203080, 1195066, 1200707, 1197335, 1201361, 1197035, 1197026, 1201966],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1195393, 1195394, 1198248, 1197719, 1199835, 1195860, 1199281,\n", + " 1199282, 1198459, 1202255, 1201577, 1201016, 1197359, 1198694, 1196871,\n", + " 1202804, 1194783, 1196631, 1194648, 1195514, 1195263, 1198543, 1194956,\n", + " 1195888, 1195895, 1202902, 1199171, 1196977, 1196979, 1196610, 1196840,\n", + " 1195980, 1195982, 1196704, 1199810, 1195278, 1197140, 1197367, 1196109,\n", + " 1195038, 1195039, 1202916, 1196311, 1202017, 1202021, 1195626, 1195918,\n", + " 1196283, 1195351, 1198280, 1200959, 1194928, 1200869, 1199154, 1198410,\n", + " 1199579, 1199231, 1201916, 1201511, 1196496, 1196508, 1197601, 1196727,\n", + " 1202618, 1198416, 1198428, 1198800, 1199555, 1201547, 1200612, 1201827,\n", + " 1198066, 1196477, 1201155, 1201156, 1201061, 1199539, 1201737, 1200526,\n", + " 1200551, 1200429, 1200861, 1196885, 1201442, 1202239, 1200899, 1201291,\n", + " 1195607, 1202308, 1196966, 1200784, 1202759, 1197334, 1198929, 1200684,\n", + " 1195181, 1197059, 1202269, 1199661, 1203102, 1197735, 1201981, 1202690,\n", + " 1203080, 1195066, 1200707, 1197335, 1201361, 1197035, 1197026, 1201966],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.8391e-02, -3.0335e-04, 2.7316e-01, ..., 1.0430e-02,\n", + " -3.8816e-04, -2.6469e-03],\n", + " [ 5.3786e-02, -7.9378e-04, 3.5755e-01, ..., -3.3261e-04,\n", + " -1.2166e-05, -3.1368e-03],\n", + " [ 6.1156e-02, -9.3814e-04, 3.2760e-01, ..., -3.9780e-04,\n", + " -3.3895e-05, -3.0046e-03],\n", + " ...,\n", + " [ 4.6351e-02, -5.9555e-04, 3.0273e-01, ..., -9.9217e-05,\n", + " -2.3361e-04, -2.7616e-03],\n", + " [-3.7055e-05, -2.2998e-04, 3.1103e-01, ..., 2.4722e-02,\n", + " -2.8910e-04, -2.7834e-03],\n", + " [ 3.7688e-02, -1.3466e-04, 2.6784e-01, ..., 4.6762e-03,\n", + " 4.0593e-03, -2.4623e-03]], device='cuda:0'), 'paper': tensor([[ 2.3793, -0.0328, 2.3625, ..., -0.0089, -0.0164, 3.0530],\n", + " [ 2.6872, -0.0368, 2.5031, ..., -0.0122, -0.0167, 2.8099],\n", + " [ 3.8502, -0.0621, 1.8482, ..., -0.0200, -0.0178, 3.2267],\n", + " ...,\n", + " [ 2.7099, -0.0370, 2.1851, ..., -0.0084, -0.0145, 2.8245],\n", + " [ 3.1252, -0.0451, 2.6791, ..., -0.0138, -0.0174, 3.0691],\n", + " [ 2.4529, -0.0365, 2.6216, ..., -0.0082, -0.0157, 3.0391]],\n", + " device='cuda:0'), 'author': tensor([[ 4.0065e-01, -4.8034e-03, 3.9267e-02, ..., -4.2049e-03,\n", + " -2.2280e-03, 1.4834e-01],\n", + " [ 5.2777e-01, -6.0578e-03, 6.5219e-04, ..., -2.2260e-03,\n", + " -7.4624e-05, 2.2126e-01],\n", + " [ 4.7709e-01, -4.5726e-03, -9.3033e-04, ..., -1.6786e-03,\n", + " -1.7984e-04, 2.1362e-01],\n", + " ...,\n", + " [ 4.5166e-01, -5.1206e-03, -5.0519e-04, ..., -1.8051e-03,\n", + " 8.6272e-02, 1.9335e-01],\n", + " [ 4.5091e-01, -5.3768e-03, -3.2818e-04, ..., -1.7149e-03,\n", + " 2.2450e-02, 1.9649e-01],\n", + " [ 5.5978e-01, -5.5210e-03, -2.2569e-04, ..., -2.6323e-03,\n", + " 4.4696e-02, 1.7861e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0104, 0.1315, -0.0032, ..., 0.8812, -0.0022, -0.0051],\n", + " [-0.0109, 0.1704, -0.0040, ..., 1.1415, -0.0021, -0.0068],\n", + " [-0.0081, 0.0220, -0.0038, ..., 0.8214, -0.0018, -0.0056],\n", + " ...,\n", + " [-0.0117, 0.2390, -0.0053, ..., 1.4594, -0.0032, -0.0083],\n", + " [-0.0118, 0.1633, -0.0047, ..., 1.3796, -0.0030, -0.0073],\n", + " [-0.0092, 0.2365, -0.0027, ..., 1.2333, -0.0034, -0.0089]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 111, 82, 75, 150, 144, 144, 291, 363, 292, 292, 245, 521,\n", + " 397, 286, 270, 522, 686, 252, 619, 470, 484, 484, 484, 819,\n", + " 723, 655, 655, 860, 927, 675, 675, 981, 955, 858, 1119, 1002,\n", + " 1097, 1131, 1131, 1131, 1114, 974, 1057, 1131, 1178, 1366, 1183, 1546,\n", + " 1342, 1539, 1528, 1271, 1251, 1338, 1481, 1431, 1431, 1591, 1591, 1580,\n", + " 1580, 1614, 1692, 1614, 1605, 1605, 1826, 1826, 1885, 2069, 2069, 1939,\n", + " 2042, 2007, 2028, 2050, 2200, 2121, 2135, 2135, 2300, 2391, 2259, 2665,\n", + " 2354, 2447, 2447, 2447, 2374, 2590, 2516, 2516, 2488, 2478, 2515, 2549,\n", + " 2843, 2719, 2846, 2689, 2726, 2835, 2835, 2783, 2737, 2649, 2878, 3029,\n", + " 2963, 3017, 3056, 2871, 2871, 3086, 3097, 3311, 3300, 3325, 3195, 3407,\n", + " 3393, 3386, 3367, 3404, 3424, 3559, 3491, 3521, 3521, 3561, 3599, 3655,\n", + " 3636, 3636, 3636, 3892, 3892, 3830, 3851, 3851, 3886, 3886, 3886, 4004,\n", + " 3886, 4145, 4006, 3941, 4108, 4049, 4065, 3996, 4179, 4265, 4424, 4411,\n", + " 4467, 4467, 4349, 4468, 4828, 4828, 4828, 4705, 4705, 4658, 4413, 4413,\n", + " 4413, 4413, 4413, 4413, 4710, 4890, 4890, 4945, 4945, 4921, 4811, 4928,\n", + " 5228, 5125, 5244, 4981, 4981, 4981, 5086, 5149, 5149, 5220],\n", + " [ 9, 61, 74, 20, 3, 90, 83, 57, 43, 111, 51, 95,\n", + " 85, 0, 55, 0, 55, 59, 86, 53, 91, 46, 5, 57,\n", + " 32, 26, 110, 52, 7, 99, 80, 8, 33, 89, 12, 59,\n", + " 108, 54, 100, 8, 98, 4, 2, 72, 70, 68, 66, 56,\n", + " 0, 25, 104, 38, 70, 102, 86, 29, 40, 92, 59, 107,\n", + " 70, 31, 74, 88, 70, 35, 76, 27, 84, 27, 76, 83,\n", + " 106, 0, 77, 85, 83, 27, 62, 57, 97, 24, 97, 0,\n", + " 32, 49, 66, 96, 81, 71, 70, 21, 62, 108, 93, 27,\n", + " 27, 27, 27, 70, 101, 41, 0, 27, 27, 99, 4, 17,\n", + " 4, 57, 14, 21, 106, 103, 12, 42, 13, 10, 23, 48,\n", + " 26, 30, 105, 22, 110, 82, 106, 26, 110, 105, 59, 59,\n", + " 64, 34, 8, 36, 39, 109, 94, 59, 1, 63, 19, 67,\n", + " 16, 73, 21, 3, 99, 67, 87, 12, 78, 6, 78, 95,\n", + " 32, 106, 3, 78, 63, 28, 60, 90, 27, 10, 45, 79,\n", + " 106, 58, 13, 69, 65, 75, 47, 26, 110, 15, 22, 48,\n", + " 37, 15, 0, 8, 11, 44, 94, 18, 63, 50]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[4078, 3119, 610, ..., 5839, 1915, 5839],\n", + " [ 79, 64, 182, ..., 7991, 7936, 7980]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 93, 110, 97, ..., 61, 105, 57],\n", + " [ 30, 92, 185, ..., 5211, 5193, 5243]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 64, 64, 64, ..., 7962, 7962, 7962],\n", + " [ 877, 82, 426, ..., 658, 392, 314]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 225, 314, 314, ..., 883, 882, 881],\n", + " [ 16, 325, 454, ..., 8004, 7804, 8054]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2552, 4426, 1258, ..., 6147, 4323, 7877],\n", + " [ 19, 50, 167, ..., 5217, 5241, 5209]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 64, 64, 147, ..., 7962, 7962, 7962],\n", + " [2857, 3119, 3000, ..., 5168, 3426, 7361]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 55, 55, 55, ..., 5149, 5149, 5149],\n", + " [6873, 41, 5850, ..., 6804, 7242, 6947]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006692\n", + "sampling 0.006526\n", + "noi time: 0.000672\n", + "get_vertex_data call: 0.025537\n", + "noi group time: 0.003375\n", + "eoi_group_time: 0.016328\n", + "second half: 0.2185\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 17525, 21471, ..., 1103850, 1120069, 1110064],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 17525, 21471, ..., 1103850, 1120069, 1110064],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1221603, 1209334, 1203800, ..., 1937139, 1927254, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1221603, 1209334, 1203800, ..., 1937139, 1927254, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137435, 1141424, 1140282, 1135165, 1135160, 1135716, 1140793, 1141758,\n", + " 1136208, 1136215, 1136971, 1138897, 1149834, 1149839, 1139820, 1139811,\n", + " 1145984, 1145989, 1145992, 1137268, 1138938, 1138942, 1143372, 1150507,\n", + " 1149216, 1142958, 1149633, 1147473, 1142881, 1146995, 1153012, 1148343,\n", + " 1148346, 1135481, 1152664, 1137220, 1139373, 1147202, 1136685, 1150329,\n", + " 1150333, 1140308, 1140537, 1140540, 1140542, 1138112, 1137171, 1137172,\n", + " 1137181, 1151520, 1140159, 1140953, 1135367, 1135202, 1135903, 1141036,\n", + " 1134794, 1157443, 1137329, 1137342, 1136178, 1143064, 1137691, 1137693,\n", + " 1137534, 1135408, 1136662, 1137441, 1136193, 1135275, 1156159, 1148483,\n", + " 1139161, 1134841, 1135579, 1135581, 1135583, 1140712, 1156342, 1153094,\n", + " 1153099, 1154132, 1156899, 1156909, 1135522, 1138436, 1138440, 1138445,\n", + " 1140079, 1136534, 1138461, 1138449, 1138462, 1137924, 1158390, 1138832,\n", + " 1138844, 1138846, 1135088, 1138882, 1156606, 1147112, 1135025, 1135618,\n", + " 1156137, 1158984, 1148531, 1137423, 1135769, 1141532, 1139667, 1139673,\n", + " 1138070, 1138069, 1134992, 1142434, 1136551, 1152654, 1139757, 1136728,\n", + " 1140199, 1159019, 1141058, 1143626, 1143625, 1139085, 1137587, 1137595,\n", + " 1146075, 1152044, 1137734, 1137728, 1138240, 1141088, 1141094, 1149001,\n", + " 1139898, 1139889, 1143767, 1137297, 1143703, 1143224, 1143225, 1159676,\n", + " 1140009, 1136625, 1141224, 1139386, 1141657, 1163301, 1136917, 1139728,\n", + " 1143677, 1143679, 1144237, 1141159, 1139495, 1136760, 1141302, 1144650,\n", + " 1134987, 1136851, 1137072, 1137074, 1138482, 1142050, 1165100, 1158746,\n", + " 1158749, 1149111, 1138708, 1142565, 1138423, 1144442, 1144596, 1142455,\n", + " 1136864, 1141579, 1135319, 1135327, 1144182, 1137606, 1150906, 1146202,\n", + " 1139559, 1137841, 1147153, 1147155, 1136378, 1162804, 1141365, 1153069,\n", + " 1163667, 1149101, 1138300, 1144279, 1139508, 1139127, 1145001, 1145213,\n", + " 1140616, 1140990, 1146693, 1135045, 1143692, 1147050, 1147043, 1147047,\n", + " 1143543, 1152976, 1141925, 1144242, 1134859, 1143851, 1146024, 1138085,\n", + " 1146140, 1141585, 1149928, 1147084, 1139990, 1143293, 1143294, 1143280,\n", + " 1151124, 1147543, 1147540, 1147282, 1147291, 1142816, 1164371, 1136330,\n", + " 1149372, 1148003, 1157720, 1136836, 1139297, 1139309, 1141496, 1143345,\n", + " 1144765, 1144088, 1135876, 1150755, 1135818, 1150294, 1146523, 1146524,\n", + " 1138016, 1143456, 1143457, 1144303, 1143937, 1147574, 1143798, 1146636,\n", + " 1147521, 1147530, 1147520, 1140364, 1137990, 1143075, 1166410, 1144725,\n", + " 1147999, 1146949, 1139252, 1139255, 1139249, 1147131, 1147244, 1148704,\n", + " 1148715, 1142700, 1141319, 1146742, 1152327, 1147070, 1149722, 1145012,\n", + " 1139549, 1158226, 1158230, 1143921, 1154526, 1145240, 1145246, 1145751,\n", + " 1142370, 1138638, 1146178, 1151242, 1152538, 1150438, 1150445, 1148827,\n", + " 1151860, 1144514, 1144526, 1150348, 1150350, 1150339, 1151480, 1152022,\n", + " 1152023, 1144888, 1154271, 1134869, 1148278, 1158950, 1141949, 1150736,\n", + " 1137646, 1149996, 1148448, 1147653, 1143567, 1149420, 1149412, 1148288,\n", + " 1139097, 1151412, 1154420, 1158786, 1148180, 1151363, 1152563, 1146678,\n", + " 1157970, 1148720, 1148729, 1146544, 1146547, 1146549, 1149810, 1148204,\n", + " 1153124, 1145104, 1152974, 1150935, 1148052, 1152875, 1152877, 1152878,\n", + " 1150352, 1150356, 1155098, 1141016, 1147442, 1151816, 1152581, 1151906,\n", + " 1151908, 1151907, 1150708, 1145640, 1148498, 1148510, 1141420, 1151344,\n", + " 1151351, 1155164, 1147602, 1147604, 1147737, 1148949, 1146969, 1156402,\n", + " 1153255, 1150210, 1146623, 1144468, 1144466, 1152098, 1156321, 1153029,\n", + " 1137746, 1152608, 1152622, 1140518, 1140521, 1152753, 1152826, 1151579,\n", + " 1151617, 1150578, 1145278, 1136134, 1136798, 1148913, 1148914, 1148916,\n", + " 1152224, 1138991, 1152903, 1151298, 1151311, 1152341, 1146816, 1156821,\n", + " 1156831, 1156816, 1153311, 1138281, 1152300, 1156007, 1156001, 1136028,\n", + " 1158704, 1156619, 1156622, 1162200, 1152928, 1154733, 1154734, 1142777,\n", + " 1156422, 1163489, 1150099, 1148040, 1149300, 1152601, 1155218, 1145652,\n", + " 1145656, 1149799, 1144659, 1137048, 1148628, 1148637, 1158530, 1158540,\n", + " 1137458, 1142041, 1142047, 1154374, 1157229, 1158860, 1150872, 1156500,\n", + " 1156505, 1157057, 1153884, 1155408, 1155418, 1151251, 1146854, 1135231,\n", + " 1135730, 1156629, 1151777, 1152737, 1150828, 1135634, 1147810, 1158311,\n", + " 1151340, 1155441, 1155442, 1150129, 1154529, 1142755, 1156207, 1156271,\n", + " 1157637, 1151379, 1155122, 1157174, 1149321, 1155755, 1146913, 1158096,\n", + " 1155626, 1155628, 1155630, 1158492, 1156563, 1156566, 1154557, 1155574,\n", + " 1136469, 1158566, 1158824, 1153715, 1148836, 1155646, 1160958, 1161389,\n", + " 1143263, 1154648, 1160210, 1154243, 1154250, 1151890, 1156713, 1139621,\n", + " 1151317, 1154902, 1154909, 1150371, 1155293, 1137152, 1158998, 1149904,\n", + " 1159116, 1138269, 1137316, 1140913, 1135601, 1155852, 1158665, 1157684,\n", + " 1146321, 1152209, 1152220, 1159213, 1155439, 1140374, 1155884, 1157735,\n", + " 1144843, 1155971, 1155975, 1158841, 1149702, 1154600, 1161309, 1153503,\n", + " 1136899, 1136896, 1158764, 1161577, 1158894, 1140208, 1158815, 1136480,\n", + " 1156665, 1156671, 1155304, 1153808, 1136640, 1136646, 1134757, 1162175,\n", + " 1147782, 1158558, 1153827, 1151144, 1156516, 1146126, 1155869, 1158006,\n", + " 1163183, 1155521, 1155529, 1155528, 1142663, 1142666, 1157747, 1159292,\n", + " 1167359, 1159042, 1159052, 1172279, 1160563, 1153043, 1153052, 1153045,\n", + " 1171551, 1155763, 1167555, 1166259, 1153842, 1153850, 1156101, 1156107,\n", + " 1138391, 1138393, 1150046, 1149070, 1145948, 1155479, 1153519, 1147300,\n", + " 1146870, 1146876, 1157600, 1138161, 1138167, 1164006, 1156787, 1156795,\n", + " 1139782, 1154590, 1169746, 1157236, 1157247, 1146063, 1159931, 1160701,\n", + " 1165309, 1140132, 1158868, 1170406, 1170415, 1140641, 1140643, 1141863,\n", + " 1148603, 1168081, 1143143, 1163013, 1155816, 1163758, 1141800, 1158653,\n", + " 1158654, 1156181, 1159032, 1152247, 1160605, 1155588, 1162549, 1168426,\n", + " 1168527, 1144979, 1149011, 1146509, 1161240, 1144737, 1144739, 1155044,\n", + " 1145139, 1155267, 1141471, 1141459, 1151650, 1147426, 1147433, 1157050,\n", + " 1159388, 1156739, 1160849, 1150642, 1150648, 1150649, 1144812, 1140112,\n", + " 1162085, 1156300, 1167329, 1145743, 1166917, 1148683, 1167753, 1160228,\n", + " 1169284, 1169282, 1166462, 1169517, 1170670, 1150533, 1150535, 1138762,\n", + " 1144973, 1146432, 1148175, 1143037, 1145447, 1147355, 1152626, 1148124,\n", + " 1147724, 1145900, 1145902, 1153534, 1168659, 1152206, 1143395, 1170980,\n", + " 1171222, 1158724, 1166670, 1168754, 1167817, 1144686, 1145320, 1155170,\n", + " 1165011, 1150526, 1161781, 1144336, 1157534, 1138369, 1154670, 1157331,\n", + " 1141043, 1151668, 1169359, 1154364, 1149452, 1146339, 1138609, 1138618,\n", + " 1158146, 1158611, 1158623, 1173047, 1163292, 1153288, 1149846, 1149847,\n", + " 1160135, 1172303, 1165322, 1152353, 1149402, 1173307, 1154027, 1152150,\n", + " 1152152, 1159648, 1159655, 1178419, 1151215, 1157153, 1157371, 1164693,\n", + " 1147711, 1169913, 1147933, 1157592, 1177415, 1166016, 1177702, 1144550,\n", + " 1170554, 1159100, 1166682, 1166684, 1167833, 1177182, 1150234, 1154151,\n", + " 1154148, 1154150, 1149169, 1149173, 1182426, 1143420, 1171301, 1171302,\n", + " 1169618, 1153803, 1179918, 1178475, 1173232, 1171745, 1151509, 1158030,\n", + " 1158029, 1171773, 1154718, 1171616, 1164034, 1155804, 1157992, 1178715,\n", + " 1154497, 1154500, 1134650, 1164560, 1178896, 1145626, 1180383, 1161063,\n", + " 1161067, 1161911, 1149755, 1158771, 1158512, 1158524, 1158374, 1155890,\n", + " 1155892, 1157278, 1191364, 1140393, 1140399, 1164794, 1162443, 1168889,\n", + " 1187271, 1162253, 1184013, 1168876, 1185169, 1165151, 1163422, 1154957,\n", + " 1146161, 1156849, 1166772, 1147182, 1156539, 1139828, 1139831, 1139837,\n", + " 1150265, 1154806, 1154812, 1149668, 1151288, 1156055, 1151972, 1146386,\n", + " 1146394, 1191742, 1191724, 1190830, 1140993, 1182058, 1194455, 1192613,\n", + " 1151774, 1190455, 1185760, 1193039, 1152113, 1152115, 1172337, 1169707,\n", + " 1153592, 1179317, 1172124, 1166789, 1167739, 1183949, 1155959, 1192472,\n", + " 1179769, 1189962, 1167471, 1192966, 1161348, 1186149], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137435, 1141424, 1140282, 1135165, 1135160, 1135716, 1140793, 1141758,\n", + " 1136208, 1136215, 1136971, 1138897, 1149834, 1149839, 1139820, 1139811,\n", + " 1145984, 1145989, 1145992, 1137268, 1138938, 1138942, 1143372, 1150507,\n", + " 1149216, 1142958, 1149633, 1147473, 1142881, 1146995, 1153012, 1148343,\n", + " 1148346, 1135481, 1152664, 1137220, 1139373, 1147202, 1136685, 1150329,\n", + " 1150333, 1140308, 1140537, 1140540, 1140542, 1138112, 1137171, 1137172,\n", + " 1137181, 1151520, 1140159, 1140953, 1135367, 1135202, 1135903, 1141036,\n", + " 1134794, 1157443, 1137329, 1137342, 1136178, 1143064, 1137691, 1137693,\n", + " 1137534, 1135408, 1136662, 1137441, 1136193, 1135275, 1156159, 1148483,\n", + " 1139161, 1134841, 1135579, 1135581, 1135583, 1140712, 1156342, 1153094,\n", + " 1153099, 1154132, 1156899, 1156909, 1135522, 1138436, 1138440, 1138445,\n", + " 1140079, 1136534, 1138461, 1138449, 1138462, 1137924, 1158390, 1138832,\n", + " 1138844, 1138846, 1135088, 1138882, 1156606, 1147112, 1135025, 1135618,\n", + " 1156137, 1158984, 1148531, 1137423, 1135769, 1141532, 1139667, 1139673,\n", + " 1138070, 1138069, 1134992, 1142434, 1136551, 1152654, 1139757, 1136728,\n", + " 1140199, 1159019, 1141058, 1143626, 1143625, 1139085, 1137587, 1137595,\n", + " 1146075, 1152044, 1137734, 1137728, 1138240, 1141088, 1141094, 1149001,\n", + " 1139898, 1139889, 1143767, 1137297, 1143703, 1143224, 1143225, 1159676,\n", + " 1140009, 1136625, 1141224, 1139386, 1141657, 1163301, 1136917, 1139728,\n", + " 1143677, 1143679, 1144237, 1141159, 1139495, 1136760, 1141302, 1144650,\n", + " 1134987, 1136851, 1137072, 1137074, 1138482, 1142050, 1165100, 1158746,\n", + " 1158749, 1149111, 1138708, 1142565, 1138423, 1144442, 1144596, 1142455,\n", + " 1136864, 1141579, 1135319, 1135327, 1144182, 1137606, 1150906, 1146202,\n", + " 1139559, 1137841, 1147153, 1147155, 1136378, 1162804, 1141365, 1153069,\n", + " 1163667, 1149101, 1138300, 1144279, 1139508, 1139127, 1145001, 1145213,\n", + " 1140616, 1140990, 1146693, 1135045, 1143692, 1147050, 1147043, 1147047,\n", + " 1143543, 1152976, 1141925, 1144242, 1134859, 1143851, 1146024, 1138085,\n", + " 1146140, 1141585, 1149928, 1147084, 1139990, 1143293, 1143294, 1143280,\n", + " 1151124, 1147543, 1147540, 1147282, 1147291, 1142816, 1164371, 1136330,\n", + " 1149372, 1148003, 1157720, 1136836, 1139297, 1139309, 1141496, 1143345,\n", + " 1144765, 1144088, 1135876, 1150755, 1135818, 1150294, 1146523, 1146524,\n", + " 1138016, 1143456, 1143457, 1144303, 1143937, 1147574, 1143798, 1146636,\n", + " 1147521, 1147530, 1147520, 1140364, 1137990, 1143075, 1166410, 1144725,\n", + " 1147999, 1146949, 1139252, 1139255, 1139249, 1147131, 1147244, 1148704,\n", + " 1148715, 1142700, 1141319, 1146742, 1152327, 1147070, 1149722, 1145012,\n", + " 1139549, 1158226, 1158230, 1143921, 1154526, 1145240, 1145246, 1145751,\n", + " 1142370, 1138638, 1146178, 1151242, 1152538, 1150438, 1150445, 1148827,\n", + " 1151860, 1144514, 1144526, 1150348, 1150350, 1150339, 1151480, 1152022,\n", + " 1152023, 1144888, 1154271, 1134869, 1148278, 1158950, 1141949, 1150736,\n", + " 1137646, 1149996, 1148448, 1147653, 1143567, 1149420, 1149412, 1148288,\n", + " 1139097, 1151412, 1154420, 1158786, 1148180, 1151363, 1152563, 1146678,\n", + " 1157970, 1148720, 1148729, 1146544, 1146547, 1146549, 1149810, 1148204,\n", + " 1153124, 1145104, 1152974, 1150935, 1148052, 1152875, 1152877, 1152878,\n", + " 1150352, 1150356, 1155098, 1141016, 1147442, 1151816, 1152581, 1151906,\n", + " 1151908, 1151907, 1150708, 1145640, 1148498, 1148510, 1141420, 1151344,\n", + " 1151351, 1155164, 1147602, 1147604, 1147737, 1148949, 1146969, 1156402,\n", + " 1153255, 1150210, 1146623, 1144468, 1144466, 1152098, 1156321, 1153029,\n", + " 1137746, 1152608, 1152622, 1140518, 1140521, 1152753, 1152826, 1151579,\n", + " 1151617, 1150578, 1145278, 1136134, 1136798, 1148913, 1148914, 1148916,\n", + " 1152224, 1138991, 1152903, 1151298, 1151311, 1152341, 1146816, 1156821,\n", + " 1156831, 1156816, 1153311, 1138281, 1152300, 1156007, 1156001, 1136028,\n", + " 1158704, 1156619, 1156622, 1162200, 1152928, 1154733, 1154734, 1142777,\n", + " 1156422, 1163489, 1150099, 1148040, 1149300, 1152601, 1155218, 1145652,\n", + " 1145656, 1149799, 1144659, 1137048, 1148628, 1148637, 1158530, 1158540,\n", + " 1137458, 1142041, 1142047, 1154374, 1157229, 1158860, 1150872, 1156500,\n", + " 1156505, 1157057, 1153884, 1155408, 1155418, 1151251, 1146854, 1135231,\n", + " 1135730, 1156629, 1151777, 1152737, 1150828, 1135634, 1147810, 1158311,\n", + " 1151340, 1155441, 1155442, 1150129, 1154529, 1142755, 1156207, 1156271,\n", + " 1157637, 1151379, 1155122, 1157174, 1149321, 1155755, 1146913, 1158096,\n", + " 1155626, 1155628, 1155630, 1158492, 1156563, 1156566, 1154557, 1155574,\n", + " 1136469, 1158566, 1158824, 1153715, 1148836, 1155646, 1160958, 1161389,\n", + " 1143263, 1154648, 1160210, 1154243, 1154250, 1151890, 1156713, 1139621,\n", + " 1151317, 1154902, 1154909, 1150371, 1155293, 1137152, 1158998, 1149904,\n", + " 1159116, 1138269, 1137316, 1140913, 1135601, 1155852, 1158665, 1157684,\n", + " 1146321, 1152209, 1152220, 1159213, 1155439, 1140374, 1155884, 1157735,\n", + " 1144843, 1155971, 1155975, 1158841, 1149702, 1154600, 1161309, 1153503,\n", + " 1136899, 1136896, 1158764, 1161577, 1158894, 1140208, 1158815, 1136480,\n", + " 1156665, 1156671, 1155304, 1153808, 1136640, 1136646, 1134757, 1162175,\n", + " 1147782, 1158558, 1153827, 1151144, 1156516, 1146126, 1155869, 1158006,\n", + " 1163183, 1155521, 1155529, 1155528, 1142663, 1142666, 1157747, 1159292,\n", + " 1167359, 1159042, 1159052, 1172279, 1160563, 1153043, 1153052, 1153045,\n", + " 1171551, 1155763, 1167555, 1166259, 1153842, 1153850, 1156101, 1156107,\n", + " 1138391, 1138393, 1150046, 1149070, 1145948, 1155479, 1153519, 1147300,\n", + " 1146870, 1146876, 1157600, 1138161, 1138167, 1164006, 1156787, 1156795,\n", + " 1139782, 1154590, 1169746, 1157236, 1157247, 1146063, 1159931, 1160701,\n", + " 1165309, 1140132, 1158868, 1170406, 1170415, 1140641, 1140643, 1141863,\n", + " 1148603, 1168081, 1143143, 1163013, 1155816, 1163758, 1141800, 1158653,\n", + " 1158654, 1156181, 1159032, 1152247, 1160605, 1155588, 1162549, 1168426,\n", + " 1168527, 1144979, 1149011, 1146509, 1161240, 1144737, 1144739, 1155044,\n", + " 1145139, 1155267, 1141471, 1141459, 1151650, 1147426, 1147433, 1157050,\n", + " 1159388, 1156739, 1160849, 1150642, 1150648, 1150649, 1144812, 1140112,\n", + " 1162085, 1156300, 1167329, 1145743, 1166917, 1148683, 1167753, 1160228,\n", + " 1169284, 1169282, 1166462, 1169517, 1170670, 1150533, 1150535, 1138762,\n", + " 1144973, 1146432, 1148175, 1143037, 1145447, 1147355, 1152626, 1148124,\n", + " 1147724, 1145900, 1145902, 1153534, 1168659, 1152206, 1143395, 1170980,\n", + " 1171222, 1158724, 1166670, 1168754, 1167817, 1144686, 1145320, 1155170,\n", + " 1165011, 1150526, 1161781, 1144336, 1157534, 1138369, 1154670, 1157331,\n", + " 1141043, 1151668, 1169359, 1154364, 1149452, 1146339, 1138609, 1138618,\n", + " 1158146, 1158611, 1158623, 1173047, 1163292, 1153288, 1149846, 1149847,\n", + " 1160135, 1172303, 1165322, 1152353, 1149402, 1173307, 1154027, 1152150,\n", + " 1152152, 1159648, 1159655, 1178419, 1151215, 1157153, 1157371, 1164693,\n", + " 1147711, 1169913, 1147933, 1157592, 1177415, 1166016, 1177702, 1144550,\n", + " 1170554, 1159100, 1166682, 1166684, 1167833, 1177182, 1150234, 1154151,\n", + " 1154148, 1154150, 1149169, 1149173, 1182426, 1143420, 1171301, 1171302,\n", + " 1169618, 1153803, 1179918, 1178475, 1173232, 1171745, 1151509, 1158030,\n", + " 1158029, 1171773, 1154718, 1171616, 1164034, 1155804, 1157992, 1178715,\n", + " 1154497, 1154500, 1134650, 1164560, 1178896, 1145626, 1180383, 1161063,\n", + " 1161067, 1161911, 1149755, 1158771, 1158512, 1158524, 1158374, 1155890,\n", + " 1155892, 1157278, 1191364, 1140393, 1140399, 1164794, 1162443, 1168889,\n", + " 1187271, 1162253, 1184013, 1168876, 1185169, 1165151, 1163422, 1154957,\n", + " 1146161, 1156849, 1166772, 1147182, 1156539, 1139828, 1139831, 1139837,\n", + " 1150265, 1154806, 1154812, 1149668, 1151288, 1156055, 1151972, 1146386,\n", + " 1146394, 1191742, 1191724, 1190830, 1140993, 1182058, 1194455, 1192613,\n", + " 1151774, 1190455, 1185760, 1193039, 1152113, 1152115, 1172337, 1169707,\n", + " 1153592, 1179317, 1172124, 1166789, 1167739, 1183949, 1155959, 1192472,\n", + " 1179769, 1189962, 1167471, 1192966, 1161348, 1186149], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196000, 1195711, 1195522, 1197719, 1199282, 1198840, 1198844, 1201577,\n", + " 1202804, 1198557, 1194743, 1194649, 1194648, 1195103, 1195511, 1195263,\n", + " 1201992, 1196031, 1195895, 1197856, 1196979, 1199371, 1195325, 1198262,\n", + " 1198362, 1195982, 1198161, 1199810, 1199823, 1195148, 1195265, 1194923,\n", + " 1196109, 1195850, 1195541, 1199998, 1202021, 1196396, 1198282, 1200949,\n", + " 1196043, 1194928, 1199685, 1199628, 1200878, 1199231, 1201916, 1195017,\n", + " 1195018, 1199676, 1201511, 1199021, 1197601, 1197609, 1196727, 1196734,\n", + " 1202618, 1198811, 1199083, 1198593, 1201079, 1202630, 1200991, 1200913,\n", + " 1200918, 1194803, 1199712, 1200553, 1200558, 1203071, 1200345, 1200194,\n", + " 1196779, 1201029, 1199485, 1200899, 1202338, 1202337, 1201555, 1201291,\n", + " 1195611, 1203329, 1196960, 1196966, 1200784, 1195664, 1200445, 1198932,\n", + " 1198904, 1195418, 1197811, 1197822, 1196597, 1200437, 1200295, 1197652,\n", + " 1197335, 1201877, 1203162, 1196430, 1197872], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196000, 1195711, 1195522, 1197719, 1199282, 1198840, 1198844, 1201577,\n", + " 1202804, 1198557, 1194743, 1194649, 1194648, 1195103, 1195511, 1195263,\n", + " 1201992, 1196031, 1195895, 1197856, 1196979, 1199371, 1195325, 1198262,\n", + " 1198362, 1195982, 1198161, 1199810, 1199823, 1195148, 1195265, 1194923,\n", + " 1196109, 1195850, 1195541, 1199998, 1202021, 1196396, 1198282, 1200949,\n", + " 1196043, 1194928, 1199685, 1199628, 1200878, 1199231, 1201916, 1195017,\n", + " 1195018, 1199676, 1201511, 1199021, 1197601, 1197609, 1196727, 1196734,\n", + " 1202618, 1198811, 1199083, 1198593, 1201079, 1202630, 1200991, 1200913,\n", + " 1200918, 1194803, 1199712, 1200553, 1200558, 1203071, 1200345, 1200194,\n", + " 1196779, 1201029, 1199485, 1200899, 1202338, 1202337, 1201555, 1201291,\n", + " 1195611, 1203329, 1196960, 1196966, 1200784, 1195664, 1200445, 1198932,\n", + " 1198904, 1195418, 1197811, 1197822, 1196597, 1200437, 1200295, 1197652,\n", + " 1197335, 1201877, 1203162, 1196430, 1197872], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 3.2517e-03, -3.0811e-04, 2.9787e-01, ..., 2.1787e-02,\n", + " -4.0121e-04, -2.4500e-03],\n", + " [ 6.7705e-03, -4.7634e-04, 3.3817e-01, ..., -3.3548e-05,\n", + " 1.7659e-02, -2.8353e-03],\n", + " [ 5.0970e-02, -6.0724e-04, 3.3440e-01, ..., -1.5281e-04,\n", + " -1.9004e-04, -2.7397e-03],\n", + " ...,\n", + " [ 6.9683e-03, -2.4223e-04, 2.9434e-01, ..., 2.5859e-02,\n", + " -4.1635e-04, -2.4287e-03],\n", + " [ 1.6644e-02, -2.0397e-05, 2.4344e-01, ..., 4.2574e-02,\n", + " -2.7023e-04, -2.6675e-03],\n", + " [ 6.5747e-02, -6.8213e-04, 3.1854e-01, ..., -1.7301e-04,\n", + " -1.2661e-04, -2.7693e-03]], device='cuda:0'), 'paper': tensor([[ 3.7234, -0.0479, 3.2608, ..., -0.0178, -0.0238, 3.2408],\n", + " [ 2.4806, -0.0338, 2.0538, ..., -0.0104, -0.0132, 2.4143],\n", + " [ 2.3541, -0.0327, 2.3486, ..., -0.0087, -0.0164, 3.0183],\n", + " ...,\n", + " [ 3.3153, -0.0546, 2.0307, ..., -0.0159, -0.0147, 2.6587],\n", + " [ 3.8064, -0.0646, 2.1259, ..., -0.0235, -0.0186, 3.0563],\n", + " [ 2.4518, -0.0366, 2.6346, ..., -0.0082, -0.0158, 3.0736]],\n", + " device='cuda:0'), 'author': tensor([[ 5.0445e-01, -5.5879e-03, -3.8019e-04, ..., -1.9562e-03,\n", + " 4.5444e-02, 1.8721e-01],\n", + " [ 3.8373e-01, -1.2565e-03, -2.3542e-04, ..., -6.6052e-04,\n", + " -1.4161e-03, -1.9798e-03],\n", + " [ 4.0459e-01, -4.0393e-03, -1.2846e-04, ..., -2.4255e-03,\n", + " -1.0530e-03, 7.9846e-02],\n", + " ...,\n", + " [ 4.9725e-01, -4.9718e-03, -3.6006e-04, ..., -2.0197e-03,\n", + " 2.8858e-02, 1.4644e-01],\n", + " [ 5.0316e-01, -6.2341e-03, 1.5154e-01, ..., -4.1936e-03,\n", + " 2.4170e-02, 2.1707e-01],\n", + " [ 4.7492e-01, -5.5732e-03, -3.5577e-04, ..., -2.6229e-03,\n", + " 8.7566e-02, 1.8495e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0102, 0.1130, -0.0035, ..., 0.9264, -0.0023, -0.0052],\n", + " [-0.0110, 0.2189, -0.0042, ..., 1.2534, -0.0024, -0.0076],\n", + " [-0.0097, 0.1413, -0.0040, ..., 1.1801, -0.0028, -0.0073],\n", + " ...,\n", + " [-0.0085, 0.1685, -0.0032, ..., 0.9824, -0.0016, -0.0053],\n", + " [-0.0104, 0.4072, -0.0032, ..., 1.4197, -0.0041, -0.0105],\n", + " [-0.0118, 0.2817, -0.0046, ..., 1.4287, -0.0036, -0.0093]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 60, 190, 135, 123, 134, 147, 13, 80, 80, 62, 188, 146,\n", + " 201, 444, 285, 930, 930, 930, 494, 494, 507, 729, 760, 760,\n", + " 760, 773, 679, 917, 1049, 1182, 956, 944, 1121, 1533, 1121, 1342,\n", + " 1342, 1342, 1201, 1188, 1316, 1391, 1335, 1434, 1547, 1505, 1505, 1496,\n", + " 1564, 1564, 1587, 1598, 1650, 1604, 1691, 1568, 1646, 1759, 1671, 1750,\n", + " 1799, 1973, 1900, 1900, 1900, 1969, 2154, 2172, 2137, 2234, 2192, 2310,\n", + " 2310, 2348, 2250, 2241, 2467, 2442, 2384, 2481, 2481, 2383, 2383, 2418,\n", + " 2475, 2900, 2792, 2735, 2735, 2904, 2906, 3050, 2707, 2707, 2747, 2963,\n", + " 3016, 3148, 3341, 3240, 3180, 3151, 3229, 3370, 3296, 3468, 3574, 3938,\n", + " 3938, 3693, 3626, 3773, 3810, 3971, 3992, 4059, 4082, 4089, 4089, 4089,\n", + " 4183, 4255, 4242, 4242, 4242, 4242, 4250, 4303, 4470, 4517, 4808, 4872,\n", + " 4815, 4762, 4723, 4783, 4985, 5147, 5246, 5246, 5435, 5435, 5307, 5611,\n", + " 5611, 5400, 5558, 5581, 5391, 5391, 5710, 5608, 5608, 5692, 5817, 5817,\n", + " 5817, 5828, 5828, 5675, 5675, 5675, 5644, 5644, 5997, 6052, 5802, 5813],\n", + " [ 64, 4, 98, 30, 98, 99, 78, 50, 41, 36, 68, 54,\n", + " 72, 54, 92, 83, 87, 64, 20, 46, 97, 64, 54, 75,\n", + " 41, 46, 42, 46, 89, 61, 96, 40, 88, 85, 90, 81,\n", + " 19, 80, 47, 83, 73, 15, 62, 38, 3, 15, 6, 95,\n", + " 25, 74, 15, 56, 41, 15, 7, 93, 73, 46, 45, 52,\n", + " 50, 78, 18, 17, 69, 11, 86, 50, 55, 64, 27, 44,\n", + " 87, 31, 77, 35, 24, 51, 24, 27, 49, 98, 46, 67,\n", + " 70, 15, 66, 49, 13, 79, 36, 56, 58, 43, 4, 39,\n", + " 2, 3, 99, 35, 0, 85, 54, 46, 76, 27, 57, 28,\n", + " 55, 46, 15, 9, 3, 78, 22, 48, 49, 91, 71, 16,\n", + " 88, 46, 54, 61, 41, 34, 53, 9, 82, 27, 83, 94,\n", + " 79, 29, 54, 84, 1, 54, 32, 54, 100, 81, 21, 83,\n", + " 84, 54, 23, 60, 12, 43, 43, 33, 54, 8, 54, 63,\n", + " 26, 65, 54, 10, 54, 5, 54, 14, 54, 43, 37, 59]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 872, 648, 743, ..., 279, 5524, 6040],\n", + " [ 165, 205, 129, ..., 7528, 7484, 7459]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 83, 34, 41, ..., 54, 37, 17],\n", + " [ 18, 72, 11, ..., 6076, 5802, 6015]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 129, 129, 129, ..., 7363, 7426, 7560],\n", + " [ 56, 541, 806, ..., 293, 60, 813]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 431, 231, 271, ..., 431, 431, 271],\n", + " [ 156, 264, 210, ..., 7525, 7475, 7470]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4363, 5805, 3866, ..., 4090, 2683, 6759],\n", + " [ 80, 80, 81, ..., 6087, 6087, 6025]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 129, 129, 129, ..., 7560, 7560, 7523],\n", + " [2427, 3367, 526, ..., 7130, 6545, 4909]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 80, 80, 80, ..., 6014, 6014, 6014],\n", + " [6420, 5831, 5805, ..., 4909, 4408, 4540]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.00648\n", + "sampling 0.006328\n", + "noi time: 0.001925\n", + "get_vertex_data call: 0.03087\n", + "noi group time: 0.003609\n", + "eoi_group_time: 0.013925\n", + "second half: 0.228749\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31145, 32616, 10012, ..., 1117383, 1119687, 1120069],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31145, 32616, 10012, ..., 1117383, 1119687, 1120069],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1212860, 1208551, 1231430, ..., 1934174, 1936965, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1212860, 1208551, 1231430, ..., 1934174, 1936965, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1141424, 1136225, 1136228, 1140282, 1140284, 1135926, 1138553,\n", + " 1135726, 1135721, 1141758, 1137506, 1138335, 1138321, 1136223, 1136154,\n", + " 1136969, 1136971, 1141443, 1138059, 1143600, 1143609, 1138942, 1146428,\n", + " 1139142, 1143372, 1150395, 1146640, 1146643, 1139958, 1150497, 1150509,\n", + " 1145292, 1139865, 1134940, 1136959, 1136945, 1142958, 1155689, 1143820,\n", + " 1149636, 1147473, 1147477, 1147229, 1135998, 1149287, 1144636, 1146995,\n", + " 1146996, 1135947, 1146472, 1148548, 1148546, 1137219, 1155019, 1139371,\n", + " 1150320, 1152423, 1134709, 1138739, 1151548, 1140540, 1138112, 1154414,\n", + " 1140159, 1134735, 1135913, 1140020, 1135367, 1135202, 1135903, 1141036,\n", + " 1136770, 1134794, 1157443, 1157450, 1135962, 1143386, 1138504, 1138505,\n", + " 1137342, 1143064, 1143069, 1157102, 1137682, 1144799, 1144395, 1137521,\n", + " 1137529, 1137534, 1157395, 1152371, 1137441, 1143317, 1137480, 1136197,\n", + " 1156159, 1139161, 1141702, 1135579, 1135583, 1136098, 1135246, 1135828,\n", + " 1140712, 1156342, 1153102, 1137953, 1158136, 1154132, 1136978, 1136986,\n", + " 1136988, 1156909, 1139685, 1139687, 1136352, 1136358, 1157698, 1138436,\n", + " 1138440, 1138445, 1138457, 1138461, 1138449, 1136594, 1135135, 1135133,\n", + " 1138846, 1147112, 1142611, 1138185, 1148530, 1148531, 1150951, 1135760,\n", + " 1135773, 1139855, 1139674, 1142255, 1134992, 1134770, 1134772, 1158974,\n", + " 1139327, 1159017, 1143630, 1140034, 1152696, 1138648, 1138151, 1155662,\n", + " 1155654, 1141985, 1152044, 1139069, 1142293, 1140660, 1137734, 1137728,\n", + " 1135549, 1140228, 1141088, 1141098, 1149001, 1139899, 1139889, 1156875,\n", + " 1135291, 1142021, 1136397, 1136392, 1143221, 1139025, 1140003, 1149970,\n", + " 1149979, 1149982, 1142503, 1152705, 1141681, 1141690, 1154466, 1154467,\n", + " 1139436, 1140473, 1142932, 1141224, 1142171, 1136924, 1145065, 1144239,\n", + " 1140598, 1140597, 1138785, 1139494, 1136760, 1136767, 1168566, 1134979,\n", + " 1147844, 1137074, 1149435, 1153666, 1142085, 1145161, 1158749, 1149113,\n", + " 1148864, 1141479, 1138709, 1138708, 1142913, 1137661, 1138423, 1138424,\n", + " 1143111, 1144596, 1142451, 1136867, 1136864, 1140885, 1135324, 1144186,\n", + " 1137611, 1137606, 1150906, 1166711, 1143752, 1143757, 1146203, 1141760,\n", + " 1158691, 1138529, 1140508, 1137846, 1137849, 1161701, 1147153, 1142640,\n", + " 1142649, 1149193, 1141365, 1141367, 1153068, 1141664, 1149101, 1138292,\n", + " 1144279, 1139508, 1139510, 1140081, 1139127, 1145000, 1140616, 1140619,\n", + " 1139168, 1140976, 1140983, 1140990, 1147050, 1152976, 1152980, 1160255,\n", + " 1135461, 1142556, 1163917, 1139007, 1141925, 1141929, 1146898, 1144251,\n", + " 1144242, 1140580, 1137149, 1160352, 1143851, 1146024, 1146129, 1141585,\n", + " 1142540, 1149933, 1139990, 1146302, 1143294, 1143883, 1148763, 1147282,\n", + " 1142816, 1143723, 1142637, 1142638, 1139408, 1139417, 1139418, 1143051,\n", + " 1143040, 1136160, 1138923, 1136836, 1136843, 1139328, 1141490, 1141496,\n", + " 1142159, 1145428, 1143345, 1144765, 1144753, 1144615, 1145810, 1135814,\n", + " 1146523, 1143957, 1143457, 1137697, 1144293, 1144303, 1144564, 1143937,\n", + " 1146587, 1147574, 1147521, 1140364, 1149569, 1149582, 1137990, 1143076,\n", + " 1143080, 1149500, 1147999, 1134899, 1144008, 1139252, 1139249, 1147235,\n", + " 1154482, 1154483, 1148704, 1141314, 1141319, 1141825, 1141836, 1146751,\n", + " 1152335, 1149722, 1147971, 1145009, 1139549, 1158226, 1158235, 1149871,\n", + " 1151636, 1145240, 1138632, 1146178, 1151239, 1151242, 1148208, 1148214,\n", + " 1152530, 1150280, 1150438, 1150445, 1149250, 1154438, 1151856, 1144526,\n", + " 1150342, 1152013, 1151985, 1151997, 1147794, 1151482, 1152027, 1154271,\n", + " 1149535, 1148693, 1148698, 1147016, 1147019, 1147009, 1158950, 1158957,\n", + " 1141949, 1146771, 1141193, 1144817, 1167216, 1147770, 1153574, 1154985,\n", + " 1147653, 1143560, 1152070, 1148623, 1154420, 1148180, 1136249, 1136244,\n", + " 1138197, 1139718, 1146683, 1146686, 1138864, 1152444, 1157968, 1157974,\n", + " 1148726, 1148729, 1144096, 1147627, 1146544, 1146549, 1148204, 1148101,\n", + " 1148106, 1156212, 1153124, 1153188, 1159829, 1150932, 1150935, 1144863,\n", + " 1150352, 1150356, 1146227, 1148084, 1151821, 1135311, 1135303, 1151909,\n", + " 1151907, 1154183, 1148498, 1148505, 1146562, 1141420, 1155152, 1153441,\n", + " 1150894, 1148949, 1146969, 1149355, 1151922, 1146623, 1151691, 1152407,\n", + " 1152097, 1151738, 1156321, 1153037, 1150085, 1137746, 1137755, 1146304,\n", + " 1152622, 1152612, 1140521, 1155146, 1155140, 1136401, 1149203, 1151959,\n", + " 1152826, 1155337, 1155356, 1157824, 1152673, 1152681, 1154638, 1151579,\n", + " 1151617, 1150578, 1136134, 1136140, 1136142, 1140451, 1150612, 1138991,\n", + " 1152903, 1151311, 1152341, 1146816, 1153311, 1145581, 1138281, 1136028,\n", + " 1158704, 1156622, 1152928, 1151065, 1150099, 1150164, 1148033, 1148040,\n", + " 1152601, 1145652, 1149792, 1144671, 1137052, 1148628, 1158530, 1137458,\n", + " 1147643, 1159222, 1153085, 1142041, 1157470, 1157229, 1143444, 1157536,\n", + " 1157547, 1150877, 1150869, 1158916, 1156505, 1157064, 1139473, 1143491,\n", + " 1151258, 1149045, 1135730, 1156638, 1156631, 1153413, 1147810, 1143022,\n", + " 1158311, 1174266, 1155441, 1150130, 1150132, 1144361, 1144362, 1140865,\n", + " 1145764, 1145600, 1150488, 1142755, 1142758, 1156207, 1156205, 1156267,\n", + " 1156256, 1151390, 1151379, 1158626, 1156640, 1155122, 1152527, 1155755,\n", + " 1155628, 1155631, 1158487, 1155574, 1155583, 1136469, 1158569, 1158823,\n", + " 1158824, 1148834, 1158355, 1143250, 1146935, 1161796, 1139620, 1151325,\n", + " 1151327, 1154902, 1154909, 1143189, 1150371, 1153322, 1157424, 1177492,\n", + " 1150987, 1143517, 1137152, 1159001, 1153786, 1137381, 1137380, 1173248,\n", + " 1159116, 1168157, 1140919, 1166187, 1134677, 1134687, 1134674, 1135601,\n", + " 1135614, 1145507, 1150661, 1150671, 1150659, 1158665, 1149145, 1140627,\n", + " 1140633, 1152209, 1152220, 1152498, 1152502, 1156692, 1140381, 1156023,\n", + " 1155881, 1157732, 1157733, 1159132, 1155970, 1155971, 1155975, 1135190,\n", + " 1149700, 1154600, 1154605, 1159452, 1153491, 1136896, 1158760, 1140221,\n", + " 1159164, 1158815, 1158447, 1158432, 1158285, 1155246, 1152463, 1136494,\n", + " 1153632, 1147594, 1155296, 1153112, 1156490, 1153808, 1136640, 1163112,\n", + " 1162167, 1145477, 1140049, 1157819, 1163813, 1163814, 1146123, 1138111,\n", + " 1158002, 1155521, 1142489, 1135661, 1142663, 1142662, 1150684, 1159054,\n", + " 1167589, 1142427, 1158295, 1153052, 1153045, 1155769, 1155770, 1166243,\n", + " 1167708, 1156228, 1144158, 1153841, 1153842, 1156098, 1156107, 1138393,\n", + " 1150035, 1150046, 1159475, 1149063, 1149070, 1149071, 1164857, 1147300,\n", + " 1146876, 1138161, 1149953, 1149956, 1154590, 1160758, 1139592, 1139284,\n", + " 1139286, 1139281, 1148777, 1148771, 1157351, 1159773, 1146063, 1146356,\n", + " 1158459, 1140140, 1140641, 1140650, 1140643, 1148592, 1148594, 1148600,\n", + " 1164990, 1143143, 1143149, 1151875, 1151872, 1155816, 1154274, 1158653,\n", + " 1159025, 1159026, 1159032, 1163740, 1152244, 1152247, 1143729, 1143733,\n", + " 1167539, 1155588, 1155596, 1164592, 1153924, 1168428, 1148571, 1158405,\n", + " 1168527, 1144984, 1147402, 1170577, 1149011, 1146510, 1144736, 1144737,\n", + " 1144739, 1163527, 1155272, 1141468, 1141471, 1169475, 1151650, 1147433,\n", + " 1181325, 1182254, 1156739, 1161008, 1150643, 1171040, 1150309, 1168748,\n", + " 1144810, 1144812, 1140127, 1140126, 1135567, 1142733, 1145743, 1145910,\n", + " 1166924, 1145228, 1155324, 1166462, 1171687, 1185486, 1185474, 1138762,\n", + " 1146433, 1148168, 1143037, 1145447, 1165745, 1165746, 1148124, 1139351,\n", + " 1145900, 1148417, 1153535, 1153534, 1163961, 1152192, 1152203, 1181040,\n", + " 1175240, 1143395, 1143402, 1170980, 1169729, 1149565, 1158724, 1167497,\n", + " 1154073, 1154070, 1154076, 1170742, 1147330, 1147331, 1147339, 1160018,\n", + " 1145674, 1150773, 1150781, 1179488, 1149130, 1169602, 1171979, 1156308,\n", + " 1169216, 1169298, 1165011, 1150515, 1150522, 1150518, 1167915, 1169458,\n", + " 1161780, 1157534, 1138369, 1147746, 1154670, 1135841, 1169162, 1157331,\n", + " 1138130, 1141043, 1151668, 1173228, 1158623, 1158054, 1149847, 1172076,\n", + " 1154875, 1154871, 1184802, 1152353, 1152361, 1152362, 1143170, 1164647,\n", + " 1155931, 1170062, 1168055, 1149402, 1148667, 1193758, 1173307, 1145028,\n", + " 1145037, 1154024, 1154027, 1152150, 1153751, 1164964, 1159658, 1151208,\n", + " 1151201, 1157153, 1147711, 1148128, 1149247, 1170490, 1135021, 1172961,\n", + " 1178824, 1165121, 1168828, 1178273, 1140326, 1166016, 1163990, 1153428,\n", + " 1178056, 1166684, 1177510, 1150234, 1154148, 1154150, 1149173, 1178610,\n", + " 1186117, 1143271, 1169761, 1167657, 1143418, 1171301, 1153803, 1164818,\n", + " 1183400, 1173865, 1144896, 1161255, 1154718, 1157792, 1157795, 1171623,\n", + " 1164034, 1163827, 1155799, 1155804, 1157131, 1157134, 1161612, 1153898,\n", + " 1153902, 1186806, 1134650, 1160007, 1145626, 1178761, 1161068, 1184996,\n", + " 1183754, 1149755, 1149759, 1153609, 1190511, 1158933, 1158370, 1158374,\n", + " 1158379, 1155892, 1155899, 1187700, 1157268, 1191815, 1140399, 1168273,\n", + " 1170631, 1169068, 1168886, 1165487, 1180489, 1184012, 1164231, 1183477,\n", + " 1186919, 1191268, 1154955, 1154957, 1181811, 1147182, 1156162, 1189294,\n", + " 1163621, 1184050, 1156530, 1156528, 1156539, 1139831, 1150265, 1170433,\n", + " 1154810, 1149669, 1182066, 1151280, 1156055, 1151974, 1173019, 1180122,\n", + " 1146395, 1149536, 1192160, 1172470, 1188161, 1187721, 1172696, 1177472,\n", + " 1169963, 1140993, 1190444, 1189741, 1194351, 1189256, 1162156, 1170893,\n", + " 1170881, 1153733, 1171111, 1169700, 1166841, 1193804, 1182286, 1158064,\n", + " 1145395, 1160972, 1185644, 1179742, 1155958, 1155962, 1186064, 1182674,\n", + " 1185198, 1193620, 1179773, 1182178, 1182772, 1179617, 1191882, 1157008],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1141424, 1136225, 1136228, 1140282, 1140284, 1135926, 1138553,\n", + " 1135726, 1135721, 1141758, 1137506, 1138335, 1138321, 1136223, 1136154,\n", + " 1136969, 1136971, 1141443, 1138059, 1143600, 1143609, 1138942, 1146428,\n", + " 1139142, 1143372, 1150395, 1146640, 1146643, 1139958, 1150497, 1150509,\n", + " 1145292, 1139865, 1134940, 1136959, 1136945, 1142958, 1155689, 1143820,\n", + " 1149636, 1147473, 1147477, 1147229, 1135998, 1149287, 1144636, 1146995,\n", + " 1146996, 1135947, 1146472, 1148548, 1148546, 1137219, 1155019, 1139371,\n", + " 1150320, 1152423, 1134709, 1138739, 1151548, 1140540, 1138112, 1154414,\n", + " 1140159, 1134735, 1135913, 1140020, 1135367, 1135202, 1135903, 1141036,\n", + " 1136770, 1134794, 1157443, 1157450, 1135962, 1143386, 1138504, 1138505,\n", + " 1137342, 1143064, 1143069, 1157102, 1137682, 1144799, 1144395, 1137521,\n", + " 1137529, 1137534, 1157395, 1152371, 1137441, 1143317, 1137480, 1136197,\n", + " 1156159, 1139161, 1141702, 1135579, 1135583, 1136098, 1135246, 1135828,\n", + " 1140712, 1156342, 1153102, 1137953, 1158136, 1154132, 1136978, 1136986,\n", + " 1136988, 1156909, 1139685, 1139687, 1136352, 1136358, 1157698, 1138436,\n", + " 1138440, 1138445, 1138457, 1138461, 1138449, 1136594, 1135135, 1135133,\n", + " 1138846, 1147112, 1142611, 1138185, 1148530, 1148531, 1150951, 1135760,\n", + " 1135773, 1139855, 1139674, 1142255, 1134992, 1134770, 1134772, 1158974,\n", + " 1139327, 1159017, 1143630, 1140034, 1152696, 1138648, 1138151, 1155662,\n", + " 1155654, 1141985, 1152044, 1139069, 1142293, 1140660, 1137734, 1137728,\n", + " 1135549, 1140228, 1141088, 1141098, 1149001, 1139899, 1139889, 1156875,\n", + " 1135291, 1142021, 1136397, 1136392, 1143221, 1139025, 1140003, 1149970,\n", + " 1149979, 1149982, 1142503, 1152705, 1141681, 1141690, 1154466, 1154467,\n", + " 1139436, 1140473, 1142932, 1141224, 1142171, 1136924, 1145065, 1144239,\n", + " 1140598, 1140597, 1138785, 1139494, 1136760, 1136767, 1168566, 1134979,\n", + " 1147844, 1137074, 1149435, 1153666, 1142085, 1145161, 1158749, 1149113,\n", + " 1148864, 1141479, 1138709, 1138708, 1142913, 1137661, 1138423, 1138424,\n", + " 1143111, 1144596, 1142451, 1136867, 1136864, 1140885, 1135324, 1144186,\n", + " 1137611, 1137606, 1150906, 1166711, 1143752, 1143757, 1146203, 1141760,\n", + " 1158691, 1138529, 1140508, 1137846, 1137849, 1161701, 1147153, 1142640,\n", + " 1142649, 1149193, 1141365, 1141367, 1153068, 1141664, 1149101, 1138292,\n", + " 1144279, 1139508, 1139510, 1140081, 1139127, 1145000, 1140616, 1140619,\n", + " 1139168, 1140976, 1140983, 1140990, 1147050, 1152976, 1152980, 1160255,\n", + " 1135461, 1142556, 1163917, 1139007, 1141925, 1141929, 1146898, 1144251,\n", + " 1144242, 1140580, 1137149, 1160352, 1143851, 1146024, 1146129, 1141585,\n", + " 1142540, 1149933, 1139990, 1146302, 1143294, 1143883, 1148763, 1147282,\n", + " 1142816, 1143723, 1142637, 1142638, 1139408, 1139417, 1139418, 1143051,\n", + " 1143040, 1136160, 1138923, 1136836, 1136843, 1139328, 1141490, 1141496,\n", + " 1142159, 1145428, 1143345, 1144765, 1144753, 1144615, 1145810, 1135814,\n", + " 1146523, 1143957, 1143457, 1137697, 1144293, 1144303, 1144564, 1143937,\n", + " 1146587, 1147574, 1147521, 1140364, 1149569, 1149582, 1137990, 1143076,\n", + " 1143080, 1149500, 1147999, 1134899, 1144008, 1139252, 1139249, 1147235,\n", + " 1154482, 1154483, 1148704, 1141314, 1141319, 1141825, 1141836, 1146751,\n", + " 1152335, 1149722, 1147971, 1145009, 1139549, 1158226, 1158235, 1149871,\n", + " 1151636, 1145240, 1138632, 1146178, 1151239, 1151242, 1148208, 1148214,\n", + " 1152530, 1150280, 1150438, 1150445, 1149250, 1154438, 1151856, 1144526,\n", + " 1150342, 1152013, 1151985, 1151997, 1147794, 1151482, 1152027, 1154271,\n", + " 1149535, 1148693, 1148698, 1147016, 1147019, 1147009, 1158950, 1158957,\n", + " 1141949, 1146771, 1141193, 1144817, 1167216, 1147770, 1153574, 1154985,\n", + " 1147653, 1143560, 1152070, 1148623, 1154420, 1148180, 1136249, 1136244,\n", + " 1138197, 1139718, 1146683, 1146686, 1138864, 1152444, 1157968, 1157974,\n", + " 1148726, 1148729, 1144096, 1147627, 1146544, 1146549, 1148204, 1148101,\n", + " 1148106, 1156212, 1153124, 1153188, 1159829, 1150932, 1150935, 1144863,\n", + " 1150352, 1150356, 1146227, 1148084, 1151821, 1135311, 1135303, 1151909,\n", + " 1151907, 1154183, 1148498, 1148505, 1146562, 1141420, 1155152, 1153441,\n", + " 1150894, 1148949, 1146969, 1149355, 1151922, 1146623, 1151691, 1152407,\n", + " 1152097, 1151738, 1156321, 1153037, 1150085, 1137746, 1137755, 1146304,\n", + " 1152622, 1152612, 1140521, 1155146, 1155140, 1136401, 1149203, 1151959,\n", + " 1152826, 1155337, 1155356, 1157824, 1152673, 1152681, 1154638, 1151579,\n", + " 1151617, 1150578, 1136134, 1136140, 1136142, 1140451, 1150612, 1138991,\n", + " 1152903, 1151311, 1152341, 1146816, 1153311, 1145581, 1138281, 1136028,\n", + " 1158704, 1156622, 1152928, 1151065, 1150099, 1150164, 1148033, 1148040,\n", + " 1152601, 1145652, 1149792, 1144671, 1137052, 1148628, 1158530, 1137458,\n", + " 1147643, 1159222, 1153085, 1142041, 1157470, 1157229, 1143444, 1157536,\n", + " 1157547, 1150877, 1150869, 1158916, 1156505, 1157064, 1139473, 1143491,\n", + " 1151258, 1149045, 1135730, 1156638, 1156631, 1153413, 1147810, 1143022,\n", + " 1158311, 1174266, 1155441, 1150130, 1150132, 1144361, 1144362, 1140865,\n", + " 1145764, 1145600, 1150488, 1142755, 1142758, 1156207, 1156205, 1156267,\n", + " 1156256, 1151390, 1151379, 1158626, 1156640, 1155122, 1152527, 1155755,\n", + " 1155628, 1155631, 1158487, 1155574, 1155583, 1136469, 1158569, 1158823,\n", + " 1158824, 1148834, 1158355, 1143250, 1146935, 1161796, 1139620, 1151325,\n", + " 1151327, 1154902, 1154909, 1143189, 1150371, 1153322, 1157424, 1177492,\n", + " 1150987, 1143517, 1137152, 1159001, 1153786, 1137381, 1137380, 1173248,\n", + " 1159116, 1168157, 1140919, 1166187, 1134677, 1134687, 1134674, 1135601,\n", + " 1135614, 1145507, 1150661, 1150671, 1150659, 1158665, 1149145, 1140627,\n", + " 1140633, 1152209, 1152220, 1152498, 1152502, 1156692, 1140381, 1156023,\n", + " 1155881, 1157732, 1157733, 1159132, 1155970, 1155971, 1155975, 1135190,\n", + " 1149700, 1154600, 1154605, 1159452, 1153491, 1136896, 1158760, 1140221,\n", + " 1159164, 1158815, 1158447, 1158432, 1158285, 1155246, 1152463, 1136494,\n", + " 1153632, 1147594, 1155296, 1153112, 1156490, 1153808, 1136640, 1163112,\n", + " 1162167, 1145477, 1140049, 1157819, 1163813, 1163814, 1146123, 1138111,\n", + " 1158002, 1155521, 1142489, 1135661, 1142663, 1142662, 1150684, 1159054,\n", + " 1167589, 1142427, 1158295, 1153052, 1153045, 1155769, 1155770, 1166243,\n", + " 1167708, 1156228, 1144158, 1153841, 1153842, 1156098, 1156107, 1138393,\n", + " 1150035, 1150046, 1159475, 1149063, 1149070, 1149071, 1164857, 1147300,\n", + " 1146876, 1138161, 1149953, 1149956, 1154590, 1160758, 1139592, 1139284,\n", + " 1139286, 1139281, 1148777, 1148771, 1157351, 1159773, 1146063, 1146356,\n", + " 1158459, 1140140, 1140641, 1140650, 1140643, 1148592, 1148594, 1148600,\n", + " 1164990, 1143143, 1143149, 1151875, 1151872, 1155816, 1154274, 1158653,\n", + " 1159025, 1159026, 1159032, 1163740, 1152244, 1152247, 1143729, 1143733,\n", + " 1167539, 1155588, 1155596, 1164592, 1153924, 1168428, 1148571, 1158405,\n", + " 1168527, 1144984, 1147402, 1170577, 1149011, 1146510, 1144736, 1144737,\n", + " 1144739, 1163527, 1155272, 1141468, 1141471, 1169475, 1151650, 1147433,\n", + " 1181325, 1182254, 1156739, 1161008, 1150643, 1171040, 1150309, 1168748,\n", + " 1144810, 1144812, 1140127, 1140126, 1135567, 1142733, 1145743, 1145910,\n", + " 1166924, 1145228, 1155324, 1166462, 1171687, 1185486, 1185474, 1138762,\n", + " 1146433, 1148168, 1143037, 1145447, 1165745, 1165746, 1148124, 1139351,\n", + " 1145900, 1148417, 1153535, 1153534, 1163961, 1152192, 1152203, 1181040,\n", + " 1175240, 1143395, 1143402, 1170980, 1169729, 1149565, 1158724, 1167497,\n", + " 1154073, 1154070, 1154076, 1170742, 1147330, 1147331, 1147339, 1160018,\n", + " 1145674, 1150773, 1150781, 1179488, 1149130, 1169602, 1171979, 1156308,\n", + " 1169216, 1169298, 1165011, 1150515, 1150522, 1150518, 1167915, 1169458,\n", + " 1161780, 1157534, 1138369, 1147746, 1154670, 1135841, 1169162, 1157331,\n", + " 1138130, 1141043, 1151668, 1173228, 1158623, 1158054, 1149847, 1172076,\n", + " 1154875, 1154871, 1184802, 1152353, 1152361, 1152362, 1143170, 1164647,\n", + " 1155931, 1170062, 1168055, 1149402, 1148667, 1193758, 1173307, 1145028,\n", + " 1145037, 1154024, 1154027, 1152150, 1153751, 1164964, 1159658, 1151208,\n", + " 1151201, 1157153, 1147711, 1148128, 1149247, 1170490, 1135021, 1172961,\n", + " 1178824, 1165121, 1168828, 1178273, 1140326, 1166016, 1163990, 1153428,\n", + " 1178056, 1166684, 1177510, 1150234, 1154148, 1154150, 1149173, 1178610,\n", + " 1186117, 1143271, 1169761, 1167657, 1143418, 1171301, 1153803, 1164818,\n", + " 1183400, 1173865, 1144896, 1161255, 1154718, 1157792, 1157795, 1171623,\n", + " 1164034, 1163827, 1155799, 1155804, 1157131, 1157134, 1161612, 1153898,\n", + " 1153902, 1186806, 1134650, 1160007, 1145626, 1178761, 1161068, 1184996,\n", + " 1183754, 1149755, 1149759, 1153609, 1190511, 1158933, 1158370, 1158374,\n", + " 1158379, 1155892, 1155899, 1187700, 1157268, 1191815, 1140399, 1168273,\n", + " 1170631, 1169068, 1168886, 1165487, 1180489, 1184012, 1164231, 1183477,\n", + " 1186919, 1191268, 1154955, 1154957, 1181811, 1147182, 1156162, 1189294,\n", + " 1163621, 1184050, 1156530, 1156528, 1156539, 1139831, 1150265, 1170433,\n", + " 1154810, 1149669, 1182066, 1151280, 1156055, 1151974, 1173019, 1180122,\n", + " 1146395, 1149536, 1192160, 1172470, 1188161, 1187721, 1172696, 1177472,\n", + " 1169963, 1140993, 1190444, 1189741, 1194351, 1189256, 1162156, 1170893,\n", + " 1170881, 1153733, 1171111, 1169700, 1166841, 1193804, 1182286, 1158064,\n", + " 1145395, 1160972, 1185644, 1179742, 1155958, 1155962, 1186064, 1182674,\n", + " 1185198, 1193620, 1179773, 1182178, 1182772, 1179617, 1191882, 1157008],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197174, 1195697, 1199730, 1197226, 1197719, 1198721, 1198731,\n", + " 1199282, 1201581, 1201582, 1194626, 1202803, 1202804, 1196669, 1198557,\n", + " 1194743, 1194750, 1194770, 1194783, 1196631, 1195514, 1195263, 1199135,\n", + " 1196534, 1201935, 1201992, 1196031, 1198543, 1197697, 1197701, 1199519,\n", + " 1195740, 1196359, 1198991, 1198668, 1196711, 1195219, 1196214, 1195265,\n", + " 1197140, 1196109, 1195541, 1202916, 1197253, 1195746, 1200037, 1196283,\n", + " 1195351, 1198282, 1199329, 1199066, 1197291, 1202747, 1199185, 1198673,\n", + " 1194941, 1194928, 1197990, 1199579, 1201908, 1195014, 1199664, 1199673,\n", + " 1198762, 1199949, 1201511, 1199021, 1195807, 1197601, 1196727, 1195773,\n", + " 1199410, 1199418, 1202390, 1199891, 1198811, 1201547, 1201827, 1200501,\n", + " 1201156, 1202630, 1201056, 1198481, 1201043, 1200526, 1200546, 1202102,\n", + " 1202110, 1201029, 1202239, 1202338, 1202175, 1200328, 1196960, 1196966,\n", + " 1200784, 1194846, 1195431, 1195664, 1198055, 1197816, 1197495, 1201484,\n", + " 1202271, 1198299, 1199659, 1203102, 1201138, 1194730, 1198823, 1198824,\n", + " 1197731, 1197735, 1198819, 1195070, 1201886, 1200301, 1197652, 1197343,\n", + " 1195082, 1197035], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197174, 1195697, 1199730, 1197226, 1197719, 1198721, 1198731,\n", + " 1199282, 1201581, 1201582, 1194626, 1202803, 1202804, 1196669, 1198557,\n", + " 1194743, 1194750, 1194770, 1194783, 1196631, 1195514, 1195263, 1199135,\n", + " 1196534, 1201935, 1201992, 1196031, 1198543, 1197697, 1197701, 1199519,\n", + " 1195740, 1196359, 1198991, 1198668, 1196711, 1195219, 1196214, 1195265,\n", + " 1197140, 1196109, 1195541, 1202916, 1197253, 1195746, 1200037, 1196283,\n", + " 1195351, 1198282, 1199329, 1199066, 1197291, 1202747, 1199185, 1198673,\n", + " 1194941, 1194928, 1197990, 1199579, 1201908, 1195014, 1199664, 1199673,\n", + " 1198762, 1199949, 1201511, 1199021, 1195807, 1197601, 1196727, 1195773,\n", + " 1199410, 1199418, 1202390, 1199891, 1198811, 1201547, 1201827, 1200501,\n", + " 1201156, 1202630, 1201056, 1198481, 1201043, 1200526, 1200546, 1202102,\n", + " 1202110, 1201029, 1202239, 1202338, 1202175, 1200328, 1196960, 1196966,\n", + " 1200784, 1194846, 1195431, 1195664, 1198055, 1197816, 1197495, 1201484,\n", + " 1202271, 1198299, 1199659, 1203102, 1201138, 1194730, 1198823, 1198824,\n", + " 1197731, 1197735, 1198819, 1195070, 1201886, 1200301, 1197652, 1197343,\n", + " 1195082, 1197035], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 7.7670e-02, -6.2057e-04, 3.1211e-01, ..., -2.3174e-04,\n", + " -1.6338e-04, -2.8580e-03],\n", + " [ 1.6018e-02, -1.0623e-04, 2.8187e-01, ..., 2.3380e-02,\n", + " -4.6561e-04, -2.6953e-03],\n", + " [ 1.7808e-02, -9.4814e-05, 2.7859e-01, ..., 2.0770e-02,\n", + " -6.4398e-04, -2.8109e-03],\n", + " ...,\n", + " [ 1.1730e-02, -3.2684e-04, 3.1276e-01, ..., 9.5744e-03,\n", + " -7.0899e-05, -2.7257e-03],\n", + " [ 3.2323e-02, -3.1163e-04, 3.0332e-01, ..., -6.5442e-05,\n", + " -2.5634e-04, -2.5105e-03],\n", + " [ 2.6303e-02, -3.0485e-04, 2.6967e-01, ..., 2.0263e-02,\n", + " -4.5080e-04, -2.5540e-03]], device='cuda:0'), 'paper': tensor([[ 2.4911, -0.0319, 2.0449, ..., -0.0113, -0.0142, 2.3905],\n", + " [ 3.6502, -0.0481, 3.1349, ..., -0.0161, -0.0230, 3.6561],\n", + " [ 3.1843, -0.0484, 1.7956, ..., -0.0170, -0.0135, 2.3199],\n", + " ...,\n", + " [ 4.2004, -0.0700, 2.4999, ..., -0.0252, -0.0215, 3.3627],\n", + " [ 2.3280, -0.0326, 1.9750, ..., -0.0089, -0.0147, 2.6772],\n", + " [ 2.4459, -0.0363, 2.5963, ..., -0.0082, -0.0157, 3.0143]],\n", + " device='cuda:0'), 'author': tensor([[ 5.5928e-01, -4.0132e-03, -1.3636e-04, ..., -2.3374e-03,\n", + " 4.5288e-02, 2.0138e-01],\n", + " [ 4.3486e-01, -4.6114e-03, 1.6277e-02, ..., -2.1044e-03,\n", + " -8.6052e-05, 8.9405e-02],\n", + " [ 5.2184e-01, -4.4919e-03, -2.5288e-04, ..., -2.8441e-03,\n", + " -3.2228e-05, 1.2000e-01],\n", + " ...,\n", + " [ 5.3371e-01, -5.3116e-03, -3.9280e-04, ..., -2.2193e-03,\n", + " 5.0947e-02, 2.5752e-01],\n", + " [ 4.4546e-01, -5.6316e-03, 8.7183e-03, ..., -1.5832e-03,\n", + " 3.4120e-02, 2.4481e-01],\n", + " [ 5.3303e-01, -4.8705e-03, -5.5602e-04, ..., -2.2640e-03,\n", + " -3.8344e-05, 1.9870e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0136, 0.3031, -0.0039, ..., 1.4325, -0.0030, -0.0075],\n", + " [-0.0105, 0.2113, -0.0040, ..., 1.1892, -0.0020, -0.0070],\n", + " [-0.0129, 0.2819, -0.0040, ..., 1.3439, -0.0029, -0.0078],\n", + " ...,\n", + " [-0.0116, 0.1620, -0.0043, ..., 1.2961, -0.0026, -0.0064],\n", + " [-0.0104, 0.2029, -0.0046, ..., 1.2577, -0.0022, -0.0062],\n", + " [-0.0106, 0.2301, -0.0031, ..., 1.0629, -0.0026, -0.0069]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 33, 175, 101, 101, 138, 138, 89, 89, 461, 211, 345, 412,\n", + " 448, 352, 254, 308, 606, 555, 807, 807, 855, 944, 1044, 1044,\n", + " 1044, 798, 798, 869, 1070, 1149, 1149, 1304, 1156, 1210, 1203, 1204,\n", + " 1198, 1210, 1210, 1210, 1401, 1401, 1269, 1430, 1430, 1466, 1466, 1466,\n", + " 1466, 1466, 1466, 1466, 1592, 1592, 1491, 1463, 1540, 1540, 1582, 1582,\n", + " 1512, 1790, 1790, 1790, 1856, 1854, 1854, 1928, 1928, 2097, 1945, 2009,\n", + " 2009, 1977, 1908, 1977, 1977, 2132, 2099, 2099, 2099, 2099, 2167, 2209,\n", + " 2181, 2103, 2259, 2123, 2189, 2285, 2267, 2330, 2498, 2409, 2409, 2598,\n", + " 2504, 2504, 2504, 2504, 2634, 2579, 2402, 2402, 2402, 2775, 2782, 2852,\n", + " 2857, 2942, 2942, 2975, 3051, 3017, 3098, 3264, 3264, 3235, 3187, 3187,\n", + " 3187, 3187, 3481, 3319, 3696, 3660, 3853, 3929, 3966, 4001, 3936, 4134,\n", + " 4256, 4247, 4181, 4424, 4453, 4579, 4536, 4701, 4709, 4688, 4599, 4786,\n", + " 4786, 4777, 4554, 4554, 4590, 4678, 4678, 4711, 4711, 4646, 4676, 4983,\n", + " 4857, 4857, 4773, 4804, 4969, 4969, 4953, 4948, 4948, 4948, 5313, 5313,\n", + " 5207, 4948, 5197, 5487, 5318, 5484, 5484, 5484, 5484, 5484, 5484, 5484,\n", + " 5484, 5519, 5519, 5473, 5473, 5496, 5496, 5769, 5769, 5806, 5806],\n", + " [ 13, 81, 8, 91, 37, 117, 76, 59, 113, 114, 56, 112,\n", + " 42, 37, 74, 92, 76, 82, 90, 42, 26, 61, 1, 64,\n", + " 100, 117, 37, 83, 62, 55, 17, 106, 83, 47, 24, 66,\n", + " 112, 116, 76, 54, 119, 69, 34, 60, 5, 109, 57, 70,\n", + " 97, 65, 80, 101, 59, 76, 43, 104, 15, 22, 29, 30,\n", + " 112, 3, 75, 121, 70, 118, 107, 84, 87, 95, 49, 25,\n", + " 85, 21, 2, 43, 63, 26, 111, 77, 19, 52, 11, 29,\n", + " 22, 91, 43, 66, 23, 31, 93, 82, 16, 13, 9, 2,\n", + " 84, 102, 48, 45, 22, 12, 4, 121, 38, 41, 115, 55,\n", + " 10, 72, 13, 6, 18, 68, 45, 70, 21, 108, 39, 99,\n", + " 13, 67, 50, 110, 51, 79, 89, 44, 22, 33, 22, 40,\n", + " 22, 50, 70, 21, 112, 80, 99, 32, 71, 36, 7, 78,\n", + " 35, 39, 31, 58, 35, 86, 18, 86, 18, 20, 53, 109,\n", + " 94, 111, 121, 120, 10, 33, 121, 22, 103, 98, 76, 59,\n", + " 28, 88, 14, 70, 93, 27, 67, 105, 0, 44, 73, 70,\n", + " 46, 22, 15, 70, 96, 56, 74, 20, 70, 8, 121]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2343, 1822, 3109, ..., 1353, 6054, 4701],\n", + " [ 105, 154, 188, ..., 6539, 6523, 6582]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 33, 55, 55, ..., 93, 42, 104],\n", + " [ 183, 173, 109, ..., 5754, 5558, 5778]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 154, 154, 154, ..., 6476, 6476, 6476],\n", + " [ 590, 306, 318, ..., 276, 753, 338]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 87, 338, 984, ..., 605, 437, 465],\n", + " [ 270, 223, 44, ..., 6527, 6496, 6477]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 320, 4698, 6461, ..., 383, 2540, 357],\n", + " [ 8, 8, 8, ..., 5804, 5777, 5816]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 154, 154, 154, ..., 6543, 6476, 6476],\n", + " [1518, 2468, 2991, ..., 1788, 1833, 3707]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 138, 138, 138, ..., 5806, 5806, 5806],\n", + " [ 688, 844, 1336, ..., 924, 2594, 1010]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.00576\n", + "sampling 0.005604\n", + "noi time: 0.001687\n", + "get_vertex_data call: 0.038945\n", + "noi group time: 0.003561\n", + "eoi_group_time: 0.016949\n", + "second half: 0.231298\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 28267, 31145, ..., 1120124, 1119043, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 28267, 31145, ..., 1120124, 1119043, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227501, 1210817, 1214764, ..., 1939384, 1937149, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227501, 1210817, 1214764, ..., 1939384, 1937149, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137209, 1141424, 1136230, 1140282, 1135926, 1141758, 1138335, 1136223,\n", + " 1141260, 1140297, 1136155, 1142525, 1136962, 1136965, 1143600, 1149831,\n", + " 1139811, 1145374, 1145999, 1139141, 1143372, 1139615, 1140781, 1148976,\n", + " 1150497, 1148576, 1149216, 1149220, 1155683, 1155689, 1149646, 1135991,\n", + " 1149283, 1153940, 1144636, 1144632, 1146992, 1146996, 1148343, 1146656,\n", + " 1146660, 1146472, 1152666, 1138345, 1147100, 1141904, 1137220, 1147211,\n", + " 1150329, 1138749, 1137829, 1138112, 1135183, 1138356, 1151520, 1151530,\n", + " 1134735, 1140953, 1135367, 1140767, 1141036, 1134794, 1157443, 1136521,\n", + " 1143389, 1138504, 1137329, 1136178, 1137693, 1136610, 1136617, 1144786,\n", + " 1144395, 1136826, 1137529, 1135408, 1136714, 1137441, 1137448, 1156159,\n", + " 1139161, 1135583, 1142607, 1148860, 1155076, 1155081, 1140712, 1138514,\n", + " 1153099, 1137959, 1135499, 1156899, 1156908, 1135522, 1139684, 1139685,\n", + " 1137287, 1138440, 1138451, 1138452, 1138461, 1138449, 1154788, 1154787,\n", + " 1136594, 1138889, 1156606, 1147116, 1142611, 1135359, 1135631, 1141523,\n", + " 1141520, 1139673, 1139674, 1138079, 1142255, 1134992, 1134778, 1136551,\n", + " 1140199, 1158974, 1159019, 1144410, 1143625, 1139085, 1138648, 1138148,\n", + " 1138150, 1141963, 1146077, 1140550, 1141985, 1152044, 1142295, 1142302,\n", + " 1137732, 1137728, 1147317, 1134922, 1134742, 1135549, 1141088, 1141097,\n", + " 1141098, 1148998, 1149001, 1141980, 1136397, 1136392, 1143225, 1139025,\n", + " 1139033, 1146844, 1152719, 1141681, 1136625, 1161173, 1141224, 1141648,\n", + " 1136921, 1141159, 1138785, 1139495, 1144937, 1136752, 1168566, 1141608,\n", + " 1162799, 1136862, 1147850, 1144428, 1138490, 1142050, 1146796, 1153666,\n", + " 1140163, 1137766, 1137762, 1137243, 1138708, 1144596, 1136864, 1144182,\n", + " 1137606, 1150906, 1161095, 1141760, 1158698, 1158690, 1140501, 1137852,\n", + " 1137841, 1147153, 1141365, 1141678, 1139508, 1138814, 1139127, 1139130,\n", + " 1144998, 1145001, 1143784, 1143785, 1139168, 1140980, 1146693, 1146695,\n", + " 1152976, 1152978, 1135459, 1141925, 1144242, 1145329, 1145331, 1145339,\n", + " 1140689, 1136891, 1137570, 1143844, 1163657, 1146024, 1141585, 1142533,\n", + " 1139990, 1143293, 1143294, 1151124, 1147543, 1147540, 1147282, 1142816,\n", + " 1149155, 1140346, 1148003, 1149608, 1143051, 1148414, 1136160, 1157717,\n", + " 1157720, 1148225, 1139296, 1139301, 1139328, 1144768, 1145427, 1143345,\n", + " 1144767, 1144619, 1144615, 1169022, 1138004, 1150919, 1146514, 1146523,\n", + " 1143456, 1143457, 1137703, 1142000, 1135441, 1149082, 1143798, 1146636,\n", + " 1140364, 1137985, 1149489, 1148966, 1147984, 1147996, 1147999, 1147127,\n", + " 1148704, 1151002, 1141327, 1141825, 1146742, 1148468, 1148473, 1153701,\n", + " 1149714, 1147027, 1147972, 1141135, 1158226, 1158235, 1151646, 1145240,\n", + " 1146178, 1151242, 1148215, 1150438, 1149258, 1154438, 1144514, 1145833,\n", + " 1152013, 1151998, 1151997, 1151480, 1145262, 1146723, 1148696, 1150127,\n", + " 1147019, 1147021, 1141949, 1150736, 1150837, 1150843, 1150728, 1149996,\n", + " 1154985, 1149412, 1148288, 1135085, 1147871, 1139096, 1139097, 1154420,\n", + " 1151369, 1152561, 1136251, 1136247, 1146676, 1138877, 1138404, 1157968,\n", + " 1157983, 1148729, 1144110, 1153181, 1154166, 1153124, 1153186, 1153188,\n", + " 1145104, 1145107, 1150934, 1150935, 1144861, 1155098, 1147446, 1151811,\n", + " 1152581, 1135307, 1135311, 1154183, 1154190, 1146571, 1141420, 1141419,\n", + " 1136009, 1155152, 1155161, 1147737, 1149385, 1155061, 1146969, 1146967,\n", + " 1156409, 1147381, 1149359, 1146623, 1151694, 1142986, 1146492, 1144476,\n", + " 1135688, 1152097, 1146287, 1153030, 1150085, 1137746, 1146307, 1146304,\n", + " 1155337, 1154112, 1154123, 1157826, 1152673, 1151617, 1151629, 1150578,\n", + " 1150588, 1136131, 1136142, 1136789, 1148913, 1140451, 1178185, 1144533,\n", + " 1138991, 1152903, 1151311, 1152341, 1153298, 1153311, 1156001, 1136028,\n", + " 1158704, 1152928, 1152886, 1154722, 1154727, 1156422, 1150106, 1150164,\n", + " 1150171, 1148040, 1152601, 1137048, 1168183, 1148628, 1158530, 1158540,\n", + " 1148369, 1137458, 1154563, 1157509, 1142047, 1154368, 1158854, 1148892,\n", + " 1158924, 1152384, 1157064, 1155408, 1155413, 1152833, 1145187, 1137814,\n", + " 1139473, 1135222, 1135231, 1149052, 1135730, 1156629, 1157909, 1156935,\n", + " 1153413, 1135645, 1157783, 1151469, 1139525, 1158308, 1158311, 1151271,\n", + " 1151334, 1155441, 1137979, 1150136, 1154530, 1156919, 1142755, 1142758,\n", + " 1156207, 1151379, 1140187, 1155122, 1160399, 1152527, 1152518, 1149321,\n", + " 1153478, 1151425, 1135406, 1168230, 1157898, 1155620, 1155628, 1155630,\n", + " 1155631, 1154547, 1154555, 1136474, 1158566, 1158824, 1158825, 1153721,\n", + " 1158325, 1155646, 1155645, 1158354, 1143263, 1146935, 1157489, 1162190,\n", + " 1154909, 1143189, 1143521, 1160904, 1150371, 1155608, 1141620, 1150990,\n", + " 1150987, 1143517, 1157933, 1137152, 1157663, 1158126, 1171834, 1158578,\n", + " 1153786, 1149913, 1158204, 1159116, 1138257, 1158350, 1145695, 1154014,\n", + " 1134685, 1135601, 1135611, 1148149, 1158665, 1157685, 1156092, 1156081,\n", + " 1144451, 1152220, 1167310, 1140380, 1140381, 1140374, 1157739, 1159132,\n", + " 1144843, 1155971, 1155975, 1158846, 1155393, 1149702, 1149700, 1154600,\n", + " 1161311, 1153503, 1136896, 1158753, 1158760, 1158886, 1157296, 1158815,\n", + " 1136487, 1136494, 1161616, 1159241, 1153808, 1140049, 1142178, 1157823,\n", + " 1158558, 1158547, 1153834, 1151140, 1165497, 1163814, 1138110, 1144581,\n", + " 1158257, 1150011, 1155521, 1155528, 1164276, 1162431, 1167359, 1159052,\n", + " 1159057, 1155197, 1153052, 1153045, 1155769, 1155772, 1166243, 1156226,\n", + " 1144158, 1166258, 1153842, 1138393, 1142679, 1150046, 1150041, 1149070,\n", + " 1155476, 1147300, 1165386, 1149956, 1149963, 1154590, 1139286, 1139281,\n", + " 1169745, 1148773, 1146063, 1164429, 1140643, 1141861, 1148603, 1148607,\n", + " 1172727, 1164990, 1143143, 1156177, 1159025, 1159029, 1159032, 1166279,\n", + " 1152245, 1152247, 1152250, 1178146, 1187374, 1148567, 1144990, 1167931,\n", + " 1170577, 1149012, 1153239, 1152776, 1145139, 1151650, 1147426, 1147427,\n", + " 1157044, 1156739, 1157955, 1153663, 1171040, 1168748, 1144812, 1162085,\n", + " 1165713, 1156303, 1145228, 1169281, 1147694, 1152624, 1148124, 1145892,\n", + " 1145900, 1145902, 1153535, 1143395, 1143397, 1171230, 1158724, 1167503,\n", + " 1154076, 1147338, 1144690, 1145489, 1171975, 1155172, 1155170, 1150518,\n", + " 1177234, 1156113, 1156119, 1144336, 1147746, 1154670, 1135854, 1169154,\n", + " 1169162, 1138142, 1141045, 1141043, 1151674, 1169359, 1154352, 1149452,\n", + " 1158611, 1158623, 1149847, 1165903, 1165109, 1155494, 1152353, 1168400,\n", + " 1172838, 1173307, 1153751, 1172785, 1172791, 1159653, 1157158, 1157153,\n", + " 1147696, 1147711, 1151850, 1148131, 1147925, 1157593, 1189748, 1166820,\n", + " 1135021, 1168825, 1146765, 1167898, 1170027, 1172601, 1144545, 1153427,\n", + " 1159100, 1166682, 1170874, 1181772, 1183655, 1177115, 1150234, 1154148,\n", + " 1167510, 1149173, 1181860, 1143279, 1169765, 1171297, 1179918, 1153137,\n", + " 1144910, 1164467, 1166554, 1161255, 1155262, 1171773, 1154707, 1154718,\n", + " 1157795, 1178358, 1155802, 1157134, 1162828, 1162819, 1172154, 1182011,\n", + " 1153898, 1178532, 1134650, 1162403, 1145626, 1180800, 1149744, 1153601,\n", + " 1157763, 1157771, 1155985, 1158771, 1145088, 1158517, 1158940, 1166616,\n", + " 1158371, 1155890, 1155892, 1157268, 1157276, 1182797, 1140399, 1168280,\n", + " 1168533, 1168886, 1168889, 1171641, 1161395, 1168870, 1164228, 1179090,\n", + " 1154957, 1166781, 1170341, 1172636, 1159532, 1168943, 1170431, 1139831,\n", + " 1139837, 1150265, 1149668, 1163848, 1156055, 1146395, 1188671, 1180098,\n", + " 1186690, 1192166, 1188390, 1168678, 1182057, 1181283, 1178976, 1151774,\n", + " 1152112, 1169786, 1171201, 1167089, 1172423, 1145395, 1155958, 1187846,\n", + " 1178304, 1162656, 1189038, 1189075, 1174695, 1157008], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137209, 1141424, 1136230, 1140282, 1135926, 1141758, 1138335, 1136223,\n", + " 1141260, 1140297, 1136155, 1142525, 1136962, 1136965, 1143600, 1149831,\n", + " 1139811, 1145374, 1145999, 1139141, 1143372, 1139615, 1140781, 1148976,\n", + " 1150497, 1148576, 1149216, 1149220, 1155683, 1155689, 1149646, 1135991,\n", + " 1149283, 1153940, 1144636, 1144632, 1146992, 1146996, 1148343, 1146656,\n", + " 1146660, 1146472, 1152666, 1138345, 1147100, 1141904, 1137220, 1147211,\n", + " 1150329, 1138749, 1137829, 1138112, 1135183, 1138356, 1151520, 1151530,\n", + " 1134735, 1140953, 1135367, 1140767, 1141036, 1134794, 1157443, 1136521,\n", + " 1143389, 1138504, 1137329, 1136178, 1137693, 1136610, 1136617, 1144786,\n", + " 1144395, 1136826, 1137529, 1135408, 1136714, 1137441, 1137448, 1156159,\n", + " 1139161, 1135583, 1142607, 1148860, 1155076, 1155081, 1140712, 1138514,\n", + " 1153099, 1137959, 1135499, 1156899, 1156908, 1135522, 1139684, 1139685,\n", + " 1137287, 1138440, 1138451, 1138452, 1138461, 1138449, 1154788, 1154787,\n", + " 1136594, 1138889, 1156606, 1147116, 1142611, 1135359, 1135631, 1141523,\n", + " 1141520, 1139673, 1139674, 1138079, 1142255, 1134992, 1134778, 1136551,\n", + " 1140199, 1158974, 1159019, 1144410, 1143625, 1139085, 1138648, 1138148,\n", + " 1138150, 1141963, 1146077, 1140550, 1141985, 1152044, 1142295, 1142302,\n", + " 1137732, 1137728, 1147317, 1134922, 1134742, 1135549, 1141088, 1141097,\n", + " 1141098, 1148998, 1149001, 1141980, 1136397, 1136392, 1143225, 1139025,\n", + " 1139033, 1146844, 1152719, 1141681, 1136625, 1161173, 1141224, 1141648,\n", + " 1136921, 1141159, 1138785, 1139495, 1144937, 1136752, 1168566, 1141608,\n", + " 1162799, 1136862, 1147850, 1144428, 1138490, 1142050, 1146796, 1153666,\n", + " 1140163, 1137766, 1137762, 1137243, 1138708, 1144596, 1136864, 1144182,\n", + " 1137606, 1150906, 1161095, 1141760, 1158698, 1158690, 1140501, 1137852,\n", + " 1137841, 1147153, 1141365, 1141678, 1139508, 1138814, 1139127, 1139130,\n", + " 1144998, 1145001, 1143784, 1143785, 1139168, 1140980, 1146693, 1146695,\n", + " 1152976, 1152978, 1135459, 1141925, 1144242, 1145329, 1145331, 1145339,\n", + " 1140689, 1136891, 1137570, 1143844, 1163657, 1146024, 1141585, 1142533,\n", + " 1139990, 1143293, 1143294, 1151124, 1147543, 1147540, 1147282, 1142816,\n", + " 1149155, 1140346, 1148003, 1149608, 1143051, 1148414, 1136160, 1157717,\n", + " 1157720, 1148225, 1139296, 1139301, 1139328, 1144768, 1145427, 1143345,\n", + " 1144767, 1144619, 1144615, 1169022, 1138004, 1150919, 1146514, 1146523,\n", + " 1143456, 1143457, 1137703, 1142000, 1135441, 1149082, 1143798, 1146636,\n", + " 1140364, 1137985, 1149489, 1148966, 1147984, 1147996, 1147999, 1147127,\n", + " 1148704, 1151002, 1141327, 1141825, 1146742, 1148468, 1148473, 1153701,\n", + " 1149714, 1147027, 1147972, 1141135, 1158226, 1158235, 1151646, 1145240,\n", + " 1146178, 1151242, 1148215, 1150438, 1149258, 1154438, 1144514, 1145833,\n", + " 1152013, 1151998, 1151997, 1151480, 1145262, 1146723, 1148696, 1150127,\n", + " 1147019, 1147021, 1141949, 1150736, 1150837, 1150843, 1150728, 1149996,\n", + " 1154985, 1149412, 1148288, 1135085, 1147871, 1139096, 1139097, 1154420,\n", + " 1151369, 1152561, 1136251, 1136247, 1146676, 1138877, 1138404, 1157968,\n", + " 1157983, 1148729, 1144110, 1153181, 1154166, 1153124, 1153186, 1153188,\n", + " 1145104, 1145107, 1150934, 1150935, 1144861, 1155098, 1147446, 1151811,\n", + " 1152581, 1135307, 1135311, 1154183, 1154190, 1146571, 1141420, 1141419,\n", + " 1136009, 1155152, 1155161, 1147737, 1149385, 1155061, 1146969, 1146967,\n", + " 1156409, 1147381, 1149359, 1146623, 1151694, 1142986, 1146492, 1144476,\n", + " 1135688, 1152097, 1146287, 1153030, 1150085, 1137746, 1146307, 1146304,\n", + " 1155337, 1154112, 1154123, 1157826, 1152673, 1151617, 1151629, 1150578,\n", + " 1150588, 1136131, 1136142, 1136789, 1148913, 1140451, 1178185, 1144533,\n", + " 1138991, 1152903, 1151311, 1152341, 1153298, 1153311, 1156001, 1136028,\n", + " 1158704, 1152928, 1152886, 1154722, 1154727, 1156422, 1150106, 1150164,\n", + " 1150171, 1148040, 1152601, 1137048, 1168183, 1148628, 1158530, 1158540,\n", + " 1148369, 1137458, 1154563, 1157509, 1142047, 1154368, 1158854, 1148892,\n", + " 1158924, 1152384, 1157064, 1155408, 1155413, 1152833, 1145187, 1137814,\n", + " 1139473, 1135222, 1135231, 1149052, 1135730, 1156629, 1157909, 1156935,\n", + " 1153413, 1135645, 1157783, 1151469, 1139525, 1158308, 1158311, 1151271,\n", + " 1151334, 1155441, 1137979, 1150136, 1154530, 1156919, 1142755, 1142758,\n", + " 1156207, 1151379, 1140187, 1155122, 1160399, 1152527, 1152518, 1149321,\n", + " 1153478, 1151425, 1135406, 1168230, 1157898, 1155620, 1155628, 1155630,\n", + " 1155631, 1154547, 1154555, 1136474, 1158566, 1158824, 1158825, 1153721,\n", + " 1158325, 1155646, 1155645, 1158354, 1143263, 1146935, 1157489, 1162190,\n", + " 1154909, 1143189, 1143521, 1160904, 1150371, 1155608, 1141620, 1150990,\n", + " 1150987, 1143517, 1157933, 1137152, 1157663, 1158126, 1171834, 1158578,\n", + " 1153786, 1149913, 1158204, 1159116, 1138257, 1158350, 1145695, 1154014,\n", + " 1134685, 1135601, 1135611, 1148149, 1158665, 1157685, 1156092, 1156081,\n", + " 1144451, 1152220, 1167310, 1140380, 1140381, 1140374, 1157739, 1159132,\n", + " 1144843, 1155971, 1155975, 1158846, 1155393, 1149702, 1149700, 1154600,\n", + " 1161311, 1153503, 1136896, 1158753, 1158760, 1158886, 1157296, 1158815,\n", + " 1136487, 1136494, 1161616, 1159241, 1153808, 1140049, 1142178, 1157823,\n", + " 1158558, 1158547, 1153834, 1151140, 1165497, 1163814, 1138110, 1144581,\n", + " 1158257, 1150011, 1155521, 1155528, 1164276, 1162431, 1167359, 1159052,\n", + " 1159057, 1155197, 1153052, 1153045, 1155769, 1155772, 1166243, 1156226,\n", + " 1144158, 1166258, 1153842, 1138393, 1142679, 1150046, 1150041, 1149070,\n", + " 1155476, 1147300, 1165386, 1149956, 1149963, 1154590, 1139286, 1139281,\n", + " 1169745, 1148773, 1146063, 1164429, 1140643, 1141861, 1148603, 1148607,\n", + " 1172727, 1164990, 1143143, 1156177, 1159025, 1159029, 1159032, 1166279,\n", + " 1152245, 1152247, 1152250, 1178146, 1187374, 1148567, 1144990, 1167931,\n", + " 1170577, 1149012, 1153239, 1152776, 1145139, 1151650, 1147426, 1147427,\n", + " 1157044, 1156739, 1157955, 1153663, 1171040, 1168748, 1144812, 1162085,\n", + " 1165713, 1156303, 1145228, 1169281, 1147694, 1152624, 1148124, 1145892,\n", + " 1145900, 1145902, 1153535, 1143395, 1143397, 1171230, 1158724, 1167503,\n", + " 1154076, 1147338, 1144690, 1145489, 1171975, 1155172, 1155170, 1150518,\n", + " 1177234, 1156113, 1156119, 1144336, 1147746, 1154670, 1135854, 1169154,\n", + " 1169162, 1138142, 1141045, 1141043, 1151674, 1169359, 1154352, 1149452,\n", + " 1158611, 1158623, 1149847, 1165903, 1165109, 1155494, 1152353, 1168400,\n", + " 1172838, 1173307, 1153751, 1172785, 1172791, 1159653, 1157158, 1157153,\n", + " 1147696, 1147711, 1151850, 1148131, 1147925, 1157593, 1189748, 1166820,\n", + " 1135021, 1168825, 1146765, 1167898, 1170027, 1172601, 1144545, 1153427,\n", + " 1159100, 1166682, 1170874, 1181772, 1183655, 1177115, 1150234, 1154148,\n", + " 1167510, 1149173, 1181860, 1143279, 1169765, 1171297, 1179918, 1153137,\n", + " 1144910, 1164467, 1166554, 1161255, 1155262, 1171773, 1154707, 1154718,\n", + " 1157795, 1178358, 1155802, 1157134, 1162828, 1162819, 1172154, 1182011,\n", + " 1153898, 1178532, 1134650, 1162403, 1145626, 1180800, 1149744, 1153601,\n", + " 1157763, 1157771, 1155985, 1158771, 1145088, 1158517, 1158940, 1166616,\n", + " 1158371, 1155890, 1155892, 1157268, 1157276, 1182797, 1140399, 1168280,\n", + " 1168533, 1168886, 1168889, 1171641, 1161395, 1168870, 1164228, 1179090,\n", + " 1154957, 1166781, 1170341, 1172636, 1159532, 1168943, 1170431, 1139831,\n", + " 1139837, 1150265, 1149668, 1163848, 1156055, 1146395, 1188671, 1180098,\n", + " 1186690, 1192166, 1188390, 1168678, 1182057, 1181283, 1178976, 1151774,\n", + " 1152112, 1169786, 1171201, 1167089, 1172423, 1145395, 1155958, 1187846,\n", + " 1178304, 1162656, 1189038, 1189075, 1174695, 1157008], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195442, 1196013, 1198769, 1199439, 1199306, 1195406, 1197719, 1200225,\n", + " 1195859, 1199282, 1198451, 1202255, 1201582, 1199278, 1194626, 1201016,\n", + " 1197359, 1198694, 1196871, 1202803, 1198557, 1197516, 1194866, 1195494,\n", + " 1195498, 1196624, 1195263, 1197921, 1197930, 1201992, 1199519, 1194882,\n", + " 1195895, 1199172, 1196359, 1196979, 1194754, 1195325, 1196835, 1198262,\n", + " 1195980, 1198643, 1198163, 1195145, 1195216, 1197141, 1197140, 1196242,\n", + " 1197273, 1194923, 1194859, 1195841, 1195850, 1198915, 1195659, 1197474,\n", + " 1197478, 1197476, 1196393, 1195351, 1198280, 1199329, 1199856, 1194928,\n", + " 1197577, 1199628, 1197990, 1199154, 1199038, 1198400, 1199231, 1199949,\n", + " 1201511, 1197695, 1196508, 1200668, 1199021, 1197970, 1196727, 1196734,\n", + " 1195773, 1200892, 1198428, 1200016, 1199410, 1199418, 1198811, 1195598,\n", + " 1198075, 1199445, 1201421, 1201156, 1202403, 1201056, 1200363, 1200515,\n", + " 1197097, 1197100, 1200690, 1200692, 1199908, 1202239, 1199482, 1200899,\n", + " 1200907, 1195876, 1195885, 1201291, 1198478, 1203329, 1202889, 1200245,\n", + " 1196960, 1196963, 1200785, 1199606, 1195438, 1195664, 1200445, 1198929,\n", + " 1201789, 1197816, 1197822, 1198118, 1196597, 1198587, 1198299, 1196373,\n", + " 1203102, 1198147, 1198824, 1197735, 1195070, 1203077, 1200296, 1197652,\n", + " 1195082, 1197035, 1201875, 1196428, 1197872], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195442, 1196013, 1198769, 1199439, 1199306, 1195406, 1197719, 1200225,\n", + " 1195859, 1199282, 1198451, 1202255, 1201582, 1199278, 1194626, 1201016,\n", + " 1197359, 1198694, 1196871, 1202803, 1198557, 1197516, 1194866, 1195494,\n", + " 1195498, 1196624, 1195263, 1197921, 1197930, 1201992, 1199519, 1194882,\n", + " 1195895, 1199172, 1196359, 1196979, 1194754, 1195325, 1196835, 1198262,\n", + " 1195980, 1198643, 1198163, 1195145, 1195216, 1197141, 1197140, 1196242,\n", + " 1197273, 1194923, 1194859, 1195841, 1195850, 1198915, 1195659, 1197474,\n", + " 1197478, 1197476, 1196393, 1195351, 1198280, 1199329, 1199856, 1194928,\n", + " 1197577, 1199628, 1197990, 1199154, 1199038, 1198400, 1199231, 1199949,\n", + " 1201511, 1197695, 1196508, 1200668, 1199021, 1197970, 1196727, 1196734,\n", + " 1195773, 1200892, 1198428, 1200016, 1199410, 1199418, 1198811, 1195598,\n", + " 1198075, 1199445, 1201421, 1201156, 1202403, 1201056, 1200363, 1200515,\n", + " 1197097, 1197100, 1200690, 1200692, 1199908, 1202239, 1199482, 1200899,\n", + " 1200907, 1195876, 1195885, 1201291, 1198478, 1203329, 1202889, 1200245,\n", + " 1196960, 1196963, 1200785, 1199606, 1195438, 1195664, 1200445, 1198929,\n", + " 1201789, 1197816, 1197822, 1198118, 1196597, 1198587, 1198299, 1196373,\n", + " 1203102, 1198147, 1198824, 1197735, 1195070, 1203077, 1200296, 1197652,\n", + " 1195082, 1197035, 1201875, 1196428, 1197872], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 3.7105e-02, -1.3527e-03, 4.2256e-01, ..., -6.6401e-05,\n", + " 7.6447e-03, -3.1526e-03],\n", + " [ 4.0365e-02, -7.8962e-04, 3.2802e-01, ..., -2.5635e-04,\n", + " -1.1260e-04, -2.9477e-03],\n", + " [ 2.5862e-02, 1.9690e-02, 2.5833e-01, ..., 1.6905e-02,\n", + " 3.5833e-05, -2.3657e-03],\n", + " ...,\n", + " [-4.0598e-05, -4.9816e-04, 1.9967e-01, ..., -1.0981e-04,\n", + " -2.3607e-04, -2.0168e-03],\n", + " [ 3.7851e-02, -5.9793e-04, 3.3604e-01, ..., -1.6703e-04,\n", + " -2.9006e-04, -2.7442e-03],\n", + " [ 4.6209e-02, -1.0362e-03, 3.7765e-01, ..., -9.7807e-05,\n", + " -1.9519e-05, -2.9966e-03]], device='cuda:0'), 'paper': tensor([[ 2.5282, -0.0357, 2.1807, ..., -0.0117, -0.0145, 2.4289],\n", + " [ 2.4149, -0.0331, 2.1125, ..., -0.0100, -0.0135, 2.5090],\n", + " [ 3.6597, -0.0603, 1.9579, ..., -0.0209, -0.0183, 2.9738],\n", + " ...,\n", + " [ 2.6131, -0.0335, 2.3252, ..., -0.0122, -0.0165, 2.7760],\n", + " [ 2.6058, -0.0358, 2.3406, ..., -0.0088, -0.0164, 3.1312],\n", + " [ 2.4214, -0.0363, 2.5750, ..., -0.0081, -0.0153, 2.9913]],\n", + " device='cuda:0'), 'author': tensor([[ 4.5752e-01, -4.0426e-03, -3.2594e-04, ..., -2.1255e-03,\n", + " -3.6266e-04, 1.1410e-01],\n", + " [ 4.9348e-01, -3.6523e-03, -4.7674e-06, ..., -2.4111e-03,\n", + " 3.6256e-02, 6.6916e-02],\n", + " [ 4.3615e-01, -5.1850e-03, -1.3696e-04, ..., -2.6514e-03,\n", + " 2.1403e-02, 1.3115e-01],\n", + " ...,\n", + " [ 5.1317e-01, -3.0309e-03, -5.9294e-04, ..., -2.1647e-03,\n", + " -2.8141e-04, 8.9414e-02],\n", + " [ 5.1985e-01, -4.9403e-03, -9.7611e-05, ..., -2.1400e-03,\n", + " -1.8231e-04, 1.4859e-01],\n", + " [ 5.2697e-01, -5.0379e-03, -1.8615e-04, ..., -2.1895e-03,\n", + " 6.7784e-02, 1.7441e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0086, 0.1595, -0.0033, ..., 1.0185, -0.0034, -0.0060],\n", + " [-0.0110, 0.1150, -0.0041, ..., 1.1674, -0.0029, -0.0062],\n", + " [-0.0091, 0.1814, -0.0030, ..., 1.0563, -0.0029, -0.0061],\n", + " ...,\n", + " [-0.0104, 0.1433, -0.0032, ..., 1.0087, -0.0019, -0.0067],\n", + " [-0.0106, 0.1793, -0.0032, ..., 0.9327, -0.0023, -0.0071],\n", + " [-0.0105, 0.2317, -0.0032, ..., 1.0526, -0.0033, -0.0067]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 109, 21, 186, 186, 186, 109, 109, 200, 558, 267, 458, 375,\n", + " 550, 432, 680, 680, 750, 628, 628, 697, 992, 1106, 844, 851,\n", + " 1308, 1381, 1100, 1100, 1184, 1184, 1184, 1316, 1319, 1316, 1581, 1256,\n", + " 1643, 1643, 1582, 1593, 1607, 1607, 1643, 1643, 1522, 1593, 1593, 1593,\n", + " 1510, 1510, 1678, 1667, 1701, 1667, 1834, 1871, 1871, 1873, 1928, 1906,\n", + " 1945, 1945, 2080, 2054, 1928, 1928, 2147, 2093, 2077, 2441, 2441, 2441,\n", + " 2394, 2235, 2235, 2235, 2377, 2309, 2488, 2360, 2360, 2537, 2734, 2707,\n", + " 2633, 2807, 2880, 2595, 2595, 2595, 2595, 2851, 2853, 2853, 2847, 2851,\n", + " 2851, 2739, 2739, 2739, 3051, 3051, 2819, 2819, 2819, 3035, 3074, 2957,\n", + " 3115, 3082, 3082, 3036, 3074, 3074, 3074, 3170, 3336, 3331, 3319, 3288,\n", + " 3207, 3473, 3473, 3574, 3479, 3526, 3850, 3850, 4213, 3749, 4286, 4117,\n", + " 4004, 3663, 4281, 4151, 4274, 4183, 4183, 4451, 4113, 4459, 4459, 4528,\n", + " 4576, 4597, 4596, 4622, 4723, 4906, 4718, 4648, 4719, 5076, 5012, 4832,\n", + " 4832, 4832, 4918, 5047, 5037, 5199, 5137, 5137, 5137, 5158, 5158, 5077,\n", + " 5077, 5077, 5234, 5230, 5558, 5230, 5396, 5554, 5554, 5375, 5375, 5375,\n", + " 5375, 5375, 5354, 5485, 5485, 5756, 5718, 5718, 5815, 5646, 5972, 5828,\n", + " 5828, 5763, 5763, 5831, 5943, 6142, 6126, 6365, 6365, 5864, 6252, 6653,\n", + " 6625, 6524, 6746, 6635, 6524, 6524, 6612, 6469, 6874, 6756, 6756, 6756,\n", + " 6756, 6756, 6756, 6409, 6746, 6746, 6655, 6501, 6939, 6822],\n", + " [ 111, 42, 48, 140, 109, 59, 58, 9, 96, 51, 101, 131,\n", + " 78, 65, 133, 129, 29, 129, 7, 63, 83, 99, 77, 136,\n", + " 120, 97, 107, 121, 44, 39, 29, 108, 138, 31, 78, 105,\n", + " 20, 85, 19, 37, 34, 65, 14, 139, 43, 71, 94, 96,\n", + " 46, 78, 14, 118, 36, 79, 98, 88, 114, 103, 32, 16,\n", + " 91, 22, 106, 6, 94, 134, 6, 129, 81, 73, 67, 95,\n", + " 69, 122, 49, 61, 90, 64, 138, 123, 65, 129, 108, 101,\n", + " 65, 11, 53, 78, 135, 139, 87, 1, 56, 137, 90, 103,\n", + " 125, 26, 10, 117, 89, 41, 126, 90, 76, 60, 128, 26,\n", + " 65, 24, 127, 78, 3, 71, 134, 118, 26, 131, 29, 47,\n", + " 80, 54, 4, 28, 62, 65, 78, 116, 112, 99, 104, 17,\n", + " 32, 18, 122, 56, 65, 27, 50, 99, 11, 116, 65, 99,\n", + " 101, 101, 110, 90, 72, 140, 20, 23, 33, 62, 6, 69,\n", + " 8, 90, 11, 14, 25, 13, 0, 92, 6, 44, 29, 82,\n", + " 2, 102, 122, 115, 78, 12, 78, 66, 30, 40, 44, 100,\n", + " 39, 15, 52, 78, 50, 78, 21, 130, 78, 121, 98, 119,\n", + " 75, 78, 140, 78, 6, 29, 74, 86, 132, 93, 103, 124,\n", + " 124, 38, 6, 66, 84, 130, 78, 33, 11, 5, 130, 45,\n", + " 113, 108, 68, 12, 55, 35, 115, 57, 107, 70]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2802, 2135, 356, ..., 1388, 4938, 3028],\n", + " [ 222, 10, 54, ..., 5783, 5630, 5787]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 65, 124, 73, ..., 99, 73, 65],\n", + " [ 90, 197, 10, ..., 7009, 7053, 7043]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 260, 260, 260, ..., 5649, 5787, 5787],\n", + " [ 339, 377, 683, ..., 363, 630, 272]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 606, 230, 168, ..., 312, 649, 272],\n", + " [ 129, 66, 81, ..., 5704, 5608, 5672]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 197, 706, 423, ..., 4934, 4325, 3321],\n", + " [ 78, 30, 30, ..., 6781, 6958, 7011]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 172, 172, 172, ..., 5787, 5787, 5787],\n", + " [1567, 682, 176, ..., 1049, 1514, 2185]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 30, 30, 30, ..., 6979, 6979, 6979],\n", + " [4275, 422, 860, ..., 2693, 2628, 2593]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005711\n", + "sampling 0.005556\n", + "noi time: 0.001786\n", + "get_vertex_data call: 0.04332\n", + "noi group time: 0.003485\n", + "eoi_group_time: 0.014966\n", + "second half: 0.223663\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16823, 31572, 31571, ..., 1132469, 1125891, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16823, 31572, 31571, ..., 1132469, 1125891, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1230240, 1230254, 1212192, ..., 1931109, 1933696, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1230240, 1230254, 1212192, ..., 1931109, 1933696, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1141424, 1136228, ..., 1167741, 1187536, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1141424, 1136228, ..., 1167741, 1187536, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196007, 1196011, 1198731, 1199282, 1199292, 1202255, 1198844, 1201577,\n", + " 1201582, 1194626, 1200650, 1197777, 1199248, 1201015, 1203048, 1198628,\n", + " 1198633, 1198690, 1197383, 1194770, 1194655, 1195097, 1195263, 1201992,\n", + " 1198542, 1197697, 1199519, 1195463, 1194889, 1195888, 1199171, 1196334,\n", + " 1196359, 1196618, 1197831, 1195313, 1196835, 1196171, 1197793, 1199117,\n", + " 1198163, 1198167, 1196704, 1196711, 1199810, 1195270, 1195278, 1197141,\n", + " 1200755, 1196249, 1196109, 1195847, 1195850, 1198915, 1195659, 1195650,\n", + " 1202916, 1198195, 1198205, 1196122, 1202017, 1195353, 1198273, 1200949,\n", + " 1199060, 1199965, 1194928, 1199685, 1199628, 1197676, 1200116, 1200118,\n", + " 1199676, 1198765, 1198762, 1201511, 1196498, 1200670, 1197970, 1196727,\n", + " 1195773, 1202618, 1200894, 1200895, 1198811, 1200621, 1201827, 1200452,\n", + " 1200169, 1198593, 1201079, 1201156, 1201056, 1200913, 1200918, 1200363,\n", + " 1195815, 1202046, 1200546, 1200555, 1197097, 1199879, 1202138, 1199908,\n", + " 1201027, 1202239, 1199482, 1197546, 1201291, 1196966, 1200784, 1200793,\n", + " 1202685, 1202687, 1199606, 1195438, 1195679, 1195664, 1196929, 1195177,\n", + " 1197822, 1198127, 1202433, 1199659, 1203102, 1194730, 1199403, 1198147,\n", + " 1200437, 1198819, 1201886, 1200301, 1197652, 1195082, 1203162, 1197872,\n", + " 1198748], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196007, 1196011, 1198731, 1199282, 1199292, 1202255, 1198844, 1201577,\n", + " 1201582, 1194626, 1200650, 1197777, 1199248, 1201015, 1203048, 1198628,\n", + " 1198633, 1198690, 1197383, 1194770, 1194655, 1195097, 1195263, 1201992,\n", + " 1198542, 1197697, 1199519, 1195463, 1194889, 1195888, 1199171, 1196334,\n", + " 1196359, 1196618, 1197831, 1195313, 1196835, 1196171, 1197793, 1199117,\n", + " 1198163, 1198167, 1196704, 1196711, 1199810, 1195270, 1195278, 1197141,\n", + " 1200755, 1196249, 1196109, 1195847, 1195850, 1198915, 1195659, 1195650,\n", + " 1202916, 1198195, 1198205, 1196122, 1202017, 1195353, 1198273, 1200949,\n", + " 1199060, 1199965, 1194928, 1199685, 1199628, 1197676, 1200116, 1200118,\n", + " 1199676, 1198765, 1198762, 1201511, 1196498, 1200670, 1197970, 1196727,\n", + " 1195773, 1202618, 1200894, 1200895, 1198811, 1200621, 1201827, 1200452,\n", + " 1200169, 1198593, 1201079, 1201156, 1201056, 1200913, 1200918, 1200363,\n", + " 1195815, 1202046, 1200546, 1200555, 1197097, 1199879, 1202138, 1199908,\n", + " 1201027, 1202239, 1199482, 1197546, 1201291, 1196966, 1200784, 1200793,\n", + " 1202685, 1202687, 1199606, 1195438, 1195679, 1195664, 1196929, 1195177,\n", + " 1197822, 1198127, 1202433, 1199659, 1203102, 1194730, 1199403, 1198147,\n", + " 1200437, 1198819, 1201886, 1200301, 1197652, 1195082, 1203162, 1197872,\n", + " 1198748], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 3.3645e-02, 7.5220e-03, 2.7641e-01, ..., 2.2626e-02,\n", + " -2.0232e-05, -2.7527e-03],\n", + " [ 4.3025e-03, -5.7827e-04, 3.1533e-01, ..., 1.9469e-02,\n", + " -2.9368e-04, -2.2535e-03],\n", + " [ 9.8316e-03, -1.2329e-04, 2.8617e-01, ..., 4.4017e-02,\n", + " -7.9027e-04, -3.1791e-03],\n", + " ...,\n", + " [ 4.3309e-02, -1.0923e-03, 3.5795e-01, ..., -2.7635e-04,\n", + " -2.1757e-04, -3.0707e-03],\n", + " [ 6.0949e-02, -7.1309e-04, 3.2420e-01, ..., -2.0169e-04,\n", + " -1.6517e-04, -2.7802e-03],\n", + " [ 5.7141e-02, 1.9173e-02, 2.7510e-01, ..., -4.6545e-05,\n", + " 4.5796e-03, -2.6828e-03]], device='cuda:0'), 'paper': tensor([[ 3.8683, -0.0624, 2.0550, ..., -0.0207, -0.0178, 3.3612],\n", + " [ 4.0232, -0.0537, 3.6327, ..., -0.0187, -0.0281, 4.2506],\n", + " [ 2.6566, -0.0334, 2.0936, ..., -0.0107, -0.0137, 2.4968],\n", + " ...,\n", + " [ 2.6392, -0.0366, 2.3550, ..., -0.0120, -0.0149, 2.4996],\n", + " [ 3.8252, -0.0515, 3.3045, ..., -0.0194, -0.0284, 4.2077],\n", + " [ 2.4536, -0.0365, 2.6319, ..., -0.0082, -0.0158, 3.0685]],\n", + " device='cuda:0'), 'author': tensor([[ 4.6289e-01, -3.2173e-03, 6.2695e-02, ..., -1.3993e-03,\n", + " -1.6679e-03, 1.7603e-02],\n", + " [ 5.4192e-01, -5.0866e-03, -1.8860e-04, ..., -2.3448e-03,\n", + " 5.4560e-02, 1.6000e-01],\n", + " [ 4.6430e-01, -4.0082e-03, -4.4303e-04, ..., -1.7690e-03,\n", + " -1.9022e-04, 1.3828e-01],\n", + " ...,\n", + " [ 4.9768e-01, -3.4308e-03, 5.4789e-03, ..., -1.9461e-03,\n", + " -2.5092e-04, 8.9439e-02],\n", + " [-3.9500e-04, -3.7329e-04, 1.4553e-01, ..., 9.1423e-02,\n", + " -2.6445e-04, -9.5572e-04],\n", + " [ 5.3041e-01, -5.4203e-03, -5.9159e-05, ..., -2.6161e-03,\n", + " 6.6782e-02, 1.7986e-01]], device='cuda:0'), 'field_of_study': tensor([[-9.6562e-03, 1.4950e-01, -2.8582e-03, ..., 8.2047e-01,\n", + " -1.1793e-03, -5.5273e-03],\n", + " [-9.2996e-03, 1.5932e-01, -4.1417e-03, ..., 1.0995e+00,\n", + " -1.7679e-03, -6.2581e-03],\n", + " [-1.1770e-02, 4.0785e-01, -3.5028e-03, ..., 1.4419e+00,\n", + " -2.6472e-03, -5.6451e-03],\n", + " ...,\n", + " [-8.4236e-03, 1.7897e-01, -3.2937e-03, ..., 1.0512e+00,\n", + " -3.4344e-03, -6.7070e-03],\n", + " [-8.9395e-03, 2.1388e-01, -3.9622e-03, ..., 1.1690e+00,\n", + " -2.8470e-03, -8.1924e-03],\n", + " [-1.2310e-02, 4.5425e-01, -4.4314e-03, ..., 1.4772e+00,\n", + " -2.4391e-03, -1.0109e-02]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 88, 7, 184, 184, 109, 63, 33, 108, 51, 129, 129, 490,\n", + " 335, 524, 313, 313, 239, 239, 418, 528, 723, 605, 605, 489,\n", + " 528, 532, 723, 723, 723, 1133, 853, 869, 1009, 1009, 1126, 1126,\n", + " 813, 813, 1003, 1155, 907, 907, 907, 1346, 1036, 1148, 1263, 1583,\n", + " 1510, 1510, 1507, 1272, 1272, 1354, 1354, 1499, 1586, 1778, 1420, 1420,\n", + " 1495, 1598, 1598, 1419, 1419, 1419, 1727, 1676, 1676, 1676, 1676, 1677,\n", + " 1680, 1827, 1796, 1904, 1904, 1946, 1869, 1871, 2255, 2237, 1978, 2319,\n", + " 2193, 2250, 2162, 2170, 2178, 2312, 2248, 2381, 2538, 2667, 2667, 2612,\n", + " 2662, 2603, 2628, 2628, 2652, 2620, 2754, 2754, 2649, 2806, 2806, 2712,\n", + " 2712, 2978, 2711, 2883, 2883, 2872, 2654, 2654, 2941, 3021, 3556, 3497,\n", + " 3556, 3556, 3556, 3556, 3553, 3432, 3507, 3448, 3661, 3717, 3946, 3863,\n", + " 3863, 3901, 3960, 3991, 4071, 4083, 4114, 4059, 4059, 4283, 4283, 4222,\n", + " 4222, 4222, 4512, 4540, 4639, 4681, 4680, 4527, 4730, 4730, 4731, 4854,\n", + " 5041, 5041, 5089, 5089, 5228, 5228, 5346, 5235, 5235, 5296, 5234, 5234,\n", + " 5235, 5497, 5240, 5240, 5240, 5235, 5235, 5459, 5752, 5363, 5655, 5366,\n", + " 5769, 5769, 5526, 5552, 5680, 5481, 5726, 5600, 5606, 5606, 5739, 5739,\n", + " 5739, 5739, 5739, 5711, 5560, 5633, 5778, 5778, 5691, 5780, 5754, 5810,\n", + " 5737, 5737, 5918, 5918, 5937, 5951, 5951],\n", + " [ 112, 77, 103, 75, 31, 21, 106, 19, 37, 76, 107, 65,\n", + " 2, 73, 74, 58, 105, 104, 1, 103, 14, 102, 86, 114,\n", + " 25, 72, 127, 84, 136, 4, 23, 85, 111, 124, 24, 13,\n", + " 17, 83, 29, 97, 19, 98, 105, 133, 118, 81, 119, 126,\n", + " 88, 17, 15, 6, 31, 64, 11, 79, 22, 68, 122, 102,\n", + " 99, 9, 49, 9, 103, 101, 43, 44, 62, 57, 39, 71,\n", + " 119, 125, 59, 124, 132, 76, 107, 102, 81, 121, 55, 80,\n", + " 40, 66, 83, 119, 37, 72, 103, 21, 18, 3, 42, 105,\n", + " 71, 119, 72, 59, 93, 3, 94, 22, 78, 68, 32, 95,\n", + " 45, 19, 28, 55, 65, 115, 100, 67, 105, 55, 61, 129,\n", + " 41, 94, 116, 69, 27, 22, 119, 56, 105, 72, 71, 53,\n", + " 22, 22, 19, 17, 63, 19, 130, 118, 30, 30, 118, 131,\n", + " 7, 70, 35, 5, 102, 96, 128, 19, 40, 16, 123, 8,\n", + " 0, 56, 82, 79, 79, 92, 48, 110, 90, 54, 3, 131,\n", + " 51, 79, 60, 122, 102, 38, 103, 26, 109, 79, 33, 34,\n", + " 20, 79, 134, 41, 117, 108, 81, 114, 79, 116, 89, 36,\n", + " 91, 10, 113, 87, 52, 12, 79, 135, 47, 66, 135, 79,\n", + " 79, 117, 50, 79, 120, 79, 46]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[4029, 898, 7431, ..., 1210, 804, 4733],\n", + " [ 326, 68, 11, ..., 8118, 8074, 8021]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 17, 125, 17, ..., 123, 31, 13],\n", + " [ 157, 60, 148, ..., 5958, 5922, 5988]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 109, 109, 109, ..., 8063, 8063, 8063],\n", + " [ 117, 920, 374, ..., 670, 1003, 951]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 692, 699, 1069, ..., 438, 640, 231],\n", + " [ 309, 334, 122, ..., 8178, 8149, 8076]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1832, 2283, 3052, ..., 3670, 6896, 7629],\n", + " [ 55, 159, 159, ..., 5891, 5987, 5919]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 109, 109, 109, ..., 8098, 8098, 8098],\n", + " [3460, 3598, 4136, ..., 7628, 3863, 6529]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 109, 109, 109, ..., 5937, 5937, 5937],\n", + " [1349, 3051, 5660, ..., 3942, 1042, 1898]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005758\n", + "sampling 0.005604\n", + "noi time: 0.00118\n", + "get_vertex_data call: 0.028156\n", + "noi group time: 0.002205\n", + "eoi_group_time: 0.013704\n", + "second half: 0.200731\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31149, 32616, 20109, ..., 1123988, 1100728, 1100733],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31149, 32616, 20109, ..., 1123988, 1100728, 1100733],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1232973, 1214756, 1232754, ..., 1939381, 1921018, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1232973, 1214756, 1232754, ..., 1939381, 1921018, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1137426, 1141424, ..., 1167459, 1189800, 1186149],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1137426, 1141424, ..., 1167459, 1189800, 1186149],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199428, 1196800, 1198731, 1199835, 1201097, 1199282, 1198459, 1202255,\n", + " 1201582, 1197777, 1199248, 1203048, 1198696, 1198557, 1198180, 1197158,\n", + " 1195263, 1201992, 1198095, 1195475, 1197760, 1195895, 1194976, 1196521,\n", + " 1194752, 1195313, 1195325, 1195982, 1198958, 1198643, 1198167, 1196704,\n", + " 1195221, 1195225, 1195216, 1195265, 1195270, 1195278, 1197140, 1196255,\n", + " 1197273, 1196109, 1195841, 1195541, 1195631, 1199699, 1199710, 1197409,\n", + " 1196393, 1196283, 1196286, 1199628, 1199803, 1197676, 1198400, 1198406,\n", + " 1200750, 1201916, 1195017, 1199021, 1197970, 1196727, 1195773, 1202623,\n", + " 1199903, 1198811, 1200503, 1200507, 1198075, 1198066, 1198593, 1199445,\n", + " 1201421, 1201056, 1199761, 1194803, 1202529, 1201851, 1199886, 1200690,\n", + " 1199917, 1201442, 1201024, 1201029, 1202239, 1202175, 1201291, 1195610,\n", + " 1196761, 1199925, 1196966, 1196971, 1195664, 1200445, 1198937, 1200277,\n", + " 1201318, 1201321, 1197816, 1197822, 1196597, 1196600, 1198973, 1198587,\n", + " 1200585, 1198299, 1199660, 1203102, 1198147, 1198148, 1198824, 1199782,\n", + " 1198819, 1200465, 1195063, 1201886, 1197652, 1197655, 1201966],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199428, 1196800, 1198731, 1199835, 1201097, 1199282, 1198459, 1202255,\n", + " 1201582, 1197777, 1199248, 1203048, 1198696, 1198557, 1198180, 1197158,\n", + " 1195263, 1201992, 1198095, 1195475, 1197760, 1195895, 1194976, 1196521,\n", + " 1194752, 1195313, 1195325, 1195982, 1198958, 1198643, 1198167, 1196704,\n", + " 1195221, 1195225, 1195216, 1195265, 1195270, 1195278, 1197140, 1196255,\n", + " 1197273, 1196109, 1195841, 1195541, 1195631, 1199699, 1199710, 1197409,\n", + " 1196393, 1196283, 1196286, 1199628, 1199803, 1197676, 1198400, 1198406,\n", + " 1200750, 1201916, 1195017, 1199021, 1197970, 1196727, 1195773, 1202623,\n", + " 1199903, 1198811, 1200503, 1200507, 1198075, 1198066, 1198593, 1199445,\n", + " 1201421, 1201056, 1199761, 1194803, 1202529, 1201851, 1199886, 1200690,\n", + " 1199917, 1201442, 1201024, 1201029, 1202239, 1202175, 1201291, 1195610,\n", + " 1196761, 1199925, 1196966, 1196971, 1195664, 1200445, 1198937, 1200277,\n", + " 1201318, 1201321, 1197816, 1197822, 1196597, 1196600, 1198973, 1198587,\n", + " 1200585, 1198299, 1199660, 1203102, 1198147, 1198148, 1198824, 1199782,\n", + " 1198819, 1200465, 1195063, 1201886, 1197652, 1197655, 1201966],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 2.2595e-02, -8.9115e-05, 2.7348e-01, ..., 1.3970e-02,\n", + " -8.8858e-05, -2.6376e-03],\n", + " [ 3.4933e-02, -2.7721e-04, 2.9125e-01, ..., 4.6623e-03,\n", + " -1.8289e-04, -2.7561e-03],\n", + " [ 5.2925e-02, -1.0501e-03, 3.7423e-01, ..., -2.3390e-04,\n", + " -1.8492e-04, -3.0481e-03],\n", + " ...,\n", + " [ 8.5104e-03, -3.1097e-04, 3.0241e-01, ..., 2.5190e-02,\n", + " -5.5749e-04, -2.6244e-03],\n", + " [ 4.2583e-02, 2.3968e-02, 2.5961e-01, ..., -8.6307e-05,\n", + " -3.6770e-04, -2.4808e-03],\n", + " [ 4.0925e-02, -3.1793e-04, 2.5607e-01, ..., 7.5521e-03,\n", + " -3.9510e-04, -2.6816e-03]], device='cuda:0'), 'paper': tensor([[ 4.7961, -0.0664, 4.6448, ..., -0.0231, -0.0349, 4.1980],\n", + " [ 3.6133, -0.0561, 2.0663, ..., -0.0164, -0.0165, 3.0444],\n", + " [ 3.6128, -0.0573, 1.9378, ..., -0.0206, -0.0159, 3.0363],\n", + " ...,\n", + " [ 2.2440, -0.0282, 1.9863, ..., -0.0105, -0.0152, 2.1668],\n", + " [ 3.8210, -0.0596, 2.1137, ..., -0.0209, -0.0190, 3.0412],\n", + " [ 2.4541, -0.0365, 2.6362, ..., -0.0085, -0.0157, 3.0635]],\n", + " device='cuda:0'), 'author': tensor([[ 3.7552e-01, -2.8739e-03, -2.7927e-04, ..., -1.6940e-03,\n", + " -1.4958e-03, 1.1806e-01],\n", + " [ 5.0849e-01, -5.4312e-03, -7.1641e-04, ..., -1.9699e-03,\n", + " 2.2539e-02, 2.1800e-01],\n", + " [ 4.5330e-01, -5.2273e-03, 7.8447e-02, ..., -2.9514e-03,\n", + " -9.8594e-04, 8.5724e-02],\n", + " ...,\n", + " [ 5.7912e-01, -3.4694e-03, 3.8524e-02, ..., -1.8656e-03,\n", + " -9.5542e-04, 1.2212e-01],\n", + " [ 5.3971e-01, -5.9359e-03, -7.3679e-05, ..., -2.8729e-03,\n", + " 8.9588e-02, 2.3319e-01],\n", + " [ 3.7595e-01, -2.9662e-03, -4.3737e-04, ..., -1.6611e-03,\n", + " 2.6175e-04, 1.4021e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0087, 0.1524, -0.0038, ..., 0.9405, -0.0031, -0.0059],\n", + " [-0.0084, 0.1698, -0.0031, ..., 0.9993, -0.0023, -0.0045],\n", + " [-0.0112, 0.2053, -0.0039, ..., 1.1756, -0.0021, -0.0067],\n", + " ...,\n", + " [-0.0080, 0.2395, -0.0035, ..., 1.1265, -0.0026, -0.0068],\n", + " [-0.0102, 0.3543, -0.0028, ..., 1.2326, -0.0024, -0.0088],\n", + " [-0.0086, 0.2233, -0.0036, ..., 1.1605, -0.0031, -0.0073]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 96, 2, 189, 68, 64, 64, 260, 830, 830, 779, 663, 721,\n", + " 568, 812, 812, 683, 547, 487, 487, 1172, 854, 838, 838, 1130,\n", + " 860, 817, 920, 958, 958, 783, 783, 783, 783, 1079, 1079, 1192,\n", + " 1335, 1335, 1335, 1152, 1152, 1143, 1143, 1143, 1143, 999, 1149, 1580,\n", + " 1456, 1456, 1456, 1619, 1802, 1642, 1676, 1743, 1570, 1544, 1711, 1723,\n", + " 1727, 1810, 1868, 1868, 1993, 1956, 1956, 1899, 1854, 1978, 2001, 1992,\n", + " 2132, 1999, 1999, 2001, 2001, 2011, 2193, 2212, 2192, 2192, 2042, 2042,\n", + " 2161, 2209, 2249, 2249, 2249, 2239, 2301, 2301, 2301, 2550, 2490, 2584,\n", + " 2644, 2669, 2641, 2802, 2884, 2884, 2539, 2719, 3087, 3087, 3015, 3368,\n", + " 3205, 3312, 3435, 3250, 3314, 3314, 3639, 3425, 3425, 3746, 3711, 3791,\n", + " 3806, 3881, 3849, 3849, 3951, 4011, 4015, 4042, 4263, 4449, 4449, 4256,\n", + " 4311, 4311, 4313, 4292, 4421, 4425, 4425, 4495, 4309, 4487, 4345, 4534,\n", + " 4609, 4609, 4535, 4546, 4697, 4639, 4885, 4847, 4847, 4871, 4829, 4829,\n", + " 4801, 4911, 4911, 5097, 5097, 5097, 5097, 5097, 5182, 5101, 5322, 5322,\n", + " 5394, 5594, 5543, 5524, 5524],\n", + " [ 61, 70, 115, 25, 94, 12, 61, 55, 107, 97, 18, 30,\n", + " 110, 9, 14, 67, 72, 59, 105, 67, 89, 45, 46, 81,\n", + " 78, 51, 7, 12, 94, 102, 71, 106, 21, 87, 89, 68,\n", + " 98, 113, 17, 48, 39, 74, 56, 17, 113, 67, 77, 64,\n", + " 79, 63, 28, 95, 0, 118, 94, 50, 111, 17, 37, 112,\n", + " 2, 92, 1, 30, 77, 35, 8, 88, 32, 22, 73, 6,\n", + " 52, 30, 76, 116, 36, 31, 70, 70, 91, 19, 96, 103,\n", + " 108, 77, 12, 94, 57, 23, 17, 33, 98, 50, 53, 22,\n", + " 90, 23, 43, 62, 67, 109, 90, 60, 108, 29, 82, 49,\n", + " 40, 20, 85, 80, 86, 85, 58, 24, 47, 84, 17, 22,\n", + " 111, 112, 90, 3, 7, 100, 10, 15, 83, 44, 42, 75,\n", + " 37, 87, 26, 34, 40, 16, 13, 100, 104, 41, 11, 93,\n", + " 117, 78, 5, 17, 97, 4, 54, 41, 70, 69, 118, 52,\n", + " 65, 51, 61, 38, 27, 101, 114, 66, 61, 17, 65, 99,\n", + " 8, 60, 110, 61, 8]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3160, 4367, 4004, ..., 509, 4243, 7422],\n", + " [ 297, 275, 17, ..., 7775, 7856, 7839]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 67, 77, 93, ..., 67, 39, 105],\n", + " [ 179, 23, 78, ..., 5436, 5612, 5598]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 28, 28, 28, ..., 7890, 7890, 7890],\n", + " [ 590, 236, 372, ..., 668, 281, 572]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 459, 973, 380, ..., 986, 688, 894],\n", + " [ 315, 109, 81, ..., 7830, 7905, 7850]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4311, 6146, 1924, ..., 4997, 4367, 7709],\n", + " [ 39, 14, 39, ..., 5586, 5620, 5579]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 28, 28, 28, ..., 7890, 7890, 7759],\n", + " [1889, 2133, 2553, ..., 2978, 4036, 3705]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 39, 39, 39, ..., 5541, 5541, 5541],\n", + " [3994, 4354, 4311, ..., 6148, 6764, 6643]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.003722\n", + "sampling 0.003643\n", + "noi time: 0.000713\n", + "get_vertex_data call: 0.015\n", + "noi group time: 0.001848\n", + "eoi_group_time: 0.010963\n", + "second half: 0.114503\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 32616, 17409, 10192, ..., 1124612, 1108464, 1133328],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 32616, 17409, 10192, ..., 1124612, 1108464, 1133328],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227492, 1224370, 1203800, ..., 1921023, 1939424, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227492, 1224370, 1203800, ..., 1921023, 1939424, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137426, 1137429, 1137212, ..., 1163071, 1157017, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137426, 1137429, 1137212, ..., 1163071, 1157017, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195452, 1197841, 1198769, 1196800, 1197719, 1198721, 1199282, 1198449,\n", + " 1198844, 1201581, 1201582, 1198023, 1194635, 1199248, 1198624, 1198694,\n", + " 1196956, 1202804, 1198557, 1194866, 1194770, 1195494, 1196631, 1195511,\n", + " 1195263, 1201926, 1201992, 1196031, 1198093, 1195469, 1196517, 1195313,\n", + " 1198649, 1196711, 1195223, 1196214, 1195265, 1195278, 1197141, 1197265,\n", + " 1197273, 1196109, 1195847, 1199699, 1199330, 1199333, 1200949, 1199856,\n", + " 1199060, 1199185, 1194928, 1199628, 1197676, 1199156, 1199038, 1198404,\n", + " 1199579, 1199676, 1194786, 1199843, 1201513, 1199021, 1201116, 1196727,\n", + " 1203238, 1203239, 1198428, 1202997, 1200155, 1199410, 1198811, 1199552,\n", + " 1201547, 1202630, 1200991, 1201056, 1200913, 1200918, 1194803, 1200515,\n", + " 1200526, 1200546, 1200553, 1200310, 1200315, 1200428, 1197095, 1202138,\n", + " 1199908, 1196768, 1201029, 1202239, 1202175, 1195876, 1201291, 1198472,\n", + " 1198478, 1203254, 1202209, 1196963, 1200785, 1195676, 1195679, 1196929,\n", + " 1197821, 1196414, 1195074, 1196605, 1199661, 1201143, 1197735, 1199234,\n", + " 1200465, 1200301, 1200707, 1201365, 1197026, 1198748], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195452, 1197841, 1198769, 1196800, 1197719, 1198721, 1199282, 1198449,\n", + " 1198844, 1201581, 1201582, 1198023, 1194635, 1199248, 1198624, 1198694,\n", + " 1196956, 1202804, 1198557, 1194866, 1194770, 1195494, 1196631, 1195511,\n", + " 1195263, 1201926, 1201992, 1196031, 1198093, 1195469, 1196517, 1195313,\n", + " 1198649, 1196711, 1195223, 1196214, 1195265, 1195278, 1197141, 1197265,\n", + " 1197273, 1196109, 1195847, 1199699, 1199330, 1199333, 1200949, 1199856,\n", + " 1199060, 1199185, 1194928, 1199628, 1197676, 1199156, 1199038, 1198404,\n", + " 1199579, 1199676, 1194786, 1199843, 1201513, 1199021, 1201116, 1196727,\n", + " 1203238, 1203239, 1198428, 1202997, 1200155, 1199410, 1198811, 1199552,\n", + " 1201547, 1202630, 1200991, 1201056, 1200913, 1200918, 1194803, 1200515,\n", + " 1200526, 1200546, 1200553, 1200310, 1200315, 1200428, 1197095, 1202138,\n", + " 1199908, 1196768, 1201029, 1202239, 1202175, 1195876, 1201291, 1198472,\n", + " 1198478, 1203254, 1202209, 1196963, 1200785, 1195676, 1195679, 1196929,\n", + " 1197821, 1196414, 1195074, 1196605, 1199661, 1201143, 1197735, 1199234,\n", + " 1200465, 1200301, 1200707, 1201365, 1197026, 1198748], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 3.9377e-02, 4.8396e-04, 2.6777e-01, ..., 1.3896e-02,\n", + " -3.0094e-04, -2.7379e-03],\n", + " [ 2.0431e-02, -4.6591e-04, 2.8839e-01, ..., 6.9275e-03,\n", + " -3.6144e-04, -2.8153e-03],\n", + " [ 4.2797e-02, -1.1040e-03, 3.9729e-01, ..., -2.9840e-04,\n", + " 7.6429e-03, -3.1636e-03],\n", + " ...,\n", + " [ 1.9889e-02, -2.7925e-04, 2.7963e-01, ..., 4.6985e-03,\n", + " -2.9392e-04, -2.7111e-03],\n", + " [ 1.9446e-02, -1.2376e-04, 2.7548e-01, ..., 1.2847e-02,\n", + " -4.4332e-04, -2.9755e-03],\n", + " [ 4.1875e-02, 1.9836e-02, 2.3974e-01, ..., 2.1620e-02,\n", + " -2.0683e-04, -2.3214e-03]], device='cuda:0'), 'paper': tensor([[ 2.7021, -0.0368, 2.1035, ..., -0.0120, -0.0156, 2.8200],\n", + " [ 2.5914, -0.0368, 2.6303, ..., -0.0105, -0.0165, 2.9189],\n", + " [ 2.3559, -0.0329, 2.3759, ..., -0.0085, -0.0164, 3.0453],\n", + " ...,\n", + " [ 2.4520, -0.0352, 2.1300, ..., -0.0121, -0.0154, 2.4287],\n", + " [ 3.3589, -0.0573, 1.6791, ..., -0.0196, -0.0150, 2.8820],\n", + " [ 2.4460, -0.0365, 2.6181, ..., -0.0082, -0.0157, 3.0485]],\n", + " device='cuda:0'), 'author': tensor([[ 4.7158e-01, -5.0114e-03, -4.6600e-04, ..., -1.9569e-03,\n", + " -3.6439e-04, 1.9215e-01],\n", + " [ 4.3293e-01, -5.9534e-03, 1.1386e-01, ..., -3.5794e-03,\n", + " -5.0980e-05, 3.0579e-02],\n", + " [-3.9500e-04, -3.7329e-04, 1.4553e-01, ..., 9.1423e-02,\n", + " -2.6445e-04, -9.5572e-04],\n", + " ...,\n", + " [ 5.8400e-01, -5.7329e-03, -1.2050e-04, ..., -3.0577e-03,\n", + " 8.0406e-02, 1.7694e-01],\n", + " [ 5.7508e-01, -5.3318e-03, -2.8572e-04, ..., -2.5861e-03,\n", + " 4.5117e-02, 1.9054e-01],\n", + " [ 4.1371e-01, -2.3284e-03, 2.7274e-02, ..., -1.1772e-03,\n", + " -2.1403e-03, -6.9011e-04]], device='cuda:0'), 'field_of_study': tensor([[-1.1117e-02, 2.2009e-01, -3.0832e-03, ..., 1.0504e+00,\n", + " -2.0501e-03, -5.8040e-03],\n", + " [-8.3757e-03, -1.9204e-04, -2.9427e-03, ..., 7.9950e-01,\n", + " -2.9552e-03, -3.6497e-03],\n", + " [-1.0681e-02, 1.4866e-01, -3.3812e-03, ..., 8.8386e-01,\n", + " -2.0050e-03, -4.8748e-03],\n", + " ...,\n", + " [-9.4776e-03, 4.3091e-01, -2.6511e-03, ..., 1.2644e+00,\n", + " -1.9547e-03, -7.4560e-03],\n", + " [-1.0753e-02, 1.7681e-01, -3.4363e-03, ..., 1.1414e+00,\n", + " -2.7710e-03, -7.4211e-03],\n", + " [-1.2022e-02, 3.9670e-01, -4.7081e-03, ..., 1.5831e+00,\n", + " -3.0113e-03, -1.0199e-02]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 21, 167, 60, 41, 107, 107, 169, 157, 84, 214, 235, 212,\n", + " 212, 212, 666, 381, 708, 881, 563, 648, 725, 774, 880, 880,\n", + " 880, 827, 961, 1110, 1110, 980, 958, 1044, 1154, 1142, 1256, 1256,\n", + " 1184, 1182, 1182, 1182, 1182, 1278, 1278, 1226, 1226, 1203, 1286, 1286,\n", + " 1054, 1190, 1327, 1411, 1479, 1624, 1624, 1347, 1486, 1517, 1498, 1698,\n", + " 1496, 1586, 1586, 1512, 1495, 1512, 1512, 1648, 1648, 1543, 1725, 1754,\n", + " 1630, 1630, 1630, 1497, 1497, 1497, 1531, 1531, 1907, 1853, 1764, 1800,\n", + " 1774, 1774, 1774, 1676, 1907, 1907, 1907, 1833, 1833, 1876, 2081, 1992,\n", + " 1945, 1803, 1885, 2002, 2002, 1989, 2117, 1961, 2307, 2312, 2515, 2421,\n", + " 2408, 2596, 2440, 2468, 2596, 2596, 2605, 2701, 2566, 2566, 2697, 2613,\n", + " 2719, 2719, 2809, 2809, 2981, 2951, 2894, 2988, 2988, 3031, 2956, 3099,\n", + " 3310, 3310, 3249, 3249, 3061, 3454, 3395, 3395, 3490, 3490, 3343, 3343,\n", + " 3577, 3554, 3605, 3639, 3516, 3516, 3708, 3747, 3770, 3896, 3885, 4132,\n", + " 4217, 4110, 4110, 4110, 4373, 4225, 4299, 4299, 4432, 4530, 4530, 4342,\n", + " 4440, 4440, 4508, 4577, 4546, 4756, 4729, 4811, 4705, 4871, 4833, 4833,\n", + " 4833, 4846, 4663, 4786, 4786, 4786, 5034, 4868, 5204, 5142, 5045, 5366,\n", + " 5366, 5328, 5405, 5513, 5593, 5448, 5489],\n", + " [ 10, 82, 17, 113, 68, 26, 10, 59, 55, 73, 13, 31,\n", + " 66, 40, 71, 49, 97, 77, 80, 104, 110, 85, 112, 109,\n", + " 88, 71, 87, 19, 84, 70, 62, 32, 71, 77, 91, 28,\n", + " 85, 24, 4, 15, 22, 39, 36, 70, 56, 54, 16, 8,\n", + " 38, 91, 75, 61, 2, 25, 95, 74, 53, 90, 98, 63,\n", + " 76, 78, 89, 65, 70, 105, 86, 60, 53, 116, 90, 90,\n", + " 103, 72, 64, 69, 36, 17, 108, 53, 46, 90, 27, 71,\n", + " 8, 98, 83, 3, 12, 20, 7, 44, 111, 77, 84, 24,\n", + " 70, 98, 91, 115, 52, 63, 24, 101, 111, 68, 22, 85,\n", + " 47, 29, 66, 5, 51, 5, 100, 67, 24, 4, 99, 66,\n", + " 48, 58, 24, 0, 14, 111, 0, 41, 107, 71, 17, 0,\n", + " 20, 81, 94, 79, 63, 45, 18, 24, 6, 117, 17, 69,\n", + " 84, 102, 116, 114, 37, 93, 35, 72, 72, 22, 11, 0,\n", + " 1, 68, 26, 92, 35, 22, 26, 68, 63, 68, 26, 72,\n", + " 7, 63, 82, 96, 23, 34, 63, 63, 106, 24, 18, 24,\n", + " 72, 2, 82, 63, 7, 42, 57, 58, 33, 87, 21, 63,\n", + " 27, 114, 9, 50, 30, 26, 43]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3080, 2426, 4548, ..., 4191, 334, 7559],\n", + " [ 103, 77, 8, ..., 8044, 7990, 7867]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 98, 72, 25, ..., 63, 55, 24],\n", + " [ 9, 110, 48, ..., 5478, 5583, 5582]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 30, 30, 30, ..., 7867, 7867, 7867],\n", + " [ 888, 379, 1048, ..., 379, 812, 1049]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 379, 379, 687, ..., 379, 101, 392],\n", + " [ 399, 398, 220, ..., 7957, 8006, 7983]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 226, 4265, 808, ..., 7389, 7497, 7631],\n", + " [ 57, 136, 54, ..., 5539, 5491, 5491]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 98, 98, 31, ..., 7953, 7963, 7867],\n", + " [1171, 1841, 160, ..., 4914, 622, 2591]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 36, 167, 167, ..., 5513, 5489, 5489],\n", + " [2211, 7825, 7834, ..., 4511, 4446, 4511]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.007017\n", + "sampling 0.006845\n", + "noi time: 0.002161\n", + "get_vertex_data call: 0.027953\n", + "noi group time: 0.002904\n", + "eoi_group_time: 0.011005\n", + "second half: 0.186505\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 32616, 17409, ..., 1120069, 1120077, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 32616, 17409, ..., 1120069, 1120077, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1231429, 1217957, 1219061, ..., 1937998, 1936965, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1231429, 1217957, 1219061, ..., 1937998, 1936965, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1141424, 1136349, ..., 1157017, 1157022, 1161940],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1141424, 1136349, ..., 1157017, 1157022, 1161940],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1198770, 1199424, 1199302, 1195406, 1197719, 1199282, 1199293, 1198844,\n", + " 1201577, 1201462, 1194626, 1199250, 1197359, 1198633, 1198690, 1196956,\n", + " 1202804, 1194866, 1194743, 1198708, 1195488, 1196624, 1195511, 1195263,\n", + " 1197930, 1196534, 1201992, 1195895, 1199173, 1195738, 1196367, 1196979,\n", + " 1196615, 1197831, 1195121, 1195571, 1198163, 1196711, 1195221, 1195270,\n", + " 1197136, 1196245, 1197367, 1196109, 1198219, 1195659, 1196316, 1199984,\n", + " 1197255, 1200037, 1196283, 1195351, 1199060, 1195119, 1199628, 1197676,\n", + " 1199152, 1201513, 1196498, 1196727, 1195771, 1200892, 1198416, 1198428,\n", + " 1199410, 1202386, 1198811, 1199552, 1201543, 1199445, 1201421, 1201156,\n", + " 1202640, 1201043, 1200363, 1201739, 1200526, 1200263, 1200546, 1203071,\n", + " 1199208, 1202138, 1197050, 1196883, 1196778, 1201442, 1201029, 1199976,\n", + " 1195876, 1200181, 1200185, 1201291, 1201871, 1203329, 1202209, 1201796,\n", + " 1195043, 1202258, 1195666, 1195664, 1200445, 1200382, 1198932, 1195415,\n", + " 1197816, 1201499, 1199659, 1201138, 1194733, 1198148, 1199395, 1197731,\n", + " 1200014, 1198819, 1201886, 1200296, 1200302, 1197652, 1195078, 1197883],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1198770, 1199424, 1199302, 1195406, 1197719, 1199282, 1199293, 1198844,\n", + " 1201577, 1201462, 1194626, 1199250, 1197359, 1198633, 1198690, 1196956,\n", + " 1202804, 1194866, 1194743, 1198708, 1195488, 1196624, 1195511, 1195263,\n", + " 1197930, 1196534, 1201992, 1195895, 1199173, 1195738, 1196367, 1196979,\n", + " 1196615, 1197831, 1195121, 1195571, 1198163, 1196711, 1195221, 1195270,\n", + " 1197136, 1196245, 1197367, 1196109, 1198219, 1195659, 1196316, 1199984,\n", + " 1197255, 1200037, 1196283, 1195351, 1199060, 1195119, 1199628, 1197676,\n", + " 1199152, 1201513, 1196498, 1196727, 1195771, 1200892, 1198416, 1198428,\n", + " 1199410, 1202386, 1198811, 1199552, 1201543, 1199445, 1201421, 1201156,\n", + " 1202640, 1201043, 1200363, 1201739, 1200526, 1200263, 1200546, 1203071,\n", + " 1199208, 1202138, 1197050, 1196883, 1196778, 1201442, 1201029, 1199976,\n", + " 1195876, 1200181, 1200185, 1201291, 1201871, 1203329, 1202209, 1201796,\n", + " 1195043, 1202258, 1195666, 1195664, 1200445, 1200382, 1198932, 1195415,\n", + " 1197816, 1201499, 1199659, 1201138, 1194733, 1198148, 1199395, 1197731,\n", + " 1200014, 1198819, 1201886, 1200296, 1200302, 1197652, 1195078, 1197883],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.7641e-02, -2.8245e-04, 2.7550e-01, ..., 1.5387e-02,\n", + " -4.8576e-04, -2.7226e-03],\n", + " [ 2.7910e-02, -1.7870e-04, 2.1479e-01, ..., 5.3191e-03,\n", + " -4.9516e-04, -2.3667e-03],\n", + " [ 2.2358e-02, 5.7358e-03, 2.4046e-01, ..., -4.4029e-05,\n", + " -5.4465e-04, -2.3771e-03],\n", + " ...,\n", + " [ 2.8729e-02, -3.9117e-04, 2.8811e-01, ..., -3.3252e-05,\n", + " -3.5434e-04, -2.7466e-03],\n", + " [ 1.3828e-02, 6.7676e-03, 2.4690e-01, ..., 2.1792e-02,\n", + " -7.0565e-04, -2.9247e-03],\n", + " [ 5.0861e-03, -2.1133e-04, 2.6844e-01, ..., 4.3841e-02,\n", + " -5.1639e-04, -2.5439e-03]], device='cuda:0'), 'paper': tensor([[ 4.1736, -0.0532, 3.7090, ..., -0.0181, -0.0313, 4.2893],\n", + " [ 4.4681, -0.0697, 2.9422, ..., -0.0236, -0.0264, 4.0423],\n", + " [ 2.4915, -0.0325, 1.8837, ..., -0.0100, -0.0138, 2.3747],\n", + " ...,\n", + " [ 2.6226, -0.0342, 2.0705, ..., -0.0106, -0.0158, 2.8544],\n", + " [ 2.3403, -0.0326, 1.9853, ..., -0.0089, -0.0147, 2.6807],\n", + " [ 2.4538, -0.0364, 2.6141, ..., -0.0082, -0.0156, 3.0420]],\n", + " device='cuda:0'), 'author': tensor([[ 5.4803e-01, -5.9009e-03, -8.5127e-05, ..., -2.9112e-03,\n", + " 5.3734e-02, 2.0646e-01],\n", + " [ 4.9135e-01, -4.6981e-03, -5.2908e-04, ..., -2.1570e-03,\n", + " 2.0833e-02, 1.6998e-01],\n", + " [ 4.5221e-01, -5.7487e-03, -6.6465e-04, ..., -2.2145e-03,\n", + " 1.3270e-01, 2.5220e-01],\n", + " ...,\n", + " [ 5.5997e-01, -5.0930e-03, -4.0275e-04, ..., -2.4025e-03,\n", + " 6.2478e-02, 1.8923e-01],\n", + " [ 5.5617e-01, -6.7261e-03, -2.6059e-04, ..., -2.5782e-03,\n", + " 1.1541e-01, 2.6652e-01],\n", + " [ 5.3280e-01, -5.1873e-03, -3.1872e-04, ..., -2.3130e-03,\n", + " 7.4489e-02, 1.6771e-01]], device='cuda:0'), 'field_of_study': tensor([[-1.1482e-02, 2.0711e-01, -3.5147e-03, ..., 1.2221e+00,\n", + " -2.3541e-03, -6.3145e-03],\n", + " [-1.1026e-02, 1.9184e-01, -3.7502e-03, ..., 1.1774e+00,\n", + " -2.0205e-03, -7.0497e-03],\n", + " [-9.2898e-03, 1.7495e-01, -3.2951e-03, ..., 9.7196e-01,\n", + " -1.8542e-03, -4.2165e-03],\n", + " ...,\n", + " [-1.1633e-02, 1.6647e-01, -4.2231e-03, ..., 1.2233e+00,\n", + " -2.5991e-03, -7.4681e-03],\n", + " [-8.3708e-03, 1.6243e-01, -3.3885e-03, ..., 1.0859e+00,\n", + " -2.8742e-03, -6.6981e-03],\n", + " [-1.1506e-02, 4.1381e-01, -4.5384e-03, ..., 1.4284e+00,\n", + " -1.2880e-03, -7.1106e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 166, 107, 107, 158, 75, 32, 81, 81, 81, 323, 449, 280,\n", + " 260, 260, 805, 438, 611, 605, 605, 605, 605, 734, 734, 768,\n", + " 983, 724, 1165, 1357, 908, 908, 797, 797, 797, 920, 920, 1045,\n", + " 839, 1209, 1209, 1063, 1063, 1229, 1226, 1226, 1308, 1345, 1148, 1148,\n", + " 1308, 1537, 1433, 1433, 1507, 1507, 1445, 1445, 1445, 1550, 1480, 1445,\n", + " 1652, 1506, 1454, 1454, 1698, 1395, 1395, 1610, 1610, 1874, 1874, 1853,\n", + " 1768, 1678, 1658, 2011, 1894, 1894, 1712, 1838, 1838, 1838, 1937, 1937,\n", + " 2120, 2206, 2206, 2034, 2034, 2059, 2059, 2059, 2059, 2057, 2040, 2060,\n", + " 2060, 2092, 2092, 2290, 2423, 2462, 2590, 2439, 2680, 2680, 2639, 2701,\n", + " 2588, 2723, 2835, 2835, 2835, 2879, 3085, 2914, 3074, 3062, 2990, 3207,\n", + " 3210, 3411, 3227, 3227, 3392, 3320, 3320, 3320, 3413, 3739, 3696, 3745,\n", + " 3745, 3745, 3815, 3676, 3676, 3676, 3750, 3750, 3668, 3873, 3971, 3860,\n", + " 3987, 3987, 4001, 4001, 4048, 4088, 4104, 4168, 4150, 4059, 4282, 4282,\n", + " 4564, 4351, 4476, 4476, 4546, 4616, 4675, 4798, 4751, 4977, 4977, 4977,\n", + " 4977, 4790, 4932, 4664, 4946, 4946, 4930, 4930, 4930, 5124, 5088, 5140,\n", + " 5140, 5402, 5508, 5627, 5792, 5951, 5918, 5795],\n", + " [ 26, 18, 60, 96, 111, 70, 19, 103, 0, 5, 24, 85,\n", + " 35, 26, 56, 67, 5, 26, 35, 3, 46, 26, 53, 5,\n", + " 77, 114, 111, 118, 29, 80, 109, 5, 92, 64, 49, 69,\n", + " 112, 39, 50, 68, 73, 4, 100, 13, 93, 86, 95, 0,\n", + " 63, 81, 119, 28, 11, 108, 33, 106, 113, 29, 9, 27,\n", + " 23, 28, 48, 36, 87, 6, 82, 44, 58, 37, 81, 81,\n", + " 84, 76, 5, 76, 97, 86, 23, 2, 42, 107, 29, 75,\n", + " 89, 35, 26, 38, 116, 74, 10, 104, 4, 68, 24, 4,\n", + " 110, 90, 98, 41, 25, 101, 30, 51, 23, 1, 52, 16,\n", + " 96, 38, 22, 81, 71, 70, 12, 40, 109, 84, 17, 21,\n", + " 86, 89, 48, 117, 31, 32, 13, 89, 47, 8, 63, 99,\n", + " 7, 102, 117, 15, 62, 61, 115, 105, 55, 20, 24, 23,\n", + " 34, 23, 65, 56, 86, 23, 23, 88, 4, 23, 91, 104,\n", + " 48, 6, 14, 2, 57, 114, 5, 6, 91, 66, 78, 12,\n", + " 62, 79, 72, 38, 59, 54, 5, 92, 109, 2, 59, 45,\n", + " 83, 14, 92, 43, 23, 94, 8, 59]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2458, 2524, 1373, ..., 155, 1992, 3489],\n", + " [ 312, 369, 313, ..., 7837, 7811, 7864]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 50, 108, 88, ..., 26, 34, 71],\n", + " [ 7, 191, 53, ..., 5961, 5953, 6010]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 23, 23, 23, ..., 7864, 7864, 7864],\n", + " [ 290, 381, 367, ..., 101, 557, 706]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 367, 256, 612, ..., 18, 643, 511],\n", + " [ 265, 56, 65, ..., 7763, 7754, 7873]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2649, 223, 137, ..., 4199, 6823, 5054],\n", + " [ 127, 34, 23, ..., 6009, 5816, 5880]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 31, 31, 31, ..., 7864, 7864, 7864],\n", + " [1517, 1674, 2532, ..., 1911, 2480, 2858]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 50, 50, 50, ..., 6037, 6037, 6037],\n", + " [4400, 7687, 3664, ..., 4204, 4088, 4344]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005608\n", + "sampling 0.005456\n", + "noi time: 0.001694\n", + "get_vertex_data call: 0.026025\n", + "noi group time: 0.002212\n", + "eoi_group_time: 0.013286\n", + "second half: 0.195675\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 19148, 36074, 16818, ..., 1103850, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 19148, 36074, 16818, ..., 1103850, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1211787, 1221054, 1230244, ..., 1937141, 1938520, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1211787, 1221054, 1230244, ..., 1937141, 1938520, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1137204, 1141424, 1140284, 1140285, 1135926, 1135726, 1137791,\n", + " 1141758, 1138335, 1141250, 1136969, 1143600, 1154774, 1145993, 1146418,\n", + " 1139241, 1146641, 1146646, 1150509, 1148582, 1149216, 1142947, 1142949,\n", + " 1155683, 1143820, 1147483, 1149037, 1146656, 1146660, 1152664, 1153231,\n", + " 1137220, 1155019, 1138739, 1140953, 1135367, 1135202, 1136037, 1141036,\n", + " 1134794, 1157443, 1138504, 1157088, 1136619, 1144791, 1139215, 1156152,\n", + " 1156159, 1135582, 1135583, 1135828, 1138514, 1153094, 1137957, 1135494,\n", + " 1145132, 1156899, 1135522, 1138440, 1140079, 1138461, 1138449, 1138462,\n", + " 1157190, 1158390, 1156603, 1156605, 1156602, 1156606, 1142611, 1160819,\n", + " 1135631, 1156141, 1138185, 1145843, 1137109, 1137119, 1139667, 1139673,\n", + " 1138069, 1142243, 1136087, 1134992, 1142786, 1136554, 1158974, 1140034,\n", + " 1138151, 1146075, 1152042, 1152044, 1137741, 1135543, 1135549, 1137888,\n", + " 1141088, 1141100, 1149001, 1137299, 1162705, 1139025, 1149979, 1146847,\n", + " 1135859, 1135861, 1139436, 1139386, 1167117, 1141657, 1136917, 1137186,\n", + " 1141156, 1141159, 1152727, 1136752, 1149435, 1139799, 1139800, 1145161,\n", + " 1158749, 1139190, 1138424, 1144596, 1136867, 1136864, 1145298, 1144039,\n", + " 1140442, 1144182, 1150910, 1147153, 1141365, 1151119, 1149101, 1139019,\n", + " 1138292, 1144279, 1143915, 1139508, 1139127, 1143692, 1147050, 1145873,\n", + " 1145887, 1152976, 1139007, 1141925, 1146901, 1144242, 1141378, 1145974,\n", + " 1146024, 1146025, 1138085, 1141644, 1149928, 1139990, 1143294, 1147540,\n", + " 1148763, 1147282, 1149155, 1143663, 1142628, 1149608, 1143049, 1143052,\n", + " 1136167, 1136836, 1136845, 1141502, 1139051, 1142159, 1158043, 1143345,\n", + " 1144765, 1135757, 1135876, 1150294, 1138013, 1146523, 1143457, 1143937,\n", + " 1140824, 1146636, 1140364, 1143075, 1143082, 1168921, 1147999, 1145467,\n", + " 1148704, 1150996, 1141836, 1147070, 1149722, 1147031, 1147981, 1147971,\n", + " 1145018, 1158225, 1145240, 1145750, 1145751, 1138638, 1146178, 1151242,\n", + " 1152530, 1150280, 1150274, 1149258, 1148819, 1151856, 1144514, 1147794,\n", + " 1152022, 1152023, 1154267, 1139919, 1149588, 1140566, 1148278, 1147021,\n", + " 1153956, 1153959, 1141949, 1144819, 1148744, 1153574, 1147653, 1143565,\n", + " 1149412, 1148288, 1148300, 1152073, 1151421, 1148180, 1152561, 1146682,\n", + " 1152494, 1146547, 1149810, 1148204, 1148101, 1171943, 1171945, 1154200,\n", + " 1153197, 1145104, 1152867, 1152875, 1155088, 1143134, 1147442, 1151816,\n", + " 1152581, 1146265, 1146975, 1156402, 1150210, 1146623, 1144468, 1152100,\n", + " 1150085, 1145539, 1137746, 1146304, 1152622, 1136410, 1155337, 1154119,\n", + " 1154123, 1157842, 1151617, 1151622, 1136134, 1151440, 1152163, 1144540,\n", + " 1152227, 1152903, 1156823, 1153311, 1152294, 1156007, 1136028, 1136029,\n", + " 1158704, 1140684, 1142777, 1143486, 1166850, 1150159, 1150164, 1148040,\n", + " 1137048, 1148628, 1158540, 1137458, 1149946, 1149944, 1158860, 1150872,\n", + " 1156500, 1157064, 1157069, 1152841, 1145191, 1137809, 1150465, 1138822,\n", + " 1156629, 1156940, 1135644, 1157784, 1158308, 1155441, 1150136, 1142756,\n", + " 1156207, 1151379, 1158639, 1155122, 1152527, 1149321, 1168230, 1155628,\n", + " 1156563, 1158824, 1153715, 1154644, 1156713, 1137359, 1143189, 1150371,\n", + " 1155613, 1159629, 1157282, 1157650, 1158204, 1137381, 1137380, 1159116,\n", + " 1145694, 1134674, 1135601, 1135614, 1150661, 1155848, 1157685, 1157684,\n", + " 1159258, 1156693, 1159131, 1144835, 1155971, 1155975, 1135184, 1158846,\n", + " 1156811, 1156812, 1149700, 1154600, 1180781, 1136905, 1158753, 1140218,\n", + " 1151615, 1136491, 1156665, 1155309, 1152136, 1156490, 1136646, 1144121,\n", + " 1158545, 1158558, 1153827, 1158257, 1150003, 1155521, 1155528, 1164276,\n", + " 1159042, 1162061, 1158301, 1153052, 1153045, 1166256, 1163357, 1153842,\n", + " 1161326, 1138384, 1138385, 1138393, 1149061, 1155476, 1155479, 1151014,\n", + " 1154297, 1138161, 1163396, 1154590, 1139290, 1166073, 1148771, 1157351,\n", + " 1146063, 1140643, 1141857, 1141862, 1151879, 1156363, 1141802, 1158643,\n", + " 1158653, 1156181, 1165604, 1152247, 1143729, 1160605, 1155588, 1151227,\n", + " 1148571, 1169638, 1164580, 1144739, 1152776, 1141471, 1141459, 1147426,\n", + " 1147427, 1156739, 1150646, 1144812, 1142733, 1165636, 1148683, 1170671,\n", + " 1144973, 1166053, 1148124, 1139345, 1145902, 1163961, 1143404, 1149560,\n", + " 1147339, 1147338, 1170758, 1149130, 1167817, 1166653, 1150515, 1150522,\n", + " 1167905, 1156119, 1144346, 1144336, 1157534, 1147757, 1154659, 1154670,\n", + " 1171409, 1157331, 1154353, 1172750, 1149452, 1171529, 1158623, 1172303,\n", + " 1154869, 1152353, 1152362, 1149402, 1169271, 1173307, 1145037, 1160936,\n", + " 1154027, 1154028, 1153755, 1153754, 1159658, 1178422, 1151696, 1157373,\n", + " 1147711, 1148128, 1148131, 1157593, 1157598, 1135021, 1179679, 1177700,\n", + " 1163998, 1176327, 1154151, 1154148, 1186117, 1143279, 1168481, 1143418,\n", + " 1153805, 1153141, 1174076, 1161031, 1182651, 1179807, 1155260, 1157795,\n", + " 1143341, 1143343, 1151496, 1151498, 1171623, 1163572, 1158249, 1153898,\n", + " 1185104, 1186223, 1149744, 1149755, 1146240, 1153609, 1153612, 1183215,\n", + " 1158771, 1165067, 1158940, 1158380, 1160276, 1164798, 1162253, 1164231,\n", + " 1178331, 1176976, 1179123, 1165444, 1147182, 1156528, 1184839, 1139831,\n", + " 1150265, 1154812, 1192076, 1191674, 1156055, 1170010, 1146392, 1146395,\n", + " 1169964, 1190246, 1140997, 1190381, 1151771, 1151774, 1192824, 1192956,\n", + " 1191604, 1171215, 1150406, 1185914, 1178135, 1177819, 1186621, 1152080,\n", + " 1155962, 1179769, 1169831, 1169837, 1190853, 1172903, 1189368, 1182773,\n", + " 1194044, 1157008, 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1137204, 1141424, 1140284, 1140285, 1135926, 1135726, 1137791,\n", + " 1141758, 1138335, 1141250, 1136969, 1143600, 1154774, 1145993, 1146418,\n", + " 1139241, 1146641, 1146646, 1150509, 1148582, 1149216, 1142947, 1142949,\n", + " 1155683, 1143820, 1147483, 1149037, 1146656, 1146660, 1152664, 1153231,\n", + " 1137220, 1155019, 1138739, 1140953, 1135367, 1135202, 1136037, 1141036,\n", + " 1134794, 1157443, 1138504, 1157088, 1136619, 1144791, 1139215, 1156152,\n", + " 1156159, 1135582, 1135583, 1135828, 1138514, 1153094, 1137957, 1135494,\n", + " 1145132, 1156899, 1135522, 1138440, 1140079, 1138461, 1138449, 1138462,\n", + " 1157190, 1158390, 1156603, 1156605, 1156602, 1156606, 1142611, 1160819,\n", + " 1135631, 1156141, 1138185, 1145843, 1137109, 1137119, 1139667, 1139673,\n", + " 1138069, 1142243, 1136087, 1134992, 1142786, 1136554, 1158974, 1140034,\n", + " 1138151, 1146075, 1152042, 1152044, 1137741, 1135543, 1135549, 1137888,\n", + " 1141088, 1141100, 1149001, 1137299, 1162705, 1139025, 1149979, 1146847,\n", + " 1135859, 1135861, 1139436, 1139386, 1167117, 1141657, 1136917, 1137186,\n", + " 1141156, 1141159, 1152727, 1136752, 1149435, 1139799, 1139800, 1145161,\n", + " 1158749, 1139190, 1138424, 1144596, 1136867, 1136864, 1145298, 1144039,\n", + " 1140442, 1144182, 1150910, 1147153, 1141365, 1151119, 1149101, 1139019,\n", + " 1138292, 1144279, 1143915, 1139508, 1139127, 1143692, 1147050, 1145873,\n", + " 1145887, 1152976, 1139007, 1141925, 1146901, 1144242, 1141378, 1145974,\n", + " 1146024, 1146025, 1138085, 1141644, 1149928, 1139990, 1143294, 1147540,\n", + " 1148763, 1147282, 1149155, 1143663, 1142628, 1149608, 1143049, 1143052,\n", + " 1136167, 1136836, 1136845, 1141502, 1139051, 1142159, 1158043, 1143345,\n", + " 1144765, 1135757, 1135876, 1150294, 1138013, 1146523, 1143457, 1143937,\n", + " 1140824, 1146636, 1140364, 1143075, 1143082, 1168921, 1147999, 1145467,\n", + " 1148704, 1150996, 1141836, 1147070, 1149722, 1147031, 1147981, 1147971,\n", + " 1145018, 1158225, 1145240, 1145750, 1145751, 1138638, 1146178, 1151242,\n", + " 1152530, 1150280, 1150274, 1149258, 1148819, 1151856, 1144514, 1147794,\n", + " 1152022, 1152023, 1154267, 1139919, 1149588, 1140566, 1148278, 1147021,\n", + " 1153956, 1153959, 1141949, 1144819, 1148744, 1153574, 1147653, 1143565,\n", + " 1149412, 1148288, 1148300, 1152073, 1151421, 1148180, 1152561, 1146682,\n", + " 1152494, 1146547, 1149810, 1148204, 1148101, 1171943, 1171945, 1154200,\n", + " 1153197, 1145104, 1152867, 1152875, 1155088, 1143134, 1147442, 1151816,\n", + " 1152581, 1146265, 1146975, 1156402, 1150210, 1146623, 1144468, 1152100,\n", + " 1150085, 1145539, 1137746, 1146304, 1152622, 1136410, 1155337, 1154119,\n", + " 1154123, 1157842, 1151617, 1151622, 1136134, 1151440, 1152163, 1144540,\n", + " 1152227, 1152903, 1156823, 1153311, 1152294, 1156007, 1136028, 1136029,\n", + " 1158704, 1140684, 1142777, 1143486, 1166850, 1150159, 1150164, 1148040,\n", + " 1137048, 1148628, 1158540, 1137458, 1149946, 1149944, 1158860, 1150872,\n", + " 1156500, 1157064, 1157069, 1152841, 1145191, 1137809, 1150465, 1138822,\n", + " 1156629, 1156940, 1135644, 1157784, 1158308, 1155441, 1150136, 1142756,\n", + " 1156207, 1151379, 1158639, 1155122, 1152527, 1149321, 1168230, 1155628,\n", + " 1156563, 1158824, 1153715, 1154644, 1156713, 1137359, 1143189, 1150371,\n", + " 1155613, 1159629, 1157282, 1157650, 1158204, 1137381, 1137380, 1159116,\n", + " 1145694, 1134674, 1135601, 1135614, 1150661, 1155848, 1157685, 1157684,\n", + " 1159258, 1156693, 1159131, 1144835, 1155971, 1155975, 1135184, 1158846,\n", + " 1156811, 1156812, 1149700, 1154600, 1180781, 1136905, 1158753, 1140218,\n", + " 1151615, 1136491, 1156665, 1155309, 1152136, 1156490, 1136646, 1144121,\n", + " 1158545, 1158558, 1153827, 1158257, 1150003, 1155521, 1155528, 1164276,\n", + " 1159042, 1162061, 1158301, 1153052, 1153045, 1166256, 1163357, 1153842,\n", + " 1161326, 1138384, 1138385, 1138393, 1149061, 1155476, 1155479, 1151014,\n", + " 1154297, 1138161, 1163396, 1154590, 1139290, 1166073, 1148771, 1157351,\n", + " 1146063, 1140643, 1141857, 1141862, 1151879, 1156363, 1141802, 1158643,\n", + " 1158653, 1156181, 1165604, 1152247, 1143729, 1160605, 1155588, 1151227,\n", + " 1148571, 1169638, 1164580, 1144739, 1152776, 1141471, 1141459, 1147426,\n", + " 1147427, 1156739, 1150646, 1144812, 1142733, 1165636, 1148683, 1170671,\n", + " 1144973, 1166053, 1148124, 1139345, 1145902, 1163961, 1143404, 1149560,\n", + " 1147339, 1147338, 1170758, 1149130, 1167817, 1166653, 1150515, 1150522,\n", + " 1167905, 1156119, 1144346, 1144336, 1157534, 1147757, 1154659, 1154670,\n", + " 1171409, 1157331, 1154353, 1172750, 1149452, 1171529, 1158623, 1172303,\n", + " 1154869, 1152353, 1152362, 1149402, 1169271, 1173307, 1145037, 1160936,\n", + " 1154027, 1154028, 1153755, 1153754, 1159658, 1178422, 1151696, 1157373,\n", + " 1147711, 1148128, 1148131, 1157593, 1157598, 1135021, 1179679, 1177700,\n", + " 1163998, 1176327, 1154151, 1154148, 1186117, 1143279, 1168481, 1143418,\n", + " 1153805, 1153141, 1174076, 1161031, 1182651, 1179807, 1155260, 1157795,\n", + " 1143341, 1143343, 1151496, 1151498, 1171623, 1163572, 1158249, 1153898,\n", + " 1185104, 1186223, 1149744, 1149755, 1146240, 1153609, 1153612, 1183215,\n", + " 1158771, 1165067, 1158940, 1158380, 1160276, 1164798, 1162253, 1164231,\n", + " 1178331, 1176976, 1179123, 1165444, 1147182, 1156528, 1184839, 1139831,\n", + " 1150265, 1154812, 1192076, 1191674, 1156055, 1170010, 1146392, 1146395,\n", + " 1169964, 1190246, 1140997, 1190381, 1151771, 1151774, 1192824, 1192956,\n", + " 1191604, 1171215, 1150406, 1185914, 1178135, 1177819, 1186621, 1152080,\n", + " 1155962, 1179769, 1169831, 1169837, 1190853, 1172903, 1189368, 1182773,\n", + " 1194044, 1157008, 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197841, 1195697, 1199436, 1198730, 1199835, 1199282, 1198449,\n", + " 1198844, 1201237, 1200650, 1197791, 1201015, 1201016, 1198624, 1196871,\n", + " 1202815, 1198555, 1198557, 1196573, 1194743, 1194782, 1195494, 1196631,\n", + " 1194649, 1197434, 1199120, 1201992, 1195187, 1196030, 1195895, 1202896,\n", + " 1195740, 1196334, 1196359, 1194759, 1195320, 1196835, 1196837, 1198262,\n", + " 1198034, 1198643, 1198163, 1198164, 1198161, 1195221, 1195223, 1197141,\n", + " 1196242, 1196255, 1197367, 1196109, 1195038, 1198915, 1195659, 1202916,\n", + " 1199315, 1197474, 1200037, 1196283, 1198282, 1200959, 1199060, 1199059,\n", + " 1199185, 1194941, 1194928, 1199685, 1199628, 1199803, 1200076, 1200869,\n", + " 1200872, 1199152, 1198400, 1198410, 1199579, 1199231, 1201916, 1199744,\n", + " 1199676, 1201511, 1196498, 1196501, 1197601, 1196727, 1196734, 1198428,\n", + " 1200155, 1198811, 1201529, 1201534, 1199555, 1201824, 1201827, 1200452,\n", + " 1200450, 1200507, 1198593, 1199445, 1201073, 1201156, 1202630, 1200988,\n", + " 1201056, 1200913, 1200918, 1199712, 1201042, 1202144, 1200526, 1200553,\n", + " 1201617, 1199886, 1196883, 1200692, 1199908, 1199917, 1196779, 1201442,\n", + " 1197945, 1199482, 1200899, 1199976, 1202175, 1197546, 1201291, 1203279,\n", + " 1196761, 1199923, 1201800, 1198562, 1200784, 1202687, 1199606, 1195047,\n", + " 1196827, 1195679, 1195664, 1198929, 1198932, 1197816, 1197822, 1201482,\n", + " 1200585, 1199659, 1203102, 1194730, 1198824, 1197731, 1203150, 1198819,\n", + " 1200468, 1200301, 1197335, 1195082, 1198751], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197841, 1195697, 1199436, 1198730, 1199835, 1199282, 1198449,\n", + " 1198844, 1201237, 1200650, 1197791, 1201015, 1201016, 1198624, 1196871,\n", + " 1202815, 1198555, 1198557, 1196573, 1194743, 1194782, 1195494, 1196631,\n", + " 1194649, 1197434, 1199120, 1201992, 1195187, 1196030, 1195895, 1202896,\n", + " 1195740, 1196334, 1196359, 1194759, 1195320, 1196835, 1196837, 1198262,\n", + " 1198034, 1198643, 1198163, 1198164, 1198161, 1195221, 1195223, 1197141,\n", + " 1196242, 1196255, 1197367, 1196109, 1195038, 1198915, 1195659, 1202916,\n", + " 1199315, 1197474, 1200037, 1196283, 1198282, 1200959, 1199060, 1199059,\n", + " 1199185, 1194941, 1194928, 1199685, 1199628, 1199803, 1200076, 1200869,\n", + " 1200872, 1199152, 1198400, 1198410, 1199579, 1199231, 1201916, 1199744,\n", + " 1199676, 1201511, 1196498, 1196501, 1197601, 1196727, 1196734, 1198428,\n", + " 1200155, 1198811, 1201529, 1201534, 1199555, 1201824, 1201827, 1200452,\n", + " 1200450, 1200507, 1198593, 1199445, 1201073, 1201156, 1202630, 1200988,\n", + " 1201056, 1200913, 1200918, 1199712, 1201042, 1202144, 1200526, 1200553,\n", + " 1201617, 1199886, 1196883, 1200692, 1199908, 1199917, 1196779, 1201442,\n", + " 1197945, 1199482, 1200899, 1199976, 1202175, 1197546, 1201291, 1203279,\n", + " 1196761, 1199923, 1201800, 1198562, 1200784, 1202687, 1199606, 1195047,\n", + " 1196827, 1195679, 1195664, 1198929, 1198932, 1197816, 1197822, 1201482,\n", + " 1200585, 1199659, 1203102, 1194730, 1198824, 1197731, 1203150, 1198819,\n", + " 1200468, 1200301, 1197335, 1195082, 1198751], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 3.4078e-02, -7.0976e-04, 3.3456e-01, ..., -2.3902e-04,\n", + " -1.7120e-04, -2.8508e-03],\n", + " [ 3.4078e-02, -7.0976e-04, 3.3456e-01, ..., -2.3902e-04,\n", + " -1.7120e-04, -2.8508e-03],\n", + " [ 4.4248e-02, -6.0353e-04, 3.2198e-01, ..., -6.6366e-05,\n", + " -1.4332e-04, -2.9431e-03],\n", + " ...,\n", + " [ 4.6463e-02, 2.2734e-03, 2.3657e-01, ..., 1.2035e-02,\n", + " -1.3672e-04, -2.4417e-03],\n", + " [ 4.6025e-02, -6.1651e-04, 3.1648e-01, ..., -1.1221e-04,\n", + " -1.7873e-04, -2.8396e-03],\n", + " [ 4.6025e-02, -6.1651e-04, 3.1648e-01, ..., -1.1221e-04,\n", + " -1.7873e-04, -2.8396e-03]], device='cuda:0'), 'paper': tensor([[ 2.5207, -0.0319, 2.2074, ..., -0.0125, -0.0163, 2.5266],\n", + " [ 2.5540, -0.0351, 2.3564, ..., -0.0105, -0.0167, 2.9942],\n", + " [ 2.5964, -0.0371, 2.4444, ..., -0.0097, -0.0168, 3.1145],\n", + " ...,\n", + " [ 2.8346, -0.0357, 2.6375, ..., -0.0143, -0.0187, 2.7645],\n", + " [ 3.8895, -0.0655, 2.2712, ..., -0.0213, -0.0183, 3.1255],\n", + " [ 2.4491, -0.0365, 2.6260, ..., -0.0082, -0.0158, 3.0531]],\n", + " device='cuda:0'), 'author': tensor([[-3.9500e-04, -3.7329e-04, 1.4553e-01, ..., 9.1423e-02,\n", + " -2.6445e-04, -9.5572e-04],\n", + " [-3.9500e-04, -3.7329e-04, 1.4553e-01, ..., 9.1423e-02,\n", + " -2.6445e-04, -9.5572e-04],\n", + " [ 6.1111e-01, -4.6681e-03, 1.6001e-01, ..., -4.0802e-03,\n", + " -2.8398e-03, 4.0655e-02],\n", + " ...,\n", + " [ 6.5323e-01, -7.8976e-03, 6.3667e-03, ..., -4.8377e-03,\n", + " 4.1664e-02, 2.8927e-01],\n", + " [ 5.2612e-01, -5.1160e-03, 1.3423e-02, ..., -2.1966e-03,\n", + " 8.4485e-02, 2.1876e-01],\n", + " [ 5.3223e-01, -5.3226e-03, -5.7904e-04, ..., -2.3862e-03,\n", + " 6.6097e-02, 1.9719e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0111, 0.3483, -0.0033, ..., 1.2487, -0.0018, -0.0076],\n", + " [-0.0123, 0.1694, -0.0046, ..., 1.3231, -0.0026, -0.0072],\n", + " [-0.0111, 0.1994, -0.0044, ..., 1.2454, -0.0027, -0.0070],\n", + " ...,\n", + " [-0.0102, 0.1419, -0.0032, ..., 1.0065, -0.0030, -0.0057],\n", + " [-0.0101, 0.1754, -0.0038, ..., 1.0710, -0.0036, -0.0054],\n", + " [-0.0107, 0.3435, -0.0038, ..., 1.3803, -0.0028, -0.0086]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 164, 60, 157, 52, 34, 34, 34, 192, 207, 207, 55, 495,\n", + " 495, 286, 481, 481, 495, 470, 1155, 525, 922, 525, 821, 939,\n", + " 939, 949, 746, 940, 910, 1045, 1045, 1125, 1088, 1317, 1147, 897,\n", + " 1254, 1650, 1469, 1397, 1076, 1076, 1555, 1375, 1634, 1400, 1574, 1542,\n", + " 1542, 1706, 1729, 1558, 1574, 1542, 1542, 1574, 1574, 1639, 1706, 1706,\n", + " 1706, 1706, 1706, 1951, 1909, 1857, 1871, 1929, 1784, 1784, 1784, 1790,\n", + " 1790, 1803, 2024, 2024, 2094, 1984, 2159, 2113, 2169, 2494, 2055, 2096,\n", + " 2211, 2211, 2297, 2155, 2325, 2325, 2325, 2287, 2492, 2360, 2194, 2530,\n", + " 2492, 2369, 2544, 2544, 2544, 2544, 2544, 2620, 2727, 2727, 2729, 2744,\n", + " 2756, 2774, 2974, 2980, 2971, 2949, 2949, 2965, 3159, 3444, 3515, 3515,\n", + " 3515, 3448, 3537, 3752, 3986, 3872, 3861, 4029, 4219, 3833, 4298, 4150,\n", + " 3933, 4329, 4322, 4164, 4164, 4164, 3922, 4339, 4339, 4339, 4214, 4527,\n", + " 4405, 4211, 4601, 4657, 4720, 4780, 4739, 4739, 4928, 4886, 4902, 5015,\n", + " 5157, 5157, 5157, 5147, 5383, 5383, 5383, 5229, 5169, 5157, 5520, 5520,\n", + " 5520, 5520, 5135, 5135, 5370, 5188, 5394, 5394, 5478, 5431, 5648, 5511,\n", + " 5864, 5870, 5717, 5873, 6107, 5987, 6074, 6106, 6054, 6054, 6552, 6248,\n", + " 6166, 6386, 6315, 6654, 6496, 6496, 6496, 6496, 6920, 6648, 6708, 6782,\n", + " 6782, 6782, 6763, 6763, 6796, 6853, 6904, 6894, 6894, 6894, 6894, 6937,\n", + " 7027, 7027, 7027, 6804, 7022, 6904, 6866, 6916, 6811, 6811, 7173, 6934,\n", + " 6934, 7034, 7148, 7146, 7044, 7044, 6773, 6955, 7004, 7004, 7160],\n", + " [ 114, 65, 149, 71, 111, 70, 7, 15, 135, 116, 74, 45,\n", + " 117, 6, 21, 16, 27, 94, 62, 132, 96, 136, 68, 105,\n", + " 26, 72, 146, 152, 85, 63, 34, 12, 80, 17, 60, 6,\n", + " 149, 6, 129, 94, 27, 116, 44, 47, 125, 83, 124, 27,\n", + " 126, 105, 14, 50, 69, 13, 141, 33, 1, 125, 42, 18,\n", + " 140, 30, 8, 127, 85, 71, 125, 75, 106, 108, 9, 103,\n", + " 130, 50, 48, 115, 76, 39, 138, 148, 56, 139, 43, 40,\n", + " 55, 109, 134, 29, 57, 154, 100, 92, 141, 101, 78, 50,\n", + " 132, 80, 77, 30, 151, 0, 18, 138, 94, 153, 147, 6,\n", + " 6, 25, 90, 28, 81, 61, 110, 150, 52, 99, 23, 125,\n", + " 132, 67, 97, 4, 97, 19, 153, 141, 85, 144, 113, 57,\n", + " 36, 11, 35, 64, 7, 84, 63, 122, 27, 123, 125, 6,\n", + " 85, 118, 38, 96, 85, 32, 126, 13, 6, 133, 102, 107,\n", + " 85, 89, 46, 96, 80, 99, 87, 132, 31, 93, 62, 144,\n", + " 112, 13, 16, 21, 3, 126, 137, 145, 144, 27, 143, 89,\n", + " 83, 97, 126, 121, 82, 20, 119, 35, 54, 85, 20, 86,\n", + " 51, 85, 45, 88, 128, 95, 2, 24, 120, 29, 58, 59,\n", + " 104, 85, 85, 51, 79, 85, 85, 98, 37, 10, 133, 5,\n", + " 85, 91, 45, 41, 148, 155, 49, 134, 22, 85, 66, 85,\n", + " 156, 66, 85, 85, 85, 142, 131, 54, 73, 53, 147]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 76, 1630, 3618, ..., 5172, 1458, 3470],\n", + " [ 170, 127, 63, ..., 5894, 5920, 5940]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 65, 125, 6, 97, 90, 49, 65, 57, 100, 90, 100, 6,\n", + " 72, 65, 72, 6, 65, 150, 132, 36, 57, 6, 85, 49,\n", + " 150, 132, 65, 36, 55, 6, 72, 36, 36, 85, 55, 55,\n", + " 125, 85, 57, 36, 72, 90, 97, 109, 109, 90, 57, 132,\n", + " 125, 125, 90, 90, 90, 90, 132, 57, 125, 90, 55, 55,\n", + " 97, 57, 90, 109, 65, 6, 97, 57, 125, 57, 90, 57,\n", + " 49, 100, 90, 97, 6, 125, 49, 57, 36, 125, 36, 109,\n", + " 85, 132, 132, 57, 55, 125, 97, 72, 97, 109, 125, 49,\n", + " 36, 97, 57, 6, 65, 72, 57, 65, 6, 109, 132, 97,\n", + " 65, 57, 65, 65, 57, 65, 100, 55, 57, 57, 55, 49,\n", + " 57, 49, 109, 125, 97, 109, 57, 97, 6, 109, 6, 150,\n", + " 49, 65, 150, 6, 109, 55, 65, 57, 100, 132, 90, 6,\n", + " 65, 36, 65, 6, 109, 90, 125, 6, 55, 97, 49, 57,\n", + " 125, 57, 125, 109, 132, 85, 57, 55, 150, 90, 97, 55,\n", + " 55, 57, 100, 150, 132, 150, 72, 125, 6, 55, 65, 85,\n", + " 150, 65, 150, 65, 65, 109, 65, 90, 132, 57, 36, 57,\n", + " 36, 90, 72, 72, 100, 49, 100, 125, 72, 72, 57, 57,\n", + " 150, 100, 72, 100, 85, 90, 100, 49, 150, 90, 49, 100,\n", + " 132, 55, 36, 57, 125, 6, 109, 100, 90, 6, 109, 72,\n", + " 65, 57, 97, 109, 55, 132, 6, 85, 57, 36, 125, 6,\n", + " 150, 6, 36, 57, 125, 90, 150, 36, 6, 150, 150, 57,\n", + " 6, 97, 100, 90, 49, 125, 57, 150, 6, 100, 100, 36,\n", + " 150, 85, 100, 150, 36, 36, 65, 57, 150, 125, 150, 72,\n", + " 109, 125, 85, 132, 125, 55, 132, 125, 150, 57, 109, 109,\n", + " 6, 132, 97, 109, 72, 72, 125, 90, 6, 97, 100, 72,\n", + " 65, 49, 72, 6, 36, 6, 85, 65, 36, 57, 57, 132,\n", + " 97, 55, 72, 57, 100, 72, 57, 97, 6, 109, 109, 55,\n", + " 109, 100, 150, 6, 97, 6, 132, 132, 109, 85, 36, 132,\n", + " 57, 49, 97, 100, 6, 132, 55, 57, 57, 132, 49, 49,\n", + " 55, 72, 6, 57, 72, 57, 90, 6, 132, 6, 6, 55,\n", + " 100, 150, 57, 132, 55, 6, 55, 72, 6, 72, 85, 6,\n", + " 6, 85, 6, 100, 36, 36, 85, 36, 49, 97, 6, 100,\n", + " 36, 49, 57, 57, 55, 49, 150, 85, 85, 85, 150, 72,\n", + " 132, 49, 49, 97, 85, 6, 85, 109, 49, 85, 85, 49,\n", + " 6, 100, 6, 57, 85, 85, 6, 6, 90, 6, 6, 97,\n", + " 85, 49, 97, 6],\n", + " [ 147, 41, 259, 98, 233, 96, 7, 214, 230, 187, 45, 99,\n", + " 209, 227, 0, 58, 219, 46, 382, 80, 163, 1, 168, 291,\n", + " 552, 427, 356, 568, 265, 277, 364, 478, 538, 1151, 320, 342,\n", + " 362, 440, 793, 834, 289, 811, 1058, 1008, 708, 635, 1145, 583,\n", + " 982, 629, 667, 680, 974, 648, 693, 798, 926, 823, 1463, 1106,\n", + " 904, 776, 981, 1024, 550, 712, 1543, 1219, 1436, 1346, 1162, 1232,\n", + " 1181, 740, 1157, 1372, 1117, 1196, 1271, 1462, 1242, 1093, 1316, 1095,\n", + " 1180, 1332, 1740, 1675, 1366, 1590, 1428, 1373, 1536, 1673, 1191, 1564,\n", + " 1396, 1635, 1646, 1374, 1557, 1761, 1701, 1583, 1582, 1479, 1726, 1680,\n", + " 1736, 1527, 1822, 1820, 1681, 1440, 1751, 1849, 1805, 1848, 1778, 1842,\n", + " 1975, 1809, 1899, 1700, 1813, 2051, 2243, 1763, 2016, 2110, 2198, 2375,\n", + " 2298, 2509, 2324, 2149, 2058, 2340, 2195, 2333, 2325, 2093, 2189, 2241,\n", + " 2232, 2513, 2393, 2417, 2415, 2524, 2433, 2355, 2506, 2505, 2639, 2414,\n", + " 2790, 2666, 2788, 2486, 2540, 2682, 2558, 2681, 2738, 2757, 2748, 2795,\n", + " 2839, 2716, 2745, 2704, 2739, 3208, 2832, 2809, 3101, 2769, 2931, 2831,\n", + " 2842, 2952, 3006, 2921, 2958, 2897, 2898, 2771, 2892, 3044, 2913, 3104,\n", + " 3096, 3129, 3221, 3142, 3141, 3265, 3394, 3137, 3313, 3559, 3485, 3363,\n", + " 3468, 3342, 3285, 3426, 3435, 3554, 3182, 3483, 3459, 3384, 3561, 3614,\n", + " 3712, 3677, 3675, 3767, 3782, 3651, 3714, 3746, 3583, 3602, 3650, 3827,\n", + " 3868, 3959, 3803, 3943, 3893, 3946, 4035, 3862, 3961, 3812, 4161, 3885,\n", + " 3970, 4155, 4162, 4341, 4000, 4139, 3907, 4328, 4332, 4497, 4154, 4367,\n", + " 4483, 4197, 4554, 4299, 4313, 4263, 4376, 4575, 4589, 4606, 4633, 4624,\n", + " 4603, 4602, 4636, 4605, 4643, 4604, 4665, 4658, 4671, 4743, 4689, 4677,\n", + " 4696, 4707, 4708, 4724, 4721, 4672, 4702, 4807, 4713, 4716, 4749, 4744,\n", + " 4840, 4797, 4873, 4888, 4922, 5000, 4899, 4818, 4973, 4986, 5041, 5050,\n", + " 5048, 5043, 4999, 4978, 4997, 5045, 5060, 5070, 5204, 4976, 5207, 5213,\n", + " 5183, 5156, 5362, 5242, 5106, 5300, 5201, 5453, 5256, 5446, 5322, 5307,\n", + " 5575, 5238, 5437, 5489, 5596, 5408, 5618, 5297, 5502, 5323, 5484, 5427,\n", + " 5564, 5816, 5557, 5659, 5395, 5457, 5770, 5657, 5599, 5464, 5874, 5591,\n", + " 5609, 5678, 5737, 5666, 5587, 5601, 5768, 5797, 5706, 5684, 5802, 5784,\n", + " 6031, 5669, 5928, 5824, 5887, 5791, 6064, 5960, 6238, 6233, 6164, 6149,\n", + " 5932, 6073, 5910, 6297, 6421, 6309, 6179, 6399, 6423, 6518, 6377, 6657,\n", + " 6192, 6394, 6621, 6316, 6544, 6823, 6769, 6489, 6629, 6794, 6605, 6403,\n", + " 6613, 6723, 6772, 6882, 6719, 6762, 6732, 6879, 7005, 6827, 7121, 7023,\n", + " 6958, 6969, 6733, 7201, 6994, 7054, 7174, 7199, 7046, 7172, 7149, 7178,\n", + " 7220, 7083, 7131, 7140]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 95, 95, 95, ..., 6008, 6008, 6008],\n", + " [ 443, 435, 560, ..., 256, 357, 266]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 436, 309, 436, ..., 161, 249, 573],\n", + " [ 68, 100, 35, ..., 5996, 6022, 5873]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3226, 2077, 5735, ..., 3221, 5966, 3548],\n", + " [ 128, 182, 134, ..., 7251, 7261, 7197]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 95, 288, 288, ..., 5969, 5969, 5969],\n", + " [ 117, 487, 622, ..., 2129, 1240, 5867]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 60, 60, 60, ..., 7256, 7256, 7256],\n", + " [2706, 2901, 3349, ..., 289, 3583, 3601]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005798\n", + "sampling 0.005645\n", + "noi time: 0.001782\n", + "get_vertex_data call: 0.025944\n", + "noi group time: 0.002106\n", + "eoi_group_time: 0.013328\n", + "second half: 0.190085\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16691, 36709, 32616, ..., 1120069, 1110068, 1110077],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16691, 36709, 32616, ..., 1120069, 1110068, 1110077],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208586, 1228165, 1205181, ..., 1929326, 1929220, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208586, 1228165, 1205181, ..., 1929326, 1929220, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1136345, 1135160, 1135726, 1141748, 1141751, 1141758, 1138335,\n", + " 1136223, 1136213, 1141250, 1139471, 1143600, 1139821, 1137947, 1138933,\n", + " 1143372, 1146646, 1139609, 1139615, 1148976, 1150497, 1142964, 1148582,\n", + " 1149216, 1149228, 1155686, 1143820, 1147473, 1147477, 1147483, 1147486,\n", + " 1135992, 1153936, 1153943, 1149033, 1134697, 1134700, 1135118, 1148346,\n", + " 1146661, 1136125, 1152671, 1138345, 1148546, 1153217, 1141904, 1155018,\n", + " 1147211, 1136674, 1152427, 1134710, 1146371, 1137834, 1151547, 1138112,\n", + " 1138119, 1140158, 1140020, 1162460, 1135367, 1135202, 1134967, 1141036,\n", + " 1136770, 1134794, 1138504, 1137329, 1137342, 1157088, 1136826, 1137534,\n", + " 1157397, 1136662, 1156152, 1148481, 1140970, 1158136, 1156962, 1154132,\n", + " 1139685, 1139689, 1137287, 1157703, 1157706, 1138436, 1138440, 1138445,\n", + " 1138847, 1135103, 1138696, 1156603, 1147113, 1138185, 1145843, 1139844,\n", + " 1138069, 1142255, 1136085, 1136095, 1134992, 1136730, 1159012, 1144410,\n", + " 1153536, 1143631, 1136071, 1136068, 1138148, 1134891, 1134888, 1152042,\n", + " 1152044, 1152045, 1139069, 1142298, 1140670, 1137734, 1147327, 1135543,\n", + " 1135549, 1141088, 1141094, 1141095, 1141098, 1139898, 1145358, 1135291,\n", + " 1143767, 1137299, 1139033, 1146834, 1141681, 1135860, 1136427, 1136637,\n", + " 1161173, 1141112, 1141648, 1136917, 1143673, 1137198, 1160616, 1141156,\n", + " 1139495, 1144650, 1134987, 1147850, 1144428, 1138490, 1142056, 1142048,\n", + " 1141813, 1141821, 1138465, 1137764, 1143576, 1139190, 1140110, 1142913,\n", + " 1143107, 1136867, 1136864, 1136874, 1140885, 1144182, 1144190, 1137614,\n", + " 1146201, 1136565, 1137854, 1149193, 1162804, 1141367, 1153068, 1141720,\n", + " 1141719, 1149097, 1149101, 1144277, 1143904, 1139510, 1145001, 1164534,\n", + " 1146693, 1146695, 1147050, 1147047, 1145873, 1141925, 1145339, 1140580,\n", + " 1150243, 1148313, 1143643, 1141390, 1145974, 1143845, 1143851, 1163652,\n", + " 1146024, 1147266, 1154328, 1141234, 1139990, 1143293, 1143283, 1143294,\n", + " 1147543, 1147540, 1147282, 1142829, 1142637, 1148003, 1136167, 1142584,\n", + " 1157720, 1136836, 1146100, 1139329, 1139341, 1142149, 1142159, 1143345,\n", + " 1143350, 1145813, 1140845, 1144083, 1138600, 1138602, 1135874, 1150756,\n", + " 1150294, 1150919, 1150567, 1146514, 1143456, 1140483, 1140824, 1146578,\n", + " 1146580, 1147524, 1147523, 1140364, 1137990, 1166404, 1147984, 1147995,\n", + " 1147999, 1134899, 1139252, 1148704, 1142700, 1148473, 1147031, 1143828,\n", + " 1158226, 1150452, 1154526, 1145240, 1145246, 1145750, 1142370, 1138638,\n", + " 1151242, 1152530, 1152538, 1152537, 1150287, 1150445, 1148935, 1154433,\n", + " 1149791, 1144514, 1154825, 1169727, 1151480, 1139919, 1147012, 1158950,\n", + " 1141943, 1141949, 1150731, 1148744, 1153568, 1153574, 1154985, 1147653,\n", + " 1137725, 1154420, 1158799, 1136247, 1136252, 1138204, 1139721, 1152482,\n", + " 1152436, 1157978, 1157983, 1148720, 1148734, 1148729, 1150057, 1148204,\n", + " 1169369, 1154203, 1153124, 1153188, 1153197, 1145111, 1150935, 1147442,\n", + " 1154190, 1148498, 1146565, 1141420, 1150636, 1150637, 1151356, 1147743,\n", + " 1153447, 1153449, 1148957, 1146969, 1146967, 1153257, 1150219, 1146623,\n", + " 1146492, 1152849, 1152409, 1152415, 1152106, 1156324, 1156325, 1153032,\n", + " 1153037, 1150093, 1145546, 1137746, 1137755, 1146307, 1159974, 1136402,\n", + " 1155337, 1151617, 1145278, 1136131, 1136134, 1136142, 1136798, 1140451,\n", + " 1152160, 1140939, 1152341, 1152342, 1156816, 1153311, 1138279, 1138281,\n", + " 1152928, 1151064, 1156399, 1156422, 1148040, 1155202, 1149300, 1155226,\n", + " 1173616, 1168188, 1148628, 1158530, 1158540, 1137458, 1157518, 1142047,\n", + " 1154381, 1157229, 1157547, 1142387, 1158916, 1157064, 1153884, 1155422,\n", + " 1152841, 1152833, 1139484, 1143491, 1135729, 1152180, 1156638, 1151788,\n", + " 1165700, 1139525, 1158308, 1158311, 1155441, 1150136, 1162113, 1162120,\n", + " 1138569, 1154536, 1142755, 1164638, 1138775, 1151379, 1155122, 1152527,\n", + " 1157183, 1149321, 1149519, 1151424, 1146920, 1156460, 1157873, 1155626,\n", + " 1155628, 1156563, 1154555, 1155572, 1158824, 1148835, 1155646, 1154642,\n", + " 1163374, 1179427, 1160896, 1160907, 1150371, 1153317, 1155293, 1143517,\n", + " 1159622, 1151030, 1157288, 1137152, 1158996, 1137381, 1137385, 1137387,\n", + " 1137323, 1164314, 1134685, 1135601, 1148149, 1150661, 1158665, 1149145,\n", + " 1159258, 1144451, 1152209, 1152220, 1167309, 1152498, 1156693, 1140374,\n", + " 1144843, 1142466, 1155971, 1155975, 1153766, 1158846, 1155404, 1149700,\n", + " 1166124, 1136896, 1158760, 1171176, 1158438, 1158439, 1158447, 1158285,\n", + " 1136494, 1136491, 1157575, 1156665, 1156490, 1153808, 1136646, 1151146,\n", + " 1146126, 1164524, 1188202, 1138110, 1155521, 1155528, 1152466, 1157759,\n", + " 1157751, 1162683, 1159042, 1159052, 1159049, 1159056, 1159057, 1172286,\n", + " 1157946, 1153052, 1171551, 1163079, 1163081, 1166246, 1167557, 1144158,\n", + " 1144156, 1165823, 1153843, 1138393, 1162917, 1149070, 1145948, 1155480,\n", + " 1153514, 1153519, 1164857, 1147300, 1158680, 1162564, 1138161, 1164006,\n", + " 1164012, 1156787, 1149963, 1154590, 1139281, 1161001, 1159999, 1140731,\n", + " 1159773, 1146063, 1159560, 1158865, 1158878, 1140643, 1148603, 1141800,\n", + " 1159025, 1159032, 1186971, 1165604, 1165609, 1152247, 1158902, 1155588,\n", + " 1160498, 1156582, 1158405, 1168527, 1144986, 1146510, 1161237, 1144747,\n", + " 1153209, 1151650, 1157052, 1149901, 1156739, 1163260, 1144812, 1162087,\n", + " 1164750, 1156303, 1144054, 1167751, 1169282, 1185486, 1160732, 1147681,\n", + " 1147693, 1145447, 1152624, 1148124, 1139351, 1139345, 1147723, 1145900,\n", + " 1153534, 1168659, 1151752, 1171571, 1181052, 1170980, 1149555, 1149560,\n", + " 1158724, 1158735, 1158722, 1144690, 1145674, 1150783, 1171973, 1144681,\n", + " 1166653, 1155180, 1155170, 1165011, 1150515, 1164832, 1145529, 1145531,\n", + " 1144346, 1144336, 1157534, 1138383, 1154670, 1135852, 1152998, 1157331,\n", + " 1138130, 1141045, 1141043, 1169352, 1169359, 1154353, 1149452, 1158156,\n", + " 1158611, 1158054, 1149846, 1159840, 1177149, 1152353, 1179597, 1168455,\n", + " 1168413, 1148330, 1177430, 1173307, 1169144, 1154027, 1152154, 1164973,\n", + " 1159658, 1159655, 1157153, 1147708, 1145783, 1157593, 1177413, 1154314,\n", + " 1171805, 1155739, 1162106, 1181021, 1171886, 1180312, 1160150, 1174917,\n", + " 1177680, 1177015, 1150234, 1161591, 1154148, 1158176, 1149173, 1143279,\n", + " 1169761, 1167658, 1153803, 1153805, 1181575, 1177219, 1171396, 1184087,\n", + " 1161255, 1177981, 1171773, 1172010, 1157795, 1143330, 1182801, 1171623,\n", + " 1157132, 1157124, 1176765, 1183707, 1181920, 1180085, 1153898, 1145584,\n", + " 1188789, 1160007, 1162403, 1145626, 1156443, 1180736, 1161906, 1149755,\n", + " 1146252, 1186957, 1155992, 1181141, 1158512, 1186505, 1155899, 1183633,\n", + " 1180942, 1164462, 1168282, 1164227, 1162485, 1154957, 1161819, 1147182,\n", + " 1156170, 1168939, 1181509, 1139828, 1139831, 1192068, 1156055, 1189273,\n", + " 1146392, 1146395, 1173058, 1159085, 1181939, 1182555, 1177307, 1170151,\n", + " 1151774, 1153741, 1152115, 1162502, 1186572, 1171201, 1163142, 1177842,\n", + " 1150406, 1172423, 1172429, 1172122, 1171953, 1181626, 1187104, 1183950,\n", + " 1178135, 1176826, 1181646, 1162656, 1172896, 1181710, 1182854, 1187645],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1136345, 1135160, 1135726, 1141748, 1141751, 1141758, 1138335,\n", + " 1136223, 1136213, 1141250, 1139471, 1143600, 1139821, 1137947, 1138933,\n", + " 1143372, 1146646, 1139609, 1139615, 1148976, 1150497, 1142964, 1148582,\n", + " 1149216, 1149228, 1155686, 1143820, 1147473, 1147477, 1147483, 1147486,\n", + " 1135992, 1153936, 1153943, 1149033, 1134697, 1134700, 1135118, 1148346,\n", + " 1146661, 1136125, 1152671, 1138345, 1148546, 1153217, 1141904, 1155018,\n", + " 1147211, 1136674, 1152427, 1134710, 1146371, 1137834, 1151547, 1138112,\n", + " 1138119, 1140158, 1140020, 1162460, 1135367, 1135202, 1134967, 1141036,\n", + " 1136770, 1134794, 1138504, 1137329, 1137342, 1157088, 1136826, 1137534,\n", + " 1157397, 1136662, 1156152, 1148481, 1140970, 1158136, 1156962, 1154132,\n", + " 1139685, 1139689, 1137287, 1157703, 1157706, 1138436, 1138440, 1138445,\n", + " 1138847, 1135103, 1138696, 1156603, 1147113, 1138185, 1145843, 1139844,\n", + " 1138069, 1142255, 1136085, 1136095, 1134992, 1136730, 1159012, 1144410,\n", + " 1153536, 1143631, 1136071, 1136068, 1138148, 1134891, 1134888, 1152042,\n", + " 1152044, 1152045, 1139069, 1142298, 1140670, 1137734, 1147327, 1135543,\n", + " 1135549, 1141088, 1141094, 1141095, 1141098, 1139898, 1145358, 1135291,\n", + " 1143767, 1137299, 1139033, 1146834, 1141681, 1135860, 1136427, 1136637,\n", + " 1161173, 1141112, 1141648, 1136917, 1143673, 1137198, 1160616, 1141156,\n", + " 1139495, 1144650, 1134987, 1147850, 1144428, 1138490, 1142056, 1142048,\n", + " 1141813, 1141821, 1138465, 1137764, 1143576, 1139190, 1140110, 1142913,\n", + " 1143107, 1136867, 1136864, 1136874, 1140885, 1144182, 1144190, 1137614,\n", + " 1146201, 1136565, 1137854, 1149193, 1162804, 1141367, 1153068, 1141720,\n", + " 1141719, 1149097, 1149101, 1144277, 1143904, 1139510, 1145001, 1164534,\n", + " 1146693, 1146695, 1147050, 1147047, 1145873, 1141925, 1145339, 1140580,\n", + " 1150243, 1148313, 1143643, 1141390, 1145974, 1143845, 1143851, 1163652,\n", + " 1146024, 1147266, 1154328, 1141234, 1139990, 1143293, 1143283, 1143294,\n", + " 1147543, 1147540, 1147282, 1142829, 1142637, 1148003, 1136167, 1142584,\n", + " 1157720, 1136836, 1146100, 1139329, 1139341, 1142149, 1142159, 1143345,\n", + " 1143350, 1145813, 1140845, 1144083, 1138600, 1138602, 1135874, 1150756,\n", + " 1150294, 1150919, 1150567, 1146514, 1143456, 1140483, 1140824, 1146578,\n", + " 1146580, 1147524, 1147523, 1140364, 1137990, 1166404, 1147984, 1147995,\n", + " 1147999, 1134899, 1139252, 1148704, 1142700, 1148473, 1147031, 1143828,\n", + " 1158226, 1150452, 1154526, 1145240, 1145246, 1145750, 1142370, 1138638,\n", + " 1151242, 1152530, 1152538, 1152537, 1150287, 1150445, 1148935, 1154433,\n", + " 1149791, 1144514, 1154825, 1169727, 1151480, 1139919, 1147012, 1158950,\n", + " 1141943, 1141949, 1150731, 1148744, 1153568, 1153574, 1154985, 1147653,\n", + " 1137725, 1154420, 1158799, 1136247, 1136252, 1138204, 1139721, 1152482,\n", + " 1152436, 1157978, 1157983, 1148720, 1148734, 1148729, 1150057, 1148204,\n", + " 1169369, 1154203, 1153124, 1153188, 1153197, 1145111, 1150935, 1147442,\n", + " 1154190, 1148498, 1146565, 1141420, 1150636, 1150637, 1151356, 1147743,\n", + " 1153447, 1153449, 1148957, 1146969, 1146967, 1153257, 1150219, 1146623,\n", + " 1146492, 1152849, 1152409, 1152415, 1152106, 1156324, 1156325, 1153032,\n", + " 1153037, 1150093, 1145546, 1137746, 1137755, 1146307, 1159974, 1136402,\n", + " 1155337, 1151617, 1145278, 1136131, 1136134, 1136142, 1136798, 1140451,\n", + " 1152160, 1140939, 1152341, 1152342, 1156816, 1153311, 1138279, 1138281,\n", + " 1152928, 1151064, 1156399, 1156422, 1148040, 1155202, 1149300, 1155226,\n", + " 1173616, 1168188, 1148628, 1158530, 1158540, 1137458, 1157518, 1142047,\n", + " 1154381, 1157229, 1157547, 1142387, 1158916, 1157064, 1153884, 1155422,\n", + " 1152841, 1152833, 1139484, 1143491, 1135729, 1152180, 1156638, 1151788,\n", + " 1165700, 1139525, 1158308, 1158311, 1155441, 1150136, 1162113, 1162120,\n", + " 1138569, 1154536, 1142755, 1164638, 1138775, 1151379, 1155122, 1152527,\n", + " 1157183, 1149321, 1149519, 1151424, 1146920, 1156460, 1157873, 1155626,\n", + " 1155628, 1156563, 1154555, 1155572, 1158824, 1148835, 1155646, 1154642,\n", + " 1163374, 1179427, 1160896, 1160907, 1150371, 1153317, 1155293, 1143517,\n", + " 1159622, 1151030, 1157288, 1137152, 1158996, 1137381, 1137385, 1137387,\n", + " 1137323, 1164314, 1134685, 1135601, 1148149, 1150661, 1158665, 1149145,\n", + " 1159258, 1144451, 1152209, 1152220, 1167309, 1152498, 1156693, 1140374,\n", + " 1144843, 1142466, 1155971, 1155975, 1153766, 1158846, 1155404, 1149700,\n", + " 1166124, 1136896, 1158760, 1171176, 1158438, 1158439, 1158447, 1158285,\n", + " 1136494, 1136491, 1157575, 1156665, 1156490, 1153808, 1136646, 1151146,\n", + " 1146126, 1164524, 1188202, 1138110, 1155521, 1155528, 1152466, 1157759,\n", + " 1157751, 1162683, 1159042, 1159052, 1159049, 1159056, 1159057, 1172286,\n", + " 1157946, 1153052, 1171551, 1163079, 1163081, 1166246, 1167557, 1144158,\n", + " 1144156, 1165823, 1153843, 1138393, 1162917, 1149070, 1145948, 1155480,\n", + " 1153514, 1153519, 1164857, 1147300, 1158680, 1162564, 1138161, 1164006,\n", + " 1164012, 1156787, 1149963, 1154590, 1139281, 1161001, 1159999, 1140731,\n", + " 1159773, 1146063, 1159560, 1158865, 1158878, 1140643, 1148603, 1141800,\n", + " 1159025, 1159032, 1186971, 1165604, 1165609, 1152247, 1158902, 1155588,\n", + " 1160498, 1156582, 1158405, 1168527, 1144986, 1146510, 1161237, 1144747,\n", + " 1153209, 1151650, 1157052, 1149901, 1156739, 1163260, 1144812, 1162087,\n", + " 1164750, 1156303, 1144054, 1167751, 1169282, 1185486, 1160732, 1147681,\n", + " 1147693, 1145447, 1152624, 1148124, 1139351, 1139345, 1147723, 1145900,\n", + " 1153534, 1168659, 1151752, 1171571, 1181052, 1170980, 1149555, 1149560,\n", + " 1158724, 1158735, 1158722, 1144690, 1145674, 1150783, 1171973, 1144681,\n", + " 1166653, 1155180, 1155170, 1165011, 1150515, 1164832, 1145529, 1145531,\n", + " 1144346, 1144336, 1157534, 1138383, 1154670, 1135852, 1152998, 1157331,\n", + " 1138130, 1141045, 1141043, 1169352, 1169359, 1154353, 1149452, 1158156,\n", + " 1158611, 1158054, 1149846, 1159840, 1177149, 1152353, 1179597, 1168455,\n", + " 1168413, 1148330, 1177430, 1173307, 1169144, 1154027, 1152154, 1164973,\n", + " 1159658, 1159655, 1157153, 1147708, 1145783, 1157593, 1177413, 1154314,\n", + " 1171805, 1155739, 1162106, 1181021, 1171886, 1180312, 1160150, 1174917,\n", + " 1177680, 1177015, 1150234, 1161591, 1154148, 1158176, 1149173, 1143279,\n", + " 1169761, 1167658, 1153803, 1153805, 1181575, 1177219, 1171396, 1184087,\n", + " 1161255, 1177981, 1171773, 1172010, 1157795, 1143330, 1182801, 1171623,\n", + " 1157132, 1157124, 1176765, 1183707, 1181920, 1180085, 1153898, 1145584,\n", + " 1188789, 1160007, 1162403, 1145626, 1156443, 1180736, 1161906, 1149755,\n", + " 1146252, 1186957, 1155992, 1181141, 1158512, 1186505, 1155899, 1183633,\n", + " 1180942, 1164462, 1168282, 1164227, 1162485, 1154957, 1161819, 1147182,\n", + " 1156170, 1168939, 1181509, 1139828, 1139831, 1192068, 1156055, 1189273,\n", + " 1146392, 1146395, 1173058, 1159085, 1181939, 1182555, 1177307, 1170151,\n", + " 1151774, 1153741, 1152115, 1162502, 1186572, 1171201, 1163142, 1177842,\n", + " 1150406, 1172423, 1172429, 1172122, 1171953, 1181626, 1187104, 1183950,\n", + " 1178135, 1176826, 1181646, 1162656, 1172896, 1181710, 1182854, 1187645],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1195697, 1197744, 1199736, 1198248, 1199282, 1202255, 1198832,\n", + " 1201582, 1197777, 1198557, 1194745, 1197164, 1195491, 1199053, 1195511,\n", + " 1195512, 1195263, 1199135, 1196529, 1201992, 1196030, 1195457, 1195888,\n", + " 1195895, 1199171, 1196148, 1195740, 1196334, 1196979, 1197831, 1199371,\n", + " 1195313, 1195325, 1195987, 1195989, 1198036, 1198958, 1195145, 1195221,\n", + " 1197141, 1196249, 1196247, 1195841, 1195918, 1198504, 1195351, 1200949,\n", + " 1197291, 1199185, 1194928, 1199628, 1201639, 1199797, 1199803, 1197676,\n", + " 1195017, 1194795, 1198762, 1200060, 1201511, 1197983, 1201116, 1196727,\n", + " 1195771, 1200887, 1198428, 1199893, 1198811, 1201526, 1200169, 1198786,\n", + " 1201156, 1202629, 1202630, 1201056, 1201041, 1202499, 1196645, 1200429,\n", + " 1197097, 1199886, 1202138, 1199908, 1196779, 1201029, 1200907, 1199976,\n", + " 1200323, 1202714, 1195876, 1195885, 1202209, 1202210, 1199929, 1202304,\n", + " 1196963, 1196966, 1199606, 1195664, 1198929, 1195418, 1200928, 1197822,\n", + " 1197821, 1196415, 1201499, 1200585, 1196373, 1201138, 1194730, 1198147,\n", + " 1198830, 1197735, 1199782, 1198819, 1200707, 1201361, 1194908, 1198751],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1195697, 1197744, 1199736, 1198248, 1199282, 1202255, 1198832,\n", + " 1201582, 1197777, 1198557, 1194745, 1197164, 1195491, 1199053, 1195511,\n", + " 1195512, 1195263, 1199135, 1196529, 1201992, 1196030, 1195457, 1195888,\n", + " 1195895, 1199171, 1196148, 1195740, 1196334, 1196979, 1197831, 1199371,\n", + " 1195313, 1195325, 1195987, 1195989, 1198036, 1198958, 1195145, 1195221,\n", + " 1197141, 1196249, 1196247, 1195841, 1195918, 1198504, 1195351, 1200949,\n", + " 1197291, 1199185, 1194928, 1199628, 1201639, 1199797, 1199803, 1197676,\n", + " 1195017, 1194795, 1198762, 1200060, 1201511, 1197983, 1201116, 1196727,\n", + " 1195771, 1200887, 1198428, 1199893, 1198811, 1201526, 1200169, 1198786,\n", + " 1201156, 1202629, 1202630, 1201056, 1201041, 1202499, 1196645, 1200429,\n", + " 1197097, 1199886, 1202138, 1199908, 1196779, 1201029, 1200907, 1199976,\n", + " 1200323, 1202714, 1195876, 1195885, 1202209, 1202210, 1199929, 1202304,\n", + " 1196963, 1196966, 1199606, 1195664, 1198929, 1195418, 1200928, 1197822,\n", + " 1197821, 1196415, 1201499, 1200585, 1196373, 1201138, 1194730, 1198147,\n", + " 1198830, 1197735, 1199782, 1198819, 1200707, 1201361, 1194908, 1198751],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 5.1737e-02, -8.9742e-04, 3.6105e-01, ..., -4.2562e-04,\n", + " -1.7395e-05, -2.9809e-03],\n", + " [ 7.3244e-02, -7.0254e-04, 3.4986e-01, ..., -1.7039e-04,\n", + " -1.3101e-05, -3.1074e-03],\n", + " [ 5.1737e-02, -8.9742e-04, 3.6105e-01, ..., -4.2562e-04,\n", + " -1.7395e-05, -2.9809e-03],\n", + " ...,\n", + " [ 1.9835e-02, -4.4677e-04, 2.6740e-01, ..., 1.3836e-02,\n", + " -3.6593e-04, -2.7666e-03],\n", + " [ 4.6660e-02, -1.1382e-03, 3.8133e-01, ..., -2.2805e-04,\n", + " 7.7521e-04, -3.1189e-03],\n", + " [ 3.4518e-02, -8.3620e-04, 3.5888e-01, ..., -2.1533e-04,\n", + " -1.1717e-04, -2.9574e-03]], device='cuda:0'), 'paper': tensor([[ 2.4233, -0.0342, 2.2095, ..., -0.0107, -0.0146, 2.4849],\n", + " [ 3.8883, -0.0540, 3.6027, ..., -0.0184, -0.0273, 3.6740],\n", + " [ 2.6528, -0.0329, 2.1113, ..., -0.0100, -0.0140, 2.5643],\n", + " ...,\n", + " [ 2.5426, -0.0343, 2.1314, ..., -0.0095, -0.0136, 2.9124],\n", + " [ 3.2361, -0.0414, 2.9459, ..., -0.0147, -0.0207, 3.2679],\n", + " [ 2.4619, -0.0366, 2.6394, ..., -0.0082, -0.0159, 3.0667]],\n", + " device='cuda:0'), 'author': tensor([[ 5.2193e-01, -3.5538e-03, 4.2435e-02, ..., -1.2800e-03,\n", + " -9.2577e-04, 5.0402e-02],\n", + " [ 4.4873e-01, -4.8643e-03, 7.0067e-02, ..., -3.7178e-03,\n", + " -9.5531e-04, 8.2385e-02],\n", + " [ 5.4802e-01, -4.7611e-03, -1.9377e-04, ..., -2.3507e-03,\n", + " -1.8433e-04, 1.4393e-01],\n", + " ...,\n", + " [ 4.9352e-01, -5.6128e-03, -3.3577e-04, ..., -2.4867e-03,\n", + " 4.4781e-02, 1.7011e-01],\n", + " [ 5.1292e-01, -4.1225e-03, 3.5444e-02, ..., -1.7522e-03,\n", + " -4.1797e-04, 5.7068e-02],\n", + " [ 4.0525e-01, -4.2727e-03, -4.2145e-04, ..., -1.7394e-03,\n", + " -3.3960e-05, 9.9620e-02]], device='cuda:0'), 'field_of_study': tensor([[-0.0110, 0.2031, -0.0036, ..., 1.2689, -0.0021, -0.0072],\n", + " [-0.0085, 0.2545, -0.0034, ..., 1.1194, -0.0023, -0.0065],\n", + " [-0.0109, 0.2080, -0.0042, ..., 1.2320, -0.0026, -0.0080],\n", + " ...,\n", + " [-0.0087, 0.0240, -0.0025, ..., 0.8290, -0.0022, -0.0052],\n", + " [-0.0079, 0.1069, -0.0031, ..., 0.8079, -0.0021, -0.0055],\n", + " [-0.0117, 0.3158, -0.0032, ..., 1.2531, -0.0018, -0.0091]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 118, 164, 21, 432, 357, 199, 216, 216, 404, 175, 175, 381,\n", + " 381, 393, 298, 425, 746, 512, 621, 621, 925, 726, 918, 1009,\n", + " 1037, 1066, 972, 1205, 1151, 1151, 1151, 1208, 1289, 1172, 1172, 1289,\n", + " 1396, 1292, 1292, 1469, 1166, 1166, 1374, 1534, 1504, 1362, 1355, 1355,\n", + " 1446, 1443, 1505, 1676, 1726, 1706, 1718, 1730, 1695, 1706, 1893, 1964,\n", + " 1720, 1942, 2027, 1924, 1754, 1910, 1867, 1867, 1969, 2252, 1920, 2046,\n", + " 2174, 2192, 2151, 2221, 2170, 2258, 2182, 2258, 2258, 2337, 2400, 2343,\n", + " 2471, 2339, 2770, 2577, 2638, 2643, 2566, 2654, 2980, 3056, 3142, 3157,\n", + " 3010, 3191, 3231, 3400, 3400, 3490, 3368, 3397, 3684, 3368, 3368, 3544,\n", + " 3507, 3601, 3816, 3617, 3827, 3933, 3893, 4002, 4112, 4101, 4146, 4294,\n", + " 4294, 4229, 4229, 4229, 4697, 4587, 4587, 4427, 4404, 4540, 4466, 4715,\n", + " 4580, 4757, 4545, 4545, 4617, 4709, 4607, 4457, 4805, 4754, 5130, 5387,\n", + " 5147, 5034, 5034, 5327, 5469, 5061, 5064, 5477, 5142, 5142, 5123, 5522,\n", + " 5425, 5509, 5509, 5505, 5291, 6104, 5429, 5418, 5418, 5418, 5418, 5418,\n", + " 5418, 5683, 5822, 5822, 5929, 5992, 5858, 5886, 5931, 5907, 5776, 5776,\n", + " 6139, 6031, 5860, 5920, 6103, 6092, 6092],\n", + " [ 104, 45, 86, 80, 63, 82, 26, 88, 97, 47, 32, 63,\n", + " 79, 13, 82, 47, 82, 113, 66, 77, 40, 47, 11, 103,\n", + " 20, 55, 28, 15, 25, 78, 118, 55, 3, 41, 14, 31,\n", + " 73, 39, 29, 51, 85, 71, 60, 12, 85, 100, 35, 15,\n", + " 65, 0, 58, 40, 68, 63, 116, 30, 82, 106, 55, 40,\n", + " 45, 53, 67, 45, 116, 63, 61, 69, 14, 47, 21, 86,\n", + " 53, 13, 19, 72, 100, 93, 32, 22, 48, 105, 82, 73,\n", + " 82, 12, 26, 103, 23, 71, 26, 103, 63, 45, 86, 55,\n", + " 76, 115, 108, 52, 84, 19, 7, 96, 51, 55, 4, 91,\n", + " 89, 61, 49, 101, 19, 117, 17, 85, 74, 92, 16, 1,\n", + " 37, 102, 20, 90, 117, 75, 66, 55, 107, 5, 81, 46,\n", + " 52, 52, 111, 52, 119, 27, 57, 52, 29, 62, 52, 10,\n", + " 9, 52, 84, 86, 70, 98, 43, 2, 94, 44, 24, 8,\n", + " 64, 112, 48, 16, 33, 63, 117, 115, 87, 59, 110, 54,\n", + " 99, 114, 90, 83, 51, 42, 6, 18, 75, 56, 36, 38,\n", + " 50, 20, 95, 99, 109, 6, 34]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2718, 2741, 3174, ..., 988, 2741, 578],\n", + " [ 202, 218, 150, ..., 6063, 5980, 6016]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 58, 82, 29, ..., 47, 49, 19],\n", + " [ 26, 8, 81, ..., 6166, 6089, 6156]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 232, 232, 232, ..., 5880, 5880, 6074],\n", + " [ 293, 13, 351, ..., 417, 682, 344]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 673, 71, 249, ..., 607, 251, 251],\n", + " [ 20, 131, 24, ..., 6080, 5974, 6070]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5468, 5558, 1572, ..., 4385, 4484, 4568],\n", + " [ 34, 21, 153, ..., 6031, 6031, 6092]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 232, 232, 232, ..., 5880, 5880, 5880],\n", + " [ 421, 484, 544, ..., 3585, 3786, 4211]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 21, 11, 11, ..., 6092, 6092, 6092],\n", + " [5558, 1099, 864, ..., 5441, 5449, 5337]], device='cuda:0')}\n", + "Epoch: 001, Loss: 1.0230, Train: 244.6000\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.007484\n", + "sampling 0.007031\n", + "noi time: 0.002206\n", + "get_vertex_data call: 0.069707\n", + "noi group time: 0.003644\n", + "eoi_group_time: 0.01361\n", + "second half: 0.249576\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 19138, 16691, 31145, ..., 1132465, 1120069, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 19138, 16691, 31145, ..., 1132465, 1120069, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1216136, 1203800, 1231359, ..., 1937000, 1936963, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1216136, 1203800, 1231359, ..., 1937000, 1936963, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1141424, 1135926, 1138555, 1135716, 1135723, 1135726, 1140787,\n", + " 1141756, 1141758, 1138335, 1139462, 1136156, 1136969, 1141443, 1146803,\n", + " 1138897, 1138906, 1143600, 1146978, 1146983, 1145989, 1145992, 1137268,\n", + " 1143366, 1143372, 1146644, 1140781, 1148987, 1150506, 1150509, 1142964,\n", + " 1136959, 1149216, 1143820, 1149646, 1147473, 1147483, 1141882, 1142881,\n", + " 1153940, 1144636, 1149037, 1146992, 1146660, 1153217, 1153223, 1147101,\n", + " 1135144, 1150554, 1155014, 1139373, 1147211, 1136683, 1136685, 1150322,\n", + " 1152427, 1134710, 1146376, 1134806, 1140313, 1140540, 1138112, 1135179,\n", + " 1137171, 1149461, 1138366, 1153463, 1140158, 1135909, 1135910, 1140020,\n", + " 1140029, 1162460, 1135367, 1135202, 1135204, 1140767, 1134974, 1141036,\n", + " 1134794, 1143377, 1138504, 1137342, 1157088, 1137693, 1136619, 1144395,\n", + " 1136714, 1157398, 1157397, 1136662, 1137441, 1143321, 1137472, 1136928,\n", + " 1135265, 1139161, 1134841, 1141703, 1135579, 1135583, 1142596, 1141081,\n", + " 1136111, 1140240, 1140970, 1138514, 1153094, 1153101, 1153092, 1137957,\n", + " 1158136, 1137019, 1156899, 1139684, 1139687, 1139874, 1157702, 1138440,\n", + " 1138445, 1138461, 1158386, 1149328, 1138843, 1138847, 1156603, 1156606,\n", + " 1147112, 1147118, 1142611, 1160819, 1138190, 1158984, 1145843, 1145851,\n", + " 1148531, 1137423, 1135760, 1138067, 1138069, 1136089, 1134992, 1135002,\n", + " 1134771, 1152654, 1135776, 1139751, 1136730, 1140199, 1139318, 1141070,\n", + " 1153543, 1143631, 1139084, 1136068, 1139929, 1139934, 1137587, 1138648,\n", + " 1138148, 1146075, 1140551, 1152042, 1152044, 1140656, 1137734, 1137728,\n", + " 1146222, 1134738, 1134742, 1134750, 1135540, 1141088, 1141098, 1149001,\n", + " 1143767, 1154860, 1137299, 1143225, 1137674, 1139032, 1149979, 1152719,\n", + " 1135860, 1136426, 1139436, 1136637, 1141224, 1139386, 1159794, 1136917,\n", + " 1143673, 1143677, 1144230, 1140607, 1141155, 1141156, 1141161, 1141785,\n", + " 1139495, 1141609, 1144650, 1147844, 1147850, 1137074, 1144417, 1144428,\n", + " 1142050, 1143158, 1143153, 1146787, 1145161, 1143203, 1140175, 1158746,\n", + " 1158749, 1137764, 1137771, 1149105, 1148871, 1139190, 1137062, 1138708,\n", + " 1140102, 1142913, 1143107, 1143111, 1144596, 1142843, 1142840, 1136866,\n", + " 1136867, 1136864, 1140885, 1140442, 1144182, 1150906, 1158699, 1138529,\n", + " 1140501, 1137846, 1137841, 1147153, 1136378, 1141365, 1141367, 1151109,\n", + " 1149101, 1138292, 1138293, 1143919, 1139508, 1139510, 1139769, 1140093,\n", + " 1139127, 1145000, 1145200, 1140619, 1139171, 1143692, 1147050, 1145873,\n", + " 1143543, 1152976, 1135457, 1135459, 1142555, 1139447, 1139448, 1138995,\n", + " 1141925, 1141933, 1144241, 1144242, 1141853, 1137149, 1150243, 1137571,\n", + " 1134852, 1134861, 1141382, 1145976, 1145974, 1143851, 1142098, 1146024,\n", + " 1146025, 1138085, 1146140, 1146131, 1141235, 1139990, 1143293, 1151124,\n", + " 1150423, 1147543, 1148763, 1147282, 1142816, 1138669, 1149155, 1149162,\n", + " 1147458, 1142637, 1149366, 1149372, 1139417, 1143052, 1148408, 1148414,\n", + " 1142584, 1138923, 1157720, 1136836, 1141496, 1138226, 1139051, 1142159,\n", + " 1142158, 1143345, 1144765, 1144766, 1137089, 1137098, 1144093, 1139969,\n", + " 1139979, 1135876, 1150919, 1143957, 1143456, 1143457, 1143007, 1137703,\n", + " 1144291, 1140483, 1143937, 1135454, 1140824, 1140829, 1146590, 1147581,\n", + " 1147574, 1146626, 1147521, 1140361, 1140364, 1143080, 1143079, 1144219,\n", + " 1147999, 1139252, 1147244, 1148704, 1148466, 1153701, 1152328, 1147056,\n", + " 1149722, 1147025, 1147027, 1147257, 1147248, 1141131, 1147198, 1158226,\n", + " 1147880, 1145240, 1145750, 1145751, 1142369, 1142376, 1148387, 1146178,\n", + " 1151242, 1152530, 1152531, 1148941, 1154438, 1151856, 1149791, 1144514,\n", + " 1144526, 1146887, 1150350, 1144203, 1169727, 1147796, 1151487, 1151473,\n", + " 1152022, 1154263, 1146723, 1134869, 1140403, 1150127, 1147021, 1147023,\n", + " 1158949, 1141949, 1146772, 1148740, 1148744, 1153574, 1162284, 1147653,\n", + " 1143567, 1149412, 1148288, 1139096, 1154420, 1148180, 1139718, 1152435,\n", + " 1152441, 1148720, 1148725, 1148729, 1144110, 1146547, 1139936, 1148204,\n", + " 1153181, 1171943, 1153124, 1153192, 1153188, 1153197, 1145104, 1159828,\n", + " 1152974, 1152867, 1152877, 1152878, 1143091, 1150356, 1151816, 1135311,\n", + " 1135302, 1151906, 1151908, 1154182, 1145640, 1148498, 1141420, 1141408,\n", + " 1136002, 1136004, 1151351, 1151345, 1151358, 1147602, 1153449, 1145079,\n", + " 1146969, 1146975, 1151927, 1146623, 1142986, 1146488, 1152407, 1152409,\n", + " 1152415, 1152098, 1152100, 1156325, 1153030, 1153032, 1153038, 1150085,\n", + " 1137746, 1146304, 1152608, 1152622, 1140521, 1136401, 1149203, 1152819,\n", + " 1152826, 1155337, 1154123, 1155354, 1152673, 1151617, 1151623, 1150578,\n", + " 1145278, 1136134, 1136798, 1148916, 1148921, 1152944, 1152958, 1152903,\n", + " 1152341, 1156831, 1153310, 1153311, 1138283, 1138281, 1156001, 1156002,\n", + " 1136028, 1136031, 1158704, 1151195, 1152928, 1151064, 1156387, 1154728,\n", + " 1142777, 1156416, 1148040, 1149794, 1149804, 1137048, 1148628, 1158530,\n", + " 1158540, 1158529, 1148376, 1137458, 1153869, 1148255, 1154374, 1158854,\n", + " 1150872, 1137873, 1156505, 1157064, 1157071, 1157067, 1152833, 1145191,\n", + " 1139473, 1143502, 1150465, 1142221, 1135730, 1152183, 1151788, 1157913,\n", + " 1150828, 1156935, 1156942, 1156932, 1156939, 1153410, 1139525, 1158308,\n", + " 1151331, 1155441, 1140865, 1140866, 1154530, 1150484, 1156207, 1156271,\n", + " 1157642, 1151379, 1158639, 1155122, 1152527, 1157183, 1155755, 1151424,\n", + " 1145799, 1155667, 1155628, 1154555, 1161430, 1158824, 1158829, 1177952,\n", + " 1154036, 1148835, 1155646, 1161231, 1154649, 1154250, 1154240, 1151892,\n", + " 1137359, 1154902, 1154909, 1163132, 1143189, 1157430, 1150987, 1159622,\n", + " 1157928, 1157288, 1157663, 1157653, 1158123, 1156760, 1158996, 1153776,\n", + " 1153786, 1149904, 1137381, 1137385, 1137380, 1138262, 1158347, 1140920,\n", + " 1134677, 1135601, 1148149, 1150661, 1158502, 1158665, 1157685, 1149145,\n", + " 1152222, 1156693, 1140381, 1155971, 1155975, 1158841, 1156807, 1155393,\n", + " 1154600, 1159454, 1136897, 1136896, 1158891, 1157304, 1153632, 1155305,\n", + " 1152143, 1153808, 1136640, 1136646, 1166421, 1180565, 1157858, 1158558,\n", + " 1165497, 1138101, 1138110, 1155871, 1158006, 1144581, 1155528, 1135662,\n", + " 1142657, 1142663, 1142666, 1150684, 1157751, 1156032, 1159042, 1159052,\n", + " 1144270, 1159071, 1142426, 1142427, 1158303, 1160563, 1153052, 1167707,\n", + " 1156226, 1156235, 1156107, 1160651, 1150033, 1150046, 1149063, 1149070,\n", + " 1153514, 1153519, 1147300, 1157600, 1138161, 1138168, 1164006, 1149963,\n", + " 1154578, 1139592, 1166936, 1146353, 1164055, 1170415, 1140643, 1141862,\n", + " 1148600, 1148603, 1143139, 1156361, 1158653, 1156187, 1156181, 1159025,\n", + " 1159032, 1165604, 1168106, 1169116, 1152247, 1155590, 1164592, 1153934,\n", + " 1168420, 1168194, 1168515, 1167933, 1149011, 1146500, 1153247, 1144739,\n", + " 1144747, 1155046, 1141471, 1151650, 1147426, 1156739, 1160849, 1153663,\n", + " 1150649, 1163260, 1144812, 1168850, 1135567, 1165718, 1142722, 1142733,\n", + " 1156303, 1145227, 1169282, 1154695, 1166462, 1144972, 1144973, 1146444,\n", + " 1147355, 1152624, 1139351, 1145900, 1145902, 1153534, 1168659, 1151755,\n", + " 1171581, 1152203, 1181040, 1175240, 1143395, 1143402, 1143404, 1169742,\n", + " 1149555, 1158722, 1147338, 1169602, 1167817, 1166653, 1165018, 1164836,\n", + " 1156119, 1144336, 1157527, 1157534, 1138376, 1138369, 1154670, 1168433,\n", + " 1154882, 1169164, 1169162, 1157331, 1157333, 1138130, 1169359, 1154353,\n", + " 1154354, 1154352, 1172750, 1149452, 1149688, 1158623, 1149847, 1192054,\n", + " 1172882, 1152353, 1152359, 1152360, 1168400, 1169133, 1148667, 1148666,\n", + " 1148328, 1148331, 1177984, 1173307, 1154027, 1152150, 1159655, 1151210,\n", + " 1157153, 1147711, 1157593, 1149237, 1149247, 1166827, 1135021, 1170688,\n", + " 1173660, 1168345, 1144549, 1153429, 1166682, 1166684, 1150234, 1154148,\n", + " 1158187, 1178889, 1149179, 1149173, 1179811, 1176292, 1178610, 1186117,\n", + " 1143420, 1171297, 1170178, 1153803, 1153141, 1189183, 1151509, 1151519,\n", + " 1158030, 1178920, 1161255, 1182353, 1155262, 1176675, 1157795, 1171623,\n", + " 1164032, 1155804, 1157992, 1182011, 1178955, 1158252, 1153898, 1153899,\n", + " 1188798, 1180753, 1178214, 1178216, 1162403, 1145626, 1145618, 1172022,\n", + " 1178028, 1180383, 1161067, 1149753, 1149755, 1153605, 1165186, 1157772,\n", + " 1158512, 1155898, 1155899, 1181981, 1185431, 1182896, 1168273, 1162441,\n", + " 1185409, 1188835, 1164437, 1181548, 1163421, 1188525, 1164271, 1170806,\n", + " 1180019, 1147182, 1170034, 1178247, 1168943, 1181509, 1139831, 1154812,\n", + " 1164924, 1163848, 1149627, 1156055, 1178549, 1151972, 1173019, 1188295,\n", + " 1186695, 1172384, 1170713, 1177477, 1181939, 1189543, 1190246, 1179420,\n", + " 1162156, 1192809, 1178986, 1151774, 1178488, 1182169, 1162502, 1184859,\n", + " 1153597, 1171201, 1177845, 1156681, 1156672, 1194229, 1171957, 1158064,\n", + " 1181616, 1145398, 1167739, 1167741, 1190784, 1180528, 1177812, 1152080,\n", + " 1155956, 1162656, 1172903, 1173110, 1190211, 1187159, 1191771, 1182852,\n", + " 1191003, 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1141424, 1135926, 1138555, 1135716, 1135723, 1135726, 1140787,\n", + " 1141756, 1141758, 1138335, 1139462, 1136156, 1136969, 1141443, 1146803,\n", + " 1138897, 1138906, 1143600, 1146978, 1146983, 1145989, 1145992, 1137268,\n", + " 1143366, 1143372, 1146644, 1140781, 1148987, 1150506, 1150509, 1142964,\n", + " 1136959, 1149216, 1143820, 1149646, 1147473, 1147483, 1141882, 1142881,\n", + " 1153940, 1144636, 1149037, 1146992, 1146660, 1153217, 1153223, 1147101,\n", + " 1135144, 1150554, 1155014, 1139373, 1147211, 1136683, 1136685, 1150322,\n", + " 1152427, 1134710, 1146376, 1134806, 1140313, 1140540, 1138112, 1135179,\n", + " 1137171, 1149461, 1138366, 1153463, 1140158, 1135909, 1135910, 1140020,\n", + " 1140029, 1162460, 1135367, 1135202, 1135204, 1140767, 1134974, 1141036,\n", + " 1134794, 1143377, 1138504, 1137342, 1157088, 1137693, 1136619, 1144395,\n", + " 1136714, 1157398, 1157397, 1136662, 1137441, 1143321, 1137472, 1136928,\n", + " 1135265, 1139161, 1134841, 1141703, 1135579, 1135583, 1142596, 1141081,\n", + " 1136111, 1140240, 1140970, 1138514, 1153094, 1153101, 1153092, 1137957,\n", + " 1158136, 1137019, 1156899, 1139684, 1139687, 1139874, 1157702, 1138440,\n", + " 1138445, 1138461, 1158386, 1149328, 1138843, 1138847, 1156603, 1156606,\n", + " 1147112, 1147118, 1142611, 1160819, 1138190, 1158984, 1145843, 1145851,\n", + " 1148531, 1137423, 1135760, 1138067, 1138069, 1136089, 1134992, 1135002,\n", + " 1134771, 1152654, 1135776, 1139751, 1136730, 1140199, 1139318, 1141070,\n", + " 1153543, 1143631, 1139084, 1136068, 1139929, 1139934, 1137587, 1138648,\n", + " 1138148, 1146075, 1140551, 1152042, 1152044, 1140656, 1137734, 1137728,\n", + " 1146222, 1134738, 1134742, 1134750, 1135540, 1141088, 1141098, 1149001,\n", + " 1143767, 1154860, 1137299, 1143225, 1137674, 1139032, 1149979, 1152719,\n", + " 1135860, 1136426, 1139436, 1136637, 1141224, 1139386, 1159794, 1136917,\n", + " 1143673, 1143677, 1144230, 1140607, 1141155, 1141156, 1141161, 1141785,\n", + " 1139495, 1141609, 1144650, 1147844, 1147850, 1137074, 1144417, 1144428,\n", + " 1142050, 1143158, 1143153, 1146787, 1145161, 1143203, 1140175, 1158746,\n", + " 1158749, 1137764, 1137771, 1149105, 1148871, 1139190, 1137062, 1138708,\n", + " 1140102, 1142913, 1143107, 1143111, 1144596, 1142843, 1142840, 1136866,\n", + " 1136867, 1136864, 1140885, 1140442, 1144182, 1150906, 1158699, 1138529,\n", + " 1140501, 1137846, 1137841, 1147153, 1136378, 1141365, 1141367, 1151109,\n", + " 1149101, 1138292, 1138293, 1143919, 1139508, 1139510, 1139769, 1140093,\n", + " 1139127, 1145000, 1145200, 1140619, 1139171, 1143692, 1147050, 1145873,\n", + " 1143543, 1152976, 1135457, 1135459, 1142555, 1139447, 1139448, 1138995,\n", + " 1141925, 1141933, 1144241, 1144242, 1141853, 1137149, 1150243, 1137571,\n", + " 1134852, 1134861, 1141382, 1145976, 1145974, 1143851, 1142098, 1146024,\n", + " 1146025, 1138085, 1146140, 1146131, 1141235, 1139990, 1143293, 1151124,\n", + " 1150423, 1147543, 1148763, 1147282, 1142816, 1138669, 1149155, 1149162,\n", + " 1147458, 1142637, 1149366, 1149372, 1139417, 1143052, 1148408, 1148414,\n", + " 1142584, 1138923, 1157720, 1136836, 1141496, 1138226, 1139051, 1142159,\n", + " 1142158, 1143345, 1144765, 1144766, 1137089, 1137098, 1144093, 1139969,\n", + " 1139979, 1135876, 1150919, 1143957, 1143456, 1143457, 1143007, 1137703,\n", + " 1144291, 1140483, 1143937, 1135454, 1140824, 1140829, 1146590, 1147581,\n", + " 1147574, 1146626, 1147521, 1140361, 1140364, 1143080, 1143079, 1144219,\n", + " 1147999, 1139252, 1147244, 1148704, 1148466, 1153701, 1152328, 1147056,\n", + " 1149722, 1147025, 1147027, 1147257, 1147248, 1141131, 1147198, 1158226,\n", + " 1147880, 1145240, 1145750, 1145751, 1142369, 1142376, 1148387, 1146178,\n", + " 1151242, 1152530, 1152531, 1148941, 1154438, 1151856, 1149791, 1144514,\n", + " 1144526, 1146887, 1150350, 1144203, 1169727, 1147796, 1151487, 1151473,\n", + " 1152022, 1154263, 1146723, 1134869, 1140403, 1150127, 1147021, 1147023,\n", + " 1158949, 1141949, 1146772, 1148740, 1148744, 1153574, 1162284, 1147653,\n", + " 1143567, 1149412, 1148288, 1139096, 1154420, 1148180, 1139718, 1152435,\n", + " 1152441, 1148720, 1148725, 1148729, 1144110, 1146547, 1139936, 1148204,\n", + " 1153181, 1171943, 1153124, 1153192, 1153188, 1153197, 1145104, 1159828,\n", + " 1152974, 1152867, 1152877, 1152878, 1143091, 1150356, 1151816, 1135311,\n", + " 1135302, 1151906, 1151908, 1154182, 1145640, 1148498, 1141420, 1141408,\n", + " 1136002, 1136004, 1151351, 1151345, 1151358, 1147602, 1153449, 1145079,\n", + " 1146969, 1146975, 1151927, 1146623, 1142986, 1146488, 1152407, 1152409,\n", + " 1152415, 1152098, 1152100, 1156325, 1153030, 1153032, 1153038, 1150085,\n", + " 1137746, 1146304, 1152608, 1152622, 1140521, 1136401, 1149203, 1152819,\n", + " 1152826, 1155337, 1154123, 1155354, 1152673, 1151617, 1151623, 1150578,\n", + " 1145278, 1136134, 1136798, 1148916, 1148921, 1152944, 1152958, 1152903,\n", + " 1152341, 1156831, 1153310, 1153311, 1138283, 1138281, 1156001, 1156002,\n", + " 1136028, 1136031, 1158704, 1151195, 1152928, 1151064, 1156387, 1154728,\n", + " 1142777, 1156416, 1148040, 1149794, 1149804, 1137048, 1148628, 1158530,\n", + " 1158540, 1158529, 1148376, 1137458, 1153869, 1148255, 1154374, 1158854,\n", + " 1150872, 1137873, 1156505, 1157064, 1157071, 1157067, 1152833, 1145191,\n", + " 1139473, 1143502, 1150465, 1142221, 1135730, 1152183, 1151788, 1157913,\n", + " 1150828, 1156935, 1156942, 1156932, 1156939, 1153410, 1139525, 1158308,\n", + " 1151331, 1155441, 1140865, 1140866, 1154530, 1150484, 1156207, 1156271,\n", + " 1157642, 1151379, 1158639, 1155122, 1152527, 1157183, 1155755, 1151424,\n", + " 1145799, 1155667, 1155628, 1154555, 1161430, 1158824, 1158829, 1177952,\n", + " 1154036, 1148835, 1155646, 1161231, 1154649, 1154250, 1154240, 1151892,\n", + " 1137359, 1154902, 1154909, 1163132, 1143189, 1157430, 1150987, 1159622,\n", + " 1157928, 1157288, 1157663, 1157653, 1158123, 1156760, 1158996, 1153776,\n", + " 1153786, 1149904, 1137381, 1137385, 1137380, 1138262, 1158347, 1140920,\n", + " 1134677, 1135601, 1148149, 1150661, 1158502, 1158665, 1157685, 1149145,\n", + " 1152222, 1156693, 1140381, 1155971, 1155975, 1158841, 1156807, 1155393,\n", + " 1154600, 1159454, 1136897, 1136896, 1158891, 1157304, 1153632, 1155305,\n", + " 1152143, 1153808, 1136640, 1136646, 1166421, 1180565, 1157858, 1158558,\n", + " 1165497, 1138101, 1138110, 1155871, 1158006, 1144581, 1155528, 1135662,\n", + " 1142657, 1142663, 1142666, 1150684, 1157751, 1156032, 1159042, 1159052,\n", + " 1144270, 1159071, 1142426, 1142427, 1158303, 1160563, 1153052, 1167707,\n", + " 1156226, 1156235, 1156107, 1160651, 1150033, 1150046, 1149063, 1149070,\n", + " 1153514, 1153519, 1147300, 1157600, 1138161, 1138168, 1164006, 1149963,\n", + " 1154578, 1139592, 1166936, 1146353, 1164055, 1170415, 1140643, 1141862,\n", + " 1148600, 1148603, 1143139, 1156361, 1158653, 1156187, 1156181, 1159025,\n", + " 1159032, 1165604, 1168106, 1169116, 1152247, 1155590, 1164592, 1153934,\n", + " 1168420, 1168194, 1168515, 1167933, 1149011, 1146500, 1153247, 1144739,\n", + " 1144747, 1155046, 1141471, 1151650, 1147426, 1156739, 1160849, 1153663,\n", + " 1150649, 1163260, 1144812, 1168850, 1135567, 1165718, 1142722, 1142733,\n", + " 1156303, 1145227, 1169282, 1154695, 1166462, 1144972, 1144973, 1146444,\n", + " 1147355, 1152624, 1139351, 1145900, 1145902, 1153534, 1168659, 1151755,\n", + " 1171581, 1152203, 1181040, 1175240, 1143395, 1143402, 1143404, 1169742,\n", + " 1149555, 1158722, 1147338, 1169602, 1167817, 1166653, 1165018, 1164836,\n", + " 1156119, 1144336, 1157527, 1157534, 1138376, 1138369, 1154670, 1168433,\n", + " 1154882, 1169164, 1169162, 1157331, 1157333, 1138130, 1169359, 1154353,\n", + " 1154354, 1154352, 1172750, 1149452, 1149688, 1158623, 1149847, 1192054,\n", + " 1172882, 1152353, 1152359, 1152360, 1168400, 1169133, 1148667, 1148666,\n", + " 1148328, 1148331, 1177984, 1173307, 1154027, 1152150, 1159655, 1151210,\n", + " 1157153, 1147711, 1157593, 1149237, 1149247, 1166827, 1135021, 1170688,\n", + " 1173660, 1168345, 1144549, 1153429, 1166682, 1166684, 1150234, 1154148,\n", + " 1158187, 1178889, 1149179, 1149173, 1179811, 1176292, 1178610, 1186117,\n", + " 1143420, 1171297, 1170178, 1153803, 1153141, 1189183, 1151509, 1151519,\n", + " 1158030, 1178920, 1161255, 1182353, 1155262, 1176675, 1157795, 1171623,\n", + " 1164032, 1155804, 1157992, 1182011, 1178955, 1158252, 1153898, 1153899,\n", + " 1188798, 1180753, 1178214, 1178216, 1162403, 1145626, 1145618, 1172022,\n", + " 1178028, 1180383, 1161067, 1149753, 1149755, 1153605, 1165186, 1157772,\n", + " 1158512, 1155898, 1155899, 1181981, 1185431, 1182896, 1168273, 1162441,\n", + " 1185409, 1188835, 1164437, 1181548, 1163421, 1188525, 1164271, 1170806,\n", + " 1180019, 1147182, 1170034, 1178247, 1168943, 1181509, 1139831, 1154812,\n", + " 1164924, 1163848, 1149627, 1156055, 1178549, 1151972, 1173019, 1188295,\n", + " 1186695, 1172384, 1170713, 1177477, 1181939, 1189543, 1190246, 1179420,\n", + " 1162156, 1192809, 1178986, 1151774, 1178488, 1182169, 1162502, 1184859,\n", + " 1153597, 1171201, 1177845, 1156681, 1156672, 1194229, 1171957, 1158064,\n", + " 1181616, 1145398, 1167739, 1167741, 1190784, 1180528, 1177812, 1152080,\n", + " 1155956, 1162656, 1172903, 1173110, 1190211, 1187159, 1191771, 1182852,\n", + " 1191003, 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199424, 1196800, 1195860, 1199282, 1202255, 1198844, 1201577, 1201582,\n", + " 1194626, 1200643, 1198633, 1198702, 1202803, 1202804, 1198558, 1197512,\n", + " 1194866, 1194743, 1195726, 1194782, 1195263, 1199135, 1201992, 1195187,\n", + " 1197697, 1198317, 1195888, 1199171, 1196359, 1194754, 1195313, 1196835,\n", + " 1196171, 1195579, 1195148, 1195265, 1195270, 1195278, 1196242, 1195245,\n", + " 1197265, 1196109, 1194859, 1195841, 1198925, 1195541, 1202916, 1197478,\n", + " 1197253, 1202017, 1199697, 1200949, 1196043, 1199059, 1199185, 1194928,\n", + " 1197583, 1199616, 1199628, 1201636, 1202381, 1200878, 1198404, 1194786,\n", + " 1194795, 1201511, 1197689, 1197976, 1201116, 1196727, 1196734, 1195771,\n", + " 1198428, 1199421, 1202417, 1197214, 1202630, 1201056, 1200913, 1194805,\n", + " 1199546, 1202640, 1199712, 1201043, 1201737, 1200429, 1202061, 1199887,\n", + " 1201752, 1199917, 1201442, 1202239, 1202175, 1200327, 1201291, 1195607,\n", + " 1203329, 1202209, 1199929, 1196966, 1200790, 1199606, 1202555, 1195438,\n", + " 1196827, 1195669, 1195664, 1200445, 1195415, 1195420, 1197066, 1197811,\n", + " 1197816, 1197822, 1199778, 1196602, 1198147, 1197735, 1199786, 1199787,\n", + " 1198819, 1200296, 1200301, 1203296, 1202075, 1196428], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199424, 1196800, 1195860, 1199282, 1202255, 1198844, 1201577, 1201582,\n", + " 1194626, 1200643, 1198633, 1198702, 1202803, 1202804, 1198558, 1197512,\n", + " 1194866, 1194743, 1195726, 1194782, 1195263, 1199135, 1201992, 1195187,\n", + " 1197697, 1198317, 1195888, 1199171, 1196359, 1194754, 1195313, 1196835,\n", + " 1196171, 1195579, 1195148, 1195265, 1195270, 1195278, 1196242, 1195245,\n", + " 1197265, 1196109, 1194859, 1195841, 1198925, 1195541, 1202916, 1197478,\n", + " 1197253, 1202017, 1199697, 1200949, 1196043, 1199059, 1199185, 1194928,\n", + " 1197583, 1199616, 1199628, 1201636, 1202381, 1200878, 1198404, 1194786,\n", + " 1194795, 1201511, 1197689, 1197976, 1201116, 1196727, 1196734, 1195771,\n", + " 1198428, 1199421, 1202417, 1197214, 1202630, 1201056, 1200913, 1194805,\n", + " 1199546, 1202640, 1199712, 1201043, 1201737, 1200429, 1202061, 1199887,\n", + " 1201752, 1199917, 1201442, 1202239, 1202175, 1200327, 1201291, 1195607,\n", + " 1203329, 1202209, 1199929, 1196966, 1200790, 1199606, 1202555, 1195438,\n", + " 1196827, 1195669, 1195664, 1200445, 1195415, 1195420, 1197066, 1197811,\n", + " 1197816, 1197822, 1199778, 1196602, 1198147, 1197735, 1199786, 1199787,\n", + " 1198819, 1200296, 1200301, 1203296, 1202075, 1196428], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 3.7368e-02, -2.7283e-04, 2.7082e-01, ..., 1.5655e-02,\n", + " -2.4213e-04, -2.5679e-03],\n", + " [ 3.7386e-02, 7.5596e-03, 2.5725e-01, ..., 7.4647e-03,\n", + " -2.7715e-04, -2.6410e-03],\n", + " [ 4.2516e-02, -5.0800e-04, 3.3846e-01, ..., -3.3395e-04,\n", + " -1.0794e-04, -3.0180e-03],\n", + " ...,\n", + " [ 7.4718e-03, -2.6454e-04, 2.6259e-01, ..., 2.0169e-02,\n", + " -4.3370e-04, -2.6364e-03],\n", + " [-8.8673e-05, -2.4266e-04, 2.9993e-01, ..., 2.4016e-02,\n", + " -4.7760e-04, -2.6777e-03],\n", + " [ 5.9636e-02, -8.1591e-04, 3.5503e-01, ..., -3.4962e-04,\n", + " -1.0035e-04, -3.0148e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 2.2939, -0.0325, 2.3872, ..., -0.0081, -0.0140, 2.5310],\n", + " [ 2.3693, -0.0329, 2.3674, ..., -0.0087, -0.0165, 3.0524],\n", + " [ 2.6877, -0.0366, 2.2917, ..., -0.0136, -0.0147, 2.4354],\n", + " ...,\n", + " [ 3.7538, -0.0580, 2.3283, ..., -0.0217, -0.0177, 2.8106],\n", + " [ 3.8193, -0.0591, 2.1015, ..., -0.0226, -0.0180, 3.0109],\n", + " [ 2.4536, -0.0365, 2.6297, ..., -0.0083, -0.0158, 3.0543]],\n", + " device='cuda:0', grad_fn=), 'author': tensor([[ 4.8492e-01, -3.6416e-03, -1.6069e-04, ..., -4.0048e-03,\n", + " -1.3780e-03, 1.2308e-01],\n", + " [ 5.0694e-01, -3.2107e-03, 4.9390e-02, ..., -1.7806e-03,\n", + " -9.3658e-04, 4.0759e-02],\n", + " [ 5.8357e-01, -5.7206e-03, -4.0363e-04, ..., -3.8954e-03,\n", + " 2.9662e-02, 2.0942e-01],\n", + " ...,\n", + " [ 3.7886e-01, -2.5798e-03, 1.0261e-02, ..., -1.1527e-03,\n", + " -1.8896e-03, -1.6135e-04],\n", + " [ 5.0185e-01, -5.2734e-03, -4.8641e-04, ..., -2.1968e-03,\n", + " 5.3001e-02, 1.9897e-01],\n", + " [ 5.5978e-01, -5.5210e-03, -2.2569e-04, ..., -2.6323e-03,\n", + " 4.4696e-02, 1.7861e-01]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-0.0128, 0.2423, -0.0047, ..., 1.3087, -0.0023, -0.0055],\n", + " [-0.0094, 0.1611, -0.0037, ..., 1.1233, -0.0019, -0.0062],\n", + " [-0.0101, 0.1927, -0.0036, ..., 1.1267, -0.0024, -0.0053],\n", + " ...,\n", + " [-0.0105, 0.1859, -0.0037, ..., 1.1942, -0.0022, -0.0061],\n", + " [-0.0129, 0.2740, -0.0047, ..., 1.5578, -0.0042, -0.0091],\n", + " [-0.0124, 0.2577, -0.0052, ..., 1.5666, -0.0039, -0.0090]],\n", + " device='cuda:0', grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 85, 527, 501, 490, 483, 305, 375, 683, 473, 473, 1010, 668,\n", + " 461, 750, 778, 1104, 1104, 1104, 1104, 958, 958, 958, 800, 1351,\n", + " 994, 1201, 1206, 1117, 1117, 874, 1005, 984, 846, 1067, 917, 1138,\n", + " 1166, 1228, 1228, 1281, 1584, 1584, 1417, 1585, 1166, 1166, 1166, 1166,\n", + " 1166, 1428, 1369, 1281, 1281, 1415, 1415, 1635, 1714, 1620, 1620, 1620,\n", + " 1535, 1535, 1535, 1718, 1817, 1817, 1793, 1793, 1877, 1764, 1901, 1826,\n", + " 1826, 1826, 1991, 1989, 1989, 1989, 1989, 1989, 1888, 2062, 1984, 1995,\n", + " 2158, 2158, 2239, 2172, 2428, 2428, 2428, 2428, 2436, 2202, 2579, 2726,\n", + " 2726, 2393, 2393, 2445, 2751, 2751, 2751, 2751, 2751, 2751, 2710, 2808,\n", + " 2808, 2808, 2927, 3132, 3018, 2930, 2992, 2992, 3274, 2926, 2926, 3226,\n", + " 3291, 3147, 3057, 3284, 3326, 3147, 3147, 3274, 3684, 4163, 4019, 4019,\n", + " 4154, 4154, 4131, 4250, 4204, 4243, 4241, 4264, 4355, 4355, 4355, 4505,\n", + " 4388, 4388, 4388, 4537, 4697, 4592, 4592, 4574, 4553, 4553, 4553, 4755,\n", + " 4721, 5134, 5134, 4891, 4891, 5325, 5348, 5566, 5569, 5388, 5856, 5890,\n", + " 5803, 5663, 5782, 6155, 5753, 6190, 6275, 6277, 6154, 6284, 6284, 6284,\n", + " 6313, 6264],\n", + " [ 33, 25, 78, 18, 3, 69, 36, 113, 13, 38, 35, 112,\n", + " 66, 77, 7, 48, 34, 10, 85, 86, 102, 111, 76, 60,\n", + " 3, 84, 66, 6, 69, 81, 7, 59, 55, 100, 46, 7,\n", + " 34, 122, 29, 2, 32, 89, 23, 3, 80, 68, 112, 54,\n", + " 117, 52, 25, 26, 120, 88, 61, 45, 57, 75, 20, 0,\n", + " 3, 93, 37, 33, 28, 90, 1, 46, 51, 21, 103, 53,\n", + " 95, 119, 99, 30, 106, 104, 18, 15, 108, 65, 43, 122,\n", + " 67, 73, 81, 116, 32, 5, 62, 3, 37, 114, 110, 81,\n", + " 92, 14, 91, 64, 121, 70, 69, 125, 24, 31, 110, 71,\n", + " 41, 69, 105, 72, 79, 72, 8, 49, 120, 105, 123, 63,\n", + " 107, 124, 109, 110, 37, 9, 44, 17, 58, 82, 21, 3,\n", + " 7, 19, 47, 66, 66, 37, 16, 87, 115, 98, 54, 94,\n", + " 72, 74, 97, 116, 69, 16, 118, 116, 56, 116, 12, 101,\n", + " 40, 32, 89, 32, 89, 58, 22, 27, 69, 96, 36, 71,\n", + " 69, 83, 0, 14, 41, 0, 2, 39, 4, 42, 50, 69,\n", + " 11, 81]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 713, 1872, 4107, ..., 638, 6532, 2068],\n", + " [ 181, 136, 122, ..., 7357, 7493, 7411]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 25, 7, 25, 7, 77, 75, 89, 66, 19, 77, 38, 13,\n", + " 13, 36, 29, 25, 38, 25, 13, 87, 113, 122, 7, 77,\n", + " 32, 29, 25, 122, 75, 113, 19, 29, 38, 32, 89, 25,\n", + " 89, 29, 122, 14, 19, 29, 77, 7, 122, 75, 29, 66,\n", + " 25, 19, 77, 19, 99, 113, 25, 87, 32, 99, 32, 13,\n", + " 99, 122, 77, 29, 29, 19, 32, 19, 122, 113, 29, 113,\n", + " 19, 89, 13, 19, 7, 69, 25, 19, 14, 32, 77, 38,\n", + " 77, 99, 25, 66, 87, 25, 19, 99, 75, 14, 32, 75,\n", + " 122, 29, 38, 7, 87, 113, 122, 89, 89, 99, 13, 32,\n", + " 99, 25, 122, 77, 32, 36, 32, 113, 75, 75, 32, 25,\n", + " 77, 87, 113, 32, 89, 89, 113, 13, 29, 89, 36, 36,\n", + " 122, 38, 113, 87, 14, 122, 122, 122, 99, 29, 87, 75,\n", + " 89, 99, 99, 75, 89, 19, 75, 36, 25, 19, 14, 87,\n", + " 99, 66, 66, 122, 19, 87, 29, 89, 19, 19, 32, 25,\n", + " 7, 122, 32, 32, 66, 25, 29, 99, 69, 87, 32, 29,\n", + " 38, 66, 38, 14, 19, 13, 89, 99, 7, 25, 14, 36,\n", + " 75, 29, 66, 66, 36, 99, 14, 13, 13, 19, 13, 13,\n", + " 89, 75, 66, 32, 77, 99, 69, 14, 122, 99, 89, 7,\n", + " 66, 7, 38, 36, 87, 66, 122, 14, 122, 14, 89, 38,\n", + " 7, 14, 38, 113, 89, 14, 29, 19, 25, 69, 113, 32,\n", + " 29, 75, 77, 29, 13, 19, 66, 7, 113, 99, 36, 32,\n", + " 75, 75, 99, 38, 75, 66, 89, 122, 13, 75, 87, 14,\n", + " 75, 89, 29, 66, 122, 87, 19, 66, 66, 99, 25, 13,\n", + " 25, 14, 77, 66, 66, 13, 14, 99, 87, 113, 36, 29,\n", + " 66, 87, 36, 77, 87, 122, 19, 25, 87, 7, 66, 69,\n", + " 66, 113, 36, 13, 77, 87, 77, 99, 122, 99, 13, 113,\n", + " 77, 77, 13, 122, 32, 36, 38, 66, 14, 66, 36, 7,\n", + " 69, 25, 7, 87, 29, 113, 13, 113, 13, 113, 38, 19,\n", + " 25, 14, 13, 69, 25, 36, 89, 69, 77, 99, 89, 32,\n", + " 7, 36, 29, 36, 77, 89, 36, 14, 89, 69, 77, 14,\n", + " 75, 122, 75, 38, 77, 29, 13, 36, 87, 69, 19, 14,\n", + " 75, 13, 36, 69, 87, 99, 87, 113, 19, 38, 32, 25,\n", + " 7, 113, 69, 113, 36, 87, 69, 14, 13, 7, 7, 69,\n", + " 77, 75, 66, 7, 36, 87, 69, 69, 36, 69, 77, 75,\n", + " 77, 36, 14, 69, 113, 38, 7, 69, 113, 14, 7, 69,\n", + " 32, 69, 14, 75, 89, 69, 99, 113, 38, 75, 69, 32,\n", + " 7, 7, 7, 69, 38, 87, 29, 38, 122, 38, 89, 38,\n", + " 32, 36, 69, 38, 38, 38],\n", + " [ 102, 55, 12, 101, 27, 152, 137, 54, 4, 11, 79, 78,\n", + " 72, 47, 8, 122, 66, 114, 184, 328, 62, 186, 121, 411,\n", + " 358, 247, 218, 514, 248, 424, 234, 506, 163, 661, 370, 416,\n", + " 525, 793, 738, 277, 484, 295, 618, 569, 780, 851, 649, 391,\n", + " 720, 274, 1011, 875, 380, 1003, 731, 701, 695, 556, 755, 743,\n", + " 1029, 745, 995, 647, 551, 920, 1018, 1170, 1325, 954, 1048, 1134,\n", + " 1025, 1353, 1163, 1332, 1227, 1373, 1155, 1434, 1409, 1151, 1471, 1255,\n", + " 1182, 1120, 1267, 1368, 1588, 1560, 1460, 1511, 1340, 1445, 1571, 1606,\n", + " 1661, 1443, 1538, 1527, 1759, 1413, 1736, 1556, 1610, 1651, 1740, 1570,\n", + " 1638, 1837, 1665, 1958, 1881, 1806, 1811, 1829, 1772, 1830, 1865, 2166,\n", + " 1957, 1910, 2026, 2234, 2063, 2111, 2192, 2130, 2021, 2180, 2118, 2240,\n", + " 2152, 2352, 2212, 2211, 2232, 2306, 2403, 2135, 2187, 2256, 2194, 2292,\n", + " 2419, 2300, 2357, 2185, 2327, 2448, 2494, 2314, 2542, 2389, 2563, 2439,\n", + " 2566, 2492, 2541, 2396, 2529, 2605, 2590, 2670, 2607, 2497, 2493, 2596,\n", + " 2531, 2652, 2669, 2614, 2752, 2719, 2615, 2762, 2802, 2904, 2791, 2790,\n", + " 2716, 2863, 2781, 2795, 2899, 2910, 2917, 2770, 2793, 3082, 2833, 3261,\n", + " 3010, 3254, 3255, 2990, 3070, 3017, 3196, 3052, 3184, 3047, 3232, 3106,\n", + " 3303, 3119, 3220, 3213, 3192, 3253, 3117, 3304, 3313, 3219, 3210, 3221,\n", + " 3107, 3339, 3332, 3346, 3289, 3457, 3426, 3351, 3367, 3349, 3360, 3417,\n", + " 3570, 3497, 3357, 3507, 3546, 3494, 3629, 3512, 3683, 3551, 3587, 3600,\n", + " 3636, 3621, 3761, 3714, 3690, 3807, 3682, 3637, 3657, 3590, 3711, 3796,\n", + " 3973, 3946, 4054, 4139, 4012, 3945, 4188, 4103, 3732, 3921, 4124, 3827,\n", + " 4044, 4130, 4015, 4146, 3866, 4165, 4119, 4010, 4201, 4228, 4192, 4196,\n", + " 4144, 4109, 4223, 4218, 4217, 4215, 4222, 4291, 4248, 4287, 4293, 4247,\n", + " 4259, 4224, 4319, 4300, 4320, 4315, 4398, 4301, 4330, 4470, 4333, 4390,\n", + " 4357, 4433, 4474, 4325, 4464, 4417, 4329, 4522, 4453, 4492, 4547, 4407,\n", + " 4494, 4525, 4545, 4506, 4483, 4410, 4606, 4737, 4611, 4658, 4549, 4578,\n", + " 4616, 4620, 4701, 4596, 4768, 4780, 4827, 4802, 4761, 4791, 4922, 4903,\n", + " 4868, 4769, 4893, 5076, 4709, 4814, 4790, 4803, 4865, 4938, 4886, 5019,\n", + " 4923, 5035, 4874, 5013, 4773, 4898, 4963, 5021, 4891, 4999, 5177, 5161,\n", + " 4984, 5008, 4992, 5077, 5100, 5145, 5070, 5016, 4890, 5117, 5230, 5081,\n", + " 5172, 5067, 5123, 5101, 5351, 5274, 5295, 5372, 5191, 5287, 5383, 5313,\n", + " 5400, 5411, 5300, 5393, 5495, 5637, 6068, 5479, 5446, 5734, 5682, 5760,\n", + " 5905, 5699, 5933, 5527, 5665, 5547, 5679, 5748, 5900, 5858, 5804, 5795,\n", + " 5859, 5775, 6103, 5908, 5932, 5746, 5824, 5929, 5894, 6094, 5927, 5949,\n", + " 5828, 6065, 5695, 5785, 5627, 6220, 5832, 5681, 6001, 6083, 5965, 6318,\n", + " 6340, 6303, 6162, 6062, 5937, 6071, 6166, 6038, 6325, 6201, 6129, 6146,\n", + " 6052, 6133, 6236, 6104, 6262, 6326]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 231, 231, 231, ..., 7372, 7372, 7372],\n", + " [ 472, 119, 262, ..., 662, 152, 853]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 384, 355, 300, ..., 520, 829, 485],\n", + " [ 19, 108, 7, ..., 7460, 7441, 7265]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1820, 5675, 906, ..., 6532, 5392, 4984],\n", + " [ 39, 46, 49, ..., 6282, 6251, 6298]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 231, 231, 231, ..., 7444, 7444, 7447],\n", + " [4239, 785, 4432, ..., 126, 1028, 1926]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 58, 58, 74, ..., 6313, 6313, 6313],\n", + " [ 137, 507, 1261, ..., 4337, 3904, 3736]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.004762\n", + "sampling 0.004605\n", + "noi time: 0.002223\n", + "get_vertex_data call: 0.018829\n", + "noi group time: 0.00187\n", + "eoi_group_time: 0.014959\n", + "second half: 0.190485\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 40259, 21459, 21471, ..., 1119195, 1118701, 1120077],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 40259, 21459, 21471, ..., 1119195, 1118701, 1120077],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227488, 1210831, 1210552, ..., 1937996, 1937992, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227488, 1210831, 1210552, ..., 1937996, 1937992, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1141424, 1136237, 1140285, 1135926, 1135935, 1135726, 1137791,\n", + " 1140785, 1140799, 1141758, 1137506, 1136223, 1142813, 1139462, 1136969,\n", + " 1136971, 1141443, 1138907, 1139811, 1146641, 1140781, 1150509, 1145288,\n", + " 1145281, 1142965, 1134940, 1149228, 1142958, 1155689, 1155692, 1147473,\n", + " 1147483, 1141882, 1135989, 1153940, 1144636, 1134697, 1135941, 1135950,\n", + " 1150193, 1152666, 1152664, 1148558, 1148546, 1147094, 1147202, 1147211,\n", + " 1138742, 1134667, 1134669, 1140537, 1140540, 1138112, 1137254, 1140159,\n", + " 1135202, 1154739, 1134794, 1136517, 1136521, 1138504, 1137329, 1137693,\n", + " 1135408, 1157397, 1136662, 1137441, 1137449, 1137472, 1137025, 1136193,\n", + " 1135265, 1135278, 1156146, 1156159, 1139165, 1139161, 1135579, 1135828,\n", + " 1135664, 1135675, 1140970, 1138525, 1137957, 1154132, 1135522, 1139685,\n", + " 1137287, 1138440, 1138445, 1138461, 1138449, 1137493, 1135123, 1158390,\n", + " 1149328, 1135088, 1135098, 1156606, 1147112, 1142611, 1158984, 1148531,\n", + " 1135762, 1139667, 1138067, 1138079, 1138069, 1134992, 1142439, 1136546,\n", + " 1152651, 1135782, 1159009, 1159017, 1159019, 1140849, 1143631, 1152696,\n", + " 1138148, 1141963, 1141966, 1152042, 1152044, 1139069, 1142302, 1137728,\n", + " 1137731, 1140906, 1138240, 1140228, 1141098, 1141099, 1162958, 1144129,\n", + " 1149001, 1139898, 1141979, 1141980, 1136397, 1143767, 1162705, 1139025,\n", + " 1139033, 1140009, 1146834, 1146844, 1146832, 1135862, 1136625, 1136632,\n", + " 1140470, 1142932, 1141224, 1136917, 1143673, 1143677, 1137188, 1141785,\n", + " 1141786, 1139495, 1144934, 1141609, 1141300, 1134979, 1147844, 1147850,\n", + " 1139798, 1141821, 1141816, 1145154, 1145161, 1140173, 1158749, 1138478,\n", + " 1137766, 1140110, 1137661, 1148441, 1144434, 1144596, 1148263, 1144042,\n", + " 1140885, 1140892, 1144182, 1144184, 1137607, 1150906, 1150910, 1134827,\n", + " 1158690, 1138539, 1137846, 1137854, 1161710, 1147153, 1136371, 1142646,\n", + " 1149197, 1141365, 1141367, 1153068, 1153069, 1141664, 1149088, 1153556,\n", + " 1139508, 1139510, 1139773, 1140093, 1144998, 1145000, 1145001, 1145211,\n", + " 1143779, 1139171, 1140976, 1140990, 1146695, 1135049, 1143692, 1147050,\n", + " 1147047, 1145873, 1135457, 1135460, 1141925, 1146898, 1144242, 1141853,\n", + " 1136891, 1139405, 1145971, 1143845, 1143851, 1163662, 1136277, 1146024,\n", + " 1146025, 1150605, 1141646, 1149930, 1149933, 1141235, 1139990, 1143283,\n", + " 1147540, 1147282, 1142816, 1136330, 1149162, 1140349, 1143663, 1142637,\n", + " 1149366, 1143051, 1138927, 1157720, 1136836, 1148235, 1165626, 1139328,\n", + " 1141496, 1143345, 1144766, 1144619, 1144615, 1145813, 1140836, 1137098,\n", + " 1135876, 1144319, 1135818, 1135813, 1150300, 1144376, 1146514, 1146523,\n", + " 1143456, 1137697, 1137703, 1143937, 1135451, 1146580, 1146591, 1147521,\n", + " 1140360, 1140364, 1137990, 1143082, 1148966, 1144730, 1144219, 1147999,\n", + " 1146949, 1134907, 1147233, 1147244, 1148704, 1146742, 1153703, 1152328,\n", + " 1147056, 1147024, 1142858, 1147971, 1145011, 1145013, 1139549, 1147196,\n", + " 1158226, 1143921, 1147880, 1147881, 1154526, 1151646, 1145240, 1145246,\n", + " 1142378, 1142369, 1146144, 1146145, 1146188, 1151242, 1148215, 1148223,\n", + " 1152538, 1151179, 1150442, 1150445, 1149258, 1149251, 1154437, 1149791,\n", + " 1144514, 1144526, 1138035, 1151994, 1151480, 1152022, 1152027, 1144881,\n", + " 1154271, 1154263, 1145255, 1139914, 1146723, 1148693, 1150127, 1158950,\n", + " 1158959, 1141949, 1150837, 1153572, 1154976, 1147653, 1143560, 1149409,\n", + " 1149412, 1148300, 1135086, 1148622, 1147866, 1151417, 1154426, 1154420,\n", + " 1148180, 1152561, 1146672, 1146676, 1146679, 1146686, 1138867, 1138404,\n", + " 1157968, 1157983, 1148724, 1148729, 1171342, 1148204, 1171939, 1171943,\n", + " 1154168, 1153124, 1145104, 1150929, 1150932, 1152879, 1173078, 1144863,\n", + " 1144849, 1150356, 1155088, 1148084, 1141017, 1147446, 1147442, 1151811,\n", + " 1151816, 1135303, 1151906, 1148498, 1156886, 1156894, 1146562, 1141420,\n", + " 1141419, 1151351, 1151352, 1151345, 1151350, 1153449, 1146969, 1146967,\n", + " 1149359, 1167293, 1146623, 1146608, 1135688, 1152098, 1146280, 1153032,\n", + " 1153038, 1150091, 1137746, 1159983, 1152622, 1152623, 1140521, 1155146,\n", + " 1155140, 1136410, 1136414, 1157107, 1152826, 1154119, 1154123, 1157826,\n", + " 1152673, 1154633, 1139573, 1151582, 1151573, 1151627, 1151617, 1151622,\n", + " 1150578, 1150586, 1136131, 1136788, 1148914, 1145931, 1138989, 1138991,\n", + " 1151311, 1152341, 1146816, 1156826, 1156816, 1153296, 1153311, 1138283,\n", + " 1138281, 1152301, 1152294, 1136028, 1156608, 1151187, 1142777, 1166850,\n", + " 1150150, 1149273, 1148033, 1148040, 1149307, 1149300, 1155223, 1145656,\n", + " 1144659, 1149655, 1148628, 1158530, 1137458, 1148254, 1142047, 1158857,\n", + " 1148892, 1156505, 1151260, 1150465, 1135730, 1135740, 1152179, 1156638,\n", + " 1151788, 1165703, 1152737, 1150824, 1156935, 1158308, 1158311, 1151273,\n", + " 1155441, 1155508, 1153359, 1150129, 1154530, 1154528, 1145771, 1156919,\n", + " 1142755, 1142758, 1156207, 1151379, 1155122, 1152527, 1157183, 1153480,\n", + " 1155755, 1135396, 1135398, 1146913, 1155626, 1155628, 1158494, 1154555,\n", + " 1155576, 1158566, 1158824, 1158825, 1158325, 1157000, 1148836, 1148834,\n", + " 1155646, 1153368, 1158365, 1143263, 1154652, 1146935, 1151898, 1152310,\n", + " 1151327, 1154902, 1154909, 1163127, 1179427, 1153318, 1153322, 1157439,\n", + " 1155606, 1155613, 1150982, 1150990, 1157933, 1140749, 1137154, 1137161,\n", + " 1137152, 1159116, 1134674, 1135601, 1148153, 1148159, 1150661, 1158665,\n", + " 1157684, 1140632, 1152220, 1159213, 1159132, 1157026, 1144843, 1155975,\n", + " 1158846, 1156802, 1156812, 1149696, 1154600, 1136899, 1136896, 1158760,\n", + " 1158882, 1156778, 1151602, 1151615, 1136480, 1136494, 1136491, 1154393,\n", + " 1156665, 1155309, 1157249, 1153808, 1136640, 1147782, 1157821, 1158558,\n", + " 1156516, 1163814, 1162016, 1164524, 1138110, 1161539, 1165840, 1163456,\n", + " 1142666, 1157751, 1167359, 1159042, 1159070, 1165928, 1167592, 1142427,\n", + " 1158295, 1158303, 1157944, 1157946, 1164491, 1153052, 1153045, 1144150,\n", + " 1153842, 1156098, 1138393, 1150046, 1149063, 1155479, 1155480, 1154294,\n", + " 1153519, 1158680, 1158685, 1146876, 1157600, 1138161, 1167206, 1156787,\n", + " 1165662, 1168327, 1149963, 1184337, 1154590, 1139592, 1139286, 1170415,\n", + " 1140650, 1140643, 1148600, 1151875, 1154275, 1156355, 1158643, 1156181,\n", + " 1159025, 1159029, 1159032, 1168107, 1169108, 1152247, 1158905, 1144327,\n", + " 1144320, 1165996, 1151220, 1138674, 1168428, 1148567, 1147836, 1146510,\n", + " 1164580, 1144747, 1152776, 1163522, 1145139, 1155272, 1147426, 1147427,\n", + " 1156739, 1160856, 1153663, 1150648, 1150319, 1144812, 1153267, 1168855,\n", + " 1156300, 1161757, 1166922, 1163935, 1169282, 1155324, 1166462, 1138950,\n", + " 1147694, 1145447, 1165746, 1155905, 1148124, 1147723, 1145889, 1145900,\n", + " 1145902, 1181049, 1169742, 1158722, 1144690, 1150783, 1169602, 1166653,\n", + " 1155170, 1156119, 1161779, 1144336, 1157534, 1157528, 1138376, 1154660,\n", + " 1154670, 1154893, 1169162, 1157331, 1141043, 1169359, 1154364, 1154366,\n", + " 1149444, 1146337, 1171522, 1158611, 1158062, 1173047, 1172763, 1149846,\n", + " 1149847, 1157379, 1169941, 1167388, 1170463, 1152353, 1165528, 1168462,\n", + " 1168407, 1155930, 1155931, 1161130, 1168049, 1149402, 1148667, 1148323,\n", + " 1147504, 1173307, 1169144, 1154029, 1152150, 1152152, 1172791, 1159655,\n", + " 1157158, 1157153, 1157373, 1147697, 1147711, 1148128, 1148131, 1148141,\n", + " 1147934, 1157592, 1170490, 1177051, 1168808, 1146755, 1160150, 1174845,\n", + " 1159100, 1172061, 1166679, 1166682, 1171823, 1150234, 1161587, 1161595,\n", + " 1154148, 1179965, 1149169, 1143279, 1143420, 1171300, 1153803, 1178475,\n", + " 1181746, 1161255, 1171623, 1178359, 1157126, 1187534, 1181922, 1178706,\n", + " 1145597, 1191755, 1178218, 1183463, 1145626, 1181279, 1149755, 1180729,\n", + " 1180732, 1152287, 1181143, 1183342, 1158935, 1158940, 1158379, 1155890,\n", + " 1184317, 1166989, 1182330, 1167771, 1167765, 1168533, 1168886, 1165474,\n", + " 1180521, 1179090, 1165149, 1163422, 1166520, 1161819, 1170341, 1189290,\n", + " 1170420, 1139828, 1139831, 1139837, 1150265, 1170433, 1154812, 1182022,\n", + " 1164677, 1191674, 1156055, 1151972, 1151978, 1191984, 1149544, 1159083,\n", + " 1156836, 1187982, 1140993, 1188778, 1193895, 1181422, 1181423, 1167840,\n", + " 1151774, 1153743, 1194172, 1152115, 1169699, 1177617, 1175356, 1150412,\n", + " 1172976, 1158064, 1158077, 1158071, 1181616, 1183949, 1182560, 1180531,\n", + " 1170168, 1184440, 1176817, 1155959, 1155962, 1192792, 1189956, 1188330,\n", + " 1192368, 1192554], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1141424, 1136237, 1140285, 1135926, 1135935, 1135726, 1137791,\n", + " 1140785, 1140799, 1141758, 1137506, 1136223, 1142813, 1139462, 1136969,\n", + " 1136971, 1141443, 1138907, 1139811, 1146641, 1140781, 1150509, 1145288,\n", + " 1145281, 1142965, 1134940, 1149228, 1142958, 1155689, 1155692, 1147473,\n", + " 1147483, 1141882, 1135989, 1153940, 1144636, 1134697, 1135941, 1135950,\n", + " 1150193, 1152666, 1152664, 1148558, 1148546, 1147094, 1147202, 1147211,\n", + " 1138742, 1134667, 1134669, 1140537, 1140540, 1138112, 1137254, 1140159,\n", + " 1135202, 1154739, 1134794, 1136517, 1136521, 1138504, 1137329, 1137693,\n", + " 1135408, 1157397, 1136662, 1137441, 1137449, 1137472, 1137025, 1136193,\n", + " 1135265, 1135278, 1156146, 1156159, 1139165, 1139161, 1135579, 1135828,\n", + " 1135664, 1135675, 1140970, 1138525, 1137957, 1154132, 1135522, 1139685,\n", + " 1137287, 1138440, 1138445, 1138461, 1138449, 1137493, 1135123, 1158390,\n", + " 1149328, 1135088, 1135098, 1156606, 1147112, 1142611, 1158984, 1148531,\n", + " 1135762, 1139667, 1138067, 1138079, 1138069, 1134992, 1142439, 1136546,\n", + " 1152651, 1135782, 1159009, 1159017, 1159019, 1140849, 1143631, 1152696,\n", + " 1138148, 1141963, 1141966, 1152042, 1152044, 1139069, 1142302, 1137728,\n", + " 1137731, 1140906, 1138240, 1140228, 1141098, 1141099, 1162958, 1144129,\n", + " 1149001, 1139898, 1141979, 1141980, 1136397, 1143767, 1162705, 1139025,\n", + " 1139033, 1140009, 1146834, 1146844, 1146832, 1135862, 1136625, 1136632,\n", + " 1140470, 1142932, 1141224, 1136917, 1143673, 1143677, 1137188, 1141785,\n", + " 1141786, 1139495, 1144934, 1141609, 1141300, 1134979, 1147844, 1147850,\n", + " 1139798, 1141821, 1141816, 1145154, 1145161, 1140173, 1158749, 1138478,\n", + " 1137766, 1140110, 1137661, 1148441, 1144434, 1144596, 1148263, 1144042,\n", + " 1140885, 1140892, 1144182, 1144184, 1137607, 1150906, 1150910, 1134827,\n", + " 1158690, 1138539, 1137846, 1137854, 1161710, 1147153, 1136371, 1142646,\n", + " 1149197, 1141365, 1141367, 1153068, 1153069, 1141664, 1149088, 1153556,\n", + " 1139508, 1139510, 1139773, 1140093, 1144998, 1145000, 1145001, 1145211,\n", + " 1143779, 1139171, 1140976, 1140990, 1146695, 1135049, 1143692, 1147050,\n", + " 1147047, 1145873, 1135457, 1135460, 1141925, 1146898, 1144242, 1141853,\n", + " 1136891, 1139405, 1145971, 1143845, 1143851, 1163662, 1136277, 1146024,\n", + " 1146025, 1150605, 1141646, 1149930, 1149933, 1141235, 1139990, 1143283,\n", + " 1147540, 1147282, 1142816, 1136330, 1149162, 1140349, 1143663, 1142637,\n", + " 1149366, 1143051, 1138927, 1157720, 1136836, 1148235, 1165626, 1139328,\n", + " 1141496, 1143345, 1144766, 1144619, 1144615, 1145813, 1140836, 1137098,\n", + " 1135876, 1144319, 1135818, 1135813, 1150300, 1144376, 1146514, 1146523,\n", + " 1143456, 1137697, 1137703, 1143937, 1135451, 1146580, 1146591, 1147521,\n", + " 1140360, 1140364, 1137990, 1143082, 1148966, 1144730, 1144219, 1147999,\n", + " 1146949, 1134907, 1147233, 1147244, 1148704, 1146742, 1153703, 1152328,\n", + " 1147056, 1147024, 1142858, 1147971, 1145011, 1145013, 1139549, 1147196,\n", + " 1158226, 1143921, 1147880, 1147881, 1154526, 1151646, 1145240, 1145246,\n", + " 1142378, 1142369, 1146144, 1146145, 1146188, 1151242, 1148215, 1148223,\n", + " 1152538, 1151179, 1150442, 1150445, 1149258, 1149251, 1154437, 1149791,\n", + " 1144514, 1144526, 1138035, 1151994, 1151480, 1152022, 1152027, 1144881,\n", + " 1154271, 1154263, 1145255, 1139914, 1146723, 1148693, 1150127, 1158950,\n", + " 1158959, 1141949, 1150837, 1153572, 1154976, 1147653, 1143560, 1149409,\n", + " 1149412, 1148300, 1135086, 1148622, 1147866, 1151417, 1154426, 1154420,\n", + " 1148180, 1152561, 1146672, 1146676, 1146679, 1146686, 1138867, 1138404,\n", + " 1157968, 1157983, 1148724, 1148729, 1171342, 1148204, 1171939, 1171943,\n", + " 1154168, 1153124, 1145104, 1150929, 1150932, 1152879, 1173078, 1144863,\n", + " 1144849, 1150356, 1155088, 1148084, 1141017, 1147446, 1147442, 1151811,\n", + " 1151816, 1135303, 1151906, 1148498, 1156886, 1156894, 1146562, 1141420,\n", + " 1141419, 1151351, 1151352, 1151345, 1151350, 1153449, 1146969, 1146967,\n", + " 1149359, 1167293, 1146623, 1146608, 1135688, 1152098, 1146280, 1153032,\n", + " 1153038, 1150091, 1137746, 1159983, 1152622, 1152623, 1140521, 1155146,\n", + " 1155140, 1136410, 1136414, 1157107, 1152826, 1154119, 1154123, 1157826,\n", + " 1152673, 1154633, 1139573, 1151582, 1151573, 1151627, 1151617, 1151622,\n", + " 1150578, 1150586, 1136131, 1136788, 1148914, 1145931, 1138989, 1138991,\n", + " 1151311, 1152341, 1146816, 1156826, 1156816, 1153296, 1153311, 1138283,\n", + " 1138281, 1152301, 1152294, 1136028, 1156608, 1151187, 1142777, 1166850,\n", + " 1150150, 1149273, 1148033, 1148040, 1149307, 1149300, 1155223, 1145656,\n", + " 1144659, 1149655, 1148628, 1158530, 1137458, 1148254, 1142047, 1158857,\n", + " 1148892, 1156505, 1151260, 1150465, 1135730, 1135740, 1152179, 1156638,\n", + " 1151788, 1165703, 1152737, 1150824, 1156935, 1158308, 1158311, 1151273,\n", + " 1155441, 1155508, 1153359, 1150129, 1154530, 1154528, 1145771, 1156919,\n", + " 1142755, 1142758, 1156207, 1151379, 1155122, 1152527, 1157183, 1153480,\n", + " 1155755, 1135396, 1135398, 1146913, 1155626, 1155628, 1158494, 1154555,\n", + " 1155576, 1158566, 1158824, 1158825, 1158325, 1157000, 1148836, 1148834,\n", + " 1155646, 1153368, 1158365, 1143263, 1154652, 1146935, 1151898, 1152310,\n", + " 1151327, 1154902, 1154909, 1163127, 1179427, 1153318, 1153322, 1157439,\n", + " 1155606, 1155613, 1150982, 1150990, 1157933, 1140749, 1137154, 1137161,\n", + " 1137152, 1159116, 1134674, 1135601, 1148153, 1148159, 1150661, 1158665,\n", + " 1157684, 1140632, 1152220, 1159213, 1159132, 1157026, 1144843, 1155975,\n", + " 1158846, 1156802, 1156812, 1149696, 1154600, 1136899, 1136896, 1158760,\n", + " 1158882, 1156778, 1151602, 1151615, 1136480, 1136494, 1136491, 1154393,\n", + " 1156665, 1155309, 1157249, 1153808, 1136640, 1147782, 1157821, 1158558,\n", + " 1156516, 1163814, 1162016, 1164524, 1138110, 1161539, 1165840, 1163456,\n", + " 1142666, 1157751, 1167359, 1159042, 1159070, 1165928, 1167592, 1142427,\n", + " 1158295, 1158303, 1157944, 1157946, 1164491, 1153052, 1153045, 1144150,\n", + " 1153842, 1156098, 1138393, 1150046, 1149063, 1155479, 1155480, 1154294,\n", + " 1153519, 1158680, 1158685, 1146876, 1157600, 1138161, 1167206, 1156787,\n", + " 1165662, 1168327, 1149963, 1184337, 1154590, 1139592, 1139286, 1170415,\n", + " 1140650, 1140643, 1148600, 1151875, 1154275, 1156355, 1158643, 1156181,\n", + " 1159025, 1159029, 1159032, 1168107, 1169108, 1152247, 1158905, 1144327,\n", + " 1144320, 1165996, 1151220, 1138674, 1168428, 1148567, 1147836, 1146510,\n", + " 1164580, 1144747, 1152776, 1163522, 1145139, 1155272, 1147426, 1147427,\n", + " 1156739, 1160856, 1153663, 1150648, 1150319, 1144812, 1153267, 1168855,\n", + " 1156300, 1161757, 1166922, 1163935, 1169282, 1155324, 1166462, 1138950,\n", + " 1147694, 1145447, 1165746, 1155905, 1148124, 1147723, 1145889, 1145900,\n", + " 1145902, 1181049, 1169742, 1158722, 1144690, 1150783, 1169602, 1166653,\n", + " 1155170, 1156119, 1161779, 1144336, 1157534, 1157528, 1138376, 1154660,\n", + " 1154670, 1154893, 1169162, 1157331, 1141043, 1169359, 1154364, 1154366,\n", + " 1149444, 1146337, 1171522, 1158611, 1158062, 1173047, 1172763, 1149846,\n", + " 1149847, 1157379, 1169941, 1167388, 1170463, 1152353, 1165528, 1168462,\n", + " 1168407, 1155930, 1155931, 1161130, 1168049, 1149402, 1148667, 1148323,\n", + " 1147504, 1173307, 1169144, 1154029, 1152150, 1152152, 1172791, 1159655,\n", + " 1157158, 1157153, 1157373, 1147697, 1147711, 1148128, 1148131, 1148141,\n", + " 1147934, 1157592, 1170490, 1177051, 1168808, 1146755, 1160150, 1174845,\n", + " 1159100, 1172061, 1166679, 1166682, 1171823, 1150234, 1161587, 1161595,\n", + " 1154148, 1179965, 1149169, 1143279, 1143420, 1171300, 1153803, 1178475,\n", + " 1181746, 1161255, 1171623, 1178359, 1157126, 1187534, 1181922, 1178706,\n", + " 1145597, 1191755, 1178218, 1183463, 1145626, 1181279, 1149755, 1180729,\n", + " 1180732, 1152287, 1181143, 1183342, 1158935, 1158940, 1158379, 1155890,\n", + " 1184317, 1166989, 1182330, 1167771, 1167765, 1168533, 1168886, 1165474,\n", + " 1180521, 1179090, 1165149, 1163422, 1166520, 1161819, 1170341, 1189290,\n", + " 1170420, 1139828, 1139831, 1139837, 1150265, 1170433, 1154812, 1182022,\n", + " 1164677, 1191674, 1156055, 1151972, 1151978, 1191984, 1149544, 1159083,\n", + " 1156836, 1187982, 1140993, 1188778, 1193895, 1181422, 1181423, 1167840,\n", + " 1151774, 1153743, 1194172, 1152115, 1169699, 1177617, 1175356, 1150412,\n", + " 1172976, 1158064, 1158077, 1158071, 1181616, 1183949, 1182560, 1180531,\n", + " 1170168, 1184440, 1176817, 1155959, 1155962, 1192792, 1189956, 1188330,\n", + " 1192368, 1192554], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1195530, 1198730, 1199282, 1198449, 1198458, 1196202, 1198844,\n", + " 1201581, 1201582, 1201237, 1198023, 1198027, 1194626, 1196956, 1202803,\n", + " 1202804, 1198557, 1198717, 1194770, 1195494, 1195514, 1195263, 1197921,\n", + " 1197930, 1196529, 1201992, 1198539, 1196461, 1194882, 1195888, 1195740,\n", + " 1196334, 1197856, 1196618, 1195313, 1197793, 1198647, 1199809, 1195216,\n", + " 1195265, 1195278, 1197140, 1195234, 1195245, 1197273, 1196109, 1195850,\n", + " 1198915, 1198925, 1197474, 1195750, 1195758, 1195626, 1199697, 1195353,\n", + " 1198273, 1198282, 1200959, 1199859, 1197295, 1199185, 1194928, 1197583,\n", + " 1199628, 1197674, 1197990, 1202457, 1200872, 1200403, 1198400, 1199579,\n", + " 1201904, 1201908, 1201916, 1201511, 1196496, 1196499, 1199014, 1196727,\n", + " 1200018, 1198811, 1199555, 1200503, 1203282, 1199445, 1201081, 1202630,\n", + " 1200980, 1199761, 1199546, 1201042, 1202043, 1200553, 1200558, 1197100,\n", + " 1196883, 1201442, 1202669, 1202207, 1200242, 1196960, 1196966, 1200785,\n", + " 1200793, 1201129, 1203113, 1195664, 1200445, 1198911, 1195421, 1197811,\n", + " 1197816, 1198127, 1201484, 1196602, 1201138, 1194730, 1198147, 1201706,\n", + " 1197735, 1199786, 1198819, 1200468, 1200974, 1197652, 1197660, 1194908,\n", + " 1203161, 1198751], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1195530, 1198730, 1199282, 1198449, 1198458, 1196202, 1198844,\n", + " 1201581, 1201582, 1201237, 1198023, 1198027, 1194626, 1196956, 1202803,\n", + " 1202804, 1198557, 1198717, 1194770, 1195494, 1195514, 1195263, 1197921,\n", + " 1197930, 1196529, 1201992, 1198539, 1196461, 1194882, 1195888, 1195740,\n", + " 1196334, 1197856, 1196618, 1195313, 1197793, 1198647, 1199809, 1195216,\n", + " 1195265, 1195278, 1197140, 1195234, 1195245, 1197273, 1196109, 1195850,\n", + " 1198915, 1198925, 1197474, 1195750, 1195758, 1195626, 1199697, 1195353,\n", + " 1198273, 1198282, 1200959, 1199859, 1197295, 1199185, 1194928, 1197583,\n", + " 1199628, 1197674, 1197990, 1202457, 1200872, 1200403, 1198400, 1199579,\n", + " 1201904, 1201908, 1201916, 1201511, 1196496, 1196499, 1199014, 1196727,\n", + " 1200018, 1198811, 1199555, 1200503, 1203282, 1199445, 1201081, 1202630,\n", + " 1200980, 1199761, 1199546, 1201042, 1202043, 1200553, 1200558, 1197100,\n", + " 1196883, 1201442, 1202669, 1202207, 1200242, 1196960, 1196966, 1200785,\n", + " 1200793, 1201129, 1203113, 1195664, 1200445, 1198911, 1195421, 1197811,\n", + " 1197816, 1198127, 1201484, 1196602, 1201138, 1194730, 1198147, 1201706,\n", + " 1197735, 1199786, 1198819, 1200468, 1200974, 1197652, 1197660, 1194908,\n", + " 1203161, 1198751], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 6.9391e-02, -3.3209e-04, 3.2116e-01, ..., -1.3039e-04,\n", + " -4.3427e-04, -2.9522e-03],\n", + " [ 4.1140e-02, -6.4791e-04, 3.7246e-01, ..., -1.0671e-04,\n", + " -2.9826e-04, -2.8408e-03],\n", + " [ 4.1140e-02, -6.4791e-04, 3.7246e-01, ..., -1.0671e-04,\n", + " -2.9826e-04, -2.8408e-03],\n", + " ...,\n", + " [ 2.7286e-02, -1.5964e-04, 2.8646e-01, ..., 1.2833e-03,\n", + " -2.8487e-04, -2.4179e-03],\n", + " [ 2.3887e-02, -3.3883e-04, 3.3368e-01, ..., 1.8168e-02,\n", + " -2.6472e-04, -3.0902e-03],\n", + " [ 6.7805e-02, -8.7634e-04, 3.5113e-01, ..., -3.8243e-04,\n", + " -2.4122e-04, -3.2783e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 2.9305, -0.0327, 1.8550, ..., -0.0133, -0.0222, 3.5872],\n", + " [ 3.5243, -0.0368, 2.4856, ..., -0.0194, -0.0223, 3.0577],\n", + " [ 2.9956, -0.0363, 1.8444, ..., -0.0133, -0.0188, 3.2664],\n", + " ...,\n", + " [ 4.0515, -0.0663, 1.6992, ..., -0.0256, -0.0245, 3.5960],\n", + " [ 3.6591, -0.0583, 1.6187, ..., -0.0229, -0.0228, 3.5534],\n", + " [ 3.1486, -0.0416, 2.4564, ..., -0.0120, -0.0227, 3.9688]],\n", + " device='cuda:0', grad_fn=), 'author': tensor([[ 4.4839e-01, -2.6903e-03, -7.5641e-05, ..., -2.1515e-04,\n", + " -1.9597e-03, -1.3231e-04],\n", + " [ 5.5567e-01, -3.8761e-03, 3.2488e-02, ..., -4.6263e-04,\n", + " -1.4003e-04, 1.5839e-01],\n", + " [ 5.7631e-01, -5.3720e-03, -8.0449e-04, ..., -9.7723e-04,\n", + " 6.9554e-02, 2.5698e-01],\n", + " ...,\n", + " [ 6.3119e-01, -5.8111e-03, -3.3762e-04, ..., -2.0797e-03,\n", + " 7.8551e-02, 1.7591e-01],\n", + " [ 6.6545e-01, -6.8630e-03, -1.5577e-03, ..., -2.7865e-03,\n", + " 1.4020e-01, 3.2739e-01],\n", + " [ 5.1060e-01, -4.6312e-03, -1.0643e-03, ..., -1.0423e-03,\n", + " 4.7867e-02, 2.0641e-01]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-0.0102, 0.2481, -0.0025, ..., 0.8552, -0.0013, -0.0067],\n", + " [-0.0093, 0.1104, -0.0032, ..., 0.8478, -0.0023, -0.0071],\n", + " [-0.0106, 0.0689, -0.0033, ..., 0.7469, -0.0012, -0.0050],\n", + " ...,\n", + " [-0.0102, 0.2582, -0.0028, ..., 0.9304, -0.0030, -0.0067],\n", + " [-0.0122, 0.3518, -0.0034, ..., 1.1938, -0.0022, -0.0073],\n", + " [-0.0096, 0.2435, -0.0027, ..., 1.0649, -0.0032, -0.0066]],\n", + " device='cuda:0', grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 53, 84, 212, 47, 136, 39, 38, 12, 117, 117, 117, 14,\n", + " 14, 14, 495, 432, 557, 539, 539, 437, 621, 605, 748, 748,\n", + " 572, 572, 572, 918, 800, 800, 1392, 1124, 1156, 1309, 1161, 1168,\n", + " 1168, 1168, 1250, 1250, 1250, 1372, 1383, 1491, 1226, 1360, 1358, 1441,\n", + " 1441, 1431, 1462, 1431, 1711, 1339, 1627, 1543, 1565, 1565, 1623, 1492,\n", + " 1709, 1651, 1614, 1779, 1779, 1779, 1722, 1722, 1760, 1973, 1953, 1953,\n", + " 1919, 1932, 1878, 1857, 1857, 1857, 1857, 2055, 2016, 2169, 2169, 2284,\n", + " 2284, 2426, 2104, 2356, 2335, 2411, 2359, 2565, 2254, 2499, 2540, 2633,\n", + " 2659, 2642, 2642, 2631, 2766, 2744, 2820, 2713, 2721, 2898, 2932, 2932,\n", + " 2960, 2960, 2802, 2640, 2974, 3040, 3203, 2983, 2983, 3237, 2802, 2802,\n", + " 3226, 3226, 3099, 3099, 3087, 3087, 3083, 3083, 3212, 3269, 3318, 3205,\n", + " 3317, 3317, 3457, 3384, 3384, 3578, 3438, 3596, 3520, 3438, 3525, 3525,\n", + " 3680, 3655, 3784, 3642, 3836, 3828, 3841, 3803, 3803, 3803, 3742, 4089,\n", + " 4089, 4138, 4138, 4100, 4100, 4181, 4210, 4246, 4393, 4393, 4830, 4635,\n", + " 4815, 4763, 4659, 4830, 5042, 4937, 4963, 5147, 5147, 5202, 5179, 5216,\n", + " 5220, 5214, 5671, 5499, 5813, 5852, 5714, 6035, 5949, 5943, 5927, 5927,\n", + " 5927, 6071, 6071, 6019, 5927, 5927, 6071],\n", + " [ 21, 9, 4, 87, 94, 78, 8, 8, 127, 37, 123, 35,\n", + " 120, 57, 58, 5, 96, 38, 76, 91, 75, 97, 125, 66,\n", + " 99, 37, 123, 79, 68, 105, 122, 98, 84, 89, 18, 26,\n", + " 112, 12, 60, 53, 91, 24, 42, 30, 83, 3, 52, 65,\n", + " 30, 22, 85, 43, 3, 27, 98, 56, 119, 81, 17, 17,\n", + " 46, 46, 20, 101, 116, 125, 51, 67, 70, 109, 30, 13,\n", + " 72, 111, 22, 16, 117, 40, 19, 109, 129, 114, 17, 11,\n", + " 17, 107, 43, 26, 3, 23, 126, 86, 91, 104, 74, 45,\n", + " 3, 126, 128, 27, 88, 93, 36, 97, 90, 8, 15, 63,\n", + " 77, 96, 121, 22, 79, 50, 3, 73, 88, 69, 62, 14,\n", + " 17, 22, 43, 22, 34, 22, 22, 43, 30, 108, 7, 27,\n", + " 96, 81, 61, 6, 49, 81, 95, 61, 39, 29, 115, 92,\n", + " 127, 82, 44, 33, 21, 113, 106, 3, 81, 71, 79, 114,\n", + " 17, 96, 10, 98, 59, 98, 107, 43, 25, 81, 102, 103,\n", + " 32, 47, 54, 55, 79, 23, 64, 85, 41, 31, 66, 110,\n", + " 100, 31, 0, 79, 72, 80, 89, 124, 33, 118, 28, 79,\n", + " 1, 48, 15, 55, 2, 50, 34]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 308, 1780, 1315, ..., 3680, 1004, 7141],\n", + " [ 253, 242, 261, ..., 7347, 7322, 7295]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 96, 77, 111, ..., 90, 79, 79],\n", + " [ 174, 52, 65, ..., 6034, 6005, 5976]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 305, 305, 305, ..., 7338, 7338, 7338],\n", + " [ 80, 158, 77, ..., 385, 575, 451]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 536, 120, 260, ..., 582, 183, 543],\n", + " [ 34, 148, 7, ..., 7378, 7409, 7224]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5756, 5341, 677, ..., 6677, 407, 6223],\n", + " [ 194, 117, 117, ..., 5988, 6044, 6067]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 253, 308, 308, ..., 7385, 7325, 7325],\n", + " [1164, 253, 236, ..., 458, 3691, 801]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 117, 117, 117, ..., 6019, 6019, 6019],\n", + " [6593, 6224, 5341, ..., 168, 96, 5299]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005573\n", + "sampling 0.005419\n", + "noi time: 0.001475\n", + "get_vertex_data call: 0.028508\n", + "noi group time: 0.003926\n", + "eoi_group_time: 0.016025\n", + "second half: 0.195352\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16829, 522, 31145, ..., 1119196, 1103852, 1100734],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16829, 522, 31145, ..., 1119196, 1103852, 1100734],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210552, 1209799, 1231353, ..., 1921009, 1931106, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210552, 1209799, 1231353, ..., 1921009, 1931106, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137435, 1137204, 1137212, ..., 1192554, 1189949, 1189798],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137435, 1137204, 1137212, ..., 1192554, 1189949, 1189798],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199439, 1198248, 1197226, 1197719, 1200099, 1198730, 1199831, 1199282,\n", + " 1198449, 1202255, 1198840, 1201582, 1201462, 1199278, 1201016, 1203054,\n", + " 1198624, 1197512, 1194866, 1197464, 1196631, 1195514, 1195263, 1197924,\n", + " 1196534, 1201992, 1198543, 1198095, 1195459, 1194889, 1195888, 1199172,\n", + " 1195740, 1197856, 1196517, 1197830, 1195325, 1196840, 1198958, 1198167,\n", + " 1196704, 1195216, 1195265, 1196109, 1194859, 1195841, 1199315, 1196120,\n", + " 1195918, 1198280, 1198285, 1198282, 1200959, 1199066, 1199185, 1194928,\n", + " 1199628, 1202368, 1202457, 1200872, 1198400, 1199231, 1201918, 1194786,\n", + " 1200052, 1201511, 1200491, 1200659, 1197973, 1197976, 1196727, 1198428,\n", + " 1199418, 1199889, 1198811, 1199555, 1201827, 1200450, 1195592, 1200503,\n", + " 1198066, 1196474, 1198792, 1201078, 1201155, 1202403, 1201056, 1200927,\n", + " 1201042, 1195685, 1200526, 1195637, 1200553, 1197097, 1196889, 1196768,\n", + " 1201442, 1201029, 1202239, 1202338, 1201291, 1198478, 1195607, 1195610,\n", + " 1203329, 1198562, 1196966, 1199606, 1198525, 1203112, 1203113, 1195664,\n", + " 1198929, 1198909, 1195181, 1197060, 1197822, 1197821, 1198299, 1197735,\n", + " 1200436, 1200437, 1201190, 1203077, 1201886, 1197655, 1197039, 1194908,\n", + " 1203162, 1197872], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199439, 1198248, 1197226, 1197719, 1200099, 1198730, 1199831, 1199282,\n", + " 1198449, 1202255, 1198840, 1201582, 1201462, 1199278, 1201016, 1203054,\n", + " 1198624, 1197512, 1194866, 1197464, 1196631, 1195514, 1195263, 1197924,\n", + " 1196534, 1201992, 1198543, 1198095, 1195459, 1194889, 1195888, 1199172,\n", + " 1195740, 1197856, 1196517, 1197830, 1195325, 1196840, 1198958, 1198167,\n", + " 1196704, 1195216, 1195265, 1196109, 1194859, 1195841, 1199315, 1196120,\n", + " 1195918, 1198280, 1198285, 1198282, 1200959, 1199066, 1199185, 1194928,\n", + " 1199628, 1202368, 1202457, 1200872, 1198400, 1199231, 1201918, 1194786,\n", + " 1200052, 1201511, 1200491, 1200659, 1197973, 1197976, 1196727, 1198428,\n", + " 1199418, 1199889, 1198811, 1199555, 1201827, 1200450, 1195592, 1200503,\n", + " 1198066, 1196474, 1198792, 1201078, 1201155, 1202403, 1201056, 1200927,\n", + " 1201042, 1195685, 1200526, 1195637, 1200553, 1197097, 1196889, 1196768,\n", + " 1201442, 1201029, 1202239, 1202338, 1201291, 1198478, 1195607, 1195610,\n", + " 1203329, 1198562, 1196966, 1199606, 1198525, 1203112, 1203113, 1195664,\n", + " 1198929, 1198909, 1195181, 1197060, 1197822, 1197821, 1198299, 1197735,\n", + " 1200436, 1200437, 1201190, 1203077, 1201886, 1197655, 1197039, 1194908,\n", + " 1203162, 1197872], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 5.7517e-02, -1.8347e-04, 3.3680e-01, ..., 2.1664e-02,\n", + " -8.9481e-04, -2.8693e-03],\n", + " [ 4.1705e-02, -4.6869e-04, 3.6647e-01, ..., 2.8620e-02,\n", + " -6.0034e-04, -2.6611e-03],\n", + " [ 3.3684e-02, -3.9706e-04, 3.2479e-01, ..., 4.2866e-02,\n", + " -9.5447e-04, -2.5414e-03],\n", + " ...,\n", + " [ 4.0515e-02, -4.3612e-05, 3.2192e-01, ..., 4.2416e-02,\n", + " -6.0942e-04, -2.6780e-03],\n", + " [ 6.5812e-02, -7.1343e-04, 4.0084e-01, ..., 7.1804e-03,\n", + " -5.9295e-04, -3.2236e-03],\n", + " [ 6.8344e-02, -7.2198e-04, 4.0462e-01, ..., 8.5096e-04,\n", + " -5.5775e-04, -3.2390e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 2.9069, -0.0354, 1.2412, ..., -0.0143, -0.0209, 3.2992],\n", + " [ 3.1819, -0.0368, 1.7136, ..., -0.0182, -0.0243, 3.3394],\n", + " [ 5.0018, -0.0784, 1.6286, ..., -0.0312, -0.0341, 4.4210],\n", + " ...,\n", + " [ 2.6769, -0.0325, 1.0604, ..., -0.0132, -0.0200, 3.2448],\n", + " [ 3.2911, -0.0456, 0.3706, ..., -0.0150, -0.0197, 3.0518],\n", + " [ 3.3495, -0.0414, 1.9126, ..., -0.0135, -0.0270, 4.3840]],\n", + " device='cuda:0', grad_fn=), 'author': tensor([[ 4.6921e-01, -5.4357e-03, -1.4451e-03, ..., -2.6941e-04,\n", + " 1.7886e-01, 4.5925e-01],\n", + " [-4.3627e-04, -2.3746e-04, 1.4040e-01, ..., 9.8954e-02,\n", + " -2.8513e-04, -9.4116e-04],\n", + " [ 5.5902e-01, -5.2734e-03, -7.4593e-04, ..., -2.0776e-04,\n", + " 1.1393e-01, 2.6902e-01],\n", + " ...,\n", + " [ 4.7330e-01, -1.9461e-03, -1.3761e-03, ..., 2.9394e-02,\n", + " -6.0372e-05, 1.9448e-01],\n", + " [ 4.9547e-01, -4.4379e-03, -1.0035e-03, ..., 6.7700e-02,\n", + " 4.7361e-02, 2.8487e-01],\n", + " [ 5.4603e-01, -2.3286e-03, -1.1007e-03, ..., 1.1619e-01,\n", + " 2.1663e-02, 2.6819e-01]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-9.0766e-03, 2.7081e-01, -1.3817e-03, ..., 7.1563e-01,\n", + " -1.2717e-03, -4.4322e-03],\n", + " [-8.2525e-03, 2.0211e-01, -2.1520e-03, ..., 7.8196e-01,\n", + " -2.5909e-03, -6.4390e-03],\n", + " [-8.6887e-03, 2.3968e-01, -6.9929e-04, ..., 4.8351e-01,\n", + " -1.0179e-03, -4.9529e-03],\n", + " ...,\n", + " [-7.2690e-03, 1.2636e-01, -1.8510e-03, ..., 5.6219e-01,\n", + " -2.4037e-03, -5.1862e-03],\n", + " [-8.5133e-03, 2.6497e-01, -3.0475e-03, ..., 8.4367e-01,\n", + " -1.1309e-03, -7.3330e-03],\n", + " [-1.0533e-02, 1.9158e-01, -4.0069e-03, ..., 1.0190e+00,\n", + " -2.8014e-03, -8.7492e-03]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 112, 82, 179, 179, 183, 111, 75, 41, 117, 117, 618, 248,\n", + " 277, 275, 457, 457, 284, 682, 682, 682, 841, 841, 444, 444,\n", + " 668, 671, 671, 801, 872, 1004, 1045, 1045, 1349, 1337, 1362, 1207,\n", + " 1151, 799, 1359, 1343, 1673, 1673, 1709, 1562, 1609, 1645, 1645, 1717,\n", + " 1769, 1978, 1975, 2026, 1993, 1993, 2029, 1877, 1876, 1942, 2052, 2107,\n", + " 2156, 2183, 2177, 2177, 2221, 2221, 2072, 2072, 2072, 2213, 2213, 2241,\n", + " 2241, 2151, 2140, 2140, 2307, 2307, 2307, 2307, 2165, 2510, 2558, 2532,\n", + " 2532, 2454, 2607, 2791, 2651, 2667, 2738, 2738, 2810, 2649, 2733, 2733,\n", + " 2669, 2669, 2875, 2992, 2955, 2813, 3051, 3023, 3023, 3366, 3108, 3108,\n", + " 3200, 3227, 3317, 3304, 3251, 3147, 3147, 3333, 3333, 3467, 3467, 3324,\n", + " 3472, 3393, 3585, 3667, 3728, 3880, 3804, 3934, 3794, 3842, 3759, 3782,\n", + " 3782, 4030, 4016, 4016, 4016, 4005, 4056, 4056, 3952, 3952, 3952, 3952,\n", + " 4121, 4066, 4114, 4114, 4245, 4166, 4166, 4533, 4456, 4412, 4411, 4411,\n", + " 4554, 4592, 4592, 4557, 4557, 4557, 4336, 4533, 4514, 4514, 4555, 4555,\n", + " 4804, 4804, 4804, 4804, 4804, 4659, 4636, 4806, 4645, 4589, 4817, 4888,\n", + " 4888, 4720, 5129, 5322, 5074, 5319],\n", + " [ 101, 82, 30, 74, 12, 61, 64, 65, 126, 73, 26, 67,\n", + " 18, 7, 65, 99, 92, 72, 30, 17, 57, 28, 83, 96,\n", + " 80, 54, 37, 1, 70, 111, 41, 67, 38, 119, 59, 49,\n", + " 102, 123, 68, 125, 34, 80, 68, 41, 129, 62, 68, 1,\n", + " 84, 75, 91, 18, 58, 25, 88, 103, 97, 116, 22, 90,\n", + " 122, 113, 33, 23, 35, 25, 3, 84, 2, 78, 118, 93,\n", + " 94, 46, 47, 105, 5, 120, 4, 98, 0, 22, 39, 8,\n", + " 79, 84, 18, 39, 1, 94, 10, 71, 20, 22, 100, 15,\n", + " 29, 51, 11, 70, 16, 88, 21, 7, 65, 44, 3, 27,\n", + " 42, 43, 86, 110, 106, 27, 9, 76, 56, 75, 61, 53,\n", + " 102, 0, 22, 127, 97, 94, 87, 70, 37, 38, 81, 60,\n", + " 74, 24, 36, 19, 86, 106, 70, 89, 70, 77, 32, 102,\n", + " 22, 66, 63, 85, 71, 70, 129, 6, 45, 108, 56, 112,\n", + " 14, 129, 70, 70, 55, 56, 40, 69, 114, 70, 86, 70,\n", + " 70, 124, 128, 31, 107, 104, 13, 48, 109, 115, 121, 117,\n", + " 70, 95, 1, 117, 50, 52]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1304, 63, 5247, ..., 1218, 1781, 3428],\n", + " [ 10, 261, 33, ..., 7931, 7931, 7931]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 25, 83, 103, ..., 119, 25, 127],\n", + " [ 17, 30, 1, ..., 5357, 5320, 5286]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 225, 225, 225, ..., 7962, 7962, 7962],\n", + " [ 320, 239, 548, ..., 677, 452, 495]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 247, 675, 382, ..., 531, 90, 656],\n", + " [ 26, 340, 46, ..., 7910, 8030, 7956]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[7091, 6465, 668, ..., 3961, 7267, 6015],\n", + " [ 179, 180, 180, ..., 5402, 5363, 5353]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 33, 33, 33, ..., 8009, 8009, 8009],\n", + " [4072, 5247, 7251, ..., 1959, 2304, 2126]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 179, 179, 179, ..., 5397, 5397, 5397],\n", + " [7091, 7663, 5951, ..., 6603, 181, 3853]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006575\n", + "sampling 0.006416\n", + "noi time: 0.001934\n", + "get_vertex_data call: 0.039743\n", + "noi group time: 0.001912\n", + "eoi_group_time: 0.016991\n", + "second half: 0.222278\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 10206, 10012, 31571, ..., 1130746, 1133969, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 10206, 10012, 31571, ..., 1130746, 1133969, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1231426, 1215975, 1208425, ..., 1937554, 1935116, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1231426, 1215975, 1208425, ..., 1937554, 1935116, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1141424, 1141435, 1140284, 1135933, 1135726, 1140799, 1141758,\n", + " 1136208, 1139462, 1136969, 1146803, 1138059, 1143615, 1137947, 1137271,\n", + " 1143362, 1143372, 1139241, 1146647, 1139610, 1139613, 1139615, 1139958,\n", + " 1150509, 1142963, 1136950, 1149216, 1155689, 1147473, 1147476, 1147483,\n", + " 1149037, 1146995, 1146996, 1153012, 1148345, 1150200, 1136125, 1152667,\n", + " 1152669, 1153217, 1136742, 1147095, 1155014, 1155018, 1155019, 1147211,\n", + " 1136685, 1152427, 1134662, 1140304, 1151546, 1140540, 1137172, 1151520,\n", + " 1134735, 1140029, 1140947, 1140953, 1135367, 1135202, 1135204, 1137798,\n", + " 1136034, 1141036, 1134794, 1157443, 1137329, 1136185, 1143069, 1157102,\n", + " 1157103, 1137693, 1136609, 1136619, 1135340, 1135342, 1144395, 1157393,\n", + " 1136662, 1137441, 1137449, 1156159, 1141702, 1135579, 1135583, 1142596,\n", + " 1142607, 1136097, 1138514, 1138524, 1153098, 1138580, 1156967, 1154132,\n", + " 1154141, 1139685, 1138440, 1136541, 1138461, 1160579, 1137922, 1136594,\n", + " 1149328, 1149333, 1156606, 1147112, 1147118, 1142611, 1135359, 1138177,\n", + " 1138185, 1158984, 1148531, 1137109, 1139667, 1139673, 1138070, 1136085,\n", + " 1134992, 1142439, 1135781, 1136734, 1158961, 1158974, 1144410, 1153543,\n", + " 1140034, 1139085, 1138148, 1141963, 1141966, 1155660, 1141992, 1141985,\n", + " 1152042, 1152044, 1136054, 1137734, 1137728, 1146222, 1134750, 1135540,\n", + " 1135551, 1135549, 1136697, 1140228, 1137895, 1141088, 1141095, 1149001,\n", + " 1145347, 1141975, 1143711, 1137670, 1139033, 1135861, 1135865, 1136426,\n", + " 1141224, 1141226, 1141891, 1139386, 1136917, 1143673, 1144237, 1139495,\n", + " 1134979, 1147850, 1149435, 1144428, 1141816, 1145161, 1143202, 1140173,\n", + " 1158749, 1149108, 1137070, 1140110, 1142913, 1144596, 1136867, 1140892,\n", + " 1135327, 1144182, 1137604, 1150906, 1161701, 1147153, 1142646, 1149186,\n", + " 1141365, 1151112, 1141664, 1149097, 1138292, 1144279, 1153556, 1139508,\n", + " 1139510, 1138815, 1145001, 1140977, 1140990, 1147050, 1147047, 1145873,\n", + " 1152976, 1152980, 1152988, 1152991, 1139007, 1141925, 1144242, 1140585,\n", + " 1150255, 1140690, 1143637, 1137571, 1134856, 1145983, 1143851, 1136275,\n", + " 1146024, 1146134, 1141585, 1149928, 1149930, 1139990, 1143293, 1151123,\n", + " 1147543, 1147282, 1142817, 1142829, 1142816, 1164371, 1149159, 1149160,\n", + " 1149161, 1142628, 1142637, 1146094, 1149608, 1136836, 1139329, 1144779,\n", + " 1142149, 1145429, 1144754, 1144765, 1144753, 1144611, 1145816, 1137098,\n", + " 1139979, 1135876, 1144316, 1135813, 1150294, 1146514, 1146516, 1146523,\n", + " 1146526, 1138024, 1143456, 1143457, 1144291, 1144303, 1140364, 1149574,\n", + " 1137985, 1137994, 1143081, 1166410, 1148966, 1144725, 1144213, 1147984,\n", + " 1147995, 1147999, 1134899, 1139252, 1147131, 1148704, 1141327, 1141836,\n", + " 1146749, 1153701, 1152328, 1143434, 1147070, 1149714, 1147025, 1147253,\n", + " 1147249, 1147970, 1147873, 1147882, 1154526, 1145240, 1145245, 1145750,\n", + " 1145751, 1151239, 1151242, 1152538, 1150280, 1150445, 1149258, 1148928,\n", + " 1156468, 1146887, 1152013, 1147794, 1151482, 1139914, 1140566, 1149530,\n", + " 1147009, 1135806, 1158944, 1141949, 1141278, 1144821, 1151795, 1154976,\n", + " 1154982, 1147653, 1149412, 1146412, 1148288, 1148294, 1148302, 1137724,\n", + " 1151412, 1158786, 1158798, 1152561, 1136251, 1146676, 1157973, 1157983,\n", + " 1148720, 1148724, 1148725, 1148729, 1145862, 1171341, 1143901, 1148204,\n", + " 1153182, 1153186, 1153188, 1153197, 1152974, 1150935, 1148058, 1152877,\n", + " 1144860, 1155088, 1141017, 1147446, 1147447, 1147442, 1151821, 1152581,\n", + " 1152586, 1151906, 1151913, 1154183, 1154190, 1148498, 1151351, 1155152,\n", + " 1146975, 1146623, 1151691, 1146490, 1135688, 1152415, 1146280, 1150085,\n", + " 1145539, 1137746, 1146307, 1146304, 1152622, 1140521, 1151967, 1155337,\n", + " 1155334, 1154120, 1154123, 1157826, 1157835, 1157839, 1152673, 1151580,\n", + " 1151617, 1150588, 1150591, 1136131, 1136134, 1136788, 1152950, 1140935,\n", + " 1145952, 1152898, 1152903, 1152341, 1158422, 1153311, 1145576, 1138275,\n", + " 1138279, 1152296, 1136028, 1136031, 1136016, 1158704, 1140684, 1151064,\n", + " 1154733, 1142777, 1156422, 1149272, 1149273, 1144023, 1148033, 1148040,\n", + " 1154453, 1154457, 1137048, 1148628, 1158530, 1137458, 1148242, 1135698,\n", + " 1153075, 1142041, 1154381, 1157225, 1157229, 1158860, 1157064, 1152833,\n", + " 1145191, 1143502, 1150465, 1150475, 1146854, 1135219, 1135231, 1135740,\n", + " 1151788, 1135644, 1158306, 1158308, 1158311, 1155441, 1161728, 1150129,\n", + " 1150130, 1150132, 1150136, 1138569, 1154529, 1154528, 1145603, 1142755,\n", + " 1142764, 1142758, 1156207, 1156271, 1151379, 1140186, 1155122, 1149321,\n", + " 1155748, 1155758, 1156463, 1158096, 1168230, 1155675, 1155628, 1156563,\n", + " 1156566, 1155572, 1136466, 1158824, 1153721, 1158330, 1157000, 1148835,\n", + " 1153367, 1161391, 1154648, 1154241, 1154080, 1156714, 1137359, 1154911,\n", + " 1143189, 1157439, 1157430, 1150068, 1150069, 1143517, 1157282, 1137152,\n", + " 1158585, 1153786, 1159116, 1145693, 1145690, 1145681, 1134677, 1135601,\n", + " 1135605, 1148148, 1148149, 1158502, 1158665, 1157684, 1149145, 1152213,\n", + " 1140380, 1140374, 1155872, 1157033, 1142466, 1155975, 1156957, 1153765,\n", + " 1142076, 1158834, 1158841, 1156811, 1162534, 1155393, 1160163, 1153503,\n", + " 1136896, 1140213, 1158803, 1156778, 1158284, 1136480, 1136494, 1136491,\n", + " 1153632, 1156663, 1156665, 1147586, 1156490, 1153808, 1157678, 1136646,\n", + " 1179181, 1158558, 1165778, 1138101, 1155871, 1161539, 1183449, 1163456,\n", + " 1164276, 1142666, 1157751, 1167359, 1159057, 1167589, 1142427, 1157944,\n", + " 1157946, 1162039, 1153052, 1153042, 1153045, 1155763, 1155772, 1163707,\n", + " 1156098, 1138393, 1162917, 1160646, 1150046, 1159475, 1149063, 1145948,\n", + " 1155476, 1153519, 1161652, 1164006, 1165386, 1149956, 1149966, 1139290,\n", + " 1159999, 1148771, 1146063, 1146356, 1160181, 1184916, 1165308, 1158878,\n", + " 1158876, 1170415, 1140641, 1140643, 1141864, 1148600, 1159646, 1155810,\n", + " 1185124, 1141800, 1159025, 1159037, 1166281, 1169109, 1152247, 1186660,\n", + " 1160605, 1155588, 1165993, 1138674, 1148560, 1148569, 1144989, 1149016,\n", + " 1146500, 1153239, 1164580, 1161240, 1144739, 1144747, 1144750, 1152776,\n", + " 1155044, 1141468, 1141471, 1141459, 1151651, 1147426, 1147427, 1157047,\n", + " 1156737, 1156739, 1165182, 1153663, 1171040, 1150315, 1144812, 1140112,\n", + " 1192121, 1135567, 1165716, 1142722, 1156293, 1156289, 1165644, 1145743,\n", + " 1145738, 1145228, 1155320, 1171687, 1144972, 1144973, 1152624, 1152630,\n", + " 1139351, 1147714, 1153520, 1153534, 1158724, 1154076, 1147339, 1144681,\n", + " 1166653, 1169300, 1169304, 1155172, 1150515, 1150518, 1154618, 1144346,\n", + " 1144336, 1157534, 1138372, 1138375, 1147750, 1154670, 1154885, 1157331,\n", + " 1138130, 1141051, 1141043, 1151668, 1169359, 1149452, 1158623, 1172875,\n", + " 1147416, 1152353, 1170284, 1172782, 1168400, 1155931, 1149402, 1173307,\n", + " 1183927, 1154027, 1152151, 1180341, 1167857, 1151201, 1151697, 1157158,\n", + " 1157153, 1167239, 1147711, 1151850, 1157592, 1157593, 1165122, 1140333,\n", + " 1153428, 1166535, 1169083, 1170874, 1179555, 1150234, 1154148, 1167520,\n", + " 1169814, 1143420, 1179243, 1153803, 1153141, 1172814, 1179721, 1144910,\n", + " 1151519, 1161255, 1155262, 1171773, 1154707, 1154718, 1157798, 1157795,\n", + " 1177277, 1182812, 1171623, 1155799, 1155806, 1157992, 1153898, 1182454,\n", + " 1154497, 1154508, 1134650, 1145626, 1156432, 1178757, 1149753, 1149755,\n", + " 1146242, 1153601, 1157760, 1160117, 1184144, 1181143, 1158771, 1158380,\n", + " 1158371, 1155899, 1157270, 1188460, 1184317, 1186712, 1162253, 1164231,\n", + " 1182337, 1190156, 1193376, 1164262, 1170802, 1156161, 1168943, 1172174,\n", + " 1156539, 1170826, 1170828, 1139828, 1139831, 1150265, 1149668, 1156055,\n", + " 1149539, 1177483, 1187210, 1170881, 1181283, 1189972, 1186028, 1151774,\n", + " 1171243, 1153733, 1181692, 1172339, 1162502, 1169707, 1171201, 1177842,\n", + " 1172429, 1172122, 1171953, 1182828, 1181621, 1166789, 1155962, 1162661,\n", + " 1192793, 1186393, 1194151, 1191142, 1189800, 1169398, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1141424, 1141435, 1140284, 1135933, 1135726, 1140799, 1141758,\n", + " 1136208, 1139462, 1136969, 1146803, 1138059, 1143615, 1137947, 1137271,\n", + " 1143362, 1143372, 1139241, 1146647, 1139610, 1139613, 1139615, 1139958,\n", + " 1150509, 1142963, 1136950, 1149216, 1155689, 1147473, 1147476, 1147483,\n", + " 1149037, 1146995, 1146996, 1153012, 1148345, 1150200, 1136125, 1152667,\n", + " 1152669, 1153217, 1136742, 1147095, 1155014, 1155018, 1155019, 1147211,\n", + " 1136685, 1152427, 1134662, 1140304, 1151546, 1140540, 1137172, 1151520,\n", + " 1134735, 1140029, 1140947, 1140953, 1135367, 1135202, 1135204, 1137798,\n", + " 1136034, 1141036, 1134794, 1157443, 1137329, 1136185, 1143069, 1157102,\n", + " 1157103, 1137693, 1136609, 1136619, 1135340, 1135342, 1144395, 1157393,\n", + " 1136662, 1137441, 1137449, 1156159, 1141702, 1135579, 1135583, 1142596,\n", + " 1142607, 1136097, 1138514, 1138524, 1153098, 1138580, 1156967, 1154132,\n", + " 1154141, 1139685, 1138440, 1136541, 1138461, 1160579, 1137922, 1136594,\n", + " 1149328, 1149333, 1156606, 1147112, 1147118, 1142611, 1135359, 1138177,\n", + " 1138185, 1158984, 1148531, 1137109, 1139667, 1139673, 1138070, 1136085,\n", + " 1134992, 1142439, 1135781, 1136734, 1158961, 1158974, 1144410, 1153543,\n", + " 1140034, 1139085, 1138148, 1141963, 1141966, 1155660, 1141992, 1141985,\n", + " 1152042, 1152044, 1136054, 1137734, 1137728, 1146222, 1134750, 1135540,\n", + " 1135551, 1135549, 1136697, 1140228, 1137895, 1141088, 1141095, 1149001,\n", + " 1145347, 1141975, 1143711, 1137670, 1139033, 1135861, 1135865, 1136426,\n", + " 1141224, 1141226, 1141891, 1139386, 1136917, 1143673, 1144237, 1139495,\n", + " 1134979, 1147850, 1149435, 1144428, 1141816, 1145161, 1143202, 1140173,\n", + " 1158749, 1149108, 1137070, 1140110, 1142913, 1144596, 1136867, 1140892,\n", + " 1135327, 1144182, 1137604, 1150906, 1161701, 1147153, 1142646, 1149186,\n", + " 1141365, 1151112, 1141664, 1149097, 1138292, 1144279, 1153556, 1139508,\n", + " 1139510, 1138815, 1145001, 1140977, 1140990, 1147050, 1147047, 1145873,\n", + " 1152976, 1152980, 1152988, 1152991, 1139007, 1141925, 1144242, 1140585,\n", + " 1150255, 1140690, 1143637, 1137571, 1134856, 1145983, 1143851, 1136275,\n", + " 1146024, 1146134, 1141585, 1149928, 1149930, 1139990, 1143293, 1151123,\n", + " 1147543, 1147282, 1142817, 1142829, 1142816, 1164371, 1149159, 1149160,\n", + " 1149161, 1142628, 1142637, 1146094, 1149608, 1136836, 1139329, 1144779,\n", + " 1142149, 1145429, 1144754, 1144765, 1144753, 1144611, 1145816, 1137098,\n", + " 1139979, 1135876, 1144316, 1135813, 1150294, 1146514, 1146516, 1146523,\n", + " 1146526, 1138024, 1143456, 1143457, 1144291, 1144303, 1140364, 1149574,\n", + " 1137985, 1137994, 1143081, 1166410, 1148966, 1144725, 1144213, 1147984,\n", + " 1147995, 1147999, 1134899, 1139252, 1147131, 1148704, 1141327, 1141836,\n", + " 1146749, 1153701, 1152328, 1143434, 1147070, 1149714, 1147025, 1147253,\n", + " 1147249, 1147970, 1147873, 1147882, 1154526, 1145240, 1145245, 1145750,\n", + " 1145751, 1151239, 1151242, 1152538, 1150280, 1150445, 1149258, 1148928,\n", + " 1156468, 1146887, 1152013, 1147794, 1151482, 1139914, 1140566, 1149530,\n", + " 1147009, 1135806, 1158944, 1141949, 1141278, 1144821, 1151795, 1154976,\n", + " 1154982, 1147653, 1149412, 1146412, 1148288, 1148294, 1148302, 1137724,\n", + " 1151412, 1158786, 1158798, 1152561, 1136251, 1146676, 1157973, 1157983,\n", + " 1148720, 1148724, 1148725, 1148729, 1145862, 1171341, 1143901, 1148204,\n", + " 1153182, 1153186, 1153188, 1153197, 1152974, 1150935, 1148058, 1152877,\n", + " 1144860, 1155088, 1141017, 1147446, 1147447, 1147442, 1151821, 1152581,\n", + " 1152586, 1151906, 1151913, 1154183, 1154190, 1148498, 1151351, 1155152,\n", + " 1146975, 1146623, 1151691, 1146490, 1135688, 1152415, 1146280, 1150085,\n", + " 1145539, 1137746, 1146307, 1146304, 1152622, 1140521, 1151967, 1155337,\n", + " 1155334, 1154120, 1154123, 1157826, 1157835, 1157839, 1152673, 1151580,\n", + " 1151617, 1150588, 1150591, 1136131, 1136134, 1136788, 1152950, 1140935,\n", + " 1145952, 1152898, 1152903, 1152341, 1158422, 1153311, 1145576, 1138275,\n", + " 1138279, 1152296, 1136028, 1136031, 1136016, 1158704, 1140684, 1151064,\n", + " 1154733, 1142777, 1156422, 1149272, 1149273, 1144023, 1148033, 1148040,\n", + " 1154453, 1154457, 1137048, 1148628, 1158530, 1137458, 1148242, 1135698,\n", + " 1153075, 1142041, 1154381, 1157225, 1157229, 1158860, 1157064, 1152833,\n", + " 1145191, 1143502, 1150465, 1150475, 1146854, 1135219, 1135231, 1135740,\n", + " 1151788, 1135644, 1158306, 1158308, 1158311, 1155441, 1161728, 1150129,\n", + " 1150130, 1150132, 1150136, 1138569, 1154529, 1154528, 1145603, 1142755,\n", + " 1142764, 1142758, 1156207, 1156271, 1151379, 1140186, 1155122, 1149321,\n", + " 1155748, 1155758, 1156463, 1158096, 1168230, 1155675, 1155628, 1156563,\n", + " 1156566, 1155572, 1136466, 1158824, 1153721, 1158330, 1157000, 1148835,\n", + " 1153367, 1161391, 1154648, 1154241, 1154080, 1156714, 1137359, 1154911,\n", + " 1143189, 1157439, 1157430, 1150068, 1150069, 1143517, 1157282, 1137152,\n", + " 1158585, 1153786, 1159116, 1145693, 1145690, 1145681, 1134677, 1135601,\n", + " 1135605, 1148148, 1148149, 1158502, 1158665, 1157684, 1149145, 1152213,\n", + " 1140380, 1140374, 1155872, 1157033, 1142466, 1155975, 1156957, 1153765,\n", + " 1142076, 1158834, 1158841, 1156811, 1162534, 1155393, 1160163, 1153503,\n", + " 1136896, 1140213, 1158803, 1156778, 1158284, 1136480, 1136494, 1136491,\n", + " 1153632, 1156663, 1156665, 1147586, 1156490, 1153808, 1157678, 1136646,\n", + " 1179181, 1158558, 1165778, 1138101, 1155871, 1161539, 1183449, 1163456,\n", + " 1164276, 1142666, 1157751, 1167359, 1159057, 1167589, 1142427, 1157944,\n", + " 1157946, 1162039, 1153052, 1153042, 1153045, 1155763, 1155772, 1163707,\n", + " 1156098, 1138393, 1162917, 1160646, 1150046, 1159475, 1149063, 1145948,\n", + " 1155476, 1153519, 1161652, 1164006, 1165386, 1149956, 1149966, 1139290,\n", + " 1159999, 1148771, 1146063, 1146356, 1160181, 1184916, 1165308, 1158878,\n", + " 1158876, 1170415, 1140641, 1140643, 1141864, 1148600, 1159646, 1155810,\n", + " 1185124, 1141800, 1159025, 1159037, 1166281, 1169109, 1152247, 1186660,\n", + " 1160605, 1155588, 1165993, 1138674, 1148560, 1148569, 1144989, 1149016,\n", + " 1146500, 1153239, 1164580, 1161240, 1144739, 1144747, 1144750, 1152776,\n", + " 1155044, 1141468, 1141471, 1141459, 1151651, 1147426, 1147427, 1157047,\n", + " 1156737, 1156739, 1165182, 1153663, 1171040, 1150315, 1144812, 1140112,\n", + " 1192121, 1135567, 1165716, 1142722, 1156293, 1156289, 1165644, 1145743,\n", + " 1145738, 1145228, 1155320, 1171687, 1144972, 1144973, 1152624, 1152630,\n", + " 1139351, 1147714, 1153520, 1153534, 1158724, 1154076, 1147339, 1144681,\n", + " 1166653, 1169300, 1169304, 1155172, 1150515, 1150518, 1154618, 1144346,\n", + " 1144336, 1157534, 1138372, 1138375, 1147750, 1154670, 1154885, 1157331,\n", + " 1138130, 1141051, 1141043, 1151668, 1169359, 1149452, 1158623, 1172875,\n", + " 1147416, 1152353, 1170284, 1172782, 1168400, 1155931, 1149402, 1173307,\n", + " 1183927, 1154027, 1152151, 1180341, 1167857, 1151201, 1151697, 1157158,\n", + " 1157153, 1167239, 1147711, 1151850, 1157592, 1157593, 1165122, 1140333,\n", + " 1153428, 1166535, 1169083, 1170874, 1179555, 1150234, 1154148, 1167520,\n", + " 1169814, 1143420, 1179243, 1153803, 1153141, 1172814, 1179721, 1144910,\n", + " 1151519, 1161255, 1155262, 1171773, 1154707, 1154718, 1157798, 1157795,\n", + " 1177277, 1182812, 1171623, 1155799, 1155806, 1157992, 1153898, 1182454,\n", + " 1154497, 1154508, 1134650, 1145626, 1156432, 1178757, 1149753, 1149755,\n", + " 1146242, 1153601, 1157760, 1160117, 1184144, 1181143, 1158771, 1158380,\n", + " 1158371, 1155899, 1157270, 1188460, 1184317, 1186712, 1162253, 1164231,\n", + " 1182337, 1190156, 1193376, 1164262, 1170802, 1156161, 1168943, 1172174,\n", + " 1156539, 1170826, 1170828, 1139828, 1139831, 1150265, 1149668, 1156055,\n", + " 1149539, 1177483, 1187210, 1170881, 1181283, 1189972, 1186028, 1151774,\n", + " 1171243, 1153733, 1181692, 1172339, 1162502, 1169707, 1171201, 1177842,\n", + " 1172429, 1172122, 1171953, 1182828, 1181621, 1166789, 1155962, 1162661,\n", + " 1192793, 1186393, 1194151, 1191142, 1189800, 1169398, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195452, 1197175, 1199439, 1197719, 1199282, 1202255, 1196337, 1201577,\n", + " 1201582, 1199264, 1200644, 1199259, 1201016, 1202804, 1194864, 1194745,\n", + " 1199053, 1196624, 1195514, 1195263, 1196539, 1201992, 1195190, 1197697,\n", + " 1195828, 1195459, 1194882, 1195895, 1195740, 1197856, 1196977, 1199361,\n", + " 1195320, 1195325, 1195121, 1198958, 1198163, 1196716, 1199823, 1195148,\n", + " 1195265, 1195267, 1195279, 1197141, 1194830, 1195659, 1195541, 1196122,\n", + " 1199699, 1196283, 1195353, 1197316, 1198280, 1198282, 1200949, 1200959,\n", + " 1199856, 1199685, 1200872, 1199231, 1201908, 1195018, 1199676, 1194786,\n", + " 1199949, 1201511, 1200668, 1197970, 1197601, 1196727, 1195773, 1198428,\n", + " 1199410, 1199418, 1198811, 1201547, 1201169, 1198066, 1198593, 1201156,\n", + " 1202630, 1202635, 1200913, 1200918, 1199546, 1202641, 1199712, 1201041,\n", + " 1201737, 1200526, 1200315, 1203071, 1197097, 1202055, 1199887, 1199099,\n", + " 1199908, 1202239, 1202338, 1201291, 1198478, 1201871, 1202889, 1201796,\n", + " 1200784, 1195679, 1195379, 1197816, 1196414, 1198967, 1201143, 1198148,\n", + " 1197735, 1199782, 1198819, 1200707, 1197335, 1197343, 1195165, 1203162,\n", + " 1196428], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195452, 1197175, 1199439, 1197719, 1199282, 1202255, 1196337, 1201577,\n", + " 1201582, 1199264, 1200644, 1199259, 1201016, 1202804, 1194864, 1194745,\n", + " 1199053, 1196624, 1195514, 1195263, 1196539, 1201992, 1195190, 1197697,\n", + " 1195828, 1195459, 1194882, 1195895, 1195740, 1197856, 1196977, 1199361,\n", + " 1195320, 1195325, 1195121, 1198958, 1198163, 1196716, 1199823, 1195148,\n", + " 1195265, 1195267, 1195279, 1197141, 1194830, 1195659, 1195541, 1196122,\n", + " 1199699, 1196283, 1195353, 1197316, 1198280, 1198282, 1200949, 1200959,\n", + " 1199856, 1199685, 1200872, 1199231, 1201908, 1195018, 1199676, 1194786,\n", + " 1199949, 1201511, 1200668, 1197970, 1197601, 1196727, 1195773, 1198428,\n", + " 1199410, 1199418, 1198811, 1201547, 1201169, 1198066, 1198593, 1201156,\n", + " 1202630, 1202635, 1200913, 1200918, 1199546, 1202641, 1199712, 1201041,\n", + " 1201737, 1200526, 1200315, 1203071, 1197097, 1202055, 1199887, 1199099,\n", + " 1199908, 1202239, 1202338, 1201291, 1198478, 1201871, 1202889, 1201796,\n", + " 1200784, 1195679, 1195379, 1197816, 1196414, 1198967, 1201143, 1198148,\n", + " 1197735, 1199782, 1198819, 1200707, 1197335, 1197343, 1195165, 1203162,\n", + " 1196428], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 5.0862e-02, -4.6986e-04, 3.5768e-01, ..., 4.7521e-02,\n", + " -9.9710e-04, -2.8460e-03],\n", + " [ 4.0783e-02, -3.8207e-04, 3.7358e-01, ..., 6.1623e-02,\n", + " -7.0280e-04, -2.9549e-03],\n", + " [ 8.5673e-02, -7.1514e-04, 4.7133e-01, ..., 1.1165e-02,\n", + " -8.1525e-04, -3.6689e-03],\n", + " ...,\n", + " [ 5.0424e-02, -3.3973e-04, 3.5035e-01, ..., 4.4888e-02,\n", + " -9.2635e-04, -2.7544e-03],\n", + " [ 2.0199e-02, -7.5688e-04, 4.3619e-01, ..., 3.9643e-02,\n", + " -9.2760e-04, -2.9035e-03],\n", + " [ 8.5991e-02, -6.7618e-04, 4.6963e-01, ..., 1.1108e-02,\n", + " -8.6400e-04, -3.6659e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 2.7657, -0.0424, 0.9949, ..., -0.0169, -0.0255, 3.4087],\n", + " [ 4.6868, -0.0802, 1.7049, ..., -0.0358, -0.0357, 3.8847],\n", + " [ 4.4140, -0.0728, 1.7348, ..., -0.0348, -0.0395, 3.8641],\n", + " ...,\n", + " [ 3.7054, -0.0526, 1.9648, ..., -0.0271, -0.0326, 3.6837],\n", + " [ 2.3469, -0.0342, 0.8676, ..., -0.0157, -0.0198, 2.4281],\n", + " [ 2.8908, -0.0379, 1.2349, ..., -0.0128, -0.0277, 4.0770]],\n", + " device='cuda:0', grad_fn=), 'author': tensor([[ 3.4465e-01, -1.8814e-03, -2.6780e-04, ..., 2.1621e-01,\n", + " -8.5516e-04, 1.3117e-01],\n", + " [ 4.0086e-01, -2.8989e-03, -9.6691e-04, ..., 2.5633e-01,\n", + " 7.0916e-02, 2.5887e-01],\n", + " [ 4.2983e-01, -2.8658e-03, -9.7331e-04, ..., 2.1933e-01,\n", + " 1.3198e-01, 2.5076e-01],\n", + " ...,\n", + " [ 4.3379e-01, -5.6626e-04, -9.1054e-04, ..., 2.5683e-01,\n", + " -1.4935e-03, 2.4990e-01],\n", + " [ 4.9602e-01, -1.5961e-03, -3.5838e-04, ..., 2.0342e-01,\n", + " -4.8141e-04, 2.1011e-01],\n", + " [ 4.3532e-01, -3.0681e-03, -1.1507e-03, ..., 2.6950e-01,\n", + " 1.9691e-01, 3.8935e-01]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-5.8628e-03, 1.5290e-01, 8.1887e-02, ..., 1.8965e-01,\n", + " -2.3748e-03, -2.5891e-03],\n", + " [-5.7656e-03, 1.5479e-01, -5.5383e-04, ..., 4.0940e-01,\n", + " -1.2218e-03, -4.1854e-03],\n", + " [-7.1748e-03, 3.4785e-01, -5.9103e-04, ..., 6.6684e-01,\n", + " -5.6793e-04, -5.0437e-03],\n", + " ...,\n", + " [-8.0530e-03, 4.6345e-01, -5.6410e-04, ..., 7.3258e-01,\n", + " -2.2968e-03, -6.9830e-03],\n", + " [-6.5888e-03, 1.4312e-01, -1.0200e-03, ..., 4.9242e-01,\n", + " -3.0387e-03, -4.8603e-03],\n", + " [-8.4281e-03, 2.9007e-01, -2.4269e-03, ..., 7.7723e-01,\n", + " -1.9652e-03, -6.9540e-03]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 109, 109, 62, 70, 70, 426, 465, 283, 344, 344, 344, 344,\n", + " 251, 793, 513, 513, 497, 497, 803, 803, 535, 535, 636, 850,\n", + " 701, 871, 966, 1110, 1080, 1083, 1266, 1297, 1297, 1443, 1180, 1274,\n", + " 1247, 1297, 1297, 1297, 1159, 1381, 1509, 1325, 1261, 1638, 1638, 1336,\n", + " 1610, 1610, 1582, 1582, 1582, 1582, 1767, 1617, 1445, 1813, 1674, 1649,\n", + " 1649, 1649, 1664, 1901, 1824, 1824, 1814, 1814, 2061, 1982, 2043, 2043,\n", + " 2058, 2074, 2081, 2152, 2152, 2058, 2248, 2314, 2238, 2264, 2292, 2292,\n", + " 2292, 2292, 2329, 2324, 2456, 2456, 2373, 2440, 2631, 2631, 2631, 2540,\n", + " 2988, 2659, 3102, 2896, 2864, 3073, 2817, 3090, 2974, 2974, 2716, 2876,\n", + " 3070, 3068, 3036, 3276, 3276, 3083, 3083, 3195, 3292, 3361, 3623, 3623,\n", + " 3311, 3311, 3623, 3733, 3537, 3553, 3895, 3872, 3834, 3834, 4041, 4063,\n", + " 4105, 4112, 4077, 4180, 4118, 4171, 4232, 4232, 4284, 4214, 4362, 4425,\n", + " 4527, 4527, 4527, 4485, 4485, 4485, 4461, 4461, 4425, 4425, 4712, 4955,\n", + " 4663, 4900, 4900, 4801, 4801, 4871, 4795, 4795, 4983, 5131, 5131, 4880,\n", + " 5046, 5106, 5355, 5084, 5401, 5516, 5516, 5516, 5516, 5398, 5521, 6142,\n", + " 6142, 6142, 6175, 6037, 6037, 5914, 5914, 6110, 6138, 6138, 6115, 6115,\n", + " 6140, 6167, 6167, 6167],\n", + " [ 59, 68, 112, 13, 40, 118, 55, 58, 110, 99, 86, 21,\n", + " 69, 74, 26, 64, 22, 11, 65, 88, 24, 61, 106, 18,\n", + " 81, 91, 119, 21, 92, 12, 71, 16, 12, 42, 120, 50,\n", + " 50, 99, 21, 7, 78, 53, 114, 47, 84, 74, 17, 1,\n", + " 73, 69, 34, 75, 87, 94, 56, 27, 75, 36, 118, 52,\n", + " 97, 4, 19, 18, 21, 107, 38, 100, 19, 11, 19, 29,\n", + " 50, 77, 81, 60, 115, 83, 103, 101, 4, 109, 92, 35,\n", + " 31, 82, 4, 19, 37, 61, 19, 62, 43, 22, 11, 17,\n", + " 109, 95, 19, 76, 81, 57, 0, 50, 118, 6, 61, 19,\n", + " 3, 19, 29, 96, 98, 44, 36, 51, 59, 102, 27, 49,\n", + " 68, 70, 64, 46, 11, 40, 79, 80, 7, 10, 45, 0,\n", + " 19, 44, 114, 90, 70, 8, 23, 28, 47, 52, 15, 104,\n", + " 4, 65, 96, 68, 59, 117, 74, 93, 36, 25, 71, 66,\n", + " 9, 96, 26, 21, 33, 54, 101, 4, 2, 96, 85, 39,\n", + " 109, 69, 116, 14, 32, 63, 28, 27, 21, 67, 48, 72,\n", + " 4, 12, 40, 71, 20, 98, 4, 113, 111, 4, 30, 89,\n", + " 5, 105, 108, 41]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1842, 3326, 4154, ..., 7172, 3326, 2991],\n", + " [ 27, 116, 86, ..., 7710, 7730, 7588]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 17, 96, 96, ..., 36, 40, 87],\n", + " [ 118, 91, 83, ..., 6101, 6123, 6222]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 84, 84, 84, ..., 7582, 7573, 7664],\n", + " [ 127, 719, 43, ..., 106, 285, 533]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 232, 638, 285, ..., 551, 751, 66],\n", + " [ 102, 26, 111, ..., 7729, 7682, 7680]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[6056, 2849, 6979, ..., 6273, 6752, 7448],\n", + " [ 176, 148, 33, ..., 6167, 6133, 6178]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 84, 84, 84, ..., 7582, 7582, 7647],\n", + " [ 655, 827, 981, ..., 6712, 6354, 6673]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 8, 8, 109, ..., 6167, 6167, 6167],\n", + " [1424, 1965, 4967, ..., 5653, 6273, 5976]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006508\n", + "sampling 0.006351\n", + "noi time: 0.002047\n", + "get_vertex_data call: 0.037779\n", + "noi group time: 0.003535\n", + "eoi_group_time: 0.015003\n", + "second half: 0.218709\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 36710, 31149, 21464, ..., 1121585, 1100733, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 36710, 31149, 21464, ..., 1121585, 1100733, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210557, 1210580, 1230573, ..., 1935110, 1931106, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210557, 1210580, 1230573, ..., 1935110, 1931106, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1136225, 1136228, 1135719, 1135723, 1135721, 1141758, 1134954,\n", + " 1138335, 1136965, 1146803, 1143600, 1137937, 1137274, 1138942, 1143362,\n", + " 1143372, 1139244, 1146640, 1146641, 1139615, 1139958, 1140781, 1150497,\n", + " 1150509, 1148582, 1149216, 1142958, 1155689, 1149634, 1147483, 1135992,\n", + " 1144636, 1153012, 1153022, 1148343, 1148345, 1150200, 1135476, 1152667,\n", + " 1148546, 1153217, 1153220, 1153231, 1153221, 1155018, 1147211, 1136683,\n", + " 1134715, 1134806, 1151545, 1140537, 1140540, 1140530, 1138112, 1154407,\n", + " 1154414, 1137254, 1138353, 1151531, 1140020, 1140953, 1135367, 1135202,\n", + " 1141036, 1136770, 1136775, 1134794, 1157443, 1135956, 1136517, 1138504,\n", + " 1157088, 1137693, 1144387, 1137529, 1135408, 1157398, 1157393, 1152376,\n", + " 1152378, 1152383, 1136581, 1136662, 1137441, 1156159, 1148481, 1148484,\n", + " 1134841, 1141696, 1135983, 1135576, 1135579, 1135583, 1141081, 1136097,\n", + " 1148859, 1135670, 1153099, 1153100, 1137953, 1154132, 1145132, 1145135,\n", + " 1156899, 1135522, 1139685, 1137287, 1138440, 1138445, 1138461, 1138462,\n", + " 1137924, 1149328, 1138843, 1138694, 1156606, 1147112, 1142616, 1135346,\n", + " 1135359, 1135355, 1156141, 1138185, 1145843, 1148531, 1150949, 1137109,\n", + " 1139849, 1139855, 1139667, 1139673, 1138067, 1138070, 1138069, 1140261,\n", + " 1134992, 1142439, 1140199, 1158974, 1159009, 1141058, 1144410, 1143626,\n", + " 1143631, 1140034, 1136065, 1139933, 1137598, 1138648, 1138148, 1138150,\n", + " 1141962, 1153401, 1146064, 1146075, 1140557, 1152044, 1142301, 1142302,\n", + " 1137734, 1137728, 1134922, 1146215, 1138246, 1135540, 1135549, 1140228,\n", + " 1141088, 1141098, 1141102, 1149001, 1139898, 1145347, 1145358, 1141980,\n", + " 1143767, 1137298, 1143225, 1159676, 1141681, 1141690, 1142342, 1135860,\n", + " 1136417, 1136625, 1161173, 1140469, 1141224, 1136917, 1143677, 1143676,\n", + " 1137186, 1144237, 1140592, 1140597, 1141786, 1138786, 1139495, 1144940,\n", + " 1136752, 1141609, 1162790, 1165291, 1137087, 1137074, 1141821, 1140173,\n", + " 1140175, 1158749, 1137764, 1148872, 1137062, 1138708, 1142913, 1142451,\n", + " 1140885, 1144182, 1150904, 1150906, 1161092, 1144865, 1136565, 1138537,\n", + " 1147153, 1149189, 1149193, 1149197, 1162804, 1141365, 1141367, 1153069,\n", + " 1151109, 1138292, 1144284, 1144279, 1153556, 1143907, 1143906, 1139510,\n", + " 1139763, 1140990, 1146693, 1146695, 1141561, 1147050, 1145873, 1149887,\n", + " 1152976, 1152980, 1141932, 1146904, 1144247, 1144250, 1144242, 1140585,\n", + " 1141846, 1150241, 1140696, 1137571, 1134850, 1145980, 1145983, 1145974,\n", + " 1144073, 1142102, 1146024, 1138084, 1141646, 1149928, 1141235, 1139990,\n", + " 1143294, 1147543, 1147540, 1147282, 1142829, 1142816, 1136330, 1139417,\n", + " 1143049, 1143040, 1136160, 1157717, 1157720, 1136836, 1139301, 1139048,\n", + " 1142149, 1142159, 1143345, 1144765, 1144753, 1144619, 1140846, 1135874,\n", + " 1135883, 1150294, 1150919, 1146514, 1146523, 1138024, 1143457, 1144303,\n", + " 1144562, 1144564, 1142001, 1135451, 1135454, 1140827, 1146590, 1147521,\n", + " 1140364, 1143080, 1149489, 1148962, 1148966, 1144725, 1144219, 1147984,\n", + " 1147988, 1147999, 1134902, 1139252, 1147131, 1148704, 1150997, 1141836,\n", + " 1146742, 1148473, 1153701, 1152327, 1152328, 1152335, 1147025, 1147031,\n", + " 1141124, 1145018, 1139549, 1158226, 1154526, 1145240, 1145751, 1146178,\n", + " 1151242, 1152530, 1152538, 1150280, 1150437, 1150445, 1147962, 1144526,\n", + " 1151994, 1154822, 1151480, 1151482, 1152031, 1154271, 1139919, 1146723,\n", + " 1158950, 1158955, 1141941, 1141949, 1150736, 1151795, 1148740, 1154985,\n", + " 1149412, 1148288, 1148623, 1154420, 1158786, 1151363, 1151361, 1151365,\n", + " 1146682, 1152436, 1157976, 1148720, 1149821, 1149812, 1143971, 1148203,\n", + " 1148204, 1148098, 1153124, 1153186, 1153192, 1153188, 1148056, 1150352,\n", + " 1155089, 1147442, 1151821, 1152581, 1135307, 1154190, 1148498, 1141420,\n", + " 1141423, 1147737, 1145080, 1148947, 1146975, 1146623, 1151694, 1154052,\n", + " 1150794, 1152097, 1152098, 1152100, 1156325, 1156334, 1153036, 1153038,\n", + " 1150094, 1137746, 1152622, 1149203, 1151967, 1157842, 1157835, 1154638,\n", + " 1150578, 1145277, 1136132, 1136789, 1148913, 1144533, 1140935, 1152227,\n", + " 1138978, 1152903, 1151311, 1152341, 1146830, 1156823, 1156816, 1153310,\n", + " 1153311, 1138283, 1138281, 1136028, 1158704, 1151195, 1162200, 1152928,\n", + " 1151071, 1156399, 1163941, 1142777, 1156422, 1166848, 1150164, 1148040,\n", + " 1152602, 1167408, 1145656, 1137048, 1158477, 1148628, 1158530, 1148382,\n", + " 1137458, 1149947, 1155376, 1153085, 1154377, 1156720, 1157225, 1157228,\n", + " 1157229, 1135434, 1143448, 1157547, 1148884, 1154929, 1156505, 1157064,\n", + " 1157069, 1155412, 1155418, 1152841, 1152833, 1150465, 1150475, 1135231,\n", + " 1135730, 1152182, 1151788, 1152737, 1153413, 1158304, 1158308, 1158311,\n", + " 1151340, 1155441, 1150136, 1162117, 1144361, 1138573, 1142764, 1156271,\n", + " 1157637, 1151379, 1158628, 1155375, 1155122, 1155123, 1152527, 1157172,\n", + " 1149323, 1149505, 1156563, 1154547, 1155573, 1158566, 1158823, 1158824,\n", + " 1158331, 1156993, 1148835, 1153365, 1160958, 1143263, 1154642, 1154648,\n", + " 1146937, 1154243, 1151893, 1153326, 1157439, 1145716, 1150987, 1143517,\n", + " 1157928, 1157934, 1158123, 1158578, 1158996, 1154014, 1134674, 1134682,\n", + " 1135601, 1135614, 1148149, 1150661, 1150671, 1157685, 1155724, 1144463,\n", + " 1152209, 1152496, 1152502, 1140380, 1157031, 1144843, 1155971, 1155975,\n", + " 1158846, 1155404, 1159777, 1161375, 1166122, 1153503, 1136899, 1136896,\n", + " 1159164, 1158815, 1158447, 1156778, 1151615, 1136480, 1136491, 1156490,\n", + " 1153808, 1157668, 1136640, 1136646, 1140049, 1166424, 1166421, 1158545,\n", + " 1158558, 1151145, 1161161, 1138110, 1155521, 1161539, 1142492, 1142663,\n", + " 1142666, 1157747, 1157751, 1144270, 1159058, 1159071, 1151074, 1142416,\n", + " 1158295, 1157945, 1160563, 1162044, 1153052, 1153045, 1162842, 1155763,\n", + " 1156369, 1166256, 1156100, 1156107, 1142674, 1150046, 1149063, 1155479,\n", + " 1153519, 1147308, 1138161, 1164006, 1165385, 1149963, 1139782, 1163391,\n", + " 1154590, 1158461, 1160702, 1164048, 1158878, 1140643, 1148603, 1172731,\n", + " 1143139, 1143143, 1151877, 1155810, 1159025, 1159026, 1159029, 1159032,\n", + " 1168134, 1165604, 1152244, 1152247, 1155588, 1153921, 1168426, 1148560,\n", + " 1158405, 1144977, 1144989, 1149011, 1146500, 1146509, 1153236, 1153239,\n", + " 1164580, 1169261, 1163525, 1165415, 1161723, 1141471, 1141459, 1147426,\n", + " 1157044, 1156739, 1157955, 1166591, 1150646, 1150651, 1150649, 1171040,\n", + " 1144810, 1144812, 1167253, 1168850, 1142733, 1156292, 1156300, 1156303,\n", + " 1144055, 1166917, 1148683, 1145563, 1155320, 1147673, 1150531, 1163518,\n", + " 1144973, 1148175, 1147355, 1148124, 1147723, 1145889, 1145900, 1145902,\n", + " 1168659, 1171571, 1181052, 1143393, 1167136, 1158722, 1158734, 1171270,\n", + " 1164395, 1154070, 1154076, 1168756, 1145674, 1151598, 1167817, 1169216,\n", + " 1150515, 1156119, 1145523, 1144346, 1144336, 1157534, 1138378, 1147746,\n", + " 1154667, 1154670, 1169154, 1169162, 1157331, 1157329, 1169359, 1154353,\n", + " 1149452, 1149446, 1147491, 1138609, 1158623, 1158060, 1158062, 1149847,\n", + " 1157380, 1170542, 1152353, 1143858, 1155927, 1188547, 1148330, 1177426,\n", + " 1168470, 1173307, 1154027, 1153751, 1153754, 1183546, 1157158, 1157153,\n", + " 1157373, 1167239, 1147711, 1148131, 1148139, 1147925, 1157593, 1177415,\n", + " 1172961, 1162855, 1155739, 1171881, 1168817, 1167896, 1166016, 1172606,\n", + " 1144550, 1153429, 1159100, 1177683, 1170874, 1170922, 1150234, 1183573,\n", + " 1154148, 1167520, 1149173, 1169821, 1143279, 1169772, 1167658, 1185666,\n", + " 1143420, 1170176, 1170177, 1169631, 1153803, 1178171, 1184699, 1179714,\n", + " 1174897, 1158030, 1161255, 1155260, 1155262, 1154718, 1157795, 1164043,\n", + " 1171738, 1179540, 1153898, 1191749, 1145626, 1156433, 1180371, 1182266,\n", + " 1149744, 1149753, 1152273, 1155990, 1158370, 1158374, 1155899, 1177090,\n", + " 1183645, 1140397, 1168273, 1188934, 1168621, 1193128, 1164231, 1181548,\n", + " 1163422, 1188525, 1147179, 1147172, 1168930, 1168943, 1163621, 1139831,\n", + " 1150262, 1150268, 1167135, 1194517, 1156055, 1190269, 1146394, 1146399,\n", + " 1146395, 1173065, 1173058, 1172371, 1149547, 1191511, 1191023, 1182550,\n", + " 1168683, 1140992, 1141006, 1188781, 1162156, 1170890, 1151774, 1182226,\n", + " 1177850, 1145395, 1178135, 1187491, 1183147, 1191449, 1155959, 1155962,\n", + " 1180278, 1185269, 1191033, 1172896, 1177539, 1189948], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1136225, 1136228, 1135719, 1135723, 1135721, 1141758, 1134954,\n", + " 1138335, 1136965, 1146803, 1143600, 1137937, 1137274, 1138942, 1143362,\n", + " 1143372, 1139244, 1146640, 1146641, 1139615, 1139958, 1140781, 1150497,\n", + " 1150509, 1148582, 1149216, 1142958, 1155689, 1149634, 1147483, 1135992,\n", + " 1144636, 1153012, 1153022, 1148343, 1148345, 1150200, 1135476, 1152667,\n", + " 1148546, 1153217, 1153220, 1153231, 1153221, 1155018, 1147211, 1136683,\n", + " 1134715, 1134806, 1151545, 1140537, 1140540, 1140530, 1138112, 1154407,\n", + " 1154414, 1137254, 1138353, 1151531, 1140020, 1140953, 1135367, 1135202,\n", + " 1141036, 1136770, 1136775, 1134794, 1157443, 1135956, 1136517, 1138504,\n", + " 1157088, 1137693, 1144387, 1137529, 1135408, 1157398, 1157393, 1152376,\n", + " 1152378, 1152383, 1136581, 1136662, 1137441, 1156159, 1148481, 1148484,\n", + " 1134841, 1141696, 1135983, 1135576, 1135579, 1135583, 1141081, 1136097,\n", + " 1148859, 1135670, 1153099, 1153100, 1137953, 1154132, 1145132, 1145135,\n", + " 1156899, 1135522, 1139685, 1137287, 1138440, 1138445, 1138461, 1138462,\n", + " 1137924, 1149328, 1138843, 1138694, 1156606, 1147112, 1142616, 1135346,\n", + " 1135359, 1135355, 1156141, 1138185, 1145843, 1148531, 1150949, 1137109,\n", + " 1139849, 1139855, 1139667, 1139673, 1138067, 1138070, 1138069, 1140261,\n", + " 1134992, 1142439, 1140199, 1158974, 1159009, 1141058, 1144410, 1143626,\n", + " 1143631, 1140034, 1136065, 1139933, 1137598, 1138648, 1138148, 1138150,\n", + " 1141962, 1153401, 1146064, 1146075, 1140557, 1152044, 1142301, 1142302,\n", + " 1137734, 1137728, 1134922, 1146215, 1138246, 1135540, 1135549, 1140228,\n", + " 1141088, 1141098, 1141102, 1149001, 1139898, 1145347, 1145358, 1141980,\n", + " 1143767, 1137298, 1143225, 1159676, 1141681, 1141690, 1142342, 1135860,\n", + " 1136417, 1136625, 1161173, 1140469, 1141224, 1136917, 1143677, 1143676,\n", + " 1137186, 1144237, 1140592, 1140597, 1141786, 1138786, 1139495, 1144940,\n", + " 1136752, 1141609, 1162790, 1165291, 1137087, 1137074, 1141821, 1140173,\n", + " 1140175, 1158749, 1137764, 1148872, 1137062, 1138708, 1142913, 1142451,\n", + " 1140885, 1144182, 1150904, 1150906, 1161092, 1144865, 1136565, 1138537,\n", + " 1147153, 1149189, 1149193, 1149197, 1162804, 1141365, 1141367, 1153069,\n", + " 1151109, 1138292, 1144284, 1144279, 1153556, 1143907, 1143906, 1139510,\n", + " 1139763, 1140990, 1146693, 1146695, 1141561, 1147050, 1145873, 1149887,\n", + " 1152976, 1152980, 1141932, 1146904, 1144247, 1144250, 1144242, 1140585,\n", + " 1141846, 1150241, 1140696, 1137571, 1134850, 1145980, 1145983, 1145974,\n", + " 1144073, 1142102, 1146024, 1138084, 1141646, 1149928, 1141235, 1139990,\n", + " 1143294, 1147543, 1147540, 1147282, 1142829, 1142816, 1136330, 1139417,\n", + " 1143049, 1143040, 1136160, 1157717, 1157720, 1136836, 1139301, 1139048,\n", + " 1142149, 1142159, 1143345, 1144765, 1144753, 1144619, 1140846, 1135874,\n", + " 1135883, 1150294, 1150919, 1146514, 1146523, 1138024, 1143457, 1144303,\n", + " 1144562, 1144564, 1142001, 1135451, 1135454, 1140827, 1146590, 1147521,\n", + " 1140364, 1143080, 1149489, 1148962, 1148966, 1144725, 1144219, 1147984,\n", + " 1147988, 1147999, 1134902, 1139252, 1147131, 1148704, 1150997, 1141836,\n", + " 1146742, 1148473, 1153701, 1152327, 1152328, 1152335, 1147025, 1147031,\n", + " 1141124, 1145018, 1139549, 1158226, 1154526, 1145240, 1145751, 1146178,\n", + " 1151242, 1152530, 1152538, 1150280, 1150437, 1150445, 1147962, 1144526,\n", + " 1151994, 1154822, 1151480, 1151482, 1152031, 1154271, 1139919, 1146723,\n", + " 1158950, 1158955, 1141941, 1141949, 1150736, 1151795, 1148740, 1154985,\n", + " 1149412, 1148288, 1148623, 1154420, 1158786, 1151363, 1151361, 1151365,\n", + " 1146682, 1152436, 1157976, 1148720, 1149821, 1149812, 1143971, 1148203,\n", + " 1148204, 1148098, 1153124, 1153186, 1153192, 1153188, 1148056, 1150352,\n", + " 1155089, 1147442, 1151821, 1152581, 1135307, 1154190, 1148498, 1141420,\n", + " 1141423, 1147737, 1145080, 1148947, 1146975, 1146623, 1151694, 1154052,\n", + " 1150794, 1152097, 1152098, 1152100, 1156325, 1156334, 1153036, 1153038,\n", + " 1150094, 1137746, 1152622, 1149203, 1151967, 1157842, 1157835, 1154638,\n", + " 1150578, 1145277, 1136132, 1136789, 1148913, 1144533, 1140935, 1152227,\n", + " 1138978, 1152903, 1151311, 1152341, 1146830, 1156823, 1156816, 1153310,\n", + " 1153311, 1138283, 1138281, 1136028, 1158704, 1151195, 1162200, 1152928,\n", + " 1151071, 1156399, 1163941, 1142777, 1156422, 1166848, 1150164, 1148040,\n", + " 1152602, 1167408, 1145656, 1137048, 1158477, 1148628, 1158530, 1148382,\n", + " 1137458, 1149947, 1155376, 1153085, 1154377, 1156720, 1157225, 1157228,\n", + " 1157229, 1135434, 1143448, 1157547, 1148884, 1154929, 1156505, 1157064,\n", + " 1157069, 1155412, 1155418, 1152841, 1152833, 1150465, 1150475, 1135231,\n", + " 1135730, 1152182, 1151788, 1152737, 1153413, 1158304, 1158308, 1158311,\n", + " 1151340, 1155441, 1150136, 1162117, 1144361, 1138573, 1142764, 1156271,\n", + " 1157637, 1151379, 1158628, 1155375, 1155122, 1155123, 1152527, 1157172,\n", + " 1149323, 1149505, 1156563, 1154547, 1155573, 1158566, 1158823, 1158824,\n", + " 1158331, 1156993, 1148835, 1153365, 1160958, 1143263, 1154642, 1154648,\n", + " 1146937, 1154243, 1151893, 1153326, 1157439, 1145716, 1150987, 1143517,\n", + " 1157928, 1157934, 1158123, 1158578, 1158996, 1154014, 1134674, 1134682,\n", + " 1135601, 1135614, 1148149, 1150661, 1150671, 1157685, 1155724, 1144463,\n", + " 1152209, 1152496, 1152502, 1140380, 1157031, 1144843, 1155971, 1155975,\n", + " 1158846, 1155404, 1159777, 1161375, 1166122, 1153503, 1136899, 1136896,\n", + " 1159164, 1158815, 1158447, 1156778, 1151615, 1136480, 1136491, 1156490,\n", + " 1153808, 1157668, 1136640, 1136646, 1140049, 1166424, 1166421, 1158545,\n", + " 1158558, 1151145, 1161161, 1138110, 1155521, 1161539, 1142492, 1142663,\n", + " 1142666, 1157747, 1157751, 1144270, 1159058, 1159071, 1151074, 1142416,\n", + " 1158295, 1157945, 1160563, 1162044, 1153052, 1153045, 1162842, 1155763,\n", + " 1156369, 1166256, 1156100, 1156107, 1142674, 1150046, 1149063, 1155479,\n", + " 1153519, 1147308, 1138161, 1164006, 1165385, 1149963, 1139782, 1163391,\n", + " 1154590, 1158461, 1160702, 1164048, 1158878, 1140643, 1148603, 1172731,\n", + " 1143139, 1143143, 1151877, 1155810, 1159025, 1159026, 1159029, 1159032,\n", + " 1168134, 1165604, 1152244, 1152247, 1155588, 1153921, 1168426, 1148560,\n", + " 1158405, 1144977, 1144989, 1149011, 1146500, 1146509, 1153236, 1153239,\n", + " 1164580, 1169261, 1163525, 1165415, 1161723, 1141471, 1141459, 1147426,\n", + " 1157044, 1156739, 1157955, 1166591, 1150646, 1150651, 1150649, 1171040,\n", + " 1144810, 1144812, 1167253, 1168850, 1142733, 1156292, 1156300, 1156303,\n", + " 1144055, 1166917, 1148683, 1145563, 1155320, 1147673, 1150531, 1163518,\n", + " 1144973, 1148175, 1147355, 1148124, 1147723, 1145889, 1145900, 1145902,\n", + " 1168659, 1171571, 1181052, 1143393, 1167136, 1158722, 1158734, 1171270,\n", + " 1164395, 1154070, 1154076, 1168756, 1145674, 1151598, 1167817, 1169216,\n", + " 1150515, 1156119, 1145523, 1144346, 1144336, 1157534, 1138378, 1147746,\n", + " 1154667, 1154670, 1169154, 1169162, 1157331, 1157329, 1169359, 1154353,\n", + " 1149452, 1149446, 1147491, 1138609, 1158623, 1158060, 1158062, 1149847,\n", + " 1157380, 1170542, 1152353, 1143858, 1155927, 1188547, 1148330, 1177426,\n", + " 1168470, 1173307, 1154027, 1153751, 1153754, 1183546, 1157158, 1157153,\n", + " 1157373, 1167239, 1147711, 1148131, 1148139, 1147925, 1157593, 1177415,\n", + " 1172961, 1162855, 1155739, 1171881, 1168817, 1167896, 1166016, 1172606,\n", + " 1144550, 1153429, 1159100, 1177683, 1170874, 1170922, 1150234, 1183573,\n", + " 1154148, 1167520, 1149173, 1169821, 1143279, 1169772, 1167658, 1185666,\n", + " 1143420, 1170176, 1170177, 1169631, 1153803, 1178171, 1184699, 1179714,\n", + " 1174897, 1158030, 1161255, 1155260, 1155262, 1154718, 1157795, 1164043,\n", + " 1171738, 1179540, 1153898, 1191749, 1145626, 1156433, 1180371, 1182266,\n", + " 1149744, 1149753, 1152273, 1155990, 1158370, 1158374, 1155899, 1177090,\n", + " 1183645, 1140397, 1168273, 1188934, 1168621, 1193128, 1164231, 1181548,\n", + " 1163422, 1188525, 1147179, 1147172, 1168930, 1168943, 1163621, 1139831,\n", + " 1150262, 1150268, 1167135, 1194517, 1156055, 1190269, 1146394, 1146399,\n", + " 1146395, 1173065, 1173058, 1172371, 1149547, 1191511, 1191023, 1182550,\n", + " 1168683, 1140992, 1141006, 1188781, 1162156, 1170890, 1151774, 1182226,\n", + " 1177850, 1145395, 1178135, 1187491, 1183147, 1191449, 1155959, 1155962,\n", + " 1180278, 1185269, 1191033, 1172896, 1177539, 1189948], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195202, 1197841, 1197183, 1197719, 1198723, 1198730, 1199282, 1198458,\n", + " 1202255, 1201582, 1200643, 1197777, 1199248, 1203047, 1201660, 1197359,\n", + " 1198557, 1196685, 1198180, 1196631, 1196586, 1195514, 1195259, 1195263,\n", + " 1199135, 1201920, 1201992, 1199519, 1195474, 1195895, 1199172, 1196979,\n", + " 1198099, 1195325, 1196845, 1197803, 1197807, 1198352, 1198163, 1198161,\n", + " 1195148, 1195265, 1195270, 1196247, 1197273, 1196109, 1195841, 1195850,\n", + " 1198915, 1199315, 1197474, 1197478, 1197255, 1196283, 1195351, 1199329,\n", + " 1200959, 1199059, 1194928, 1199804, 1197990, 1200079, 1200878, 1199665,\n", + " 1194786, 1200060, 1199942, 1199949, 1197682, 1200668, 1197601, 1196727,\n", + " 1195773, 1198416, 1198428, 1199593, 1199418, 1199421, 1199555, 1199557,\n", + " 1201824, 1195599, 1200169, 1196479, 1200988, 1200918, 1199539, 1200546,\n", + " 1200553, 1201726, 1199908, 1201442, 1200899, 1195885, 1196960, 1196966,\n", + " 1199606, 1195438, 1203113, 1195669, 1195679, 1198929, 1198932, 1197059,\n", + " 1197822, 1200279, 1196605, 1198299, 1201138, 1198147, 1198824, 1199782,\n", + " 1198819, 1198822, 1197077, 1195070, 1197335, 1203300], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195202, 1197841, 1197183, 1197719, 1198723, 1198730, 1199282, 1198458,\n", + " 1202255, 1201582, 1200643, 1197777, 1199248, 1203047, 1201660, 1197359,\n", + " 1198557, 1196685, 1198180, 1196631, 1196586, 1195514, 1195259, 1195263,\n", + " 1199135, 1201920, 1201992, 1199519, 1195474, 1195895, 1199172, 1196979,\n", + " 1198099, 1195325, 1196845, 1197803, 1197807, 1198352, 1198163, 1198161,\n", + " 1195148, 1195265, 1195270, 1196247, 1197273, 1196109, 1195841, 1195850,\n", + " 1198915, 1199315, 1197474, 1197478, 1197255, 1196283, 1195351, 1199329,\n", + " 1200959, 1199059, 1194928, 1199804, 1197990, 1200079, 1200878, 1199665,\n", + " 1194786, 1200060, 1199942, 1199949, 1197682, 1200668, 1197601, 1196727,\n", + " 1195773, 1198416, 1198428, 1199593, 1199418, 1199421, 1199555, 1199557,\n", + " 1201824, 1195599, 1200169, 1196479, 1200988, 1200918, 1199539, 1200546,\n", + " 1200553, 1201726, 1199908, 1201442, 1200899, 1195885, 1196960, 1196966,\n", + " 1199606, 1195438, 1203113, 1195669, 1195679, 1198929, 1198932, 1197059,\n", + " 1197822, 1200279, 1196605, 1198299, 1201138, 1198147, 1198824, 1199782,\n", + " 1198819, 1198822, 1197077, 1195070, 1197335, 1203300], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 3.9700e-02, -3.2973e-04, 3.5285e-01, ..., 5.1345e-02,\n", + " -1.2109e-03, -2.7910e-03],\n", + " [ 1.0763e-01, -5.6496e-04, 5.0943e-01, ..., 4.3347e-02,\n", + " -1.0606e-03, -3.6892e-03],\n", + " [ 5.8084e-02, -1.7561e-04, 3.7567e-01, ..., 5.5838e-02,\n", + " -8.5019e-04, -2.9105e-03],\n", + " ...,\n", + " [ 9.2858e-02, -6.3511e-04, 4.5046e-01, ..., 3.1650e-02,\n", + " -1.1263e-03, -3.5592e-03],\n", + " [ 1.1694e-01, -5.7497e-04, 4.6352e-01, ..., 2.6256e-02,\n", + " -1.0231e-03, -3.6799e-03],\n", + " [ 3.4364e-02, -3.2630e-04, 3.5738e-01, ..., 6.9531e-02,\n", + " -1.1241e-03, -2.6408e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 2.1108e+00, -2.9557e-02, 1.0243e+00, ..., -1.4009e-02,\n", + " -2.2692e-02, 2.2213e+00],\n", + " [ 1.8223e+00, -3.8160e-02, -2.6599e-04, ..., -1.9660e-02,\n", + " -2.0743e-02, 1.4658e+00],\n", + " [ 2.9572e+00, -5.1439e-02, 1.3300e+00, ..., -2.5991e-02,\n", + " -3.0649e-02, 2.9290e+00],\n", + " ...,\n", + " [ 1.6148e+00, -2.7181e-02, 8.7518e-02, ..., -1.2153e-02,\n", + " -1.8328e-02, 1.8134e+00],\n", + " [ 1.2569e+00, -2.7008e-02, -4.3316e-03, ..., -9.9698e-03,\n", + " -1.5313e-02, 1.1980e+00],\n", + " [ 2.3554e+00, -3.2979e-02, 8.3089e-01, ..., -1.0291e-02,\n", + " -2.7598e-02, 3.6141e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[ 3.8344e-02, 1.1552e-01, -9.8173e-04, ..., 4.6362e-01,\n", + " 5.6924e-02, 2.5295e-01],\n", + " [ 1.5732e-01, -3.3048e-04, -2.2457e-05, ..., 3.5720e-01,\n", + " 4.2228e-02, 1.7097e-01],\n", + " [ 1.6937e-01, -4.8178e-04, 9.4198e-03, ..., 4.0306e-01,\n", + " 2.2148e-01, 3.1593e-01],\n", + " ...,\n", + " [ 1.6676e-01, -1.5630e-03, 8.1437e-02, ..., 2.2529e-01,\n", + " -3.6905e-04, 2.6451e-01],\n", + " [ 2.1710e-01, -9.8690e-04, -3.8988e-04, ..., 4.6144e-01,\n", + " 6.2331e-02, 2.9841e-01],\n", + " [ 3.5981e-01, -2.1556e-03, -6.1740e-04, ..., 4.5864e-01,\n", + " 2.2041e-01, 3.2650e-01]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-4.4953e-03, 1.0187e-01, -4.7855e-04, ..., 7.9713e-02,\n", + " -1.0410e-03, -3.9661e-03],\n", + " [-5.4190e-03, 1.1202e-01, -1.9627e-04, ..., 1.7264e-01,\n", + " -1.2940e-03, -3.9719e-03],\n", + " [-5.4463e-03, 2.5075e-01, -6.7014e-04, ..., 3.2391e-01,\n", + " -6.2059e-04, -4.8611e-03],\n", + " ...,\n", + " [-2.4894e-03, 8.5929e-02, 1.1768e-01, ..., -1.9174e-03,\n", + " -1.6186e-03, -3.2604e-03],\n", + " [-3.7364e-03, -4.5196e-04, -2.1789e-04, ..., -4.8727e-04,\n", + " -1.0937e-03, -3.2579e-03],\n", + " [-4.4584e-03, 1.0286e-01, -1.9294e-04, ..., -1.3090e-04,\n", + " -1.6306e-03, -4.1697e-03]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 108, 77, 303, 229, 229, 415, 415, 415, 258, 258, 486, 486,\n", + " 395, 453, 500, 607, 622, 622, 610, 941, 824, 502, 502, 799,\n", + " 799, 503, 1040, 1040, 784, 784, 708, 910, 910, 1183, 1183, 1094,\n", + " 1137, 1112, 1094, 1054, 1212, 1212, 1328, 991, 1517, 1409, 1409, 1526,\n", + " 1409, 1292, 1526, 1371, 1371, 1214, 1515, 1515, 1515, 1803, 1515, 1686,\n", + " 1653, 1501, 1812, 1663, 1651, 1891, 1956, 1848, 1823, 1823, 1823, 1978,\n", + " 1741, 1816, 1816, 2010, 2010, 2010, 1887, 1940, 1940, 2108, 2029, 2029,\n", + " 2158, 2249, 2190, 2190, 2280, 2306, 2309, 2347, 2227, 2227, 2449, 2150,\n", + " 2379, 2450, 2457, 2666, 2666, 2666, 2701, 2806, 2997, 3125, 3199, 3069,\n", + " 3165, 3355, 3267, 3230, 3360, 3447, 3480, 3795, 3965, 4079, 3856, 3797,\n", + " 3797, 3888, 4030, 3977, 3977, 4180, 4238, 4310, 4567, 4908, 4922, 4891,\n", + " 4886, 5076, 4923, 4945, 4945, 5068, 5132, 5211, 5170, 5170, 5177, 5177,\n", + " 5231, 5349, 5319, 5323, 5323, 5539, 5539, 5612, 5683, 5796, 5946, 5946,\n", + " 5946, 5946, 5727, 5687, 5946, 6001, 6089, 6197, 6160, 6160, 6160, 6160,\n", + " 6386, 6386, 6195, 6321, 6268, 6348, 6113, 6113, 6144, 5927, 6321, 6317,\n", + " 6254, 6254],\n", + " [ 47, 41, 31, 26, 33, 81, 13, 37, 43, 85, 95, 85,\n", + " 23, 47, 76, 34, 9, 1, 34, 6, 70, 64, 104, 58,\n", + " 46, 71, 77, 18, 20, 32, 91, 17, 95, 113, 64, 110,\n", + " 97, 97, 105, 6, 91, 6, 75, 7, 71, 14, 20, 62,\n", + " 45, 61, 102, 19, 89, 59, 38, 49, 71, 102, 67, 3,\n", + " 25, 3, 15, 41, 34, 107, 2, 21, 29, 78, 8, 71,\n", + " 2, 103, 83, 69, 36, 101, 86, 114, 68, 102, 28, 72,\n", + " 68, 2, 84, 117, 98, 68, 25, 24, 82, 79, 0, 99,\n", + " 86, 80, 92, 109, 63, 28, 22, 20, 71, 40, 3, 66,\n", + " 21, 41, 33, 104, 110, 21, 116, 35, 11, 108, 7, 27,\n", + " 60, 55, 30, 90, 26, 29, 3, 16, 54, 51, 65, 52,\n", + " 83, 31, 19, 93, 73, 21, 112, 4, 87, 88, 3, 79,\n", + " 96, 57, 71, 71, 74, 100, 71, 19, 10, 39, 19, 94,\n", + " 42, 53, 20, 60, 110, 56, 71, 115, 11, 71, 111, 26,\n", + " 96, 71, 44, 71, 106, 71, 71, 12, 104, 101, 48, 71,\n", + " 50, 5]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2444, 492, 1564, ..., 87, 3518, 3578],\n", + " [ 19, 33, 87, ..., 6345, 6345, 6421]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 81, 10, 83, ..., 41, 37, 7],\n", + " [ 8, 21, 74, ..., 6137, 6405, 6225]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 87, 87, 87, ..., 6338, 6338, 6338],\n", + " [ 181, 173, 325, ..., 559, 836, 767]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 564, 325, 511, ..., 331, 323, 836],\n", + " [ 313, 201, 72, ..., 6419, 6410, 6344]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2941, 4929, 143, ..., 6211, 4482, 5414],\n", + " [ 86, 57, 20, ..., 6375, 6387, 6346]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 125, 87, 87, ..., 6338, 6338, 6338],\n", + " [3385, 240, 1094, ..., 6405, 4247, 1902]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 31, 31, 31, ..., 6414, 6414, 6414],\n", + " [3860, 4894, 4702, ..., 2988, 3116, 5251]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006081\n", + "sampling 0.005925\n", + "noi time: 0.001918\n", + "get_vertex_data call: 0.038316\n", + "noi group time: 0.003474\n", + "eoi_group_time: 0.015106\n", + "second half: 0.231628\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 18176, 24187, 20107, ..., 1123985, 1103853, 1120067],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 18176, 24187, 20107, ..., 1123985, 1103853, 1120067],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1209332, 1221048, ..., 1929230, 1937984, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1209332, 1221048, ..., 1929230, 1937984, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1136237, 1140282, 1140284, 1135926, 1135726, 1135727, 1140785,\n", + " 1140788, 1140799, 1141758, 1138335, 1136215, 1140297, 1140292, 1136971,\n", + " 1138897, 1149826, 1139820, 1143362, 1143372, 1139241, 1140781, 1150497,\n", + " 1139866, 1149216, 1142947, 1155683, 1147473, 1144636, 1144632, 1149038,\n", + " 1146995, 1134697, 1148337, 1148346, 1146656, 1150200, 1146472, 1136122,\n", + " 1152664, 1136742, 1137220, 1139371, 1150320, 1134710, 1134718, 1134806,\n", + " 1134807, 1140537, 1140540, 1138112, 1138356, 1134735, 1140953, 1140954,\n", + " 1135367, 1135202, 1141036, 1136289, 1134794, 1138504, 1137329, 1135408,\n", + " 1157397, 1137441, 1156159, 1148481, 1139161, 1141702, 1135583, 1135664,\n", + " 1138514, 1138524, 1153099, 1158136, 1135522, 1138440, 1138461, 1138449,\n", + " 1158390, 1156605, 1142611, 1156141, 1158984, 1145843, 1148531, 1148533,\n", + " 1137109, 1139673, 1134992, 1136551, 1158961, 1139327, 1159012, 1144406,\n", + " 1153543, 1140034, 1152701, 1137587, 1137598, 1146075, 1152044, 1137741,\n", + " 1137728, 1134750, 1138240, 1135543, 1141088, 1162958, 1144135, 1149001,\n", + " 1145347, 1136392, 1143767, 1137299, 1143221, 1143224, 1143225, 1139032,\n", + " 1140003, 1149982, 1146844, 1146847, 1141690, 1154466, 1139436, 1142932,\n", + " 1141224, 1141903, 1167117, 1143676, 1140592, 1136852, 1147850, 1164812,\n", + " 1142060, 1149111, 1139190, 1138708, 1140110, 1144596, 1142837, 1136867,\n", + " 1136864, 1141209, 1140885, 1144182, 1144190, 1137614, 1147153, 1147155,\n", + " 1136376, 1141365, 1141375, 1141678, 1149090, 1149101, 1139508, 1139510,\n", + " 1139127, 1140979, 1140990, 1146695, 1141560, 1147050, 1145873, 1149878,\n", + " 1152976, 1144244, 1144242, 1165366, 1150243, 1140696, 1143845, 1146024,\n", + " 1150599, 1138085, 1141585, 1142533, 1149928, 1141236, 1139990, 1143293,\n", + " 1150418, 1147282, 1147290, 1142816, 1143719, 1143663, 1139417, 1138923,\n", + " 1157720, 1136836, 1158043, 1143345, 1144767, 1144615, 1137098, 1135883,\n", + " 1150756, 1146523, 1138024, 1143456, 1143457, 1140364, 1143080, 1144219,\n", + " 1144222, 1147995, 1147999, 1146949, 1147131, 1148704, 1141327, 1141836,\n", + " 1146751, 1148468, 1153701, 1149722, 1158226, 1143923, 1151644, 1145237,\n", + " 1145240, 1138635, 1138638, 1146178, 1138861, 1150445, 1148940, 1155006,\n", + " 1149791, 1144514, 1146887, 1150350, 1151997, 1154819, 1152023, 1154267,\n", + " 1135504, 1146731, 1140566, 1150127, 1147021, 1153956, 1146776, 1141269,\n", + " 1148744, 1153574, 1154976, 1148448, 1147659, 1148288, 1148300, 1154420,\n", + " 1136247, 1152436, 1157983, 1148720, 1148724, 1148726, 1146544, 1146547,\n", + " 1146549, 1139936, 1154196, 1153192, 1153188, 1153197, 1159837, 1150935,\n", + " 1152875, 1144863, 1144851, 1143129, 1147442, 1152581, 1154183, 1141408,\n", + " 1146265, 1146967, 1146974, 1156402, 1150210, 1146623, 1151687, 1144477,\n", + " 1152407, 1152409, 1156327, 1153028, 1145539, 1137746, 1146307, 1155337,\n", + " 1154123, 1152673, 1151617, 1145278, 1136134, 1152903, 1151298, 1143988,\n", + " 1138279, 1138281, 1156002, 1136028, 1158704, 1151067, 1156396, 1142777,\n", + " 1150159, 1148033, 1148040, 1149300, 1152602, 1160866, 1149801, 1137048,\n", + " 1158477, 1148628, 1148637, 1158530, 1142047, 1156722, 1157229, 1135434,\n", + " 1150872, 1156500, 1155422, 1152833, 1145191, 1137823, 1135729, 1156632,\n", + " 1135647, 1147812, 1151470, 1158308, 1151340, 1155441, 1144361, 1154529,\n", + " 1156207, 1151379, 1158639, 1152527, 1149321, 1155755, 1145806, 1145807,\n", + " 1156452, 1158096, 1155628, 1158824, 1148834, 1153363, 1161391, 1143263,\n", + " 1151327, 1153322, 1157439, 1150070, 1155613, 1150811, 1155293, 1159622,\n", + " 1157282, 1137152, 1158996, 1153776, 1153786, 1137381, 1159116, 1134685,\n", + " 1135601, 1148149, 1150661, 1150671, 1158665, 1157685, 1157684, 1144451,\n", + " 1152220, 1159213, 1167618, 1140375, 1159132, 1155971, 1155975, 1161667,\n", + " 1161673, 1135190, 1149702, 1154600, 1153503, 1158891, 1158442, 1158285,\n", + " 1154393, 1153808, 1156278, 1134757, 1158547, 1146126, 1138101, 1155521,\n", + " 1142493, 1169890, 1142666, 1162683, 1159071, 1153052, 1153045, 1155763,\n", + " 1167708, 1153842, 1161313, 1138393, 1150046, 1149070, 1155479, 1146873,\n", + " 1157600, 1138161, 1164006, 1156795, 1139777, 1154590, 1154578, 1139592,\n", + " 1156983, 1166073, 1146356, 1169489, 1169495, 1140643, 1141862, 1148600,\n", + " 1151872, 1156177, 1159032, 1163740, 1152247, 1155588, 1162547, 1168428,\n", + " 1144977, 1147836, 1161240, 1152776, 1161724, 1141471, 1151650, 1156739,\n", + " 1157955, 1150646, 1144812, 1142722, 1144060, 1145176, 1166924, 1169282,\n", + " 1170307, 1144972, 1144973, 1162295, 1143025, 1165746, 1147355, 1152624,\n", + " 1145902, 1163961, 1152206, 1143407, 1171867, 1166661, 1167503, 1154076,\n", + " 1167317, 1147334, 1147338, 1145674, 1145665, 1156119, 1161781, 1161791,\n", + " 1138383, 1154893, 1157331, 1138136, 1141043, 1154364, 1149452, 1138609,\n", + " 1158611, 1158623, 1163292, 1149846, 1149847, 1157384, 1172642, 1155494,\n", + " 1168400, 1170061, 1169144, 1159658, 1157153, 1157373, 1147711, 1172436,\n", + " 1151850, 1148128, 1147925, 1157593, 1172961, 1162106, 1168697, 1175225,\n", + " 1180318, 1140324, 1159100, 1166682, 1150234, 1154148, 1149169, 1149173,\n", + " 1170465, 1178388, 1159404, 1153803, 1153141, 1164818, 1181578, 1157792,\n", + " 1157795, 1151496, 1178603, 1164034, 1164044, 1153898, 1164563, 1145618,\n", + " 1156440, 1156446, 1161911, 1184253, 1149755, 1146242, 1146248, 1153609,\n", + " 1158771, 1158380, 1158379, 1155890, 1140393, 1170625, 1168886, 1174190,\n", + " 1188930, 1168621, 1164228, 1182337, 1163421, 1176976, 1165072, 1181469,\n", + " 1161819, 1147182, 1164133, 1181518, 1139828, 1139831, 1150265, 1150260,\n", + " 1154812, 1156055, 1170003, 1181899, 1181801, 1156846, 1182060, 1153733,\n", + " 1152113, 1189827, 1166840, 1170140, 1167094, 1177285, 1156681, 1156672,\n", + " 1172122, 1181616, 1166785, 1152080, 1155959, 1155962, 1182680, 1187196,\n", + " 1194006, 1189078], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1136237, 1140282, 1140284, 1135926, 1135726, 1135727, 1140785,\n", + " 1140788, 1140799, 1141758, 1138335, 1136215, 1140297, 1140292, 1136971,\n", + " 1138897, 1149826, 1139820, 1143362, 1143372, 1139241, 1140781, 1150497,\n", + " 1139866, 1149216, 1142947, 1155683, 1147473, 1144636, 1144632, 1149038,\n", + " 1146995, 1134697, 1148337, 1148346, 1146656, 1150200, 1146472, 1136122,\n", + " 1152664, 1136742, 1137220, 1139371, 1150320, 1134710, 1134718, 1134806,\n", + " 1134807, 1140537, 1140540, 1138112, 1138356, 1134735, 1140953, 1140954,\n", + " 1135367, 1135202, 1141036, 1136289, 1134794, 1138504, 1137329, 1135408,\n", + " 1157397, 1137441, 1156159, 1148481, 1139161, 1141702, 1135583, 1135664,\n", + " 1138514, 1138524, 1153099, 1158136, 1135522, 1138440, 1138461, 1138449,\n", + " 1158390, 1156605, 1142611, 1156141, 1158984, 1145843, 1148531, 1148533,\n", + " 1137109, 1139673, 1134992, 1136551, 1158961, 1139327, 1159012, 1144406,\n", + " 1153543, 1140034, 1152701, 1137587, 1137598, 1146075, 1152044, 1137741,\n", + " 1137728, 1134750, 1138240, 1135543, 1141088, 1162958, 1144135, 1149001,\n", + " 1145347, 1136392, 1143767, 1137299, 1143221, 1143224, 1143225, 1139032,\n", + " 1140003, 1149982, 1146844, 1146847, 1141690, 1154466, 1139436, 1142932,\n", + " 1141224, 1141903, 1167117, 1143676, 1140592, 1136852, 1147850, 1164812,\n", + " 1142060, 1149111, 1139190, 1138708, 1140110, 1144596, 1142837, 1136867,\n", + " 1136864, 1141209, 1140885, 1144182, 1144190, 1137614, 1147153, 1147155,\n", + " 1136376, 1141365, 1141375, 1141678, 1149090, 1149101, 1139508, 1139510,\n", + " 1139127, 1140979, 1140990, 1146695, 1141560, 1147050, 1145873, 1149878,\n", + " 1152976, 1144244, 1144242, 1165366, 1150243, 1140696, 1143845, 1146024,\n", + " 1150599, 1138085, 1141585, 1142533, 1149928, 1141236, 1139990, 1143293,\n", + " 1150418, 1147282, 1147290, 1142816, 1143719, 1143663, 1139417, 1138923,\n", + " 1157720, 1136836, 1158043, 1143345, 1144767, 1144615, 1137098, 1135883,\n", + " 1150756, 1146523, 1138024, 1143456, 1143457, 1140364, 1143080, 1144219,\n", + " 1144222, 1147995, 1147999, 1146949, 1147131, 1148704, 1141327, 1141836,\n", + " 1146751, 1148468, 1153701, 1149722, 1158226, 1143923, 1151644, 1145237,\n", + " 1145240, 1138635, 1138638, 1146178, 1138861, 1150445, 1148940, 1155006,\n", + " 1149791, 1144514, 1146887, 1150350, 1151997, 1154819, 1152023, 1154267,\n", + " 1135504, 1146731, 1140566, 1150127, 1147021, 1153956, 1146776, 1141269,\n", + " 1148744, 1153574, 1154976, 1148448, 1147659, 1148288, 1148300, 1154420,\n", + " 1136247, 1152436, 1157983, 1148720, 1148724, 1148726, 1146544, 1146547,\n", + " 1146549, 1139936, 1154196, 1153192, 1153188, 1153197, 1159837, 1150935,\n", + " 1152875, 1144863, 1144851, 1143129, 1147442, 1152581, 1154183, 1141408,\n", + " 1146265, 1146967, 1146974, 1156402, 1150210, 1146623, 1151687, 1144477,\n", + " 1152407, 1152409, 1156327, 1153028, 1145539, 1137746, 1146307, 1155337,\n", + " 1154123, 1152673, 1151617, 1145278, 1136134, 1152903, 1151298, 1143988,\n", + " 1138279, 1138281, 1156002, 1136028, 1158704, 1151067, 1156396, 1142777,\n", + " 1150159, 1148033, 1148040, 1149300, 1152602, 1160866, 1149801, 1137048,\n", + " 1158477, 1148628, 1148637, 1158530, 1142047, 1156722, 1157229, 1135434,\n", + " 1150872, 1156500, 1155422, 1152833, 1145191, 1137823, 1135729, 1156632,\n", + " 1135647, 1147812, 1151470, 1158308, 1151340, 1155441, 1144361, 1154529,\n", + " 1156207, 1151379, 1158639, 1152527, 1149321, 1155755, 1145806, 1145807,\n", + " 1156452, 1158096, 1155628, 1158824, 1148834, 1153363, 1161391, 1143263,\n", + " 1151327, 1153322, 1157439, 1150070, 1155613, 1150811, 1155293, 1159622,\n", + " 1157282, 1137152, 1158996, 1153776, 1153786, 1137381, 1159116, 1134685,\n", + " 1135601, 1148149, 1150661, 1150671, 1158665, 1157685, 1157684, 1144451,\n", + " 1152220, 1159213, 1167618, 1140375, 1159132, 1155971, 1155975, 1161667,\n", + " 1161673, 1135190, 1149702, 1154600, 1153503, 1158891, 1158442, 1158285,\n", + " 1154393, 1153808, 1156278, 1134757, 1158547, 1146126, 1138101, 1155521,\n", + " 1142493, 1169890, 1142666, 1162683, 1159071, 1153052, 1153045, 1155763,\n", + " 1167708, 1153842, 1161313, 1138393, 1150046, 1149070, 1155479, 1146873,\n", + " 1157600, 1138161, 1164006, 1156795, 1139777, 1154590, 1154578, 1139592,\n", + " 1156983, 1166073, 1146356, 1169489, 1169495, 1140643, 1141862, 1148600,\n", + " 1151872, 1156177, 1159032, 1163740, 1152247, 1155588, 1162547, 1168428,\n", + " 1144977, 1147836, 1161240, 1152776, 1161724, 1141471, 1151650, 1156739,\n", + " 1157955, 1150646, 1144812, 1142722, 1144060, 1145176, 1166924, 1169282,\n", + " 1170307, 1144972, 1144973, 1162295, 1143025, 1165746, 1147355, 1152624,\n", + " 1145902, 1163961, 1152206, 1143407, 1171867, 1166661, 1167503, 1154076,\n", + " 1167317, 1147334, 1147338, 1145674, 1145665, 1156119, 1161781, 1161791,\n", + " 1138383, 1154893, 1157331, 1138136, 1141043, 1154364, 1149452, 1138609,\n", + " 1158611, 1158623, 1163292, 1149846, 1149847, 1157384, 1172642, 1155494,\n", + " 1168400, 1170061, 1169144, 1159658, 1157153, 1157373, 1147711, 1172436,\n", + " 1151850, 1148128, 1147925, 1157593, 1172961, 1162106, 1168697, 1175225,\n", + " 1180318, 1140324, 1159100, 1166682, 1150234, 1154148, 1149169, 1149173,\n", + " 1170465, 1178388, 1159404, 1153803, 1153141, 1164818, 1181578, 1157792,\n", + " 1157795, 1151496, 1178603, 1164034, 1164044, 1153898, 1164563, 1145618,\n", + " 1156440, 1156446, 1161911, 1184253, 1149755, 1146242, 1146248, 1153609,\n", + " 1158771, 1158380, 1158379, 1155890, 1140393, 1170625, 1168886, 1174190,\n", + " 1188930, 1168621, 1164228, 1182337, 1163421, 1176976, 1165072, 1181469,\n", + " 1161819, 1147182, 1164133, 1181518, 1139828, 1139831, 1150265, 1150260,\n", + " 1154812, 1156055, 1170003, 1181899, 1181801, 1156846, 1182060, 1153733,\n", + " 1152113, 1189827, 1166840, 1170140, 1167094, 1177285, 1156681, 1156672,\n", + " 1172122, 1181616, 1166785, 1152080, 1155959, 1155962, 1182680, 1187196,\n", + " 1194006, 1189078], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197183, 1199428, 1197744, 1198242, 1199835, 1195860, 1199282, 1202255,\n", + " 1198840, 1198844, 1201016, 1197351, 1196871, 1202804, 1196178, 1194743,\n", + " 1194770, 1194780, 1194783, 1194782, 1194642, 1195514, 1195263, 1201992,\n", + " 1197697, 1201427, 1194882, 1194895, 1195888, 1199172, 1196977, 1197831,\n", + " 1195325, 1198668, 1198262, 1198163, 1195145, 1195148, 1195216, 1195270,\n", + " 1195279, 1197140, 1200761, 1194859, 1195841, 1195659, 1195541, 1197474,\n", + " 1199344, 1197248, 1199705, 1196393, 1196283, 1196272, 1200959, 1199856,\n", + " 1199060, 1199185, 1196851, 1194928, 1199628, 1197676, 1200872, 1198404,\n", + " 1199231, 1199676, 1194786, 1201511, 1196496, 1196508, 1197970, 1197976,\n", + " 1197601, 1196727, 1195771, 1200892, 1198428, 1199489, 1199501, 1200018,\n", + " 1198811, 1199552, 1199555, 1201824, 1196477, 1196479, 1199445, 1201156,\n", + " 1201056, 1200927, 1194805, 1202640, 1201358, 1202499, 1201737, 1200526,\n", + " 1199532, 1200546, 1200553, 1199886, 1202141, 1199908, 1197945, 1202239,\n", + " 1200907, 1199976, 1195876, 1201291, 1198478, 1195610, 1203329, 1200398,\n", + " 1200625, 1198562, 1200784, 1202257, 1203117, 1195679, 1195664, 1200445,\n", + " 1198929, 1200276, 1198911, 1200928, 1197816, 1197822, 1202269, 1198299,\n", + " 1199659, 1203102, 1199786, 1198819, 1199234, 1201886, 1200301, 1197652,\n", + " 1197655, 1202323, 1197039, 1201875], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197183, 1199428, 1197744, 1198242, 1199835, 1195860, 1199282, 1202255,\n", + " 1198840, 1198844, 1201016, 1197351, 1196871, 1202804, 1196178, 1194743,\n", + " 1194770, 1194780, 1194783, 1194782, 1194642, 1195514, 1195263, 1201992,\n", + " 1197697, 1201427, 1194882, 1194895, 1195888, 1199172, 1196977, 1197831,\n", + " 1195325, 1198668, 1198262, 1198163, 1195145, 1195148, 1195216, 1195270,\n", + " 1195279, 1197140, 1200761, 1194859, 1195841, 1195659, 1195541, 1197474,\n", + " 1199344, 1197248, 1199705, 1196393, 1196283, 1196272, 1200959, 1199856,\n", + " 1199060, 1199185, 1196851, 1194928, 1199628, 1197676, 1200872, 1198404,\n", + " 1199231, 1199676, 1194786, 1201511, 1196496, 1196508, 1197970, 1197976,\n", + " 1197601, 1196727, 1195771, 1200892, 1198428, 1199489, 1199501, 1200018,\n", + " 1198811, 1199552, 1199555, 1201824, 1196477, 1196479, 1199445, 1201156,\n", + " 1201056, 1200927, 1194805, 1202640, 1201358, 1202499, 1201737, 1200526,\n", + " 1199532, 1200546, 1200553, 1199886, 1202141, 1199908, 1197945, 1202239,\n", + " 1200907, 1199976, 1195876, 1201291, 1198478, 1195610, 1203329, 1200398,\n", + " 1200625, 1198562, 1200784, 1202257, 1203117, 1195679, 1195664, 1200445,\n", + " 1198929, 1200276, 1198911, 1200928, 1197816, 1197822, 1202269, 1198299,\n", + " 1199659, 1203102, 1199786, 1198819, 1199234, 1201886, 1200301, 1197652,\n", + " 1197655, 1202323, 1197039, 1201875], device='cuda:0',\n", + " dtype=torch.int32))\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.004508\n", + "sampling 0.003871\n", + "noi time: 0.001032\n", + "get_vertex_data call: 0.047034\n", + "noi group time: 0.002016\n", + "eoi_group_time: 0.016539\n", + "second half: 0.192634\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16821, 31145, 24177, ..., 1116001, 1111733, 1120077],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16821, 31145, 24177, ..., 1116001, 1111733, 1120077],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210820, 1210822, 1210558, ..., 1938518, 1934173, 1930678],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210820, 1210822, 1210558, ..., 1938518, 1934173, 1930678],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1141424, 1140282, 1140284, 1138553, 1137784, 1137791, 1140785,\n", + " 1139701, 1141751, 1141757, 1141758, 1138335, 1142321, 1136971, 1149831,\n", + " 1139808, 1145373, 1137947, 1145999, 1138938, 1143362, 1143363, 1139615,\n", + " 1134937, 1155683, 1155686, 1155689, 1143820, 1147473, 1147483, 1149294,\n", + " 1142881, 1144632, 1149038, 1146992, 1146996, 1146656, 1146472, 1152664,\n", + " 1136742, 1155008, 1155014, 1155018, 1155019, 1147202, 1147204, 1150329,\n", + " 1140304, 1138112, 1137254, 1149461, 1151520, 1140159, 1140027, 1140953,\n", + " 1135367, 1135202, 1154751, 1141036, 1134794, 1157443, 1157453, 1135967,\n", + " 1137329, 1157103, 1137687, 1136610, 1136617, 1135333, 1144787, 1144395,\n", + " 1137529, 1137534, 1157395, 1157397, 1136662, 1156146, 1156159, 1148481,\n", + " 1141702, 1135579, 1135583, 1135830, 1140240, 1156342, 1153099, 1138584,\n", + " 1135499, 1145132, 1136978, 1156899, 1139684, 1157703, 1138436, 1138440,\n", + " 1138445, 1138449, 1138462, 1137925, 1136594, 1149328, 1138696, 1156603,\n", + " 1156606, 1147112, 1142611, 1135355, 1135618, 1135627, 1156141, 1158984,\n", + " 1158987, 1145843, 1148531, 1135769, 1141532, 1139667, 1139673, 1139674,\n", + " 1138069, 1142255, 1134992, 1134778, 1136553, 1136557, 1135789, 1139755,\n", + " 1140199, 1159009, 1159019, 1160088, 1138648, 1138148, 1142238, 1141992,\n", + " 1152042, 1152044, 1142290, 1137728, 1134922, 1134750, 1138246, 1135549,\n", + " 1141088, 1141097, 1144128, 1144130, 1141980, 1136392, 1143767, 1154860,\n", + " 1137299, 1139025, 1139033, 1149969, 1149982, 1146832, 1152709, 1135860,\n", + " 1136632, 1161173, 1141224, 1141891, 1141648, 1136917, 1145066, 1144230,\n", + " 1140592, 1138797, 1139495, 1136752, 1136753, 1136851, 1160062, 1137074,\n", + " 1141821, 1143153, 1139276, 1142080, 1140173, 1158749, 1149111, 1141479,\n", + " 1138709, 1138708, 1140110, 1142913, 1144596, 1136867, 1136864, 1141202,\n", + " 1141579, 1140432, 1144182, 1137606, 1150906, 1161093, 1146201, 1158692,\n", + " 1138539, 1137849, 1137841, 1161698, 1147153, 1141365, 1141367, 1141375,\n", + " 1149101, 1139510, 1145213, 1143779, 1140990, 1141555, 1147050, 1147047,\n", + " 1145873, 1149878, 1152976, 1152980, 1152982, 1135459, 1141925, 1146901,\n", + " 1144242, 1140580, 1141841, 1141846, 1137149, 1143636, 1141377, 1144070,\n", + " 1143845, 1143851, 1136277, 1146019, 1146024, 1146025, 1138085, 1149928,\n", + " 1139990, 1143293, 1147541, 1147540, 1148755, 1147282, 1142816, 1140346,\n", + " 1149366, 1139418, 1147362, 1143051, 1136160, 1136167, 1157720, 1136836,\n", + " 1136843, 1146110, 1165626, 1139329, 1139328, 1141496, 1142159, 1143345,\n", + " 1144615, 1145812, 1138600, 1150294, 1146514, 1146523, 1146526, 1143456,\n", + " 1143007, 1143937, 1143949, 1135454, 1147574, 1143798, 1146636, 1140364,\n", + " 1137990, 1143082, 1144219, 1147984, 1147995, 1147999, 1146949, 1139252,\n", + " 1147127, 1148704, 1143307, 1142700, 1141325, 1146751, 1153699, 1152328,\n", + " 1147056, 1147070, 1149722, 1149717, 1147025, 1145009, 1148366, 1141137,\n", + " 1154526, 1145246, 1145751, 1142370, 1146159, 1148397, 1151242, 1150438,\n", + " 1150445, 1149777, 1144514, 1144526, 1144174, 1146894, 1150339, 1147794,\n", + " 1152027, 1139919, 1146723, 1134869, 1140566, 1150127, 1147021, 1135800,\n", + " 1158949, 1141949, 1150736, 1150728, 1153578, 1147653, 1143560, 1143564,\n", + " 1149412, 1148288, 1148294, 1148300, 1139096, 1154420, 1148180, 1152561,\n", + " 1152563, 1139721, 1146676, 1146682, 1146673, 1146687, 1141181, 1157968,\n", + " 1148720, 1148724, 1148725, 1148734, 1148729, 1147630, 1139936, 1143971,\n", + " 1143975, 1148204, 1154203, 1154206, 1141728, 1141733, 1154166, 1154168,\n", + " 1153124, 1153192, 1153188, 1153197, 1145104, 1154970, 1152864, 1143091,\n", + " 1150356, 1143134, 1151816, 1152581, 1154183, 1141420, 1136000, 1149378,\n", + " 1149376, 1148949, 1146975, 1146623, 1142988, 1152849, 1152097, 1153036,\n", + " 1153038, 1137746, 1137755, 1152622, 1149203, 1154123, 1152673, 1152682,\n", + " 1154633, 1139576, 1151617, 1150579, 1145278, 1136131, 1136795, 1148913,\n", + " 1148916, 1156826, 1153310, 1153311, 1138283, 1138281, 1136028, 1136031,\n", + " 1158704, 1152928, 1151064, 1151067, 1163941, 1143477, 1150164, 1148033,\n", + " 1148040, 1154457, 1149300, 1148903, 1149794, 1144669, 1137048, 1148628,\n", + " 1158530, 1158540, 1148373, 1148383, 1137458, 1154564, 1157509, 1155376,\n", + " 1154381, 1156720, 1135434, 1148892, 1148894, 1158913, 1158924, 1154929,\n", + " 1156505, 1152392, 1152388, 1157064, 1155412, 1152833, 1145184, 1139473,\n", + " 1139479, 1151257, 1150465, 1145390, 1151788, 1150828, 1153413, 1153415,\n", + " 1135645, 1135634, 1147810, 1151469, 1139535, 1158311, 1151271, 1155441,\n", + " 1153359, 1150132, 1162120, 1140865, 1140877, 1154530, 1154528, 1145606,\n", + " 1156207, 1151379, 1155122, 1152527, 1157172, 1149321, 1149508, 1135398,\n", + " 1145807, 1156463, 1158111, 1155626, 1155628, 1156563, 1154547, 1155573,\n", + " 1158824, 1158325, 1155646, 1153363, 1143263, 1154240, 1154080, 1152307,\n", + " 1143188, 1143189, 1160904, 1150371, 1153322, 1157439, 1143518, 1157928,\n", + " 1151030, 1153337, 1159116, 1145682, 1145694, 1134683, 1135601, 1135602,\n", + " 1155848, 1155843, 1158664, 1158665, 1157685, 1146325, 1144451, 1152220,\n", + " 1140381, 1144843, 1155975, 1135184, 1158846, 1155942, 1159440, 1136896,\n", + " 1158753, 1158760, 1140218, 1159156, 1156778, 1151615, 1136494, 1164931,\n", + " 1161616, 1153647, 1153808, 1156273, 1156278, 1156277, 1136640, 1134757,\n", + " 1166421, 1163814, 1165786, 1144581, 1150011, 1155535, 1161539, 1142487,\n", + " 1135662, 1164276, 1142663, 1157747, 1167359, 1159042, 1159052, 1159070,\n", + " 1159057, 1167474, 1165838, 1155191, 1157944, 1157946, 1160563, 1162044,\n", + " 1153052, 1153045, 1171551, 1162835, 1163072, 1155769, 1166258, 1142869,\n", + " 1138393, 1142673, 1142681, 1150033, 1150046, 1149063, 1149070, 1145948,\n", + " 1154295, 1153519, 1146873, 1138161, 1164006, 1156797, 1149963, 1163878,\n", + " 1148021, 1157236, 1146063, 1164048, 1165307, 1140130, 1169493, 1140641,\n", + " 1140650, 1140649, 1148603, 1164990, 1143143, 1144509, 1163201, 1158653,\n", + " 1159029, 1159032, 1169105, 1169109, 1152247, 1138674, 1149017, 1146509,\n", + " 1161240, 1144747, 1155044, 1155045, 1168070, 1153212, 1141471, 1147426,\n", + " 1156739, 1156741, 1156744, 1153663, 1150645, 1150649, 1168748, 1144812,\n", + " 1167253, 1177087, 1135567, 1156303, 1144058, 1145183, 1148683, 1145561,\n", + " 1145229, 1169282, 1166462, 1144971, 1166053, 1148124, 1168659, 1163961,\n", + " 1143404, 1158724, 1158722, 1171279, 1154076, 1147331, 1147334, 1159277,\n", + " 1179488, 1151598, 1169602, 1167817, 1193350, 1155172, 1155170, 1180431,\n", + " 1150518, 1156119, 1144338, 1144336, 1157531, 1157534, 1138372, 1138378,\n", + " 1154670, 1135841, 1169162, 1157331, 1141048, 1141043, 1169351, 1169359,\n", + " 1154364, 1149452, 1138609, 1158623, 1149847, 1157379, 1165533, 1152546,\n", + " 1169921, 1172838, 1173307, 1145033, 1160936, 1169144, 1171705, 1154027,\n", + " 1172787, 1164962, 1178419, 1151201, 1151696, 1157153, 1147711, 1172435,\n", + " 1151850, 1148131, 1157592, 1157593, 1161877, 1162106, 1168824, 1140326,\n", + " 1179204, 1166028, 1163989, 1144550, 1177686, 1177174, 1150234, 1154149,\n", + " 1154151, 1154148, 1149169, 1149173, 1169817, 1186117, 1143277, 1167658,\n", + " 1156559, 1171302, 1164818, 1161038, 1153619, 1172309, 1182651, 1179807,\n", + " 1158030, 1161255, 1162129, 1182364, 1155262, 1154718, 1157792, 1157795,\n", + " 1143343, 1182802, 1171623, 1157072, 1182600, 1158253, 1153898, 1154503,\n", + " 1164560, 1164571, 1145626, 1156437, 1178768, 1178028, 1182624, 1161067,\n", + " 1185006, 1184243, 1146242, 1163718, 1157761, 1182690, 1181149, 1158512,\n", + " 1158374, 1155895, 1183633, 1140397, 1169061, 1180517, 1168872, 1164228,\n", + " 1164231, 1179090, 1183833, 1170802, 1187579, 1170034, 1170421, 1170822,\n", + " 1139828, 1139838, 1139831, 1139837, 1154806, 1154812, 1151288, 1151295,\n", + " 1186942, 1156055, 1151972, 1151975, 1181447, 1146395, 1173058, 1189989,\n", + " 1191964, 1172696, 1191018, 1168678, 1140993, 1141001, 1151774, 1153733,\n", + " 1185765, 1152118, 1152124, 1192870, 1169707, 1178637, 1186422, 1172122,\n", + " 1174284, 1183938, 1160968, 1176829, 1155956, 1155958, 1155962, 1178290,\n", + " 1179769, 1172896, 1182191, 1193301, 1157008, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1141424, 1140282, 1140284, 1138553, 1137784, 1137791, 1140785,\n", + " 1139701, 1141751, 1141757, 1141758, 1138335, 1142321, 1136971, 1149831,\n", + " 1139808, 1145373, 1137947, 1145999, 1138938, 1143362, 1143363, 1139615,\n", + " 1134937, 1155683, 1155686, 1155689, 1143820, 1147473, 1147483, 1149294,\n", + " 1142881, 1144632, 1149038, 1146992, 1146996, 1146656, 1146472, 1152664,\n", + " 1136742, 1155008, 1155014, 1155018, 1155019, 1147202, 1147204, 1150329,\n", + " 1140304, 1138112, 1137254, 1149461, 1151520, 1140159, 1140027, 1140953,\n", + " 1135367, 1135202, 1154751, 1141036, 1134794, 1157443, 1157453, 1135967,\n", + " 1137329, 1157103, 1137687, 1136610, 1136617, 1135333, 1144787, 1144395,\n", + " 1137529, 1137534, 1157395, 1157397, 1136662, 1156146, 1156159, 1148481,\n", + " 1141702, 1135579, 1135583, 1135830, 1140240, 1156342, 1153099, 1138584,\n", + " 1135499, 1145132, 1136978, 1156899, 1139684, 1157703, 1138436, 1138440,\n", + " 1138445, 1138449, 1138462, 1137925, 1136594, 1149328, 1138696, 1156603,\n", + " 1156606, 1147112, 1142611, 1135355, 1135618, 1135627, 1156141, 1158984,\n", + " 1158987, 1145843, 1148531, 1135769, 1141532, 1139667, 1139673, 1139674,\n", + " 1138069, 1142255, 1134992, 1134778, 1136553, 1136557, 1135789, 1139755,\n", + " 1140199, 1159009, 1159019, 1160088, 1138648, 1138148, 1142238, 1141992,\n", + " 1152042, 1152044, 1142290, 1137728, 1134922, 1134750, 1138246, 1135549,\n", + " 1141088, 1141097, 1144128, 1144130, 1141980, 1136392, 1143767, 1154860,\n", + " 1137299, 1139025, 1139033, 1149969, 1149982, 1146832, 1152709, 1135860,\n", + " 1136632, 1161173, 1141224, 1141891, 1141648, 1136917, 1145066, 1144230,\n", + " 1140592, 1138797, 1139495, 1136752, 1136753, 1136851, 1160062, 1137074,\n", + " 1141821, 1143153, 1139276, 1142080, 1140173, 1158749, 1149111, 1141479,\n", + " 1138709, 1138708, 1140110, 1142913, 1144596, 1136867, 1136864, 1141202,\n", + " 1141579, 1140432, 1144182, 1137606, 1150906, 1161093, 1146201, 1158692,\n", + " 1138539, 1137849, 1137841, 1161698, 1147153, 1141365, 1141367, 1141375,\n", + " 1149101, 1139510, 1145213, 1143779, 1140990, 1141555, 1147050, 1147047,\n", + " 1145873, 1149878, 1152976, 1152980, 1152982, 1135459, 1141925, 1146901,\n", + " 1144242, 1140580, 1141841, 1141846, 1137149, 1143636, 1141377, 1144070,\n", + " 1143845, 1143851, 1136277, 1146019, 1146024, 1146025, 1138085, 1149928,\n", + " 1139990, 1143293, 1147541, 1147540, 1148755, 1147282, 1142816, 1140346,\n", + " 1149366, 1139418, 1147362, 1143051, 1136160, 1136167, 1157720, 1136836,\n", + " 1136843, 1146110, 1165626, 1139329, 1139328, 1141496, 1142159, 1143345,\n", + " 1144615, 1145812, 1138600, 1150294, 1146514, 1146523, 1146526, 1143456,\n", + " 1143007, 1143937, 1143949, 1135454, 1147574, 1143798, 1146636, 1140364,\n", + " 1137990, 1143082, 1144219, 1147984, 1147995, 1147999, 1146949, 1139252,\n", + " 1147127, 1148704, 1143307, 1142700, 1141325, 1146751, 1153699, 1152328,\n", + " 1147056, 1147070, 1149722, 1149717, 1147025, 1145009, 1148366, 1141137,\n", + " 1154526, 1145246, 1145751, 1142370, 1146159, 1148397, 1151242, 1150438,\n", + " 1150445, 1149777, 1144514, 1144526, 1144174, 1146894, 1150339, 1147794,\n", + " 1152027, 1139919, 1146723, 1134869, 1140566, 1150127, 1147021, 1135800,\n", + " 1158949, 1141949, 1150736, 1150728, 1153578, 1147653, 1143560, 1143564,\n", + " 1149412, 1148288, 1148294, 1148300, 1139096, 1154420, 1148180, 1152561,\n", + " 1152563, 1139721, 1146676, 1146682, 1146673, 1146687, 1141181, 1157968,\n", + " 1148720, 1148724, 1148725, 1148734, 1148729, 1147630, 1139936, 1143971,\n", + " 1143975, 1148204, 1154203, 1154206, 1141728, 1141733, 1154166, 1154168,\n", + " 1153124, 1153192, 1153188, 1153197, 1145104, 1154970, 1152864, 1143091,\n", + " 1150356, 1143134, 1151816, 1152581, 1154183, 1141420, 1136000, 1149378,\n", + " 1149376, 1148949, 1146975, 1146623, 1142988, 1152849, 1152097, 1153036,\n", + " 1153038, 1137746, 1137755, 1152622, 1149203, 1154123, 1152673, 1152682,\n", + " 1154633, 1139576, 1151617, 1150579, 1145278, 1136131, 1136795, 1148913,\n", + " 1148916, 1156826, 1153310, 1153311, 1138283, 1138281, 1136028, 1136031,\n", + " 1158704, 1152928, 1151064, 1151067, 1163941, 1143477, 1150164, 1148033,\n", + " 1148040, 1154457, 1149300, 1148903, 1149794, 1144669, 1137048, 1148628,\n", + " 1158530, 1158540, 1148373, 1148383, 1137458, 1154564, 1157509, 1155376,\n", + " 1154381, 1156720, 1135434, 1148892, 1148894, 1158913, 1158924, 1154929,\n", + " 1156505, 1152392, 1152388, 1157064, 1155412, 1152833, 1145184, 1139473,\n", + " 1139479, 1151257, 1150465, 1145390, 1151788, 1150828, 1153413, 1153415,\n", + " 1135645, 1135634, 1147810, 1151469, 1139535, 1158311, 1151271, 1155441,\n", + " 1153359, 1150132, 1162120, 1140865, 1140877, 1154530, 1154528, 1145606,\n", + " 1156207, 1151379, 1155122, 1152527, 1157172, 1149321, 1149508, 1135398,\n", + " 1145807, 1156463, 1158111, 1155626, 1155628, 1156563, 1154547, 1155573,\n", + " 1158824, 1158325, 1155646, 1153363, 1143263, 1154240, 1154080, 1152307,\n", + " 1143188, 1143189, 1160904, 1150371, 1153322, 1157439, 1143518, 1157928,\n", + " 1151030, 1153337, 1159116, 1145682, 1145694, 1134683, 1135601, 1135602,\n", + " 1155848, 1155843, 1158664, 1158665, 1157685, 1146325, 1144451, 1152220,\n", + " 1140381, 1144843, 1155975, 1135184, 1158846, 1155942, 1159440, 1136896,\n", + " 1158753, 1158760, 1140218, 1159156, 1156778, 1151615, 1136494, 1164931,\n", + " 1161616, 1153647, 1153808, 1156273, 1156278, 1156277, 1136640, 1134757,\n", + " 1166421, 1163814, 1165786, 1144581, 1150011, 1155535, 1161539, 1142487,\n", + " 1135662, 1164276, 1142663, 1157747, 1167359, 1159042, 1159052, 1159070,\n", + " 1159057, 1167474, 1165838, 1155191, 1157944, 1157946, 1160563, 1162044,\n", + " 1153052, 1153045, 1171551, 1162835, 1163072, 1155769, 1166258, 1142869,\n", + " 1138393, 1142673, 1142681, 1150033, 1150046, 1149063, 1149070, 1145948,\n", + " 1154295, 1153519, 1146873, 1138161, 1164006, 1156797, 1149963, 1163878,\n", + " 1148021, 1157236, 1146063, 1164048, 1165307, 1140130, 1169493, 1140641,\n", + " 1140650, 1140649, 1148603, 1164990, 1143143, 1144509, 1163201, 1158653,\n", + " 1159029, 1159032, 1169105, 1169109, 1152247, 1138674, 1149017, 1146509,\n", + " 1161240, 1144747, 1155044, 1155045, 1168070, 1153212, 1141471, 1147426,\n", + " 1156739, 1156741, 1156744, 1153663, 1150645, 1150649, 1168748, 1144812,\n", + " 1167253, 1177087, 1135567, 1156303, 1144058, 1145183, 1148683, 1145561,\n", + " 1145229, 1169282, 1166462, 1144971, 1166053, 1148124, 1168659, 1163961,\n", + " 1143404, 1158724, 1158722, 1171279, 1154076, 1147331, 1147334, 1159277,\n", + " 1179488, 1151598, 1169602, 1167817, 1193350, 1155172, 1155170, 1180431,\n", + " 1150518, 1156119, 1144338, 1144336, 1157531, 1157534, 1138372, 1138378,\n", + " 1154670, 1135841, 1169162, 1157331, 1141048, 1141043, 1169351, 1169359,\n", + " 1154364, 1149452, 1138609, 1158623, 1149847, 1157379, 1165533, 1152546,\n", + " 1169921, 1172838, 1173307, 1145033, 1160936, 1169144, 1171705, 1154027,\n", + " 1172787, 1164962, 1178419, 1151201, 1151696, 1157153, 1147711, 1172435,\n", + " 1151850, 1148131, 1157592, 1157593, 1161877, 1162106, 1168824, 1140326,\n", + " 1179204, 1166028, 1163989, 1144550, 1177686, 1177174, 1150234, 1154149,\n", + " 1154151, 1154148, 1149169, 1149173, 1169817, 1186117, 1143277, 1167658,\n", + " 1156559, 1171302, 1164818, 1161038, 1153619, 1172309, 1182651, 1179807,\n", + " 1158030, 1161255, 1162129, 1182364, 1155262, 1154718, 1157792, 1157795,\n", + " 1143343, 1182802, 1171623, 1157072, 1182600, 1158253, 1153898, 1154503,\n", + " 1164560, 1164571, 1145626, 1156437, 1178768, 1178028, 1182624, 1161067,\n", + " 1185006, 1184243, 1146242, 1163718, 1157761, 1182690, 1181149, 1158512,\n", + " 1158374, 1155895, 1183633, 1140397, 1169061, 1180517, 1168872, 1164228,\n", + " 1164231, 1179090, 1183833, 1170802, 1187579, 1170034, 1170421, 1170822,\n", + " 1139828, 1139838, 1139831, 1139837, 1154806, 1154812, 1151288, 1151295,\n", + " 1186942, 1156055, 1151972, 1151975, 1181447, 1146395, 1173058, 1189989,\n", + " 1191964, 1172696, 1191018, 1168678, 1140993, 1141001, 1151774, 1153733,\n", + " 1185765, 1152118, 1152124, 1192870, 1169707, 1178637, 1186422, 1172122,\n", + " 1174284, 1183938, 1160968, 1176829, 1155956, 1155958, 1155962, 1178290,\n", + " 1179769, 1172896, 1182191, 1193301, 1157008, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197719, 1199281, 1199282, 1198459, 1202255, 1201582, 1199150,\n", + " 1200644, 1198633, 1198694, 1196871, 1202804, 1198557, 1197512, 1194866,\n", + " 1194745, 1198707, 1194648, 1197430, 1195514, 1201992, 1198542, 1199519,\n", + " 1194880, 1199172, 1196334, 1194668, 1195325, 1195571, 1198167, 1195148,\n", + " 1195223, 1195265, 1195278, 1197141, 1197265, 1195850, 1198915, 1195648,\n", + " 1195659, 1197199, 1195917, 1199710, 1196272, 1198273, 1198282, 1200959,\n", + " 1197291, 1196858, 1194928, 1195119, 1199685, 1199616, 1199804, 1197676,\n", + " 1199154, 1199231, 1195014, 1194786, 1197970, 1197601, 1196727, 1202623,\n", + " 1200894, 1198416, 1199410, 1195555, 1201547, 1200452, 1200572, 1199445,\n", + " 1202630, 1202635, 1200991, 1200913, 1200918, 1199539, 1199721, 1201743,\n", + " 1200315, 1197097, 1199908, 1200194, 1201442, 1202239, 1202337, 1199976,\n", + " 1202175, 1200189, 1201291, 1198467, 1198875, 1200784, 1195679, 1197334,\n", + " 1200684, 1196916, 1197060, 1197816, 1194898, 1196597, 1201138, 1197735,\n", + " 1200437, 1198819, 1199234, 1200974, 1195070, 1201886, 1200296, 1200302,\n", + " 1195082, 1195165, 1202072], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197719, 1199281, 1199282, 1198459, 1202255, 1201582, 1199150,\n", + " 1200644, 1198633, 1198694, 1196871, 1202804, 1198557, 1197512, 1194866,\n", + " 1194745, 1198707, 1194648, 1197430, 1195514, 1201992, 1198542, 1199519,\n", + " 1194880, 1199172, 1196334, 1194668, 1195325, 1195571, 1198167, 1195148,\n", + " 1195223, 1195265, 1195278, 1197141, 1197265, 1195850, 1198915, 1195648,\n", + " 1195659, 1197199, 1195917, 1199710, 1196272, 1198273, 1198282, 1200959,\n", + " 1197291, 1196858, 1194928, 1195119, 1199685, 1199616, 1199804, 1197676,\n", + " 1199154, 1199231, 1195014, 1194786, 1197970, 1197601, 1196727, 1202623,\n", + " 1200894, 1198416, 1199410, 1195555, 1201547, 1200452, 1200572, 1199445,\n", + " 1202630, 1202635, 1200991, 1200913, 1200918, 1199539, 1199721, 1201743,\n", + " 1200315, 1197097, 1199908, 1200194, 1201442, 1202239, 1202337, 1199976,\n", + " 1202175, 1200189, 1201291, 1198467, 1198875, 1200784, 1195679, 1197334,\n", + " 1200684, 1196916, 1197060, 1197816, 1194898, 1196597, 1201138, 1197735,\n", + " 1200437, 1198819, 1199234, 1200974, 1195070, 1201886, 1200296, 1200302,\n", + " 1195082, 1195165, 1202072], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.2301e-02, -4.6775e-04, 3.9259e-01, ..., 9.9537e-02,\n", + " -1.4352e-03, -2.6713e-03],\n", + " [ 5.1977e-02, -3.6856e-04, 3.9866e-01, ..., 9.0406e-02,\n", + " -1.5099e-03, -3.1744e-03],\n", + " [ 5.3547e-02, 5.0677e-05, 3.5955e-01, ..., 7.7765e-02,\n", + " -9.1053e-04, -2.7549e-03],\n", + " ...,\n", + " [ 5.2490e-02, -2.5017e-04, 5.3400e-01, ..., 9.3654e-02,\n", + " -1.3790e-03, -3.8124e-03],\n", + " [ 1.3162e-01, -5.3712e-04, 5.5172e-01, ..., 5.7839e-02,\n", + " -1.1523e-03, -4.0398e-03],\n", + " [ 2.0223e-02, -4.2015e-04, 3.5674e-01, ..., 7.6369e-02,\n", + " -1.3611e-03, -2.6746e-03]], device='cuda:0'), 'paper': tensor([[ 1.6561e+00, -2.5480e-02, 7.1273e-01, ..., -1.0696e-02,\n", + " -2.3569e-02, 1.9474e+00],\n", + " [ 1.3956e+00, -3.4713e-02, -9.1473e-04, ..., -1.5660e-02,\n", + " -2.0048e-02, 1.2073e+00],\n", + " [ 6.8357e-01, -1.3789e-02, -3.1638e-03, ..., -6.8683e-03,\n", + " -1.1822e-02, 9.3929e-01],\n", + " ...,\n", + " [ 9.8738e-01, -3.3616e-02, -2.5672e-03, ..., -1.3971e-02,\n", + " -2.0039e-02, 1.1758e+00],\n", + " [ 1.4955e+00, -4.5735e-02, 4.9025e-01, ..., -1.9941e-02,\n", + " -2.4353e-02, 9.5655e-01],\n", + " [ 1.0526e+00, -2.6227e-02, -3.8210e-03, ..., -1.4028e-02,\n", + " -1.6322e-02, 8.3785e-01]], device='cuda:0'), 'author': tensor([[-5.2906e-04, -3.5063e-05, 1.5153e-01, ..., 1.0313e-01,\n", + " -3.1383e-04, -9.0066e-04],\n", + " [ 2.9387e-01, -3.1946e-03, 2.0466e-02, ..., 7.3948e-01,\n", + " 2.2952e-01, 3.5337e-01],\n", + " [ 2.2156e-01, -1.2186e-03, 1.5738e-01, ..., 6.8919e-01,\n", + " 1.0229e-01, 1.9513e-01],\n", + " ...,\n", + " [ 4.2032e-02, -5.6105e-04, 1.9889e-01, ..., 3.6094e-01,\n", + " 4.8562e-02, 1.6076e-01],\n", + " [ 8.0559e-03, 5.1741e-02, 1.1494e-01, ..., 5.2754e-01,\n", + " 2.2480e-02, 9.8383e-02],\n", + " [ 1.7808e-01, -1.4119e-03, 2.6234e-02, ..., 8.1223e-01,\n", + " 2.0480e-01, 3.4357e-01]], device='cuda:0'), 'field_of_study': tensor([[-2.0584e-03, 5.4714e-02, 1.2958e-01, ..., -3.7679e-03,\n", + " -2.6390e-04, -1.6335e-03],\n", + " [-2.1041e-03, 5.8972e-02, 6.6197e-02, ..., -1.3619e-03,\n", + " -1.9450e-04, -2.4578e-03],\n", + " [-2.9492e-03, 1.9307e-01, 9.9064e-02, ..., 1.1450e-02,\n", + " -9.7840e-04, -3.6932e-03],\n", + " ...,\n", + " [-1.9091e-03, 1.7389e-02, 7.6869e-02, ..., -1.3516e-03,\n", + " -5.9520e-04, -2.4535e-03],\n", + " [-1.7763e-03, 1.9189e-01, 1.2375e-01, ..., -1.3333e-03,\n", + " -5.3693e-04, -1.6024e-03],\n", + " [-2.3615e-03, 3.1414e-01, 9.2433e-02, ..., 9.3565e-03,\n", + " -1.9129e-03, -5.8427e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 54, 159, 163, 163, 49, 2, 2, 125, 11, 23, 152, 23,\n", + " 23, 23, 187, 187, 195, 113, 255, 408, 342, 522, 454, 454,\n", + " 431, 642, 642, 642, 603, 603, 603, 689, 463, 463, 463, 940,\n", + " 1143, 1143, 1009, 1009, 860, 860, 1052, 1073, 1073, 1145, 1145, 1375,\n", + " 1274, 1274, 1274, 752, 752, 1274, 1274, 1411, 1302, 1342, 1591, 1474,\n", + " 1358, 1312, 1500, 1706, 1519, 1699, 1495, 1989, 1670, 1750, 1721, 1721,\n", + " 1755, 1755, 1858, 1774, 1800, 2041, 2128, 1770, 1770, 1864, 1908, 1908,\n", + " 1949, 2170, 1980, 1980, 1980, 1980, 2020, 2285, 2148, 2192, 2350, 2240,\n", + " 2323, 2484, 2425, 2630, 2462, 2374, 2374, 2626, 2626, 2815, 2759, 2759,\n", + " 3126, 2989, 3101, 2967, 2967, 2967, 3003, 2987, 3269, 3269, 3304, 3196,\n", + " 3323, 3499, 3499, 3413, 3610, 3490, 3573, 3727, 3685, 3820, 3977, 3977,\n", + " 3977, 3946, 3662, 3647, 3647, 3647, 3936, 3973, 3874, 3707, 4084, 4101,\n", + " 4101, 4148, 4187, 4187, 4187, 4187, 4233, 4254, 4410, 4480, 4564, 4818,\n", + " 4703, 4703, 4843, 5362, 5395, 5460, 5272, 5398, 5398, 5454, 5524, 5524,\n", + " 5665, 5690, 5674, 5415, 5576, 5973, 6109, 5776, 5614, 5614, 6085, 5942,\n", + " 5812, 5812],\n", + " [ 72, 69, 66, 85, 82, 6, 101, 3, 71, 74, 85, 26,\n", + " 56, 52, 90, 38, 53, 101, 103, 60, 24, 58, 19, 17,\n", + " 58, 29, 0, 59, 64, 104, 62, 34, 27, 41, 114, 14,\n", + " 79, 73, 35, 39, 84, 75, 19, 29, 59, 1, 36, 19,\n", + " 105, 110, 88, 15, 35, 113, 28, 102, 81, 89, 87, 85,\n", + " 49, 46, 65, 33, 30, 77, 21, 81, 92, 77, 95, 55,\n", + " 109, 43, 106, 40, 25, 92, 94, 83, 50, 49, 44, 109,\n", + " 77, 62, 20, 57, 86, 61, 77, 54, 1, 92, 108, 4,\n", + " 9, 111, 3, 7, 67, 1, 102, 34, 1, 70, 100, 31,\n", + " 85, 85, 47, 90, 93, 88, 18, 92, 68, 45, 10, 32,\n", + " 16, 62, 109, 54, 85, 62, 6, 6, 27, 89, 85, 73,\n", + " 3, 22, 21, 93, 12, 24, 112, 63, 96, 107, 85, 91,\n", + " 2, 3, 92, 97, 37, 81, 85, 49, 33, 106, 18, 3,\n", + " 78, 42, 82, 105, 5, 13, 11, 3, 98, 105, 8, 85,\n", + " 48, 29, 29, 29, 29, 50, 80, 99, 76, 51, 18, 62,\n", + " 62, 23]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 768, 1445, 553, ..., 5327, 1440, 2715],\n", + " [ 25, 19, 286, ..., 6842, 6811, 6931]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 86, 18, 57, ..., 20, 63, 81],\n", + " [ 19, 217, 139, ..., 5997, 6098, 6097]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 63, 63, 63, ..., 6940, 6940, 6940],\n", + " [ 194, 338, 289, ..., 7, 222, 351]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 144, 338, 324, ..., 729, 482, 88],\n", + " [ 38, 61, 122, ..., 6844, 6844, 6923]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1351, 4131, 1734, ..., 3396, 172, 5619],\n", + " [ 117, 112, 18, ..., 6054, 6036, 6056]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 310, 63, 63, ..., 6940, 6940, 6940],\n", + " [3451, 918, 1194, ..., 6846, 5503, 4325]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 187, 187, 187, ..., 5980, 5980, 5980],\n", + " [6134, 6044, 6023, ..., 6860, 3634, 5292]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006509\n", + "sampling 0.006356\n", + "noi time: 0.001938\n", + "get_vertex_data call: 0.036044\n", + "noi group time: 0.003613\n", + "eoi_group_time: 0.016271\n", + "second half: 0.217229\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 17409, 19416, 53252, ..., 1124620, 1120124, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 17409, 19416, 53252, ..., 1124620, 1120124, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1231432, 1216136, ..., 1937985, 1929220, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1231432, 1216136, ..., 1937985, 1929220, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1141424, 1136228, 1140282, 1136349, 1138553, 1135726, 1135721,\n", + " 1142198, 1137791, 1140785, 1139703, 1141758, 1138335, 1136223, 1140297,\n", + " 1142517, 1136971, 1141445, 1138059, 1154776, 1145373, 1145984, 1137264,\n", + " 1138930, 1138933, 1139141, 1143372, 1146646, 1139609, 1139615, 1150497,\n", + " 1139866, 1134940, 1134943, 1149216, 1142947, 1155683, 1143820, 1147473,\n", + " 1147483, 1135989, 1144636, 1149037, 1153012, 1135950, 1148338, 1135484,\n", + " 1148546, 1153217, 1136742, 1147095, 1145419, 1155014, 1139364, 1146371,\n", + " 1134807, 1138745, 1140308, 1138119, 1137181, 1151530, 1140159, 1134735,\n", + " 1140030, 1135360, 1135367, 1135202, 1135903, 1134965, 1141036, 1134794,\n", + " 1157453, 1143377, 1137329, 1157103, 1139215, 1144399, 1144395, 1137534,\n", + " 1157393, 1136662, 1137441, 1143317, 1136928, 1148481, 1148484, 1139152,\n", + " 1135583, 1141086, 1136105, 1140970, 1140716, 1138514, 1153099, 1137957,\n", + " 1138584, 1137008, 1156909, 1135522, 1139684, 1138436, 1138440, 1140071,\n", + " 1138457, 1138462, 1158390, 1138846, 1135088, 1156606, 1138185, 1158984,\n", + " 1145843, 1137109, 1135769, 1139667, 1138070, 1142252, 1134992, 1135782,\n", + " 1139755, 1136723, 1140199, 1158971, 1142906, 1142911, 1141065, 1144410,\n", + " 1153543, 1153544, 1143625, 1138148, 1141966, 1152042, 1140660, 1137734,\n", + " 1137728, 1137743, 1134922, 1134738, 1134742, 1134750, 1134740, 1135549,\n", + " 1140228, 1141088, 1141097, 1144130, 1149001, 1141980, 1143767, 1139032,\n", + " 1139033, 1149979, 1149982, 1135865, 1136426, 1136427, 1136419, 1136625,\n", + " 1142931, 1142932, 1141224, 1141223, 1141891, 1143678, 1141161, 1141785,\n", + " 1141786, 1136760, 1141609, 1144650, 1144641, 1134987, 1136849, 1147850,\n", + " 1165291, 1142052, 1143167, 1140160, 1140173, 1140163, 1138472, 1138719,\n", + " 1138708, 1142913, 1137661, 1143107, 1143113, 1144596, 1136867, 1136871,\n", + " 1136864, 1144041, 1140885, 1144182, 1150906, 1136565, 1139559, 1138539,\n", + " 1140501, 1137849, 1137854, 1147153, 1136369, 1136378, 1149198, 1141365,\n", + " 1141367, 1153068, 1149088, 1149090, 1149097, 1139017, 1138292, 1138293,\n", + " 1153563, 1139510, 1139774, 1139763, 1139127, 1145001, 1140619, 1140990,\n", + " 1146695, 1147050, 1145873, 1155832, 1152976, 1152980, 1139453, 1141925,\n", + " 1146898, 1144242, 1141841, 1141853, 1150689, 1150692, 1150697, 1140700,\n", + " 1140696, 1137571, 1137570, 1143851, 1136273, 1146024, 1146141, 1154328,\n", + " 1139990, 1143293, 1143283, 1143294, 1143290, 1151124, 1151128, 1147543,\n", + " 1147540, 1148763, 1147282, 1142816, 1142629, 1149366, 1139417, 1149610,\n", + " 1143051, 1143052, 1136160, 1136161, 1157720, 1136836, 1136843, 1139329,\n", + " 1141496, 1136445, 1142149, 1143345, 1144766, 1144753, 1144619, 1144615,\n", + " 1145818, 1145816, 1144083, 1144088, 1144087, 1138597, 1138600, 1135876,\n", + " 1135813, 1138013, 1144375, 1146514, 1146523, 1143456, 1143457, 1143004,\n", + " 1137697, 1144568, 1140483, 1140488, 1143937, 1147574, 1143799, 1147521,\n", + " 1140352, 1140364, 1137990, 1143080, 1168921, 1148962, 1148969, 1147984,\n", + " 1147999, 1146949, 1134907, 1139252, 1139255, 1148704, 1148715, 1142700,\n", + " 1141319, 1146745, 1153701, 1152328, 1149718, 1149725, 1145705, 1147971,\n", + " 1145012, 1147196, 1158226, 1150452, 1143931, 1147873, 1147880, 1147879,\n", + " 1154526, 1145237, 1145240, 1145750, 1145751, 1138626, 1138632, 1138638,\n", + " 1146178, 1151242, 1150445, 1149258, 1148816, 1151856, 1144526, 1150350,\n", + " 1144203, 1165252, 1151480, 1151482, 1152024, 1145259, 1146723, 1149534,\n", + " 1148281, 1147009, 1147023, 1158949, 1158950, 1141949, 1150728, 1147653,\n", + " 1143559, 1148288, 1148300, 1135083, 1135084, 1135087, 1148608, 1139096,\n", + " 1151421, 1154420, 1154424, 1148188, 1151363, 1152561, 1139717, 1146682,\n", + " 1146684, 1152493, 1157968, 1148720, 1148724, 1144110, 1147627, 1151937,\n", + " 1143895, 1148203, 1148204, 1153124, 1153192, 1153197, 1145104, 1145111,\n", + " 1159828, 1152968, 1150935, 1154960, 1152877, 1152879, 1150356, 1141022,\n", + " 1151816, 1152581, 1135311, 1135303, 1151908, 1154183, 1148498, 1141420,\n", + " 1151348, 1147737, 1145086, 1146975, 1156402, 1149359, 1146623, 1146276,\n", + " 1146287, 1156325, 1153036, 1153038, 1137746, 1137755, 1137756, 1146317,\n", + " 1159974, 1152622, 1152057, 1157107, 1152826, 1154112, 1154120, 1157842,\n", + " 1157824, 1157833, 1152673, 1154633, 1151573, 1164753, 1164761, 1151617,\n", + " 1150578, 1145278, 1136131, 1136134, 1148916, 1152169, 1138991, 1151311,\n", + " 1152341, 1152342, 1153311, 1138279, 1138281, 1157141, 1152295, 1136028,\n", + " 1136031, 1158704, 1151188, 1152928, 1151064, 1151071, 1156387, 1163941,\n", + " 1150109, 1150101, 1166848, 1150168, 1150164, 1142261, 1148033, 1148040,\n", + " 1149300, 1152601, 1157630, 1149792, 1137048, 1148628, 1158530, 1169177,\n", + " 1137458, 1149947, 1135698, 1147643, 1153085, 1142041, 1157547, 1150877,\n", + " 1148884, 1158924, 1158919, 1156500, 1156501, 1156505, 1157064, 1157069,\n", + " 1145191, 1145187, 1137814, 1143491, 1150465, 1150472, 1160262, 1135730,\n", + " 1135733, 1135740, 1156638, 1153413, 1135645, 1147810, 1151469, 1139525,\n", + " 1139524, 1158308, 1158311, 1140422, 1155441, 1155452, 1161730, 1153359,\n", + " 1140866, 1154530, 1153994, 1145610, 1145600, 1150488, 1142755, 1142758,\n", + " 1156207, 1156205, 1156269, 1156271, 1151386, 1151379, 1158626, 1155122,\n", + " 1152527, 1149321, 1155755, 1151430, 1151431, 1151424, 1146920, 1156463,\n", + " 1158096, 1155628, 1155629, 1156563, 1154559, 1154555, 1158824, 1158325,\n", + " 1157323, 1154035, 1148834, 1148837, 1155646, 1143263, 1146938, 1154240,\n", + " 1137347, 1154902, 1154909, 1143189, 1143531, 1150371, 1157439, 1141627,\n", + " 1150987, 1155293, 1159622, 1140743, 1137167, 1137152, 1157653, 1160458,\n", + " 1158117, 1158996, 1153784, 1153786, 1158204, 1137381, 1158087, 1134677,\n", + " 1135601, 1135605, 1150661, 1150671, 1158502, 1157684, 1140634, 1140632,\n", + " 1144463, 1152217, 1152220, 1140380, 1140381, 1140374, 1155872, 1157735,\n", + " 1157033, 1157038, 1157031, 1144843, 1144845, 1155971, 1155975, 1142076,\n", + " 1158846, 1156804, 1156812, 1154592, 1154600, 1160164, 1153503, 1136898,\n", + " 1136899, 1136901, 1136896, 1140208, 1158815, 1156778, 1158278, 1155237,\n", + " 1155246, 1136480, 1136481, 1159241, 1154394, 1156665, 1152143, 1153808,\n", + " 1136640, 1134757, 1153834, 1163814, 1146123, 1162021, 1138109, 1144585,\n", + " 1150011, 1155521, 1155529, 1161539, 1164276, 1164282, 1142666, 1162417,\n", + " 1157759, 1157751, 1156032, 1159042, 1159052, 1159041, 1159070, 1159071,\n", + " 1164493, 1153052, 1153045, 1163075, 1156104, 1138393, 1165244, 1149063,\n", + " 1145948, 1145945, 1153519, 1147300, 1138161, 1164006, 1156787, 1149963,\n", + " 1154590, 1139592, 1139284, 1166032, 1166073, 1157236, 1148771, 1140731,\n", + " 1159773, 1146063, 1159931, 1159552, 1171257, 1160701, 1184914, 1164048,\n", + " 1140130, 1170415, 1148600, 1148603, 1168082, 1143143, 1159025, 1159029,\n", + " 1159032, 1165877, 1169104, 1152247, 1171162, 1158911, 1160605, 1155588,\n", + " 1151223, 1151227, 1151220, 1168420, 1168525, 1144977, 1147830, 1146500,\n", + " 1146510, 1146509, 1153239, 1161240, 1144748, 1152776, 1155049, 1163522,\n", + " 1163527, 1165422, 1141471, 1151650, 1147427, 1157050, 1157054, 1156737,\n", + " 1160849, 1157955, 1166591, 1179012, 1150646, 1171044, 1171040, 1150315,\n", + " 1144810, 1144812, 1177077, 1162087, 1153276, 1135567, 1165714, 1165727,\n", + " 1156303, 1145228, 1169282, 1154700, 1155323, 1159513, 1166454, 1166462,\n", + " 1162300, 1143025, 1152624, 1139349, 1145900, 1145902, 1153534, 1181049,\n", + " 1143399, 1143404, 1149557, 1158724, 1167317, 1167315, 1147331, 1147338,\n", + " 1191355, 1145674, 1145675, 1145665, 1169602, 1167817, 1144681, 1155172,\n", + " 1150515, 1150518, 1150526, 1156119, 1154618, 1144336, 1154656, 1154670,\n", + " 1171408, 1171422, 1169162, 1157331, 1151671, 1169359, 1149452, 1149451,\n", + " 1158146, 1149688, 1158611, 1158623, 1158052, 1173047, 1149847, 1184810,\n", + " 1155494, 1172488, 1152353, 1166600, 1165528, 1175689, 1170279, 1168055,\n", + " 1149402, 1148666, 1173307, 1145033, 1169144, 1154019, 1154027, 1154028,\n", + " 1152150, 1159651, 1159655, 1167857, 1151696, 1157153, 1157373, 1147698,\n", + " 1147711, 1147707, 1151850, 1157593, 1167712, 1155738, 1155739, 1181021,\n", + " 1175812, 1170023, 1177708, 1173092, 1166535, 1166684, 1183518, 1177117,\n", + " 1177118, 1176320, 1150234, 1154148, 1158176, 1178889, 1149173, 1186117,\n", + " 1143420, 1153803, 1180817, 1161031, 1153617, 1185146, 1151509, 1182651,\n", + " 1179807, 1158030, 1161255, 1161262, 1155262, 1154718, 1157792, 1157795,\n", + " 1143341, 1171623, 1178359, 1179185, 1180036, 1178955, 1158249, 1153898,\n", + " 1153893, 1154497, 1178221, 1145626, 1145618, 1157483, 1161906, 1161911,\n", + " 1184996, 1149755, 1153601, 1155990, 1158771, 1158512, 1158513, 1158940,\n", + " 1158378, 1158380, 1155892, 1155899, 1185057, 1191814, 1140389, 1168273,\n", + " 1164792, 1185960, 1169062, 1180521, 1185168, 1166210, 1164228, 1188136,\n", + " 1187468, 1163422, 1183713, 1146161, 1180019, 1182733, 1178255, 1159532,\n", + " 1139828, 1139831, 1139837, 1183873, 1150265, 1160495, 1154806, 1154812,\n", + " 1183952, 1185628, 1156055, 1182847, 1146394, 1146395, 1149536, 1188174,\n", + " 1169964, 1187974, 1141006, 1186031, 1188817, 1193232, 1186336, 1186348,\n", + " 1152115, 1162502, 1169703, 1169707, 1189655, 1177468, 1183370, 1178265,\n", + " 1156676, 1172423, 1172429, 1178042, 1145395, 1145398, 1183949, 1176829,\n", + " 1152080, 1155959, 1181248, 1179769, 1178315, 1192792, 1185358, 1194332,\n", + " 1189804, 1169397, 1184641], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1141424, 1136228, 1140282, 1136349, 1138553, 1135726, 1135721,\n", + " 1142198, 1137791, 1140785, 1139703, 1141758, 1138335, 1136223, 1140297,\n", + " 1142517, 1136971, 1141445, 1138059, 1154776, 1145373, 1145984, 1137264,\n", + " 1138930, 1138933, 1139141, 1143372, 1146646, 1139609, 1139615, 1150497,\n", + " 1139866, 1134940, 1134943, 1149216, 1142947, 1155683, 1143820, 1147473,\n", + " 1147483, 1135989, 1144636, 1149037, 1153012, 1135950, 1148338, 1135484,\n", + " 1148546, 1153217, 1136742, 1147095, 1145419, 1155014, 1139364, 1146371,\n", + " 1134807, 1138745, 1140308, 1138119, 1137181, 1151530, 1140159, 1134735,\n", + " 1140030, 1135360, 1135367, 1135202, 1135903, 1134965, 1141036, 1134794,\n", + " 1157453, 1143377, 1137329, 1157103, 1139215, 1144399, 1144395, 1137534,\n", + " 1157393, 1136662, 1137441, 1143317, 1136928, 1148481, 1148484, 1139152,\n", + " 1135583, 1141086, 1136105, 1140970, 1140716, 1138514, 1153099, 1137957,\n", + " 1138584, 1137008, 1156909, 1135522, 1139684, 1138436, 1138440, 1140071,\n", + " 1138457, 1138462, 1158390, 1138846, 1135088, 1156606, 1138185, 1158984,\n", + " 1145843, 1137109, 1135769, 1139667, 1138070, 1142252, 1134992, 1135782,\n", + " 1139755, 1136723, 1140199, 1158971, 1142906, 1142911, 1141065, 1144410,\n", + " 1153543, 1153544, 1143625, 1138148, 1141966, 1152042, 1140660, 1137734,\n", + " 1137728, 1137743, 1134922, 1134738, 1134742, 1134750, 1134740, 1135549,\n", + " 1140228, 1141088, 1141097, 1144130, 1149001, 1141980, 1143767, 1139032,\n", + " 1139033, 1149979, 1149982, 1135865, 1136426, 1136427, 1136419, 1136625,\n", + " 1142931, 1142932, 1141224, 1141223, 1141891, 1143678, 1141161, 1141785,\n", + " 1141786, 1136760, 1141609, 1144650, 1144641, 1134987, 1136849, 1147850,\n", + " 1165291, 1142052, 1143167, 1140160, 1140173, 1140163, 1138472, 1138719,\n", + " 1138708, 1142913, 1137661, 1143107, 1143113, 1144596, 1136867, 1136871,\n", + " 1136864, 1144041, 1140885, 1144182, 1150906, 1136565, 1139559, 1138539,\n", + " 1140501, 1137849, 1137854, 1147153, 1136369, 1136378, 1149198, 1141365,\n", + " 1141367, 1153068, 1149088, 1149090, 1149097, 1139017, 1138292, 1138293,\n", + " 1153563, 1139510, 1139774, 1139763, 1139127, 1145001, 1140619, 1140990,\n", + " 1146695, 1147050, 1145873, 1155832, 1152976, 1152980, 1139453, 1141925,\n", + " 1146898, 1144242, 1141841, 1141853, 1150689, 1150692, 1150697, 1140700,\n", + " 1140696, 1137571, 1137570, 1143851, 1136273, 1146024, 1146141, 1154328,\n", + " 1139990, 1143293, 1143283, 1143294, 1143290, 1151124, 1151128, 1147543,\n", + " 1147540, 1148763, 1147282, 1142816, 1142629, 1149366, 1139417, 1149610,\n", + " 1143051, 1143052, 1136160, 1136161, 1157720, 1136836, 1136843, 1139329,\n", + " 1141496, 1136445, 1142149, 1143345, 1144766, 1144753, 1144619, 1144615,\n", + " 1145818, 1145816, 1144083, 1144088, 1144087, 1138597, 1138600, 1135876,\n", + " 1135813, 1138013, 1144375, 1146514, 1146523, 1143456, 1143457, 1143004,\n", + " 1137697, 1144568, 1140483, 1140488, 1143937, 1147574, 1143799, 1147521,\n", + " 1140352, 1140364, 1137990, 1143080, 1168921, 1148962, 1148969, 1147984,\n", + " 1147999, 1146949, 1134907, 1139252, 1139255, 1148704, 1148715, 1142700,\n", + " 1141319, 1146745, 1153701, 1152328, 1149718, 1149725, 1145705, 1147971,\n", + " 1145012, 1147196, 1158226, 1150452, 1143931, 1147873, 1147880, 1147879,\n", + " 1154526, 1145237, 1145240, 1145750, 1145751, 1138626, 1138632, 1138638,\n", + " 1146178, 1151242, 1150445, 1149258, 1148816, 1151856, 1144526, 1150350,\n", + " 1144203, 1165252, 1151480, 1151482, 1152024, 1145259, 1146723, 1149534,\n", + " 1148281, 1147009, 1147023, 1158949, 1158950, 1141949, 1150728, 1147653,\n", + " 1143559, 1148288, 1148300, 1135083, 1135084, 1135087, 1148608, 1139096,\n", + " 1151421, 1154420, 1154424, 1148188, 1151363, 1152561, 1139717, 1146682,\n", + " 1146684, 1152493, 1157968, 1148720, 1148724, 1144110, 1147627, 1151937,\n", + " 1143895, 1148203, 1148204, 1153124, 1153192, 1153197, 1145104, 1145111,\n", + " 1159828, 1152968, 1150935, 1154960, 1152877, 1152879, 1150356, 1141022,\n", + " 1151816, 1152581, 1135311, 1135303, 1151908, 1154183, 1148498, 1141420,\n", + " 1151348, 1147737, 1145086, 1146975, 1156402, 1149359, 1146623, 1146276,\n", + " 1146287, 1156325, 1153036, 1153038, 1137746, 1137755, 1137756, 1146317,\n", + " 1159974, 1152622, 1152057, 1157107, 1152826, 1154112, 1154120, 1157842,\n", + " 1157824, 1157833, 1152673, 1154633, 1151573, 1164753, 1164761, 1151617,\n", + " 1150578, 1145278, 1136131, 1136134, 1148916, 1152169, 1138991, 1151311,\n", + " 1152341, 1152342, 1153311, 1138279, 1138281, 1157141, 1152295, 1136028,\n", + " 1136031, 1158704, 1151188, 1152928, 1151064, 1151071, 1156387, 1163941,\n", + " 1150109, 1150101, 1166848, 1150168, 1150164, 1142261, 1148033, 1148040,\n", + " 1149300, 1152601, 1157630, 1149792, 1137048, 1148628, 1158530, 1169177,\n", + " 1137458, 1149947, 1135698, 1147643, 1153085, 1142041, 1157547, 1150877,\n", + " 1148884, 1158924, 1158919, 1156500, 1156501, 1156505, 1157064, 1157069,\n", + " 1145191, 1145187, 1137814, 1143491, 1150465, 1150472, 1160262, 1135730,\n", + " 1135733, 1135740, 1156638, 1153413, 1135645, 1147810, 1151469, 1139525,\n", + " 1139524, 1158308, 1158311, 1140422, 1155441, 1155452, 1161730, 1153359,\n", + " 1140866, 1154530, 1153994, 1145610, 1145600, 1150488, 1142755, 1142758,\n", + " 1156207, 1156205, 1156269, 1156271, 1151386, 1151379, 1158626, 1155122,\n", + " 1152527, 1149321, 1155755, 1151430, 1151431, 1151424, 1146920, 1156463,\n", + " 1158096, 1155628, 1155629, 1156563, 1154559, 1154555, 1158824, 1158325,\n", + " 1157323, 1154035, 1148834, 1148837, 1155646, 1143263, 1146938, 1154240,\n", + " 1137347, 1154902, 1154909, 1143189, 1143531, 1150371, 1157439, 1141627,\n", + " 1150987, 1155293, 1159622, 1140743, 1137167, 1137152, 1157653, 1160458,\n", + " 1158117, 1158996, 1153784, 1153786, 1158204, 1137381, 1158087, 1134677,\n", + " 1135601, 1135605, 1150661, 1150671, 1158502, 1157684, 1140634, 1140632,\n", + " 1144463, 1152217, 1152220, 1140380, 1140381, 1140374, 1155872, 1157735,\n", + " 1157033, 1157038, 1157031, 1144843, 1144845, 1155971, 1155975, 1142076,\n", + " 1158846, 1156804, 1156812, 1154592, 1154600, 1160164, 1153503, 1136898,\n", + " 1136899, 1136901, 1136896, 1140208, 1158815, 1156778, 1158278, 1155237,\n", + " 1155246, 1136480, 1136481, 1159241, 1154394, 1156665, 1152143, 1153808,\n", + " 1136640, 1134757, 1153834, 1163814, 1146123, 1162021, 1138109, 1144585,\n", + " 1150011, 1155521, 1155529, 1161539, 1164276, 1164282, 1142666, 1162417,\n", + " 1157759, 1157751, 1156032, 1159042, 1159052, 1159041, 1159070, 1159071,\n", + " 1164493, 1153052, 1153045, 1163075, 1156104, 1138393, 1165244, 1149063,\n", + " 1145948, 1145945, 1153519, 1147300, 1138161, 1164006, 1156787, 1149963,\n", + " 1154590, 1139592, 1139284, 1166032, 1166073, 1157236, 1148771, 1140731,\n", + " 1159773, 1146063, 1159931, 1159552, 1171257, 1160701, 1184914, 1164048,\n", + " 1140130, 1170415, 1148600, 1148603, 1168082, 1143143, 1159025, 1159029,\n", + " 1159032, 1165877, 1169104, 1152247, 1171162, 1158911, 1160605, 1155588,\n", + " 1151223, 1151227, 1151220, 1168420, 1168525, 1144977, 1147830, 1146500,\n", + " 1146510, 1146509, 1153239, 1161240, 1144748, 1152776, 1155049, 1163522,\n", + " 1163527, 1165422, 1141471, 1151650, 1147427, 1157050, 1157054, 1156737,\n", + " 1160849, 1157955, 1166591, 1179012, 1150646, 1171044, 1171040, 1150315,\n", + " 1144810, 1144812, 1177077, 1162087, 1153276, 1135567, 1165714, 1165727,\n", + " 1156303, 1145228, 1169282, 1154700, 1155323, 1159513, 1166454, 1166462,\n", + " 1162300, 1143025, 1152624, 1139349, 1145900, 1145902, 1153534, 1181049,\n", + " 1143399, 1143404, 1149557, 1158724, 1167317, 1167315, 1147331, 1147338,\n", + " 1191355, 1145674, 1145675, 1145665, 1169602, 1167817, 1144681, 1155172,\n", + " 1150515, 1150518, 1150526, 1156119, 1154618, 1144336, 1154656, 1154670,\n", + " 1171408, 1171422, 1169162, 1157331, 1151671, 1169359, 1149452, 1149451,\n", + " 1158146, 1149688, 1158611, 1158623, 1158052, 1173047, 1149847, 1184810,\n", + " 1155494, 1172488, 1152353, 1166600, 1165528, 1175689, 1170279, 1168055,\n", + " 1149402, 1148666, 1173307, 1145033, 1169144, 1154019, 1154027, 1154028,\n", + " 1152150, 1159651, 1159655, 1167857, 1151696, 1157153, 1157373, 1147698,\n", + " 1147711, 1147707, 1151850, 1157593, 1167712, 1155738, 1155739, 1181021,\n", + " 1175812, 1170023, 1177708, 1173092, 1166535, 1166684, 1183518, 1177117,\n", + " 1177118, 1176320, 1150234, 1154148, 1158176, 1178889, 1149173, 1186117,\n", + " 1143420, 1153803, 1180817, 1161031, 1153617, 1185146, 1151509, 1182651,\n", + " 1179807, 1158030, 1161255, 1161262, 1155262, 1154718, 1157792, 1157795,\n", + " 1143341, 1171623, 1178359, 1179185, 1180036, 1178955, 1158249, 1153898,\n", + " 1153893, 1154497, 1178221, 1145626, 1145618, 1157483, 1161906, 1161911,\n", + " 1184996, 1149755, 1153601, 1155990, 1158771, 1158512, 1158513, 1158940,\n", + " 1158378, 1158380, 1155892, 1155899, 1185057, 1191814, 1140389, 1168273,\n", + " 1164792, 1185960, 1169062, 1180521, 1185168, 1166210, 1164228, 1188136,\n", + " 1187468, 1163422, 1183713, 1146161, 1180019, 1182733, 1178255, 1159532,\n", + " 1139828, 1139831, 1139837, 1183873, 1150265, 1160495, 1154806, 1154812,\n", + " 1183952, 1185628, 1156055, 1182847, 1146394, 1146395, 1149536, 1188174,\n", + " 1169964, 1187974, 1141006, 1186031, 1188817, 1193232, 1186336, 1186348,\n", + " 1152115, 1162502, 1169703, 1169707, 1189655, 1177468, 1183370, 1178265,\n", + " 1156676, 1172423, 1172429, 1178042, 1145395, 1145398, 1183949, 1176829,\n", + " 1152080, 1155959, 1181248, 1179769, 1178315, 1192792, 1185358, 1194332,\n", + " 1189804, 1169397, 1184641], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196011, 1199424, 1199282, 1202245, 1202255, 1201577, 1201582, 1201237,\n", + " 1194626, 1197791, 1195945, 1198697, 1202812, 1198557, 1196573, 1194745,\n", + " 1195726, 1194783, 1195494, 1196631, 1194648, 1195263, 1196529, 1201992,\n", + " 1196030, 1198543, 1197697, 1195895, 1196359, 1194766, 1195325, 1196840,\n", + " 1198958, 1195147, 1195149, 1195265, 1197141, 1197375, 1196109, 1198219,\n", + " 1198915, 1198195, 1197478, 1195759, 1197640, 1202017, 1195918, 1196283,\n", + " 1197291, 1197574, 1199628, 1197674, 1197676, 1199579, 1194786, 1196498,\n", + " 1196727, 1196728, 1200892, 1200894, 1198428, 1198811, 1200450, 1200507,\n", + " 1201079, 1201156, 1200918, 1201042, 1201043, 1199532, 1200553, 1199887,\n", + " 1203222, 1196768, 1200899, 1200907, 1200189, 1198478, 1195607, 1199925,\n", + " 1196966, 1200784, 1199606, 1200633, 1195676, 1195679, 1196929, 1198929,\n", + " 1198943, 1198908, 1202754, 1195181, 1197821, 1196480, 1202269, 1194720,\n", + " 1194732, 1198147, 1200003, 1197735, 1197593, 1200974, 1197652, 1197655,\n", + " 1201875, 1198996, 1196424, 1198751], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196011, 1199424, 1199282, 1202245, 1202255, 1201577, 1201582, 1201237,\n", + " 1194626, 1197791, 1195945, 1198697, 1202812, 1198557, 1196573, 1194745,\n", + " 1195726, 1194783, 1195494, 1196631, 1194648, 1195263, 1196529, 1201992,\n", + " 1196030, 1198543, 1197697, 1195895, 1196359, 1194766, 1195325, 1196840,\n", + " 1198958, 1195147, 1195149, 1195265, 1197141, 1197375, 1196109, 1198219,\n", + " 1198915, 1198195, 1197478, 1195759, 1197640, 1202017, 1195918, 1196283,\n", + " 1197291, 1197574, 1199628, 1197674, 1197676, 1199579, 1194786, 1196498,\n", + " 1196727, 1196728, 1200892, 1200894, 1198428, 1198811, 1200450, 1200507,\n", + " 1201079, 1201156, 1200918, 1201042, 1201043, 1199532, 1200553, 1199887,\n", + " 1203222, 1196768, 1200899, 1200907, 1200189, 1198478, 1195607, 1199925,\n", + " 1196966, 1200784, 1199606, 1200633, 1195676, 1195679, 1196929, 1198929,\n", + " 1198943, 1198908, 1202754, 1195181, 1197821, 1196480, 1202269, 1194720,\n", + " 1194732, 1198147, 1200003, 1197735, 1197593, 1200974, 1197652, 1197655,\n", + " 1201875, 1198996, 1196424, 1198751], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 7.7796e-02, -1.9874e-04, 4.0902e-01, ..., 4.8687e-02,\n", + " -1.0159e-03, -3.0544e-03],\n", + " [ 6.4172e-02, -2.0140e-04, 4.3267e-01, ..., 6.0631e-02,\n", + " -1.0676e-03, -3.2055e-03],\n", + " [ 3.9653e-02, -2.7024e-04, 3.9715e-01, ..., 8.1262e-02,\n", + " -1.3133e-03, -3.0062e-03],\n", + " ...,\n", + " [ 5.3783e-02, -1.7980e-04, 4.2919e-01, ..., 6.0471e-02,\n", + " -1.0692e-03, -3.1928e-03],\n", + " [ 3.3684e-02, -1.6188e-04, 4.0024e-01, ..., 1.1158e-01,\n", + " -1.6397e-03, -2.8684e-03],\n", + " [ 5.5282e-02, -2.9896e-05, 4.6677e-01, ..., 6.9384e-02,\n", + " -1.1177e-03, -3.3423e-03]], device='cuda:0'), 'paper': tensor([[ 1.6010, -0.0246, 0.6798, ..., -0.0083, -0.0239, 2.3777],\n", + " [ 1.1741, -0.0454, 0.3673, ..., -0.0178, -0.0228, 0.9806],\n", + " [ 1.4451, -0.0308, 0.3510, ..., -0.0119, -0.0209, 1.9141],\n", + " ...,\n", + " [ 0.8567, -0.0294, -0.0034, ..., -0.0120, -0.0192, 1.3344],\n", + " [ 0.6867, -0.0166, 0.0595, ..., -0.0108, -0.0138, 0.6791],\n", + " [ 1.7653, -0.0273, 0.5523, ..., -0.0070, -0.0266, 3.0635]],\n", + " device='cuda:0'), 'author': tensor([[ 0.1426, -0.0007, 0.0207, ..., 0.5240, 0.0470, 0.2117],\n", + " [ 0.1793, -0.0018, 0.0593, ..., 0.6562, 0.1621, 0.2738],\n", + " [-0.0016, 0.0630, 0.1009, ..., 0.4133, 0.0147, 0.0441],\n", + " ...,\n", + " [ 0.1974, -0.0012, 0.0567, ..., 0.6505, 0.0666, 0.1958],\n", + " [ 0.1251, 0.0118, 0.0845, ..., 0.5577, -0.0012, 0.1166],\n", + " [ 0.2717, -0.0015, 0.0199, ..., 0.6529, 0.1966, 0.3064]],\n", + " device='cuda:0'), 'field_of_study': tensor([[-1.6911e-03, 1.0349e-01, 1.1919e-01, ..., -2.1231e-03,\n", + " -1.5064e-03, -1.9119e-03],\n", + " [-2.1273e-03, 9.0518e-02, 1.0686e-01, ..., -1.7824e-03,\n", + " -6.4513e-04, -3.3209e-03],\n", + " [-1.1448e-03, 1.1320e-01, 5.8920e-02, ..., -2.1104e-03,\n", + " -1.9004e-04, -3.0483e-03],\n", + " ...,\n", + " [-3.4528e-03, 2.3384e-01, 4.0375e-02, ..., 5.0362e-03,\n", + " -1.3455e-04, -2.4451e-03],\n", + " [-1.9080e-03, -2.0137e-04, 9.5803e-02, ..., -1.4902e-03,\n", + " -9.1697e-04, -2.7262e-03],\n", + " [-3.1896e-03, 1.3444e-01, 1.3815e-01, ..., 3.3876e-02,\n", + " -1.6428e-03, -3.2879e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 173, 203, 203, 211, 211, 244, 272, 298, 244, 339, 227, 517,\n", + " 517, 357, 769, 540, 820, 394, 659, 818, 878, 1030, 1030, 827,\n", + " 723, 986, 845, 1051, 990, 1050, 1050, 1071, 1356, 1375, 1192, 1272,\n", + " 1268, 1268, 1268, 1273, 1264, 1664, 1452, 1418, 1491, 1585, 1493, 1493,\n", + " 1493, 1595, 1595, 1826, 1826, 1826, 1744, 1773, 1881, 1761, 1896, 1778,\n", + " 1969, 2083, 2254, 2059, 2279, 2279, 2279, 2307, 2216, 2399, 2310, 2415,\n", + " 2462, 2397, 2397, 2471, 2384, 2384, 2625, 2639, 2641, 2641, 2638, 2678,\n", + " 2693, 2941, 2857, 2727, 2847, 2622, 2948, 2972, 2972, 3051, 3051, 3069,\n", + " 3150, 3150, 3269, 3269, 3206, 3167, 3224, 3224, 3162, 3555, 3720, 3775,\n", + " 3598, 3665, 3523, 3857, 3887, 3905, 3894, 3802, 3802, 3852, 3898, 4032,\n", + " 4149, 4205, 4317, 4325, 4413, 4210, 4313, 4500, 4624, 4587, 4750, 4536,\n", + " 4808, 4721, 4782, 4986, 4829, 4832, 4813, 5108, 5011, 5011, 5194, 5194,\n", + " 5256, 5205, 5296, 5446, 5663, 5683, 5792, 5588, 5588, 5597, 5597, 5597,\n", + " 5815, 5572, 5754, 5819, 5741, 5741, 5741, 5741, 5713, 5713],\n", + " [ 56, 90, 34, 106, 72, 82, 23, 50, 59, 56, 34, 76,\n", + " 39, 80, 44, 86, 74, 84, 50, 51, 75, 102, 47, 11,\n", + " 81, 56, 96, 77, 97, 44, 76, 37, 83, 41, 10, 33,\n", + " 61, 53, 42, 15, 1, 22, 68, 21, 56, 62, 66, 67,\n", + " 7, 44, 77, 64, 97, 0, 105, 83, 2, 22, 31, 32,\n", + " 82, 21, 49, 60, 65, 82, 32, 96, 13, 58, 11, 87,\n", + " 86, 80, 52, 14, 71, 41, 1, 48, 73, 55, 21, 22,\n", + " 100, 8, 32, 104, 96, 48, 21, 94, 93, 54, 44, 31,\n", + " 88, 19, 50, 75, 9, 8, 79, 103, 28, 98, 30, 12,\n", + " 85, 84, 6, 50, 99, 16, 95, 29, 21, 41, 13, 13,\n", + " 35, 21, 43, 5, 26, 46, 89, 95, 21, 56, 24, 107,\n", + " 62, 17, 20, 50, 63, 56, 2, 56, 50, 3, 56, 69,\n", + " 91, 92, 25, 101, 56, 78, 56, 40, 4, 38, 54, 36,\n", + " 70, 18, 87, 24, 4, 57, 102, 56, 27, 45]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3758, 895, 895, ..., 6294, 1819, 6554],\n", + " [ 182, 46, 68, ..., 7296, 7296, 7420]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 37, 67, 37, ..., 41, 88, 56],\n", + " [ 91, 82, 5, ..., 5769, 5833, 5828]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 73, 73, 73, ..., 7408, 7408, 7361],\n", + " [ 241, 163, 486, ..., 317, 109, 317]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 373, 305, 194, ..., 259, 373, 78],\n", + " [ 25, 250, 138, ..., 7320, 7373, 7334]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4355, 608, 1715, ..., 4451, 6540, 983],\n", + " [ 122, 187, 187, ..., 5719, 5860, 5842]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 69, 69, 69, ..., 7408, 7408, 7415],\n", + " [2496, 4740, 4914, ..., 4609, 360, 23]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 173, 173, 173, ..., 5824, 5824, 5824],\n", + " [3768, 3758, 3882, ..., 6742, 4574, 6934]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006644\n", + "sampling 0.00648\n", + "noi time: 0.001944\n", + "get_vertex_data call: 0.038107\n", + "noi group time: 0.003511\n", + "eoi_group_time: 0.01614\n", + "second half: 0.223916\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 31145, 24187, ..., 1132919, 1118700, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 31145, 24187, ..., 1132919, 1118700, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227498, 1219063, 1212302, ..., 1935105, 1937005, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227498, 1219063, 1212302, ..., 1935105, 1937005, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1141424, 1140282, 1140285, 1135926, 1135716, 1135727, 1140785,\n", + " 1141756, 1141758, 1140297, 1142802, 1136156, 1142525, 1136969, 1136971,\n", + " 1146803, 1138897, 1145992, 1143362, 1143372, 1139241, 1146640, 1146646,\n", + " 1139615, 1148983, 1150497, 1139866, 1134937, 1149216, 1149219, 1155686,\n", + " 1147473, 1147483, 1147486, 1142892, 1142881, 1153948, 1144636, 1146992,\n", + " 1135950, 1148346, 1146656, 1146666, 1146471, 1152666, 1152664, 1147094,\n", + " 1137220, 1150555, 1155014, 1147211, 1136685, 1136268, 1134667, 1140304,\n", + " 1140540, 1138112, 1138356, 1153463, 1134735, 1140953, 1135367, 1135202,\n", + " 1140767, 1135903, 1136039, 1141036, 1134794, 1157443, 1157450, 1136518,\n", + " 1157088, 1137693, 1136619, 1136621, 1144786, 1144793, 1144390, 1144395,\n", + " 1137529, 1137534, 1135418, 1157395, 1157397, 1152376, 1136662, 1137441,\n", + " 1136204, 1156159, 1135583, 1142593, 1136105, 1135239, 1140970, 1138514,\n", + " 1153099, 1137953, 1158136, 1145132, 1156899, 1135522, 1135535, 1138305,\n", + " 1157703, 1138436, 1138440, 1140079, 1138450, 1138461, 1138449, 1137494,\n", + " 1137491, 1137493, 1149328, 1138846, 1135088, 1135090, 1135101, 1138696,\n", + " 1138882, 1156606, 1147112, 1142611, 1160827, 1135618, 1156137, 1138185,\n", + " 1145842, 1145843, 1148531, 1135772, 1139844, 1139667, 1139673, 1134992,\n", + " 1142439, 1142793, 1152651, 1135776, 1135786, 1136734, 1158971, 1141065,\n", + " 1141070, 1143631, 1140034, 1137587, 1138646, 1146065, 1146075, 1152044,\n", + " 1140657, 1137741, 1137728, 1140904, 1138240, 1135549, 1136697, 1141088,\n", + " 1149001, 1136384, 1143767, 1137298, 1137305, 1143711, 1143221, 1143225,\n", + " 1146832, 1141688, 1136625, 1141224, 1136917, 1139731, 1145066, 1140592,\n", + " 1141155, 1141786, 1144937, 1136752, 1134987, 1147850, 1164807, 1165291,\n", + " 1137087, 1137074, 1139803, 1142050, 1142093, 1145162, 1145161, 1143202,\n", + " 1158746, 1158749, 1158595, 1141479, 1141472, 1138708, 1140110, 1144596,\n", + " 1136864, 1145298, 1135327, 1141392, 1144182, 1144184, 1144865, 1146194,\n", + " 1158692, 1138529, 1138539, 1161710, 1141367, 1141374, 1153069, 1151119,\n", + " 1138293, 1144279, 1139508, 1139510, 1145001, 1140619, 1147892, 1140976,\n", + " 1147050, 1155835, 1152976, 1152988, 1142547, 1138995, 1141925, 1144242,\n", + " 1168728, 1141842, 1163658, 1136275, 1142098, 1146024, 1150603, 1138085,\n", + " 1154328, 1141585, 1141235, 1139990, 1143293, 1143294, 1151124, 1147549,\n", + " 1147540, 1148763, 1147282, 1136330, 1149155, 1140337, 1140341, 1147458,\n", + " 1142637, 1149366, 1139417, 1139418, 1149608, 1143051, 1136160, 1136167,\n", + " 1138927, 1157720, 1136836, 1146105, 1139329, 1138238, 1139055, 1144957,\n", + " 1142159, 1145427, 1143345, 1137098, 1144081, 1135874, 1135876, 1150294,\n", + " 1144375, 1146514, 1146523, 1143960, 1138024, 1143456, 1143457, 1144291,\n", + " 1143937, 1143799, 1146636, 1147524, 1140364, 1137990, 1137994, 1144731,\n", + " 1147984, 1147999, 1148704, 1159719, 1162724, 1152328, 1149722, 1147025,\n", + " 1142858, 1147971, 1145021, 1158226, 1158228, 1147872, 1149871, 1145237,\n", + " 1145240, 1145750, 1145751, 1142370, 1146178, 1151236, 1151242, 1150274,\n", + " 1150445, 1149258, 1148928, 1148822, 1154438, 1149791, 1144526, 1145833,\n", + " 1151994, 1165252, 1151473, 1139919, 1139906, 1146723, 1150127, 1148278,\n", + " 1146768, 1146772, 1141278, 1170087, 1148744, 1137647, 1154985, 1147653,\n", + " 1143560, 1149412, 1148288, 1152073, 1151361, 1136251, 1139718, 1146682,\n", + " 1146684, 1152494, 1157968, 1157983, 1148724, 1148729, 1145862, 1171341,\n", + " 1146544, 1143971, 1148204, 1145111, 1155545, 1150929, 1150935, 1148056,\n", + " 1144849, 1150356, 1148084, 1147442, 1151811, 1151816, 1152581, 1160681,\n", + " 1148498, 1148505, 1149732, 1146565, 1141420, 1151348, 1146974, 1156402,\n", + " 1146623, 1144467, 1152097, 1152106, 1153038, 1137746, 1137755, 1146304,\n", + " 1152622, 1149203, 1152826, 1155337, 1154123, 1152673, 1151617, 1151623,\n", + " 1136131, 1136132, 1148914, 1152944, 1153387, 1144529, 1145957, 1173503,\n", + " 1152341, 1153311, 1138281, 1157138, 1152297, 1156001, 1136028, 1136029,\n", + " 1152928, 1155780, 1151064, 1151067, 1156396, 1156399, 1152888, 1143483,\n", + " 1150110, 1137405, 1150150, 1148033, 1148040, 1145656, 1137048, 1148628,\n", + " 1158530, 1158540, 1148383, 1137458, 1154381, 1157229, 1150872, 1158919,\n", + " 1156501, 1156505, 1152384, 1157067, 1155418, 1152833, 1145191, 1137819,\n", + " 1157563, 1152179, 1151788, 1152737, 1156942, 1135643, 1135645, 1135634,\n", + " 1147810, 1139525, 1158304, 1158308, 1137971, 1150130, 1140877, 1154530,\n", + " 1153985, 1142755, 1156207, 1157642, 1151379, 1158626, 1158633, 1155122,\n", + " 1157183, 1155748, 1155755, 1135396, 1156463, 1158096, 1168230, 1155628,\n", + " 1158492, 1154547, 1158574, 1158824, 1153712, 1153715, 1158325, 1148835,\n", + " 1155646, 1158361, 1143254, 1162384, 1139619, 1137359, 1154902, 1154911,\n", + " 1143189, 1157439, 1157430, 1144715, 1157934, 1137152, 1158996, 1137380,\n", + " 1159117, 1145693, 1140918, 1135601, 1145508, 1148147, 1157685, 1140633,\n", + " 1159213, 1140380, 1140374, 1157733, 1157735, 1160426, 1155975, 1142073,\n", + " 1142076, 1158840, 1155403, 1149696, 1136896, 1158886, 1140213, 1140215,\n", + " 1158444, 1155240, 1164181, 1156665, 1155299, 1136646, 1142178, 1157809,\n", + " 1158558, 1161161, 1146114, 1146126, 1164524, 1155869, 1154345, 1163183,\n", + " 1150011, 1155529, 1161539, 1142493, 1150684, 1157747, 1162683, 1159042,\n", + " 1159052, 1165838, 1167587, 1142426, 1158301, 1157946, 1160563, 1153052,\n", + " 1153045, 1171551, 1173005, 1159738, 1153842, 1156096, 1156107, 1138393,\n", + " 1150033, 1150035, 1150046, 1147300, 1171995, 1146873, 1157600, 1138161,\n", + " 1164006, 1156787, 1149963, 1139281, 1157246, 1148769, 1146063, 1159924,\n", + " 1146356, 1140130, 1140641, 1140643, 1141862, 1148600, 1148603, 1143139,\n", + " 1156358, 1156181, 1159032, 1169108, 1152247, 1143729, 1170100, 1155588,\n", + " 1164592, 1169636, 1153239, 1162577, 1153201, 1151650, 1147427, 1163795,\n", + " 1157955, 1150646, 1168748, 1144812, 1162085, 1162080, 1164741, 1142733,\n", + " 1156303, 1167332, 1148683, 1163935, 1170316, 1144973, 1162517, 1169212,\n", + " 1145447, 1165746, 1147355, 1152624, 1148124, 1139359, 1139345, 1145892,\n", + " 1145900, 1145902, 1168659, 1152203, 1143404, 1149560, 1171268, 1144690,\n", + " 1145674, 1149487, 1155169, 1155172, 1150524, 1146605, 1144346, 1144336,\n", + " 1157534, 1138382, 1147750, 1154670, 1135854, 1154882, 1169164, 1169162,\n", + " 1157331, 1138129, 1141045, 1169358, 1154353, 1149452, 1149446, 1146337,\n", + " 1158623, 1173047, 1172877, 1149846, 1149847, 1165899, 1169941, 1155489,\n", + " 1155502, 1152353, 1143859, 1155927, 1161130, 1170059, 1148335, 1173307,\n", + " 1169144, 1154027, 1153751, 1153754, 1175363, 1169572, 1169583, 1157153,\n", + " 1151848, 1151850, 1148128, 1173796, 1135018, 1175877, 1172941, 1153428,\n", + " 1169083, 1170874, 1154148, 1165672, 1149169, 1149173, 1186117, 1143420,\n", + " 1179243, 1171302, 1181241, 1153803, 1153141, 1174076, 1180817, 1151509,\n", + " 1178914, 1178920, 1155262, 1154718, 1157795, 1143341, 1171623, 1157124,\n", + " 1171738, 1183702, 1180383, 1178756, 1161068, 1179086, 1182266, 1149755,\n", + " 1181345, 1153609, 1153612, 1155990, 1158512, 1166622, 1158380, 1158382,\n", + " 1155899, 1162986, 1157270, 1170638, 1170628, 1187783, 1168892, 1182337,\n", + " 1181342, 1170257, 1181783, 1147169, 1147182, 1168943, 1172174, 1156528,\n", + " 1139828, 1139831, 1154812, 1156055, 1191480, 1192214, 1180050, 1190922,\n", + " 1174516, 1193360, 1191200, 1191167, 1192888, 1140997, 1162156, 1170157,\n", + " 1151774, 1181693, 1172339, 1169707, 1161857, 1187764, 1191414, 1187550,\n", + " 1191259, 1192681, 1157017, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1141424, 1140282, 1140285, 1135926, 1135716, 1135727, 1140785,\n", + " 1141756, 1141758, 1140297, 1142802, 1136156, 1142525, 1136969, 1136971,\n", + " 1146803, 1138897, 1145992, 1143362, 1143372, 1139241, 1146640, 1146646,\n", + " 1139615, 1148983, 1150497, 1139866, 1134937, 1149216, 1149219, 1155686,\n", + " 1147473, 1147483, 1147486, 1142892, 1142881, 1153948, 1144636, 1146992,\n", + " 1135950, 1148346, 1146656, 1146666, 1146471, 1152666, 1152664, 1147094,\n", + " 1137220, 1150555, 1155014, 1147211, 1136685, 1136268, 1134667, 1140304,\n", + " 1140540, 1138112, 1138356, 1153463, 1134735, 1140953, 1135367, 1135202,\n", + " 1140767, 1135903, 1136039, 1141036, 1134794, 1157443, 1157450, 1136518,\n", + " 1157088, 1137693, 1136619, 1136621, 1144786, 1144793, 1144390, 1144395,\n", + " 1137529, 1137534, 1135418, 1157395, 1157397, 1152376, 1136662, 1137441,\n", + " 1136204, 1156159, 1135583, 1142593, 1136105, 1135239, 1140970, 1138514,\n", + " 1153099, 1137953, 1158136, 1145132, 1156899, 1135522, 1135535, 1138305,\n", + " 1157703, 1138436, 1138440, 1140079, 1138450, 1138461, 1138449, 1137494,\n", + " 1137491, 1137493, 1149328, 1138846, 1135088, 1135090, 1135101, 1138696,\n", + " 1138882, 1156606, 1147112, 1142611, 1160827, 1135618, 1156137, 1138185,\n", + " 1145842, 1145843, 1148531, 1135772, 1139844, 1139667, 1139673, 1134992,\n", + " 1142439, 1142793, 1152651, 1135776, 1135786, 1136734, 1158971, 1141065,\n", + " 1141070, 1143631, 1140034, 1137587, 1138646, 1146065, 1146075, 1152044,\n", + " 1140657, 1137741, 1137728, 1140904, 1138240, 1135549, 1136697, 1141088,\n", + " 1149001, 1136384, 1143767, 1137298, 1137305, 1143711, 1143221, 1143225,\n", + " 1146832, 1141688, 1136625, 1141224, 1136917, 1139731, 1145066, 1140592,\n", + " 1141155, 1141786, 1144937, 1136752, 1134987, 1147850, 1164807, 1165291,\n", + " 1137087, 1137074, 1139803, 1142050, 1142093, 1145162, 1145161, 1143202,\n", + " 1158746, 1158749, 1158595, 1141479, 1141472, 1138708, 1140110, 1144596,\n", + " 1136864, 1145298, 1135327, 1141392, 1144182, 1144184, 1144865, 1146194,\n", + " 1158692, 1138529, 1138539, 1161710, 1141367, 1141374, 1153069, 1151119,\n", + " 1138293, 1144279, 1139508, 1139510, 1145001, 1140619, 1147892, 1140976,\n", + " 1147050, 1155835, 1152976, 1152988, 1142547, 1138995, 1141925, 1144242,\n", + " 1168728, 1141842, 1163658, 1136275, 1142098, 1146024, 1150603, 1138085,\n", + " 1154328, 1141585, 1141235, 1139990, 1143293, 1143294, 1151124, 1147549,\n", + " 1147540, 1148763, 1147282, 1136330, 1149155, 1140337, 1140341, 1147458,\n", + " 1142637, 1149366, 1139417, 1139418, 1149608, 1143051, 1136160, 1136167,\n", + " 1138927, 1157720, 1136836, 1146105, 1139329, 1138238, 1139055, 1144957,\n", + " 1142159, 1145427, 1143345, 1137098, 1144081, 1135874, 1135876, 1150294,\n", + " 1144375, 1146514, 1146523, 1143960, 1138024, 1143456, 1143457, 1144291,\n", + " 1143937, 1143799, 1146636, 1147524, 1140364, 1137990, 1137994, 1144731,\n", + " 1147984, 1147999, 1148704, 1159719, 1162724, 1152328, 1149722, 1147025,\n", + " 1142858, 1147971, 1145021, 1158226, 1158228, 1147872, 1149871, 1145237,\n", + " 1145240, 1145750, 1145751, 1142370, 1146178, 1151236, 1151242, 1150274,\n", + " 1150445, 1149258, 1148928, 1148822, 1154438, 1149791, 1144526, 1145833,\n", + " 1151994, 1165252, 1151473, 1139919, 1139906, 1146723, 1150127, 1148278,\n", + " 1146768, 1146772, 1141278, 1170087, 1148744, 1137647, 1154985, 1147653,\n", + " 1143560, 1149412, 1148288, 1152073, 1151361, 1136251, 1139718, 1146682,\n", + " 1146684, 1152494, 1157968, 1157983, 1148724, 1148729, 1145862, 1171341,\n", + " 1146544, 1143971, 1148204, 1145111, 1155545, 1150929, 1150935, 1148056,\n", + " 1144849, 1150356, 1148084, 1147442, 1151811, 1151816, 1152581, 1160681,\n", + " 1148498, 1148505, 1149732, 1146565, 1141420, 1151348, 1146974, 1156402,\n", + " 1146623, 1144467, 1152097, 1152106, 1153038, 1137746, 1137755, 1146304,\n", + " 1152622, 1149203, 1152826, 1155337, 1154123, 1152673, 1151617, 1151623,\n", + " 1136131, 1136132, 1148914, 1152944, 1153387, 1144529, 1145957, 1173503,\n", + " 1152341, 1153311, 1138281, 1157138, 1152297, 1156001, 1136028, 1136029,\n", + " 1152928, 1155780, 1151064, 1151067, 1156396, 1156399, 1152888, 1143483,\n", + " 1150110, 1137405, 1150150, 1148033, 1148040, 1145656, 1137048, 1148628,\n", + " 1158530, 1158540, 1148383, 1137458, 1154381, 1157229, 1150872, 1158919,\n", + " 1156501, 1156505, 1152384, 1157067, 1155418, 1152833, 1145191, 1137819,\n", + " 1157563, 1152179, 1151788, 1152737, 1156942, 1135643, 1135645, 1135634,\n", + " 1147810, 1139525, 1158304, 1158308, 1137971, 1150130, 1140877, 1154530,\n", + " 1153985, 1142755, 1156207, 1157642, 1151379, 1158626, 1158633, 1155122,\n", + " 1157183, 1155748, 1155755, 1135396, 1156463, 1158096, 1168230, 1155628,\n", + " 1158492, 1154547, 1158574, 1158824, 1153712, 1153715, 1158325, 1148835,\n", + " 1155646, 1158361, 1143254, 1162384, 1139619, 1137359, 1154902, 1154911,\n", + " 1143189, 1157439, 1157430, 1144715, 1157934, 1137152, 1158996, 1137380,\n", + " 1159117, 1145693, 1140918, 1135601, 1145508, 1148147, 1157685, 1140633,\n", + " 1159213, 1140380, 1140374, 1157733, 1157735, 1160426, 1155975, 1142073,\n", + " 1142076, 1158840, 1155403, 1149696, 1136896, 1158886, 1140213, 1140215,\n", + " 1158444, 1155240, 1164181, 1156665, 1155299, 1136646, 1142178, 1157809,\n", + " 1158558, 1161161, 1146114, 1146126, 1164524, 1155869, 1154345, 1163183,\n", + " 1150011, 1155529, 1161539, 1142493, 1150684, 1157747, 1162683, 1159042,\n", + " 1159052, 1165838, 1167587, 1142426, 1158301, 1157946, 1160563, 1153052,\n", + " 1153045, 1171551, 1173005, 1159738, 1153842, 1156096, 1156107, 1138393,\n", + " 1150033, 1150035, 1150046, 1147300, 1171995, 1146873, 1157600, 1138161,\n", + " 1164006, 1156787, 1149963, 1139281, 1157246, 1148769, 1146063, 1159924,\n", + " 1146356, 1140130, 1140641, 1140643, 1141862, 1148600, 1148603, 1143139,\n", + " 1156358, 1156181, 1159032, 1169108, 1152247, 1143729, 1170100, 1155588,\n", + " 1164592, 1169636, 1153239, 1162577, 1153201, 1151650, 1147427, 1163795,\n", + " 1157955, 1150646, 1168748, 1144812, 1162085, 1162080, 1164741, 1142733,\n", + " 1156303, 1167332, 1148683, 1163935, 1170316, 1144973, 1162517, 1169212,\n", + " 1145447, 1165746, 1147355, 1152624, 1148124, 1139359, 1139345, 1145892,\n", + " 1145900, 1145902, 1168659, 1152203, 1143404, 1149560, 1171268, 1144690,\n", + " 1145674, 1149487, 1155169, 1155172, 1150524, 1146605, 1144346, 1144336,\n", + " 1157534, 1138382, 1147750, 1154670, 1135854, 1154882, 1169164, 1169162,\n", + " 1157331, 1138129, 1141045, 1169358, 1154353, 1149452, 1149446, 1146337,\n", + " 1158623, 1173047, 1172877, 1149846, 1149847, 1165899, 1169941, 1155489,\n", + " 1155502, 1152353, 1143859, 1155927, 1161130, 1170059, 1148335, 1173307,\n", + " 1169144, 1154027, 1153751, 1153754, 1175363, 1169572, 1169583, 1157153,\n", + " 1151848, 1151850, 1148128, 1173796, 1135018, 1175877, 1172941, 1153428,\n", + " 1169083, 1170874, 1154148, 1165672, 1149169, 1149173, 1186117, 1143420,\n", + " 1179243, 1171302, 1181241, 1153803, 1153141, 1174076, 1180817, 1151509,\n", + " 1178914, 1178920, 1155262, 1154718, 1157795, 1143341, 1171623, 1157124,\n", + " 1171738, 1183702, 1180383, 1178756, 1161068, 1179086, 1182266, 1149755,\n", + " 1181345, 1153609, 1153612, 1155990, 1158512, 1166622, 1158380, 1158382,\n", + " 1155899, 1162986, 1157270, 1170638, 1170628, 1187783, 1168892, 1182337,\n", + " 1181342, 1170257, 1181783, 1147169, 1147182, 1168943, 1172174, 1156528,\n", + " 1139828, 1139831, 1154812, 1156055, 1191480, 1192214, 1180050, 1190922,\n", + " 1174516, 1193360, 1191200, 1191167, 1192888, 1140997, 1162156, 1170157,\n", + " 1151774, 1181693, 1172339, 1169707, 1161857, 1187764, 1191414, 1187550,\n", + " 1191259, 1192681, 1157017, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197178, 1198769, 1197719, 1198730, 1195860, 1199282, 1198459,\n", + " 1198832, 1198844, 1201582, 1202119, 1194626, 1199248, 1201016, 1198557,\n", + " 1196685, 1194745, 1195494, 1195511, 1195263, 1196537, 1201992, 1198542,\n", + " 1198543, 1195888, 1202902, 1195740, 1196979, 1196618, 1197831, 1194663,\n", + " 1195313, 1195325, 1196837, 1198367, 1198163, 1198164, 1199823, 1195148,\n", + " 1195221, 1197141, 1197265, 1198219, 1195850, 1195038, 1195659, 1195541,\n", + " 1198203, 1196122, 1197640, 1196393, 1196283, 1195353, 1200959, 1197291,\n", + " 1199185, 1194928, 1195119, 1197583, 1199628, 1200869, 1200872, 1199038,\n", + " 1200404, 1199231, 1201916, 1201511, 1197601, 1197603, 1197611, 1197609,\n", + " 1196727, 1195771, 1195773, 1200893, 1198416, 1200018, 1199410, 1199421,\n", + " 1195557, 1200450, 1200169, 1200501, 1199445, 1202635, 1200913, 1200918,\n", + " 1194803, 1194805, 1198488, 1200429, 1197097, 1199887, 1201756, 1200195,\n", + " 1196768, 1201442, 1200907, 1199976, 1202175, 1201291, 1196761, 1196960,\n", + " 1200784, 1194846, 1199606, 1198521, 1195676, 1195664, 1197334, 1198932,\n", + " 1200684, 1197816, 1197822, 1197821, 1201499, 1202269, 1200003, 1198824,\n", + " 1197735, 1200437, 1202777, 1199783, 1199787, 1198819, 1198848, 1200468,\n", + " 1200974, 1195066, 1201886, 1200301, 1200302, 1197652, 1195082, 1201361,\n", + " 1203162], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197178, 1198769, 1197719, 1198730, 1195860, 1199282, 1198459,\n", + " 1198832, 1198844, 1201582, 1202119, 1194626, 1199248, 1201016, 1198557,\n", + " 1196685, 1194745, 1195494, 1195511, 1195263, 1196537, 1201992, 1198542,\n", + " 1198543, 1195888, 1202902, 1195740, 1196979, 1196618, 1197831, 1194663,\n", + " 1195313, 1195325, 1196837, 1198367, 1198163, 1198164, 1199823, 1195148,\n", + " 1195221, 1197141, 1197265, 1198219, 1195850, 1195038, 1195659, 1195541,\n", + " 1198203, 1196122, 1197640, 1196393, 1196283, 1195353, 1200959, 1197291,\n", + " 1199185, 1194928, 1195119, 1197583, 1199628, 1200869, 1200872, 1199038,\n", + " 1200404, 1199231, 1201916, 1201511, 1197601, 1197603, 1197611, 1197609,\n", + " 1196727, 1195771, 1195773, 1200893, 1198416, 1200018, 1199410, 1199421,\n", + " 1195557, 1200450, 1200169, 1200501, 1199445, 1202635, 1200913, 1200918,\n", + " 1194803, 1194805, 1198488, 1200429, 1197097, 1199887, 1201756, 1200195,\n", + " 1196768, 1201442, 1200907, 1199976, 1202175, 1201291, 1196761, 1196960,\n", + " 1200784, 1194846, 1199606, 1198521, 1195676, 1195664, 1197334, 1198932,\n", + " 1200684, 1197816, 1197822, 1197821, 1201499, 1202269, 1200003, 1198824,\n", + " 1197735, 1200437, 1202777, 1199783, 1199787, 1198819, 1198848, 1200468,\n", + " 1200974, 1195066, 1201886, 1200301, 1200302, 1197652, 1195082, 1201361,\n", + " 1203162], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.2270e-01, -5.2834e-04, 5.2463e-01, ..., 5.1712e-02,\n", + " -1.3056e-03, -4.0549e-03],\n", + " [ 1.0329e-01, -5.9672e-04, 4.5708e-01, ..., 6.8346e-02,\n", + " -1.3911e-03, -3.5189e-03],\n", + " [ 6.0313e-02, -3.2558e-04, 4.1688e-01, ..., 6.3360e-02,\n", + " -1.0580e-03, -3.0536e-03],\n", + " ...,\n", + " [ 4.7671e-02, -2.5708e-04, 4.7734e-01, ..., 7.7678e-02,\n", + " -9.7571e-04, -3.4390e-03],\n", + " [ 3.5249e-02, -3.5525e-04, 3.8741e-01, ..., 9.8386e-02,\n", + " -1.4251e-03, -3.0071e-03],\n", + " [ 6.7908e-02, -2.1819e-04, 4.1338e-01, ..., 1.1006e-01,\n", + " -1.5215e-03, -2.8692e-03]], device='cuda:0'), 'paper': tensor([[ 1.2789e+00, -2.6164e-02, 1.6590e-01, ..., -1.0949e-02,\n", + " -1.7934e-02, 1.4611e+00],\n", + " [ 1.2721e+00, -3.8421e-02, 3.3734e-01, ..., -1.8079e-02,\n", + " -2.0914e-02, 7.7082e-01],\n", + " [ 7.6338e-01, -1.9131e-02, 1.1839e-01, ..., -1.0224e-02,\n", + " -1.6108e-02, 8.2478e-01],\n", + " ...,\n", + " [ 6.2376e-01, -1.8812e-02, -2.4426e-03, ..., -9.3247e-03,\n", + " -1.4503e-02, 9.6191e-01],\n", + " [ 5.0312e-01, -1.6108e-02, -3.6643e-03, ..., -7.3992e-03,\n", + " -1.1959e-02, 8.1055e-01],\n", + " [ 1.7809e+00, -2.7250e-02, 5.5943e-01, ..., -6.9811e-03,\n", + " -2.6680e-02, 3.0712e+00]], device='cuda:0'), 'author': tensor([[ 1.8045e-01, -1.7617e-03, 5.1250e-02, ..., 6.7672e-01,\n", + " 1.3045e-01, 3.2294e-01],\n", + " [ 1.1268e-01, -1.2111e-03, 8.5474e-02, ..., 6.9864e-01,\n", + " 5.8869e-02, 2.1264e-01],\n", + " [ 1.2839e-01, -6.8037e-04, 4.0362e-02, ..., 5.9590e-01,\n", + " 9.0193e-02, 2.3205e-01],\n", + " ...,\n", + " [ 1.3402e-01, -3.1858e-04, 4.1588e-02, ..., 5.7142e-01,\n", + " -7.3840e-04, 1.9756e-01],\n", + " [-5.2906e-04, -3.5063e-05, 1.5153e-01, ..., 1.0313e-01,\n", + " -3.1383e-04, -9.0066e-04],\n", + " [ 2.6399e-01, -1.8211e-03, 3.1515e-02, ..., 6.8638e-01,\n", + " 1.9922e-01, 2.9930e-01]], device='cuda:0'), 'field_of_study': tensor([[-2.6841e-03, 3.1397e-02, 1.7141e-01, ..., -2.5099e-03,\n", + " -6.8030e-04, -2.2015e-03],\n", + " [-1.7196e-03, 5.2058e-02, 7.1653e-02, ..., -1.7128e-03,\n", + " -1.0475e-03, -2.9198e-03],\n", + " [-2.5927e-03, 1.8629e-01, 7.9519e-02, ..., -1.2513e-04,\n", + " -4.8785e-04, -3.7657e-03],\n", + " ...,\n", + " [-2.2571e-03, 1.7102e-01, 1.3886e-01, ..., -1.5795e-03,\n", + " -2.6052e-04, -4.0794e-03],\n", + " [-1.6227e-03, 1.0725e-01, 1.2120e-01, ..., -2.5599e-03,\n", + " -9.4005e-04, -3.6344e-03],\n", + " [-3.5216e-03, 2.6669e-01, 3.4963e-02, ..., 8.7776e-02,\n", + " -1.0281e-03, -4.5864e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 217, 220, 36, 60, 125, 200, 200, 48, 243, 243, 243, 243,\n", + " 247, 50, 158, 15, 15, 15, 112, 440, 440, 459, 256, 465,\n", + " 612, 690, 715, 785, 650, 650, 1232, 1232, 1232, 1216, 923, 1012,\n", + " 1528, 1293, 1407, 1452, 1452, 1392, 1392, 1550, 1550, 1550, 1550, 1452,\n", + " 1452, 1416, 1452, 1560, 1564, 1540, 1720, 1663, 1663, 1663, 1544, 1639,\n", + " 1507, 1594, 1768, 1663, 1711, 1653, 1706, 1813, 1924, 1813, 1813, 2032,\n", + " 2007, 2048, 1856, 2007, 2096, 2096, 1956, 1956, 2072, 1977, 2064, 2202,\n", + " 2202, 2202, 2042, 2175, 2227, 2148, 2137, 2437, 2437, 2190, 2252, 2501,\n", + " 2501, 2465, 2559, 2760, 2694, 2837, 2837, 2837, 2838, 2889, 2984, 3417,\n", + " 3313, 3313, 3362, 3362, 3050, 3224, 3217, 3533, 3602, 3667, 3667, 3481,\n", + " 3758, 3758, 3758, 3918, 3716, 3815, 3994, 3994, 3873, 4227, 3949, 3909,\n", + " 3909, 4201, 4200, 4200, 4200, 4130, 4082, 4082, 4109, 4385, 4409, 4510,\n", + " 4447, 4525, 4952, 4691, 4915, 4721, 4932, 4932, 4932, 5039, 5053, 4827,\n", + " 5026, 5026, 5168, 5288, 5250, 5377, 5377, 5250, 5116, 5276, 5269, 5383,\n", + " 5596, 5805, 5805, 5622, 5622, 5619, 5831, 5839, 5784, 5784, 5675, 5832,\n", + " 5939, 6563, 6563, 6219, 6219, 6538, 6491, 6412, 6463, 6463, 6417, 6417,\n", + " 6417, 6340, 6340, 6340, 6792, 6792, 6538, 6538, 6538, 6538, 6422, 6547,\n", + " 6475, 6229, 6229, 6604, 6619, 6619, 6619, 6793, 6793, 6606, 6692, 6775,\n", + " 6596, 6556, 6556, 6604, 6604, 6604, 6776],\n", + " [ 23, 72, 58, 90, 70, 43, 52, 97, 11, 111, 16, 53,\n", + " 62, 47, 6, 82, 5, 75, 109, 118, 42, 94, 40, 119,\n", + " 102, 47, 37, 129, 72, 22, 105, 57, 25, 59, 86, 2,\n", + " 38, 72, 134, 121, 9, 113, 101, 126, 20, 15, 22, 100,\n", + " 117, 95, 39, 112, 20, 71, 106, 101, 22, 104, 7, 135,\n", + " 95, 13, 72, 99, 54, 85, 86, 22, 92, 105, 36, 26,\n", + " 107, 45, 60, 21, 55, 53, 28, 66, 132, 6, 72, 133,\n", + " 87, 47, 49, 65, 1, 72, 27, 122, 31, 41, 84, 8,\n", + " 111, 115, 94, 29, 56, 24, 51, 72, 94, 94, 128, 68,\n", + " 20, 83, 50, 136, 49, 14, 120, 49, 104, 61, 58, 59,\n", + " 54, 17, 88, 72, 32, 94, 29, 69, 72, 97, 95, 18,\n", + " 19, 7, 0, 116, 86, 74, 77, 123, 81, 93, 95, 119,\n", + " 136, 58, 4, 63, 20, 48, 53, 62, 16, 20, 72, 72,\n", + " 114, 131, 68, 25, 72, 72, 124, 10, 94, 30, 127, 67,\n", + " 59, 10, 72, 12, 15, 14, 47, 25, 72, 106, 91, 136,\n", + " 78, 130, 72, 72, 25, 39, 104, 35, 88, 79, 96, 72,\n", + " 88, 45, 46, 72, 110, 64, 76, 61, 98, 72, 4, 104,\n", + " 4, 72, 73, 12, 34, 44, 72, 119, 89, 103, 125, 80,\n", + " 108, 27, 72, 72, 33, 3, 5]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3968, 3752, 3770, ..., 1827, 3471, 635],\n", + " [ 204, 120, 88, ..., 5864, 5957, 5959]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 6, 112, 112, ..., 68, 72, 106],\n", + " [ 137, 31, 106, ..., 6711, 6605, 6814]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 130, 130, 130, ..., 5928, 5928, 6001],\n", + " [ 638, 235, 410, ..., 124, 298, 146]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 297, 419, 755, ..., 100, 419, 384],\n", + " [ 20, 39, 4, ..., 5988, 5990, 5918]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 389, 4785, 4349, ..., 2716, 3028, 1159],\n", + " [ 122, 73, 87, ..., 6735, 6727, 6759]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 130, 68, 114, ..., 6001, 5938, 6011],\n", + " [1117, 1117, 975, ..., 2546, 2614, 2912]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 15, 15, 15, ..., 6692, 6692, 6776],\n", + " [ 475, 5, 756, ..., 3354, 3328, 4559]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006487\n", + "sampling 0.006333\n", + "noi time: 0.00194\n", + "get_vertex_data call: 0.03753\n", + "noi group time: 0.003559\n", + "eoi_group_time: 0.015939\n", + "second half: 0.210821\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31145, 24187, 19416, ..., 1118699, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31145, 24187, 19416, ..., 1118699, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1215973, 1228004, ..., 1926878, 1925037, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1215973, 1228004, ..., 1926878, 1925037, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1141424, 1136228, 1135716, 1137780, 1137791, 1139698, 1141758,\n", + " 1138335, 1136215, 1141250, 1140290, 1142810, 1136969, 1136971, 1141443,\n", + " 1146802, 1138897, 1151164, 1143615, 1139820, 1154771, 1145373, 1138942,\n", + " 1139141, 1146640, 1146641, 1139615, 1150506, 1150509, 1149216, 1155689,\n", + " 1143820, 1149644, 1147483, 1148523, 1149037, 1149038, 1153016, 1134697,\n", + " 1134701, 1152666, 1153220, 1136742, 1150554, 1155014, 1139370, 1139373,\n", + " 1139371, 1150333, 1146371, 1138749, 1140537, 1140540, 1138112, 1151520,\n", + " 1140020, 1135367, 1135202, 1141036, 1136297, 1134794, 1138504, 1136189,\n", + " 1143069, 1157102, 1144395, 1137529, 1157397, 1136662, 1137441, 1139161,\n", + " 1141703, 1135980, 1135240, 1155076, 1140970, 1137957, 1135501, 1154132,\n", + " 1154142, 1145133, 1135522, 1138440, 1138461, 1137493, 1136594, 1154101,\n", + " 1158390, 1138847, 1156605, 1147111, 1147112, 1142611, 1135359, 1156141,\n", + " 1158984, 1150953, 1141533, 1143586, 1138067, 1138069, 1140261, 1134992,\n", + " 1134770, 1142785, 1136546, 1135782, 1139755, 1139321, 1140849, 1140034,\n", + " 1139933, 1141966, 1155648, 1139071, 1140660, 1137734, 1147317, 1147322,\n", + " 1134750, 1137000, 1138240, 1135549, 1141088, 1141099, 1141102, 1144138,\n", + " 1139898, 1145346, 1135291, 1142031, 1143767, 1143225, 1139033, 1146844,\n", + " 1142342, 1136917, 1143678, 1143677, 1145066, 1140601, 1160612, 1139495,\n", + " 1136760, 1134979, 1144422, 1138482, 1143153, 1138708, 1140110, 1143107,\n", + " 1144596, 1148263, 1157420, 1136866, 1136867, 1140885, 1144182, 1161094,\n", + " 1138539, 1147153, 1142650, 1149186, 1141365, 1141367, 1163674, 1151119,\n", + " 1138292, 1153564, 1139508, 1139773, 1139763, 1140089, 1138806, 1139127,\n", + " 1144997, 1144998, 1140616, 1147896, 1140984, 1147050, 1135457, 1142555,\n", + " 1141925, 1144242, 1165366, 1137149, 1140700, 1136891, 1139405, 1137575,\n", + " 1144070, 1143845, 1143851, 1146008, 1146024, 1146025, 1141646, 1139990,\n", + " 1143293, 1143283, 1143294, 1147150, 1148763, 1147282, 1142816, 1140348,\n", + " 1139417, 1136160, 1136836, 1139329, 1141490, 1143345, 1144753, 1144619,\n", + " 1144093, 1135876, 1144310, 1135813, 1169017, 1144375, 1146526, 1143457,\n", + " 1140487, 1143937, 1147574, 1155700, 1147523, 1140356, 1140360, 1140364,\n", + " 1149582, 1137990, 1168921, 1168927, 1147984, 1147995, 1147999, 1139249,\n", + " 1148704, 1146751, 1153701, 1152328, 1147971, 1139549, 1147198, 1150449,\n", + " 1143921, 1148359, 1145747, 1148397, 1146188, 1151239, 1152530, 1150445,\n", + " 1144514, 1144526, 1141349, 1141358, 1138044, 1151997, 1152022, 1144884,\n", + " 1139906, 1140561, 1140572, 1150127, 1147019, 1143560, 1148288, 1154420,\n", + " 1152563, 1146686, 1146687, 1141181, 1152436, 1157983, 1148720, 1148729,\n", + " 1146549, 1139950, 1148204, 1153124, 1153192, 1153188, 1153197, 1145111,\n", + " 1159837, 1150929, 1150932, 1150935, 1150356, 1155095, 1148084, 1151906,\n", + " 1145637, 1148510, 1146562, 1146565, 1141420, 1148949, 1146975, 1153249,\n", + " 1146623, 1144468, 1144476, 1152849, 1152100, 1146280, 1137746, 1137758,\n", + " 1152622, 1140521, 1152055, 1149203, 1155337, 1154123, 1151576, 1151582,\n", + " 1151617, 1145278, 1136788, 1152944, 1152169, 1145956, 1152903, 1151311,\n", + " 1152341, 1146816, 1138281, 1136028, 1158704, 1156619, 1156622, 1151188,\n", + " 1155779, 1151064, 1156396, 1156422, 1137405, 1150164, 1144017, 1148033,\n", + " 1148040, 1149792, 1149794, 1144657, 1144656, 1137048, 1148628, 1148637,\n", + " 1158530, 1158540, 1137458, 1149946, 1155376, 1135434, 1158927, 1156505,\n", + " 1157059, 1157064, 1145187, 1137814, 1149045, 1151788, 1156935, 1153413,\n", + " 1139525, 1158308, 1155441, 1162120, 1150494, 1142755, 1142752, 1156207,\n", + " 1151379, 1155122, 1152527, 1149321, 1149320, 1155755, 1151424, 1146920,\n", + " 1145806, 1158096, 1168230, 1157894, 1154555, 1158824, 1158325, 1157000,\n", + " 1148836, 1148834, 1155646, 1143254, 1154250, 1137359, 1154902, 1154909,\n", + " 1143189, 1157439, 1157928, 1137152, 1158126, 1153776, 1158350, 1145682,\n", + " 1134687, 1134682, 1135601, 1148149, 1148153, 1155852, 1156095, 1152209,\n", + " 1159213, 1140368, 1151101, 1157735, 1157030, 1144843, 1155975, 1159956,\n", + " 1158846, 1155393, 1149700, 1136905, 1136896, 1158753, 1158760, 1158764,\n", + " 1158815, 1136491, 1164941, 1156664, 1155296, 1155299, 1155309, 1156278,\n", + " 1134757, 1161161, 1144582, 1150011, 1155521, 1155529, 1161539, 1169890,\n", + " 1135659, 1157747, 1165838, 1157944, 1153052, 1153045, 1171551, 1142869,\n", + " 1159368, 1153841, 1153855, 1167189, 1150046, 1149063, 1145948, 1155479,\n", + " 1147300, 1138161, 1164006, 1154578, 1139286, 1139281, 1159985, 1148783,\n", + " 1158452, 1160176, 1170415, 1148603, 1148607, 1141792, 1158643, 1159025,\n", + " 1159029, 1159032, 1169106, 1160605, 1155588, 1144320, 1147562, 1168426,\n", + " 1149022, 1147835, 1146500, 1146505, 1163527, 1163525, 1155279, 1153201,\n", + " 1141471, 1147433, 1163800, 1156739, 1184103, 1144810, 1144812, 1162093,\n", + " 1135567, 1165724, 1156300, 1156303, 1192004, 1145176, 1163935, 1145228,\n", + " 1154700, 1166462, 1150531, 1144973, 1170945, 1139344, 1147723, 1145902,\n", + " 1143404, 1149557, 1158722, 1171279, 1147334, 1150777, 1149125, 1154922,\n", + " 1169602, 1166653, 1150518, 1156119, 1144346, 1144336, 1157534, 1147746,\n", + " 1147750, 1154670, 1154893, 1157331, 1141048, 1147491, 1147502, 1158156,\n", + " 1171522, 1158611, 1158623, 1158618, 1149846, 1147423, 1143177, 1148667,\n", + " 1173307, 1145028, 1154027, 1152150, 1155464, 1147711, 1151850, 1145783,\n", + " 1149247, 1169038, 1135016, 1170701, 1177601, 1182095, 1144545, 1144550,\n", + " 1166535, 1166682, 1150234, 1154148, 1169409, 1158176, 1149169, 1149173,\n", + " 1143279, 1168481, 1143420, 1179243, 1176490, 1181095, 1153803, 1153141,\n", + " 1171132, 1180817, 1164471, 1182651, 1161255, 1155260, 1155262, 1154718,\n", + " 1157792, 1157795, 1143343, 1151496, 1171623, 1181380, 1155799, 1155804,\n", + " 1157134, 1181935, 1180083, 1158253, 1153899, 1153902, 1145622, 1145626,\n", + " 1163538, 1180383, 1161907, 1146243, 1153601, 1153609, 1155990, 1158512,\n", + " 1158940, 1179064, 1155892, 1180849, 1179924, 1176690, 1168866, 1188188,\n", + " 1176976, 1184287, 1181469, 1170802, 1156162, 1156539, 1139828, 1139831,\n", + " 1154812, 1156055, 1146386, 1149544, 1156838, 1177059, 1189540, 1185976,\n", + " 1140996, 1188770, 1175171, 1179852, 1162146, 1162156, 1152113, 1152124,\n", + " 1179006, 1169699, 1169707, 1166841, 1192305, 1150400, 1193115, 1172429,\n", + " 1158064, 1145395, 1176829, 1179755, 1191451, 1155962, 1181646, 1193491,\n", + " 1175336, 1174698, 1177678], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1141424, 1136228, 1135716, 1137780, 1137791, 1139698, 1141758,\n", + " 1138335, 1136215, 1141250, 1140290, 1142810, 1136969, 1136971, 1141443,\n", + " 1146802, 1138897, 1151164, 1143615, 1139820, 1154771, 1145373, 1138942,\n", + " 1139141, 1146640, 1146641, 1139615, 1150506, 1150509, 1149216, 1155689,\n", + " 1143820, 1149644, 1147483, 1148523, 1149037, 1149038, 1153016, 1134697,\n", + " 1134701, 1152666, 1153220, 1136742, 1150554, 1155014, 1139370, 1139373,\n", + " 1139371, 1150333, 1146371, 1138749, 1140537, 1140540, 1138112, 1151520,\n", + " 1140020, 1135367, 1135202, 1141036, 1136297, 1134794, 1138504, 1136189,\n", + " 1143069, 1157102, 1144395, 1137529, 1157397, 1136662, 1137441, 1139161,\n", + " 1141703, 1135980, 1135240, 1155076, 1140970, 1137957, 1135501, 1154132,\n", + " 1154142, 1145133, 1135522, 1138440, 1138461, 1137493, 1136594, 1154101,\n", + " 1158390, 1138847, 1156605, 1147111, 1147112, 1142611, 1135359, 1156141,\n", + " 1158984, 1150953, 1141533, 1143586, 1138067, 1138069, 1140261, 1134992,\n", + " 1134770, 1142785, 1136546, 1135782, 1139755, 1139321, 1140849, 1140034,\n", + " 1139933, 1141966, 1155648, 1139071, 1140660, 1137734, 1147317, 1147322,\n", + " 1134750, 1137000, 1138240, 1135549, 1141088, 1141099, 1141102, 1144138,\n", + " 1139898, 1145346, 1135291, 1142031, 1143767, 1143225, 1139033, 1146844,\n", + " 1142342, 1136917, 1143678, 1143677, 1145066, 1140601, 1160612, 1139495,\n", + " 1136760, 1134979, 1144422, 1138482, 1143153, 1138708, 1140110, 1143107,\n", + " 1144596, 1148263, 1157420, 1136866, 1136867, 1140885, 1144182, 1161094,\n", + " 1138539, 1147153, 1142650, 1149186, 1141365, 1141367, 1163674, 1151119,\n", + " 1138292, 1153564, 1139508, 1139773, 1139763, 1140089, 1138806, 1139127,\n", + " 1144997, 1144998, 1140616, 1147896, 1140984, 1147050, 1135457, 1142555,\n", + " 1141925, 1144242, 1165366, 1137149, 1140700, 1136891, 1139405, 1137575,\n", + " 1144070, 1143845, 1143851, 1146008, 1146024, 1146025, 1141646, 1139990,\n", + " 1143293, 1143283, 1143294, 1147150, 1148763, 1147282, 1142816, 1140348,\n", + " 1139417, 1136160, 1136836, 1139329, 1141490, 1143345, 1144753, 1144619,\n", + " 1144093, 1135876, 1144310, 1135813, 1169017, 1144375, 1146526, 1143457,\n", + " 1140487, 1143937, 1147574, 1155700, 1147523, 1140356, 1140360, 1140364,\n", + " 1149582, 1137990, 1168921, 1168927, 1147984, 1147995, 1147999, 1139249,\n", + " 1148704, 1146751, 1153701, 1152328, 1147971, 1139549, 1147198, 1150449,\n", + " 1143921, 1148359, 1145747, 1148397, 1146188, 1151239, 1152530, 1150445,\n", + " 1144514, 1144526, 1141349, 1141358, 1138044, 1151997, 1152022, 1144884,\n", + " 1139906, 1140561, 1140572, 1150127, 1147019, 1143560, 1148288, 1154420,\n", + " 1152563, 1146686, 1146687, 1141181, 1152436, 1157983, 1148720, 1148729,\n", + " 1146549, 1139950, 1148204, 1153124, 1153192, 1153188, 1153197, 1145111,\n", + " 1159837, 1150929, 1150932, 1150935, 1150356, 1155095, 1148084, 1151906,\n", + " 1145637, 1148510, 1146562, 1146565, 1141420, 1148949, 1146975, 1153249,\n", + " 1146623, 1144468, 1144476, 1152849, 1152100, 1146280, 1137746, 1137758,\n", + " 1152622, 1140521, 1152055, 1149203, 1155337, 1154123, 1151576, 1151582,\n", + " 1151617, 1145278, 1136788, 1152944, 1152169, 1145956, 1152903, 1151311,\n", + " 1152341, 1146816, 1138281, 1136028, 1158704, 1156619, 1156622, 1151188,\n", + " 1155779, 1151064, 1156396, 1156422, 1137405, 1150164, 1144017, 1148033,\n", + " 1148040, 1149792, 1149794, 1144657, 1144656, 1137048, 1148628, 1148637,\n", + " 1158530, 1158540, 1137458, 1149946, 1155376, 1135434, 1158927, 1156505,\n", + " 1157059, 1157064, 1145187, 1137814, 1149045, 1151788, 1156935, 1153413,\n", + " 1139525, 1158308, 1155441, 1162120, 1150494, 1142755, 1142752, 1156207,\n", + " 1151379, 1155122, 1152527, 1149321, 1149320, 1155755, 1151424, 1146920,\n", + " 1145806, 1158096, 1168230, 1157894, 1154555, 1158824, 1158325, 1157000,\n", + " 1148836, 1148834, 1155646, 1143254, 1154250, 1137359, 1154902, 1154909,\n", + " 1143189, 1157439, 1157928, 1137152, 1158126, 1153776, 1158350, 1145682,\n", + " 1134687, 1134682, 1135601, 1148149, 1148153, 1155852, 1156095, 1152209,\n", + " 1159213, 1140368, 1151101, 1157735, 1157030, 1144843, 1155975, 1159956,\n", + " 1158846, 1155393, 1149700, 1136905, 1136896, 1158753, 1158760, 1158764,\n", + " 1158815, 1136491, 1164941, 1156664, 1155296, 1155299, 1155309, 1156278,\n", + " 1134757, 1161161, 1144582, 1150011, 1155521, 1155529, 1161539, 1169890,\n", + " 1135659, 1157747, 1165838, 1157944, 1153052, 1153045, 1171551, 1142869,\n", + " 1159368, 1153841, 1153855, 1167189, 1150046, 1149063, 1145948, 1155479,\n", + " 1147300, 1138161, 1164006, 1154578, 1139286, 1139281, 1159985, 1148783,\n", + " 1158452, 1160176, 1170415, 1148603, 1148607, 1141792, 1158643, 1159025,\n", + " 1159029, 1159032, 1169106, 1160605, 1155588, 1144320, 1147562, 1168426,\n", + " 1149022, 1147835, 1146500, 1146505, 1163527, 1163525, 1155279, 1153201,\n", + " 1141471, 1147433, 1163800, 1156739, 1184103, 1144810, 1144812, 1162093,\n", + " 1135567, 1165724, 1156300, 1156303, 1192004, 1145176, 1163935, 1145228,\n", + " 1154700, 1166462, 1150531, 1144973, 1170945, 1139344, 1147723, 1145902,\n", + " 1143404, 1149557, 1158722, 1171279, 1147334, 1150777, 1149125, 1154922,\n", + " 1169602, 1166653, 1150518, 1156119, 1144346, 1144336, 1157534, 1147746,\n", + " 1147750, 1154670, 1154893, 1157331, 1141048, 1147491, 1147502, 1158156,\n", + " 1171522, 1158611, 1158623, 1158618, 1149846, 1147423, 1143177, 1148667,\n", + " 1173307, 1145028, 1154027, 1152150, 1155464, 1147711, 1151850, 1145783,\n", + " 1149247, 1169038, 1135016, 1170701, 1177601, 1182095, 1144545, 1144550,\n", + " 1166535, 1166682, 1150234, 1154148, 1169409, 1158176, 1149169, 1149173,\n", + " 1143279, 1168481, 1143420, 1179243, 1176490, 1181095, 1153803, 1153141,\n", + " 1171132, 1180817, 1164471, 1182651, 1161255, 1155260, 1155262, 1154718,\n", + " 1157792, 1157795, 1143343, 1151496, 1171623, 1181380, 1155799, 1155804,\n", + " 1157134, 1181935, 1180083, 1158253, 1153899, 1153902, 1145622, 1145626,\n", + " 1163538, 1180383, 1161907, 1146243, 1153601, 1153609, 1155990, 1158512,\n", + " 1158940, 1179064, 1155892, 1180849, 1179924, 1176690, 1168866, 1188188,\n", + " 1176976, 1184287, 1181469, 1170802, 1156162, 1156539, 1139828, 1139831,\n", + " 1154812, 1156055, 1146386, 1149544, 1156838, 1177059, 1189540, 1185976,\n", + " 1140996, 1188770, 1175171, 1179852, 1162146, 1162156, 1152113, 1152124,\n", + " 1179006, 1169699, 1169707, 1166841, 1192305, 1150400, 1193115, 1172429,\n", + " 1158064, 1145395, 1176829, 1179755, 1191451, 1155962, 1181646, 1193491,\n", + " 1175336, 1174698, 1177678], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199424, 1198248, 1199282, 1202255, 1198844, 1201582, 1202119, 1200650,\n", + " 1201660, 1198633, 1198694, 1198546, 1198557, 1197512, 1194866, 1196685,\n", + " 1195494, 1196624, 1195507, 1195511, 1195263, 1197933, 1201992, 1198543,\n", + " 1199519, 1194882, 1195740, 1196979, 1194759, 1197831, 1195313, 1196837,\n", + " 1198668, 1195989, 1195571, 1196711, 1199823, 1195148, 1195216, 1195265,\n", + " 1195266, 1200765, 1197367, 1197273, 1195038, 1195541, 1199344, 1195790,\n", + " 1199697, 1196393, 1198282, 1199329, 1199060, 1196851, 1194928, 1197574,\n", + " 1199628, 1200079, 1200869, 1200872, 1199038, 1200404, 1199745, 1194786,\n", + " 1200060, 1196508, 1199021, 1197601, 1196727, 1196734, 1196728, 1198428,\n", + " 1200155, 1198811, 1199555, 1198593, 1201156, 1202630, 1202403, 1200991,\n", + " 1201056, 1200918, 1200927, 1199761, 1202640, 1201737, 1200546, 1200430,\n", + " 1197097, 1202541, 1202138, 1197050, 1199099, 1196779, 1201442, 1197945,\n", + " 1202239, 1200899, 1202175, 1195876, 1201291, 1198478, 1203329, 1200398,\n", + " 1198562, 1196966, 1200784, 1199606, 1200578, 1200638, 1195679, 1195664,\n", + " 1203105, 1198929, 1195421, 1195181, 1197816, 1197822, 1197821, 1198966,\n", + " 1203102, 1201138, 1199403, 1201705, 1197735, 1200677, 1201981, 1198819,\n", + " 1197652, 1197335, 1203162, 1198996, 1201966, 1196424], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199424, 1198248, 1199282, 1202255, 1198844, 1201582, 1202119, 1200650,\n", + " 1201660, 1198633, 1198694, 1198546, 1198557, 1197512, 1194866, 1196685,\n", + " 1195494, 1196624, 1195507, 1195511, 1195263, 1197933, 1201992, 1198543,\n", + " 1199519, 1194882, 1195740, 1196979, 1194759, 1197831, 1195313, 1196837,\n", + " 1198668, 1195989, 1195571, 1196711, 1199823, 1195148, 1195216, 1195265,\n", + " 1195266, 1200765, 1197367, 1197273, 1195038, 1195541, 1199344, 1195790,\n", + " 1199697, 1196393, 1198282, 1199329, 1199060, 1196851, 1194928, 1197574,\n", + " 1199628, 1200079, 1200869, 1200872, 1199038, 1200404, 1199745, 1194786,\n", + " 1200060, 1196508, 1199021, 1197601, 1196727, 1196734, 1196728, 1198428,\n", + " 1200155, 1198811, 1199555, 1198593, 1201156, 1202630, 1202403, 1200991,\n", + " 1201056, 1200918, 1200927, 1199761, 1202640, 1201737, 1200546, 1200430,\n", + " 1197097, 1202541, 1202138, 1197050, 1199099, 1196779, 1201442, 1197945,\n", + " 1202239, 1200899, 1202175, 1195876, 1201291, 1198478, 1203329, 1200398,\n", + " 1198562, 1196966, 1200784, 1199606, 1200578, 1200638, 1195679, 1195664,\n", + " 1203105, 1198929, 1195421, 1195181, 1197816, 1197822, 1197821, 1198966,\n", + " 1203102, 1201138, 1199403, 1201705, 1197735, 1200677, 1201981, 1198819,\n", + " 1197652, 1197335, 1203162, 1198996, 1201966, 1196424], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 2.7172e-02, -1.4960e-04, 4.4823e-01, ..., 6.6421e-02,\n", + " -1.1170e-03, -3.1555e-03],\n", + " [ 6.2826e-02, -2.8651e-04, 3.6665e-01, ..., 9.2633e-02,\n", + " -1.7038e-03, -2.9864e-03],\n", + " [ 6.1958e-02, -1.9628e-05, 3.2213e-01, ..., 6.8326e-02,\n", + " -9.5193e-04, -2.7489e-03],\n", + " ...,\n", + " [ 4.5325e-02, -2.3476e-04, 4.1168e-01, ..., 7.5845e-02,\n", + " -1.2050e-03, -3.0983e-03],\n", + " [ 5.1505e-02, 2.5738e-02, 3.9800e-01, ..., 9.0048e-02,\n", + " -1.2210e-03, -3.1642e-03],\n", + " [ 5.1505e-02, 2.5738e-02, 3.9800e-01, ..., 9.0048e-02,\n", + " -1.2210e-03, -3.1642e-03]], device='cuda:0'), 'paper': tensor([[ 2.0305e+00, -3.0223e-02, 1.0673e+00, ..., -1.3552e-02,\n", + " -2.6856e-02, 2.6805e+00],\n", + " [ 1.3358e+00, -1.4914e-02, 7.8948e-02, ..., -7.2884e-03,\n", + " -1.8496e-02, 1.7187e+00],\n", + " [ 1.0138e+00, -2.0558e-02, -1.2192e-03, ..., -1.0914e-02,\n", + " -1.4670e-02, 1.0882e+00],\n", + " ...,\n", + " [ 1.2266e+00, -3.7221e-02, -1.2622e-03, ..., -1.4983e-02,\n", + " -2.3278e-02, 1.7628e+00],\n", + " [ 1.1380e+00, -2.3346e-02, -2.7090e-03, ..., -1.0340e-02,\n", + " -1.6164e-02, 1.6020e+00],\n", + " [ 1.7877e+00, -2.7260e-02, 5.6755e-01, ..., -6.9712e-03,\n", + " -2.6776e-02, 3.0911e+00]], device='cuda:0'), 'author': tensor([[ 2.1258e-01, -2.3765e-03, 2.7377e-02, ..., 6.6749e-01,\n", + " 2.5377e-01, 3.6475e-01],\n", + " [ 2.5685e-01, -1.5462e-03, -2.6841e-04, ..., 6.3116e-01,\n", + " 1.1901e-01, 2.6296e-01],\n", + " [ 1.0531e-01, -6.0844e-04, 8.5669e-02, ..., 5.8077e-01,\n", + " 1.5370e-01, 1.7482e-01],\n", + " ...,\n", + " [-5.2906e-04, -3.5063e-05, 1.5153e-01, ..., 1.0313e-01,\n", + " -3.1383e-04, -9.0066e-04],\n", + " [ 2.4908e-01, -2.0581e-03, 1.5990e-02, ..., 7.3462e-01,\n", + " 2.1570e-01, 3.1508e-01],\n", + " [ 2.1787e-01, -1.6560e-03, 2.2827e-02, ..., 6.6272e-01,\n", + " 1.8638e-01, 2.8214e-01]], device='cuda:0'), 'field_of_study': tensor([[-1.8953e-03, 1.0615e-01, 9.6194e-02, ..., -2.5267e-03,\n", + " -5.2011e-04, -2.1385e-03],\n", + " [-1.9263e-03, 8.0009e-02, 7.6861e-02, ..., -1.4229e-03,\n", + " -5.3323e-04, -3.0678e-03],\n", + " [-1.8153e-03, 1.6474e-01, 4.2770e-02, ..., -9.3443e-04,\n", + " -3.8356e-04, -3.2467e-03],\n", + " ...,\n", + " [-2.0835e-03, 3.7486e-02, 1.4690e-01, ..., -1.2005e-03,\n", + " -1.1577e-03, -2.6507e-03],\n", + " [-2.0084e-03, -5.4125e-04, 1.0320e-01, ..., -2.5471e-03,\n", + " -1.1708e-04, -2.4887e-03],\n", + " [-1.3804e-03, 5.1979e-02, 1.0758e-01, ..., -3.3926e-03,\n", + " -1.4847e-03, -1.8843e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 167, 131, 31, 198, 92, 40, 64, 78, 13, 13, 13, 13,\n", + " 13, 13, 13, 296, 363, 413, 265, 254, 364, 517, 456, 512,\n", + " 595, 837, 972, 797, 665, 903, 1399, 863, 666, 866, 1062, 1266,\n", + " 1071, 1071, 1071, 1381, 1212, 1314, 1314, 1496, 1186, 1186, 1496, 1496,\n", + " 1390, 1390, 1390, 1498, 1371, 1133, 1520, 1613, 1613, 1390, 1390, 1923,\n", + " 1923, 1847, 1878, 1903, 2021, 2021, 2218, 2082, 2202, 2268, 2112, 2424,\n", + " 2374, 2393, 2393, 2408, 2457, 2780, 2621, 2621, 2621, 2491, 2623, 2532,\n", + " 2532, 2632, 2756, 2751, 2798, 2851, 2825, 2843, 3071, 3298, 3212, 3212,\n", + " 3212, 3212, 3298, 3223, 3223, 3383, 3366, 3438, 3528, 3573, 3758, 3582,\n", + " 3491, 3683, 3683, 3813, 4332, 4378, 4401, 4561, 4420, 4436, 4528, 4422,\n", + " 4650, 4549, 4657, 4632, 4845, 4845, 4642, 4664, 4939, 5030, 5077, 4864,\n", + " 4864, 5148, 5210, 5112, 5045, 5054, 5247, 5331, 5331, 4956, 5220, 5331,\n", + " 5331, 5331, 5259, 5121, 5125, 5317, 5317, 5230, 5330, 5419, 5321, 5433,\n", + " 5436, 5436, 5472, 5596, 5596, 5540, 5542, 5580, 5763, 5797, 5864, 5864,\n", + " 5580, 5580, 5953, 5793, 5868, 5947, 5940, 6002, 6002, 6298, 6298, 6298,\n", + " 5647, 5647, 6022, 6289, 6088, 6323, 6631, 6204, 6553, 6468, 6553, 6531,\n", + " 6531, 6412, 6618, 6729, 6729, 6729, 6783, 6751, 6751, 6902, 6902, 6805,\n", + " 6952, 6561, 6561, 6864, 6787],\n", + " [ 121, 113, 81, 25, 113, 111, 77, 123, 101, 124, 88, 30,\n", + " 68, 50, 65, 59, 68, 74, 68, 22, 96, 97, 106, 125,\n", + " 20, 77, 62, 16, 96, 24, 56, 74, 70, 96, 58, 77,\n", + " 105, 89, 81, 2, 53, 22, 83, 2, 126, 1, 122, 72,\n", + " 74, 98, 76, 109, 10, 47, 45, 68, 120, 54, 20, 132,\n", + " 133, 5, 9, 119, 15, 90, 125, 111, 7, 42, 103, 67,\n", + " 8, 112, 123, 95, 81, 55, 63, 130, 26, 38, 100, 87,\n", + " 78, 87, 35, 127, 45, 68, 20, 107, 99, 22, 128, 3,\n", + " 120, 88, 100, 6, 60, 36, 106, 116, 64, 3, 20, 82,\n", + " 127, 18, 2, 17, 41, 21, 34, 68, 74, 108, 127, 100,\n", + " 21, 131, 22, 73, 105, 89, 71, 94, 84, 20, 29, 85,\n", + " 7, 67, 93, 0, 66, 3, 31, 6, 98, 56, 14, 69,\n", + " 86, 106, 46, 26, 37, 104, 68, 56, 129, 80, 48, 19,\n", + " 12, 3, 40, 11, 68, 51, 61, 68, 20, 52, 68, 107,\n", + " 102, 79, 68, 68, 2, 68, 115, 91, 43, 68, 118, 27,\n", + " 75, 2, 92, 44, 114, 33, 13, 32, 110, 117, 68, 68,\n", + " 26, 56, 49, 68, 26, 118, 23, 28, 68, 68, 77, 4,\n", + " 68, 57, 68, 39, 80]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2674, 1173, 1173, ..., 2710, 4877, 3219],\n", + " [ 60, 24, 77, ..., 5352, 5310, 5267]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 123, 112, 93, 112, 111, 103, 125, 111, 22, 2, 81, 22,\n", + " 74, 103, 74, 111, 125, 96, 96, 93, 111, 21, 108, 125,\n", + " 108, 123, 83, 111, 2, 22, 96, 125, 119, 2, 112, 22,\n", + " 9, 2, 74, 111, 103, 96, 111, 74, 22, 9, 103, 123,\n", + " 123, 103, 111, 125, 123, 81, 123, 2, 103, 125, 68, 2,\n", + " 83, 81, 123, 112, 111, 81, 2, 96, 83, 93, 123, 93,\n", + " 74, 9, 22, 22, 123, 81, 21, 125, 125, 2, 83, 83,\n", + " 125, 103, 119, 81, 123, 103, 112, 21, 96, 9, 112, 2,\n", + " 119, 83, 9, 93, 83, 2, 123, 74, 21, 112, 21, 68,\n", + " 123, 119, 74, 9, 123, 81, 21, 125, 9, 93, 103, 112,\n", + " 2, 103, 108, 81, 68, 74, 81, 81, 9, 2, 2, 112,\n", + " 21, 81, 74, 125, 125, 125, 119, 81, 2, 83, 22, 2,\n", + " 83, 2, 93, 2, 9, 83, 81, 123, 119, 2, 2, 119,\n", + " 108, 93, 112, 96, 2, 93, 123, 123, 74, 103, 83, 96,\n", + " 125, 2, 111, 2, 22, 93, 83, 119, 2, 123, 112, 74,\n", + " 22, 93, 93, 96, 96, 123, 112, 108, 81, 96, 21, 103,\n", + " 2, 74, 111, 9, 21, 2, 108, 103, 83, 21, 96, 74,\n", + " 68, 81, 21, 2, 119, 9, 96, 21, 83, 123, 108, 103,\n", + " 93, 108, 9, 81, 22, 81, 9, 74, 68, 112, 2, 119,\n", + " 74, 93, 74, 119, 21, 81, 93, 112, 112, 83, 123, 9,\n", + " 119, 2, 108, 83, 74, 108, 96, 96, 119, 22, 96, 96,\n", + " 112, 22, 21, 112, 74, 108, 2, 108, 112, 21, 119, 125,\n", + " 123, 123, 96, 22, 68, 108, 119, 68, 96, 21, 22, 119,\n", + " 9, 108, 22, 74, 111, 119, 93, 108, 21, 93, 22, 111,\n", + " 119, 96, 119, 74, 11, 21, 21, 21, 119, 2, 119, 81,\n", + " 112, 111, 83, 21, 83, 111, 2, 83, 108, 108, 83, 83,\n", + " 9, 22, 108, 21, 81, 93, 21, 9, 9, 112, 21, 22,\n", + " 83, 111, 103, 108, 83, 103, 112, 74, 119, 125, 111, 112,\n", + " 96, 11, 125, 96, 125, 108, 103, 123, 9, 68, 83, 21,\n", + " 125, 112, 22, 11, 125, 111, 111, 93, 103, 68, 103, 2,\n", + " 83, 119, 2, 81, 2, 2, 119, 2, 96, 125, 119, 68,\n", + " 9, 9, 2, 11, 68, 2, 68, 68, 2, 112, 125, 68,\n", + " 125, 11, 81, 11, 11, 108, 11, 108, 11, 123, 22, 112,\n", + " 11, 74, 22, 2, 111, 11, 22, 22, 93, 2, 11, 11,\n", + " 108, 2, 68, 68, 2, 125, 93, 2, 81, 2, 11, 103,\n", + " 9, 11, 11, 123, 125, 68, 93, 111, 81, 81, 9, 96,\n", + " 111, 96, 74, 103, 93, 11, 68, 2, 93, 103, 11, 11,\n", + " 11, 74, 11, 111, 111, 108, 74, 68, 93, 68, 11, 11,\n", + " 108, 22, 11, 2, 68, 103, 2, 2, 68, 9, 103, 68,\n", + " 103, 68, 68, 11, 111, 9, 2],\n", + " [ 204, 200, 129, 39, 85, 166, 19, 177, 155, 197, 212, 159,\n", + " 275, 291, 59, 57, 109, 192, 156, 378, 292, 435, 25, 274,\n", + " 302, 800, 83, 329, 244, 353, 384, 466, 232, 542, 559, 570,\n", + " 592, 414, 791, 487, 591, 491, 501, 546, 598, 601, 935, 352,\n", + " 747, 1044, 913, 449, 687, 923, 888, 651, 964, 1041, 772, 524,\n", + " 840, 941, 1151, 970, 1110, 1166, 761, 1170, 1132, 1036, 1046, 1177,\n", + " 1206, 1127, 1181, 1023, 1407, 1279, 1434, 1051, 1252, 1480, 1295, 1385,\n", + " 1343, 1190, 1851, 1514, 1379, 1401, 1361, 1441, 1254, 1577, 1570, 1357,\n", + " 1646, 1827, 1804, 1507, 1544, 1817, 1142, 1473, 1642, 1837, 1500, 1660,\n", + " 1525, 1499, 1431, 1626, 1637, 1764, 1552, 1653, 1595, 1659, 1743, 1624,\n", + " 1839, 1706, 1780, 2037, 1953, 1826, 1724, 1967, 1720, 1963, 1965, 1834,\n", + " 1824, 1971, 2033, 2017, 2337, 2111, 2156, 2008, 2072, 2181, 2420, 2289,\n", + " 2133, 2244, 2186, 2400, 2227, 2417, 2359, 2093, 2269, 2325, 2320, 2484,\n", + " 2419, 2467, 2393, 2537, 2502, 2379, 2481, 2543, 2691, 2615, 2567, 2550,\n", + " 2513, 2633, 2465, 2478, 2719, 2638, 2636, 2681, 2741, 2557, 2557, 2622,\n", + " 2687, 2705, 2745, 2721, 2690, 3081, 3081, 2729, 2683, 3054, 2949, 3014,\n", + " 2884, 2961, 3043, 3070, 3004, 3084, 3184, 3222, 3108, 3105, 2963, 3088,\n", + " 3056, 3122, 2986, 3103, 3193, 3143, 3254, 3258, 3251, 3135, 3391, 3314,\n", + " 3371, 3362, 3202, 3368, 3397, 3541, 3299, 3497, 3425, 3353, 3382, 3663,\n", + " 3493, 3565, 3887, 3445, 3576, 3718, 3575, 3468, 3756, 3633, 4186, 3833,\n", + " 3745, 3668, 3859, 3685, 4052, 4262, 3966, 3899, 4007, 3917, 3828, 3829,\n", + " 4118, 3910, 4036, 3868, 4108, 4014, 4115, 3806, 4041, 4240, 4132, 4218,\n", + " 4313, 4304, 4288, 4281, 4297, 4298, 4271, 4290, 4322, 4307, 4295, 4302,\n", + " 4331, 4348, 4340, 4355, 4345, 4329, 4363, 4343, 4381, 4310, 4371, 4318,\n", + " 4334, 4346, 4352, 4380, 4395, 4473, 4430, 4404, 4445, 4433, 4461, 4429,\n", + " 4477, 4585, 4546, 4418, 4687, 4542, 4719, 4599, 4659, 4594, 4593, 4640,\n", + " 4645, 4509, 4856, 4697, 4774, 4815, 4940, 4686, 4644, 4918, 4972, 4702,\n", + " 5053, 4850, 4936, 4942, 4870, 4989, 4893, 4807, 4979, 4932, 4986, 4886,\n", + " 4998, 4890, 5003, 4903, 5229, 5005, 5014, 4852, 4908, 5200, 5275, 5140,\n", + " 4943, 5333, 5137, 5160, 5115, 5269, 5324, 5074, 5093, 5334, 5418, 5245,\n", + " 5206, 5465, 5161, 5369, 5308, 5343, 5396, 5421, 5366, 5476, 5499, 5489,\n", + " 5401, 5467, 5301, 5572, 5605, 5565, 5415, 5697, 5503, 5600, 5607, 5522,\n", + " 5712, 5618, 5442, 5639, 5860, 5686, 5654, 5731, 5652, 5903, 5569, 5604,\n", + " 5648, 5582, 5894, 5534, 6119, 5669, 5690, 5486, 5609, 6220, 5635, 5521,\n", + " 5881, 5972, 5563, 5899, 5773, 5895, 5997, 6142, 6037, 5949, 5853, 5862,\n", + " 6108, 6436, 6070, 6370, 6396, 5876, 6257, 6455, 6379, 5885, 6078, 6081,\n", + " 6728, 6395, 6227, 6150, 6366, 6241, 6569, 6361, 6232, 6102, 6027, 6393,\n", + " 6275, 5973, 6576, 6185, 6675, 6502, 6580, 6643, 6865, 6932, 6896, 6634,\n", + " 6790, 6889, 6496, 6741, 6934, 6810, 6508, 6867, 6713, 6734, 6905, 6746,\n", + " 6907, 6735, 6898, 6772, 6959, 6933, 6661]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 121, 241, 241, ..., 5253, 5393, 5256],\n", + " [ 240, 310, 158, ..., 90, 70, 301]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 394, 79, 592, ..., 31, 633, 126],\n", + " [ 10, 155, 54, ..., 5318, 5269, 5366]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4184, 5393, 8, ..., 2268, 802, 4096],\n", + " [ 74, 90, 99, ..., 6883, 6876, 6949]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 241, 250, 5, ..., 5356, 5356, 5352],\n", + " [2018, 2423, 3372, ..., 4937, 4970, 3748]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 78, 78, 31, ..., 6783, 6783, 6783],\n", + " [1838, 682, 1633, ..., 2904, 2605, 2757]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.00382\n", + "sampling 0.00374\n", + "noi time: 0.000697\n", + "get_vertex_data call: 0.014134\n", + "noi group time: 0.001838\n", + "eoi_group_time: 0.011061\n", + "second half: 0.11033\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31143, 21459, 17420, ..., 1100728, 1119043, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31143, 21459, 17420, ..., 1100728, 1119043, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1231436, 1230252, 1216134, ..., 1938421, 1936998, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1231436, 1230252, 1216134, ..., 1938421, 1936998, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137202, 1141424, 1136230, 1140284, 1136337, 1135726, 1137780, 1137784,\n", + " 1141756, 1141758, 1137506, 1136215, 1142802, 1139462, 1136965, 1138897,\n", + " 1138903, 1143615, 1139811, 1145363, 1146647, 1139615, 1148987, 1150497,\n", + " 1150507, 1150509, 1142963, 1149216, 1149228, 1142947, 1147473, 1153936,\n", + " 1144636, 1149033, 1135950, 1148345, 1146656, 1150193, 1146472, 1152664,\n", + " 1148546, 1153220, 1147095, 1137220, 1155008, 1139365, 1147202, 1147204,\n", + " 1147211, 1136683, 1134806, 1138742, 1138745, 1151546, 1140535, 1140537,\n", + " 1140539, 1140540, 1137254, 1134735, 1140029, 1140949, 1135367, 1135202,\n", + " 1135210, 1141036, 1136777, 1134794, 1137329, 1157103, 1144791, 1135408,\n", + " 1157397, 1156159, 1148484, 1139161, 1135579, 1135583, 1141086, 1136101,\n", + " 1138514, 1153096, 1137957, 1135522, 1139685, 1138436, 1138440, 1138445,\n", + " 1138449, 1137924, 1136594, 1138847, 1147112, 1135359, 1158984, 1158987,\n", + " 1148531, 1139673, 1139664, 1138069, 1134992, 1142793, 1136555, 1135776,\n", + " 1139755, 1140199, 1158974, 1139315, 1141070, 1144410, 1153543, 1153544,\n", + " 1140034, 1140036, 1136065, 1139933, 1138148, 1146075, 1141985, 1152042,\n", + " 1152044, 1136051, 1137734, 1147327, 1134922, 1136992, 1135549, 1141088,\n", + " 1141095, 1141097, 1141098, 1141100, 1145347, 1145348, 1143767, 1154860,\n", + " 1137297, 1139025, 1140003, 1146844, 1141695, 1139436, 1141224, 1139386,\n", + " 1139730, 1143676, 1144237, 1152731, 1139495, 1144650, 1134987, 1147850,\n", + " 1137074, 1149431, 1138482, 1138490, 1141821, 1145161, 1140173, 1137766,\n", + " 1137762, 1139190, 1138708, 1143107, 1144596, 1142451, 1136867, 1135315,\n", + " 1141398, 1144182, 1150906, 1137375, 1138539, 1137841, 1137848, 1147153,\n", + " 1141365, 1141367, 1153068, 1149088, 1149093, 1149101, 1138292, 1153557,\n", + " 1139508, 1139518, 1139510, 1143779, 1147895, 1139182, 1140976, 1140979,\n", + " 1140990, 1146695, 1143689, 1147050, 1152976, 1142555, 1141925, 1144242,\n", + " 1137149, 1166359, 1150243, 1137570, 1145980, 1142098, 1146024, 1146025,\n", + " 1138085, 1154328, 1141646, 1149928, 1139990, 1146302, 1143293, 1143294,\n", + " 1150424, 1143886, 1147543, 1147540, 1148763, 1147282, 1142816, 1164369,\n", + " 1136330, 1142630, 1149366, 1139417, 1147375, 1146084, 1143051, 1138920,\n", + " 1157720, 1136836, 1136843, 1146105, 1141490, 1144957, 1142148, 1143345,\n", + " 1144766, 1144619, 1144088, 1139982, 1150919, 1146514, 1146523, 1143457,\n", + " 1137703, 1135451, 1149082, 1140364, 1149575, 1143075, 1144219, 1144222,\n", + " 1147999, 1134899, 1134907, 1144013, 1139252, 1147128, 1147131, 1145462,\n", + " 1148704, 1143308, 1148470, 1149718, 1149722, 1147025, 1139549, 1158226,\n", + " 1148359, 1148362, 1154526, 1145240, 1145751, 1142374, 1142369, 1138638,\n", + " 1148387, 1146178, 1146191, 1151242, 1152530, 1152537, 1151179, 1149258,\n", + " 1148940, 1144526, 1151487, 1152031, 1154267, 1145261, 1146723, 1146732,\n", + " 1149597, 1147019, 1147021, 1147023, 1153963, 1158950, 1141949, 1147764,\n", + " 1153574, 1148448, 1147653, 1148288, 1154420, 1158798, 1148180, 1152563,\n", + " 1136247, 1139718, 1146686, 1138414, 1152435, 1144110, 1146547, 1151950,\n", + " 1148204, 1153192, 1153193, 1153188, 1152875, 1147446, 1147442, 1151815,\n", + " 1151816, 1152581, 1151906, 1154183, 1150715, 1141420, 1136002, 1153449,\n", + " 1146265, 1146969, 1146967, 1146623, 1151402, 1152849, 1154052, 1152097,\n", + " 1152099, 1152100, 1146284, 1153030, 1153038, 1137746, 1137755, 1137756,\n", + " 1152622, 1140521, 1157104, 1152754, 1152826, 1155337, 1154123, 1157824,\n", + " 1152673, 1154638, 1164761, 1151617, 1150578, 1145278, 1136131, 1136134,\n", + " 1148916, 1152163, 1152227, 1138991, 1151311, 1152341, 1152344, 1146816,\n", + " 1153297, 1153311, 1138276, 1138281, 1156001, 1136025, 1136028, 1136029,\n", + " 1151188, 1152928, 1151064, 1156387, 1156399, 1154733, 1137545, 1150164,\n", + " 1148040, 1155202, 1161208, 1155223, 1155231, 1145656, 1149794, 1137048,\n", + " 1137053, 1158477, 1177026, 1148628, 1158530, 1137458, 1153869, 1135705,\n", + " 1155376, 1178120, 1142047, 1142387, 1156505, 1152397, 1157064, 1157069,\n", + " 1153881, 1155412, 1155422, 1152833, 1145196, 1137809, 1151257, 1145389,\n", + " 1135729, 1151777, 1147810, 1143010, 1151469, 1139525, 1158304, 1158311,\n", + " 1151340, 1155441, 1153359, 1162120, 1140879, 1154528, 1156919, 1153994,\n", + " 1150494, 1142755, 1142756, 1156207, 1138770, 1157637, 1151379, 1137912,\n", + " 1155375, 1155122, 1152527, 1157183, 1149321, 1149320, 1135406, 1156463,\n", + " 1158096, 1154763, 1155628, 1155631, 1154555, 1158824, 1158325, 1148835,\n", + " 1155646, 1153368, 1143254, 1146941, 1154240, 1154902, 1154909, 1163132,\n", + " 1143531, 1160907, 1150371, 1157439, 1150070, 1141627, 1150990, 1150987,\n", + " 1155281, 1155293, 1159629, 1157934, 1157663, 1158123, 1158126, 1153336,\n", + " 1158996, 1135601, 1145507, 1148149, 1150661, 1150671, 1155853, 1155852,\n", + " 1138215, 1157685, 1149145, 1140633, 1155717, 1152209, 1152220, 1140368,\n", + " 1156017, 1144843, 1155971, 1155975, 1155982, 1161674, 1135196, 1155393,\n", + " 1149700, 1153503, 1136896, 1158815, 1151615, 1136480, 1136494, 1153640,\n", + " 1154393, 1147599, 1155309, 1152130, 1153808, 1163106, 1134757, 1166421,\n", + " 1158558, 1161167, 1138099, 1138110, 1155871, 1154342, 1154340, 1165840,\n", + " 1164276, 1142663, 1150684, 1157747, 1159042, 1159066, 1172273, 1158300,\n", + " 1153052, 1153045, 1171551, 1159731, 1163072, 1156381, 1161935, 1153842,\n", + " 1156107, 1138385, 1138393, 1165244, 1149063, 1149070, 1153519, 1164850,\n", + " 1138161, 1164006, 1156787, 1164911, 1154578, 1139599, 1139592, 1159985,\n", + " 1157355, 1157357, 1164429, 1165306, 1140641, 1140650, 1141867, 1141862,\n", + " 1148600, 1148607, 1164990, 1143139, 1168163, 1163019, 1158653, 1156181,\n", + " 1159025, 1159027, 1159032, 1152247, 1155588, 1165269, 1156589, 1151220,\n", + " 1153935, 1158405, 1144977, 1146510, 1164577, 1161243, 1144739, 1152776,\n", + " 1145139, 1153209, 1141471, 1147426, 1157050, 1157051, 1156737, 1156739,\n", + " 1153663, 1171040, 1144810, 1144812, 1184420, 1167253, 1168860, 1135567,\n", + " 1142733, 1162613, 1145740, 1145743, 1148683, 1165942, 1145228, 1160232,\n", + " 1169282, 1138762, 1144966, 1144972, 1146432, 1166063, 1166053, 1147694,\n", + " 1170502, 1152624, 1155911, 1139345, 1147723, 1145900, 1145902, 1153534,\n", + " 1163961, 1181040, 1143404, 1169738, 1149557, 1158724, 1154076, 1168756,\n", + " 1147338, 1167817, 1144676, 1166653, 1150515, 1156113, 1156119, 1156117,\n", + " 1156118, 1145535, 1154618, 1144336, 1157534, 1147746, 1154670, 1142358,\n", + " 1169162, 1157331, 1151668, 1151669, 1169359, 1154353, 1138609, 1149683,\n", + " 1158611, 1158623, 1173047, 1172753, 1153280, 1159844, 1154869, 1152353,\n", + " 1168413, 1161130, 1165913, 1173307, 1169144, 1183924, 1154027, 1152150,\n", + " 1159655, 1151696, 1157153, 1155468, 1155471, 1157373, 1164689, 1147711,\n", + " 1148131, 1157593, 1166820, 1172961, 1181020, 1172580, 1140326, 1172606,\n", + " 1174845, 1170874, 1150234, 1154151, 1154148, 1149173, 1170465, 1181612,\n", + " 1168481, 1179918, 1151509, 1158031, 1155262, 1154718, 1157792, 1157795,\n", + " 1143341, 1172546, 1171623, 1157126, 1153893, 1154508, 1178538, 1145626,\n", + " 1146252, 1152279, 1165218, 1185317, 1179776, 1190030, 1158512, 1181193,\n", + " 1179997, 1158380, 1155899, 1162986, 1182896, 1164413, 1164788, 1168886,\n", + " 1185696, 1166208, 1164228, 1164231, 1163422, 1163421, 1165444, 1161819,\n", + " 1147182, 1187481, 1181554, 1170417, 1170822, 1139828, 1139831, 1154806,\n", + " 1164927, 1181588, 1151288, 1194356, 1156055, 1146394, 1146395, 1194197,\n", + " 1186525, 1185795, 1194305, 1169954, 1177070, 1171358, 1140997, 1169560,\n", + " 1170150, 1159169, 1162502, 1176041, 1189655, 1179317, 1161865, 1194057,\n", + " 1178135, 1186167, 1188468, 1183805, 1186375, 1186376, 1191310, 1192546,\n", + " 1188348, 1157017], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137202, 1141424, 1136230, 1140284, 1136337, 1135726, 1137780, 1137784,\n", + " 1141756, 1141758, 1137506, 1136215, 1142802, 1139462, 1136965, 1138897,\n", + " 1138903, 1143615, 1139811, 1145363, 1146647, 1139615, 1148987, 1150497,\n", + " 1150507, 1150509, 1142963, 1149216, 1149228, 1142947, 1147473, 1153936,\n", + " 1144636, 1149033, 1135950, 1148345, 1146656, 1150193, 1146472, 1152664,\n", + " 1148546, 1153220, 1147095, 1137220, 1155008, 1139365, 1147202, 1147204,\n", + " 1147211, 1136683, 1134806, 1138742, 1138745, 1151546, 1140535, 1140537,\n", + " 1140539, 1140540, 1137254, 1134735, 1140029, 1140949, 1135367, 1135202,\n", + " 1135210, 1141036, 1136777, 1134794, 1137329, 1157103, 1144791, 1135408,\n", + " 1157397, 1156159, 1148484, 1139161, 1135579, 1135583, 1141086, 1136101,\n", + " 1138514, 1153096, 1137957, 1135522, 1139685, 1138436, 1138440, 1138445,\n", + " 1138449, 1137924, 1136594, 1138847, 1147112, 1135359, 1158984, 1158987,\n", + " 1148531, 1139673, 1139664, 1138069, 1134992, 1142793, 1136555, 1135776,\n", + " 1139755, 1140199, 1158974, 1139315, 1141070, 1144410, 1153543, 1153544,\n", + " 1140034, 1140036, 1136065, 1139933, 1138148, 1146075, 1141985, 1152042,\n", + " 1152044, 1136051, 1137734, 1147327, 1134922, 1136992, 1135549, 1141088,\n", + " 1141095, 1141097, 1141098, 1141100, 1145347, 1145348, 1143767, 1154860,\n", + " 1137297, 1139025, 1140003, 1146844, 1141695, 1139436, 1141224, 1139386,\n", + " 1139730, 1143676, 1144237, 1152731, 1139495, 1144650, 1134987, 1147850,\n", + " 1137074, 1149431, 1138482, 1138490, 1141821, 1145161, 1140173, 1137766,\n", + " 1137762, 1139190, 1138708, 1143107, 1144596, 1142451, 1136867, 1135315,\n", + " 1141398, 1144182, 1150906, 1137375, 1138539, 1137841, 1137848, 1147153,\n", + " 1141365, 1141367, 1153068, 1149088, 1149093, 1149101, 1138292, 1153557,\n", + " 1139508, 1139518, 1139510, 1143779, 1147895, 1139182, 1140976, 1140979,\n", + " 1140990, 1146695, 1143689, 1147050, 1152976, 1142555, 1141925, 1144242,\n", + " 1137149, 1166359, 1150243, 1137570, 1145980, 1142098, 1146024, 1146025,\n", + " 1138085, 1154328, 1141646, 1149928, 1139990, 1146302, 1143293, 1143294,\n", + " 1150424, 1143886, 1147543, 1147540, 1148763, 1147282, 1142816, 1164369,\n", + " 1136330, 1142630, 1149366, 1139417, 1147375, 1146084, 1143051, 1138920,\n", + " 1157720, 1136836, 1136843, 1146105, 1141490, 1144957, 1142148, 1143345,\n", + " 1144766, 1144619, 1144088, 1139982, 1150919, 1146514, 1146523, 1143457,\n", + " 1137703, 1135451, 1149082, 1140364, 1149575, 1143075, 1144219, 1144222,\n", + " 1147999, 1134899, 1134907, 1144013, 1139252, 1147128, 1147131, 1145462,\n", + " 1148704, 1143308, 1148470, 1149718, 1149722, 1147025, 1139549, 1158226,\n", + " 1148359, 1148362, 1154526, 1145240, 1145751, 1142374, 1142369, 1138638,\n", + " 1148387, 1146178, 1146191, 1151242, 1152530, 1152537, 1151179, 1149258,\n", + " 1148940, 1144526, 1151487, 1152031, 1154267, 1145261, 1146723, 1146732,\n", + " 1149597, 1147019, 1147021, 1147023, 1153963, 1158950, 1141949, 1147764,\n", + " 1153574, 1148448, 1147653, 1148288, 1154420, 1158798, 1148180, 1152563,\n", + " 1136247, 1139718, 1146686, 1138414, 1152435, 1144110, 1146547, 1151950,\n", + " 1148204, 1153192, 1153193, 1153188, 1152875, 1147446, 1147442, 1151815,\n", + " 1151816, 1152581, 1151906, 1154183, 1150715, 1141420, 1136002, 1153449,\n", + " 1146265, 1146969, 1146967, 1146623, 1151402, 1152849, 1154052, 1152097,\n", + " 1152099, 1152100, 1146284, 1153030, 1153038, 1137746, 1137755, 1137756,\n", + " 1152622, 1140521, 1157104, 1152754, 1152826, 1155337, 1154123, 1157824,\n", + " 1152673, 1154638, 1164761, 1151617, 1150578, 1145278, 1136131, 1136134,\n", + " 1148916, 1152163, 1152227, 1138991, 1151311, 1152341, 1152344, 1146816,\n", + " 1153297, 1153311, 1138276, 1138281, 1156001, 1136025, 1136028, 1136029,\n", + " 1151188, 1152928, 1151064, 1156387, 1156399, 1154733, 1137545, 1150164,\n", + " 1148040, 1155202, 1161208, 1155223, 1155231, 1145656, 1149794, 1137048,\n", + " 1137053, 1158477, 1177026, 1148628, 1158530, 1137458, 1153869, 1135705,\n", + " 1155376, 1178120, 1142047, 1142387, 1156505, 1152397, 1157064, 1157069,\n", + " 1153881, 1155412, 1155422, 1152833, 1145196, 1137809, 1151257, 1145389,\n", + " 1135729, 1151777, 1147810, 1143010, 1151469, 1139525, 1158304, 1158311,\n", + " 1151340, 1155441, 1153359, 1162120, 1140879, 1154528, 1156919, 1153994,\n", + " 1150494, 1142755, 1142756, 1156207, 1138770, 1157637, 1151379, 1137912,\n", + " 1155375, 1155122, 1152527, 1157183, 1149321, 1149320, 1135406, 1156463,\n", + " 1158096, 1154763, 1155628, 1155631, 1154555, 1158824, 1158325, 1148835,\n", + " 1155646, 1153368, 1143254, 1146941, 1154240, 1154902, 1154909, 1163132,\n", + " 1143531, 1160907, 1150371, 1157439, 1150070, 1141627, 1150990, 1150987,\n", + " 1155281, 1155293, 1159629, 1157934, 1157663, 1158123, 1158126, 1153336,\n", + " 1158996, 1135601, 1145507, 1148149, 1150661, 1150671, 1155853, 1155852,\n", + " 1138215, 1157685, 1149145, 1140633, 1155717, 1152209, 1152220, 1140368,\n", + " 1156017, 1144843, 1155971, 1155975, 1155982, 1161674, 1135196, 1155393,\n", + " 1149700, 1153503, 1136896, 1158815, 1151615, 1136480, 1136494, 1153640,\n", + " 1154393, 1147599, 1155309, 1152130, 1153808, 1163106, 1134757, 1166421,\n", + " 1158558, 1161167, 1138099, 1138110, 1155871, 1154342, 1154340, 1165840,\n", + " 1164276, 1142663, 1150684, 1157747, 1159042, 1159066, 1172273, 1158300,\n", + " 1153052, 1153045, 1171551, 1159731, 1163072, 1156381, 1161935, 1153842,\n", + " 1156107, 1138385, 1138393, 1165244, 1149063, 1149070, 1153519, 1164850,\n", + " 1138161, 1164006, 1156787, 1164911, 1154578, 1139599, 1139592, 1159985,\n", + " 1157355, 1157357, 1164429, 1165306, 1140641, 1140650, 1141867, 1141862,\n", + " 1148600, 1148607, 1164990, 1143139, 1168163, 1163019, 1158653, 1156181,\n", + " 1159025, 1159027, 1159032, 1152247, 1155588, 1165269, 1156589, 1151220,\n", + " 1153935, 1158405, 1144977, 1146510, 1164577, 1161243, 1144739, 1152776,\n", + " 1145139, 1153209, 1141471, 1147426, 1157050, 1157051, 1156737, 1156739,\n", + " 1153663, 1171040, 1144810, 1144812, 1184420, 1167253, 1168860, 1135567,\n", + " 1142733, 1162613, 1145740, 1145743, 1148683, 1165942, 1145228, 1160232,\n", + " 1169282, 1138762, 1144966, 1144972, 1146432, 1166063, 1166053, 1147694,\n", + " 1170502, 1152624, 1155911, 1139345, 1147723, 1145900, 1145902, 1153534,\n", + " 1163961, 1181040, 1143404, 1169738, 1149557, 1158724, 1154076, 1168756,\n", + " 1147338, 1167817, 1144676, 1166653, 1150515, 1156113, 1156119, 1156117,\n", + " 1156118, 1145535, 1154618, 1144336, 1157534, 1147746, 1154670, 1142358,\n", + " 1169162, 1157331, 1151668, 1151669, 1169359, 1154353, 1138609, 1149683,\n", + " 1158611, 1158623, 1173047, 1172753, 1153280, 1159844, 1154869, 1152353,\n", + " 1168413, 1161130, 1165913, 1173307, 1169144, 1183924, 1154027, 1152150,\n", + " 1159655, 1151696, 1157153, 1155468, 1155471, 1157373, 1164689, 1147711,\n", + " 1148131, 1157593, 1166820, 1172961, 1181020, 1172580, 1140326, 1172606,\n", + " 1174845, 1170874, 1150234, 1154151, 1154148, 1149173, 1170465, 1181612,\n", + " 1168481, 1179918, 1151509, 1158031, 1155262, 1154718, 1157792, 1157795,\n", + " 1143341, 1172546, 1171623, 1157126, 1153893, 1154508, 1178538, 1145626,\n", + " 1146252, 1152279, 1165218, 1185317, 1179776, 1190030, 1158512, 1181193,\n", + " 1179997, 1158380, 1155899, 1162986, 1182896, 1164413, 1164788, 1168886,\n", + " 1185696, 1166208, 1164228, 1164231, 1163422, 1163421, 1165444, 1161819,\n", + " 1147182, 1187481, 1181554, 1170417, 1170822, 1139828, 1139831, 1154806,\n", + " 1164927, 1181588, 1151288, 1194356, 1156055, 1146394, 1146395, 1194197,\n", + " 1186525, 1185795, 1194305, 1169954, 1177070, 1171358, 1140997, 1169560,\n", + " 1170150, 1159169, 1162502, 1176041, 1189655, 1179317, 1161865, 1194057,\n", + " 1178135, 1186167, 1188468, 1183805, 1186375, 1186376, 1191310, 1192546,\n", + " 1188348, 1157017], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197841, 1199439, 1199282, 1198449, 1198459, 1198832, 1194626,\n", + " 1197791, 1201016, 1197351, 1196956, 1202804, 1198557, 1196685, 1194783,\n", + " 1196588, 1195263, 1197921, 1201989, 1201992, 1196031, 1198542, 1197698,\n", + " 1194952, 1194882, 1195888, 1195895, 1196911, 1199171, 1196334, 1196618,\n", + " 1197831, 1195313, 1196835, 1196840, 1196171, 1198042, 1198958, 1196711,\n", + " 1196717, 1199823, 1195221, 1195216, 1195279, 1197273, 1196109, 1196742,\n", + " 1195847, 1195541, 1197478, 1197184, 1195917, 1196393, 1196272, 1198282,\n", + " 1199060, 1197282, 1197291, 1199628, 1202381, 1197994, 1200866, 1200872,\n", + " 1199024, 1199231, 1194786, 1201511, 1196498, 1196508, 1197970, 1195807,\n", + " 1197601, 1196727, 1195771, 1202618, 1200887, 1198432, 1200023, 1200154,\n", + " 1202390, 1198811, 1199555, 1200614, 1199083, 1201824, 1202423, 1200452,\n", + " 1200507, 1201421, 1201079, 1201156, 1202627, 1200991, 1201056, 1200927,\n", + " 1194803, 1199546, 1202640, 1202641, 1201045, 1203071, 1200429, 1201752,\n", + " 1200858, 1196883, 1201442, 1202239, 1201291, 1198472, 1195607, 1201590,\n", + " 1199925, 1198562, 1199606, 1195664, 1198911, 1201789, 1195181, 1197816,\n", + " 1197822, 1201482, 1196602, 1197528, 1198973, 1203102, 1201138, 1198147,\n", + " 1198824, 1197735, 1199782, 1198819, 1195070, 1201886, 1197652, 1194908],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197841, 1199439, 1199282, 1198449, 1198459, 1198832, 1194626,\n", + " 1197791, 1201016, 1197351, 1196956, 1202804, 1198557, 1196685, 1194783,\n", + " 1196588, 1195263, 1197921, 1201989, 1201992, 1196031, 1198542, 1197698,\n", + " 1194952, 1194882, 1195888, 1195895, 1196911, 1199171, 1196334, 1196618,\n", + " 1197831, 1195313, 1196835, 1196840, 1196171, 1198042, 1198958, 1196711,\n", + " 1196717, 1199823, 1195221, 1195216, 1195279, 1197273, 1196109, 1196742,\n", + " 1195847, 1195541, 1197478, 1197184, 1195917, 1196393, 1196272, 1198282,\n", + " 1199060, 1197282, 1197291, 1199628, 1202381, 1197994, 1200866, 1200872,\n", + " 1199024, 1199231, 1194786, 1201511, 1196498, 1196508, 1197970, 1195807,\n", + " 1197601, 1196727, 1195771, 1202618, 1200887, 1198432, 1200023, 1200154,\n", + " 1202390, 1198811, 1199555, 1200614, 1199083, 1201824, 1202423, 1200452,\n", + " 1200507, 1201421, 1201079, 1201156, 1202627, 1200991, 1201056, 1200927,\n", + " 1194803, 1199546, 1202640, 1202641, 1201045, 1203071, 1200429, 1201752,\n", + " 1200858, 1196883, 1201442, 1202239, 1201291, 1198472, 1195607, 1201590,\n", + " 1199925, 1198562, 1199606, 1195664, 1198911, 1201789, 1195181, 1197816,\n", + " 1197822, 1201482, 1196602, 1197528, 1198973, 1203102, 1201138, 1198147,\n", + " 1198824, 1197735, 1199782, 1198819, 1195070, 1201886, 1197652, 1194908],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.0900e-01, -5.7692e-04, 5.1946e-01, ..., 5.7196e-02,\n", + " -1.1678e-03, -3.9526e-03],\n", + " [ 8.3917e-03, -2.2069e-04, 3.6069e-02, ..., 4.4300e-02,\n", + " -9.3716e-04, -1.3547e-03],\n", + " [ 9.5485e-02, -5.6698e-04, 5.2252e-01, ..., 6.2127e-02,\n", + " -1.2411e-03, -4.0901e-03],\n", + " ...,\n", + " [ 1.1158e-01, -3.5541e-04, 4.6422e-01, ..., 5.8496e-02,\n", + " -1.1308e-03, -3.5337e-03],\n", + " [ 5.9483e-02, -2.6537e-04, 3.9485e-01, ..., 7.1339e-02,\n", + " -1.1839e-03, -3.0229e-03],\n", + " [ 1.6082e-01, -9.7271e-04, 6.0064e-01, ..., 4.2726e-02,\n", + " -1.1160e-03, -4.6733e-03]], device='cuda:0'), 'paper': tensor([[ 1.1228e+00, -2.4469e-02, -3.5189e-04, ..., -1.1005e-02,\n", + " -1.9097e-02, 1.6881e+00],\n", + " [ 8.6348e-01, -2.4940e-02, -3.4540e-03, ..., -1.1819e-02,\n", + " -1.5352e-02, 7.8716e-01],\n", + " [ 9.0738e-01, -1.7202e-02, 1.6415e-01, ..., -1.1844e-02,\n", + " -1.5108e-02, 9.5071e-01],\n", + " ...,\n", + " [ 9.6880e-01, -1.7618e-02, -2.2944e-03, ..., -8.4540e-03,\n", + " -1.4932e-02, 1.3060e+00],\n", + " [ 1.3385e+00, -1.7338e-02, 1.0282e-01, ..., -7.7100e-03,\n", + " -1.9399e-02, 1.8504e+00],\n", + " [ 1.7464e+00, -2.7241e-02, 5.3764e-01, ..., -7.0440e-03,\n", + " -2.6455e-02, 3.0217e+00]], device='cuda:0'), 'author': tensor([[ 1.5858e-01, -1.3389e-03, -2.2141e-04, ..., 6.5163e-01,\n", + " 1.6448e-01, 2.2975e-01],\n", + " [ 1.5049e-01, -7.1166e-04, 1.1932e-01, ..., 7.3439e-01,\n", + " 4.6725e-02, 2.1661e-01],\n", + " [-5.2906e-04, -3.5063e-05, 1.5153e-01, ..., 1.0313e-01,\n", + " -3.1383e-04, -9.0066e-04],\n", + " ...,\n", + " [ 1.6341e-01, -1.0838e-03, 3.8335e-02, ..., 5.7619e-01,\n", + " 1.0776e-01, 2.1942e-01],\n", + " [ 1.7247e-01, -9.3489e-04, 3.9723e-02, ..., 6.3166e-01,\n", + " 1.2342e-01, 2.5083e-01],\n", + " [ 1.7961e-01, -8.6563e-04, 2.3262e-02, ..., 6.1669e-01,\n", + " 1.2614e-01, 2.3377e-01]], device='cuda:0'), 'field_of_study': tensor([[-2.3811e-03, 1.2871e-01, 1.0247e-01, ..., -1.1901e-03,\n", + " -8.6050e-04, -3.4261e-03],\n", + " [-1.9007e-03, 9.5439e-02, 5.5316e-02, ..., -1.5923e-03,\n", + " -6.2444e-04, -3.2142e-03],\n", + " [-1.6774e-03, 1.7984e-01, 6.0521e-02, ..., -1.5818e-03,\n", + " -4.9369e-04, -3.9283e-03],\n", + " ...,\n", + " [-2.3442e-03, 4.8753e-02, 2.5831e-01, ..., -2.7095e-03,\n", + " -1.8063e-04, -2.5560e-03],\n", + " [-1.5374e-03, 7.7362e-02, 2.0310e-01, ..., -3.3440e-03,\n", + " -4.9526e-04, -2.6198e-03],\n", + " [-1.8162e-03, 7.3667e-02, 6.0440e-02, ..., -1.4629e-03,\n", + " -8.4859e-04, -2.8886e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 112, 112, 112, 144, 128, 201, 98, 56, 201, 201, 169, 169,\n", + " 386, 306, 218, 481, 217, 217, 392, 486, 486, 392, 392, 252,\n", + " 719, 544, 711, 590, 678, 802, 803, 803, 803, 803, 1137, 961,\n", + " 875, 893, 893, 1137, 737, 1137, 737, 914, 954, 1037, 1257, 1257,\n", + " 1241, 1257, 1257, 949, 949, 1154, 1154, 1154, 1154, 1154, 1154, 1257,\n", + " 1192, 1192, 1192, 1289, 1289, 1440, 1440, 1488, 1443, 1422, 1668, 1668,\n", + " 1668, 1668, 1409, 1409, 1409, 1638, 1706, 1706, 1691, 1785, 1785, 1925,\n", + " 1787, 1877, 1877, 1843, 1881, 1863, 1864, 1909, 1893, 1893, 1902, 1847,\n", + " 1984, 2071, 2071, 2123, 2289, 2286, 2245, 2341, 2297, 2172, 2172, 2262,\n", + " 2257, 2172, 2172, 2348, 2241, 2236, 2349, 2407, 2444, 2388, 2388, 2388,\n", + " 2388, 2388, 2425, 2439, 2537, 2472, 2759, 2725, 2626, 2692, 2722, 2722,\n", + " 2722, 2722, 2722, 2827, 3056, 3056, 2953, 3164, 3119, 3311, 3335, 3505,\n", + " 3387, 3394, 3562, 3593, 3786, 3786, 3786, 3786, 3786, 3804, 3917, 4064,\n", + " 4122, 4116, 4116, 4194, 4278, 4347, 4399, 4399, 4287, 4422, 4703, 4322,\n", + " 4527, 4527, 4292, 4308, 4480, 4651, 4651, 4641, 4641, 4809, 4565, 4610,\n", + " 4850, 4850, 4830, 4815, 4815, 4815, 4791, 5006, 4959, 4958, 5009, 5009,\n", + " 5000, 5167, 5012, 5276, 5144, 5198, 5211, 5377, 5290, 5321, 5350, 5350,\n", + " 5350, 5231, 5372, 5372, 5861, 5861, 5617, 5617, 5509, 5686, 5686, 5686,\n", + " 5651, 5651, 5651, 5559, 5683, 5683, 5589, 5589, 5589, 5589, 5994, 6305,\n", + " 5968, 5968, 5968, 5768, 5975, 5925, 6154, 6154, 5842, 5842, 6283],\n", + " [ 102, 58, 27, 35, 100, 24, 88, 108, 31, 107, 31, 47,\n", + " 17, 124, 113, 73, 54, 83, 24, 88, 10, 31, 107, 3,\n", + " 80, 73, 70, 89, 60, 103, 107, 31, 86, 24, 96, 116,\n", + " 89, 129, 113, 8, 124, 68, 43, 3, 73, 80, 40, 55,\n", + " 79, 7, 33, 119, 108, 21, 14, 4, 131, 0, 25, 82,\n", + " 77, 104, 42, 71, 64, 112, 117, 80, 19, 73, 61, 127,\n", + " 29, 119, 9, 20, 108, 71, 23, 20, 18, 97, 98, 75,\n", + " 73, 123, 25, 84, 106, 113, 11, 71, 80, 105, 36, 37,\n", + " 134, 80, 105, 37, 78, 114, 37, 36, 54, 13, 2, 54,\n", + " 37, 69, 14, 109, 63, 37, 105, 116, 107, 9, 20, 119,\n", + " 92, 99, 78, 66, 16, 46, 38, 1, 56, 91, 45, 57,\n", + " 125, 65, 134, 107, 104, 42, 50, 78, 25, 116, 48, 28,\n", + " 26, 95, 73, 128, 12, 111, 115, 30, 3, 66, 27, 109,\n", + " 115, 45, 65, 66, 73, 48, 20, 43, 87, 103, 9, 61,\n", + " 22, 48, 15, 72, 6, 25, 5, 52, 62, 135, 133, 85,\n", + " 73, 94, 73, 107, 24, 31, 66, 67, 93, 120, 76, 73,\n", + " 44, 133, 90, 41, 0, 34, 128, 114, 59, 61, 42, 51,\n", + " 104, 108, 39, 73, 67, 121, 45, 65, 74, 9, 101, 122,\n", + " 73, 21, 46, 67, 73, 20, 81, 132, 73, 130, 48, 32,\n", + " 126, 118, 53, 49, 73, 106, 73, 95, 110, 73, 3]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1187, 826, 503, ..., 434, 196, 3797],\n", + " [ 45, 278, 216, ..., 6376, 6389, 6214]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 113, 86, 54, ..., 108, 119, 67],\n", + " [ 60, 94, 163, ..., 6380, 6289, 6124]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 67, 67, 67, ..., 6337, 6342, 6337],\n", + " [ 63, 203, 99, ..., 502, 67, 438]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 212, 212, 508, ..., 176, 540, 354],\n", + " [ 59, 58, 150, ..., 6343, 6323, 6394]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[6304, 5715, 3280, ..., 4296, 5579, 4684],\n", + " [ 38, 46, 4, ..., 6378, 6320, 6348]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 67, 67, 67, ..., 6342, 6261, 6297],\n", + " [3307, 3485, 3012, ..., 3869, 561, 5548]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 62, 62, 62, ..., 6241, 6241, 6241],\n", + " [ 481, 3070, 477, ..., 6198, 2766, 2850]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005936\n", + "sampling 0.005784\n", + "noi time: 0.001557\n", + "get_vertex_data call: 0.025721\n", + "noi group time: 0.00241\n", + "eoi_group_time: 0.01317\n", + "second half: 0.189389\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16691, 32616, 16138, ..., 1103853, 1131749, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16691, 32616, 16138, ..., 1103853, 1131749, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224380, 1224382, 1228009, ..., 1927262, 1929219, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224380, 1224382, 1228009, ..., 1927262, 1929219, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1141424, 1136225, 1136228, 1136237, 1140282, 1140284, 1140285,\n", + " 1135926, 1135933, 1135727, 1137791, 1140785, 1137506, 1137509, 1136969,\n", + " 1149831, 1149839, 1145373, 1137271, 1137274, 1138942, 1145052, 1143362,\n", + " 1143372, 1146646, 1139609, 1150509, 1148576, 1149216, 1149228, 1142958,\n", + " 1155683, 1155689, 1143820, 1147473, 1135999, 1152263, 1144636, 1144632,\n", + " 1146996, 1153008, 1153015, 1134697, 1135111, 1148350, 1148346, 1146669,\n", + " 1150193, 1135475, 1152667, 1148546, 1147091, 1137220, 1155018, 1136680,\n", + " 1150329, 1134717, 1134718, 1137829, 1151546, 1140540, 1138112, 1137254,\n", + " 1138356, 1140147, 1140159, 1135909, 1140020, 1135367, 1135202, 1135204,\n", + " 1140753, 1141036, 1134794, 1157443, 1157447, 1135956, 1136518, 1138510,\n", + " 1137329, 1143069, 1136610, 1136617, 1144392, 1135408, 1157399, 1157393,\n", + " 1157397, 1137441, 1137448, 1156159, 1148481, 1139161, 1135579, 1135583,\n", + " 1135664, 1135670, 1140970, 1138514, 1135499, 1154132, 1135522, 1138440,\n", + " 1138443, 1140066, 1138461, 1138449, 1136594, 1158390, 1149328, 1138846,\n", + " 1135101, 1156606, 1142611, 1142615, 1135359, 1138185, 1145843, 1145845,\n", + " 1148531, 1148533, 1137109, 1141523, 1143586, 1139667, 1138067, 1142255,\n", + " 1136085, 1134992, 1134778, 1136551, 1140199, 1158974, 1139327, 1153543,\n", + " 1140032, 1139929, 1138148, 1140549, 1140550, 1140557, 1152042, 1152044,\n", + " 1137734, 1134742, 1134750, 1135540, 1135549, 1136700, 1141088, 1141095,\n", + " 1141097, 1144128, 1149001, 1139898, 1145346, 1141980, 1142031, 1143767,\n", + " 1154852, 1154855, 1143221, 1143225, 1137670, 1159672, 1149982, 1146832,\n", + " 1152709, 1141695, 1140470, 1139386, 1136917, 1143667, 1143676, 1144237,\n", + " 1140598, 1140597, 1146449, 1141785, 1141786, 1141609, 1144650, 1137074,\n", + " 1142050, 1141821, 1143153, 1139276, 1140173, 1158749, 1149111, 1143568,\n", + " 1141482, 1137061, 1140102, 1143113, 1144442, 1144596, 1136864, 1135315,\n", + " 1140442, 1144182, 1150906, 1161094, 1146193, 1146201, 1137854, 1142640,\n", + " 1141365, 1141367, 1153068, 1141678, 1139022, 1139508, 1139510, 1139763,\n", + " 1143779, 1140976, 1140990, 1146695, 1135046, 1147050, 1147047, 1145873,\n", + " 1149878, 1152976, 1152980, 1135457, 1142555, 1139448, 1141925, 1145332,\n", + " 1141841, 1143643, 1141388, 1143845, 1146024, 1146140, 1141585, 1142533,\n", + " 1141236, 1139990, 1143293, 1143294, 1147538, 1147540, 1148760, 1147282,\n", + " 1142829, 1142816, 1136330, 1143663, 1142637, 1139417, 1147362, 1148003,\n", + " 1136160, 1136161, 1142588, 1138922, 1157720, 1136836, 1141289, 1141496,\n", + " 1139048, 1144957, 1143345, 1144765, 1144753, 1144615, 1145813, 1140844,\n", + " 1135876, 1135818, 1135813, 1150294, 1150919, 1146514, 1146523, 1143957,\n", + " 1143456, 1143457, 1143937, 1143949, 1140817, 1143793, 1146636, 1140364,\n", + " 1149574, 1143082, 1166410, 1147984, 1147995, 1147999, 1139252, 1139249,\n", + " 1148704, 1141327, 1141825, 1146751, 1152323, 1147025, 1147971, 1139549,\n", + " 1158226, 1158235, 1167006, 1143921, 1149871, 1141143, 1141137, 1145240,\n", + " 1145751, 1142376, 1142383, 1146178, 1151242, 1152530, 1152538, 1150437,\n", + " 1150445, 1156468, 1144514, 1144524, 1150339, 1152013, 1151480, 1139919,\n", + " 1146729, 1149586, 1134869, 1140565, 1149535, 1150127, 1147019, 1147021,\n", + " 1153959, 1158950, 1141949, 1141278, 1153574, 1148453, 1147653, 1168497,\n", + " 1168504, 1149412, 1148288, 1148300, 1148623, 1147866, 1154420, 1158794,\n", + " 1151363, 1152561, 1136247, 1139721, 1152484, 1141177, 1157983, 1148729,\n", + " 1144110, 1143893, 1171943, 1141740, 1154166, 1153124, 1153188, 1145111,\n", + " 1152968, 1150935, 1152867, 1152878, 1173078, 1144849, 1150352, 1150356,\n", + " 1146232, 1143129, 1143134, 1147442, 1152580, 1152581, 1172680, 1154183,\n", + " 1141420, 1152790, 1136009, 1136002, 1147737, 1146969, 1146975, 1146967,\n", + " 1156402, 1149359, 1153255, 1146623, 1142988, 1152849, 1152405, 1152409,\n", + " 1152100, 1156325, 1153030, 1153038, 1153039, 1137746, 1146304, 1152622,\n", + " 1140521, 1136402, 1151952, 1152826, 1155337, 1152673, 1139576, 1151627,\n", + " 1151617, 1136798, 1148914, 1148916, 1148921, 1150618, 1152903, 1153311,\n", + " 1138283, 1138279, 1152294, 1136023, 1136028, 1136029, 1158712, 1158704,\n", + " 1140674, 1140687, 1152928, 1151064, 1142777, 1143486, 1137396, 1153909,\n", + " 1166850, 1166853, 1150150, 1150164, 1148040, 1149306, 1149300, 1144659,\n", + " 1137047, 1148628, 1158530, 1158540, 1137458, 1154563, 1157509, 1135707,\n", + " 1155376, 1142047, 1157219, 1158854, 1150877, 1158927, 1157069, 1152833,\n", + " 1145187, 1143491, 1157563, 1150465, 1146851, 1135729, 1138824, 1152185,\n", + " 1156629, 1156638, 1151788, 1153413, 1151469, 1158304, 1158308, 1158311,\n", + " 1151271, 1137979, 1153359, 1162120, 1154529, 1154530, 1154528, 1142758,\n", + " 1156207, 1156271, 1157642, 1151379, 1158638, 1155375, 1155122, 1135396,\n", + " 1135398, 1157898, 1155626, 1155628, 1155631, 1158492, 1156563, 1154547,\n", + " 1155572, 1158824, 1148835, 1155646, 1143262, 1162396, 1154080, 1151327,\n", + " 1179439, 1143189, 1160904, 1153322, 1150073, 1155606, 1155613, 1150983,\n", + " 1155293, 1155282, 1157933, 1137152, 1153781, 1158204, 1137380, 1159116,\n", + " 1177754, 1138269, 1145694, 1145681, 1140918, 1154010, 1134683, 1135601,\n", + " 1148149, 1150661, 1155848, 1158669, 1158656, 1157684, 1140633, 1152209,\n", + " 1152220, 1155439, 1157735, 1157033, 1157031, 1157030, 1144843, 1155975,\n", + " 1156811, 1156812, 1160164, 1136896, 1158760, 1158764, 1158815, 1151615,\n", + " 1136494, 1136491, 1161616, 1159241, 1156665, 1155305, 1153808, 1136640,\n", + " 1136646, 1134757, 1157863, 1153827, 1156516, 1146126, 1138110, 1155521,\n", + " 1155528, 1165852, 1161958, 1135661, 1142663, 1142666, 1167359, 1159042,\n", + " 1159070, 1157944, 1153052, 1153045, 1159731, 1163072, 1144158, 1138396,\n", + " 1138393, 1150046, 1150041, 1149070, 1145948, 1155479, 1153519, 1164857,\n", + " 1138161, 1149956, 1154590, 1148025, 1157357, 1166086, 1146356, 1164048,\n", + " 1140650, 1140643, 1148600, 1148603, 1148607, 1144503, 1151872, 1155816,\n", + " 1156361, 1156355, 1141800, 1158643, 1156181, 1159032, 1159038, 1168044,\n", + " 1169105, 1152247, 1165591, 1143729, 1143743, 1186671, 1155588, 1151220,\n", + " 1138674, 1168426, 1144977, 1147837, 1146510, 1146509, 1161240, 1166881,\n", + " 1155045, 1163522, 1163529, 1165421, 1147426, 1149890, 1156739, 1171040,\n", + " 1144810, 1144812, 1135567, 1164741, 1156300, 1167332, 1162613, 1145176,\n", + " 1148683, 1145557, 1145228, 1154695, 1138944, 1138752, 1144973, 1142132,\n", + " 1160720, 1166054, 1147694, 1145447, 1165746, 1148124, 1147723, 1145902,\n", + " 1181040, 1181049, 1170980, 1158735, 1158722, 1158734, 1168756, 1147338,\n", + " 1145489, 1156308, 1166653, 1169216, 1155172, 1155170, 1150515, 1167915,\n", + " 1156113, 1144346, 1144336, 1157534, 1147746, 1154660, 1154670, 1154893,\n", + " 1157331, 1141043, 1151669, 1151674, 1169359, 1154352, 1146344, 1138609,\n", + " 1158154, 1158611, 1158623, 1158051, 1157384, 1178728, 1154866, 1170275,\n", + " 1152546, 1152550, 1149402, 1172838, 1147513, 1173307, 1180710, 1154027,\n", + " 1154028, 1152150, 1169572, 1151703, 1157153, 1157373, 1157375, 1167232,\n", + " 1167239, 1147711, 1172435, 1151850, 1166820, 1177415, 1167722, 1167889,\n", + " 1140330, 1193970, 1143247, 1172939, 1171823, 1183656, 1150234, 1154151,\n", + " 1165668, 1167517, 1149170, 1169821, 1143279, 1185666, 1153803, 1170520,\n", + " 1153141, 1181746, 1176438, 1180916, 1180918, 1182651, 1158030, 1161255,\n", + " 1176527, 1155262, 1155104, 1186766, 1157792, 1157795, 1143341, 1151488,\n", + " 1171623, 1163572, 1155804, 1157134, 1180036, 1181922, 1184259, 1158253,\n", + " 1154497, 1161846, 1191749, 1164564, 1145626, 1172024, 1182632, 1149755,\n", + " 1153601, 1157761, 1155992, 1158771, 1158779, 1158512, 1158934, 1167638,\n", + " 1155890, 1181973, 1157268, 1182786, 1180491, 1162253, 1180521, 1168621,\n", + " 1160078, 1164232, 1187173, 1165448, 1170336, 1170034, 1168942, 1182158,\n", + " 1182760, 1156528, 1139831, 1154806, 1154812, 1180839, 1164677, 1191674,\n", + " 1151288, 1156055, 1151972, 1151977, 1191714, 1191726, 1149544, 1191968,\n", + " 1188174, 1177482, 1191018, 1190246, 1168678, 1188033, 1140992, 1141001,\n", + " 1171067, 1187629, 1151774, 1189479, 1193564, 1171462, 1171111, 1171201,\n", + " 1170135, 1172429, 1166785, 1179660, 1155962, 1188280, 1177875, 1179769,\n", + " 1178315, 1181113, 1173106, 1192670, 1167471, 1161344, 1184933, 1157008],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1141424, 1136225, 1136228, 1136237, 1140282, 1140284, 1140285,\n", + " 1135926, 1135933, 1135727, 1137791, 1140785, 1137506, 1137509, 1136969,\n", + " 1149831, 1149839, 1145373, 1137271, 1137274, 1138942, 1145052, 1143362,\n", + " 1143372, 1146646, 1139609, 1150509, 1148576, 1149216, 1149228, 1142958,\n", + " 1155683, 1155689, 1143820, 1147473, 1135999, 1152263, 1144636, 1144632,\n", + " 1146996, 1153008, 1153015, 1134697, 1135111, 1148350, 1148346, 1146669,\n", + " 1150193, 1135475, 1152667, 1148546, 1147091, 1137220, 1155018, 1136680,\n", + " 1150329, 1134717, 1134718, 1137829, 1151546, 1140540, 1138112, 1137254,\n", + " 1138356, 1140147, 1140159, 1135909, 1140020, 1135367, 1135202, 1135204,\n", + " 1140753, 1141036, 1134794, 1157443, 1157447, 1135956, 1136518, 1138510,\n", + " 1137329, 1143069, 1136610, 1136617, 1144392, 1135408, 1157399, 1157393,\n", + " 1157397, 1137441, 1137448, 1156159, 1148481, 1139161, 1135579, 1135583,\n", + " 1135664, 1135670, 1140970, 1138514, 1135499, 1154132, 1135522, 1138440,\n", + " 1138443, 1140066, 1138461, 1138449, 1136594, 1158390, 1149328, 1138846,\n", + " 1135101, 1156606, 1142611, 1142615, 1135359, 1138185, 1145843, 1145845,\n", + " 1148531, 1148533, 1137109, 1141523, 1143586, 1139667, 1138067, 1142255,\n", + " 1136085, 1134992, 1134778, 1136551, 1140199, 1158974, 1139327, 1153543,\n", + " 1140032, 1139929, 1138148, 1140549, 1140550, 1140557, 1152042, 1152044,\n", + " 1137734, 1134742, 1134750, 1135540, 1135549, 1136700, 1141088, 1141095,\n", + " 1141097, 1144128, 1149001, 1139898, 1145346, 1141980, 1142031, 1143767,\n", + " 1154852, 1154855, 1143221, 1143225, 1137670, 1159672, 1149982, 1146832,\n", + " 1152709, 1141695, 1140470, 1139386, 1136917, 1143667, 1143676, 1144237,\n", + " 1140598, 1140597, 1146449, 1141785, 1141786, 1141609, 1144650, 1137074,\n", + " 1142050, 1141821, 1143153, 1139276, 1140173, 1158749, 1149111, 1143568,\n", + " 1141482, 1137061, 1140102, 1143113, 1144442, 1144596, 1136864, 1135315,\n", + " 1140442, 1144182, 1150906, 1161094, 1146193, 1146201, 1137854, 1142640,\n", + " 1141365, 1141367, 1153068, 1141678, 1139022, 1139508, 1139510, 1139763,\n", + " 1143779, 1140976, 1140990, 1146695, 1135046, 1147050, 1147047, 1145873,\n", + " 1149878, 1152976, 1152980, 1135457, 1142555, 1139448, 1141925, 1145332,\n", + " 1141841, 1143643, 1141388, 1143845, 1146024, 1146140, 1141585, 1142533,\n", + " 1141236, 1139990, 1143293, 1143294, 1147538, 1147540, 1148760, 1147282,\n", + " 1142829, 1142816, 1136330, 1143663, 1142637, 1139417, 1147362, 1148003,\n", + " 1136160, 1136161, 1142588, 1138922, 1157720, 1136836, 1141289, 1141496,\n", + " 1139048, 1144957, 1143345, 1144765, 1144753, 1144615, 1145813, 1140844,\n", + " 1135876, 1135818, 1135813, 1150294, 1150919, 1146514, 1146523, 1143957,\n", + " 1143456, 1143457, 1143937, 1143949, 1140817, 1143793, 1146636, 1140364,\n", + " 1149574, 1143082, 1166410, 1147984, 1147995, 1147999, 1139252, 1139249,\n", + " 1148704, 1141327, 1141825, 1146751, 1152323, 1147025, 1147971, 1139549,\n", + " 1158226, 1158235, 1167006, 1143921, 1149871, 1141143, 1141137, 1145240,\n", + " 1145751, 1142376, 1142383, 1146178, 1151242, 1152530, 1152538, 1150437,\n", + " 1150445, 1156468, 1144514, 1144524, 1150339, 1152013, 1151480, 1139919,\n", + " 1146729, 1149586, 1134869, 1140565, 1149535, 1150127, 1147019, 1147021,\n", + " 1153959, 1158950, 1141949, 1141278, 1153574, 1148453, 1147653, 1168497,\n", + " 1168504, 1149412, 1148288, 1148300, 1148623, 1147866, 1154420, 1158794,\n", + " 1151363, 1152561, 1136247, 1139721, 1152484, 1141177, 1157983, 1148729,\n", + " 1144110, 1143893, 1171943, 1141740, 1154166, 1153124, 1153188, 1145111,\n", + " 1152968, 1150935, 1152867, 1152878, 1173078, 1144849, 1150352, 1150356,\n", + " 1146232, 1143129, 1143134, 1147442, 1152580, 1152581, 1172680, 1154183,\n", + " 1141420, 1152790, 1136009, 1136002, 1147737, 1146969, 1146975, 1146967,\n", + " 1156402, 1149359, 1153255, 1146623, 1142988, 1152849, 1152405, 1152409,\n", + " 1152100, 1156325, 1153030, 1153038, 1153039, 1137746, 1146304, 1152622,\n", + " 1140521, 1136402, 1151952, 1152826, 1155337, 1152673, 1139576, 1151627,\n", + " 1151617, 1136798, 1148914, 1148916, 1148921, 1150618, 1152903, 1153311,\n", + " 1138283, 1138279, 1152294, 1136023, 1136028, 1136029, 1158712, 1158704,\n", + " 1140674, 1140687, 1152928, 1151064, 1142777, 1143486, 1137396, 1153909,\n", + " 1166850, 1166853, 1150150, 1150164, 1148040, 1149306, 1149300, 1144659,\n", + " 1137047, 1148628, 1158530, 1158540, 1137458, 1154563, 1157509, 1135707,\n", + " 1155376, 1142047, 1157219, 1158854, 1150877, 1158927, 1157069, 1152833,\n", + " 1145187, 1143491, 1157563, 1150465, 1146851, 1135729, 1138824, 1152185,\n", + " 1156629, 1156638, 1151788, 1153413, 1151469, 1158304, 1158308, 1158311,\n", + " 1151271, 1137979, 1153359, 1162120, 1154529, 1154530, 1154528, 1142758,\n", + " 1156207, 1156271, 1157642, 1151379, 1158638, 1155375, 1155122, 1135396,\n", + " 1135398, 1157898, 1155626, 1155628, 1155631, 1158492, 1156563, 1154547,\n", + " 1155572, 1158824, 1148835, 1155646, 1143262, 1162396, 1154080, 1151327,\n", + " 1179439, 1143189, 1160904, 1153322, 1150073, 1155606, 1155613, 1150983,\n", + " 1155293, 1155282, 1157933, 1137152, 1153781, 1158204, 1137380, 1159116,\n", + " 1177754, 1138269, 1145694, 1145681, 1140918, 1154010, 1134683, 1135601,\n", + " 1148149, 1150661, 1155848, 1158669, 1158656, 1157684, 1140633, 1152209,\n", + " 1152220, 1155439, 1157735, 1157033, 1157031, 1157030, 1144843, 1155975,\n", + " 1156811, 1156812, 1160164, 1136896, 1158760, 1158764, 1158815, 1151615,\n", + " 1136494, 1136491, 1161616, 1159241, 1156665, 1155305, 1153808, 1136640,\n", + " 1136646, 1134757, 1157863, 1153827, 1156516, 1146126, 1138110, 1155521,\n", + " 1155528, 1165852, 1161958, 1135661, 1142663, 1142666, 1167359, 1159042,\n", + " 1159070, 1157944, 1153052, 1153045, 1159731, 1163072, 1144158, 1138396,\n", + " 1138393, 1150046, 1150041, 1149070, 1145948, 1155479, 1153519, 1164857,\n", + " 1138161, 1149956, 1154590, 1148025, 1157357, 1166086, 1146356, 1164048,\n", + " 1140650, 1140643, 1148600, 1148603, 1148607, 1144503, 1151872, 1155816,\n", + " 1156361, 1156355, 1141800, 1158643, 1156181, 1159032, 1159038, 1168044,\n", + " 1169105, 1152247, 1165591, 1143729, 1143743, 1186671, 1155588, 1151220,\n", + " 1138674, 1168426, 1144977, 1147837, 1146510, 1146509, 1161240, 1166881,\n", + " 1155045, 1163522, 1163529, 1165421, 1147426, 1149890, 1156739, 1171040,\n", + " 1144810, 1144812, 1135567, 1164741, 1156300, 1167332, 1162613, 1145176,\n", + " 1148683, 1145557, 1145228, 1154695, 1138944, 1138752, 1144973, 1142132,\n", + " 1160720, 1166054, 1147694, 1145447, 1165746, 1148124, 1147723, 1145902,\n", + " 1181040, 1181049, 1170980, 1158735, 1158722, 1158734, 1168756, 1147338,\n", + " 1145489, 1156308, 1166653, 1169216, 1155172, 1155170, 1150515, 1167915,\n", + " 1156113, 1144346, 1144336, 1157534, 1147746, 1154660, 1154670, 1154893,\n", + " 1157331, 1141043, 1151669, 1151674, 1169359, 1154352, 1146344, 1138609,\n", + " 1158154, 1158611, 1158623, 1158051, 1157384, 1178728, 1154866, 1170275,\n", + " 1152546, 1152550, 1149402, 1172838, 1147513, 1173307, 1180710, 1154027,\n", + " 1154028, 1152150, 1169572, 1151703, 1157153, 1157373, 1157375, 1167232,\n", + " 1167239, 1147711, 1172435, 1151850, 1166820, 1177415, 1167722, 1167889,\n", + " 1140330, 1193970, 1143247, 1172939, 1171823, 1183656, 1150234, 1154151,\n", + " 1165668, 1167517, 1149170, 1169821, 1143279, 1185666, 1153803, 1170520,\n", + " 1153141, 1181746, 1176438, 1180916, 1180918, 1182651, 1158030, 1161255,\n", + " 1176527, 1155262, 1155104, 1186766, 1157792, 1157795, 1143341, 1151488,\n", + " 1171623, 1163572, 1155804, 1157134, 1180036, 1181922, 1184259, 1158253,\n", + " 1154497, 1161846, 1191749, 1164564, 1145626, 1172024, 1182632, 1149755,\n", + " 1153601, 1157761, 1155992, 1158771, 1158779, 1158512, 1158934, 1167638,\n", + " 1155890, 1181973, 1157268, 1182786, 1180491, 1162253, 1180521, 1168621,\n", + " 1160078, 1164232, 1187173, 1165448, 1170336, 1170034, 1168942, 1182158,\n", + " 1182760, 1156528, 1139831, 1154806, 1154812, 1180839, 1164677, 1191674,\n", + " 1151288, 1156055, 1151972, 1151977, 1191714, 1191726, 1149544, 1191968,\n", + " 1188174, 1177482, 1191018, 1190246, 1168678, 1188033, 1140992, 1141001,\n", + " 1171067, 1187629, 1151774, 1189479, 1193564, 1171462, 1171111, 1171201,\n", + " 1170135, 1172429, 1166785, 1179660, 1155962, 1188280, 1177875, 1179769,\n", + " 1178315, 1181113, 1173106, 1192670, 1167471, 1161344, 1184933, 1157008],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195202, 1198248, 1197719, 1198730, 1195860, 1199282, 1198449, 1202255,\n", + " 1196199, 1198832, 1201581, 1201582, 1201237, 1194626, 1200650, 1201016,\n", + " 1197359, 1198633, 1198690, 1198694, 1196871, 1198557, 1194866, 1194745,\n", + " 1194770, 1194642, 1195514, 1195263, 1201992, 1197697, 1198095, 1194949,\n", + " 1195459, 1194882, 1195888, 1195892, 1195895, 1197856, 1196991, 1195320,\n", + " 1195325, 1196835, 1197807, 1198363, 1198167, 1199823, 1195148, 1195265,\n", + " 1197136, 1200765, 1196109, 1195841, 1195847, 1195541, 1197474, 1199697,\n", + " 1196272, 1198277, 1200949, 1200950, 1196034, 1197291, 1199185, 1196851,\n", + " 1194928, 1199803, 1197676, 1197990, 1200869, 1198406, 1198404, 1199231,\n", + " 1199745, 1196508, 1196727, 1196734, 1195771, 1198416, 1198428, 1198811,\n", + " 1201534, 1201547, 1201824, 1201179, 1200507, 1198066, 1198593, 1201156,\n", + " 1200918, 1202640, 1199723, 1201041, 1201052, 1200363, 1195685, 1201737,\n", + " 1200521, 1200553, 1200555, 1203071, 1199203, 1201726, 1202542, 1197050,\n", + " 1199908, 1201442, 1201034, 1202239, 1201291, 1198472, 1201871, 1203329,\n", + " 1199922, 1199929, 1200398, 1200784, 1202687, 1195048, 1195679, 1198932,\n", + " 1200276, 1196916, 1197816, 1196414, 1196597, 1196601, 1196602, 1198824,\n", + " 1197735, 1200437, 1198819, 1200468, 1197652, 1195165, 1194911, 1201966,\n", + " 1196424], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195202, 1198248, 1197719, 1198730, 1195860, 1199282, 1198449, 1202255,\n", + " 1196199, 1198832, 1201581, 1201582, 1201237, 1194626, 1200650, 1201016,\n", + " 1197359, 1198633, 1198690, 1198694, 1196871, 1198557, 1194866, 1194745,\n", + " 1194770, 1194642, 1195514, 1195263, 1201992, 1197697, 1198095, 1194949,\n", + " 1195459, 1194882, 1195888, 1195892, 1195895, 1197856, 1196991, 1195320,\n", + " 1195325, 1196835, 1197807, 1198363, 1198167, 1199823, 1195148, 1195265,\n", + " 1197136, 1200765, 1196109, 1195841, 1195847, 1195541, 1197474, 1199697,\n", + " 1196272, 1198277, 1200949, 1200950, 1196034, 1197291, 1199185, 1196851,\n", + " 1194928, 1199803, 1197676, 1197990, 1200869, 1198406, 1198404, 1199231,\n", + " 1199745, 1196508, 1196727, 1196734, 1195771, 1198416, 1198428, 1198811,\n", + " 1201534, 1201547, 1201824, 1201179, 1200507, 1198066, 1198593, 1201156,\n", + " 1200918, 1202640, 1199723, 1201041, 1201052, 1200363, 1195685, 1201737,\n", + " 1200521, 1200553, 1200555, 1203071, 1199203, 1201726, 1202542, 1197050,\n", + " 1199908, 1201442, 1201034, 1202239, 1201291, 1198472, 1201871, 1203329,\n", + " 1199922, 1199929, 1200398, 1200784, 1202687, 1195048, 1195679, 1198932,\n", + " 1200276, 1196916, 1197816, 1196414, 1196597, 1196601, 1196602, 1198824,\n", + " 1197735, 1200437, 1198819, 1200468, 1197652, 1195165, 1194911, 1201966,\n", + " 1196424], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 2.7138e-02, -6.1696e-04, 3.7804e-01, ..., 1.0325e-01,\n", + " -1.3880e-03, -2.9450e-03],\n", + " [ 2.7138e-02, -6.1696e-04, 3.7804e-01, ..., 1.0325e-01,\n", + " -1.3880e-03, -2.9450e-03],\n", + " [ 5.5846e-02, -3.4492e-04, 3.8707e-01, ..., 1.0039e-01,\n", + " -1.4247e-03, -2.9846e-03],\n", + " ...,\n", + " [ 2.2327e-02, -5.4168e-04, 4.1472e-01, ..., 9.0619e-02,\n", + " -1.4061e-03, -2.7496e-03],\n", + " [ 3.8293e-02, -8.6150e-05, 4.0183e-01, ..., 5.8091e-02,\n", + " -8.8304e-04, -2.8101e-03],\n", + " [ 5.8949e-02, 1.0051e-02, 3.8937e-01, ..., 6.3345e-02,\n", + " -7.2892e-04, -2.8255e-03]], device='cuda:0'), 'paper': tensor([[ 1.5903e+00, -3.7227e-02, 1.1655e+00, ..., -1.8782e-02,\n", + " -2.2820e-02, 1.5141e+00],\n", + " [ 1.2453e+00, -2.4418e-02, -1.5972e-03, ..., -1.3805e-02,\n", + " -1.7602e-02, 1.4992e+00],\n", + " [ 1.0289e+00, -1.2315e-02, -1.9489e-03, ..., -6.0432e-03,\n", + " -1.6383e-02, 1.5847e+00],\n", + " ...,\n", + " [ 1.0814e+00, -3.3380e-02, -5.5196e-04, ..., -1.4996e-02,\n", + " -1.8632e-02, 1.0854e+00],\n", + " [ 1.3018e+00, -4.3235e-02, 2.0330e-01, ..., -1.6643e-02,\n", + " -2.3859e-02, 1.3381e+00],\n", + " [ 1.7750e+00, -2.7278e-02, 5.6133e-01, ..., -7.0004e-03,\n", + " -2.6717e-02, 3.0845e+00]], device='cuda:0'), 'author': tensor([[ 7.3294e-02, 9.2627e-02, 1.3633e-01, ..., 5.6504e-01,\n", + " -1.8566e-03, 1.2206e-01],\n", + " [ 1.4592e-01, -9.1699e-04, 6.3076e-02, ..., 6.4091e-01,\n", + " 8.3548e-02, 2.2800e-01],\n", + " [ 1.2843e-01, 5.0141e-04, 9.6644e-02, ..., 5.3670e-01,\n", + " -9.2155e-04, 3.5432e-02],\n", + " ...,\n", + " [ 1.8282e-01, -1.5338e-03, 2.1859e-02, ..., 6.4408e-01,\n", + " 7.0339e-02, 1.9310e-01],\n", + " [-5.2906e-04, -3.5063e-05, 1.5153e-01, ..., 1.0313e-01,\n", + " -3.1383e-04, -9.0066e-04],\n", + " [ 2.0290e-01, -1.4726e-03, 1.3401e-02, ..., 6.5673e-01,\n", + " 9.7264e-02, 2.1126e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0016, 0.0618, 0.1049, ..., -0.0026, -0.0008, -0.0018],\n", + " [-0.0024, 0.1251, 0.0602, ..., -0.0017, -0.0007, -0.0029],\n", + " [-0.0022, 0.1311, 0.0947, ..., -0.0019, -0.0003, -0.0025],\n", + " ...,\n", + " [-0.0012, 0.1178, 0.0154, ..., -0.0021, -0.0009, -0.0030],\n", + " [-0.0028, 0.0595, 0.0781, ..., -0.0016, -0.0010, -0.0027],\n", + " [-0.0014, 0.0628, 0.1768, ..., -0.0037, -0.0016, -0.0014]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 114, 161, 77, 184, 421, 421, 276, 361, 424, 437, 719, 479,\n", + " 470, 445, 394, 233, 279, 622, 622, 574, 1040, 609, 831, 831,\n", + " 1188, 777, 777, 1078, 1103, 1103, 1103, 1052, 1018, 1287, 1230, 1388,\n", + " 1337, 1437, 1334, 1334, 1273, 1273, 1558, 1616, 1658, 1838, 1557, 1679,\n", + " 1845, 1667, 1667, 1779, 1779, 1862, 1635, 1836, 1785, 2022, 1918, 1887,\n", + " 1934, 1934, 1998, 1879, 2119, 2119, 2269, 2269, 2102, 2244, 2285, 2386,\n", + " 2301, 2301, 2301, 2301, 2249, 2250, 2250, 2250, 2493, 2493, 2383, 2601,\n", + " 2689, 2681, 2681, 2681, 2671, 2768, 2768, 2760, 2988, 2768, 2718, 3030,\n", + " 2808, 2808, 2870, 2905, 2942, 3354, 3047, 3132, 3104, 3141, 3204, 3377,\n", + " 3406, 3488, 3570, 3738, 3925, 3925, 3925, 4040, 3696, 4110, 4103, 4103,\n", + " 3751, 3751, 4031, 4234, 4115, 4308, 4308, 4254, 4270, 4299, 4299, 4314,\n", + " 4321, 4320, 4314, 4416, 4408, 4354, 4411, 4609, 4609, 4609, 4499, 4466,\n", + " 4610, 4707, 4801, 4801, 4880, 4801, 4801, 4801, 4801, 4801, 4801, 4801,\n", + " 4801, 4750, 4734, 4974, 4974, 4974, 5238, 5271, 5194, 5194, 5316, 5158,\n", + " 5158, 5136, 5396, 5290, 5290, 5307, 5502, 5619, 5700, 5720, 5537, 5537,\n", + " 5608, 5688, 5642, 5731, 5679, 5679, 5637, 5886, 5899, 5908, 6043, 6215,\n", + " 5932, 6173, 6173, 6321, 6406, 6383, 6299, 6311, 6311, 6408, 6500, 6390,\n", + " 6447],\n", + " [ 7, 74, 50, 15, 78, 110, 87, 135, 40, 107, 120, 107,\n", + " 107, 20, 67, 104, 64, 5, 95, 74, 74, 33, 5, 87,\n", + " 5, 5, 124, 17, 26, 34, 17, 50, 79, 94, 121, 27,\n", + " 136, 18, 82, 87, 21, 27, 16, 86, 93, 80, 124, 45,\n", + " 38, 134, 109, 92, 106, 67, 100, 31, 103, 43, 85, 31,\n", + " 123, 8, 18, 62, 32, 19, 1, 72, 50, 27, 12, 31,\n", + " 29, 107, 74, 23, 88, 56, 0, 88, 9, 119, 103, 68,\n", + " 117, 133, 64, 115, 111, 25, 75, 51, 42, 84, 125, 50,\n", + " 115, 124, 24, 96, 83, 101, 28, 35, 31, 89, 44, 58,\n", + " 27, 28, 70, 33, 65, 102, 17, 78, 39, 118, 21, 35,\n", + " 41, 69, 46, 47, 115, 71, 37, 7, 50, 54, 132, 92,\n", + " 10, 35, 27, 21, 74, 66, 90, 22, 11, 28, 122, 90,\n", + " 114, 76, 131, 98, 105, 74, 127, 112, 130, 73, 53, 52,\n", + " 77, 91, 49, 128, 129, 21, 74, 10, 74, 14, 5, 34,\n", + " 128, 59, 91, 28, 113, 90, 99, 81, 81, 55, 48, 116,\n", + " 19, 2, 57, 81, 73, 74, 74, 13, 60, 4, 58, 30,\n", + " 97, 74, 126, 63, 71, 6, 24, 61, 3, 5, 74, 36,\n", + " 108]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3844, 900, 2247, ..., 6683, 5015, 6126],\n", + " [ 97, 24, 32, ..., 7449, 7639, 7659]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 18, 19, 67, ..., 71, 5, 12],\n", + " [ 110, 91, 186, ..., 6531, 6546, 6366]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 113, 113, 113, ..., 7669, 7577, 7663],\n", + " [ 675, 554, 405, ..., 844, 839, 551]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 141, 817, 200, ..., 285, 780, 296],\n", + " [ 98, 294, 70, ..., 7600, 7667, 7550]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[6120, 4022, 1064, ..., 6832, 6832, 7273],\n", + " [ 10, 98, 122, ..., 6554, 6545, 6554]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 131, 131, 131, ..., 7659, 7659, 7659],\n", + " [2839, 3071, 4113, ..., 6126, 344, 367]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 114, 114, 114, ..., 6421, 6421, 6421],\n", + " [6065, 6174, 6123, ..., 6464, 7265, 6445]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.007188\n", + "sampling 0.007035\n", + "noi time: 0.001465\n", + "get_vertex_data call: 0.031622\n", + "noi group time: 0.004209\n", + "eoi_group_time: 0.018829\n", + "second half: 0.190525\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 18186, 32616, 17409, ..., 1132722, 1120069, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 18186, 32616, 17409, ..., 1132722, 1120069, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1221044, 1203800, ..., 1925034, 1936966, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1221044, 1203800, ..., 1925034, 1936966, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1136228, 1140282, 1140285, 1136337, 1136347, 1135726, 1137783,\n", + " 1137791, 1140785, 1140799, 1141758, 1143615, 1149831, 1139811, 1137271,\n", + " 1145055, 1143372, 1139241, 1139866, 1136959, 1149216, 1143820, 1147473,\n", + " 1147483, 1149283, 1146995, 1135947, 1148548, 1147094, 1155018, 1139365,\n", + " 1139373, 1136677, 1136679, 1136683, 1136685, 1150329, 1152427, 1134709,\n", + " 1140540, 1138112, 1137249, 1137173, 1140020, 1140030, 1140953, 1135367,\n", + " 1135370, 1135202, 1134970, 1141036, 1134794, 1157443, 1136518, 1138504,\n", + " 1136178, 1137693, 1136619, 1135333, 1144786, 1135423, 1157397, 1156159,\n", + " 1141084, 1140970, 1138514, 1138524, 1153098, 1137957, 1137959, 1154132,\n", + " 1156899, 1135522, 1135535, 1139684, 1138305, 1137287, 1138436, 1138440,\n", + " 1138445, 1140071, 1138461, 1149341, 1138844, 1156606, 1147112, 1142611,\n", + " 1135345, 1137109, 1135769, 1139667, 1139673, 1138067, 1138069, 1136085,\n", + " 1134992, 1142434, 1158974, 1159019, 1140046, 1139929, 1139934, 1138148,\n", + " 1152044, 1139069, 1136051, 1136697, 1149001, 1145357, 1141971, 1136392,\n", + " 1143767, 1143775, 1154860, 1143221, 1143225, 1137670, 1139025, 1152709,\n", + " 1141695, 1141690, 1135861, 1154467, 1141224, 1139386, 1136917, 1143676,\n", + " 1137188, 1145071, 1140599, 1141785, 1139494, 1136752, 1144650, 1144641,\n", + " 1134985, 1147850, 1158749, 1138469, 1149108, 1149111, 1141479, 1140110,\n", + " 1138423, 1143113, 1144432, 1144442, 1144596, 1136864, 1145298, 1135327,\n", + " 1144182, 1150906, 1161092, 1161093, 1161095, 1146194, 1139559, 1147153,\n", + " 1136378, 1162804, 1141365, 1141367, 1153068, 1141678, 1149097, 1149101,\n", + " 1144279, 1139508, 1139763, 1139127, 1145001, 1144996, 1140619, 1139171,\n", + " 1140990, 1147050, 1147047, 1145873, 1145886, 1145887, 1152976, 1135457,\n", + " 1141925, 1140580, 1150692, 1148306, 1139405, 1134861, 1143845, 1146014,\n", + " 1136287, 1146024, 1146140, 1141585, 1142533, 1149928, 1141235, 1139990,\n", + " 1143293, 1150424, 1147543, 1147540, 1147282, 1142816, 1142637, 1139417,\n", + " 1139418, 1146091, 1143049, 1143051, 1143052, 1148408, 1138923, 1138927,\n", + " 1136836, 1139296, 1139328, 1142149, 1143345, 1144765, 1144766, 1144611,\n", + " 1137098, 1135876, 1150917, 1146523, 1143456, 1143457, 1137703, 1147574,\n", + " 1155700, 1146634, 1140364, 1144725, 1147999, 1144013, 1147131, 1147244,\n", + " 1148704, 1146745, 1147056, 1147025, 1147027, 1139549, 1158226, 1141137,\n", + " 1145240, 1145246, 1145751, 1145752, 1142370, 1138638, 1151242, 1152530,\n", + " 1150438, 1150445, 1151856, 1149791, 1149777, 1144514, 1144526, 1151997,\n", + " 1147794, 1147796, 1151480, 1154263, 1145256, 1145262, 1147023, 1141949,\n", + " 1151795, 1147653, 1147659, 1143560, 1149412, 1148288, 1148299, 1148300,\n", + " 1150849, 1135079, 1147866, 1154420, 1148180, 1139721, 1146676, 1138867,\n", + " 1141172, 1152436, 1157968, 1148729, 1146544, 1150057, 1166312, 1148204,\n", + " 1153123, 1153124, 1153188, 1145104, 1167960, 1150935, 1173078, 1141022,\n", + " 1147442, 1151816, 1152581, 1135311, 1151906, 1154182, 1148498, 1141420,\n", + " 1136002, 1150630, 1150637, 1146268, 1148949, 1156402, 1146623, 1144476,\n", + " 1152415, 1168005, 1154063, 1146280, 1153038, 1137746, 1146304, 1152622,\n", + " 1152826, 1155337, 1154123, 1152673, 1154636, 1151617, 1151623, 1151629,\n", + " 1150586, 1136132, 1148914, 1152958, 1145952, 1145957, 1152903, 1152341,\n", + " 1138281, 1136028, 1158704, 1156621, 1152928, 1151064, 1154733, 1143483,\n", + " 1143486, 1148033, 1148040, 1160866, 1149798, 1148628, 1158540, 1148369,\n", + " 1157507, 1147641, 1142041, 1154377, 1158860, 1155418, 1135729, 1152179,\n", + " 1135644, 1157784, 1158306, 1158308, 1158311, 1155441, 1155452, 1162114,\n", + " 1145771, 1156919, 1142758, 1156207, 1156265, 1156269, 1155122, 1149519,\n", + " 1155755, 1156463, 1158096, 1158104, 1168230, 1155678, 1155628, 1156563,\n", + " 1154549, 1154555, 1155572, 1158824, 1158323, 1148654, 1155646, 1154644,\n", + " 1161282, 1156711, 1154906, 1154909, 1143189, 1143521, 1153326, 1157430,\n", + " 1155281, 1151031, 1158204, 1158084, 1159116, 1159106, 1138269, 1145681,\n", + " 1134677, 1134685, 1135601, 1135611, 1145507, 1178445, 1148149, 1148159,\n", + " 1155848, 1157684, 1149137, 1149145, 1152209, 1140370, 1140381, 1151093,\n", + " 1144843, 1142469, 1155971, 1155975, 1154682, 1156948, 1161667, 1158846,\n", + " 1156812, 1155393, 1149696, 1154600, 1155940, 1160163, 1136896, 1158883,\n", + " 1158886, 1158444, 1156778, 1151615, 1136480, 1136494, 1136491, 1159241,\n", + " 1154393, 1156668, 1156488, 1153808, 1136640, 1136646, 1157858, 1158558,\n", + " 1146126, 1165778, 1161539, 1142487, 1142493, 1159042, 1163266, 1158303,\n", + " 1157944, 1157945, 1153052, 1153045, 1184453, 1171551, 1155763, 1156235,\n", + " 1153842, 1156104, 1138393, 1150046, 1149063, 1155476, 1155479, 1153514,\n", + " 1147304, 1147300, 1161652, 1138161, 1165382, 1168327, 1154590, 1160758,\n", + " 1139281, 1159985, 1162742, 1157351, 1146063, 1171249, 1171259, 1164048,\n", + " 1165306, 1140650, 1140643, 1143143, 1143151, 1151882, 1185124, 1141800,\n", + " 1158643, 1159025, 1159037, 1168134, 1165604, 1169104, 1152247, 1144487,\n", + " 1155588, 1156589, 1151220, 1144977, 1146500, 1144739, 1155054, 1165415,\n", + " 1153201, 1141471, 1151650, 1147426, 1159386, 1156739, 1153663, 1144812,\n", + " 1162085, 1135567, 1165713, 1165718, 1142733, 1156303, 1145728, 1145176,\n", + " 1148683, 1165943, 1163935, 1145228, 1169284, 1154693, 1154695, 1144973,\n", + " 1168710, 1165746, 1145902, 1153520, 1143397, 1143404, 1154076, 1147341,\n", + " 1151598, 1169602, 1166653, 1155170, 1166195, 1145531, 1144336, 1138376,\n", + " 1154656, 1154670, 1193076, 1153001, 1157331, 1151668, 1169359, 1149442,\n", + " 1138609, 1171529, 1149695, 1158623, 1149847, 1155489, 1152360, 1143172,\n", + " 1168400, 1168059, 1149402, 1148335, 1148325, 1173307, 1169144, 1152150,\n", + " 1159655, 1157153, 1155471, 1157373, 1147711, 1151852, 1157593, 1170490,\n", + " 1166820, 1166823, 1166827, 1141539, 1169032, 1155738, 1163993, 1170554,\n", + " 1171823, 1182131, 1154148, 1179965, 1149169, 1186117, 1165956, 1168481,\n", + " 1179243, 1171302, 1181241, 1153803, 1164818, 1185146, 1184093, 1161255,\n", + " 1176794, 1157792, 1157798, 1157795, 1171623, 1157134, 1162828, 1178706,\n", + " 1164563, 1145626, 1156432, 1149755, 1146242, 1153609, 1155990, 1163192,\n", + " 1158779, 1158512, 1158513, 1166172, 1179068, 1158379, 1155892, 1155899,\n", + " 1155902, 1164798, 1159329, 1168621, 1162480, 1164256, 1164271, 1183826,\n", + " 1186270, 1170336, 1186363, 1170041, 1192746, 1139828, 1139831, 1150265,\n", + " 1154812, 1156049, 1156055, 1190261, 1151978, 1173058, 1190925, 1149544,\n", + " 1191512, 1140993, 1140996, 1162156, 1188593, 1151774, 1153733, 1193039,\n", + " 1171201, 1150400, 1172122, 1158070, 1158066, 1152080, 1155962, 1169831,\n", + " 1194262, 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1136228, 1140282, 1140285, 1136337, 1136347, 1135726, 1137783,\n", + " 1137791, 1140785, 1140799, 1141758, 1143615, 1149831, 1139811, 1137271,\n", + " 1145055, 1143372, 1139241, 1139866, 1136959, 1149216, 1143820, 1147473,\n", + " 1147483, 1149283, 1146995, 1135947, 1148548, 1147094, 1155018, 1139365,\n", + " 1139373, 1136677, 1136679, 1136683, 1136685, 1150329, 1152427, 1134709,\n", + " 1140540, 1138112, 1137249, 1137173, 1140020, 1140030, 1140953, 1135367,\n", + " 1135370, 1135202, 1134970, 1141036, 1134794, 1157443, 1136518, 1138504,\n", + " 1136178, 1137693, 1136619, 1135333, 1144786, 1135423, 1157397, 1156159,\n", + " 1141084, 1140970, 1138514, 1138524, 1153098, 1137957, 1137959, 1154132,\n", + " 1156899, 1135522, 1135535, 1139684, 1138305, 1137287, 1138436, 1138440,\n", + " 1138445, 1140071, 1138461, 1149341, 1138844, 1156606, 1147112, 1142611,\n", + " 1135345, 1137109, 1135769, 1139667, 1139673, 1138067, 1138069, 1136085,\n", + " 1134992, 1142434, 1158974, 1159019, 1140046, 1139929, 1139934, 1138148,\n", + " 1152044, 1139069, 1136051, 1136697, 1149001, 1145357, 1141971, 1136392,\n", + " 1143767, 1143775, 1154860, 1143221, 1143225, 1137670, 1139025, 1152709,\n", + " 1141695, 1141690, 1135861, 1154467, 1141224, 1139386, 1136917, 1143676,\n", + " 1137188, 1145071, 1140599, 1141785, 1139494, 1136752, 1144650, 1144641,\n", + " 1134985, 1147850, 1158749, 1138469, 1149108, 1149111, 1141479, 1140110,\n", + " 1138423, 1143113, 1144432, 1144442, 1144596, 1136864, 1145298, 1135327,\n", + " 1144182, 1150906, 1161092, 1161093, 1161095, 1146194, 1139559, 1147153,\n", + " 1136378, 1162804, 1141365, 1141367, 1153068, 1141678, 1149097, 1149101,\n", + " 1144279, 1139508, 1139763, 1139127, 1145001, 1144996, 1140619, 1139171,\n", + " 1140990, 1147050, 1147047, 1145873, 1145886, 1145887, 1152976, 1135457,\n", + " 1141925, 1140580, 1150692, 1148306, 1139405, 1134861, 1143845, 1146014,\n", + " 1136287, 1146024, 1146140, 1141585, 1142533, 1149928, 1141235, 1139990,\n", + " 1143293, 1150424, 1147543, 1147540, 1147282, 1142816, 1142637, 1139417,\n", + " 1139418, 1146091, 1143049, 1143051, 1143052, 1148408, 1138923, 1138927,\n", + " 1136836, 1139296, 1139328, 1142149, 1143345, 1144765, 1144766, 1144611,\n", + " 1137098, 1135876, 1150917, 1146523, 1143456, 1143457, 1137703, 1147574,\n", + " 1155700, 1146634, 1140364, 1144725, 1147999, 1144013, 1147131, 1147244,\n", + " 1148704, 1146745, 1147056, 1147025, 1147027, 1139549, 1158226, 1141137,\n", + " 1145240, 1145246, 1145751, 1145752, 1142370, 1138638, 1151242, 1152530,\n", + " 1150438, 1150445, 1151856, 1149791, 1149777, 1144514, 1144526, 1151997,\n", + " 1147794, 1147796, 1151480, 1154263, 1145256, 1145262, 1147023, 1141949,\n", + " 1151795, 1147653, 1147659, 1143560, 1149412, 1148288, 1148299, 1148300,\n", + " 1150849, 1135079, 1147866, 1154420, 1148180, 1139721, 1146676, 1138867,\n", + " 1141172, 1152436, 1157968, 1148729, 1146544, 1150057, 1166312, 1148204,\n", + " 1153123, 1153124, 1153188, 1145104, 1167960, 1150935, 1173078, 1141022,\n", + " 1147442, 1151816, 1152581, 1135311, 1151906, 1154182, 1148498, 1141420,\n", + " 1136002, 1150630, 1150637, 1146268, 1148949, 1156402, 1146623, 1144476,\n", + " 1152415, 1168005, 1154063, 1146280, 1153038, 1137746, 1146304, 1152622,\n", + " 1152826, 1155337, 1154123, 1152673, 1154636, 1151617, 1151623, 1151629,\n", + " 1150586, 1136132, 1148914, 1152958, 1145952, 1145957, 1152903, 1152341,\n", + " 1138281, 1136028, 1158704, 1156621, 1152928, 1151064, 1154733, 1143483,\n", + " 1143486, 1148033, 1148040, 1160866, 1149798, 1148628, 1158540, 1148369,\n", + " 1157507, 1147641, 1142041, 1154377, 1158860, 1155418, 1135729, 1152179,\n", + " 1135644, 1157784, 1158306, 1158308, 1158311, 1155441, 1155452, 1162114,\n", + " 1145771, 1156919, 1142758, 1156207, 1156265, 1156269, 1155122, 1149519,\n", + " 1155755, 1156463, 1158096, 1158104, 1168230, 1155678, 1155628, 1156563,\n", + " 1154549, 1154555, 1155572, 1158824, 1158323, 1148654, 1155646, 1154644,\n", + " 1161282, 1156711, 1154906, 1154909, 1143189, 1143521, 1153326, 1157430,\n", + " 1155281, 1151031, 1158204, 1158084, 1159116, 1159106, 1138269, 1145681,\n", + " 1134677, 1134685, 1135601, 1135611, 1145507, 1178445, 1148149, 1148159,\n", + " 1155848, 1157684, 1149137, 1149145, 1152209, 1140370, 1140381, 1151093,\n", + " 1144843, 1142469, 1155971, 1155975, 1154682, 1156948, 1161667, 1158846,\n", + " 1156812, 1155393, 1149696, 1154600, 1155940, 1160163, 1136896, 1158883,\n", + " 1158886, 1158444, 1156778, 1151615, 1136480, 1136494, 1136491, 1159241,\n", + " 1154393, 1156668, 1156488, 1153808, 1136640, 1136646, 1157858, 1158558,\n", + " 1146126, 1165778, 1161539, 1142487, 1142493, 1159042, 1163266, 1158303,\n", + " 1157944, 1157945, 1153052, 1153045, 1184453, 1171551, 1155763, 1156235,\n", + " 1153842, 1156104, 1138393, 1150046, 1149063, 1155476, 1155479, 1153514,\n", + " 1147304, 1147300, 1161652, 1138161, 1165382, 1168327, 1154590, 1160758,\n", + " 1139281, 1159985, 1162742, 1157351, 1146063, 1171249, 1171259, 1164048,\n", + " 1165306, 1140650, 1140643, 1143143, 1143151, 1151882, 1185124, 1141800,\n", + " 1158643, 1159025, 1159037, 1168134, 1165604, 1169104, 1152247, 1144487,\n", + " 1155588, 1156589, 1151220, 1144977, 1146500, 1144739, 1155054, 1165415,\n", + " 1153201, 1141471, 1151650, 1147426, 1159386, 1156739, 1153663, 1144812,\n", + " 1162085, 1135567, 1165713, 1165718, 1142733, 1156303, 1145728, 1145176,\n", + " 1148683, 1165943, 1163935, 1145228, 1169284, 1154693, 1154695, 1144973,\n", + " 1168710, 1165746, 1145902, 1153520, 1143397, 1143404, 1154076, 1147341,\n", + " 1151598, 1169602, 1166653, 1155170, 1166195, 1145531, 1144336, 1138376,\n", + " 1154656, 1154670, 1193076, 1153001, 1157331, 1151668, 1169359, 1149442,\n", + " 1138609, 1171529, 1149695, 1158623, 1149847, 1155489, 1152360, 1143172,\n", + " 1168400, 1168059, 1149402, 1148335, 1148325, 1173307, 1169144, 1152150,\n", + " 1159655, 1157153, 1155471, 1157373, 1147711, 1151852, 1157593, 1170490,\n", + " 1166820, 1166823, 1166827, 1141539, 1169032, 1155738, 1163993, 1170554,\n", + " 1171823, 1182131, 1154148, 1179965, 1149169, 1186117, 1165956, 1168481,\n", + " 1179243, 1171302, 1181241, 1153803, 1164818, 1185146, 1184093, 1161255,\n", + " 1176794, 1157792, 1157798, 1157795, 1171623, 1157134, 1162828, 1178706,\n", + " 1164563, 1145626, 1156432, 1149755, 1146242, 1153609, 1155990, 1163192,\n", + " 1158779, 1158512, 1158513, 1166172, 1179068, 1158379, 1155892, 1155899,\n", + " 1155902, 1164798, 1159329, 1168621, 1162480, 1164256, 1164271, 1183826,\n", + " 1186270, 1170336, 1186363, 1170041, 1192746, 1139828, 1139831, 1150265,\n", + " 1154812, 1156049, 1156055, 1190261, 1151978, 1173058, 1190925, 1149544,\n", + " 1191512, 1140993, 1140996, 1162156, 1188593, 1151774, 1153733, 1193039,\n", + " 1171201, 1150400, 1172122, 1158070, 1158066, 1152080, 1155962, 1169831,\n", + " 1194262, 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195697, 1199424, 1200099, 1198730, 1198731, 1201094, 1199282, 1202255,\n", + " 1201582, 1199146, 1202119, 1200641, 1201660, 1198694, 1196956, 1202804,\n", + " 1196665, 1198557, 1197512, 1195494, 1194649, 1194655, 1195511, 1195514,\n", + " 1195263, 1197924, 1201992, 1198542, 1197697, 1199519, 1195459, 1194882,\n", + " 1195888, 1195740, 1196359, 1196618, 1195313, 1195325, 1197107, 1196837,\n", + " 1198264, 1196711, 1199823, 1195147, 1196209, 1195265, 1195278, 1196242,\n", + " 1196109, 1195841, 1198915, 1195659, 1195536, 1196313, 1197478, 1196117,\n", + " 1199998, 1202017, 1195918, 1199697, 1199699, 1200959, 1199860, 1199059,\n", + " 1199185, 1194928, 1199628, 1197990, 1200872, 1200404, 1198400, 1199231,\n", + " 1194786, 1196501, 1196508, 1197970, 1197976, 1197601, 1196727, 1195771,\n", + " 1200894, 1198428, 1201827, 1200570, 1198596, 1199445, 1201156, 1201056,\n", + " 1200927, 1199539, 1202640, 1201049, 1201052, 1200526, 1200083, 1201451,\n", + " 1201442, 1200899, 1202338, 1202175, 1201291, 1195607, 1203329, 1202876,\n", + " 1200784, 1199606, 1195676, 1195679, 1197334, 1200276, 1195181, 1197816,\n", + " 1197822, 1200590, 1194730, 1200003, 1198824, 1203321, 1197735, 1200014,\n", + " 1199787, 1198819, 1199234, 1195070, 1197652, 1197655, 1197335, 1195082,\n", + " 1195165, 1194908, 1203162, 1197872], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195697, 1199424, 1200099, 1198730, 1198731, 1201094, 1199282, 1202255,\n", + " 1201582, 1199146, 1202119, 1200641, 1201660, 1198694, 1196956, 1202804,\n", + " 1196665, 1198557, 1197512, 1195494, 1194649, 1194655, 1195511, 1195514,\n", + " 1195263, 1197924, 1201992, 1198542, 1197697, 1199519, 1195459, 1194882,\n", + " 1195888, 1195740, 1196359, 1196618, 1195313, 1195325, 1197107, 1196837,\n", + " 1198264, 1196711, 1199823, 1195147, 1196209, 1195265, 1195278, 1196242,\n", + " 1196109, 1195841, 1198915, 1195659, 1195536, 1196313, 1197478, 1196117,\n", + " 1199998, 1202017, 1195918, 1199697, 1199699, 1200959, 1199860, 1199059,\n", + " 1199185, 1194928, 1199628, 1197990, 1200872, 1200404, 1198400, 1199231,\n", + " 1194786, 1196501, 1196508, 1197970, 1197976, 1197601, 1196727, 1195771,\n", + " 1200894, 1198428, 1201827, 1200570, 1198596, 1199445, 1201156, 1201056,\n", + " 1200927, 1199539, 1202640, 1201049, 1201052, 1200526, 1200083, 1201451,\n", + " 1201442, 1200899, 1202338, 1202175, 1201291, 1195607, 1203329, 1202876,\n", + " 1200784, 1199606, 1195676, 1195679, 1197334, 1200276, 1195181, 1197816,\n", + " 1197822, 1200590, 1194730, 1200003, 1198824, 1203321, 1197735, 1200014,\n", + " 1199787, 1198819, 1199234, 1195070, 1197652, 1197655, 1197335, 1195082,\n", + " 1195165, 1194908, 1203162, 1197872], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 1.2000e-01, -6.7633e-04, 5.2492e-01, ..., 5.9299e-02,\n", + " -1.2125e-03, -3.9111e-03],\n", + " [ 9.1921e-02, -3.5534e-04, 4.6425e-01, ..., 6.1032e-02,\n", + " -1.2119e-03, -3.5269e-03],\n", + " [ 5.0210e-02, 2.7920e-02, 3.7026e-01, ..., 7.8158e-02,\n", + " -1.0465e-03, -2.9519e-03],\n", + " ...,\n", + " [ 3.4331e-02, 7.8661e-03, 3.6633e-01, ..., 8.6947e-02,\n", + " -1.0281e-03, -2.8660e-03],\n", + " [ 2.5830e-02, -3.1113e-04, 3.6982e-01, ..., 1.3763e-01,\n", + " -2.0436e-03, -2.7309e-03],\n", + " [ 1.1473e-01, -7.2028e-04, 5.1327e-01, ..., 6.5263e-02,\n", + " -1.2476e-03, -3.8526e-03]], device='cuda:0'), 'paper': tensor([[ 1.5739e+00, -2.4621e-02, 6.4777e-01, ..., -8.3909e-03,\n", + " -2.3555e-02, 2.3162e+00],\n", + " [ 9.0691e-01, -1.7310e-02, -1.9451e-03, ..., -8.5891e-03,\n", + " -1.3368e-02, 1.0956e+00],\n", + " [ 1.5884e+00, -2.6284e-02, 6.0181e-01, ..., -8.3102e-03,\n", + " -2.5218e-02, 2.7258e+00],\n", + " ...,\n", + " [ 1.8673e+00, -4.7221e-02, 1.3667e+00, ..., -2.3437e-02,\n", + " -2.7328e-02, 1.6089e+00],\n", + " [ 1.6631e+00, -6.1472e-02, 7.4706e-01, ..., -2.4124e-02,\n", + " -3.0157e-02, 8.8055e-01],\n", + " [ 1.6533e+00, -2.7365e-02, 4.6221e-01, ..., -7.3201e-03,\n", + " -2.5722e-02, 2.9082e+00]], device='cuda:0'), 'author': tensor([[-3.1653e-04, 2.1107e-02, 8.6501e-02, ..., 5.3042e-01,\n", + " 1.0397e-01, 1.4975e-01],\n", + " [ 1.7686e-01, -1.4298e-03, 4.1919e-02, ..., 7.3837e-01,\n", + " 8.4623e-02, 2.5334e-01],\n", + " [ 7.2691e-02, -4.1956e-04, 5.0192e-02, ..., 5.1714e-01,\n", + " 7.0029e-02, 7.8743e-02],\n", + " ...,\n", + " [ 2.0228e-01, -1.2344e-03, 3.1649e-02, ..., 6.7236e-01,\n", + " 1.2862e-01, 2.5698e-01],\n", + " [ 1.8643e-01, -1.5565e-03, 3.7133e-02, ..., 6.1208e-01,\n", + " 1.6496e-01, 2.5658e-01],\n", + " [ 1.8503e-01, -1.0595e-03, 4.6721e-02, ..., 6.6514e-01,\n", + " 1.9634e-01, 3.3980e-01]], device='cuda:0'), 'field_of_study': tensor([[-1.8440e-03, 4.9803e-02, 7.2897e-02, ..., -1.3608e-03,\n", + " -8.4324e-04, -2.5901e-03],\n", + " [-3.2767e-03, 3.2830e-01, 9.4042e-02, ..., 9.4261e-02,\n", + " -2.5238e-04, -4.1032e-03],\n", + " [-4.3489e-03, 3.2337e-01, 3.3893e-04, ..., 7.7636e-02,\n", + " -1.0419e-03, -5.3718e-03],\n", + " ...,\n", + " [-4.0348e-03, 2.3721e-01, 2.7591e-02, ..., 9.9250e-02,\n", + " -9.7954e-04, -3.2901e-03],\n", + " [-3.3989e-03, -7.9402e-05, 6.4109e-02, ..., -1.4792e-03,\n", + " -1.9045e-04, -2.1782e-03],\n", + " [-4.0527e-03, 3.6008e-01, 3.0587e-02, ..., 1.6329e-01,\n", + " -1.2633e-03, -5.6238e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 153, 217, 217, 246, 13, 6, 6, 192, 191, 76, 6, 212,\n", + " 212, 35, 564, 458, 447, 548, 834, 627, 1082, 855, 822, 1082,\n", + " 1082, 1082, 1082, 1082, 1117, 1220, 1220, 929, 885, 914, 914, 914,\n", + " 1102, 1102, 1201, 1463, 1102, 1102, 1102, 1102, 1102, 1102, 1378, 1378,\n", + " 1378, 1477, 1565, 1301, 1723, 1478, 1584, 1499, 1479, 1667, 1355, 1966,\n", + " 1966, 1544, 1774, 1774, 1914, 1751, 1751, 1774, 1774, 1787, 2026, 2201,\n", + " 2121, 2110, 2440, 2440, 2378, 2378, 2516, 2380, 2542, 2542, 2478, 2533,\n", + " 2533, 2498, 2562, 2699, 2699, 2699, 2725, 2606, 2806, 2690, 2844, 2770,\n", + " 2821, 2728, 2728, 2728, 2899, 2899, 2952, 3194, 3194, 3184, 3434, 3296,\n", + " 3547, 3286, 3376, 3376, 3547, 3547, 3891, 3689, 3496, 3742, 3872, 3502,\n", + " 3552, 3972, 3988, 3988, 4050, 4109, 4126, 4292, 4292, 4292, 4312, 4160,\n", + " 4255, 4255, 4356, 4224, 4472, 4655, 4607, 4597, 4825, 4825, 4786, 4786,\n", + " 4766, 4766, 4990, 4990, 4858, 5017, 5017, 4986, 4955, 4955, 4955, 4955,\n", + " 4955, 4772, 4674, 4966, 4965, 5191, 4982, 5130, 5299, 5218, 5178, 5178,\n", + " 5397, 5397, 5489, 5337, 5753, 5488, 5797, 5797, 5696, 5714, 5714, 5979,\n", + " 5979, 5937, 5937, 5696, 5931, 5931, 6063, 6063, 5962, 5846, 5740, 6050,\n", + " 6050, 6437, 6437, 6103, 6103, 6103, 6069, 6069, 5831, 5831, 5831, 6305,\n", + " 6305, 6250, 6215, 6215, 6305, 6305, 6305, 6466, 6466, 6101, 6101, 6115,\n", + " 6115, 6374, 6374, 6374, 6501, 5885, 6420, 6535, 6535, 6446, 6172],\n", + " [ 104, 26, 111, 68, 126, 93, 85, 14, 5, 83, 131, 13,\n", + " 27, 95, 26, 38, 116, 109, 68, 48, 71, 52, 41, 98,\n", + " 61, 113, 6, 57, 41, 25, 11, 82, 51, 6, 81, 77,\n", + " 23, 15, 11, 78, 99, 100, 39, 4, 17, 28, 72, 130,\n", + " 61, 24, 11, 51, 51, 129, 3, 79, 38, 75, 41, 77,\n", + " 81, 6, 115, 55, 38, 77, 102, 79, 32, 16, 118, 70,\n", + " 119, 24, 41, 89, 6, 60, 121, 16, 47, 78, 41, 56,\n", + " 44, 97, 41, 38, 117, 92, 53, 6, 10, 37, 71, 87,\n", + " 32, 50, 101, 78, 104, 90, 116, 72, 130, 61, 118, 12,\n", + " 42, 2, 26, 37, 54, 36, 30, 110, 0, 129, 96, 49,\n", + " 7, 80, 130, 33, 118, 122, 9, 22, 73, 123, 105, 48,\n", + " 43, 94, 45, 19, 15, 66, 3, 103, 62, 41, 2, 45,\n", + " 78, 65, 111, 1, 6, 106, 52, 21, 78, 120, 63, 34,\n", + " 101, 128, 50, 114, 45, 8, 66, 97, 65, 84, 58, 125,\n", + " 78, 85, 116, 74, 15, 107, 7, 124, 79, 93, 78, 127,\n", + " 27, 112, 78, 76, 27, 108, 31, 78, 102, 64, 75, 82,\n", + " 48, 50, 78, 46, 107, 78, 88, 78, 18, 59, 78, 40,\n", + " 91, 104, 78, 131, 20, 21, 0, 7, 78, 78, 33, 78,\n", + " 81, 67, 78, 29, 35, 86, 121, 108, 69, 116, 37]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2959, 1714, 2514, ..., 794, 1028, 2168],\n", + " [ 219, 172, 22, ..., 6847, 6960, 6880]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 116, 118, 121, ..., 6, 78, 74],\n", + " [ 85, 216, 249, ..., 6163, 6477, 6436]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 241, 241, 59, ..., 6960, 6960, 6960],\n", + " [ 49, 177, 325, ..., 29, 240, 246]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 281, 220, 284, ..., 535, 11, 224],\n", + " [ 208, 75, 100, ..., 6887, 6818, 6925]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4065, 5105, 2209, ..., 3417, 5014, 5060],\n", + " [ 75, 54, 57, ..., 6506, 6461, 6504]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 59, 59, 59, ..., 6771, 6771, 6771],\n", + " [ 944, 1329, 2273, ..., 4432, 4729, 4321]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 35, 35, 35, ..., 6505, 6505, 6505],\n", + " [3307, 3139, 2137, ..., 481, 531, 1041]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.007036\n", + "sampling 0.006833\n", + "noi time: 0.002088\n", + "get_vertex_data call: 0.029267\n", + "noi group time: 0.002977\n", + "eoi_group_time: 0.010939\n", + "second half: 0.130523\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 1334, 31145, 24187, ..., 1120067, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 1334, 31145, 24187, ..., 1120067, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1211779, 1230244, ..., 1938521, 1930682, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1211779, 1230244, ..., 1938521, 1930682, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1141424, 1140282, 1140284, 1140285, 1138553, 1135716, 1135723,\n", + " 1135721, 1137791, 1139711, 1141758, 1137506, 1136969, 1143615, 1139808,\n", + " 1139820, 1145370, 1145374, 1145984, 1145992, 1145999, 1137271, 1137274,\n", + " 1146640, 1146647, 1140781, 1142968, 1134937, 1149216, 1149219, 1147949,\n", + " 1143820, 1147473, 1147483, 1142881, 1144636, 1149037, 1135950, 1148345,\n", + " 1148346, 1150193, 1148546, 1137220, 1155018, 1139371, 1147202, 1136683,\n", + " 1150329, 1152427, 1146369, 1140535, 1140537, 1140540, 1138112, 1138119,\n", + " 1137181, 1138356, 1135367, 1135202, 1135903, 1137798, 1141036, 1134794,\n", + " 1157443, 1138510, 1137329, 1137342, 1137337, 1157088, 1137693, 1139201,\n", + " 1144395, 1137534, 1135408, 1157398, 1157393, 1157397, 1156159, 1139161,\n", + " 1135579, 1142607, 1141086, 1136111, 1136101, 1135664, 1140970, 1138514,\n", + " 1138524, 1153091, 1137957, 1137959, 1154132, 1145127, 1156899, 1139685,\n", + " 1139878, 1138440, 1138445, 1138451, 1138461, 1136594, 1135122, 1149328,\n", + " 1135088, 1138881, 1156603, 1156606, 1147112, 1160819, 1135357, 1138183,\n", + " 1138185, 1158984, 1137108, 1139667, 1139673, 1139664, 1138069, 1142243,\n", + " 1134992, 1136557, 1148809, 1140199, 1158961, 1159009, 1141058, 1153543,\n", + " 1143625, 1140034, 1136073, 1138648, 1138151, 1153396, 1146075, 1152042,\n", + " 1152044, 1140670, 1137734, 1137728, 1134742, 1134750, 1135540, 1135549,\n", + " 1136697, 1141088, 1141097, 1141100, 1141102, 1149001, 1139898, 1135287,\n", + " 1136384, 1143767, 1143775, 1143706, 1143704, 1143225, 1143230, 1139025,\n", + " 1149982, 1135861, 1136637, 1163310, 1136917, 1144237, 1141785, 1136760,\n", + " 1147850, 1138488, 1141810, 1141821, 1143211, 1140163, 1158749, 1137762,\n", + " 1142713, 1139190, 1138709, 1138708, 1142913, 1138424, 1143107, 1145298,\n", + " 1144039, 1140885, 1144184, 1144190, 1144179, 1144185, 1150906, 1146201,\n", + " 1139559, 1158698, 1140504, 1147153, 1142655, 1141365, 1153069, 1149088,\n", + " 1144279, 1141332, 1143915, 1139510, 1140093, 1145001, 1140990, 1146695,\n", + " 1141560, 1147050, 1152976, 1142549, 1139450, 1141925, 1144242, 1140580,\n", + " 1150243, 1150692, 1140689, 1140696, 1137582, 1144079, 1143845, 1143851,\n", + " 1146024, 1146140, 1141585, 1149928, 1139990, 1146302, 1143290, 1143883,\n", + " 1147543, 1147540, 1148763, 1147282, 1136330, 1142628, 1149366, 1143042,\n", + " 1143051, 1136160, 1138923, 1136836, 1141292, 1139328, 1145427, 1143345,\n", + " 1144619, 1140846, 1144083, 1144088, 1135876, 1144310, 1144319, 1150294,\n", + " 1150296, 1146514, 1143957, 1143456, 1143457, 1144291, 1143937, 1135454,\n", + " 1147574, 1146636, 1147521, 1140364, 1143080, 1143075, 1168921, 1168927,\n", + " 1144725, 1144219, 1144222, 1147984, 1147999, 1134902, 1134907, 1147127,\n", + " 1147131, 1148704, 1141825, 1141836, 1146745, 1148468, 1148473, 1152327,\n", + " 1152328, 1149719, 1147025, 1147971, 1145009, 1158226, 1150452, 1146178,\n", + " 1152530, 1150445, 1149258, 1148930, 1148942, 1148827, 1156473, 1151860,\n", + " 1149791, 1144514, 1144526, 1138034, 1165252, 1152022, 1144888, 1154271,\n", + " 1145256, 1145262, 1139914, 1146731, 1149535, 1148702, 1141940, 1141949,\n", + " 1150745, 1141267, 1149989, 1147653, 1143560, 1149412, 1148288, 1148300,\n", + " 1139090, 1154420, 1148180, 1151363, 1151361, 1146684, 1138867, 1138404,\n", + " 1141182, 1151566, 1148720, 1148729, 1146549, 1139936, 1166314, 1153120,\n", + " 1153124, 1153125, 1153192, 1145111, 1159837, 1144851, 1150352, 1147447,\n", + " 1152579, 1152581, 1135311, 1151906, 1154183, 1154190, 1148498, 1148505,\n", + " 1146565, 1141420, 1141408, 1136002, 1150634, 1147737, 1145080, 1146265,\n", + " 1148949, 1146975, 1146967, 1156413, 1147391, 1150219, 1167290, 1146623,\n", + " 1142986, 1142987, 1144476, 1152103, 1146280, 1146287, 1151729, 1156334,\n", + " 1153037, 1153038, 1137746, 1159978, 1152622, 1152058, 1152826, 1155337,\n", + " 1154119, 1154123, 1152673, 1154633, 1151617, 1151623, 1150578, 1145278,\n", + " 1136131, 1136134, 1136798, 1148916, 1152958, 1152163, 1152169, 1153387,\n", + " 1144529, 1145952, 1151311, 1156831, 1153311, 1138280, 1138283, 1138279,\n", + " 1138281, 1152300, 1156001, 1136028, 1136029, 1158704, 1154733, 1142777,\n", + " 1156422, 1150164, 1149273, 1142257, 1148040, 1149300, 1160874, 1145656,\n", + " 1149794, 1144669, 1137048, 1148628, 1158530, 1137458, 1149946, 1149944,\n", + " 1142041, 1157229, 1142385, 1154929, 1152384, 1157058, 1145191, 1151257,\n", + " 1151260, 1150465, 1165703, 1150818, 1135645, 1147810, 1158304, 1158306,\n", + " 1158308, 1158307, 1151273, 1151331, 1155441, 1155452, 1153359, 1150130,\n", + " 1150132, 1154528, 1156913, 1142758, 1156207, 1151386, 1151379, 1158626,\n", + " 1140186, 1155122, 1155123, 1152515, 1157183, 1153473, 1155755, 1155758,\n", + " 1151424, 1135398, 1158096, 1155630, 1155631, 1156563, 1154555, 1155576,\n", + " 1136466, 1158824, 1158325, 1148838, 1155646, 1153368, 1143254, 1143263,\n", + " 1146938, 1154250, 1154080, 1137359, 1160907, 1150371, 1150068, 1155613,\n", + " 1143508, 1157926, 1157928, 1137381, 1137388, 1159117, 1158342, 1145694,\n", + " 1145690, 1134683, 1135601, 1145507, 1150661, 1150659, 1155852, 1158665,\n", + " 1140633, 1140632, 1152220, 1159213, 1156692, 1140382, 1140374, 1157732,\n", + " 1157735, 1159132, 1157039, 1144843, 1155975, 1158846, 1156815, 1155393,\n", + " 1149700, 1158760, 1158882, 1140221, 1161692, 1162998, 1158278, 1151615,\n", + " 1159429, 1136480, 1136491, 1153632, 1156665, 1183098, 1156490, 1136640,\n", + " 1136646, 1136642, 1144121, 1158209, 1140049, 1157858, 1158558, 1158544,\n", + " 1151147, 1156516, 1165497, 1165778, 1165786, 1138110, 1150011, 1161539,\n", + " 1142482, 1142666, 1157747, 1167359, 1162679, 1159042, 1159057, 1157946,\n", + " 1162044, 1153052, 1153042, 1153045, 1162835, 1155772, 1167707, 1167566,\n", + " 1156235, 1161318, 1156107, 1165244, 1150046, 1149063, 1155479, 1154302,\n", + " 1153519, 1147300, 1142406, 1146872, 1138161, 1164006, 1167206, 1156795,\n", + " 1139790, 1164901, 1139290, 1136802, 1171515, 1157357, 1146063, 1146356,\n", + " 1170415, 1156365, 1158653, 1156181, 1156184, 1159025, 1159032, 1169105,\n", + " 1152247, 1156580, 1138674, 1138685, 1153931, 1148571, 1144977, 1144989,\n", + " 1167933, 1169647, 1146510, 1170996, 1164580, 1161232, 1161240, 1144739,\n", + " 1152776, 1155272, 1155273, 1141471, 1147426, 1156739, 1156744, 1163260,\n", + " 1171040, 1144812, 1162085, 1164750, 1144052, 1145743, 1145176, 1163783,\n", + " 1148683, 1167757, 1154700, 1146042, 1155324, 1159513, 1163504, 1142136,\n", + " 1143025, 1147346, 1139351, 1145902, 1152203, 1143404, 1154076, 1168767,\n", + " 1147331, 1147339, 1170758, 1144699, 1145674, 1149125, 1155172, 1165023,\n", + " 1150515, 1156119, 1154618, 1144346, 1144336, 1157534, 1138383, 1154670,\n", + " 1168433, 1135841, 1169162, 1157331, 1138130, 1141048, 1151664, 1169359,\n", + " 1150025, 1149452, 1147489, 1147491, 1158615, 1158623, 1158062, 1173047,\n", + " 1163292, 1171090, 1179890, 1184807, 1155494, 1152353, 1170907, 1168383,\n", + " 1161121, 1182112, 1165904, 1147510, 1172669, 1173307, 1154027, 1152150,\n", + " 1172790, 1178102, 1157153, 1177404, 1157373, 1147711, 1147707, 1172435,\n", + " 1151850, 1151852, 1148131, 1157593, 1157598, 1172961, 1181020, 1140326,\n", + " 1144548, 1173092, 1182129, 1150234, 1154148, 1149173, 1177455, 1143279,\n", + " 1168481, 1166299, 1171297, 1153803, 1171314, 1172801, 1172309, 1180916,\n", + " 1155262, 1184112, 1154718, 1157803, 1157795, 1175774, 1155804, 1157986,\n", + " 1157991, 1172148, 1181935, 1153898, 1153893, 1154497, 1154500, 1134650,\n", + " 1180290, 1145626, 1172024, 1161909, 1149755, 1146243, 1153609, 1153612,\n", + " 1163721, 1155990, 1170069, 1186057, 1158940, 1175498, 1158371, 1155892,\n", + " 1164411, 1140399, 1163327, 1184534, 1171644, 1177917, 1179090, 1181548,\n", + " 1188516, 1161819, 1146161, 1156170, 1164133, 1168939, 1139828, 1139831,\n", + " 1139837, 1150265, 1154812, 1164924, 1177936, 1188613, 1156055, 1193849,\n", + " 1191989, 1181453, 1181889, 1173058, 1190922, 1167435, 1183048, 1192759,\n", + " 1190033, 1169700, 1166838, 1171201, 1189931, 1175349, 1187115, 1178135,\n", + " 1155956, 1155959, 1155553, 1177875, 1178304, 1162661, 1192228, 1190350,\n", + " 1167471, 1192961], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1141424, 1140282, 1140284, 1140285, 1138553, 1135716, 1135723,\n", + " 1135721, 1137791, 1139711, 1141758, 1137506, 1136969, 1143615, 1139808,\n", + " 1139820, 1145370, 1145374, 1145984, 1145992, 1145999, 1137271, 1137274,\n", + " 1146640, 1146647, 1140781, 1142968, 1134937, 1149216, 1149219, 1147949,\n", + " 1143820, 1147473, 1147483, 1142881, 1144636, 1149037, 1135950, 1148345,\n", + " 1148346, 1150193, 1148546, 1137220, 1155018, 1139371, 1147202, 1136683,\n", + " 1150329, 1152427, 1146369, 1140535, 1140537, 1140540, 1138112, 1138119,\n", + " 1137181, 1138356, 1135367, 1135202, 1135903, 1137798, 1141036, 1134794,\n", + " 1157443, 1138510, 1137329, 1137342, 1137337, 1157088, 1137693, 1139201,\n", + " 1144395, 1137534, 1135408, 1157398, 1157393, 1157397, 1156159, 1139161,\n", + " 1135579, 1142607, 1141086, 1136111, 1136101, 1135664, 1140970, 1138514,\n", + " 1138524, 1153091, 1137957, 1137959, 1154132, 1145127, 1156899, 1139685,\n", + " 1139878, 1138440, 1138445, 1138451, 1138461, 1136594, 1135122, 1149328,\n", + " 1135088, 1138881, 1156603, 1156606, 1147112, 1160819, 1135357, 1138183,\n", + " 1138185, 1158984, 1137108, 1139667, 1139673, 1139664, 1138069, 1142243,\n", + " 1134992, 1136557, 1148809, 1140199, 1158961, 1159009, 1141058, 1153543,\n", + " 1143625, 1140034, 1136073, 1138648, 1138151, 1153396, 1146075, 1152042,\n", + " 1152044, 1140670, 1137734, 1137728, 1134742, 1134750, 1135540, 1135549,\n", + " 1136697, 1141088, 1141097, 1141100, 1141102, 1149001, 1139898, 1135287,\n", + " 1136384, 1143767, 1143775, 1143706, 1143704, 1143225, 1143230, 1139025,\n", + " 1149982, 1135861, 1136637, 1163310, 1136917, 1144237, 1141785, 1136760,\n", + " 1147850, 1138488, 1141810, 1141821, 1143211, 1140163, 1158749, 1137762,\n", + " 1142713, 1139190, 1138709, 1138708, 1142913, 1138424, 1143107, 1145298,\n", + " 1144039, 1140885, 1144184, 1144190, 1144179, 1144185, 1150906, 1146201,\n", + " 1139559, 1158698, 1140504, 1147153, 1142655, 1141365, 1153069, 1149088,\n", + " 1144279, 1141332, 1143915, 1139510, 1140093, 1145001, 1140990, 1146695,\n", + " 1141560, 1147050, 1152976, 1142549, 1139450, 1141925, 1144242, 1140580,\n", + " 1150243, 1150692, 1140689, 1140696, 1137582, 1144079, 1143845, 1143851,\n", + " 1146024, 1146140, 1141585, 1149928, 1139990, 1146302, 1143290, 1143883,\n", + " 1147543, 1147540, 1148763, 1147282, 1136330, 1142628, 1149366, 1143042,\n", + " 1143051, 1136160, 1138923, 1136836, 1141292, 1139328, 1145427, 1143345,\n", + " 1144619, 1140846, 1144083, 1144088, 1135876, 1144310, 1144319, 1150294,\n", + " 1150296, 1146514, 1143957, 1143456, 1143457, 1144291, 1143937, 1135454,\n", + " 1147574, 1146636, 1147521, 1140364, 1143080, 1143075, 1168921, 1168927,\n", + " 1144725, 1144219, 1144222, 1147984, 1147999, 1134902, 1134907, 1147127,\n", + " 1147131, 1148704, 1141825, 1141836, 1146745, 1148468, 1148473, 1152327,\n", + " 1152328, 1149719, 1147025, 1147971, 1145009, 1158226, 1150452, 1146178,\n", + " 1152530, 1150445, 1149258, 1148930, 1148942, 1148827, 1156473, 1151860,\n", + " 1149791, 1144514, 1144526, 1138034, 1165252, 1152022, 1144888, 1154271,\n", + " 1145256, 1145262, 1139914, 1146731, 1149535, 1148702, 1141940, 1141949,\n", + " 1150745, 1141267, 1149989, 1147653, 1143560, 1149412, 1148288, 1148300,\n", + " 1139090, 1154420, 1148180, 1151363, 1151361, 1146684, 1138867, 1138404,\n", + " 1141182, 1151566, 1148720, 1148729, 1146549, 1139936, 1166314, 1153120,\n", + " 1153124, 1153125, 1153192, 1145111, 1159837, 1144851, 1150352, 1147447,\n", + " 1152579, 1152581, 1135311, 1151906, 1154183, 1154190, 1148498, 1148505,\n", + " 1146565, 1141420, 1141408, 1136002, 1150634, 1147737, 1145080, 1146265,\n", + " 1148949, 1146975, 1146967, 1156413, 1147391, 1150219, 1167290, 1146623,\n", + " 1142986, 1142987, 1144476, 1152103, 1146280, 1146287, 1151729, 1156334,\n", + " 1153037, 1153038, 1137746, 1159978, 1152622, 1152058, 1152826, 1155337,\n", + " 1154119, 1154123, 1152673, 1154633, 1151617, 1151623, 1150578, 1145278,\n", + " 1136131, 1136134, 1136798, 1148916, 1152958, 1152163, 1152169, 1153387,\n", + " 1144529, 1145952, 1151311, 1156831, 1153311, 1138280, 1138283, 1138279,\n", + " 1138281, 1152300, 1156001, 1136028, 1136029, 1158704, 1154733, 1142777,\n", + " 1156422, 1150164, 1149273, 1142257, 1148040, 1149300, 1160874, 1145656,\n", + " 1149794, 1144669, 1137048, 1148628, 1158530, 1137458, 1149946, 1149944,\n", + " 1142041, 1157229, 1142385, 1154929, 1152384, 1157058, 1145191, 1151257,\n", + " 1151260, 1150465, 1165703, 1150818, 1135645, 1147810, 1158304, 1158306,\n", + " 1158308, 1158307, 1151273, 1151331, 1155441, 1155452, 1153359, 1150130,\n", + " 1150132, 1154528, 1156913, 1142758, 1156207, 1151386, 1151379, 1158626,\n", + " 1140186, 1155122, 1155123, 1152515, 1157183, 1153473, 1155755, 1155758,\n", + " 1151424, 1135398, 1158096, 1155630, 1155631, 1156563, 1154555, 1155576,\n", + " 1136466, 1158824, 1158325, 1148838, 1155646, 1153368, 1143254, 1143263,\n", + " 1146938, 1154250, 1154080, 1137359, 1160907, 1150371, 1150068, 1155613,\n", + " 1143508, 1157926, 1157928, 1137381, 1137388, 1159117, 1158342, 1145694,\n", + " 1145690, 1134683, 1135601, 1145507, 1150661, 1150659, 1155852, 1158665,\n", + " 1140633, 1140632, 1152220, 1159213, 1156692, 1140382, 1140374, 1157732,\n", + " 1157735, 1159132, 1157039, 1144843, 1155975, 1158846, 1156815, 1155393,\n", + " 1149700, 1158760, 1158882, 1140221, 1161692, 1162998, 1158278, 1151615,\n", + " 1159429, 1136480, 1136491, 1153632, 1156665, 1183098, 1156490, 1136640,\n", + " 1136646, 1136642, 1144121, 1158209, 1140049, 1157858, 1158558, 1158544,\n", + " 1151147, 1156516, 1165497, 1165778, 1165786, 1138110, 1150011, 1161539,\n", + " 1142482, 1142666, 1157747, 1167359, 1162679, 1159042, 1159057, 1157946,\n", + " 1162044, 1153052, 1153042, 1153045, 1162835, 1155772, 1167707, 1167566,\n", + " 1156235, 1161318, 1156107, 1165244, 1150046, 1149063, 1155479, 1154302,\n", + " 1153519, 1147300, 1142406, 1146872, 1138161, 1164006, 1167206, 1156795,\n", + " 1139790, 1164901, 1139290, 1136802, 1171515, 1157357, 1146063, 1146356,\n", + " 1170415, 1156365, 1158653, 1156181, 1156184, 1159025, 1159032, 1169105,\n", + " 1152247, 1156580, 1138674, 1138685, 1153931, 1148571, 1144977, 1144989,\n", + " 1167933, 1169647, 1146510, 1170996, 1164580, 1161232, 1161240, 1144739,\n", + " 1152776, 1155272, 1155273, 1141471, 1147426, 1156739, 1156744, 1163260,\n", + " 1171040, 1144812, 1162085, 1164750, 1144052, 1145743, 1145176, 1163783,\n", + " 1148683, 1167757, 1154700, 1146042, 1155324, 1159513, 1163504, 1142136,\n", + " 1143025, 1147346, 1139351, 1145902, 1152203, 1143404, 1154076, 1168767,\n", + " 1147331, 1147339, 1170758, 1144699, 1145674, 1149125, 1155172, 1165023,\n", + " 1150515, 1156119, 1154618, 1144346, 1144336, 1157534, 1138383, 1154670,\n", + " 1168433, 1135841, 1169162, 1157331, 1138130, 1141048, 1151664, 1169359,\n", + " 1150025, 1149452, 1147489, 1147491, 1158615, 1158623, 1158062, 1173047,\n", + " 1163292, 1171090, 1179890, 1184807, 1155494, 1152353, 1170907, 1168383,\n", + " 1161121, 1182112, 1165904, 1147510, 1172669, 1173307, 1154027, 1152150,\n", + " 1172790, 1178102, 1157153, 1177404, 1157373, 1147711, 1147707, 1172435,\n", + " 1151850, 1151852, 1148131, 1157593, 1157598, 1172961, 1181020, 1140326,\n", + " 1144548, 1173092, 1182129, 1150234, 1154148, 1149173, 1177455, 1143279,\n", + " 1168481, 1166299, 1171297, 1153803, 1171314, 1172801, 1172309, 1180916,\n", + " 1155262, 1184112, 1154718, 1157803, 1157795, 1175774, 1155804, 1157986,\n", + " 1157991, 1172148, 1181935, 1153898, 1153893, 1154497, 1154500, 1134650,\n", + " 1180290, 1145626, 1172024, 1161909, 1149755, 1146243, 1153609, 1153612,\n", + " 1163721, 1155990, 1170069, 1186057, 1158940, 1175498, 1158371, 1155892,\n", + " 1164411, 1140399, 1163327, 1184534, 1171644, 1177917, 1179090, 1181548,\n", + " 1188516, 1161819, 1146161, 1156170, 1164133, 1168939, 1139828, 1139831,\n", + " 1139837, 1150265, 1154812, 1164924, 1177936, 1188613, 1156055, 1193849,\n", + " 1191989, 1181453, 1181889, 1173058, 1190922, 1167435, 1183048, 1192759,\n", + " 1190033, 1169700, 1166838, 1171201, 1189931, 1175349, 1187115, 1178135,\n", + " 1155956, 1155959, 1155553, 1177875, 1178304, 1162661, 1192228, 1190350,\n", + " 1167471, 1192961], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1200105, 1199835, 1202255, 1201581, 1201462, 1194626, 1197777, 1198624,\n", + " 1198696, 1202804, 1198557, 1194866, 1194867, 1197155, 1195494, 1197464,\n", + " 1195514, 1195263, 1196539, 1201992, 1201427, 1194958, 1195469, 1199170,\n", + " 1199171, 1195740, 1194752, 1194759, 1195313, 1195320, 1196835, 1198668,\n", + " 1195989, 1198036, 1195982, 1198958, 1198167, 1196705, 1196711, 1199823,\n", + " 1195223, 1195270, 1195273, 1197141, 1200765, 1198884, 1197361, 1196109,\n", + " 1194859, 1200032, 1198273, 1198280, 1200959, 1199062, 1199059, 1197291,\n", + " 1199185, 1194941, 1199685, 1199628, 1199152, 1195008, 1195014, 1195017,\n", + " 1199673, 1199676, 1194795, 1199018, 1199021, 1197609, 1196727, 1195771,\n", + " 1202618, 1200894, 1198416, 1198428, 1199899, 1201525, 1199555, 1199560,\n", + " 1201547, 1201824, 1201827, 1198593, 1201156, 1202630, 1202403, 1194803,\n", + " 1199539, 1202640, 1200546, 1200555, 1196883, 1199910, 1201442, 1197946,\n", + " 1201029, 1202239, 1199481, 1199976, 1197539, 1200327, 1195885, 1200181,\n", + " 1201291, 1203263, 1201590, 1196966, 1202687, 1195679, 1195664, 1194996,\n", + " 1196929, 1198929, 1200684, 1200275, 1195415, 1201789, 1195179, 1200928,\n", + " 1197816, 1197822, 1197499, 1196597, 1198147, 1198148, 1198824, 1196796,\n", + " 1201475, 1199234, 1197652, 1197342, 1197035, 1195165, 1201877, 1196557,\n", + " 1197872], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1200105, 1199835, 1202255, 1201581, 1201462, 1194626, 1197777, 1198624,\n", + " 1198696, 1202804, 1198557, 1194866, 1194867, 1197155, 1195494, 1197464,\n", + " 1195514, 1195263, 1196539, 1201992, 1201427, 1194958, 1195469, 1199170,\n", + " 1199171, 1195740, 1194752, 1194759, 1195313, 1195320, 1196835, 1198668,\n", + " 1195989, 1198036, 1195982, 1198958, 1198167, 1196705, 1196711, 1199823,\n", + " 1195223, 1195270, 1195273, 1197141, 1200765, 1198884, 1197361, 1196109,\n", + " 1194859, 1200032, 1198273, 1198280, 1200959, 1199062, 1199059, 1197291,\n", + " 1199185, 1194941, 1199685, 1199628, 1199152, 1195008, 1195014, 1195017,\n", + " 1199673, 1199676, 1194795, 1199018, 1199021, 1197609, 1196727, 1195771,\n", + " 1202618, 1200894, 1198416, 1198428, 1199899, 1201525, 1199555, 1199560,\n", + " 1201547, 1201824, 1201827, 1198593, 1201156, 1202630, 1202403, 1194803,\n", + " 1199539, 1202640, 1200546, 1200555, 1196883, 1199910, 1201442, 1197946,\n", + " 1201029, 1202239, 1199481, 1199976, 1197539, 1200327, 1195885, 1200181,\n", + " 1201291, 1203263, 1201590, 1196966, 1202687, 1195679, 1195664, 1194996,\n", + " 1196929, 1198929, 1200684, 1200275, 1195415, 1201789, 1195179, 1200928,\n", + " 1197816, 1197822, 1197499, 1196597, 1198147, 1198148, 1198824, 1196796,\n", + " 1201475, 1199234, 1197652, 1197342, 1197035, 1195165, 1201877, 1196557,\n", + " 1197872], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 4.2345e-02, -4.4467e-04, 4.0815e-01, ..., 8.6306e-02,\n", + " -1.2302e-03, -2.8253e-03],\n", + " [ 1.1568e-01, -6.5662e-04, 5.2992e-01, ..., 5.0106e-02,\n", + " -1.2357e-03, -4.0895e-03],\n", + " [ 1.2253e-01, -6.1045e-04, 5.2412e-01, ..., 6.2029e-02,\n", + " -1.3440e-03, -4.0144e-03],\n", + " ...,\n", + " [ 3.5693e-02, -2.5099e-04, 3.7112e-01, ..., 6.8744e-02,\n", + " -1.1408e-03, -2.6793e-03],\n", + " [ 5.0025e-03, -1.3457e-04, 3.6536e-01, ..., 1.2259e-01,\n", + " -1.6392e-03, -2.4551e-03],\n", + " [ 1.3961e-01, -5.6221e-04, 5.4184e-01, ..., 7.3202e-02,\n", + " -1.4382e-03, -3.8006e-03]], device='cuda:0'), 'paper': tensor([[ 1.6622, -0.0247, 0.7457, ..., -0.0081, -0.0244, 2.4874],\n", + " [ 1.2542, -0.0170, 0.1468, ..., -0.0078, -0.0182, 1.5727],\n", + " [ 1.6873, -0.0246, 0.4275, ..., -0.0069, -0.0238, 2.6677],\n", + " ...,\n", + " [ 1.2325, -0.0371, 0.1005, ..., -0.0156, -0.0218, 1.3596],\n", + " [ 1.4362, -0.0223, 0.6514, ..., -0.0096, -0.0225, 1.6729],\n", + " [ 1.7468, -0.0273, 0.5545, ..., -0.0070, -0.0265, 3.0461]],\n", + " device='cuda:0'), 'author': tensor([[ 6.3228e-02, -6.8048e-04, 1.1423e-01, ..., 4.6208e-01,\n", + " -1.3707e-03, 1.7145e-01],\n", + " [ 2.9776e-01, -2.4022e-03, -2.4449e-04, ..., 6.9975e-01,\n", + " 2.3722e-01, 3.1533e-01],\n", + " [ 1.7420e-01, -1.1096e-03, -2.9545e-04, ..., 6.5305e-01,\n", + " 1.4329e-01, 2.6620e-01],\n", + " ...,\n", + " [ 1.7920e-01, -8.8378e-04, 3.8237e-02, ..., 5.3757e-01,\n", + " 4.8050e-02, 1.6142e-01],\n", + " [ 2.6399e-01, -1.8211e-03, 3.1515e-02, ..., 6.8638e-01,\n", + " 1.9922e-01, 2.9930e-01],\n", + " [-5.2906e-04, -3.5063e-05, 1.5153e-01, ..., 1.0313e-01,\n", + " -3.1383e-04, -9.0066e-04]], device='cuda:0'), 'field_of_study': tensor([[-0.0017, 0.2195, 0.0746, ..., -0.0013, -0.0013, -0.0045],\n", + " [-0.0024, 0.0811, 0.0770, ..., -0.0015, -0.0007, -0.0031],\n", + " [-0.0030, 0.4034, 0.1189, ..., 0.0600, -0.0008, -0.0055],\n", + " ...,\n", + " [-0.0028, 0.0386, 0.0412, ..., 0.0089, -0.0007, -0.0030],\n", + " [-0.0025, 0.1002, 0.0268, ..., -0.0011, -0.0007, -0.0028],\n", + " [-0.0029, 0.0068, 0.0399, ..., -0.0007, -0.0006, -0.0029]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 14, 69, 56, 3, 214, 79, 189, 149, 109, 109, 109, 109,\n", + " 303, 558, 446, 543, 566, 337, 379, 404, 310, 310, 852, 609,\n", + " 719, 719, 675, 801, 850, 808, 832, 1170, 1075, 1102, 818, 818,\n", + " 953, 953, 953, 783, 783, 783, 1364, 1258, 1104, 1491, 1342, 1342,\n", + " 1080, 1442, 1289, 1209, 1359, 1654, 1379, 1230, 1230, 1718, 1521, 1584,\n", + " 1742, 1853, 1685, 1685, 1832, 1832, 1790, 1790, 1790, 2110, 1941, 1911,\n", + " 1911, 1952, 2026, 2202, 2195, 2202, 2318, 2310, 2310, 2310, 2186, 2187,\n", + " 2337, 2412, 2313, 2313, 2402, 2305, 2425, 2504, 2504, 2504, 2742, 2703,\n", + " 2703, 2697, 2507, 2811, 2792, 2792, 2785, 2675, 2733, 2813, 2813, 2803,\n", + " 2826, 2970, 2970, 2895, 2895, 2965, 2975, 3300, 2966, 3191, 3347, 3315,\n", + " 3315, 3343, 3151, 3472, 3425, 3503, 3521, 3617, 3912, 3912, 3840, 3912,\n", + " 3990, 3750, 4053, 3972, 4178, 4058, 4058, 4198, 4116, 4066, 4103, 4059,\n", + " 4267, 4294, 4361, 4368, 4614, 4621, 4560, 4531, 4585, 4585, 4585, 4471,\n", + " 4659, 4664, 4664, 4664, 4686, 4686, 4855, 4855, 4756, 4715, 4939, 4927,\n", + " 4931, 4964, 4970, 5082, 4858, 5222, 4979, 5364, 5429, 5476, 5618, 5570,\n", + " 5682, 5798, 5626, 5896, 5815, 6071, 5620, 5699, 6108, 6147, 6310, 6310,\n", + " 5932, 6364, 6088, 6156, 6254, 6453, 6359, 6333, 6333],\n", + " [ 70, 28, 110, 83, 85, 129, 85, 110, 91, 81, 7, 90,\n", + " 57, 18, 51, 104, 62, 83, 45, 134, 104, 19, 97, 114,\n", + " 47, 89, 33, 134, 29, 70, 118, 97, 60, 29, 50, 62,\n", + " 127, 47, 130, 108, 30, 19, 79, 117, 121, 4, 106, 13,\n", + " 135, 24, 36, 97, 109, 70, 97, 62, 111, 42, 10, 111,\n", + " 31, 94, 34, 67, 25, 126, 21, 23, 0, 112, 40, 132,\n", + " 17, 75, 92, 76, 107, 115, 96, 128, 36, 107, 24, 63,\n", + " 125, 37, 135, 8, 71, 54, 12, 2, 14, 70, 99, 48,\n", + " 17, 54, 87, 9, 98, 97, 95, 97, 104, 78, 104, 113,\n", + " 68, 22, 59, 120, 119, 73, 61, 122, 95, 82, 116, 39,\n", + " 47, 51, 11, 64, 136, 43, 70, 84, 70, 25, 58, 74,\n", + " 53, 96, 5, 24, 49, 101, 37, 82, 82, 115, 59, 70,\n", + " 3, 55, 47, 133, 70, 100, 69, 27, 15, 105, 131, 100,\n", + " 56, 80, 86, 106, 97, 98, 32, 72, 122, 1, 16, 103,\n", + " 38, 97, 107, 70, 20, 3, 46, 88, 26, 35, 6, 59,\n", + " 102, 77, 65, 94, 10, 97, 107, 44, 70, 70, 70, 123,\n", + " 52, 102, 113, 66, 2, 93, 41, 123, 124]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1198, 352, 2072, ..., 4062, 599, 5393],\n", + " [ 154, 76, 306, ..., 6988, 6919, 6854]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 13, 13, 98, ..., 82, 94, 106],\n", + " [ 231, 164, 31, ..., 6334, 6415, 6255]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 154, 154, 154, ..., 6880, 6880, 6880],\n", + " [ 50, 330, 621, ..., 248, 281, 532]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 698, 576, 280, ..., 310, 257, 428],\n", + " [ 77, 145, 35, ..., 6937, 6873, 6945]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5437, 4635, 1729, ..., 2969, 6182, 5154],\n", + " [ 0, 0, 126, ..., 6399, 6442, 6377]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 154, 154, 154, ..., 6880, 6880, 6880],\n", + " [ 958, 1198, 1379, ..., 1472, 4633, 1076]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 88, 88, 88, ..., 6254, 6254, 6254],\n", + " [6550, 6928, 6805, ..., 3690, 402, 1333]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006385\n", + "sampling 0.006232\n", + "noi time: 0.00191\n", + "get_vertex_data call: 0.037866\n", + "noi group time: 0.003495\n", + "eoi_group_time: 0.017095\n", + "second half: 0.221239\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16691, 28267, 31143, ..., 1119681, 1129724, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16691, 28267, 31143, ..., 1119681, 1129724, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224380, 1221607, 1203800, ..., 1926878, 1930679, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224380, 1221607, 1203800, ..., 1926878, 1930679, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1137204, 1137212, 1141424, 1141435, 1136237, 1140285, 1135926,\n", + " 1141758, 1136215, 1136156, 1136962, 1143600, 1143615, 1139808, 1139811,\n", + " 1145373, 1145999, 1138938, 1143362, 1143372, 1139241, 1146644, 1146646,\n", + " 1139615, 1140781, 1140783, 1150502, 1150509, 1145292, 1142964, 1134943,\n", + " 1149216, 1149220, 1149646, 1147473, 1147225, 1142881, 1144632, 1146995,\n", + " 1148346, 1146656, 1146472, 1138338, 1138345, 1148546, 1153217, 1141909,\n", + " 1137220, 1155019, 1147211, 1136685, 1150322, 1152427, 1136270, 1140308,\n", + " 1151549, 1140537, 1140540, 1138112, 1137254, 1140146, 1140159, 1134720,\n", + " 1135367, 1135202, 1141036, 1134794, 1136518, 1136512, 1138504, 1137342,\n", + " 1137693, 1139215, 1144389, 1137529, 1137534, 1136705, 1137441, 1156159,\n", + " 1139161, 1141703, 1135579, 1142607, 1148860, 1135675, 1138514, 1136985,\n", + " 1139685, 1138436, 1138440, 1138445, 1138461, 1138462, 1149328, 1135102,\n", + " 1156603, 1156606, 1147116, 1135352, 1158984, 1158987, 1148531, 1141532,\n", + " 1136449, 1139668, 1139673, 1138067, 1138069, 1134992, 1135789, 1158961,\n", + " 1158974, 1159009, 1159011, 1141070, 1144407, 1144410, 1140034, 1138648,\n", + " 1134891, 1155661, 1146075, 1140557, 1152044, 1142299, 1137734, 1137728,\n", + " 1146222, 1134742, 1134750, 1135549, 1136697, 1140228, 1137888, 1141088,\n", + " 1144130, 1148996, 1149001, 1141980, 1136397, 1143767, 1154851, 1143706,\n", + " 1143224, 1143225, 1139025, 1139033, 1140003, 1140009, 1141695, 1135860,\n", + " 1135861, 1136426, 1141224, 1159800, 1141657, 1141653, 1139730, 1143677,\n", + " 1144237, 1141155, 1141786, 1138793, 1139495, 1136766, 1141609, 1137074,\n", + " 1139798, 1138482, 1142056, 1141821, 1143153, 1137761, 1148867, 1142713,\n", + " 1158605, 1139188, 1141475, 1141479, 1138708, 1140110, 1142913, 1144442,\n", + " 1136867, 1136864, 1145298, 1144042, 1141398, 1144182, 1150906, 1146193,\n", + " 1138539, 1147155, 1136369, 1162804, 1141365, 1153068, 1141720, 1141664,\n", + " 1139014, 1165339, 1139510, 1139774, 1139653, 1140093, 1138815, 1145000,\n", + " 1140619, 1140987, 1135047, 1147050, 1145873, 1152976, 1152988, 1141925,\n", + " 1144242, 1145339, 1141841, 1141846, 1139405, 1143633, 1137571, 1145983,\n", + " 1143845, 1143851, 1146005, 1146024, 1146140, 1141646, 1142533, 1139990,\n", + " 1143293, 1143294, 1151124, 1150417, 1147543, 1147540, 1148763, 1147282,\n", + " 1142816, 1136330, 1140349, 1149366, 1139417, 1147364, 1149610, 1143051,\n", + " 1148408, 1144923, 1138923, 1157717, 1136836, 1148230, 1165630, 1139329,\n", + " 1141496, 1142159, 1143345, 1144765, 1144081, 1144083, 1138600, 1144376,\n", + " 1146514, 1146523, 1143456, 1143457, 1137697, 1142015, 1146590, 1143798,\n", + " 1143807, 1140364, 1149574, 1137990, 1166410, 1148962, 1144219, 1147984,\n", + " 1147999, 1146949, 1139252, 1139258, 1148704, 1143311, 1148475, 1147056,\n", + " 1147070, 1145011, 1139549, 1158226, 1141138, 1154526, 1145751, 1142383,\n", + " 1148393, 1146178, 1138856, 1151244, 1152530, 1151182, 1150445, 1154998,\n", + " 1149791, 1146895, 1165252, 1151480, 1154271, 1154263, 1151050, 1146723,\n", + " 1140566, 1150127, 1147009, 1147023, 1146772, 1150736, 1151795, 1148744,\n", + " 1149991, 1143552, 1149416, 1149412, 1148288, 1148290, 1148294, 1137724,\n", + " 1147866, 1154420, 1158794, 1151363, 1136247, 1139718, 1146676, 1138878,\n", + " 1138877, 1152442, 1148720, 1148724, 1148729, 1145862, 1168973, 1146559,\n", + " 1139936, 1148203, 1148204, 1154168, 1153124, 1153192, 1153188, 1148052,\n", + " 1150352, 1150356, 1143128, 1147447, 1147444, 1151816, 1151821, 1152581,\n", + " 1149737, 1141420, 1151351, 1151345, 1155156, 1147728, 1147737, 1145079,\n", + " 1146969, 1151920, 1146623, 1144472, 1152849, 1152100, 1152105, 1146287,\n", + " 1156321, 1153032, 1153036, 1153026, 1153038, 1150093, 1145539, 1137746,\n", + " 1137755, 1152622, 1149203, 1152826, 1157833, 1139581, 1151580, 1151573,\n", + " 1151617, 1150578, 1145278, 1148913, 1148916, 1143997, 1158423, 1156823,\n", + " 1153311, 1138279, 1138281, 1156007, 1156000, 1156001, 1156005, 1136028,\n", + " 1158704, 1152928, 1151064, 1156396, 1163941, 1156422, 1150099, 1137403,\n", + " 1150164, 1148033, 1148040, 1149300, 1148909, 1145656, 1149792, 1158477,\n", + " 1149649, 1148628, 1158530, 1158540, 1153863, 1148255, 1135706, 1155376,\n", + " 1142041, 1157466, 1143450, 1157547, 1142387, 1157064, 1157069, 1145196,\n", + " 1145187, 1139473, 1151260, 1150465, 1135733, 1152179, 1152190, 1157909,\n", + " 1157911, 1150828, 1156929, 1156932, 1147813, 1158308, 1151331, 1155441,\n", + " 1150132, 1162120, 1144361, 1154529, 1156919, 1142755, 1164634, 1157637,\n", + " 1157642, 1151379, 1158637, 1158639, 1155122, 1145793, 1145796, 1156463,\n", + " 1158096, 1155628, 1155630, 1158486, 1156563, 1158566, 1158823, 1158824,\n", + " 1157315, 1154036, 1155646, 1155647, 1143263, 1154644, 1146938, 1154240,\n", + " 1154080, 1156711, 1151317, 1143189, 1150371, 1153326, 1147908, 1141627,\n", + " 1141620, 1159618, 1151030, 1157660, 1158996, 1159116, 1145688, 1135605,\n", + " 1145515, 1155848, 1158664, 1158665, 1157684, 1149145, 1159258, 1152209,\n", + " 1152220, 1140374, 1159126, 1157033, 1144843, 1155975, 1161667, 1149700,\n", + " 1154601, 1158760, 1158891, 1158815, 1158804, 1158447, 1158444, 1156778,\n", + " 1151615, 1136480, 1147599, 1157675, 1136640, 1136646, 1163112, 1134757,\n", + " 1166424, 1180573, 1156514, 1146126, 1138110, 1158006, 1150011, 1155521,\n", + " 1142666, 1142658, 1157747, 1162683, 1159042, 1159052, 1159071, 1157939,\n", + " 1162044, 1153045, 1171551, 1155769, 1170855, 1153841, 1156107, 1138393,\n", + " 1150035, 1150046, 1149067, 1145948, 1142405, 1146873, 1157600, 1164006,\n", + " 1164012, 1156785, 1156787, 1149963, 1139286, 1146063, 1165309, 1158866,\n", + " 1148592, 1143139, 1156177, 1156181, 1156189, 1159025, 1159032, 1169105,\n", + " 1152247, 1171162, 1155588, 1160509, 1151220, 1168428, 1158411, 1144980,\n", + " 1147830, 1146500, 1161243, 1144739, 1155052, 1141471, 1141459, 1151650,\n", + " 1147427, 1149899, 1165867, 1156739, 1153649, 1153663, 1150648, 1171040,\n", + " 1144810, 1144812, 1140112, 1165721, 1156300, 1180582, 1145728, 1145176,\n", + " 1166917, 1148675, 1148683, 1145228, 1154700, 1155324, 1147671, 1147675,\n", + " 1169509, 1144973, 1167051, 1143038, 1147694, 1145447, 1152624, 1139357,\n", + " 1139349, 1147723, 1145900, 1145902, 1153534, 1152206, 1143405, 1169742,\n", + " 1158728, 1167498, 1144690, 1151598, 1149124, 1167817, 1155172, 1150515,\n", + " 1156119, 1156118, 1145526, 1144346, 1144336, 1157534, 1154670, 1169162,\n", + " 1157331, 1154352, 1149452, 1158611, 1158623, 1158051, 1158054, 1158062,\n", + " 1173047, 1149846, 1157384, 1160040, 1154871, 1167383, 1152353, 1166594,\n", + " 1143170, 1168055, 1149402, 1148328, 1148324, 1173307, 1160942, 1154027,\n", + " 1152150, 1171148, 1168126, 1147696, 1147711, 1151850, 1148131, 1166827,\n", + " 1169032, 1169037, 1171288, 1140326, 1171823, 1181772, 1150234, 1154151,\n", + " 1154148, 1169422, 1149173, 1143279, 1180393, 1168481, 1143420, 1171297,\n", + " 1153803, 1161025, 1172309, 1172314, 1183123, 1151509, 1151519, 1176269,\n", + " 1155260, 1155262, 1154707, 1157792, 1157795, 1143341, 1171623, 1163572,\n", + " 1157133, 1172148, 1182010, 1186047, 1158253, 1154500, 1177865, 1145626,\n", + " 1172022, 1154840, 1163538, 1178028, 1182624, 1178757, 1161067, 1149744,\n", + " 1149753, 1153609, 1180953, 1155990, 1158512, 1158934, 1158374, 1158379,\n", + " 1155890, 1155892, 1162988, 1157272, 1160276, 1171644, 1160811, 1163422,\n", + " 1166520, 1165072, 1165447, 1164133, 1156528, 1156539, 1139828, 1139825,\n", + " 1139831, 1154806, 1154812, 1164924, 1164927, 1149669, 1194514, 1156049,\n", + " 1156055, 1151972, 1151978, 1146392, 1146395, 1173058, 1188233, 1185795,\n", + " 1187904, 1191961, 1191647, 1189898, 1190444, 1192326, 1192101, 1152118,\n", + " 1191615, 1162502, 1169707, 1150400, 1156681, 1145395, 1155962, 1155960,\n", + " 1181646, 1190093, 1165516, 1167607, 1178315, 1191230, 1188972, 1192018,\n", + " 1184978], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1137204, 1137212, 1141424, 1141435, 1136237, 1140285, 1135926,\n", + " 1141758, 1136215, 1136156, 1136962, 1143600, 1143615, 1139808, 1139811,\n", + " 1145373, 1145999, 1138938, 1143362, 1143372, 1139241, 1146644, 1146646,\n", + " 1139615, 1140781, 1140783, 1150502, 1150509, 1145292, 1142964, 1134943,\n", + " 1149216, 1149220, 1149646, 1147473, 1147225, 1142881, 1144632, 1146995,\n", + " 1148346, 1146656, 1146472, 1138338, 1138345, 1148546, 1153217, 1141909,\n", + " 1137220, 1155019, 1147211, 1136685, 1150322, 1152427, 1136270, 1140308,\n", + " 1151549, 1140537, 1140540, 1138112, 1137254, 1140146, 1140159, 1134720,\n", + " 1135367, 1135202, 1141036, 1134794, 1136518, 1136512, 1138504, 1137342,\n", + " 1137693, 1139215, 1144389, 1137529, 1137534, 1136705, 1137441, 1156159,\n", + " 1139161, 1141703, 1135579, 1142607, 1148860, 1135675, 1138514, 1136985,\n", + " 1139685, 1138436, 1138440, 1138445, 1138461, 1138462, 1149328, 1135102,\n", + " 1156603, 1156606, 1147116, 1135352, 1158984, 1158987, 1148531, 1141532,\n", + " 1136449, 1139668, 1139673, 1138067, 1138069, 1134992, 1135789, 1158961,\n", + " 1158974, 1159009, 1159011, 1141070, 1144407, 1144410, 1140034, 1138648,\n", + " 1134891, 1155661, 1146075, 1140557, 1152044, 1142299, 1137734, 1137728,\n", + " 1146222, 1134742, 1134750, 1135549, 1136697, 1140228, 1137888, 1141088,\n", + " 1144130, 1148996, 1149001, 1141980, 1136397, 1143767, 1154851, 1143706,\n", + " 1143224, 1143225, 1139025, 1139033, 1140003, 1140009, 1141695, 1135860,\n", + " 1135861, 1136426, 1141224, 1159800, 1141657, 1141653, 1139730, 1143677,\n", + " 1144237, 1141155, 1141786, 1138793, 1139495, 1136766, 1141609, 1137074,\n", + " 1139798, 1138482, 1142056, 1141821, 1143153, 1137761, 1148867, 1142713,\n", + " 1158605, 1139188, 1141475, 1141479, 1138708, 1140110, 1142913, 1144442,\n", + " 1136867, 1136864, 1145298, 1144042, 1141398, 1144182, 1150906, 1146193,\n", + " 1138539, 1147155, 1136369, 1162804, 1141365, 1153068, 1141720, 1141664,\n", + " 1139014, 1165339, 1139510, 1139774, 1139653, 1140093, 1138815, 1145000,\n", + " 1140619, 1140987, 1135047, 1147050, 1145873, 1152976, 1152988, 1141925,\n", + " 1144242, 1145339, 1141841, 1141846, 1139405, 1143633, 1137571, 1145983,\n", + " 1143845, 1143851, 1146005, 1146024, 1146140, 1141646, 1142533, 1139990,\n", + " 1143293, 1143294, 1151124, 1150417, 1147543, 1147540, 1148763, 1147282,\n", + " 1142816, 1136330, 1140349, 1149366, 1139417, 1147364, 1149610, 1143051,\n", + " 1148408, 1144923, 1138923, 1157717, 1136836, 1148230, 1165630, 1139329,\n", + " 1141496, 1142159, 1143345, 1144765, 1144081, 1144083, 1138600, 1144376,\n", + " 1146514, 1146523, 1143456, 1143457, 1137697, 1142015, 1146590, 1143798,\n", + " 1143807, 1140364, 1149574, 1137990, 1166410, 1148962, 1144219, 1147984,\n", + " 1147999, 1146949, 1139252, 1139258, 1148704, 1143311, 1148475, 1147056,\n", + " 1147070, 1145011, 1139549, 1158226, 1141138, 1154526, 1145751, 1142383,\n", + " 1148393, 1146178, 1138856, 1151244, 1152530, 1151182, 1150445, 1154998,\n", + " 1149791, 1146895, 1165252, 1151480, 1154271, 1154263, 1151050, 1146723,\n", + " 1140566, 1150127, 1147009, 1147023, 1146772, 1150736, 1151795, 1148744,\n", + " 1149991, 1143552, 1149416, 1149412, 1148288, 1148290, 1148294, 1137724,\n", + " 1147866, 1154420, 1158794, 1151363, 1136247, 1139718, 1146676, 1138878,\n", + " 1138877, 1152442, 1148720, 1148724, 1148729, 1145862, 1168973, 1146559,\n", + " 1139936, 1148203, 1148204, 1154168, 1153124, 1153192, 1153188, 1148052,\n", + " 1150352, 1150356, 1143128, 1147447, 1147444, 1151816, 1151821, 1152581,\n", + " 1149737, 1141420, 1151351, 1151345, 1155156, 1147728, 1147737, 1145079,\n", + " 1146969, 1151920, 1146623, 1144472, 1152849, 1152100, 1152105, 1146287,\n", + " 1156321, 1153032, 1153036, 1153026, 1153038, 1150093, 1145539, 1137746,\n", + " 1137755, 1152622, 1149203, 1152826, 1157833, 1139581, 1151580, 1151573,\n", + " 1151617, 1150578, 1145278, 1148913, 1148916, 1143997, 1158423, 1156823,\n", + " 1153311, 1138279, 1138281, 1156007, 1156000, 1156001, 1156005, 1136028,\n", + " 1158704, 1152928, 1151064, 1156396, 1163941, 1156422, 1150099, 1137403,\n", + " 1150164, 1148033, 1148040, 1149300, 1148909, 1145656, 1149792, 1158477,\n", + " 1149649, 1148628, 1158530, 1158540, 1153863, 1148255, 1135706, 1155376,\n", + " 1142041, 1157466, 1143450, 1157547, 1142387, 1157064, 1157069, 1145196,\n", + " 1145187, 1139473, 1151260, 1150465, 1135733, 1152179, 1152190, 1157909,\n", + " 1157911, 1150828, 1156929, 1156932, 1147813, 1158308, 1151331, 1155441,\n", + " 1150132, 1162120, 1144361, 1154529, 1156919, 1142755, 1164634, 1157637,\n", + " 1157642, 1151379, 1158637, 1158639, 1155122, 1145793, 1145796, 1156463,\n", + " 1158096, 1155628, 1155630, 1158486, 1156563, 1158566, 1158823, 1158824,\n", + " 1157315, 1154036, 1155646, 1155647, 1143263, 1154644, 1146938, 1154240,\n", + " 1154080, 1156711, 1151317, 1143189, 1150371, 1153326, 1147908, 1141627,\n", + " 1141620, 1159618, 1151030, 1157660, 1158996, 1159116, 1145688, 1135605,\n", + " 1145515, 1155848, 1158664, 1158665, 1157684, 1149145, 1159258, 1152209,\n", + " 1152220, 1140374, 1159126, 1157033, 1144843, 1155975, 1161667, 1149700,\n", + " 1154601, 1158760, 1158891, 1158815, 1158804, 1158447, 1158444, 1156778,\n", + " 1151615, 1136480, 1147599, 1157675, 1136640, 1136646, 1163112, 1134757,\n", + " 1166424, 1180573, 1156514, 1146126, 1138110, 1158006, 1150011, 1155521,\n", + " 1142666, 1142658, 1157747, 1162683, 1159042, 1159052, 1159071, 1157939,\n", + " 1162044, 1153045, 1171551, 1155769, 1170855, 1153841, 1156107, 1138393,\n", + " 1150035, 1150046, 1149067, 1145948, 1142405, 1146873, 1157600, 1164006,\n", + " 1164012, 1156785, 1156787, 1149963, 1139286, 1146063, 1165309, 1158866,\n", + " 1148592, 1143139, 1156177, 1156181, 1156189, 1159025, 1159032, 1169105,\n", + " 1152247, 1171162, 1155588, 1160509, 1151220, 1168428, 1158411, 1144980,\n", + " 1147830, 1146500, 1161243, 1144739, 1155052, 1141471, 1141459, 1151650,\n", + " 1147427, 1149899, 1165867, 1156739, 1153649, 1153663, 1150648, 1171040,\n", + " 1144810, 1144812, 1140112, 1165721, 1156300, 1180582, 1145728, 1145176,\n", + " 1166917, 1148675, 1148683, 1145228, 1154700, 1155324, 1147671, 1147675,\n", + " 1169509, 1144973, 1167051, 1143038, 1147694, 1145447, 1152624, 1139357,\n", + " 1139349, 1147723, 1145900, 1145902, 1153534, 1152206, 1143405, 1169742,\n", + " 1158728, 1167498, 1144690, 1151598, 1149124, 1167817, 1155172, 1150515,\n", + " 1156119, 1156118, 1145526, 1144346, 1144336, 1157534, 1154670, 1169162,\n", + " 1157331, 1154352, 1149452, 1158611, 1158623, 1158051, 1158054, 1158062,\n", + " 1173047, 1149846, 1157384, 1160040, 1154871, 1167383, 1152353, 1166594,\n", + " 1143170, 1168055, 1149402, 1148328, 1148324, 1173307, 1160942, 1154027,\n", + " 1152150, 1171148, 1168126, 1147696, 1147711, 1151850, 1148131, 1166827,\n", + " 1169032, 1169037, 1171288, 1140326, 1171823, 1181772, 1150234, 1154151,\n", + " 1154148, 1169422, 1149173, 1143279, 1180393, 1168481, 1143420, 1171297,\n", + " 1153803, 1161025, 1172309, 1172314, 1183123, 1151509, 1151519, 1176269,\n", + " 1155260, 1155262, 1154707, 1157792, 1157795, 1143341, 1171623, 1163572,\n", + " 1157133, 1172148, 1182010, 1186047, 1158253, 1154500, 1177865, 1145626,\n", + " 1172022, 1154840, 1163538, 1178028, 1182624, 1178757, 1161067, 1149744,\n", + " 1149753, 1153609, 1180953, 1155990, 1158512, 1158934, 1158374, 1158379,\n", + " 1155890, 1155892, 1162988, 1157272, 1160276, 1171644, 1160811, 1163422,\n", + " 1166520, 1165072, 1165447, 1164133, 1156528, 1156539, 1139828, 1139825,\n", + " 1139831, 1154806, 1154812, 1164924, 1164927, 1149669, 1194514, 1156049,\n", + " 1156055, 1151972, 1151978, 1146392, 1146395, 1173058, 1188233, 1185795,\n", + " 1187904, 1191961, 1191647, 1189898, 1190444, 1192326, 1192101, 1152118,\n", + " 1191615, 1162502, 1169707, 1150400, 1156681, 1145395, 1155962, 1155960,\n", + " 1181646, 1190093, 1165516, 1167607, 1178315, 1191230, 1188972, 1192018,\n", + " 1184978], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196008, 1196011, 1196013, 1197183, 1199835, 1199282, 1198449, 1202255,\n", + " 1198844, 1201582, 1199274, 1201016, 1198690, 1194866, 1194879, 1196624,\n", + " 1196631, 1194648, 1195263, 1201992, 1198543, 1195463, 1195888, 1195895,\n", + " 1199171, 1195740, 1196334, 1199366, 1198668, 1197807, 1195134, 1198950,\n", + " 1196704, 1199823, 1195148, 1197136, 1200762, 1197273, 1196109, 1194859,\n", + " 1195850, 1195039, 1195541, 1196122, 1196393, 1195353, 1198273, 1198277,\n", + " 1198282, 1200959, 1199628, 1199803, 1197676, 1199154, 1199038, 1199231,\n", + " 1196501, 1199021, 1197601, 1196727, 1202618, 1200018, 1200019, 1198811,\n", + " 1201534, 1200780, 1202421, 1200450, 1200570, 1200503, 1198593, 1199445,\n", + " 1201421, 1201079, 1202630, 1202401, 1200913, 1200363, 1200315, 1202529,\n", + " 1196779, 1201029, 1200327, 1200330, 1201226, 1201291, 1198478, 1195611,\n", + " 1201871, 1203329, 1202209, 1199929, 1200398, 1196966, 1195679, 1195664,\n", + " 1200439, 1198932, 1197816, 1197822, 1194898, 1196382, 1203102, 1201138,\n", + " 1194728, 1200003, 1198824, 1197735, 1200437, 1197652, 1197655, 1197335,\n", + " 1197035, 1197039], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196008, 1196011, 1196013, 1197183, 1199835, 1199282, 1198449, 1202255,\n", + " 1198844, 1201582, 1199274, 1201016, 1198690, 1194866, 1194879, 1196624,\n", + " 1196631, 1194648, 1195263, 1201992, 1198543, 1195463, 1195888, 1195895,\n", + " 1199171, 1195740, 1196334, 1199366, 1198668, 1197807, 1195134, 1198950,\n", + " 1196704, 1199823, 1195148, 1197136, 1200762, 1197273, 1196109, 1194859,\n", + " 1195850, 1195039, 1195541, 1196122, 1196393, 1195353, 1198273, 1198277,\n", + " 1198282, 1200959, 1199628, 1199803, 1197676, 1199154, 1199038, 1199231,\n", + " 1196501, 1199021, 1197601, 1196727, 1202618, 1200018, 1200019, 1198811,\n", + " 1201534, 1200780, 1202421, 1200450, 1200570, 1200503, 1198593, 1199445,\n", + " 1201421, 1201079, 1202630, 1202401, 1200913, 1200363, 1200315, 1202529,\n", + " 1196779, 1201029, 1200327, 1200330, 1201226, 1201291, 1198478, 1195611,\n", + " 1201871, 1203329, 1202209, 1199929, 1200398, 1196966, 1195679, 1195664,\n", + " 1200439, 1198932, 1197816, 1197822, 1194898, 1196382, 1203102, 1201138,\n", + " 1194728, 1200003, 1198824, 1197735, 1200437, 1197652, 1197655, 1197335,\n", + " 1197035, 1197039], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 7.7578e-02, -3.5791e-04, 4.0400e-01, ..., 8.5606e-02,\n", + " -1.2604e-03, -3.0720e-03],\n", + " [ 5.4380e-02, -4.3521e-04, 2.8843e-01, ..., 5.0874e-02,\n", + " -1.0105e-03, -2.7416e-03],\n", + " [ 7.5343e-02, -3.0142e-04, 4.2748e-01, ..., 5.9197e-02,\n", + " -1.2860e-03, -3.1207e-03],\n", + " ...,\n", + " [ 4.5401e-02, -1.7725e-04, 4.1216e-01, ..., 8.0560e-02,\n", + " -1.3286e-03, -2.8007e-03],\n", + " [ 1.7747e-02, -5.8663e-04, 3.9071e-01, ..., 9.4709e-02,\n", + " -1.3116e-03, -2.9192e-03],\n", + " [ 3.7950e-02, -4.7422e-04, 3.5506e-01, ..., 6.9780e-02,\n", + " -1.2972e-03, -3.0673e-03]], device='cuda:0'), 'paper': tensor([[ 1.4823, -0.0398, 0.5506, ..., -0.0189, -0.0208, 1.0512],\n", + " [ 1.1746, -0.0221, -0.0034, ..., -0.0116, -0.0164, 1.4230],\n", + " [ 1.7136, -0.0264, 0.7145, ..., -0.0080, -0.0265, 2.9592],\n", + " ...,\n", + " [ 1.3092, -0.0287, 0.0700, ..., -0.0108, -0.0204, 2.0171],\n", + " [ 1.5430, -0.0571, 0.6180, ..., -0.0213, -0.0287, 1.1266],\n", + " [ 1.7293, -0.0272, 0.5213, ..., -0.0072, -0.0263, 2.9994]],\n", + " device='cuda:0'), 'author': tensor([[ 8.6796e-02, 7.3153e-02, 9.9881e-02, ..., 7.8186e-01,\n", + " -1.0310e-03, 2.7144e-01],\n", + " [ 4.4950e-02, 2.0816e-02, 5.1713e-02, ..., 5.2255e-01,\n", + " -2.1821e-04, 8.0423e-02],\n", + " [ 1.4036e-01, -1.3897e-03, 1.3210e-02, ..., 6.8254e-01,\n", + " 1.4013e-01, 2.2842e-01],\n", + " ...,\n", + " [ 1.5246e-01, -5.1772e-04, 8.4610e-02, ..., 6.3104e-01,\n", + " 3.8011e-02, 2.3521e-01],\n", + " [ 2.2931e-01, -1.6111e-03, 5.4275e-02, ..., 6.8537e-01,\n", + " 1.3796e-01, 2.5367e-01],\n", + " [ 1.7008e-01, -7.5971e-04, 4.3612e-03, ..., 5.5954e-01,\n", + " 1.0591e-01, 2.2282e-01]], device='cuda:0'), 'field_of_study': tensor([[-2.3250e-03, 9.1389e-03, 1.4731e-01, ..., -2.6863e-03,\n", + " -1.6749e-04, -2.5203e-03],\n", + " [-2.3906e-03, 3.5112e-02, 1.1456e-01, ..., -2.2096e-03,\n", + " -1.0987e-03, -2.7060e-03],\n", + " [-2.0462e-03, 5.9031e-02, 1.3801e-01, ..., -2.9226e-03,\n", + " -2.4436e-04, -1.8487e-03],\n", + " ...,\n", + " [-2.2663e-03, 1.7809e-01, 5.3542e-02, ..., -2.4345e-03,\n", + " -5.2006e-04, -2.7419e-03],\n", + " [-3.0339e-03, 1.1883e-01, 9.4106e-02, ..., -1.6934e-03,\n", + " -1.1390e-03, -2.3262e-03],\n", + " [-2.1502e-03, 6.4073e-02, 1.7501e-01, ..., -3.1022e-03,\n", + " -1.2921e-03, -3.1220e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 137, 190, 55, 180, 116, 80, 308, 303, 427, 277, 353, 697,\n", + " 697, 675, 675, 675, 699, 1124, 643, 1111, 842, 911, 846, 1048,\n", + " 1043, 861, 861, 861, 975, 1223, 1248, 1117, 1117, 1301, 1369, 1254,\n", + " 1254, 1367, 1093, 1112, 1405, 1405, 1433, 1320, 1269, 1269, 1503, 1491,\n", + " 1520, 1520, 1640, 1602, 1602, 1423, 1423, 1494, 1699, 1692, 1633, 1633,\n", + " 1892, 1596, 1718, 1842, 1936, 1936, 1859, 1966, 1952, 1880, 1890, 2189,\n", + " 2189, 2061, 2061, 2029, 2029, 2029, 2264, 2199, 2277, 2277, 2277, 2192,\n", + " 2312, 2351, 2520, 2520, 2446, 2516, 2467, 2905, 2786, 2601, 2785, 2872,\n", + " 2752, 2996, 2831, 3107, 3124, 2974, 3051, 3044, 3091, 2972, 3061, 2890,\n", + " 2890, 2890, 3091, 3091, 3118, 3339, 3169, 3197, 3316, 3316, 3316, 3187,\n", + " 3187, 3187, 3321, 3465, 3465, 3378, 3419, 3736, 3577, 3682, 3682, 3798,\n", + " 3798, 3872, 3894, 4008, 3956, 3960, 4141, 4174, 4174, 4174, 4270, 4083,\n", + " 4083, 4270, 4100, 4100, 4194, 4315, 4411, 4233, 4593, 4752, 4821, 4884,\n", + " 5052, 5052, 5052, 5052, 5052, 5052, 5132, 5241, 5059, 5059, 5059, 5272,\n", + " 5185, 5276, 5286, 5543, 5281, 5691, 5732, 5787, 5734, 5738, 5636, 5851,\n", + " 5676, 5962],\n", + " [ 103, 25, 68, 96, 50, 109, 28, 53, 68, 71, 28, 10,\n", + " 68, 58, 89, 55, 27, 82, 82, 51, 9, 10, 65, 5,\n", + " 5, 38, 95, 92, 52, 47, 10, 5, 32, 40, 31, 63,\n", + " 15, 43, 2, 18, 59, 1, 16, 112, 36, 14, 34, 74,\n", + " 5, 69, 58, 18, 77, 106, 8, 73, 26, 43, 58, 46,\n", + " 50, 70, 5, 109, 21, 6, 8, 36, 8, 43, 90, 113,\n", + " 68, 4, 93, 65, 79, 45, 24, 38, 86, 73, 48, 59,\n", + " 29, 104, 5, 78, 39, 30, 57, 9, 18, 100, 48, 60,\n", + " 2, 16, 13, 18, 18, 109, 11, 87, 66, 84, 2, 94,\n", + " 109, 102, 112, 22, 51, 5, 47, 72, 62, 75, 83, 16,\n", + " 23, 7, 101, 12, 101, 33, 72, 50, 7, 63, 86, 101,\n", + " 81, 85, 0, 43, 84, 105, 84, 13, 91, 107, 17, 41,\n", + " 64, 108, 68, 54, 59, 72, 16, 43, 39, 1, 111, 56,\n", + " 110, 98, 85, 19, 59, 80, 67, 9, 5, 88, 35, 76,\n", + " 3, 44, 59, 37, 20, 99, 61, 42, 97, 49, 99, 20,\n", + " 3, 5]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2071, 1891, 1891, ..., 740, 740, 6550],\n", + " [ 166, 23, 309, ..., 7314, 7377, 7265]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 63, 58, 16, ..., 16, 5, 86],\n", + " [ 160, 27, 40, ..., 5955, 5624, 5904]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 85, 85, 85, ..., 7168, 7168, 7241],\n", + " [ 150, 491, 501, ..., 20, 625, 370]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 215, 216, 658, ..., 118, 17, 17],\n", + " [ 286, 296, 308, ..., 7303, 7295, 7351]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3493, 7147, 877, ..., 7064, 7064, 4924],\n", + " [ 26, 31, 57, ..., 5919, 5920, 5712]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 85, 85, 85, ..., 7241, 7241, 7366],\n", + " [1334, 2197, 3268, ..., 6843, 6254, 1721]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 137, 137, 137, ..., 5962, 5962, 5962],\n", + " [ 174, 175, 194, ..., 6204, 7097, 6891]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.00661\n", + "sampling 0.006455\n", + "noi time: 0.002016\n", + "get_vertex_data call: 0.036329\n", + "noi group time: 0.003596\n", + "eoi_group_time: 0.015783\n", + "second half: 0.230773\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 1334, 24187, 32616, ..., 1100734, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 1334, 24187, 32616, ..., 1100734, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210831, 1224370, 1224373, ..., 1933649, 1939387, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210831, 1224370, 1224373, ..., 1933649, 1939387, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1141435, 1136235, 1135926, 1138558, 1135152, 1135165, 1135716,\n", + " 1135724, 1137791, 1141756, 1141758, 1137506, 1138320, 1138322, 1138335,\n", + " 1136215, 1141250, 1146802, 1143600, 1143615, 1139808, 1139820, 1139811,\n", + " 1154783, 1145366, 1146977, 1146978, 1146990, 1145992, 1138940, 1143363,\n", + " 1150497, 1142958, 1143820, 1149646, 1147477, 1147483, 1144636, 1135119,\n", + " 1148343, 1136742, 1137220, 1145419, 1147211, 1136676, 1150329, 1152427,\n", + " 1134807, 1134658, 1138112, 1137254, 1137257, 1153467, 1140158, 1140020,\n", + " 1140029, 1162460, 1162461, 1135360, 1135367, 1135202, 1141036, 1136292,\n", + " 1134794, 1143377, 1137329, 1136178, 1136186, 1143064, 1143069, 1157103,\n", + " 1137693, 1135337, 1144394, 1144395, 1136705, 1136662, 1137441, 1136206,\n", + " 1136928, 1139161, 1135664, 1140969, 1140716, 1156342, 1138514, 1158136,\n", + " 1135522, 1137291, 1138445, 1137491, 1157190, 1137932, 1136593, 1149328,\n", + " 1138835, 1138846, 1156606, 1147113, 1142616, 1160822, 1156141, 1138185,\n", + " 1145843, 1135760, 1135769, 1135772, 1136449, 1136457, 1139673, 1138069,\n", + " 1134992, 1148805, 1158961, 1159009, 1141070, 1144410, 1136067, 1139929,\n", + " 1137587, 1138648, 1141963, 1140559, 1140557, 1152042, 1136057, 1137734,\n", + " 1137728, 1134922, 1138255, 1136688, 1141088, 1141098, 1141100, 1139889,\n", + " 1145357, 1141980, 1136385, 1136387, 1143767, 1154855, 1137297, 1137298,\n", + " 1143221, 1143225, 1139025, 1149982, 1152709, 1154467, 1139436, 1136632,\n", + " 1142936, 1141224, 1143678, 1137186, 1144237, 1140592, 1141785, 1136760,\n", + " 1141609, 1141608, 1137087, 1138490, 1138488, 1142050, 1142082, 1142087,\n", + " 1138464, 1149111, 1139190, 1138710, 1138708, 1142913, 1142925, 1137652,\n", + " 1143111, 1144445, 1144596, 1144603, 1136867, 1136864, 1140885, 1141398,\n", + " 1140447, 1144182, 1137606, 1139559, 1139560, 1158692, 1140504, 1140501,\n", + " 1137854, 1147153, 1136369, 1136378, 1141365, 1153056, 1153068, 1163665,\n", + " 1141664, 1139022, 1139019, 1139510, 1140093, 1139127, 1164536, 1147888,\n", + " 1147896, 1140983, 1140990, 1146693, 1147050, 1147047, 1145885, 1145873,\n", + " 1143543, 1143538, 1152976, 1152980, 1152985, 1139447, 1141925, 1146901,\n", + " 1144242, 1141846, 1140695, 1143647, 1143637, 1137570, 1145974, 1143851,\n", + " 1163662, 1146005, 1146024, 1138085, 1154328, 1142533, 1139990, 1143293,\n", + " 1143294, 1147543, 1147540, 1147150, 1148763, 1147282, 1147287, 1142816,\n", + " 1142629, 1142638, 1149366, 1139417, 1143051, 1143040, 1143052, 1148414,\n", + " 1136160, 1157717, 1157720, 1136836, 1136843, 1139297, 1139329, 1144776,\n", + " 1142149, 1143345, 1144619, 1137098, 1144088, 1138600, 1135876, 1150294,\n", + " 1144375, 1146523, 1143957, 1143465, 1143457, 1143947, 1135451, 1147582,\n", + " 1147574, 1149076, 1140361, 1140364, 1137990, 1143075, 1143082, 1144219,\n", + " 1147999, 1134902, 1139252, 1147244, 1148704, 1148715, 1142700, 1141319,\n", + " 1146745, 1146749, 1148465, 1153701, 1158226, 1158228, 1158230, 1143921,\n", + " 1148365, 1154526, 1145240, 1145751, 1142370, 1138638, 1146178, 1138861,\n", + " 1151242, 1152530, 1150445, 1149250, 1148825, 1154438, 1138038, 1144171,\n", + " 1146895, 1152013, 1152023, 1152031, 1145261, 1145262, 1139919, 1139906,\n", + " 1140561, 1148693, 1148696, 1150112, 1150127, 1147019, 1141949, 1150843,\n", + " 1144831, 1151795, 1148744, 1153574, 1148448, 1147653, 1143560, 1143564,\n", + " 1143565, 1151717, 1148288, 1148300, 1137724, 1154420, 1148180, 1148181,\n", + " 1139718, 1146682, 1138872, 1152436, 1152445, 1148729, 1146559, 1148204,\n", + " 1154166, 1153124, 1153192, 1153188, 1153197, 1150935, 1148060, 1152877,\n", + " 1152878, 1143092, 1150352, 1150356, 1146233, 1148095, 1150715, 1148498,\n", + " 1148505, 1149737, 1141423, 1150637, 1146969, 1146972, 1146975, 1146967,\n", + " 1150219, 1146623, 1151691, 1144472, 1156325, 1153026, 1153038, 1150085,\n", + " 1137746, 1137755, 1152820, 1155337, 1152673, 1151617, 1151623, 1150586,\n", + " 1145271, 1136134, 1152957, 1152958, 1152169, 1140932, 1138991, 1152903,\n", + " 1151311, 1143995, 1152341, 1138279, 1136025, 1136028, 1151064, 1151067,\n", + " 1152886, 1152888, 1154722, 1163489, 1137540, 1150104, 1150164, 1144016,\n", + " 1148040, 1161201, 1148903, 1157629, 1137048, 1148626, 1148628, 1158530,\n", + " 1158540, 1137458, 1157456, 1139229, 1157229, 1143442, 1150967, 1158854,\n", + " 1156500, 1152384, 1157064, 1157067, 1139473, 1150465, 1135730, 1152179,\n", + " 1156638, 1153410, 1135647, 1147810, 1139525, 1158308, 1158311, 1151271,\n", + " 1162113, 1154530, 1153999, 1142755, 1156207, 1160440, 1172944, 1156256,\n", + " 1151379, 1155122, 1152519, 1152527, 1155755, 1151425, 1151424, 1135406,\n", + " 1145806, 1145807, 1156463, 1158096, 1154763, 1155620, 1155628, 1155630,\n", + " 1158485, 1154555, 1155576, 1136469, 1158566, 1155646, 1153363, 1161389,\n", + " 1161796, 1154240, 1143189, 1150371, 1153318, 1157439, 1157430, 1150805,\n", + " 1159622, 1159629, 1140748, 1157288, 1157657, 1157663, 1137381, 1138262,\n", + " 1158342, 1145688, 1134682, 1135601, 1135605, 1148149, 1155853, 1155852,\n", + " 1161118, 1156085, 1152220, 1152506, 1140380, 1140381, 1140374, 1155873,\n", + " 1157732, 1157735, 1159132, 1155971, 1155975, 1142070, 1158841, 1156812,\n", + " 1149700, 1136896, 1158815, 1158285, 1151615, 1136480, 1153112, 1152143,\n", + " 1156490, 1153808, 1136640, 1144112, 1144127, 1166424, 1158558, 1159494,\n", + " 1138110, 1155867, 1154337, 1154339, 1158006, 1144581, 1144589, 1155529,\n", + " 1164276, 1142665, 1157759, 1159290, 1156045, 1159042, 1159052, 1159061,\n", + " 1163267, 1158295, 1157945, 1160563, 1162044, 1153052, 1153045, 1171551,\n", + " 1172995, 1162835, 1144146, 1153841, 1153842, 1156104, 1156109, 1138393,\n", + " 1150046, 1164547, 1155479, 1153519, 1146870, 1157614, 1138161, 1138163,\n", + " 1164006, 1164012, 1156795, 1163407, 1154590, 1139592, 1156987, 1148771,\n", + " 1146063, 1158452, 1163452, 1162308, 1140130, 1148607, 1143143, 1165047,\n", + " 1156363, 1158653, 1156181, 1159032, 1169112, 1143735, 1160600, 1155588,\n", + " 1144320, 1162549, 1151223, 1153932, 1148567, 1146500, 1146510, 1144739,\n", + " 1152776, 1165422, 1153201, 1141464, 1141471, 1147433, 1159380, 1182249,\n", + " 1182254, 1156739, 1156742, 1157954, 1150646, 1170253, 1144801, 1144812,\n", + " 1184431, 1140112, 1135567, 1142722, 1167332, 1148683, 1145217, 1145228,\n", + " 1155320, 1147673, 1171683, 1138954, 1150533, 1142136, 1148165, 1143031,\n", + " 1166057, 1166053, 1152624, 1145892, 1145900, 1145902, 1168659, 1152200,\n", + " 1181052, 1143402, 1167503, 1154078, 1170740, 1147338, 1170758, 1145490,\n", + " 1171981, 1144681, 1150525, 1150518, 1156112, 1156119, 1144336, 1157534,\n", + " 1169164, 1169162, 1157331, 1141048, 1180443, 1169359, 1150027, 1150026,\n", + " 1172747, 1171532, 1149683, 1173228, 1158611, 1158623, 1158054, 1149852,\n", + " 1149847, 1152353, 1149398, 1148667, 1148666, 1173307, 1145033, 1169144,\n", + " 1164974, 1151208, 1151696, 1151697, 1157153, 1147709, 1147711, 1151850,\n", + " 1148131, 1147934, 1157593, 1170488, 1183695, 1135021, 1179569, 1167712,\n", + " 1172961, 1146767, 1140326, 1180472, 1144548, 1144550, 1153428, 1159100,\n", + " 1166682, 1181772, 1160314, 1150234, 1154148, 1167504, 1167517, 1186117,\n", + " 1169772, 1167657, 1165967, 1168481, 1143420, 1169618, 1153803, 1153805,\n", + " 1179717, 1158030, 1158031, 1161255, 1161262, 1162129, 1155262, 1154707,\n", + " 1154718, 1157792, 1157795, 1172037, 1143330, 1143333, 1143335, 1178592,\n", + " 1171623, 1157991, 1171738, 1180081, 1184264, 1153899, 1154500, 1164197,\n", + " 1145626, 1156436, 1180383, 1149753, 1152276, 1155990, 1179469, 1158771,\n", + " 1158512, 1158517, 1187090, 1179995, 1158371, 1155899, 1162981, 1162968,\n", + " 1180943, 1189634, 1167762, 1171641, 1182337, 1187407, 1146161, 1170034,\n", + " 1168930, 1190731, 1139828, 1139831, 1139837, 1189379, 1156055, 1191487,\n", + " 1169659, 1146394, 1146395, 1146390, 1176223, 1149544, 1182913, 1140995,\n", + " 1182060, 1189970, 1189977, 1153733, 1194093, 1152115, 1162503, 1162502,\n", + " 1177370, 1185851, 1152080, 1155959, 1185655, 1178290, 1182178, 1190605,\n", + " 1189038, 1191250, 1173826, 1163071, 1191619, 1187036, 1187638, 1194046],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1141435, 1136235, 1135926, 1138558, 1135152, 1135165, 1135716,\n", + " 1135724, 1137791, 1141756, 1141758, 1137506, 1138320, 1138322, 1138335,\n", + " 1136215, 1141250, 1146802, 1143600, 1143615, 1139808, 1139820, 1139811,\n", + " 1154783, 1145366, 1146977, 1146978, 1146990, 1145992, 1138940, 1143363,\n", + " 1150497, 1142958, 1143820, 1149646, 1147477, 1147483, 1144636, 1135119,\n", + " 1148343, 1136742, 1137220, 1145419, 1147211, 1136676, 1150329, 1152427,\n", + " 1134807, 1134658, 1138112, 1137254, 1137257, 1153467, 1140158, 1140020,\n", + " 1140029, 1162460, 1162461, 1135360, 1135367, 1135202, 1141036, 1136292,\n", + " 1134794, 1143377, 1137329, 1136178, 1136186, 1143064, 1143069, 1157103,\n", + " 1137693, 1135337, 1144394, 1144395, 1136705, 1136662, 1137441, 1136206,\n", + " 1136928, 1139161, 1135664, 1140969, 1140716, 1156342, 1138514, 1158136,\n", + " 1135522, 1137291, 1138445, 1137491, 1157190, 1137932, 1136593, 1149328,\n", + " 1138835, 1138846, 1156606, 1147113, 1142616, 1160822, 1156141, 1138185,\n", + " 1145843, 1135760, 1135769, 1135772, 1136449, 1136457, 1139673, 1138069,\n", + " 1134992, 1148805, 1158961, 1159009, 1141070, 1144410, 1136067, 1139929,\n", + " 1137587, 1138648, 1141963, 1140559, 1140557, 1152042, 1136057, 1137734,\n", + " 1137728, 1134922, 1138255, 1136688, 1141088, 1141098, 1141100, 1139889,\n", + " 1145357, 1141980, 1136385, 1136387, 1143767, 1154855, 1137297, 1137298,\n", + " 1143221, 1143225, 1139025, 1149982, 1152709, 1154467, 1139436, 1136632,\n", + " 1142936, 1141224, 1143678, 1137186, 1144237, 1140592, 1141785, 1136760,\n", + " 1141609, 1141608, 1137087, 1138490, 1138488, 1142050, 1142082, 1142087,\n", + " 1138464, 1149111, 1139190, 1138710, 1138708, 1142913, 1142925, 1137652,\n", + " 1143111, 1144445, 1144596, 1144603, 1136867, 1136864, 1140885, 1141398,\n", + " 1140447, 1144182, 1137606, 1139559, 1139560, 1158692, 1140504, 1140501,\n", + " 1137854, 1147153, 1136369, 1136378, 1141365, 1153056, 1153068, 1163665,\n", + " 1141664, 1139022, 1139019, 1139510, 1140093, 1139127, 1164536, 1147888,\n", + " 1147896, 1140983, 1140990, 1146693, 1147050, 1147047, 1145885, 1145873,\n", + " 1143543, 1143538, 1152976, 1152980, 1152985, 1139447, 1141925, 1146901,\n", + " 1144242, 1141846, 1140695, 1143647, 1143637, 1137570, 1145974, 1143851,\n", + " 1163662, 1146005, 1146024, 1138085, 1154328, 1142533, 1139990, 1143293,\n", + " 1143294, 1147543, 1147540, 1147150, 1148763, 1147282, 1147287, 1142816,\n", + " 1142629, 1142638, 1149366, 1139417, 1143051, 1143040, 1143052, 1148414,\n", + " 1136160, 1157717, 1157720, 1136836, 1136843, 1139297, 1139329, 1144776,\n", + " 1142149, 1143345, 1144619, 1137098, 1144088, 1138600, 1135876, 1150294,\n", + " 1144375, 1146523, 1143957, 1143465, 1143457, 1143947, 1135451, 1147582,\n", + " 1147574, 1149076, 1140361, 1140364, 1137990, 1143075, 1143082, 1144219,\n", + " 1147999, 1134902, 1139252, 1147244, 1148704, 1148715, 1142700, 1141319,\n", + " 1146745, 1146749, 1148465, 1153701, 1158226, 1158228, 1158230, 1143921,\n", + " 1148365, 1154526, 1145240, 1145751, 1142370, 1138638, 1146178, 1138861,\n", + " 1151242, 1152530, 1150445, 1149250, 1148825, 1154438, 1138038, 1144171,\n", + " 1146895, 1152013, 1152023, 1152031, 1145261, 1145262, 1139919, 1139906,\n", + " 1140561, 1148693, 1148696, 1150112, 1150127, 1147019, 1141949, 1150843,\n", + " 1144831, 1151795, 1148744, 1153574, 1148448, 1147653, 1143560, 1143564,\n", + " 1143565, 1151717, 1148288, 1148300, 1137724, 1154420, 1148180, 1148181,\n", + " 1139718, 1146682, 1138872, 1152436, 1152445, 1148729, 1146559, 1148204,\n", + " 1154166, 1153124, 1153192, 1153188, 1153197, 1150935, 1148060, 1152877,\n", + " 1152878, 1143092, 1150352, 1150356, 1146233, 1148095, 1150715, 1148498,\n", + " 1148505, 1149737, 1141423, 1150637, 1146969, 1146972, 1146975, 1146967,\n", + " 1150219, 1146623, 1151691, 1144472, 1156325, 1153026, 1153038, 1150085,\n", + " 1137746, 1137755, 1152820, 1155337, 1152673, 1151617, 1151623, 1150586,\n", + " 1145271, 1136134, 1152957, 1152958, 1152169, 1140932, 1138991, 1152903,\n", + " 1151311, 1143995, 1152341, 1138279, 1136025, 1136028, 1151064, 1151067,\n", + " 1152886, 1152888, 1154722, 1163489, 1137540, 1150104, 1150164, 1144016,\n", + " 1148040, 1161201, 1148903, 1157629, 1137048, 1148626, 1148628, 1158530,\n", + " 1158540, 1137458, 1157456, 1139229, 1157229, 1143442, 1150967, 1158854,\n", + " 1156500, 1152384, 1157064, 1157067, 1139473, 1150465, 1135730, 1152179,\n", + " 1156638, 1153410, 1135647, 1147810, 1139525, 1158308, 1158311, 1151271,\n", + " 1162113, 1154530, 1153999, 1142755, 1156207, 1160440, 1172944, 1156256,\n", + " 1151379, 1155122, 1152519, 1152527, 1155755, 1151425, 1151424, 1135406,\n", + " 1145806, 1145807, 1156463, 1158096, 1154763, 1155620, 1155628, 1155630,\n", + " 1158485, 1154555, 1155576, 1136469, 1158566, 1155646, 1153363, 1161389,\n", + " 1161796, 1154240, 1143189, 1150371, 1153318, 1157439, 1157430, 1150805,\n", + " 1159622, 1159629, 1140748, 1157288, 1157657, 1157663, 1137381, 1138262,\n", + " 1158342, 1145688, 1134682, 1135601, 1135605, 1148149, 1155853, 1155852,\n", + " 1161118, 1156085, 1152220, 1152506, 1140380, 1140381, 1140374, 1155873,\n", + " 1157732, 1157735, 1159132, 1155971, 1155975, 1142070, 1158841, 1156812,\n", + " 1149700, 1136896, 1158815, 1158285, 1151615, 1136480, 1153112, 1152143,\n", + " 1156490, 1153808, 1136640, 1144112, 1144127, 1166424, 1158558, 1159494,\n", + " 1138110, 1155867, 1154337, 1154339, 1158006, 1144581, 1144589, 1155529,\n", + " 1164276, 1142665, 1157759, 1159290, 1156045, 1159042, 1159052, 1159061,\n", + " 1163267, 1158295, 1157945, 1160563, 1162044, 1153052, 1153045, 1171551,\n", + " 1172995, 1162835, 1144146, 1153841, 1153842, 1156104, 1156109, 1138393,\n", + " 1150046, 1164547, 1155479, 1153519, 1146870, 1157614, 1138161, 1138163,\n", + " 1164006, 1164012, 1156795, 1163407, 1154590, 1139592, 1156987, 1148771,\n", + " 1146063, 1158452, 1163452, 1162308, 1140130, 1148607, 1143143, 1165047,\n", + " 1156363, 1158653, 1156181, 1159032, 1169112, 1143735, 1160600, 1155588,\n", + " 1144320, 1162549, 1151223, 1153932, 1148567, 1146500, 1146510, 1144739,\n", + " 1152776, 1165422, 1153201, 1141464, 1141471, 1147433, 1159380, 1182249,\n", + " 1182254, 1156739, 1156742, 1157954, 1150646, 1170253, 1144801, 1144812,\n", + " 1184431, 1140112, 1135567, 1142722, 1167332, 1148683, 1145217, 1145228,\n", + " 1155320, 1147673, 1171683, 1138954, 1150533, 1142136, 1148165, 1143031,\n", + " 1166057, 1166053, 1152624, 1145892, 1145900, 1145902, 1168659, 1152200,\n", + " 1181052, 1143402, 1167503, 1154078, 1170740, 1147338, 1170758, 1145490,\n", + " 1171981, 1144681, 1150525, 1150518, 1156112, 1156119, 1144336, 1157534,\n", + " 1169164, 1169162, 1157331, 1141048, 1180443, 1169359, 1150027, 1150026,\n", + " 1172747, 1171532, 1149683, 1173228, 1158611, 1158623, 1158054, 1149852,\n", + " 1149847, 1152353, 1149398, 1148667, 1148666, 1173307, 1145033, 1169144,\n", + " 1164974, 1151208, 1151696, 1151697, 1157153, 1147709, 1147711, 1151850,\n", + " 1148131, 1147934, 1157593, 1170488, 1183695, 1135021, 1179569, 1167712,\n", + " 1172961, 1146767, 1140326, 1180472, 1144548, 1144550, 1153428, 1159100,\n", + " 1166682, 1181772, 1160314, 1150234, 1154148, 1167504, 1167517, 1186117,\n", + " 1169772, 1167657, 1165967, 1168481, 1143420, 1169618, 1153803, 1153805,\n", + " 1179717, 1158030, 1158031, 1161255, 1161262, 1162129, 1155262, 1154707,\n", + " 1154718, 1157792, 1157795, 1172037, 1143330, 1143333, 1143335, 1178592,\n", + " 1171623, 1157991, 1171738, 1180081, 1184264, 1153899, 1154500, 1164197,\n", + " 1145626, 1156436, 1180383, 1149753, 1152276, 1155990, 1179469, 1158771,\n", + " 1158512, 1158517, 1187090, 1179995, 1158371, 1155899, 1162981, 1162968,\n", + " 1180943, 1189634, 1167762, 1171641, 1182337, 1187407, 1146161, 1170034,\n", + " 1168930, 1190731, 1139828, 1139831, 1139837, 1189379, 1156055, 1191487,\n", + " 1169659, 1146394, 1146395, 1146390, 1176223, 1149544, 1182913, 1140995,\n", + " 1182060, 1189970, 1189977, 1153733, 1194093, 1152115, 1162503, 1162502,\n", + " 1177370, 1185851, 1152080, 1155959, 1185655, 1178290, 1182178, 1190605,\n", + " 1189038, 1191250, 1173826, 1163071, 1191619, 1187036, 1187638, 1194046],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195202, 1199428, 1196800, 1197719, 1195860, 1199282, 1198449, 1198458,\n", + " 1202255, 1198835, 1198840, 1201581, 1201582, 1199248, 1201016, 1196956,\n", + " 1202804, 1194743, 1196631, 1194649, 1194642, 1194648, 1195507, 1195926,\n", + " 1195263, 1196534, 1201992, 1197697, 1201429, 1195895, 1195740, 1196977,\n", + " 1196979, 1195325, 1198668, 1198036, 1198163, 1198167, 1196711, 1199823,\n", + " 1195148, 1195265, 1195270, 1195278, 1197141, 1196242, 1195245, 1197367,\n", + " 1196109, 1198915, 1195659, 1195541, 1196122, 1199998, 1195917, 1196393,\n", + " 1196272, 1198280, 1196851, 1197583, 1199628, 1199803, 1197990, 1197994,\n", + " 1200116, 1194795, 1200671, 1200668, 1197970, 1201117, 1196727, 1202618,\n", + " 1200018, 1199410, 1198811, 1201529, 1200769, 1200450, 1200507, 1198593,\n", + " 1202630, 1201056, 1194814, 1199712, 1199721, 1201047, 1200264, 1200553,\n", + " 1202485, 1196889, 1199908, 1202239, 1200899, 1200907, 1201254, 1202170,\n", + " 1202662, 1201291, 1196761, 1202695, 1198562, 1199606, 1195679, 1195664,\n", + " 1198929, 1198932, 1196920, 1197816, 1197822, 1194720, 1194730, 1197731,\n", + " 1197735, 1199782, 1198819, 1195082, 1201365, 1196428], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195202, 1199428, 1196800, 1197719, 1195860, 1199282, 1198449, 1198458,\n", + " 1202255, 1198835, 1198840, 1201581, 1201582, 1199248, 1201016, 1196956,\n", + " 1202804, 1194743, 1196631, 1194649, 1194642, 1194648, 1195507, 1195926,\n", + " 1195263, 1196534, 1201992, 1197697, 1201429, 1195895, 1195740, 1196977,\n", + " 1196979, 1195325, 1198668, 1198036, 1198163, 1198167, 1196711, 1199823,\n", + " 1195148, 1195265, 1195270, 1195278, 1197141, 1196242, 1195245, 1197367,\n", + " 1196109, 1198915, 1195659, 1195541, 1196122, 1199998, 1195917, 1196393,\n", + " 1196272, 1198280, 1196851, 1197583, 1199628, 1199803, 1197990, 1197994,\n", + " 1200116, 1194795, 1200671, 1200668, 1197970, 1201117, 1196727, 1202618,\n", + " 1200018, 1199410, 1198811, 1201529, 1200769, 1200450, 1200507, 1198593,\n", + " 1202630, 1201056, 1194814, 1199712, 1199721, 1201047, 1200264, 1200553,\n", + " 1202485, 1196889, 1199908, 1202239, 1200899, 1200907, 1201254, 1202170,\n", + " 1202662, 1201291, 1196761, 1202695, 1198562, 1199606, 1195679, 1195664,\n", + " 1198929, 1198932, 1196920, 1197816, 1197822, 1194720, 1194730, 1197731,\n", + " 1197735, 1199782, 1198819, 1195082, 1201365, 1196428], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 1.1617e-01, -5.6722e-04, 5.1253e-01, ..., 6.9444e-02,\n", + " -1.3416e-03, -3.7353e-03],\n", + " [ 1.2761e-01, -7.0637e-04, 5.3704e-01, ..., 5.6844e-02,\n", + " -1.4194e-03, -4.3045e-03],\n", + " [ 1.1078e-01, -5.9348e-04, 5.3184e-01, ..., 6.2231e-02,\n", + " -1.2335e-03, -3.9584e-03],\n", + " ...,\n", + " [ 1.2569e-01, -6.4809e-04, 5.3687e-01, ..., 6.6112e-02,\n", + " -1.3844e-03, -3.9103e-03],\n", + " [ 4.7153e-02, -1.2728e-04, 4.5169e-01, ..., 8.1979e-02,\n", + " -1.0795e-03, -3.2492e-03],\n", + " [ 1.1078e-01, -5.9348e-04, 5.3184e-01, ..., 6.2231e-02,\n", + " -1.2335e-03, -3.9584e-03]], device='cuda:0'), 'paper': tensor([[ 1.7345, -0.0262, 1.0314, ..., -0.0147, -0.0236, 1.5998],\n", + " [ 1.6460, -0.0246, 0.7091, ..., -0.0082, -0.0243, 2.4618],\n", + " [ 1.1195, -0.0257, 0.0045, ..., -0.0124, -0.0172, 1.1925],\n", + " ...,\n", + " [ 1.5277, -0.0212, 0.4150, ..., -0.0078, -0.0215, 2.1988],\n", + " [ 1.0702, -0.0343, 0.0069, ..., -0.0148, -0.0193, 0.9063],\n", + " [ 1.7907, -0.0273, 0.5696, ..., -0.0070, -0.0268, 3.1016]],\n", + " device='cuda:0'), 'author': tensor([[ 8.4447e-02, 7.1657e-02, 1.0786e-01, ..., 6.6527e-01,\n", + " -2.3071e-03, 2.3157e-02],\n", + " [ 1.5826e-01, -1.0095e-03, 6.9458e-02, ..., 6.7714e-01,\n", + " 9.5723e-02, 2.3384e-01],\n", + " [ 1.8875e-01, -1.6494e-03, 8.0020e-02, ..., 6.3587e-01,\n", + " 1.1417e-01, 2.0276e-01],\n", + " ...,\n", + " [ 1.9937e-01, -1.1015e-03, 1.0018e-01, ..., 6.7359e-01,\n", + " 1.1252e-01, 2.9333e-01],\n", + " [ 1.8126e-01, -4.8921e-04, 4.1620e-02, ..., 5.3881e-01,\n", + " 6.4547e-02, 2.1725e-01],\n", + " [ 2.4167e-01, -1.7658e-03, 4.2846e-03, ..., 6.5103e-01,\n", + " 2.2909e-01, 3.0364e-01]], device='cuda:0'), 'field_of_study': tensor([[-1.9498e-03, 8.4408e-02, 8.7395e-02, ..., -1.5821e-03,\n", + " -6.2645e-04, -2.9237e-03],\n", + " [-3.4505e-03, 3.1482e-01, 1.3617e-01, ..., 1.7516e-01,\n", + " -3.9444e-04, -3.8454e-03],\n", + " [-2.5713e-03, 1.2751e-01, 6.4691e-02, ..., -5.8713e-04,\n", + " -3.5806e-04, -3.1093e-03],\n", + " ...,\n", + " [-1.5537e-03, 1.7336e-01, 1.2573e-01, ..., -2.0156e-03,\n", + " -1.5186e-03, -2.6885e-03],\n", + " [-2.2931e-03, 1.1553e-01, 3.4614e-02, ..., -8.8188e-04,\n", + " -2.5359e-04, -3.2607e-03],\n", + " [-1.6055e-03, 2.1779e-01, 9.6045e-02, ..., -9.9164e-04,\n", + " 1.0560e-02, -3.8710e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 149, 97, 86, 112, 106, 136, 136, 10, 331, 254, 254, 254,\n", + " 315, 254, 303, 383, 450, 536, 609, 664, 794, 751, 751, 598,\n", + " 598, 598, 831, 1049, 1049, 1120, 1078, 1126, 1257, 1488, 1382, 1382,\n", + " 1382, 1134, 1134, 1275, 1475, 1311, 1311, 1588, 1276, 1276, 1561, 1510,\n", + " 1510, 1608, 1546, 1812, 1546, 1546, 1731, 1699, 1652, 1798, 2046, 2012,\n", + " 1863, 1863, 2110, 2110, 2028, 2118, 2221, 2212, 2556, 2271, 2438, 2427,\n", + " 2528, 2604, 2616, 2813, 2813, 2813, 3089, 3206, 3206, 3243, 3205, 3247,\n", + " 3247, 3274, 3274, 3274, 3377, 3549, 3473, 3850, 3730, 3874, 3748, 4198,\n", + " 4019, 4038, 4038, 3801, 3801, 4256, 4087, 3895, 4280, 4319, 4408, 4527,\n", + " 4595, 4813, 4685, 4662, 4787, 4849, 4751, 4751, 4806, 4852, 4751, 4970,\n", + " 4970, 4868, 4984, 5132, 5079, 5089, 5089, 5042, 5290, 5476, 5364, 5364,\n", + " 5439, 5576, 5643, 5646, 5646, 5703, 5643, 5676, 5676, 5512, 5800, 5602,\n", + " 5602, 5602, 5602, 5674, 5674, 5859, 6102, 5968, 5750, 6172, 6795, 6693,\n", + " 6676, 6676, 6676, 6258, 6015, 6015, 6830, 6470, 6356, 6830, 6801, 6763,\n", + " 6763, 6423, 6423, 6639, 6743, 6743, 6743, 6667],\n", + " [ 6, 98, 100, 7, 13, 115, 41, 63, 82, 3, 103, 15,\n", + " 88, 20, 25, 91, 74, 8, 103, 35, 25, 54, 70, 106,\n", + " 53, 12, 27, 104, 60, 19, 58, 70, 22, 68, 14, 97,\n", + " 26, 70, 16, 46, 47, 70, 34, 81, 70, 92, 52, 64,\n", + " 5, 105, 70, 39, 84, 32, 18, 116, 93, 52, 97, 114,\n", + " 52, 23, 66, 42, 47, 52, 52, 47, 86, 91, 70, 12,\n", + " 18, 42, 78, 24, 42, 43, 109, 106, 75, 101, 37, 99,\n", + " 5, 33, 61, 69, 92, 6, 113, 10, 42, 94, 63, 30,\n", + " 24, 71, 56, 95, 28, 62, 21, 116, 96, 89, 70, 72,\n", + " 9, 106, 85, 59, 65, 32, 29, 105, 77, 6, 83, 99,\n", + " 4, 45, 70, 9, 48, 2, 36, 113, 44, 51, 57, 11,\n", + " 70, 70, 107, 50, 70, 1, 26, 13, 70, 73, 17, 79,\n", + " 117, 90, 6, 70, 108, 80, 110, 45, 40, 87, 68, 70,\n", + " 75, 111, 76, 8, 70, 102, 70, 49, 112, 67, 110, 55,\n", + " 70, 70, 30, 105, 38, 70, 0, 31]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 289, 938, 938, ..., 5019, 938, 789],\n", + " [ 178, 178, 285, ..., 5727, 5857, 5930]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 13, 25, 12, ..., 25, 99, 5],\n", + " [ 11, 182, 184, ..., 6710, 6858, 6637]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 123, 123, 123, ..., 5765, 5765, 5765],\n", + " [ 111, 116, 242, ..., 667, 744, 753]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 496, 454, 153, ..., 503, 72, 739],\n", + " [ 206, 112, 5, ..., 5862, 5925, 5876]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5893, 4433, 3368, ..., 5521, 2792, 1093],\n", + " [ 3, 32, 49, ..., 6814, 6786, 6777]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 123, 123, 123, ..., 5898, 5853, 5797],\n", + " [1199, 1269, 1225, ..., 3128, 3501, 2394]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 157, 157, 157, ..., 6639, 6639, 6639],\n", + " [2251, 3688, 4685, ..., 5634, 5675, 5055]], device='cuda:0')}\n", + "Epoch: 002, Loss: 0.9566, Train: 388.6000\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.015263\n", + "sampling 0.014001\n", + "noi time: 0.003088\n", + "get_vertex_data call: 0.064078\n", + "noi group time: 0.00271\n", + "eoi_group_time: 0.013957\n", + "second half: 0.239551\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16691, 31145, 24187, ..., 1118700, 1120077, 1133550],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16691, 31145, 24187, ..., 1118700, 1120077, 1133550],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1203800, 1215822, 1214596, ..., 1937149, 1937998, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1203800, 1215822, 1214596, ..., 1937149, 1937998, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1137204, 1137212, 1141424, 1140284, 1135926, 1135152, 1141758,\n", + " 1137517, 1140297, 1136969, 1136971, 1146803, 1143615, 1149831, 1149839,\n", + " 1145373, 1137947, 1137271, 1138938, 1146427, 1143372, 1139246, 1139241,\n", + " 1140781, 1150504, 1139866, 1135385, 1149216, 1143820, 1149632, 1147473,\n", + " 1147477, 1135992, 1149283, 1142893, 1144636, 1149039, 1146995, 1148345,\n", + " 1148350, 1152664, 1148546, 1153221, 1147094, 1137220, 1155019, 1147201,\n", + " 1147211, 1136679, 1150329, 1138749, 1140308, 1151545, 1140540, 1138112,\n", + " 1151531, 1140158, 1140020, 1135367, 1135202, 1135903, 1141036, 1134794,\n", + " 1138508, 1135342, 1139204, 1144395, 1135408, 1135418, 1157395, 1136662,\n", + " 1137441, 1139161, 1135579, 1136111, 1140970, 1140719, 1138514, 1153094,\n", + " 1153099, 1137957, 1158136, 1154132, 1145132, 1156899, 1156909, 1135522,\n", + " 1139685, 1138319, 1137289, 1157703, 1138436, 1138440, 1138445, 1138457,\n", + " 1138461, 1138462, 1137491, 1136594, 1135088, 1138889, 1156605, 1147112,\n", + " 1142611, 1142612, 1135346, 1135631, 1138185, 1158984, 1145843, 1148531,\n", + " 1139667, 1139673, 1138069, 1134992, 1142434, 1148809, 1135789, 1136734,\n", + " 1158961, 1158968, 1158971, 1158974, 1159009, 1159019, 1144406, 1153544,\n", + " 1140034, 1139076, 1141963, 1141966, 1134891, 1140557, 1141995, 1152044,\n", + " 1142302, 1136057, 1137734, 1137728, 1147317, 1134750, 1137005, 1135549,\n", + " 1136697, 1141088, 1141097, 1143767, 1142499, 1152709, 1141224, 1139386,\n", + " 1143667, 1144237, 1140592, 1140597, 1141156, 1141786, 1139495, 1144941,\n", + " 1136760, 1141609, 1134987, 1136854, 1137087, 1138482, 1141810, 1143153,\n", + " 1140173, 1140163, 1137766, 1149111, 1141482, 1138708, 1140101, 1142917,\n", + " 1142913, 1143113, 1144596, 1136871, 1144182, 1144184, 1137614, 1144865,\n", + " 1158699, 1147153, 1141365, 1141367, 1153068, 1141678, 1149097, 1138292,\n", + " 1144277, 1144284, 1143917, 1139508, 1139510, 1139127, 1145000, 1145001,\n", + " 1140616, 1140619, 1140990, 1143692, 1147050, 1145873, 1149876, 1152976,\n", + " 1135457, 1139453, 1141925, 1146901, 1144242, 1145332, 1140579, 1140582,\n", + " 1141841, 1134856, 1145974, 1143845, 1143851, 1146016, 1146024, 1138094,\n", + " 1146140, 1139990, 1143294, 1143280, 1147147, 1147150, 1148763, 1147282,\n", + " 1142816, 1140349, 1143663, 1149366, 1139417, 1143042, 1136167, 1157718,\n", + " 1157720, 1136836, 1139329, 1139328, 1143345, 1135876, 1146523, 1138018,\n", + " 1143456, 1143457, 1137697, 1140483, 1143937, 1147521, 1147523, 1140364,\n", + " 1149582, 1143080, 1168921, 1144219, 1147996, 1147999, 1134899, 1144013,\n", + " 1139252, 1147237, 1154481, 1148704, 1141327, 1141825, 1146745, 1146742,\n", + " 1147024, 1147971, 1145012, 1145021, 1145009, 1139549, 1158228, 1143927,\n", + " 1145751, 1138626, 1148397, 1146178, 1150438, 1150445, 1148826, 1144526,\n", + " 1146887, 1152013, 1169726, 1151480, 1151482, 1152022, 1152023, 1154271,\n", + " 1154263, 1149594, 1134873, 1149534, 1147023, 1141949, 1141271, 1151795,\n", + " 1148745, 1153574, 1143560, 1149412, 1148300, 1152073, 1135083, 1164893,\n", + " 1139088, 1139096, 1154430, 1154420, 1136249, 1146676, 1146686, 1138867,\n", + " 1157968, 1148720, 1148725, 1145862, 1146544, 1149821, 1151941, 1148096,\n", + " 1148108, 1171943, 1169367, 1154201, 1153124, 1153192, 1153188, 1150935,\n", + " 1152878, 1144863, 1150352, 1150356, 1155094, 1143129, 1143135, 1147442,\n", + " 1151821, 1152591, 1154183, 1148498, 1149737, 1141420, 1155164, 1147733,\n", + " 1147737, 1153449, 1145080, 1146969, 1146972, 1149356, 1149359, 1151935,\n", + " 1153249, 1153255, 1146616, 1146623, 1151402, 1152407, 1154063, 1151731,\n", + " 1156321, 1153032, 1153038, 1137746, 1152622, 1155145, 1155146, 1136410,\n", + " 1149203, 1151964, 1155337, 1155334, 1154120, 1154123, 1157833, 1152673,\n", + " 1151617, 1150578, 1148914, 1148916, 1152946, 1152950, 1152227, 1138991,\n", + " 1152903, 1152341, 1156823, 1156826, 1156816, 1146708, 1138275, 1157147,\n", + " 1136028, 1158704, 1150150, 1150164, 1148040, 1155231, 1144667, 1137048,\n", + " 1148628, 1158540, 1148380, 1137458, 1149947, 1154564, 1178126, 1153085,\n", + " 1142041, 1142047, 1143442, 1158863, 1158916, 1156505, 1155418, 1146851,\n", + " 1135231, 1135730, 1152183, 1156638, 1151788, 1157909, 1150828, 1156935,\n", + " 1158304, 1158306, 1158308, 1158311, 1151330, 1155441, 1155442, 1153359,\n", + " 1150129, 1150130, 1154529, 1154530, 1156913, 1142755, 1164631, 1151379,\n", + " 1137912, 1158629, 1155122, 1155755, 1155758, 1151424, 1135394, 1146924,\n", + " 1155628, 1155630, 1154555, 1158824, 1158325, 1157000, 1155646, 1155634,\n", + " 1158355, 1143254, 1143263, 1154240, 1154080, 1154902, 1143189, 1153322,\n", + " 1157439, 1150077, 1155613, 1141627, 1150987, 1155288, 1157289, 1137167,\n", + " 1137152, 1157653, 1157660, 1153776, 1153781, 1168145, 1134677, 1134685,\n", + " 1134682, 1135601, 1150661, 1155852, 1157684, 1146326, 1161116, 1140633,\n", + " 1144451, 1152220, 1152509, 1156695, 1140374, 1157026, 1142466, 1155975,\n", + " 1158846, 1155396, 1149700, 1154600, 1158760, 1158886, 1157304, 1159164,\n", + " 1158815, 1158274, 1151615, 1136480, 1164931, 1156665, 1147585, 1147599,\n", + " 1153808, 1156276, 1136640, 1136646, 1158558, 1153827, 1156514, 1146126,\n", + " 1138099, 1138110, 1155529, 1155528, 1161539, 1135661, 1142658, 1164148,\n", + " 1157747, 1162672, 1159042, 1159052, 1159061, 1158300, 1157944, 1153052,\n", + " 1153045, 1170855, 1156104, 1138396, 1138393, 1167184, 1150032, 1150046,\n", + " 1149063, 1149070, 1145945, 1153519, 1138161, 1156785, 1156789, 1149956,\n", + " 1149963, 1148021, 1156991, 1157357, 1146354, 1140643, 1148600, 1148607,\n", + " 1143143, 1163019, 1164497, 1156355, 1158643, 1158653, 1156187, 1159025,\n", + " 1159029, 1159032, 1143729, 1155588, 1156589, 1144989, 1167933, 1147401,\n", + " 1149014, 1146509, 1153239, 1144737, 1144747, 1152776, 1155048, 1165421,\n", + " 1153201, 1141471, 1156737, 1156739, 1156744, 1153663, 1171040, 1144812,\n", + " 1135567, 1156300, 1166917, 1148683, 1169282, 1146042, 1155320, 1147673,\n", + " 1138762, 1142136, 1143025, 1147680, 1147689, 1147694, 1145447, 1147355,\n", + " 1170502, 1139351, 1139345, 1147724, 1145902, 1153520, 1153534, 1171571,\n", + " 1152203, 1152206, 1170980, 1171277, 1154070, 1167326, 1163639, 1177922,\n", + " 1169298, 1155172, 1156119, 1144336, 1157534, 1154670, 1152998, 1166006,\n", + " 1157331, 1141043, 1154364, 1149684, 1158051, 1173047, 1153294, 1149846,\n", + " 1149847, 1172076, 1167383, 1172488, 1170279, 1149398, 1149402, 1148667,\n", + " 1148666, 1172838, 1172143, 1148324, 1173307, 1145025, 1189233, 1154018,\n", + " 1154027, 1157158, 1157153, 1167232, 1167238, 1147711, 1151850, 1149247,\n", + " 1170488, 1170490, 1135018, 1171798, 1155739, 1174417, 1162106, 1168697,\n", + " 1166746, 1168597, 1160977, 1160979, 1166028, 1178056, 1159099, 1159100,\n", + " 1171823, 1150234, 1161591, 1154151, 1154148, 1158176, 1149169, 1149174,\n", + " 1149173, 1143279, 1169769, 1165960, 1153803, 1172354, 1178467, 1180817,\n", + " 1172800, 1185145, 1183123, 1151519, 1179807, 1166551, 1161255, 1177576,\n", + " 1171623, 1178359, 1155799, 1157126, 1187529, 1192691, 1153898, 1154497,\n", + " 1191749, 1145626, 1156433, 1157483, 1161067, 1184996, 1180732, 1174403,\n", + " 1181354, 1153601, 1163045, 1158512, 1181952, 1186007, 1158940, 1186995,\n", + " 1155890, 1155892, 1155899, 1155889, 1155895, 1186099, 1168886, 1168890,\n", + " 1166107, 1163422, 1181469, 1161819, 1183831, 1183008, 1156539, 1139831,\n", + " 1150265, 1154812, 1156055, 1191726, 1149536, 1182891, 1192167, 1178523,\n", + " 1181946, 1192195, 1193246, 1159169, 1152112, 1189521, 1162503, 1169707,\n", + " 1177285, 1172423, 1172424, 1172122, 1166789, 1179749, 1155956, 1155959,\n", + " 1155962, 1180276, 1179769, 1185356, 1189667, 1190908, 1182852, 1157008],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1137204, 1137212, 1141424, 1140284, 1135926, 1135152, 1141758,\n", + " 1137517, 1140297, 1136969, 1136971, 1146803, 1143615, 1149831, 1149839,\n", + " 1145373, 1137947, 1137271, 1138938, 1146427, 1143372, 1139246, 1139241,\n", + " 1140781, 1150504, 1139866, 1135385, 1149216, 1143820, 1149632, 1147473,\n", + " 1147477, 1135992, 1149283, 1142893, 1144636, 1149039, 1146995, 1148345,\n", + " 1148350, 1152664, 1148546, 1153221, 1147094, 1137220, 1155019, 1147201,\n", + " 1147211, 1136679, 1150329, 1138749, 1140308, 1151545, 1140540, 1138112,\n", + " 1151531, 1140158, 1140020, 1135367, 1135202, 1135903, 1141036, 1134794,\n", + " 1138508, 1135342, 1139204, 1144395, 1135408, 1135418, 1157395, 1136662,\n", + " 1137441, 1139161, 1135579, 1136111, 1140970, 1140719, 1138514, 1153094,\n", + " 1153099, 1137957, 1158136, 1154132, 1145132, 1156899, 1156909, 1135522,\n", + " 1139685, 1138319, 1137289, 1157703, 1138436, 1138440, 1138445, 1138457,\n", + " 1138461, 1138462, 1137491, 1136594, 1135088, 1138889, 1156605, 1147112,\n", + " 1142611, 1142612, 1135346, 1135631, 1138185, 1158984, 1145843, 1148531,\n", + " 1139667, 1139673, 1138069, 1134992, 1142434, 1148809, 1135789, 1136734,\n", + " 1158961, 1158968, 1158971, 1158974, 1159009, 1159019, 1144406, 1153544,\n", + " 1140034, 1139076, 1141963, 1141966, 1134891, 1140557, 1141995, 1152044,\n", + " 1142302, 1136057, 1137734, 1137728, 1147317, 1134750, 1137005, 1135549,\n", + " 1136697, 1141088, 1141097, 1143767, 1142499, 1152709, 1141224, 1139386,\n", + " 1143667, 1144237, 1140592, 1140597, 1141156, 1141786, 1139495, 1144941,\n", + " 1136760, 1141609, 1134987, 1136854, 1137087, 1138482, 1141810, 1143153,\n", + " 1140173, 1140163, 1137766, 1149111, 1141482, 1138708, 1140101, 1142917,\n", + " 1142913, 1143113, 1144596, 1136871, 1144182, 1144184, 1137614, 1144865,\n", + " 1158699, 1147153, 1141365, 1141367, 1153068, 1141678, 1149097, 1138292,\n", + " 1144277, 1144284, 1143917, 1139508, 1139510, 1139127, 1145000, 1145001,\n", + " 1140616, 1140619, 1140990, 1143692, 1147050, 1145873, 1149876, 1152976,\n", + " 1135457, 1139453, 1141925, 1146901, 1144242, 1145332, 1140579, 1140582,\n", + " 1141841, 1134856, 1145974, 1143845, 1143851, 1146016, 1146024, 1138094,\n", + " 1146140, 1139990, 1143294, 1143280, 1147147, 1147150, 1148763, 1147282,\n", + " 1142816, 1140349, 1143663, 1149366, 1139417, 1143042, 1136167, 1157718,\n", + " 1157720, 1136836, 1139329, 1139328, 1143345, 1135876, 1146523, 1138018,\n", + " 1143456, 1143457, 1137697, 1140483, 1143937, 1147521, 1147523, 1140364,\n", + " 1149582, 1143080, 1168921, 1144219, 1147996, 1147999, 1134899, 1144013,\n", + " 1139252, 1147237, 1154481, 1148704, 1141327, 1141825, 1146745, 1146742,\n", + " 1147024, 1147971, 1145012, 1145021, 1145009, 1139549, 1158228, 1143927,\n", + " 1145751, 1138626, 1148397, 1146178, 1150438, 1150445, 1148826, 1144526,\n", + " 1146887, 1152013, 1169726, 1151480, 1151482, 1152022, 1152023, 1154271,\n", + " 1154263, 1149594, 1134873, 1149534, 1147023, 1141949, 1141271, 1151795,\n", + " 1148745, 1153574, 1143560, 1149412, 1148300, 1152073, 1135083, 1164893,\n", + " 1139088, 1139096, 1154430, 1154420, 1136249, 1146676, 1146686, 1138867,\n", + " 1157968, 1148720, 1148725, 1145862, 1146544, 1149821, 1151941, 1148096,\n", + " 1148108, 1171943, 1169367, 1154201, 1153124, 1153192, 1153188, 1150935,\n", + " 1152878, 1144863, 1150352, 1150356, 1155094, 1143129, 1143135, 1147442,\n", + " 1151821, 1152591, 1154183, 1148498, 1149737, 1141420, 1155164, 1147733,\n", + " 1147737, 1153449, 1145080, 1146969, 1146972, 1149356, 1149359, 1151935,\n", + " 1153249, 1153255, 1146616, 1146623, 1151402, 1152407, 1154063, 1151731,\n", + " 1156321, 1153032, 1153038, 1137746, 1152622, 1155145, 1155146, 1136410,\n", + " 1149203, 1151964, 1155337, 1155334, 1154120, 1154123, 1157833, 1152673,\n", + " 1151617, 1150578, 1148914, 1148916, 1152946, 1152950, 1152227, 1138991,\n", + " 1152903, 1152341, 1156823, 1156826, 1156816, 1146708, 1138275, 1157147,\n", + " 1136028, 1158704, 1150150, 1150164, 1148040, 1155231, 1144667, 1137048,\n", + " 1148628, 1158540, 1148380, 1137458, 1149947, 1154564, 1178126, 1153085,\n", + " 1142041, 1142047, 1143442, 1158863, 1158916, 1156505, 1155418, 1146851,\n", + " 1135231, 1135730, 1152183, 1156638, 1151788, 1157909, 1150828, 1156935,\n", + " 1158304, 1158306, 1158308, 1158311, 1151330, 1155441, 1155442, 1153359,\n", + " 1150129, 1150130, 1154529, 1154530, 1156913, 1142755, 1164631, 1151379,\n", + " 1137912, 1158629, 1155122, 1155755, 1155758, 1151424, 1135394, 1146924,\n", + " 1155628, 1155630, 1154555, 1158824, 1158325, 1157000, 1155646, 1155634,\n", + " 1158355, 1143254, 1143263, 1154240, 1154080, 1154902, 1143189, 1153322,\n", + " 1157439, 1150077, 1155613, 1141627, 1150987, 1155288, 1157289, 1137167,\n", + " 1137152, 1157653, 1157660, 1153776, 1153781, 1168145, 1134677, 1134685,\n", + " 1134682, 1135601, 1150661, 1155852, 1157684, 1146326, 1161116, 1140633,\n", + " 1144451, 1152220, 1152509, 1156695, 1140374, 1157026, 1142466, 1155975,\n", + " 1158846, 1155396, 1149700, 1154600, 1158760, 1158886, 1157304, 1159164,\n", + " 1158815, 1158274, 1151615, 1136480, 1164931, 1156665, 1147585, 1147599,\n", + " 1153808, 1156276, 1136640, 1136646, 1158558, 1153827, 1156514, 1146126,\n", + " 1138099, 1138110, 1155529, 1155528, 1161539, 1135661, 1142658, 1164148,\n", + " 1157747, 1162672, 1159042, 1159052, 1159061, 1158300, 1157944, 1153052,\n", + " 1153045, 1170855, 1156104, 1138396, 1138393, 1167184, 1150032, 1150046,\n", + " 1149063, 1149070, 1145945, 1153519, 1138161, 1156785, 1156789, 1149956,\n", + " 1149963, 1148021, 1156991, 1157357, 1146354, 1140643, 1148600, 1148607,\n", + " 1143143, 1163019, 1164497, 1156355, 1158643, 1158653, 1156187, 1159025,\n", + " 1159029, 1159032, 1143729, 1155588, 1156589, 1144989, 1167933, 1147401,\n", + " 1149014, 1146509, 1153239, 1144737, 1144747, 1152776, 1155048, 1165421,\n", + " 1153201, 1141471, 1156737, 1156739, 1156744, 1153663, 1171040, 1144812,\n", + " 1135567, 1156300, 1166917, 1148683, 1169282, 1146042, 1155320, 1147673,\n", + " 1138762, 1142136, 1143025, 1147680, 1147689, 1147694, 1145447, 1147355,\n", + " 1170502, 1139351, 1139345, 1147724, 1145902, 1153520, 1153534, 1171571,\n", + " 1152203, 1152206, 1170980, 1171277, 1154070, 1167326, 1163639, 1177922,\n", + " 1169298, 1155172, 1156119, 1144336, 1157534, 1154670, 1152998, 1166006,\n", + " 1157331, 1141043, 1154364, 1149684, 1158051, 1173047, 1153294, 1149846,\n", + " 1149847, 1172076, 1167383, 1172488, 1170279, 1149398, 1149402, 1148667,\n", + " 1148666, 1172838, 1172143, 1148324, 1173307, 1145025, 1189233, 1154018,\n", + " 1154027, 1157158, 1157153, 1167232, 1167238, 1147711, 1151850, 1149247,\n", + " 1170488, 1170490, 1135018, 1171798, 1155739, 1174417, 1162106, 1168697,\n", + " 1166746, 1168597, 1160977, 1160979, 1166028, 1178056, 1159099, 1159100,\n", + " 1171823, 1150234, 1161591, 1154151, 1154148, 1158176, 1149169, 1149174,\n", + " 1149173, 1143279, 1169769, 1165960, 1153803, 1172354, 1178467, 1180817,\n", + " 1172800, 1185145, 1183123, 1151519, 1179807, 1166551, 1161255, 1177576,\n", + " 1171623, 1178359, 1155799, 1157126, 1187529, 1192691, 1153898, 1154497,\n", + " 1191749, 1145626, 1156433, 1157483, 1161067, 1184996, 1180732, 1174403,\n", + " 1181354, 1153601, 1163045, 1158512, 1181952, 1186007, 1158940, 1186995,\n", + " 1155890, 1155892, 1155899, 1155889, 1155895, 1186099, 1168886, 1168890,\n", + " 1166107, 1163422, 1181469, 1161819, 1183831, 1183008, 1156539, 1139831,\n", + " 1150265, 1154812, 1156055, 1191726, 1149536, 1182891, 1192167, 1178523,\n", + " 1181946, 1192195, 1193246, 1159169, 1152112, 1189521, 1162503, 1169707,\n", + " 1177285, 1172423, 1172424, 1172122, 1166789, 1179749, 1155956, 1155959,\n", + " 1155962, 1180276, 1179769, 1185356, 1189667, 1190908, 1182852, 1157008],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196011, 1199424, 1199439, 1197719, 1198459, 1202243, 1202255, 1198840,\n", + " 1198844, 1201577, 1201581, 1194626, 1196956, 1194866, 1194743, 1194745,\n", + " 1195726, 1196631, 1194655, 1194642, 1195514, 1195263, 1199135, 1201992,\n", + " 1196031, 1198542, 1198543, 1201431, 1201427, 1194956, 1194952, 1195888,\n", + " 1195740, 1198097, 1194754, 1198668, 1199109, 1198958, 1198163, 1198167,\n", + " 1196711, 1195270, 1195278, 1197139, 1197141, 1197140, 1200765, 1196247,\n", + " 1197265, 1196109, 1194830, 1195842, 1198915, 1195541, 1197476, 1196122,\n", + " 1196128, 1194928, 1199685, 1200872, 1199152, 1198404, 1199231, 1198329,\n", + " 1201511, 1196508, 1199018, 1196727, 1196734, 1195773, 1198428, 1198811,\n", + " 1199083, 1200779, 1200570, 1200503, 1201421, 1200991, 1199723, 1201043,\n", + " 1200363, 1201737, 1200546, 1200553, 1200555, 1203071, 1200430, 1199208,\n", + " 1197100, 1201757, 1202138, 1196779, 1202239, 1200899, 1202170, 1195878,\n", + " 1200176, 1201291, 1196761, 1202209, 1200784, 1198518, 1195672, 1195679,\n", + " 1200439, 1200276, 1198911, 1195285, 1200590, 1203102, 1198824, 1199395,\n", + " 1196786, 1200437, 1202690, 1201001, 1198131, 1200302, 1200710, 1195165,\n", + " 1197872], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196011, 1199424, 1199439, 1197719, 1198459, 1202243, 1202255, 1198840,\n", + " 1198844, 1201577, 1201581, 1194626, 1196956, 1194866, 1194743, 1194745,\n", + " 1195726, 1196631, 1194655, 1194642, 1195514, 1195263, 1199135, 1201992,\n", + " 1196031, 1198542, 1198543, 1201431, 1201427, 1194956, 1194952, 1195888,\n", + " 1195740, 1198097, 1194754, 1198668, 1199109, 1198958, 1198163, 1198167,\n", + " 1196711, 1195270, 1195278, 1197139, 1197141, 1197140, 1200765, 1196247,\n", + " 1197265, 1196109, 1194830, 1195842, 1198915, 1195541, 1197476, 1196122,\n", + " 1196128, 1194928, 1199685, 1200872, 1199152, 1198404, 1199231, 1198329,\n", + " 1201511, 1196508, 1199018, 1196727, 1196734, 1195773, 1198428, 1198811,\n", + " 1199083, 1200779, 1200570, 1200503, 1201421, 1200991, 1199723, 1201043,\n", + " 1200363, 1201737, 1200546, 1200553, 1200555, 1203071, 1200430, 1199208,\n", + " 1197100, 1201757, 1202138, 1196779, 1202239, 1200899, 1202170, 1195878,\n", + " 1200176, 1201291, 1196761, 1202209, 1200784, 1198518, 1195672, 1195679,\n", + " 1200439, 1200276, 1198911, 1195285, 1200590, 1203102, 1198824, 1199395,\n", + " 1196786, 1200437, 1202690, 1201001, 1198131, 1200302, 1200710, 1195165,\n", + " 1197872], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 5.1992e-02, -4.3465e-04, 4.2451e-01, ..., 7.7193e-02,\n", + " -1.3491e-03, -3.1488e-03],\n", + " [ 5.4810e-02, -4.1705e-04, 3.5623e-01, ..., 9.8565e-02,\n", + " -1.4694e-03, -2.8250e-03],\n", + " [ 7.8316e-02, 3.3431e-02, 3.8726e-01, ..., 5.6384e-02,\n", + " -9.2579e-04, -3.2133e-03],\n", + " ...,\n", + " [ 1.6332e-02, -2.4656e-04, 3.6560e-01, ..., 5.6286e-02,\n", + " -1.1152e-03, -2.5627e-03],\n", + " [ 5.1992e-02, -4.3465e-04, 4.2451e-01, ..., 7.7193e-02,\n", + " -1.3491e-03, -3.1488e-03],\n", + " [ 6.4692e-02, -4.0498e-04, 2.8418e-01, ..., 5.2420e-02,\n", + " -1.1165e-03, -2.6077e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 1.6635e+00, -2.6259e-02, 6.4218e-01, ..., -8.3131e-03,\n", + " -2.5819e-02, 2.8293e+00],\n", + " [ 9.6518e-01, -1.9156e-02, -6.5899e-04, ..., -9.0506e-03,\n", + " -1.5645e-02, 1.3231e+00],\n", + " [ 1.0109e+00, -2.1872e-02, 1.1132e-01, ..., -8.9635e-03,\n", + " -1.5363e-02, 1.2731e+00],\n", + " ...,\n", + " [ 1.6749e+00, -2.0999e-02, 2.6114e-01, ..., -6.7426e-03,\n", + " -2.2453e-02, 2.5585e+00],\n", + " [ 1.0790e+00, -2.0094e-02, -2.5618e-03, ..., -1.0270e-02,\n", + " -1.5083e-02, 1.3267e+00],\n", + " [ 1.7654e+00, -2.7284e-02, 5.4501e-01, ..., -7.0840e-03,\n", + " -2.6571e-02, 3.0444e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[ 1.0260e-01, 8.7138e-02, 1.5722e-01, ..., 6.3163e-01,\n", + " -8.9118e-04, 1.2361e-01],\n", + " [ 2.2610e-01, -2.1483e-03, 5.6139e-02, ..., 6.5570e-01,\n", + " 2.1593e-01, 2.8637e-01],\n", + " [ 2.5104e-01, -2.1603e-03, 1.6324e-02, ..., 6.6822e-01,\n", + " 1.4365e-01, 2.8322e-01],\n", + " ...,\n", + " [ 1.2852e-01, -5.6280e-04, 1.5346e-01, ..., 5.6720e-01,\n", + " 1.2429e-01, 2.0867e-01],\n", + " [ 1.6941e-01, -1.6750e-03, 2.7314e-02, ..., 6.5562e-01,\n", + " 1.2153e-01, 2.5389e-01],\n", + " [ 5.9613e-02, -1.6822e-04, 6.4506e-03, ..., 4.9856e-01,\n", + " -2.1998e-04, 1.0285e-01]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-2.5385e-03, 7.1286e-02, 1.7819e-01, ..., -2.5200e-03,\n", + " -1.0245e-03, -2.5253e-03],\n", + " [-1.8792e-03, -7.6287e-05, 1.3996e-01, ..., -2.2510e-03,\n", + " -1.1344e-03, -2.6145e-03],\n", + " [-2.0532e-03, 9.4183e-02, 1.1071e-01, ..., -3.2795e-03,\n", + " -2.5767e-04, -1.7977e-03],\n", + " ...,\n", + " [-2.3726e-03, 1.3396e-01, 1.9929e-01, ..., -2.5884e-03,\n", + " -2.4023e-04, -3.0172e-03],\n", + " [-9.8958e-04, 1.5667e-01, 2.4098e-01, ..., -1.6729e-03,\n", + " -7.8339e-04, -1.1919e-03],\n", + " [-9.2941e-04, 5.3158e-02, 8.7636e-02, ..., -3.5287e-03,\n", + " -1.5912e-03, -2.5052e-03]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 94, 4, 151, 69, 4, 4, 167, 167, 531, 261, 559, 250,\n", + " 404, 553, 388, 706, 891, 891, 783, 504, 655, 1123, 673, 673,\n", + " 589, 1108, 1180, 1224, 852, 1022, 833, 833, 833, 1229, 1470, 1417,\n", + " 1691, 1584, 1584, 1584, 1654, 1651, 1737, 1682, 1676, 1676, 1693, 2012,\n", + " 1979, 1794, 1837, 1849, 2167, 2170, 1954, 1959, 2064, 2094, 2133, 1989,\n", + " 1989, 2133, 2081, 2081, 2123, 2123, 2144, 2240, 2315, 2460, 2278, 2297,\n", + " 2385, 2433, 2318, 2464, 2374, 2374, 2480, 2480, 2357, 2357, 2480, 2562,\n", + " 2647, 2638, 2664, 2611, 2805, 2800, 3090, 3034, 3202, 3299, 3397, 3331,\n", + " 3388, 3369, 3370, 3403, 3482, 3378, 3453, 3421, 3533, 3754, 3509, 3770,\n", + " 3770, 3770, 3663, 3663, 3953, 3795, 3941, 3691, 3943, 3943, 3860, 4079,\n", + " 4049, 4049, 3825, 3825, 4085, 4169, 4215, 4169, 4236, 4238, 4328, 4367,\n", + " 4439, 4383, 4441, 4537, 4785, 4549, 4549, 4802, 4899, 4899, 4899, 4688,\n", + " 4688, 4688, 4816, 4718, 4961, 4808, 4846, 4861, 5014, 4970, 5078, 5173,\n", + " 5110, 5161, 4995, 5135, 5135, 5562, 5506, 5491, 5491, 5585, 5427, 5532,\n", + " 5427, 5427, 5585, 5645, 5572, 5572, 5828, 5828, 5782, 5782, 5700, 5691,\n", + " 5778, 5778, 6159, 5829, 6228, 6228, 6228, 6056, 6025, 6025, 6061, 5974,\n", + " 5974, 6149, 6165, 6121, 6121, 6121],\n", + " [ 82, 84, 9, 33, 38, 57, 96, 33, 105, 31, 79, 59,\n", + " 67, 93, 102, 93, 110, 67, 17, 7, 63, 79, 93, 67,\n", + " 88, 104, 87, 43, 89, 15, 41, 22, 73, 53, 48, 34,\n", + " 14, 81, 66, 61, 102, 55, 1, 98, 65, 93, 79, 64,\n", + " 80, 67, 24, 6, 40, 63, 93, 9, 53, 67, 111, 56,\n", + " 45, 55, 57, 83, 40, 39, 20, 58, 29, 12, 1, 40,\n", + " 11, 51, 107, 62, 106, 23, 108, 100, 50, 90, 9, 119,\n", + " 79, 11, 77, 46, 120, 92, 67, 46, 54, 101, 102, 71,\n", + " 114, 21, 79, 19, 110, 115, 99, 103, 76, 77, 48, 55,\n", + " 3, 111, 42, 20, 25, 72, 110, 10, 85, 116, 49, 8,\n", + " 115, 42, 67, 109, 65, 55, 79, 3, 102, 114, 4, 118,\n", + " 62, 116, 67, 78, 31, 8, 31, 63, 86, 21, 95, 61,\n", + " 70, 64, 2, 117, 36, 28, 1, 112, 30, 114, 74, 91,\n", + " 18, 75, 44, 115, 42, 27, 32, 67, 120, 37, 5, 31,\n", + " 113, 22, 67, 67, 32, 67, 67, 13, 67, 70, 97, 47,\n", + " 16, 67, 70, 35, 0, 20, 103, 94, 69, 67, 103, 26,\n", + " 67, 119, 68, 6, 60, 52]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 857, 175, 600, ..., 3823, 5839, 6506],\n", + " [ 206, 74, 80, ..., 6975, 6976, 6992]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 53, 99, 88, ..., 9, 120, 116],\n", + " [ 76, 211, 181, ..., 6009, 6176, 6225]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 80, 80, 80, ..., 6905, 6905, 6905],\n", + " [ 267, 338, 382, ..., 267, 289, 712]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 178, 754, 122, ..., 259, 710, 710],\n", + " [ 20, 202, 24, ..., 7006, 6889, 6974]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1756, 6042, 6506, ..., 5871, 2414, 3991],\n", + " [ 102, 6, 40, ..., 6157, 6232, 6170]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 80, 80, 80, ..., 6954, 6954, 6905],\n", + " [ 600, 1125, 1389, ..., 2074, 3312, 6127]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 4, 4, 4, ..., 6165, 6165, 6165],\n", + " [3909, 4085, 4067, ..., 6414, 3959, 6973]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005414\n", + "sampling 0.005258\n", + "noi time: 0.001433\n", + "get_vertex_data call: 0.022755\n", + "noi group time: 0.002472\n", + "eoi_group_time: 0.014509\n", + "second half: 0.196987\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 24187, 32616, ..., 1110069, 1119043, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 24187, 32616, ..., 1110069, 1119043, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1209336, 1203800, 1205169, ..., 1921021, 1926878, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1209336, 1203800, 1205169, ..., 1921021, 1926878, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1140284, 1140285, 1135926, 1138553, 1135160, 1135716, 1140799,\n", + " 1141758, 1138335, 1136208, 1136215, 1141251, 1140290, 1140297, 1142800,\n", + " 1139462, 1136971, 1151164, 1149831, 1149834, 1139811, 1145366, 1146982,\n", + " 1137947, 1145992, 1145999, 1137274, 1138933, 1143372, 1143363, 1139615,\n", + " 1140781, 1150507, 1150509, 1142968, 1149216, 1142958, 1155683, 1149634,\n", + " 1141876, 1141882, 1135992, 1135989, 1149283, 1142892, 1153940, 1144636,\n", + " 1134697, 1148337, 1148343, 1146660, 1135476, 1152666, 1152664, 1148546,\n", + " 1153220, 1153231, 1137220, 1150555, 1155019, 1150329, 1138739, 1134657,\n", + " 1137171, 1137172, 1137169, 1149461, 1140147, 1134720, 1140027, 1140952,\n", + " 1135367, 1135202, 1135210, 1140753, 1154739, 1134960, 1134794, 1135956,\n", + " 1138504, 1143064, 1137693, 1136610, 1144786, 1136826, 1137529, 1137534,\n", + " 1135408, 1157395, 1137441, 1136204, 1148483, 1141702, 1135576, 1135583,\n", + " 1142593, 1135833, 1155079, 1140240, 1138514, 1138524, 1153098, 1153099,\n", + " 1137957, 1158136, 1156902, 1139684, 1138316, 1137287, 1157706, 1138440,\n", + " 1138461, 1138449, 1137495, 1154792, 1136594, 1149328, 1138846, 1138882,\n", + " 1156603, 1156606, 1142611, 1160819, 1135359, 1135355, 1156141, 1138185,\n", + " 1145843, 1148531, 1148533, 1135769, 1139667, 1139673, 1138070, 1138079,\n", + " 1138069, 1142254, 1134782, 1142445, 1135782, 1136729, 1140199, 1158974,\n", + " 1139314, 1142900, 1159009, 1159019, 1153543, 1143631, 1139084, 1139933,\n", + " 1138648, 1138148, 1138150, 1137125, 1141963, 1140550, 1140558, 1152044,\n", + " 1140670, 1137734, 1137728, 1134922, 1134750, 1135549, 1136697, 1141088,\n", + " 1141098, 1144138, 1139889, 1141980, 1143767, 1154852, 1154855, 1143225,\n", + " 1139039, 1139033, 1159676, 1149982, 1146844, 1152719, 1141681, 1154466,\n", + " 1136625, 1136637, 1161175, 1141224, 1141901, 1139386, 1159794, 1143667,\n", + " 1145057, 1145071, 1144237, 1139495, 1144934, 1141609, 1147844, 1147854,\n", + " 1137074, 1148067, 1139798, 1144428, 1144420, 1141821, 1143153, 1146799,\n", + " 1142093, 1158749, 1138469, 1143580, 1139190, 1142913, 1137661, 1138423,\n", + " 1144596, 1148256, 1136871, 1136864, 1145298, 1140885, 1141397, 1141401,\n", + " 1140442, 1144182, 1137614, 1150906, 1146194, 1146201, 1146203, 1137367,\n", + " 1137374, 1136565, 1158699, 1147153, 1136381, 1151114, 1138293, 1141337,\n", + " 1139508, 1139510, 1139127, 1145001, 1145213, 1140977, 1140990, 1147050,\n", + " 1145873, 1149876, 1152976, 1139453, 1139455, 1141925, 1144242, 1140580,\n", + " 1140585, 1137149, 1150243, 1150696, 1137571, 1141382, 1145980, 1145974,\n", + " 1143851, 1146024, 1150603, 1146140, 1154323, 1142533, 1149928, 1139990,\n", + " 1146302, 1143293, 1143294, 1151124, 1147543, 1147549, 1147540, 1148763,\n", + " 1147282, 1142821, 1142816, 1143716, 1136330, 1149152, 1142630, 1142637,\n", + " 1139417, 1139418, 1143051, 1143040, 1136167, 1138923, 1157720, 1136836,\n", + " 1138233, 1144957, 1142158, 1145429, 1143345, 1144765, 1144766, 1144611,\n", + " 1144619, 1140844, 1144086, 1139979, 1135876, 1150294, 1146514, 1146523,\n", + " 1143960, 1138024, 1143460, 1143457, 1143007, 1137703, 1144291, 1144303,\n", + " 1143937, 1143949, 1147520, 1140364, 1137994, 1143080, 1166410, 1148962,\n", + " 1144219, 1147984, 1147988, 1147996, 1147999, 1146957, 1146949, 1134902,\n", + " 1144013, 1147130, 1145456, 1148704, 1143301, 1142700, 1141825, 1141827,\n", + " 1141836, 1148468, 1148476, 1153709, 1152335, 1147025, 1147257, 1147249,\n", + " 1141128, 1141131, 1158226, 1165540, 1154526, 1151646, 1145240, 1145751,\n", + " 1142369, 1146178, 1151239, 1151242, 1148223, 1152530, 1150445, 1149250,\n", + " 1148831, 1154998, 1149791, 1144514, 1144526, 1150342, 1150350, 1154826,\n", + " 1165253, 1147794, 1151472, 1151480, 1152022, 1152026, 1154263, 1146723,\n", + " 1146731, 1140572, 1148693, 1150127, 1148273, 1147019, 1147021, 1147009,\n", + " 1141949, 1141267, 1148744, 1148454, 1147653, 1143559, 1168504, 1149412,\n", + " 1146412, 1135076, 1135085, 1135087, 1148612, 1151412, 1154420, 1158786,\n", + " 1148180, 1148188, 1136251, 1136247, 1139721, 1146676, 1152482, 1152484,\n", + " 1138867, 1157983, 1148725, 1145862, 1148204, 1154203, 1153188, 1153197,\n", + " 1159837, 1152974, 1150935, 1152878, 1144853, 1144859, 1144863, 1144851,\n", + " 1146237, 1169431, 1147442, 1151811, 1152580, 1152581, 1135307, 1151906,\n", + " 1154183, 1148498, 1146565, 1141417, 1141420, 1141419, 1150636, 1145079,\n", + " 1146265, 1146969, 1146974, 1156413, 1147381, 1146623, 1144476, 1152409,\n", + " 1152415, 1154063, 1146276, 1150085, 1150090, 1150093, 1137746, 1146307,\n", + " 1146304, 1152608, 1152622, 1140521, 1140527, 1151967, 1154123, 1157826,\n", + " 1152673, 1154638, 1151580, 1151617, 1150578, 1150588, 1152169, 1152903,\n", + " 1143988, 1152341, 1146816, 1153311, 1146708, 1145576, 1138275, 1138283,\n", + " 1138281, 1136023, 1136028, 1151195, 1151064, 1143477, 1143484, 1143483,\n", + " 1156422, 1153909, 1150159, 1150164, 1144016, 1148040, 1155202, 1152597,\n", + " 1155222, 1149792, 1149794, 1158477, 1148628, 1148637, 1158530, 1158540,\n", + " 1169177, 1148370, 1137458, 1153863, 1154564, 1135707, 1155376, 1142041,\n", + " 1157229, 1135430, 1135434, 1158862, 1148884, 1156504, 1156505, 1157064,\n", + " 1157069, 1152833, 1145191, 1145196, 1143502, 1151257, 1151262, 1135222,\n", + " 1152737, 1150824, 1150817, 1135645, 1135634, 1147810, 1151469, 1139525,\n", + " 1158306, 1158308, 1151271, 1155441, 1153359, 1150130, 1150132, 1138569,\n", + " 1138966, 1150488, 1157637, 1151379, 1158639, 1155375, 1156649, 1155122,\n", + " 1152527, 1157183, 1155755, 1155747, 1151430, 1151424, 1146924, 1145806,\n", + " 1156460, 1156463, 1154763, 1155628, 1156563, 1154555, 1155572, 1158561,\n", + " 1158824, 1153715, 1158325, 1148835, 1155639, 1155646, 1153367, 1143263,\n", + " 1154650, 1162396, 1151317, 1179427, 1143189, 1143524, 1160904, 1150371,\n", + " 1153322, 1153320, 1157439, 1144707, 1150990, 1157928, 1158578, 1159001,\n", + " 1153776, 1153786, 1158192, 1158204, 1137381, 1137389, 1137390, 1137380,\n", + " 1159116, 1138258, 1145693, 1145694, 1145681, 1164307, 1154014, 1134677,\n", + " 1134683, 1164165, 1135601, 1150671, 1155848, 1155852, 1158665, 1138215,\n", + " 1149145, 1140633, 1140632, 1152215, 1152223, 1167309, 1152498, 1156692,\n", + " 1155971, 1155975, 1158840, 1158846, 1156804, 1161892, 1149700, 1159790,\n", + " 1154592, 1153490, 1136909, 1136896, 1158753, 1158760, 1158882, 1140215,\n", + " 1158815, 1158447, 1158285, 1151615, 1136494, 1152139, 1153808, 1134757,\n", + " 1140049, 1166424, 1158545, 1158558, 1158547, 1153827, 1165497, 1163814,\n", + " 1146126, 1138110, 1155521, 1142658, 1159295, 1162685, 1144270, 1159057,\n", + " 1163274, 1142427, 1157939, 1157946, 1162044, 1153052, 1153042, 1153045,\n", + " 1159738, 1153842, 1138396, 1138393, 1150046, 1150041, 1149063, 1149070,\n", + " 1145948, 1154294, 1153514, 1153519, 1147300, 1156252, 1146876, 1157607,\n", + " 1138161, 1156787, 1156795, 1160758, 1163331, 1165772, 1166073, 1148771,\n", + " 1159768, 1146054, 1146063, 1159556, 1163455, 1162308, 1164055, 1158878,\n", + " 1140643, 1141862, 1148600, 1148603, 1148607, 1143143, 1144509, 1151872,\n", + " 1156363, 1158653, 1156177, 1156187, 1159025, 1159029, 1159032, 1159038,\n", + " 1165604, 1168096, 1152244, 1152245, 1160600, 1155588, 1164600, 1151225,\n", + " 1138674, 1148560, 1168515, 1144982, 1146509, 1153236, 1153239, 1144739,\n", + " 1144747, 1152776, 1162580, 1153212, 1153201, 1141471, 1141459, 1147427,\n", + " 1156739, 1160849, 1167372, 1150648, 1144810, 1144812, 1167249, 1140112,\n", + " 1168860, 1165718, 1165721, 1164741, 1142722, 1156300, 1167334, 1167777,\n", + " 1145743, 1145738, 1145914, 1148683, 1145228, 1160231, 1154695, 1154700,\n", + " 1144973, 1167050, 1148175, 1143037, 1166053, 1147694, 1145445, 1147355,\n", + " 1152624, 1152630, 1148124, 1139345, 1145902, 1170386, 1171222, 1158734,\n", + " 1171279, 1154070, 1154076, 1147341, 1145674, 1170675, 1145489, 1144681,\n", + " 1169304, 1145326, 1155180, 1165023, 1150515, 1150526, 1167915, 1144346,\n", + " 1144336, 1157534, 1147746, 1147750, 1154670, 1135841, 1169162, 1157331,\n", + " 1138129, 1141045, 1141051, 1151664, 1149452, 1149446, 1158623, 1158060,\n", + " 1163292, 1157384, 1160035, 1154869, 1152353, 1143178, 1149402, 1177995,\n", + " 1165352, 1173307, 1169148, 1169144, 1154018, 1154027, 1152150, 1152151,\n", + " 1152152, 1159658, 1159655, 1167857, 1151696, 1157153, 1157371, 1157373,\n", + " 1147711, 1151850, 1151845, 1148131, 1157592, 1135021, 1171288, 1155739,\n", + " 1162106, 1178411, 1166742, 1140326, 1159100, 1170874, 1150234, 1183583,\n", + " 1154148, 1149169, 1149173, 1159751, 1143271, 1179243, 1178346, 1153801,\n", + " 1153803, 1153137, 1171122, 1179727, 1172309, 1180915, 1171407, 1179385,\n", + " 1158031, 1161255, 1161262, 1155262, 1177580, 1154718, 1157792, 1157795,\n", + " 1171623, 1155804, 1157126, 1176761, 1158249, 1153898, 1153891, 1171435,\n", + " 1161846, 1164563, 1145626, 1180383, 1149744, 1149750, 1146252, 1153609,\n", + " 1182702, 1158512, 1181186, 1185087, 1158371, 1185788, 1155892, 1155899,\n", + " 1181973, 1185068, 1140393, 1168282, 1163327, 1164231, 1158174, 1154944,\n", + " 1154952, 1154957, 1180019, 1147172, 1147182, 1182152, 1170421, 1191540,\n", + " 1139828, 1139831, 1139837, 1154812, 1164927, 1151288, 1156055, 1170000,\n", + " 1146392, 1146394, 1146399, 1194454, 1183768, 1193093, 1192397, 1184877,\n", + " 1169707, 1189012, 1172414, 1172423, 1172122, 1182286, 1158064, 1145395,\n", + " 1178136, 1152090, 1178662, 1155962, 1155960, 1187514, 1188280, 1192792,\n", + " 1193324, 1182855, 1186149, 1157022, 1161940, 1185739], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1140284, 1140285, 1135926, 1138553, 1135160, 1135716, 1140799,\n", + " 1141758, 1138335, 1136208, 1136215, 1141251, 1140290, 1140297, 1142800,\n", + " 1139462, 1136971, 1151164, 1149831, 1149834, 1139811, 1145366, 1146982,\n", + " 1137947, 1145992, 1145999, 1137274, 1138933, 1143372, 1143363, 1139615,\n", + " 1140781, 1150507, 1150509, 1142968, 1149216, 1142958, 1155683, 1149634,\n", + " 1141876, 1141882, 1135992, 1135989, 1149283, 1142892, 1153940, 1144636,\n", + " 1134697, 1148337, 1148343, 1146660, 1135476, 1152666, 1152664, 1148546,\n", + " 1153220, 1153231, 1137220, 1150555, 1155019, 1150329, 1138739, 1134657,\n", + " 1137171, 1137172, 1137169, 1149461, 1140147, 1134720, 1140027, 1140952,\n", + " 1135367, 1135202, 1135210, 1140753, 1154739, 1134960, 1134794, 1135956,\n", + " 1138504, 1143064, 1137693, 1136610, 1144786, 1136826, 1137529, 1137534,\n", + " 1135408, 1157395, 1137441, 1136204, 1148483, 1141702, 1135576, 1135583,\n", + " 1142593, 1135833, 1155079, 1140240, 1138514, 1138524, 1153098, 1153099,\n", + " 1137957, 1158136, 1156902, 1139684, 1138316, 1137287, 1157706, 1138440,\n", + " 1138461, 1138449, 1137495, 1154792, 1136594, 1149328, 1138846, 1138882,\n", + " 1156603, 1156606, 1142611, 1160819, 1135359, 1135355, 1156141, 1138185,\n", + " 1145843, 1148531, 1148533, 1135769, 1139667, 1139673, 1138070, 1138079,\n", + " 1138069, 1142254, 1134782, 1142445, 1135782, 1136729, 1140199, 1158974,\n", + " 1139314, 1142900, 1159009, 1159019, 1153543, 1143631, 1139084, 1139933,\n", + " 1138648, 1138148, 1138150, 1137125, 1141963, 1140550, 1140558, 1152044,\n", + " 1140670, 1137734, 1137728, 1134922, 1134750, 1135549, 1136697, 1141088,\n", + " 1141098, 1144138, 1139889, 1141980, 1143767, 1154852, 1154855, 1143225,\n", + " 1139039, 1139033, 1159676, 1149982, 1146844, 1152719, 1141681, 1154466,\n", + " 1136625, 1136637, 1161175, 1141224, 1141901, 1139386, 1159794, 1143667,\n", + " 1145057, 1145071, 1144237, 1139495, 1144934, 1141609, 1147844, 1147854,\n", + " 1137074, 1148067, 1139798, 1144428, 1144420, 1141821, 1143153, 1146799,\n", + " 1142093, 1158749, 1138469, 1143580, 1139190, 1142913, 1137661, 1138423,\n", + " 1144596, 1148256, 1136871, 1136864, 1145298, 1140885, 1141397, 1141401,\n", + " 1140442, 1144182, 1137614, 1150906, 1146194, 1146201, 1146203, 1137367,\n", + " 1137374, 1136565, 1158699, 1147153, 1136381, 1151114, 1138293, 1141337,\n", + " 1139508, 1139510, 1139127, 1145001, 1145213, 1140977, 1140990, 1147050,\n", + " 1145873, 1149876, 1152976, 1139453, 1139455, 1141925, 1144242, 1140580,\n", + " 1140585, 1137149, 1150243, 1150696, 1137571, 1141382, 1145980, 1145974,\n", + " 1143851, 1146024, 1150603, 1146140, 1154323, 1142533, 1149928, 1139990,\n", + " 1146302, 1143293, 1143294, 1151124, 1147543, 1147549, 1147540, 1148763,\n", + " 1147282, 1142821, 1142816, 1143716, 1136330, 1149152, 1142630, 1142637,\n", + " 1139417, 1139418, 1143051, 1143040, 1136167, 1138923, 1157720, 1136836,\n", + " 1138233, 1144957, 1142158, 1145429, 1143345, 1144765, 1144766, 1144611,\n", + " 1144619, 1140844, 1144086, 1139979, 1135876, 1150294, 1146514, 1146523,\n", + " 1143960, 1138024, 1143460, 1143457, 1143007, 1137703, 1144291, 1144303,\n", + " 1143937, 1143949, 1147520, 1140364, 1137994, 1143080, 1166410, 1148962,\n", + " 1144219, 1147984, 1147988, 1147996, 1147999, 1146957, 1146949, 1134902,\n", + " 1144013, 1147130, 1145456, 1148704, 1143301, 1142700, 1141825, 1141827,\n", + " 1141836, 1148468, 1148476, 1153709, 1152335, 1147025, 1147257, 1147249,\n", + " 1141128, 1141131, 1158226, 1165540, 1154526, 1151646, 1145240, 1145751,\n", + " 1142369, 1146178, 1151239, 1151242, 1148223, 1152530, 1150445, 1149250,\n", + " 1148831, 1154998, 1149791, 1144514, 1144526, 1150342, 1150350, 1154826,\n", + " 1165253, 1147794, 1151472, 1151480, 1152022, 1152026, 1154263, 1146723,\n", + " 1146731, 1140572, 1148693, 1150127, 1148273, 1147019, 1147021, 1147009,\n", + " 1141949, 1141267, 1148744, 1148454, 1147653, 1143559, 1168504, 1149412,\n", + " 1146412, 1135076, 1135085, 1135087, 1148612, 1151412, 1154420, 1158786,\n", + " 1148180, 1148188, 1136251, 1136247, 1139721, 1146676, 1152482, 1152484,\n", + " 1138867, 1157983, 1148725, 1145862, 1148204, 1154203, 1153188, 1153197,\n", + " 1159837, 1152974, 1150935, 1152878, 1144853, 1144859, 1144863, 1144851,\n", + " 1146237, 1169431, 1147442, 1151811, 1152580, 1152581, 1135307, 1151906,\n", + " 1154183, 1148498, 1146565, 1141417, 1141420, 1141419, 1150636, 1145079,\n", + " 1146265, 1146969, 1146974, 1156413, 1147381, 1146623, 1144476, 1152409,\n", + " 1152415, 1154063, 1146276, 1150085, 1150090, 1150093, 1137746, 1146307,\n", + " 1146304, 1152608, 1152622, 1140521, 1140527, 1151967, 1154123, 1157826,\n", + " 1152673, 1154638, 1151580, 1151617, 1150578, 1150588, 1152169, 1152903,\n", + " 1143988, 1152341, 1146816, 1153311, 1146708, 1145576, 1138275, 1138283,\n", + " 1138281, 1136023, 1136028, 1151195, 1151064, 1143477, 1143484, 1143483,\n", + " 1156422, 1153909, 1150159, 1150164, 1144016, 1148040, 1155202, 1152597,\n", + " 1155222, 1149792, 1149794, 1158477, 1148628, 1148637, 1158530, 1158540,\n", + " 1169177, 1148370, 1137458, 1153863, 1154564, 1135707, 1155376, 1142041,\n", + " 1157229, 1135430, 1135434, 1158862, 1148884, 1156504, 1156505, 1157064,\n", + " 1157069, 1152833, 1145191, 1145196, 1143502, 1151257, 1151262, 1135222,\n", + " 1152737, 1150824, 1150817, 1135645, 1135634, 1147810, 1151469, 1139525,\n", + " 1158306, 1158308, 1151271, 1155441, 1153359, 1150130, 1150132, 1138569,\n", + " 1138966, 1150488, 1157637, 1151379, 1158639, 1155375, 1156649, 1155122,\n", + " 1152527, 1157183, 1155755, 1155747, 1151430, 1151424, 1146924, 1145806,\n", + " 1156460, 1156463, 1154763, 1155628, 1156563, 1154555, 1155572, 1158561,\n", + " 1158824, 1153715, 1158325, 1148835, 1155639, 1155646, 1153367, 1143263,\n", + " 1154650, 1162396, 1151317, 1179427, 1143189, 1143524, 1160904, 1150371,\n", + " 1153322, 1153320, 1157439, 1144707, 1150990, 1157928, 1158578, 1159001,\n", + " 1153776, 1153786, 1158192, 1158204, 1137381, 1137389, 1137390, 1137380,\n", + " 1159116, 1138258, 1145693, 1145694, 1145681, 1164307, 1154014, 1134677,\n", + " 1134683, 1164165, 1135601, 1150671, 1155848, 1155852, 1158665, 1138215,\n", + " 1149145, 1140633, 1140632, 1152215, 1152223, 1167309, 1152498, 1156692,\n", + " 1155971, 1155975, 1158840, 1158846, 1156804, 1161892, 1149700, 1159790,\n", + " 1154592, 1153490, 1136909, 1136896, 1158753, 1158760, 1158882, 1140215,\n", + " 1158815, 1158447, 1158285, 1151615, 1136494, 1152139, 1153808, 1134757,\n", + " 1140049, 1166424, 1158545, 1158558, 1158547, 1153827, 1165497, 1163814,\n", + " 1146126, 1138110, 1155521, 1142658, 1159295, 1162685, 1144270, 1159057,\n", + " 1163274, 1142427, 1157939, 1157946, 1162044, 1153052, 1153042, 1153045,\n", + " 1159738, 1153842, 1138396, 1138393, 1150046, 1150041, 1149063, 1149070,\n", + " 1145948, 1154294, 1153514, 1153519, 1147300, 1156252, 1146876, 1157607,\n", + " 1138161, 1156787, 1156795, 1160758, 1163331, 1165772, 1166073, 1148771,\n", + " 1159768, 1146054, 1146063, 1159556, 1163455, 1162308, 1164055, 1158878,\n", + " 1140643, 1141862, 1148600, 1148603, 1148607, 1143143, 1144509, 1151872,\n", + " 1156363, 1158653, 1156177, 1156187, 1159025, 1159029, 1159032, 1159038,\n", + " 1165604, 1168096, 1152244, 1152245, 1160600, 1155588, 1164600, 1151225,\n", + " 1138674, 1148560, 1168515, 1144982, 1146509, 1153236, 1153239, 1144739,\n", + " 1144747, 1152776, 1162580, 1153212, 1153201, 1141471, 1141459, 1147427,\n", + " 1156739, 1160849, 1167372, 1150648, 1144810, 1144812, 1167249, 1140112,\n", + " 1168860, 1165718, 1165721, 1164741, 1142722, 1156300, 1167334, 1167777,\n", + " 1145743, 1145738, 1145914, 1148683, 1145228, 1160231, 1154695, 1154700,\n", + " 1144973, 1167050, 1148175, 1143037, 1166053, 1147694, 1145445, 1147355,\n", + " 1152624, 1152630, 1148124, 1139345, 1145902, 1170386, 1171222, 1158734,\n", + " 1171279, 1154070, 1154076, 1147341, 1145674, 1170675, 1145489, 1144681,\n", + " 1169304, 1145326, 1155180, 1165023, 1150515, 1150526, 1167915, 1144346,\n", + " 1144336, 1157534, 1147746, 1147750, 1154670, 1135841, 1169162, 1157331,\n", + " 1138129, 1141045, 1141051, 1151664, 1149452, 1149446, 1158623, 1158060,\n", + " 1163292, 1157384, 1160035, 1154869, 1152353, 1143178, 1149402, 1177995,\n", + " 1165352, 1173307, 1169148, 1169144, 1154018, 1154027, 1152150, 1152151,\n", + " 1152152, 1159658, 1159655, 1167857, 1151696, 1157153, 1157371, 1157373,\n", + " 1147711, 1151850, 1151845, 1148131, 1157592, 1135021, 1171288, 1155739,\n", + " 1162106, 1178411, 1166742, 1140326, 1159100, 1170874, 1150234, 1183583,\n", + " 1154148, 1149169, 1149173, 1159751, 1143271, 1179243, 1178346, 1153801,\n", + " 1153803, 1153137, 1171122, 1179727, 1172309, 1180915, 1171407, 1179385,\n", + " 1158031, 1161255, 1161262, 1155262, 1177580, 1154718, 1157792, 1157795,\n", + " 1171623, 1155804, 1157126, 1176761, 1158249, 1153898, 1153891, 1171435,\n", + " 1161846, 1164563, 1145626, 1180383, 1149744, 1149750, 1146252, 1153609,\n", + " 1182702, 1158512, 1181186, 1185087, 1158371, 1185788, 1155892, 1155899,\n", + " 1181973, 1185068, 1140393, 1168282, 1163327, 1164231, 1158174, 1154944,\n", + " 1154952, 1154957, 1180019, 1147172, 1147182, 1182152, 1170421, 1191540,\n", + " 1139828, 1139831, 1139837, 1154812, 1164927, 1151288, 1156055, 1170000,\n", + " 1146392, 1146394, 1146399, 1194454, 1183768, 1193093, 1192397, 1184877,\n", + " 1169707, 1189012, 1172414, 1172423, 1172122, 1182286, 1158064, 1145395,\n", + " 1178136, 1152090, 1178662, 1155962, 1155960, 1187514, 1188280, 1192792,\n", + " 1193324, 1182855, 1186149, 1157022, 1161940, 1185739], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197178, 1197451, 1198769, 1197719, 1201094, 1199282, 1202255,\n", + " 1198844, 1201581, 1194635, 1194637, 1197791, 1201016, 1203048, 1197359,\n", + " 1197239, 1197240, 1202803, 1202804, 1198557, 1196438, 1194745, 1194783,\n", + " 1196624, 1196631, 1195263, 1197931, 1198543, 1194882, 1199171, 1196616,\n", + " 1194752, 1195325, 1196837, 1195571, 1198036, 1198958, 1198161, 1197273,\n", + " 1196747, 1198915, 1195541, 1202916, 1197474, 1197478, 1195758, 1195918,\n", + " 1200949, 1194941, 1199628, 1197990, 1200865, 1198410, 1200747, 1195017,\n", + " 1199949, 1201511, 1197970, 1197601, 1197609, 1201116, 1196727, 1195771,\n", + " 1195773, 1198428, 1198811, 1198797, 1201079, 1201087, 1201156, 1202630,\n", + " 1202635, 1200991, 1201065, 1200918, 1194805, 1202035, 1200345, 1202102,\n", + " 1202138, 1196883, 1200690, 1199909, 1201442, 1202239, 1198478, 1195601,\n", + " 1197553, 1203329, 1199929, 1202695, 1196963, 1196966, 1202876, 1200784,\n", + " 1200792, 1195676, 1195679, 1194996, 1198932, 1198911, 1195181, 1197403,\n", + " 1199661, 1203102, 1198147, 1197735, 1201475, 1198817, 1198819, 1195070,\n", + " 1203162, 1196428], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197178, 1197451, 1198769, 1197719, 1201094, 1199282, 1202255,\n", + " 1198844, 1201581, 1194635, 1194637, 1197791, 1201016, 1203048, 1197359,\n", + " 1197239, 1197240, 1202803, 1202804, 1198557, 1196438, 1194745, 1194783,\n", + " 1196624, 1196631, 1195263, 1197931, 1198543, 1194882, 1199171, 1196616,\n", + " 1194752, 1195325, 1196837, 1195571, 1198036, 1198958, 1198161, 1197273,\n", + " 1196747, 1198915, 1195541, 1202916, 1197474, 1197478, 1195758, 1195918,\n", + " 1200949, 1194941, 1199628, 1197990, 1200865, 1198410, 1200747, 1195017,\n", + " 1199949, 1201511, 1197970, 1197601, 1197609, 1201116, 1196727, 1195771,\n", + " 1195773, 1198428, 1198811, 1198797, 1201079, 1201087, 1201156, 1202630,\n", + " 1202635, 1200991, 1201065, 1200918, 1194805, 1202035, 1200345, 1202102,\n", + " 1202138, 1196883, 1200690, 1199909, 1201442, 1202239, 1198478, 1195601,\n", + " 1197553, 1203329, 1199929, 1202695, 1196963, 1196966, 1202876, 1200784,\n", + " 1200792, 1195676, 1195679, 1194996, 1198932, 1198911, 1195181, 1197403,\n", + " 1199661, 1203102, 1198147, 1197735, 1201475, 1198817, 1198819, 1195070,\n", + " 1203162, 1196428], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.1690e-01, -6.8979e-04, 5.6754e-01, ..., 6.9566e-02,\n", + " -1.1415e-03, -4.1611e-03],\n", + " [ 5.0553e-02, -1.2331e-04, 4.1124e-01, ..., 1.3890e-01,\n", + " -1.7732e-03, -2.9445e-03],\n", + " [ 4.8400e-02, -2.5161e-04, 4.5609e-01, ..., 9.0550e-02,\n", + " -1.3016e-03, -3.4999e-03],\n", + " ...,\n", + " [ 1.4773e-01, -6.9733e-04, 5.9126e-01, ..., 7.8041e-02,\n", + " -1.4165e-03, -4.2939e-03],\n", + " [ 1.6837e-01, -9.7916e-04, 6.8049e-01, ..., 7.5537e-02,\n", + " -1.2905e-03, -5.0780e-03],\n", + " [ 1.2857e-01, -6.2998e-04, 6.1259e-01, ..., 7.7089e-02,\n", + " -1.3459e-03, -4.7020e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 1.2607e+00, -1.9752e-02, 6.7956e-01, ..., -9.7625e-03,\n", + " -1.7936e-02, 9.9336e-01],\n", + " [ 1.4173e+00, -2.1032e-02, 6.9771e-01, ..., -5.8086e-03,\n", + " -2.5485e-02, 2.5363e+00],\n", + " [ 8.8981e-01, -2.4043e-02, 7.8627e-01, ..., -1.2568e-02,\n", + " -1.8952e-02, 8.8297e-01],\n", + " ...,\n", + " [ 1.0934e+00, -5.5105e-02, 1.1523e+00, ..., -2.2465e-02,\n", + " -2.8698e-02, 4.0570e-01],\n", + " [ 7.5188e-01, -2.9868e-02, -4.2019e-04, ..., -1.2614e-02,\n", + " -2.0194e-02, 1.1362e+00],\n", + " [ 1.4687e+00, -2.1957e-02, 5.7391e-01, ..., -4.5503e-03,\n", + " -2.6076e-02, 2.7203e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[ 1.1818e-01, -1.3007e-03, 6.6778e-02, ..., 9.2460e-01,\n", + " 1.2982e-01, 2.9735e-01],\n", + " [ 9.0892e-02, -6.3228e-04, 1.1607e-01, ..., 8.1270e-01,\n", + " 4.6422e-02, 2.2360e-01],\n", + " [ 1.2184e-01, -1.4991e-03, 1.3382e-01, ..., 8.5095e-01,\n", + " 1.2443e-01, 1.9986e-01],\n", + " ...,\n", + " [ 1.0046e-01, -1.1002e-03, 1.1395e-01, ..., 7.5640e-01,\n", + " 8.2491e-02, 1.5719e-01],\n", + " [ 7.3525e-02, -9.4531e-04, 8.5645e-02, ..., 8.9544e-01,\n", + " 1.6498e-01, 2.3921e-01],\n", + " [ 4.9716e-02, -8.5988e-04, 1.0402e-01, ..., 8.8443e-01,\n", + " 1.7127e-01, 2.6528e-01]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-9.5973e-04, 9.9859e-02, 1.4357e-01, ..., -2.8966e-03,\n", + " -2.7917e-04, -1.3023e-03],\n", + " [-1.5761e-03, 2.6878e-01, 2.0441e-01, ..., -1.5475e-03,\n", + " -2.6540e-04, -2.8937e-03],\n", + " [-2.0448e-03, 3.3812e-01, 1.8378e-01, ..., -6.0798e-04,\n", + " -1.5384e-03, -4.4069e-03],\n", + " ...,\n", + " [-2.0695e-03, 2.2290e-01, 1.7667e-01, ..., -1.8408e-03,\n", + " -2.7196e-04, -2.9193e-03],\n", + " [-1.9135e-03, 2.0814e-01, 1.4524e-01, ..., -1.0394e-03,\n", + " -1.5528e-04, -2.9233e-03],\n", + " [-1.3738e-03, 2.2017e-01, 8.2752e-02, ..., -2.3971e-03,\n", + " 5.9074e-02, -2.7602e-03]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 158, 13, 13, 13, 348, 289, 397, 461, 461, 232, 730, 267,\n", + " 538, 538, 538, 593, 593, 823, 1013, 967, 1163, 1163, 1163, 940,\n", + " 907, 1402, 1180, 1194, 1202, 1261, 1399, 1256, 1256, 1480, 1416, 1416,\n", + " 1416, 1416, 1416, 1416, 1416, 1517, 1669, 1671, 1696, 1606, 1714, 1727,\n", + " 1595, 1655, 1781, 1913, 1913, 1913, 1743, 1992, 1992, 1808, 1900, 1900,\n", + " 1751, 1992, 1992, 1992, 1740, 1957, 1819, 1892, 1951, 1631, 1747, 1891,\n", + " 2169, 2180, 2120, 2120, 2144, 2295, 2335, 2355, 2321, 2317, 2386, 2324,\n", + " 2393, 2548, 2674, 2674, 2534, 2713, 2881, 2881, 2768, 2970, 2768, 2947,\n", + " 2942, 2964, 2920, 2920, 2920, 2920, 2920, 3124, 3191, 3508, 3508, 3395,\n", + " 3403, 3403, 3516, 3979, 4017, 3880, 3915, 4052, 4102, 4062, 4062, 4065,\n", + " 4099, 4082, 4128, 4128, 4120, 4246, 4332, 4423, 4601, 4631, 4865, 4865,\n", + " 4887, 4979, 5512, 5545, 5370, 5370, 5445, 5545, 5528, 5528, 5329, 5650,\n", + " 5753, 5567, 5751, 5772, 6004, 6004, 6105, 5963, 5878, 6047, 5972, 5961,\n", + " 6167, 5949, 6213, 6213, 6213, 6213],\n", + " [ 63, 110, 56, 33, 43, 17, 99, 52, 93, 49, 105, 34,\n", + " 96, 65, 59, 99, 13, 83, 64, 25, 93, 75, 108, 112,\n", + " 109, 88, 62, 89, 81, 15, 31, 17, 69, 78, 61, 73,\n", + " 95, 5, 113, 53, 24, 106, 32, 70, 101, 4, 76, 86,\n", + " 39, 8, 46, 87, 54, 85, 80, 10, 22, 85, 111, 66,\n", + " 68, 92, 45, 100, 48, 40, 9, 83, 37, 79, 82, 37,\n", + " 99, 62, 9, 19, 77, 67, 20, 71, 4, 109, 32, 101,\n", + " 109, 51, 6, 74, 30, 65, 97, 14, 42, 62, 62, 86,\n", + " 20, 98, 26, 28, 20, 38, 2, 21, 9, 37, 21, 93,\n", + " 103, 94, 62, 63, 44, 60, 23, 91, 62, 1, 16, 20,\n", + " 85, 9, 11, 20, 101, 20, 107, 0, 9, 18, 84, 57,\n", + " 7, 85, 62, 72, 47, 90, 20, 6, 35, 29, 3, 36,\n", + " 37, 30, 62, 66, 7, 41, 102, 62, 24, 50, 58, 63,\n", + " 60, 12, 104, 27, 55, 88]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 723, 2088, 1979, ..., 2703, 6812, 979],\n", + " [ 12, 104, 87, ..., 7070, 7066, 7084]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 68, 49, 41, ..., 6, 75, 68],\n", + " [ 151, 106, 29, ..., 6183, 6114, 6126]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 46, 46, 46, ..., 7125, 7124, 7124],\n", + " [ 109, 393, 300, ..., 493, 632, 339]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 845, 254, 940, ..., 682, 339, 555],\n", + " [ 150, 223, 83, ..., 7086, 7159, 7092]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[6996, 6024, 2533, ..., 5347, 6751, 6562],\n", + " [ 56, 14, 109, ..., 6187, 6188, 6196]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 247, 247, 147, ..., 7125, 7124, 7141],\n", + " [ 168, 204, 20, ..., 220, 6312, 1772]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 40, 40, 40, ..., 6246, 6246, 6246],\n", + " [5545, 5512, 5433, ..., 6333, 6173, 6087]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005922\n", + "sampling 0.005767\n", + "noi time: 0.001371\n", + "get_vertex_data call: 0.025747\n", + "noi group time: 0.003325\n", + "eoi_group_time: 0.014451\n", + "second half: 0.17933\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31143, 31145, 4764, ..., 1128742, 1120069, 1110069],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31143, 31145, 4764, ..., 1128742, 1120069, 1110069],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210831, 1221603, 1221048, ..., 1927262, 1937987, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210831, 1221603, 1221048, ..., 1927262, 1937987, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1141424, 1136239, 1140284, 1140285, 1135926, 1135160, 1135721,\n", + " 1141751, 1141758, 1138335, 1136223, 1138059, 1138897, 1151164, 1143600,\n", + " 1143609, 1149826, 1149839, 1139808, 1154771, 1146989, 1145993, 1138938,\n", + " 1146418, 1143372, 1139241, 1139615, 1150509, 1145292, 1134943, 1149216,\n", + " 1149220, 1155689, 1143820, 1149646, 1147473, 1147482, 1147486, 1147226,\n", + " 1142881, 1153943, 1144636, 1146992, 1134701, 1152666, 1152667, 1152664,\n", + " 1153217, 1153220, 1136742, 1147094, 1135151, 1155014, 1139371, 1147211,\n", + " 1136685, 1150329, 1134807, 1151546, 1140537, 1140540, 1138112, 1154414,\n", + " 1137251, 1137177, 1140020, 1135367, 1135202, 1135204, 1141036, 1134794,\n", + " 1135953, 1136512, 1138504, 1138508, 1136610, 1144395, 1137534, 1135408,\n", + " 1157399, 1152376, 1137441, 1143317, 1156158, 1148484, 1141702, 1135579,\n", + " 1135583, 1142593, 1136097, 1140240, 1156342, 1156350, 1156345, 1138514,\n", + " 1153102, 1137953, 1158136, 1154132, 1145134, 1137008, 1156908, 1135522,\n", + " 1139685, 1138319, 1138314, 1136356, 1139874, 1138440, 1137489, 1137491,\n", + " 1149328, 1138846, 1138837, 1138880, 1147116, 1142611, 1142615, 1135036,\n", + " 1135618, 1135631, 1156137, 1138185, 1148531, 1150956, 1137109, 1135772,\n", + " 1139673, 1136081, 1140261, 1134992, 1134776, 1148805, 1136730, 1140199,\n", + " 1158971, 1144410, 1153543, 1143631, 1139933, 1138648, 1138148, 1141963,\n", + " 1155661, 1141992, 1152044, 1142302, 1140665, 1137734, 1134922, 1140901,\n", + " 1134740, 1135540, 1140231, 1141088, 1141095, 1141097, 1141098, 1141100,\n", + " 1144138, 1148996, 1149001, 1143767, 1139025, 1139033, 1140007, 1149979,\n", + " 1146834, 1146844, 1141690, 1135860, 1139436, 1161173, 1140467, 1139386,\n", + " 1141657, 1141653, 1136917, 1136752, 1136756, 1144646, 1134979, 1136862,\n", + " 1164807, 1139798, 1144428, 1138482, 1142093, 1148872, 1137239, 1137062,\n", + " 1137656, 1136864, 1141577, 1140892, 1144176, 1137604, 1139559, 1158698,\n", + " 1140501, 1147153, 1149199, 1149197, 1141365, 1141669, 1141664, 1149099,\n", + " 1149101, 1138292, 1143907, 1139508, 1139510, 1139763, 1145000, 1143779,\n", + " 1140990, 1135047, 1141560, 1147050, 1147047, 1145873, 1152976, 1163917,\n", + " 1138995, 1141925, 1144245, 1144242, 1145339, 1141841, 1137149, 1150698,\n", + " 1140689, 1140695, 1137571, 1137570, 1134861, 1145976, 1143845, 1143851,\n", + " 1146024, 1138085, 1139990, 1143293, 1151127, 1143875, 1143882, 1147543,\n", + " 1147540, 1147282, 1142829, 1142816, 1142822, 1149152, 1149155, 1149610,\n", + " 1143049, 1143051, 1136166, 1136161, 1157720, 1136836, 1139297, 1139329,\n", + " 1141496, 1141498, 1142159, 1143345, 1144611, 1145818, 1137089, 1137096,\n", + " 1144088, 1144095, 1135818, 1150294, 1144375, 1150919, 1146523, 1143456,\n", + " 1143457, 1143007, 1146628, 1147521, 1140364, 1137990, 1137994, 1144219,\n", + " 1144222, 1147984, 1147999, 1146949, 1134902, 1139252, 1145467, 1148704,\n", + " 1143299, 1143302, 1150998, 1142690, 1142700, 1141327, 1141828, 1146751,\n", + " 1147070, 1149722, 1149720, 1149725, 1147981, 1147971, 1145018, 1158226,\n", + " 1150460, 1143922, 1154526, 1145238, 1145240, 1138638, 1148391, 1146178,\n", + " 1148223, 1150438, 1150445, 1149250, 1149258, 1149791, 1144514, 1144526,\n", + " 1141349, 1145826, 1145834, 1150350, 1152001, 1151994, 1165252, 1169717,\n", + " 1147794, 1151050, 1145259, 1139919, 1146723, 1140566, 1140572, 1149530,\n", + " 1148703, 1147019, 1147021, 1147023, 1144824, 1148746, 1153574, 1143560,\n", + " 1151717, 1148288, 1152066, 1154420, 1148180, 1146675, 1146676, 1146686,\n", + " 1157983, 1151557, 1145862, 1146547, 1146559, 1143888, 1148204, 1153181,\n", + " 1148096, 1156211, 1141733, 1154168, 1153121, 1153124, 1153188, 1148052,\n", + " 1148063, 1152875, 1152877, 1155095, 1148090, 1147446, 1147442, 1151821,\n", + " 1152581, 1135306, 1154183, 1149733, 1141420, 1147737, 1145079, 1145080,\n", + " 1148949, 1146967, 1156402, 1150219, 1146623, 1151691, 1144472, 1152849,\n", + " 1152407, 1152100, 1152103, 1146287, 1153035, 1153026, 1153038, 1150085,\n", + " 1150093, 1145539, 1137746, 1146304, 1152063, 1149211, 1152819, 1155337,\n", + " 1157826, 1151617, 1150578, 1150586, 1145278, 1136131, 1136134, 1151449,\n", + " 1138991, 1152898, 1152903, 1151311, 1143995, 1152341, 1153311, 1146704,\n", + " 1138279, 1138281, 1136028, 1136031, 1158704, 1152928, 1152931, 1156395,\n", + " 1156422, 1163490, 1150159, 1150164, 1144016, 1142261, 1148040, 1152601,\n", + " 1149792, 1137048, 1148628, 1158530, 1148369, 1148382, 1137458, 1148243,\n", + " 1157466, 1143454, 1157547, 1158860, 1158862, 1150872, 1150877, 1150869,\n", + " 1148892, 1157064, 1157069, 1155422, 1152833, 1145191, 1137809, 1135730,\n", + " 1138830, 1152184, 1153413, 1135645, 1135634, 1139525, 1158308, 1158311,\n", + " 1151271, 1150132, 1162113, 1144361, 1154528, 1150488, 1142755, 1142764,\n", + " 1156207, 1157637, 1151379, 1158639, 1156647, 1152527, 1157183, 1149321,\n", + " 1145806, 1145793, 1156463, 1158096, 1155630, 1156569, 1136476, 1158824,\n", + " 1153715, 1155646, 1153363, 1143262, 1143263, 1146937, 1162389, 1154250,\n", + " 1151898, 1151317, 1143189, 1160904, 1150371, 1150369, 1157439, 1141620,\n", + " 1151030, 1157288, 1137157, 1157663, 1158126, 1153786, 1158204, 1137381,\n", + " 1137380, 1159116, 1135601, 1135602, 1145507, 1148149, 1150671, 1158665,\n", + " 1157684, 1146325, 1149145, 1152217, 1152222, 1152502, 1140380, 1140381,\n", + " 1159132, 1155975, 1158841, 1158846, 1161472, 1155393, 1154605, 1136896,\n", + " 1158882, 1140221, 1158438, 1158444, 1155246, 1136494, 1136491, 1164941,\n", + " 1164942, 1152143, 1156490, 1157675, 1157676, 1156278, 1136646, 1162324,\n", + " 1163116, 1134757, 1140049, 1166421, 1158558, 1158547, 1146126, 1150006,\n", + " 1150011, 1155521, 1155528, 1142487, 1164276, 1142663, 1142666, 1157753,\n", + " 1159284, 1144270, 1188644, 1158296, 1157945, 1157946, 1153052, 1153045,\n", + " 1155769, 1156238, 1153842, 1156107, 1138393, 1165235, 1150046, 1149070,\n", + " 1145948, 1155482, 1151014, 1154299, 1153514, 1153519, 1138161, 1164006,\n", + " 1156795, 1149956, 1139777, 1139791, 1139284, 1169745, 1166073, 1148771,\n", + " 1169315, 1157357, 1146063, 1164420, 1171259, 1158878, 1169493, 1140643,\n", + " 1141862, 1148600, 1148603, 1156358, 1158642, 1158653, 1159029, 1159032,\n", + " 1169109, 1158899, 1155588, 1147554, 1138674, 1148571, 1168523, 1144982,\n", + " 1144984, 1144989, 1167933, 1147830, 1146500, 1153246, 1155053, 1153201,\n", + " 1151650, 1147427, 1147438, 1156744, 1153663, 1179009, 1144810, 1144812,\n", + " 1142733, 1156303, 1156289, 1145176, 1163777, 1148683, 1164087, 1145228,\n", + " 1154700, 1147677, 1169511, 1142136, 1143038, 1148124, 1145902, 1153520,\n", + " 1181049, 1143395, 1143405, 1143404, 1170987, 1171859, 1158722, 1168756,\n", + " 1147331, 1147338, 1170758, 1145674, 1150773, 1167817, 1166653, 1193350,\n", + " 1155172, 1150522, 1150518, 1156119, 1145529, 1144346, 1157534, 1157528,\n", + " 1138372, 1147746, 1154670, 1142357, 1157331, 1138142, 1193662, 1151664,\n", + " 1169359, 1172331, 1154353, 1149452, 1171529, 1149688, 1163292, 1172868,\n", + " 1149847, 1165903, 1152353, 1143865, 1168400, 1161130, 1171897, 1169049,\n", + " 1145028, 1169144, 1154027, 1152152, 1157153, 1147711, 1151850, 1148128,\n", + " 1169910, 1157588, 1157591, 1157592, 1157593, 1157598, 1140326, 1163989,\n", + " 1153436, 1169083, 1181772, 1160307, 1150234, 1154148, 1149169, 1149179,\n", + " 1149173, 1168481, 1143420, 1178344, 1170176, 1153803, 1153630, 1153619,\n", + " 1161255, 1162129, 1177576, 1154707, 1154718, 1157792, 1157795, 1171623,\n", + " 1171619, 1157124, 1183789, 1158249, 1153898, 1154500, 1164564, 1145626,\n", + " 1145618, 1154834, 1163538, 1179453, 1146252, 1153601, 1163195, 1184326,\n", + " 1158512, 1181190, 1186995, 1158370, 1155892, 1168886, 1168889, 1185700,\n", + " 1162370, 1164231, 1164238, 1162487, 1165444, 1159410, 1166768, 1166772,\n", + " 1147182, 1141507, 1175718, 1184050, 1156539, 1181509, 1139828, 1139831,\n", + " 1139837, 1150265, 1151288, 1189681, 1156055, 1151972, 1179686, 1146394,\n", + " 1146395, 1173058, 1178236, 1178237, 1191511, 1156846, 1181951, 1168673,\n", + " 1194469, 1140997, 1191647, 1170194, 1192614, 1181692, 1193098, 1162502,\n", + " 1166838, 1188694, 1179317, 1178265, 1172122, 1178133, 1178141, 1155959,\n", + " 1178292, 1185209, 1184960, 1162661, 1187536, 1179621, 1167471, 1187556,\n", + " 1191880, 1189948, 1189795, 1157022, 1161940, 1161945], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1141424, 1136239, 1140284, 1140285, 1135926, 1135160, 1135721,\n", + " 1141751, 1141758, 1138335, 1136223, 1138059, 1138897, 1151164, 1143600,\n", + " 1143609, 1149826, 1149839, 1139808, 1154771, 1146989, 1145993, 1138938,\n", + " 1146418, 1143372, 1139241, 1139615, 1150509, 1145292, 1134943, 1149216,\n", + " 1149220, 1155689, 1143820, 1149646, 1147473, 1147482, 1147486, 1147226,\n", + " 1142881, 1153943, 1144636, 1146992, 1134701, 1152666, 1152667, 1152664,\n", + " 1153217, 1153220, 1136742, 1147094, 1135151, 1155014, 1139371, 1147211,\n", + " 1136685, 1150329, 1134807, 1151546, 1140537, 1140540, 1138112, 1154414,\n", + " 1137251, 1137177, 1140020, 1135367, 1135202, 1135204, 1141036, 1134794,\n", + " 1135953, 1136512, 1138504, 1138508, 1136610, 1144395, 1137534, 1135408,\n", + " 1157399, 1152376, 1137441, 1143317, 1156158, 1148484, 1141702, 1135579,\n", + " 1135583, 1142593, 1136097, 1140240, 1156342, 1156350, 1156345, 1138514,\n", + " 1153102, 1137953, 1158136, 1154132, 1145134, 1137008, 1156908, 1135522,\n", + " 1139685, 1138319, 1138314, 1136356, 1139874, 1138440, 1137489, 1137491,\n", + " 1149328, 1138846, 1138837, 1138880, 1147116, 1142611, 1142615, 1135036,\n", + " 1135618, 1135631, 1156137, 1138185, 1148531, 1150956, 1137109, 1135772,\n", + " 1139673, 1136081, 1140261, 1134992, 1134776, 1148805, 1136730, 1140199,\n", + " 1158971, 1144410, 1153543, 1143631, 1139933, 1138648, 1138148, 1141963,\n", + " 1155661, 1141992, 1152044, 1142302, 1140665, 1137734, 1134922, 1140901,\n", + " 1134740, 1135540, 1140231, 1141088, 1141095, 1141097, 1141098, 1141100,\n", + " 1144138, 1148996, 1149001, 1143767, 1139025, 1139033, 1140007, 1149979,\n", + " 1146834, 1146844, 1141690, 1135860, 1139436, 1161173, 1140467, 1139386,\n", + " 1141657, 1141653, 1136917, 1136752, 1136756, 1144646, 1134979, 1136862,\n", + " 1164807, 1139798, 1144428, 1138482, 1142093, 1148872, 1137239, 1137062,\n", + " 1137656, 1136864, 1141577, 1140892, 1144176, 1137604, 1139559, 1158698,\n", + " 1140501, 1147153, 1149199, 1149197, 1141365, 1141669, 1141664, 1149099,\n", + " 1149101, 1138292, 1143907, 1139508, 1139510, 1139763, 1145000, 1143779,\n", + " 1140990, 1135047, 1141560, 1147050, 1147047, 1145873, 1152976, 1163917,\n", + " 1138995, 1141925, 1144245, 1144242, 1145339, 1141841, 1137149, 1150698,\n", + " 1140689, 1140695, 1137571, 1137570, 1134861, 1145976, 1143845, 1143851,\n", + " 1146024, 1138085, 1139990, 1143293, 1151127, 1143875, 1143882, 1147543,\n", + " 1147540, 1147282, 1142829, 1142816, 1142822, 1149152, 1149155, 1149610,\n", + " 1143049, 1143051, 1136166, 1136161, 1157720, 1136836, 1139297, 1139329,\n", + " 1141496, 1141498, 1142159, 1143345, 1144611, 1145818, 1137089, 1137096,\n", + " 1144088, 1144095, 1135818, 1150294, 1144375, 1150919, 1146523, 1143456,\n", + " 1143457, 1143007, 1146628, 1147521, 1140364, 1137990, 1137994, 1144219,\n", + " 1144222, 1147984, 1147999, 1146949, 1134902, 1139252, 1145467, 1148704,\n", + " 1143299, 1143302, 1150998, 1142690, 1142700, 1141327, 1141828, 1146751,\n", + " 1147070, 1149722, 1149720, 1149725, 1147981, 1147971, 1145018, 1158226,\n", + " 1150460, 1143922, 1154526, 1145238, 1145240, 1138638, 1148391, 1146178,\n", + " 1148223, 1150438, 1150445, 1149250, 1149258, 1149791, 1144514, 1144526,\n", + " 1141349, 1145826, 1145834, 1150350, 1152001, 1151994, 1165252, 1169717,\n", + " 1147794, 1151050, 1145259, 1139919, 1146723, 1140566, 1140572, 1149530,\n", + " 1148703, 1147019, 1147021, 1147023, 1144824, 1148746, 1153574, 1143560,\n", + " 1151717, 1148288, 1152066, 1154420, 1148180, 1146675, 1146676, 1146686,\n", + " 1157983, 1151557, 1145862, 1146547, 1146559, 1143888, 1148204, 1153181,\n", + " 1148096, 1156211, 1141733, 1154168, 1153121, 1153124, 1153188, 1148052,\n", + " 1148063, 1152875, 1152877, 1155095, 1148090, 1147446, 1147442, 1151821,\n", + " 1152581, 1135306, 1154183, 1149733, 1141420, 1147737, 1145079, 1145080,\n", + " 1148949, 1146967, 1156402, 1150219, 1146623, 1151691, 1144472, 1152849,\n", + " 1152407, 1152100, 1152103, 1146287, 1153035, 1153026, 1153038, 1150085,\n", + " 1150093, 1145539, 1137746, 1146304, 1152063, 1149211, 1152819, 1155337,\n", + " 1157826, 1151617, 1150578, 1150586, 1145278, 1136131, 1136134, 1151449,\n", + " 1138991, 1152898, 1152903, 1151311, 1143995, 1152341, 1153311, 1146704,\n", + " 1138279, 1138281, 1136028, 1136031, 1158704, 1152928, 1152931, 1156395,\n", + " 1156422, 1163490, 1150159, 1150164, 1144016, 1142261, 1148040, 1152601,\n", + " 1149792, 1137048, 1148628, 1158530, 1148369, 1148382, 1137458, 1148243,\n", + " 1157466, 1143454, 1157547, 1158860, 1158862, 1150872, 1150877, 1150869,\n", + " 1148892, 1157064, 1157069, 1155422, 1152833, 1145191, 1137809, 1135730,\n", + " 1138830, 1152184, 1153413, 1135645, 1135634, 1139525, 1158308, 1158311,\n", + " 1151271, 1150132, 1162113, 1144361, 1154528, 1150488, 1142755, 1142764,\n", + " 1156207, 1157637, 1151379, 1158639, 1156647, 1152527, 1157183, 1149321,\n", + " 1145806, 1145793, 1156463, 1158096, 1155630, 1156569, 1136476, 1158824,\n", + " 1153715, 1155646, 1153363, 1143262, 1143263, 1146937, 1162389, 1154250,\n", + " 1151898, 1151317, 1143189, 1160904, 1150371, 1150369, 1157439, 1141620,\n", + " 1151030, 1157288, 1137157, 1157663, 1158126, 1153786, 1158204, 1137381,\n", + " 1137380, 1159116, 1135601, 1135602, 1145507, 1148149, 1150671, 1158665,\n", + " 1157684, 1146325, 1149145, 1152217, 1152222, 1152502, 1140380, 1140381,\n", + " 1159132, 1155975, 1158841, 1158846, 1161472, 1155393, 1154605, 1136896,\n", + " 1158882, 1140221, 1158438, 1158444, 1155246, 1136494, 1136491, 1164941,\n", + " 1164942, 1152143, 1156490, 1157675, 1157676, 1156278, 1136646, 1162324,\n", + " 1163116, 1134757, 1140049, 1166421, 1158558, 1158547, 1146126, 1150006,\n", + " 1150011, 1155521, 1155528, 1142487, 1164276, 1142663, 1142666, 1157753,\n", + " 1159284, 1144270, 1188644, 1158296, 1157945, 1157946, 1153052, 1153045,\n", + " 1155769, 1156238, 1153842, 1156107, 1138393, 1165235, 1150046, 1149070,\n", + " 1145948, 1155482, 1151014, 1154299, 1153514, 1153519, 1138161, 1164006,\n", + " 1156795, 1149956, 1139777, 1139791, 1139284, 1169745, 1166073, 1148771,\n", + " 1169315, 1157357, 1146063, 1164420, 1171259, 1158878, 1169493, 1140643,\n", + " 1141862, 1148600, 1148603, 1156358, 1158642, 1158653, 1159029, 1159032,\n", + " 1169109, 1158899, 1155588, 1147554, 1138674, 1148571, 1168523, 1144982,\n", + " 1144984, 1144989, 1167933, 1147830, 1146500, 1153246, 1155053, 1153201,\n", + " 1151650, 1147427, 1147438, 1156744, 1153663, 1179009, 1144810, 1144812,\n", + " 1142733, 1156303, 1156289, 1145176, 1163777, 1148683, 1164087, 1145228,\n", + " 1154700, 1147677, 1169511, 1142136, 1143038, 1148124, 1145902, 1153520,\n", + " 1181049, 1143395, 1143405, 1143404, 1170987, 1171859, 1158722, 1168756,\n", + " 1147331, 1147338, 1170758, 1145674, 1150773, 1167817, 1166653, 1193350,\n", + " 1155172, 1150522, 1150518, 1156119, 1145529, 1144346, 1157534, 1157528,\n", + " 1138372, 1147746, 1154670, 1142357, 1157331, 1138142, 1193662, 1151664,\n", + " 1169359, 1172331, 1154353, 1149452, 1171529, 1149688, 1163292, 1172868,\n", + " 1149847, 1165903, 1152353, 1143865, 1168400, 1161130, 1171897, 1169049,\n", + " 1145028, 1169144, 1154027, 1152152, 1157153, 1147711, 1151850, 1148128,\n", + " 1169910, 1157588, 1157591, 1157592, 1157593, 1157598, 1140326, 1163989,\n", + " 1153436, 1169083, 1181772, 1160307, 1150234, 1154148, 1149169, 1149179,\n", + " 1149173, 1168481, 1143420, 1178344, 1170176, 1153803, 1153630, 1153619,\n", + " 1161255, 1162129, 1177576, 1154707, 1154718, 1157792, 1157795, 1171623,\n", + " 1171619, 1157124, 1183789, 1158249, 1153898, 1154500, 1164564, 1145626,\n", + " 1145618, 1154834, 1163538, 1179453, 1146252, 1153601, 1163195, 1184326,\n", + " 1158512, 1181190, 1186995, 1158370, 1155892, 1168886, 1168889, 1185700,\n", + " 1162370, 1164231, 1164238, 1162487, 1165444, 1159410, 1166768, 1166772,\n", + " 1147182, 1141507, 1175718, 1184050, 1156539, 1181509, 1139828, 1139831,\n", + " 1139837, 1150265, 1151288, 1189681, 1156055, 1151972, 1179686, 1146394,\n", + " 1146395, 1173058, 1178236, 1178237, 1191511, 1156846, 1181951, 1168673,\n", + " 1194469, 1140997, 1191647, 1170194, 1192614, 1181692, 1193098, 1162502,\n", + " 1166838, 1188694, 1179317, 1178265, 1172122, 1178133, 1178141, 1155959,\n", + " 1178292, 1185209, 1184960, 1162661, 1187536, 1179621, 1167471, 1187556,\n", + " 1191880, 1189948, 1189795, 1157022, 1161940, 1161945], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197841, 1198248, 1202255, 1198832, 1201577, 1199278, 1194626,\n", + " 1197777, 1201010, 1201016, 1198633, 1196956, 1196871, 1202803, 1194866,\n", + " 1196573, 1194743, 1194745, 1194782, 1194648, 1195514, 1195263, 1197921,\n", + " 1201992, 1194882, 1195325, 1196840, 1195216, 1195279, 1196255, 1196109,\n", + " 1194853, 1202916, 1197474, 1196122, 1199697, 1196393, 1195353, 1198273,\n", + " 1200949, 1199856, 1194928, 1197583, 1197676, 1197990, 1200068, 1200878,\n", + " 1198413, 1198404, 1200751, 1195017, 1199676, 1199951, 1197683, 1200670,\n", + " 1197970, 1197601, 1201116, 1202830, 1196727, 1196734, 1195773, 1198428,\n", + " 1200155, 1198811, 1199087, 1200570, 1196477, 1199445, 1201079, 1201056,\n", + " 1202720, 1202499, 1200526, 1197100, 1199098, 1199908, 1201442, 1202239,\n", + " 1200899, 1202349, 1199976, 1202170, 1202175, 1202834, 1195876, 1201291,\n", + " 1201857, 1200254, 1200398, 1200997, 1194846, 1198014, 1195679, 1195664,\n", + " 1201788, 1197060, 1197816, 1196605, 1201138, 1194733, 1199403, 1201196,\n", + " 1197655, 1197657, 1197039, 1195165], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197841, 1198248, 1202255, 1198832, 1201577, 1199278, 1194626,\n", + " 1197777, 1201010, 1201016, 1198633, 1196956, 1196871, 1202803, 1194866,\n", + " 1196573, 1194743, 1194745, 1194782, 1194648, 1195514, 1195263, 1197921,\n", + " 1201992, 1194882, 1195325, 1196840, 1195216, 1195279, 1196255, 1196109,\n", + " 1194853, 1202916, 1197474, 1196122, 1199697, 1196393, 1195353, 1198273,\n", + " 1200949, 1199856, 1194928, 1197583, 1197676, 1197990, 1200068, 1200878,\n", + " 1198413, 1198404, 1200751, 1195017, 1199676, 1199951, 1197683, 1200670,\n", + " 1197970, 1197601, 1201116, 1202830, 1196727, 1196734, 1195773, 1198428,\n", + " 1200155, 1198811, 1199087, 1200570, 1196477, 1199445, 1201079, 1201056,\n", + " 1202720, 1202499, 1200526, 1197100, 1199098, 1199908, 1201442, 1202239,\n", + " 1200899, 1202349, 1199976, 1202170, 1202175, 1202834, 1195876, 1201291,\n", + " 1201857, 1200254, 1200398, 1200997, 1194846, 1198014, 1195679, 1195664,\n", + " 1201788, 1197060, 1197816, 1196605, 1201138, 1194733, 1199403, 1201196,\n", + " 1197655, 1197657, 1197039, 1195165], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 1.5515e-01, -4.7013e-04, 6.4844e-01, ..., 8.9635e-02,\n", + " -1.4965e-03, -4.6745e-03],\n", + " [ 1.5768e-02, -1.7823e-04, 4.4729e-02, ..., 4.6669e-02,\n", + " -9.9789e-04, -1.3849e-03],\n", + " [ 5.7927e-02, -3.0028e-05, 4.9277e-01, ..., 1.0756e-01,\n", + " -1.4625e-03, -3.1720e-03],\n", + " ...,\n", + " [ 7.1311e-02, 1.3950e-02, 4.4799e-01, ..., 1.0510e-01,\n", + " -1.3772e-03, -3.2741e-03],\n", + " [ 4.5900e-02, -2.4894e-04, 4.4789e-01, ..., 1.3981e-01,\n", + " -1.9293e-03, -3.3195e-03],\n", + " [ 1.4467e-01, -2.3728e-04, 6.4778e-01, ..., 1.0308e-01,\n", + " -1.7240e-03, -4.7119e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 6.4034e-01, -1.9579e-02, 7.3258e-01, ..., -1.3542e-02,\n", + " -1.5995e-02, 1.8839e-01],\n", + " [ 1.0270e+00, -8.0446e-03, 1.1673e+00, ..., -5.4344e-03,\n", + " -1.6805e-02, 7.9596e-01],\n", + " [ 1.1656e+00, -1.1004e-02, 7.7344e-01, ..., -3.2801e-03,\n", + " -2.0437e-02, 1.5804e+00],\n", + " ...,\n", + " [ 5.6092e-01, -1.1292e-02, 2.8924e-01, ..., -7.0072e-03,\n", + " -1.1978e-02, 4.9820e-01],\n", + " [ 5.7165e-01, -3.0237e-02, 1.2632e+00, ..., -1.2939e-02,\n", + " -1.9099e-02, -4.2812e-04],\n", + " [ 1.2680e+00, -1.7770e-02, 7.3259e-01, ..., -3.1691e-03,\n", + " -2.5932e-02, 2.3823e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-1.5285e-04, 1.7959e-02, 5.9852e-02, ..., 1.0475e+00,\n", + " 6.6702e-02, 2.1293e-01],\n", + " [ 4.0473e-02, -3.9293e-04, 3.4568e-02, ..., 1.1025e+00,\n", + " 1.4011e-01, 3.1319e-01],\n", + " [ 3.0483e-02, -6.5601e-04, 1.3089e-01, ..., 1.0582e+00,\n", + " 8.6007e-02, 2.6709e-01],\n", + " ...,\n", + " [-9.7084e-04, 3.9132e-03, 1.8012e-01, ..., 8.9592e-01,\n", + " -2.2921e-03, -6.6939e-05],\n", + " [-2.1135e-04, 4.8116e-03, 1.5477e-01, ..., 1.0980e+00,\n", + " 8.6279e-02, 2.4631e-01],\n", + " [ 2.2446e-02, -4.6241e-04, 1.1525e-01, ..., 9.4739e-01,\n", + " 3.7856e-02, 1.6444e-01]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-7.7835e-04, 1.4972e-01, 1.1174e-01, ..., -4.1735e-03,\n", + " -2.8654e-04, -2.3703e-04],\n", + " [-7.6585e-04, 1.1919e-01, 1.2260e-01, ..., -4.2049e-03,\n", + " -4.0884e-05, -4.6015e-04],\n", + " [-1.7959e-03, 1.0099e-01, 1.5578e-01, ..., -3.1878e-03,\n", + " -1.2010e-04, -9.9164e-04],\n", + " ...,\n", + " [-8.1629e-04, 4.0283e-01, 2.3552e-01, ..., -1.5733e-03,\n", + " -7.1911e-06, -2.8097e-03],\n", + " [-1.1130e-03, 2.3205e-01, 1.6493e-01, ..., -2.3575e-03,\n", + " -2.1544e-04, -1.1739e-03],\n", + " [-8.0780e-04, 1.8058e-01, 1.3967e-01, ..., -2.9478e-03,\n", + " 1.1026e-01, -3.3070e-05]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 164, 100, 100, 145, 145, 145, 80, 80, 287, 318, 210, 210,\n", + " 210, 298, 579, 598, 907, 907, 311, 888, 957, 328, 328, 1001,\n", + " 1001, 961, 890, 890, 890, 890, 890, 1102, 1102, 1257, 1145, 1145,\n", + " 1174, 1156, 1156, 1173, 1462, 852, 1034, 1436, 1315, 1549, 1538, 1538,\n", + " 1538, 1538, 1538, 1631, 1631, 1631, 1631, 1631, 1616, 1788, 1584, 1709,\n", + " 1892, 1778, 1973, 2034, 1746, 2093, 1955, 2043, 2082, 2187, 2172, 2405,\n", + " 2516, 2392, 2351, 2411, 2462, 2462, 2554, 2495, 2495, 2442, 2977, 2753,\n", + " 2766, 3105, 3193, 3193, 2984, 3197, 3033, 3233, 3466, 3545, 3619, 3601,\n", + " 3652, 3763, 4052, 4121, 3667, 3667, 3885, 4137, 3751, 3832, 4192, 4192,\n", + " 4192, 4205, 4051, 4236, 4237, 4262, 4322, 4326, 4359, 4346, 4627, 4518,\n", + " 4598, 4589, 4645, 4645, 4747, 4920, 4865, 5222, 5277, 4907, 5021, 5179,\n", + " 5165, 5165, 5281, 5347, 5426, 5407, 5452, 5547, 5471, 5471, 5471, 5471,\n", + " 5595, 5856, 5984, 5721, 5976, 6260, 6260, 5964, 6183, 6046, 6046, 6257,\n", + " 6173, 6144, 6232],\n", + " [ 79, 33, 4, 88, 59, 15, 24, 98, 64, 60, 95, 12,\n", + " 45, 14, 91, 94, 0, 97, 59, 4, 83, 78, 31, 30,\n", + " 103, 20, 55, 39, 106, 11, 85, 69, 57, 98, 23, 11,\n", + " 60, 13, 101, 60, 60, 92, 24, 35, 48, 22, 75, 82,\n", + " 84, 87, 98, 45, 41, 107, 80, 95, 53, 8, 35, 22,\n", + " 50, 90, 89, 66, 42, 32, 28, 89, 9, 2, 72, 81,\n", + " 6, 51, 19, 22, 38, 47, 71, 83, 74, 58, 70, 38,\n", + " 66, 96, 63, 73, 96, 79, 96, 63, 105, 96, 46, 52,\n", + " 36, 50, 5, 79, 104, 24, 76, 60, 65, 17, 44, 33,\n", + " 21, 96, 86, 96, 96, 79, 96, 96, 22, 35, 56, 87,\n", + " 79, 63, 10, 77, 60, 37, 93, 7, 43, 60, 60, 26,\n", + " 67, 99, 60, 54, 60, 49, 29, 62, 40, 1, 61, 65,\n", + " 25, 57, 99, 3, 34, 102, 18, 68, 42, 11, 27, 100,\n", + " 63, 60, 16]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3232, 2953, 3494, ..., 5493, 1799, 1880],\n", + " [ 25, 251, 149, ..., 6377, 6372, 6361]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 79, 76, 101, ..., 61, 23, 88],\n", + " [ 103, 107, 39, ..., 6164, 6087, 6196]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 277, 277, 277, ..., 6330, 6330, 6395],\n", + " [ 832, 803, 262, ..., 553, 295, 401]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 551, 295, 527, ..., 295, 295, 71],\n", + " [ 72, 67, 164, ..., 6350, 6340, 6323]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1775, 825, 1951, ..., 6415, 5807, 5015],\n", + " [ 9, 9, 47, ..., 6245, 6295, 6250]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 277, 326, 326, ..., 6330, 6330, 6330],\n", + " [2843, 1212, 1287, ..., 5863, 4367, 6268]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 132, 132, 132, ..., 6173, 6232, 6232],\n", + " [2162, 2179, 2525, ..., 3344, 3003, 3196]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006546\n", + "sampling 0.006337\n", + "noi time: 0.002203\n", + "get_vertex_data call: 0.035217\n", + "noi group time: 0.003451\n", + "eoi_group_time: 0.013781\n", + "second half: 0.19682\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 28266, 31145, ..., 1126558, 1131756, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 28266, 31145, ..., 1126558, 1131756, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1230245, 1230252, 1215983, ..., 1930821, 1939382, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1230245, 1230252, 1215983, ..., 1930821, 1939382, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137426, 1137204, 1141424, 1141435, 1136230, 1140284, 1140285, 1136347,\n", + " 1135926, 1135933, 1135716, 1137784, 1140799, 1141758, 1137506, 1136223,\n", + " 1141250, 1136969, 1141443, 1139813, 1145984, 1145992, 1137264, 1137274,\n", + " 1138938, 1139141, 1143372, 1146640, 1139609, 1139615, 1140783, 1145288,\n", + " 1149216, 1142958, 1142959, 1155689, 1143820, 1147473, 1142881, 1144632,\n", + " 1148350, 1146656, 1152666, 1138347, 1148552, 1137229, 1150555, 1147211,\n", + " 1136685, 1152427, 1134715, 1140311, 1137254, 1137263, 1138356, 1153467,\n", + " 1140156, 1135918, 1140030, 1135363, 1135367, 1135202, 1141036, 1136288,\n", + " 1134794, 1157443, 1138504, 1138508, 1137329, 1157103, 1137693, 1137695,\n", + " 1144395, 1157395, 1156159, 1134841, 1141705, 1135579, 1135583, 1142607,\n", + " 1141086, 1138514, 1153099, 1137957, 1154132, 1137022, 1156899, 1139695,\n", + " 1138436, 1136536, 1138461, 1157186, 1157190, 1136594, 1149328, 1149343,\n", + " 1156606, 1147112, 1142611, 1156141, 1158984, 1145842, 1145843, 1141533,\n", + " 1139667, 1139673, 1138069, 1142255, 1165568, 1134992, 1136730, 1158961,\n", + " 1139321, 1142909, 1141070, 1153544, 1141966, 1155648, 1152044, 1136051,\n", + " 1140657, 1137728, 1146214, 1134750, 1135540, 1136697, 1140227, 1140231,\n", + " 1140228, 1141088, 1141098, 1141100, 1149001, 1139889, 1145346, 1143767,\n", + " 1143221, 1139025, 1139029, 1140007, 1140009, 1146834, 1135861, 1136625,\n", + " 1141224, 1136917, 1139730, 1143679, 1144237, 1141155, 1141156, 1141159,\n", + " 1139495, 1144650, 1134979, 1136862, 1137072, 1137074, 1144428, 1138495,\n", + " 1142050, 1142060, 1141810, 1158749, 1142719, 1139190, 1141479, 1138708,\n", + " 1140110, 1144434, 1144596, 1148263, 1136864, 1135315, 1141398, 1141405,\n", + " 1140443, 1144182, 1144179, 1150906, 1150910, 1144865, 1139559, 1139563,\n", + " 1138539, 1142650, 1141365, 1153068, 1163674, 1141664, 1149093, 1149101,\n", + " 1139019, 1138292, 1144279, 1139508, 1139510, 1138815, 1139127, 1145000,\n", + " 1143779, 1140616, 1147901, 1140979, 1140990, 1147050, 1145873, 1152976,\n", + " 1135460, 1163917, 1141925, 1144242, 1141846, 1150248, 1143851, 1146024,\n", + " 1138084, 1154332, 1141585, 1149928, 1141236, 1139990, 1139988, 1143293,\n", + " 1151124, 1143883, 1147543, 1147545, 1147540, 1148763, 1147282, 1147290,\n", + " 1142816, 1140346, 1149366, 1148003, 1143049, 1143051, 1142583, 1144921,\n", + " 1157720, 1136836, 1165623, 1141496, 1143345, 1144766, 1144753, 1144611,\n", + " 1144618, 1144619, 1150294, 1146523, 1143961, 1143456, 1143471, 1143457,\n", + " 1137703, 1155700, 1140358, 1140364, 1137998, 1137997, 1143082, 1148966,\n", + " 1144219, 1144222, 1147999, 1146949, 1144013, 1147243, 1148704, 1162731,\n", + " 1153701, 1147064, 1147070, 1147027, 1147031, 1147248, 1158226, 1143922,\n", + " 1141143, 1141138, 1154526, 1145751, 1142376, 1138638, 1146178, 1152530,\n", + " 1150280, 1150445, 1149258, 1149791, 1144514, 1144524, 1144526, 1152013,\n", + " 1154816, 1151480, 1152022, 1152026, 1154263, 1139919, 1139914, 1147023,\n", + " 1141949, 1151795, 1148744, 1137637, 1153568, 1147653, 1149412, 1148288,\n", + " 1148294, 1135079, 1154420, 1158794, 1148180, 1151363, 1152561, 1136251,\n", + " 1136247, 1146676, 1146682, 1146686, 1141177, 1157983, 1171341, 1144110,\n", + " 1151948, 1143901, 1143895, 1148204, 1141737, 1153124, 1153192, 1153188,\n", + " 1145111, 1148058, 1152878, 1144863, 1150352, 1155098, 1147446, 1152581,\n", + " 1151908, 1154183, 1154182, 1150715, 1148498, 1149737, 1146562, 1141420,\n", + " 1157203, 1155161, 1150890, 1146623, 1151401, 1152099, 1146280, 1153032,\n", + " 1150085, 1137746, 1146304, 1152622, 1140521, 1155145, 1155140, 1136410,\n", + " 1152826, 1155337, 1154123, 1157839, 1152673, 1152680, 1154633, 1151582,\n", + " 1151617, 1150578, 1152944, 1152903, 1152342, 1152348, 1156816, 1138279,\n", + " 1138281, 1136028, 1158704, 1156622, 1151195, 1152928, 1151064, 1156395,\n", + " 1154722, 1142777, 1150110, 1153907, 1150162, 1150164, 1144016, 1148033,\n", + " 1148040, 1152601, 1145656, 1144667, 1137048, 1158477, 1148628, 1158540,\n", + " 1137458, 1149947, 1154563, 1135698, 1155376, 1142041, 1135434, 1158860,\n", + " 1158862, 1156505, 1152384, 1157069, 1155408, 1145189, 1145191, 1151260,\n", + " 1156638, 1165700, 1152738, 1153413, 1135644, 1135645, 1147810, 1158306,\n", + " 1158311, 1151271, 1155441, 1137972, 1150130, 1144355, 1154530, 1142764,\n", + " 1156207, 1151379, 1155122, 1149519, 1151432, 1145793, 1158096, 1155628,\n", + " 1155630, 1155631, 1156563, 1154550, 1136466, 1158824, 1158325, 1148835,\n", + " 1155646, 1161231, 1154246, 1154250, 1154080, 1151892, 1154909, 1143189,\n", + " 1150371, 1157439, 1141627, 1150987, 1140737, 1137152, 1158204, 1137381,\n", + " 1159116, 1134677, 1134685, 1135601, 1135611, 1135605, 1135614, 1163899,\n", + " 1155848, 1155843, 1155852, 1157684, 1149145, 1140627, 1140633, 1152209,\n", + " 1159213, 1140381, 1151093, 1159130, 1157033, 1144843, 1155975, 1158846,\n", + " 1156812, 1154600, 1136899, 1136896, 1158753, 1158882, 1140218, 1158447,\n", + " 1156778, 1158285, 1136494, 1136491, 1147586, 1152143, 1153808, 1136640,\n", + " 1136646, 1140049, 1158558, 1154339, 1158004, 1158257, 1169897, 1135649,\n", + " 1164276, 1150684, 1167359, 1156045, 1159042, 1159052, 1159046, 1159071,\n", + " 1167589, 1142416, 1162044, 1153052, 1153045, 1159738, 1167555, 1156235,\n", + " 1144158, 1161933, 1153842, 1156096, 1138393, 1150046, 1149070, 1155476,\n", + " 1155479, 1153514, 1153519, 1147300, 1158680, 1171995, 1138161, 1164002,\n", + " 1156795, 1149956, 1149963, 1148026, 1166073, 1159985, 1140731, 1157355,\n", + " 1146063, 1163443, 1164048, 1158868, 1140643, 1141862, 1148603, 1163019,\n", + " 1158643, 1158653, 1156181, 1159032, 1152247, 1138674, 1138676, 1144977,\n", + " 1147836, 1146510, 1146509, 1164580, 1144739, 1161723, 1151650, 1147426,\n", + " 1184829, 1157054, 1159380, 1156739, 1156744, 1160849, 1157955, 1150649,\n", + " 1168750, 1144812, 1167253, 1142733, 1167777, 1145743, 1145176, 1165154,\n", + " 1144972, 1144973, 1146444, 1162292, 1166063, 1152624, 1152626, 1155911,\n", + " 1139350, 1139351, 1139345, 1145900, 1151752, 1163959, 1152203, 1143395,\n", + " 1149565, 1158722, 1154076, 1168756, 1147331, 1147339, 1147338, 1179488,\n", + " 1169602, 1149480, 1155172, 1150518, 1144346, 1144336, 1157534, 1138378,\n", + " 1138382, 1169162, 1157331, 1141043, 1169359, 1149452, 1146344, 1149688,\n", + " 1158611, 1158623, 1158051, 1158062, 1160138, 1165899, 1155502, 1152353,\n", + " 1152360, 1152550, 1168049, 1192141, 1172838, 1173307, 1160936, 1152151,\n", + " 1157158, 1157153, 1157373, 1147711, 1147707, 1172435, 1148128, 1148131,\n", + " 1166820, 1154311, 1172606, 1181135, 1177700, 1171614, 1144545, 1144557,\n", + " 1166673, 1182134, 1161595, 1154148, 1149173, 1172537, 1143279, 1169976,\n", + " 1168481, 1143410, 1181092, 1169619, 1153803, 1153141, 1164818, 1163100,\n", + " 1179299, 1151519, 1178569, 1158027, 1161255, 1178500, 1162129, 1179229,\n", + " 1155262, 1171773, 1157795, 1171623, 1164034, 1178366, 1157132, 1180036,\n", + " 1157072, 1158249, 1161612, 1153898, 1134650, 1164200, 1145626, 1161067,\n", + " 1161068, 1184253, 1149755, 1180732, 1157761, 1179776, 1158779, 1158513,\n", + " 1158380, 1155899, 1164411, 1140386, 1169061, 1160810, 1162382, 1165142,\n", + " 1163414, 1181469, 1187131, 1166772, 1147182, 1156162, 1170034, 1156539,\n", + " 1139828, 1139825, 1139831, 1150265, 1154812, 1149668, 1149619, 1156055,\n", + " 1151972, 1181453, 1149544, 1194316, 1189189, 1141001, 1179414, 1192809,\n", + " 1151774, 1152117, 1184355, 1169707, 1166838, 1171200, 1191592, 1179313,\n", + " 1177290, 1172122, 1158064, 1183558, 1176829, 1155958, 1155962, 1155960,\n", + " 1187536, 1194006, 1167471, 1182302, 1169397, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137426, 1137204, 1141424, 1141435, 1136230, 1140284, 1140285, 1136347,\n", + " 1135926, 1135933, 1135716, 1137784, 1140799, 1141758, 1137506, 1136223,\n", + " 1141250, 1136969, 1141443, 1139813, 1145984, 1145992, 1137264, 1137274,\n", + " 1138938, 1139141, 1143372, 1146640, 1139609, 1139615, 1140783, 1145288,\n", + " 1149216, 1142958, 1142959, 1155689, 1143820, 1147473, 1142881, 1144632,\n", + " 1148350, 1146656, 1152666, 1138347, 1148552, 1137229, 1150555, 1147211,\n", + " 1136685, 1152427, 1134715, 1140311, 1137254, 1137263, 1138356, 1153467,\n", + " 1140156, 1135918, 1140030, 1135363, 1135367, 1135202, 1141036, 1136288,\n", + " 1134794, 1157443, 1138504, 1138508, 1137329, 1157103, 1137693, 1137695,\n", + " 1144395, 1157395, 1156159, 1134841, 1141705, 1135579, 1135583, 1142607,\n", + " 1141086, 1138514, 1153099, 1137957, 1154132, 1137022, 1156899, 1139695,\n", + " 1138436, 1136536, 1138461, 1157186, 1157190, 1136594, 1149328, 1149343,\n", + " 1156606, 1147112, 1142611, 1156141, 1158984, 1145842, 1145843, 1141533,\n", + " 1139667, 1139673, 1138069, 1142255, 1165568, 1134992, 1136730, 1158961,\n", + " 1139321, 1142909, 1141070, 1153544, 1141966, 1155648, 1152044, 1136051,\n", + " 1140657, 1137728, 1146214, 1134750, 1135540, 1136697, 1140227, 1140231,\n", + " 1140228, 1141088, 1141098, 1141100, 1149001, 1139889, 1145346, 1143767,\n", + " 1143221, 1139025, 1139029, 1140007, 1140009, 1146834, 1135861, 1136625,\n", + " 1141224, 1136917, 1139730, 1143679, 1144237, 1141155, 1141156, 1141159,\n", + " 1139495, 1144650, 1134979, 1136862, 1137072, 1137074, 1144428, 1138495,\n", + " 1142050, 1142060, 1141810, 1158749, 1142719, 1139190, 1141479, 1138708,\n", + " 1140110, 1144434, 1144596, 1148263, 1136864, 1135315, 1141398, 1141405,\n", + " 1140443, 1144182, 1144179, 1150906, 1150910, 1144865, 1139559, 1139563,\n", + " 1138539, 1142650, 1141365, 1153068, 1163674, 1141664, 1149093, 1149101,\n", + " 1139019, 1138292, 1144279, 1139508, 1139510, 1138815, 1139127, 1145000,\n", + " 1143779, 1140616, 1147901, 1140979, 1140990, 1147050, 1145873, 1152976,\n", + " 1135460, 1163917, 1141925, 1144242, 1141846, 1150248, 1143851, 1146024,\n", + " 1138084, 1154332, 1141585, 1149928, 1141236, 1139990, 1139988, 1143293,\n", + " 1151124, 1143883, 1147543, 1147545, 1147540, 1148763, 1147282, 1147290,\n", + " 1142816, 1140346, 1149366, 1148003, 1143049, 1143051, 1142583, 1144921,\n", + " 1157720, 1136836, 1165623, 1141496, 1143345, 1144766, 1144753, 1144611,\n", + " 1144618, 1144619, 1150294, 1146523, 1143961, 1143456, 1143471, 1143457,\n", + " 1137703, 1155700, 1140358, 1140364, 1137998, 1137997, 1143082, 1148966,\n", + " 1144219, 1144222, 1147999, 1146949, 1144013, 1147243, 1148704, 1162731,\n", + " 1153701, 1147064, 1147070, 1147027, 1147031, 1147248, 1158226, 1143922,\n", + " 1141143, 1141138, 1154526, 1145751, 1142376, 1138638, 1146178, 1152530,\n", + " 1150280, 1150445, 1149258, 1149791, 1144514, 1144524, 1144526, 1152013,\n", + " 1154816, 1151480, 1152022, 1152026, 1154263, 1139919, 1139914, 1147023,\n", + " 1141949, 1151795, 1148744, 1137637, 1153568, 1147653, 1149412, 1148288,\n", + " 1148294, 1135079, 1154420, 1158794, 1148180, 1151363, 1152561, 1136251,\n", + " 1136247, 1146676, 1146682, 1146686, 1141177, 1157983, 1171341, 1144110,\n", + " 1151948, 1143901, 1143895, 1148204, 1141737, 1153124, 1153192, 1153188,\n", + " 1145111, 1148058, 1152878, 1144863, 1150352, 1155098, 1147446, 1152581,\n", + " 1151908, 1154183, 1154182, 1150715, 1148498, 1149737, 1146562, 1141420,\n", + " 1157203, 1155161, 1150890, 1146623, 1151401, 1152099, 1146280, 1153032,\n", + " 1150085, 1137746, 1146304, 1152622, 1140521, 1155145, 1155140, 1136410,\n", + " 1152826, 1155337, 1154123, 1157839, 1152673, 1152680, 1154633, 1151582,\n", + " 1151617, 1150578, 1152944, 1152903, 1152342, 1152348, 1156816, 1138279,\n", + " 1138281, 1136028, 1158704, 1156622, 1151195, 1152928, 1151064, 1156395,\n", + " 1154722, 1142777, 1150110, 1153907, 1150162, 1150164, 1144016, 1148033,\n", + " 1148040, 1152601, 1145656, 1144667, 1137048, 1158477, 1148628, 1158540,\n", + " 1137458, 1149947, 1154563, 1135698, 1155376, 1142041, 1135434, 1158860,\n", + " 1158862, 1156505, 1152384, 1157069, 1155408, 1145189, 1145191, 1151260,\n", + " 1156638, 1165700, 1152738, 1153413, 1135644, 1135645, 1147810, 1158306,\n", + " 1158311, 1151271, 1155441, 1137972, 1150130, 1144355, 1154530, 1142764,\n", + " 1156207, 1151379, 1155122, 1149519, 1151432, 1145793, 1158096, 1155628,\n", + " 1155630, 1155631, 1156563, 1154550, 1136466, 1158824, 1158325, 1148835,\n", + " 1155646, 1161231, 1154246, 1154250, 1154080, 1151892, 1154909, 1143189,\n", + " 1150371, 1157439, 1141627, 1150987, 1140737, 1137152, 1158204, 1137381,\n", + " 1159116, 1134677, 1134685, 1135601, 1135611, 1135605, 1135614, 1163899,\n", + " 1155848, 1155843, 1155852, 1157684, 1149145, 1140627, 1140633, 1152209,\n", + " 1159213, 1140381, 1151093, 1159130, 1157033, 1144843, 1155975, 1158846,\n", + " 1156812, 1154600, 1136899, 1136896, 1158753, 1158882, 1140218, 1158447,\n", + " 1156778, 1158285, 1136494, 1136491, 1147586, 1152143, 1153808, 1136640,\n", + " 1136646, 1140049, 1158558, 1154339, 1158004, 1158257, 1169897, 1135649,\n", + " 1164276, 1150684, 1167359, 1156045, 1159042, 1159052, 1159046, 1159071,\n", + " 1167589, 1142416, 1162044, 1153052, 1153045, 1159738, 1167555, 1156235,\n", + " 1144158, 1161933, 1153842, 1156096, 1138393, 1150046, 1149070, 1155476,\n", + " 1155479, 1153514, 1153519, 1147300, 1158680, 1171995, 1138161, 1164002,\n", + " 1156795, 1149956, 1149963, 1148026, 1166073, 1159985, 1140731, 1157355,\n", + " 1146063, 1163443, 1164048, 1158868, 1140643, 1141862, 1148603, 1163019,\n", + " 1158643, 1158653, 1156181, 1159032, 1152247, 1138674, 1138676, 1144977,\n", + " 1147836, 1146510, 1146509, 1164580, 1144739, 1161723, 1151650, 1147426,\n", + " 1184829, 1157054, 1159380, 1156739, 1156744, 1160849, 1157955, 1150649,\n", + " 1168750, 1144812, 1167253, 1142733, 1167777, 1145743, 1145176, 1165154,\n", + " 1144972, 1144973, 1146444, 1162292, 1166063, 1152624, 1152626, 1155911,\n", + " 1139350, 1139351, 1139345, 1145900, 1151752, 1163959, 1152203, 1143395,\n", + " 1149565, 1158722, 1154076, 1168756, 1147331, 1147339, 1147338, 1179488,\n", + " 1169602, 1149480, 1155172, 1150518, 1144346, 1144336, 1157534, 1138378,\n", + " 1138382, 1169162, 1157331, 1141043, 1169359, 1149452, 1146344, 1149688,\n", + " 1158611, 1158623, 1158051, 1158062, 1160138, 1165899, 1155502, 1152353,\n", + " 1152360, 1152550, 1168049, 1192141, 1172838, 1173307, 1160936, 1152151,\n", + " 1157158, 1157153, 1157373, 1147711, 1147707, 1172435, 1148128, 1148131,\n", + " 1166820, 1154311, 1172606, 1181135, 1177700, 1171614, 1144545, 1144557,\n", + " 1166673, 1182134, 1161595, 1154148, 1149173, 1172537, 1143279, 1169976,\n", + " 1168481, 1143410, 1181092, 1169619, 1153803, 1153141, 1164818, 1163100,\n", + " 1179299, 1151519, 1178569, 1158027, 1161255, 1178500, 1162129, 1179229,\n", + " 1155262, 1171773, 1157795, 1171623, 1164034, 1178366, 1157132, 1180036,\n", + " 1157072, 1158249, 1161612, 1153898, 1134650, 1164200, 1145626, 1161067,\n", + " 1161068, 1184253, 1149755, 1180732, 1157761, 1179776, 1158779, 1158513,\n", + " 1158380, 1155899, 1164411, 1140386, 1169061, 1160810, 1162382, 1165142,\n", + " 1163414, 1181469, 1187131, 1166772, 1147182, 1156162, 1170034, 1156539,\n", + " 1139828, 1139825, 1139831, 1150265, 1154812, 1149668, 1149619, 1156055,\n", + " 1151972, 1181453, 1149544, 1194316, 1189189, 1141001, 1179414, 1192809,\n", + " 1151774, 1152117, 1184355, 1169707, 1166838, 1171200, 1191592, 1179313,\n", + " 1177290, 1172122, 1158064, 1183558, 1176829, 1155958, 1155962, 1155960,\n", + " 1187536, 1194006, 1167471, 1182302, 1169397, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197841, 1198769, 1199424, 1197719, 1201094, 1195860, 1199282,\n", + " 1198459, 1202243, 1202255, 1198840, 1198844, 1201577, 1201458, 1199250,\n", + " 1198624, 1196956, 1202804, 1196433, 1194866, 1197931, 1199135, 1196534,\n", + " 1201992, 1198314, 1195888, 1195895, 1196334, 1196977, 1196987, 1194759,\n", + " 1196835, 1198668, 1196165, 1198262, 1198367, 1198958, 1198161, 1196711,\n", + " 1199823, 1195148, 1195221, 1195270, 1195278, 1197136, 1196242, 1196247,\n", + " 1195850, 1198925, 1195541, 1197478, 1197483, 1199699, 1196393, 1195351,\n", + " 1195353, 1200949, 1197285, 1197291, 1195119, 1197577, 1197583, 1199628,\n", + " 1199803, 1200076, 1199038, 1198400, 1199231, 1199673, 1199676, 1199949,\n", + " 1201511, 1196508, 1199021, 1199022, 1197601, 1196727, 1195773, 1198428,\n", + " 1198811, 1201534, 1200612, 1199087, 1201947, 1200503, 1199445, 1201079,\n", + " 1202630, 1202635, 1201056, 1200927, 1198481, 1200553, 1200429, 1197097,\n", + " 1202138, 1196889, 1199908, 1200194, 1196779, 1199485, 1200825, 1201291,\n", + " 1201871, 1203329, 1201590, 1202209, 1202219, 1198565, 1196966, 1200784,\n", + " 1200793, 1202687, 1196071, 1199606, 1195047, 1203112, 1195677, 1200276,\n", + " 1195418, 1197816, 1196597, 1198973, 1203102, 1201138, 1199403, 1198147,\n", + " 1198824, 1197735, 1199786, 1200468, 1200974, 1201886, 1200296, 1197652,\n", + " 1197026, 1195163, 1196428, 1196424], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197841, 1198769, 1199424, 1197719, 1201094, 1195860, 1199282,\n", + " 1198459, 1202243, 1202255, 1198840, 1198844, 1201577, 1201458, 1199250,\n", + " 1198624, 1196956, 1202804, 1196433, 1194866, 1197931, 1199135, 1196534,\n", + " 1201992, 1198314, 1195888, 1195895, 1196334, 1196977, 1196987, 1194759,\n", + " 1196835, 1198668, 1196165, 1198262, 1198367, 1198958, 1198161, 1196711,\n", + " 1199823, 1195148, 1195221, 1195270, 1195278, 1197136, 1196242, 1196247,\n", + " 1195850, 1198925, 1195541, 1197478, 1197483, 1199699, 1196393, 1195351,\n", + " 1195353, 1200949, 1197285, 1197291, 1195119, 1197577, 1197583, 1199628,\n", + " 1199803, 1200076, 1199038, 1198400, 1199231, 1199673, 1199676, 1199949,\n", + " 1201511, 1196508, 1199021, 1199022, 1197601, 1196727, 1195773, 1198428,\n", + " 1198811, 1201534, 1200612, 1199087, 1201947, 1200503, 1199445, 1201079,\n", + " 1202630, 1202635, 1201056, 1200927, 1198481, 1200553, 1200429, 1197097,\n", + " 1202138, 1196889, 1199908, 1200194, 1196779, 1199485, 1200825, 1201291,\n", + " 1201871, 1203329, 1201590, 1202209, 1202219, 1198565, 1196966, 1200784,\n", + " 1200793, 1202687, 1196071, 1199606, 1195047, 1203112, 1195677, 1200276,\n", + " 1195418, 1197816, 1196597, 1198973, 1203102, 1201138, 1199403, 1198147,\n", + " 1198824, 1197735, 1199786, 1200468, 1200974, 1201886, 1200296, 1197652,\n", + " 1197026, 1195163, 1196428, 1196424], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 1.4580e-01, -5.0995e-04, 7.4196e-01, ..., 1.0940e-01,\n", + " -1.5185e-03, -5.2942e-03],\n", + " [ 1.5772e-01, -3.5987e-04, 6.8864e-01, ..., 1.0823e-01,\n", + " -1.6092e-03, -4.6980e-03],\n", + " [ 1.3977e-01, -1.5733e-04, 6.7059e-01, ..., 1.2421e-01,\n", + " -1.8590e-03, -4.5064e-03],\n", + " ...,\n", + " [ 5.6636e-02, -1.0702e-04, 4.8480e-01, ..., 1.3390e-01,\n", + " -1.6107e-03, -3.3915e-03],\n", + " [ 1.3170e-01, -1.6684e-04, 6.5096e-01, ..., 1.1122e-01,\n", + " -1.6217e-03, -4.4604e-03],\n", + " [ 8.3653e-02, 6.0994e-02, 4.7558e-01, ..., 1.3816e-01,\n", + " -1.7175e-03, -3.2993e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 6.2051e-01, -1.1496e-02, 6.0427e-01, ..., -6.2833e-03,\n", + " -1.0862e-02, -9.4134e-04],\n", + " [ 2.8599e-01, -8.5862e-03, 7.0153e-01, ..., -4.8162e-03,\n", + " -8.2376e-03, -4.4125e-03],\n", + " [ 5.4517e-01, -7.8412e-03, 4.8705e-01, ..., -6.2128e-03,\n", + " -1.1107e-02, 2.4785e-01],\n", + " ...,\n", + " [ 3.7848e-01, -2.9864e-02, 1.7716e+00, ..., -1.2974e-02,\n", + " -1.9462e-02, -4.5759e-03],\n", + " [ 2.3046e-01, -7.5484e-03, 5.6868e-01, ..., -5.3272e-03,\n", + " -8.2881e-03, -1.1090e-03],\n", + " [ 1.4310e+00, -1.4952e-02, 1.1351e+00, ..., -1.6277e-03,\n", + " -2.8299e-02, 2.4069e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-9.8903e-04, 3.3424e-02, 1.6932e-01, ..., 1.2126e+00,\n", + " -6.4542e-04, 1.4642e-01],\n", + " [-3.4743e-03, 6.0096e-02, 4.0024e-01, ..., 8.2458e-01,\n", + " -1.2657e-03, -1.2240e-03],\n", + " [-6.0716e-04, -5.1985e-04, 1.5167e-01, ..., 1.2496e+00,\n", + " -2.1792e-04, 2.2259e-01],\n", + " ...,\n", + " [-6.2777e-04, 1.3390e-02, 1.5371e-01, ..., 1.2021e-01,\n", + " -2.7591e-04, -8.3313e-04],\n", + " [-2.0490e-03, 4.3354e-02, 2.3779e-01, ..., 9.1993e-01,\n", + " -2.2778e-03, -1.2444e-03],\n", + " [-2.7932e-04, -5.3619e-04, 1.5005e-01, ..., 1.2785e+00,\n", + " 6.4135e-02, 2.7272e-01]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-5.0795e-04, 1.7876e-01, 3.2372e-02, ..., -3.9273e-03,\n", + " -1.9980e-05, 1.2529e-02],\n", + " [-8.1462e-04, 2.1381e-01, 1.5654e-01, ..., -5.5320e-03,\n", + " 7.7796e-02, 4.4482e-02],\n", + " [-3.3024e-04, 1.8322e-01, 1.2531e-01, ..., -4.6438e-03,\n", + " -7.6517e-05, 5.3291e-02],\n", + " ...,\n", + " [-7.4148e-04, 2.0820e-01, 1.5764e-01, ..., -4.5846e-03,\n", + " 5.4519e-02, 4.4591e-02],\n", + " [-3.7963e-04, 1.6198e-01, 9.7746e-02, ..., -5.1512e-03,\n", + " 5.8003e-02, -2.5404e-04],\n", + " [ 3.1718e-02, 5.6321e-01, 3.6890e-01, ..., -4.4291e-03,\n", + " 1.1810e-01, -8.8148e-04]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 79, 75, 19, 101, 109, 104, 208, 208, 208, 384, 336, 381,\n", + " 459, 459, 459, 459, 443, 443, 642, 642, 681, 651, 653, 672,\n", + " 672, 595, 500, 1037, 1037, 625, 843, 1126, 879, 893, 882, 1301,\n", + " 611, 1065, 1065, 1269, 1366, 1343, 1343, 1299, 1361, 1674, 1539, 1679,\n", + " 1685, 1598, 1658, 1658, 1521, 1647, 1601, 1601, 1601, 1719, 1719, 1832,\n", + " 1784, 1748, 1696, 1855, 1922, 1922, 1986, 1907, 1907, 2128, 2180, 2143,\n", + " 2093, 2253, 2263, 2212, 2212, 2368, 2338, 2283, 2283, 2357, 2574, 2525,\n", + " 2525, 2371, 2700, 2851, 2790, 2790, 2790, 2658, 2658, 2658, 2658, 2763,\n", + " 2790, 2878, 3072, 2986, 3135, 3135, 3259, 3259, 3259, 3298, 3566, 3603,\n", + " 3784, 3560, 3540, 3638, 3652, 3661, 3788, 3741, 3869, 4047, 3964, 4075,\n", + " 4008, 4031, 4015, 4077, 4143, 4230, 4176, 4209, 4291, 4291, 4291, 4275,\n", + " 4398, 4412, 4412, 4409, 4355, 4441, 4369, 4291, 4291, 4423, 4661, 4640,\n", + " 4540, 4755, 4814, 4825, 4723, 4821, 4826, 5044, 5044, 4986, 4850, 5058,\n", + " 4954, 5076, 4866, 4866, 5131, 5131, 5168, 5261, 5204, 5308, 5192, 5467,\n", + " 5318, 5558, 5348, 5454, 5363, 5680, 5633, 5393, 5393, 5711, 5897, 5897,\n", + " 5626, 5626, 5756, 5688, 5688, 5446, 5446, 5446, 5690, 5580, 5580, 5578,\n", + " 5493, 5810, 5889, 5782, 5782, 6200, 6200, 6160, 6054, 6054, 6106, 6106,\n", + " 6106, 6106, 6263, 6252, 6010, 6176, 6101, 6239, 6195, 6166, 6251],\n", + " [ 2, 93, 26, 85, 10, 7, 107, 30, 9, 67, 45, 7,\n", + " 23, 45, 110, 43, 89, 7, 77, 65, 75, 72, 77, 100,\n", + " 24, 139, 80, 43, 73, 28, 19, 125, 69, 61, 21, 88,\n", + " 98, 122, 136, 118, 124, 109, 123, 75, 92, 33, 50, 37,\n", + " 95, 83, 6, 133, 4, 7, 12, 111, 124, 86, 64, 82,\n", + " 43, 101, 21, 110, 117, 7, 23, 126, 96, 4, 110, 130,\n", + " 30, 59, 56, 44, 83, 83, 53, 106, 55, 13, 43, 27,\n", + " 49, 77, 77, 111, 63, 16, 110, 79, 22, 58, 96, 12,\n", + " 85, 41, 63, 83, 122, 87, 76, 84, 86, 136, 77, 60,\n", + " 119, 23, 115, 35, 62, 99, 74, 112, 34, 135, 83, 77,\n", + " 7, 11, 127, 59, 132, 51, 97, 119, 77, 138, 66, 83,\n", + " 77, 113, 32, 4, 57, 131, 15, 57, 68, 46, 1, 94,\n", + " 108, 104, 77, 20, 59, 59, 105, 121, 3, 77, 77, 116,\n", + " 59, 5, 110, 56, 43, 71, 25, 137, 118, 137, 10, 72,\n", + " 59, 79, 33, 0, 80, 48, 47, 129, 114, 77, 77, 134,\n", + " 17, 77, 52, 77, 40, 29, 90, 43, 14, 86, 84, 18,\n", + " 103, 77, 70, 77, 93, 42, 81, 39, 124, 135, 36, 91,\n", + " 54, 120, 31, 14, 38, 128, 137, 26, 102, 78, 8]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[6952, 3989, 3018, ..., 513, 7227, 2395],\n", + " [ 197, 33, 268, ..., 7178, 7272, 7087]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 44, 63, 63, ..., 48, 53, 48],\n", + " [ 88, 230, 80, ..., 6253, 6237, 6309]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 307, 140, 140, ..., 7047, 7047, 7047],\n", + " [ 593, 173, 81, ..., 136, 532, 372]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 659, 349, 122, ..., 115, 700, 738],\n", + " [ 120, 54, 241, ..., 7162, 7266, 7117]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 375, 375, 4267, ..., 5700, 6479, 2634],\n", + " [ 208, 136, 208, ..., 6273, 6310, 6150]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 140, 140, 140, ..., 7047, 7047, 7047],\n", + " [ 855, 1673, 1626, ..., 350, 381, 870]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 208, 208, 208, ..., 6251, 6195, 6195],\n", + " [6040, 692, 809, ..., 4699, 7206, 6638]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.003631\n", + "sampling 0.003546\n", + "noi time: 0.000843\n", + "get_vertex_data call: 0.037929\n", + "noi group time: 0.00394\n", + "eoi_group_time: 0.014468\n", + "second half: 0.201975\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 32616, 27122, 28974, ..., 1111402, 1131749, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 32616, 27122, 28974, ..., 1111402, 1131749, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1231425, 1221051, 1212206, ..., 1935650, 1929315, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1231425, 1221051, 1212206, ..., 1935650, 1929315, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1135061, 1137212, 1141424, 1140282, 1135933, 1135716, 1140785, 1141758,\n", + " 1138335, 1136208, 1136223, 1141443, 1149826, 1145370, 1145373, 1137947,\n", + " 1145992, 1145999, 1143360, 1143372, 1139241, 1150506, 1145281, 1139866,\n", + " 1134943, 1148582, 1149216, 1143812, 1149646, 1147473, 1147483, 1147486,\n", + " 1141879, 1135994, 1142881, 1144632, 1149033, 1134701, 1135947, 1135950,\n", + " 1148350, 1135478, 1146472, 1146465, 1138341, 1141916, 1137220, 1150546,\n", + " 1155014, 1139364, 1147211, 1136683, 1136685, 1150329, 1136268, 1140313,\n", + " 1140535, 1140540, 1154410, 1137254, 1137172, 1137181, 1149460, 1138356,\n", + " 1134735, 1140020, 1162453, 1135367, 1135200, 1135202, 1141033, 1141036,\n", + " 1134794, 1134797, 1138504, 1137329, 1137341, 1137342, 1143064, 1136609,\n", + " 1136619, 1144395, 1137534, 1136662, 1137479, 1156149, 1156152, 1148481,\n", + " 1148489, 1148483, 1134841, 1141703, 1135983, 1135579, 1135583, 1141086,\n", + " 1136111, 1135828, 1140240, 1156347, 1138514, 1158136, 1156908, 1156897,\n", + " 1135522, 1139685, 1138434, 1138436, 1138440, 1138445, 1140074, 1137493,\n", + " 1154790, 1157190, 1136594, 1158390, 1135088, 1138693, 1147111, 1147112,\n", + " 1147113, 1142611, 1142616, 1160819, 1135352, 1138177, 1158984, 1148531,\n", + " 1150953, 1137119, 1139844, 1141533, 1136457, 1139667, 1139673, 1138067,\n", + " 1142243, 1136085, 1134992, 1142793, 1148805, 1135789, 1140199, 1158974,\n", + " 1142906, 1141058, 1141065, 1140034, 1138147, 1138148, 1138151, 1141955,\n", + " 1140554, 1152042, 1152044, 1139063, 1142299, 1137734, 1146222, 1138246,\n", + " 1135540, 1141097, 1141098, 1144134, 1144138, 1139889, 1145357, 1141983,\n", + " 1136392, 1143767, 1154855, 1143225, 1139025, 1140003, 1149979, 1149975,\n", + " 1135860, 1154466, 1139436, 1136627, 1141224, 1141901, 1139386, 1159794,\n", + " 1136917, 1139741, 1137186, 1137188, 1144237, 1140607, 1146453, 1141786,\n", + " 1139495, 1139501, 1144934, 1136862, 1136852, 1147848, 1147852, 1144422,\n", + " 1144428, 1138482, 1142052, 1141821, 1140175, 1158749, 1148864, 1148871,\n", + " 1143574, 1139190, 1137243, 1138706, 1142913, 1143111, 1144596, 1142451,\n", + " 1157417, 1144042, 1141570, 1141573, 1140882, 1135312, 1135325, 1140433,\n", + " 1140444, 1146194, 1134827, 1138539, 1147153, 1142650, 1141365, 1141367,\n", + " 1153069, 1141678, 1144284, 1144279, 1143917, 1139510, 1139127, 1145001,\n", + " 1145200, 1140616, 1147888, 1139171, 1146695, 1135047, 1141560, 1143692,\n", + " 1143680, 1147050, 1147047, 1145873, 1135457, 1139455, 1139000, 1141925,\n", + " 1146909, 1144242, 1140579, 1140696, 1140695, 1139407, 1139405, 1141390,\n", + " 1145974, 1143844, 1143851, 1146008, 1136277, 1136275, 1146024, 1138085,\n", + " 1146129, 1146140, 1146131, 1154323, 1142533, 1141245, 1139990, 1143293,\n", + " 1143883, 1147543, 1148763, 1147282, 1142816, 1136330, 1140349, 1149366,\n", + " 1139417, 1146088, 1149610, 1143040, 1136160, 1136167, 1144923, 1157717,\n", + " 1157720, 1136836, 1165631, 1144768, 1144769, 1138226, 1139051, 1142158,\n", + " 1145429, 1143345, 1144765, 1138597, 1139979, 1135876, 1150756, 1138013,\n", + " 1144375, 1146514, 1143456, 1143457, 1137697, 1143937, 1140829, 1146580,\n", + " 1146590, 1147574, 1155700, 1143806, 1146636, 1147521, 1147523, 1140364,\n", + " 1149569, 1149581, 1137990, 1143080, 1168914, 1147984, 1147999, 1146957,\n", + " 1134899, 1134902, 1139252, 1145457, 1148704, 1143310, 1141825, 1153701,\n", + " 1152328, 1147070, 1149722, 1147257, 1147971, 1139549, 1158226, 1158235,\n", + " 1147880, 1154526, 1145237, 1145240, 1145235, 1145747, 1145750, 1145751,\n", + " 1148397, 1138861, 1151236, 1151242, 1148214, 1152530, 1150284, 1150445,\n", + " 1148928, 1148940, 1144526, 1146887, 1153977, 1152013, 1154828, 1151480,\n", + " 1152024, 1154263, 1145256, 1145260, 1145262, 1135504, 1139914, 1150119,\n", + " 1141938, 1141949, 1141193, 1148448, 1147653, 1143560, 1143552, 1149412,\n", + " 1146401, 1152073, 1137724, 1147866, 1151412, 1154430, 1154420, 1148188,\n", + " 1136247, 1146676, 1151565, 1148720, 1148726, 1148729, 1144110, 1146549,\n", + " 1143901, 1148204, 1154196, 1153124, 1145104, 1159837, 1152974, 1150935,\n", + " 1152867, 1150352, 1150356, 1169594, 1147446, 1147442, 1151816, 1151913,\n", + " 1154183, 1150707, 1148498, 1141420, 1150634, 1145085, 1148949, 1146969,\n", + " 1146974, 1156402, 1153249, 1146623, 1142987, 1152858, 1152405, 1154052,\n", + " 1153032, 1153038, 1137746, 1137755, 1146307, 1146304, 1140521, 1136410,\n", + " 1149210, 1152819, 1155337, 1154123, 1154638, 1164761, 1151617, 1151623,\n", + " 1150586, 1136798, 1148916, 1152946, 1152169, 1145957, 1145966, 1152903,\n", + " 1156831, 1153311, 1138283, 1138279, 1138281, 1152297, 1156007, 1136028,\n", + " 1158704, 1155779, 1151056, 1151064, 1156422, 1150164, 1148033, 1148040,\n", + " 1155218, 1155223, 1175478, 1160879, 1145656, 1137048, 1158473, 1148628,\n", + " 1158530, 1169169, 1137458, 1149944, 1153868, 1157518, 1135699, 1142041,\n", + " 1135429, 1158860, 1156501, 1156505, 1145191, 1139473, 1143491, 1151260,\n", + " 1150465, 1135730, 1135741, 1165700, 1150824, 1150828, 1135647, 1139525,\n", + " 1158304, 1151273, 1155441, 1153354, 1162120, 1138573, 1154528, 1156919,\n", + " 1142755, 1142758, 1151390, 1151379, 1155360, 1155375, 1155122, 1152527,\n", + " 1155755, 1135398, 1145806, 1145807, 1156463, 1158096, 1158104, 1168230,\n", + " 1155628, 1155630, 1136468, 1136469, 1158824, 1153715, 1158325, 1158335,\n", + " 1154033, 1155646, 1153368, 1160958, 1143263, 1154644, 1160223, 1154243,\n", + " 1154240, 1151890, 1139629, 1143189, 1150371, 1157439, 1145727, 1157933,\n", + " 1151030, 1153786, 1137385, 1159116, 1138260, 1145693, 1145681, 1137317,\n", + " 1140920, 1140913, 1166187, 1164161, 1135601, 1135602, 1155848, 1155852,\n", + " 1158665, 1149145, 1144463, 1159213, 1156693, 1140379, 1157732, 1157735,\n", + " 1159132, 1144843, 1155975, 1156811, 1156812, 1161480, 1149702, 1149700,\n", + " 1166126, 1136899, 1136896, 1158882, 1158886, 1140213, 1161270, 1157304,\n", + " 1159164, 1158438, 1156770, 1151615, 1159435, 1156665, 1152143, 1156490,\n", + " 1153808, 1136640, 1140049, 1157858, 1146123, 1146126, 1138108, 1138110,\n", + " 1155871, 1144581, 1158256, 1150011, 1155528, 1161539, 1135661, 1164276,\n", + " 1164287, 1142669, 1159288, 1167346, 1159052, 1159066, 1142427, 1162044,\n", + " 1153052, 1153042, 1153045, 1159733, 1163072, 1167707, 1167565, 1156235,\n", + " 1161923, 1166256, 1142875, 1138387, 1150035, 1149063, 1145948, 1154300,\n", + " 1153514, 1153519, 1147300, 1158673, 1138161, 1156787, 1139781, 1154590,\n", + " 1148771, 1140735, 1169319, 1158461, 1164048, 1140132, 1170415, 1140643,\n", + " 1148600, 1168081, 1143143, 1158653, 1159025, 1159032, 1152247, 1165585,\n", + " 1168300, 1155588, 1168421, 1167933, 1147393, 1149015, 1146500, 1161235,\n", + " 1155272, 1160660, 1153212, 1141459, 1169485, 1151650, 1157955, 1153663,\n", + " 1150648, 1163260, 1171040, 1150315, 1168748, 1144812, 1140116, 1168860,\n", + " 1135567, 1165721, 1164750, 1142733, 1156303, 1145743, 1165943, 1163935,\n", + " 1145229, 1167757, 1160232, 1155324, 1166462, 1144972, 1160730, 1143025,\n", + " 1166053, 1165746, 1152624, 1152626, 1152630, 1139344, 1139350, 1145900,\n", + " 1145902, 1148426, 1153520, 1153534, 1169550, 1181040, 1170398, 1170989,\n", + " 1158724, 1158722, 1166670, 1167315, 1147333, 1151598, 1145326, 1155172,\n", + " 1150515, 1150518, 1144336, 1157534, 1138376, 1147750, 1142352, 1169164,\n", + " 1157331, 1141045, 1151664, 1169359, 1154364, 1147491, 1138609, 1158146,\n", + " 1149688, 1158611, 1158623, 1158054, 1158062, 1173047, 1153288, 1165113,\n", + " 1165322, 1171475, 1155502, 1172488, 1169935, 1169921, 1148325, 1168906,\n", + " 1169144, 1152150, 1159658, 1151210, 1151696, 1151697, 1157158, 1172111,\n", + " 1157371, 1157373, 1157375, 1147711, 1151852, 1148131, 1148132, 1157585,\n", + " 1157592, 1157593, 1157595, 1135021, 1172961, 1183427, 1178282, 1175223,\n", + " 1140326, 1172606, 1144550, 1153427, 1166532, 1166682, 1166684, 1169448,\n", + " 1150234, 1154148, 1167520, 1149173, 1167658, 1172863, 1166299, 1177260,\n", + " 1171305, 1153802, 1153803, 1178166, 1184699, 1181574, 1184093, 1168778,\n", + " 1179807, 1161255, 1155262, 1157792, 1157803, 1157795, 1151498, 1172550,\n", + " 1171623, 1185052, 1157126, 1158253, 1153890, 1164571, 1188569, 1162403,\n", + " 1145626, 1156446, 1182632, 1161911, 1149744, 1149755, 1180732, 1153605,\n", + " 1157770, 1157761, 1155990, 1158512, 1165067, 1158933, 1158380, 1155890,\n", + " 1155889, 1187699, 1162988, 1162967, 1164411, 1140397, 1188241, 1165484,\n", + " 1163424, 1186278, 1162253, 1164231, 1182337, 1188133, 1163421, 1176976,\n", + " 1158175, 1147182, 1156162, 1170034, 1168930, 1170431, 1186328, 1156528,\n", + " 1139831, 1150265, 1167135, 1156055, 1170000, 1173018, 1146392, 1173058,\n", + " 1193043, 1189125, 1184959, 1188232, 1187044, 1167429, 1170713, 1181936,\n", + " 1189545, 1140997, 1170880, 1178983, 1151774, 1153733, 1152113, 1172339,\n", + " 1182226, 1169707, 1186548, 1189107, 1160339, 1150400, 1194059, 1166763,\n", + " 1172417, 1172127, 1158064, 1145395, 1145392, 1178135, 1185244, 1155959,\n", + " 1169831, 1185356, 1193831, 1157017, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1135061, 1137212, 1141424, 1140282, 1135933, 1135716, 1140785, 1141758,\n", + " 1138335, 1136208, 1136223, 1141443, 1149826, 1145370, 1145373, 1137947,\n", + " 1145992, 1145999, 1143360, 1143372, 1139241, 1150506, 1145281, 1139866,\n", + " 1134943, 1148582, 1149216, 1143812, 1149646, 1147473, 1147483, 1147486,\n", + " 1141879, 1135994, 1142881, 1144632, 1149033, 1134701, 1135947, 1135950,\n", + " 1148350, 1135478, 1146472, 1146465, 1138341, 1141916, 1137220, 1150546,\n", + " 1155014, 1139364, 1147211, 1136683, 1136685, 1150329, 1136268, 1140313,\n", + " 1140535, 1140540, 1154410, 1137254, 1137172, 1137181, 1149460, 1138356,\n", + " 1134735, 1140020, 1162453, 1135367, 1135200, 1135202, 1141033, 1141036,\n", + " 1134794, 1134797, 1138504, 1137329, 1137341, 1137342, 1143064, 1136609,\n", + " 1136619, 1144395, 1137534, 1136662, 1137479, 1156149, 1156152, 1148481,\n", + " 1148489, 1148483, 1134841, 1141703, 1135983, 1135579, 1135583, 1141086,\n", + " 1136111, 1135828, 1140240, 1156347, 1138514, 1158136, 1156908, 1156897,\n", + " 1135522, 1139685, 1138434, 1138436, 1138440, 1138445, 1140074, 1137493,\n", + " 1154790, 1157190, 1136594, 1158390, 1135088, 1138693, 1147111, 1147112,\n", + " 1147113, 1142611, 1142616, 1160819, 1135352, 1138177, 1158984, 1148531,\n", + " 1150953, 1137119, 1139844, 1141533, 1136457, 1139667, 1139673, 1138067,\n", + " 1142243, 1136085, 1134992, 1142793, 1148805, 1135789, 1140199, 1158974,\n", + " 1142906, 1141058, 1141065, 1140034, 1138147, 1138148, 1138151, 1141955,\n", + " 1140554, 1152042, 1152044, 1139063, 1142299, 1137734, 1146222, 1138246,\n", + " 1135540, 1141097, 1141098, 1144134, 1144138, 1139889, 1145357, 1141983,\n", + " 1136392, 1143767, 1154855, 1143225, 1139025, 1140003, 1149979, 1149975,\n", + " 1135860, 1154466, 1139436, 1136627, 1141224, 1141901, 1139386, 1159794,\n", + " 1136917, 1139741, 1137186, 1137188, 1144237, 1140607, 1146453, 1141786,\n", + " 1139495, 1139501, 1144934, 1136862, 1136852, 1147848, 1147852, 1144422,\n", + " 1144428, 1138482, 1142052, 1141821, 1140175, 1158749, 1148864, 1148871,\n", + " 1143574, 1139190, 1137243, 1138706, 1142913, 1143111, 1144596, 1142451,\n", + " 1157417, 1144042, 1141570, 1141573, 1140882, 1135312, 1135325, 1140433,\n", + " 1140444, 1146194, 1134827, 1138539, 1147153, 1142650, 1141365, 1141367,\n", + " 1153069, 1141678, 1144284, 1144279, 1143917, 1139510, 1139127, 1145001,\n", + " 1145200, 1140616, 1147888, 1139171, 1146695, 1135047, 1141560, 1143692,\n", + " 1143680, 1147050, 1147047, 1145873, 1135457, 1139455, 1139000, 1141925,\n", + " 1146909, 1144242, 1140579, 1140696, 1140695, 1139407, 1139405, 1141390,\n", + " 1145974, 1143844, 1143851, 1146008, 1136277, 1136275, 1146024, 1138085,\n", + " 1146129, 1146140, 1146131, 1154323, 1142533, 1141245, 1139990, 1143293,\n", + " 1143883, 1147543, 1148763, 1147282, 1142816, 1136330, 1140349, 1149366,\n", + " 1139417, 1146088, 1149610, 1143040, 1136160, 1136167, 1144923, 1157717,\n", + " 1157720, 1136836, 1165631, 1144768, 1144769, 1138226, 1139051, 1142158,\n", + " 1145429, 1143345, 1144765, 1138597, 1139979, 1135876, 1150756, 1138013,\n", + " 1144375, 1146514, 1143456, 1143457, 1137697, 1143937, 1140829, 1146580,\n", + " 1146590, 1147574, 1155700, 1143806, 1146636, 1147521, 1147523, 1140364,\n", + " 1149569, 1149581, 1137990, 1143080, 1168914, 1147984, 1147999, 1146957,\n", + " 1134899, 1134902, 1139252, 1145457, 1148704, 1143310, 1141825, 1153701,\n", + " 1152328, 1147070, 1149722, 1147257, 1147971, 1139549, 1158226, 1158235,\n", + " 1147880, 1154526, 1145237, 1145240, 1145235, 1145747, 1145750, 1145751,\n", + " 1148397, 1138861, 1151236, 1151242, 1148214, 1152530, 1150284, 1150445,\n", + " 1148928, 1148940, 1144526, 1146887, 1153977, 1152013, 1154828, 1151480,\n", + " 1152024, 1154263, 1145256, 1145260, 1145262, 1135504, 1139914, 1150119,\n", + " 1141938, 1141949, 1141193, 1148448, 1147653, 1143560, 1143552, 1149412,\n", + " 1146401, 1152073, 1137724, 1147866, 1151412, 1154430, 1154420, 1148188,\n", + " 1136247, 1146676, 1151565, 1148720, 1148726, 1148729, 1144110, 1146549,\n", + " 1143901, 1148204, 1154196, 1153124, 1145104, 1159837, 1152974, 1150935,\n", + " 1152867, 1150352, 1150356, 1169594, 1147446, 1147442, 1151816, 1151913,\n", + " 1154183, 1150707, 1148498, 1141420, 1150634, 1145085, 1148949, 1146969,\n", + " 1146974, 1156402, 1153249, 1146623, 1142987, 1152858, 1152405, 1154052,\n", + " 1153032, 1153038, 1137746, 1137755, 1146307, 1146304, 1140521, 1136410,\n", + " 1149210, 1152819, 1155337, 1154123, 1154638, 1164761, 1151617, 1151623,\n", + " 1150586, 1136798, 1148916, 1152946, 1152169, 1145957, 1145966, 1152903,\n", + " 1156831, 1153311, 1138283, 1138279, 1138281, 1152297, 1156007, 1136028,\n", + " 1158704, 1155779, 1151056, 1151064, 1156422, 1150164, 1148033, 1148040,\n", + " 1155218, 1155223, 1175478, 1160879, 1145656, 1137048, 1158473, 1148628,\n", + " 1158530, 1169169, 1137458, 1149944, 1153868, 1157518, 1135699, 1142041,\n", + " 1135429, 1158860, 1156501, 1156505, 1145191, 1139473, 1143491, 1151260,\n", + " 1150465, 1135730, 1135741, 1165700, 1150824, 1150828, 1135647, 1139525,\n", + " 1158304, 1151273, 1155441, 1153354, 1162120, 1138573, 1154528, 1156919,\n", + " 1142755, 1142758, 1151390, 1151379, 1155360, 1155375, 1155122, 1152527,\n", + " 1155755, 1135398, 1145806, 1145807, 1156463, 1158096, 1158104, 1168230,\n", + " 1155628, 1155630, 1136468, 1136469, 1158824, 1153715, 1158325, 1158335,\n", + " 1154033, 1155646, 1153368, 1160958, 1143263, 1154644, 1160223, 1154243,\n", + " 1154240, 1151890, 1139629, 1143189, 1150371, 1157439, 1145727, 1157933,\n", + " 1151030, 1153786, 1137385, 1159116, 1138260, 1145693, 1145681, 1137317,\n", + " 1140920, 1140913, 1166187, 1164161, 1135601, 1135602, 1155848, 1155852,\n", + " 1158665, 1149145, 1144463, 1159213, 1156693, 1140379, 1157732, 1157735,\n", + " 1159132, 1144843, 1155975, 1156811, 1156812, 1161480, 1149702, 1149700,\n", + " 1166126, 1136899, 1136896, 1158882, 1158886, 1140213, 1161270, 1157304,\n", + " 1159164, 1158438, 1156770, 1151615, 1159435, 1156665, 1152143, 1156490,\n", + " 1153808, 1136640, 1140049, 1157858, 1146123, 1146126, 1138108, 1138110,\n", + " 1155871, 1144581, 1158256, 1150011, 1155528, 1161539, 1135661, 1164276,\n", + " 1164287, 1142669, 1159288, 1167346, 1159052, 1159066, 1142427, 1162044,\n", + " 1153052, 1153042, 1153045, 1159733, 1163072, 1167707, 1167565, 1156235,\n", + " 1161923, 1166256, 1142875, 1138387, 1150035, 1149063, 1145948, 1154300,\n", + " 1153514, 1153519, 1147300, 1158673, 1138161, 1156787, 1139781, 1154590,\n", + " 1148771, 1140735, 1169319, 1158461, 1164048, 1140132, 1170415, 1140643,\n", + " 1148600, 1168081, 1143143, 1158653, 1159025, 1159032, 1152247, 1165585,\n", + " 1168300, 1155588, 1168421, 1167933, 1147393, 1149015, 1146500, 1161235,\n", + " 1155272, 1160660, 1153212, 1141459, 1169485, 1151650, 1157955, 1153663,\n", + " 1150648, 1163260, 1171040, 1150315, 1168748, 1144812, 1140116, 1168860,\n", + " 1135567, 1165721, 1164750, 1142733, 1156303, 1145743, 1165943, 1163935,\n", + " 1145229, 1167757, 1160232, 1155324, 1166462, 1144972, 1160730, 1143025,\n", + " 1166053, 1165746, 1152624, 1152626, 1152630, 1139344, 1139350, 1145900,\n", + " 1145902, 1148426, 1153520, 1153534, 1169550, 1181040, 1170398, 1170989,\n", + " 1158724, 1158722, 1166670, 1167315, 1147333, 1151598, 1145326, 1155172,\n", + " 1150515, 1150518, 1144336, 1157534, 1138376, 1147750, 1142352, 1169164,\n", + " 1157331, 1141045, 1151664, 1169359, 1154364, 1147491, 1138609, 1158146,\n", + " 1149688, 1158611, 1158623, 1158054, 1158062, 1173047, 1153288, 1165113,\n", + " 1165322, 1171475, 1155502, 1172488, 1169935, 1169921, 1148325, 1168906,\n", + " 1169144, 1152150, 1159658, 1151210, 1151696, 1151697, 1157158, 1172111,\n", + " 1157371, 1157373, 1157375, 1147711, 1151852, 1148131, 1148132, 1157585,\n", + " 1157592, 1157593, 1157595, 1135021, 1172961, 1183427, 1178282, 1175223,\n", + " 1140326, 1172606, 1144550, 1153427, 1166532, 1166682, 1166684, 1169448,\n", + " 1150234, 1154148, 1167520, 1149173, 1167658, 1172863, 1166299, 1177260,\n", + " 1171305, 1153802, 1153803, 1178166, 1184699, 1181574, 1184093, 1168778,\n", + " 1179807, 1161255, 1155262, 1157792, 1157803, 1157795, 1151498, 1172550,\n", + " 1171623, 1185052, 1157126, 1158253, 1153890, 1164571, 1188569, 1162403,\n", + " 1145626, 1156446, 1182632, 1161911, 1149744, 1149755, 1180732, 1153605,\n", + " 1157770, 1157761, 1155990, 1158512, 1165067, 1158933, 1158380, 1155890,\n", + " 1155889, 1187699, 1162988, 1162967, 1164411, 1140397, 1188241, 1165484,\n", + " 1163424, 1186278, 1162253, 1164231, 1182337, 1188133, 1163421, 1176976,\n", + " 1158175, 1147182, 1156162, 1170034, 1168930, 1170431, 1186328, 1156528,\n", + " 1139831, 1150265, 1167135, 1156055, 1170000, 1173018, 1146392, 1173058,\n", + " 1193043, 1189125, 1184959, 1188232, 1187044, 1167429, 1170713, 1181936,\n", + " 1189545, 1140997, 1170880, 1178983, 1151774, 1153733, 1152113, 1172339,\n", + " 1182226, 1169707, 1186548, 1189107, 1160339, 1150400, 1194059, 1166763,\n", + " 1172417, 1172127, 1158064, 1145395, 1145392, 1178135, 1185244, 1155959,\n", + " 1169831, 1185356, 1193831, 1157017, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197841, 1197174, 1199424, 1199439, 1197719, 1200099, 1198723,\n", + " 1198731, 1199282, 1198459, 1202255, 1198844, 1201577, 1201582, 1201465,\n", + " 1199278, 1201660, 1202804, 1198557, 1194770, 1195488, 1195494, 1196631,\n", + " 1195514, 1195263, 1201992, 1196030, 1198543, 1197697, 1194882, 1199172,\n", + " 1196695, 1194663, 1195325, 1195986, 1196717, 1195148, 1195265, 1195270,\n", + " 1195278, 1197140, 1196247, 1197273, 1194927, 1196109, 1194849, 1194859,\n", + " 1198915, 1197478, 1199998, 1195918, 1199711, 1196283, 1199338, 1200959,\n", + " 1197134, 1199071, 1199695, 1199803, 1197990, 1202457, 1200079, 1200077,\n", + " 1200872, 1200878, 1199038, 1200403, 1200748, 1201904, 1199676, 1200060,\n", + " 1199949, 1197601, 1201116, 1196727, 1202618, 1200892, 1200894, 1198416,\n", + " 1198428, 1199555, 1201547, 1201824, 1200501, 1200503, 1198066, 1198593,\n", + " 1199445, 1201156, 1202632, 1202635, 1200988, 1194808, 1202640, 1202641,\n", + " 1199712, 1201041, 1201358, 1201735, 1200419, 1202129, 1196883, 1199908,\n", + " 1200899, 1195885, 1201291, 1195610, 1203329, 1203336, 1201590, 1200398,\n", + " 1196973, 1200784, 1200793, 1196823, 1195679, 1198932, 1198911, 1195415,\n", + " 1201787, 1195181, 1197811, 1197822, 1197821, 1194898, 1194680, 1197027,\n", + " 1201138, 1194730, 1198147, 1198824, 1197735, 1200437, 1198819, 1201886,\n", + " 1200297, 1197652, 1197335, 1195165], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197841, 1197174, 1199424, 1199439, 1197719, 1200099, 1198723,\n", + " 1198731, 1199282, 1198459, 1202255, 1198844, 1201577, 1201582, 1201465,\n", + " 1199278, 1201660, 1202804, 1198557, 1194770, 1195488, 1195494, 1196631,\n", + " 1195514, 1195263, 1201992, 1196030, 1198543, 1197697, 1194882, 1199172,\n", + " 1196695, 1194663, 1195325, 1195986, 1196717, 1195148, 1195265, 1195270,\n", + " 1195278, 1197140, 1196247, 1197273, 1194927, 1196109, 1194849, 1194859,\n", + " 1198915, 1197478, 1199998, 1195918, 1199711, 1196283, 1199338, 1200959,\n", + " 1197134, 1199071, 1199695, 1199803, 1197990, 1202457, 1200079, 1200077,\n", + " 1200872, 1200878, 1199038, 1200403, 1200748, 1201904, 1199676, 1200060,\n", + " 1199949, 1197601, 1201116, 1196727, 1202618, 1200892, 1200894, 1198416,\n", + " 1198428, 1199555, 1201547, 1201824, 1200501, 1200503, 1198066, 1198593,\n", + " 1199445, 1201156, 1202632, 1202635, 1200988, 1194808, 1202640, 1202641,\n", + " 1199712, 1201041, 1201358, 1201735, 1200419, 1202129, 1196883, 1199908,\n", + " 1200899, 1195885, 1201291, 1195610, 1203329, 1203336, 1201590, 1200398,\n", + " 1196973, 1200784, 1200793, 1196823, 1195679, 1198932, 1198911, 1195415,\n", + " 1201787, 1195181, 1197811, 1197822, 1197821, 1194898, 1194680, 1197027,\n", + " 1201138, 1194730, 1198147, 1198824, 1197735, 1200437, 1198819, 1201886,\n", + " 1200297, 1197652, 1197335, 1195165], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 1.4480e-01, -5.8836e-05, 6.7659e-01, ..., 1.1229e-01,\n", + " -1.7070e-03, -4.6822e-03],\n", + " [ 1.7351e-01, -1.6882e-04, 7.7978e-01, ..., 1.0965e-01,\n", + " -1.6434e-03, -5.4036e-03],\n", + " [ 8.4424e-02, 9.7916e-03, 5.7174e-01, ..., 1.5883e-01,\n", + " -2.2404e-03, -4.0545e-03],\n", + " ...,\n", + " [ 7.8278e-02, 2.9195e-02, 5.7392e-01, ..., 1.3752e-01,\n", + " -1.8175e-03, -3.8692e-03],\n", + " [ 1.0225e-01, 2.4935e-02, 6.1823e-01, ..., 1.2254e-01,\n", + " -1.6177e-03, -4.1119e-03],\n", + " [ 1.8997e-01, -2.9973e-04, 8.1169e-01, ..., 1.1564e-01,\n", + " -1.6651e-03, -5.5074e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 5.1137e-01, -2.2603e-03, 4.5814e-01, ..., -4.3157e-03,\n", + " -8.1947e-03, 1.6082e-01],\n", + " [ 1.2168e-01, 1.8783e-01, 1.3302e+00, ..., -4.5970e-03,\n", + " -8.1966e-03, -6.8628e-03],\n", + " [ 1.2089e+00, -1.7274e-05, 1.8880e+00, ..., 5.3089e-02,\n", + " -1.4082e-02, 5.8643e-01],\n", + " ...,\n", + " [ 1.4962e+00, -8.9090e-03, 1.5414e+00, ..., -3.0768e-03,\n", + " -2.4252e-02, 1.5693e+00],\n", + " [ 3.1555e-01, -3.0091e-03, 7.9620e-01, ..., -4.2895e-03,\n", + " -7.7692e-03, -2.6937e-03],\n", + " [ 1.7689e+00, -1.3228e-02, 1.6695e+00, ..., -5.3566e-05,\n", + " -3.2320e-02, 2.6309e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-1.0369e-03, 8.4368e-02, 1.9586e-01, ..., 1.4044e+00,\n", + " -1.0143e-03, 1.5384e-01],\n", + " [-5.9065e-04, 1.1477e-01, 8.3421e-02, ..., 1.2351e+00,\n", + " 2.9466e-02, 1.7349e-01],\n", + " [-1.1541e-03, 2.2425e-02, 1.8778e-01, ..., 1.4929e+00,\n", + " -7.2928e-04, 1.2120e-01],\n", + " ...,\n", + " [-7.4453e-04, 1.4278e-01, 1.4733e-01, ..., 1.4743e+00,\n", + " -4.5976e-04, 2.1909e-01],\n", + " [-6.5901e-04, 1.8315e-02, 1.5249e-01, ..., 1.2963e-01,\n", + " -2.6328e-04, -8.1703e-04],\n", + " [-5.2211e-04, 2.4580e-02, 1.7812e-01, ..., 1.3410e+00,\n", + " -1.3394e-04, 1.2158e-01]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-1.7442e-03, 3.6973e-01, 1.2297e-01, ..., -3.9926e-03,\n", + " 1.8004e-01, 9.7555e-02],\n", + " [-1.3881e-03, 2.8261e-01, 1.4154e-01, ..., -4.6791e-03,\n", + " 2.0007e-02, 1.6073e-01],\n", + " [-5.6633e-04, 3.1081e-01, 9.0094e-02, ..., -5.0870e-03,\n", + " 1.4885e-01, 8.8209e-02],\n", + " ...,\n", + " [-7.1851e-04, 4.0253e-01, 1.9288e-01, ..., -4.7991e-03,\n", + " 1.6055e-01, 1.3409e-01],\n", + " [-2.0179e-04, 2.5852e-01, 1.6477e-01, ..., -5.9533e-03,\n", + " 8.3406e-02, 1.4301e-01],\n", + " [ 2.8883e-02, 3.8087e-01, 2.8217e-01, ..., -4.0431e-03,\n", + " 7.4456e-02, -4.0703e-04]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 14, 220, 172, 220, 220, 220, 208, 180, 33, 218, 218, 133,\n", + " 294, 294, 335, 353, 299, 549, 750, 483, 856, 657, 840, 642,\n", + " 642, 642, 770, 770, 919, 812, 663, 851, 851, 1057, 661, 1011,\n", + " 1355, 831, 1341, 1341, 1178, 1052, 1219, 1258, 1258, 1347, 1157, 1188,\n", + " 1328, 1365, 1270, 1270, 1154, 1154, 1154, 1418, 1478, 1478, 1462, 1233,\n", + " 1454, 1424, 1424, 1465, 1465, 1545, 1545, 1545, 1545, 1866, 1866, 1866,\n", + " 1627, 1627, 1784, 1751, 1751, 1865, 1819, 2029, 2085, 1836, 2085, 2085,\n", + " 2085, 2085, 1934, 2097, 2267, 2097, 2370, 2438, 2438, 2465, 2749, 2623,\n", + " 2469, 2469, 2469, 2469, 2596, 2596, 2596, 2611, 2602, 2602, 2602, 2596,\n", + " 2596, 2598, 2507, 2507, 2372, 2372, 2686, 2792, 2778, 2778, 2709, 2789,\n", + " 2722, 2975, 2814, 3034, 3085, 3158, 3158, 3218, 3465, 3218, 3509, 3485,\n", + " 3490, 3546, 3546, 3546, 3412, 3613, 3481, 3481, 3824, 3718, 3673, 3607,\n", + " 3632, 3883, 4181, 4027, 4045, 4045, 4174, 4068, 4173, 4265, 4186, 4294,\n", + " 4293, 4351, 4415, 4384, 4426, 4589, 4519, 4618, 4629, 4609, 4765, 4670,\n", + " 4653, 4847, 4692, 4888, 4884, 4884, 4884, 4939, 4962, 4935, 4988, 5115,\n", + " 5136, 5256, 5256, 5337, 5355, 5263, 5263, 5301, 5448, 5479, 5398, 5521,\n", + " 5676, 5718, 5765, 5735, 5862, 5735, 5931, 5852, 5852, 6146, 6066, 6152,\n", + " 6152, 6254, 6254, 6438, 6438, 6347, 6347, 6153, 6153, 6153, 6093, 6093,\n", + " 6076, 6076, 6414, 6133, 6133, 6195, 6318, 6209, 6406, 6406],\n", + " [ 78, 49, 17, 96, 104, 16, 75, 31, 9, 32, 112, 113,\n", + " 38, 6, 90, 138, 78, 58, 113, 118, 70, 75, 92, 6,\n", + " 38, 98, 128, 137, 65, 119, 70, 102, 37, 128, 80, 9,\n", + " 108, 12, 9, 48, 92, 10, 75, 90, 46, 9, 73, 101,\n", + " 122, 11, 2, 99, 86, 34, 26, 100, 94, 106, 20, 117,\n", + " 25, 136, 50, 132, 15, 86, 72, 89, 13, 9, 118, 61,\n", + " 88, 83, 113, 51, 5, 52, 137, 25, 135, 35, 62, 134,\n", + " 24, 66, 134, 83, 129, 122, 107, 56, 64, 25, 98, 25,\n", + " 82, 110, 84, 19, 113, 64, 111, 44, 91, 57, 74, 139,\n", + " 60, 81, 74, 114, 2, 123, 29, 30, 98, 38, 43, 97,\n", + " 100, 36, 92, 28, 9, 38, 6, 12, 0, 71, 133, 69,\n", + " 84, 67, 103, 95, 40, 75, 33, 43, 8, 113, 113, 120,\n", + " 39, 59, 6, 25, 63, 84, 11, 75, 136, 44, 4, 75,\n", + " 35, 93, 44, 9, 39, 43, 26, 97, 127, 47, 10, 130,\n", + " 41, 68, 52, 18, 21, 54, 25, 125, 48, 11, 75, 70,\n", + " 115, 79, 77, 131, 43, 26, 90, 122, 14, 109, 85, 126,\n", + " 23, 87, 76, 7, 25, 1, 55, 116, 124, 3, 105, 75,\n", + " 45, 27, 75, 73, 121, 75, 42, 11, 75, 43, 53, 75,\n", + " 75, 116, 25, 22, 75, 75, 116, 75, 78, 73]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1706, 3925, 2840, ..., 6814, 4691, 1392],\n", + " [ 11, 11, 278, ..., 6777, 6948, 6875]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 99, 2, 48, ..., 9, 113, 6],\n", + " [ 192, 92, 109, ..., 6367, 6333, 6323]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 11, 11, 11, ..., 6735, 6735, 6735],\n", + " [ 340, 912, 388, ..., 574, 777, 9]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 340, 907, 278, ..., 233, 487, 19],\n", + " [ 344, 206, 12, ..., 6920, 6849, 6832]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3127, 6923, 195, ..., 3179, 6354, 213],\n", + " [ 47, 48, 13, ..., 6402, 6315, 6388]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 11, 11, 11, ..., 6875, 6875, 6875],\n", + " [1384, 1676, 1906, ..., 5522, 5923, 5562]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 33, 33, 33, ..., 6297, 6297, 6297],\n", + " [1734, 2341, 6875, ..., 498, 644, 501]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.007168\n", + "sampling 0.007011\n", + "noi time: 0.001517\n", + "get_vertex_data call: 0.034801\n", + "noi group time: 0.00473\n", + "eoi_group_time: 0.018377\n", + "second half: 0.193644\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 1893, 23828, 21459, ..., 1120069, 1119043, 1117254],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 1893, 23828, 21459, ..., 1120069, 1119043, 1117254],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227491, 1230250, 1215980, ..., 1930676, 1936968, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227491, 1230250, 1215980, ..., 1930676, 1936968, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137213, 1141424, 1135926, 1135160, 1137784, 1141758, 1136215, 1142321,\n", + " 1136962, 1141443, 1149831, 1139811, 1146978, 1137936, 1145999, 1138933,\n", + " 1138938, 1145043, 1143372, 1143363, 1139241, 1146640, 1142963, 1139865,\n", + " 1139866, 1148589, 1149216, 1155686, 1147473, 1147483, 1149294, 1153943,\n", + " 1144636, 1149033, 1146656, 1146660, 1135477, 1135481, 1136122, 1152666,\n", + " 1147089, 1147095, 1147204, 1136683, 1150322, 1150329, 1140537, 1138112,\n", + " 1138119, 1137172, 1140159, 1134720, 1134735, 1140020, 1135360, 1135367,\n", + " 1135202, 1140767, 1141036, 1134794, 1143386, 1136178, 1144395, 1137529,\n", + " 1137534, 1157398, 1157397, 1137441, 1135265, 1135583, 1141086, 1135830,\n", + " 1155086, 1156342, 1138514, 1138524, 1137957, 1154132, 1137021, 1135522,\n", + " 1138305, 1138436, 1138440, 1138461, 1138449, 1154787, 1137925, 1158390,\n", + " 1149328, 1138846, 1147112, 1147119, 1142611, 1160518, 1138181, 1148531,\n", + " 1135760, 1143584, 1134992, 1134770, 1142434, 1148805, 1136728, 1158974,\n", + " 1139321, 1141070, 1153543, 1140034, 1138151, 1155654, 1140557, 1141997,\n", + " 1152042, 1152044, 1147317, 1134742, 1134750, 1138246, 1136697, 1141098,\n", + " 1141100, 1144128, 1149001, 1139889, 1141975, 1143775, 1143221, 1143224,\n", + " 1139025, 1140007, 1140470, 1141224, 1141892, 1136917, 1137185, 1144230,\n", + " 1141786, 1139495, 1144929, 1144934, 1141606, 1141609, 1144650, 1134979,\n", + " 1136852, 1160054, 1139798, 1144428, 1149105, 1149111, 1148867, 1158600,\n", + " 1139190, 1137060, 1138708, 1140110, 1142913, 1138424, 1143111, 1144596,\n", + " 1144599, 1136864, 1145298, 1141578, 1141398, 1141396, 1140445, 1144182,\n", + " 1139563, 1158703, 1147153, 1141365, 1153068, 1151106, 1141718, 1149097,\n", + " 1139022, 1139505, 1139508, 1139127, 1140976, 1140983, 1140990, 1146695,\n", + " 1146702, 1147050, 1152976, 1135457, 1139446, 1141925, 1144243, 1144242,\n", + " 1141841, 1138728, 1137571, 1141378, 1144072, 1143851, 1146024, 1138085,\n", + " 1154323, 1139990, 1143293, 1147543, 1147540, 1148763, 1147282, 1142816,\n", + " 1147458, 1139417, 1136160, 1142588, 1157720, 1136836, 1139328, 1142158,\n", + " 1143345, 1144619, 1144088, 1144093, 1150755, 1144380, 1143457, 1144303,\n", + " 1140482, 1142001, 1143937, 1135441, 1135442, 1147532, 1140364, 1143080,\n", + " 1147999, 1146957, 1146950, 1148704, 1141825, 1146742, 1147025, 1145011,\n", + " 1158226, 1150459, 1143921, 1154526, 1145240, 1145747, 1152530, 1152532,\n", + " 1150280, 1150438, 1150437, 1150445, 1149263, 1149791, 1141358, 1150342,\n", + " 1147794, 1151480, 1144884, 1144888, 1145259, 1135512, 1135516, 1134869,\n", + " 1140566, 1148702, 1150127, 1147021, 1147023, 1153152, 1152806, 1144819,\n", + " 1149991, 1153575, 1147653, 1148294, 1148300, 1139099, 1154420, 1154424,\n", + " 1148180, 1139718, 1146686, 1152481, 1152435, 1152441, 1148204, 1154168,\n", + " 1153124, 1153188, 1145106, 1145111, 1152974, 1150932, 1152867, 1144863,\n", + " 1150356, 1146237, 1143121, 1147446, 1147447, 1152581, 1135307, 1151906,\n", + " 1172680, 1148498, 1141420, 1136002, 1147737, 1149385, 1150890, 1146967,\n", + " 1146623, 1164772, 1144465, 1152409, 1152100, 1153038, 1137746, 1152612,\n", + " 1157107, 1155337, 1154123, 1157842, 1154633, 1164760, 1151617, 1150585,\n", + " 1150588, 1145952, 1152903, 1156826, 1138272, 1152300, 1156001, 1136028,\n", + " 1136029, 1158704, 1151187, 1140676, 1152928, 1154733, 1142777, 1156422,\n", + " 1150150, 1153686, 1148040, 1145656, 1149794, 1137048, 1148628, 1148637,\n", + " 1158540, 1137458, 1149946, 1148253, 1135698, 1153085, 1158859, 1158860,\n", + " 1158916, 1137877, 1156505, 1157057, 1155412, 1152841, 1145187, 1143502,\n", + " 1157565, 1150465, 1149047, 1152179, 1156629, 1156638, 1156935, 1147810,\n", + " 1158308, 1155441, 1150132, 1150136, 1138969, 1156919, 1145610, 1154227,\n", + " 1151379, 1158628, 1155374, 1155122, 1157174, 1135396, 1135406, 1146913,\n", + " 1145806, 1156463, 1154763, 1155628, 1148647, 1155646, 1143257, 1161792,\n", + " 1160210, 1163371, 1139619, 1137359, 1151327, 1143189, 1153322, 1147908,\n", + " 1141627, 1143517, 1143516, 1157934, 1145693, 1145690, 1154000, 1134677,\n", + " 1135601, 1135605, 1148149, 1158664, 1158665, 1157684, 1146321, 1149145,\n", + " 1149146, 1156085, 1152209, 1152220, 1159213, 1155439, 1156693, 1159132,\n", + " 1157028, 1157031, 1144843, 1142475, 1155975, 1156812, 1156810, 1161897,\n", + " 1155402, 1149702, 1154600, 1136896, 1158760, 1158447, 1152131, 1153812,\n", + " 1157675, 1166424, 1142178, 1147788, 1158558, 1146113, 1146126, 1158006,\n", + " 1142487, 1142663, 1167359, 1156032, 1162683, 1159061, 1151832, 1153052,\n", + " 1153042, 1153045, 1171551, 1153841, 1156100, 1156107, 1138393, 1150046,\n", + " 1164557, 1155479, 1153519, 1138161, 1156787, 1154590, 1139290, 1139281,\n", + " 1156983, 1157346, 1146063, 1159931, 1184913, 1158868, 1170415, 1140643,\n", + " 1143139, 1143146, 1159641, 1158643, 1156181, 1159025, 1159032, 1152247,\n", + " 1160605, 1155588, 1158405, 1147830, 1164580, 1161240, 1144739, 1144750,\n", + " 1163522, 1163527, 1145139, 1141471, 1151650, 1147426, 1147427, 1184816,\n", + " 1156739, 1184097, 1150646, 1171040, 1144812, 1135567, 1165716, 1180505,\n", + " 1142733, 1167339, 1145743, 1145728, 1163777, 1166924, 1165943, 1169295,\n", + " 1160781, 1166451, 1150531, 1142136, 1152624, 1145900, 1145902, 1153534,\n", + " 1151744, 1143395, 1143404, 1170980, 1171863, 1169743, 1158722, 1154076,\n", + " 1170766, 1162893, 1166653, 1171777, 1154213, 1150518, 1146605, 1144346,\n", + " 1144336, 1147750, 1154670, 1153005, 1169162, 1169359, 1149680, 1158062,\n", + " 1149847, 1159851, 1167085, 1155494, 1152353, 1152362, 1143865, 1149402,\n", + " 1165911, 1173307, 1154019, 1152151, 1169575, 1151696, 1157153, 1157371,\n", + " 1147696, 1147711, 1151850, 1151852, 1148141, 1170488, 1170490, 1179578,\n", + " 1170688, 1155734, 1162106, 1140326, 1143241, 1179351, 1172932, 1174845,\n", + " 1173091, 1159100, 1150234, 1154151, 1154148, 1167511, 1149169, 1186117,\n", + " 1143279, 1169761, 1168481, 1143420, 1171297, 1153141, 1171122, 1182651,\n", + " 1179807, 1171623, 1176933, 1183256, 1155804, 1157081, 1178952, 1191755,\n", + " 1164563, 1178213, 1145626, 1156446, 1178028, 1149753, 1149755, 1153601,\n", + " 1153609, 1155992, 1155990, 1155892, 1155899, 1155897, 1189641, 1169064,\n", + " 1164437, 1163422, 1179130, 1176706, 1170034, 1168943, 1192781, 1156539,\n", + " 1139828, 1139831, 1150265, 1154812, 1149668, 1189687, 1163847, 1156055,\n", + " 1173019, 1181452, 1149544, 1167840, 1181913, 1182165, 1152113, 1177192,\n", + " 1177374, 1172403, 1170128, 1175349, 1150406, 1167089, 1172429, 1182562,\n", + " 1155959, 1155962, 1187504, 1183672, 1179361, 1191250], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137213, 1141424, 1135926, 1135160, 1137784, 1141758, 1136215, 1142321,\n", + " 1136962, 1141443, 1149831, 1139811, 1146978, 1137936, 1145999, 1138933,\n", + " 1138938, 1145043, 1143372, 1143363, 1139241, 1146640, 1142963, 1139865,\n", + " 1139866, 1148589, 1149216, 1155686, 1147473, 1147483, 1149294, 1153943,\n", + " 1144636, 1149033, 1146656, 1146660, 1135477, 1135481, 1136122, 1152666,\n", + " 1147089, 1147095, 1147204, 1136683, 1150322, 1150329, 1140537, 1138112,\n", + " 1138119, 1137172, 1140159, 1134720, 1134735, 1140020, 1135360, 1135367,\n", + " 1135202, 1140767, 1141036, 1134794, 1143386, 1136178, 1144395, 1137529,\n", + " 1137534, 1157398, 1157397, 1137441, 1135265, 1135583, 1141086, 1135830,\n", + " 1155086, 1156342, 1138514, 1138524, 1137957, 1154132, 1137021, 1135522,\n", + " 1138305, 1138436, 1138440, 1138461, 1138449, 1154787, 1137925, 1158390,\n", + " 1149328, 1138846, 1147112, 1147119, 1142611, 1160518, 1138181, 1148531,\n", + " 1135760, 1143584, 1134992, 1134770, 1142434, 1148805, 1136728, 1158974,\n", + " 1139321, 1141070, 1153543, 1140034, 1138151, 1155654, 1140557, 1141997,\n", + " 1152042, 1152044, 1147317, 1134742, 1134750, 1138246, 1136697, 1141098,\n", + " 1141100, 1144128, 1149001, 1139889, 1141975, 1143775, 1143221, 1143224,\n", + " 1139025, 1140007, 1140470, 1141224, 1141892, 1136917, 1137185, 1144230,\n", + " 1141786, 1139495, 1144929, 1144934, 1141606, 1141609, 1144650, 1134979,\n", + " 1136852, 1160054, 1139798, 1144428, 1149105, 1149111, 1148867, 1158600,\n", + " 1139190, 1137060, 1138708, 1140110, 1142913, 1138424, 1143111, 1144596,\n", + " 1144599, 1136864, 1145298, 1141578, 1141398, 1141396, 1140445, 1144182,\n", + " 1139563, 1158703, 1147153, 1141365, 1153068, 1151106, 1141718, 1149097,\n", + " 1139022, 1139505, 1139508, 1139127, 1140976, 1140983, 1140990, 1146695,\n", + " 1146702, 1147050, 1152976, 1135457, 1139446, 1141925, 1144243, 1144242,\n", + " 1141841, 1138728, 1137571, 1141378, 1144072, 1143851, 1146024, 1138085,\n", + " 1154323, 1139990, 1143293, 1147543, 1147540, 1148763, 1147282, 1142816,\n", + " 1147458, 1139417, 1136160, 1142588, 1157720, 1136836, 1139328, 1142158,\n", + " 1143345, 1144619, 1144088, 1144093, 1150755, 1144380, 1143457, 1144303,\n", + " 1140482, 1142001, 1143937, 1135441, 1135442, 1147532, 1140364, 1143080,\n", + " 1147999, 1146957, 1146950, 1148704, 1141825, 1146742, 1147025, 1145011,\n", + " 1158226, 1150459, 1143921, 1154526, 1145240, 1145747, 1152530, 1152532,\n", + " 1150280, 1150438, 1150437, 1150445, 1149263, 1149791, 1141358, 1150342,\n", + " 1147794, 1151480, 1144884, 1144888, 1145259, 1135512, 1135516, 1134869,\n", + " 1140566, 1148702, 1150127, 1147021, 1147023, 1153152, 1152806, 1144819,\n", + " 1149991, 1153575, 1147653, 1148294, 1148300, 1139099, 1154420, 1154424,\n", + " 1148180, 1139718, 1146686, 1152481, 1152435, 1152441, 1148204, 1154168,\n", + " 1153124, 1153188, 1145106, 1145111, 1152974, 1150932, 1152867, 1144863,\n", + " 1150356, 1146237, 1143121, 1147446, 1147447, 1152581, 1135307, 1151906,\n", + " 1172680, 1148498, 1141420, 1136002, 1147737, 1149385, 1150890, 1146967,\n", + " 1146623, 1164772, 1144465, 1152409, 1152100, 1153038, 1137746, 1152612,\n", + " 1157107, 1155337, 1154123, 1157842, 1154633, 1164760, 1151617, 1150585,\n", + " 1150588, 1145952, 1152903, 1156826, 1138272, 1152300, 1156001, 1136028,\n", + " 1136029, 1158704, 1151187, 1140676, 1152928, 1154733, 1142777, 1156422,\n", + " 1150150, 1153686, 1148040, 1145656, 1149794, 1137048, 1148628, 1148637,\n", + " 1158540, 1137458, 1149946, 1148253, 1135698, 1153085, 1158859, 1158860,\n", + " 1158916, 1137877, 1156505, 1157057, 1155412, 1152841, 1145187, 1143502,\n", + " 1157565, 1150465, 1149047, 1152179, 1156629, 1156638, 1156935, 1147810,\n", + " 1158308, 1155441, 1150132, 1150136, 1138969, 1156919, 1145610, 1154227,\n", + " 1151379, 1158628, 1155374, 1155122, 1157174, 1135396, 1135406, 1146913,\n", + " 1145806, 1156463, 1154763, 1155628, 1148647, 1155646, 1143257, 1161792,\n", + " 1160210, 1163371, 1139619, 1137359, 1151327, 1143189, 1153322, 1147908,\n", + " 1141627, 1143517, 1143516, 1157934, 1145693, 1145690, 1154000, 1134677,\n", + " 1135601, 1135605, 1148149, 1158664, 1158665, 1157684, 1146321, 1149145,\n", + " 1149146, 1156085, 1152209, 1152220, 1159213, 1155439, 1156693, 1159132,\n", + " 1157028, 1157031, 1144843, 1142475, 1155975, 1156812, 1156810, 1161897,\n", + " 1155402, 1149702, 1154600, 1136896, 1158760, 1158447, 1152131, 1153812,\n", + " 1157675, 1166424, 1142178, 1147788, 1158558, 1146113, 1146126, 1158006,\n", + " 1142487, 1142663, 1167359, 1156032, 1162683, 1159061, 1151832, 1153052,\n", + " 1153042, 1153045, 1171551, 1153841, 1156100, 1156107, 1138393, 1150046,\n", + " 1164557, 1155479, 1153519, 1138161, 1156787, 1154590, 1139290, 1139281,\n", + " 1156983, 1157346, 1146063, 1159931, 1184913, 1158868, 1170415, 1140643,\n", + " 1143139, 1143146, 1159641, 1158643, 1156181, 1159025, 1159032, 1152247,\n", + " 1160605, 1155588, 1158405, 1147830, 1164580, 1161240, 1144739, 1144750,\n", + " 1163522, 1163527, 1145139, 1141471, 1151650, 1147426, 1147427, 1184816,\n", + " 1156739, 1184097, 1150646, 1171040, 1144812, 1135567, 1165716, 1180505,\n", + " 1142733, 1167339, 1145743, 1145728, 1163777, 1166924, 1165943, 1169295,\n", + " 1160781, 1166451, 1150531, 1142136, 1152624, 1145900, 1145902, 1153534,\n", + " 1151744, 1143395, 1143404, 1170980, 1171863, 1169743, 1158722, 1154076,\n", + " 1170766, 1162893, 1166653, 1171777, 1154213, 1150518, 1146605, 1144346,\n", + " 1144336, 1147750, 1154670, 1153005, 1169162, 1169359, 1149680, 1158062,\n", + " 1149847, 1159851, 1167085, 1155494, 1152353, 1152362, 1143865, 1149402,\n", + " 1165911, 1173307, 1154019, 1152151, 1169575, 1151696, 1157153, 1157371,\n", + " 1147696, 1147711, 1151850, 1151852, 1148141, 1170488, 1170490, 1179578,\n", + " 1170688, 1155734, 1162106, 1140326, 1143241, 1179351, 1172932, 1174845,\n", + " 1173091, 1159100, 1150234, 1154151, 1154148, 1167511, 1149169, 1186117,\n", + " 1143279, 1169761, 1168481, 1143420, 1171297, 1153141, 1171122, 1182651,\n", + " 1179807, 1171623, 1176933, 1183256, 1155804, 1157081, 1178952, 1191755,\n", + " 1164563, 1178213, 1145626, 1156446, 1178028, 1149753, 1149755, 1153601,\n", + " 1153609, 1155992, 1155990, 1155892, 1155899, 1155897, 1189641, 1169064,\n", + " 1164437, 1163422, 1179130, 1176706, 1170034, 1168943, 1192781, 1156539,\n", + " 1139828, 1139831, 1150265, 1154812, 1149668, 1189687, 1163847, 1156055,\n", + " 1173019, 1181452, 1149544, 1167840, 1181913, 1182165, 1152113, 1177192,\n", + " 1177374, 1172403, 1170128, 1175349, 1150406, 1167089, 1172429, 1182562,\n", + " 1155959, 1155962, 1187504, 1183672, 1179361, 1191250], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195202, 1196013, 1197841, 1195697, 1199736, 1197719, 1198729, 1198730,\n", + " 1199282, 1198449, 1202255, 1198844, 1201577, 1201582, 1199146, 1202119,\n", + " 1194626, 1200643, 1201016, 1198694, 1196956, 1202803, 1202812, 1198557,\n", + " 1196573, 1194770, 1196631, 1194649, 1194655, 1195514, 1195259, 1199135,\n", + " 1196030, 1196031, 1198542, 1199519, 1194882, 1195888, 1195895, 1199171,\n", + " 1197856, 1196359, 1197831, 1194664, 1195313, 1195325, 1197792, 1197793,\n", + " 1196230, 1198163, 1198167, 1198161, 1195265, 1197141, 1197140, 1195245,\n", + " 1196109, 1198219, 1195847, 1195541, 1197474, 1197478, 1195744, 1199697,\n", + " 1196283, 1198282, 1199329, 1199333, 1199059, 1197291, 1194928, 1197577,\n", + " 1197674, 1198406, 1198410, 1200747, 1199231, 1201916, 1194795, 1200060,\n", + " 1199949, 1201511, 1197601, 1196727, 1200894, 1198416, 1199557, 1201824,\n", + " 1201827, 1200563, 1200169, 1200503, 1198066, 1201079, 1201155, 1201156,\n", + " 1202630, 1200991, 1201056, 1194805, 1199712, 1203347, 1200526, 1200553,\n", + " 1197097, 1201726, 1197040, 1200692, 1199908, 1196779, 1201442, 1202239,\n", + " 1200831, 1200899, 1202175, 1201291, 1202477, 1198478, 1195601, 1199925,\n", + " 1196963, 1200784, 1200785, 1195438, 1195676, 1198055, 1198929, 1200684,\n", + " 1195181, 1194898, 1200585, 1199659, 1201138, 1198830, 1198824, 1197735,\n", + " 1198819, 1195066, 1201886, 1200301, 1196428], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195202, 1196013, 1197841, 1195697, 1199736, 1197719, 1198729, 1198730,\n", + " 1199282, 1198449, 1202255, 1198844, 1201577, 1201582, 1199146, 1202119,\n", + " 1194626, 1200643, 1201016, 1198694, 1196956, 1202803, 1202812, 1198557,\n", + " 1196573, 1194770, 1196631, 1194649, 1194655, 1195514, 1195259, 1199135,\n", + " 1196030, 1196031, 1198542, 1199519, 1194882, 1195888, 1195895, 1199171,\n", + " 1197856, 1196359, 1197831, 1194664, 1195313, 1195325, 1197792, 1197793,\n", + " 1196230, 1198163, 1198167, 1198161, 1195265, 1197141, 1197140, 1195245,\n", + " 1196109, 1198219, 1195847, 1195541, 1197474, 1197478, 1195744, 1199697,\n", + " 1196283, 1198282, 1199329, 1199333, 1199059, 1197291, 1194928, 1197577,\n", + " 1197674, 1198406, 1198410, 1200747, 1199231, 1201916, 1194795, 1200060,\n", + " 1199949, 1201511, 1197601, 1196727, 1200894, 1198416, 1199557, 1201824,\n", + " 1201827, 1200563, 1200169, 1200503, 1198066, 1201079, 1201155, 1201156,\n", + " 1202630, 1200991, 1201056, 1194805, 1199712, 1203347, 1200526, 1200553,\n", + " 1197097, 1201726, 1197040, 1200692, 1199908, 1196779, 1201442, 1202239,\n", + " 1200831, 1200899, 1202175, 1201291, 1202477, 1198478, 1195601, 1199925,\n", + " 1196963, 1200784, 1200785, 1195438, 1195676, 1198055, 1198929, 1200684,\n", + " 1195181, 1194898, 1200585, 1199659, 1201138, 1198830, 1198824, 1197735,\n", + " 1198819, 1195066, 1201886, 1200301, 1196428], device='cuda:0',\n", + " dtype=torch.int32))\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006935\n", + "sampling 0.006426\n", + "noi time: 0.001936\n", + "get_vertex_data call: 0.070939\n", + "noi group time: 0.002056\n", + "eoi_group_time: 0.016206\n", + "second half: 0.258737\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 24187, 21471, ..., 1110065, 1119052, 1133551],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 24187, 21471, ..., 1110065, 1119052, 1133551],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1221610, 1221043, 1203800, ..., 1937986, 1930684, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1221610, 1221043, 1203800, ..., 1937986, 1930684, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1137435, 1141424, 1141435, 1136349, 1135920, 1135926, 1135152,\n", + " 1135726, 1137791, 1140785, 1140793, 1141751, 1141758, 1134955, 1136208,\n", + " 1142802, 1142807, 1136150, 1141443, 1146804, 1143615, 1139808, 1139817,\n", + " 1139821, 1139811, 1137947, 1138936, 1143372, 1146640, 1146647, 1139615,\n", + " 1140783, 1150503, 1150506, 1139865, 1134937, 1134943, 1136959, 1143820,\n", + " 1149633, 1147473, 1147483, 1141882, 1135990, 1135999, 1149283, 1144636,\n", + " 1153008, 1134701, 1135951, 1148350, 1146661, 1136112, 1152666, 1153220,\n", + " 1147094, 1147102, 1141912, 1155019, 1139364, 1139374, 1139371, 1147202,\n", + " 1147211, 1134661, 1134662, 1140540, 1140542, 1154414, 1137254, 1137261,\n", + " 1137180, 1138366, 1135913, 1140020, 1140028, 1140947, 1140953, 1135367,\n", + " 1135202, 1134968, 1136778, 1134794, 1134797, 1138504, 1138508, 1143068,\n", + " 1143069, 1137682, 1136618, 1135328, 1144395, 1137529, 1137534, 1157397,\n", + " 1152376, 1136578, 1137441, 1136195, 1135265, 1148481, 1139162, 1139161,\n", + " 1135582, 1142602, 1142607, 1141084, 1141086, 1136105, 1138514, 1138516,\n", + " 1153094, 1153099, 1137953, 1137959, 1138590, 1145127, 1137019, 1135527,\n", + " 1139684, 1138319, 1137287, 1139877, 1138436, 1138440, 1138445, 1138451,\n", + " 1138461, 1137498, 1136594, 1135123, 1158386, 1149328, 1138836, 1138846,\n", + " 1156606, 1147116, 1147118, 1142611, 1135034, 1135359, 1158987, 1145843,\n", + " 1148536, 1141523, 1141533, 1139674, 1139664, 1138067, 1138070, 1142255,\n", + " 1134992, 1152651, 1136723, 1158974, 1139318, 1153544, 1153547, 1152696,\n", + " 1139933, 1138150, 1141963, 1134888, 1140557, 1141985, 1152042, 1139069,\n", + " 1142302, 1140660, 1137728, 1135540, 1135541, 1141088, 1141100, 1149001,\n", + " 1143767, 1154860, 1154863, 1137299, 1139025, 1149979, 1146832, 1141681,\n", + " 1135860, 1136418, 1136625, 1140469, 1139386, 1136917, 1143673, 1143676,\n", + " 1137188, 1144237, 1139495, 1136753, 1168566, 1136862, 1147851, 1137086,\n", + " 1144428, 1138482, 1142056, 1142053, 1153668, 1143202, 1140110, 1142913,\n", + " 1143107, 1143113, 1144596, 1136866, 1136867, 1136864, 1144182, 1134827,\n", + " 1137841, 1141365, 1141367, 1141720, 1149090, 1138292, 1138293, 1144279,\n", + " 1144287, 1153556, 1139508, 1139510, 1145200, 1140977, 1141560, 1141565,\n", + " 1147050, 1145885, 1145873, 1143543, 1152976, 1152988, 1142556, 1139000,\n", + " 1141925, 1144245, 1140585, 1137149, 1150243, 1139405, 1143643, 1141382,\n", + " 1143851, 1146140, 1154332, 1141585, 1142533, 1139990, 1143293, 1143283,\n", + " 1143294, 1143290, 1151124, 1150424, 1147549, 1147282, 1142816, 1149161,\n", + " 1149362, 1149366, 1149372, 1148010, 1146091, 1146087, 1136160, 1157720,\n", + " 1136836, 1136843, 1139297, 1139329, 1139341, 1150184, 1144778, 1142159,\n", + " 1143345, 1144765, 1144619, 1135876, 1150756, 1146513, 1146523, 1143957,\n", + " 1143960, 1143959, 1138024, 1138018, 1143456, 1143457, 1143949, 1135454,\n", + " 1155700, 1143799, 1143807, 1146626, 1147521, 1140364, 1137990, 1166410,\n", + " 1148962, 1144219, 1146949, 1144008, 1139255, 1147121, 1148704, 1141825,\n", + " 1141827, 1153701, 1143434, 1147025, 1147971, 1158226, 1158231, 1143921,\n", + " 1143928, 1147873, 1147874, 1145240, 1145750, 1142374, 1135598, 1135586,\n", + " 1148391, 1138857, 1151242, 1152530, 1150280, 1150274, 1151182, 1150445,\n", + " 1148821, 1154437, 1151860, 1149791, 1144514, 1144526, 1141349, 1138044,\n", + " 1138045, 1138034, 1152013, 1144203, 1151987, 1144881, 1151041, 1140561,\n", + " 1148693, 1148701, 1147019, 1147009, 1158958, 1141942, 1141949, 1144821,\n", + " 1151792, 1167217, 1153574, 1147653, 1143560, 1149412, 1146412, 1151724,\n", + " 1152073, 1135087, 1147866, 1151412, 1154420, 1136251, 1136247, 1136252,\n", + " 1146686, 1138404, 1152436, 1148720, 1144107, 1147616, 1146549, 1149810,\n", + " 1150061, 1143895, 1148204, 1156212, 1154203, 1153125, 1153192, 1153197,\n", + " 1145119, 1152963, 1152919, 1148062, 1143093, 1150352, 1150356, 1150358,\n", + " 1150367, 1147446, 1152581, 1150715, 1145640, 1148505, 1141408, 1136002,\n", + " 1150637, 1151356, 1147602, 1147737, 1153454, 1148949, 1156413, 1147383,\n", + " 1149359, 1153249, 1146623, 1144472, 1135688, 1152849, 1152407, 1152409,\n", + " 1146280, 1156325, 1153030, 1153034, 1153037, 1153038, 1150085, 1150093,\n", + " 1145542, 1137746, 1146304, 1152622, 1140517, 1152057, 1136401, 1136410,\n", + " 1149203, 1151953, 1155337, 1154119, 1157833, 1152673, 1152680, 1154625,\n", + " 1151573, 1151617, 1150586, 1136132, 1136134, 1148916, 1148921, 1152944,\n", + " 1153387, 1152903, 1151296, 1143998, 1152341, 1158429, 1138279, 1157139,\n", + " 1152301, 1136028, 1158704, 1156619, 1156622, 1151064, 1143479, 1156422,\n", + " 1163489, 1150099, 1160551, 1167940, 1153690, 1148033, 1148040, 1149300,\n", + " 1155222, 1149792, 1149804, 1137048, 1148628, 1158530, 1158540, 1148373,\n", + " 1137458, 1166145, 1143444, 1150966, 1157547, 1148884, 1158918, 1152392,\n", + " 1152397, 1157064, 1155414, 1155418, 1152838, 1152833, 1137814, 1145388,\n", + " 1145387, 1156638, 1151788, 1150819, 1150830, 1135634, 1137625, 1158311,\n", + " 1151271, 1155441, 1153359, 1162120, 1140868, 1154530, 1138963, 1156915,\n", + " 1145610, 1150485, 1142755, 1142764, 1156207, 1156269, 1157637, 1158635,\n", + " 1156649, 1155122, 1160393, 1152527, 1157172, 1155755, 1146913, 1145794,\n", + " 1155626, 1155628, 1155629, 1155630, 1158824, 1158331, 1157315, 1154036,\n", + " 1156998, 1148836, 1148834, 1148835, 1153368, 1154250, 1154240, 1151892,\n", + " 1151321, 1143189, 1141623, 1143517, 1157920, 1157654, 1157663, 1180909,\n", + " 1158126, 1158584, 1153781, 1158205, 1137381, 1137385, 1159116, 1135601,\n", + " 1135611, 1148148, 1148149, 1163894, 1150671, 1138215, 1149151, 1140628,\n", + " 1155717, 1152215, 1152509, 1156692, 1140380, 1140381, 1155884, 1157732,\n", + " 1155975, 1142073, 1135199, 1158846, 1149696, 1149700, 1154604, 1160163,\n", + " 1136899, 1158886, 1140208, 1161692, 1159164, 1158815, 1156774, 1136494,\n", + " 1156665, 1153112, 1153808, 1136646, 1136642, 1134762, 1134757, 1140049,\n", + " 1140055, 1157858, 1158558, 1156513, 1146123, 1154339, 1144584, 1150011,\n", + " 1155521, 1155529, 1161539, 1142492, 1135662, 1142666, 1157759, 1157751,\n", + " 1159054, 1172286, 1159146, 1163267, 1142424, 1158303, 1155185, 1160572,\n", + " 1153052, 1156235, 1166271, 1153842, 1156098, 1156104, 1156111, 1150035,\n", + " 1149063, 1149070, 1145948, 1153514, 1153519, 1147300, 1138162, 1164006,\n", + " 1160764, 1139281, 1146063, 1160189, 1140643, 1141867, 1148603, 1172725,\n", + " 1168165, 1155816, 1156355, 1158653, 1159025, 1159032, 1166284, 1169104,\n", + " 1152247, 1143729, 1158905, 1155588, 1162552, 1151227, 1153924, 1153933,\n", + " 1153934, 1168426, 1148560, 1144979, 1167933, 1146500, 1146510, 1152776,\n", + " 1147433, 1149899, 1156739, 1166591, 1150649, 1144812, 1184422, 1162085,\n", + " 1156303, 1162613, 1145736, 1163783, 1145567, 1145228, 1167757, 1154695,\n", + " 1144966, 1162513, 1184040, 1148166, 1191935, 1143036, 1143025, 1165202,\n", + " 1152626, 1148124, 1193477, 1147723, 1145900, 1145902, 1153520, 1143397,\n", + " 1158724, 1158734, 1154076, 1147338, 1144699, 1177935, 1150781, 1150783,\n", + " 1149130, 1154912, 1171979, 1144681, 1166653, 1145326, 1150515, 1150518,\n", + " 1156112, 1156119, 1144342, 1144347, 1144336, 1147746, 1147751, 1154656,\n", + " 1154670, 1135854, 1152997, 1157331, 1169359, 1149452, 1149688, 1158623,\n", + " 1158062, 1173047, 1149845, 1157383, 1159849, 1159851, 1172644, 1178729,\n", + " 1169948, 1160530, 1152353, 1148667, 1177984, 1169264, 1171705, 1152150,\n", + " 1167857, 1151696, 1157153, 1167232, 1168122, 1168126, 1147711, 1151850,\n", + " 1149247, 1149235, 1141549, 1140326, 1143238, 1144548, 1174845, 1159100,\n", + " 1166682, 1166684, 1170874, 1161591, 1158176, 1149179, 1149173, 1172538,\n", + " 1159751, 1167658, 1156559, 1171311, 1181246, 1159404, 1153137, 1163099,\n", + " 1144910, 1168774, 1166554, 1161255, 1154718, 1157792, 1157795, 1171623,\n", + " 1157997, 1180036, 1158253, 1153898, 1154497, 1162403, 1162407, 1145626,\n", + " 1156443, 1156446, 1180383, 1157483, 1161911, 1149755, 1153609, 1157772,\n", + " 1158513, 1158934, 1158940, 1155890, 1155899, 1155895, 1180852, 1140399,\n", + " 1189885, 1168883, 1165078, 1154953, 1161819, 1146161, 1147172, 1172608,\n", + " 1156162, 1189070, 1183860, 1170041, 1185377, 1183021, 1170822, 1139831,\n", + " 1164914, 1151286, 1151295, 1156049, 1156055, 1182836, 1146394, 1146395,\n", + " 1173058, 1186648, 1194031, 1149547, 1149536, 1192166, 1156838, 1148787,\n", + " 1169964, 1182551, 1190250, 1185978, 1171059, 1179852, 1188825, 1151774,\n", + " 1152115, 1169703, 1166841, 1186573, 1163146, 1177845, 1150406, 1150400,\n", + " 1161186, 1158064, 1145395, 1155959, 1155952, 1181656, 1187846, 1178456,\n", + " 1155553, 1192282, 1169831, 1189036, 1190342, 1188736, 1157012],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1137435, 1141424, 1141435, 1136349, 1135920, 1135926, 1135152,\n", + " 1135726, 1137791, 1140785, 1140793, 1141751, 1141758, 1134955, 1136208,\n", + " 1142802, 1142807, 1136150, 1141443, 1146804, 1143615, 1139808, 1139817,\n", + " 1139821, 1139811, 1137947, 1138936, 1143372, 1146640, 1146647, 1139615,\n", + " 1140783, 1150503, 1150506, 1139865, 1134937, 1134943, 1136959, 1143820,\n", + " 1149633, 1147473, 1147483, 1141882, 1135990, 1135999, 1149283, 1144636,\n", + " 1153008, 1134701, 1135951, 1148350, 1146661, 1136112, 1152666, 1153220,\n", + " 1147094, 1147102, 1141912, 1155019, 1139364, 1139374, 1139371, 1147202,\n", + " 1147211, 1134661, 1134662, 1140540, 1140542, 1154414, 1137254, 1137261,\n", + " 1137180, 1138366, 1135913, 1140020, 1140028, 1140947, 1140953, 1135367,\n", + " 1135202, 1134968, 1136778, 1134794, 1134797, 1138504, 1138508, 1143068,\n", + " 1143069, 1137682, 1136618, 1135328, 1144395, 1137529, 1137534, 1157397,\n", + " 1152376, 1136578, 1137441, 1136195, 1135265, 1148481, 1139162, 1139161,\n", + " 1135582, 1142602, 1142607, 1141084, 1141086, 1136105, 1138514, 1138516,\n", + " 1153094, 1153099, 1137953, 1137959, 1138590, 1145127, 1137019, 1135527,\n", + " 1139684, 1138319, 1137287, 1139877, 1138436, 1138440, 1138445, 1138451,\n", + " 1138461, 1137498, 1136594, 1135123, 1158386, 1149328, 1138836, 1138846,\n", + " 1156606, 1147116, 1147118, 1142611, 1135034, 1135359, 1158987, 1145843,\n", + " 1148536, 1141523, 1141533, 1139674, 1139664, 1138067, 1138070, 1142255,\n", + " 1134992, 1152651, 1136723, 1158974, 1139318, 1153544, 1153547, 1152696,\n", + " 1139933, 1138150, 1141963, 1134888, 1140557, 1141985, 1152042, 1139069,\n", + " 1142302, 1140660, 1137728, 1135540, 1135541, 1141088, 1141100, 1149001,\n", + " 1143767, 1154860, 1154863, 1137299, 1139025, 1149979, 1146832, 1141681,\n", + " 1135860, 1136418, 1136625, 1140469, 1139386, 1136917, 1143673, 1143676,\n", + " 1137188, 1144237, 1139495, 1136753, 1168566, 1136862, 1147851, 1137086,\n", + " 1144428, 1138482, 1142056, 1142053, 1153668, 1143202, 1140110, 1142913,\n", + " 1143107, 1143113, 1144596, 1136866, 1136867, 1136864, 1144182, 1134827,\n", + " 1137841, 1141365, 1141367, 1141720, 1149090, 1138292, 1138293, 1144279,\n", + " 1144287, 1153556, 1139508, 1139510, 1145200, 1140977, 1141560, 1141565,\n", + " 1147050, 1145885, 1145873, 1143543, 1152976, 1152988, 1142556, 1139000,\n", + " 1141925, 1144245, 1140585, 1137149, 1150243, 1139405, 1143643, 1141382,\n", + " 1143851, 1146140, 1154332, 1141585, 1142533, 1139990, 1143293, 1143283,\n", + " 1143294, 1143290, 1151124, 1150424, 1147549, 1147282, 1142816, 1149161,\n", + " 1149362, 1149366, 1149372, 1148010, 1146091, 1146087, 1136160, 1157720,\n", + " 1136836, 1136843, 1139297, 1139329, 1139341, 1150184, 1144778, 1142159,\n", + " 1143345, 1144765, 1144619, 1135876, 1150756, 1146513, 1146523, 1143957,\n", + " 1143960, 1143959, 1138024, 1138018, 1143456, 1143457, 1143949, 1135454,\n", + " 1155700, 1143799, 1143807, 1146626, 1147521, 1140364, 1137990, 1166410,\n", + " 1148962, 1144219, 1146949, 1144008, 1139255, 1147121, 1148704, 1141825,\n", + " 1141827, 1153701, 1143434, 1147025, 1147971, 1158226, 1158231, 1143921,\n", + " 1143928, 1147873, 1147874, 1145240, 1145750, 1142374, 1135598, 1135586,\n", + " 1148391, 1138857, 1151242, 1152530, 1150280, 1150274, 1151182, 1150445,\n", + " 1148821, 1154437, 1151860, 1149791, 1144514, 1144526, 1141349, 1138044,\n", + " 1138045, 1138034, 1152013, 1144203, 1151987, 1144881, 1151041, 1140561,\n", + " 1148693, 1148701, 1147019, 1147009, 1158958, 1141942, 1141949, 1144821,\n", + " 1151792, 1167217, 1153574, 1147653, 1143560, 1149412, 1146412, 1151724,\n", + " 1152073, 1135087, 1147866, 1151412, 1154420, 1136251, 1136247, 1136252,\n", + " 1146686, 1138404, 1152436, 1148720, 1144107, 1147616, 1146549, 1149810,\n", + " 1150061, 1143895, 1148204, 1156212, 1154203, 1153125, 1153192, 1153197,\n", + " 1145119, 1152963, 1152919, 1148062, 1143093, 1150352, 1150356, 1150358,\n", + " 1150367, 1147446, 1152581, 1150715, 1145640, 1148505, 1141408, 1136002,\n", + " 1150637, 1151356, 1147602, 1147737, 1153454, 1148949, 1156413, 1147383,\n", + " 1149359, 1153249, 1146623, 1144472, 1135688, 1152849, 1152407, 1152409,\n", + " 1146280, 1156325, 1153030, 1153034, 1153037, 1153038, 1150085, 1150093,\n", + " 1145542, 1137746, 1146304, 1152622, 1140517, 1152057, 1136401, 1136410,\n", + " 1149203, 1151953, 1155337, 1154119, 1157833, 1152673, 1152680, 1154625,\n", + " 1151573, 1151617, 1150586, 1136132, 1136134, 1148916, 1148921, 1152944,\n", + " 1153387, 1152903, 1151296, 1143998, 1152341, 1158429, 1138279, 1157139,\n", + " 1152301, 1136028, 1158704, 1156619, 1156622, 1151064, 1143479, 1156422,\n", + " 1163489, 1150099, 1160551, 1167940, 1153690, 1148033, 1148040, 1149300,\n", + " 1155222, 1149792, 1149804, 1137048, 1148628, 1158530, 1158540, 1148373,\n", + " 1137458, 1166145, 1143444, 1150966, 1157547, 1148884, 1158918, 1152392,\n", + " 1152397, 1157064, 1155414, 1155418, 1152838, 1152833, 1137814, 1145388,\n", + " 1145387, 1156638, 1151788, 1150819, 1150830, 1135634, 1137625, 1158311,\n", + " 1151271, 1155441, 1153359, 1162120, 1140868, 1154530, 1138963, 1156915,\n", + " 1145610, 1150485, 1142755, 1142764, 1156207, 1156269, 1157637, 1158635,\n", + " 1156649, 1155122, 1160393, 1152527, 1157172, 1155755, 1146913, 1145794,\n", + " 1155626, 1155628, 1155629, 1155630, 1158824, 1158331, 1157315, 1154036,\n", + " 1156998, 1148836, 1148834, 1148835, 1153368, 1154250, 1154240, 1151892,\n", + " 1151321, 1143189, 1141623, 1143517, 1157920, 1157654, 1157663, 1180909,\n", + " 1158126, 1158584, 1153781, 1158205, 1137381, 1137385, 1159116, 1135601,\n", + " 1135611, 1148148, 1148149, 1163894, 1150671, 1138215, 1149151, 1140628,\n", + " 1155717, 1152215, 1152509, 1156692, 1140380, 1140381, 1155884, 1157732,\n", + " 1155975, 1142073, 1135199, 1158846, 1149696, 1149700, 1154604, 1160163,\n", + " 1136899, 1158886, 1140208, 1161692, 1159164, 1158815, 1156774, 1136494,\n", + " 1156665, 1153112, 1153808, 1136646, 1136642, 1134762, 1134757, 1140049,\n", + " 1140055, 1157858, 1158558, 1156513, 1146123, 1154339, 1144584, 1150011,\n", + " 1155521, 1155529, 1161539, 1142492, 1135662, 1142666, 1157759, 1157751,\n", + " 1159054, 1172286, 1159146, 1163267, 1142424, 1158303, 1155185, 1160572,\n", + " 1153052, 1156235, 1166271, 1153842, 1156098, 1156104, 1156111, 1150035,\n", + " 1149063, 1149070, 1145948, 1153514, 1153519, 1147300, 1138162, 1164006,\n", + " 1160764, 1139281, 1146063, 1160189, 1140643, 1141867, 1148603, 1172725,\n", + " 1168165, 1155816, 1156355, 1158653, 1159025, 1159032, 1166284, 1169104,\n", + " 1152247, 1143729, 1158905, 1155588, 1162552, 1151227, 1153924, 1153933,\n", + " 1153934, 1168426, 1148560, 1144979, 1167933, 1146500, 1146510, 1152776,\n", + " 1147433, 1149899, 1156739, 1166591, 1150649, 1144812, 1184422, 1162085,\n", + " 1156303, 1162613, 1145736, 1163783, 1145567, 1145228, 1167757, 1154695,\n", + " 1144966, 1162513, 1184040, 1148166, 1191935, 1143036, 1143025, 1165202,\n", + " 1152626, 1148124, 1193477, 1147723, 1145900, 1145902, 1153520, 1143397,\n", + " 1158724, 1158734, 1154076, 1147338, 1144699, 1177935, 1150781, 1150783,\n", + " 1149130, 1154912, 1171979, 1144681, 1166653, 1145326, 1150515, 1150518,\n", + " 1156112, 1156119, 1144342, 1144347, 1144336, 1147746, 1147751, 1154656,\n", + " 1154670, 1135854, 1152997, 1157331, 1169359, 1149452, 1149688, 1158623,\n", + " 1158062, 1173047, 1149845, 1157383, 1159849, 1159851, 1172644, 1178729,\n", + " 1169948, 1160530, 1152353, 1148667, 1177984, 1169264, 1171705, 1152150,\n", + " 1167857, 1151696, 1157153, 1167232, 1168122, 1168126, 1147711, 1151850,\n", + " 1149247, 1149235, 1141549, 1140326, 1143238, 1144548, 1174845, 1159100,\n", + " 1166682, 1166684, 1170874, 1161591, 1158176, 1149179, 1149173, 1172538,\n", + " 1159751, 1167658, 1156559, 1171311, 1181246, 1159404, 1153137, 1163099,\n", + " 1144910, 1168774, 1166554, 1161255, 1154718, 1157792, 1157795, 1171623,\n", + " 1157997, 1180036, 1158253, 1153898, 1154497, 1162403, 1162407, 1145626,\n", + " 1156443, 1156446, 1180383, 1157483, 1161911, 1149755, 1153609, 1157772,\n", + " 1158513, 1158934, 1158940, 1155890, 1155899, 1155895, 1180852, 1140399,\n", + " 1189885, 1168883, 1165078, 1154953, 1161819, 1146161, 1147172, 1172608,\n", + " 1156162, 1189070, 1183860, 1170041, 1185377, 1183021, 1170822, 1139831,\n", + " 1164914, 1151286, 1151295, 1156049, 1156055, 1182836, 1146394, 1146395,\n", + " 1173058, 1186648, 1194031, 1149547, 1149536, 1192166, 1156838, 1148787,\n", + " 1169964, 1182551, 1190250, 1185978, 1171059, 1179852, 1188825, 1151774,\n", + " 1152115, 1169703, 1166841, 1186573, 1163146, 1177845, 1150406, 1150400,\n", + " 1161186, 1158064, 1145395, 1155959, 1155952, 1181656, 1187846, 1178456,\n", + " 1155553, 1192282, 1169831, 1189036, 1190342, 1188736, 1157012],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196011, 1196013, 1198783, 1198242, 1201094, 1195860, 1199282, 1202255,\n", + " 1198021, 1194626, 1200643, 1200644, 1201016, 1197351, 1196956, 1202803,\n", + " 1202804, 1194866, 1194770, 1194642, 1195511, 1195514, 1195263, 1196529,\n", + " 1201992, 1196031, 1198543, 1197697, 1194882, 1195888, 1194982, 1196353,\n", + " 1199366, 1195325, 1195323, 1198668, 1198262, 1198163, 1196711, 1195223,\n", + " 1195216, 1195265, 1195278, 1197136, 1196247, 1197272, 1197273, 1196109,\n", + " 1198219, 1196737, 1195850, 1195651, 1195659, 1195650, 1195541, 1195758,\n", + " 1197640, 1195918, 1195353, 1195358, 1200949, 1199185, 1196851, 1196857,\n", + " 1199685, 1199628, 1201636, 1199803, 1197676, 1197990, 1200076, 1200866,\n", + " 1199154, 1200748, 1199229, 1195017, 1199676, 1201511, 1196501, 1196727,\n", + " 1202618, 1200893, 1198428, 1199555, 1201547, 1201824, 1201827, 1200507,\n", + " 1198066, 1203293, 1201156, 1202406, 1200988, 1202641, 1201042, 1202733,\n", + " 1200553, 1202138, 1199908, 1201442, 1202239, 1199976, 1195876, 1201291,\n", + " 1198472, 1198478, 1202205, 1202209, 1202889, 1199929, 1196963, 1196966,\n", + " 1202876, 1199606, 1200638, 1195679, 1195664, 1202432, 1198055, 1200439,\n", + " 1198932, 1195181, 1196916, 1197060, 1197816, 1197403, 1199659, 1203102,\n", + " 1201138, 1194730, 1198824, 1196795, 1200011, 1199782, 1199786, 1200465,\n", + " 1195070, 1198131, 1197652, 1195082, 1195163, 1196551, 1194907],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196011, 1196013, 1198783, 1198242, 1201094, 1195860, 1199282, 1202255,\n", + " 1198021, 1194626, 1200643, 1200644, 1201016, 1197351, 1196956, 1202803,\n", + " 1202804, 1194866, 1194770, 1194642, 1195511, 1195514, 1195263, 1196529,\n", + " 1201992, 1196031, 1198543, 1197697, 1194882, 1195888, 1194982, 1196353,\n", + " 1199366, 1195325, 1195323, 1198668, 1198262, 1198163, 1196711, 1195223,\n", + " 1195216, 1195265, 1195278, 1197136, 1196247, 1197272, 1197273, 1196109,\n", + " 1198219, 1196737, 1195850, 1195651, 1195659, 1195650, 1195541, 1195758,\n", + " 1197640, 1195918, 1195353, 1195358, 1200949, 1199185, 1196851, 1196857,\n", + " 1199685, 1199628, 1201636, 1199803, 1197676, 1197990, 1200076, 1200866,\n", + " 1199154, 1200748, 1199229, 1195017, 1199676, 1201511, 1196501, 1196727,\n", + " 1202618, 1200893, 1198428, 1199555, 1201547, 1201824, 1201827, 1200507,\n", + " 1198066, 1203293, 1201156, 1202406, 1200988, 1202641, 1201042, 1202733,\n", + " 1200553, 1202138, 1199908, 1201442, 1202239, 1199976, 1195876, 1201291,\n", + " 1198472, 1198478, 1202205, 1202209, 1202889, 1199929, 1196963, 1196966,\n", + " 1202876, 1199606, 1200638, 1195679, 1195664, 1202432, 1198055, 1200439,\n", + " 1198932, 1195181, 1196916, 1197060, 1197816, 1197403, 1199659, 1203102,\n", + " 1201138, 1194730, 1198824, 1196795, 1200011, 1199782, 1199786, 1200465,\n", + " 1195070, 1198131, 1197652, 1195082, 1195163, 1196551, 1194907],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.7751e-01, -3.4587e-04, 8.7869e-01, ..., 1.2300e-01,\n", + " -1.7109e-03, -6.0561e-03],\n", + " [ 1.6652e-01, 2.6164e-02, 7.5300e-01, ..., 1.3370e-01,\n", + " -1.8340e-03, -5.0270e-03],\n", + " [ 6.9191e-02, 1.4787e-02, 3.1484e-01, ..., 1.0026e-01,\n", + " -1.4767e-03, -2.8065e-03],\n", + " ...,\n", + " [ 8.8299e-02, 2.8905e-02, 5.4988e-01, ..., 1.3072e-01,\n", + " -1.9228e-03, -3.6019e-03],\n", + " [ 9.6906e-02, 4.9408e-02, 6.0392e-01, ..., 1.5820e-01,\n", + " -1.8439e-03, -3.7267e-03],\n", + " [ 1.1853e-01, 3.6890e-02, 6.5859e-01, ..., 1.4759e-01,\n", + " -1.8949e-03, -4.3294e-03]], device='cuda:0'), 'paper': tensor([[ 9.3948e-01, -1.1414e-02, 1.2353e+00, ..., -6.4664e-03,\n", + " -1.7518e-02, 3.7766e-01],\n", + " [ 6.5734e-01, -4.8868e-03, 1.1099e+00, ..., -6.4725e-03,\n", + " -1.1747e-02, -7.8639e-04],\n", + " [ 2.0619e+00, -1.1255e-02, 2.4270e+00, ..., 1.0701e-02,\n", + " -3.5564e-02, 2.5793e+00],\n", + " ...,\n", + " [ 7.6962e-01, -6.6529e-03, 1.0462e+00, ..., -5.8504e-03,\n", + " -1.3472e-02, 7.2888e-02],\n", + " [ 8.3249e-01, -5.0970e-03, 9.7768e-01, ..., -6.4299e-03,\n", + " -1.2509e-02, 1.3033e-01],\n", + " [ 2.0213e+00, -1.2071e-02, 2.1714e+00, ..., 1.0055e-01,\n", + " -3.6342e-02, 2.6646e+00]], device='cuda:0'), 'author': tensor([[-1.8159e-03, 1.6042e-01, 2.6391e-01, ..., 1.4353e+00,\n", + " -1.6452e-03, 3.1729e-02],\n", + " [-1.7940e-03, 1.6561e-01, 3.1799e-01, ..., 1.5129e+00,\n", + " -2.5929e-03, -1.6177e-04],\n", + " [-1.6294e-03, 1.7556e-01, 2.4801e-01, ..., 1.5230e+00,\n", + " -9.3722e-04, 1.5403e-01],\n", + " ...,\n", + " [-2.1431e-03, 2.1178e-01, 4.4076e-01, ..., 1.1904e+00,\n", + " -5.5246e-03, -3.7181e-03],\n", + " [-2.2867e-03, 1.8915e-01, 3.7411e-01, ..., 1.1968e+00,\n", + " -4.3716e-03, -2.5918e-03],\n", + " [-2.9954e-03, 1.4405e-01, 4.3209e-01, ..., 1.1799e+00,\n", + " -5.6142e-03, -4.5401e-03]], device='cuda:0'), 'field_of_study': tensor([[-1.2636e-03, 4.3966e-01, 2.0444e-01, ..., -9.0097e-03,\n", + " 2.2268e-01, 1.9685e-01],\n", + " [-1.0194e-03, 4.0295e-01, 2.0398e-01, ..., -6.6134e-03,\n", + " 8.4754e-02, 2.3658e-01],\n", + " [-8.3451e-04, 2.9811e-01, 1.6922e-01, ..., -5.7330e-03,\n", + " 7.8953e-02, 1.9608e-01],\n", + " ...,\n", + " [-4.6199e-04, 3.9287e-01, 1.0695e-01, ..., -6.1509e-03,\n", + " 1.7958e-01, 1.7807e-01],\n", + " [ 4.9805e-02, 5.0380e-01, 3.4159e-01, ..., -4.4132e-03,\n", + " 1.8280e-01, -2.5709e-04],\n", + " [-6.3045e-04, 4.7997e-01, 2.0991e-01, ..., -5.6380e-03,\n", + " 2.4741e-01, 1.2773e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 138, 189, 145, 97, 97, 4, 184, 444, 444, 444, 488, 250,\n", + " 265, 220, 220, 220, 303, 303, 418, 418, 458, 715, 565, 845,\n", + " 845, 845, 825, 779, 779, 1207, 779, 779, 779, 851, 1163, 864,\n", + " 864, 1065, 1065, 1082, 1082, 1082, 1096, 1290, 1290, 1290, 1075, 1379,\n", + " 1379, 1379, 1229, 1096, 1258, 1321, 1351, 1346, 1402, 1402, 1560, 1481,\n", + " 1481, 1511, 1802, 1828, 1679, 1760, 1851, 2145, 1874, 1874, 1874, 1860,\n", + " 1989, 2071, 2071, 2044, 2075, 2075, 2074, 2074, 2154, 2113, 2149, 2281,\n", + " 2281, 2309, 2258, 2276, 2444, 2352, 2352, 2339, 2339, 2325, 2325, 2325,\n", + " 2416, 2416, 2451, 2533, 2533, 2521, 2738, 2738, 2580, 2603, 2738, 2854,\n", + " 2854, 2886, 2886, 2875, 2914, 2846, 2797, 2797, 2797, 3027, 2950, 3072,\n", + " 3091, 3182, 3180, 3242, 3180, 3180, 3180, 3459, 3479, 3285, 3379, 3704,\n", + " 3621, 3621, 3621, 3334, 3747, 3747, 3812, 3856, 3837, 3937, 3964, 3980,\n", + " 4132, 4131, 4126, 4126, 4126, 4126, 4126, 4126, 4258, 4351, 4282, 4346,\n", + " 4335, 4335, 4364, 4336, 4693, 4398, 4370, 4370, 4370, 4370, 4370, 4463,\n", + " 4463, 4463, 4463, 4463, 4463, 4517, 4574, 4574, 4658, 4541, 4541, 4867,\n", + " 4867, 4867, 4839, 4921, 4996, 4953, 5040, 5040, 5042, 4988, 4988, 5067,\n", + " 5067, 5116, 5180, 5180, 5106, 5106, 5106, 5106, 5219, 5126, 5504, 5428,\n", + " 5470, 5551, 5706, 5707, 5726, 5791, 5658, 5912, 5899, 5899, 5917, 5780,\n", + " 5903, 5996, 5996],\n", + " [ 56, 63, 139, 59, 90, 82, 63, 23, 30, 13, 100, 79,\n", + " 129, 106, 60, 34, 107, 85, 78, 35, 94, 126, 91, 101,\n", + " 110, 14, 8, 114, 64, 6, 1, 29, 21, 115, 4, 106,\n", + " 60, 19, 134, 27, 24, 103, 126, 21, 84, 31, 10, 141,\n", + " 106, 60, 65, 25, 127, 9, 133, 57, 109, 17, 30, 71,\n", + " 117, 96, 124, 11, 62, 79, 54, 97, 135, 92, 102, 126,\n", + " 47, 71, 117, 123, 91, 74, 124, 82, 79, 24, 31, 53,\n", + " 3, 5, 104, 57, 57, 31, 140, 6, 42, 58, 29, 132,\n", + " 100, 95, 66, 99, 77, 9, 52, 41, 73, 39, 16, 116,\n", + " 100, 46, 76, 131, 125, 136, 36, 40, 124, 117, 2, 22,\n", + " 89, 43, 103, 7, 26, 9, 79, 79, 113, 104, 138, 79,\n", + " 38, 68, 6, 11, 81, 43, 12, 51, 6, 104, 51, 66,\n", + " 128, 7, 93, 98, 103, 102, 6, 12, 67, 111, 33, 86,\n", + " 25, 70, 89, 0, 45, 107, 13, 37, 111, 61, 130, 1,\n", + " 79, 28, 120, 105, 72, 89, 80, 108, 82, 75, 118, 137,\n", + " 90, 6, 32, 44, 9, 96, 103, 79, 130, 55, 112, 15,\n", + " 83, 79, 98, 24, 77, 49, 2, 25, 29, 119, 130, 87,\n", + " 142, 109, 18, 122, 69, 121, 50, 136, 20, 88, 48, 122,\n", + " 107, 125, 112]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 789, 493, 1140, ..., 2626, 3741, 3430],\n", + " [ 8, 133, 86, ..., 7181, 7142, 7144]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 74, 91, 74, ..., 82, 97, 79],\n", + " [ 168, 52, 204, ..., 5816, 5919, 5957]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 30, 30, 30, ..., 7092, 7092, 7083],\n", + " [ 192, 56, 804, ..., 443, 720, 124]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 502, 627, 310, ..., 192, 484, 251],\n", + " [ 64, 279, 12, ..., 7143, 7118, 7055]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[6955, 6014, 657, ..., 5778, 5222, 5926],\n", + " [ 45, 11, 95, ..., 5949, 5921, 5929]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 30, 30, 30, ..., 7217, 7083, 7167],\n", + " [2714, 3026, 3691, ..., 6411, 6476, 3557]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 4, 169, 169, ..., 5903, 5903, 5903],\n", + " [2171, 973, 1266, ..., 4120, 4407, 4663]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.007231\n", + "sampling 0.00705\n", + "noi time: 0.001376\n", + "get_vertex_data call: 0.013719\n", + "noi group time: 0.00179\n", + "eoi_group_time: 0.010936\n", + "second half: 0.16045\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 31143, 31145, ..., 1119043, 1119055, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 31143, 31145, ..., 1119043, 1119055, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1231429, 1231430, ..., 1935650, 1929320, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1231429, 1231430, ..., 1935650, 1929320, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137426, 1141424, 1136237, 1140282, 1135926, 1138553, 1135165, 1135726,\n", + " 1141758, 1137509, 1138335, 1136223, 1141257, 1139462, 1136969, 1136971,\n", + " 1141443, 1138897, 1143600, 1145999, 1137268, 1138938, 1139143, 1146640,\n", + " 1140781, 1148983, 1150497, 1142965, 1139857, 1142958, 1155683, 1155686,\n", + " 1147473, 1135997, 1142881, 1153938, 1153940, 1144636, 1149037, 1148337,\n", + " 1146472, 1148546, 1147089, 1147094, 1137220, 1150555, 1155008, 1155018,\n", + " 1155019, 1139373, 1147202, 1136680, 1136682, 1136683, 1136685, 1138745,\n", + " 1134667, 1137829, 1151548, 1140540, 1138112, 1137257, 1138356, 1151531,\n", + " 1140159, 1140020, 1140953, 1135367, 1135202, 1141036, 1136288, 1134794,\n", + " 1157443, 1138504, 1138508, 1137693, 1144786, 1144395, 1136821, 1137534,\n", + " 1157397, 1143317, 1135268, 1139161, 1141698, 1135579, 1135583, 1140711,\n", + " 1156345, 1153094, 1135492, 1135499, 1154132, 1156899, 1156903, 1139685,\n", + " 1139878, 1138440, 1154790, 1149328, 1135088, 1138694, 1156606, 1147112,\n", + " 1147118, 1142611, 1158987, 1137109, 1135769, 1139844, 1141530, 1136449,\n", + " 1139667, 1138067, 1136094, 1134992, 1136551, 1152640, 1152651, 1158974,\n", + " 1139327, 1141065, 1153544, 1143626, 1139929, 1138148, 1141963, 1146075,\n", + " 1152044, 1142302, 1137728, 1134922, 1140901, 1134742, 1135549, 1136694,\n", + " 1140228, 1141098, 1141100, 1162946, 1145347, 1156875, 1141980, 1143767,\n", + " 1139025, 1146834, 1141224, 1139386, 1137188, 1145071, 1141785, 1141786,\n", + " 1136760, 1141300, 1134979, 1134987, 1147850, 1137074, 1141821, 1143166,\n", + " 1142093, 1158605, 1138708, 1142913, 1143107, 1144596, 1136864, 1145298,\n", + " 1144042, 1141578, 1140885, 1141398, 1144182, 1138539, 1137854, 1137841,\n", + " 1136378, 1141365, 1141367, 1153068, 1138292, 1143917, 1139510, 1139774,\n", + " 1139763, 1139127, 1140612, 1140976, 1140979, 1140990, 1141560, 1147050,\n", + " 1145872, 1149886, 1143543, 1152976, 1152980, 1135457, 1142547, 1139453,\n", + " 1139455, 1138995, 1141925, 1144242, 1145339, 1140580, 1166360, 1140690,\n", + " 1145974, 1143845, 1143851, 1146024, 1147272, 1154332, 1149930, 1149929,\n", + " 1141236, 1139990, 1143293, 1147540, 1147144, 1148763, 1147282, 1147290,\n", + " 1142829, 1142816, 1138669, 1149155, 1143663, 1143651, 1149366, 1148003,\n", + " 1143051, 1143040, 1148402, 1148408, 1136160, 1144919, 1138920, 1138927,\n", + " 1157720, 1136836, 1139328, 1141490, 1144957, 1143345, 1144753, 1144619,\n", + " 1140844, 1144081, 1135876, 1150294, 1146514, 1146523, 1143957, 1143456,\n", + " 1143457, 1137707, 1143937, 1140817, 1140364, 1143082, 1144734, 1144222,\n", + " 1147984, 1147999, 1148704, 1142697, 1141825, 1141836, 1149722, 1147971,\n", + " 1158226, 1158228, 1150452, 1166999, 1143921, 1143925, 1147880, 1149871,\n", + " 1154526, 1145750, 1145751, 1138638, 1152530, 1152538, 1150280, 1150438,\n", + " 1150445, 1149263, 1151856, 1151860, 1149791, 1144514, 1152001, 1142316,\n", + " 1147807, 1151482, 1154266, 1151041, 1135516, 1134869, 1150127, 1153956,\n", + " 1158944, 1141949, 1146776, 1150736, 1148740, 1148744, 1147659, 1143560,\n", + " 1143564, 1149412, 1148300, 1135083, 1135087, 1139096, 1139097, 1154420,\n", + " 1148188, 1152561, 1152482, 1138877, 1157977, 1148724, 1151937, 1148204,\n", + " 1153124, 1153133, 1153188, 1145104, 1155551, 1150932, 1143092, 1144849,\n", + " 1150352, 1147442, 1152578, 1152581, 1135307, 1151906, 1151913, 1150715,\n", + " 1148498, 1148505, 1148500, 1141420, 1150628, 1147728, 1145075, 1150890,\n", + " 1146262, 1148949, 1146969, 1146967, 1146974, 1156403, 1149349, 1153255,\n", + " 1150219, 1146623, 1144476, 1146280, 1156321, 1156325, 1153028, 1153038,\n", + " 1150085, 1145541, 1137746, 1137756, 1146304, 1159969, 1152622, 1140518,\n", + " 1140521, 1155140, 1149205, 1155337, 1154123, 1157826, 1164761, 1151617,\n", + " 1150578, 1136131, 1136134, 1148916, 1152958, 1145952, 1152227, 1152897,\n", + " 1152341, 1156831, 1153311, 1138281, 1152294, 1156007, 1156005, 1136028,\n", + " 1156623, 1151187, 1152928, 1155776, 1154734, 1150104, 1153909, 1150164,\n", + " 1148033, 1148035, 1148040, 1149300, 1148896, 1145656, 1149798, 1148628,\n", + " 1158530, 1137458, 1149944, 1153078, 1153085, 1142047, 1156720, 1158860,\n", + " 1158857, 1158916, 1158924, 1154929, 1156500, 1156501, 1157069, 1155412,\n", + " 1155422, 1152833, 1145184, 1137809, 1137814, 1139473, 1151251, 1150465,\n", + " 1146854, 1135230, 1135730, 1152179, 1153408, 1135634, 1158308, 1158311,\n", + " 1155441, 1137972, 1137969, 1150129, 1144360, 1144361, 1140871, 1140866,\n", + " 1156921, 1150493, 1142755, 1142758, 1156207, 1138775, 1151383, 1151379,\n", + " 1158635, 1152527, 1149313, 1149504, 1155755, 1151424, 1135396, 1156463,\n", + " 1168230, 1155628, 1155631, 1154555, 1155582, 1158824, 1155646, 1146935,\n", + " 1151892, 1154909, 1179427, 1143189, 1157439, 1155613, 1150987, 1157934,\n", + " 1137152, 1180900, 1158194, 1137380, 1145688, 1137323, 1140919, 1134677,\n", + " 1134674, 1135601, 1135614, 1148149, 1150661, 1150671, 1155848, 1155852,\n", + " 1158664, 1158656, 1157685, 1157684, 1149145, 1159258, 1152209, 1152220,\n", + " 1152498, 1140377, 1156017, 1155975, 1158841, 1158846, 1155404, 1149696,\n", + " 1154600, 1136896, 1158806, 1158285, 1136494, 1136491, 1164941, 1159241,\n", + " 1154394, 1156665, 1155309, 1156495, 1156490, 1153808, 1136640, 1136646,\n", + " 1142178, 1158558, 1156516, 1156525, 1156515, 1163814, 1162021, 1138108,\n", + " 1154343, 1158005, 1155529, 1142663, 1159052, 1159070, 1159071, 1163267,\n", + " 1155191, 1160563, 1153052, 1156235, 1153842, 1138393, 1149070, 1145945,\n", + " 1155479, 1153514, 1147307, 1147300, 1158680, 1146870, 1164012, 1156795,\n", + " 1164901, 1163379, 1139592, 1165762, 1159999, 1148771, 1157346, 1146063,\n", + " 1164048, 1140134, 1140643, 1148600, 1164979, 1141800, 1158643, 1159029,\n", + " 1159032, 1168110, 1152247, 1143729, 1160600, 1155588, 1144330, 1151223,\n", + " 1144984, 1147830, 1146500, 1146510, 1164577, 1141471, 1141459, 1151650,\n", + " 1147427, 1157044, 1156739, 1156745, 1153663, 1163477, 1150309, 1170253,\n", + " 1144810, 1144812, 1135567, 1164741, 1180589, 1148683, 1163935, 1169282,\n", + " 1187746, 1147673, 1142136, 1169201, 1165756, 1148124, 1147724, 1145900,\n", + " 1145902, 1169538, 1143395, 1154076, 1150783, 1145490, 1162886, 1149125,\n", + " 1169602, 1167817, 1166653, 1149483, 1169298, 1150518, 1156119, 1144346,\n", + " 1144336, 1138369, 1147745, 1135854, 1157331, 1138143, 1141048, 1141043,\n", + " 1169359, 1154364, 1158623, 1173047, 1153288, 1149847, 1154869, 1152362,\n", + " 1149394, 1173307, 1154027, 1152150, 1157158, 1157153, 1157373, 1147711,\n", + " 1148128, 1157593, 1169687, 1149247, 1135021, 1172961, 1176537, 1178400,\n", + " 1160986, 1167896, 1140326, 1174845, 1166682, 1150234, 1154151, 1154148,\n", + " 1169417, 1149169, 1143279, 1153803, 1171755, 1179807, 1161255, 1182353,\n", + " 1171623, 1188579, 1158253, 1178538, 1145626, 1180371, 1161068, 1149744,\n", + " 1149755, 1146242, 1180948, 1185327, 1181190, 1182443, 1158371, 1155899,\n", + " 1140399, 1185396, 1180673, 1180674, 1168886, 1171027, 1182337, 1181548,\n", + " 1184287, 1146161, 1156861, 1170336, 1147182, 1172624, 1163616, 1139828,\n", + " 1139831, 1150265, 1182988, 1154806, 1181360, 1151288, 1194356, 1170211,\n", + " 1156055, 1191481, 1146388, 1173058, 1149544, 1182891, 1190552, 1192357,\n", + " 1193439, 1194314, 1184793, 1194467, 1191340, 1188821, 1182172, 1172339,\n", + " 1193003, 1192386, 1177621, 1180964, 1179317, 1172423, 1155959, 1179771,\n", + " 1183297, 1190850, 1185356, 1190904, 1181997], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137426, 1141424, 1136237, 1140282, 1135926, 1138553, 1135165, 1135726,\n", + " 1141758, 1137509, 1138335, 1136223, 1141257, 1139462, 1136969, 1136971,\n", + " 1141443, 1138897, 1143600, 1145999, 1137268, 1138938, 1139143, 1146640,\n", + " 1140781, 1148983, 1150497, 1142965, 1139857, 1142958, 1155683, 1155686,\n", + " 1147473, 1135997, 1142881, 1153938, 1153940, 1144636, 1149037, 1148337,\n", + " 1146472, 1148546, 1147089, 1147094, 1137220, 1150555, 1155008, 1155018,\n", + " 1155019, 1139373, 1147202, 1136680, 1136682, 1136683, 1136685, 1138745,\n", + " 1134667, 1137829, 1151548, 1140540, 1138112, 1137257, 1138356, 1151531,\n", + " 1140159, 1140020, 1140953, 1135367, 1135202, 1141036, 1136288, 1134794,\n", + " 1157443, 1138504, 1138508, 1137693, 1144786, 1144395, 1136821, 1137534,\n", + " 1157397, 1143317, 1135268, 1139161, 1141698, 1135579, 1135583, 1140711,\n", + " 1156345, 1153094, 1135492, 1135499, 1154132, 1156899, 1156903, 1139685,\n", + " 1139878, 1138440, 1154790, 1149328, 1135088, 1138694, 1156606, 1147112,\n", + " 1147118, 1142611, 1158987, 1137109, 1135769, 1139844, 1141530, 1136449,\n", + " 1139667, 1138067, 1136094, 1134992, 1136551, 1152640, 1152651, 1158974,\n", + " 1139327, 1141065, 1153544, 1143626, 1139929, 1138148, 1141963, 1146075,\n", + " 1152044, 1142302, 1137728, 1134922, 1140901, 1134742, 1135549, 1136694,\n", + " 1140228, 1141098, 1141100, 1162946, 1145347, 1156875, 1141980, 1143767,\n", + " 1139025, 1146834, 1141224, 1139386, 1137188, 1145071, 1141785, 1141786,\n", + " 1136760, 1141300, 1134979, 1134987, 1147850, 1137074, 1141821, 1143166,\n", + " 1142093, 1158605, 1138708, 1142913, 1143107, 1144596, 1136864, 1145298,\n", + " 1144042, 1141578, 1140885, 1141398, 1144182, 1138539, 1137854, 1137841,\n", + " 1136378, 1141365, 1141367, 1153068, 1138292, 1143917, 1139510, 1139774,\n", + " 1139763, 1139127, 1140612, 1140976, 1140979, 1140990, 1141560, 1147050,\n", + " 1145872, 1149886, 1143543, 1152976, 1152980, 1135457, 1142547, 1139453,\n", + " 1139455, 1138995, 1141925, 1144242, 1145339, 1140580, 1166360, 1140690,\n", + " 1145974, 1143845, 1143851, 1146024, 1147272, 1154332, 1149930, 1149929,\n", + " 1141236, 1139990, 1143293, 1147540, 1147144, 1148763, 1147282, 1147290,\n", + " 1142829, 1142816, 1138669, 1149155, 1143663, 1143651, 1149366, 1148003,\n", + " 1143051, 1143040, 1148402, 1148408, 1136160, 1144919, 1138920, 1138927,\n", + " 1157720, 1136836, 1139328, 1141490, 1144957, 1143345, 1144753, 1144619,\n", + " 1140844, 1144081, 1135876, 1150294, 1146514, 1146523, 1143957, 1143456,\n", + " 1143457, 1137707, 1143937, 1140817, 1140364, 1143082, 1144734, 1144222,\n", + " 1147984, 1147999, 1148704, 1142697, 1141825, 1141836, 1149722, 1147971,\n", + " 1158226, 1158228, 1150452, 1166999, 1143921, 1143925, 1147880, 1149871,\n", + " 1154526, 1145750, 1145751, 1138638, 1152530, 1152538, 1150280, 1150438,\n", + " 1150445, 1149263, 1151856, 1151860, 1149791, 1144514, 1152001, 1142316,\n", + " 1147807, 1151482, 1154266, 1151041, 1135516, 1134869, 1150127, 1153956,\n", + " 1158944, 1141949, 1146776, 1150736, 1148740, 1148744, 1147659, 1143560,\n", + " 1143564, 1149412, 1148300, 1135083, 1135087, 1139096, 1139097, 1154420,\n", + " 1148188, 1152561, 1152482, 1138877, 1157977, 1148724, 1151937, 1148204,\n", + " 1153124, 1153133, 1153188, 1145104, 1155551, 1150932, 1143092, 1144849,\n", + " 1150352, 1147442, 1152578, 1152581, 1135307, 1151906, 1151913, 1150715,\n", + " 1148498, 1148505, 1148500, 1141420, 1150628, 1147728, 1145075, 1150890,\n", + " 1146262, 1148949, 1146969, 1146967, 1146974, 1156403, 1149349, 1153255,\n", + " 1150219, 1146623, 1144476, 1146280, 1156321, 1156325, 1153028, 1153038,\n", + " 1150085, 1145541, 1137746, 1137756, 1146304, 1159969, 1152622, 1140518,\n", + " 1140521, 1155140, 1149205, 1155337, 1154123, 1157826, 1164761, 1151617,\n", + " 1150578, 1136131, 1136134, 1148916, 1152958, 1145952, 1152227, 1152897,\n", + " 1152341, 1156831, 1153311, 1138281, 1152294, 1156007, 1156005, 1136028,\n", + " 1156623, 1151187, 1152928, 1155776, 1154734, 1150104, 1153909, 1150164,\n", + " 1148033, 1148035, 1148040, 1149300, 1148896, 1145656, 1149798, 1148628,\n", + " 1158530, 1137458, 1149944, 1153078, 1153085, 1142047, 1156720, 1158860,\n", + " 1158857, 1158916, 1158924, 1154929, 1156500, 1156501, 1157069, 1155412,\n", + " 1155422, 1152833, 1145184, 1137809, 1137814, 1139473, 1151251, 1150465,\n", + " 1146854, 1135230, 1135730, 1152179, 1153408, 1135634, 1158308, 1158311,\n", + " 1155441, 1137972, 1137969, 1150129, 1144360, 1144361, 1140871, 1140866,\n", + " 1156921, 1150493, 1142755, 1142758, 1156207, 1138775, 1151383, 1151379,\n", + " 1158635, 1152527, 1149313, 1149504, 1155755, 1151424, 1135396, 1156463,\n", + " 1168230, 1155628, 1155631, 1154555, 1155582, 1158824, 1155646, 1146935,\n", + " 1151892, 1154909, 1179427, 1143189, 1157439, 1155613, 1150987, 1157934,\n", + " 1137152, 1180900, 1158194, 1137380, 1145688, 1137323, 1140919, 1134677,\n", + " 1134674, 1135601, 1135614, 1148149, 1150661, 1150671, 1155848, 1155852,\n", + " 1158664, 1158656, 1157685, 1157684, 1149145, 1159258, 1152209, 1152220,\n", + " 1152498, 1140377, 1156017, 1155975, 1158841, 1158846, 1155404, 1149696,\n", + " 1154600, 1136896, 1158806, 1158285, 1136494, 1136491, 1164941, 1159241,\n", + " 1154394, 1156665, 1155309, 1156495, 1156490, 1153808, 1136640, 1136646,\n", + " 1142178, 1158558, 1156516, 1156525, 1156515, 1163814, 1162021, 1138108,\n", + " 1154343, 1158005, 1155529, 1142663, 1159052, 1159070, 1159071, 1163267,\n", + " 1155191, 1160563, 1153052, 1156235, 1153842, 1138393, 1149070, 1145945,\n", + " 1155479, 1153514, 1147307, 1147300, 1158680, 1146870, 1164012, 1156795,\n", + " 1164901, 1163379, 1139592, 1165762, 1159999, 1148771, 1157346, 1146063,\n", + " 1164048, 1140134, 1140643, 1148600, 1164979, 1141800, 1158643, 1159029,\n", + " 1159032, 1168110, 1152247, 1143729, 1160600, 1155588, 1144330, 1151223,\n", + " 1144984, 1147830, 1146500, 1146510, 1164577, 1141471, 1141459, 1151650,\n", + " 1147427, 1157044, 1156739, 1156745, 1153663, 1163477, 1150309, 1170253,\n", + " 1144810, 1144812, 1135567, 1164741, 1180589, 1148683, 1163935, 1169282,\n", + " 1187746, 1147673, 1142136, 1169201, 1165756, 1148124, 1147724, 1145900,\n", + " 1145902, 1169538, 1143395, 1154076, 1150783, 1145490, 1162886, 1149125,\n", + " 1169602, 1167817, 1166653, 1149483, 1169298, 1150518, 1156119, 1144346,\n", + " 1144336, 1138369, 1147745, 1135854, 1157331, 1138143, 1141048, 1141043,\n", + " 1169359, 1154364, 1158623, 1173047, 1153288, 1149847, 1154869, 1152362,\n", + " 1149394, 1173307, 1154027, 1152150, 1157158, 1157153, 1157373, 1147711,\n", + " 1148128, 1157593, 1169687, 1149247, 1135021, 1172961, 1176537, 1178400,\n", + " 1160986, 1167896, 1140326, 1174845, 1166682, 1150234, 1154151, 1154148,\n", + " 1169417, 1149169, 1143279, 1153803, 1171755, 1179807, 1161255, 1182353,\n", + " 1171623, 1188579, 1158253, 1178538, 1145626, 1180371, 1161068, 1149744,\n", + " 1149755, 1146242, 1180948, 1185327, 1181190, 1182443, 1158371, 1155899,\n", + " 1140399, 1185396, 1180673, 1180674, 1168886, 1171027, 1182337, 1181548,\n", + " 1184287, 1146161, 1156861, 1170336, 1147182, 1172624, 1163616, 1139828,\n", + " 1139831, 1150265, 1182988, 1154806, 1181360, 1151288, 1194356, 1170211,\n", + " 1156055, 1191481, 1146388, 1173058, 1149544, 1182891, 1190552, 1192357,\n", + " 1193439, 1194314, 1184793, 1194467, 1191340, 1188821, 1182172, 1172339,\n", + " 1193003, 1192386, 1177621, 1180964, 1179317, 1172423, 1155959, 1179771,\n", + " 1183297, 1190850, 1185356, 1190904, 1181997], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1198769, 1198730, 1195860, 1199282, 1198459, 1202243, 1202249, 1202255,\n", + " 1198844, 1196336, 1201582, 1202119, 1197777, 1197359, 1198633, 1196956,\n", + " 1202803, 1202804, 1202284, 1198557, 1194743, 1194770, 1197466, 1194642,\n", + " 1199135, 1201992, 1195190, 1196031, 1197704, 1198095, 1195469, 1196457,\n", + " 1195888, 1196334, 1197856, 1196359, 1196517, 1194752, 1197831, 1195313,\n", + " 1197115, 1196837, 1198036, 1198167, 1196704, 1195148, 1195223, 1195278,\n", + " 1197140, 1195847, 1195039, 1197474, 1197477, 1197478, 1196122, 1199998,\n", + " 1196393, 1195353, 1195358, 1198273, 1200949, 1199071, 1202740, 1199185,\n", + " 1199187, 1199685, 1199628, 1199803, 1197990, 1199156, 1200405, 1199231,\n", + " 1195017, 1199853, 1200060, 1199949, 1196498, 1196508, 1200668, 1197601,\n", + " 1197603, 1201117, 1196727, 1196734, 1202618, 1198428, 1198811, 1201529,\n", + " 1200452, 1200456, 1200570, 1199445, 1201079, 1201156, 1202630, 1201056,\n", + " 1200918, 1194805, 1200555, 1200310, 1200429, 1202964, 1201726, 1202529,\n", + " 1200861, 1199915, 1196779, 1201442, 1200899, 1200907, 1199976, 1202707,\n", + " 1195885, 1201291, 1196761, 1201871, 1199925, 1200248, 1198562, 1196963,\n", + " 1200785, 1196065, 1199606, 1200638, 1195431, 1203117, 1195670, 1195664,\n", + " 1200380, 1198929, 1195418, 1195181, 1196923, 1197822, 1198127, 1198117,\n", + " 1198973, 1198587, 1199661, 1199659, 1196381, 1198147, 1197731, 1197735,\n", + " 1197729, 1201475, 1200974, 1195066, 1200296, 1197652, 1197655, 1195082,\n", + " 1195165], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1198769, 1198730, 1195860, 1199282, 1198459, 1202243, 1202249, 1202255,\n", + " 1198844, 1196336, 1201582, 1202119, 1197777, 1197359, 1198633, 1196956,\n", + " 1202803, 1202804, 1202284, 1198557, 1194743, 1194770, 1197466, 1194642,\n", + " 1199135, 1201992, 1195190, 1196031, 1197704, 1198095, 1195469, 1196457,\n", + " 1195888, 1196334, 1197856, 1196359, 1196517, 1194752, 1197831, 1195313,\n", + " 1197115, 1196837, 1198036, 1198167, 1196704, 1195148, 1195223, 1195278,\n", + " 1197140, 1195847, 1195039, 1197474, 1197477, 1197478, 1196122, 1199998,\n", + " 1196393, 1195353, 1195358, 1198273, 1200949, 1199071, 1202740, 1199185,\n", + " 1199187, 1199685, 1199628, 1199803, 1197990, 1199156, 1200405, 1199231,\n", + " 1195017, 1199853, 1200060, 1199949, 1196498, 1196508, 1200668, 1197601,\n", + " 1197603, 1201117, 1196727, 1196734, 1202618, 1198428, 1198811, 1201529,\n", + " 1200452, 1200456, 1200570, 1199445, 1201079, 1201156, 1202630, 1201056,\n", + " 1200918, 1194805, 1200555, 1200310, 1200429, 1202964, 1201726, 1202529,\n", + " 1200861, 1199915, 1196779, 1201442, 1200899, 1200907, 1199976, 1202707,\n", + " 1195885, 1201291, 1196761, 1201871, 1199925, 1200248, 1198562, 1196963,\n", + " 1200785, 1196065, 1199606, 1200638, 1195431, 1203117, 1195670, 1195664,\n", + " 1200380, 1198929, 1195418, 1195181, 1196923, 1197822, 1198127, 1198117,\n", + " 1198973, 1198587, 1199661, 1199659, 1196381, 1198147, 1197731, 1197735,\n", + " 1197729, 1201475, 1200974, 1195066, 1200296, 1197652, 1197655, 1195082,\n", + " 1195165], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.8655e-01, 2.6991e-02, 8.3453e-01, ..., 1.5503e-01,\n", + " -1.9835e-03, -5.4544e-03],\n", + " [ 2.8019e-02, -9.7780e-05, 6.0648e-02, ..., 4.5551e-02,\n", + " -1.1000e-03, -1.4560e-03],\n", + " [ 1.9878e-01, -6.6756e-05, 8.4285e-01, ..., 1.3513e-01,\n", + " -1.8904e-03, -5.5442e-03],\n", + " ...,\n", + " [ 2.6172e-01, -6.3954e-04, 1.0460e+00, ..., 1.3148e-01,\n", + " -1.8261e-03, -7.0979e-03],\n", + " [ 1.7526e-01, 3.9326e-02, 7.6236e-01, ..., 1.5510e-01,\n", + " -1.9538e-03, -5.0714e-03],\n", + " [ 1.9878e-01, -6.6756e-05, 8.4285e-01, ..., 1.3513e-01,\n", + " -1.8904e-03, -5.5442e-03]], device='cuda:0'), 'paper': tensor([[ 5.8015e-01, -1.9761e-02, 2.2524e+00, ..., -7.7380e-03,\n", + " -1.8130e-02, -5.2956e-03],\n", + " [ 8.5247e-01, -1.5160e-02, 1.6561e+00, ..., -8.2014e-03,\n", + " -2.0092e-02, 2.1734e-01],\n", + " [ 3.9497e-01, -9.4876e-03, 1.6469e+00, ..., -5.9005e-03,\n", + " -1.0978e-02, -6.9950e-03],\n", + " ...,\n", + " [ 1.9491e+00, -6.8416e-03, 2.1238e+00, ..., -1.1481e-03,\n", + " -2.9019e-02, 1.9825e+00],\n", + " [ 2.0951e+00, -8.9742e-03, 2.1288e+00, ..., 1.3236e-02,\n", + " -3.4299e-02, 2.5888e+00],\n", + " [ 2.0907e+00, -1.1864e-02, 2.2079e+00, ..., 1.2532e-01,\n", + " -3.6804e-02, 2.7462e+00]], device='cuda:0'), 'author': tensor([[-1.0569e-03, 9.5535e-02, 1.9306e-01, ..., 1.4960e+00,\n", + " -4.7084e-04, 1.0686e-01],\n", + " [-1.1989e-03, 1.1767e-01, 1.1800e-01, ..., 1.3846e+00,\n", + " 1.4500e-02, 1.4456e-01],\n", + " [-1.4132e-03, 5.4455e-02, 2.4007e-01, ..., 1.5103e+00,\n", + " -1.5052e-04, 1.3602e-01],\n", + " ...,\n", + " [-1.5331e-03, 1.6863e-01, 1.8126e-01, ..., 1.5815e+00,\n", + " -1.1899e-03, 8.9750e-02],\n", + " [-1.4660e-03, 1.3140e-01, 2.6532e-01, ..., 1.4526e+00,\n", + " -9.1224e-04, 8.9750e-02],\n", + " [-1.2424e-03, 1.6508e-01, 1.9553e-01, ..., 1.4901e+00,\n", + " -9.8537e-04, 1.3355e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0009, 0.4931, 0.1592, ..., -0.0082, 0.2536, 0.2134],\n", + " [-0.0011, 0.4002, 0.1285, ..., -0.0075, 0.2181, 0.2105],\n", + " [-0.0008, 0.3584, 0.2063, ..., -0.0063, 0.0718, 0.1577],\n", + " ...,\n", + " [-0.0013, 0.4769, 0.2258, ..., -0.0086, 0.2480, 0.3260],\n", + " [-0.0007, 0.5017, 0.3119, ..., -0.0080, 0.2349, 0.2831],\n", + " [-0.0005, 0.4085, 0.1757, ..., -0.0035, 0.0995, 0.0480]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 162, 34, 125, 125, 306, 322, 243, 471, 512, 216, 380, 245,\n", + " 767, 767, 767, 954, 694, 923, 923, 1019, 1546, 1229, 1229, 1111,\n", + " 1268, 1530, 1244, 1254, 1340, 1337, 1405, 1405, 1405, 1369, 1369, 1369,\n", + " 1369, 1472, 1472, 1472, 1398, 1558, 1649, 1770, 1781, 1864, 1864, 1914,\n", + " 1845, 1814, 1814, 2125, 2000, 1954, 2098, 2033, 2033, 2098, 2125, 2125,\n", + " 2125, 2125, 2106, 2106, 2106, 2199, 2199, 2199, 2175, 2152, 2152, 2300,\n", + " 2300, 2378, 2380, 2268, 2554, 2554, 2552, 2552, 2422, 2512, 2443, 2529,\n", + " 2563, 2695, 2695, 2610, 2515, 2591, 2681, 2681, 2751, 2854, 2731, 2772,\n", + " 2952, 2954, 2954, 2708, 3194, 3194, 2924, 3094, 3104, 3252, 3376, 3515,\n", + " 3564, 3589, 3623, 3506, 3506, 3506, 3506, 3685, 3604, 3604, 3715, 3604,\n", + " 3715, 4182, 3588, 4136, 4021, 4165, 4227, 4054, 3800, 4192, 3984, 4258,\n", + " 4338, 4356, 4356, 4448, 4475, 4429, 4429, 4429, 4495, 4677, 4482, 4589,\n", + " 4589, 4597, 4835, 4835, 4929, 5123, 4981, 4869, 5142, 5123, 5123, 5123,\n", + " 4891, 4980, 5089, 5082, 5182, 5227, 5225, 5244, 5051, 5051, 5111, 5073,\n", + " 5275, 5356, 5176, 5168, 5256, 5118, 5367, 5470, 5469, 5614, 5614, 5455,\n", + " 5623, 5741, 5682, 5682, 5746, 5874, 5807, 5949, 5949, 6033, 5741, 5898,\n", + " 5898, 6065, 5979, 5988, 6159, 6261, 6432, 6380, 6380, 6508, 5877, 6193,\n", + " 6635, 6657, 6309, 6424, 6684, 6709, 6643, 6643, 6702, 6630],\n", + " [ 25, 8, 64, 144, 67, 96, 43, 149, 48, 21, 68, 94,\n", + " 105, 101, 89, 97, 119, 143, 118, 33, 142, 25, 106, 118,\n", + " 8, 129, 118, 68, 107, 114, 44, 4, 25, 41, 104, 136,\n", + " 74, 140, 111, 92, 118, 63, 82, 133, 37, 62, 95, 117,\n", + " 112, 94, 81, 83, 97, 118, 71, 96, 3, 79, 75, 137,\n", + " 108, 113, 69, 138, 130, 103, 145, 96, 118, 18, 8, 66,\n", + " 35, 7, 118, 61, 95, 62, 78, 115, 26, 34, 37, 125,\n", + " 55, 48, 82, 143, 29, 134, 99, 3, 8, 6, 23, 108,\n", + " 69, 3, 123, 76, 28, 134, 142, 34, 58, 59, 57, 60,\n", + " 15, 127, 49, 126, 121, 128, 14, 76, 107, 88, 118, 25,\n", + " 143, 139, 76, 99, 39, 84, 45, 8, 65, 27, 32, 38,\n", + " 12, 72, 69, 120, 96, 31, 9, 86, 90, 132, 141, 127,\n", + " 17, 102, 141, 93, 54, 5, 150, 47, 52, 99, 22, 41,\n", + " 98, 148, 151, 6, 109, 93, 110, 152, 24, 124, 13, 46,\n", + " 106, 2, 60, 36, 50, 53, 149, 100, 70, 146, 10, 42,\n", + " 35, 20, 40, 19, 91, 87, 30, 100, 114, 77, 73, 11,\n", + " 33, 9, 122, 45, 66, 80, 1, 131, 56, 106, 135, 63,\n", + " 82, 51, 85, 147, 71, 82, 16, 0, 149, 116]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1511, 630, 1325, ..., 5980, 1103, 5196],\n", + " [ 208, 31, 90, ..., 5951, 6047, 6068]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 118, 134, 142, ..., 12, 9, 12],\n", + " [ 10, 55, 132, ..., 6482, 6633, 6594]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 68, 68, 68, ..., 6023, 6023, 6023],\n", + " [ 731, 744, 736, ..., 433, 377, 22]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 415, 266, 402, ..., 266, 266, 610],\n", + " [ 231, 333, 260, ..., 6149, 6144, 6119]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2049, 570, 527, ..., 5888, 2950, 3602],\n", + " [ 25, 179, 56, ..., 6620, 6646, 6621]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 68, 68, 68, ..., 6023, 6090, 6111],\n", + " [ 709, 2581, 2228, ..., 1878, 2781, 2826]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 59, 59, 59, ..., 6630, 6630, 6630],\n", + " [1230, 1696, 448, ..., 3727, 4391, 4397]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006691\n", + "sampling 0.006538\n", + "noi time: 0.001907\n", + "get_vertex_data call: 0.03773\n", + "noi group time: 0.002988\n", + "eoi_group_time: 0.015477\n", + "second half: 0.213499\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 19138, 31145, 4764, ..., 1117376, 1110493, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 19138, 31145, 4764, ..., 1117376, 1110493, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210816, 1210831, 1221611, ..., 1925031, 1930676, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210816, 1210831, 1221611, ..., 1925031, 1930676, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1137429, 1137204, 1141424, 1136238, 1140282, 1135935, 1135716,\n", + " 1135721, 1142198, 1140785, 1140788, 1141758, 1138335, 1136223, 1139462,\n", + " 1136971, 1141448, 1143610, 1149839, 1146982, 1137271, 1138930, 1143362,\n", + " 1143372, 1139241, 1146644, 1139615, 1148987, 1135381, 1148576, 1149216,\n", + " 1155685, 1143820, 1149644, 1147473, 1147483, 1147486, 1142881, 1153940,\n", + " 1144636, 1144632, 1149037, 1146996, 1153018, 1146472, 1152667, 1148557,\n", + " 1147099, 1150546, 1155014, 1155019, 1147202, 1147214, 1147211, 1150329,\n", + " 1134710, 1136268, 1140304, 1151549, 1151545, 1138112, 1135173, 1137181,\n", + " 1149460, 1149467, 1138354, 1138366, 1134735, 1140020, 1140027, 1140952,\n", + " 1135367, 1135202, 1135210, 1154739, 1134960, 1141036, 1134794, 1157443,\n", + " 1135967, 1138504, 1138508, 1137329, 1136178, 1144395, 1136718, 1157398,\n", + " 1157397, 1136590, 1136662, 1137441, 1137026, 1135265, 1139161, 1134841,\n", + " 1141702, 1135980, 1135583, 1135830, 1140240, 1138514, 1153099, 1137957,\n", + " 1158136, 1156965, 1137019, 1156909, 1138436, 1138440, 1138445, 1138457,\n", + " 1157190, 1136594, 1158386, 1158390, 1149328, 1135088, 1135095, 1156606,\n", + " 1147112, 1142611, 1135346, 1135625, 1145843, 1145845, 1148531, 1137109,\n", + " 1135762, 1135766, 1139855, 1141532, 1136449, 1139673, 1136094, 1134992,\n", + " 1134994, 1134771, 1152646, 1135789, 1158974, 1159012, 1159019, 1153539,\n", + " 1140034, 1139085, 1139933, 1137588, 1138148, 1138150, 1141964, 1153404,\n", + " 1134891, 1152042, 1152044, 1137734, 1137728, 1147317, 1134750, 1135549,\n", + " 1141088, 1141095, 1141098, 1144143, 1139889, 1145347, 1145358, 1156875,\n", + " 1141980, 1143767, 1137299, 1139025, 1139033, 1140003, 1142499, 1142501,\n", + " 1141681, 1141690, 1142347, 1154466, 1139436, 1136632, 1141224, 1163301,\n", + " 1143676, 1140598, 1140592, 1138785, 1139495, 1144650, 1136853, 1147850,\n", + " 1147855, 1164810, 1139798, 1142053, 1141821, 1143153, 1153666, 1145161,\n", + " 1143202, 1143212, 1158749, 1149111, 1148872, 1141472, 1137058, 1138709,\n", + " 1140110, 1142913, 1144596, 1141578, 1141579, 1140894, 1135322, 1135327,\n", + " 1144865, 1146201, 1158703, 1138539, 1138540, 1140501, 1137854, 1137841,\n", + " 1147153, 1141367, 1141664, 1149101, 1138293, 1143917, 1139510, 1144992,\n", + " 1145000, 1145001, 1140976, 1140990, 1147050, 1147047, 1145873, 1155835,\n", + " 1149876, 1143543, 1143551, 1152976, 1152980, 1135457, 1141925, 1144242,\n", + " 1145328, 1141841, 1137149, 1150692, 1143643, 1137571, 1137570, 1134856,\n", + " 1145980, 1143851, 1146008, 1146024, 1146025, 1138085, 1139990, 1143293,\n", + " 1143283, 1147543, 1147540, 1147282, 1142816, 1149155, 1140346, 1139408,\n", + " 1139417, 1143051, 1148414, 1136167, 1142586, 1136836, 1142149, 1143345,\n", + " 1144765, 1144766, 1144615, 1145808, 1140844, 1139979, 1135876, 1150755,\n", + " 1135813, 1150294, 1138013, 1146514, 1138024, 1143456, 1143457, 1144298,\n", + " 1144303, 1143937, 1143949, 1147521, 1147524, 1147523, 1140352, 1140364,\n", + " 1137990, 1143080, 1168921, 1166410, 1144725, 1147996, 1147999, 1134899,\n", + " 1134907, 1144010, 1147131, 1147240, 1148704, 1141319, 1146745, 1146749,\n", + " 1146751, 1148466, 1148468, 1148473, 1153701, 1149717, 1147025, 1147249,\n", + " 1147983, 1145011, 1145012, 1145009, 1158226, 1143931, 1147880, 1141140,\n", + " 1145240, 1145246, 1145751, 1142370, 1146144, 1138638, 1148391, 1138850,\n", + " 1151236, 1151242, 1151182, 1149258, 1151856, 1144526, 1141358, 1145833,\n", + " 1146887, 1150350, 1152013, 1154819, 1147807, 1151480, 1151473, 1152022,\n", + " 1152024, 1154271, 1145255, 1145260, 1139919, 1134869, 1147023, 1135805,\n", + " 1141949, 1146776, 1150843, 1151795, 1153574, 1147653, 1143552, 1148294,\n", + " 1148299, 1152070, 1152073, 1135084, 1154420, 1151361, 1152561, 1136247,\n", + " 1136252, 1157983, 1148734, 1148729, 1166312, 1143981, 1143888, 1143901,\n", + " 1143895, 1154196, 1141728, 1153192, 1145104, 1145111, 1168633, 1155543,\n", + " 1152920, 1148052, 1148058, 1143092, 1150356, 1155088, 1148084, 1147442,\n", + " 1151816, 1151906, 1148498, 1146565, 1141420, 1152784, 1151351, 1151352,\n", + " 1147743, 1145080, 1155067, 1146969, 1146975, 1149359, 1146623, 1144472,\n", + " 1146280, 1156320, 1156325, 1153027, 1153032, 1153038, 1145539, 1137746,\n", + " 1137755, 1146304, 1152622, 1155140, 1152057, 1136401, 1136410, 1149203,\n", + " 1152826, 1155330, 1155337, 1155331, 1154123, 1157842, 1157824, 1152682,\n", + " 1151617, 1145278, 1136134, 1136140, 1148927, 1152944, 1140459, 1144533,\n", + " 1152898, 1143988, 1173501, 1152341, 1156826, 1156816, 1153311, 1146704,\n", + " 1138275, 1138283, 1138279, 1152294, 1156001, 1136028, 1158704, 1152928,\n", + " 1154721, 1143483, 1156416, 1150099, 1153907, 1150150, 1142266, 1153688,\n", + " 1148040, 1155202, 1155218, 1149794, 1137048, 1148628, 1158530, 1137458,\n", + " 1157518, 1135698, 1135430, 1135434, 1150962, 1157547, 1158854, 1150877,\n", + " 1158916, 1154929, 1156505, 1152397, 1157064, 1157069, 1155408, 1137823,\n", + " 1143502, 1157565, 1150465, 1146854, 1142221, 1135730, 1135733, 1152179,\n", + " 1165703, 1150828, 1147810, 1147818, 1157784, 1158304, 1158306, 1158311,\n", + " 1151271, 1155441, 1155512, 1150130, 1150136, 1154530, 1154528, 1156919,\n", + " 1142755, 1142764, 1142752, 1142758, 1156271, 1151379, 1155122, 1149321,\n", + " 1149505, 1153486, 1155755, 1155757, 1151424, 1146913, 1145806, 1158096,\n", + " 1155628, 1156563, 1154555, 1158824, 1177965, 1158325, 1154036, 1148836,\n", + " 1148835, 1155646, 1153363, 1158355, 1143256, 1143263, 1143257, 1154642,\n", + " 1154652, 1154250, 1154240, 1156711, 1139627, 1160106, 1154902, 1154909,\n", + " 1150371, 1157439, 1150987, 1157928, 1160453, 1158578, 1156764, 1153786,\n", + " 1149904, 1137381, 1145682, 1145688, 1145694, 1164161, 1150661, 1158665,\n", + " 1157685, 1149145, 1159258, 1161108, 1140633, 1152209, 1152220, 1155433,\n", + " 1140374, 1155975, 1135196, 1156811, 1149700, 1159777, 1159441, 1160163,\n", + " 1136909, 1136896, 1158760, 1158882, 1140213, 1140221, 1159164, 1159158,\n", + " 1158815, 1158803, 1156778, 1136487, 1136494, 1136491, 1153632, 1153647,\n", + " 1156665, 1156490, 1153808, 1156278, 1136640, 1153834, 1153831, 1151140,\n", + " 1156516, 1165497, 1146123, 1146126, 1165786, 1188201, 1138110, 1158006,\n", + " 1155528, 1135661, 1164276, 1142666, 1162683, 1159042, 1159052, 1159071,\n", + " 1155197, 1160563, 1153052, 1153045, 1171551, 1173007, 1163072, 1155763,\n", + " 1156235, 1144156, 1142870, 1156107, 1165244, 1150046, 1149063, 1145948,\n", + " 1154297, 1153519, 1158680, 1164006, 1164012, 1149956, 1139592, 1139286,\n", + " 1157238, 1148771, 1146063, 1140130, 1158868, 1170403, 1140641, 1140650,\n", + " 1140643, 1148600, 1159641, 1144509, 1155816, 1165047, 1158643, 1158653,\n", + " 1159025, 1159032, 1155588, 1188672, 1156589, 1168426, 1144979, 1149008,\n", + " 1161240, 1144750, 1152776, 1166881, 1155054, 1141468, 1141471, 1147426,\n", + " 1147427, 1147436, 1179982, 1156739, 1160849, 1157955, 1166591, 1150648,\n", + " 1171040, 1144810, 1144812, 1144808, 1153268, 1135567, 1165716, 1164750,\n", + " 1156293, 1156303, 1166924, 1145228, 1169281, 1169282, 1155324, 1166462,\n", + " 1144972, 1144973, 1142136, 1165686, 1143028, 1145447, 1147355, 1148124,\n", + " 1147723, 1145892, 1145902, 1168659, 1163965, 1152203, 1143397, 1170980,\n", + " 1158724, 1154070, 1154075, 1147339, 1170758, 1192410, 1179496, 1151598,\n", + " 1149125, 1154915, 1167817, 1166653, 1169298, 1155172, 1155180, 1150515,\n", + " 1150518, 1156119, 1145533, 1145531, 1144346, 1144336, 1157534, 1154670,\n", + " 1157331, 1177717, 1138129, 1141051, 1151668, 1169359, 1154353, 1154354,\n", + " 1154352, 1147502, 1138613, 1149680, 1158611, 1158623, 1158062, 1172877,\n", + " 1149846, 1157385, 1160135, 1155494, 1152353, 1165528, 1169929, 1161130,\n", + " 1149402, 1148667, 1148666, 1173307, 1169144, 1152150, 1153759, 1153754,\n", + " 1159655, 1151696, 1157158, 1157153, 1155459, 1157373, 1147711, 1147707,\n", + " 1148131, 1169913, 1147929, 1157593, 1157595, 1169038, 1167712, 1155739,\n", + " 1166016, 1160152, 1174845, 1170555, 1166684, 1170874, 1171823, 1182131,\n", + " 1150234, 1154151, 1154148, 1167517, 1149169, 1149176, 1149173, 1172537,\n", + " 1181860, 1186117, 1143279, 1167658, 1168481, 1182423, 1143420, 1166299,\n", + " 1174333, 1153803, 1153794, 1153141, 1178914, 1155257, 1157792, 1157795,\n", + " 1172550, 1171623, 1157126, 1157124, 1153898, 1145586, 1188790, 1191749,\n", + " 1162403, 1145626, 1154834, 1180383, 1157483, 1161067, 1149753, 1149755,\n", + " 1153609, 1157761, 1155990, 1179776, 1181149, 1158512, 1158933, 1158940,\n", + " 1158374, 1155892, 1155899, 1160377, 1183068, 1140393, 1140399, 1168273,\n", + " 1188249, 1187272, 1186278, 1162253, 1165146, 1164437, 1182337, 1188137,\n", + " 1165078, 1188074, 1147180, 1147172, 1147182, 1156162, 1192736, 1139828,\n", + " 1139831, 1139837, 1154812, 1156055, 1187231, 1182834, 1151972, 1173058,\n", + " 1149544, 1187055, 1191964, 1188172, 1141001, 1184493, 1188360, 1178065,\n", + " 1187685, 1151774, 1193774, 1152117, 1169707, 1166841, 1192567, 1170128,\n", + " 1167094, 1161188, 1156681, 1172423, 1158064, 1158067, 1181616, 1145395,\n", + " 1185848, 1187596, 1194419, 1155962, 1176833, 1179769, 1182191, 1189372,\n", + " 1182660], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1137429, 1137204, 1141424, 1136238, 1140282, 1135935, 1135716,\n", + " 1135721, 1142198, 1140785, 1140788, 1141758, 1138335, 1136223, 1139462,\n", + " 1136971, 1141448, 1143610, 1149839, 1146982, 1137271, 1138930, 1143362,\n", + " 1143372, 1139241, 1146644, 1139615, 1148987, 1135381, 1148576, 1149216,\n", + " 1155685, 1143820, 1149644, 1147473, 1147483, 1147486, 1142881, 1153940,\n", + " 1144636, 1144632, 1149037, 1146996, 1153018, 1146472, 1152667, 1148557,\n", + " 1147099, 1150546, 1155014, 1155019, 1147202, 1147214, 1147211, 1150329,\n", + " 1134710, 1136268, 1140304, 1151549, 1151545, 1138112, 1135173, 1137181,\n", + " 1149460, 1149467, 1138354, 1138366, 1134735, 1140020, 1140027, 1140952,\n", + " 1135367, 1135202, 1135210, 1154739, 1134960, 1141036, 1134794, 1157443,\n", + " 1135967, 1138504, 1138508, 1137329, 1136178, 1144395, 1136718, 1157398,\n", + " 1157397, 1136590, 1136662, 1137441, 1137026, 1135265, 1139161, 1134841,\n", + " 1141702, 1135980, 1135583, 1135830, 1140240, 1138514, 1153099, 1137957,\n", + " 1158136, 1156965, 1137019, 1156909, 1138436, 1138440, 1138445, 1138457,\n", + " 1157190, 1136594, 1158386, 1158390, 1149328, 1135088, 1135095, 1156606,\n", + " 1147112, 1142611, 1135346, 1135625, 1145843, 1145845, 1148531, 1137109,\n", + " 1135762, 1135766, 1139855, 1141532, 1136449, 1139673, 1136094, 1134992,\n", + " 1134994, 1134771, 1152646, 1135789, 1158974, 1159012, 1159019, 1153539,\n", + " 1140034, 1139085, 1139933, 1137588, 1138148, 1138150, 1141964, 1153404,\n", + " 1134891, 1152042, 1152044, 1137734, 1137728, 1147317, 1134750, 1135549,\n", + " 1141088, 1141095, 1141098, 1144143, 1139889, 1145347, 1145358, 1156875,\n", + " 1141980, 1143767, 1137299, 1139025, 1139033, 1140003, 1142499, 1142501,\n", + " 1141681, 1141690, 1142347, 1154466, 1139436, 1136632, 1141224, 1163301,\n", + " 1143676, 1140598, 1140592, 1138785, 1139495, 1144650, 1136853, 1147850,\n", + " 1147855, 1164810, 1139798, 1142053, 1141821, 1143153, 1153666, 1145161,\n", + " 1143202, 1143212, 1158749, 1149111, 1148872, 1141472, 1137058, 1138709,\n", + " 1140110, 1142913, 1144596, 1141578, 1141579, 1140894, 1135322, 1135327,\n", + " 1144865, 1146201, 1158703, 1138539, 1138540, 1140501, 1137854, 1137841,\n", + " 1147153, 1141367, 1141664, 1149101, 1138293, 1143917, 1139510, 1144992,\n", + " 1145000, 1145001, 1140976, 1140990, 1147050, 1147047, 1145873, 1155835,\n", + " 1149876, 1143543, 1143551, 1152976, 1152980, 1135457, 1141925, 1144242,\n", + " 1145328, 1141841, 1137149, 1150692, 1143643, 1137571, 1137570, 1134856,\n", + " 1145980, 1143851, 1146008, 1146024, 1146025, 1138085, 1139990, 1143293,\n", + " 1143283, 1147543, 1147540, 1147282, 1142816, 1149155, 1140346, 1139408,\n", + " 1139417, 1143051, 1148414, 1136167, 1142586, 1136836, 1142149, 1143345,\n", + " 1144765, 1144766, 1144615, 1145808, 1140844, 1139979, 1135876, 1150755,\n", + " 1135813, 1150294, 1138013, 1146514, 1138024, 1143456, 1143457, 1144298,\n", + " 1144303, 1143937, 1143949, 1147521, 1147524, 1147523, 1140352, 1140364,\n", + " 1137990, 1143080, 1168921, 1166410, 1144725, 1147996, 1147999, 1134899,\n", + " 1134907, 1144010, 1147131, 1147240, 1148704, 1141319, 1146745, 1146749,\n", + " 1146751, 1148466, 1148468, 1148473, 1153701, 1149717, 1147025, 1147249,\n", + " 1147983, 1145011, 1145012, 1145009, 1158226, 1143931, 1147880, 1141140,\n", + " 1145240, 1145246, 1145751, 1142370, 1146144, 1138638, 1148391, 1138850,\n", + " 1151236, 1151242, 1151182, 1149258, 1151856, 1144526, 1141358, 1145833,\n", + " 1146887, 1150350, 1152013, 1154819, 1147807, 1151480, 1151473, 1152022,\n", + " 1152024, 1154271, 1145255, 1145260, 1139919, 1134869, 1147023, 1135805,\n", + " 1141949, 1146776, 1150843, 1151795, 1153574, 1147653, 1143552, 1148294,\n", + " 1148299, 1152070, 1152073, 1135084, 1154420, 1151361, 1152561, 1136247,\n", + " 1136252, 1157983, 1148734, 1148729, 1166312, 1143981, 1143888, 1143901,\n", + " 1143895, 1154196, 1141728, 1153192, 1145104, 1145111, 1168633, 1155543,\n", + " 1152920, 1148052, 1148058, 1143092, 1150356, 1155088, 1148084, 1147442,\n", + " 1151816, 1151906, 1148498, 1146565, 1141420, 1152784, 1151351, 1151352,\n", + " 1147743, 1145080, 1155067, 1146969, 1146975, 1149359, 1146623, 1144472,\n", + " 1146280, 1156320, 1156325, 1153027, 1153032, 1153038, 1145539, 1137746,\n", + " 1137755, 1146304, 1152622, 1155140, 1152057, 1136401, 1136410, 1149203,\n", + " 1152826, 1155330, 1155337, 1155331, 1154123, 1157842, 1157824, 1152682,\n", + " 1151617, 1145278, 1136134, 1136140, 1148927, 1152944, 1140459, 1144533,\n", + " 1152898, 1143988, 1173501, 1152341, 1156826, 1156816, 1153311, 1146704,\n", + " 1138275, 1138283, 1138279, 1152294, 1156001, 1136028, 1158704, 1152928,\n", + " 1154721, 1143483, 1156416, 1150099, 1153907, 1150150, 1142266, 1153688,\n", + " 1148040, 1155202, 1155218, 1149794, 1137048, 1148628, 1158530, 1137458,\n", + " 1157518, 1135698, 1135430, 1135434, 1150962, 1157547, 1158854, 1150877,\n", + " 1158916, 1154929, 1156505, 1152397, 1157064, 1157069, 1155408, 1137823,\n", + " 1143502, 1157565, 1150465, 1146854, 1142221, 1135730, 1135733, 1152179,\n", + " 1165703, 1150828, 1147810, 1147818, 1157784, 1158304, 1158306, 1158311,\n", + " 1151271, 1155441, 1155512, 1150130, 1150136, 1154530, 1154528, 1156919,\n", + " 1142755, 1142764, 1142752, 1142758, 1156271, 1151379, 1155122, 1149321,\n", + " 1149505, 1153486, 1155755, 1155757, 1151424, 1146913, 1145806, 1158096,\n", + " 1155628, 1156563, 1154555, 1158824, 1177965, 1158325, 1154036, 1148836,\n", + " 1148835, 1155646, 1153363, 1158355, 1143256, 1143263, 1143257, 1154642,\n", + " 1154652, 1154250, 1154240, 1156711, 1139627, 1160106, 1154902, 1154909,\n", + " 1150371, 1157439, 1150987, 1157928, 1160453, 1158578, 1156764, 1153786,\n", + " 1149904, 1137381, 1145682, 1145688, 1145694, 1164161, 1150661, 1158665,\n", + " 1157685, 1149145, 1159258, 1161108, 1140633, 1152209, 1152220, 1155433,\n", + " 1140374, 1155975, 1135196, 1156811, 1149700, 1159777, 1159441, 1160163,\n", + " 1136909, 1136896, 1158760, 1158882, 1140213, 1140221, 1159164, 1159158,\n", + " 1158815, 1158803, 1156778, 1136487, 1136494, 1136491, 1153632, 1153647,\n", + " 1156665, 1156490, 1153808, 1156278, 1136640, 1153834, 1153831, 1151140,\n", + " 1156516, 1165497, 1146123, 1146126, 1165786, 1188201, 1138110, 1158006,\n", + " 1155528, 1135661, 1164276, 1142666, 1162683, 1159042, 1159052, 1159071,\n", + " 1155197, 1160563, 1153052, 1153045, 1171551, 1173007, 1163072, 1155763,\n", + " 1156235, 1144156, 1142870, 1156107, 1165244, 1150046, 1149063, 1145948,\n", + " 1154297, 1153519, 1158680, 1164006, 1164012, 1149956, 1139592, 1139286,\n", + " 1157238, 1148771, 1146063, 1140130, 1158868, 1170403, 1140641, 1140650,\n", + " 1140643, 1148600, 1159641, 1144509, 1155816, 1165047, 1158643, 1158653,\n", + " 1159025, 1159032, 1155588, 1188672, 1156589, 1168426, 1144979, 1149008,\n", + " 1161240, 1144750, 1152776, 1166881, 1155054, 1141468, 1141471, 1147426,\n", + " 1147427, 1147436, 1179982, 1156739, 1160849, 1157955, 1166591, 1150648,\n", + " 1171040, 1144810, 1144812, 1144808, 1153268, 1135567, 1165716, 1164750,\n", + " 1156293, 1156303, 1166924, 1145228, 1169281, 1169282, 1155324, 1166462,\n", + " 1144972, 1144973, 1142136, 1165686, 1143028, 1145447, 1147355, 1148124,\n", + " 1147723, 1145892, 1145902, 1168659, 1163965, 1152203, 1143397, 1170980,\n", + " 1158724, 1154070, 1154075, 1147339, 1170758, 1192410, 1179496, 1151598,\n", + " 1149125, 1154915, 1167817, 1166653, 1169298, 1155172, 1155180, 1150515,\n", + " 1150518, 1156119, 1145533, 1145531, 1144346, 1144336, 1157534, 1154670,\n", + " 1157331, 1177717, 1138129, 1141051, 1151668, 1169359, 1154353, 1154354,\n", + " 1154352, 1147502, 1138613, 1149680, 1158611, 1158623, 1158062, 1172877,\n", + " 1149846, 1157385, 1160135, 1155494, 1152353, 1165528, 1169929, 1161130,\n", + " 1149402, 1148667, 1148666, 1173307, 1169144, 1152150, 1153759, 1153754,\n", + " 1159655, 1151696, 1157158, 1157153, 1155459, 1157373, 1147711, 1147707,\n", + " 1148131, 1169913, 1147929, 1157593, 1157595, 1169038, 1167712, 1155739,\n", + " 1166016, 1160152, 1174845, 1170555, 1166684, 1170874, 1171823, 1182131,\n", + " 1150234, 1154151, 1154148, 1167517, 1149169, 1149176, 1149173, 1172537,\n", + " 1181860, 1186117, 1143279, 1167658, 1168481, 1182423, 1143420, 1166299,\n", + " 1174333, 1153803, 1153794, 1153141, 1178914, 1155257, 1157792, 1157795,\n", + " 1172550, 1171623, 1157126, 1157124, 1153898, 1145586, 1188790, 1191749,\n", + " 1162403, 1145626, 1154834, 1180383, 1157483, 1161067, 1149753, 1149755,\n", + " 1153609, 1157761, 1155990, 1179776, 1181149, 1158512, 1158933, 1158940,\n", + " 1158374, 1155892, 1155899, 1160377, 1183068, 1140393, 1140399, 1168273,\n", + " 1188249, 1187272, 1186278, 1162253, 1165146, 1164437, 1182337, 1188137,\n", + " 1165078, 1188074, 1147180, 1147172, 1147182, 1156162, 1192736, 1139828,\n", + " 1139831, 1139837, 1154812, 1156055, 1187231, 1182834, 1151972, 1173058,\n", + " 1149544, 1187055, 1191964, 1188172, 1141001, 1184493, 1188360, 1178065,\n", + " 1187685, 1151774, 1193774, 1152117, 1169707, 1166841, 1192567, 1170128,\n", + " 1167094, 1161188, 1156681, 1172423, 1158064, 1158067, 1181616, 1145395,\n", + " 1185848, 1187596, 1194419, 1155962, 1176833, 1179769, 1182191, 1189372,\n", + " 1182660], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195397, 1198248, 1197219, 1199282, 1198449, 1202243, 1202255, 1196195,\n", + " 1198844, 1201577, 1194626, 1197777, 1199252, 1201016, 1198633, 1198690,\n", + " 1198557, 1198559, 1197376, 1194866, 1194748, 1194770, 1195488, 1196631,\n", + " 1195263, 1197921, 1197924, 1199135, 1201989, 1194880, 1195888, 1195896,\n", + " 1202902, 1199171, 1195740, 1197856, 1197867, 1196989, 1196521, 1194752,\n", + " 1198983, 1195313, 1196840, 1195571, 1196715, 1199810, 1195143, 1195216,\n", + " 1195265, 1199379, 1195541, 1197253, 1197409, 1198273, 1200949, 1200959,\n", + " 1199062, 1199688, 1199628, 1199803, 1197676, 1197990, 1200873, 1199152,\n", + " 1198321, 1199676, 1194786, 1201511, 1197682, 1197686, 1196508, 1200668,\n", + " 1197601, 1197603, 1196727, 1195771, 1202618, 1200155, 1201547, 1197214,\n", + " 1200507, 1199445, 1198797, 1201079, 1200913, 1201405, 1202641, 1201492,\n", + " 1201737, 1200526, 1202055, 1202978, 1202138, 1196888, 1200692, 1199907,\n", + " 1201442, 1201029, 1199979, 1195876, 1201862, 1201871, 1201590, 1199929,\n", + " 1201800, 1200398, 1200794, 1196071, 1199606, 1197334, 1198929, 1195177,\n", + " 1195379, 1197822, 1196480, 1201499, 1199405, 1198824, 1197731, 1200437,\n", + " 1201003, 1195064, 1197652, 1200707, 1197335, 1203300, 1197035, 1197039,\n", + " 1195163, 1203162], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195397, 1198248, 1197219, 1199282, 1198449, 1202243, 1202255, 1196195,\n", + " 1198844, 1201577, 1194626, 1197777, 1199252, 1201016, 1198633, 1198690,\n", + " 1198557, 1198559, 1197376, 1194866, 1194748, 1194770, 1195488, 1196631,\n", + " 1195263, 1197921, 1197924, 1199135, 1201989, 1194880, 1195888, 1195896,\n", + " 1202902, 1199171, 1195740, 1197856, 1197867, 1196989, 1196521, 1194752,\n", + " 1198983, 1195313, 1196840, 1195571, 1196715, 1199810, 1195143, 1195216,\n", + " 1195265, 1199379, 1195541, 1197253, 1197409, 1198273, 1200949, 1200959,\n", + " 1199062, 1199688, 1199628, 1199803, 1197676, 1197990, 1200873, 1199152,\n", + " 1198321, 1199676, 1194786, 1201511, 1197682, 1197686, 1196508, 1200668,\n", + " 1197601, 1197603, 1196727, 1195771, 1202618, 1200155, 1201547, 1197214,\n", + " 1200507, 1199445, 1198797, 1201079, 1200913, 1201405, 1202641, 1201492,\n", + " 1201737, 1200526, 1202055, 1202978, 1202138, 1196888, 1200692, 1199907,\n", + " 1201442, 1201029, 1199979, 1195876, 1201862, 1201871, 1201590, 1199929,\n", + " 1201800, 1200398, 1200794, 1196071, 1199606, 1197334, 1198929, 1195177,\n", + " 1195379, 1197822, 1196480, 1201499, 1199405, 1198824, 1197731, 1200437,\n", + " 1201003, 1195064, 1197652, 1200707, 1197335, 1203300, 1197035, 1197039,\n", + " 1195163, 1203162], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 0.1281, 0.0232, 0.6368, ..., 0.1247, -0.0017, -0.0041],\n", + " [ 0.1600, 0.0661, 0.8028, ..., 0.1579, -0.0019, -0.0052],\n", + " [ 0.0956, 0.0155, 0.5924, ..., 0.1581, -0.0021, -0.0038],\n", + " ...,\n", + " [ 0.0824, 0.0179, 0.6169, ..., 0.1580, -0.0021, -0.0040],\n", + " [ 0.0900, 0.0355, 0.6042, ..., 0.1637, -0.0022, -0.0040],\n", + " [ 0.1106, 0.0120, 0.6370, ..., 0.1316, -0.0017, -0.0042]],\n", + " device='cuda:0'), 'paper': tensor([[ 4.8223e-01, -8.0554e-03, 1.7704e+00, ..., -3.5806e-03,\n", + " -1.0070e-02, -7.7288e-03],\n", + " [ 1.5183e+00, -1.5777e-02, 3.3986e+00, ..., -9.8926e-03,\n", + " -2.7720e-02, 2.9521e-01],\n", + " [ 8.0327e-01, -5.2254e-03, 9.8283e-01, ..., -6.1775e-03,\n", + " -1.2248e-02, 1.3175e-01],\n", + " ...,\n", + " [ 1.5156e+00, 6.9658e-01, 1.9207e+00, ..., 5.3357e-02,\n", + " -1.7876e-02, 1.1375e+00],\n", + " [ 7.8748e-01, -6.0274e-03, 9.4865e-01, ..., -5.5414e-03,\n", + " -1.5395e-02, 4.9695e-01],\n", + " [ 2.1718e+00, -2.0330e-02, 3.0112e+00, ..., -2.9252e-03,\n", + " -3.6684e-02, 2.2896e+00]], device='cuda:0'), 'author': tensor([[-2.5083e-03, 1.7450e-01, 2.8274e-01, ..., 1.2572e+00,\n", + " -4.7181e-03, -2.0848e-03],\n", + " [-1.3345e-03, 1.4045e-01, 2.0687e-01, ..., 1.4594e+00,\n", + " -8.2530e-04, 1.2362e-01],\n", + " [-1.3096e-03, 1.7210e-01, 2.2206e-01, ..., 1.4650e+00,\n", + " -3.9159e-04, 1.7801e-01],\n", + " ...,\n", + " [-1.4783e-03, 1.4838e-01, 2.7012e-01, ..., 1.3806e+00,\n", + " -2.2894e-03, 6.5670e-02],\n", + " [-1.3563e-03, 2.6995e-01, 3.5611e-01, ..., 1.2050e+00,\n", + " -3.7868e-03, -3.1792e-03],\n", + " [-1.0154e-03, 7.6715e-02, 2.3650e-01, ..., 1.5429e+00,\n", + " 2.2793e-02, 2.3743e-01]], device='cuda:0'), 'field_of_study': tensor([[ 8.1340e-03, 5.2010e-01, 1.9217e-01, ..., -5.7421e-03,\n", + " 2.0423e-01, 6.6255e-02],\n", + " [-9.7573e-04, 4.5509e-01, 2.5626e-01, ..., -7.5471e-03,\n", + " 1.6370e-01, 2.7345e-01],\n", + " [-8.0247e-04, 4.1642e-01, 2.5082e-01, ..., -5.7798e-03,\n", + " 1.0188e-01, 1.9331e-01],\n", + " ...,\n", + " [-8.6413e-05, 4.2799e-01, 1.3191e-01, ..., -5.8494e-03,\n", + " 1.3934e-01, 1.4121e-01],\n", + " [-1.1355e-03, 4.3201e-01, 2.1821e-01, ..., -7.2296e-03,\n", + " 1.7371e-01, 3.2641e-01],\n", + " [-7.3585e-04, 4.8931e-01, 1.4469e-01, ..., -7.3464e-03,\n", + " 2.1492e-01, 2.2633e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 102, 180, 61, 36, 134, 364, 477, 477, 373, 373, 373, 437,\n", + " 437, 390, 390, 390, 532, 453, 760, 760, 781, 781, 622, 805,\n", + " 754, 898, 777, 831, 831, 831, 1004, 829, 1335, 1176, 1261, 1186,\n", + " 1511, 1511, 1501, 1501, 1477, 1384, 1395, 1671, 1671, 1536, 1380, 1495,\n", + " 1495, 1495, 1587, 1744, 1656, 1710, 1857, 1767, 1778, 1763, 1902, 1902,\n", + " 2159, 1944, 1956, 2101, 2101, 2115, 2115, 2115, 2016, 2082, 2082, 1988,\n", + " 2185, 1891, 2114, 2169, 2260, 2061, 2143, 2223, 2061, 2234, 2296, 2288,\n", + " 2374, 2394, 2503, 2509, 2701, 2558, 2558, 2457, 2555, 2542, 2542, 2637,\n", + " 2817, 2790, 2790, 2790, 2672, 2943, 3021, 2870, 2847, 2847, 2869, 2832,\n", + " 3034, 2932, 3138, 3138, 3333, 3311, 3286, 3234, 3471, 3471, 3428, 3641,\n", + " 3699, 3630, 3630, 3534, 3534, 3764, 3867, 3942, 3928, 3904, 3950, 3910,\n", + " 3962, 3962, 3962, 3962, 3927, 4062, 4199, 4199, 4230, 4294, 4294, 4294,\n", + " 4423, 4363, 4396, 4396, 4570, 4750, 4587, 4559, 4568, 4700, 4596, 4584,\n", + " 4763, 4830, 4796, 4676, 5021, 4786, 5122, 5028, 4922, 5106, 5106, 5053,\n", + " 5090, 5039, 5042, 5042, 5093, 4995, 5147, 5189, 5055, 5203, 5502, 5385,\n", + " 5502, 5576, 5682, 5774],\n", + " [ 3, 94, 7, 6, 69, 74, 27, 125, 98, 68, 2, 88,\n", + " 3, 113, 3, 127, 3, 37, 15, 89, 67, 88, 96, 36,\n", + " 61, 30, 8, 13, 100, 86, 98, 3, 115, 16, 12, 99,\n", + " 121, 40, 87, 28, 24, 97, 41, 122, 23, 117, 16, 57,\n", + " 89, 62, 85, 75, 104, 6, 60, 120, 44, 12, 91, 10,\n", + " 109, 60, 12, 116, 78, 119, 70, 14, 56, 116, 22, 74,\n", + " 93, 103, 64, 76, 127, 1, 97, 33, 60, 79, 59, 95,\n", + " 10, 39, 42, 82, 29, 126, 123, 116, 31, 111, 20, 82,\n", + " 5, 102, 25, 10, 84, 46, 106, 45, 90, 3, 12, 47,\n", + " 84, 9, 108, 18, 64, 128, 128, 128, 4, 74, 27, 55,\n", + " 96, 83, 80, 39, 52, 60, 32, 17, 26, 73, 65, 39,\n", + " 74, 84, 129, 118, 63, 39, 43, 0, 16, 30, 105, 50,\n", + " 114, 99, 48, 112, 38, 46, 107, 21, 11, 96, 76, 58,\n", + " 74, 38, 34, 92, 49, 3, 81, 51, 66, 88, 9, 101,\n", + " 54, 122, 72, 8, 19, 3, 23, 74, 43, 53, 110, 124,\n", + " 71, 35, 77, 104]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 319, 3350, 2125, ..., 521, 1943, 4704],\n", + " [ 259, 211, 310, ..., 8028, 8104, 8005]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 120, 68, 31, ..., 3, 3, 104],\n", + " [ 126, 40, 107, ..., 5735, 5538, 5680]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 34, 285, 259, ..., 7861, 8010, 8010],\n", + " [ 905, 78, 266, ..., 650, 437, 246]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 671, 798, 316, ..., 246, 135, 225],\n", + " [ 121, 230, 95, ..., 7978, 8096, 8103]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2561, 6385, 6345, ..., 5267, 5267, 7674],\n", + " [ 151, 183, 43, ..., 5761, 5732, 5728]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 34, 319, 319, ..., 8010, 8010, 8010],\n", + " [3775, 259, 2920, ..., 4093, 4578, 4882]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 168, 168, 168, ..., 5682, 5682, 5682],\n", + " [3210, 3262, 3324, ..., 3694, 3849, 3756]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006472\n", + "sampling 0.00632\n", + "noi time: 0.001939\n", + "get_vertex_data call: 0.036513\n", + "noi group time: 0.003521\n", + "eoi_group_time: 0.016074\n", + "second half: 0.214117\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 17533, 31145, 24187, ..., 1100728, 1119043, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 17533, 31145, 24187, ..., 1100728, 1119043, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208576, 1227503, 1224370, ..., 1929320, 1931115, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208576, 1227503, 1224370, ..., 1929320, 1931115, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1136228, 1136342, 1135933, 1135716, 1135726, 1137791, 1140785,\n", + " 1139698, 1141756, 1141758, 1137506, 1138335, 1136219, 1140297, 1136965,\n", + " 1136969, 1136971, 1141443, 1146803, 1151164, 1149831, 1149834, 1139811,\n", + " 1145992, 1143363, 1139243, 1150395, 1139958, 1150506, 1136959, 1155689,\n", + " 1143820, 1149644, 1149646, 1147483, 1142894, 1153940, 1144636, 1135262,\n", + " 1146995, 1153012, 1148346, 1146661, 1146472, 1136125, 1152666, 1153231,\n", + " 1147095, 1136683, 1136685, 1150329, 1134710, 1146376, 1138745, 1138749,\n", + " 1134658, 1151547, 1138112, 1135183, 1137181, 1162460, 1135367, 1135202,\n", + " 1135210, 1140767, 1137798, 1134794, 1137329, 1137330, 1136178, 1157102,\n", + " 1144395, 1136826, 1137529, 1136712, 1152376, 1137441, 1135274, 1156159,\n", + " 1148481, 1139161, 1135576, 1135583, 1135827, 1135828, 1135670, 1138514,\n", + " 1138525, 1137957, 1137959, 1158136, 1136982, 1137295, 1139878, 1138440,\n", + " 1138461, 1158390, 1147112, 1147119, 1142611, 1160819, 1145842, 1145843,\n", + " 1145852, 1148531, 1139844, 1136457, 1139673, 1142255, 1165579, 1136085,\n", + " 1136092, 1134992, 1134770, 1136555, 1152646, 1158974, 1142909, 1159009,\n", + " 1144410, 1153543, 1153548, 1140034, 1139084, 1138148, 1141964, 1155661,\n", + " 1140557, 1152042, 1152044, 1137728, 1147317, 1147322, 1146222, 1134750,\n", + " 1141098, 1141100, 1144138, 1149001, 1141971, 1136392, 1154860, 1137299,\n", + " 1162713, 1143225, 1139025, 1140000, 1149979, 1146844, 1135865, 1139436,\n", + " 1136637, 1161173, 1136917, 1144237, 1140607, 1141161, 1139495, 1134987,\n", + " 1142056, 1142053, 1146799, 1142093, 1145161, 1158749, 1139190, 1142913,\n", + " 1137651, 1144596, 1136864, 1141578, 1135327, 1141398, 1150906, 1150910,\n", + " 1137374, 1158698, 1138539, 1137849, 1137854, 1147153, 1141365, 1141367,\n", + " 1149101, 1144279, 1139510, 1140990, 1146695, 1141560, 1141565, 1143692,\n", + " 1147050, 1147047, 1145876, 1155835, 1152976, 1152980, 1160251, 1135457,\n", + " 1138995, 1139007, 1141925, 1144250, 1144242, 1140689, 1137571, 1134851,\n", + " 1145974, 1142111, 1146024, 1146025, 1150606, 1138085, 1146129, 1154323,\n", + " 1154328, 1154332, 1149928, 1149933, 1147084, 1139990, 1143294, 1147543,\n", + " 1147282, 1142816, 1136330, 1140341, 1147461, 1147470, 1142637, 1148003,\n", + " 1146080, 1136160, 1142591, 1138924, 1157713, 1136836, 1136845, 1141289,\n", + " 1139329, 1139341, 1144779, 1144778, 1138226, 1142153, 1142158, 1143345,\n", + " 1144765, 1140844, 1139975, 1135819, 1146514, 1146523, 1143456, 1143460,\n", + " 1143457, 1143937, 1140829, 1146631, 1146636, 1146634, 1140364, 1137990,\n", + " 1143075, 1143082, 1148966, 1147984, 1147988, 1147995, 1147999, 1134902,\n", + " 1134907, 1139252, 1139255, 1139258, 1147120, 1147131, 1145467, 1148704,\n", + " 1148719, 1141836, 1148468, 1148476, 1149725, 1147025, 1147257, 1145017,\n", + " 1147196, 1158226, 1143922, 1141144, 1145238, 1145240, 1145751, 1151242,\n", + " 1148214, 1148940, 1147966, 1156468, 1149791, 1149777, 1144514, 1144203,\n", + " 1165252, 1151480, 1151485, 1140409, 1149535, 1150127, 1152813, 1141949,\n", + " 1141279, 1144828, 1148744, 1153574, 1154985, 1147653, 1149412, 1148294,\n", + " 1148300, 1152070, 1148612, 1154430, 1154420, 1148180, 1139718, 1146682,\n", + " 1138876, 1152435, 1148720, 1148729, 1147627, 1146559, 1139936, 1153182,\n", + " 1154202, 1141739, 1153124, 1153192, 1153188, 1159828, 1159837, 1150935,\n", + " 1152877, 1143092, 1147446, 1147442, 1151811, 1135303, 1148498, 1136002,\n", + " 1150637, 1151348, 1151351, 1148949, 1146969, 1156402, 1147391, 1146623,\n", + " 1151691, 1152100, 1153030, 1150086, 1145539, 1137746, 1146307, 1146304,\n", + " 1152612, 1140521, 1149203, 1152826, 1155337, 1154123, 1155356, 1152673,\n", + " 1151617, 1136131, 1136132, 1148916, 1152958, 1140451, 1144533, 1138986,\n", + " 1143995, 1152336, 1152341, 1146816, 1153311, 1138276, 1138280, 1138281,\n", + " 1136025, 1136028, 1152928, 1150099, 1150164, 1144016, 1148040, 1155202,\n", + " 1152601, 1149792, 1137047, 1137048, 1148628, 1158530, 1158540, 1148369,\n", + " 1137458, 1148253, 1159223, 1153085, 1135438, 1157547, 1158854, 1158860,\n", + " 1158862, 1150869, 1156505, 1152833, 1145191, 1139473, 1151257, 1151262,\n", + " 1157558, 1150465, 1160258, 1142221, 1138830, 1152179, 1152737, 1156935,\n", + " 1143010, 1139525, 1158304, 1158308, 1158311, 1151273, 1155441, 1155452,\n", + " 1137970, 1153354, 1150130, 1150136, 1140877, 1154529, 1154539, 1156913,\n", + " 1142755, 1142758, 1154226, 1151379, 1155375, 1155122, 1152527, 1157183,\n", + " 1153481, 1155749, 1151424, 1146924, 1145793, 1156463, 1158096, 1168226,\n", + " 1154555, 1136476, 1158824, 1153721, 1148836, 1148835, 1155646, 1160958,\n", + " 1161389, 1154644, 1154645, 1154240, 1163375, 1162190, 1156711, 1139627,\n", + " 1151317, 1154909, 1163127, 1143189, 1143531, 1150371, 1144712, 1141627,\n", + " 1141620, 1150982, 1155293, 1143517, 1159629, 1157934, 1158123, 1158578,\n", + " 1156762, 1159001, 1153786, 1158193, 1137381, 1159116, 1164319, 1154014,\n", + " 1135601, 1135602, 1148147, 1157685, 1149145, 1159253, 1140634, 1152209,\n", + " 1152215, 1140380, 1140381, 1155884, 1144843, 1155971, 1155975, 1136896,\n", + " 1158759, 1158886, 1140218, 1161270, 1159164, 1158285, 1152463, 1151615,\n", + " 1161625, 1156665, 1152136, 1152143, 1152131, 1157261, 1153808, 1136640,\n", + " 1134757, 1157860, 1158545, 1158558, 1165787, 1138110, 1144582, 1150011,\n", + " 1155535, 1161539, 1142495, 1163456, 1164276, 1142666, 1159052, 1157939,\n", + " 1160563, 1162044, 1153052, 1153042, 1153045, 1172995, 1163072, 1167707,\n", + " 1156381, 1144158, 1166256, 1166258, 1142865, 1159370, 1153842, 1138384,\n", + " 1150046, 1149063, 1151020, 1153514, 1153519, 1147300, 1158685, 1171986,\n", + " 1146870, 1161652, 1164997, 1157600, 1138161, 1156795, 1163381, 1139286,\n", + " 1148021, 1166073, 1148771, 1140735, 1157357, 1146056, 1146063, 1164423,\n", + " 1171249, 1164048, 1158878, 1170415, 1169493, 1140643, 1148600, 1148603,\n", + " 1148607, 1172725, 1159646, 1155816, 1163210, 1158653, 1159032, 1169108,\n", + " 1144492, 1155588, 1165989, 1138674, 1148567, 1144977, 1170577, 1149011,\n", + " 1167682, 1144739, 1144750, 1155268, 1165413, 1141471, 1141459, 1169475,\n", + " 1151650, 1147427, 1182242, 1156737, 1156739, 1160849, 1161015, 1150648,\n", + " 1171040, 1144810, 1144812, 1144808, 1164727, 1140112, 1135567, 1156300,\n", + " 1156303, 1162622, 1145228, 1145229, 1160232, 1147673, 1144973, 1143027,\n", + " 1166053, 1152639, 1152624, 1152630, 1148124, 1153534, 1168659, 1160832,\n", + " 1149555, 1149565, 1158724, 1158722, 1168764, 1150773, 1150781, 1154916,\n", + " 1169602, 1167817, 1155172, 1155170, 1166194, 1150518, 1156119, 1156118,\n", + " 1145523, 1154617, 1144336, 1147745, 1190644, 1169162, 1157331, 1150031,\n", + " 1149452, 1149688, 1158611, 1158623, 1158062, 1157385, 1147416, 1167388,\n", + " 1152353, 1165525, 1143177, 1165906, 1173307, 1169144, 1152150, 1153751,\n", + " 1159651, 1167857, 1157153, 1148131, 1169913, 1167712, 1181021, 1178820,\n", + " 1160982, 1182084, 1172932, 1172606, 1153428, 1159100, 1171073, 1166682,\n", + " 1166684, 1183662, 1160314, 1150234, 1154148, 1158176, 1149169, 1186117,\n", + " 1168481, 1143410, 1143420, 1171303, 1170178, 1181241, 1153805, 1189183,\n", + " 1158030, 1180203, 1161255, 1161262, 1162129, 1182354, 1155262, 1171770,\n", + " 1157795, 1177585, 1171623, 1178360, 1157126, 1153898, 1154497, 1186813,\n", + " 1162412, 1145626, 1156443, 1172024, 1180383, 1180004, 1161911, 1149744,\n", + " 1149755, 1146240, 1181081, 1165225, 1155990, 1155985, 1185327, 1181138,\n", + " 1163869, 1158374, 1155899, 1182797, 1182795, 1162694, 1140399, 1182330,\n", + " 1188241, 1171037, 1166442, 1176983, 1188270, 1164271, 1179135, 1165444,\n", + " 1146161, 1147179, 1147180, 1147182, 1156161, 1189200, 1168943, 1170421,\n", + " 1139828, 1139831, 1139837, 1182991, 1154812, 1164924, 1164914, 1151288,\n", + " 1149619, 1156055, 1173058, 1181796, 1156835, 1188039, 1141001, 1172823,\n", + " 1181413, 1181917, 1171675, 1151774, 1194093, 1192959, 1166841, 1192576,\n", + " 1194120, 1171201, 1177461, 1175354, 1189575, 1178268, 1178265, 1158064,\n", + " 1145395, 1145403, 1183941, 1179734, 1155962, 1187840, 1183610, 1179766,\n", + " 1179767, 1186605, 1176972, 1189910, 1163071, 1182863], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1136228, 1136342, 1135933, 1135716, 1135726, 1137791, 1140785,\n", + " 1139698, 1141756, 1141758, 1137506, 1138335, 1136219, 1140297, 1136965,\n", + " 1136969, 1136971, 1141443, 1146803, 1151164, 1149831, 1149834, 1139811,\n", + " 1145992, 1143363, 1139243, 1150395, 1139958, 1150506, 1136959, 1155689,\n", + " 1143820, 1149644, 1149646, 1147483, 1142894, 1153940, 1144636, 1135262,\n", + " 1146995, 1153012, 1148346, 1146661, 1146472, 1136125, 1152666, 1153231,\n", + " 1147095, 1136683, 1136685, 1150329, 1134710, 1146376, 1138745, 1138749,\n", + " 1134658, 1151547, 1138112, 1135183, 1137181, 1162460, 1135367, 1135202,\n", + " 1135210, 1140767, 1137798, 1134794, 1137329, 1137330, 1136178, 1157102,\n", + " 1144395, 1136826, 1137529, 1136712, 1152376, 1137441, 1135274, 1156159,\n", + " 1148481, 1139161, 1135576, 1135583, 1135827, 1135828, 1135670, 1138514,\n", + " 1138525, 1137957, 1137959, 1158136, 1136982, 1137295, 1139878, 1138440,\n", + " 1138461, 1158390, 1147112, 1147119, 1142611, 1160819, 1145842, 1145843,\n", + " 1145852, 1148531, 1139844, 1136457, 1139673, 1142255, 1165579, 1136085,\n", + " 1136092, 1134992, 1134770, 1136555, 1152646, 1158974, 1142909, 1159009,\n", + " 1144410, 1153543, 1153548, 1140034, 1139084, 1138148, 1141964, 1155661,\n", + " 1140557, 1152042, 1152044, 1137728, 1147317, 1147322, 1146222, 1134750,\n", + " 1141098, 1141100, 1144138, 1149001, 1141971, 1136392, 1154860, 1137299,\n", + " 1162713, 1143225, 1139025, 1140000, 1149979, 1146844, 1135865, 1139436,\n", + " 1136637, 1161173, 1136917, 1144237, 1140607, 1141161, 1139495, 1134987,\n", + " 1142056, 1142053, 1146799, 1142093, 1145161, 1158749, 1139190, 1142913,\n", + " 1137651, 1144596, 1136864, 1141578, 1135327, 1141398, 1150906, 1150910,\n", + " 1137374, 1158698, 1138539, 1137849, 1137854, 1147153, 1141365, 1141367,\n", + " 1149101, 1144279, 1139510, 1140990, 1146695, 1141560, 1141565, 1143692,\n", + " 1147050, 1147047, 1145876, 1155835, 1152976, 1152980, 1160251, 1135457,\n", + " 1138995, 1139007, 1141925, 1144250, 1144242, 1140689, 1137571, 1134851,\n", + " 1145974, 1142111, 1146024, 1146025, 1150606, 1138085, 1146129, 1154323,\n", + " 1154328, 1154332, 1149928, 1149933, 1147084, 1139990, 1143294, 1147543,\n", + " 1147282, 1142816, 1136330, 1140341, 1147461, 1147470, 1142637, 1148003,\n", + " 1146080, 1136160, 1142591, 1138924, 1157713, 1136836, 1136845, 1141289,\n", + " 1139329, 1139341, 1144779, 1144778, 1138226, 1142153, 1142158, 1143345,\n", + " 1144765, 1140844, 1139975, 1135819, 1146514, 1146523, 1143456, 1143460,\n", + " 1143457, 1143937, 1140829, 1146631, 1146636, 1146634, 1140364, 1137990,\n", + " 1143075, 1143082, 1148966, 1147984, 1147988, 1147995, 1147999, 1134902,\n", + " 1134907, 1139252, 1139255, 1139258, 1147120, 1147131, 1145467, 1148704,\n", + " 1148719, 1141836, 1148468, 1148476, 1149725, 1147025, 1147257, 1145017,\n", + " 1147196, 1158226, 1143922, 1141144, 1145238, 1145240, 1145751, 1151242,\n", + " 1148214, 1148940, 1147966, 1156468, 1149791, 1149777, 1144514, 1144203,\n", + " 1165252, 1151480, 1151485, 1140409, 1149535, 1150127, 1152813, 1141949,\n", + " 1141279, 1144828, 1148744, 1153574, 1154985, 1147653, 1149412, 1148294,\n", + " 1148300, 1152070, 1148612, 1154430, 1154420, 1148180, 1139718, 1146682,\n", + " 1138876, 1152435, 1148720, 1148729, 1147627, 1146559, 1139936, 1153182,\n", + " 1154202, 1141739, 1153124, 1153192, 1153188, 1159828, 1159837, 1150935,\n", + " 1152877, 1143092, 1147446, 1147442, 1151811, 1135303, 1148498, 1136002,\n", + " 1150637, 1151348, 1151351, 1148949, 1146969, 1156402, 1147391, 1146623,\n", + " 1151691, 1152100, 1153030, 1150086, 1145539, 1137746, 1146307, 1146304,\n", + " 1152612, 1140521, 1149203, 1152826, 1155337, 1154123, 1155356, 1152673,\n", + " 1151617, 1136131, 1136132, 1148916, 1152958, 1140451, 1144533, 1138986,\n", + " 1143995, 1152336, 1152341, 1146816, 1153311, 1138276, 1138280, 1138281,\n", + " 1136025, 1136028, 1152928, 1150099, 1150164, 1144016, 1148040, 1155202,\n", + " 1152601, 1149792, 1137047, 1137048, 1148628, 1158530, 1158540, 1148369,\n", + " 1137458, 1148253, 1159223, 1153085, 1135438, 1157547, 1158854, 1158860,\n", + " 1158862, 1150869, 1156505, 1152833, 1145191, 1139473, 1151257, 1151262,\n", + " 1157558, 1150465, 1160258, 1142221, 1138830, 1152179, 1152737, 1156935,\n", + " 1143010, 1139525, 1158304, 1158308, 1158311, 1151273, 1155441, 1155452,\n", + " 1137970, 1153354, 1150130, 1150136, 1140877, 1154529, 1154539, 1156913,\n", + " 1142755, 1142758, 1154226, 1151379, 1155375, 1155122, 1152527, 1157183,\n", + " 1153481, 1155749, 1151424, 1146924, 1145793, 1156463, 1158096, 1168226,\n", + " 1154555, 1136476, 1158824, 1153721, 1148836, 1148835, 1155646, 1160958,\n", + " 1161389, 1154644, 1154645, 1154240, 1163375, 1162190, 1156711, 1139627,\n", + " 1151317, 1154909, 1163127, 1143189, 1143531, 1150371, 1144712, 1141627,\n", + " 1141620, 1150982, 1155293, 1143517, 1159629, 1157934, 1158123, 1158578,\n", + " 1156762, 1159001, 1153786, 1158193, 1137381, 1159116, 1164319, 1154014,\n", + " 1135601, 1135602, 1148147, 1157685, 1149145, 1159253, 1140634, 1152209,\n", + " 1152215, 1140380, 1140381, 1155884, 1144843, 1155971, 1155975, 1136896,\n", + " 1158759, 1158886, 1140218, 1161270, 1159164, 1158285, 1152463, 1151615,\n", + " 1161625, 1156665, 1152136, 1152143, 1152131, 1157261, 1153808, 1136640,\n", + " 1134757, 1157860, 1158545, 1158558, 1165787, 1138110, 1144582, 1150011,\n", + " 1155535, 1161539, 1142495, 1163456, 1164276, 1142666, 1159052, 1157939,\n", + " 1160563, 1162044, 1153052, 1153042, 1153045, 1172995, 1163072, 1167707,\n", + " 1156381, 1144158, 1166256, 1166258, 1142865, 1159370, 1153842, 1138384,\n", + " 1150046, 1149063, 1151020, 1153514, 1153519, 1147300, 1158685, 1171986,\n", + " 1146870, 1161652, 1164997, 1157600, 1138161, 1156795, 1163381, 1139286,\n", + " 1148021, 1166073, 1148771, 1140735, 1157357, 1146056, 1146063, 1164423,\n", + " 1171249, 1164048, 1158878, 1170415, 1169493, 1140643, 1148600, 1148603,\n", + " 1148607, 1172725, 1159646, 1155816, 1163210, 1158653, 1159032, 1169108,\n", + " 1144492, 1155588, 1165989, 1138674, 1148567, 1144977, 1170577, 1149011,\n", + " 1167682, 1144739, 1144750, 1155268, 1165413, 1141471, 1141459, 1169475,\n", + " 1151650, 1147427, 1182242, 1156737, 1156739, 1160849, 1161015, 1150648,\n", + " 1171040, 1144810, 1144812, 1144808, 1164727, 1140112, 1135567, 1156300,\n", + " 1156303, 1162622, 1145228, 1145229, 1160232, 1147673, 1144973, 1143027,\n", + " 1166053, 1152639, 1152624, 1152630, 1148124, 1153534, 1168659, 1160832,\n", + " 1149555, 1149565, 1158724, 1158722, 1168764, 1150773, 1150781, 1154916,\n", + " 1169602, 1167817, 1155172, 1155170, 1166194, 1150518, 1156119, 1156118,\n", + " 1145523, 1154617, 1144336, 1147745, 1190644, 1169162, 1157331, 1150031,\n", + " 1149452, 1149688, 1158611, 1158623, 1158062, 1157385, 1147416, 1167388,\n", + " 1152353, 1165525, 1143177, 1165906, 1173307, 1169144, 1152150, 1153751,\n", + " 1159651, 1167857, 1157153, 1148131, 1169913, 1167712, 1181021, 1178820,\n", + " 1160982, 1182084, 1172932, 1172606, 1153428, 1159100, 1171073, 1166682,\n", + " 1166684, 1183662, 1160314, 1150234, 1154148, 1158176, 1149169, 1186117,\n", + " 1168481, 1143410, 1143420, 1171303, 1170178, 1181241, 1153805, 1189183,\n", + " 1158030, 1180203, 1161255, 1161262, 1162129, 1182354, 1155262, 1171770,\n", + " 1157795, 1177585, 1171623, 1178360, 1157126, 1153898, 1154497, 1186813,\n", + " 1162412, 1145626, 1156443, 1172024, 1180383, 1180004, 1161911, 1149744,\n", + " 1149755, 1146240, 1181081, 1165225, 1155990, 1155985, 1185327, 1181138,\n", + " 1163869, 1158374, 1155899, 1182797, 1182795, 1162694, 1140399, 1182330,\n", + " 1188241, 1171037, 1166442, 1176983, 1188270, 1164271, 1179135, 1165444,\n", + " 1146161, 1147179, 1147180, 1147182, 1156161, 1189200, 1168943, 1170421,\n", + " 1139828, 1139831, 1139837, 1182991, 1154812, 1164924, 1164914, 1151288,\n", + " 1149619, 1156055, 1173058, 1181796, 1156835, 1188039, 1141001, 1172823,\n", + " 1181413, 1181917, 1171675, 1151774, 1194093, 1192959, 1166841, 1192576,\n", + " 1194120, 1171201, 1177461, 1175354, 1189575, 1178268, 1178265, 1158064,\n", + " 1145395, 1145403, 1183941, 1179734, 1155962, 1187840, 1183610, 1179766,\n", + " 1179767, 1186605, 1176972, 1189910, 1163071, 1182863], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197228, 1199282, 1202255, 1198832, 1198840, 1198844, 1201581, 1201582,\n", + " 1199270, 1198021, 1194626, 1197777, 1197791, 1199248, 1201016, 1202804,\n", + " 1198557, 1194745, 1197152, 1195494, 1196631, 1195263, 1199135, 1201933,\n", + " 1201989, 1201992, 1196031, 1199519, 1194882, 1195895, 1199172, 1197856,\n", + " 1196359, 1196695, 1196837, 1198958, 1198163, 1195265, 1197136, 1197140,\n", + " 1196247, 1196109, 1195850, 1195039, 1195541, 1197474, 1197640, 1202017,\n", + " 1196393, 1195353, 1199333, 1199060, 1197291, 1194941, 1194928, 1199685,\n", + " 1199628, 1202450, 1200076, 1200866, 1200872, 1200403, 1199676, 1201511,\n", + " 1196498, 1197970, 1197976, 1197601, 1201116, 1196727, 1196734, 1195771,\n", + " 1195773, 1200887, 1200893, 1198428, 1198811, 1201824, 1202417, 1197215,\n", + " 1198066, 1202630, 1202401, 1194803, 1200553, 1203071, 1197095, 1197100,\n", + " 1199908, 1200194, 1200198, 1196779, 1201442, 1202239, 1200899, 1202175,\n", + " 1195876, 1201291, 1201590, 1199925, 1199923, 1200398, 1200391, 1196966,\n", + " 1200784, 1195431, 1195676, 1195679, 1195664, 1200471, 1202432, 1200445,\n", + " 1198929, 1195415, 1201786, 1197822, 1194898, 1196597, 1196605, 1198819,\n", + " 1197035, 1194908], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197228, 1199282, 1202255, 1198832, 1198840, 1198844, 1201581, 1201582,\n", + " 1199270, 1198021, 1194626, 1197777, 1197791, 1199248, 1201016, 1202804,\n", + " 1198557, 1194745, 1197152, 1195494, 1196631, 1195263, 1199135, 1201933,\n", + " 1201989, 1201992, 1196031, 1199519, 1194882, 1195895, 1199172, 1197856,\n", + " 1196359, 1196695, 1196837, 1198958, 1198163, 1195265, 1197136, 1197140,\n", + " 1196247, 1196109, 1195850, 1195039, 1195541, 1197474, 1197640, 1202017,\n", + " 1196393, 1195353, 1199333, 1199060, 1197291, 1194941, 1194928, 1199685,\n", + " 1199628, 1202450, 1200076, 1200866, 1200872, 1200403, 1199676, 1201511,\n", + " 1196498, 1197970, 1197976, 1197601, 1201116, 1196727, 1196734, 1195771,\n", + " 1195773, 1200887, 1200893, 1198428, 1198811, 1201824, 1202417, 1197215,\n", + " 1198066, 1202630, 1202401, 1194803, 1200553, 1203071, 1197095, 1197100,\n", + " 1199908, 1200194, 1200198, 1196779, 1201442, 1202239, 1200899, 1202175,\n", + " 1195876, 1201291, 1201590, 1199925, 1199923, 1200398, 1200391, 1196966,\n", + " 1200784, 1195431, 1195676, 1195679, 1195664, 1200471, 1202432, 1200445,\n", + " 1198929, 1195415, 1201786, 1197822, 1194898, 1196597, 1196605, 1198819,\n", + " 1197035, 1194908], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.0639e-01, 1.6423e-02, 5.7119e-01, ..., 1.4944e-01,\n", + " -2.2314e-03, -3.9939e-03],\n", + " [ 1.7790e-01, 2.8342e-02, 7.6124e-01, ..., 1.2683e-01,\n", + " -1.8802e-03, -5.1404e-03],\n", + " [ 1.9375e-01, 1.6864e-03, 8.0334e-01, ..., 1.3775e-01,\n", + " -1.9774e-03, -5.1408e-03],\n", + " ...,\n", + " [ 2.0408e-01, 8.0506e-03, 8.5161e-01, ..., 1.2137e-01,\n", + " -1.8594e-03, -5.6550e-03],\n", + " [ 7.5963e-02, -8.5559e-05, 6.1356e-01, ..., 1.5166e-01,\n", + " -1.8198e-03, -3.9429e-03],\n", + " [ 1.0943e-01, 2.2238e-02, 6.3772e-01, ..., 1.6030e-01,\n", + " -2.2200e-03, -4.1285e-03]], device='cuda:0'), 'paper': tensor([[ 9.1670e-01, -3.0260e-03, 8.4657e-01, ..., -7.7590e-03,\n", + " -1.1750e-02, 2.5147e-01],\n", + " [ 1.9537e+00, 3.9204e-01, 1.7267e+00, ..., -1.7331e-03,\n", + " -1.9009e-02, 1.6700e+00],\n", + " [ 1.7612e+00, -7.0811e-03, 2.3802e+00, ..., -1.6982e-03,\n", + " -2.9063e-02, 1.6242e+00],\n", + " ...,\n", + " [ 1.9700e+00, -9.3481e-03, 2.0330e+00, ..., -5.7081e-04,\n", + " -3.3326e-02, 2.3692e+00],\n", + " [ 4.6368e-01, -3.5969e-02, 3.6392e+00, ..., -1.4570e-02,\n", + " -2.6862e-02, -1.4596e-02],\n", + " [ 2.1379e+00, -1.1685e-02, 2.2448e+00, ..., 1.5003e-01,\n", + " -3.7125e-02, 2.8358e+00]], device='cuda:0'), 'author': tensor([[-4.7517e-03, 3.1620e-01, 2.6016e-01, ..., 9.2186e-01,\n", + " -2.6871e-03, -2.9418e-03],\n", + " [-1.3148e-03, 7.6564e-02, 2.4277e-01, ..., 1.4046e+00,\n", + " -4.3690e-04, 4.4410e-02],\n", + " [-1.4132e-03, 5.4455e-02, 2.4007e-01, ..., 1.5103e+00,\n", + " -1.5052e-04, 1.3602e-01],\n", + " ...,\n", + " [-1.7676e-03, 1.9834e-01, 1.7166e-01, ..., 1.1394e+00,\n", + " -2.7303e-03, -8.4781e-04],\n", + " [-1.0757e-03, 1.0651e-01, 1.8477e-01, ..., 1.4990e+00,\n", + " -7.2718e-04, 1.5283e-01],\n", + " [-1.5006e-03, 1.4742e-01, 2.2416e-01, ..., 1.4156e+00,\n", + " -1.5245e-03, 7.0379e-02]], device='cuda:0'), 'field_of_study': tensor([[-3.8126e-04, 5.6092e-01, 1.1146e-01, ..., -7.3617e-03,\n", + " 3.3474e-01, 1.6823e-01],\n", + " [-3.2699e-04, 4.8191e-01, 3.5422e-01, ..., -6.0328e-03,\n", + " 8.3791e-02, 2.5398e-01],\n", + " [-8.9580e-04, 3.9457e-01, 1.2237e-01, ..., -6.8435e-03,\n", + " 1.6664e-01, 2.0704e-01],\n", + " ...,\n", + " [-1.1714e-03, 3.5655e-01, 1.8468e-01, ..., -5.2514e-03,\n", + " 1.4916e-01, 1.9265e-01],\n", + " [-1.2019e-03, 8.7460e-01, 4.2611e-01, ..., -3.9647e-04,\n", + " 1.2699e-01, -2.5709e-03],\n", + " [-2.5978e-04, 3.7901e-01, 2.2304e-01, ..., -5.5587e-03,\n", + " -7.6299e-05, 2.0729e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 220, 182, 70, 67, 57, 737, 300, 236, 527, 527, 496, 496,\n", + " 337, 274, 382, 382, 558, 476, 463, 447, 682, 677, 814, 1256,\n", + " 979, 935, 1003, 834, 899, 899, 1000, 977, 1151, 973, 973, 1251,\n", + " 1251, 1069, 1487, 1487, 1333, 1487, 1487, 1487, 1449, 1233, 1595, 1487,\n", + " 1487, 1487, 1419, 1419, 1372, 1604, 1372, 1372, 1372, 1372, 1372, 1880,\n", + " 1877, 1877, 1877, 1763, 1763, 1763, 1734, 1847, 1847, 1847, 1950, 1950,\n", + " 1881, 1881, 1771, 1771, 1771, 1967, 1982, 2200, 2386, 2256, 2386, 2247,\n", + " 2386, 2386, 2427, 2283, 2356, 2695, 2567, 2403, 2704, 2671, 2762, 3015,\n", + " 2682, 2642, 2593, 2593, 2660, 2782, 2920, 2758, 2762, 2899, 2899, 2838,\n", + " 2834, 3131, 2941, 3010, 3010, 3163, 2879, 2879, 3285, 3228, 3260, 3293,\n", + " 3422, 3330, 3351, 3515, 3515, 3515, 3493, 3560, 3617, 3593, 3649, 3408,\n", + " 3408, 3773, 4021, 3861, 3904, 4261, 4256, 4310, 4319, 4415, 4668, 4734,\n", + " 4947, 4554, 4761, 4991, 4994, 5004, 5004, 4832, 5136, 5156, 5156, 5156,\n", + " 5079, 5335, 5370, 5370, 5415, 5415, 5354, 5573, 5801, 5801, 5801, 5522,\n", + " 5887, 5522, 5522, 5522, 6083, 5839, 6119, 5836, 6200, 6380, 6335],\n", + " [ 57, 12, 90, 23, 81, 121, 48, 15, 43, 90, 114, 27,\n", + " 3, 81, 75, 114, 121, 110, 31, 117, 7, 90, 41, 23,\n", + " 86, 99, 77, 66, 13, 2, 69, 111, 65, 35, 49, 96,\n", + " 26, 58, 89, 68, 72, 103, 76, 119, 92, 121, 55, 70,\n", + " 108, 17, 19, 112, 116, 28, 55, 54, 44, 87, 36, 86,\n", + " 33, 41, 4, 118, 109, 82, 24, 120, 74, 98, 21, 98,\n", + " 34, 113, 18, 102, 12, 74, 53, 37, 26, 30, 50, 21,\n", + " 95, 81, 84, 21, 21, 62, 32, 69, 9, 104, 83, 63,\n", + " 46, 8, 41, 85, 101, 10, 52, 24, 64, 1, 76, 76,\n", + " 1, 79, 25, 98, 74, 100, 105, 118, 80, 90, 117, 41,\n", + " 115, 67, 79, 61, 14, 88, 118, 6, 10, 71, 6, 67,\n", + " 72, 107, 81, 5, 21, 75, 38, 21, 93, 73, 16, 69,\n", + " 59, 56, 111, 11, 59, 60, 69, 51, 22, 47, 106, 78,\n", + " 28, 91, 6, 15, 111, 75, 11, 42, 77, 29, 106, 39,\n", + " 69, 94, 5, 97, 75, 22, 0, 45, 79, 20, 40]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2893, 2893, 700, ..., 3424, 2859, 990],\n", + " [ 23, 146, 203, ..., 6299, 6412, 6287]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 121, 57, 47, ..., 106, 47, 104],\n", + " [ 131, 184, 172, ..., 6476, 6367, 6491]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 80, 80, 80, ..., 6374, 6374, 6300],\n", + " [ 125, 391, 221, ..., 279, 69, 271]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 518, 291, 495, ..., 403, 183, 406],\n", + " [ 18, 63, 89, ..., 6431, 6345, 6405]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1895, 466, 1660, ..., 5613, 5063, 1729],\n", + " [ 7, 7, 36, ..., 6489, 6548, 6573]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 101, 74, 74, ..., 6374, 6374, 6374],\n", + " [2032, 2924, 1571, ..., 2399, 4558, 4751]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 57, 57, 57, ..., 6511, 6511, 6511],\n", + " [ 620, 800, 4016, ..., 4512, 4006, 4030]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006849\n", + "sampling 0.00668\n", + "noi time: 0.00208\n", + "get_vertex_data call: 0.032652\n", + "noi group time: 0.003124\n", + "eoi_group_time: 0.016255\n", + "second half: 0.217568\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 31145, 21459, ..., 1117748, 1117754, 1122301],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 31145, 21459, ..., 1117748, 1117754, 1122301],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1209341, 1203800, 1227422, ..., 1927250, 1925027, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1209341, 1203800, 1227422, ..., 1927250, 1925027, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1135057, 1137204, 1141424, 1136237, 1140284, 1135926, 1135152, 1141756,\n", + " 1141757, 1141758, 1137506, 1137519, 1138335, 1141251, 1142807, 1136971,\n", + " 1141448, 1138059, 1139813, 1145370, 1137947, 1145992, 1138938, 1138936,\n", + " 1143372, 1139246, 1146640, 1139605, 1139615, 1140781, 1150503, 1142968,\n", + " 1139866, 1148582, 1149216, 1155689, 1143820, 1149644, 1147473, 1147483,\n", + " 1135992, 1149283, 1142881, 1144636, 1144632, 1146995, 1153008, 1148345,\n", + " 1148350, 1148346, 1150193, 1135482, 1146472, 1136125, 1148546, 1147095,\n", + " 1137220, 1150555, 1155018, 1139371, 1136683, 1136685, 1150329, 1152427,\n", + " 1134718, 1134807, 1140540, 1154407, 1137254, 1137181, 1138356, 1153467,\n", + " 1140158, 1135910, 1140029, 1162454, 1135360, 1135367, 1135202, 1137798,\n", + " 1141036, 1136768, 1134794, 1134797, 1137329, 1143068, 1137693, 1144395,\n", + " 1137534, 1157397, 1152376, 1137441, 1156159, 1148481, 1139161, 1135579,\n", + " 1135583, 1136108, 1135664, 1156342, 1138514, 1138524, 1138584, 1158136,\n", + " 1154132, 1145132, 1135522, 1139684, 1139685, 1138305, 1157706, 1138436,\n", + " 1138440, 1138445, 1138461, 1138449, 1136594, 1158390, 1149328, 1135088,\n", + " 1135095, 1138697, 1156603, 1147119, 1135359, 1156137, 1138185, 1145843,\n", + " 1139841, 1139849, 1139844, 1136449, 1139667, 1139673, 1134992, 1142445,\n", + " 1136734, 1158961, 1139315, 1141058, 1144410, 1153543, 1153544, 1140034,\n", + " 1139087, 1139933, 1155660, 1146072, 1152042, 1152044, 1139069, 1142293,\n", + " 1140657, 1140670, 1137734, 1137741, 1137728, 1137743, 1134922, 1134742,\n", + " 1134750, 1135549, 1141088, 1141100, 1144143, 1139889, 1141980, 1141975,\n", + " 1139119, 1136392, 1143221, 1143227, 1139033, 1140007, 1140009, 1149979,\n", + " 1142499, 1141688, 1141695, 1136427, 1142932, 1142929, 1141224, 1136917,\n", + " 1143677, 1137185, 1145066, 1144237, 1141159, 1141785, 1141786, 1144934,\n", + " 1141609, 1141300, 1144641, 1147850, 1138495, 1141810, 1141821, 1158749,\n", + " 1148866, 1148871, 1140100, 1140110, 1138423, 1143107, 1144596, 1136867,\n", + " 1136864, 1141572, 1140885, 1141403, 1144182, 1144184, 1137614, 1146201,\n", + " 1134829, 1158703, 1158692, 1161710, 1147153, 1141365, 1153059, 1153068,\n", + " 1140815, 1141720, 1141672, 1141664, 1149088, 1144279, 1143907, 1139506,\n", + " 1139510, 1145001, 1143791, 1147888, 1140990, 1146695, 1141561, 1145873,\n", + " 1155829, 1149878, 1152976, 1135457, 1139453, 1141925, 1146901, 1144242,\n", + " 1145340, 1141841, 1137149, 1141382, 1145983, 1145974, 1143845, 1136275,\n", + " 1146024, 1150605, 1154328, 1141646, 1141585, 1149928, 1139990, 1146302,\n", + " 1143293, 1143294, 1147543, 1147549, 1147540, 1148763, 1147282, 1136330,\n", + " 1143663, 1142628, 1142637, 1148003, 1149608, 1143040, 1148406, 1136160,\n", + " 1136167, 1157720, 1136836, 1139329, 1139328, 1138229, 1142149, 1143345,\n", + " 1144619, 1144095, 1150296, 1146513, 1146523, 1143456, 1143457, 1144291,\n", + " 1144566, 1140483, 1143937, 1135454, 1147521, 1140364, 1149569, 1137990,\n", + " 1168921, 1148962, 1148966, 1147999, 1148704, 1141836, 1146751, 1149725,\n", + " 1147024, 1147971, 1141131, 1145012, 1139549, 1158228, 1147876, 1154526,\n", + " 1145240, 1145750, 1145751, 1146154, 1146159, 1146178, 1152530, 1150280,\n", + " 1150445, 1149791, 1144526, 1141349, 1150350, 1152013, 1151994, 1151480,\n", + " 1154271, 1135504, 1139919, 1149590, 1140560, 1150127, 1141949, 1141266,\n", + " 1144825, 1147653, 1143552, 1168504, 1149412, 1148288, 1148300, 1151421,\n", + " 1154420, 1152563, 1136246, 1138204, 1146682, 1157981, 1157983, 1148720,\n", + " 1148734, 1148729, 1146549, 1149810, 1139936, 1166305, 1143983, 1148204,\n", + " 1171943, 1154203, 1141743, 1153188, 1145111, 1150935, 1150352, 1148095,\n", + " 1141015, 1151810, 1151816, 1151906, 1154183, 1148498, 1149732, 1141420,\n", + " 1141423, 1150630, 1151356, 1151345, 1147728, 1147737, 1145086, 1155066,\n", + " 1148949, 1146967, 1156413, 1153255, 1146623, 1146485, 1152409, 1156321,\n", + " 1153032, 1153026, 1153038, 1137746, 1146304, 1152622, 1152623, 1140521,\n", + " 1149203, 1152819, 1155337, 1154122, 1154123, 1152673, 1152680, 1154633,\n", + " 1154638, 1139582, 1151617, 1150578, 1150586, 1136132, 1136798, 1148916,\n", + " 1144537, 1140935, 1151311, 1143995, 1152341, 1152344, 1156816, 1153311,\n", + " 1145568, 1138272, 1138279, 1138281, 1152300, 1136028, 1136031, 1158704,\n", + " 1156608, 1152928, 1150150, 1150164, 1144016, 1148033, 1148040, 1148034,\n", + " 1149300, 1152601, 1137048, 1137042, 1148628, 1148637, 1158530, 1137458,\n", + " 1159217, 1155376, 1142041, 1135434, 1148880, 1156500, 1156505, 1157064,\n", + " 1145187, 1145184, 1137814, 1151260, 1135730, 1156638, 1153410, 1135634,\n", + " 1143008, 1143022, 1151466, 1139525, 1139529, 1158304, 1158308, 1158311,\n", + " 1155441, 1137978, 1153353, 1153359, 1150136, 1140866, 1154530, 1145771,\n", + " 1156207, 1156256, 1157637, 1151379, 1155122, 1152527, 1157174, 1135398,\n", + " 1146920, 1156452, 1156463, 1158096, 1154763, 1155679, 1155626, 1155628,\n", + " 1156563, 1156565, 1161429, 1158566, 1158824, 1148835, 1155646, 1153363,\n", + " 1143257, 1146928, 1156711, 1151327, 1154909, 1150371, 1157437, 1157439,\n", + " 1150805, 1141620, 1143517, 1157282, 1137152, 1158578, 1159003, 1137381,\n", + " 1137380, 1140913, 1135601, 1145508, 1145507, 1150661, 1159585, 1157684,\n", + " 1146325, 1152209, 1152502, 1140370, 1156027, 1155884, 1144843, 1155971,\n", + " 1155975, 1161667, 1149702, 1154600, 1158764, 1171183, 1158882, 1159164,\n", + " 1158815, 1156779, 1151615, 1136494, 1153808, 1156278, 1136640, 1134757,\n", + " 1140049, 1158558, 1151144, 1156516, 1146126, 1155868, 1158006, 1161539,\n", + " 1161962, 1142658, 1157747, 1157753, 1157759, 1159284, 1161645, 1159052,\n", + " 1158301, 1157945, 1153052, 1153045, 1153841, 1153842, 1156107, 1138393,\n", + " 1165244, 1150046, 1145945, 1155479, 1153514, 1153519, 1171987, 1138161,\n", + " 1164006, 1156787, 1149956, 1149963, 1139286, 1148021, 1148025, 1166073,\n", + " 1171519, 1146356, 1158461, 1164055, 1140135, 1140641, 1140650, 1140643,\n", + " 1141864, 1151875, 1158643, 1158653, 1156181, 1156184, 1159032, 1166286,\n", + " 1168107, 1152247, 1168022, 1155588, 1162550, 1153934, 1168426, 1144977,\n", + " 1147830, 1146510, 1146509, 1161239, 1161243, 1144739, 1144747, 1168070,\n", + " 1141465, 1141471, 1147427, 1157047, 1157052, 1156739, 1153663, 1171040,\n", + " 1144812, 1135567, 1165721, 1165716, 1164741, 1142722, 1142733, 1145738,\n", + " 1148683, 1155324, 1170670, 1144973, 1143025, 1147694, 1147355, 1152624,\n", + " 1152626, 1139351, 1139345, 1147723, 1145900, 1145902, 1153520, 1153534,\n", + " 1168659, 1152203, 1175240, 1187284, 1143393, 1158724, 1154076, 1170740,\n", + " 1147338, 1160030, 1145664, 1192303, 1162883, 1167817, 1155172, 1155170,\n", + " 1150518, 1154618, 1144346, 1144336, 1157534, 1157528, 1147750, 1147745,\n", + " 1154670, 1171418, 1154893, 1169162, 1157331, 1141043, 1151664, 1169359,\n", + " 1154364, 1138609, 1158611, 1158623, 1158062, 1173047, 1149846, 1149855,\n", + " 1149847, 1165326, 1147416, 1155502, 1152353, 1143170, 1143172, 1152546,\n", + " 1168400, 1173307, 1161136, 1154021, 1154027, 1152150, 1180341, 1172790,\n", + " 1151696, 1157153, 1164689, 1147711, 1151850, 1148128, 1148131, 1157593,\n", + " 1149247, 1166827, 1155738, 1155739, 1183439, 1183427, 1140326, 1179201,\n", + " 1179204, 1180472, 1172606, 1163991, 1178205, 1171823, 1150234, 1154151,\n", + " 1154148, 1149169, 1149173, 1178610, 1186117, 1143279, 1143420, 1171302,\n", + " 1170176, 1170179, 1170965, 1159404, 1153803, 1181499, 1180817, 1179727,\n", + " 1182649, 1179807, 1161255, 1155262, 1177574, 1157792, 1157795, 1171623,\n", + " 1163825, 1155804, 1157126, 1177315, 1178936, 1158249, 1153898, 1153899,\n", + " 1177866, 1164560, 1145626, 1156443, 1156446, 1157483, 1149753, 1149755,\n", + " 1146242, 1155992, 1155990, 1182690, 1158512, 1181952, 1158934, 1158940,\n", + " 1167637, 1158380, 1155890, 1155892, 1182901, 1180942, 1168532, 1189872,\n", + " 1188631, 1154944, 1146169, 1170341, 1147179, 1193865, 1168943, 1139828,\n", + " 1139825, 1139831, 1139837, 1150265, 1154812, 1164677, 1186928, 1156055,\n", + " 1151972, 1151978, 1146394, 1146395, 1173058, 1176209, 1149544, 1192363,\n", + " 1189318, 1177062, 1181936, 1181951, 1189545, 1182550, 1193895, 1185714,\n", + " 1151774, 1153729, 1153733, 1188059, 1152113, 1152115, 1177621, 1180965,\n", + " 1171200, 1177461, 1181854, 1156672, 1185637, 1155962, 1193396, 1191790,\n", + " 1189678, 1187337, 1193815, 1189803, 1157020, 1157022, 1161940],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1135057, 1137204, 1141424, 1136237, 1140284, 1135926, 1135152, 1141756,\n", + " 1141757, 1141758, 1137506, 1137519, 1138335, 1141251, 1142807, 1136971,\n", + " 1141448, 1138059, 1139813, 1145370, 1137947, 1145992, 1138938, 1138936,\n", + " 1143372, 1139246, 1146640, 1139605, 1139615, 1140781, 1150503, 1142968,\n", + " 1139866, 1148582, 1149216, 1155689, 1143820, 1149644, 1147473, 1147483,\n", + " 1135992, 1149283, 1142881, 1144636, 1144632, 1146995, 1153008, 1148345,\n", + " 1148350, 1148346, 1150193, 1135482, 1146472, 1136125, 1148546, 1147095,\n", + " 1137220, 1150555, 1155018, 1139371, 1136683, 1136685, 1150329, 1152427,\n", + " 1134718, 1134807, 1140540, 1154407, 1137254, 1137181, 1138356, 1153467,\n", + " 1140158, 1135910, 1140029, 1162454, 1135360, 1135367, 1135202, 1137798,\n", + " 1141036, 1136768, 1134794, 1134797, 1137329, 1143068, 1137693, 1144395,\n", + " 1137534, 1157397, 1152376, 1137441, 1156159, 1148481, 1139161, 1135579,\n", + " 1135583, 1136108, 1135664, 1156342, 1138514, 1138524, 1138584, 1158136,\n", + " 1154132, 1145132, 1135522, 1139684, 1139685, 1138305, 1157706, 1138436,\n", + " 1138440, 1138445, 1138461, 1138449, 1136594, 1158390, 1149328, 1135088,\n", + " 1135095, 1138697, 1156603, 1147119, 1135359, 1156137, 1138185, 1145843,\n", + " 1139841, 1139849, 1139844, 1136449, 1139667, 1139673, 1134992, 1142445,\n", + " 1136734, 1158961, 1139315, 1141058, 1144410, 1153543, 1153544, 1140034,\n", + " 1139087, 1139933, 1155660, 1146072, 1152042, 1152044, 1139069, 1142293,\n", + " 1140657, 1140670, 1137734, 1137741, 1137728, 1137743, 1134922, 1134742,\n", + " 1134750, 1135549, 1141088, 1141100, 1144143, 1139889, 1141980, 1141975,\n", + " 1139119, 1136392, 1143221, 1143227, 1139033, 1140007, 1140009, 1149979,\n", + " 1142499, 1141688, 1141695, 1136427, 1142932, 1142929, 1141224, 1136917,\n", + " 1143677, 1137185, 1145066, 1144237, 1141159, 1141785, 1141786, 1144934,\n", + " 1141609, 1141300, 1144641, 1147850, 1138495, 1141810, 1141821, 1158749,\n", + " 1148866, 1148871, 1140100, 1140110, 1138423, 1143107, 1144596, 1136867,\n", + " 1136864, 1141572, 1140885, 1141403, 1144182, 1144184, 1137614, 1146201,\n", + " 1134829, 1158703, 1158692, 1161710, 1147153, 1141365, 1153059, 1153068,\n", + " 1140815, 1141720, 1141672, 1141664, 1149088, 1144279, 1143907, 1139506,\n", + " 1139510, 1145001, 1143791, 1147888, 1140990, 1146695, 1141561, 1145873,\n", + " 1155829, 1149878, 1152976, 1135457, 1139453, 1141925, 1146901, 1144242,\n", + " 1145340, 1141841, 1137149, 1141382, 1145983, 1145974, 1143845, 1136275,\n", + " 1146024, 1150605, 1154328, 1141646, 1141585, 1149928, 1139990, 1146302,\n", + " 1143293, 1143294, 1147543, 1147549, 1147540, 1148763, 1147282, 1136330,\n", + " 1143663, 1142628, 1142637, 1148003, 1149608, 1143040, 1148406, 1136160,\n", + " 1136167, 1157720, 1136836, 1139329, 1139328, 1138229, 1142149, 1143345,\n", + " 1144619, 1144095, 1150296, 1146513, 1146523, 1143456, 1143457, 1144291,\n", + " 1144566, 1140483, 1143937, 1135454, 1147521, 1140364, 1149569, 1137990,\n", + " 1168921, 1148962, 1148966, 1147999, 1148704, 1141836, 1146751, 1149725,\n", + " 1147024, 1147971, 1141131, 1145012, 1139549, 1158228, 1147876, 1154526,\n", + " 1145240, 1145750, 1145751, 1146154, 1146159, 1146178, 1152530, 1150280,\n", + " 1150445, 1149791, 1144526, 1141349, 1150350, 1152013, 1151994, 1151480,\n", + " 1154271, 1135504, 1139919, 1149590, 1140560, 1150127, 1141949, 1141266,\n", + " 1144825, 1147653, 1143552, 1168504, 1149412, 1148288, 1148300, 1151421,\n", + " 1154420, 1152563, 1136246, 1138204, 1146682, 1157981, 1157983, 1148720,\n", + " 1148734, 1148729, 1146549, 1149810, 1139936, 1166305, 1143983, 1148204,\n", + " 1171943, 1154203, 1141743, 1153188, 1145111, 1150935, 1150352, 1148095,\n", + " 1141015, 1151810, 1151816, 1151906, 1154183, 1148498, 1149732, 1141420,\n", + " 1141423, 1150630, 1151356, 1151345, 1147728, 1147737, 1145086, 1155066,\n", + " 1148949, 1146967, 1156413, 1153255, 1146623, 1146485, 1152409, 1156321,\n", + " 1153032, 1153026, 1153038, 1137746, 1146304, 1152622, 1152623, 1140521,\n", + " 1149203, 1152819, 1155337, 1154122, 1154123, 1152673, 1152680, 1154633,\n", + " 1154638, 1139582, 1151617, 1150578, 1150586, 1136132, 1136798, 1148916,\n", + " 1144537, 1140935, 1151311, 1143995, 1152341, 1152344, 1156816, 1153311,\n", + " 1145568, 1138272, 1138279, 1138281, 1152300, 1136028, 1136031, 1158704,\n", + " 1156608, 1152928, 1150150, 1150164, 1144016, 1148033, 1148040, 1148034,\n", + " 1149300, 1152601, 1137048, 1137042, 1148628, 1148637, 1158530, 1137458,\n", + " 1159217, 1155376, 1142041, 1135434, 1148880, 1156500, 1156505, 1157064,\n", + " 1145187, 1145184, 1137814, 1151260, 1135730, 1156638, 1153410, 1135634,\n", + " 1143008, 1143022, 1151466, 1139525, 1139529, 1158304, 1158308, 1158311,\n", + " 1155441, 1137978, 1153353, 1153359, 1150136, 1140866, 1154530, 1145771,\n", + " 1156207, 1156256, 1157637, 1151379, 1155122, 1152527, 1157174, 1135398,\n", + " 1146920, 1156452, 1156463, 1158096, 1154763, 1155679, 1155626, 1155628,\n", + " 1156563, 1156565, 1161429, 1158566, 1158824, 1148835, 1155646, 1153363,\n", + " 1143257, 1146928, 1156711, 1151327, 1154909, 1150371, 1157437, 1157439,\n", + " 1150805, 1141620, 1143517, 1157282, 1137152, 1158578, 1159003, 1137381,\n", + " 1137380, 1140913, 1135601, 1145508, 1145507, 1150661, 1159585, 1157684,\n", + " 1146325, 1152209, 1152502, 1140370, 1156027, 1155884, 1144843, 1155971,\n", + " 1155975, 1161667, 1149702, 1154600, 1158764, 1171183, 1158882, 1159164,\n", + " 1158815, 1156779, 1151615, 1136494, 1153808, 1156278, 1136640, 1134757,\n", + " 1140049, 1158558, 1151144, 1156516, 1146126, 1155868, 1158006, 1161539,\n", + " 1161962, 1142658, 1157747, 1157753, 1157759, 1159284, 1161645, 1159052,\n", + " 1158301, 1157945, 1153052, 1153045, 1153841, 1153842, 1156107, 1138393,\n", + " 1165244, 1150046, 1145945, 1155479, 1153514, 1153519, 1171987, 1138161,\n", + " 1164006, 1156787, 1149956, 1149963, 1139286, 1148021, 1148025, 1166073,\n", + " 1171519, 1146356, 1158461, 1164055, 1140135, 1140641, 1140650, 1140643,\n", + " 1141864, 1151875, 1158643, 1158653, 1156181, 1156184, 1159032, 1166286,\n", + " 1168107, 1152247, 1168022, 1155588, 1162550, 1153934, 1168426, 1144977,\n", + " 1147830, 1146510, 1146509, 1161239, 1161243, 1144739, 1144747, 1168070,\n", + " 1141465, 1141471, 1147427, 1157047, 1157052, 1156739, 1153663, 1171040,\n", + " 1144812, 1135567, 1165721, 1165716, 1164741, 1142722, 1142733, 1145738,\n", + " 1148683, 1155324, 1170670, 1144973, 1143025, 1147694, 1147355, 1152624,\n", + " 1152626, 1139351, 1139345, 1147723, 1145900, 1145902, 1153520, 1153534,\n", + " 1168659, 1152203, 1175240, 1187284, 1143393, 1158724, 1154076, 1170740,\n", + " 1147338, 1160030, 1145664, 1192303, 1162883, 1167817, 1155172, 1155170,\n", + " 1150518, 1154618, 1144346, 1144336, 1157534, 1157528, 1147750, 1147745,\n", + " 1154670, 1171418, 1154893, 1169162, 1157331, 1141043, 1151664, 1169359,\n", + " 1154364, 1138609, 1158611, 1158623, 1158062, 1173047, 1149846, 1149855,\n", + " 1149847, 1165326, 1147416, 1155502, 1152353, 1143170, 1143172, 1152546,\n", + " 1168400, 1173307, 1161136, 1154021, 1154027, 1152150, 1180341, 1172790,\n", + " 1151696, 1157153, 1164689, 1147711, 1151850, 1148128, 1148131, 1157593,\n", + " 1149247, 1166827, 1155738, 1155739, 1183439, 1183427, 1140326, 1179201,\n", + " 1179204, 1180472, 1172606, 1163991, 1178205, 1171823, 1150234, 1154151,\n", + " 1154148, 1149169, 1149173, 1178610, 1186117, 1143279, 1143420, 1171302,\n", + " 1170176, 1170179, 1170965, 1159404, 1153803, 1181499, 1180817, 1179727,\n", + " 1182649, 1179807, 1161255, 1155262, 1177574, 1157792, 1157795, 1171623,\n", + " 1163825, 1155804, 1157126, 1177315, 1178936, 1158249, 1153898, 1153899,\n", + " 1177866, 1164560, 1145626, 1156443, 1156446, 1157483, 1149753, 1149755,\n", + " 1146242, 1155992, 1155990, 1182690, 1158512, 1181952, 1158934, 1158940,\n", + " 1167637, 1158380, 1155890, 1155892, 1182901, 1180942, 1168532, 1189872,\n", + " 1188631, 1154944, 1146169, 1170341, 1147179, 1193865, 1168943, 1139828,\n", + " 1139825, 1139831, 1139837, 1150265, 1154812, 1164677, 1186928, 1156055,\n", + " 1151972, 1151978, 1146394, 1146395, 1173058, 1176209, 1149544, 1192363,\n", + " 1189318, 1177062, 1181936, 1181951, 1189545, 1182550, 1193895, 1185714,\n", + " 1151774, 1153729, 1153733, 1188059, 1152113, 1152115, 1177621, 1180965,\n", + " 1171200, 1177461, 1181854, 1156672, 1185637, 1155962, 1193396, 1191790,\n", + " 1189678, 1187337, 1193815, 1189803, 1157020, 1157022, 1161940],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196011, 1196013, 1195397, 1200108, 1198730, 1199282, 1198449, 1198459,\n", + " 1202255, 1201577, 1201582, 1199141, 1199278, 1194626, 1199248, 1201016,\n", + " 1202804, 1196672, 1198180, 1196624, 1196631, 1194655, 1195514, 1195263,\n", + " 1201992, 1198542, 1198543, 1194952, 1197760, 1195888, 1195895, 1199172,\n", + " 1196334, 1196977, 1196699, 1195313, 1196835, 1196840, 1195988, 1195982,\n", + " 1196705, 1199823, 1195223, 1195265, 1197140, 1196247, 1198219, 1195847,\n", + " 1198915, 1195659, 1195541, 1198207, 1197478, 1196122, 1197186, 1195918,\n", + " 1199711, 1196283, 1195353, 1200959, 1197127, 1199060, 1199059, 1194928,\n", + " 1195119, 1199685, 1199628, 1202381, 1197676, 1197990, 1201388, 1200872,\n", + " 1200404, 1198400, 1199579, 1200747, 1195017, 1194786, 1195807, 1202819,\n", + " 1196727, 1195773, 1202618, 1198428, 1198811, 1201547, 1201824, 1201827,\n", + " 1202417, 1200452, 1198066, 1199445, 1201421, 1201156, 1202630, 1201056,\n", + " 1200918, 1194805, 1199712, 1199721, 1201040, 1200526, 1200345, 1200090,\n", + " 1202062, 1199886, 1202128, 1202138, 1196779, 1202239, 1199474, 1199976,\n", + " 1201291, 1195611, 1203329, 1202217, 1202696, 1200792, 1199606, 1195048,\n", + " 1202545, 1195664, 1200445, 1198929, 1195181, 1198118, 1201484, 1198299,\n", + " 1203102, 1201138, 1194732, 1198824, 1199392, 1199782, 1198819, 1195066,\n", + " 1201886, 1197652, 1197655, 1197035], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196011, 1196013, 1195397, 1200108, 1198730, 1199282, 1198449, 1198459,\n", + " 1202255, 1201577, 1201582, 1199141, 1199278, 1194626, 1199248, 1201016,\n", + " 1202804, 1196672, 1198180, 1196624, 1196631, 1194655, 1195514, 1195263,\n", + " 1201992, 1198542, 1198543, 1194952, 1197760, 1195888, 1195895, 1199172,\n", + " 1196334, 1196977, 1196699, 1195313, 1196835, 1196840, 1195988, 1195982,\n", + " 1196705, 1199823, 1195223, 1195265, 1197140, 1196247, 1198219, 1195847,\n", + " 1198915, 1195659, 1195541, 1198207, 1197478, 1196122, 1197186, 1195918,\n", + " 1199711, 1196283, 1195353, 1200959, 1197127, 1199060, 1199059, 1194928,\n", + " 1195119, 1199685, 1199628, 1202381, 1197676, 1197990, 1201388, 1200872,\n", + " 1200404, 1198400, 1199579, 1200747, 1195017, 1194786, 1195807, 1202819,\n", + " 1196727, 1195773, 1202618, 1198428, 1198811, 1201547, 1201824, 1201827,\n", + " 1202417, 1200452, 1198066, 1199445, 1201421, 1201156, 1202630, 1201056,\n", + " 1200918, 1194805, 1199712, 1199721, 1201040, 1200526, 1200345, 1200090,\n", + " 1202062, 1199886, 1202128, 1202138, 1196779, 1202239, 1199474, 1199976,\n", + " 1201291, 1195611, 1203329, 1202217, 1202696, 1200792, 1199606, 1195048,\n", + " 1202545, 1195664, 1200445, 1198929, 1195181, 1198118, 1201484, 1198299,\n", + " 1203102, 1201138, 1194732, 1198824, 1199392, 1199782, 1198819, 1195066,\n", + " 1201886, 1197652, 1197655, 1197035], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 1.6322e-01, 1.3116e-02, 7.5103e-01, ..., 1.2081e-01,\n", + " -1.7188e-03, -5.0557e-03],\n", + " [ 1.6322e-01, 1.3116e-02, 7.5103e-01, ..., 1.2081e-01,\n", + " -1.7188e-03, -5.0557e-03],\n", + " [ 9.0387e-02, 6.0783e-02, 5.4548e-01, ..., 1.3981e-01,\n", + " -1.6991e-03, -3.7059e-03],\n", + " ...,\n", + " [ 1.7042e-01, 1.9206e-02, 7.6884e-01, ..., 1.2316e-01,\n", + " -1.8582e-03, -5.1058e-03],\n", + " [ 2.0022e-01, -1.8263e-04, 7.8683e-01, ..., 1.1692e-01,\n", + " -1.6770e-03, -5.4301e-03],\n", + " [ 7.8141e-02, 2.8055e-02, 6.7176e-01, ..., 1.6864e-01,\n", + " -2.2521e-03, -4.3816e-03]], device='cuda:0'), 'paper': tensor([[ 6.6141e-01, -6.0806e-03, 1.2057e+00, ..., -6.2078e-03,\n", + " -1.2746e-02, -7.5322e-04],\n", + " [ 1.9560e+00, -1.1604e-02, 2.3381e+00, ..., -5.2426e-04,\n", + " -3.4690e-02, 2.4181e+00],\n", + " [ 3.1053e-01, -1.6660e-02, 3.0570e+00, ..., -1.5827e-02,\n", + " -2.2881e-02, -1.2128e-02],\n", + " ...,\n", + " [ 1.8230e-01, -4.2131e-03, 2.7152e+00, ..., -7.6449e-03,\n", + " -1.4983e-02, -1.3237e-02],\n", + " [ 6.9517e-01, -2.3845e-03, 9.1509e-01, ..., -4.8645e-03,\n", + " -8.3882e-03, -1.8310e-03],\n", + " [ 1.9596e+00, -1.2274e-02, 2.1155e+00, ..., 7.1003e-02,\n", + " -3.5824e-02, 2.5690e+00]], device='cuda:0'), 'author': tensor([[-1.8160e-03, 9.2293e-02, 2.9874e-01, ..., 1.4694e+00,\n", + " -1.2906e-03, 1.1710e-01],\n", + " [-1.5963e-03, 1.7751e-01, 2.8998e-01, ..., 1.4928e+00,\n", + " -7.7343e-04, 6.1004e-03],\n", + " [-2.4725e-03, 1.8838e-01, 3.6822e-01, ..., 1.3499e+00,\n", + " -3.4810e-03, -9.7830e-04],\n", + " ...,\n", + " [-1.6069e-03, 1.5854e-01, 2.1554e-01, ..., 1.4441e+00,\n", + " -1.7021e-03, 6.3332e-02],\n", + " [-2.4039e-03, 1.5882e-01, 2.8402e-01, ..., 1.2126e+00,\n", + " -3.1429e-03, -1.1728e-03],\n", + " [-1.2007e-03, 1.4710e-01, 2.1573e-01, ..., 1.4005e+00,\n", + " -1.2328e-03, 1.0816e-01]], device='cuda:0'), 'field_of_study': tensor([[-9.0864e-04, 4.5542e-01, 1.4368e-01, ..., -8.0859e-03,\n", + " 2.6135e-01, 1.8432e-01],\n", + " [-9.9614e-04, 4.0954e-01, 1.8898e-01, ..., -7.3003e-03,\n", + " 1.3866e-01, 2.3375e-01],\n", + " [-5.2713e-04, 4.3046e-01, 1.8296e-01, ..., -5.8761e-03,\n", + " 1.9648e-01, 1.3172e-01],\n", + " ...,\n", + " [-1.1011e-03, 3.5928e-01, 1.2654e-01, ..., -7.2324e-03,\n", + " 1.8451e-01, 1.2453e-01],\n", + " [-4.0161e-05, 5.0290e-01, 2.4717e-01, ..., -7.5357e-03,\n", + " 3.4566e-01, 2.7466e-02],\n", + " [ 1.1834e-01, 8.5812e-01, 5.8006e-01, ..., -8.7499e-03,\n", + " 3.3359e-01, 5.9599e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 62, 239, 168, 49, 24, 291, 679, 246, 263, 263, 453, 453,\n", + " 648, 648, 568, 759, 825, 744, 835, 609, 718, 970, 919, 1111,\n", + " 1311, 1081, 1031, 1044, 1044, 1031, 1056, 1056, 1081, 1336, 1378, 1399,\n", + " 1278, 1492, 1492, 1492, 1492, 1425, 1524, 1595, 1595, 1577, 1601, 1748,\n", + " 1339, 1432, 1644, 1973, 1745, 1691, 1691, 1904, 1993, 1993, 2031, 1944,\n", + " 1944, 2040, 2040, 1926, 2214, 1960, 2120, 2089, 2089, 2089, 2089, 2089,\n", + " 2120, 2120, 2120, 2120, 2029, 2201, 2201, 2066, 2107, 2145, 2336, 2336,\n", + " 2366, 2461, 2310, 2310, 2472, 2643, 2396, 2389, 2589, 2589, 2667, 2617,\n", + " 2617, 2617, 3164, 2979, 3099, 3016, 3079, 2830, 3046, 3046, 3112, 3112,\n", + " 3112, 3112, 3112, 3419, 3357, 3267, 3512, 3399, 3799, 3626, 3626, 3889,\n", + " 3889, 3861, 3861, 4170, 3954, 3892, 3892, 3892, 4028, 3873, 3991, 4232,\n", + " 3903, 3903, 3903, 4227, 4270, 4296, 4296, 4304, 4506, 4506, 4514, 4585,\n", + " 4597, 4757, 4586, 4769, 5015, 5015, 4968, 5105, 4979, 5227, 5244, 5244,\n", + " 5011, 5150, 5284, 5191, 5363, 5212, 5351, 5504, 5424, 5427, 5502, 5502,\n", + " 5396, 5643, 5601, 5555, 5587, 5656, 5638, 5837, 6062, 5694, 5631, 5974,\n", + " 5974, 6076, 5838, 6117, 6122, 5923, 5923, 5923, 5923, 6028, 6145, 6113,\n", + " 6333, 6374, 6374, 6195, 6303, 6423, 6411, 6570],\n", + " [ 66, 50, 96, 49, 56, 80, 45, 77, 115, 132, 3, 18,\n", + " 109, 43, 80, 87, 5, 46, 82, 82, 34, 24, 57, 137,\n", + " 77, 128, 86, 123, 59, 122, 93, 120, 19, 96, 26, 51,\n", + " 40, 64, 5, 101, 24, 30, 41, 5, 99, 53, 94, 53,\n", + " 80, 125, 50, 85, 139, 65, 47, 103, 79, 83, 80, 57,\n", + " 108, 106, 107, 88, 23, 116, 12, 81, 91, 83, 117, 114,\n", + " 121, 46, 35, 63, 129, 54, 139, 78, 11, 68, 109, 70,\n", + " 6, 85, 73, 130, 7, 127, 9, 40, 68, 38, 0, 20,\n", + " 90, 125, 10, 92, 22, 119, 136, 13, 105, 138, 98, 136,\n", + " 39, 14, 29, 21, 113, 134, 23, 85, 67, 100, 43, 23,\n", + " 126, 80, 134, 92, 95, 131, 17, 20, 60, 28, 33, 71,\n", + " 27, 5, 92, 110, 92, 126, 23, 50, 102, 104, 36, 55,\n", + " 72, 112, 58, 134, 48, 80, 1, 85, 80, 124, 80, 19,\n", + " 80, 32, 97, 4, 2, 23, 23, 69, 2, 2, 74, 84,\n", + " 89, 25, 51, 57, 75, 111, 135, 8, 61, 8, 80, 32,\n", + " 80, 10, 133, 118, 80, 15, 42, 80, 52, 76, 43, 81,\n", + " 80, 97, 25, 44, 31, 62, 16, 37]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2086, 1008, 642, ..., 6489, 2556, 6435],\n", + " [ 88, 90, 124, ..., 6653, 6633, 6566]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 123, 4, 109, ..., 92, 92, 2],\n", + " [ 231, 145, 134, ..., 6540, 6551, 6371]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 93, 93, 93, ..., 6611, 6611, 6634],\n", + " [ 271, 262, 307, ..., 82, 809, 799]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 293, 308, 3, ..., 308, 723, 482],\n", + " [ 211, 87, 6, ..., 6504, 6573, 6501]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1975, 1943, 6286, ..., 6103, 5504, 5695],\n", + " [ 197, 197, 66, ..., 6555, 6603, 6538]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 71, 71, 71, ..., 6611, 6584, 6584],\n", + " [2309, 1505, 131, ..., 6150, 2942, 4573]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 197, 197, 197, ..., 6570, 6570, 6570],\n", + " [5169, 6435, 1943, ..., 6541, 6610, 6550]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.004812\n", + "sampling 0.004659\n", + "noi time: 0.000686\n", + "get_vertex_data call: 0.025177\n", + "noi group time: 0.003777\n", + "eoi_group_time: 0.016074\n", + "second half: 0.209576\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 40271, 24176, ..., 1121122, 1124620, 1133072],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 40271, 24176, ..., 1121122, 1124620, 1133072],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210824, 1210548, 1210550, ..., 1921008, 1930682, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210824, 1210548, 1210550, ..., 1921008, 1930682, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1141424, 1136237, 1136239, 1140284, 1140285, 1136337, 1137791,\n", + " 1141756, 1141758, 1137506, 1136219, 1136969, 1136971, 1138909, 1149835,\n", + " 1139811, 1145370, 1143362, 1139605, 1139615, 1148987, 1145281, 1134943,\n", + " 1149216, 1155689, 1143820, 1147473, 1147483, 1147221, 1135992, 1144636,\n", + " 1144632, 1146995, 1135950, 1136122, 1152670, 1138349, 1153231, 1147094,\n", + " 1137220, 1155018, 1155019, 1139373, 1139371, 1150329, 1152427, 1136270,\n", + " 1140537, 1140540, 1138112, 1149457, 1140954, 1135367, 1135375, 1135202,\n", + " 1141036, 1134794, 1138504, 1137329, 1157103, 1137693, 1144395, 1137529,\n", + " 1157397, 1137441, 1156159, 1148481, 1139161, 1135583, 1141078, 1136097,\n", + " 1135827, 1140970, 1140712, 1138514, 1153099, 1137957, 1158132, 1154132,\n", + " 1136978, 1156899, 1156908, 1135522, 1135535, 1138440, 1138461, 1138462,\n", + " 1137491, 1136594, 1135122, 1149328, 1149340, 1135088, 1135098, 1138880,\n", + " 1147112, 1142611, 1142615, 1135623, 1148531, 1135769, 1139844, 1139667,\n", + " 1138069, 1142249, 1140270, 1134992, 1142445, 1139757, 1136730, 1136734,\n", + " 1139321, 1159009, 1153543, 1153547, 1140034, 1139929, 1141964, 1141966,\n", + " 1155660, 1155654, 1141985, 1141993, 1152044, 1139064, 1134742, 1134750,\n", + " 1135540, 1135546, 1136697, 1141088, 1145346, 1143767, 1154851, 1137299,\n", + " 1139025, 1139033, 1149969, 1142347, 1154467, 1140467, 1141224, 1139386,\n", + " 1136917, 1141161, 1139495, 1147850, 1164807, 1137087, 1139800, 1144426,\n", + " 1138488, 1142053, 1141810, 1153666, 1140163, 1158749, 1137766, 1149111,\n", + " 1139190, 1141479, 1138708, 1142924, 1137661, 1137662, 1138423, 1143107,\n", + " 1144596, 1136871, 1144044, 1141578, 1140885, 1135327, 1140432, 1144182,\n", + " 1150906, 1144876, 1139559, 1147153, 1142646, 1141365, 1141367, 1153068,\n", + " 1141714, 1141664, 1149088, 1149090, 1149101, 1139019, 1153554, 1139510,\n", + " 1139768, 1139763, 1140093, 1138815, 1145200, 1143779, 1140619, 1140990,\n", + " 1146695, 1135047, 1147050, 1145873, 1152976, 1152980, 1163909, 1138995,\n", + " 1141925, 1144242, 1145332, 1150700, 1136891, 1143643, 1143637, 1141382,\n", + " 1143845, 1143851, 1136275, 1146024, 1146027, 1138085, 1141585, 1149928,\n", + " 1139990, 1143875, 1143883, 1147543, 1147150, 1147282, 1142816, 1136330,\n", + " 1142628, 1143051, 1148414, 1138923, 1157720, 1136836, 1136843, 1141280,\n", + " 1139329, 1139328, 1143345, 1144753, 1144611, 1144619, 1145818, 1137098,\n", + " 1144088, 1135813, 1150294, 1146523, 1143457, 1137711, 1144303, 1143937,\n", + " 1155701, 1147521, 1140364, 1149569, 1137990, 1147995, 1147999, 1134899,\n", + " 1134902, 1144011, 1139252, 1147131, 1145457, 1148704, 1141836, 1146742,\n", + " 1147070, 1149722, 1147025, 1147249, 1147248, 1139549, 1158226, 1143921,\n", + " 1165546, 1154526, 1145240, 1145751, 1146159, 1146178, 1151242, 1148217,\n", + " 1150445, 1149258, 1149261, 1149791, 1144514, 1144526, 1150339, 1152031,\n", + " 1144888, 1154263, 1149588, 1142286, 1140566, 1150127, 1147021, 1147023,\n", + " 1141949, 1154985, 1143564, 1149412, 1151717, 1148288, 1148290, 1152067,\n", + " 1147866, 1139097, 1154420, 1158786, 1148180, 1152561, 1157970, 1148734,\n", + " 1146559, 1149810, 1139936, 1143895, 1148204, 1145111, 1150935, 1148049,\n", + " 1148052, 1144863, 1150356, 1150365, 1146231, 1148084, 1148095, 1141017,\n", + " 1147446, 1147442, 1151816, 1152581, 1151906, 1156894, 1146571, 1141420,\n", + " 1136015, 1150630, 1150634, 1155163, 1155164, 1153447, 1145079, 1150890,\n", + " 1150894, 1146975, 1149359, 1146623, 1152109, 1152103, 1156325, 1153036,\n", + " 1153037, 1153038, 1137746, 1152622, 1140521, 1157107, 1154123, 1157826,\n", + " 1152673, 1151580, 1151573, 1151617, 1150578, 1145278, 1136131, 1148914,\n", + " 1148921, 1152958, 1167164, 1138991, 1152903, 1143995, 1152341, 1152344,\n", + " 1146816, 1156816, 1138279, 1152294, 1136028, 1158712, 1158704, 1152928,\n", + " 1151064, 1156420, 1163489, 1150150, 1150159, 1142266, 1148040, 1167408,\n", + " 1149795, 1144656, 1137048, 1148628, 1137458, 1154564, 1135705, 1157466,\n", + " 1156720, 1157225, 1143454, 1158862, 1148891, 1156505, 1157064, 1152833,\n", + " 1145184, 1139479, 1143502, 1150465, 1152179, 1151788, 1152737, 1150824,\n", + " 1150828, 1139525, 1139530, 1158308, 1155441, 1153359, 1150132, 1154529,\n", + " 1154528, 1142755, 1156207, 1160438, 1151379, 1145796, 1156463, 1158096,\n", + " 1154763, 1157898, 1158824, 1158325, 1148835, 1148654, 1155646, 1143263,\n", + " 1154240, 1170648, 1139620, 1154909, 1163127, 1179427, 1143189, 1143531,\n", + " 1155286, 1157663, 1158584, 1158578, 1156762, 1153786, 1159116, 1168159,\n", + " 1140918, 1134685, 1135601, 1148149, 1155852, 1146325, 1144463, 1152220,\n", + " 1140380, 1140381, 1155975, 1183179, 1156812, 1155393, 1159440, 1160163,\n", + " 1160164, 1136896, 1158753, 1158882, 1158886, 1140215, 1158447, 1158278,\n", + " 1155246, 1136493, 1136494, 1155296, 1156488, 1156490, 1153808, 1183284,\n", + " 1140049, 1142184, 1142191, 1158545, 1158558, 1156516, 1146126, 1142487,\n", + " 1142666, 1157747, 1144258, 1159071, 1158300, 1153052, 1153045, 1171551,\n", + " 1155763, 1138393, 1160645, 1150046, 1149063, 1149070, 1155479, 1154299,\n", + " 1147300, 1157600, 1164006, 1165651, 1149963, 1139782, 1154590, 1139592,\n", + " 1171518, 1169493, 1140643, 1148603, 1172725, 1143151, 1151872, 1155816,\n", + " 1156364, 1156361, 1158653, 1159032, 1152244, 1152247, 1155588, 1165993,\n", + " 1153924, 1158405, 1164580, 1163527, 1163525, 1145137, 1141471, 1151650,\n", + " 1151654, 1147427, 1184817, 1156739, 1165182, 1153663, 1166591, 1150648,\n", + " 1171040, 1144812, 1164741, 1142733, 1156303, 1156289, 1144051, 1145743,\n", + " 1145176, 1170307, 1144973, 1160730, 1143038, 1166053, 1147346, 1152631,\n", + " 1148124, 1193476, 1145889, 1145892, 1145900, 1145902, 1152203, 1170982,\n", + " 1168752, 1147339, 1147338, 1145664, 1192302, 1151598, 1167817, 1166653,\n", + " 1155172, 1150518, 1167915, 1156119, 1145531, 1144346, 1144350, 1144336,\n", + " 1157534, 1138376, 1154670, 1171408, 1154893, 1154882, 1169154, 1169162,\n", + " 1157331, 1138129, 1141051, 1169359, 1146337, 1158611, 1158623, 1158062,\n", + " 1173047, 1163292, 1149847, 1160135, 1154869, 1147416, 1155494, 1152353,\n", + " 1168400, 1155927, 1149402, 1148324, 1148325, 1154027, 1154028, 1153751,\n", + " 1159655, 1157158, 1157153, 1157373, 1147711, 1178961, 1151850, 1148128,\n", + " 1148131, 1157593, 1157595, 1169688, 1170490, 1169037, 1179576, 1155738,\n", + " 1165132, 1168604, 1178277, 1187435, 1166016, 1172605, 1144550, 1159100,\n", + " 1166682, 1154151, 1154148, 1154153, 1149169, 1186117, 1167657, 1143420,\n", + " 1179243, 1174333, 1171302, 1181241, 1169628, 1153803, 1153141, 1171318,\n", + " 1168778, 1158029, 1161255, 1155262, 1157792, 1157795, 1171623, 1171391,\n", + " 1157124, 1162820, 1172148, 1183699, 1180762, 1178218, 1145626, 1186793,\n", + " 1178776, 1146243, 1146252, 1153609, 1157770, 1157761, 1184148, 1158934,\n", + " 1155899, 1140399, 1169064, 1168621, 1182337, 1161819, 1156861, 1170336,\n", + " 1172609, 1186355, 1156539, 1139828, 1139831, 1150265, 1154812, 1192076,\n", + " 1189681, 1156055, 1193848, 1191993, 1149544, 1159083, 1191018, 1168683,\n", + " 1141002, 1193701, 1179409, 1162156, 1192326, 1151774, 1153733, 1181402,\n", + " 1193239, 1183774, 1152123, 1169786, 1162502, 1169707, 1187857, 1172423,\n", + " 1172429, 1158071, 1145395, 1167730, 1178133, 1180532, 1176829, 1155962,\n", + " 1172187, 1178292, 1165506, 1179769, 1169831, 1162670, 1167471, 1167460,\n", + " 1193296, 1187556, 1161945], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1141424, 1136237, 1136239, 1140284, 1140285, 1136337, 1137791,\n", + " 1141756, 1141758, 1137506, 1136219, 1136969, 1136971, 1138909, 1149835,\n", + " 1139811, 1145370, 1143362, 1139605, 1139615, 1148987, 1145281, 1134943,\n", + " 1149216, 1155689, 1143820, 1147473, 1147483, 1147221, 1135992, 1144636,\n", + " 1144632, 1146995, 1135950, 1136122, 1152670, 1138349, 1153231, 1147094,\n", + " 1137220, 1155018, 1155019, 1139373, 1139371, 1150329, 1152427, 1136270,\n", + " 1140537, 1140540, 1138112, 1149457, 1140954, 1135367, 1135375, 1135202,\n", + " 1141036, 1134794, 1138504, 1137329, 1157103, 1137693, 1144395, 1137529,\n", + " 1157397, 1137441, 1156159, 1148481, 1139161, 1135583, 1141078, 1136097,\n", + " 1135827, 1140970, 1140712, 1138514, 1153099, 1137957, 1158132, 1154132,\n", + " 1136978, 1156899, 1156908, 1135522, 1135535, 1138440, 1138461, 1138462,\n", + " 1137491, 1136594, 1135122, 1149328, 1149340, 1135088, 1135098, 1138880,\n", + " 1147112, 1142611, 1142615, 1135623, 1148531, 1135769, 1139844, 1139667,\n", + " 1138069, 1142249, 1140270, 1134992, 1142445, 1139757, 1136730, 1136734,\n", + " 1139321, 1159009, 1153543, 1153547, 1140034, 1139929, 1141964, 1141966,\n", + " 1155660, 1155654, 1141985, 1141993, 1152044, 1139064, 1134742, 1134750,\n", + " 1135540, 1135546, 1136697, 1141088, 1145346, 1143767, 1154851, 1137299,\n", + " 1139025, 1139033, 1149969, 1142347, 1154467, 1140467, 1141224, 1139386,\n", + " 1136917, 1141161, 1139495, 1147850, 1164807, 1137087, 1139800, 1144426,\n", + " 1138488, 1142053, 1141810, 1153666, 1140163, 1158749, 1137766, 1149111,\n", + " 1139190, 1141479, 1138708, 1142924, 1137661, 1137662, 1138423, 1143107,\n", + " 1144596, 1136871, 1144044, 1141578, 1140885, 1135327, 1140432, 1144182,\n", + " 1150906, 1144876, 1139559, 1147153, 1142646, 1141365, 1141367, 1153068,\n", + " 1141714, 1141664, 1149088, 1149090, 1149101, 1139019, 1153554, 1139510,\n", + " 1139768, 1139763, 1140093, 1138815, 1145200, 1143779, 1140619, 1140990,\n", + " 1146695, 1135047, 1147050, 1145873, 1152976, 1152980, 1163909, 1138995,\n", + " 1141925, 1144242, 1145332, 1150700, 1136891, 1143643, 1143637, 1141382,\n", + " 1143845, 1143851, 1136275, 1146024, 1146027, 1138085, 1141585, 1149928,\n", + " 1139990, 1143875, 1143883, 1147543, 1147150, 1147282, 1142816, 1136330,\n", + " 1142628, 1143051, 1148414, 1138923, 1157720, 1136836, 1136843, 1141280,\n", + " 1139329, 1139328, 1143345, 1144753, 1144611, 1144619, 1145818, 1137098,\n", + " 1144088, 1135813, 1150294, 1146523, 1143457, 1137711, 1144303, 1143937,\n", + " 1155701, 1147521, 1140364, 1149569, 1137990, 1147995, 1147999, 1134899,\n", + " 1134902, 1144011, 1139252, 1147131, 1145457, 1148704, 1141836, 1146742,\n", + " 1147070, 1149722, 1147025, 1147249, 1147248, 1139549, 1158226, 1143921,\n", + " 1165546, 1154526, 1145240, 1145751, 1146159, 1146178, 1151242, 1148217,\n", + " 1150445, 1149258, 1149261, 1149791, 1144514, 1144526, 1150339, 1152031,\n", + " 1144888, 1154263, 1149588, 1142286, 1140566, 1150127, 1147021, 1147023,\n", + " 1141949, 1154985, 1143564, 1149412, 1151717, 1148288, 1148290, 1152067,\n", + " 1147866, 1139097, 1154420, 1158786, 1148180, 1152561, 1157970, 1148734,\n", + " 1146559, 1149810, 1139936, 1143895, 1148204, 1145111, 1150935, 1148049,\n", + " 1148052, 1144863, 1150356, 1150365, 1146231, 1148084, 1148095, 1141017,\n", + " 1147446, 1147442, 1151816, 1152581, 1151906, 1156894, 1146571, 1141420,\n", + " 1136015, 1150630, 1150634, 1155163, 1155164, 1153447, 1145079, 1150890,\n", + " 1150894, 1146975, 1149359, 1146623, 1152109, 1152103, 1156325, 1153036,\n", + " 1153037, 1153038, 1137746, 1152622, 1140521, 1157107, 1154123, 1157826,\n", + " 1152673, 1151580, 1151573, 1151617, 1150578, 1145278, 1136131, 1148914,\n", + " 1148921, 1152958, 1167164, 1138991, 1152903, 1143995, 1152341, 1152344,\n", + " 1146816, 1156816, 1138279, 1152294, 1136028, 1158712, 1158704, 1152928,\n", + " 1151064, 1156420, 1163489, 1150150, 1150159, 1142266, 1148040, 1167408,\n", + " 1149795, 1144656, 1137048, 1148628, 1137458, 1154564, 1135705, 1157466,\n", + " 1156720, 1157225, 1143454, 1158862, 1148891, 1156505, 1157064, 1152833,\n", + " 1145184, 1139479, 1143502, 1150465, 1152179, 1151788, 1152737, 1150824,\n", + " 1150828, 1139525, 1139530, 1158308, 1155441, 1153359, 1150132, 1154529,\n", + " 1154528, 1142755, 1156207, 1160438, 1151379, 1145796, 1156463, 1158096,\n", + " 1154763, 1157898, 1158824, 1158325, 1148835, 1148654, 1155646, 1143263,\n", + " 1154240, 1170648, 1139620, 1154909, 1163127, 1179427, 1143189, 1143531,\n", + " 1155286, 1157663, 1158584, 1158578, 1156762, 1153786, 1159116, 1168159,\n", + " 1140918, 1134685, 1135601, 1148149, 1155852, 1146325, 1144463, 1152220,\n", + " 1140380, 1140381, 1155975, 1183179, 1156812, 1155393, 1159440, 1160163,\n", + " 1160164, 1136896, 1158753, 1158882, 1158886, 1140215, 1158447, 1158278,\n", + " 1155246, 1136493, 1136494, 1155296, 1156488, 1156490, 1153808, 1183284,\n", + " 1140049, 1142184, 1142191, 1158545, 1158558, 1156516, 1146126, 1142487,\n", + " 1142666, 1157747, 1144258, 1159071, 1158300, 1153052, 1153045, 1171551,\n", + " 1155763, 1138393, 1160645, 1150046, 1149063, 1149070, 1155479, 1154299,\n", + " 1147300, 1157600, 1164006, 1165651, 1149963, 1139782, 1154590, 1139592,\n", + " 1171518, 1169493, 1140643, 1148603, 1172725, 1143151, 1151872, 1155816,\n", + " 1156364, 1156361, 1158653, 1159032, 1152244, 1152247, 1155588, 1165993,\n", + " 1153924, 1158405, 1164580, 1163527, 1163525, 1145137, 1141471, 1151650,\n", + " 1151654, 1147427, 1184817, 1156739, 1165182, 1153663, 1166591, 1150648,\n", + " 1171040, 1144812, 1164741, 1142733, 1156303, 1156289, 1144051, 1145743,\n", + " 1145176, 1170307, 1144973, 1160730, 1143038, 1166053, 1147346, 1152631,\n", + " 1148124, 1193476, 1145889, 1145892, 1145900, 1145902, 1152203, 1170982,\n", + " 1168752, 1147339, 1147338, 1145664, 1192302, 1151598, 1167817, 1166653,\n", + " 1155172, 1150518, 1167915, 1156119, 1145531, 1144346, 1144350, 1144336,\n", + " 1157534, 1138376, 1154670, 1171408, 1154893, 1154882, 1169154, 1169162,\n", + " 1157331, 1138129, 1141051, 1169359, 1146337, 1158611, 1158623, 1158062,\n", + " 1173047, 1163292, 1149847, 1160135, 1154869, 1147416, 1155494, 1152353,\n", + " 1168400, 1155927, 1149402, 1148324, 1148325, 1154027, 1154028, 1153751,\n", + " 1159655, 1157158, 1157153, 1157373, 1147711, 1178961, 1151850, 1148128,\n", + " 1148131, 1157593, 1157595, 1169688, 1170490, 1169037, 1179576, 1155738,\n", + " 1165132, 1168604, 1178277, 1187435, 1166016, 1172605, 1144550, 1159100,\n", + " 1166682, 1154151, 1154148, 1154153, 1149169, 1186117, 1167657, 1143420,\n", + " 1179243, 1174333, 1171302, 1181241, 1169628, 1153803, 1153141, 1171318,\n", + " 1168778, 1158029, 1161255, 1155262, 1157792, 1157795, 1171623, 1171391,\n", + " 1157124, 1162820, 1172148, 1183699, 1180762, 1178218, 1145626, 1186793,\n", + " 1178776, 1146243, 1146252, 1153609, 1157770, 1157761, 1184148, 1158934,\n", + " 1155899, 1140399, 1169064, 1168621, 1182337, 1161819, 1156861, 1170336,\n", + " 1172609, 1186355, 1156539, 1139828, 1139831, 1150265, 1154812, 1192076,\n", + " 1189681, 1156055, 1193848, 1191993, 1149544, 1159083, 1191018, 1168683,\n", + " 1141002, 1193701, 1179409, 1162156, 1192326, 1151774, 1153733, 1181402,\n", + " 1193239, 1183774, 1152123, 1169786, 1162502, 1169707, 1187857, 1172423,\n", + " 1172429, 1158071, 1145395, 1167730, 1178133, 1180532, 1176829, 1155962,\n", + " 1172187, 1178292, 1165506, 1179769, 1169831, 1162670, 1167471, 1167460,\n", + " 1193296, 1187556, 1161945], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1199428, 1199282, 1198461, 1202255, 1198832, 1198840, 1201577,\n", + " 1203048, 1196956, 1202804, 1194866, 1198180, 1194770, 1194783, 1197466,\n", + " 1194649, 1195263, 1199135, 1201992, 1196031, 1194882, 1195895, 1199172,\n", + " 1197856, 1196517, 1195313, 1195320, 1196835, 1195999, 1198163, 1196711,\n", + " 1196717, 1199823, 1195148, 1195223, 1195270, 1197141, 1200765, 1197374,\n", + " 1197273, 1196109, 1196737, 1195847, 1195850, 1195026, 1195659, 1195536,\n", + " 1197474, 1197478, 1195778, 1202017, 1195353, 1198282, 1199333, 1199339,\n", + " 1200949, 1199856, 1196851, 1194928, 1197583, 1200872, 1199038, 1198413,\n", + " 1198410, 1199231, 1201916, 1194795, 1201511, 1197683, 1197601, 1201116,\n", + " 1196727, 1200894, 1198428, 1199889, 1198811, 1201547, 1200768, 1201824,\n", + " 1200452, 1198066, 1199445, 1201421, 1201405, 1194805, 1199712, 1201049,\n", + " 1200363, 1200553, 1203071, 1200429, 1202102, 1199879, 1201757, 1202138,\n", + " 1200690, 1200703, 1199917, 1200194, 1196779, 1202239, 1200899, 1201871,\n", + " 1199925, 1201796, 1200241, 1200398, 1200784, 1200785, 1198525, 1195664,\n", + " 1200445, 1198911, 1195415, 1201788, 1197822, 1199659, 1203102, 1201138,\n", + " 1201139, 1195157, 1198147, 1198824, 1200674, 1198819, 1203077, 1200296,\n", + " 1197652, 1200707, 1197335, 1196428, 1196424], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1199428, 1199282, 1198461, 1202255, 1198832, 1198840, 1201577,\n", + " 1203048, 1196956, 1202804, 1194866, 1198180, 1194770, 1194783, 1197466,\n", + " 1194649, 1195263, 1199135, 1201992, 1196031, 1194882, 1195895, 1199172,\n", + " 1197856, 1196517, 1195313, 1195320, 1196835, 1195999, 1198163, 1196711,\n", + " 1196717, 1199823, 1195148, 1195223, 1195270, 1197141, 1200765, 1197374,\n", + " 1197273, 1196109, 1196737, 1195847, 1195850, 1195026, 1195659, 1195536,\n", + " 1197474, 1197478, 1195778, 1202017, 1195353, 1198282, 1199333, 1199339,\n", + " 1200949, 1199856, 1196851, 1194928, 1197583, 1200872, 1199038, 1198413,\n", + " 1198410, 1199231, 1201916, 1194795, 1201511, 1197683, 1197601, 1201116,\n", + " 1196727, 1200894, 1198428, 1199889, 1198811, 1201547, 1200768, 1201824,\n", + " 1200452, 1198066, 1199445, 1201421, 1201405, 1194805, 1199712, 1201049,\n", + " 1200363, 1200553, 1203071, 1200429, 1202102, 1199879, 1201757, 1202138,\n", + " 1200690, 1200703, 1199917, 1200194, 1196779, 1202239, 1200899, 1201871,\n", + " 1199925, 1201796, 1200241, 1200398, 1200784, 1200785, 1198525, 1195664,\n", + " 1200445, 1198911, 1195415, 1201788, 1197822, 1199659, 1203102, 1201138,\n", + " 1201139, 1195157, 1198147, 1198824, 1200674, 1198819, 1203077, 1200296,\n", + " 1197652, 1200707, 1197335, 1196428, 1196424], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 1.9417e-01, -1.2247e-04, 8.4144e-01, ..., 1.2399e-01,\n", + " -1.8633e-03, -5.6059e-03],\n", + " [ 1.0859e-01, 5.4147e-02, 5.8715e-01, ..., 1.1992e-01,\n", + " -1.5802e-03, -3.3929e-03],\n", + " [ 1.4299e-01, 7.4150e-02, 6.4855e-01, ..., 1.4929e-01,\n", + " -1.7602e-03, -4.3689e-03],\n", + " ...,\n", + " [ 1.2111e-01, 5.8488e-02, 7.0111e-01, ..., 1.5379e-01,\n", + " -1.6336e-03, -4.4007e-03],\n", + " [ 2.5447e-01, -1.6756e-04, 9.5235e-01, ..., 1.1304e-01,\n", + " -1.9237e-03, -6.4691e-03],\n", + " [ 1.2668e-01, 7.3443e-02, 6.4823e-01, ..., 1.5990e-01,\n", + " -1.6195e-03, -4.2236e-03]], device='cuda:0'), 'paper': tensor([[ 1.7794e+00, -4.4449e-03, 2.1511e+00, ..., -5.9633e-04,\n", + " -2.6879e-02, 1.5912e+00],\n", + " [ 6.5960e-01, -5.2226e-03, 1.0069e+00, ..., -6.7029e-03,\n", + " -1.2449e-02, -1.1840e-04],\n", + " [ 1.4555e+00, -6.6720e-04, 2.0014e+00, ..., -1.7532e-03,\n", + " -2.1265e-02, 9.1759e-01],\n", + " ...,\n", + " [ 4.7140e-01, -2.4278e-02, 2.6990e+00, ..., -1.1731e-02,\n", + " -2.1677e-02, -9.1155e-03],\n", + " [ 3.8700e-01, -2.6587e-02, 2.7653e+00, ..., -9.3229e-03,\n", + " -1.9588e-02, -1.2143e-02],\n", + " [ 2.1321e+00, -1.1738e-02, 2.2478e+00, ..., 1.5272e-01,\n", + " -3.7153e-02, 2.8271e+00]], device='cuda:0'), 'author': tensor([[-1.1535e-03, 1.2351e-01, 2.4612e-01, ..., 1.4409e+00,\n", + " -9.6527e-04, 4.7411e-02],\n", + " [-5.2555e-03, 2.7499e-01, 3.0039e-01, ..., 1.1013e+00,\n", + " -2.9728e-03, -3.6920e-03],\n", + " [-5.0085e-03, 1.3424e-01, 3.5598e-01, ..., 1.0915e+00,\n", + " -3.2949e-03, -5.2472e-03],\n", + " ...,\n", + " [-3.6025e-03, 9.5193e-02, 3.8217e-01, ..., 1.0575e+00,\n", + " -3.1319e-03, -3.1249e-03],\n", + " [-1.3744e-03, 1.4651e-01, 2.4659e-01, ..., 1.5141e+00,\n", + " -1.0931e-03, 1.1497e-01],\n", + " [-6.8971e-04, 2.3554e-02, 1.5061e-01, ..., 1.4001e-01,\n", + " -2.4980e-04, -8.0816e-04]], device='cuda:0'), 'field_of_study': tensor([[-1.1006e-03, 4.4691e-01, 2.1927e-01, ..., -7.4080e-03,\n", + " 1.4448e-01, 3.0965e-01],\n", + " [-8.9465e-04, 3.7623e-01, 1.3867e-01, ..., -6.4157e-03,\n", + " 1.9603e-01, 1.5508e-01],\n", + " [ 3.6249e-02, 5.7000e-01, 2.5923e-01, ..., -6.1537e-03,\n", + " 2.8951e-01, 6.5480e-02],\n", + " ...,\n", + " [-1.9928e-03, 3.6668e-01, 1.8746e-01, ..., -5.9165e-03,\n", + " 5.8663e-02, 2.6866e-01],\n", + " [ 5.0178e-02, 6.3818e-01, 4.6858e-01, ..., -6.3077e-03,\n", + " 2.4075e-01, 5.3959e-02],\n", + " [-2.3051e-04, 4.5770e-01, 1.9168e-01, ..., -5.3025e-03,\n", + " 3.0988e-01, 1.3873e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 94, 94, 126, 191, 143, 191, 191, 191, 55, 48, 48, 48,\n", + " 470, 470, 1, 443, 454, 926, 926, 829, 925, 1001, 1129, 1018,\n", + " 811, 1252, 1430, 1430, 1117, 1112, 1112, 1189, 1112, 1520, 1581, 1581,\n", + " 1581, 1394, 1691, 1607, 1364, 1364, 1364, 1613, 1565, 1699, 1699, 1767,\n", + " 1715, 1812, 1812, 1672, 1812, 1838, 1838, 2013, 1838, 1838, 1838, 1838,\n", + " 1737, 1975, 1948, 1883, 1759, 1759, 1831, 1831, 1964, 1879, 1846, 1966,\n", + " 2016, 2016, 2011, 2088, 2088, 2088, 2088, 2145, 2145, 2063, 2063, 2063,\n", + " 2170, 2170, 2170, 2264, 2178, 2178, 2295, 2295, 2352, 2373, 2322, 2453,\n", + " 2502, 2366, 2420, 2468, 2613, 2454, 2454, 2454, 2454, 2454, 2540, 2672,\n", + " 2618, 2973, 2833, 2833, 2729, 2693, 3032, 2775, 2900, 3189, 2963, 3027,\n", + " 3338, 3338, 3352, 3366, 3462, 3535, 3472, 3773, 3479, 3354, 3548, 3711,\n", + " 3617, 3584, 3584, 3525, 3525, 3795, 3765, 3684, 3885, 3765, 4022, 3698,\n", + " 4120, 4158, 4174, 4159, 4243, 4246, 4191, 4270, 4405, 4317, 4317, 4470,\n", + " 4432, 4623, 4623, 4579, 4579, 4754, 4511, 4617, 4617, 4524, 4615, 4831,\n", + " 5172, 5138, 5023, 5218, 5307, 5390, 5355, 5434, 5515, 5573, 5869, 5777,\n", + " 5777, 5648, 5858, 5951, 5802, 5817, 5923, 5923, 6118, 6215, 6243, 6243,\n", + " 6141, 6141, 6141, 6266, 6310, 6249, 6281],\n", + " [ 20, 121, 43, 20, 132, 30, 28, 65, 42, 76, 47, 34,\n", + " 3, 63, 75, 128, 29, 72, 33, 50, 97, 72, 68, 122,\n", + " 69, 111, 79, 72, 101, 72, 128, 5, 91, 76, 76, 49,\n", + " 91, 118, 67, 129, 25, 53, 112, 86, 64, 15, 2, 90,\n", + " 94, 9, 125, 126, 114, 37, 113, 99, 89, 33, 127, 21,\n", + " 130, 114, 108, 46, 40, 70, 24, 23, 33, 39, 38, 4,\n", + " 50, 77, 100, 7, 26, 54, 0, 1, 66, 83, 124, 116,\n", + " 35, 14, 112, 30, 106, 17, 116, 83, 63, 57, 19, 60,\n", + " 20, 10, 12, 109, 61, 52, 93, 104, 120, 8, 10, 27,\n", + " 96, 102, 71, 130, 60, 27, 115, 85, 115, 57, 115, 60,\n", + " 78, 110, 64, 72, 60, 74, 115, 13, 74, 88, 10, 1,\n", + " 123, 92, 68, 98, 129, 4, 72, 117, 119, 79, 107, 2,\n", + " 115, 115, 4, 115, 115, 115, 110, 116, 116, 116, 83, 62,\n", + " 59, 0, 56, 72, 131, 105, 45, 16, 87, 81, 22, 58,\n", + " 82, 11, 44, 73, 41, 11, 55, 32, 6, 101, 11, 95,\n", + " 51, 101, 36, 84, 4, 18, 103, 2, 103, 72, 48, 8,\n", + " 65, 123, 112, 99, 31, 72, 80]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2854, 1580, 2855, ..., 339, 4602, 509],\n", + " [ 215, 12, 36, ..., 6839, 6784, 6790]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 39, 100, 0, ..., 110, 70, 27],\n", + " [ 45, 174, 59, ..., 6261, 6344, 6180]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 287, 287, 287, ..., 6710, 6710, 6735],\n", + " [ 86, 46, 708, ..., 57, 269, 229]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 595, 609, 269, ..., 286, 230, 269],\n", + " [ 188, 153, 143, ..., 6893, 6842, 6857]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4402, 5990, 5865, ..., 5838, 5519, 4518],\n", + " [ 109, 188, 74, ..., 6341, 6263, 6333]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 310, 287, 287, ..., 6710, 6773, 6814],\n", + " [2949, 3489, 3770, ..., 5721, 3659, 1427]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 126, 126, 126, ..., 6281, 6281, 6281],\n", + " [6734, 5626, 3468, ..., 3728, 3512, 3539]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006823\n", + "sampling 0.006668\n", + "noi time: 0.000749\n", + "get_vertex_data call: 0.034314\n", + "noi group time: 0.001902\n", + "eoi_group_time: 0.016559\n", + "second half: 0.219362\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 476, 18176, 32616, ..., 1132926, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 476, 18176, 32616, ..., 1132926, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208589, 1221609, 1208550, ..., 1934161, 1935109, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208589, 1221609, 1208550, ..., 1934161, 1935109, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137435, 1137214, 1141424, 1141435, 1136228, 1136237, 1136239, 1140285,\n", + " 1136349, 1138544, 1135160, 1135716, 1135726, 1137791, 1140785, 1140799,\n", + " 1141758, 1136210, 1136215, 1136962, 1141443, 1138897, 1151163, 1151164,\n", + " 1139808, 1139820, 1145373, 1145999, 1145993, 1143372, 1140772, 1140781,\n", + " 1150506, 1142965, 1139866, 1148576, 1149216, 1147943, 1155683, 1155689,\n", + " 1147473, 1135989, 1142881, 1144636, 1146992, 1134697, 1150193, 1136125,\n", + " 1152664, 1138345, 1147094, 1155019, 1147211, 1136268, 1134670, 1140540,\n", + " 1138112, 1138119, 1137171, 1137181, 1138356, 1151520, 1135913, 1140020,\n", + " 1140947, 1135367, 1135202, 1140767, 1137798, 1136047, 1154739, 1141036,\n", + " 1136288, 1134794, 1157450, 1136519, 1138504, 1138510, 1137334, 1136189,\n", + " 1143069, 1157088, 1136619, 1136623, 1144395, 1137534, 1135408, 1136705,\n", + " 1157395, 1157399, 1157393, 1157397, 1152376, 1148481, 1135579, 1135583,\n", + " 1142593, 1142607, 1136098, 1136108, 1135664, 1135675, 1138516, 1158136,\n", + " 1154132, 1139685, 1138436, 1138440, 1138445, 1140071, 1138461, 1138449,\n", + " 1157190, 1137920, 1137924, 1149328, 1138847, 1156606, 1147111, 1142611,\n", + " 1158984, 1145842, 1148531, 1148536, 1138067, 1140269, 1134992, 1136551,\n", + " 1158974, 1159018, 1141070, 1136067, 1138648, 1141985, 1152044, 1142303,\n", + " 1140660, 1137734, 1137728, 1140901, 1134742, 1134750, 1135549, 1137895,\n", + " 1144138, 1139889, 1141980, 1136398, 1137299, 1139025, 1140003, 1146832,\n", + " 1141695, 1135860, 1135861, 1136421, 1140470, 1139386, 1136917, 1143677,\n", + " 1144237, 1141786, 1139495, 1136763, 1141609, 1141300, 1147854, 1149433,\n", + " 1142050, 1142053, 1141821, 1143158, 1138469, 1148867, 1158600, 1139190,\n", + " 1141479, 1138708, 1137661, 1138424, 1143113, 1144596, 1136864, 1135319,\n", + " 1144182, 1137606, 1150906, 1150910, 1144865, 1139559, 1137841, 1142640,\n", + " 1162804, 1162811, 1141365, 1139514, 1139763, 1140983, 1140990, 1141557,\n", + " 1147050, 1145873, 1143551, 1152976, 1152980, 1152988, 1135457, 1139447,\n", + " 1139455, 1141925, 1144242, 1141841, 1136885, 1145974, 1136277, 1136275,\n", + " 1142098, 1146024, 1138093, 1154323, 1154328, 1139990, 1143293, 1151124,\n", + " 1147543, 1147545, 1147540, 1147150, 1148763, 1147282, 1147290, 1142816,\n", + " 1136330, 1143663, 1149366, 1149372, 1143051, 1143040, 1136160, 1138923,\n", + " 1136836, 1146105, 1139328, 1144778, 1141490, 1142149, 1142159, 1143345,\n", + " 1144754, 1144765, 1144611, 1144619, 1145808, 1145816, 1137098, 1139979,\n", + " 1135876, 1150294, 1144375, 1146523, 1143456, 1143457, 1144291, 1144303,\n", + " 1143937, 1147574, 1155700, 1143807, 1140356, 1140364, 1149581, 1166410,\n", + " 1147999, 1146949, 1144003, 1144013, 1148704, 1141836, 1146751, 1146742,\n", + " 1148473, 1153701, 1152328, 1149722, 1147025, 1147981, 1147979, 1139549,\n", + " 1147198, 1158226, 1143922, 1154526, 1145237, 1145240, 1145751, 1142378,\n", + " 1146159, 1148392, 1146178, 1151242, 1148223, 1152530, 1152537, 1151182,\n", + " 1150438, 1150445, 1149250, 1149263, 1147962, 1154438, 1151860, 1149787,\n", + " 1144174, 1150348, 1150339, 1147794, 1151480, 1151473, 1152031, 1152026,\n", + " 1154263, 1145259, 1135516, 1134873, 1149535, 1148698, 1147009, 1153959,\n", + " 1158944, 1141949, 1146783, 1141269, 1153574, 1148288, 1148294, 1148300,\n", + " 1139088, 1139097, 1154420, 1148188, 1139718, 1146675, 1146676, 1152482,\n", + " 1138874, 1141181, 1152436, 1157983, 1148725, 1146547, 1149821, 1148204,\n", + " 1153121, 1153188, 1159837, 1150932, 1150935, 1148058, 1148057, 1143092,\n", + " 1150352, 1150356, 1155098, 1143134, 1143133, 1141017, 1147442, 1152581,\n", + " 1135306, 1151906, 1151913, 1151908, 1154183, 1148498, 1146565, 1141420,\n", + " 1152784, 1136002, 1151352, 1147737, 1145079, 1146969, 1156403, 1156413,\n", + " 1151920, 1153249, 1150210, 1146623, 1151691, 1142986, 1152409, 1154063,\n", + " 1152097, 1153038, 1150085, 1145539, 1137746, 1146304, 1149203, 1157107,\n", + " 1155337, 1157842, 1157824, 1151617, 1150578, 1145930, 1152163, 1152224,\n", + " 1152225, 1151298, 1151311, 1152341, 1152344, 1156816, 1138272, 1138283,\n", + " 1138281, 1157147, 1136028, 1136029, 1158708, 1156619, 1156621, 1156622,\n", + " 1151187, 1152928, 1152934, 1152886, 1156422, 1150106, 1150159, 1144016,\n", + " 1142257, 1148040, 1155202, 1149300, 1157631, 1149792, 1144659, 1148628,\n", + " 1158530, 1137458, 1156068, 1155376, 1142041, 1142047, 1154377, 1139221,\n", + " 1157229, 1135429, 1135434, 1157547, 1142385, 1142396, 1158854, 1150872,\n", + " 1158916, 1156499, 1157064, 1157069, 1155418, 1152841, 1152833, 1157559,\n", + " 1150465, 1150475, 1135729, 1138816, 1156632, 1165711, 1156940, 1147810,\n", + " 1147818, 1158308, 1151340, 1155441, 1155452, 1150129, 1150136, 1144353,\n", + " 1140866, 1145768, 1145610, 1142755, 1172954, 1156269, 1156271, 1151379,\n", + " 1158638, 1155360, 1155122, 1152527, 1157182, 1151424, 1135396, 1135398,\n", + " 1146913, 1145806, 1156463, 1158096, 1155626, 1155628, 1155631, 1154550,\n", + " 1154555, 1136466, 1158824, 1157000, 1156994, 1148836, 1148834, 1148835,\n", + " 1155646, 1153368, 1143263, 1143257, 1143260, 1160223, 1154095, 1143196,\n", + " 1150371, 1153322, 1150068, 1144712, 1141623, 1141620, 1150983, 1158996,\n", + " 1149907, 1137381, 1159116, 1159115, 1145681, 1140913, 1134677, 1135601,\n", + " 1145515, 1150661, 1150659, 1155853, 1155848, 1155852, 1158665, 1158669,\n", + " 1157685, 1157684, 1149137, 1149145, 1152209, 1155433, 1156692, 1167625,\n", + " 1156027, 1157732, 1157735, 1159132, 1142466, 1155971, 1155975, 1155980,\n", + " 1158841, 1158846, 1156804, 1156812, 1155404, 1149700, 1154605, 1161302,\n", + " 1136910, 1136896, 1158886, 1158891, 1140221, 1157296, 1158814, 1158284,\n", + " 1155233, 1152463, 1153640, 1156665, 1142747, 1153808, 1144122, 1166424,\n", + " 1157858, 1142178, 1142191, 1158545, 1158547, 1146126, 1138110, 1158006,\n", + " 1144576, 1155528, 1165853, 1142487, 1161967, 1142663, 1152479, 1150674,\n", + " 1161645, 1159052, 1144270, 1159057, 1151830, 1157944, 1153052, 1159730,\n", + " 1144158, 1153841, 1156096, 1138384, 1138393, 1150046, 1149063, 1149070,\n", + " 1153514, 1153519, 1146876, 1138161, 1167210, 1156795, 1149956, 1139592,\n", + " 1148021, 1156983, 1166073, 1157356, 1140130, 1140643, 1141862, 1148600,\n", + " 1148603, 1148607, 1143139, 1156357, 1159029, 1159032, 1152244, 1152247,\n", + " 1171154, 1143740, 1155588, 1168426, 1144977, 1144989, 1149016, 1146510,\n", + " 1146509, 1144739, 1144750, 1152776, 1165413, 1141459, 1147427, 1156739,\n", + " 1156742, 1153648, 1166591, 1150309, 1168743, 1144810, 1144812, 1192117,\n", + " 1164741, 1156303, 1145743, 1148683, 1145228, 1160232, 1169288, 1166462,\n", + " 1147673, 1169509, 1142136, 1143025, 1169233, 1145445, 1155905, 1148124,\n", + " 1145892, 1145902, 1148426, 1153520, 1153535, 1163961, 1175240, 1143404,\n", + " 1158734, 1147338, 1150783, 1179499, 1151585, 1166653, 1193345, 1165011,\n", + " 1156119, 1156118, 1154614, 1144336, 1157534, 1154670, 1135855, 1169162,\n", + " 1157331, 1157333, 1151668, 1169359, 1154364, 1149452, 1158623, 1173047,\n", + " 1149846, 1149847, 1147423, 1169948, 1155492, 1155502, 1152353, 1168369,\n", + " 1143170, 1143858, 1155931, 1161130, 1169133, 1172838, 1177426, 1173307,\n", + " 1189233, 1154027, 1152154, 1152151, 1152158, 1159658, 1151202, 1151697,\n", + " 1157153, 1147711, 1151850, 1148128, 1148131, 1147934, 1170488, 1169037,\n", + " 1172961, 1155730, 1155739, 1165132, 1166746, 1140326, 1144550, 1173092,\n", + " 1166682, 1170874, 1154148, 1149169, 1159751, 1180596, 1143279, 1169969,\n", + " 1164956, 1171302, 1171309, 1181241, 1169619, 1153803, 1153805, 1178810,\n", + " 1178805, 1164818, 1164828, 1183129, 1183123, 1161255, 1161262, 1182353,\n", + " 1155262, 1154718, 1143330, 1151488, 1151496, 1171616, 1171623, 1157991,\n", + " 1187454, 1187263, 1153898, 1154500, 1134650, 1180763, 1145626, 1185116,\n", + " 1178028, 1178757, 1186727, 1157483, 1179080, 1149755, 1170069, 1158771,\n", + " 1158779, 1186509, 1155890, 1155892, 1162988, 1184317, 1140399, 1182335,\n", + " 1165474, 1180521, 1164231, 1176976, 1180633, 1161819, 1146172, 1147182,\n", + " 1181181, 1185384, 1164133, 1163622, 1139828, 1139831, 1139837, 1154812,\n", + " 1164914, 1156049, 1156055, 1146386, 1173058, 1186648, 1190297, 1186516,\n", + " 1156842, 1191197, 1169964, 1140993, 1170201, 1170886, 1181283, 1153733,\n", + " 1184366, 1190528, 1169698, 1178637, 1153587, 1177842, 1156681, 1172122,\n", + " 1158064, 1158070, 1166789, 1145395, 1160967, 1152084, 1174341, 1188107,\n", + " 1183297, 1187541, 1187547, 1192336, 1181698, 1194153, 1189368, 1167471,\n", + " 1157017, 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137435, 1137214, 1141424, 1141435, 1136228, 1136237, 1136239, 1140285,\n", + " 1136349, 1138544, 1135160, 1135716, 1135726, 1137791, 1140785, 1140799,\n", + " 1141758, 1136210, 1136215, 1136962, 1141443, 1138897, 1151163, 1151164,\n", + " 1139808, 1139820, 1145373, 1145999, 1145993, 1143372, 1140772, 1140781,\n", + " 1150506, 1142965, 1139866, 1148576, 1149216, 1147943, 1155683, 1155689,\n", + " 1147473, 1135989, 1142881, 1144636, 1146992, 1134697, 1150193, 1136125,\n", + " 1152664, 1138345, 1147094, 1155019, 1147211, 1136268, 1134670, 1140540,\n", + " 1138112, 1138119, 1137171, 1137181, 1138356, 1151520, 1135913, 1140020,\n", + " 1140947, 1135367, 1135202, 1140767, 1137798, 1136047, 1154739, 1141036,\n", + " 1136288, 1134794, 1157450, 1136519, 1138504, 1138510, 1137334, 1136189,\n", + " 1143069, 1157088, 1136619, 1136623, 1144395, 1137534, 1135408, 1136705,\n", + " 1157395, 1157399, 1157393, 1157397, 1152376, 1148481, 1135579, 1135583,\n", + " 1142593, 1142607, 1136098, 1136108, 1135664, 1135675, 1138516, 1158136,\n", + " 1154132, 1139685, 1138436, 1138440, 1138445, 1140071, 1138461, 1138449,\n", + " 1157190, 1137920, 1137924, 1149328, 1138847, 1156606, 1147111, 1142611,\n", + " 1158984, 1145842, 1148531, 1148536, 1138067, 1140269, 1134992, 1136551,\n", + " 1158974, 1159018, 1141070, 1136067, 1138648, 1141985, 1152044, 1142303,\n", + " 1140660, 1137734, 1137728, 1140901, 1134742, 1134750, 1135549, 1137895,\n", + " 1144138, 1139889, 1141980, 1136398, 1137299, 1139025, 1140003, 1146832,\n", + " 1141695, 1135860, 1135861, 1136421, 1140470, 1139386, 1136917, 1143677,\n", + " 1144237, 1141786, 1139495, 1136763, 1141609, 1141300, 1147854, 1149433,\n", + " 1142050, 1142053, 1141821, 1143158, 1138469, 1148867, 1158600, 1139190,\n", + " 1141479, 1138708, 1137661, 1138424, 1143113, 1144596, 1136864, 1135319,\n", + " 1144182, 1137606, 1150906, 1150910, 1144865, 1139559, 1137841, 1142640,\n", + " 1162804, 1162811, 1141365, 1139514, 1139763, 1140983, 1140990, 1141557,\n", + " 1147050, 1145873, 1143551, 1152976, 1152980, 1152988, 1135457, 1139447,\n", + " 1139455, 1141925, 1144242, 1141841, 1136885, 1145974, 1136277, 1136275,\n", + " 1142098, 1146024, 1138093, 1154323, 1154328, 1139990, 1143293, 1151124,\n", + " 1147543, 1147545, 1147540, 1147150, 1148763, 1147282, 1147290, 1142816,\n", + " 1136330, 1143663, 1149366, 1149372, 1143051, 1143040, 1136160, 1138923,\n", + " 1136836, 1146105, 1139328, 1144778, 1141490, 1142149, 1142159, 1143345,\n", + " 1144754, 1144765, 1144611, 1144619, 1145808, 1145816, 1137098, 1139979,\n", + " 1135876, 1150294, 1144375, 1146523, 1143456, 1143457, 1144291, 1144303,\n", + " 1143937, 1147574, 1155700, 1143807, 1140356, 1140364, 1149581, 1166410,\n", + " 1147999, 1146949, 1144003, 1144013, 1148704, 1141836, 1146751, 1146742,\n", + " 1148473, 1153701, 1152328, 1149722, 1147025, 1147981, 1147979, 1139549,\n", + " 1147198, 1158226, 1143922, 1154526, 1145237, 1145240, 1145751, 1142378,\n", + " 1146159, 1148392, 1146178, 1151242, 1148223, 1152530, 1152537, 1151182,\n", + " 1150438, 1150445, 1149250, 1149263, 1147962, 1154438, 1151860, 1149787,\n", + " 1144174, 1150348, 1150339, 1147794, 1151480, 1151473, 1152031, 1152026,\n", + " 1154263, 1145259, 1135516, 1134873, 1149535, 1148698, 1147009, 1153959,\n", + " 1158944, 1141949, 1146783, 1141269, 1153574, 1148288, 1148294, 1148300,\n", + " 1139088, 1139097, 1154420, 1148188, 1139718, 1146675, 1146676, 1152482,\n", + " 1138874, 1141181, 1152436, 1157983, 1148725, 1146547, 1149821, 1148204,\n", + " 1153121, 1153188, 1159837, 1150932, 1150935, 1148058, 1148057, 1143092,\n", + " 1150352, 1150356, 1155098, 1143134, 1143133, 1141017, 1147442, 1152581,\n", + " 1135306, 1151906, 1151913, 1151908, 1154183, 1148498, 1146565, 1141420,\n", + " 1152784, 1136002, 1151352, 1147737, 1145079, 1146969, 1156403, 1156413,\n", + " 1151920, 1153249, 1150210, 1146623, 1151691, 1142986, 1152409, 1154063,\n", + " 1152097, 1153038, 1150085, 1145539, 1137746, 1146304, 1149203, 1157107,\n", + " 1155337, 1157842, 1157824, 1151617, 1150578, 1145930, 1152163, 1152224,\n", + " 1152225, 1151298, 1151311, 1152341, 1152344, 1156816, 1138272, 1138283,\n", + " 1138281, 1157147, 1136028, 1136029, 1158708, 1156619, 1156621, 1156622,\n", + " 1151187, 1152928, 1152934, 1152886, 1156422, 1150106, 1150159, 1144016,\n", + " 1142257, 1148040, 1155202, 1149300, 1157631, 1149792, 1144659, 1148628,\n", + " 1158530, 1137458, 1156068, 1155376, 1142041, 1142047, 1154377, 1139221,\n", + " 1157229, 1135429, 1135434, 1157547, 1142385, 1142396, 1158854, 1150872,\n", + " 1158916, 1156499, 1157064, 1157069, 1155418, 1152841, 1152833, 1157559,\n", + " 1150465, 1150475, 1135729, 1138816, 1156632, 1165711, 1156940, 1147810,\n", + " 1147818, 1158308, 1151340, 1155441, 1155452, 1150129, 1150136, 1144353,\n", + " 1140866, 1145768, 1145610, 1142755, 1172954, 1156269, 1156271, 1151379,\n", + " 1158638, 1155360, 1155122, 1152527, 1157182, 1151424, 1135396, 1135398,\n", + " 1146913, 1145806, 1156463, 1158096, 1155626, 1155628, 1155631, 1154550,\n", + " 1154555, 1136466, 1158824, 1157000, 1156994, 1148836, 1148834, 1148835,\n", + " 1155646, 1153368, 1143263, 1143257, 1143260, 1160223, 1154095, 1143196,\n", + " 1150371, 1153322, 1150068, 1144712, 1141623, 1141620, 1150983, 1158996,\n", + " 1149907, 1137381, 1159116, 1159115, 1145681, 1140913, 1134677, 1135601,\n", + " 1145515, 1150661, 1150659, 1155853, 1155848, 1155852, 1158665, 1158669,\n", + " 1157685, 1157684, 1149137, 1149145, 1152209, 1155433, 1156692, 1167625,\n", + " 1156027, 1157732, 1157735, 1159132, 1142466, 1155971, 1155975, 1155980,\n", + " 1158841, 1158846, 1156804, 1156812, 1155404, 1149700, 1154605, 1161302,\n", + " 1136910, 1136896, 1158886, 1158891, 1140221, 1157296, 1158814, 1158284,\n", + " 1155233, 1152463, 1153640, 1156665, 1142747, 1153808, 1144122, 1166424,\n", + " 1157858, 1142178, 1142191, 1158545, 1158547, 1146126, 1138110, 1158006,\n", + " 1144576, 1155528, 1165853, 1142487, 1161967, 1142663, 1152479, 1150674,\n", + " 1161645, 1159052, 1144270, 1159057, 1151830, 1157944, 1153052, 1159730,\n", + " 1144158, 1153841, 1156096, 1138384, 1138393, 1150046, 1149063, 1149070,\n", + " 1153514, 1153519, 1146876, 1138161, 1167210, 1156795, 1149956, 1139592,\n", + " 1148021, 1156983, 1166073, 1157356, 1140130, 1140643, 1141862, 1148600,\n", + " 1148603, 1148607, 1143139, 1156357, 1159029, 1159032, 1152244, 1152247,\n", + " 1171154, 1143740, 1155588, 1168426, 1144977, 1144989, 1149016, 1146510,\n", + " 1146509, 1144739, 1144750, 1152776, 1165413, 1141459, 1147427, 1156739,\n", + " 1156742, 1153648, 1166591, 1150309, 1168743, 1144810, 1144812, 1192117,\n", + " 1164741, 1156303, 1145743, 1148683, 1145228, 1160232, 1169288, 1166462,\n", + " 1147673, 1169509, 1142136, 1143025, 1169233, 1145445, 1155905, 1148124,\n", + " 1145892, 1145902, 1148426, 1153520, 1153535, 1163961, 1175240, 1143404,\n", + " 1158734, 1147338, 1150783, 1179499, 1151585, 1166653, 1193345, 1165011,\n", + " 1156119, 1156118, 1154614, 1144336, 1157534, 1154670, 1135855, 1169162,\n", + " 1157331, 1157333, 1151668, 1169359, 1154364, 1149452, 1158623, 1173047,\n", + " 1149846, 1149847, 1147423, 1169948, 1155492, 1155502, 1152353, 1168369,\n", + " 1143170, 1143858, 1155931, 1161130, 1169133, 1172838, 1177426, 1173307,\n", + " 1189233, 1154027, 1152154, 1152151, 1152158, 1159658, 1151202, 1151697,\n", + " 1157153, 1147711, 1151850, 1148128, 1148131, 1147934, 1170488, 1169037,\n", + " 1172961, 1155730, 1155739, 1165132, 1166746, 1140326, 1144550, 1173092,\n", + " 1166682, 1170874, 1154148, 1149169, 1159751, 1180596, 1143279, 1169969,\n", + " 1164956, 1171302, 1171309, 1181241, 1169619, 1153803, 1153805, 1178810,\n", + " 1178805, 1164818, 1164828, 1183129, 1183123, 1161255, 1161262, 1182353,\n", + " 1155262, 1154718, 1143330, 1151488, 1151496, 1171616, 1171623, 1157991,\n", + " 1187454, 1187263, 1153898, 1154500, 1134650, 1180763, 1145626, 1185116,\n", + " 1178028, 1178757, 1186727, 1157483, 1179080, 1149755, 1170069, 1158771,\n", + " 1158779, 1186509, 1155890, 1155892, 1162988, 1184317, 1140399, 1182335,\n", + " 1165474, 1180521, 1164231, 1176976, 1180633, 1161819, 1146172, 1147182,\n", + " 1181181, 1185384, 1164133, 1163622, 1139828, 1139831, 1139837, 1154812,\n", + " 1164914, 1156049, 1156055, 1146386, 1173058, 1186648, 1190297, 1186516,\n", + " 1156842, 1191197, 1169964, 1140993, 1170201, 1170886, 1181283, 1153733,\n", + " 1184366, 1190528, 1169698, 1178637, 1153587, 1177842, 1156681, 1172122,\n", + " 1158064, 1158070, 1166789, 1145395, 1160967, 1152084, 1174341, 1188107,\n", + " 1183297, 1187541, 1187547, 1192336, 1181698, 1194153, 1189368, 1167471,\n", + " 1157017, 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197896, 1195711, 1199428, 1197719, 1199826, 1199282, 1196199, 1198832,\n", + " 1198844, 1201577, 1201581, 1201582, 1194626, 1201670, 1200650, 1197359,\n", + " 1198633, 1198557, 1194771, 1196631, 1194648, 1195263, 1199135, 1201992,\n", + " 1198095, 1195459, 1195463, 1198306, 1194882, 1195888, 1195895, 1199178,\n", + " 1197831, 1195313, 1198669, 1198958, 1198167, 1196711, 1196717, 1199823,\n", + " 1195148, 1195223, 1195270, 1197136, 1197140, 1195841, 1195847, 1195659,\n", + " 1195541, 1197478, 1195778, 1195626, 1199699, 1195351, 1195353, 1198282,\n", + " 1199329, 1199333, 1196033, 1194941, 1194928, 1199628, 1201636, 1199804,\n", + " 1197676, 1197990, 1202457, 1200079, 1200869, 1200872, 1199024, 1198407,\n", + " 1198404, 1198410, 1199745, 1200060, 1199951, 1196727, 1195773, 1200892,\n", + " 1198428, 1199418, 1201534, 1201543, 1201547, 1199085, 1201827, 1200570,\n", + " 1198066, 1198593, 1199445, 1201156, 1200991, 1201056, 1200918, 1194805,\n", + " 1200363, 1200526, 1202047, 1200546, 1200555, 1200429, 1197097, 1196779,\n", + " 1196256, 1202239, 1200899, 1202338, 1202175, 1202666, 1195884, 1201291,\n", + " 1203329, 1203336, 1196966, 1200784, 1195438, 1195664, 1200445, 1198929,\n", + " 1198932, 1195421, 1197822, 1197821, 1196412, 1195285, 1198587, 1198146,\n", + " 1199395, 1200014, 1199786, 1195070, 1195066, 1203300], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197896, 1195711, 1199428, 1197719, 1199826, 1199282, 1196199, 1198832,\n", + " 1198844, 1201577, 1201581, 1201582, 1194626, 1201670, 1200650, 1197359,\n", + " 1198633, 1198557, 1194771, 1196631, 1194648, 1195263, 1199135, 1201992,\n", + " 1198095, 1195459, 1195463, 1198306, 1194882, 1195888, 1195895, 1199178,\n", + " 1197831, 1195313, 1198669, 1198958, 1198167, 1196711, 1196717, 1199823,\n", + " 1195148, 1195223, 1195270, 1197136, 1197140, 1195841, 1195847, 1195659,\n", + " 1195541, 1197478, 1195778, 1195626, 1199699, 1195351, 1195353, 1198282,\n", + " 1199329, 1199333, 1196033, 1194941, 1194928, 1199628, 1201636, 1199804,\n", + " 1197676, 1197990, 1202457, 1200079, 1200869, 1200872, 1199024, 1198407,\n", + " 1198404, 1198410, 1199745, 1200060, 1199951, 1196727, 1195773, 1200892,\n", + " 1198428, 1199418, 1201534, 1201543, 1201547, 1199085, 1201827, 1200570,\n", + " 1198066, 1198593, 1199445, 1201156, 1200991, 1201056, 1200918, 1194805,\n", + " 1200363, 1200526, 1202047, 1200546, 1200555, 1200429, 1197097, 1196779,\n", + " 1196256, 1202239, 1200899, 1202338, 1202175, 1202666, 1195884, 1201291,\n", + " 1203329, 1203336, 1196966, 1200784, 1195438, 1195664, 1200445, 1198929,\n", + " 1198932, 1195421, 1197822, 1197821, 1196412, 1195285, 1198587, 1198146,\n", + " 1199395, 1200014, 1199786, 1195070, 1195066, 1203300], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 8.6966e-02, 1.1794e-02, 6.5110e-01, ..., 1.8272e-01,\n", + " -2.2560e-03, -4.1566e-03],\n", + " [ 1.2078e-01, 5.2775e-02, 6.9783e-01, ..., 1.3886e-01,\n", + " -1.5372e-03, -4.4556e-03],\n", + " [ 2.0049e-01, 1.8297e-02, 8.3657e-01, ..., 1.3334e-01,\n", + " -1.8704e-03, -5.4758e-03],\n", + " ...,\n", + " [ 2.1187e-01, -8.6521e-05, 8.8213e-01, ..., 1.4126e-01,\n", + " -2.1025e-03, -5.7393e-03],\n", + " [ 1.1666e-01, 1.1110e-03, 6.3724e-01, ..., 1.5393e-01,\n", + " -2.1578e-03, -4.2566e-03],\n", + " [ 1.5614e-01, 7.7998e-02, 5.7583e-01, ..., 1.2294e-01,\n", + " -1.3210e-03, -4.0125e-03]], device='cuda:0'), 'paper': tensor([[ 6.4877e-01, -1.4293e-03, 1.6705e+00, ..., -5.8960e-03,\n", + " -1.2995e-02, -3.0628e-03],\n", + " [ 1.8938e+00, -4.2653e-03, 2.4242e+00, ..., -3.4183e-03,\n", + " -2.4204e-02, 1.0370e+00],\n", + " [ 7.6431e-01, -3.0347e-03, 1.0529e+00, ..., -6.8296e-03,\n", + " -1.0928e-02, -1.1681e-03],\n", + " ...,\n", + " [ 1.9482e-01, -1.6460e-03, 1.8181e+00, ..., -3.3647e-03,\n", + " -1.0041e-02, -5.6042e-03],\n", + " [ 3.1387e-01, -1.1011e-02, 1.9883e+00, ..., -5.0350e-03,\n", + " -1.2743e-02, -5.8320e-03],\n", + " [ 2.1376e+00, -1.1695e-02, 2.2456e+00, ..., 1.4574e-01,\n", + " -3.7183e-02, 2.8214e+00]], device='cuda:0'), 'author': tensor([[-2.7702e-03, 1.7765e-01, 3.4866e-01, ..., 1.0099e+00,\n", + " -2.9386e-03, -2.0652e-03],\n", + " [-6.8971e-04, 2.3554e-02, 1.5061e-01, ..., 1.4001e-01,\n", + " -2.4980e-04, -8.0816e-04],\n", + " [-1.4102e-03, 1.0354e-01, 3.0471e-01, ..., 1.5205e+00,\n", + " -3.2635e-04, 9.7246e-02],\n", + " ...,\n", + " [-2.0829e-03, 1.8619e-01, 3.2820e-01, ..., 1.1042e+00,\n", + " -5.1238e-03, -4.0409e-03],\n", + " [-1.8448e-03, 1.7924e-01, 2.9858e-01, ..., 1.4428e+00,\n", + " -1.0567e-03, 6.3576e-02],\n", + " [-1.6425e-03, 1.5750e-01, 2.1603e-01, ..., 1.4098e+00,\n", + " -1.1824e-03, 7.5567e-02]], device='cuda:0'), 'field_of_study': tensor([[ 3.3017e-03, 4.9577e-01, 3.9992e-01, ..., -7.2606e-03,\n", + " 1.4403e-01, 3.0333e-01],\n", + " [-1.3635e-03, 3.5997e-01, 7.6264e-02, ..., -7.5339e-03,\n", + " 2.3340e-01, 2.4932e-01],\n", + " [-6.0098e-04, 3.8762e-01, 1.6948e-01, ..., -6.5376e-03,\n", + " 1.7799e-01, 2.0086e-01],\n", + " ...,\n", + " [-7.3773e-04, 4.3582e-01, 2.0807e-01, ..., -6.4436e-03,\n", + " 2.4831e-01, 1.6075e-01],\n", + " [-7.0573e-04, 3.5462e-01, 9.3134e-02, ..., -7.1740e-03,\n", + " 1.6040e-01, 1.7699e-01],\n", + " [ 1.7106e-02, 5.5968e-01, 2.6052e-01, ..., -5.2974e-03,\n", + " 2.6802e-01, -4.5318e-04]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 158, 27, 60, 20, 80, 36, 9, 6, 16, 16, 16, 98,\n", + " 139, 27, 27, 27, 236, 262, 459, 950, 407, 407, 407, 472,\n", + " 539, 546, 551, 690, 565, 565, 713, 816, 816, 877, 997, 997,\n", + " 997, 997, 1091, 796, 878, 1039, 1057, 933, 881, 881, 1240, 1377,\n", + " 1257, 1201, 1231, 1209, 1209, 1444, 1254, 1483, 1417, 1450, 1305, 1230,\n", + " 1230, 1468, 1239, 1239, 1239, 1417, 1417, 1511, 1458, 1411, 1411, 1411,\n", + " 1411, 1445, 1467, 1631, 1683, 1683, 1494, 1683, 1683, 1494, 1494, 1624,\n", + " 1624, 1705, 1683, 1683, 1683, 2160, 1755, 1767, 2014, 2014, 1982, 1982,\n", + " 1919, 1919, 1919, 1793, 1886, 1850, 1850, 2083, 2108, 2035, 2260, 2260,\n", + " 2260, 2308, 2429, 2397, 2473, 2463, 2675, 2861, 2683, 2786, 2786, 2781,\n", + " 2781, 2882, 2816, 2990, 2990, 3065, 3063, 3138, 3187, 3318, 3318, 3234,\n", + " 3234, 3234, 3234, 3234, 3234, 3234, 3234, 3234, 3234, 3130, 3261, 3258,\n", + " 3258, 3310, 3310, 3469, 3117, 3405, 3405, 3335, 3330, 3390, 3336, 3416,\n", + " 3527, 3805, 3464, 3537, 3884, 3629, 3629, 3629, 3629, 3602, 4006, 3907,\n", + " 4030, 3926, 4049, 4133, 4102, 4151, 4172, 4307, 4363, 4488, 4327, 4444,\n", + " 4708, 4590, 4590, 4590, 4590, 4590, 4456, 4456, 4621, 4621, 4588, 4588,\n", + " 4588, 4588, 4806, 4743, 4772, 5031, 5012, 4933, 5070, 5057, 5220, 5314,\n", + " 5359, 5674, 5650, 5746, 5719, 5631, 6117, 5983, 6127, 5982, 5893, 5893,\n", + " 6113, 6132, 6132, 6059, 5989, 5989, 5977],\n", + " [ 53, 7, 66, 75, 104, 33, 93, 16, 29, 44, 127, 6,\n", + " 113, 69, 81, 10, 59, 94, 86, 105, 124, 18, 105, 61,\n", + " 20, 103, 31, 86, 4, 56, 61, 18, 105, 20, 48, 30,\n", + " 67, 17, 90, 122, 125, 33, 77, 115, 18, 105, 85, 78,\n", + " 105, 86, 86, 42, 19, 75, 76, 86, 54, 132, 77, 114,\n", + " 94, 62, 74, 94, 83, 94, 120, 21, 17, 133, 22, 109,\n", + " 37, 76, 12, 21, 55, 126, 23, 29, 77, 103, 91, 9,\n", + " 111, 94, 99, 9, 118, 116, 54, 50, 27, 57, 80, 97,\n", + " 21, 3, 127, 21, 79, 114, 94, 132, 46, 107, 36, 94,\n", + " 114, 24, 89, 116, 29, 62, 40, 64, 5, 84, 111, 63,\n", + " 87, 86, 73, 13, 59, 77, 58, 29, 35, 116, 72, 106,\n", + " 17, 23, 38, 118, 91, 26, 28, 101, 120, 50, 21, 28,\n", + " 11, 2, 25, 88, 8, 110, 121, 20, 60, 77, 31, 96,\n", + " 122, 43, 95, 45, 77, 44, 8, 102, 71, 51, 68, 98,\n", + " 79, 75, 132, 61, 17, 33, 70, 100, 128, 65, 52, 47,\n", + " 61, 49, 92, 55, 77, 99, 108, 89, 45, 61, 29, 32,\n", + " 69, 117, 1, 23, 39, 128, 8, 41, 14, 19, 86, 129,\n", + " 112, 34, 77, 131, 23, 130, 3, 0, 60, 15, 119, 77,\n", + " 77, 123, 3, 82, 48, 96, 77]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1322, 743, 2801, ..., 6545, 6634, 413],\n", + " [ 83, 241, 141, ..., 6623, 6623, 6567]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 88, 128, 75, ..., 132, 80, 29],\n", + " [ 34, 31, 5, ..., 6163, 6107, 6041]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 265, 265, 265, ..., 6634, 6634, 6634],\n", + " [ 553, 837, 828, ..., 276, 76, 229]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 188, 435, 147, ..., 787, 60, 821],\n", + " [ 278, 83, 56, ..., 6662, 6621, 6601]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4000, 3059, 5977, ..., 2939, 5890, 5552],\n", + " [ 26, 42, 33, ..., 6073, 6044, 6102]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 265, 265, 265, ..., 6634, 6634, 6634],\n", + " [2231, 2624, 3059, ..., 1199, 1769, 839]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 9, 6, 6, ..., 5989, 5989, 5989],\n", + " [4581, 5852, 6003, ..., 3749, 3314, 3730]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.004252\n", + "sampling 0.0041\n", + "noi time: 0.000688\n", + "get_vertex_data call: 0.037295\n", + "noi group time: 0.002902\n", + "eoi_group_time: 0.011569\n", + "second half: 0.221822\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 1334, 14490, 31145, ..., 1100728, 1119052, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 1334, 14490, 31145, ..., 1100728, 1119052, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1211565, 1231438, 1221045, ..., 1931107, 1930681, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1211565, 1231438, 1221045, ..., 1931107, 1930681, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1141424, 1141439, ..., 1187566, 1157022, 1161937],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1141424, 1141439, ..., 1187566, 1157022, 1161937],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195203, 1195406, 1198242, 1197719, 1199282, 1202255, 1198844, 1201577,\n", + " 1201582, 1201465, 1203047, 1197359, 1198690, 1198694, 1202804, 1202812,\n", + " 1197512, 1197514, 1194866, 1194782, 1196631, 1196588, 1197434, 1195512,\n", + " 1195263, 1199135, 1196529, 1196534, 1201992, 1196031, 1198542, 1198543,\n", + " 1197701, 1194958, 1195895, 1199172, 1195740, 1194754, 1194759, 1198989,\n", + " 1198643, 1199823, 1195265, 1195278, 1196247, 1197273, 1196109, 1194859,\n", + " 1195847, 1195850, 1198915, 1195541, 1199315, 1197474, 1197199, 1200032,\n", + " 1195918, 1196393, 1196283, 1198280, 1199059, 1199191, 1198673, 1195119,\n", + " 1197577, 1199628, 1197676, 1200872, 1200878, 1199152, 1199154, 1198406,\n", + " 1198410, 1199231, 1195020, 1200116, 1194795, 1199949, 1201511, 1196496,\n", + " 1196501, 1200668, 1197601, 1196727, 1195773, 1202618, 1200887, 1200025,\n", + " 1199418, 1199421, 1199555, 1201169, 1199445, 1201212, 1201156, 1202632,\n", + " 1200913, 1202640, 1203350, 1201691, 1201729, 1200553, 1203219, 1199904,\n", + " 1200899, 1197546, 1202706, 1201552, 1195876, 1201291, 1198478, 1203329,\n", + " 1201590, 1199929, 1202695, 1198562, 1196960, 1196975, 1200784, 1195048,\n", + " 1196816, 1195679, 1200478, 1202432, 1200445, 1197334, 1198911, 1197816,\n", + " 1198127, 1198973, 1199659, 1196375, 1203102, 1194732, 1198824, 1197735,\n", + " 1199784, 1198819, 1200974, 1197335, 1197343, 1195082, 1197035, 1203162],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195203, 1195406, 1198242, 1197719, 1199282, 1202255, 1198844, 1201577,\n", + " 1201582, 1201465, 1203047, 1197359, 1198690, 1198694, 1202804, 1202812,\n", + " 1197512, 1197514, 1194866, 1194782, 1196631, 1196588, 1197434, 1195512,\n", + " 1195263, 1199135, 1196529, 1196534, 1201992, 1196031, 1198542, 1198543,\n", + " 1197701, 1194958, 1195895, 1199172, 1195740, 1194754, 1194759, 1198989,\n", + " 1198643, 1199823, 1195265, 1195278, 1196247, 1197273, 1196109, 1194859,\n", + " 1195847, 1195850, 1198915, 1195541, 1199315, 1197474, 1197199, 1200032,\n", + " 1195918, 1196393, 1196283, 1198280, 1199059, 1199191, 1198673, 1195119,\n", + " 1197577, 1199628, 1197676, 1200872, 1200878, 1199152, 1199154, 1198406,\n", + " 1198410, 1199231, 1195020, 1200116, 1194795, 1199949, 1201511, 1196496,\n", + " 1196501, 1200668, 1197601, 1196727, 1195773, 1202618, 1200887, 1200025,\n", + " 1199418, 1199421, 1199555, 1201169, 1199445, 1201212, 1201156, 1202632,\n", + " 1200913, 1202640, 1203350, 1201691, 1201729, 1200553, 1203219, 1199904,\n", + " 1200899, 1197546, 1202706, 1201552, 1195876, 1201291, 1198478, 1203329,\n", + " 1201590, 1199929, 1202695, 1198562, 1196960, 1196975, 1200784, 1195048,\n", + " 1196816, 1195679, 1200478, 1202432, 1200445, 1197334, 1198911, 1197816,\n", + " 1198127, 1198973, 1199659, 1196375, 1203102, 1194732, 1198824, 1197735,\n", + " 1199784, 1198819, 1200974, 1197335, 1197343, 1195082, 1197035, 1203162],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 7.9992e-02, 3.3468e-02, 6.1555e-01, ..., 1.6399e-01,\n", + " -2.0716e-03, -3.9140e-03],\n", + " [ 1.6912e-01, 9.2836e-03, 7.5848e-01, ..., 1.1683e-01,\n", + " -1.7903e-03, -5.1396e-03],\n", + " [ 1.7967e-01, 1.9355e-02, 7.8534e-01, ..., 1.2731e-01,\n", + " -1.8395e-03, -5.2436e-03],\n", + " ...,\n", + " [ 2.0781e-01, -4.6462e-05, 8.3837e-01, ..., 1.1915e-01,\n", + " -1.7892e-03, -5.7203e-03],\n", + " [ 8.2026e-02, 4.0395e-02, 6.2940e-01, ..., 1.4449e-01,\n", + " -2.0254e-03, -3.9676e-03],\n", + " [ 1.1217e-01, 1.0264e-01, 5.6684e-01, ..., 1.4528e-01,\n", + " -1.6072e-03, -3.5787e-03]], device='cuda:0'), 'paper': tensor([[ 9.6047e-01, -5.7902e-03, 9.1198e-01, ..., -7.5122e-03,\n", + " -1.3173e-02, 2.6909e-01],\n", + " [ 7.8797e-01, -1.5676e-02, 1.7387e+00, ..., -1.0283e-02,\n", + " -1.8570e-02, -1.6198e-03],\n", + " [ 2.6260e-01, -9.5096e-03, 1.9205e+00, ..., -5.3558e-03,\n", + " -1.1560e-02, -7.4784e-03],\n", + " ...,\n", + " [ 6.7790e-01, -9.8694e-04, 1.8235e+00, ..., -4.7847e-03,\n", + " -1.2973e-02, -4.4677e-03],\n", + " [ 7.6643e-01, -1.0730e-02, 1.4156e+00, ..., -7.9422e-03,\n", + " -1.5690e-02, -1.9722e-03],\n", + " [ 2.1191e+00, -1.1681e-02, 2.2300e+00, ..., 1.3248e-01,\n", + " -3.7063e-02, 2.7793e+00]], device='cuda:0'), 'author': tensor([[-3.3439e-03, 1.6955e-01, 3.4537e-01, ..., 1.2084e+00,\n", + " -3.9490e-03, -2.7002e-03],\n", + " [-3.7711e-03, 1.4936e-01, 3.5290e-01, ..., 1.5097e+00,\n", + " -2.3619e-03, -2.1681e-03],\n", + " [-1.5174e-03, 1.1100e-01, 2.0716e-01, ..., 1.3970e+00,\n", + " -5.6502e-04, 6.7384e-02],\n", + " ...,\n", + " [-1.6586e-03, 1.3851e-01, 2.0814e-01, ..., 1.3549e+00,\n", + " -1.2521e-03, 8.5175e-02],\n", + " [-2.7035e-03, 1.4833e-01, 3.6471e-01, ..., 1.2535e+00,\n", + " -4.7393e-03, -2.4553e-03],\n", + " [-1.2296e-03, 1.1985e-01, 2.3510e-01, ..., 1.4611e+00,\n", + " -9.8642e-04, 1.1508e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0007, 0.4513, 0.2683, ..., -0.0061, 0.1507, 0.2071],\n", + " [-0.0010, 0.3454, 0.1198, ..., -0.0059, 0.1419, 0.1745],\n", + " [-0.0008, 0.3434, 0.1794, ..., -0.0073, 0.2153, 0.2258],\n", + " ...,\n", + " [-0.0011, 0.4695, 0.2997, ..., -0.0071, 0.1597, 0.2453],\n", + " [ 0.0421, 0.4867, 0.3211, ..., -0.0045, 0.1174, 0.0333],\n", + " [-0.0013, 0.3542, 0.2679, ..., -0.0056, 0.0875, 0.1823]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 16, 44, 48, 185, 125, 190, 190, 449, 325, 471, 405, 516,\n", + " 327, 298, 298, 298, 340, 340, 256, 342, 294, 294, 511, 511,\n", + " 552, 552, 910, 533, 270, 546, 835, 638, 716, 716, 707, 1042,\n", + " 1042, 796, 874, 874, 874, 1083, 1156, 1126, 1282, 934, 934, 1054,\n", + " 1073, 1354, 1210, 1354, 1478, 1486, 1420, 1363, 1480, 1480, 1480, 1474,\n", + " 1549, 1486, 1486, 1576, 1464, 1511, 1511, 1511, 1511, 1646, 1848, 1793,\n", + " 1961, 1842, 1842, 1842, 1985, 2005, 2005, 2069, 1938, 2104, 2001, 2131,\n", + " 2176, 2176, 2183, 2148, 2246, 2243, 2088, 2088, 2088, 2188, 2188, 2321,\n", + " 2323, 2304, 2435, 2435, 2435, 2469, 2413, 2360, 2482, 2662, 2662, 2872,\n", + " 2586, 2586, 2505, 2505, 2505, 2798, 2692, 2681, 2933, 3023, 3023, 3023,\n", + " 3020, 2931, 3175, 3248, 3298, 3298, 3298, 3371, 3371, 3371, 3371, 3352,\n", + " 3536, 3414, 3582, 3554, 3597, 3727, 3754, 3738, 3934, 3868, 3868, 3958,\n", + " 4004, 3911, 3983, 3983, 3911, 3911, 3912, 4114, 4114, 4064, 4064, 3961,\n", + " 4121, 4121, 4120, 4121, 4147, 4534, 4534, 4327, 4266, 4266, 4266, 4316,\n", + " 4296, 4296, 4561, 4631, 4729, 4729, 4622, 4653, 4653, 5124, 5124, 5124,\n", + " 5063, 5063, 4733, 4733, 4915, 5191, 5158, 5315, 5163, 5246, 5246, 5081,\n", + " 5081, 5345, 5325, 5475, 5233, 5434, 5335, 5335, 5523, 5524, 5555, 5645,\n", + " 5645, 5645, 5658, 5658, 5661, 5725, 5725],\n", + " [ 54, 122, 91, 134, 134, 100, 62, 21, 123, 90, 54, 6,\n", + " 37, 34, 44, 96, 38, 83, 26, 74, 118, 59, 78, 28,\n", + " 111, 92, 93, 67, 92, 32, 103, 113, 63, 28, 26, 68,\n", + " 114, 83, 27, 128, 66, 19, 112, 143, 95, 73, 82, 97,\n", + " 8, 41, 117, 137, 29, 0, 68, 17, 82, 73, 134, 121,\n", + " 79, 107, 79, 87, 33, 140, 82, 98, 111, 142, 120, 131,\n", + " 109, 133, 10, 102, 83, 27, 128, 131, 69, 84, 37, 2,\n", + " 43, 17, 26, 126, 120, 20, 25, 121, 49, 86, 53, 61,\n", + " 133, 101, 12, 81, 126, 55, 72, 61, 24, 127, 109, 40,\n", + " 124, 30, 20, 111, 85, 53, 76, 15, 99, 48, 106, 75,\n", + " 61, 61, 45, 58, 22, 28, 127, 129, 4, 111, 46, 142,\n", + " 34, 30, 115, 118, 123, 131, 10, 24, 39, 64, 54, 71,\n", + " 121, 9, 108, 127, 136, 119, 23, 135, 38, 82, 105, 18,\n", + " 25, 35, 131, 31, 7, 13, 36, 130, 7, 110, 70, 5,\n", + " 125, 30, 11, 132, 139, 3, 34, 56, 126, 88, 65, 78,\n", + " 60, 78, 46, 80, 120, 138, 42, 83, 47, 83, 104, 83,\n", + " 51, 35, 14, 4, 57, 83, 77, 116, 89, 16, 141, 69,\n", + " 83, 50, 83, 94, 52, 83, 1]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1647, 4624, 4518, ..., 3089, 6885, 3722],\n", + " [ 78, 25, 107, ..., 8173, 8223, 8211]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 133, 28, 62, ..., 38, 29, 83],\n", + " [ 157, 151, 7, ..., 5697, 5707, 5713]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 94, 94, 94, ..., 8142, 8142, 8142],\n", + " [ 352, 648, 1014, ..., 684, 352, 261]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 562, 437, 781, ..., 989, 273, 985],\n", + " [ 267, 118, 348, ..., 8112, 8270, 8260]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4786, 446, 458, ..., 6550, 3120, 768],\n", + " [ 15, 0, 0, ..., 5660, 5635, 5698]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 94, 70, 70, ..., 8142, 8142, 8142],\n", + " [1553, 4342, 4695, ..., 2948, 2402, 5923]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 16, 16, 16, ..., 5661, 5661, 5661],\n", + " [2099, 2133, 3209, ..., 6545, 6839, 6345]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.004694\n", + "sampling 0.004613\n", + "noi time: 0.000715\n", + "get_vertex_data call: 0.014157\n", + "noi group time: 0.001779\n", + "eoi_group_time: 0.010947\n", + "second half: 0.128429\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 27905, 19149, ..., 1125898, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 27905, 19149, ..., 1125898, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208545, 1231438, 1228162, ..., 1938426, 1933651, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208545, 1231438, 1228162, ..., 1938426, 1933651, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1141424, 1136349, 1135160, 1135726, 1137506, 1138335, 1141443,\n", + " 1139811, 1137271, 1143362, 1143372, 1146640, 1148976, 1150497, 1150503,\n", + " 1150509, 1148576, 1149216, 1149228, 1155689, 1155692, 1147483, 1135992,\n", + " 1135998, 1144636, 1144625, 1146992, 1146660, 1136747, 1147094, 1147211,\n", + " 1152427, 1134710, 1140313, 1140537, 1140540, 1138112, 1138126, 1149467,\n", + " 1138366, 1153456, 1140020, 1135367, 1135202, 1135204, 1154739, 1141029,\n", + " 1136777, 1134794, 1138504, 1137693, 1136609, 1144395, 1157399, 1157393,\n", + " 1136662, 1137441, 1143317, 1136930, 1135278, 1156159, 1141702, 1135579,\n", + " 1141086, 1135668, 1140972, 1138514, 1138524, 1137959, 1135493, 1137019,\n", + " 1156899, 1135522, 1139685, 1138305, 1157706, 1138440, 1138461, 1136594,\n", + " 1158390, 1149328, 1135088, 1138695, 1138881, 1156603, 1156606, 1147112,\n", + " 1135346, 1135355, 1148533, 1150953, 1137109, 1141533, 1139674, 1138067,\n", + " 1138073, 1134992, 1134770, 1140199, 1139318, 1153539, 1153543, 1139929,\n", + " 1141963, 1153404, 1155648, 1155654, 1146078, 1141985, 1137734, 1137728,\n", + " 1134922, 1135549, 1139898, 1145346, 1141980, 1143767, 1143775, 1154855,\n", + " 1143711, 1143221, 1139025, 1149979, 1141690, 1141111, 1141224, 1163301,\n", + " 1136917, 1143669, 1145056, 1144230, 1141785, 1139495, 1134979, 1147850,\n", + " 1137074, 1148067, 1144426, 1142050, 1141821, 1142093, 1138469, 1138478,\n", + " 1141479, 1138708, 1142913, 1138424, 1144596, 1136867, 1136864, 1140881,\n", + " 1141398, 1140442, 1144182, 1150906, 1144865, 1158703, 1138529, 1137854,\n", + " 1147153, 1149186, 1141365, 1151112, 1149101, 1139014, 1153554, 1141332,\n", + " 1139508, 1139127, 1140616, 1139171, 1140976, 1140990, 1147050, 1145885,\n", + " 1143543, 1152976, 1152980, 1142555, 1139453, 1141925, 1144242, 1145339,\n", + " 1165366, 1150700, 1148306, 1160357, 1145983, 1145974, 1146024, 1146141,\n", + " 1141235, 1139990, 1143293, 1143283, 1143294, 1150416, 1147541, 1147543,\n", + " 1147540, 1147150, 1148763, 1147282, 1147290, 1143663, 1149365, 1139418,\n", + " 1146088, 1146080, 1143051, 1157720, 1136836, 1146099, 1141283, 1139328,\n", + " 1150183, 1150188, 1143345, 1145808, 1145816, 1140836, 1138597, 1150294,\n", + " 1146514, 1143957, 1138024, 1143457, 1140483, 1140364, 1137990, 1137994,\n", + " 1143082, 1166410, 1148965, 1144219, 1147999, 1134902, 1139252, 1145457,\n", + " 1148704, 1148719, 1141825, 1141836, 1146742, 1148473, 1153701, 1147256,\n", + " 1147249, 1147970, 1145021, 1145009, 1158226, 1143921, 1149867, 1154526,\n", + " 1145240, 1138630, 1146178, 1148223, 1152541, 1150445, 1149250, 1148822,\n", + " 1144524, 1144526, 1141346, 1145834, 1152013, 1151994, 1165252, 1147807,\n", + " 1151482, 1152024, 1151041, 1145255, 1145256, 1146723, 1140562, 1148279,\n", + " 1147021, 1135805, 1141949, 1146772, 1147774, 1153574, 1143553, 1149412,\n", + " 1148293, 1152067, 1154420, 1158786, 1152561, 1152441, 1148731, 1148729,\n", + " 1146549, 1150053, 1151943, 1166311, 1148204, 1169363, 1154203, 1154168,\n", + " 1153124, 1153192, 1153193, 1153188, 1168631, 1150935, 1148056, 1144863,\n", + " 1143133, 1141017, 1151821, 1151906, 1154190, 1145640, 1148498, 1156894,\n", + " 1146565, 1141420, 1152784, 1150888, 1146623, 1146284, 1153038, 1150085,\n", + " 1137746, 1146307, 1152622, 1157107, 1157842, 1157843, 1157826, 1139570,\n", + " 1151617, 1150578, 1150586, 1152950, 1152958, 1145925, 1138982, 1152341,\n", + " 1136028, 1158704, 1152928, 1152931, 1142777, 1150156, 1153688, 1148040,\n", + " 1149300, 1152601, 1149794, 1148628, 1158530, 1137458, 1149944, 1154569,\n", + " 1152384, 1155422, 1145184, 1151257, 1150475, 1146852, 1135231, 1152183,\n", + " 1157905, 1150828, 1174399, 1147810, 1143010, 1158308, 1158311, 1158315,\n", + " 1140421, 1155441, 1155512, 1153359, 1150132, 1162112, 1144361, 1154529,\n", + " 1154530, 1145610, 1142755, 1142764, 1151379, 1155122, 1152527, 1157183,\n", + " 1149321, 1151432, 1151424, 1135396, 1156460, 1156463, 1157893, 1157894,\n", + " 1158484, 1154555, 1158823, 1158824, 1148836, 1143254, 1161803, 1154250,\n", + " 1154240, 1154080, 1137359, 1154909, 1160907, 1150371, 1159629, 1157928,\n", + " 1137152, 1158584, 1159116, 1135601, 1135602, 1178445, 1148149, 1148159,\n", + " 1150661, 1150671, 1155852, 1157685, 1159258, 1140627, 1140632, 1144448,\n", + " 1152498, 1140381, 1159131, 1163683, 1144843, 1155975, 1156812, 1154592,\n", + " 1161368, 1136896, 1158753, 1158760, 1158815, 1156778, 1136480, 1136487,\n", + " 1156490, 1136646, 1145479, 1140049, 1166421, 1147781, 1158558, 1151143,\n", + " 1161167, 1162021, 1158006, 1161539, 1165853, 1183448, 1164272, 1157751,\n", + " 1162683, 1159042, 1172279, 1159146, 1151073, 1158303, 1157944, 1162044,\n", + " 1153052, 1153045, 1167181, 1156235, 1142865, 1138393, 1142687, 1150046,\n", + " 1149063, 1153514, 1158672, 1138161, 1164006, 1164014, 1156787, 1161761,\n", + " 1149953, 1154590, 1146063, 1164423, 1164055, 1158868, 1140641, 1140643,\n", + " 1148600, 1155816, 1156363, 1158643, 1165872, 1165877, 1162607, 1143735,\n", + " 1155588, 1158415, 1146500, 1161240, 1144747, 1152776, 1166881, 1165415,\n", + " 1161724, 1141471, 1151650, 1147426, 1147427, 1156739, 1171040, 1168741,\n", + " 1144810, 1144812, 1165721, 1164741, 1142733, 1156293, 1145743, 1166924,\n", + " 1145567, 1145228, 1170771, 1166462, 1138950, 1160730, 1147689, 1152639,\n", + " 1152624, 1152626, 1148121, 1147719, 1147723, 1145902, 1152203, 1158723,\n", + " 1158722, 1166661, 1147338, 1145674, 1145664, 1150781, 1179488, 1167817,\n", + " 1144681, 1156308, 1166653, 1155180, 1150518, 1156119, 1144336, 1138376,\n", + " 1154656, 1142352, 1171414, 1141043, 1169359, 1138609, 1149684, 1158611,\n", + " 1173047, 1172759, 1149847, 1152353, 1148667, 1172838, 1148335, 1148325,\n", + " 1171560, 1165907, 1173307, 1145039, 1154027, 1153754, 1167857, 1169581,\n", + " 1151201, 1157153, 1157373, 1147711, 1151850, 1148131, 1147934, 1157593,\n", + " 1169037, 1172961, 1171293, 1170688, 1163027, 1166682, 1154148, 1167517,\n", + " 1149169, 1180593, 1186117, 1170373, 1167658, 1153803, 1181759, 1161255,\n", + " 1155262, 1180151, 1177892, 1171623, 1163568, 1158253, 1180702, 1164563,\n", + " 1178214, 1145626, 1161067, 1161068, 1149753, 1146252, 1192271, 1158934,\n", + " 1158940, 1186496, 1155890, 1155892, 1155895, 1177094, 1160383, 1183002,\n", + " 1183004, 1140393, 1171633, 1182337, 1181340, 1154944, 1146161, 1147179,\n", + " 1141507, 1167670, 1186334, 1139828, 1139831, 1150265, 1154806, 1149673,\n", + " 1182024, 1188618, 1156055, 1170010, 1146386, 1173058, 1149544, 1185008,\n", + " 1194476, 1171669, 1151774, 1152115, 1184867, 1169703, 1169707, 1166838,\n", + " 1171201, 1167089, 1172424, 1158064, 1166785, 1180540, 1178662, 1179769,\n", + " 1182178, 1190599, 1191140, 1194576], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1141424, 1136349, 1135160, 1135726, 1137506, 1138335, 1141443,\n", + " 1139811, 1137271, 1143362, 1143372, 1146640, 1148976, 1150497, 1150503,\n", + " 1150509, 1148576, 1149216, 1149228, 1155689, 1155692, 1147483, 1135992,\n", + " 1135998, 1144636, 1144625, 1146992, 1146660, 1136747, 1147094, 1147211,\n", + " 1152427, 1134710, 1140313, 1140537, 1140540, 1138112, 1138126, 1149467,\n", + " 1138366, 1153456, 1140020, 1135367, 1135202, 1135204, 1154739, 1141029,\n", + " 1136777, 1134794, 1138504, 1137693, 1136609, 1144395, 1157399, 1157393,\n", + " 1136662, 1137441, 1143317, 1136930, 1135278, 1156159, 1141702, 1135579,\n", + " 1141086, 1135668, 1140972, 1138514, 1138524, 1137959, 1135493, 1137019,\n", + " 1156899, 1135522, 1139685, 1138305, 1157706, 1138440, 1138461, 1136594,\n", + " 1158390, 1149328, 1135088, 1138695, 1138881, 1156603, 1156606, 1147112,\n", + " 1135346, 1135355, 1148533, 1150953, 1137109, 1141533, 1139674, 1138067,\n", + " 1138073, 1134992, 1134770, 1140199, 1139318, 1153539, 1153543, 1139929,\n", + " 1141963, 1153404, 1155648, 1155654, 1146078, 1141985, 1137734, 1137728,\n", + " 1134922, 1135549, 1139898, 1145346, 1141980, 1143767, 1143775, 1154855,\n", + " 1143711, 1143221, 1139025, 1149979, 1141690, 1141111, 1141224, 1163301,\n", + " 1136917, 1143669, 1145056, 1144230, 1141785, 1139495, 1134979, 1147850,\n", + " 1137074, 1148067, 1144426, 1142050, 1141821, 1142093, 1138469, 1138478,\n", + " 1141479, 1138708, 1142913, 1138424, 1144596, 1136867, 1136864, 1140881,\n", + " 1141398, 1140442, 1144182, 1150906, 1144865, 1158703, 1138529, 1137854,\n", + " 1147153, 1149186, 1141365, 1151112, 1149101, 1139014, 1153554, 1141332,\n", + " 1139508, 1139127, 1140616, 1139171, 1140976, 1140990, 1147050, 1145885,\n", + " 1143543, 1152976, 1152980, 1142555, 1139453, 1141925, 1144242, 1145339,\n", + " 1165366, 1150700, 1148306, 1160357, 1145983, 1145974, 1146024, 1146141,\n", + " 1141235, 1139990, 1143293, 1143283, 1143294, 1150416, 1147541, 1147543,\n", + " 1147540, 1147150, 1148763, 1147282, 1147290, 1143663, 1149365, 1139418,\n", + " 1146088, 1146080, 1143051, 1157720, 1136836, 1146099, 1141283, 1139328,\n", + " 1150183, 1150188, 1143345, 1145808, 1145816, 1140836, 1138597, 1150294,\n", + " 1146514, 1143957, 1138024, 1143457, 1140483, 1140364, 1137990, 1137994,\n", + " 1143082, 1166410, 1148965, 1144219, 1147999, 1134902, 1139252, 1145457,\n", + " 1148704, 1148719, 1141825, 1141836, 1146742, 1148473, 1153701, 1147256,\n", + " 1147249, 1147970, 1145021, 1145009, 1158226, 1143921, 1149867, 1154526,\n", + " 1145240, 1138630, 1146178, 1148223, 1152541, 1150445, 1149250, 1148822,\n", + " 1144524, 1144526, 1141346, 1145834, 1152013, 1151994, 1165252, 1147807,\n", + " 1151482, 1152024, 1151041, 1145255, 1145256, 1146723, 1140562, 1148279,\n", + " 1147021, 1135805, 1141949, 1146772, 1147774, 1153574, 1143553, 1149412,\n", + " 1148293, 1152067, 1154420, 1158786, 1152561, 1152441, 1148731, 1148729,\n", + " 1146549, 1150053, 1151943, 1166311, 1148204, 1169363, 1154203, 1154168,\n", + " 1153124, 1153192, 1153193, 1153188, 1168631, 1150935, 1148056, 1144863,\n", + " 1143133, 1141017, 1151821, 1151906, 1154190, 1145640, 1148498, 1156894,\n", + " 1146565, 1141420, 1152784, 1150888, 1146623, 1146284, 1153038, 1150085,\n", + " 1137746, 1146307, 1152622, 1157107, 1157842, 1157843, 1157826, 1139570,\n", + " 1151617, 1150578, 1150586, 1152950, 1152958, 1145925, 1138982, 1152341,\n", + " 1136028, 1158704, 1152928, 1152931, 1142777, 1150156, 1153688, 1148040,\n", + " 1149300, 1152601, 1149794, 1148628, 1158530, 1137458, 1149944, 1154569,\n", + " 1152384, 1155422, 1145184, 1151257, 1150475, 1146852, 1135231, 1152183,\n", + " 1157905, 1150828, 1174399, 1147810, 1143010, 1158308, 1158311, 1158315,\n", + " 1140421, 1155441, 1155512, 1153359, 1150132, 1162112, 1144361, 1154529,\n", + " 1154530, 1145610, 1142755, 1142764, 1151379, 1155122, 1152527, 1157183,\n", + " 1149321, 1151432, 1151424, 1135396, 1156460, 1156463, 1157893, 1157894,\n", + " 1158484, 1154555, 1158823, 1158824, 1148836, 1143254, 1161803, 1154250,\n", + " 1154240, 1154080, 1137359, 1154909, 1160907, 1150371, 1159629, 1157928,\n", + " 1137152, 1158584, 1159116, 1135601, 1135602, 1178445, 1148149, 1148159,\n", + " 1150661, 1150671, 1155852, 1157685, 1159258, 1140627, 1140632, 1144448,\n", + " 1152498, 1140381, 1159131, 1163683, 1144843, 1155975, 1156812, 1154592,\n", + " 1161368, 1136896, 1158753, 1158760, 1158815, 1156778, 1136480, 1136487,\n", + " 1156490, 1136646, 1145479, 1140049, 1166421, 1147781, 1158558, 1151143,\n", + " 1161167, 1162021, 1158006, 1161539, 1165853, 1183448, 1164272, 1157751,\n", + " 1162683, 1159042, 1172279, 1159146, 1151073, 1158303, 1157944, 1162044,\n", + " 1153052, 1153045, 1167181, 1156235, 1142865, 1138393, 1142687, 1150046,\n", + " 1149063, 1153514, 1158672, 1138161, 1164006, 1164014, 1156787, 1161761,\n", + " 1149953, 1154590, 1146063, 1164423, 1164055, 1158868, 1140641, 1140643,\n", + " 1148600, 1155816, 1156363, 1158643, 1165872, 1165877, 1162607, 1143735,\n", + " 1155588, 1158415, 1146500, 1161240, 1144747, 1152776, 1166881, 1165415,\n", + " 1161724, 1141471, 1151650, 1147426, 1147427, 1156739, 1171040, 1168741,\n", + " 1144810, 1144812, 1165721, 1164741, 1142733, 1156293, 1145743, 1166924,\n", + " 1145567, 1145228, 1170771, 1166462, 1138950, 1160730, 1147689, 1152639,\n", + " 1152624, 1152626, 1148121, 1147719, 1147723, 1145902, 1152203, 1158723,\n", + " 1158722, 1166661, 1147338, 1145674, 1145664, 1150781, 1179488, 1167817,\n", + " 1144681, 1156308, 1166653, 1155180, 1150518, 1156119, 1144336, 1138376,\n", + " 1154656, 1142352, 1171414, 1141043, 1169359, 1138609, 1149684, 1158611,\n", + " 1173047, 1172759, 1149847, 1152353, 1148667, 1172838, 1148335, 1148325,\n", + " 1171560, 1165907, 1173307, 1145039, 1154027, 1153754, 1167857, 1169581,\n", + " 1151201, 1157153, 1157373, 1147711, 1151850, 1148131, 1147934, 1157593,\n", + " 1169037, 1172961, 1171293, 1170688, 1163027, 1166682, 1154148, 1167517,\n", + " 1149169, 1180593, 1186117, 1170373, 1167658, 1153803, 1181759, 1161255,\n", + " 1155262, 1180151, 1177892, 1171623, 1163568, 1158253, 1180702, 1164563,\n", + " 1178214, 1145626, 1161067, 1161068, 1149753, 1146252, 1192271, 1158934,\n", + " 1158940, 1186496, 1155890, 1155892, 1155895, 1177094, 1160383, 1183002,\n", + " 1183004, 1140393, 1171633, 1182337, 1181340, 1154944, 1146161, 1147179,\n", + " 1141507, 1167670, 1186334, 1139828, 1139831, 1150265, 1154806, 1149673,\n", + " 1182024, 1188618, 1156055, 1170010, 1146386, 1173058, 1149544, 1185008,\n", + " 1194476, 1171669, 1151774, 1152115, 1184867, 1169703, 1169707, 1166838,\n", + " 1171201, 1167089, 1172424, 1158064, 1166785, 1180540, 1178662, 1179769,\n", + " 1182178, 1190599, 1191140, 1194576], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197853, 1198770, 1197719, 1199282, 1198458, 1198459, 1198835,\n", + " 1198844, 1201582, 1194626, 1200643, 1197791, 1199250, 1201016, 1198633,\n", + " 1198694, 1196956, 1202804, 1202287, 1197383, 1194866, 1194867, 1194770,\n", + " 1196624, 1195514, 1195259, 1201992, 1196031, 1196081, 1196088, 1198542,\n", + " 1198543, 1197697, 1199519, 1194952, 1195457, 1195895, 1199171, 1196359,\n", + " 1196977, 1195325, 1196835, 1198668, 1196165, 1198367, 1196231, 1195970,\n", + " 1196705, 1196711, 1195145, 1195221, 1195265, 1195278, 1197136, 1197273,\n", + " 1196109, 1195847, 1195541, 1195545, 1197474, 1196117, 1199984, 1197640,\n", + " 1197191, 1200037, 1202017, 1199699, 1195353, 1199329, 1199060, 1197285,\n", + " 1197291, 1198680, 1199680, 1199628, 1200872, 1200878, 1199154, 1200401,\n", + " 1198410, 1199231, 1201916, 1195008, 1195017, 1199676, 1198763, 1201511,\n", + " 1196508, 1201894, 1201903, 1197601, 1196727, 1202618, 1200894, 1198428,\n", + " 1200018, 1199410, 1201526, 1201824, 1201827, 1200566, 1200172, 1198066,\n", + " 1198593, 1196479, 1198785, 1201421, 1201156, 1199721, 1201691, 1202499,\n", + " 1202503, 1200526, 1200546, 1200553, 1200555, 1200429, 1197097, 1202541,\n", + " 1202138, 1199908, 1201442, 1202239, 1199482, 1198478, 1203329, 1199925,\n", + " 1199929, 1200388, 1200628, 1196966, 1200784, 1202687, 1199606, 1200578,\n", + " 1200627, 1198514, 1195664, 1198932, 1201318, 1197822, 1194899, 1196602,\n", + " 1198587, 1198299, 1199659, 1196382, 1203102, 1198147, 1198824, 1197735,\n", + " 1198819, 1195066, 1201886, 1200301, 1200302, 1197652, 1200707, 1200212,\n", + " 1196428], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197853, 1198770, 1197719, 1199282, 1198458, 1198459, 1198835,\n", + " 1198844, 1201582, 1194626, 1200643, 1197791, 1199250, 1201016, 1198633,\n", + " 1198694, 1196956, 1202804, 1202287, 1197383, 1194866, 1194867, 1194770,\n", + " 1196624, 1195514, 1195259, 1201992, 1196031, 1196081, 1196088, 1198542,\n", + " 1198543, 1197697, 1199519, 1194952, 1195457, 1195895, 1199171, 1196359,\n", + " 1196977, 1195325, 1196835, 1198668, 1196165, 1198367, 1196231, 1195970,\n", + " 1196705, 1196711, 1195145, 1195221, 1195265, 1195278, 1197136, 1197273,\n", + " 1196109, 1195847, 1195541, 1195545, 1197474, 1196117, 1199984, 1197640,\n", + " 1197191, 1200037, 1202017, 1199699, 1195353, 1199329, 1199060, 1197285,\n", + " 1197291, 1198680, 1199680, 1199628, 1200872, 1200878, 1199154, 1200401,\n", + " 1198410, 1199231, 1201916, 1195008, 1195017, 1199676, 1198763, 1201511,\n", + " 1196508, 1201894, 1201903, 1197601, 1196727, 1202618, 1200894, 1198428,\n", + " 1200018, 1199410, 1201526, 1201824, 1201827, 1200566, 1200172, 1198066,\n", + " 1198593, 1196479, 1198785, 1201421, 1201156, 1199721, 1201691, 1202499,\n", + " 1202503, 1200526, 1200546, 1200553, 1200555, 1200429, 1197097, 1202541,\n", + " 1202138, 1199908, 1201442, 1202239, 1199482, 1198478, 1203329, 1199925,\n", + " 1199929, 1200388, 1200628, 1196966, 1200784, 1202687, 1199606, 1200578,\n", + " 1200627, 1198514, 1195664, 1198932, 1201318, 1197822, 1194899, 1196602,\n", + " 1198587, 1198299, 1199659, 1196382, 1203102, 1198147, 1198824, 1197735,\n", + " 1198819, 1195066, 1201886, 1200301, 1200302, 1197652, 1200707, 1200212,\n", + " 1196428], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.1711e-01, 4.3365e-02, 6.8526e-01, ..., 1.6544e-01,\n", + " -1.9137e-03, -4.2989e-03],\n", + " [ 2.0085e-01, -7.0405e-05, 8.2807e-01, ..., 1.2722e-01,\n", + " -1.8424e-03, -5.5696e-03],\n", + " [ 1.0132e-01, 5.6431e-02, 5.6768e-01, ..., 1.6213e-01,\n", + " -2.2955e-03, -3.6085e-03],\n", + " ...,\n", + " [ 9.0986e-02, 1.6740e-02, 5.7281e-01, ..., 1.5734e-01,\n", + " -2.1168e-03, -3.7200e-03],\n", + " [ 2.0085e-01, -7.0405e-05, 8.2807e-01, ..., 1.2722e-01,\n", + " -1.8424e-03, -5.5696e-03],\n", + " [ 1.7903e-01, 3.7731e-02, 8.0249e-01, ..., 1.4413e-01,\n", + " -2.0511e-03, -5.2231e-03]], device='cuda:0'), 'paper': tensor([[ 4.1294e-01, -1.1073e-03, 1.4516e+00, ..., -4.8746e-03,\n", + " -1.0140e-02, -3.3470e-03],\n", + " [ 7.8259e-01, -1.5658e-02, 1.7383e+00, ..., -1.0253e-02,\n", + " -1.8576e-02, -1.6643e-03],\n", + " [ 9.3830e-01, -1.5522e-03, 8.8883e-01, ..., -8.2075e-03,\n", + " -1.1502e-02, 2.3346e-01],\n", + " ...,\n", + " [ 6.9647e-01, -1.5336e-02, 1.9094e+00, ..., -6.9647e-03,\n", + " -1.7107e-02, -3.3820e-03],\n", + " [ 1.7629e+00, -1.3974e-02, 2.7974e+00, ..., -7.1507e-03,\n", + " -3.1139e-02, 9.2907e-01],\n", + " [ 1.8250e+00, -1.2846e-02, 2.0024e+00, ..., 1.4951e-02,\n", + " -3.4744e-02, 2.4188e+00]], device='cuda:0'), 'author': tensor([[-1.4688e-03, 1.2296e-01, 2.4770e-01, ..., 1.5291e+00,\n", + " -8.0291e-04, 1.1700e-01],\n", + " [-1.7926e-03, 1.8525e-01, 2.6474e-01, ..., 1.2919e+00,\n", + " -2.0754e-03, 3.1753e-02],\n", + " [-9.4333e-04, 1.6815e-01, 2.4643e-01, ..., 1.6210e+00,\n", + " -6.5470e-05, 2.5338e-01],\n", + " ...,\n", + " [-1.5735e-03, 1.7322e-01, 2.2008e-01, ..., 1.3612e+00,\n", + " -1.3794e-03, 4.2886e-02],\n", + " [-1.4916e-03, 1.3703e-01, 2.0825e-01, ..., 1.5162e+00,\n", + " -2.6260e-04, 1.4145e-01],\n", + " [-1.4025e-03, 1.4422e-01, 2.1899e-01, ..., 1.4314e+00,\n", + " -8.9941e-04, 1.1399e-01]], device='cuda:0'), 'field_of_study': tensor([[-8.9144e-04, 3.6513e-01, 1.6362e-01, ..., -6.4233e-03,\n", + " 8.7499e-02, 2.3840e-01],\n", + " [-1.3089e-03, 3.4494e-01, 1.0071e-01, ..., -6.9091e-03,\n", + " 1.7383e-01, 2.6284e-01],\n", + " [-3.0556e-04, 4.4354e-01, 1.7962e-01, ..., -5.2316e-03,\n", + " 1.7490e-01, 1.6189e-01],\n", + " ...,\n", + " [-8.4128e-04, 4.4043e-01, 1.3520e-01, ..., -5.3210e-03,\n", + " 2.0572e-01, 1.1129e-01],\n", + " [-6.9004e-04, 4.3057e-01, 1.1185e-01, ..., -6.1177e-03,\n", + " 1.6319e-01, 2.2984e-01],\n", + " [-7.7122e-04, 5.1563e-01, 3.0548e-01, ..., -4.6738e-03,\n", + " 2.0696e-01, 1.0246e-02]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 92, 223, 126, 126, 126, 204, 432, 516, 490, 263, 505, 403,\n", + " 265, 304, 304, 574, 554, 554, 554, 757, 491, 819, 740, 872,\n", + " 885, 934, 1164, 1164, 1130, 1130, 965, 965, 1432, 1432, 1244, 1244,\n", + " 1244, 1386, 1386, 1140, 1431, 1432, 1367, 1367, 1367, 1136, 1681, 1614,\n", + " 1426, 1426, 1548, 1275, 1523, 1523, 1596, 1800, 1710, 1683, 1710, 1710,\n", + " 1710, 1710, 1838, 1965, 1965, 1990, 1776, 1776, 1950, 2053, 1840, 1831,\n", + " 1831, 1831, 1916, 1916, 1954, 1958, 2063, 2124, 2177, 2404, 2109, 2109,\n", + " 2109, 2109, 2222, 2222, 2310, 2310, 2467, 2555, 2483, 2513, 2520, 2459,\n", + " 2515, 2460, 2452, 2531, 2675, 2656, 2545, 2643, 2603, 2603, 2603, 2603,\n", + " 2686, 2952, 2811, 2811, 2859, 2707, 2919, 2919, 2919, 3006, 3155, 2789,\n", + " 3049, 3052, 3027, 3027, 3020, 3071, 3071, 3370, 3284, 3286, 3310, 3423,\n", + " 3365, 3422, 3522, 3410, 3410, 3761, 3440, 3722, 3634, 3907, 4098, 3912,\n", + " 3900, 3961, 3804, 4080, 4080, 4080, 3907, 3907, 3756, 3892, 4082, 4042,\n", + " 3989, 4084, 4207, 4162, 4272, 4272, 4572, 4340, 4548, 4428, 4398, 4464,\n", + " 4502, 4590, 4735, 4417, 4750, 4750, 4761, 4758, 4766, 4691, 4630, 4630,\n", + " 4936, 5198, 4877, 4720, 5071, 5016, 5018, 5248, 5013, 5038, 5052, 5082,\n", + " 5095, 4849, 4849, 5245, 5045, 5206, 5129, 4982, 5085, 5085, 5085, 5197,\n", + " 5268, 5197, 5343, 5343, 5443, 5303, 5632, 5632, 5450, 5450, 5834, 5576,\n", + " 5404, 5404, 5792, 5780, 5780, 5780, 5654, 5638, 5706, 5706, 5729, 6035,\n", + " 5991, 5991, 6078, 5993, 5993, 6043, 5975, 6298, 6209, 6422, 6422, 6435,\n", + " 6435, 6407],\n", + " [ 83, 4, 39, 5, 106, 14, 127, 105, 134, 92, 90, 141,\n", + " 150, 29, 107, 95, 21, 33, 27, 151, 153, 120, 146, 25,\n", + " 151, 115, 121, 14, 75, 39, 148, 157, 139, 92, 73, 121,\n", + " 137, 89, 67, 71, 4, 116, 8, 147, 118, 84, 36, 52,\n", + " 92, 142, 104, 62, 59, 40, 39, 112, 114, 37, 117, 81,\n", + " 17, 23, 151, 20, 98, 36, 24, 46, 60, 57, 21, 64,\n", + " 93, 159, 6, 110, 36, 4, 109, 152, 22, 24, 48, 79,\n", + " 131, 77, 124, 66, 69, 61, 152, 101, 26, 36, 16, 39,\n", + " 4, 62, 62, 83, 158, 152, 36, 146, 103, 120, 2, 49,\n", + " 96, 76, 97, 123, 122, 113, 154, 45, 44, 4, 123, 120,\n", + " 135, 27, 127, 131, 143, 100, 55, 132, 13, 41, 74, 145,\n", + " 68, 1, 33, 9, 152, 94, 139, 50, 115, 148, 111, 152,\n", + " 0, 65, 123, 136, 128, 86, 157, 99, 150, 78, 35, 68,\n", + " 68, 94, 113, 19, 135, 102, 78, 54, 76, 82, 113, 150,\n", + " 96, 158, 4, 31, 31, 57, 47, 68, 10, 62, 91, 56,\n", + " 107, 32, 92, 19, 156, 160, 15, 11, 72, 38, 157, 51,\n", + " 129, 155, 150, 107, 28, 76, 43, 127, 144, 140, 85, 80,\n", + " 108, 156, 3, 4, 95, 96, 42, 133, 87, 119, 30, 53,\n", + " 56, 40, 130, 125, 121, 63, 70, 34, 88, 92, 18, 58,\n", + " 3, 49, 12, 138, 92, 132, 7, 27, 10, 126, 91, 127,\n", + " 149, 92]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3199, 1441, 518, ..., 241, 5355, 3049],\n", + " [ 23, 23, 23, ..., 6148, 6014, 6149]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 19, 60, 35, ..., 119, 87, 32],\n", + " [ 178, 188, 235, ..., 6382, 6322, 6217]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 224, 224, 23, ..., 6093, 6116, 5963],\n", + " [ 328, 196, 366, ..., 240, 203, 240]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 617, 605, 493, ..., 146, 240, 346],\n", + " [ 68, 61, 17, ..., 6138, 6079, 6053]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2722, 550, 2898, ..., 4976, 5615, 4899],\n", + " [ 161, 156, 175, ..., 6209, 6270, 6347]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 224, 23, 23, ..., 6093, 6093, 6093],\n", + " [1111, 1441, 1620, ..., 1297, 4870, 2291]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 54, 223, 223, ..., 6209, 6209, 6209],\n", + " [5763, 550, 667, ..., 2788, 4976, 3986]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006367\n", + "sampling 0.006214\n", + "noi time: 0.001899\n", + "get_vertex_data call: 0.02136\n", + "noi group time: 0.00184\n", + "eoi_group_time: 0.013124\n", + "second half: 0.211114\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16691, 468, 24187, ..., 1111730, 1120124, 1128784],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16691, 468, 24187, ..., 1111730, 1120124, 1128784],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1211781, 1212860, ..., 1936992, 1931114, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1211781, 1212860, ..., 1936992, 1931114, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1137212, 1141424, 1136228, 1140285, 1136349, 1135928, 1135716,\n", + " 1135727, 1141751, 1141758, 1136210, 1136215, 1136144, 1136148, 1136962,\n", + " 1136969, 1138897, 1143600, 1149839, 1145373, 1146978, 1146983, 1137947,\n", + " 1145999, 1137268, 1143372, 1143363, 1146646, 1146647, 1139615, 1148976,\n", + " 1150509, 1149216, 1142958, 1155689, 1143820, 1147473, 1142881, 1153940,\n", + " 1144637, 1144632, 1135262, 1149038, 1146995, 1147003, 1153012, 1153018,\n", + " 1134701, 1148346, 1136112, 1152664, 1153220, 1147094, 1137220, 1137225,\n", + " 1145419, 1155019, 1139365, 1139371, 1150330, 1152416, 1152427, 1134717,\n", + " 1134710, 1140540, 1138112, 1154415, 1137254, 1137263, 1138356, 1153463,\n", + " 1135913, 1140027, 1140953, 1135367, 1135202, 1134970, 1141036, 1134794,\n", + " 1157443, 1138504, 1137329, 1137693, 1139215, 1144395, 1137529, 1135408,\n", + " 1157405, 1136662, 1137441, 1156146, 1156149, 1156159, 1148481, 1135583,\n", + " 1136097, 1136100, 1136101, 1140240, 1138514, 1137957, 1156967, 1135522,\n", + " 1157706, 1138440, 1138461, 1136594, 1135123, 1158390, 1156605, 1147111,\n", + " 1147119, 1142611, 1135359, 1135627, 1158984, 1135772, 1139855, 1139844,\n", + " 1136457, 1139667, 1139668, 1139673, 1139664, 1138067, 1138069, 1134992,\n", + " 1152640, 1152654, 1158971, 1158974, 1139318, 1142900, 1142906, 1142909,\n", + " 1159018, 1159019, 1141065, 1153543, 1143625, 1140034, 1139933, 1138148,\n", + " 1141963, 1146075, 1140550, 1140556, 1152044, 1142299, 1137734, 1137728,\n", + " 1137743, 1134924, 1134922, 1140901, 1135540, 1135549, 1141088, 1141097,\n", + " 1141098, 1141102, 1144138, 1149001, 1139898, 1143767, 1154855, 1137297,\n", + " 1143221, 1139025, 1140007, 1146832, 1135860, 1135861, 1136426, 1154472,\n", + " 1139436, 1136638, 1141226, 1141901, 1139386, 1136917, 1139741, 1139495,\n", + " 1141609, 1144650, 1144428, 1138482, 1142056, 1141821, 1146796, 1153670,\n", + " 1143204, 1137766, 1137070, 1137057, 1142917, 1142924, 1142913, 1148444,\n", + " 1144596, 1148265, 1136867, 1145298, 1145302, 1141209, 1140885, 1137614,\n", + " 1144865, 1136565, 1139559, 1158691, 1158703, 1138529, 1138539, 1138537,\n", + " 1137841, 1147153, 1136369, 1142640, 1141365, 1153068, 1141664, 1149101,\n", + " 1138293, 1144279, 1139508, 1139510, 1139127, 1145001, 1143790, 1143779,\n", + " 1140619, 1140990, 1147050, 1145873, 1143551, 1152976, 1139447, 1141925,\n", + " 1144242, 1140580, 1150700, 1139405, 1143643, 1134861, 1136274, 1146024,\n", + " 1150601, 1138085, 1146140, 1141585, 1139990, 1143293, 1151122, 1151124,\n", + " 1147543, 1147540, 1148763, 1148765, 1147282, 1142817, 1142816, 1138660,\n", + " 1136330, 1140348, 1142637, 1149366, 1148001, 1143040, 1148408, 1136167,\n", + " 1138922, 1138923, 1146105, 1139297, 1139304, 1139329, 1136445, 1142126,\n", + " 1142149, 1142159, 1143345, 1144765, 1137098, 1144086, 1144319, 1150294,\n", + " 1146523, 1138024, 1143465, 1143457, 1144303, 1143937, 1143949, 1135441,\n", + " 1140364, 1143080, 1148965, 1147984, 1147996, 1147999, 1146949, 1134902,\n", + " 1134907, 1144011, 1139252, 1139249, 1148704, 1141327, 1141827, 1141833,\n", + " 1146742, 1153701, 1152328, 1147056, 1149722, 1147025, 1147031, 1147970,\n", + " 1147187, 1158226, 1154526, 1145232, 1145237, 1145240, 1145235, 1145751,\n", + " 1148397, 1146178, 1151242, 1152537, 1150274, 1150445, 1149791, 1141356,\n", + " 1145833, 1150342, 1150348, 1150350, 1152013, 1165251, 1165253, 1147807,\n", + " 1151482, 1151487, 1151473, 1152023, 1144881, 1151041, 1145256, 1145259,\n", + " 1145263, 1134869, 1150127, 1147019, 1147023, 1153963, 1158949, 1141949,\n", + " 1146776, 1148744, 1153568, 1162284, 1147653, 1147659, 1149412, 1148288,\n", + " 1148294, 1139096, 1154420, 1148180, 1136251, 1146676, 1157968, 1157976,\n", + " 1157983, 1148724, 1148729, 1144110, 1168970, 1168960, 1146547, 1146559,\n", + " 1148204, 1148108, 1171939, 1154168, 1153192, 1153188, 1153197, 1145104,\n", + " 1150935, 1152878, 1144848, 1155088, 1146231, 1147442, 1151906, 1154183,\n", + " 1150708, 1150707, 1148505, 1141420, 1141419, 1141408, 1136000, 1151358,\n", + " 1147728, 1148949, 1146969, 1146972, 1153249, 1150210, 1146623, 1151694,\n", + " 1152849, 1152405, 1152409, 1152097, 1152100, 1146280, 1151728, 1156321,\n", + " 1153029, 1153038, 1150085, 1137746, 1146307, 1146304, 1159974, 1152612,\n", + " 1155140, 1136410, 1152831, 1155337, 1154123, 1155354, 1152673, 1152672,\n", + " 1154633, 1151580, 1151617, 1151623, 1150586, 1148927, 1150613, 1144529,\n", + " 1145952, 1138982, 1138991, 1151298, 1152342, 1146704, 1145576, 1138272,\n", + " 1138283, 1138279, 1138281, 1157147, 1156004, 1136028, 1136029, 1156619,\n", + " 1156621, 1156622, 1152928, 1151061, 1156399, 1152888, 1143484, 1143486,\n", + " 1150172, 1150164, 1149273, 1167939, 1148040, 1155202, 1155222, 1145656,\n", + " 1149794, 1148628, 1148637, 1158530, 1137458, 1135698, 1159216, 1153085,\n", + " 1154371, 1142387, 1150872, 1148892, 1158916, 1154942, 1156505, 1157064,\n", + " 1157069, 1155422, 1155418, 1152833, 1151251, 1135222, 1135729, 1135730,\n", + " 1138830, 1151788, 1151777, 1153413, 1147810, 1139525, 1139524, 1158304,\n", + " 1158308, 1155441, 1137972, 1153359, 1150129, 1150130, 1150132, 1162120,\n", + " 1140877, 1154529, 1154530, 1154528, 1145768, 1142755, 1142758, 1138775,\n", + " 1156269, 1156271, 1151379, 1155375, 1155122, 1152526, 1157183, 1155755,\n", + " 1151438, 1146913, 1145806, 1145807, 1156452, 1156463, 1158096, 1158104,\n", + " 1168230, 1168238, 1154763, 1155628, 1155630, 1156563, 1154555, 1136476,\n", + " 1158824, 1153715, 1148654, 1154650, 1146938, 1154241, 1154095, 1156718,\n", + " 1143189, 1143196, 1143528, 1150371, 1150379, 1150811, 1150977, 1150987,\n", + " 1157928, 1151030, 1158126, 1137381, 1159116, 1137316, 1168154, 1135601,\n", + " 1148149, 1150661, 1155848, 1155852, 1158664, 1158665, 1157685, 1159258,\n", + " 1152209, 1152220, 1140381, 1155880, 1157732, 1157740, 1157735, 1157033,\n", + " 1144843, 1155971, 1155975, 1158841, 1158846, 1156811, 1155403, 1149700,\n", + " 1154600, 1154605, 1165556, 1159441, 1171171, 1140213, 1140221, 1161691,\n", + " 1162995, 1158815, 1158814, 1158444, 1158285, 1156665, 1147599, 1142747,\n", + " 1156488, 1153808, 1136640, 1136646, 1134757, 1140049, 1142184, 1158558,\n", + " 1146126, 1165778, 1164514, 1154340, 1158006, 1150011, 1155521, 1165848,\n", + " 1142493, 1163471, 1137557, 1164276, 1142663, 1142666, 1150684, 1167346,\n", + " 1159042, 1159052, 1159070, 1159143, 1158295, 1153052, 1153045, 1167174,\n", + " 1166241, 1156226, 1142864, 1153842, 1156096, 1156101, 1156107, 1165244,\n", + " 1167189, 1150046, 1149063, 1145948, 1155479, 1155480, 1158680, 1138161,\n", + " 1164006, 1156795, 1160764, 1166072, 1148771, 1140731, 1146063, 1171258,\n", + " 1162471, 1160689, 1160176, 1165309, 1140641, 1140643, 1141862, 1148600,\n", + " 1148603, 1148607, 1143139, 1166805, 1151883, 1155810, 1156357, 1158653,\n", + " 1156184, 1159032, 1159038, 1169109, 1152244, 1143729, 1143735, 1155588,\n", + " 1162549, 1144984, 1146500, 1153239, 1169257, 1144736, 1144739, 1152776,\n", + " 1155046, 1141471, 1141459, 1151650, 1156739, 1157955, 1153649, 1153661,\n", + " 1166591, 1150648, 1171040, 1144812, 1135567, 1145743, 1145222, 1169282,\n", + " 1155324, 1166462, 1147673, 1150535, 1144973, 1167055, 1148168, 1166053,\n", + " 1152624, 1148113, 1148124, 1147714, 1147724, 1145892, 1145900, 1145902,\n", + " 1153520, 1171581, 1152194, 1152203, 1175240, 1143397, 1143404, 1149565,\n", + " 1147343, 1147338, 1160030, 1160024, 1177920, 1145665, 1145664, 1151587,\n", + " 1166653, 1149487, 1169304, 1155172, 1165018, 1150515, 1161781, 1154614,\n", + " 1144336, 1157534, 1154670, 1154882, 1169162, 1157331, 1151668, 1151674,\n", + " 1169359, 1149688, 1158611, 1158623, 1158060, 1173047, 1165899, 1155502,\n", + " 1152353, 1170278, 1143170, 1168451, 1168400, 1168059, 1149402, 1148657,\n", + " 1148667, 1162215, 1172143, 1173307, 1154027, 1152150, 1159658, 1167857,\n", + " 1157158, 1157153, 1157371, 1157373, 1147696, 1147711, 1148131, 1157592,\n", + " 1170490, 1166827, 1169032, 1162106, 1165126, 1166016, 1177700, 1163989,\n", + " 1144550, 1153428, 1166531, 1166535, 1166684, 1154148, 1154159, 1158176,\n", + " 1184392, 1143279, 1180393, 1168481, 1143420, 1170176, 1181246, 1153803,\n", + " 1170527, 1153141, 1181572, 1153624, 1185142, 1182651, 1178565, 1179807,\n", + " 1158030, 1155262, 1177901, 1157792, 1157795, 1171623, 1157134, 1180036,\n", + " 1179540, 1153889, 1153898, 1145591, 1134650, 1164563, 1145626, 1156443,\n", + " 1172024, 1161917, 1149753, 1149755, 1146252, 1157761, 1170069, 1158940,\n", + " 1158380, 1155890, 1155899, 1162977, 1180940, 1140399, 1168282, 1182330,\n", + " 1161405, 1168621, 1164228, 1164231, 1183723, 1181461, 1154957, 1165444,\n", + " 1161819, 1146161, 1156861, 1156849, 1182395, 1147172, 1147182, 1183976,\n", + " 1170034, 1139831, 1150265, 1154812, 1182220, 1151288, 1186405, 1156055,\n", + " 1151972, 1181889, 1179686, 1188371, 1189316, 1156842, 1194067, 1189191,\n", + " 1181939, 1190246, 1182060, 1193165, 1162156, 1181295, 1151774, 1153733,\n", + " 1190040, 1190452, 1152117, 1191606, 1178003, 1177461, 1193725, 1177285,\n", + " 1177295, 1156672, 1172423, 1166788, 1145395, 1145397, 1179750, 1155959,\n", + " 1155962, 1181646, 1188105, 1187189, 1183794, 1179765, 1169831, 1193503,\n", + " 1192554, 1193329, 1191142, 1181033, 1192960, 1157008, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1137212, 1141424, 1136228, 1140285, 1136349, 1135928, 1135716,\n", + " 1135727, 1141751, 1141758, 1136210, 1136215, 1136144, 1136148, 1136962,\n", + " 1136969, 1138897, 1143600, 1149839, 1145373, 1146978, 1146983, 1137947,\n", + " 1145999, 1137268, 1143372, 1143363, 1146646, 1146647, 1139615, 1148976,\n", + " 1150509, 1149216, 1142958, 1155689, 1143820, 1147473, 1142881, 1153940,\n", + " 1144637, 1144632, 1135262, 1149038, 1146995, 1147003, 1153012, 1153018,\n", + " 1134701, 1148346, 1136112, 1152664, 1153220, 1147094, 1137220, 1137225,\n", + " 1145419, 1155019, 1139365, 1139371, 1150330, 1152416, 1152427, 1134717,\n", + " 1134710, 1140540, 1138112, 1154415, 1137254, 1137263, 1138356, 1153463,\n", + " 1135913, 1140027, 1140953, 1135367, 1135202, 1134970, 1141036, 1134794,\n", + " 1157443, 1138504, 1137329, 1137693, 1139215, 1144395, 1137529, 1135408,\n", + " 1157405, 1136662, 1137441, 1156146, 1156149, 1156159, 1148481, 1135583,\n", + " 1136097, 1136100, 1136101, 1140240, 1138514, 1137957, 1156967, 1135522,\n", + " 1157706, 1138440, 1138461, 1136594, 1135123, 1158390, 1156605, 1147111,\n", + " 1147119, 1142611, 1135359, 1135627, 1158984, 1135772, 1139855, 1139844,\n", + " 1136457, 1139667, 1139668, 1139673, 1139664, 1138067, 1138069, 1134992,\n", + " 1152640, 1152654, 1158971, 1158974, 1139318, 1142900, 1142906, 1142909,\n", + " 1159018, 1159019, 1141065, 1153543, 1143625, 1140034, 1139933, 1138148,\n", + " 1141963, 1146075, 1140550, 1140556, 1152044, 1142299, 1137734, 1137728,\n", + " 1137743, 1134924, 1134922, 1140901, 1135540, 1135549, 1141088, 1141097,\n", + " 1141098, 1141102, 1144138, 1149001, 1139898, 1143767, 1154855, 1137297,\n", + " 1143221, 1139025, 1140007, 1146832, 1135860, 1135861, 1136426, 1154472,\n", + " 1139436, 1136638, 1141226, 1141901, 1139386, 1136917, 1139741, 1139495,\n", + " 1141609, 1144650, 1144428, 1138482, 1142056, 1141821, 1146796, 1153670,\n", + " 1143204, 1137766, 1137070, 1137057, 1142917, 1142924, 1142913, 1148444,\n", + " 1144596, 1148265, 1136867, 1145298, 1145302, 1141209, 1140885, 1137614,\n", + " 1144865, 1136565, 1139559, 1158691, 1158703, 1138529, 1138539, 1138537,\n", + " 1137841, 1147153, 1136369, 1142640, 1141365, 1153068, 1141664, 1149101,\n", + " 1138293, 1144279, 1139508, 1139510, 1139127, 1145001, 1143790, 1143779,\n", + " 1140619, 1140990, 1147050, 1145873, 1143551, 1152976, 1139447, 1141925,\n", + " 1144242, 1140580, 1150700, 1139405, 1143643, 1134861, 1136274, 1146024,\n", + " 1150601, 1138085, 1146140, 1141585, 1139990, 1143293, 1151122, 1151124,\n", + " 1147543, 1147540, 1148763, 1148765, 1147282, 1142817, 1142816, 1138660,\n", + " 1136330, 1140348, 1142637, 1149366, 1148001, 1143040, 1148408, 1136167,\n", + " 1138922, 1138923, 1146105, 1139297, 1139304, 1139329, 1136445, 1142126,\n", + " 1142149, 1142159, 1143345, 1144765, 1137098, 1144086, 1144319, 1150294,\n", + " 1146523, 1138024, 1143465, 1143457, 1144303, 1143937, 1143949, 1135441,\n", + " 1140364, 1143080, 1148965, 1147984, 1147996, 1147999, 1146949, 1134902,\n", + " 1134907, 1144011, 1139252, 1139249, 1148704, 1141327, 1141827, 1141833,\n", + " 1146742, 1153701, 1152328, 1147056, 1149722, 1147025, 1147031, 1147970,\n", + " 1147187, 1158226, 1154526, 1145232, 1145237, 1145240, 1145235, 1145751,\n", + " 1148397, 1146178, 1151242, 1152537, 1150274, 1150445, 1149791, 1141356,\n", + " 1145833, 1150342, 1150348, 1150350, 1152013, 1165251, 1165253, 1147807,\n", + " 1151482, 1151487, 1151473, 1152023, 1144881, 1151041, 1145256, 1145259,\n", + " 1145263, 1134869, 1150127, 1147019, 1147023, 1153963, 1158949, 1141949,\n", + " 1146776, 1148744, 1153568, 1162284, 1147653, 1147659, 1149412, 1148288,\n", + " 1148294, 1139096, 1154420, 1148180, 1136251, 1146676, 1157968, 1157976,\n", + " 1157983, 1148724, 1148729, 1144110, 1168970, 1168960, 1146547, 1146559,\n", + " 1148204, 1148108, 1171939, 1154168, 1153192, 1153188, 1153197, 1145104,\n", + " 1150935, 1152878, 1144848, 1155088, 1146231, 1147442, 1151906, 1154183,\n", + " 1150708, 1150707, 1148505, 1141420, 1141419, 1141408, 1136000, 1151358,\n", + " 1147728, 1148949, 1146969, 1146972, 1153249, 1150210, 1146623, 1151694,\n", + " 1152849, 1152405, 1152409, 1152097, 1152100, 1146280, 1151728, 1156321,\n", + " 1153029, 1153038, 1150085, 1137746, 1146307, 1146304, 1159974, 1152612,\n", + " 1155140, 1136410, 1152831, 1155337, 1154123, 1155354, 1152673, 1152672,\n", + " 1154633, 1151580, 1151617, 1151623, 1150586, 1148927, 1150613, 1144529,\n", + " 1145952, 1138982, 1138991, 1151298, 1152342, 1146704, 1145576, 1138272,\n", + " 1138283, 1138279, 1138281, 1157147, 1156004, 1136028, 1136029, 1156619,\n", + " 1156621, 1156622, 1152928, 1151061, 1156399, 1152888, 1143484, 1143486,\n", + " 1150172, 1150164, 1149273, 1167939, 1148040, 1155202, 1155222, 1145656,\n", + " 1149794, 1148628, 1148637, 1158530, 1137458, 1135698, 1159216, 1153085,\n", + " 1154371, 1142387, 1150872, 1148892, 1158916, 1154942, 1156505, 1157064,\n", + " 1157069, 1155422, 1155418, 1152833, 1151251, 1135222, 1135729, 1135730,\n", + " 1138830, 1151788, 1151777, 1153413, 1147810, 1139525, 1139524, 1158304,\n", + " 1158308, 1155441, 1137972, 1153359, 1150129, 1150130, 1150132, 1162120,\n", + " 1140877, 1154529, 1154530, 1154528, 1145768, 1142755, 1142758, 1138775,\n", + " 1156269, 1156271, 1151379, 1155375, 1155122, 1152526, 1157183, 1155755,\n", + " 1151438, 1146913, 1145806, 1145807, 1156452, 1156463, 1158096, 1158104,\n", + " 1168230, 1168238, 1154763, 1155628, 1155630, 1156563, 1154555, 1136476,\n", + " 1158824, 1153715, 1148654, 1154650, 1146938, 1154241, 1154095, 1156718,\n", + " 1143189, 1143196, 1143528, 1150371, 1150379, 1150811, 1150977, 1150987,\n", + " 1157928, 1151030, 1158126, 1137381, 1159116, 1137316, 1168154, 1135601,\n", + " 1148149, 1150661, 1155848, 1155852, 1158664, 1158665, 1157685, 1159258,\n", + " 1152209, 1152220, 1140381, 1155880, 1157732, 1157740, 1157735, 1157033,\n", + " 1144843, 1155971, 1155975, 1158841, 1158846, 1156811, 1155403, 1149700,\n", + " 1154600, 1154605, 1165556, 1159441, 1171171, 1140213, 1140221, 1161691,\n", + " 1162995, 1158815, 1158814, 1158444, 1158285, 1156665, 1147599, 1142747,\n", + " 1156488, 1153808, 1136640, 1136646, 1134757, 1140049, 1142184, 1158558,\n", + " 1146126, 1165778, 1164514, 1154340, 1158006, 1150011, 1155521, 1165848,\n", + " 1142493, 1163471, 1137557, 1164276, 1142663, 1142666, 1150684, 1167346,\n", + " 1159042, 1159052, 1159070, 1159143, 1158295, 1153052, 1153045, 1167174,\n", + " 1166241, 1156226, 1142864, 1153842, 1156096, 1156101, 1156107, 1165244,\n", + " 1167189, 1150046, 1149063, 1145948, 1155479, 1155480, 1158680, 1138161,\n", + " 1164006, 1156795, 1160764, 1166072, 1148771, 1140731, 1146063, 1171258,\n", + " 1162471, 1160689, 1160176, 1165309, 1140641, 1140643, 1141862, 1148600,\n", + " 1148603, 1148607, 1143139, 1166805, 1151883, 1155810, 1156357, 1158653,\n", + " 1156184, 1159032, 1159038, 1169109, 1152244, 1143729, 1143735, 1155588,\n", + " 1162549, 1144984, 1146500, 1153239, 1169257, 1144736, 1144739, 1152776,\n", + " 1155046, 1141471, 1141459, 1151650, 1156739, 1157955, 1153649, 1153661,\n", + " 1166591, 1150648, 1171040, 1144812, 1135567, 1145743, 1145222, 1169282,\n", + " 1155324, 1166462, 1147673, 1150535, 1144973, 1167055, 1148168, 1166053,\n", + " 1152624, 1148113, 1148124, 1147714, 1147724, 1145892, 1145900, 1145902,\n", + " 1153520, 1171581, 1152194, 1152203, 1175240, 1143397, 1143404, 1149565,\n", + " 1147343, 1147338, 1160030, 1160024, 1177920, 1145665, 1145664, 1151587,\n", + " 1166653, 1149487, 1169304, 1155172, 1165018, 1150515, 1161781, 1154614,\n", + " 1144336, 1157534, 1154670, 1154882, 1169162, 1157331, 1151668, 1151674,\n", + " 1169359, 1149688, 1158611, 1158623, 1158060, 1173047, 1165899, 1155502,\n", + " 1152353, 1170278, 1143170, 1168451, 1168400, 1168059, 1149402, 1148657,\n", + " 1148667, 1162215, 1172143, 1173307, 1154027, 1152150, 1159658, 1167857,\n", + " 1157158, 1157153, 1157371, 1157373, 1147696, 1147711, 1148131, 1157592,\n", + " 1170490, 1166827, 1169032, 1162106, 1165126, 1166016, 1177700, 1163989,\n", + " 1144550, 1153428, 1166531, 1166535, 1166684, 1154148, 1154159, 1158176,\n", + " 1184392, 1143279, 1180393, 1168481, 1143420, 1170176, 1181246, 1153803,\n", + " 1170527, 1153141, 1181572, 1153624, 1185142, 1182651, 1178565, 1179807,\n", + " 1158030, 1155262, 1177901, 1157792, 1157795, 1171623, 1157134, 1180036,\n", + " 1179540, 1153889, 1153898, 1145591, 1134650, 1164563, 1145626, 1156443,\n", + " 1172024, 1161917, 1149753, 1149755, 1146252, 1157761, 1170069, 1158940,\n", + " 1158380, 1155890, 1155899, 1162977, 1180940, 1140399, 1168282, 1182330,\n", + " 1161405, 1168621, 1164228, 1164231, 1183723, 1181461, 1154957, 1165444,\n", + " 1161819, 1146161, 1156861, 1156849, 1182395, 1147172, 1147182, 1183976,\n", + " 1170034, 1139831, 1150265, 1154812, 1182220, 1151288, 1186405, 1156055,\n", + " 1151972, 1181889, 1179686, 1188371, 1189316, 1156842, 1194067, 1189191,\n", + " 1181939, 1190246, 1182060, 1193165, 1162156, 1181295, 1151774, 1153733,\n", + " 1190040, 1190452, 1152117, 1191606, 1178003, 1177461, 1193725, 1177285,\n", + " 1177295, 1156672, 1172423, 1166788, 1145395, 1145397, 1179750, 1155959,\n", + " 1155962, 1181646, 1188105, 1187189, 1183794, 1179765, 1169831, 1193503,\n", + " 1192554, 1193329, 1191142, 1181033, 1192960, 1157008, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197719, 1198723, 1198730, 1199835, 1199282, 1198459, 1202255, 1198844,\n", + " 1201577, 1201582, 1200642, 1200644, 1200650, 1197777, 1201016, 1194866,\n", + " 1194770, 1195499, 1196631, 1195514, 1197921, 1201992, 1198542, 1198543,\n", + " 1194952, 1195459, 1197860, 1196977, 1194756, 1197831, 1195313, 1195325,\n", + " 1197104, 1195989, 1195145, 1195148, 1195265, 1195267, 1197141, 1197140,\n", + " 1200765, 1197367, 1197265, 1196109, 1195847, 1195038, 1198915, 1197474,\n", + " 1196122, 1200032, 1196272, 1195353, 1199329, 1200959, 1199060, 1197286,\n", + " 1202747, 1194928, 1199688, 1199628, 1197990, 1200872, 1199154, 1199038,\n", + " 1201904, 1202585, 1195795, 1197601, 1197609, 1196727, 1195771, 1198428,\n", + " 1201525, 1199555, 1200769, 1200779, 1201827, 1202417, 1200570, 1195592,\n", + " 1198593, 1201156, 1200913, 1200927, 1202641, 1200526, 1200546, 1200553,\n", + " 1203071, 1200345, 1197945, 1195882, 1200181, 1201291, 1198478, 1196966,\n", + " 1195679, 1195664, 1198932, 1200276, 1197816, 1197822, 1197821, 1200585,\n", + " 1198299, 1203102, 1201138, 1194730, 1198824, 1197731, 1197735, 1200011,\n", + " 1198819, 1200974, 1195066, 1201886, 1200301, 1197652, 1200707, 1195082,\n", + " 1197872], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197719, 1198723, 1198730, 1199835, 1199282, 1198459, 1202255, 1198844,\n", + " 1201577, 1201582, 1200642, 1200644, 1200650, 1197777, 1201016, 1194866,\n", + " 1194770, 1195499, 1196631, 1195514, 1197921, 1201992, 1198542, 1198543,\n", + " 1194952, 1195459, 1197860, 1196977, 1194756, 1197831, 1195313, 1195325,\n", + " 1197104, 1195989, 1195145, 1195148, 1195265, 1195267, 1197141, 1197140,\n", + " 1200765, 1197367, 1197265, 1196109, 1195847, 1195038, 1198915, 1197474,\n", + " 1196122, 1200032, 1196272, 1195353, 1199329, 1200959, 1199060, 1197286,\n", + " 1202747, 1194928, 1199688, 1199628, 1197990, 1200872, 1199154, 1199038,\n", + " 1201904, 1202585, 1195795, 1197601, 1197609, 1196727, 1195771, 1198428,\n", + " 1201525, 1199555, 1200769, 1200779, 1201827, 1202417, 1200570, 1195592,\n", + " 1198593, 1201156, 1200913, 1200927, 1202641, 1200526, 1200546, 1200553,\n", + " 1203071, 1200345, 1197945, 1195882, 1200181, 1201291, 1198478, 1196966,\n", + " 1195679, 1195664, 1198932, 1200276, 1197816, 1197822, 1197821, 1200585,\n", + " 1198299, 1203102, 1201138, 1194730, 1198824, 1197731, 1197735, 1200011,\n", + " 1198819, 1200974, 1195066, 1201886, 1200301, 1197652, 1200707, 1195082,\n", + " 1197872], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 0.1130, 0.0319, 0.6558, ..., 0.1513, -0.0017, -0.0038],\n", + " [ 0.1889, 0.0121, 0.7903, ..., 0.1323, -0.0019, -0.0052],\n", + " [ 0.1568, 0.0186, 0.7560, ..., 0.1366, -0.0018, -0.0049],\n", + " ...,\n", + " [ 0.1130, 0.0319, 0.6558, ..., 0.1513, -0.0017, -0.0038],\n", + " [ 0.1666, 0.0759, 0.7758, ..., 0.1760, -0.0021, -0.0050],\n", + " [ 0.1546, 0.0550, 0.7157, ..., 0.1238, -0.0018, -0.0048]],\n", + " device='cuda:0'), 'paper': tensor([[ 1.9468e+00, -6.4165e-03, 2.5342e+00, ..., -7.9967e-04,\n", + " -3.0600e-02, 1.9092e+00],\n", + " [ 1.2766e+00, 4.3600e-01, 2.6611e+00, ..., -1.7503e-03,\n", + " -1.9148e-02, 4.8630e-01],\n", + " [ 6.0194e-01, -3.8674e-03, 1.1570e+00, ..., -6.4420e-03,\n", + " -1.0419e-02, -2.8176e-03],\n", + " ...,\n", + " [ 8.5102e-01, -1.1952e-02, 1.1043e+00, ..., -5.6150e-03,\n", + " -2.0024e-02, 5.5994e-01],\n", + " [ 8.3296e-01, -1.3857e-02, 1.6422e+00, ..., -9.7093e-03,\n", + " -1.7513e-02, -2.6691e-03],\n", + " [ 2.0882e+00, -1.1928e-02, 2.2080e+00, ..., 1.2732e-01,\n", + " -3.6706e-02, 2.7361e+00]], device='cuda:0'), 'author': tensor([[-2.9035e-03, 1.8955e-01, 3.6573e-01, ..., 1.3198e+00,\n", + " -4.1947e-03, -2.1062e-03],\n", + " [-6.2875e-03, 2.1849e-01, 4.2860e-01, ..., 1.3514e+00,\n", + " -5.2331e-03, -5.3316e-03],\n", + " [-1.5110e-03, 1.5724e-01, 1.7526e-01, ..., 1.3351e+00,\n", + " -1.2940e-03, 3.7435e-02],\n", + " ...,\n", + " [-1.1303e-03, 2.0667e-02, 2.9023e-01, ..., 1.6147e+00,\n", + " 6.5162e-02, 1.3219e-01],\n", + " [-1.5284e-03, 1.4312e-01, 3.2023e-01, ..., 1.3841e+00,\n", + " -1.9238e-03, -7.0702e-04],\n", + " [-4.5085e-03, 1.7423e-01, 3.7293e-01, ..., 1.1571e+00,\n", + " -4.6635e-03, -3.3582e-03]], device='cuda:0'), 'field_of_study': tensor([[-1.1965e-03, 4.3201e-01, 1.8061e-01, ..., -7.4116e-03,\n", + " 1.8145e-01, 2.9837e-01],\n", + " [-1.2282e-03, 3.8441e-01, 1.5130e-01, ..., -6.2631e-03,\n", + " 1.1329e-01, 2.3040e-01],\n", + " [-9.4573e-04, 3.7256e-01, 1.2489e-01, ..., -6.1380e-03,\n", + " 1.8832e-01, 1.8719e-01],\n", + " ...,\n", + " [-5.3203e-04, 4.5018e-01, 1.8470e-01, ..., -5.6600e-03,\n", + " 2.7055e-01, 1.0747e-01],\n", + " [-7.0073e-04, 3.1125e-01, 1.2548e-01, ..., -4.6079e-03,\n", + " -2.5087e-04, 2.1341e-01],\n", + " [ 1.9066e-01, 6.2994e-01, 4.2866e-01, ..., -5.5681e-03,\n", + " 1.8121e-01, -1.0766e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 211, 110, 100, 157, 157, 22, 9, 178, 178, 178, 178, 178,\n", + " 424, 541, 342, 264, 264, 300, 238, 696, 696, 462, 541, 423,\n", + " 423, 660, 581, 761, 623, 818, 785, 733, 855, 855, 1108, 1280,\n", + " 1133, 918, 918, 934, 934, 1224, 1322, 1160, 1402, 1549, 1402, 1404,\n", + " 1404, 1404, 1258, 1591, 1391, 1454, 1469, 1655, 1693, 1359, 1359, 1560,\n", + " 1507, 1625, 1521, 1766, 1873, 1752, 1688, 1636, 1750, 1798, 1798, 1852,\n", + " 1852, 1852, 2144, 2019, 2019, 1923, 1923, 1842, 2184, 2066, 2066, 2206,\n", + " 2256, 2289, 2289, 2394, 2339, 2312, 2582, 2537, 2537, 2537, 2537, 2565,\n", + " 2521, 2606, 2606, 2578, 2501, 2501, 2501, 2764, 2858, 2784, 2784, 2663,\n", + " 2926, 2782, 2882, 2984, 2984, 3036, 3127, 3101, 3139, 3141, 3180, 3180,\n", + " 3180, 3180, 3314, 3319, 3319, 3319, 3319, 3558, 3522, 3706, 3987, 4111,\n", + " 4078, 4089, 4000, 4125, 4206, 4206, 4313, 4308, 4507, 4507, 4360, 4488,\n", + " 4453, 4566, 4451, 4587, 4802, 4802, 4774, 5079, 5079, 4905, 5095, 5095,\n", + " 5022, 5082, 5173, 5147, 5264, 5258, 5481, 5481, 5571, 5837, 5566, 5566,\n", + " 5649, 5612, 5887, 5911, 5694, 5596, 6124, 6124, 6090, 6090, 6328, 6126,\n", + " 6024, 6340, 6172, 5897, 5897, 6229, 6229, 6080, 6091, 6091, 6229, 6229,\n", + " 6296, 6296],\n", + " [ 4, 76, 32, 50, 11, 62, 4, 40, 52, 51, 77, 3,\n", + " 116, 74, 53, 58, 85, 23, 59, 109, 74, 108, 109, 37,\n", + " 73, 95, 65, 22, 25, 56, 69, 46, 55, 24, 42, 4,\n", + " 64, 74, 109, 75, 26, 116, 0, 69, 104, 61, 79, 117,\n", + " 105, 6, 80, 118, 111, 64, 39, 23, 78, 82, 12, 64,\n", + " 65, 6, 28, 41, 89, 41, 29, 67, 63, 92, 112, 109,\n", + " 74, 68, 96, 14, 88, 74, 109, 64, 41, 48, 41, 64,\n", + " 76, 67, 19, 65, 64, 76, 4, 7, 53, 81, 4, 65,\n", + " 74, 63, 10, 120, 21, 84, 14, 17, 4, 22, 116, 98,\n", + " 4, 50, 35, 21, 113, 20, 103, 70, 112, 119, 31, 106,\n", + " 57, 100, 105, 99, 4, 30, 110, 81, 2, 36, 69, 49,\n", + " 22, 55, 117, 71, 91, 33, 97, 108, 97, 112, 38, 94,\n", + " 34, 45, 66, 112, 16, 86, 4, 16, 86, 83, 108, 22,\n", + " 108, 4, 22, 8, 15, 5, 71, 72, 44, 120, 60, 59,\n", + " 97, 102, 90, 13, 115, 1, 114, 87, 69, 101, 108, 46,\n", + " 107, 9, 59, 69, 43, 71, 27, 47, 88, 93, 18, 69,\n", + " 54, 93]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1089, 681, 1301, ..., 6763, 2767, 5865],\n", + " [ 316, 85, 46, ..., 7692, 7825, 7831]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 109, 116, 26, ..., 104, 112, 85],\n", + " [ 107, 105, 15, ..., 6305, 6274, 6255]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 159, 159, 159, ..., 7822, 7822, 7771],\n", + " [ 232, 155, 279, ..., 35, 528, 512]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 356, 889, 308, ..., 127, 584, 113],\n", + " [ 480, 109, 343, ..., 7751, 7845, 7787]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1391, 7260, 5897, ..., 3361, 681, 4285],\n", + " [ 1, 39, 154, ..., 6298, 6260, 6259]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 159, 159, 159, ..., 7822, 7822, 7822],\n", + " [ 994, 1534, 2314, ..., 6193, 6595, 5774]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 211, 211, 211, ..., 6172, 6172, 6172],\n", + " [3898, 5026, 7334, ..., 5150, 1085, 5188]], device='cuda:0')}\n", + "Epoch: 003, Loss: 0.9613, Train: 341.3500\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005891\n", + "sampling 0.005429\n", + "noi time: 0.000734\n", + "get_vertex_data call: 0.070267\n", + "noi group time: 0.003811\n", + "eoi_group_time: 0.013731\n", + "second half: 0.262934\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 19149, 3106, ..., 1134482, 1100728, 1110070],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 19149, 3106, ..., 1134482, 1100728, 1110070],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1211788, 1221048, 1227408, ..., 1925034, 1930673, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1211788, 1221048, 1227408, ..., 1925034, 1930673, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137201, 1140284, 1135926, 1135160, 1140799, 1141758, 1136223, 1136969,\n", + " 1136971, 1138897, 1139808, 1139811, 1145999, 1137273, 1138942, 1143362,\n", + " 1143372, 1139241, 1150503, 1142963, 1139857, 1149216, 1142958, 1147473,\n", + " 1135987, 1153937, 1144632, 1134697, 1135111, 1148346, 1146669, 1146661,\n", + " 1146471, 1153220, 1136742, 1137220, 1139365, 1139371, 1147204, 1136683,\n", + " 1150329, 1152427, 1135183, 1138356, 1153467, 1134735, 1140030, 1140952,\n", + " 1140954, 1135367, 1135202, 1141036, 1136770, 1134794, 1138504, 1137342,\n", + " 1137534, 1143320, 1139161, 1142607, 1141081, 1138514, 1137957, 1154132,\n", + " 1135522, 1139684, 1138305, 1138440, 1140079, 1138461, 1138449, 1154790,\n", + " 1138695, 1156606, 1147116, 1142611, 1142615, 1142622, 1135359, 1158984,\n", + " 1148531, 1135769, 1139667, 1139673, 1134992, 1152640, 1159009, 1159018,\n", + " 1140034, 1139933, 1134891, 1146075, 1140557, 1152044, 1134922, 1140906,\n", + " 1134750, 1138246, 1135549, 1149001, 1145357, 1143767, 1139025, 1139033,\n", + " 1149969, 1146834, 1146832, 1142499, 1141681, 1141695, 1140469, 1141221,\n", + " 1141891, 1139386, 1141653, 1136917, 1143667, 1143677, 1139495, 1168566,\n", + " 1144650, 1147850, 1148075, 1142093, 1140169, 1158748, 1158749, 1138708,\n", + " 1140110, 1143107, 1136864, 1144182, 1144865, 1146201, 1134827, 1139560,\n", + " 1141365, 1153068, 1141664, 1149090, 1139015, 1139508, 1139510, 1145001,\n", + " 1143692, 1147050, 1147047, 1143536, 1141925, 1144242, 1141841, 1141853,\n", + " 1137149, 1150696, 1150698, 1143845, 1146024, 1146025, 1154323, 1141585,\n", + " 1142537, 1139990, 1139998, 1147543, 1147282, 1142816, 1142629, 1149366,\n", + " 1144923, 1138923, 1157720, 1136836, 1136832, 1144771, 1141496, 1142153,\n", + " 1145429, 1143345, 1144753, 1144083, 1150763, 1144310, 1150296, 1146523,\n", + " 1143456, 1143937, 1143949, 1135451, 1146636, 1140360, 1140364, 1168921,\n", + " 1144219, 1144222, 1147984, 1147999, 1148704, 1148710, 1141825, 1153702,\n", + " 1147070, 1147025, 1147031, 1142861, 1147971, 1147880, 1148364, 1149865,\n", + " 1154526, 1151646, 1145232, 1145240, 1145751, 1152530, 1152538, 1150438,\n", + " 1150350, 1165251, 1165252, 1152030, 1139914, 1149530, 1148278, 1147009,\n", + " 1147023, 1141949, 1146776, 1150736, 1141269, 1151795, 1154976, 1147653,\n", + " 1149412, 1148288, 1148291, 1146678, 1138404, 1157983, 1149810, 1148204,\n", + " 1153124, 1153188, 1152974, 1167964, 1152878, 1150356, 1155088, 1147442,\n", + " 1148498, 1148510, 1146565, 1141420, 1141408, 1152784, 1147737, 1149388,\n", + " 1146266, 1146972, 1156402, 1151920, 1151925, 1146623, 1151687, 1144465,\n", + " 1152103, 1146280, 1151729, 1137746, 1146304, 1140521, 1154123, 1152673,\n", + " 1154638, 1151617, 1151622, 1150578, 1136134, 1136798, 1148914, 1148916,\n", + " 1153385, 1152341, 1146816, 1153297, 1153311, 1152300, 1136028, 1158712,\n", + " 1151195, 1152928, 1151067, 1142777, 1150110, 1148040, 1167408, 1145656,\n", + " 1137052, 1148628, 1149947, 1154564, 1142041, 1157226, 1158857, 1145191,\n", + " 1137811, 1151257, 1135730, 1156638, 1153413, 1155441, 1137971, 1150132,\n", + " 1162120, 1154530, 1142755, 1142764, 1156207, 1156271, 1151379, 1155122,\n", + " 1149324, 1155748, 1156563, 1158566, 1158823, 1158824, 1158829, 1153715,\n", + " 1148835, 1148647, 1143262, 1143263, 1146936, 1156711, 1163132, 1143189,\n", + " 1150371, 1153322, 1153325, 1155615, 1155613, 1140751, 1157654, 1158584,\n", + " 1153786, 1145693, 1178445, 1150661, 1150671, 1158665, 1149137, 1149145,\n", + " 1159258, 1152209, 1159213, 1152498, 1156698, 1140368, 1140380, 1140374,\n", + " 1156031, 1157033, 1144843, 1155971, 1155975, 1161673, 1142076, 1158840,\n", + " 1158846, 1161899, 1154600, 1160163, 1136896, 1158753, 1157304, 1158802,\n", + " 1158815, 1158438, 1158447, 1158444, 1156778, 1158285, 1152458, 1136487,\n", + " 1136494, 1156665, 1156490, 1153808, 1136640, 1140049, 1146123, 1146126,\n", + " 1155521, 1142493, 1167359, 1157944, 1162039, 1153052, 1153045, 1156104,\n", + " 1156107, 1138393, 1150046, 1155479, 1154299, 1153514, 1164857, 1164859,\n", + " 1146873, 1156784, 1149953, 1139782, 1154590, 1166073, 1157236, 1157247,\n", + " 1146063, 1158449, 1160697, 1158868, 1169493, 1140643, 1148593, 1159646,\n", + " 1156363, 1156353, 1156361, 1159025, 1169109, 1152247, 1158905, 1160605,\n", + " 1155588, 1151227, 1148567, 1147836, 1146500, 1144737, 1144739, 1153212,\n", + " 1141471, 1147426, 1157052, 1156737, 1156739, 1156742, 1157955, 1153663,\n", + " 1166579, 1150648, 1144812, 1135567, 1142722, 1142733, 1156303, 1165644,\n", + " 1145743, 1145176, 1165943, 1169282, 1155326, 1155324, 1144973, 1147694,\n", + " 1145447, 1152630, 1155907, 1148113, 1148124, 1145902, 1153520, 1168666,\n", + " 1143392, 1143404, 1171229, 1158735, 1154076, 1150773, 1171777, 1180418,\n", + " 1150515, 1150518, 1144336, 1157534, 1147746, 1147750, 1171413, 1141048,\n", + " 1141054, 1151664, 1146337, 1138609, 1149688, 1158611, 1172575, 1172866,\n", + " 1149847, 1160138, 1160032, 1147409, 1172486, 1152353, 1164652, 1149402,\n", + " 1148661, 1162222, 1167010, 1173307, 1160935, 1154028, 1152150, 1152151,\n", + " 1157158, 1157153, 1172111, 1157371, 1157373, 1147711, 1151850, 1157598,\n", + " 1169037, 1166746, 1178281, 1178056, 1159100, 1177683, 1170874, 1182132,\n", + " 1154151, 1154148, 1149173, 1179243, 1171302, 1153803, 1153141, 1164818,\n", + " 1171122, 1186306, 1171407, 1171773, 1171623, 1181380, 1155794, 1155796,\n", + " 1157132, 1174947, 1158249, 1154497, 1134654, 1164563, 1145626, 1156432,\n", + " 1172024, 1178760, 1161907, 1146252, 1153609, 1184313, 1140399, 1168273,\n", + " 1162253, 1164231, 1161819, 1189069, 1162754, 1164133, 1168943, 1170431,\n", + " 1192741, 1139831, 1150265, 1154812, 1192076, 1156049, 1156055, 1151972,\n", + " 1173019, 1193366, 1188161, 1181951, 1168683, 1171675, 1151774, 1190455,\n", + " 1175349, 1160350, 1156681, 1156672, 1172122, 1166789, 1145395, 1160963,\n", + " 1155962, 1185603, 1155553, 1191288, 1169831, 1169837, 1172896, 1167471,\n", + " 1187634], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137201, 1140284, 1135926, 1135160, 1140799, 1141758, 1136223, 1136969,\n", + " 1136971, 1138897, 1139808, 1139811, 1145999, 1137273, 1138942, 1143362,\n", + " 1143372, 1139241, 1150503, 1142963, 1139857, 1149216, 1142958, 1147473,\n", + " 1135987, 1153937, 1144632, 1134697, 1135111, 1148346, 1146669, 1146661,\n", + " 1146471, 1153220, 1136742, 1137220, 1139365, 1139371, 1147204, 1136683,\n", + " 1150329, 1152427, 1135183, 1138356, 1153467, 1134735, 1140030, 1140952,\n", + " 1140954, 1135367, 1135202, 1141036, 1136770, 1134794, 1138504, 1137342,\n", + " 1137534, 1143320, 1139161, 1142607, 1141081, 1138514, 1137957, 1154132,\n", + " 1135522, 1139684, 1138305, 1138440, 1140079, 1138461, 1138449, 1154790,\n", + " 1138695, 1156606, 1147116, 1142611, 1142615, 1142622, 1135359, 1158984,\n", + " 1148531, 1135769, 1139667, 1139673, 1134992, 1152640, 1159009, 1159018,\n", + " 1140034, 1139933, 1134891, 1146075, 1140557, 1152044, 1134922, 1140906,\n", + " 1134750, 1138246, 1135549, 1149001, 1145357, 1143767, 1139025, 1139033,\n", + " 1149969, 1146834, 1146832, 1142499, 1141681, 1141695, 1140469, 1141221,\n", + " 1141891, 1139386, 1141653, 1136917, 1143667, 1143677, 1139495, 1168566,\n", + " 1144650, 1147850, 1148075, 1142093, 1140169, 1158748, 1158749, 1138708,\n", + " 1140110, 1143107, 1136864, 1144182, 1144865, 1146201, 1134827, 1139560,\n", + " 1141365, 1153068, 1141664, 1149090, 1139015, 1139508, 1139510, 1145001,\n", + " 1143692, 1147050, 1147047, 1143536, 1141925, 1144242, 1141841, 1141853,\n", + " 1137149, 1150696, 1150698, 1143845, 1146024, 1146025, 1154323, 1141585,\n", + " 1142537, 1139990, 1139998, 1147543, 1147282, 1142816, 1142629, 1149366,\n", + " 1144923, 1138923, 1157720, 1136836, 1136832, 1144771, 1141496, 1142153,\n", + " 1145429, 1143345, 1144753, 1144083, 1150763, 1144310, 1150296, 1146523,\n", + " 1143456, 1143937, 1143949, 1135451, 1146636, 1140360, 1140364, 1168921,\n", + " 1144219, 1144222, 1147984, 1147999, 1148704, 1148710, 1141825, 1153702,\n", + " 1147070, 1147025, 1147031, 1142861, 1147971, 1147880, 1148364, 1149865,\n", + " 1154526, 1151646, 1145232, 1145240, 1145751, 1152530, 1152538, 1150438,\n", + " 1150350, 1165251, 1165252, 1152030, 1139914, 1149530, 1148278, 1147009,\n", + " 1147023, 1141949, 1146776, 1150736, 1141269, 1151795, 1154976, 1147653,\n", + " 1149412, 1148288, 1148291, 1146678, 1138404, 1157983, 1149810, 1148204,\n", + " 1153124, 1153188, 1152974, 1167964, 1152878, 1150356, 1155088, 1147442,\n", + " 1148498, 1148510, 1146565, 1141420, 1141408, 1152784, 1147737, 1149388,\n", + " 1146266, 1146972, 1156402, 1151920, 1151925, 1146623, 1151687, 1144465,\n", + " 1152103, 1146280, 1151729, 1137746, 1146304, 1140521, 1154123, 1152673,\n", + " 1154638, 1151617, 1151622, 1150578, 1136134, 1136798, 1148914, 1148916,\n", + " 1153385, 1152341, 1146816, 1153297, 1153311, 1152300, 1136028, 1158712,\n", + " 1151195, 1152928, 1151067, 1142777, 1150110, 1148040, 1167408, 1145656,\n", + " 1137052, 1148628, 1149947, 1154564, 1142041, 1157226, 1158857, 1145191,\n", + " 1137811, 1151257, 1135730, 1156638, 1153413, 1155441, 1137971, 1150132,\n", + " 1162120, 1154530, 1142755, 1142764, 1156207, 1156271, 1151379, 1155122,\n", + " 1149324, 1155748, 1156563, 1158566, 1158823, 1158824, 1158829, 1153715,\n", + " 1148835, 1148647, 1143262, 1143263, 1146936, 1156711, 1163132, 1143189,\n", + " 1150371, 1153322, 1153325, 1155615, 1155613, 1140751, 1157654, 1158584,\n", + " 1153786, 1145693, 1178445, 1150661, 1150671, 1158665, 1149137, 1149145,\n", + " 1159258, 1152209, 1159213, 1152498, 1156698, 1140368, 1140380, 1140374,\n", + " 1156031, 1157033, 1144843, 1155971, 1155975, 1161673, 1142076, 1158840,\n", + " 1158846, 1161899, 1154600, 1160163, 1136896, 1158753, 1157304, 1158802,\n", + " 1158815, 1158438, 1158447, 1158444, 1156778, 1158285, 1152458, 1136487,\n", + " 1136494, 1156665, 1156490, 1153808, 1136640, 1140049, 1146123, 1146126,\n", + " 1155521, 1142493, 1167359, 1157944, 1162039, 1153052, 1153045, 1156104,\n", + " 1156107, 1138393, 1150046, 1155479, 1154299, 1153514, 1164857, 1164859,\n", + " 1146873, 1156784, 1149953, 1139782, 1154590, 1166073, 1157236, 1157247,\n", + " 1146063, 1158449, 1160697, 1158868, 1169493, 1140643, 1148593, 1159646,\n", + " 1156363, 1156353, 1156361, 1159025, 1169109, 1152247, 1158905, 1160605,\n", + " 1155588, 1151227, 1148567, 1147836, 1146500, 1144737, 1144739, 1153212,\n", + " 1141471, 1147426, 1157052, 1156737, 1156739, 1156742, 1157955, 1153663,\n", + " 1166579, 1150648, 1144812, 1135567, 1142722, 1142733, 1156303, 1165644,\n", + " 1145743, 1145176, 1165943, 1169282, 1155326, 1155324, 1144973, 1147694,\n", + " 1145447, 1152630, 1155907, 1148113, 1148124, 1145902, 1153520, 1168666,\n", + " 1143392, 1143404, 1171229, 1158735, 1154076, 1150773, 1171777, 1180418,\n", + " 1150515, 1150518, 1144336, 1157534, 1147746, 1147750, 1171413, 1141048,\n", + " 1141054, 1151664, 1146337, 1138609, 1149688, 1158611, 1172575, 1172866,\n", + " 1149847, 1160138, 1160032, 1147409, 1172486, 1152353, 1164652, 1149402,\n", + " 1148661, 1162222, 1167010, 1173307, 1160935, 1154028, 1152150, 1152151,\n", + " 1157158, 1157153, 1172111, 1157371, 1157373, 1147711, 1151850, 1157598,\n", + " 1169037, 1166746, 1178281, 1178056, 1159100, 1177683, 1170874, 1182132,\n", + " 1154151, 1154148, 1149173, 1179243, 1171302, 1153803, 1153141, 1164818,\n", + " 1171122, 1186306, 1171407, 1171773, 1171623, 1181380, 1155794, 1155796,\n", + " 1157132, 1174947, 1158249, 1154497, 1134654, 1164563, 1145626, 1156432,\n", + " 1172024, 1178760, 1161907, 1146252, 1153609, 1184313, 1140399, 1168273,\n", + " 1162253, 1164231, 1161819, 1189069, 1162754, 1164133, 1168943, 1170431,\n", + " 1192741, 1139831, 1150265, 1154812, 1192076, 1156049, 1156055, 1151972,\n", + " 1173019, 1193366, 1188161, 1181951, 1168683, 1171675, 1151774, 1190455,\n", + " 1175349, 1160350, 1156681, 1156672, 1172122, 1166789, 1145395, 1160963,\n", + " 1155962, 1185603, 1155553, 1191288, 1169831, 1169837, 1172896, 1167471,\n", + " 1187634], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195442, 1197226, 1197717, 1199282, 1198458, 1202255, 1198844, 1201582,\n", + " 1202119, 1199248, 1201016, 1198694, 1198546, 1198557, 1197512, 1194743,\n", + " 1194780, 1194783, 1199053, 1195511, 1195922, 1195263, 1199135, 1201992,\n", + " 1198543, 1199519, 1195888, 1199171, 1195740, 1196359, 1197807, 1195571,\n", + " 1198958, 1198646, 1198650, 1198163, 1196717, 1195279, 1195245, 1197273,\n", + " 1194859, 1195850, 1199384, 1195541, 1196283, 1196034, 1199060, 1194928,\n", + " 1199628, 1197990, 1200878, 1198400, 1198410, 1199579, 1199231, 1201908,\n", + " 1198765, 1196496, 1197977, 1201889, 1197601, 1196727, 1200887, 1200892,\n", + " 1200894, 1198811, 1199555, 1201824, 1201827, 1198066, 1199445, 1201079,\n", + " 1201156, 1200913, 1199546, 1202641, 1199712, 1199723, 1201049, 1201052,\n", + " 1200546, 1200553, 1200429, 1197097, 1202541, 1202055, 1199917, 1201442,\n", + " 1201034, 1200831, 1199976, 1195876, 1201291, 1199922, 1200242, 1200398,\n", + " 1196960, 1196966, 1198338, 1200997, 1200784, 1199606, 1194699, 1195679,\n", + " 1200445, 1200276, 1203102, 1201138, 1200003, 1197731, 1197735, 1200437,\n", + " 1199786, 1198819, 1199234, 1201001, 1200974, 1195070, 1201886, 1198140,\n", + " 1197652, 1201808, 1194908, 1201966, 1196428], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195442, 1197226, 1197717, 1199282, 1198458, 1202255, 1198844, 1201582,\n", + " 1202119, 1199248, 1201016, 1198694, 1198546, 1198557, 1197512, 1194743,\n", + " 1194780, 1194783, 1199053, 1195511, 1195922, 1195263, 1199135, 1201992,\n", + " 1198543, 1199519, 1195888, 1199171, 1195740, 1196359, 1197807, 1195571,\n", + " 1198958, 1198646, 1198650, 1198163, 1196717, 1195279, 1195245, 1197273,\n", + " 1194859, 1195850, 1199384, 1195541, 1196283, 1196034, 1199060, 1194928,\n", + " 1199628, 1197990, 1200878, 1198400, 1198410, 1199579, 1199231, 1201908,\n", + " 1198765, 1196496, 1197977, 1201889, 1197601, 1196727, 1200887, 1200892,\n", + " 1200894, 1198811, 1199555, 1201824, 1201827, 1198066, 1199445, 1201079,\n", + " 1201156, 1200913, 1199546, 1202641, 1199712, 1199723, 1201049, 1201052,\n", + " 1200546, 1200553, 1200429, 1197097, 1202541, 1202055, 1199917, 1201442,\n", + " 1201034, 1200831, 1199976, 1195876, 1201291, 1199922, 1200242, 1200398,\n", + " 1196960, 1196966, 1198338, 1200997, 1200784, 1199606, 1194699, 1195679,\n", + " 1200445, 1200276, 1203102, 1201138, 1200003, 1197731, 1197735, 1200437,\n", + " 1199786, 1198819, 1199234, 1201001, 1200974, 1195070, 1201886, 1198140,\n", + " 1197652, 1201808, 1194908, 1201966, 1196428], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 1.2123e-01, 2.2561e-02, 7.0872e-01, ..., 1.5348e-01,\n", + " -2.0622e-03, -4.5803e-03],\n", + " [ 9.0456e-02, 3.9586e-02, 4.7644e-01, ..., 1.5348e-01,\n", + " -1.9690e-03, -3.3386e-03],\n", + " [ 1.1881e-01, 1.0650e-01, 5.6896e-01, ..., 1.6203e-01,\n", + " -1.6057e-03, -3.9764e-03],\n", + " ...,\n", + " [ 1.1204e-01, -8.7632e-05, 4.4628e-01, ..., 7.8640e-02,\n", + " -1.3438e-03, -3.5754e-03],\n", + " [ 1.0758e-01, 8.1110e-02, 5.5243e-01, ..., 1.4873e-01,\n", + " -1.4875e-03, -3.8021e-03],\n", + " [ 1.9635e-01, 2.0944e-02, 7.9077e-01, ..., 1.3242e-01,\n", + " -1.7907e-03, -5.3158e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 7.0131e-01, -3.6628e-03, 1.0389e+00, ..., -6.0191e-03,\n", + " -1.0773e-02, -8.9746e-04],\n", + " [ 1.6596e+00, -9.8609e-04, 3.1419e+00, ..., -3.4709e-03,\n", + " -2.7373e-02, 9.9045e-01],\n", + " [ 8.9519e-01, -1.6882e-03, 8.9895e-01, ..., -6.9233e-03,\n", + " -1.0210e-02, 8.1416e-02],\n", + " ...,\n", + " [ 3.8787e-01, -2.3835e-02, 3.6763e+00, ..., -1.8915e-02,\n", + " -2.6146e-02, -1.4781e-02],\n", + " [ 1.7666e+00, -5.4134e-03, 2.7908e+00, ..., -8.5502e-04,\n", + " -2.2349e-02, 8.8432e-01],\n", + " [ 2.1060e+00, -1.1809e-02, 2.2252e+00, ..., 1.3899e-01,\n", + " -3.6905e-02, 2.7772e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-1.3774e-03, 9.9079e-02, 2.7270e-01, ..., 1.5326e+00,\n", + " -6.3714e-04, 7.3957e-02],\n", + " [-6.8971e-04, 2.3554e-02, 1.5061e-01, ..., 1.4001e-01,\n", + " -2.4980e-04, -8.0816e-04],\n", + " [-6.8971e-04, 2.3554e-02, 1.5061e-01, ..., 1.4001e-01,\n", + " -2.4980e-04, -8.0816e-04],\n", + " ...,\n", + " [-1.5553e-03, 1.0538e-01, 2.3715e-01, ..., 1.3952e+00,\n", + " -9.1861e-04, 9.8272e-02],\n", + " [-1.1710e-03, 1.1931e-01, 2.1049e-01, ..., 1.5464e+00,\n", + " 1.5040e-02, 1.7390e-01],\n", + " [-2.1186e-03, 1.2042e-01, 3.1702e-01, ..., 1.2350e+00,\n", + " -2.7637e-03, -8.1186e-04]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-4.4007e-04, 3.9447e-01, 1.5817e-01, ..., -6.0696e-03,\n", + " 2.1972e-01, 1.2876e-01],\n", + " [ 1.4964e-01, 6.8409e-01, 4.7271e-01, ..., -5.2975e-03,\n", + " 2.3427e-01, -1.0414e-03],\n", + " [-3.3001e-05, 4.2393e-01, 2.4285e-02, ..., -5.3938e-03,\n", + " 3.2358e-01, 8.8539e-02],\n", + " ...,\n", + " [-3.0007e-04, 4.2925e-01, 1.9298e-01, ..., -5.9721e-03,\n", + " 9.3939e-03, 2.3228e-01],\n", + " [-1.0335e-03, 5.9045e-01, 4.5685e-01, ..., -1.0164e-02,\n", + " 2.8636e-01, 3.9017e-01],\n", + " [-8.3029e-04, 4.7312e-01, 2.4143e-01, ..., -5.2789e-03,\n", + " 2.3118e-01, 1.3535e-01]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 150, 135, 135, 23, 135, 330, 386, 476, 262, 304, 327, 327,\n", + " 964, 619, 692, 1000, 1000, 1000, 1000, 1172, 1129, 1097, 1389, 1423,\n", + " 1423, 1535, 1410, 1413, 1535, 1758, 1528, 1528, 1535, 1535, 1535, 1486,\n", + " 1586, 1416, 1416, 1599, 1451, 1823, 1527, 1795, 1795, 1795, 1855, 1855,\n", + " 1855, 1856, 2052, 2193, 2193, 2124, 2343, 2252, 2276, 2276, 2276, 2426,\n", + " 2118, 2118, 2118, 2416, 2439, 2474, 2417, 2327, 2655, 2655, 2472, 2723,\n", + " 2723, 2439, 2518, 2654, 2654, 2633, 2633, 2771, 2667, 2679, 2783, 2946,\n", + " 3102, 3020, 3222, 3222, 3101, 3300, 3254, 3442, 3333, 3333, 3596, 3522,\n", + " 3399, 3426, 3621, 3578, 4024, 3615, 3579, 3785, 3709, 4075, 4076, 4004,\n", + " 4089, 3972, 3991, 4031, 4137, 4137, 4091, 4141, 4141, 4193, 4241, 4449,\n", + " 4476, 4519, 4387, 4578, 4456, 4829, 4635, 4745, 4718, 4516, 4919, 4820,\n", + " 5047, 5039, 5039, 5128, 5140, 5231, 5231, 5093, 5164, 5276, 5369, 5323,\n", + " 5454, 5762, 5750, 5750, 5597, 5511, 5386, 5386, 5386, 5537, 6130, 6592,\n", + " 6186, 6309, 6326, 6156, 6050, 6525, 6500, 6376, 6342, 6442, 6338, 6500,\n", + " 6500, 6500, 6500, 6352, 6552],\n", + " [ 23, 99, 34, 57, 8, 40, 18, 26, 84, 80, 97, 50,\n", + " 114, 102, 5, 124, 73, 44, 61, 37, 122, 61, 26, 6,\n", + " 84, 5, 18, 36, 47, 114, 58, 59, 3, 90, 52, 66,\n", + " 57, 65, 53, 25, 11, 96, 102, 60, 68, 106, 47, 113,\n", + " 43, 84, 64, 33, 85, 81, 18, 115, 110, 94, 54, 21,\n", + " 87, 14, 61, 114, 72, 83, 30, 42, 91, 31, 107, 92,\n", + " 23, 61, 61, 13, 1, 3, 21, 114, 13, 43, 92, 17,\n", + " 42, 3, 77, 119, 16, 63, 45, 2, 92, 105, 99, 110,\n", + " 38, 122, 71, 119, 119, 44, 120, 27, 26, 32, 49, 59,\n", + " 20, 59, 121, 57, 109, 23, 108, 55, 0, 0, 42, 76,\n", + " 51, 86, 12, 104, 82, 114, 69, 22, 118, 29, 24, 13,\n", + " 28, 6, 62, 48, 54, 116, 89, 35, 67, 117, 4, 111,\n", + " 78, 93, 97, 56, 15, 70, 75, 31, 10, 95, 101, 103,\n", + " 9, 23, 100, 74, 9, 61, 85, 112, 46, 7, 41, 79,\n", + " 123, 88, 98, 39, 19]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2032, 3078, 3330, ..., 1393, 5382, 429],\n", + " [ 140, 186, 114, ..., 6062, 6087, 6082]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 122, 28, 91, 122, 122, 66, 69, 102, 92, 18, 66, 102,\n", + " 119, 69, 28, 28, 92, 91, 18, 122, 102, 31, 42, 20,\n", + " 92, 121, 18, 66, 18, 83, 28, 28, 31, 69, 91, 66,\n", + " 42, 102, 18, 121, 83, 28, 42, 83, 28, 42, 83, 83,\n", + " 102, 57, 102, 83, 57, 57, 69, 31, 92, 91, 18, 42,\n", + " 28, 102, 31, 122, 121, 91, 18, 83, 69, 31, 91, 57,\n", + " 42, 69, 18, 57, 122, 31, 69, 92, 122, 31, 102, 83,\n", + " 42, 114, 42, 114, 114, 42, 66, 119, 18, 121, 114, 92,\n", + " 57, 18, 31, 114, 42, 119, 66, 102, 92, 83, 114, 114,\n", + " 31, 122, 114, 102, 31, 28, 57, 92, 66, 18, 119, 114,\n", + " 42, 42, 122, 119, 114, 121, 28, 114, 119, 122, 83, 114,\n", + " 42, 18, 102, 18, 28, 57, 57, 83, 31, 28, 28, 102,\n", + " 57, 28, 42, 119, 102, 91, 69, 69, 114, 18, 20, 119,\n", + " 119, 66, 57, 92, 42, 121, 57, 121, 31, 31, 122, 102,\n", + " 66, 102, 83, 28, 121, 91, 66, 31, 122, 18, 91, 31,\n", + " 92, 18, 66, 18, 18, 121, 57, 122, 122, 18, 122, 119,\n", + " 122, 83, 66, 121, 69, 92, 92, 42, 119, 122, 119, 83,\n", + " 119, 92, 42, 20, 114, 20, 102, 42, 91, 102, 114, 91,\n", + " 121, 69, 31, 114, 91, 119, 91, 57, 102, 83, 18, 66,\n", + " 83, 114, 102, 119, 102, 91, 114, 57, 83, 69, 28, 119,\n", + " 121, 114, 119, 91, 57, 31, 119, 20, 69, 20, 114, 20,\n", + " 121, 121, 66, 92, 69, 20, 121, 31, 92, 42, 119, 66,\n", + " 57, 122, 92, 121, 18, 57, 121, 57, 20, 83, 114, 91,\n", + " 122, 69, 20, 20, 119, 83, 28, 102, 57, 31, 91, 28,\n", + " 57, 28, 92, 83, 31, 121, 92, 83, 66, 57, 122, 66,\n", + " 122, 119, 114, 91, 102, 69, 102, 121, 31, 119, 102, 91,\n", + " 122, 66, 66, 114, 83, 92, 91, 119, 119, 102, 28, 121,\n", + " 57, 42, 121, 31, 91, 42, 92, 28, 122, 42, 92, 91,\n", + " 122, 121, 42, 18, 114, 119, 31, 18, 28, 28, 42, 122,\n", + " 92, 121, 66, 69, 121, 69, 83, 31, 83, 42, 91, 28,\n", + " 18, 66, 28, 66, 121, 69, 31, 69, 69, 66, 69, 66,\n", + " 92, 91, 83, 114, 69, 18, 69, 92, 92, 91, 57, 57,\n", + " 69, 66],\n", + " [ 2, 72, 103, 172, 120, 139, 19, 160, 85, 117, 110, 121,\n", + " 39, 112, 151, 452, 1, 321, 58, 63, 208, 324, 287, 229,\n", + " 353, 11, 404, 380, 254, 835, 351, 393, 275, 397, 618, 315,\n", + " 716, 619, 515, 432, 680, 601, 818, 729, 850, 725, 1113, 833,\n", + " 793, 907, 780, 862, 812, 840, 1111, 1204, 1291, 884, 1138, 1133,\n", + " 1209, 1038, 1176, 1245, 1057, 943, 873, 1235, 1310, 1039, 1272, 1445,\n", + " 1159, 1270, 1211, 1504, 1373, 1512, 1639, 1544, 1435, 1462, 1279, 1567,\n", + " 1368, 1442, 1380, 1455, 1426, 1572, 1534, 1575, 1525, 1771, 1571, 1687,\n", + " 1699, 1768, 1882, 1712, 1662, 1777, 1615, 1766, 1627, 1691, 1787, 1733,\n", + " 1718, 1750, 1945, 1917, 1736, 1779, 1671, 1813, 1818, 1846, 1894, 2002,\n", + " 2020, 1968, 1971, 2120, 1943, 2042, 2089, 2072, 1941, 2227, 2201, 1940,\n", + " 2099, 2007, 2427, 2279, 2191, 2245, 2114, 2287, 2293, 2311, 2295, 2269,\n", + " 2303, 2225, 2223, 2379, 2273, 2359, 2306, 2385, 2376, 2347, 2383, 2333,\n", + " 2660, 2437, 2432, 2425, 2528, 2435, 2361, 2340, 2447, 2490, 2625, 2406,\n", + " 2573, 2572, 2492, 2720, 2507, 2575, 2837, 2457, 2630, 2588, 2742, 2636,\n", + " 2651, 2765, 2695, 2682, 2615, 2714, 2762, 2645, 2914, 3017, 2979, 2980,\n", + " 3030, 2960, 3112, 2911, 3299, 3239, 3077, 3129, 3144, 3175, 3014, 3083,\n", + " 3259, 3354, 3170, 3297, 3261, 3280, 3336, 3266, 3287, 3427, 3141, 3371,\n", + " 3352, 3370, 3432, 3514, 3439, 3466, 3557, 3493, 3494, 3671, 3418, 3898,\n", + " 3622, 3558, 3633, 3744, 3760, 3769, 3764, 3600, 4019, 3599, 3918, 4036,\n", + " 3938, 3986, 3968, 4014, 3672, 4026, 3975, 3771, 3920, 3921, 4085, 4042,\n", + " 4082, 4073, 4078, 4084, 4113, 4089, 4065, 4107, 4115, 4119, 4092, 4093,\n", + " 4147, 4134, 4144, 4148, 4153, 4173, 4169, 4112, 4171, 4152, 4160, 4195,\n", + " 4174, 4218, 4298, 4245, 4288, 4275, 4231, 4302, 4385, 4309, 4526, 4432,\n", + " 4255, 4389, 4419, 4537, 4329, 4401, 4504, 4412, 4305, 4604, 4532, 4344,\n", + " 4448, 4576, 4325, 4855, 4560, 4529, 4600, 4638, 4628, 4554, 4768, 4653,\n", + " 4556, 4759, 4781, 4631, 4614, 4751, 4946, 4739, 4789, 5104, 5041, 4971,\n", + " 4803, 5061, 5174, 4964, 5060, 5143, 5233, 5173, 5232, 5224, 5201, 5206,\n", + " 5337, 5262, 5353, 5556, 5451, 5452, 5448, 5390, 5298, 5600, 5609, 5515,\n", + " 5547, 5712, 5625, 5469, 5370, 5381, 5528, 5311, 5937, 5696, 5578, 5893,\n", + " 5823, 5496, 5953, 5986, 6244, 6005, 5736, 5982, 5944, 6199, 6253, 6028,\n", + " 6045, 6172, 6507, 6184, 6377, 6430, 6144, 6151, 6494, 6549, 6504, 6304,\n", + " 6493, 6471]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 120, 120, 120, ..., 6062, 6062, 6062],\n", + " [ 267, 136, 165, ..., 82, 569, 265]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 40, 342, 267, ..., 128, 569, 293],\n", + " [ 84, 103, 20, ..., 6033, 6065, 6140]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1035, 2139, 1041, ..., 3578, 6123, 2728],\n", + " [ 161, 161, 32, ..., 6503, 6618, 6584]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 126, 126, 126, ..., 6062, 6062, 6062],\n", + " [3493, 3568, 955, ..., 4426, 3122, 5931]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 23, 23, 23, ..., 6579, 6579, 6579],\n", + " [ 58, 1665, 2309, ..., 4652, 4711, 1786]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006284\n", + "sampling 0.00613\n", + "noi time: 0.002697\n", + "get_vertex_data call: 0.035234\n", + "noi group time: 0.003582\n", + "eoi_group_time: 0.015329\n", + "second half: 0.230384\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24182, 24187, 21468, ..., 1120069, 1110069, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24182, 24187, 21468, ..., 1120069, 1110069, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224372, 1219057, 1227414, ..., 1929220, 1931110, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224372, 1219057, 1227414, ..., 1929220, 1931110, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1140282, 1140285, 1135926, 1135160, 1137784, 1137791, 1139698,\n", + " 1141758, 1137506, 1137513, 1138335, 1141251, 1136151, 1136971, 1141443,\n", + " 1146803, 1143615, 1149839, 1139811, 1137271, 1138933, 1138938, 1143372,\n", + " 1139241, 1146646, 1139609, 1139615, 1139958, 1148987, 1150497, 1150506,\n", + " 1150509, 1148576, 1149216, 1142958, 1155689, 1143820, 1147473, 1147483,\n", + " 1147487, 1135992, 1149294, 1135260, 1146995, 1146996, 1153015, 1134694,\n", + " 1134697, 1148337, 1146656, 1146669, 1150193, 1146475, 1136125, 1152664,\n", + " 1138345, 1153217, 1153231, 1147095, 1147094, 1137220, 1150554, 1155018,\n", + " 1155019, 1136268, 1140540, 1138112, 1138116, 1138356, 1140151, 1140159,\n", + " 1134735, 1140020, 1140027, 1135360, 1135367, 1135202, 1135903, 1137798,\n", + " 1141036, 1136297, 1134794, 1134797, 1136519, 1138504, 1137329, 1157103,\n", + " 1137693, 1136619, 1139215, 1144395, 1135408, 1157397, 1152376, 1136662,\n", + " 1137441, 1137472, 1136193, 1136204, 1136942, 1135265, 1156148, 1156149,\n", + " 1148481, 1134841, 1141702, 1135583, 1136111, 1135246, 1138514, 1153094,\n", + " 1137957, 1137959, 1158136, 1154132, 1145132, 1145120, 1135522, 1139684,\n", + " 1139685, 1138305, 1137287, 1138440, 1138445, 1138461, 1154790, 1157188,\n", + " 1137924, 1136594, 1135135, 1158386, 1158390, 1149328, 1135088, 1156603,\n", + " 1156606, 1147112, 1142611, 1160825, 1135359, 1135618, 1156141, 1138185,\n", + " 1145842, 1145843, 1148531, 1150956, 1141533, 1139673, 1138067, 1134992,\n", + " 1139755, 1140193, 1140199, 1158974, 1153543, 1140034, 1140036, 1139078,\n", + " 1139933, 1138648, 1138147, 1146075, 1141985, 1152042, 1152044, 1137734,\n", + " 1137728, 1134922, 1140901, 1134750, 1135549, 1136697, 1141088, 1141098,\n", + " 1149001, 1139898, 1136397, 1143767, 1143224, 1139033, 1149979, 1149982,\n", + " 1146844, 1141695, 1135860, 1135861, 1136632, 1141224, 1139386, 1143667,\n", + " 1143673, 1143677, 1137188, 1145066, 1144237, 1140607, 1141156, 1141159,\n", + " 1138785, 1139495, 1144937, 1134979, 1147850, 1137087, 1144428, 1141821,\n", + " 1143203, 1140166, 1158746, 1158749, 1142713, 1141479, 1138708, 1140102,\n", + " 1140110, 1142913, 1138424, 1143107, 1144442, 1144596, 1136867, 1136864,\n", + " 1145298, 1140885, 1144182, 1137603, 1134827, 1136565, 1158699, 1137844,\n", + " 1161701, 1147153, 1136378, 1149188, 1141365, 1141367, 1153068, 1151119,\n", + " 1141669, 1138292, 1138293, 1144277, 1144279, 1143915, 1143919, 1139510,\n", + " 1139763, 1144992, 1145200, 1140616, 1140619, 1147888, 1139171, 1140976,\n", + " 1140990, 1141565, 1147050, 1147047, 1145873, 1152976, 1160248, 1160251,\n", + " 1135457, 1142555, 1139453, 1139000, 1141925, 1144242, 1141841, 1150689,\n", + " 1140690, 1139405, 1134851, 1134861, 1143845, 1136277, 1146024, 1146129,\n", + " 1146131, 1154327, 1149935, 1139990, 1143293, 1143283, 1143294, 1151134,\n", + " 1148760, 1147282, 1142816, 1142628, 1149372, 1149608, 1149610, 1143051,\n", + " 1136167, 1138922, 1138923, 1136836, 1139304, 1139329, 1141490, 1141496,\n", + " 1141502, 1142149, 1143345, 1144765, 1144611, 1145808, 1145812, 1145813,\n", + " 1144083, 1135876, 1135813, 1146523, 1143954, 1143961, 1143467, 1140488,\n", + " 1143937, 1140816, 1147580, 1147574, 1143798, 1146628, 1146636, 1147521,\n", + " 1140361, 1140360, 1140364, 1143080, 1144219, 1147996, 1147999, 1134899,\n", + " 1139252, 1145462, 1147234, 1147244, 1148704, 1150996, 1141316, 1141327,\n", + " 1141825, 1141836, 1146742, 1148466, 1153701, 1143434, 1149725, 1147025,\n", + " 1147027, 1147024, 1139549, 1158226, 1148355, 1149871, 1154526, 1151644,\n", + " 1145240, 1145750, 1145751, 1146159, 1138638, 1148391, 1151239, 1151240,\n", + " 1151242, 1148210, 1169870, 1152530, 1150445, 1155003, 1154435, 1149791,\n", + " 1144514, 1144526, 1150339, 1152013, 1165253, 1147794, 1151480, 1152023,\n", + " 1152024, 1152027, 1152026, 1154263, 1151041, 1145255, 1134878, 1140566,\n", + " 1149522, 1147019, 1147009, 1147023, 1153159, 1135805, 1158950, 1158955,\n", + " 1141941, 1141949, 1150745, 1144819, 1148740, 1137640, 1153572, 1153574,\n", + " 1147653, 1147654, 1143560, 1149412, 1148288, 1152073, 1137724, 1147866,\n", + " 1154420, 1154424, 1148188, 1152561, 1138202, 1139721, 1146686, 1157968,\n", + " 1157983, 1148720, 1145858, 1149810, 1148204, 1153181, 1154195, 1153124,\n", + " 1153125, 1153192, 1153188, 1153197, 1145106, 1145111, 1150932, 1152867,\n", + " 1152868, 1152878, 1173078, 1150356, 1155088, 1148084, 1147442, 1152581,\n", + " 1135303, 1151906, 1160681, 1148498, 1156894, 1146575, 1146565, 1141420,\n", + " 1150637, 1151352, 1155152, 1149385, 1146975, 1156402, 1146623, 1152407,\n", + " 1154063, 1156320, 1156325, 1153028, 1153038, 1150085, 1145539, 1137746,\n", + " 1146304, 1159974, 1152622, 1140521, 1136401, 1136410, 1149203, 1152753,\n", + " 1152820, 1152826, 1154120, 1154123, 1157839, 1157824, 1152673, 1154638,\n", + " 1151573, 1151617, 1150578, 1150586, 1136134, 1136142, 1151454, 1148914,\n", + " 1148924, 1152951, 1153387, 1144529, 1145952, 1138991, 1152344, 1158423,\n", + " 1156829, 1153311, 1138279, 1157147, 1152296, 1136025, 1136028, 1158704,\n", + " 1156619, 1156622, 1151188, 1152928, 1155779, 1151064, 1154722, 1142777,\n", + " 1143484, 1163489, 1137400, 1137406, 1150159, 1148033, 1148040, 1161205,\n", + " 1149300, 1145656, 1144658, 1144659, 1137048, 1148628, 1158530, 1158540,\n", + " 1148376, 1137458, 1149942, 1155376, 1156720, 1157225, 1157229, 1135434,\n", + " 1158854, 1158916, 1157064, 1157069, 1157071, 1137809, 1150465, 1149052,\n", + " 1135740, 1151788, 1156935, 1153413, 1139525, 1158306, 1158308, 1158311,\n", + " 1153359, 1150130, 1150132, 1154530, 1154528, 1153999, 1150488, 1142755,\n", + " 1151379, 1137910, 1155360, 1155366, 1155375, 1140179, 1155122, 1152527,\n", + " 1157172, 1149321, 1155755, 1151424, 1135406, 1146913, 1158096, 1155667,\n", + " 1155675, 1155628, 1155631, 1154547, 1154550, 1154555, 1155572, 1155576,\n", + " 1158824, 1148836, 1148647, 1155646, 1143263, 1143257, 1154644, 1154250,\n", + " 1154240, 1156711, 1137359, 1143189, 1150371, 1155606, 1155613, 1150987,\n", + " 1155293, 1143517, 1143516, 1159622, 1157928, 1140751, 1159001, 1153776,\n", + " 1153786, 1158192, 1137376, 1137381, 1159116, 1158342, 1145694, 1145684,\n", + " 1145690, 1140913, 1148148, 1150661, 1150671, 1155848, 1158665, 1149145,\n", + " 1159253, 1156085, 1140627, 1140633, 1152209, 1152220, 1156693, 1140374,\n", + " 1156026, 1151091, 1157732, 1144843, 1142466, 1164215, 1155971, 1155975,\n", + " 1158841, 1158846, 1149696, 1149700, 1154600, 1155949, 1159440, 1161305,\n", + " 1136899, 1136896, 1158760, 1158764, 1136494, 1153647, 1159232, 1159241,\n", + " 1147585, 1167445, 1152130, 1157249, 1153808, 1157675, 1134757, 1145477,\n", + " 1140049, 1157813, 1146123, 1146126, 1164514, 1138099, 1138110, 1158256,\n", + " 1158260, 1155521, 1155528, 1161539, 1142487, 1135661, 1164287, 1142663,\n", + " 1142666, 1157747, 1157751, 1159042, 1159052, 1163267, 1158303, 1160563,\n", + " 1162044, 1153052, 1153045, 1184452, 1159738, 1163072, 1167707, 1144158,\n", + " 1164879, 1138393, 1150046, 1149063, 1149070, 1153514, 1153519, 1164857,\n", + " 1146876, 1146873, 1138161, 1164006, 1156795, 1164909, 1163387, 1139593,\n", + " 1139592, 1139281, 1165760, 1136810, 1166073, 1157357, 1159773, 1160178,\n", + " 1158868, 1140643, 1148600, 1148603, 1166813, 1144506, 1156363, 1158643,\n", + " 1159026, 1159029, 1159032, 1163740, 1152247, 1143739, 1158905, 1155588,\n", + " 1151227, 1153933, 1144977, 1144980, 1149015, 1149023, 1147835, 1164580,\n", + " 1152776, 1155053, 1141465, 1147426, 1147427, 1157047, 1159388, 1156737,\n", + " 1156739, 1157967, 1150649, 1171040, 1168750, 1144810, 1144812, 1167251,\n", + " 1140112, 1165718, 1165719, 1142722, 1156293, 1166134, 1180583, 1145728,\n", + " 1163935, 1145222, 1145228, 1167757, 1160232, 1155317, 1171687, 1165154,\n", + " 1144972, 1144973, 1143028, 1143037, 1166053, 1165746, 1170507, 1155911,\n", + " 1148120, 1139357, 1139359, 1147723, 1145900, 1145902, 1153534, 1168659,\n", + " 1143395, 1170980, 1166658, 1167490, 1171279, 1154075, 1154076, 1170767,\n", + " 1170758, 1145674, 1150781, 1149130, 1144676, 1166653, 1155170, 1150515,\n", + " 1156119, 1156118, 1144346, 1144336, 1157534, 1138376, 1153004, 1169154,\n", + " 1169162, 1157331, 1141045, 1141043, 1151678, 1169359, 1154364, 1158623,\n", + " 1158054, 1158060, 1158062, 1159846, 1160035, 1154871, 1155494, 1155502,\n", + " 1160540, 1152353, 1152362, 1152544, 1155932, 1168055, 1149402, 1148667,\n", + " 1148666, 1167017, 1148324, 1148325, 1173307, 1160942, 1154019, 1154027,\n", + " 1152144, 1153751, 1164974, 1159658, 1151210, 1157373, 1147711, 1151850,\n", + " 1151846, 1148128, 1148131, 1170495, 1172521, 1172961, 1162852, 1163027,\n", + " 1166751, 1172932, 1153436, 1166682, 1154148, 1149169, 1149173, 1181225,\n", + " 1186117, 1143279, 1170377, 1168482, 1143420, 1179243, 1156559, 1174333,\n", + " 1181241, 1153141, 1183392, 1161031, 1184232, 1151519, 1178926, 1155260,\n", + " 1155262, 1154717, 1157792, 1157795, 1171623, 1155798, 1155804, 1155796,\n", + " 1180411, 1158249, 1153898, 1153902, 1173818, 1145626, 1172024, 1154840,\n", + " 1180004, 1161068, 1184995, 1149753, 1149755, 1181081, 1153609, 1153612,\n", + " 1187060, 1187940, 1158771, 1161339, 1158512, 1158513, 1182443, 1155892,\n", + " 1155899, 1184310, 1180942, 1168273, 1164798, 1168888, 1168621, 1165151,\n", + " 1182337, 1176989, 1179126, 1161819, 1146161, 1156861, 1166772, 1170349,\n", + " 1147182, 1156162, 1170034, 1156539, 1139828, 1139831, 1154812, 1164686,\n", + " 1151288, 1156055, 1170010, 1173019, 1182750, 1169964, 1189156, 1174728,\n", + " 1179852, 1187692, 1151774, 1190032, 1191864, 1171458, 1152117, 1191615,\n", + " 1162502, 1175349, 1150406, 1172978, 1167094, 1172122, 1158064, 1158071,\n", + " 1182828, 1166797, 1145395, 1178135, 1174606, 1155958, 1155959, 1155960,\n", + " 1178305, 1187149, 1193831, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1140282, 1140285, 1135926, 1135160, 1137784, 1137791, 1139698,\n", + " 1141758, 1137506, 1137513, 1138335, 1141251, 1136151, 1136971, 1141443,\n", + " 1146803, 1143615, 1149839, 1139811, 1137271, 1138933, 1138938, 1143372,\n", + " 1139241, 1146646, 1139609, 1139615, 1139958, 1148987, 1150497, 1150506,\n", + " 1150509, 1148576, 1149216, 1142958, 1155689, 1143820, 1147473, 1147483,\n", + " 1147487, 1135992, 1149294, 1135260, 1146995, 1146996, 1153015, 1134694,\n", + " 1134697, 1148337, 1146656, 1146669, 1150193, 1146475, 1136125, 1152664,\n", + " 1138345, 1153217, 1153231, 1147095, 1147094, 1137220, 1150554, 1155018,\n", + " 1155019, 1136268, 1140540, 1138112, 1138116, 1138356, 1140151, 1140159,\n", + " 1134735, 1140020, 1140027, 1135360, 1135367, 1135202, 1135903, 1137798,\n", + " 1141036, 1136297, 1134794, 1134797, 1136519, 1138504, 1137329, 1157103,\n", + " 1137693, 1136619, 1139215, 1144395, 1135408, 1157397, 1152376, 1136662,\n", + " 1137441, 1137472, 1136193, 1136204, 1136942, 1135265, 1156148, 1156149,\n", + " 1148481, 1134841, 1141702, 1135583, 1136111, 1135246, 1138514, 1153094,\n", + " 1137957, 1137959, 1158136, 1154132, 1145132, 1145120, 1135522, 1139684,\n", + " 1139685, 1138305, 1137287, 1138440, 1138445, 1138461, 1154790, 1157188,\n", + " 1137924, 1136594, 1135135, 1158386, 1158390, 1149328, 1135088, 1156603,\n", + " 1156606, 1147112, 1142611, 1160825, 1135359, 1135618, 1156141, 1138185,\n", + " 1145842, 1145843, 1148531, 1150956, 1141533, 1139673, 1138067, 1134992,\n", + " 1139755, 1140193, 1140199, 1158974, 1153543, 1140034, 1140036, 1139078,\n", + " 1139933, 1138648, 1138147, 1146075, 1141985, 1152042, 1152044, 1137734,\n", + " 1137728, 1134922, 1140901, 1134750, 1135549, 1136697, 1141088, 1141098,\n", + " 1149001, 1139898, 1136397, 1143767, 1143224, 1139033, 1149979, 1149982,\n", + " 1146844, 1141695, 1135860, 1135861, 1136632, 1141224, 1139386, 1143667,\n", + " 1143673, 1143677, 1137188, 1145066, 1144237, 1140607, 1141156, 1141159,\n", + " 1138785, 1139495, 1144937, 1134979, 1147850, 1137087, 1144428, 1141821,\n", + " 1143203, 1140166, 1158746, 1158749, 1142713, 1141479, 1138708, 1140102,\n", + " 1140110, 1142913, 1138424, 1143107, 1144442, 1144596, 1136867, 1136864,\n", + " 1145298, 1140885, 1144182, 1137603, 1134827, 1136565, 1158699, 1137844,\n", + " 1161701, 1147153, 1136378, 1149188, 1141365, 1141367, 1153068, 1151119,\n", + " 1141669, 1138292, 1138293, 1144277, 1144279, 1143915, 1143919, 1139510,\n", + " 1139763, 1144992, 1145200, 1140616, 1140619, 1147888, 1139171, 1140976,\n", + " 1140990, 1141565, 1147050, 1147047, 1145873, 1152976, 1160248, 1160251,\n", + " 1135457, 1142555, 1139453, 1139000, 1141925, 1144242, 1141841, 1150689,\n", + " 1140690, 1139405, 1134851, 1134861, 1143845, 1136277, 1146024, 1146129,\n", + " 1146131, 1154327, 1149935, 1139990, 1143293, 1143283, 1143294, 1151134,\n", + " 1148760, 1147282, 1142816, 1142628, 1149372, 1149608, 1149610, 1143051,\n", + " 1136167, 1138922, 1138923, 1136836, 1139304, 1139329, 1141490, 1141496,\n", + " 1141502, 1142149, 1143345, 1144765, 1144611, 1145808, 1145812, 1145813,\n", + " 1144083, 1135876, 1135813, 1146523, 1143954, 1143961, 1143467, 1140488,\n", + " 1143937, 1140816, 1147580, 1147574, 1143798, 1146628, 1146636, 1147521,\n", + " 1140361, 1140360, 1140364, 1143080, 1144219, 1147996, 1147999, 1134899,\n", + " 1139252, 1145462, 1147234, 1147244, 1148704, 1150996, 1141316, 1141327,\n", + " 1141825, 1141836, 1146742, 1148466, 1153701, 1143434, 1149725, 1147025,\n", + " 1147027, 1147024, 1139549, 1158226, 1148355, 1149871, 1154526, 1151644,\n", + " 1145240, 1145750, 1145751, 1146159, 1138638, 1148391, 1151239, 1151240,\n", + " 1151242, 1148210, 1169870, 1152530, 1150445, 1155003, 1154435, 1149791,\n", + " 1144514, 1144526, 1150339, 1152013, 1165253, 1147794, 1151480, 1152023,\n", + " 1152024, 1152027, 1152026, 1154263, 1151041, 1145255, 1134878, 1140566,\n", + " 1149522, 1147019, 1147009, 1147023, 1153159, 1135805, 1158950, 1158955,\n", + " 1141941, 1141949, 1150745, 1144819, 1148740, 1137640, 1153572, 1153574,\n", + " 1147653, 1147654, 1143560, 1149412, 1148288, 1152073, 1137724, 1147866,\n", + " 1154420, 1154424, 1148188, 1152561, 1138202, 1139721, 1146686, 1157968,\n", + " 1157983, 1148720, 1145858, 1149810, 1148204, 1153181, 1154195, 1153124,\n", + " 1153125, 1153192, 1153188, 1153197, 1145106, 1145111, 1150932, 1152867,\n", + " 1152868, 1152878, 1173078, 1150356, 1155088, 1148084, 1147442, 1152581,\n", + " 1135303, 1151906, 1160681, 1148498, 1156894, 1146575, 1146565, 1141420,\n", + " 1150637, 1151352, 1155152, 1149385, 1146975, 1156402, 1146623, 1152407,\n", + " 1154063, 1156320, 1156325, 1153028, 1153038, 1150085, 1145539, 1137746,\n", + " 1146304, 1159974, 1152622, 1140521, 1136401, 1136410, 1149203, 1152753,\n", + " 1152820, 1152826, 1154120, 1154123, 1157839, 1157824, 1152673, 1154638,\n", + " 1151573, 1151617, 1150578, 1150586, 1136134, 1136142, 1151454, 1148914,\n", + " 1148924, 1152951, 1153387, 1144529, 1145952, 1138991, 1152344, 1158423,\n", + " 1156829, 1153311, 1138279, 1157147, 1152296, 1136025, 1136028, 1158704,\n", + " 1156619, 1156622, 1151188, 1152928, 1155779, 1151064, 1154722, 1142777,\n", + " 1143484, 1163489, 1137400, 1137406, 1150159, 1148033, 1148040, 1161205,\n", + " 1149300, 1145656, 1144658, 1144659, 1137048, 1148628, 1158530, 1158540,\n", + " 1148376, 1137458, 1149942, 1155376, 1156720, 1157225, 1157229, 1135434,\n", + " 1158854, 1158916, 1157064, 1157069, 1157071, 1137809, 1150465, 1149052,\n", + " 1135740, 1151788, 1156935, 1153413, 1139525, 1158306, 1158308, 1158311,\n", + " 1153359, 1150130, 1150132, 1154530, 1154528, 1153999, 1150488, 1142755,\n", + " 1151379, 1137910, 1155360, 1155366, 1155375, 1140179, 1155122, 1152527,\n", + " 1157172, 1149321, 1155755, 1151424, 1135406, 1146913, 1158096, 1155667,\n", + " 1155675, 1155628, 1155631, 1154547, 1154550, 1154555, 1155572, 1155576,\n", + " 1158824, 1148836, 1148647, 1155646, 1143263, 1143257, 1154644, 1154250,\n", + " 1154240, 1156711, 1137359, 1143189, 1150371, 1155606, 1155613, 1150987,\n", + " 1155293, 1143517, 1143516, 1159622, 1157928, 1140751, 1159001, 1153776,\n", + " 1153786, 1158192, 1137376, 1137381, 1159116, 1158342, 1145694, 1145684,\n", + " 1145690, 1140913, 1148148, 1150661, 1150671, 1155848, 1158665, 1149145,\n", + " 1159253, 1156085, 1140627, 1140633, 1152209, 1152220, 1156693, 1140374,\n", + " 1156026, 1151091, 1157732, 1144843, 1142466, 1164215, 1155971, 1155975,\n", + " 1158841, 1158846, 1149696, 1149700, 1154600, 1155949, 1159440, 1161305,\n", + " 1136899, 1136896, 1158760, 1158764, 1136494, 1153647, 1159232, 1159241,\n", + " 1147585, 1167445, 1152130, 1157249, 1153808, 1157675, 1134757, 1145477,\n", + " 1140049, 1157813, 1146123, 1146126, 1164514, 1138099, 1138110, 1158256,\n", + " 1158260, 1155521, 1155528, 1161539, 1142487, 1135661, 1164287, 1142663,\n", + " 1142666, 1157747, 1157751, 1159042, 1159052, 1163267, 1158303, 1160563,\n", + " 1162044, 1153052, 1153045, 1184452, 1159738, 1163072, 1167707, 1144158,\n", + " 1164879, 1138393, 1150046, 1149063, 1149070, 1153514, 1153519, 1164857,\n", + " 1146876, 1146873, 1138161, 1164006, 1156795, 1164909, 1163387, 1139593,\n", + " 1139592, 1139281, 1165760, 1136810, 1166073, 1157357, 1159773, 1160178,\n", + " 1158868, 1140643, 1148600, 1148603, 1166813, 1144506, 1156363, 1158643,\n", + " 1159026, 1159029, 1159032, 1163740, 1152247, 1143739, 1158905, 1155588,\n", + " 1151227, 1153933, 1144977, 1144980, 1149015, 1149023, 1147835, 1164580,\n", + " 1152776, 1155053, 1141465, 1147426, 1147427, 1157047, 1159388, 1156737,\n", + " 1156739, 1157967, 1150649, 1171040, 1168750, 1144810, 1144812, 1167251,\n", + " 1140112, 1165718, 1165719, 1142722, 1156293, 1166134, 1180583, 1145728,\n", + " 1163935, 1145222, 1145228, 1167757, 1160232, 1155317, 1171687, 1165154,\n", + " 1144972, 1144973, 1143028, 1143037, 1166053, 1165746, 1170507, 1155911,\n", + " 1148120, 1139357, 1139359, 1147723, 1145900, 1145902, 1153534, 1168659,\n", + " 1143395, 1170980, 1166658, 1167490, 1171279, 1154075, 1154076, 1170767,\n", + " 1170758, 1145674, 1150781, 1149130, 1144676, 1166653, 1155170, 1150515,\n", + " 1156119, 1156118, 1144346, 1144336, 1157534, 1138376, 1153004, 1169154,\n", + " 1169162, 1157331, 1141045, 1141043, 1151678, 1169359, 1154364, 1158623,\n", + " 1158054, 1158060, 1158062, 1159846, 1160035, 1154871, 1155494, 1155502,\n", + " 1160540, 1152353, 1152362, 1152544, 1155932, 1168055, 1149402, 1148667,\n", + " 1148666, 1167017, 1148324, 1148325, 1173307, 1160942, 1154019, 1154027,\n", + " 1152144, 1153751, 1164974, 1159658, 1151210, 1157373, 1147711, 1151850,\n", + " 1151846, 1148128, 1148131, 1170495, 1172521, 1172961, 1162852, 1163027,\n", + " 1166751, 1172932, 1153436, 1166682, 1154148, 1149169, 1149173, 1181225,\n", + " 1186117, 1143279, 1170377, 1168482, 1143420, 1179243, 1156559, 1174333,\n", + " 1181241, 1153141, 1183392, 1161031, 1184232, 1151519, 1178926, 1155260,\n", + " 1155262, 1154717, 1157792, 1157795, 1171623, 1155798, 1155804, 1155796,\n", + " 1180411, 1158249, 1153898, 1153902, 1173818, 1145626, 1172024, 1154840,\n", + " 1180004, 1161068, 1184995, 1149753, 1149755, 1181081, 1153609, 1153612,\n", + " 1187060, 1187940, 1158771, 1161339, 1158512, 1158513, 1182443, 1155892,\n", + " 1155899, 1184310, 1180942, 1168273, 1164798, 1168888, 1168621, 1165151,\n", + " 1182337, 1176989, 1179126, 1161819, 1146161, 1156861, 1166772, 1170349,\n", + " 1147182, 1156162, 1170034, 1156539, 1139828, 1139831, 1154812, 1164686,\n", + " 1151288, 1156055, 1170010, 1173019, 1182750, 1169964, 1189156, 1174728,\n", + " 1179852, 1187692, 1151774, 1190032, 1191864, 1171458, 1152117, 1191615,\n", + " 1162502, 1175349, 1150406, 1172978, 1167094, 1172122, 1158064, 1158071,\n", + " 1182828, 1166797, 1145395, 1178135, 1174606, 1155958, 1155959, 1155960,\n", + " 1178305, 1187149, 1193831, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199428, 1198244, 1198248, 1197719, 1199282, 1199293, 1198449, 1202255,\n", + " 1199263, 1198633, 1197383, 1197389, 1194770, 1194783, 1195494, 1196631,\n", + " 1195511, 1195514, 1195263, 1197924, 1201992, 1195187, 1196028, 1198534,\n", + " 1194952, 1201269, 1196148, 1195740, 1196977, 1195325, 1195982, 1196711,\n", + " 1199810, 1195216, 1195265, 1195278, 1197136, 1197273, 1194859, 1196742,\n", + " 1195844, 1196122, 1199998, 1197640, 1196393, 1198273, 1198280, 1198284,\n", + " 1200949, 1196851, 1194928, 1199628, 1197990, 1198404, 1199579, 1201904,\n", + " 1194795, 1201511, 1197601, 1197609, 1201116, 1201117, 1196727, 1195773,\n", + " 1202616, 1203239, 1203246, 1198428, 1199421, 1198811, 1200452, 1200562,\n", + " 1200570, 1199445, 1201421, 1201156, 1202627, 1202635, 1200913, 1201041,\n", + " 1201052, 1201358, 1201737, 1200267, 1200546, 1200553, 1200555, 1200310,\n", + " 1200832, 1203071, 1200429, 1202138, 1201442, 1202239, 1202338, 1202337,\n", + " 1202175, 1202706, 1201291, 1198478, 1198466, 1195611, 1203329, 1201590,\n", + " 1201800, 1196966, 1198338, 1200784, 1200793, 1199606, 1195676, 1195679,\n", + " 1195664, 1196929, 1195177, 1196414, 1197492, 1198299, 1196382, 1194730,\n", + " 1198148, 1198824, 1196799, 1200011, 1200974, 1195066, 1198131, 1200296,\n", + " 1197652, 1201966, 1198751], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199428, 1198244, 1198248, 1197719, 1199282, 1199293, 1198449, 1202255,\n", + " 1199263, 1198633, 1197383, 1197389, 1194770, 1194783, 1195494, 1196631,\n", + " 1195511, 1195514, 1195263, 1197924, 1201992, 1195187, 1196028, 1198534,\n", + " 1194952, 1201269, 1196148, 1195740, 1196977, 1195325, 1195982, 1196711,\n", + " 1199810, 1195216, 1195265, 1195278, 1197136, 1197273, 1194859, 1196742,\n", + " 1195844, 1196122, 1199998, 1197640, 1196393, 1198273, 1198280, 1198284,\n", + " 1200949, 1196851, 1194928, 1199628, 1197990, 1198404, 1199579, 1201904,\n", + " 1194795, 1201511, 1197601, 1197609, 1201116, 1201117, 1196727, 1195773,\n", + " 1202616, 1203239, 1203246, 1198428, 1199421, 1198811, 1200452, 1200562,\n", + " 1200570, 1199445, 1201421, 1201156, 1202627, 1202635, 1200913, 1201041,\n", + " 1201052, 1201358, 1201737, 1200267, 1200546, 1200553, 1200555, 1200310,\n", + " 1200832, 1203071, 1200429, 1202138, 1201442, 1202239, 1202338, 1202337,\n", + " 1202175, 1202706, 1201291, 1198478, 1198466, 1195611, 1203329, 1201590,\n", + " 1201800, 1196966, 1198338, 1200784, 1200793, 1199606, 1195676, 1195679,\n", + " 1195664, 1196929, 1195177, 1196414, 1197492, 1198299, 1196382, 1194730,\n", + " 1198148, 1198824, 1196799, 1200011, 1200974, 1195066, 1198131, 1200296,\n", + " 1197652, 1201966, 1198751], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.6278e-01, 1.5273e-01, 6.8938e-01, ..., 1.6938e-01,\n", + " -1.3936e-03, -4.4709e-03],\n", + " [ 1.9688e-01, 3.1807e-02, 8.2684e-01, ..., 1.3114e-01,\n", + " -1.8194e-03, -5.4645e-03],\n", + " [ 1.0576e-01, 1.1030e-02, 6.6974e-01, ..., 1.3299e-01,\n", + " -1.7182e-03, -4.0458e-03],\n", + " ...,\n", + " [ 2.3108e-01, 3.1190e-02, 8.8761e-01, ..., 1.4028e-01,\n", + " -2.0021e-03, -5.7491e-03],\n", + " [ 1.2285e-01, 8.8184e-02, 6.1047e-01, ..., 1.4952e-01,\n", + " -1.6002e-03, -4.0662e-03],\n", + " [ 2.1131e-01, -3.0104e-04, 1.0015e+00, ..., 1.2942e-01,\n", + " -1.6842e-03, -6.7769e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 3.5235e-01, 3.6682e-01, 2.2927e+00, ..., -4.9724e-03,\n", + " -1.3277e-02, -1.0449e-02],\n", + " [ 4.4020e-01, -9.5219e-03, 2.4183e+00, ..., -4.2398e-03,\n", + " -1.2606e-02, -8.0900e-03],\n", + " [ 2.4816e-01, -1.1519e-02, 3.8475e+00, ..., -1.3765e-02,\n", + " -2.4420e-02, -1.5095e-02],\n", + " ...,\n", + " [ 3.7603e-01, 6.3379e-01, 2.2409e+00, ..., -4.8837e-03,\n", + " -1.1671e-02, -9.4452e-03],\n", + " [ 6.3506e-01, 4.3525e-03, 2.2296e+00, ..., -3.4781e-03,\n", + " -1.2059e-02, -6.3547e-03],\n", + " [ 1.9313e+00, -1.1448e-02, 2.4036e+00, ..., 2.6285e-01,\n", + " -3.8235e-02, 2.4092e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-7.0935e-04, 2.7669e-02, 1.4767e-01, ..., 1.5002e-01,\n", + " -2.3385e-04, -7.9306e-04],\n", + " [-1.5914e-03, 1.1715e-01, 3.5174e-01, ..., 1.7132e+00,\n", + " -4.9365e-05, 6.8517e-02],\n", + " [-6.4047e-03, 3.3914e-01, 2.3016e-01, ..., 1.3029e+00,\n", + " -2.6914e-03, -4.5064e-03],\n", + " ...,\n", + " [-1.4221e-03, 1.9393e-01, 2.5604e-01, ..., 1.6106e+00,\n", + " -1.1966e-03, 5.7849e-02],\n", + " [-1.3104e-03, 1.6172e-01, 2.4747e-01, ..., 1.6537e+00,\n", + " -4.6671e-04, 1.1315e-01],\n", + " [-1.9040e-03, 1.6354e-01, 2.8448e-01, ..., 1.4973e+00,\n", + " -4.0419e-04, 6.1494e-02]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-7.6462e-04, 4.3556e-01, 1.9867e-01, ..., -6.9942e-03,\n", + " 2.2426e-01, 2.3096e-01],\n", + " [ 9.6755e-02, 6.1741e-01, 3.6714e-01, ..., -5.4598e-03,\n", + " 1.9986e-01, 2.6375e-02],\n", + " [ 1.6354e-01, 8.1526e-01, 4.4791e-01, ..., -7.6192e-03,\n", + " 3.8674e-01, -6.2358e-04],\n", + " ...,\n", + " [ 1.3290e-01, 6.1777e-01, 3.8182e-01, ..., -5.3589e-03,\n", + " 2.2239e-01, 2.7877e-02],\n", + " [ 1.7274e-02, 6.4933e-01, 3.0484e-01, ..., -7.2263e-03,\n", + " 3.8361e-01, 6.3407e-02],\n", + " [ 1.3980e-01, 6.1383e-01, 4.3469e-01, ..., -5.5385e-03,\n", + " 2.0022e-01, -3.4343e-04]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 45, 45, 63, 2, 73, 73, 73, 73, 73, 149, 275, 398,\n", + " 262, 550, 586, 551, 836, 352, 352, 580, 601, 798, 814, 902,\n", + " 1011, 1161, 1161, 880, 880, 851, 709, 709, 709, 1169, 1111, 1185,\n", + " 1132, 1132, 1138, 1374, 1374, 1370, 1150, 1218, 1346, 1337, 1337, 1337,\n", + " 1337, 1420, 1420, 1405, 1342, 1566, 1405, 1405, 1345, 1590, 1534, 1561,\n", + " 1557, 1577, 1699, 1860, 1810, 1924, 1788, 1894, 1943, 1915, 1915, 1915,\n", + " 1958, 1898, 1983, 2215, 2215, 2243, 2185, 2041, 2041, 2041, 2044, 2155,\n", + " 2237, 2237, 2310, 2310, 2440, 2310, 2310, 2365, 2422, 2356, 2356, 2356,\n", + " 2356, 2356, 2414, 2505, 2591, 2529, 2571, 2571, 2571, 2753, 2605, 2776,\n", + " 2907, 2873, 2873, 2907, 2907, 2907, 2907, 2859, 3007, 2826, 2769, 2769,\n", + " 2973, 3032, 3032, 2977, 3100, 3130, 3130, 3280, 3280, 3326, 3360, 3353,\n", + " 3491, 3491, 3491, 3491, 3480, 3507, 3653, 3540, 3528, 3528, 3455, 3644,\n", + " 3657, 3551, 3614, 3675, 3680, 3731, 3790, 3819, 3803, 3811, 4043, 4043,\n", + " 4043, 4143, 4165, 4297, 4297, 4297, 4094, 4269, 4228, 4367, 4356, 4441,\n", + " 4441, 4542, 4465, 4396, 4637, 4421, 4315, 4315, 4315, 4357, 4614, 4616,\n", + " 4681, 4583, 4666, 4666, 4776, 4991, 5020, 4794, 5137, 5279, 5198, 5198,\n", + " 5047, 5420, 5347, 5246, 5236, 5355, 5271, 5318, 5364, 5395, 5383, 5234,\n", + " 5234, 5410, 5410, 5428, 5428, 5428],\n", + " [ 24, 39, 93, 93, 24, 23, 39, 61, 81, 120, 25, 4,\n", + " 34, 93, 76, 112, 93, 46, 34, 57, 85, 101, 62, 27,\n", + " 80, 124, 126, 45, 80, 24, 118, 77, 78, 107, 93, 64,\n", + " 34, 93, 121, 9, 65, 56, 35, 64, 15, 97, 53, 82,\n", + " 50, 20, 33, 79, 76, 57, 125, 3, 123, 129, 4, 3,\n", + " 41, 35, 98, 64, 47, 87, 71, 120, 3, 8, 104, 91,\n", + " 62, 47, 35, 52, 51, 19, 31, 31, 17, 95, 42, 47,\n", + " 12, 84, 75, 89, 93, 70, 0, 24, 24, 30, 31, 95,\n", + " 99, 43, 62, 48, 74, 71, 96, 128, 62, 64, 92, 120,\n", + " 94, 108, 60, 17, 99, 11, 21, 51, 26, 56, 58, 16,\n", + " 1, 113, 76, 19, 3, 4, 38, 34, 93, 127, 55, 4,\n", + " 83, 114, 123, 32, 93, 59, 17, 14, 84, 12, 62, 14,\n", + " 26, 5, 100, 112, 40, 2, 105, 62, 35, 74, 67, 4,\n", + " 111, 10, 62, 84, 12, 116, 49, 117, 107, 36, 77, 51,\n", + " 85, 6, 73, 28, 106, 37, 54, 66, 69, 73, 41, 33,\n", + " 7, 115, 122, 88, 18, 109, 69, 78, 110, 93, 103, 62,\n", + " 57, 62, 119, 90, 32, 86, 29, 3, 119, 20, 13, 102,\n", + " 63, 68, 72, 22, 130, 44]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1667, 3010, 4042, ..., 4340, 4489, 1567],\n", + " [ 4, 14, 145, ..., 8202, 8273, 8283]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 91, 19, 85, ..., 34, 12, 41],\n", + " [ 184, 128, 93, ..., 5435, 5376, 5442]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 346, 145, 145, ..., 8273, 8273, 8273],\n", + " [ 289, 92, 10, ..., 433, 738, 533]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 671, 691, 458, ..., 462, 414, 585],\n", + " [ 136, 114, 306, ..., 8241, 8292, 8281]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1889, 753, 212, ..., 8217, 8203, 2583],\n", + " [ 105, 73, 73, ..., 5467, 5382, 5452]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 145, 145, 145, ..., 8273, 8273, 8273],\n", + " [4197, 4042, 934, ..., 4963, 1370, 2627]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 73, 45, 45, ..., 5421, 5395, 5383],\n", + " [7388, 252, 1278, ..., 6531, 7921, 7921]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006717\n", + "sampling 0.006559\n", + "noi time: 0.002856\n", + "get_vertex_data call: 0.03266\n", + "noi group time: 0.00352\n", + "eoi_group_time: 0.016253\n", + "second half: 0.221699\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 23828, 24180, 17409, ..., 1124620, 1132728, 1128785],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 23828, 24180, 17409, ..., 1124620, 1132728, 1128785],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1209525, 1210591, 1203800, ..., 1935118, 1937004, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1209525, 1210591, 1203800, ..., 1935118, 1937004, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137426, 1137429, 1141424, 1140282, 1140284, 1135716, 1135726, 1137791,\n", + " 1140799, 1141758, 1138328, 1138335, 1136223, 1136215, 1141251, 1139462,\n", + " 1138897, 1143600, 1143615, 1139820, 1139811, 1145366, 1137936, 1139141,\n", + " 1143372, 1139243, 1146640, 1146646, 1139615, 1140773, 1148983, 1150509,\n", + " 1145281, 1139866, 1135376, 1149216, 1149217, 1149228, 1155683, 1155689,\n", + " 1149646, 1147477, 1152270, 1144636, 1135111, 1152666, 1153231, 1147094,\n", + " 1147102, 1137220, 1150555, 1136685, 1150329, 1134718, 1146371, 1134807,\n", + " 1138739, 1140304, 1140313, 1151546, 1140540, 1138112, 1140020, 1140953,\n", + " 1135367, 1135202, 1154739, 1141036, 1136777, 1134794, 1135967, 1138504,\n", + " 1137329, 1137693, 1136619, 1136622, 1144395, 1137534, 1157399, 1157397,\n", + " 1137441, 1136942, 1156159, 1139161, 1134841, 1134843, 1135583, 1142595,\n", + " 1141086, 1156342, 1138514, 1156909, 1135522, 1135532, 1137286, 1136352,\n", + " 1138436, 1138440, 1138461, 1137924, 1136594, 1154101, 1158390, 1149328,\n", + " 1135098, 1156606, 1147106, 1142611, 1160819, 1135359, 1135625, 1156137,\n", + " 1138185, 1145843, 1150956, 1139844, 1141523, 1143584, 1138067, 1142255,\n", + " 1134992, 1152651, 1135782, 1159009, 1141070, 1144410, 1153544, 1139929,\n", + " 1138646, 1138648, 1138148, 1141966, 1142238, 1146075, 1152044, 1139064,\n", + " 1137734, 1137728, 1140901, 1134742, 1134750, 1136697, 1141088, 1141094,\n", + " 1141097, 1141098, 1144138, 1139889, 1141980, 1139632, 1136384, 1136392,\n", + " 1137299, 1140003, 1149982, 1146834, 1152709, 1142347, 1135860, 1136631,\n", + " 1136637, 1161173, 1141111, 1142932, 1163303, 1136917, 1139731, 1143667,\n", + " 1143673, 1143678, 1137188, 1144237, 1140592, 1141155, 1152731, 1136760,\n", + " 1144650, 1144641, 1134987, 1136848, 1136852, 1147845, 1148069, 1139268,\n", + " 1153670, 1142093, 1140169, 1158749, 1138476, 1138478, 1137761, 1139190,\n", + " 1139194, 1141479, 1137058, 1137060, 1138708, 1142924, 1138424, 1143107,\n", + " 1144596, 1136867, 1136864, 1145298, 1144182, 1143752, 1137364, 1136562,\n", + " 1139559, 1158703, 1140501, 1137841, 1147153, 1147163, 1136369, 1136375,\n", + " 1136378, 1162811, 1141365, 1141720, 1141678, 1139510, 1139760, 1139763,\n", + " 1140089, 1144997, 1145001, 1145200, 1145213, 1143789, 1139171, 1140976,\n", + " 1140990, 1146693, 1146695, 1141560, 1147050, 1143551, 1152976, 1139000,\n", + " 1141925, 1146898, 1144242, 1145337, 1150250, 1150696, 1139405, 1145974,\n", + " 1144073, 1143851, 1146013, 1146004, 1146024, 1138085, 1142533, 1149928,\n", + " 1139990, 1146293, 1146302, 1143293, 1143294, 1151124, 1147540, 1148763,\n", + " 1147282, 1142816, 1136330, 1149165, 1140341, 1143649, 1142628, 1149366,\n", + " 1136160, 1142584, 1138922, 1157720, 1136836, 1139297, 1141496, 1142149,\n", + " 1142159, 1143345, 1143349, 1140844, 1140845, 1144083, 1144088, 1135876,\n", + " 1150756, 1135818, 1144375, 1146514, 1146523, 1138024, 1143456, 1143457,\n", + " 1144291, 1144303, 1143949, 1140817, 1147574, 1149082, 1143798, 1143799,\n", + " 1146636, 1140364, 1149582, 1143085, 1143075, 1144219, 1147995, 1147999,\n", + " 1146949, 1134899, 1134902, 1139249, 1147234, 1148704, 1148715, 1146749,\n", + " 1146742, 1148466, 1148468, 1149722, 1147027, 1143829, 1147981, 1139549,\n", + " 1158225, 1158226, 1158230, 1150452, 1143921, 1145240, 1142378, 1146159,\n", + " 1138626, 1138638, 1146178, 1151242, 1151179, 1147954, 1144514, 1141349,\n", + " 1152013, 1151994, 1147796, 1151475, 1152022, 1152023, 1145259, 1139919,\n", + " 1150127, 1153959, 1158949, 1141949, 1141269, 1148740, 1148745, 1147653,\n", + " 1143552, 1143567, 1149416, 1148294, 1137724, 1147866, 1151412, 1154430,\n", + " 1154420, 1148180, 1152561, 1136251, 1146682, 1146684, 1152439, 1157983,\n", + " 1148720, 1148724, 1148734, 1149816, 1148204, 1171943, 1154203, 1154168,\n", + " 1153124, 1153188, 1153197, 1145104, 1150935, 1152867, 1144849, 1150352,\n", + " 1150356, 1155088, 1148084, 1143134, 1141017, 1152581, 1135303, 1150708,\n", + " 1148505, 1141420, 1136012, 1147737, 1146265, 1148949, 1150208, 1146623,\n", + " 1151402, 1152849, 1152098, 1152100, 1153032, 1153036, 1153038, 1137746,\n", + " 1137756, 1146307, 1152622, 1140521, 1157107, 1152826, 1155337, 1154123,\n", + " 1154638, 1151580, 1151617, 1151623, 1150578, 1136132, 1151440, 1152958,\n", + " 1138982, 1151298, 1152341, 1156816, 1153311, 1138283, 1138281, 1152294,\n", + " 1156007, 1156005, 1136028, 1136029, 1158704, 1151195, 1140682, 1140687,\n", + " 1152928, 1152888, 1143486, 1156422, 1150110, 1150164, 1148033, 1148035,\n", + " 1148040, 1144657, 1137048, 1158470, 1148628, 1158530, 1158537, 1169170,\n", + " 1137458, 1153072, 1135434, 1143448, 1142387, 1158916, 1158927, 1156500,\n", + " 1157064, 1155412, 1152841, 1137814, 1151257, 1150468, 1156629, 1158308,\n", + " 1158311, 1151271, 1155441, 1150129, 1150130, 1138573, 1154528, 1145770,\n", + " 1150484, 1142766, 1142758, 1151379, 1155122, 1152527, 1157172, 1155755,\n", + " 1135396, 1146920, 1156452, 1156460, 1158096, 1158097, 1154763, 1155670,\n", + " 1155626, 1155575, 1155576, 1136476, 1158566, 1158824, 1158325, 1143263,\n", + " 1146935, 1161794, 1154243, 1160907, 1150371, 1153325, 1155613, 1141627,\n", + " 1143518, 1159629, 1159630, 1137152, 1158123, 1158996, 1153776, 1153786,\n", + " 1137316, 1135601, 1158665, 1138216, 1144451, 1152220, 1159213, 1140380,\n", + " 1157732, 1157735, 1144843, 1164215, 1155971, 1155975, 1153765, 1161676,\n", + " 1142070, 1156804, 1149696, 1154592, 1160163, 1160164, 1136896, 1158760,\n", + " 1158764, 1159164, 1155246, 1151615, 1136494, 1156490, 1136646, 1134757,\n", + " 1157858, 1158547, 1153827, 1146123, 1146126, 1138110, 1155871, 1158006,\n", + " 1144584, 1150011, 1155521, 1155529, 1142663, 1142662, 1159052, 1159071,\n", + " 1159057, 1151832, 1151080, 1163267, 1142416, 1155196, 1162044, 1153052,\n", + " 1153045, 1159738, 1163072, 1167566, 1156235, 1166256, 1153841, 1156109,\n", + " 1138393, 1142679, 1167187, 1149063, 1145948, 1153507, 1153519, 1158680,\n", + " 1138161, 1164006, 1164002, 1156787, 1156795, 1149963, 1154590, 1139592,\n", + " 1156983, 1156984, 1156987, 1166073, 1146063, 1159932, 1160702, 1148600,\n", + " 1148603, 1159646, 1155816, 1156361, 1156355, 1186180, 1158643, 1158653,\n", + " 1156187, 1156181, 1159032, 1169104, 1152247, 1143739, 1160605, 1155588,\n", + " 1151220, 1158405, 1149008, 1146500, 1153239, 1164580, 1161239, 1161243,\n", + " 1144737, 1144747, 1152776, 1155055, 1141471, 1157055, 1182247, 1156739,\n", + " 1157955, 1157958, 1144812, 1164732, 1168860, 1135567, 1165721, 1165727,\n", + " 1164750, 1142733, 1156300, 1156303, 1145743, 1148683, 1145227, 1167757,\n", + " 1160228, 1155324, 1166462, 1144972, 1144973, 1166054, 1166053, 1147694,\n", + " 1152639, 1155907, 1147724, 1145900, 1145902, 1153533, 1152198, 1152206,\n", + " 1143402, 1143404, 1158722, 1154070, 1154074, 1154076, 1147331, 1147342,\n", + " 1147338, 1150773, 1151587, 1151598, 1162886, 1167817, 1144681, 1169298,\n", + " 1155172, 1155170, 1150518, 1154619, 1144336, 1138376, 1154670, 1135841,\n", + " 1166006, 1157331, 1169359, 1154364, 1149452, 1138609, 1158146, 1158611,\n", + " 1158623, 1173047, 1149846, 1149847, 1157384, 1147423, 1172486, 1152353,\n", + " 1166601, 1168400, 1169134, 1149402, 1152151, 1152146, 1153755, 1151696,\n", + " 1157153, 1157373, 1147711, 1151850, 1148128, 1148131, 1157593, 1157596,\n", + " 1169038, 1172961, 1171797, 1160990, 1166016, 1177700, 1144550, 1173092,\n", + " 1171811, 1169448, 1154148, 1167520, 1169528, 1186117, 1143279, 1143277,\n", + " 1182423, 1166299, 1177253, 1153803, 1170519, 1153141, 1151519, 1166554,\n", + " 1161255, 1155262, 1160206, 1154718, 1157792, 1157795, 1143333, 1143341,\n", + " 1172154, 1188584, 1182011, 1158253, 1153898, 1145597, 1134650, 1145626,\n", + " 1156437, 1154840, 1157483, 1161068, 1152276, 1180665, 1181143, 1158779,\n", + " 1165067, 1166621, 1158380, 1155892, 1155899, 1179926, 1140386, 1164462,\n", + " 1168273, 1165487, 1162253, 1164228, 1179101, 1164436, 1163421, 1154944,\n", + " 1165444, 1166781, 1170336, 1147182, 1168930, 1170822, 1139831, 1139837,\n", + " 1150265, 1154812, 1192076, 1184379, 1182216, 1151284, 1156055, 1146395,\n", + " 1173058, 1149544, 1193369, 1175853, 1189095, 1168683, 1140992, 1140993,\n", + " 1151774, 1153733, 1152113, 1177129, 1171201, 1177842, 1174574, 1179317,\n", + " 1161188, 1172423, 1182286, 1166788, 1152083, 1180869, 1179769, 1157017,\n", + " 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137426, 1137429, 1141424, 1140282, 1140284, 1135716, 1135726, 1137791,\n", + " 1140799, 1141758, 1138328, 1138335, 1136223, 1136215, 1141251, 1139462,\n", + " 1138897, 1143600, 1143615, 1139820, 1139811, 1145366, 1137936, 1139141,\n", + " 1143372, 1139243, 1146640, 1146646, 1139615, 1140773, 1148983, 1150509,\n", + " 1145281, 1139866, 1135376, 1149216, 1149217, 1149228, 1155683, 1155689,\n", + " 1149646, 1147477, 1152270, 1144636, 1135111, 1152666, 1153231, 1147094,\n", + " 1147102, 1137220, 1150555, 1136685, 1150329, 1134718, 1146371, 1134807,\n", + " 1138739, 1140304, 1140313, 1151546, 1140540, 1138112, 1140020, 1140953,\n", + " 1135367, 1135202, 1154739, 1141036, 1136777, 1134794, 1135967, 1138504,\n", + " 1137329, 1137693, 1136619, 1136622, 1144395, 1137534, 1157399, 1157397,\n", + " 1137441, 1136942, 1156159, 1139161, 1134841, 1134843, 1135583, 1142595,\n", + " 1141086, 1156342, 1138514, 1156909, 1135522, 1135532, 1137286, 1136352,\n", + " 1138436, 1138440, 1138461, 1137924, 1136594, 1154101, 1158390, 1149328,\n", + " 1135098, 1156606, 1147106, 1142611, 1160819, 1135359, 1135625, 1156137,\n", + " 1138185, 1145843, 1150956, 1139844, 1141523, 1143584, 1138067, 1142255,\n", + " 1134992, 1152651, 1135782, 1159009, 1141070, 1144410, 1153544, 1139929,\n", + " 1138646, 1138648, 1138148, 1141966, 1142238, 1146075, 1152044, 1139064,\n", + " 1137734, 1137728, 1140901, 1134742, 1134750, 1136697, 1141088, 1141094,\n", + " 1141097, 1141098, 1144138, 1139889, 1141980, 1139632, 1136384, 1136392,\n", + " 1137299, 1140003, 1149982, 1146834, 1152709, 1142347, 1135860, 1136631,\n", + " 1136637, 1161173, 1141111, 1142932, 1163303, 1136917, 1139731, 1143667,\n", + " 1143673, 1143678, 1137188, 1144237, 1140592, 1141155, 1152731, 1136760,\n", + " 1144650, 1144641, 1134987, 1136848, 1136852, 1147845, 1148069, 1139268,\n", + " 1153670, 1142093, 1140169, 1158749, 1138476, 1138478, 1137761, 1139190,\n", + " 1139194, 1141479, 1137058, 1137060, 1138708, 1142924, 1138424, 1143107,\n", + " 1144596, 1136867, 1136864, 1145298, 1144182, 1143752, 1137364, 1136562,\n", + " 1139559, 1158703, 1140501, 1137841, 1147153, 1147163, 1136369, 1136375,\n", + " 1136378, 1162811, 1141365, 1141720, 1141678, 1139510, 1139760, 1139763,\n", + " 1140089, 1144997, 1145001, 1145200, 1145213, 1143789, 1139171, 1140976,\n", + " 1140990, 1146693, 1146695, 1141560, 1147050, 1143551, 1152976, 1139000,\n", + " 1141925, 1146898, 1144242, 1145337, 1150250, 1150696, 1139405, 1145974,\n", + " 1144073, 1143851, 1146013, 1146004, 1146024, 1138085, 1142533, 1149928,\n", + " 1139990, 1146293, 1146302, 1143293, 1143294, 1151124, 1147540, 1148763,\n", + " 1147282, 1142816, 1136330, 1149165, 1140341, 1143649, 1142628, 1149366,\n", + " 1136160, 1142584, 1138922, 1157720, 1136836, 1139297, 1141496, 1142149,\n", + " 1142159, 1143345, 1143349, 1140844, 1140845, 1144083, 1144088, 1135876,\n", + " 1150756, 1135818, 1144375, 1146514, 1146523, 1138024, 1143456, 1143457,\n", + " 1144291, 1144303, 1143949, 1140817, 1147574, 1149082, 1143798, 1143799,\n", + " 1146636, 1140364, 1149582, 1143085, 1143075, 1144219, 1147995, 1147999,\n", + " 1146949, 1134899, 1134902, 1139249, 1147234, 1148704, 1148715, 1146749,\n", + " 1146742, 1148466, 1148468, 1149722, 1147027, 1143829, 1147981, 1139549,\n", + " 1158225, 1158226, 1158230, 1150452, 1143921, 1145240, 1142378, 1146159,\n", + " 1138626, 1138638, 1146178, 1151242, 1151179, 1147954, 1144514, 1141349,\n", + " 1152013, 1151994, 1147796, 1151475, 1152022, 1152023, 1145259, 1139919,\n", + " 1150127, 1153959, 1158949, 1141949, 1141269, 1148740, 1148745, 1147653,\n", + " 1143552, 1143567, 1149416, 1148294, 1137724, 1147866, 1151412, 1154430,\n", + " 1154420, 1148180, 1152561, 1136251, 1146682, 1146684, 1152439, 1157983,\n", + " 1148720, 1148724, 1148734, 1149816, 1148204, 1171943, 1154203, 1154168,\n", + " 1153124, 1153188, 1153197, 1145104, 1150935, 1152867, 1144849, 1150352,\n", + " 1150356, 1155088, 1148084, 1143134, 1141017, 1152581, 1135303, 1150708,\n", + " 1148505, 1141420, 1136012, 1147737, 1146265, 1148949, 1150208, 1146623,\n", + " 1151402, 1152849, 1152098, 1152100, 1153032, 1153036, 1153038, 1137746,\n", + " 1137756, 1146307, 1152622, 1140521, 1157107, 1152826, 1155337, 1154123,\n", + " 1154638, 1151580, 1151617, 1151623, 1150578, 1136132, 1151440, 1152958,\n", + " 1138982, 1151298, 1152341, 1156816, 1153311, 1138283, 1138281, 1152294,\n", + " 1156007, 1156005, 1136028, 1136029, 1158704, 1151195, 1140682, 1140687,\n", + " 1152928, 1152888, 1143486, 1156422, 1150110, 1150164, 1148033, 1148035,\n", + " 1148040, 1144657, 1137048, 1158470, 1148628, 1158530, 1158537, 1169170,\n", + " 1137458, 1153072, 1135434, 1143448, 1142387, 1158916, 1158927, 1156500,\n", + " 1157064, 1155412, 1152841, 1137814, 1151257, 1150468, 1156629, 1158308,\n", + " 1158311, 1151271, 1155441, 1150129, 1150130, 1138573, 1154528, 1145770,\n", + " 1150484, 1142766, 1142758, 1151379, 1155122, 1152527, 1157172, 1155755,\n", + " 1135396, 1146920, 1156452, 1156460, 1158096, 1158097, 1154763, 1155670,\n", + " 1155626, 1155575, 1155576, 1136476, 1158566, 1158824, 1158325, 1143263,\n", + " 1146935, 1161794, 1154243, 1160907, 1150371, 1153325, 1155613, 1141627,\n", + " 1143518, 1159629, 1159630, 1137152, 1158123, 1158996, 1153776, 1153786,\n", + " 1137316, 1135601, 1158665, 1138216, 1144451, 1152220, 1159213, 1140380,\n", + " 1157732, 1157735, 1144843, 1164215, 1155971, 1155975, 1153765, 1161676,\n", + " 1142070, 1156804, 1149696, 1154592, 1160163, 1160164, 1136896, 1158760,\n", + " 1158764, 1159164, 1155246, 1151615, 1136494, 1156490, 1136646, 1134757,\n", + " 1157858, 1158547, 1153827, 1146123, 1146126, 1138110, 1155871, 1158006,\n", + " 1144584, 1150011, 1155521, 1155529, 1142663, 1142662, 1159052, 1159071,\n", + " 1159057, 1151832, 1151080, 1163267, 1142416, 1155196, 1162044, 1153052,\n", + " 1153045, 1159738, 1163072, 1167566, 1156235, 1166256, 1153841, 1156109,\n", + " 1138393, 1142679, 1167187, 1149063, 1145948, 1153507, 1153519, 1158680,\n", + " 1138161, 1164006, 1164002, 1156787, 1156795, 1149963, 1154590, 1139592,\n", + " 1156983, 1156984, 1156987, 1166073, 1146063, 1159932, 1160702, 1148600,\n", + " 1148603, 1159646, 1155816, 1156361, 1156355, 1186180, 1158643, 1158653,\n", + " 1156187, 1156181, 1159032, 1169104, 1152247, 1143739, 1160605, 1155588,\n", + " 1151220, 1158405, 1149008, 1146500, 1153239, 1164580, 1161239, 1161243,\n", + " 1144737, 1144747, 1152776, 1155055, 1141471, 1157055, 1182247, 1156739,\n", + " 1157955, 1157958, 1144812, 1164732, 1168860, 1135567, 1165721, 1165727,\n", + " 1164750, 1142733, 1156300, 1156303, 1145743, 1148683, 1145227, 1167757,\n", + " 1160228, 1155324, 1166462, 1144972, 1144973, 1166054, 1166053, 1147694,\n", + " 1152639, 1155907, 1147724, 1145900, 1145902, 1153533, 1152198, 1152206,\n", + " 1143402, 1143404, 1158722, 1154070, 1154074, 1154076, 1147331, 1147342,\n", + " 1147338, 1150773, 1151587, 1151598, 1162886, 1167817, 1144681, 1169298,\n", + " 1155172, 1155170, 1150518, 1154619, 1144336, 1138376, 1154670, 1135841,\n", + " 1166006, 1157331, 1169359, 1154364, 1149452, 1138609, 1158146, 1158611,\n", + " 1158623, 1173047, 1149846, 1149847, 1157384, 1147423, 1172486, 1152353,\n", + " 1166601, 1168400, 1169134, 1149402, 1152151, 1152146, 1153755, 1151696,\n", + " 1157153, 1157373, 1147711, 1151850, 1148128, 1148131, 1157593, 1157596,\n", + " 1169038, 1172961, 1171797, 1160990, 1166016, 1177700, 1144550, 1173092,\n", + " 1171811, 1169448, 1154148, 1167520, 1169528, 1186117, 1143279, 1143277,\n", + " 1182423, 1166299, 1177253, 1153803, 1170519, 1153141, 1151519, 1166554,\n", + " 1161255, 1155262, 1160206, 1154718, 1157792, 1157795, 1143333, 1143341,\n", + " 1172154, 1188584, 1182011, 1158253, 1153898, 1145597, 1134650, 1145626,\n", + " 1156437, 1154840, 1157483, 1161068, 1152276, 1180665, 1181143, 1158779,\n", + " 1165067, 1166621, 1158380, 1155892, 1155899, 1179926, 1140386, 1164462,\n", + " 1168273, 1165487, 1162253, 1164228, 1179101, 1164436, 1163421, 1154944,\n", + " 1165444, 1166781, 1170336, 1147182, 1168930, 1170822, 1139831, 1139837,\n", + " 1150265, 1154812, 1192076, 1184379, 1182216, 1151284, 1156055, 1146395,\n", + " 1173058, 1149544, 1193369, 1175853, 1189095, 1168683, 1140992, 1140993,\n", + " 1151774, 1153733, 1152113, 1177129, 1171201, 1177842, 1174574, 1179317,\n", + " 1161188, 1172423, 1182286, 1166788, 1152083, 1180869, 1179769, 1157017,\n", + " 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196007, 1196013, 1195697, 1199439, 1195522, 1197719, 1198730, 1195860,\n", + " 1199282, 1198459, 1202255, 1198840, 1198844, 1201581, 1194626, 1197350,\n", + " 1198694, 1198557, 1194866, 1194770, 1195494, 1196631, 1194642, 1195514,\n", + " 1198609, 1195263, 1197921, 1196534, 1201992, 1198542, 1198543, 1197697,\n", + " 1195740, 1194982, 1196334, 1197856, 1197867, 1195325, 1198668, 1198654,\n", + " 1196704, 1199823, 1195145, 1197367, 1196109, 1194859, 1195841, 1198915,\n", + " 1202916, 1199322, 1197474, 1196122, 1195918, 1195353, 1200959, 1196851,\n", + " 1199628, 1200869, 1200872, 1200878, 1199152, 1199154, 1199038, 1198404,\n", + " 1198410, 1199231, 1194786, 1199942, 1201511, 1196508, 1200668, 1199018,\n", + " 1195807, 1197601, 1196727, 1200892, 1200018, 1198811, 1201827, 1198593,\n", + " 1201421, 1201156, 1200991, 1200913, 1200918, 1201041, 1195637, 1200429,\n", + " 1197100, 1202110, 1196883, 1200692, 1199917, 1200899, 1202707, 1201291,\n", + " 1195610, 1201796, 1196966, 1200784, 1198015, 1198929, 1197816, 1197822,\n", + " 1198127, 1199660, 1199659, 1198145, 1198824, 1200011, 1200468, 1200301,\n", + " 1201365, 1196070, 1203162], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196007, 1196013, 1195697, 1199439, 1195522, 1197719, 1198730, 1195860,\n", + " 1199282, 1198459, 1202255, 1198840, 1198844, 1201581, 1194626, 1197350,\n", + " 1198694, 1198557, 1194866, 1194770, 1195494, 1196631, 1194642, 1195514,\n", + " 1198609, 1195263, 1197921, 1196534, 1201992, 1198542, 1198543, 1197697,\n", + " 1195740, 1194982, 1196334, 1197856, 1197867, 1195325, 1198668, 1198654,\n", + " 1196704, 1199823, 1195145, 1197367, 1196109, 1194859, 1195841, 1198915,\n", + " 1202916, 1199322, 1197474, 1196122, 1195918, 1195353, 1200959, 1196851,\n", + " 1199628, 1200869, 1200872, 1200878, 1199152, 1199154, 1199038, 1198404,\n", + " 1198410, 1199231, 1194786, 1199942, 1201511, 1196508, 1200668, 1199018,\n", + " 1195807, 1197601, 1196727, 1200892, 1200018, 1198811, 1201827, 1198593,\n", + " 1201421, 1201156, 1200991, 1200913, 1200918, 1201041, 1195637, 1200429,\n", + " 1197100, 1202110, 1196883, 1200692, 1199917, 1200899, 1202707, 1201291,\n", + " 1195610, 1201796, 1196966, 1200784, 1198015, 1198929, 1197816, 1197822,\n", + " 1198127, 1199660, 1199659, 1198145, 1198824, 1200011, 1200468, 1200301,\n", + " 1201365, 1196070, 1203162], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 0.1112, 0.0155, 0.7244, ..., 0.1470, -0.0021, -0.0043],\n", + " [ 0.1112, 0.0155, 0.7244, ..., 0.1470, -0.0021, -0.0043],\n", + " [ 0.0924, 0.0419, 0.6498, ..., 0.1574, -0.0023, -0.0039],\n", + " ...,\n", + " [ 0.1576, 0.0419, 0.7976, ..., 0.1341, -0.0017, -0.0050],\n", + " [ 0.1103, 0.0502, 0.6838, ..., 0.1519, -0.0020, -0.0043],\n", + " [ 0.1434, 0.0666, 0.7314, ..., 0.1383, -0.0017, -0.0046]],\n", + " device='cuda:0', grad_fn=), 'paper': tensor([[ 2.1106e-01, 6.2013e-01, 2.7499e+00, ..., -5.3582e-03,\n", + " -1.6079e-02, -1.1895e-02],\n", + " [ 6.8288e-01, -1.9075e-03, 2.7190e+00, ..., -2.9244e-03,\n", + " -1.4752e-02, -6.0232e-03],\n", + " [ 1.5471e+00, -1.0220e-02, 2.6985e+00, ..., 2.5845e-01,\n", + " -3.7957e-02, 1.7886e+00],\n", + " ...,\n", + " [ 4.0818e-01, -4.6055e-03, 2.7372e+00, ..., -3.6507e-03,\n", + " -1.5579e-02, -1.0848e-02],\n", + " [ 4.9312e-01, -5.4136e-03, 2.8966e+00, ..., -3.1643e-03,\n", + " -1.8039e-02, -7.6506e-03],\n", + " [ 2.4696e+00, -5.8035e-03, 3.2058e+00, ..., 9.7847e-01,\n", + " -4.6873e-02, 3.2232e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-2.5952e-03, 2.9615e-01, 4.2968e-01, ..., 1.7838e+00,\n", + " -3.3344e-03, -1.5831e-03],\n", + " [-2.6905e-03, 3.1700e-01, 3.3064e-01, ..., 1.4594e+00,\n", + " -2.8445e-03, -1.2117e-03],\n", + " [-1.7635e-03, 2.5683e-01, 3.1578e-01, ..., 1.6504e+00,\n", + " -6.4482e-04, -3.4802e-04],\n", + " ...,\n", + " [-1.8191e-03, 2.3895e-01, 3.2798e-01, ..., 1.7737e+00,\n", + " -8.6112e-04, 4.7550e-03],\n", + " [-1.6785e-03, 1.8012e-01, 2.6841e-01, ..., 1.6388e+00,\n", + " -6.1324e-04, 1.2025e-01],\n", + " [-7.1334e-04, 3.0380e-02, 1.4300e-01, ..., 1.5941e-01,\n", + " -2.0931e-04, -7.6962e-04]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[ 1.1011e-02, 5.3189e-01, 2.5343e-01, ..., -6.5649e-03,\n", + " 1.7558e-01, 2.8992e-01],\n", + " [-3.4909e-04, 7.0298e-01, 2.3471e-01, ..., -8.3248e-03,\n", + " 4.2035e-01, 2.7089e-01],\n", + " [-9.0914e-05, 5.1561e-01, 2.1774e-01, ..., -6.7793e-03,\n", + " 2.5609e-01, 2.0888e-01],\n", + " ...,\n", + " [-4.2785e-04, 6.6137e-01, 3.1353e-01, ..., -1.0260e-02,\n", + " 4.1229e-01, 3.7871e-01],\n", + " [-1.8289e-04, 5.9573e-01, 1.9961e-01, ..., -9.9011e-03,\n", + " 3.8644e-01, 3.2027e-01],\n", + " [ 3.2847e-01, 1.0069e+00, 8.3069e-01, ..., -7.2340e-03,\n", + " 2.7834e-01, -1.3780e-03]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 173, 220, 180, 143, 143, 24, 74, 74, 280, 541, 915, 830,\n", + " 838, 633, 633, 1138, 996, 996, 1228, 1022, 1352, 1713, 1713, 1300,\n", + " 1323, 1354, 1298, 1344, 1344, 1260, 1260, 1260, 1569, 1692, 1610, 1610,\n", + " 1678, 1694, 1671, 1704, 1907, 1910, 1920, 1961, 1961, 2205, 2205, 2450,\n", + " 2338, 2408, 2482, 2222, 2467, 2281, 2281, 2475, 2466, 2537, 2501, 2501,\n", + " 2598, 2509, 2552, 2524, 2524, 2788, 2517, 2643, 2643, 2684, 2656, 2774,\n", + " 2774, 2819, 2712, 2855, 2934, 2855, 2855, 2855, 2805, 2820, 2820, 2820,\n", + " 2910, 3055, 2860, 2860, 3215, 3301, 3237, 3237, 3305, 3315, 3148, 3223,\n", + " 3223, 3367, 3442, 3507, 3471, 3546, 3450, 3636, 3499, 3641, 3896, 3842,\n", + " 3706, 3781, 3767, 3781, 3781, 4217, 3837, 4130, 3929, 4052, 4152, 4260,\n", + " 4174, 4322, 4305, 4305, 4312, 4348, 4341, 4593, 4589, 4436, 4459, 4459,\n", + " 4488, 4601, 4546, 4714, 4714, 4586, 4521, 4773, 4872, 4783, 4875, 4875,\n", + " 4875, 4875, 4910, 5122, 4908, 4878, 4907, 4889, 5154, 5154, 4980, 5009,\n", + " 5306, 5306, 5284, 5284, 5284, 5326, 5554, 5554, 5512, 5520, 5520, 5780,\n", + " 5662, 5662, 5613, 5710, 5690, 5690, 5772, 6161, 6303, 6232, 6232, 6232,\n", + " 6350, 6362],\n", + " [ 8, 55, 54, 19, 39, 47, 46, 56, 90, 74, 112, 24,\n", + " 97, 24, 106, 41, 92, 96, 65, 2, 74, 56, 46, 36,\n", + " 75, 63, 79, 74, 23, 2, 50, 15, 35, 30, 51, 107,\n", + " 107, 72, 10, 2, 16, 43, 59, 22, 52, 85, 4, 94,\n", + " 113, 62, 76, 13, 74, 98, 114, 74, 13, 2, 25, 94,\n", + " 75, 81, 1, 46, 56, 98, 104, 98, 84, 13, 78, 25,\n", + " 89, 13, 100, 38, 111, 113, 5, 25, 105, 61, 103, 86,\n", + " 47, 70, 9, 109, 58, 74, 0, 8, 13, 60, 29, 31,\n", + " 71, 49, 13, 35, 44, 89, 101, 75, 27, 104, 4, 21,\n", + " 64, 57, 40, 83, 93, 99, 58, 89, 53, 45, 80, 91,\n", + " 50, 33, 25, 5, 69, 98, 36, 34, 11, 99, 93, 69,\n", + " 102, 69, 69, 69, 83, 69, 7, 28, 3, 37, 110, 108,\n", + " 17, 95, 42, 95, 87, 98, 73, 99, 12, 74, 26, 99,\n", + " 29, 82, 66, 14, 32, 29, 37, 28, 74, 88, 8, 67,\n", + " 59, 48, 18, 56, 77, 68, 25, 20, 74, 29, 6, 108,\n", + " 74, 65]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[4101, 2448, 1864, ..., 4030, 2448, 4025],\n", + " [ 212, 314, 30, ..., 6531, 6626, 6662]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 16, 33, 89, ..., 16, 98, 93],\n", + " [ 43, 103, 10, ..., 6280, 6352, 6366]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 192, 192, 192, ..., 6472, 6472, 6472],\n", + " [ 82, 706, 442, ..., 317, 645, 450]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 426, 510, 256, ..., 705, 492, 317],\n", + " [ 39, 29, 256, ..., 6711, 6625, 6650]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 171, 4455, 3733, ..., 4683, 3272, 6132],\n", + " [ 105, 142, 27, ..., 6379, 6378, 6356]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 192, 192, 192, ..., 6472, 6472, 6472],\n", + " [ 443, 789, 1240, ..., 5888, 5103, 5266]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 163, 163, 231, ..., 6362, 6362, 6362],\n", + " [2878, 2843, 1067, ..., 78, 4683, 4500]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006655\n", + "sampling 0.006498\n", + "noi time: 0.001907\n", + "get_vertex_data call: 0.024178\n", + "noi group time: 0.004253\n", + "eoi_group_time: 0.015078\n", + "second half: 0.218104\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24187, 8556, 34166, ..., 1118692, 1120069, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24187, 8556, 34166, ..., 1118692, 1120069, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1221612, 1209801, 1203807, ..., 1937007, 1928581, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1221612, 1209801, 1203807, ..., 1937007, 1928581, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1137212, 1141424, 1141439, 1140282, 1140285, 1135926, 1135928,\n", + " 1135160, 1135716, 1135727, 1142201, 1137791, 1141758, 1137506, 1138335,\n", + " 1141251, 1141250, 1140295, 1136969, 1136971, 1138897, 1145363, 1145373,\n", + " 1146983, 1137947, 1143362, 1143372, 1143363, 1139241, 1146640, 1139615,\n", + " 1140781, 1150497, 1134940, 1136959, 1149216, 1155683, 1143820, 1147473,\n", + " 1141882, 1135992, 1135999, 1142881, 1144636, 1146995, 1146996, 1134700,\n", + " 1152664, 1148546, 1147091, 1147101, 1137220, 1145419, 1155018, 1147204,\n", + " 1147211, 1136679, 1152425, 1146369, 1134807, 1151546, 1138112, 1137254,\n", + " 1137181, 1149457, 1138353, 1140029, 1140953, 1135367, 1135202, 1136039,\n", + " 1134965, 1134960, 1141036, 1134794, 1138508, 1137328, 1137342, 1137693,\n", + " 1144786, 1144395, 1137529, 1137534, 1136590, 1156149, 1156159, 1148484,\n", + " 1139161, 1135579, 1135583, 1135830, 1138514, 1138524, 1153094, 1153099,\n", + " 1158136, 1154132, 1145120, 1156899, 1139684, 1138314, 1139878, 1138436,\n", + " 1138440, 1136534, 1138461, 1138449, 1157190, 1136594, 1138847, 1135088,\n", + " 1156603, 1156606, 1142611, 1145843, 1148531, 1148533, 1137109, 1139667,\n", + " 1139673, 1138079, 1138069, 1142243, 1134992, 1142793, 1136551, 1152642,\n", + " 1152648, 1135789, 1136734, 1159009, 1141070, 1144406, 1144410, 1153543,\n", + " 1139933, 1138648, 1155648, 1155654, 1141992, 1152044, 1142302, 1140670,\n", + " 1137734, 1137741, 1137728, 1134922, 1134750, 1135549, 1140228, 1141088,\n", + " 1141097, 1148993, 1149001, 1145356, 1143767, 1154860, 1143225, 1139033,\n", + " 1140003, 1152709, 1152719, 1136419, 1154479, 1141223, 1141891, 1139386,\n", + " 1141657, 1136917, 1139730, 1139732, 1143667, 1143677, 1145066, 1140592,\n", + " 1147844, 1137074, 1144428, 1141821, 1142093, 1140166, 1140173, 1158749,\n", + " 1141479, 1142917, 1142913, 1142560, 1137661, 1144596, 1136867, 1136864,\n", + " 1144041, 1141570, 1135322, 1144182, 1150906, 1166711, 1144865, 1146201,\n", + " 1134827, 1136565, 1139559, 1161701, 1147153, 1141365, 1153068, 1149088,\n", + " 1149090, 1153556, 1143917, 1139508, 1139510, 1139763, 1145213, 1143783,\n", + " 1143784, 1140616, 1140976, 1146693, 1147050, 1147047, 1145873, 1152988,\n", + " 1135457, 1141925, 1144242, 1140580, 1140582, 1141841, 1137146, 1137149,\n", + " 1137571, 1141382, 1141390, 1143845, 1143851, 1146024, 1146017, 1154332,\n", + " 1139990, 1146302, 1143293, 1143294, 1151124, 1147543, 1147540, 1147282,\n", + " 1142816, 1136330, 1140346, 1142628, 1149608, 1143051, 1136164, 1157717,\n", + " 1136836, 1136843, 1139329, 1139328, 1141490, 1141496, 1138238, 1145427,\n", + " 1143345, 1144766, 1144753, 1137098, 1144086, 1138600, 1139979, 1135874,\n", + " 1135876, 1150761, 1150294, 1146514, 1146523, 1138024, 1143456, 1143457,\n", + " 1143007, 1137703, 1144291, 1140482, 1140483, 1140492, 1143937, 1146636,\n", + " 1147523, 1140364, 1149575, 1137990, 1143075, 1166402, 1148966, 1144725,\n", + " 1147984, 1147988, 1147999, 1134899, 1144013, 1139252, 1147127, 1147131,\n", + " 1147244, 1148704, 1141319, 1141327, 1146751, 1146742, 1162729, 1148468,\n", + " 1152328, 1149718, 1145015, 1139549, 1158226, 1143921, 1147880, 1154526,\n", + " 1145240, 1145751, 1148397, 1146178, 1151242, 1152530, 1152537, 1150274,\n", + " 1151182, 1150438, 1150445, 1154437, 1154438, 1151860, 1149787, 1149791,\n", + " 1144514, 1145827, 1152013, 1165252, 1151487, 1154263, 1139919, 1149534,\n", + " 1150127, 1147019, 1147009, 1141945, 1141949, 1150733, 1153572, 1154976,\n", + " 1147653, 1148288, 1148300, 1137724, 1135079, 1154420, 1148180, 1148188,\n", + " 1151360, 1136251, 1139721, 1139718, 1146674, 1146676, 1146682, 1152494,\n", + " 1138404, 1148720, 1144110, 1151941, 1148204, 1153181, 1148108, 1154192,\n", + " 1154196, 1153124, 1153192, 1152962, 1152968, 1150932, 1154960, 1152864,\n", + " 1152878, 1143134, 1147442, 1151821, 1154183, 1148498, 1141420, 1141419,\n", + " 1146265, 1146969, 1146967, 1149359, 1150219, 1167290, 1146623, 1146608,\n", + " 1151401, 1146488, 1144472, 1135688, 1152407, 1152409, 1154063, 1152097,\n", + " 1152109, 1146280, 1146287, 1156321, 1153037, 1153039, 1137746, 1140521,\n", + " 1155140, 1136401, 1136403, 1151952, 1152826, 1155337, 1154120, 1154123,\n", + " 1157839, 1152673, 1154633, 1139582, 1151579, 1151580, 1164753, 1151617,\n", + " 1150578, 1136132, 1136134, 1148916, 1172255, 1153379, 1152903, 1143988,\n", + " 1152341, 1152344, 1146816, 1156826, 1156831, 1156816, 1138283, 1138279,\n", + " 1138281, 1136028, 1158712, 1158704, 1151187, 1140684, 1152928, 1151064,\n", + " 1151071, 1156399, 1152890, 1142777, 1137539, 1153909, 1148040, 1155202,\n", + " 1149300, 1152601, 1152607, 1145656, 1149794, 1144659, 1137048, 1148628,\n", + " 1158530, 1158540, 1137458, 1149940, 1155376, 1157459, 1143442, 1157547,\n", + " 1142385, 1158860, 1148884, 1158916, 1156505, 1157064, 1153885, 1155412,\n", + " 1152833, 1145187, 1137808, 1139479, 1143496, 1157563, 1135730, 1150824,\n", + " 1156932, 1153413, 1153422, 1135644, 1135647, 1147810, 1151469, 1158306,\n", + " 1158308, 1158311, 1155441, 1155442, 1161730, 1150130, 1150136, 1162120,\n", + " 1144362, 1140866, 1154529, 1154530, 1150486, 1142758, 1156207, 1156271,\n", + " 1157637, 1151379, 1140186, 1155122, 1152527, 1157172, 1149321, 1149320,\n", + " 1149519, 1151424, 1135396, 1156452, 1156463, 1168230, 1155626, 1155628,\n", + " 1156563, 1154555, 1155576, 1158817, 1158824, 1177960, 1153712, 1153715,\n", + " 1148835, 1155635, 1155646, 1153363, 1143263, 1154080, 1154909, 1163122,\n", + " 1143189, 1153322, 1157430, 1150073, 1155613, 1150983, 1150990, 1151030,\n", + " 1137152, 1137158, 1153776, 1153786, 1149904, 1158204, 1137381, 1137380,\n", + " 1159116, 1138258, 1145694, 1134677, 1134683, 1135601, 1135602, 1150661,\n", + " 1155852, 1158665, 1157684, 1149145, 1140633, 1152220, 1152215, 1167298,\n", + " 1155971, 1155975, 1158846, 1156811, 1156812, 1155393, 1154600, 1159440,\n", + " 1136896, 1158753, 1158760, 1158764, 1158891, 1140215, 1158436, 1152463,\n", + " 1136480, 1136494, 1136491, 1159241, 1152143, 1156488, 1153808, 1156273,\n", + " 1136640, 1136646, 1158217, 1134757, 1140049, 1158558, 1146126, 1159936,\n", + " 1158006, 1155521, 1161541, 1171195, 1135650, 1164276, 1142666, 1167359,\n", + " 1159042, 1153052, 1153045, 1159738, 1167702, 1144158, 1142865, 1156107,\n", + " 1138396, 1138393, 1142683, 1167189, 1150046, 1149063, 1145948, 1155480,\n", + " 1153514, 1153519, 1147307, 1147300, 1142405, 1138161, 1164006, 1156795,\n", + " 1149963, 1139776, 1164901, 1184339, 1154590, 1154578, 1148021, 1166073,\n", + " 1161007, 1148771, 1169327, 1146063, 1165309, 1170415, 1140650, 1140643,\n", + " 1148600, 1148603, 1143139, 1144509, 1158653, 1159025, 1159032, 1159038,\n", + " 1163740, 1146542, 1160605, 1155588, 1144320, 1151220, 1168194, 1144977,\n", + " 1144986, 1144989, 1169646, 1147830, 1147836, 1146497, 1146500, 1146509,\n", + " 1153239, 1161240, 1144739, 1152776, 1155046, 1161562, 1147426, 1159386,\n", + " 1156739, 1160848, 1160849, 1153648, 1166579, 1166583, 1166591, 1150647,\n", + " 1150648, 1150649, 1166632, 1171040, 1150315, 1168748, 1144812, 1140112,\n", + " 1135567, 1135558, 1165719, 1162613, 1148683, 1165943, 1145228, 1170772,\n", + " 1146042, 1155324, 1144973, 1190699, 1162288, 1143037, 1165746, 1152626,\n", + " 1148124, 1147724, 1153534, 1152194, 1175240, 1143404, 1170980, 1166670,\n", + " 1171279, 1154076, 1168756, 1167315, 1147338, 1150783, 1149130, 1144686,\n", + " 1166653, 1145326, 1155172, 1155180, 1150515, 1156117, 1146601, 1154618,\n", + " 1144346, 1144336, 1157534, 1147746, 1154670, 1154893, 1169162, 1157331,\n", + " 1138129, 1138131, 1151664, 1151668, 1169359, 1149452, 1138609, 1158154,\n", + " 1149681, 1149688, 1158611, 1158051, 1158052, 1149847, 1157380, 1157384,\n", + " 1174454, 1179900, 1165892, 1154869, 1155502, 1172486, 1152353, 1169196,\n", + " 1168451, 1168400, 1155928, 1149403, 1148667, 1171560, 1147518, 1173307,\n", + " 1145033, 1154027, 1152150, 1169583, 1157153, 1172111, 1157371, 1147711,\n", + " 1157592, 1149237, 1169029, 1169037, 1179575, 1167712, 1181021, 1165122,\n", + " 1168598, 1160158, 1177700, 1159100, 1150234, 1154148, 1149173, 1179860,\n", + " 1184637, 1143279, 1169969, 1168481, 1156554, 1171302, 1170176, 1181241,\n", + " 1153803, 1153141, 1180916, 1151519, 1168778, 1179807, 1158030, 1158031,\n", + " 1161255, 1155262, 1171773, 1154716, 1157795, 1151488, 1182812, 1171623,\n", + " 1179191, 1153889, 1153899, 1145586, 1191744, 1145626, 1145618, 1156438,\n", + " 1172022, 1172024, 1178028, 1149755, 1146252, 1181348, 1153601, 1153609,\n", + " 1170069, 1158512, 1158524, 1181192, 1158370, 1158379, 1162988, 1140399,\n", + " 1162253, 1164231, 1164232, 1166446, 1183723, 1164264, 1181469, 1179125,\n", + " 1154957, 1165448, 1181778, 1170342, 1147169, 1147182, 1139828, 1139831,\n", + " 1139837, 1150265, 1170437, 1167131, 1154812, 1149668, 1190585, 1186928,\n", + " 1156055, 1151972, 1192212, 1173019, 1146386, 1146392, 1180052, 1191726,\n", + " 1182885, 1190298, 1178523, 1178527, 1193699, 1192328, 1168315, 1151774,\n", + " 1178484, 1152124, 1169789, 1162502, 1166838, 1171201, 1189659, 1188698,\n", + " 1194059, 1180786, 1158064, 1166785, 1145395, 1145398, 1179603, 1178135,\n", + " 1179662, 1155959, 1155962, 1193175, 1184966, 1179771, 1169837, 1191032,\n", + " 1172896, 1189962, 1194191, 1182863, 1176340, 1157017, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1137212, 1141424, 1141439, 1140282, 1140285, 1135926, 1135928,\n", + " 1135160, 1135716, 1135727, 1142201, 1137791, 1141758, 1137506, 1138335,\n", + " 1141251, 1141250, 1140295, 1136969, 1136971, 1138897, 1145363, 1145373,\n", + " 1146983, 1137947, 1143362, 1143372, 1143363, 1139241, 1146640, 1139615,\n", + " 1140781, 1150497, 1134940, 1136959, 1149216, 1155683, 1143820, 1147473,\n", + " 1141882, 1135992, 1135999, 1142881, 1144636, 1146995, 1146996, 1134700,\n", + " 1152664, 1148546, 1147091, 1147101, 1137220, 1145419, 1155018, 1147204,\n", + " 1147211, 1136679, 1152425, 1146369, 1134807, 1151546, 1138112, 1137254,\n", + " 1137181, 1149457, 1138353, 1140029, 1140953, 1135367, 1135202, 1136039,\n", + " 1134965, 1134960, 1141036, 1134794, 1138508, 1137328, 1137342, 1137693,\n", + " 1144786, 1144395, 1137529, 1137534, 1136590, 1156149, 1156159, 1148484,\n", + " 1139161, 1135579, 1135583, 1135830, 1138514, 1138524, 1153094, 1153099,\n", + " 1158136, 1154132, 1145120, 1156899, 1139684, 1138314, 1139878, 1138436,\n", + " 1138440, 1136534, 1138461, 1138449, 1157190, 1136594, 1138847, 1135088,\n", + " 1156603, 1156606, 1142611, 1145843, 1148531, 1148533, 1137109, 1139667,\n", + " 1139673, 1138079, 1138069, 1142243, 1134992, 1142793, 1136551, 1152642,\n", + " 1152648, 1135789, 1136734, 1159009, 1141070, 1144406, 1144410, 1153543,\n", + " 1139933, 1138648, 1155648, 1155654, 1141992, 1152044, 1142302, 1140670,\n", + " 1137734, 1137741, 1137728, 1134922, 1134750, 1135549, 1140228, 1141088,\n", + " 1141097, 1148993, 1149001, 1145356, 1143767, 1154860, 1143225, 1139033,\n", + " 1140003, 1152709, 1152719, 1136419, 1154479, 1141223, 1141891, 1139386,\n", + " 1141657, 1136917, 1139730, 1139732, 1143667, 1143677, 1145066, 1140592,\n", + " 1147844, 1137074, 1144428, 1141821, 1142093, 1140166, 1140173, 1158749,\n", + " 1141479, 1142917, 1142913, 1142560, 1137661, 1144596, 1136867, 1136864,\n", + " 1144041, 1141570, 1135322, 1144182, 1150906, 1166711, 1144865, 1146201,\n", + " 1134827, 1136565, 1139559, 1161701, 1147153, 1141365, 1153068, 1149088,\n", + " 1149090, 1153556, 1143917, 1139508, 1139510, 1139763, 1145213, 1143783,\n", + " 1143784, 1140616, 1140976, 1146693, 1147050, 1147047, 1145873, 1152988,\n", + " 1135457, 1141925, 1144242, 1140580, 1140582, 1141841, 1137146, 1137149,\n", + " 1137571, 1141382, 1141390, 1143845, 1143851, 1146024, 1146017, 1154332,\n", + " 1139990, 1146302, 1143293, 1143294, 1151124, 1147543, 1147540, 1147282,\n", + " 1142816, 1136330, 1140346, 1142628, 1149608, 1143051, 1136164, 1157717,\n", + " 1136836, 1136843, 1139329, 1139328, 1141490, 1141496, 1138238, 1145427,\n", + " 1143345, 1144766, 1144753, 1137098, 1144086, 1138600, 1139979, 1135874,\n", + " 1135876, 1150761, 1150294, 1146514, 1146523, 1138024, 1143456, 1143457,\n", + " 1143007, 1137703, 1144291, 1140482, 1140483, 1140492, 1143937, 1146636,\n", + " 1147523, 1140364, 1149575, 1137990, 1143075, 1166402, 1148966, 1144725,\n", + " 1147984, 1147988, 1147999, 1134899, 1144013, 1139252, 1147127, 1147131,\n", + " 1147244, 1148704, 1141319, 1141327, 1146751, 1146742, 1162729, 1148468,\n", + " 1152328, 1149718, 1145015, 1139549, 1158226, 1143921, 1147880, 1154526,\n", + " 1145240, 1145751, 1148397, 1146178, 1151242, 1152530, 1152537, 1150274,\n", + " 1151182, 1150438, 1150445, 1154437, 1154438, 1151860, 1149787, 1149791,\n", + " 1144514, 1145827, 1152013, 1165252, 1151487, 1154263, 1139919, 1149534,\n", + " 1150127, 1147019, 1147009, 1141945, 1141949, 1150733, 1153572, 1154976,\n", + " 1147653, 1148288, 1148300, 1137724, 1135079, 1154420, 1148180, 1148188,\n", + " 1151360, 1136251, 1139721, 1139718, 1146674, 1146676, 1146682, 1152494,\n", + " 1138404, 1148720, 1144110, 1151941, 1148204, 1153181, 1148108, 1154192,\n", + " 1154196, 1153124, 1153192, 1152962, 1152968, 1150932, 1154960, 1152864,\n", + " 1152878, 1143134, 1147442, 1151821, 1154183, 1148498, 1141420, 1141419,\n", + " 1146265, 1146969, 1146967, 1149359, 1150219, 1167290, 1146623, 1146608,\n", + " 1151401, 1146488, 1144472, 1135688, 1152407, 1152409, 1154063, 1152097,\n", + " 1152109, 1146280, 1146287, 1156321, 1153037, 1153039, 1137746, 1140521,\n", + " 1155140, 1136401, 1136403, 1151952, 1152826, 1155337, 1154120, 1154123,\n", + " 1157839, 1152673, 1154633, 1139582, 1151579, 1151580, 1164753, 1151617,\n", + " 1150578, 1136132, 1136134, 1148916, 1172255, 1153379, 1152903, 1143988,\n", + " 1152341, 1152344, 1146816, 1156826, 1156831, 1156816, 1138283, 1138279,\n", + " 1138281, 1136028, 1158712, 1158704, 1151187, 1140684, 1152928, 1151064,\n", + " 1151071, 1156399, 1152890, 1142777, 1137539, 1153909, 1148040, 1155202,\n", + " 1149300, 1152601, 1152607, 1145656, 1149794, 1144659, 1137048, 1148628,\n", + " 1158530, 1158540, 1137458, 1149940, 1155376, 1157459, 1143442, 1157547,\n", + " 1142385, 1158860, 1148884, 1158916, 1156505, 1157064, 1153885, 1155412,\n", + " 1152833, 1145187, 1137808, 1139479, 1143496, 1157563, 1135730, 1150824,\n", + " 1156932, 1153413, 1153422, 1135644, 1135647, 1147810, 1151469, 1158306,\n", + " 1158308, 1158311, 1155441, 1155442, 1161730, 1150130, 1150136, 1162120,\n", + " 1144362, 1140866, 1154529, 1154530, 1150486, 1142758, 1156207, 1156271,\n", + " 1157637, 1151379, 1140186, 1155122, 1152527, 1157172, 1149321, 1149320,\n", + " 1149519, 1151424, 1135396, 1156452, 1156463, 1168230, 1155626, 1155628,\n", + " 1156563, 1154555, 1155576, 1158817, 1158824, 1177960, 1153712, 1153715,\n", + " 1148835, 1155635, 1155646, 1153363, 1143263, 1154080, 1154909, 1163122,\n", + " 1143189, 1153322, 1157430, 1150073, 1155613, 1150983, 1150990, 1151030,\n", + " 1137152, 1137158, 1153776, 1153786, 1149904, 1158204, 1137381, 1137380,\n", + " 1159116, 1138258, 1145694, 1134677, 1134683, 1135601, 1135602, 1150661,\n", + " 1155852, 1158665, 1157684, 1149145, 1140633, 1152220, 1152215, 1167298,\n", + " 1155971, 1155975, 1158846, 1156811, 1156812, 1155393, 1154600, 1159440,\n", + " 1136896, 1158753, 1158760, 1158764, 1158891, 1140215, 1158436, 1152463,\n", + " 1136480, 1136494, 1136491, 1159241, 1152143, 1156488, 1153808, 1156273,\n", + " 1136640, 1136646, 1158217, 1134757, 1140049, 1158558, 1146126, 1159936,\n", + " 1158006, 1155521, 1161541, 1171195, 1135650, 1164276, 1142666, 1167359,\n", + " 1159042, 1153052, 1153045, 1159738, 1167702, 1144158, 1142865, 1156107,\n", + " 1138396, 1138393, 1142683, 1167189, 1150046, 1149063, 1145948, 1155480,\n", + " 1153514, 1153519, 1147307, 1147300, 1142405, 1138161, 1164006, 1156795,\n", + " 1149963, 1139776, 1164901, 1184339, 1154590, 1154578, 1148021, 1166073,\n", + " 1161007, 1148771, 1169327, 1146063, 1165309, 1170415, 1140650, 1140643,\n", + " 1148600, 1148603, 1143139, 1144509, 1158653, 1159025, 1159032, 1159038,\n", + " 1163740, 1146542, 1160605, 1155588, 1144320, 1151220, 1168194, 1144977,\n", + " 1144986, 1144989, 1169646, 1147830, 1147836, 1146497, 1146500, 1146509,\n", + " 1153239, 1161240, 1144739, 1152776, 1155046, 1161562, 1147426, 1159386,\n", + " 1156739, 1160848, 1160849, 1153648, 1166579, 1166583, 1166591, 1150647,\n", + " 1150648, 1150649, 1166632, 1171040, 1150315, 1168748, 1144812, 1140112,\n", + " 1135567, 1135558, 1165719, 1162613, 1148683, 1165943, 1145228, 1170772,\n", + " 1146042, 1155324, 1144973, 1190699, 1162288, 1143037, 1165746, 1152626,\n", + " 1148124, 1147724, 1153534, 1152194, 1175240, 1143404, 1170980, 1166670,\n", + " 1171279, 1154076, 1168756, 1167315, 1147338, 1150783, 1149130, 1144686,\n", + " 1166653, 1145326, 1155172, 1155180, 1150515, 1156117, 1146601, 1154618,\n", + " 1144346, 1144336, 1157534, 1147746, 1154670, 1154893, 1169162, 1157331,\n", + " 1138129, 1138131, 1151664, 1151668, 1169359, 1149452, 1138609, 1158154,\n", + " 1149681, 1149688, 1158611, 1158051, 1158052, 1149847, 1157380, 1157384,\n", + " 1174454, 1179900, 1165892, 1154869, 1155502, 1172486, 1152353, 1169196,\n", + " 1168451, 1168400, 1155928, 1149403, 1148667, 1171560, 1147518, 1173307,\n", + " 1145033, 1154027, 1152150, 1169583, 1157153, 1172111, 1157371, 1147711,\n", + " 1157592, 1149237, 1169029, 1169037, 1179575, 1167712, 1181021, 1165122,\n", + " 1168598, 1160158, 1177700, 1159100, 1150234, 1154148, 1149173, 1179860,\n", + " 1184637, 1143279, 1169969, 1168481, 1156554, 1171302, 1170176, 1181241,\n", + " 1153803, 1153141, 1180916, 1151519, 1168778, 1179807, 1158030, 1158031,\n", + " 1161255, 1155262, 1171773, 1154716, 1157795, 1151488, 1182812, 1171623,\n", + " 1179191, 1153889, 1153899, 1145586, 1191744, 1145626, 1145618, 1156438,\n", + " 1172022, 1172024, 1178028, 1149755, 1146252, 1181348, 1153601, 1153609,\n", + " 1170069, 1158512, 1158524, 1181192, 1158370, 1158379, 1162988, 1140399,\n", + " 1162253, 1164231, 1164232, 1166446, 1183723, 1164264, 1181469, 1179125,\n", + " 1154957, 1165448, 1181778, 1170342, 1147169, 1147182, 1139828, 1139831,\n", + " 1139837, 1150265, 1170437, 1167131, 1154812, 1149668, 1190585, 1186928,\n", + " 1156055, 1151972, 1192212, 1173019, 1146386, 1146392, 1180052, 1191726,\n", + " 1182885, 1190298, 1178523, 1178527, 1193699, 1192328, 1168315, 1151774,\n", + " 1178484, 1152124, 1169789, 1162502, 1166838, 1171201, 1189659, 1188698,\n", + " 1194059, 1180786, 1158064, 1166785, 1145395, 1145398, 1179603, 1178135,\n", + " 1179662, 1155959, 1155962, 1193175, 1184966, 1179771, 1169837, 1191032,\n", + " 1172896, 1189962, 1194191, 1182863, 1176340, 1157017, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195697, 1199282, 1202255, 1198844, 1201577, 1201582, 1201462, 1199278,\n", + " 1194626, 1198557, 1197516, 1194743, 1195494, 1199053, 1196631, 1197930,\n", + " 1201935, 1201992, 1197697, 1198095, 1194956, 1195888, 1195740, 1196835,\n", + " 1197807, 1198958, 1198163, 1198167, 1198169, 1196711, 1195270, 1197136,\n", + " 1196247, 1196109, 1199377, 1202017, 1195351, 1195353, 1197318, 1199329,\n", + " 1200949, 1194928, 1199628, 1197990, 1200079, 1200869, 1200872, 1200878,\n", + " 1199154, 1198406, 1199579, 1201917, 1199745, 1194795, 1201511, 1196499,\n", + " 1199018, 1197977, 1197601, 1196727, 1196734, 1195762, 1195771, 1202612,\n", + " 1198428, 1198811, 1200163, 1200503, 1203282, 1201421, 1201155, 1201156,\n", + " 1200918, 1201358, 1201737, 1200553, 1197100, 1199088, 1199908, 1201442,\n", + " 1201029, 1202239, 1199482, 1202175, 1202662, 1201291, 1198478, 1203263,\n", + " 1200388, 1200398, 1198562, 1196966, 1198512, 1195679, 1198929, 1195415,\n", + " 1195379, 1197822, 1196414, 1196605, 1198967, 1200585, 1201138, 1194730,\n", + " 1200003, 1198824, 1197731, 1197735, 1200010, 1198819, 1201196, 1200302,\n", + " 1197652, 1197335, 1196557, 1197872], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195697, 1199282, 1202255, 1198844, 1201577, 1201582, 1201462, 1199278,\n", + " 1194626, 1198557, 1197516, 1194743, 1195494, 1199053, 1196631, 1197930,\n", + " 1201935, 1201992, 1197697, 1198095, 1194956, 1195888, 1195740, 1196835,\n", + " 1197807, 1198958, 1198163, 1198167, 1198169, 1196711, 1195270, 1197136,\n", + " 1196247, 1196109, 1199377, 1202017, 1195351, 1195353, 1197318, 1199329,\n", + " 1200949, 1194928, 1199628, 1197990, 1200079, 1200869, 1200872, 1200878,\n", + " 1199154, 1198406, 1199579, 1201917, 1199745, 1194795, 1201511, 1196499,\n", + " 1199018, 1197977, 1197601, 1196727, 1196734, 1195762, 1195771, 1202612,\n", + " 1198428, 1198811, 1200163, 1200503, 1203282, 1201421, 1201155, 1201156,\n", + " 1200918, 1201358, 1201737, 1200553, 1197100, 1199088, 1199908, 1201442,\n", + " 1201029, 1202239, 1199482, 1202175, 1202662, 1201291, 1198478, 1203263,\n", + " 1200388, 1200398, 1198562, 1196966, 1198512, 1195679, 1198929, 1195415,\n", + " 1195379, 1197822, 1196414, 1196605, 1198967, 1200585, 1201138, 1194730,\n", + " 1200003, 1198824, 1197731, 1197735, 1200010, 1198819, 1201196, 1200302,\n", + " 1197652, 1197335, 1196557, 1197872], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 2.1845e-01, -4.5682e-06, 9.4267e-01, ..., 1.3915e-01,\n", + " -2.0142e-03, -6.0337e-03],\n", + " [ 1.5090e-01, 9.8135e-02, 6.2236e-01, ..., 1.4364e-01,\n", + " -1.4881e-03, -4.2146e-03],\n", + " [ 1.8049e-01, 2.6570e-02, 8.9035e-01, ..., 1.3949e-01,\n", + " -1.8757e-03, -5.7157e-03],\n", + " ...,\n", + " [ 9.9492e-02, 1.0651e-02, 7.0766e-01, ..., 1.7134e-01,\n", + " -2.3004e-03, -4.3384e-03],\n", + " [ 1.0815e-01, -6.8823e-05, 7.6239e-01, ..., 1.7273e-01,\n", + " -2.2390e-03, -5.0121e-03],\n", + " [ 1.2952e-01, -1.5213e-04, 7.6516e-01, ..., 1.6862e-01,\n", + " -2.4270e-03, -4.9554e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 9.2035e-01, 1.7147e-01, 1.7754e+00, ..., -4.4240e-03,\n", + " -1.8613e-02, 1.3265e-01],\n", + " [ 2.4188e-01, -2.3353e-02, 4.3729e+00, ..., -9.9940e-03,\n", + " -3.5612e-02, -1.6014e-02],\n", + " [ 7.2933e-01, 2.9555e-01, 2.6138e+00, ..., -3.3224e-03,\n", + " -1.9120e-02, -5.5413e-03],\n", + " ...,\n", + " [ 2.9411e-01, -8.1498e-03, 3.1944e+00, ..., -4.5959e-03,\n", + " -2.1180e-02, -1.2381e-02],\n", + " [ 5.6519e-01, 1.2229e-01, 1.9795e+00, ..., -3.5765e-03,\n", + " -1.8863e-02, -3.2459e-03],\n", + " [ 2.2768e+00, -9.4701e-04, 3.3311e+00, ..., 1.5243e+00,\n", + " -5.0333e-02, 3.3531e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-1.5159e-03, 2.8165e-01, 2.7883e-01, ..., 1.7956e+00,\n", + " -1.2684e-03, 7.1719e-02],\n", + " [-6.9840e-04, 3.1375e-02, 1.3777e-01, ..., 1.6635e-01,\n", + " -1.7806e-04, -7.4179e-04],\n", + " [-2.9389e-03, 2.7104e-01, 3.1278e-01, ..., 1.5114e+00,\n", + " -3.1550e-03, -2.3285e-03],\n", + " ...,\n", + " [-6.9840e-04, 3.1375e-02, 1.3777e-01, ..., 1.6635e-01,\n", + " -1.7806e-04, -7.4179e-04],\n", + " [-1.3775e-03, 2.2075e-01, 2.8576e-01, ..., 1.6914e+00,\n", + " -7.0190e-04, 1.9177e-03],\n", + " [-1.9778e-03, 2.6290e-01, 2.6520e-01, ..., 1.6558e+00,\n", + " -2.0039e-03, -3.8949e-04]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-4.9376e-04, 6.2343e-01, 3.6783e-01, ..., -7.5502e-03,\n", + " 5.8651e-02, 4.4053e-01],\n", + " [-3.7096e-04, 6.6328e-01, 3.8373e-01, ..., -7.8828e-03,\n", + " 2.3160e-01, 4.1840e-01],\n", + " [ 3.9359e-02, 6.1675e-01, 2.3136e-01, ..., -7.6779e-03,\n", + " 3.8888e-01, 1.6905e-01],\n", + " ...,\n", + " [ 8.2975e-02, 6.6428e-01, 3.0306e-01, ..., -7.5404e-03,\n", + " 3.5128e-01, 2.0797e-01],\n", + " [ 3.7490e-02, 6.8307e-01, 3.8635e-01, ..., -8.8509e-03,\n", + " 2.7786e-01, 4.3009e-01],\n", + " [ 2.0291e-01, 6.8223e-01, 4.4676e-01, ..., -6.6920e-03,\n", + " 2.5390e-01, 8.9572e-03]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 98, 20, 149, 149, 192, 76, 139, 139, 139, 139, 139, 139,\n", + " 139, 139, 132, 132, 132, 132, 109, 109, 443, 400, 313, 294,\n", + " 307, 307, 307, 505, 396, 396, 533, 550, 670, 835, 835, 852,\n", + " 852, 782, 772, 874, 992, 831, 1374, 1119, 1119, 891, 751, 905,\n", + " 1012, 992, 1071, 1270, 1033, 1033, 1434, 1367, 1275, 1432, 1342, 1392,\n", + " 1501, 1853, 1403, 1403, 1403, 1344, 1551, 1551, 1551, 1633, 1416, 1416,\n", + " 1416, 1712, 2083, 1828, 1760, 2119, 2108, 1954, 2181, 2215, 2137, 2113,\n", + " 2088, 2106, 2288, 2205, 2155, 2362, 2362, 2429, 2403, 2328, 2354, 2354,\n", + " 2379, 2379, 2233, 2479, 2497, 2498, 2451, 2474, 2474, 2474, 2474, 2474,\n", + " 2602, 2553, 2553, 2641, 2481, 2859, 2835, 3125, 2957, 3133, 2995, 3139,\n", + " 3139, 3216, 3169, 3269, 3280, 3280, 3268, 3397, 3324, 3324, 3324, 3206,\n", + " 3517, 3630, 3602, 3734, 3675, 3675, 4068, 4068, 3949, 4117, 4097, 4209,\n", + " 4399, 4399, 4399, 4441, 4441, 4441, 4571, 4414, 4649, 4762, 4643, 4620,\n", + " 4512, 4512, 4512, 4781, 4800, 4800, 4767, 4882, 4819, 4932, 4809, 4933,\n", + " 5004, 5050, 5145, 5082, 5099, 5099, 5099, 5018, 5034, 5486, 5254, 5306,\n", + " 5306, 5306, 5306, 5306, 5306, 5282, 5519, 5421, 5420, 5519, 5564, 5947,\n", + " 5716, 5977, 5991, 6086],\n", + " [ 24, 1, 94, 104, 39, 34, 16, 84, 57, 96, 112, 70,\n", + " 58, 3, 50, 68, 65, 82, 10, 107, 94, 59, 76, 39,\n", + " 50, 18, 65, 10, 54, 1, 10, 13, 38, 92, 37, 74,\n", + " 54, 27, 49, 50, 68, 22, 53, 66, 101, 102, 46, 5,\n", + " 71, 108, 56, 52, 1, 34, 80, 21, 42, 25, 25, 87,\n", + " 14, 35, 61, 37, 47, 91, 7, 89, 109, 52, 18, 8,\n", + " 21, 9, 60, 59, 80, 99, 114, 91, 91, 113, 35, 35,\n", + " 80, 107, 21, 22, 94, 103, 101, 101, 115, 39, 54, 41,\n", + " 17, 77, 35, 89, 22, 25, 101, 21, 88, 4, 6, 101,\n", + " 20, 69, 15, 69, 35, 42, 100, 97, 26, 33, 35, 42,\n", + " 12, 74, 25, 2, 91, 72, 71, 95, 48, 1, 51, 5,\n", + " 102, 19, 85, 93, 64, 106, 73, 114, 45, 107, 40, 23,\n", + " 63, 32, 115, 64, 1, 93, 17, 14, 105, 31, 59, 74,\n", + " 79, 43, 42, 29, 105, 22, 67, 1, 43, 1, 2, 101,\n", + " 98, 1, 81, 18, 50, 28, 65, 105, 62, 17, 90, 11,\n", + " 83, 1, 44, 86, 78, 0, 107, 41, 36, 55, 81, 110,\n", + " 30, 38, 75, 111]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3638, 2549, 3071, ..., 585, 5731, 3656],\n", + " [ 89, 143, 151, ..., 7695, 7708, 7683]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 55, 107, 1, ..., 89, 107, 91],\n", + " [ 154, 26, 25, ..., 6070, 5974, 6015]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 151, 151, 151, ..., 7741, 7741, 7741],\n", + " [ 712, 879, 415, ..., 689, 821, 549]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 286, 397, 226, ..., 305, 146, 88],\n", + " [ 78, 186, 295, ..., 7691, 7714, 7699]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[7234, 4029, 6090, ..., 7527, 6368, 7142],\n", + " [ 115, 24, 39, ..., 6074, 6009, 5863]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 151, 151, 151, ..., 7666, 7666, 7690],\n", + " [ 377, 1960, 2885, ..., 5234, 5372, 1494]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 76, 76, 140, ..., 6086, 6086, 6086],\n", + " [2206, 3071, 4815, ..., 4029, 3568, 3658]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.007111\n", + "sampling 0.006954\n", + "noi time: 0.002103\n", + "get_vertex_data call: 0.033106\n", + "noi group time: 0.002561\n", + "eoi_group_time: 0.01348\n", + "second half: 0.206896\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24187, 32616, 24818, ..., 1120070, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24187, 32616, 24818, ..., 1120070, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1212293, 1232753, 1208425, ..., 1931114, 1925024, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1212293, 1232753, 1208425, ..., 1931114, 1925024, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137439, 1137204, 1140282, 1135926, 1135165, 1135723, 1137784, 1137791,\n", + " 1141748, 1141756, 1141758, 1136213, 1141250, 1140293, 1142813, 1136965,\n", + " 1136969, 1141448, 1138897, 1151164, 1139811, 1145366, 1145992, 1138938,\n", + " 1139141, 1143372, 1139235, 1139243, 1139241, 1146640, 1139609, 1139615,\n", + " 1150497, 1142968, 1139865, 1139866, 1149216, 1142958, 1143820, 1147483,\n", + " 1142894, 1142881, 1144636, 1148512, 1149037, 1149038, 1146995, 1134700,\n", + " 1148343, 1146656, 1152666, 1153220, 1155014, 1155018, 1147202, 1136256,\n", + " 1136268, 1134807, 1138112, 1137254, 1138356, 1135367, 1135202, 1136036,\n", + " 1141036, 1136768, 1134794, 1157443, 1138504, 1138508, 1137691, 1137693,\n", + " 1144395, 1136714, 1157393, 1157397, 1136581, 1136662, 1137441, 1137472,\n", + " 1136928, 1135265, 1156149, 1156159, 1135579, 1135583, 1135670, 1140963,\n", + " 1138514, 1153094, 1153099, 1156967, 1135499, 1154141, 1135522, 1139687,\n", + " 1137287, 1157703, 1138436, 1138440, 1138445, 1138461, 1138462, 1137491,\n", + " 1154798, 1157190, 1136594, 1158390, 1142611, 1135359, 1135624, 1156141,\n", + " 1138185, 1145855, 1148531, 1148543, 1137109, 1139667, 1139668, 1138070,\n", + " 1134992, 1136551, 1135776, 1135781, 1136730, 1142909, 1159012, 1153543,\n", + " 1140045, 1140036, 1136065, 1139933, 1138151, 1141962, 1141992, 1152044,\n", + " 1139069, 1137741, 1137728, 1146222, 1134750, 1137005, 1136697, 1141088,\n", + " 1141097, 1141102, 1149001, 1143767, 1154860, 1137299, 1143225, 1140003,\n", + " 1149979, 1135860, 1135861, 1136417, 1136418, 1136426, 1136625, 1141112,\n", + " 1141224, 1139386, 1145071, 1144237, 1140592, 1141159, 1139495, 1144650,\n", + " 1134987, 1147850, 1138482, 1142063, 1141821, 1140173, 1141479, 1138708,\n", + " 1140110, 1142913, 1143111, 1144596, 1136867, 1141578, 1135315, 1135327,\n", + " 1141405, 1144182, 1150906, 1146201, 1134827, 1158703, 1137841, 1147153,\n", + " 1141365, 1153068, 1141664, 1149088, 1149101, 1144279, 1153556, 1139508,\n", + " 1139510, 1139127, 1145001, 1140976, 1140990, 1147050, 1147047, 1145873,\n", + " 1143551, 1152976, 1152982, 1135457, 1139447, 1141925, 1146898, 1144242,\n", + " 1140580, 1140585, 1140582, 1165365, 1141841, 1137149, 1150692, 1150695,\n", + " 1143643, 1143637, 1137571, 1137570, 1141382, 1145983, 1143845, 1146006,\n", + " 1136273, 1142098, 1146024, 1150596, 1154328, 1142533, 1139990, 1139988,\n", + " 1143293, 1143294, 1151121, 1147543, 1147540, 1148763, 1147282, 1149155,\n", + " 1149161, 1140337, 1140346, 1142637, 1139417, 1149608, 1149610, 1136167,\n", + " 1136836, 1139301, 1139329, 1145431, 1143345, 1144765, 1150294, 1146523,\n", + " 1143967, 1138024, 1143456, 1143470, 1140482, 1146590, 1149076, 1143799,\n", + " 1143807, 1140352, 1140364, 1137990, 1137985, 1143080, 1143082, 1143083,\n", + " 1144219, 1144222, 1147995, 1147999, 1144013, 1139252, 1148704, 1150997,\n", + " 1153701, 1143434, 1149722, 1147025, 1147971, 1141131, 1158226, 1158235,\n", + " 1143921, 1145240, 1145751, 1148394, 1146178, 1151242, 1152531, 1150280,\n", + " 1150438, 1150445, 1154437, 1151862, 1149791, 1149777, 1144514, 1144526,\n", + " 1150350, 1152013, 1165260, 1151473, 1154263, 1139919, 1140561, 1147019,\n", + " 1147021, 1141949, 1141194, 1150736, 1141269, 1147653, 1147654, 1147659,\n", + " 1137724, 1135083, 1151412, 1154420, 1152563, 1138198, 1146682, 1138867,\n", + " 1138400, 1147627, 1146547, 1143983, 1171939, 1154197, 1153186, 1153197,\n", + " 1145109, 1145111, 1150935, 1148054, 1144863, 1150356, 1169594, 1143134,\n", + " 1147442, 1151816, 1151821, 1151913, 1154183, 1154190, 1150715, 1145640,\n", + " 1148510, 1146565, 1141420, 1150637, 1150632, 1147609, 1147737, 1145079,\n", + " 1150210, 1146623, 1151691, 1144468, 1135688, 1152407, 1152409, 1152415,\n", + " 1151729, 1156325, 1137746, 1146304, 1152623, 1140521, 1155150, 1149208,\n", + " 1151967, 1155337, 1154123, 1152673, 1151617, 1151629, 1136131, 1136798,\n", + " 1148916, 1148921, 1138991, 1152341, 1156007, 1136028, 1136031, 1158704,\n", + " 1152928, 1156396, 1154722, 1156422, 1150161, 1144016, 1142257, 1148040,\n", + " 1155202, 1149300, 1152601, 1144657, 1137047, 1137048, 1148628, 1158530,\n", + " 1137458, 1142041, 1142047, 1157229, 1150872, 1148884, 1158920, 1154929,\n", + " 1156505, 1157064, 1157071, 1155422, 1145191, 1150465, 1146854, 1135231,\n", + " 1135740, 1152183, 1156638, 1151777, 1150824, 1147810, 1143010, 1158304,\n", + " 1158308, 1158311, 1151276, 1174265, 1155441, 1155442, 1153359, 1150130,\n", + " 1150132, 1154529, 1142756, 1156207, 1138775, 1151380, 1151379, 1140179,\n", + " 1155122, 1149321, 1149320, 1153478, 1153481, 1146913, 1155628, 1155630,\n", + " 1155631, 1156563, 1156566, 1158573, 1158824, 1177960, 1158324, 1156993,\n", + " 1148835, 1155646, 1153363, 1162396, 1154241, 1154240, 1143189, 1143531,\n", + " 1150371, 1145723, 1143517, 1143504, 1157928, 1157933, 1151030, 1157653,\n", + " 1158126, 1158584, 1153776, 1153786, 1145694, 1145690, 1145681, 1137316,\n", + " 1140920, 1134682, 1164163, 1148149, 1150664, 1150671, 1158665, 1158669,\n", + " 1138215, 1157684, 1146325, 1149145, 1159258, 1155717, 1152220, 1152215,\n", + " 1152498, 1140370, 1140380, 1159132, 1157031, 1155975, 1158846, 1163238,\n", + " 1154592, 1154600, 1154605, 1161309, 1136896, 1158753, 1158760, 1158815,\n", + " 1158438, 1158447, 1136480, 1136494, 1164931, 1159241, 1147586, 1156490,\n", + " 1153808, 1156278, 1136646, 1134757, 1158558, 1156516, 1165489, 1163181,\n", + " 1163183, 1150011, 1155521, 1137567, 1135661, 1192539, 1142666, 1152479,\n", + " 1157759, 1167346, 1162683, 1159052, 1159065, 1157946, 1153052, 1153045,\n", + " 1156235, 1153842, 1156098, 1138393, 1150046, 1149063, 1149070, 1151020,\n", + " 1153514, 1153519, 1171987, 1164006, 1156787, 1149963, 1139286, 1140735,\n", + " 1157357, 1146063, 1159931, 1165306, 1158878, 1169493, 1140641, 1140643,\n", + " 1148603, 1143139, 1143143, 1159032, 1169114, 1152247, 1143734, 1160605,\n", + " 1155588, 1156584, 1151226, 1148567, 1144977, 1144979, 1149016, 1153239,\n", + " 1169257, 1144739, 1152776, 1162580, 1155268, 1168067, 1153212, 1147426,\n", + " 1147433, 1156737, 1156739, 1157955, 1165182, 1168748, 1144812, 1153267,\n", + " 1135567, 1145176, 1148683, 1169282, 1154695, 1155320, 1144972, 1144973,\n", + " 1142136, 1146444, 1148168, 1143025, 1165746, 1152624, 1139345, 1147723,\n", + " 1153520, 1152203, 1181048, 1175240, 1143395, 1170978, 1158734, 1154076,\n", + " 1147338, 1173912, 1170758, 1169602, 1167817, 1154213, 1180431, 1150522,\n", + " 1154618, 1144346, 1144336, 1157534, 1138378, 1147746, 1154670, 1154882,\n", + " 1157331, 1157342, 1138130, 1141043, 1169359, 1150027, 1154364, 1149452,\n", + " 1138609, 1158623, 1158052, 1173047, 1149847, 1157380, 1165892, 1152353,\n", + " 1166486, 1168400, 1149402, 1148656, 1167014, 1171560, 1173307, 1161145,\n", + " 1160936, 1154027, 1169583, 1151696, 1157158, 1157153, 1157373, 1168126,\n", + " 1147711, 1151850, 1148133, 1147934, 1149247, 1172961, 1166746, 1168604,\n", + " 1172234, 1172226, 1180476, 1172932, 1179882, 1166535, 1150234, 1154148,\n", + " 1158176, 1167517, 1143271, 1168481, 1181237, 1153803, 1153141, 1173243,\n", + " 1171318, 1144910, 1172309, 1182647, 1178914, 1161255, 1155260, 1155262,\n", + " 1171773, 1157792, 1157795, 1171623, 1171391, 1155806, 1157126, 1157991,\n", + " 1153898, 1191749, 1185933, 1145626, 1157483, 1179453, 1149755, 1153601,\n", + " 1186957, 1158512, 1158380, 1155890, 1155892, 1180852, 1157268, 1157279,\n", + " 1162968, 1140399, 1164788, 1187779, 1171634, 1160806, 1188939, 1168621,\n", + " 1164228, 1164339, 1184287, 1165082, 1170264, 1156862, 1147182, 1186355,\n", + " 1168943, 1184050, 1139825, 1139831, 1139837, 1150265, 1154812, 1149668,\n", + " 1156055, 1170001, 1181447, 1191134, 1146394, 1173058, 1186746, 1182370,\n", + " 1170207, 1181909, 1186472, 1151774, 1166838, 1180962, 1189924, 1192979,\n", + " 1180998, 1172423, 1172429, 1178046, 1145395, 1145398, 1176233, 1185244,\n", + " 1155962, 1172187, 1181248, 1172896, 1189360, 1189075, 1157017, 1161940],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137439, 1137204, 1140282, 1135926, 1135165, 1135723, 1137784, 1137791,\n", + " 1141748, 1141756, 1141758, 1136213, 1141250, 1140293, 1142813, 1136965,\n", + " 1136969, 1141448, 1138897, 1151164, 1139811, 1145366, 1145992, 1138938,\n", + " 1139141, 1143372, 1139235, 1139243, 1139241, 1146640, 1139609, 1139615,\n", + " 1150497, 1142968, 1139865, 1139866, 1149216, 1142958, 1143820, 1147483,\n", + " 1142894, 1142881, 1144636, 1148512, 1149037, 1149038, 1146995, 1134700,\n", + " 1148343, 1146656, 1152666, 1153220, 1155014, 1155018, 1147202, 1136256,\n", + " 1136268, 1134807, 1138112, 1137254, 1138356, 1135367, 1135202, 1136036,\n", + " 1141036, 1136768, 1134794, 1157443, 1138504, 1138508, 1137691, 1137693,\n", + " 1144395, 1136714, 1157393, 1157397, 1136581, 1136662, 1137441, 1137472,\n", + " 1136928, 1135265, 1156149, 1156159, 1135579, 1135583, 1135670, 1140963,\n", + " 1138514, 1153094, 1153099, 1156967, 1135499, 1154141, 1135522, 1139687,\n", + " 1137287, 1157703, 1138436, 1138440, 1138445, 1138461, 1138462, 1137491,\n", + " 1154798, 1157190, 1136594, 1158390, 1142611, 1135359, 1135624, 1156141,\n", + " 1138185, 1145855, 1148531, 1148543, 1137109, 1139667, 1139668, 1138070,\n", + " 1134992, 1136551, 1135776, 1135781, 1136730, 1142909, 1159012, 1153543,\n", + " 1140045, 1140036, 1136065, 1139933, 1138151, 1141962, 1141992, 1152044,\n", + " 1139069, 1137741, 1137728, 1146222, 1134750, 1137005, 1136697, 1141088,\n", + " 1141097, 1141102, 1149001, 1143767, 1154860, 1137299, 1143225, 1140003,\n", + " 1149979, 1135860, 1135861, 1136417, 1136418, 1136426, 1136625, 1141112,\n", + " 1141224, 1139386, 1145071, 1144237, 1140592, 1141159, 1139495, 1144650,\n", + " 1134987, 1147850, 1138482, 1142063, 1141821, 1140173, 1141479, 1138708,\n", + " 1140110, 1142913, 1143111, 1144596, 1136867, 1141578, 1135315, 1135327,\n", + " 1141405, 1144182, 1150906, 1146201, 1134827, 1158703, 1137841, 1147153,\n", + " 1141365, 1153068, 1141664, 1149088, 1149101, 1144279, 1153556, 1139508,\n", + " 1139510, 1139127, 1145001, 1140976, 1140990, 1147050, 1147047, 1145873,\n", + " 1143551, 1152976, 1152982, 1135457, 1139447, 1141925, 1146898, 1144242,\n", + " 1140580, 1140585, 1140582, 1165365, 1141841, 1137149, 1150692, 1150695,\n", + " 1143643, 1143637, 1137571, 1137570, 1141382, 1145983, 1143845, 1146006,\n", + " 1136273, 1142098, 1146024, 1150596, 1154328, 1142533, 1139990, 1139988,\n", + " 1143293, 1143294, 1151121, 1147543, 1147540, 1148763, 1147282, 1149155,\n", + " 1149161, 1140337, 1140346, 1142637, 1139417, 1149608, 1149610, 1136167,\n", + " 1136836, 1139301, 1139329, 1145431, 1143345, 1144765, 1150294, 1146523,\n", + " 1143967, 1138024, 1143456, 1143470, 1140482, 1146590, 1149076, 1143799,\n", + " 1143807, 1140352, 1140364, 1137990, 1137985, 1143080, 1143082, 1143083,\n", + " 1144219, 1144222, 1147995, 1147999, 1144013, 1139252, 1148704, 1150997,\n", + " 1153701, 1143434, 1149722, 1147025, 1147971, 1141131, 1158226, 1158235,\n", + " 1143921, 1145240, 1145751, 1148394, 1146178, 1151242, 1152531, 1150280,\n", + " 1150438, 1150445, 1154437, 1151862, 1149791, 1149777, 1144514, 1144526,\n", + " 1150350, 1152013, 1165260, 1151473, 1154263, 1139919, 1140561, 1147019,\n", + " 1147021, 1141949, 1141194, 1150736, 1141269, 1147653, 1147654, 1147659,\n", + " 1137724, 1135083, 1151412, 1154420, 1152563, 1138198, 1146682, 1138867,\n", + " 1138400, 1147627, 1146547, 1143983, 1171939, 1154197, 1153186, 1153197,\n", + " 1145109, 1145111, 1150935, 1148054, 1144863, 1150356, 1169594, 1143134,\n", + " 1147442, 1151816, 1151821, 1151913, 1154183, 1154190, 1150715, 1145640,\n", + " 1148510, 1146565, 1141420, 1150637, 1150632, 1147609, 1147737, 1145079,\n", + " 1150210, 1146623, 1151691, 1144468, 1135688, 1152407, 1152409, 1152415,\n", + " 1151729, 1156325, 1137746, 1146304, 1152623, 1140521, 1155150, 1149208,\n", + " 1151967, 1155337, 1154123, 1152673, 1151617, 1151629, 1136131, 1136798,\n", + " 1148916, 1148921, 1138991, 1152341, 1156007, 1136028, 1136031, 1158704,\n", + " 1152928, 1156396, 1154722, 1156422, 1150161, 1144016, 1142257, 1148040,\n", + " 1155202, 1149300, 1152601, 1144657, 1137047, 1137048, 1148628, 1158530,\n", + " 1137458, 1142041, 1142047, 1157229, 1150872, 1148884, 1158920, 1154929,\n", + " 1156505, 1157064, 1157071, 1155422, 1145191, 1150465, 1146854, 1135231,\n", + " 1135740, 1152183, 1156638, 1151777, 1150824, 1147810, 1143010, 1158304,\n", + " 1158308, 1158311, 1151276, 1174265, 1155441, 1155442, 1153359, 1150130,\n", + " 1150132, 1154529, 1142756, 1156207, 1138775, 1151380, 1151379, 1140179,\n", + " 1155122, 1149321, 1149320, 1153478, 1153481, 1146913, 1155628, 1155630,\n", + " 1155631, 1156563, 1156566, 1158573, 1158824, 1177960, 1158324, 1156993,\n", + " 1148835, 1155646, 1153363, 1162396, 1154241, 1154240, 1143189, 1143531,\n", + " 1150371, 1145723, 1143517, 1143504, 1157928, 1157933, 1151030, 1157653,\n", + " 1158126, 1158584, 1153776, 1153786, 1145694, 1145690, 1145681, 1137316,\n", + " 1140920, 1134682, 1164163, 1148149, 1150664, 1150671, 1158665, 1158669,\n", + " 1138215, 1157684, 1146325, 1149145, 1159258, 1155717, 1152220, 1152215,\n", + " 1152498, 1140370, 1140380, 1159132, 1157031, 1155975, 1158846, 1163238,\n", + " 1154592, 1154600, 1154605, 1161309, 1136896, 1158753, 1158760, 1158815,\n", + " 1158438, 1158447, 1136480, 1136494, 1164931, 1159241, 1147586, 1156490,\n", + " 1153808, 1156278, 1136646, 1134757, 1158558, 1156516, 1165489, 1163181,\n", + " 1163183, 1150011, 1155521, 1137567, 1135661, 1192539, 1142666, 1152479,\n", + " 1157759, 1167346, 1162683, 1159052, 1159065, 1157946, 1153052, 1153045,\n", + " 1156235, 1153842, 1156098, 1138393, 1150046, 1149063, 1149070, 1151020,\n", + " 1153514, 1153519, 1171987, 1164006, 1156787, 1149963, 1139286, 1140735,\n", + " 1157357, 1146063, 1159931, 1165306, 1158878, 1169493, 1140641, 1140643,\n", + " 1148603, 1143139, 1143143, 1159032, 1169114, 1152247, 1143734, 1160605,\n", + " 1155588, 1156584, 1151226, 1148567, 1144977, 1144979, 1149016, 1153239,\n", + " 1169257, 1144739, 1152776, 1162580, 1155268, 1168067, 1153212, 1147426,\n", + " 1147433, 1156737, 1156739, 1157955, 1165182, 1168748, 1144812, 1153267,\n", + " 1135567, 1145176, 1148683, 1169282, 1154695, 1155320, 1144972, 1144973,\n", + " 1142136, 1146444, 1148168, 1143025, 1165746, 1152624, 1139345, 1147723,\n", + " 1153520, 1152203, 1181048, 1175240, 1143395, 1170978, 1158734, 1154076,\n", + " 1147338, 1173912, 1170758, 1169602, 1167817, 1154213, 1180431, 1150522,\n", + " 1154618, 1144346, 1144336, 1157534, 1138378, 1147746, 1154670, 1154882,\n", + " 1157331, 1157342, 1138130, 1141043, 1169359, 1150027, 1154364, 1149452,\n", + " 1138609, 1158623, 1158052, 1173047, 1149847, 1157380, 1165892, 1152353,\n", + " 1166486, 1168400, 1149402, 1148656, 1167014, 1171560, 1173307, 1161145,\n", + " 1160936, 1154027, 1169583, 1151696, 1157158, 1157153, 1157373, 1168126,\n", + " 1147711, 1151850, 1148133, 1147934, 1149247, 1172961, 1166746, 1168604,\n", + " 1172234, 1172226, 1180476, 1172932, 1179882, 1166535, 1150234, 1154148,\n", + " 1158176, 1167517, 1143271, 1168481, 1181237, 1153803, 1153141, 1173243,\n", + " 1171318, 1144910, 1172309, 1182647, 1178914, 1161255, 1155260, 1155262,\n", + " 1171773, 1157792, 1157795, 1171623, 1171391, 1155806, 1157126, 1157991,\n", + " 1153898, 1191749, 1185933, 1145626, 1157483, 1179453, 1149755, 1153601,\n", + " 1186957, 1158512, 1158380, 1155890, 1155892, 1180852, 1157268, 1157279,\n", + " 1162968, 1140399, 1164788, 1187779, 1171634, 1160806, 1188939, 1168621,\n", + " 1164228, 1164339, 1184287, 1165082, 1170264, 1156862, 1147182, 1186355,\n", + " 1168943, 1184050, 1139825, 1139831, 1139837, 1150265, 1154812, 1149668,\n", + " 1156055, 1170001, 1181447, 1191134, 1146394, 1173058, 1186746, 1182370,\n", + " 1170207, 1181909, 1186472, 1151774, 1166838, 1180962, 1189924, 1192979,\n", + " 1180998, 1172423, 1172429, 1178046, 1145395, 1145398, 1176233, 1185244,\n", + " 1155962, 1172187, 1181248, 1172896, 1189360, 1189075, 1157017, 1161940],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195710, 1199428, 1199439, 1198730, 1199282, 1199284, 1198449, 1198459,\n", + " 1202255, 1201577, 1201582, 1194626, 1203131, 1197351, 1197512, 1196685,\n", + " 1194743, 1194648, 1195263, 1196534, 1201992, 1195187, 1196031, 1198543,\n", + " 1195459, 1202902, 1199171, 1196334, 1196359, 1196977, 1196521, 1194759,\n", + " 1199371, 1196165, 1198039, 1198164, 1198161, 1195141, 1195221, 1197141,\n", + " 1196242, 1197265, 1196109, 1194859, 1195847, 1196312, 1199984, 1195351,\n", + " 1198273, 1199070, 1196851, 1194928, 1197583, 1197990, 1200866, 1200869,\n", + " 1200872, 1200874, 1200878, 1198404, 1199231, 1195017, 1198763, 1201511,\n", + " 1196496, 1199014, 1197977, 1197609, 1201116, 1196727, 1195771, 1200892,\n", + " 1203239, 1198428, 1200018, 1198811, 1201528, 1201547, 1200503, 1199445,\n", + " 1201156, 1201056, 1200913, 1194805, 1202640, 1199712, 1200352, 1200526,\n", + " 1199886, 1197050, 1200194, 1196779, 1201442, 1196256, 1201029, 1202239,\n", + " 1202338, 1202170, 1202175, 1201291, 1198478, 1199929, 1200245, 1200398,\n", + " 1196966, 1200793, 1195676, 1195664, 1200445, 1198929, 1195421, 1201789,\n", + " 1195386, 1197816, 1197822, 1196601, 1196547, 1203102, 1194730, 1199405,\n", + " 1198824, 1197735, 1200677, 1195070, 1201886, 1195306, 1201365, 1203162,\n", + " 1198741], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195710, 1199428, 1199439, 1198730, 1199282, 1199284, 1198449, 1198459,\n", + " 1202255, 1201577, 1201582, 1194626, 1203131, 1197351, 1197512, 1196685,\n", + " 1194743, 1194648, 1195263, 1196534, 1201992, 1195187, 1196031, 1198543,\n", + " 1195459, 1202902, 1199171, 1196334, 1196359, 1196977, 1196521, 1194759,\n", + " 1199371, 1196165, 1198039, 1198164, 1198161, 1195141, 1195221, 1197141,\n", + " 1196242, 1197265, 1196109, 1194859, 1195847, 1196312, 1199984, 1195351,\n", + " 1198273, 1199070, 1196851, 1194928, 1197583, 1197990, 1200866, 1200869,\n", + " 1200872, 1200874, 1200878, 1198404, 1199231, 1195017, 1198763, 1201511,\n", + " 1196496, 1199014, 1197977, 1197609, 1201116, 1196727, 1195771, 1200892,\n", + " 1203239, 1198428, 1200018, 1198811, 1201528, 1201547, 1200503, 1199445,\n", + " 1201156, 1201056, 1200913, 1194805, 1202640, 1199712, 1200352, 1200526,\n", + " 1199886, 1197050, 1200194, 1196779, 1201442, 1196256, 1201029, 1202239,\n", + " 1202338, 1202170, 1202175, 1201291, 1198478, 1199929, 1200245, 1200398,\n", + " 1196966, 1200793, 1195676, 1195664, 1200445, 1198929, 1195421, 1201789,\n", + " 1195386, 1197816, 1197822, 1196601, 1196547, 1203102, 1194730, 1199405,\n", + " 1198824, 1197735, 1200677, 1195070, 1201886, 1195306, 1201365, 1203162,\n", + " 1198741], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.2163e-01, 5.3435e-02, 6.1223e-01, ..., 1.4424e-01,\n", + " -1.3775e-03, -3.7783e-03],\n", + " [ 1.5289e-01, 3.3022e-02, 8.2321e-01, ..., 1.2083e-01,\n", + " -1.5056e-03, -5.4788e-03],\n", + " [ 2.5385e-01, -7.9654e-05, 1.0357e+00, ..., 1.2070e-01,\n", + " -1.9931e-03, -6.8963e-03],\n", + " ...,\n", + " [ 2.3004e-01, -2.2116e-04, 9.4880e-01, ..., 1.1974e-01,\n", + " -1.8205e-03, -6.1601e-03],\n", + " [ 2.4842e-01, -3.3096e-04, 1.0126e+00, ..., 1.1887e-01,\n", + " -1.8989e-03, -6.6186e-03],\n", + " [ 1.2139e-01, -1.1561e-05, 7.0034e-01, ..., 1.4744e-01,\n", + " -2.0239e-03, -4.3704e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 6.3389e-01, 4.2009e-01, 2.1255e+00, ..., -2.8526e-03,\n", + " -2.1797e-02, -2.6961e-03],\n", + " [ 9.6630e-02, 2.7755e-01, 3.2975e+00, ..., -8.6029e-03,\n", + " -2.7431e-02, -1.1940e-02],\n", + " [ 1.7517e-01, -8.5743e-03, 3.2414e+00, ..., -5.9369e-03,\n", + " -2.9397e-02, -8.3298e-03],\n", + " ...,\n", + " [ 9.9413e-03, -1.2529e-02, 3.7403e+00, ..., -7.4358e-03,\n", + " -3.2479e-02, -1.6189e-02],\n", + " [ 7.0108e-01, 2.3525e-02, 1.7657e+00, ..., -7.1107e-05,\n", + " -2.4733e-02, 2.9787e-01],\n", + " [ 2.0645e+00, 6.2006e-01, 3.3952e+00, ..., 2.0231e+00,\n", + " -5.4146e-02, 3.6642e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-1.2690e-03, 2.7179e-01, 2.0371e-01, ..., 1.7812e+00,\n", + " -4.0496e-05, 4.0502e-02],\n", + " [-1.5649e-03, 3.1231e-01, 2.2292e-01, ..., 1.6855e+00,\n", + " -8.3877e-04, 2.0014e-02],\n", + " [-6.6755e-04, 3.1032e-02, 1.3299e-01, ..., 1.6966e-01,\n", + " -1.4311e-04, -7.1015e-04],\n", + " ...,\n", + " [-1.0368e-03, 2.1684e-01, 3.7271e-01, ..., 1.8221e+00,\n", + " 1.6174e-02, -1.3230e-03],\n", + " [-1.8253e-03, 3.1547e-01, 2.4912e-01, ..., 1.6859e+00,\n", + " 1.0932e-02, 2.5573e-02],\n", + " [-1.2823e-03, 2.7159e-01, 1.9792e-01, ..., 1.7375e+00,\n", + " -1.1329e-04, 7.4401e-02]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[ 1.4935e-01, 7.1175e-01, 3.6846e-01, ..., -5.1303e-03,\n", + " 3.4234e-01, -1.6028e-04],\n", + " [ 1.2357e-01, 8.9588e-01, 5.4986e-01, ..., -1.0667e-02,\n", + " 3.9886e-01, 4.4455e-01],\n", + " [ 8.3066e-02, 9.5762e-01, 5.2089e-01, ..., -1.0343e-02,\n", + " 4.5474e-01, 4.6604e-01],\n", + " ...,\n", + " [ 1.0409e-01, 7.3511e-01, 5.1090e-01, ..., -7.1713e-03,\n", + " 1.4275e-01, 3.2288e-01],\n", + " [ 8.1208e-02, 6.4201e-01, 4.1398e-01, ..., -8.3211e-03,\n", + " 2.6070e-01, 3.0932e-01],\n", + " [ 2.2899e-01, 9.6919e-01, 5.1691e-01, ..., -1.1644e-02,\n", + " 5.7256e-01, 1.0452e-01]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 106, 58, 183, 36, 1057, 315, 534, 509, 509, 468, 468, 328,\n", + " 291, 832, 610, 625, 690, 756, 816, 816, 719, 719, 719, 537,\n", + " 537, 644, 1220, 1111, 817, 1151, 1043, 1151, 1068, 1068, 1308, 1298,\n", + " 1176, 1438, 1440, 1102, 1102, 1268, 1580, 1323, 1457, 1423, 1781, 1637,\n", + " 1637, 1579, 1579, 1625, 1625, 1624, 1624, 1624, 1762, 1762, 1762, 1762,\n", + " 1889, 1889, 1889, 1717, 1825, 1904, 1848, 1985, 2104, 2026, 2377, 2308,\n", + " 2162, 2209, 2206, 2221, 2221, 2221, 2221, 2478, 2420, 2594, 2666, 2665,\n", + " 2682, 2745, 2745, 2646, 2485, 2485, 2612, 2808, 2745, 2980, 2957, 2811,\n", + " 3068, 3241, 3213, 3345, 3419, 3493, 3493, 3839, 3831, 3593, 3803, 3803,\n", + " 3932, 4190, 4225, 4296, 4313, 4313, 4434, 4437, 4507, 4436, 4822, 4822,\n", + " 4822, 4839, 5140, 4816, 5009, 5166, 5200, 5108, 5350, 5254, 5245, 5245,\n", + " 5367, 5367, 5367, 5355, 5479, 6209, 5742, 5848, 5904, 6044, 5794, 5794,\n", + " 5871, 5934, 5891, 5838, 5838, 6004, 6004, 6028, 6028, 6028, 6028, 6214,\n", + " 6195, 6195, 5884, 6085, 6313, 6628, 6154, 6154, 5982, 5982, 6385, 6272,\n", + " 6393, 6393, 6393, 6591, 6506, 6506],\n", + " [ 33, 0, 92, 67, 53, 23, 81, 101, 20, 59, 39, 3,\n", + " 127, 41, 67, 22, 21, 36, 33, 45, 86, 44, 4, 108,\n", + " 66, 42, 88, 104, 105, 8, 4, 69, 12, 97, 107, 124,\n", + " 27, 128, 124, 13, 7, 67, 56, 24, 111, 102, 4, 26,\n", + " 58, 78, 6, 11, 85, 5, 46, 109, 30, 96, 64, 4,\n", + " 35, 111, 84, 89, 82, 113, 49, 89, 124, 69, 65, 18,\n", + " 18, 60, 75, 38, 52, 14, 104, 20, 94, 55, 81, 103,\n", + " 12, 117, 17, 95, 119, 125, 37, 25, 41, 15, 32, 69,\n", + " 125, 18, 29, 83, 47, 99, 98, 9, 94, 19, 61, 93,\n", + " 69, 122, 16, 19, 69, 90, 62, 63, 106, 110, 72, 48,\n", + " 115, 25, 74, 54, 50, 69, 99, 78, 89, 107, 76, 4,\n", + " 43, 69, 91, 34, 79, 40, 100, 1, 51, 31, 80, 126,\n", + " 121, 79, 10, 69, 71, 75, 123, 69, 78, 120, 2, 10,\n", + " 57, 116, 84, 114, 77, 87, 69, 118, 73, 112, 28, 69,\n", + " 33, 69, 70, 20, 69, 68]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1641, 1346, 3580, ..., 6195, 3471, 1568],\n", + " [ 256, 74, 209, ..., 7277, 7095, 7183]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 44, 37, 66, ..., 4, 4, 70],\n", + " [ 187, 16, 9, ..., 6538, 6399, 6584]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 29, 43, 43, ..., 7206, 7206, 7228],\n", + " [ 422, 78, 378, ..., 600, 152, 246]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 422, 514, 286, ..., 251, 378, 388],\n", + " [ 29, 85, 266, ..., 7238, 7253, 7077]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5426, 4509, 7213, ..., 6801, 2830, 3354],\n", + " [ 20, 142, 71, ..., 6559, 6547, 6582]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 267, 324, 324, ..., 7262, 7262, 7228],\n", + " [1513, 4588, 693, ..., 3141, 3132, 3365]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 183, 183, 183, ..., 6576, 6576, 6576],\n", + " [1192, 1677, 2705, ..., 361, 30, 152]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.003622\n", + "sampling 0.003535\n", + "noi time: 0.000705\n", + "get_vertex_data call: 0.013837\n", + "noi group time: 0.00185\n", + "eoi_group_time: 0.010957\n", + "second half: 0.11428\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31145, 24187, 17409, ..., 1103849, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31145, 24187, 17409, ..., 1103849, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1211567, 1203800, 1232112, ..., 1937149, 1936995, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1211567, 1203800, 1232112, ..., 1937149, 1936995, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1140282, 1140285, 1138549, 1140785, 1140793, 1141756, 1141758,\n", + " 1138335, 1139462, 1136969, 1143600, 1139820, 1145373, 1146983, 1137937,\n", + " 1137947, 1138930, 1139145, 1143372, 1139241, 1139615, 1140783, 1150502,\n", + " 1149216, 1147473, 1147477, 1147482, 1141877, 1142881, 1144636, 1144625,\n", + " 1144632, 1146995, 1134697, 1135947, 1135950, 1148350, 1146472, 1138350,\n", + " 1147089, 1137220, 1150555, 1147203, 1147211, 1136676, 1150329, 1152427,\n", + " 1146375, 1140313, 1140537, 1138112, 1137254, 1137181, 1138356, 1138360,\n", + " 1138366, 1151520, 1135909, 1140020, 1140953, 1135367, 1135202, 1135903,\n", + " 1134969, 1141036, 1134794, 1138504, 1138508, 1137331, 1143069, 1137693,\n", + " 1136618, 1144395, 1137521, 1137534, 1157397, 1137441, 1136206, 1156149,\n", + " 1156159, 1148484, 1139152, 1139161, 1135583, 1138514, 1153094, 1137957,\n", + " 1138590, 1158136, 1135499, 1154132, 1156899, 1135522, 1138305, 1137287,\n", + " 1157703, 1157702, 1138434, 1138436, 1138440, 1138445, 1138447, 1140079,\n", + " 1138451, 1138461, 1137920, 1136598, 1158387, 1149328, 1135088, 1156605,\n", + " 1156606, 1147111, 1147112, 1142611, 1135618, 1138177, 1145843, 1148531,\n", + " 1136453, 1139667, 1139673, 1136094, 1134992, 1136551, 1139755, 1136734,\n", + " 1140197, 1158961, 1142911, 1141070, 1144410, 1153543, 1143621, 1140034,\n", + " 1139929, 1138648, 1138148, 1141963, 1140548, 1152044, 1139070, 1136059,\n", + " 1137728, 1147317, 1146208, 1134738, 1134750, 1141088, 1141095, 1141098,\n", + " 1144138, 1139889, 1145346, 1135290, 1135291, 1143711, 1139025, 1149979,\n", + " 1141695, 1135860, 1154472, 1136625, 1161173, 1142929, 1141224, 1139386,\n", + " 1136917, 1141785, 1139495, 1144650, 1134979, 1147850, 1149434, 1142049,\n", + " 1142050, 1141810, 1141820, 1141821, 1143153, 1140175, 1158749, 1138472,\n", + " 1137762, 1143574, 1148442, 1144596, 1148263, 1136864, 1145298, 1144041,\n", + " 1141397, 1144182, 1144184, 1137614, 1166711, 1144865, 1146194, 1146201,\n", + " 1137854, 1147153, 1136378, 1141365, 1141367, 1153068, 1141678, 1149090,\n", + " 1149093, 1149101, 1138292, 1165340, 1144284, 1144279, 1139510, 1139654,\n", + " 1143789, 1143779, 1147896, 1147901, 1140990, 1135047, 1141560, 1143690,\n", + " 1147050, 1147047, 1145873, 1155829, 1143543, 1152976, 1152988, 1135457,\n", + " 1139446, 1141925, 1146909, 1144242, 1140580, 1137149, 1150701, 1140690,\n", + " 1140697, 1140702, 1143637, 1134861, 1134849, 1143851, 1146024, 1154328,\n", + " 1142533, 1139990, 1151124, 1151133, 1143876, 1147543, 1147545, 1147540,\n", + " 1147150, 1147282, 1147290, 1142817, 1142816, 1142637, 1149608, 1143051,\n", + " 1136836, 1144957, 1142123, 1143345, 1144766, 1144753, 1144619, 1144080,\n", + " 1150294, 1150919, 1146523, 1143961, 1138027, 1143456, 1144291, 1146590,\n", + " 1155700, 1140364, 1137998, 1137994, 1143080, 1166410, 1144219, 1144222,\n", + " 1147999, 1144013, 1139252, 1139249, 1147120, 1147244, 1148704, 1150996,\n", + " 1142700, 1141836, 1152327, 1152328, 1147070, 1149722, 1145707, 1145009,\n", + " 1158226, 1148364, 1145751, 1146159, 1146178, 1151239, 1152530, 1150280,\n", + " 1150445, 1149791, 1144514, 1138044, 1145833, 1146887, 1152013, 1147794,\n", + " 1147796, 1152023, 1151041, 1145256, 1135512, 1148698, 1150127, 1147021,\n", + " 1147023, 1153956, 1141949, 1150736, 1137647, 1153574, 1147653, 1143560,\n", + " 1143567, 1148288, 1139096, 1139097, 1154420, 1158786, 1148180, 1151366,\n", + " 1152563, 1136247, 1139718, 1146676, 1152436, 1157968, 1157983, 1148720,\n", + " 1148726, 1148729, 1171341, 1146559, 1143893, 1143895, 1148204, 1171943,\n", + " 1154203, 1154206, 1154196, 1153124, 1153199, 1167960, 1155547, 1150932,\n", + " 1150356, 1148084, 1141017, 1147442, 1152581, 1151913, 1151907, 1154183,\n", + " 1148498, 1148505, 1146565, 1174860, 1155152, 1153447, 1150890, 1146265,\n", + " 1146969, 1153251, 1150219, 1146623, 1151691, 1152407, 1152100, 1151729,\n", + " 1156334, 1153030, 1137746, 1137756, 1146304, 1155146, 1149205, 1152826,\n", + " 1155337, 1154119, 1154123, 1152673, 1151617, 1145278, 1151441, 1136798,\n", + " 1144528, 1138989, 1138991, 1151311, 1152342, 1138281, 1136028, 1136031,\n", + " 1158704, 1158713, 1151187, 1140674, 1152928, 1156387, 1156399, 1150164,\n", + " 1149273, 1148033, 1148040, 1148042, 1152601, 1145656, 1149794, 1137048,\n", + " 1148628, 1148637, 1158530, 1158540, 1148369, 1137458, 1149947, 1135707,\n", + " 1135708, 1155376, 1142047, 1166145, 1154368, 1157229, 1158862, 1158857,\n", + " 1156505, 1152392, 1157064, 1157071, 1155422, 1145191, 1145187, 1151257,\n", + " 1157559, 1150465, 1150475, 1146862, 1135730, 1152183, 1156638, 1156631,\n", + " 1150824, 1156940, 1153410, 1147810, 1157790, 1139529, 1158311, 1155441,\n", + " 1144361, 1138567, 1154530, 1154528, 1156913, 1156919, 1150488, 1142755,\n", + " 1156207, 1138775, 1151379, 1155372, 1140186, 1155122, 1152527, 1157183,\n", + " 1135394, 1135399, 1156463, 1168230, 1154763, 1157898, 1157894, 1155675,\n", + " 1155628, 1155631, 1154555, 1158824, 1153713, 1148650, 1155646, 1153368,\n", + " 1153366, 1143263, 1146937, 1160221, 1154240, 1160106, 1154909, 1163130,\n", + " 1143189, 1150371, 1157439, 1157430, 1157426, 1144714, 1150984, 1150987,\n", + " 1159627, 1151031, 1156761, 1153776, 1153786, 1155026, 1137381, 1159116,\n", + " 1138258, 1145681, 1135601, 1145514, 1148149, 1150671, 1158665, 1158656,\n", + " 1157684, 1159258, 1140633, 1152209, 1167308, 1152496, 1155971, 1155975,\n", + " 1155983, 1154683, 1154592, 1154600, 1160164, 1153503, 1136896, 1185567,\n", + " 1158882, 1158886, 1140213, 1159164, 1151615, 1136480, 1136494, 1136491,\n", + " 1156665, 1153112, 1156495, 1156490, 1153808, 1153811, 1136640, 1163116,\n", + " 1134757, 1151145, 1146123, 1146126, 1165778, 1155871, 1158006, 1155528,\n", + " 1171195, 1157747, 1157751, 1161643, 1159052, 1151824, 1159146, 1158295,\n", + " 1153052, 1153045, 1167172, 1159731, 1155769, 1155770, 1178588, 1153842,\n", + " 1161313, 1156101, 1156107, 1138393, 1150046, 1150041, 1145948, 1153514,\n", + " 1158680, 1146870, 1138161, 1161774, 1184337, 1154590, 1166073, 1148783,\n", + " 1171518, 1169315, 1159556, 1158452, 1170415, 1140650, 1140643, 1141863,\n", + " 1148603, 1168163, 1155816, 1155821, 1141803, 1156184, 1168043, 1163742,\n", + " 1165887, 1152247, 1143735, 1155588, 1144320, 1138674, 1162011, 1144977,\n", + " 1144989, 1169257, 1161235, 1161240, 1144739, 1162580, 1145137, 1141471,\n", + " 1151650, 1147426, 1156739, 1166584, 1171040, 1144812, 1135567, 1142722,\n", + " 1156303, 1145738, 1148683, 1145228, 1160232, 1146040, 1166462, 1143037,\n", + " 1145447, 1165746, 1152626, 1152203, 1181049, 1143395, 1158722, 1167503,\n", + " 1167501, 1170738, 1147338, 1144690, 1145502, 1162893, 1149130, 1167817,\n", + " 1166653, 1169216, 1145326, 1155172, 1154213, 1150526, 1156119, 1144346,\n", + " 1144336, 1157534, 1138380, 1138375, 1154670, 1168437, 1135853, 1154893,\n", + " 1169165, 1169162, 1157331, 1141045, 1141043, 1180434, 1169359, 1149452,\n", + " 1138609, 1149688, 1158623, 1149847, 1172076, 1178729, 1147416, 1155502,\n", + " 1160540, 1152353, 1149402, 1148667, 1172139, 1148324, 1173307, 1154027,\n", + " 1153754, 1164968, 1159658, 1151211, 1151210, 1162627, 1157153, 1157373,\n", + " 1147711, 1151850, 1148131, 1157585, 1157593, 1169683, 1170483, 1163770,\n", + " 1162859, 1155739, 1168398, 1165132, 1173727, 1146755, 1144550, 1166682,\n", + " 1171823, 1174229, 1154157, 1154148, 1158187, 1149183, 1183495, 1186117,\n", + " 1175603, 1171297, 1159404, 1153803, 1153796, 1179918, 1170520, 1153141,\n", + " 1189174, 1169387, 1171407, 1184709, 1166554, 1161255, 1155250, 1155256,\n", + " 1155262, 1154718, 1157792, 1171623, 1157134, 1172148, 1187532, 1181922,\n", + " 1178945, 1158249, 1153898, 1153902, 1164563, 1178214, 1145626, 1172022,\n", + " 1178757, 1161068, 1149755, 1146252, 1165219, 1157761, 1161341, 1158513,\n", + " 1165066, 1165067, 1177089, 1177090, 1168273, 1167762, 1162441, 1169062,\n", + " 1168886, 1180480, 1162253, 1185422, 1188271, 1188637, 1165448, 1161819,\n", + " 1170348, 1147182, 1141507, 1189056, 1183008, 1168943, 1170417, 1156539,\n", + " 1139828, 1139831, 1170437, 1167135, 1154812, 1192076, 1182067, 1187314,\n", + " 1190585, 1194356, 1185616, 1156055, 1191482, 1169662, 1189270, 1191726,\n", + " 1173058, 1189630, 1188371, 1182955, 1173486, 1185976, 1168683, 1192884,\n", + " 1140993, 1140996, 1193155, 1193614, 1170881, 1192326, 1189970, 1153733,\n", + " 1189557, 1193774, 1186343, 1152113, 1191806, 1177196, 1153592, 1189019,\n", + " 1171201, 1163146, 1150406, 1150400, 1190685, 1156681, 1172423, 1178042,\n", + " 1166789, 1182564, 1185467, 1176824, 1155962, 1187517, 1174034, 1179769,\n", + " 1192231, 1189673, 1181710, 1157017, 1161940], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1140282, 1140285, 1138549, 1140785, 1140793, 1141756, 1141758,\n", + " 1138335, 1139462, 1136969, 1143600, 1139820, 1145373, 1146983, 1137937,\n", + " 1137947, 1138930, 1139145, 1143372, 1139241, 1139615, 1140783, 1150502,\n", + " 1149216, 1147473, 1147477, 1147482, 1141877, 1142881, 1144636, 1144625,\n", + " 1144632, 1146995, 1134697, 1135947, 1135950, 1148350, 1146472, 1138350,\n", + " 1147089, 1137220, 1150555, 1147203, 1147211, 1136676, 1150329, 1152427,\n", + " 1146375, 1140313, 1140537, 1138112, 1137254, 1137181, 1138356, 1138360,\n", + " 1138366, 1151520, 1135909, 1140020, 1140953, 1135367, 1135202, 1135903,\n", + " 1134969, 1141036, 1134794, 1138504, 1138508, 1137331, 1143069, 1137693,\n", + " 1136618, 1144395, 1137521, 1137534, 1157397, 1137441, 1136206, 1156149,\n", + " 1156159, 1148484, 1139152, 1139161, 1135583, 1138514, 1153094, 1137957,\n", + " 1138590, 1158136, 1135499, 1154132, 1156899, 1135522, 1138305, 1137287,\n", + " 1157703, 1157702, 1138434, 1138436, 1138440, 1138445, 1138447, 1140079,\n", + " 1138451, 1138461, 1137920, 1136598, 1158387, 1149328, 1135088, 1156605,\n", + " 1156606, 1147111, 1147112, 1142611, 1135618, 1138177, 1145843, 1148531,\n", + " 1136453, 1139667, 1139673, 1136094, 1134992, 1136551, 1139755, 1136734,\n", + " 1140197, 1158961, 1142911, 1141070, 1144410, 1153543, 1143621, 1140034,\n", + " 1139929, 1138648, 1138148, 1141963, 1140548, 1152044, 1139070, 1136059,\n", + " 1137728, 1147317, 1146208, 1134738, 1134750, 1141088, 1141095, 1141098,\n", + " 1144138, 1139889, 1145346, 1135290, 1135291, 1143711, 1139025, 1149979,\n", + " 1141695, 1135860, 1154472, 1136625, 1161173, 1142929, 1141224, 1139386,\n", + " 1136917, 1141785, 1139495, 1144650, 1134979, 1147850, 1149434, 1142049,\n", + " 1142050, 1141810, 1141820, 1141821, 1143153, 1140175, 1158749, 1138472,\n", + " 1137762, 1143574, 1148442, 1144596, 1148263, 1136864, 1145298, 1144041,\n", + " 1141397, 1144182, 1144184, 1137614, 1166711, 1144865, 1146194, 1146201,\n", + " 1137854, 1147153, 1136378, 1141365, 1141367, 1153068, 1141678, 1149090,\n", + " 1149093, 1149101, 1138292, 1165340, 1144284, 1144279, 1139510, 1139654,\n", + " 1143789, 1143779, 1147896, 1147901, 1140990, 1135047, 1141560, 1143690,\n", + " 1147050, 1147047, 1145873, 1155829, 1143543, 1152976, 1152988, 1135457,\n", + " 1139446, 1141925, 1146909, 1144242, 1140580, 1137149, 1150701, 1140690,\n", + " 1140697, 1140702, 1143637, 1134861, 1134849, 1143851, 1146024, 1154328,\n", + " 1142533, 1139990, 1151124, 1151133, 1143876, 1147543, 1147545, 1147540,\n", + " 1147150, 1147282, 1147290, 1142817, 1142816, 1142637, 1149608, 1143051,\n", + " 1136836, 1144957, 1142123, 1143345, 1144766, 1144753, 1144619, 1144080,\n", + " 1150294, 1150919, 1146523, 1143961, 1138027, 1143456, 1144291, 1146590,\n", + " 1155700, 1140364, 1137998, 1137994, 1143080, 1166410, 1144219, 1144222,\n", + " 1147999, 1144013, 1139252, 1139249, 1147120, 1147244, 1148704, 1150996,\n", + " 1142700, 1141836, 1152327, 1152328, 1147070, 1149722, 1145707, 1145009,\n", + " 1158226, 1148364, 1145751, 1146159, 1146178, 1151239, 1152530, 1150280,\n", + " 1150445, 1149791, 1144514, 1138044, 1145833, 1146887, 1152013, 1147794,\n", + " 1147796, 1152023, 1151041, 1145256, 1135512, 1148698, 1150127, 1147021,\n", + " 1147023, 1153956, 1141949, 1150736, 1137647, 1153574, 1147653, 1143560,\n", + " 1143567, 1148288, 1139096, 1139097, 1154420, 1158786, 1148180, 1151366,\n", + " 1152563, 1136247, 1139718, 1146676, 1152436, 1157968, 1157983, 1148720,\n", + " 1148726, 1148729, 1171341, 1146559, 1143893, 1143895, 1148204, 1171943,\n", + " 1154203, 1154206, 1154196, 1153124, 1153199, 1167960, 1155547, 1150932,\n", + " 1150356, 1148084, 1141017, 1147442, 1152581, 1151913, 1151907, 1154183,\n", + " 1148498, 1148505, 1146565, 1174860, 1155152, 1153447, 1150890, 1146265,\n", + " 1146969, 1153251, 1150219, 1146623, 1151691, 1152407, 1152100, 1151729,\n", + " 1156334, 1153030, 1137746, 1137756, 1146304, 1155146, 1149205, 1152826,\n", + " 1155337, 1154119, 1154123, 1152673, 1151617, 1145278, 1151441, 1136798,\n", + " 1144528, 1138989, 1138991, 1151311, 1152342, 1138281, 1136028, 1136031,\n", + " 1158704, 1158713, 1151187, 1140674, 1152928, 1156387, 1156399, 1150164,\n", + " 1149273, 1148033, 1148040, 1148042, 1152601, 1145656, 1149794, 1137048,\n", + " 1148628, 1148637, 1158530, 1158540, 1148369, 1137458, 1149947, 1135707,\n", + " 1135708, 1155376, 1142047, 1166145, 1154368, 1157229, 1158862, 1158857,\n", + " 1156505, 1152392, 1157064, 1157071, 1155422, 1145191, 1145187, 1151257,\n", + " 1157559, 1150465, 1150475, 1146862, 1135730, 1152183, 1156638, 1156631,\n", + " 1150824, 1156940, 1153410, 1147810, 1157790, 1139529, 1158311, 1155441,\n", + " 1144361, 1138567, 1154530, 1154528, 1156913, 1156919, 1150488, 1142755,\n", + " 1156207, 1138775, 1151379, 1155372, 1140186, 1155122, 1152527, 1157183,\n", + " 1135394, 1135399, 1156463, 1168230, 1154763, 1157898, 1157894, 1155675,\n", + " 1155628, 1155631, 1154555, 1158824, 1153713, 1148650, 1155646, 1153368,\n", + " 1153366, 1143263, 1146937, 1160221, 1154240, 1160106, 1154909, 1163130,\n", + " 1143189, 1150371, 1157439, 1157430, 1157426, 1144714, 1150984, 1150987,\n", + " 1159627, 1151031, 1156761, 1153776, 1153786, 1155026, 1137381, 1159116,\n", + " 1138258, 1145681, 1135601, 1145514, 1148149, 1150671, 1158665, 1158656,\n", + " 1157684, 1159258, 1140633, 1152209, 1167308, 1152496, 1155971, 1155975,\n", + " 1155983, 1154683, 1154592, 1154600, 1160164, 1153503, 1136896, 1185567,\n", + " 1158882, 1158886, 1140213, 1159164, 1151615, 1136480, 1136494, 1136491,\n", + " 1156665, 1153112, 1156495, 1156490, 1153808, 1153811, 1136640, 1163116,\n", + " 1134757, 1151145, 1146123, 1146126, 1165778, 1155871, 1158006, 1155528,\n", + " 1171195, 1157747, 1157751, 1161643, 1159052, 1151824, 1159146, 1158295,\n", + " 1153052, 1153045, 1167172, 1159731, 1155769, 1155770, 1178588, 1153842,\n", + " 1161313, 1156101, 1156107, 1138393, 1150046, 1150041, 1145948, 1153514,\n", + " 1158680, 1146870, 1138161, 1161774, 1184337, 1154590, 1166073, 1148783,\n", + " 1171518, 1169315, 1159556, 1158452, 1170415, 1140650, 1140643, 1141863,\n", + " 1148603, 1168163, 1155816, 1155821, 1141803, 1156184, 1168043, 1163742,\n", + " 1165887, 1152247, 1143735, 1155588, 1144320, 1138674, 1162011, 1144977,\n", + " 1144989, 1169257, 1161235, 1161240, 1144739, 1162580, 1145137, 1141471,\n", + " 1151650, 1147426, 1156739, 1166584, 1171040, 1144812, 1135567, 1142722,\n", + " 1156303, 1145738, 1148683, 1145228, 1160232, 1146040, 1166462, 1143037,\n", + " 1145447, 1165746, 1152626, 1152203, 1181049, 1143395, 1158722, 1167503,\n", + " 1167501, 1170738, 1147338, 1144690, 1145502, 1162893, 1149130, 1167817,\n", + " 1166653, 1169216, 1145326, 1155172, 1154213, 1150526, 1156119, 1144346,\n", + " 1144336, 1157534, 1138380, 1138375, 1154670, 1168437, 1135853, 1154893,\n", + " 1169165, 1169162, 1157331, 1141045, 1141043, 1180434, 1169359, 1149452,\n", + " 1138609, 1149688, 1158623, 1149847, 1172076, 1178729, 1147416, 1155502,\n", + " 1160540, 1152353, 1149402, 1148667, 1172139, 1148324, 1173307, 1154027,\n", + " 1153754, 1164968, 1159658, 1151211, 1151210, 1162627, 1157153, 1157373,\n", + " 1147711, 1151850, 1148131, 1157585, 1157593, 1169683, 1170483, 1163770,\n", + " 1162859, 1155739, 1168398, 1165132, 1173727, 1146755, 1144550, 1166682,\n", + " 1171823, 1174229, 1154157, 1154148, 1158187, 1149183, 1183495, 1186117,\n", + " 1175603, 1171297, 1159404, 1153803, 1153796, 1179918, 1170520, 1153141,\n", + " 1189174, 1169387, 1171407, 1184709, 1166554, 1161255, 1155250, 1155256,\n", + " 1155262, 1154718, 1157792, 1171623, 1157134, 1172148, 1187532, 1181922,\n", + " 1178945, 1158249, 1153898, 1153902, 1164563, 1178214, 1145626, 1172022,\n", + " 1178757, 1161068, 1149755, 1146252, 1165219, 1157761, 1161341, 1158513,\n", + " 1165066, 1165067, 1177089, 1177090, 1168273, 1167762, 1162441, 1169062,\n", + " 1168886, 1180480, 1162253, 1185422, 1188271, 1188637, 1165448, 1161819,\n", + " 1170348, 1147182, 1141507, 1189056, 1183008, 1168943, 1170417, 1156539,\n", + " 1139828, 1139831, 1170437, 1167135, 1154812, 1192076, 1182067, 1187314,\n", + " 1190585, 1194356, 1185616, 1156055, 1191482, 1169662, 1189270, 1191726,\n", + " 1173058, 1189630, 1188371, 1182955, 1173486, 1185976, 1168683, 1192884,\n", + " 1140993, 1140996, 1193155, 1193614, 1170881, 1192326, 1189970, 1153733,\n", + " 1189557, 1193774, 1186343, 1152113, 1191806, 1177196, 1153592, 1189019,\n", + " 1171201, 1163146, 1150406, 1150400, 1190685, 1156681, 1172423, 1178042,\n", + " 1166789, 1182564, 1185467, 1176824, 1155962, 1187517, 1174034, 1179769,\n", + " 1192231, 1189673, 1181710, 1157017, 1161940], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197841, 1199424, 1199436, 1197719, 1199282, 1199283, 1202255, 1201577,\n", + " 1201582, 1199141, 1201462, 1200644, 1197777, 1201016, 1201660, 1198694,\n", + " 1202804, 1194780, 1195496, 1195514, 1195263, 1201992, 1196031, 1198543,\n", + " 1201427, 1195888, 1195892, 1194759, 1196835, 1197793, 1198036, 1198039,\n", + " 1195982, 1198958, 1198163, 1198167, 1198161, 1195145, 1195148, 1195223,\n", + " 1195267, 1195270, 1197141, 1197140, 1196242, 1197367, 1197273, 1196109,\n", + " 1195850, 1195039, 1195541, 1197474, 1195918, 1196283, 1195353, 1198279,\n", + " 1200959, 1197285, 1194928, 1197583, 1199685, 1197676, 1197990, 1197994,\n", + " 1200866, 1198413, 1200748, 1199231, 1199676, 1194795, 1199842, 1200491,\n", + " 1197609, 1196727, 1195773, 1202618, 1200887, 1198428, 1198811, 1200450,\n", + " 1200503, 1198593, 1201079, 1201156, 1200991, 1201043, 1201358, 1200553,\n", + " 1200557, 1203071, 1199879, 1197040, 1196883, 1196779, 1202239, 1200899,\n", + " 1195876, 1201291, 1196761, 1202209, 1199929, 1198565, 1196963, 1196966,\n", + " 1202876, 1200784, 1196071, 1199606, 1195048, 1194698, 1195676, 1195664,\n", + " 1200439, 1195181, 1197060, 1197059, 1197816, 1197822, 1200285, 1202269,\n", + " 1195294, 1200585, 1203102, 1194730, 1199396, 1198147, 1198824, 1197735,\n", + " 1200014, 1200437, 1198819, 1199234, 1201001, 1200468, 1200974, 1200301,\n", + " 1197652, 1197335], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197841, 1199424, 1199436, 1197719, 1199282, 1199283, 1202255, 1201577,\n", + " 1201582, 1199141, 1201462, 1200644, 1197777, 1201016, 1201660, 1198694,\n", + " 1202804, 1194780, 1195496, 1195514, 1195263, 1201992, 1196031, 1198543,\n", + " 1201427, 1195888, 1195892, 1194759, 1196835, 1197793, 1198036, 1198039,\n", + " 1195982, 1198958, 1198163, 1198167, 1198161, 1195145, 1195148, 1195223,\n", + " 1195267, 1195270, 1197141, 1197140, 1196242, 1197367, 1197273, 1196109,\n", + " 1195850, 1195039, 1195541, 1197474, 1195918, 1196283, 1195353, 1198279,\n", + " 1200959, 1197285, 1194928, 1197583, 1199685, 1197676, 1197990, 1197994,\n", + " 1200866, 1198413, 1200748, 1199231, 1199676, 1194795, 1199842, 1200491,\n", + " 1197609, 1196727, 1195773, 1202618, 1200887, 1198428, 1198811, 1200450,\n", + " 1200503, 1198593, 1201079, 1201156, 1200991, 1201043, 1201358, 1200553,\n", + " 1200557, 1203071, 1199879, 1197040, 1196883, 1196779, 1202239, 1200899,\n", + " 1195876, 1201291, 1196761, 1202209, 1199929, 1198565, 1196963, 1196966,\n", + " 1202876, 1200784, 1196071, 1199606, 1195048, 1194698, 1195676, 1195664,\n", + " 1200439, 1195181, 1197060, 1197059, 1197816, 1197822, 1200285, 1202269,\n", + " 1195294, 1200585, 1203102, 1194730, 1199396, 1198147, 1198824, 1197735,\n", + " 1200014, 1200437, 1198819, 1199234, 1201001, 1200468, 1200974, 1200301,\n", + " 1197652, 1197335], device='cuda:0', dtype=torch.int32))\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.007913\n", + "sampling 0.007423\n", + "noi time: 0.002475\n", + "get_vertex_data call: 0.066711\n", + "noi group time: 0.003144\n", + "eoi_group_time: 0.013429\n", + "second half: 0.217729\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16823, 24187, 27122, ..., 1123985, 1103852, 1133333],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16823, 24187, 27122, ..., 1123985, 1103852, 1133333],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208553, 1215970, 1203800, ..., 1921018, 1931117, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208553, 1215970, 1203800, ..., 1921018, 1931117, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1141424, 1140282, 1140285, 1136337, 1135926, 1135933, 1135716,\n", + " 1135723, 1137791, 1140785, 1140799, 1141756, 1141758, 1136208, 1136223,\n", + " 1141251, 1136156, 1136969, 1136971, 1141443, 1146802, 1143600, 1143615,\n", + " 1149826, 1139811, 1146983, 1145992, 1137271, 1139143, 1143372, 1139241,\n", + " 1146647, 1139615, 1149216, 1142958, 1155686, 1143820, 1149646, 1147473,\n", + " 1147483, 1135992, 1149290, 1142881, 1144636, 1144632, 1146995, 1153012,\n", + " 1135950, 1148337, 1150193, 1136125, 1148546, 1153220, 1137220, 1135149,\n", + " 1150555, 1155019, 1147211, 1146371, 1134806, 1140304, 1140540, 1140542,\n", + " 1138112, 1153463, 1134735, 1140953, 1135360, 1135367, 1135371, 1135202,\n", + " 1137802, 1134969, 1141036, 1134791, 1134794, 1157450, 1138504, 1137329,\n", + " 1157103, 1137682, 1137693, 1136619, 1144395, 1137529, 1137534, 1135418,\n", + " 1157393, 1157397, 1137441, 1137025, 1135265, 1156149, 1139161, 1141705,\n", + " 1142593, 1142607, 1135246, 1148856, 1140970, 1156342, 1138514, 1137959,\n", + " 1138584, 1154132, 1139684, 1138436, 1138440, 1138445, 1138461, 1154790,\n", + " 1136594, 1149328, 1138846, 1138881, 1156603, 1147106, 1147112, 1147116,\n", + " 1147119, 1142611, 1160822, 1135359, 1138177, 1145852, 1135760, 1136454,\n", + " 1139667, 1139673, 1140261, 1134992, 1142788, 1152654, 1136730, 1136734,\n", + " 1136723, 1142905, 1144406, 1153544, 1140034, 1152696, 1139086, 1136076,\n", + " 1139933, 1137595, 1138148, 1146071, 1152042, 1152044, 1137728, 1147322,\n", + " 1134750, 1136992, 1138246, 1135549, 1136691, 1136697, 1141088, 1141096,\n", + " 1141098, 1144138, 1139898, 1156875, 1139111, 1136385, 1143769, 1154857,\n", + " 1143711, 1139025, 1139033, 1152704, 1141685, 1141695, 1135860, 1135861,\n", + " 1136625, 1161173, 1140467, 1141226, 1139386, 1141648, 1136917, 1139730,\n", + " 1143677, 1144237, 1140598, 1141786, 1138785, 1139495, 1144650, 1134991,\n", + " 1136862, 1138482, 1138490, 1142050, 1142053, 1142093, 1142080, 1138469,\n", + " 1149111, 1148871, 1137243, 1140110, 1137661, 1138423, 1143111, 1143113,\n", + " 1144445, 1144596, 1142453, 1136864, 1145298, 1144041, 1144182, 1150906,\n", + " 1150910, 1138539, 1140501, 1137854, 1147153, 1136378, 1141365, 1141367,\n", + " 1141375, 1141664, 1149101, 1139022, 1144277, 1139510, 1140093, 1145001,\n", + " 1140616, 1140976, 1140990, 1140980, 1146693, 1141560, 1147050, 1147047,\n", + " 1145873, 1152976, 1135457, 1135459, 1141925, 1141933, 1146898, 1146901,\n", + " 1144242, 1141846, 1137149, 1150692, 1150698, 1140696, 1143633, 1137571,\n", + " 1137570, 1134861, 1145983, 1143851, 1136277, 1146024, 1146025, 1146141,\n", + " 1154328, 1142533, 1139990, 1143293, 1143283, 1151124, 1147543, 1147545,\n", + " 1147540, 1147150, 1148763, 1147282, 1142816, 1142820, 1149162, 1147461,\n", + " 1142637, 1149366, 1139408, 1136160, 1138923, 1157720, 1136836, 1136843,\n", + " 1139329, 1139328, 1144778, 1141490, 1142153, 1143345, 1144767, 1144753,\n", + " 1144611, 1144619, 1145810, 1144083, 1139979, 1135876, 1144319, 1135813,\n", + " 1144376, 1146514, 1146526, 1143460, 1143457, 1143007, 1142000, 1143937,\n", + " 1147574, 1155700, 1149075, 1143799, 1147523, 1140364, 1149575, 1137990,\n", + " 1137994, 1143085, 1143080, 1144219, 1147996, 1147999, 1146949, 1144003,\n", + " 1144013, 1139252, 1147244, 1148704, 1148715, 1142690, 1141319, 1141327,\n", + " 1141825, 1141836, 1146745, 1147056, 1147025, 1143824, 1142858, 1139549,\n", + " 1158226, 1158228, 1149871, 1145240, 1145750, 1145751, 1142370, 1146159,\n", + " 1138626, 1148395, 1146178, 1151242, 1150280, 1150445, 1154998, 1154443,\n", + " 1149791, 1144514, 1144526, 1141349, 1141358, 1138044, 1151994, 1147794,\n", + " 1147796, 1151487, 1151473, 1152026, 1154271, 1139919, 1142286, 1140566,\n", + " 1149530, 1147019, 1147021, 1158950, 1141949, 1148450, 1147653, 1143560,\n", + " 1149412, 1148300, 1152073, 1137724, 1148623, 1154420, 1154424, 1151363,\n", + " 1151361, 1152561, 1146678, 1146682, 1146686, 1141181, 1152441, 1148720,\n", + " 1148731, 1148729, 1148204, 1171943, 1153124, 1153125, 1153188, 1159828,\n", + " 1155545, 1150932, 1150935, 1152878, 1143091, 1144861, 1150352, 1150356,\n", + " 1155089, 1147442, 1151816, 1141420, 1136002, 1151352, 1155067, 1146962,\n", + " 1146975, 1156402, 1147390, 1146623, 1146493, 1144476, 1152409, 1168005,\n", + " 1152098, 1152109, 1153038, 1145540, 1137746, 1146307, 1152622, 1140521,\n", + " 1136401, 1149203, 1157107, 1155337, 1154120, 1154123, 1154124, 1152673,\n", + " 1139582, 1151627, 1151617, 1145269, 1136131, 1136134, 1136798, 1152944,\n", + " 1145952, 1152903, 1151311, 1152341, 1146816, 1156826, 1156816, 1153301,\n", + " 1153302, 1138272, 1138281, 1157139, 1157147, 1156001, 1156005, 1136028,\n", + " 1136031, 1158704, 1151188, 1151187, 1152928, 1151064, 1156422, 1137396,\n", + " 1148040, 1155202, 1152597, 1160866, 1137048, 1148626, 1148628, 1158530,\n", + " 1158540, 1137458, 1149940, 1149944, 1142041, 1154381, 1150960, 1157547,\n", + " 1158860, 1157064, 1157069, 1157067, 1155412, 1152838, 1152833, 1145191,\n", + " 1145187, 1137809, 1151260, 1150465, 1135222, 1135231, 1160262, 1142221,\n", + " 1135729, 1135730, 1152191, 1156633, 1151788, 1151777, 1157918, 1153415,\n", + " 1139525, 1158306, 1140421, 1155441, 1155452, 1161731, 1150130, 1150132,\n", + " 1154529, 1153994, 1145600, 1142755, 1156271, 1157637, 1151383, 1151379,\n", + " 1137910, 1158639, 1155374, 1156649, 1155122, 1152527, 1157172, 1149321,\n", + " 1149320, 1155746, 1151431, 1135396, 1135398, 1146920, 1156463, 1168230,\n", + " 1155667, 1155628, 1155630, 1156563, 1154547, 1154550, 1158824, 1158829,\n", + " 1158325, 1156993, 1156996, 1148836, 1148646, 1155646, 1153366, 1161231,\n", + " 1146943, 1146935, 1157492, 1154240, 1151327, 1143185, 1153325, 1155613,\n", + " 1150987, 1157934, 1140751, 1157283, 1137167, 1158126, 1153776, 1153786,\n", + " 1149907, 1137381, 1137387, 1159116, 1138269, 1140919, 1154001, 1134674,\n", + " 1135601, 1145507, 1148147, 1150671, 1159585, 1155853, 1155848, 1158665,\n", + " 1138215, 1157684, 1149145, 1149151, 1155717, 1152509, 1140380, 1140381,\n", + " 1155872, 1157735, 1159132, 1159124, 1157028, 1144843, 1155975, 1142073,\n", + " 1183177, 1156812, 1155950, 1160163, 1136896, 1158753, 1158764, 1159156,\n", + " 1158815, 1158447, 1151615, 1136480, 1136494, 1156665, 1147585, 1152136,\n", + " 1153820, 1134757, 1180561, 1161161, 1146126, 1165786, 1188205, 1138099,\n", + " 1138101, 1138108, 1155871, 1144582, 1158260, 1150011, 1155521, 1155535,\n", + " 1142487, 1164276, 1142666, 1162417, 1157758, 1159042, 1165825, 1158295,\n", + " 1158300, 1157946, 1153052, 1155769, 1161930, 1161935, 1156107, 1156109,\n", + " 1138393, 1165244, 1150046, 1159475, 1149063, 1145948, 1153519, 1161652,\n", + " 1157600, 1138161, 1164006, 1165663, 1139286, 1157236, 1157351, 1146063,\n", + " 1171249, 1148600, 1148603, 1148607, 1172725, 1143139, 1155816, 1164505,\n", + " 1158653, 1156184, 1159025, 1159029, 1159032, 1159038, 1165877, 1165585,\n", + " 1158905, 1155588, 1164623, 1162550, 1162552, 1156589, 1151227, 1168426,\n", + " 1147830, 1147835, 1146500, 1146509, 1164580, 1169257, 1144737, 1141471,\n", + " 1161562, 1147427, 1156737, 1156739, 1163260, 1168748, 1135567, 1165718,\n", + " 1142722, 1156293, 1156300, 1156303, 1148683, 1144973, 1146446, 1191923,\n", + " 1169233, 1147693, 1165746, 1147355, 1152624, 1148124, 1139359, 1139345,\n", + " 1145900, 1152200, 1181049, 1169741, 1167503, 1154076, 1162892, 1154919,\n", + " 1169602, 1167817, 1144681, 1169222, 1155172, 1154213, 1165011, 1150515,\n", + " 1156119, 1145529, 1144346, 1144336, 1157534, 1147746, 1154670, 1157331,\n", + " 1141045, 1141048, 1169359, 1149452, 1149446, 1147502, 1138609, 1158611,\n", + " 1158623, 1158063, 1158062, 1173047, 1174641, 1157379, 1159846, 1155494,\n", + " 1172488, 1170462, 1152353, 1152360, 1169186, 1143177, 1149402, 1149394,\n", + " 1172838, 1148324, 1175993, 1173307, 1161143, 1169144, 1169149, 1154026,\n", + " 1154027, 1154023, 1152150, 1172787, 1159655, 1167857, 1169583, 1178419,\n", + " 1157153, 1157373, 1147711, 1169687, 1179335, 1162106, 1181009, 1168822,\n", + " 1167902, 1143244, 1180475, 1172932, 1172939, 1172605, 1163984, 1153428,\n", + " 1169072, 1171823, 1160307, 1154148, 1149169, 1149173, 1180600, 1143278,\n", + " 1164956, 1168481, 1170569, 1178344, 1171297, 1174079, 1164826, 1189170,\n", + " 1180649, 1151519, 1182651, 1179807, 1158030, 1155262, 1172010, 1154707,\n", + " 1154718, 1174623, 1151488, 1171623, 1163568, 1171380, 1182011, 1158249,\n", + " 1158253, 1153898, 1153899, 1154497, 1134655, 1178910, 1145626, 1156443,\n", + " 1172024, 1157483, 1179442, 1161911, 1184997, 1149755, 1146243, 1166959,\n", + " 1174409, 1179783, 1145092, 1158524, 1164106, 1158940, 1163863, 1182434,\n", + " 1158370, 1158380, 1158379, 1155899, 1182786, 1168282, 1169064, 1160078,\n", + " 1164228, 1182337, 1166516, 1164264, 1154957, 1159410, 1147179, 1147182,\n", + " 1172609, 1156162, 1181300, 1184048, 1156528, 1156539, 1139831, 1139837,\n", + " 1150265, 1154812, 1149668, 1151284, 1163848, 1156055, 1173019, 1146392,\n", + " 1146394, 1146395, 1188984, 1149539, 1175656, 1172469, 1191962, 1148787,\n", + " 1148798, 1177473, 1169964, 1189546, 1166328, 1188781, 1182060, 1192458,\n", + " 1174007, 1178065, 1194172, 1193873, 1193774, 1152117, 1185901, 1169703,\n", + " 1169707, 1190741, 1166841, 1153595, 1186424, 1177365, 1150406, 1161863,\n", + " 1190686, 1180992, 1172423, 1158064, 1158070, 1180532, 1179750, 1155962,\n", + " 1191854, 1194244, 1191422, 1192792, 1182178, 1176975, 1190336, 1193307,\n", + " 1190992, 1184940, 1157017], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1141424, 1140282, 1140285, 1136337, 1135926, 1135933, 1135716,\n", + " 1135723, 1137791, 1140785, 1140799, 1141756, 1141758, 1136208, 1136223,\n", + " 1141251, 1136156, 1136969, 1136971, 1141443, 1146802, 1143600, 1143615,\n", + " 1149826, 1139811, 1146983, 1145992, 1137271, 1139143, 1143372, 1139241,\n", + " 1146647, 1139615, 1149216, 1142958, 1155686, 1143820, 1149646, 1147473,\n", + " 1147483, 1135992, 1149290, 1142881, 1144636, 1144632, 1146995, 1153012,\n", + " 1135950, 1148337, 1150193, 1136125, 1148546, 1153220, 1137220, 1135149,\n", + " 1150555, 1155019, 1147211, 1146371, 1134806, 1140304, 1140540, 1140542,\n", + " 1138112, 1153463, 1134735, 1140953, 1135360, 1135367, 1135371, 1135202,\n", + " 1137802, 1134969, 1141036, 1134791, 1134794, 1157450, 1138504, 1137329,\n", + " 1157103, 1137682, 1137693, 1136619, 1144395, 1137529, 1137534, 1135418,\n", + " 1157393, 1157397, 1137441, 1137025, 1135265, 1156149, 1139161, 1141705,\n", + " 1142593, 1142607, 1135246, 1148856, 1140970, 1156342, 1138514, 1137959,\n", + " 1138584, 1154132, 1139684, 1138436, 1138440, 1138445, 1138461, 1154790,\n", + " 1136594, 1149328, 1138846, 1138881, 1156603, 1147106, 1147112, 1147116,\n", + " 1147119, 1142611, 1160822, 1135359, 1138177, 1145852, 1135760, 1136454,\n", + " 1139667, 1139673, 1140261, 1134992, 1142788, 1152654, 1136730, 1136734,\n", + " 1136723, 1142905, 1144406, 1153544, 1140034, 1152696, 1139086, 1136076,\n", + " 1139933, 1137595, 1138148, 1146071, 1152042, 1152044, 1137728, 1147322,\n", + " 1134750, 1136992, 1138246, 1135549, 1136691, 1136697, 1141088, 1141096,\n", + " 1141098, 1144138, 1139898, 1156875, 1139111, 1136385, 1143769, 1154857,\n", + " 1143711, 1139025, 1139033, 1152704, 1141685, 1141695, 1135860, 1135861,\n", + " 1136625, 1161173, 1140467, 1141226, 1139386, 1141648, 1136917, 1139730,\n", + " 1143677, 1144237, 1140598, 1141786, 1138785, 1139495, 1144650, 1134991,\n", + " 1136862, 1138482, 1138490, 1142050, 1142053, 1142093, 1142080, 1138469,\n", + " 1149111, 1148871, 1137243, 1140110, 1137661, 1138423, 1143111, 1143113,\n", + " 1144445, 1144596, 1142453, 1136864, 1145298, 1144041, 1144182, 1150906,\n", + " 1150910, 1138539, 1140501, 1137854, 1147153, 1136378, 1141365, 1141367,\n", + " 1141375, 1141664, 1149101, 1139022, 1144277, 1139510, 1140093, 1145001,\n", + " 1140616, 1140976, 1140990, 1140980, 1146693, 1141560, 1147050, 1147047,\n", + " 1145873, 1152976, 1135457, 1135459, 1141925, 1141933, 1146898, 1146901,\n", + " 1144242, 1141846, 1137149, 1150692, 1150698, 1140696, 1143633, 1137571,\n", + " 1137570, 1134861, 1145983, 1143851, 1136277, 1146024, 1146025, 1146141,\n", + " 1154328, 1142533, 1139990, 1143293, 1143283, 1151124, 1147543, 1147545,\n", + " 1147540, 1147150, 1148763, 1147282, 1142816, 1142820, 1149162, 1147461,\n", + " 1142637, 1149366, 1139408, 1136160, 1138923, 1157720, 1136836, 1136843,\n", + " 1139329, 1139328, 1144778, 1141490, 1142153, 1143345, 1144767, 1144753,\n", + " 1144611, 1144619, 1145810, 1144083, 1139979, 1135876, 1144319, 1135813,\n", + " 1144376, 1146514, 1146526, 1143460, 1143457, 1143007, 1142000, 1143937,\n", + " 1147574, 1155700, 1149075, 1143799, 1147523, 1140364, 1149575, 1137990,\n", + " 1137994, 1143085, 1143080, 1144219, 1147996, 1147999, 1146949, 1144003,\n", + " 1144013, 1139252, 1147244, 1148704, 1148715, 1142690, 1141319, 1141327,\n", + " 1141825, 1141836, 1146745, 1147056, 1147025, 1143824, 1142858, 1139549,\n", + " 1158226, 1158228, 1149871, 1145240, 1145750, 1145751, 1142370, 1146159,\n", + " 1138626, 1148395, 1146178, 1151242, 1150280, 1150445, 1154998, 1154443,\n", + " 1149791, 1144514, 1144526, 1141349, 1141358, 1138044, 1151994, 1147794,\n", + " 1147796, 1151487, 1151473, 1152026, 1154271, 1139919, 1142286, 1140566,\n", + " 1149530, 1147019, 1147021, 1158950, 1141949, 1148450, 1147653, 1143560,\n", + " 1149412, 1148300, 1152073, 1137724, 1148623, 1154420, 1154424, 1151363,\n", + " 1151361, 1152561, 1146678, 1146682, 1146686, 1141181, 1152441, 1148720,\n", + " 1148731, 1148729, 1148204, 1171943, 1153124, 1153125, 1153188, 1159828,\n", + " 1155545, 1150932, 1150935, 1152878, 1143091, 1144861, 1150352, 1150356,\n", + " 1155089, 1147442, 1151816, 1141420, 1136002, 1151352, 1155067, 1146962,\n", + " 1146975, 1156402, 1147390, 1146623, 1146493, 1144476, 1152409, 1168005,\n", + " 1152098, 1152109, 1153038, 1145540, 1137746, 1146307, 1152622, 1140521,\n", + " 1136401, 1149203, 1157107, 1155337, 1154120, 1154123, 1154124, 1152673,\n", + " 1139582, 1151627, 1151617, 1145269, 1136131, 1136134, 1136798, 1152944,\n", + " 1145952, 1152903, 1151311, 1152341, 1146816, 1156826, 1156816, 1153301,\n", + " 1153302, 1138272, 1138281, 1157139, 1157147, 1156001, 1156005, 1136028,\n", + " 1136031, 1158704, 1151188, 1151187, 1152928, 1151064, 1156422, 1137396,\n", + " 1148040, 1155202, 1152597, 1160866, 1137048, 1148626, 1148628, 1158530,\n", + " 1158540, 1137458, 1149940, 1149944, 1142041, 1154381, 1150960, 1157547,\n", + " 1158860, 1157064, 1157069, 1157067, 1155412, 1152838, 1152833, 1145191,\n", + " 1145187, 1137809, 1151260, 1150465, 1135222, 1135231, 1160262, 1142221,\n", + " 1135729, 1135730, 1152191, 1156633, 1151788, 1151777, 1157918, 1153415,\n", + " 1139525, 1158306, 1140421, 1155441, 1155452, 1161731, 1150130, 1150132,\n", + " 1154529, 1153994, 1145600, 1142755, 1156271, 1157637, 1151383, 1151379,\n", + " 1137910, 1158639, 1155374, 1156649, 1155122, 1152527, 1157172, 1149321,\n", + " 1149320, 1155746, 1151431, 1135396, 1135398, 1146920, 1156463, 1168230,\n", + " 1155667, 1155628, 1155630, 1156563, 1154547, 1154550, 1158824, 1158829,\n", + " 1158325, 1156993, 1156996, 1148836, 1148646, 1155646, 1153366, 1161231,\n", + " 1146943, 1146935, 1157492, 1154240, 1151327, 1143185, 1153325, 1155613,\n", + " 1150987, 1157934, 1140751, 1157283, 1137167, 1158126, 1153776, 1153786,\n", + " 1149907, 1137381, 1137387, 1159116, 1138269, 1140919, 1154001, 1134674,\n", + " 1135601, 1145507, 1148147, 1150671, 1159585, 1155853, 1155848, 1158665,\n", + " 1138215, 1157684, 1149145, 1149151, 1155717, 1152509, 1140380, 1140381,\n", + " 1155872, 1157735, 1159132, 1159124, 1157028, 1144843, 1155975, 1142073,\n", + " 1183177, 1156812, 1155950, 1160163, 1136896, 1158753, 1158764, 1159156,\n", + " 1158815, 1158447, 1151615, 1136480, 1136494, 1156665, 1147585, 1152136,\n", + " 1153820, 1134757, 1180561, 1161161, 1146126, 1165786, 1188205, 1138099,\n", + " 1138101, 1138108, 1155871, 1144582, 1158260, 1150011, 1155521, 1155535,\n", + " 1142487, 1164276, 1142666, 1162417, 1157758, 1159042, 1165825, 1158295,\n", + " 1158300, 1157946, 1153052, 1155769, 1161930, 1161935, 1156107, 1156109,\n", + " 1138393, 1165244, 1150046, 1159475, 1149063, 1145948, 1153519, 1161652,\n", + " 1157600, 1138161, 1164006, 1165663, 1139286, 1157236, 1157351, 1146063,\n", + " 1171249, 1148600, 1148603, 1148607, 1172725, 1143139, 1155816, 1164505,\n", + " 1158653, 1156184, 1159025, 1159029, 1159032, 1159038, 1165877, 1165585,\n", + " 1158905, 1155588, 1164623, 1162550, 1162552, 1156589, 1151227, 1168426,\n", + " 1147830, 1147835, 1146500, 1146509, 1164580, 1169257, 1144737, 1141471,\n", + " 1161562, 1147427, 1156737, 1156739, 1163260, 1168748, 1135567, 1165718,\n", + " 1142722, 1156293, 1156300, 1156303, 1148683, 1144973, 1146446, 1191923,\n", + " 1169233, 1147693, 1165746, 1147355, 1152624, 1148124, 1139359, 1139345,\n", + " 1145900, 1152200, 1181049, 1169741, 1167503, 1154076, 1162892, 1154919,\n", + " 1169602, 1167817, 1144681, 1169222, 1155172, 1154213, 1165011, 1150515,\n", + " 1156119, 1145529, 1144346, 1144336, 1157534, 1147746, 1154670, 1157331,\n", + " 1141045, 1141048, 1169359, 1149452, 1149446, 1147502, 1138609, 1158611,\n", + " 1158623, 1158063, 1158062, 1173047, 1174641, 1157379, 1159846, 1155494,\n", + " 1172488, 1170462, 1152353, 1152360, 1169186, 1143177, 1149402, 1149394,\n", + " 1172838, 1148324, 1175993, 1173307, 1161143, 1169144, 1169149, 1154026,\n", + " 1154027, 1154023, 1152150, 1172787, 1159655, 1167857, 1169583, 1178419,\n", + " 1157153, 1157373, 1147711, 1169687, 1179335, 1162106, 1181009, 1168822,\n", + " 1167902, 1143244, 1180475, 1172932, 1172939, 1172605, 1163984, 1153428,\n", + " 1169072, 1171823, 1160307, 1154148, 1149169, 1149173, 1180600, 1143278,\n", + " 1164956, 1168481, 1170569, 1178344, 1171297, 1174079, 1164826, 1189170,\n", + " 1180649, 1151519, 1182651, 1179807, 1158030, 1155262, 1172010, 1154707,\n", + " 1154718, 1174623, 1151488, 1171623, 1163568, 1171380, 1182011, 1158249,\n", + " 1158253, 1153898, 1153899, 1154497, 1134655, 1178910, 1145626, 1156443,\n", + " 1172024, 1157483, 1179442, 1161911, 1184997, 1149755, 1146243, 1166959,\n", + " 1174409, 1179783, 1145092, 1158524, 1164106, 1158940, 1163863, 1182434,\n", + " 1158370, 1158380, 1158379, 1155899, 1182786, 1168282, 1169064, 1160078,\n", + " 1164228, 1182337, 1166516, 1164264, 1154957, 1159410, 1147179, 1147182,\n", + " 1172609, 1156162, 1181300, 1184048, 1156528, 1156539, 1139831, 1139837,\n", + " 1150265, 1154812, 1149668, 1151284, 1163848, 1156055, 1173019, 1146392,\n", + " 1146394, 1146395, 1188984, 1149539, 1175656, 1172469, 1191962, 1148787,\n", + " 1148798, 1177473, 1169964, 1189546, 1166328, 1188781, 1182060, 1192458,\n", + " 1174007, 1178065, 1194172, 1193873, 1193774, 1152117, 1185901, 1169703,\n", + " 1169707, 1190741, 1166841, 1153595, 1186424, 1177365, 1150406, 1161863,\n", + " 1190686, 1180992, 1172423, 1158064, 1158070, 1180532, 1179750, 1155962,\n", + " 1191854, 1194244, 1191422, 1192792, 1182178, 1176975, 1190336, 1193307,\n", + " 1190992, 1184940, 1157017], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1198769, 1198782, 1197719, 1200096, 1200099, 1195860, 1202255,\n", + " 1198844, 1201582, 1197777, 1203044, 1198633, 1198697, 1196956, 1202804,\n", + " 1198557, 1196631, 1197434, 1195514, 1196534, 1201935, 1201992, 1196030,\n", + " 1198530, 1198543, 1201427, 1194952, 1194882, 1195888, 1195740, 1196359,\n", + " 1196977, 1196695, 1196526, 1194759, 1197830, 1197831, 1195325, 1196165,\n", + " 1198958, 1198164, 1196704, 1196707, 1195216, 1195265, 1197141, 1200765,\n", + " 1196254, 1195841, 1195850, 1195659, 1199315, 1197474, 1200032, 1196393,\n", + " 1196283, 1195351, 1198279, 1200949, 1197291, 1202747, 1196859, 1194928,\n", + " 1201641, 1197990, 1200869, 1199231, 1201904, 1194786, 1201511, 1196508,\n", + " 1200663, 1199021, 1196727, 1202618, 1200887, 1198416, 1198428, 1200155,\n", + " 1200593, 1198811, 1201827, 1202417, 1200461, 1198593, 1199445, 1198791,\n", + " 1202630, 1200913, 1198481, 1201041, 1200548, 1200555, 1200557, 1200429,\n", + " 1200861, 1196883, 1200690, 1200194, 1200899, 1195885, 1201291, 1195607,\n", + " 1195611, 1195610, 1199929, 1201796, 1200784, 1200785, 1198525, 1195664,\n", + " 1200471, 1198055, 1200445, 1198929, 1200684, 1195181, 1197816, 1197523,\n", + " 1199456, 1201138, 1201139, 1194720, 1198823, 1197735, 1199786, 1198849,\n", + " 1200468, 1195070, 1195066, 1201886, 1197335, 1201877, 1201765],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1198769, 1198782, 1197719, 1200096, 1200099, 1195860, 1202255,\n", + " 1198844, 1201582, 1197777, 1203044, 1198633, 1198697, 1196956, 1202804,\n", + " 1198557, 1196631, 1197434, 1195514, 1196534, 1201935, 1201992, 1196030,\n", + " 1198530, 1198543, 1201427, 1194952, 1194882, 1195888, 1195740, 1196359,\n", + " 1196977, 1196695, 1196526, 1194759, 1197830, 1197831, 1195325, 1196165,\n", + " 1198958, 1198164, 1196704, 1196707, 1195216, 1195265, 1197141, 1200765,\n", + " 1196254, 1195841, 1195850, 1195659, 1199315, 1197474, 1200032, 1196393,\n", + " 1196283, 1195351, 1198279, 1200949, 1197291, 1202747, 1196859, 1194928,\n", + " 1201641, 1197990, 1200869, 1199231, 1201904, 1194786, 1201511, 1196508,\n", + " 1200663, 1199021, 1196727, 1202618, 1200887, 1198416, 1198428, 1200155,\n", + " 1200593, 1198811, 1201827, 1202417, 1200461, 1198593, 1199445, 1198791,\n", + " 1202630, 1200913, 1198481, 1201041, 1200548, 1200555, 1200557, 1200429,\n", + " 1200861, 1196883, 1200690, 1200194, 1200899, 1195885, 1201291, 1195607,\n", + " 1195611, 1195610, 1199929, 1201796, 1200784, 1200785, 1198525, 1195664,\n", + " 1200471, 1198055, 1200445, 1198929, 1200684, 1195181, 1197816, 1197523,\n", + " 1199456, 1201138, 1201139, 1194720, 1198823, 1197735, 1199786, 1198849,\n", + " 1200468, 1195070, 1195066, 1201886, 1197335, 1201877, 1201765],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.9575e-01, -3.9008e-04, 9.0268e-01, ..., 1.3050e-01,\n", + " -2.0186e-03, -5.7577e-03],\n", + " [ 2.0327e-01, -1.6202e-04, 8.8554e-01, ..., 1.1994e-01,\n", + " -1.9476e-03, -5.8869e-03],\n", + " [ 1.3533e-01, -6.2244e-04, 7.5504e-01, ..., 1.3363e-01,\n", + " -1.8451e-03, -4.8839e-03],\n", + " ...,\n", + " [ 1.9575e-01, -3.9008e-04, 9.0268e-01, ..., 1.3050e-01,\n", + " -2.0186e-03, -5.7577e-03],\n", + " [ 1.1073e-01, -9.9944e-05, 5.9402e-01, ..., 1.3460e-01,\n", + " -2.0347e-03, -3.9225e-03],\n", + " [ 1.1672e-01, -2.5286e-04, 7.0464e-01, ..., 1.3050e-01,\n", + " -1.8829e-03, -4.3308e-03]], device='cuda:0'), 'paper': tensor([[ 4.7623e-01, 1.5859e+00, 2.4604e+00, ..., -6.2772e-03,\n", + " -2.2197e-02, -3.4292e-03],\n", + " [ 1.4526e+00, 7.2905e-01, 1.3455e+00, ..., -9.3880e-03,\n", + " -2.4259e-02, 8.7922e-01],\n", + " [ 1.6827e+00, 1.0869e+00, 3.4610e+00, ..., 1.6884e+00,\n", + " -5.3592e-02, 3.3845e+00],\n", + " ...,\n", + " [ 1.7712e-01, 1.5303e-01, 3.2877e+00, ..., -8.3566e-03,\n", + " -2.9259e-02, -1.3395e-02],\n", + " [ 1.0982e+00, 1.6117e+00, 2.6427e+00, ..., -9.0847e-03,\n", + " -2.8282e-02, 5.0302e-02],\n", + " [ 1.7233e+00, 1.4404e+00, 3.2820e+00, ..., 2.4133e+00,\n", + " -5.6331e-02, 3.9020e+00]], device='cuda:0'), 'author': tensor([[-2.7399e-03, 3.2331e-01, 2.2014e-01, ..., 1.5465e+00,\n", + " -2.8473e-03, -2.4783e-03],\n", + " [-1.5510e-03, 2.9349e-01, 2.6279e-01, ..., 1.6829e+00,\n", + " -3.8587e-04, -8.8221e-05],\n", + " [-1.2845e-03, 3.0435e-01, 1.2721e-01, ..., 1.6502e+00,\n", + " 1.9725e-01, 6.2516e-02],\n", + " ...,\n", + " [-1.6965e-03, 3.5365e-01, 1.6086e-01, ..., 1.6362e+00,\n", + " -1.7183e-04, -2.5398e-04],\n", + " [-1.7701e-03, 2.7926e-01, 2.5626e-01, ..., 1.6602e+00,\n", + " -1.2530e-03, -7.2262e-04],\n", + " [-6.2942e-04, 2.9830e-02, 1.2906e-01, ..., 1.6955e-01,\n", + " -1.0748e-04, -6.7757e-04]], device='cuda:0'), 'field_of_study': tensor([[ 5.4439e-02, 7.9439e-01, 5.0535e-01, ..., -1.0312e-02,\n", + " 3.1152e-01, 4.5751e-01],\n", + " [ 6.2965e-02, 6.9989e-01, 4.0292e-01, ..., -9.5817e-03,\n", + " 3.7398e-01, 4.1545e-01],\n", + " [ 8.9203e-02, 6.4959e-01, 3.2999e-01, ..., -6.2474e-03,\n", + " 1.7432e-01, 3.0208e-01],\n", + " ...,\n", + " [-5.9228e-05, 7.2953e-01, 4.0836e-01, ..., -9.4065e-03,\n", + " 2.3167e-01, 5.1931e-01],\n", + " [-5.9228e-05, 7.2953e-01, 4.0836e-01, ..., -9.4065e-03,\n", + " 2.3167e-01, 5.1931e-01],\n", + " [ 1.4605e-01, 7.2323e-01, 4.7318e-01, ..., -1.0489e-02,\n", + " 3.9277e-01, 4.3446e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 11, 223, 55, 189, 189, 21, 21, 21, 21, 21, 55, 218,\n", + " 218, 218, 355, 245, 378, 544, 314, 314, 501, 663, 500, 519,\n", + " 1087, 1174, 817, 1093, 1179, 982, 1273, 1326, 1688, 1399, 1417, 1411,\n", + " 1408, 1666, 1812, 1732, 1732, 1773, 1669, 1667, 1757, 1617, 1773, 1826,\n", + " 1826, 1938, 1968, 1968, 1968, 1968, 2250, 2172, 2172, 2236, 2182, 2182,\n", + " 2256, 2216, 2262, 2446, 2370, 2369, 2369, 2405, 2461, 2461, 2391, 2305,\n", + " 2595, 2595, 2595, 2591, 2555, 2455, 2455, 2455, 2571, 2673, 2562, 2716,\n", + " 2869, 2863, 2890, 2919, 2715, 3054, 2872, 2872, 3191, 3152, 3063, 3112,\n", + " 3239, 3164, 3164, 3111, 3331, 3399, 3356, 3356, 3341, 3775, 3775, 3775,\n", + " 3394, 3394, 3459, 3420, 3680, 3680, 3590, 3779, 3603, 3672, 3779, 3789,\n", + " 3429, 3703, 3703, 3806, 3651, 3908, 3879, 3899, 3958, 4022, 3990, 4034,\n", + " 4045, 4018, 4017, 4028, 4076, 4118, 4095, 4068, 4087, 4110, 4123, 4265,\n", + " 4339, 4563, 4384, 4384, 4415, 4540, 5072, 5024, 5046, 5157, 5157, 5020,\n", + " 5033, 5033, 5318, 5076, 5138, 5483, 5551, 5730, 5822, 5822, 5389, 5340,\n", + " 5481, 5481, 5481, 5845, 5780, 5780, 5966, 5843, 5843, 5900, 5900, 6147,\n", + " 6147, 5779, 5779, 5985, 5841, 5841, 5985, 5985, 5985, 6088, 6074, 6074,\n", + " 6074, 5945],\n", + " [ 88, 119, 11, 18, 36, 46, 8, 89, 73, 37, 53, 39,\n", + " 131, 61, 35, 75, 28, 133, 8, 67, 55, 107, 34, 96,\n", + " 35, 59, 83, 54, 27, 35, 108, 30, 72, 96, 2, 91,\n", + " 74, 91, 6, 34, 81, 16, 48, 60, 91, 129, 98, 65,\n", + " 93, 90, 114, 43, 64, 92, 28, 132, 53, 122, 15, 31,\n", + " 24, 77, 134, 72, 29, 26, 84, 121, 3, 4, 119, 48,\n", + " 118, 102, 22, 91, 134, 38, 22, 18, 66, 107, 56, 21,\n", + " 71, 68, 47, 127, 97, 71, 75, 19, 28, 134, 108, 113,\n", + " 57, 123, 124, 110, 112, 70, 79, 44, 42, 5, 58, 45,\n", + " 62, 13, 0, 87, 117, 80, 3, 118, 74, 38, 38, 22,\n", + " 14, 117, 87, 114, 13, 134, 83, 125, 52, 124, 94, 19,\n", + " 16, 16, 74, 50, 0, 130, 69, 32, 124, 99, 116, 111,\n", + " 110, 100, 17, 8, 3, 126, 20, 120, 115, 95, 41, 81,\n", + " 74, 78, 104, 31, 85, 1, 86, 23, 128, 12, 128, 63,\n", + " 40, 109, 103, 76, 74, 51, 63, 101, 74, 74, 9, 49,\n", + " 74, 22, 102, 22, 74, 7, 10, 106, 74, 82, 74, 33,\n", + " 25, 105]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1233, 3238, 2674, ..., 1861, 2674, 6236],\n", + " [ 19, 52, 168, ..., 7203, 7378, 7318]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 79, 21, 35, ..., 79, 97, 5],\n", + " [ 7, 99, 65, ..., 6068, 6058, 6014]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 94, 94, 94, ..., 7328, 7198, 7298],\n", + " [ 684, 260, 436, ..., 475, 122, 402]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 458, 458, 436, ..., 784, 293, 908],\n", + " [ 97, 192, 256, ..., 7142, 7349, 7316]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5148, 2079, 2904, ..., 5782, 145, 1916],\n", + " [ 121, 55, 167, ..., 6134, 6078, 6028]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 94, 94, 94, ..., 7198, 7198, 7367],\n", + " [2799, 2212, 2122, ..., 6547, 6025, 377]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 55, 55, 55, ..., 5945, 5945, 5945],\n", + " [ 549, 2762, 3101, ..., 325, 295, 74]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.003631\n", + "sampling 0.00355\n", + "noi time: 0.000719\n", + "get_vertex_data call: 0.01432\n", + "noi group time: 0.001903\n", + "eoi_group_time: 0.011083\n", + "second half: 0.113118\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 527, 31145, 24187, ..., 1120077, 1120067, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 527, 31145, 24187, ..., 1120077, 1120067, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1224372, 1208551, ..., 1934173, 1933696, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1224372, 1208551, ..., 1934173, 1933696, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1141424, 1136237, 1140282, 1140285, 1135926, 1138553, 1135165,\n", + " 1135716, 1135727, 1140787, 1140799, 1141758, 1137506, 1138335, 1140297,\n", + " 1142523, 1142525, 1136969, 1145372, 1145993, 1137271, 1143362, 1143372,\n", + " 1143363, 1139246, 1146640, 1139609, 1145292, 1134937, 1148582, 1149216,\n", + " 1142958, 1155683, 1155686, 1149633, 1147473, 1147483, 1141876, 1142881,\n", + " 1144632, 1135118, 1148343, 1146656, 1146660, 1150200, 1146472, 1146471,\n", + " 1138347, 1137220, 1150555, 1155008, 1155019, 1150324, 1152430, 1152427,\n", + " 1134709, 1134804, 1140537, 1138112, 1138126, 1137249, 1137169, 1138356,\n", + " 1151526, 1135367, 1135202, 1135210, 1154739, 1141036, 1136778, 1134794,\n", + " 1157443, 1138508, 1137329, 1137342, 1137693, 1136619, 1144395, 1157397,\n", + " 1136662, 1137441, 1136204, 1136928, 1156159, 1148481, 1139161, 1134841,\n", + " 1141702, 1135579, 1136097, 1140712, 1156347, 1138514, 1158140, 1154132,\n", + " 1137021, 1135522, 1139685, 1138436, 1138440, 1140079, 1138461, 1138449,\n", + " 1137924, 1135088, 1142611, 1142615, 1158984, 1148531, 1137109, 1135769,\n", + " 1135772, 1141532, 1139667, 1139673, 1138069, 1134992, 1134782, 1142793,\n", + " 1135782, 1136734, 1140034, 1138655, 1155648, 1146075, 1141985, 1152044,\n", + " 1139064, 1137728, 1147316, 1147317, 1134750, 1134741, 1137005, 1135549,\n", + " 1136697, 1141088, 1141097, 1148996, 1149001, 1139898, 1142025, 1143775,\n", + " 1137298, 1137299, 1143225, 1139025, 1139033, 1149979, 1135861, 1154472,\n", + " 1136625, 1140470, 1141224, 1159800, 1136917, 1143677, 1145066, 1140598,\n", + " 1141786, 1152731, 1139495, 1141609, 1144646, 1144650, 1147844, 1147850,\n", + " 1137072, 1148065, 1144428, 1144420, 1142053, 1141810, 1143202, 1158749,\n", + " 1149108, 1138708, 1140110, 1144596, 1144598, 1145298, 1140885, 1135322,\n", + " 1135324, 1135327, 1140442, 1144182, 1146202, 1139559, 1138539, 1137846,\n", + " 1137841, 1147153, 1147155, 1136369, 1136378, 1142640, 1141365, 1141367,\n", + " 1153068, 1153069, 1141725, 1141664, 1149099, 1149101, 1144279, 1143904,\n", + " 1139506, 1139508, 1139510, 1139763, 1140093, 1139127, 1145001, 1140976,\n", + " 1140990, 1135047, 1147050, 1147052, 1147047, 1155829, 1152976, 1135457,\n", + " 1139453, 1141925, 1144242, 1140580, 1140582, 1140696, 1136885, 1134851,\n", + " 1134861, 1141390, 1143851, 1136275, 1146024, 1150606, 1146140, 1139990,\n", + " 1146302, 1143293, 1143294, 1151124, 1147545, 1147282, 1147290, 1142816,\n", + " 1142638, 1146084, 1143051, 1157720, 1136836, 1139328, 1144957, 1145427,\n", + " 1143345, 1144611, 1144615, 1145818, 1137098, 1139979, 1146514, 1146523,\n", + " 1143456, 1143457, 1137711, 1137703, 1140488, 1143937, 1143949, 1140816,\n", + " 1143803, 1146631, 1140364, 1137994, 1143080, 1143082, 1166410, 1148962,\n", + " 1148966, 1147988, 1147995, 1147996, 1147999, 1146949, 1144013, 1139252,\n", + " 1147127, 1147131, 1148704, 1148468, 1147056, 1147070, 1147025, 1147024,\n", + " 1145009, 1139549, 1158226, 1158230, 1141137, 1145750, 1145751, 1142370,\n", + " 1142369, 1138638, 1148223, 1152530, 1152537, 1150280, 1150438, 1150445,\n", + " 1149258, 1148831, 1148828, 1149791, 1144514, 1144526, 1150350, 1165252,\n", + " 1142304, 1147794, 1151480, 1151482, 1152023, 1152026, 1154271, 1154263,\n", + " 1139914, 1146723, 1140566, 1141949, 1146772, 1151795, 1147763, 1153568,\n", + " 1153574, 1148450, 1147653, 1147659, 1143559, 1143561, 1149409, 1149412,\n", + " 1147858, 1151412, 1154420, 1152561, 1139721, 1146686, 1141181, 1148729,\n", + " 1144110, 1146549, 1149810, 1150057, 1166312, 1143971, 1143888, 1148204,\n", + " 1141728, 1153188, 1145106, 1168631, 1150932, 1148052, 1152878, 1144863,\n", + " 1147442, 1151816, 1151821, 1135303, 1148498, 1148505, 1141420, 1141419,\n", + " 1151351, 1148949, 1146975, 1146967, 1146623, 1144472, 1146280, 1146281,\n", + " 1153028, 1153038, 1150085, 1137746, 1137755, 1152622, 1140521, 1136410,\n", + " 1152820, 1155337, 1154119, 1154123, 1157839, 1152673, 1154633, 1154638,\n", + " 1151617, 1151623, 1136131, 1136134, 1136798, 1148916, 1152950, 1144532,\n", + " 1138991, 1152903, 1146816, 1156826, 1153311, 1138279, 1138281, 1136028,\n", + " 1158712, 1158704, 1152928, 1156387, 1152888, 1142774, 1142777, 1150109,\n", + " 1150110, 1153909, 1150150, 1148040, 1155202, 1149300, 1152601, 1149794,\n", + " 1149798, 1149805, 1137048, 1158477, 1177026, 1148628, 1158530, 1158540,\n", + " 1137458, 1153863, 1147643, 1142047, 1143442, 1142387, 1158860, 1148892,\n", + " 1158916, 1156500, 1157064, 1155408, 1155412, 1152845, 1139473, 1151257,\n", + " 1135222, 1135729, 1135730, 1138816, 1151777, 1153422, 1135645, 1139525,\n", + " 1158306, 1158308, 1158311, 1155441, 1155512, 1153353, 1153359, 1150136,\n", + " 1154529, 1156913, 1145606, 1142764, 1142758, 1156265, 1156271, 1151388,\n", + " 1151379, 1155122, 1152527, 1149327, 1155755, 1135406, 1156463, 1155626,\n", + " 1156563, 1154550, 1155572, 1158824, 1148835, 1155646, 1143263, 1154644,\n", + " 1162389, 1161796, 1154080, 1154902, 1160907, 1150371, 1153318, 1153322,\n", + " 1155613, 1150811, 1150801, 1150976, 1155281, 1137152, 1157650, 1153786,\n", + " 1137381, 1159116, 1134683, 1135601, 1135605, 1148149, 1150661, 1150671,\n", + " 1155848, 1155852, 1149145, 1140633, 1152220, 1152222, 1155439, 1157733,\n", + " 1157031, 1155971, 1155975, 1161673, 1142070, 1135190, 1135186, 1158846,\n", + " 1156812, 1155404, 1136896, 1158882, 1140221, 1158447, 1136487, 1136491,\n", + " 1164941, 1164181, 1156665, 1152143, 1156488, 1153808, 1136640, 1136646,\n", + " 1145477, 1183285, 1166424, 1146126, 1165786, 1138101, 1138110, 1155871,\n", + " 1161539, 1142487, 1157747, 1167346, 1167359, 1162685, 1159052, 1167589,\n", + " 1155191, 1157944, 1157946, 1160563, 1162044, 1153052, 1153045, 1171551,\n", + " 1169840, 1138393, 1142677, 1150046, 1149063, 1149070, 1155482, 1155473,\n", + " 1153519, 1158685, 1146876, 1161652, 1157600, 1138161, 1156787, 1156795,\n", + " 1149956, 1149966, 1139592, 1139286, 1139290, 1156983, 1166073, 1171515,\n", + " 1146063, 1146356, 1171255, 1158452, 1184925, 1140130, 1158868, 1148600,\n", + " 1172722, 1143143, 1154279, 1156361, 1156355, 1173873, 1156181, 1159025,\n", + " 1159029, 1159032, 1152247, 1165585, 1143729, 1155588, 1144320, 1162549,\n", + " 1151223, 1151225, 1168428, 1144977, 1146500, 1163522, 1141471, 1147426,\n", + " 1147427, 1157052, 1156739, 1160856, 1153663, 1150643, 1150648, 1168748,\n", + " 1144810, 1144812, 1162085, 1165718, 1142733, 1156300, 1144056, 1145732,\n", + " 1148683, 1154701, 1144973, 1143038, 1165746, 1147355, 1148118, 1148120,\n", + " 1145902, 1179106, 1153520, 1168659, 1171571, 1152206, 1158724, 1154076,\n", + " 1147334, 1147339, 1144699, 1177933, 1145674, 1145673, 1151594, 1151598,\n", + " 1149130, 1167817, 1166653, 1155172, 1155180, 1165011, 1150522, 1150518,\n", + " 1156119, 1144336, 1138382, 1154670, 1154893, 1169162, 1157331, 1141051,\n", + " 1151664, 1154364, 1138609, 1171522, 1171529, 1149684, 1158623, 1158054,\n", + " 1158060, 1158062, 1149846, 1157384, 1174454, 1179900, 1152353, 1152360,\n", + " 1152546, 1168400, 1173307, 1154018, 1152150, 1159655, 1178423, 1157153,\n", + " 1157373, 1147711, 1148128, 1148131, 1147934, 1166827, 1135018, 1170701,\n", + " 1155739, 1177601, 1166028, 1163990, 1166684, 1170874, 1171823, 1154151,\n", + " 1154148, 1167523, 1167531, 1158176, 1184583, 1149169, 1149173, 1143279,\n", + " 1164956, 1168481, 1143420, 1156559, 1171302, 1170176, 1180247, 1153803,\n", + " 1153805, 1153141, 1183847, 1183135, 1161255, 1155262, 1180152, 1154718,\n", + " 1157795, 1143341, 1171623, 1171619, 1164034, 1181380, 1155804, 1187521,\n", + " 1153898, 1166476, 1180756, 1178218, 1162403, 1145626, 1172024, 1149755,\n", + " 1146242, 1153609, 1152276, 1158934, 1155892, 1155899, 1180852, 1186100,\n", + " 1185068, 1159874, 1165474, 1162253, 1190156, 1146169, 1176712, 1172623,\n", + " 1179053, 1170034, 1190622, 1168930, 1172169, 1139828, 1139831, 1139837,\n", + " 1150265, 1154812, 1156055, 1190261, 1182834, 1151972, 1181889, 1191018,\n", + " 1169954, 1140993, 1190444, 1167840, 1178076, 1192809, 1153743, 1194169,\n", + " 1188057, 1152115, 1177127, 1162504, 1169707, 1177845, 1181728, 1177285,\n", + " 1145395, 1160968, 1152080, 1178296, 1179364, 1172903, 1172896, 1185526,\n", + " 1191760, 1191142, 1175438, 1182863, 1192018, 1157022, 1161940],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1141424, 1136237, 1140282, 1140285, 1135926, 1138553, 1135165,\n", + " 1135716, 1135727, 1140787, 1140799, 1141758, 1137506, 1138335, 1140297,\n", + " 1142523, 1142525, 1136969, 1145372, 1145993, 1137271, 1143362, 1143372,\n", + " 1143363, 1139246, 1146640, 1139609, 1145292, 1134937, 1148582, 1149216,\n", + " 1142958, 1155683, 1155686, 1149633, 1147473, 1147483, 1141876, 1142881,\n", + " 1144632, 1135118, 1148343, 1146656, 1146660, 1150200, 1146472, 1146471,\n", + " 1138347, 1137220, 1150555, 1155008, 1155019, 1150324, 1152430, 1152427,\n", + " 1134709, 1134804, 1140537, 1138112, 1138126, 1137249, 1137169, 1138356,\n", + " 1151526, 1135367, 1135202, 1135210, 1154739, 1141036, 1136778, 1134794,\n", + " 1157443, 1138508, 1137329, 1137342, 1137693, 1136619, 1144395, 1157397,\n", + " 1136662, 1137441, 1136204, 1136928, 1156159, 1148481, 1139161, 1134841,\n", + " 1141702, 1135579, 1136097, 1140712, 1156347, 1138514, 1158140, 1154132,\n", + " 1137021, 1135522, 1139685, 1138436, 1138440, 1140079, 1138461, 1138449,\n", + " 1137924, 1135088, 1142611, 1142615, 1158984, 1148531, 1137109, 1135769,\n", + " 1135772, 1141532, 1139667, 1139673, 1138069, 1134992, 1134782, 1142793,\n", + " 1135782, 1136734, 1140034, 1138655, 1155648, 1146075, 1141985, 1152044,\n", + " 1139064, 1137728, 1147316, 1147317, 1134750, 1134741, 1137005, 1135549,\n", + " 1136697, 1141088, 1141097, 1148996, 1149001, 1139898, 1142025, 1143775,\n", + " 1137298, 1137299, 1143225, 1139025, 1139033, 1149979, 1135861, 1154472,\n", + " 1136625, 1140470, 1141224, 1159800, 1136917, 1143677, 1145066, 1140598,\n", + " 1141786, 1152731, 1139495, 1141609, 1144646, 1144650, 1147844, 1147850,\n", + " 1137072, 1148065, 1144428, 1144420, 1142053, 1141810, 1143202, 1158749,\n", + " 1149108, 1138708, 1140110, 1144596, 1144598, 1145298, 1140885, 1135322,\n", + " 1135324, 1135327, 1140442, 1144182, 1146202, 1139559, 1138539, 1137846,\n", + " 1137841, 1147153, 1147155, 1136369, 1136378, 1142640, 1141365, 1141367,\n", + " 1153068, 1153069, 1141725, 1141664, 1149099, 1149101, 1144279, 1143904,\n", + " 1139506, 1139508, 1139510, 1139763, 1140093, 1139127, 1145001, 1140976,\n", + " 1140990, 1135047, 1147050, 1147052, 1147047, 1155829, 1152976, 1135457,\n", + " 1139453, 1141925, 1144242, 1140580, 1140582, 1140696, 1136885, 1134851,\n", + " 1134861, 1141390, 1143851, 1136275, 1146024, 1150606, 1146140, 1139990,\n", + " 1146302, 1143293, 1143294, 1151124, 1147545, 1147282, 1147290, 1142816,\n", + " 1142638, 1146084, 1143051, 1157720, 1136836, 1139328, 1144957, 1145427,\n", + " 1143345, 1144611, 1144615, 1145818, 1137098, 1139979, 1146514, 1146523,\n", + " 1143456, 1143457, 1137711, 1137703, 1140488, 1143937, 1143949, 1140816,\n", + " 1143803, 1146631, 1140364, 1137994, 1143080, 1143082, 1166410, 1148962,\n", + " 1148966, 1147988, 1147995, 1147996, 1147999, 1146949, 1144013, 1139252,\n", + " 1147127, 1147131, 1148704, 1148468, 1147056, 1147070, 1147025, 1147024,\n", + " 1145009, 1139549, 1158226, 1158230, 1141137, 1145750, 1145751, 1142370,\n", + " 1142369, 1138638, 1148223, 1152530, 1152537, 1150280, 1150438, 1150445,\n", + " 1149258, 1148831, 1148828, 1149791, 1144514, 1144526, 1150350, 1165252,\n", + " 1142304, 1147794, 1151480, 1151482, 1152023, 1152026, 1154271, 1154263,\n", + " 1139914, 1146723, 1140566, 1141949, 1146772, 1151795, 1147763, 1153568,\n", + " 1153574, 1148450, 1147653, 1147659, 1143559, 1143561, 1149409, 1149412,\n", + " 1147858, 1151412, 1154420, 1152561, 1139721, 1146686, 1141181, 1148729,\n", + " 1144110, 1146549, 1149810, 1150057, 1166312, 1143971, 1143888, 1148204,\n", + " 1141728, 1153188, 1145106, 1168631, 1150932, 1148052, 1152878, 1144863,\n", + " 1147442, 1151816, 1151821, 1135303, 1148498, 1148505, 1141420, 1141419,\n", + " 1151351, 1148949, 1146975, 1146967, 1146623, 1144472, 1146280, 1146281,\n", + " 1153028, 1153038, 1150085, 1137746, 1137755, 1152622, 1140521, 1136410,\n", + " 1152820, 1155337, 1154119, 1154123, 1157839, 1152673, 1154633, 1154638,\n", + " 1151617, 1151623, 1136131, 1136134, 1136798, 1148916, 1152950, 1144532,\n", + " 1138991, 1152903, 1146816, 1156826, 1153311, 1138279, 1138281, 1136028,\n", + " 1158712, 1158704, 1152928, 1156387, 1152888, 1142774, 1142777, 1150109,\n", + " 1150110, 1153909, 1150150, 1148040, 1155202, 1149300, 1152601, 1149794,\n", + " 1149798, 1149805, 1137048, 1158477, 1177026, 1148628, 1158530, 1158540,\n", + " 1137458, 1153863, 1147643, 1142047, 1143442, 1142387, 1158860, 1148892,\n", + " 1158916, 1156500, 1157064, 1155408, 1155412, 1152845, 1139473, 1151257,\n", + " 1135222, 1135729, 1135730, 1138816, 1151777, 1153422, 1135645, 1139525,\n", + " 1158306, 1158308, 1158311, 1155441, 1155512, 1153353, 1153359, 1150136,\n", + " 1154529, 1156913, 1145606, 1142764, 1142758, 1156265, 1156271, 1151388,\n", + " 1151379, 1155122, 1152527, 1149327, 1155755, 1135406, 1156463, 1155626,\n", + " 1156563, 1154550, 1155572, 1158824, 1148835, 1155646, 1143263, 1154644,\n", + " 1162389, 1161796, 1154080, 1154902, 1160907, 1150371, 1153318, 1153322,\n", + " 1155613, 1150811, 1150801, 1150976, 1155281, 1137152, 1157650, 1153786,\n", + " 1137381, 1159116, 1134683, 1135601, 1135605, 1148149, 1150661, 1150671,\n", + " 1155848, 1155852, 1149145, 1140633, 1152220, 1152222, 1155439, 1157733,\n", + " 1157031, 1155971, 1155975, 1161673, 1142070, 1135190, 1135186, 1158846,\n", + " 1156812, 1155404, 1136896, 1158882, 1140221, 1158447, 1136487, 1136491,\n", + " 1164941, 1164181, 1156665, 1152143, 1156488, 1153808, 1136640, 1136646,\n", + " 1145477, 1183285, 1166424, 1146126, 1165786, 1138101, 1138110, 1155871,\n", + " 1161539, 1142487, 1157747, 1167346, 1167359, 1162685, 1159052, 1167589,\n", + " 1155191, 1157944, 1157946, 1160563, 1162044, 1153052, 1153045, 1171551,\n", + " 1169840, 1138393, 1142677, 1150046, 1149063, 1149070, 1155482, 1155473,\n", + " 1153519, 1158685, 1146876, 1161652, 1157600, 1138161, 1156787, 1156795,\n", + " 1149956, 1149966, 1139592, 1139286, 1139290, 1156983, 1166073, 1171515,\n", + " 1146063, 1146356, 1171255, 1158452, 1184925, 1140130, 1158868, 1148600,\n", + " 1172722, 1143143, 1154279, 1156361, 1156355, 1173873, 1156181, 1159025,\n", + " 1159029, 1159032, 1152247, 1165585, 1143729, 1155588, 1144320, 1162549,\n", + " 1151223, 1151225, 1168428, 1144977, 1146500, 1163522, 1141471, 1147426,\n", + " 1147427, 1157052, 1156739, 1160856, 1153663, 1150643, 1150648, 1168748,\n", + " 1144810, 1144812, 1162085, 1165718, 1142733, 1156300, 1144056, 1145732,\n", + " 1148683, 1154701, 1144973, 1143038, 1165746, 1147355, 1148118, 1148120,\n", + " 1145902, 1179106, 1153520, 1168659, 1171571, 1152206, 1158724, 1154076,\n", + " 1147334, 1147339, 1144699, 1177933, 1145674, 1145673, 1151594, 1151598,\n", + " 1149130, 1167817, 1166653, 1155172, 1155180, 1165011, 1150522, 1150518,\n", + " 1156119, 1144336, 1138382, 1154670, 1154893, 1169162, 1157331, 1141051,\n", + " 1151664, 1154364, 1138609, 1171522, 1171529, 1149684, 1158623, 1158054,\n", + " 1158060, 1158062, 1149846, 1157384, 1174454, 1179900, 1152353, 1152360,\n", + " 1152546, 1168400, 1173307, 1154018, 1152150, 1159655, 1178423, 1157153,\n", + " 1157373, 1147711, 1148128, 1148131, 1147934, 1166827, 1135018, 1170701,\n", + " 1155739, 1177601, 1166028, 1163990, 1166684, 1170874, 1171823, 1154151,\n", + " 1154148, 1167523, 1167531, 1158176, 1184583, 1149169, 1149173, 1143279,\n", + " 1164956, 1168481, 1143420, 1156559, 1171302, 1170176, 1180247, 1153803,\n", + " 1153805, 1153141, 1183847, 1183135, 1161255, 1155262, 1180152, 1154718,\n", + " 1157795, 1143341, 1171623, 1171619, 1164034, 1181380, 1155804, 1187521,\n", + " 1153898, 1166476, 1180756, 1178218, 1162403, 1145626, 1172024, 1149755,\n", + " 1146242, 1153609, 1152276, 1158934, 1155892, 1155899, 1180852, 1186100,\n", + " 1185068, 1159874, 1165474, 1162253, 1190156, 1146169, 1176712, 1172623,\n", + " 1179053, 1170034, 1190622, 1168930, 1172169, 1139828, 1139831, 1139837,\n", + " 1150265, 1154812, 1156055, 1190261, 1182834, 1151972, 1181889, 1191018,\n", + " 1169954, 1140993, 1190444, 1167840, 1178076, 1192809, 1153743, 1194169,\n", + " 1188057, 1152115, 1177127, 1162504, 1169707, 1177845, 1181728, 1177285,\n", + " 1145395, 1160968, 1152080, 1178296, 1179364, 1172903, 1172896, 1185526,\n", + " 1191760, 1191142, 1175438, 1182863, 1192018, 1157022, 1161940],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1195697, 1198248, 1200225, 1199282, 1202245, 1202249, 1198832,\n", + " 1194626, 1203054, 1198633, 1202804, 1196685, 1194743, 1196624, 1196631,\n", + " 1194648, 1196586, 1195507, 1195263, 1196534, 1196030, 1198543, 1197697,\n", + " 1198095, 1195888, 1197856, 1196699, 1196616, 1197831, 1198668, 1198161,\n", + " 1196711, 1195148, 1195270, 1195278, 1197141, 1196247, 1196109, 1194859,\n", + " 1194826, 1198915, 1195659, 1195541, 1199322, 1197640, 1199699, 1199711,\n", + " 1195351, 1199062, 1199185, 1197618, 1198673, 1199628, 1197676, 1200878,\n", + " 1198404, 1199231, 1201908, 1195010, 1195017, 1200061, 1197681, 1196498,\n", + " 1197970, 1197601, 1197953, 1196727, 1200887, 1199586, 1199421, 1200769,\n", + " 1200452, 1200450, 1200169, 1200913, 1200918, 1200927, 1201043, 1200526,\n", + " 1200553, 1202102, 1202138, 1199910, 1196768, 1202239, 1202338, 1202337,\n", + " 1201291, 1195611, 1198562, 1196966, 1195048, 1200578, 1195664, 1198929,\n", + " 1198932, 1198911, 1195415, 1197059, 1197821, 1197495, 1198961, 1199659,\n", + " 1203102, 1194734, 1198824, 1197731, 1200437, 1200468, 1195308, 1197652,\n", + " 1202077, 1201760, 1197872], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1195697, 1198248, 1200225, 1199282, 1202245, 1202249, 1198832,\n", + " 1194626, 1203054, 1198633, 1202804, 1196685, 1194743, 1196624, 1196631,\n", + " 1194648, 1196586, 1195507, 1195263, 1196534, 1196030, 1198543, 1197697,\n", + " 1198095, 1195888, 1197856, 1196699, 1196616, 1197831, 1198668, 1198161,\n", + " 1196711, 1195148, 1195270, 1195278, 1197141, 1196247, 1196109, 1194859,\n", + " 1194826, 1198915, 1195659, 1195541, 1199322, 1197640, 1199699, 1199711,\n", + " 1195351, 1199062, 1199185, 1197618, 1198673, 1199628, 1197676, 1200878,\n", + " 1198404, 1199231, 1201908, 1195010, 1195017, 1200061, 1197681, 1196498,\n", + " 1197970, 1197601, 1197953, 1196727, 1200887, 1199586, 1199421, 1200769,\n", + " 1200452, 1200450, 1200169, 1200913, 1200918, 1200927, 1201043, 1200526,\n", + " 1200553, 1202102, 1202138, 1199910, 1196768, 1202239, 1202338, 1202337,\n", + " 1201291, 1195611, 1198562, 1196966, 1195048, 1200578, 1195664, 1198929,\n", + " 1198932, 1198911, 1195415, 1197059, 1197821, 1197495, 1198961, 1199659,\n", + " 1203102, 1194734, 1198824, 1197731, 1200437, 1200468, 1195308, 1197652,\n", + " 1202077, 1201760, 1197872], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.8145e-01, -1.4261e-04, 8.8698e-01, ..., 1.1846e-01,\n", + " -1.8426e-03, -5.6050e-03],\n", + " [ 1.3756e-01, -4.3129e-04, 8.1664e-01, ..., 1.3501e-01,\n", + " -1.8942e-03, -5.0510e-03],\n", + " [ 1.3374e-01, -8.4623e-05, 7.4158e-01, ..., 1.3870e-01,\n", + " -2.0328e-03, -4.7509e-03],\n", + " ...,\n", + " [ 1.3501e-01, 4.0625e-03, 7.1416e-01, ..., 1.4473e-01,\n", + " -2.1614e-03, -4.5976e-03],\n", + " [ 8.1913e-02, -1.7032e-04, 6.8873e-01, ..., 1.9082e-01,\n", + " -2.2999e-03, -4.1398e-03],\n", + " [ 2.0808e-01, -5.1389e-04, 9.4460e-01, ..., 1.1429e-01,\n", + " -1.7043e-03, -6.1277e-03]], device='cuda:0'), 'paper': tensor([[ 1.7463e+00, 1.6784e+00, 3.7359e+00, ..., 1.4942e+00,\n", + " -4.7880e-02, 2.8602e+00],\n", + " [ 9.9621e-01, 9.7400e-01, 1.5151e+00, ..., -5.9369e-03,\n", + " -2.0433e-02, 3.1666e-01],\n", + " [ 1.5789e+00, 2.3065e+00, 2.9828e+00, ..., 4.9920e-01,\n", + " -3.3365e-02, 1.8080e+00],\n", + " ...,\n", + " [-5.7880e-03, -1.2004e-02, 3.8324e+00, ..., -1.1219e-02,\n", + " -3.5562e-02, -2.2395e-02],\n", + " [ 4.9121e-01, 5.1887e-01, 2.1306e+00, ..., -6.4924e-03,\n", + " -2.6385e-02, -9.8691e-04],\n", + " [ 1.7246e+00, 1.4422e+00, 3.2764e+00, ..., 2.4144e+00,\n", + " -5.6264e-02, 3.9019e+00]], device='cuda:0'), 'author': tensor([[-6.2942e-04, 2.9830e-02, 1.2906e-01, ..., 1.6955e-01,\n", + " -1.0748e-04, -6.7757e-04],\n", + " [-1.0651e-03, 3.0923e-01, 1.7742e-01, ..., 1.7128e+00,\n", + " 1.0415e-01, 5.0821e-02],\n", + " [-2.1024e-03, 2.7811e-01, 2.1898e-01, ..., 1.5742e+00,\n", + " -1.4760e-03, -1.1173e-03],\n", + " ...,\n", + " [-6.2942e-04, 2.9830e-02, 1.2906e-01, ..., 1.6955e-01,\n", + " -1.0748e-04, -6.7757e-04],\n", + " [-9.2417e-04, 2.5192e-01, 2.5549e-01, ..., 1.7451e+00,\n", + " 1.5365e-01, 1.2249e-01],\n", + " [-1.4002e-03, 3.1938e-01, 2.2827e-01, ..., 1.6829e+00,\n", + " 6.6612e-02, 1.9162e-03]], device='cuda:0'), 'field_of_study': tensor([[-6.8913e-05, 7.0412e-01, 4.3833e-01, ..., -8.8834e-03,\n", + " 1.7312e-01, 4.2085e-01],\n", + " [ 7.9977e-02, 7.4328e-01, 3.5072e-01, ..., -9.6397e-03,\n", + " 3.9181e-01, 4.0462e-01],\n", + " [ 6.3719e-02, 6.1390e-01, 3.2200e-01, ..., -7.2047e-03,\n", + " 2.4928e-01, 2.5849e-01],\n", + " ...,\n", + " [ 7.4982e-02, 8.3257e-01, 5.4215e-01, ..., -1.0528e-02,\n", + " 2.4078e-01, 5.8190e-01],\n", + " [ 1.0679e-01, 9.7020e-01, 5.6827e-01, ..., -1.1568e-02,\n", + " 5.6805e-01, 3.8809e-01],\n", + " [ 1.0046e-01, 1.0088e+00, 5.8959e-01, ..., -1.3019e-02,\n", + " 6.3601e-01, 3.4751e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 16, 3, 99, 155, 161, 161, 93, 93, 15, 32, 120, 302,\n", + " 327, 322, 470, 609, 503, 890, 438, 738, 738, 725, 935, 885,\n", + " 885, 1040, 847, 896, 916, 906, 1072, 1002, 1089, 1134, 1131, 1131,\n", + " 1131, 1131, 1302, 1528, 1185, 1185, 1319, 1215, 1240, 1240, 1240, 1473,\n", + " 1426, 1473, 1550, 1362, 1680, 1385, 1912, 1717, 1717, 1683, 1709, 1903,\n", + " 1795, 1947, 1707, 1866, 1961, 2008, 1887, 2061, 2070, 2070, 2121, 2116,\n", + " 2156, 2168, 2168, 2180, 2296, 2296, 2296, 2117, 2267, 2267, 2257, 2365,\n", + " 2387, 2387, 2435, 2291, 2291, 2448, 2573, 2573, 2584, 2572, 2709, 2838,\n", + " 2591, 2831, 2831, 3041, 2958, 3043, 3066, 3198, 3272, 3220, 3271, 3417,\n", + " 3450, 3608, 3654, 3663, 3812, 3764, 3735, 3785, 3939, 4263, 4236, 4275,\n", + " 4399, 4399, 4538, 4538, 4538, 4538, 4605, 4524, 4407, 4610, 4430, 4651,\n", + " 4763, 4882, 4882, 4849, 4975, 5339, 5339, 5246, 5246, 5246, 4953, 4953,\n", + " 5000, 5107, 5078, 5106, 5324, 5324, 5384, 5024, 5126, 5033, 5565, 5279,\n", + " 4993, 5184, 5464, 5263, 5263, 5263, 5263, 5263, 5263, 5957, 5334, 5740,\n", + " 5740, 5745, 5480, 5630, 5574, 5870, 5731, 5731, 5684, 6002, 6002, 5479,\n", + " 5479, 5802, 5802, 5875, 5920, 5630, 5630, 5615, 5480, 5827, 5859, 5948],\n", + " [ 55, 10, 21, 82, 21, 33, 27, 80, 112, 17, 72, 90,\n", + " 4, 67, 76, 41, 62, 91, 44, 56, 108, 70, 39, 39,\n", + " 46, 62, 99, 88, 66, 91, 78, 98, 67, 79, 78, 81,\n", + " 61, 40, 82, 83, 78, 61, 29, 102, 50, 109, 43, 96,\n", + " 67, 2, 82, 7, 47, 67, 54, 32, 87, 9, 8, 82,\n", + " 44, 67, 13, 113, 91, 75, 25, 20, 57, 65, 107, 101,\n", + " 82, 5, 21, 49, 15, 35, 58, 99, 55, 54, 11, 9,\n", + " 107, 71, 26, 18, 59, 82, 6, 51, 1, 33, 0, 97,\n", + " 75, 52, 102, 52, 91, 67, 62, 25, 67, 82, 110, 88,\n", + " 67, 74, 82, 99, 86, 85, 19, 19, 73, 53, 12, 93,\n", + " 4, 53, 69, 4, 77, 67, 99, 67, 106, 46, 103, 16,\n", + " 92, 88, 21, 35, 67, 14, 67, 104, 4, 111, 42, 67,\n", + " 31, 4, 4, 4, 19, 28, 4, 3, 4, 4, 4, 4,\n", + " 105, 22, 114, 89, 37, 68, 67, 73, 106, 64, 95, 38,\n", + " 67, 4, 24, 30, 4, 94, 34, 67, 48, 45, 99, 67,\n", + " 60, 84, 63, 95, 21, 67, 100, 23, 67, 67, 67, 36]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 217, 1455, 2055, ..., 5455, 3268, 2435],\n", + " [ 205, 73, 284, ..., 7044, 7011, 7011]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 39, 71, 4, ..., 13, 4, 4],\n", + " [ 139, 150, 28, ..., 5972, 5912, 6022]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 81, 158, 86, ..., 6994, 6950, 6950],\n", + " [ 790, 251, 226, ..., 536, 71, 48]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 415, 290, 230, ..., 374, 714, 194],\n", + " [ 194, 113, 288, ..., 6920, 6985, 6943]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3305, 6559, 5631, ..., 6380, 101, 3145],\n", + " [ 172, 35, 104, ..., 5961, 5976, 5977]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 284, 284, 284, ..., 6950, 6950, 6950],\n", + " [ 784, 1240, 1303, ..., 170, 81, 3874]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 16, 16, 16, ..., 5948, 5948, 5948],\n", + " [5672, 367, 1457, ..., 5288, 5308, 5100]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006024\n", + "sampling 0.005944\n", + "noi time: 0.001978\n", + "get_vertex_data call: 0.038412\n", + "noi group time: 0.003622\n", + "eoi_group_time: 0.017189\n", + "second half: 0.181031\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24187, 20111, 23798, ..., 1120077, 1110069, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24187, 20111, 23798, ..., 1120077, 1110069, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210822, 1217957, 1215981, ..., 1939277, 1929220, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210822, 1217957, 1215981, ..., 1939277, 1929220, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1141424, 1136228, 1140284, 1135716, 1135726, 1135727, 1137784,\n", + " 1140785, 1141758, 1137506, 1142802, 1136154, 1142525, 1136969, 1141443,\n", + " 1154781, 1137271, 1138938, 1145040, 1143372, 1148983, 1150497, 1150509,\n", + " 1142963, 1142958, 1142959, 1155683, 1143810, 1149283, 1144636, 1146996,\n", + " 1146660, 1148546, 1137220, 1147202, 1147211, 1138745, 1134659, 1134667,\n", + " 1140313, 1137829, 1151546, 1140540, 1138112, 1138119, 1154414, 1138366,\n", + " 1153457, 1153463, 1134735, 1140020, 1140946, 1140947, 1140953, 1135367,\n", + " 1135202, 1134969, 1141036, 1136288, 1136301, 1134794, 1157443, 1136517,\n", + " 1143377, 1143389, 1143069, 1135333, 1144395, 1137534, 1157397, 1152376,\n", + " 1136662, 1137441, 1136942, 1135265, 1156159, 1139161, 1141702, 1140707,\n", + " 1138514, 1153099, 1137957, 1137019, 1156899, 1135522, 1135535, 1139684,\n", + " 1138436, 1138440, 1138445, 1138461, 1138449, 1157190, 1136594, 1149328,\n", + " 1135088, 1138697, 1156606, 1147112, 1142611, 1160819, 1135352, 1135355,\n", + " 1135618, 1135631, 1148531, 1148533, 1137109, 1139667, 1139673, 1138067,\n", + " 1138079, 1136094, 1134992, 1136551, 1148805, 1136734, 1158961, 1142909,\n", + " 1159012, 1159019, 1153543, 1143631, 1140034, 1137588, 1155660, 1140558,\n", + " 1152044, 1140660, 1137728, 1147322, 1140901, 1135549, 1141097, 1149001,\n", + " 1139889, 1136384, 1143224, 1139025, 1139033, 1149968, 1149982, 1141681,\n", + " 1135860, 1140467, 1139386, 1163310, 1136917, 1143667, 1160616, 1146449,\n", + " 1141786, 1139495, 1136752, 1141300, 1144650, 1147850, 1142053, 1139274,\n", + " 1142713, 1141479, 1138708, 1142914, 1143107, 1144596, 1136866, 1136867,\n", + " 1135322, 1135327, 1140433, 1144182, 1137606, 1150906, 1161095, 1144865,\n", + " 1146201, 1139559, 1158698, 1158703, 1147153, 1141365, 1153069, 1141664,\n", + " 1149101, 1144279, 1139127, 1140616, 1140979, 1140983, 1140990, 1146695,\n", + " 1147050, 1145873, 1152976, 1152980, 1152988, 1141925, 1141929, 1146901,\n", + " 1144242, 1145339, 1165366, 1150689, 1143851, 1146024, 1142533, 1139990,\n", + " 1143293, 1143294, 1151121, 1147543, 1147540, 1148763, 1147282, 1142816,\n", + " 1149155, 1140348, 1143663, 1139417, 1148003, 1148408, 1136167, 1142586,\n", + " 1157720, 1136836, 1139297, 1144768, 1141496, 1142159, 1143345, 1144615,\n", + " 1145818, 1144081, 1144088, 1135876, 1135818, 1150919, 1146514, 1146526,\n", + " 1138024, 1142003, 1143937, 1140356, 1140360, 1140364, 1149582, 1137990,\n", + " 1143075, 1143082, 1168914, 1144725, 1147984, 1147992, 1147999, 1139252,\n", + " 1139249, 1147131, 1148704, 1142700, 1148468, 1148473, 1153701, 1147056,\n", + " 1147259, 1158226, 1143921, 1145751, 1142369, 1138632, 1146178, 1152530,\n", + " 1152542, 1152537, 1150280, 1150274, 1150438, 1150445, 1151856, 1144526,\n", + " 1151994, 1169717, 1142304, 1151473, 1152031, 1145255, 1140560, 1147019,\n", + " 1141269, 1147764, 1153574, 1154979, 1154991, 1147653, 1149412, 1148288,\n", + " 1148300, 1152073, 1137716, 1139096, 1154420, 1148180, 1152561, 1138404,\n", + " 1141181, 1151557, 1148729, 1144110, 1149810, 1143888, 1148203, 1154168,\n", + " 1153124, 1153192, 1153188, 1145104, 1143092, 1144863, 1150356, 1155102,\n", + " 1143121, 1151811, 1152581, 1151910, 1154190, 1145640, 1148498, 1148505,\n", + " 1146565, 1141420, 1141419, 1147603, 1147737, 1148949, 1146969, 1156402,\n", + " 1153249, 1146623, 1151691, 1151399, 1152407, 1152409, 1154052, 1154058,\n", + " 1152103, 1146280, 1153028, 1153030, 1153026, 1153038, 1150085, 1137746,\n", + " 1152622, 1140527, 1136401, 1152826, 1154123, 1157824, 1154633, 1151573,\n", + " 1151617, 1136134, 1152944, 1152341, 1152344, 1156816, 1153311, 1136028,\n", + " 1156608, 1156619, 1156622, 1151195, 1140678, 1152939, 1151064, 1156387,\n", + " 1156399, 1150106, 1153907, 1153918, 1149272, 1148033, 1148040, 1155202,\n", + " 1152601, 1152602, 1149794, 1144668, 1137048, 1137052, 1177026, 1148628,\n", + " 1158530, 1158540, 1137458, 1153085, 1142047, 1157229, 1135434, 1150871,\n", + " 1148884, 1158916, 1137885, 1156505, 1152397, 1157069, 1157071, 1155422,\n", + " 1152833, 1137814, 1139476, 1150465, 1135729, 1152179, 1152183, 1156629,\n", + " 1156632, 1150824, 1153413, 1153415, 1147818, 1143010, 1151470, 1139525,\n", + " 1158304, 1158306, 1158311, 1140417, 1155441, 1155442, 1153354, 1153359,\n", + " 1154529, 1154536, 1154542, 1145771, 1156921, 1151386, 1151379, 1158639,\n", + " 1155122, 1149321, 1149505, 1153479, 1153486, 1145806, 1156463, 1158096,\n", + " 1154763, 1155620, 1156563, 1154554, 1155576, 1158566, 1158824, 1153715,\n", + " 1155646, 1143263, 1154644, 1154250, 1154240, 1143189, 1143531, 1150371,\n", + " 1150983, 1158117, 1171832, 1156764, 1153786, 1149913, 1159116, 1145682,\n", + " 1145690, 1137316, 1134683, 1135601, 1178445, 1148153, 1150661, 1150659,\n", + " 1158656, 1149145, 1155724, 1144463, 1152220, 1140368, 1140380, 1155971,\n", + " 1155975, 1156958, 1158846, 1155404, 1149700, 1160164, 1136896, 1157296,\n", + " 1158815, 1158447, 1158285, 1151615, 1136494, 1136491, 1164931, 1153640,\n", + " 1142747, 1156494, 1156490, 1153808, 1136646, 1157811, 1153835, 1146126,\n", + " 1165786, 1138099, 1155871, 1161539, 1142666, 1157751, 1167359, 1162683,\n", + " 1158300, 1162044, 1153052, 1153045, 1159738, 1155763, 1155771, 1156235,\n", + " 1138393, 1149070, 1147300, 1142406, 1138161, 1164006, 1156787, 1149963,\n", + " 1164901, 1139592, 1166073, 1157236, 1146063, 1146356, 1184923, 1140643,\n", + " 1143138, 1168168, 1163201, 1141800, 1156181, 1159032, 1165875, 1152247,\n", + " 1143729, 1155588, 1165276, 1147560, 1138674, 1148567, 1144977, 1169646,\n", + " 1146510, 1161243, 1161240, 1144737, 1144747, 1152776, 1166883, 1155048,\n", + " 1163524, 1162580, 1145137, 1161718, 1151650, 1147426, 1147427, 1157050,\n", + " 1149890, 1179982, 1156739, 1166591, 1144810, 1144812, 1162093, 1135567,\n", + " 1142733, 1156293, 1144057, 1145732, 1145743, 1150535, 1170307, 1146432,\n", + " 1143028, 1147355, 1152624, 1139359, 1147723, 1145892, 1145902, 1181040,\n", + " 1143404, 1158724, 1158722, 1154076, 1168756, 1145674, 1179488, 1167817,\n", + " 1150518, 1150526, 1156113, 1144346, 1144336, 1157534, 1135853, 1191396,\n", + " 1154893, 1169162, 1141043, 1169359, 1154364, 1149452, 1138619, 1149688,\n", + " 1158611, 1158623, 1172575, 1173047, 1163292, 1149847, 1165899, 1165903,\n", + " 1154869, 1171479, 1169948, 1155494, 1152353, 1152362, 1143172, 1149402,\n", + " 1148667, 1172129, 1173307, 1154027, 1154028, 1152150, 1153751, 1153754,\n", + " 1157153, 1147708, 1147711, 1151848, 1151850, 1151852, 1157598, 1163772,\n", + " 1166827, 1168352, 1168604, 1146762, 1140326, 1178053, 1150234, 1154151,\n", + " 1154148, 1158176, 1149169, 1149179, 1149173, 1169820, 1178649, 1178610,\n", + " 1168481, 1177659, 1153803, 1153149, 1179721, 1180916, 1151519, 1166554,\n", + " 1178914, 1155262, 1155117, 1157792, 1157795, 1182812, 1171623, 1153898,\n", + " 1161846, 1183461, 1145626, 1156443, 1161068, 1149755, 1146242, 1146252,\n", + " 1181143, 1183342, 1158940, 1158370, 1158381, 1185514, 1157270, 1180930,\n", + " 1168273, 1164798, 1162443, 1164231, 1181329, 1181331, 1156162, 1170034,\n", + " 1193451, 1167665, 1164133, 1163624, 1156532, 1139831, 1139837, 1150265,\n", + " 1149668, 1192076, 1163848, 1156055, 1173058, 1176506, 1183196, 1191963,\n", + " 1184795, 1188780, 1178985, 1151762, 1171458, 1152113, 1169781, 1169707,\n", + " 1191323, 1158064, 1158067, 1158070, 1193396, 1189360, 1191760, 1167460,\n", + " 1184942], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1141424, 1136228, 1140284, 1135716, 1135726, 1135727, 1137784,\n", + " 1140785, 1141758, 1137506, 1142802, 1136154, 1142525, 1136969, 1141443,\n", + " 1154781, 1137271, 1138938, 1145040, 1143372, 1148983, 1150497, 1150509,\n", + " 1142963, 1142958, 1142959, 1155683, 1143810, 1149283, 1144636, 1146996,\n", + " 1146660, 1148546, 1137220, 1147202, 1147211, 1138745, 1134659, 1134667,\n", + " 1140313, 1137829, 1151546, 1140540, 1138112, 1138119, 1154414, 1138366,\n", + " 1153457, 1153463, 1134735, 1140020, 1140946, 1140947, 1140953, 1135367,\n", + " 1135202, 1134969, 1141036, 1136288, 1136301, 1134794, 1157443, 1136517,\n", + " 1143377, 1143389, 1143069, 1135333, 1144395, 1137534, 1157397, 1152376,\n", + " 1136662, 1137441, 1136942, 1135265, 1156159, 1139161, 1141702, 1140707,\n", + " 1138514, 1153099, 1137957, 1137019, 1156899, 1135522, 1135535, 1139684,\n", + " 1138436, 1138440, 1138445, 1138461, 1138449, 1157190, 1136594, 1149328,\n", + " 1135088, 1138697, 1156606, 1147112, 1142611, 1160819, 1135352, 1135355,\n", + " 1135618, 1135631, 1148531, 1148533, 1137109, 1139667, 1139673, 1138067,\n", + " 1138079, 1136094, 1134992, 1136551, 1148805, 1136734, 1158961, 1142909,\n", + " 1159012, 1159019, 1153543, 1143631, 1140034, 1137588, 1155660, 1140558,\n", + " 1152044, 1140660, 1137728, 1147322, 1140901, 1135549, 1141097, 1149001,\n", + " 1139889, 1136384, 1143224, 1139025, 1139033, 1149968, 1149982, 1141681,\n", + " 1135860, 1140467, 1139386, 1163310, 1136917, 1143667, 1160616, 1146449,\n", + " 1141786, 1139495, 1136752, 1141300, 1144650, 1147850, 1142053, 1139274,\n", + " 1142713, 1141479, 1138708, 1142914, 1143107, 1144596, 1136866, 1136867,\n", + " 1135322, 1135327, 1140433, 1144182, 1137606, 1150906, 1161095, 1144865,\n", + " 1146201, 1139559, 1158698, 1158703, 1147153, 1141365, 1153069, 1141664,\n", + " 1149101, 1144279, 1139127, 1140616, 1140979, 1140983, 1140990, 1146695,\n", + " 1147050, 1145873, 1152976, 1152980, 1152988, 1141925, 1141929, 1146901,\n", + " 1144242, 1145339, 1165366, 1150689, 1143851, 1146024, 1142533, 1139990,\n", + " 1143293, 1143294, 1151121, 1147543, 1147540, 1148763, 1147282, 1142816,\n", + " 1149155, 1140348, 1143663, 1139417, 1148003, 1148408, 1136167, 1142586,\n", + " 1157720, 1136836, 1139297, 1144768, 1141496, 1142159, 1143345, 1144615,\n", + " 1145818, 1144081, 1144088, 1135876, 1135818, 1150919, 1146514, 1146526,\n", + " 1138024, 1142003, 1143937, 1140356, 1140360, 1140364, 1149582, 1137990,\n", + " 1143075, 1143082, 1168914, 1144725, 1147984, 1147992, 1147999, 1139252,\n", + " 1139249, 1147131, 1148704, 1142700, 1148468, 1148473, 1153701, 1147056,\n", + " 1147259, 1158226, 1143921, 1145751, 1142369, 1138632, 1146178, 1152530,\n", + " 1152542, 1152537, 1150280, 1150274, 1150438, 1150445, 1151856, 1144526,\n", + " 1151994, 1169717, 1142304, 1151473, 1152031, 1145255, 1140560, 1147019,\n", + " 1141269, 1147764, 1153574, 1154979, 1154991, 1147653, 1149412, 1148288,\n", + " 1148300, 1152073, 1137716, 1139096, 1154420, 1148180, 1152561, 1138404,\n", + " 1141181, 1151557, 1148729, 1144110, 1149810, 1143888, 1148203, 1154168,\n", + " 1153124, 1153192, 1153188, 1145104, 1143092, 1144863, 1150356, 1155102,\n", + " 1143121, 1151811, 1152581, 1151910, 1154190, 1145640, 1148498, 1148505,\n", + " 1146565, 1141420, 1141419, 1147603, 1147737, 1148949, 1146969, 1156402,\n", + " 1153249, 1146623, 1151691, 1151399, 1152407, 1152409, 1154052, 1154058,\n", + " 1152103, 1146280, 1153028, 1153030, 1153026, 1153038, 1150085, 1137746,\n", + " 1152622, 1140527, 1136401, 1152826, 1154123, 1157824, 1154633, 1151573,\n", + " 1151617, 1136134, 1152944, 1152341, 1152344, 1156816, 1153311, 1136028,\n", + " 1156608, 1156619, 1156622, 1151195, 1140678, 1152939, 1151064, 1156387,\n", + " 1156399, 1150106, 1153907, 1153918, 1149272, 1148033, 1148040, 1155202,\n", + " 1152601, 1152602, 1149794, 1144668, 1137048, 1137052, 1177026, 1148628,\n", + " 1158530, 1158540, 1137458, 1153085, 1142047, 1157229, 1135434, 1150871,\n", + " 1148884, 1158916, 1137885, 1156505, 1152397, 1157069, 1157071, 1155422,\n", + " 1152833, 1137814, 1139476, 1150465, 1135729, 1152179, 1152183, 1156629,\n", + " 1156632, 1150824, 1153413, 1153415, 1147818, 1143010, 1151470, 1139525,\n", + " 1158304, 1158306, 1158311, 1140417, 1155441, 1155442, 1153354, 1153359,\n", + " 1154529, 1154536, 1154542, 1145771, 1156921, 1151386, 1151379, 1158639,\n", + " 1155122, 1149321, 1149505, 1153479, 1153486, 1145806, 1156463, 1158096,\n", + " 1154763, 1155620, 1156563, 1154554, 1155576, 1158566, 1158824, 1153715,\n", + " 1155646, 1143263, 1154644, 1154250, 1154240, 1143189, 1143531, 1150371,\n", + " 1150983, 1158117, 1171832, 1156764, 1153786, 1149913, 1159116, 1145682,\n", + " 1145690, 1137316, 1134683, 1135601, 1178445, 1148153, 1150661, 1150659,\n", + " 1158656, 1149145, 1155724, 1144463, 1152220, 1140368, 1140380, 1155971,\n", + " 1155975, 1156958, 1158846, 1155404, 1149700, 1160164, 1136896, 1157296,\n", + " 1158815, 1158447, 1158285, 1151615, 1136494, 1136491, 1164931, 1153640,\n", + " 1142747, 1156494, 1156490, 1153808, 1136646, 1157811, 1153835, 1146126,\n", + " 1165786, 1138099, 1155871, 1161539, 1142666, 1157751, 1167359, 1162683,\n", + " 1158300, 1162044, 1153052, 1153045, 1159738, 1155763, 1155771, 1156235,\n", + " 1138393, 1149070, 1147300, 1142406, 1138161, 1164006, 1156787, 1149963,\n", + " 1164901, 1139592, 1166073, 1157236, 1146063, 1146356, 1184923, 1140643,\n", + " 1143138, 1168168, 1163201, 1141800, 1156181, 1159032, 1165875, 1152247,\n", + " 1143729, 1155588, 1165276, 1147560, 1138674, 1148567, 1144977, 1169646,\n", + " 1146510, 1161243, 1161240, 1144737, 1144747, 1152776, 1166883, 1155048,\n", + " 1163524, 1162580, 1145137, 1161718, 1151650, 1147426, 1147427, 1157050,\n", + " 1149890, 1179982, 1156739, 1166591, 1144810, 1144812, 1162093, 1135567,\n", + " 1142733, 1156293, 1144057, 1145732, 1145743, 1150535, 1170307, 1146432,\n", + " 1143028, 1147355, 1152624, 1139359, 1147723, 1145892, 1145902, 1181040,\n", + " 1143404, 1158724, 1158722, 1154076, 1168756, 1145674, 1179488, 1167817,\n", + " 1150518, 1150526, 1156113, 1144346, 1144336, 1157534, 1135853, 1191396,\n", + " 1154893, 1169162, 1141043, 1169359, 1154364, 1149452, 1138619, 1149688,\n", + " 1158611, 1158623, 1172575, 1173047, 1163292, 1149847, 1165899, 1165903,\n", + " 1154869, 1171479, 1169948, 1155494, 1152353, 1152362, 1143172, 1149402,\n", + " 1148667, 1172129, 1173307, 1154027, 1154028, 1152150, 1153751, 1153754,\n", + " 1157153, 1147708, 1147711, 1151848, 1151850, 1151852, 1157598, 1163772,\n", + " 1166827, 1168352, 1168604, 1146762, 1140326, 1178053, 1150234, 1154151,\n", + " 1154148, 1158176, 1149169, 1149179, 1149173, 1169820, 1178649, 1178610,\n", + " 1168481, 1177659, 1153803, 1153149, 1179721, 1180916, 1151519, 1166554,\n", + " 1178914, 1155262, 1155117, 1157792, 1157795, 1182812, 1171623, 1153898,\n", + " 1161846, 1183461, 1145626, 1156443, 1161068, 1149755, 1146242, 1146252,\n", + " 1181143, 1183342, 1158940, 1158370, 1158381, 1185514, 1157270, 1180930,\n", + " 1168273, 1164798, 1162443, 1164231, 1181329, 1181331, 1156162, 1170034,\n", + " 1193451, 1167665, 1164133, 1163624, 1156532, 1139831, 1139837, 1150265,\n", + " 1149668, 1192076, 1163848, 1156055, 1173058, 1176506, 1183196, 1191963,\n", + " 1184795, 1188780, 1178985, 1151762, 1171458, 1152113, 1169781, 1169707,\n", + " 1191323, 1158064, 1158067, 1158070, 1193396, 1189360, 1191760, 1167460,\n", + " 1184942], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199282, 1202255, 1198844, 1198845, 1201582, 1199145, 1194626, 1197777,\n", + " 1201016, 1198690, 1198702, 1202803, 1197512, 1194866, 1194743, 1198180,\n", + " 1194783, 1194782, 1195491, 1195494, 1196631, 1195514, 1195263, 1196539,\n", + " 1201992, 1198095, 1195732, 1195740, 1196334, 1196359, 1196517, 1194759,\n", + " 1195313, 1196840, 1198262, 1196237, 1195571, 1195982, 1198958, 1196711,\n", + " 1199823, 1195145, 1195148, 1195216, 1195265, 1195270, 1195278, 1197141,\n", + " 1196242, 1197374, 1197273, 1198219, 1198915, 1199314, 1197478, 1199998,\n", + " 1197253, 1197640, 1198277, 1200949, 1199060, 1197286, 1198679, 1194928,\n", + " 1197577, 1199628, 1202448, 1199154, 1199231, 1201917, 1195017, 1199676,\n", + " 1199847, 1200668, 1197977, 1196727, 1202618, 1200887, 1198428, 1199552,\n", + " 1200570, 1200169, 1200503, 1198066, 1201421, 1201075, 1202630, 1202632,\n", + " 1201056, 1202640, 1200363, 1200521, 1200345, 1197040, 1201442, 1202239,\n", + " 1202337, 1197546, 1198478, 1203329, 1202209, 1196960, 1196966, 1200997,\n", + " 1199606, 1198518, 1198929, 1198932, 1198909, 1195418, 1195421, 1195181,\n", + " 1200928, 1196414, 1198127, 1196597, 1196605, 1201971, 1200585, 1196786,\n", + " 1197735, 1198819, 1201196, 1200974, 1201877, 1198751], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199282, 1202255, 1198844, 1198845, 1201582, 1199145, 1194626, 1197777,\n", + " 1201016, 1198690, 1198702, 1202803, 1197512, 1194866, 1194743, 1198180,\n", + " 1194783, 1194782, 1195491, 1195494, 1196631, 1195514, 1195263, 1196539,\n", + " 1201992, 1198095, 1195732, 1195740, 1196334, 1196359, 1196517, 1194759,\n", + " 1195313, 1196840, 1198262, 1196237, 1195571, 1195982, 1198958, 1196711,\n", + " 1199823, 1195145, 1195148, 1195216, 1195265, 1195270, 1195278, 1197141,\n", + " 1196242, 1197374, 1197273, 1198219, 1198915, 1199314, 1197478, 1199998,\n", + " 1197253, 1197640, 1198277, 1200949, 1199060, 1197286, 1198679, 1194928,\n", + " 1197577, 1199628, 1202448, 1199154, 1199231, 1201917, 1195017, 1199676,\n", + " 1199847, 1200668, 1197977, 1196727, 1202618, 1200887, 1198428, 1199552,\n", + " 1200570, 1200169, 1200503, 1198066, 1201421, 1201075, 1202630, 1202632,\n", + " 1201056, 1202640, 1200363, 1200521, 1200345, 1197040, 1201442, 1202239,\n", + " 1202337, 1197546, 1198478, 1203329, 1202209, 1196960, 1196966, 1200997,\n", + " 1199606, 1198518, 1198929, 1198932, 1198909, 1195418, 1195421, 1195181,\n", + " 1200928, 1196414, 1198127, 1196597, 1196605, 1201971, 1200585, 1196786,\n", + " 1197735, 1198819, 1201196, 1200974, 1201877, 1198751], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 1.5291e-01, 1.2206e-02, 8.0802e-01, ..., 1.3525e-01,\n", + " -1.7004e-03, -5.1159e-03],\n", + " [ 2.2953e-01, -4.5560e-04, 9.3357e-01, ..., 1.1083e-01,\n", + " -1.7938e-03, -6.1541e-03],\n", + " [ 1.4730e-01, 3.6429e-02, 7.4573e-01, ..., 1.4571e-01,\n", + " -1.4791e-03, -4.8095e-03],\n", + " ...,\n", + " [ 1.8991e-01, -3.3320e-04, 9.0735e-01, ..., 1.1272e-01,\n", + " -1.7913e-03, -5.8140e-03],\n", + " [ 1.1506e-01, -1.0815e-04, 7.1086e-01, ..., 1.2739e-01,\n", + " -1.8114e-03, -4.4944e-03],\n", + " [ 2.2454e-01, -4.0989e-04, 9.4806e-01, ..., 1.1853e-01,\n", + " -1.7803e-03, -6.1966e-03]], device='cuda:0'), 'paper': tensor([[ 1.7697e+00, 1.9351e+00, 2.9037e+00, ..., 4.3553e-01,\n", + " -3.5942e-02, 2.0156e+00],\n", + " [ 6.7382e-01, 9.8011e-01, 1.4826e+00, ..., -5.1858e-03,\n", + " -1.8106e-02, 1.0411e-01],\n", + " [ 5.9057e-01, 1.4252e+00, 2.2981e+00, ..., -5.4715e-03,\n", + " -2.2800e-02, -1.3712e-03],\n", + " ...,\n", + " [ 1.2913e+00, 2.3057e+00, 2.3877e+00, ..., -1.3692e-02,\n", + " -3.0207e-02, 6.2882e-02],\n", + " [ 1.5393e+00, 2.2469e+00, 2.6563e+00, ..., 3.9629e-01,\n", + " -2.9753e-02, 1.9262e+00],\n", + " [ 1.7953e+00, 1.4894e+00, 3.3565e+00, ..., 2.4746e+00,\n", + " -5.7183e-02, 4.0522e+00]], device='cuda:0'), 'author': tensor([[-1.0491e-03, 2.6344e-01, 1.8689e-01, ..., 1.6956e+00,\n", + " 1.8640e-01, 4.3199e-02],\n", + " [-3.3006e-03, 4.2542e-01, 2.8417e-01, ..., 1.5207e+00,\n", + " -2.4040e-03, -2.1435e-03],\n", + " [-1.6879e-03, 3.2628e-01, 2.2934e-01, ..., 1.6603e+00,\n", + " -8.0075e-04, -2.7147e-04],\n", + " ...,\n", + " [-2.3853e-03, 2.9674e-01, 2.2471e-01, ..., 1.5635e+00,\n", + " -1.6731e-03, -1.3464e-03],\n", + " [-7.1789e-04, 1.3095e-01, 3.2230e-01, ..., 1.7951e+00,\n", + " 1.2089e-01, 6.3322e-02],\n", + " [-3.4376e-04, 2.2838e-01, 1.2376e-01, ..., 1.8094e+00,\n", + " 2.9255e-01, 1.7058e-01]], device='cuda:0'), 'field_of_study': tensor([[ 0.0820, 0.7518, 0.5370, ..., -0.0083, 0.2186, 0.4126],\n", + " [ 0.0701, 0.6611, 0.3249, ..., -0.0084, 0.2881, 0.3409],\n", + " [ 0.0627, 0.8266, 0.5090, ..., -0.0090, 0.2885, 0.4716],\n", + " ...,\n", + " [ 0.0485, 0.6608, 0.3503, ..., -0.0069, 0.3886, 0.2848],\n", + " [ 0.0505, 0.7737, 0.4831, ..., -0.0099, 0.2539, 0.5047],\n", + " [ 0.0742, 0.9372, 0.5955, ..., -0.0117, 0.3814, 0.6117]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 198, 159, 159, 276, 271, 216, 284, 336, 421, 421, 421, 1002,\n", + " 1042, 682, 947, 801, 405, 644, 590, 589, 724, 743, 852, 949,\n", + " 1180, 1180, 1268, 1091, 1086, 1179, 1564, 1346, 1436, 1505, 1516, 1585,\n", + " 1638, 1682, 1698, 1645, 1754, 1562, 1562, 1657, 1590, 1563, 1712, 1702,\n", + " 1929, 1927, 1924, 1966, 2118, 2150, 2003, 2003, 2290, 2099, 2093, 2146,\n", + " 2351, 2481, 2448, 2475, 2405, 2581, 2667, 2689, 2507, 2717, 2717, 2796,\n", + " 2731, 2731, 3038, 3072, 3167, 3130, 3130, 3241, 3241, 3250, 3186, 3186,\n", + " 3255, 3255, 3547, 3310, 3310, 3469, 3469, 3442, 3469, 3469, 3481, 3760,\n", + " 3774, 3746, 3668, 3978, 3889, 3608, 3832, 3910, 3910, 4005, 4168, 4215,\n", + " 4214, 4250, 4250, 4271, 4338, 4508, 4477, 4477, 4577, 4660, 4783, 4660,\n", + " 4550, 4884, 4939, 4803, 4935, 4981, 4931, 4863, 4863, 4863, 5119, 5063,\n", + " 5145, 5145, 5227, 5227, 5205, 5163, 5209, 5224, 5224, 5410, 5410, 5326,\n", + " 5358, 5551, 5551, 5217, 5333, 5415, 5415, 5455, 5455, 5446, 5982, 5982,\n", + " 5734, 5734, 5734, 5393, 5778, 5778, 5578, 5501, 5632, 6239, 6022, 5803,\n", + " 5803, 5578, 5722, 5784, 5784, 6440, 6440, 5843, 5843, 6104, 6098, 6098,\n", + " 6098, 6073, 5943, 6026, 6062, 6254, 6362, 6164, 6276, 6276, 6299, 6325,\n", + " 6405],\n", + " [ 86, 0, 115, 60, 39, 57, 4, 31, 13, 107, 95, 52,\n", + " 35, 74, 5, 0, 3, 123, 98, 114, 42, 104, 30, 25,\n", + " 35, 12, 101, 53, 123, 124, 84, 18, 107, 57, 90, 32,\n", + " 85, 78, 76, 17, 64, 37, 113, 90, 83, 119, 46, 85,\n", + " 21, 112, 67, 118, 75, 75, 63, 68, 57, 1, 9, 6,\n", + " 105, 97, 96, 32, 52, 84, 50, 111, 56, 43, 34, 3,\n", + " 40, 108, 94, 58, 0, 55, 32, 19, 15, 68, 87, 24,\n", + " 26, 117, 57, 20, 78, 28, 70, 82, 65, 94, 0, 39,\n", + " 68, 0, 64, 84, 33, 68, 100, 45, 66, 14, 59, 110,\n", + " 102, 74, 93, 7, 22, 27, 43, 34, 61, 6, 75, 91,\n", + " 68, 8, 22, 30, 121, 75, 8, 33, 47, 73, 99, 38,\n", + " 123, 7, 92, 103, 69, 109, 106, 62, 2, 89, 86, 120,\n", + " 54, 99, 71, 72, 49, 88, 75, 43, 34, 57, 51, 75,\n", + " 39, 16, 116, 104, 8, 75, 122, 46, 75, 81, 75, 44,\n", + " 75, 76, 11, 27, 75, 41, 75, 10, 75, 36, 48, 80,\n", + " 75, 123, 25, 23, 75, 29, 125, 60, 77, 75, 20, 22,\n", + " 79]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 889, 1306, 1817, ..., 1154, 4225, 5745],\n", + " [ 63, 31, 75, ..., 6321, 6470, 6509]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 76, 24, 57, ..., 118, 68, 43],\n", + " [ 148, 15, 71, ..., 6471, 6283, 6462]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 96, 96, 96, ..., 6418, 6418, 6418],\n", + " [ 201, 391, 488, ..., 318, 344, 362]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 289, 391, 258, ..., 289, 399, 739],\n", + " [ 253, 220, 317, ..., 6489, 6451, 6346]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 401, 829, 1521, ..., 6387, 5368, 5254],\n", + " [ 72, 72, 33, ..., 6393, 6379, 6405]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 96, 96, 96, ..., 6514, 6514, 6514],\n", + " [2327, 1206, 1575, ..., 5314, 4720, 4747]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 28, 28, 28, ..., 6405, 6405, 6405],\n", + " [5715, 5680, 6099, ..., 5571, 5254, 5436]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005681\n", + "sampling 0.005529\n", + "noi time: 0.001608\n", + "get_vertex_data call: 0.026152\n", + "noi group time: 0.002546\n", + "eoi_group_time: 0.013353\n", + "second half: 0.192122\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 1902, 31145, 24187, ..., 1131756, 1133072, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 1902, 31145, 24187, ..., 1131756, 1133072, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1231438, 1203800, 1223056, ..., 1933659, 1929219, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1231438, 1203800, 1223056, ..., 1933659, 1929219, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136225, 1136231, 1140285, 1135926, 1140799, 1141756, 1141758, 1138335,\n", + " 1141251, 1141250, 1142813, 1136965, 1136969, 1141443, 1146803, 1143600,\n", + " 1149826, 1149831, 1139811, 1139141, 1146647, 1139865, 1153938, 1135251,\n", + " 1149038, 1146995, 1147000, 1147102, 1155014, 1155019, 1152427, 1137254,\n", + " 1149457, 1149461, 1134735, 1140020, 1135367, 1135202, 1140767, 1134975,\n", + " 1141036, 1136777, 1134794, 1157443, 1138504, 1137329, 1157088, 1137693,\n", + " 1144787, 1144395, 1137534, 1135408, 1136714, 1157393, 1136662, 1137441,\n", + " 1143321, 1156149, 1156159, 1148484, 1134841, 1135583, 1142593, 1141084,\n", + " 1136097, 1155081, 1140970, 1137957, 1158136, 1135494, 1135499, 1136978,\n", + " 1135522, 1139684, 1138305, 1137287, 1136352, 1157703, 1138436, 1138461,\n", + " 1137491, 1154790, 1137924, 1149328, 1138845, 1156603, 1156606, 1147112,\n", + " 1142611, 1135359, 1145842, 1150948, 1137109, 1141533, 1138079, 1142243,\n", + " 1134992, 1159019, 1141070, 1153543, 1153544, 1140034, 1139087, 1139933,\n", + " 1139927, 1138148, 1141963, 1141966, 1155661, 1152044, 1137728, 1147313,\n", + " 1134742, 1134750, 1137005, 1136700, 1141088, 1141095, 1141097, 1141098,\n", + " 1149003, 1154855, 1154860, 1143711, 1143221, 1140007, 1146832, 1146847,\n", + " 1154467, 1139436, 1141223, 1141901, 1139386, 1143673, 1137186, 1141161,\n", + " 1146452, 1138785, 1144941, 1168566, 1134979, 1144428, 1138490, 1141821,\n", + " 1158749, 1138473, 1138706, 1138713, 1138715, 1138708, 1142914, 1143111,\n", + " 1144596, 1136867, 1145298, 1135322, 1144182, 1139559, 1137854, 1147153,\n", + " 1136376, 1136371, 1141367, 1149090, 1153556, 1139510, 1139763, 1143779,\n", + " 1164531, 1140990, 1135046, 1147050, 1147045, 1145873, 1155826, 1149876,\n", + " 1152976, 1139003, 1141925, 1144242, 1140585, 1148313, 1136885, 1139392,\n", + " 1143637, 1137571, 1145983, 1143851, 1136275, 1142098, 1146024, 1146141,\n", + " 1141585, 1142533, 1139990, 1143283, 1143294, 1151128, 1147540, 1147282,\n", + " 1142829, 1142816, 1143652, 1142635, 1142637, 1149608, 1143051, 1148414,\n", + " 1142578, 1157720, 1136836, 1136843, 1146099, 1139297, 1139301, 1139329,\n", + " 1143345, 1144766, 1144753, 1144615, 1140844, 1135874, 1150294, 1146514,\n", + " 1146523, 1143960, 1138024, 1143456, 1144291, 1144298, 1144568, 1143937,\n", + " 1147574, 1143803, 1147521, 1140364, 1137990, 1144222, 1147984, 1147999,\n", + " 1134899, 1134902, 1144013, 1147244, 1148704, 1148719, 1150996, 1141314,\n", + " 1141836, 1146742, 1152328, 1143434, 1149718, 1147033, 1142858, 1158226,\n", + " 1141137, 1154526, 1145240, 1145750, 1145751, 1142376, 1138626, 1138638,\n", + " 1146178, 1151242, 1150445, 1149791, 1144521, 1141349, 1150348, 1150341,\n", + " 1165252, 1165253, 1147794, 1151473, 1151050, 1139919, 1146723, 1147009,\n", + " 1141949, 1150744, 1167220, 1147764, 1149996, 1154985, 1147653, 1152073,\n", + " 1135083, 1151421, 1154420, 1148180, 1152561, 1136247, 1139721, 1139718,\n", + " 1146686, 1138409, 1141181, 1157983, 1148720, 1148724, 1148729, 1166304,\n", + " 1153179, 1171943, 1153124, 1153188, 1153197, 1145104, 1173078, 1143129,\n", + " 1147442, 1135311, 1148498, 1141420, 1151351, 1148949, 1146969, 1146967,\n", + " 1146616, 1146623, 1142986, 1135688, 1152849, 1152097, 1152099, 1156325,\n", + " 1153039, 1137746, 1137755, 1146304, 1155137, 1155337, 1157842, 1154638,\n", + " 1139575, 1151617, 1150586, 1136131, 1144533, 1140929, 1152903, 1151298,\n", + " 1152341, 1153302, 1153310, 1138281, 1156001, 1136028, 1158704, 1156608,\n", + " 1140682, 1140674, 1152928, 1153909, 1150161, 1144016, 1148040, 1155202,\n", + " 1149300, 1145656, 1144661, 1137048, 1148628, 1158530, 1158540, 1137458,\n", + " 1154378, 1157547, 1158912, 1158924, 1154929, 1156505, 1157064, 1155422,\n", + " 1150465, 1142221, 1135729, 1135730, 1156638, 1150824, 1158304, 1158308,\n", + " 1158311, 1155441, 1150130, 1150136, 1162117, 1154530, 1154528, 1153999,\n", + " 1142758, 1151380, 1151379, 1137918, 1158639, 1140187, 1140186, 1155122,\n", + " 1152527, 1157183, 1156463, 1158096, 1155675, 1155628, 1154555, 1158574,\n", + " 1158824, 1158325, 1156994, 1148835, 1155646, 1154644, 1161287, 1154902,\n", + " 1154909, 1143189, 1153322, 1157430, 1150984, 1150987, 1155293, 1143517,\n", + " 1157288, 1137152, 1180900, 1159006, 1149907, 1158193, 1159116, 1134677,\n", + " 1135601, 1135614, 1148147, 1150661, 1150671, 1155854, 1155848, 1158665,\n", + " 1157685, 1157684, 1146323, 1149145, 1140634, 1156693, 1140380, 1140374,\n", + " 1159131, 1159132, 1159120, 1163681, 1160428, 1155975, 1158841, 1156812,\n", + " 1154600, 1161300, 1180777, 1136899, 1136905, 1158753, 1140218, 1158436,\n", + " 1158442, 1158285, 1151615, 1136487, 1136494, 1155309, 1156490, 1153808,\n", + " 1136642, 1134757, 1158558, 1153827, 1146126, 1138101, 1150011, 1155521,\n", + " 1161539, 1142666, 1159070, 1159141, 1142427, 1153052, 1173005, 1156235,\n", + " 1153842, 1138384, 1138393, 1150046, 1149063, 1145948, 1155479, 1153519,\n", + " 1156787, 1149956, 1136806, 1162744, 1140729, 1169315, 1157357, 1164430,\n", + " 1158461, 1140135, 1140641, 1140650, 1140643, 1143139, 1159632, 1163201,\n", + " 1154285, 1141800, 1169108, 1160335, 1138674, 1153924, 1148571, 1149015,\n", + " 1167682, 1144737, 1141471, 1141459, 1147427, 1163798, 1156737, 1156739,\n", + " 1166591, 1144810, 1144812, 1135567, 1165716, 1162613, 1148683, 1145567,\n", + " 1154700, 1147676, 1150531, 1144973, 1165756, 1170506, 1152624, 1148124,\n", + " 1145892, 1145900, 1145902, 1168659, 1152203, 1175240, 1187284, 1158724,\n", + " 1158734, 1154076, 1168754, 1147330, 1169602, 1171982, 1166653, 1169224,\n", + " 1155172, 1150518, 1177236, 1144346, 1157534, 1138378, 1154670, 1152998,\n", + " 1169154, 1138129, 1141043, 1169359, 1150027, 1154353, 1154354, 1149447,\n", + " 1138609, 1158611, 1158623, 1149847, 1160135, 1155494, 1152353, 1152362,\n", + " 1192131, 1149395, 1173307, 1188761, 1169144, 1154027, 1152150, 1153751,\n", + " 1159658, 1159655, 1167857, 1151704, 1157153, 1157373, 1147711, 1157593,\n", + " 1135018, 1160984, 1177614, 1140326, 1166351, 1160150, 1171614, 1153428,\n", + " 1170554, 1169083, 1171817, 1171823, 1179560, 1150234, 1154148, 1158176,\n", + " 1149169, 1169821, 1182416, 1143420, 1153803, 1161024, 1161039, 1172314,\n", + " 1180915, 1184093, 1162129, 1159913, 1177581, 1157792, 1157795, 1143343,\n", + " 1171623, 1171380, 1158249, 1158253, 1153902, 1145597, 1145626, 1172024,\n", + " 1161911, 1155990, 1158512, 1158934, 1155892, 1155899, 1171590, 1170625,\n", + " 1169062, 1169064, 1168886, 1165478, 1165487, 1179125, 1190103, 1147172,\n", + " 1147182, 1141506, 1183983, 1139831, 1139837, 1150262, 1163848, 1156055,\n", + " 1173065, 1186653, 1189624, 1185009, 1169963, 1193786, 1189256, 1171116,\n", + " 1162502, 1171713, 1153585, 1185165, 1189650, 1177850, 1150406, 1180999,\n", + " 1172423, 1158064, 1158070, 1145392, 1174606, 1183149, 1155962, 1187854,\n", + " 1183804, 1178306, 1192792], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136225, 1136231, 1140285, 1135926, 1140799, 1141756, 1141758, 1138335,\n", + " 1141251, 1141250, 1142813, 1136965, 1136969, 1141443, 1146803, 1143600,\n", + " 1149826, 1149831, 1139811, 1139141, 1146647, 1139865, 1153938, 1135251,\n", + " 1149038, 1146995, 1147000, 1147102, 1155014, 1155019, 1152427, 1137254,\n", + " 1149457, 1149461, 1134735, 1140020, 1135367, 1135202, 1140767, 1134975,\n", + " 1141036, 1136777, 1134794, 1157443, 1138504, 1137329, 1157088, 1137693,\n", + " 1144787, 1144395, 1137534, 1135408, 1136714, 1157393, 1136662, 1137441,\n", + " 1143321, 1156149, 1156159, 1148484, 1134841, 1135583, 1142593, 1141084,\n", + " 1136097, 1155081, 1140970, 1137957, 1158136, 1135494, 1135499, 1136978,\n", + " 1135522, 1139684, 1138305, 1137287, 1136352, 1157703, 1138436, 1138461,\n", + " 1137491, 1154790, 1137924, 1149328, 1138845, 1156603, 1156606, 1147112,\n", + " 1142611, 1135359, 1145842, 1150948, 1137109, 1141533, 1138079, 1142243,\n", + " 1134992, 1159019, 1141070, 1153543, 1153544, 1140034, 1139087, 1139933,\n", + " 1139927, 1138148, 1141963, 1141966, 1155661, 1152044, 1137728, 1147313,\n", + " 1134742, 1134750, 1137005, 1136700, 1141088, 1141095, 1141097, 1141098,\n", + " 1149003, 1154855, 1154860, 1143711, 1143221, 1140007, 1146832, 1146847,\n", + " 1154467, 1139436, 1141223, 1141901, 1139386, 1143673, 1137186, 1141161,\n", + " 1146452, 1138785, 1144941, 1168566, 1134979, 1144428, 1138490, 1141821,\n", + " 1158749, 1138473, 1138706, 1138713, 1138715, 1138708, 1142914, 1143111,\n", + " 1144596, 1136867, 1145298, 1135322, 1144182, 1139559, 1137854, 1147153,\n", + " 1136376, 1136371, 1141367, 1149090, 1153556, 1139510, 1139763, 1143779,\n", + " 1164531, 1140990, 1135046, 1147050, 1147045, 1145873, 1155826, 1149876,\n", + " 1152976, 1139003, 1141925, 1144242, 1140585, 1148313, 1136885, 1139392,\n", + " 1143637, 1137571, 1145983, 1143851, 1136275, 1142098, 1146024, 1146141,\n", + " 1141585, 1142533, 1139990, 1143283, 1143294, 1151128, 1147540, 1147282,\n", + " 1142829, 1142816, 1143652, 1142635, 1142637, 1149608, 1143051, 1148414,\n", + " 1142578, 1157720, 1136836, 1136843, 1146099, 1139297, 1139301, 1139329,\n", + " 1143345, 1144766, 1144753, 1144615, 1140844, 1135874, 1150294, 1146514,\n", + " 1146523, 1143960, 1138024, 1143456, 1144291, 1144298, 1144568, 1143937,\n", + " 1147574, 1143803, 1147521, 1140364, 1137990, 1144222, 1147984, 1147999,\n", + " 1134899, 1134902, 1144013, 1147244, 1148704, 1148719, 1150996, 1141314,\n", + " 1141836, 1146742, 1152328, 1143434, 1149718, 1147033, 1142858, 1158226,\n", + " 1141137, 1154526, 1145240, 1145750, 1145751, 1142376, 1138626, 1138638,\n", + " 1146178, 1151242, 1150445, 1149791, 1144521, 1141349, 1150348, 1150341,\n", + " 1165252, 1165253, 1147794, 1151473, 1151050, 1139919, 1146723, 1147009,\n", + " 1141949, 1150744, 1167220, 1147764, 1149996, 1154985, 1147653, 1152073,\n", + " 1135083, 1151421, 1154420, 1148180, 1152561, 1136247, 1139721, 1139718,\n", + " 1146686, 1138409, 1141181, 1157983, 1148720, 1148724, 1148729, 1166304,\n", + " 1153179, 1171943, 1153124, 1153188, 1153197, 1145104, 1173078, 1143129,\n", + " 1147442, 1135311, 1148498, 1141420, 1151351, 1148949, 1146969, 1146967,\n", + " 1146616, 1146623, 1142986, 1135688, 1152849, 1152097, 1152099, 1156325,\n", + " 1153039, 1137746, 1137755, 1146304, 1155137, 1155337, 1157842, 1154638,\n", + " 1139575, 1151617, 1150586, 1136131, 1144533, 1140929, 1152903, 1151298,\n", + " 1152341, 1153302, 1153310, 1138281, 1156001, 1136028, 1158704, 1156608,\n", + " 1140682, 1140674, 1152928, 1153909, 1150161, 1144016, 1148040, 1155202,\n", + " 1149300, 1145656, 1144661, 1137048, 1148628, 1158530, 1158540, 1137458,\n", + " 1154378, 1157547, 1158912, 1158924, 1154929, 1156505, 1157064, 1155422,\n", + " 1150465, 1142221, 1135729, 1135730, 1156638, 1150824, 1158304, 1158308,\n", + " 1158311, 1155441, 1150130, 1150136, 1162117, 1154530, 1154528, 1153999,\n", + " 1142758, 1151380, 1151379, 1137918, 1158639, 1140187, 1140186, 1155122,\n", + " 1152527, 1157183, 1156463, 1158096, 1155675, 1155628, 1154555, 1158574,\n", + " 1158824, 1158325, 1156994, 1148835, 1155646, 1154644, 1161287, 1154902,\n", + " 1154909, 1143189, 1153322, 1157430, 1150984, 1150987, 1155293, 1143517,\n", + " 1157288, 1137152, 1180900, 1159006, 1149907, 1158193, 1159116, 1134677,\n", + " 1135601, 1135614, 1148147, 1150661, 1150671, 1155854, 1155848, 1158665,\n", + " 1157685, 1157684, 1146323, 1149145, 1140634, 1156693, 1140380, 1140374,\n", + " 1159131, 1159132, 1159120, 1163681, 1160428, 1155975, 1158841, 1156812,\n", + " 1154600, 1161300, 1180777, 1136899, 1136905, 1158753, 1140218, 1158436,\n", + " 1158442, 1158285, 1151615, 1136487, 1136494, 1155309, 1156490, 1153808,\n", + " 1136642, 1134757, 1158558, 1153827, 1146126, 1138101, 1150011, 1155521,\n", + " 1161539, 1142666, 1159070, 1159141, 1142427, 1153052, 1173005, 1156235,\n", + " 1153842, 1138384, 1138393, 1150046, 1149063, 1145948, 1155479, 1153519,\n", + " 1156787, 1149956, 1136806, 1162744, 1140729, 1169315, 1157357, 1164430,\n", + " 1158461, 1140135, 1140641, 1140650, 1140643, 1143139, 1159632, 1163201,\n", + " 1154285, 1141800, 1169108, 1160335, 1138674, 1153924, 1148571, 1149015,\n", + " 1167682, 1144737, 1141471, 1141459, 1147427, 1163798, 1156737, 1156739,\n", + " 1166591, 1144810, 1144812, 1135567, 1165716, 1162613, 1148683, 1145567,\n", + " 1154700, 1147676, 1150531, 1144973, 1165756, 1170506, 1152624, 1148124,\n", + " 1145892, 1145900, 1145902, 1168659, 1152203, 1175240, 1187284, 1158724,\n", + " 1158734, 1154076, 1168754, 1147330, 1169602, 1171982, 1166653, 1169224,\n", + " 1155172, 1150518, 1177236, 1144346, 1157534, 1138378, 1154670, 1152998,\n", + " 1169154, 1138129, 1141043, 1169359, 1150027, 1154353, 1154354, 1149447,\n", + " 1138609, 1158611, 1158623, 1149847, 1160135, 1155494, 1152353, 1152362,\n", + " 1192131, 1149395, 1173307, 1188761, 1169144, 1154027, 1152150, 1153751,\n", + " 1159658, 1159655, 1167857, 1151704, 1157153, 1157373, 1147711, 1157593,\n", + " 1135018, 1160984, 1177614, 1140326, 1166351, 1160150, 1171614, 1153428,\n", + " 1170554, 1169083, 1171817, 1171823, 1179560, 1150234, 1154148, 1158176,\n", + " 1149169, 1169821, 1182416, 1143420, 1153803, 1161024, 1161039, 1172314,\n", + " 1180915, 1184093, 1162129, 1159913, 1177581, 1157792, 1157795, 1143343,\n", + " 1171623, 1171380, 1158249, 1158253, 1153902, 1145597, 1145626, 1172024,\n", + " 1161911, 1155990, 1158512, 1158934, 1155892, 1155899, 1171590, 1170625,\n", + " 1169062, 1169064, 1168886, 1165478, 1165487, 1179125, 1190103, 1147172,\n", + " 1147182, 1141506, 1183983, 1139831, 1139837, 1150262, 1163848, 1156055,\n", + " 1173065, 1186653, 1189624, 1185009, 1169963, 1193786, 1189256, 1171116,\n", + " 1162502, 1171713, 1153585, 1185165, 1189650, 1177850, 1150406, 1180999,\n", + " 1172423, 1158064, 1158070, 1145392, 1174606, 1183149, 1155962, 1187854,\n", + " 1183804, 1178306, 1192792], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1198248, 1198730, 1200230, 1199282, 1202255, 1198844, 1201577,\n", + " 1201582, 1203044, 1197351, 1197355, 1196956, 1202801, 1196685, 1194745,\n", + " 1194783, 1196624, 1196631, 1194648, 1195511, 1195514, 1196534, 1197697,\n", + " 1195888, 1195895, 1195740, 1196334, 1195313, 1196835, 1197803, 1198268,\n", + " 1195982, 1198163, 1196705, 1196711, 1195148, 1195223, 1195265, 1196247,\n", + " 1195541, 1199317, 1197474, 1197478, 1195351, 1195353, 1198282, 1200949,\n", + " 1197291, 1194928, 1197990, 1202457, 1200872, 1199152, 1199154, 1199038,\n", + " 1199231, 1194786, 1199951, 1201511, 1199018, 1195792, 1197601, 1197609,\n", + " 1196727, 1198428, 1200155, 1199410, 1199421, 1199900, 1201528, 1200779,\n", + " 1201824, 1202430, 1200503, 1196479, 1198797, 1196999, 1201156, 1202630,\n", + " 1200991, 1200918, 1199712, 1199723, 1201737, 1200553, 1200555, 1200557,\n", + " 1200315, 1200429, 1202138, 1203230, 1196883, 1201442, 1202239, 1199976,\n", + " 1201291, 1198472, 1196761, 1197553, 1203329, 1199929, 1200398, 1196963,\n", + " 1196966, 1202876, 1200784, 1199606, 1195048, 1195676, 1202432, 1200445,\n", + " 1198929, 1198911, 1195421, 1197059, 1197822, 1197495, 1194898, 1200585,\n", + " 1199661, 1197735, 1200437, 1199782, 1199787, 1200468, 1195066, 1201886,\n", + " 1197652, 1194908, 1201761, 1201966, 1196428, 1197872], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1198248, 1198730, 1200230, 1199282, 1202255, 1198844, 1201577,\n", + " 1201582, 1203044, 1197351, 1197355, 1196956, 1202801, 1196685, 1194745,\n", + " 1194783, 1196624, 1196631, 1194648, 1195511, 1195514, 1196534, 1197697,\n", + " 1195888, 1195895, 1195740, 1196334, 1195313, 1196835, 1197803, 1198268,\n", + " 1195982, 1198163, 1196705, 1196711, 1195148, 1195223, 1195265, 1196247,\n", + " 1195541, 1199317, 1197474, 1197478, 1195351, 1195353, 1198282, 1200949,\n", + " 1197291, 1194928, 1197990, 1202457, 1200872, 1199152, 1199154, 1199038,\n", + " 1199231, 1194786, 1199951, 1201511, 1199018, 1195792, 1197601, 1197609,\n", + " 1196727, 1198428, 1200155, 1199410, 1199421, 1199900, 1201528, 1200779,\n", + " 1201824, 1202430, 1200503, 1196479, 1198797, 1196999, 1201156, 1202630,\n", + " 1200991, 1200918, 1199712, 1199723, 1201737, 1200553, 1200555, 1200557,\n", + " 1200315, 1200429, 1202138, 1203230, 1196883, 1201442, 1202239, 1199976,\n", + " 1201291, 1198472, 1196761, 1197553, 1203329, 1199929, 1200398, 1196963,\n", + " 1196966, 1202876, 1200784, 1199606, 1195048, 1195676, 1202432, 1200445,\n", + " 1198929, 1198911, 1195421, 1197059, 1197822, 1197495, 1194898, 1200585,\n", + " 1199661, 1197735, 1200437, 1199782, 1199787, 1200468, 1195066, 1201886,\n", + " 1197652, 1194908, 1201761, 1201966, 1196428, 1197872], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 1.4962e-01, 1.1184e-02, 7.8071e-01, ..., 1.4384e-01,\n", + " -1.7980e-03, -4.7033e-03],\n", + " [ 1.3429e-01, -3.3774e-04, 7.5808e-01, ..., 1.3432e-01,\n", + " -1.9837e-03, -4.9373e-03],\n", + " [ 2.4017e-01, -3.7581e-04, 9.9095e-01, ..., 1.1816e-01,\n", + " -1.8921e-03, -6.5153e-03],\n", + " ...,\n", + " [ 2.3538e-01, -3.3158e-04, 9.6178e-01, ..., 1.2248e-01,\n", + " -2.0182e-03, -6.3460e-03],\n", + " [ 2.5493e-01, -4.4015e-04, 1.0174e+00, ..., 1.0785e-01,\n", + " -1.7346e-03, -6.7316e-03],\n", + " [ 2.2244e-01, -6.8014e-04, 1.0242e+00, ..., 1.2189e-01,\n", + " -1.9442e-03, -6.8474e-03]], device='cuda:0'), 'paper': tensor([[ 3.4902e-01, -1.2533e-04, 2.5846e+00, ..., -6.4320e-03,\n", + " -3.0300e-02, -3.9592e-03],\n", + " [ 1.8629e+00, 1.2151e+00, 3.6363e+00, ..., 1.8086e+00,\n", + " -5.5502e-02, 3.7050e+00],\n", + " [-2.5916e-03, 8.2397e-01, 3.4019e+00, ..., -1.1425e-02,\n", + " -3.0918e-02, -1.5565e-02],\n", + " ...,\n", + " [ 7.4033e-01, 3.0759e-01, 4.8995e+00, ..., 1.4716e-02,\n", + " -4.3975e-02, 2.5945e-01],\n", + " [ 1.2189e+00, 1.2825e+00, 3.2348e+00, ..., 5.9787e-01,\n", + " -4.0712e-02, 1.4781e+00],\n", + " [ 1.8849e+00, 1.5514e+00, 3.4578e+00, ..., 2.5420e+00,\n", + " -5.8223e-02, 4.1994e+00]], device='cuda:0'), 'author': tensor([[-6.2942e-04, 2.9830e-02, 1.2906e-01, ..., 1.6955e-01,\n", + " -1.0748e-04, -6.7757e-04],\n", + " [-1.2126e-03, 2.1661e-01, 2.7407e-01, ..., 1.7096e+00,\n", + " 8.7549e-02, 4.6903e-02],\n", + " [-1.8205e-03, 3.4610e-01, 2.6584e-01, ..., 1.6963e+00,\n", + " -1.2218e-03, -7.8609e-04],\n", + " ...,\n", + " [-4.4792e-03, 3.0359e-01, 3.0204e-01, ..., 1.2937e+00,\n", + " -3.5922e-03, -5.4613e-03],\n", + " [-3.2412e-03, 3.5070e-01, 2.7817e-01, ..., 1.3691e+00,\n", + " -2.8817e-03, -3.1414e-03],\n", + " [-1.4256e-03, 2.7100e-01, 1.8311e-01, ..., 1.5839e+00,\n", + " 5.0640e-02, 3.7668e-02]], device='cuda:0'), 'field_of_study': tensor([[ 0.0455, 0.8825, 0.6200, ..., -0.0122, 0.4037, 0.5637],\n", + " [ 0.1576, 0.5687, 0.2822, ..., -0.0060, 0.2212, 0.1903],\n", + " [ 0.3468, 0.9209, 0.5953, ..., -0.0071, 0.2829, -0.0010],\n", + " ...,\n", + " [ 0.1079, 0.6509, 0.4262, ..., -0.0081, 0.1087, 0.4522],\n", + " [ 0.0272, 0.7383, 0.4565, ..., -0.0103, 0.3419, 0.4881],\n", + " [ 0.0783, 0.8847, 0.6318, ..., -0.0101, 0.2864, 0.5674]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 56, 48, 200, 30, 91, 115, 115, 149, 525, 438, 234, 358,\n", + " 446, 405, 585, 585, 546, 586, 569, 569, 721, 962, 1004, 1102,\n", + " 1071, 846, 800, 849, 877, 1084, 1512, 1432, 1418, 1483, 1395, 1395,\n", + " 1395, 1395, 1504, 1517, 1842, 1842, 1395, 1395, 1505, 1505, 1606, 1860,\n", + " 1712, 1588, 1656, 1804, 1783, 1932, 1932, 1909, 2256, 1988, 2145, 2162,\n", + " 2162, 2162, 2117, 1980, 2162, 2162, 2162, 2162, 2162, 2110, 2165, 2165,\n", + " 2165, 2165, 2165, 2319, 2347, 2416, 2416, 2383, 2519, 2335, 2335, 2335,\n", + " 2335, 2468, 2733, 2611, 2392, 2666, 2624, 2602, 2660, 2702, 2761, 2584,\n", + " 3015, 3015, 3015, 3015, 3015, 2830, 3084, 3066, 2989, 3059, 3100, 3133,\n", + " 3020, 3072, 3323, 3230, 3275, 3275, 3403, 3340, 3571, 3571, 3502, 3448,\n", + " 3756, 3837, 3879, 3835, 3711, 3987, 3953, 3997, 4041, 4041, 4104, 4078,\n", + " 4095, 4107, 4053, 4083, 4100, 4351, 4412, 4341, 4373, 4373, 4336, 4338,\n", + " 4404, 4404, 4523, 4523, 4523, 4523, 4576, 4576, 4553, 4430, 4557, 4702,\n", + " 4730, 4780, 4911, 5003, 5058, 5157, 5157, 5132, 5277, 5142, 5142, 5242,\n", + " 5242, 5421, 5421, 5402, 5402, 5326, 5224, 5224, 5224, 5199, 5892, 5831,\n", + " 5831, 5831, 5440, 5440, 5234, 5643, 5754, 6020, 6020, 6020, 5756, 5708,\n", + " 5815, 5967, 5967, 5730, 6280, 6280, 5922, 6226, 6045, 6130, 6130, 6051,\n", + " 6051, 6274, 6254, 6254, 6122, 6122, 6312, 6499, 6296],\n", + " [ 87, 112, 87, 8, 74, 64, 132, 114, 0, 116, 64, 114,\n", + " 29, 4, 1, 81, 44, 35, 94, 67, 62, 51, 114, 16,\n", + " 93, 124, 63, 89, 61, 64, 14, 49, 88, 129, 22, 104,\n", + " 15, 33, 117, 0, 84, 59, 78, 47, 108, 98, 58, 80,\n", + " 26, 110, 12, 110, 57, 72, 37, 31, 43, 71, 31, 52,\n", + " 85, 96, 110, 76, 36, 28, 19, 46, 102, 64, 37, 106,\n", + " 96, 125, 10, 1, 23, 90, 120, 58, 75, 60, 54, 4,\n", + " 51, 132, 75, 1, 7, 95, 24, 131, 117, 3, 109, 0,\n", + " 95, 86, 56, 55, 72, 1, 40, 61, 25, 113, 27, 53,\n", + " 70, 129, 40, 4, 83, 34, 45, 31, 100, 65, 101, 113,\n", + " 17, 68, 18, 73, 82, 57, 83, 130, 42, 128, 21, 121,\n", + " 5, 83, 20, 4, 4, 113, 39, 64, 77, 115, 92, 118,\n", + " 62, 128, 91, 105, 97, 24, 84, 59, 119, 18, 128, 66,\n", + " 32, 9, 35, 30, 126, 129, 69, 99, 5, 103, 64, 78,\n", + " 64, 116, 64, 26, 64, 8, 64, 48, 2, 45, 111, 82,\n", + " 64, 127, 107, 64, 122, 61, 50, 11, 6, 33, 64, 39,\n", + " 99, 15, 64, 13, 5, 64, 50, 65, 41, 114, 64, 64,\n", + " 79, 26, 64, 35, 38, 64, 123, 133, 107]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2220, 396, 2220, ..., 1290, 1182, 472],\n", + " [ 32, 283, 144, ..., 6370, 6391, 6415]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 73, 73, 69, ..., 73, 23, 64],\n", + " [ 45, 77, 101, ..., 6414, 6182, 6498]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 12, 12, 12, ..., 6286, 6286, 6429],\n", + " [ 275, 413, 453, ..., 659, 244, 101]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 206, 244, 364, ..., 453, 244, 500],\n", + " [ 85, 58, 95, ..., 6233, 6321, 6359]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4913, 4029, 5690, ..., 3635, 3201, 5402],\n", + " [ 25, 15, 103, ..., 6440, 6391, 6405]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 12, 12, 133, ..., 6314, 6416, 6416],\n", + " [ 565, 2931, 558, ..., 1456, 572, 2164]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 56, 56, 56, ..., 6438, 6438, 6438],\n", + " [3063, 5849, 5972, ..., 6158, 6083, 6094]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.007146\n", + "sampling 0.006974\n", + "noi time: 0.002204\n", + "get_vertex_data call: 0.033407\n", + "noi group time: 0.002611\n", + "eoi_group_time: 0.01289\n", + "second half: 0.18995\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24187, 32616, 16542, ..., 1128739, 1119042, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24187, 32616, 16542, ..., 1128739, 1119042, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1215972, 1203800, ..., 1914439, 1925034, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1215972, 1203800, ..., 1914439, 1925034, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1140282, 1135165, 1135160, 1140785, 1141758, 1136208, 1136223,\n", + " 1142525, 1136962, 1136965, 1136971, 1141442, 1139808, 1139811, 1154770,\n", + " 1146983, 1137271, 1139142, 1145055, 1143372, 1150509, 1139865, 1142958,\n", + " 1143820, 1147473, 1141877, 1142881, 1144632, 1138347, 1138345, 1136742,\n", + " 1147095, 1137220, 1155019, 1139373, 1139371, 1150322, 1152416, 1134707,\n", + " 1134715, 1136268, 1146376, 1134807, 1140305, 1137829, 1140537, 1140540,\n", + " 1138112, 1138356, 1140147, 1140159, 1134720, 1140952, 1140953, 1162460,\n", + " 1135367, 1135370, 1135202, 1135903, 1134969, 1134794, 1157443, 1157447,\n", + " 1138504, 1136178, 1143064, 1137693, 1144395, 1137534, 1152376, 1137441,\n", + " 1156149, 1148484, 1135574, 1142607, 1156347, 1138514, 1153099, 1137957,\n", + " 1156899, 1135522, 1139684, 1138305, 1138436, 1138440, 1138461, 1156606,\n", + " 1147112, 1147116, 1142611, 1142615, 1135624, 1138185, 1148531, 1150958,\n", + " 1137422, 1135769, 1139673, 1139674, 1139664, 1142243, 1134992, 1142434,\n", + " 1136548, 1148800, 1135781, 1135782, 1136730, 1158974, 1144406, 1153544,\n", + " 1138648, 1138148, 1141964, 1140549, 1152044, 1137734, 1137728, 1146212,\n", + " 1134750, 1137001, 1135549, 1140228, 1149001, 1139898, 1141977, 1137299,\n", + " 1143225, 1139025, 1149982, 1141695, 1135861, 1161170, 1161176, 1140469,\n", + " 1141891, 1141901, 1139386, 1141657, 1136917, 1143675, 1137190, 1141155,\n", + " 1141786, 1139488, 1139495, 1136752, 1144422, 1140173, 1158749, 1142713,\n", + " 1139190, 1143107, 1148441, 1144596, 1142451, 1145298, 1141399, 1150910,\n", + " 1144868, 1146201, 1134827, 1140496, 1137854, 1137841, 1141367, 1141664,\n", + " 1149093, 1149097, 1149101, 1138293, 1144279, 1153554, 1140093, 1138815,\n", + " 1139127, 1140990, 1146702, 1147050, 1147047, 1143551, 1152976, 1141925,\n", + " 1144242, 1140580, 1140585, 1136891, 1134861, 1146024, 1149928, 1139990,\n", + " 1146302, 1151124, 1150423, 1147543, 1147150, 1147282, 1142816, 1138665,\n", + " 1140345, 1142628, 1157720, 1136836, 1148235, 1138238, 1139053, 1142146,\n", + " 1145427, 1143345, 1135876, 1135818, 1150296, 1146523, 1143456, 1143457,\n", + " 1144291, 1143937, 1147521, 1147524, 1140364, 1143082, 1149489, 1144725,\n", + " 1144219, 1147984, 1147999, 1146949, 1134899, 1147127, 1147131, 1147244,\n", + " 1148704, 1142700, 1141825, 1146749, 1146751, 1146742, 1153702, 1152328,\n", + " 1147025, 1145011, 1147196, 1158226, 1158231, 1158235, 1167006, 1147880,\n", + " 1149862, 1154526, 1145240, 1145751, 1142378, 1138638, 1146178, 1151242,\n", + " 1148223, 1152530, 1150274, 1150445, 1149250, 1148822, 1154438, 1149791,\n", + " 1144526, 1151988, 1147796, 1151480, 1151487, 1151473, 1150127, 1148281,\n", + " 1148278, 1147016, 1168846, 1144823, 1144828, 1147653, 1143564, 1149412,\n", + " 1148288, 1148300, 1137724, 1154430, 1148180, 1151363, 1136249, 1136247,\n", + " 1139718, 1147631, 1149810, 1148204, 1153124, 1153125, 1153188, 1152877,\n", + " 1144863, 1148095, 1147442, 1151811, 1151816, 1135307, 1151918, 1172677,\n", + " 1136002, 1151348, 1147737, 1146261, 1156402, 1149359, 1150219, 1146623,\n", + " 1144476, 1135695, 1146287, 1150085, 1150091, 1145545, 1137746, 1137756,\n", + " 1146304, 1159983, 1155149, 1136401, 1149203, 1154123, 1157826, 1152673,\n", + " 1139575, 1151617, 1150578, 1136131, 1136134, 1136798, 1148913, 1148924,\n", + " 1152958, 1153387, 1145957, 1138982, 1151311, 1143998, 1152342, 1152344,\n", + " 1156823, 1156831, 1153311, 1138279, 1138281, 1156007, 1156001, 1136028,\n", + " 1136029, 1152928, 1151067, 1151061, 1154722, 1154727, 1154734, 1156422,\n", + " 1150104, 1150154, 1150164, 1148040, 1152601, 1155222, 1145649, 1145656,\n", + " 1137047, 1137048, 1148628, 1158530, 1158533, 1137458, 1178126, 1157547,\n", + " 1182205, 1158924, 1154929, 1157064, 1157069, 1155422, 1152833, 1145196,\n", + " 1145192, 1139473, 1151260, 1146854, 1152179, 1152183, 1151788, 1151777,\n", + " 1157911, 1156932, 1158304, 1158306, 1158308, 1158311, 1151271, 1155441,\n", + " 1155442, 1155519, 1150129, 1150136, 1153999, 1145611, 1142755, 1156207,\n", + " 1156269, 1156271, 1151379, 1158628, 1152527, 1149321, 1135406, 1145794,\n", + " 1156463, 1158096, 1167581, 1168230, 1155667, 1155630, 1156563, 1155572,\n", + " 1155576, 1136466, 1158824, 1158325, 1157320, 1155646, 1162190, 1164291,\n", + " 1139619, 1154909, 1150371, 1157439, 1157430, 1150068, 1150077, 1150976,\n", + " 1150983, 1137152, 1157650, 1153776, 1137380, 1159116, 1138269, 1145681,\n", + " 1140914, 1135601, 1135614, 1148149, 1148159, 1155852, 1158665, 1149137,\n", + " 1149145, 1156081, 1159213, 1155439, 1140368, 1156027, 1157033, 1155971,\n", + " 1155975, 1155396, 1154592, 1166115, 1153503, 1153498, 1136896, 1158760,\n", + " 1158886, 1158815, 1156778, 1152463, 1151615, 1155309, 1153808, 1156278,\n", + " 1166876, 1140049, 1160912, 1158558, 1155528, 1171195, 1142658, 1157756,\n", + " 1167346, 1159042, 1165838, 1167592, 1142426, 1153052, 1153045, 1167708,\n", + " 1156235, 1144158, 1153842, 1156107, 1138393, 1155476, 1151020, 1154300,\n", + " 1153514, 1153519, 1138161, 1164006, 1156787, 1156795, 1139281, 1159999,\n", + " 1157236, 1148777, 1146063, 1169493, 1140643, 1148592, 1164979, 1143138,\n", + " 1143139, 1143143, 1163201, 1154274, 1141800, 1156181, 1159032, 1152247,\n", + " 1155588, 1160498, 1151220, 1153924, 1158405, 1168527, 1144977, 1147830,\n", + " 1147836, 1164580, 1161243, 1144739, 1144747, 1152776, 1160668, 1168067,\n", + " 1147426, 1156737, 1156739, 1156742, 1153663, 1171040, 1144812, 1144808,\n", + " 1153268, 1153273, 1165719, 1164741, 1142733, 1156303, 1148675, 1154689,\n", + " 1154700, 1146042, 1171695, 1138762, 1144973, 1143037, 1147355, 1152624,\n", + " 1155911, 1145900, 1153520, 1151752, 1152203, 1143395, 1171229, 1158735,\n", + " 1158734, 1154076, 1145674, 1150773, 1145490, 1169602, 1167817, 1171975,\n", + " 1166653, 1155172, 1155170, 1165023, 1150522, 1154618, 1144346, 1157534,\n", + " 1154670, 1157340, 1138130, 1141048, 1169359, 1149452, 1149688, 1158623,\n", + " 1158052, 1173047, 1149846, 1157385, 1152353, 1152546, 1172782, 1143858,\n", + " 1168059, 1172209, 1172838, 1148335, 1173307, 1154028, 1152152, 1167859,\n", + " 1169572, 1157153, 1157373, 1147711, 1151850, 1148131, 1157593, 1135016,\n", + " 1180212, 1168604, 1172932, 1166682, 1150234, 1154148, 1154159, 1167520,\n", + " 1149169, 1149173, 1170117, 1170299, 1170297, 1143410, 1143420, 1171302,\n", + " 1181241, 1153803, 1153141, 1181568, 1182106, 1161255, 1154718, 1157795,\n", + " 1155800, 1155804, 1157134, 1183789, 1153898, 1153899, 1153893, 1134650,\n", + " 1145626, 1172024, 1161067, 1149753, 1149755, 1153601, 1155990, 1181149,\n", + " 1158512, 1158517, 1155892, 1155899, 1162690, 1168276, 1186875, 1168886,\n", + " 1189458, 1162253, 1160078, 1164228, 1182337, 1188271, 1154957, 1161819,\n", + " 1146161, 1146172, 1156861, 1167395, 1179053, 1178246, 1156528, 1139828,\n", + " 1139831, 1154812, 1180847, 1149668, 1156049, 1156055, 1151977, 1146392,\n", + " 1146395, 1183186, 1182959, 1191518, 1172475, 1178526, 1169964, 1168683,\n", + " 1192192, 1193708, 1181284, 1151774, 1162502, 1178005, 1193117, 1145395,\n", + " 1160967, 1178135, 1185469, 1155962, 1192634, 1188350, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1140282, 1135165, 1135160, 1140785, 1141758, 1136208, 1136223,\n", + " 1142525, 1136962, 1136965, 1136971, 1141442, 1139808, 1139811, 1154770,\n", + " 1146983, 1137271, 1139142, 1145055, 1143372, 1150509, 1139865, 1142958,\n", + " 1143820, 1147473, 1141877, 1142881, 1144632, 1138347, 1138345, 1136742,\n", + " 1147095, 1137220, 1155019, 1139373, 1139371, 1150322, 1152416, 1134707,\n", + " 1134715, 1136268, 1146376, 1134807, 1140305, 1137829, 1140537, 1140540,\n", + " 1138112, 1138356, 1140147, 1140159, 1134720, 1140952, 1140953, 1162460,\n", + " 1135367, 1135370, 1135202, 1135903, 1134969, 1134794, 1157443, 1157447,\n", + " 1138504, 1136178, 1143064, 1137693, 1144395, 1137534, 1152376, 1137441,\n", + " 1156149, 1148484, 1135574, 1142607, 1156347, 1138514, 1153099, 1137957,\n", + " 1156899, 1135522, 1139684, 1138305, 1138436, 1138440, 1138461, 1156606,\n", + " 1147112, 1147116, 1142611, 1142615, 1135624, 1138185, 1148531, 1150958,\n", + " 1137422, 1135769, 1139673, 1139674, 1139664, 1142243, 1134992, 1142434,\n", + " 1136548, 1148800, 1135781, 1135782, 1136730, 1158974, 1144406, 1153544,\n", + " 1138648, 1138148, 1141964, 1140549, 1152044, 1137734, 1137728, 1146212,\n", + " 1134750, 1137001, 1135549, 1140228, 1149001, 1139898, 1141977, 1137299,\n", + " 1143225, 1139025, 1149982, 1141695, 1135861, 1161170, 1161176, 1140469,\n", + " 1141891, 1141901, 1139386, 1141657, 1136917, 1143675, 1137190, 1141155,\n", + " 1141786, 1139488, 1139495, 1136752, 1144422, 1140173, 1158749, 1142713,\n", + " 1139190, 1143107, 1148441, 1144596, 1142451, 1145298, 1141399, 1150910,\n", + " 1144868, 1146201, 1134827, 1140496, 1137854, 1137841, 1141367, 1141664,\n", + " 1149093, 1149097, 1149101, 1138293, 1144279, 1153554, 1140093, 1138815,\n", + " 1139127, 1140990, 1146702, 1147050, 1147047, 1143551, 1152976, 1141925,\n", + " 1144242, 1140580, 1140585, 1136891, 1134861, 1146024, 1149928, 1139990,\n", + " 1146302, 1151124, 1150423, 1147543, 1147150, 1147282, 1142816, 1138665,\n", + " 1140345, 1142628, 1157720, 1136836, 1148235, 1138238, 1139053, 1142146,\n", + " 1145427, 1143345, 1135876, 1135818, 1150296, 1146523, 1143456, 1143457,\n", + " 1144291, 1143937, 1147521, 1147524, 1140364, 1143082, 1149489, 1144725,\n", + " 1144219, 1147984, 1147999, 1146949, 1134899, 1147127, 1147131, 1147244,\n", + " 1148704, 1142700, 1141825, 1146749, 1146751, 1146742, 1153702, 1152328,\n", + " 1147025, 1145011, 1147196, 1158226, 1158231, 1158235, 1167006, 1147880,\n", + " 1149862, 1154526, 1145240, 1145751, 1142378, 1138638, 1146178, 1151242,\n", + " 1148223, 1152530, 1150274, 1150445, 1149250, 1148822, 1154438, 1149791,\n", + " 1144526, 1151988, 1147796, 1151480, 1151487, 1151473, 1150127, 1148281,\n", + " 1148278, 1147016, 1168846, 1144823, 1144828, 1147653, 1143564, 1149412,\n", + " 1148288, 1148300, 1137724, 1154430, 1148180, 1151363, 1136249, 1136247,\n", + " 1139718, 1147631, 1149810, 1148204, 1153124, 1153125, 1153188, 1152877,\n", + " 1144863, 1148095, 1147442, 1151811, 1151816, 1135307, 1151918, 1172677,\n", + " 1136002, 1151348, 1147737, 1146261, 1156402, 1149359, 1150219, 1146623,\n", + " 1144476, 1135695, 1146287, 1150085, 1150091, 1145545, 1137746, 1137756,\n", + " 1146304, 1159983, 1155149, 1136401, 1149203, 1154123, 1157826, 1152673,\n", + " 1139575, 1151617, 1150578, 1136131, 1136134, 1136798, 1148913, 1148924,\n", + " 1152958, 1153387, 1145957, 1138982, 1151311, 1143998, 1152342, 1152344,\n", + " 1156823, 1156831, 1153311, 1138279, 1138281, 1156007, 1156001, 1136028,\n", + " 1136029, 1152928, 1151067, 1151061, 1154722, 1154727, 1154734, 1156422,\n", + " 1150104, 1150154, 1150164, 1148040, 1152601, 1155222, 1145649, 1145656,\n", + " 1137047, 1137048, 1148628, 1158530, 1158533, 1137458, 1178126, 1157547,\n", + " 1182205, 1158924, 1154929, 1157064, 1157069, 1155422, 1152833, 1145196,\n", + " 1145192, 1139473, 1151260, 1146854, 1152179, 1152183, 1151788, 1151777,\n", + " 1157911, 1156932, 1158304, 1158306, 1158308, 1158311, 1151271, 1155441,\n", + " 1155442, 1155519, 1150129, 1150136, 1153999, 1145611, 1142755, 1156207,\n", + " 1156269, 1156271, 1151379, 1158628, 1152527, 1149321, 1135406, 1145794,\n", + " 1156463, 1158096, 1167581, 1168230, 1155667, 1155630, 1156563, 1155572,\n", + " 1155576, 1136466, 1158824, 1158325, 1157320, 1155646, 1162190, 1164291,\n", + " 1139619, 1154909, 1150371, 1157439, 1157430, 1150068, 1150077, 1150976,\n", + " 1150983, 1137152, 1157650, 1153776, 1137380, 1159116, 1138269, 1145681,\n", + " 1140914, 1135601, 1135614, 1148149, 1148159, 1155852, 1158665, 1149137,\n", + " 1149145, 1156081, 1159213, 1155439, 1140368, 1156027, 1157033, 1155971,\n", + " 1155975, 1155396, 1154592, 1166115, 1153503, 1153498, 1136896, 1158760,\n", + " 1158886, 1158815, 1156778, 1152463, 1151615, 1155309, 1153808, 1156278,\n", + " 1166876, 1140049, 1160912, 1158558, 1155528, 1171195, 1142658, 1157756,\n", + " 1167346, 1159042, 1165838, 1167592, 1142426, 1153052, 1153045, 1167708,\n", + " 1156235, 1144158, 1153842, 1156107, 1138393, 1155476, 1151020, 1154300,\n", + " 1153514, 1153519, 1138161, 1164006, 1156787, 1156795, 1139281, 1159999,\n", + " 1157236, 1148777, 1146063, 1169493, 1140643, 1148592, 1164979, 1143138,\n", + " 1143139, 1143143, 1163201, 1154274, 1141800, 1156181, 1159032, 1152247,\n", + " 1155588, 1160498, 1151220, 1153924, 1158405, 1168527, 1144977, 1147830,\n", + " 1147836, 1164580, 1161243, 1144739, 1144747, 1152776, 1160668, 1168067,\n", + " 1147426, 1156737, 1156739, 1156742, 1153663, 1171040, 1144812, 1144808,\n", + " 1153268, 1153273, 1165719, 1164741, 1142733, 1156303, 1148675, 1154689,\n", + " 1154700, 1146042, 1171695, 1138762, 1144973, 1143037, 1147355, 1152624,\n", + " 1155911, 1145900, 1153520, 1151752, 1152203, 1143395, 1171229, 1158735,\n", + " 1158734, 1154076, 1145674, 1150773, 1145490, 1169602, 1167817, 1171975,\n", + " 1166653, 1155172, 1155170, 1165023, 1150522, 1154618, 1144346, 1157534,\n", + " 1154670, 1157340, 1138130, 1141048, 1169359, 1149452, 1149688, 1158623,\n", + " 1158052, 1173047, 1149846, 1157385, 1152353, 1152546, 1172782, 1143858,\n", + " 1168059, 1172209, 1172838, 1148335, 1173307, 1154028, 1152152, 1167859,\n", + " 1169572, 1157153, 1157373, 1147711, 1151850, 1148131, 1157593, 1135016,\n", + " 1180212, 1168604, 1172932, 1166682, 1150234, 1154148, 1154159, 1167520,\n", + " 1149169, 1149173, 1170117, 1170299, 1170297, 1143410, 1143420, 1171302,\n", + " 1181241, 1153803, 1153141, 1181568, 1182106, 1161255, 1154718, 1157795,\n", + " 1155800, 1155804, 1157134, 1183789, 1153898, 1153899, 1153893, 1134650,\n", + " 1145626, 1172024, 1161067, 1149753, 1149755, 1153601, 1155990, 1181149,\n", + " 1158512, 1158517, 1155892, 1155899, 1162690, 1168276, 1186875, 1168886,\n", + " 1189458, 1162253, 1160078, 1164228, 1182337, 1188271, 1154957, 1161819,\n", + " 1146161, 1146172, 1156861, 1167395, 1179053, 1178246, 1156528, 1139828,\n", + " 1139831, 1154812, 1180847, 1149668, 1156049, 1156055, 1151977, 1146392,\n", + " 1146395, 1183186, 1182959, 1191518, 1172475, 1178526, 1169964, 1168683,\n", + " 1192192, 1193708, 1181284, 1151774, 1162502, 1178005, 1193117, 1145395,\n", + " 1160967, 1178135, 1185469, 1155962, 1192634, 1188350, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197226, 1197717, 1195333, 1195860, 1199282, 1198459, 1202255, 1198844,\n", + " 1200642, 1200650, 1197777, 1199248, 1201015, 1201016, 1197359, 1196956,\n", + " 1198557, 1196573, 1195713, 1195726, 1195514, 1195259, 1195263, 1199135,\n", + " 1201992, 1196030, 1201427, 1198090, 1198095, 1195888, 1195895, 1196144,\n", + " 1195740, 1196699, 1195325, 1196840, 1198668, 1197807, 1195571, 1198163,\n", + " 1198161, 1196711, 1196717, 1199823, 1195216, 1195265, 1195278, 1197140,\n", + " 1196109, 1194859, 1195038, 1195660, 1195541, 1197248, 1196393, 1198277,\n", + " 1198282, 1200959, 1196034, 1199060, 1199685, 1199628, 1197674, 1197990,\n", + " 1200872, 1199572, 1199231, 1195017, 1199676, 1194795, 1196508, 1200668,\n", + " 1202582, 1199021, 1196727, 1202618, 1198428, 1198811, 1199555, 1201827,\n", + " 1198066, 1201079, 1202630, 1200913, 1200918, 1194803, 1194805, 1202641,\n", + " 1199712, 1200363, 1202499, 1200553, 1200555, 1200315, 1202232, 1200899,\n", + " 1202338, 1202351, 1202337, 1202175, 1200323, 1201291, 1201871, 1202889,\n", + " 1199922, 1199929, 1196960, 1196966, 1194846, 1199606, 1195664, 1195415,\n", + " 1195379, 1201321, 1197816, 1197822, 1197821, 1198127, 1198973, 1203102,\n", + " 1201138, 1199782, 1198819, 1200296, 1195082, 1203300, 1203162, 1197872],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197226, 1197717, 1195333, 1195860, 1199282, 1198459, 1202255, 1198844,\n", + " 1200642, 1200650, 1197777, 1199248, 1201015, 1201016, 1197359, 1196956,\n", + " 1198557, 1196573, 1195713, 1195726, 1195514, 1195259, 1195263, 1199135,\n", + " 1201992, 1196030, 1201427, 1198090, 1198095, 1195888, 1195895, 1196144,\n", + " 1195740, 1196699, 1195325, 1196840, 1198668, 1197807, 1195571, 1198163,\n", + " 1198161, 1196711, 1196717, 1199823, 1195216, 1195265, 1195278, 1197140,\n", + " 1196109, 1194859, 1195038, 1195660, 1195541, 1197248, 1196393, 1198277,\n", + " 1198282, 1200959, 1196034, 1199060, 1199685, 1199628, 1197674, 1197990,\n", + " 1200872, 1199572, 1199231, 1195017, 1199676, 1194795, 1196508, 1200668,\n", + " 1202582, 1199021, 1196727, 1202618, 1198428, 1198811, 1199555, 1201827,\n", + " 1198066, 1201079, 1202630, 1200913, 1200918, 1194803, 1194805, 1202641,\n", + " 1199712, 1200363, 1202499, 1200553, 1200555, 1200315, 1202232, 1200899,\n", + " 1202338, 1202351, 1202337, 1202175, 1200323, 1201291, 1201871, 1202889,\n", + " 1199922, 1199929, 1196960, 1196966, 1194846, 1199606, 1195664, 1195415,\n", + " 1195379, 1201321, 1197816, 1197822, 1197821, 1198127, 1198973, 1203102,\n", + " 1201138, 1199782, 1198819, 1200296, 1195082, 1203300, 1203162, 1197872],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 2.3988e-01, -3.7425e-04, 9.6890e-01, ..., 1.0986e-01,\n", + " -1.8822e-03, -6.3646e-03],\n", + " [ 1.3941e-01, -3.0871e-04, 7.5980e-01, ..., 1.3024e-01,\n", + " -1.8610e-03, -4.9198e-03],\n", + " [ 7.7116e-02, -2.3209e-04, 4.0895e-01, ..., 9.7314e-02,\n", + " -1.6728e-03, -3.3297e-03],\n", + " ...,\n", + " [ 1.4969e-01, 2.9492e-02, 8.6308e-01, ..., 1.5566e-01,\n", + " -1.6669e-03, -5.3881e-03],\n", + " [ 1.3670e-01, 1.1313e-02, 6.8465e-01, ..., 1.0960e-01,\n", + " -1.7184e-03, -4.5683e-03],\n", + " [ 1.4552e-01, -6.6933e-05, 7.5316e-01, ..., 1.2237e-01,\n", + " -1.7963e-03, -4.9158e-03]], device='cuda:0'), 'paper': tensor([[ 1.6767e+00, 1.6297e+00, 3.6686e+00, ..., 1.4405e+00,\n", + " -4.7188e-02, 2.7111e+00],\n", + " [ 1.9002e+00, 2.5043e+00, 3.5355e+00, ..., 1.3126e-01,\n", + " -3.6579e-02, 2.0047e+00],\n", + " [ 1.9587e+00, 5.8450e-01, 4.6153e+00, ..., 8.8035e-01,\n", + " -5.6407e-02, 2.7441e+00],\n", + " ...,\n", + " [ 1.1816e+00, 1.2994e+00, 1.5533e+00, ..., -6.4855e-03,\n", + " -2.1656e-02, 6.9461e-01],\n", + " [-9.3351e-03, -3.8752e-03, 6.0293e+00, ..., -1.6869e-02,\n", + " -4.5449e-02, -3.1671e-02],\n", + " [ 1.7409e+00, 1.4549e+00, 3.2896e+00, ..., 2.4236e+00,\n", + " -5.6513e-02, 3.9344e+00]], device='cuda:0'), 'author': tensor([[-1.4245e-03, 3.8438e-01, 1.6965e-01, ..., 1.5962e+00,\n", + " -6.8483e-04, -4.8424e-04],\n", + " [-2.1205e-03, 2.9669e-01, 2.8783e-01, ..., 1.6984e+00,\n", + " -9.2692e-04, -1.0877e-03],\n", + " [-3.0321e-03, 3.5492e-01, 1.0627e-01, ..., 1.4384e+00,\n", + " -2.7700e-03, -2.3856e-03],\n", + " ...,\n", + " [-3.7866e-03, 3.6480e-01, 2.6412e-01, ..., 1.5486e+00,\n", + " -1.9109e-03, -2.7011e-03],\n", + " [-3.0027e-03, 3.2437e-01, 2.8045e-01, ..., 1.4686e+00,\n", + " -3.4307e-03, -2.9796e-03],\n", + " [-1.3574e-03, 3.1513e-01, 2.3353e-01, ..., 1.6921e+00,\n", + " -1.7054e-04, -6.3603e-05]], device='cuda:0'), 'field_of_study': tensor([[ 0.0737, 0.7690, 0.3866, ..., -0.0087, 0.3852, 0.3582],\n", + " [ 0.1214, 0.8559, 0.5206, ..., -0.0104, 0.4334, 0.2731],\n", + " [ 0.0812, 0.6878, 0.3709, ..., -0.0105, 0.3953, 0.3603],\n", + " ...,\n", + " [ 0.0605, 0.8250, 0.5318, ..., -0.0102, 0.3460, 0.5008],\n", + " [ 0.0183, 0.6283, 0.3197, ..., -0.0064, 0.3348, 0.1936],\n", + " [ 0.2300, 0.8739, 0.4595, ..., -0.0093, 0.4512, 0.1234]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 9, 170, 170, 148, 148, 208, 539, 232, 272, 261, 355, 240,\n", + " 520, 246, 345, 1094, 1094, 771, 771, 772, 576, 413, 413, 637,\n", + " 516, 1195, 666, 666, 1158, 935, 961, 1036, 777, 1179, 1543, 1543,\n", + " 1543, 1543, 1463, 1175, 900, 900, 1297, 1543, 1394, 1572, 1572, 1572,\n", + " 1530, 1530, 1203, 1203, 1443, 1443, 1530, 1530, 1530, 1530, 1331, 1572,\n", + " 1572, 1678, 1775, 1805, 1805, 1834, 2071, 2010, 2144, 1947, 1947, 1955,\n", + " 2036, 2100, 2100, 2171, 2171, 2171, 2171, 2218, 2324, 2463, 2549, 2482,\n", + " 2482, 2482, 2571, 2651, 2828, 2868, 2636, 2636, 2885, 2885, 2885, 2885,\n", + " 2885, 2885, 2756, 2756, 2970, 2970, 3125, 3196, 3196, 3070, 3070, 3028,\n", + " 3030, 2976, 3354, 3271, 3268, 3473, 3490, 3605, 3795, 3730, 3682, 3758,\n", + " 3862, 3771, 3950, 3969, 4018, 4027, 4166, 4194, 4183, 4202, 4283, 4321,\n", + " 4321, 4574, 4574, 4959, 4767, 4770, 4770, 4871, 4963, 5078, 5061, 5061,\n", + " 5229, 5229, 5062, 5167, 5153, 5303, 5177, 5216, 5324, 5747, 5458, 5458,\n", + " 5483, 5483, 5748, 5739, 5742, 5468, 5611, 5621, 5621, 5621, 5715, 5874,\n", + " 5936, 5677, 5940, 6076, 6033, 6030, 6030, 6099, 6099, 6097, 6109, 6097,\n", + " 6097, 6094, 5945, 6132, 6132, 6192, 6192, 6083, 6045, 6231, 6215, 6215,\n", + " 6226, 6098, 6207, 6248],\n", + " [ 8, 33, 91, 53, 116, 14, 8, 18, 74, 45, 47, 74,\n", + " 5, 9, 110, 31, 55, 125, 41, 16, 28, 63, 15, 36,\n", + " 35, 58, 77, 24, 58, 7, 102, 93, 6, 14, 20, 66,\n", + " 68, 56, 124, 16, 18, 97, 88, 95, 114, 43, 119, 99,\n", + " 39, 74, 41, 48, 18, 51, 103, 83, 123, 89, 37, 52,\n", + " 111, 84, 74, 78, 95, 69, 115, 12, 112, 33, 91, 84,\n", + " 22, 72, 60, 114, 13, 24, 101, 22, 90, 69, 127, 38,\n", + " 29, 101, 8, 80, 8, 46, 75, 70, 3, 30, 17, 123,\n", + " 43, 73, 69, 79, 62, 4, 0, 86, 95, 65, 100, 46,\n", + " 37, 87, 4, 123, 107, 21, 57, 105, 29, 109, 117, 123,\n", + " 45, 47, 42, 71, 96, 8, 69, 84, 110, 69, 94, 118,\n", + " 26, 61, 6, 22, 70, 56, 34, 74, 46, 36, 41, 98,\n", + " 54, 74, 49, 122, 104, 111, 41, 70, 24, 10, 40, 74,\n", + " 25, 74, 27, 67, 2, 74, 81, 74, 110, 82, 1, 121,\n", + " 74, 2, 19, 85, 66, 23, 74, 74, 106, 108, 64, 32,\n", + " 59, 126, 76, 74, 50, 74, 11, 120, 45, 92, 24, 44,\n", + " 4, 113, 95, 91]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2930, 2635, 6237, ..., 357, 1223, 5903],\n", + " [ 152, 2, 250, ..., 6412, 6462, 6368]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 58, 92, 70, ..., 4, 15, 21],\n", + " [ 108, 117, 51, ..., 6287, 6310, 6190]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 29, 129, 129, ..., 6368, 6368, 6368],\n", + " [ 368, 348, 232, ..., 232, 652, 227]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 586, 340, 232, ..., 131, 598, 61],\n", + " [ 63, 170, 154, ..., 6514, 6397, 6327]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4186, 3139, 2782, ..., 3199, 6494, 5193],\n", + " [ 111, 120, 55, ..., 6215, 6240, 6098]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 29, 29, 29, ..., 6368, 6368, 6483],\n", + " [1486, 3273, 1264, ..., 6071, 5903, 1667]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 175, 175, 175, ..., 6098, 6098, 6098],\n", + " [1424, 1518, 2685, ..., 5193, 5771, 5608]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005902\n", + "sampling 0.005749\n", + "noi time: 0.000988\n", + "get_vertex_data call: 0.026044\n", + "noi group time: 0.003406\n", + "eoi_group_time: 0.016661\n", + "second half: 0.197608\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31143, 21471, 32616, ..., 1128792, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31143, 21471, 32616, ..., 1128792, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1215810, 1212301, 1228171, ..., 1929225, 1928591, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1215810, 1212301, 1228171, ..., 1929225, 1928591, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137439, 1137204, 1137212, 1141424, 1136228, 1136233, 1136239, 1140282,\n", + " 1140285, 1136349, 1135716, 1135723, 1135727, 1137784, 1137791, 1140785,\n", + " 1140788, 1140799, 1141758, 1136971, 1141440, 1141443, 1146803, 1138897,\n", + " 1149831, 1139811, 1145373, 1146978, 1138930, 1138933, 1143363, 1139609,\n", + " 1150497, 1139866, 1134937, 1155686, 1155689, 1143820, 1147473, 1135990,\n", + " 1135992, 1142881, 1144636, 1153008, 1135947, 1135104, 1138344, 1148546,\n", + " 1153220, 1153231, 1147096, 1141912, 1155014, 1147202, 1147211, 1136685,\n", + " 1150329, 1151548, 1140531, 1140540, 1138112, 1138119, 1137254, 1151520,\n", + " 1140953, 1135367, 1135202, 1134970, 1141036, 1134794, 1157443, 1143382,\n", + " 1136178, 1143069, 1136619, 1144395, 1137521, 1152376, 1136662, 1137448,\n", + " 1143317, 1143321, 1135265, 1156159, 1141702, 1135583, 1142594, 1136097,\n", + " 1136101, 1148860, 1138514, 1158136, 1156899, 1135522, 1138305, 1136354,\n", + " 1139878, 1138436, 1138440, 1138445, 1138449, 1138462, 1136594, 1135122,\n", + " 1149328, 1138846, 1138847, 1135088, 1156605, 1156606, 1142611, 1142616,\n", + " 1135352, 1135359, 1135631, 1138177, 1145843, 1148533, 1139673, 1159195,\n", + " 1142255, 1165568, 1134992, 1142434, 1136551, 1152651, 1148805, 1135776,\n", + " 1140199, 1159009, 1159012, 1159019, 1141070, 1144410, 1153543, 1139933,\n", + " 1138648, 1138148, 1155661, 1141992, 1141997, 1152044, 1140660, 1137728,\n", + " 1134922, 1134742, 1135549, 1137893, 1141088, 1141095, 1141098, 1139889,\n", + " 1136397, 1143767, 1154851, 1143221, 1149982, 1146832, 1135860, 1139436,\n", + " 1136637, 1139386, 1141657, 1136917, 1139730, 1143678, 1140607, 1139495,\n", + " 1136760, 1141609, 1144650, 1144655, 1134979, 1142063, 1141821, 1143158,\n", + " 1143153, 1158749, 1137762, 1149111, 1139190, 1141475, 1137067, 1142917,\n", + " 1142913, 1137661, 1137662, 1138424, 1144445, 1144596, 1144603, 1136867,\n", + " 1145298, 1144041, 1144182, 1137614, 1137606, 1150906, 1144865, 1137365,\n", + " 1139559, 1137841, 1161710, 1147153, 1136378, 1149194, 1141365, 1153068,\n", + " 1141664, 1149090, 1149093, 1139022, 1144284, 1144279, 1139510, 1139127,\n", + " 1143779, 1140619, 1140990, 1140984, 1145873, 1149876, 1143551, 1152976,\n", + " 1135457, 1141925, 1146898, 1146901, 1144242, 1145328, 1140580, 1141853,\n", + " 1137149, 1150692, 1143643, 1141377, 1163657, 1146005, 1146024, 1154323,\n", + " 1149928, 1147084, 1141235, 1141236, 1139990, 1143293, 1143283, 1143294,\n", + " 1147543, 1147540, 1148763, 1147282, 1142829, 1142816, 1136330, 1140348,\n", + " 1149366, 1139417, 1148009, 1149608, 1143052, 1136160, 1157720, 1136836,\n", + " 1139329, 1141496, 1136445, 1142159, 1145427, 1143345, 1144619, 1144615,\n", + " 1144086, 1144088, 1138600, 1135747, 1135876, 1135818, 1143456, 1143457,\n", + " 1140483, 1143937, 1164017, 1147574, 1155700, 1146628, 1147521, 1140363,\n", + " 1140364, 1137990, 1143075, 1166410, 1148966, 1144219, 1147984, 1147999,\n", + " 1146949, 1134899, 1139252, 1145462, 1147244, 1148704, 1148715, 1142700,\n", + " 1141327, 1141825, 1141836, 1146745, 1146751, 1148473, 1153702, 1147056,\n", + " 1147064, 1149722, 1147025, 1141124, 1141131, 1158228, 1158230, 1143922,\n", + " 1151644, 1145232, 1145240, 1145751, 1138638, 1148387, 1148397, 1146178,\n", + " 1146180, 1152530, 1150275, 1150438, 1150445, 1149250, 1149258, 1149787,\n", + " 1149791, 1144526, 1154831, 1152023, 1154260, 1154271, 1135504, 1146723,\n", + " 1149586, 1140566, 1150127, 1147019, 1147021, 1158949, 1144825, 1148744,\n", + " 1149996, 1147653, 1143560, 1143552, 1149412, 1148288, 1148300, 1135076,\n", + " 1164894, 1154420, 1148180, 1148188, 1139718, 1146675, 1146676, 1146686,\n", + " 1152481, 1152494, 1157968, 1157983, 1157974, 1148720, 1148725, 1148729,\n", + " 1146549, 1149810, 1143895, 1148204, 1148108, 1171939, 1154203, 1154168,\n", + " 1153188, 1167960, 1150935, 1150352, 1150356, 1148084, 1151816, 1152581,\n", + " 1135307, 1135303, 1151915, 1154183, 1154182, 1148500, 1141420, 1151345,\n", + " 1147602, 1146616, 1146623, 1144468, 1144476, 1152849, 1153026, 1137746,\n", + " 1137756, 1140521, 1155140, 1151962, 1157107, 1155337, 1154119, 1155358,\n", + " 1157835, 1151617, 1136788, 1148916, 1150609, 1144529, 1151311, 1158417,\n", + " 1156826, 1153310, 1153311, 1138281, 1152294, 1156007, 1156002, 1136028,\n", + " 1136029, 1158704, 1156608, 1156622, 1151064, 1152888, 1156422, 1137539,\n", + " 1150156, 1150162, 1150164, 1153686, 1148040, 1152597, 1149792, 1144661,\n", + " 1144669, 1137048, 1148628, 1158530, 1137458, 1135705, 1155376, 1154377,\n", + " 1139218, 1135434, 1150877, 1156500, 1156505, 1157064, 1157069, 1139473,\n", + " 1150475, 1151788, 1157911, 1150828, 1156935, 1153413, 1147818, 1157790,\n", + " 1151469, 1139525, 1158311, 1155441, 1153359, 1162120, 1144361, 1144355,\n", + " 1138573, 1154528, 1153999, 1150481, 1142755, 1142756, 1156207, 1151379,\n", + " 1140186, 1160399, 1157172, 1149320, 1149519, 1153486, 1155755, 1151431,\n", + " 1135396, 1158096, 1157898, 1155628, 1155631, 1156563, 1158824, 1158325,\n", + " 1157313, 1157323, 1154036, 1157000, 1148839, 1155646, 1143263, 1146938,\n", + " 1154240, 1162190, 1154909, 1150371, 1150379, 1153326, 1155286, 1143517,\n", + " 1151027, 1137152, 1158126, 1149904, 1158192, 1159116, 1138269, 1145687,\n", + " 1145694, 1134685, 1135601, 1148148, 1150661, 1138223, 1157684, 1146321,\n", + " 1140633, 1144463, 1152209, 1152220, 1152498, 1157735, 1159130, 1144843,\n", + " 1155971, 1155975, 1161892, 1155403, 1154605, 1161297, 1136899, 1136909,\n", + " 1136896, 1158760, 1157296, 1158813, 1158815, 1136494, 1136491, 1159241,\n", + " 1156495, 1136640, 1145483, 1183286, 1166424, 1142178, 1157819, 1158547,\n", + " 1161163, 1154340, 1158006, 1155521, 1155529, 1135663, 1164276, 1142663,\n", + " 1150684, 1157751, 1159042, 1159041, 1157944, 1153052, 1153045, 1171551,\n", + " 1144149, 1166256, 1163711, 1156096, 1156107, 1138393, 1150046, 1149063,\n", + " 1145948, 1155479, 1147300, 1142405, 1146870, 1138161, 1164006, 1161771,\n", + " 1163381, 1154590, 1156991, 1161004, 1148771, 1148780, 1171515, 1140641,\n", + " 1141862, 1148600, 1148603, 1164990, 1143139, 1143143, 1155816, 1163207,\n", + " 1158653, 1158655, 1158640, 1156181, 1159025, 1159029, 1159032, 1168096,\n", + " 1152244, 1152247, 1171162, 1155588, 1147567, 1138674, 1158405, 1144977,\n", + " 1144989, 1149022, 1161240, 1144739, 1155054, 1163522, 1141471, 1169474,\n", + " 1161556, 1147426, 1157052, 1156739, 1156744, 1160849, 1150646, 1171040,\n", + " 1144810, 1144812, 1168850, 1180496, 1142724, 1142733, 1142730, 1167777,\n", + " 1145728, 1145738, 1145913, 1148683, 1169282, 1142136, 1145447, 1165746,\n", + " 1152624, 1148124, 1147724, 1145892, 1145902, 1148425, 1163961, 1175240,\n", + " 1143395, 1143404, 1171219, 1154076, 1187020, 1147331, 1147339, 1163636,\n", + " 1144690, 1150783, 1145502, 1151598, 1167817, 1156308, 1155172, 1164835,\n", + " 1156118, 1144336, 1157534, 1138372, 1147746, 1154659, 1154670, 1191401,\n", + " 1169164, 1157331, 1138129, 1151674, 1169353, 1169359, 1154353, 1154364,\n", + " 1158146, 1149689, 1158611, 1158623, 1173047, 1149847, 1157380, 1179898,\n", + " 1152353, 1155931, 1148667, 1169264, 1169144, 1152150, 1153755, 1153754,\n", + " 1164974, 1159658, 1159655, 1169572, 1157153, 1157373, 1147711, 1151850,\n", + " 1148131, 1170490, 1169037, 1154311, 1162106, 1168817, 1140324, 1140326,\n", + " 1166351, 1166682, 1177112, 1150234, 1154148, 1154153, 1167520, 1158176,\n", + " 1167517, 1149169, 1149173, 1179814, 1177440, 1143279, 1167657, 1143420,\n", + " 1184606, 1153803, 1183406, 1171122, 1151509, 1151519, 1182651, 1176269,\n", + " 1161255, 1155262, 1177576, 1177889, 1154718, 1154713, 1157792, 1157795,\n", + " 1143334, 1172550, 1182802, 1171623, 1157133, 1153898, 1164560, 1145626,\n", + " 1145618, 1178757, 1186720, 1183744, 1149755, 1181345, 1153601, 1153609,\n", + " 1186957, 1187948, 1158771, 1158779, 1158512, 1181198, 1167636, 1179069,\n", + " 1158374, 1158380, 1158371, 1155892, 1157272, 1184310, 1140393, 1177772,\n", + " 1186277, 1180521, 1159341, 1168876, 1163421, 1158161, 1161819, 1166783,\n", + " 1147182, 1167395, 1168981, 1164130, 1164133, 1170421, 1190720, 1139828,\n", + " 1139831, 1154806, 1149668, 1182021, 1151288, 1194515, 1156055, 1170000,\n", + " 1146398, 1146395, 1190227, 1149544, 1176390, 1192167, 1182370, 1156846,\n", + " 1169960, 1179517, 1194469, 1140997, 1183389, 1191655, 1181422, 1179852,\n", + " 1162156, 1151774, 1171113, 1191705, 1188125, 1167089, 1194059, 1180997,\n", + " 1172423, 1172122, 1178135, 1180532, 1162670, 1182186, 1181115, 1193580,\n", + " 1192670, 1189075, 1169397, 1169402, 1157017, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137439, 1137204, 1137212, 1141424, 1136228, 1136233, 1136239, 1140282,\n", + " 1140285, 1136349, 1135716, 1135723, 1135727, 1137784, 1137791, 1140785,\n", + " 1140788, 1140799, 1141758, 1136971, 1141440, 1141443, 1146803, 1138897,\n", + " 1149831, 1139811, 1145373, 1146978, 1138930, 1138933, 1143363, 1139609,\n", + " 1150497, 1139866, 1134937, 1155686, 1155689, 1143820, 1147473, 1135990,\n", + " 1135992, 1142881, 1144636, 1153008, 1135947, 1135104, 1138344, 1148546,\n", + " 1153220, 1153231, 1147096, 1141912, 1155014, 1147202, 1147211, 1136685,\n", + " 1150329, 1151548, 1140531, 1140540, 1138112, 1138119, 1137254, 1151520,\n", + " 1140953, 1135367, 1135202, 1134970, 1141036, 1134794, 1157443, 1143382,\n", + " 1136178, 1143069, 1136619, 1144395, 1137521, 1152376, 1136662, 1137448,\n", + " 1143317, 1143321, 1135265, 1156159, 1141702, 1135583, 1142594, 1136097,\n", + " 1136101, 1148860, 1138514, 1158136, 1156899, 1135522, 1138305, 1136354,\n", + " 1139878, 1138436, 1138440, 1138445, 1138449, 1138462, 1136594, 1135122,\n", + " 1149328, 1138846, 1138847, 1135088, 1156605, 1156606, 1142611, 1142616,\n", + " 1135352, 1135359, 1135631, 1138177, 1145843, 1148533, 1139673, 1159195,\n", + " 1142255, 1165568, 1134992, 1142434, 1136551, 1152651, 1148805, 1135776,\n", + " 1140199, 1159009, 1159012, 1159019, 1141070, 1144410, 1153543, 1139933,\n", + " 1138648, 1138148, 1155661, 1141992, 1141997, 1152044, 1140660, 1137728,\n", + " 1134922, 1134742, 1135549, 1137893, 1141088, 1141095, 1141098, 1139889,\n", + " 1136397, 1143767, 1154851, 1143221, 1149982, 1146832, 1135860, 1139436,\n", + " 1136637, 1139386, 1141657, 1136917, 1139730, 1143678, 1140607, 1139495,\n", + " 1136760, 1141609, 1144650, 1144655, 1134979, 1142063, 1141821, 1143158,\n", + " 1143153, 1158749, 1137762, 1149111, 1139190, 1141475, 1137067, 1142917,\n", + " 1142913, 1137661, 1137662, 1138424, 1144445, 1144596, 1144603, 1136867,\n", + " 1145298, 1144041, 1144182, 1137614, 1137606, 1150906, 1144865, 1137365,\n", + " 1139559, 1137841, 1161710, 1147153, 1136378, 1149194, 1141365, 1153068,\n", + " 1141664, 1149090, 1149093, 1139022, 1144284, 1144279, 1139510, 1139127,\n", + " 1143779, 1140619, 1140990, 1140984, 1145873, 1149876, 1143551, 1152976,\n", + " 1135457, 1141925, 1146898, 1146901, 1144242, 1145328, 1140580, 1141853,\n", + " 1137149, 1150692, 1143643, 1141377, 1163657, 1146005, 1146024, 1154323,\n", + " 1149928, 1147084, 1141235, 1141236, 1139990, 1143293, 1143283, 1143294,\n", + " 1147543, 1147540, 1148763, 1147282, 1142829, 1142816, 1136330, 1140348,\n", + " 1149366, 1139417, 1148009, 1149608, 1143052, 1136160, 1157720, 1136836,\n", + " 1139329, 1141496, 1136445, 1142159, 1145427, 1143345, 1144619, 1144615,\n", + " 1144086, 1144088, 1138600, 1135747, 1135876, 1135818, 1143456, 1143457,\n", + " 1140483, 1143937, 1164017, 1147574, 1155700, 1146628, 1147521, 1140363,\n", + " 1140364, 1137990, 1143075, 1166410, 1148966, 1144219, 1147984, 1147999,\n", + " 1146949, 1134899, 1139252, 1145462, 1147244, 1148704, 1148715, 1142700,\n", + " 1141327, 1141825, 1141836, 1146745, 1146751, 1148473, 1153702, 1147056,\n", + " 1147064, 1149722, 1147025, 1141124, 1141131, 1158228, 1158230, 1143922,\n", + " 1151644, 1145232, 1145240, 1145751, 1138638, 1148387, 1148397, 1146178,\n", + " 1146180, 1152530, 1150275, 1150438, 1150445, 1149250, 1149258, 1149787,\n", + " 1149791, 1144526, 1154831, 1152023, 1154260, 1154271, 1135504, 1146723,\n", + " 1149586, 1140566, 1150127, 1147019, 1147021, 1158949, 1144825, 1148744,\n", + " 1149996, 1147653, 1143560, 1143552, 1149412, 1148288, 1148300, 1135076,\n", + " 1164894, 1154420, 1148180, 1148188, 1139718, 1146675, 1146676, 1146686,\n", + " 1152481, 1152494, 1157968, 1157983, 1157974, 1148720, 1148725, 1148729,\n", + " 1146549, 1149810, 1143895, 1148204, 1148108, 1171939, 1154203, 1154168,\n", + " 1153188, 1167960, 1150935, 1150352, 1150356, 1148084, 1151816, 1152581,\n", + " 1135307, 1135303, 1151915, 1154183, 1154182, 1148500, 1141420, 1151345,\n", + " 1147602, 1146616, 1146623, 1144468, 1144476, 1152849, 1153026, 1137746,\n", + " 1137756, 1140521, 1155140, 1151962, 1157107, 1155337, 1154119, 1155358,\n", + " 1157835, 1151617, 1136788, 1148916, 1150609, 1144529, 1151311, 1158417,\n", + " 1156826, 1153310, 1153311, 1138281, 1152294, 1156007, 1156002, 1136028,\n", + " 1136029, 1158704, 1156608, 1156622, 1151064, 1152888, 1156422, 1137539,\n", + " 1150156, 1150162, 1150164, 1153686, 1148040, 1152597, 1149792, 1144661,\n", + " 1144669, 1137048, 1148628, 1158530, 1137458, 1135705, 1155376, 1154377,\n", + " 1139218, 1135434, 1150877, 1156500, 1156505, 1157064, 1157069, 1139473,\n", + " 1150475, 1151788, 1157911, 1150828, 1156935, 1153413, 1147818, 1157790,\n", + " 1151469, 1139525, 1158311, 1155441, 1153359, 1162120, 1144361, 1144355,\n", + " 1138573, 1154528, 1153999, 1150481, 1142755, 1142756, 1156207, 1151379,\n", + " 1140186, 1160399, 1157172, 1149320, 1149519, 1153486, 1155755, 1151431,\n", + " 1135396, 1158096, 1157898, 1155628, 1155631, 1156563, 1158824, 1158325,\n", + " 1157313, 1157323, 1154036, 1157000, 1148839, 1155646, 1143263, 1146938,\n", + " 1154240, 1162190, 1154909, 1150371, 1150379, 1153326, 1155286, 1143517,\n", + " 1151027, 1137152, 1158126, 1149904, 1158192, 1159116, 1138269, 1145687,\n", + " 1145694, 1134685, 1135601, 1148148, 1150661, 1138223, 1157684, 1146321,\n", + " 1140633, 1144463, 1152209, 1152220, 1152498, 1157735, 1159130, 1144843,\n", + " 1155971, 1155975, 1161892, 1155403, 1154605, 1161297, 1136899, 1136909,\n", + " 1136896, 1158760, 1157296, 1158813, 1158815, 1136494, 1136491, 1159241,\n", + " 1156495, 1136640, 1145483, 1183286, 1166424, 1142178, 1157819, 1158547,\n", + " 1161163, 1154340, 1158006, 1155521, 1155529, 1135663, 1164276, 1142663,\n", + " 1150684, 1157751, 1159042, 1159041, 1157944, 1153052, 1153045, 1171551,\n", + " 1144149, 1166256, 1163711, 1156096, 1156107, 1138393, 1150046, 1149063,\n", + " 1145948, 1155479, 1147300, 1142405, 1146870, 1138161, 1164006, 1161771,\n", + " 1163381, 1154590, 1156991, 1161004, 1148771, 1148780, 1171515, 1140641,\n", + " 1141862, 1148600, 1148603, 1164990, 1143139, 1143143, 1155816, 1163207,\n", + " 1158653, 1158655, 1158640, 1156181, 1159025, 1159029, 1159032, 1168096,\n", + " 1152244, 1152247, 1171162, 1155588, 1147567, 1138674, 1158405, 1144977,\n", + " 1144989, 1149022, 1161240, 1144739, 1155054, 1163522, 1141471, 1169474,\n", + " 1161556, 1147426, 1157052, 1156739, 1156744, 1160849, 1150646, 1171040,\n", + " 1144810, 1144812, 1168850, 1180496, 1142724, 1142733, 1142730, 1167777,\n", + " 1145728, 1145738, 1145913, 1148683, 1169282, 1142136, 1145447, 1165746,\n", + " 1152624, 1148124, 1147724, 1145892, 1145902, 1148425, 1163961, 1175240,\n", + " 1143395, 1143404, 1171219, 1154076, 1187020, 1147331, 1147339, 1163636,\n", + " 1144690, 1150783, 1145502, 1151598, 1167817, 1156308, 1155172, 1164835,\n", + " 1156118, 1144336, 1157534, 1138372, 1147746, 1154659, 1154670, 1191401,\n", + " 1169164, 1157331, 1138129, 1151674, 1169353, 1169359, 1154353, 1154364,\n", + " 1158146, 1149689, 1158611, 1158623, 1173047, 1149847, 1157380, 1179898,\n", + " 1152353, 1155931, 1148667, 1169264, 1169144, 1152150, 1153755, 1153754,\n", + " 1164974, 1159658, 1159655, 1169572, 1157153, 1157373, 1147711, 1151850,\n", + " 1148131, 1170490, 1169037, 1154311, 1162106, 1168817, 1140324, 1140326,\n", + " 1166351, 1166682, 1177112, 1150234, 1154148, 1154153, 1167520, 1158176,\n", + " 1167517, 1149169, 1149173, 1179814, 1177440, 1143279, 1167657, 1143420,\n", + " 1184606, 1153803, 1183406, 1171122, 1151509, 1151519, 1182651, 1176269,\n", + " 1161255, 1155262, 1177576, 1177889, 1154718, 1154713, 1157792, 1157795,\n", + " 1143334, 1172550, 1182802, 1171623, 1157133, 1153898, 1164560, 1145626,\n", + " 1145618, 1178757, 1186720, 1183744, 1149755, 1181345, 1153601, 1153609,\n", + " 1186957, 1187948, 1158771, 1158779, 1158512, 1181198, 1167636, 1179069,\n", + " 1158374, 1158380, 1158371, 1155892, 1157272, 1184310, 1140393, 1177772,\n", + " 1186277, 1180521, 1159341, 1168876, 1163421, 1158161, 1161819, 1166783,\n", + " 1147182, 1167395, 1168981, 1164130, 1164133, 1170421, 1190720, 1139828,\n", + " 1139831, 1154806, 1149668, 1182021, 1151288, 1194515, 1156055, 1170000,\n", + " 1146398, 1146395, 1190227, 1149544, 1176390, 1192167, 1182370, 1156846,\n", + " 1169960, 1179517, 1194469, 1140997, 1183389, 1191655, 1181422, 1179852,\n", + " 1162156, 1151774, 1171113, 1191705, 1188125, 1167089, 1194059, 1180997,\n", + " 1172423, 1172122, 1178135, 1180532, 1162670, 1182186, 1181115, 1193580,\n", + " 1192670, 1189075, 1169397, 1169402, 1157017, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1198770, 1195697, 1199439, 1195397, 1199736, 1198731, 1195860, 1199282,\n", + " 1201577, 1201582, 1202119, 1201015, 1201016, 1198694, 1198702, 1202803,\n", + " 1198546, 1198557, 1196685, 1199053, 1194651, 1195263, 1197923, 1201992,\n", + " 1196030, 1198542, 1195828, 1197766, 1196461, 1195888, 1199171, 1197856,\n", + " 1196359, 1196517, 1194759, 1196837, 1196711, 1199823, 1195265, 1196249,\n", + " 1198219, 1195038, 1195541, 1199314, 1197474, 1195910, 1196281, 1196283,\n", + " 1195353, 1200959, 1197129, 1197291, 1195119, 1199685, 1199628, 1197990,\n", + " 1197994, 1200872, 1199152, 1199154, 1198406, 1199231, 1201910, 1201916,\n", + " 1199745, 1199676, 1194795, 1201511, 1196498, 1196508, 1197970, 1197609,\n", + " 1197957, 1196727, 1202618, 1198428, 1200018, 1200154, 1199555, 1201827,\n", + " 1195592, 1202631, 1194805, 1199546, 1202640, 1201042, 1200363, 1199532,\n", + " 1200546, 1200553, 1200315, 1197097, 1197100, 1199877, 1200853, 1196883,\n", + " 1199908, 1201442, 1202239, 1202175, 1195885, 1201291, 1195607, 1202889,\n", + " 1196966, 1200784, 1199606, 1195048, 1203113, 1195676, 1200684, 1198911,\n", + " 1197822, 1197823, 1198114, 1198127, 1196597, 1199659, 1194730, 1198147,\n", + " 1200003, 1197735, 1198819, 1201886, 1197652, 1197655, 1194908, 1203166,\n", + " 1196428], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1198770, 1195697, 1199439, 1195397, 1199736, 1198731, 1195860, 1199282,\n", + " 1201577, 1201582, 1202119, 1201015, 1201016, 1198694, 1198702, 1202803,\n", + " 1198546, 1198557, 1196685, 1199053, 1194651, 1195263, 1197923, 1201992,\n", + " 1196030, 1198542, 1195828, 1197766, 1196461, 1195888, 1199171, 1197856,\n", + " 1196359, 1196517, 1194759, 1196837, 1196711, 1199823, 1195265, 1196249,\n", + " 1198219, 1195038, 1195541, 1199314, 1197474, 1195910, 1196281, 1196283,\n", + " 1195353, 1200959, 1197129, 1197291, 1195119, 1199685, 1199628, 1197990,\n", + " 1197994, 1200872, 1199152, 1199154, 1198406, 1199231, 1201910, 1201916,\n", + " 1199745, 1199676, 1194795, 1201511, 1196498, 1196508, 1197970, 1197609,\n", + " 1197957, 1196727, 1202618, 1198428, 1200018, 1200154, 1199555, 1201827,\n", + " 1195592, 1202631, 1194805, 1199546, 1202640, 1201042, 1200363, 1199532,\n", + " 1200546, 1200553, 1200315, 1197097, 1197100, 1199877, 1200853, 1196883,\n", + " 1199908, 1201442, 1202239, 1202175, 1195885, 1201291, 1195607, 1202889,\n", + " 1196966, 1200784, 1199606, 1195048, 1203113, 1195676, 1200684, 1198911,\n", + " 1197822, 1197823, 1198114, 1198127, 1196597, 1199659, 1194730, 1198147,\n", + " 1200003, 1197735, 1198819, 1201886, 1197652, 1197655, 1194908, 1203166,\n", + " 1196428], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.1075e-01, -2.6651e-04, 6.9062e-01, ..., 1.3342e-01,\n", + " -2.0865e-03, -4.8313e-03],\n", + " [ 3.3284e-02, -1.4092e-04, 7.6009e-02, ..., 4.1521e-02,\n", + " -1.1156e-03, -1.5161e-03],\n", + " [ 1.2578e-01, -3.8778e-04, 7.5794e-01, ..., 1.3613e-01,\n", + " -1.9239e-03, -4.7740e-03],\n", + " ...,\n", + " [ 2.4815e-01, -5.8711e-04, 1.0339e+00, ..., 1.1001e-01,\n", + " -1.8086e-03, -6.8858e-03],\n", + " [ 1.2848e-01, 1.5444e-02, 6.8528e-01, ..., 1.3011e-01,\n", + " -2.0121e-03, -4.2327e-03],\n", + " [ 2.5296e-01, -3.1016e-04, 1.0267e+00, ..., 1.1647e-01,\n", + " -1.8209e-03, -6.6583e-03]], device='cuda:0'), 'paper': tensor([[ 5.7582e-01, -1.8126e-03, 2.1354e+00, ..., -2.1286e-03,\n", + " -3.6192e-02, 4.2954e-01],\n", + " [ 3.3105e-01, 1.0439e+00, 2.7967e+00, ..., -5.0392e-03,\n", + " -2.4256e-02, -8.1743e-03],\n", + " [ 1.8651e+00, 1.8555e+00, 1.0978e+00, ..., -1.2491e-02,\n", + " -2.2580e-02, 1.5375e+00],\n", + " ...,\n", + " [ 8.1326e-01, 1.3346e+00, 2.5839e+00, ..., -8.4545e-03,\n", + " -2.6932e-02, -1.7145e-03],\n", + " [ 8.5888e-02, 7.8362e-01, 2.9543e+00, ..., -5.5897e-03,\n", + " -2.5225e-02, -1.2119e-02],\n", + " [ 1.7837e+00, 1.4742e+00, 3.3471e+00, ..., 2.4622e+00,\n", + " -5.7030e-02, 4.0187e+00]], device='cuda:0'), 'author': tensor([[-1.4064e-03, 3.4156e-01, 1.4631e-01, ..., 1.7310e+00,\n", + " 1.2861e-01, 6.9943e-02],\n", + " [-1.1809e-03, 2.9681e-01, 2.6704e-01, ..., 1.6108e+00,\n", + " -4.2496e-04, -5.3246e-04],\n", + " [-1.9481e-03, 3.2055e-01, 2.4701e-01, ..., 1.7040e+00,\n", + " -9.5708e-04, -9.2335e-04],\n", + " ...,\n", + " [-6.2942e-04, 2.9830e-02, 1.2906e-01, ..., 1.6955e-01,\n", + " -1.0748e-04, -6.7757e-04],\n", + " [-1.0459e-03, 2.5793e-01, 1.5795e-01, ..., 1.6474e+00,\n", + " 1.6390e-01, 5.3643e-02],\n", + " [-1.6092e-03, 2.5930e-01, 2.5846e-01, ..., 1.7087e+00,\n", + " 8.1279e-02, -2.9219e-04]], device='cuda:0'), 'field_of_study': tensor([[ 0.1864, 0.9021, 0.4607, ..., -0.0060, 0.3441, 0.0066],\n", + " [ 0.0605, 0.7622, 0.3574, ..., -0.0089, 0.3478, 0.2874],\n", + " [ 0.0487, 0.7108, 0.4521, ..., -0.0078, 0.1566, 0.4619],\n", + " ...,\n", + " [ 0.0780, 0.5119, 0.2822, ..., -0.0053, 0.2862, 0.0812],\n", + " [ 0.0307, 0.7361, 0.4116, ..., -0.0093, 0.3244, 0.4087],\n", + " [ 0.2502, 0.7902, 0.5053, ..., -0.0070, 0.3219, 0.0422]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 25, 260, 275, 286, 270, 270, 270, 455, 477, 304, 304, 495,\n", + " 557, 557, 557, 1183, 942, 984, 817, 831, 1033, 1089, 1028, 1205,\n", + " 1122, 1124, 1124, 1346, 1366, 1456, 1310, 1290, 1335, 1411, 1373, 1581,\n", + " 1625, 1559, 1547, 1568, 1707, 1666, 1691, 1781, 1615, 1718, 1911, 1911,\n", + " 2011, 2091, 2067, 2067, 2067, 2067, 2067, 2043, 1933, 1933, 2057, 2057,\n", + " 2053, 1992, 2001, 2001, 2247, 2237, 2298, 2336, 2323, 2323, 2348, 2263,\n", + " 2263, 2594, 2494, 2352, 2450, 2555, 2555, 2490, 2579, 2677, 2574, 2673,\n", + " 2650, 2752, 2696, 2696, 2758, 2724, 2764, 2764, 2764, 2764, 2690, 2717,\n", + " 2764, 2764, 3045, 3066, 2963, 3176, 3072, 3072, 3140, 3229, 3195, 3195,\n", + " 3217, 3201, 3496, 3350, 3501, 3377, 3579, 3579, 3622, 3622, 3781, 3781,\n", + " 3781, 3766, 3793, 3716, 3843, 3798, 3798, 3798, 3969, 3876, 3665, 4028,\n", + " 3986, 3994, 3852, 4147, 4099, 4087, 4013, 4159, 4123, 4226, 4213, 4213,\n", + " 4435, 4314, 4398, 4441, 4441, 4345, 4345, 4385, 4385, 4381, 4617, 4520,\n", + " 4392, 4590, 5021, 4868, 5054, 4861, 5068, 5068, 4996, 4996, 5267, 5156,\n", + " 5260, 5260, 5369, 5478, 5307, 5521, 5521, 5521, 5239, 5239, 5862, 5319,\n", + " 5319, 5661, 5734, 5734, 5664, 5769, 5912, 5760, 5730, 6098, 6020, 6051,\n", + " 6051, 6096, 6130, 6274, 6225, 6225, 6265],\n", + " [ 73, 89, 125, 126, 117, 86, 103, 14, 52, 88, 98, 77,\n", + " 52, 68, 89, 89, 97, 64, 19, 115, 49, 76, 28, 7,\n", + " 106, 1, 69, 31, 90, 114, 126, 106, 105, 22, 74, 8,\n", + " 15, 82, 43, 2, 21, 106, 19, 95, 74, 102, 113, 3,\n", + " 106, 35, 20, 2, 45, 53, 85, 48, 18, 104, 83, 29,\n", + " 19, 23, 113, 3, 100, 83, 11, 73, 111, 0, 22, 13,\n", + " 25, 19, 11, 73, 83, 85, 21, 36, 29, 92, 44, 21,\n", + " 110, 56, 54, 32, 39, 125, 6, 33, 128, 69, 42, 58,\n", + " 78, 81, 114, 102, 9, 116, 52, 23, 113, 51, 21, 17,\n", + " 120, 114, 65, 122, 107, 61, 23, 30, 37, 99, 93, 115,\n", + " 94, 21, 66, 5, 91, 46, 11, 116, 43, 118, 124, 27,\n", + " 16, 83, 110, 62, 72, 27, 108, 27, 98, 127, 21, 17,\n", + " 67, 27, 10, 89, 54, 63, 119, 109, 79, 4, 123, 84,\n", + " 26, 101, 54, 73, 107, 59, 56, 34, 47, 60, 11, 65,\n", + " 32, 54, 80, 73, 36, 40, 54, 126, 17, 21, 112, 58,\n", + " 24, 70, 96, 12, 21, 26, 87, 9, 121, 41, 57, 70,\n", + " 73, 50, 75, 55, 38, 112, 71]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1351, 1652, 914, ..., 4873, 4870, 5910],\n", + " [ 51, 26, 35, ..., 6746, 6746, 6529]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 77, 83, 52, ..., 17, 69, 83],\n", + " [ 113, 188, 36, ..., 6280, 6251, 6233]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 305, 246, 4, ..., 6608, 6738, 6696],\n", + " [ 301, 822, 185, ..., 525, 301, 301]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 787, 301, 11, ..., 614, 530, 313],\n", + " [ 269, 169, 201, ..., 6647, 6649, 6728]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4177, 4998, 2535, ..., 3897, 3546, 6710],\n", + " [ 31, 44, 22, ..., 6239, 6259, 6254]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 4, 4, 4, ..., 6711, 6694, 6696],\n", + " [4708, 1666, 1656, ..., 2095, 120, 3276]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 181, 181, 181, ..., 6265, 6265, 6265],\n", + " [ 244, 728, 712, ..., 3658, 3885, 6719]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005355\n", + "sampling 0.005276\n", + "noi time: 0.002031\n", + "get_vertex_data call: 0.036243\n", + "noi group time: 0.002842\n", + "eoi_group_time: 0.012836\n", + "second half: 0.209318\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24187, 4080, 10012, ..., 1100734, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24187, 4080, 10012, ..., 1100734, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1221601, 1203800, 1230561, ..., 1936972, 1936974, 1936964],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1221601, 1203800, 1230561, ..., 1936972, 1936974, 1936964],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1136228, 1140282, 1135933, 1135716, 1140785, 1140799, 1139701,\n", + " 1141758, 1138335, 1136971, 1139811, 1145984, 1138930, 1138933, 1138942,\n", + " 1138936, 1139241, 1146640, 1140781, 1150503, 1150509, 1134937, 1149217,\n", + " 1149220, 1155683, 1155689, 1149640, 1147473, 1147483, 1147221, 1147226,\n", + " 1153948, 1144636, 1134700, 1148343, 1152666, 1148546, 1141904, 1137220,\n", + " 1139364, 1139371, 1136685, 1136268, 1146369, 1146376, 1146375, 1138745,\n", + " 1134667, 1137829, 1136308, 1151520, 1134735, 1140020, 1135367, 1135202,\n", + " 1154739, 1141036, 1136289, 1134794, 1157447, 1143069, 1137687, 1136619,\n", + " 1144389, 1144395, 1137529, 1137534, 1135408, 1136662, 1137441, 1139161,\n", + " 1141702, 1135977, 1135579, 1140970, 1138514, 1153094, 1158136, 1136985,\n", + " 1156899, 1135522, 1138436, 1138440, 1136542, 1138450, 1138461, 1138449,\n", + " 1136599, 1149328, 1138834, 1135101, 1138695, 1138694, 1138882, 1156606,\n", + " 1147112, 1147118, 1142611, 1135355, 1138181, 1148531, 1137113, 1137109,\n", + " 1141520, 1139668, 1139673, 1142255, 1134992, 1134771, 1142434, 1136551,\n", + " 1139755, 1140199, 1158974, 1139321, 1153543, 1140034, 1138654, 1138148,\n", + " 1141966, 1141985, 1152044, 1142302, 1140660, 1137734, 1137728, 1134741,\n", + " 1138240, 1135540, 1137889, 1141095, 1141097, 1141100, 1162946, 1135291,\n", + " 1139632, 1143711, 1139025, 1149968, 1141690, 1136637, 1142932, 1159799,\n", + " 1136917, 1144237, 1144239, 1140598, 1141785, 1136760, 1141300, 1134979,\n", + " 1147850, 1149433, 1149435, 1141810, 1141821, 1143166, 1145154, 1143580,\n", + " 1158595, 1139194, 1141479, 1138709, 1138708, 1137660, 1137661, 1138418,\n", + " 1143107, 1143113, 1144596, 1140442, 1144182, 1150898, 1146201, 1158698,\n", + " 1158703, 1147153, 1149193, 1149197, 1141365, 1141367, 1141725, 1149088,\n", + " 1144279, 1139508, 1139510, 1139763, 1140089, 1139127, 1145213, 1140979,\n", + " 1140990, 1140984, 1146702, 1135047, 1147050, 1145873, 1152976, 1152980,\n", + " 1139447, 1141925, 1146898, 1144242, 1145337, 1140580, 1165366, 1141841,\n", + " 1141846, 1141853, 1137570, 1145971, 1145979, 1143845, 1146008, 1136273,\n", + " 1146024, 1150606, 1149933, 1139990, 1146302, 1147543, 1147150, 1148763,\n", + " 1147282, 1142829, 1149160, 1147469, 1139415, 1148009, 1143051, 1143040,\n", + " 1157720, 1136836, 1136843, 1144771, 1136445, 1144946, 1143345, 1144765,\n", + " 1144753, 1144611, 1144619, 1144615, 1145813, 1144088, 1135876, 1146526,\n", + " 1143457, 1137711, 1142015, 1143937, 1140360, 1140364, 1137994, 1143080,\n", + " 1166410, 1144725, 1147999, 1146949, 1134899, 1139252, 1139249, 1145457,\n", + " 1148704, 1142702, 1141319, 1141327, 1146751, 1146742, 1148473, 1153701,\n", + " 1141131, 1158226, 1143922, 1143931, 1141137, 1145240, 1145751, 1142376,\n", + " 1146147, 1146178, 1146180, 1138863, 1152530, 1152537, 1151179, 1150438,\n", + " 1150445, 1147954, 1155006, 1156468, 1151856, 1149791, 1144524, 1144203,\n", + " 1154823, 1144888, 1154271, 1139914, 1134869, 1142286, 1140564, 1147023,\n", + " 1158944, 1137644, 1149985, 1149991, 1147653, 1143552, 1149412, 1148288,\n", + " 1135073, 1139096, 1154420, 1148180, 1152561, 1136247, 1139721, 1152494,\n", + " 1141177, 1141181, 1141182, 1157968, 1144110, 1143888, 1148204, 1153124,\n", + " 1153192, 1153188, 1150356, 1169587, 1143134, 1147442, 1152581, 1152591,\n", + " 1135303, 1154182, 1150715, 1148498, 1149732, 1147737, 1145086, 1146974,\n", + " 1156403, 1156402, 1146616, 1146623, 1152100, 1152103, 1156325, 1153034,\n", + " 1137746, 1146307, 1146304, 1151952, 1152819, 1155337, 1154633, 1151617,\n", + " 1150578, 1136131, 1136788, 1148914, 1156826, 1138283, 1152300, 1136028,\n", + " 1136029, 1151195, 1151067, 1151058, 1152886, 1142777, 1143483, 1150099,\n", + " 1153913, 1150164, 1148040, 1155202, 1149300, 1155218, 1149798, 1144667,\n", + " 1168185, 1148628, 1158540, 1149942, 1154563, 1154567, 1135698, 1153085,\n", + " 1142047, 1154377, 1157547, 1158857, 1182205, 1156505, 1152384, 1137814,\n", + " 1137823, 1139479, 1143491, 1151257, 1150475, 1135231, 1152179, 1152182,\n", + " 1153413, 1147810, 1147818, 1157779, 1139529, 1158308, 1155441, 1154528,\n", + " 1145771, 1138961, 1142755, 1156207, 1151379, 1158639, 1155122, 1151431,\n", + " 1146913, 1156463, 1158096, 1154763, 1155665, 1155628, 1156563, 1136466,\n", + " 1158823, 1158824, 1148834, 1155646, 1143254, 1143262, 1143263, 1146943,\n", + " 1154240, 1156718, 1154903, 1143189, 1143531, 1150371, 1153322, 1155606,\n", + " 1140746, 1137152, 1158204, 1137381, 1138269, 1134674, 1135601, 1150661,\n", + " 1150659, 1155848, 1155852, 1146326, 1149145, 1144463, 1152220, 1140381,\n", + " 1140374, 1157732, 1144845, 1142466, 1155975, 1153762, 1156812, 1155393,\n", + " 1155403, 1149700, 1159790, 1136899, 1136909, 1136896, 1158886, 1158891,\n", + " 1157296, 1158815, 1156778, 1155246, 1136480, 1136494, 1136491, 1157571,\n", + " 1156488, 1153808, 1156278, 1136640, 1136646, 1134754, 1140049, 1161162,\n", + " 1156516, 1146126, 1158004, 1158006, 1165853, 1142487, 1150674, 1167346,\n", + " 1159042, 1151080, 1157944, 1160563, 1153052, 1153045, 1155770, 1166242,\n", + " 1144158, 1153841, 1156109, 1138393, 1150046, 1159475, 1149063, 1149070,\n", + " 1145945, 1155479, 1153514, 1156247, 1164006, 1149963, 1154590, 1139593,\n", + " 1139284, 1139286, 1139281, 1148021, 1166073, 1159985, 1169315, 1146063,\n", + " 1164423, 1165309, 1140135, 1158878, 1170415, 1140643, 1148607, 1168081,\n", + " 1168168, 1151875, 1141800, 1156177, 1159032, 1160895, 1152247, 1143729,\n", + " 1160605, 1155588, 1138679, 1144984, 1144989, 1169647, 1146500, 1146510,\n", + " 1146509, 1153247, 1166881, 1145137, 1155266, 1155272, 1141471, 1147426,\n", + " 1157044, 1156737, 1156739, 1153660, 1150646, 1171044, 1171040, 1144812,\n", + " 1140115, 1153276, 1135567, 1156292, 1145728, 1166462, 1169509, 1146444,\n", + " 1169212, 1169201, 1184040, 1143025, 1145454, 1145447, 1165746, 1147346,\n", + " 1147355, 1152624, 1145902, 1153534, 1143402, 1170980, 1171867, 1144702,\n", + " 1167817, 1155172, 1150518, 1167915, 1144344, 1144346, 1144336, 1157534,\n", + " 1154670, 1193085, 1154893, 1154885, 1151674, 1169359, 1154364, 1147502,\n", + " 1146344, 1171534, 1158623, 1172575, 1158051, 1173047, 1149846, 1155502,\n", + " 1152353, 1152360, 1165528, 1143172, 1152546, 1152550, 1172838, 1169040,\n", + " 1173307, 1154027, 1159652, 1169583, 1162638, 1157158, 1157153, 1157373,\n", + " 1147711, 1151850, 1148131, 1157592, 1170490, 1160979, 1177708, 1166682,\n", + " 1177178, 1150234, 1154151, 1154148, 1149169, 1178610, 1143279, 1171297,\n", + " 1171299, 1177781, 1186306, 1181756, 1153619, 1182106, 1182651, 1162129,\n", + " 1155250, 1155262, 1154718, 1177584, 1151488, 1172546, 1171623, 1164044,\n", + " 1157124, 1157072, 1158249, 1158253, 1153898, 1154497, 1164200, 1145626,\n", + " 1154834, 1180015, 1161907, 1149755, 1146242, 1153601, 1145092, 1183274,\n", + " 1158512, 1158940, 1155890, 1155892, 1155899, 1185514, 1181971, 1181982,\n", + " 1183069, 1140399, 1171025, 1160078, 1166107, 1164437, 1179130, 1161819,\n", + " 1146161, 1170034, 1185386, 1139831, 1139837, 1167131, 1192076, 1156049,\n", + " 1156055, 1170000, 1151978, 1173183, 1181899, 1191714, 1192426, 1159079,\n", + " 1188169, 1167840, 1190127, 1186492, 1151774, 1193225, 1183618, 1192999,\n", + " 1176041, 1181834, 1186423, 1155959, 1155962, 1190863, 1181699, 1175334,\n", + " 1182855, 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1136228, 1140282, 1135933, 1135716, 1140785, 1140799, 1139701,\n", + " 1141758, 1138335, 1136971, 1139811, 1145984, 1138930, 1138933, 1138942,\n", + " 1138936, 1139241, 1146640, 1140781, 1150503, 1150509, 1134937, 1149217,\n", + " 1149220, 1155683, 1155689, 1149640, 1147473, 1147483, 1147221, 1147226,\n", + " 1153948, 1144636, 1134700, 1148343, 1152666, 1148546, 1141904, 1137220,\n", + " 1139364, 1139371, 1136685, 1136268, 1146369, 1146376, 1146375, 1138745,\n", + " 1134667, 1137829, 1136308, 1151520, 1134735, 1140020, 1135367, 1135202,\n", + " 1154739, 1141036, 1136289, 1134794, 1157447, 1143069, 1137687, 1136619,\n", + " 1144389, 1144395, 1137529, 1137534, 1135408, 1136662, 1137441, 1139161,\n", + " 1141702, 1135977, 1135579, 1140970, 1138514, 1153094, 1158136, 1136985,\n", + " 1156899, 1135522, 1138436, 1138440, 1136542, 1138450, 1138461, 1138449,\n", + " 1136599, 1149328, 1138834, 1135101, 1138695, 1138694, 1138882, 1156606,\n", + " 1147112, 1147118, 1142611, 1135355, 1138181, 1148531, 1137113, 1137109,\n", + " 1141520, 1139668, 1139673, 1142255, 1134992, 1134771, 1142434, 1136551,\n", + " 1139755, 1140199, 1158974, 1139321, 1153543, 1140034, 1138654, 1138148,\n", + " 1141966, 1141985, 1152044, 1142302, 1140660, 1137734, 1137728, 1134741,\n", + " 1138240, 1135540, 1137889, 1141095, 1141097, 1141100, 1162946, 1135291,\n", + " 1139632, 1143711, 1139025, 1149968, 1141690, 1136637, 1142932, 1159799,\n", + " 1136917, 1144237, 1144239, 1140598, 1141785, 1136760, 1141300, 1134979,\n", + " 1147850, 1149433, 1149435, 1141810, 1141821, 1143166, 1145154, 1143580,\n", + " 1158595, 1139194, 1141479, 1138709, 1138708, 1137660, 1137661, 1138418,\n", + " 1143107, 1143113, 1144596, 1140442, 1144182, 1150898, 1146201, 1158698,\n", + " 1158703, 1147153, 1149193, 1149197, 1141365, 1141367, 1141725, 1149088,\n", + " 1144279, 1139508, 1139510, 1139763, 1140089, 1139127, 1145213, 1140979,\n", + " 1140990, 1140984, 1146702, 1135047, 1147050, 1145873, 1152976, 1152980,\n", + " 1139447, 1141925, 1146898, 1144242, 1145337, 1140580, 1165366, 1141841,\n", + " 1141846, 1141853, 1137570, 1145971, 1145979, 1143845, 1146008, 1136273,\n", + " 1146024, 1150606, 1149933, 1139990, 1146302, 1147543, 1147150, 1148763,\n", + " 1147282, 1142829, 1149160, 1147469, 1139415, 1148009, 1143051, 1143040,\n", + " 1157720, 1136836, 1136843, 1144771, 1136445, 1144946, 1143345, 1144765,\n", + " 1144753, 1144611, 1144619, 1144615, 1145813, 1144088, 1135876, 1146526,\n", + " 1143457, 1137711, 1142015, 1143937, 1140360, 1140364, 1137994, 1143080,\n", + " 1166410, 1144725, 1147999, 1146949, 1134899, 1139252, 1139249, 1145457,\n", + " 1148704, 1142702, 1141319, 1141327, 1146751, 1146742, 1148473, 1153701,\n", + " 1141131, 1158226, 1143922, 1143931, 1141137, 1145240, 1145751, 1142376,\n", + " 1146147, 1146178, 1146180, 1138863, 1152530, 1152537, 1151179, 1150438,\n", + " 1150445, 1147954, 1155006, 1156468, 1151856, 1149791, 1144524, 1144203,\n", + " 1154823, 1144888, 1154271, 1139914, 1134869, 1142286, 1140564, 1147023,\n", + " 1158944, 1137644, 1149985, 1149991, 1147653, 1143552, 1149412, 1148288,\n", + " 1135073, 1139096, 1154420, 1148180, 1152561, 1136247, 1139721, 1152494,\n", + " 1141177, 1141181, 1141182, 1157968, 1144110, 1143888, 1148204, 1153124,\n", + " 1153192, 1153188, 1150356, 1169587, 1143134, 1147442, 1152581, 1152591,\n", + " 1135303, 1154182, 1150715, 1148498, 1149732, 1147737, 1145086, 1146974,\n", + " 1156403, 1156402, 1146616, 1146623, 1152100, 1152103, 1156325, 1153034,\n", + " 1137746, 1146307, 1146304, 1151952, 1152819, 1155337, 1154633, 1151617,\n", + " 1150578, 1136131, 1136788, 1148914, 1156826, 1138283, 1152300, 1136028,\n", + " 1136029, 1151195, 1151067, 1151058, 1152886, 1142777, 1143483, 1150099,\n", + " 1153913, 1150164, 1148040, 1155202, 1149300, 1155218, 1149798, 1144667,\n", + " 1168185, 1148628, 1158540, 1149942, 1154563, 1154567, 1135698, 1153085,\n", + " 1142047, 1154377, 1157547, 1158857, 1182205, 1156505, 1152384, 1137814,\n", + " 1137823, 1139479, 1143491, 1151257, 1150475, 1135231, 1152179, 1152182,\n", + " 1153413, 1147810, 1147818, 1157779, 1139529, 1158308, 1155441, 1154528,\n", + " 1145771, 1138961, 1142755, 1156207, 1151379, 1158639, 1155122, 1151431,\n", + " 1146913, 1156463, 1158096, 1154763, 1155665, 1155628, 1156563, 1136466,\n", + " 1158823, 1158824, 1148834, 1155646, 1143254, 1143262, 1143263, 1146943,\n", + " 1154240, 1156718, 1154903, 1143189, 1143531, 1150371, 1153322, 1155606,\n", + " 1140746, 1137152, 1158204, 1137381, 1138269, 1134674, 1135601, 1150661,\n", + " 1150659, 1155848, 1155852, 1146326, 1149145, 1144463, 1152220, 1140381,\n", + " 1140374, 1157732, 1144845, 1142466, 1155975, 1153762, 1156812, 1155393,\n", + " 1155403, 1149700, 1159790, 1136899, 1136909, 1136896, 1158886, 1158891,\n", + " 1157296, 1158815, 1156778, 1155246, 1136480, 1136494, 1136491, 1157571,\n", + " 1156488, 1153808, 1156278, 1136640, 1136646, 1134754, 1140049, 1161162,\n", + " 1156516, 1146126, 1158004, 1158006, 1165853, 1142487, 1150674, 1167346,\n", + " 1159042, 1151080, 1157944, 1160563, 1153052, 1153045, 1155770, 1166242,\n", + " 1144158, 1153841, 1156109, 1138393, 1150046, 1159475, 1149063, 1149070,\n", + " 1145945, 1155479, 1153514, 1156247, 1164006, 1149963, 1154590, 1139593,\n", + " 1139284, 1139286, 1139281, 1148021, 1166073, 1159985, 1169315, 1146063,\n", + " 1164423, 1165309, 1140135, 1158878, 1170415, 1140643, 1148607, 1168081,\n", + " 1168168, 1151875, 1141800, 1156177, 1159032, 1160895, 1152247, 1143729,\n", + " 1160605, 1155588, 1138679, 1144984, 1144989, 1169647, 1146500, 1146510,\n", + " 1146509, 1153247, 1166881, 1145137, 1155266, 1155272, 1141471, 1147426,\n", + " 1157044, 1156737, 1156739, 1153660, 1150646, 1171044, 1171040, 1144812,\n", + " 1140115, 1153276, 1135567, 1156292, 1145728, 1166462, 1169509, 1146444,\n", + " 1169212, 1169201, 1184040, 1143025, 1145454, 1145447, 1165746, 1147346,\n", + " 1147355, 1152624, 1145902, 1153534, 1143402, 1170980, 1171867, 1144702,\n", + " 1167817, 1155172, 1150518, 1167915, 1144344, 1144346, 1144336, 1157534,\n", + " 1154670, 1193085, 1154893, 1154885, 1151674, 1169359, 1154364, 1147502,\n", + " 1146344, 1171534, 1158623, 1172575, 1158051, 1173047, 1149846, 1155502,\n", + " 1152353, 1152360, 1165528, 1143172, 1152546, 1152550, 1172838, 1169040,\n", + " 1173307, 1154027, 1159652, 1169583, 1162638, 1157158, 1157153, 1157373,\n", + " 1147711, 1151850, 1148131, 1157592, 1170490, 1160979, 1177708, 1166682,\n", + " 1177178, 1150234, 1154151, 1154148, 1149169, 1178610, 1143279, 1171297,\n", + " 1171299, 1177781, 1186306, 1181756, 1153619, 1182106, 1182651, 1162129,\n", + " 1155250, 1155262, 1154718, 1177584, 1151488, 1172546, 1171623, 1164044,\n", + " 1157124, 1157072, 1158249, 1158253, 1153898, 1154497, 1164200, 1145626,\n", + " 1154834, 1180015, 1161907, 1149755, 1146242, 1153601, 1145092, 1183274,\n", + " 1158512, 1158940, 1155890, 1155892, 1155899, 1185514, 1181971, 1181982,\n", + " 1183069, 1140399, 1171025, 1160078, 1166107, 1164437, 1179130, 1161819,\n", + " 1146161, 1170034, 1185386, 1139831, 1139837, 1167131, 1192076, 1156049,\n", + " 1156055, 1170000, 1151978, 1173183, 1181899, 1191714, 1192426, 1159079,\n", + " 1188169, 1167840, 1190127, 1186492, 1151774, 1193225, 1183618, 1192999,\n", + " 1176041, 1181834, 1186423, 1155959, 1155962, 1190863, 1181699, 1175334,\n", + " 1182855, 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199428, 1199282, 1201577, 1201582, 1201462, 1201660, 1197359, 1198633,\n", + " 1194745, 1195726, 1195494, 1196631, 1194649, 1195514, 1195263, 1199135,\n", + " 1201992, 1196030, 1195459, 1197760, 1195895, 1199172, 1195740, 1196334,\n", + " 1196359, 1196979, 1198106, 1194759, 1195313, 1196837, 1198668, 1198163,\n", + " 1196704, 1196711, 1199823, 1195148, 1195223, 1195267, 1196247, 1195850,\n", + " 1195541, 1199344, 1197248, 1196283, 1195353, 1198285, 1198282, 1199865,\n", + " 1199060, 1197282, 1195119, 1199685, 1199628, 1197676, 1197990, 1197994,\n", + " 1200872, 1199152, 1199038, 1195018, 1200051, 1196498, 1197970, 1197601,\n", + " 1196727, 1195773, 1200887, 1198428, 1199490, 1199421, 1198811, 1200570,\n", + " 1200503, 1198066, 1201421, 1201155, 1201056, 1200927, 1203350, 1201737,\n", + " 1200553, 1200557, 1200836, 1200429, 1197100, 1199879, 1200862, 1196889,\n", + " 1200194, 1196768, 1197944, 1197945, 1200823, 1200825, 1195876, 1201291,\n", + " 1200398, 1196960, 1196963, 1196966, 1200995, 1199606, 1195048, 1195438,\n", + " 1195679, 1195664, 1198055, 1195181, 1197821, 1198127, 1198973, 1199659,\n", + " 1201138, 1198824, 1199782, 1198819, 1201886, 1198140, 1200298, 1197035,\n", + " 1202077, 1194908, 1196428], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199428, 1199282, 1201577, 1201582, 1201462, 1201660, 1197359, 1198633,\n", + " 1194745, 1195726, 1195494, 1196631, 1194649, 1195514, 1195263, 1199135,\n", + " 1201992, 1196030, 1195459, 1197760, 1195895, 1199172, 1195740, 1196334,\n", + " 1196359, 1196979, 1198106, 1194759, 1195313, 1196837, 1198668, 1198163,\n", + " 1196704, 1196711, 1199823, 1195148, 1195223, 1195267, 1196247, 1195850,\n", + " 1195541, 1199344, 1197248, 1196283, 1195353, 1198285, 1198282, 1199865,\n", + " 1199060, 1197282, 1195119, 1199685, 1199628, 1197676, 1197990, 1197994,\n", + " 1200872, 1199152, 1199038, 1195018, 1200051, 1196498, 1197970, 1197601,\n", + " 1196727, 1195773, 1200887, 1198428, 1199490, 1199421, 1198811, 1200570,\n", + " 1200503, 1198066, 1201421, 1201155, 1201056, 1200927, 1203350, 1201737,\n", + " 1200553, 1200557, 1200836, 1200429, 1197100, 1199879, 1200862, 1196889,\n", + " 1200194, 1196768, 1197944, 1197945, 1200823, 1200825, 1195876, 1201291,\n", + " 1200398, 1196960, 1196963, 1196966, 1200995, 1199606, 1195048, 1195438,\n", + " 1195679, 1195664, 1198055, 1195181, 1197821, 1198127, 1198973, 1199659,\n", + " 1201138, 1198824, 1199782, 1198819, 1201886, 1198140, 1200298, 1197035,\n", + " 1202077, 1194908, 1196428], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 2.3489e-01, -3.1386e-04, 9.7175e-01, ..., 1.1584e-01,\n", + " -1.8786e-03, -6.3509e-03],\n", + " [ 2.3061e-01, -2.0820e-04, 9.5385e-01, ..., 1.0918e-01,\n", + " -1.8631e-03, -6.3392e-03],\n", + " [ 2.1077e-01, -1.5986e-04, 8.5851e-01, ..., 1.0768e-01,\n", + " -1.7793e-03, -5.5518e-03],\n", + " ...,\n", + " [ 1.5205e-01, -4.5661e-04, 8.3893e-01, ..., 1.6529e-01,\n", + " -1.9912e-03, -4.6799e-03],\n", + " [ 1.4003e-01, 1.0894e-02, 8.0368e-01, ..., 1.4797e-01,\n", + " -1.6635e-03, -5.1696e-03],\n", + " [ 2.1077e-01, -1.5986e-04, 8.5851e-01, ..., 1.0768e-01,\n", + " -1.7793e-03, -5.5518e-03]], device='cuda:0'), 'paper': tensor([[ 7.1083e-01, 9.4195e-01, 1.4424e+00, ..., -3.5973e-03,\n", + " -1.8626e-02, 7.5475e-02],\n", + " [ 1.6462e+00, 1.0645e+00, 3.4100e+00, ..., 1.6620e+00,\n", + " -5.3127e-02, 3.3042e+00],\n", + " [-4.1079e-03, -5.6471e-03, 3.4499e+00, ..., -9.3052e-03,\n", + " -3.2764e-02, -1.8560e-02],\n", + " ...,\n", + " [-3.1330e-03, -1.0501e-03, 3.5253e+00, ..., -8.2552e-03,\n", + " -3.0307e-02, -1.6449e-02],\n", + " [ 1.6483e+00, 1.3863e+00, 3.1884e+00, ..., 2.3451e+00,\n", + " -5.5425e-02, 3.7594e+00],\n", + " [ 3.9815e-01, 4.4679e-01, 2.0636e+00, ..., -5.0328e-03,\n", + " -2.1936e-02, -4.7708e-03]], device='cuda:0'), 'author': tensor([[-1.4027e-03, 2.9266e-01, 2.1801e-01, ..., 1.5789e+00,\n", + " -4.3711e-04, -2.5796e-04],\n", + " [-6.2942e-04, 2.9830e-02, 1.2906e-01, ..., 1.6955e-01,\n", + " -1.0748e-04, -6.7757e-04],\n", + " [-2.0584e-03, 2.8996e-01, 2.4777e-01, ..., 1.7625e+00,\n", + " -1.1091e-03, -1.2927e-03],\n", + " ...,\n", + " [-3.0134e-03, 3.0993e-01, 2.6525e-01, ..., 1.4310e+00,\n", + " -2.8805e-03, -2.7856e-03],\n", + " [-1.4679e-03, 3.2749e-01, 2.0413e-01, ..., 1.6952e+00,\n", + " -3.8934e-05, 5.0600e-03],\n", + " [-1.4772e-03, 2.2084e-01, 2.6138e-01, ..., 1.6553e+00,\n", + " 4.9215e-02, -2.9141e-04]], device='cuda:0'), 'field_of_study': tensor([[ 5.5628e-02, 6.9646e-01, 4.5369e-01, ..., -1.0086e-02,\n", + " 2.9101e-01, 4.8803e-01],\n", + " [ 9.6476e-02, 8.3679e-01, 4.2529e-01, ..., -8.6402e-03,\n", + " 3.6626e-01, 3.4997e-01],\n", + " [ 9.8711e-02, 7.8459e-01, 4.1872e-01, ..., -8.7670e-03,\n", + " 3.2343e-01, 3.5116e-01],\n", + " ...,\n", + " [-1.7452e-04, 6.0867e-01, 3.8239e-01, ..., -6.0822e-03,\n", + " 2.2226e-01, 1.9959e-01],\n", + " [ 4.9776e-02, 6.6711e-01, 3.8771e-01, ..., -8.3622e-03,\n", + " 2.4150e-01, 3.9205e-01],\n", + " [ 2.6501e-01, 9.0011e-01, 5.9561e-01, ..., -8.9496e-03,\n", + " 3.8971e-01, 1.4427e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 141, 8, 224, 184, 57, 176, 164, 6, 312, 464, 583, 282,\n", + " 360, 384, 396, 490, 490, 634, 838, 1124, 574, 884, 579, 1108,\n", + " 1084, 989, 946, 1163, 998, 1168, 1149, 1145, 1231, 1623, 1404, 1690,\n", + " 1616, 1826, 1627, 1627, 1726, 1675, 1645, 1745, 1664, 1737, 1664, 1664,\n", + " 1766, 1785, 1785, 1893, 1986, 2032, 2014, 2014, 2170, 2267, 2216, 2216,\n", + " 2360, 2548, 2262, 2462, 2441, 2448, 2448, 2510, 2510, 2513, 2601, 2601,\n", + " 2440, 2561, 2668, 2619, 2599, 2599, 2624, 2634, 2841, 2767, 2767, 2723,\n", + " 2634, 2634, 2803, 2828, 3127, 2910, 2924, 2910, 2910, 3015, 2932, 2932,\n", + " 3148, 3153, 3216, 3151, 3350, 3113, 3350, 3330, 3379, 3489, 3489, 3363,\n", + " 3786, 3786, 3621, 3777, 4103, 4200, 3944, 4250, 4116, 4116, 4290, 4317,\n", + " 4317, 4452, 4445, 4558, 4519, 4566, 4405, 4558, 4558, 4698, 4855, 4672,\n", + " 4627, 4658, 4784, 4901, 5102, 5231, 5041, 5046, 5269, 5421, 5437, 5437,\n", + " 5180, 5583, 5573, 5652, 5566, 5912, 5912, 5821, 5821, 5911, 5911, 5910,\n", + " 5982, 5848, 6235, 6109, 6564, 6564, 6329, 6289, 6665, 6575, 6575, 6368,\n", + " 6608, 6608, 6996, 6956, 6956, 6112, 6926, 6471, 6347, 6347, 6697, 6641,\n", + " 6556, 6556, 6691, 6691, 6547, 6897, 6897, 6395, 6665, 6884, 6884, 6884,\n", + " 6884, 6790, 6790],\n", + " [ 120, 105, 47, 53, 22, 32, 93, 65, 73, 22, 98, 46,\n", + " 84, 22, 64, 61, 89, 99, 116, 39, 79, 81, 17, 31,\n", + " 64, 60, 74, 110, 4, 63, 86, 29, 36, 44, 20, 119,\n", + " 64, 109, 46, 41, 105, 26, 50, 70, 4, 64, 110, 97,\n", + " 121, 14, 118, 44, 96, 113, 64, 111, 15, 14, 44, 85,\n", + " 9, 121, 55, 99, 33, 19, 25, 44, 99, 58, 44, 99,\n", + " 64, 113, 99, 68, 40, 4, 117, 90, 12, 13, 92, 115,\n", + " 106, 47, 52, 45, 64, 8, 31, 116, 88, 43, 57, 64,\n", + " 54, 99, 23, 99, 51, 113, 29, 68, 94, 0, 18, 72,\n", + " 10, 52, 64, 24, 115, 21, 37, 64, 113, 30, 24, 59,\n", + " 75, 111, 64, 50, 6, 22, 68, 16, 49, 26, 100, 82,\n", + " 28, 35, 16, 56, 87, 11, 22, 22, 104, 79, 65, 1,\n", + " 1, 115, 69, 5, 67, 3, 64, 78, 22, 71, 104, 31,\n", + " 7, 83, 28, 101, 64, 80, 39, 66, 95, 64, 101, 103,\n", + " 116, 64, 62, 64, 108, 27, 62, 42, 64, 3, 113, 107,\n", + " 76, 64, 112, 114, 91, 64, 38, 102, 48, 34, 2, 16,\n", + " 122, 64, 77]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1230, 1903, 2198, ..., 5502, 2995, 1884],\n", + " [ 163, 83, 54, ..., 5413, 5447, 5528]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 105, 8, 116, ..., 103, 8, 8],\n", + " [ 52, 5, 131, ..., 6766, 6783, 6971]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 113, 113, 113, ..., 5520, 5520, 5520],\n", + " [ 352, 87, 318, ..., 352, 30, 264]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 352, 205, 306, ..., 264, 76, 80],\n", + " [ 208, 158, 71, ..., 5555, 5570, 5353]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4323, 4252, 997, ..., 2282, 1791, 916],\n", + " [ 48, 68, 57, ..., 6902, 6749, 6749]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 105, 105, 105, ..., 5520, 5520, 5516],\n", + " [1432, 203, 185, ..., 184, 3762, 938]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 57, 57, 57, ..., 7002, 7002, 7002],\n", + " [ 84, 340, 1234, ..., 3130, 5373, 5517]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006553\n", + "sampling 0.006401\n", + "noi time: 0.001899\n", + "get_vertex_data call: 0.037767\n", + "noi group time: 0.003157\n", + "eoi_group_time: 0.015211\n", + "second half: 0.219895\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24187, 20846, 10012, ..., 1100728, 1119043, 1119055],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24187, 20846, 10012, ..., 1100728, 1119043, 1119055],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210831, 1224370, 1209341, ..., 1937998, 1937987, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210831, 1224370, 1209341, ..., 1937998, 1937987, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137435, 1137201, 1137204, 1137212, 1137213, 1137214, 1141424, 1136237,\n", + " 1136239, 1140282, 1140285, 1135926, 1138554, 1135716, 1137784, 1141758,\n", + " 1137506, 1136223, 1142807, 1139462, 1136156, 1136969, 1136971, 1136970,\n", + " 1141443, 1139820, 1139811, 1145370, 1145373, 1146977, 1146978, 1137937,\n", + " 1137271, 1138930, 1138938, 1139141, 1143372, 1143363, 1146644, 1139615,\n", + " 1140781, 1150509, 1142968, 1135376, 1149216, 1149228, 1155689, 1149632,\n", + " 1147473, 1147483, 1147486, 1135990, 1135989, 1142885, 1142881, 1153948,\n", + " 1144636, 1144632, 1146992, 1148337, 1146656, 1150193, 1152664, 1148546,\n", + " 1147089, 1155014, 1139371, 1147211, 1136676, 1136685, 1134715, 1134806,\n", + " 1138742, 1140537, 1140540, 1138112, 1138126, 1151520, 1140147, 1140159,\n", + " 1140953, 1135367, 1135202, 1140758, 1135903, 1141036, 1134794, 1134797,\n", + " 1138504, 1137342, 1136178, 1143069, 1137693, 1136619, 1135340, 1144395,\n", + " 1137529, 1137534, 1135408, 1157395, 1136662, 1137441, 1137025, 1136199,\n", + " 1139161, 1135579, 1135582, 1136098, 1135664, 1140970, 1137953, 1137957,\n", + " 1158136, 1158138, 1156965, 1137008, 1156899, 1135522, 1137291, 1138440,\n", + " 1140079, 1138461, 1157190, 1137924, 1149328, 1138845, 1135088, 1138695,\n", + " 1147112, 1147119, 1142611, 1160825, 1158980, 1158984, 1158982, 1145842,\n", + " 1148531, 1137109, 1137409, 1136449, 1136457, 1139667, 1134992, 1134772,\n", + " 1134780, 1136551, 1135776, 1140206, 1153543, 1140045, 1139085, 1139929,\n", + " 1138148, 1134886, 1146071, 1140557, 1141985, 1152044, 1140657, 1140660,\n", + " 1137728, 1147317, 1134750, 1138240, 1135549, 1136697, 1141097, 1144128,\n", + " 1145347, 1143767, 1143711, 1162716, 1137670, 1139025, 1139033, 1140003,\n", + " 1149979, 1141688, 1154467, 1136632, 1142929, 1141223, 1139386, 1163301,\n", + " 1136917, 1143666, 1143667, 1137188, 1145066, 1144237, 1140598, 1141156,\n", + " 1146449, 1141786, 1139495, 1136757, 1141609, 1144650, 1164807, 1139798,\n", + " 1144428, 1141810, 1141821, 1142093, 1143204, 1140173, 1158749, 1137762,\n", + " 1149111, 1148872, 1148871, 1138708, 1142913, 1138423, 1138424, 1144596,\n", + " 1142453, 1136864, 1144041, 1135315, 1144182, 1137606, 1150906, 1144869,\n", + " 1158698, 1137849, 1147153, 1142646, 1141365, 1141367, 1153068, 1141664,\n", + " 1149101, 1144279, 1139662, 1139127, 1143791, 1140619, 1140977, 1140990,\n", + " 1147050, 1143543, 1152976, 1152982, 1135466, 1141925, 1146900, 1144242,\n", + " 1150255, 1136885, 1139405, 1143643, 1137570, 1141381, 1145980, 1143851,\n", + " 1146019, 1146024, 1147084, 1141235, 1139990, 1143283, 1143883, 1147543,\n", + " 1148763, 1148760, 1147282, 1142829, 1142816, 1138669, 1142629, 1142637,\n", + " 1149608, 1143051, 1143052, 1136160, 1142588, 1144921, 1138922, 1138923,\n", + " 1136836, 1146105, 1139329, 1139328, 1143345, 1144619, 1144615, 1145816,\n", + " 1144093, 1144095, 1138595, 1135751, 1150755, 1150294, 1144375, 1143465,\n", + " 1143457, 1144291, 1143937, 1143949, 1140824, 1140817, 1147525, 1140361,\n", + " 1140364, 1137990, 1143080, 1143075, 1143082, 1168914, 1148966, 1144219,\n", + " 1147995, 1147996, 1147999, 1139252, 1147128, 1148704, 1142697, 1141825,\n", + " 1148468, 1148473, 1153701, 1153703, 1152327, 1152328, 1149718, 1147027,\n", + " 1143839, 1147971, 1145011, 1145021, 1145009, 1139549, 1158224, 1158226,\n", + " 1154526, 1145751, 1142369, 1138638, 1146178, 1146180, 1138861, 1138863,\n", + " 1150438, 1150445, 1149263, 1151867, 1149791, 1149777, 1144526, 1152013,\n", + " 1165252, 1147796, 1151480, 1152026, 1144884, 1145259, 1135504, 1146723,\n", + " 1134869, 1149530, 1149535, 1150127, 1147021, 1141949, 1146772, 1151795,\n", + " 1150723, 1137639, 1147653, 1149420, 1149412, 1148300, 1154420, 1158786,\n", + " 1148180, 1148188, 1151361, 1152561, 1152563, 1136249, 1136247, 1138197,\n", + " 1138877, 1152439, 1157968, 1157970, 1148729, 1144110, 1146544, 1146559,\n", + " 1146549, 1148204, 1154166, 1153124, 1153188, 1145104, 1159837, 1150932,\n", + " 1150935, 1152878, 1143092, 1150356, 1150365, 1151816, 1151821, 1152581,\n", + " 1135303, 1154183, 1150708, 1148505, 1141420, 1136002, 1156403, 1153255,\n", + " 1146623, 1144467, 1152409, 1154052, 1152107, 1146280, 1150085, 1145546,\n", + " 1137746, 1137756, 1146304, 1152622, 1140521, 1155140, 1136401, 1136402,\n", + " 1155337, 1154112, 1154119, 1154120, 1154124, 1152673, 1152672, 1151617,\n", + " 1145278, 1136134, 1136798, 1136788, 1153378, 1153391, 1138982, 1151311,\n", + " 1152349, 1146816, 1156826, 1156816, 1153297, 1138281, 1136028, 1158704,\n", + " 1151067, 1156396, 1163941, 1152886, 1143486, 1150164, 1148033, 1148040,\n", + " 1154453, 1152601, 1149794, 1144669, 1137048, 1148628, 1158530, 1158540,\n", + " 1149936, 1149940, 1149947, 1135707, 1147635, 1159223, 1142047, 1135434,\n", + " 1158927, 1154928, 1156505, 1145191, 1145184, 1137809, 1150465, 1150475,\n", + " 1142221, 1152179, 1156632, 1156638, 1157911, 1152737, 1150824, 1156932,\n", + " 1147810, 1158311, 1155441, 1150132, 1154530, 1154528, 1142755, 1142764,\n", + " 1142758, 1156271, 1157646, 1151390, 1151379, 1140187, 1155122, 1152527,\n", + " 1155755, 1151424, 1146913, 1158096, 1154763, 1155628, 1155630, 1156563,\n", + " 1154559, 1154555, 1136466, 1158823, 1158824, 1153712, 1158325, 1157323,\n", + " 1148836, 1148834, 1148835, 1155646, 1158361, 1159304, 1143263, 1154240,\n", + " 1162190, 1156711, 1156713, 1151317, 1154902, 1154909, 1154911, 1143189,\n", + " 1143531, 1150371, 1153322, 1157424, 1150077, 1150805, 1143508, 1137152,\n", + " 1153786, 1149908, 1137381, 1138269, 1135601, 1135614, 1145507, 1148147,\n", + " 1148149, 1146321, 1156085, 1140633, 1159213, 1152498, 1156027, 1157732,\n", + " 1157735, 1142466, 1155971, 1155975, 1154682, 1153765, 1158844, 1149700,\n", + " 1154592, 1154604, 1136909, 1136896, 1185567, 1161570, 1140221, 1158438,\n", + " 1156778, 1136482, 1136494, 1136491, 1154393, 1156665, 1156670, 1147599,\n", + " 1155309, 1152136, 1153808, 1136640, 1136646, 1144122, 1140049, 1153827,\n", + " 1151144, 1165497, 1146126, 1144581, 1150011, 1155528, 1169895, 1163471,\n", + " 1142666, 1157747, 1167346, 1167359, 1162679, 1159042, 1159052, 1159071,\n", + " 1165838, 1157946, 1153047, 1153052, 1171551, 1172995, 1144158, 1156107,\n", + " 1138393, 1150046, 1149063, 1153519, 1146870, 1138161, 1138167, 1156787,\n", + " 1161771, 1149953, 1163872, 1139286, 1139281, 1166939, 1165763, 1156983,\n", + " 1157236, 1148771, 1171506, 1146063, 1159552, 1146356, 1163443, 1160182,\n", + " 1165309, 1169494, 1140641, 1140643, 1141862, 1148600, 1148603, 1148607,\n", + " 1143139, 1143143, 1154274, 1158643, 1158653, 1158651, 1156181, 1159029,\n", + " 1159032, 1159038, 1163740, 1152247, 1165584, 1143729, 1160593, 1187369,\n", + " 1155588, 1153934, 1168525, 1149011, 1164580, 1161243, 1144737, 1144750,\n", + " 1152776, 1155054, 1145139, 1141459, 1147426, 1147427, 1157050, 1156737,\n", + " 1156739, 1156744, 1153663, 1150642, 1144810, 1144812, 1192121, 1153273,\n", + " 1142733, 1167329, 1144051, 1144062, 1192012, 1148683, 1145228, 1172193,\n", + " 1155324, 1166462, 1170793, 1144973, 1147346, 1152624, 1139344, 1193483,\n", + " 1145902, 1153520, 1152194, 1143395, 1143404, 1158724, 1166661, 1171273,\n", + " 1154076, 1168755, 1147331, 1147339, 1145677, 1145502, 1169602, 1167817,\n", + " 1144686, 1166653, 1155172, 1155170, 1150518, 1154613, 1144346, 1144336,\n", + " 1157534, 1138383, 1154670, 1154882, 1169162, 1157331, 1138129, 1169359,\n", + " 1154353, 1154364, 1154352, 1147491, 1158146, 1158152, 1173220, 1158611,\n", + " 1158623, 1149846, 1149847, 1157380, 1159851, 1154866, 1147416, 1155502,\n", + " 1172508, 1170459, 1152353, 1170279, 1192129, 1149402, 1148667, 1148335,\n", + " 1148324, 1177984, 1173307, 1160935, 1169144, 1159651, 1159658, 1159655,\n", + " 1157153, 1157373, 1147711, 1172435, 1151850, 1148128, 1147923, 1157593,\n", + " 1170488, 1170490, 1172961, 1155739, 1179204, 1143240, 1174779, 1174915,\n", + " 1144550, 1166684, 1177015, 1170874, 1150234, 1154151, 1154148, 1149169,\n", + " 1172455, 1179865, 1184393, 1186117, 1167658, 1167657, 1168481, 1170560,\n", + " 1170571, 1185991, 1180245, 1181241, 1153803, 1164818, 1153619, 1182106,\n", + " 1166551, 1184300, 1161255, 1162129, 1180152, 1154718, 1171623, 1164032,\n", + " 1178361, 1181379, 1157134, 1157133, 1180407, 1164073, 1153898, 1153899,\n", + " 1153893, 1161846, 1134650, 1164200, 1145626, 1156437, 1156446, 1172024,\n", + " 1157483, 1149753, 1153601, 1153609, 1157761, 1170064, 1158512, 1181189,\n", + " 1158934, 1186995, 1167646, 1155892, 1155899, 1182786, 1140399, 1166976,\n", + " 1162253, 1184000, 1168875, 1185181, 1182337, 1176981, 1164264, 1146161,\n", + " 1188070, 1156863, 1170336, 1147182, 1164133, 1171015, 1170417, 1139828,\n", + " 1139831, 1150265, 1182988, 1154806, 1182025, 1181599, 1151288, 1190585,\n", + " 1181883, 1156055, 1178555, 1190270, 1151978, 1181452, 1181454, 1146394,\n", + " 1194206, 1149544, 1184895, 1188230, 1159083, 1172696, 1181951, 1141002,\n", + " 1153733, 1192920, 1177842, 1188700, 1166767, 1172423, 1158064, 1179752,\n", + " 1155959, 1155962, 1194244, 1178296, 1184522, 1185947, 1179373, 1187536,\n", + " 1190607, 1189851, 1191118, 1181989, 1194264, 1189948, 1176339, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137435, 1137201, 1137204, 1137212, 1137213, 1137214, 1141424, 1136237,\n", + " 1136239, 1140282, 1140285, 1135926, 1138554, 1135716, 1137784, 1141758,\n", + " 1137506, 1136223, 1142807, 1139462, 1136156, 1136969, 1136971, 1136970,\n", + " 1141443, 1139820, 1139811, 1145370, 1145373, 1146977, 1146978, 1137937,\n", + " 1137271, 1138930, 1138938, 1139141, 1143372, 1143363, 1146644, 1139615,\n", + " 1140781, 1150509, 1142968, 1135376, 1149216, 1149228, 1155689, 1149632,\n", + " 1147473, 1147483, 1147486, 1135990, 1135989, 1142885, 1142881, 1153948,\n", + " 1144636, 1144632, 1146992, 1148337, 1146656, 1150193, 1152664, 1148546,\n", + " 1147089, 1155014, 1139371, 1147211, 1136676, 1136685, 1134715, 1134806,\n", + " 1138742, 1140537, 1140540, 1138112, 1138126, 1151520, 1140147, 1140159,\n", + " 1140953, 1135367, 1135202, 1140758, 1135903, 1141036, 1134794, 1134797,\n", + " 1138504, 1137342, 1136178, 1143069, 1137693, 1136619, 1135340, 1144395,\n", + " 1137529, 1137534, 1135408, 1157395, 1136662, 1137441, 1137025, 1136199,\n", + " 1139161, 1135579, 1135582, 1136098, 1135664, 1140970, 1137953, 1137957,\n", + " 1158136, 1158138, 1156965, 1137008, 1156899, 1135522, 1137291, 1138440,\n", + " 1140079, 1138461, 1157190, 1137924, 1149328, 1138845, 1135088, 1138695,\n", + " 1147112, 1147119, 1142611, 1160825, 1158980, 1158984, 1158982, 1145842,\n", + " 1148531, 1137109, 1137409, 1136449, 1136457, 1139667, 1134992, 1134772,\n", + " 1134780, 1136551, 1135776, 1140206, 1153543, 1140045, 1139085, 1139929,\n", + " 1138148, 1134886, 1146071, 1140557, 1141985, 1152044, 1140657, 1140660,\n", + " 1137728, 1147317, 1134750, 1138240, 1135549, 1136697, 1141097, 1144128,\n", + " 1145347, 1143767, 1143711, 1162716, 1137670, 1139025, 1139033, 1140003,\n", + " 1149979, 1141688, 1154467, 1136632, 1142929, 1141223, 1139386, 1163301,\n", + " 1136917, 1143666, 1143667, 1137188, 1145066, 1144237, 1140598, 1141156,\n", + " 1146449, 1141786, 1139495, 1136757, 1141609, 1144650, 1164807, 1139798,\n", + " 1144428, 1141810, 1141821, 1142093, 1143204, 1140173, 1158749, 1137762,\n", + " 1149111, 1148872, 1148871, 1138708, 1142913, 1138423, 1138424, 1144596,\n", + " 1142453, 1136864, 1144041, 1135315, 1144182, 1137606, 1150906, 1144869,\n", + " 1158698, 1137849, 1147153, 1142646, 1141365, 1141367, 1153068, 1141664,\n", + " 1149101, 1144279, 1139662, 1139127, 1143791, 1140619, 1140977, 1140990,\n", + " 1147050, 1143543, 1152976, 1152982, 1135466, 1141925, 1146900, 1144242,\n", + " 1150255, 1136885, 1139405, 1143643, 1137570, 1141381, 1145980, 1143851,\n", + " 1146019, 1146024, 1147084, 1141235, 1139990, 1143283, 1143883, 1147543,\n", + " 1148763, 1148760, 1147282, 1142829, 1142816, 1138669, 1142629, 1142637,\n", + " 1149608, 1143051, 1143052, 1136160, 1142588, 1144921, 1138922, 1138923,\n", + " 1136836, 1146105, 1139329, 1139328, 1143345, 1144619, 1144615, 1145816,\n", + " 1144093, 1144095, 1138595, 1135751, 1150755, 1150294, 1144375, 1143465,\n", + " 1143457, 1144291, 1143937, 1143949, 1140824, 1140817, 1147525, 1140361,\n", + " 1140364, 1137990, 1143080, 1143075, 1143082, 1168914, 1148966, 1144219,\n", + " 1147995, 1147996, 1147999, 1139252, 1147128, 1148704, 1142697, 1141825,\n", + " 1148468, 1148473, 1153701, 1153703, 1152327, 1152328, 1149718, 1147027,\n", + " 1143839, 1147971, 1145011, 1145021, 1145009, 1139549, 1158224, 1158226,\n", + " 1154526, 1145751, 1142369, 1138638, 1146178, 1146180, 1138861, 1138863,\n", + " 1150438, 1150445, 1149263, 1151867, 1149791, 1149777, 1144526, 1152013,\n", + " 1165252, 1147796, 1151480, 1152026, 1144884, 1145259, 1135504, 1146723,\n", + " 1134869, 1149530, 1149535, 1150127, 1147021, 1141949, 1146772, 1151795,\n", + " 1150723, 1137639, 1147653, 1149420, 1149412, 1148300, 1154420, 1158786,\n", + " 1148180, 1148188, 1151361, 1152561, 1152563, 1136249, 1136247, 1138197,\n", + " 1138877, 1152439, 1157968, 1157970, 1148729, 1144110, 1146544, 1146559,\n", + " 1146549, 1148204, 1154166, 1153124, 1153188, 1145104, 1159837, 1150932,\n", + " 1150935, 1152878, 1143092, 1150356, 1150365, 1151816, 1151821, 1152581,\n", + " 1135303, 1154183, 1150708, 1148505, 1141420, 1136002, 1156403, 1153255,\n", + " 1146623, 1144467, 1152409, 1154052, 1152107, 1146280, 1150085, 1145546,\n", + " 1137746, 1137756, 1146304, 1152622, 1140521, 1155140, 1136401, 1136402,\n", + " 1155337, 1154112, 1154119, 1154120, 1154124, 1152673, 1152672, 1151617,\n", + " 1145278, 1136134, 1136798, 1136788, 1153378, 1153391, 1138982, 1151311,\n", + " 1152349, 1146816, 1156826, 1156816, 1153297, 1138281, 1136028, 1158704,\n", + " 1151067, 1156396, 1163941, 1152886, 1143486, 1150164, 1148033, 1148040,\n", + " 1154453, 1152601, 1149794, 1144669, 1137048, 1148628, 1158530, 1158540,\n", + " 1149936, 1149940, 1149947, 1135707, 1147635, 1159223, 1142047, 1135434,\n", + " 1158927, 1154928, 1156505, 1145191, 1145184, 1137809, 1150465, 1150475,\n", + " 1142221, 1152179, 1156632, 1156638, 1157911, 1152737, 1150824, 1156932,\n", + " 1147810, 1158311, 1155441, 1150132, 1154530, 1154528, 1142755, 1142764,\n", + " 1142758, 1156271, 1157646, 1151390, 1151379, 1140187, 1155122, 1152527,\n", + " 1155755, 1151424, 1146913, 1158096, 1154763, 1155628, 1155630, 1156563,\n", + " 1154559, 1154555, 1136466, 1158823, 1158824, 1153712, 1158325, 1157323,\n", + " 1148836, 1148834, 1148835, 1155646, 1158361, 1159304, 1143263, 1154240,\n", + " 1162190, 1156711, 1156713, 1151317, 1154902, 1154909, 1154911, 1143189,\n", + " 1143531, 1150371, 1153322, 1157424, 1150077, 1150805, 1143508, 1137152,\n", + " 1153786, 1149908, 1137381, 1138269, 1135601, 1135614, 1145507, 1148147,\n", + " 1148149, 1146321, 1156085, 1140633, 1159213, 1152498, 1156027, 1157732,\n", + " 1157735, 1142466, 1155971, 1155975, 1154682, 1153765, 1158844, 1149700,\n", + " 1154592, 1154604, 1136909, 1136896, 1185567, 1161570, 1140221, 1158438,\n", + " 1156778, 1136482, 1136494, 1136491, 1154393, 1156665, 1156670, 1147599,\n", + " 1155309, 1152136, 1153808, 1136640, 1136646, 1144122, 1140049, 1153827,\n", + " 1151144, 1165497, 1146126, 1144581, 1150011, 1155528, 1169895, 1163471,\n", + " 1142666, 1157747, 1167346, 1167359, 1162679, 1159042, 1159052, 1159071,\n", + " 1165838, 1157946, 1153047, 1153052, 1171551, 1172995, 1144158, 1156107,\n", + " 1138393, 1150046, 1149063, 1153519, 1146870, 1138161, 1138167, 1156787,\n", + " 1161771, 1149953, 1163872, 1139286, 1139281, 1166939, 1165763, 1156983,\n", + " 1157236, 1148771, 1171506, 1146063, 1159552, 1146356, 1163443, 1160182,\n", + " 1165309, 1169494, 1140641, 1140643, 1141862, 1148600, 1148603, 1148607,\n", + " 1143139, 1143143, 1154274, 1158643, 1158653, 1158651, 1156181, 1159029,\n", + " 1159032, 1159038, 1163740, 1152247, 1165584, 1143729, 1160593, 1187369,\n", + " 1155588, 1153934, 1168525, 1149011, 1164580, 1161243, 1144737, 1144750,\n", + " 1152776, 1155054, 1145139, 1141459, 1147426, 1147427, 1157050, 1156737,\n", + " 1156739, 1156744, 1153663, 1150642, 1144810, 1144812, 1192121, 1153273,\n", + " 1142733, 1167329, 1144051, 1144062, 1192012, 1148683, 1145228, 1172193,\n", + " 1155324, 1166462, 1170793, 1144973, 1147346, 1152624, 1139344, 1193483,\n", + " 1145902, 1153520, 1152194, 1143395, 1143404, 1158724, 1166661, 1171273,\n", + " 1154076, 1168755, 1147331, 1147339, 1145677, 1145502, 1169602, 1167817,\n", + " 1144686, 1166653, 1155172, 1155170, 1150518, 1154613, 1144346, 1144336,\n", + " 1157534, 1138383, 1154670, 1154882, 1169162, 1157331, 1138129, 1169359,\n", + " 1154353, 1154364, 1154352, 1147491, 1158146, 1158152, 1173220, 1158611,\n", + " 1158623, 1149846, 1149847, 1157380, 1159851, 1154866, 1147416, 1155502,\n", + " 1172508, 1170459, 1152353, 1170279, 1192129, 1149402, 1148667, 1148335,\n", + " 1148324, 1177984, 1173307, 1160935, 1169144, 1159651, 1159658, 1159655,\n", + " 1157153, 1157373, 1147711, 1172435, 1151850, 1148128, 1147923, 1157593,\n", + " 1170488, 1170490, 1172961, 1155739, 1179204, 1143240, 1174779, 1174915,\n", + " 1144550, 1166684, 1177015, 1170874, 1150234, 1154151, 1154148, 1149169,\n", + " 1172455, 1179865, 1184393, 1186117, 1167658, 1167657, 1168481, 1170560,\n", + " 1170571, 1185991, 1180245, 1181241, 1153803, 1164818, 1153619, 1182106,\n", + " 1166551, 1184300, 1161255, 1162129, 1180152, 1154718, 1171623, 1164032,\n", + " 1178361, 1181379, 1157134, 1157133, 1180407, 1164073, 1153898, 1153899,\n", + " 1153893, 1161846, 1134650, 1164200, 1145626, 1156437, 1156446, 1172024,\n", + " 1157483, 1149753, 1153601, 1153609, 1157761, 1170064, 1158512, 1181189,\n", + " 1158934, 1186995, 1167646, 1155892, 1155899, 1182786, 1140399, 1166976,\n", + " 1162253, 1184000, 1168875, 1185181, 1182337, 1176981, 1164264, 1146161,\n", + " 1188070, 1156863, 1170336, 1147182, 1164133, 1171015, 1170417, 1139828,\n", + " 1139831, 1150265, 1182988, 1154806, 1182025, 1181599, 1151288, 1190585,\n", + " 1181883, 1156055, 1178555, 1190270, 1151978, 1181452, 1181454, 1146394,\n", + " 1194206, 1149544, 1184895, 1188230, 1159083, 1172696, 1181951, 1141002,\n", + " 1153733, 1192920, 1177842, 1188700, 1166767, 1172423, 1158064, 1179752,\n", + " 1155959, 1155962, 1194244, 1178296, 1184522, 1185947, 1179373, 1187536,\n", + " 1190607, 1189851, 1191118, 1181989, 1194264, 1189948, 1176339, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196007, 1196013, 1200108, 1198730, 1199282, 1198459, 1202245, 1202255,\n", + " 1198832, 1201581, 1201582, 1202119, 1194626, 1197777, 1201016, 1198633,\n", + " 1197301, 1196631, 1195263, 1197924, 1199122, 1196538, 1201992, 1196030,\n", + " 1198533, 1199519, 1195471, 1195888, 1195895, 1199172, 1195740, 1196359,\n", + " 1195325, 1196840, 1198668, 1198036, 1196717, 1195270, 1195279, 1197265,\n", + " 1197273, 1195841, 1195847, 1195038, 1195659, 1195541, 1199352, 1198504,\n", + " 1199697, 1196393, 1195351, 1195353, 1198273, 1199857, 1197291, 1199185,\n", + " 1194928, 1199628, 1197676, 1197990, 1200076, 1198404, 1201908, 1199676,\n", + " 1194795, 1201511, 1196501, 1196503, 1196508, 1201894, 1197609, 1201116,\n", + " 1196727, 1195771, 1200887, 1200893, 1203239, 1198428, 1200155, 1199418,\n", + " 1198811, 1199555, 1201824, 1200570, 1198593, 1196477, 1198797, 1201418,\n", + " 1201421, 1201155, 1201156, 1202630, 1194803, 1202641, 1201043, 1201358,\n", + " 1200363, 1200558, 1200725, 1202529, 1197040, 1201453, 1201442, 1202239,\n", + " 1202937, 1200899, 1202338, 1200320, 1195886, 1195876, 1201291, 1203329,\n", + " 1200398, 1196966, 1200785, 1194846, 1195048, 1200638, 1195438, 1203112,\n", + " 1195679, 1200439, 1196929, 1198911, 1195421, 1195383, 1200928, 1197816,\n", + " 1197821, 1199778, 1197492, 1199783, 1197593, 1200468, 1201886, 1200302,\n", + " 1201877, 1196424], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196007, 1196013, 1200108, 1198730, 1199282, 1198459, 1202245, 1202255,\n", + " 1198832, 1201581, 1201582, 1202119, 1194626, 1197777, 1201016, 1198633,\n", + " 1197301, 1196631, 1195263, 1197924, 1199122, 1196538, 1201992, 1196030,\n", + " 1198533, 1199519, 1195471, 1195888, 1195895, 1199172, 1195740, 1196359,\n", + " 1195325, 1196840, 1198668, 1198036, 1196717, 1195270, 1195279, 1197265,\n", + " 1197273, 1195841, 1195847, 1195038, 1195659, 1195541, 1199352, 1198504,\n", + " 1199697, 1196393, 1195351, 1195353, 1198273, 1199857, 1197291, 1199185,\n", + " 1194928, 1199628, 1197676, 1197990, 1200076, 1198404, 1201908, 1199676,\n", + " 1194795, 1201511, 1196501, 1196503, 1196508, 1201894, 1197609, 1201116,\n", + " 1196727, 1195771, 1200887, 1200893, 1203239, 1198428, 1200155, 1199418,\n", + " 1198811, 1199555, 1201824, 1200570, 1198593, 1196477, 1198797, 1201418,\n", + " 1201421, 1201155, 1201156, 1202630, 1194803, 1202641, 1201043, 1201358,\n", + " 1200363, 1200558, 1200725, 1202529, 1197040, 1201453, 1201442, 1202239,\n", + " 1202937, 1200899, 1202338, 1200320, 1195886, 1195876, 1201291, 1203329,\n", + " 1200398, 1196966, 1200785, 1194846, 1195048, 1200638, 1195438, 1203112,\n", + " 1195679, 1200439, 1196929, 1198911, 1195421, 1195383, 1200928, 1197816,\n", + " 1197821, 1199778, 1197492, 1199783, 1197593, 1200468, 1201886, 1200302,\n", + " 1201877, 1196424], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.4758e-01, 5.8499e-02, 6.7140e-01, ..., 1.4109e-01,\n", + " -1.7217e-03, -4.3933e-03],\n", + " [ 1.1530e-01, -2.5132e-04, 7.0948e-01, ..., 1.3859e-01,\n", + " -1.9185e-03, -4.4044e-03],\n", + " [ 1.4597e-01, 1.6104e-02, 6.9389e-01, ..., 1.1918e-01,\n", + " -1.8152e-03, -4.2806e-03],\n", + " ...,\n", + " [ 1.0700e-01, -4.4459e-04, 6.7622e-01, ..., 1.5941e-01,\n", + " -2.2394e-03, -4.5408e-03],\n", + " [ 1.6382e-01, -3.1871e-04, 7.8976e-01, ..., 1.1761e-01,\n", + " -1.7105e-03, -5.2182e-03],\n", + " [ 1.3881e-01, 2.0491e-02, 6.8943e-01, ..., 1.2946e-01,\n", + " -1.5715e-03, -4.4407e-03]], device='cuda:0'), 'paper': tensor([[ 9.1836e-01, 9.2079e-01, 3.9809e+00, ..., 1.3037e-01,\n", + " -4.3703e-02, 7.5779e-01],\n", + " [ 1.2979e+00, 1.3523e+00, 3.2657e+00, ..., 1.1326e+00,\n", + " -4.2844e-02, 1.9635e+00],\n", + " [ 1.4556e+00, 2.7244e+00, 4.1706e+00, ..., -4.0467e-04,\n", + " -3.9488e-02, 1.0725e+00],\n", + " ...,\n", + " [ 1.0329e+00, 1.1416e+00, 1.4239e+00, ..., -7.0365e-03,\n", + " -2.0675e-02, 5.9286e-01],\n", + " [-5.9745e-03, -1.0234e-02, 3.8469e+00, ..., -9.8879e-03,\n", + " -3.6582e-02, -1.9531e-02],\n", + " [ 1.8953e+00, 1.5625e+00, 3.4515e+00, ..., 2.5478e+00,\n", + " -5.8235e-02, 4.2321e+00]], device='cuda:0'), 'author': tensor([[-8.5410e-04, 1.9542e-01, 2.9447e-01, ..., 1.9036e+00,\n", + " 1.9091e-01, 7.9892e-02],\n", + " [-2.8401e-03, 3.4922e-01, 3.3462e-01, ..., 1.6431e+00,\n", + " -2.2211e-03, -1.6440e-03],\n", + " [-1.5244e-03, 2.9964e-01, 2.2191e-01, ..., 1.7259e+00,\n", + " 9.4080e-02, -3.5987e-04],\n", + " ...,\n", + " [-1.5027e-03, 3.0284e-01, 1.7646e-01, ..., 1.6274e+00,\n", + " 5.6796e-02, -3.6692e-05],\n", + " [-1.4072e-03, 3.3204e-01, 1.8982e-01, ..., 1.7011e+00,\n", + " 4.6930e-02, 1.2901e-02],\n", + " [-1.6846e-03, 3.1783e-01, 2.3601e-01, ..., 1.6511e+00,\n", + " -8.4559e-04, -3.2647e-04]], device='cuda:0'), 'field_of_study': tensor([[ 6.3951e-02, 1.0628e+00, 7.6602e-01, ..., -1.4456e-02,\n", + " 5.1826e-01, 6.3685e-01],\n", + " [ 1.2615e-01, 7.5624e-01, 3.9267e-01, ..., -9.3499e-03,\n", + " 4.2486e-01, 3.5807e-01],\n", + " [ 1.0760e-03, 7.9725e-01, 4.7739e-01, ..., -1.1208e-02,\n", + " 4.0315e-01, 5.4488e-01],\n", + " ...,\n", + " [ 5.8569e-02, 7.1050e-01, 2.5567e-01, ..., -7.4764e-03,\n", + " 3.7612e-01, 2.3714e-01],\n", + " [-8.0530e-04, 8.5934e-01, 5.7039e-01, ..., -1.1485e-02,\n", + " 3.4036e-01, 5.3727e-01],\n", + " [ 1.7225e-01, 9.0868e-01, 5.1015e-01, ..., -1.1327e-02,\n", + " 4.8340e-01, 1.8833e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 27, 111, 111, 117, 27, 58, 374, 560, 449, 342, 706, 784,\n", + " 523, 523, 796, 770, 770, 614, 987, 987, 1018, 687, 1168, 1168,\n", + " 1168, 881, 927, 927, 1168, 1168, 1140, 973, 1036, 1096, 1096, 1206,\n", + " 1258, 1196, 1196, 1156, 1335, 1336, 1415, 1336, 1387, 1465, 1511, 1511,\n", + " 1511, 1520, 1520, 1623, 1623, 1434, 1495, 1495, 1495, 1616, 1616, 1847,\n", + " 1786, 1602, 1602, 1640, 1812, 1797, 1778, 1783, 1792, 1861, 2168, 1880,\n", + " 1880, 1998, 1927, 1927, 2081, 2159, 2159, 2298, 2298, 2039, 1874, 2331,\n", + " 2247, 2357, 2247, 2247, 2431, 2463, 2463, 2359, 2359, 2367, 2367, 2367,\n", + " 2367, 2367, 2367, 2557, 2593, 2593, 2593, 2561, 2561, 2667, 2710, 2746,\n", + " 2622, 2910, 2896, 2886, 3106, 3066, 3066, 3199, 3149, 3265, 3310, 3424,\n", + " 3506, 3615, 3616, 3455, 3624, 3733, 3733, 3663, 3586, 3481, 3578, 3702,\n", + " 3861, 3695, 3907, 4118, 4287, 4249, 4449, 4360, 4386, 4649, 4589, 4589,\n", + " 4689, 4547, 4843, 4842, 4655, 4655, 4954, 5010, 4809, 5028, 5028, 5028,\n", + " 5028, 5059, 5059, 5168, 5168, 5081, 5097, 5122, 5364, 5282, 5282, 5556,\n", + " 5308, 5592, 5592, 5525, 5540, 5294, 5294, 5294, 5294, 5294, 5462, 5775,\n", + " 5547, 5659, 5692, 5532, 5532, 6028, 5727, 5727, 5718, 5718, 5879, 6296,\n", + " 6227, 6285, 6308, 6308, 6223, 6223, 6289, 6289, 6059, 6243, 6243, 6243,\n", + " 6251],\n", + " [ 9, 27, 19, 102, 8, 63, 4, 60, 135, 43, 85, 118,\n", + " 130, 103, 102, 72, 56, 72, 106, 15, 122, 58, 90, 11,\n", + " 113, 55, 0, 119, 81, 133, 58, 125, 7, 52, 131, 72,\n", + " 122, 88, 1, 64, 107, 77, 48, 111, 36, 94, 129, 76,\n", + " 137, 26, 5, 23, 6, 58, 51, 58, 99, 66, 136, 35,\n", + " 54, 96, 53, 67, 110, 52, 55, 91, 48, 51, 102, 100,\n", + " 62, 22, 6, 23, 63, 130, 103, 46, 20, 24, 118, 126,\n", + " 117, 63, 42, 21, 94, 95, 103, 57, 65, 123, 111, 87,\n", + " 34, 28, 37, 101, 86, 67, 132, 120, 75, 48, 7, 89,\n", + " 28, 39, 69, 86, 93, 18, 104, 18, 57, 40, 12, 97,\n", + " 37, 55, 72, 18, 102, 38, 2, 29, 116, 18, 4, 72,\n", + " 121, 73, 23, 18, 70, 71, 18, 4, 58, 100, 115, 72,\n", + " 78, 10, 128, 72, 102, 72, 127, 112, 91, 44, 68, 3,\n", + " 72, 105, 72, 18, 16, 75, 93, 84, 134, 7, 108, 93,\n", + " 82, 72, 4, 83, 50, 21, 117, 98, 103, 47, 72, 31,\n", + " 27, 124, 30, 72, 32, 13, 41, 56, 25, 59, 80, 109,\n", + " 74, 14, 33, 49, 17, 114, 79, 72, 92, 4, 45, 61,\n", + " 7]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3225, 2916, 1050, ..., 4913, 3371, 2176],\n", + " [ 125, 76, 206, ..., 7148, 7073, 7218]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 4, 118, 131, ..., 135, 45, 117],\n", + " [ 19, 36, 5, ..., 6265, 6316, 6043]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 286, 286, 286, ..., 7238, 7238, 7199],\n", + " [ 86, 365, 317, ..., 424, 317, 693]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 474, 387, 319, ..., 520, 872, 508],\n", + " [ 143, 255, 77, ..., 7207, 7175, 7143]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[6008, 6790, 3667, ..., 6308, 4137, 5026],\n", + " [ 158, 115, 89, ..., 6274, 6134, 6134]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 254, 254, 254, ..., 7238, 7212, 7174],\n", + " [1242, 1198, 1226, ..., 5941, 4422, 764]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 204, 111, 111, ..., 6308, 6308, 6308],\n", + " [6511, 3341, 3625, ..., 882, 3617, 1921]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006663\n", + "sampling 0.006511\n", + "noi time: 0.001946\n", + "get_vertex_data call: 0.038015\n", + "noi group time: 0.003544\n", + "eoi_group_time: 0.016108\n", + "second half: 0.213458\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31143, 24184, 24187, ..., 1119681, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31143, 24184, 24187, ..., 1119681, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1203800, 1214594, 1228165, ..., 1936995, 1937001, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1203800, 1214594, 1228165, ..., 1936995, 1937001, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1141439, 1140282, 1140285, 1135926, 1135727, 1140785, 1140799,\n", + " 1141758, 1134948, 1138335, 1136215, 1141251, 1136150, 1136156, 1142526,\n", + " 1136969, 1136971, 1141450, 1138897, 1139811, 1146983, 1137271, 1145055,\n", + " 1143372, 1148976, 1148987, 1149216, 1147949, 1155686, 1155689, 1143812,\n", + " 1149646, 1147483, 1141877, 1144632, 1146995, 1134701, 1148346, 1150193,\n", + " 1150200, 1136122, 1150555, 1155014, 1155019, 1139373, 1139371, 1136683,\n", + " 1136685, 1152427, 1140313, 1140540, 1137171, 1138356, 1153463, 1140159,\n", + " 1140020, 1135367, 1135370, 1135202, 1141036, 1134794, 1157443, 1138504,\n", + " 1137328, 1137329, 1136186, 1137693, 1136619, 1135333, 1144786, 1137529,\n", + " 1157397, 1156159, 1134841, 1141702, 1135579, 1135830, 1148860, 1138514,\n", + " 1153094, 1153099, 1135500, 1156899, 1135522, 1135535, 1139684, 1139687,\n", + " 1137287, 1138440, 1140079, 1138461, 1138462, 1158390, 1149328, 1138844,\n", + " 1135098, 1156605, 1156606, 1142611, 1142616, 1135025, 1160827, 1160830,\n", + " 1135631, 1158984, 1137109, 1135761, 1139849, 1136457, 1139667, 1138067,\n", + " 1134992, 1136554, 1152646, 1136723, 1139327, 1141065, 1140034, 1140045,\n", + " 1141963, 1153404, 1152042, 1152044, 1139063, 1142302, 1137728, 1134738,\n", + " 1135540, 1136697, 1141098, 1141100, 1162946, 1149001, 1136392, 1143766,\n", + " 1154860, 1137298, 1137299, 1137670, 1139025, 1146844, 1146832, 1135861,\n", + " 1136631, 1136637, 1139379, 1159794, 1136912, 1136917, 1137188, 1141156,\n", + " 1138789, 1139495, 1141609, 1144650, 1147847, 1165291, 1144428, 1144420,\n", + " 1165098, 1139267, 1140173, 1137762, 1137062, 1138710, 1138708, 1142913,\n", + " 1143107, 1136864, 1144039, 1135327, 1141398, 1140432, 1150906, 1144865,\n", + " 1143759, 1147153, 1153059, 1153068, 1141678, 1138288, 1144279, 1139510,\n", + " 1145200, 1140977, 1140979, 1140990, 1146702, 1147050, 1155824, 1152988,\n", + " 1135457, 1139447, 1139000, 1141925, 1144242, 1141841, 1141846, 1139405,\n", + " 1145974, 1144073, 1143851, 1136277, 1146024, 1150606, 1141585, 1149928,\n", + " 1139990, 1151124, 1147540, 1148763, 1147282, 1142816, 1136330, 1149155,\n", + " 1149366, 1148003, 1148009, 1146088, 1149608, 1149610, 1143040, 1148406,\n", + " 1136160, 1136167, 1142584, 1157720, 1136836, 1141490, 1143345, 1144619,\n", + " 1144088, 1135876, 1135813, 1150294, 1150299, 1143957, 1138024, 1138018,\n", + " 1143456, 1143457, 1143007, 1144291, 1135451, 1149082, 1143807, 1146633,\n", + " 1146636, 1147521, 1140364, 1143080, 1143082, 1166410, 1147999, 1146949,\n", + " 1134902, 1147131, 1145461, 1147244, 1148704, 1148715, 1142700, 1141327,\n", + " 1141825, 1147070, 1147971, 1147982, 1139549, 1158226, 1158235, 1167006,\n", + " 1148362, 1154526, 1145237, 1145750, 1145751, 1148390, 1146178, 1146189,\n", + " 1148223, 1150280, 1150445, 1149263, 1148823, 1144514, 1150350, 1153982,\n", + " 1151994, 1151475, 1151480, 1151487, 1152027, 1154263, 1135516, 1135519,\n", + " 1139916, 1146731, 1134869, 1147021, 1147023, 1135793, 1153959, 1141949,\n", + " 1146776, 1144824, 1153574, 1147653, 1143560, 1149412, 1148288, 1148300,\n", + " 1152073, 1154420, 1158786, 1148180, 1138204, 1146676, 1138867, 1148729,\n", + " 1144096, 1144098, 1144107, 1168975, 1146547, 1150057, 1148204, 1153124,\n", + " 1153192, 1153188, 1145111, 1159830, 1152879, 1150356, 1148095, 1147446,\n", + " 1147442, 1151906, 1150714, 1141420, 1145080, 1148949, 1146969, 1146975,\n", + " 1156402, 1146623, 1164781, 1146280, 1156321, 1153037, 1153038, 1137746,\n", + " 1137756, 1146304, 1140521, 1140517, 1152819, 1155334, 1154120, 1154123,\n", + " 1155358, 1157842, 1157826, 1152673, 1154632, 1154636, 1164761, 1164760,\n", + " 1151617, 1150586, 1136134, 1148916, 1145952, 1152227, 1138991, 1152903,\n", + " 1151298, 1151306, 1152341, 1138279, 1156001, 1136028, 1158704, 1140674,\n", + " 1156396, 1142777, 1150099, 1166848, 1150172, 1150164, 1144017, 1148040,\n", + " 1149794, 1149798, 1137048, 1168183, 1148628, 1137458, 1135707, 1135698,\n", + " 1155386, 1157547, 1158854, 1148889, 1158916, 1152392, 1155412, 1145187,\n", + " 1157565, 1150465, 1135730, 1152179, 1156629, 1165703, 1147810, 1139530,\n", + " 1158306, 1155441, 1150130, 1150132, 1140868, 1156919, 1172953, 1151379,\n", + " 1137912, 1137917, 1158639, 1140186, 1155122, 1152527, 1155755, 1135394,\n", + " 1135396, 1135398, 1146918, 1145806, 1158096, 1154755, 1155620, 1155626,\n", + " 1155627, 1155628, 1156563, 1158325, 1160958, 1143263, 1154644, 1154652,\n", + " 1143189, 1150371, 1147918, 1150987, 1155293, 1155284, 1157928, 1158578,\n", + " 1156765, 1158996, 1149913, 1155026, 1137385, 1137380, 1158084, 1159106,\n", + " 1138264, 1164309, 1134677, 1134685, 1135601, 1135611, 1148149, 1150671,\n", + " 1155848, 1149145, 1152209, 1159213, 1157732, 1155971, 1155975, 1155402,\n", + " 1149696, 1149702, 1149700, 1154600, 1154601, 1153503, 1136896, 1171171,\n", + " 1158815, 1136494, 1136491, 1147586, 1156490, 1153808, 1136640, 1136646,\n", + " 1166424, 1142178, 1147785, 1158558, 1151140, 1161167, 1165488, 1146126,\n", + " 1138110, 1155856, 1158006, 1144584, 1161539, 1135662, 1142663, 1157751,\n", + " 1167359, 1142426, 1157946, 1153052, 1153045, 1167181, 1163087, 1155763,\n", + " 1155771, 1156235, 1144144, 1153841, 1153842, 1156107, 1138391, 1138393,\n", + " 1160643, 1150046, 1159475, 1149060, 1149071, 1151023, 1153514, 1138161,\n", + " 1138167, 1156787, 1161774, 1149963, 1154590, 1169751, 1159999, 1159985,\n", + " 1148771, 1157351, 1157357, 1146063, 1171257, 1165306, 1165309, 1158865,\n", + " 1140643, 1143139, 1143143, 1151872, 1155816, 1155818, 1158653, 1159025,\n", + " 1159029, 1152244, 1152247, 1158902, 1160605, 1165274, 1165993, 1144989,\n", + " 1147397, 1147830, 1146500, 1164580, 1155046, 1160660, 1141464, 1141471,\n", + " 1147426, 1157044, 1165182, 1171041, 1168750, 1144812, 1140112, 1135567,\n", + " 1165636, 1163783, 1163935, 1145557, 1145561, 1167757, 1160232, 1170670,\n", + " 1144973, 1165746, 1147344, 1152624, 1145900, 1145902, 1153520, 1153526,\n", + " 1164395, 1154076, 1168756, 1167315, 1147338, 1145674, 1167817, 1149475,\n", + " 1155172, 1150522, 1150518, 1144336, 1170939, 1157534, 1135854, 1185874,\n", + " 1157331, 1169359, 1150031, 1149452, 1146339, 1149688, 1172575, 1157384,\n", + " 1193728, 1155494, 1155502, 1148325, 1182113, 1173307, 1145028, 1189239,\n", + " 1160936, 1169144, 1177801, 1153754, 1159658, 1159655, 1157158, 1157153,\n", + " 1172111, 1147711, 1151850, 1148142, 1157593, 1135021, 1179679, 1162106,\n", + " 1171614, 1176452, 1150234, 1154148, 1158176, 1172537, 1186117, 1168481,\n", + " 1143410, 1181095, 1170184, 1181241, 1153803, 1166554, 1178922, 1162131,\n", + " 1155105, 1154711, 1157795, 1157796, 1171623, 1155799, 1157124, 1188790,\n", + " 1145626, 1182629, 1149755, 1181354, 1182870, 1158512, 1158513, 1189590,\n", + " 1183641, 1165406, 1140399, 1168282, 1180172, 1177772, 1165484, 1171640,\n", + " 1162253, 1166210, 1164231, 1182337, 1188129, 1183319, 1158168, 1154944,\n", + " 1154952, 1141510, 1189280, 1172174, 1139828, 1139831, 1150265, 1150267,\n", + " 1170447, 1192076, 1156049, 1156055, 1151978, 1175961, 1146386, 1193360,\n", + " 1186443, 1190297, 1189121, 1168683, 1192754, 1162147, 1151774, 1186343,\n", + " 1152115, 1177125, 1169786, 1191610, 1178634, 1186561, 1192567, 1192916,\n", + " 1178268, 1193116, 1172122, 1178135, 1162781, 1155956, 1194246, 1194244,\n", + " 1190093, 1180869, 1155555, 1169831, 1182179, 1182191, 1187163, 1192676,\n", + " 1187556, 1191878], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1141439, 1140282, 1140285, 1135926, 1135727, 1140785, 1140799,\n", + " 1141758, 1134948, 1138335, 1136215, 1141251, 1136150, 1136156, 1142526,\n", + " 1136969, 1136971, 1141450, 1138897, 1139811, 1146983, 1137271, 1145055,\n", + " 1143372, 1148976, 1148987, 1149216, 1147949, 1155686, 1155689, 1143812,\n", + " 1149646, 1147483, 1141877, 1144632, 1146995, 1134701, 1148346, 1150193,\n", + " 1150200, 1136122, 1150555, 1155014, 1155019, 1139373, 1139371, 1136683,\n", + " 1136685, 1152427, 1140313, 1140540, 1137171, 1138356, 1153463, 1140159,\n", + " 1140020, 1135367, 1135370, 1135202, 1141036, 1134794, 1157443, 1138504,\n", + " 1137328, 1137329, 1136186, 1137693, 1136619, 1135333, 1144786, 1137529,\n", + " 1157397, 1156159, 1134841, 1141702, 1135579, 1135830, 1148860, 1138514,\n", + " 1153094, 1153099, 1135500, 1156899, 1135522, 1135535, 1139684, 1139687,\n", + " 1137287, 1138440, 1140079, 1138461, 1138462, 1158390, 1149328, 1138844,\n", + " 1135098, 1156605, 1156606, 1142611, 1142616, 1135025, 1160827, 1160830,\n", + " 1135631, 1158984, 1137109, 1135761, 1139849, 1136457, 1139667, 1138067,\n", + " 1134992, 1136554, 1152646, 1136723, 1139327, 1141065, 1140034, 1140045,\n", + " 1141963, 1153404, 1152042, 1152044, 1139063, 1142302, 1137728, 1134738,\n", + " 1135540, 1136697, 1141098, 1141100, 1162946, 1149001, 1136392, 1143766,\n", + " 1154860, 1137298, 1137299, 1137670, 1139025, 1146844, 1146832, 1135861,\n", + " 1136631, 1136637, 1139379, 1159794, 1136912, 1136917, 1137188, 1141156,\n", + " 1138789, 1139495, 1141609, 1144650, 1147847, 1165291, 1144428, 1144420,\n", + " 1165098, 1139267, 1140173, 1137762, 1137062, 1138710, 1138708, 1142913,\n", + " 1143107, 1136864, 1144039, 1135327, 1141398, 1140432, 1150906, 1144865,\n", + " 1143759, 1147153, 1153059, 1153068, 1141678, 1138288, 1144279, 1139510,\n", + " 1145200, 1140977, 1140979, 1140990, 1146702, 1147050, 1155824, 1152988,\n", + " 1135457, 1139447, 1139000, 1141925, 1144242, 1141841, 1141846, 1139405,\n", + " 1145974, 1144073, 1143851, 1136277, 1146024, 1150606, 1141585, 1149928,\n", + " 1139990, 1151124, 1147540, 1148763, 1147282, 1142816, 1136330, 1149155,\n", + " 1149366, 1148003, 1148009, 1146088, 1149608, 1149610, 1143040, 1148406,\n", + " 1136160, 1136167, 1142584, 1157720, 1136836, 1141490, 1143345, 1144619,\n", + " 1144088, 1135876, 1135813, 1150294, 1150299, 1143957, 1138024, 1138018,\n", + " 1143456, 1143457, 1143007, 1144291, 1135451, 1149082, 1143807, 1146633,\n", + " 1146636, 1147521, 1140364, 1143080, 1143082, 1166410, 1147999, 1146949,\n", + " 1134902, 1147131, 1145461, 1147244, 1148704, 1148715, 1142700, 1141327,\n", + " 1141825, 1147070, 1147971, 1147982, 1139549, 1158226, 1158235, 1167006,\n", + " 1148362, 1154526, 1145237, 1145750, 1145751, 1148390, 1146178, 1146189,\n", + " 1148223, 1150280, 1150445, 1149263, 1148823, 1144514, 1150350, 1153982,\n", + " 1151994, 1151475, 1151480, 1151487, 1152027, 1154263, 1135516, 1135519,\n", + " 1139916, 1146731, 1134869, 1147021, 1147023, 1135793, 1153959, 1141949,\n", + " 1146776, 1144824, 1153574, 1147653, 1143560, 1149412, 1148288, 1148300,\n", + " 1152073, 1154420, 1158786, 1148180, 1138204, 1146676, 1138867, 1148729,\n", + " 1144096, 1144098, 1144107, 1168975, 1146547, 1150057, 1148204, 1153124,\n", + " 1153192, 1153188, 1145111, 1159830, 1152879, 1150356, 1148095, 1147446,\n", + " 1147442, 1151906, 1150714, 1141420, 1145080, 1148949, 1146969, 1146975,\n", + " 1156402, 1146623, 1164781, 1146280, 1156321, 1153037, 1153038, 1137746,\n", + " 1137756, 1146304, 1140521, 1140517, 1152819, 1155334, 1154120, 1154123,\n", + " 1155358, 1157842, 1157826, 1152673, 1154632, 1154636, 1164761, 1164760,\n", + " 1151617, 1150586, 1136134, 1148916, 1145952, 1152227, 1138991, 1152903,\n", + " 1151298, 1151306, 1152341, 1138279, 1156001, 1136028, 1158704, 1140674,\n", + " 1156396, 1142777, 1150099, 1166848, 1150172, 1150164, 1144017, 1148040,\n", + " 1149794, 1149798, 1137048, 1168183, 1148628, 1137458, 1135707, 1135698,\n", + " 1155386, 1157547, 1158854, 1148889, 1158916, 1152392, 1155412, 1145187,\n", + " 1157565, 1150465, 1135730, 1152179, 1156629, 1165703, 1147810, 1139530,\n", + " 1158306, 1155441, 1150130, 1150132, 1140868, 1156919, 1172953, 1151379,\n", + " 1137912, 1137917, 1158639, 1140186, 1155122, 1152527, 1155755, 1135394,\n", + " 1135396, 1135398, 1146918, 1145806, 1158096, 1154755, 1155620, 1155626,\n", + " 1155627, 1155628, 1156563, 1158325, 1160958, 1143263, 1154644, 1154652,\n", + " 1143189, 1150371, 1147918, 1150987, 1155293, 1155284, 1157928, 1158578,\n", + " 1156765, 1158996, 1149913, 1155026, 1137385, 1137380, 1158084, 1159106,\n", + " 1138264, 1164309, 1134677, 1134685, 1135601, 1135611, 1148149, 1150671,\n", + " 1155848, 1149145, 1152209, 1159213, 1157732, 1155971, 1155975, 1155402,\n", + " 1149696, 1149702, 1149700, 1154600, 1154601, 1153503, 1136896, 1171171,\n", + " 1158815, 1136494, 1136491, 1147586, 1156490, 1153808, 1136640, 1136646,\n", + " 1166424, 1142178, 1147785, 1158558, 1151140, 1161167, 1165488, 1146126,\n", + " 1138110, 1155856, 1158006, 1144584, 1161539, 1135662, 1142663, 1157751,\n", + " 1167359, 1142426, 1157946, 1153052, 1153045, 1167181, 1163087, 1155763,\n", + " 1155771, 1156235, 1144144, 1153841, 1153842, 1156107, 1138391, 1138393,\n", + " 1160643, 1150046, 1159475, 1149060, 1149071, 1151023, 1153514, 1138161,\n", + " 1138167, 1156787, 1161774, 1149963, 1154590, 1169751, 1159999, 1159985,\n", + " 1148771, 1157351, 1157357, 1146063, 1171257, 1165306, 1165309, 1158865,\n", + " 1140643, 1143139, 1143143, 1151872, 1155816, 1155818, 1158653, 1159025,\n", + " 1159029, 1152244, 1152247, 1158902, 1160605, 1165274, 1165993, 1144989,\n", + " 1147397, 1147830, 1146500, 1164580, 1155046, 1160660, 1141464, 1141471,\n", + " 1147426, 1157044, 1165182, 1171041, 1168750, 1144812, 1140112, 1135567,\n", + " 1165636, 1163783, 1163935, 1145557, 1145561, 1167757, 1160232, 1170670,\n", + " 1144973, 1165746, 1147344, 1152624, 1145900, 1145902, 1153520, 1153526,\n", + " 1164395, 1154076, 1168756, 1167315, 1147338, 1145674, 1167817, 1149475,\n", + " 1155172, 1150522, 1150518, 1144336, 1170939, 1157534, 1135854, 1185874,\n", + " 1157331, 1169359, 1150031, 1149452, 1146339, 1149688, 1172575, 1157384,\n", + " 1193728, 1155494, 1155502, 1148325, 1182113, 1173307, 1145028, 1189239,\n", + " 1160936, 1169144, 1177801, 1153754, 1159658, 1159655, 1157158, 1157153,\n", + " 1172111, 1147711, 1151850, 1148142, 1157593, 1135021, 1179679, 1162106,\n", + " 1171614, 1176452, 1150234, 1154148, 1158176, 1172537, 1186117, 1168481,\n", + " 1143410, 1181095, 1170184, 1181241, 1153803, 1166554, 1178922, 1162131,\n", + " 1155105, 1154711, 1157795, 1157796, 1171623, 1155799, 1157124, 1188790,\n", + " 1145626, 1182629, 1149755, 1181354, 1182870, 1158512, 1158513, 1189590,\n", + " 1183641, 1165406, 1140399, 1168282, 1180172, 1177772, 1165484, 1171640,\n", + " 1162253, 1166210, 1164231, 1182337, 1188129, 1183319, 1158168, 1154944,\n", + " 1154952, 1141510, 1189280, 1172174, 1139828, 1139831, 1150265, 1150267,\n", + " 1170447, 1192076, 1156049, 1156055, 1151978, 1175961, 1146386, 1193360,\n", + " 1186443, 1190297, 1189121, 1168683, 1192754, 1162147, 1151774, 1186343,\n", + " 1152115, 1177125, 1169786, 1191610, 1178634, 1186561, 1192567, 1192916,\n", + " 1178268, 1193116, 1172122, 1178135, 1162781, 1155956, 1194246, 1194244,\n", + " 1190093, 1180869, 1155555, 1169831, 1182179, 1182191, 1187163, 1192676,\n", + " 1187556, 1191878], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195452, 1196007, 1196011, 1197451, 1197719, 1200099, 1195858, 1199282,\n", + " 1199293, 1202255, 1198840, 1202119, 1197777, 1197791, 1201016, 1198624,\n", + " 1198633, 1198694, 1202804, 1198557, 1194743, 1194745, 1197159, 1195511,\n", + " 1195263, 1199135, 1201992, 1198371, 1198380, 1198383, 1197697, 1199519,\n", + " 1195457, 1198306, 1194882, 1195888, 1199172, 1195740, 1199371, 1199373,\n", + " 1195323, 1196837, 1198668, 1195132, 1198260, 1198036, 1198646, 1198167,\n", + " 1198161, 1196717, 1195145, 1195265, 1195270, 1197141, 1196109, 1195841,\n", + " 1195850, 1195659, 1197478, 1195778, 1196283, 1199856, 1199062, 1199059,\n", + " 1197285, 1202747, 1199185, 1194928, 1199628, 1199803, 1197990, 1200076,\n", + " 1200869, 1200747, 1199847, 1197683, 1196501, 1199021, 1197609, 1197961,\n", + " 1196727, 1200894, 1203239, 1198811, 1201827, 1200503, 1200507, 1198593,\n", + " 1199445, 1201156, 1202630, 1201056, 1200913, 1201405, 1194803, 1199723,\n", + " 1203344, 1201492, 1200553, 1200556, 1197097, 1197100, 1203183, 1202138,\n", + " 1200692, 1202232, 1199482, 1199976, 1195876, 1200189, 1201596, 1199929,\n", + " 1196966, 1202879, 1200997, 1202687, 1198525, 1203112, 1195664, 1200445,\n", + " 1200382, 1198929, 1197060, 1197066, 1201499, 1196605, 1196375, 1203102,\n", + " 1201138, 1198824, 1197731, 1197735, 1200437, 1199782, 1198819, 1195066,\n", + " 1200296, 1197652, 1197335, 1198996], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195452, 1196007, 1196011, 1197451, 1197719, 1200099, 1195858, 1199282,\n", + " 1199293, 1202255, 1198840, 1202119, 1197777, 1197791, 1201016, 1198624,\n", + " 1198633, 1198694, 1202804, 1198557, 1194743, 1194745, 1197159, 1195511,\n", + " 1195263, 1199135, 1201992, 1198371, 1198380, 1198383, 1197697, 1199519,\n", + " 1195457, 1198306, 1194882, 1195888, 1199172, 1195740, 1199371, 1199373,\n", + " 1195323, 1196837, 1198668, 1195132, 1198260, 1198036, 1198646, 1198167,\n", + " 1198161, 1196717, 1195145, 1195265, 1195270, 1197141, 1196109, 1195841,\n", + " 1195850, 1195659, 1197478, 1195778, 1196283, 1199856, 1199062, 1199059,\n", + " 1197285, 1202747, 1199185, 1194928, 1199628, 1199803, 1197990, 1200076,\n", + " 1200869, 1200747, 1199847, 1197683, 1196501, 1199021, 1197609, 1197961,\n", + " 1196727, 1200894, 1203239, 1198811, 1201827, 1200503, 1200507, 1198593,\n", + " 1199445, 1201156, 1202630, 1201056, 1200913, 1201405, 1194803, 1199723,\n", + " 1203344, 1201492, 1200553, 1200556, 1197097, 1197100, 1203183, 1202138,\n", + " 1200692, 1202232, 1199482, 1199976, 1195876, 1200189, 1201596, 1199929,\n", + " 1196966, 1202879, 1200997, 1202687, 1198525, 1203112, 1195664, 1200445,\n", + " 1200382, 1198929, 1197060, 1197066, 1201499, 1196605, 1196375, 1203102,\n", + " 1201138, 1198824, 1197731, 1197735, 1200437, 1199782, 1198819, 1195066,\n", + " 1200296, 1197652, 1197335, 1198996], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 9.4907e-02, -1.9377e-04, 6.7879e-01, ..., 1.2993e-01,\n", + " -2.0570e-03, -4.2902e-03],\n", + " [ 1.5515e-01, 3.3271e-02, 7.7551e-01, ..., 1.1307e-01,\n", + " -1.3062e-03, -5.0525e-03],\n", + " [ 2.6585e-01, -7.0733e-04, 1.0615e+00, ..., 9.9214e-02,\n", + " -1.6479e-03, -7.0683e-03],\n", + " ...,\n", + " [ 2.4959e-01, -3.6386e-04, 1.0130e+00, ..., 1.2114e-01,\n", + " -1.8941e-03, -6.6330e-03],\n", + " [ 9.6698e-02, -3.4821e-04, 7.5005e-01, ..., 1.4794e-01,\n", + " -2.0655e-03, -4.6512e-03],\n", + " [ 1.8392e-01, 5.0560e-02, 8.7916e-01, ..., 1.3993e-01,\n", + " -1.3329e-03, -5.7126e-03]], device='cuda:0'), 'paper': tensor([[ 1.7440e+00, 1.1309e+00, 3.4969e+00, ..., 1.7177e+00,\n", + " -5.4172e-02, 3.4434e+00],\n", + " [-2.1427e-03, -2.4585e-03, 3.3745e+00, ..., -6.4266e-03,\n", + " -3.1249e-02, -1.3353e-02],\n", + " [-6.5476e-03, 7.0371e-02, 4.5025e+00, ..., -1.3597e-02,\n", + " -3.6916e-02, -2.2355e-02],\n", + " ...,\n", + " [ 1.1016e+00, 1.1312e+00, 3.0793e+00, ..., 3.1033e-01,\n", + " -3.4092e-02, 1.1064e+00],\n", + " [ 5.0084e-01, 7.2352e-01, 1.6093e+00, ..., -2.3644e-03,\n", + " -1.9352e-02, -1.3095e-03],\n", + " [ 1.8491e+00, 1.5275e+00, 3.3966e+00, ..., 2.5052e+00,\n", + " -5.7626e-02, 4.1123e+00]], device='cuda:0'), 'author': tensor([[-6.0341e-04, 2.3675e-01, 9.7394e-02, ..., 1.7071e+00,\n", + " 2.4746e-01, 1.5053e-01],\n", + " [-3.7296e-03, 4.2299e-01, 3.5326e-01, ..., 1.5820e+00,\n", + " -4.6692e-03, -5.0751e-03],\n", + " [-1.6579e-03, 3.1000e-01, 2.0966e-01, ..., 1.6301e+00,\n", + " -8.1979e-04, -6.2492e-04],\n", + " ...,\n", + " [-2.4578e-03, 3.2652e-01, 3.2190e-01, ..., 1.7080e+00,\n", + " -1.3047e-03, -1.3410e-03],\n", + " [-1.1845e-03, 3.3461e-01, 2.0293e-01, ..., 1.6528e+00,\n", + " 4.7052e-02, 4.3120e-02],\n", + " [-1.0881e-03, 2.6289e-01, 1.6748e-01, ..., 1.5942e+00,\n", + " 7.4486e-02, 3.4086e-02]], device='cuda:0'), 'field_of_study': tensor([[-7.3721e-06, 6.9022e-01, 4.0581e-01, ..., -9.5715e-03,\n", + " 2.9425e-01, 4.6294e-01],\n", + " [-1.2918e-04, 7.0959e-01, 3.9642e-01, ..., -1.0700e-02,\n", + " 3.6603e-01, 4.7404e-01],\n", + " [ 1.5628e-01, 8.0690e-01, 4.6925e-01, ..., -9.4472e-03,\n", + " 3.9140e-01, 2.5964e-01],\n", + " ...,\n", + " [-2.3318e-04, 1.0308e+00, 6.8771e-01, ..., -1.2852e-02,\n", + " 4.3223e-01, 7.5916e-01],\n", + " [ 1.3008e-01, 7.2214e-01, 4.8979e-01, ..., -5.9905e-03,\n", + " 3.3123e-01, 1.3543e-01],\n", + " [ 2.2268e-02, 6.8360e-01, 3.4903e-01, ..., -8.7452e-03,\n", + " 3.1595e-01, 3.5948e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 101, 171, 154, 93, 113, 135, 26, 365, 462, 512, 240, 49,\n", + " 449, 449, 253, 438, 980, 973, 905, 900, 855, 1146, 1146, 1239,\n", + " 1214, 1285, 1410, 1129, 1285, 1190, 1316, 1362, 1388, 1515, 1454, 1732,\n", + " 1535, 1719, 1742, 1949, 1844, 1844, 1949, 1885, 1816, 1789, 1996, 1906,\n", + " 1800, 2010, 1784, 1923, 2054, 2061, 2060, 1957, 2061, 2061, 2023, 2106,\n", + " 2073, 2073, 2275, 2364, 2364, 2364, 2287, 2164, 2324, 2324, 2324, 2315,\n", + " 2542, 2542, 2427, 2427, 2441, 2441, 2866, 2955, 2740, 2692, 2692, 2692,\n", + " 2668, 2517, 2836, 2792, 2882, 3125, 3075, 3276, 3276, 3198, 3198, 3198,\n", + " 3198, 3308, 3291, 3718, 3377, 3736, 3554, 3660, 3711, 3742, 3765, 3765,\n", + " 3726, 3700, 3765, 3792, 3804, 3804, 3853, 3817, 3817, 3876, 3873, 3846,\n", + " 3846, 3846, 3913, 3914, 3962, 3952, 4068, 4068, 4068, 4068, 4043, 4077,\n", + " 4014, 4256, 4051, 4176, 4178, 4241, 4198, 4337, 4355, 4400, 4398, 4616,\n", + " 4616, 4532, 4732, 4732, 4543, 4390, 4390, 4390, 4390, 4390, 4702, 4697,\n", + " 4610, 4608, 4687, 4791, 4791, 4796, 4861, 4861, 4861, 4911, 5075, 5075,\n", + " 4939, 5157, 5188, 5188, 5609, 5609, 5416, 5397, 5485, 5580, 5499, 5396,\n", + " 5619, 5586, 5586, 5720, 5295, 5638, 5461, 5818, 5818, 5741, 6074, 5652,\n", + " 5652, 5652, 5825, 6114, 6028, 5638, 5638, 5638, 5638, 5638, 5677, 5983,\n", + " 5624, 5624, 5802, 5802, 5802, 6069, 6076, 6076, 6070, 6034, 6034, 6036,\n", + " 6036],\n", + " [ 54, 91, 29, 109, 72, 51, 139, 13, 66, 71, 41, 6,\n", + " 27, 39, 121, 18, 78, 138, 7, 52, 119, 134, 92, 110,\n", + " 60, 127, 24, 116, 83, 135, 86, 38, 124, 24, 32, 7,\n", + " 122, 37, 42, 47, 46, 82, 21, 21, 13, 135, 91, 24,\n", + " 123, 90, 22, 24, 77, 109, 34, 111, 126, 59, 24, 7,\n", + " 5, 51, 45, 0, 95, 3, 32, 121, 44, 17, 97, 50,\n", + " 24, 108, 51, 5, 88, 6, 58, 0, 116, 79, 122, 105,\n", + " 8, 24, 98, 80, 24, 135, 131, 130, 57, 77, 69, 81,\n", + " 85, 24, 101, 61, 7, 99, 132, 87, 68, 96, 54, 76,\n", + " 7, 24, 80, 8, 117, 1, 113, 128, 91, 24, 24, 53,\n", + " 16, 114, 28, 115, 135, 24, 136, 100, 111, 131, 113, 113,\n", + " 120, 68, 9, 74, 113, 26, 6, 2, 14, 30, 118, 106,\n", + " 75, 15, 33, 68, 73, 43, 64, 102, 24, 19, 40, 36,\n", + " 80, 11, 106, 103, 25, 12, 49, 84, 62, 24, 117, 88,\n", + " 24, 77, 54, 80, 70, 31, 68, 71, 93, 125, 91, 63,\n", + " 91, 56, 80, 80, 4, 34, 133, 94, 80, 80, 104, 20,\n", + " 80, 10, 48, 24, 138, 80, 89, 26, 14, 107, 112, 65,\n", + " 80, 23, 80, 92, 48, 80, 35, 54, 129, 137, 80, 55,\n", + " 67]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2680, 2018, 1682, ..., 429, 1836, 3268],\n", + " [ 204, 3, 99, ..., 7113, 7189, 7241]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 117, 39, 40, ..., 91, 91, 5],\n", + " [ 105, 46, 59, ..., 6020, 6093, 6016]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 61, 61, 61, ..., 7271, 7271, 7271],\n", + " [ 612, 431, 144, ..., 61, 405, 260]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 301, 317, 260, ..., 368, 212, 316],\n", + " [ 90, 65, 51, ..., 7261, 7178, 7092]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 426, 1324, 3002, ..., 7141, 7043, 6596],\n", + " [ 159, 159, 159, ..., 6055, 6104, 6070]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 286, 286, 286, ..., 7077, 7077, 7177],\n", + " [3849, 1053, 1015, ..., 7235, 7166, 1225]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 93, 93, 93, ..., 6056, 6056, 6056],\n", + " [2552, 2825, 847, ..., 4680, 4721, 4847]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006348\n", + "sampling 0.00619\n", + "noi time: 0.002488\n", + "get_vertex_data call: 0.035092\n", + "noi group time: 0.001813\n", + "eoi_group_time: 0.011248\n", + "second half: 0.184427\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24178, 24187, 32616, ..., 1132728, 1120067, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24178, 24187, 32616, ..., 1132728, 1120067, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1212857, 1231431, ..., 1933651, 1935650, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1212857, 1231431, ..., 1933651, 1935650, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1141439, 1136230, 1140282, 1140284, 1135926, 1135935, 1135726,\n", + " 1140785, 1139698, 1136208, 1136223, 1136211, 1142802, 1136962, 1136971,\n", + " 1141443, 1143615, 1139808, 1139817, 1139811, 1146983, 1145999, 1143372,\n", + " 1150497, 1150506, 1145282, 1142968, 1134937, 1149216, 1155682, 1155685,\n", + " 1155689, 1143820, 1149639, 1147483, 1144632, 1146992, 1146995, 1153008,\n", + " 1135475, 1136112, 1152666, 1138347, 1138345, 1147094, 1155014, 1139365,\n", + " 1139371, 1136685, 1150326, 1136268, 1134661, 1137829, 1137833, 1151536,\n", + " 1140537, 1140540, 1138112, 1137254, 1135171, 1137170, 1138356, 1138366,\n", + " 1140020, 1140946, 1140953, 1135367, 1135202, 1140767, 1154739, 1141036,\n", + " 1134794, 1157447, 1138504, 1157103, 1137693, 1144395, 1157393, 1136662,\n", + " 1143317, 1135265, 1156146, 1141086, 1136111, 1135670, 1140970, 1140707,\n", + " 1156342, 1138514, 1153092, 1158136, 1156967, 1135490, 1135522, 1139684,\n", + " 1139685, 1139687, 1138434, 1138440, 1138461, 1158390, 1149328, 1156603,\n", + " 1156606, 1142611, 1160819, 1148536, 1139667, 1159185, 1142249, 1136094,\n", + " 1134992, 1136551, 1136546, 1139745, 1158970, 1158974, 1141070, 1144410,\n", + " 1153543, 1153544, 1143626, 1143631, 1140034, 1138647, 1138147, 1138150,\n", + " 1141964, 1152042, 1152044, 1137728, 1147317, 1134750, 1135540, 1136697,\n", + " 1140228, 1137902, 1144138, 1144143, 1149001, 1139119, 1139632, 1143767,\n", + " 1143775, 1154860, 1137299, 1143225, 1139025, 1149968, 1141695, 1135861,\n", + " 1136625, 1142931, 1139386, 1139387, 1143676, 1139495, 1144650, 1136862,\n", + " 1136851, 1147844, 1147850, 1137074, 1144428, 1138482, 1141821, 1143158,\n", + " 1140160, 1138469, 1138472, 1137771, 1137058, 1140110, 1138423, 1143107,\n", + " 1148444, 1144596, 1157420, 1136864, 1140885, 1144182, 1144865, 1143755,\n", + " 1139559, 1138529, 1138539, 1137854, 1142640, 1149193, 1141664, 1149088,\n", + " 1149090, 1139018, 1138293, 1144279, 1139510, 1139763, 1139650, 1138815,\n", + " 1139127, 1145001, 1140616, 1140990, 1147050, 1143543, 1152980, 1152985,\n", + " 1141925, 1146901, 1145332, 1145343, 1165366, 1141841, 1134859, 1143845,\n", + " 1143851, 1146024, 1138085, 1146140, 1141585, 1139990, 1148763, 1147282,\n", + " 1147458, 1149365, 1149366, 1139408, 1147375, 1148003, 1157720, 1136836,\n", + " 1146099, 1139297, 1144778, 1158045, 1143345, 1144611, 1144619, 1145808,\n", + " 1140844, 1144080, 1138595, 1150294, 1144376, 1138024, 1143456, 1143457,\n", + " 1147574, 1143798, 1146633, 1146626, 1147521, 1140364, 1137990, 1144732,\n", + " 1147995, 1147996, 1147999, 1134902, 1144013, 1148704, 1141327, 1141836,\n", + " 1153701, 1147066, 1149714, 1149719, 1147970, 1147981, 1139549, 1158226,\n", + " 1158230, 1158235, 1147874, 1154519, 1145238, 1145751, 1146159, 1146178,\n", + " 1138857, 1151242, 1148217, 1152530, 1152538, 1150274, 1151179, 1150438,\n", + " 1150445, 1149250, 1148821, 1147962, 1154438, 1154445, 1149791, 1144514,\n", + " 1144526, 1138041, 1138044, 1144174, 1146895, 1152013, 1151473, 1152022,\n", + " 1152027, 1154263, 1151041, 1145255, 1145259, 1142278, 1150123, 1153152,\n", + " 1141941, 1146772, 1148744, 1153574, 1148453, 1147653, 1151717, 1148300,\n", + " 1137724, 1135085, 1139097, 1154430, 1154420, 1151363, 1136251, 1136247,\n", + " 1139718, 1146676, 1138874, 1138404, 1141181, 1157978, 1148720, 1147627,\n", + " 1143893, 1143895, 1148204, 1148096, 1171943, 1153124, 1153192, 1153188,\n", + " 1150935, 1144863, 1155088, 1146232, 1147442, 1152581, 1135307, 1148498,\n", + " 1146562, 1146571, 1141420, 1152784, 1136002, 1149359, 1153261, 1150219,\n", + " 1146623, 1152407, 1154052, 1152100, 1152103, 1153026, 1153037, 1153039,\n", + " 1137746, 1137756, 1146307, 1146304, 1136401, 1152819, 1155337, 1154119,\n", + " 1154123, 1154126, 1157824, 1152673, 1139570, 1150578, 1150579, 1136134,\n", + " 1136798, 1148914, 1152957, 1140461, 1145925, 1153377, 1144540, 1140932,\n", + " 1138982, 1152903, 1151311, 1152341, 1146816, 1146704, 1138279, 1152295,\n", + " 1156004, 1156001, 1136028, 1136024, 1158704, 1156621, 1156622, 1140682,\n", + " 1152928, 1154733, 1142777, 1150150, 1150164, 1144016, 1148036, 1148040,\n", + " 1148034, 1155202, 1154457, 1149804, 1137048, 1148628, 1158530, 1158540,\n", + " 1137458, 1148246, 1157229, 1158916, 1156505, 1157064, 1155418, 1152833,\n", + " 1145191, 1137808, 1151260, 1157559, 1150465, 1152179, 1152183, 1152182,\n", + " 1156629, 1156638, 1165700, 1150824, 1156932, 1153415, 1147810, 1143019,\n", + " 1157784, 1158308, 1158311, 1151271, 1151331, 1174257, 1155441, 1155442,\n", + " 1137972, 1162120, 1154529, 1154530, 1154542, 1153999, 1142755, 1138775,\n", + " 1156269, 1151379, 1155122, 1152527, 1149519, 1153486, 1155746, 1151424,\n", + " 1145793, 1156455, 1156463, 1158096, 1154763, 1155628, 1155630, 1156563,\n", + " 1158824, 1158325, 1148835, 1154648, 1162396, 1154250, 1156711, 1143189,\n", + " 1150371, 1157439, 1157430, 1141620, 1150987, 1155293, 1143517, 1157663,\n", + " 1153786, 1158192, 1158206, 1137381, 1145690, 1135601, 1150661, 1155848,\n", + " 1149145, 1152209, 1167297, 1140370, 1140380, 1140381, 1140374, 1157732,\n", + " 1159132, 1155971, 1155975, 1158846, 1183182, 1155402, 1155404, 1149700,\n", + " 1154604, 1160163, 1136910, 1136896, 1158753, 1140208, 1158438, 1156778,\n", + " 1158285, 1152463, 1151615, 1136494, 1164931, 1157581, 1153632, 1155302,\n", + " 1156488, 1153808, 1136640, 1157858, 1142178, 1160912, 1158555, 1146126,\n", + " 1155521, 1142666, 1157751, 1167359, 1156045, 1151080, 1153052, 1153045,\n", + " 1171551, 1167566, 1170863, 1153841, 1138391, 1138393, 1149063, 1145945,\n", + " 1155479, 1154297, 1154299, 1153514, 1153519, 1146876, 1163391, 1160764,\n", + " 1139592, 1139290, 1166073, 1157359, 1146063, 1159552, 1160697, 1158878,\n", + " 1169489, 1140643, 1140649, 1143139, 1143146, 1166805, 1151872, 1156357,\n", + " 1158643, 1156183, 1159025, 1159032, 1160882, 1186967, 1152247, 1143735,\n", + " 1143737, 1155588, 1144320, 1168427, 1164580, 1144747, 1155044, 1163527,\n", + " 1145137, 1155268, 1153204, 1156750, 1157958, 1171040, 1144810, 1144812,\n", + " 1164741, 1156293, 1156303, 1162611, 1144058, 1145729, 1145728, 1145228,\n", + " 1160773, 1166462, 1144973, 1143028, 1143025, 1145447, 1139344, 1145900,\n", + " 1145902, 1153534, 1169538, 1143397, 1143402, 1158724, 1158734, 1154076,\n", + " 1147338, 1144690, 1169602, 1144681, 1166653, 1169298, 1155172, 1150518,\n", + " 1167918, 1156113, 1146601, 1144346, 1157534, 1184188, 1138369, 1157331,\n", + " 1157333, 1138130, 1141043, 1158611, 1149847, 1160141, 1176720, 1152353,\n", + " 1143172, 1168049, 1149402, 1148667, 1167022, 1177984, 1165904, 1173307,\n", + " 1169149, 1154027, 1159655, 1157158, 1147711, 1151850, 1148141, 1148142,\n", + " 1157585, 1166827, 1181014, 1170023, 1166679, 1166682, 1170874, 1171823,\n", + " 1149169, 1169821, 1181216, 1186127, 1143271, 1143420, 1166299, 1181246,\n", + " 1153803, 1172801, 1180649, 1171407, 1161255, 1177581, 1154718, 1143335,\n", + " 1171623, 1164034, 1178359, 1178367, 1190802, 1157134, 1174951, 1158249,\n", + " 1153890, 1153897, 1134650, 1164560, 1178214, 1145626, 1180383, 1146242,\n", + " 1152274, 1155992, 1155892, 1155899, 1155889, 1162694, 1159872, 1160400,\n", + " 1189641, 1170597, 1169064, 1186712, 1162253, 1187743, 1177911, 1164230,\n", + " 1188259, 1181457, 1181821, 1179473, 1156528, 1156539, 1139831, 1139837,\n", + " 1150265, 1154810, 1190585, 1156049, 1156055, 1151978, 1146395, 1182370,\n", + " 1172399, 1156838, 1178526, 1170207, 1162156, 1167840, 1151774, 1172339,\n", + " 1169707, 1166841, 1178625, 1178636, 1171201, 1158064, 1158067, 1167730,\n", + " 1180262, 1184442, 1176829, 1155962, 1188473, 1180867, 1169831, 1191142],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1141439, 1136230, 1140282, 1140284, 1135926, 1135935, 1135726,\n", + " 1140785, 1139698, 1136208, 1136223, 1136211, 1142802, 1136962, 1136971,\n", + " 1141443, 1143615, 1139808, 1139817, 1139811, 1146983, 1145999, 1143372,\n", + " 1150497, 1150506, 1145282, 1142968, 1134937, 1149216, 1155682, 1155685,\n", + " 1155689, 1143820, 1149639, 1147483, 1144632, 1146992, 1146995, 1153008,\n", + " 1135475, 1136112, 1152666, 1138347, 1138345, 1147094, 1155014, 1139365,\n", + " 1139371, 1136685, 1150326, 1136268, 1134661, 1137829, 1137833, 1151536,\n", + " 1140537, 1140540, 1138112, 1137254, 1135171, 1137170, 1138356, 1138366,\n", + " 1140020, 1140946, 1140953, 1135367, 1135202, 1140767, 1154739, 1141036,\n", + " 1134794, 1157447, 1138504, 1157103, 1137693, 1144395, 1157393, 1136662,\n", + " 1143317, 1135265, 1156146, 1141086, 1136111, 1135670, 1140970, 1140707,\n", + " 1156342, 1138514, 1153092, 1158136, 1156967, 1135490, 1135522, 1139684,\n", + " 1139685, 1139687, 1138434, 1138440, 1138461, 1158390, 1149328, 1156603,\n", + " 1156606, 1142611, 1160819, 1148536, 1139667, 1159185, 1142249, 1136094,\n", + " 1134992, 1136551, 1136546, 1139745, 1158970, 1158974, 1141070, 1144410,\n", + " 1153543, 1153544, 1143626, 1143631, 1140034, 1138647, 1138147, 1138150,\n", + " 1141964, 1152042, 1152044, 1137728, 1147317, 1134750, 1135540, 1136697,\n", + " 1140228, 1137902, 1144138, 1144143, 1149001, 1139119, 1139632, 1143767,\n", + " 1143775, 1154860, 1137299, 1143225, 1139025, 1149968, 1141695, 1135861,\n", + " 1136625, 1142931, 1139386, 1139387, 1143676, 1139495, 1144650, 1136862,\n", + " 1136851, 1147844, 1147850, 1137074, 1144428, 1138482, 1141821, 1143158,\n", + " 1140160, 1138469, 1138472, 1137771, 1137058, 1140110, 1138423, 1143107,\n", + " 1148444, 1144596, 1157420, 1136864, 1140885, 1144182, 1144865, 1143755,\n", + " 1139559, 1138529, 1138539, 1137854, 1142640, 1149193, 1141664, 1149088,\n", + " 1149090, 1139018, 1138293, 1144279, 1139510, 1139763, 1139650, 1138815,\n", + " 1139127, 1145001, 1140616, 1140990, 1147050, 1143543, 1152980, 1152985,\n", + " 1141925, 1146901, 1145332, 1145343, 1165366, 1141841, 1134859, 1143845,\n", + " 1143851, 1146024, 1138085, 1146140, 1141585, 1139990, 1148763, 1147282,\n", + " 1147458, 1149365, 1149366, 1139408, 1147375, 1148003, 1157720, 1136836,\n", + " 1146099, 1139297, 1144778, 1158045, 1143345, 1144611, 1144619, 1145808,\n", + " 1140844, 1144080, 1138595, 1150294, 1144376, 1138024, 1143456, 1143457,\n", + " 1147574, 1143798, 1146633, 1146626, 1147521, 1140364, 1137990, 1144732,\n", + " 1147995, 1147996, 1147999, 1134902, 1144013, 1148704, 1141327, 1141836,\n", + " 1153701, 1147066, 1149714, 1149719, 1147970, 1147981, 1139549, 1158226,\n", + " 1158230, 1158235, 1147874, 1154519, 1145238, 1145751, 1146159, 1146178,\n", + " 1138857, 1151242, 1148217, 1152530, 1152538, 1150274, 1151179, 1150438,\n", + " 1150445, 1149250, 1148821, 1147962, 1154438, 1154445, 1149791, 1144514,\n", + " 1144526, 1138041, 1138044, 1144174, 1146895, 1152013, 1151473, 1152022,\n", + " 1152027, 1154263, 1151041, 1145255, 1145259, 1142278, 1150123, 1153152,\n", + " 1141941, 1146772, 1148744, 1153574, 1148453, 1147653, 1151717, 1148300,\n", + " 1137724, 1135085, 1139097, 1154430, 1154420, 1151363, 1136251, 1136247,\n", + " 1139718, 1146676, 1138874, 1138404, 1141181, 1157978, 1148720, 1147627,\n", + " 1143893, 1143895, 1148204, 1148096, 1171943, 1153124, 1153192, 1153188,\n", + " 1150935, 1144863, 1155088, 1146232, 1147442, 1152581, 1135307, 1148498,\n", + " 1146562, 1146571, 1141420, 1152784, 1136002, 1149359, 1153261, 1150219,\n", + " 1146623, 1152407, 1154052, 1152100, 1152103, 1153026, 1153037, 1153039,\n", + " 1137746, 1137756, 1146307, 1146304, 1136401, 1152819, 1155337, 1154119,\n", + " 1154123, 1154126, 1157824, 1152673, 1139570, 1150578, 1150579, 1136134,\n", + " 1136798, 1148914, 1152957, 1140461, 1145925, 1153377, 1144540, 1140932,\n", + " 1138982, 1152903, 1151311, 1152341, 1146816, 1146704, 1138279, 1152295,\n", + " 1156004, 1156001, 1136028, 1136024, 1158704, 1156621, 1156622, 1140682,\n", + " 1152928, 1154733, 1142777, 1150150, 1150164, 1144016, 1148036, 1148040,\n", + " 1148034, 1155202, 1154457, 1149804, 1137048, 1148628, 1158530, 1158540,\n", + " 1137458, 1148246, 1157229, 1158916, 1156505, 1157064, 1155418, 1152833,\n", + " 1145191, 1137808, 1151260, 1157559, 1150465, 1152179, 1152183, 1152182,\n", + " 1156629, 1156638, 1165700, 1150824, 1156932, 1153415, 1147810, 1143019,\n", + " 1157784, 1158308, 1158311, 1151271, 1151331, 1174257, 1155441, 1155442,\n", + " 1137972, 1162120, 1154529, 1154530, 1154542, 1153999, 1142755, 1138775,\n", + " 1156269, 1151379, 1155122, 1152527, 1149519, 1153486, 1155746, 1151424,\n", + " 1145793, 1156455, 1156463, 1158096, 1154763, 1155628, 1155630, 1156563,\n", + " 1158824, 1158325, 1148835, 1154648, 1162396, 1154250, 1156711, 1143189,\n", + " 1150371, 1157439, 1157430, 1141620, 1150987, 1155293, 1143517, 1157663,\n", + " 1153786, 1158192, 1158206, 1137381, 1145690, 1135601, 1150661, 1155848,\n", + " 1149145, 1152209, 1167297, 1140370, 1140380, 1140381, 1140374, 1157732,\n", + " 1159132, 1155971, 1155975, 1158846, 1183182, 1155402, 1155404, 1149700,\n", + " 1154604, 1160163, 1136910, 1136896, 1158753, 1140208, 1158438, 1156778,\n", + " 1158285, 1152463, 1151615, 1136494, 1164931, 1157581, 1153632, 1155302,\n", + " 1156488, 1153808, 1136640, 1157858, 1142178, 1160912, 1158555, 1146126,\n", + " 1155521, 1142666, 1157751, 1167359, 1156045, 1151080, 1153052, 1153045,\n", + " 1171551, 1167566, 1170863, 1153841, 1138391, 1138393, 1149063, 1145945,\n", + " 1155479, 1154297, 1154299, 1153514, 1153519, 1146876, 1163391, 1160764,\n", + " 1139592, 1139290, 1166073, 1157359, 1146063, 1159552, 1160697, 1158878,\n", + " 1169489, 1140643, 1140649, 1143139, 1143146, 1166805, 1151872, 1156357,\n", + " 1158643, 1156183, 1159025, 1159032, 1160882, 1186967, 1152247, 1143735,\n", + " 1143737, 1155588, 1144320, 1168427, 1164580, 1144747, 1155044, 1163527,\n", + " 1145137, 1155268, 1153204, 1156750, 1157958, 1171040, 1144810, 1144812,\n", + " 1164741, 1156293, 1156303, 1162611, 1144058, 1145729, 1145728, 1145228,\n", + " 1160773, 1166462, 1144973, 1143028, 1143025, 1145447, 1139344, 1145900,\n", + " 1145902, 1153534, 1169538, 1143397, 1143402, 1158724, 1158734, 1154076,\n", + " 1147338, 1144690, 1169602, 1144681, 1166653, 1169298, 1155172, 1150518,\n", + " 1167918, 1156113, 1146601, 1144346, 1157534, 1184188, 1138369, 1157331,\n", + " 1157333, 1138130, 1141043, 1158611, 1149847, 1160141, 1176720, 1152353,\n", + " 1143172, 1168049, 1149402, 1148667, 1167022, 1177984, 1165904, 1173307,\n", + " 1169149, 1154027, 1159655, 1157158, 1147711, 1151850, 1148141, 1148142,\n", + " 1157585, 1166827, 1181014, 1170023, 1166679, 1166682, 1170874, 1171823,\n", + " 1149169, 1169821, 1181216, 1186127, 1143271, 1143420, 1166299, 1181246,\n", + " 1153803, 1172801, 1180649, 1171407, 1161255, 1177581, 1154718, 1143335,\n", + " 1171623, 1164034, 1178359, 1178367, 1190802, 1157134, 1174951, 1158249,\n", + " 1153890, 1153897, 1134650, 1164560, 1178214, 1145626, 1180383, 1146242,\n", + " 1152274, 1155992, 1155892, 1155899, 1155889, 1162694, 1159872, 1160400,\n", + " 1189641, 1170597, 1169064, 1186712, 1162253, 1187743, 1177911, 1164230,\n", + " 1188259, 1181457, 1181821, 1179473, 1156528, 1156539, 1139831, 1139837,\n", + " 1150265, 1154810, 1190585, 1156049, 1156055, 1151978, 1146395, 1182370,\n", + " 1172399, 1156838, 1178526, 1170207, 1162156, 1167840, 1151774, 1172339,\n", + " 1169707, 1166841, 1178625, 1178636, 1171201, 1158064, 1158067, 1167730,\n", + " 1180262, 1184442, 1176829, 1155962, 1188473, 1180867, 1169831, 1191142],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197168, 1197183, 1199424, 1197719, 1198721, 1199831, 1199835,\n", + " 1201094, 1199282, 1198458, 1198459, 1198844, 1201577, 1201582, 1197777,\n", + " 1198557, 1197512, 1194866, 1198180, 1195726, 1197430, 1198623, 1195263,\n", + " 1201992, 1195457, 1198306, 1194882, 1195888, 1199171, 1194976, 1195313,\n", + " 1196835, 1198669, 1196165, 1198167, 1196711, 1199823, 1195265, 1195278,\n", + " 1197141, 1197136, 1197366, 1197273, 1194859, 1195846, 1195038, 1198915,\n", + " 1195659, 1195541, 1198207, 1196305, 1195626, 1196393, 1199059, 1199185,\n", + " 1199628, 1197674, 1197676, 1199231, 1201904, 1195017, 1200116, 1194795,\n", + " 1199949, 1195807, 1197611, 1201116, 1196727, 1196734, 1202623, 1200894,\n", + " 1198428, 1198811, 1199555, 1201824, 1201827, 1200503, 1198066, 1198593,\n", + " 1199445, 1201156, 1201056, 1200913, 1201405, 1194803, 1199712, 1201041,\n", + " 1201492, 1202499, 1200553, 1203071, 1201721, 1202541, 1199886, 1201757,\n", + " 1197040, 1200692, 1200194, 1201442, 1196256, 1201029, 1199976, 1202707,\n", + " 1201291, 1198466, 1202209, 1202889, 1199925, 1199929, 1201800, 1196963,\n", + " 1196966, 1200793, 1195664, 1198929, 1200684, 1201789, 1195386, 1201321,\n", + " 1197816, 1196597, 1197403, 1199659, 1194730, 1198824, 1199782, 1198819,\n", + " 1200466, 1195070, 1195066, 1197655, 1201365, 1201960, 1197872],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197168, 1197183, 1199424, 1197719, 1198721, 1199831, 1199835,\n", + " 1201094, 1199282, 1198458, 1198459, 1198844, 1201577, 1201582, 1197777,\n", + " 1198557, 1197512, 1194866, 1198180, 1195726, 1197430, 1198623, 1195263,\n", + " 1201992, 1195457, 1198306, 1194882, 1195888, 1199171, 1194976, 1195313,\n", + " 1196835, 1198669, 1196165, 1198167, 1196711, 1199823, 1195265, 1195278,\n", + " 1197141, 1197136, 1197366, 1197273, 1194859, 1195846, 1195038, 1198915,\n", + " 1195659, 1195541, 1198207, 1196305, 1195626, 1196393, 1199059, 1199185,\n", + " 1199628, 1197674, 1197676, 1199231, 1201904, 1195017, 1200116, 1194795,\n", + " 1199949, 1195807, 1197611, 1201116, 1196727, 1196734, 1202623, 1200894,\n", + " 1198428, 1198811, 1199555, 1201824, 1201827, 1200503, 1198066, 1198593,\n", + " 1199445, 1201156, 1201056, 1200913, 1201405, 1194803, 1199712, 1201041,\n", + " 1201492, 1202499, 1200553, 1203071, 1201721, 1202541, 1199886, 1201757,\n", + " 1197040, 1200692, 1200194, 1201442, 1196256, 1201029, 1199976, 1202707,\n", + " 1201291, 1198466, 1202209, 1202889, 1199925, 1199929, 1201800, 1196963,\n", + " 1196966, 1200793, 1195664, 1198929, 1200684, 1201789, 1195386, 1201321,\n", + " 1197816, 1196597, 1197403, 1199659, 1194730, 1198824, 1199782, 1198819,\n", + " 1200466, 1195070, 1195066, 1197655, 1201365, 1201960, 1197872],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.2872e-01, -1.2329e-04, 6.9476e-01, ..., 1.2898e-01,\n", + " -1.8241e-03, -4.4191e-03],\n", + " [ 1.5011e-01, -1.3253e-04, 7.3237e-01, ..., 1.1072e-01,\n", + " -1.8696e-03, -4.8519e-03],\n", + " [ 1.6725e-01, 3.3701e-02, 7.9337e-01, ..., 1.5143e-01,\n", + " -1.8256e-03, -5.2311e-03],\n", + " ...,\n", + " [ 1.5868e-01, -1.2379e-04, 8.7253e-01, ..., 1.1463e-01,\n", + " -1.8283e-03, -5.6990e-03],\n", + " [ 9.9127e-02, -1.6772e-04, 6.9051e-01, ..., 1.1172e-01,\n", + " -1.6382e-03, -4.4362e-03],\n", + " [ 1.6080e-01, 1.7755e-02, 8.0996e-01, ..., 1.2146e-01,\n", + " -1.6124e-03, -4.8144e-03]], device='cuda:0'), 'paper': tensor([[ 1.5717e+00, 1.5430e+00, 3.5637e+00, ..., 1.3510e+00,\n", + " -4.5979e-02, 2.4665e+00],\n", + " [-6.1295e-04, 2.7894e-02, 2.9825e+00, ..., -6.4898e-03,\n", + " -2.8191e-02, -1.1624e-02],\n", + " [ 6.0932e-01, 5.5024e-01, 1.6359e+00, ..., -6.6373e-03,\n", + " -1.9979e-02, -1.6293e-03],\n", + " ...,\n", + " [ 1.1491e+00, 6.9976e-01, 4.3543e+00, ..., 3.5792e-01,\n", + " -4.8781e-02, 1.1177e+00],\n", + " [ 1.5123e+00, 1.0991e+00, 2.9213e+00, ..., 9.3083e-01,\n", + " -4.1763e-02, 2.2800e+00],\n", + " [ 1.8052e+00, 1.5011e+00, 3.3714e+00, ..., 2.4810e+00,\n", + " -5.7320e-02, 4.0724e+00]], device='cuda:0'), 'author': tensor([[-6.2942e-04, 2.9830e-02, 1.2906e-01, ..., 1.6955e-01,\n", + " -1.0748e-04, -6.7757e-04],\n", + " [-8.5410e-04, 1.9542e-01, 2.9447e-01, ..., 1.9036e+00,\n", + " 1.9091e-01, 7.9892e-02],\n", + " [-1.9428e-03, 2.9374e-01, 2.7768e-01, ..., 1.6352e+00,\n", + " -1.0820e-03, -8.2422e-04],\n", + " ...,\n", + " [-1.5352e-03, 3.6787e-01, 1.7827e-01, ..., 1.6608e+00,\n", + " -2.9783e-04, -1.8092e-04],\n", + " [-1.0534e-03, 1.8817e-01, 2.5647e-01, ..., 1.7018e+00,\n", + " 1.4196e-01, 7.1753e-02],\n", + " [-1.3743e-03, 2.7496e-01, 1.9719e-01, ..., 1.6351e+00,\n", + " 5.7165e-02, 4.3624e-02]], device='cuda:0'), 'field_of_study': tensor([[ 0.0508, 0.7132, 0.3974, ..., -0.0089, 0.3456, 0.4069],\n", + " [ 0.0195, 0.7504, 0.4123, ..., -0.0094, 0.3786, 0.4867],\n", + " [ 0.1407, 0.8652, 0.4476, ..., -0.0096, 0.3740, 0.3416],\n", + " ...,\n", + " [ 0.0212, 0.8466, 0.5391, ..., -0.0115, 0.4381, 0.5852],\n", + " [ 0.2442, 0.8352, 0.5578, ..., -0.0076, 0.3454, 0.0527],\n", + " [ 0.0603, 0.8582, 0.4097, ..., -0.0112, 0.5654, 0.3104]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 61, 57, 160, 160, 37, 37, 105, 68, 68, 15, 452, 303,\n", + " 326, 377, 340, 221, 964, 756, 640, 741, 507, 507, 552, 663,\n", + " 663, 552, 762, 762, 753, 995, 1067, 1067, 1067, 1067, 1069, 1079,\n", + " 1372, 1097, 926, 926, 1129, 1201, 1201, 1326, 1197, 1512, 1466, 1466,\n", + " 1632, 1427, 1466, 1466, 1459, 1560, 1687, 1587, 1587, 1587, 1749, 1823,\n", + " 1788, 1688, 1688, 1688, 1845, 1845, 1911, 1753, 2096, 2049, 2049, 1880,\n", + " 1981, 1910, 2096, 2176, 2090, 1966, 2199, 2062, 2178, 2178, 2305, 2445,\n", + " 2390, 2392, 2392, 2344, 2344, 2344, 2344, 2344, 2474, 2417, 2629, 2637,\n", + " 2637, 2615, 2475, 2621, 2581, 2578, 2510, 2562, 2747, 2843, 2614, 2807,\n", + " 2807, 2807, 2807, 2889, 2808, 2796, 2997, 3117, 3240, 3238, 3238, 3238,\n", + " 3238, 3275, 3336, 3388, 3423, 3336, 3336, 3336, 3416, 4122, 3485, 3659,\n", + " 3806, 4042, 3898, 3795, 3713, 3928, 3782, 4086, 4018, 4211, 4181, 4225,\n", + " 4350, 4313, 4277, 4417, 4417, 4381, 4427, 4405, 4412, 4571, 4724, 4794,\n", + " 4689, 4817, 4800, 4793, 4579, 4803, 4803, 4781, 5083, 5039, 4849, 5133,\n", + " 5139, 5107, 5048, 5048, 5308, 5157, 5368, 5443, 5443, 5611, 5466, 5726,\n", + " 5407, 5762, 5880, 5916, 5785, 5785, 5768, 6130, 6130, 5942, 6303, 6303,\n", + " 6175, 6193],\n", + " [ 93, 31, 71, 68, 15, 24, 10, 11, 5, 64, 113, 68,\n", + " 100, 106, 123, 59, 84, 43, 111, 46, 113, 105, 73, 38,\n", + " 6, 128, 88, 82, 95, 36, 49, 22, 41, 52, 54, 130,\n", + " 48, 68, 17, 19, 87, 9, 66, 34, 76, 68, 89, 7,\n", + " 23, 107, 112, 72, 133, 133, 23, 94, 131, 120, 44, 133,\n", + " 125, 104, 24, 120, 3, 23, 133, 23, 92, 115, 9, 60,\n", + " 68, 133, 122, 127, 25, 37, 56, 129, 23, 96, 0, 121,\n", + " 66, 58, 21, 113, 105, 12, 57, 67, 134, 86, 99, 118,\n", + " 9, 42, 23, 62, 70, 78, 74, 110, 71, 119, 101, 127,\n", + " 3, 102, 98, 115, 47, 79, 28, 123, 68, 23, 9, 103,\n", + " 4, 68, 27, 132, 45, 83, 104, 29, 35, 116, 32, 81,\n", + " 112, 114, 2, 13, 45, 45, 69, 25, 58, 45, 63, 101,\n", + " 101, 39, 108, 8, 26, 80, 109, 16, 30, 40, 90, 87,\n", + " 81, 68, 124, 39, 9, 51, 91, 40, 50, 50, 85, 55,\n", + " 23, 65, 68, 44, 117, 77, 39, 53, 33, 18, 69, 61,\n", + " 73, 0, 126, 1, 100, 24, 55, 15, 24, 20, 97, 44,\n", + " 75, 14]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3578, 3214, 3827, ..., 4693, 5091, 3827],\n", + " [ 3, 27, 14, ..., 6940, 6943, 7034]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 24, 21, 129, ..., 9, 42, 110],\n", + " [ 60, 14, 49, ..., 6298, 6352, 6312]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 163, 163, 163, ..., 6935, 6935, 6935],\n", + " [ 280, 525, 57, ..., 456, 74, 391]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 313, 514, 261, ..., 261, 261, 389],\n", + " [ 41, 13, 101, ..., 6990, 6998, 6870]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2691, 21, 4988, ..., 5209, 3593, 3308],\n", + " [ 92, 167, 125, ..., 6289, 6293, 6327]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 14, 14, 14, ..., 7046, 7046, 7046],\n", + " [ 223, 539, 1034, ..., 299, 2821, 4890]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 61, 61, 126, ..., 6213, 6213, 6213],\n", + " [1156, 1571, 4865, ..., 5964, 5548, 5146]], device='cuda:0')}\n", + "Epoch: 004, Loss: 0.8498, Train: 488.7000\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005524\n", + "sampling 0.004975\n", + "noi time: 0.001565\n", + "get_vertex_data call: 0.076151\n", + "noi group time: 0.003668\n", + "eoi_group_time: 0.015828\n", + "second half: 0.258141\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 18191, 31145, 24187, ..., 1119684, 1118692, 1118700],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 18191, 31145, 24187, ..., 1119684, 1118692, 1118700],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210831, 1221602, 1221611, ..., 1927249, 1933696, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210831, 1221602, 1221611, ..., 1927249, 1933696, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1137212, 1141424, 1136228, 1140285, 1135926, 1140785, 1141758,\n", + " 1136223, 1136213, 1141251, 1140297, 1142518, 1136969, 1141443, 1145373,\n", + " 1146977, 1145992, 1137271, 1138932, 1139141, 1143372, 1139241, 1140781,\n", + " 1140776, 1142963, 1139866, 1134934, 1149216, 1142953, 1155689, 1143820,\n", + " 1149636, 1147473, 1147477, 1141882, 1135989, 1142881, 1153940, 1144636,\n", + " 1144632, 1148520, 1135262, 1134701, 1148346, 1146656, 1148546, 1153220,\n", + " 1136742, 1147101, 1137225, 1147211, 1150329, 1152416, 1152417, 1138742,\n", + " 1134657, 1140540, 1137254, 1138366, 1151520, 1140149, 1134735, 1140020,\n", + " 1135367, 1135202, 1134970, 1141036, 1134794, 1135956, 1136520, 1138504,\n", + " 1137329, 1143069, 1137682, 1137693, 1136619, 1144395, 1137529, 1137534,\n", + " 1152371, 1136662, 1137441, 1143321, 1137480, 1137025, 1136204, 1135265,\n", + " 1156159, 1141703, 1135977, 1135579, 1142593, 1148860, 1140970, 1140712,\n", + " 1138524, 1137953, 1137960, 1138584, 1156965, 1137019, 1137022, 1135522,\n", + " 1135535, 1136365, 1157703, 1138436, 1138445, 1138461, 1138462, 1137493,\n", + " 1136594, 1135121, 1158386, 1158390, 1149328, 1138847, 1160822, 1135359,\n", + " 1135347, 1138185, 1158984, 1158987, 1145843, 1148531, 1137119, 1135772,\n", + " 1139667, 1139668, 1139673, 1138067, 1140256, 1134992, 1142784, 1152651,\n", + " 1136734, 1158971, 1159009, 1159019, 1141065, 1153544, 1140849, 1143631,\n", + " 1140036, 1139933, 1141963, 1141984, 1152044, 1139069, 1137734, 1137728,\n", + " 1137731, 1147317, 1136993, 1135547, 1135549, 1141088, 1141102, 1149001,\n", + " 1139899, 1143767, 1143775, 1154851, 1154860, 1137297, 1162705, 1137678,\n", + " 1139025, 1140003, 1149979, 1146839, 1141695, 1135860, 1136418, 1136426,\n", + " 1136631, 1141224, 1141648, 1141661, 1136917, 1145065, 1145066, 1144237,\n", + " 1141155, 1146449, 1141786, 1139495, 1136755, 1134979, 1134987, 1137087,\n", + " 1142053, 1141821, 1143153, 1142080, 1145161, 1158742, 1158749, 1138708,\n", + " 1140110, 1142913, 1137661, 1143107, 1143113, 1148443, 1144596, 1142843,\n", + " 1136866, 1144041, 1140882, 1140447, 1144182, 1137606, 1146201, 1137364,\n", + " 1138539, 1137843, 1147153, 1147163, 1142640, 1141365, 1141367, 1141375,\n", + " 1141678, 1149088, 1149093, 1149101, 1138292, 1144284, 1144279, 1143904,\n", + " 1143917, 1139510, 1139763, 1139127, 1145001, 1140619, 1140976, 1140990,\n", + " 1135047, 1141560, 1147047, 1152976, 1152982, 1152988, 1160248, 1141925,\n", + " 1144242, 1140580, 1140696, 1139405, 1143637, 1137570, 1134851, 1145974,\n", + " 1143851, 1146019, 1146024, 1146017, 1154328, 1142533, 1149928, 1139990,\n", + " 1146302, 1143293, 1147543, 1147540, 1147150, 1147282, 1142816, 1138660,\n", + " 1149366, 1143040, 1144912, 1144923, 1138927, 1157720, 1136836, 1139328,\n", + " 1139055, 1139046, 1144950, 1142159, 1143345, 1144766, 1144619, 1144083,\n", + " 1135876, 1138004, 1150919, 1146514, 1146523, 1143958, 1143960, 1143456,\n", + " 1143457, 1146636, 1147521, 1140364, 1137999, 1143080, 1143082, 1166410,\n", + " 1144219, 1144222, 1147988, 1147999, 1134907, 1139252, 1148704, 1148709,\n", + " 1141319, 1141836, 1143434, 1147025, 1143824, 1147249, 1147971, 1141127,\n", + " 1145009, 1139549, 1158226, 1158228, 1147880, 1154526, 1142369, 1146159,\n", + " 1146178, 1151242, 1148223, 1152530, 1150274, 1151182, 1150445, 1148928,\n", + " 1154998, 1154446, 1149791, 1144526, 1151480, 1152022, 1145255, 1145262,\n", + " 1140400, 1147019, 1153956, 1158944, 1146772, 1141198, 1141269, 1149984,\n", + " 1147653, 1143560, 1149412, 1148300, 1147856, 1147866, 1139097, 1151415,\n", + " 1154420, 1158786, 1148180, 1148181, 1151363, 1146676, 1146686, 1152494,\n", + " 1157983, 1157974, 1148725, 1148729, 1145861, 1166312, 1143971, 1148204,\n", + " 1154203, 1154206, 1154196, 1153124, 1153192, 1153197, 1159828, 1150935,\n", + " 1148049, 1152878, 1150356, 1155088, 1169439, 1151816, 1152581, 1154183,\n", + " 1148498, 1141420, 1136002, 1151352, 1147737, 1153449, 1145080, 1146265,\n", + " 1146266, 1148949, 1146969, 1146974, 1150219, 1146623, 1151403, 1142986,\n", + " 1144476, 1152409, 1152100, 1153027, 1153030, 1153038, 1137746, 1146304,\n", + " 1140521, 1149203, 1152819, 1152826, 1155330, 1155337, 1154119, 1154120,\n", + " 1154123, 1157839, 1152673, 1164761, 1151617, 1150578, 1145278, 1136131,\n", + " 1148916, 1148924, 1152944, 1145966, 1138982, 1138989, 1138991, 1152903,\n", + " 1151311, 1138281, 1157141, 1136028, 1158712, 1158704, 1156621, 1152928,\n", + " 1156395, 1152886, 1142777, 1163489, 1137403, 1153907, 1150150, 1150164,\n", + " 1142261, 1148033, 1148040, 1155202, 1161205, 1152601, 1155218, 1155223,\n", + " 1175478, 1149792, 1149794, 1148628, 1148637, 1148633, 1158530, 1148378,\n", + " 1137458, 1149944, 1135706, 1157545, 1157547, 1158860, 1158916, 1156499,\n", + " 1156501, 1156505, 1157064, 1157069, 1155418, 1152833, 1145191, 1145187,\n", + " 1139473, 1143491, 1151260, 1152179, 1156638, 1150824, 1150828, 1156935,\n", + " 1153421, 1157779, 1139525, 1158304, 1158308, 1158311, 1151271, 1155441,\n", + " 1150130, 1150132, 1162114, 1162120, 1144361, 1140878, 1145760, 1142755,\n", + " 1151379, 1155122, 1155130, 1160394, 1152519, 1157183, 1149321, 1153476,\n", + " 1145806, 1156460, 1154763, 1155628, 1155630, 1156563, 1154555, 1158823,\n", + " 1158824, 1153715, 1157323, 1148836, 1148838, 1155646, 1153365, 1159305,\n", + " 1143261, 1154243, 1154250, 1160103, 1151325, 1154909, 1143189, 1143521,\n", + " 1150371, 1157439, 1141620, 1150990, 1150987, 1157933, 1137167, 1137152,\n", + " 1158126, 1156765, 1158192, 1158204, 1137381, 1159116, 1140913, 1134685,\n", + " 1135601, 1145507, 1150661, 1150659, 1158665, 1146320, 1159253, 1156692,\n", + " 1140381, 1140374, 1156023, 1157732, 1144843, 1155975, 1142074, 1158841,\n", + " 1158846, 1156812, 1162538, 1161473, 1161480, 1155393, 1149696, 1154600,\n", + " 1154601, 1153503, 1136896, 1158880, 1158882, 1158815, 1158438, 1156778,\n", + " 1158286, 1155237, 1151615, 1136480, 1136494, 1164181, 1147599, 1152134,\n", + " 1156495, 1156488, 1153808, 1136640, 1136646, 1140049, 1142178, 1158545,\n", + " 1151144, 1146126, 1138110, 1155535, 1155528, 1135654, 1135658, 1142666,\n", + " 1164154, 1150684, 1156045, 1159042, 1159052, 1157944, 1153052, 1153045,\n", + " 1163072, 1153842, 1160652, 1150046, 1149070, 1155475, 1155479, 1153514,\n", + " 1153519, 1138161, 1164006, 1156787, 1156795, 1149963, 1163381, 1154590,\n", + " 1139286, 1139290, 1166073, 1159552, 1171257, 1160178, 1165306, 1169489,\n", + " 1140641, 1143138, 1168162, 1156352, 1156177, 1156181, 1159025, 1159029,\n", + " 1159032, 1159038, 1171366, 1152247, 1143729, 1143735, 1151227, 1153932,\n", + " 1148562, 1147835, 1146500, 1153247, 1164580, 1161239, 1161240, 1144739,\n", + " 1168067, 1141471, 1147427, 1182242, 1156739, 1156741, 1165172, 1150649,\n", + " 1168748, 1144810, 1144812, 1167253, 1153268, 1145740, 1145743, 1145738,\n", + " 1163935, 1145567, 1145228, 1155324, 1144973, 1143028, 1143037, 1166063,\n", + " 1152624, 1145900, 1145902, 1153520, 1152203, 1175240, 1158722, 1154070,\n", + " 1154076, 1147330, 1147339, 1147341, 1147338, 1145677, 1150781, 1162892,\n", + " 1166653, 1169220, 1169300, 1169298, 1155172, 1144336, 1157532, 1157534,\n", + " 1147746, 1169162, 1157331, 1138130, 1138131, 1193662, 1141045, 1141043,\n", + " 1154364, 1158611, 1158623, 1158051, 1158062, 1173047, 1165903, 1178729,\n", + " 1154869, 1147416, 1176615, 1152353, 1169186, 1168400, 1149402, 1148667,\n", + " 1175997, 1168898, 1147516, 1168474, 1173307, 1145033, 1160935, 1169144,\n", + " 1154018, 1154027, 1154028, 1172787, 1159655, 1151696, 1157153, 1177404,\n", + " 1157373, 1167239, 1147711, 1151850, 1148128, 1157599, 1163772, 1177415,\n", + " 1172961, 1168697, 1140326, 1170016, 1166346, 1179880, 1144550, 1153429,\n", + " 1174366, 1171823, 1171815, 1174119, 1177112, 1154148, 1169409, 1158176,\n", + " 1158187, 1167517, 1149169, 1149173, 1170125, 1181601, 1169979, 1179245,\n", + " 1181095, 1178082, 1170179, 1153803, 1178171, 1171122, 1179727, 1185440,\n", + " 1158030, 1180200, 1166554, 1178921, 1161255, 1155262, 1172010, 1186766,\n", + " 1157792, 1157803, 1143341, 1171623, 1163231, 1157126, 1177312, 1164073,\n", + " 1158249, 1153898, 1153893, 1191749, 1164564, 1145626, 1154834, 1179453,\n", + " 1153601, 1157770, 1179783, 1182690, 1158512, 1158524, 1158940, 1158381,\n", + " 1158379, 1140397, 1140393, 1167762, 1168886, 1165487, 1186712, 1162253,\n", + " 1162376, 1184405, 1164232, 1179096, 1163422, 1183723, 1154957, 1161819,\n", + " 1166772, 1180019, 1159532, 1164130, 1171015, 1184050, 1156528, 1139828,\n", + " 1139831, 1154812, 1180847, 1149668, 1164677, 1186539, 1156055, 1178555,\n", + " 1179686, 1146394, 1173058, 1172374, 1149544, 1190292, 1188233, 1191968,\n", + " 1159083, 1167435, 1182922, 1194482, 1191054, 1177484, 1169964, 1168683,\n", + " 1140993, 1141001, 1141006, 1182058, 1174546, 1186017, 1178981, 1153733,\n", + " 1152117, 1183630, 1192947, 1162502, 1169707, 1181824, 1166841, 1194294,\n", + " 1182519, 1177365, 1177842, 1175349, 1150406, 1167089, 1179317, 1177285,\n", + " 1156681, 1158064, 1145395, 1170168, 1155958, 1155962, 1194255, 1178460,\n", + " 1178304, 1188964, 1172897, 1189958, 1192929, 1190222, 1182852, 1174699,\n", + " 1161940], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1137212, 1141424, 1136228, 1140285, 1135926, 1140785, 1141758,\n", + " 1136223, 1136213, 1141251, 1140297, 1142518, 1136969, 1141443, 1145373,\n", + " 1146977, 1145992, 1137271, 1138932, 1139141, 1143372, 1139241, 1140781,\n", + " 1140776, 1142963, 1139866, 1134934, 1149216, 1142953, 1155689, 1143820,\n", + " 1149636, 1147473, 1147477, 1141882, 1135989, 1142881, 1153940, 1144636,\n", + " 1144632, 1148520, 1135262, 1134701, 1148346, 1146656, 1148546, 1153220,\n", + " 1136742, 1147101, 1137225, 1147211, 1150329, 1152416, 1152417, 1138742,\n", + " 1134657, 1140540, 1137254, 1138366, 1151520, 1140149, 1134735, 1140020,\n", + " 1135367, 1135202, 1134970, 1141036, 1134794, 1135956, 1136520, 1138504,\n", + " 1137329, 1143069, 1137682, 1137693, 1136619, 1144395, 1137529, 1137534,\n", + " 1152371, 1136662, 1137441, 1143321, 1137480, 1137025, 1136204, 1135265,\n", + " 1156159, 1141703, 1135977, 1135579, 1142593, 1148860, 1140970, 1140712,\n", + " 1138524, 1137953, 1137960, 1138584, 1156965, 1137019, 1137022, 1135522,\n", + " 1135535, 1136365, 1157703, 1138436, 1138445, 1138461, 1138462, 1137493,\n", + " 1136594, 1135121, 1158386, 1158390, 1149328, 1138847, 1160822, 1135359,\n", + " 1135347, 1138185, 1158984, 1158987, 1145843, 1148531, 1137119, 1135772,\n", + " 1139667, 1139668, 1139673, 1138067, 1140256, 1134992, 1142784, 1152651,\n", + " 1136734, 1158971, 1159009, 1159019, 1141065, 1153544, 1140849, 1143631,\n", + " 1140036, 1139933, 1141963, 1141984, 1152044, 1139069, 1137734, 1137728,\n", + " 1137731, 1147317, 1136993, 1135547, 1135549, 1141088, 1141102, 1149001,\n", + " 1139899, 1143767, 1143775, 1154851, 1154860, 1137297, 1162705, 1137678,\n", + " 1139025, 1140003, 1149979, 1146839, 1141695, 1135860, 1136418, 1136426,\n", + " 1136631, 1141224, 1141648, 1141661, 1136917, 1145065, 1145066, 1144237,\n", + " 1141155, 1146449, 1141786, 1139495, 1136755, 1134979, 1134987, 1137087,\n", + " 1142053, 1141821, 1143153, 1142080, 1145161, 1158742, 1158749, 1138708,\n", + " 1140110, 1142913, 1137661, 1143107, 1143113, 1148443, 1144596, 1142843,\n", + " 1136866, 1144041, 1140882, 1140447, 1144182, 1137606, 1146201, 1137364,\n", + " 1138539, 1137843, 1147153, 1147163, 1142640, 1141365, 1141367, 1141375,\n", + " 1141678, 1149088, 1149093, 1149101, 1138292, 1144284, 1144279, 1143904,\n", + " 1143917, 1139510, 1139763, 1139127, 1145001, 1140619, 1140976, 1140990,\n", + " 1135047, 1141560, 1147047, 1152976, 1152982, 1152988, 1160248, 1141925,\n", + " 1144242, 1140580, 1140696, 1139405, 1143637, 1137570, 1134851, 1145974,\n", + " 1143851, 1146019, 1146024, 1146017, 1154328, 1142533, 1149928, 1139990,\n", + " 1146302, 1143293, 1147543, 1147540, 1147150, 1147282, 1142816, 1138660,\n", + " 1149366, 1143040, 1144912, 1144923, 1138927, 1157720, 1136836, 1139328,\n", + " 1139055, 1139046, 1144950, 1142159, 1143345, 1144766, 1144619, 1144083,\n", + " 1135876, 1138004, 1150919, 1146514, 1146523, 1143958, 1143960, 1143456,\n", + " 1143457, 1146636, 1147521, 1140364, 1137999, 1143080, 1143082, 1166410,\n", + " 1144219, 1144222, 1147988, 1147999, 1134907, 1139252, 1148704, 1148709,\n", + " 1141319, 1141836, 1143434, 1147025, 1143824, 1147249, 1147971, 1141127,\n", + " 1145009, 1139549, 1158226, 1158228, 1147880, 1154526, 1142369, 1146159,\n", + " 1146178, 1151242, 1148223, 1152530, 1150274, 1151182, 1150445, 1148928,\n", + " 1154998, 1154446, 1149791, 1144526, 1151480, 1152022, 1145255, 1145262,\n", + " 1140400, 1147019, 1153956, 1158944, 1146772, 1141198, 1141269, 1149984,\n", + " 1147653, 1143560, 1149412, 1148300, 1147856, 1147866, 1139097, 1151415,\n", + " 1154420, 1158786, 1148180, 1148181, 1151363, 1146676, 1146686, 1152494,\n", + " 1157983, 1157974, 1148725, 1148729, 1145861, 1166312, 1143971, 1148204,\n", + " 1154203, 1154206, 1154196, 1153124, 1153192, 1153197, 1159828, 1150935,\n", + " 1148049, 1152878, 1150356, 1155088, 1169439, 1151816, 1152581, 1154183,\n", + " 1148498, 1141420, 1136002, 1151352, 1147737, 1153449, 1145080, 1146265,\n", + " 1146266, 1148949, 1146969, 1146974, 1150219, 1146623, 1151403, 1142986,\n", + " 1144476, 1152409, 1152100, 1153027, 1153030, 1153038, 1137746, 1146304,\n", + " 1140521, 1149203, 1152819, 1152826, 1155330, 1155337, 1154119, 1154120,\n", + " 1154123, 1157839, 1152673, 1164761, 1151617, 1150578, 1145278, 1136131,\n", + " 1148916, 1148924, 1152944, 1145966, 1138982, 1138989, 1138991, 1152903,\n", + " 1151311, 1138281, 1157141, 1136028, 1158712, 1158704, 1156621, 1152928,\n", + " 1156395, 1152886, 1142777, 1163489, 1137403, 1153907, 1150150, 1150164,\n", + " 1142261, 1148033, 1148040, 1155202, 1161205, 1152601, 1155218, 1155223,\n", + " 1175478, 1149792, 1149794, 1148628, 1148637, 1148633, 1158530, 1148378,\n", + " 1137458, 1149944, 1135706, 1157545, 1157547, 1158860, 1158916, 1156499,\n", + " 1156501, 1156505, 1157064, 1157069, 1155418, 1152833, 1145191, 1145187,\n", + " 1139473, 1143491, 1151260, 1152179, 1156638, 1150824, 1150828, 1156935,\n", + " 1153421, 1157779, 1139525, 1158304, 1158308, 1158311, 1151271, 1155441,\n", + " 1150130, 1150132, 1162114, 1162120, 1144361, 1140878, 1145760, 1142755,\n", + " 1151379, 1155122, 1155130, 1160394, 1152519, 1157183, 1149321, 1153476,\n", + " 1145806, 1156460, 1154763, 1155628, 1155630, 1156563, 1154555, 1158823,\n", + " 1158824, 1153715, 1157323, 1148836, 1148838, 1155646, 1153365, 1159305,\n", + " 1143261, 1154243, 1154250, 1160103, 1151325, 1154909, 1143189, 1143521,\n", + " 1150371, 1157439, 1141620, 1150990, 1150987, 1157933, 1137167, 1137152,\n", + " 1158126, 1156765, 1158192, 1158204, 1137381, 1159116, 1140913, 1134685,\n", + " 1135601, 1145507, 1150661, 1150659, 1158665, 1146320, 1159253, 1156692,\n", + " 1140381, 1140374, 1156023, 1157732, 1144843, 1155975, 1142074, 1158841,\n", + " 1158846, 1156812, 1162538, 1161473, 1161480, 1155393, 1149696, 1154600,\n", + " 1154601, 1153503, 1136896, 1158880, 1158882, 1158815, 1158438, 1156778,\n", + " 1158286, 1155237, 1151615, 1136480, 1136494, 1164181, 1147599, 1152134,\n", + " 1156495, 1156488, 1153808, 1136640, 1136646, 1140049, 1142178, 1158545,\n", + " 1151144, 1146126, 1138110, 1155535, 1155528, 1135654, 1135658, 1142666,\n", + " 1164154, 1150684, 1156045, 1159042, 1159052, 1157944, 1153052, 1153045,\n", + " 1163072, 1153842, 1160652, 1150046, 1149070, 1155475, 1155479, 1153514,\n", + " 1153519, 1138161, 1164006, 1156787, 1156795, 1149963, 1163381, 1154590,\n", + " 1139286, 1139290, 1166073, 1159552, 1171257, 1160178, 1165306, 1169489,\n", + " 1140641, 1143138, 1168162, 1156352, 1156177, 1156181, 1159025, 1159029,\n", + " 1159032, 1159038, 1171366, 1152247, 1143729, 1143735, 1151227, 1153932,\n", + " 1148562, 1147835, 1146500, 1153247, 1164580, 1161239, 1161240, 1144739,\n", + " 1168067, 1141471, 1147427, 1182242, 1156739, 1156741, 1165172, 1150649,\n", + " 1168748, 1144810, 1144812, 1167253, 1153268, 1145740, 1145743, 1145738,\n", + " 1163935, 1145567, 1145228, 1155324, 1144973, 1143028, 1143037, 1166063,\n", + " 1152624, 1145900, 1145902, 1153520, 1152203, 1175240, 1158722, 1154070,\n", + " 1154076, 1147330, 1147339, 1147341, 1147338, 1145677, 1150781, 1162892,\n", + " 1166653, 1169220, 1169300, 1169298, 1155172, 1144336, 1157532, 1157534,\n", + " 1147746, 1169162, 1157331, 1138130, 1138131, 1193662, 1141045, 1141043,\n", + " 1154364, 1158611, 1158623, 1158051, 1158062, 1173047, 1165903, 1178729,\n", + " 1154869, 1147416, 1176615, 1152353, 1169186, 1168400, 1149402, 1148667,\n", + " 1175997, 1168898, 1147516, 1168474, 1173307, 1145033, 1160935, 1169144,\n", + " 1154018, 1154027, 1154028, 1172787, 1159655, 1151696, 1157153, 1177404,\n", + " 1157373, 1167239, 1147711, 1151850, 1148128, 1157599, 1163772, 1177415,\n", + " 1172961, 1168697, 1140326, 1170016, 1166346, 1179880, 1144550, 1153429,\n", + " 1174366, 1171823, 1171815, 1174119, 1177112, 1154148, 1169409, 1158176,\n", + " 1158187, 1167517, 1149169, 1149173, 1170125, 1181601, 1169979, 1179245,\n", + " 1181095, 1178082, 1170179, 1153803, 1178171, 1171122, 1179727, 1185440,\n", + " 1158030, 1180200, 1166554, 1178921, 1161255, 1155262, 1172010, 1186766,\n", + " 1157792, 1157803, 1143341, 1171623, 1163231, 1157126, 1177312, 1164073,\n", + " 1158249, 1153898, 1153893, 1191749, 1164564, 1145626, 1154834, 1179453,\n", + " 1153601, 1157770, 1179783, 1182690, 1158512, 1158524, 1158940, 1158381,\n", + " 1158379, 1140397, 1140393, 1167762, 1168886, 1165487, 1186712, 1162253,\n", + " 1162376, 1184405, 1164232, 1179096, 1163422, 1183723, 1154957, 1161819,\n", + " 1166772, 1180019, 1159532, 1164130, 1171015, 1184050, 1156528, 1139828,\n", + " 1139831, 1154812, 1180847, 1149668, 1164677, 1186539, 1156055, 1178555,\n", + " 1179686, 1146394, 1173058, 1172374, 1149544, 1190292, 1188233, 1191968,\n", + " 1159083, 1167435, 1182922, 1194482, 1191054, 1177484, 1169964, 1168683,\n", + " 1140993, 1141001, 1141006, 1182058, 1174546, 1186017, 1178981, 1153733,\n", + " 1152117, 1183630, 1192947, 1162502, 1169707, 1181824, 1166841, 1194294,\n", + " 1182519, 1177365, 1177842, 1175349, 1150406, 1167089, 1179317, 1177285,\n", + " 1156681, 1158064, 1145395, 1170168, 1155958, 1155962, 1194255, 1178460,\n", + " 1178304, 1188964, 1172897, 1189958, 1192929, 1190222, 1182852, 1174699,\n", + " 1161940], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195452, 1195202, 1197451, 1199282, 1198459, 1202255, 1201577, 1201582,\n", + " 1194626, 1195946, 1198624, 1198633, 1202804, 1194967, 1198557, 1196573,\n", + " 1198182, 1194780, 1196631, 1195514, 1195263, 1201992, 1195187, 1196030,\n", + " 1196031, 1198542, 1198543, 1197706, 1199519, 1198095, 1195469, 1196911,\n", + " 1198668, 1197793, 1198367, 1195982, 1198161, 1196711, 1196717, 1195265,\n", + " 1195270, 1195278, 1196247, 1197272, 1196109, 1194859, 1195541, 1197256,\n", + " 1195748, 1195783, 1200037, 1195918, 1196283, 1197313, 1198280, 1198282,\n", + " 1200949, 1199856, 1202005, 1196851, 1199685, 1199628, 1199231, 1199676,\n", + " 1194795, 1201511, 1196498, 1196727, 1202618, 1198416, 1198428, 1199489,\n", + " 1199555, 1201547, 1201824, 1199445, 1201421, 1201156, 1201056, 1194803,\n", + " 1202641, 1196655, 1200555, 1200429, 1202542, 1199886, 1200690, 1199908,\n", + " 1196779, 1202239, 1200899, 1202338, 1198478, 1200398, 1200784, 1201125,\n", + " 1195676, 1195679, 1195664, 1195000, 1198055, 1198929, 1200684, 1198909,\n", + " 1197811, 1197816, 1201484, 1196597, 1195285, 1199659, 1201138, 1198824,\n", + " 1200011, 1198817, 1199234, 1201880, 1200301, 1197655, 1200707, 1197335,\n", + " 1197035, 1195165, 1194908, 1203162, 1196424, 1197872], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195452, 1195202, 1197451, 1199282, 1198459, 1202255, 1201577, 1201582,\n", + " 1194626, 1195946, 1198624, 1198633, 1202804, 1194967, 1198557, 1196573,\n", + " 1198182, 1194780, 1196631, 1195514, 1195263, 1201992, 1195187, 1196030,\n", + " 1196031, 1198542, 1198543, 1197706, 1199519, 1198095, 1195469, 1196911,\n", + " 1198668, 1197793, 1198367, 1195982, 1198161, 1196711, 1196717, 1195265,\n", + " 1195270, 1195278, 1196247, 1197272, 1196109, 1194859, 1195541, 1197256,\n", + " 1195748, 1195783, 1200037, 1195918, 1196283, 1197313, 1198280, 1198282,\n", + " 1200949, 1199856, 1202005, 1196851, 1199685, 1199628, 1199231, 1199676,\n", + " 1194795, 1201511, 1196498, 1196727, 1202618, 1198416, 1198428, 1199489,\n", + " 1199555, 1201547, 1201824, 1199445, 1201421, 1201156, 1201056, 1194803,\n", + " 1202641, 1196655, 1200555, 1200429, 1202542, 1199886, 1200690, 1199908,\n", + " 1196779, 1202239, 1200899, 1202338, 1198478, 1200398, 1200784, 1201125,\n", + " 1195676, 1195679, 1195664, 1195000, 1198055, 1198929, 1200684, 1198909,\n", + " 1197811, 1197816, 1201484, 1196597, 1195285, 1199659, 1201138, 1198824,\n", + " 1200011, 1198817, 1199234, 1201880, 1200301, 1197655, 1200707, 1197335,\n", + " 1197035, 1195165, 1194908, 1203162, 1196424, 1197872], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 1.5725e-01, 1.0108e-02, 7.0136e-01, ..., 1.3788e-01,\n", + " -2.0843e-03, -4.7914e-03],\n", + " [ 1.5824e-01, 2.0613e-02, 8.1405e-01, ..., 1.4357e-01,\n", + " -1.6051e-03, -5.3294e-03],\n", + " [ 9.7420e-02, -3.4516e-04, 6.9431e-01, ..., 1.6006e-01,\n", + " -2.1403e-03, -4.3729e-03],\n", + " ...,\n", + " [ 2.1941e-01, -2.4732e-04, 8.9885e-01, ..., 9.5989e-02,\n", + " -1.7138e-03, -6.0594e-03],\n", + " [ 1.1500e-01, 5.4979e-02, 6.3607e-01, ..., 1.2768e-01,\n", + " -1.6795e-03, -3.9530e-03],\n", + " [ 2.4567e-01, -5.1800e-04, 9.2963e-01, ..., 7.7239e-02,\n", + " -1.7047e-03, -6.4968e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 9.3941e-01, 9.3312e-01, 4.0129e+00, ..., 1.7643e-01,\n", + " -4.3981e-02, 8.2033e-01],\n", + " [-5.2388e-03, -1.6200e-02, 4.6586e+00, ..., -1.2587e-02,\n", + " -4.0808e-02, -2.3565e-02],\n", + " [ 1.9329e+00, 2.0154e+00, 2.7273e+00, ..., 3.9736e-01,\n", + " -3.4753e-02, 2.3263e+00],\n", + " ...,\n", + " [ 7.6877e-01, 9.9148e-01, 1.6782e+00, ..., -3.3780e-03,\n", + " -2.3555e-02, 5.5100e-01],\n", + " [ 1.4118e+00, 1.0912e+00, 4.8906e+00, ..., 1.2484e-01,\n", + " -4.6183e-02, 8.7255e-01],\n", + " [ 1.1352e+00, 9.8890e-01, 2.5930e+00, ..., 1.9419e+00,\n", + " -4.9504e-02, 2.8835e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-6.0988e-03, 5.2008e-01, 2.2164e-01, ..., 1.3555e+00,\n", + " -2.3537e-03, -4.3073e-03],\n", + " [-1.5842e-03, 3.4898e-01, 2.1646e-01, ..., 1.7363e+00,\n", + " -1.3637e-04, 5.0981e-03],\n", + " [-1.5439e-03, 2.5322e-01, 2.1591e-01, ..., 1.6338e+00,\n", + " 1.0820e-01, 3.3238e-02],\n", + " ...,\n", + " [-1.1704e-03, 3.5306e-01, 2.3371e-01, ..., 1.7657e+00,\n", + " 1.0883e-02, 4.2804e-02],\n", + " [-1.2625e-03, 3.3212e-01, 1.7230e-01, ..., 1.5389e+00,\n", + " 6.0558e-02, 1.8108e-02],\n", + " [-2.2241e-03, 4.0214e-01, 2.7032e-01, ..., 1.5011e+00,\n", + " -1.6780e-03, -1.4019e-03]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[ 1.3974e-01, 6.8798e-01, 3.6876e-01, ..., -7.4147e-03,\n", + " 2.4673e-01, 3.4897e-01],\n", + " [ 3.7663e-02, 7.2737e-01, 4.3306e-01, ..., -9.1707e-03,\n", + " 2.0163e-01, 5.4989e-01],\n", + " [ 1.2734e-02, 6.3728e-01, 3.6947e-01, ..., -8.5852e-03,\n", + " 2.5820e-01, 4.1700e-01],\n", + " ...,\n", + " [ 1.2916e-01, 6.0151e-01, 2.6098e-01, ..., -6.3384e-03,\n", + " 3.1410e-01, 1.7428e-01],\n", + " [ 9.5491e-02, 7.5612e-01, 4.7055e-01, ..., -9.8168e-03,\n", + " 3.4106e-01, 4.5872e-01],\n", + " [ 4.1889e-01, 1.0074e+00, 6.0315e-01, ..., -8.3570e-03,\n", + " 3.8319e-01, -8.7203e-05]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 40, 4, 96, 4, 4, 4, 119, 119, 343, 348, 327, 327,\n", + " 437, 323, 475, 421, 327, 508, 508, 976, 976, 598, 637, 637,\n", + " 633, 960, 906, 1067, 1065, 1065, 1447, 1234, 1234, 1035, 1060, 1068,\n", + " 1326, 1184, 1184, 1184, 1184, 1184, 1246, 1338, 1291, 1312, 1312, 1312,\n", + " 1312, 1338, 1338, 1449, 1392, 1375, 1375, 1375, 1375, 1375, 1375, 1414,\n", + " 1729, 1527, 1452, 1452, 1537, 1754, 1754, 1631, 1631, 1631, 1747, 1779,\n", + " 1862, 1773, 1979, 1739, 1739, 1875, 1943, 2057, 2284, 2135, 2149, 2149,\n", + " 2246, 2246, 2246, 2168, 2187, 2187, 2168, 2243, 2243, 2336, 2366, 2306,\n", + " 2381, 2660, 2506, 2490, 2493, 2509, 2594, 2594, 2506, 2506, 2807, 2807,\n", + " 2789, 2723, 2686, 2779, 2749, 2716, 2716, 2883, 2887, 2887, 2887, 2887,\n", + " 2871, 2937, 2990, 3064, 3200, 3123, 3383, 3322, 3436, 3357, 3684, 3566,\n", + " 3701, 3515, 3515, 3515, 3640, 3640, 3721, 3742, 3755, 3780, 3937, 3980,\n", + " 4163, 4105, 4349, 4326, 4263, 4297, 4297, 4395, 4480, 4557, 4557, 4610,\n", + " 4557, 4630, 4630, 4589, 4648, 4648, 4867, 4823, 4953, 4782, 4868, 4826,\n", + " 5155, 4943, 5007, 5007, 5038, 5038, 5075, 4963, 5201, 5167, 5285, 5081,\n", + " 5256, 5256, 5235, 5504, 5193, 5370, 5631, 5539],\n", + " [ 3, 11, 107, 94, 83, 82, 37, 32, 35, 58, 67, 38,\n", + " 76, 67, 77, 4, 10, 48, 41, 20, 106, 73, 97, 111,\n", + " 80, 8, 39, 105, 87, 21, 59, 3, 91, 65, 69, 7,\n", + " 3, 88, 92, 102, 122, 117, 17, 98, 2, 27, 87, 21,\n", + " 80, 60, 55, 56, 118, 51, 14, 62, 68, 29, 74, 86,\n", + " 93, 105, 78, 18, 84, 121, 67, 45, 123, 34, 41, 99,\n", + " 52, 93, 31, 22, 3, 49, 53, 23, 111, 2, 6, 88,\n", + " 90, 63, 68, 108, 115, 48, 41, 44, 112, 81, 7, 47,\n", + " 76, 33, 79, 5, 69, 4, 67, 12, 66, 43, 89, 39,\n", + " 9, 0, 2, 16, 3, 76, 101, 47, 78, 90, 18, 22,\n", + " 0, 116, 125, 16, 58, 67, 0, 113, 110, 73, 57, 114,\n", + " 70, 48, 95, 13, 119, 71, 73, 100, 124, 120, 42, 9,\n", + " 75, 19, 32, 61, 9, 85, 117, 17, 40, 3, 21, 112,\n", + " 91, 104, 72, 104, 87, 103, 5, 42, 64, 54, 26, 7,\n", + " 21, 30, 50, 56, 46, 3, 70, 3, 119, 28, 36, 109,\n", + " 25, 1, 96, 24, 23, 5, 15, 64]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 771, 788, 989, ..., 5847, 1188, 2343],\n", + " [ 296, 296, 92, ..., 7384, 7383, 7396]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 37, 48, 30, ..., 67, 38, 2],\n", + " [ 16, 159, 211, ..., 5671, 5660, 5594]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 296, 296, 12, ..., 7350, 7350, 7350],\n", + " [ 403, 137, 109, ..., 901, 767, 797]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 256, 573, 619, ..., 868, 474, 216],\n", + " [ 304, 142, 111, ..., 7385, 7343, 7432]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5324, 2497, 7195, ..., 7105, 7236, 1072],\n", + " [ 22, 66, 35, ..., 5621, 5609, 5589]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 296, 296, 296, ..., 7350, 7350, 7350],\n", + " [ 867, 1032, 1024, ..., 3301, 683, 1953]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 119, 119, 119, ..., 5631, 5666, 5666],\n", + " [ 840, 6771, 6583, ..., 3224, 2700, 3006]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006722\n", + "sampling 0.006564\n", + "noi time: 0.001923\n", + "get_vertex_data call: 0.03699\n", + "noi group time: 0.003543\n", + "eoi_group_time: 0.013909\n", + "second half: 0.214762\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 18181, 519, 31145, ..., 1103850, 1132473, 1120075],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 18181, 519, 31145, ..., 1103850, 1132473, 1120075],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224380, 1203800, 1232974, ..., 1921022, 1934136, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224380, 1203800, 1232974, ..., 1921022, 1934136, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1136230, 1140282, 1135726, 1140785, 1141758, 1134948, 1138335,\n", + " 1136208, 1141251, 1141250, 1142802, 1136969, 1136971, 1141452, 1151164,\n", + " 1143600, 1149839, 1139811, 1145370, 1146991, 1139145, 1143372, 1146647,\n", + " 1139955, 1140781, 1145281, 1139866, 1134937, 1136959, 1148576, 1149216,\n", + " 1142959, 1155683, 1143820, 1149632, 1147473, 1147486, 1135990, 1153936,\n", + " 1153940, 1144632, 1134700, 1146656, 1150193, 1150203, 1146472, 1136112,\n", + " 1136114, 1148546, 1147094, 1155014, 1155018, 1155019, 1139371, 1147211,\n", + " 1136683, 1136685, 1150329, 1152416, 1134718, 1136268, 1134657, 1140540,\n", + " 1138112, 1154414, 1137257, 1137172, 1137180, 1153456, 1140159, 1134720,\n", + " 1134735, 1135909, 1140020, 1135360, 1135367, 1135202, 1134960, 1141036,\n", + " 1134794, 1157443, 1157447, 1138504, 1138510, 1137329, 1137342, 1136181,\n", + " 1143069, 1136619, 1144786, 1144395, 1136821, 1136826, 1137534, 1157397,\n", + " 1152376, 1136662, 1137441, 1156159, 1148481, 1139161, 1141702, 1135583,\n", + " 1141084, 1135827, 1135830, 1140240, 1140970, 1140712, 1138514, 1138524,\n", + " 1153098, 1153099, 1137957, 1158136, 1156965, 1135522, 1138314, 1138436,\n", + " 1138440, 1138445, 1138461, 1138449, 1138462, 1137495, 1149331, 1138846,\n", + " 1135088, 1156602, 1156606, 1147112, 1142611, 1158984, 1148531, 1148533,\n", + " 1137104, 1136457, 1139667, 1139668, 1139673, 1138067, 1138069, 1134992,\n", + " 1135789, 1158961, 1158974, 1159009, 1159019, 1160089, 1144410, 1153544,\n", + " 1143631, 1141964, 1152044, 1142299, 1142302, 1136057, 1137734, 1137728,\n", + " 1134750, 1135540, 1135537, 1135549, 1141088, 1141098, 1143767, 1137299,\n", + " 1143225, 1137679, 1139025, 1146847, 1152719, 1141695, 1139386, 1136917,\n", + " 1137188, 1145066, 1141155, 1146453, 1141785, 1141786, 1141609, 1144650,\n", + " 1134979, 1134987, 1147844, 1147850, 1137074, 1144428, 1138482, 1138490,\n", + " 1141821, 1143167, 1153666, 1143212, 1158749, 1138469, 1139190, 1140110,\n", + " 1137661, 1144445, 1144596, 1141209, 1140885, 1141397, 1144182, 1137606,\n", + " 1144865, 1146201, 1137374, 1158691, 1158699, 1161701, 1147153, 1136379,\n", + " 1141367, 1153068, 1149097, 1149101, 1138293, 1144279, 1153554, 1139510,\n", + " 1140092, 1139127, 1145001, 1145005, 1139173, 1140976, 1140983, 1141560,\n", + " 1147050, 1147047, 1145873, 1152976, 1138992, 1141925, 1146898, 1144245,\n", + " 1144242, 1141841, 1141846, 1150253, 1140690, 1139405, 1143640, 1134849,\n", + " 1144072, 1143845, 1143851, 1146019, 1146024, 1146025, 1146140, 1154323,\n", + " 1149928, 1149935, 1139990, 1143294, 1143885, 1147543, 1147540, 1148763,\n", + " 1147282, 1142816, 1149155, 1147461, 1149366, 1149372, 1143051, 1144920,\n", + " 1138923, 1136836, 1139328, 1144779, 1136445, 1144957, 1142153, 1142158,\n", + " 1145429, 1143345, 1144765, 1144615, 1144083, 1139979, 1135876, 1150756,\n", + " 1144376, 1146523, 1143957, 1143456, 1143457, 1137703, 1140483, 1143937,\n", + " 1146591, 1147524, 1140364, 1149569, 1137990, 1168921, 1168924, 1166410,\n", + " 1148962, 1144219, 1147995, 1147999, 1146944, 1146949, 1134907, 1144010,\n", + " 1147131, 1148704, 1141327, 1141828, 1146742, 1148468, 1148473, 1153701,\n", + " 1152328, 1149725, 1147027, 1147029, 1147024, 1147257, 1145009, 1139549,\n", + " 1158224, 1158226, 1150463, 1143921, 1141137, 1145750, 1145751, 1146178,\n", + " 1138857, 1152530, 1150438, 1150445, 1148821, 1149791, 1144514, 1144526,\n", + " 1144174, 1150339, 1153982, 1169727, 1151480, 1151482, 1152022, 1151041,\n", + " 1145256, 1149590, 1142286, 1150127, 1153956, 1158949, 1141949, 1146773,\n", + " 1150728, 1153574, 1153575, 1147653, 1149412, 1148300, 1135079, 1147858,\n", + " 1147866, 1139096, 1151421, 1154420, 1148180, 1152563, 1136249, 1146686,\n", + " 1157970, 1148725, 1148731, 1148729, 1149810, 1139936, 1139938, 1143901,\n", + " 1141728, 1153124, 1153192, 1153188, 1145104, 1145111, 1152974, 1152920,\n", + " 1152864, 1152867, 1150356, 1143126, 1143134, 1147442, 1151816, 1152581,\n", + " 1154183, 1148498, 1148505, 1149738, 1146571, 1141420, 1150634, 1155152,\n", + " 1153447, 1150890, 1146969, 1147390, 1153249, 1150219, 1146623, 1154052,\n", + " 1150794, 1152098, 1156321, 1153038, 1137746, 1146304, 1152622, 1152623,\n", + " 1140521, 1155337, 1154123, 1157835, 1157824, 1151617, 1151629, 1150578,\n", + " 1151441, 1136798, 1148914, 1148916, 1152163, 1152168, 1145957, 1145963,\n", + " 1152903, 1152341, 1146816, 1138276, 1138279, 1152294, 1136028, 1158704,\n", + " 1158708, 1156619, 1140682, 1152928, 1149273, 1153690, 1148040, 1149300,\n", + " 1155223, 1149794, 1149804, 1148628, 1158530, 1158540, 1137458, 1135705,\n", + " 1142041, 1142047, 1154377, 1157547, 1158916, 1156505, 1152397, 1157064,\n", + " 1157069, 1155408, 1155422, 1145184, 1150475, 1146854, 1135730, 1152178,\n", + " 1150824, 1150828, 1135645, 1147810, 1139525, 1158308, 1158311, 1151273,\n", + " 1140431, 1153354, 1150136, 1162120, 1154542, 1156919, 1142755, 1142758,\n", + " 1164634, 1156207, 1154227, 1151379, 1152527, 1157183, 1149321, 1155749,\n", + " 1146920, 1145806, 1156460, 1156463, 1158096, 1168230, 1154763, 1157898,\n", + " 1157894, 1155626, 1155628, 1155630, 1155631, 1154555, 1158824, 1158325,\n", + " 1157323, 1148839, 1148834, 1155635, 1143253, 1161228, 1154650, 1146937,\n", + " 1172261, 1160103, 1151317, 1154902, 1154909, 1150371, 1153322, 1157424,\n", + " 1155613, 1141627, 1150984, 1157934, 1157663, 1158578, 1153786, 1149916,\n", + " 1137380, 1159116, 1158338, 1145682, 1140914, 1134677, 1134683, 1135601,\n", + " 1148148, 1155848, 1158665, 1157684, 1149151, 1159254, 1152220, 1159213,\n", + " 1167618, 1155971, 1155975, 1155976, 1135190, 1158841, 1155393, 1149696,\n", + " 1154600, 1160164, 1180782, 1136899, 1136896, 1140221, 1163001, 1158285,\n", + " 1151615, 1136480, 1136494, 1164941, 1153114, 1156495, 1157664, 1179183,\n", + " 1158220, 1140049, 1158558, 1165497, 1165502, 1163814, 1146126, 1138110,\n", + " 1155870, 1158003, 1158004, 1158006, 1144581, 1155521, 1155528, 1164276,\n", + " 1192539, 1142663, 1157747, 1157759, 1167359, 1159057, 1188644, 1165926,\n", + " 1165922, 1151080, 1142426, 1157939, 1157944, 1157945, 1153052, 1153042,\n", + " 1153045, 1163075, 1166240, 1167707, 1138393, 1167189, 1150046, 1149070,\n", + " 1155473, 1153514, 1162360, 1164006, 1167206, 1149967, 1163407, 1154590,\n", + " 1139281, 1148025, 1166073, 1162746, 1146063, 1171259, 1158461, 1160178,\n", + " 1140643, 1148600, 1168168, 1159632, 1151877, 1151872, 1163019, 1158653,\n", + " 1159025, 1159032, 1160885, 1184726, 1162604, 1169108, 1152247, 1143737,\n", + " 1143739, 1160600, 1155588, 1151227, 1168527, 1147393, 1147837, 1144739,\n", + " 1144747, 1155269, 1153212, 1153201, 1141465, 1141471, 1141457, 1147427,\n", + " 1149890, 1156739, 1153663, 1150651, 1163260, 1171040, 1144810, 1144812,\n", + " 1164741, 1142733, 1163935, 1145562, 1167748, 1170772, 1166462, 1171688,\n", + " 1144973, 1194497, 1194508, 1142136, 1146446, 1169201, 1145447, 1152630,\n", + " 1147723, 1147720, 1145892, 1145900, 1145902, 1145897, 1153520, 1175240,\n", + " 1143395, 1160841, 1171867, 1169742, 1158723, 1158722, 1167503, 1147339,\n", + " 1145677, 1159268, 1170676, 1145502, 1151598, 1149130, 1167817, 1166653,\n", + " 1149474, 1169298, 1155172, 1155170, 1150518, 1145528, 1144336, 1138369,\n", + " 1147750, 1154670, 1142352, 1154893, 1169162, 1157331, 1141045, 1151674,\n", + " 1169359, 1149452, 1158146, 1171534, 1158611, 1158051, 1153281, 1149847,\n", + " 1160033, 1160042, 1171475, 1155502, 1176622, 1170462, 1152353, 1152360,\n", + " 1175689, 1168400, 1169921, 1173307, 1169144, 1154027, 1152150, 1152151,\n", + " 1157153, 1157371, 1157373, 1147708, 1147711, 1151850, 1148128, 1148142,\n", + " 1177415, 1169037, 1154311, 1167712, 1172961, 1171802, 1155739, 1179705,\n", + " 1140326, 1179215, 1144550, 1170546, 1166684, 1170874, 1150234, 1154148,\n", + " 1174709, 1158176, 1149169, 1183497, 1172537, 1181092, 1159401, 1153803,\n", + " 1178171, 1181568, 1171318, 1163099, 1153619, 1182651, 1166554, 1161255,\n", + " 1176527, 1155262, 1180152, 1177576, 1154718, 1157795, 1179155, 1182808,\n", + " 1171629, 1171623, 1164039, 1157124, 1177345, 1183791, 1158249, 1158253,\n", + " 1180692, 1164564, 1178218, 1164200, 1145626, 1172024, 1178769, 1179087,\n", + " 1176544, 1149755, 1181357, 1153601, 1163044, 1170069, 1179788, 1179064,\n", + " 1155892, 1180852, 1157272, 1157266, 1157279, 1179924, 1182621, 1188241,\n", + " 1162253, 1159341, 1162378, 1164436, 1182337, 1164271, 1181460, 1188637,\n", + " 1170336, 1183870, 1170034, 1168939, 1172160, 1139831, 1139837, 1150265,\n", + " 1167131, 1156055, 1151972, 1173019, 1176217, 1149544, 1184948, 1178520,\n", + " 1170713, 1169964, 1188923, 1190455, 1193025, 1179002, 1171111, 1162497,\n", + " 1186545, 1153585, 1191587, 1177365, 1175349, 1172976, 1167099, 1172423,\n", + " 1172424, 1194233, 1161198, 1172124, 1158067, 1145395, 1172718, 1180531,\n", + " 1152080, 1176225, 1155958, 1155962, 1173461, 1165508, 1185613, 1181259,\n", + " 1169831, 1185947, 1188972, 1189676, 1189370, 1190188, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1136230, 1140282, 1135726, 1140785, 1141758, 1134948, 1138335,\n", + " 1136208, 1141251, 1141250, 1142802, 1136969, 1136971, 1141452, 1151164,\n", + " 1143600, 1149839, 1139811, 1145370, 1146991, 1139145, 1143372, 1146647,\n", + " 1139955, 1140781, 1145281, 1139866, 1134937, 1136959, 1148576, 1149216,\n", + " 1142959, 1155683, 1143820, 1149632, 1147473, 1147486, 1135990, 1153936,\n", + " 1153940, 1144632, 1134700, 1146656, 1150193, 1150203, 1146472, 1136112,\n", + " 1136114, 1148546, 1147094, 1155014, 1155018, 1155019, 1139371, 1147211,\n", + " 1136683, 1136685, 1150329, 1152416, 1134718, 1136268, 1134657, 1140540,\n", + " 1138112, 1154414, 1137257, 1137172, 1137180, 1153456, 1140159, 1134720,\n", + " 1134735, 1135909, 1140020, 1135360, 1135367, 1135202, 1134960, 1141036,\n", + " 1134794, 1157443, 1157447, 1138504, 1138510, 1137329, 1137342, 1136181,\n", + " 1143069, 1136619, 1144786, 1144395, 1136821, 1136826, 1137534, 1157397,\n", + " 1152376, 1136662, 1137441, 1156159, 1148481, 1139161, 1141702, 1135583,\n", + " 1141084, 1135827, 1135830, 1140240, 1140970, 1140712, 1138514, 1138524,\n", + " 1153098, 1153099, 1137957, 1158136, 1156965, 1135522, 1138314, 1138436,\n", + " 1138440, 1138445, 1138461, 1138449, 1138462, 1137495, 1149331, 1138846,\n", + " 1135088, 1156602, 1156606, 1147112, 1142611, 1158984, 1148531, 1148533,\n", + " 1137104, 1136457, 1139667, 1139668, 1139673, 1138067, 1138069, 1134992,\n", + " 1135789, 1158961, 1158974, 1159009, 1159019, 1160089, 1144410, 1153544,\n", + " 1143631, 1141964, 1152044, 1142299, 1142302, 1136057, 1137734, 1137728,\n", + " 1134750, 1135540, 1135537, 1135549, 1141088, 1141098, 1143767, 1137299,\n", + " 1143225, 1137679, 1139025, 1146847, 1152719, 1141695, 1139386, 1136917,\n", + " 1137188, 1145066, 1141155, 1146453, 1141785, 1141786, 1141609, 1144650,\n", + " 1134979, 1134987, 1147844, 1147850, 1137074, 1144428, 1138482, 1138490,\n", + " 1141821, 1143167, 1153666, 1143212, 1158749, 1138469, 1139190, 1140110,\n", + " 1137661, 1144445, 1144596, 1141209, 1140885, 1141397, 1144182, 1137606,\n", + " 1144865, 1146201, 1137374, 1158691, 1158699, 1161701, 1147153, 1136379,\n", + " 1141367, 1153068, 1149097, 1149101, 1138293, 1144279, 1153554, 1139510,\n", + " 1140092, 1139127, 1145001, 1145005, 1139173, 1140976, 1140983, 1141560,\n", + " 1147050, 1147047, 1145873, 1152976, 1138992, 1141925, 1146898, 1144245,\n", + " 1144242, 1141841, 1141846, 1150253, 1140690, 1139405, 1143640, 1134849,\n", + " 1144072, 1143845, 1143851, 1146019, 1146024, 1146025, 1146140, 1154323,\n", + " 1149928, 1149935, 1139990, 1143294, 1143885, 1147543, 1147540, 1148763,\n", + " 1147282, 1142816, 1149155, 1147461, 1149366, 1149372, 1143051, 1144920,\n", + " 1138923, 1136836, 1139328, 1144779, 1136445, 1144957, 1142153, 1142158,\n", + " 1145429, 1143345, 1144765, 1144615, 1144083, 1139979, 1135876, 1150756,\n", + " 1144376, 1146523, 1143957, 1143456, 1143457, 1137703, 1140483, 1143937,\n", + " 1146591, 1147524, 1140364, 1149569, 1137990, 1168921, 1168924, 1166410,\n", + " 1148962, 1144219, 1147995, 1147999, 1146944, 1146949, 1134907, 1144010,\n", + " 1147131, 1148704, 1141327, 1141828, 1146742, 1148468, 1148473, 1153701,\n", + " 1152328, 1149725, 1147027, 1147029, 1147024, 1147257, 1145009, 1139549,\n", + " 1158224, 1158226, 1150463, 1143921, 1141137, 1145750, 1145751, 1146178,\n", + " 1138857, 1152530, 1150438, 1150445, 1148821, 1149791, 1144514, 1144526,\n", + " 1144174, 1150339, 1153982, 1169727, 1151480, 1151482, 1152022, 1151041,\n", + " 1145256, 1149590, 1142286, 1150127, 1153956, 1158949, 1141949, 1146773,\n", + " 1150728, 1153574, 1153575, 1147653, 1149412, 1148300, 1135079, 1147858,\n", + " 1147866, 1139096, 1151421, 1154420, 1148180, 1152563, 1136249, 1146686,\n", + " 1157970, 1148725, 1148731, 1148729, 1149810, 1139936, 1139938, 1143901,\n", + " 1141728, 1153124, 1153192, 1153188, 1145104, 1145111, 1152974, 1152920,\n", + " 1152864, 1152867, 1150356, 1143126, 1143134, 1147442, 1151816, 1152581,\n", + " 1154183, 1148498, 1148505, 1149738, 1146571, 1141420, 1150634, 1155152,\n", + " 1153447, 1150890, 1146969, 1147390, 1153249, 1150219, 1146623, 1154052,\n", + " 1150794, 1152098, 1156321, 1153038, 1137746, 1146304, 1152622, 1152623,\n", + " 1140521, 1155337, 1154123, 1157835, 1157824, 1151617, 1151629, 1150578,\n", + " 1151441, 1136798, 1148914, 1148916, 1152163, 1152168, 1145957, 1145963,\n", + " 1152903, 1152341, 1146816, 1138276, 1138279, 1152294, 1136028, 1158704,\n", + " 1158708, 1156619, 1140682, 1152928, 1149273, 1153690, 1148040, 1149300,\n", + " 1155223, 1149794, 1149804, 1148628, 1158530, 1158540, 1137458, 1135705,\n", + " 1142041, 1142047, 1154377, 1157547, 1158916, 1156505, 1152397, 1157064,\n", + " 1157069, 1155408, 1155422, 1145184, 1150475, 1146854, 1135730, 1152178,\n", + " 1150824, 1150828, 1135645, 1147810, 1139525, 1158308, 1158311, 1151273,\n", + " 1140431, 1153354, 1150136, 1162120, 1154542, 1156919, 1142755, 1142758,\n", + " 1164634, 1156207, 1154227, 1151379, 1152527, 1157183, 1149321, 1155749,\n", + " 1146920, 1145806, 1156460, 1156463, 1158096, 1168230, 1154763, 1157898,\n", + " 1157894, 1155626, 1155628, 1155630, 1155631, 1154555, 1158824, 1158325,\n", + " 1157323, 1148839, 1148834, 1155635, 1143253, 1161228, 1154650, 1146937,\n", + " 1172261, 1160103, 1151317, 1154902, 1154909, 1150371, 1153322, 1157424,\n", + " 1155613, 1141627, 1150984, 1157934, 1157663, 1158578, 1153786, 1149916,\n", + " 1137380, 1159116, 1158338, 1145682, 1140914, 1134677, 1134683, 1135601,\n", + " 1148148, 1155848, 1158665, 1157684, 1149151, 1159254, 1152220, 1159213,\n", + " 1167618, 1155971, 1155975, 1155976, 1135190, 1158841, 1155393, 1149696,\n", + " 1154600, 1160164, 1180782, 1136899, 1136896, 1140221, 1163001, 1158285,\n", + " 1151615, 1136480, 1136494, 1164941, 1153114, 1156495, 1157664, 1179183,\n", + " 1158220, 1140049, 1158558, 1165497, 1165502, 1163814, 1146126, 1138110,\n", + " 1155870, 1158003, 1158004, 1158006, 1144581, 1155521, 1155528, 1164276,\n", + " 1192539, 1142663, 1157747, 1157759, 1167359, 1159057, 1188644, 1165926,\n", + " 1165922, 1151080, 1142426, 1157939, 1157944, 1157945, 1153052, 1153042,\n", + " 1153045, 1163075, 1166240, 1167707, 1138393, 1167189, 1150046, 1149070,\n", + " 1155473, 1153514, 1162360, 1164006, 1167206, 1149967, 1163407, 1154590,\n", + " 1139281, 1148025, 1166073, 1162746, 1146063, 1171259, 1158461, 1160178,\n", + " 1140643, 1148600, 1168168, 1159632, 1151877, 1151872, 1163019, 1158653,\n", + " 1159025, 1159032, 1160885, 1184726, 1162604, 1169108, 1152247, 1143737,\n", + " 1143739, 1160600, 1155588, 1151227, 1168527, 1147393, 1147837, 1144739,\n", + " 1144747, 1155269, 1153212, 1153201, 1141465, 1141471, 1141457, 1147427,\n", + " 1149890, 1156739, 1153663, 1150651, 1163260, 1171040, 1144810, 1144812,\n", + " 1164741, 1142733, 1163935, 1145562, 1167748, 1170772, 1166462, 1171688,\n", + " 1144973, 1194497, 1194508, 1142136, 1146446, 1169201, 1145447, 1152630,\n", + " 1147723, 1147720, 1145892, 1145900, 1145902, 1145897, 1153520, 1175240,\n", + " 1143395, 1160841, 1171867, 1169742, 1158723, 1158722, 1167503, 1147339,\n", + " 1145677, 1159268, 1170676, 1145502, 1151598, 1149130, 1167817, 1166653,\n", + " 1149474, 1169298, 1155172, 1155170, 1150518, 1145528, 1144336, 1138369,\n", + " 1147750, 1154670, 1142352, 1154893, 1169162, 1157331, 1141045, 1151674,\n", + " 1169359, 1149452, 1158146, 1171534, 1158611, 1158051, 1153281, 1149847,\n", + " 1160033, 1160042, 1171475, 1155502, 1176622, 1170462, 1152353, 1152360,\n", + " 1175689, 1168400, 1169921, 1173307, 1169144, 1154027, 1152150, 1152151,\n", + " 1157153, 1157371, 1157373, 1147708, 1147711, 1151850, 1148128, 1148142,\n", + " 1177415, 1169037, 1154311, 1167712, 1172961, 1171802, 1155739, 1179705,\n", + " 1140326, 1179215, 1144550, 1170546, 1166684, 1170874, 1150234, 1154148,\n", + " 1174709, 1158176, 1149169, 1183497, 1172537, 1181092, 1159401, 1153803,\n", + " 1178171, 1181568, 1171318, 1163099, 1153619, 1182651, 1166554, 1161255,\n", + " 1176527, 1155262, 1180152, 1177576, 1154718, 1157795, 1179155, 1182808,\n", + " 1171629, 1171623, 1164039, 1157124, 1177345, 1183791, 1158249, 1158253,\n", + " 1180692, 1164564, 1178218, 1164200, 1145626, 1172024, 1178769, 1179087,\n", + " 1176544, 1149755, 1181357, 1153601, 1163044, 1170069, 1179788, 1179064,\n", + " 1155892, 1180852, 1157272, 1157266, 1157279, 1179924, 1182621, 1188241,\n", + " 1162253, 1159341, 1162378, 1164436, 1182337, 1164271, 1181460, 1188637,\n", + " 1170336, 1183870, 1170034, 1168939, 1172160, 1139831, 1139837, 1150265,\n", + " 1167131, 1156055, 1151972, 1173019, 1176217, 1149544, 1184948, 1178520,\n", + " 1170713, 1169964, 1188923, 1190455, 1193025, 1179002, 1171111, 1162497,\n", + " 1186545, 1153585, 1191587, 1177365, 1175349, 1172976, 1167099, 1172423,\n", + " 1172424, 1194233, 1161198, 1172124, 1158067, 1145395, 1172718, 1180531,\n", + " 1152080, 1176225, 1155958, 1155962, 1173461, 1165508, 1185613, 1181259,\n", + " 1169831, 1185947, 1188972, 1189676, 1189370, 1190188, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196007, 1197847, 1198769, 1199439, 1200105, 1199282, 1202255, 1198844,\n", + " 1201582, 1199270, 1194626, 1201668, 1200650, 1201016, 1196956, 1194866,\n", + " 1196631, 1195263, 1197921, 1196534, 1201992, 1194882, 1199172, 1199171,\n", + " 1196359, 1195325, 1197104, 1196835, 1198668, 1195571, 1198167, 1198161,\n", + " 1196717, 1195148, 1195223, 1195216, 1195265, 1197141, 1197140, 1197273,\n", + " 1196109, 1198219, 1195841, 1195659, 1195541, 1197249, 1195783, 1195778,\n", + " 1195631, 1195626, 1195353, 1198282, 1199060, 1194928, 1197676, 1197990,\n", + " 1200878, 1199676, 1194795, 1198763, 1199018, 1197601, 1197609, 1196727,\n", + " 1195773, 1202616, 1200887, 1200894, 1198428, 1199414, 1199421, 1195557,\n", + " 1198811, 1201547, 1200570, 1199445, 1201156, 1201056, 1200913, 1199766,\n", + " 1199539, 1202641, 1200526, 1200553, 1200555, 1200429, 1197097, 1197100,\n", + " 1202055, 1202129, 1197040, 1196768, 1197945, 1201034, 1202239, 1200907,\n", + " 1202175, 1201291, 1198478, 1203329, 1202889, 1199922, 1196960, 1196964,\n", + " 1196966, 1200995, 1200792, 1200638, 1198518, 1195664, 1196929, 1198932,\n", + " 1198909, 1198911, 1195415, 1195386, 1197816, 1197821, 1195289, 1196547,\n", + " 1196375, 1196373, 1203102, 1197735, 1198848, 1200974, 1200296, 1197652,\n", + " 1201361, 1201365, 1197035, 1202077, 1194908, 1196417, 1203162, 1201966,\n", + " 1197886], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196007, 1197847, 1198769, 1199439, 1200105, 1199282, 1202255, 1198844,\n", + " 1201582, 1199270, 1194626, 1201668, 1200650, 1201016, 1196956, 1194866,\n", + " 1196631, 1195263, 1197921, 1196534, 1201992, 1194882, 1199172, 1199171,\n", + " 1196359, 1195325, 1197104, 1196835, 1198668, 1195571, 1198167, 1198161,\n", + " 1196717, 1195148, 1195223, 1195216, 1195265, 1197141, 1197140, 1197273,\n", + " 1196109, 1198219, 1195841, 1195659, 1195541, 1197249, 1195783, 1195778,\n", + " 1195631, 1195626, 1195353, 1198282, 1199060, 1194928, 1197676, 1197990,\n", + " 1200878, 1199676, 1194795, 1198763, 1199018, 1197601, 1197609, 1196727,\n", + " 1195773, 1202616, 1200887, 1200894, 1198428, 1199414, 1199421, 1195557,\n", + " 1198811, 1201547, 1200570, 1199445, 1201156, 1201056, 1200913, 1199766,\n", + " 1199539, 1202641, 1200526, 1200553, 1200555, 1200429, 1197097, 1197100,\n", + " 1202055, 1202129, 1197040, 1196768, 1197945, 1201034, 1202239, 1200907,\n", + " 1202175, 1201291, 1198478, 1203329, 1202889, 1199922, 1196960, 1196964,\n", + " 1196966, 1200995, 1200792, 1200638, 1198518, 1195664, 1196929, 1198932,\n", + " 1198909, 1198911, 1195415, 1195386, 1197816, 1197821, 1195289, 1196547,\n", + " 1196375, 1196373, 1203102, 1197735, 1198848, 1200974, 1200296, 1197652,\n", + " 1201361, 1201365, 1197035, 1202077, 1194908, 1196417, 1203162, 1201966,\n", + " 1197886], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.1965e-01, 3.1732e-03, 5.8375e-01, ..., 1.0040e-01,\n", + " -1.4372e-03, -3.8640e-03],\n", + " [ 9.3490e-02, -2.7171e-04, 6.0166e-01, ..., 1.2245e-01,\n", + " -2.0252e-03, -3.8173e-03],\n", + " [ 2.3105e-01, -5.6952e-04, 9.3376e-01, ..., 1.0260e-01,\n", + " -1.8096e-03, -6.2580e-03],\n", + " ...,\n", + " [ 2.5540e-01, -7.7677e-04, 9.8786e-01, ..., 9.5978e-02,\n", + " -1.7559e-03, -6.6811e-03],\n", + " [ 1.4989e-01, -1.0460e-04, 7.0554e-01, ..., 1.0039e-01,\n", + " -1.4354e-03, -4.7232e-03],\n", + " [ 1.2592e-01, -4.3996e-04, 6.5371e-01, ..., 1.0860e-01,\n", + " -1.8694e-03, -4.5276e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[-3.4411e-03, 4.5184e-01, 3.2086e+00, ..., -9.1712e-03,\n", + " -3.0353e-02, -1.7606e-02],\n", + " [ 1.3396e+00, 1.7049e+00, 3.2933e+00, ..., 1.9531e+00,\n", + " -5.4315e-02, 3.3472e+00],\n", + " [ 1.3056e+00, 2.3606e+00, 1.6973e+00, ..., -1.4648e-02,\n", + " -2.8858e-02, 5.8698e-01],\n", + " ...,\n", + " [ 7.6562e-01, 1.8658e+00, 1.6951e+00, ..., -9.9596e-03,\n", + " -2.6606e-02, 1.1646e-01],\n", + " [ 1.4964e+00, 1.5990e+00, 1.2229e+00, ..., -1.2487e-02,\n", + " -2.5568e-02, 8.5850e-01],\n", + " [ 1.3715e+00, 2.2035e+00, 3.1426e+00, ..., 2.8561e+00,\n", + " -5.7674e-02, 4.0337e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-5.9217e-04, 2.9088e-02, 1.2542e-01, ..., 1.6878e-01,\n", + " -7.4513e-05, -6.6133e-04],\n", + " [-4.1598e-03, 3.3162e-01, 2.7513e-01, ..., 1.3838e+00,\n", + " -2.5187e-03, -5.2989e-03],\n", + " [-1.1896e-03, 4.0179e-01, 9.8840e-02, ..., 1.5815e+00,\n", + " 1.2072e-01, 3.0604e-02],\n", + " ...,\n", + " [-1.4697e-03, 3.1848e-01, 2.0593e-01, ..., 1.6435e+00,\n", + " 1.8472e-02, -6.3162e-04],\n", + " [-2.1116e-03, 3.6206e-01, 1.4068e-01, ..., 1.4178e+00,\n", + " -8.8161e-04, -1.3785e-03],\n", + " [-1.7858e-03, 4.1373e-01, 9.7328e-02, ..., 1.6181e+00,\n", + " 1.0081e-01, -3.1901e-04]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-0.0013, 0.7193, 0.5061, ..., -0.0092, 0.2066, 0.4524],\n", + " [ 0.0741, 0.7569, 0.4598, ..., -0.0063, 0.2465, 0.2723],\n", + " [ 0.3289, 1.0138, 0.6221, ..., -0.0100, 0.5164, 0.0900],\n", + " ...,\n", + " [ 0.0337, 0.7986, 0.4459, ..., -0.0108, 0.4945, 0.3193],\n", + " [ 0.0601, 0.6679, 0.3300, ..., -0.0077, 0.2869, 0.2819],\n", + " [ 0.1024, 0.9497, 0.6397, ..., -0.0110, 0.5280, 0.2928]],\n", + " device='cuda:0', grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 3, 4, 4, 98, 98, 146, 134, 134, 134, 237, 410, 239,\n", + " 697, 939, 646, 998, 998, 998, 998, 860, 1092, 1027, 1056, 1056,\n", + " 1056, 1384, 1288, 1177, 1117, 1117, 1117, 1309, 1422, 1276, 1270, 1393,\n", + " 1519, 1519, 1519, 1562, 1562, 1586, 1586, 1481, 1477, 1489, 1562, 1562,\n", + " 1562, 1562, 1562, 1477, 1477, 1639, 1680, 1628, 1574, 1574, 1549, 1624,\n", + " 1675, 1986, 1986, 1986, 1760, 2039, 1827, 1827, 1913, 1913, 1913, 1913,\n", + " 1979, 2064, 1868, 2054, 2271, 2271, 2150, 2149, 2149, 2149, 2149, 2294,\n", + " 2294, 2024, 2233, 2268, 2229, 2515, 2342, 2342, 2396, 2323, 2468, 2468,\n", + " 2586, 2340, 2580, 2640, 2613, 2713, 2742, 3129, 2854, 2823, 3111, 3111,\n", + " 3100, 3091, 3091, 3049, 3079, 3138, 3093, 3381, 3265, 3313, 3337, 3579,\n", + " 3412, 3560, 3560, 3560, 3560, 3560, 3560, 3733, 3665, 3665, 3665, 3665,\n", + " 3828, 3980, 4070, 4046, 4011, 4072, 4072, 4213, 4233, 4233, 4233, 4316,\n", + " 4273, 4273, 4303, 4521, 4473, 4487, 4487, 4487, 4432, 4550, 4634, 4634,\n", + " 4634, 4634, 4688, 4688, 4650, 4634, 4634, 4634, 4664, 4664, 4785, 4859,\n", + " 4944, 5100, 5076, 5129, 5088, 5264, 5027, 4963, 5210, 5210, 5535, 5535,\n", + " 5139, 5569, 5569, 5512, 5274, 5230, 5120, 5414, 5414, 5297, 5604, 5604,\n", + " 5653, 6117, 5552, 5582, 5713, 5713, 5713, 5713, 5752, 5884, 5877, 5709,\n", + " 5900, 5900, 6109, 6035, 6043, 5924, 5924, 5957, 6009, 6009, 5913, 5913,\n", + " 5871, 5871, 5933, 6194, 6194],\n", + " [ 7, 85, 84, 72, 60, 26, 13, 116, 20, 109, 20, 128,\n", + " 50, 6, 131, 67, 17, 10, 32, 5, 10, 46, 94, 47,\n", + " 76, 46, 20, 51, 88, 118, 5, 121, 17, 51, 16, 108,\n", + " 134, 31, 63, 49, 118, 80, 45, 63, 12, 9, 5, 93,\n", + " 135, 133, 88, 86, 10, 10, 54, 40, 41, 53, 120, 39,\n", + " 104, 20, 81, 112, 38, 47, 56, 50, 75, 68, 106, 99,\n", + " 49, 49, 47, 104, 75, 71, 63, 4, 30, 19, 110, 124,\n", + " 103, 55, 127, 63, 113, 69, 110, 4, 51, 111, 109, 62,\n", + " 54, 73, 17, 123, 101, 65, 83, 135, 124, 1, 98, 87,\n", + " 17, 132, 24, 6, 1, 121, 9, 63, 59, 72, 36, 79,\n", + " 53, 97, 122, 10, 14, 114, 109, 35, 21, 107, 15, 34,\n", + " 117, 35, 9, 120, 3, 27, 63, 23, 48, 43, 42, 63,\n", + " 115, 0, 17, 105, 73, 90, 130, 120, 105, 25, 126, 96,\n", + " 100, 78, 60, 11, 17, 33, 44, 63, 63, 119, 79, 109,\n", + " 39, 54, 63, 29, 79, 7, 91, 32, 82, 63, 8, 63,\n", + " 2, 37, 95, 57, 52, 129, 89, 50, 63, 58, 63, 68,\n", + " 42, 67, 20, 63, 64, 61, 99, 57, 66, 125, 136, 22,\n", + " 63, 83, 83, 92, 35, 63, 18, 28, 63, 64, 63, 117,\n", + " 77, 63, 102, 70, 74]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1657, 1819, 1518, ..., 832, 2010, 4923],\n", + " [ 245, 245, 179, ..., 6764, 6887, 6934]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 75, 29, 77, ..., 63, 32, 77],\n", + " [ 22, 46, 18, ..., 6127, 6143, 6040]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 210, 210, 67, ..., 6848, 6848, 6848],\n", + " [ 176, 776, 298, ..., 853, 313, 341]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 281, 313, 222, ..., 399, 599, 879],\n", + " [ 166, 50, 124, ..., 6944, 6851, 6859]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5806, 3906, 1546, ..., 3076, 4013, 1062],\n", + " [ 1, 8, 164, ..., 6172, 6082, 6203]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 210, 210, 210, ..., 6848, 6910, 6809],\n", + " [ 972, 1072, 1351, ..., 6831, 3293, 840]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 55, 55, 55, ..., 5819, 5819, 5819],\n", + " [ 992, 2885, 3103, ..., 6639, 6658, 6731]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006725\n", + "sampling 0.006569\n", + "noi time: 0.001834\n", + "get_vertex_data call: 0.037485\n", + "noi group time: 0.003609\n", + "eoi_group_time: 0.016177\n", + "second half: 0.218803\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 31142, 24187, ..., 1134320, 1125832, 1120069],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 31142, 24187, ..., 1134320, 1125832, 1120069],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1208558, 1231430, ..., 1938525, 1937354, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1208558, 1231430, ..., 1938525, 1937354, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1141424, 1140282, 1135926, 1135716, 1135726, 1137784, 1141748,\n", + " 1141758, 1137506, 1136969, 1141443, 1138897, 1151156, 1149839, 1139811,\n", + " 1146978, 1137947, 1145992, 1138933, 1143372, 1143363, 1139243, 1139615,\n", + " 1150497, 1150509, 1143820, 1147473, 1144636, 1148512, 1146992, 1153009,\n", + " 1134697, 1135950, 1152664, 1147089, 1141904, 1150555, 1155018, 1155019,\n", + " 1147211, 1136685, 1146369, 1146375, 1140537, 1140542, 1138112, 1138356,\n", + " 1151531, 1135913, 1140953, 1135367, 1135202, 1136036, 1141036, 1134794,\n", + " 1157443, 1138508, 1136189, 1137693, 1136619, 1139215, 1144395, 1136826,\n", + " 1137441, 1135265, 1156159, 1139161, 1135579, 1141086, 1136111, 1138514,\n", + " 1153098, 1153099, 1154132, 1137008, 1156899, 1135522, 1135535, 1139685,\n", + " 1137287, 1157703, 1157706, 1138436, 1138440, 1138445, 1138461, 1138449,\n", + " 1137924, 1136594, 1158390, 1149328, 1138846, 1135098, 1138882, 1156605,\n", + " 1147112, 1147115, 1147118, 1142611, 1135359, 1135355, 1135631, 1138185,\n", + " 1148531, 1137109, 1135771, 1135772, 1141532, 1143584, 1136453, 1136457,\n", + " 1139667, 1136092, 1134992, 1142788, 1152651, 1136734, 1142905, 1159019,\n", + " 1153544, 1152701, 1137595, 1138648, 1138148, 1134891, 1141985, 1152044,\n", + " 1142299, 1137734, 1137728, 1147316, 1146222, 1134742, 1135549, 1140231,\n", + " 1140228, 1141088, 1141095, 1141097, 1141102, 1144130, 1136398, 1154860,\n", + " 1143706, 1143221, 1143231, 1139033, 1149968, 1149982, 1141695, 1135861,\n", + " 1136426, 1136637, 1141224, 1163301, 1136917, 1139730, 1143667, 1144237,\n", + " 1141786, 1139495, 1144641, 1134979, 1147850, 1137086, 1141810, 1141821,\n", + " 1141816, 1140160, 1140173, 1148867, 1142716, 1139190, 1137060, 1138708,\n", + " 1140110, 1142917, 1142913, 1138423, 1138424, 1144445, 1144596, 1136864,\n", + " 1141578, 1135315, 1135327, 1140442, 1144182, 1150906, 1146201, 1137364,\n", + " 1139559, 1158698, 1158703, 1138536, 1161710, 1147153, 1142646, 1142650,\n", + " 1149186, 1162804, 1141365, 1141367, 1141669, 1144279, 1139508, 1139510,\n", + " 1139774, 1138815, 1139127, 1140616, 1140620, 1140990, 1146695, 1146702,\n", + " 1135047, 1147050, 1145873, 1143543, 1152976, 1152988, 1135457, 1135460,\n", + " 1141925, 1144242, 1140582, 1141853, 1166362, 1150243, 1150253, 1140696,\n", + " 1136885, 1171652, 1134851, 1141390, 1143845, 1136275, 1146019, 1146024,\n", + " 1146140, 1141585, 1141235, 1141236, 1139990, 1147543, 1147545, 1147540,\n", + " 1147282, 1142816, 1164374, 1138660, 1138661, 1138669, 1136330, 1140337,\n", + " 1147469, 1142628, 1148004, 1146094, 1149608, 1143051, 1136836, 1139329,\n", + " 1139341, 1139328, 1138238, 1142159, 1143345, 1144088, 1144093, 1135876,\n", + " 1150296, 1150919, 1146523, 1146526, 1143456, 1143470, 1143471, 1143457,\n", + " 1143463, 1143007, 1142015, 1143937, 1135451, 1147574, 1146636, 1140364,\n", + " 1149582, 1137999, 1143082, 1144218, 1144219, 1147995, 1147999, 1134902,\n", + " 1139252, 1147131, 1147234, 1147240, 1148704, 1141327, 1141825, 1141836,\n", + " 1152327, 1147070, 1149722, 1147025, 1147024, 1145011, 1139549, 1158235,\n", + " 1147880, 1151646, 1145240, 1145750, 1145751, 1142370, 1146153, 1146178,\n", + " 1151242, 1148223, 1169870, 1151182, 1151175, 1147961, 1154437, 1149791,\n", + " 1144526, 1141358, 1146881, 1147794, 1151473, 1152026, 1149599, 1140566,\n", + " 1140402, 1150122, 1147019, 1147009, 1147023, 1135805, 1158959, 1151795,\n", + " 1153574, 1154990, 1148463, 1147653, 1147654, 1147656, 1149412, 1151718,\n", + " 1148288, 1151412, 1154420, 1148180, 1146676, 1146686, 1146684, 1138867,\n", + " 1148724, 1148729, 1145859, 1150057, 1148204, 1154203, 1153124, 1153125,\n", + " 1153192, 1145104, 1159828, 1159837, 1152877, 1143092, 1150356, 1155088,\n", + " 1146231, 1143134, 1151811, 1151821, 1151906, 1150708, 1150715, 1148498,\n", + " 1146565, 1141420, 1146969, 1146967, 1156402, 1146623, 1151691, 1144476,\n", + " 1135688, 1152407, 1150794, 1152098, 1156325, 1156334, 1150094, 1137746,\n", + " 1152622, 1140521, 1151962, 1151967, 1152826, 1155337, 1155334, 1154123,\n", + " 1152673, 1151618, 1151617, 1150578, 1150588, 1136134, 1136788, 1148916,\n", + " 1152958, 1153387, 1145952, 1152903, 1151311, 1143988, 1152341, 1146816,\n", + " 1156816, 1153308, 1145577, 1138281, 1152288, 1156005, 1136028, 1158704,\n", + " 1156619, 1151195, 1140674, 1140684, 1152928, 1163941, 1152888, 1156422,\n", + " 1137396, 1150159, 1148040, 1149300, 1152601, 1152597, 1157619, 1145656,\n", + " 1144659, 1148628, 1158530, 1137458, 1154564, 1148242, 1157514, 1147646,\n", + " 1142047, 1135434, 1148894, 1157064, 1157069, 1153885, 1155422, 1145191,\n", + " 1143502, 1135231, 1156638, 1151788, 1150828, 1135634, 1147810, 1151469,\n", + " 1139525, 1139530, 1158308, 1158311, 1151271, 1155441, 1150132, 1150136,\n", + " 1154529, 1154528, 1145610, 1142755, 1157637, 1151379, 1140186, 1156649,\n", + " 1149321, 1155748, 1155758, 1156463, 1168230, 1168239, 1154755, 1155626,\n", + " 1155628, 1155631, 1156563, 1154555, 1155582, 1161429, 1158824, 1158330,\n", + " 1157001, 1155646, 1153368, 1160956, 1143263, 1154648, 1146937, 1154240,\n", + " 1137347, 1154909, 1143189, 1157439, 1147918, 1141627, 1150987, 1157928,\n", + " 1157934, 1157653, 1157650, 1158126, 1156764, 1159116, 1145694, 1135601,\n", + " 1150661, 1150671, 1155848, 1158665, 1138215, 1157684, 1149145, 1156081,\n", + " 1155717, 1155433, 1155434, 1167311, 1167618, 1140380, 1157733, 1144843,\n", + " 1144844, 1155971, 1155975, 1135184, 1158840, 1158846, 1183168, 1156815,\n", + " 1163238, 1153503, 1136896, 1158760, 1158764, 1158881, 1140221, 1158815,\n", + " 1158804, 1158447, 1136480, 1136494, 1136491, 1164942, 1152136, 1153808,\n", + " 1156277, 1136640, 1140049, 1157861, 1156516, 1165778, 1138110, 1154350,\n", + " 1158003, 1158006, 1150011, 1169890, 1164274, 1164276, 1150674, 1167359,\n", + " 1162683, 1159356, 1159070, 1159061, 1157939, 1157946, 1153052, 1153045,\n", + " 1171551, 1155763, 1156370, 1144158, 1166256, 1156107, 1138393, 1150046,\n", + " 1159475, 1149070, 1145945, 1155476, 1155479, 1154294, 1153514, 1147300,\n", + " 1142405, 1158680, 1146876, 1161658, 1157607, 1138161, 1164006, 1156787,\n", + " 1149956, 1149963, 1164909, 1163396, 1163379, 1154590, 1165772, 1157236,\n", + " 1148769, 1157351, 1146063, 1158449, 1165299, 1169502, 1164990, 1144506,\n", + " 1141800, 1158643, 1159025, 1159029, 1159032, 1165602, 1152247, 1171154,\n", + " 1164116, 1155588, 1148571, 1144977, 1146500, 1161240, 1144739, 1141470,\n", + " 1141471, 1157044, 1156739, 1157955, 1153663, 1167373, 1150648, 1150649,\n", + " 1171040, 1168748, 1144812, 1162085, 1135567, 1156300, 1144051, 1145176,\n", + " 1145229, 1169282, 1188489, 1155324, 1147673, 1170670, 1144971, 1143037,\n", + " 1147693, 1145447, 1165746, 1170945, 1145889, 1168659, 1169548, 1143395,\n", + " 1143404, 1171867, 1158722, 1154076, 1170738, 1144690, 1145674, 1150773,\n", + " 1165737, 1145502, 1151587, 1167817, 1169298, 1155172, 1150522, 1150518,\n", + " 1145531, 1144336, 1157534, 1154670, 1135854, 1190647, 1169162, 1157331,\n", + " 1157342, 1141043, 1151668, 1151674, 1169359, 1149452, 1171529, 1158611,\n", + " 1158623, 1158062, 1173047, 1149847, 1172642, 1165903, 1154869, 1155493,\n", + " 1152353, 1152546, 1148324, 1147509, 1173307, 1180710, 1169144, 1154027,\n", + " 1159651, 1159658, 1171145, 1178422, 1157158, 1157153, 1157373, 1147711,\n", + " 1151850, 1148131, 1169913, 1145790, 1147925, 1149247, 1169037, 1168800,\n", + " 1166751, 1168604, 1170020, 1164362, 1144545, 1178056, 1171823, 1160314,\n", + " 1150234, 1154151, 1154148, 1178889, 1149169, 1171921, 1143279, 1180389,\n", + " 1168481, 1171305, 1169620, 1153803, 1189183, 1153625, 1172309, 1183123,\n", + " 1171396, 1151519, 1155262, 1157792, 1157795, 1182808, 1171623, 1164034,\n", + " 1163219, 1157128, 1157992, 1172148, 1187251, 1158253, 1153898, 1145626,\n", + " 1178776, 1157483, 1149755, 1153609, 1158512, 1158940, 1155890, 1179923,\n", + " 1182786, 1182797, 1180679, 1171634, 1162253, 1188939, 1185411, 1168876,\n", + " 1163422, 1161819, 1156162, 1190612, 1168936, 1156539, 1139831, 1150265,\n", + " 1154812, 1188613, 1187899, 1183900, 1156055, 1151978, 1181888, 1146392,\n", + " 1146394, 1146395, 1173058, 1149544, 1193369, 1191693, 1190835, 1167439,\n", + " 1169964, 1140995, 1193709, 1186488, 1171668, 1189486, 1171240, 1189403,\n", + " 1162502, 1169703, 1175349, 1172429, 1180786, 1176829, 1152080, 1155962,\n", + " 1179769, 1172896, 1167467, 1182852, 1157022, 1161940], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1141424, 1140282, 1135926, 1135716, 1135726, 1137784, 1141748,\n", + " 1141758, 1137506, 1136969, 1141443, 1138897, 1151156, 1149839, 1139811,\n", + " 1146978, 1137947, 1145992, 1138933, 1143372, 1143363, 1139243, 1139615,\n", + " 1150497, 1150509, 1143820, 1147473, 1144636, 1148512, 1146992, 1153009,\n", + " 1134697, 1135950, 1152664, 1147089, 1141904, 1150555, 1155018, 1155019,\n", + " 1147211, 1136685, 1146369, 1146375, 1140537, 1140542, 1138112, 1138356,\n", + " 1151531, 1135913, 1140953, 1135367, 1135202, 1136036, 1141036, 1134794,\n", + " 1157443, 1138508, 1136189, 1137693, 1136619, 1139215, 1144395, 1136826,\n", + " 1137441, 1135265, 1156159, 1139161, 1135579, 1141086, 1136111, 1138514,\n", + " 1153098, 1153099, 1154132, 1137008, 1156899, 1135522, 1135535, 1139685,\n", + " 1137287, 1157703, 1157706, 1138436, 1138440, 1138445, 1138461, 1138449,\n", + " 1137924, 1136594, 1158390, 1149328, 1138846, 1135098, 1138882, 1156605,\n", + " 1147112, 1147115, 1147118, 1142611, 1135359, 1135355, 1135631, 1138185,\n", + " 1148531, 1137109, 1135771, 1135772, 1141532, 1143584, 1136453, 1136457,\n", + " 1139667, 1136092, 1134992, 1142788, 1152651, 1136734, 1142905, 1159019,\n", + " 1153544, 1152701, 1137595, 1138648, 1138148, 1134891, 1141985, 1152044,\n", + " 1142299, 1137734, 1137728, 1147316, 1146222, 1134742, 1135549, 1140231,\n", + " 1140228, 1141088, 1141095, 1141097, 1141102, 1144130, 1136398, 1154860,\n", + " 1143706, 1143221, 1143231, 1139033, 1149968, 1149982, 1141695, 1135861,\n", + " 1136426, 1136637, 1141224, 1163301, 1136917, 1139730, 1143667, 1144237,\n", + " 1141786, 1139495, 1144641, 1134979, 1147850, 1137086, 1141810, 1141821,\n", + " 1141816, 1140160, 1140173, 1148867, 1142716, 1139190, 1137060, 1138708,\n", + " 1140110, 1142917, 1142913, 1138423, 1138424, 1144445, 1144596, 1136864,\n", + " 1141578, 1135315, 1135327, 1140442, 1144182, 1150906, 1146201, 1137364,\n", + " 1139559, 1158698, 1158703, 1138536, 1161710, 1147153, 1142646, 1142650,\n", + " 1149186, 1162804, 1141365, 1141367, 1141669, 1144279, 1139508, 1139510,\n", + " 1139774, 1138815, 1139127, 1140616, 1140620, 1140990, 1146695, 1146702,\n", + " 1135047, 1147050, 1145873, 1143543, 1152976, 1152988, 1135457, 1135460,\n", + " 1141925, 1144242, 1140582, 1141853, 1166362, 1150243, 1150253, 1140696,\n", + " 1136885, 1171652, 1134851, 1141390, 1143845, 1136275, 1146019, 1146024,\n", + " 1146140, 1141585, 1141235, 1141236, 1139990, 1147543, 1147545, 1147540,\n", + " 1147282, 1142816, 1164374, 1138660, 1138661, 1138669, 1136330, 1140337,\n", + " 1147469, 1142628, 1148004, 1146094, 1149608, 1143051, 1136836, 1139329,\n", + " 1139341, 1139328, 1138238, 1142159, 1143345, 1144088, 1144093, 1135876,\n", + " 1150296, 1150919, 1146523, 1146526, 1143456, 1143470, 1143471, 1143457,\n", + " 1143463, 1143007, 1142015, 1143937, 1135451, 1147574, 1146636, 1140364,\n", + " 1149582, 1137999, 1143082, 1144218, 1144219, 1147995, 1147999, 1134902,\n", + " 1139252, 1147131, 1147234, 1147240, 1148704, 1141327, 1141825, 1141836,\n", + " 1152327, 1147070, 1149722, 1147025, 1147024, 1145011, 1139549, 1158235,\n", + " 1147880, 1151646, 1145240, 1145750, 1145751, 1142370, 1146153, 1146178,\n", + " 1151242, 1148223, 1169870, 1151182, 1151175, 1147961, 1154437, 1149791,\n", + " 1144526, 1141358, 1146881, 1147794, 1151473, 1152026, 1149599, 1140566,\n", + " 1140402, 1150122, 1147019, 1147009, 1147023, 1135805, 1158959, 1151795,\n", + " 1153574, 1154990, 1148463, 1147653, 1147654, 1147656, 1149412, 1151718,\n", + " 1148288, 1151412, 1154420, 1148180, 1146676, 1146686, 1146684, 1138867,\n", + " 1148724, 1148729, 1145859, 1150057, 1148204, 1154203, 1153124, 1153125,\n", + " 1153192, 1145104, 1159828, 1159837, 1152877, 1143092, 1150356, 1155088,\n", + " 1146231, 1143134, 1151811, 1151821, 1151906, 1150708, 1150715, 1148498,\n", + " 1146565, 1141420, 1146969, 1146967, 1156402, 1146623, 1151691, 1144476,\n", + " 1135688, 1152407, 1150794, 1152098, 1156325, 1156334, 1150094, 1137746,\n", + " 1152622, 1140521, 1151962, 1151967, 1152826, 1155337, 1155334, 1154123,\n", + " 1152673, 1151618, 1151617, 1150578, 1150588, 1136134, 1136788, 1148916,\n", + " 1152958, 1153387, 1145952, 1152903, 1151311, 1143988, 1152341, 1146816,\n", + " 1156816, 1153308, 1145577, 1138281, 1152288, 1156005, 1136028, 1158704,\n", + " 1156619, 1151195, 1140674, 1140684, 1152928, 1163941, 1152888, 1156422,\n", + " 1137396, 1150159, 1148040, 1149300, 1152601, 1152597, 1157619, 1145656,\n", + " 1144659, 1148628, 1158530, 1137458, 1154564, 1148242, 1157514, 1147646,\n", + " 1142047, 1135434, 1148894, 1157064, 1157069, 1153885, 1155422, 1145191,\n", + " 1143502, 1135231, 1156638, 1151788, 1150828, 1135634, 1147810, 1151469,\n", + " 1139525, 1139530, 1158308, 1158311, 1151271, 1155441, 1150132, 1150136,\n", + " 1154529, 1154528, 1145610, 1142755, 1157637, 1151379, 1140186, 1156649,\n", + " 1149321, 1155748, 1155758, 1156463, 1168230, 1168239, 1154755, 1155626,\n", + " 1155628, 1155631, 1156563, 1154555, 1155582, 1161429, 1158824, 1158330,\n", + " 1157001, 1155646, 1153368, 1160956, 1143263, 1154648, 1146937, 1154240,\n", + " 1137347, 1154909, 1143189, 1157439, 1147918, 1141627, 1150987, 1157928,\n", + " 1157934, 1157653, 1157650, 1158126, 1156764, 1159116, 1145694, 1135601,\n", + " 1150661, 1150671, 1155848, 1158665, 1138215, 1157684, 1149145, 1156081,\n", + " 1155717, 1155433, 1155434, 1167311, 1167618, 1140380, 1157733, 1144843,\n", + " 1144844, 1155971, 1155975, 1135184, 1158840, 1158846, 1183168, 1156815,\n", + " 1163238, 1153503, 1136896, 1158760, 1158764, 1158881, 1140221, 1158815,\n", + " 1158804, 1158447, 1136480, 1136494, 1136491, 1164942, 1152136, 1153808,\n", + " 1156277, 1136640, 1140049, 1157861, 1156516, 1165778, 1138110, 1154350,\n", + " 1158003, 1158006, 1150011, 1169890, 1164274, 1164276, 1150674, 1167359,\n", + " 1162683, 1159356, 1159070, 1159061, 1157939, 1157946, 1153052, 1153045,\n", + " 1171551, 1155763, 1156370, 1144158, 1166256, 1156107, 1138393, 1150046,\n", + " 1159475, 1149070, 1145945, 1155476, 1155479, 1154294, 1153514, 1147300,\n", + " 1142405, 1158680, 1146876, 1161658, 1157607, 1138161, 1164006, 1156787,\n", + " 1149956, 1149963, 1164909, 1163396, 1163379, 1154590, 1165772, 1157236,\n", + " 1148769, 1157351, 1146063, 1158449, 1165299, 1169502, 1164990, 1144506,\n", + " 1141800, 1158643, 1159025, 1159029, 1159032, 1165602, 1152247, 1171154,\n", + " 1164116, 1155588, 1148571, 1144977, 1146500, 1161240, 1144739, 1141470,\n", + " 1141471, 1157044, 1156739, 1157955, 1153663, 1167373, 1150648, 1150649,\n", + " 1171040, 1168748, 1144812, 1162085, 1135567, 1156300, 1144051, 1145176,\n", + " 1145229, 1169282, 1188489, 1155324, 1147673, 1170670, 1144971, 1143037,\n", + " 1147693, 1145447, 1165746, 1170945, 1145889, 1168659, 1169548, 1143395,\n", + " 1143404, 1171867, 1158722, 1154076, 1170738, 1144690, 1145674, 1150773,\n", + " 1165737, 1145502, 1151587, 1167817, 1169298, 1155172, 1150522, 1150518,\n", + " 1145531, 1144336, 1157534, 1154670, 1135854, 1190647, 1169162, 1157331,\n", + " 1157342, 1141043, 1151668, 1151674, 1169359, 1149452, 1171529, 1158611,\n", + " 1158623, 1158062, 1173047, 1149847, 1172642, 1165903, 1154869, 1155493,\n", + " 1152353, 1152546, 1148324, 1147509, 1173307, 1180710, 1169144, 1154027,\n", + " 1159651, 1159658, 1171145, 1178422, 1157158, 1157153, 1157373, 1147711,\n", + " 1151850, 1148131, 1169913, 1145790, 1147925, 1149247, 1169037, 1168800,\n", + " 1166751, 1168604, 1170020, 1164362, 1144545, 1178056, 1171823, 1160314,\n", + " 1150234, 1154151, 1154148, 1178889, 1149169, 1171921, 1143279, 1180389,\n", + " 1168481, 1171305, 1169620, 1153803, 1189183, 1153625, 1172309, 1183123,\n", + " 1171396, 1151519, 1155262, 1157792, 1157795, 1182808, 1171623, 1164034,\n", + " 1163219, 1157128, 1157992, 1172148, 1187251, 1158253, 1153898, 1145626,\n", + " 1178776, 1157483, 1149755, 1153609, 1158512, 1158940, 1155890, 1179923,\n", + " 1182786, 1182797, 1180679, 1171634, 1162253, 1188939, 1185411, 1168876,\n", + " 1163422, 1161819, 1156162, 1190612, 1168936, 1156539, 1139831, 1150265,\n", + " 1154812, 1188613, 1187899, 1183900, 1156055, 1151978, 1181888, 1146392,\n", + " 1146394, 1146395, 1173058, 1149544, 1193369, 1191693, 1190835, 1167439,\n", + " 1169964, 1140995, 1193709, 1186488, 1171668, 1189486, 1171240, 1189403,\n", + " 1162502, 1169703, 1175349, 1172429, 1180786, 1176829, 1152080, 1155962,\n", + " 1179769, 1172896, 1167467, 1182852, 1157022, 1161940], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197892, 1198244, 1200099, 1199282, 1202255, 1198844, 1201582, 1201462,\n", + " 1202119, 1200644, 1197777, 1201016, 1195938, 1196956, 1196876, 1196684,\n", + " 1194783, 1196624, 1196631, 1194649, 1195259, 1195263, 1196543, 1201992,\n", + " 1196031, 1198306, 1194882, 1195888, 1202902, 1199171, 1195740, 1196977,\n", + " 1196979, 1196517, 1195325, 1196835, 1196837, 1196845, 1196165, 1196704,\n", + " 1196711, 1196717, 1195265, 1195270, 1197141, 1197374, 1197265, 1195841,\n", + " 1195659, 1198203, 1197474, 1195778, 1199711, 1196283, 1195353, 1198282,\n", + " 1200949, 1199856, 1194928, 1199628, 1199800, 1200076, 1200872, 1200878,\n", + " 1199154, 1199038, 1198400, 1199223, 1199231, 1194786, 1200491, 1199021,\n", + " 1197977, 1197601, 1196727, 1195771, 1195773, 1198428, 1199410, 1200452,\n", + " 1200570, 1201421, 1200991, 1200918, 1194805, 1199546, 1199532, 1196889,\n", + " 1199908, 1196781, 1202239, 1199482, 1200899, 1195886, 1198478, 1201871,\n", + " 1202209, 1196960, 1196963, 1196966, 1200784, 1199606, 1195679, 1195664,\n", + " 1198929, 1198932, 1198908, 1195181, 1197821, 1196601, 1201970, 1200590,\n", + " 1199659, 1196380, 1194730, 1198824, 1197735, 1198819, 1201001, 1197593,\n", + " 1200974, 1195070, 1198131, 1195308, 1195165, 1202077, 1200211, 1197872],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197892, 1198244, 1200099, 1199282, 1202255, 1198844, 1201582, 1201462,\n", + " 1202119, 1200644, 1197777, 1201016, 1195938, 1196956, 1196876, 1196684,\n", + " 1194783, 1196624, 1196631, 1194649, 1195259, 1195263, 1196543, 1201992,\n", + " 1196031, 1198306, 1194882, 1195888, 1202902, 1199171, 1195740, 1196977,\n", + " 1196979, 1196517, 1195325, 1196835, 1196837, 1196845, 1196165, 1196704,\n", + " 1196711, 1196717, 1195265, 1195270, 1197141, 1197374, 1197265, 1195841,\n", + " 1195659, 1198203, 1197474, 1195778, 1199711, 1196283, 1195353, 1198282,\n", + " 1200949, 1199856, 1194928, 1199628, 1199800, 1200076, 1200872, 1200878,\n", + " 1199154, 1199038, 1198400, 1199223, 1199231, 1194786, 1200491, 1199021,\n", + " 1197977, 1197601, 1196727, 1195771, 1195773, 1198428, 1199410, 1200452,\n", + " 1200570, 1201421, 1200991, 1200918, 1194805, 1199546, 1199532, 1196889,\n", + " 1199908, 1196781, 1202239, 1199482, 1200899, 1195886, 1198478, 1201871,\n", + " 1202209, 1196960, 1196963, 1196966, 1200784, 1199606, 1195679, 1195664,\n", + " 1198929, 1198932, 1198908, 1195181, 1197821, 1196601, 1201970, 1200590,\n", + " 1199659, 1196380, 1194730, 1198824, 1197735, 1198819, 1201001, 1197593,\n", + " 1200974, 1195070, 1198131, 1195308, 1195165, 1202077, 1200211, 1197872],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.1681e-01, -4.8509e-04, 6.2136e-01, ..., 1.1056e-01,\n", + " -2.0883e-03, -4.5252e-03],\n", + " [ 2.7257e-01, -7.3645e-04, 9.7863e-01, ..., 9.8599e-02,\n", + " -1.9107e-03, -6.6536e-03],\n", + " [ 1.2532e-01, 3.0713e-02, 6.0704e-01, ..., 1.2188e-01,\n", + " -1.3942e-03, -4.0919e-03],\n", + " ...,\n", + " [ 1.1928e-01, -4.0217e-04, 6.1111e-01, ..., 1.2229e-01,\n", + " -1.7452e-03, -4.0178e-03],\n", + " [ 1.5211e-01, -1.3505e-04, 6.7304e-01, ..., 8.7017e-02,\n", + " -1.4714e-03, -4.6474e-03],\n", + " [ 2.4862e-01, -5.1969e-04, 9.3666e-01, ..., 9.7849e-02,\n", + " -1.9623e-03, -6.1983e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 0.8102, 2.4864, 3.2845, ..., 1.7631, -0.0465, 2.2696],\n", + " [ 1.5459, 1.6995, 0.7094, ..., -0.0148, -0.0255, 1.1819],\n", + " [ 0.7869, 1.2724, 1.1350, ..., -0.0060, -0.0221, 0.4782],\n", + " ...,\n", + " [ 0.6351, 2.3186, 1.1973, ..., -0.0117, -0.0238, 0.5839],\n", + " [-0.0135, 1.1285, 3.6696, ..., -0.0143, -0.0341, -0.0302],\n", + " [ 1.0361, 2.9083, 3.1262, ..., 3.4773, -0.0590, 4.1369]],\n", + " device='cuda:0', grad_fn=), 'author': tensor([[-1.2570e-03, 2.6259e-01, 2.2438e-01, ..., 1.6687e+00,\n", + " 1.6221e-01, -4.7799e-04],\n", + " [-4.8729e-03, 4.3481e-01, 2.2977e-01, ..., 1.4327e+00,\n", + " -3.9128e-03, -5.9554e-03],\n", + " [-1.0177e-03, 1.1851e-01, 3.3779e-01, ..., 1.5529e+00,\n", + " 1.8635e-01, -8.0478e-06],\n", + " ...,\n", + " [-3.1979e-03, 3.9368e-01, 2.3355e-01, ..., 1.5891e+00,\n", + " -2.0205e-03, -3.1769e-03],\n", + " [-1.5893e-03, 3.2060e-01, 1.9796e-01, ..., 1.5331e+00,\n", + " 1.0247e-02, -1.2054e-03],\n", + " [-1.1795e-03, 3.1254e-01, 2.0595e-01, ..., 1.6902e+00,\n", + " 1.5751e-01, -4.3219e-05]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-3.0203e-04, 5.6479e-01, 2.2431e-01, ..., -6.6200e-03,\n", + " 2.3906e-01, 2.8070e-01],\n", + " [-8.8527e-05, 6.2938e-01, 2.6831e-01, ..., -8.4883e-03,\n", + " 3.3506e-01, 3.6997e-01],\n", + " [ 9.5086e-02, 8.7679e-01, 5.0511e-01, ..., -1.0361e-02,\n", + " 5.3097e-01, 2.6728e-01],\n", + " ...,\n", + " [-2.8959e-04, 6.5871e-01, 2.7076e-01, ..., -8.6918e-03,\n", + " 3.1954e-01, 3.3966e-01],\n", + " [ 1.2185e-01, 7.4154e-01, 3.6021e-01, ..., -7.6602e-03,\n", + " 3.5518e-01, 2.1501e-01],\n", + " [ 2.5748e-01, 8.3326e-01, 4.6637e-01, ..., -8.2312e-03,\n", + " 3.7190e-01, 3.5244e-02]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 111, 111, 21, 186, 185, 173, 227, 1, 185, 4, 4, 187,\n", + " 187, 215, 147, 272, 420, 465, 465, 794, 994, 1248, 1198, 1258,\n", + " 977, 977, 817, 1304, 1304, 1090, 1527, 1621, 1319, 1464, 1584, 1598,\n", + " 1598, 1540, 1683, 1912, 1912, 1816, 1816, 1816, 1816, 1934, 1976, 1997,\n", + " 1997, 1997, 2374, 2370, 2370, 2358, 2358, 2358, 2332, 2522, 2467, 2476,\n", + " 2494, 2374, 2374, 2581, 2632, 2520, 2697, 2697, 2494, 2627, 2643, 2643,\n", + " 2735, 2752, 2771, 2738, 2770, 2770, 2820, 2820, 3140, 3309, 3393, 3393,\n", + " 3760, 3503, 3760, 3760, 3760, 3510, 3491, 3528, 3528, 3674, 3847, 3681,\n", + " 3681, 4042, 3683, 3683, 4003, 3785, 3864, 3954, 3800, 4180, 4300, 4311,\n", + " 4139, 4360, 4385, 4385, 4539, 4525, 4950, 4950, 4795, 4795, 4955, 5149,\n", + " 5191, 5191, 5216, 5149, 5149, 5149, 5149, 5149, 5119, 5253, 5315, 5372,\n", + " 5372, 5460, 5410, 5430, 5450, 5437, 5539, 5470, 5593, 5645, 5781, 5874,\n", + " 5721, 5721, 5721, 6210, 5852, 5984, 5702, 5743, 5943, 5943, 5954, 6133,\n", + " 6133, 6258, 5939, 5975, 6271, 6367, 6367, 6433, 6071, 6071, 6189, 6465,\n", + " 6280, 6354, 6498, 6424, 6396, 6360, 6561, 6561, 6551],\n", + " [ 47, 59, 69, 37, 91, 7, 6, 78, 45, 105, 63, 55,\n", + " 30, 72, 90, 48, 101, 110, 27, 76, 4, 57, 59, 90,\n", + " 70, 14, 24, 15, 23, 115, 6, 123, 123, 125, 16, 17,\n", + " 28, 36, 60, 34, 71, 109, 120, 122, 126, 6, 67, 52,\n", + " 56, 29, 5, 121, 17, 80, 89, 51, 53, 61, 87, 88,\n", + " 60, 93, 27, 59, 22, 127, 126, 10, 125, 60, 104, 81,\n", + " 67, 90, 18, 67, 27, 85, 42, 2, 67, 118, 69, 14,\n", + " 74, 44, 46, 25, 68, 108, 35, 31, 77, 3, 65, 84,\n", + " 9, 62, 90, 123, 49, 117, 90, 96, 41, 39, 30, 4,\n", + " 111, 113, 81, 104, 69, 8, 97, 1, 107, 82, 21, 54,\n", + " 38, 33, 52, 98, 106, 92, 99, 100, 124, 27, 27, 83,\n", + " 50, 23, 90, 32, 64, 60, 36, 94, 13, 112, 20, 73,\n", + " 11, 88, 116, 0, 69, 83, 114, 105, 119, 115, 12, 79,\n", + " 19, 40, 59, 58, 86, 26, 74, 103, 66, 30, 23, 76,\n", + " 11, 75, 43, 95, 100, 80, 6, 102, 59]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2307, 1439, 1772, ..., 3226, 5113, 2165],\n", + " [ 47, 48, 98, ..., 6361, 6374, 6374]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 5, 17, 18, ..., 103, 3, 17],\n", + " [ 176, 221, 256, ..., 6624, 6578, 6622]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 193, 193, 32, ..., 6277, 6277, 6277],\n", + " [ 128, 248, 809, ..., 545, 431, 675]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 430, 300, 365, ..., 202, 224, 564],\n", + " [ 4, 92, 272, ..., 6371, 6447, 6446]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1901, 5577, 2776, ..., 1709, 3678, 6267],\n", + " [ 79, 209, 132, ..., 6552, 6636, 6609]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 32, 12, 62, ..., 6277, 6277, 6277],\n", + " [3065, 1081, 5054, ..., 6291, 6254, 6337]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 143, 143, 143, ..., 6350, 6350, 6350],\n", + " [1021, 2188, 1451, ..., 5520, 5372, 5343]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.007839\n", + "sampling 0.007583\n", + "noi time: 0.001791\n", + "get_vertex_data call: 0.035004\n", + "noi group time: 0.003232\n", + "eoi_group_time: 0.016077\n", + "second half: 0.224652\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31145, 24187, 32616, ..., 1100728, 1119043, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31145, 24187, 32616, ..., 1100728, 1119043, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210831, 1212194, 1209115, ..., 1939389, 1937149, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210831, 1212194, 1209115, ..., 1939389, 1937149, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1140282, 1136349, 1141758, 1136223, 1136971, 1149834, 1139808,\n", + " 1145370, 1146982, 1139143, 1143360, 1143372, 1143363, 1146640, 1139615,\n", + " 1140772, 1139866, 1155689, 1147473, 1147476, 1147483, 1144636, 1148512,\n", + " 1146992, 1134701, 1135947, 1146661, 1138344, 1148546, 1153217, 1153220,\n", + " 1136742, 1155018, 1139364, 1147202, 1136683, 1150329, 1134715, 1146376,\n", + " 1137829, 1140540, 1140542, 1138112, 1138119, 1138356, 1135367, 1135202,\n", + " 1135210, 1134970, 1134960, 1141036, 1134794, 1136518, 1143377, 1138504,\n", + " 1137342, 1136610, 1144395, 1136662, 1137441, 1143321, 1136199, 1156146,\n", + " 1156159, 1139161, 1142607, 1135238, 1156339, 1158136, 1154141, 1137019,\n", + " 1156899, 1135535, 1138440, 1138445, 1160590, 1136594, 1135122, 1156603,\n", + " 1156606, 1147112, 1142611, 1142615, 1142616, 1135359, 1148531, 1139667,\n", + " 1138069, 1136087, 1136089, 1134992, 1158961, 1158974, 1160088, 1140034,\n", + " 1152696, 1139933, 1137598, 1138648, 1141963, 1152042, 1152044, 1140670,\n", + " 1137734, 1137728, 1147322, 1135549, 1137895, 1141088, 1141097, 1141100,\n", + " 1149001, 1139889, 1143767, 1137299, 1143225, 1137679, 1139039, 1140003,\n", + " 1146834, 1152713, 1141695, 1135860, 1154466, 1141224, 1136917, 1139730,\n", + " 1140598, 1141785, 1141300, 1147853, 1137074, 1149434, 1144428, 1141821,\n", + " 1165098, 1140160, 1140163, 1158600, 1144596, 1144598, 1136866, 1136864,\n", + " 1141578, 1135327, 1144179, 1137614, 1150906, 1138539, 1140501, 1137854,\n", + " 1147153, 1141365, 1153068, 1153069, 1163667, 1141664, 1149090, 1139019,\n", + " 1139510, 1140093, 1139127, 1144992, 1145001, 1143791, 1140984, 1145873,\n", + " 1143543, 1152976, 1139453, 1141925, 1146901, 1144242, 1150692, 1148313,\n", + " 1145980, 1143851, 1136277, 1146016, 1146024, 1146140, 1154323, 1154328,\n", + " 1141585, 1149928, 1139990, 1143293, 1143876, 1147543, 1147545, 1147540,\n", + " 1148763, 1147282, 1142825, 1142816, 1138669, 1149155, 1140346, 1157720,\n", + " 1136836, 1136843, 1139329, 1139328, 1144778, 1141490, 1142149, 1143345,\n", + " 1144765, 1144766, 1135876, 1150760, 1135819, 1146523, 1138024, 1143456,\n", + " 1143471, 1143457, 1137696, 1143937, 1147574, 1149073, 1147521, 1140360,\n", + " 1140364, 1137990, 1143075, 1147999, 1146949, 1146950, 1134902, 1134907,\n", + " 1139252, 1147131, 1148704, 1141836, 1153701, 1153708, 1152328, 1147025,\n", + " 1158226, 1145240, 1145750, 1145751, 1138638, 1148391, 1146189, 1146180,\n", + " 1148223, 1150445, 1149250, 1156473, 1141349, 1152013, 1165252, 1147807,\n", + " 1152031, 1154267, 1145255, 1145262, 1135516, 1146723, 1147019, 1141194,\n", + " 1141278, 1151795, 1143564, 1148300, 1135079, 1154420, 1146676, 1138404,\n", + " 1148720, 1144110, 1149810, 1154203, 1153124, 1153192, 1145106, 1150932,\n", + " 1152877, 1150356, 1151821, 1145640, 1148498, 1148505, 1149733, 1149737,\n", + " 1141419, 1136002, 1147737, 1149378, 1146975, 1153255, 1146623, 1146490,\n", + " 1135688, 1154056, 1153038, 1150085, 1137746, 1152622, 1155140, 1152826,\n", + " 1155337, 1151617, 1150588, 1136131, 1151440, 1152944, 1140457, 1145952,\n", + " 1146816, 1153303, 1138279, 1152294, 1156004, 1136028, 1158710, 1156621,\n", + " 1152928, 1151064, 1153918, 1150164, 1148040, 1145652, 1137048, 1148628,\n", + " 1158530, 1158540, 1137458, 1149946, 1154569, 1157510, 1135434, 1154928,\n", + " 1156505, 1157064, 1157069, 1145187, 1150465, 1138830, 1151788, 1165703,\n", + " 1152737, 1147810, 1143010, 1158308, 1155441, 1153359, 1162120, 1144361,\n", + " 1154530, 1157642, 1155375, 1140179, 1149321, 1146920, 1156463, 1155628,\n", + " 1156563, 1154555, 1158824, 1158828, 1153715, 1154033, 1156994, 1148835,\n", + " 1155635, 1153368, 1154240, 1143189, 1157439, 1155613, 1141627, 1155281,\n", + " 1151035, 1137167, 1137152, 1158126, 1156761, 1137323, 1134677, 1134674,\n", + " 1135605, 1148159, 1150671, 1155848, 1157685, 1157684, 1149145, 1161108,\n", + " 1156081, 1152209, 1152498, 1140380, 1156023, 1155884, 1157732, 1155971,\n", + " 1155975, 1135190, 1156812, 1154592, 1136896, 1158760, 1158764, 1158815,\n", + " 1152463, 1136480, 1153808, 1136646, 1134757, 1145484, 1140049, 1166424,\n", + " 1158558, 1151146, 1163813, 1155871, 1158003, 1158013, 1158006, 1144584,\n", + " 1150011, 1155521, 1142666, 1164159, 1157747, 1156045, 1162056, 1172279,\n", + " 1157946, 1153052, 1153045, 1155763, 1155770, 1167707, 1153842, 1156107,\n", + " 1138393, 1162922, 1150046, 1149063, 1145948, 1155479, 1153514, 1153519,\n", + " 1157600, 1138161, 1139286, 1139290, 1148769, 1148771, 1171509, 1146063,\n", + " 1146356, 1171255, 1140643, 1148600, 1148603, 1143143, 1166809, 1156191,\n", + " 1156189, 1159025, 1159032, 1161836, 1152247, 1160605, 1155588, 1162552,\n", + " 1144977, 1146509, 1144747, 1163522, 1155268, 1153212, 1153201, 1141471,\n", + " 1141459, 1151650, 1184820, 1157042, 1156737, 1156739, 1150317, 1144810,\n", + " 1144812, 1135567, 1165715, 1164741, 1164750, 1156300, 1163785, 1145228,\n", + " 1166462, 1147673, 1170316, 1142136, 1143038, 1147355, 1145892, 1145902,\n", + " 1153520, 1168659, 1151752, 1169538, 1143402, 1149565, 1154076, 1177934,\n", + " 1145673, 1169602, 1167817, 1171979, 1144681, 1145326, 1155172, 1165011,\n", + " 1156119, 1144346, 1144336, 1157534, 1138383, 1147746, 1154670, 1169162,\n", + " 1157331, 1138129, 1141043, 1180443, 1169359, 1173228, 1158623, 1173047,\n", + " 1149847, 1147423, 1169937, 1172488, 1170459, 1152353, 1152354, 1152360,\n", + " 1161130, 1172838, 1177984, 1173307, 1154027, 1152150, 1152151, 1171151,\n", + " 1167857, 1178099, 1151210, 1157153, 1168126, 1147711, 1151850, 1148141,\n", + " 1177415, 1155739, 1170321, 1140326, 1192652, 1172939, 1175742, 1166535,\n", + " 1154148, 1167517, 1180389, 1143420, 1178344, 1180552, 1171297, 1170178,\n", + " 1181245, 1153803, 1178171, 1164818, 1163099, 1153628, 1153621, 1179807,\n", + " 1180199, 1161255, 1162129, 1155262, 1177576, 1160199, 1157792, 1157795,\n", + " 1177584, 1151488, 1171623, 1157134, 1157128, 1164065, 1158253, 1153898,\n", + " 1191749, 1145626, 1163538, 1157483, 1157487, 1149755, 1152287, 1157761,\n", + " 1155990, 1187946, 1185327, 1158512, 1158517, 1158940, 1155890, 1155892,\n", + " 1177090, 1182908, 1146161, 1170034, 1139828, 1139831, 1139837, 1170435,\n", + " 1149668, 1149619, 1156055, 1173019, 1146394, 1146395, 1173058, 1186650,\n", + " 1194202, 1194319, 1162156, 1170881, 1186486, 1151774, 1181695, 1152113,\n", + " 1171201, 1191061, 1179317, 1172423, 1172429, 1158064, 1181628, 1166788,\n", + " 1180538, 1155958, 1190708, 1179769, 1190060, 1167471, 1182863, 1192018,\n", + " 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1140282, 1136349, 1141758, 1136223, 1136971, 1149834, 1139808,\n", + " 1145370, 1146982, 1139143, 1143360, 1143372, 1143363, 1146640, 1139615,\n", + " 1140772, 1139866, 1155689, 1147473, 1147476, 1147483, 1144636, 1148512,\n", + " 1146992, 1134701, 1135947, 1146661, 1138344, 1148546, 1153217, 1153220,\n", + " 1136742, 1155018, 1139364, 1147202, 1136683, 1150329, 1134715, 1146376,\n", + " 1137829, 1140540, 1140542, 1138112, 1138119, 1138356, 1135367, 1135202,\n", + " 1135210, 1134970, 1134960, 1141036, 1134794, 1136518, 1143377, 1138504,\n", + " 1137342, 1136610, 1144395, 1136662, 1137441, 1143321, 1136199, 1156146,\n", + " 1156159, 1139161, 1142607, 1135238, 1156339, 1158136, 1154141, 1137019,\n", + " 1156899, 1135535, 1138440, 1138445, 1160590, 1136594, 1135122, 1156603,\n", + " 1156606, 1147112, 1142611, 1142615, 1142616, 1135359, 1148531, 1139667,\n", + " 1138069, 1136087, 1136089, 1134992, 1158961, 1158974, 1160088, 1140034,\n", + " 1152696, 1139933, 1137598, 1138648, 1141963, 1152042, 1152044, 1140670,\n", + " 1137734, 1137728, 1147322, 1135549, 1137895, 1141088, 1141097, 1141100,\n", + " 1149001, 1139889, 1143767, 1137299, 1143225, 1137679, 1139039, 1140003,\n", + " 1146834, 1152713, 1141695, 1135860, 1154466, 1141224, 1136917, 1139730,\n", + " 1140598, 1141785, 1141300, 1147853, 1137074, 1149434, 1144428, 1141821,\n", + " 1165098, 1140160, 1140163, 1158600, 1144596, 1144598, 1136866, 1136864,\n", + " 1141578, 1135327, 1144179, 1137614, 1150906, 1138539, 1140501, 1137854,\n", + " 1147153, 1141365, 1153068, 1153069, 1163667, 1141664, 1149090, 1139019,\n", + " 1139510, 1140093, 1139127, 1144992, 1145001, 1143791, 1140984, 1145873,\n", + " 1143543, 1152976, 1139453, 1141925, 1146901, 1144242, 1150692, 1148313,\n", + " 1145980, 1143851, 1136277, 1146016, 1146024, 1146140, 1154323, 1154328,\n", + " 1141585, 1149928, 1139990, 1143293, 1143876, 1147543, 1147545, 1147540,\n", + " 1148763, 1147282, 1142825, 1142816, 1138669, 1149155, 1140346, 1157720,\n", + " 1136836, 1136843, 1139329, 1139328, 1144778, 1141490, 1142149, 1143345,\n", + " 1144765, 1144766, 1135876, 1150760, 1135819, 1146523, 1138024, 1143456,\n", + " 1143471, 1143457, 1137696, 1143937, 1147574, 1149073, 1147521, 1140360,\n", + " 1140364, 1137990, 1143075, 1147999, 1146949, 1146950, 1134902, 1134907,\n", + " 1139252, 1147131, 1148704, 1141836, 1153701, 1153708, 1152328, 1147025,\n", + " 1158226, 1145240, 1145750, 1145751, 1138638, 1148391, 1146189, 1146180,\n", + " 1148223, 1150445, 1149250, 1156473, 1141349, 1152013, 1165252, 1147807,\n", + " 1152031, 1154267, 1145255, 1145262, 1135516, 1146723, 1147019, 1141194,\n", + " 1141278, 1151795, 1143564, 1148300, 1135079, 1154420, 1146676, 1138404,\n", + " 1148720, 1144110, 1149810, 1154203, 1153124, 1153192, 1145106, 1150932,\n", + " 1152877, 1150356, 1151821, 1145640, 1148498, 1148505, 1149733, 1149737,\n", + " 1141419, 1136002, 1147737, 1149378, 1146975, 1153255, 1146623, 1146490,\n", + " 1135688, 1154056, 1153038, 1150085, 1137746, 1152622, 1155140, 1152826,\n", + " 1155337, 1151617, 1150588, 1136131, 1151440, 1152944, 1140457, 1145952,\n", + " 1146816, 1153303, 1138279, 1152294, 1156004, 1136028, 1158710, 1156621,\n", + " 1152928, 1151064, 1153918, 1150164, 1148040, 1145652, 1137048, 1148628,\n", + " 1158530, 1158540, 1137458, 1149946, 1154569, 1157510, 1135434, 1154928,\n", + " 1156505, 1157064, 1157069, 1145187, 1150465, 1138830, 1151788, 1165703,\n", + " 1152737, 1147810, 1143010, 1158308, 1155441, 1153359, 1162120, 1144361,\n", + " 1154530, 1157642, 1155375, 1140179, 1149321, 1146920, 1156463, 1155628,\n", + " 1156563, 1154555, 1158824, 1158828, 1153715, 1154033, 1156994, 1148835,\n", + " 1155635, 1153368, 1154240, 1143189, 1157439, 1155613, 1141627, 1155281,\n", + " 1151035, 1137167, 1137152, 1158126, 1156761, 1137323, 1134677, 1134674,\n", + " 1135605, 1148159, 1150671, 1155848, 1157685, 1157684, 1149145, 1161108,\n", + " 1156081, 1152209, 1152498, 1140380, 1156023, 1155884, 1157732, 1155971,\n", + " 1155975, 1135190, 1156812, 1154592, 1136896, 1158760, 1158764, 1158815,\n", + " 1152463, 1136480, 1153808, 1136646, 1134757, 1145484, 1140049, 1166424,\n", + " 1158558, 1151146, 1163813, 1155871, 1158003, 1158013, 1158006, 1144584,\n", + " 1150011, 1155521, 1142666, 1164159, 1157747, 1156045, 1162056, 1172279,\n", + " 1157946, 1153052, 1153045, 1155763, 1155770, 1167707, 1153842, 1156107,\n", + " 1138393, 1162922, 1150046, 1149063, 1145948, 1155479, 1153514, 1153519,\n", + " 1157600, 1138161, 1139286, 1139290, 1148769, 1148771, 1171509, 1146063,\n", + " 1146356, 1171255, 1140643, 1148600, 1148603, 1143143, 1166809, 1156191,\n", + " 1156189, 1159025, 1159032, 1161836, 1152247, 1160605, 1155588, 1162552,\n", + " 1144977, 1146509, 1144747, 1163522, 1155268, 1153212, 1153201, 1141471,\n", + " 1141459, 1151650, 1184820, 1157042, 1156737, 1156739, 1150317, 1144810,\n", + " 1144812, 1135567, 1165715, 1164741, 1164750, 1156300, 1163785, 1145228,\n", + " 1166462, 1147673, 1170316, 1142136, 1143038, 1147355, 1145892, 1145902,\n", + " 1153520, 1168659, 1151752, 1169538, 1143402, 1149565, 1154076, 1177934,\n", + " 1145673, 1169602, 1167817, 1171979, 1144681, 1145326, 1155172, 1165011,\n", + " 1156119, 1144346, 1144336, 1157534, 1138383, 1147746, 1154670, 1169162,\n", + " 1157331, 1138129, 1141043, 1180443, 1169359, 1173228, 1158623, 1173047,\n", + " 1149847, 1147423, 1169937, 1172488, 1170459, 1152353, 1152354, 1152360,\n", + " 1161130, 1172838, 1177984, 1173307, 1154027, 1152150, 1152151, 1171151,\n", + " 1167857, 1178099, 1151210, 1157153, 1168126, 1147711, 1151850, 1148141,\n", + " 1177415, 1155739, 1170321, 1140326, 1192652, 1172939, 1175742, 1166535,\n", + " 1154148, 1167517, 1180389, 1143420, 1178344, 1180552, 1171297, 1170178,\n", + " 1181245, 1153803, 1178171, 1164818, 1163099, 1153628, 1153621, 1179807,\n", + " 1180199, 1161255, 1162129, 1155262, 1177576, 1160199, 1157792, 1157795,\n", + " 1177584, 1151488, 1171623, 1157134, 1157128, 1164065, 1158253, 1153898,\n", + " 1191749, 1145626, 1163538, 1157483, 1157487, 1149755, 1152287, 1157761,\n", + " 1155990, 1187946, 1185327, 1158512, 1158517, 1158940, 1155890, 1155892,\n", + " 1177090, 1182908, 1146161, 1170034, 1139828, 1139831, 1139837, 1170435,\n", + " 1149668, 1149619, 1156055, 1173019, 1146394, 1146395, 1173058, 1186650,\n", + " 1194202, 1194319, 1162156, 1170881, 1186486, 1151774, 1181695, 1152113,\n", + " 1171201, 1191061, 1179317, 1172423, 1172429, 1158064, 1181628, 1166788,\n", + " 1180538, 1155958, 1190708, 1179769, 1190060, 1167471, 1182863, 1192018,\n", + " 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196011, 1196013, 1197178, 1199424, 1197744, 1195406, 1199736, 1197719,\n", + " 1195329, 1201094, 1199282, 1198832, 1198844, 1201577, 1201668, 1198697,\n", + " 1197301, 1198557, 1197512, 1194866, 1196685, 1194783, 1195494, 1196624,\n", + " 1196631, 1194649, 1195511, 1195263, 1197921, 1201992, 1198542, 1199519,\n", + " 1195895, 1199171, 1195740, 1197856, 1196977, 1196979, 1196521, 1194754,\n", + " 1195313, 1196840, 1198668, 1198036, 1195982, 1195145, 1195216, 1195265,\n", + " 1195270, 1195278, 1197136, 1196242, 1195245, 1197273, 1196109, 1194859,\n", + " 1195847, 1195026, 1195659, 1195541, 1197474, 1199344, 1195917, 1196283,\n", + " 1195351, 1199329, 1200949, 1200959, 1197124, 1199856, 1199060, 1198673,\n", + " 1194928, 1199628, 1200872, 1195017, 1196498, 1199021, 1197601, 1197609,\n", + " 1196727, 1195773, 1202618, 1200894, 1198428, 1199418, 1198811, 1201527,\n", + " 1201824, 1200450, 1199445, 1198791, 1201079, 1202635, 1201056, 1200913,\n", + " 1200918, 1194805, 1198488, 1199712, 1200553, 1199208, 1197097, 1202138,\n", + " 1200899, 1197546, 1200327, 1201566, 1195876, 1201291, 1201871, 1203329,\n", + " 1198562, 1196960, 1196963, 1196966, 1198338, 1200793, 1199606, 1199609,\n", + " 1195438, 1203113, 1195679, 1195664, 1196929, 1198932, 1196062, 1197822,\n", + " 1201143, 1198819, 1200974, 1195066, 1203077, 1197652, 1201960, 1196428],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196011, 1196013, 1197178, 1199424, 1197744, 1195406, 1199736, 1197719,\n", + " 1195329, 1201094, 1199282, 1198832, 1198844, 1201577, 1201668, 1198697,\n", + " 1197301, 1198557, 1197512, 1194866, 1196685, 1194783, 1195494, 1196624,\n", + " 1196631, 1194649, 1195511, 1195263, 1197921, 1201992, 1198542, 1199519,\n", + " 1195895, 1199171, 1195740, 1197856, 1196977, 1196979, 1196521, 1194754,\n", + " 1195313, 1196840, 1198668, 1198036, 1195982, 1195145, 1195216, 1195265,\n", + " 1195270, 1195278, 1197136, 1196242, 1195245, 1197273, 1196109, 1194859,\n", + " 1195847, 1195026, 1195659, 1195541, 1197474, 1199344, 1195917, 1196283,\n", + " 1195351, 1199329, 1200949, 1200959, 1197124, 1199856, 1199060, 1198673,\n", + " 1194928, 1199628, 1200872, 1195017, 1196498, 1199021, 1197601, 1197609,\n", + " 1196727, 1195773, 1202618, 1200894, 1198428, 1199418, 1198811, 1201527,\n", + " 1201824, 1200450, 1199445, 1198791, 1201079, 1202635, 1201056, 1200913,\n", + " 1200918, 1194805, 1198488, 1199712, 1200553, 1199208, 1197097, 1202138,\n", + " 1200899, 1197546, 1200327, 1201566, 1195876, 1201291, 1201871, 1203329,\n", + " 1198562, 1196960, 1196963, 1196966, 1198338, 1200793, 1199606, 1199609,\n", + " 1195438, 1203113, 1195679, 1195664, 1196929, 1198932, 1196062, 1197822,\n", + " 1201143, 1198819, 1200974, 1195066, 1203077, 1197652, 1201960, 1196428],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 2.9540e-01, -1.4920e-03, 1.1638e+00, ..., 7.7818e-02,\n", + " -1.3553e-03, -8.0530e-03],\n", + " [ 2.6681e-01, -7.6925e-04, 9.2925e-01, ..., 6.7754e-02,\n", + " -1.5585e-03, -6.5526e-03],\n", + " [ 2.3368e-01, -8.6910e-04, 8.4610e-01, ..., 7.0018e-02,\n", + " -1.6973e-03, -5.9908e-03],\n", + " ...,\n", + " [ 1.6239e-01, -3.2298e-04, 6.7106e-01, ..., 1.0001e-01,\n", + " -1.6367e-03, -4.6574e-03],\n", + " [ 6.3833e-02, -7.2017e-04, 5.8194e-01, ..., 1.0117e-01,\n", + " -1.2929e-03, -3.7967e-03],\n", + " [ 1.9266e-01, -4.1723e-04, 7.7628e-01, ..., 8.5587e-02,\n", + " -1.6128e-03, -5.3315e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[-7.5006e-03, 3.1146e-01, 2.0544e+00, ..., -1.0917e-02,\n", + " -3.0578e-02, -1.5080e-02],\n", + " [-4.2777e-04, 1.6505e+00, 1.4246e+00, ..., -8.4266e-03,\n", + " -2.4793e-02, -4.3883e-03],\n", + " [-8.2194e-03, 6.8385e-01, 2.1175e+00, ..., -2.8956e-03,\n", + " -2.9765e-02, -1.2824e-02],\n", + " ...,\n", + " [-1.0849e-02, 1.1656e-01, 2.3549e+00, ..., -7.2281e-03,\n", + " -3.2067e-02, -1.6427e-02],\n", + " [ 1.1451e+00, 3.3952e+00, 3.1653e+00, ..., 2.6979e+00,\n", + " -4.9155e-02, 3.5769e+00],\n", + " [ 3.9917e-01, 3.2204e+00, 2.7731e+00, ..., 3.9221e+00,\n", + " -5.6100e-02, 3.6001e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-2.0614e-03, 3.2970e-01, 7.5603e-02, ..., 1.3865e+00,\n", + " 1.9472e-02, -2.3843e-03],\n", + " [-1.2897e-03, 2.7309e-01, 1.9545e-01, ..., 1.4883e+00,\n", + " 1.1087e-01, -1.1598e-03],\n", + " [-4.0238e-03, 2.9549e-01, 2.4090e-01, ..., 1.3457e+00,\n", + " -2.0561e-03, -5.2124e-03],\n", + " ...,\n", + " [-6.1034e-04, 3.0292e-01, 1.5669e-01, ..., 1.4758e+00,\n", + " 3.1678e-01, 4.3052e-02],\n", + " [-1.5511e-03, 3.3288e-01, 1.4572e-01, ..., 1.4485e+00,\n", + " 1.1095e-01, -9.6725e-04],\n", + " [-1.4942e-03, 3.0816e-01, 1.5900e-01, ..., 1.4779e+00,\n", + " 1.3898e-01, -1.3427e-03]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-9.6097e-04, 6.3456e-01, 2.5581e-01, ..., -8.9169e-03,\n", + " 3.7899e-01, 4.5283e-01],\n", + " [ 2.0369e-01, 8.3817e-01, 5.5123e-01, ..., -1.1203e-02,\n", + " 5.2757e-01, 2.1057e-01],\n", + " [-4.0367e-04, 6.9124e-01, 4.2955e-01, ..., -8.4498e-03,\n", + " 1.8434e-01, 4.8497e-01],\n", + " ...,\n", + " [-9.5296e-04, 6.5686e-01, 3.1071e-01, ..., -8.1143e-03,\n", + " 2.0397e-01, 4.8656e-01],\n", + " [-7.5001e-04, 7.8674e-01, 4.1931e-01, ..., -7.5315e-03,\n", + " 2.5862e-01, 4.6759e-01],\n", + " [ 1.6203e-01, 8.0948e-01, 4.2182e-01, ..., -1.3330e-02,\n", + " 6.0568e-01, 2.3826e-01]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 65, 37, 104, 104, 104, 325, 214, 321, 377, 377, 377, 377,\n", + " 541, 541, 404, 404, 322, 883, 860, 627, 741, 843, 843, 796,\n", + " 826, 1030, 1030, 1077, 1077, 1015, 1015, 1099, 881, 838, 1088, 955,\n", + " 1088, 1088, 1088, 1195, 1247, 864, 1201, 1201, 983, 1325, 1358, 1433,\n", + " 1489, 1435, 1557, 1636, 1615, 1728, 2029, 1798, 2131, 1815, 1766, 2074,\n", + " 2136, 2337, 2319, 2407, 2266, 2510, 2529, 2421, 2537, 2583, 2622, 2675,\n", + " 2791, 2751, 2658, 3089, 3065, 3218, 3145, 3208, 3140, 3017, 3159, 3187,\n", + " 3187, 3306, 3448, 3272, 3272, 3272, 3272, 3430, 3598, 3609, 3600, 4177,\n", + " 3902, 3748, 3768, 4157, 4097, 4092, 4190, 3958, 3996, 4236, 4236, 4288,\n", + " 4333, 4399, 4305, 4378, 4379, 4419, 4519, 4565, 4528, 4579, 4724, 4768,\n", + " 4722, 4875, 4510, 4510, 4510, 4798, 5198, 5224, 5224, 4942, 4942, 5185,\n", + " 5298, 5006, 5408, 5030, 5041, 5220, 5431, 5328, 5415, 5274, 5274, 5569,\n", + " 5325, 5440, 5644, 5602, 5392, 5392, 5515, 5596, 5571, 5767, 5585, 5717,\n", + " 5828, 5685, 5970, 5983, 6180, 6180, 6228, 6228, 6228, 6296, 6296, 6016,\n", + " 6193, 6032, 6196, 6270, 6270, 6617, 6710, 6292, 6292, 6674, 6621, 6683,\n", + " 6683, 6683, 6601],\n", + " [ 10, 123, 103, 19, 122, 12, 70, 40, 128, 109, 29, 99,\n", + " 121, 68, 59, 50, 65, 8, 70, 76, 113, 66, 114, 69,\n", + " 72, 81, 16, 135, 95, 124, 33, 25, 86, 126, 87, 9,\n", + " 44, 38, 101, 71, 83, 122, 80, 108, 15, 120, 135, 119,\n", + " 56, 7, 27, 106, 36, 43, 86, 124, 115, 17, 109, 11,\n", + " 27, 73, 119, 27, 134, 48, 55, 123, 23, 84, 117, 5,\n", + " 78, 58, 39, 124, 131, 30, 1, 75, 75, 22, 2, 82,\n", + " 127, 133, 85, 96, 125, 115, 111, 81, 4, 129, 1, 107,\n", + " 52, 34, 124, 31, 131, 72, 129, 78, 30, 91, 32, 27,\n", + " 130, 27, 132, 75, 105, 27, 133, 42, 20, 14, 98, 102,\n", + " 85, 45, 57, 93, 21, 13, 5, 0, 113, 49, 3, 19,\n", + " 30, 62, 6, 77, 110, 61, 41, 39, 67, 112, 80, 116,\n", + " 30, 51, 64, 26, 46, 116, 89, 37, 24, 53, 17, 90,\n", + " 92, 118, 88, 60, 63, 94, 79, 54, 108, 70, 109, 97,\n", + " 35, 80, 69, 30, 74, 80, 45, 104, 95, 47, 12, 55,\n", + " 18, 28, 100]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1213, 1522, 1526, ..., 4665, 4150, 2748],\n", + " [ 138, 10, 233, ..., 5628, 5702, 5581]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 105, 129, 32, 58, 135, 135, 133, 135, 106, 83, 133, 75,\n", + " 58, 75, 83, 73, 105, 129, 73, 45, 32, 83, 105, 58,\n", + " 84, 105, 32, 80, 27, 73, 135, 108, 129, 115, 115, 84,\n", + " 115, 84, 58, 115, 58, 84, 133, 24, 83, 108, 83, 108,\n", + " 129, 24, 45, 108, 115, 73, 133, 32, 58, 24, 83, 135,\n", + " 75, 135, 115, 135, 58, 105, 133, 105, 115, 105, 27, 105,\n", + " 108, 45, 133, 83, 115, 27, 133, 32, 91, 105, 32, 27,\n", + " 133, 129, 45, 75, 58, 129, 106, 17, 108, 133, 135, 105,\n", + " 133, 84, 45, 108, 27, 84, 24, 115, 45, 105, 58, 84,\n", + " 106, 80, 32, 58, 84, 135, 135, 27, 73, 75, 73, 45,\n", + " 17, 75, 133, 24, 129, 108, 115, 73, 135, 91, 58, 115,\n", + " 27, 32, 91, 129, 115, 133, 27, 27, 80, 129, 84, 115,\n", + " 24, 32, 17, 24, 91, 91, 32, 105, 58, 84, 75, 115,\n", + " 91, 129, 27, 84, 84, 135, 24, 108, 115, 45, 27, 17,\n", + " 135, 73, 106, 27, 75, 32, 129, 108, 45, 24, 27, 24,\n", + " 73, 91, 17, 108, 135, 58, 27, 83, 45, 106, 133, 27,\n", + " 84, 58, 84, 32, 83, 24, 105, 27, 129, 129, 58, 58,\n", + " 84, 24, 32, 105, 83, 73, 27, 27, 45, 105, 133, 115,\n", + " 84, 17, 45, 106, 106, 17, 73, 91, 108, 129, 83, 105,\n", + " 106, 91, 75, 80, 91, 17, 17, 108, 105, 32, 115, 91,\n", + " 115, 91, 105, 129, 91, 75, 129, 106, 80, 91, 129, 45,\n", + " 133, 91, 91, 106, 108, 83, 17, 91, 58, 27, 84, 108,\n", + " 83, 129, 32, 45, 133, 129, 27, 135, 106, 91, 105, 135,\n", + " 27, 106, 27, 45, 75, 75, 106, 135, 73, 27, 106, 27,\n", + " 27, 115, 106, 27, 27, 27, 32, 106, 17, 17, 108, 45,\n", + " 32, 106, 105, 58, 133, 27, 17, 133, 73, 75, 27, 105,\n", + " 73, 91, 32, 84, 27, 91, 73, 27, 24, 17, 27, 133,\n", + " 17, 106, 24, 27, 17, 133, 27, 105, 24, 27, 91, 27,\n", + " 75, 17, 24, 27, 115, 133, 115, 32, 32, 108, 17, 80,\n", + " 75, 91, 45, 106, 108, 45, 27, 32, 108, 27, 108, 45,\n", + " 17, 83, 80, 75, 73, 73, 24, 24, 27, 133, 24, 58,\n", + " 73, 32, 58, 83, 129, 75, 17, 105, 32, 17, 80, 73,\n", + " 135, 75, 84, 80, 27, 58, 108, 75, 129, 84, 45, 24,\n", + " 24, 27, 73, 83, 80, 75, 80, 129, 133, 27, 105, 106,\n", + " 83, 80, 115, 17, 84, 80, 129, 75, 45, 83, 105, 80,\n", + " 106, 73, 27, 106, 45, 24, 80, 27, 32, 91, 135, 80,\n", + " 73, 135, 106, 91, 91, 58, 108, 73, 106, 135, 27, 108,\n", + " 75, 24, 83, 83, 73, 17, 17, 108, 80, 135, 75, 84,\n", + " 45, 83, 45, 80, 24, 80, 80, 58, 75, 133, 133, 80,\n", + " 115, 75, 80, 129, 129, 83, 83, 80, 84, 58, 80, 84,\n", + " 27, 27, 83, 108, 27, 32, 115, 135, 73, 24, 83, 135,\n", + " 17, 106, 80, 45, 135, 115, 84, 58],\n", + " [ 93, 9, 150, 67, 116, 52, 24, 204, 63, 14, 167, 109,\n", + " 252, 51, 103, 276, 216, 153, 178, 186, 302, 260, 409, 432,\n", + " 249, 446, 299, 834, 697, 624, 696, 229, 559, 616, 589, 399,\n", + " 793, 645, 555, 649, 498, 612, 737, 811, 1057, 562, 971, 982,\n", + " 762, 1322, 634, 1157, 1113, 1149, 556, 965, 705, 898, 995, 1071,\n", + " 1068, 1286, 964, 1135, 1182, 1380, 966, 1299, 1366, 1241, 1295, 1144,\n", + " 1375, 1573, 1252, 1420, 1254, 1360, 1515, 1410, 1462, 1464, 1426, 1362,\n", + " 1484, 1292, 1367, 1436, 1274, 1521, 1471, 1541, 1658, 1699, 1365, 1475,\n", + " 1675, 1551, 1488, 1383, 1711, 1617, 1555, 1614, 1883, 1761, 1888, 1757,\n", + " 2049, 1752, 1707, 1762, 1800, 1793, 1790, 1892, 1760, 1844, 1803, 1677,\n", + " 1852, 1825, 1937, 2133, 1805, 1780, 1894, 2073, 1948, 1811, 2118, 1919,\n", + " 1847, 2316, 2204, 1902, 2038, 1887, 2028, 2066, 2076, 2016, 2300, 1996,\n", + " 2052, 2086, 2050, 2177, 2135, 2169, 2071, 2232, 2111, 2140, 2173, 2267,\n", + " 2228, 2195, 2179, 2031, 2443, 2330, 2360, 2394, 2538, 2162, 2436, 2485,\n", + " 2420, 2305, 2501, 2433, 2489, 2369, 2497, 2564, 2593, 2516, 2482, 2578,\n", + " 2560, 2600, 2714, 2532, 2559, 2476, 2626, 2623, 2653, 2610, 2659, 2606,\n", + " 2666, 2624, 2462, 2738, 2605, 2555, 2807, 2764, 2878, 2716, 2759, 2704,\n", + " 2949, 2875, 2854, 2742, 2808, 2770, 2839, 2765, 2845, 2768, 2909, 3153,\n", + " 2940, 3161, 3045, 3229, 2979, 3086, 3152, 3264, 3310, 3213, 3139, 3241,\n", + " 3210, 3329, 3336, 3327, 3358, 3348, 3412, 3365, 3243, 3386, 3393, 3312,\n", + " 3338, 3510, 3479, 3446, 3457, 3573, 3520, 3643, 3496, 3680, 3637, 3554,\n", + " 3566, 3673, 3708, 3605, 3428, 3541, 3635, 3737, 3709, 3868, 3772, 3893,\n", + " 3929, 3825, 3791, 3820, 4156, 3897, 3876, 4041, 3978, 4023, 4116, 3783,\n", + " 3779, 4257, 4057, 3979, 3922, 3804, 3914, 3898, 3980, 4205, 4123, 4146,\n", + " 4231, 4182, 4301, 4287, 4095, 4265, 4189, 4219, 4254, 4276, 4339, 4260,\n", + " 4264, 4413, 4315, 4289, 4346, 4235, 4341, 4197, 4373, 4335, 4334, 4279,\n", + " 4343, 4369, 4284, 4351, 4326, 4436, 4453, 4392, 4363, 4414, 4401, 4410,\n", + " 4504, 4407, 4691, 4420, 4456, 4465, 4478, 4709, 4388, 4463, 4468, 4443,\n", + " 4563, 4444, 4445, 4648, 4541, 4564, 4644, 4610, 4427, 4549, 4550, 4615,\n", + " 4716, 4764, 4656, 4905, 4925, 4813, 4913, 4817, 4713, 4739, 4886, 4747,\n", + " 4951, 5217, 5076, 4850, 4881, 5044, 4940, 5075, 4827, 5166, 5029, 5286,\n", + " 4963, 5063, 5153, 5238, 5194, 5128, 4866, 4989, 4988, 4862, 4972, 5090,\n", + " 5116, 5155, 5134, 5009, 5089, 5310, 5129, 5150, 5339, 5201, 5276, 5378,\n", + " 5329, 5260, 5402, 5196, 5406, 5367, 5385, 5510, 5454, 5452, 5389, 5464,\n", + " 5636, 5430, 5474, 5457, 5460, 5537, 5442, 5463, 5373, 5633, 5517, 5570,\n", + " 5674, 5518, 5471, 5397, 5533, 5577, 5700, 5862, 5486, 5547, 5851, 5836,\n", + " 5597, 5686, 5734, 5505, 5719, 5704, 5647, 5705, 5702, 5968, 6064, 5739,\n", + " 5792, 5805, 5793, 5653, 5582, 5616, 6178, 5903, 6133, 6210, 5829, 5946,\n", + " 5929, 6039, 6332, 6174, 5893, 6232, 6434, 6488, 6044, 6138, 6645, 6269,\n", + " 6489, 6471, 6260, 6376, 6475, 6438, 6194, 6421, 6606, 6455, 6467, 6417,\n", + " 6626, 6558, 6319, 6395, 6356, 6449, 6481, 6610, 6699, 6459, 6630, 6738,\n", + " 6725, 6677, 6689, 6693, 6732, 6560, 6548, 6735]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 69, 69, 69, ..., 5702, 5702, 5702],\n", + " [ 247, 625, 234, ..., 100, 234, 205]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 234, 195, 601, ..., 446, 384, 16],\n", + " [ 58, 117, 13, ..., 5718, 5644, 5525]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5493, 523, 5702, ..., 2972, 71, 4606],\n", + " [ 41, 57, 189, ..., 6679, 6682, 6482]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 148, 148, 148, ..., 5702, 5702, 5702],\n", + " [2507, 3405, 1636, ..., 4150, 4792, 4245]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 27, 27, 27, ..., 6674, 6621, 6621],\n", + " [ 292, 1555, 3608, ..., 3053, 3053, 3093]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006456\n", + "sampling 0.006276\n", + "noi time: 0.00289\n", + "get_vertex_data call: 0.032539\n", + "noi group time: 0.003568\n", + "eoi_group_time: 0.016388\n", + "second half: 0.223658\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31145, 2949, 23798, ..., 1124620, 1119687, 1118692],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31145, 2949, 23798, ..., 1124620, 1119687, 1118692],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1216253, 1216139, 1203793, ..., 1938525, 1928579, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1216253, 1216139, 1203793, ..., 1938525, 1928579, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1137436, 1141424, 1140284, 1135926, 1135933, 1135726, 1141758,\n", + " 1138320, 1138335, 1136969, 1141443, 1143600, 1143615, 1139808, 1154774,\n", + " 1137268, 1138930, 1145051, 1150390, 1146644, 1139615, 1145282, 1139857,\n", + " 1136950, 1136956, 1149216, 1143820, 1147473, 1147483, 1135992, 1135999,\n", + " 1142894, 1153940, 1144636, 1135260, 1149038, 1146995, 1146996, 1153012,\n", + " 1153018, 1146656, 1146472, 1152666, 1152664, 1147094, 1137220, 1155014,\n", + " 1136683, 1136685, 1150329, 1152427, 1146377, 1138745, 1140537, 1140540,\n", + " 1138112, 1138126, 1138366, 1134735, 1140952, 1162460, 1135367, 1135202,\n", + " 1154739, 1141036, 1136289, 1136300, 1134794, 1157442, 1136519, 1138504,\n", + " 1137329, 1137342, 1137693, 1144789, 1144395, 1137534, 1157395, 1157399,\n", + " 1157393, 1157397, 1136581, 1136204, 1156159, 1156150, 1139161, 1135583,\n", + " 1135664, 1138514, 1138524, 1138585, 1156909, 1139684, 1139685, 1138319,\n", + " 1157703, 1138436, 1138440, 1138445, 1140079, 1138461, 1160590, 1160579,\n", + " 1137493, 1137920, 1136594, 1158386, 1149328, 1156605, 1156606, 1147112,\n", + " 1142611, 1135030, 1135359, 1138185, 1158980, 1158984, 1148531, 1135760,\n", + " 1135772, 1139667, 1138067, 1138070, 1138079, 1134992, 1152651, 1135779,\n", + " 1142906, 1159011, 1143631, 1139933, 1139934, 1138148, 1137127, 1134891,\n", + " 1146075, 1140557, 1152044, 1139069, 1136054, 1140670, 1137728, 1134922,\n", + " 1146208, 1134742, 1134750, 1134741, 1136997, 1135549, 1141088, 1141095,\n", + " 1144138, 1145347, 1141980, 1143767, 1137297, 1143225, 1139032, 1139033,\n", + " 1159667, 1149968, 1149979, 1149982, 1140467, 1141229, 1141223, 1136917,\n", + " 1139741, 1143667, 1143677, 1137188, 1144650, 1134978, 1144428, 1138482,\n", + " 1142050, 1143153, 1158749, 1137766, 1139190, 1137060, 1137071, 1138708,\n", + " 1140110, 1142922, 1143107, 1143111, 1144596, 1142845, 1144182, 1143745,\n", + " 1134829, 1139560, 1158698, 1138529, 1138537, 1140501, 1147153, 1136378,\n", + " 1141365, 1141367, 1153068, 1149088, 1149097, 1153556, 1139508, 1139510,\n", + " 1140082, 1139127, 1145001, 1145200, 1147888, 1147901, 1139171, 1140990,\n", + " 1146702, 1141565, 1147050, 1145873, 1138992, 1141925, 1146901, 1144242,\n", + " 1137149, 1150255, 1139405, 1137571, 1134850, 1143851, 1136287, 1146024,\n", + " 1150601, 1138085, 1141585, 1149928, 1139990, 1143293, 1143294, 1147541,\n", + " 1147540, 1148763, 1147282, 1142816, 1138660, 1140346, 1147461, 1149366,\n", + " 1142585, 1136836, 1136843, 1139329, 1144768, 1144779, 1136445, 1142126,\n", + " 1142159, 1143345, 1144766, 1144080, 1144086, 1138600, 1139973, 1150294,\n", + " 1146514, 1146523, 1143456, 1140487, 1143949, 1140829, 1140823, 1146580,\n", + " 1147574, 1146636, 1147521, 1140364, 1137990, 1137994, 1168914, 1144222,\n", + " 1147984, 1147995, 1147999, 1134899, 1134907, 1139249, 1154495, 1148704,\n", + " 1143310, 1150997, 1146751, 1148476, 1153701, 1152328, 1152335, 1147027,\n", + " 1147971, 1158225, 1158228, 1147880, 1145237, 1145240, 1145750, 1145751,\n", + " 1142369, 1148394, 1151242, 1152530, 1151182, 1150445, 1148928, 1148825,\n", + " 1154437, 1149791, 1149777, 1144514, 1144526, 1150348, 1154819, 1165262,\n", + " 1151473, 1145255, 1145256, 1139914, 1146723, 1140572, 1140402, 1150112,\n", + " 1150127, 1141949, 1150744, 1141278, 1148744, 1148461, 1147653, 1143560,\n", + " 1143552, 1151717, 1152079, 1137724, 1135079, 1135083, 1147866, 1154420,\n", + " 1158786, 1146684, 1138872, 1152441, 1157968, 1157972, 1148720, 1148724,\n", + " 1148725, 1148731, 1145862, 1147627, 1139938, 1143983, 1154202, 1154166,\n", + " 1153186, 1153188, 1145104, 1152915, 1150935, 1152878, 1150356, 1155088,\n", + " 1155089, 1147442, 1151816, 1151821, 1152581, 1151906, 1151908, 1154183,\n", + " 1154190, 1145640, 1148498, 1146565, 1141420, 1141419, 1152784, 1150637,\n", + " 1149391, 1150890, 1148947, 1146969, 1146975, 1146967, 1150219, 1146623,\n", + " 1151397, 1144476, 1144472, 1135688, 1152109, 1146280, 1146287, 1145550,\n", + " 1137746, 1146307, 1146304, 1140521, 1140527, 1151964, 1154123, 1157824,\n", + " 1152673, 1139575, 1151573, 1151617, 1136140, 1136788, 1152957, 1140459,\n", + " 1153387, 1140935, 1145952, 1152898, 1152903, 1152341, 1146816, 1156826,\n", + " 1153311, 1138275, 1138276, 1138279, 1138281, 1152295, 1136028, 1151191,\n", + " 1140674, 1140684, 1152928, 1151056, 1151064, 1151067, 1151071, 1156422,\n", + " 1150101, 1137405, 1150158, 1150172, 1148040, 1152602, 1155218, 1149804,\n", + " 1148628, 1158530, 1158540, 1137458, 1149944, 1155376, 1142041, 1135434,\n", + " 1157547, 1142387, 1150872, 1148892, 1157064, 1157069, 1155412, 1151251,\n", + " 1150465, 1150475, 1156638, 1157912, 1150824, 1156935, 1157777, 1158306,\n", + " 1158308, 1158311, 1155441, 1154536, 1154528, 1145760, 1145771, 1156919,\n", + " 1150488, 1156207, 1151379, 1158626, 1156649, 1156653, 1155122, 1152527,\n", + " 1155755, 1145797, 1156460, 1156463, 1168238, 1155675, 1155628, 1154547,\n", + " 1155576, 1158824, 1158325, 1148836, 1148839, 1155646, 1153365, 1158355,\n", + " 1143254, 1154644, 1154250, 1137355, 1154902, 1163127, 1143189, 1160911,\n", + " 1159629, 1137167, 1137152, 1153333, 1153786, 1137385, 1138258, 1135601,\n", + " 1158665, 1149145, 1159260, 1156085, 1140633, 1152220, 1159203, 1159213,\n", + " 1152496, 1140380, 1140374, 1142466, 1155975, 1158840, 1156811, 1155404,\n", + " 1149696, 1136896, 1158815, 1158803, 1152463, 1151615, 1136481, 1136494,\n", + " 1161625, 1147586, 1153112, 1156490, 1153808, 1158220, 1134757, 1157858,\n", + " 1157860, 1158558, 1153834, 1156516, 1146123, 1146126, 1158007, 1158006,\n", + " 1158256, 1155521, 1155529, 1155535, 1142666, 1157747, 1167359, 1159057,\n", + " 1157946, 1153052, 1153045, 1172995, 1144156, 1153842, 1156098, 1150035,\n", + " 1150046, 1150041, 1149063, 1155480, 1153514, 1153519, 1164856, 1147300,\n", + " 1158680, 1138161, 1156787, 1149963, 1139782, 1139788, 1154590, 1160758,\n", + " 1160764, 1139592, 1148025, 1156987, 1171515, 1146063, 1163452, 1140134,\n", + " 1140643, 1141862, 1148600, 1148603, 1143139, 1143146, 1158643, 1156181,\n", + " 1159025, 1159032, 1159038, 1152247, 1165591, 1167538, 1155588, 1155598,\n", + " 1155590, 1160501, 1151218, 1151220, 1138674, 1148571, 1158405, 1146509,\n", + " 1170998, 1169261, 1144736, 1144739, 1144747, 1152776, 1163522, 1163527,\n", + " 1141471, 1147426, 1147438, 1157050, 1182244, 1182247, 1156737, 1156739,\n", + " 1157955, 1167372, 1171040, 1144812, 1135561, 1135567, 1164750, 1180496,\n", + " 1142733, 1156303, 1145728, 1148683, 1163935, 1145228, 1169282, 1155320,\n", + " 1166462, 1171687, 1169510, 1144972, 1144973, 1170357, 1162288, 1147694,\n", + " 1145447, 1165746, 1170502, 1139351, 1145902, 1153520, 1152198, 1143402,\n", + " 1169728, 1158722, 1158734, 1154076, 1147338, 1160030, 1145668, 1169602,\n", + " 1156308, 1166653, 1145326, 1166198, 1180418, 1165011, 1161781, 1144344,\n", + " 1144346, 1144336, 1157534, 1157528, 1138376, 1138383, 1147746, 1154670,\n", + " 1154884, 1154890, 1157331, 1141051, 1141043, 1169359, 1149452, 1147492,\n", + " 1138609, 1158154, 1171529, 1149689, 1158611, 1149847, 1147416, 1147423,\n", + " 1155494, 1160539, 1152353, 1166600, 1143172, 1149402, 1148667, 1148325,\n", + " 1177207, 1165907, 1173307, 1152150, 1152152, 1153754, 1159652, 1151210,\n", + " 1151697, 1157158, 1157153, 1157373, 1157375, 1147708, 1147711, 1157593,\n", + " 1155735, 1165120, 1175591, 1160990, 1178857, 1179707, 1181207, 1163988,\n", + " 1174927, 1171823, 1180238, 1154148, 1149169, 1149173, 1168481, 1143420,\n", + " 1179243, 1166299, 1171301, 1153803, 1153630, 1151509, 1182651, 1182476,\n", + " 1166554, 1161255, 1176523, 1155262, 1180148, 1154718, 1157792, 1171623,\n", + " 1180036, 1172154, 1153898, 1153899, 1162403, 1145626, 1178028, 1178757,\n", + " 1157483, 1179086, 1149755, 1146242, 1155987, 1155990, 1158512, 1155899,\n", + " 1182896, 1159872, 1191815, 1189641, 1140393, 1168273, 1182330, 1180164,\n", + " 1168543, 1169062, 1177772, 1189335, 1166227, 1179090, 1182337, 1181548,\n", + " 1164338, 1184278, 1147182, 1156162, 1190628, 1190629, 1164133, 1139828,\n", + " 1139831, 1139837, 1150265, 1167135, 1154814, 1154812, 1188612, 1183890,\n", + " 1156055, 1151978, 1181453, 1182704, 1146394, 1146399, 1173058, 1176218,\n", + " 1149544, 1178236, 1192426, 1193995, 1190246, 1188533, 1171355, 1192436,\n", + " 1179845, 1162148, 1192454, 1170150, 1152115, 1152124, 1176041, 1171201,\n", + " 1186419, 1186422, 1186423, 1172405, 1170128, 1189577, 1172976, 1180998,\n", + " 1156681, 1172423, 1158064, 1182828, 1166785, 1145397, 1185853, 1177818,\n", + " 1183809, 1155962, 1183611, 1178306, 1162661, 1192679, 1191142, 1179623,\n", + " 1190187, 1182409, 1194256, 1184933, 1184641], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1137436, 1141424, 1140284, 1135926, 1135933, 1135726, 1141758,\n", + " 1138320, 1138335, 1136969, 1141443, 1143600, 1143615, 1139808, 1154774,\n", + " 1137268, 1138930, 1145051, 1150390, 1146644, 1139615, 1145282, 1139857,\n", + " 1136950, 1136956, 1149216, 1143820, 1147473, 1147483, 1135992, 1135999,\n", + " 1142894, 1153940, 1144636, 1135260, 1149038, 1146995, 1146996, 1153012,\n", + " 1153018, 1146656, 1146472, 1152666, 1152664, 1147094, 1137220, 1155014,\n", + " 1136683, 1136685, 1150329, 1152427, 1146377, 1138745, 1140537, 1140540,\n", + " 1138112, 1138126, 1138366, 1134735, 1140952, 1162460, 1135367, 1135202,\n", + " 1154739, 1141036, 1136289, 1136300, 1134794, 1157442, 1136519, 1138504,\n", + " 1137329, 1137342, 1137693, 1144789, 1144395, 1137534, 1157395, 1157399,\n", + " 1157393, 1157397, 1136581, 1136204, 1156159, 1156150, 1139161, 1135583,\n", + " 1135664, 1138514, 1138524, 1138585, 1156909, 1139684, 1139685, 1138319,\n", + " 1157703, 1138436, 1138440, 1138445, 1140079, 1138461, 1160590, 1160579,\n", + " 1137493, 1137920, 1136594, 1158386, 1149328, 1156605, 1156606, 1147112,\n", + " 1142611, 1135030, 1135359, 1138185, 1158980, 1158984, 1148531, 1135760,\n", + " 1135772, 1139667, 1138067, 1138070, 1138079, 1134992, 1152651, 1135779,\n", + " 1142906, 1159011, 1143631, 1139933, 1139934, 1138148, 1137127, 1134891,\n", + " 1146075, 1140557, 1152044, 1139069, 1136054, 1140670, 1137728, 1134922,\n", + " 1146208, 1134742, 1134750, 1134741, 1136997, 1135549, 1141088, 1141095,\n", + " 1144138, 1145347, 1141980, 1143767, 1137297, 1143225, 1139032, 1139033,\n", + " 1159667, 1149968, 1149979, 1149982, 1140467, 1141229, 1141223, 1136917,\n", + " 1139741, 1143667, 1143677, 1137188, 1144650, 1134978, 1144428, 1138482,\n", + " 1142050, 1143153, 1158749, 1137766, 1139190, 1137060, 1137071, 1138708,\n", + " 1140110, 1142922, 1143107, 1143111, 1144596, 1142845, 1144182, 1143745,\n", + " 1134829, 1139560, 1158698, 1138529, 1138537, 1140501, 1147153, 1136378,\n", + " 1141365, 1141367, 1153068, 1149088, 1149097, 1153556, 1139508, 1139510,\n", + " 1140082, 1139127, 1145001, 1145200, 1147888, 1147901, 1139171, 1140990,\n", + " 1146702, 1141565, 1147050, 1145873, 1138992, 1141925, 1146901, 1144242,\n", + " 1137149, 1150255, 1139405, 1137571, 1134850, 1143851, 1136287, 1146024,\n", + " 1150601, 1138085, 1141585, 1149928, 1139990, 1143293, 1143294, 1147541,\n", + " 1147540, 1148763, 1147282, 1142816, 1138660, 1140346, 1147461, 1149366,\n", + " 1142585, 1136836, 1136843, 1139329, 1144768, 1144779, 1136445, 1142126,\n", + " 1142159, 1143345, 1144766, 1144080, 1144086, 1138600, 1139973, 1150294,\n", + " 1146514, 1146523, 1143456, 1140487, 1143949, 1140829, 1140823, 1146580,\n", + " 1147574, 1146636, 1147521, 1140364, 1137990, 1137994, 1168914, 1144222,\n", + " 1147984, 1147995, 1147999, 1134899, 1134907, 1139249, 1154495, 1148704,\n", + " 1143310, 1150997, 1146751, 1148476, 1153701, 1152328, 1152335, 1147027,\n", + " 1147971, 1158225, 1158228, 1147880, 1145237, 1145240, 1145750, 1145751,\n", + " 1142369, 1148394, 1151242, 1152530, 1151182, 1150445, 1148928, 1148825,\n", + " 1154437, 1149791, 1149777, 1144514, 1144526, 1150348, 1154819, 1165262,\n", + " 1151473, 1145255, 1145256, 1139914, 1146723, 1140572, 1140402, 1150112,\n", + " 1150127, 1141949, 1150744, 1141278, 1148744, 1148461, 1147653, 1143560,\n", + " 1143552, 1151717, 1152079, 1137724, 1135079, 1135083, 1147866, 1154420,\n", + " 1158786, 1146684, 1138872, 1152441, 1157968, 1157972, 1148720, 1148724,\n", + " 1148725, 1148731, 1145862, 1147627, 1139938, 1143983, 1154202, 1154166,\n", + " 1153186, 1153188, 1145104, 1152915, 1150935, 1152878, 1150356, 1155088,\n", + " 1155089, 1147442, 1151816, 1151821, 1152581, 1151906, 1151908, 1154183,\n", + " 1154190, 1145640, 1148498, 1146565, 1141420, 1141419, 1152784, 1150637,\n", + " 1149391, 1150890, 1148947, 1146969, 1146975, 1146967, 1150219, 1146623,\n", + " 1151397, 1144476, 1144472, 1135688, 1152109, 1146280, 1146287, 1145550,\n", + " 1137746, 1146307, 1146304, 1140521, 1140527, 1151964, 1154123, 1157824,\n", + " 1152673, 1139575, 1151573, 1151617, 1136140, 1136788, 1152957, 1140459,\n", + " 1153387, 1140935, 1145952, 1152898, 1152903, 1152341, 1146816, 1156826,\n", + " 1153311, 1138275, 1138276, 1138279, 1138281, 1152295, 1136028, 1151191,\n", + " 1140674, 1140684, 1152928, 1151056, 1151064, 1151067, 1151071, 1156422,\n", + " 1150101, 1137405, 1150158, 1150172, 1148040, 1152602, 1155218, 1149804,\n", + " 1148628, 1158530, 1158540, 1137458, 1149944, 1155376, 1142041, 1135434,\n", + " 1157547, 1142387, 1150872, 1148892, 1157064, 1157069, 1155412, 1151251,\n", + " 1150465, 1150475, 1156638, 1157912, 1150824, 1156935, 1157777, 1158306,\n", + " 1158308, 1158311, 1155441, 1154536, 1154528, 1145760, 1145771, 1156919,\n", + " 1150488, 1156207, 1151379, 1158626, 1156649, 1156653, 1155122, 1152527,\n", + " 1155755, 1145797, 1156460, 1156463, 1168238, 1155675, 1155628, 1154547,\n", + " 1155576, 1158824, 1158325, 1148836, 1148839, 1155646, 1153365, 1158355,\n", + " 1143254, 1154644, 1154250, 1137355, 1154902, 1163127, 1143189, 1160911,\n", + " 1159629, 1137167, 1137152, 1153333, 1153786, 1137385, 1138258, 1135601,\n", + " 1158665, 1149145, 1159260, 1156085, 1140633, 1152220, 1159203, 1159213,\n", + " 1152496, 1140380, 1140374, 1142466, 1155975, 1158840, 1156811, 1155404,\n", + " 1149696, 1136896, 1158815, 1158803, 1152463, 1151615, 1136481, 1136494,\n", + " 1161625, 1147586, 1153112, 1156490, 1153808, 1158220, 1134757, 1157858,\n", + " 1157860, 1158558, 1153834, 1156516, 1146123, 1146126, 1158007, 1158006,\n", + " 1158256, 1155521, 1155529, 1155535, 1142666, 1157747, 1167359, 1159057,\n", + " 1157946, 1153052, 1153045, 1172995, 1144156, 1153842, 1156098, 1150035,\n", + " 1150046, 1150041, 1149063, 1155480, 1153514, 1153519, 1164856, 1147300,\n", + " 1158680, 1138161, 1156787, 1149963, 1139782, 1139788, 1154590, 1160758,\n", + " 1160764, 1139592, 1148025, 1156987, 1171515, 1146063, 1163452, 1140134,\n", + " 1140643, 1141862, 1148600, 1148603, 1143139, 1143146, 1158643, 1156181,\n", + " 1159025, 1159032, 1159038, 1152247, 1165591, 1167538, 1155588, 1155598,\n", + " 1155590, 1160501, 1151218, 1151220, 1138674, 1148571, 1158405, 1146509,\n", + " 1170998, 1169261, 1144736, 1144739, 1144747, 1152776, 1163522, 1163527,\n", + " 1141471, 1147426, 1147438, 1157050, 1182244, 1182247, 1156737, 1156739,\n", + " 1157955, 1167372, 1171040, 1144812, 1135561, 1135567, 1164750, 1180496,\n", + " 1142733, 1156303, 1145728, 1148683, 1163935, 1145228, 1169282, 1155320,\n", + " 1166462, 1171687, 1169510, 1144972, 1144973, 1170357, 1162288, 1147694,\n", + " 1145447, 1165746, 1170502, 1139351, 1145902, 1153520, 1152198, 1143402,\n", + " 1169728, 1158722, 1158734, 1154076, 1147338, 1160030, 1145668, 1169602,\n", + " 1156308, 1166653, 1145326, 1166198, 1180418, 1165011, 1161781, 1144344,\n", + " 1144346, 1144336, 1157534, 1157528, 1138376, 1138383, 1147746, 1154670,\n", + " 1154884, 1154890, 1157331, 1141051, 1141043, 1169359, 1149452, 1147492,\n", + " 1138609, 1158154, 1171529, 1149689, 1158611, 1149847, 1147416, 1147423,\n", + " 1155494, 1160539, 1152353, 1166600, 1143172, 1149402, 1148667, 1148325,\n", + " 1177207, 1165907, 1173307, 1152150, 1152152, 1153754, 1159652, 1151210,\n", + " 1151697, 1157158, 1157153, 1157373, 1157375, 1147708, 1147711, 1157593,\n", + " 1155735, 1165120, 1175591, 1160990, 1178857, 1179707, 1181207, 1163988,\n", + " 1174927, 1171823, 1180238, 1154148, 1149169, 1149173, 1168481, 1143420,\n", + " 1179243, 1166299, 1171301, 1153803, 1153630, 1151509, 1182651, 1182476,\n", + " 1166554, 1161255, 1176523, 1155262, 1180148, 1154718, 1157792, 1171623,\n", + " 1180036, 1172154, 1153898, 1153899, 1162403, 1145626, 1178028, 1178757,\n", + " 1157483, 1179086, 1149755, 1146242, 1155987, 1155990, 1158512, 1155899,\n", + " 1182896, 1159872, 1191815, 1189641, 1140393, 1168273, 1182330, 1180164,\n", + " 1168543, 1169062, 1177772, 1189335, 1166227, 1179090, 1182337, 1181548,\n", + " 1164338, 1184278, 1147182, 1156162, 1190628, 1190629, 1164133, 1139828,\n", + " 1139831, 1139837, 1150265, 1167135, 1154814, 1154812, 1188612, 1183890,\n", + " 1156055, 1151978, 1181453, 1182704, 1146394, 1146399, 1173058, 1176218,\n", + " 1149544, 1178236, 1192426, 1193995, 1190246, 1188533, 1171355, 1192436,\n", + " 1179845, 1162148, 1192454, 1170150, 1152115, 1152124, 1176041, 1171201,\n", + " 1186419, 1186422, 1186423, 1172405, 1170128, 1189577, 1172976, 1180998,\n", + " 1156681, 1172423, 1158064, 1182828, 1166785, 1145397, 1185853, 1177818,\n", + " 1183809, 1155962, 1183611, 1178306, 1162661, 1192679, 1191142, 1179623,\n", + " 1190187, 1182409, 1194256, 1184933, 1184641], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195202, 1196011, 1197451, 1199424, 1199302, 1198244, 1197719, 1198731,\n", + " 1199282, 1199293, 1198449, 1202255, 1202119, 1194635, 1199248, 1202803,\n", + " 1202275, 1198557, 1197383, 1194748, 1194649, 1194642, 1195263, 1201992,\n", + " 1196031, 1198095, 1195888, 1202902, 1199171, 1195740, 1197856, 1194759,\n", + " 1199371, 1197104, 1196845, 1196237, 1198958, 1196717, 1195145, 1195148,\n", + " 1197139, 1197141, 1200761, 1196242, 1198219, 1195841, 1195026, 1198915,\n", + " 1195541, 1202916, 1197640, 1196283, 1195351, 1198282, 1199060, 1197291,\n", + " 1199628, 1197675, 1197994, 1200076, 1199154, 1199038, 1199231, 1199676,\n", + " 1194786, 1200052, 1196508, 1200668, 1197970, 1196727, 1195771, 1195773,\n", + " 1200892, 1199555, 1201827, 1200456, 1201169, 1200501, 1200503, 1199445,\n", + " 1194803, 1194805, 1202641, 1200363, 1195815, 1200555, 1199208, 1196883,\n", + " 1200194, 1196779, 1201442, 1202239, 1200899, 1202338, 1199976, 1197539,\n", + " 1198478, 1195601, 1201871, 1202210, 1199925, 1199929, 1197919, 1198561,\n", + " 1196960, 1196966, 1202545, 1198525, 1195676, 1195664, 1200684, 1198911,\n", + " 1195415, 1197060, 1197816, 1197406, 1203102, 1194730, 1198148, 1198824,\n", + " 1203316, 1200011, 1199786, 1198819, 1200974, 1197652, 1197655, 1197035,\n", + " 1197026, 1194908, 1194911, 1203162], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195202, 1196011, 1197451, 1199424, 1199302, 1198244, 1197719, 1198731,\n", + " 1199282, 1199293, 1198449, 1202255, 1202119, 1194635, 1199248, 1202803,\n", + " 1202275, 1198557, 1197383, 1194748, 1194649, 1194642, 1195263, 1201992,\n", + " 1196031, 1198095, 1195888, 1202902, 1199171, 1195740, 1197856, 1194759,\n", + " 1199371, 1197104, 1196845, 1196237, 1198958, 1196717, 1195145, 1195148,\n", + " 1197139, 1197141, 1200761, 1196242, 1198219, 1195841, 1195026, 1198915,\n", + " 1195541, 1202916, 1197640, 1196283, 1195351, 1198282, 1199060, 1197291,\n", + " 1199628, 1197675, 1197994, 1200076, 1199154, 1199038, 1199231, 1199676,\n", + " 1194786, 1200052, 1196508, 1200668, 1197970, 1196727, 1195771, 1195773,\n", + " 1200892, 1199555, 1201827, 1200456, 1201169, 1200501, 1200503, 1199445,\n", + " 1194803, 1194805, 1202641, 1200363, 1195815, 1200555, 1199208, 1196883,\n", + " 1200194, 1196779, 1201442, 1202239, 1200899, 1202338, 1199976, 1197539,\n", + " 1198478, 1195601, 1201871, 1202210, 1199925, 1199929, 1197919, 1198561,\n", + " 1196960, 1196966, 1202545, 1198525, 1195676, 1195664, 1200684, 1198911,\n", + " 1195415, 1197060, 1197816, 1197406, 1203102, 1194730, 1198148, 1198824,\n", + " 1203316, 1200011, 1199786, 1198819, 1200974, 1197652, 1197655, 1197035,\n", + " 1197026, 1194908, 1194911, 1203162], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 1.5044e-01, -5.4931e-04, 6.5964e-01, ..., 8.6461e-02,\n", + " -1.7376e-03, -4.4631e-03],\n", + " [ 3.0903e-01, -1.2985e-03, 1.0744e+00, ..., 6.1682e-02,\n", + " -1.4250e-03, -7.6085e-03],\n", + " [ 1.2422e-01, -7.1834e-04, 5.8384e-01, ..., 8.7296e-02,\n", + " -1.7097e-03, -4.5512e-03],\n", + " ...,\n", + " [ 3.0903e-01, -1.2985e-03, 1.0744e+00, ..., 6.1682e-02,\n", + " -1.4250e-03, -7.6085e-03],\n", + " [ 1.0413e-01, -4.7466e-04, 5.0893e-01, ..., 9.0270e-02,\n", + " -1.7565e-03, -3.6686e-03],\n", + " [ 3.0591e-01, -1.2276e-03, 1.0102e+00, ..., 7.0534e-02,\n", + " -1.6671e-03, -7.0298e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 2.8048e-02, 1.9081e+00, 7.4565e-01, ..., -1.3638e-02,\n", + " -2.6577e-02, -1.5540e-03],\n", + " [ 1.1914e+00, 1.1602e+00, 3.8720e-02, ..., -1.4365e-02,\n", + " -2.3472e-02, 1.0061e+00],\n", + " [-1.7255e-02, 1.8837e-01, 2.5055e+00, ..., -6.4662e-03,\n", + " -3.2048e-02, -2.8532e-02],\n", + " ...,\n", + " [ 1.0421e-01, 1.9082e+00, 5.7595e-01, ..., -1.1593e-02,\n", + " -2.1962e-02, -3.2961e-06],\n", + " [-2.3794e-03, 8.9305e-01, 1.0757e+00, ..., 7.9605e-02,\n", + " -2.7071e-02, 2.8967e-01],\n", + " [-2.6572e-04, 3.6809e+00, 2.7971e+00, ..., 4.7031e+00,\n", + " -5.6056e-02, 3.5675e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-5.8007e-04, 2.4581e-01, 1.6424e-01, ..., 1.3706e+00,\n", + " 3.6853e-01, 1.6935e-02],\n", + " [-9.3911e-04, 3.5278e-01, -3.6603e-06, ..., 1.2619e+00,\n", + " 2.9222e-01, -3.1101e-04],\n", + " [-2.2710e-03, 2.9500e-01, 1.1000e-01, ..., 1.2887e+00,\n", + " 1.6548e-02, -2.8001e-03],\n", + " ...,\n", + " [-4.7649e-04, 1.8026e-01, 2.7938e-01, ..., 1.5068e+00,\n", + " 4.2988e-01, -4.4751e-04],\n", + " [-1.7503e-03, 3.1687e-01, 9.8953e-02, ..., 1.2946e+00,\n", + " 1.5212e-01, -1.7237e-03],\n", + " [-3.2597e-04, 2.2092e-01, 1.8432e-01, ..., 1.4117e+00,\n", + " 4.9005e-01, 7.5197e-02]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-2.0449e-03, 6.0746e-01, 2.2168e-01, ..., -7.9716e-03,\n", + " 3.2232e-01, 4.3021e-01],\n", + " [-1.8512e-03, 6.4922e-01, 2.8632e-01, ..., -1.0330e-02,\n", + " 4.7655e-01, 4.6298e-01],\n", + " [-1.9786e-03, 5.4620e-01, 1.7151e-01, ..., -8.1510e-03,\n", + " 3.6535e-01, 4.6029e-01],\n", + " ...,\n", + " [-2.1806e-04, 5.5123e-01, 2.1390e-01, ..., -9.4317e-03,\n", + " 4.3997e-01, 3.9335e-01],\n", + " [-1.0351e-03, 5.2828e-01, 3.6178e-01, ..., -8.8748e-03,\n", + " 3.1356e-01, 3.8195e-01],\n", + " [-1.1600e-03, 9.3175e-01, 4.4906e-01, ..., -9.5520e-03,\n", + " 4.0517e-01, 6.0964e-01]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 219, 190, 32, 197, 197, 197, 197, 406, 432, 369, 369, 265,\n", + " 620, 793, 626, 626, 976, 729, 974, 999, 956, 842, 970, 990,\n", + " 842, 935, 1367, 1367, 1332, 952, 952, 1354, 1234, 1465, 1321, 1321,\n", + " 1321, 1321, 1405, 1720, 1530, 1448, 1694, 1614, 1782, 1530, 1617, 1617,\n", + " 1745, 1743, 1708, 1708, 1708, 1708, 1567, 1585, 1825, 1825, 1708, 1708,\n", + " 1708, 1563, 1563, 1563, 1980, 1980, 1729, 1864, 1926, 1724, 2030, 2076,\n", + " 2076, 1992, 2020, 1934, 2076, 2058, 2067, 2092, 2358, 2243, 2548, 2548,\n", + " 2243, 2452, 2356, 2443, 2318, 2515, 2763, 2861, 2523, 2646, 2636, 2618,\n", + " 2861, 2861, 2861, 3056, 2906, 2885, 2733, 2733, 2839, 2809, 3013, 2742,\n", + " 2742, 3042, 2733, 2733, 2966, 2923, 2923, 2999, 2999, 3154, 3035, 3024,\n", + " 3139, 3139, 3243, 3364, 3571, 3442, 3442, 3405, 3508, 3491, 3618, 3511,\n", + " 3511, 4029, 3980, 3895, 3695, 3963, 3997, 4016, 4023, 4007, 4007, 4107,\n", + " 4139, 4140, 4140, 4204, 4154, 4263, 4244, 4479, 4283, 4439, 4544, 4487,\n", + " 4514, 4514, 4457, 4457, 4473, 4473, 4473, 4695, 4494, 4789, 4736, 4764,\n", + " 4973, 5080, 4856, 4994, 5065, 4920, 4920, 4984, 4984, 5210, 5210, 5225,\n", + " 5377, 5339, 5530, 5530, 5748, 5748, 5748, 5975, 5524, 5736, 6132, 5891,\n", + " 5891, 6320, 6191, 6191, 6162, 6316, 6176, 6176, 6203, 6176, 6330],\n", + " [ 69, 39, 91, 20, 42, 14, 31, 67, 69, 106, 66, 95,\n", + " 95, 69, 122, 21, 35, 104, 67, 53, 119, 123, 34, 11,\n", + " 72, 69, 91, 40, 8, 57, 49, 88, 78, 73, 89, 28,\n", + " 69, 126, 36, 76, 121, 107, 127, 2, 76, 33, 119, 17,\n", + " 112, 113, 96, 7, 110, 58, 117, 84, 43, 51, 69, 129,\n", + " 108, 111, 99, 55, 125, 62, 130, 107, 69, 64, 2, 45,\n", + " 6, 41, 9, 23, 59, 120, 107, 22, 127, 71, 46, 4,\n", + " 93, 2, 91, 18, 30, 100, 17, 127, 54, 117, 13, 63,\n", + " 83, 94, 3, 69, 3, 109, 85, 8, 97, 95, 16, 21,\n", + " 122, 9, 24, 26, 27, 102, 107, 19, 65, 116, 68, 124,\n", + " 22, 77, 124, 25, 70, 84, 50, 32, 61, 58, 37, 81,\n", + " 103, 63, 126, 79, 11, 65, 60, 48, 11, 125, 94, 91,\n", + " 17, 125, 0, 9, 127, 128, 127, 34, 115, 74, 10, 1,\n", + " 97, 75, 108, 69, 82, 54, 114, 105, 69, 84, 56, 75,\n", + " 6, 38, 118, 59, 12, 10, 87, 69, 90, 53, 64, 6,\n", + " 1, 131, 29, 80, 118, 8, 98, 45, 5, 92, 44, 69,\n", + " 52, 70, 86, 120, 101, 69, 30, 47, 11, 15, 95]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3821, 1497, 3339, ..., 1192, 3177, 3752],\n", + " [ 2, 13, 230, ..., 6927, 6927, 6998]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 67, 54, 75, ..., 120, 8, 8],\n", + " [ 17, 7, 42, ..., 6283, 6250, 6323]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 207, 207, 207, ..., 6941, 6982, 6875],\n", + " [ 341, 128, 252, ..., 336, 597, 450]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 748, 204, 34, ..., 620, 109, 829],\n", + " [ 18, 87, 49, ..., 6926, 6853, 6968]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3958, 2604, 6032, ..., 6881, 195, 195],\n", + " [ 162, 108, 1, ..., 6322, 6286, 6243]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 207, 207, 207, ..., 6882, 6873, 6998],\n", + " [ 876, 1180, 1534, ..., 298, 2029, 5523]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 219, 219, 219, ..., 6330, 6330, 6330],\n", + " [6331, 5507, 6557, ..., 4987, 5356, 5371]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.007607\n", + "sampling 0.007294\n", + "noi time: 0.000824\n", + "get_vertex_data call: 0.032458\n", + "noi group time: 0.003549\n", + "eoi_group_time: 0.016569\n", + "second half: 0.225616\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 14480, 24187, 9921, ..., 1130750, 1131340, 1119684],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 14480, 24187, 9921, ..., 1130750, 1131340, 1119684],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210817, 1224380, 1211790, ..., 1933659, 1925038, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210817, 1224380, 1211790, ..., 1933659, 1925038, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1141424, 1136232, 1140282, 1140285, 1135926, 1135716, 1140785,\n", + " 1140799, 1139696, 1141758, 1137506, 1141250, 1136971, 1141440, 1143609,\n", + " 1149836, 1145366, 1143372, 1146646, 1150509, 1149216, 1155683, 1155686,\n", + " 1143820, 1147482, 1147483, 1144632, 1146995, 1153022, 1135947, 1148346,\n", + " 1152666, 1138347, 1147089, 1155018, 1155019, 1139365, 1139371, 1152425,\n", + " 1152427, 1134718, 1134662, 1137829, 1140537, 1138112, 1137254, 1137171,\n", + " 1138356, 1153456, 1140159, 1140020, 1135367, 1135202, 1141036, 1134794,\n", + " 1157443, 1138504, 1137693, 1136609, 1136619, 1139215, 1144395, 1135408,\n", + " 1157395, 1137441, 1135265, 1156159, 1148481, 1148484, 1141702, 1141705,\n", + " 1135579, 1135581, 1135583, 1141086, 1136098, 1135664, 1140240, 1138514,\n", + " 1153094, 1158136, 1154132, 1145132, 1156899, 1156904, 1139684, 1136362,\n", + " 1139878, 1157706, 1138436, 1138440, 1138456, 1138461, 1138449, 1136594,\n", + " 1149328, 1138847, 1147112, 1142611, 1142615, 1142616, 1160819, 1135619,\n", + " 1135631, 1148533, 1139855, 1139667, 1134992, 1142434, 1142788, 1158974,\n", + " 1143626, 1143631, 1139933, 1138148, 1155654, 1141997, 1152042, 1152044,\n", + " 1136058, 1140670, 1137741, 1137728, 1137743, 1146222, 1134750, 1134741,\n", + " 1136697, 1140224, 1141088, 1141100, 1149001, 1139889, 1156872, 1136397,\n", + " 1143221, 1143227, 1146832, 1152719, 1141695, 1141690, 1135860, 1135861,\n", + " 1136625, 1141224, 1141223, 1139386, 1163306, 1136917, 1139730, 1143673,\n", + " 1143675, 1137186, 1144232, 1144237, 1140592, 1144931, 1136752, 1168566,\n", + " 1144641, 1147844, 1139798, 1142058, 1141821, 1165093, 1143202, 1140166,\n", + " 1158742, 1149105, 1139190, 1138710, 1138708, 1140110, 1142913, 1144596,\n", + " 1148263, 1142451, 1157420, 1136867, 1136864, 1145310, 1141579, 1140885,\n", + " 1135327, 1140445, 1140432, 1144182, 1144865, 1146201, 1147153, 1136378,\n", + " 1149197, 1141365, 1141713, 1141718, 1141664, 1149090, 1149097, 1149101,\n", + " 1138298, 1144277, 1144279, 1139505, 1139510, 1139763, 1139127, 1145001,\n", + " 1143779, 1140977, 1141560, 1141565, 1147050, 1147047, 1145884, 1145873,\n", + " 1143551, 1152976, 1141925, 1146901, 1144242, 1140580, 1140585, 1141846,\n", + " 1139405, 1137571, 1143851, 1142097, 1146024, 1154328, 1141585, 1149928,\n", + " 1149933, 1141236, 1139990, 1143293, 1143294, 1147543, 1147540, 1148763,\n", + " 1147282, 1136330, 1149155, 1140346, 1140348, 1149366, 1148003, 1149608,\n", + " 1136160, 1138915, 1138923, 1157720, 1136836, 1141283, 1139301, 1144768,\n", + " 1144957, 1142149, 1142159, 1143345, 1144765, 1144611, 1144088, 1135757,\n", + " 1135876, 1150756, 1150758, 1144306, 1150294, 1144375, 1146523, 1143960,\n", + " 1143456, 1143470, 1143457, 1143937, 1140364, 1149569, 1168927, 1148971,\n", + " 1144222, 1147984, 1147999, 1146949, 1134899, 1134902, 1139252, 1147244,\n", + " 1148704, 1148715, 1148713, 1148719, 1141327, 1141836, 1143428, 1143434,\n", + " 1147056, 1149718, 1147971, 1147198, 1158226, 1158230, 1158235, 1143921,\n", + " 1148366, 1149871, 1154524, 1145240, 1145246, 1145751, 1138638, 1148397,\n", + " 1146178, 1151242, 1148223, 1152530, 1152537, 1151179, 1150438, 1149258,\n", + " 1148826, 1151860, 1149791, 1144202, 1165252, 1147794, 1152022, 1152023,\n", + " 1135519, 1139914, 1134873, 1142273, 1140561, 1147019, 1147021, 1147009,\n", + " 1147023, 1141949, 1141278, 1144819, 1151795, 1148744, 1137646, 1153574,\n", + " 1147653, 1168496, 1149414, 1149412, 1148288, 1148300, 1137716, 1135087,\n", + " 1148612, 1148623, 1154420, 1148180, 1148188, 1136247, 1139721, 1148726,\n", + " 1146549, 1146555, 1143888, 1148204, 1148101, 1171943, 1153188, 1153197,\n", + " 1145104, 1145111, 1155551, 1150935, 1152878, 1143092, 1144863, 1144851,\n", + " 1150352, 1155088, 1148095, 1147455, 1147442, 1151811, 1151816, 1152581,\n", + " 1151906, 1154183, 1141420, 1150630, 1151351, 1145079, 1148957, 1148955,\n", + " 1146969, 1146975, 1149359, 1153255, 1150219, 1146616, 1146623, 1151694,\n", + " 1154063, 1152100, 1153030, 1150085, 1137746, 1146307, 1146304, 1159974,\n", + " 1152623, 1140521, 1155337, 1154123, 1157824, 1157833, 1152673, 1151617,\n", + " 1151623, 1148916, 1152959, 1145952, 1152903, 1152341, 1156816, 1138281,\n", + " 1136028, 1136029, 1158704, 1156623, 1152928, 1152890, 1143483, 1163490,\n", + " 1163489, 1150109, 1137405, 1150150, 1150159, 1149273, 1148040, 1155202,\n", + " 1149300, 1149794, 1149798, 1137048, 1148628, 1158530, 1158539, 1148382,\n", + " 1137458, 1149947, 1148243, 1155387, 1142047, 1156729, 1150971, 1150960,\n", + " 1158860, 1158857, 1150875, 1158916, 1156500, 1157057, 1157069, 1155408,\n", + " 1145191, 1145187, 1137819, 1150465, 1135231, 1149053, 1142221, 1135729,\n", + " 1152179, 1156629, 1156638, 1152738, 1150824, 1150828, 1151469, 1139525,\n", + " 1158304, 1158306, 1158308, 1158311, 1151271, 1155441, 1161735, 1150129,\n", + " 1154530, 1154537, 1156913, 1156207, 1151379, 1137912, 1155122, 1152527,\n", + " 1157183, 1155755, 1151424, 1146913, 1156463, 1168230, 1155626, 1155628,\n", + " 1158492, 1156563, 1154547, 1154550, 1154557, 1154555, 1136476, 1158824,\n", + " 1153715, 1148652, 1155646, 1143254, 1161216, 1154644, 1154648, 1146938,\n", + " 1151895, 1143189, 1155608, 1150981, 1150990, 1151030, 1153786, 1149907,\n", + " 1158192, 1159116, 1158347, 1145694, 1145681, 1137317, 1140913, 1134677,\n", + " 1134685, 1134682, 1134680, 1135601, 1148149, 1150664, 1150671, 1155848,\n", + " 1155852, 1158665, 1157684, 1146326, 1149146, 1140632, 1152209, 1167618,\n", + " 1140380, 1140374, 1157735, 1159132, 1157033, 1144843, 1142479, 1155971,\n", + " 1155975, 1161673, 1156812, 1161369, 1136898, 1136896, 1158886, 1140218,\n", + " 1157304, 1158815, 1158438, 1158447, 1156779, 1136487, 1136494, 1156669,\n", + " 1153808, 1156272, 1136642, 1134757, 1162170, 1145479, 1140049, 1158555,\n", + " 1153827, 1151140, 1161167, 1156516, 1165497, 1146126, 1138110, 1158268,\n", + " 1150011, 1155521, 1155529, 1155528, 1142487, 1159042, 1157945, 1162044,\n", + " 1153052, 1153045, 1171551, 1159738, 1163072, 1144158, 1142873, 1156101,\n", + " 1138393, 1150046, 1159475, 1145948, 1155479, 1154302, 1153514, 1153519,\n", + " 1147300, 1146870, 1157601, 1138161, 1164006, 1156784, 1149966, 1163881,\n", + " 1163396, 1166073, 1148771, 1140734, 1171515, 1157351, 1146063, 1163443,\n", + " 1164048, 1165309, 1170415, 1140643, 1148603, 1148607, 1168162, 1159646,\n", + " 1151872, 1155816, 1158643, 1158653, 1156177, 1156181, 1159032, 1165877,\n", + " 1152247, 1143729, 1162544, 1151218, 1168428, 1148560, 1144986, 1149023,\n", + " 1147830, 1146509, 1164580, 1152776, 1163527, 1141465, 1141471, 1147426,\n", + " 1147427, 1156739, 1157955, 1161022, 1150646, 1171051, 1144812, 1140112,\n", + " 1135567, 1142722, 1156300, 1167332, 1145728, 1145228, 1154695, 1169510,\n", + " 1144972, 1184047, 1165746, 1148124, 1139345, 1145902, 1145898, 1152203,\n", + " 1171230, 1171867, 1149565, 1158724, 1158722, 1158734, 1167503, 1154076,\n", + " 1168754, 1159268, 1145503, 1154924, 1167817, 1155172, 1155180, 1165011,\n", + " 1150515, 1150522, 1150518, 1157534, 1147758, 1147757, 1168447, 1157331,\n", + " 1180435, 1149452, 1158051, 1158052, 1158062, 1149847, 1157384, 1157388,\n", + " 1154866, 1152353, 1152360, 1165528, 1152544, 1168451, 1149402, 1148661,\n", + " 1148666, 1172669, 1173307, 1145037, 1154018, 1154027, 1152150, 1167857,\n", + " 1169572, 1151696, 1157153, 1157373, 1147711, 1178961, 1151850, 1148128,\n", + " 1148131, 1157593, 1181021, 1165120, 1172932, 1163990, 1166535, 1159100,\n", + " 1159102, 1171072, 1166682, 1166684, 1180133, 1183357, 1154148, 1167517,\n", + " 1149169, 1179860, 1178655, 1186117, 1143279, 1167658, 1167657, 1164956,\n", + " 1176487, 1181092, 1156550, 1177261, 1170177, 1181237, 1159404, 1153803,\n", + " 1177785, 1171323, 1151519, 1179807, 1182361, 1155262, 1157795, 1172034,\n", + " 1143341, 1151498, 1171623, 1171391, 1183256, 1157124, 1157074, 1181922,\n", + " 1158249, 1153898, 1178214, 1145626, 1172024, 1161914, 1149755, 1153609,\n", + " 1153605, 1157771, 1157772, 1160121, 1177832, 1177826, 1158771, 1158779,\n", + " 1158512, 1155890, 1155899, 1162988, 1157272, 1159878, 1140396, 1162253,\n", + " 1193121, 1160078, 1164231, 1189603, 1180019, 1181177, 1193452, 1156539,\n", + " 1139828, 1139831, 1185369, 1150269, 1154806, 1154812, 1151288, 1156055,\n", + " 1151972, 1181892, 1146392, 1146395, 1194031, 1149544, 1188371, 1189700,\n", + " 1182370, 1178526, 1169964, 1181949, 1166325, 1171345, 1194415, 1140992,\n", + " 1187687, 1151774, 1181687, 1192245, 1193098, 1162503, 1160339, 1178265,\n", + " 1156681, 1172423, 1158070, 1182816, 1176829, 1155959, 1155962, 1181660,\n", + " 1169831, 1182781, 1193831, 1157008, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1141424, 1136232, 1140282, 1140285, 1135926, 1135716, 1140785,\n", + " 1140799, 1139696, 1141758, 1137506, 1141250, 1136971, 1141440, 1143609,\n", + " 1149836, 1145366, 1143372, 1146646, 1150509, 1149216, 1155683, 1155686,\n", + " 1143820, 1147482, 1147483, 1144632, 1146995, 1153022, 1135947, 1148346,\n", + " 1152666, 1138347, 1147089, 1155018, 1155019, 1139365, 1139371, 1152425,\n", + " 1152427, 1134718, 1134662, 1137829, 1140537, 1138112, 1137254, 1137171,\n", + " 1138356, 1153456, 1140159, 1140020, 1135367, 1135202, 1141036, 1134794,\n", + " 1157443, 1138504, 1137693, 1136609, 1136619, 1139215, 1144395, 1135408,\n", + " 1157395, 1137441, 1135265, 1156159, 1148481, 1148484, 1141702, 1141705,\n", + " 1135579, 1135581, 1135583, 1141086, 1136098, 1135664, 1140240, 1138514,\n", + " 1153094, 1158136, 1154132, 1145132, 1156899, 1156904, 1139684, 1136362,\n", + " 1139878, 1157706, 1138436, 1138440, 1138456, 1138461, 1138449, 1136594,\n", + " 1149328, 1138847, 1147112, 1142611, 1142615, 1142616, 1160819, 1135619,\n", + " 1135631, 1148533, 1139855, 1139667, 1134992, 1142434, 1142788, 1158974,\n", + " 1143626, 1143631, 1139933, 1138148, 1155654, 1141997, 1152042, 1152044,\n", + " 1136058, 1140670, 1137741, 1137728, 1137743, 1146222, 1134750, 1134741,\n", + " 1136697, 1140224, 1141088, 1141100, 1149001, 1139889, 1156872, 1136397,\n", + " 1143221, 1143227, 1146832, 1152719, 1141695, 1141690, 1135860, 1135861,\n", + " 1136625, 1141224, 1141223, 1139386, 1163306, 1136917, 1139730, 1143673,\n", + " 1143675, 1137186, 1144232, 1144237, 1140592, 1144931, 1136752, 1168566,\n", + " 1144641, 1147844, 1139798, 1142058, 1141821, 1165093, 1143202, 1140166,\n", + " 1158742, 1149105, 1139190, 1138710, 1138708, 1140110, 1142913, 1144596,\n", + " 1148263, 1142451, 1157420, 1136867, 1136864, 1145310, 1141579, 1140885,\n", + " 1135327, 1140445, 1140432, 1144182, 1144865, 1146201, 1147153, 1136378,\n", + " 1149197, 1141365, 1141713, 1141718, 1141664, 1149090, 1149097, 1149101,\n", + " 1138298, 1144277, 1144279, 1139505, 1139510, 1139763, 1139127, 1145001,\n", + " 1143779, 1140977, 1141560, 1141565, 1147050, 1147047, 1145884, 1145873,\n", + " 1143551, 1152976, 1141925, 1146901, 1144242, 1140580, 1140585, 1141846,\n", + " 1139405, 1137571, 1143851, 1142097, 1146024, 1154328, 1141585, 1149928,\n", + " 1149933, 1141236, 1139990, 1143293, 1143294, 1147543, 1147540, 1148763,\n", + " 1147282, 1136330, 1149155, 1140346, 1140348, 1149366, 1148003, 1149608,\n", + " 1136160, 1138915, 1138923, 1157720, 1136836, 1141283, 1139301, 1144768,\n", + " 1144957, 1142149, 1142159, 1143345, 1144765, 1144611, 1144088, 1135757,\n", + " 1135876, 1150756, 1150758, 1144306, 1150294, 1144375, 1146523, 1143960,\n", + " 1143456, 1143470, 1143457, 1143937, 1140364, 1149569, 1168927, 1148971,\n", + " 1144222, 1147984, 1147999, 1146949, 1134899, 1134902, 1139252, 1147244,\n", + " 1148704, 1148715, 1148713, 1148719, 1141327, 1141836, 1143428, 1143434,\n", + " 1147056, 1149718, 1147971, 1147198, 1158226, 1158230, 1158235, 1143921,\n", + " 1148366, 1149871, 1154524, 1145240, 1145246, 1145751, 1138638, 1148397,\n", + " 1146178, 1151242, 1148223, 1152530, 1152537, 1151179, 1150438, 1149258,\n", + " 1148826, 1151860, 1149791, 1144202, 1165252, 1147794, 1152022, 1152023,\n", + " 1135519, 1139914, 1134873, 1142273, 1140561, 1147019, 1147021, 1147009,\n", + " 1147023, 1141949, 1141278, 1144819, 1151795, 1148744, 1137646, 1153574,\n", + " 1147653, 1168496, 1149414, 1149412, 1148288, 1148300, 1137716, 1135087,\n", + " 1148612, 1148623, 1154420, 1148180, 1148188, 1136247, 1139721, 1148726,\n", + " 1146549, 1146555, 1143888, 1148204, 1148101, 1171943, 1153188, 1153197,\n", + " 1145104, 1145111, 1155551, 1150935, 1152878, 1143092, 1144863, 1144851,\n", + " 1150352, 1155088, 1148095, 1147455, 1147442, 1151811, 1151816, 1152581,\n", + " 1151906, 1154183, 1141420, 1150630, 1151351, 1145079, 1148957, 1148955,\n", + " 1146969, 1146975, 1149359, 1153255, 1150219, 1146616, 1146623, 1151694,\n", + " 1154063, 1152100, 1153030, 1150085, 1137746, 1146307, 1146304, 1159974,\n", + " 1152623, 1140521, 1155337, 1154123, 1157824, 1157833, 1152673, 1151617,\n", + " 1151623, 1148916, 1152959, 1145952, 1152903, 1152341, 1156816, 1138281,\n", + " 1136028, 1136029, 1158704, 1156623, 1152928, 1152890, 1143483, 1163490,\n", + " 1163489, 1150109, 1137405, 1150150, 1150159, 1149273, 1148040, 1155202,\n", + " 1149300, 1149794, 1149798, 1137048, 1148628, 1158530, 1158539, 1148382,\n", + " 1137458, 1149947, 1148243, 1155387, 1142047, 1156729, 1150971, 1150960,\n", + " 1158860, 1158857, 1150875, 1158916, 1156500, 1157057, 1157069, 1155408,\n", + " 1145191, 1145187, 1137819, 1150465, 1135231, 1149053, 1142221, 1135729,\n", + " 1152179, 1156629, 1156638, 1152738, 1150824, 1150828, 1151469, 1139525,\n", + " 1158304, 1158306, 1158308, 1158311, 1151271, 1155441, 1161735, 1150129,\n", + " 1154530, 1154537, 1156913, 1156207, 1151379, 1137912, 1155122, 1152527,\n", + " 1157183, 1155755, 1151424, 1146913, 1156463, 1168230, 1155626, 1155628,\n", + " 1158492, 1156563, 1154547, 1154550, 1154557, 1154555, 1136476, 1158824,\n", + " 1153715, 1148652, 1155646, 1143254, 1161216, 1154644, 1154648, 1146938,\n", + " 1151895, 1143189, 1155608, 1150981, 1150990, 1151030, 1153786, 1149907,\n", + " 1158192, 1159116, 1158347, 1145694, 1145681, 1137317, 1140913, 1134677,\n", + " 1134685, 1134682, 1134680, 1135601, 1148149, 1150664, 1150671, 1155848,\n", + " 1155852, 1158665, 1157684, 1146326, 1149146, 1140632, 1152209, 1167618,\n", + " 1140380, 1140374, 1157735, 1159132, 1157033, 1144843, 1142479, 1155971,\n", + " 1155975, 1161673, 1156812, 1161369, 1136898, 1136896, 1158886, 1140218,\n", + " 1157304, 1158815, 1158438, 1158447, 1156779, 1136487, 1136494, 1156669,\n", + " 1153808, 1156272, 1136642, 1134757, 1162170, 1145479, 1140049, 1158555,\n", + " 1153827, 1151140, 1161167, 1156516, 1165497, 1146126, 1138110, 1158268,\n", + " 1150011, 1155521, 1155529, 1155528, 1142487, 1159042, 1157945, 1162044,\n", + " 1153052, 1153045, 1171551, 1159738, 1163072, 1144158, 1142873, 1156101,\n", + " 1138393, 1150046, 1159475, 1145948, 1155479, 1154302, 1153514, 1153519,\n", + " 1147300, 1146870, 1157601, 1138161, 1164006, 1156784, 1149966, 1163881,\n", + " 1163396, 1166073, 1148771, 1140734, 1171515, 1157351, 1146063, 1163443,\n", + " 1164048, 1165309, 1170415, 1140643, 1148603, 1148607, 1168162, 1159646,\n", + " 1151872, 1155816, 1158643, 1158653, 1156177, 1156181, 1159032, 1165877,\n", + " 1152247, 1143729, 1162544, 1151218, 1168428, 1148560, 1144986, 1149023,\n", + " 1147830, 1146509, 1164580, 1152776, 1163527, 1141465, 1141471, 1147426,\n", + " 1147427, 1156739, 1157955, 1161022, 1150646, 1171051, 1144812, 1140112,\n", + " 1135567, 1142722, 1156300, 1167332, 1145728, 1145228, 1154695, 1169510,\n", + " 1144972, 1184047, 1165746, 1148124, 1139345, 1145902, 1145898, 1152203,\n", + " 1171230, 1171867, 1149565, 1158724, 1158722, 1158734, 1167503, 1154076,\n", + " 1168754, 1159268, 1145503, 1154924, 1167817, 1155172, 1155180, 1165011,\n", + " 1150515, 1150522, 1150518, 1157534, 1147758, 1147757, 1168447, 1157331,\n", + " 1180435, 1149452, 1158051, 1158052, 1158062, 1149847, 1157384, 1157388,\n", + " 1154866, 1152353, 1152360, 1165528, 1152544, 1168451, 1149402, 1148661,\n", + " 1148666, 1172669, 1173307, 1145037, 1154018, 1154027, 1152150, 1167857,\n", + " 1169572, 1151696, 1157153, 1157373, 1147711, 1178961, 1151850, 1148128,\n", + " 1148131, 1157593, 1181021, 1165120, 1172932, 1163990, 1166535, 1159100,\n", + " 1159102, 1171072, 1166682, 1166684, 1180133, 1183357, 1154148, 1167517,\n", + " 1149169, 1179860, 1178655, 1186117, 1143279, 1167658, 1167657, 1164956,\n", + " 1176487, 1181092, 1156550, 1177261, 1170177, 1181237, 1159404, 1153803,\n", + " 1177785, 1171323, 1151519, 1179807, 1182361, 1155262, 1157795, 1172034,\n", + " 1143341, 1151498, 1171623, 1171391, 1183256, 1157124, 1157074, 1181922,\n", + " 1158249, 1153898, 1178214, 1145626, 1172024, 1161914, 1149755, 1153609,\n", + " 1153605, 1157771, 1157772, 1160121, 1177832, 1177826, 1158771, 1158779,\n", + " 1158512, 1155890, 1155899, 1162988, 1157272, 1159878, 1140396, 1162253,\n", + " 1193121, 1160078, 1164231, 1189603, 1180019, 1181177, 1193452, 1156539,\n", + " 1139828, 1139831, 1185369, 1150269, 1154806, 1154812, 1151288, 1156055,\n", + " 1151972, 1181892, 1146392, 1146395, 1194031, 1149544, 1188371, 1189700,\n", + " 1182370, 1178526, 1169964, 1181949, 1166325, 1171345, 1194415, 1140992,\n", + " 1187687, 1151774, 1181687, 1192245, 1193098, 1162503, 1160339, 1178265,\n", + " 1156681, 1172423, 1158070, 1182816, 1176829, 1155959, 1155962, 1181660,\n", + " 1169831, 1182781, 1193831, 1157008, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199439, 1198248, 1198731, 1195860, 1199282, 1202255, 1198832, 1201581,\n", + " 1201582, 1198023, 1200644, 1201015, 1201016, 1201660, 1197359, 1202803,\n", + " 1202804, 1198557, 1197516, 1196685, 1195726, 1196631, 1194642, 1194648,\n", + " 1195093, 1195511, 1195923, 1195259, 1195263, 1197930, 1199120, 1201992,\n", + " 1196031, 1198542, 1194956, 1195459, 1198306, 1194882, 1195895, 1196334,\n", + " 1196359, 1195325, 1196840, 1196171, 1195581, 1198163, 1199823, 1197265,\n", + " 1197273, 1194859, 1196750, 1198925, 1196305, 1197483, 1197256, 1197191,\n", + " 1200949, 1200959, 1199059, 1197285, 1197291, 1199185, 1194928, 1199695,\n", + " 1199685, 1197994, 1200076, 1199156, 1198406, 1198410, 1199579, 1200748,\n", + " 1199231, 1198763, 1201511, 1200670, 1196727, 1195771, 1195773, 1200596,\n", + " 1198811, 1201547, 1201824, 1198389, 1201156, 1200913, 1200915, 1202640,\n", + " 1199716, 1201737, 1195635, 1196645, 1200546, 1200555, 1199886, 1202138,\n", + " 1202092, 1200907, 1199976, 1195876, 1201291, 1198478, 1197553, 1203336,\n", + " 1200391, 1202308, 1200638, 1200627, 1195438, 1203112, 1195386, 1200928,\n", + " 1197822, 1199661, 1199659, 1203102, 1197735, 1202777, 1195063, 1195070,\n", + " 1197655, 1197335, 1195082, 1197039, 1198748], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199439, 1198248, 1198731, 1195860, 1199282, 1202255, 1198832, 1201581,\n", + " 1201582, 1198023, 1200644, 1201015, 1201016, 1201660, 1197359, 1202803,\n", + " 1202804, 1198557, 1197516, 1196685, 1195726, 1196631, 1194642, 1194648,\n", + " 1195093, 1195511, 1195923, 1195259, 1195263, 1197930, 1199120, 1201992,\n", + " 1196031, 1198542, 1194956, 1195459, 1198306, 1194882, 1195895, 1196334,\n", + " 1196359, 1195325, 1196840, 1196171, 1195581, 1198163, 1199823, 1197265,\n", + " 1197273, 1194859, 1196750, 1198925, 1196305, 1197483, 1197256, 1197191,\n", + " 1200949, 1200959, 1199059, 1197285, 1197291, 1199185, 1194928, 1199695,\n", + " 1199685, 1197994, 1200076, 1199156, 1198406, 1198410, 1199579, 1200748,\n", + " 1199231, 1198763, 1201511, 1200670, 1196727, 1195771, 1195773, 1200596,\n", + " 1198811, 1201547, 1201824, 1198389, 1201156, 1200913, 1200915, 1202640,\n", + " 1199716, 1201737, 1195635, 1196645, 1200546, 1200555, 1199886, 1202138,\n", + " 1202092, 1200907, 1199976, 1195876, 1201291, 1198478, 1197553, 1203336,\n", + " 1200391, 1202308, 1200638, 1200627, 1195438, 1203112, 1195386, 1200928,\n", + " 1197822, 1199661, 1199659, 1203102, 1197735, 1202777, 1195063, 1195070,\n", + " 1197655, 1197335, 1195082, 1197039, 1198748], device='cuda:0',\n", + " dtype=torch.int32))\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005216\n", + "sampling 0.004776\n", + "noi time: 0.001545\n", + "get_vertex_data call: 0.064772\n", + "noi group time: 0.003808\n", + "eoi_group_time: 0.016398\n", + "second half: 0.252359\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16819, 23835, 28259, ..., 1100728, 1119043, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16819, 23835, 28259, ..., 1100728, 1119043, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1211778, 1230249, ..., 1929229, 1931117, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1211778, 1230249, ..., 1929229, 1931117, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1136225, 1136228, 1140282, 1135926, 1135160, 1135716, 1135727,\n", + " 1140785, 1140799, 1141758, 1138335, 1136223, 1140297, 1136969, 1149831,\n", + " 1139808, 1145373, 1137936, 1145999, 1139141, 1143372, 1148987, 1150497,\n", + " 1139866, 1148576, 1149216, 1155683, 1155689, 1143820, 1147473, 1147483,\n", + " 1142885, 1152271, 1144636, 1135262, 1149038, 1135950, 1135119, 1146656,\n", + " 1152660, 1148546, 1141904, 1137219, 1139371, 1147211, 1138742, 1151545,\n", + " 1140537, 1140540, 1138112, 1137254, 1138353, 1138356, 1134735, 1140952,\n", + " 1135367, 1135370, 1135202, 1140766, 1134794, 1135956, 1136518, 1138504,\n", + " 1138508, 1137329, 1137342, 1143069, 1157103, 1135333, 1144395, 1157397,\n", + " 1152376, 1137441, 1137025, 1136928, 1148481, 1134841, 1135579, 1142600,\n", + " 1141075, 1141086, 1137953, 1137957, 1154132, 1145132, 1137016, 1135522,\n", + " 1138305, 1157703, 1138436, 1138440, 1138445, 1138461, 1138449, 1138462,\n", + " 1157190, 1136594, 1149328, 1135088, 1147112, 1147113, 1147116, 1142611,\n", + " 1142616, 1135352, 1156141, 1138185, 1158984, 1148531, 1148533, 1135769,\n", + " 1139843, 1136457, 1136458, 1139667, 1134992, 1142434, 1136551, 1152640,\n", + " 1135789, 1136728, 1144407, 1153543, 1153544, 1143625, 1139081, 1139085,\n", + " 1138648, 1138148, 1155648, 1152044, 1142299, 1142302, 1137734, 1137741,\n", + " 1134750, 1138240, 1140228, 1141088, 1141098, 1141100, 1144138, 1149001,\n", + " 1139889, 1145347, 1135291, 1143767, 1154855, 1137299, 1162705, 1143224,\n", + " 1143225, 1139025, 1139033, 1146832, 1152719, 1135860, 1140469, 1141224,\n", + " 1139380, 1139386, 1139730, 1143667, 1137186, 1137188, 1141161, 1141785,\n", + " 1152731, 1139495, 1144937, 1144941, 1144650, 1134979, 1134987, 1147850,\n", + " 1138482, 1141821, 1143153, 1145161, 1140173, 1158739, 1138469, 1138709,\n", + " 1138710, 1138715, 1140110, 1157416, 1144041, 1140885, 1144182, 1150906,\n", + " 1146201, 1158699, 1140501, 1147153, 1142640, 1142646, 1149193, 1141365,\n", + " 1141371, 1153068, 1149099, 1149101, 1138293, 1144277, 1139510, 1139763,\n", + " 1140093, 1145001, 1143779, 1140616, 1140976, 1140983, 1140990, 1146695,\n", + " 1141560, 1145873, 1143543, 1143551, 1152976, 1135457, 1139447, 1139453,\n", + " 1141925, 1146901, 1144242, 1141841, 1145974, 1143845, 1143851, 1146024,\n", + " 1146129, 1146140, 1154328, 1142533, 1149933, 1139990, 1143293, 1143294,\n", + " 1147541, 1147543, 1148763, 1147282, 1142829, 1142816, 1138660, 1149155,\n", + " 1140349, 1139408, 1139417, 1149608, 1149610, 1143051, 1143040, 1136836,\n", + " 1165623, 1139329, 1139328, 1142159, 1143345, 1144619, 1140837, 1140845,\n", + " 1144086, 1135872, 1150756, 1144306, 1143957, 1138018, 1143456, 1143937,\n", + " 1143807, 1147521, 1140364, 1168921, 1144219, 1147984, 1147995, 1147999,\n", + " 1134899, 1144003, 1144010, 1139252, 1145466, 1148704, 1142690, 1141327,\n", + " 1153701, 1147060, 1149725, 1147024, 1141131, 1145011, 1145012, 1158226,\n", + " 1143921, 1147880, 1145238, 1145751, 1145756, 1148384, 1146178, 1146180,\n", + " 1151239, 1151242, 1152530, 1150438, 1150445, 1149791, 1149777, 1144514,\n", + " 1144526, 1145839, 1150339, 1151988, 1151994, 1147794, 1147795, 1151480,\n", + " 1144888, 1146723, 1134879, 1148693, 1150127, 1147021, 1147023, 1135800,\n", + " 1144819, 1148744, 1153574, 1148461, 1147653, 1143552, 1146407, 1148300,\n", + " 1135079, 1139096, 1154420, 1158794, 1152563, 1136251, 1136247, 1139721,\n", + " 1139723, 1146682, 1146686, 1138871, 1138409, 1157968, 1157979, 1157983,\n", + " 1148720, 1139936, 1139938, 1139940, 1150052, 1148204, 1141733, 1153192,\n", + " 1153188, 1144849, 1150356, 1169594, 1148084, 1141022, 1147442, 1151816,\n", + " 1151821, 1152581, 1135307, 1151909, 1148498, 1149732, 1141420, 1150630,\n", + " 1151352, 1155164, 1147602, 1147738, 1149385, 1146969, 1149356, 1153249,\n", + " 1146623, 1151691, 1152849, 1146280, 1150086, 1137746, 1146307, 1152622,\n", + " 1140521, 1155140, 1149203, 1154123, 1151576, 1151627, 1151617, 1150578,\n", + " 1145273, 1136131, 1151441, 1148914, 1145952, 1145957, 1152903, 1152341,\n", + " 1146816, 1156816, 1138283, 1138279, 1152294, 1152300, 1136023, 1136028,\n", + " 1136031, 1158704, 1156619, 1156622, 1151188, 1151187, 1140675, 1152928,\n", + " 1150159, 1150164, 1148033, 1148040, 1149300, 1152607, 1155223, 1149794,\n", + " 1137048, 1148628, 1158530, 1158540, 1137458, 1149942, 1135698, 1153085,\n", + " 1142047, 1154381, 1156720, 1156723, 1156728, 1135434, 1157540, 1142385,\n", + " 1158860, 1150873, 1154929, 1156505, 1152397, 1157064, 1157069, 1155412,\n", + " 1145196, 1137809, 1139473, 1149054, 1151788, 1150824, 1150817, 1150828,\n", + " 1153415, 1135634, 1147810, 1139525, 1158306, 1158311, 1140421, 1155441,\n", + " 1155451, 1153359, 1162120, 1140877, 1154529, 1154530, 1150489, 1142755,\n", + " 1142764, 1156207, 1157642, 1151379, 1155122, 1152527, 1157172, 1157183,\n", + " 1153480, 1151424, 1145806, 1168230, 1155628, 1155630, 1158491, 1155572,\n", + " 1155582, 1158824, 1158325, 1148834, 1155646, 1143254, 1154250, 1154240,\n", + " 1154908, 1154909, 1143189, 1150371, 1155293, 1159622, 1151030, 1158578,\n", + " 1159003, 1153784, 1153786, 1159108, 1159116, 1159106, 1145682, 1145688,\n", + " 1145690, 1145681, 1137316, 1137323, 1140918, 1134677, 1135601, 1148149,\n", + " 1148159, 1150661, 1158665, 1158667, 1158669, 1157684, 1159258, 1152220,\n", + " 1159213, 1152498, 1140381, 1155975, 1135190, 1156812, 1161472, 1155392,\n", + " 1155403, 1149700, 1160163, 1153491, 1136896, 1158760, 1158764, 1140209,\n", + " 1158815, 1158437, 1158447, 1151615, 1136494, 1159244, 1156488, 1156490,\n", + " 1153808, 1136640, 1162167, 1156516, 1146126, 1155865, 1158006, 1155521,\n", + " 1155528, 1161539, 1135662, 1135652, 1142666, 1164158, 1167359, 1144270,\n", + " 1157946, 1160563, 1153052, 1153045, 1162835, 1162845, 1144159, 1156111,\n", + " 1138393, 1142679, 1142681, 1150046, 1149063, 1149070, 1145948, 1155479,\n", + " 1155480, 1154300, 1153519, 1147300, 1171987, 1157606, 1164006, 1156787,\n", + " 1149953, 1149963, 1163878, 1163407, 1139592, 1166073, 1148769, 1159760,\n", + " 1164052, 1140650, 1140643, 1148600, 1148603, 1148607, 1148598, 1144504,\n", + " 1158643, 1158653, 1159025, 1159029, 1159032, 1163742, 1152247, 1160605,\n", + " 1155588, 1156589, 1153924, 1144979, 1146500, 1164580, 1145137, 1141471,\n", + " 1141457, 1157050, 1182254, 1156737, 1156739, 1156744, 1157955, 1153648,\n", + " 1153663, 1150648, 1144812, 1153273, 1135567, 1164744, 1142722, 1156300,\n", + " 1144051, 1145728, 1145228, 1145229, 1154700, 1154701, 1146045, 1175801,\n", + " 1144973, 1169201, 1152624, 1145900, 1145902, 1153520, 1143402, 1143404,\n", + " 1171867, 1158722, 1162876, 1154076, 1167317, 1147338, 1144690, 1177930,\n", + " 1169602, 1167817, 1156308, 1166653, 1155170, 1154213, 1150515, 1150518,\n", + " 1156113, 1156119, 1144346, 1144336, 1157531, 1157534, 1138378, 1147751,\n", + " 1154670, 1154893, 1169162, 1138129, 1141048, 1141043, 1151674, 1172330,\n", + " 1154364, 1154352, 1149452, 1158623, 1173047, 1173050, 1172759, 1169948,\n", + " 1152353, 1152546, 1168400, 1149402, 1148667, 1167016, 1148335, 1182124,\n", + " 1173307, 1145033, 1169144, 1154028, 1152150, 1164974, 1159658, 1159655,\n", + " 1169572, 1169583, 1151697, 1157153, 1172111, 1147711, 1151850, 1147934,\n", + " 1157592, 1149247, 1170495, 1170490, 1189748, 1172961, 1171293, 1155739,\n", + " 1168392, 1168398, 1168604, 1172226, 1146755, 1180475, 1159091, 1166682,\n", + " 1154148, 1149169, 1179811, 1180600, 1143279, 1180393, 1185666, 1168481,\n", + " 1179233, 1171302, 1153803, 1186319, 1171396, 1182651, 1178571, 1158027,\n", + " 1161255, 1162129, 1155250, 1155262, 1172010, 1176798, 1154707, 1157792,\n", + " 1157803, 1157795, 1171623, 1163569, 1178361, 1155796, 1157126, 1157991,\n", + " 1180034, 1157072, 1178706, 1158253, 1153898, 1161846, 1134651, 1164563,\n", + " 1145626, 1163538, 1178757, 1179442, 1149755, 1146242, 1186957, 1157761,\n", + " 1187940, 1158512, 1183330, 1179635, 1158934, 1179991, 1155890, 1155895,\n", + " 1180849, 1162986, 1179924, 1140395, 1140399, 1182330, 1174999, 1167762,\n", + " 1168886, 1179836, 1171634, 1171644, 1160078, 1164231, 1182337, 1165082,\n", + " 1156861, 1170341, 1147179, 1172608, 1156162, 1179052, 1170034, 1156539,\n", + " 1170822, 1139831, 1170433, 1154806, 1154812, 1149668, 1191674, 1151284,\n", + " 1189687, 1156049, 1156055, 1190913, 1149544, 1188814, 1182370, 1148798,\n", + " 1181951, 1194454, 1171669, 1175030, 1159169, 1162502, 1169707, 1181834,\n", + " 1172122, 1152094, 1181649, 1178301, 1188286, 1179769, 1187536, 1194149,\n", + " 1167466, 1157008, 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1136225, 1136228, 1140282, 1135926, 1135160, 1135716, 1135727,\n", + " 1140785, 1140799, 1141758, 1138335, 1136223, 1140297, 1136969, 1149831,\n", + " 1139808, 1145373, 1137936, 1145999, 1139141, 1143372, 1148987, 1150497,\n", + " 1139866, 1148576, 1149216, 1155683, 1155689, 1143820, 1147473, 1147483,\n", + " 1142885, 1152271, 1144636, 1135262, 1149038, 1135950, 1135119, 1146656,\n", + " 1152660, 1148546, 1141904, 1137219, 1139371, 1147211, 1138742, 1151545,\n", + " 1140537, 1140540, 1138112, 1137254, 1138353, 1138356, 1134735, 1140952,\n", + " 1135367, 1135370, 1135202, 1140766, 1134794, 1135956, 1136518, 1138504,\n", + " 1138508, 1137329, 1137342, 1143069, 1157103, 1135333, 1144395, 1157397,\n", + " 1152376, 1137441, 1137025, 1136928, 1148481, 1134841, 1135579, 1142600,\n", + " 1141075, 1141086, 1137953, 1137957, 1154132, 1145132, 1137016, 1135522,\n", + " 1138305, 1157703, 1138436, 1138440, 1138445, 1138461, 1138449, 1138462,\n", + " 1157190, 1136594, 1149328, 1135088, 1147112, 1147113, 1147116, 1142611,\n", + " 1142616, 1135352, 1156141, 1138185, 1158984, 1148531, 1148533, 1135769,\n", + " 1139843, 1136457, 1136458, 1139667, 1134992, 1142434, 1136551, 1152640,\n", + " 1135789, 1136728, 1144407, 1153543, 1153544, 1143625, 1139081, 1139085,\n", + " 1138648, 1138148, 1155648, 1152044, 1142299, 1142302, 1137734, 1137741,\n", + " 1134750, 1138240, 1140228, 1141088, 1141098, 1141100, 1144138, 1149001,\n", + " 1139889, 1145347, 1135291, 1143767, 1154855, 1137299, 1162705, 1143224,\n", + " 1143225, 1139025, 1139033, 1146832, 1152719, 1135860, 1140469, 1141224,\n", + " 1139380, 1139386, 1139730, 1143667, 1137186, 1137188, 1141161, 1141785,\n", + " 1152731, 1139495, 1144937, 1144941, 1144650, 1134979, 1134987, 1147850,\n", + " 1138482, 1141821, 1143153, 1145161, 1140173, 1158739, 1138469, 1138709,\n", + " 1138710, 1138715, 1140110, 1157416, 1144041, 1140885, 1144182, 1150906,\n", + " 1146201, 1158699, 1140501, 1147153, 1142640, 1142646, 1149193, 1141365,\n", + " 1141371, 1153068, 1149099, 1149101, 1138293, 1144277, 1139510, 1139763,\n", + " 1140093, 1145001, 1143779, 1140616, 1140976, 1140983, 1140990, 1146695,\n", + " 1141560, 1145873, 1143543, 1143551, 1152976, 1135457, 1139447, 1139453,\n", + " 1141925, 1146901, 1144242, 1141841, 1145974, 1143845, 1143851, 1146024,\n", + " 1146129, 1146140, 1154328, 1142533, 1149933, 1139990, 1143293, 1143294,\n", + " 1147541, 1147543, 1148763, 1147282, 1142829, 1142816, 1138660, 1149155,\n", + " 1140349, 1139408, 1139417, 1149608, 1149610, 1143051, 1143040, 1136836,\n", + " 1165623, 1139329, 1139328, 1142159, 1143345, 1144619, 1140837, 1140845,\n", + " 1144086, 1135872, 1150756, 1144306, 1143957, 1138018, 1143456, 1143937,\n", + " 1143807, 1147521, 1140364, 1168921, 1144219, 1147984, 1147995, 1147999,\n", + " 1134899, 1144003, 1144010, 1139252, 1145466, 1148704, 1142690, 1141327,\n", + " 1153701, 1147060, 1149725, 1147024, 1141131, 1145011, 1145012, 1158226,\n", + " 1143921, 1147880, 1145238, 1145751, 1145756, 1148384, 1146178, 1146180,\n", + " 1151239, 1151242, 1152530, 1150438, 1150445, 1149791, 1149777, 1144514,\n", + " 1144526, 1145839, 1150339, 1151988, 1151994, 1147794, 1147795, 1151480,\n", + " 1144888, 1146723, 1134879, 1148693, 1150127, 1147021, 1147023, 1135800,\n", + " 1144819, 1148744, 1153574, 1148461, 1147653, 1143552, 1146407, 1148300,\n", + " 1135079, 1139096, 1154420, 1158794, 1152563, 1136251, 1136247, 1139721,\n", + " 1139723, 1146682, 1146686, 1138871, 1138409, 1157968, 1157979, 1157983,\n", + " 1148720, 1139936, 1139938, 1139940, 1150052, 1148204, 1141733, 1153192,\n", + " 1153188, 1144849, 1150356, 1169594, 1148084, 1141022, 1147442, 1151816,\n", + " 1151821, 1152581, 1135307, 1151909, 1148498, 1149732, 1141420, 1150630,\n", + " 1151352, 1155164, 1147602, 1147738, 1149385, 1146969, 1149356, 1153249,\n", + " 1146623, 1151691, 1152849, 1146280, 1150086, 1137746, 1146307, 1152622,\n", + " 1140521, 1155140, 1149203, 1154123, 1151576, 1151627, 1151617, 1150578,\n", + " 1145273, 1136131, 1151441, 1148914, 1145952, 1145957, 1152903, 1152341,\n", + " 1146816, 1156816, 1138283, 1138279, 1152294, 1152300, 1136023, 1136028,\n", + " 1136031, 1158704, 1156619, 1156622, 1151188, 1151187, 1140675, 1152928,\n", + " 1150159, 1150164, 1148033, 1148040, 1149300, 1152607, 1155223, 1149794,\n", + " 1137048, 1148628, 1158530, 1158540, 1137458, 1149942, 1135698, 1153085,\n", + " 1142047, 1154381, 1156720, 1156723, 1156728, 1135434, 1157540, 1142385,\n", + " 1158860, 1150873, 1154929, 1156505, 1152397, 1157064, 1157069, 1155412,\n", + " 1145196, 1137809, 1139473, 1149054, 1151788, 1150824, 1150817, 1150828,\n", + " 1153415, 1135634, 1147810, 1139525, 1158306, 1158311, 1140421, 1155441,\n", + " 1155451, 1153359, 1162120, 1140877, 1154529, 1154530, 1150489, 1142755,\n", + " 1142764, 1156207, 1157642, 1151379, 1155122, 1152527, 1157172, 1157183,\n", + " 1153480, 1151424, 1145806, 1168230, 1155628, 1155630, 1158491, 1155572,\n", + " 1155582, 1158824, 1158325, 1148834, 1155646, 1143254, 1154250, 1154240,\n", + " 1154908, 1154909, 1143189, 1150371, 1155293, 1159622, 1151030, 1158578,\n", + " 1159003, 1153784, 1153786, 1159108, 1159116, 1159106, 1145682, 1145688,\n", + " 1145690, 1145681, 1137316, 1137323, 1140918, 1134677, 1135601, 1148149,\n", + " 1148159, 1150661, 1158665, 1158667, 1158669, 1157684, 1159258, 1152220,\n", + " 1159213, 1152498, 1140381, 1155975, 1135190, 1156812, 1161472, 1155392,\n", + " 1155403, 1149700, 1160163, 1153491, 1136896, 1158760, 1158764, 1140209,\n", + " 1158815, 1158437, 1158447, 1151615, 1136494, 1159244, 1156488, 1156490,\n", + " 1153808, 1136640, 1162167, 1156516, 1146126, 1155865, 1158006, 1155521,\n", + " 1155528, 1161539, 1135662, 1135652, 1142666, 1164158, 1167359, 1144270,\n", + " 1157946, 1160563, 1153052, 1153045, 1162835, 1162845, 1144159, 1156111,\n", + " 1138393, 1142679, 1142681, 1150046, 1149063, 1149070, 1145948, 1155479,\n", + " 1155480, 1154300, 1153519, 1147300, 1171987, 1157606, 1164006, 1156787,\n", + " 1149953, 1149963, 1163878, 1163407, 1139592, 1166073, 1148769, 1159760,\n", + " 1164052, 1140650, 1140643, 1148600, 1148603, 1148607, 1148598, 1144504,\n", + " 1158643, 1158653, 1159025, 1159029, 1159032, 1163742, 1152247, 1160605,\n", + " 1155588, 1156589, 1153924, 1144979, 1146500, 1164580, 1145137, 1141471,\n", + " 1141457, 1157050, 1182254, 1156737, 1156739, 1156744, 1157955, 1153648,\n", + " 1153663, 1150648, 1144812, 1153273, 1135567, 1164744, 1142722, 1156300,\n", + " 1144051, 1145728, 1145228, 1145229, 1154700, 1154701, 1146045, 1175801,\n", + " 1144973, 1169201, 1152624, 1145900, 1145902, 1153520, 1143402, 1143404,\n", + " 1171867, 1158722, 1162876, 1154076, 1167317, 1147338, 1144690, 1177930,\n", + " 1169602, 1167817, 1156308, 1166653, 1155170, 1154213, 1150515, 1150518,\n", + " 1156113, 1156119, 1144346, 1144336, 1157531, 1157534, 1138378, 1147751,\n", + " 1154670, 1154893, 1169162, 1138129, 1141048, 1141043, 1151674, 1172330,\n", + " 1154364, 1154352, 1149452, 1158623, 1173047, 1173050, 1172759, 1169948,\n", + " 1152353, 1152546, 1168400, 1149402, 1148667, 1167016, 1148335, 1182124,\n", + " 1173307, 1145033, 1169144, 1154028, 1152150, 1164974, 1159658, 1159655,\n", + " 1169572, 1169583, 1151697, 1157153, 1172111, 1147711, 1151850, 1147934,\n", + " 1157592, 1149247, 1170495, 1170490, 1189748, 1172961, 1171293, 1155739,\n", + " 1168392, 1168398, 1168604, 1172226, 1146755, 1180475, 1159091, 1166682,\n", + " 1154148, 1149169, 1179811, 1180600, 1143279, 1180393, 1185666, 1168481,\n", + " 1179233, 1171302, 1153803, 1186319, 1171396, 1182651, 1178571, 1158027,\n", + " 1161255, 1162129, 1155250, 1155262, 1172010, 1176798, 1154707, 1157792,\n", + " 1157803, 1157795, 1171623, 1163569, 1178361, 1155796, 1157126, 1157991,\n", + " 1180034, 1157072, 1178706, 1158253, 1153898, 1161846, 1134651, 1164563,\n", + " 1145626, 1163538, 1178757, 1179442, 1149755, 1146242, 1186957, 1157761,\n", + " 1187940, 1158512, 1183330, 1179635, 1158934, 1179991, 1155890, 1155895,\n", + " 1180849, 1162986, 1179924, 1140395, 1140399, 1182330, 1174999, 1167762,\n", + " 1168886, 1179836, 1171634, 1171644, 1160078, 1164231, 1182337, 1165082,\n", + " 1156861, 1170341, 1147179, 1172608, 1156162, 1179052, 1170034, 1156539,\n", + " 1170822, 1139831, 1170433, 1154806, 1154812, 1149668, 1191674, 1151284,\n", + " 1189687, 1156049, 1156055, 1190913, 1149544, 1188814, 1182370, 1148798,\n", + " 1181951, 1194454, 1171669, 1175030, 1159169, 1162502, 1169707, 1181834,\n", + " 1172122, 1152094, 1181649, 1178301, 1188286, 1179769, 1187536, 1194149,\n", + " 1167466, 1157008, 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195442, 1197451, 1195397, 1195406, 1198242, 1197717, 1198730, 1198731,\n", + " 1198734, 1195858, 1199282, 1198458, 1198463, 1198832, 1201582, 1197777,\n", + " 1203047, 1195948, 1196871, 1194745, 1194770, 1195494, 1196631, 1195103,\n", + " 1195263, 1199135, 1196534, 1201992, 1196030, 1198543, 1201427, 1194952,\n", + " 1195457, 1194882, 1194880, 1199172, 1199171, 1195740, 1197856, 1196694,\n", + " 1195970, 1198643, 1198167, 1198169, 1199823, 1195270, 1197141, 1197136,\n", + " 1196255, 1197265, 1197273, 1195842, 1195850, 1198915, 1197474, 1200036,\n", + " 1200032, 1199710, 1196282, 1195351, 1198284, 1199330, 1196034, 1197291,\n", + " 1194928, 1195119, 1199685, 1196302, 1199152, 1198400, 1199579, 1196498,\n", + " 1196501, 1197601, 1196727, 1195773, 1202623, 1200894, 1198428, 1198811,\n", + " 1199555, 1199557, 1200612, 1200570, 1196477, 1199445, 1202630, 1201056,\n", + " 1200918, 1201405, 1202640, 1199716, 1199532, 1200546, 1200339, 1197100,\n", + " 1202529, 1199886, 1200690, 1199908, 1196768, 1200189, 1201291, 1198472,\n", + " 1198478, 1197553, 1203329, 1202304, 1196966, 1195679, 1195664, 1198932,\n", + " 1195418, 1197822, 1197821, 1194680, 1199469, 1198824, 1201475, 1199240,\n", + " 1197593, 1201886, 1200296, 1197652, 1197035, 1197872], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195442, 1197451, 1195397, 1195406, 1198242, 1197717, 1198730, 1198731,\n", + " 1198734, 1195858, 1199282, 1198458, 1198463, 1198832, 1201582, 1197777,\n", + " 1203047, 1195948, 1196871, 1194745, 1194770, 1195494, 1196631, 1195103,\n", + " 1195263, 1199135, 1196534, 1201992, 1196030, 1198543, 1201427, 1194952,\n", + " 1195457, 1194882, 1194880, 1199172, 1199171, 1195740, 1197856, 1196694,\n", + " 1195970, 1198643, 1198167, 1198169, 1199823, 1195270, 1197141, 1197136,\n", + " 1196255, 1197265, 1197273, 1195842, 1195850, 1198915, 1197474, 1200036,\n", + " 1200032, 1199710, 1196282, 1195351, 1198284, 1199330, 1196034, 1197291,\n", + " 1194928, 1195119, 1199685, 1196302, 1199152, 1198400, 1199579, 1196498,\n", + " 1196501, 1197601, 1196727, 1195773, 1202623, 1200894, 1198428, 1198811,\n", + " 1199555, 1199557, 1200612, 1200570, 1196477, 1199445, 1202630, 1201056,\n", + " 1200918, 1201405, 1202640, 1199716, 1199532, 1200546, 1200339, 1197100,\n", + " 1202529, 1199886, 1200690, 1199908, 1196768, 1200189, 1201291, 1198472,\n", + " 1198478, 1197553, 1203329, 1202304, 1196966, 1195679, 1195664, 1198932,\n", + " 1195418, 1197822, 1197821, 1194680, 1199469, 1198824, 1201475, 1199240,\n", + " 1197593, 1201886, 1200296, 1197652, 1197035, 1197872], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 1.5618e-01, -3.1472e-04, 5.0962e-01, ..., 6.3640e-02,\n", + " -1.6380e-03, -3.8159e-03],\n", + " [ 1.5909e-01, -1.6151e-04, 4.4616e-01, ..., 1.2431e-01,\n", + " -2.5891e-03, -3.8731e-03],\n", + " [ 1.7596e-01, -3.5311e-04, 6.1203e-01, ..., 8.0340e-02,\n", + " -1.8355e-03, -4.5960e-03],\n", + " ...,\n", + " [ 1.7269e-01, -3.4343e-04, 5.3881e-01, ..., 5.7106e-02,\n", + " -1.5565e-03, -4.1279e-03],\n", + " [ 1.4665e-01, -2.5287e-04, 4.6079e-01, ..., 1.2009e-01,\n", + " -2.4106e-03, -3.8640e-03],\n", + " [ 2.9373e-01, -9.4085e-04, 8.8808e-01, ..., 3.3441e-02,\n", + " -1.3231e-03, -6.5409e-03]], device='cuda:0'), 'paper': tensor([[-5.5951e-03, 2.8548e+00, 3.0372e+00, ..., 2.7591e+00,\n", + " -4.2473e-02, 1.4771e+00],\n", + " [-3.7388e-03, 8.6817e-01, 5.9696e-01, ..., -6.7653e-03,\n", + " -1.4894e-02, -4.5201e-03],\n", + " [-4.6318e-03, 5.4676e-01, 7.5483e-01, ..., -7.1013e-03,\n", + " -1.6605e-02, -7.0008e-03],\n", + " ...,\n", + " [-2.4276e-03, 1.5489e+00, 2.2734e-01, ..., -6.9845e-03,\n", + " -2.0484e-02, -3.5922e-04],\n", + " [ 5.5221e-02, 2.2462e+00, 1.6808e+00, ..., -4.5095e-04,\n", + " -3.0054e-02, 8.5426e-01],\n", + " [-5.0538e-03, 3.8616e+00, 2.7032e+00, ..., 5.2975e+00,\n", + " -5.5538e-02, 3.3620e+00]], device='cuda:0'), 'author': tensor([[-5.3376e-03, 5.6218e-01, 3.5569e-04, ..., 1.1310e+00,\n", + " 1.2410e-01, -3.9716e-03],\n", + " [-1.7257e-03, 2.8658e-01, 4.8988e-02, ..., 1.1342e+00,\n", + " 2.4808e-01, -1.4063e-03],\n", + " [-4.6994e-04, 2.7382e-02, 1.1459e-01, ..., 1.5975e-01,\n", + " 5.6292e-04, -6.6914e-04],\n", + " ...,\n", + " [-2.1332e-03, 2.5272e-01, 1.2292e-01, ..., 1.4199e+00,\n", + " 2.1455e-01, -2.0714e-03],\n", + " [-8.8278e-04, 1.8383e-01, 1.4199e-01, ..., 1.2047e+00,\n", + " 4.1184e-01, -3.3056e-04],\n", + " [-1.4280e-03, 2.3146e-01, 1.1802e-01, ..., 1.2527e+00,\n", + " 3.4264e-01, -5.2775e-04]], device='cuda:0'), 'field_of_study': tensor([[-0.0040, 0.7011, 0.2571, ..., -0.0067, 0.2616, 0.5759],\n", + " [-0.0024, 0.4844, 0.2182, ..., -0.0086, 0.3706, 0.3444],\n", + " [-0.0018, 0.6050, 0.3290, ..., -0.0062, 0.1156, 0.4864],\n", + " ...,\n", + " [-0.0019, 0.6500, 0.2068, ..., -0.0083, 0.3132, 0.5679],\n", + " [-0.0012, 0.7501, 0.2807, ..., -0.0098, 0.4322, 0.6136],\n", + " [ 0.1226, 0.7179, 0.2025, ..., -0.0100, 0.5545, 0.0221]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 141, 94, 86, 484, 306, 365, 484, 275, 396, 396, 206, 206,\n", + " 529, 584, 931, 680, 680, 1022, 1022, 1022, 1314, 1314, 996, 1251,\n", + " 1235, 1235, 1109, 1171, 1239, 1561, 1561, 1225, 1225, 1225, 1438, 1518,\n", + " 1660, 1468, 1549, 1549, 1549, 1549, 1775, 1668, 1668, 1668, 1769, 1697,\n", + " 1697, 1762, 1708, 1703, 1703, 1656, 1736, 1736, 1889, 1791, 1860, 1860,\n", + " 1951, 1845, 1831, 2041, 1968, 2003, 2158, 1938, 2004, 2004, 2004, 1958,\n", + " 1958, 2141, 2004, 2004, 2108, 2217, 2363, 2361, 2453, 2256, 2389, 2562,\n", + " 2562, 2562, 2476, 2576, 2576, 2802, 2715, 2838, 2595, 2595, 2595, 2951,\n", + " 2791, 3092, 2945, 3251, 3137, 3116, 3261, 3273, 3273, 3273, 3281, 3363,\n", + " 3363, 3569, 3569, 3456, 3287, 3539, 3332, 3597, 3599, 3382, 3382, 3382,\n", + " 3866, 3785, 4022, 4117, 4098, 4232, 4081, 4152, 4256, 4213, 4283, 4310,\n", + " 4296, 4339, 4292, 4292, 4296, 4358, 4438, 4317, 4303, 4303, 4457, 4362,\n", + " 4450, 4410, 4655, 4644, 4688, 4777, 4777, 4645, 4758, 4758, 4886, 5006,\n", + " 5282, 5148, 4918, 5203, 5079, 5435, 5467, 5026, 5093, 5561, 5168, 5480,\n", + " 5202, 5540, 5540, 5462, 5728, 5710, 5609, 5609, 5512, 5596, 5596, 5596,\n", + " 5632, 5697],\n", + " [ 41, 104, 13, 68, 7, 49, 22, 16, 101, 80, 88, 118,\n", + " 64, 40, 120, 113, 67, 6, 70, 79, 75, 85, 116, 84,\n", + " 109, 86, 108, 89, 121, 54, 12, 0, 61, 32, 26, 1,\n", + " 95, 62, 33, 3, 99, 122, 22, 81, 113, 115, 105, 24,\n", + " 124, 124, 36, 23, 24, 19, 44, 104, 90, 74, 1, 124,\n", + " 74, 50, 124, 103, 114, 88, 74, 114, 79, 10, 111, 57,\n", + " 121, 65, 46, 33, 14, 112, 82, 56, 76, 82, 63, 8,\n", + " 2, 119, 74, 96, 25, 111, 50, 50, 79, 43, 69, 94,\n", + " 47, 39, 98, 79, 105, 55, 113, 106, 78, 85, 123, 41,\n", + " 123, 23, 124, 74, 110, 108, 53, 66, 58, 34, 97, 77,\n", + " 107, 65, 86, 35, 105, 17, 4, 17, 17, 91, 17, 17,\n", + " 92, 83, 31, 78, 21, 117, 87, 99, 93, 20, 74, 30,\n", + " 45, 72, 108, 18, 14, 9, 22, 88, 51, 79, 60, 5,\n", + " 37, 37, 74, 79, 29, 42, 102, 60, 83, 38, 74, 48,\n", + " 74, 15, 27, 92, 125, 11, 100, 71, 59, 106, 52, 73,\n", + " 75, 28]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1030, 2836, 3184, ..., 662, 7165, 4214],\n", + " [ 108, 18, 222, ..., 7181, 7142, 7192]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 19, 52, 41, ..., 104, 83, 105],\n", + " [ 35, 134, 154, ..., 5624, 5683, 5688]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 108, 108, 108, ..., 7092, 7092, 7080],\n", + " [ 433, 502, 820, ..., 389, 850, 243]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 689, 190, 291, ..., 60, 302, 534],\n", + " [ 210, 121, 55, ..., 7232, 7188, 7231]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2443, 5409, 6974, ..., 2951, 5714, 5811],\n", + " [ 86, 90, 78, ..., 5677, 5568, 5656]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 108, 108, 149, ..., 7092, 7092, 7198],\n", + " [1027, 1030, 1755, ..., 7134, 7194, 40]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 86, 86, 86, ..., 5690, 5690, 5690],\n", + " [2456, 2499, 2739, ..., 4204, 4126, 4594]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006074\n", + "sampling 0.005922\n", + "noi time: 0.001975\n", + "get_vertex_data call: 0.030687\n", + "noi group time: 0.003779\n", + "eoi_group_time: 0.01418\n", + "second half: 0.224603\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 14491, 24187, 32616, ..., 1126550, 1130624, 1130498],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 14491, 24187, 32616, ..., 1126550, 1130624, 1130498],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208584, 1210552, 1231437, ..., 1927252, 1937986, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208584, 1210552, 1231437, ..., 1927252, 1937986, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1136228, 1136230, ..., 1184675, 1182401, 1187035],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1136228, 1136230, ..., 1184675, 1182401, 1187035],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195442, 1198721, 1198732, 1199282, 1198459, 1202255, 1201577, 1194626,\n", + " 1194629, 1201016, 1203047, 1197232, 1202804, 1198557, 1196685, 1194743,\n", + " 1198188, 1196624, 1196631, 1194642, 1194648, 1196586, 1195514, 1195263,\n", + " 1197930, 1197933, 1201992, 1196031, 1199519, 1197760, 1195888, 1195895,\n", + " 1194754, 1195989, 1197807, 1198950, 1198163, 1199810, 1195273, 1196747,\n", + " 1195850, 1198915, 1195541, 1198195, 1196316, 1199317, 1200037, 1195918,\n", + " 1199699, 1198280, 1199339, 1200949, 1199059, 1199685, 1199628, 1200878,\n", + " 1200403, 1200748, 1199231, 1200060, 1201511, 1196508, 1199023, 1197970,\n", + " 1196727, 1195771, 1195773, 1200895, 1198428, 1200154, 1199410, 1198811,\n", + " 1199555, 1201824, 1202430, 1200570, 1195599, 1198389, 1202629, 1201056,\n", + " 1200918, 1202640, 1200557, 1197102, 1201841, 1197040, 1199908, 1200200,\n", + " 1202239, 1202706, 1195886, 1201590, 1199606, 1195006, 1196929, 1198929,\n", + " 1200680, 1201321, 1200928, 1197816, 1198127, 1198967, 1203102, 1201138,\n", + " 1194720, 1194724, 1198147, 1198824, 1198819, 1199232, 1195370, 1197652,\n", + " 1201361, 1197872], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195442, 1198721, 1198732, 1199282, 1198459, 1202255, 1201577, 1194626,\n", + " 1194629, 1201016, 1203047, 1197232, 1202804, 1198557, 1196685, 1194743,\n", + " 1198188, 1196624, 1196631, 1194642, 1194648, 1196586, 1195514, 1195263,\n", + " 1197930, 1197933, 1201992, 1196031, 1199519, 1197760, 1195888, 1195895,\n", + " 1194754, 1195989, 1197807, 1198950, 1198163, 1199810, 1195273, 1196747,\n", + " 1195850, 1198915, 1195541, 1198195, 1196316, 1199317, 1200037, 1195918,\n", + " 1199699, 1198280, 1199339, 1200949, 1199059, 1199685, 1199628, 1200878,\n", + " 1200403, 1200748, 1199231, 1200060, 1201511, 1196508, 1199023, 1197970,\n", + " 1196727, 1195771, 1195773, 1200895, 1198428, 1200154, 1199410, 1198811,\n", + " 1199555, 1201824, 1202430, 1200570, 1195599, 1198389, 1202629, 1201056,\n", + " 1200918, 1202640, 1200557, 1197102, 1201841, 1197040, 1199908, 1200200,\n", + " 1202239, 1202706, 1195886, 1201590, 1199606, 1195006, 1196929, 1198929,\n", + " 1200680, 1201321, 1200928, 1197816, 1198127, 1198967, 1203102, 1201138,\n", + " 1194720, 1194724, 1198147, 1198824, 1198819, 1199232, 1195370, 1197652,\n", + " 1201361, 1197872], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.5763e-01, -2.5737e-04, 6.1846e-01, ..., 5.0920e-02,\n", + " -1.3589e-03, -4.3213e-03],\n", + " [ 1.1172e-01, -1.5978e-04, 4.8818e-01, ..., 4.7870e-02,\n", + " -1.2374e-03, -3.5541e-03],\n", + " [ 1.3612e-01, -3.4438e-04, 5.8945e-01, ..., 6.0047e-02,\n", + " -1.6783e-03, -3.9373e-03],\n", + " ...,\n", + " [ 1.7681e-01, -4.4368e-04, 5.9966e-01, ..., 7.7358e-02,\n", + " -1.7854e-03, -4.5126e-03],\n", + " [ 1.1422e-01, 2.5563e-02, 5.8134e-01, ..., 8.2881e-02,\n", + " -1.3806e-03, -3.8984e-03],\n", + " [ 3.2628e-02, -1.8917e-04, 6.5057e-02, ..., 3.7059e-02,\n", + " -1.0314e-03, -1.4317e-03]], device='cuda:0'), 'paper': tensor([[-3.2692e-03, 1.5179e+00, 7.9863e-01, ..., -1.1558e-02,\n", + " -2.1714e-02, -1.0304e-02],\n", + " [ 2.8937e-01, 1.0963e+00, 1.1575e-01, ..., -1.0385e-02,\n", + " -1.7703e-02, 2.9530e-01],\n", + " [-1.3797e-02, -1.4645e-03, 1.6373e+00, ..., -7.9391e-03,\n", + " -2.4724e-02, -1.8234e-02],\n", + " ...,\n", + " [ 2.1081e-02, 1.0814e+00, 2.3365e-01, ..., -7.3318e-03,\n", + " -1.4495e-02, 8.8237e-02],\n", + " [-3.0458e-03, 9.7831e-01, 6.2191e-01, ..., -4.3298e-03,\n", + " -1.8557e-02, -2.0278e-03],\n", + " [-5.5616e-03, 3.7931e+00, 2.6026e+00, ..., 5.2091e+00,\n", + " -5.4528e-02, 3.2369e+00]], device='cuda:0'), 'author': tensor([[-4.6994e-04, 2.7382e-02, 1.1459e-01, ..., 1.5975e-01,\n", + " 5.6292e-04, -6.6914e-04],\n", + " [-2.0458e-03, 2.1361e-01, 8.8853e-02, ..., 1.1819e+00,\n", + " 2.2842e-01, -2.0175e-03],\n", + " [-1.9208e-03, 2.7360e-01, 9.1330e-02, ..., 1.2384e+00,\n", + " 1.4647e-01, -1.7421e-03],\n", + " ...,\n", + " [-1.2292e-03, 1.7705e-01, 2.2129e-01, ..., 1.3087e+00,\n", + " 2.8807e-01, -1.2053e-03],\n", + " [-4.6994e-04, 2.7382e-02, 1.1459e-01, ..., 1.5975e-01,\n", + " 5.6292e-04, -6.6914e-04],\n", + " [-4.6994e-04, 2.7382e-02, 1.1459e-01, ..., 1.5975e-01,\n", + " 5.6292e-04, -6.6914e-04]], device='cuda:0'), 'field_of_study': tensor([[-0.0032, 0.6871, 0.2601, ..., -0.0076, 0.2377, 0.5613],\n", + " [-0.0019, 0.6629, 0.3755, ..., -0.0089, 0.3548, 0.4908],\n", + " [-0.0010, 0.7561, 0.3788, ..., -0.0080, 0.3402, 0.4787],\n", + " ...,\n", + " [-0.0014, 0.5452, 0.1754, ..., -0.0074, 0.4607, 0.3836],\n", + " [-0.0020, 0.3990, 0.0341, ..., -0.0060, 0.2446, 0.3360],\n", + " [-0.0020, 0.3990, 0.0341, ..., -0.0060, 0.2446, 0.3360]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 148, 118, 26, 73, 73, 73, 108, 427, 196, 196, 372, 267,\n", + " 406, 406, 328, 445, 682, 507, 507, 494, 549, 549, 735, 844,\n", + " 688, 456, 456, 469, 469, 823, 823, 730, 877, 1015, 1233, 1203,\n", + " 1145, 1270, 1046, 1281, 1050, 1270, 1057, 1016, 1225, 1274, 1225, 1383,\n", + " 1451, 1453, 1675, 1568, 1522, 1522, 1522, 1444, 1444, 1614, 1879, 1744,\n", + " 1591, 1767, 1767, 1767, 1767, 1767, 1842, 1896, 1777, 1838, 1892, 1892,\n", + " 1888, 1888, 1926, 1917, 1917, 2008, 2008, 2008, 1881, 2011, 1975, 2048,\n", + " 2127, 1989, 1989, 2069, 2162, 2246, 2044, 2044, 2212, 2269, 2300, 2282,\n", + " 2235, 2386, 2426, 2423, 2423, 2609, 2413, 2464, 2464, 2464, 2640, 2749,\n", + " 2547, 2819, 2767, 2767, 2882, 3011, 3011, 2962, 2962, 3300, 3296, 3156,\n", + " 3055, 3055, 3328, 3263, 3127, 3466, 3466, 3089, 3428, 3290, 3528, 3568,\n", + " 3654, 3652, 3545, 3712, 3738, 3906, 3906, 3906, 4041, 4231, 4134, 4407,\n", + " 4255, 4408, 4329, 4572, 4582, 4495, 4774, 4520, 4590, 4526, 4628, 4531,\n", + " 4587, 4643, 4914, 5067, 4793, 4793, 5023, 4978, 5024, 5024, 5080, 5294,\n", + " 5224, 5281, 5281, 5342],\n", + " [ 109, 7, 54, 32, 111, 73, 108, 88, 36, 59, 56, 88,\n", + " 82, 88, 24, 1, 20, 68, 36, 38, 11, 74, 88, 78,\n", + " 7, 62, 58, 72, 92, 65, 113, 15, 3, 78, 64, 46,\n", + " 71, 108, 25, 105, 45, 19, 94, 77, 11, 36, 74, 42,\n", + " 61, 23, 1, 3, 90, 61, 87, 51, 22, 53, 95, 107,\n", + " 84, 27, 71, 48, 51, 6, 76, 8, 55, 105, 23, 85,\n", + " 17, 35, 14, 88, 29, 111, 100, 102, 18, 78, 94, 44,\n", + " 21, 70, 88, 80, 79, 5, 104, 8, 26, 84, 41, 109,\n", + " 31, 63, 101, 18, 43, 73, 3, 33, 34, 54, 84, 88,\n", + " 94, 49, 50, 110, 0, 21, 64, 91, 37, 69, 88, 108,\n", + " 105, 67, 68, 6, 86, 23, 83, 4, 26, 5, 45, 52,\n", + " 10, 75, 84, 13, 23, 98, 16, 26, 106, 51, 64, 47,\n", + " 40, 93, 64, 2, 97, 99, 22, 60, 18, 64, 23, 18,\n", + " 57, 96, 9, 39, 89, 112, 66, 81, 26, 23, 64, 28,\n", + " 12, 103, 30, 4]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 197, 1638, 3644, ..., 2400, 2568, 3307],\n", + " [ 73, 21, 369, ..., 8504, 8635, 8693]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 113, 113, 3, ..., 88, 3, 3],\n", + " [ 0, 39, 46, ..., 5377, 5320, 5371]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 11, 11, 11, ..., 8618, 8618, 8618],\n", + " [ 10, 365, 658, ..., 832, 365, 681]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 95, 330, 1005, ..., 861, 611, 1003],\n", + " [ 183, 410, 261, ..., 8668, 8699, 8517]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[7304, 7863, 3307, ..., 1224, 8463, 2479],\n", + " [ 35, 143, 44, ..., 5347, 5342, 5290]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 389, 389, 53, ..., 8635, 8635, 8624],\n", + " [1330, 1694, 128, ..., 4819, 5370, 6251]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 148, 118, 118, ..., 5281, 5349, 5342],\n", + " [3717, 595, 3568, ..., 7496, 5228, 8463]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.003673\n", + "sampling 0.00359\n", + "noi time: 0.000673\n", + "get_vertex_data call: 0.013792\n", + "noi group time: 0.001851\n", + "eoi_group_time: 0.011041\n", + "second half: 0.110849\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 23829, 31145, 24187, ..., 1119184, 1126559, 1119684],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 23829, 31145, 24187, ..., 1119184, 1126559, 1119684],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1217957, 1203800, 1215823, ..., 1938519, 1935119, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1217957, 1203800, 1215823, ..., 1938519, 1935119, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137213, 1141424, 1136228, 1136230, 1135926, 1135165, 1135160, 1135716,\n", + " 1137784, 1137791, 1141751, 1141756, 1141758, 1138335, 1136223, 1141257,\n", + " 1141250, 1136969, 1141443, 1143600, 1139811, 1137946, 1137947, 1143372,\n", + " 1139615, 1139608, 1140783, 1150497, 1142963, 1135376, 1136948, 1149228,\n", + " 1142947, 1147949, 1155683, 1155689, 1143820, 1149644, 1149646, 1147473,\n", + " 1147483, 1142885, 1152257, 1144636, 1135262, 1146992, 1153012, 1135947,\n", + " 1135111, 1148346, 1146656, 1136125, 1147089, 1147095, 1147091, 1155018,\n", + " 1147202, 1147211, 1136674, 1136679, 1152427, 1146382, 1140540, 1138112,\n", + " 1138118, 1138119, 1137254, 1137177, 1149456, 1140159, 1134720, 1134728,\n", + " 1134735, 1135909, 1135915, 1135367, 1135202, 1140767, 1154739, 1134967,\n", + " 1141036, 1134794, 1157443, 1143377, 1138504, 1138508, 1137329, 1137693,\n", + " 1144395, 1136816, 1137529, 1157397, 1152376, 1136662, 1135268, 1148484,\n", + " 1139161, 1141702, 1135579, 1135583, 1141086, 1136105, 1135668, 1153094,\n", + " 1137957, 1158136, 1135499, 1137019, 1156899, 1138306, 1138314, 1139878,\n", + " 1138436, 1138440, 1138461, 1138449, 1138462, 1136594, 1135134, 1135123,\n", + " 1149328, 1138844, 1138846, 1156603, 1147112, 1142611, 1135355, 1138185,\n", + " 1158984, 1145842, 1148531, 1137409, 1141532, 1138067, 1138073, 1134992,\n", + " 1142434, 1136546, 1148805, 1139755, 1136734, 1140204, 1158971, 1158974,\n", + " 1142906, 1159009, 1159012, 1159019, 1141065, 1141070, 1153543, 1143631,\n", + " 1138642, 1138154, 1146075, 1140557, 1141985, 1152042, 1152044, 1139063,\n", + " 1139064, 1136057, 1136051, 1140670, 1137734, 1137728, 1134750, 1138255,\n", + " 1135549, 1162958, 1144130, 1149001, 1139889, 1145356, 1141980, 1141974,\n", + " 1143767, 1154863, 1143706, 1143224, 1137668, 1137670, 1139025, 1140009,\n", + " 1146834, 1146844, 1146847, 1135860, 1135865, 1136426, 1136627, 1140467,\n", + " 1141224, 1141891, 1139386, 1136917, 1139741, 1143667, 1137196, 1137188,\n", + " 1144237, 1146449, 1141785, 1141786, 1139495, 1136760, 1141609, 1141300,\n", + " 1134987, 1136854, 1144428, 1144420, 1141821, 1138476, 1149111, 1142713,\n", + " 1138708, 1142913, 1137661, 1138423, 1143113, 1148443, 1144596, 1136866,\n", + " 1145298, 1144044, 1141579, 1141398, 1144182, 1144179, 1137614, 1137610,\n", + " 1150906, 1166711, 1139559, 1140501, 1147153, 1136378, 1142650, 1162804,\n", + " 1141365, 1141367, 1141664, 1149090, 1139022, 1144279, 1139508, 1139510,\n", + " 1139769, 1139774, 1140093, 1139127, 1144992, 1144997, 1145000, 1145001,\n", + " 1140619, 1140990, 1147050, 1145885, 1145873, 1152976, 1152988, 1142556,\n", + " 1141925, 1144241, 1144242, 1145328, 1140580, 1137149, 1139405, 1137570,\n", + " 1141390, 1145980, 1145974, 1146005, 1142098, 1146024, 1138085, 1146140,\n", + " 1146141, 1142533, 1149933, 1147086, 1139990, 1146302, 1143293, 1143283,\n", + " 1151124, 1147541, 1147543, 1147150, 1148761, 1147282, 1142816, 1142629,\n", + " 1149366, 1148003, 1149608, 1138927, 1136836, 1146099, 1139298, 1144957,\n", + " 1143345, 1144765, 1145818, 1139969, 1135872, 1135876, 1150294, 1150300,\n", + " 1150301, 1146514, 1146523, 1146526, 1143456, 1143470, 1143457, 1142997,\n", + " 1143937, 1147574, 1140360, 1140364, 1137990, 1143083, 1148965, 1148966,\n", + " 1144222, 1147984, 1147999, 1134909, 1144003, 1139252, 1139258, 1139249,\n", + " 1145467, 1147233, 1148704, 1142697, 1141319, 1141836, 1152328, 1143434,\n", + " 1147071, 1149714, 1147025, 1143826, 1142858, 1141131, 1139547, 1158226,\n", + " 1158228, 1150452, 1143922, 1147880, 1148362, 1154526, 1145240, 1145246,\n", + " 1145751, 1142370, 1146152, 1148391, 1146178, 1138854, 1138858, 1151242,\n", + " 1148215, 1148214, 1148223, 1152530, 1152538, 1150445, 1149258, 1148928,\n", + " 1148826, 1148827, 1156470, 1154438, 1149791, 1144526, 1141347, 1150342,\n", + " 1152013, 1144203, 1165252, 1147794, 1151480, 1152022, 1152024, 1152027,\n", + " 1144884, 1154271, 1145255, 1135516, 1134869, 1150127, 1147019, 1147021,\n", + " 1147023, 1141949, 1150736, 1154976, 1154979, 1143560, 1143565, 1146412,\n", + " 1148288, 1148294, 1148300, 1152070, 1137724, 1135072, 1164883, 1139096,\n", + " 1152561, 1136247, 1139721, 1139718, 1146676, 1152441, 1148724, 1148726,\n", + " 1168973, 1150052, 1143983, 1148204, 1153181, 1171943, 1153124, 1153192,\n", + " 1145104, 1145111, 1150932, 1152878, 1150352, 1150356, 1147446, 1151816,\n", + " 1135303, 1154183, 1148510, 1141420, 1151352, 1151356, 1151345, 1155152,\n", + " 1147737, 1153447, 1146969, 1153255, 1146623, 1151692, 1142986, 1144476,\n", + " 1152405, 1154056, 1152097, 1152100, 1152109, 1156320, 1153032, 1153038,\n", + " 1137746, 1137755, 1146307, 1146304, 1146317, 1152612, 1155148, 1136401,\n", + " 1157115, 1155358, 1157842, 1157824, 1157833, 1154633, 1151573, 1151627,\n", + " 1151617, 1145278, 1136788, 1148916, 1148927, 1152944, 1152169, 1140934,\n", + " 1138991, 1151298, 1143997, 1156826, 1153311, 1138279, 1138281, 1136028,\n", + " 1156609, 1152928, 1151064, 1137545, 1137392, 1153909, 1166850, 1150164,\n", + " 1148040, 1149300, 1137048, 1148628, 1158530, 1158540, 1137458, 1157514,\n", + " 1155378, 1155376, 1142047, 1156501, 1156505, 1152397, 1157064, 1152833,\n", + " 1145191, 1145187, 1139473, 1146851, 1146854, 1152179, 1147810, 1157777,\n", + " 1139525, 1158304, 1158311, 1151271, 1151340, 1161731, 1162120, 1145771,\n", + " 1156919, 1142755, 1160435, 1157637, 1151379, 1137912, 1158639, 1155374,\n", + " 1155375, 1140186, 1155122, 1155124, 1152527, 1149327, 1153486, 1155748,\n", + " 1155755, 1151424, 1146913, 1156463, 1158096, 1168230, 1155626, 1155628,\n", + " 1155630, 1155631, 1158485, 1154555, 1155573, 1136469, 1158566, 1158824,\n", + " 1158325, 1148836, 1155646, 1153373, 1154648, 1154250, 1154240, 1156711,\n", + " 1160098, 1137359, 1154909, 1143189, 1150371, 1150068, 1155613, 1145727,\n", + " 1155281, 1155293, 1151030, 1137152, 1158578, 1158996, 1153781, 1158347,\n", + " 1145688, 1145681, 1137316, 1140913, 1134677, 1134685, 1135601, 1135605,\n", + " 1145515, 1145507, 1150661, 1155848, 1155843, 1158664, 1158665, 1157684,\n", + " 1146326, 1149145, 1161116, 1156081, 1152220, 1155436, 1156698, 1156693,\n", + " 1155884, 1157732, 1157038, 1142466, 1155975, 1154682, 1142064, 1135199,\n", + " 1158846, 1149696, 1149700, 1154600, 1161309, 1136899, 1136896, 1158753,\n", + " 1140210, 1140218, 1140221, 1158804, 1156778, 1152451, 1152462, 1161625,\n", + " 1152130, 1153808, 1136640, 1151144, 1158006, 1163173, 1144581, 1150011,\n", + " 1155521, 1155528, 1142483, 1163471, 1135662, 1164276, 1142666, 1161647,\n", + " 1159042, 1159071, 1188649, 1159150, 1151081, 1142427, 1157945, 1157946,\n", + " 1160563, 1153052, 1171551, 1155769, 1144149, 1159360, 1153842, 1156107,\n", + " 1138393, 1150035, 1150046, 1150041, 1149063, 1149070, 1151014, 1154294,\n", + " 1153519, 1147300, 1142405, 1146876, 1164012, 1156787, 1149966, 1149963,\n", + " 1139785, 1164910, 1154590, 1160764, 1165762, 1136802, 1148771, 1146063,\n", + " 1159931, 1140130, 1140641, 1148601, 1148607, 1143139, 1143146, 1155813,\n", + " 1156355, 1158643, 1158653, 1156177, 1156191, 1156181, 1159025, 1159032,\n", + " 1163742, 1168110, 1152247, 1178151, 1165585, 1143729, 1155588, 1156582,\n", + " 1156589, 1168428, 1148567, 1144977, 1144979, 1167931, 1147401, 1164580,\n", + " 1152776, 1155044, 1155054, 1162589, 1155272, 1155274, 1141471, 1141463,\n", + " 1141459, 1151650, 1147426, 1147427, 1147433, 1157050, 1149893, 1156737,\n", + " 1156739, 1153663, 1166591, 1150646, 1144810, 1144812, 1167263, 1140112,\n", + " 1162087, 1164741, 1142733, 1156293, 1145176, 1145228, 1169282, 1154700,\n", + " 1172193, 1155324, 1147673, 1147675, 1170789, 1146432, 1146444, 1148168,\n", + " 1148175, 1143037, 1143025, 1147693, 1147694, 1145900, 1145902, 1153534,\n", + " 1168659, 1151755, 1143395, 1143405, 1149555, 1158724, 1158722, 1158728,\n", + " 1154070, 1154076, 1168764, 1170738, 1147339, 1147338, 1145502, 1162893,\n", + " 1149124, 1144681, 1149483, 1155172, 1150515, 1150522, 1150525, 1150518,\n", + " 1156113, 1156119, 1145531, 1144336, 1157534, 1154670, 1154893, 1169162,\n", + " 1157331, 1138129, 1147502, 1158611, 1158623, 1158052, 1153288, 1157380,\n", + " 1171479, 1147416, 1147423, 1155494, 1155502, 1170462, 1152353, 1152362,\n", + " 1170907, 1143172, 1143177, 1152546, 1172778, 1169929, 1161130, 1167010,\n", + " 1165352, 1169144, 1152150, 1153754, 1159655, 1167857, 1157153, 1157373,\n", + " 1157368, 1147697, 1147711, 1147929, 1149239, 1167720, 1173126, 1162106,\n", + " 1168697, 1160987, 1173727, 1146755, 1146765, 1187436, 1167898, 1174845,\n", + " 1178056, 1171073, 1166682, 1170874, 1150234, 1154148, 1171921, 1181871,\n", + " 1186117, 1167662, 1156544, 1158025, 1166554, 1155262, 1177889, 1154718,\n", + " 1157792, 1157795, 1151488, 1181377, 1155799, 1155804, 1187524, 1158249,\n", + " 1153898, 1153893, 1154497, 1164563, 1164203, 1145626, 1163538, 1161515,\n", + " 1180813, 1161911, 1182260, 1182265, 1149744, 1149753, 1149755, 1153609,\n", + " 1155990, 1160121, 1187947, 1177826, 1158512, 1158513, 1187796, 1158934,\n", + " 1158374, 1155890, 1155892, 1155899, 1162690, 1140397, 1170592, 1168621,\n", + " 1171027, 1168876, 1164228, 1182337, 1146169, 1170804, 1156852, 1147182,\n", + " 1156162, 1171443, 1183016, 1156532, 1139828, 1139831, 1150265, 1185819,\n", + " 1156055, 1151972, 1151977, 1149549, 1182371, 1156833, 1140993, 1140995,\n", + " 1182057, 1187629, 1192608, 1171457, 1185892, 1186429, 1158064, 1158067,\n", + " 1166784, 1160968, 1155959, 1179769, 1169837, 1181032, 1182849, 1157022,\n", + " 1161950], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137213, 1141424, 1136228, 1136230, 1135926, 1135165, 1135160, 1135716,\n", + " 1137784, 1137791, 1141751, 1141756, 1141758, 1138335, 1136223, 1141257,\n", + " 1141250, 1136969, 1141443, 1143600, 1139811, 1137946, 1137947, 1143372,\n", + " 1139615, 1139608, 1140783, 1150497, 1142963, 1135376, 1136948, 1149228,\n", + " 1142947, 1147949, 1155683, 1155689, 1143820, 1149644, 1149646, 1147473,\n", + " 1147483, 1142885, 1152257, 1144636, 1135262, 1146992, 1153012, 1135947,\n", + " 1135111, 1148346, 1146656, 1136125, 1147089, 1147095, 1147091, 1155018,\n", + " 1147202, 1147211, 1136674, 1136679, 1152427, 1146382, 1140540, 1138112,\n", + " 1138118, 1138119, 1137254, 1137177, 1149456, 1140159, 1134720, 1134728,\n", + " 1134735, 1135909, 1135915, 1135367, 1135202, 1140767, 1154739, 1134967,\n", + " 1141036, 1134794, 1157443, 1143377, 1138504, 1138508, 1137329, 1137693,\n", + " 1144395, 1136816, 1137529, 1157397, 1152376, 1136662, 1135268, 1148484,\n", + " 1139161, 1141702, 1135579, 1135583, 1141086, 1136105, 1135668, 1153094,\n", + " 1137957, 1158136, 1135499, 1137019, 1156899, 1138306, 1138314, 1139878,\n", + " 1138436, 1138440, 1138461, 1138449, 1138462, 1136594, 1135134, 1135123,\n", + " 1149328, 1138844, 1138846, 1156603, 1147112, 1142611, 1135355, 1138185,\n", + " 1158984, 1145842, 1148531, 1137409, 1141532, 1138067, 1138073, 1134992,\n", + " 1142434, 1136546, 1148805, 1139755, 1136734, 1140204, 1158971, 1158974,\n", + " 1142906, 1159009, 1159012, 1159019, 1141065, 1141070, 1153543, 1143631,\n", + " 1138642, 1138154, 1146075, 1140557, 1141985, 1152042, 1152044, 1139063,\n", + " 1139064, 1136057, 1136051, 1140670, 1137734, 1137728, 1134750, 1138255,\n", + " 1135549, 1162958, 1144130, 1149001, 1139889, 1145356, 1141980, 1141974,\n", + " 1143767, 1154863, 1143706, 1143224, 1137668, 1137670, 1139025, 1140009,\n", + " 1146834, 1146844, 1146847, 1135860, 1135865, 1136426, 1136627, 1140467,\n", + " 1141224, 1141891, 1139386, 1136917, 1139741, 1143667, 1137196, 1137188,\n", + " 1144237, 1146449, 1141785, 1141786, 1139495, 1136760, 1141609, 1141300,\n", + " 1134987, 1136854, 1144428, 1144420, 1141821, 1138476, 1149111, 1142713,\n", + " 1138708, 1142913, 1137661, 1138423, 1143113, 1148443, 1144596, 1136866,\n", + " 1145298, 1144044, 1141579, 1141398, 1144182, 1144179, 1137614, 1137610,\n", + " 1150906, 1166711, 1139559, 1140501, 1147153, 1136378, 1142650, 1162804,\n", + " 1141365, 1141367, 1141664, 1149090, 1139022, 1144279, 1139508, 1139510,\n", + " 1139769, 1139774, 1140093, 1139127, 1144992, 1144997, 1145000, 1145001,\n", + " 1140619, 1140990, 1147050, 1145885, 1145873, 1152976, 1152988, 1142556,\n", + " 1141925, 1144241, 1144242, 1145328, 1140580, 1137149, 1139405, 1137570,\n", + " 1141390, 1145980, 1145974, 1146005, 1142098, 1146024, 1138085, 1146140,\n", + " 1146141, 1142533, 1149933, 1147086, 1139990, 1146302, 1143293, 1143283,\n", + " 1151124, 1147541, 1147543, 1147150, 1148761, 1147282, 1142816, 1142629,\n", + " 1149366, 1148003, 1149608, 1138927, 1136836, 1146099, 1139298, 1144957,\n", + " 1143345, 1144765, 1145818, 1139969, 1135872, 1135876, 1150294, 1150300,\n", + " 1150301, 1146514, 1146523, 1146526, 1143456, 1143470, 1143457, 1142997,\n", + " 1143937, 1147574, 1140360, 1140364, 1137990, 1143083, 1148965, 1148966,\n", + " 1144222, 1147984, 1147999, 1134909, 1144003, 1139252, 1139258, 1139249,\n", + " 1145467, 1147233, 1148704, 1142697, 1141319, 1141836, 1152328, 1143434,\n", + " 1147071, 1149714, 1147025, 1143826, 1142858, 1141131, 1139547, 1158226,\n", + " 1158228, 1150452, 1143922, 1147880, 1148362, 1154526, 1145240, 1145246,\n", + " 1145751, 1142370, 1146152, 1148391, 1146178, 1138854, 1138858, 1151242,\n", + " 1148215, 1148214, 1148223, 1152530, 1152538, 1150445, 1149258, 1148928,\n", + " 1148826, 1148827, 1156470, 1154438, 1149791, 1144526, 1141347, 1150342,\n", + " 1152013, 1144203, 1165252, 1147794, 1151480, 1152022, 1152024, 1152027,\n", + " 1144884, 1154271, 1145255, 1135516, 1134869, 1150127, 1147019, 1147021,\n", + " 1147023, 1141949, 1150736, 1154976, 1154979, 1143560, 1143565, 1146412,\n", + " 1148288, 1148294, 1148300, 1152070, 1137724, 1135072, 1164883, 1139096,\n", + " 1152561, 1136247, 1139721, 1139718, 1146676, 1152441, 1148724, 1148726,\n", + " 1168973, 1150052, 1143983, 1148204, 1153181, 1171943, 1153124, 1153192,\n", + " 1145104, 1145111, 1150932, 1152878, 1150352, 1150356, 1147446, 1151816,\n", + " 1135303, 1154183, 1148510, 1141420, 1151352, 1151356, 1151345, 1155152,\n", + " 1147737, 1153447, 1146969, 1153255, 1146623, 1151692, 1142986, 1144476,\n", + " 1152405, 1154056, 1152097, 1152100, 1152109, 1156320, 1153032, 1153038,\n", + " 1137746, 1137755, 1146307, 1146304, 1146317, 1152612, 1155148, 1136401,\n", + " 1157115, 1155358, 1157842, 1157824, 1157833, 1154633, 1151573, 1151627,\n", + " 1151617, 1145278, 1136788, 1148916, 1148927, 1152944, 1152169, 1140934,\n", + " 1138991, 1151298, 1143997, 1156826, 1153311, 1138279, 1138281, 1136028,\n", + " 1156609, 1152928, 1151064, 1137545, 1137392, 1153909, 1166850, 1150164,\n", + " 1148040, 1149300, 1137048, 1148628, 1158530, 1158540, 1137458, 1157514,\n", + " 1155378, 1155376, 1142047, 1156501, 1156505, 1152397, 1157064, 1152833,\n", + " 1145191, 1145187, 1139473, 1146851, 1146854, 1152179, 1147810, 1157777,\n", + " 1139525, 1158304, 1158311, 1151271, 1151340, 1161731, 1162120, 1145771,\n", + " 1156919, 1142755, 1160435, 1157637, 1151379, 1137912, 1158639, 1155374,\n", + " 1155375, 1140186, 1155122, 1155124, 1152527, 1149327, 1153486, 1155748,\n", + " 1155755, 1151424, 1146913, 1156463, 1158096, 1168230, 1155626, 1155628,\n", + " 1155630, 1155631, 1158485, 1154555, 1155573, 1136469, 1158566, 1158824,\n", + " 1158325, 1148836, 1155646, 1153373, 1154648, 1154250, 1154240, 1156711,\n", + " 1160098, 1137359, 1154909, 1143189, 1150371, 1150068, 1155613, 1145727,\n", + " 1155281, 1155293, 1151030, 1137152, 1158578, 1158996, 1153781, 1158347,\n", + " 1145688, 1145681, 1137316, 1140913, 1134677, 1134685, 1135601, 1135605,\n", + " 1145515, 1145507, 1150661, 1155848, 1155843, 1158664, 1158665, 1157684,\n", + " 1146326, 1149145, 1161116, 1156081, 1152220, 1155436, 1156698, 1156693,\n", + " 1155884, 1157732, 1157038, 1142466, 1155975, 1154682, 1142064, 1135199,\n", + " 1158846, 1149696, 1149700, 1154600, 1161309, 1136899, 1136896, 1158753,\n", + " 1140210, 1140218, 1140221, 1158804, 1156778, 1152451, 1152462, 1161625,\n", + " 1152130, 1153808, 1136640, 1151144, 1158006, 1163173, 1144581, 1150011,\n", + " 1155521, 1155528, 1142483, 1163471, 1135662, 1164276, 1142666, 1161647,\n", + " 1159042, 1159071, 1188649, 1159150, 1151081, 1142427, 1157945, 1157946,\n", + " 1160563, 1153052, 1171551, 1155769, 1144149, 1159360, 1153842, 1156107,\n", + " 1138393, 1150035, 1150046, 1150041, 1149063, 1149070, 1151014, 1154294,\n", + " 1153519, 1147300, 1142405, 1146876, 1164012, 1156787, 1149966, 1149963,\n", + " 1139785, 1164910, 1154590, 1160764, 1165762, 1136802, 1148771, 1146063,\n", + " 1159931, 1140130, 1140641, 1148601, 1148607, 1143139, 1143146, 1155813,\n", + " 1156355, 1158643, 1158653, 1156177, 1156191, 1156181, 1159025, 1159032,\n", + " 1163742, 1168110, 1152247, 1178151, 1165585, 1143729, 1155588, 1156582,\n", + " 1156589, 1168428, 1148567, 1144977, 1144979, 1167931, 1147401, 1164580,\n", + " 1152776, 1155044, 1155054, 1162589, 1155272, 1155274, 1141471, 1141463,\n", + " 1141459, 1151650, 1147426, 1147427, 1147433, 1157050, 1149893, 1156737,\n", + " 1156739, 1153663, 1166591, 1150646, 1144810, 1144812, 1167263, 1140112,\n", + " 1162087, 1164741, 1142733, 1156293, 1145176, 1145228, 1169282, 1154700,\n", + " 1172193, 1155324, 1147673, 1147675, 1170789, 1146432, 1146444, 1148168,\n", + " 1148175, 1143037, 1143025, 1147693, 1147694, 1145900, 1145902, 1153534,\n", + " 1168659, 1151755, 1143395, 1143405, 1149555, 1158724, 1158722, 1158728,\n", + " 1154070, 1154076, 1168764, 1170738, 1147339, 1147338, 1145502, 1162893,\n", + " 1149124, 1144681, 1149483, 1155172, 1150515, 1150522, 1150525, 1150518,\n", + " 1156113, 1156119, 1145531, 1144336, 1157534, 1154670, 1154893, 1169162,\n", + " 1157331, 1138129, 1147502, 1158611, 1158623, 1158052, 1153288, 1157380,\n", + " 1171479, 1147416, 1147423, 1155494, 1155502, 1170462, 1152353, 1152362,\n", + " 1170907, 1143172, 1143177, 1152546, 1172778, 1169929, 1161130, 1167010,\n", + " 1165352, 1169144, 1152150, 1153754, 1159655, 1167857, 1157153, 1157373,\n", + " 1157368, 1147697, 1147711, 1147929, 1149239, 1167720, 1173126, 1162106,\n", + " 1168697, 1160987, 1173727, 1146755, 1146765, 1187436, 1167898, 1174845,\n", + " 1178056, 1171073, 1166682, 1170874, 1150234, 1154148, 1171921, 1181871,\n", + " 1186117, 1167662, 1156544, 1158025, 1166554, 1155262, 1177889, 1154718,\n", + " 1157792, 1157795, 1151488, 1181377, 1155799, 1155804, 1187524, 1158249,\n", + " 1153898, 1153893, 1154497, 1164563, 1164203, 1145626, 1163538, 1161515,\n", + " 1180813, 1161911, 1182260, 1182265, 1149744, 1149753, 1149755, 1153609,\n", + " 1155990, 1160121, 1187947, 1177826, 1158512, 1158513, 1187796, 1158934,\n", + " 1158374, 1155890, 1155892, 1155899, 1162690, 1140397, 1170592, 1168621,\n", + " 1171027, 1168876, 1164228, 1182337, 1146169, 1170804, 1156852, 1147182,\n", + " 1156162, 1171443, 1183016, 1156532, 1139828, 1139831, 1150265, 1185819,\n", + " 1156055, 1151972, 1151977, 1149549, 1182371, 1156833, 1140993, 1140995,\n", + " 1182057, 1187629, 1192608, 1171457, 1185892, 1186429, 1158064, 1158067,\n", + " 1166784, 1160968, 1155959, 1179769, 1169837, 1181032, 1182849, 1157022,\n", + " 1161950], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197719, 1195860, 1195863, 1199282, 1198458, 1202255, 1201577, 1201581,\n", + " 1202295, 1199145, 1201462, 1201465, 1202119, 1197777, 1201016, 1198633,\n", + " 1196956, 1202803, 1198557, 1194866, 1194780, 1194655, 1194642, 1201992,\n", + " 1196031, 1194952, 1194882, 1195888, 1199172, 1197856, 1196977, 1199109,\n", + " 1199823, 1195216, 1195265, 1197141, 1196242, 1196109, 1194859, 1195541,\n", + " 1202915, 1197474, 1196122, 1196272, 1199865, 1199856, 1199628, 1197676,\n", + " 1198410, 1199229, 1199231, 1201916, 1194795, 1200060, 1199942, 1199949,\n", + " 1196508, 1197601, 1196727, 1198428, 1200155, 1198811, 1201534, 1200507,\n", + " 1199445, 1199454, 1201156, 1201056, 1194803, 1199723, 1195689, 1200553,\n", + " 1199203, 1197097, 1197100, 1201627, 1197040, 1201442, 1200899, 1195876,\n", + " 1201291, 1195601, 1203329, 1200398, 1196960, 1200784, 1202685, 1195048,\n", + " 1194698, 1195676, 1195679, 1195415, 1197821, 1199778, 1198966, 1199659,\n", + " 1201138, 1194730, 1198147, 1197735, 1200013, 1200011, 1198819, 1201001,\n", + " 1200465, 1195070, 1197652, 1200211, 1201808, 1203162], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197719, 1195860, 1195863, 1199282, 1198458, 1202255, 1201577, 1201581,\n", + " 1202295, 1199145, 1201462, 1201465, 1202119, 1197777, 1201016, 1198633,\n", + " 1196956, 1202803, 1198557, 1194866, 1194780, 1194655, 1194642, 1201992,\n", + " 1196031, 1194952, 1194882, 1195888, 1199172, 1197856, 1196977, 1199109,\n", + " 1199823, 1195216, 1195265, 1197141, 1196242, 1196109, 1194859, 1195541,\n", + " 1202915, 1197474, 1196122, 1196272, 1199865, 1199856, 1199628, 1197676,\n", + " 1198410, 1199229, 1199231, 1201916, 1194795, 1200060, 1199942, 1199949,\n", + " 1196508, 1197601, 1196727, 1198428, 1200155, 1198811, 1201534, 1200507,\n", + " 1199445, 1199454, 1201156, 1201056, 1194803, 1199723, 1195689, 1200553,\n", + " 1199203, 1197097, 1197100, 1201627, 1197040, 1201442, 1200899, 1195876,\n", + " 1201291, 1195601, 1203329, 1200398, 1196960, 1200784, 1202685, 1195048,\n", + " 1194698, 1195676, 1195679, 1195415, 1197821, 1199778, 1198966, 1199659,\n", + " 1201138, 1194730, 1198147, 1197735, 1200013, 1200011, 1198819, 1201001,\n", + " 1200465, 1195070, 1197652, 1200211, 1201808, 1203162], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 2.3456e-01, -7.0880e-04, 7.5920e-01, ..., 4.2586e-02,\n", + " -1.4897e-03, -5.6438e-03],\n", + " [ 2.0987e-01, -3.4428e-04, 6.5833e-01, ..., 4.1798e-02,\n", + " -1.6051e-03, -5.1268e-03],\n", + " [ 1.1368e-01, -4.4755e-04, 4.7887e-01, ..., 1.1509e-01,\n", + " -2.0896e-03, -3.6215e-03],\n", + " ...,\n", + " [ 1.3811e-01, -3.5751e-04, 4.7740e-01, ..., 6.4579e-02,\n", + " -1.6973e-03, -3.5778e-03],\n", + " [ 1.5334e-01, -2.7173e-04, 4.8594e-01, ..., 4.3441e-02,\n", + " -1.5016e-03, -3.5673e-03],\n", + " [ 1.5524e-01, -3.4377e-04, 5.5425e-01, ..., 5.3260e-02,\n", + " -1.5770e-03, -4.0210e-03]], device='cuda:0'), 'paper': tensor([[-7.7769e-03, 1.3813e+00, 8.5689e-01, ..., -9.4147e-03,\n", + " -1.8169e-02, -1.2630e-02],\n", + " [-5.8080e-03, 2.6722e+00, 2.6305e+00, ..., 3.4090e+00,\n", + " -5.0310e-02, 2.1729e+00],\n", + " [-3.9244e-03, 5.7701e-01, 7.4909e-01, ..., -9.6429e-03,\n", + " -1.8958e-02, -5.7079e-03],\n", + " ...,\n", + " [-2.5885e-03, 1.9632e+00, 1.7406e+00, ..., 1.2223e-01,\n", + " -2.4868e-02, 5.6583e-01],\n", + " [-7.1521e-03, 1.3939e+00, 7.2101e-01, ..., 9.9544e-01,\n", + " -2.3538e-02, -1.9083e-03],\n", + " [-5.5890e-03, 3.8017e+00, 2.6161e+00, ..., 5.2188e+00,\n", + " -5.4662e-02, 3.2497e+00]], device='cuda:0'), 'author': tensor([[-4.6994e-04, 2.7382e-02, 1.1459e-01, ..., 1.5975e-01,\n", + " 5.6292e-04, -6.6914e-04],\n", + " [-1.6722e-03, 2.3361e-01, 8.5189e-02, ..., 1.2857e+00,\n", + " 2.6736e-01, -1.4974e-03],\n", + " [-5.6955e-04, 2.3848e-01, 9.9395e-02, ..., 1.2718e+00,\n", + " 4.3209e-01, 9.4246e-03],\n", + " ...,\n", + " [-8.0587e-04, 1.9147e-01, 1.4411e-01, ..., 1.3146e+00,\n", + " 5.1111e-01, -6.1041e-06],\n", + " [-1.1556e-03, 1.5946e-01, 1.9466e-01, ..., 1.3223e+00,\n", + " 3.5228e-01, -4.4390e-04],\n", + " [-1.3994e-03, 2.1460e-01, 1.4102e-01, ..., 1.2523e+00,\n", + " 2.8063e-01, -1.1626e-03]], device='cuda:0'), 'field_of_study': tensor([[-0.0011, 0.5697, 0.1934, ..., -0.0101, 0.4867, 0.2475],\n", + " [-0.0028, 0.5034, 0.1103, ..., -0.0076, 0.3656, 0.4469],\n", + " [-0.0038, 0.7202, 0.2688, ..., -0.0071, 0.2949, 0.6107],\n", + " ...,\n", + " [-0.0024, 0.5424, 0.1366, ..., -0.0071, 0.3273, 0.4546],\n", + " [-0.0018, 0.4520, 0.1410, ..., -0.0081, 0.2972, 0.3326],\n", + " [-0.0022, 0.4962, 0.1030, ..., -0.0063, 0.2226, 0.2886]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 83, 41, 41, 98, 134, 221, 221, 332, 529, 310, 331, 293,\n", + " 532, 550, 720, 646, 721, 830, 676, 429, 614, 614, 705, 931,\n", + " 1250, 1009, 1014, 954, 954, 1173, 1173, 1131, 1168, 1628, 1239, 1260,\n", + " 1204, 1321, 1399, 1296, 1420, 1378, 1510, 1443, 1606, 1616, 1649, 1598,\n", + " 1593, 1786, 1810, 1810, 1642, 1780, 1780, 1870, 1955, 1955, 1677, 1991,\n", + " 1962, 1984, 2096, 2272, 2354, 2228, 2426, 2586, 2492, 2612, 2800, 2714,\n", + " 2503, 2819, 2621, 2742, 2744, 2986, 2906, 3189, 2915, 3012, 3205, 3205,\n", + " 3475, 3256, 3435, 3299, 3822, 3647, 3721, 3721, 3838, 3816, 3816, 3816,\n", + " 3819, 3921, 3962, 3992, 4010, 4010, 4022, 4022, 4137, 4472, 4528, 4317,\n", + " 4317, 4424, 4370, 4492, 4680, 4657, 4657, 4715, 4719, 4941, 4837, 4862,\n", + " 4902, 4891, 4855, 5031, 4966, 5027, 4948, 5176, 5176, 5626, 5626, 5345,\n", + " 5548, 5548, 5338, 5361, 5687, 5902, 5538, 5538, 5606, 5927, 5620, 5620,\n", + " 5710, 5816, 5816, 5816, 6029, 6067, 6072, 5918, 5811, 5811, 5974],\n", + " [ 83, 23, 75, 3, 70, 93, 88, 7, 95, 45, 105, 58,\n", + " 85, 25, 77, 84, 25, 107, 25, 71, 80, 17, 87, 46,\n", + " 70, 90, 25, 10, 5, 78, 15, 99, 74, 62, 23, 11,\n", + " 9, 69, 55, 109, 22, 69, 43, 16, 19, 69, 30, 73,\n", + " 62, 69, 40, 27, 53, 2, 93, 23, 93, 2, 72, 57,\n", + " 67, 27, 78, 52, 86, 100, 66, 51, 25, 46, 62, 76,\n", + " 36, 89, 54, 58, 76, 108, 60, 3, 59, 20, 23, 33,\n", + " 23, 98, 76, 12, 14, 47, 61, 99, 63, 49, 104, 103,\n", + " 106, 76, 94, 41, 101, 42, 29, 51, 1, 81, 8, 35,\n", + " 44, 6, 65, 21, 66, 0, 18, 64, 79, 39, 106, 66,\n", + " 33, 102, 13, 91, 96, 48, 56, 58, 68, 57, 82, 50,\n", + " 58, 38, 58, 78, 23, 31, 34, 4, 37, 26, 58, 90,\n", + " 34, 58, 24, 32, 58, 94, 90, 28, 97, 92, 106]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2444, 2368, 574, ..., 3464, 3997, 1003],\n", + " [ 186, 11, 75, ..., 6641, 6697, 6639]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 104, 8, 4, ..., 25, 3, 59],\n", + " [ 123, 17, 53, ..., 5916, 6008, 5955]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 160, 160, 160, ..., 6627, 6627, 6627],\n", + " [ 264, 394, 843, ..., 338, 604, 169]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 456, 543, 24, ..., 2, 774, 338],\n", + " [ 231, 110, 74, ..., 6706, 6654, 6710]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4362, 5433, 5988, ..., 6096, 6137, 6142],\n", + " [ 28, 73, 130, ..., 6018, 5997, 5966]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 160, 160, 160, ..., 6723, 6711, 6664],\n", + " [2266, 3091, 678, ..., 1104, 26, 410]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 49, 49, 49, ..., 5966, 5966, 5966],\n", + " [3774, 5923, 5867, ..., 6378, 6155, 6424]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005662\n", + "sampling 0.005508\n", + "noi time: 0.002226\n", + "get_vertex_data call: 0.031029\n", + "noi group time: 0.001843\n", + "eoi_group_time: 0.015849\n", + "second half: 0.226556\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27905, 31145, 24187, ..., 1130624, 1120067, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27905, 31145, 24187, ..., 1130624, 1120067, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210831, 1209332, 1209801, ..., 1933649, 1938464, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210831, 1209332, 1209801, ..., 1933649, 1938464, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1141424, 1140282, 1140285, 1136347, 1135926, 1135160, 1137791,\n", + " 1141758, 1138335, 1141250, 1136969, 1136971, 1138903, 1143609, 1139811,\n", + " 1145373, 1145989, 1143372, 1139243, 1146644, 1148987, 1136950, 1149216,\n", + " 1147943, 1149646, 1147473, 1147483, 1135998, 1142885, 1142894, 1142881,\n", + " 1153946, 1146995, 1134697, 1134701, 1148346, 1147089, 1147096, 1136682,\n", + " 1134662, 1138112, 1137254, 1138356, 1140146, 1134720, 1140953, 1135367,\n", + " 1135202, 1141036, 1136778, 1136302, 1134794, 1137329, 1137693, 1144791,\n", + " 1135412, 1157400, 1157393, 1157397, 1137441, 1156159, 1141702, 1141086,\n", + " 1155076, 1135664, 1138514, 1153094, 1137953, 1156899, 1156909, 1138305,\n", + " 1138440, 1138445, 1138457, 1138461, 1154790, 1137924, 1135122, 1156606,\n", + " 1142611, 1142612, 1142616, 1138177, 1138180, 1158984, 1148531, 1148533,\n", + " 1135773, 1139667, 1139673, 1134992, 1134782, 1142438, 1148805, 1158971,\n", + " 1158974, 1142906, 1153543, 1140034, 1139085, 1138148, 1141963, 1155656,\n", + " 1141992, 1141985, 1152042, 1152044, 1137728, 1146222, 1134750, 1138240,\n", + " 1135549, 1136697, 1141088, 1141098, 1149001, 1141980, 1136384, 1143775,\n", + " 1154855, 1137297, 1137670, 1139033, 1136625, 1139386, 1136917, 1139731,\n", + " 1143667, 1143676, 1141786, 1136760, 1134979, 1147850, 1138482, 1138488,\n", + " 1142049, 1142053, 1141821, 1140160, 1140173, 1140163, 1158749, 1137062,\n", + " 1138710, 1138708, 1142917, 1142913, 1144596, 1136864, 1145298, 1141398,\n", + " 1141405, 1140436, 1144182, 1150906, 1139559, 1147153, 1136378, 1142646,\n", + " 1149193, 1141367, 1149088, 1149090, 1149101, 1138292, 1139508, 1139510,\n", + " 1139127, 1144993, 1140976, 1140979, 1140990, 1147050, 1143551, 1152980,\n", + " 1152982, 1152988, 1142548, 1141925, 1144242, 1140580, 1150692, 1150695,\n", + " 1136885, 1143637, 1134848, 1141378, 1145977, 1143851, 1146024, 1154328,\n", + " 1141585, 1149928, 1139990, 1143290, 1147543, 1147540, 1148763, 1147282,\n", + " 1142829, 1142816, 1142628, 1149366, 1149608, 1143051, 1142586, 1144923,\n", + " 1138923, 1157717, 1157726, 1136836, 1136843, 1146104, 1165626, 1139328,\n", + " 1141496, 1141489, 1139055, 1142149, 1143345, 1144619, 1135818, 1135822,\n", + " 1146514, 1146523, 1138025, 1143457, 1142995, 1147574, 1143798, 1140364,\n", + " 1168921, 1147995, 1147999, 1139252, 1147243, 1148704, 1148715, 1148719,\n", + " 1142700, 1149714, 1147025, 1147249, 1145011, 1145012, 1158226, 1167006,\n", + " 1141137, 1145240, 1145751, 1146159, 1138632, 1146178, 1150280, 1148826,\n", + " 1151856, 1149791, 1144514, 1144526, 1145826, 1146887, 1144203, 1152023,\n", + " 1134869, 1134878, 1150127, 1150843, 1154976, 1148461, 1147653, 1143559,\n", + " 1143552, 1149412, 1146414, 1146406, 1151727, 1135085, 1135087, 1139088,\n", + " 1154420, 1151370, 1136249, 1146686, 1152435, 1151553, 1148724, 1148729,\n", + " 1143971, 1148204, 1153188, 1145109, 1167965, 1150935, 1150941, 1144849,\n", + " 1155088, 1148505, 1146573, 1141420, 1141419, 1151351, 1174861, 1155164,\n", + " 1147602, 1147737, 1148957, 1146975, 1149356, 1150219, 1146623, 1151691,\n", + " 1151687, 1151402, 1146280, 1156334, 1150085, 1137746, 1146307, 1152622,\n", + " 1140521, 1155337, 1154123, 1152673, 1151617, 1151622, 1145278, 1136140,\n", + " 1151441, 1152341, 1157141, 1136028, 1136029, 1158704, 1140684, 1151064,\n", + " 1156387, 1152888, 1154733, 1142777, 1156422, 1150150, 1148040, 1137048,\n", + " 1158477, 1168183, 1148628, 1158530, 1137458, 1149947, 1142041, 1142047,\n", + " 1157547, 1142385, 1158854, 1152386, 1152833, 1145191, 1143496, 1135221,\n", + " 1142221, 1135730, 1138822, 1156638, 1158306, 1158308, 1158311, 1155441,\n", + " 1150130, 1150132, 1154529, 1142755, 1142766, 1156207, 1138775, 1151379,\n", + " 1158628, 1152527, 1157170, 1149321, 1151431, 1156463, 1155626, 1155628,\n", + " 1156563, 1158566, 1158824, 1143254, 1146942, 1154240, 1151899, 1162190,\n", + " 1137359, 1163127, 1143531, 1150371, 1157439, 1155606, 1155613, 1150987,\n", + " 1157934, 1140736, 1140741, 1137152, 1158120, 1153776, 1153786, 1138258,\n", + " 1145682, 1135601, 1135605, 1135614, 1145513, 1150661, 1150671, 1158665,\n", + " 1144463, 1155433, 1155434, 1140381, 1156017, 1157735, 1159132, 1155971,\n", + " 1155975, 1156958, 1153762, 1153765, 1158837, 1149700, 1160163, 1153498,\n", + " 1136899, 1136896, 1158886, 1140218, 1157304, 1158285, 1136480, 1136494,\n", + " 1147586, 1152136, 1152139, 1136640, 1136646, 1140049, 1158558, 1153827,\n", + " 1151140, 1156516, 1146126, 1161539, 1169888, 1150685, 1156045, 1159052,\n", + " 1158300, 1153047, 1153052, 1153045, 1144156, 1176079, 1138393, 1150046,\n", + " 1164547, 1155479, 1153514, 1147307, 1147300, 1146870, 1164006, 1163396,\n", + " 1139286, 1136802, 1166032, 1160999, 1146063, 1165306, 1140643, 1148603,\n", + " 1155816, 1163746, 1156361, 1141800, 1141802, 1158653, 1156181, 1159025,\n", + " 1159026, 1159032, 1152247, 1155588, 1162550, 1162547, 1162546, 1151225,\n", + " 1158405, 1147830, 1146500, 1170998, 1161240, 1144736, 1144737, 1155054,\n", + " 1145137, 1155268, 1165415, 1141471, 1151650, 1147427, 1157050, 1157051,\n", + " 1156737, 1156739, 1153663, 1168748, 1144812, 1135567, 1164750, 1142722,\n", + " 1165943, 1155320, 1150533, 1150542, 1144973, 1146446, 1175469, 1143037,\n", + " 1170618, 1152624, 1145900, 1153520, 1152203, 1143404, 1169742, 1149555,\n", + " 1162877, 1154076, 1191349, 1144699, 1151598, 1149125, 1154919, 1154927,\n", + " 1144681, 1166653, 1169298, 1150515, 1150518, 1150526, 1156119, 1144336,\n", + " 1157534, 1135841, 1154893, 1157331, 1147502, 1158146, 1149681, 1158619,\n", + " 1158623, 1149847, 1157380, 1157384, 1159848, 1165116, 1155489, 1152353,\n", + " 1152546, 1168451, 1149402, 1169050, 1173307, 1152150, 1153754, 1159658,\n", + " 1157158, 1157153, 1147711, 1151850, 1157593, 1170488, 1155731, 1168828,\n", + " 1160990, 1140326, 1166351, 1166529, 1154148, 1149173, 1143279, 1169772,\n", + " 1179243, 1170178, 1153803, 1153141, 1180817, 1153624, 1184093, 1182651,\n", + " 1179807, 1166554, 1161255, 1180152, 1171623, 1164034, 1164560, 1164200,\n", + " 1145626, 1145618, 1157483, 1157487, 1149755, 1174409, 1170069, 1158512,\n", + " 1158517, 1155899, 1162988, 1186303, 1140399, 1168886, 1164231, 1164232,\n", + " 1165149, 1182337, 1176986, 1161819, 1170341, 1180028, 1164133, 1139831,\n", + " 1150265, 1154812, 1192076, 1151288, 1156055, 1151972, 1151978, 1159083,\n", + " 1148798, 1177473, 1193608, 1151774, 1152115, 1152124, 1169703, 1169707,\n", + " 1171966, 1178135, 1155959, 1155962, 1178448, 1182186, 1157008, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1141424, 1140282, 1140285, 1136347, 1135926, 1135160, 1137791,\n", + " 1141758, 1138335, 1141250, 1136969, 1136971, 1138903, 1143609, 1139811,\n", + " 1145373, 1145989, 1143372, 1139243, 1146644, 1148987, 1136950, 1149216,\n", + " 1147943, 1149646, 1147473, 1147483, 1135998, 1142885, 1142894, 1142881,\n", + " 1153946, 1146995, 1134697, 1134701, 1148346, 1147089, 1147096, 1136682,\n", + " 1134662, 1138112, 1137254, 1138356, 1140146, 1134720, 1140953, 1135367,\n", + " 1135202, 1141036, 1136778, 1136302, 1134794, 1137329, 1137693, 1144791,\n", + " 1135412, 1157400, 1157393, 1157397, 1137441, 1156159, 1141702, 1141086,\n", + " 1155076, 1135664, 1138514, 1153094, 1137953, 1156899, 1156909, 1138305,\n", + " 1138440, 1138445, 1138457, 1138461, 1154790, 1137924, 1135122, 1156606,\n", + " 1142611, 1142612, 1142616, 1138177, 1138180, 1158984, 1148531, 1148533,\n", + " 1135773, 1139667, 1139673, 1134992, 1134782, 1142438, 1148805, 1158971,\n", + " 1158974, 1142906, 1153543, 1140034, 1139085, 1138148, 1141963, 1155656,\n", + " 1141992, 1141985, 1152042, 1152044, 1137728, 1146222, 1134750, 1138240,\n", + " 1135549, 1136697, 1141088, 1141098, 1149001, 1141980, 1136384, 1143775,\n", + " 1154855, 1137297, 1137670, 1139033, 1136625, 1139386, 1136917, 1139731,\n", + " 1143667, 1143676, 1141786, 1136760, 1134979, 1147850, 1138482, 1138488,\n", + " 1142049, 1142053, 1141821, 1140160, 1140173, 1140163, 1158749, 1137062,\n", + " 1138710, 1138708, 1142917, 1142913, 1144596, 1136864, 1145298, 1141398,\n", + " 1141405, 1140436, 1144182, 1150906, 1139559, 1147153, 1136378, 1142646,\n", + " 1149193, 1141367, 1149088, 1149090, 1149101, 1138292, 1139508, 1139510,\n", + " 1139127, 1144993, 1140976, 1140979, 1140990, 1147050, 1143551, 1152980,\n", + " 1152982, 1152988, 1142548, 1141925, 1144242, 1140580, 1150692, 1150695,\n", + " 1136885, 1143637, 1134848, 1141378, 1145977, 1143851, 1146024, 1154328,\n", + " 1141585, 1149928, 1139990, 1143290, 1147543, 1147540, 1148763, 1147282,\n", + " 1142829, 1142816, 1142628, 1149366, 1149608, 1143051, 1142586, 1144923,\n", + " 1138923, 1157717, 1157726, 1136836, 1136843, 1146104, 1165626, 1139328,\n", + " 1141496, 1141489, 1139055, 1142149, 1143345, 1144619, 1135818, 1135822,\n", + " 1146514, 1146523, 1138025, 1143457, 1142995, 1147574, 1143798, 1140364,\n", + " 1168921, 1147995, 1147999, 1139252, 1147243, 1148704, 1148715, 1148719,\n", + " 1142700, 1149714, 1147025, 1147249, 1145011, 1145012, 1158226, 1167006,\n", + " 1141137, 1145240, 1145751, 1146159, 1138632, 1146178, 1150280, 1148826,\n", + " 1151856, 1149791, 1144514, 1144526, 1145826, 1146887, 1144203, 1152023,\n", + " 1134869, 1134878, 1150127, 1150843, 1154976, 1148461, 1147653, 1143559,\n", + " 1143552, 1149412, 1146414, 1146406, 1151727, 1135085, 1135087, 1139088,\n", + " 1154420, 1151370, 1136249, 1146686, 1152435, 1151553, 1148724, 1148729,\n", + " 1143971, 1148204, 1153188, 1145109, 1167965, 1150935, 1150941, 1144849,\n", + " 1155088, 1148505, 1146573, 1141420, 1141419, 1151351, 1174861, 1155164,\n", + " 1147602, 1147737, 1148957, 1146975, 1149356, 1150219, 1146623, 1151691,\n", + " 1151687, 1151402, 1146280, 1156334, 1150085, 1137746, 1146307, 1152622,\n", + " 1140521, 1155337, 1154123, 1152673, 1151617, 1151622, 1145278, 1136140,\n", + " 1151441, 1152341, 1157141, 1136028, 1136029, 1158704, 1140684, 1151064,\n", + " 1156387, 1152888, 1154733, 1142777, 1156422, 1150150, 1148040, 1137048,\n", + " 1158477, 1168183, 1148628, 1158530, 1137458, 1149947, 1142041, 1142047,\n", + " 1157547, 1142385, 1158854, 1152386, 1152833, 1145191, 1143496, 1135221,\n", + " 1142221, 1135730, 1138822, 1156638, 1158306, 1158308, 1158311, 1155441,\n", + " 1150130, 1150132, 1154529, 1142755, 1142766, 1156207, 1138775, 1151379,\n", + " 1158628, 1152527, 1157170, 1149321, 1151431, 1156463, 1155626, 1155628,\n", + " 1156563, 1158566, 1158824, 1143254, 1146942, 1154240, 1151899, 1162190,\n", + " 1137359, 1163127, 1143531, 1150371, 1157439, 1155606, 1155613, 1150987,\n", + " 1157934, 1140736, 1140741, 1137152, 1158120, 1153776, 1153786, 1138258,\n", + " 1145682, 1135601, 1135605, 1135614, 1145513, 1150661, 1150671, 1158665,\n", + " 1144463, 1155433, 1155434, 1140381, 1156017, 1157735, 1159132, 1155971,\n", + " 1155975, 1156958, 1153762, 1153765, 1158837, 1149700, 1160163, 1153498,\n", + " 1136899, 1136896, 1158886, 1140218, 1157304, 1158285, 1136480, 1136494,\n", + " 1147586, 1152136, 1152139, 1136640, 1136646, 1140049, 1158558, 1153827,\n", + " 1151140, 1156516, 1146126, 1161539, 1169888, 1150685, 1156045, 1159052,\n", + " 1158300, 1153047, 1153052, 1153045, 1144156, 1176079, 1138393, 1150046,\n", + " 1164547, 1155479, 1153514, 1147307, 1147300, 1146870, 1164006, 1163396,\n", + " 1139286, 1136802, 1166032, 1160999, 1146063, 1165306, 1140643, 1148603,\n", + " 1155816, 1163746, 1156361, 1141800, 1141802, 1158653, 1156181, 1159025,\n", + " 1159026, 1159032, 1152247, 1155588, 1162550, 1162547, 1162546, 1151225,\n", + " 1158405, 1147830, 1146500, 1170998, 1161240, 1144736, 1144737, 1155054,\n", + " 1145137, 1155268, 1165415, 1141471, 1151650, 1147427, 1157050, 1157051,\n", + " 1156737, 1156739, 1153663, 1168748, 1144812, 1135567, 1164750, 1142722,\n", + " 1165943, 1155320, 1150533, 1150542, 1144973, 1146446, 1175469, 1143037,\n", + " 1170618, 1152624, 1145900, 1153520, 1152203, 1143404, 1169742, 1149555,\n", + " 1162877, 1154076, 1191349, 1144699, 1151598, 1149125, 1154919, 1154927,\n", + " 1144681, 1166653, 1169298, 1150515, 1150518, 1150526, 1156119, 1144336,\n", + " 1157534, 1135841, 1154893, 1157331, 1147502, 1158146, 1149681, 1158619,\n", + " 1158623, 1149847, 1157380, 1157384, 1159848, 1165116, 1155489, 1152353,\n", + " 1152546, 1168451, 1149402, 1169050, 1173307, 1152150, 1153754, 1159658,\n", + " 1157158, 1157153, 1147711, 1151850, 1157593, 1170488, 1155731, 1168828,\n", + " 1160990, 1140326, 1166351, 1166529, 1154148, 1149173, 1143279, 1169772,\n", + " 1179243, 1170178, 1153803, 1153141, 1180817, 1153624, 1184093, 1182651,\n", + " 1179807, 1166554, 1161255, 1180152, 1171623, 1164034, 1164560, 1164200,\n", + " 1145626, 1145618, 1157483, 1157487, 1149755, 1174409, 1170069, 1158512,\n", + " 1158517, 1155899, 1162988, 1186303, 1140399, 1168886, 1164231, 1164232,\n", + " 1165149, 1182337, 1176986, 1161819, 1170341, 1180028, 1164133, 1139831,\n", + " 1150265, 1154812, 1192076, 1151288, 1156055, 1151972, 1151978, 1159083,\n", + " 1148798, 1177473, 1193608, 1151774, 1152115, 1152124, 1169703, 1169707,\n", + " 1171966, 1178135, 1155959, 1155962, 1178448, 1182186, 1157008, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199428, 1199439, 1197744, 1197226, 1199282, 1199293, 1202255, 1201581,\n", + " 1201582, 1199278, 1202119, 1201237, 1199248, 1201015, 1201660, 1196871,\n", + " 1198557, 1194864, 1194879, 1194743, 1194770, 1194649, 1195093, 1195263,\n", + " 1201927, 1201992, 1196028, 1196030, 1196031, 1199172, 1195740, 1196695,\n", + " 1198980, 1198991, 1195325, 1196836, 1196844, 1198668, 1198958, 1196711,\n", + " 1195221, 1195265, 1195270, 1200761, 1196242, 1197273, 1196109, 1195847,\n", + " 1195850, 1195026, 1196305, 1197248, 1196393, 1196281, 1198273, 1198280,\n", + " 1199060, 1194928, 1195119, 1199803, 1202377, 1199231, 1199676, 1194795,\n", + " 1197601, 1197957, 1196727, 1195771, 1200887, 1198428, 1198811, 1200612,\n", + " 1200452, 1200563, 1197018, 1201155, 1201156, 1202630, 1201056, 1200927,\n", + " 1199712, 1201049, 1200546, 1200832, 1203066, 1200428, 1202541, 1201757,\n", + " 1196889, 1196779, 1201442, 1197945, 1196264, 1201029, 1199976, 1195876,\n", + " 1200181, 1201291, 1196761, 1203329, 1202209, 1199929, 1200398, 1202304,\n", + " 1196966, 1196975, 1200785, 1199606, 1194698, 1195679, 1198052, 1200445,\n", + " 1198911, 1197816, 1203102, 1201138, 1194730, 1203316, 1200437, 1199787,\n", + " 1200970, 1195367, 1200301, 1197652, 1195082, 1201361, 1203162, 1196428,\n", + " 1197872], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199428, 1199439, 1197744, 1197226, 1199282, 1199293, 1202255, 1201581,\n", + " 1201582, 1199278, 1202119, 1201237, 1199248, 1201015, 1201660, 1196871,\n", + " 1198557, 1194864, 1194879, 1194743, 1194770, 1194649, 1195093, 1195263,\n", + " 1201927, 1201992, 1196028, 1196030, 1196031, 1199172, 1195740, 1196695,\n", + " 1198980, 1198991, 1195325, 1196836, 1196844, 1198668, 1198958, 1196711,\n", + " 1195221, 1195265, 1195270, 1200761, 1196242, 1197273, 1196109, 1195847,\n", + " 1195850, 1195026, 1196305, 1197248, 1196393, 1196281, 1198273, 1198280,\n", + " 1199060, 1194928, 1195119, 1199803, 1202377, 1199231, 1199676, 1194795,\n", + " 1197601, 1197957, 1196727, 1195771, 1200887, 1198428, 1198811, 1200612,\n", + " 1200452, 1200563, 1197018, 1201155, 1201156, 1202630, 1201056, 1200927,\n", + " 1199712, 1201049, 1200546, 1200832, 1203066, 1200428, 1202541, 1201757,\n", + " 1196889, 1196779, 1201442, 1197945, 1196264, 1201029, 1199976, 1195876,\n", + " 1200181, 1201291, 1196761, 1203329, 1202209, 1199929, 1200398, 1202304,\n", + " 1196966, 1196975, 1200785, 1199606, 1194698, 1195679, 1198052, 1200445,\n", + " 1198911, 1197816, 1203102, 1201138, 1194730, 1203316, 1200437, 1199787,\n", + " 1200970, 1195367, 1200301, 1197652, 1195082, 1201361, 1203162, 1196428,\n", + " 1197872], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 2.9275e-01, -7.4775e-04, 8.8574e-01, ..., 5.2880e-02,\n", + " -1.6371e-03, -6.4857e-03],\n", + " [ 1.3894e-01, -7.1388e-04, 7.6452e-01, ..., 8.3243e-02,\n", + " -1.4252e-03, -4.6664e-03],\n", + " [ 3.1370e-01, -1.0226e-03, 9.8168e-01, ..., 3.6735e-02,\n", + " -1.3700e-03, -7.0373e-03],\n", + " ...,\n", + " [ 1.9719e-01, -8.0771e-04, 7.0695e-01, ..., 8.4149e-02,\n", + " -1.9011e-03, -5.1858e-03],\n", + " [ 1.3684e-01, -5.5571e-04, 5.2920e-01, ..., 7.4353e-02,\n", + " -1.7561e-03, -3.8988e-03],\n", + " [ 3.6735e-01, -1.0110e-03, 1.1128e+00, ..., 3.7833e-02,\n", + " -1.5673e-03, -7.9588e-03]], device='cuda:0'), 'paper': tensor([[-1.4388e-02, 8.1346e-01, 3.3522e+00, ..., -2.4181e-03,\n", + " -3.8851e-02, -1.2788e-02],\n", + " [ 2.3858e-01, 1.7282e+00, 2.0495e-01, ..., -1.6586e-02,\n", + " -2.1828e-02, 1.8588e-02],\n", + " [-2.9145e-02, -1.2417e-02, 3.4134e+00, ..., -1.3510e-02,\n", + " -3.8809e-02, -4.2780e-02],\n", + " ...,\n", + " [-3.1978e-03, 2.7403e+00, 2.6669e+00, ..., 1.9889e+00,\n", + " -3.7711e-02, 1.3071e+00],\n", + " [-3.5360e-02, -2.3906e-03, 3.8338e+00, ..., -1.9891e-02,\n", + " -3.7024e-02, -4.7617e-02],\n", + " [-5.7536e-03, 3.7766e+00, 2.5923e+00, ..., 5.1982e+00,\n", + " -5.4373e-02, 3.1995e+00]], device='cuda:0'), 'author': tensor([[-2.0420e-03, 2.9141e-01, 3.7253e-01, ..., 1.4566e+00,\n", + " 1.8724e-01, -3.2095e-03],\n", + " [-1.4916e-03, 2.6345e-01, 2.9084e-02, ..., 1.2145e+00,\n", + " 3.3970e-01, -8.2772e-04],\n", + " [ 8.2532e-02, 6.7982e-02, 2.1745e-01, ..., 1.3279e+00,\n", + " 5.7098e-01, 1.5972e-01],\n", + " ...,\n", + " [-4.5874e-03, 3.2265e-01, 1.4473e-01, ..., 1.3428e+00,\n", + " -3.5640e-03, -8.1768e-03],\n", + " [-1.2346e-03, 2.2945e-01, 1.4368e-01, ..., 1.2227e+00,\n", + " 2.8239e-01, -7.6948e-04],\n", + " [-1.6015e-03, 2.2135e-01, 1.5322e-01, ..., 1.2138e+00,\n", + " 2.3804e-01, -1.3684e-03]], device='cuda:0'), 'field_of_study': tensor([[-1.6020e-03, 4.4531e-01, 1.2746e-01, ..., -7.4177e-03,\n", + " 2.3479e-01, 3.6345e-01],\n", + " [-2.0407e-03, 4.6759e-01, 9.0971e-02, ..., -8.1251e-03,\n", + " 3.8683e-01, 4.1138e-01],\n", + " [-6.3832e-04, 4.7078e-01, 1.1006e-01, ..., -7.9485e-03,\n", + " 3.5110e-01, 2.2674e-01],\n", + " ...,\n", + " [-1.9854e-04, 7.5339e-01, 2.3548e-01, ..., -9.6054e-03,\n", + " 5.5276e-01, 5.2878e-01],\n", + " [-2.7843e-03, 7.4014e-01, 2.8016e-01, ..., -9.2927e-03,\n", + " 4.3744e-01, 6.2859e-01],\n", + " [-5.8464e-04, 5.4361e-01, 1.6769e-01, ..., -7.0955e-03,\n", + " 3.4423e-01, 1.6373e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 14, 191, 97, 97, 97, 118, 62, 62, 62, 152, 293, 435,\n", + " 261, 261, 261, 584, 879, 1013, 1013, 1013, 1043, 673, 673, 786,\n", + " 786, 667, 971, 971, 1053, 592, 592, 1353, 1202, 1590, 1547, 1624,\n", + " 1542, 1595, 1912, 1912, 1857, 1953, 1953, 1890, 1912, 1926, 2234, 2222,\n", + " 1878, 2293, 2141, 2103, 2183, 2232, 2232, 2232, 2232, 2232, 2257, 2422,\n", + " 2422, 2422, 2393, 2493, 2416, 2463, 2556, 2705, 2787, 2721, 2721, 2785,\n", + " 2994, 2761, 2868, 2752, 3032, 2887, 2799, 3140, 3069, 3099, 3099, 3137,\n", + " 3021, 3285, 3380, 3218, 3252, 3462, 3271, 3280, 3280, 3523, 3537, 3657,\n", + " 3922, 3953, 3996, 3996, 4010, 4036, 4036, 4048, 4127, 4136, 4136, 4248,\n", + " 4248, 4207, 4179, 4165, 4238, 4270, 4221, 4226, 4313, 4204, 4204, 4403,\n", + " 4285, 4356, 4411, 4320, 4320, 4555, 4573, 4662, 4485, 4978, 4618, 4672,\n", + " 4821, 4821, 4961, 4917, 4839, 4900, 4903, 5088, 5088, 4951, 4951, 5174,\n", + " 4914, 5078, 5081, 5225, 5226, 5697, 5697, 5641, 5601, 5475, 5687, 5193,\n", + " 5193, 5193, 5470, 5409, 5483, 5567, 5710, 5321, 5321, 5919, 5863, 5658,\n", + " 5751, 5824, 5824, 5824, 5824, 5824, 5824, 5867, 5866, 5643, 5721, 5721,\n", + " 5883, 5883, 6111, 6111, 6111, 5843, 6070, 6070, 6056, 5867, 5867, 5886,\n", + " 5886, 6112, 5996, 5996, 5996, 5823, 6205, 6205, 6006, 6006, 6006, 6006,\n", + " 5983, 5983, 6248, 6258, 6260, 6260, 6260],\n", + " [ 25, 6, 87, 125, 59, 13, 123, 127, 114, 66, 66, 97,\n", + " 34, 50, 69, 123, 32, 104, 86, 45, 91, 108, 61, 25,\n", + " 34, 66, 28, 40, 7, 14, 49, 46, 15, 16, 16, 36,\n", + " 25, 49, 126, 61, 87, 4, 103, 11, 30, 75, 23, 76,\n", + " 77, 80, 66, 112, 113, 28, 60, 73, 24, 84, 53, 71,\n", + " 5, 62, 104, 122, 106, 76, 95, 101, 98, 61, 107, 88,\n", + " 45, 49, 10, 94, 70, 122, 93, 105, 93, 55, 41, 4,\n", + " 78, 107, 44, 10, 116, 97, 54, 41, 19, 23, 8, 46,\n", + " 104, 113, 75, 65, 102, 3, 23, 16, 121, 25, 89, 61,\n", + " 118, 9, 93, 117, 23, 16, 29, 10, 13, 23, 16, 3,\n", + " 111, 38, 69, 83, 22, 25, 34, 97, 95, 85, 96, 16,\n", + " 35, 16, 13, 42, 23, 58, 105, 99, 64, 39, 37, 12,\n", + " 17, 45, 1, 34, 45, 52, 66, 57, 51, 47, 2, 18,\n", + " 33, 92, 66, 74, 110, 66, 56, 20, 82, 27, 115, 120,\n", + " 66, 0, 81, 21, 43, 119, 72, 66, 56, 100, 40, 22,\n", + " 63, 66, 48, 66, 68, 126, 115, 66, 66, 69, 90, 12,\n", + " 6, 6, 66, 67, 109, 124, 66, 42, 26, 52, 79, 66,\n", + " 78, 66, 128, 31, 8, 107, 66]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1733, 450, 4143, ..., 6051, 1710, 2512],\n", + " [ 269, 58, 58, ..., 6594, 6460, 6547]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 108, 94, 33, ..., 10, 128, 4],\n", + " [ 96, 228, 203, ..., 6222, 6233, 6156]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 20, 20, 20, ..., 6628, 6628, 6628],\n", + " [ 424, 332, 118, ..., 548, 310, 587]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 631, 255, 309, ..., 409, 126, 194],\n", + " [ 99, 255, 82, ..., 6623, 6607, 6645]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2112, 908, 156, ..., 2845, 1027, 1710],\n", + " [ 114, 114, 114, ..., 6257, 6253, 6300]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 20, 20, 20, ..., 6594, 6594, 6594],\n", + " [6611, 401, 6385, ..., 1785, 1187, 572]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 121, 62, 62, ..., 6107, 6107, 6107],\n", + " [ 404, 246, 243, ..., 4770, 4721, 4864]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006689\n", + "sampling 0.006536\n", + "noi time: 0.000942\n", + "get_vertex_data call: 0.033262\n", + "noi group time: 0.003774\n", + "eoi_group_time: 0.012125\n", + "second half: 0.212\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 16691, 19416, ..., 1119684, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 16691, 19416, ..., 1119684, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227493, 1224370, 1231432, ..., 1930681, 1936963, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227493, 1224370, 1231432, ..., 1930681, 1936963, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137433, 1137213, 1141424, 1140282, 1136347, 1135926, 1135935, 1135716,\n", + " 1135727, 1140785, 1140799, 1139698, 1141756, 1141758, 1137517, 1136223,\n", + " 1140290, 1139811, 1145373, 1146990, 1139141, 1143372, 1139241, 1150390,\n", + " 1150395, 1148976, 1150506, 1150509, 1139866, 1134940, 1149216, 1155686,\n", + " 1135992, 1142881, 1144632, 1135262, 1146995, 1153008, 1153012, 1134694,\n", + " 1135941, 1148343, 1148350, 1153217, 1147091, 1147094, 1147096, 1137220,\n", + " 1155014, 1139371, 1147211, 1150329, 1152427, 1134715, 1138742, 1138749,\n", + " 1140540, 1138112, 1137171, 1137180, 1149467, 1138366, 1151528, 1140020,\n", + " 1140952, 1135367, 1135202, 1135204, 1141036, 1134794, 1157443, 1143377,\n", + " 1137329, 1135337, 1144395, 1136826, 1137534, 1135408, 1157395, 1136662,\n", + " 1137440, 1137441, 1135265, 1156149, 1148494, 1135246, 1140254, 1140970,\n", + " 1138514, 1153094, 1137957, 1135499, 1137019, 1156899, 1139687, 1136364,\n", + " 1138436, 1138440, 1136534, 1138461, 1137493, 1137924, 1136594, 1158386,\n", + " 1158391, 1149328, 1138695, 1156603, 1156606, 1147112, 1147119, 1142611,\n", + " 1142615, 1135355, 1148531, 1135769, 1141532, 1136457, 1139667, 1159191,\n", + " 1136089, 1134992, 1148805, 1135789, 1158974, 1159009, 1159012, 1159018,\n", + " 1159019, 1141065, 1138655, 1141963, 1155648, 1146077, 1146078, 1146075,\n", + " 1140557, 1152044, 1139069, 1137734, 1137728, 1134750, 1135549, 1140228,\n", + " 1137898, 1141088, 1149001, 1139889, 1136392, 1143767, 1143703, 1143225,\n", + " 1139025, 1141695, 1135857, 1135860, 1135861, 1136419, 1154466, 1136625,\n", + " 1141224, 1141655, 1136917, 1143673, 1141154, 1141161, 1141786, 1139495,\n", + " 1144941, 1144650, 1134987, 1136852, 1147845, 1138482, 1145161, 1137761,\n", + " 1137771, 1139190, 1141479, 1141486, 1138708, 1140110, 1142913, 1137649,\n", + " 1137661, 1138423, 1145298, 1141579, 1146199, 1139559, 1158698, 1138539,\n", + " 1137854, 1161698, 1147153, 1142640, 1149186, 1149197, 1141365, 1153068,\n", + " 1141664, 1139018, 1139019, 1138293, 1139508, 1139509, 1139510, 1139764,\n", + " 1145000, 1140616, 1140619, 1140984, 1141560, 1143692, 1147050, 1145873,\n", + " 1143547, 1143538, 1152976, 1152985, 1152988, 1141925, 1144250, 1144242,\n", + " 1145339, 1141853, 1150243, 1148313, 1143643, 1143851, 1146024, 1146025,\n", + " 1146140, 1154328, 1149933, 1139990, 1143293, 1143283, 1147136, 1148763,\n", + " 1147282, 1164371, 1140348, 1139408, 1139417, 1148003, 1143051, 1138923,\n", + " 1136836, 1139329, 1141492, 1138235, 1139055, 1142118, 1142149, 1142153,\n", + " 1142159, 1143345, 1140844, 1137098, 1135876, 1135886, 1138013, 1143958,\n", + " 1143456, 1143458, 1143457, 1143007, 1142003, 1143937, 1146590, 1146633,\n", + " 1146626, 1147521, 1140364, 1149569, 1137990, 1137992, 1143075, 1166410,\n", + " 1148962, 1144725, 1147984, 1147988, 1147996, 1147999, 1134907, 1144003,\n", + " 1139252, 1139255, 1147244, 1148704, 1141825, 1141827, 1147070, 1147025,\n", + " 1147027, 1147031, 1147970, 1145011, 1139549, 1147198, 1158226, 1158235,\n", + " 1145237, 1145240, 1145751, 1138632, 1138638, 1148391, 1148397, 1146178,\n", + " 1151242, 1148223, 1150272, 1150445, 1149258, 1148829, 1149791, 1144514,\n", + " 1144526, 1145833, 1150342, 1153982, 1152013, 1165253, 1147807, 1154263,\n", + " 1146723, 1134869, 1134878, 1140566, 1150127, 1147021, 1147009, 1158950,\n", + " 1141274, 1148744, 1149985, 1147654, 1149412, 1148288, 1135076, 1135087,\n", + " 1139096, 1154420, 1148180, 1152561, 1136247, 1146676, 1146687, 1138404,\n", + " 1152436, 1148724, 1148726, 1148729, 1147627, 1139936, 1166314, 1148204,\n", + " 1171937, 1171943, 1154168, 1153125, 1153192, 1159837, 1152968, 1150935,\n", + " 1148060, 1152878, 1144863, 1155088, 1143129, 1147446, 1147447, 1147442,\n", + " 1151809, 1151816, 1151821, 1154183, 1145640, 1156889, 1141420, 1150628,\n", + " 1153449, 1148949, 1146969, 1146623, 1152409, 1154052, 1152100, 1152103,\n", + " 1156325, 1153032, 1153038, 1137746, 1137757, 1152608, 1152622, 1140521,\n", + " 1152826, 1154123, 1152673, 1154633, 1151617, 1151629, 1150578, 1151440,\n", + " 1136789, 1136798, 1148916, 1148921, 1152958, 1144529, 1138991, 1152903,\n", + " 1151311, 1152341, 1146816, 1158429, 1156831, 1153298, 1138279, 1138281,\n", + " 1152297, 1152301, 1152300, 1136028, 1158704, 1156619, 1156622, 1140684,\n", + " 1152928, 1151064, 1173593, 1152888, 1154728, 1143477, 1156422, 1150106,\n", + " 1150157, 1150164, 1153690, 1148040, 1145656, 1149792, 1137048, 1148628,\n", + " 1158530, 1148378, 1137458, 1149948, 1153865, 1157515, 1135698, 1135706,\n", + " 1155391, 1153085, 1142041, 1154377, 1135430, 1135434, 1157547, 1148892,\n", + " 1154929, 1156505, 1157064, 1153883, 1155418, 1145191, 1145184, 1139473,\n", + " 1151260, 1156629, 1156638, 1151788, 1152737, 1137624, 1158308, 1158311,\n", + " 1155441, 1153359, 1138573, 1142755, 1142758, 1156207, 1156271, 1157642,\n", + " 1151379, 1158628, 1152527, 1157183, 1135403, 1135406, 1146913, 1146920,\n", + " 1154763, 1155628, 1155630, 1158484, 1156563, 1154549, 1161429, 1161434,\n", + " 1136466, 1158824, 1158325, 1148836, 1155644, 1155646, 1146942, 1154250,\n", + " 1154240, 1139620, 1179427, 1143189, 1150371, 1153326, 1157439, 1141627,\n", + " 1159622, 1157934, 1157935, 1151030, 1137152, 1157650, 1158124, 1158996,\n", + " 1159116, 1159119, 1177753, 1138269, 1145694, 1145681, 1140919, 1166187,\n", + " 1134677, 1164161, 1135601, 1135602, 1148149, 1150661, 1155852, 1158664,\n", + " 1149145, 1152209, 1152220, 1152222, 1159213, 1157732, 1163684, 1155975,\n", + " 1156950, 1158846, 1149700, 1154600, 1153503, 1136896, 1158753, 1158882,\n", + " 1140221, 1158805, 1158447, 1158285, 1136491, 1154387, 1152128, 1153808,\n", + " 1157675, 1136640, 1136646, 1134757, 1166424, 1157858, 1157869, 1142184,\n", + " 1158545, 1158558, 1165497, 1146126, 1158006, 1150011, 1161539, 1137559,\n", + " 1135661, 1164276, 1142663, 1142666, 1167359, 1162685, 1144258, 1159070,\n", + " 1165830, 1163267, 1157941, 1153052, 1153045, 1171551, 1167707, 1159370,\n", + " 1156100, 1150046, 1150041, 1164554, 1149063, 1145948, 1155476, 1155479,\n", + " 1153519, 1142406, 1146870, 1138161, 1164006, 1164010, 1168327, 1149953,\n", + " 1149961, 1164909, 1163396, 1154590, 1139592, 1139284, 1139290, 1166936,\n", + " 1159890, 1169745, 1166073, 1157236, 1148771, 1146063, 1159552, 1146356,\n", + " 1171249, 1158461, 1162308, 1160701, 1165309, 1140134, 1158868, 1148600,\n", + " 1156361, 1176642, 1156181, 1159025, 1159032, 1152247, 1146532, 1155588,\n", + " 1160335, 1147562, 1151220, 1158405, 1144979, 1169647, 1146510, 1153239,\n", + " 1144739, 1166881, 1163527, 1155273, 1153204, 1141471, 1157050, 1149899,\n", + " 1179981, 1156739, 1153663, 1153273, 1168860, 1135567, 1142733, 1156293,\n", + " 1155324, 1166459, 1171691, 1138758, 1184043, 1143025, 1166053, 1147681,\n", + " 1145441, 1145455, 1170507, 1152624, 1152626, 1139344, 1139351, 1147719,\n", + " 1145902, 1143397, 1143405, 1143404, 1171279, 1154076, 1168756, 1144699,\n", + " 1177929, 1145674, 1192407, 1188857, 1149121, 1154917, 1166653, 1187829,\n", + " 1155172, 1150518, 1156119, 1144336, 1170930, 1157534, 1169154, 1169162,\n", + " 1151668, 1169359, 1149452, 1149688, 1158611, 1158623, 1158060, 1158062,\n", + " 1149847, 1154869, 1154875, 1152353, 1169185, 1170278, 1168451, 1168400,\n", + " 1149398, 1148667, 1148335, 1169271, 1173307, 1145027, 1169144, 1154027,\n", + " 1152150, 1159654, 1167857, 1169583, 1157153, 1157373, 1147711, 1178966,\n", + " 1151850, 1148131, 1148141, 1147925, 1176319, 1166825, 1168598, 1140326,\n", + " 1166028, 1172606, 1181131, 1163989, 1166682, 1166684, 1171823, 1182134,\n", + " 1179556, 1181772, 1150234, 1154148, 1154153, 1149169, 1149179, 1149183,\n", + " 1149173, 1172455, 1143269, 1169760, 1180393, 1168481, 1143420, 1181241,\n", + " 1153803, 1178163, 1164818, 1161039, 1184093, 1179807, 1161262, 1155262,\n", + " 1157792, 1157795, 1177585, 1182810, 1171623, 1180036, 1172148, 1153898,\n", + " 1145626, 1145618, 1157474, 1161911, 1149755, 1146252, 1153609, 1183215,\n", + " 1186957, 1163045, 1157761, 1155994, 1160115, 1160121, 1158512, 1187802,\n", + " 1158382, 1187922, 1177094, 1164411, 1140399, 1168273, 1180168, 1165487,\n", + " 1166227, 1168621, 1168874, 1168876, 1159459, 1182337, 1180983, 1165444,\n", + " 1161819, 1183824, 1181811, 1156162, 1162757, 1168930, 1156528, 1139831,\n", + " 1150265, 1154812, 1149668, 1156049, 1156055, 1151978, 1151977, 1180125,\n", + " 1188215, 1193369, 1194316, 1181951, 1194475, 1151774, 1183629, 1169707,\n", + " 1192661, 1177186, 1184757, 1191327, 1171201, 1177461, 1191064, 1161866,\n", + " 1172122, 1158064, 1184559, 1185632, 1155962, 1179769, 1194006, 1193904,\n", + " 1188747, 1189938, 1184977, 1157017, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137433, 1137213, 1141424, 1140282, 1136347, 1135926, 1135935, 1135716,\n", + " 1135727, 1140785, 1140799, 1139698, 1141756, 1141758, 1137517, 1136223,\n", + " 1140290, 1139811, 1145373, 1146990, 1139141, 1143372, 1139241, 1150390,\n", + " 1150395, 1148976, 1150506, 1150509, 1139866, 1134940, 1149216, 1155686,\n", + " 1135992, 1142881, 1144632, 1135262, 1146995, 1153008, 1153012, 1134694,\n", + " 1135941, 1148343, 1148350, 1153217, 1147091, 1147094, 1147096, 1137220,\n", + " 1155014, 1139371, 1147211, 1150329, 1152427, 1134715, 1138742, 1138749,\n", + " 1140540, 1138112, 1137171, 1137180, 1149467, 1138366, 1151528, 1140020,\n", + " 1140952, 1135367, 1135202, 1135204, 1141036, 1134794, 1157443, 1143377,\n", + " 1137329, 1135337, 1144395, 1136826, 1137534, 1135408, 1157395, 1136662,\n", + " 1137440, 1137441, 1135265, 1156149, 1148494, 1135246, 1140254, 1140970,\n", + " 1138514, 1153094, 1137957, 1135499, 1137019, 1156899, 1139687, 1136364,\n", + " 1138436, 1138440, 1136534, 1138461, 1137493, 1137924, 1136594, 1158386,\n", + " 1158391, 1149328, 1138695, 1156603, 1156606, 1147112, 1147119, 1142611,\n", + " 1142615, 1135355, 1148531, 1135769, 1141532, 1136457, 1139667, 1159191,\n", + " 1136089, 1134992, 1148805, 1135789, 1158974, 1159009, 1159012, 1159018,\n", + " 1159019, 1141065, 1138655, 1141963, 1155648, 1146077, 1146078, 1146075,\n", + " 1140557, 1152044, 1139069, 1137734, 1137728, 1134750, 1135549, 1140228,\n", + " 1137898, 1141088, 1149001, 1139889, 1136392, 1143767, 1143703, 1143225,\n", + " 1139025, 1141695, 1135857, 1135860, 1135861, 1136419, 1154466, 1136625,\n", + " 1141224, 1141655, 1136917, 1143673, 1141154, 1141161, 1141786, 1139495,\n", + " 1144941, 1144650, 1134987, 1136852, 1147845, 1138482, 1145161, 1137761,\n", + " 1137771, 1139190, 1141479, 1141486, 1138708, 1140110, 1142913, 1137649,\n", + " 1137661, 1138423, 1145298, 1141579, 1146199, 1139559, 1158698, 1138539,\n", + " 1137854, 1161698, 1147153, 1142640, 1149186, 1149197, 1141365, 1153068,\n", + " 1141664, 1139018, 1139019, 1138293, 1139508, 1139509, 1139510, 1139764,\n", + " 1145000, 1140616, 1140619, 1140984, 1141560, 1143692, 1147050, 1145873,\n", + " 1143547, 1143538, 1152976, 1152985, 1152988, 1141925, 1144250, 1144242,\n", + " 1145339, 1141853, 1150243, 1148313, 1143643, 1143851, 1146024, 1146025,\n", + " 1146140, 1154328, 1149933, 1139990, 1143293, 1143283, 1147136, 1148763,\n", + " 1147282, 1164371, 1140348, 1139408, 1139417, 1148003, 1143051, 1138923,\n", + " 1136836, 1139329, 1141492, 1138235, 1139055, 1142118, 1142149, 1142153,\n", + " 1142159, 1143345, 1140844, 1137098, 1135876, 1135886, 1138013, 1143958,\n", + " 1143456, 1143458, 1143457, 1143007, 1142003, 1143937, 1146590, 1146633,\n", + " 1146626, 1147521, 1140364, 1149569, 1137990, 1137992, 1143075, 1166410,\n", + " 1148962, 1144725, 1147984, 1147988, 1147996, 1147999, 1134907, 1144003,\n", + " 1139252, 1139255, 1147244, 1148704, 1141825, 1141827, 1147070, 1147025,\n", + " 1147027, 1147031, 1147970, 1145011, 1139549, 1147198, 1158226, 1158235,\n", + " 1145237, 1145240, 1145751, 1138632, 1138638, 1148391, 1148397, 1146178,\n", + " 1151242, 1148223, 1150272, 1150445, 1149258, 1148829, 1149791, 1144514,\n", + " 1144526, 1145833, 1150342, 1153982, 1152013, 1165253, 1147807, 1154263,\n", + " 1146723, 1134869, 1134878, 1140566, 1150127, 1147021, 1147009, 1158950,\n", + " 1141274, 1148744, 1149985, 1147654, 1149412, 1148288, 1135076, 1135087,\n", + " 1139096, 1154420, 1148180, 1152561, 1136247, 1146676, 1146687, 1138404,\n", + " 1152436, 1148724, 1148726, 1148729, 1147627, 1139936, 1166314, 1148204,\n", + " 1171937, 1171943, 1154168, 1153125, 1153192, 1159837, 1152968, 1150935,\n", + " 1148060, 1152878, 1144863, 1155088, 1143129, 1147446, 1147447, 1147442,\n", + " 1151809, 1151816, 1151821, 1154183, 1145640, 1156889, 1141420, 1150628,\n", + " 1153449, 1148949, 1146969, 1146623, 1152409, 1154052, 1152100, 1152103,\n", + " 1156325, 1153032, 1153038, 1137746, 1137757, 1152608, 1152622, 1140521,\n", + " 1152826, 1154123, 1152673, 1154633, 1151617, 1151629, 1150578, 1151440,\n", + " 1136789, 1136798, 1148916, 1148921, 1152958, 1144529, 1138991, 1152903,\n", + " 1151311, 1152341, 1146816, 1158429, 1156831, 1153298, 1138279, 1138281,\n", + " 1152297, 1152301, 1152300, 1136028, 1158704, 1156619, 1156622, 1140684,\n", + " 1152928, 1151064, 1173593, 1152888, 1154728, 1143477, 1156422, 1150106,\n", + " 1150157, 1150164, 1153690, 1148040, 1145656, 1149792, 1137048, 1148628,\n", + " 1158530, 1148378, 1137458, 1149948, 1153865, 1157515, 1135698, 1135706,\n", + " 1155391, 1153085, 1142041, 1154377, 1135430, 1135434, 1157547, 1148892,\n", + " 1154929, 1156505, 1157064, 1153883, 1155418, 1145191, 1145184, 1139473,\n", + " 1151260, 1156629, 1156638, 1151788, 1152737, 1137624, 1158308, 1158311,\n", + " 1155441, 1153359, 1138573, 1142755, 1142758, 1156207, 1156271, 1157642,\n", + " 1151379, 1158628, 1152527, 1157183, 1135403, 1135406, 1146913, 1146920,\n", + " 1154763, 1155628, 1155630, 1158484, 1156563, 1154549, 1161429, 1161434,\n", + " 1136466, 1158824, 1158325, 1148836, 1155644, 1155646, 1146942, 1154250,\n", + " 1154240, 1139620, 1179427, 1143189, 1150371, 1153326, 1157439, 1141627,\n", + " 1159622, 1157934, 1157935, 1151030, 1137152, 1157650, 1158124, 1158996,\n", + " 1159116, 1159119, 1177753, 1138269, 1145694, 1145681, 1140919, 1166187,\n", + " 1134677, 1164161, 1135601, 1135602, 1148149, 1150661, 1155852, 1158664,\n", + " 1149145, 1152209, 1152220, 1152222, 1159213, 1157732, 1163684, 1155975,\n", + " 1156950, 1158846, 1149700, 1154600, 1153503, 1136896, 1158753, 1158882,\n", + " 1140221, 1158805, 1158447, 1158285, 1136491, 1154387, 1152128, 1153808,\n", + " 1157675, 1136640, 1136646, 1134757, 1166424, 1157858, 1157869, 1142184,\n", + " 1158545, 1158558, 1165497, 1146126, 1158006, 1150011, 1161539, 1137559,\n", + " 1135661, 1164276, 1142663, 1142666, 1167359, 1162685, 1144258, 1159070,\n", + " 1165830, 1163267, 1157941, 1153052, 1153045, 1171551, 1167707, 1159370,\n", + " 1156100, 1150046, 1150041, 1164554, 1149063, 1145948, 1155476, 1155479,\n", + " 1153519, 1142406, 1146870, 1138161, 1164006, 1164010, 1168327, 1149953,\n", + " 1149961, 1164909, 1163396, 1154590, 1139592, 1139284, 1139290, 1166936,\n", + " 1159890, 1169745, 1166073, 1157236, 1148771, 1146063, 1159552, 1146356,\n", + " 1171249, 1158461, 1162308, 1160701, 1165309, 1140134, 1158868, 1148600,\n", + " 1156361, 1176642, 1156181, 1159025, 1159032, 1152247, 1146532, 1155588,\n", + " 1160335, 1147562, 1151220, 1158405, 1144979, 1169647, 1146510, 1153239,\n", + " 1144739, 1166881, 1163527, 1155273, 1153204, 1141471, 1157050, 1149899,\n", + " 1179981, 1156739, 1153663, 1153273, 1168860, 1135567, 1142733, 1156293,\n", + " 1155324, 1166459, 1171691, 1138758, 1184043, 1143025, 1166053, 1147681,\n", + " 1145441, 1145455, 1170507, 1152624, 1152626, 1139344, 1139351, 1147719,\n", + " 1145902, 1143397, 1143405, 1143404, 1171279, 1154076, 1168756, 1144699,\n", + " 1177929, 1145674, 1192407, 1188857, 1149121, 1154917, 1166653, 1187829,\n", + " 1155172, 1150518, 1156119, 1144336, 1170930, 1157534, 1169154, 1169162,\n", + " 1151668, 1169359, 1149452, 1149688, 1158611, 1158623, 1158060, 1158062,\n", + " 1149847, 1154869, 1154875, 1152353, 1169185, 1170278, 1168451, 1168400,\n", + " 1149398, 1148667, 1148335, 1169271, 1173307, 1145027, 1169144, 1154027,\n", + " 1152150, 1159654, 1167857, 1169583, 1157153, 1157373, 1147711, 1178966,\n", + " 1151850, 1148131, 1148141, 1147925, 1176319, 1166825, 1168598, 1140326,\n", + " 1166028, 1172606, 1181131, 1163989, 1166682, 1166684, 1171823, 1182134,\n", + " 1179556, 1181772, 1150234, 1154148, 1154153, 1149169, 1149179, 1149183,\n", + " 1149173, 1172455, 1143269, 1169760, 1180393, 1168481, 1143420, 1181241,\n", + " 1153803, 1178163, 1164818, 1161039, 1184093, 1179807, 1161262, 1155262,\n", + " 1157792, 1157795, 1177585, 1182810, 1171623, 1180036, 1172148, 1153898,\n", + " 1145626, 1145618, 1157474, 1161911, 1149755, 1146252, 1153609, 1183215,\n", + " 1186957, 1163045, 1157761, 1155994, 1160115, 1160121, 1158512, 1187802,\n", + " 1158382, 1187922, 1177094, 1164411, 1140399, 1168273, 1180168, 1165487,\n", + " 1166227, 1168621, 1168874, 1168876, 1159459, 1182337, 1180983, 1165444,\n", + " 1161819, 1183824, 1181811, 1156162, 1162757, 1168930, 1156528, 1139831,\n", + " 1150265, 1154812, 1149668, 1156049, 1156055, 1151978, 1151977, 1180125,\n", + " 1188215, 1193369, 1194316, 1181951, 1194475, 1151774, 1183629, 1169707,\n", + " 1192661, 1177186, 1184757, 1191327, 1171201, 1177461, 1191064, 1161866,\n", + " 1172122, 1158064, 1184559, 1185632, 1155962, 1179769, 1194006, 1193904,\n", + " 1188747, 1189938, 1184977, 1157017, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196011, 1199833, 1195860, 1199282, 1198449, 1198459, 1202255, 1198832,\n", + " 1198840, 1198844, 1201582, 1202119, 1194626, 1200644, 1197359, 1198624,\n", + " 1196956, 1198557, 1197514, 1194866, 1194770, 1194648, 1195512, 1195514,\n", + " 1198619, 1195263, 1197697, 1199519, 1195830, 1198306, 1194882, 1195888,\n", + " 1196616, 1194754, 1196840, 1197807, 1195134, 1198268, 1195571, 1198041,\n", + " 1198958, 1198163, 1196705, 1195145, 1195148, 1195223, 1195278, 1197141,\n", + " 1197136, 1196255, 1197273, 1198220, 1195847, 1197474, 1197478, 1199998,\n", + " 1200037, 1195626, 1198273, 1200959, 1199856, 1199185, 1194928, 1200076,\n", + " 1198404, 1199579, 1200739, 1199676, 1199845, 1199949, 1201511, 1200668,\n", + " 1195807, 1197601, 1196727, 1195773, 1198428, 1198811, 1199555, 1201547,\n", + " 1200612, 1201824, 1200169, 1196479, 1201155, 1200915, 1202641, 1199712,\n", + " 1200546, 1200429, 1197100, 1202978, 1202138, 1200690, 1199908, 1201451,\n", + " 1201029, 1202239, 1200181, 1201865, 1203336, 1201590, 1196966, 1202687,\n", + " 1196823, 1195676, 1195679, 1195664, 1198911, 1201789, 1197816, 1197822,\n", + " 1199659, 1199469, 1203102, 1199234, 1195070, 1201886, 1197035, 1195165],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196011, 1199833, 1195860, 1199282, 1198449, 1198459, 1202255, 1198832,\n", + " 1198840, 1198844, 1201582, 1202119, 1194626, 1200644, 1197359, 1198624,\n", + " 1196956, 1198557, 1197514, 1194866, 1194770, 1194648, 1195512, 1195514,\n", + " 1198619, 1195263, 1197697, 1199519, 1195830, 1198306, 1194882, 1195888,\n", + " 1196616, 1194754, 1196840, 1197807, 1195134, 1198268, 1195571, 1198041,\n", + " 1198958, 1198163, 1196705, 1195145, 1195148, 1195223, 1195278, 1197141,\n", + " 1197136, 1196255, 1197273, 1198220, 1195847, 1197474, 1197478, 1199998,\n", + " 1200037, 1195626, 1198273, 1200959, 1199856, 1199185, 1194928, 1200076,\n", + " 1198404, 1199579, 1200739, 1199676, 1199845, 1199949, 1201511, 1200668,\n", + " 1195807, 1197601, 1196727, 1195773, 1198428, 1198811, 1199555, 1201547,\n", + " 1200612, 1201824, 1200169, 1196479, 1201155, 1200915, 1202641, 1199712,\n", + " 1200546, 1200429, 1197100, 1202978, 1202138, 1200690, 1199908, 1201451,\n", + " 1201029, 1202239, 1200181, 1201865, 1203336, 1201590, 1196966, 1202687,\n", + " 1196823, 1195676, 1195679, 1195664, 1198911, 1201789, 1197816, 1197822,\n", + " 1199659, 1199469, 1203102, 1199234, 1195070, 1201886, 1197035, 1195165],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 2.7790e-01, -9.7593e-04, 9.5593e-01, ..., 5.4811e-02,\n", + " -1.4583e-03, -6.9159e-03],\n", + " [ 2.5839e-01, -7.3130e-04, 8.4318e-01, ..., 5.1233e-02,\n", + " -1.5688e-03, -6.1404e-03],\n", + " [ 2.7470e-01, -8.1009e-04, 8.6883e-01, ..., 5.0518e-02,\n", + " -1.5933e-03, -6.2901e-03],\n", + " ...,\n", + " [ 2.7470e-01, -8.1009e-04, 8.6883e-01, ..., 5.0518e-02,\n", + " -1.5933e-03, -6.2901e-03],\n", + " [ 1.7898e-01, -3.5548e-04, 6.2006e-01, ..., 8.7517e-02,\n", + " -1.8244e-03, -4.4984e-03],\n", + " [ 2.5418e-01, -8.5428e-04, 7.4312e-01, ..., 3.6122e-02,\n", + " -1.4218e-03, -5.7450e-03]], device='cuda:0'), 'paper': tensor([[ 1.8004e-01, 3.8060e-01, 3.7755e-01, ..., -8.9129e-03,\n", + " -1.8329e-02, 1.5243e-02],\n", + " [-6.8880e-03, 2.6298e+00, 2.7252e+00, ..., 2.5055e+00,\n", + " -3.9528e-02, 1.0837e+00],\n", + " [-2.0523e-02, 2.0311e-01, 2.1080e+00, ..., -9.4458e-03,\n", + " -2.5914e-02, -2.8705e-02],\n", + " ...,\n", + " [-7.7427e-03, 1.4467e+00, 2.7491e+00, ..., 9.3921e-02,\n", + " -3.6822e-02, -2.7652e-03],\n", + " [-6.1512e-03, 5.8494e-01, 9.4915e-01, ..., -6.5472e-03,\n", + " -1.8168e-02, -8.4632e-03],\n", + " [-6.4981e-03, 3.6437e+00, 2.4055e+00, ..., 5.0421e+00,\n", + " -5.2713e-02, 2.9811e+00]], device='cuda:0'), 'author': tensor([[-1.4851e-03, 2.2034e-01, 1.6209e-01, ..., 1.2635e+00,\n", + " 2.4778e-01, -1.1046e-03],\n", + " [-3.5529e-03, 3.2501e-01, 1.5433e-01, ..., 1.3393e+00,\n", + " -1.9874e-03, -4.5694e-03],\n", + " [-1.9924e-03, 2.0165e-01, 1.4836e-01, ..., 1.0912e+00,\n", + " 2.7255e-01, -1.1302e-03],\n", + " ...,\n", + " [-1.0245e-03, 2.7875e-01, 1.2002e-01, ..., 1.3879e+00,\n", + " 4.0598e-01, -3.9022e-04],\n", + " [-1.5765e-03, 2.0122e-01, 1.9051e-01, ..., 1.2493e+00,\n", + " 3.0369e-01, -1.1601e-03],\n", + " [ 9.9808e-03, 2.4886e-01, 9.1215e-02, ..., 1.2407e+00,\n", + " 5.8302e-01, 1.2796e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0019, 0.4585, 0.1457, ..., -0.0078, 0.2984, 0.3659],\n", + " [-0.0027, 0.6220, 0.2414, ..., -0.0077, 0.3741, 0.3710],\n", + " [-0.0022, 0.5502, 0.0940, ..., -0.0080, 0.4017, 0.3975],\n", + " ...,\n", + " [-0.0020, 0.3407, 0.0337, ..., -0.0066, 0.2737, 0.2966],\n", + " [-0.0021, 0.5313, 0.1283, ..., -0.0084, 0.4090, 0.4838],\n", + " [ 0.0064, 0.6601, 0.2743, ..., -0.0106, 0.4986, 0.2495]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 158, 43, 96, 96, 92, 171, 317, 317, 198, 247, 407, 407,\n", + " 434, 361, 476, 789, 914, 676, 796, 796, 796, 980, 1091, 1263,\n", + " 968, 968, 1404, 1090, 1090, 1090, 1090, 1090, 1421, 1366, 1366, 1366,\n", + " 1090, 1090, 1090, 1450, 1429, 1537, 1628, 1553, 1377, 1339, 1570, 1570,\n", + " 1585, 1584, 1683, 1910, 1763, 1807, 2025, 2114, 1763, 1763, 1763, 1763,\n", + " 1894, 1978, 2059, 2059, 1867, 2069, 2069, 2069, 2069, 2162, 2162, 2037,\n", + " 2037, 2037, 2176, 2414, 2582, 2686, 2675, 2740, 2698, 2879, 3215, 3215,\n", + " 3215, 2999, 3231, 3231, 3301, 3301, 3313, 3313, 3394, 3376, 3376, 3457,\n", + " 3513, 3656, 3642, 3874, 4051, 4131, 4081, 4209, 4209, 4281, 4237, 4320,\n", + " 4320, 4365, 4356, 4467, 4386, 4507, 4609, 4500, 4500, 4757, 4765, 4630,\n", + " 4612, 4855, 4855, 4627, 4600, 4600, 4865, 4882, 4731, 4786, 4786, 4774,\n", + " 4774, 4917, 4980, 4844, 5151, 5151, 5073, 5223, 5223, 5223, 5010, 5010,\n", + " 5011, 4954, 5208, 5164, 5382, 5291, 5320, 5320, 5265, 5479, 5449, 5492,\n", + " 5655, 5407, 5359, 5954, 5590, 5590, 5590, 5886, 5607, 5793, 5795, 5983,\n", + " 6006, 5838, 6003, 5812, 5629, 6234, 6043, 6389, 6270, 6086, 6001, 6001,\n", + " 6058, 6369, 6241, 6503, 6223, 6223, 6081, 6384, 6506],\n", + " [ 59, 46, 55, 10, 10, 23, 100, 33, 111, 97, 95, 55,\n", + " 103, 83, 34, 26, 111, 28, 75, 67, 37, 83, 65, 101,\n", + " 85, 70, 6, 60, 63, 44, 21, 74, 110, 67, 37, 75,\n", + " 14, 104, 54, 76, 36, 18, 51, 105, 96, 1, 80, 115,\n", + " 61, 79, 115, 109, 13, 112, 99, 48, 89, 29, 16, 7,\n", + " 10, 55, 26, 87, 25, 45, 91, 57, 31, 37, 75, 74,\n", + " 81, 105, 50, 51, 68, 76, 94, 69, 74, 97, 48, 3,\n", + " 66, 19, 108, 9, 84, 5, 118, 72, 110, 3, 70, 27,\n", + " 75, 77, 25, 8, 32, 73, 62, 17, 25, 25, 65, 64,\n", + " 3, 25, 97, 25, 110, 116, 58, 3, 113, 110, 4, 110,\n", + " 106, 30, 70, 111, 65, 63, 110, 115, 0, 24, 102, 88,\n", + " 20, 11, 114, 47, 92, 3, 3, 74, 117, 2, 74, 90,\n", + " 119, 73, 34, 41, 56, 110, 74, 47, 78, 110, 68, 40,\n", + " 86, 12, 21, 82, 53, 12, 108, 42, 77, 38, 66, 52,\n", + " 74, 98, 22, 58, 39, 49, 76, 35, 43, 15, 74, 89,\n", + " 61, 107, 106, 93, 30, 74, 74, 74, 71]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2984, 873, 2018, ..., 5314, 459, 3149],\n", + " [ 80, 54, 54, ..., 7039, 7107, 7088]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 76, 84, 62, ..., 77, 84, 35],\n", + " [ 167, 118, 42, ..., 6393, 6404, 6516]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 100, 100, 100, ..., 7152, 6993, 6993],\n", + " [ 571, 214, 107, ..., 469, 831, 775]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 291, 494, 147, ..., 69, 831, 447],\n", + " [ 404, 244, 223, ..., 7160, 7076, 7020]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2822, 3744, 1267, ..., 1968, 6734, 5660],\n", + " [ 48, 44, 13, ..., 6566, 6521, 6488]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 100, 100, 100, ..., 7152, 7152, 7152],\n", + " [1164, 1196, 1910, ..., 6138, 6374, 5929]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 158, 158, 158, ..., 6506, 6506, 6506],\n", + " [4233, 3222, 2704, ..., 5660, 5170, 4706]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006533\n", + "sampling 0.006381\n", + "noi time: 0.002038\n", + "get_vertex_data call: 0.037658\n", + "noi group time: 0.003509\n", + "eoi_group_time: 0.016812\n", + "second half: 0.219811\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 23835, 24187, 21459, ..., 1120069, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 23835, 24187, 21459, ..., 1120069, 1100728, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208581, 1221048, 1203797, ..., 1933651, 1935650, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208581, 1221048, 1203797, ..., 1933651, 1935650, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1137212, 1141424, 1140282, 1140284, 1135926, 1135160, 1135727,\n", + " 1140785, 1139701, 1141758, 1137506, 1138335, 1136208, 1136213, 1136155,\n", + " 1136965, 1136969, 1138903, 1151164, 1143609, 1149836, 1139811, 1154774,\n", + " 1145370, 1146991, 1137274, 1138933, 1146426, 1139140, 1143372, 1150390,\n", + " 1146641, 1139957, 1150497, 1145288, 1149216, 1143820, 1147483, 1135991,\n", + " 1149290, 1144636, 1148347, 1148546, 1153217, 1137220, 1139373, 1136677,\n", + " 1150329, 1151546, 1140531, 1140535, 1140540, 1138112, 1137254, 1137172,\n", + " 1149461, 1153463, 1140158, 1134735, 1140020, 1135367, 1135202, 1135210,\n", + " 1136047, 1134969, 1141036, 1136770, 1134791, 1134794, 1157443, 1137329,\n", + " 1136178, 1143064, 1157103, 1137693, 1136826, 1136928, 1156159, 1139153,\n", + " 1139161, 1134841, 1141703, 1142602, 1136111, 1140240, 1140970, 1138514,\n", + " 1138527, 1137953, 1154132, 1136985, 1156899, 1135522, 1135535, 1139685,\n", + " 1138311, 1136357, 1139878, 1138440, 1138461, 1137493, 1136594, 1149328,\n", + " 1142611, 1142615, 1145843, 1148531, 1139667, 1139673, 1138067, 1138069,\n", + " 1142255, 1136087, 1134992, 1142788, 1148805, 1153543, 1138148, 1141963,\n", + " 1134888, 1146077, 1146075, 1140557, 1152042, 1152044, 1139063, 1140657,\n", + " 1137734, 1137728, 1147317, 1140901, 1134738, 1134742, 1134750, 1135549,\n", + " 1141095, 1141098, 1154860, 1143224, 1143225, 1143229, 1149982, 1146834,\n", + " 1152719, 1135860, 1136625, 1136632, 1141106, 1141223, 1141891, 1163306,\n", + " 1136917, 1139742, 1143678, 1137188, 1139495, 1141609, 1144650, 1147850,\n", + " 1143153, 1140163, 1158749, 1141479, 1138710, 1138708, 1142913, 1143107,\n", + " 1143113, 1144445, 1144596, 1142455, 1142451, 1136864, 1145298, 1144182,\n", + " 1137611, 1150906, 1161093, 1139559, 1139560, 1158703, 1147153, 1141367,\n", + " 1140815, 1149088, 1149097, 1139019, 1144279, 1139510, 1139655, 1138815,\n", + " 1144998, 1145000, 1143779, 1140977, 1140990, 1146693, 1146695, 1147050,\n", + " 1143543, 1152976, 1139450, 1141925, 1141929, 1146901, 1144242, 1145339,\n", + " 1140580, 1150253, 1140689, 1136891, 1139405, 1143643, 1145980, 1143851,\n", + " 1146024, 1146140, 1154328, 1142533, 1149928, 1139990, 1143293, 1143283,\n", + " 1143294, 1143290, 1150418, 1147543, 1147540, 1148763, 1147282, 1142817,\n", + " 1142816, 1138660, 1140348, 1142629, 1149366, 1138927, 1136836, 1139306,\n", + " 1139329, 1139328, 1142159, 1145427, 1143345, 1137098, 1144088, 1135876,\n", + " 1135813, 1150300, 1150919, 1146514, 1146523, 1146526, 1143958, 1143457,\n", + " 1140823, 1147574, 1147521, 1140352, 1140364, 1137990, 1143075, 1144725,\n", + " 1144219, 1147999, 1134902, 1139252, 1139249, 1147127, 1147131, 1148704,\n", + " 1141836, 1147056, 1147066, 1149714, 1149718, 1149722, 1145012, 1139549,\n", + " 1158226, 1145237, 1145750, 1138638, 1146178, 1152530, 1151182, 1150445,\n", + " 1154998, 1150339, 1144203, 1151991, 1151994, 1165252, 1151480, 1151473,\n", + " 1154260, 1145261, 1145262, 1142286, 1150127, 1148278, 1147023, 1158959,\n", + " 1141189, 1144819, 1137636, 1153574, 1154979, 1143560, 1148288, 1135083,\n", + " 1147866, 1154420, 1148180, 1136249, 1136247, 1146684, 1157983, 1148720,\n", + " 1148729, 1144110, 1146544, 1139950, 1148204, 1153124, 1153188, 1145104,\n", + " 1152915, 1152921, 1150935, 1144863, 1144851, 1155088, 1151816, 1152581,\n", + " 1152586, 1154183, 1148505, 1148510, 1146565, 1141420, 1145086, 1149385,\n", + " 1150894, 1146969, 1146975, 1150219, 1146623, 1151694, 1151401, 1151403,\n", + " 1144472, 1156334, 1153029, 1153030, 1153026, 1137746, 1137755, 1146307,\n", + " 1152622, 1140517, 1140524, 1152816, 1152826, 1154123, 1157839, 1152673,\n", + " 1152686, 1151617, 1150578, 1145278, 1136794, 1153387, 1138989, 1152341,\n", + " 1153311, 1138281, 1156004, 1156001, 1136028, 1158704, 1140674, 1140684,\n", + " 1155786, 1156387, 1156399, 1150099, 1137403, 1149269, 1149273, 1148040,\n", + " 1161207, 1149300, 1152601, 1174935, 1148628, 1158530, 1149947, 1135698,\n", + " 1155376, 1142047, 1150967, 1150972, 1158854, 1150877, 1152833, 1143491,\n", + " 1150465, 1135219, 1135730, 1152179, 1152191, 1152182, 1151788, 1139525,\n", + " 1158306, 1158308, 1158311, 1151340, 1155441, 1161738, 1150132, 1154529,\n", + " 1156919, 1138775, 1151379, 1158628, 1155122, 1152527, 1149504, 1155755,\n", + " 1145793, 1156463, 1158096, 1168230, 1155626, 1155628, 1156563, 1158824,\n", + " 1158829, 1158325, 1148837, 1148650, 1155646, 1154240, 1157430, 1155606,\n", + " 1155615, 1145713, 1150983, 1143517, 1157288, 1137152, 1153776, 1159116,\n", + " 1135601, 1135605, 1150671, 1155852, 1158665, 1138216, 1149145, 1140634,\n", + " 1140633, 1159213, 1155439, 1156692, 1156693, 1160749, 1157741, 1157735,\n", + " 1157028, 1144843, 1155971, 1155975, 1156948, 1153766, 1158846, 1156811,\n", + " 1149696, 1154592, 1166126, 1160164, 1180771, 1136896, 1158753, 1140221,\n", + " 1158803, 1158285, 1151602, 1136494, 1136491, 1156490, 1153808, 1136640,\n", + " 1136646, 1166424, 1158558, 1165778, 1155856, 1155521, 1161539, 1142487,\n", + " 1142493, 1159042, 1159052, 1142420, 1157945, 1153052, 1153045, 1163072,\n", + " 1155763, 1156226, 1156104, 1138393, 1142687, 1142685, 1150046, 1150041,\n", + " 1149063, 1149070, 1153514, 1153519, 1164859, 1147300, 1138161, 1164006,\n", + " 1139776, 1164901, 1163396, 1163381, 1154590, 1139284, 1139286, 1166073,\n", + " 1148771, 1146063, 1159931, 1170415, 1148603, 1143143, 1158653, 1156178,\n", + " 1159025, 1160893, 1168129, 1152247, 1178146, 1155588, 1165993, 1188677,\n", + " 1138674, 1138685, 1148571, 1158405, 1144977, 1146500, 1146510, 1146509,\n", + " 1161239, 1161240, 1144737, 1152776, 1155279, 1147426, 1160849, 1168748,\n", + " 1140112, 1164741, 1142722, 1142733, 1156300, 1148683, 1163935, 1145228,\n", + " 1146042, 1166462, 1138952, 1150533, 1144972, 1144973, 1147681, 1147689,\n", + " 1147691, 1147355, 1152630, 1139359, 1193481, 1145902, 1153520, 1181049,\n", + " 1175240, 1143404, 1169741, 1168755, 1147331, 1147334, 1147338, 1163640,\n", + " 1144690, 1151587, 1151598, 1167817, 1155183, 1150522, 1150518, 1167915,\n", + " 1156119, 1161781, 1144346, 1144336, 1157534, 1147750, 1154670, 1154893,\n", + " 1157331, 1157333, 1141043, 1169359, 1149452, 1138609, 1149688, 1158611,\n", + " 1158623, 1172574, 1149847, 1172295, 1178728, 1155502, 1152353, 1168462,\n", + " 1143859, 1166488, 1192139, 1149393, 1148335, 1169271, 1173307, 1145033,\n", + " 1154018, 1154027, 1152145, 1152150, 1153758, 1178102, 1151208, 1151697,\n", + " 1157153, 1157371, 1167243, 1147711, 1148131, 1169913, 1157593, 1166827,\n", + " 1169037, 1172961, 1168604, 1179699, 1146757, 1170335, 1140326, 1170018,\n", + " 1172601, 1174845, 1150234, 1150238, 1154148, 1167517, 1149173, 1170465,\n", + " 1167657, 1168481, 1179243, 1171297, 1153141, 1181489, 1180818, 1179807,\n", + " 1158030, 1180200, 1166554, 1155262, 1157792, 1157795, 1151488, 1172546,\n", + " 1171623, 1155804, 1180036, 1179540, 1182596, 1153889, 1153898, 1145626,\n", + " 1156446, 1177743, 1149755, 1153609, 1186957, 1155990, 1173137, 1158771,\n", + " 1181190, 1155892, 1157270, 1182785, 1183071, 1168273, 1168282, 1164798,\n", + " 1168889, 1184536, 1162253, 1163422, 1165082, 1161819, 1147181, 1172636,\n", + " 1170034, 1182158, 1181561, 1139828, 1139831, 1150265, 1154812, 1184377,\n", + " 1156055, 1151978, 1173019, 1194204, 1149536, 1188371, 1186736, 1188156,\n", + " 1187040, 1167435, 1171358, 1140992, 1141003, 1192614, 1193696, 1179410,\n", + " 1190455, 1171462, 1191604, 1162497, 1176041, 1169700, 1194292, 1171201,\n", + " 1172984, 1145395, 1155962, 1172187, 1185938, 1188350, 1189075, 1188749,\n", + " 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1137212, 1141424, 1140282, 1140284, 1135926, 1135160, 1135727,\n", + " 1140785, 1139701, 1141758, 1137506, 1138335, 1136208, 1136213, 1136155,\n", + " 1136965, 1136969, 1138903, 1151164, 1143609, 1149836, 1139811, 1154774,\n", + " 1145370, 1146991, 1137274, 1138933, 1146426, 1139140, 1143372, 1150390,\n", + " 1146641, 1139957, 1150497, 1145288, 1149216, 1143820, 1147483, 1135991,\n", + " 1149290, 1144636, 1148347, 1148546, 1153217, 1137220, 1139373, 1136677,\n", + " 1150329, 1151546, 1140531, 1140535, 1140540, 1138112, 1137254, 1137172,\n", + " 1149461, 1153463, 1140158, 1134735, 1140020, 1135367, 1135202, 1135210,\n", + " 1136047, 1134969, 1141036, 1136770, 1134791, 1134794, 1157443, 1137329,\n", + " 1136178, 1143064, 1157103, 1137693, 1136826, 1136928, 1156159, 1139153,\n", + " 1139161, 1134841, 1141703, 1142602, 1136111, 1140240, 1140970, 1138514,\n", + " 1138527, 1137953, 1154132, 1136985, 1156899, 1135522, 1135535, 1139685,\n", + " 1138311, 1136357, 1139878, 1138440, 1138461, 1137493, 1136594, 1149328,\n", + " 1142611, 1142615, 1145843, 1148531, 1139667, 1139673, 1138067, 1138069,\n", + " 1142255, 1136087, 1134992, 1142788, 1148805, 1153543, 1138148, 1141963,\n", + " 1134888, 1146077, 1146075, 1140557, 1152042, 1152044, 1139063, 1140657,\n", + " 1137734, 1137728, 1147317, 1140901, 1134738, 1134742, 1134750, 1135549,\n", + " 1141095, 1141098, 1154860, 1143224, 1143225, 1143229, 1149982, 1146834,\n", + " 1152719, 1135860, 1136625, 1136632, 1141106, 1141223, 1141891, 1163306,\n", + " 1136917, 1139742, 1143678, 1137188, 1139495, 1141609, 1144650, 1147850,\n", + " 1143153, 1140163, 1158749, 1141479, 1138710, 1138708, 1142913, 1143107,\n", + " 1143113, 1144445, 1144596, 1142455, 1142451, 1136864, 1145298, 1144182,\n", + " 1137611, 1150906, 1161093, 1139559, 1139560, 1158703, 1147153, 1141367,\n", + " 1140815, 1149088, 1149097, 1139019, 1144279, 1139510, 1139655, 1138815,\n", + " 1144998, 1145000, 1143779, 1140977, 1140990, 1146693, 1146695, 1147050,\n", + " 1143543, 1152976, 1139450, 1141925, 1141929, 1146901, 1144242, 1145339,\n", + " 1140580, 1150253, 1140689, 1136891, 1139405, 1143643, 1145980, 1143851,\n", + " 1146024, 1146140, 1154328, 1142533, 1149928, 1139990, 1143293, 1143283,\n", + " 1143294, 1143290, 1150418, 1147543, 1147540, 1148763, 1147282, 1142817,\n", + " 1142816, 1138660, 1140348, 1142629, 1149366, 1138927, 1136836, 1139306,\n", + " 1139329, 1139328, 1142159, 1145427, 1143345, 1137098, 1144088, 1135876,\n", + " 1135813, 1150300, 1150919, 1146514, 1146523, 1146526, 1143958, 1143457,\n", + " 1140823, 1147574, 1147521, 1140352, 1140364, 1137990, 1143075, 1144725,\n", + " 1144219, 1147999, 1134902, 1139252, 1139249, 1147127, 1147131, 1148704,\n", + " 1141836, 1147056, 1147066, 1149714, 1149718, 1149722, 1145012, 1139549,\n", + " 1158226, 1145237, 1145750, 1138638, 1146178, 1152530, 1151182, 1150445,\n", + " 1154998, 1150339, 1144203, 1151991, 1151994, 1165252, 1151480, 1151473,\n", + " 1154260, 1145261, 1145262, 1142286, 1150127, 1148278, 1147023, 1158959,\n", + " 1141189, 1144819, 1137636, 1153574, 1154979, 1143560, 1148288, 1135083,\n", + " 1147866, 1154420, 1148180, 1136249, 1136247, 1146684, 1157983, 1148720,\n", + " 1148729, 1144110, 1146544, 1139950, 1148204, 1153124, 1153188, 1145104,\n", + " 1152915, 1152921, 1150935, 1144863, 1144851, 1155088, 1151816, 1152581,\n", + " 1152586, 1154183, 1148505, 1148510, 1146565, 1141420, 1145086, 1149385,\n", + " 1150894, 1146969, 1146975, 1150219, 1146623, 1151694, 1151401, 1151403,\n", + " 1144472, 1156334, 1153029, 1153030, 1153026, 1137746, 1137755, 1146307,\n", + " 1152622, 1140517, 1140524, 1152816, 1152826, 1154123, 1157839, 1152673,\n", + " 1152686, 1151617, 1150578, 1145278, 1136794, 1153387, 1138989, 1152341,\n", + " 1153311, 1138281, 1156004, 1156001, 1136028, 1158704, 1140674, 1140684,\n", + " 1155786, 1156387, 1156399, 1150099, 1137403, 1149269, 1149273, 1148040,\n", + " 1161207, 1149300, 1152601, 1174935, 1148628, 1158530, 1149947, 1135698,\n", + " 1155376, 1142047, 1150967, 1150972, 1158854, 1150877, 1152833, 1143491,\n", + " 1150465, 1135219, 1135730, 1152179, 1152191, 1152182, 1151788, 1139525,\n", + " 1158306, 1158308, 1158311, 1151340, 1155441, 1161738, 1150132, 1154529,\n", + " 1156919, 1138775, 1151379, 1158628, 1155122, 1152527, 1149504, 1155755,\n", + " 1145793, 1156463, 1158096, 1168230, 1155626, 1155628, 1156563, 1158824,\n", + " 1158829, 1158325, 1148837, 1148650, 1155646, 1154240, 1157430, 1155606,\n", + " 1155615, 1145713, 1150983, 1143517, 1157288, 1137152, 1153776, 1159116,\n", + " 1135601, 1135605, 1150671, 1155852, 1158665, 1138216, 1149145, 1140634,\n", + " 1140633, 1159213, 1155439, 1156692, 1156693, 1160749, 1157741, 1157735,\n", + " 1157028, 1144843, 1155971, 1155975, 1156948, 1153766, 1158846, 1156811,\n", + " 1149696, 1154592, 1166126, 1160164, 1180771, 1136896, 1158753, 1140221,\n", + " 1158803, 1158285, 1151602, 1136494, 1136491, 1156490, 1153808, 1136640,\n", + " 1136646, 1166424, 1158558, 1165778, 1155856, 1155521, 1161539, 1142487,\n", + " 1142493, 1159042, 1159052, 1142420, 1157945, 1153052, 1153045, 1163072,\n", + " 1155763, 1156226, 1156104, 1138393, 1142687, 1142685, 1150046, 1150041,\n", + " 1149063, 1149070, 1153514, 1153519, 1164859, 1147300, 1138161, 1164006,\n", + " 1139776, 1164901, 1163396, 1163381, 1154590, 1139284, 1139286, 1166073,\n", + " 1148771, 1146063, 1159931, 1170415, 1148603, 1143143, 1158653, 1156178,\n", + " 1159025, 1160893, 1168129, 1152247, 1178146, 1155588, 1165993, 1188677,\n", + " 1138674, 1138685, 1148571, 1158405, 1144977, 1146500, 1146510, 1146509,\n", + " 1161239, 1161240, 1144737, 1152776, 1155279, 1147426, 1160849, 1168748,\n", + " 1140112, 1164741, 1142722, 1142733, 1156300, 1148683, 1163935, 1145228,\n", + " 1146042, 1166462, 1138952, 1150533, 1144972, 1144973, 1147681, 1147689,\n", + " 1147691, 1147355, 1152630, 1139359, 1193481, 1145902, 1153520, 1181049,\n", + " 1175240, 1143404, 1169741, 1168755, 1147331, 1147334, 1147338, 1163640,\n", + " 1144690, 1151587, 1151598, 1167817, 1155183, 1150522, 1150518, 1167915,\n", + " 1156119, 1161781, 1144346, 1144336, 1157534, 1147750, 1154670, 1154893,\n", + " 1157331, 1157333, 1141043, 1169359, 1149452, 1138609, 1149688, 1158611,\n", + " 1158623, 1172574, 1149847, 1172295, 1178728, 1155502, 1152353, 1168462,\n", + " 1143859, 1166488, 1192139, 1149393, 1148335, 1169271, 1173307, 1145033,\n", + " 1154018, 1154027, 1152145, 1152150, 1153758, 1178102, 1151208, 1151697,\n", + " 1157153, 1157371, 1167243, 1147711, 1148131, 1169913, 1157593, 1166827,\n", + " 1169037, 1172961, 1168604, 1179699, 1146757, 1170335, 1140326, 1170018,\n", + " 1172601, 1174845, 1150234, 1150238, 1154148, 1167517, 1149173, 1170465,\n", + " 1167657, 1168481, 1179243, 1171297, 1153141, 1181489, 1180818, 1179807,\n", + " 1158030, 1180200, 1166554, 1155262, 1157792, 1157795, 1151488, 1172546,\n", + " 1171623, 1155804, 1180036, 1179540, 1182596, 1153889, 1153898, 1145626,\n", + " 1156446, 1177743, 1149755, 1153609, 1186957, 1155990, 1173137, 1158771,\n", + " 1181190, 1155892, 1157270, 1182785, 1183071, 1168273, 1168282, 1164798,\n", + " 1168889, 1184536, 1162253, 1163422, 1165082, 1161819, 1147181, 1172636,\n", + " 1170034, 1182158, 1181561, 1139828, 1139831, 1150265, 1154812, 1184377,\n", + " 1156055, 1151978, 1173019, 1194204, 1149536, 1188371, 1186736, 1188156,\n", + " 1187040, 1167435, 1171358, 1140992, 1141003, 1192614, 1193696, 1179410,\n", + " 1190455, 1171462, 1191604, 1162497, 1176041, 1169700, 1194292, 1171201,\n", + " 1172984, 1145395, 1155962, 1172187, 1185938, 1188350, 1189075, 1188749,\n", + " 1157022], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1198769, 1198248, 1198726, 1198730, 1199282, 1198449, 1202255, 1201577,\n", + " 1201462, 1194626, 1201016, 1197350, 1198633, 1194866, 1196685, 1196624,\n", + " 1194648, 1195511, 1195263, 1196534, 1196539, 1201992, 1196030, 1196031,\n", + " 1198543, 1197697, 1197701, 1195888, 1199172, 1195740, 1196977, 1196988,\n", + " 1194752, 1195989, 1197807, 1195571, 1198650, 1198167, 1196704, 1196711,\n", + " 1196708, 1199823, 1195148, 1195221, 1195265, 1195278, 1197141, 1196242,\n", + " 1197265, 1197273, 1196109, 1196747, 1195841, 1198915, 1197474, 1197256,\n", + " 1196283, 1196272, 1195353, 1199856, 1199060, 1199059, 1197291, 1199185,\n", + " 1199685, 1199621, 1199628, 1200076, 1200869, 1199152, 1199154, 1198406,\n", + " 1199231, 1197609, 1197962, 1196727, 1195773, 1202618, 1198428, 1199492,\n", + " 1200592, 1198811, 1199555, 1201827, 1200450, 1200507, 1198066, 1196474,\n", + " 1202630, 1201405, 1201042, 1202499, 1201737, 1200526, 1202035, 1200557,\n", + " 1197097, 1197040, 1199917, 1201442, 1201029, 1201291, 1195607, 1195610,\n", + " 1201871, 1202209, 1202210, 1199925, 1202304, 1200997, 1200785, 1199606,\n", + " 1195679, 1198055, 1196929, 1198929, 1195415, 1195181, 1195379, 1197816,\n", + " 1197822, 1197821, 1196602, 1199659, 1203102, 1198147, 1200003, 1197735,\n", + " 1199786, 1199787, 1198819, 1200974, 1195066, 1197652, 1195165, 1202515,\n", + " 1201767], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1198769, 1198248, 1198726, 1198730, 1199282, 1198449, 1202255, 1201577,\n", + " 1201462, 1194626, 1201016, 1197350, 1198633, 1194866, 1196685, 1196624,\n", + " 1194648, 1195511, 1195263, 1196534, 1196539, 1201992, 1196030, 1196031,\n", + " 1198543, 1197697, 1197701, 1195888, 1199172, 1195740, 1196977, 1196988,\n", + " 1194752, 1195989, 1197807, 1195571, 1198650, 1198167, 1196704, 1196711,\n", + " 1196708, 1199823, 1195148, 1195221, 1195265, 1195278, 1197141, 1196242,\n", + " 1197265, 1197273, 1196109, 1196747, 1195841, 1198915, 1197474, 1197256,\n", + " 1196283, 1196272, 1195353, 1199856, 1199060, 1199059, 1197291, 1199185,\n", + " 1199685, 1199621, 1199628, 1200076, 1200869, 1199152, 1199154, 1198406,\n", + " 1199231, 1197609, 1197962, 1196727, 1195773, 1202618, 1198428, 1199492,\n", + " 1200592, 1198811, 1199555, 1201827, 1200450, 1200507, 1198066, 1196474,\n", + " 1202630, 1201405, 1201042, 1202499, 1201737, 1200526, 1202035, 1200557,\n", + " 1197097, 1197040, 1199917, 1201442, 1201029, 1201291, 1195607, 1195610,\n", + " 1201871, 1202209, 1202210, 1199925, 1202304, 1200997, 1200785, 1199606,\n", + " 1195679, 1198055, 1196929, 1198929, 1195415, 1195181, 1195379, 1197816,\n", + " 1197822, 1197821, 1196602, 1199659, 1203102, 1198147, 1200003, 1197735,\n", + " 1199786, 1199787, 1198819, 1200974, 1195066, 1197652, 1195165, 1202515,\n", + " 1201767], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 2.6747e-01, -8.0558e-04, 8.1362e-01, ..., 4.1754e-02,\n", + " -1.5200e-03, -6.0046e-03],\n", + " [ 1.5725e-01, -4.5858e-04, 5.4450e-01, ..., 7.5717e-02,\n", + " -1.7001e-03, -4.0324e-03],\n", + " [ 1.3563e-01, -5.4117e-04, 5.5234e-01, ..., 8.7463e-02,\n", + " -1.6226e-03, -3.9101e-03],\n", + " ...,\n", + " [ 2.5388e-01, -5.7127e-04, 7.5783e-01, ..., 4.3298e-02,\n", + " -1.4866e-03, -5.5421e-03],\n", + " [ 1.2778e-01, -2.7616e-04, 4.8768e-01, ..., 7.6281e-02,\n", + " -1.8072e-03, -3.7341e-03],\n", + " [ 1.2269e-01, -3.0684e-04, 4.5864e-01, ..., 6.5743e-02,\n", + " -1.7750e-03, -3.4676e-03]], device='cuda:0'), 'paper': tensor([[-6.3423e-03, 3.5338e-01, 9.1331e-01, ..., -6.3811e-03,\n", + " -1.8274e-02, -7.7429e-03],\n", + " [-4.6153e-03, 2.9265e+00, 2.0027e+00, ..., 2.3947e+00,\n", + " -3.7655e-02, 1.3429e+00],\n", + " [-1.2416e-02, 1.1597e+00, 1.5391e+00, ..., -1.4654e-02,\n", + " -2.5999e-02, -2.0185e-02],\n", + " ...,\n", + " [-2.6107e-02, -6.1798e-03, 2.6576e+00, ..., -1.1013e-02,\n", + " -3.1943e-02, -3.7584e-02],\n", + " [ 2.2506e-02, 2.6271e+00, 2.8290e+00, ..., 2.7378e+00,\n", + " -4.3854e-02, 2.2001e+00],\n", + " [-6.2701e-03, 3.6798e+00, 2.4605e+00, ..., 5.0815e+00,\n", + " -5.3220e-02, 3.0448e+00]], device='cuda:0'), 'author': tensor([[-1.5582e-03, 2.4329e-01, 1.5596e-01, ..., 1.2515e+00,\n", + " 3.2803e-01, -9.1824e-04],\n", + " [-1.0873e-03, 2.2947e-01, 1.0241e-01, ..., 1.2715e+00,\n", + " 3.5710e-01, -5.6638e-04],\n", + " [-4.2047e-03, 3.2513e-01, 1.8955e-01, ..., 1.3474e+00,\n", + " -1.3911e-03, -4.8921e-03],\n", + " ...,\n", + " [-6.2887e-04, 2.1184e-01, 1.6656e-01, ..., 1.2986e+00,\n", + " 4.1464e-01, -1.2159e-04],\n", + " [-1.4809e-03, 1.3695e-01, 2.2225e-01, ..., 1.2052e+00,\n", + " 2.6991e-01, -1.1868e-03],\n", + " [-1.2912e-03, 1.9385e-01, 1.6704e-01, ..., 1.2619e+00,\n", + " 3.1830e-01, -9.1764e-04]], device='cuda:0'), 'field_of_study': tensor([[-0.0030, 0.7294, 0.1969, ..., -0.0078, 0.4855, 0.5329],\n", + " [-0.0027, 0.5650, 0.1075, ..., -0.0073, 0.3706, 0.5036],\n", + " [-0.0024, 0.5567, 0.1593, ..., -0.0077, 0.4473, 0.4418],\n", + " ...,\n", + " [-0.0032, 0.5551, 0.1574, ..., -0.0076, 0.3468, 0.4099],\n", + " [-0.0027, 0.6014, 0.1635, ..., -0.0081, 0.3621, 0.5308],\n", + " [ 0.1477, 0.7909, 0.4268, ..., -0.0130, 0.5362, 0.1401]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 10, 34, 129, 129, 214, 152, 75, 149, 30, 315, 411, 306,\n", + " 547, 608, 530, 530, 652, 891, 682, 755, 527, 527, 1039, 563,\n", + " 563, 898, 898, 755, 900, 710, 962, 803, 941, 1059, 1059, 1059,\n", + " 1257, 1318, 1073, 1073, 1167, 1167, 1250, 1407, 1407, 1407, 1395, 1390,\n", + " 1274, 1274, 1274, 1273, 1409, 1409, 1379, 1405, 1496, 1590, 1332, 1457,\n", + " 1564, 1332, 1332, 1570, 1533, 1533, 1748, 1918, 1918, 1918, 1610, 1812,\n", + " 1799, 1695, 1781, 1841, 1773, 1732, 1732, 1732, 1732, 1886, 1858, 1935,\n", + " 1967, 1943, 2159, 2159, 2159, 2345, 2098, 2098, 2166, 2109, 2309, 2306,\n", + " 2203, 2211, 2211, 2293, 2293, 2293, 2289, 2530, 2530, 2422, 2440, 2440,\n", + " 2884, 2668, 2645, 2523, 3078, 2948, 2944, 3054, 3054, 3182, 3233, 3175,\n", + " 3100, 3282, 3175, 3478, 3478, 3478, 3478, 3478, 3693, 3774, 3613, 4121,\n", + " 3700, 3829, 4022, 4022, 4230, 4270, 3925, 4003, 4062, 3868, 4319, 4319,\n", + " 4186, 4345, 4345, 4345, 4198, 4390, 4389, 4389, 4427, 4510, 4537, 4602,\n", + " 4598, 4705, 4607, 4607, 4607, 4721, 4810, 4933, 4905, 4825, 5218, 4997,\n", + " 5055, 5218, 5073, 5076, 4963, 5430, 5352, 5687, 5687, 5687, 6226, 5923,\n", + " 5759, 5879, 6128, 5949, 5949, 5871, 5951, 5934, 6124, 6386, 6126, 6126,\n", + " 6461, 6461, 6184, 6184, 6320, 6475, 6202, 6567],\n", + " [ 29, 122, 22, 80, 5, 94, 134, 30, 121, 59, 75, 23,\n", + " 123, 15, 72, 101, 109, 26, 16, 106, 29, 9, 129, 23,\n", + " 25, 44, 94, 62, 71, 50, 4, 17, 2, 13, 25, 42,\n", + " 38, 83, 34, 61, 8, 4, 90, 106, 74, 62, 97, 45,\n", + " 32, 135, 87, 53, 107, 125, 81, 119, 97, 33, 136, 49,\n", + " 120, 11, 113, 63, 43, 75, 29, 85, 97, 60, 120, 133,\n", + " 107, 117, 51, 48, 75, 62, 92, 106, 35, 12, 51, 128,\n", + " 105, 97, 76, 30, 93, 63, 58, 114, 14, 86, 1, 51,\n", + " 46, 55, 120, 117, 62, 106, 51, 34, 61, 37, 61, 34,\n", + " 31, 52, 36, 102, 31, 118, 108, 20, 104, 54, 40, 34,\n", + " 6, 52, 61, 103, 57, 63, 72, 98, 88, 47, 130, 118,\n", + " 56, 116, 19, 58, 41, 21, 130, 84, 73, 28, 89, 39,\n", + " 133, 23, 111, 7, 78, 131, 100, 36, 83, 18, 132, 127,\n", + " 82, 79, 66, 65, 126, 112, 75, 70, 26, 77, 108, 58,\n", + " 3, 95, 124, 107, 115, 68, 53, 27, 75, 119, 106, 42,\n", + " 54, 0, 55, 78, 91, 10, 42, 67, 119, 75, 96, 78,\n", + " 24, 69, 110, 64, 99, 75, 93, 75]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1830, 670, 168, ..., 5914, 4340, 467],\n", + " [ 100, 161, 121, ..., 6627, 6631, 6613]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 113, 62, 58, ..., 86, 35, 85],\n", + " [ 126, 23, 180, ..., 6538, 6594, 6634]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 197, 197, 197, ..., 6555, 6555, 6555],\n", + " [ 120, 13, 221, ..., 446, 673, 271]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 224, 221, 219, ..., 345, 75, 69],\n", + " [ 11, 134, 19, ..., 6660, 6604, 6683]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 461, 3660, 2784, ..., 6308, 5619, 6526],\n", + " [ 31, 11, 10, ..., 6622, 6588, 6615]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 168, 197, 197, ..., 6555, 6555, 6669],\n", + " [ 729, 2, 729, ..., 3137, 1616, 3913]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 10, 10, 10, ..., 6567, 6567, 6567],\n", + " [1878, 2784, 3876, ..., 3577, 3567, 3482]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006418\n", + "sampling 0.006262\n", + "noi time: 0.001147\n", + "get_vertex_data call: 0.037823\n", + "noi group time: 0.003585\n", + "eoi_group_time: 0.015417\n", + "second half: 0.213006\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 27905, 31145, ..., 1100728, 1110064, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 27905, 31145, ..., 1100728, 1110064, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227420, 1231353, 1214597, ..., 1927253, 1937007, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227420, 1231353, 1214597, ..., 1927253, 1937007, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1136230, 1140282, 1140285, 1136349, 1135926, 1138544, 1135726,\n", + " 1137784, 1140785, 1141758, 1138335, 1136223, 1141260, 1136965, 1138897,\n", + " 1151164, 1143600, 1139817, 1139811, 1146983, 1137947, 1143372, 1143363,\n", + " 1139241, 1150395, 1146644, 1139605, 1139615, 1139957, 1150497, 1139865,\n", + " 1148576, 1155683, 1155686, 1155689, 1143820, 1147218, 1135991, 1146992,\n", + " 1134701, 1148350, 1148346, 1146656, 1146661, 1146472, 1153231, 1136742,\n", + " 1147095, 1155014, 1155018, 1139364, 1147211, 1136685, 1150329, 1134710,\n", + " 1134807, 1138745, 1140540, 1138119, 1137252, 1137177, 1134735, 1140020,\n", + " 1140953, 1135367, 1135202, 1135213, 1135903, 1141036, 1134794, 1138504,\n", + " 1157103, 1137693, 1136614, 1139215, 1144395, 1136710, 1157395, 1135265,\n", + " 1148484, 1139161, 1134841, 1141702, 1135828, 1138514, 1153094, 1137953,\n", + " 1135498, 1154128, 1156909, 1139684, 1138319, 1137287, 1138436, 1138440,\n", + " 1138445, 1138461, 1137920, 1137924, 1136594, 1158390, 1138846, 1156606,\n", + " 1147112, 1147116, 1142611, 1135618, 1138177, 1158985, 1145842, 1137108,\n", + " 1159868, 1139667, 1134992, 1152646, 1158971, 1158974, 1139318, 1142905,\n", + " 1153543, 1143621, 1139933, 1137597, 1138151, 1142226, 1134891, 1146070,\n", + " 1146075, 1152044, 1142302, 1140660, 1137734, 1137728, 1134922, 1137001,\n", + " 1135549, 1141098, 1144138, 1149001, 1139889, 1145357, 1141971, 1142021,\n", + " 1136392, 1143767, 1137297, 1143221, 1139025, 1140003, 1149969, 1149979,\n", + " 1149982, 1146832, 1141695, 1161173, 1140469, 1141223, 1139386, 1141648,\n", + " 1136912, 1136917, 1139730, 1143673, 1143676, 1144237, 1141785, 1141786,\n", + " 1136760, 1134979, 1136853, 1147850, 1138490, 1142056, 1142053, 1143158,\n", + " 1140160, 1140169, 1158749, 1149111, 1148872, 1143574, 1139190, 1141479,\n", + " 1137062, 1140110, 1142575, 1143107, 1144596, 1157411, 1136867, 1136864,\n", + " 1141579, 1141392, 1140432, 1144182, 1150906, 1139559, 1140501, 1137846,\n", + " 1147153, 1136378, 1142640, 1141375, 1151114, 1140801, 1140806, 1149090,\n", + " 1149097, 1149101, 1139013, 1144279, 1139510, 1139127, 1145000, 1146693,\n", + " 1146702, 1135047, 1141562, 1147050, 1147047, 1149876, 1143543, 1143551,\n", + " 1143538, 1152976, 1152980, 1152982, 1152988, 1139453, 1139455, 1141925,\n", + " 1146901, 1144242, 1140580, 1141853, 1150243, 1150253, 1148313, 1136891,\n", + " 1143637, 1134861, 1141382, 1143851, 1146005, 1136275, 1146016, 1146024,\n", + " 1146129, 1149928, 1141235, 1139984, 1139990, 1143283, 1151124, 1150418,\n", + " 1143883, 1147543, 1147540, 1148763, 1147282, 1149372, 1148003, 1149608,\n", + " 1143051, 1143053, 1143040, 1136160, 1157717, 1157720, 1136836, 1139329,\n", + " 1139341, 1144778, 1139053, 1142159, 1143345, 1143355, 1144611, 1138600,\n", + " 1135876, 1135818, 1135813, 1150294, 1146514, 1146523, 1143457, 1143937,\n", + " 1143947, 1140816, 1149073, 1143798, 1143803, 1147521, 1140364, 1149581,\n", + " 1137990, 1143082, 1149489, 1144213, 1144222, 1147984, 1147999, 1134899,\n", + " 1134902, 1139252, 1147244, 1148704, 1148715, 1141825, 1146751, 1148473,\n", + " 1153701, 1152323, 1149718, 1147038, 1141124, 1141127, 1139549, 1158226,\n", + " 1149871, 1141137, 1154526, 1151646, 1145237, 1145750, 1146153, 1138632,\n", + " 1148389, 1148397, 1146178, 1148217, 1152537, 1151182, 1150445, 1149250,\n", + " 1147966, 1151856, 1144526, 1141349, 1146887, 1152013, 1147794, 1147807,\n", + " 1151482, 1151473, 1152023, 1152028, 1145256, 1145262, 1135504, 1146723,\n", + " 1140573, 1147021, 1158949, 1141949, 1141193, 1141269, 1150728, 1148744,\n", + " 1137640, 1147649, 1143560, 1168497, 1148288, 1148300, 1135083, 1148623,\n", + " 1147866, 1139096, 1154420, 1148180, 1139718, 1146674, 1146686, 1138864,\n", + " 1157968, 1151566, 1148720, 1148724, 1148725, 1148731, 1146559, 1150052,\n", + " 1143895, 1154206, 1153192, 1153188, 1153197, 1145104, 1145107, 1159828,\n", + " 1152921, 1150935, 1143092, 1150352, 1150356, 1155095, 1148095, 1152584,\n", + " 1151906, 1154183, 1154190, 1150708, 1146565, 1151344, 1151356, 1155161,\n", + " 1153441, 1145079, 1145080, 1146975, 1156402, 1149359, 1150213, 1146623,\n", + " 1144476, 1152849, 1154052, 1154063, 1152100, 1152103, 1146280, 1146287,\n", + " 1156325, 1153028, 1153037, 1153038, 1145539, 1137746, 1146307, 1159974,\n", + " 1152622, 1140521, 1155337, 1154119, 1154124, 1157826, 1151573, 1164761,\n", + " 1151617, 1145278, 1136134, 1148916, 1152958, 1140460, 1140457, 1140459,\n", + " 1150617, 1167153, 1145952, 1152225, 1138982, 1152341, 1146816, 1138272,\n", + " 1138281, 1152294, 1156002, 1158704, 1156608, 1152928, 1151064, 1156396,\n", + " 1156422, 1150097, 1150100, 1150159, 1150164, 1148040, 1152601, 1152602,\n", + " 1155222, 1144669, 1137047, 1137048, 1148628, 1158530, 1148379, 1137469,\n", + " 1137458, 1154572, 1135698, 1155385, 1155376, 1139225, 1157218, 1157229,\n", + " 1157547, 1142385, 1158854, 1156501, 1157064, 1157069, 1155422, 1152833,\n", + " 1137809, 1137819, 1150465, 1146854, 1135729, 1135730, 1138830, 1156629,\n", + " 1157912, 1156940, 1153410, 1153413, 1135645, 1135647, 1135634, 1147810,\n", + " 1151466, 1139525, 1158304, 1158308, 1158311, 1155441, 1161732, 1153359,\n", + " 1150136, 1162112, 1153990, 1142755, 1156207, 1151379, 1155374, 1155375,\n", + " 1155122, 1152527, 1149321, 1155755, 1155756, 1151425, 1135406, 1146920,\n", + " 1145794, 1145793, 1156460, 1154763, 1155628, 1155629, 1155631, 1154550,\n", + " 1158819, 1158824, 1158321, 1157001, 1148836, 1148835, 1148646, 1160950,\n", + " 1161231, 1161287, 1157499, 1154250, 1154240, 1162190, 1139620, 1151312,\n", + " 1154902, 1154909, 1154903, 1179437, 1143189, 1150371, 1153326, 1157439,\n", + " 1157430, 1155606, 1141627, 1150981, 1157928, 1158578, 1153786, 1137385,\n", + " 1159116, 1145690, 1135601, 1148159, 1150671, 1155855, 1155848, 1157684,\n", + " 1149145, 1140633, 1152209, 1159213, 1167618, 1140377, 1140381, 1140375,\n", + " 1155884, 1157733, 1144836, 1142466, 1155970, 1155975, 1155978, 1153766,\n", + " 1156811, 1161897, 1175275, 1149709, 1154600, 1136896, 1158886, 1140213,\n", + " 1140215, 1140221, 1158815, 1155233, 1151615, 1136494, 1147599, 1152143,\n", + " 1153808, 1136640, 1162898, 1163119, 1134757, 1145484, 1157858, 1157864,\n", + " 1146123, 1146126, 1155521, 1155529, 1155535, 1161539, 1137552, 1164273,\n", + " 1142666, 1157747, 1157751, 1159042, 1159052, 1159054, 1159057, 1159144,\n", + " 1157945, 1153052, 1159738, 1162835, 1166256, 1159361, 1153841, 1156107,\n", + " 1138393, 1160651, 1150046, 1149063, 1145948, 1155479, 1151019, 1153504,\n", + " 1147298, 1146876, 1164997, 1138161, 1164006, 1156795, 1149963, 1154590,\n", + " 1154578, 1165760, 1136806, 1146063, 1165309, 1140650, 1140643, 1148607,\n", + " 1143139, 1143143, 1159646, 1163201, 1141792, 1141800, 1158653, 1156181,\n", + " 1159025, 1159032, 1165875, 1169112, 1152247, 1166735, 1155588, 1144977,\n", + " 1146500, 1146509, 1170996, 1164580, 1169252, 1161243, 1144737, 1144739,\n", + " 1152776, 1155272, 1141471, 1141459, 1151650, 1147433, 1157052, 1156737,\n", + " 1156739, 1156742, 1156744, 1160849, 1160856, 1160717, 1150642, 1163260,\n", + " 1171040, 1144812, 1168850, 1164741, 1180506, 1180496, 1142722, 1142733,\n", + " 1156303, 1166134, 1145183, 1145228, 1160232, 1154700, 1166462, 1144972,\n", + " 1142140, 1148175, 1191932, 1147356, 1152624, 1152626, 1148124, 1139351,\n", + " 1145902, 1153520, 1151752, 1152200, 1143395, 1171867, 1158723, 1158724,\n", + " 1158722, 1167503, 1168764, 1167315, 1147338, 1144702, 1150773, 1145502,\n", + " 1151598, 1162893, 1166653, 1155172, 1180418, 1150515, 1150518, 1156117,\n", + " 1156118, 1144336, 1157534, 1154670, 1152998, 1157331, 1138130, 1138142,\n", + " 1141048, 1151674, 1169359, 1149452, 1138609, 1149688, 1158623, 1158618,\n", + " 1157380, 1157384, 1157385, 1157388, 1170532, 1171479, 1170463, 1152353,\n", + " 1152360, 1152546, 1166486, 1148667, 1193759, 1165911, 1172668, 1173307,\n", + " 1145033, 1154019, 1154027, 1154028, 1177795, 1159651, 1167859, 1167867,\n", + " 1157153, 1172111, 1155468, 1157375, 1147711, 1148131, 1148140, 1147925,\n", + " 1177415, 1135018, 1154311, 1172961, 1163027, 1155738, 1155739, 1168817,\n", + " 1168593, 1160990, 1140326, 1166351, 1172932, 1166682, 1175906, 1154148,\n", + " 1169409, 1179965, 1158176, 1149169, 1179245, 1180545, 1153803, 1179918,\n", + " 1187244, 1175540, 1182651, 1179807, 1161255, 1161262, 1162129, 1155262,\n", + " 1154718, 1157792, 1157803, 1179166, 1151488, 1171629, 1171623, 1155796,\n", + " 1185047, 1157999, 1157991, 1176754, 1180089, 1192692, 1153889, 1153898,\n", + " 1145626, 1156436, 1156443, 1180383, 1182632, 1161906, 1161911, 1149744,\n", + " 1149755, 1153601, 1153609, 1179947, 1181141, 1158513, 1158940, 1179058,\n", + " 1158380, 1187927, 1155892, 1155899, 1162690, 1140399, 1168280, 1171587,\n", + " 1188240, 1168533, 1159331, 1164228, 1164231, 1161819, 1167977, 1141516,\n", + " 1164133, 1181486, 1170822, 1139831, 1150265, 1149668, 1181876, 1156049,\n", + " 1156055, 1146394, 1191738, 1190838, 1189443, 1172478, 1182750, 1148792,\n", + " 1191825, 1189902, 1189256, 1178072, 1187692, 1151774, 1153733, 1193876,\n", + " 1192487, 1169786, 1179006, 1171201, 1150406, 1158064, 1181621, 1172718,\n", + " 1155959, 1186071, 1157008], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1136230, 1140282, 1140285, 1136349, 1135926, 1138544, 1135726,\n", + " 1137784, 1140785, 1141758, 1138335, 1136223, 1141260, 1136965, 1138897,\n", + " 1151164, 1143600, 1139817, 1139811, 1146983, 1137947, 1143372, 1143363,\n", + " 1139241, 1150395, 1146644, 1139605, 1139615, 1139957, 1150497, 1139865,\n", + " 1148576, 1155683, 1155686, 1155689, 1143820, 1147218, 1135991, 1146992,\n", + " 1134701, 1148350, 1148346, 1146656, 1146661, 1146472, 1153231, 1136742,\n", + " 1147095, 1155014, 1155018, 1139364, 1147211, 1136685, 1150329, 1134710,\n", + " 1134807, 1138745, 1140540, 1138119, 1137252, 1137177, 1134735, 1140020,\n", + " 1140953, 1135367, 1135202, 1135213, 1135903, 1141036, 1134794, 1138504,\n", + " 1157103, 1137693, 1136614, 1139215, 1144395, 1136710, 1157395, 1135265,\n", + " 1148484, 1139161, 1134841, 1141702, 1135828, 1138514, 1153094, 1137953,\n", + " 1135498, 1154128, 1156909, 1139684, 1138319, 1137287, 1138436, 1138440,\n", + " 1138445, 1138461, 1137920, 1137924, 1136594, 1158390, 1138846, 1156606,\n", + " 1147112, 1147116, 1142611, 1135618, 1138177, 1158985, 1145842, 1137108,\n", + " 1159868, 1139667, 1134992, 1152646, 1158971, 1158974, 1139318, 1142905,\n", + " 1153543, 1143621, 1139933, 1137597, 1138151, 1142226, 1134891, 1146070,\n", + " 1146075, 1152044, 1142302, 1140660, 1137734, 1137728, 1134922, 1137001,\n", + " 1135549, 1141098, 1144138, 1149001, 1139889, 1145357, 1141971, 1142021,\n", + " 1136392, 1143767, 1137297, 1143221, 1139025, 1140003, 1149969, 1149979,\n", + " 1149982, 1146832, 1141695, 1161173, 1140469, 1141223, 1139386, 1141648,\n", + " 1136912, 1136917, 1139730, 1143673, 1143676, 1144237, 1141785, 1141786,\n", + " 1136760, 1134979, 1136853, 1147850, 1138490, 1142056, 1142053, 1143158,\n", + " 1140160, 1140169, 1158749, 1149111, 1148872, 1143574, 1139190, 1141479,\n", + " 1137062, 1140110, 1142575, 1143107, 1144596, 1157411, 1136867, 1136864,\n", + " 1141579, 1141392, 1140432, 1144182, 1150906, 1139559, 1140501, 1137846,\n", + " 1147153, 1136378, 1142640, 1141375, 1151114, 1140801, 1140806, 1149090,\n", + " 1149097, 1149101, 1139013, 1144279, 1139510, 1139127, 1145000, 1146693,\n", + " 1146702, 1135047, 1141562, 1147050, 1147047, 1149876, 1143543, 1143551,\n", + " 1143538, 1152976, 1152980, 1152982, 1152988, 1139453, 1139455, 1141925,\n", + " 1146901, 1144242, 1140580, 1141853, 1150243, 1150253, 1148313, 1136891,\n", + " 1143637, 1134861, 1141382, 1143851, 1146005, 1136275, 1146016, 1146024,\n", + " 1146129, 1149928, 1141235, 1139984, 1139990, 1143283, 1151124, 1150418,\n", + " 1143883, 1147543, 1147540, 1148763, 1147282, 1149372, 1148003, 1149608,\n", + " 1143051, 1143053, 1143040, 1136160, 1157717, 1157720, 1136836, 1139329,\n", + " 1139341, 1144778, 1139053, 1142159, 1143345, 1143355, 1144611, 1138600,\n", + " 1135876, 1135818, 1135813, 1150294, 1146514, 1146523, 1143457, 1143937,\n", + " 1143947, 1140816, 1149073, 1143798, 1143803, 1147521, 1140364, 1149581,\n", + " 1137990, 1143082, 1149489, 1144213, 1144222, 1147984, 1147999, 1134899,\n", + " 1134902, 1139252, 1147244, 1148704, 1148715, 1141825, 1146751, 1148473,\n", + " 1153701, 1152323, 1149718, 1147038, 1141124, 1141127, 1139549, 1158226,\n", + " 1149871, 1141137, 1154526, 1151646, 1145237, 1145750, 1146153, 1138632,\n", + " 1148389, 1148397, 1146178, 1148217, 1152537, 1151182, 1150445, 1149250,\n", + " 1147966, 1151856, 1144526, 1141349, 1146887, 1152013, 1147794, 1147807,\n", + " 1151482, 1151473, 1152023, 1152028, 1145256, 1145262, 1135504, 1146723,\n", + " 1140573, 1147021, 1158949, 1141949, 1141193, 1141269, 1150728, 1148744,\n", + " 1137640, 1147649, 1143560, 1168497, 1148288, 1148300, 1135083, 1148623,\n", + " 1147866, 1139096, 1154420, 1148180, 1139718, 1146674, 1146686, 1138864,\n", + " 1157968, 1151566, 1148720, 1148724, 1148725, 1148731, 1146559, 1150052,\n", + " 1143895, 1154206, 1153192, 1153188, 1153197, 1145104, 1145107, 1159828,\n", + " 1152921, 1150935, 1143092, 1150352, 1150356, 1155095, 1148095, 1152584,\n", + " 1151906, 1154183, 1154190, 1150708, 1146565, 1151344, 1151356, 1155161,\n", + " 1153441, 1145079, 1145080, 1146975, 1156402, 1149359, 1150213, 1146623,\n", + " 1144476, 1152849, 1154052, 1154063, 1152100, 1152103, 1146280, 1146287,\n", + " 1156325, 1153028, 1153037, 1153038, 1145539, 1137746, 1146307, 1159974,\n", + " 1152622, 1140521, 1155337, 1154119, 1154124, 1157826, 1151573, 1164761,\n", + " 1151617, 1145278, 1136134, 1148916, 1152958, 1140460, 1140457, 1140459,\n", + " 1150617, 1167153, 1145952, 1152225, 1138982, 1152341, 1146816, 1138272,\n", + " 1138281, 1152294, 1156002, 1158704, 1156608, 1152928, 1151064, 1156396,\n", + " 1156422, 1150097, 1150100, 1150159, 1150164, 1148040, 1152601, 1152602,\n", + " 1155222, 1144669, 1137047, 1137048, 1148628, 1158530, 1148379, 1137469,\n", + " 1137458, 1154572, 1135698, 1155385, 1155376, 1139225, 1157218, 1157229,\n", + " 1157547, 1142385, 1158854, 1156501, 1157064, 1157069, 1155422, 1152833,\n", + " 1137809, 1137819, 1150465, 1146854, 1135729, 1135730, 1138830, 1156629,\n", + " 1157912, 1156940, 1153410, 1153413, 1135645, 1135647, 1135634, 1147810,\n", + " 1151466, 1139525, 1158304, 1158308, 1158311, 1155441, 1161732, 1153359,\n", + " 1150136, 1162112, 1153990, 1142755, 1156207, 1151379, 1155374, 1155375,\n", + " 1155122, 1152527, 1149321, 1155755, 1155756, 1151425, 1135406, 1146920,\n", + " 1145794, 1145793, 1156460, 1154763, 1155628, 1155629, 1155631, 1154550,\n", + " 1158819, 1158824, 1158321, 1157001, 1148836, 1148835, 1148646, 1160950,\n", + " 1161231, 1161287, 1157499, 1154250, 1154240, 1162190, 1139620, 1151312,\n", + " 1154902, 1154909, 1154903, 1179437, 1143189, 1150371, 1153326, 1157439,\n", + " 1157430, 1155606, 1141627, 1150981, 1157928, 1158578, 1153786, 1137385,\n", + " 1159116, 1145690, 1135601, 1148159, 1150671, 1155855, 1155848, 1157684,\n", + " 1149145, 1140633, 1152209, 1159213, 1167618, 1140377, 1140381, 1140375,\n", + " 1155884, 1157733, 1144836, 1142466, 1155970, 1155975, 1155978, 1153766,\n", + " 1156811, 1161897, 1175275, 1149709, 1154600, 1136896, 1158886, 1140213,\n", + " 1140215, 1140221, 1158815, 1155233, 1151615, 1136494, 1147599, 1152143,\n", + " 1153808, 1136640, 1162898, 1163119, 1134757, 1145484, 1157858, 1157864,\n", + " 1146123, 1146126, 1155521, 1155529, 1155535, 1161539, 1137552, 1164273,\n", + " 1142666, 1157747, 1157751, 1159042, 1159052, 1159054, 1159057, 1159144,\n", + " 1157945, 1153052, 1159738, 1162835, 1166256, 1159361, 1153841, 1156107,\n", + " 1138393, 1160651, 1150046, 1149063, 1145948, 1155479, 1151019, 1153504,\n", + " 1147298, 1146876, 1164997, 1138161, 1164006, 1156795, 1149963, 1154590,\n", + " 1154578, 1165760, 1136806, 1146063, 1165309, 1140650, 1140643, 1148607,\n", + " 1143139, 1143143, 1159646, 1163201, 1141792, 1141800, 1158653, 1156181,\n", + " 1159025, 1159032, 1165875, 1169112, 1152247, 1166735, 1155588, 1144977,\n", + " 1146500, 1146509, 1170996, 1164580, 1169252, 1161243, 1144737, 1144739,\n", + " 1152776, 1155272, 1141471, 1141459, 1151650, 1147433, 1157052, 1156737,\n", + " 1156739, 1156742, 1156744, 1160849, 1160856, 1160717, 1150642, 1163260,\n", + " 1171040, 1144812, 1168850, 1164741, 1180506, 1180496, 1142722, 1142733,\n", + " 1156303, 1166134, 1145183, 1145228, 1160232, 1154700, 1166462, 1144972,\n", + " 1142140, 1148175, 1191932, 1147356, 1152624, 1152626, 1148124, 1139351,\n", + " 1145902, 1153520, 1151752, 1152200, 1143395, 1171867, 1158723, 1158724,\n", + " 1158722, 1167503, 1168764, 1167315, 1147338, 1144702, 1150773, 1145502,\n", + " 1151598, 1162893, 1166653, 1155172, 1180418, 1150515, 1150518, 1156117,\n", + " 1156118, 1144336, 1157534, 1154670, 1152998, 1157331, 1138130, 1138142,\n", + " 1141048, 1151674, 1169359, 1149452, 1138609, 1149688, 1158623, 1158618,\n", + " 1157380, 1157384, 1157385, 1157388, 1170532, 1171479, 1170463, 1152353,\n", + " 1152360, 1152546, 1166486, 1148667, 1193759, 1165911, 1172668, 1173307,\n", + " 1145033, 1154019, 1154027, 1154028, 1177795, 1159651, 1167859, 1167867,\n", + " 1157153, 1172111, 1155468, 1157375, 1147711, 1148131, 1148140, 1147925,\n", + " 1177415, 1135018, 1154311, 1172961, 1163027, 1155738, 1155739, 1168817,\n", + " 1168593, 1160990, 1140326, 1166351, 1172932, 1166682, 1175906, 1154148,\n", + " 1169409, 1179965, 1158176, 1149169, 1179245, 1180545, 1153803, 1179918,\n", + " 1187244, 1175540, 1182651, 1179807, 1161255, 1161262, 1162129, 1155262,\n", + " 1154718, 1157792, 1157803, 1179166, 1151488, 1171629, 1171623, 1155796,\n", + " 1185047, 1157999, 1157991, 1176754, 1180089, 1192692, 1153889, 1153898,\n", + " 1145626, 1156436, 1156443, 1180383, 1182632, 1161906, 1161911, 1149744,\n", + " 1149755, 1153601, 1153609, 1179947, 1181141, 1158513, 1158940, 1179058,\n", + " 1158380, 1187927, 1155892, 1155899, 1162690, 1140399, 1168280, 1171587,\n", + " 1188240, 1168533, 1159331, 1164228, 1164231, 1161819, 1167977, 1141516,\n", + " 1164133, 1181486, 1170822, 1139831, 1150265, 1149668, 1181876, 1156049,\n", + " 1156055, 1146394, 1191738, 1190838, 1189443, 1172478, 1182750, 1148792,\n", + " 1191825, 1189902, 1189256, 1178072, 1187692, 1151774, 1153733, 1193876,\n", + " 1192487, 1169786, 1179006, 1171201, 1150406, 1158064, 1181621, 1172718,\n", + " 1155959, 1186071, 1157008], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1198769, 1197226, 1197719, 1201094, 1195860, 1199282, 1202255,\n", + " 1198844, 1201577, 1201581, 1201582, 1202119, 1194626, 1197791, 1201021,\n", + " 1197351, 1198690, 1196871, 1198557, 1194745, 1194770, 1194783, 1194642,\n", + " 1195263, 1195187, 1196031, 1198543, 1195457, 1194882, 1195888, 1195895,\n", + " 1199172, 1199171, 1195740, 1194759, 1194663, 1195313, 1195325, 1196840,\n", + " 1198036, 1198958, 1198167, 1198161, 1195221, 1197140, 1197273, 1194859,\n", + " 1198216, 1196737, 1195039, 1202915, 1198193, 1198203, 1199344, 1196393,\n", + " 1198273, 1198282, 1199339, 1200949, 1199856, 1194928, 1199628, 1197676,\n", + " 1197994, 1199038, 1201908, 1195018, 1199676, 1194786, 1200060, 1196498,\n", + " 1196501, 1202585, 1197977, 1201116, 1196727, 1202618, 1202612, 1198428,\n", + " 1199555, 1201547, 1201824, 1201827, 1200503, 1197023, 1198593, 1201421,\n", + " 1201155, 1201156, 1202630, 1201056, 1200913, 1194803, 1195637, 1200553,\n", + " 1196890, 1200692, 1200693, 1196768, 1196779, 1201033, 1202239, 1200831,\n", + " 1202337, 1201291, 1200249, 1198562, 1200793, 1195048, 1200627, 1195679,\n", + " 1195664, 1198929, 1198932, 1200684, 1197816, 1197820, 1197821, 1198587,\n", + " 1203102, 1198819, 1201886, 1195165, 1194908, 1203162], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1198769, 1197226, 1197719, 1201094, 1195860, 1199282, 1202255,\n", + " 1198844, 1201577, 1201581, 1201582, 1202119, 1194626, 1197791, 1201021,\n", + " 1197351, 1198690, 1196871, 1198557, 1194745, 1194770, 1194783, 1194642,\n", + " 1195263, 1195187, 1196031, 1198543, 1195457, 1194882, 1195888, 1195895,\n", + " 1199172, 1199171, 1195740, 1194759, 1194663, 1195313, 1195325, 1196840,\n", + " 1198036, 1198958, 1198167, 1198161, 1195221, 1197140, 1197273, 1194859,\n", + " 1198216, 1196737, 1195039, 1202915, 1198193, 1198203, 1199344, 1196393,\n", + " 1198273, 1198282, 1199339, 1200949, 1199856, 1194928, 1199628, 1197676,\n", + " 1197994, 1199038, 1201908, 1195018, 1199676, 1194786, 1200060, 1196498,\n", + " 1196501, 1202585, 1197977, 1201116, 1196727, 1202618, 1202612, 1198428,\n", + " 1199555, 1201547, 1201824, 1201827, 1200503, 1197023, 1198593, 1201421,\n", + " 1201155, 1201156, 1202630, 1201056, 1200913, 1194803, 1195637, 1200553,\n", + " 1196890, 1200692, 1200693, 1196768, 1196779, 1201033, 1202239, 1200831,\n", + " 1202337, 1201291, 1200249, 1198562, 1200793, 1195048, 1200627, 1195679,\n", + " 1195664, 1198929, 1198932, 1200684, 1197816, 1197820, 1197821, 1198587,\n", + " 1203102, 1198819, 1201886, 1195165, 1194908, 1203162], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 3.0919e-01, -9.7165e-04, 9.1761e-01, ..., 4.0855e-02,\n", + " -1.4694e-03, -6.8499e-03],\n", + " [ 2.4525e-01, -8.7218e-04, 7.7295e-01, ..., 4.8926e-02,\n", + " -1.4529e-03, -5.6671e-03],\n", + " [ 1.4389e-01, -1.8320e-04, 5.7445e-01, ..., 7.5193e-02,\n", + " -1.8615e-03, -4.3013e-03],\n", + " ...,\n", + " [ 2.0007e-01, -4.3810e-04, 6.1885e-01, ..., 8.9256e-02,\n", + " -2.0281e-03, -5.0304e-03],\n", + " [ 1.8324e-01, -7.9609e-05, 7.0633e-01, ..., 6.3025e-02,\n", + " -1.6063e-03, -4.9142e-03],\n", + " [ 2.9363e-01, -1.0688e-03, 9.0640e-01, ..., 4.1327e-02,\n", + " -1.4924e-03, -6.6170e-03]], device='cuda:0'), 'paper': tensor([[ 2.0888e-01, 8.1838e-01, 2.7729e-01, ..., -1.2978e-02,\n", + " -2.1333e-02, 9.4050e-02],\n", + " [-1.4762e-02, 1.6625e-01, 1.8289e+00, ..., -1.2528e-02,\n", + " -3.1941e-02, -1.9874e-02],\n", + " [-1.9138e-02, -6.8854e-03, 2.2166e+00, ..., -1.4356e-02,\n", + " -3.1959e-02, -2.6074e-02],\n", + " ...,\n", + " [-2.7420e-02, -2.2428e-02, 3.4489e+00, ..., -1.8835e-02,\n", + " -4.5723e-02, -3.5568e-02],\n", + " [-1.9888e-02, -2.9086e-03, 1.7670e+00, ..., -1.2221e-02,\n", + " -2.4005e-02, -3.1530e-02],\n", + " [-6.4125e-03, 3.6550e+00, 2.4229e+00, ..., 5.0494e+00,\n", + " -5.2858e-02, 2.9959e+00]], device='cuda:0'), 'author': tensor([[-8.4677e-04, 1.6694e-01, 2.1464e-01, ..., 1.2997e+00,\n", + " 3.8120e-01, -3.5684e-04],\n", + " [-3.9701e-03, 4.4849e-01, 1.1575e-02, ..., 1.1579e+00,\n", + " -5.3340e-05, -3.4098e-03],\n", + " [-9.2135e-04, 1.8105e-01, 1.7758e-01, ..., 1.2313e+00,\n", + " 3.8589e-01, -5.3409e-04],\n", + " ...,\n", + " [-1.3067e-03, 1.9869e-01, 1.5402e-01, ..., 1.2401e+00,\n", + " 3.5232e-01, -5.0612e-04],\n", + " [-1.5761e-03, 1.9645e-01, 1.8100e-01, ..., 1.2538e+00,\n", + " 2.4471e-01, -1.8762e-03],\n", + " [-1.3067e-03, 1.9869e-01, 1.5402e-01, ..., 1.2401e+00,\n", + " 3.5232e-01, -5.0612e-04]], device='cuda:0'), 'field_of_study': tensor([[-0.0024, 0.4827, 0.1025, ..., -0.0079, 0.3633, 0.4353],\n", + " [-0.0019, 0.7552, 0.3058, ..., -0.0097, 0.5281, 0.5726],\n", + " [-0.0016, 0.4938, 0.0838, ..., -0.0075, 0.3584, 0.3748],\n", + " ...,\n", + " [-0.0023, 0.4918, 0.1037, ..., -0.0082, 0.4027, 0.4283],\n", + " [-0.0030, 0.6132, 0.1412, ..., -0.0077, 0.4790, 0.5023],\n", + " [-0.0017, 0.5601, 0.2218, ..., -0.0069, 0.1535, 0.4697]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 95, 88, 135, 135, 135, 135, 135, 462, 495, 229, 462, 355,\n", + " 220, 280, 568, 504, 752, 712, 667, 546, 752, 433, 433, 433,\n", + " 780, 529, 562, 841, 660, 865, 774, 1018, 1018, 685, 906, 918,\n", + " 995, 877, 776, 775, 1274, 1077, 929, 1142, 1152, 1152, 1152, 1394,\n", + " 1142, 1353, 1294, 1436, 1436, 1436, 1435, 1270, 1409, 1409, 1539, 1549,\n", + " 1538, 1634, 1634, 1529, 1529, 1653, 1787, 1730, 1858, 1950, 1958, 1971,\n", + " 1971, 1922, 2068, 2071, 2071, 1981, 2071, 2082, 2082, 2294, 2294, 2294,\n", + " 2237, 2435, 2504, 2407, 2639, 2639, 2639, 2624, 2657, 2657, 2657, 2657,\n", + " 2629, 2783, 3095, 2657, 2657, 2913, 2935, 2953, 3050, 3019, 3019, 3019,\n", + " 3019, 3272, 3487, 3195, 3236, 3236, 3561, 3155, 3387, 3360, 3726, 3318,\n", + " 3706, 3706, 3881, 3781, 3781, 3608, 3907, 3822, 3839, 3562, 4006, 4006,\n", + " 4055, 4186, 3996, 4136, 4160, 4312, 4298, 4283, 4397, 4545, 4609, 4769,\n", + " 4769, 4606, 4472, 4682, 4691, 4651, 4651, 4698, 4602, 4711, 4755, 4799,\n", + " 4693, 4693, 4693, 5083, 5126, 5126, 5110, 5252, 5313, 5241, 5224, 5320,\n", + " 5320, 5389, 5559, 5795, 5352, 5316, 5484, 5626, 5289, 5289, 5289, 5289,\n", + " 5539, 5479, 5479, 5479, 5597, 5603, 5603, 5768, 5830, 5868, 5865, 5873,\n", + " 5922, 5856, 5856, 6037, 5878, 5895, 5891, 5891, 5895, 5895, 5895, 5895,\n", + " 5803, 5961, 5961, 6101, 6101, 5987],\n", + " [ 49, 89, 109, 90, 35, 112, 64, 52, 105, 48, 74, 121,\n", + " 48, 97, 108, 58, 76, 1, 102, 85, 9, 53, 56, 24,\n", + " 9, 85, 7, 86, 123, 16, 80, 41, 68, 125, 57, 29,\n", + " 51, 40, 85, 86, 50, 61, 101, 106, 53, 24, 56, 62,\n", + " 104, 28, 94, 125, 43, 76, 67, 85, 5, 101, 28, 88,\n", + " 28, 6, 41, 58, 73, 104, 20, 74, 10, 56, 42, 76,\n", + " 9, 41, 36, 89, 83, 74, 0, 80, 78, 69, 100, 86,\n", + " 80, 68, 59, 76, 110, 115, 64, 45, 53, 65, 33, 21,\n", + " 12, 22, 11, 122, 4, 23, 37, 101, 45, 76, 120, 84,\n", + " 8, 24, 103, 24, 15, 76, 58, 121, 92, 75, 2, 17,\n", + " 114, 54, 76, 3, 66, 63, 76, 24, 24, 76, 62, 76,\n", + " 13, 11, 24, 58, 72, 119, 34, 70, 23, 23, 23, 91,\n", + " 76, 34, 46, 61, 111, 51, 87, 23, 51, 23, 51, 51,\n", + " 31, 82, 117, 26, 76, 27, 116, 124, 105, 76, 81, 40,\n", + " 18, 95, 60, 23, 96, 98, 44, 44, 71, 99, 93, 14,\n", + " 76, 46, 118, 76, 113, 76, 105, 76, 76, 76, 76, 25,\n", + " 24, 79, 32, 76, 51, 120, 76, 46, 5, 38, 19, 30,\n", + " 107, 77, 47, 39, 55, 76]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 575, 1127, 2425, ..., 3908, 340, 4832],\n", + " [ 198, 198, 120, ..., 6208, 6361, 6328]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 78, 46, 29, ..., 68, 12, 46],\n", + " [ 72, 170, 70, ..., 5893, 6161, 6147]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 142, 142, 142, ..., 6397, 6397, 6397],\n", + " [ 43, 684, 886, ..., 915, 859, 307]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 365, 476, 82, ..., 231, 307, 260],\n", + " [ 14, 204, 44, ..., 6324, 6321, 6302]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3429, 5705, 3612, ..., 5890, 5840, 6291],\n", + " [ 24, 42, 12, ..., 6107, 6078, 6078]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 48, 48, 90, ..., 6397, 6397, 6397],\n", + " [ 250, 94, 2886, ..., 4326, 3844, 3332]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 88, 88, 88, ..., 6101, 6101, 5878],\n", + " [3955, 3438, 3239, ..., 3254, 775, 5137]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.00649\n", + "sampling 0.006336\n", + "noi time: 0.001937\n", + "get_vertex_data call: 0.037473\n", + "noi group time: 0.003544\n", + "eoi_group_time: 0.016224\n", + "second half: 0.214856\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 32845, 1899, 31145, ..., 1111394, 1132720, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 32845, 1899, 31145, ..., 1111394, 1132720, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1232117, 1214757, ..., 1935110, 1931113, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1232117, 1214757, ..., 1935110, 1931113, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1136349, 1135721, 1135727, 1137791, 1140785, 1141756, 1141758,\n", + " 1136221, 1136223, 1136969, 1136971, 1141442, 1141443, 1143600, 1143615,\n", + " 1149831, 1139811, 1154772, 1137271, 1138943, 1138936, 1143362, 1139243,\n", + " 1146640, 1150506, 1139866, 1149216, 1149220, 1149228, 1155683, 1155689,\n", + " 1143810, 1143811, 1143820, 1147483, 1135992, 1144636, 1148522, 1153008,\n", + " 1153012, 1153023, 1136122, 1136125, 1148546, 1136742, 1147095, 1141916,\n", + " 1150555, 1155018, 1139365, 1147202, 1136685, 1150329, 1146376, 1134669,\n", + " 1140531, 1137254, 1137172, 1137181, 1151520, 1140149, 1140158, 1140159,\n", + " 1135913, 1162460, 1135367, 1135202, 1154739, 1141036, 1136777, 1134794,\n", + " 1135953, 1138498, 1138504, 1137329, 1143069, 1137693, 1144395, 1137529,\n", + " 1137534, 1157405, 1157397, 1136581, 1137441, 1156146, 1156159, 1148484,\n", + " 1139161, 1141702, 1135583, 1155075, 1138514, 1156964, 1135499, 1154132,\n", + " 1137018, 1156899, 1135522, 1139684, 1138314, 1137287, 1138436, 1138440,\n", + " 1140071, 1140079, 1136542, 1138461, 1138449, 1137924, 1136594, 1135132,\n", + " 1138846, 1135088, 1156605, 1147112, 1142611, 1135359, 1160516, 1145843,\n", + " 1150946, 1159868, 1139667, 1139673, 1138079, 1134992, 1148809, 1135789,\n", + " 1144406, 1153544, 1140852, 1139933, 1138646, 1138648, 1152042, 1152044,\n", + " 1152047, 1137734, 1137728, 1134750, 1141088, 1141102, 1144143, 1139889,\n", + " 1136392, 1143767, 1154860, 1137298, 1137299, 1143225, 1139033, 1140003,\n", + " 1146834, 1146832, 1141688, 1135860, 1136625, 1140470, 1141224, 1141891,\n", + " 1142160, 1139730, 1141159, 1141161, 1141786, 1136760, 1144640, 1147844,\n", + " 1137074, 1138482, 1140173, 1141472, 1138708, 1137652, 1137661, 1137663,\n", + " 1138424, 1143111, 1144596, 1136864, 1144041, 1141406, 1144182, 1150906,\n", + " 1146201, 1137365, 1141760, 1139559, 1139560, 1138539, 1147153, 1136378,\n", + " 1141365, 1141722, 1149097, 1149101, 1139022, 1143904, 1143915, 1139506,\n", + " 1139510, 1140093, 1139127, 1144992, 1140616, 1140976, 1140990, 1143694,\n", + " 1147050, 1145873, 1143543, 1152976, 1152980, 1135459, 1163910, 1141925,\n", + " 1146898, 1144242, 1141846, 1140691, 1143643, 1137571, 1143845, 1146024,\n", + " 1149928, 1139990, 1143293, 1143283, 1143294, 1151131, 1147540, 1148763,\n", + " 1147282, 1142816, 1136330, 1140349, 1147458, 1143663, 1149366, 1139417,\n", + " 1149615, 1143051, 1143040, 1143052, 1157720, 1136836, 1139329, 1141496,\n", + " 1142159, 1145429, 1143345, 1144766, 1144753, 1145813, 1145818, 1144080,\n", + " 1144083, 1135876, 1135813, 1150294, 1138004, 1144375, 1146514, 1143457,\n", + " 1137703, 1144291, 1147574, 1146636, 1146634, 1140361, 1140360, 1140364,\n", + " 1137990, 1147984, 1147996, 1147999, 1146949, 1139252, 1147244, 1148704,\n", + " 1148715, 1141319, 1141836, 1147191, 1158226, 1158230, 1150450, 1145238,\n", + " 1145240, 1145750, 1145751, 1142377, 1142369, 1148397, 1146178, 1151235,\n", + " 1148223, 1150280, 1150445, 1148940, 1154438, 1144514, 1144526, 1138044,\n", + " 1150339, 1152013, 1151994, 1151997, 1147796, 1147807, 1152023, 1152024,\n", + " 1145262, 1139914, 1146723, 1134869, 1148693, 1147019, 1147021, 1141949,\n", + " 1146776, 1150843, 1150730, 1149985, 1147653, 1143567, 1148288, 1148294,\n", + " 1148300, 1147871, 1154420, 1148188, 1151363, 1152565, 1138198, 1139718,\n", + " 1152435, 1152439, 1148720, 1148724, 1148726, 1147627, 1146544, 1146559,\n", + " 1146549, 1148204, 1148108, 1154168, 1153124, 1153125, 1153192, 1153188,\n", + " 1145104, 1145111, 1150935, 1148057, 1144863, 1150352, 1150356, 1143126,\n", + " 1147446, 1151821, 1152581, 1151906, 1154183, 1145640, 1148498, 1148505,\n", + " 1141419, 1136002, 1148949, 1146975, 1149358, 1153249, 1146623, 1151695,\n", + " 1151402, 1144467, 1144476, 1152849, 1152103, 1146287, 1150094, 1137746,\n", + " 1146307, 1152622, 1140518, 1155140, 1136401, 1151967, 1151960, 1152826,\n", + " 1155337, 1155358, 1157824, 1152673, 1154633, 1151617, 1150578, 1150588,\n", + " 1136131, 1136134, 1148913, 1148916, 1152951, 1140459, 1150615, 1152227,\n", + " 1138991, 1152903, 1151311, 1152341, 1146816, 1153311, 1138281, 1157147,\n", + " 1152300, 1136028, 1158712, 1158704, 1156622, 1152928, 1151064, 1156387,\n", + " 1152887, 1150102, 1150104, 1150101, 1153918, 1150150, 1150172, 1150164,\n", + " 1148033, 1148040, 1149300, 1152601, 1157621, 1137048, 1148628, 1158530,\n", + " 1158540, 1149946, 1154564, 1147647, 1159223, 1142047, 1157229, 1135434,\n", + " 1143442, 1157547, 1158854, 1158857, 1156500, 1157064, 1157069, 1155408,\n", + " 1145196, 1145187, 1137814, 1143496, 1150465, 1135231, 1135741, 1138830,\n", + " 1152183, 1156631, 1156942, 1153413, 1153415, 1139525, 1139524, 1158304,\n", + " 1140427, 1140431, 1155441, 1155442, 1155452, 1153359, 1150129, 1150136,\n", + " 1144357, 1140866, 1140879, 1154531, 1142755, 1156207, 1157642, 1151379,\n", + " 1158626, 1140187, 1156640, 1155122, 1157183, 1155755, 1156463, 1158096,\n", + " 1154763, 1155628, 1154555, 1161429, 1158824, 1158829, 1153715, 1153723,\n", + " 1156993, 1148836, 1155646, 1143254, 1143257, 1146938, 1154250, 1154240,\n", + " 1154080, 1162190, 1154909, 1163127, 1143189, 1153320, 1157430, 1150811,\n", + " 1150983, 1150987, 1157934, 1151030, 1137166, 1157663, 1158124, 1158126,\n", + " 1158578, 1153330, 1137381, 1159116, 1140914, 1134677, 1135601, 1135602,\n", + " 1148147, 1150671, 1159584, 1155855, 1155852, 1158656, 1138215, 1157685,\n", + " 1157684, 1140633, 1155717, 1144463, 1152209, 1157735, 1159130, 1164223,\n", + " 1155971, 1155975, 1142070, 1158840, 1158846, 1155393, 1155404, 1160163,\n", + " 1153503, 1136909, 1136896, 1158815, 1156778, 1158286, 1136480, 1136494,\n", + " 1153632, 1147599, 1155304, 1153112, 1152143, 1153808, 1157675, 1136646,\n", + " 1163111, 1134757, 1166421, 1146114, 1146126, 1144581, 1161539, 1142666,\n", + " 1150684, 1157747, 1157759, 1167346, 1167359, 1159042, 1159052, 1142426,\n", + " 1158300, 1155194, 1157944, 1162039, 1162044, 1153052, 1153042, 1153045,\n", + " 1155772, 1156235, 1166256, 1142869, 1156098, 1138391, 1138393, 1150046,\n", + " 1149063, 1149070, 1145945, 1155479, 1153519, 1146870, 1164006, 1139281,\n", + " 1156983, 1159773, 1146050, 1146063, 1146364, 1140130, 1140650, 1148600,\n", + " 1148607, 1143138, 1143139, 1151875, 1163019, 1155816, 1158653, 1156181,\n", + " 1159026, 1159032, 1168096, 1169108, 1152250, 1160600, 1155588, 1159536,\n", + " 1148566, 1148571, 1144977, 1144979, 1146509, 1171002, 1164580, 1167682,\n", + " 1161240, 1144739, 1155046, 1163527, 1145137, 1156739, 1165182, 1179009,\n", + " 1150642, 1171040, 1144800, 1144812, 1144808, 1135567, 1164741, 1164750,\n", + " 1165644, 1162619, 1165946, 1145567, 1145228, 1166462, 1144973, 1162291,\n", + " 1152639, 1152624, 1148120, 1148124, 1139351, 1145892, 1145902, 1153534,\n", + " 1169542, 1152200, 1158724, 1158722, 1147338, 1192302, 1145502, 1154927,\n", + " 1149480, 1155172, 1155178, 1165011, 1150518, 1156113, 1144336, 1157527,\n", + " 1147746, 1157331, 1141051, 1169359, 1154353, 1149452, 1146339, 1138609,\n", + " 1158611, 1158623, 1173047, 1163292, 1155494, 1160537, 1167383, 1152353,\n", + " 1170273, 1169929, 1149402, 1148667, 1173307, 1152150, 1152151, 1153755,\n", + " 1164974, 1159651, 1157153, 1157371, 1157373, 1167239, 1167247, 1147711,\n", + " 1151850, 1148141, 1169687, 1170488, 1177415, 1135021, 1172961, 1155739,\n", + " 1168818, 1177003, 1167903, 1140326, 1193975, 1143238, 1172932, 1163989,\n", + " 1154151, 1154148, 1158176, 1178887, 1149169, 1175665, 1181229, 1169772,\n", + " 1167658, 1170176, 1153803, 1171122, 1186309, 1153628, 1144898, 1180916,\n", + " 1161255, 1162129, 1154718, 1157792, 1157795, 1171623, 1179190, 1155804,\n", + " 1157134, 1180036, 1172154, 1158249, 1153898, 1154500, 1178216, 1145626,\n", + " 1145618, 1172024, 1178757, 1161911, 1146242, 1166959, 1152276, 1155990,\n", + " 1190502, 1167636, 1155899, 1160412, 1166981, 1168273, 1167764, 1188241,\n", + " 1166507, 1169064, 1168892, 1164228, 1164339, 1164271, 1146161, 1188070,\n", + " 1170802, 1167392, 1156161, 1156162, 1182158, 1170421, 1184050, 1192736,\n", + " 1139828, 1139831, 1150265, 1154812, 1188613, 1151288, 1181882, 1156055,\n", + " 1193365, 1192417, 1193186, 1194491, 1185976, 1162156, 1153729, 1152115,\n", + " 1186572, 1178003, 1167089, 1193116, 1158064, 1167739, 1178135, 1186174,\n", + " 1152084, 1165509, 1155555, 1192792, 1181710, 1175438, 1157008],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1136349, 1135721, 1135727, 1137791, 1140785, 1141756, 1141758,\n", + " 1136221, 1136223, 1136969, 1136971, 1141442, 1141443, 1143600, 1143615,\n", + " 1149831, 1139811, 1154772, 1137271, 1138943, 1138936, 1143362, 1139243,\n", + " 1146640, 1150506, 1139866, 1149216, 1149220, 1149228, 1155683, 1155689,\n", + " 1143810, 1143811, 1143820, 1147483, 1135992, 1144636, 1148522, 1153008,\n", + " 1153012, 1153023, 1136122, 1136125, 1148546, 1136742, 1147095, 1141916,\n", + " 1150555, 1155018, 1139365, 1147202, 1136685, 1150329, 1146376, 1134669,\n", + " 1140531, 1137254, 1137172, 1137181, 1151520, 1140149, 1140158, 1140159,\n", + " 1135913, 1162460, 1135367, 1135202, 1154739, 1141036, 1136777, 1134794,\n", + " 1135953, 1138498, 1138504, 1137329, 1143069, 1137693, 1144395, 1137529,\n", + " 1137534, 1157405, 1157397, 1136581, 1137441, 1156146, 1156159, 1148484,\n", + " 1139161, 1141702, 1135583, 1155075, 1138514, 1156964, 1135499, 1154132,\n", + " 1137018, 1156899, 1135522, 1139684, 1138314, 1137287, 1138436, 1138440,\n", + " 1140071, 1140079, 1136542, 1138461, 1138449, 1137924, 1136594, 1135132,\n", + " 1138846, 1135088, 1156605, 1147112, 1142611, 1135359, 1160516, 1145843,\n", + " 1150946, 1159868, 1139667, 1139673, 1138079, 1134992, 1148809, 1135789,\n", + " 1144406, 1153544, 1140852, 1139933, 1138646, 1138648, 1152042, 1152044,\n", + " 1152047, 1137734, 1137728, 1134750, 1141088, 1141102, 1144143, 1139889,\n", + " 1136392, 1143767, 1154860, 1137298, 1137299, 1143225, 1139033, 1140003,\n", + " 1146834, 1146832, 1141688, 1135860, 1136625, 1140470, 1141224, 1141891,\n", + " 1142160, 1139730, 1141159, 1141161, 1141786, 1136760, 1144640, 1147844,\n", + " 1137074, 1138482, 1140173, 1141472, 1138708, 1137652, 1137661, 1137663,\n", + " 1138424, 1143111, 1144596, 1136864, 1144041, 1141406, 1144182, 1150906,\n", + " 1146201, 1137365, 1141760, 1139559, 1139560, 1138539, 1147153, 1136378,\n", + " 1141365, 1141722, 1149097, 1149101, 1139022, 1143904, 1143915, 1139506,\n", + " 1139510, 1140093, 1139127, 1144992, 1140616, 1140976, 1140990, 1143694,\n", + " 1147050, 1145873, 1143543, 1152976, 1152980, 1135459, 1163910, 1141925,\n", + " 1146898, 1144242, 1141846, 1140691, 1143643, 1137571, 1143845, 1146024,\n", + " 1149928, 1139990, 1143293, 1143283, 1143294, 1151131, 1147540, 1148763,\n", + " 1147282, 1142816, 1136330, 1140349, 1147458, 1143663, 1149366, 1139417,\n", + " 1149615, 1143051, 1143040, 1143052, 1157720, 1136836, 1139329, 1141496,\n", + " 1142159, 1145429, 1143345, 1144766, 1144753, 1145813, 1145818, 1144080,\n", + " 1144083, 1135876, 1135813, 1150294, 1138004, 1144375, 1146514, 1143457,\n", + " 1137703, 1144291, 1147574, 1146636, 1146634, 1140361, 1140360, 1140364,\n", + " 1137990, 1147984, 1147996, 1147999, 1146949, 1139252, 1147244, 1148704,\n", + " 1148715, 1141319, 1141836, 1147191, 1158226, 1158230, 1150450, 1145238,\n", + " 1145240, 1145750, 1145751, 1142377, 1142369, 1148397, 1146178, 1151235,\n", + " 1148223, 1150280, 1150445, 1148940, 1154438, 1144514, 1144526, 1138044,\n", + " 1150339, 1152013, 1151994, 1151997, 1147796, 1147807, 1152023, 1152024,\n", + " 1145262, 1139914, 1146723, 1134869, 1148693, 1147019, 1147021, 1141949,\n", + " 1146776, 1150843, 1150730, 1149985, 1147653, 1143567, 1148288, 1148294,\n", + " 1148300, 1147871, 1154420, 1148188, 1151363, 1152565, 1138198, 1139718,\n", + " 1152435, 1152439, 1148720, 1148724, 1148726, 1147627, 1146544, 1146559,\n", + " 1146549, 1148204, 1148108, 1154168, 1153124, 1153125, 1153192, 1153188,\n", + " 1145104, 1145111, 1150935, 1148057, 1144863, 1150352, 1150356, 1143126,\n", + " 1147446, 1151821, 1152581, 1151906, 1154183, 1145640, 1148498, 1148505,\n", + " 1141419, 1136002, 1148949, 1146975, 1149358, 1153249, 1146623, 1151695,\n", + " 1151402, 1144467, 1144476, 1152849, 1152103, 1146287, 1150094, 1137746,\n", + " 1146307, 1152622, 1140518, 1155140, 1136401, 1151967, 1151960, 1152826,\n", + " 1155337, 1155358, 1157824, 1152673, 1154633, 1151617, 1150578, 1150588,\n", + " 1136131, 1136134, 1148913, 1148916, 1152951, 1140459, 1150615, 1152227,\n", + " 1138991, 1152903, 1151311, 1152341, 1146816, 1153311, 1138281, 1157147,\n", + " 1152300, 1136028, 1158712, 1158704, 1156622, 1152928, 1151064, 1156387,\n", + " 1152887, 1150102, 1150104, 1150101, 1153918, 1150150, 1150172, 1150164,\n", + " 1148033, 1148040, 1149300, 1152601, 1157621, 1137048, 1148628, 1158530,\n", + " 1158540, 1149946, 1154564, 1147647, 1159223, 1142047, 1157229, 1135434,\n", + " 1143442, 1157547, 1158854, 1158857, 1156500, 1157064, 1157069, 1155408,\n", + " 1145196, 1145187, 1137814, 1143496, 1150465, 1135231, 1135741, 1138830,\n", + " 1152183, 1156631, 1156942, 1153413, 1153415, 1139525, 1139524, 1158304,\n", + " 1140427, 1140431, 1155441, 1155442, 1155452, 1153359, 1150129, 1150136,\n", + " 1144357, 1140866, 1140879, 1154531, 1142755, 1156207, 1157642, 1151379,\n", + " 1158626, 1140187, 1156640, 1155122, 1157183, 1155755, 1156463, 1158096,\n", + " 1154763, 1155628, 1154555, 1161429, 1158824, 1158829, 1153715, 1153723,\n", + " 1156993, 1148836, 1155646, 1143254, 1143257, 1146938, 1154250, 1154240,\n", + " 1154080, 1162190, 1154909, 1163127, 1143189, 1153320, 1157430, 1150811,\n", + " 1150983, 1150987, 1157934, 1151030, 1137166, 1157663, 1158124, 1158126,\n", + " 1158578, 1153330, 1137381, 1159116, 1140914, 1134677, 1135601, 1135602,\n", + " 1148147, 1150671, 1159584, 1155855, 1155852, 1158656, 1138215, 1157685,\n", + " 1157684, 1140633, 1155717, 1144463, 1152209, 1157735, 1159130, 1164223,\n", + " 1155971, 1155975, 1142070, 1158840, 1158846, 1155393, 1155404, 1160163,\n", + " 1153503, 1136909, 1136896, 1158815, 1156778, 1158286, 1136480, 1136494,\n", + " 1153632, 1147599, 1155304, 1153112, 1152143, 1153808, 1157675, 1136646,\n", + " 1163111, 1134757, 1166421, 1146114, 1146126, 1144581, 1161539, 1142666,\n", + " 1150684, 1157747, 1157759, 1167346, 1167359, 1159042, 1159052, 1142426,\n", + " 1158300, 1155194, 1157944, 1162039, 1162044, 1153052, 1153042, 1153045,\n", + " 1155772, 1156235, 1166256, 1142869, 1156098, 1138391, 1138393, 1150046,\n", + " 1149063, 1149070, 1145945, 1155479, 1153519, 1146870, 1164006, 1139281,\n", + " 1156983, 1159773, 1146050, 1146063, 1146364, 1140130, 1140650, 1148600,\n", + " 1148607, 1143138, 1143139, 1151875, 1163019, 1155816, 1158653, 1156181,\n", + " 1159026, 1159032, 1168096, 1169108, 1152250, 1160600, 1155588, 1159536,\n", + " 1148566, 1148571, 1144977, 1144979, 1146509, 1171002, 1164580, 1167682,\n", + " 1161240, 1144739, 1155046, 1163527, 1145137, 1156739, 1165182, 1179009,\n", + " 1150642, 1171040, 1144800, 1144812, 1144808, 1135567, 1164741, 1164750,\n", + " 1165644, 1162619, 1165946, 1145567, 1145228, 1166462, 1144973, 1162291,\n", + " 1152639, 1152624, 1148120, 1148124, 1139351, 1145892, 1145902, 1153534,\n", + " 1169542, 1152200, 1158724, 1158722, 1147338, 1192302, 1145502, 1154927,\n", + " 1149480, 1155172, 1155178, 1165011, 1150518, 1156113, 1144336, 1157527,\n", + " 1147746, 1157331, 1141051, 1169359, 1154353, 1149452, 1146339, 1138609,\n", + " 1158611, 1158623, 1173047, 1163292, 1155494, 1160537, 1167383, 1152353,\n", + " 1170273, 1169929, 1149402, 1148667, 1173307, 1152150, 1152151, 1153755,\n", + " 1164974, 1159651, 1157153, 1157371, 1157373, 1167239, 1167247, 1147711,\n", + " 1151850, 1148141, 1169687, 1170488, 1177415, 1135021, 1172961, 1155739,\n", + " 1168818, 1177003, 1167903, 1140326, 1193975, 1143238, 1172932, 1163989,\n", + " 1154151, 1154148, 1158176, 1178887, 1149169, 1175665, 1181229, 1169772,\n", + " 1167658, 1170176, 1153803, 1171122, 1186309, 1153628, 1144898, 1180916,\n", + " 1161255, 1162129, 1154718, 1157792, 1157795, 1171623, 1179190, 1155804,\n", + " 1157134, 1180036, 1172154, 1158249, 1153898, 1154500, 1178216, 1145626,\n", + " 1145618, 1172024, 1178757, 1161911, 1146242, 1166959, 1152276, 1155990,\n", + " 1190502, 1167636, 1155899, 1160412, 1166981, 1168273, 1167764, 1188241,\n", + " 1166507, 1169064, 1168892, 1164228, 1164339, 1164271, 1146161, 1188070,\n", + " 1170802, 1167392, 1156161, 1156162, 1182158, 1170421, 1184050, 1192736,\n", + " 1139828, 1139831, 1150265, 1154812, 1188613, 1151288, 1181882, 1156055,\n", + " 1193365, 1192417, 1193186, 1194491, 1185976, 1162156, 1153729, 1152115,\n", + " 1186572, 1178003, 1167089, 1193116, 1158064, 1167739, 1178135, 1186174,\n", + " 1152084, 1165509, 1155555, 1192792, 1181710, 1175438, 1157008],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197181, 1198769, 1197747, 1199736, 1197226, 1199831, 1195860,\n", + " 1198449, 1198459, 1202255, 1201581, 1201582, 1194626, 1197777, 1197786,\n", + " 1199248, 1201016, 1197359, 1198628, 1198697, 1202803, 1202804, 1197512,\n", + " 1196684, 1194743, 1195725, 1194770, 1194648, 1195511, 1195263, 1197921,\n", + " 1201992, 1198542, 1198543, 1199519, 1194952, 1198310, 1194884, 1195888,\n", + " 1195895, 1196359, 1196699, 1194759, 1194762, 1194661, 1195320, 1197793,\n", + " 1198163, 1198167, 1198161, 1196717, 1195148, 1195279, 1196242, 1196249,\n", + " 1197273, 1194849, 1199315, 1197248, 1197253, 1199697, 1198280, 1200949,\n", + " 1199060, 1199059, 1197295, 1199185, 1194928, 1197583, 1199628, 1197994,\n", + " 1200878, 1200746, 1199231, 1199673, 1194786, 1194795, 1200665, 1199021,\n", + " 1197601, 1197609, 1196727, 1195773, 1202618, 1200893, 1198428, 1199410,\n", + " 1198811, 1201827, 1201155, 1201156, 1202630, 1200991, 1200918, 1199712,\n", + " 1201043, 1200363, 1202499, 1200526, 1200267, 1200271, 1200553, 1200556,\n", + " 1200310, 1200853, 1196883, 1199908, 1201442, 1202087, 1202239, 1200825,\n", + " 1202337, 1200189, 1201291, 1203329, 1200398, 1198561, 1198338, 1199606,\n", + " 1195676, 1195006, 1202869, 1200445, 1198929, 1200684, 1198911, 1195421,\n", + " 1201789, 1197816, 1197821, 1197491, 1202269, 1195294, 1200585, 1199405,\n", + " 1198824, 1197735, 1200437, 1201886, 1200301, 1201365, 1196072],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197181, 1198769, 1197747, 1199736, 1197226, 1199831, 1195860,\n", + " 1198449, 1198459, 1202255, 1201581, 1201582, 1194626, 1197777, 1197786,\n", + " 1199248, 1201016, 1197359, 1198628, 1198697, 1202803, 1202804, 1197512,\n", + " 1196684, 1194743, 1195725, 1194770, 1194648, 1195511, 1195263, 1197921,\n", + " 1201992, 1198542, 1198543, 1199519, 1194952, 1198310, 1194884, 1195888,\n", + " 1195895, 1196359, 1196699, 1194759, 1194762, 1194661, 1195320, 1197793,\n", + " 1198163, 1198167, 1198161, 1196717, 1195148, 1195279, 1196242, 1196249,\n", + " 1197273, 1194849, 1199315, 1197248, 1197253, 1199697, 1198280, 1200949,\n", + " 1199060, 1199059, 1197295, 1199185, 1194928, 1197583, 1199628, 1197994,\n", + " 1200878, 1200746, 1199231, 1199673, 1194786, 1194795, 1200665, 1199021,\n", + " 1197601, 1197609, 1196727, 1195773, 1202618, 1200893, 1198428, 1199410,\n", + " 1198811, 1201827, 1201155, 1201156, 1202630, 1200991, 1200918, 1199712,\n", + " 1201043, 1200363, 1202499, 1200526, 1200267, 1200271, 1200553, 1200556,\n", + " 1200310, 1200853, 1196883, 1199908, 1201442, 1202087, 1202239, 1200825,\n", + " 1202337, 1200189, 1201291, 1203329, 1200398, 1198561, 1198338, 1199606,\n", + " 1195676, 1195006, 1202869, 1200445, 1198929, 1200684, 1198911, 1195421,\n", + " 1201789, 1197816, 1197821, 1197491, 1202269, 1195294, 1200585, 1199405,\n", + " 1198824, 1197735, 1200437, 1201886, 1200301, 1201365, 1196072],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 2.9338e-01, -9.3776e-04, 9.6535e-01, ..., 4.9945e-02,\n", + " -1.5921e-03, -6.9756e-03],\n", + " [ 1.3656e-01, -2.0638e-04, 4.4295e-01, ..., 8.5412e-02,\n", + " -1.9738e-03, -3.6143e-03],\n", + " [ 2.6487e-01, -1.0189e-03, 8.7150e-01, ..., 4.2911e-02,\n", + " -1.3245e-03, -6.3397e-03],\n", + " ...,\n", + " [ 2.2628e-01, -3.3257e-04, 8.4546e-01, ..., 5.3536e-02,\n", + " -1.3867e-03, -5.7759e-03],\n", + " [ 1.6186e-01, -3.0621e-04, 6.1265e-01, ..., 5.3373e-02,\n", + " -1.3829e-03, -4.4085e-03],\n", + " [ 1.3853e-01, -3.6733e-04, 4.6111e-01, ..., 7.3565e-02,\n", + " -1.7879e-03, -3.6131e-03]], device='cuda:0'), 'paper': tensor([[-5.6668e-03, 2.8332e+00, 2.9977e+00, ..., 2.7343e+00,\n", + " -4.2038e-02, 1.4244e+00],\n", + " [-1.4899e-04, 1.1293e+00, 3.9576e-01, ..., -7.0663e-03,\n", + " -1.6946e-02, 3.1256e-03],\n", + " [-9.6980e-03, 2.1436e+00, 3.4297e+00, ..., 9.3487e-02,\n", + " -4.1365e-02, -3.4515e-03],\n", + " ...,\n", + " [ 1.6626e-01, 1.0295e+00, 2.2263e-01, ..., -9.7655e-03,\n", + " -1.8603e-02, 1.1275e-01],\n", + " [-5.7564e-03, 5.9404e-01, 7.3733e-01, ..., -8.5026e-03,\n", + " -1.6341e-02, -7.7892e-03],\n", + " [-6.4739e-03, 3.6483e+00, 2.4281e+00, ..., 5.0474e+00,\n", + " -5.2943e-02, 2.9920e+00]], device='cuda:0'), 'author': tensor([[-2.0876e-03, 2.1820e-01, 1.2300e-01, ..., 1.2783e+00,\n", + " 9.5896e-03, -2.0374e-03],\n", + " [-4.3030e-03, 4.5678e-01, -4.5512e-04, ..., 1.1790e+00,\n", + " 4.5005e-02, -3.2260e-03],\n", + " [-1.8352e-03, 2.6834e-01, 1.2494e-01, ..., 1.2720e+00,\n", + " 1.1550e-01, -1.4876e-03],\n", + " ...,\n", + " [-1.1769e-03, 1.7338e-01, 1.9489e-01, ..., 1.2244e+00,\n", + " 3.4520e-01, -7.1638e-04],\n", + " [-6.3400e-03, 5.9773e-01, -6.0723e-04, ..., 1.2747e+00,\n", + " 2.3186e-01, -3.5525e-03],\n", + " [-1.2220e-03, 2.0820e-01, 1.7112e-01, ..., 1.2728e+00,\n", + " 4.0718e-01, -4.7205e-04]], device='cuda:0'), 'field_of_study': tensor([[-2.6532e-03, 5.4115e-01, 1.4629e-01, ..., -7.6144e-03,\n", + " 3.4547e-01, 4.9583e-01],\n", + " [-2.2734e-03, 6.0886e-01, 1.9051e-01, ..., -7.7208e-03,\n", + " 3.0956e-01, 4.8128e-01],\n", + " [-2.2171e-03, 5.2644e-01, 1.0041e-01, ..., -7.7952e-03,\n", + " 3.6478e-01, 4.6030e-01],\n", + " ...,\n", + " [-6.7158e-04, 5.7104e-01, 1.1613e-01, ..., -7.0070e-03,\n", + " 4.3082e-01, 1.1707e-01],\n", + " [-2.7795e-03, 5.4148e-01, 8.6870e-02, ..., -6.8570e-03,\n", + " 2.9691e-01, 4.2902e-01],\n", + " [-3.2611e-03, 7.5036e-01, 2.7867e-01, ..., -9.3118e-03,\n", + " 4.2477e-01, 6.0559e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 183, 183, 32, 204, 204, 183, 98, 134, 223, 336, 396, 396,\n", + " 396, 396, 291, 308, 299, 330, 330, 330, 291, 291, 372, 230,\n", + " 230, 400, 660, 796, 311, 603, 603, 603, 1043, 584, 1236, 995,\n", + " 1084, 948, 1105, 904, 833, 833, 1156, 1063, 1063, 1147, 1270, 1139,\n", + " 1139, 1139, 1154, 1229, 1356, 1246, 1246, 1182, 1182, 1531, 1334, 1448,\n", + " 1956, 1805, 1568, 1568, 1820, 1820, 1655, 1853, 1843, 2008, 1877, 1958,\n", + " 1958, 2118, 1850, 1921, 1889, 2132, 2022, 2040, 2040, 2083, 2083, 2083,\n", + " 2000, 2309, 2134, 2268, 2258, 2258, 2291, 2245, 2302, 2313, 2313, 2313,\n", + " 2346, 2330, 2424, 2273, 2400, 2369, 2586, 2586, 2558, 2706, 2446, 2556,\n", + " 2902, 2710, 2924, 2759, 2759, 2759, 2669, 2946, 3060, 3125, 3200, 3200,\n", + " 3298, 3298, 3722, 3455, 3455, 3455, 3645, 3536, 3664, 3754, 3695, 3479,\n", + " 3479, 3764, 3623, 3816, 3756, 3812, 3876, 3881, 3957, 3987, 4087, 4087,\n", + " 4061, 4061, 4061, 4065, 4108, 4244, 4042, 4109, 4109, 4548, 4312, 4518,\n", + " 4518, 4603, 4603, 4459, 4512, 4976, 4752, 4777, 4921, 5035, 5476, 5476,\n", + " 5027, 5476, 5476, 5070, 5051, 5425, 5425, 4853, 4853, 4853, 4853, 5240,\n", + " 4949, 5638, 5703, 5703, 5703, 5392, 5750, 5467, 5361, 5620, 5587, 5718,\n", + " 5682, 5791, 5791, 5791, 5791, 5794, 5794],\n", + " [ 87, 11, 11, 73, 43, 22, 22, 110, 139, 45, 66, 32,\n", + " 101, 13, 133, 125, 50, 113, 69, 21, 123, 135, 82, 80,\n", + " 74, 93, 71, 48, 51, 36, 135, 19, 113, 11, 46, 94,\n", + " 137, 94, 120, 63, 28, 38, 15, 53, 108, 35, 82, 86,\n", + " 98, 89, 71, 1, 109, 10, 115, 96, 72, 62, 82, 75,\n", + " 121, 134, 5, 85, 100, 85, 41, 79, 90, 122, 72, 126,\n", + " 107, 104, 20, 77, 82, 108, 20, 32, 24, 99, 112, 130,\n", + " 18, 110, 26, 30, 103, 30, 93, 109, 114, 124, 131, 73,\n", + " 76, 33, 109, 58, 142, 92, 78, 136, 41, 49, 110, 67,\n", + " 62, 95, 139, 42, 102, 70, 55, 109, 33, 140, 27, 105,\n", + " 44, 91, 0, 8, 80, 138, 83, 76, 14, 84, 12, 33,\n", + " 74, 37, 82, 71, 110, 37, 93, 71, 110, 29, 40, 116,\n", + " 52, 106, 88, 128, 24, 30, 7, 114, 118, 82, 50, 60,\n", + " 79, 82, 39, 141, 2, 6, 9, 97, 114, 56, 54, 3,\n", + " 117, 111, 4, 76, 59, 68, 16, 57, 114, 129, 64, 127,\n", + " 52, 110, 25, 34, 21, 119, 82, 132, 65, 113, 17, 81,\n", + " 5, 23, 61, 82, 31, 120, 47]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 653, 896, 1106, ..., 4178, 4927, 534],\n", + " [ 24, 24, 77, ..., 6882, 7041, 7038]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 94, 18, 28, ..., 85, 85, 117],\n", + " [ 38, 171, 24, ..., 5832, 5827, 5813]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 2, 158, 158, ..., 6963, 6870, 6927],\n", + " [ 230, 279, 27, ..., 828, 440, 815]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 78, 41, 279, ..., 619, 213, 599],\n", + " [ 131, 215, 90, ..., 6893, 6967, 6977]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3401, 6808, 273, ..., 3940, 3699, 6451],\n", + " [ 157, 50, 1, ..., 5843, 5853, 5838]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 158, 158, 158, ..., 6870, 6856, 6927],\n", + " [2028, 1754, 150, ..., 3247, 1277, 627]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 223, 223, 223, ..., 5794, 5794, 5794],\n", + " [5763, 5904, 6054, ..., 3757, 3595, 3866]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.005999\n", + "sampling 0.005843\n", + "noi time: 0.001907\n", + "get_vertex_data call: 0.026715\n", + "noi group time: 0.004221\n", + "eoi_group_time: 0.016207\n", + "second half: 0.220567\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 16691, 16702, ..., 1111730, 1111394, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 16691, 16702, ..., 1111730, 1111394, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210825, 1224375, 1212857, ..., 1931111, 1936972, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210825, 1224375, 1212857, ..., 1931111, 1936972, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1137212, 1141424, 1140282, 1140284, 1140285, 1136347, 1136349,\n", + " 1135723, 1139698, 1141758, 1138335, 1136223, 1141251, 1140297, 1136969,\n", + " 1136971, 1143615, 1145373, 1145989, 1145993, 1138942, 1143372, 1143363,\n", + " 1146640, 1146644, 1146653, 1139615, 1140776, 1150497, 1150506, 1149216,\n", + " 1147949, 1155683, 1155689, 1143820, 1147473, 1147483, 1147486, 1142881,\n", + " 1144636, 1146992, 1146995, 1146996, 1134697, 1148343, 1150200, 1152664,\n", + " 1137220, 1155014, 1155018, 1139364, 1139373, 1139371, 1147202, 1136683,\n", + " 1136263, 1146371, 1134804, 1134810, 1138112, 1137254, 1138356, 1138362,\n", + " 1153467, 1140158, 1135913, 1140952, 1162456, 1135360, 1135367, 1135370,\n", + " 1135202, 1135903, 1154739, 1141036, 1136779, 1134794, 1157443, 1157450,\n", + " 1135953, 1143377, 1138504, 1137329, 1157103, 1137687, 1136618, 1136619,\n", + " 1144395, 1137534, 1157395, 1157397, 1137441, 1143317, 1137480, 1137025,\n", + " 1148481, 1148489, 1139161, 1135983, 1142596, 1141084, 1136111, 1155084,\n", + " 1156348, 1156350, 1138514, 1153099, 1153092, 1137957, 1138584, 1154132,\n", + " 1154128, 1156899, 1156909, 1138309, 1137287, 1138436, 1138440, 1138451,\n", + " 1138461, 1138449, 1138462, 1137924, 1136594, 1138846, 1156603, 1156606,\n", + " 1147112, 1142611, 1142612, 1135352, 1135359, 1135347, 1135618, 1135631,\n", + " 1138185, 1145843, 1137108, 1137109, 1139667, 1139668, 1139673, 1138070,\n", + " 1134992, 1142788, 1152651, 1152654, 1136730, 1158974, 1139315, 1153543,\n", + " 1153544, 1139933, 1137587, 1138647, 1138648, 1141964, 1134891, 1141997,\n", + " 1141985, 1152042, 1152044, 1136057, 1137734, 1137728, 1134922, 1134750,\n", + " 1136993, 1137000, 1135549, 1140228, 1141088, 1141097, 1141098, 1144138,\n", + " 1149001, 1139889, 1139642, 1143767, 1137298, 1137299, 1143711, 1139025,\n", + " 1149982, 1146844, 1135860, 1136426, 1140470, 1141112, 1142929, 1139386,\n", + " 1136917, 1143667, 1143678, 1143677, 1140601, 1140597, 1141786, 1136760,\n", + " 1144650, 1137075, 1138482, 1141821, 1143158, 1143153, 1153666, 1148864,\n", + " 1138708, 1140110, 1142913, 1144596, 1157416, 1136867, 1145298, 1144039,\n", + " 1140885, 1144182, 1150906, 1143753, 1137854, 1147153, 1141365, 1153062,\n", + " 1153068, 1163674, 1139022, 1144279, 1139508, 1139510, 1139773, 1140093,\n", + " 1139127, 1144998, 1145000, 1145001, 1145213, 1143779, 1164531, 1147896,\n", + " 1140976, 1140990, 1135047, 1147050, 1147047, 1145872, 1145873, 1143543,\n", + " 1152976, 1141925, 1141931, 1146901, 1144242, 1141846, 1137149, 1140695,\n", + " 1136891, 1143639, 1137571, 1141378, 1145974, 1146024, 1138085, 1146140,\n", + " 1154328, 1141646, 1149928, 1139990, 1143293, 1143294, 1147543, 1147540,\n", + " 1148763, 1148760, 1147282, 1147293, 1149155, 1147461, 1149372, 1139408,\n", + " 1149608, 1143040, 1136160, 1136836, 1136843, 1139328, 1142149, 1142153,\n", + " 1143345, 1144765, 1144753, 1144615, 1140844, 1144083, 1138592, 1135876,\n", + " 1150756, 1144319, 1135813, 1150294, 1146523, 1143967, 1138018, 1143460,\n", + " 1143457, 1143007, 1144291, 1140492, 1143949, 1147574, 1146634, 1146637,\n", + " 1147521, 1140364, 1137990, 1168914, 1149489, 1148962, 1147984, 1147999,\n", + " 1134902, 1144013, 1139252, 1147244, 1148704, 1141327, 1148476, 1147056,\n", + " 1149718, 1147025, 1142858, 1147970, 1158226, 1158235, 1149871, 1141137,\n", + " 1154526, 1145240, 1145751, 1142378, 1146157, 1146145, 1138638, 1148397,\n", + " 1146178, 1151242, 1148214, 1152531, 1150274, 1150445, 1149263, 1147954,\n", + " 1149791, 1144514, 1154816, 1147794, 1147807, 1151473, 1152022, 1154271,\n", + " 1135504, 1139914, 1146731, 1149530, 1147019, 1147021, 1141267, 1141269,\n", + " 1154979, 1148453, 1148448, 1147653, 1143560, 1149412, 1152068, 1152073,\n", + " 1152079, 1137716, 1137724, 1148623, 1164894, 1147856, 1139088, 1139096,\n", + " 1154420, 1158795, 1148188, 1138404, 1152435, 1151560, 1148720, 1148734,\n", + " 1147627, 1149810, 1148204, 1154203, 1153124, 1153192, 1153188, 1145104,\n", + " 1152962, 1152965, 1150935, 1144863, 1155093, 1147442, 1151821, 1152581,\n", + " 1154183, 1148505, 1148503, 1141420, 1136002, 1151351, 1151352, 1146967,\n", + " 1156402, 1149359, 1150219, 1146623, 1144468, 1144477, 1144466, 1144476,\n", + " 1152100, 1152103, 1146280, 1156325, 1153027, 1153030, 1153032, 1153038,\n", + " 1145546, 1145551, 1137746, 1146304, 1140521, 1155146, 1155140, 1136401,\n", + " 1149203, 1152819, 1155334, 1154123, 1157835, 1157824, 1152673, 1151582,\n", + " 1151617, 1150578, 1136134, 1148927, 1140935, 1146816, 1156826, 1156816,\n", + " 1146708, 1138279, 1138281, 1136028, 1158712, 1158704, 1140687, 1152928,\n", + " 1151064, 1137401, 1153918, 1150150, 1150164, 1149273, 1153691, 1148040,\n", + " 1149300, 1148907, 1145649, 1149798, 1137048, 1137054, 1148628, 1148633,\n", + " 1158530, 1137458, 1142047, 1156720, 1157229, 1158860, 1158916, 1157064,\n", + " 1157069, 1155422, 1152833, 1145187, 1137814, 1150465, 1149052, 1135733,\n", + " 1152183, 1152182, 1156629, 1150817, 1156935, 1153413, 1153415, 1147810,\n", + " 1143010, 1151469, 1158304, 1158306, 1158311, 1151271, 1155441, 1155452,\n", + " 1150130, 1150132, 1140865, 1154529, 1145771, 1142755, 1156207, 1156271,\n", + " 1151383, 1151379, 1158639, 1156649, 1155122, 1152527, 1155752, 1155755,\n", + " 1155756, 1151425, 1151432, 1135406, 1146913, 1145793, 1156463, 1158096,\n", + " 1154755, 1154766, 1155626, 1155628, 1156563, 1154550, 1154555, 1155576,\n", + " 1136469, 1158817, 1158824, 1158325, 1158335, 1155646, 1143254, 1143257,\n", + " 1154644, 1146935, 1162396, 1154250, 1154240, 1162190, 1156713, 1139625,\n", + " 1143189, 1150371, 1153320, 1150987, 1143517, 1157928, 1157934, 1151030,\n", + " 1157653, 1157650, 1158126, 1153786, 1159116, 1145681, 1134677, 1134685,\n", + " 1138215, 1149145, 1159258, 1140633, 1155717, 1152220, 1156693, 1140381,\n", + " 1140374, 1156017, 1157735, 1159130, 1144843, 1155971, 1155975, 1159956,\n", + " 1158846, 1156811, 1156812, 1161897, 1155393, 1149700, 1136899, 1136896,\n", + " 1158881, 1158882, 1158815, 1156778, 1151615, 1136494, 1136491, 1147585,\n", + " 1155309, 1156490, 1153808, 1136640, 1136646, 1144127, 1134757, 1140049,\n", + " 1166424, 1158555, 1153825, 1153827, 1146126, 1159943, 1158006, 1144584,\n", + " 1155521, 1161539, 1142487, 1142493, 1142666, 1162417, 1159052, 1144258,\n", + " 1159071, 1160563, 1186580, 1153052, 1153045, 1167176, 1166243, 1159368,\n", + " 1153842, 1156107, 1138384, 1138393, 1150046, 1149063, 1145948, 1145945,\n", + " 1155480, 1147300, 1157600, 1138161, 1164006, 1156789, 1156795, 1149956,\n", + " 1163396, 1139286, 1139295, 1166073, 1159985, 1157234, 1171515, 1157351,\n", + " 1146063, 1160178, 1158878, 1148600, 1148603, 1159646, 1151876, 1151872,\n", + " 1163201, 1158653, 1158655, 1156184, 1156189, 1159025, 1159026, 1159032,\n", + " 1171373, 1165596, 1143737, 1160607, 1155588, 1155597, 1164610, 1173744,\n", + " 1144327, 1151223, 1151227, 1138679, 1168428, 1147830, 1164580, 1144739,\n", + " 1166882, 1168067, 1153209, 1141471, 1151650, 1147426, 1147427, 1157050,\n", + " 1156739, 1165182, 1150649, 1171040, 1168750, 1144810, 1144812, 1153270,\n", + " 1164750, 1142722, 1142733, 1156293, 1165636, 1144058, 1161758, 1167780,\n", + " 1145736, 1145915, 1145228, 1155317, 1166462, 1138766, 1144972, 1144973,\n", + " 1146433, 1143038, 1165458, 1165746, 1147355, 1170502, 1170949, 1170952,\n", + " 1152624, 1139351, 1147723, 1147724, 1145902, 1153520, 1153534, 1152204,\n", + " 1175240, 1143402, 1149552, 1158724, 1158734, 1167503, 1154075, 1154076,\n", + " 1147330, 1145667, 1145674, 1192401, 1149130, 1169602, 1167817, 1193345,\n", + " 1155172, 1165023, 1165011, 1150515, 1150522, 1150518, 1156119, 1144346,\n", + " 1144336, 1157534, 1138382, 1138369, 1147746, 1154670, 1135845, 1169162,\n", + " 1157331, 1141051, 1141043, 1151664, 1147491, 1138609, 1158146, 1158154,\n", + " 1158611, 1158623, 1158054, 1157379, 1157380, 1165900, 1154871, 1165322,\n", + " 1155494, 1152353, 1152545, 1168451, 1149402, 1148666, 1148335, 1148324,\n", + " 1177984, 1168906, 1147504, 1173307, 1189233, 1169144, 1154027, 1169572,\n", + " 1151208, 1157153, 1167232, 1147711, 1148128, 1157598, 1181019, 1168691,\n", + " 1168817, 1168604, 1175418, 1140326, 1140330, 1166028, 1143240, 1160150,\n", + " 1178201, 1159091, 1181765, 1181772, 1177177, 1150234, 1161588, 1154151,\n", + " 1154148, 1149169, 1149176, 1172461, 1184634, 1178610, 1186117, 1143279,\n", + " 1168481, 1143420, 1179243, 1177262, 1184597, 1153792, 1153803, 1178171,\n", + " 1153141, 1181678, 1164826, 1177155, 1161024, 1153628, 1183135, 1180916,\n", + " 1184093, 1151519, 1168779, 1158030, 1161255, 1155262, 1154705, 1157792,\n", + " 1157795, 1171623, 1164044, 1155799, 1190803, 1157124, 1157133, 1157992,\n", + " 1157991, 1182011, 1153889, 1153898, 1153902, 1154500, 1182486, 1160009,\n", + " 1145626, 1178028, 1161911, 1149755, 1181345, 1186052, 1181143, 1158512,\n", + " 1158513, 1158379, 1155899, 1184317, 1164798, 1162253, 1180517, 1168621,\n", + " 1187382, 1188723, 1146161, 1141516, 1182318, 1171015, 1156528, 1190733,\n", + " 1165024, 1139828, 1139831, 1139837, 1150265, 1154812, 1149668, 1194512,\n", + " 1156055, 1180127, 1146392, 1146394, 1146395, 1173058, 1194023, 1186703,\n", + " 1166325, 1183383, 1190444, 1193456, 1188912, 1151774, 1153733, 1169781,\n", + " 1169707, 1166841, 1166838, 1173330, 1171201, 1150406, 1161186, 1194059,\n", + " 1156681, 1172423, 1178135, 1152092, 1155959, 1155962, 1174034, 1179768,\n", + " 1179769, 1183297, 1188305, 1181033, 1184941, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1137212, 1141424, 1140282, 1140284, 1140285, 1136347, 1136349,\n", + " 1135723, 1139698, 1141758, 1138335, 1136223, 1141251, 1140297, 1136969,\n", + " 1136971, 1143615, 1145373, 1145989, 1145993, 1138942, 1143372, 1143363,\n", + " 1146640, 1146644, 1146653, 1139615, 1140776, 1150497, 1150506, 1149216,\n", + " 1147949, 1155683, 1155689, 1143820, 1147473, 1147483, 1147486, 1142881,\n", + " 1144636, 1146992, 1146995, 1146996, 1134697, 1148343, 1150200, 1152664,\n", + " 1137220, 1155014, 1155018, 1139364, 1139373, 1139371, 1147202, 1136683,\n", + " 1136263, 1146371, 1134804, 1134810, 1138112, 1137254, 1138356, 1138362,\n", + " 1153467, 1140158, 1135913, 1140952, 1162456, 1135360, 1135367, 1135370,\n", + " 1135202, 1135903, 1154739, 1141036, 1136779, 1134794, 1157443, 1157450,\n", + " 1135953, 1143377, 1138504, 1137329, 1157103, 1137687, 1136618, 1136619,\n", + " 1144395, 1137534, 1157395, 1157397, 1137441, 1143317, 1137480, 1137025,\n", + " 1148481, 1148489, 1139161, 1135983, 1142596, 1141084, 1136111, 1155084,\n", + " 1156348, 1156350, 1138514, 1153099, 1153092, 1137957, 1138584, 1154132,\n", + " 1154128, 1156899, 1156909, 1138309, 1137287, 1138436, 1138440, 1138451,\n", + " 1138461, 1138449, 1138462, 1137924, 1136594, 1138846, 1156603, 1156606,\n", + " 1147112, 1142611, 1142612, 1135352, 1135359, 1135347, 1135618, 1135631,\n", + " 1138185, 1145843, 1137108, 1137109, 1139667, 1139668, 1139673, 1138070,\n", + " 1134992, 1142788, 1152651, 1152654, 1136730, 1158974, 1139315, 1153543,\n", + " 1153544, 1139933, 1137587, 1138647, 1138648, 1141964, 1134891, 1141997,\n", + " 1141985, 1152042, 1152044, 1136057, 1137734, 1137728, 1134922, 1134750,\n", + " 1136993, 1137000, 1135549, 1140228, 1141088, 1141097, 1141098, 1144138,\n", + " 1149001, 1139889, 1139642, 1143767, 1137298, 1137299, 1143711, 1139025,\n", + " 1149982, 1146844, 1135860, 1136426, 1140470, 1141112, 1142929, 1139386,\n", + " 1136917, 1143667, 1143678, 1143677, 1140601, 1140597, 1141786, 1136760,\n", + " 1144650, 1137075, 1138482, 1141821, 1143158, 1143153, 1153666, 1148864,\n", + " 1138708, 1140110, 1142913, 1144596, 1157416, 1136867, 1145298, 1144039,\n", + " 1140885, 1144182, 1150906, 1143753, 1137854, 1147153, 1141365, 1153062,\n", + " 1153068, 1163674, 1139022, 1144279, 1139508, 1139510, 1139773, 1140093,\n", + " 1139127, 1144998, 1145000, 1145001, 1145213, 1143779, 1164531, 1147896,\n", + " 1140976, 1140990, 1135047, 1147050, 1147047, 1145872, 1145873, 1143543,\n", + " 1152976, 1141925, 1141931, 1146901, 1144242, 1141846, 1137149, 1140695,\n", + " 1136891, 1143639, 1137571, 1141378, 1145974, 1146024, 1138085, 1146140,\n", + " 1154328, 1141646, 1149928, 1139990, 1143293, 1143294, 1147543, 1147540,\n", + " 1148763, 1148760, 1147282, 1147293, 1149155, 1147461, 1149372, 1139408,\n", + " 1149608, 1143040, 1136160, 1136836, 1136843, 1139328, 1142149, 1142153,\n", + " 1143345, 1144765, 1144753, 1144615, 1140844, 1144083, 1138592, 1135876,\n", + " 1150756, 1144319, 1135813, 1150294, 1146523, 1143967, 1138018, 1143460,\n", + " 1143457, 1143007, 1144291, 1140492, 1143949, 1147574, 1146634, 1146637,\n", + " 1147521, 1140364, 1137990, 1168914, 1149489, 1148962, 1147984, 1147999,\n", + " 1134902, 1144013, 1139252, 1147244, 1148704, 1141327, 1148476, 1147056,\n", + " 1149718, 1147025, 1142858, 1147970, 1158226, 1158235, 1149871, 1141137,\n", + " 1154526, 1145240, 1145751, 1142378, 1146157, 1146145, 1138638, 1148397,\n", + " 1146178, 1151242, 1148214, 1152531, 1150274, 1150445, 1149263, 1147954,\n", + " 1149791, 1144514, 1154816, 1147794, 1147807, 1151473, 1152022, 1154271,\n", + " 1135504, 1139914, 1146731, 1149530, 1147019, 1147021, 1141267, 1141269,\n", + " 1154979, 1148453, 1148448, 1147653, 1143560, 1149412, 1152068, 1152073,\n", + " 1152079, 1137716, 1137724, 1148623, 1164894, 1147856, 1139088, 1139096,\n", + " 1154420, 1158795, 1148188, 1138404, 1152435, 1151560, 1148720, 1148734,\n", + " 1147627, 1149810, 1148204, 1154203, 1153124, 1153192, 1153188, 1145104,\n", + " 1152962, 1152965, 1150935, 1144863, 1155093, 1147442, 1151821, 1152581,\n", + " 1154183, 1148505, 1148503, 1141420, 1136002, 1151351, 1151352, 1146967,\n", + " 1156402, 1149359, 1150219, 1146623, 1144468, 1144477, 1144466, 1144476,\n", + " 1152100, 1152103, 1146280, 1156325, 1153027, 1153030, 1153032, 1153038,\n", + " 1145546, 1145551, 1137746, 1146304, 1140521, 1155146, 1155140, 1136401,\n", + " 1149203, 1152819, 1155334, 1154123, 1157835, 1157824, 1152673, 1151582,\n", + " 1151617, 1150578, 1136134, 1148927, 1140935, 1146816, 1156826, 1156816,\n", + " 1146708, 1138279, 1138281, 1136028, 1158712, 1158704, 1140687, 1152928,\n", + " 1151064, 1137401, 1153918, 1150150, 1150164, 1149273, 1153691, 1148040,\n", + " 1149300, 1148907, 1145649, 1149798, 1137048, 1137054, 1148628, 1148633,\n", + " 1158530, 1137458, 1142047, 1156720, 1157229, 1158860, 1158916, 1157064,\n", + " 1157069, 1155422, 1152833, 1145187, 1137814, 1150465, 1149052, 1135733,\n", + " 1152183, 1152182, 1156629, 1150817, 1156935, 1153413, 1153415, 1147810,\n", + " 1143010, 1151469, 1158304, 1158306, 1158311, 1151271, 1155441, 1155452,\n", + " 1150130, 1150132, 1140865, 1154529, 1145771, 1142755, 1156207, 1156271,\n", + " 1151383, 1151379, 1158639, 1156649, 1155122, 1152527, 1155752, 1155755,\n", + " 1155756, 1151425, 1151432, 1135406, 1146913, 1145793, 1156463, 1158096,\n", + " 1154755, 1154766, 1155626, 1155628, 1156563, 1154550, 1154555, 1155576,\n", + " 1136469, 1158817, 1158824, 1158325, 1158335, 1155646, 1143254, 1143257,\n", + " 1154644, 1146935, 1162396, 1154250, 1154240, 1162190, 1156713, 1139625,\n", + " 1143189, 1150371, 1153320, 1150987, 1143517, 1157928, 1157934, 1151030,\n", + " 1157653, 1157650, 1158126, 1153786, 1159116, 1145681, 1134677, 1134685,\n", + " 1138215, 1149145, 1159258, 1140633, 1155717, 1152220, 1156693, 1140381,\n", + " 1140374, 1156017, 1157735, 1159130, 1144843, 1155971, 1155975, 1159956,\n", + " 1158846, 1156811, 1156812, 1161897, 1155393, 1149700, 1136899, 1136896,\n", + " 1158881, 1158882, 1158815, 1156778, 1151615, 1136494, 1136491, 1147585,\n", + " 1155309, 1156490, 1153808, 1136640, 1136646, 1144127, 1134757, 1140049,\n", + " 1166424, 1158555, 1153825, 1153827, 1146126, 1159943, 1158006, 1144584,\n", + " 1155521, 1161539, 1142487, 1142493, 1142666, 1162417, 1159052, 1144258,\n", + " 1159071, 1160563, 1186580, 1153052, 1153045, 1167176, 1166243, 1159368,\n", + " 1153842, 1156107, 1138384, 1138393, 1150046, 1149063, 1145948, 1145945,\n", + " 1155480, 1147300, 1157600, 1138161, 1164006, 1156789, 1156795, 1149956,\n", + " 1163396, 1139286, 1139295, 1166073, 1159985, 1157234, 1171515, 1157351,\n", + " 1146063, 1160178, 1158878, 1148600, 1148603, 1159646, 1151876, 1151872,\n", + " 1163201, 1158653, 1158655, 1156184, 1156189, 1159025, 1159026, 1159032,\n", + " 1171373, 1165596, 1143737, 1160607, 1155588, 1155597, 1164610, 1173744,\n", + " 1144327, 1151223, 1151227, 1138679, 1168428, 1147830, 1164580, 1144739,\n", + " 1166882, 1168067, 1153209, 1141471, 1151650, 1147426, 1147427, 1157050,\n", + " 1156739, 1165182, 1150649, 1171040, 1168750, 1144810, 1144812, 1153270,\n", + " 1164750, 1142722, 1142733, 1156293, 1165636, 1144058, 1161758, 1167780,\n", + " 1145736, 1145915, 1145228, 1155317, 1166462, 1138766, 1144972, 1144973,\n", + " 1146433, 1143038, 1165458, 1165746, 1147355, 1170502, 1170949, 1170952,\n", + " 1152624, 1139351, 1147723, 1147724, 1145902, 1153520, 1153534, 1152204,\n", + " 1175240, 1143402, 1149552, 1158724, 1158734, 1167503, 1154075, 1154076,\n", + " 1147330, 1145667, 1145674, 1192401, 1149130, 1169602, 1167817, 1193345,\n", + " 1155172, 1165023, 1165011, 1150515, 1150522, 1150518, 1156119, 1144346,\n", + " 1144336, 1157534, 1138382, 1138369, 1147746, 1154670, 1135845, 1169162,\n", + " 1157331, 1141051, 1141043, 1151664, 1147491, 1138609, 1158146, 1158154,\n", + " 1158611, 1158623, 1158054, 1157379, 1157380, 1165900, 1154871, 1165322,\n", + " 1155494, 1152353, 1152545, 1168451, 1149402, 1148666, 1148335, 1148324,\n", + " 1177984, 1168906, 1147504, 1173307, 1189233, 1169144, 1154027, 1169572,\n", + " 1151208, 1157153, 1167232, 1147711, 1148128, 1157598, 1181019, 1168691,\n", + " 1168817, 1168604, 1175418, 1140326, 1140330, 1166028, 1143240, 1160150,\n", + " 1178201, 1159091, 1181765, 1181772, 1177177, 1150234, 1161588, 1154151,\n", + " 1154148, 1149169, 1149176, 1172461, 1184634, 1178610, 1186117, 1143279,\n", + " 1168481, 1143420, 1179243, 1177262, 1184597, 1153792, 1153803, 1178171,\n", + " 1153141, 1181678, 1164826, 1177155, 1161024, 1153628, 1183135, 1180916,\n", + " 1184093, 1151519, 1168779, 1158030, 1161255, 1155262, 1154705, 1157792,\n", + " 1157795, 1171623, 1164044, 1155799, 1190803, 1157124, 1157133, 1157992,\n", + " 1157991, 1182011, 1153889, 1153898, 1153902, 1154500, 1182486, 1160009,\n", + " 1145626, 1178028, 1161911, 1149755, 1181345, 1186052, 1181143, 1158512,\n", + " 1158513, 1158379, 1155899, 1184317, 1164798, 1162253, 1180517, 1168621,\n", + " 1187382, 1188723, 1146161, 1141516, 1182318, 1171015, 1156528, 1190733,\n", + " 1165024, 1139828, 1139831, 1139837, 1150265, 1154812, 1149668, 1194512,\n", + " 1156055, 1180127, 1146392, 1146394, 1146395, 1173058, 1194023, 1186703,\n", + " 1166325, 1183383, 1190444, 1193456, 1188912, 1151774, 1153733, 1169781,\n", + " 1169707, 1166841, 1166838, 1173330, 1171201, 1150406, 1161186, 1194059,\n", + " 1156681, 1172423, 1178135, 1152092, 1155959, 1155962, 1174034, 1179768,\n", + " 1179769, 1183297, 1188305, 1181033, 1184941, 1157022], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197719, 1198725, 1195860, 1199282, 1201577, 1201462, 1199278, 1202119,\n", + " 1194626, 1200644, 1197791, 1201015, 1201016, 1197512, 1194879, 1198188,\n", + " 1194770, 1194783, 1194648, 1195263, 1201992, 1196030, 1198543, 1197697,\n", + " 1201427, 1199519, 1198095, 1194952, 1194880, 1195895, 1202899, 1195740,\n", + " 1196334, 1196359, 1199371, 1195148, 1195223, 1195265, 1195278, 1197367,\n", + " 1196109, 1198219, 1195038, 1195659, 1195541, 1198203, 1196122, 1197640,\n", + " 1195918, 1200949, 1200959, 1199060, 1197291, 1199185, 1196851, 1194928,\n", + " 1195119, 1197583, 1199685, 1199628, 1202379, 1197990, 1198400, 1200748,\n", + " 1199231, 1201908, 1194795, 1201511, 1196501, 1199018, 1199021, 1195807,\n", + " 1197601, 1201117, 1196727, 1195773, 1198416, 1198428, 1198811, 1199555,\n", + " 1201827, 1200503, 1200507, 1198593, 1201156, 1202630, 1201056, 1200913,\n", + " 1200918, 1200363, 1201737, 1200521, 1202043, 1199532, 1200546, 1200553,\n", + " 1200429, 1199886, 1199887, 1202138, 1199908, 1196779, 1202239, 1202338,\n", + " 1202175, 1197546, 1195876, 1201291, 1201871, 1199929, 1201800, 1200997,\n", + " 1200785, 1195431, 1203113, 1195664, 1200684, 1198901, 1198911, 1201786,\n", + " 1195181, 1200928, 1197816, 1197822, 1197821, 1201499, 1196597, 1197406,\n", + " 1198973, 1195280, 1199659, 1199469, 1198147, 1197735, 1200437, 1201001,\n", + " 1201196, 1195066, 1201879, 1201886, 1200301, 1197652, 1197655, 1197343,\n", + " 1195082, 1197039, 1201877, 1203162], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197719, 1198725, 1195860, 1199282, 1201577, 1201462, 1199278, 1202119,\n", + " 1194626, 1200644, 1197791, 1201015, 1201016, 1197512, 1194879, 1198188,\n", + " 1194770, 1194783, 1194648, 1195263, 1201992, 1196030, 1198543, 1197697,\n", + " 1201427, 1199519, 1198095, 1194952, 1194880, 1195895, 1202899, 1195740,\n", + " 1196334, 1196359, 1199371, 1195148, 1195223, 1195265, 1195278, 1197367,\n", + " 1196109, 1198219, 1195038, 1195659, 1195541, 1198203, 1196122, 1197640,\n", + " 1195918, 1200949, 1200959, 1199060, 1197291, 1199185, 1196851, 1194928,\n", + " 1195119, 1197583, 1199685, 1199628, 1202379, 1197990, 1198400, 1200748,\n", + " 1199231, 1201908, 1194795, 1201511, 1196501, 1199018, 1199021, 1195807,\n", + " 1197601, 1201117, 1196727, 1195773, 1198416, 1198428, 1198811, 1199555,\n", + " 1201827, 1200503, 1200507, 1198593, 1201156, 1202630, 1201056, 1200913,\n", + " 1200918, 1200363, 1201737, 1200521, 1202043, 1199532, 1200546, 1200553,\n", + " 1200429, 1199886, 1199887, 1202138, 1199908, 1196779, 1202239, 1202338,\n", + " 1202175, 1197546, 1195876, 1201291, 1201871, 1199929, 1201800, 1200997,\n", + " 1200785, 1195431, 1203113, 1195664, 1200684, 1198901, 1198911, 1201786,\n", + " 1195181, 1200928, 1197816, 1197822, 1197821, 1201499, 1196597, 1197406,\n", + " 1198973, 1195280, 1199659, 1199469, 1198147, 1197735, 1200437, 1201001,\n", + " 1201196, 1195066, 1201879, 1201886, 1200301, 1197652, 1197655, 1197343,\n", + " 1195082, 1197039, 1201877, 1203162], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 2.2190e-01, -2.9643e-04, 6.8702e-01, ..., 6.0376e-02,\n", + " -1.7294e-03, -5.1916e-03],\n", + " [ 1.3659e-01, -3.0611e-04, 5.0116e-01, ..., 8.5440e-02,\n", + " -1.8291e-03, -3.8336e-03],\n", + " [ 1.3521e-01, -2.7193e-05, 5.2084e-01, ..., 5.6667e-02,\n", + " -1.4402e-03, -3.7342e-03],\n", + " ...,\n", + " [ 1.5370e-01, -5.2390e-04, 5.4426e-01, ..., 8.6551e-02,\n", + " -1.9719e-03, -4.2379e-03],\n", + " [ 1.3815e-01, -4.6317e-04, 5.2167e-01, ..., 8.0078e-02,\n", + " -1.7564e-03, -3.9690e-03],\n", + " [ 3.0830e-01, -6.6109e-04, 8.9918e-01, ..., 5.4877e-02,\n", + " -1.5197e-03, -6.6904e-03]], device='cuda:0'), 'paper': tensor([[-1.7755e-03, 8.1362e-01, 4.6639e-01, ..., -1.1908e-02,\n", + " -1.9373e-02, -3.3049e-03],\n", + " [-2.5989e-02, 5.3035e-01, 2.6410e+00, ..., -1.1773e-02,\n", + " -2.9264e-02, -3.3874e-02],\n", + " [-8.4460e-03, 1.5612e+00, 2.4955e+00, ..., 3.3666e-01,\n", + " -3.1297e-02, -2.3812e-03],\n", + " ...,\n", + " [-1.4154e-02, 1.2589e+00, 1.2971e+00, ..., 6.4665e-01,\n", + " -2.5337e-02, -1.3085e-02],\n", + " [-2.2448e-02, -1.7366e-03, 2.1706e+00, ..., -1.0820e-02,\n", + " -2.7125e-02, -3.2089e-02],\n", + " [-7.6908e-03, 3.4400e+00, 2.1250e+00, ..., 4.8148e+00,\n", + " -5.0230e-02, 2.6402e+00]], device='cuda:0'), 'author': tensor([[-1.2460e-03, 1.7343e-01, 2.3474e-01, ..., 1.3358e+00,\n", + " 3.2012e-01, -6.8377e-04],\n", + " [-3.6925e-03, 2.5982e-01, 1.8030e-01, ..., 1.1523e+00,\n", + " -1.9580e-03, -5.3305e-03],\n", + " [-1.0739e-03, 2.1111e-01, 1.5257e-01, ..., 1.2862e+00,\n", + " 5.5421e-01, -2.3579e-04],\n", + " ...,\n", + " [-1.7663e-03, 3.2159e-01, 4.5293e-02, ..., 1.3118e+00,\n", + " 2.6670e-01, -1.1134e-03],\n", + " [-1.5535e-03, 1.6750e-01, 1.8119e-01, ..., 1.2777e+00,\n", + " 2.7676e-01, -1.2060e-03],\n", + " [-9.4491e-04, 2.0106e-01, 1.6584e-01, ..., 1.2616e+00,\n", + " 3.6609e-01, -4.0269e-04]], device='cuda:0'), 'field_of_study': tensor([[-0.0020, 0.5824, 0.1733, ..., -0.0088, 0.3973, 0.4810],\n", + " [-0.0033, 0.6516, 0.2372, ..., -0.0078, 0.2553, 0.5179],\n", + " [-0.0026, 0.5272, 0.1245, ..., -0.0075, 0.4058, 0.4504],\n", + " ...,\n", + " [-0.0025, 0.5709, 0.2101, ..., -0.0079, 0.2427, 0.4656],\n", + " [-0.0007, 0.6216, 0.3088, ..., -0.0105, 0.4703, 0.3949],\n", + " [ 0.0894, 0.6140, 0.2660, ..., -0.0097, 0.4034, 0.1083]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 166, 117, 221, 221, 253, 253, 457, 457, 330, 457, 378, 417,\n", + " 417, 817, 911, 911, 1064, 1097, 969, 823, 1167, 940, 1247, 1247,\n", + " 1003, 1095, 1678, 1434, 1551, 1460, 1444, 1444, 1420, 1464, 1444, 1444,\n", + " 1444, 1636, 1444, 1441, 1441, 1441, 1755, 1668, 1668, 1862, 1645, 1866,\n", + " 1901, 1901, 1901, 1752, 1752, 1825, 1825, 1814, 1887, 1969, 2112, 2116,\n", + " 2132, 2166, 2166, 2112, 2348, 2306, 2319, 2319, 2319, 2320, 2319, 2320,\n", + " 2320, 2274, 2567, 2590, 2463, 2463, 2494, 2494, 2621, 2645, 2600, 2600,\n", + " 2894, 2766, 2846, 2846, 2878, 2878, 2893, 2893, 2767, 2767, 2896, 2896,\n", + " 2896, 3413, 3413, 3102, 3247, 3230, 3122, 3101, 3101, 3101, 3101, 3101,\n", + " 2857, 3243, 3145, 3241, 3004, 3069, 3276, 3220, 3278, 3375, 3329, 3545,\n", + " 3287, 3540, 3550, 3646, 3646, 3660, 3826, 3686, 3660, 3660, 3670, 3914,\n", + " 3778, 3778, 4099, 4099, 3883, 3916, 3916, 4001, 3891, 4048, 4038, 4223,\n", + " 4130, 4128, 4128, 4128, 4272, 4314, 4314, 4452, 4452, 4520, 4502, 4500,\n", + " 4603, 4567, 4567, 4738, 4706, 4679, 4662, 4662, 4694, 4841, 4738, 4738,\n", + " 5094, 4860, 5314, 5314, 5047, 5274, 5411, 5489, 5684, 5709, 5613, 5510,\n", + " 5899, 5961, 5862, 5862, 5862, 5880, 5800, 5788, 6030, 5627, 5627, 5627,\n", + " 5627, 5797, 5797, 5797, 5991, 6084, 6147, 6147, 6264, 6264, 6264, 5850,\n", + " 5850, 5975, 5987, 6138, 6159, 6178, 6600, 6631, 6458, 6496, 6607, 6607,\n", + " 6479],\n", + " [ 55, 143, 9, 11, 100, 4, 64, 72, 56, 36, 134, 119,\n", + " 27, 1, 121, 106, 5, 50, 43, 111, 21, 19, 114, 123,\n", + " 126, 49, 74, 132, 27, 74, 58, 130, 86, 27, 32, 64,\n", + " 29, 10, 35, 110, 138, 30, 53, 135, 77, 53, 48, 28,\n", + " 47, 71, 123, 51, 101, 14, 129, 41, 99, 89, 69, 39,\n", + " 66, 117, 87, 140, 26, 23, 89, 8, 122, 55, 0, 105,\n", + " 61, 79, 8, 129, 67, 90, 2, 103, 37, 8, 17, 73,\n", + " 110, 122, 59, 54, 92, 91, 89, 113, 135, 98, 16, 94,\n", + " 102, 80, 75, 74, 74, 112, 34, 20, 106, 3, 121, 15,\n", + " 145, 46, 95, 13, 63, 18, 53, 136, 115, 57, 76, 6,\n", + " 118, 124, 59, 135, 77, 77, 65, 116, 128, 86, 127, 7,\n", + " 50, 133, 16, 55, 135, 142, 97, 44, 144, 4, 78, 53,\n", + " 70, 0, 24, 135, 125, 3, 84, 135, 77, 64, 74, 127,\n", + " 46, 88, 114, 45, 141, 146, 94, 102, 102, 55, 96, 81,\n", + " 108, 107, 25, 61, 12, 78, 16, 85, 64, 57, 78, 82,\n", + " 100, 74, 120, 27, 52, 131, 86, 22, 139, 104, 107, 80,\n", + " 75, 102, 72, 60, 50, 126, 137, 33, 68, 40, 93, 107,\n", + " 51, 83, 74, 74, 10, 147, 38, 61, 42, 75, 31, 62,\n", + " 109]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1574, 1328, 1801, ..., 1753, 413, 3176],\n", + " [ 126, 11, 126, ..., 7977, 7994, 7907]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 75, 79, 79, ..., 92, 16, 16],\n", + " [ 12, 109, 144, ..., 6687, 6612, 6641]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 12, 12, 12, ..., 7860, 7944, 7944],\n", + " [ 249, 250, 324, ..., 641, 261, 31]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 590, 324, 883, ..., 730, 249, 248],\n", + " [ 112, 85, 198, ..., 7968, 7943, 7980]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3893, 6756, 5791, ..., 3364, 5037, 5733],\n", + " [ 108, 81, 215, ..., 6610, 6640, 6655]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 179, 12, 12, ..., 7944, 7944, 7944],\n", + " [5845, 133, 2729, ..., 5180, 6020, 6367]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 146, 146, 146, ..., 6600, 6631, 6631],\n", + " [3904, 5033, 5066, ..., 5668, 338, 646]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.003618\n", + "sampling 0.003537\n", + "noi time: 0.000688\n", + "get_vertex_data call: 0.013841\n", + "noi group time: 0.001783\n", + "eoi_group_time: 0.011014\n", + "second half: 0.129893\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27122, 31571, 23798, ..., 1133072, 1120124, 1118697],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27122, 31571, 23798, ..., 1133072, 1120124, 1118697],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1224382, 1211783, ..., 1934142, 1925032, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1224382, 1211783, ..., 1934142, 1925032, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136510, 1141424, 1136228, 1136230, 1140785, 1139698, 1141756, 1136208,\n", + " 1136212, 1140297, 1136963, 1136969, 1136971, 1139808, 1145992, 1145999,\n", + " 1139141, 1143372, 1143363, 1139241, 1146641, 1146647, 1149216, 1149228,\n", + " 1142959, 1147942, 1155683, 1155689, 1143820, 1147473, 1147483, 1149038,\n", + " 1134700, 1148337, 1146656, 1148546, 1153220, 1153231, 1147089, 1155014,\n", + " 1147211, 1136676, 1136685, 1150324, 1152427, 1134806, 1151545, 1138112,\n", + " 1137254, 1137257, 1151531, 1140159, 1135913, 1140949, 1140954, 1135367,\n", + " 1135202, 1140765, 1154739, 1134965, 1134960, 1141036, 1134794, 1136518,\n", + " 1138504, 1136178, 1143064, 1157103, 1137693, 1136609, 1144395, 1137529,\n", + " 1157395, 1157405, 1157397, 1152376, 1136662, 1143317, 1136195, 1136204,\n", + " 1156159, 1156150, 1148481, 1148484, 1139161, 1134841, 1141702, 1135583,\n", + " 1148860, 1135670, 1140970, 1140712, 1156342, 1153099, 1137957, 1138590,\n", + " 1138305, 1157703, 1138436, 1138440, 1138445, 1138443, 1138451, 1138461,\n", + " 1138449, 1154787, 1136594, 1138881, 1156603, 1156606, 1147119, 1142611,\n", + " 1135631, 1156141, 1145843, 1148531, 1150956, 1139846, 1139667, 1134992,\n", + " 1136551, 1148805, 1158974, 1142906, 1142909, 1141069, 1153548, 1140034,\n", + " 1139929, 1137587, 1137598, 1141963, 1153396, 1155648, 1146075, 1152042,\n", + " 1152044, 1137734, 1137728, 1147316, 1135547, 1136695, 1140228, 1141100,\n", + " 1144130, 1139898, 1139889, 1141980, 1143767, 1152711, 1141115, 1142932,\n", + " 1141891, 1139386, 1136917, 1140598, 1140607, 1141785, 1141786, 1152725,\n", + " 1139495, 1168566, 1141609, 1144650, 1147850, 1137072, 1137074, 1142050,\n", + " 1141821, 1143153, 1146787, 1153666, 1145161, 1140160, 1158746, 1158749,\n", + " 1138469, 1141479, 1138708, 1140110, 1142913, 1137661, 1137662, 1143113,\n", + " 1144596, 1141574, 1140885, 1144182, 1150906, 1139559, 1158698, 1147153,\n", + " 1142640, 1141365, 1141367, 1141664, 1149101, 1144279, 1139510, 1139773,\n", + " 1138815, 1139127, 1145200, 1140619, 1140985, 1140990, 1147050, 1145873,\n", + " 1149876, 1143543, 1143551, 1152976, 1152980, 1135457, 1141925, 1146898,\n", + " 1144245, 1144242, 1140585, 1150692, 1140690, 1136891, 1143643, 1134851,\n", + " 1143851, 1146019, 1146024, 1138085, 1146140, 1154328, 1149928, 1149930,\n", + " 1141235, 1139990, 1146302, 1143293, 1143283, 1143294, 1150417, 1147543,\n", + " 1147545, 1148763, 1147282, 1147290, 1142816, 1136330, 1140341, 1143663,\n", + " 1142637, 1149366, 1149372, 1143051, 1136160, 1157720, 1136836, 1144768,\n", + " 1141496, 1144957, 1143345, 1144765, 1144619, 1145808, 1140844, 1137098,\n", + " 1135876, 1146523, 1143456, 1143470, 1143457, 1143937, 1146636, 1147530,\n", + " 1140360, 1140364, 1143082, 1149490, 1166410, 1144219, 1147984, 1147999,\n", + " 1146949, 1134902, 1139252, 1139249, 1147131, 1154481, 1148704, 1141319,\n", + " 1148468, 1153701, 1152328, 1147263, 1147970, 1139549, 1158226, 1158231,\n", + " 1158238, 1147880, 1154526, 1145240, 1145751, 1142370, 1142369, 1146159,\n", + " 1138626, 1138635, 1148394, 1146178, 1146188, 1148214, 1148223, 1150274,\n", + " 1150438, 1150445, 1149791, 1144526, 1138044, 1150342, 1151994, 1165252,\n", + " 1147794, 1151480, 1139906, 1146723, 1142286, 1150113, 1147021, 1147009,\n", + " 1153152, 1158944, 1141949, 1148744, 1149991, 1147653, 1143564, 1148300,\n", + " 1154430, 1154420, 1158798, 1151363, 1152561, 1136247, 1139721, 1146682,\n", + " 1152435, 1157968, 1148720, 1148725, 1148729, 1144110, 1146549, 1148204,\n", + " 1153124, 1153197, 1168628, 1150932, 1143092, 1150356, 1148084, 1143129,\n", + " 1143133, 1147447, 1151816, 1152581, 1135307, 1135309, 1151917, 1148498,\n", + " 1146571, 1146565, 1141420, 1151345, 1155152, 1147737, 1155059, 1146975,\n", + " 1149359, 1146623, 1144468, 1152409, 1146287, 1150080, 1150090, 1145539,\n", + " 1137746, 1146304, 1155140, 1136401, 1136402, 1152826, 1155337, 1154119,\n", + " 1152673, 1151580, 1151582, 1151573, 1151621, 1151617, 1145278, 1136134,\n", + " 1136140, 1151440, 1148916, 1153387, 1145966, 1152233, 1152903, 1152341,\n", + " 1152342, 1156826, 1156816, 1153311, 1136023, 1136028, 1158704, 1151064,\n", + " 1143476, 1137396, 1160557, 1148033, 1148040, 1149300, 1148628, 1158530,\n", + " 1137458, 1149942, 1149947, 1153074, 1153085, 1142041, 1143444, 1157547,\n", + " 1142385, 1158916, 1158920, 1152397, 1157069, 1157071, 1155408, 1155418,\n", + " 1137814, 1139473, 1138830, 1156638, 1157914, 1153413, 1147810, 1158308,\n", + " 1158311, 1151271, 1151342, 1155441, 1161738, 1153359, 1162120, 1144361,\n", + " 1154530, 1154542, 1156919, 1142755, 1156207, 1151379, 1137918, 1155122,\n", + " 1155123, 1157174, 1149321, 1155755, 1151431, 1135396, 1135406, 1145806,\n", + " 1156460, 1154763, 1155626, 1155628, 1155630, 1156563, 1158824, 1158325,\n", + " 1155646, 1143254, 1143263, 1154240, 1156711, 1143188, 1143189, 1150371,\n", + " 1153325, 1157424, 1150068, 1143508, 1159629, 1137152, 1158578, 1153786,\n", + " 1149907, 1134677, 1134683, 1135601, 1145514, 1145515, 1148148, 1148149,\n", + " 1148159, 1150671, 1157684, 1146325, 1149138, 1156092, 1152220, 1152498,\n", + " 1140380, 1140381, 1156016, 1144843, 1142471, 1155971, 1155975, 1155393,\n", + " 1155404, 1154600, 1160163, 1153503, 1136905, 1136896, 1158753, 1158882,\n", + " 1158886, 1158891, 1140222, 1158815, 1158442, 1156778, 1156779, 1152463,\n", + " 1151615, 1136494, 1164181, 1153635, 1159241, 1147586, 1155301, 1183098,\n", + " 1157249, 1136640, 1134757, 1140049, 1166421, 1158545, 1158558, 1156516,\n", + " 1154339, 1154345, 1158006, 1155521, 1155529, 1155528, 1161539, 1164272,\n", + " 1142663, 1142666, 1159052, 1144258, 1164335, 1159146, 1160563, 1162044,\n", + " 1153043, 1153052, 1153045, 1167172, 1162835, 1155769, 1142875, 1153841,\n", + " 1153842, 1138393, 1160646, 1149063, 1149070, 1145948, 1153514, 1162358,\n", + " 1164012, 1156787, 1149963, 1139295, 1140735, 1146059, 1171249, 1164052,\n", + " 1170415, 1169493, 1148600, 1148603, 1148607, 1168082, 1164979, 1170236,\n", + " 1151875, 1155816, 1158643, 1158653, 1159032, 1152247, 1163972, 1160600,\n", + " 1155588, 1151227, 1138679, 1153924, 1153931, 1153932, 1147397, 1147836,\n", + " 1146500, 1146509, 1153239, 1144739, 1155268, 1165415, 1141471, 1141459,\n", + " 1147427, 1159386, 1156737, 1156739, 1153663, 1150648, 1163260, 1150308,\n", + " 1144810, 1144812, 1153271, 1168850, 1135554, 1164741, 1148675, 1169282,\n", + " 1154700, 1146038, 1144971, 1144972, 1144973, 1145447, 1147355, 1170502,\n", + " 1155915, 1155908, 1139351, 1139345, 1193479, 1145892, 1145902, 1152203,\n", + " 1175240, 1143402, 1149557, 1158730, 1171279, 1154076, 1147338, 1144696,\n", + " 1145674, 1159273, 1169602, 1166653, 1155180, 1155170, 1166198, 1150518,\n", + " 1144336, 1157331, 1141045, 1141051, 1151664, 1151674, 1154364, 1146350,\n", + " 1138609, 1158610, 1158623, 1158618, 1172753, 1157385, 1165903, 1147414,\n", + " 1147423, 1155502, 1152360, 1179588, 1152546, 1143858, 1167023, 1145033,\n", + " 1160936, 1154027, 1154028, 1157158, 1157153, 1147711, 1151850, 1148128,\n", + " 1148131, 1157588, 1157593, 1170490, 1177601, 1180306, 1171609, 1166532,\n", + " 1166682, 1150234, 1150238, 1154148, 1149183, 1185664, 1171297, 1170965,\n", + " 1153792, 1153803, 1153141, 1180822, 1153628, 1185146, 1151519, 1179807,\n", + " 1161255, 1155249, 1177581, 1176784, 1154718, 1157792, 1157803, 1143341,\n", + " 1151488, 1171623, 1178706, 1158253, 1153898, 1134655, 1178214, 1145626,\n", + " 1154840, 1157483, 1182265, 1184253, 1149755, 1146242, 1146252, 1153601,\n", + " 1157761, 1158779, 1155892, 1155902, 1157272, 1183642, 1165474, 1161405,\n", + " 1164437, 1163422, 1184287, 1181469, 1146161, 1176704, 1180017, 1141506,\n", + " 1186367, 1183021, 1192742, 1139831, 1150265, 1167135, 1154812, 1149668,\n", + " 1191531, 1190579, 1186415, 1156049, 1156055, 1151977, 1182704, 1189273,\n", + " 1146394, 1146395, 1173058, 1190922, 1149539, 1186691, 1191686, 1156840,\n", + " 1193286, 1182060, 1190438, 1189259, 1162156, 1186686, 1151774, 1153743,\n", + " 1169703, 1166840, 1166841, 1189008, 1170142, 1175349, 1174572, 1150406,\n", + " 1156681, 1172429, 1158066, 1178038, 1172710, 1184445, 1179750, 1155962,\n", + " 1172187, 1187676, 1162656, 1162670, 1194153, 1169098, 1157008],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136510, 1141424, 1136228, 1136230, 1140785, 1139698, 1141756, 1136208,\n", + " 1136212, 1140297, 1136963, 1136969, 1136971, 1139808, 1145992, 1145999,\n", + " 1139141, 1143372, 1143363, 1139241, 1146641, 1146647, 1149216, 1149228,\n", + " 1142959, 1147942, 1155683, 1155689, 1143820, 1147473, 1147483, 1149038,\n", + " 1134700, 1148337, 1146656, 1148546, 1153220, 1153231, 1147089, 1155014,\n", + " 1147211, 1136676, 1136685, 1150324, 1152427, 1134806, 1151545, 1138112,\n", + " 1137254, 1137257, 1151531, 1140159, 1135913, 1140949, 1140954, 1135367,\n", + " 1135202, 1140765, 1154739, 1134965, 1134960, 1141036, 1134794, 1136518,\n", + " 1138504, 1136178, 1143064, 1157103, 1137693, 1136609, 1144395, 1137529,\n", + " 1157395, 1157405, 1157397, 1152376, 1136662, 1143317, 1136195, 1136204,\n", + " 1156159, 1156150, 1148481, 1148484, 1139161, 1134841, 1141702, 1135583,\n", + " 1148860, 1135670, 1140970, 1140712, 1156342, 1153099, 1137957, 1138590,\n", + " 1138305, 1157703, 1138436, 1138440, 1138445, 1138443, 1138451, 1138461,\n", + " 1138449, 1154787, 1136594, 1138881, 1156603, 1156606, 1147119, 1142611,\n", + " 1135631, 1156141, 1145843, 1148531, 1150956, 1139846, 1139667, 1134992,\n", + " 1136551, 1148805, 1158974, 1142906, 1142909, 1141069, 1153548, 1140034,\n", + " 1139929, 1137587, 1137598, 1141963, 1153396, 1155648, 1146075, 1152042,\n", + " 1152044, 1137734, 1137728, 1147316, 1135547, 1136695, 1140228, 1141100,\n", + " 1144130, 1139898, 1139889, 1141980, 1143767, 1152711, 1141115, 1142932,\n", + " 1141891, 1139386, 1136917, 1140598, 1140607, 1141785, 1141786, 1152725,\n", + " 1139495, 1168566, 1141609, 1144650, 1147850, 1137072, 1137074, 1142050,\n", + " 1141821, 1143153, 1146787, 1153666, 1145161, 1140160, 1158746, 1158749,\n", + " 1138469, 1141479, 1138708, 1140110, 1142913, 1137661, 1137662, 1143113,\n", + " 1144596, 1141574, 1140885, 1144182, 1150906, 1139559, 1158698, 1147153,\n", + " 1142640, 1141365, 1141367, 1141664, 1149101, 1144279, 1139510, 1139773,\n", + " 1138815, 1139127, 1145200, 1140619, 1140985, 1140990, 1147050, 1145873,\n", + " 1149876, 1143543, 1143551, 1152976, 1152980, 1135457, 1141925, 1146898,\n", + " 1144245, 1144242, 1140585, 1150692, 1140690, 1136891, 1143643, 1134851,\n", + " 1143851, 1146019, 1146024, 1138085, 1146140, 1154328, 1149928, 1149930,\n", + " 1141235, 1139990, 1146302, 1143293, 1143283, 1143294, 1150417, 1147543,\n", + " 1147545, 1148763, 1147282, 1147290, 1142816, 1136330, 1140341, 1143663,\n", + " 1142637, 1149366, 1149372, 1143051, 1136160, 1157720, 1136836, 1144768,\n", + " 1141496, 1144957, 1143345, 1144765, 1144619, 1145808, 1140844, 1137098,\n", + " 1135876, 1146523, 1143456, 1143470, 1143457, 1143937, 1146636, 1147530,\n", + " 1140360, 1140364, 1143082, 1149490, 1166410, 1144219, 1147984, 1147999,\n", + " 1146949, 1134902, 1139252, 1139249, 1147131, 1154481, 1148704, 1141319,\n", + " 1148468, 1153701, 1152328, 1147263, 1147970, 1139549, 1158226, 1158231,\n", + " 1158238, 1147880, 1154526, 1145240, 1145751, 1142370, 1142369, 1146159,\n", + " 1138626, 1138635, 1148394, 1146178, 1146188, 1148214, 1148223, 1150274,\n", + " 1150438, 1150445, 1149791, 1144526, 1138044, 1150342, 1151994, 1165252,\n", + " 1147794, 1151480, 1139906, 1146723, 1142286, 1150113, 1147021, 1147009,\n", + " 1153152, 1158944, 1141949, 1148744, 1149991, 1147653, 1143564, 1148300,\n", + " 1154430, 1154420, 1158798, 1151363, 1152561, 1136247, 1139721, 1146682,\n", + " 1152435, 1157968, 1148720, 1148725, 1148729, 1144110, 1146549, 1148204,\n", + " 1153124, 1153197, 1168628, 1150932, 1143092, 1150356, 1148084, 1143129,\n", + " 1143133, 1147447, 1151816, 1152581, 1135307, 1135309, 1151917, 1148498,\n", + " 1146571, 1146565, 1141420, 1151345, 1155152, 1147737, 1155059, 1146975,\n", + " 1149359, 1146623, 1144468, 1152409, 1146287, 1150080, 1150090, 1145539,\n", + " 1137746, 1146304, 1155140, 1136401, 1136402, 1152826, 1155337, 1154119,\n", + " 1152673, 1151580, 1151582, 1151573, 1151621, 1151617, 1145278, 1136134,\n", + " 1136140, 1151440, 1148916, 1153387, 1145966, 1152233, 1152903, 1152341,\n", + " 1152342, 1156826, 1156816, 1153311, 1136023, 1136028, 1158704, 1151064,\n", + " 1143476, 1137396, 1160557, 1148033, 1148040, 1149300, 1148628, 1158530,\n", + " 1137458, 1149942, 1149947, 1153074, 1153085, 1142041, 1143444, 1157547,\n", + " 1142385, 1158916, 1158920, 1152397, 1157069, 1157071, 1155408, 1155418,\n", + " 1137814, 1139473, 1138830, 1156638, 1157914, 1153413, 1147810, 1158308,\n", + " 1158311, 1151271, 1151342, 1155441, 1161738, 1153359, 1162120, 1144361,\n", + " 1154530, 1154542, 1156919, 1142755, 1156207, 1151379, 1137918, 1155122,\n", + " 1155123, 1157174, 1149321, 1155755, 1151431, 1135396, 1135406, 1145806,\n", + " 1156460, 1154763, 1155626, 1155628, 1155630, 1156563, 1158824, 1158325,\n", + " 1155646, 1143254, 1143263, 1154240, 1156711, 1143188, 1143189, 1150371,\n", + " 1153325, 1157424, 1150068, 1143508, 1159629, 1137152, 1158578, 1153786,\n", + " 1149907, 1134677, 1134683, 1135601, 1145514, 1145515, 1148148, 1148149,\n", + " 1148159, 1150671, 1157684, 1146325, 1149138, 1156092, 1152220, 1152498,\n", + " 1140380, 1140381, 1156016, 1144843, 1142471, 1155971, 1155975, 1155393,\n", + " 1155404, 1154600, 1160163, 1153503, 1136905, 1136896, 1158753, 1158882,\n", + " 1158886, 1158891, 1140222, 1158815, 1158442, 1156778, 1156779, 1152463,\n", + " 1151615, 1136494, 1164181, 1153635, 1159241, 1147586, 1155301, 1183098,\n", + " 1157249, 1136640, 1134757, 1140049, 1166421, 1158545, 1158558, 1156516,\n", + " 1154339, 1154345, 1158006, 1155521, 1155529, 1155528, 1161539, 1164272,\n", + " 1142663, 1142666, 1159052, 1144258, 1164335, 1159146, 1160563, 1162044,\n", + " 1153043, 1153052, 1153045, 1167172, 1162835, 1155769, 1142875, 1153841,\n", + " 1153842, 1138393, 1160646, 1149063, 1149070, 1145948, 1153514, 1162358,\n", + " 1164012, 1156787, 1149963, 1139295, 1140735, 1146059, 1171249, 1164052,\n", + " 1170415, 1169493, 1148600, 1148603, 1148607, 1168082, 1164979, 1170236,\n", + " 1151875, 1155816, 1158643, 1158653, 1159032, 1152247, 1163972, 1160600,\n", + " 1155588, 1151227, 1138679, 1153924, 1153931, 1153932, 1147397, 1147836,\n", + " 1146500, 1146509, 1153239, 1144739, 1155268, 1165415, 1141471, 1141459,\n", + " 1147427, 1159386, 1156737, 1156739, 1153663, 1150648, 1163260, 1150308,\n", + " 1144810, 1144812, 1153271, 1168850, 1135554, 1164741, 1148675, 1169282,\n", + " 1154700, 1146038, 1144971, 1144972, 1144973, 1145447, 1147355, 1170502,\n", + " 1155915, 1155908, 1139351, 1139345, 1193479, 1145892, 1145902, 1152203,\n", + " 1175240, 1143402, 1149557, 1158730, 1171279, 1154076, 1147338, 1144696,\n", + " 1145674, 1159273, 1169602, 1166653, 1155180, 1155170, 1166198, 1150518,\n", + " 1144336, 1157331, 1141045, 1141051, 1151664, 1151674, 1154364, 1146350,\n", + " 1138609, 1158610, 1158623, 1158618, 1172753, 1157385, 1165903, 1147414,\n", + " 1147423, 1155502, 1152360, 1179588, 1152546, 1143858, 1167023, 1145033,\n", + " 1160936, 1154027, 1154028, 1157158, 1157153, 1147711, 1151850, 1148128,\n", + " 1148131, 1157588, 1157593, 1170490, 1177601, 1180306, 1171609, 1166532,\n", + " 1166682, 1150234, 1150238, 1154148, 1149183, 1185664, 1171297, 1170965,\n", + " 1153792, 1153803, 1153141, 1180822, 1153628, 1185146, 1151519, 1179807,\n", + " 1161255, 1155249, 1177581, 1176784, 1154718, 1157792, 1157803, 1143341,\n", + " 1151488, 1171623, 1178706, 1158253, 1153898, 1134655, 1178214, 1145626,\n", + " 1154840, 1157483, 1182265, 1184253, 1149755, 1146242, 1146252, 1153601,\n", + " 1157761, 1158779, 1155892, 1155902, 1157272, 1183642, 1165474, 1161405,\n", + " 1164437, 1163422, 1184287, 1181469, 1146161, 1176704, 1180017, 1141506,\n", + " 1186367, 1183021, 1192742, 1139831, 1150265, 1167135, 1154812, 1149668,\n", + " 1191531, 1190579, 1186415, 1156049, 1156055, 1151977, 1182704, 1189273,\n", + " 1146394, 1146395, 1173058, 1190922, 1149539, 1186691, 1191686, 1156840,\n", + " 1193286, 1182060, 1190438, 1189259, 1162156, 1186686, 1151774, 1153743,\n", + " 1169703, 1166840, 1166841, 1189008, 1170142, 1175349, 1174572, 1150406,\n", + " 1156681, 1172429, 1158066, 1178038, 1172710, 1184445, 1179750, 1155962,\n", + " 1172187, 1187676, 1162656, 1162670, 1194153, 1169098, 1157008],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196011, 1197841, 1197719, 1199282, 1198449, 1198459, 1202255, 1201582,\n", + " 1201237, 1194626, 1199263, 1201016, 1195488, 1199043, 1195514, 1195263,\n", + " 1201935, 1201992, 1196031, 1198095, 1195888, 1195895, 1195740, 1196359,\n", + " 1196977, 1195325, 1196835, 1198659, 1198668, 1195988, 1198649, 1198651,\n", + " 1198163, 1196711, 1195265, 1197141, 1195840, 1195841, 1198915, 1197474,\n", + " 1197640, 1196283, 1198282, 1199329, 1194928, 1197583, 1199628, 1197990,\n", + " 1200869, 1200872, 1200747, 1199231, 1201916, 1195017, 1194797, 1199951,\n", + " 1201511, 1196508, 1197601, 1196727, 1200893, 1200155, 1198811, 1200503,\n", + " 1200507, 1196466, 1201156, 1201056, 1200913, 1200927, 1194803, 1197097,\n", + " 1202542, 1196768, 1201442, 1202239, 1202170, 1201564, 1195885, 1198478,\n", + " 1195601, 1203336, 1196966, 1200784, 1195679, 1195664, 1202432, 1200445,\n", + " 1200382, 1198929, 1200684, 1197822, 1201499, 1194898, 1197731, 1199783,\n", + " 1200974, 1195070, 1195066, 1200301, 1197652, 1200710, 1195082, 1201813],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196011, 1197841, 1197719, 1199282, 1198449, 1198459, 1202255, 1201582,\n", + " 1201237, 1194626, 1199263, 1201016, 1195488, 1199043, 1195514, 1195263,\n", + " 1201935, 1201992, 1196031, 1198095, 1195888, 1195895, 1195740, 1196359,\n", + " 1196977, 1195325, 1196835, 1198659, 1198668, 1195988, 1198649, 1198651,\n", + " 1198163, 1196711, 1195265, 1197141, 1195840, 1195841, 1198915, 1197474,\n", + " 1197640, 1196283, 1198282, 1199329, 1194928, 1197583, 1199628, 1197990,\n", + " 1200869, 1200872, 1200747, 1199231, 1201916, 1195017, 1194797, 1199951,\n", + " 1201511, 1196508, 1197601, 1196727, 1200893, 1200155, 1198811, 1200503,\n", + " 1200507, 1196466, 1201156, 1201056, 1200913, 1200927, 1194803, 1197097,\n", + " 1202542, 1196768, 1201442, 1202239, 1202170, 1201564, 1195885, 1198478,\n", + " 1195601, 1203336, 1196966, 1200784, 1195679, 1195664, 1202432, 1200445,\n", + " 1200382, 1198929, 1200684, 1197822, 1201499, 1194898, 1197731, 1199783,\n", + " 1200974, 1195070, 1195066, 1200301, 1197652, 1200710, 1195082, 1201813],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.8194e-01, -3.4417e-04, 6.1533e-01, ..., 4.8375e-02,\n", + " -1.2927e-03, -4.5031e-03],\n", + " [ 2.6582e-01, -6.1571e-04, 8.1702e-01, ..., 4.3225e-02,\n", + " -1.6074e-03, -6.1268e-03],\n", + " [ 2.9617e-01, -7.4126e-04, 9.6915e-01, ..., 3.4801e-02,\n", + " -1.2510e-03, -6.7525e-03],\n", + " ...,\n", + " [ 1.1095e-01, -2.4504e-04, 4.9299e-01, ..., 5.7902e-02,\n", + " -1.5082e-03, -3.1981e-03],\n", + " [ 3.2628e-02, -1.8917e-04, 6.5057e-02, ..., 3.7059e-02,\n", + " -1.0314e-03, -1.4317e-03],\n", + " [ 1.1095e-01, -2.4504e-04, 4.9299e-01, ..., 5.7902e-02,\n", + " -1.5082e-03, -3.1981e-03]], device='cuda:0'), 'paper': tensor([[-5.7145e-03, 2.8361e+00, 3.0150e+00, ..., 2.7385e+00,\n", + " -4.2181e-02, 1.4432e+00],\n", + " [ 9.0279e-01, 9.1900e-01, -1.9403e-03, ..., -1.3804e-02,\n", + " -2.2306e-02, 8.0579e-01],\n", + " [-3.2916e-03, 1.6118e+00, 5.4584e-01, ..., -1.5076e-02,\n", + " -2.5282e-02, -6.8552e-03],\n", + " ...,\n", + " [ 1.5236e-01, 1.0774e+00, 3.0364e-01, ..., -6.2957e-03,\n", + " -2.0958e-02, 2.2600e-01],\n", + " [-2.8550e-03, 9.6486e-01, 6.1301e-01, ..., -4.1558e-03,\n", + " -1.8167e-02, -1.9679e-03],\n", + " [-8.4246e-03, 3.3162e+00, 1.9465e+00, ..., 4.6769e+00,\n", + " -4.8640e-02, 2.4532e+00]], device='cuda:0'), 'author': tensor([[-2.3361e-03, 2.5453e-01, 8.3674e-02, ..., 1.1669e+00,\n", + " 1.3605e-01, -2.1231e-03],\n", + " [-1.2484e-03, 1.7504e-01, 1.9750e-01, ..., 1.2250e+00,\n", + " 3.0267e-01, -9.1214e-04],\n", + " [-1.2017e-03, 1.9710e-01, 1.7399e-01, ..., 1.2466e+00,\n", + " 3.8775e-01, -6.9027e-04],\n", + " ...,\n", + " [-4.5056e-03, 5.0090e-01, -1.1680e-03, ..., 1.1530e+00,\n", + " 7.6052e-02, -2.4970e-03],\n", + " [-3.1565e-03, 3.1666e-01, 1.1814e-01, ..., 1.1901e+00,\n", + " -1.0062e-03, -3.6697e-03],\n", + " [-1.6197e-03, 1.9836e-01, 1.2698e-01, ..., 1.2433e+00,\n", + " 2.7482e-01, -1.6999e-03]], device='cuda:0'), 'field_of_study': tensor([[-0.0016, 0.4453, 0.0739, ..., -0.0061, 0.3358, 0.3285],\n", + " [-0.0028, 0.4625, 0.0750, ..., -0.0073, 0.3767, 0.3618],\n", + " [-0.0027, 0.6465, 0.2316, ..., -0.0075, 0.2880, 0.5298],\n", + " ...,\n", + " [-0.0029, 0.5838, 0.1796, ..., -0.0079, 0.3444, 0.3914],\n", + " [-0.0021, 0.5400, 0.1146, ..., -0.0073, 0.3234, 0.4526],\n", + " [-0.0024, 0.6848, 0.2291, ..., -0.0085, 0.4043, 0.5665]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 119, 119, 172, 111, 11, 11, 360, 520, 523, 328, 387, 387,\n", + " 368, 521, 888, 779, 246, 722, 722, 722, 913, 471, 471, 471,\n", + " 884, 763, 987, 1110, 954, 954, 1151, 1185, 1323, 1323, 1331, 1185,\n", + " 1344, 1436, 1462, 1514, 1593, 1386, 1386, 1730, 1730, 1730, 1726, 1599,\n", + " 1632, 1409, 1409, 1409, 1409, 1624, 1518, 1518, 1667, 1940, 1954, 1954,\n", + " 2106, 2117, 2065, 2058, 2058, 2058, 2058, 2058, 2150, 2302, 2238, 2238,\n", + " 2150, 2393, 2403, 2403, 2524, 2509, 2626, 2640, 2640, 2750, 2700, 2700,\n", + " 2700, 2700, 2916, 2840, 2956, 2956, 2980, 2891, 3170, 3409, 2934, 3099,\n", + " 3173, 3216, 3344, 3433, 3568, 3766, 3766, 3693, 3556, 3556, 3861, 4027,\n", + " 4059, 4131, 4131, 4157, 4114, 4150, 4227, 4227, 4277, 4317, 4388, 4294,\n", + " 4336, 4336, 4396, 4407, 4491, 4563, 4546, 4429, 4558, 4457, 4491, 4668,\n", + " 4668, 4601, 4601, 4706, 4526, 4717, 4760, 4760, 4913, 5007, 5005, 4950,\n", + " 5139, 4890, 5047, 5182, 5182, 5142, 5236, 5164, 5230, 5216, 5302, 5416,\n", + " 5416, 5416, 5704, 5759, 5593, 5621, 6324, 6083, 6072, 5938, 6065, 6258,\n", + " 6289, 6354, 6354, 6387, 6387, 6458, 6481, 6471, 6320, 6426],\n", + " [ 7, 90, 81, 5, 79, 94, 59, 30, 3, 3, 75, 50,\n", + " 3, 56, 3, 8, 6, 34, 74, 53, 67, 71, 60, 100,\n", + " 3, 62, 91, 48, 94, 77, 3, 95, 94, 77, 31, 7,\n", + " 29, 59, 30, 39, 55, 46, 47, 75, 50, 80, 1, 8,\n", + " 24, 58, 51, 57, 21, 17, 66, 3, 31, 79, 35, 49,\n", + " 19, 54, 38, 65, 56, 16, 10, 89, 95, 41, 41, 68,\n", + " 5, 4, 36, 27, 91, 54, 31, 33, 2, 11, 43, 92,\n", + " 62, 3, 55, 25, 98, 13, 20, 15, 95, 31, 30, 99,\n", + " 3, 17, 30, 20, 17, 21, 82, 41, 17, 25, 23, 18,\n", + " 17, 56, 44, 22, 12, 78, 50, 75, 98, 98, 50, 11,\n", + " 103, 101, 85, 0, 62, 11, 87, 45, 96, 40, 97, 94,\n", + " 77, 77, 94, 9, 32, 3, 52, 76, 25, 88, 6, 42,\n", + " 15, 102, 99, 59, 63, 26, 72, 17, 75, 64, 14, 93,\n", + " 83, 62, 86, 69, 44, 63, 38, 62, 28, 62, 84, 37,\n", + " 89, 17, 61, 70, 73, 17, 3, 3, 58, 3]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3294, 1643, 3985, ..., 7041, 794, 6520],\n", + " [ 267, 22, 124, ..., 7230, 7216, 7264]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 30, 76, 94, ..., 3, 62, 98],\n", + " [ 101, 129, 83, ..., 6411, 6364, 6480]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 43, 43, 43, ..., 7143, 7143, 7143],\n", + " [ 302, 359, 576, ..., 649, 752, 286]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 58, 351, 730, ..., 499, 672, 286],\n", + " [ 262, 114, 118, ..., 7258, 7214, 7209]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[6079, 2785, 3144, ..., 3515, 6134, 5912],\n", + " [ 71, 102, 119, ..., 6460, 6382, 6403]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 43, 43, 43, ..., 7215, 7165, 7215],\n", + " [ 769, 880, 1203, ..., 735, 721, 4012]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 119, 119, 119, ..., 6458, 6458, 6458],\n", + " [ 52, 602, 727, ..., 7200, 6854, 6990]], device='cuda:0')}\n", + "Epoch: 005, Loss: 0.8152, Train: 627.1000\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006927\n", + "sampling 0.006198\n", + "noi time: 0.002034\n", + "get_vertex_data call: 0.071158\n", + "noi group time: 0.001968\n", + "eoi_group_time: 0.015094\n", + "second half: 0.259936\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 21459, 10001, ..., 1100728, 1133331, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 21459, 10001, ..., 1100728, 1133331, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227500, 1210830, 1224370, ..., 1937987, 1928586, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227500, 1210830, 1224370, ..., 1937987, 1928586, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1136228, 1135926, 1135723, 1137784, 1137791, 1140789, 1139698,\n", + " 1141758, 1141251, 1136971, 1141442, 1141443, 1143615, 1145998, 1137274,\n", + " 1138933, 1138938, 1139243, 1139241, 1146646, 1140781, 1150506, 1139866,\n", + " 1135385, 1148576, 1149228, 1155689, 1147483, 1135992, 1149286, 1144636,\n", + " 1135260, 1149033, 1146995, 1148337, 1146472, 1146465, 1153220, 1147211,\n", + " 1136683, 1152427, 1138742, 1134661, 1140537, 1137254, 1137181, 1138356,\n", + " 1140159, 1135913, 1135367, 1135202, 1135903, 1141036, 1134794, 1136517,\n", + " 1138504, 1137329, 1137685, 1137693, 1144395, 1137534, 1135408, 1157397,\n", + " 1137441, 1137472, 1135265, 1135278, 1156149, 1156152, 1139161, 1134843,\n", + " 1135579, 1141086, 1136108, 1155073, 1135668, 1156342, 1138514, 1137957,\n", + " 1154128, 1137023, 1135522, 1139685, 1137287, 1138436, 1138440, 1138443,\n", + " 1138461, 1138449, 1154785, 1136594, 1138843, 1138837, 1156606, 1147111,\n", + " 1147112, 1142611, 1135624, 1135631, 1158987, 1148536, 1139668, 1136087,\n", + " 1134992, 1134994, 1136551, 1136546, 1148805, 1139755, 1136730, 1158968,\n", + " 1159009, 1144410, 1153544, 1143625, 1139933, 1141966, 1155648, 1146077,\n", + " 1152044, 1137734, 1137728, 1134922, 1146222, 1135549, 1140228, 1141094,\n", + " 1141097, 1141098, 1144129, 1144130, 1144136, 1144138, 1139889, 1141980,\n", + " 1143767, 1143711, 1143221, 1143224, 1139033, 1146844, 1146847, 1141688,\n", + " 1135861, 1161173, 1141111, 1142932, 1141224, 1139386, 1141648, 1136917,\n", + " 1139730, 1144237, 1146449, 1141786, 1136765, 1147850, 1137087, 1144428,\n", + " 1141810, 1153673, 1145161, 1140173, 1138469, 1149105, 1158597, 1139188,\n", + " 1138708, 1137661, 1138423, 1144442, 1144596, 1141581, 1144182, 1137374,\n", + " 1138539, 1137846, 1137841, 1161703, 1147153, 1141365, 1141367, 1141664,\n", + " 1149090, 1149093, 1139022, 1138292, 1144279, 1143917, 1139510, 1139763,\n", + " 1139650, 1139653, 1138815, 1145001, 1140616, 1140976, 1140990, 1146693,\n", + " 1141560, 1141565, 1147050, 1143543, 1152976, 1152980, 1135457, 1141925,\n", + " 1141934, 1144245, 1144242, 1150689, 1150692, 1140690, 1139396, 1143845,\n", + " 1143851, 1146019, 1146024, 1142533, 1149924, 1139990, 1146298, 1143294,\n", + " 1147538, 1147543, 1148763, 1147282, 1142816, 1149155, 1143051, 1138922,\n", + " 1157720, 1136836, 1150188, 1141496, 1139048, 1144957, 1143345, 1143349,\n", + " 1144619, 1144083, 1144086, 1144095, 1144319, 1150919, 1146514, 1146526,\n", + " 1143456, 1143457, 1143007, 1137697, 1143937, 1147521, 1140364, 1143080,\n", + " 1143082, 1168921, 1144219, 1147999, 1146957, 1134902, 1139252, 1148704,\n", + " 1143310, 1149714, 1139549, 1158225, 1158226, 1167006, 1145751, 1142370,\n", + " 1142376, 1138632, 1148217, 1152530, 1152537, 1150280, 1149263, 1144514,\n", + " 1144526, 1138045, 1146888, 1150342, 1152013, 1151994, 1151480, 1152022,\n", + " 1152031, 1146723, 1134873, 1149535, 1150112, 1150127, 1147012, 1147021,\n", + " 1135805, 1150736, 1151795, 1150728, 1154976, 1162274, 1148300, 1148612,\n", + " 1148623, 1139096, 1154420, 1158794, 1148188, 1151361, 1152561, 1146676,\n", + " 1146678, 1146686, 1138867, 1145862, 1168973, 1150057, 1148204, 1171943,\n", + " 1153124, 1153192, 1153188, 1145104, 1152867, 1150356, 1169594, 1155088,\n", + " 1143128, 1143134, 1151816, 1152581, 1148498, 1148505, 1141420, 1136002,\n", + " 1149385, 1148949, 1146969, 1153255, 1146616, 1146623, 1151687, 1144472,\n", + " 1152407, 1152415, 1152103, 1137746, 1146304, 1152622, 1155140, 1136401,\n", + " 1157107, 1155337, 1154123, 1152673, 1139581, 1151617, 1150578, 1136788,\n", + " 1148916, 1145930, 1150615, 1145952, 1152903, 1151311, 1156831, 1156816,\n", + " 1153311, 1138276, 1156007, 1156005, 1136028, 1158712, 1158704, 1152928,\n", + " 1151071, 1154727, 1143478, 1153918, 1167943, 1148033, 1148040, 1161201,\n", + " 1149300, 1157625, 1149798, 1137048, 1158477, 1148628, 1158530, 1158540,\n", + " 1137458, 1149946, 1142047, 1135434, 1157547, 1142387, 1158860, 1148894,\n", + " 1156505, 1157064, 1157071, 1155408, 1152833, 1137809, 1137814, 1157555,\n", + " 1150465, 1152183, 1156638, 1151788, 1153415, 1135645, 1147810, 1143010,\n", + " 1158308, 1158311, 1151271, 1151342, 1155441, 1154530, 1145771, 1156919,\n", + " 1145606, 1142755, 1142758, 1154233, 1157637, 1151379, 1155122, 1152527,\n", + " 1149325, 1151436, 1135396, 1135400, 1135402, 1146913, 1145806, 1158096,\n", + " 1154763, 1155626, 1155630, 1155576, 1158824, 1148836, 1148647, 1155646,\n", + " 1143262, 1143263, 1146938, 1161287, 1162386, 1154250, 1143189, 1143521,\n", + " 1150077, 1151035, 1137152, 1157663, 1153786, 1168145, 1135601, 1135614,\n", + " 1148149, 1148159, 1150671, 1155848, 1155852, 1158669, 1161116, 1152209,\n", + " 1159213, 1155439, 1140381, 1140374, 1156021, 1157031, 1144843, 1155971,\n", + " 1155975, 1158846, 1156809, 1156812, 1161897, 1149709, 1154600, 1160163,\n", + " 1136905, 1136896, 1158760, 1140221, 1157304, 1162993, 1158815, 1158814,\n", + " 1158438, 1158444, 1156778, 1158285, 1151615, 1157574, 1153641, 1147585,\n", + " 1155301, 1153808, 1136640, 1142178, 1158558, 1161167, 1156514, 1146126,\n", + " 1138101, 1138110, 1158006, 1155521, 1142666, 1156045, 1159071, 1142427,\n", + " 1158297, 1155196, 1153052, 1153045, 1171551, 1155763, 1155772, 1178584,\n", + " 1142865, 1153841, 1163711, 1156104, 1138393, 1165244, 1150046, 1149070,\n", + " 1151009, 1154294, 1153514, 1153519, 1158680, 1161662, 1156787, 1156798,\n", + " 1154588, 1154590, 1139281, 1156985, 1146063, 1166092, 1171249, 1158878,\n", + " 1158866, 1169493, 1140643, 1148600, 1148603, 1164979, 1143146, 1151887,\n", + " 1151872, 1158643, 1158655, 1156177, 1159025, 1159029, 1159032, 1159028,\n", + " 1165604, 1152247, 1155588, 1151227, 1148571, 1148564, 1144977, 1146500,\n", + " 1155052, 1145137, 1141471, 1156739, 1161012, 1168748, 1144812, 1153273,\n", + " 1135567, 1164741, 1156303, 1145728, 1145228, 1138765, 1144973, 1147694,\n", + " 1165746, 1170502, 1152626, 1139345, 1145902, 1152198, 1152203, 1181049,\n", + " 1143395, 1158734, 1154076, 1177562, 1144702, 1170676, 1162892, 1169600,\n", + " 1169602, 1167817, 1155172, 1155180, 1150518, 1167915, 1156113, 1156119,\n", + " 1144346, 1144336, 1154670, 1169162, 1141051, 1169359, 1149452, 1173219,\n", + " 1158611, 1158623, 1149847, 1147423, 1169948, 1155494, 1155502, 1167388,\n", + " 1152353, 1143172, 1152546, 1170053, 1192133, 1172211, 1149398, 1149402,\n", + " 1165904, 1173307, 1145033, 1154027, 1152150, 1172787, 1159655, 1178424,\n", + " 1157153, 1164694, 1151850, 1151852, 1157593, 1157599, 1177046, 1166826,\n", + " 1154307, 1183439, 1168822, 1173636, 1177607, 1140326, 1170023, 1153436,\n", + " 1176452, 1150234, 1154148, 1179964, 1149169, 1149173, 1169821, 1178644,\n", + " 1181229, 1181228, 1186117, 1153803, 1153141, 1183027, 1161027, 1158030,\n", + " 1161255, 1176527, 1155262, 1171760, 1177889, 1157792, 1157795, 1171623,\n", + " 1173192, 1157133, 1157992, 1180413, 1158253, 1153898, 1134650, 1134655,\n", + " 1145626, 1180372, 1161056, 1161911, 1149755, 1146242, 1153601, 1157772,\n", + " 1155995, 1184157, 1184144, 1179776, 1179783, 1182690, 1181141, 1158779,\n", + " 1158512, 1158513, 1158524, 1158940, 1158382, 1155899, 1162692, 1178696,\n", + " 1164448, 1168282, 1171587, 1168886, 1179095, 1163422, 1170259, 1146161,\n", + " 1146171, 1170802, 1166772, 1166781, 1170336, 1156162, 1186883, 1139828,\n", + " 1139831, 1154812, 1156049, 1156055, 1179685, 1180120, 1173058, 1194024,\n", + " 1149544, 1191889, 1188371, 1189352, 1185801, 1194567, 1194218, 1192809,\n", + " 1151774, 1166841, 1171201, 1175349, 1150406, 1166788, 1187117, 1178142,\n", + " 1180613, 1176225, 1179650, 1155959, 1155962, 1172187, 1165516, 1169831,\n", + " 1192792, 1189082, 1188719], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1136228, 1135926, 1135723, 1137784, 1137791, 1140789, 1139698,\n", + " 1141758, 1141251, 1136971, 1141442, 1141443, 1143615, 1145998, 1137274,\n", + " 1138933, 1138938, 1139243, 1139241, 1146646, 1140781, 1150506, 1139866,\n", + " 1135385, 1148576, 1149228, 1155689, 1147483, 1135992, 1149286, 1144636,\n", + " 1135260, 1149033, 1146995, 1148337, 1146472, 1146465, 1153220, 1147211,\n", + " 1136683, 1152427, 1138742, 1134661, 1140537, 1137254, 1137181, 1138356,\n", + " 1140159, 1135913, 1135367, 1135202, 1135903, 1141036, 1134794, 1136517,\n", + " 1138504, 1137329, 1137685, 1137693, 1144395, 1137534, 1135408, 1157397,\n", + " 1137441, 1137472, 1135265, 1135278, 1156149, 1156152, 1139161, 1134843,\n", + " 1135579, 1141086, 1136108, 1155073, 1135668, 1156342, 1138514, 1137957,\n", + " 1154128, 1137023, 1135522, 1139685, 1137287, 1138436, 1138440, 1138443,\n", + " 1138461, 1138449, 1154785, 1136594, 1138843, 1138837, 1156606, 1147111,\n", + " 1147112, 1142611, 1135624, 1135631, 1158987, 1148536, 1139668, 1136087,\n", + " 1134992, 1134994, 1136551, 1136546, 1148805, 1139755, 1136730, 1158968,\n", + " 1159009, 1144410, 1153544, 1143625, 1139933, 1141966, 1155648, 1146077,\n", + " 1152044, 1137734, 1137728, 1134922, 1146222, 1135549, 1140228, 1141094,\n", + " 1141097, 1141098, 1144129, 1144130, 1144136, 1144138, 1139889, 1141980,\n", + " 1143767, 1143711, 1143221, 1143224, 1139033, 1146844, 1146847, 1141688,\n", + " 1135861, 1161173, 1141111, 1142932, 1141224, 1139386, 1141648, 1136917,\n", + " 1139730, 1144237, 1146449, 1141786, 1136765, 1147850, 1137087, 1144428,\n", + " 1141810, 1153673, 1145161, 1140173, 1138469, 1149105, 1158597, 1139188,\n", + " 1138708, 1137661, 1138423, 1144442, 1144596, 1141581, 1144182, 1137374,\n", + " 1138539, 1137846, 1137841, 1161703, 1147153, 1141365, 1141367, 1141664,\n", + " 1149090, 1149093, 1139022, 1138292, 1144279, 1143917, 1139510, 1139763,\n", + " 1139650, 1139653, 1138815, 1145001, 1140616, 1140976, 1140990, 1146693,\n", + " 1141560, 1141565, 1147050, 1143543, 1152976, 1152980, 1135457, 1141925,\n", + " 1141934, 1144245, 1144242, 1150689, 1150692, 1140690, 1139396, 1143845,\n", + " 1143851, 1146019, 1146024, 1142533, 1149924, 1139990, 1146298, 1143294,\n", + " 1147538, 1147543, 1148763, 1147282, 1142816, 1149155, 1143051, 1138922,\n", + " 1157720, 1136836, 1150188, 1141496, 1139048, 1144957, 1143345, 1143349,\n", + " 1144619, 1144083, 1144086, 1144095, 1144319, 1150919, 1146514, 1146526,\n", + " 1143456, 1143457, 1143007, 1137697, 1143937, 1147521, 1140364, 1143080,\n", + " 1143082, 1168921, 1144219, 1147999, 1146957, 1134902, 1139252, 1148704,\n", + " 1143310, 1149714, 1139549, 1158225, 1158226, 1167006, 1145751, 1142370,\n", + " 1142376, 1138632, 1148217, 1152530, 1152537, 1150280, 1149263, 1144514,\n", + " 1144526, 1138045, 1146888, 1150342, 1152013, 1151994, 1151480, 1152022,\n", + " 1152031, 1146723, 1134873, 1149535, 1150112, 1150127, 1147012, 1147021,\n", + " 1135805, 1150736, 1151795, 1150728, 1154976, 1162274, 1148300, 1148612,\n", + " 1148623, 1139096, 1154420, 1158794, 1148188, 1151361, 1152561, 1146676,\n", + " 1146678, 1146686, 1138867, 1145862, 1168973, 1150057, 1148204, 1171943,\n", + " 1153124, 1153192, 1153188, 1145104, 1152867, 1150356, 1169594, 1155088,\n", + " 1143128, 1143134, 1151816, 1152581, 1148498, 1148505, 1141420, 1136002,\n", + " 1149385, 1148949, 1146969, 1153255, 1146616, 1146623, 1151687, 1144472,\n", + " 1152407, 1152415, 1152103, 1137746, 1146304, 1152622, 1155140, 1136401,\n", + " 1157107, 1155337, 1154123, 1152673, 1139581, 1151617, 1150578, 1136788,\n", + " 1148916, 1145930, 1150615, 1145952, 1152903, 1151311, 1156831, 1156816,\n", + " 1153311, 1138276, 1156007, 1156005, 1136028, 1158712, 1158704, 1152928,\n", + " 1151071, 1154727, 1143478, 1153918, 1167943, 1148033, 1148040, 1161201,\n", + " 1149300, 1157625, 1149798, 1137048, 1158477, 1148628, 1158530, 1158540,\n", + " 1137458, 1149946, 1142047, 1135434, 1157547, 1142387, 1158860, 1148894,\n", + " 1156505, 1157064, 1157071, 1155408, 1152833, 1137809, 1137814, 1157555,\n", + " 1150465, 1152183, 1156638, 1151788, 1153415, 1135645, 1147810, 1143010,\n", + " 1158308, 1158311, 1151271, 1151342, 1155441, 1154530, 1145771, 1156919,\n", + " 1145606, 1142755, 1142758, 1154233, 1157637, 1151379, 1155122, 1152527,\n", + " 1149325, 1151436, 1135396, 1135400, 1135402, 1146913, 1145806, 1158096,\n", + " 1154763, 1155626, 1155630, 1155576, 1158824, 1148836, 1148647, 1155646,\n", + " 1143262, 1143263, 1146938, 1161287, 1162386, 1154250, 1143189, 1143521,\n", + " 1150077, 1151035, 1137152, 1157663, 1153786, 1168145, 1135601, 1135614,\n", + " 1148149, 1148159, 1150671, 1155848, 1155852, 1158669, 1161116, 1152209,\n", + " 1159213, 1155439, 1140381, 1140374, 1156021, 1157031, 1144843, 1155971,\n", + " 1155975, 1158846, 1156809, 1156812, 1161897, 1149709, 1154600, 1160163,\n", + " 1136905, 1136896, 1158760, 1140221, 1157304, 1162993, 1158815, 1158814,\n", + " 1158438, 1158444, 1156778, 1158285, 1151615, 1157574, 1153641, 1147585,\n", + " 1155301, 1153808, 1136640, 1142178, 1158558, 1161167, 1156514, 1146126,\n", + " 1138101, 1138110, 1158006, 1155521, 1142666, 1156045, 1159071, 1142427,\n", + " 1158297, 1155196, 1153052, 1153045, 1171551, 1155763, 1155772, 1178584,\n", + " 1142865, 1153841, 1163711, 1156104, 1138393, 1165244, 1150046, 1149070,\n", + " 1151009, 1154294, 1153514, 1153519, 1158680, 1161662, 1156787, 1156798,\n", + " 1154588, 1154590, 1139281, 1156985, 1146063, 1166092, 1171249, 1158878,\n", + " 1158866, 1169493, 1140643, 1148600, 1148603, 1164979, 1143146, 1151887,\n", + " 1151872, 1158643, 1158655, 1156177, 1159025, 1159029, 1159032, 1159028,\n", + " 1165604, 1152247, 1155588, 1151227, 1148571, 1148564, 1144977, 1146500,\n", + " 1155052, 1145137, 1141471, 1156739, 1161012, 1168748, 1144812, 1153273,\n", + " 1135567, 1164741, 1156303, 1145728, 1145228, 1138765, 1144973, 1147694,\n", + " 1165746, 1170502, 1152626, 1139345, 1145902, 1152198, 1152203, 1181049,\n", + " 1143395, 1158734, 1154076, 1177562, 1144702, 1170676, 1162892, 1169600,\n", + " 1169602, 1167817, 1155172, 1155180, 1150518, 1167915, 1156113, 1156119,\n", + " 1144346, 1144336, 1154670, 1169162, 1141051, 1169359, 1149452, 1173219,\n", + " 1158611, 1158623, 1149847, 1147423, 1169948, 1155494, 1155502, 1167388,\n", + " 1152353, 1143172, 1152546, 1170053, 1192133, 1172211, 1149398, 1149402,\n", + " 1165904, 1173307, 1145033, 1154027, 1152150, 1172787, 1159655, 1178424,\n", + " 1157153, 1164694, 1151850, 1151852, 1157593, 1157599, 1177046, 1166826,\n", + " 1154307, 1183439, 1168822, 1173636, 1177607, 1140326, 1170023, 1153436,\n", + " 1176452, 1150234, 1154148, 1179964, 1149169, 1149173, 1169821, 1178644,\n", + " 1181229, 1181228, 1186117, 1153803, 1153141, 1183027, 1161027, 1158030,\n", + " 1161255, 1176527, 1155262, 1171760, 1177889, 1157792, 1157795, 1171623,\n", + " 1173192, 1157133, 1157992, 1180413, 1158253, 1153898, 1134650, 1134655,\n", + " 1145626, 1180372, 1161056, 1161911, 1149755, 1146242, 1153601, 1157772,\n", + " 1155995, 1184157, 1184144, 1179776, 1179783, 1182690, 1181141, 1158779,\n", + " 1158512, 1158513, 1158524, 1158940, 1158382, 1155899, 1162692, 1178696,\n", + " 1164448, 1168282, 1171587, 1168886, 1179095, 1163422, 1170259, 1146161,\n", + " 1146171, 1170802, 1166772, 1166781, 1170336, 1156162, 1186883, 1139828,\n", + " 1139831, 1154812, 1156049, 1156055, 1179685, 1180120, 1173058, 1194024,\n", + " 1149544, 1191889, 1188371, 1189352, 1185801, 1194567, 1194218, 1192809,\n", + " 1151774, 1166841, 1171201, 1175349, 1150406, 1166788, 1187117, 1178142,\n", + " 1180613, 1176225, 1179650, 1155959, 1155962, 1172187, 1165516, 1169831,\n", + " 1192792, 1189082, 1188719], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1198769, 1199424, 1199439, 1197719, 1198459, 1202255, 1198840, 1201582,\n", + " 1198694, 1198702, 1202803, 1198557, 1194866, 1199053, 1196624, 1196631,\n", + " 1195512, 1195514, 1195263, 1199135, 1196529, 1196534, 1201992, 1196031,\n", + " 1198371, 1198542, 1194956, 1195888, 1195895, 1195896, 1199172, 1199171,\n", + " 1196334, 1197856, 1196359, 1196977, 1196979, 1194752, 1197824, 1195325,\n", + " 1198958, 1198163, 1199810, 1195148, 1195265, 1197141, 1200756, 1197367,\n", + " 1194919, 1196109, 1195038, 1195541, 1199317, 1197253, 1197641, 1202017,\n", + " 1199699, 1196283, 1195351, 1195358, 1199628, 1197676, 1197990, 1200745,\n", + " 1198763, 1199949, 1196498, 1200668, 1197601, 1196727, 1195771, 1198428,\n", + " 1199489, 1199593, 1199410, 1198811, 1200452, 1198593, 1201156, 1200988,\n", + " 1201056, 1200553, 1200429, 1197097, 1202129, 1196768, 1201442, 1202239,\n", + " 1199485, 1195876, 1201291, 1196960, 1196966, 1200784, 1200793, 1199606,\n", + " 1196823, 1198514, 1195679, 1195664, 1200445, 1196929, 1198911, 1197816,\n", + " 1198973, 1196381, 1203102, 1201138, 1200437, 1200011, 1199786, 1195066,\n", + " 1201886, 1197655, 1203300, 1197035, 1195165, 1194908, 1196428],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1198769, 1199424, 1199439, 1197719, 1198459, 1202255, 1198840, 1201582,\n", + " 1198694, 1198702, 1202803, 1198557, 1194866, 1199053, 1196624, 1196631,\n", + " 1195512, 1195514, 1195263, 1199135, 1196529, 1196534, 1201992, 1196031,\n", + " 1198371, 1198542, 1194956, 1195888, 1195895, 1195896, 1199172, 1199171,\n", + " 1196334, 1197856, 1196359, 1196977, 1196979, 1194752, 1197824, 1195325,\n", + " 1198958, 1198163, 1199810, 1195148, 1195265, 1197141, 1200756, 1197367,\n", + " 1194919, 1196109, 1195038, 1195541, 1199317, 1197253, 1197641, 1202017,\n", + " 1199699, 1196283, 1195351, 1195358, 1199628, 1197676, 1197990, 1200745,\n", + " 1198763, 1199949, 1196498, 1200668, 1197601, 1196727, 1195771, 1198428,\n", + " 1199489, 1199593, 1199410, 1198811, 1200452, 1198593, 1201156, 1200988,\n", + " 1201056, 1200553, 1200429, 1197097, 1202129, 1196768, 1201442, 1202239,\n", + " 1199485, 1195876, 1201291, 1196960, 1196966, 1200784, 1200793, 1199606,\n", + " 1196823, 1198514, 1195679, 1195664, 1200445, 1196929, 1198911, 1197816,\n", + " 1198973, 1196381, 1203102, 1201138, 1200437, 1200011, 1199786, 1195066,\n", + " 1201886, 1197655, 1203300, 1197035, 1195165, 1194908, 1196428],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 1.8428e-01, -5.0229e-04, 5.7649e-01, ..., 3.5960e-02,\n", + " -1.2420e-03, -4.2287e-03],\n", + " [ 1.9853e-01, -3.0194e-04, 6.5974e-01, ..., 4.2535e-02,\n", + " -1.4527e-03, -4.9627e-03],\n", + " [ 2.5776e-01, -7.5159e-04, 9.5749e-01, ..., 4.6132e-02,\n", + " -1.4816e-03, -6.4973e-03],\n", + " ...,\n", + " [ 3.2628e-02, -1.8917e-04, 6.5057e-02, ..., 3.7059e-02,\n", + " -1.0314e-03, -1.4317e-03],\n", + " [ 3.0245e-01, -1.2508e-03, 9.5070e-01, ..., 3.7359e-02,\n", + " -1.4785e-03, -7.0040e-03],\n", + " [ 1.8817e-01, -2.7272e-04, 6.5320e-01, ..., 2.7961e-02,\n", + " -1.0803e-03, -4.6592e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 6.8898e-01, 9.6566e-01, -1.0235e-03, ..., -1.5926e-02,\n", + " -2.1549e-02, 6.1670e-01],\n", + " [ 1.0277e+00, 9.9117e-01, -3.9371e-03, ..., -1.6833e-02,\n", + " -2.1288e-02, 1.1191e+00],\n", + " [-8.7299e-03, 2.3598e+00, 2.3715e+00, ..., 2.1633e+00,\n", + " -3.6209e-02, 5.4515e-01],\n", + " ...,\n", + " [-1.5992e-02, 6.2359e-01, 3.4697e+00, ..., -1.1475e-04,\n", + " -4.0123e-02, -1.2436e-02],\n", + " [-2.1122e-02, -2.8357e-03, 2.2976e+00, ..., -1.0759e-02,\n", + " -2.8358e-02, -3.1748e-02],\n", + " [-7.1992e-03, 3.5322e+00, 2.2536e+00, ..., 4.9234e+00,\n", + " -5.1371e-02, 2.8098e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-1.2931e-03, 2.1198e-01, 1.2761e-01, ..., 1.3588e+00,\n", + " 4.1660e-01, -1.8792e-04],\n", + " [-4.6994e-04, 2.7382e-02, 1.1459e-01, ..., 1.5975e-01,\n", + " 5.6292e-04, -6.6914e-04],\n", + " [-7.1716e-03, 6.8278e-01, -2.4277e-03, ..., 1.3203e+00,\n", + " 3.0809e-01, -3.3078e-03],\n", + " ...,\n", + " [-2.1286e-03, 3.2060e-01, 3.1899e-02, ..., 1.0479e+00,\n", + " 9.6703e-02, -2.3000e-03],\n", + " [-4.6994e-04, 2.7382e-02, 1.1459e-01, ..., 1.5975e-01,\n", + " 5.6292e-04, -6.6914e-04],\n", + " [-8.1754e-04, 1.4354e-01, 2.2268e-01, ..., 1.2870e+00,\n", + " 3.4820e-01, -4.3369e-04]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-0.0029, 0.5374, 0.1506, ..., -0.0076, 0.3573, 0.4613],\n", + " [-0.0020, 0.6041, 0.2541, ..., -0.0075, 0.3377, 0.4750],\n", + " [-0.0020, 0.6017, 0.2329, ..., -0.0073, 0.3299, 0.4618],\n", + " ...,\n", + " [-0.0020, 0.5920, 0.3461, ..., -0.0082, 0.3452, 0.4134],\n", + " [-0.0026, 0.7184, 0.2562, ..., -0.0085, 0.5095, 0.5094],\n", + " [-0.0025, 0.6746, 0.2770, ..., -0.0084, 0.4586, 0.4554]],\n", + " device='cuda:0', grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 5, 155, 217, 11, 11, 132, 132, 284, 284, 284, 284, 258,\n", + " 225, 263, 520, 284, 284, 554, 562, 611, 611, 657, 657, 657,\n", + " 764, 681, 594, 594, 703, 477, 774, 774, 993, 993, 690, 901,\n", + " 1184, 986, 1019, 1287, 1287, 1351, 1205, 1219, 1083, 1232, 1358, 1119,\n", + " 1323, 1464, 1349, 1464, 1506, 1677, 1359, 1064, 1064, 1563, 1506, 1454,\n", + " 1416, 1629, 1629, 1673, 1787, 1526, 1556, 1556, 1724, 1724, 1683, 1877,\n", + " 1861, 1861, 1944, 1953, 2111, 1938, 1938, 2147, 2029, 2114, 2018, 2018,\n", + " 2158, 2253, 2153, 2335, 2376, 2314, 2551, 2551, 2521, 2443, 2531, 2374,\n", + " 2365, 2412, 2575, 2534, 2760, 2549, 2865, 2721, 2721, 2832, 2832, 2506,\n", + " 2750, 3061, 3118, 2861, 2861, 3093, 3054, 3141, 3242, 3100, 3054, 3054,\n", + " 3046, 3046, 3234, 3234, 3418, 3750, 3536, 3553, 3667, 3711, 3700, 3471,\n", + " 3696, 3582, 3865, 3865, 3865, 3865, 4001, 4165, 4165, 4307, 4477, 4299,\n", + " 4501, 4519, 4594, 4623, 4939, 4750, 4928, 4860, 4959, 4803, 5097, 5097,\n", + " 5059, 5099, 5013, 5113, 5266, 5234, 5262, 5159, 5197, 5572, 5356, 5322,\n", + " 5322, 5530, 5530, 5408, 5510, 5838, 5543, 5569, 5569, 5621, 6080, 6084,\n", + " 6008],\n", + " [ 52, 103, 2, 66, 85, 21, 101, 77, 108, 78, 93, 31,\n", + " 48, 69, 31, 41, 17, 101, 80, 98, 71, 74, 87, 46,\n", + " 69, 31, 12, 51, 91, 61, 82, 84, 54, 92, 109, 69,\n", + " 9, 72, 44, 10, 0, 65, 102, 73, 63, 33, 54, 115,\n", + " 73, 25, 54, 76, 42, 113, 111, 118, 6, 64, 47, 57,\n", + " 33, 100, 15, 48, 20, 63, 11, 56, 97, 37, 32, 83,\n", + " 22, 39, 83, 116, 18, 73, 106, 28, 61, 63, 27, 13,\n", + " 23, 78, 63, 18, 1, 94, 90, 103, 111, 112, 39, 60,\n", + " 107, 111, 30, 5, 43, 52, 109, 117, 45, 104, 75, 102,\n", + " 69, 63, 111, 36, 33, 48, 17, 31, 109, 69, 35, 4,\n", + " 55, 110, 11, 18, 69, 3, 79, 78, 25, 59, 34, 17,\n", + " 49, 5, 40, 29, 42, 37, 69, 105, 115, 91, 16, 68,\n", + " 69, 36, 95, 62, 89, 96, 18, 7, 69, 86, 88, 38,\n", + " 71, 50, 115, 27, 90, 14, 5, 117, 109, 24, 26, 8,\n", + " 69, 43, 81, 58, 99, 67, 110, 114, 19, 19, 69, 70,\n", + " 53]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[4185, 1279, 3070, ..., 5706, 4116, 4429],\n", + " [ 227, 202, 86, ..., 6557, 6618, 6618]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 46, 74, 31, ..., 55, 69, 10],\n", + " [ 57, 190, 28, ..., 6068, 6103, 6099]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 137, 137, 137, ..., 6390, 6390, 6390],\n", + " [ 121, 347, 167, ..., 738, 347, 56]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 153, 18, 19, ..., 619, 207, 263],\n", + " [ 126, 124, 173, ..., 6515, 6547, 6520]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1351, 4469, 6178, ..., 3554, 5699, 3000],\n", + " [ 33, 8, 54, ..., 6055, 5905, 6047]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 127, 127, 127, ..., 6390, 6641, 6568],\n", + " [ 610, 2054, 557, ..., 4116, 117, 3698]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 132, 132, 132, ..., 6034, 6111, 6111],\n", + " [ 542, 1125, 1364, ..., 1238, 2832, 3117]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.007692\n", + "sampling 0.007532\n", + "noi time: 0.00115\n", + "get_vertex_data call: 0.030219\n", + "noi group time: 0.00357\n", + "eoi_group_time: 0.016314\n", + "second half: 0.227114\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31142, 31143, 24187, ..., 1070082, 1119687, 1130633],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31142, 31143, 24187, ..., 1070082, 1119687, 1130633],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224369, 1211567, 1203800, ..., 1938513, 1935112, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224369, 1211567, 1203800, ..., 1938513, 1935112, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1136228, 1136233, 1136237, 1140282, 1135933, 1138554, 1135160,\n", + " 1140785, 1141758, 1138335, 1136212, 1136965, 1136969, 1136971, 1141443,\n", + " 1139811, 1145366, 1137947, 1137268, 1143362, 1143372, 1139615, 1148987,\n", + " 1142965, 1136957, 1148584, 1149216, 1149220, 1135987, 1142881, 1144636,\n", + " 1135251, 1146995, 1135941, 1146656, 1146472, 1136122, 1152666, 1148546,\n", + " 1136742, 1141916, 1155014, 1155018, 1139371, 1147211, 1136685, 1150329,\n", + " 1152417, 1134710, 1138742, 1138112, 1138119, 1137181, 1149461, 1138356,\n", + " 1140020, 1135367, 1135202, 1154739, 1141036, 1134794, 1157443, 1135964,\n", + " 1143377, 1143069, 1137693, 1144395, 1157397, 1152371, 1136928, 1156159,\n", + " 1148484, 1139161, 1141081, 1140970, 1138514, 1138524, 1153094, 1153098,\n", + " 1153099, 1156965, 1156962, 1145132, 1145120, 1156899, 1135522, 1139684,\n", + " 1138305, 1138319, 1138314, 1137287, 1157703, 1138440, 1138447, 1138461,\n", + " 1138449, 1137924, 1137932, 1136594, 1149332, 1138846, 1142611, 1135359,\n", + " 1158984, 1145843, 1148531, 1137109, 1139667, 1139673, 1138079, 1134992,\n", + " 1142434, 1142788, 1136551, 1136546, 1135782, 1140199, 1158961, 1158974,\n", + " 1153543, 1143631, 1143625, 1139085, 1139933, 1141963, 1153396, 1134891,\n", + " 1155660, 1155654, 1140548, 1152044, 1137734, 1137728, 1134738, 1134750,\n", + " 1141088, 1162946, 1139889, 1156875, 1143767, 1154855, 1154863, 1137299,\n", + " 1143225, 1139032, 1149982, 1152709, 1141695, 1142339, 1135862, 1136625,\n", + " 1140470, 1141891, 1139386, 1141657, 1136923, 1136917, 1143667, 1145065,\n", + " 1140592, 1138785, 1139495, 1136752, 1141300, 1144641, 1147850, 1142049,\n", + " 1142060, 1141810, 1142093, 1138469, 1149111, 1148872, 1148867, 1143577,\n", + " 1139190, 1137058, 1138708, 1140110, 1142917, 1142913, 1137661, 1143107,\n", + " 1143111, 1144445, 1144596, 1144603, 1136864, 1140885, 1135326, 1141398,\n", + " 1144182, 1144190, 1150906, 1144865, 1140500, 1140501, 1161710, 1147152,\n", + " 1147153, 1149101, 1138293, 1144279, 1139508, 1139127, 1145001, 1143789,\n", + " 1140990, 1141565, 1143690, 1143692, 1147050, 1145873, 1149876, 1152976,\n", + " 1152988, 1135457, 1135471, 1139453, 1141925, 1146901, 1144242, 1140580,\n", + " 1137149, 1150697, 1150698, 1143643, 1141381, 1145974, 1143851, 1146024,\n", + " 1146025, 1138085, 1141585, 1149933, 1139990, 1143283, 1143294, 1147541,\n", + " 1147540, 1147150, 1148763, 1147282, 1147290, 1142829, 1142816, 1140346,\n", + " 1142638, 1146091, 1143040, 1148402, 1157720, 1136836, 1165623, 1139329,\n", + " 1139328, 1144768, 1141490, 1142149, 1145427, 1143345, 1144765, 1144611,\n", + " 1145808, 1140833, 1137098, 1135876, 1150756, 1150761, 1144319, 1138000,\n", + " 1144380, 1146514, 1146523, 1143456, 1143470, 1143457, 1142994, 1144303,\n", + " 1142000, 1143937, 1140829, 1147574, 1143799, 1146634, 1147521, 1140364,\n", + " 1137990, 1143080, 1143082, 1168921, 1166410, 1148965, 1144725, 1144213,\n", + " 1144222, 1147984, 1147995, 1147999, 1134899, 1139249, 1147127, 1147131,\n", + " 1147240, 1148704, 1141836, 1146745, 1146742, 1148468, 1148476, 1153701,\n", + " 1147070, 1149722, 1147031, 1147970, 1139549, 1158235, 1143921, 1147880,\n", + " 1148353, 1145240, 1145750, 1145751, 1142369, 1152532, 1152538, 1150438,\n", + " 1150445, 1155006, 1149791, 1144514, 1144526, 1150342, 1150344, 1151994,\n", + " 1165252, 1151480, 1151473, 1152024, 1154263, 1154267, 1145255, 1139919,\n", + " 1140562, 1148693, 1148698, 1148278, 1147019, 1147021, 1141949, 1146772,\n", + " 1144819, 1153568, 1153574, 1147653, 1143552, 1149412, 1152067, 1137716,\n", + " 1135083, 1135087, 1148612, 1148623, 1139096, 1154420, 1158794, 1148188,\n", + " 1136249, 1148729, 1146544, 1146559, 1139936, 1148204, 1148108, 1153124,\n", + " 1153192, 1150932, 1152877, 1150356, 1141017, 1154190, 1148498, 1146571,\n", + " 1146565, 1141419, 1136002, 1150636, 1155161, 1148949, 1156403, 1150219,\n", + " 1146623, 1156325, 1153028, 1153030, 1145539, 1137746, 1146304, 1152622,\n", + " 1140521, 1155145, 1155148, 1136401, 1136402, 1157107, 1155337, 1154119,\n", + " 1152673, 1151617, 1145278, 1151440, 1148924, 1152951, 1152903, 1151311,\n", + " 1146816, 1156823, 1156826, 1156831, 1138283, 1138279, 1152297, 1156004,\n", + " 1136023, 1136028, 1158704, 1156621, 1156622, 1152928, 1156399, 1163489,\n", + " 1150166, 1150172, 1150164, 1148033, 1148040, 1148034, 1145656, 1149792,\n", + " 1149794, 1137048, 1148628, 1148637, 1158530, 1158540, 1158537, 1137458,\n", + " 1149942, 1153868, 1135707, 1142041, 1157547, 1158854, 1148890, 1158916,\n", + " 1157064, 1157069, 1155422, 1145184, 1139473, 1150465, 1150475, 1156638,\n", + " 1151777, 1152738, 1135645, 1151459, 1158308, 1158311, 1140427, 1155441,\n", + " 1161738, 1153359, 1150136, 1144357, 1140868, 1154529, 1142755, 1142764,\n", + " 1156207, 1138775, 1151379, 1158635, 1140186, 1156649, 1155122, 1152527,\n", + " 1149504, 1135396, 1135398, 1135406, 1146913, 1156455, 1156463, 1157873,\n", + " 1155628, 1155630, 1156563, 1158824, 1158825, 1158325, 1156993, 1148836,\n", + " 1155646, 1146938, 1160210, 1154250, 1154901, 1154902, 1154903, 1143189,\n", + " 1153326, 1150984, 1155293, 1157934, 1151031, 1137152, 1158126, 1171832,\n", + " 1158578, 1156763, 1153786, 1137381, 1138264, 1145684, 1134677, 1135601,\n", + " 1148149, 1148153, 1150659, 1159585, 1157684, 1149145, 1156085, 1144453,\n", + " 1152209, 1152220, 1152215, 1159213, 1167309, 1140368, 1140381, 1144843,\n", + " 1155971, 1155975, 1158841, 1158846, 1161892, 1154600, 1154603, 1155949,\n", + " 1180783, 1153503, 1153491, 1136905, 1136896, 1158753, 1158760, 1158882,\n", + " 1158891, 1158815, 1158438, 1156665, 1155301, 1155302, 1153112, 1153116,\n", + " 1142747, 1156490, 1153808, 1136640, 1136646, 1145484, 1140049, 1147781,\n", + " 1158558, 1156516, 1165497, 1146126, 1165778, 1144581, 1142666, 1142658,\n", + " 1157753, 1157751, 1167346, 1158295, 1160570, 1153052, 1153045, 1171551,\n", + " 1172995, 1156226, 1166258, 1153842, 1161313, 1156104, 1156107, 1138393,\n", + " 1159475, 1149063, 1149070, 1155479, 1153514, 1153519, 1147300, 1146873,\n", + " 1164006, 1156787, 1139790, 1154590, 1139281, 1159895, 1157236, 1148771,\n", + " 1157351, 1157357, 1146063, 1146356, 1160701, 1165309, 1140650, 1140643,\n", + " 1148600, 1148603, 1164979, 1155816, 1141800, 1158643, 1158653, 1156181,\n", + " 1159032, 1152244, 1143729, 1143735, 1155588, 1151220, 1148571, 1144979,\n", + " 1144984, 1153237, 1164580, 1164589, 1144739, 1163522, 1168067, 1153201,\n", + " 1141471, 1141459, 1147426, 1147427, 1149893, 1179979, 1156737, 1156739,\n", + " 1153653, 1150646, 1144810, 1144812, 1140112, 1162085, 1135567, 1142722,\n", + " 1142733, 1144062, 1145743, 1166914, 1148683, 1145229, 1166462, 1144973,\n", + " 1190689, 1160730, 1143025, 1147347, 1147355, 1152624, 1139347, 1193479,\n", + " 1152194, 1187284, 1143404, 1149565, 1158724, 1158722, 1158734, 1154067,\n", + " 1145674, 1145677, 1150783, 1179488, 1169602, 1167817, 1156309, 1166653,\n", + " 1150518, 1150526, 1156119, 1154617, 1144336, 1157534, 1147746, 1154670,\n", + " 1169162, 1169157, 1194111, 1157334, 1138129, 1141043, 1151664, 1169359,\n", + " 1138609, 1173047, 1149847, 1159851, 1155494, 1172488, 1152353, 1169186,\n", + " 1168451, 1143857, 1155921, 1172212, 1149402, 1148667, 1148666, 1162217,\n", + " 1148335, 1173307, 1164974, 1159655, 1157153, 1157375, 1147711, 1151850,\n", + " 1151852, 1148128, 1148131, 1148141, 1157593, 1149247, 1149246, 1135018,\n", + " 1162106, 1166351, 1166682, 1169444, 1170915, 1150234, 1154151, 1154148,\n", + " 1158176, 1149169, 1172537, 1169772, 1168481, 1143420, 1171297, 1171302,\n", + " 1169618, 1169627, 1153803, 1181502, 1164818, 1177776, 1186314, 1144896,\n", + " 1158030, 1158031, 1161255, 1155262, 1154718, 1157795, 1171623, 1164034,\n", + " 1157122, 1157132, 1158253, 1153898, 1153902, 1178538, 1164564, 1162928,\n", + " 1145626, 1180383, 1180004, 1157483, 1179442, 1149755, 1153601, 1153609,\n", + " 1157761, 1177826, 1177839, 1155890, 1155892, 1180366, 1166981, 1182330,\n", + " 1162443, 1165474, 1171634, 1162253, 1160065, 1164228, 1164231, 1164437,\n", + " 1182337, 1181539, 1154956, 1146161, 1188074, 1156861, 1166783, 1180028,\n", + " 1190097, 1156162, 1178255, 1189414, 1187476, 1168930, 1172174, 1139828,\n", + " 1139831, 1150265, 1150260, 1154812, 1163848, 1156055, 1151977, 1181897,\n", + " 1146395, 1173058, 1188984, 1182885, 1169954, 1169964, 1174498, 1181939,\n", + " 1182060, 1151774, 1193243, 1185870, 1190071, 1178637, 1192508, 1177842,\n", + " 1183371, 1150400, 1156681, 1156672, 1172423, 1172429, 1171953, 1158064,\n", + " 1158070, 1145395, 1167739, 1180256, 1152080, 1178662, 1155962, 1155960,\n", + " 1192639, 1179769, 1169831, 1167471, 1193302, 1157008, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1136228, 1136233, 1136237, 1140282, 1135933, 1138554, 1135160,\n", + " 1140785, 1141758, 1138335, 1136212, 1136965, 1136969, 1136971, 1141443,\n", + " 1139811, 1145366, 1137947, 1137268, 1143362, 1143372, 1139615, 1148987,\n", + " 1142965, 1136957, 1148584, 1149216, 1149220, 1135987, 1142881, 1144636,\n", + " 1135251, 1146995, 1135941, 1146656, 1146472, 1136122, 1152666, 1148546,\n", + " 1136742, 1141916, 1155014, 1155018, 1139371, 1147211, 1136685, 1150329,\n", + " 1152417, 1134710, 1138742, 1138112, 1138119, 1137181, 1149461, 1138356,\n", + " 1140020, 1135367, 1135202, 1154739, 1141036, 1134794, 1157443, 1135964,\n", + " 1143377, 1143069, 1137693, 1144395, 1157397, 1152371, 1136928, 1156159,\n", + " 1148484, 1139161, 1141081, 1140970, 1138514, 1138524, 1153094, 1153098,\n", + " 1153099, 1156965, 1156962, 1145132, 1145120, 1156899, 1135522, 1139684,\n", + " 1138305, 1138319, 1138314, 1137287, 1157703, 1138440, 1138447, 1138461,\n", + " 1138449, 1137924, 1137932, 1136594, 1149332, 1138846, 1142611, 1135359,\n", + " 1158984, 1145843, 1148531, 1137109, 1139667, 1139673, 1138079, 1134992,\n", + " 1142434, 1142788, 1136551, 1136546, 1135782, 1140199, 1158961, 1158974,\n", + " 1153543, 1143631, 1143625, 1139085, 1139933, 1141963, 1153396, 1134891,\n", + " 1155660, 1155654, 1140548, 1152044, 1137734, 1137728, 1134738, 1134750,\n", + " 1141088, 1162946, 1139889, 1156875, 1143767, 1154855, 1154863, 1137299,\n", + " 1143225, 1139032, 1149982, 1152709, 1141695, 1142339, 1135862, 1136625,\n", + " 1140470, 1141891, 1139386, 1141657, 1136923, 1136917, 1143667, 1145065,\n", + " 1140592, 1138785, 1139495, 1136752, 1141300, 1144641, 1147850, 1142049,\n", + " 1142060, 1141810, 1142093, 1138469, 1149111, 1148872, 1148867, 1143577,\n", + " 1139190, 1137058, 1138708, 1140110, 1142917, 1142913, 1137661, 1143107,\n", + " 1143111, 1144445, 1144596, 1144603, 1136864, 1140885, 1135326, 1141398,\n", + " 1144182, 1144190, 1150906, 1144865, 1140500, 1140501, 1161710, 1147152,\n", + " 1147153, 1149101, 1138293, 1144279, 1139508, 1139127, 1145001, 1143789,\n", + " 1140990, 1141565, 1143690, 1143692, 1147050, 1145873, 1149876, 1152976,\n", + " 1152988, 1135457, 1135471, 1139453, 1141925, 1146901, 1144242, 1140580,\n", + " 1137149, 1150697, 1150698, 1143643, 1141381, 1145974, 1143851, 1146024,\n", + " 1146025, 1138085, 1141585, 1149933, 1139990, 1143283, 1143294, 1147541,\n", + " 1147540, 1147150, 1148763, 1147282, 1147290, 1142829, 1142816, 1140346,\n", + " 1142638, 1146091, 1143040, 1148402, 1157720, 1136836, 1165623, 1139329,\n", + " 1139328, 1144768, 1141490, 1142149, 1145427, 1143345, 1144765, 1144611,\n", + " 1145808, 1140833, 1137098, 1135876, 1150756, 1150761, 1144319, 1138000,\n", + " 1144380, 1146514, 1146523, 1143456, 1143470, 1143457, 1142994, 1144303,\n", + " 1142000, 1143937, 1140829, 1147574, 1143799, 1146634, 1147521, 1140364,\n", + " 1137990, 1143080, 1143082, 1168921, 1166410, 1148965, 1144725, 1144213,\n", + " 1144222, 1147984, 1147995, 1147999, 1134899, 1139249, 1147127, 1147131,\n", + " 1147240, 1148704, 1141836, 1146745, 1146742, 1148468, 1148476, 1153701,\n", + " 1147070, 1149722, 1147031, 1147970, 1139549, 1158235, 1143921, 1147880,\n", + " 1148353, 1145240, 1145750, 1145751, 1142369, 1152532, 1152538, 1150438,\n", + " 1150445, 1155006, 1149791, 1144514, 1144526, 1150342, 1150344, 1151994,\n", + " 1165252, 1151480, 1151473, 1152024, 1154263, 1154267, 1145255, 1139919,\n", + " 1140562, 1148693, 1148698, 1148278, 1147019, 1147021, 1141949, 1146772,\n", + " 1144819, 1153568, 1153574, 1147653, 1143552, 1149412, 1152067, 1137716,\n", + " 1135083, 1135087, 1148612, 1148623, 1139096, 1154420, 1158794, 1148188,\n", + " 1136249, 1148729, 1146544, 1146559, 1139936, 1148204, 1148108, 1153124,\n", + " 1153192, 1150932, 1152877, 1150356, 1141017, 1154190, 1148498, 1146571,\n", + " 1146565, 1141419, 1136002, 1150636, 1155161, 1148949, 1156403, 1150219,\n", + " 1146623, 1156325, 1153028, 1153030, 1145539, 1137746, 1146304, 1152622,\n", + " 1140521, 1155145, 1155148, 1136401, 1136402, 1157107, 1155337, 1154119,\n", + " 1152673, 1151617, 1145278, 1151440, 1148924, 1152951, 1152903, 1151311,\n", + " 1146816, 1156823, 1156826, 1156831, 1138283, 1138279, 1152297, 1156004,\n", + " 1136023, 1136028, 1158704, 1156621, 1156622, 1152928, 1156399, 1163489,\n", + " 1150166, 1150172, 1150164, 1148033, 1148040, 1148034, 1145656, 1149792,\n", + " 1149794, 1137048, 1148628, 1148637, 1158530, 1158540, 1158537, 1137458,\n", + " 1149942, 1153868, 1135707, 1142041, 1157547, 1158854, 1148890, 1158916,\n", + " 1157064, 1157069, 1155422, 1145184, 1139473, 1150465, 1150475, 1156638,\n", + " 1151777, 1152738, 1135645, 1151459, 1158308, 1158311, 1140427, 1155441,\n", + " 1161738, 1153359, 1150136, 1144357, 1140868, 1154529, 1142755, 1142764,\n", + " 1156207, 1138775, 1151379, 1158635, 1140186, 1156649, 1155122, 1152527,\n", + " 1149504, 1135396, 1135398, 1135406, 1146913, 1156455, 1156463, 1157873,\n", + " 1155628, 1155630, 1156563, 1158824, 1158825, 1158325, 1156993, 1148836,\n", + " 1155646, 1146938, 1160210, 1154250, 1154901, 1154902, 1154903, 1143189,\n", + " 1153326, 1150984, 1155293, 1157934, 1151031, 1137152, 1158126, 1171832,\n", + " 1158578, 1156763, 1153786, 1137381, 1138264, 1145684, 1134677, 1135601,\n", + " 1148149, 1148153, 1150659, 1159585, 1157684, 1149145, 1156085, 1144453,\n", + " 1152209, 1152220, 1152215, 1159213, 1167309, 1140368, 1140381, 1144843,\n", + " 1155971, 1155975, 1158841, 1158846, 1161892, 1154600, 1154603, 1155949,\n", + " 1180783, 1153503, 1153491, 1136905, 1136896, 1158753, 1158760, 1158882,\n", + " 1158891, 1158815, 1158438, 1156665, 1155301, 1155302, 1153112, 1153116,\n", + " 1142747, 1156490, 1153808, 1136640, 1136646, 1145484, 1140049, 1147781,\n", + " 1158558, 1156516, 1165497, 1146126, 1165778, 1144581, 1142666, 1142658,\n", + " 1157753, 1157751, 1167346, 1158295, 1160570, 1153052, 1153045, 1171551,\n", + " 1172995, 1156226, 1166258, 1153842, 1161313, 1156104, 1156107, 1138393,\n", + " 1159475, 1149063, 1149070, 1155479, 1153514, 1153519, 1147300, 1146873,\n", + " 1164006, 1156787, 1139790, 1154590, 1139281, 1159895, 1157236, 1148771,\n", + " 1157351, 1157357, 1146063, 1146356, 1160701, 1165309, 1140650, 1140643,\n", + " 1148600, 1148603, 1164979, 1155816, 1141800, 1158643, 1158653, 1156181,\n", + " 1159032, 1152244, 1143729, 1143735, 1155588, 1151220, 1148571, 1144979,\n", + " 1144984, 1153237, 1164580, 1164589, 1144739, 1163522, 1168067, 1153201,\n", + " 1141471, 1141459, 1147426, 1147427, 1149893, 1179979, 1156737, 1156739,\n", + " 1153653, 1150646, 1144810, 1144812, 1140112, 1162085, 1135567, 1142722,\n", + " 1142733, 1144062, 1145743, 1166914, 1148683, 1145229, 1166462, 1144973,\n", + " 1190689, 1160730, 1143025, 1147347, 1147355, 1152624, 1139347, 1193479,\n", + " 1152194, 1187284, 1143404, 1149565, 1158724, 1158722, 1158734, 1154067,\n", + " 1145674, 1145677, 1150783, 1179488, 1169602, 1167817, 1156309, 1166653,\n", + " 1150518, 1150526, 1156119, 1154617, 1144336, 1157534, 1147746, 1154670,\n", + " 1169162, 1169157, 1194111, 1157334, 1138129, 1141043, 1151664, 1169359,\n", + " 1138609, 1173047, 1149847, 1159851, 1155494, 1172488, 1152353, 1169186,\n", + " 1168451, 1143857, 1155921, 1172212, 1149402, 1148667, 1148666, 1162217,\n", + " 1148335, 1173307, 1164974, 1159655, 1157153, 1157375, 1147711, 1151850,\n", + " 1151852, 1148128, 1148131, 1148141, 1157593, 1149247, 1149246, 1135018,\n", + " 1162106, 1166351, 1166682, 1169444, 1170915, 1150234, 1154151, 1154148,\n", + " 1158176, 1149169, 1172537, 1169772, 1168481, 1143420, 1171297, 1171302,\n", + " 1169618, 1169627, 1153803, 1181502, 1164818, 1177776, 1186314, 1144896,\n", + " 1158030, 1158031, 1161255, 1155262, 1154718, 1157795, 1171623, 1164034,\n", + " 1157122, 1157132, 1158253, 1153898, 1153902, 1178538, 1164564, 1162928,\n", + " 1145626, 1180383, 1180004, 1157483, 1179442, 1149755, 1153601, 1153609,\n", + " 1157761, 1177826, 1177839, 1155890, 1155892, 1180366, 1166981, 1182330,\n", + " 1162443, 1165474, 1171634, 1162253, 1160065, 1164228, 1164231, 1164437,\n", + " 1182337, 1181539, 1154956, 1146161, 1188074, 1156861, 1166783, 1180028,\n", + " 1190097, 1156162, 1178255, 1189414, 1187476, 1168930, 1172174, 1139828,\n", + " 1139831, 1150265, 1150260, 1154812, 1163848, 1156055, 1151977, 1181897,\n", + " 1146395, 1173058, 1188984, 1182885, 1169954, 1169964, 1174498, 1181939,\n", + " 1182060, 1151774, 1193243, 1185870, 1190071, 1178637, 1192508, 1177842,\n", + " 1183371, 1150400, 1156681, 1156672, 1172423, 1172429, 1171953, 1158064,\n", + " 1158070, 1145395, 1167739, 1180256, 1152080, 1178662, 1155962, 1155960,\n", + " 1192639, 1179769, 1169831, 1167471, 1193302, 1157008, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199736, 1197226, 1197716, 1200096, 1200108, 1198730, 1198731, 1201094,\n", + " 1199282, 1202255, 1198844, 1201577, 1199151, 1201462, 1202119, 1194626,\n", + " 1197777, 1199248, 1201016, 1201660, 1196871, 1196685, 1198180, 1194783,\n", + " 1197464, 1196631, 1195263, 1201992, 1201987, 1195198, 1196031, 1198543,\n", + " 1197697, 1199519, 1194949, 1195888, 1195313, 1195320, 1195325, 1198668,\n", + " 1196171, 1195581, 1198036, 1195982, 1198167, 1196711, 1195148, 1195221,\n", + " 1200761, 1196242, 1197273, 1196109, 1194859, 1195854, 1195039, 1198925,\n", + " 1195541, 1196317, 1197474, 1200037, 1202021, 1199699, 1196272, 1195358,\n", + " 1199339, 1199856, 1196854, 1197676, 1197990, 1199152, 1198404, 1198410,\n", + " 1200748, 1199231, 1201916, 1199744, 1199676, 1201511, 1197609, 1196727,\n", + " 1200887, 1198416, 1198428, 1200018, 1200155, 1198811, 1199555, 1201827,\n", + " 1200570, 1198075, 1198593, 1201156, 1200927, 1194803, 1199712, 1199721,\n", + " 1200526, 1200832, 1197097, 1201842, 1196883, 1199908, 1196779, 1202239,\n", + " 1195876, 1201291, 1198478, 1203263, 1203329, 1199925, 1196966, 1195676,\n", + " 1195664, 1202357, 1200684, 1195421, 1197060, 1197816, 1197822, 1201495,\n", + " 1202269, 1198973, 1199659, 1203102, 1198147, 1198824, 1201475, 1198819,\n", + " 1197593, 1195070, 1201886, 1200298, 1197652, 1196070, 1195165, 1196428],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199736, 1197226, 1197716, 1200096, 1200108, 1198730, 1198731, 1201094,\n", + " 1199282, 1202255, 1198844, 1201577, 1199151, 1201462, 1202119, 1194626,\n", + " 1197777, 1199248, 1201016, 1201660, 1196871, 1196685, 1198180, 1194783,\n", + " 1197464, 1196631, 1195263, 1201992, 1201987, 1195198, 1196031, 1198543,\n", + " 1197697, 1199519, 1194949, 1195888, 1195313, 1195320, 1195325, 1198668,\n", + " 1196171, 1195581, 1198036, 1195982, 1198167, 1196711, 1195148, 1195221,\n", + " 1200761, 1196242, 1197273, 1196109, 1194859, 1195854, 1195039, 1198925,\n", + " 1195541, 1196317, 1197474, 1200037, 1202021, 1199699, 1196272, 1195358,\n", + " 1199339, 1199856, 1196854, 1197676, 1197990, 1199152, 1198404, 1198410,\n", + " 1200748, 1199231, 1201916, 1199744, 1199676, 1201511, 1197609, 1196727,\n", + " 1200887, 1198416, 1198428, 1200018, 1200155, 1198811, 1199555, 1201827,\n", + " 1200570, 1198075, 1198593, 1201156, 1200927, 1194803, 1199712, 1199721,\n", + " 1200526, 1200832, 1197097, 1201842, 1196883, 1199908, 1196779, 1202239,\n", + " 1195876, 1201291, 1198478, 1203263, 1203329, 1199925, 1196966, 1195676,\n", + " 1195664, 1202357, 1200684, 1195421, 1197060, 1197816, 1197822, 1201495,\n", + " 1202269, 1198973, 1199659, 1203102, 1198147, 1198824, 1201475, 1198819,\n", + " 1197593, 1195070, 1201886, 1200298, 1197652, 1196070, 1195165, 1196428],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 2.1233e-01, -3.8026e-04, 6.2309e-01, ..., 3.9718e-02,\n", + " -1.6966e-03, -4.9782e-03],\n", + " [ 1.3182e-01, 5.1376e-03, 4.6938e-01, ..., 8.5640e-02,\n", + " -1.8856e-03, -3.6787e-03],\n", + " [ 1.6708e-01, -2.5063e-04, 4.8964e-01, ..., 4.9767e-02,\n", + " -1.5467e-03, -3.8202e-03],\n", + " ...,\n", + " [ 1.6708e-01, -2.5063e-04, 4.8964e-01, ..., 4.9767e-02,\n", + " -1.5467e-03, -3.8202e-03],\n", + " [ 2.1433e-01, -4.0738e-04, 6.4991e-01, ..., 3.8742e-02,\n", + " -1.4817e-03, -4.9979e-03],\n", + " [ 2.8776e-01, -7.2570e-04, 8.9012e-01, ..., 3.9653e-02,\n", + " -1.5635e-03, -6.5392e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[-2.9758e-03, 4.5786e-01, 3.1283e-01, ..., -1.2757e-02,\n", + " -1.6495e-02, -3.6652e-03],\n", + " [-3.5328e-03, 1.4354e+00, 1.3283e+00, ..., -4.4362e-03,\n", + " -2.4346e-02, 4.0291e-01],\n", + " [-1.0271e-02, 2.5606e+00, 2.5500e+00, ..., 3.5247e+00,\n", + " -4.9127e-02, 1.9468e+00],\n", + " ...,\n", + " [-1.9518e-02, 1.0882e+00, 1.2694e+00, ..., 1.9455e+00,\n", + " -3.1373e-02, -8.9836e-03],\n", + " [-2.0916e-02, -3.0313e-03, 1.6183e+00, ..., -8.3423e-03,\n", + " -2.1957e-02, -2.9289e-02],\n", + " [-1.0540e-02, 3.5713e+00, 2.1819e+00, ..., 5.2945e+00,\n", + " -5.1425e-02, 2.7360e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-6.5437e-03, 3.2381e-01, 1.5920e-01, ..., 1.0552e+00,\n", + " -3.6306e-03, -7.5148e-03],\n", + " [-1.3952e-03, 2.0921e-01, 4.0854e-02, ..., 1.1131e+00,\n", + " 5.2878e-01, -2.5306e-04],\n", + " [-9.5892e-04, 8.1731e-02, 1.6867e-01, ..., 1.0542e+00,\n", + " 4.0982e-01, -1.3442e-04],\n", + " ...,\n", + " [-4.4752e-04, 2.6525e-02, 1.1317e-01, ..., 1.5614e-01,\n", + " 1.0440e-03, -6.8673e-04],\n", + " [-1.3252e-03, 7.3530e-02, 1.9404e-01, ..., 1.1132e+00,\n", + " 4.0188e-01, -7.3659e-04],\n", + " [-4.4752e-04, 2.6525e-02, 1.1317e-01, ..., 1.5614e-01,\n", + " 1.0440e-03, -6.8673e-04]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-0.0033, 0.5360, 0.0935, ..., -0.0068, 0.2981, 0.4988],\n", + " [-0.0028, 0.4913, 0.0730, ..., -0.0058, 0.2850, 0.3912],\n", + " [-0.0026, 0.5883, 0.1704, ..., -0.0072, 0.3136, 0.5439],\n", + " ...,\n", + " [-0.0041, 0.6299, 0.1819, ..., -0.0073, 0.3395, 0.5601],\n", + " [-0.0030, 0.5251, 0.1257, ..., -0.0078, 0.2593, 0.4566],\n", + " [ 0.2220, 0.6790, 0.2470, ..., -0.0096, 0.3462, -0.0011]],\n", + " device='cuda:0', grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 129, 16, 144, 119, 25, 25, 81, 81, 81, 81, 81, 25,\n", + " 175, 175, 175, 546, 405, 427, 910, 768, 674, 1066, 618, 318,\n", + " 911, 675, 806, 806, 806, 602, 602, 666, 1267, 1267, 902, 1229,\n", + " 1055, 1287, 1287, 984, 1159, 1029, 1029, 1356, 1456, 1027, 1027, 1465,\n", + " 1503, 1058, 1622, 1539, 1539, 1529, 1529, 1487, 1258, 1695, 1695, 1695,\n", + " 1676, 1640, 1878, 1878, 1915, 2118, 2060, 1993, 2060, 2151, 2034, 2123,\n", + " 2123, 2200, 2273, 2398, 2528, 2528, 2408, 2408, 2408, 2408, 2441, 2441,\n", + " 2589, 2560, 2560, 2680, 2680, 3002, 3102, 2678, 2678, 2991, 3012, 3276,\n", + " 3086, 3213, 3257, 3330, 3047, 3318, 3356, 3486, 3486, 3408, 3408, 3408,\n", + " 3408, 3408, 3557, 3557, 3589, 3717, 4047, 3798, 3798, 3929, 4186, 4252,\n", + " 3798, 4120, 4311, 4311, 4015, 4410, 4410, 4364, 4364, 4364, 4394, 4457,\n", + " 4594, 4681, 4808, 4749, 4616, 4796, 4796, 4796, 4892, 4807, 5000, 5046,\n", + " 5145, 5150, 5230, 5257, 5653, 5464, 5543, 5543, 5482, 5415, 5415, 5999,\n", + " 5999, 5566, 5574, 5687, 5859, 5859, 5945, 5812, 5962, 5962, 5925, 6052,\n", + " 5823, 6063, 6076, 6222, 6222, 6222, 6222, 6143, 6512, 6512, 6512, 5871,\n", + " 6043, 6313, 6313, 6188, 6188, 6188, 6279, 6096, 6096, 6660, 6660, 6538,\n", + " 6538, 6534, 6568, 6568, 6568, 6579, 6579, 6576],\n", + " [ 83, 35, 135, 63, 27, 11, 28, 54, 105, 66, 55, 73,\n", + " 124, 73, 69, 79, 47, 103, 8, 88, 25, 41, 52, 79,\n", + " 77, 84, 61, 97, 19, 96, 60, 79, 78, 93, 25, 79,\n", + " 103, 26, 60, 111, 82, 13, 9, 50, 131, 25, 64, 124,\n", + " 126, 76, 65, 27, 24, 46, 85, 25, 110, 23, 98, 75,\n", + " 82, 48, 81, 125, 29, 58, 12, 44, 111, 124, 62, 30,\n", + " 130, 116, 25, 15, 80, 74, 27, 57, 107, 3, 79, 130,\n", + " 6, 123, 132, 133, 41, 21, 38, 11, 40, 122, 56, 112,\n", + " 116, 79, 120, 109, 7, 34, 110, 99, 105, 101, 18, 128,\n", + " 121, 117, 25, 10, 79, 16, 92, 108, 76, 50, 127, 94,\n", + " 100, 123, 46, 85, 119, 67, 110, 102, 27, 24, 42, 25,\n", + " 39, 91, 86, 1, 106, 17, 49, 0, 72, 95, 27, 20,\n", + " 36, 22, 41, 30, 78, 2, 114, 70, 17, 113, 79, 130,\n", + " 43, 50, 32, 1, 61, 8, 39, 118, 129, 85, 5, 33,\n", + " 90, 51, 89, 37, 8, 59, 134, 104, 55, 73, 71, 79,\n", + " 115, 27, 79, 68, 33, 4, 31, 78, 17, 133, 14, 77,\n", + " 53, 125, 45, 87, 25, 82, 76, 84]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[5699, 659, 943, ..., 361, 2969, 4995],\n", + " [ 174, 140, 72, ..., 6811, 6940, 6927]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 65, 50, 27, ..., 7, 25, 83],\n", + " [ 45, 109, 84, ..., 6627, 6575, 6597]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 216, 216, 216, ..., 6926, 6926, 6926],\n", + " [ 243, 305, 79, ..., 16, 409, 556]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 58, 228, 414, ..., 532, 627, 574],\n", + " [ 78, 15, 80, ..., 6893, 6890, 6992]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5422, 2731, 6846, ..., 5778, 2961, 4939],\n", + " [ 135, 30, 217, ..., 6576, 6641, 6571]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 216, 216, 216, ..., 6926, 6926, 6926],\n", + " [ 789, 1135, 1681, ..., 3128, 3969, 5746]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 119, 119, 119, ..., 6579, 6579, 6579],\n", + " [4978, 5062, 4419, ..., 2380, 1382, 3658]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.003755\n", + "sampling 0.003669\n", + "noi time: 0.000715\n", + "get_vertex_data call: 0.014485\n", + "noi group time: 0.001857\n", + "eoi_group_time: 0.011003\n", + "second half: 0.112429\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 8842, 16691, 24187, ..., 1130642, 1132851, 1120069],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 8842, 16691, 24187, ..., 1130642, 1132851, 1120069],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1230244, 1230575, 1205182, ..., 1937556, 1931115, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1230244, 1230575, 1205182, ..., 1937556, 1931115, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1140282, 1140285, 1135165, 1135723, 1140788, 1141751, 1141758,\n", + " 1136223, 1141251, 1136969, 1143615, 1139808, 1139811, 1137271, 1138930,\n", + " 1150395, 1146647, 1139609, 1142963, 1149216, 1155689, 1143817, 1147483,\n", + " 1141882, 1142881, 1153938, 1135941, 1146656, 1146661, 1148558, 1136742,\n", + " 1147089, 1147095, 1141909, 1137220, 1155014, 1155019, 1139371, 1147211,\n", + " 1136677, 1150329, 1152427, 1134717, 1136261, 1134807, 1134815, 1138126,\n", + " 1134735, 1135367, 1135202, 1134970, 1141036, 1136289, 1134794, 1138504,\n", + " 1137329, 1136178, 1157103, 1137693, 1136617, 1144395, 1137521, 1137529,\n", + " 1137534, 1136716, 1157405, 1136204, 1156159, 1139162, 1135582, 1141086,\n", + " 1155075, 1138514, 1153089, 1153094, 1137953, 1137957, 1137959, 1138590,\n", + " 1158136, 1135499, 1154128, 1145120, 1136982, 1156899, 1156908, 1135522,\n", + " 1135535, 1139684, 1139685, 1138314, 1139874, 1139878, 1157703, 1138436,\n", + " 1138440, 1138451, 1138461, 1154787, 1136594, 1154106, 1158391, 1149328,\n", + " 1156605, 1156606, 1147112, 1142611, 1142615, 1160825, 1135618, 1135625,\n", + " 1137422, 1139846, 1159868, 1139667, 1139673, 1139674, 1138079, 1142249,\n", + " 1134992, 1134778, 1142793, 1139755, 1136730, 1136728, 1140199, 1144410,\n", + " 1153543, 1136067, 1139925, 1138648, 1134891, 1155648, 1140557, 1141992,\n", + " 1152044, 1136051, 1137734, 1147316, 1140901, 1140904, 1134750, 1135549,\n", + " 1141088, 1141099, 1148996, 1149001, 1139889, 1143767, 1154860, 1143704,\n", + " 1139025, 1140003, 1149979, 1146834, 1146847, 1152704, 1141695, 1135861,\n", + " 1136418, 1136426, 1140469, 1142937, 1141223, 1139386, 1141657, 1142160,\n", + " 1136917, 1143675, 1137190, 1140601, 1141156, 1141785, 1139495, 1141609,\n", + " 1144650, 1134985, 1136862, 1147850, 1137074, 1144420, 1142056, 1139276,\n", + " 1139279, 1138472, 1137761, 1137762, 1148872, 1137062, 1138708, 1140100,\n", + " 1140110, 1143107, 1144596, 1157410, 1136871, 1136864, 1141204, 1141209,\n", + " 1144042, 1140885, 1135315, 1135322, 1150906, 1158703, 1147153, 1149193,\n", + " 1141365, 1153068, 1140815, 1149101, 1138288, 1138292, 1138293, 1144279,\n", + " 1143917, 1139510, 1139773, 1139662, 1144998, 1146695, 1135049, 1147050,\n", + " 1147047, 1149876, 1143543, 1143551, 1152976, 1135459, 1135466, 1141925,\n", + " 1146901, 1144242, 1145339, 1141853, 1150689, 1138728, 1140702, 1136891,\n", + " 1134861, 1143851, 1146024, 1150601, 1138085, 1154332, 1141646, 1141585,\n", + " 1149928, 1149933, 1139990, 1150429, 1143883, 1147543, 1147540, 1148763,\n", + " 1147282, 1136160, 1138923, 1157718, 1136836, 1165629, 1139329, 1142159,\n", + " 1143345, 1144615, 1140844, 1144088, 1150761, 1150760, 1146514, 1146516,\n", + " 1146523, 1143007, 1140482, 1143937, 1143807, 1143795, 1146636, 1140361,\n", + " 1140364, 1137990, 1143080, 1168921, 1168927, 1168913, 1144732, 1147984,\n", + " 1147985, 1147992, 1147996, 1144013, 1139249, 1147131, 1147233, 1147241,\n", + " 1148704, 1148475, 1148473, 1147056, 1147061, 1149725, 1147970, 1145012,\n", + " 1147194, 1147198, 1147196, 1158226, 1147880, 1146178, 1149263, 1148940,\n", + " 1151856, 1144514, 1145835, 1152013, 1144203, 1154816, 1147794, 1147796,\n", + " 1151473, 1152022, 1154263, 1135513, 1139914, 1134869, 1148278, 1147016,\n", + " 1147021, 1152804, 1141941, 1141949, 1141193, 1147770, 1146400, 1148288,\n", + " 1137724, 1139096, 1154420, 1148180, 1136251, 1138404, 1157983, 1144110,\n", + " 1146549, 1139938, 1143980, 1143983, 1148204, 1141737, 1141733, 1153124,\n", + " 1153188, 1145104, 1144851, 1143129, 1147447, 1147442, 1135311, 1154183,\n", + " 1148505, 1146571, 1141420, 1152799, 1151350, 1145080, 1149385, 1146261,\n", + " 1146623, 1151692, 1152100, 1152103, 1153026, 1153038, 1150085, 1137746,\n", + " 1146304, 1136410, 1136411, 1152826, 1155337, 1155334, 1157826, 1154633,\n", + " 1151582, 1151573, 1151617, 1151629, 1136131, 1136788, 1152958, 1138979,\n", + " 1152903, 1173495, 1152341, 1146816, 1156831, 1156816, 1153311, 1138281,\n", + " 1152300, 1156007, 1136028, 1156608, 1156621, 1142777, 1143475, 1153915,\n", + " 1150150, 1150164, 1142257, 1148040, 1148041, 1155222, 1158477, 1148628,\n", + " 1158530, 1158540, 1149947, 1157515, 1135698, 1142041, 1157459, 1139225,\n", + " 1135430, 1135434, 1158854, 1156505, 1145191, 1157554, 1150465, 1152738,\n", + " 1150819, 1150830, 1147810, 1158304, 1158306, 1158308, 1155441, 1150130,\n", + " 1154529, 1145771, 1153994, 1156269, 1151379, 1137908, 1140189, 1140186,\n", + " 1152527, 1149324, 1149321, 1151424, 1158096, 1154763, 1155628, 1155630,\n", + " 1155631, 1156563, 1154555, 1158824, 1158829, 1158325, 1154035, 1157001,\n", + " 1153368, 1153363, 1161391, 1154080, 1143189, 1150371, 1157439, 1141620,\n", + " 1155293, 1153786, 1159116, 1159115, 1145694, 1140914, 1134677, 1135601,\n", + " 1145507, 1148149, 1155848, 1146321, 1144451, 1167618, 1140368, 1155884,\n", + " 1157733, 1157740, 1157033, 1144843, 1142466, 1142479, 1155975, 1156957,\n", + " 1158846, 1162538, 1149705, 1149700, 1154600, 1155938, 1153490, 1153503,\n", + " 1136896, 1171171, 1140213, 1158447, 1158444, 1156774, 1156778, 1158285,\n", + " 1158278, 1152458, 1151615, 1156666, 1156488, 1153808, 1156278, 1136640,\n", + " 1136646, 1134757, 1140049, 1158558, 1153827, 1161163, 1165497, 1146113,\n", + " 1146126, 1165778, 1159946, 1138101, 1155871, 1144581, 1161539, 1142658,\n", + " 1157758, 1167346, 1159042, 1159052, 1165838, 1167592, 1153052, 1153045,\n", + " 1164669, 1156235, 1156111, 1167189, 1164559, 1145948, 1145945, 1155476,\n", + " 1151014, 1153514, 1153519, 1146870, 1146873, 1138161, 1164006, 1156795,\n", + " 1149956, 1154590, 1139286, 1166073, 1171518, 1146063, 1158878, 1140641,\n", + " 1140643, 1141867, 1148600, 1148603, 1148607, 1164976, 1143143, 1151872,\n", + " 1141792, 1141800, 1156177, 1156181, 1159032, 1159038, 1169105, 1169108,\n", + " 1152247, 1176878, 1155588, 1151227, 1151228, 1163154, 1153924, 1158405,\n", + " 1170581, 1147830, 1164580, 1161241, 1155054, 1151650, 1156739, 1157955,\n", + " 1153649, 1171040, 1144812, 1162085, 1135567, 1142722, 1142733, 1156297,\n", + " 1156303, 1144058, 1145738, 1155312, 1171687, 1138762, 1144972, 1144973,\n", + " 1143037, 1152624, 1155911, 1139344, 1147723, 1145890, 1145900, 1153520,\n", + " 1153535, 1169538, 1171867, 1167503, 1154076, 1147330, 1147339, 1160030,\n", + " 1145674, 1145675, 1151598, 1149130, 1154922, 1144676, 1166653, 1155169,\n", + " 1150518, 1144346, 1144336, 1157534, 1154668, 1135841, 1152997, 1169154,\n", + " 1169162, 1169163, 1157331, 1157340, 1138136, 1169359, 1147502, 1158159,\n", + " 1171529, 1149688, 1158611, 1158623, 1163282, 1172759, 1172642, 1172289,\n", + " 1147416, 1172486, 1152353, 1168371, 1143170, 1168453, 1168404, 1168059,\n", + " 1149402, 1172838, 1148335, 1168465, 1173307, 1173308, 1154019, 1154027,\n", + " 1152152, 1172787, 1159655, 1178422, 1178102, 1157153, 1147711, 1157593,\n", + " 1170495, 1166827, 1162106, 1168398, 1168604, 1193674, 1146765, 1140326,\n", + " 1172932, 1171614, 1144549, 1177688, 1154148, 1149179, 1170122, 1180603,\n", + " 1186117, 1170371, 1168481, 1156556, 1184740, 1170518, 1171122, 1179715,\n", + " 1189183, 1171407, 1151509, 1179807, 1159914, 1155262, 1154718, 1157792,\n", + " 1157803, 1171629, 1171623, 1157991, 1158249, 1153899, 1153892, 1134651,\n", + " 1162938, 1145626, 1172024, 1149755, 1152279, 1186957, 1158512, 1158520,\n", + " 1179636, 1158379, 1155899, 1157270, 1188461, 1140393, 1170605, 1162253,\n", + " 1159340, 1160078, 1170341, 1147180, 1147182, 1182158, 1170417, 1192748,\n", + " 1156528, 1156539, 1170823, 1139831, 1139837, 1150265, 1154812, 1149668,\n", + " 1183956, 1189685, 1156049, 1156055, 1191518, 1189322, 1191201, 1176054,\n", + " 1166324, 1188535, 1188043, 1181283, 1153733, 1185764, 1152113, 1179006,\n", + " 1169707, 1166838, 1171201, 1193063, 1181848, 1172423, 1183949, 1152080,\n", + " 1155962, 1181259, 1179769, 1192933, 1157012, 1157022, 1161940],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1140282, 1140285, 1135165, 1135723, 1140788, 1141751, 1141758,\n", + " 1136223, 1141251, 1136969, 1143615, 1139808, 1139811, 1137271, 1138930,\n", + " 1150395, 1146647, 1139609, 1142963, 1149216, 1155689, 1143817, 1147483,\n", + " 1141882, 1142881, 1153938, 1135941, 1146656, 1146661, 1148558, 1136742,\n", + " 1147089, 1147095, 1141909, 1137220, 1155014, 1155019, 1139371, 1147211,\n", + " 1136677, 1150329, 1152427, 1134717, 1136261, 1134807, 1134815, 1138126,\n", + " 1134735, 1135367, 1135202, 1134970, 1141036, 1136289, 1134794, 1138504,\n", + " 1137329, 1136178, 1157103, 1137693, 1136617, 1144395, 1137521, 1137529,\n", + " 1137534, 1136716, 1157405, 1136204, 1156159, 1139162, 1135582, 1141086,\n", + " 1155075, 1138514, 1153089, 1153094, 1137953, 1137957, 1137959, 1138590,\n", + " 1158136, 1135499, 1154128, 1145120, 1136982, 1156899, 1156908, 1135522,\n", + " 1135535, 1139684, 1139685, 1138314, 1139874, 1139878, 1157703, 1138436,\n", + " 1138440, 1138451, 1138461, 1154787, 1136594, 1154106, 1158391, 1149328,\n", + " 1156605, 1156606, 1147112, 1142611, 1142615, 1160825, 1135618, 1135625,\n", + " 1137422, 1139846, 1159868, 1139667, 1139673, 1139674, 1138079, 1142249,\n", + " 1134992, 1134778, 1142793, 1139755, 1136730, 1136728, 1140199, 1144410,\n", + " 1153543, 1136067, 1139925, 1138648, 1134891, 1155648, 1140557, 1141992,\n", + " 1152044, 1136051, 1137734, 1147316, 1140901, 1140904, 1134750, 1135549,\n", + " 1141088, 1141099, 1148996, 1149001, 1139889, 1143767, 1154860, 1143704,\n", + " 1139025, 1140003, 1149979, 1146834, 1146847, 1152704, 1141695, 1135861,\n", + " 1136418, 1136426, 1140469, 1142937, 1141223, 1139386, 1141657, 1142160,\n", + " 1136917, 1143675, 1137190, 1140601, 1141156, 1141785, 1139495, 1141609,\n", + " 1144650, 1134985, 1136862, 1147850, 1137074, 1144420, 1142056, 1139276,\n", + " 1139279, 1138472, 1137761, 1137762, 1148872, 1137062, 1138708, 1140100,\n", + " 1140110, 1143107, 1144596, 1157410, 1136871, 1136864, 1141204, 1141209,\n", + " 1144042, 1140885, 1135315, 1135322, 1150906, 1158703, 1147153, 1149193,\n", + " 1141365, 1153068, 1140815, 1149101, 1138288, 1138292, 1138293, 1144279,\n", + " 1143917, 1139510, 1139773, 1139662, 1144998, 1146695, 1135049, 1147050,\n", + " 1147047, 1149876, 1143543, 1143551, 1152976, 1135459, 1135466, 1141925,\n", + " 1146901, 1144242, 1145339, 1141853, 1150689, 1138728, 1140702, 1136891,\n", + " 1134861, 1143851, 1146024, 1150601, 1138085, 1154332, 1141646, 1141585,\n", + " 1149928, 1149933, 1139990, 1150429, 1143883, 1147543, 1147540, 1148763,\n", + " 1147282, 1136160, 1138923, 1157718, 1136836, 1165629, 1139329, 1142159,\n", + " 1143345, 1144615, 1140844, 1144088, 1150761, 1150760, 1146514, 1146516,\n", + " 1146523, 1143007, 1140482, 1143937, 1143807, 1143795, 1146636, 1140361,\n", + " 1140364, 1137990, 1143080, 1168921, 1168927, 1168913, 1144732, 1147984,\n", + " 1147985, 1147992, 1147996, 1144013, 1139249, 1147131, 1147233, 1147241,\n", + " 1148704, 1148475, 1148473, 1147056, 1147061, 1149725, 1147970, 1145012,\n", + " 1147194, 1147198, 1147196, 1158226, 1147880, 1146178, 1149263, 1148940,\n", + " 1151856, 1144514, 1145835, 1152013, 1144203, 1154816, 1147794, 1147796,\n", + " 1151473, 1152022, 1154263, 1135513, 1139914, 1134869, 1148278, 1147016,\n", + " 1147021, 1152804, 1141941, 1141949, 1141193, 1147770, 1146400, 1148288,\n", + " 1137724, 1139096, 1154420, 1148180, 1136251, 1138404, 1157983, 1144110,\n", + " 1146549, 1139938, 1143980, 1143983, 1148204, 1141737, 1141733, 1153124,\n", + " 1153188, 1145104, 1144851, 1143129, 1147447, 1147442, 1135311, 1154183,\n", + " 1148505, 1146571, 1141420, 1152799, 1151350, 1145080, 1149385, 1146261,\n", + " 1146623, 1151692, 1152100, 1152103, 1153026, 1153038, 1150085, 1137746,\n", + " 1146304, 1136410, 1136411, 1152826, 1155337, 1155334, 1157826, 1154633,\n", + " 1151582, 1151573, 1151617, 1151629, 1136131, 1136788, 1152958, 1138979,\n", + " 1152903, 1173495, 1152341, 1146816, 1156831, 1156816, 1153311, 1138281,\n", + " 1152300, 1156007, 1136028, 1156608, 1156621, 1142777, 1143475, 1153915,\n", + " 1150150, 1150164, 1142257, 1148040, 1148041, 1155222, 1158477, 1148628,\n", + " 1158530, 1158540, 1149947, 1157515, 1135698, 1142041, 1157459, 1139225,\n", + " 1135430, 1135434, 1158854, 1156505, 1145191, 1157554, 1150465, 1152738,\n", + " 1150819, 1150830, 1147810, 1158304, 1158306, 1158308, 1155441, 1150130,\n", + " 1154529, 1145771, 1153994, 1156269, 1151379, 1137908, 1140189, 1140186,\n", + " 1152527, 1149324, 1149321, 1151424, 1158096, 1154763, 1155628, 1155630,\n", + " 1155631, 1156563, 1154555, 1158824, 1158829, 1158325, 1154035, 1157001,\n", + " 1153368, 1153363, 1161391, 1154080, 1143189, 1150371, 1157439, 1141620,\n", + " 1155293, 1153786, 1159116, 1159115, 1145694, 1140914, 1134677, 1135601,\n", + " 1145507, 1148149, 1155848, 1146321, 1144451, 1167618, 1140368, 1155884,\n", + " 1157733, 1157740, 1157033, 1144843, 1142466, 1142479, 1155975, 1156957,\n", + " 1158846, 1162538, 1149705, 1149700, 1154600, 1155938, 1153490, 1153503,\n", + " 1136896, 1171171, 1140213, 1158447, 1158444, 1156774, 1156778, 1158285,\n", + " 1158278, 1152458, 1151615, 1156666, 1156488, 1153808, 1156278, 1136640,\n", + " 1136646, 1134757, 1140049, 1158558, 1153827, 1161163, 1165497, 1146113,\n", + " 1146126, 1165778, 1159946, 1138101, 1155871, 1144581, 1161539, 1142658,\n", + " 1157758, 1167346, 1159042, 1159052, 1165838, 1167592, 1153052, 1153045,\n", + " 1164669, 1156235, 1156111, 1167189, 1164559, 1145948, 1145945, 1155476,\n", + " 1151014, 1153514, 1153519, 1146870, 1146873, 1138161, 1164006, 1156795,\n", + " 1149956, 1154590, 1139286, 1166073, 1171518, 1146063, 1158878, 1140641,\n", + " 1140643, 1141867, 1148600, 1148603, 1148607, 1164976, 1143143, 1151872,\n", + " 1141792, 1141800, 1156177, 1156181, 1159032, 1159038, 1169105, 1169108,\n", + " 1152247, 1176878, 1155588, 1151227, 1151228, 1163154, 1153924, 1158405,\n", + " 1170581, 1147830, 1164580, 1161241, 1155054, 1151650, 1156739, 1157955,\n", + " 1153649, 1171040, 1144812, 1162085, 1135567, 1142722, 1142733, 1156297,\n", + " 1156303, 1144058, 1145738, 1155312, 1171687, 1138762, 1144972, 1144973,\n", + " 1143037, 1152624, 1155911, 1139344, 1147723, 1145890, 1145900, 1153520,\n", + " 1153535, 1169538, 1171867, 1167503, 1154076, 1147330, 1147339, 1160030,\n", + " 1145674, 1145675, 1151598, 1149130, 1154922, 1144676, 1166653, 1155169,\n", + " 1150518, 1144346, 1144336, 1157534, 1154668, 1135841, 1152997, 1169154,\n", + " 1169162, 1169163, 1157331, 1157340, 1138136, 1169359, 1147502, 1158159,\n", + " 1171529, 1149688, 1158611, 1158623, 1163282, 1172759, 1172642, 1172289,\n", + " 1147416, 1172486, 1152353, 1168371, 1143170, 1168453, 1168404, 1168059,\n", + " 1149402, 1172838, 1148335, 1168465, 1173307, 1173308, 1154019, 1154027,\n", + " 1152152, 1172787, 1159655, 1178422, 1178102, 1157153, 1147711, 1157593,\n", + " 1170495, 1166827, 1162106, 1168398, 1168604, 1193674, 1146765, 1140326,\n", + " 1172932, 1171614, 1144549, 1177688, 1154148, 1149179, 1170122, 1180603,\n", + " 1186117, 1170371, 1168481, 1156556, 1184740, 1170518, 1171122, 1179715,\n", + " 1189183, 1171407, 1151509, 1179807, 1159914, 1155262, 1154718, 1157792,\n", + " 1157803, 1171629, 1171623, 1157991, 1158249, 1153899, 1153892, 1134651,\n", + " 1162938, 1145626, 1172024, 1149755, 1152279, 1186957, 1158512, 1158520,\n", + " 1179636, 1158379, 1155899, 1157270, 1188461, 1140393, 1170605, 1162253,\n", + " 1159340, 1160078, 1170341, 1147180, 1147182, 1182158, 1170417, 1192748,\n", + " 1156528, 1156539, 1170823, 1139831, 1139837, 1150265, 1154812, 1149668,\n", + " 1183956, 1189685, 1156049, 1156055, 1191518, 1189322, 1191201, 1176054,\n", + " 1166324, 1188535, 1188043, 1181283, 1153733, 1185764, 1152113, 1179006,\n", + " 1169707, 1166838, 1171201, 1193063, 1181848, 1172423, 1183949, 1152080,\n", + " 1155962, 1181259, 1179769, 1192933, 1157012, 1157022, 1161940],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197841, 1198237, 1198769, 1199424, 1195393, 1199282, 1199293,\n", + " 1202255, 1201577, 1201582, 1194626, 1201016, 1197351, 1202803, 1198557,\n", + " 1194866, 1194783, 1194782, 1197158, 1194649, 1194642, 1195514, 1195263,\n", + " 1196534, 1201989, 1201992, 1194952, 1194882, 1199172, 1199171, 1195740,\n", + " 1198987, 1195313, 1195325, 1196835, 1195988, 1198260, 1195571, 1195970,\n", + " 1198958, 1198163, 1198167, 1198161, 1196711, 1199823, 1195145, 1195148,\n", + " 1195278, 1197140, 1197265, 1197273, 1196109, 1194859, 1196742, 1195841,\n", + " 1195038, 1195039, 1195659, 1202916, 1197253, 1197641, 1200037, 1198273,\n", + " 1198282, 1200949, 1197129, 1197291, 1199185, 1194928, 1199628, 1197676,\n", + " 1197990, 1202457, 1202448, 1200131, 1200866, 1200869, 1198406, 1194795,\n", + " 1198763, 1200060, 1201511, 1196496, 1196498, 1200670, 1199021, 1197601,\n", + " 1201116, 1196727, 1195771, 1195773, 1200894, 1198428, 1198811, 1200774,\n", + " 1201824, 1201827, 1200450, 1200507, 1198066, 1201421, 1202630, 1200991,\n", + " 1201056, 1198485, 1202641, 1201042, 1203350, 1200553, 1200555, 1202138,\n", + " 1199908, 1200194, 1196779, 1201451, 1201442, 1201029, 1202239, 1199976,\n", + " 1197546, 1195885, 1200181, 1201291, 1196761, 1201590, 1202209, 1200388,\n", + " 1198562, 1200784, 1200785, 1199606, 1195438, 1195676, 1195679, 1195664,\n", + " 1200445, 1198929, 1200684, 1198911, 1195415, 1197820, 1197822, 1197821,\n", + " 1202433, 1198299, 1203102, 1201138, 1194730, 1198824, 1197735, 1200437,\n", + " 1199786, 1200465, 1200468, 1195070, 1201886, 1197652, 1195082, 1197039,\n", + " 1194908], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197841, 1198237, 1198769, 1199424, 1195393, 1199282, 1199293,\n", + " 1202255, 1201577, 1201582, 1194626, 1201016, 1197351, 1202803, 1198557,\n", + " 1194866, 1194783, 1194782, 1197158, 1194649, 1194642, 1195514, 1195263,\n", + " 1196534, 1201989, 1201992, 1194952, 1194882, 1199172, 1199171, 1195740,\n", + " 1198987, 1195313, 1195325, 1196835, 1195988, 1198260, 1195571, 1195970,\n", + " 1198958, 1198163, 1198167, 1198161, 1196711, 1199823, 1195145, 1195148,\n", + " 1195278, 1197140, 1197265, 1197273, 1196109, 1194859, 1196742, 1195841,\n", + " 1195038, 1195039, 1195659, 1202916, 1197253, 1197641, 1200037, 1198273,\n", + " 1198282, 1200949, 1197129, 1197291, 1199185, 1194928, 1199628, 1197676,\n", + " 1197990, 1202457, 1202448, 1200131, 1200866, 1200869, 1198406, 1194795,\n", + " 1198763, 1200060, 1201511, 1196496, 1196498, 1200670, 1199021, 1197601,\n", + " 1201116, 1196727, 1195771, 1195773, 1200894, 1198428, 1198811, 1200774,\n", + " 1201824, 1201827, 1200450, 1200507, 1198066, 1201421, 1202630, 1200991,\n", + " 1201056, 1198485, 1202641, 1201042, 1203350, 1200553, 1200555, 1202138,\n", + " 1199908, 1200194, 1196779, 1201451, 1201442, 1201029, 1202239, 1199976,\n", + " 1197546, 1195885, 1200181, 1201291, 1196761, 1201590, 1202209, 1200388,\n", + " 1198562, 1200784, 1200785, 1199606, 1195438, 1195676, 1195679, 1195664,\n", + " 1200445, 1198929, 1200684, 1198911, 1195415, 1197820, 1197822, 1197821,\n", + " 1202433, 1198299, 1203102, 1201138, 1194730, 1198824, 1197735, 1200437,\n", + " 1199786, 1200465, 1200468, 1195070, 1201886, 1197652, 1195082, 1197039,\n", + " 1194908], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 3.3911e-01, -1.0380e-03, 1.0230e+00, ..., 9.1072e-03,\n", + " -1.3959e-03, -7.7642e-03],\n", + " [ 2.7784e-01, -5.0825e-04, 8.1699e-01, ..., 3.1564e-02,\n", + " -1.7853e-03, -6.3839e-03],\n", + " [ 1.2373e-01, -1.0662e-04, 3.8608e-01, ..., 1.1688e-01,\n", + " -2.3707e-03, -3.5367e-03],\n", + " ...,\n", + " [ 2.4233e-01, -5.4782e-04, 7.2905e-01, ..., 2.7940e-02,\n", + " -1.4443e-03, -5.6577e-03],\n", + " [ 1.4055e-01, -2.4367e-04, 4.7885e-01, ..., 7.0312e-02,\n", + " -1.7223e-03, -4.2647e-03],\n", + " [ 1.4588e-01, 1.5803e-02, 4.7424e-01, ..., 4.6686e-02,\n", + " -1.5845e-03, -3.8815e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[-1.8701e-02, 5.6408e-01, 9.9881e-01, ..., 2.3569e-01,\n", + " -2.1962e-02, -1.5710e-02],\n", + " [-2.4060e-03, 1.0735e+00, -2.7980e-03, ..., 2.9895e-01,\n", + " -1.4745e-02, 2.4370e-01],\n", + " [-9.2513e-03, 5.0768e-01, 3.8939e-01, ..., -1.6073e-02,\n", + " -1.8069e-02, -1.0752e-02],\n", + " ...,\n", + " [-9.7284e-03, 7.9098e-01, 2.1324e+00, ..., 3.6094e-01,\n", + " -2.6096e-02, -5.1338e-03],\n", + " [-4.3123e-02, -2.3011e-02, 3.3809e+00, ..., -2.1503e-02,\n", + " -3.5733e-02, -5.8285e-02],\n", + " [-1.2906e-02, 3.4550e+00, 2.1493e+00, ..., 5.4525e+00,\n", + " -5.2156e-02, 2.7993e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-4.3015e-04, 2.5470e-02, 1.1271e-01, ..., 1.5203e-01,\n", + " 8.2885e-04, -7.0725e-04],\n", + " [-4.7034e-03, 2.6457e-01, 2.0252e-01, ..., 1.1071e+00,\n", + " -1.0905e-04, -4.7399e-03],\n", + " [-3.2202e-03, 1.7131e-01, 6.1445e-02, ..., 1.0744e+00,\n", + " 2.2800e-01, -2.5187e-03],\n", + " ...,\n", + " [-4.3015e-04, 2.5470e-02, 1.1271e-01, ..., 1.5203e-01,\n", + " 8.2885e-04, -7.0725e-04],\n", + " [-4.3015e-04, 2.5470e-02, 1.1271e-01, ..., 1.5203e-01,\n", + " 8.2885e-04, -7.0725e-04],\n", + " [-8.8293e-04, 3.3043e-02, 1.8683e-01, ..., 1.0473e+00,\n", + " 5.4548e-01, 3.9458e-02]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-3.0041e-03, 4.2921e-01, 6.4813e-02, ..., -6.0126e-03,\n", + " 3.0122e-01, 3.2568e-01],\n", + " [-2.1251e-03, 3.8816e-01, 3.4145e-02, ..., -6.7008e-03,\n", + " 3.1761e-01, 2.2978e-01],\n", + " [ 9.3479e-02, 5.4368e-01, 2.0675e-01, ..., -7.6903e-03,\n", + " 3.0528e-01, -1.3595e-03],\n", + " ...,\n", + " [-2.5331e-03, 4.1668e-01, 1.3420e-02, ..., -4.4516e-03,\n", + " 2.3936e-01, 2.2357e-01],\n", + " [-1.5015e-03, 3.6007e-01, -1.5335e-04, ..., -6.8874e-03,\n", + " 3.4390e-01, 7.4107e-02],\n", + " [ 1.0712e-01, 6.3182e-01, 2.2472e-01, ..., -9.7342e-03,\n", + " 4.6627e-01, -6.3621e-04]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 101, 143, 105, 194, 19, 19, 531, 562, 268, 408, 477, 400,\n", + " 686, 383, 506, 305, 402, 496, 350, 487, 365, 686, 686, 352,\n", + " 449, 450, 450, 672, 575, 575, 575, 977, 843, 943, 772, 772,\n", + " 1039, 977, 977, 976, 1009, 1316, 1183, 1085, 1085, 1286, 1263, 1336,\n", + " 1336, 999, 1449, 1449, 1449, 1449, 1449, 1449, 1614, 1614, 1768, 1445,\n", + " 1588, 1637, 1758, 1837, 1742, 1623, 1623, 1835, 1758, 1602, 1817, 1817,\n", + " 1817, 1817, 1624, 1624, 2033, 1891, 1708, 1888, 1891, 1915, 1962, 2052,\n", + " 2052, 2085, 1882, 1924, 1924, 1924, 1924, 1924, 1924, 2173, 2144, 2087,\n", + " 2232, 2155, 2174, 2206, 2336, 2351, 2276, 2329, 2274, 2274, 2150, 2327,\n", + " 2365, 2365, 2448, 2535, 2535, 2535, 2544, 2544, 2502, 2707, 2548, 2515,\n", + " 2594, 2667, 2515, 2515, 2823, 2938, 2938, 2988, 2988, 3275, 2983, 3121,\n", + " 3005, 3275, 3275, 3275, 3275, 3275, 3275, 2830, 2830, 2830, 3172, 3308,\n", + " 3341, 3305, 3429, 3429, 3531, 3587, 3619, 3619, 3870, 3673, 4130, 3793,\n", + " 4108, 4066, 4166, 4273, 4273, 4366, 4239, 4372, 4427, 4239, 4408, 4427,\n", + " 4467, 4462, 4526, 4487, 4516, 4618, 4594, 4585, 4585, 4715, 4715, 4657,\n", + " 4657, 4657, 4657, 4816, 4816, 4639, 4903, 4949, 4979, 5194, 5036, 5388,\n", + " 5230, 5249, 5229, 5336, 5224, 5193, 5274, 5274, 5505, 5593, 5709, 5457,\n", + " 5581, 5528, 5636, 5652, 5541, 5541, 5807, 5769, 5894, 5899, 5847, 5781,\n", + " 5785, 5672, 5793, 6209, 5799, 6040, 5799, 5799, 6143, 6143, 6143, 6120,\n", + " 6120, 6120, 6212, 6212, 6297, 6210, 6210, 6210, 6428, 6038, 6197, 6186,\n", + " 6628, 6493, 6361, 6614, 6580, 6777, 6711, 6563, 6591, 6522, 6421, 6421,\n", + " 6774, 6774, 6467, 6732, 6812, 6812, 6835, 6843, 6738, 6709, 6709, 6764,\n", + " 6764],\n", + " [ 16, 102, 102, 90, 13, 107, 135, 85, 92, 71, 118, 157,\n", + " 38, 26, 2, 6, 89, 138, 128, 25, 97, 75, 52, 123,\n", + " 70, 76, 39, 109, 120, 74, 70, 106, 60, 10, 34, 6,\n", + " 102, 38, 12, 89, 140, 115, 3, 73, 37, 21, 36, 6,\n", + " 128, 95, 129, 50, 26, 157, 133, 57, 93, 63, 55, 97,\n", + " 141, 70, 113, 137, 40, 18, 159, 23, 68, 37, 24, 35,\n", + " 148, 69, 144, 111, 4, 84, 72, 23, 20, 2, 16, 28,\n", + " 22, 33, 36, 89, 17, 47, 0, 9, 94, 142, 8, 126,\n", + " 46, 7, 7, 96, 11, 159, 101, 61, 34, 118, 89, 2,\n", + " 54, 27, 55, 51, 101, 145, 70, 82, 2, 67, 105, 73,\n", + " 122, 19, 139, 37, 160, 150, 108, 99, 27, 132, 1, 118,\n", + " 20, 15, 119, 110, 81, 125, 45, 160, 124, 84, 89, 11,\n", + " 156, 101, 153, 112, 160, 112, 80, 130, 135, 83, 135, 41,\n", + " 101, 131, 33, 6, 58, 136, 9, 64, 98, 154, 118, 138,\n", + " 118, 101, 158, 7, 7, 23, 89, 65, 6, 32, 70, 103,\n", + " 91, 136, 87, 155, 94, 26, 23, 89, 7, 126, 70, 76,\n", + " 5, 59, 8, 10, 146, 41, 111, 44, 49, 30, 31, 53,\n", + " 23, 114, 117, 127, 15, 23, 97, 12, 78, 12, 149, 42,\n", + " 116, 77, 101, 65, 89, 62, 152, 88, 89, 45, 9, 44,\n", + " 111, 66, 134, 143, 43, 11, 89, 56, 151, 129, 86, 89,\n", + " 38, 101, 79, 52, 89, 147, 3, 90, 121, 48, 89, 49,\n", + " 100, 10, 55, 104, 22, 89, 44, 29, 113, 89, 88, 14,\n", + " 3]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 645, 430, 6209, ..., 2327, 328, 3122],\n", + " [ 2, 195, 195, ..., 6106, 6137, 6137]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 2, 138, 44, ..., 101, 26, 6],\n", + " [ 42, 55, 231, ..., 6852, 6643, 6847]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 227, 227, 227, ..., 6209, 6209, 6191],\n", + " [ 54, 169, 318, ..., 788, 296, 66]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 69, 410, 441, ..., 704, 296, 494],\n", + " [ 242, 196, 224, ..., 6091, 6119, 6205]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4119, 1782, 412, ..., 5641, 5492, 5834],\n", + " [ 75, 42, 121, ..., 6762, 6562, 6799]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 227, 227, 227, ..., 6225, 6249, 6249],\n", + " [4319, 4578, 4317, ..., 3988, 530, 444]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 19, 19, 19, ..., 6736, 6736, 6736],\n", + " [ 75, 722, 4359, ..., 5709, 5641, 5456]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006915\n", + "sampling 0.006757\n", + "noi time: 0.002705\n", + "get_vertex_data call: 0.032651\n", + "noi group time: 0.003273\n", + "eoi_group_time: 0.01341\n", + "second half: 0.213161\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 14488, 31145, ..., 1116000, 1128742, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 14488, 31145, ..., 1116000, 1128742, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208576, 1219070, 1203800, ..., 1925027, 1930686, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208576, 1219070, 1203800, ..., 1925027, 1930686, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137435, 1141424, 1136228, 1140285, 1136347, 1137784, 1137791, 1140799,\n", + " 1141756, 1141758, 1137506, 1138335, 1142807, 1139462, 1136969, 1138897,\n", + " 1143615, 1149824, 1137937, 1137947, 1145992, 1138942, 1143372, 1143363,\n", + " 1146640, 1146646, 1139615, 1139966, 1140781, 1150509, 1142964, 1139866,\n", + " 1148584, 1149216, 1149228, 1155686, 1155689, 1143820, 1147473, 1147477,\n", + " 1147483, 1141882, 1153940, 1144636, 1149033, 1149038, 1146995, 1134697,\n", + " 1148346, 1146472, 1136122, 1136125, 1152666, 1152669, 1148546, 1137220,\n", + " 1150555, 1155014, 1147211, 1150329, 1152416, 1134710, 1138742, 1140540,\n", + " 1140542, 1138112, 1138126, 1138356, 1153463, 1134720, 1140020, 1135367,\n", + " 1135202, 1135210, 1140753, 1136289, 1134794, 1137329, 1143068, 1157103,\n", + " 1136619, 1144395, 1157398, 1152376, 1136662, 1137441, 1141083, 1138524,\n", + " 1153099, 1138576, 1145125, 1139684, 1139685, 1138305, 1138319, 1137286,\n", + " 1138440, 1138445, 1138461, 1137920, 1137924, 1136594, 1138702, 1138882,\n", + " 1156603, 1156606, 1147112, 1147119, 1142611, 1135025, 1135359, 1135631,\n", + " 1156141, 1138177, 1138185, 1145843, 1148531, 1148533, 1135769, 1139667,\n", + " 1134992, 1142433, 1135779, 1135782, 1159009, 1144410, 1143625, 1140034,\n", + " 1139933, 1152042, 1152044, 1137734, 1137728, 1134750, 1136993, 1138255,\n", + " 1135549, 1141088, 1141097, 1141098, 1141980, 1135291, 1139632, 1143767,\n", + " 1154860, 1139025, 1139033, 1140003, 1140009, 1146832, 1142499, 1152719,\n", + " 1135860, 1135861, 1135862, 1141223, 1139386, 1136917, 1139730, 1145066,\n", + " 1144237, 1140598, 1140592, 1141161, 1141786, 1139495, 1144937, 1141609,\n", + " 1136848, 1138482, 1142053, 1141821, 1143153, 1138469, 1149111, 1158600,\n", + " 1141479, 1138713, 1138708, 1140110, 1142924, 1142913, 1138423, 1138424,\n", + " 1148263, 1136864, 1140882, 1141399, 1140432, 1144182, 1144179, 1161093,\n", + " 1166711, 1146201, 1139559, 1158698, 1158700, 1147153, 1149186, 1149197,\n", + " 1141365, 1141367, 1141375, 1153068, 1138293, 1144279, 1143917, 1139510,\n", + " 1139653, 1139127, 1140976, 1140990, 1141555, 1147050, 1147047, 1145873,\n", + " 1152976, 1152982, 1135457, 1141925, 1144242, 1137149, 1150692, 1136885,\n", + " 1143643, 1137571, 1137570, 1141380, 1143851, 1136275, 1146024, 1141646,\n", + " 1139990, 1143293, 1143294, 1151124, 1147543, 1147146, 1147282, 1142821,\n", + " 1142816, 1136330, 1149155, 1139417, 1149608, 1143051, 1148406, 1148414,\n", + " 1136161, 1142584, 1136836, 1139329, 1139328, 1141496, 1138235, 1142159,\n", + " 1143345, 1144611, 1140846, 1135876, 1135813, 1150296, 1138013, 1143456,\n", + " 1143007, 1142003, 1143937, 1147574, 1146636, 1140364, 1149582, 1137990,\n", + " 1144219, 1147984, 1147999, 1134902, 1144013, 1139252, 1139255, 1145462,\n", + " 1148704, 1143302, 1142700, 1141327, 1146745, 1146751, 1153701, 1143434,\n", + " 1147056, 1147027, 1145021, 1145009, 1143921, 1147880, 1145237, 1145751,\n", + " 1142377, 1142378, 1148397, 1146178, 1151242, 1148223, 1151182, 1151179,\n", + " 1150438, 1150445, 1149258, 1155005, 1151860, 1144514, 1144526, 1141349,\n", + " 1144202, 1151480, 1152023, 1152024, 1154263, 1145256, 1135516, 1139919,\n", + " 1146723, 1146731, 1140566, 1140402, 1147019, 1158949, 1141949, 1148744,\n", + " 1148448, 1149412, 1147866, 1154420, 1151363, 1136249, 1148720, 1148724,\n", + " 1148729, 1147627, 1149810, 1151941, 1153135, 1153192, 1153188, 1159828,\n", + " 1159837, 1150932, 1150935, 1143092, 1150356, 1155088, 1141012, 1147442,\n", + " 1151906, 1151918, 1148500, 1141420, 1136002, 1147737, 1149376, 1148949,\n", + " 1146966, 1146969, 1146975, 1146967, 1153255, 1146623, 1167276, 1151401,\n", + " 1135688, 1152415, 1152100, 1151729, 1156325, 1153032, 1153038, 1137746,\n", + " 1146304, 1152622, 1140521, 1152819, 1152826, 1154119, 1154123, 1157847,\n", + " 1157839, 1154633, 1151617, 1145278, 1148916, 1152958, 1150613, 1152233,\n", + " 1151309, 1138275, 1138279, 1138281, 1136028, 1158712, 1151187, 1152928,\n", + " 1166850, 1150172, 1148040, 1155202, 1152601, 1145656, 1149794, 1137048,\n", + " 1158473, 1148628, 1158530, 1137458, 1147646, 1142041, 1154377, 1150960,\n", + " 1158860, 1148890, 1158916, 1156500, 1156505, 1157064, 1157069, 1152833,\n", + " 1145191, 1150465, 1135231, 1142216, 1135729, 1135730, 1156629, 1151788,\n", + " 1151777, 1165703, 1156935, 1156940, 1153413, 1147812, 1151469, 1139525,\n", + " 1158306, 1158311, 1151271, 1155441, 1155442, 1155452, 1153359, 1150132,\n", + " 1150136, 1144366, 1145773, 1145606, 1142755, 1142758, 1157642, 1151379,\n", + " 1158639, 1155360, 1156649, 1155122, 1152527, 1157183, 1149320, 1151424,\n", + " 1146920, 1156463, 1155628, 1154555, 1155576, 1158824, 1158325, 1155646,\n", + " 1143254, 1154250, 1154240, 1152307, 1154909, 1143189, 1150371, 1157439,\n", + " 1147916, 1150077, 1155613, 1150805, 1143517, 1157928, 1137167, 1158112,\n", + " 1156764, 1153786, 1137317, 1135601, 1162226, 1178445, 1158670, 1138215,\n", + " 1149145, 1140633, 1140632, 1152220, 1159213, 1156699, 1156692, 1156027,\n", + " 1157735, 1144843, 1142475, 1155975, 1158846, 1156812, 1149700, 1159790,\n", + " 1153491, 1158760, 1158882, 1158886, 1140215, 1157304, 1158815, 1158285,\n", + " 1155246, 1152463, 1151615, 1136487, 1154393, 1152143, 1153808, 1136640,\n", + " 1179174, 1162167, 1147781, 1158547, 1165497, 1146126, 1138110, 1154342,\n", + " 1158006, 1150011, 1155521, 1161539, 1142487, 1142666, 1159071, 1142426,\n", + " 1142427, 1158295, 1158300, 1160563, 1153052, 1171551, 1155769, 1155771,\n", + " 1144158, 1142870, 1163708, 1163711, 1156100, 1142685, 1150046, 1149063,\n", + " 1149070, 1155479, 1153514, 1147300, 1158680, 1138161, 1164006, 1165651,\n", + " 1139782, 1139290, 1166936, 1148771, 1140735, 1146063, 1146356, 1171249,\n", + " 1160189, 1164052, 1170415, 1169493, 1140643, 1148600, 1148603, 1148607,\n", + " 1168081, 1158643, 1158655, 1156177, 1159025, 1159029, 1159032, 1159038,\n", + " 1152247, 1155588, 1160509, 1162552, 1159314, 1156589, 1168426, 1167931,\n", + " 1147393, 1170577, 1146510, 1146509, 1164580, 1152776, 1153201, 1147438,\n", + " 1159386, 1181318, 1156738, 1156739, 1160849, 1153663, 1190200, 1166636,\n", + " 1171040, 1168748, 1144812, 1167253, 1162085, 1168860, 1164750, 1142733,\n", + " 1156303, 1145911, 1166914, 1148683, 1145228, 1167753, 1160232, 1154689,\n", + " 1144972, 1144973, 1166063, 1166053, 1169233, 1165746, 1147357, 1155908,\n", + " 1145900, 1153526, 1168659, 1175240, 1158724, 1154076, 1147338, 1144690,\n", + " 1149122, 1149130, 1171974, 1155170, 1150522, 1156119, 1144336, 1157534,\n", + " 1138378, 1138382, 1190651, 1169157, 1157331, 1138129, 1141051, 1169359,\n", + " 1154364, 1154352, 1158154, 1158611, 1158623, 1149847, 1157385, 1172076,\n", + " 1165903, 1171475, 1147423, 1155494, 1152353, 1170910, 1143858, 1168404,\n", + " 1168413, 1148335, 1177208, 1169273, 1173307, 1145033, 1154027, 1152150,\n", + " 1153755, 1157158, 1157153, 1147697, 1147711, 1148131, 1149247, 1169038,\n", + " 1165120, 1168598, 1193664, 1140326, 1166684, 1150234, 1154148, 1158176,\n", + " 1149169, 1149173, 1183488, 1174194, 1170465, 1181613, 1167657, 1143420,\n", + " 1178344, 1170178, 1169620, 1153803, 1153141, 1171128, 1153628, 1166554,\n", + " 1161255, 1161262, 1155262, 1155105, 1172009, 1157795, 1151488, 1155804,\n", + " 1181928, 1158249, 1153898, 1145626, 1145618, 1189049, 1149753, 1149755,\n", + " 1146252, 1153609, 1153612, 1157772, 1157761, 1155990, 1185327, 1181143,\n", + " 1158512, 1158517, 1155890, 1155899, 1177090, 1162986, 1140399, 1166989,\n", + " 1170632, 1169068, 1162253, 1159341, 1177907, 1182337, 1181469, 1188637,\n", + " 1146161, 1166783, 1147179, 1141516, 1182733, 1168939, 1139831, 1139837,\n", + " 1150265, 1154806, 1154812, 1163848, 1156055, 1170001, 1170000, 1146392,\n", + " 1146394, 1146395, 1194197, 1188232, 1178526, 1168683, 1191340, 1174004,\n", + " 1184464, 1178983, 1171243, 1153729, 1183629, 1162502, 1153585, 1171201,\n", + " 1177368, 1192912, 1183364, 1170128, 1167094, 1161186, 1172423, 1172417,\n", + " 1171953, 1166789, 1145397, 1178135, 1186170, 1152080, 1183147, 1179660,\n", + " 1155959, 1188473, 1191291, 1169833, 1169837, 1167471, 1157017],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137435, 1141424, 1136228, 1140285, 1136347, 1137784, 1137791, 1140799,\n", + " 1141756, 1141758, 1137506, 1138335, 1142807, 1139462, 1136969, 1138897,\n", + " 1143615, 1149824, 1137937, 1137947, 1145992, 1138942, 1143372, 1143363,\n", + " 1146640, 1146646, 1139615, 1139966, 1140781, 1150509, 1142964, 1139866,\n", + " 1148584, 1149216, 1149228, 1155686, 1155689, 1143820, 1147473, 1147477,\n", + " 1147483, 1141882, 1153940, 1144636, 1149033, 1149038, 1146995, 1134697,\n", + " 1148346, 1146472, 1136122, 1136125, 1152666, 1152669, 1148546, 1137220,\n", + " 1150555, 1155014, 1147211, 1150329, 1152416, 1134710, 1138742, 1140540,\n", + " 1140542, 1138112, 1138126, 1138356, 1153463, 1134720, 1140020, 1135367,\n", + " 1135202, 1135210, 1140753, 1136289, 1134794, 1137329, 1143068, 1157103,\n", + " 1136619, 1144395, 1157398, 1152376, 1136662, 1137441, 1141083, 1138524,\n", + " 1153099, 1138576, 1145125, 1139684, 1139685, 1138305, 1138319, 1137286,\n", + " 1138440, 1138445, 1138461, 1137920, 1137924, 1136594, 1138702, 1138882,\n", + " 1156603, 1156606, 1147112, 1147119, 1142611, 1135025, 1135359, 1135631,\n", + " 1156141, 1138177, 1138185, 1145843, 1148531, 1148533, 1135769, 1139667,\n", + " 1134992, 1142433, 1135779, 1135782, 1159009, 1144410, 1143625, 1140034,\n", + " 1139933, 1152042, 1152044, 1137734, 1137728, 1134750, 1136993, 1138255,\n", + " 1135549, 1141088, 1141097, 1141098, 1141980, 1135291, 1139632, 1143767,\n", + " 1154860, 1139025, 1139033, 1140003, 1140009, 1146832, 1142499, 1152719,\n", + " 1135860, 1135861, 1135862, 1141223, 1139386, 1136917, 1139730, 1145066,\n", + " 1144237, 1140598, 1140592, 1141161, 1141786, 1139495, 1144937, 1141609,\n", + " 1136848, 1138482, 1142053, 1141821, 1143153, 1138469, 1149111, 1158600,\n", + " 1141479, 1138713, 1138708, 1140110, 1142924, 1142913, 1138423, 1138424,\n", + " 1148263, 1136864, 1140882, 1141399, 1140432, 1144182, 1144179, 1161093,\n", + " 1166711, 1146201, 1139559, 1158698, 1158700, 1147153, 1149186, 1149197,\n", + " 1141365, 1141367, 1141375, 1153068, 1138293, 1144279, 1143917, 1139510,\n", + " 1139653, 1139127, 1140976, 1140990, 1141555, 1147050, 1147047, 1145873,\n", + " 1152976, 1152982, 1135457, 1141925, 1144242, 1137149, 1150692, 1136885,\n", + " 1143643, 1137571, 1137570, 1141380, 1143851, 1136275, 1146024, 1141646,\n", + " 1139990, 1143293, 1143294, 1151124, 1147543, 1147146, 1147282, 1142821,\n", + " 1142816, 1136330, 1149155, 1139417, 1149608, 1143051, 1148406, 1148414,\n", + " 1136161, 1142584, 1136836, 1139329, 1139328, 1141496, 1138235, 1142159,\n", + " 1143345, 1144611, 1140846, 1135876, 1135813, 1150296, 1138013, 1143456,\n", + " 1143007, 1142003, 1143937, 1147574, 1146636, 1140364, 1149582, 1137990,\n", + " 1144219, 1147984, 1147999, 1134902, 1144013, 1139252, 1139255, 1145462,\n", + " 1148704, 1143302, 1142700, 1141327, 1146745, 1146751, 1153701, 1143434,\n", + " 1147056, 1147027, 1145021, 1145009, 1143921, 1147880, 1145237, 1145751,\n", + " 1142377, 1142378, 1148397, 1146178, 1151242, 1148223, 1151182, 1151179,\n", + " 1150438, 1150445, 1149258, 1155005, 1151860, 1144514, 1144526, 1141349,\n", + " 1144202, 1151480, 1152023, 1152024, 1154263, 1145256, 1135516, 1139919,\n", + " 1146723, 1146731, 1140566, 1140402, 1147019, 1158949, 1141949, 1148744,\n", + " 1148448, 1149412, 1147866, 1154420, 1151363, 1136249, 1148720, 1148724,\n", + " 1148729, 1147627, 1149810, 1151941, 1153135, 1153192, 1153188, 1159828,\n", + " 1159837, 1150932, 1150935, 1143092, 1150356, 1155088, 1141012, 1147442,\n", + " 1151906, 1151918, 1148500, 1141420, 1136002, 1147737, 1149376, 1148949,\n", + " 1146966, 1146969, 1146975, 1146967, 1153255, 1146623, 1167276, 1151401,\n", + " 1135688, 1152415, 1152100, 1151729, 1156325, 1153032, 1153038, 1137746,\n", + " 1146304, 1152622, 1140521, 1152819, 1152826, 1154119, 1154123, 1157847,\n", + " 1157839, 1154633, 1151617, 1145278, 1148916, 1152958, 1150613, 1152233,\n", + " 1151309, 1138275, 1138279, 1138281, 1136028, 1158712, 1151187, 1152928,\n", + " 1166850, 1150172, 1148040, 1155202, 1152601, 1145656, 1149794, 1137048,\n", + " 1158473, 1148628, 1158530, 1137458, 1147646, 1142041, 1154377, 1150960,\n", + " 1158860, 1148890, 1158916, 1156500, 1156505, 1157064, 1157069, 1152833,\n", + " 1145191, 1150465, 1135231, 1142216, 1135729, 1135730, 1156629, 1151788,\n", + " 1151777, 1165703, 1156935, 1156940, 1153413, 1147812, 1151469, 1139525,\n", + " 1158306, 1158311, 1151271, 1155441, 1155442, 1155452, 1153359, 1150132,\n", + " 1150136, 1144366, 1145773, 1145606, 1142755, 1142758, 1157642, 1151379,\n", + " 1158639, 1155360, 1156649, 1155122, 1152527, 1157183, 1149320, 1151424,\n", + " 1146920, 1156463, 1155628, 1154555, 1155576, 1158824, 1158325, 1155646,\n", + " 1143254, 1154250, 1154240, 1152307, 1154909, 1143189, 1150371, 1157439,\n", + " 1147916, 1150077, 1155613, 1150805, 1143517, 1157928, 1137167, 1158112,\n", + " 1156764, 1153786, 1137317, 1135601, 1162226, 1178445, 1158670, 1138215,\n", + " 1149145, 1140633, 1140632, 1152220, 1159213, 1156699, 1156692, 1156027,\n", + " 1157735, 1144843, 1142475, 1155975, 1158846, 1156812, 1149700, 1159790,\n", + " 1153491, 1158760, 1158882, 1158886, 1140215, 1157304, 1158815, 1158285,\n", + " 1155246, 1152463, 1151615, 1136487, 1154393, 1152143, 1153808, 1136640,\n", + " 1179174, 1162167, 1147781, 1158547, 1165497, 1146126, 1138110, 1154342,\n", + " 1158006, 1150011, 1155521, 1161539, 1142487, 1142666, 1159071, 1142426,\n", + " 1142427, 1158295, 1158300, 1160563, 1153052, 1171551, 1155769, 1155771,\n", + " 1144158, 1142870, 1163708, 1163711, 1156100, 1142685, 1150046, 1149063,\n", + " 1149070, 1155479, 1153514, 1147300, 1158680, 1138161, 1164006, 1165651,\n", + " 1139782, 1139290, 1166936, 1148771, 1140735, 1146063, 1146356, 1171249,\n", + " 1160189, 1164052, 1170415, 1169493, 1140643, 1148600, 1148603, 1148607,\n", + " 1168081, 1158643, 1158655, 1156177, 1159025, 1159029, 1159032, 1159038,\n", + " 1152247, 1155588, 1160509, 1162552, 1159314, 1156589, 1168426, 1167931,\n", + " 1147393, 1170577, 1146510, 1146509, 1164580, 1152776, 1153201, 1147438,\n", + " 1159386, 1181318, 1156738, 1156739, 1160849, 1153663, 1190200, 1166636,\n", + " 1171040, 1168748, 1144812, 1167253, 1162085, 1168860, 1164750, 1142733,\n", + " 1156303, 1145911, 1166914, 1148683, 1145228, 1167753, 1160232, 1154689,\n", + " 1144972, 1144973, 1166063, 1166053, 1169233, 1165746, 1147357, 1155908,\n", + " 1145900, 1153526, 1168659, 1175240, 1158724, 1154076, 1147338, 1144690,\n", + " 1149122, 1149130, 1171974, 1155170, 1150522, 1156119, 1144336, 1157534,\n", + " 1138378, 1138382, 1190651, 1169157, 1157331, 1138129, 1141051, 1169359,\n", + " 1154364, 1154352, 1158154, 1158611, 1158623, 1149847, 1157385, 1172076,\n", + " 1165903, 1171475, 1147423, 1155494, 1152353, 1170910, 1143858, 1168404,\n", + " 1168413, 1148335, 1177208, 1169273, 1173307, 1145033, 1154027, 1152150,\n", + " 1153755, 1157158, 1157153, 1147697, 1147711, 1148131, 1149247, 1169038,\n", + " 1165120, 1168598, 1193664, 1140326, 1166684, 1150234, 1154148, 1158176,\n", + " 1149169, 1149173, 1183488, 1174194, 1170465, 1181613, 1167657, 1143420,\n", + " 1178344, 1170178, 1169620, 1153803, 1153141, 1171128, 1153628, 1166554,\n", + " 1161255, 1161262, 1155262, 1155105, 1172009, 1157795, 1151488, 1155804,\n", + " 1181928, 1158249, 1153898, 1145626, 1145618, 1189049, 1149753, 1149755,\n", + " 1146252, 1153609, 1153612, 1157772, 1157761, 1155990, 1185327, 1181143,\n", + " 1158512, 1158517, 1155890, 1155899, 1177090, 1162986, 1140399, 1166989,\n", + " 1170632, 1169068, 1162253, 1159341, 1177907, 1182337, 1181469, 1188637,\n", + " 1146161, 1166783, 1147179, 1141516, 1182733, 1168939, 1139831, 1139837,\n", + " 1150265, 1154806, 1154812, 1163848, 1156055, 1170001, 1170000, 1146392,\n", + " 1146394, 1146395, 1194197, 1188232, 1178526, 1168683, 1191340, 1174004,\n", + " 1184464, 1178983, 1171243, 1153729, 1183629, 1162502, 1153585, 1171201,\n", + " 1177368, 1192912, 1183364, 1170128, 1167094, 1161186, 1172423, 1172417,\n", + " 1171953, 1166789, 1145397, 1178135, 1186170, 1152080, 1183147, 1179660,\n", + " 1155959, 1188473, 1191291, 1169833, 1169837, 1167471, 1157017],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197178, 1199424, 1195394, 1197226, 1197719, 1201094, 1199282, 1198459,\n", + " 1202255, 1197777, 1201016, 1198694, 1196871, 1202804, 1198546, 1198557,\n", + " 1195494, 1196631, 1194649, 1195259, 1195263, 1199135, 1201992, 1196030,\n", + " 1196031, 1201427, 1195888, 1196911, 1199170, 1199171, 1196359, 1196977,\n", + " 1196979, 1197831, 1195325, 1198260, 1195571, 1195265, 1195270, 1195278,\n", + " 1197141, 1197140, 1196109, 1198219, 1195841, 1195850, 1195541, 1202915,\n", + " 1199315, 1197474, 1199352, 1195626, 1196393, 1196283, 1195358, 1198273,\n", + " 1198282, 1196851, 1199628, 1200869, 1200872, 1200404, 1198406, 1195014,\n", + " 1195017, 1199676, 1194795, 1199949, 1200668, 1197970, 1197601, 1197603,\n", + " 1196727, 1196734, 1195773, 1200892, 1200894, 1198425, 1198428, 1199586,\n", + " 1200018, 1199410, 1198811, 1201534, 1201547, 1200450, 1198593, 1202627,\n", + " 1194805, 1198487, 1199539, 1199723, 1201041, 1200363, 1202103, 1196883,\n", + " 1199917, 1200194, 1196779, 1201442, 1197945, 1202239, 1200899, 1200331,\n", + " 1195611, 1201871, 1202209, 1202217, 1196966, 1199606, 1200578, 1195438,\n", + " 1195676, 1195679, 1195664, 1201789, 1195181, 1197496, 1200585, 1200584,\n", + " 1199396, 1198147, 1200003, 1198824, 1197735, 1200437, 1201475, 1199234,\n", + " 1200298, 1200301, 1197648, 1197652, 1197655, 1197335, 1195165, 1196552],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197178, 1199424, 1195394, 1197226, 1197719, 1201094, 1199282, 1198459,\n", + " 1202255, 1197777, 1201016, 1198694, 1196871, 1202804, 1198546, 1198557,\n", + " 1195494, 1196631, 1194649, 1195259, 1195263, 1199135, 1201992, 1196030,\n", + " 1196031, 1201427, 1195888, 1196911, 1199170, 1199171, 1196359, 1196977,\n", + " 1196979, 1197831, 1195325, 1198260, 1195571, 1195265, 1195270, 1195278,\n", + " 1197141, 1197140, 1196109, 1198219, 1195841, 1195850, 1195541, 1202915,\n", + " 1199315, 1197474, 1199352, 1195626, 1196393, 1196283, 1195358, 1198273,\n", + " 1198282, 1196851, 1199628, 1200869, 1200872, 1200404, 1198406, 1195014,\n", + " 1195017, 1199676, 1194795, 1199949, 1200668, 1197970, 1197601, 1197603,\n", + " 1196727, 1196734, 1195773, 1200892, 1200894, 1198425, 1198428, 1199586,\n", + " 1200018, 1199410, 1198811, 1201534, 1201547, 1200450, 1198593, 1202627,\n", + " 1194805, 1198487, 1199539, 1199723, 1201041, 1200363, 1202103, 1196883,\n", + " 1199917, 1200194, 1196779, 1201442, 1197945, 1202239, 1200899, 1200331,\n", + " 1195611, 1201871, 1202209, 1202217, 1196966, 1199606, 1200578, 1195438,\n", + " 1195676, 1195679, 1195664, 1201789, 1195181, 1197496, 1200585, 1200584,\n", + " 1199396, 1198147, 1200003, 1198824, 1197735, 1200437, 1201475, 1199234,\n", + " 1200298, 1200301, 1197648, 1197652, 1197655, 1197335, 1195165, 1196552],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 2.7166e-01, -6.6624e-04, 7.6283e-01, ..., 4.2261e-02,\n", + " -1.6368e-03, -6.4259e-03],\n", + " [ 1.2440e-01, 1.1896e-02, 4.4394e-01, ..., 4.9581e-02,\n", + " -1.6048e-03, -3.6830e-03],\n", + " [ 2.5680e-01, -7.5644e-04, 7.7818e-01, ..., 1.5362e-02,\n", + " -1.4174e-03, -6.2953e-03],\n", + " ...,\n", + " [ 1.3357e-01, -1.3428e-04, 4.4641e-01, ..., 7.9126e-02,\n", + " -2.0698e-03, -3.9609e-03],\n", + " [ 2.4527e-01, -6.1889e-04, 7.8568e-01, ..., 3.5479e-02,\n", + " -1.3998e-03, -6.2447e-03],\n", + " [ 1.0574e-01, 8.1066e-03, 3.4355e-01, ..., 1.1514e-01,\n", + " -2.1978e-03, -3.3640e-03]], device='cuda:0',\n", + " grad_fn=), 'paper': tensor([[ 5.3256e-01, -1.5738e-03, -6.4536e-03, ..., -2.1362e-02,\n", + " -1.6076e-02, 5.4535e-01],\n", + " [-1.6821e-02, -1.8229e-03, 1.3900e+00, ..., -1.3324e-02,\n", + " -1.5903e-02, -2.5575e-02],\n", + " [-1.9902e-02, 8.6717e-01, 7.8586e-01, ..., 1.9996e+00,\n", + " -3.2685e-02, -1.2092e-03],\n", + " ...,\n", + " [-2.4549e-03, 8.0382e-02, -5.2477e-05, ..., -1.2993e-02,\n", + " -1.1811e-02, -8.4573e-04],\n", + " [-2.8461e-05, 1.0928e+00, 4.1688e-01, ..., -1.3034e-02,\n", + " -2.1452e-02, 1.0001e+00],\n", + " [-1.6567e-02, 2.7741e+00, 1.3665e+00, ..., 4.8515e+00,\n", + " -4.6908e-02, 2.1622e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-1.1632e-03, -5.7548e-04, 2.1322e-01, ..., 9.8392e-01,\n", + " 6.5471e-01, 3.7102e-02],\n", + " [-4.5210e-03, 2.0980e-01, -1.9044e-03, ..., 9.0430e-01,\n", + " 2.5834e-01, -2.1857e-03],\n", + " [-1.4966e-03, -6.5163e-04, 1.8839e-01, ..., 9.1722e-01,\n", + " 5.7004e-01, 7.7416e-03],\n", + " ...,\n", + " [-1.0641e-03, 3.3400e-03, 1.5385e-01, ..., 9.2286e-01,\n", + " 6.7033e-01, 4.7099e-02],\n", + " [-4.1291e-04, 2.5003e-02, 1.1413e-01, ..., 1.4594e-01,\n", + " -7.5430e-07, -7.2041e-04],\n", + " [-1.5281e-03, 5.4234e-02, 1.1879e-01, ..., 1.0028e+00,\n", + " 4.4543e-01, -7.9812e-04]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-3.5410e-03, 3.5688e-01, 2.8309e-02, ..., -5.1490e-03,\n", + " 1.7650e-01, 3.0872e-01],\n", + " [-2.6994e-03, 4.7541e-01, 1.1988e-01, ..., -6.4011e-03,\n", + " 3.2744e-01, 3.1050e-01],\n", + " [-2.7097e-03, 2.9853e-01, 2.0284e-02, ..., -4.4888e-03,\n", + " 1.6596e-01, 2.3850e-01],\n", + " ...,\n", + " [-9.4822e-04, 3.8011e-01, 4.0550e-02, ..., -7.0029e-03,\n", + " 3.2242e-01, -3.3939e-04],\n", + " [-2.9459e-03, 4.6030e-01, 1.2337e-01, ..., -6.3149e-03,\n", + " 2.8749e-01, 2.9433e-01],\n", + " [-3.4922e-03, 4.4653e-01, 7.8139e-02, ..., -6.1252e-03,\n", + " 3.2481e-01, 3.4991e-01]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 96, 72, 87, 87, 84, 368, 335, 289, 475, 333, 333, 663,\n", + " 901, 613, 946, 836, 1109, 1053, 1053, 994, 1048, 1048, 924, 1390,\n", + " 1221, 1240, 1057, 1057, 1057, 1405, 1472, 1296, 1457, 1334, 1344, 1442,\n", + " 1238, 1238, 1557, 1557, 1658, 1429, 1429, 1429, 1657, 1657, 1444, 1739,\n", + " 1703, 1709, 1690, 1690, 1917, 1945, 1861, 1908, 1986, 1898, 1858, 1883,\n", + " 2029, 2029, 1838, 2063, 2047, 2400, 2156, 2168, 2238, 2421, 2298, 2298,\n", + " 2337, 2327, 2327, 2327, 2359, 2359, 2359, 2359, 2359, 2324, 2323, 2404,\n", + " 2469, 2506, 2679, 2467, 2467, 2487, 2427, 2950, 2862, 2781, 2781, 2781,\n", + " 3020, 3020, 3020, 2925, 3071, 3071, 3295, 3295, 3014, 3003, 3238, 3082,\n", + " 3202, 3222, 3288, 3162, 3360, 3374, 3138, 3402, 3428, 3406, 3406, 3465,\n", + " 3534, 3548, 3508, 3751, 3638, 3795, 3655, 3655, 3621, 3621, 3678, 3743,\n", + " 3743, 3743, 3743, 3893, 3844, 3844, 3675, 4073, 4180, 4118, 4171, 4173,\n", + " 4239, 4239, 4294, 4316, 4396, 4573, 4617, 4352, 4352, 4555, 4555, 4555,\n", + " 4760, 4709, 4746, 4494, 4979, 4985, 4709, 4709, 5031, 5203, 5101, 5240,\n", + " 5215, 5272, 5257, 5257, 5377, 5452, 5452, 5408, 5542, 5633, 5633, 5521,\n", + " 5588, 5588, 5503, 5389, 5802, 5650, 5850, 5875, 5875, 5875, 5732, 5875,\n", + " 5875, 5875, 5875, 5875, 5999, 6177, 6058, 5969, 6169, 6276, 6276, 6034,\n", + " 6330, 6330],\n", + " [ 56, 95, 27, 38, 66, 64, 34, 6, 72, 58, 77, 77,\n", + " 36, 109, 46, 99, 35, 9, 22, 114, 94, 13, 101, 74,\n", + " 53, 127, 37, 49, 13, 115, 116, 121, 91, 130, 82, 131,\n", + " 17, 47, 131, 106, 12, 84, 112, 125, 78, 1, 94, 30,\n", + " 118, 72, 42, 73, 130, 20, 33, 93, 122, 90, 94, 40,\n", + " 42, 119, 133, 130, 48, 20, 0, 23, 39, 45, 37, 49,\n", + " 17, 71, 101, 80, 70, 79, 52, 78, 116, 7, 82, 22,\n", + " 134, 60, 43, 80, 60, 11, 20, 20, 98, 62, 73, 61,\n", + " 18, 132, 72, 102, 90, 89, 20, 130, 135, 8, 128, 20,\n", + " 50, 85, 104, 129, 110, 20, 117, 6, 20, 71, 101, 91,\n", + " 88, 48, 86, 97, 103, 111, 108, 48, 37, 49, 20, 87,\n", + " 108, 126, 28, 130, 102, 26, 67, 15, 75, 81, 123, 81,\n", + " 4, 93, 20, 20, 54, 29, 10, 37, 22, 71, 101, 60,\n", + " 32, 51, 84, 92, 41, 25, 42, 55, 76, 91, 17, 107,\n", + " 12, 26, 21, 108, 44, 20, 98, 124, 2, 111, 16, 82,\n", + " 34, 22, 31, 69, 120, 3, 24, 65, 68, 8, 105, 57,\n", + " 14, 100, 113, 19, 96, 129, 59, 63, 114, 12, 83, 108,\n", + " 114, 5]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3358, 363, 1034, ..., 6008, 4726, 5860],\n", + " [ 282, 261, 44, ..., 7448, 7369, 7430]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 63, 8, 36, ..., 9, 22, 60],\n", + " [ 66, 47, 170, ..., 6305, 6367, 6332]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 87, 87, 30, ..., 7357, 7357, 7357],\n", + " [ 374, 507, 130, ..., 309, 230, 766]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 389, 469, 695, ..., 280, 398, 704],\n", + " [ 48, 8, 138, ..., 7429, 7459, 7380]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4880, 663, 1893, ..., 7140, 5296, 7464],\n", + " [ 178, 60, 18, ..., 6280, 6359, 6338]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 87, 87, 87, ..., 7357, 7357, 7294],\n", + " [ 777, 765, 1145, ..., 4036, 3903, 2414]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 209, 72, 72, ..., 6276, 6276, 6276],\n", + " [6817, 32, 3336, ..., 5769, 5542, 3670]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006507\n", + "sampling 0.006345\n", + "noi time: 0.002097\n", + "get_vertex_data call: 0.034096\n", + "noi group time: 0.001856\n", + "eoi_group_time: 0.016887\n", + "second half: 0.215198\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27905, 1339, 32616, ..., 1111405, 1133086, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27905, 1339, 32616, ..., 1111405, 1133086, 1119043],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227503, 1210831, 1212861, ..., 1938464, 1937000, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227503, 1210831, 1212861, ..., 1938464, 1937000, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137202, 1137204, 1137212, 1141424, 1136228, 1136237, 1140285, 1135926,\n", + " 1135934, 1135165, 1135167, 1135726, 1137784, 1137791, 1141751, 1141758,\n", + " 1138335, 1140297, 1136969, 1136971, 1141448, 1146803, 1146810, 1138903,\n", + " 1143610, 1149826, 1145370, 1137947, 1138933, 1143372, 1146641, 1139609,\n", + " 1139615, 1145281, 1136950, 1149216, 1149217, 1149228, 1142946, 1142958,\n", + " 1143820, 1147483, 1149283, 1144636, 1149029, 1149038, 1146992, 1146995,\n", + " 1153016, 1134700, 1135940, 1148337, 1146656, 1136742, 1147211, 1150329,\n", + " 1136268, 1138739, 1138742, 1138745, 1137829, 1140537, 1140540, 1140542,\n", + " 1138112, 1138119, 1137254, 1137181, 1149461, 1153456, 1140159, 1134735,\n", + " 1135905, 1140029, 1140947, 1140953, 1135367, 1135202, 1141036, 1134794,\n", + " 1157447, 1143377, 1137329, 1136178, 1157103, 1135333, 1144791, 1144395,\n", + " 1137529, 1137441, 1139161, 1134844, 1141696, 1141702, 1135583, 1141084,\n", + " 1141087, 1136097, 1136101, 1140970, 1140712, 1156342, 1138514, 1138525,\n", + " 1137953, 1158136, 1154132, 1156899, 1139684, 1138314, 1138440, 1138445,\n", + " 1138461, 1138449, 1137493, 1137924, 1158390, 1138846, 1135088, 1135091,\n", + " 1156603, 1156606, 1147112, 1142611, 1135352, 1135359, 1135624, 1148533,\n", + " 1135760, 1135769, 1139667, 1138067, 1136081, 1134992, 1136551, 1148805,\n", + " 1140199, 1158974, 1159009, 1159012, 1141065, 1144406, 1153543, 1140034,\n", + " 1140036, 1137587, 1137592, 1138654, 1141963, 1141966, 1134888, 1146075,\n", + " 1141985, 1152042, 1152044, 1139065, 1137734, 1137741, 1137728, 1134742,\n", + " 1134750, 1138240, 1141088, 1141102, 1148996, 1149001, 1139889, 1139119,\n", + " 1143775, 1154851, 1154857, 1137299, 1143711, 1139025, 1140003, 1140009,\n", + " 1146844, 1142499, 1152709, 1135860, 1141891, 1139386, 1141659, 1136917,\n", + " 1137196, 1137188, 1141156, 1152731, 1141300, 1144650, 1159613, 1134979,\n", + " 1147844, 1147850, 1137074, 1138482, 1141821, 1146796, 1145161, 1140169,\n", + " 1140173, 1139190, 1137057, 1138708, 1142917, 1142913, 1144596, 1142453,\n", + " 1136864, 1135315, 1144182, 1146201, 1158698, 1140501, 1137854, 1147153,\n", + " 1142646, 1149193, 1149197, 1141365, 1151112, 1138293, 1144279, 1139508,\n", + " 1139510, 1139655, 1139127, 1143791, 1140977, 1140990, 1135047, 1143692,\n", + " 1147050, 1147047, 1145873, 1152976, 1152989, 1135471, 1142549, 1142558,\n", + " 1139000, 1141925, 1144242, 1140576, 1140580, 1140581, 1137149, 1150692,\n", + " 1139405, 1137571, 1134861, 1145971, 1145980, 1145974, 1143845, 1136287,\n", + " 1136277, 1146016, 1146024, 1138085, 1139990, 1143283, 1143294, 1147540,\n", + " 1147150, 1148763, 1147282, 1147293, 1149155, 1140337, 1142628, 1142637,\n", + " 1149366, 1139417, 1143051, 1148414, 1157717, 1157720, 1136836, 1136843,\n", + " 1139329, 1139328, 1144957, 1145427, 1158043, 1143345, 1144765, 1140836,\n", + " 1138600, 1135876, 1135813, 1150300, 1138004, 1144376, 1146523, 1138024,\n", + " 1138018, 1143470, 1143471, 1143457, 1143007, 1137703, 1144303, 1144564,\n", + " 1142015, 1147574, 1146631, 1147521, 1140352, 1140364, 1137990, 1148962,\n", + " 1144725, 1144218, 1144222, 1147984, 1147995, 1147999, 1144011, 1139252,\n", + " 1139249, 1147127, 1147131, 1148704, 1148719, 1141827, 1141836, 1146751,\n", + " 1146742, 1152329, 1149722, 1147027, 1139549, 1158226, 1147880, 1154526,\n", + " 1145240, 1145751, 1142369, 1142376, 1142383, 1146159, 1148387, 1151242,\n", + " 1152530, 1152531, 1150438, 1150445, 1149258, 1149777, 1144514, 1144526,\n", + " 1141349, 1141358, 1146884, 1154822, 1147807, 1154263, 1145261, 1134873,\n", + " 1149534, 1148693, 1150127, 1148278, 1147019, 1141949, 1153568, 1153572,\n", + " 1153574, 1148453, 1147653, 1143560, 1143564, 1149412, 1148300, 1147866,\n", + " 1147871, 1154420, 1158794, 1148180, 1136249, 1139721, 1146686, 1148720,\n", + " 1148726, 1144110, 1143983, 1148204, 1153182, 1153124, 1153188, 1145104,\n", + " 1150935, 1144863, 1150356, 1155088, 1155098, 1166968, 1148084, 1148095,\n", + " 1147442, 1151816, 1152581, 1154190, 1150717, 1148510, 1141420, 1141419,\n", + " 1150637, 1145080, 1145086, 1146975, 1146974, 1156402, 1149355, 1146623,\n", + " 1151691, 1151399, 1144476, 1152409, 1152415, 1154051, 1153036, 1137746,\n", + " 1137755, 1146304, 1152622, 1149203, 1151967, 1152826, 1155334, 1154119,\n", + " 1154120, 1154123, 1157839, 1157824, 1152673, 1154633, 1151617, 1151622,\n", + " 1150578, 1150586, 1136131, 1148914, 1148916, 1153387, 1145959, 1143995,\n", + " 1152341, 1153311, 1152297, 1156007, 1136028, 1136026, 1158704, 1156609,\n", + " 1152928, 1151064, 1156399, 1163941, 1142777, 1150150, 1150164, 1149273,\n", + " 1144016, 1148033, 1148035, 1148040, 1154453, 1149300, 1137046, 1137048,\n", + " 1158477, 1148628, 1158530, 1154564, 1142041, 1157227, 1157229, 1157547,\n", + " 1142385, 1158860, 1158857, 1150870, 1150877, 1157064, 1157069, 1139479,\n", + " 1151251, 1151260, 1150465, 1145390, 1152182, 1157909, 1153421, 1147810,\n", + " 1157784, 1139525, 1158306, 1158311, 1155441, 1137969, 1153359, 1150129,\n", + " 1150130, 1144361, 1142755, 1156207, 1156271, 1151379, 1155122, 1155124,\n", + " 1152527, 1149321, 1149320, 1155755, 1151431, 1146920, 1145807, 1156455,\n", + " 1156460, 1156463, 1158096, 1168230, 1155628, 1155631, 1156563, 1136469,\n", + " 1158824, 1148835, 1155646, 1158355, 1143263, 1162396, 1161803, 1154080,\n", + " 1139627, 1139629, 1151317, 1143189, 1153322, 1157439, 1150069, 1150077,\n", + " 1141627, 1157282, 1137152, 1158578, 1158996, 1153786, 1158192, 1137381,\n", + " 1159116, 1145682, 1134682, 1135601, 1135605, 1145507, 1148147, 1158502,\n", + " 1155852, 1158665, 1157684, 1149145, 1149151, 1144463, 1152220, 1152504,\n", + " 1156693, 1167618, 1157735, 1159132, 1159125, 1155971, 1155975, 1156812,\n", + " 1155393, 1155403, 1149696, 1155946, 1155948, 1136896, 1158760, 1158886,\n", + " 1140218, 1158815, 1158438, 1158285, 1152463, 1155302, 1156495, 1156490,\n", + " 1153808, 1157671, 1157675, 1136646, 1144127, 1134762, 1134757, 1162167,\n", + " 1158558, 1156516, 1146123, 1146126, 1168219, 1150011, 1155521, 1161539,\n", + " 1142482, 1142666, 1159042, 1159071, 1159057, 1163267, 1157944, 1157945,\n", + " 1162044, 1153052, 1153045, 1144158, 1138393, 1167189, 1150046, 1150041,\n", + " 1149063, 1149070, 1145948, 1154297, 1153514, 1153519, 1158680, 1146870,\n", + " 1138161, 1164006, 1149956, 1154590, 1139592, 1139290, 1148025, 1166073,\n", + " 1157236, 1171509, 1146063, 1146356, 1165306, 1165309, 1140136, 1140650,\n", + " 1140643, 1148603, 1164979, 1168170, 1144506, 1155821, 1184133, 1158643,\n", + " 1156181, 1159025, 1159029, 1159032, 1152247, 1143729, 1166735, 1160600,\n", + " 1160470, 1155588, 1162552, 1162558, 1151220, 1168426, 1158405, 1144977,\n", + " 1144982, 1153232, 1153239, 1144739, 1152776, 1166881, 1145139, 1141471,\n", + " 1147426, 1157044, 1157047, 1157052, 1156739, 1184097, 1184107, 1144812,\n", + " 1162085, 1135564, 1165714, 1165718, 1156294, 1162613, 1148687, 1167757,\n", + " 1160780, 1155324, 1147672, 1150532, 1144973, 1184037, 1145455, 1165746,\n", + " 1147355, 1152624, 1152626, 1139359, 1145900, 1145902, 1171572, 1152203,\n", + " 1152206, 1143395, 1143402, 1158724, 1158734, 1154076, 1147338, 1151598,\n", + " 1149125, 1167817, 1166653, 1169216, 1169304, 1145326, 1155172, 1166200,\n", + " 1150518, 1156113, 1156119, 1144336, 1157527, 1157534, 1157528, 1154670,\n", + " 1154893, 1154885, 1169162, 1138129, 1141049, 1141043, 1151674, 1149452,\n", + " 1138609, 1158611, 1158062, 1173047, 1149846, 1157384, 1147416, 1169937,\n", + " 1152353, 1155928, 1168055, 1169133, 1173307, 1154025, 1154027, 1154028,\n", + " 1152150, 1164974, 1167857, 1151210, 1157158, 1157153, 1157373, 1157375,\n", + " 1147711, 1151850, 1172961, 1169672, 1181009, 1165121, 1160979, 1172234,\n", + " 1140326, 1166682, 1166684, 1176404, 1181772, 1154148, 1149169, 1149173,\n", + " 1181219, 1143420, 1171302, 1170178, 1169618, 1169627, 1182033, 1153803,\n", + " 1153141, 1153630, 1181065, 1158031, 1178920, 1178922, 1162129, 1155262,\n", + " 1154711, 1157792, 1157803, 1157795, 1177275, 1151488, 1171623, 1157133,\n", + " 1162270, 1153898, 1154497, 1178212, 1178214, 1162403, 1145626, 1156436,\n", + " 1156432, 1186220, 1157486, 1161060, 1161911, 1149755, 1181345, 1163725,\n", + " 1158512, 1158940, 1158374, 1155890, 1155892, 1157266, 1183642, 1140386,\n", + " 1140396, 1168273, 1164788, 1171640, 1168876, 1164231, 1163421, 1176976,\n", + " 1164339, 1166516, 1161819, 1146161, 1172608, 1164130, 1170417, 1170421,\n", + " 1156528, 1139828, 1139831, 1150265, 1164924, 1151286, 1156055, 1146394,\n", + " 1173061, 1173065, 1182370, 1187910, 1188421, 1185976, 1140997, 1182060,\n", + " 1179141, 1181283, 1194082, 1190534, 1178637, 1176740, 1156672, 1158064,\n", + " 1145395, 1155958, 1155959, 1178290, 1187673, 1184966, 1189219, 1179769,\n", + " 1169831, 1192792, 1187536, 1181106, 1157008, 1161940], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137202, 1137204, 1137212, 1141424, 1136228, 1136237, 1140285, 1135926,\n", + " 1135934, 1135165, 1135167, 1135726, 1137784, 1137791, 1141751, 1141758,\n", + " 1138335, 1140297, 1136969, 1136971, 1141448, 1146803, 1146810, 1138903,\n", + " 1143610, 1149826, 1145370, 1137947, 1138933, 1143372, 1146641, 1139609,\n", + " 1139615, 1145281, 1136950, 1149216, 1149217, 1149228, 1142946, 1142958,\n", + " 1143820, 1147483, 1149283, 1144636, 1149029, 1149038, 1146992, 1146995,\n", + " 1153016, 1134700, 1135940, 1148337, 1146656, 1136742, 1147211, 1150329,\n", + " 1136268, 1138739, 1138742, 1138745, 1137829, 1140537, 1140540, 1140542,\n", + " 1138112, 1138119, 1137254, 1137181, 1149461, 1153456, 1140159, 1134735,\n", + " 1135905, 1140029, 1140947, 1140953, 1135367, 1135202, 1141036, 1134794,\n", + " 1157447, 1143377, 1137329, 1136178, 1157103, 1135333, 1144791, 1144395,\n", + " 1137529, 1137441, 1139161, 1134844, 1141696, 1141702, 1135583, 1141084,\n", + " 1141087, 1136097, 1136101, 1140970, 1140712, 1156342, 1138514, 1138525,\n", + " 1137953, 1158136, 1154132, 1156899, 1139684, 1138314, 1138440, 1138445,\n", + " 1138461, 1138449, 1137493, 1137924, 1158390, 1138846, 1135088, 1135091,\n", + " 1156603, 1156606, 1147112, 1142611, 1135352, 1135359, 1135624, 1148533,\n", + " 1135760, 1135769, 1139667, 1138067, 1136081, 1134992, 1136551, 1148805,\n", + " 1140199, 1158974, 1159009, 1159012, 1141065, 1144406, 1153543, 1140034,\n", + " 1140036, 1137587, 1137592, 1138654, 1141963, 1141966, 1134888, 1146075,\n", + " 1141985, 1152042, 1152044, 1139065, 1137734, 1137741, 1137728, 1134742,\n", + " 1134750, 1138240, 1141088, 1141102, 1148996, 1149001, 1139889, 1139119,\n", + " 1143775, 1154851, 1154857, 1137299, 1143711, 1139025, 1140003, 1140009,\n", + " 1146844, 1142499, 1152709, 1135860, 1141891, 1139386, 1141659, 1136917,\n", + " 1137196, 1137188, 1141156, 1152731, 1141300, 1144650, 1159613, 1134979,\n", + " 1147844, 1147850, 1137074, 1138482, 1141821, 1146796, 1145161, 1140169,\n", + " 1140173, 1139190, 1137057, 1138708, 1142917, 1142913, 1144596, 1142453,\n", + " 1136864, 1135315, 1144182, 1146201, 1158698, 1140501, 1137854, 1147153,\n", + " 1142646, 1149193, 1149197, 1141365, 1151112, 1138293, 1144279, 1139508,\n", + " 1139510, 1139655, 1139127, 1143791, 1140977, 1140990, 1135047, 1143692,\n", + " 1147050, 1147047, 1145873, 1152976, 1152989, 1135471, 1142549, 1142558,\n", + " 1139000, 1141925, 1144242, 1140576, 1140580, 1140581, 1137149, 1150692,\n", + " 1139405, 1137571, 1134861, 1145971, 1145980, 1145974, 1143845, 1136287,\n", + " 1136277, 1146016, 1146024, 1138085, 1139990, 1143283, 1143294, 1147540,\n", + " 1147150, 1148763, 1147282, 1147293, 1149155, 1140337, 1142628, 1142637,\n", + " 1149366, 1139417, 1143051, 1148414, 1157717, 1157720, 1136836, 1136843,\n", + " 1139329, 1139328, 1144957, 1145427, 1158043, 1143345, 1144765, 1140836,\n", + " 1138600, 1135876, 1135813, 1150300, 1138004, 1144376, 1146523, 1138024,\n", + " 1138018, 1143470, 1143471, 1143457, 1143007, 1137703, 1144303, 1144564,\n", + " 1142015, 1147574, 1146631, 1147521, 1140352, 1140364, 1137990, 1148962,\n", + " 1144725, 1144218, 1144222, 1147984, 1147995, 1147999, 1144011, 1139252,\n", + " 1139249, 1147127, 1147131, 1148704, 1148719, 1141827, 1141836, 1146751,\n", + " 1146742, 1152329, 1149722, 1147027, 1139549, 1158226, 1147880, 1154526,\n", + " 1145240, 1145751, 1142369, 1142376, 1142383, 1146159, 1148387, 1151242,\n", + " 1152530, 1152531, 1150438, 1150445, 1149258, 1149777, 1144514, 1144526,\n", + " 1141349, 1141358, 1146884, 1154822, 1147807, 1154263, 1145261, 1134873,\n", + " 1149534, 1148693, 1150127, 1148278, 1147019, 1141949, 1153568, 1153572,\n", + " 1153574, 1148453, 1147653, 1143560, 1143564, 1149412, 1148300, 1147866,\n", + " 1147871, 1154420, 1158794, 1148180, 1136249, 1139721, 1146686, 1148720,\n", + " 1148726, 1144110, 1143983, 1148204, 1153182, 1153124, 1153188, 1145104,\n", + " 1150935, 1144863, 1150356, 1155088, 1155098, 1166968, 1148084, 1148095,\n", + " 1147442, 1151816, 1152581, 1154190, 1150717, 1148510, 1141420, 1141419,\n", + " 1150637, 1145080, 1145086, 1146975, 1146974, 1156402, 1149355, 1146623,\n", + " 1151691, 1151399, 1144476, 1152409, 1152415, 1154051, 1153036, 1137746,\n", + " 1137755, 1146304, 1152622, 1149203, 1151967, 1152826, 1155334, 1154119,\n", + " 1154120, 1154123, 1157839, 1157824, 1152673, 1154633, 1151617, 1151622,\n", + " 1150578, 1150586, 1136131, 1148914, 1148916, 1153387, 1145959, 1143995,\n", + " 1152341, 1153311, 1152297, 1156007, 1136028, 1136026, 1158704, 1156609,\n", + " 1152928, 1151064, 1156399, 1163941, 1142777, 1150150, 1150164, 1149273,\n", + " 1144016, 1148033, 1148035, 1148040, 1154453, 1149300, 1137046, 1137048,\n", + " 1158477, 1148628, 1158530, 1154564, 1142041, 1157227, 1157229, 1157547,\n", + " 1142385, 1158860, 1158857, 1150870, 1150877, 1157064, 1157069, 1139479,\n", + " 1151251, 1151260, 1150465, 1145390, 1152182, 1157909, 1153421, 1147810,\n", + " 1157784, 1139525, 1158306, 1158311, 1155441, 1137969, 1153359, 1150129,\n", + " 1150130, 1144361, 1142755, 1156207, 1156271, 1151379, 1155122, 1155124,\n", + " 1152527, 1149321, 1149320, 1155755, 1151431, 1146920, 1145807, 1156455,\n", + " 1156460, 1156463, 1158096, 1168230, 1155628, 1155631, 1156563, 1136469,\n", + " 1158824, 1148835, 1155646, 1158355, 1143263, 1162396, 1161803, 1154080,\n", + " 1139627, 1139629, 1151317, 1143189, 1153322, 1157439, 1150069, 1150077,\n", + " 1141627, 1157282, 1137152, 1158578, 1158996, 1153786, 1158192, 1137381,\n", + " 1159116, 1145682, 1134682, 1135601, 1135605, 1145507, 1148147, 1158502,\n", + " 1155852, 1158665, 1157684, 1149145, 1149151, 1144463, 1152220, 1152504,\n", + " 1156693, 1167618, 1157735, 1159132, 1159125, 1155971, 1155975, 1156812,\n", + " 1155393, 1155403, 1149696, 1155946, 1155948, 1136896, 1158760, 1158886,\n", + " 1140218, 1158815, 1158438, 1158285, 1152463, 1155302, 1156495, 1156490,\n", + " 1153808, 1157671, 1157675, 1136646, 1144127, 1134762, 1134757, 1162167,\n", + " 1158558, 1156516, 1146123, 1146126, 1168219, 1150011, 1155521, 1161539,\n", + " 1142482, 1142666, 1159042, 1159071, 1159057, 1163267, 1157944, 1157945,\n", + " 1162044, 1153052, 1153045, 1144158, 1138393, 1167189, 1150046, 1150041,\n", + " 1149063, 1149070, 1145948, 1154297, 1153514, 1153519, 1158680, 1146870,\n", + " 1138161, 1164006, 1149956, 1154590, 1139592, 1139290, 1148025, 1166073,\n", + " 1157236, 1171509, 1146063, 1146356, 1165306, 1165309, 1140136, 1140650,\n", + " 1140643, 1148603, 1164979, 1168170, 1144506, 1155821, 1184133, 1158643,\n", + " 1156181, 1159025, 1159029, 1159032, 1152247, 1143729, 1166735, 1160600,\n", + " 1160470, 1155588, 1162552, 1162558, 1151220, 1168426, 1158405, 1144977,\n", + " 1144982, 1153232, 1153239, 1144739, 1152776, 1166881, 1145139, 1141471,\n", + " 1147426, 1157044, 1157047, 1157052, 1156739, 1184097, 1184107, 1144812,\n", + " 1162085, 1135564, 1165714, 1165718, 1156294, 1162613, 1148687, 1167757,\n", + " 1160780, 1155324, 1147672, 1150532, 1144973, 1184037, 1145455, 1165746,\n", + " 1147355, 1152624, 1152626, 1139359, 1145900, 1145902, 1171572, 1152203,\n", + " 1152206, 1143395, 1143402, 1158724, 1158734, 1154076, 1147338, 1151598,\n", + " 1149125, 1167817, 1166653, 1169216, 1169304, 1145326, 1155172, 1166200,\n", + " 1150518, 1156113, 1156119, 1144336, 1157527, 1157534, 1157528, 1154670,\n", + " 1154893, 1154885, 1169162, 1138129, 1141049, 1141043, 1151674, 1149452,\n", + " 1138609, 1158611, 1158062, 1173047, 1149846, 1157384, 1147416, 1169937,\n", + " 1152353, 1155928, 1168055, 1169133, 1173307, 1154025, 1154027, 1154028,\n", + " 1152150, 1164974, 1167857, 1151210, 1157158, 1157153, 1157373, 1157375,\n", + " 1147711, 1151850, 1172961, 1169672, 1181009, 1165121, 1160979, 1172234,\n", + " 1140326, 1166682, 1166684, 1176404, 1181772, 1154148, 1149169, 1149173,\n", + " 1181219, 1143420, 1171302, 1170178, 1169618, 1169627, 1182033, 1153803,\n", + " 1153141, 1153630, 1181065, 1158031, 1178920, 1178922, 1162129, 1155262,\n", + " 1154711, 1157792, 1157803, 1157795, 1177275, 1151488, 1171623, 1157133,\n", + " 1162270, 1153898, 1154497, 1178212, 1178214, 1162403, 1145626, 1156436,\n", + " 1156432, 1186220, 1157486, 1161060, 1161911, 1149755, 1181345, 1163725,\n", + " 1158512, 1158940, 1158374, 1155890, 1155892, 1157266, 1183642, 1140386,\n", + " 1140396, 1168273, 1164788, 1171640, 1168876, 1164231, 1163421, 1176976,\n", + " 1164339, 1166516, 1161819, 1146161, 1172608, 1164130, 1170417, 1170421,\n", + " 1156528, 1139828, 1139831, 1150265, 1164924, 1151286, 1156055, 1146394,\n", + " 1173061, 1173065, 1182370, 1187910, 1188421, 1185976, 1140997, 1182060,\n", + " 1179141, 1181283, 1194082, 1190534, 1178637, 1176740, 1156672, 1158064,\n", + " 1145395, 1155958, 1155959, 1178290, 1187673, 1184966, 1189219, 1179769,\n", + " 1169831, 1192792, 1187536, 1181106, 1157008, 1161940], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195697, 1198248, 1197223, 1197717, 1201094, 1199282, 1198459, 1202255,\n", + " 1198844, 1194626, 1200640, 1198697, 1202804, 1198557, 1194866, 1194770,\n", + " 1199043, 1196624, 1195514, 1195263, 1201920, 1198371, 1198543, 1197697,\n", + " 1195477, 1197760, 1194880, 1195888, 1196900, 1195740, 1196359, 1196979,\n", + " 1194753, 1194762, 1195313, 1196837, 1196840, 1196171, 1199104, 1195982,\n", + " 1198643, 1198163, 1198167, 1196704, 1196711, 1196717, 1195270, 1195278,\n", + " 1196247, 1195847, 1195541, 1199998, 1197253, 1197640, 1195353, 1200949,\n", + " 1200959, 1196857, 1198673, 1199685, 1199628, 1197676, 1200076, 1199031,\n", + " 1199676, 1194786, 1201511, 1196496, 1199021, 1197977, 1197601, 1201116,\n", + " 1196727, 1195771, 1195773, 1202618, 1198426, 1200592, 1200621, 1200450,\n", + " 1200570, 1200503, 1199445, 1201156, 1202630, 1200913, 1200918, 1201045,\n", + " 1200515, 1197097, 1197098, 1200194, 1202239, 1199482, 1202338, 1202175,\n", + " 1202707, 1201291, 1195612, 1201862, 1199925, 1198562, 1196960, 1196966,\n", + " 1202876, 1200784, 1200638, 1198521, 1198055, 1196929, 1198929, 1195415,\n", + " 1195181, 1195390, 1200928, 1197060, 1196597, 1197403, 1202269, 1194730,\n", + " 1198147, 1198824, 1197731, 1197735, 1200011, 1198819, 1197035, 1197039,\n", + " 1195165, 1202077, 1200212, 1194909, 1203162], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195697, 1198248, 1197223, 1197717, 1201094, 1199282, 1198459, 1202255,\n", + " 1198844, 1194626, 1200640, 1198697, 1202804, 1198557, 1194866, 1194770,\n", + " 1199043, 1196624, 1195514, 1195263, 1201920, 1198371, 1198543, 1197697,\n", + " 1195477, 1197760, 1194880, 1195888, 1196900, 1195740, 1196359, 1196979,\n", + " 1194753, 1194762, 1195313, 1196837, 1196840, 1196171, 1199104, 1195982,\n", + " 1198643, 1198163, 1198167, 1196704, 1196711, 1196717, 1195270, 1195278,\n", + " 1196247, 1195847, 1195541, 1199998, 1197253, 1197640, 1195353, 1200949,\n", + " 1200959, 1196857, 1198673, 1199685, 1199628, 1197676, 1200076, 1199031,\n", + " 1199676, 1194786, 1201511, 1196496, 1199021, 1197977, 1197601, 1201116,\n", + " 1196727, 1195771, 1195773, 1202618, 1198426, 1200592, 1200621, 1200450,\n", + " 1200570, 1200503, 1199445, 1201156, 1202630, 1200913, 1200918, 1201045,\n", + " 1200515, 1197097, 1197098, 1200194, 1202239, 1199482, 1202338, 1202175,\n", + " 1202707, 1201291, 1195612, 1201862, 1199925, 1198562, 1196960, 1196966,\n", + " 1202876, 1200784, 1200638, 1198521, 1198055, 1196929, 1198929, 1195415,\n", + " 1195181, 1195390, 1200928, 1197060, 1196597, 1197403, 1202269, 1194730,\n", + " 1198147, 1198824, 1197731, 1197735, 1200011, 1198819, 1197035, 1197039,\n", + " 1195165, 1202077, 1200212, 1194909, 1203162], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 0.0453, 0.0482, 0.2678, ..., 0.1532, -0.0024, -0.0032],\n", + " [ 0.1428, 0.0082, 0.5133, ..., 0.0731, -0.0018, -0.0045],\n", + " [ 0.0949, 0.0256, 0.3506, ..., 0.0671, -0.0017, -0.0034],\n", + " ...,\n", + " [ 0.1204, 0.0407, 0.4541, ..., 0.0595, -0.0016, -0.0041],\n", + " [ 0.0757, 0.0484, 0.3641, ..., 0.2160, -0.0029, -0.0040],\n", + " [ 0.1248, 0.0194, 0.4457, ..., 0.1066, -0.0023, -0.0045]],\n", + " device='cuda:0', grad_fn=), 'paper': tensor([[-1.4639e-03, 1.0625e+00, 1.5008e-01, ..., -1.1548e-02,\n", + " -1.9559e-02, 9.2361e-01],\n", + " [-2.5782e-02, -9.8165e-03, 2.9802e+00, ..., -1.9816e-02,\n", + " -3.1097e-02, -2.5937e-02],\n", + " [-1.0813e-02, 6.5394e-03, 8.7543e-01, ..., -1.6299e-02,\n", + " -1.2031e-02, -1.2605e-02],\n", + " ...,\n", + " [-3.6865e-02, -2.2863e-02, 2.8213e+00, ..., -2.2879e-02,\n", + " -2.6286e-02, -4.6575e-02],\n", + " [-2.7987e-02, -1.5483e-02, 2.1136e+00, ..., -1.8442e-02,\n", + " -2.0070e-02, -3.5717e-02],\n", + " [-1.7202e-02, 2.4098e+00, 1.0882e+00, ..., 4.6297e+00,\n", + " -4.7398e-02, 2.3161e+00]], device='cuda:0',\n", + " grad_fn=), 'author': tensor([[-2.7370e-03, 4.9812e-03, 1.7708e-01, ..., 8.2599e-01,\n", + " 4.4203e-01, -2.2168e-03],\n", + " [-5.7435e-03, 3.7850e-01, 1.5536e-01, ..., 5.5095e-01,\n", + " -3.7618e-04, -4.6506e-03],\n", + " [-1.7159e-03, -1.1002e-03, 1.6701e-01, ..., 8.5677e-01,\n", + " 6.4975e-01, -9.2323e-05],\n", + " ...,\n", + " [-1.9188e-03, -2.0249e-03, 2.9004e-01, ..., 9.4466e-01,\n", + " 7.1299e-01, -3.9193e-04],\n", + " [-3.9531e-04, 2.4987e-02, 1.1594e-01, ..., 1.3984e-01,\n", + " -8.4995e-06, -7.4624e-04],\n", + " [-1.9558e-03, -2.6446e-04, 1.1449e-01, ..., 8.0754e-01,\n", + " 5.1516e-01, -5.3495e-04]], device='cuda:0',\n", + " grad_fn=), 'field_of_study': tensor([[-3.9040e-03, 5.7391e-01, 2.1665e-01, ..., -6.1665e-03,\n", + " 2.8876e-01, 4.0922e-01],\n", + " [-3.8663e-03, 3.6621e-01, -4.6521e-05, ..., -3.9042e-03,\n", + " 1.5734e-01, 1.3110e-01],\n", + " [-4.9116e-03, 4.7085e-01, 9.6228e-02, ..., -6.7023e-03,\n", + " 2.4768e-01, 3.6052e-01],\n", + " ...,\n", + " [-3.2979e-03, 3.1037e-01, -4.9520e-05, ..., -5.8226e-03,\n", + " 2.6829e-01, 1.4706e-01],\n", + " [-5.3081e-03, 5.3359e-01, 8.6889e-02, ..., -4.5797e-03,\n", + " 2.2849e-01, 4.2615e-01],\n", + " [ 1.9260e-01, 6.5195e-01, 1.4448e-01, ..., -6.9009e-03,\n", + " 1.9715e-01, -2.2085e-03]], device='cuda:0',\n", + " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 126, 43, 179, 41, 41, 139, 127, 128, 125, 73, 282, 594,\n", + " 594, 535, 309, 408, 400, 400, 423, 408, 408, 408, 324, 324,\n", + " 324, 743, 743, 464, 464, 852, 830, 596, 582, 761, 766, 515,\n", + " 857, 772, 648, 805, 467, 909, 743, 620, 1071, 1115, 963, 676,\n", + " 942, 960, 1102, 990, 990, 990, 990, 1565, 1415, 1349, 1372, 1372,\n", + " 1372, 1288, 1288, 1140, 1410, 1324, 1324, 1408, 1257, 978, 978, 978,\n", + " 1065, 1065, 1065, 1367, 1519, 1371, 1209, 1209, 1454, 1454, 1424, 1366,\n", + " 1391, 1432, 1706, 1496, 1510, 1636, 1562, 1673, 1673, 1764, 1746, 1768,\n", + " 1768, 1770, 1861, 2067, 1915, 1854, 2055, 2141, 1949, 1990, 2082, 2205,\n", + " 2205, 2205, 2205, 2345, 2345, 2247, 2627, 2528, 2619, 2652, 2609, 2679,\n", + " 2670, 2670, 2680, 2729, 2855, 2708, 2825, 3102, 2919, 2850, 2850, 2850,\n", + " 3150, 3024, 3161, 3268, 3268, 3323, 3323, 3290, 3317, 3442, 3226, 3226,\n", + " 3401, 3794, 3936, 3954, 3935, 3935, 3993, 4005, 4005, 4005, 4112, 4142,\n", + " 4169, 4169, 4302, 4270, 4392, 4399, 4463, 4463, 4421, 4424, 4515, 4569,\n", + " 4524, 4611, 4611, 4764, 4578, 4829, 4867, 4648, 4811, 4742, 4742, 4742,\n", + " 4626, 4835, 4911, 4859, 4859, 4859, 4859, 4898, 4972, 5035, 4886, 4984,\n", + " 4974, 5193, 5274, 5258, 5249, 5654, 5098, 5305, 5305, 5151, 5151, 5151,\n", + " 5227, 5227, 5550, 5833, 5752, 5795, 5771],\n", + " [ 73, 116, 85, 99, 127, 101, 88, 22, 122, 72, 34, 42,\n", + " 109, 5, 80, 132, 98, 25, 34, 43, 29, 6, 2, 69,\n", + " 78, 132, 56, 77, 60, 70, 3, 10, 5, 5, 64, 66,\n", + " 34, 74, 57, 36, 31, 4, 46, 1, 38, 40, 33, 58,\n", + " 75, 72, 27, 68, 17, 45, 14, 115, 74, 58, 79, 18,\n", + " 9, 66, 5, 76, 66, 100, 120, 72, 14, 0, 113, 28,\n", + " 57, 20, 67, 19, 16, 95, 8, 114, 103, 56, 35, 72,\n", + " 59, 121, 121, 115, 44, 58, 63, 0, 108, 89, 54, 50,\n", + " 34, 89, 124, 39, 0, 76, 26, 76, 131, 112, 76, 27,\n", + " 111, 91, 97, 72, 123, 19, 72, 120, 11, 43, 83, 103,\n", + " 58, 32, 106, 19, 19, 15, 72, 7, 41, 19, 87, 86,\n", + " 92, 26, 121, 72, 105, 110, 66, 22, 51, 102, 103, 5,\n", + " 61, 72, 82, 121, 47, 19, 55, 19, 13, 48, 118, 5,\n", + " 71, 107, 81, 130, 86, 12, 21, 5, 126, 53, 112, 97,\n", + " 72, 72, 125, 72, 52, 72, 5, 93, 5, 104, 117, 37,\n", + " 66, 51, 57, 24, 86, 129, 90, 65, 116, 72, 121, 23,\n", + " 19, 72, 103, 62, 84, 128, 30, 14, 72, 5, 19, 96,\n", + " 119, 72, 72, 49, 94, 97, 51]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 811, 3153, 2048, ..., 7138, 770, 1485],\n", + " [ 125, 90, 43, ..., 7435, 7509, 7509]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 49, 74, 40, ..., 49, 5, 77],\n", + " [ 167, 7, 180, ..., 5859, 5800, 5986]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 32, 32, 107, ..., 7559, 7559, 7509],\n", + " [ 426, 323, 471, ..., 706, 573, 850]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 798, 606, 121, ..., 366, 498, 366],\n", + " [ 289, 145, 323, ..., 7471, 7458, 7371]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1034, 4767, 1951, ..., 3908, 5405, 3609],\n", + " [ 114, 1, 6, ..., 5698, 5926, 5922]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 32, 32, 309, ..., 7509, 7509, 7509],\n", + " [1036, 1704, 967, ..., 3627, 4125, 2339]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 127, 45, 45, ..., 5895, 5895, 5895],\n", + " [ 880, 5956, 5680, ..., 6341, 6832, 6635]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006555\n", + "sampling 0.006399\n", + "noi time: 0.002057\n", + "get_vertex_data call: 0.036987\n", + "noi group time: 0.003275\n", + "eoi_group_time: 0.016253\n", + "second half: 0.216138\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 16691, 31145, ..., 1118020, 1123990, 1119693],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 16691, 31145, ..., 1118020, 1123990, 1119693],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1221601, 1221045, 1216253, ..., 1934143, 1931113, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1221601, 1221045, 1216253, ..., 1934143, 1931113, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1140282, 1140284, 1140285, 1136339, 1135926, 1135716, 1140785,\n", + " 1140799, 1141758, 1136156, 1136962, 1136963, 1136969, 1141443, 1146804,\n", + " 1138897, 1139808, 1139811, 1145372, 1145992, 1138931, 1139141, 1143368,\n", + " 1143372, 1143363, 1139243, 1150395, 1146640, 1146644, 1139605, 1139613,\n", + " 1150509, 1145292, 1139866, 1134937, 1136945, 1149216, 1155689, 1143820,\n", + " 1147483, 1135992, 1142881, 1144625, 1135262, 1135947, 1150200, 1152666,\n", + " 1152664, 1139371, 1147202, 1136685, 1134711, 1136266, 1136268, 1134807,\n", + " 1140530, 1138366, 1151520, 1135913, 1140946, 1135367, 1135202, 1141036,\n", + " 1136779, 1134794, 1136512, 1138504, 1137330, 1143069, 1157088, 1144789,\n", + " 1144395, 1137529, 1137534, 1157393, 1152376, 1137441, 1143317, 1136195,\n", + " 1135267, 1156148, 1156159, 1139155, 1134841, 1135968, 1135983, 1141086,\n", + " 1148850, 1140240, 1140970, 1140714, 1138516, 1153096, 1153098, 1137959,\n", + " 1154141, 1137019, 1156899, 1156904, 1156908, 1135522, 1135535, 1157703,\n", + " 1157709, 1138436, 1138440, 1137924, 1137932, 1135135, 1154106, 1158386,\n", + " 1158390, 1149328, 1138847, 1156606, 1147104, 1147112, 1147116, 1142611,\n", + " 1160822, 1145843, 1145853, 1148531, 1135760, 1135769, 1141523, 1139667,\n", + " 1139673, 1134992, 1158961, 1158974, 1139327, 1141070, 1153544, 1140034,\n", + " 1152696, 1136067, 1139929, 1138648, 1141964, 1152042, 1152044, 1139065,\n", + " 1136051, 1135549, 1137890, 1141088, 1141100, 1162946, 1139889, 1145346,\n", + " 1136392, 1154851, 1143711, 1162705, 1143225, 1139025, 1140003, 1135861,\n", + " 1136625, 1139386, 1141657, 1136917, 1139733, 1143666, 1143678, 1144237,\n", + " 1141159, 1136763, 1144650, 1144641, 1136853, 1136862, 1136855, 1139798,\n", + " 1142056, 1153666, 1140161, 1140173, 1158749, 1148864, 1137243, 1138713,\n", + " 1140110, 1142913, 1143111, 1144596, 1136864, 1144041, 1144042, 1135327,\n", + " 1141392, 1137606, 1144868, 1139556, 1139559, 1147153, 1136378, 1136379,\n", + " 1142640, 1141365, 1153069, 1153058, 1151106, 1141664, 1149090, 1149099,\n", + " 1138294, 1144279, 1143907, 1139661, 1140093, 1139127, 1139170, 1139182,\n", + " 1140977, 1140983, 1140990, 1135047, 1147050, 1145873, 1143543, 1143551,\n", + " 1152976, 1152980, 1152988, 1141925, 1146898, 1146901, 1146904, 1144242,\n", + " 1136885, 1143637, 1137570, 1143851, 1142098, 1146024, 1149928, 1139990,\n", + " 1143294, 1151124, 1147150, 1148763, 1147282, 1142816, 1136330, 1149159,\n", + " 1140348, 1142630, 1149366, 1139408, 1148003, 1138915, 1157720, 1146099,\n", + " 1139309, 1139341, 1144778, 1144957, 1143345, 1144619, 1144615, 1137098,\n", + " 1169022, 1150294, 1144375, 1146514, 1146523, 1143465, 1143457, 1137703,\n", + " 1137707, 1144303, 1144568, 1140483, 1140823, 1147574, 1147575, 1143807,\n", + " 1147521, 1140352, 1140360, 1140364, 1140365, 1137998, 1143082, 1144734,\n", + " 1147999, 1146949, 1139252, 1139249, 1147131, 1147235, 1147244, 1148704,\n", + " 1142700, 1141327, 1141827, 1146749, 1147070, 1149722, 1149717, 1145707,\n", + " 1147970, 1145011, 1139549, 1158226, 1158230, 1150452, 1145237, 1145240,\n", + " 1145751, 1146159, 1138632, 1146178, 1146187, 1148217, 1152537, 1151182,\n", + " 1150438, 1150445, 1149791, 1138044, 1146895, 1144203, 1154831, 1147796,\n", + " 1151480, 1151487, 1151473, 1152023, 1152028, 1152031, 1154267, 1151041,\n", + " 1145255, 1147016, 1147019, 1147021, 1147009, 1147023, 1153963, 1141949,\n", + " 1148744, 1137647, 1148463, 1147653, 1143560, 1139088, 1139096, 1139097,\n", + " 1154420, 1139718, 1152494, 1138404, 1141182, 1151557, 1148720, 1148724,\n", + " 1146549, 1149810, 1139940, 1151937, 1148204, 1153188, 1145104, 1159837,\n", + " 1150935, 1152866, 1150356, 1147446, 1152590, 1135307, 1151906, 1150714,\n", + " 1136008, 1151348, 1151351, 1151356, 1147737, 1156402, 1149359, 1153249,\n", + " 1146623, 1164772, 1144476, 1135688, 1152097, 1152100, 1152109, 1153027,\n", + " 1153037, 1153038, 1150094, 1137746, 1146318, 1152623, 1140521, 1136401,\n", + " 1149203, 1152820, 1155337, 1154119, 1155351, 1155358, 1157827, 1151573,\n", + " 1151617, 1151622, 1151629, 1136134, 1153376, 1140932, 1138982, 1152903,\n", + " 1152341, 1158421, 1156826, 1153311, 1138281, 1152300, 1156004, 1156001,\n", + " 1136028, 1158704, 1156608, 1156619, 1156622, 1152928, 1151064, 1156420,\n", + " 1137545, 1150104, 1150164, 1149273, 1142257, 1153691, 1155202, 1154453,\n", + " 1155222, 1145652, 1148628, 1158530, 1158540, 1137458, 1148242, 1148255,\n", + " 1148250, 1159223, 1153083, 1142041, 1157229, 1135439, 1143444, 1158854,\n", + " 1148884, 1156500, 1157064, 1152844, 1152833, 1145187, 1137808, 1157567,\n", + " 1150465, 1135231, 1135740, 1151788, 1150824, 1153413, 1143010, 1158308,\n", + " 1158311, 1151271, 1155441, 1137972, 1162120, 1154529, 1142755, 1156269,\n", + " 1151379, 1137908, 1155122, 1149519, 1155755, 1146913, 1145794, 1145806,\n", + " 1156463, 1168235, 1154763, 1155628, 1155630, 1158486, 1156563, 1154547,\n", + " 1154559, 1136466, 1158564, 1158824, 1153715, 1158335, 1157000, 1156994,\n", + " 1155646, 1153364, 1160958, 1143254, 1143261, 1143257, 1146938, 1161796,\n", + " 1160223, 1154250, 1154240, 1154080, 1164292, 1143189, 1143196, 1153317,\n", + " 1153318, 1157439, 1157928, 1140748, 1157660, 1158124, 1158584, 1158204,\n", + " 1155035, 1137381, 1159116, 1137316, 1140914, 1135601, 1135614, 1145513,\n", + " 1145514, 1148149, 1155848, 1155843, 1157685, 1157684, 1146325, 1149137,\n", + " 1156092, 1155718, 1161450, 1152220, 1152222, 1155434, 1152498, 1140381,\n", + " 1155884, 1157732, 1157735, 1157033, 1155971, 1155975, 1142070, 1156811,\n", + " 1149700, 1163238, 1136896, 1158760, 1158764, 1158882, 1158815, 1158447,\n", + " 1152463, 1156665, 1147599, 1155304, 1153808, 1156284, 1134754, 1140049,\n", + " 1158552, 1151140, 1138099, 1155862, 1158006, 1163170, 1169902, 1135661,\n", + " 1164276, 1164272, 1164277, 1142666, 1150684, 1157751, 1165838, 1153052,\n", + " 1153045, 1155763, 1156107, 1138391, 1138393, 1165234, 1150046, 1155479,\n", + " 1138161, 1164006, 1156787, 1149963, 1163879, 1154578, 1160758, 1146063,\n", + " 1171257, 1171259, 1163455, 1162308, 1164048, 1164061, 1140135, 1148600,\n", + " 1148603, 1143139, 1165047, 1162350, 1156361, 1159025, 1159037, 1168023,\n", + " 1155588, 1164612, 1151227, 1151228, 1138679, 1153924, 1158405, 1144977,\n", + " 1144979, 1149015, 1146500, 1170996, 1141471, 1147427, 1159386, 1156739,\n", + " 1156744, 1150649, 1171040, 1150315, 1144810, 1144812, 1164741, 1164739,\n", + " 1142722, 1156292, 1156293, 1156303, 1165636, 1145743, 1145183, 1163783,\n", + " 1148683, 1145567, 1145228, 1170793, 1143038, 1147355, 1152626, 1139351,\n", + " 1145902, 1153520, 1153534, 1168663, 1158722, 1154076, 1147330, 1147338,\n", + " 1144699, 1150773, 1145502, 1151598, 1149125, 1155172, 1150515, 1144346,\n", + " 1144336, 1157534, 1154670, 1157331, 1141048, 1151664, 1151668, 1169359,\n", + " 1149452, 1149451, 1147491, 1149688, 1158610, 1158623, 1173047, 1172759,\n", + " 1149846, 1157384, 1157383, 1165892, 1171479, 1172488, 1169927, 1148667,\n", + " 1172669, 1173307, 1145033, 1154019, 1164974, 1159652, 1178099, 1157158,\n", + " 1157153, 1172101, 1157372, 1157373, 1147711, 1151850, 1151852, 1148128,\n", + " 1148131, 1147933, 1149237, 1170488, 1169032, 1169037, 1155739, 1181017,\n", + " 1166746, 1140326, 1159100, 1170874, 1154148, 1167520, 1165678, 1184386,\n", + " 1186117, 1169765, 1168481, 1143420, 1171302, 1153805, 1164818, 1171127,\n", + " 1180830, 1163099, 1179807, 1158030, 1161262, 1178505, 1155250, 1154707,\n", + " 1154718, 1157792, 1179164, 1157126, 1157133, 1183106, 1153898, 1153899,\n", + " 1164563, 1162403, 1145626, 1156443, 1178757, 1152276, 1158371, 1155892,\n", + " 1155899, 1162968, 1184317, 1164411, 1160400, 1140393, 1140399, 1164798,\n", + " 1166208, 1164437, 1176976, 1146161, 1170802, 1147182, 1182965, 1184839,\n", + " 1139828, 1139831, 1139837, 1150265, 1163848, 1156049, 1156055, 1190281,\n", + " 1191714, 1190237, 1173058, 1194138, 1156846, 1191018, 1169952, 1169954,\n", + " 1189739, 1192327, 1153733, 1153592, 1171201, 1179321, 1166784, 1185851,\n", + " 1186163, 1186620, 1155959, 1155962, 1185649, 1183807, 1187536, 1189034,\n", + " 1163071, 1169098, 1182401, 1193831], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1140282, 1140284, 1140285, 1136339, 1135926, 1135716, 1140785,\n", + " 1140799, 1141758, 1136156, 1136962, 1136963, 1136969, 1141443, 1146804,\n", + " 1138897, 1139808, 1139811, 1145372, 1145992, 1138931, 1139141, 1143368,\n", + " 1143372, 1143363, 1139243, 1150395, 1146640, 1146644, 1139605, 1139613,\n", + " 1150509, 1145292, 1139866, 1134937, 1136945, 1149216, 1155689, 1143820,\n", + " 1147483, 1135992, 1142881, 1144625, 1135262, 1135947, 1150200, 1152666,\n", + " 1152664, 1139371, 1147202, 1136685, 1134711, 1136266, 1136268, 1134807,\n", + " 1140530, 1138366, 1151520, 1135913, 1140946, 1135367, 1135202, 1141036,\n", + " 1136779, 1134794, 1136512, 1138504, 1137330, 1143069, 1157088, 1144789,\n", + " 1144395, 1137529, 1137534, 1157393, 1152376, 1137441, 1143317, 1136195,\n", + " 1135267, 1156148, 1156159, 1139155, 1134841, 1135968, 1135983, 1141086,\n", + " 1148850, 1140240, 1140970, 1140714, 1138516, 1153096, 1153098, 1137959,\n", + " 1154141, 1137019, 1156899, 1156904, 1156908, 1135522, 1135535, 1157703,\n", + " 1157709, 1138436, 1138440, 1137924, 1137932, 1135135, 1154106, 1158386,\n", + " 1158390, 1149328, 1138847, 1156606, 1147104, 1147112, 1147116, 1142611,\n", + " 1160822, 1145843, 1145853, 1148531, 1135760, 1135769, 1141523, 1139667,\n", + " 1139673, 1134992, 1158961, 1158974, 1139327, 1141070, 1153544, 1140034,\n", + " 1152696, 1136067, 1139929, 1138648, 1141964, 1152042, 1152044, 1139065,\n", + " 1136051, 1135549, 1137890, 1141088, 1141100, 1162946, 1139889, 1145346,\n", + " 1136392, 1154851, 1143711, 1162705, 1143225, 1139025, 1140003, 1135861,\n", + " 1136625, 1139386, 1141657, 1136917, 1139733, 1143666, 1143678, 1144237,\n", + " 1141159, 1136763, 1144650, 1144641, 1136853, 1136862, 1136855, 1139798,\n", + " 1142056, 1153666, 1140161, 1140173, 1158749, 1148864, 1137243, 1138713,\n", + " 1140110, 1142913, 1143111, 1144596, 1136864, 1144041, 1144042, 1135327,\n", + " 1141392, 1137606, 1144868, 1139556, 1139559, 1147153, 1136378, 1136379,\n", + " 1142640, 1141365, 1153069, 1153058, 1151106, 1141664, 1149090, 1149099,\n", + " 1138294, 1144279, 1143907, 1139661, 1140093, 1139127, 1139170, 1139182,\n", + " 1140977, 1140983, 1140990, 1135047, 1147050, 1145873, 1143543, 1143551,\n", + " 1152976, 1152980, 1152988, 1141925, 1146898, 1146901, 1146904, 1144242,\n", + " 1136885, 1143637, 1137570, 1143851, 1142098, 1146024, 1149928, 1139990,\n", + " 1143294, 1151124, 1147150, 1148763, 1147282, 1142816, 1136330, 1149159,\n", + " 1140348, 1142630, 1149366, 1139408, 1148003, 1138915, 1157720, 1146099,\n", + " 1139309, 1139341, 1144778, 1144957, 1143345, 1144619, 1144615, 1137098,\n", + " 1169022, 1150294, 1144375, 1146514, 1146523, 1143465, 1143457, 1137703,\n", + " 1137707, 1144303, 1144568, 1140483, 1140823, 1147574, 1147575, 1143807,\n", + " 1147521, 1140352, 1140360, 1140364, 1140365, 1137998, 1143082, 1144734,\n", + " 1147999, 1146949, 1139252, 1139249, 1147131, 1147235, 1147244, 1148704,\n", + " 1142700, 1141327, 1141827, 1146749, 1147070, 1149722, 1149717, 1145707,\n", + " 1147970, 1145011, 1139549, 1158226, 1158230, 1150452, 1145237, 1145240,\n", + " 1145751, 1146159, 1138632, 1146178, 1146187, 1148217, 1152537, 1151182,\n", + " 1150438, 1150445, 1149791, 1138044, 1146895, 1144203, 1154831, 1147796,\n", + " 1151480, 1151487, 1151473, 1152023, 1152028, 1152031, 1154267, 1151041,\n", + " 1145255, 1147016, 1147019, 1147021, 1147009, 1147023, 1153963, 1141949,\n", + " 1148744, 1137647, 1148463, 1147653, 1143560, 1139088, 1139096, 1139097,\n", + " 1154420, 1139718, 1152494, 1138404, 1141182, 1151557, 1148720, 1148724,\n", + " 1146549, 1149810, 1139940, 1151937, 1148204, 1153188, 1145104, 1159837,\n", + " 1150935, 1152866, 1150356, 1147446, 1152590, 1135307, 1151906, 1150714,\n", + " 1136008, 1151348, 1151351, 1151356, 1147737, 1156402, 1149359, 1153249,\n", + " 1146623, 1164772, 1144476, 1135688, 1152097, 1152100, 1152109, 1153027,\n", + " 1153037, 1153038, 1150094, 1137746, 1146318, 1152623, 1140521, 1136401,\n", + " 1149203, 1152820, 1155337, 1154119, 1155351, 1155358, 1157827, 1151573,\n", + " 1151617, 1151622, 1151629, 1136134, 1153376, 1140932, 1138982, 1152903,\n", + " 1152341, 1158421, 1156826, 1153311, 1138281, 1152300, 1156004, 1156001,\n", + " 1136028, 1158704, 1156608, 1156619, 1156622, 1152928, 1151064, 1156420,\n", + " 1137545, 1150104, 1150164, 1149273, 1142257, 1153691, 1155202, 1154453,\n", + " 1155222, 1145652, 1148628, 1158530, 1158540, 1137458, 1148242, 1148255,\n", + " 1148250, 1159223, 1153083, 1142041, 1157229, 1135439, 1143444, 1158854,\n", + " 1148884, 1156500, 1157064, 1152844, 1152833, 1145187, 1137808, 1157567,\n", + " 1150465, 1135231, 1135740, 1151788, 1150824, 1153413, 1143010, 1158308,\n", + " 1158311, 1151271, 1155441, 1137972, 1162120, 1154529, 1142755, 1156269,\n", + " 1151379, 1137908, 1155122, 1149519, 1155755, 1146913, 1145794, 1145806,\n", + " 1156463, 1168235, 1154763, 1155628, 1155630, 1158486, 1156563, 1154547,\n", + " 1154559, 1136466, 1158564, 1158824, 1153715, 1158335, 1157000, 1156994,\n", + " 1155646, 1153364, 1160958, 1143254, 1143261, 1143257, 1146938, 1161796,\n", + " 1160223, 1154250, 1154240, 1154080, 1164292, 1143189, 1143196, 1153317,\n", + " 1153318, 1157439, 1157928, 1140748, 1157660, 1158124, 1158584, 1158204,\n", + " 1155035, 1137381, 1159116, 1137316, 1140914, 1135601, 1135614, 1145513,\n", + " 1145514, 1148149, 1155848, 1155843, 1157685, 1157684, 1146325, 1149137,\n", + " 1156092, 1155718, 1161450, 1152220, 1152222, 1155434, 1152498, 1140381,\n", + " 1155884, 1157732, 1157735, 1157033, 1155971, 1155975, 1142070, 1156811,\n", + " 1149700, 1163238, 1136896, 1158760, 1158764, 1158882, 1158815, 1158447,\n", + " 1152463, 1156665, 1147599, 1155304, 1153808, 1156284, 1134754, 1140049,\n", + " 1158552, 1151140, 1138099, 1155862, 1158006, 1163170, 1169902, 1135661,\n", + " 1164276, 1164272, 1164277, 1142666, 1150684, 1157751, 1165838, 1153052,\n", + " 1153045, 1155763, 1156107, 1138391, 1138393, 1165234, 1150046, 1155479,\n", + " 1138161, 1164006, 1156787, 1149963, 1163879, 1154578, 1160758, 1146063,\n", + " 1171257, 1171259, 1163455, 1162308, 1164048, 1164061, 1140135, 1148600,\n", + " 1148603, 1143139, 1165047, 1162350, 1156361, 1159025, 1159037, 1168023,\n", + " 1155588, 1164612, 1151227, 1151228, 1138679, 1153924, 1158405, 1144977,\n", + " 1144979, 1149015, 1146500, 1170996, 1141471, 1147427, 1159386, 1156739,\n", + " 1156744, 1150649, 1171040, 1150315, 1144810, 1144812, 1164741, 1164739,\n", + " 1142722, 1156292, 1156293, 1156303, 1165636, 1145743, 1145183, 1163783,\n", + " 1148683, 1145567, 1145228, 1170793, 1143038, 1147355, 1152626, 1139351,\n", + " 1145902, 1153520, 1153534, 1168663, 1158722, 1154076, 1147330, 1147338,\n", + " 1144699, 1150773, 1145502, 1151598, 1149125, 1155172, 1150515, 1144346,\n", + " 1144336, 1157534, 1154670, 1157331, 1141048, 1151664, 1151668, 1169359,\n", + " 1149452, 1149451, 1147491, 1149688, 1158610, 1158623, 1173047, 1172759,\n", + " 1149846, 1157384, 1157383, 1165892, 1171479, 1172488, 1169927, 1148667,\n", + " 1172669, 1173307, 1145033, 1154019, 1164974, 1159652, 1178099, 1157158,\n", + " 1157153, 1172101, 1157372, 1157373, 1147711, 1151850, 1151852, 1148128,\n", + " 1148131, 1147933, 1149237, 1170488, 1169032, 1169037, 1155739, 1181017,\n", + " 1166746, 1140326, 1159100, 1170874, 1154148, 1167520, 1165678, 1184386,\n", + " 1186117, 1169765, 1168481, 1143420, 1171302, 1153805, 1164818, 1171127,\n", + " 1180830, 1163099, 1179807, 1158030, 1161262, 1178505, 1155250, 1154707,\n", + " 1154718, 1157792, 1179164, 1157126, 1157133, 1183106, 1153898, 1153899,\n", + " 1164563, 1162403, 1145626, 1156443, 1178757, 1152276, 1158371, 1155892,\n", + " 1155899, 1162968, 1184317, 1164411, 1160400, 1140393, 1140399, 1164798,\n", + " 1166208, 1164437, 1176976, 1146161, 1170802, 1147182, 1182965, 1184839,\n", + " 1139828, 1139831, 1139837, 1150265, 1163848, 1156049, 1156055, 1190281,\n", + " 1191714, 1190237, 1173058, 1194138, 1156846, 1191018, 1169952, 1169954,\n", + " 1189739, 1192327, 1153733, 1153592, 1171201, 1179321, 1166784, 1185851,\n", + " 1186163, 1186620, 1155959, 1155962, 1185649, 1183807, 1187536, 1189034,\n", + " 1163071, 1169098, 1182401, 1193831], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197168, 1198782, 1195697, 1199424, 1195523, 1198248, 1200108, 1201090,\n", + " 1199282, 1198458, 1202255, 1201582, 1194626, 1197359, 1195938, 1198633,\n", + " 1196956, 1198557, 1198180, 1196631, 1194649, 1201992, 1197697, 1199519,\n", + " 1194947, 1194882, 1195888, 1195740, 1194759, 1195325, 1196840, 1195132,\n", + " 1195148, 1195270, 1197141, 1197140, 1200761, 1200765, 1196247, 1197265,\n", + " 1196109, 1194859, 1196747, 1195847, 1198915, 1202017, 1196393, 1198282,\n", + " 1199339, 1199060, 1197286, 1197291, 1199185, 1194928, 1199628, 1197990,\n", + " 1200079, 1199152, 1199038, 1194786, 1201511, 1196498, 1200668, 1197977,\n", + " 1196727, 1195771, 1198811, 1201547, 1197214, 1198066, 1198593, 1202630,\n", + " 1201056, 1194803, 1199712, 1201049, 1200553, 1203071, 1197097, 1197100,\n", + " 1199881, 1200692, 1199976, 1197546, 1195607, 1196761, 1201871, 1202209,\n", + " 1200398, 1200391, 1199606, 1195676, 1195664, 1200445, 1196929, 1198929,\n", + " 1195415, 1195181, 1195386, 1201499, 1196597, 1196605, 1198973, 1200585,\n", + " 1199659, 1199662, 1196380, 1198148, 1198824, 1195070, 1201886, 1198131,\n", + " 1195082, 1195160, 1200208, 1194908, 1201771, 1203162, 1196424, 1197872],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197168, 1198782, 1195697, 1199424, 1195523, 1198248, 1200108, 1201090,\n", + " 1199282, 1198458, 1202255, 1201582, 1194626, 1197359, 1195938, 1198633,\n", + " 1196956, 1198557, 1198180, 1196631, 1194649, 1201992, 1197697, 1199519,\n", + " 1194947, 1194882, 1195888, 1195740, 1194759, 1195325, 1196840, 1195132,\n", + " 1195148, 1195270, 1197141, 1197140, 1200761, 1200765, 1196247, 1197265,\n", + " 1196109, 1194859, 1196747, 1195847, 1198915, 1202017, 1196393, 1198282,\n", + " 1199339, 1199060, 1197286, 1197291, 1199185, 1194928, 1199628, 1197990,\n", + " 1200079, 1199152, 1199038, 1194786, 1201511, 1196498, 1200668, 1197977,\n", + " 1196727, 1195771, 1198811, 1201547, 1197214, 1198066, 1198593, 1202630,\n", + " 1201056, 1194803, 1199712, 1201049, 1200553, 1203071, 1197097, 1197100,\n", + " 1199881, 1200692, 1199976, 1197546, 1195607, 1196761, 1201871, 1202209,\n", + " 1200398, 1200391, 1199606, 1195676, 1195664, 1200445, 1196929, 1198929,\n", + " 1195415, 1195181, 1195386, 1201499, 1196597, 1196605, 1198973, 1200585,\n", + " 1199659, 1199662, 1196380, 1198148, 1198824, 1195070, 1201886, 1198131,\n", + " 1195082, 1195160, 1200208, 1194908, 1201771, 1203162, 1196424, 1197872],\n", + " device='cuda:0', dtype=torch.int32))\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.00723\n", + "sampling 0.006675\n", + "noi time: 0.001972\n", + "get_vertex_data call: 0.070342\n", + "noi group time: 0.003899\n", + "eoi_group_time: 0.016169\n", + "second half: 0.262156\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 32616, 19416, 23798, ..., 1133445, 1103852, 1103853],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 32616, 19416, 23798, ..., 1133445, 1103852, 1103853],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227503, 1221053, 1214756, ..., 1929320, 1934173, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227503, 1221053, 1214756, ..., 1929320, 1934173, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1141424, 1140285, 1135926, 1137791, 1140793, 1140799, 1141758,\n", + " 1138335, 1136213, 1136215, 1141251, 1141250, 1136965, 1138897, 1138903,\n", + " 1145370, 1146983, 1137271, 1143372, 1139243, 1139866, 1142958, 1143818,\n", + " 1147473, 1147482, 1147483, 1135992, 1135989, 1144636, 1149038, 1146995,\n", + " 1148546, 1153217, 1147091, 1155014, 1139371, 1147211, 1150329, 1152425,\n", + " 1137829, 1140537, 1138112, 1137254, 1137172, 1153456, 1153463, 1140149,\n", + " 1135367, 1135202, 1154739, 1134970, 1141036, 1134794, 1134797, 1157447,\n", + " 1136518, 1137329, 1136610, 1144395, 1137529, 1137534, 1152376, 1137441,\n", + " 1139161, 1135579, 1155083, 1140240, 1138514, 1153099, 1158136, 1135493,\n", + " 1154132, 1154141, 1156899, 1135522, 1139685, 1137287, 1138440, 1138445,\n", + " 1149328, 1138845, 1135088, 1156606, 1147112, 1142611, 1160821, 1156141,\n", + " 1158984, 1148531, 1135760, 1141532, 1143584, 1136457, 1139673, 1134992,\n", + " 1148805, 1136734, 1158961, 1158974, 1139327, 1139324, 1159012, 1159019,\n", + " 1141058, 1153543, 1152701, 1138148, 1138150, 1142237, 1152044, 1140670,\n", + " 1137734, 1137728, 1147316, 1141088, 1141094, 1141098, 1141102, 1149001,\n", + " 1156875, 1136397, 1143767, 1161974, 1146832, 1142499, 1152709, 1141112,\n", + " 1141224, 1141892, 1143676, 1145061, 1145066, 1144233, 1144941, 1136756,\n", + " 1134979, 1134987, 1137087, 1141821, 1146787, 1146799, 1153672, 1158749,\n", + " 1148867, 1148871, 1139188, 1139190, 1139199, 1137661, 1138424, 1144596,\n", + " 1142455, 1136875, 1141579, 1135322, 1135324, 1144182, 1150906, 1144865,\n", + " 1146201, 1139559, 1138539, 1147153, 1136376, 1141365, 1141367, 1141669,\n", + " 1149093, 1138293, 1153556, 1139510, 1139774, 1139650, 1143779, 1140976,\n", + " 1140979, 1140990, 1141565, 1147050, 1147043, 1135457, 1146901, 1146909,\n", + " 1144243, 1144242, 1145340, 1140580, 1141841, 1150692, 1140690, 1134861,\n", + " 1134849, 1145978, 1144072, 1143851, 1146024, 1146141, 1154323, 1154328,\n", + " 1141642, 1141585, 1142533, 1139990, 1139993, 1143293, 1143294, 1147543,\n", + " 1147540, 1147282, 1142816, 1142822, 1147470, 1142630, 1139417, 1148003,\n", + " 1142586, 1138923, 1157717, 1157718, 1136836, 1146099, 1139301, 1139328,\n", + " 1144778, 1145429, 1145427, 1143345, 1144754, 1144765, 1144615, 1140841,\n", + " 1150294, 1138013, 1150919, 1146514, 1143960, 1138024, 1143456, 1143457,\n", + " 1137707, 1140492, 1143937, 1135454, 1143793, 1147521, 1140364, 1137990,\n", + " 1143080, 1168924, 1148966, 1144219, 1147996, 1147999, 1146949, 1144010,\n", + " 1139252, 1147127, 1147234, 1147244, 1147243, 1148704, 1141836, 1148468,\n", + " 1152328, 1143434, 1149714, 1147025, 1147257, 1147248, 1147971, 1139549,\n", + " 1158226, 1143921, 1147880, 1145240, 1145246, 1145751, 1142370, 1142369,\n", + " 1142376, 1142383, 1146159, 1148394, 1151242, 1152530, 1151179, 1150445,\n", + " 1149258, 1148928, 1148930, 1148826, 1154445, 1144526, 1151986, 1151994,\n", + " 1151480, 1151487, 1151473, 1152027, 1144884, 1145263, 1146723, 1134869,\n", + " 1140402, 1147021, 1158950, 1150736, 1150847, 1150730, 1153575, 1149409,\n", + " 1146412, 1148288, 1147866, 1154420, 1148188, 1136247, 1146676, 1146686,\n", + " 1148724, 1146544, 1139936, 1150057, 1143981, 1153179, 1153124, 1145109,\n", + " 1152974, 1167952, 1150932, 1150935, 1155098, 1141022, 1147442, 1151811,\n", + " 1151816, 1135310, 1151906, 1154183, 1149732, 1141420, 1147737, 1153442,\n", + " 1156413, 1156402, 1146623, 1151403, 1144472, 1135687, 1135688, 1152409,\n", + " 1152415, 1152098, 1153032, 1137746, 1146304, 1152622, 1149203, 1157107,\n", + " 1152819, 1155337, 1154123, 1139577, 1151617, 1150578, 1150588, 1136131,\n", + " 1136134, 1148916, 1152950, 1167157, 1138989, 1152903, 1151299, 1146816,\n", + " 1156816, 1153311, 1138283, 1138279, 1156001, 1158712, 1158704, 1162199,\n", + " 1152928, 1151064, 1151071, 1156399, 1156422, 1137543, 1144016, 1148040,\n", + " 1167419, 1149794, 1149804, 1144663, 1137048, 1148628, 1148637, 1158530,\n", + " 1158540, 1137458, 1154564, 1166145, 1135434, 1143442, 1157547, 1154929,\n", + " 1156505, 1155418, 1151251, 1150465, 1146862, 1146854, 1160262, 1156629,\n", + " 1157912, 1150828, 1156935, 1158311, 1151340, 1155441, 1155514, 1153354,\n", + " 1153359, 1150130, 1162120, 1140865, 1154529, 1154528, 1142758, 1138770,\n", + " 1156271, 1157642, 1151379, 1158639, 1140187, 1156641, 1152527, 1135396,\n", + " 1146919, 1145796, 1156463, 1158096, 1155628, 1154555, 1158824, 1158825,\n", + " 1153715, 1158325, 1148834, 1155646, 1153375, 1154240, 1151890, 1156711,\n", + " 1137359, 1154902, 1154898, 1179427, 1143189, 1160904, 1150371, 1153318,\n", + " 1157439, 1157430, 1157934, 1157929, 1137167, 1137166, 1157653, 1158996,\n", + " 1159001, 1159116, 1145693, 1135601, 1145510, 1158664, 1158665, 1157684,\n", + " 1146321, 1156085, 1152209, 1152220, 1159213, 1155439, 1140368, 1157735,\n", + " 1159130, 1159132, 1159120, 1144843, 1155975, 1158846, 1153491, 1136899,\n", + " 1136905, 1136896, 1158753, 1158882, 1161276, 1157304, 1158285, 1136493,\n", + " 1136494, 1136491, 1159240, 1142745, 1153808, 1136640, 1162164, 1157858,\n", + " 1142178, 1153834, 1138101, 1158006, 1161539, 1171195, 1163456, 1164276,\n", + " 1150674, 1161645, 1159052, 1159070, 1159071, 1159057, 1167477, 1157944,\n", + " 1157946, 1160564, 1153042, 1153045, 1171551, 1159731, 1167707, 1167703,\n", + " 1164873, 1156107, 1138393, 1142681, 1167188, 1162917, 1150046, 1149057,\n", + " 1149063, 1149067, 1155479, 1154295, 1153514, 1171987, 1157600, 1138161,\n", + " 1156787, 1149956, 1149963, 1139790, 1164909, 1154590, 1154578, 1139283,\n", + " 1139290, 1148021, 1148771, 1146063, 1158461, 1165306, 1158868, 1158866,\n", + " 1170415, 1140650, 1140643, 1141857, 1148600, 1164979, 1143139, 1143143,\n", + " 1144509, 1156361, 1158655, 1159025, 1159032, 1159038, 1166286, 1169105,\n", + " 1152247, 1143735, 1164592, 1144320, 1159536, 1151227, 1151220, 1138674,\n", + " 1144977, 1149023, 1153239, 1144739, 1152776, 1153212, 1153201, 1141471,\n", + " 1147438, 1157050, 1156739, 1153663, 1150646, 1144812, 1135567, 1164741,\n", + " 1164750, 1156300, 1144058, 1166137, 1145176, 1160230, 1146035, 1172197,\n", + " 1155324, 1166462, 1150533, 1146444, 1146446, 1147693, 1170502, 1152624,\n", + " 1139351, 1139345, 1145892, 1153534, 1163961, 1163962, 1181040, 1181049,\n", + " 1143395, 1171867, 1169742, 1149560, 1149563, 1158724, 1158722, 1144690,\n", + " 1145664, 1167817, 1144672, 1166640, 1169216, 1149480, 1169296, 1155172,\n", + " 1150512, 1150518, 1156119, 1144336, 1170942, 1157534, 1138383, 1147750,\n", + " 1154670, 1154893, 1154885, 1190645, 1169162, 1157331, 1138129, 1151668,\n", + " 1169359, 1172740, 1158623, 1158054, 1158060, 1174651, 1149847, 1154869,\n", + " 1169941, 1152353, 1168451, 1168907, 1173307, 1152150, 1152151, 1152152,\n", + " 1175375, 1159658, 1157153, 1157371, 1147711, 1148128, 1169904, 1157593,\n", + " 1149247, 1167715, 1179679, 1155739, 1179701, 1140333, 1144550, 1170554,\n", + " 1172063, 1166684, 1177175, 1150234, 1154148, 1169423, 1149169, 1171929,\n", + " 1168481, 1166288, 1153803, 1178171, 1171755, 1179807, 1158031, 1161255,\n", + " 1171773, 1176103, 1157795, 1172546, 1163839, 1157126, 1177318, 1153899,\n", + " 1145626, 1172022, 1163542, 1153609, 1152284, 1165186, 1158774, 1158779,\n", + " 1158512, 1155890, 1155899, 1185508, 1157270, 1140397, 1182327, 1185394,\n", + " 1171594, 1168892, 1165474, 1159341, 1162378, 1162380, 1162480, 1154944,\n", + " 1154957, 1146161, 1182384, 1147179, 1170034, 1180079, 1171443, 1139828,\n", + " 1139831, 1187821, 1164924, 1149668, 1186942, 1156055, 1151978, 1182704,\n", + " 1146395, 1180063, 1172371, 1159083, 1156835, 1182925, 1182544, 1182060,\n", + " 1179403, 1194351, 1194394, 1151774, 1182168, 1169707, 1194290, 1177469,\n", + " 1177852, 1158066, 1179601, 1178667, 1155958, 1155959, 1184514, 1179769,\n", + " 1169831, 1162661, 1188327, 1186391, 1191760, 1181033, 1184981, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1141424, 1140285, 1135926, 1137791, 1140793, 1140799, 1141758,\n", + " 1138335, 1136213, 1136215, 1141251, 1141250, 1136965, 1138897, 1138903,\n", + " 1145370, 1146983, 1137271, 1143372, 1139243, 1139866, 1142958, 1143818,\n", + " 1147473, 1147482, 1147483, 1135992, 1135989, 1144636, 1149038, 1146995,\n", + " 1148546, 1153217, 1147091, 1155014, 1139371, 1147211, 1150329, 1152425,\n", + " 1137829, 1140537, 1138112, 1137254, 1137172, 1153456, 1153463, 1140149,\n", + " 1135367, 1135202, 1154739, 1134970, 1141036, 1134794, 1134797, 1157447,\n", + " 1136518, 1137329, 1136610, 1144395, 1137529, 1137534, 1152376, 1137441,\n", + " 1139161, 1135579, 1155083, 1140240, 1138514, 1153099, 1158136, 1135493,\n", + " 1154132, 1154141, 1156899, 1135522, 1139685, 1137287, 1138440, 1138445,\n", + " 1149328, 1138845, 1135088, 1156606, 1147112, 1142611, 1160821, 1156141,\n", + " 1158984, 1148531, 1135760, 1141532, 1143584, 1136457, 1139673, 1134992,\n", + " 1148805, 1136734, 1158961, 1158974, 1139327, 1139324, 1159012, 1159019,\n", + " 1141058, 1153543, 1152701, 1138148, 1138150, 1142237, 1152044, 1140670,\n", + " 1137734, 1137728, 1147316, 1141088, 1141094, 1141098, 1141102, 1149001,\n", + " 1156875, 1136397, 1143767, 1161974, 1146832, 1142499, 1152709, 1141112,\n", + " 1141224, 1141892, 1143676, 1145061, 1145066, 1144233, 1144941, 1136756,\n", + " 1134979, 1134987, 1137087, 1141821, 1146787, 1146799, 1153672, 1158749,\n", + " 1148867, 1148871, 1139188, 1139190, 1139199, 1137661, 1138424, 1144596,\n", + " 1142455, 1136875, 1141579, 1135322, 1135324, 1144182, 1150906, 1144865,\n", + " 1146201, 1139559, 1138539, 1147153, 1136376, 1141365, 1141367, 1141669,\n", + " 1149093, 1138293, 1153556, 1139510, 1139774, 1139650, 1143779, 1140976,\n", + " 1140979, 1140990, 1141565, 1147050, 1147043, 1135457, 1146901, 1146909,\n", + " 1144243, 1144242, 1145340, 1140580, 1141841, 1150692, 1140690, 1134861,\n", + " 1134849, 1145978, 1144072, 1143851, 1146024, 1146141, 1154323, 1154328,\n", + " 1141642, 1141585, 1142533, 1139990, 1139993, 1143293, 1143294, 1147543,\n", + " 1147540, 1147282, 1142816, 1142822, 1147470, 1142630, 1139417, 1148003,\n", + " 1142586, 1138923, 1157717, 1157718, 1136836, 1146099, 1139301, 1139328,\n", + " 1144778, 1145429, 1145427, 1143345, 1144754, 1144765, 1144615, 1140841,\n", + " 1150294, 1138013, 1150919, 1146514, 1143960, 1138024, 1143456, 1143457,\n", + " 1137707, 1140492, 1143937, 1135454, 1143793, 1147521, 1140364, 1137990,\n", + " 1143080, 1168924, 1148966, 1144219, 1147996, 1147999, 1146949, 1144010,\n", + " 1139252, 1147127, 1147234, 1147244, 1147243, 1148704, 1141836, 1148468,\n", + " 1152328, 1143434, 1149714, 1147025, 1147257, 1147248, 1147971, 1139549,\n", + " 1158226, 1143921, 1147880, 1145240, 1145246, 1145751, 1142370, 1142369,\n", + " 1142376, 1142383, 1146159, 1148394, 1151242, 1152530, 1151179, 1150445,\n", + " 1149258, 1148928, 1148930, 1148826, 1154445, 1144526, 1151986, 1151994,\n", + " 1151480, 1151487, 1151473, 1152027, 1144884, 1145263, 1146723, 1134869,\n", + " 1140402, 1147021, 1158950, 1150736, 1150847, 1150730, 1153575, 1149409,\n", + " 1146412, 1148288, 1147866, 1154420, 1148188, 1136247, 1146676, 1146686,\n", + " 1148724, 1146544, 1139936, 1150057, 1143981, 1153179, 1153124, 1145109,\n", + " 1152974, 1167952, 1150932, 1150935, 1155098, 1141022, 1147442, 1151811,\n", + " 1151816, 1135310, 1151906, 1154183, 1149732, 1141420, 1147737, 1153442,\n", + " 1156413, 1156402, 1146623, 1151403, 1144472, 1135687, 1135688, 1152409,\n", + " 1152415, 1152098, 1153032, 1137746, 1146304, 1152622, 1149203, 1157107,\n", + " 1152819, 1155337, 1154123, 1139577, 1151617, 1150578, 1150588, 1136131,\n", + " 1136134, 1148916, 1152950, 1167157, 1138989, 1152903, 1151299, 1146816,\n", + " 1156816, 1153311, 1138283, 1138279, 1156001, 1158712, 1158704, 1162199,\n", + " 1152928, 1151064, 1151071, 1156399, 1156422, 1137543, 1144016, 1148040,\n", + " 1167419, 1149794, 1149804, 1144663, 1137048, 1148628, 1148637, 1158530,\n", + " 1158540, 1137458, 1154564, 1166145, 1135434, 1143442, 1157547, 1154929,\n", + " 1156505, 1155418, 1151251, 1150465, 1146862, 1146854, 1160262, 1156629,\n", + " 1157912, 1150828, 1156935, 1158311, 1151340, 1155441, 1155514, 1153354,\n", + " 1153359, 1150130, 1162120, 1140865, 1154529, 1154528, 1142758, 1138770,\n", + " 1156271, 1157642, 1151379, 1158639, 1140187, 1156641, 1152527, 1135396,\n", + " 1146919, 1145796, 1156463, 1158096, 1155628, 1154555, 1158824, 1158825,\n", + " 1153715, 1158325, 1148834, 1155646, 1153375, 1154240, 1151890, 1156711,\n", + " 1137359, 1154902, 1154898, 1179427, 1143189, 1160904, 1150371, 1153318,\n", + " 1157439, 1157430, 1157934, 1157929, 1137167, 1137166, 1157653, 1158996,\n", + " 1159001, 1159116, 1145693, 1135601, 1145510, 1158664, 1158665, 1157684,\n", + " 1146321, 1156085, 1152209, 1152220, 1159213, 1155439, 1140368, 1157735,\n", + " 1159130, 1159132, 1159120, 1144843, 1155975, 1158846, 1153491, 1136899,\n", + " 1136905, 1136896, 1158753, 1158882, 1161276, 1157304, 1158285, 1136493,\n", + " 1136494, 1136491, 1159240, 1142745, 1153808, 1136640, 1162164, 1157858,\n", + " 1142178, 1153834, 1138101, 1158006, 1161539, 1171195, 1163456, 1164276,\n", + " 1150674, 1161645, 1159052, 1159070, 1159071, 1159057, 1167477, 1157944,\n", + " 1157946, 1160564, 1153042, 1153045, 1171551, 1159731, 1167707, 1167703,\n", + " 1164873, 1156107, 1138393, 1142681, 1167188, 1162917, 1150046, 1149057,\n", + " 1149063, 1149067, 1155479, 1154295, 1153514, 1171987, 1157600, 1138161,\n", + " 1156787, 1149956, 1149963, 1139790, 1164909, 1154590, 1154578, 1139283,\n", + " 1139290, 1148021, 1148771, 1146063, 1158461, 1165306, 1158868, 1158866,\n", + " 1170415, 1140650, 1140643, 1141857, 1148600, 1164979, 1143139, 1143143,\n", + " 1144509, 1156361, 1158655, 1159025, 1159032, 1159038, 1166286, 1169105,\n", + " 1152247, 1143735, 1164592, 1144320, 1159536, 1151227, 1151220, 1138674,\n", + " 1144977, 1149023, 1153239, 1144739, 1152776, 1153212, 1153201, 1141471,\n", + " 1147438, 1157050, 1156739, 1153663, 1150646, 1144812, 1135567, 1164741,\n", + " 1164750, 1156300, 1144058, 1166137, 1145176, 1160230, 1146035, 1172197,\n", + " 1155324, 1166462, 1150533, 1146444, 1146446, 1147693, 1170502, 1152624,\n", + " 1139351, 1139345, 1145892, 1153534, 1163961, 1163962, 1181040, 1181049,\n", + " 1143395, 1171867, 1169742, 1149560, 1149563, 1158724, 1158722, 1144690,\n", + " 1145664, 1167817, 1144672, 1166640, 1169216, 1149480, 1169296, 1155172,\n", + " 1150512, 1150518, 1156119, 1144336, 1170942, 1157534, 1138383, 1147750,\n", + " 1154670, 1154893, 1154885, 1190645, 1169162, 1157331, 1138129, 1151668,\n", + " 1169359, 1172740, 1158623, 1158054, 1158060, 1174651, 1149847, 1154869,\n", + " 1169941, 1152353, 1168451, 1168907, 1173307, 1152150, 1152151, 1152152,\n", + " 1175375, 1159658, 1157153, 1157371, 1147711, 1148128, 1169904, 1157593,\n", + " 1149247, 1167715, 1179679, 1155739, 1179701, 1140333, 1144550, 1170554,\n", + " 1172063, 1166684, 1177175, 1150234, 1154148, 1169423, 1149169, 1171929,\n", + " 1168481, 1166288, 1153803, 1178171, 1171755, 1179807, 1158031, 1161255,\n", + " 1171773, 1176103, 1157795, 1172546, 1163839, 1157126, 1177318, 1153899,\n", + " 1145626, 1172022, 1163542, 1153609, 1152284, 1165186, 1158774, 1158779,\n", + " 1158512, 1155890, 1155899, 1185508, 1157270, 1140397, 1182327, 1185394,\n", + " 1171594, 1168892, 1165474, 1159341, 1162378, 1162380, 1162480, 1154944,\n", + " 1154957, 1146161, 1182384, 1147179, 1170034, 1180079, 1171443, 1139828,\n", + " 1139831, 1187821, 1164924, 1149668, 1186942, 1156055, 1151978, 1182704,\n", + " 1146395, 1180063, 1172371, 1159083, 1156835, 1182925, 1182544, 1182060,\n", + " 1179403, 1194351, 1194394, 1151774, 1182168, 1169707, 1194290, 1177469,\n", + " 1177852, 1158066, 1179601, 1178667, 1155958, 1155959, 1184514, 1179769,\n", + " 1169831, 1162661, 1188327, 1186391, 1191760, 1181033, 1184981, 1157022],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195711, 1199424, 1199282, 1202255, 1198832, 1201577, 1201582, 1199248,\n", + " 1198633, 1198694, 1202804, 1198557, 1195964, 1196672, 1194770, 1197159,\n", + " 1196631, 1194649, 1195514, 1201992, 1196031, 1197709, 1198095, 1194952,\n", + " 1198306, 1199172, 1196334, 1196695, 1196521, 1195325, 1195989, 1198264,\n", + " 1198266, 1198958, 1198649, 1198167, 1196711, 1199810, 1199814, 1195266,\n", + " 1197141, 1198219, 1198207, 1199315, 1197478, 1199711, 1196399, 1199059,\n", + " 1199185, 1197577, 1199628, 1202448, 1200076, 1199154, 1198406, 1198410,\n", + " 1199579, 1199231, 1195018, 1201511, 1196508, 1197601, 1197607, 1201116,\n", + " 1196727, 1195773, 1198428, 1199889, 1198811, 1199555, 1199083, 1199081,\n", + " 1200169, 1199445, 1201156, 1201056, 1199548, 1199546, 1199721, 1200363,\n", + " 1200546, 1200555, 1200558, 1197097, 1197100, 1202138, 1199908, 1202239,\n", + " 1202706, 1200181, 1201291, 1195607, 1201871, 1199925, 1198561, 1196966,\n", + " 1200997, 1195679, 1198929, 1198909, 1198911, 1195415, 1195379, 1197060,\n", + " 1197811, 1197821, 1198973, 1199659, 1196382, 1198148, 1198824, 1197655,\n", + " 1200707, 1195163, 1195165, 1200208], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195711, 1199424, 1199282, 1202255, 1198832, 1201577, 1201582, 1199248,\n", + " 1198633, 1198694, 1202804, 1198557, 1195964, 1196672, 1194770, 1197159,\n", + " 1196631, 1194649, 1195514, 1201992, 1196031, 1197709, 1198095, 1194952,\n", + " 1198306, 1199172, 1196334, 1196695, 1196521, 1195325, 1195989, 1198264,\n", + " 1198266, 1198958, 1198649, 1198167, 1196711, 1199810, 1199814, 1195266,\n", + " 1197141, 1198219, 1198207, 1199315, 1197478, 1199711, 1196399, 1199059,\n", + " 1199185, 1197577, 1199628, 1202448, 1200076, 1199154, 1198406, 1198410,\n", + " 1199579, 1199231, 1195018, 1201511, 1196508, 1197601, 1197607, 1201116,\n", + " 1196727, 1195773, 1198428, 1199889, 1198811, 1199555, 1199083, 1199081,\n", + " 1200169, 1199445, 1201156, 1201056, 1199548, 1199546, 1199721, 1200363,\n", + " 1200546, 1200555, 1200558, 1197097, 1197100, 1202138, 1199908, 1202239,\n", + " 1202706, 1200181, 1201291, 1195607, 1201871, 1199925, 1198561, 1196966,\n", + " 1200997, 1195679, 1198929, 1198909, 1198911, 1195415, 1195379, 1197060,\n", + " 1197811, 1197821, 1198973, 1199659, 1196382, 1198148, 1198824, 1197655,\n", + " 1200707, 1195163, 1195165, 1200208], device='cuda:0',\n", + " dtype=torch.int32))\n", + "{'institution': tensor([[ 1.5165e-01, -1.0807e-04, 6.0061e-01, ..., 6.4994e-02,\n", + " -1.6269e-03, -5.4436e-03],\n", + " [ 2.4182e-01, -4.6688e-04, 7.3825e-01, ..., 5.2007e-02,\n", + " -1.8652e-03, -6.5989e-03],\n", + " [ 1.6239e-01, -1.5363e-04, 5.1102e-01, ..., 8.4086e-02,\n", + " -1.9767e-03, -5.0469e-03],\n", + " ...,\n", + " [ 9.8477e-02, 4.4194e-02, 3.4491e-01, ..., 1.2915e-01,\n", + " -2.2780e-03, -3.7558e-03],\n", + " [ 1.9405e-01, -2.1693e-04, 6.0156e-01, ..., 5.1169e-02,\n", + " -1.8736e-03, -5.6141e-03],\n", + " [ 1.1694e-01, 2.6949e-02, 3.9339e-01, ..., 1.3322e-01,\n", + " -2.2507e-03, -4.4294e-03]], device='cuda:0'), 'paper': tensor([[ 3.7058e-01, 4.1407e-01, -8.5200e-03, ..., -1.6389e-02,\n", + " -1.2135e-02, 7.6760e-01],\n", + " [-8.9008e-03, 9.9939e-02, -1.8568e-03, ..., 1.0625e+00,\n", + " -2.2257e-02, 2.3410e-01],\n", + " [-1.3524e-03, 5.4313e-01, -4.5907e-03, ..., -1.7411e-02,\n", + " -1.1360e-02, 9.3158e-02],\n", + " ...,\n", + " [-1.6478e-02, 1.2052e+00, 3.0788e-01, ..., 2.6896e+00,\n", + " -3.6463e-02, 1.2411e+00],\n", + " [-3.8678e-02, -2.9594e-02, 2.9104e+00, ..., -2.6650e-02,\n", + " -2.7508e-02, -5.0082e-02],\n", + " [-1.8320e-02, 1.8475e+00, 5.2430e-01, ..., 4.1645e+00,\n", + " -4.6237e-02, 2.2040e+00]], device='cuda:0'), 'author': tensor([[-1.6610e-03, -1.3966e-03, 1.8610e-01, ..., 7.3123e-01,\n", + " 7.9330e-01, -9.8350e-05],\n", + " [-1.8633e-03, -1.1534e-03, 1.4655e-01, ..., 6.6658e-01,\n", + " 7.3179e-01, -3.8856e-04],\n", + " [-2.9668e-03, 3.2722e-03, 8.0609e-02, ..., 6.5668e-01,\n", + " 4.9453e-01, -1.8996e-03],\n", + " ...,\n", + " [-4.5682e-03, 2.2211e-01, 4.1830e-02, ..., 5.3569e-01,\n", + " -6.3167e-04, -5.0118e-03],\n", + " [-2.5893e-03, 6.4369e-02, -1.1003e-04, ..., 6.6016e-01,\n", + " 5.0176e-01, -9.5488e-04],\n", + " [-2.5893e-03, 6.4369e-02, -1.1003e-04, ..., 6.6016e-01,\n", + " 5.0176e-01, -9.5488e-04]], device='cuda:0'), 'field_of_study': tensor([[-2.0996e-03, 4.7847e-01, 2.7017e-01, ..., -7.2557e-03,\n", + " 2.6415e-01, 3.1349e-01],\n", + " [-2.6691e-03, 2.6608e-01, 1.2990e-02, ..., -6.1263e-03,\n", + " 1.7172e-01, 1.4969e-01],\n", + " [-2.0586e-04, 4.4132e-01, 1.5863e-01, ..., -7.0684e-03,\n", + " 2.1359e-01, -6.1252e-04],\n", + " ...,\n", + " [-3.5810e-03, 3.7369e-01, 3.9483e-02, ..., -5.5101e-03,\n", + " 2.3744e-01, 2.5848e-01],\n", + " [-3.6294e-03, 4.9518e-01, 1.3042e-01, ..., -5.2468e-03,\n", + " 2.9016e-01, 2.4687e-01],\n", + " [-2.3829e-03, 2.3221e-01, -1.3666e-04, ..., -6.3715e-03,\n", + " 1.7669e-01, 6.9267e-02]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 19, 192, 184, 45, 475, 272, 272, 424, 320, 413, 221, 400,\n", + " 432, 565, 749, 405, 405, 1020, 299, 299, 842, 675, 675, 879,\n", + " 467, 992, 766, 994, 673, 673, 673, 673, 531, 743, 1058, 1058,\n", + " 869, 888, 764, 1135, 1135, 1129, 1225, 1225, 1209, 1209, 1604, 1491,\n", + " 1528, 1689, 1656, 1697, 1697, 1761, 1947, 1710, 1742, 1742, 1965, 1730,\n", + " 1926, 2044, 2094, 1928, 1928, 2057, 1939, 2085, 2159, 2235, 2222, 2222,\n", + " 2167, 2506, 2326, 2441, 2520, 2658, 2658, 2612, 2704, 2704, 2704, 2709,\n", + " 2684, 2756, 2880, 2830, 2830, 3143, 3143, 3007, 3007, 3234, 3072, 3072,\n", + " 3072, 3212, 3175, 3232, 3274, 3402, 3402, 3725, 3580, 3568, 3561, 3772,\n", + " 3535, 3578, 3724, 3724, 3978, 3736, 3766, 3766, 3479, 4021, 4112, 4202,\n", + " 4172, 4188, 4149, 4341, 4520, 4389, 4591, 4591, 4591, 4591, 4591, 4591,\n", + " 4510, 4665, 4677, 4800, 4807, 4750, 4750, 4913, 4818, 4905, 4804, 4984,\n", + " 4863, 5087, 4869, 5137, 5218, 5210, 5137, 5147, 5152, 5198, 5311, 5311,\n", + " 5311, 5455, 5546, 5711, 5711, 5719, 5742, 5624, 5624, 5624, 5515, 5551,\n", + " 5551, 5742, 5742, 5742, 5742, 5976, 5976, 5976, 5955, 6071, 6142],\n", + " [ 67, 36, 82, 2, 104, 55, 51, 25, 104, 35, 112, 96,\n", + " 104, 83, 35, 69, 13, 57, 53, 103, 23, 115, 91, 35,\n", + " 64, 22, 31, 23, 101, 64, 63, 68, 81, 39, 27, 67,\n", + " 90, 33, 15, 73, 61, 57, 100, 35, 64, 94, 19, 107,\n", + " 30, 49, 63, 62, 67, 76, 62, 106, 74, 5, 37, 64,\n", + " 43, 34, 85, 108, 75, 69, 16, 17, 6, 34, 9, 89,\n", + " 112, 15, 64, 42, 35, 11, 86, 23, 11, 72, 113, 47,\n", + " 21, 43, 13, 70, 50, 2, 38, 93, 95, 44, 92, 12,\n", + " 95, 105, 67, 43, 35, 96, 40, 80, 24, 64, 38, 97,\n", + " 65, 3, 114, 52, 29, 97, 95, 66, 69, 32, 64, 87,\n", + " 58, 71, 11, 104, 87, 97, 4, 110, 95, 63, 79, 48,\n", + " 109, 3, 64, 64, 102, 64, 45, 28, 54, 92, 64, 30,\n", + " 26, 104, 18, 111, 101, 20, 78, 0, 62, 41, 84, 88,\n", + " 56, 1, 23, 64, 18, 48, 19, 29, 60, 19, 10, 64,\n", + " 14, 46, 59, 98, 99, 8, 77, 29, 64, 7, 105]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 267, 966, 1253, ..., 3507, 379, 4437],\n", + " [ 51, 7, 143, ..., 6123, 6136, 6082]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 63, 104, 21, ..., 94, 31, 31],\n", + " [ 80, 85, 158, ..., 6174, 6149, 6186]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 255, 50, 50, ..., 6136, 6136, 6085],\n", + " [ 355, 396, 401, ..., 251, 261, 209]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 719, 692, 209, ..., 246, 677, 132],\n", + " [ 99, 101, 107, ..., 6200, 6193, 6195]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4025, 2732, 2732, ..., 5367, 5449, 5106],\n", + " [ 29, 36, 53, ..., 6192, 6192, 6130]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 255, 255, 255, ..., 6097, 6097, 6097],\n", + " [1589, 1785, 3559, ..., 242, 414, 760]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 19, 129, 129, ..., 6071, 6142, 6142],\n", + " [1360, 4693, 5256, ..., 4357, 5273, 5100]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.007472\n", + "sampling 0.007311\n", + "noi time: 0.001553\n", + "get_vertex_data call: 0.033114\n", + "noi group time: 0.003476\n", + "eoi_group_time: 0.015424\n", + "second half: 0.222644\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31145, 24187, 32616, ..., 1120069, 1120079, 1120075],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31145, 24187, 32616, ..., 1120069, 1120079, 1120075],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1230244, 1203800, 1230566, ..., 1926876, 1930681, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1230244, 1203800, 1230566, ..., 1926876, 1930681, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141439, 1136228, 1136238, 1136347, 1135920, 1135926, 1135165, 1135716,\n", + " 1135727, 1141758, 1138335, 1136969, 1141443, 1149826, 1139811, 1145373,\n", + " 1145984, 1137271, 1138938, 1139141, 1143372, 1139241, 1146647, 1139615,\n", + " 1139608, 1142963, 1149216, 1149228, 1143820, 1144637, 1146667, 1136125,\n", + " 1153220, 1141904, 1141911, 1155014, 1155018, 1139365, 1139371, 1152427,\n", + " 1136270, 1140537, 1140540, 1138112, 1137254, 1137180, 1137181, 1140029,\n", + " 1140953, 1135367, 1135202, 1134960, 1141036, 1134794, 1138508, 1137329,\n", + " 1136178, 1137693, 1139215, 1144395, 1136826, 1137441, 1136199, 1136928,\n", + " 1135265, 1156159, 1139161, 1134841, 1141702, 1135579, 1135668, 1156342,\n", + " 1153098, 1137957, 1156965, 1135490, 1135499, 1156899, 1135522, 1138305,\n", + " 1138436, 1138440, 1138461, 1137489, 1157189, 1136594, 1158390, 1149328,\n", + " 1138844, 1138846, 1135088, 1156603, 1156602, 1156606, 1142611, 1135359,\n", + " 1158984, 1148531, 1148533, 1150956, 1137109, 1135760, 1139846, 1136457,\n", + " 1139667, 1142249, 1136081, 1134992, 1142434, 1142786, 1136548, 1152654,\n", + " 1135782, 1142906, 1159019, 1143631, 1143625, 1140034, 1152696, 1136067,\n", + " 1139933, 1138151, 1134881, 1146075, 1140557, 1152044, 1142290, 1137728,\n", + " 1134750, 1135549, 1141088, 1141098, 1162958, 1149000, 1149003, 1143767,\n", + " 1137297, 1143221, 1137670, 1139025, 1139032, 1139033, 1140003, 1149979,\n", + " 1149982, 1146834, 1146847, 1142511, 1141690, 1135861, 1136637, 1141224,\n", + " 1136917, 1139730, 1143675, 1143677, 1145065, 1141786, 1139495, 1134979,\n", + " 1137074, 1141821, 1143167, 1140163, 1139188, 1141475, 1138719, 1144598,\n", + " 1148263, 1136864, 1141579, 1135322, 1135327, 1150906, 1161095, 1146201,\n", + " 1137374, 1138539, 1137852, 1137854, 1147153, 1136376, 1136378, 1142646,\n", + " 1142650, 1141365, 1151112, 1141678, 1139022, 1144279, 1139510, 1139769,\n", + " 1139661, 1140976, 1140983, 1140990, 1143692, 1147050, 1152976, 1141925,\n", + " 1146898, 1144242, 1137149, 1139398, 1143643, 1141382, 1141390, 1145978,\n", + " 1145983, 1145974, 1143845, 1136277, 1146019, 1146024, 1142533, 1149933,\n", + " 1139990, 1143294, 1147540, 1148763, 1147282, 1149162, 1140341, 1142628,\n", + " 1139417, 1139418, 1138923, 1136836, 1139328, 1141490, 1141496, 1138234,\n", + " 1143345, 1144766, 1144753, 1144615, 1145808, 1145816, 1150294, 1150299,\n", + " 1146523, 1143954, 1138018, 1143456, 1140492, 1142000, 1143937, 1143799,\n", + " 1140364, 1137990, 1143080, 1143082, 1168921, 1148969, 1147996, 1147999,\n", + " 1134902, 1134907, 1147131, 1145466, 1148704, 1148468, 1143432, 1139549,\n", + " 1158226, 1143921, 1154526, 1145240, 1145751, 1146159, 1146178, 1148215,\n", + " 1148223, 1148217, 1152530, 1152537, 1150445, 1148940, 1148826, 1149777,\n", + " 1144514, 1145833, 1144203, 1151994, 1151997, 1151480, 1152017, 1152022,\n", + " 1154271, 1154263, 1151041, 1149534, 1147019, 1147021, 1147023, 1153963,\n", + " 1158950, 1141949, 1150736, 1153574, 1151717, 1148608, 1151412, 1154420,\n", + " 1148188, 1139718, 1146676, 1152481, 1138404, 1146544, 1146559, 1149810,\n", + " 1151937, 1143895, 1148204, 1148206, 1153182, 1154203, 1141732, 1154168,\n", + " 1153188, 1145104, 1145111, 1152969, 1148057, 1154962, 1152866, 1144849,\n", + " 1150356, 1148084, 1141016, 1147446, 1151821, 1135307, 1135310, 1150715,\n", + " 1141420, 1151352, 1147737, 1145086, 1148949, 1146969, 1156413, 1149359,\n", + " 1150219, 1146623, 1142982, 1144476, 1146280, 1151729, 1153037, 1137746,\n", + " 1152622, 1155146, 1149203, 1149205, 1155337, 1154119, 1154120, 1154123,\n", + " 1157826, 1154633, 1151573, 1151617, 1151629, 1136788, 1152957, 1145930,\n", + " 1152903, 1151311, 1159699, 1152341, 1146816, 1153302, 1153311, 1146704,\n", + " 1136028, 1136031, 1158704, 1156621, 1151188, 1151064, 1150164, 1142257,\n", + " 1148040, 1154462, 1149300, 1155218, 1160866, 1149794, 1148628, 1158530,\n", + " 1137458, 1142041, 1142047, 1157466, 1157225, 1135434, 1158916, 1154929,\n", + " 1156505, 1157064, 1152833, 1145191, 1145196, 1145187, 1145192, 1137808,\n", + " 1135730, 1152182, 1135634, 1151467, 1158306, 1158308, 1155441, 1153354,\n", + " 1153359, 1150130, 1150131, 1150132, 1150136, 1140868, 1154529, 1154530,\n", + " 1150488, 1157637, 1151379, 1137905, 1156649, 1155122, 1152527, 1157183,\n", + " 1149519, 1153482, 1151424, 1156463, 1154763, 1155628, 1155630, 1154547,\n", + " 1154557, 1154555, 1136466, 1158824, 1158325, 1157000, 1148654, 1143263,\n", + " 1154652, 1162393, 1154250, 1154084, 1154902, 1143189, 1157439, 1155613,\n", + " 1141620, 1150981, 1150987, 1155293, 1143517, 1159618, 1160460, 1158126,\n", + " 1156764, 1158996, 1159001, 1153776, 1185749, 1137381, 1159116, 1177757,\n", + " 1145690, 1140923, 1140914, 1135601, 1145515, 1148148, 1150661, 1158502,\n", + " 1155843, 1158669, 1138215, 1157684, 1152209, 1140370, 1140380, 1157038,\n", + " 1144843, 1142469, 1155975, 1149702, 1154592, 1160163, 1153503, 1185567,\n", + " 1173677, 1140221, 1158815, 1156774, 1156778, 1158285, 1136494, 1156495,\n", + " 1136640, 1140049, 1166429, 1158558, 1153827, 1163814, 1159936, 1138110,\n", + " 1158007, 1155521, 1161539, 1142666, 1157747, 1167359, 1159070, 1165830,\n", + " 1153052, 1153045, 1171551, 1162845, 1155772, 1142878, 1138393, 1150046,\n", + " 1155479, 1151014, 1153519, 1142406, 1138161, 1164006, 1156787, 1149956,\n", + " 1149963, 1139281, 1156983, 1148771, 1146063, 1164055, 1169493, 1140653,\n", + " 1141863, 1148600, 1148603, 1164990, 1168170, 1156352, 1156358, 1141792,\n", + " 1158653, 1159032, 1169104, 1169108, 1166731, 1160600, 1160605, 1146510,\n", + " 1153239, 1167999, 1161240, 1144739, 1144747, 1163527, 1162580, 1153209,\n", + " 1141471, 1151650, 1147426, 1156739, 1157958, 1153663, 1167373, 1161015,\n", + " 1150648, 1163260, 1144812, 1164741, 1148683, 1145228, 1169282, 1147677,\n", + " 1163517, 1144973, 1160720, 1169239, 1145902, 1171570, 1152203, 1143402,\n", + " 1143404, 1149557, 1166661, 1147336, 1147339, 1147338, 1145677, 1192410,\n", + " 1179488, 1145502, 1169298, 1155172, 1165011, 1150518, 1156119, 1145531,\n", + " 1144336, 1147746, 1154670, 1169162, 1169157, 1157331, 1138142, 1154364,\n", + " 1149446, 1147491, 1138609, 1158611, 1158623, 1158060, 1172867, 1157384,\n", + " 1155494, 1160536, 1152354, 1165524, 1168050, 1149402, 1148667, 1182114,\n", + " 1173307, 1169144, 1153755, 1153754, 1167857, 1178422, 1151696, 1157158,\n", + " 1147708, 1147711, 1151850, 1169687, 1135021, 1167712, 1172961, 1181020,\n", + " 1168817, 1146755, 1140326, 1166684, 1170874, 1182131, 1154148, 1149173,\n", + " 1178610, 1186117, 1143279, 1167658, 1143410, 1179243, 1171297, 1153803,\n", + " 1153141, 1164818, 1166554, 1161255, 1162129, 1157792, 1171623, 1155804,\n", + " 1187257, 1158249, 1158253, 1153898, 1145626, 1178776, 1165230, 1170069,\n", + " 1158512, 1158370, 1155892, 1180849, 1179924, 1168273, 1180168, 1169062,\n", + " 1168886, 1160078, 1163422, 1163421, 1164339, 1187176, 1165443, 1146169,\n", + " 1141516, 1172608, 1189414, 1167670, 1184050, 1139828, 1139831, 1150265,\n", + " 1154812, 1163848, 1156055, 1181888, 1172696, 1192884, 1140992, 1140996,\n", + " 1181695, 1159169, 1169786, 1190741, 1178630, 1177617, 1153592, 1181845,\n", + " 1180997, 1180999, 1158070, 1166788, 1180266, 1179738, 1155959, 1194241,\n", + " 1178453, 1182681, 1191422, 1192156, 1172896, 1185356, 1176970, 1192931,\n", + " 1192375, 1191151, 1193834, 1157017, 1161940], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141439, 1136228, 1136238, 1136347, 1135920, 1135926, 1135165, 1135716,\n", + " 1135727, 1141758, 1138335, 1136969, 1141443, 1149826, 1139811, 1145373,\n", + " 1145984, 1137271, 1138938, 1139141, 1143372, 1139241, 1146647, 1139615,\n", + " 1139608, 1142963, 1149216, 1149228, 1143820, 1144637, 1146667, 1136125,\n", + " 1153220, 1141904, 1141911, 1155014, 1155018, 1139365, 1139371, 1152427,\n", + " 1136270, 1140537, 1140540, 1138112, 1137254, 1137180, 1137181, 1140029,\n", + " 1140953, 1135367, 1135202, 1134960, 1141036, 1134794, 1138508, 1137329,\n", + " 1136178, 1137693, 1139215, 1144395, 1136826, 1137441, 1136199, 1136928,\n", + " 1135265, 1156159, 1139161, 1134841, 1141702, 1135579, 1135668, 1156342,\n", + " 1153098, 1137957, 1156965, 1135490, 1135499, 1156899, 1135522, 1138305,\n", + " 1138436, 1138440, 1138461, 1137489, 1157189, 1136594, 1158390, 1149328,\n", + " 1138844, 1138846, 1135088, 1156603, 1156602, 1156606, 1142611, 1135359,\n", + " 1158984, 1148531, 1148533, 1150956, 1137109, 1135760, 1139846, 1136457,\n", + " 1139667, 1142249, 1136081, 1134992, 1142434, 1142786, 1136548, 1152654,\n", + " 1135782, 1142906, 1159019, 1143631, 1143625, 1140034, 1152696, 1136067,\n", + " 1139933, 1138151, 1134881, 1146075, 1140557, 1152044, 1142290, 1137728,\n", + " 1134750, 1135549, 1141088, 1141098, 1162958, 1149000, 1149003, 1143767,\n", + " 1137297, 1143221, 1137670, 1139025, 1139032, 1139033, 1140003, 1149979,\n", + " 1149982, 1146834, 1146847, 1142511, 1141690, 1135861, 1136637, 1141224,\n", + " 1136917, 1139730, 1143675, 1143677, 1145065, 1141786, 1139495, 1134979,\n", + " 1137074, 1141821, 1143167, 1140163, 1139188, 1141475, 1138719, 1144598,\n", + " 1148263, 1136864, 1141579, 1135322, 1135327, 1150906, 1161095, 1146201,\n", + " 1137374, 1138539, 1137852, 1137854, 1147153, 1136376, 1136378, 1142646,\n", + " 1142650, 1141365, 1151112, 1141678, 1139022, 1144279, 1139510, 1139769,\n", + " 1139661, 1140976, 1140983, 1140990, 1143692, 1147050, 1152976, 1141925,\n", + " 1146898, 1144242, 1137149, 1139398, 1143643, 1141382, 1141390, 1145978,\n", + " 1145983, 1145974, 1143845, 1136277, 1146019, 1146024, 1142533, 1149933,\n", + " 1139990, 1143294, 1147540, 1148763, 1147282, 1149162, 1140341, 1142628,\n", + " 1139417, 1139418, 1138923, 1136836, 1139328, 1141490, 1141496, 1138234,\n", + " 1143345, 1144766, 1144753, 1144615, 1145808, 1145816, 1150294, 1150299,\n", + " 1146523, 1143954, 1138018, 1143456, 1140492, 1142000, 1143937, 1143799,\n", + " 1140364, 1137990, 1143080, 1143082, 1168921, 1148969, 1147996, 1147999,\n", + " 1134902, 1134907, 1147131, 1145466, 1148704, 1148468, 1143432, 1139549,\n", + " 1158226, 1143921, 1154526, 1145240, 1145751, 1146159, 1146178, 1148215,\n", + " 1148223, 1148217, 1152530, 1152537, 1150445, 1148940, 1148826, 1149777,\n", + " 1144514, 1145833, 1144203, 1151994, 1151997, 1151480, 1152017, 1152022,\n", + " 1154271, 1154263, 1151041, 1149534, 1147019, 1147021, 1147023, 1153963,\n", + " 1158950, 1141949, 1150736, 1153574, 1151717, 1148608, 1151412, 1154420,\n", + " 1148188, 1139718, 1146676, 1152481, 1138404, 1146544, 1146559, 1149810,\n", + " 1151937, 1143895, 1148204, 1148206, 1153182, 1154203, 1141732, 1154168,\n", + " 1153188, 1145104, 1145111, 1152969, 1148057, 1154962, 1152866, 1144849,\n", + " 1150356, 1148084, 1141016, 1147446, 1151821, 1135307, 1135310, 1150715,\n", + " 1141420, 1151352, 1147737, 1145086, 1148949, 1146969, 1156413, 1149359,\n", + " 1150219, 1146623, 1142982, 1144476, 1146280, 1151729, 1153037, 1137746,\n", + " 1152622, 1155146, 1149203, 1149205, 1155337, 1154119, 1154120, 1154123,\n", + " 1157826, 1154633, 1151573, 1151617, 1151629, 1136788, 1152957, 1145930,\n", + " 1152903, 1151311, 1159699, 1152341, 1146816, 1153302, 1153311, 1146704,\n", + " 1136028, 1136031, 1158704, 1156621, 1151188, 1151064, 1150164, 1142257,\n", + " 1148040, 1154462, 1149300, 1155218, 1160866, 1149794, 1148628, 1158530,\n", + " 1137458, 1142041, 1142047, 1157466, 1157225, 1135434, 1158916, 1154929,\n", + " 1156505, 1157064, 1152833, 1145191, 1145196, 1145187, 1145192, 1137808,\n", + " 1135730, 1152182, 1135634, 1151467, 1158306, 1158308, 1155441, 1153354,\n", + " 1153359, 1150130, 1150131, 1150132, 1150136, 1140868, 1154529, 1154530,\n", + " 1150488, 1157637, 1151379, 1137905, 1156649, 1155122, 1152527, 1157183,\n", + " 1149519, 1153482, 1151424, 1156463, 1154763, 1155628, 1155630, 1154547,\n", + " 1154557, 1154555, 1136466, 1158824, 1158325, 1157000, 1148654, 1143263,\n", + " 1154652, 1162393, 1154250, 1154084, 1154902, 1143189, 1157439, 1155613,\n", + " 1141620, 1150981, 1150987, 1155293, 1143517, 1159618, 1160460, 1158126,\n", + " 1156764, 1158996, 1159001, 1153776, 1185749, 1137381, 1159116, 1177757,\n", + " 1145690, 1140923, 1140914, 1135601, 1145515, 1148148, 1150661, 1158502,\n", + " 1155843, 1158669, 1138215, 1157684, 1152209, 1140370, 1140380, 1157038,\n", + " 1144843, 1142469, 1155975, 1149702, 1154592, 1160163, 1153503, 1185567,\n", + " 1173677, 1140221, 1158815, 1156774, 1156778, 1158285, 1136494, 1156495,\n", + " 1136640, 1140049, 1166429, 1158558, 1153827, 1163814, 1159936, 1138110,\n", + " 1158007, 1155521, 1161539, 1142666, 1157747, 1167359, 1159070, 1165830,\n", + " 1153052, 1153045, 1171551, 1162845, 1155772, 1142878, 1138393, 1150046,\n", + " 1155479, 1151014, 1153519, 1142406, 1138161, 1164006, 1156787, 1149956,\n", + " 1149963, 1139281, 1156983, 1148771, 1146063, 1164055, 1169493, 1140653,\n", + " 1141863, 1148600, 1148603, 1164990, 1168170, 1156352, 1156358, 1141792,\n", + " 1158653, 1159032, 1169104, 1169108, 1166731, 1160600, 1160605, 1146510,\n", + " 1153239, 1167999, 1161240, 1144739, 1144747, 1163527, 1162580, 1153209,\n", + " 1141471, 1151650, 1147426, 1156739, 1157958, 1153663, 1167373, 1161015,\n", + " 1150648, 1163260, 1144812, 1164741, 1148683, 1145228, 1169282, 1147677,\n", + " 1163517, 1144973, 1160720, 1169239, 1145902, 1171570, 1152203, 1143402,\n", + " 1143404, 1149557, 1166661, 1147336, 1147339, 1147338, 1145677, 1192410,\n", + " 1179488, 1145502, 1169298, 1155172, 1165011, 1150518, 1156119, 1145531,\n", + " 1144336, 1147746, 1154670, 1169162, 1169157, 1157331, 1138142, 1154364,\n", + " 1149446, 1147491, 1138609, 1158611, 1158623, 1158060, 1172867, 1157384,\n", + " 1155494, 1160536, 1152354, 1165524, 1168050, 1149402, 1148667, 1182114,\n", + " 1173307, 1169144, 1153755, 1153754, 1167857, 1178422, 1151696, 1157158,\n", + " 1147708, 1147711, 1151850, 1169687, 1135021, 1167712, 1172961, 1181020,\n", + " 1168817, 1146755, 1140326, 1166684, 1170874, 1182131, 1154148, 1149173,\n", + " 1178610, 1186117, 1143279, 1167658, 1143410, 1179243, 1171297, 1153803,\n", + " 1153141, 1164818, 1166554, 1161255, 1162129, 1157792, 1171623, 1155804,\n", + " 1187257, 1158249, 1158253, 1153898, 1145626, 1178776, 1165230, 1170069,\n", + " 1158512, 1158370, 1155892, 1180849, 1179924, 1168273, 1180168, 1169062,\n", + " 1168886, 1160078, 1163422, 1163421, 1164339, 1187176, 1165443, 1146169,\n", + " 1141516, 1172608, 1189414, 1167670, 1184050, 1139828, 1139831, 1150265,\n", + " 1154812, 1163848, 1156055, 1181888, 1172696, 1192884, 1140992, 1140996,\n", + " 1181695, 1159169, 1169786, 1190741, 1178630, 1177617, 1153592, 1181845,\n", + " 1180997, 1180999, 1158070, 1166788, 1180266, 1179738, 1155959, 1194241,\n", + " 1178453, 1182681, 1191422, 1192156, 1172896, 1185356, 1176970, 1192931,\n", + " 1192375, 1191151, 1193834, 1157017, 1161940], device='cuda:0',\n", + " dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195202, 1196013, 1195334, 1198730, 1201094, 1199282, 1202255, 1201582,\n", + " 1194626, 1199248, 1201018, 1197351, 1198624, 1198694, 1196871, 1194771,\n", + " 1194783, 1194648, 1195511, 1195514, 1195263, 1199135, 1196534, 1201992,\n", + " 1201427, 1198095, 1195462, 1194882, 1195888, 1197856, 1196359, 1196840,\n", + " 1198668, 1195989, 1197792, 1198958, 1199810, 1195148, 1195270, 1195278,\n", + " 1197141, 1196242, 1197367, 1196109, 1196747, 1195850, 1195541, 1199315,\n", + " 1197474, 1199998, 1197640, 1195918, 1196283, 1195351, 1200959, 1199060,\n", + " 1194928, 1197583, 1199628, 1199803, 1197990, 1200869, 1199038, 1198400,\n", + " 1198410, 1194786, 1194795, 1197601, 1196727, 1195773, 1198428, 1200018,\n", + " 1195557, 1198811, 1201534, 1200562, 1195592, 1198075, 1198593, 1201073,\n", + " 1202630, 1199712, 1201045, 1201041, 1200429, 1197095, 1202542, 1199879,\n", + " 1202129, 1201442, 1202239, 1200831, 1200899, 1202338, 1199976, 1202175,\n", + " 1195886, 1201291, 1195607, 1201871, 1200398, 1196966, 1200784, 1199606,\n", + " 1198514, 1203112, 1195676, 1195664, 1202444, 1195421, 1197822, 1197495,\n", + " 1196401, 1196414, 1202269, 1201138, 1197735, 1199786, 1199239, 1195070,\n", + " 1200296], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195202, 1196013, 1195334, 1198730, 1201094, 1199282, 1202255, 1201582,\n", + " 1194626, 1199248, 1201018, 1197351, 1198624, 1198694, 1196871, 1194771,\n", + " 1194783, 1194648, 1195511, 1195514, 1195263, 1199135, 1196534, 1201992,\n", + " 1201427, 1198095, 1195462, 1194882, 1195888, 1197856, 1196359, 1196840,\n", + " 1198668, 1195989, 1197792, 1198958, 1199810, 1195148, 1195270, 1195278,\n", + " 1197141, 1196242, 1197367, 1196109, 1196747, 1195850, 1195541, 1199315,\n", + " 1197474, 1199998, 1197640, 1195918, 1196283, 1195351, 1200959, 1199060,\n", + " 1194928, 1197583, 1199628, 1199803, 1197990, 1200869, 1199038, 1198400,\n", + " 1198410, 1194786, 1194795, 1197601, 1196727, 1195773, 1198428, 1200018,\n", + " 1195557, 1198811, 1201534, 1200562, 1195592, 1198075, 1198593, 1201073,\n", + " 1202630, 1199712, 1201045, 1201041, 1200429, 1197095, 1202542, 1199879,\n", + " 1202129, 1201442, 1202239, 1200831, 1200899, 1202338, 1199976, 1202175,\n", + " 1195886, 1201291, 1195607, 1201871, 1200398, 1196966, 1200784, 1199606,\n", + " 1198514, 1203112, 1195676, 1195664, 1202444, 1195421, 1197822, 1197495,\n", + " 1196401, 1196414, 1202269, 1201138, 1197735, 1199786, 1199239, 1195070,\n", + " 1200296], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 2.2494e-01, -4.5831e-04, 6.9167e-01, ..., 3.5388e-02,\n", + " -1.5813e-03, -6.3550e-03],\n", + " [ 1.7107e-01, -3.7412e-04, 5.8608e-01, ..., 8.1137e-02,\n", + " -1.9950e-03, -5.6650e-03],\n", + " [ 7.9507e-02, 3.5976e-02, 3.1636e-01, ..., 1.0047e-01,\n", + " -1.8538e-03, -3.3111e-03],\n", + " ...,\n", + " [ 8.9036e-02, 6.2271e-03, 4.4660e-01, ..., 8.1944e-02,\n", + " -1.6788e-03, -3.9159e-03],\n", + " [ 2.2494e-01, -4.5831e-04, 6.9167e-01, ..., 3.5388e-02,\n", + " -1.5813e-03, -6.3550e-03],\n", + " [ 2.0175e-01, -2.5799e-04, 6.9888e-01, ..., 6.1692e-02,\n", + " -1.8868e-03, -6.1680e-03]], device='cuda:0'), 'paper': tensor([[-1.0387e-02, 1.3343e+00, 1.3938e+00, ..., 2.2010e+00,\n", + " -3.6062e-02, 1.6627e+00],\n", + " [-1.8378e-02, 7.6057e-01, 1.3901e+00, ..., 2.1897e+00,\n", + " -4.3179e-02, 1.1994e+00],\n", + " [-9.2840e-03, -6.6540e-04, 3.6847e-01, ..., -8.1117e-03,\n", + " -1.1523e-02, -1.0201e-02],\n", + " ...,\n", + " [-7.3474e-03, 1.9820e-01, 2.1896e-01, ..., -1.1084e-02,\n", + " -1.1200e-02, -7.7463e-03],\n", + " [-1.5971e-02, -9.3665e-03, 1.0387e+00, ..., -2.0010e-02,\n", + " -1.8071e-02, -1.9762e-02],\n", + " [-1.8057e-02, 1.8975e+00, 5.9566e-01, ..., 4.2242e+00,\n", + " -4.6930e-02, 2.2974e+00]], device='cuda:0'), 'author': tensor([[-1.9318e-03, -7.0221e-04, 9.0617e-02, ..., 6.4472e-01,\n", + " 6.3339e-01, -1.6793e-04],\n", + " [-1.7207e-03, -1.6533e-03, 1.8539e-01, ..., 7.2686e-01,\n", + " 7.5413e-01, -2.0585e-04],\n", + " [-2.1009e-03, -1.3006e-03, 1.4123e-01, ..., 7.0209e-01,\n", + " 6.9457e-01, -3.0774e-04],\n", + " ...,\n", + " [-2.6196e-03, 3.5211e-02, 9.8183e-03, ..., 7.2821e-01,\n", + " 5.7123e-01, -9.7058e-04],\n", + " [-4.7962e-03, 2.2185e-01, 9.2733e-02, ..., 6.4598e-01,\n", + " 2.4881e-01, -4.6014e-03],\n", + " [-2.4578e-03, -1.7490e-04, 1.1293e-01, ..., 6.7122e-01,\n", + " 5.8866e-01, -8.8825e-04]], device='cuda:0'), 'field_of_study': tensor([[-3.6099e-03, 2.7991e-01, 6.4195e-03, ..., -5.5819e-03,\n", + " 1.5498e-01, 2.7605e-01],\n", + " [-2.9144e-03, 3.5008e-01, 7.1206e-02, ..., -4.0857e-03,\n", + " 1.0100e-01, 2.7946e-01],\n", + " [-3.8821e-03, 4.6168e-01, 1.7196e-01, ..., -5.1690e-03,\n", + " 1.7738e-01, 3.3038e-01],\n", + " ...,\n", + " [-2.1487e-03, 2.9274e-01, 3.4694e-02, ..., -6.4994e-03,\n", + " 1.9610e-01, 1.5080e-01],\n", + " [-1.9693e-03, 2.1946e-01, 1.1300e-03, ..., -7.3527e-03,\n", + " 1.5577e-01, 1.2224e-01],\n", + " [-1.2510e-04, 4.1452e-01, 1.0106e-01, ..., -7.5323e-03,\n", + " 1.7143e-01, -1.4161e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 28, 111, 111, 179, 39, 39, 492, 221, 355, 355, 341, 341,\n", + " 403, 403, 626, 648, 393, 339, 698, 1043, 982, 750, 723, 1115,\n", + " 806, 806, 962, 1006, 985, 859, 923, 923, 1331, 1228, 1331, 1409,\n", + " 1194, 1386, 1413, 1349, 1349, 1372, 1768, 1708, 1657, 1565, 1627, 1591,\n", + " 1381, 1463, 1809, 1619, 1836, 1684, 1959, 1929, 1959, 1959, 1957, 2207,\n", + " 2057, 2173, 2207, 2207, 2207, 2134, 2134, 2295, 2363, 2363, 2363, 2486,\n", + " 2404, 2363, 2363, 2582, 2611, 2850, 2869, 2869, 2798, 2971, 3005, 3195,\n", + " 3009, 3090, 3189, 3387, 3387, 3164, 3259, 3344, 3429, 3423, 3423, 3538,\n", + " 3538, 3551, 3577, 3646, 3514, 3514, 3766, 3713, 3794, 4063, 4063, 4054,\n", + " 4073, 4316, 4316, 4316, 4316, 4154, 4304, 4412, 4366, 4430, 4448, 4584,\n", + " 4638, 4657, 4740, 4835, 5214, 5220, 5220, 4951, 4995, 5072, 5291, 5212,\n", + " 5066, 5342, 5196, 5254, 5306, 5478, 5389, 5389, 5451, 5505, 5922, 5683,\n", + " 5683, 5683, 5796, 5796, 6184, 5947, 6039, 6333, 6226, 6226, 6226, 5998,\n", + " 5998, 5998, 6696, 6639, 6639, 6362, 6362, 6480, 6480, 6681, 6666, 6478,\n", + " 6478, 6713, 6709, 6709, 6709, 6291, 6291, 6291, 6478, 6478, 6647],\n", + " [ 107, 103, 65, 1, 57, 61, 80, 83, 19, 69, 112, 11,\n", + " 20, 102, 86, 49, 2, 99, 68, 10, 89, 112, 112, 29,\n", + " 68, 7, 43, 107, 50, 18, 88, 84, 78, 9, 97, 52,\n", + " 20, 19, 45, 104, 34, 51, 68, 20, 35, 43, 42, 28,\n", + " 77, 40, 19, 24, 83, 68, 66, 95, 5, 93, 19, 47,\n", + " 83, 56, 22, 37, 27, 23, 94, 87, 55, 36, 5, 12,\n", + " 44, 38, 96, 82, 110, 19, 76, 2, 92, 91, 6, 101,\n", + " 100, 16, 17, 90, 15, 20, 116, 72, 114, 83, 62, 105,\n", + " 28, 19, 42, 120, 71, 30, 54, 70, 64, 46, 97, 43,\n", + " 31, 20, 51, 48, 79, 81, 28, 75, 83, 2, 53, 99,\n", + " 68, 8, 68, 58, 26, 2, 108, 41, 63, 117, 117, 6,\n", + " 67, 33, 68, 68, 25, 106, 68, 59, 4, 98, 52, 14,\n", + " 74, 68, 68, 115, 6, 5, 113, 118, 119, 73, 68, 113,\n", + " 13, 85, 109, 3, 68, 21, 68, 68, 7, 68, 115, 117,\n", + " 54, 5, 68, 89, 60, 68, 32, 0, 39, 111, 5]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1296, 2933, 2190, ..., 2584, 5357, 1042],\n", + " [ 84, 24, 52, ..., 5984, 5994, 5985]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 67, 24, 4, ..., 83, 6, 29],\n", + " [ 67, 49, 25, ..., 6535, 6612, 6455]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 84, 84, 84, ..., 6036, 6000, 6027],\n", + " [ 453, 213, 218, ..., 578, 378, 657]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 260, 478, 503, ..., 240, 232, 390],\n", + " [ 30, 53, 250, ..., 5924, 6015, 6024]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2712, 130, 3171, ..., 2676, 4710, 3399],\n", + " [ 98, 167, 17, ..., 6627, 6636, 6658]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 84, 84, 84, ..., 6051, 6036, 6017],\n", + " [1296, 2729, 3321, ..., 114, 2747, 4562]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 152, 152, 152, ..., 6681, 6713, 6713],\n", + " [2320, 1296, 1534, ..., 2467, 5291, 5759]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006602\n", + "sampling 0.006447\n", + "noi time: 0.001916\n", + "get_vertex_data call: 0.037872\n", + "noi group time: 0.003278\n", + "eoi_group_time: 0.01468\n", + "second half: 0.22817\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 31145, 21459, ..., 1123985, 1119687, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 31145, 21459, ..., 1123985, 1119687, 1100728],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1203800, 1228168, 1232115, ..., 1929219, 1930675, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1203800, 1228168, 1232115, ..., 1929219, 1930675, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1137429, 1137204, 1141424, 1136228, 1140282, 1136345, 1135926,\n", + " 1137791, 1140785, 1141756, 1141758, 1141251, 1140297, 1142514, 1136969,\n", + " 1138897, 1149834, 1149836, 1145373, 1138942, 1139241, 1146640, 1146647,\n", + " 1139603, 1142966, 1139866, 1149216, 1142958, 1143820, 1149644, 1147483,\n", + " 1147486, 1142881, 1144636, 1146660, 1146661, 1152666, 1152667, 1138345,\n", + " 1147094, 1139373, 1136685, 1150329, 1134715, 1134806, 1138745, 1140540,\n", + " 1138356, 1151534, 1140149, 1140954, 1135367, 1135202, 1136037, 1141036,\n", + " 1136770, 1134794, 1157443, 1138510, 1137329, 1136178, 1143069, 1157088,\n", + " 1137693, 1144789, 1139215, 1137529, 1137534, 1157395, 1157399, 1157400,\n", + " 1152376, 1137441, 1156159, 1148495, 1148484, 1139161, 1135579, 1135583,\n", + " 1141084, 1136101, 1135664, 1140970, 1140707, 1140712, 1138514, 1153094,\n", + " 1153099, 1154132, 1137008, 1156899, 1139684, 1139685, 1137287, 1138440,\n", + " 1138461, 1138462, 1157190, 1137924, 1156606, 1147112, 1142611, 1138185,\n", + " 1158984, 1145842, 1148531, 1148543, 1137423, 1139849, 1139667, 1139668,\n", + " 1138067, 1134992, 1142788, 1136551, 1152651, 1135786, 1141064, 1141070,\n", + " 1144410, 1153543, 1153544, 1153547, 1139929, 1138646, 1138147, 1155660,\n", + " 1141997, 1152042, 1152044, 1137728, 1137731, 1147317, 1137005, 1135549,\n", + " 1141097, 1141098, 1144128, 1145357, 1142021, 1143224, 1143225, 1140003,\n", + " 1146834, 1152709, 1154467, 1161175, 1141891, 1141902, 1139386, 1136917,\n", + " 1139730, 1143673, 1143676, 1140598, 1141161, 1146462, 1141785, 1141786,\n", + " 1139495, 1136752, 1141609, 1144650, 1159607, 1134986, 1164812, 1137074,\n", + " 1144428, 1138488, 1141821, 1143203, 1149111, 1142713, 1139190, 1138710,\n", + " 1138708, 1140110, 1142917, 1142913, 1137661, 1149772, 1144596, 1136864,\n", + " 1141570, 1141582, 1141398, 1140442, 1144182, 1150910, 1146201, 1137841,\n", + " 1147153, 1141365, 1141664, 1138292, 1144286, 1144279, 1153557, 1143915,\n", + " 1139508, 1139510, 1139769, 1139127, 1145000, 1139171, 1140976, 1140990,\n", + " 1141565, 1147050, 1147047, 1145873, 1152976, 1138992, 1141925, 1144242,\n", + " 1145332, 1141841, 1150696, 1148310, 1140700, 1136885, 1145980, 1143845,\n", + " 1146024, 1138085, 1146140, 1141585, 1149928, 1139990, 1146302, 1143293,\n", + " 1143294, 1151124, 1151125, 1151132, 1150417, 1147541, 1147540, 1148763,\n", + " 1147282, 1147290, 1142816, 1149155, 1142630, 1149365, 1147372, 1148003,\n", + " 1143051, 1136160, 1136167, 1136171, 1144921, 1138922, 1138923, 1138927,\n", + " 1157726, 1136836, 1138229, 1136445, 1142126, 1143345, 1144619, 1144615,\n", + " 1145813, 1140844, 1144083, 1135876, 1150755, 1135813, 1150294, 1144375,\n", + " 1146514, 1146520, 1143957, 1138018, 1143456, 1143470, 1137703, 1140483,\n", + " 1142015, 1143949, 1146590, 1147578, 1147574, 1155700, 1143798, 1146636,\n", + " 1140364, 1149569, 1149572, 1137990, 1143082, 1144725, 1147999, 1146949,\n", + " 1134899, 1139252, 1139249, 1147131, 1148704, 1146745, 1147056, 1147070,\n", + " 1143839, 1147253, 1145011, 1158226, 1158228, 1141137, 1154526, 1145240,\n", + " 1145751, 1148387, 1146178, 1151242, 1148223, 1152530, 1152538, 1151179,\n", + " 1150437, 1150445, 1149258, 1148940, 1148825, 1156468, 1156473, 1149791,\n", + " 1144514, 1144526, 1150350, 1144203, 1151994, 1147807, 1151487, 1152022,\n", + " 1152023, 1134869, 1134873, 1147021, 1147009, 1141949, 1137641, 1143564,\n", + " 1149412, 1148288, 1152068, 1147866, 1154420, 1148180, 1151363, 1136252,\n", + " 1146686, 1138404, 1141182, 1157968, 1151567, 1148720, 1171341, 1144110,\n", + " 1151948, 1166304, 1148204, 1154203, 1154196, 1141740, 1154166, 1153124,\n", + " 1153192, 1148051, 1152866, 1152867, 1152878, 1144853, 1150356, 1155089,\n", + " 1155091, 1143133, 1147442, 1152581, 1135311, 1151908, 1148510, 1146571,\n", + " 1141420, 1152784, 1147737, 1153447, 1149386, 1146975, 1156402, 1150210,\n", + " 1167285, 1146623, 1151691, 1144477, 1152856, 1152097, 1152106, 1146280,\n", + " 1146287, 1153038, 1137746, 1152622, 1140521, 1136410, 1154123, 1157826,\n", + " 1152673, 1154633, 1151617, 1150578, 1150586, 1136785, 1145952, 1138979,\n", + " 1138989, 1138991, 1152903, 1151298, 1152341, 1146816, 1153311, 1138281,\n", + " 1157144, 1156001, 1136028, 1158704, 1152928, 1151064, 1151067, 1156387,\n", + " 1154733, 1154734, 1142777, 1137392, 1160559, 1150164, 1149265, 1149273,\n", + " 1148033, 1148040, 1155202, 1161215, 1154454, 1155226, 1148628, 1158530,\n", + " 1158540, 1148255, 1156064, 1153085, 1154377, 1143451, 1157547, 1142387,\n", + " 1158860, 1156505, 1157058, 1157069, 1155408, 1155412, 1155422, 1152833,\n", + " 1145187, 1137809, 1157558, 1150465, 1135222, 1145387, 1135730, 1152179,\n", + " 1156629, 1135645, 1158308, 1151340, 1155441, 1153359, 1150132, 1153999,\n", + " 1142755, 1142756, 1142765, 1156207, 1156205, 1138775, 1151379, 1155122,\n", + " 1149324, 1151431, 1135398, 1146920, 1156452, 1156463, 1155628, 1156563,\n", + " 1156569, 1155572, 1158566, 1158824, 1148839, 1148834, 1155646, 1153368,\n", + " 1153363, 1153375, 1143263, 1154644, 1160110, 1137359, 1143189, 1150371,\n", + " 1153322, 1144712, 1150805, 1150987, 1157928, 1157933, 1137152, 1158996,\n", + " 1140924, 1134677, 1134674, 1135601, 1135605, 1145515, 1155852, 1157685,\n", + " 1149145, 1159258, 1156085, 1152220, 1155884, 1157033, 1144843, 1144845,\n", + " 1155971, 1155975, 1159957, 1142074, 1135190, 1154600, 1154601, 1159452,\n", + " 1136896, 1158436, 1155237, 1136491, 1156663, 1147586, 1155303, 1156490,\n", + " 1153808, 1136646, 1140049, 1157864, 1142184, 1158545, 1158558, 1153827,\n", + " 1156516, 1146126, 1154340, 1158006, 1168219, 1158256, 1161539, 1165840,\n", + " 1164276, 1142666, 1157747, 1157751, 1159042, 1158301, 1158303, 1157944,\n", + " 1160575, 1153047, 1153052, 1153045, 1162843, 1155769, 1163359, 1153842,\n", + " 1161316, 1163707, 1156107, 1138393, 1165244, 1162926, 1150046, 1149070,\n", + " 1145948, 1153514, 1153519, 1147307, 1147300, 1146876, 1138161, 1138165,\n", + " 1164006, 1156787, 1139593, 1139281, 1148029, 1156983, 1157235, 1157357,\n", + " 1159763, 1146063, 1171257, 1165309, 1140643, 1148600, 1148607, 1143139,\n", + " 1143143, 1155821, 1158653, 1156184, 1159025, 1159032, 1152247, 1160605,\n", + " 1155588, 1151227, 1163163, 1153921, 1153933, 1153934, 1168194, 1144989,\n", + " 1147836, 1167999, 1144739, 1163522, 1141465, 1147426, 1157045, 1149890,\n", + " 1156739, 1157963, 1190200, 1168748, 1168750, 1144812, 1135567, 1164741,\n", + " 1180505, 1180580, 1148675, 1145567, 1145228, 1169295, 1154700, 1166462,\n", + " 1147677, 1138762, 1144972, 1194509, 1148169, 1147694, 1165746, 1152624,\n", + " 1148118, 1139350, 1139351, 1147714, 1145900, 1145902, 1153534, 1151752,\n", + " 1163961, 1152203, 1143407, 1158724, 1158722, 1167503, 1154076, 1147328,\n", + " 1192293, 1167817, 1155170, 1150515, 1150522, 1150525, 1144346, 1144336,\n", + " 1157534, 1138376, 1147751, 1154670, 1135854, 1191396, 1157331, 1138129,\n", + " 1141043, 1151669, 1169359, 1154353, 1154364, 1149452, 1158623, 1173047,\n", + " 1149847, 1172067, 1152353, 1168369, 1165535, 1165533, 1172773, 1155931,\n", + " 1149402, 1172838, 1148325, 1171899, 1165913, 1172670, 1173307, 1152151,\n", + " 1151697, 1174106, 1157158, 1157153, 1168122, 1147711, 1178973, 1151850,\n", + " 1157592, 1157593, 1149247, 1170490, 1170697, 1155738, 1172234, 1177611,\n", + " 1140326, 1171614, 1179555, 1179556, 1150234, 1154151, 1154148, 1158187,\n", + " 1149169, 1149173, 1186117, 1143279, 1168481, 1143410, 1177659, 1171297,\n", + " 1179918, 1181581, 1180822, 1179727, 1172309, 1178926, 1161255, 1176525,\n", + " 1159909, 1175258, 1155116, 1172034, 1171623, 1157078, 1187526, 1180083,\n", + " 1158249, 1153898, 1145626, 1156446, 1172028, 1178757, 1179451, 1161911,\n", + " 1183754, 1149755, 1152274, 1157770, 1157771, 1177837, 1158512, 1158524,\n", + " 1158374, 1158379, 1155890, 1155892, 1155899, 1185514, 1140399, 1162253,\n", + " 1179091, 1166442, 1183481, 1163421, 1164339, 1181339, 1170802, 1147182,\n", + " 1156175, 1186893, 1167669, 1164133, 1168943, 1191536, 1156539, 1190725,\n", + " 1139828, 1139831, 1150265, 1150260, 1154806, 1149668, 1149669, 1149677,\n", + " 1151288, 1149628, 1156055, 1191993, 1189276, 1146392, 1188217, 1188025,\n", + " 1169959, 1169964, 1190246, 1140997, 1183048, 1191661, 1167840, 1151774,\n", + " 1193228, 1189402, 1183629, 1171118, 1182226, 1192666, 1153585, 1184760,\n", + " 1171201, 1178878, 1175349, 1150406, 1156672, 1172124, 1167739, 1178135,\n", + " 1184445, 1155958, 1155959, 1155553, 1191564, 1172896, 1182941, 1192382,\n", + " 1193912], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1137429, 1137204, 1141424, 1136228, 1140282, 1136345, 1135926,\n", + " 1137791, 1140785, 1141756, 1141758, 1141251, 1140297, 1142514, 1136969,\n", + " 1138897, 1149834, 1149836, 1145373, 1138942, 1139241, 1146640, 1146647,\n", + " 1139603, 1142966, 1139866, 1149216, 1142958, 1143820, 1149644, 1147483,\n", + " 1147486, 1142881, 1144636, 1146660, 1146661, 1152666, 1152667, 1138345,\n", + " 1147094, 1139373, 1136685, 1150329, 1134715, 1134806, 1138745, 1140540,\n", + " 1138356, 1151534, 1140149, 1140954, 1135367, 1135202, 1136037, 1141036,\n", + " 1136770, 1134794, 1157443, 1138510, 1137329, 1136178, 1143069, 1157088,\n", + " 1137693, 1144789, 1139215, 1137529, 1137534, 1157395, 1157399, 1157400,\n", + " 1152376, 1137441, 1156159, 1148495, 1148484, 1139161, 1135579, 1135583,\n", + " 1141084, 1136101, 1135664, 1140970, 1140707, 1140712, 1138514, 1153094,\n", + " 1153099, 1154132, 1137008, 1156899, 1139684, 1139685, 1137287, 1138440,\n", + " 1138461, 1138462, 1157190, 1137924, 1156606, 1147112, 1142611, 1138185,\n", + " 1158984, 1145842, 1148531, 1148543, 1137423, 1139849, 1139667, 1139668,\n", + " 1138067, 1134992, 1142788, 1136551, 1152651, 1135786, 1141064, 1141070,\n", + " 1144410, 1153543, 1153544, 1153547, 1139929, 1138646, 1138147, 1155660,\n", + " 1141997, 1152042, 1152044, 1137728, 1137731, 1147317, 1137005, 1135549,\n", + " 1141097, 1141098, 1144128, 1145357, 1142021, 1143224, 1143225, 1140003,\n", + " 1146834, 1152709, 1154467, 1161175, 1141891, 1141902, 1139386, 1136917,\n", + " 1139730, 1143673, 1143676, 1140598, 1141161, 1146462, 1141785, 1141786,\n", + " 1139495, 1136752, 1141609, 1144650, 1159607, 1134986, 1164812, 1137074,\n", + " 1144428, 1138488, 1141821, 1143203, 1149111, 1142713, 1139190, 1138710,\n", + " 1138708, 1140110, 1142917, 1142913, 1137661, 1149772, 1144596, 1136864,\n", + " 1141570, 1141582, 1141398, 1140442, 1144182, 1150910, 1146201, 1137841,\n", + " 1147153, 1141365, 1141664, 1138292, 1144286, 1144279, 1153557, 1143915,\n", + " 1139508, 1139510, 1139769, 1139127, 1145000, 1139171, 1140976, 1140990,\n", + " 1141565, 1147050, 1147047, 1145873, 1152976, 1138992, 1141925, 1144242,\n", + " 1145332, 1141841, 1150696, 1148310, 1140700, 1136885, 1145980, 1143845,\n", + " 1146024, 1138085, 1146140, 1141585, 1149928, 1139990, 1146302, 1143293,\n", + " 1143294, 1151124, 1151125, 1151132, 1150417, 1147541, 1147540, 1148763,\n", + " 1147282, 1147290, 1142816, 1149155, 1142630, 1149365, 1147372, 1148003,\n", + " 1143051, 1136160, 1136167, 1136171, 1144921, 1138922, 1138923, 1138927,\n", + " 1157726, 1136836, 1138229, 1136445, 1142126, 1143345, 1144619, 1144615,\n", + " 1145813, 1140844, 1144083, 1135876, 1150755, 1135813, 1150294, 1144375,\n", + " 1146514, 1146520, 1143957, 1138018, 1143456, 1143470, 1137703, 1140483,\n", + " 1142015, 1143949, 1146590, 1147578, 1147574, 1155700, 1143798, 1146636,\n", + " 1140364, 1149569, 1149572, 1137990, 1143082, 1144725, 1147999, 1146949,\n", + " 1134899, 1139252, 1139249, 1147131, 1148704, 1146745, 1147056, 1147070,\n", + " 1143839, 1147253, 1145011, 1158226, 1158228, 1141137, 1154526, 1145240,\n", + " 1145751, 1148387, 1146178, 1151242, 1148223, 1152530, 1152538, 1151179,\n", + " 1150437, 1150445, 1149258, 1148940, 1148825, 1156468, 1156473, 1149791,\n", + " 1144514, 1144526, 1150350, 1144203, 1151994, 1147807, 1151487, 1152022,\n", + " 1152023, 1134869, 1134873, 1147021, 1147009, 1141949, 1137641, 1143564,\n", + " 1149412, 1148288, 1152068, 1147866, 1154420, 1148180, 1151363, 1136252,\n", + " 1146686, 1138404, 1141182, 1157968, 1151567, 1148720, 1171341, 1144110,\n", + " 1151948, 1166304, 1148204, 1154203, 1154196, 1141740, 1154166, 1153124,\n", + " 1153192, 1148051, 1152866, 1152867, 1152878, 1144853, 1150356, 1155089,\n", + " 1155091, 1143133, 1147442, 1152581, 1135311, 1151908, 1148510, 1146571,\n", + " 1141420, 1152784, 1147737, 1153447, 1149386, 1146975, 1156402, 1150210,\n", + " 1167285, 1146623, 1151691, 1144477, 1152856, 1152097, 1152106, 1146280,\n", + " 1146287, 1153038, 1137746, 1152622, 1140521, 1136410, 1154123, 1157826,\n", + " 1152673, 1154633, 1151617, 1150578, 1150586, 1136785, 1145952, 1138979,\n", + " 1138989, 1138991, 1152903, 1151298, 1152341, 1146816, 1153311, 1138281,\n", + " 1157144, 1156001, 1136028, 1158704, 1152928, 1151064, 1151067, 1156387,\n", + " 1154733, 1154734, 1142777, 1137392, 1160559, 1150164, 1149265, 1149273,\n", + " 1148033, 1148040, 1155202, 1161215, 1154454, 1155226, 1148628, 1158530,\n", + " 1158540, 1148255, 1156064, 1153085, 1154377, 1143451, 1157547, 1142387,\n", + " 1158860, 1156505, 1157058, 1157069, 1155408, 1155412, 1155422, 1152833,\n", + " 1145187, 1137809, 1157558, 1150465, 1135222, 1145387, 1135730, 1152179,\n", + " 1156629, 1135645, 1158308, 1151340, 1155441, 1153359, 1150132, 1153999,\n", + " 1142755, 1142756, 1142765, 1156207, 1156205, 1138775, 1151379, 1155122,\n", + " 1149324, 1151431, 1135398, 1146920, 1156452, 1156463, 1155628, 1156563,\n", + " 1156569, 1155572, 1158566, 1158824, 1148839, 1148834, 1155646, 1153368,\n", + " 1153363, 1153375, 1143263, 1154644, 1160110, 1137359, 1143189, 1150371,\n", + " 1153322, 1144712, 1150805, 1150987, 1157928, 1157933, 1137152, 1158996,\n", + " 1140924, 1134677, 1134674, 1135601, 1135605, 1145515, 1155852, 1157685,\n", + " 1149145, 1159258, 1156085, 1152220, 1155884, 1157033, 1144843, 1144845,\n", + " 1155971, 1155975, 1159957, 1142074, 1135190, 1154600, 1154601, 1159452,\n", + " 1136896, 1158436, 1155237, 1136491, 1156663, 1147586, 1155303, 1156490,\n", + " 1153808, 1136646, 1140049, 1157864, 1142184, 1158545, 1158558, 1153827,\n", + " 1156516, 1146126, 1154340, 1158006, 1168219, 1158256, 1161539, 1165840,\n", + " 1164276, 1142666, 1157747, 1157751, 1159042, 1158301, 1158303, 1157944,\n", + " 1160575, 1153047, 1153052, 1153045, 1162843, 1155769, 1163359, 1153842,\n", + " 1161316, 1163707, 1156107, 1138393, 1165244, 1162926, 1150046, 1149070,\n", + " 1145948, 1153514, 1153519, 1147307, 1147300, 1146876, 1138161, 1138165,\n", + " 1164006, 1156787, 1139593, 1139281, 1148029, 1156983, 1157235, 1157357,\n", + " 1159763, 1146063, 1171257, 1165309, 1140643, 1148600, 1148607, 1143139,\n", + " 1143143, 1155821, 1158653, 1156184, 1159025, 1159032, 1152247, 1160605,\n", + " 1155588, 1151227, 1163163, 1153921, 1153933, 1153934, 1168194, 1144989,\n", + " 1147836, 1167999, 1144739, 1163522, 1141465, 1147426, 1157045, 1149890,\n", + " 1156739, 1157963, 1190200, 1168748, 1168750, 1144812, 1135567, 1164741,\n", + " 1180505, 1180580, 1148675, 1145567, 1145228, 1169295, 1154700, 1166462,\n", + " 1147677, 1138762, 1144972, 1194509, 1148169, 1147694, 1165746, 1152624,\n", + " 1148118, 1139350, 1139351, 1147714, 1145900, 1145902, 1153534, 1151752,\n", + " 1163961, 1152203, 1143407, 1158724, 1158722, 1167503, 1154076, 1147328,\n", + " 1192293, 1167817, 1155170, 1150515, 1150522, 1150525, 1144346, 1144336,\n", + " 1157534, 1138376, 1147751, 1154670, 1135854, 1191396, 1157331, 1138129,\n", + " 1141043, 1151669, 1169359, 1154353, 1154364, 1149452, 1158623, 1173047,\n", + " 1149847, 1172067, 1152353, 1168369, 1165535, 1165533, 1172773, 1155931,\n", + " 1149402, 1172838, 1148325, 1171899, 1165913, 1172670, 1173307, 1152151,\n", + " 1151697, 1174106, 1157158, 1157153, 1168122, 1147711, 1178973, 1151850,\n", + " 1157592, 1157593, 1149247, 1170490, 1170697, 1155738, 1172234, 1177611,\n", + " 1140326, 1171614, 1179555, 1179556, 1150234, 1154151, 1154148, 1158187,\n", + " 1149169, 1149173, 1186117, 1143279, 1168481, 1143410, 1177659, 1171297,\n", + " 1179918, 1181581, 1180822, 1179727, 1172309, 1178926, 1161255, 1176525,\n", + " 1159909, 1175258, 1155116, 1172034, 1171623, 1157078, 1187526, 1180083,\n", + " 1158249, 1153898, 1145626, 1156446, 1172028, 1178757, 1179451, 1161911,\n", + " 1183754, 1149755, 1152274, 1157770, 1157771, 1177837, 1158512, 1158524,\n", + " 1158374, 1158379, 1155890, 1155892, 1155899, 1185514, 1140399, 1162253,\n", + " 1179091, 1166442, 1183481, 1163421, 1164339, 1181339, 1170802, 1147182,\n", + " 1156175, 1186893, 1167669, 1164133, 1168943, 1191536, 1156539, 1190725,\n", + " 1139828, 1139831, 1150265, 1150260, 1154806, 1149668, 1149669, 1149677,\n", + " 1151288, 1149628, 1156055, 1191993, 1189276, 1146392, 1188217, 1188025,\n", + " 1169959, 1169964, 1190246, 1140997, 1183048, 1191661, 1167840, 1151774,\n", + " 1193228, 1189402, 1183629, 1171118, 1182226, 1192666, 1153585, 1184760,\n", + " 1171201, 1178878, 1175349, 1150406, 1156672, 1172124, 1167739, 1178135,\n", + " 1184445, 1155958, 1155959, 1155553, 1191564, 1172896, 1182941, 1192382,\n", + " 1193912], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1199424, 1199428, 1199439, 1197758, 1198242, 1197716, 1197719,\n", + " 1195860, 1199282, 1198459, 1202255, 1194626, 1197777, 1197791, 1201016,\n", + " 1201660, 1197359, 1198694, 1196871, 1198557, 1194866, 1198180, 1194783,\n", + " 1196624, 1196631, 1194655, 1195511, 1195514, 1198609, 1196539, 1201992,\n", + " 1198542, 1198543, 1197704, 1195459, 1194882, 1195888, 1199171, 1195740,\n", + " 1196977, 1194752, 1194766, 1198980, 1195313, 1196840, 1197803, 1195132,\n", + " 1195581, 1198958, 1199823, 1195265, 1195278, 1197273, 1195541, 1202916,\n", + " 1197191, 1200032, 1196393, 1195353, 1198279, 1200959, 1196851, 1195119,\n", + " 1199628, 1199804, 1197994, 1200872, 1201904, 1194786, 1200060, 1201511,\n", + " 1196498, 1196501, 1201117, 1196727, 1195773, 1198428, 1202995, 1199410,\n", + " 1203185, 1198811, 1198066, 1202630, 1200991, 1200918, 1194803, 1200360,\n", + " 1200526, 1202858, 1200546, 1200310, 1200429, 1199887, 1196889, 1199095,\n", + " 1199908, 1196775, 1201449, 1202239, 1200899, 1200907, 1201291, 1203329,\n", + " 1201590, 1196966, 1200784, 1200785, 1200793, 1194700, 1195676, 1195664,\n", + " 1198929, 1198932, 1195181, 1197821, 1196600, 1203102, 1198824, 1200437,\n", + " 1199782, 1198819, 1200974, 1195070, 1196421, 1203162, 1197872, 1198748],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1199424, 1199428, 1199439, 1197758, 1198242, 1197716, 1197719,\n", + " 1195860, 1199282, 1198459, 1202255, 1194626, 1197777, 1197791, 1201016,\n", + " 1201660, 1197359, 1198694, 1196871, 1198557, 1194866, 1198180, 1194783,\n", + " 1196624, 1196631, 1194655, 1195511, 1195514, 1198609, 1196539, 1201992,\n", + " 1198542, 1198543, 1197704, 1195459, 1194882, 1195888, 1199171, 1195740,\n", + " 1196977, 1194752, 1194766, 1198980, 1195313, 1196840, 1197803, 1195132,\n", + " 1195581, 1198958, 1199823, 1195265, 1195278, 1197273, 1195541, 1202916,\n", + " 1197191, 1200032, 1196393, 1195353, 1198279, 1200959, 1196851, 1195119,\n", + " 1199628, 1199804, 1197994, 1200872, 1201904, 1194786, 1200060, 1201511,\n", + " 1196498, 1196501, 1201117, 1196727, 1195773, 1198428, 1202995, 1199410,\n", + " 1203185, 1198811, 1198066, 1202630, 1200991, 1200918, 1194803, 1200360,\n", + " 1200526, 1202858, 1200546, 1200310, 1200429, 1199887, 1196889, 1199095,\n", + " 1199908, 1196775, 1201449, 1202239, 1200899, 1200907, 1201291, 1203329,\n", + " 1201590, 1196966, 1200784, 1200785, 1200793, 1194700, 1195676, 1195664,\n", + " 1198929, 1198932, 1195181, 1197821, 1196600, 1203102, 1198824, 1200437,\n", + " 1199782, 1198819, 1200974, 1195070, 1196421, 1203162, 1197872, 1198748],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 2.0295e-01, -2.6315e-04, 6.3367e-01, ..., 5.1249e-02,\n", + " -1.8191e-03, -5.7187e-03],\n", + " [ 1.1266e-01, 2.4195e-02, 4.5116e-01, ..., 5.7056e-02,\n", + " -1.5470e-03, -4.3078e-03],\n", + " [ 2.5245e-01, -6.6378e-04, 7.7956e-01, ..., 4.6005e-02,\n", + " -1.9151e-03, -6.9247e-03],\n", + " ...,\n", + " [ 1.6632e-01, -3.3568e-04, 5.7922e-01, ..., 9.4143e-02,\n", + " -2.0956e-03, -5.4649e-03],\n", + " [ 2.0342e-01, -5.7326e-04, 6.5979e-01, ..., 4.5699e-02,\n", + " -1.7539e-03, -6.1403e-03],\n", + " [ 1.0696e-01, 3.8411e-02, 4.6210e-01, ..., 7.1631e-02,\n", + " -1.7397e-03, -4.3519e-03]], device='cuda:0'), 'paper': tensor([[-0.0187, 0.6922, 1.2590, ..., 2.0749, -0.0419, 1.0072],\n", + " [-0.0222, -0.0076, 1.4989, ..., -0.0159, -0.0128, -0.0273],\n", + " [-0.0203, -0.0091, 1.4630, ..., -0.0197, -0.0154, -0.0239],\n", + " ...,\n", + " [-0.0256, -0.0100, 1.5064, ..., -0.0133, -0.0170, -0.0301],\n", + " [-0.0243, -0.0124, 1.7925, ..., -0.0130, -0.0158, -0.0305],\n", + " [-0.0188, 1.7446, 0.3345, ..., 4.0334, -0.0442, 1.9604]],\n", + " device='cuda:0'), 'author': tensor([[-1.7743e-03, -1.8002e-03, 1.9122e-01, ..., 7.7936e-01,\n", + " 8.1596e-01, 4.2624e-02],\n", + " [-1.6436e-03, -1.9656e-03, 1.3222e-01, ..., 6.4857e-01,\n", + " 6.9259e-01, 2.3386e-02],\n", + " [-4.4463e-03, 6.5022e-02, 1.2543e-01, ..., 7.4145e-01,\n", + " 3.6391e-01, -3.5120e-03],\n", + " ...,\n", + " [-3.4118e-03, 6.7390e-02, 2.0388e-02, ..., 6.3540e-01,\n", + " 3.5757e-01, -1.9072e-03],\n", + " [-1.4440e-03, -2.0262e-03, 1.4634e-01, ..., 6.4731e-01,\n", + " 9.1009e-01, 1.0062e-01],\n", + " [-1.8928e-03, -8.7878e-04, 1.1153e-01, ..., 6.3973e-01,\n", + " 7.0549e-01, -7.6176e-05]], device='cuda:0'), 'field_of_study': tensor([[-2.0392e-03, 2.0876e-01, -8.7024e-05, ..., -6.3489e-03,\n", + " 1.4347e-01, 8.9576e-02],\n", + " [-1.3809e-03, 4.4942e-01, 8.4324e-02, ..., -6.1562e-03,\n", + " 2.1437e-01, 1.0680e-01],\n", + " [-3.5327e-03, 4.6289e-01, 1.5611e-01, ..., -8.0183e-03,\n", + " 2.3045e-01, 3.8027e-01],\n", + " ...,\n", + " [-2.5163e-03, 3.3203e-01, 4.2283e-02, ..., -6.5240e-03,\n", + " 2.1152e-01, 2.6524e-01],\n", + " [-2.8512e-03, 2.7983e-01, 8.8488e-03, ..., -5.5271e-03,\n", + " 2.0392e-01, 1.2672e-01],\n", + " [-3.5931e-03, 2.4484e-01, -4.5189e-04, ..., -5.3625e-03,\n", + " 1.8108e-01, 1.5580e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 45, 110, 172, 25, 194, 185, 75, 75, 4, 4, 228, 422,\n", + " 410, 460, 384, 502, 502, 502, 318, 284, 284, 217, 654, 739,\n", + " 461, 656, 656, 931, 931, 1050, 785, 1050, 994, 975, 1150, 876,\n", + " 1312, 1286, 1331, 1331, 1331, 1448, 1436, 1436, 1312, 1310, 1310, 1436,\n", + " 1375, 1633, 1518, 1365, 1375, 1365, 1549, 1549, 1715, 1705, 1757, 1659,\n", + " 1757, 1757, 1764, 1740, 1780, 1781, 1903, 1823, 1853, 1595, 1859, 1836,\n", + " 1881, 2073, 2049, 1920, 2121, 2121, 2147, 2161, 2163, 2365, 2330, 2245,\n", + " 2423, 2290, 2290, 2438, 2453, 2595, 2595, 2637, 2721, 2998, 2713, 2839,\n", + " 3056, 3056, 2848, 3207, 3174, 3206, 3041, 3229, 3217, 3217, 3217, 3210,\n", + " 3149, 3308, 3308, 3308, 3290, 3316, 3327, 3547, 3595, 3801, 4018, 3645,\n", + " 3833, 3845, 3797, 4019, 3686, 3977, 3932, 4072, 4136, 4092, 4316, 4316,\n", + " 4316, 4316, 4328, 4417, 4666, 4733, 4542, 4542, 4670, 5085, 4987, 4764,\n", + " 4764, 4932, 5103, 5140, 5336, 5440, 5406, 5568, 5459, 5546, 5574, 5383,\n", + " 5383, 5730, 5566, 5366, 5465, 5465, 5465, 5465, 5842, 6013, 5830, 5830,\n", + " 6082, 6116, 6116, 5727, 6105, 6105, 6243, 6362, 5969, 6436, 6380, 6283,\n", + " 6323, 6427, 6427, 6461, 6080, 6080],\n", + " [ 109, 44, 16, 91, 100, 83, 18, 71, 0, 44, 32, 48,\n", + " 75, 125, 126, 66, 120, 107, 15, 74, 99, 81, 19, 64,\n", + " 109, 63, 68, 43, 95, 11, 22, 61, 70, 31, 127, 115,\n", + " 102, 59, 48, 43, 65, 71, 125, 4, 96, 88, 76, 25,\n", + " 6, 51, 7, 29, 56, 8, 71, 9, 25, 106, 75, 20,\n", + " 92, 84, 2, 64, 41, 71, 21, 12, 42, 105, 59, 93,\n", + " 124, 17, 111, 68, 26, 49, 3, 44, 117, 25, 118, 50,\n", + " 99, 48, 51, 97, 3, 5, 28, 82, 34, 99, 59, 3,\n", + " 77, 92, 71, 37, 113, 47, 24, 30, 28, 40, 10, 35,\n", + " 123, 60, 99, 79, 38, 55, 78, 94, 5, 54, 111, 50,\n", + " 88, 121, 114, 98, 123, 1, 30, 23, 78, 78, 80, 87,\n", + " 71, 28, 73, 67, 52, 28, 101, 64, 64, 46, 110, 71,\n", + " 89, 85, 122, 104, 116, 21, 113, 111, 119, 20, 81, 118,\n", + " 115, 53, 33, 75, 72, 69, 86, 14, 112, 13, 75, 106,\n", + " 39, 36, 75, 57, 126, 103, 53, 75, 35, 27, 105, 90,\n", + " 23, 45, 58, 62, 108, 117]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3345, 2900, 1812, ..., 3922, 5033, 6796],\n", + " [ 4, 190, 76, ..., 6951, 6887, 6812]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 3, 98, 79, 98, 79, 74, 59, 25, 117, 98, 79, 35,\n", + " 74, 99, 30, 99, 25, 3, 54, 44, 117, 3, 99, 99,\n", + " 25, 99, 117, 99, 44, 74, 74, 25, 28, 35, 98, 99,\n", + " 79, 99, 99, 59, 44, 28, 99, 3, 44, 44, 123, 123,\n", + " 59, 74, 123, 99, 35, 123, 3, 99, 44, 99, 30, 28,\n", + " 98, 44, 74, 113, 79, 25, 35, 117, 54, 79, 54, 74,\n", + " 54, 25, 59, 79, 54, 99, 20, 35, 74, 3, 79, 44,\n", + " 113, 117, 99, 3, 35, 99, 54, 123, 28, 25, 28, 54,\n", + " 59, 28, 20, 35, 59, 35, 117, 113, 59, 59, 59, 98,\n", + " 25, 99, 54, 30, 25, 28, 25, 3, 28, 117, 79, 98,\n", + " 59, 59, 123, 113, 98, 3, 117, 7, 117, 59, 113, 123,\n", + " 25, 30, 54, 20, 3, 99, 25, 7, 99, 35, 44, 113,\n", + " 25, 7, 35, 25, 74, 3, 35, 99, 44, 113, 30, 3,\n", + " 35, 98, 99, 54, 28, 28, 30, 117, 35, 54, 98, 20,\n", + " 117, 98, 59, 3, 7, 59, 30, 113, 35, 28, 79, 30,\n", + " 7, 59, 98, 113, 7, 28, 20, 79, 59, 20, 117, 79,\n", + " 98, 3, 98, 25, 98, 35, 113, 74, 28, 35, 44, 25,\n", + " 99, 59, 79, 113, 30, 35, 98, 3, 3, 25, 79, 54,\n", + " 117, 7, 113, 25, 117, 74, 98, 117, 30, 28, 79, 20,\n", + " 3, 98, 25, 59, 74, 7, 113, 79, 54, 7, 28, 74,\n", + " 7, 59, 117, 74, 59, 30, 117, 54, 20, 79, 99, 113,\n", + " 117, 20, 3, 44, 54, 74, 74, 7, 99, 99, 74, 74,\n", + " 98, 30, 98, 3, 25, 123, 79, 54, 98, 7, 74, 7,\n", + " 44, 99, 99, 99, 99, 28, 30, 74, 20, 7, 79, 3,\n", + " 54, 20, 99, 7, 117, 74, 20, 7, 3, 54, 20, 54,\n", + " 28, 54, 3, 117, 79, 79, 123, 99, 99, 99, 30, 99,\n", + " 28, 59, 98, 20, 54, 28, 30, 20, 3, 99, 79, 20,\n", + " 113, 113, 59, 99, 30, 99, 99, 54, 99, 74, 25, 117,\n", + " 35, 117, 44, 35, 113, 30, 113, 30, 35, 54, 99, 35,\n", + " 113, 79, 74, 7, 30, 113, 117, 123, 44, 7, 98, 35,\n", + " 20, 28, 28, 99, 7, 99, 20, 117, 99, 7, 123, 123,\n", + " 123, 123, 25, 123, 113, 20, 123, 3, 123, 28, 74, 44,\n", + " 99, 3, 59, 44, 98, 28, 99, 59, 30, 113, 25, 28,\n", + " 113, 28, 44, 20, 20, 99, 98, 99, 123, 44, 30, 30,\n", + " 30, 30, 7, 79, 44, 123, 123, 74, 59, 7, 54, 44,\n", + " 99, 25, 113, 35, 99, 123, 20, 20, 35, 123, 35, 99,\n", + " 54, 20, 113, 123, 44, 30, 7, 44, 7, 44, 123, 44,\n", + " 123, 79, 20, 25, 117, 7],\n", + " [ 40, 180, 94, 125, 20, 5, 211, 15, 111, 116, 6, 67,\n", + " 89, 150, 108, 24, 291, 152, 128, 261, 302, 362, 1031, 283,\n", + " 529, 238, 277, 412, 517, 418, 377, 395, 500, 609, 408, 777,\n", + " 706, 511, 385, 666, 775, 714, 518, 230, 571, 671, 661, 1126,\n", + " 445, 525, 607, 842, 772, 840, 768, 643, 1287, 884, 752, 877,\n", + " 977, 1026, 841, 1037, 1305, 1102, 1236, 1314, 1086, 1289, 1043, 1174,\n", + " 1270, 1008, 1666, 1254, 1405, 1104, 1357, 1051, 1232, 1392, 1346, 1222,\n", + " 1255, 1507, 1342, 1387, 1546, 1425, 1665, 1277, 1548, 1457, 1596, 1799,\n", + " 1602, 1814, 1709, 1440, 1679, 1949, 1807, 1804, 2027, 2033, 1893, 1987,\n", + " 2024, 1892, 2139, 2232, 2022, 2088, 2044, 2060, 2058, 2081, 2099, 2188,\n", + " 2176, 2326, 2254, 1978, 2236, 2140, 2163, 2092, 2233, 2156, 2261, 2381,\n", + " 2116, 2384, 2387, 2276, 2272, 2301, 2335, 2422, 2645, 2454, 2580, 2374,\n", + " 2505, 2562, 2529, 2398, 2462, 2479, 2720, 2555, 2592, 2598, 2516, 2579,\n", + " 2610, 2759, 2647, 2572, 2701, 2624, 2589, 2729, 2879, 2654, 2668, 2752,\n", + " 2683, 2674, 2643, 2785, 2670, 2754, 3191, 2907, 2773, 2957, 2817, 2991,\n", + " 2904, 2832, 2999, 2859, 2927, 2889, 2886, 3003, 2767, 2819, 2872, 2793,\n", + " 2928, 3097, 3001, 3139, 2984, 3058, 2954, 3007, 2934, 3123, 3096, 3208,\n", + " 3167, 3175, 3331, 3106, 3229, 3210, 3081, 3046, 3285, 3238, 3159, 3260,\n", + " 3115, 3181, 3263, 3387, 3292, 3293, 3265, 3408, 3463, 3353, 3418, 3488,\n", + " 3442, 3527, 3548, 3541, 3514, 3367, 3621, 3432, 3504, 3692, 3746, 3582,\n", + " 3963, 3491, 3592, 3701, 3993, 3891, 3534, 4050, 4000, 3949, 3959, 3931,\n", + " 3749, 3810, 3915, 3944, 4008, 4044, 4038, 4025, 4064, 4023, 4067, 4096,\n", + " 4019, 4009, 4070, 4106, 4066, 3925, 4109, 4097, 4101, 4059, 4125, 4100,\n", + " 4107, 4104, 4128, 4119, 4160, 4130, 4139, 4201, 4153, 4108, 4161, 4158,\n", + " 4127, 4179, 4176, 4252, 4147, 4168, 4208, 4210, 4262, 4170, 4248, 4222,\n", + " 4234, 4250, 4256, 4241, 4278, 4200, 4329, 4257, 4266, 4217, 4352, 4239,\n", + " 4314, 4310, 4244, 4398, 4442, 4448, 4671, 4296, 4312, 4540, 4626, 4561,\n", + " 4694, 4638, 4690, 4592, 4685, 4586, 4699, 4878, 4834, 4601, 4717, 4649,\n", + " 4512, 4700, 4797, 4899, 4675, 4698, 4787, 4740, 4848, 4840, 4902, 5053,\n", + " 4936, 5058, 5114, 5123, 4927, 4718, 5118, 4959, 5019, 5112, 5042, 4781,\n", + " 5167, 4997, 5150, 5126, 5163, 5087, 5156, 5031, 5138, 5239, 5107, 5176,\n", + " 5295, 5149, 5282, 5192, 5330, 5317, 5309, 5074, 5224, 5028, 5249, 5273,\n", + " 5190, 5244, 5235, 5221, 5640, 5281, 5307, 5315, 5608, 5583, 5449, 5536,\n", + " 5446, 5285, 5580, 5704, 5466, 5437, 5658, 5982, 5903, 5570, 5767, 5503,\n", + " 5702, 5479, 5555, 5790, 5367, 5813, 5941, 6034, 5762, 5664, 5833, 5587,\n", + " 5936, 5865, 6338, 5675, 5864, 5895, 5773, 5845, 5939, 5824, 6046, 6128,\n", + " 6202, 6256, 6014, 6443, 6147, 6163, 6379, 6274, 6188, 6200, 6378, 6165,\n", + " 6170, 6363, 6343, 6296, 6372, 6423]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 90, 90, 90, ..., 7022, 7022, 7014],\n", + " [ 523, 402, 587, ..., 300, 643, 826]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 806, 435, 610, ..., 74, 300, 610],\n", + " [ 81, 319, 111, ..., 6939, 6858, 6990]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2791, 335, 2734, ..., 5915, 5915, 6734],\n", + " [ 74, 68, 114, ..., 6438, 6428, 6391]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 72, 189, 189, ..., 7022, 6964, 6915],\n", + " [ 820, 3158, 3598, ..., 732, 3421, 441]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 4, 4, 4, ..., 6380, 6380, 6380],\n", + " [6839, 1736, 193, ..., 3235, 3510, 3883]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.004076\n", + "sampling 0.003994\n", + "noi time: 0.000784\n", + "get_vertex_data call: 0.014139\n", + "noi group time: 0.001846\n", + "eoi_group_time: 0.01088\n", + "second half: 0.113852\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16699, 1334, 16823, ..., 1120069, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16699, 1334, 16823, ..., 1120069, 1100728, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210828, 1224380, 1221051, ..., 1937995, 1925031, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210828, 1224380, 1221051, ..., 1937995, 1925031, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1137212, 1141424, ..., 1182299, 1187642, 1157017],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1137212, 1141424, ..., 1182299, 1187642, 1157017],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195697, 1199424, 1198723, 1199282, 1198449, 1198458, 1198844, 1199248,\n", + " 1201016, 1201660, 1197351, 1197359, 1198690, 1202804, 1197516, 1194770,\n", + " 1199053, 1196631, 1195507, 1195263, 1201992, 1198542, 1194882, 1195888,\n", + " 1199171, 1195740, 1196359, 1194752, 1195313, 1195147, 1195221, 1195279,\n", + " 1197140, 1196242, 1197367, 1194859, 1198212, 1196750, 1200037, 1200949,\n", + " 1200959, 1199059, 1197285, 1199185, 1194928, 1197676, 1197994, 1202457,\n", + " 1200872, 1199579, 1199229, 1199231, 1195014, 1199676, 1194786, 1201511,\n", + " 1201507, 1196498, 1196501, 1197970, 1195807, 1197601, 1196727, 1195771,\n", + " 1195773, 1200155, 1198811, 1201534, 1201547, 1201542, 1200570, 1200507,\n", + " 1198593, 1199445, 1201085, 1201156, 1202627, 1202630, 1200991, 1200918,\n", + " 1200553, 1197100, 1203183, 1197040, 1199908, 1196775, 1201442, 1196268,\n", + " 1199482, 1202338, 1202337, 1201291, 1203271, 1196761, 1201796, 1196966,\n", + " 1200784, 1200785, 1199606, 1200627, 1195664, 1198929, 1200684, 1195418,\n", + " 1202752, 1197821, 1196597, 1200585, 1196382, 1198147, 1197735, 1200465,\n", + " 1195066, 1201886, 1198140, 1197035, 1194908, 1203162, 1197872],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195697, 1199424, 1198723, 1199282, 1198449, 1198458, 1198844, 1199248,\n", + " 1201016, 1201660, 1197351, 1197359, 1198690, 1202804, 1197516, 1194770,\n", + " 1199053, 1196631, 1195507, 1195263, 1201992, 1198542, 1194882, 1195888,\n", + " 1199171, 1195740, 1196359, 1194752, 1195313, 1195147, 1195221, 1195279,\n", + " 1197140, 1196242, 1197367, 1194859, 1198212, 1196750, 1200037, 1200949,\n", + " 1200959, 1199059, 1197285, 1199185, 1194928, 1197676, 1197994, 1202457,\n", + " 1200872, 1199579, 1199229, 1199231, 1195014, 1199676, 1194786, 1201511,\n", + " 1201507, 1196498, 1196501, 1197970, 1195807, 1197601, 1196727, 1195771,\n", + " 1195773, 1200155, 1198811, 1201534, 1201547, 1201542, 1200570, 1200507,\n", + " 1198593, 1199445, 1201085, 1201156, 1202627, 1202630, 1200991, 1200918,\n", + " 1200553, 1197100, 1203183, 1197040, 1199908, 1196775, 1201442, 1196268,\n", + " 1199482, 1202338, 1202337, 1201291, 1203271, 1196761, 1201796, 1196966,\n", + " 1200784, 1200785, 1199606, 1200627, 1195664, 1198929, 1200684, 1195418,\n", + " 1202752, 1197821, 1196597, 1200585, 1196382, 1198147, 1197735, 1200465,\n", + " 1195066, 1201886, 1198140, 1197035, 1194908, 1203162, 1197872],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 2.2872e-01, -6.2360e-04, 7.0267e-01, ..., 4.4316e-02,\n", + " -1.7748e-03, -6.4731e-03],\n", + " [ 8.1752e-02, 2.9671e-02, 3.4708e-01, ..., 1.4076e-01,\n", + " -2.4979e-03, -4.0094e-03],\n", + " [ 1.5610e-01, 2.3447e-02, 4.7816e-01, ..., 7.1456e-02,\n", + " -1.8487e-03, -4.6857e-03],\n", + " ...,\n", + " [ 1.6609e-01, -4.4284e-04, 6.4073e-01, ..., 5.3189e-02,\n", + " -1.7556e-03, -5.8004e-03],\n", + " [ 2.3405e-01, -7.7036e-04, 8.4997e-01, ..., 5.4994e-02,\n", + " -1.7380e-03, -7.4031e-03],\n", + " [ 2.3463e-01, -5.6994e-04, 7.2862e-01, ..., 5.3963e-02,\n", + " -1.9683e-03, -6.5206e-03]], device='cuda:0'), 'paper': tensor([[ 1.2611e-01, -7.6916e-03, -2.0369e-03, ..., -2.3203e-02,\n", + " -1.6666e-02, -2.9090e-04],\n", + " [-2.7447e-02, -1.3676e-02, 2.0033e+00, ..., -1.8011e-02,\n", + " -1.6572e-02, -3.4931e-02],\n", + " [ 5.7035e-02, -2.3403e-03, -1.8145e-03, ..., -1.8643e-02,\n", + " -1.1463e-02, 1.0693e-01],\n", + " ...,\n", + " [-1.1697e-02, 1.1462e-01, 1.0396e+00, ..., -1.4720e-02,\n", + " -1.2087e-02, -1.4424e-02],\n", + " [-7.7897e-04, 7.0736e-01, 5.2195e-01, ..., -1.5994e-02,\n", + " -1.8100e-02, 5.8254e-01],\n", + " [-1.8142e-02, 1.8733e+00, 5.4024e-01, ..., 4.1841e+00,\n", + " -4.6371e-02, 2.2322e+00]], device='cuda:0'), 'author': tensor([[-3.8269e-04, 2.3317e-02, 1.1760e-01, ..., 1.3354e-01,\n", + " -7.1061e-06, -7.6010e-04],\n", + " [-4.1062e-03, 1.3863e-01, 1.4408e-01, ..., 6.2711e-01,\n", + " 2.1890e-01, -4.2324e-03],\n", + " [-3.3617e-03, 2.6208e-01, 1.6294e-01, ..., 5.1966e-01,\n", + " 1.0111e-01, -5.7125e-03],\n", + " ...,\n", + " [-1.5184e-03, -1.0536e-03, 1.1737e-01, ..., 7.1951e-01,\n", + " 7.6555e-01, 4.5749e-02],\n", + " [-1.8637e-03, -1.0838e-03, 1.1660e-01, ..., 7.6007e-01,\n", + " 7.1297e-01, 6.7313e-03],\n", + " [-1.8310e-03, -1.5223e-03, 1.6323e-01, ..., 7.2056e-01,\n", + " 7.5853e-01, 2.6599e-02]], device='cuda:0'), 'field_of_study': tensor([[-0.0030, 0.3022, 0.0153, ..., -0.0057, 0.2073, 0.1514],\n", + " [-0.0042, 0.4195, 0.0914, ..., -0.0063, 0.1367, 0.4013],\n", + " [-0.0038, 0.3277, 0.0031, ..., -0.0054, 0.2228, 0.2405],\n", + " ...,\n", + " [-0.0028, 0.3698, 0.0656, ..., -0.0063, 0.2259, 0.3022],\n", + " [-0.0025, 0.3456, 0.0665, ..., -0.0070, 0.2045, 0.2589],\n", + " [-0.0034, 0.3858, 0.0624, ..., -0.0058, 0.1522, 0.3371]],\n", + " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 200, 74, 74, 214, 26, 207, 144, 65, 65, 65, 65, 65,\n", + " 243, 243, 335, 442, 374, 374, 330, 612, 602, 602, 624, 624,\n", + " 624, 371, 620, 959, 812, 982, 1116, 955, 930, 929, 1039, 978,\n", + " 813, 813, 916, 915, 978, 1168, 1168, 1330, 1077, 1077, 1316, 1316,\n", + " 1333, 1361, 1361, 1427, 1525, 1361, 1361, 1654, 1409, 1675, 1623, 1653,\n", + " 1653, 1796, 1610, 1699, 1694, 1694, 1869, 1919, 2020, 2020, 1931, 1931,\n", + " 1776, 1776, 2003, 1906, 2198, 1918, 2218, 2218, 2197, 2282, 2130, 2334,\n", + " 2313, 2512, 2425, 2237, 2477, 2687, 2515, 2515, 2375, 2430, 2549, 2532,\n", + " 2532, 2530, 2608, 2768, 2634, 2855, 2699, 2749, 3156, 2975, 3158, 3157,\n", + " 3157, 3112, 3204, 3337, 3337, 3301, 3334, 3285, 3687, 3358, 3804, 3484,\n", + " 3727, 3740, 3860, 3894, 3959, 4148, 4288, 4229, 4052, 4052, 4334, 4490,\n", + " 4509, 4597, 4463, 4426, 4638, 4598, 4490, 4490, 4415, 4415, 4655, 4767,\n", + " 4771, 4861, 4835, 4968, 4858, 4858, 4864, 4864, 4914, 4914, 4943, 5110,\n", + " 5110, 5110, 5295, 5295, 5020, 5394, 5479, 5479, 5479, 5572, 5766, 5766,\n", + " 5607, 5803, 5803, 5803, 5715, 5804, 5692, 5773, 5750, 5616, 5606, 5646],\n", + " [ 20, 3, 75, 67, 3, 100, 5, 30, 39, 71, 29, 46,\n", + " 89, 43, 22, 40, 73, 32, 78, 96, 5, 26, 94, 104,\n", + " 69, 37, 113, 110, 44, 76, 25, 52, 10, 14, 16, 104,\n", + " 114, 7, 40, 75, 94, 108, 73, 3, 62, 86, 90, 23,\n", + " 114, 8, 111, 116, 16, 84, 50, 34, 95, 37, 85, 91,\n", + " 92, 62, 100, 68, 98, 15, 106, 68, 112, 61, 53, 17,\n", + " 114, 65, 17, 67, 6, 3, 109, 67, 118, 19, 107, 56,\n", + " 61, 88, 68, 74, 19, 55, 52, 16, 67, 33, 68, 19,\n", + " 60, 67, 68, 40, 38, 51, 16, 103, 27, 97, 114, 1,\n", + " 115, 62, 45, 79, 76, 44, 19, 63, 77, 24, 62, 19,\n", + " 13, 11, 3, 14, 19, 0, 21, 35, 20, 72, 65, 12,\n", + " 82, 109, 81, 42, 85, 3, 87, 116, 18, 9, 25, 2,\n", + " 62, 64, 19, 104, 66, 49, 3, 101, 57, 93, 99, 25,\n", + " 10, 54, 17, 98, 48, 106, 4, 28, 62, 59, 83, 19,\n", + " 105, 80, 55, 36, 117, 53, 102, 47, 41, 58, 31, 70]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3529, 3436, 3585, ..., 8337, 1042, 6002],\n", + " [ 95, 68, 328, ..., 8456, 8314, 8334]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 16, 11, 11, ..., 17, 3, 11],\n", + " [ 8, 212, 163, ..., 5907, 5897, 5901]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 184, 184, 18, ..., 8438, 8438, 8438],\n", + " [ 288, 268, 82, ..., 923, 951, 505]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 319, 721, 162, ..., 559, 652, 505],\n", + " [ 116, 108, 392, ..., 8389, 8436, 8362]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4103, 1114, 736, ..., 8419, 4858, 7008],\n", + " [ 30, 95, 139, ..., 5873, 5892, 5905]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 19, 19, 19, ..., 8305, 8305, 8305],\n", + " [1241, 1307, 1673, ..., 7596, 7444, 6636]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 49, 49, 49, ..., 5883, 5883, 5883],\n", + " [2203, 2877, 4568, ..., 7474, 3871, 3860]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006378\n", + "sampling 0.006219\n", + "noi time: 0.001813\n", + "get_vertex_data call: 0.036191\n", + "noi group time: 0.003575\n", + "eoi_group_time: 0.014924\n", + "second half: 0.228109\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31145, 24187, 21459, ..., 1100728, 1110069, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31145, 24187, 21459, ..., 1100728, 1110069, 1117253],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1221602, 1212853, 1231437, ..., 1935113, 1936992, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1221602, 1212853, 1231437, ..., 1935113, 1936992, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1135056, 1140285, 1135926, 1135160, 1135716, 1137784, 1140799, 1141758,\n", + " 1138335, 1136223, 1141263, 1140297, 1142327, 1136969, 1136971, 1141443,\n", + " 1151163, 1143615, 1137946, 1145989, 1137271, 1139241, 1139609, 1139615,\n", + " 1139957, 1150497, 1150506, 1149216, 1155683, 1155689, 1144636, 1144632,\n", + " 1146656, 1146661, 1148546, 1153231, 1141904, 1137220, 1155014, 1139365,\n", + " 1134806, 1138739, 1151545, 1140540, 1138112, 1137171, 1138354, 1140952,\n", + " 1140953, 1135367, 1135202, 1134969, 1141036, 1136768, 1134794, 1138504,\n", + " 1137342, 1137693, 1144786, 1139204, 1144395, 1137529, 1136712, 1157397,\n", + " 1143317, 1156147, 1156159, 1148484, 1139161, 1135583, 1141086, 1135670,\n", + " 1153099, 1138584, 1139684, 1139685, 1138436, 1138440, 1138445, 1138461,\n", + " 1138449, 1158390, 1149328, 1156603, 1156605, 1147112, 1142611, 1135618,\n", + " 1138185, 1145843, 1148531, 1137109, 1135769, 1141533, 1136457, 1139667,\n", + " 1134992, 1142434, 1136551, 1135781, 1139755, 1158974, 1139315, 1141065,\n", + " 1153543, 1153547, 1153548, 1141963, 1141967, 1134891, 1140557, 1152044,\n", + " 1142293, 1137734, 1134750, 1138240, 1141088, 1139889, 1141980, 1154855,\n", + " 1143706, 1143224, 1143225, 1139025, 1152709, 1135860, 1135862, 1154467,\n", + " 1142929, 1141229, 1139386, 1136917, 1137196, 1145066, 1140598, 1141600,\n", + " 1147844, 1137080, 1149425, 1142050, 1143158, 1145152, 1140173, 1140163,\n", + " 1158749, 1138471, 1142713, 1139188, 1139190, 1137237, 1141479, 1137062,\n", + " 1138709, 1140110, 1142913, 1143107, 1144596, 1142453, 1145298, 1140889,\n", + " 1141398, 1144182, 1150906, 1166711, 1137365, 1147153, 1136369, 1142646,\n", + " 1141365, 1141367, 1141375, 1153069, 1141664, 1144277, 1139508, 1139510,\n", + " 1139763, 1138803, 1138815, 1144998, 1140990, 1141560, 1147050, 1143543,\n", + " 1152976, 1152980, 1152982, 1135466, 1138992, 1141925, 1144242, 1136891,\n", + " 1134859, 1141389, 1146005, 1146024, 1141585, 1142533, 1141234, 1141236,\n", + " 1139990, 1147543, 1147548, 1148763, 1147282, 1142816, 1136330, 1142637,\n", + " 1138923, 1157720, 1165626, 1139328, 1139055, 1143345, 1144611, 1140844,\n", + " 1135872, 1135876, 1144310, 1146523, 1146524, 1143456, 1143937, 1143949,\n", + " 1140817, 1146580, 1146636, 1140364, 1143082, 1168914, 1144219, 1147984,\n", + " 1147995, 1147999, 1134902, 1139249, 1147131, 1145467, 1147244, 1148704,\n", + " 1141327, 1146749, 1152328, 1147025, 1147970, 1145017, 1139549, 1158226,\n", + " 1143921, 1154526, 1145237, 1145238, 1145751, 1146178, 1146188, 1148214,\n", + " 1152530, 1156468, 1149791, 1144519, 1150339, 1152013, 1144203, 1151994,\n", + " 1165260, 1147794, 1147799, 1147807, 1145261, 1146723, 1140566, 1150127,\n", + " 1147021, 1147023, 1150745, 1144819, 1148744, 1149991, 1147653, 1149412,\n", + " 1146401, 1148300, 1151412, 1154420, 1154424, 1158794, 1139721, 1146676,\n", + " 1157974, 1171943, 1141743, 1154166, 1153124, 1152915, 1150932, 1150356,\n", + " 1169594, 1155102, 1143121, 1147446, 1147442, 1151816, 1152581, 1150715,\n", + " 1141420, 1146967, 1146623, 1135686, 1154063, 1146280, 1146287, 1156321,\n", + " 1153039, 1150085, 1137746, 1146304, 1152622, 1149203, 1152826, 1155337,\n", + " 1152673, 1151617, 1150578, 1145278, 1136131, 1136134, 1148916, 1145952,\n", + " 1152903, 1146816, 1156826, 1156831, 1153311, 1145581, 1138281, 1152300,\n", + " 1136028, 1158704, 1151184, 1152928, 1155779, 1152888, 1150099, 1150164,\n", + " 1149273, 1153693, 1148033, 1148040, 1145656, 1137048, 1148628, 1158530,\n", + " 1158540, 1154377, 1135430, 1158854, 1157064, 1157069, 1155418, 1152841,\n", + " 1152833, 1145196, 1143491, 1150465, 1146858, 1152179, 1156940, 1147810,\n", + " 1157783, 1139529, 1158308, 1151340, 1155441, 1153359, 1150130, 1150132,\n", + " 1162114, 1154529, 1156913, 1142755, 1156207, 1151379, 1155122, 1152527,\n", + " 1135396, 1135405, 1154763, 1155626, 1155628, 1156563, 1155572, 1136466,\n", + " 1158566, 1158824, 1158325, 1148839, 1153364, 1161391, 1143263, 1146937,\n", + " 1154909, 1143189, 1150371, 1153322, 1155613, 1155281, 1143508, 1157933,\n", + " 1171832, 1158204, 1159119, 1138269, 1145682, 1166187, 1135601, 1148149,\n", + " 1158665, 1158670, 1138208, 1157684, 1152209, 1152220, 1167618, 1167625,\n", + " 1155975, 1161667, 1158841, 1158846, 1156804, 1156811, 1154600, 1166125,\n", + " 1136897, 1136899, 1136896, 1158760, 1140215, 1140221, 1158815, 1156778,\n", + " 1158286, 1151615, 1136480, 1136491, 1154392, 1156665, 1156657, 1147586,\n", + " 1153808, 1136640, 1136646, 1140053, 1142188, 1158558, 1153827, 1151144,\n", + " 1156516, 1146126, 1159943, 1142483, 1142487, 1135661, 1164273, 1142665,\n", + " 1156045, 1159052, 1158295, 1155194, 1157944, 1157945, 1157946, 1153052,\n", + " 1153045, 1184460, 1176071, 1153842, 1161316, 1138393, 1150033, 1150046,\n", + " 1138161, 1164006, 1149956, 1163407, 1163381, 1154590, 1166073, 1148771,\n", + " 1146063, 1162471, 1160178, 1165306, 1140134, 1140650, 1140643, 1148600,\n", + " 1148607, 1168092, 1163019, 1155816, 1141800, 1158643, 1156181, 1156184,\n", + " 1159025, 1159032, 1171373, 1162604, 1169105, 1169108, 1152247, 1143729,\n", + " 1166735, 1158902, 1155588, 1153924, 1158405, 1144977, 1147405, 1149015,\n", + " 1146500, 1153247, 1164580, 1144737, 1168067, 1147426, 1147427, 1157050,\n", + " 1156739, 1150646, 1144812, 1184420, 1162085, 1135553, 1135567, 1165718,\n", + " 1142733, 1144051, 1145729, 1145743, 1145728, 1165944, 1145567, 1154700,\n", + " 1166462, 1147675, 1138762, 1162293, 1162302, 1147694, 1152639, 1152624,\n", + " 1147723, 1147724, 1145900, 1145902, 1151752, 1152203, 1181052, 1158728,\n", + " 1154076, 1159268, 1154922, 1167817, 1167818, 1166645, 1149476, 1145320,\n", + " 1155172, 1154618, 1144346, 1157534, 1154670, 1168447, 1141051, 1151664,\n", + " 1169359, 1138609, 1158623, 1158062, 1173047, 1147423, 1152353, 1149402,\n", + " 1172833, 1148324, 1173307, 1154027, 1152152, 1159658, 1169583, 1157153,\n", + " 1157375, 1147711, 1151850, 1157593, 1140326, 1166682, 1171823, 1180133,\n", + " 1160315, 1154148, 1167531, 1167517, 1149169, 1172537, 1143279, 1168481,\n", + " 1176494, 1170179, 1153803, 1173957, 1185146, 1182651, 1179807, 1161262,\n", + " 1155262, 1177893, 1157792, 1143341, 1171623, 1163224, 1155804, 1178706,\n", + " 1153898, 1153899, 1178218, 1162403, 1145626, 1182624, 1179453, 1184245,\n", + " 1149755, 1146242, 1163053, 1157761, 1187090, 1158940, 1167646, 1158379,\n", + " 1182898, 1185282, 1189634, 1168282, 1166228, 1164231, 1165082, 1161819,\n", + " 1170802, 1181297, 1183008, 1190963, 1156528, 1139831, 1150265, 1190585,\n", + " 1156055, 1191130, 1146392, 1194023, 1149544, 1189630, 1174506, 1140993,\n", + " 1170207, 1194454, 1181413, 1179845, 1190113, 1181284, 1193208, 1171243,\n", + " 1192101, 1193232, 1152113, 1169781, 1162503, 1181824, 1177849, 1172122,\n", + " 1158064, 1186243, 1155962, 1165508, 1176840, 1192670, 1157022, 1161950],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1135056, 1140285, 1135926, 1135160, 1135716, 1137784, 1140799, 1141758,\n", + " 1138335, 1136223, 1141263, 1140297, 1142327, 1136969, 1136971, 1141443,\n", + " 1151163, 1143615, 1137946, 1145989, 1137271, 1139241, 1139609, 1139615,\n", + " 1139957, 1150497, 1150506, 1149216, 1155683, 1155689, 1144636, 1144632,\n", + " 1146656, 1146661, 1148546, 1153231, 1141904, 1137220, 1155014, 1139365,\n", + " 1134806, 1138739, 1151545, 1140540, 1138112, 1137171, 1138354, 1140952,\n", + " 1140953, 1135367, 1135202, 1134969, 1141036, 1136768, 1134794, 1138504,\n", + " 1137342, 1137693, 1144786, 1139204, 1144395, 1137529, 1136712, 1157397,\n", + " 1143317, 1156147, 1156159, 1148484, 1139161, 1135583, 1141086, 1135670,\n", + " 1153099, 1138584, 1139684, 1139685, 1138436, 1138440, 1138445, 1138461,\n", + " 1138449, 1158390, 1149328, 1156603, 1156605, 1147112, 1142611, 1135618,\n", + " 1138185, 1145843, 1148531, 1137109, 1135769, 1141533, 1136457, 1139667,\n", + " 1134992, 1142434, 1136551, 1135781, 1139755, 1158974, 1139315, 1141065,\n", + " 1153543, 1153547, 1153548, 1141963, 1141967, 1134891, 1140557, 1152044,\n", + " 1142293, 1137734, 1134750, 1138240, 1141088, 1139889, 1141980, 1154855,\n", + " 1143706, 1143224, 1143225, 1139025, 1152709, 1135860, 1135862, 1154467,\n", + " 1142929, 1141229, 1139386, 1136917, 1137196, 1145066, 1140598, 1141600,\n", + " 1147844, 1137080, 1149425, 1142050, 1143158, 1145152, 1140173, 1140163,\n", + " 1158749, 1138471, 1142713, 1139188, 1139190, 1137237, 1141479, 1137062,\n", + " 1138709, 1140110, 1142913, 1143107, 1144596, 1142453, 1145298, 1140889,\n", + " 1141398, 1144182, 1150906, 1166711, 1137365, 1147153, 1136369, 1142646,\n", + " 1141365, 1141367, 1141375, 1153069, 1141664, 1144277, 1139508, 1139510,\n", + " 1139763, 1138803, 1138815, 1144998, 1140990, 1141560, 1147050, 1143543,\n", + " 1152976, 1152980, 1152982, 1135466, 1138992, 1141925, 1144242, 1136891,\n", + " 1134859, 1141389, 1146005, 1146024, 1141585, 1142533, 1141234, 1141236,\n", + " 1139990, 1147543, 1147548, 1148763, 1147282, 1142816, 1136330, 1142637,\n", + " 1138923, 1157720, 1165626, 1139328, 1139055, 1143345, 1144611, 1140844,\n", + " 1135872, 1135876, 1144310, 1146523, 1146524, 1143456, 1143937, 1143949,\n", + " 1140817, 1146580, 1146636, 1140364, 1143082, 1168914, 1144219, 1147984,\n", + " 1147995, 1147999, 1134902, 1139249, 1147131, 1145467, 1147244, 1148704,\n", + " 1141327, 1146749, 1152328, 1147025, 1147970, 1145017, 1139549, 1158226,\n", + " 1143921, 1154526, 1145237, 1145238, 1145751, 1146178, 1146188, 1148214,\n", + " 1152530, 1156468, 1149791, 1144519, 1150339, 1152013, 1144203, 1151994,\n", + " 1165260, 1147794, 1147799, 1147807, 1145261, 1146723, 1140566, 1150127,\n", + " 1147021, 1147023, 1150745, 1144819, 1148744, 1149991, 1147653, 1149412,\n", + " 1146401, 1148300, 1151412, 1154420, 1154424, 1158794, 1139721, 1146676,\n", + " 1157974, 1171943, 1141743, 1154166, 1153124, 1152915, 1150932, 1150356,\n", + " 1169594, 1155102, 1143121, 1147446, 1147442, 1151816, 1152581, 1150715,\n", + " 1141420, 1146967, 1146623, 1135686, 1154063, 1146280, 1146287, 1156321,\n", + " 1153039, 1150085, 1137746, 1146304, 1152622, 1149203, 1152826, 1155337,\n", + " 1152673, 1151617, 1150578, 1145278, 1136131, 1136134, 1148916, 1145952,\n", + " 1152903, 1146816, 1156826, 1156831, 1153311, 1145581, 1138281, 1152300,\n", + " 1136028, 1158704, 1151184, 1152928, 1155779, 1152888, 1150099, 1150164,\n", + " 1149273, 1153693, 1148033, 1148040, 1145656, 1137048, 1148628, 1158530,\n", + " 1158540, 1154377, 1135430, 1158854, 1157064, 1157069, 1155418, 1152841,\n", + " 1152833, 1145196, 1143491, 1150465, 1146858, 1152179, 1156940, 1147810,\n", + " 1157783, 1139529, 1158308, 1151340, 1155441, 1153359, 1150130, 1150132,\n", + " 1162114, 1154529, 1156913, 1142755, 1156207, 1151379, 1155122, 1152527,\n", + " 1135396, 1135405, 1154763, 1155626, 1155628, 1156563, 1155572, 1136466,\n", + " 1158566, 1158824, 1158325, 1148839, 1153364, 1161391, 1143263, 1146937,\n", + " 1154909, 1143189, 1150371, 1153322, 1155613, 1155281, 1143508, 1157933,\n", + " 1171832, 1158204, 1159119, 1138269, 1145682, 1166187, 1135601, 1148149,\n", + " 1158665, 1158670, 1138208, 1157684, 1152209, 1152220, 1167618, 1167625,\n", + " 1155975, 1161667, 1158841, 1158846, 1156804, 1156811, 1154600, 1166125,\n", + " 1136897, 1136899, 1136896, 1158760, 1140215, 1140221, 1158815, 1156778,\n", + " 1158286, 1151615, 1136480, 1136491, 1154392, 1156665, 1156657, 1147586,\n", + " 1153808, 1136640, 1136646, 1140053, 1142188, 1158558, 1153827, 1151144,\n", + " 1156516, 1146126, 1159943, 1142483, 1142487, 1135661, 1164273, 1142665,\n", + " 1156045, 1159052, 1158295, 1155194, 1157944, 1157945, 1157946, 1153052,\n", + " 1153045, 1184460, 1176071, 1153842, 1161316, 1138393, 1150033, 1150046,\n", + " 1138161, 1164006, 1149956, 1163407, 1163381, 1154590, 1166073, 1148771,\n", + " 1146063, 1162471, 1160178, 1165306, 1140134, 1140650, 1140643, 1148600,\n", + " 1148607, 1168092, 1163019, 1155816, 1141800, 1158643, 1156181, 1156184,\n", + " 1159025, 1159032, 1171373, 1162604, 1169105, 1169108, 1152247, 1143729,\n", + " 1166735, 1158902, 1155588, 1153924, 1158405, 1144977, 1147405, 1149015,\n", + " 1146500, 1153247, 1164580, 1144737, 1168067, 1147426, 1147427, 1157050,\n", + " 1156739, 1150646, 1144812, 1184420, 1162085, 1135553, 1135567, 1165718,\n", + " 1142733, 1144051, 1145729, 1145743, 1145728, 1165944, 1145567, 1154700,\n", + " 1166462, 1147675, 1138762, 1162293, 1162302, 1147694, 1152639, 1152624,\n", + " 1147723, 1147724, 1145900, 1145902, 1151752, 1152203, 1181052, 1158728,\n", + " 1154076, 1159268, 1154922, 1167817, 1167818, 1166645, 1149476, 1145320,\n", + " 1155172, 1154618, 1144346, 1157534, 1154670, 1168447, 1141051, 1151664,\n", + " 1169359, 1138609, 1158623, 1158062, 1173047, 1147423, 1152353, 1149402,\n", + " 1172833, 1148324, 1173307, 1154027, 1152152, 1159658, 1169583, 1157153,\n", + " 1157375, 1147711, 1151850, 1157593, 1140326, 1166682, 1171823, 1180133,\n", + " 1160315, 1154148, 1167531, 1167517, 1149169, 1172537, 1143279, 1168481,\n", + " 1176494, 1170179, 1153803, 1173957, 1185146, 1182651, 1179807, 1161262,\n", + " 1155262, 1177893, 1157792, 1143341, 1171623, 1163224, 1155804, 1178706,\n", + " 1153898, 1153899, 1178218, 1162403, 1145626, 1182624, 1179453, 1184245,\n", + " 1149755, 1146242, 1163053, 1157761, 1187090, 1158940, 1167646, 1158379,\n", + " 1182898, 1185282, 1189634, 1168282, 1166228, 1164231, 1165082, 1161819,\n", + " 1170802, 1181297, 1183008, 1190963, 1156528, 1139831, 1150265, 1190585,\n", + " 1156055, 1191130, 1146392, 1194023, 1149544, 1189630, 1174506, 1140993,\n", + " 1170207, 1194454, 1181413, 1179845, 1190113, 1181284, 1193208, 1171243,\n", + " 1192101, 1193232, 1152113, 1169781, 1162503, 1181824, 1177849, 1172122,\n", + " 1158064, 1186243, 1155962, 1165508, 1176840, 1192670, 1157022, 1161950],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195202, 1198769, 1198730, 1199282, 1198449, 1202255, 1198844, 1201577,\n", + " 1201582, 1202119, 1194626, 1194635, 1200644, 1197777, 1201021, 1201660,\n", + " 1197359, 1198624, 1198633, 1196871, 1194770, 1194783, 1194648, 1195093,\n", + " 1195511, 1195263, 1196534, 1201992, 1196031, 1197697, 1195888, 1195895,\n", + " 1202902, 1196334, 1197856, 1196359, 1195325, 1198260, 1196711, 1195265,\n", + " 1195270, 1197136, 1195847, 1195038, 1199315, 1199317, 1197478, 1199344,\n", + " 1200037, 1198280, 1199329, 1199856, 1196851, 1194941, 1199628, 1201636,\n", + " 1199803, 1202457, 1200075, 1200079, 1200869, 1199152, 1199154, 1199038,\n", + " 1200747, 1199231, 1199745, 1199676, 1194786, 1200060, 1197601, 1197609,\n", + " 1196727, 1196734, 1200887, 1198416, 1200155, 1198811, 1201534, 1201824,\n", + " 1201827, 1198791, 1201156, 1200991, 1200918, 1199546, 1201052, 1202502,\n", + " 1202504, 1200546, 1200553, 1200555, 1200429, 1199211, 1200345, 1197095,\n", + " 1197097, 1200194, 1196256, 1202239, 1200899, 1202338, 1202175, 1201291,\n", + " 1195607, 1195611, 1202210, 1199927, 1196966, 1200784, 1200785, 1199606,\n", + " 1198518, 1195676, 1195679, 1200445, 1196929, 1198929, 1195181, 1197822,\n", + " 1201499, 1196601, 1199659, 1203102, 1198824, 1199782, 1198819, 1197593,\n", + " 1200466, 1195070, 1201886, 1197039, 1203162, 1196428, 1198748],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195202, 1198769, 1198730, 1199282, 1198449, 1202255, 1198844, 1201577,\n", + " 1201582, 1202119, 1194626, 1194635, 1200644, 1197777, 1201021, 1201660,\n", + " 1197359, 1198624, 1198633, 1196871, 1194770, 1194783, 1194648, 1195093,\n", + " 1195511, 1195263, 1196534, 1201992, 1196031, 1197697, 1195888, 1195895,\n", + " 1202902, 1196334, 1197856, 1196359, 1195325, 1198260, 1196711, 1195265,\n", + " 1195270, 1197136, 1195847, 1195038, 1199315, 1199317, 1197478, 1199344,\n", + " 1200037, 1198280, 1199329, 1199856, 1196851, 1194941, 1199628, 1201636,\n", + " 1199803, 1202457, 1200075, 1200079, 1200869, 1199152, 1199154, 1199038,\n", + " 1200747, 1199231, 1199745, 1199676, 1194786, 1200060, 1197601, 1197609,\n", + " 1196727, 1196734, 1200887, 1198416, 1200155, 1198811, 1201534, 1201824,\n", + " 1201827, 1198791, 1201156, 1200991, 1200918, 1199546, 1201052, 1202502,\n", + " 1202504, 1200546, 1200553, 1200555, 1200429, 1199211, 1200345, 1197095,\n", + " 1197097, 1200194, 1196256, 1202239, 1200899, 1202338, 1202175, 1201291,\n", + " 1195607, 1195611, 1202210, 1199927, 1196966, 1200784, 1200785, 1199606,\n", + " 1198518, 1195676, 1195679, 1200445, 1196929, 1198929, 1195181, 1197822,\n", + " 1201499, 1196601, 1199659, 1203102, 1198824, 1199782, 1198819, 1197593,\n", + " 1200466, 1195070, 1201886, 1197039, 1203162, 1196428, 1198748],\n", + " device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 2.3253e-01, -6.5351e-04, 7.3304e-01, ..., 4.9428e-02,\n", + " -1.9091e-03, -6.5881e-03],\n", + " [ 2.2072e-01, -6.3046e-04, 7.0285e-01, ..., 3.8759e-02,\n", + " -1.5769e-03, -6.2202e-03],\n", + " [ 1.8258e-01, 9.7474e-04, 7.5392e-01, ..., 4.3941e-02,\n", + " -1.7978e-03, -6.2586e-03],\n", + " ...,\n", + " [ 1.1577e-01, 2.0742e-02, 3.6352e-01, ..., 9.3612e-02,\n", + " -1.9375e-03, -3.8369e-03],\n", + " [ 1.7710e-01, -2.5514e-04, 6.0513e-01, ..., 7.3668e-02,\n", + " -1.9415e-03, -5.6564e-03],\n", + " [ 9.5569e-02, 3.3699e-02, 4.3957e-01, ..., 5.9256e-02,\n", + " -1.5008e-03, -3.8000e-03]], device='cuda:0'), 'paper': tensor([[-4.3500e-02, -3.1834e-02, 3.5000e+00, ..., -2.9644e-02,\n", + " -3.1351e-02, -5.4716e-02],\n", + " [-8.8109e-03, -4.6297e-03, 6.2154e-01, ..., -1.5045e-02,\n", + " -9.5360e-03, -9.4789e-03],\n", + " [-3.7319e-02, -2.0616e-02, 3.3802e+00, ..., -2.8059e-02,\n", + " -2.3124e-02, -4.5110e-02],\n", + " ...,\n", + " [-1.5067e-02, -2.9230e-03, 1.0464e+00, ..., -1.1238e-02,\n", + " -1.1447e-02, -1.8397e-02],\n", + " [-1.0911e-02, 7.5316e-01, -6.2091e-04, ..., 7.7234e-01,\n", + " -1.5461e-02, -6.7151e-03],\n", + " [-1.8205e-02, 1.8624e+00, 5.2749e-01, ..., 4.1719e+00,\n", + " -4.6287e-02, 2.1984e+00]], device='cuda:0'), 'author': tensor([[-1.5938e-03, -3.1882e-04, -3.7302e-04, ..., 7.3912e-01,\n", + " 6.9646e-01, 5.3718e-02],\n", + " [-1.0941e-03, -1.6240e-03, 1.1404e-01, ..., 6.9065e-01,\n", + " 8.8056e-01, 8.4835e-02],\n", + " [-3.2753e-03, 4.9383e-02, 1.5183e-01, ..., 7.0093e-01,\n", + " 4.0602e-01, -2.7610e-03],\n", + " ...,\n", + " [-1.7135e-03, -1.0271e-03, 9.3868e-02, ..., 6.5958e-01,\n", + " 7.0385e-01, 1.2832e-02],\n", + " [-2.5451e-03, -5.9128e-04, 1.4564e-01, ..., 6.9799e-01,\n", + " 6.3272e-01, -1.6333e-03],\n", + " [-1.3756e-03, -1.4232e-03, 1.1646e-01, ..., 7.2717e-01,\n", + " 8.9109e-01, 6.6553e-02]], device='cuda:0'), 'field_of_study': tensor([[-2.6721e-03, 4.5646e-01, 1.8547e-01, ..., -6.5252e-03,\n", + " 2.5230e-01, 2.5380e-01],\n", + " [ 5.0915e-02, 4.5538e-01, 8.5595e-02, ..., -6.6370e-03,\n", + " 1.9130e-01, -1.7312e-03],\n", + " [-4.3360e-03, 2.7340e-01, -1.1814e-03, ..., -3.0332e-03,\n", + " 1.0805e-01, 2.0243e-01],\n", + " ...,\n", + " [-3.6094e-03, 5.4250e-01, 1.7431e-01, ..., -7.3606e-03,\n", + " 2.4692e-01, 4.3915e-01],\n", + " [-6.9465e-04, 3.2833e-01, 7.5094e-02, ..., -7.0274e-03,\n", + " 1.9670e-01, -3.7031e-04],\n", + " [-2.1501e-03, 2.7483e-01, 2.3073e-02, ..., -6.4782e-03,\n", + " 1.5359e-01, 1.1379e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 133, 4, 121, 4, 4, 152, 75, 190, 23, 76, 453, 453,\n", + " 388, 388, 364, 342, 375, 375, 1004, 595, 881, 685, 851, 688,\n", + " 688, 688, 1008, 1024, 1078, 723, 723, 1176, 1176, 1613, 1208, 1258,\n", + " 1341, 1481, 1465, 1339, 1711, 1711, 1711, 1711, 1567, 1567, 1567, 1567,\n", + " 1811, 1744, 1744, 1880, 1836, 1789, 2144, 2144, 1837, 1837, 1792, 1805,\n", + " 1963, 1731, 1792, 1945, 1887, 2033, 2104, 2108, 2129, 2214, 2251, 2251,\n", + " 2209, 2156, 2156, 2153, 2153, 2496, 2418, 2418, 2418, 2418, 2413, 2666,\n", + " 2704, 2546, 2519, 2535, 2535, 2654, 2699, 2635, 2676, 2676, 2637, 3203,\n", + " 2830, 2723, 2890, 2874, 2874, 3055, 3055, 3202, 3144, 3144, 3312, 3212,\n", + " 3264, 3403, 3610, 3481, 3628, 3775, 3628, 3533, 3798, 3803, 3919, 4193,\n", + " 4249, 4222, 4276, 4276, 4276, 4357, 4332, 4420, 4448, 4496, 4496, 4683,\n", + " 4683, 4734, 4823, 4910, 4857, 5069, 4861, 4970, 5188, 5002, 5144, 5277,\n", + " 5277, 5277, 5277, 5277, 5277, 5193, 5271, 5247, 5211, 5364, 5268, 5287,\n", + " 5573, 5783, 5741, 5741, 5677, 5943, 5583, 6110, 6110, 5958, 5796, 5796,\n", + " 5803, 5803, 6480, 6480, 5893, 5893, 6280, 6109, 6109, 6109, 6109, 6068,\n", + " 6571, 6571, 6366, 6366, 5840, 6298, 6298, 6298, 6298, 6251, 6251, 6420,\n", + " 6494, 6494, 6268, 6268, 6279, 6253, 6253, 6280, 6598, 6515],\n", + " [ 87, 109, 60, 21, 28, 60, 67, 32, 21, 111, 77, 125,\n", + " 112, 58, 72, 68, 88, 14, 70, 54, 72, 117, 45, 51,\n", + " 130, 109, 22, 15, 115, 58, 112, 29, 128, 52, 54, 8,\n", + " 36, 66, 90, 66, 82, 92, 85, 35, 73, 96, 31, 10,\n", + " 77, 77, 130, 83, 94, 38, 50, 120, 57, 37, 58, 44,\n", + " 84, 96, 112, 101, 72, 25, 33, 49, 65, 113, 125, 94,\n", + " 23, 125, 77, 81, 106, 93, 134, 3, 95, 53, 131, 64,\n", + " 86, 47, 116, 45, 25, 30, 42, 56, 11, 72, 80, 97,\n", + " 27, 13, 107, 67, 133, 63, 10, 83, 60, 108, 18, 38,\n", + " 9, 59, 122, 132, 4, 111, 72, 72, 123, 98, 34, 71,\n", + " 132, 93, 94, 77, 125, 99, 26, 10, 112, 105, 61, 72,\n", + " 133, 2, 129, 60, 72, 6, 4, 86, 60, 55, 111, 77,\n", + " 89, 46, 20, 16, 75, 109, 79, 28, 17, 12, 9, 96,\n", + " 48, 8, 72, 119, 40, 0, 127, 62, 100, 102, 91, 7,\n", + " 103, 126, 5, 72, 78, 19, 72, 39, 72, 71, 13, 118,\n", + " 39, 72, 72, 43, 8, 43, 110, 104, 69, 24, 72, 124,\n", + " 41, 121, 72, 111, 74, 72, 114, 1, 67, 76]],\n", + " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2246, 663, 367, ..., 1890, 4160, 4738],\n", + " [ 5, 313, 39, ..., 6308, 6385, 6388]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 74, 125, 131, 125, 120, 50, 99, 72, 55, 131, 55, 55,\n", + " 125, 120, 120, 50, 132, 55, 72, 120, 72, 55, 74, 120,\n", + " 99, 55, 132, 131, 50, 132, 132, 120, 63, 50, 120, 131,\n", + " 131, 63, 66, 132, 132, 99, 132, 94, 45, 131, 66, 50,\n", + " 40, 40, 74, 45, 74, 72, 94, 74, 55, 63, 10, 120,\n", + " 50, 55, 99, 93, 66, 94, 74, 120, 10, 99, 55, 45,\n", + " 80, 132, 125, 10, 74, 125, 45, 80, 63, 120, 132, 66,\n", + " 94, 10, 74, 63, 45, 125, 94, 131, 99, 10, 50, 120,\n", + " 131, 94, 10, 80, 63, 40, 125, 94, 74, 120, 66, 66,\n", + " 74, 132, 120, 94, 120, 131, 50, 72, 74, 132, 80, 120,\n", + " 63, 63, 50, 55, 132, 50, 72, 45, 80, 93, 10, 120,\n", + " 74, 45, 131, 55, 99, 55, 63, 80, 50, 94, 94, 63,\n", + " 55, 94, 120, 55, 10, 132, 132, 94, 10, 74, 10, 72,\n", + " 63, 131, 74, 74, 131, 10, 50, 80, 66, 40, 131, 131,\n", + " 94, 55, 40, 45, 72, 131, 66, 94, 99, 99, 50, 50,\n", + " 132, 66, 55, 131, 131, 131, 99, 80, 63, 99, 80, 45,\n", + " 80, 120, 66, 74, 120, 66, 99, 99, 93, 93, 55, 63,\n", + " 93, 40, 120, 55, 66, 45, 72, 80, 74, 80, 94, 93,\n", + " 50, 66, 99, 45, 45, 10, 66, 55, 40, 45, 55, 40,\n", + " 40, 50, 63, 63, 45, 10, 93, 63, 125, 93, 80, 80,\n", + " 94, 63, 45, 10, 99, 99, 94, 99, 125, 66, 10, 93,\n", + " 50, 45, 45, 80, 63, 80, 40, 93, 66, 125, 99, 99,\n", + " 63, 99, 120, 50, 66, 99, 80, 93, 10, 93, 50, 131,\n", + " 80, 132, 99, 80, 93, 93, 10, 55, 50, 55, 99, 94,\n", + " 66, 55, 10, 72, 120, 66, 74, 131, 72, 40, 94, 80,\n", + " 10, 50, 125, 80, 45, 131, 40, 131, 94, 50, 131, 63,\n", + " 66, 125, 45, 66, 40, 45, 120, 72, 63, 72, 40, 40,\n", + " 93, 125, 99, 40, 45, 80, 125, 63, 63, 40, 120, 72,\n", + " 10, 72, 74, 10, 94, 94, 10, 80, 131, 72, 40, 66,\n", + " 72, 72, 40, 55, 132, 94, 94, 74, 45, 66, 72, 80,\n", + " 125, 94, 45, 50, 40, 132, 45, 74, 132, 72, 132, 132,\n", + " 63, 55, 80, 132, 125, 40, 10, 125, 74, 50, 45, 125,\n", + " 125, 125, 125, 72, 72, 40, 72, 63, 132, 74, 10, 99,\n", + " 10, 74, 40, 125, 125, 72, 132, 40, 74, 40, 66, 72,\n", + " 125, 131, 132, 50, 120, 66, 125],\n", + " [ 202, 198, 164, 826, 93, 169, 168, 6, 124, 185, 548, 207,\n", + " 517, 511, 305, 876, 576, 489, 289, 408, 680, 436, 644, 406,\n", + " 600, 748, 777, 561, 573, 877, 605, 830, 818, 937, 805, 919,\n", + " 942, 1164, 1055, 943, 1049, 1076, 1063, 1337, 1092, 1103, 1311, 1115,\n", + " 1238, 1392, 1094, 1139, 1272, 1132, 1325, 1157, 1074, 1266, 1343, 1494,\n", + " 1388, 1263, 1502, 1529, 1625, 1637, 1659, 1608, 1574, 1524, 1511, 1505,\n", + " 1646, 1442, 1628, 1415, 1549, 1603, 1824, 1891, 1803, 1775, 1956, 1829,\n", + " 2080, 1748, 1949, 1726, 2002, 1898, 1808, 2026, 1882, 2035, 2073, 2037,\n", + " 2230, 1969, 2120, 2024, 2085, 2031, 2052, 2059, 1987, 2259, 2038, 2062,\n", + " 2139, 2086, 2287, 2127, 2196, 2234, 2391, 2187, 2240, 2393, 2190, 2029,\n", + " 2431, 2232, 2195, 2138, 2361, 2396, 2266, 2321, 2359, 2496, 2227, 2424,\n", + " 2457, 2403, 2360, 2481, 2434, 2414, 2596, 2436, 2503, 2680, 2452, 2469,\n", + " 2510, 2532, 2556, 2511, 2568, 2549, 2575, 2700, 2688, 2601, 2659, 2540,\n", + " 2560, 2770, 2653, 2662, 2711, 2657, 2718, 2717, 2769, 2767, 2917, 2707,\n", + " 2897, 2794, 2961, 3024, 2818, 3013, 2934, 3143, 2998, 3155, 2942, 2759,\n", + " 3040, 3110, 3161, 2979, 3093, 3028, 3052, 3220, 3222, 3186, 3163, 3260,\n", + " 3227, 3176, 3326, 3404, 3217, 3210, 3281, 3300, 3422, 3254, 3367, 3438,\n", + " 3244, 3502, 3454, 3291, 3450, 3564, 3559, 3634, 3577, 3840, 3707, 3590,\n", + " 3515, 3555, 3778, 3630, 3631, 3928, 3687, 3662, 3885, 3878, 3737, 3917,\n", + " 3895, 3758, 3951, 4146, 3881, 4014, 3829, 3760, 3984, 4126, 3993, 3777,\n", + " 3731, 3823, 3719, 4066, 4196, 4210, 4188, 4163, 4242, 4232, 4212, 4222,\n", + " 4226, 4220, 4209, 4270, 4273, 4228, 4213, 4183, 4223, 4233, 4266, 4221,\n", + " 4219, 4257, 4259, 4288, 4315, 4268, 4291, 4247, 4329, 4307, 4326, 4282,\n", + " 4297, 4334, 4314, 4356, 4368, 4323, 4327, 4308, 4424, 4430, 4371, 4560,\n", + " 4429, 4408, 4460, 4555, 4531, 4386, 4521, 4487, 4486, 4634, 4586, 4370,\n", + " 4469, 4636, 4641, 4660, 4708, 4640, 4564, 4549, 4745, 4716, 4792, 4796,\n", + " 4744, 4723, 4677, 4726, 4739, 4860, 4945, 4901, 4822, 4911, 4828, 4867,\n", + " 5065, 4942, 4983, 4969, 4996, 4826, 5136, 4873, 5017, 5178, 5072, 4903,\n", + " 5122, 5005, 5155, 5249, 5086, 5153, 5141, 5207, 5240, 5081, 4990, 5203,\n", + " 5342, 5461, 5250, 5217, 5252, 5292, 5289, 5387, 5425, 5296, 5239, 5356,\n", + " 5423, 5261, 5315, 5473, 5525, 5708, 5702, 5732, 5648, 5681, 5560, 5671,\n", + " 5540, 5510, 5719, 5704, 5966, 5801, 5853, 5618, 6365, 5947, 5684, 6178,\n", + " 5797, 5865, 6020, 5973, 6499, 5669, 5768, 5820, 6400, 6258, 6460, 6226,\n", + " 6167, 6492, 6351, 6329, 6572, 6281, 6364, 6413, 6452, 6588, 6547, 6564,\n", + " 6446, 6325, 6586, 6288, 6200, 6526, 6546]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 333, 192, 192, ..., 6389, 6389, 6389],\n", + " [ 96, 203, 454, ..., 12, 581, 244]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 182, 472, 570, ..., 239, 307, 570],\n", + " [ 8, 115, 178, ..., 6372, 6313, 6332]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4965, 809, 3525, ..., 1688, 951, 6051],\n", + " [ 213, 35, 120, ..., 6560, 6484, 6517]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 192, 213, 213, ..., 6262, 6262, 6337],\n", + " [2406, 534, 1065, ..., 3785, 1843, 4349]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 75, 75, 75, ..., 6515, 6515, 6515],\n", + " [3848, 3688, 2406, ..., 6318, 6366, 6284]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006834\n", + "sampling 0.006674\n", + "noi time: 0.001976\n", + "get_vertex_data call: 0.037668\n", + "noi group time: 0.003512\n", + "eoi_group_time: 0.016093\n", + "second half: 0.226303\n", + "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 3117, 31145, 3253, ..., 1120077, 1120075, 1119052],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 3117, 31145, 3253, ..., 1120077, 1120075, 1119052],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208584, 1224370, 1231432, ..., 1929322, 1930682, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208584, 1224370, 1231432, ..., 1929322, 1930682, 1936974],\n", + " device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1135061, 1137204, 1137209, 1141424, 1140282, 1140284, 1136339, 1135726,\n", + " 1141758, 1136223, 1141251, 1141263, 1136969, 1141443, 1138897, 1149831,\n", + " 1149835, 1139811, 1145370, 1146978, 1137947, 1145992, 1145999, 1138928,\n", + " 1138938, 1143372, 1150395, 1146640, 1139615, 1148987, 1150503, 1150509,\n", + " 1149216, 1143820, 1149646, 1147483, 1142881, 1144632, 1149038, 1146998,\n", + " 1135950, 1135111, 1148336, 1146669, 1146472, 1153224, 1137220, 1155014,\n", + " 1155018, 1155019, 1139362, 1139371, 1136683, 1150329, 1146375, 1138745,\n", + " 1140313, 1151546, 1140540, 1140542, 1138112, 1138119, 1149461, 1138366,\n", + " 1140159, 1134720, 1135367, 1135202, 1135890, 1141036, 1136770, 1134794,\n", + " 1136517, 1138504, 1138508, 1136185, 1157103, 1137693, 1144786, 1144395,\n", + " 1137529, 1137534, 1135408, 1157393, 1136942, 1135265, 1156159, 1139161,\n", + " 1135977, 1135583, 1141072, 1141086, 1138524, 1153096, 1137957, 1158136,\n", + " 1158140, 1154132, 1154141, 1137019, 1135522, 1135535, 1138314, 1138436,\n", + " 1138461, 1154784, 1154792, 1136594, 1135121, 1158390, 1138846, 1156606,\n", + " 1142611, 1135623, 1138185, 1137104, 1137109, 1139849, 1141532, 1136457,\n", + " 1139667, 1138069, 1136085, 1134992, 1136554, 1139744, 1139315, 1144410,\n", + " 1139933, 1138148, 1155661, 1140557, 1152042, 1152044, 1139065, 1142302,\n", + " 1137734, 1137728, 1147322, 1134922, 1140901, 1136703, 1141088, 1141098,\n", + " 1149001, 1139898, 1145347, 1141975, 1143767, 1143775, 1139025, 1149968,\n", + " 1146843, 1146844, 1135861, 1135862, 1142929, 1141657, 1136917, 1143667,\n", + " 1160612, 1141161, 1141786, 1152733, 1144650, 1136854, 1142053, 1141810,\n", + " 1141814, 1139275, 1143204, 1140169, 1140170, 1139190, 1141479, 1138708,\n", + " 1142913, 1138423, 1143107, 1144596, 1144598, 1144599, 1148266, 1136866,\n", + " 1136864, 1141579, 1135327, 1137606, 1150906, 1146203, 1158692, 1138539,\n", + " 1141367, 1153058, 1151113, 1149088, 1138288, 1138293, 1144279, 1153556,\n", + " 1143908, 1139508, 1139510, 1140093, 1139122, 1145000, 1145213, 1140619,\n", + " 1140990, 1141560, 1147050, 1145873, 1149878, 1152976, 1135457, 1142556,\n", + " 1163917, 1139452, 1141925, 1146898, 1144242, 1140580, 1150255, 1150692,\n", + " 1139405, 1143636, 1137571, 1134861, 1145983, 1144073, 1146024, 1138085,\n", + " 1154328, 1141585, 1149928, 1141235, 1139990, 1143293, 1143294, 1143886,\n", + " 1147540, 1147150, 1148763, 1147282, 1142816, 1136323, 1149159, 1149161,\n", + " 1147461, 1142637, 1149366, 1148003, 1148010, 1157720, 1136836, 1139329,\n", + " 1141490, 1141496, 1143345, 1144765, 1135874, 1150288, 1138004, 1146523,\n", + " 1143457, 1143007, 1137696, 1137697, 1140483, 1143949, 1135454, 1140824,\n", + " 1140827, 1143799, 1143796, 1147521, 1140361, 1140360, 1140364, 1137990,\n", + " 1143081, 1143080, 1144219, 1147999, 1134902, 1139252, 1147131, 1154495,\n", + " 1148704, 1141825, 1146751, 1146742, 1148476, 1153701, 1152328, 1149714,\n", + " 1149722, 1147025, 1147970, 1158226, 1158235, 1143921, 1154526, 1145240,\n", + " 1145751, 1138626, 1148394, 1146178, 1151242, 1152530, 1150438, 1150445,\n", + " 1149258, 1154438, 1144526, 1150350, 1151997, 1142315, 1152031, 1145255,\n", + " 1146723, 1149530, 1147019, 1147021, 1147009, 1147023, 1152804, 1141937,\n", + " 1141949, 1141278, 1167223, 1153575, 1154982, 1148450, 1147653, 1147654,\n", + " 1146400, 1139096, 1139097, 1151412, 1154420, 1136251, 1139713, 1139716,\n", + " 1139718, 1146682, 1152441, 1157983, 1148724, 1143893, 1148204, 1148101,\n", + " 1153124, 1145104, 1145119, 1150932, 1150935, 1148095, 1147446, 1151816,\n", + " 1152576, 1135311, 1151906, 1154190, 1148498, 1146565, 1141420, 1157203,\n", + " 1150890, 1148949, 1146975, 1149359, 1146623, 1151692, 1135688, 1152097,\n", + " 1146280, 1156325, 1153038, 1137746, 1146307, 1152622, 1140513, 1140527,\n", + " 1136410, 1149203, 1152818, 1154119, 1157835, 1157833, 1154633, 1151573,\n", + " 1151617, 1150586, 1145278, 1136798, 1148916, 1152951, 1152958, 1140459,\n", + " 1145952, 1138989, 1152903, 1151311, 1143995, 1152341, 1153311, 1146704,\n", + " 1145577, 1138281, 1136028, 1136031, 1136026, 1158712, 1158704, 1152928,\n", + " 1155779, 1156399, 1152887, 1154727, 1137545, 1137400, 1137392, 1153907,\n", + " 1150168, 1150164, 1144016, 1148040, 1149304, 1149792, 1137048, 1148628,\n", + " 1158530, 1158540, 1148376, 1137458, 1149943, 1135707, 1135698, 1142041,\n", + " 1166145, 1154381, 1157547, 1154929, 1156505, 1157064, 1157069, 1155412,\n", + " 1150465, 1150475, 1135222, 1151788, 1151777, 1157912, 1135634, 1139529,\n", + " 1158308, 1155441, 1155511, 1150132, 1154530, 1154528, 1156207, 1156205,\n", + " 1151380, 1151379, 1156649, 1155122, 1152519, 1152518, 1149312, 1153478,\n", + " 1155755, 1146913, 1158096, 1155675, 1156563, 1155576, 1158573, 1158824,\n", + " 1158330, 1154033, 1157000, 1148835, 1148838, 1155646, 1153368, 1143263,\n", + " 1154240, 1162190, 1179427, 1143189, 1150371, 1157430, 1157934, 1137152,\n", + " 1157660, 1158126, 1158578, 1158203, 1159116, 1158350, 1137326, 1135601,\n", + " 1135614, 1148148, 1150661, 1155848, 1138215, 1146325, 1149145, 1140633,\n", + " 1156692, 1156693, 1140380, 1140381, 1140374, 1156027, 1163688, 1157033,\n", + " 1144843, 1155975, 1153762, 1158846, 1156811, 1155393, 1153498, 1136896,\n", + " 1171171, 1140215, 1140221, 1158815, 1136494, 1153632, 1156495, 1156490,\n", + " 1156281, 1156272, 1136640, 1179169, 1162167, 1157823, 1158545, 1158006,\n", + " 1144582, 1137554, 1164276, 1159042, 1162055, 1159144, 1142427, 1158295,\n", + " 1157944, 1153052, 1153045, 1164663, 1155763, 1156233, 1156235, 1153841,\n", + " 1163707, 1156098, 1150046, 1149063, 1155476, 1153519, 1147300, 1146870,\n", + " 1138161, 1164006, 1149956, 1149963, 1164909, 1148016, 1148031, 1157236,\n", + " 1140731, 1140735, 1146063, 1166085, 1146356, 1171255, 1160702, 1164048,\n", + " 1165306, 1165309, 1140135, 1170415, 1140641, 1140650, 1140643, 1148600,\n", + " 1148607, 1143143, 1143146, 1155818, 1141800, 1141801, 1156177, 1159029,\n", + " 1159032, 1184734, 1169109, 1152244, 1152247, 1166910, 1168527, 1144737,\n", + " 1144747, 1155046, 1155268, 1165409, 1151650, 1147427, 1147433, 1147438,\n", + " 1157052, 1149896, 1156739, 1157955, 1166591, 1161015, 1150648, 1150315,\n", + " 1168748, 1144810, 1144812, 1165716, 1142733, 1156289, 1145176, 1163783,\n", + " 1145228, 1154689, 1160768, 1170670, 1144973, 1142136, 1143028, 1143025,\n", + " 1152629, 1152624, 1148124, 1145900, 1145902, 1153520, 1151752, 1181040,\n", + " 1143404, 1170985, 1158722, 1154070, 1170740, 1147331, 1145674, 1145665,\n", + " 1151598, 1149130, 1154209, 1150518, 1156118, 1144344, 1144346, 1144336,\n", + " 1157534, 1147746, 1154656, 1154670, 1169154, 1138129, 1138141, 1138142,\n", + " 1151671, 1167883, 1149452, 1158051, 1158062, 1172875, 1157384, 1159851,\n", + " 1160141, 1171475, 1152353, 1166600, 1143859, 1149402, 1148667, 1165904,\n", + " 1173307, 1154027, 1152150, 1159659, 1151696, 1151697, 1162625, 1157158,\n", + " 1157153, 1157373, 1147711, 1151850, 1157593, 1170488, 1135021, 1173132,\n", + " 1173121, 1168825, 1168604, 1160990, 1150234, 1154151, 1154148, 1178642,\n", + " 1170473, 1186117, 1143279, 1143420, 1171303, 1153803, 1153805, 1177155,\n", + " 1144910, 1176258, 1179807, 1161255, 1176675, 1154718, 1154713, 1157792,\n", + " 1157793, 1157795, 1157084, 1158253, 1153898, 1153893, 1161846, 1145626,\n", + " 1186219, 1163538, 1178765, 1149753, 1149755, 1146243, 1181345, 1152279,\n", + " 1157771, 1155990, 1173148, 1190030, 1158940, 1158381, 1155892, 1155899,\n", + " 1157272, 1164413, 1140399, 1188254, 1184529, 1162253, 1182337, 1181547,\n", + " 1163421, 1190156, 1165082, 1156170, 1170034, 1168940, 1139828, 1139831,\n", + " 1150265, 1154812, 1151288, 1156055, 1146392, 1146394, 1149544, 1189352,\n", + " 1191511, 1172696, 1177484, 1162146, 1162151, 1190112, 1151774, 1185761,\n", + " 1169707, 1156676, 1158064, 1158067, 1145395, 1178662, 1155959, 1187846,\n", + " 1183610, 1185603, 1179769, 1179765, 1169837, 1162661, 1194191, 1182852,\n", + " 1161348], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1135061, 1137204, 1137209, 1141424, 1140282, 1140284, 1136339, 1135726,\n", + " 1141758, 1136223, 1141251, 1141263, 1136969, 1141443, 1138897, 1149831,\n", + " 1149835, 1139811, 1145370, 1146978, 1137947, 1145992, 1145999, 1138928,\n", + " 1138938, 1143372, 1150395, 1146640, 1139615, 1148987, 1150503, 1150509,\n", + " 1149216, 1143820, 1149646, 1147483, 1142881, 1144632, 1149038, 1146998,\n", + " 1135950, 1135111, 1148336, 1146669, 1146472, 1153224, 1137220, 1155014,\n", + " 1155018, 1155019, 1139362, 1139371, 1136683, 1150329, 1146375, 1138745,\n", + " 1140313, 1151546, 1140540, 1140542, 1138112, 1138119, 1149461, 1138366,\n", + " 1140159, 1134720, 1135367, 1135202, 1135890, 1141036, 1136770, 1134794,\n", + " 1136517, 1138504, 1138508, 1136185, 1157103, 1137693, 1144786, 1144395,\n", + " 1137529, 1137534, 1135408, 1157393, 1136942, 1135265, 1156159, 1139161,\n", + " 1135977, 1135583, 1141072, 1141086, 1138524, 1153096, 1137957, 1158136,\n", + " 1158140, 1154132, 1154141, 1137019, 1135522, 1135535, 1138314, 1138436,\n", + " 1138461, 1154784, 1154792, 1136594, 1135121, 1158390, 1138846, 1156606,\n", + " 1142611, 1135623, 1138185, 1137104, 1137109, 1139849, 1141532, 1136457,\n", + " 1139667, 1138069, 1136085, 1134992, 1136554, 1139744, 1139315, 1144410,\n", + " 1139933, 1138148, 1155661, 1140557, 1152042, 1152044, 1139065, 1142302,\n", + " 1137734, 1137728, 1147322, 1134922, 1140901, 1136703, 1141088, 1141098,\n", + " 1149001, 1139898, 1145347, 1141975, 1143767, 1143775, 1139025, 1149968,\n", + " 1146843, 1146844, 1135861, 1135862, 1142929, 1141657, 1136917, 1143667,\n", + " 1160612, 1141161, 1141786, 1152733, 1144650, 1136854, 1142053, 1141810,\n", + " 1141814, 1139275, 1143204, 1140169, 1140170, 1139190, 1141479, 1138708,\n", + " 1142913, 1138423, 1143107, 1144596, 1144598, 1144599, 1148266, 1136866,\n", + " 1136864, 1141579, 1135327, 1137606, 1150906, 1146203, 1158692, 1138539,\n", + " 1141367, 1153058, 1151113, 1149088, 1138288, 1138293, 1144279, 1153556,\n", + " 1143908, 1139508, 1139510, 1140093, 1139122, 1145000, 1145213, 1140619,\n", + " 1140990, 1141560, 1147050, 1145873, 1149878, 1152976, 1135457, 1142556,\n", + " 1163917, 1139452, 1141925, 1146898, 1144242, 1140580, 1150255, 1150692,\n", + " 1139405, 1143636, 1137571, 1134861, 1145983, 1144073, 1146024, 1138085,\n", + " 1154328, 1141585, 1149928, 1141235, 1139990, 1143293, 1143294, 1143886,\n", + " 1147540, 1147150, 1148763, 1147282, 1142816, 1136323, 1149159, 1149161,\n", + " 1147461, 1142637, 1149366, 1148003, 1148010, 1157720, 1136836, 1139329,\n", + " 1141490, 1141496, 1143345, 1144765, 1135874, 1150288, 1138004, 1146523,\n", + " 1143457, 1143007, 1137696, 1137697, 1140483, 1143949, 1135454, 1140824,\n", + " 1140827, 1143799, 1143796, 1147521, 1140361, 1140360, 1140364, 1137990,\n", + " 1143081, 1143080, 1144219, 1147999, 1134902, 1139252, 1147131, 1154495,\n", + " 1148704, 1141825, 1146751, 1146742, 1148476, 1153701, 1152328, 1149714,\n", + " 1149722, 1147025, 1147970, 1158226, 1158235, 1143921, 1154526, 1145240,\n", + " 1145751, 1138626, 1148394, 1146178, 1151242, 1152530, 1150438, 1150445,\n", + " 1149258, 1154438, 1144526, 1150350, 1151997, 1142315, 1152031, 1145255,\n", + " 1146723, 1149530, 1147019, 1147021, 1147009, 1147023, 1152804, 1141937,\n", + " 1141949, 1141278, 1167223, 1153575, 1154982, 1148450, 1147653, 1147654,\n", + " 1146400, 1139096, 1139097, 1151412, 1154420, 1136251, 1139713, 1139716,\n", + " 1139718, 1146682, 1152441, 1157983, 1148724, 1143893, 1148204, 1148101,\n", + " 1153124, 1145104, 1145119, 1150932, 1150935, 1148095, 1147446, 1151816,\n", + " 1152576, 1135311, 1151906, 1154190, 1148498, 1146565, 1141420, 1157203,\n", + " 1150890, 1148949, 1146975, 1149359, 1146623, 1151692, 1135688, 1152097,\n", + " 1146280, 1156325, 1153038, 1137746, 1146307, 1152622, 1140513, 1140527,\n", + " 1136410, 1149203, 1152818, 1154119, 1157835, 1157833, 1154633, 1151573,\n", + " 1151617, 1150586, 1145278, 1136798, 1148916, 1152951, 1152958, 1140459,\n", + " 1145952, 1138989, 1152903, 1151311, 1143995, 1152341, 1153311, 1146704,\n", + " 1145577, 1138281, 1136028, 1136031, 1136026, 1158712, 1158704, 1152928,\n", + " 1155779, 1156399, 1152887, 1154727, 1137545, 1137400, 1137392, 1153907,\n", + " 1150168, 1150164, 1144016, 1148040, 1149304, 1149792, 1137048, 1148628,\n", + " 1158530, 1158540, 1148376, 1137458, 1149943, 1135707, 1135698, 1142041,\n", + " 1166145, 1154381, 1157547, 1154929, 1156505, 1157064, 1157069, 1155412,\n", + " 1150465, 1150475, 1135222, 1151788, 1151777, 1157912, 1135634, 1139529,\n", + " 1158308, 1155441, 1155511, 1150132, 1154530, 1154528, 1156207, 1156205,\n", + " 1151380, 1151379, 1156649, 1155122, 1152519, 1152518, 1149312, 1153478,\n", + " 1155755, 1146913, 1158096, 1155675, 1156563, 1155576, 1158573, 1158824,\n", + " 1158330, 1154033, 1157000, 1148835, 1148838, 1155646, 1153368, 1143263,\n", + " 1154240, 1162190, 1179427, 1143189, 1150371, 1157430, 1157934, 1137152,\n", + " 1157660, 1158126, 1158578, 1158203, 1159116, 1158350, 1137326, 1135601,\n", + " 1135614, 1148148, 1150661, 1155848, 1138215, 1146325, 1149145, 1140633,\n", + " 1156692, 1156693, 1140380, 1140381, 1140374, 1156027, 1163688, 1157033,\n", + " 1144843, 1155975, 1153762, 1158846, 1156811, 1155393, 1153498, 1136896,\n", + " 1171171, 1140215, 1140221, 1158815, 1136494, 1153632, 1156495, 1156490,\n", + " 1156281, 1156272, 1136640, 1179169, 1162167, 1157823, 1158545, 1158006,\n", + " 1144582, 1137554, 1164276, 1159042, 1162055, 1159144, 1142427, 1158295,\n", + " 1157944, 1153052, 1153045, 1164663, 1155763, 1156233, 1156235, 1153841,\n", + " 1163707, 1156098, 1150046, 1149063, 1155476, 1153519, 1147300, 1146870,\n", + " 1138161, 1164006, 1149956, 1149963, 1164909, 1148016, 1148031, 1157236,\n", + " 1140731, 1140735, 1146063, 1166085, 1146356, 1171255, 1160702, 1164048,\n", + " 1165306, 1165309, 1140135, 1170415, 1140641, 1140650, 1140643, 1148600,\n", + " 1148607, 1143143, 1143146, 1155818, 1141800, 1141801, 1156177, 1159029,\n", + " 1159032, 1184734, 1169109, 1152244, 1152247, 1166910, 1168527, 1144737,\n", + " 1144747, 1155046, 1155268, 1165409, 1151650, 1147427, 1147433, 1147438,\n", + " 1157052, 1149896, 1156739, 1157955, 1166591, 1161015, 1150648, 1150315,\n", + " 1168748, 1144810, 1144812, 1165716, 1142733, 1156289, 1145176, 1163783,\n", + " 1145228, 1154689, 1160768, 1170670, 1144973, 1142136, 1143028, 1143025,\n", + " 1152629, 1152624, 1148124, 1145900, 1145902, 1153520, 1151752, 1181040,\n", + " 1143404, 1170985, 1158722, 1154070, 1170740, 1147331, 1145674, 1145665,\n", + " 1151598, 1149130, 1154209, 1150518, 1156118, 1144344, 1144346, 1144336,\n", + " 1157534, 1147746, 1154656, 1154670, 1169154, 1138129, 1138141, 1138142,\n", + " 1151671, 1167883, 1149452, 1158051, 1158062, 1172875, 1157384, 1159851,\n", + " 1160141, 1171475, 1152353, 1166600, 1143859, 1149402, 1148667, 1165904,\n", + " 1173307, 1154027, 1152150, 1159659, 1151696, 1151697, 1162625, 1157158,\n", + " 1157153, 1157373, 1147711, 1151850, 1157593, 1170488, 1135021, 1173132,\n", + " 1173121, 1168825, 1168604, 1160990, 1150234, 1154151, 1154148, 1178642,\n", + " 1170473, 1186117, 1143279, 1143420, 1171303, 1153803, 1153805, 1177155,\n", + " 1144910, 1176258, 1179807, 1161255, 1176675, 1154718, 1154713, 1157792,\n", + " 1157793, 1157795, 1157084, 1158253, 1153898, 1153893, 1161846, 1145626,\n", + " 1186219, 1163538, 1178765, 1149753, 1149755, 1146243, 1181345, 1152279,\n", + " 1157771, 1155990, 1173148, 1190030, 1158940, 1158381, 1155892, 1155899,\n", + " 1157272, 1164413, 1140399, 1188254, 1184529, 1162253, 1182337, 1181547,\n", + " 1163421, 1190156, 1165082, 1156170, 1170034, 1168940, 1139828, 1139831,\n", + " 1150265, 1154812, 1151288, 1156055, 1146392, 1146394, 1149544, 1189352,\n", + " 1191511, 1172696, 1177484, 1162146, 1162151, 1190112, 1151774, 1185761,\n", + " 1169707, 1156676, 1158064, 1158067, 1145395, 1178662, 1155959, 1187846,\n", + " 1183610, 1185603, 1179769, 1179765, 1169837, 1162661, 1194191, 1182852,\n", + " 1161348], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196007, 1197175, 1197178, 1195406, 1199736, 1198721, 1198730, 1199835,\n", + " 1199282, 1202255, 1201582, 1199278, 1199248, 1201660, 1198633, 1196956,\n", + " 1198557, 1196685, 1196573, 1194770, 1196631, 1195103, 1195514, 1195263,\n", + " 1196534, 1201992, 1195888, 1196977, 1196517, 1197831, 1195313, 1195325,\n", + " 1196835, 1196840, 1196845, 1198668, 1198367, 1198163, 1196711, 1195265,\n", + " 1195278, 1197141, 1194859, 1198915, 1195541, 1197483, 1196122, 1196283,\n", + " 1199185, 1199624, 1197676, 1197994, 1200131, 1200079, 1199154, 1199231,\n", + " 1195017, 1199676, 1197601, 1197607, 1196727, 1200895, 1198416, 1201547,\n", + " 1200450, 1200501, 1198593, 1201156, 1202630, 1202403, 1200991, 1201056,\n", + " 1194803, 1199551, 1202509, 1200526, 1200553, 1197100, 1200692, 1199908,\n", + " 1196768, 1196779, 1200899, 1195607, 1203329, 1199922, 1198562, 1196966,\n", + " 1200784, 1195435, 1195438, 1198929, 1195415, 1197816, 1194898, 1199659,\n", + " 1203102, 1194730, 1198824, 1197731, 1198819, 1200974, 1200296, 1195082,\n", + " 1203162, 1196428], device='cuda:0', dtype=torch.int32))\n", + "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196007, 1197175, 1197178, 1195406, 1199736, 1198721, 1198730, 1199835,\n", + " 1199282, 1202255, 1201582, 1199278, 1199248, 1201660, 1198633, 1196956,\n", + " 1198557, 1196685, 1196573, 1194770, 1196631, 1195103, 1195514, 1195263,\n", + " 1196534, 1201992, 1195888, 1196977, 1196517, 1197831, 1195313, 1195325,\n", + " 1196835, 1196840, 1196845, 1198668, 1198367, 1198163, 1196711, 1195265,\n", + " 1195278, 1197141, 1194859, 1198915, 1195541, 1197483, 1196122, 1196283,\n", + " 1199185, 1199624, 1197676, 1197994, 1200131, 1200079, 1199154, 1199231,\n", + " 1195017, 1199676, 1197601, 1197607, 1196727, 1200895, 1198416, 1201547,\n", + " 1200450, 1200501, 1198593, 1201156, 1202630, 1202403, 1200991, 1201056,\n", + " 1194803, 1199551, 1202509, 1200526, 1200553, 1197100, 1200692, 1199908,\n", + " 1196768, 1196779, 1200899, 1195607, 1203329, 1199922, 1198562, 1196966,\n", + " 1200784, 1195435, 1195438, 1198929, 1195415, 1197816, 1194898, 1199659,\n", + " 1203102, 1194730, 1198824, 1197731, 1198819, 1200974, 1200296, 1195082,\n", + " 1203162, 1196428], device='cuda:0', dtype=torch.int32))\n", + "{'institution': tensor([[ 5.7291e-02, -1.2869e-04, 3.4647e-01, ..., 1.0300e-01,\n", + " -1.9406e-03, -3.5319e-03],\n", + " [ 1.3340e-01, 2.5247e-02, 4.6542e-01, ..., 7.0963e-02,\n", + " -1.8692e-03, -4.5896e-03],\n", + " [ 5.5267e-02, 2.0290e-02, 3.0888e-01, ..., 1.5066e-01,\n", + " -2.4305e-03, -3.6403e-03],\n", + " ...,\n", + " [ 2.2821e-01, -5.5721e-04, 7.1206e-01, ..., 4.1279e-02,\n", + " -1.7090e-03, -6.5596e-03],\n", + " [ 2.3018e-01, -4.9266e-04, 7.2041e-01, ..., 4.6721e-02,\n", + " -1.7555e-03, -6.7408e-03],\n", + " [ 2.0991e-01, -2.1385e-04, 6.3658e-01, ..., 4.5916e-02,\n", + " -1.7579e-03, -5.9250e-03]], device='cuda:0'), 'paper': tensor([[-1.0541e-02, 6.4138e-01, 8.3046e-01, ..., -9.2426e-03,\n", + " -1.7541e-02, -2.9015e-03],\n", + " [-1.5844e-02, 1.0032e+00, 1.4659e+00, ..., 1.2926e+00,\n", + " -3.1954e-02, 4.7940e-01],\n", + " [-3.7226e-02, -1.7005e-02, 3.3686e+00, ..., -2.7191e-02,\n", + " -2.1855e-02, -4.6895e-02],\n", + " ...,\n", + " [-3.7681e-02, -2.5723e-02, 2.7407e+00, ..., -2.3379e-02,\n", + " -2.5427e-02, -4.8666e-02],\n", + " [-3.1961e-02, -1.6067e-02, 2.1420e+00, ..., -1.8103e-02,\n", + " -1.8766e-02, -3.8476e-02],\n", + " [-1.8677e-02, 1.7818e+00, 4.0080e-01, ..., 4.0762e+00,\n", + " -4.5009e-02, 2.0407e+00]], device='cuda:0'), 'author': tensor([[-4.2732e-03, 7.0868e-02, 4.3046e-02, ..., 6.6649e-01,\n", + " 3.5820e-01, -2.3770e-03],\n", + " [-2.5047e-03, -1.5235e-03, 1.2543e-01, ..., 6.9777e-01,\n", + " 6.5724e-01, -2.6846e-04],\n", + " [-3.7062e-03, 6.8603e-02, -1.7438e-03, ..., 6.1091e-01,\n", + " 3.7503e-01, -1.1134e-03],\n", + " ...,\n", + " [-3.2416e-03, 2.1661e-02, 1.0190e-01, ..., 6.8726e-01,\n", + " 4.1579e-01, -2.1869e-03],\n", + " [-2.2077e-03, -4.4668e-04, 9.3046e-02, ..., 6.3299e-01,\n", + " 6.4197e-01, -6.6757e-04],\n", + " [-5.2949e-03, 3.3255e-01, 1.7283e-01, ..., 4.4448e-01,\n", + " -2.3240e-03, -9.1818e-03]], device='cuda:0'), 'field_of_study': tensor([[-5.9642e-03, 4.8120e-01, -2.5504e-03, ..., 2.1211e-01,\n", + " 4.6753e-02, -5.5612e-04],\n", + " [-4.3883e-03, 4.3010e-01, 1.5969e-01, ..., -6.2984e-03,\n", + " 1.8586e-01, 3.8242e-01],\n", + " [-8.8278e-04, 2.7134e-01, 6.8454e-02, ..., -7.8669e-03,\n", + " 1.9287e-01, -8.4108e-05],\n", + " ...,\n", + " [-2.2224e-03, 3.0454e-01, 1.1740e-02, ..., -6.9353e-03,\n", + " 1.9978e-01, 3.6281e-02],\n", + " [-1.7687e-03, 2.6769e-01, 2.6098e-02, ..., -6.5537e-03,\n", + " 2.1864e-01, 4.1320e-03],\n", + " [-3.4409e-03, 2.5210e-01, -7.3100e-05, ..., -6.2525e-03,\n", + " 1.5257e-01, 2.0041e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 7, 22, 87, 92, 125, 498, 431, 426, 275, 230, 230, 230,\n", + " 230, 230, 713, 713, 713, 585, 546, 623, 713, 713, 713, 790,\n", + " 703, 740, 907, 1108, 1108, 827, 755, 1006, 1037, 1315, 1340, 1304,\n", + " 940, 1347, 1019, 1297, 1421, 1581, 1569, 1427, 1548, 1464, 1559, 1464,\n", + " 1464, 1585, 1518, 1363, 1633, 1633, 1507, 1762, 1905, 1751, 1698, 1652,\n", + " 2002, 2085, 2051, 2129, 2051, 2018, 1939, 2095, 1996, 2122, 2159, 2088,\n", + " 2088, 2229, 2229, 2229, 2276, 2415, 2430, 2430, 2480, 2442, 2482, 2528,\n", + " 2851, 2893, 3152, 2986, 3075, 3184, 3342, 3289, 3349, 3349, 3459, 3646,\n", + " 3702, 3737, 3744, 3893, 3884, 3810, 4111, 4172, 3794, 4096, 4157, 4058,\n", + " 4299, 4234, 4145, 4401, 4391, 4377, 4456, 4512, 4682, 4657, 4783, 4846,\n", + " 4952, 4970, 4898, 4977, 5030, 4891, 4891, 4891, 5327, 5206, 5265, 5245,\n", + " 5245, 5109, 5004, 5248, 5012, 5415, 5642, 5642, 5712, 5545, 5640, 5640,\n", + " 5568, 5568, 5816, 5748, 5527, 5462, 5957, 5957, 5905, 5905, 5978, 6135,\n", + " 6135, 5783, 6046, 6046, 6290, 6242, 6242, 6242, 6477, 6329, 6216, 6477,\n", + " 6400, 6391, 6508, 6337, 6389, 6389, 6557, 6148, 6148, 6437, 6286, 6286,\n", + " 6332],\n", + " [ 77, 39, 47, 86, 0, 5, 87, 60, 9, 102, 3, 90,\n", + " 8, 18, 8, 60, 4, 71, 9, 60, 102, 82, 96, 95,\n", + " 9, 43, 103, 35, 60, 39, 23, 98, 99, 99, 88, 60,\n", + " 20, 99, 33, 15, 57, 61, 100, 46, 23, 84, 29, 12,\n", + " 27, 49, 16, 8, 67, 28, 56, 48, 83, 24, 40, 65,\n", + " 73, 65, 20, 21, 58, 99, 105, 86, 42, 46, 20, 25,\n", + " 31, 63, 66, 92, 16, 2, 87, 50, 89, 2, 1, 23,\n", + " 54, 89, 52, 43, 45, 13, 49, 8, 52, 25, 74, 61,\n", + " 16, 62, 9, 9, 80, 58, 8, 17, 79, 14, 38, 9,\n", + " 73, 73, 89, 44, 20, 32, 46, 43, 13, 49, 49, 25,\n", + " 69, 97, 69, 94, 87, 87, 7, 70, 41, 86, 11, 60,\n", + " 76, 60, 93, 60, 72, 47, 54, 8, 68, 2, 81, 25,\n", + " 71, 9, 36, 91, 64, 104, 60, 48, 27, 75, 16, 44,\n", + " 59, 37, 98, 10, 101, 16, 63, 22, 78, 56, 6, 42,\n", + " 62, 19, 85, 51, 60, 30, 84, 26, 34, 94, 60, 55,\n", + " 53]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3357, 224, 1781, ..., 99, 1606, 1786],\n", + " [ 11, 115, 184, ..., 6246, 6246, 6246]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 61, 31, 86, ..., 47, 8, 31],\n", + " [ 108, 123, 61, ..., 6546, 6505, 6373]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 151, 99, 99, ..., 6246, 6246, 6246],\n", + " [ 771, 202, 218, ..., 48, 745, 616]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 610, 503, 287, ..., 218, 303, 33],\n", + " [ 75, 271, 347, ..., 6122, 6205, 6189]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4212, 1442, 2831, ..., 5543, 5482, 760],\n", + " [ 95, 0, 182, ..., 6426, 6506, 6547]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 99, 99, 99, ..., 6246, 6246, 6151],\n", + " [ 529, 396, 420, ..., 1786, 513, 4956]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 6, 6, 7, ..., 6506, 6506, 6506],\n", + " [1233, 5617, 904, ..., 5360, 5348, 5479]], device='cuda:0')}\n", + "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", + "first half 0.006451\n", + "sampling 0.006297\n", + "noi time: 0.001948\n" + ] + }, + { + "ename": "KeyboardInterrupt", + "evalue": "", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", + "\u001b[1;32m/work/testing/pyg_multi_gpu2.ipynb Cell 14\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 68\u001b[0m \u001b[39mfor\u001b[39;00m epoch \u001b[39min\u001b[39;00m \u001b[39mrange\u001b[39m(\u001b[39m1\u001b[39m, \u001b[39m101\u001b[39m):\n\u001b[1;32m 69\u001b[0m loss \u001b[39m=\u001b[39m train()\n\u001b[0;32m---> 70\u001b[0m train_acc \u001b[39m=\u001b[39m test()\n\u001b[1;32m 71\u001b[0m \u001b[39mprint\u001b[39m(\u001b[39mf\u001b[39m\u001b[39m'\u001b[39m\u001b[39mEpoch: \u001b[39m\u001b[39m{\u001b[39;00mepoch\u001b[39m:\u001b[39;00m\u001b[39m03d\u001b[39m\u001b[39m}\u001b[39;00m\u001b[39m, Loss: \u001b[39m\u001b[39m{\u001b[39;00mloss\u001b[39m:\u001b[39;00m\u001b[39m.4f\u001b[39m\u001b[39m}\u001b[39;00m\u001b[39m, Train: \u001b[39m\u001b[39m{\u001b[39;00mtrain_acc\u001b[39m:\u001b[39;00m\u001b[39m.4f\u001b[39m\u001b[39m}\u001b[39;00m\u001b[39m'\u001b[39m)\n", + "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/torch/autograd/grad_mode.py:27\u001b[0m, in \u001b[0;36m_DecoratorContextManager.__call__..decorate_context\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 24\u001b[0m \u001b[39m@functools\u001b[39m\u001b[39m.\u001b[39mwraps(func)\n\u001b[1;32m 25\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mdecorate_context\u001b[39m(\u001b[39m*\u001b[39margs, \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs):\n\u001b[1;32m 26\u001b[0m \u001b[39mwith\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mclone():\n\u001b[0;32m---> 27\u001b[0m \u001b[39mreturn\u001b[39;00m func(\u001b[39m*\u001b[39;49margs, \u001b[39m*\u001b[39;49m\u001b[39m*\u001b[39;49mkwargs)\n", + "\u001b[1;32m/work/testing/pyg_multi_gpu2.ipynb Cell 14\u001b[0m in \u001b[0;36mtest\u001b[0;34m()\u001b[0m\n\u001b[1;32m 58\u001b[0m acc \u001b[39m=\u001b[39m \u001b[39m0.0\u001b[39m\n\u001b[1;32m 59\u001b[0m \u001b[39mfor\u001b[39;00m _ \u001b[39min\u001b[39;00m \u001b[39mrange\u001b[39m(\u001b[39m2\u001b[39m\u001b[39m*\u001b[39mnum_batches):\n\u001b[0;32m---> 60\u001b[0m data \u001b[39m=\u001b[39m \u001b[39mnext\u001b[39;49m(test_iter)\n\u001b[1;32m 61\u001b[0m pred \u001b[39m=\u001b[39m model(data\u001b[39m.\u001b[39mx_dict, data\u001b[39m.\u001b[39medge_index_dict)\u001b[39m.\u001b[39margmax(dim\u001b[39m=\u001b[39m\u001b[39m-\u001b[39m\u001b[39m1\u001b[39m)\n\u001b[1;32m 64\u001b[0m acc \u001b[39m+\u001b[39m\u001b[39m=\u001b[39m (pred \u001b[39m==\u001b[39m data[\u001b[39m'\u001b[39m\u001b[39mpaper\u001b[39m\u001b[39m'\u001b[39m]\u001b[39m.\u001b[39my)\u001b[39m.\u001b[39msum() \u001b[39m/\u001b[39m \u001b[39mlen\u001b[39m(data[\u001b[39m'\u001b[39m\u001b[39mpaper\u001b[39m\u001b[39m'\u001b[39m])\n", + "File \u001b[0;32m/work/pytorch_geometric/torch_geometric/loader/base.py:36\u001b[0m, in \u001b[0;36mDataLoaderIterator.__next__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 35\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39m__next__\u001b[39m(\u001b[39mself\u001b[39m) \u001b[39m-\u001b[39m\u001b[39m>\u001b[39m Any:\n\u001b[0;32m---> 36\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mtransform_fn(\u001b[39mnext\u001b[39;49m(\u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49miterator))\n", + "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/torch/utils/data/dataloader.py:530\u001b[0m, in \u001b[0;36m_BaseDataLoaderIter.__next__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 528\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_sampler_iter \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m:\n\u001b[1;32m 529\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_reset()\n\u001b[0;32m--> 530\u001b[0m data \u001b[39m=\u001b[39m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_next_data()\n\u001b[1;32m 531\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_num_yielded \u001b[39m+\u001b[39m\u001b[39m=\u001b[39m \u001b[39m1\u001b[39m\n\u001b[1;32m 532\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_dataset_kind \u001b[39m==\u001b[39m _DatasetKind\u001b[39m.\u001b[39mIterable \u001b[39mand\u001b[39;00m \\\n\u001b[1;32m 533\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_IterableDataset_len_called \u001b[39mis\u001b[39;00m \u001b[39mnot\u001b[39;00m \u001b[39mNone\u001b[39;00m \u001b[39mand\u001b[39;00m \\\n\u001b[1;32m 534\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_num_yielded \u001b[39m>\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_IterableDataset_len_called:\n", + "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/torch/utils/data/dataloader.py:570\u001b[0m, in \u001b[0;36m_SingleProcessDataLoaderIter._next_data\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 568\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39m_next_data\u001b[39m(\u001b[39mself\u001b[39m):\n\u001b[1;32m 569\u001b[0m index \u001b[39m=\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_next_index() \u001b[39m# may raise StopIteration\u001b[39;00m\n\u001b[0;32m--> 570\u001b[0m data \u001b[39m=\u001b[39m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_dataset_fetcher\u001b[39m.\u001b[39;49mfetch(index) \u001b[39m# may raise StopIteration\u001b[39;00m\n\u001b[1;32m 571\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_pin_memory:\n\u001b[1;32m 572\u001b[0m data \u001b[39m=\u001b[39m _utils\u001b[39m.\u001b[39mpin_memory\u001b[39m.\u001b[39mpin_memory(data)\n", + "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py:52\u001b[0m, in \u001b[0;36m_MapDatasetFetcher.fetch\u001b[0;34m(self, possibly_batched_index)\u001b[0m\n\u001b[1;32m 50\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[1;32m 51\u001b[0m data \u001b[39m=\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mdataset[possibly_batched_index]\n\u001b[0;32m---> 52\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mcollate_fn(data)\n", + "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/cugraph-22.6.0a0+268.g0bbf2c8b.dirty-py3.9-linux-x86_64.egg/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py:257\u001b[0m, in \u001b[0;36mCuGraphLinkNeighborLoader.collate_fn\u001b[0;34m(self, index)\u001b[0m\n\u001b[1;32m 256\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mcollate_fn\u001b[39m(\u001b[39mself\u001b[39m, index: Union[List[\u001b[39mint\u001b[39m], Tensor]) \u001b[39m-\u001b[39m\u001b[39m>\u001b[39m Any:\n\u001b[0;32m--> 257\u001b[0m out \u001b[39m=\u001b[39m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mneighbor_sampler(index)\n\u001b[1;32m 258\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mfilter_per_worker:\n\u001b[1;32m 259\u001b[0m \u001b[39m# We execute `filter_fn` in the worker process.\u001b[39;00m\n\u001b[1;32m 260\u001b[0m out \u001b[39m=\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mfilter_fn(out)\n", + "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/cugraph-22.6.0a0+268.g0bbf2c8b.dirty-py3.9-linux-x86_64.egg/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py:97\u001b[0m, in \u001b[0;36mCuGraphLinkNeighborSampler.__call__\u001b[0;34m(self, query)\u001b[0m\n\u001b[1;32m 94\u001b[0m query_nodes, reverse \u001b[39m=\u001b[39m query_nodes\u001b[39m.\u001b[39munique(return_inverse\u001b[39m=\u001b[39m\u001b[39mTrue\u001b[39;00m)\n\u001b[1;32m 95\u001b[0m edge_label_index \u001b[39m=\u001b[39m reverse\u001b[39m.\u001b[39mview(\u001b[39m2\u001b[39m, \u001b[39m-\u001b[39m\u001b[39m1\u001b[39m)\n\u001b[0;32m---> 97\u001b[0m out \u001b[39m=\u001b[39m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mgraph_store\u001b[39m.\u001b[39;49mneighbor_sample(\n\u001b[1;32m 98\u001b[0m query_nodes,\n\u001b[1;32m 99\u001b[0m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mnum_neighbors,\n\u001b[1;32m 100\u001b[0m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mreplace,\n\u001b[1;32m 101\u001b[0m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mdirected,\n\u001b[1;32m 102\u001b[0m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49medge_types\n\u001b[1;32m 103\u001b[0m )\n\u001b[1;32m 105\u001b[0m \u001b[39m# Call cuGraph sampler\u001b[39;00m\n\u001b[1;32m 106\u001b[0m \u001b[39mreturn\u001b[39;00m out \u001b[39m+\u001b[39m (edge_label_index, edge_label)\n", + "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/torch/autograd/grad_mode.py:27\u001b[0m, in \u001b[0;36m_DecoratorContextManager.__call__..decorate_context\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 24\u001b[0m \u001b[39m@functools\u001b[39m\u001b[39m.\u001b[39mwraps(func)\n\u001b[1;32m 25\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mdecorate_context\u001b[39m(\u001b[39m*\u001b[39margs, \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs):\n\u001b[1;32m 26\u001b[0m \u001b[39mwith\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mclone():\n\u001b[0;32m---> 27\u001b[0m \u001b[39mreturn\u001b[39;00m func(\u001b[39m*\u001b[39;49margs, \u001b[39m*\u001b[39;49m\u001b[39m*\u001b[39;49mkwargs)\n", + "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/cugraph-22.6.0a0+268.g0bbf2c8b.dirty-py3.9-linux-x86_64.egg/cugraph/gnn/pyg_extensions/data/cugraph_store.py:236\u001b[0m, in \u001b[0;36mCuGraphStore.neighbor_sample\u001b[0;34m(self, index, num_neighbors, replace, directed, edge_types)\u001b[0m\n\u001b[1;32m 233\u001b[0m \u001b[39mprint\u001b[39m(\u001b[39m'\u001b[39m\u001b[39mnoi time:\u001b[39m\u001b[39m'\u001b[39m, (noi_end \u001b[39m-\u001b[39m noi_start)\u001b[39m.\u001b[39mtotal_seconds())\n\u001b[1;32m 235\u001b[0m gd_start \u001b[39m=\u001b[39m datetime\u001b[39m.\u001b[39mnow()\n\u001b[0;32m--> 236\u001b[0m noi \u001b[39m=\u001b[39m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m__graph\u001b[39m.\u001b[39;49mget_vertex_data(\n\u001b[1;32m 237\u001b[0m nodes_of_interest\u001b[39m.\u001b[39;49mcompute() \u001b[39mif\u001b[39;49;00m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mis_mg \u001b[39melse\u001b[39;49;00m nodes_of_interest,\n\u001b[1;32m 238\u001b[0m columns\u001b[39m=\u001b[39;49m[\u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m__graph\u001b[39m.\u001b[39;49mvertex_col_name, \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m__graph\u001b[39m.\u001b[39;49mtype_col_name]\n\u001b[1;32m 239\u001b[0m )\n\u001b[1;32m 241\u001b[0m gd_end \u001b[39m=\u001b[39m datetime\u001b[39m.\u001b[39mnow()\n\u001b[1;32m 242\u001b[0m \u001b[39mprint\u001b[39m(\u001b[39m'\u001b[39m\u001b[39mget_vertex_data call:\u001b[39m\u001b[39m'\u001b[39m, (gd_end \u001b[39m-\u001b[39m gd_start)\u001b[39m.\u001b[39mtotal_seconds())\n", + "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/cugraph-22.6.0a0+268.g0bbf2c8b.dirty-py3.9-linux-x86_64.egg/cugraph/structure/property_graph.py:457\u001b[0m, in \u001b[0;36mEXPERIMENTAL__PropertyGraph.get_vertex_data\u001b[0;34m(self, vertex_ids, types, columns)\u001b[0m\n\u001b[1;32m 452\u001b[0m \u001b[39mif\u001b[39;00m vertex_ids \u001b[39mis\u001b[39;00m \u001b[39mnot\u001b[39;00m \u001b[39mNone\u001b[39;00m:\n\u001b[1;32m 453\u001b[0m df_mask \u001b[39m=\u001b[39m (\n\u001b[1;32m 454\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m__vertex_prop_dataframe[\u001b[39mself\u001b[39m\u001b[39m.\u001b[39mvertex_col_name]\n\u001b[1;32m 455\u001b[0m \u001b[39m.\u001b[39misin(vertex_ids)\n\u001b[1;32m 456\u001b[0m )\n\u001b[0;32m--> 457\u001b[0m df \u001b[39m=\u001b[39m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m__vertex_prop_dataframe\u001b[39m.\u001b[39;49mloc[df_mask]\n\u001b[1;32m 458\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[1;32m 459\u001b[0m df \u001b[39m=\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m__vertex_prop_dataframe\n", + "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/cudf/core/dataframe.py:145\u001b[0m, in \u001b[0;36m_DataFrameIndexer.__getitem__\u001b[0;34m(self, arg)\u001b[0m\n\u001b[1;32m 143\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mnot\u001b[39;00m \u001b[39misinstance\u001b[39m(arg, \u001b[39mtuple\u001b[39m):\n\u001b[1;32m 144\u001b[0m arg \u001b[39m=\u001b[39m (arg, \u001b[39mslice\u001b[39m(\u001b[39mNone\u001b[39;00m))\n\u001b[0;32m--> 145\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_getitem_tuple_arg(arg)\n", + "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/contextlib.py:79\u001b[0m, in \u001b[0;36mContextDecorator.__call__..inner\u001b[0;34m(*args, **kwds)\u001b[0m\n\u001b[1;32m 76\u001b[0m \u001b[39m@wraps\u001b[39m(func)\n\u001b[1;32m 77\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39minner\u001b[39m(\u001b[39m*\u001b[39margs, \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwds):\n\u001b[1;32m 78\u001b[0m \u001b[39mwith\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_recreate_cm():\n\u001b[0;32m---> 79\u001b[0m \u001b[39mreturn\u001b[39;00m func(\u001b[39m*\u001b[39;49margs, \u001b[39m*\u001b[39;49m\u001b[39m*\u001b[39;49mkwds)\n", + "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/cudf/core/dataframe.py:285\u001b[0m, in \u001b[0;36m_DataFrameLocIndexer._getitem_tuple_arg\u001b[0;34m(self, arg)\u001b[0m\n\u001b[1;32m 282\u001b[0m tmp_arg \u001b[39m=\u001b[39m (as_column(tmp_arg[\u001b[39m0\u001b[39m]), tmp_arg[\u001b[39m1\u001b[39m])\n\u001b[1;32m 284\u001b[0m \u001b[39mif\u001b[39;00m is_bool_dtype(tmp_arg[\u001b[39m0\u001b[39m]):\n\u001b[0;32m--> 285\u001b[0m df \u001b[39m=\u001b[39m columns_df\u001b[39m.\u001b[39;49m_apply_boolean_mask(tmp_arg[\u001b[39m0\u001b[39;49m])\n\u001b[1;32m 286\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[1;32m 287\u001b[0m tmp_col_name \u001b[39m=\u001b[39m \u001b[39mstr\u001b[39m(uuid4())\n", + "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/cudf/core/indexed_frame.py:2546\u001b[0m, in \u001b[0;36mIndexedFrame._apply_boolean_mask\u001b[0;34m(self, boolean_mask)\u001b[0m\n\u001b[1;32m 2542\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mnot\u001b[39;00m is_bool_dtype(boolean_mask\u001b[39m.\u001b[39mdtype):\n\u001b[1;32m 2543\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mValueError\u001b[39;00m(\u001b[39m\"\u001b[39m\u001b[39mboolean_mask is not boolean type.\u001b[39m\u001b[39m\"\u001b[39m)\n\u001b[1;32m 2545\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_from_columns_like_self(\n\u001b[0;32m-> 2546\u001b[0m libcudf\u001b[39m.\u001b[39;49mstream_compaction\u001b[39m.\u001b[39;49mapply_boolean_mask(\n\u001b[1;32m 2547\u001b[0m \u001b[39mlist\u001b[39;49m(\u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_index\u001b[39m.\u001b[39;49m_columns \u001b[39m+\u001b[39;49m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_columns), boolean_mask\n\u001b[1;32m 2548\u001b[0m ),\n\u001b[1;32m 2549\u001b[0m column_names\u001b[39m=\u001b[39m\u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_column_names,\n\u001b[1;32m 2550\u001b[0m index_names\u001b[39m=\u001b[39m\u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_index\u001b[39m.\u001b[39mnames,\n\u001b[1;32m 2551\u001b[0m )\n", + "File \u001b[0;32mstream_compaction.pyx:107\u001b[0m, in \u001b[0;36mcudf._lib.stream_compaction.apply_boolean_mask\u001b[0;34m()\u001b[0m\n", + "File \u001b[0;32mutils.pyx:244\u001b[0m, in \u001b[0;36mcudf._lib.utils.columns_from_unique_ptr\u001b[0;34m()\u001b[0m\n", + "File \u001b[0;32mcolumn.pyx:457\u001b[0m, in \u001b[0;36mcudf._lib.column.Column.from_unique_ptr\u001b[0;34m()\u001b[0m\n", + "File \u001b[0;32mdevice_buffer.pyx:136\u001b[0m, in \u001b[0;36mrmm._lib.device_buffer.DeviceBuffer.c_from_unique_ptr\u001b[0;34m()\u001b[0m\n", + "File \u001b[0;32mdevice_buffer.pyx:96\u001b[0m, in \u001b[0;36mrmm._lib.device_buffer.DeviceBuffer.__cinit__\u001b[0;34m()\u001b[0m\n", + "File \u001b[0;32mmemory_resource.pyx:964\u001b[0m, in \u001b[0;36mrmm._lib.memory_resource.get_current_device_resource\u001b[0;34m()\u001b[0m\n", + "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/rmm/_cuda/gpu.py:53\u001b[0m, in \u001b[0;36mgetDevice\u001b[0;34m()\u001b[0m\n\u001b[1;32m 49\u001b[0m \u001b[39mraise\u001b[39;00m CUDARuntimeError(status)\n\u001b[1;32m 50\u001b[0m \u001b[39mreturn\u001b[39;00m version\n\u001b[0;32m---> 53\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mgetDevice\u001b[39m():\n\u001b[1;32m 54\u001b[0m \u001b[39m\"\"\"\u001b[39;00m\n\u001b[1;32m 55\u001b[0m \u001b[39m Get the current CUDA device\u001b[39;00m\n\u001b[1;32m 56\u001b[0m \u001b[39m \"\"\"\u001b[39;00m\n\u001b[1;32m 57\u001b[0m status, device \u001b[39m=\u001b[39m cudart\u001b[39m.\u001b[39mcudaGetDevice()\n", + "\u001b[0;31mKeyboardInterrupt\u001b[0m: " + ] + } + ], + "source": [ + "import torch\n", + "import torch.nn.functional as F\n", + "\n", + "from torch_geometric.nn import HeteroConv, Linear, SAGEConv\n", + "\n", + "class HeteroGNN(torch.nn.Module):\n", + " def __init__(self, edge_types, hidden_channels, out_channels, num_layers):\n", + " super().__init__()\n", + "\n", + " self.convs = torch.nn.ModuleList()\n", + " for _ in range(num_layers):\n", + " conv = HeteroConv({\n", + " edge_type: SAGEConv((-1, -1), hidden_channels)\n", + " for edge_type in edge_types\n", + " })\n", + " self.convs.append(conv)\n", + "\n", + " self.lin = Linear(hidden_channels, out_channels)\n", + "\n", + " def forward(self, x_dict, edge_index_dict):\n", + " for conv in self.convs:\n", + " x_dict = conv(x_dict, edge_index_dict)\n", + " x_dict = {key: F.leaky_relu(x) for key, x in x_dict.items()}\n", + " print(x_dict, edge_index_dict)\n", + " return self.lin(x_dict['paper'])\n", + "\n", + "\n", + "model = HeteroGNN(edge_types, hidden_channels=64, out_channels=num_classes,\n", + " num_layers=2).cuda()\n", + "\n", + "with torch.no_grad(): # Initialize lazy modules.\n", + " data = next(iter(loader))\n", + " out = model(data.x_dict, data.edge_index_dict)\n", + "\n", + "optimizer = torch.optim.Adam(model.parameters(), lr=0.005, weight_decay=0.001)\n", + "\n", + "num_batches = 5\n", + "def train():\n", + " model.train()\n", + " optimizer.zero_grad()\n", + " for b_i, data in enumerate(loader):\n", + " if b_i == num_batches:\n", + " break\n", + "\n", + " out = model(data.x_dict, data.edge_index_dict)\n", + " loss = F.cross_entropy(out, data.y_dict['paper'])\n", + " loss.backward()\n", + " optimizer.step()\n", + " \n", + " return float(loss) / num_batches\n", + "\n", + "\n", + "@torch.no_grad()\n", + "def test():\n", + " model.eval()\n", + " test_iter = iter(test_loader)\n", + "\n", + " acc = 0.0\n", + " for _ in range(2*num_batches):\n", + " data = next(test_iter)\n", + " pred = model(data.x_dict, data.edge_index_dict).argmax(dim=-1)\n", + "\n", + " \n", + " acc += (pred == data['paper'].y).sum() / len(data['paper'])\n", + " return acc / (2*num_batches)\n", + "\n", + "\n", + "for epoch in range(1, 101):\n", + " loss = train()\n", + " train_acc = test()\n", + " print(f'Epoch: {epoch:03d}, Loss: {loss:.4f}, Train: {train_acc:.4f}')" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3.9.7 ('base')", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.7" + }, + "orig_nbformat": 4, + "vscode": { + "interpreter": { + "hash": "f708a36acfaef0acf74ccd43dfb58100269bf08fb79032a1e0a6f35bd9856f51" + } + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/python/cugraph/cugraph/experimental/datasets/metadata/karate.yaml b/python/cugraph/cugraph/experimental/datasets/metadata/karate.yaml index 9b7ac679e96..d86c7b1a241 100644 --- a/python/cugraph/cugraph/experimental/datasets/metadata/karate.yaml +++ b/python/cugraph/cugraph/experimental/datasets/metadata/karate.yaml @@ -1,19 +1,17 @@ -name: karate +name: karate-data file_type: .csv author: Zachary W. -url: https://raw.githubusercontent.com/rapidsai/cugraph/branch-22.08/datasets/karate.csv +url: https://raw.githubusercontent.com/rapidsai/cugraph/branch-22.08/datasets/karate-data.csv refs: W. W. Zachary, An information flow model for conflict and fission in small groups, Journal of Anthropological Research 33, 452-473 (1977). -delim: " " +delim: "\t" col_names: - src - dst - - wgt col_types: - int32 - int32 - - float32 has_loop: true is_directed: true is_multigraph: false diff --git a/python/cugraph/cugraph/gnn/gaas_extensions/reddit_gaas_extension.py b/python/cugraph/cugraph/gnn/gaas_extensions/reddit_gaas_extension.py index 12c6052abbd..ef33508aa2c 100644 --- a/python/cugraph/cugraph/gnn/gaas_extensions/reddit_gaas_extension.py +++ b/python/cugraph/cugraph/gnn/gaas_extensions/reddit_gaas_extension.py @@ -8,12 +8,19 @@ import numpy as np import scipy.sparse as sp import cudf +import dask_cudf +from dask.distributed import wait, default_client import cugraph import networkx as nx from cugraph.experimental import PropertyGraph +from cugraph.experimental import MGPropertyGraph -def load_reddit(sv, data_dir): - G = PropertyGraph() +def load_reddit(sv, data_dir, mg=False): + if mg: + G = MGPropertyGraph() + client = default_client() + else: + G = PropertyGraph() with open(os.path.join(data_dir, 'reddit_data.npz'), 'rb') as f: reddit_data = np.load(f) @@ -23,6 +30,9 @@ def load_reddit(sv, data_dir): features['type'] = cudf.Series(reddit_data['node_types'], dtype='int32') features.columns = features.columns.astype('str') + if mg: + features = dask_cudf.from_cudf(features, npartitions=len(client.cluster.workers)) + G.add_vertex_data(features, vertex_col_name='id') with open(os.path.join(data_dir, 'reddit_graph.npz'), 'rb') as f: @@ -32,6 +42,11 @@ def load_reddit(sv, data_dir): H = cugraph.Graph() H.from_cudf_adjlist(offsets, indices) - G.add_edge_data(H.view_edge_list(), vertex_col_names=['src','dst']) + + el = H.view_edge_list() + if mg: + el = dask_cudf.from_cudf(el, npartitions=len(client.cluster.workers)) + + G.add_edge_data(el, vertex_col_names=['src','dst']) - return G \ No newline at end of file + return G diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/__init__.py b/python/cugraph/cugraph/gnn/pyg_extensions/__init__.py index 32b8ba09db8..76d5991bb2f 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/__init__.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/__init__.py @@ -1,3 +1,5 @@ from cugraph.gnn.pyg_extensions.data import CuGraphData from cugraph.gnn.pyg_extensions.data import GaasData from cugraph.gnn.pyg_extensions.data import TorchTensorGaasGraphDataProxy +from cugraph.gnn.pyg_extensions.loader import CuGraphLinkNeighborLoader +from cugraph.gnn.pyg_extensions.loader import CuGraphNeighborLoader \ No newline at end of file diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/__init__.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/__init__.py index e9b69ae8273..0190a5f8468 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/__init__.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/__init__.py @@ -1,3 +1,6 @@ +from cugraph.gnn.pyg_extensions.data.cugraph_store import CuGraphStore +from cugraph.gnn.pyg_extensions.data.cugraph_store import CuGraphFeatureStore +from cugraph.gnn.pyg_extensions.data.cugraph_store import to_pyg from cugraph.gnn.pyg_extensions.data.cugraph_data import CuGraphData from cugraph.gnn.pyg_extensions.data.gaas_data import GaasData from cugraph.gnn.pyg_extensions.data.gaas_storage import TorchTensorGaasGraphDataProxy diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_data.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_data.py index 716afd0ef08..a4c1cd88800 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_data.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_data.py @@ -15,6 +15,7 @@ import cugraph from cugraph import Graph from cugraph.experimental import PropertyGraph +from cugraph.experimental import MGPropertyGraph from datetime import datetime from numba import cuda as ncuda @@ -32,12 +33,12 @@ class CuGraphData(BaseData, RemoteData): def __init__(self, graph:Union[Graph,PropertyGraph], device:TorchDevice=TorchDevice('cpu'), node_storage:CudfNodeStorage=None, edge_storage:CudfEdgeStorage=None, reserved_keys=[], **kwargs): super().__init__() - is_property_graph = isinstance(graph, PropertyGraph) - if is_property_graph: - if graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe.index.name != PropertyGraph.vertex_col_name: - graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe = graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe.set_index(PropertyGraph.vertex_col_name) - - graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe = graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe.fillna(0) + is_property_graph = isinstance(graph, (PropertyGraph, MGPropertyGraph)) + #if is_property_graph: + # if graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe.index.name != PropertyGraph.vertex_col_name: + # graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe = graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe.set_index(PropertyGraph.vertex_col_name) + # + # graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe = graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe.fillna(0) if node_storage is None: self.__node_storage = CudfNodeStorage( @@ -101,11 +102,6 @@ def cpu(self): return self.to('cpu') def stores_as(self, data: 'CuGraphData'): - print('store as') - print(type(data)) - print(data.x.shape) - print(data.num_nodes) - print(data.num_edges) return self @ncuda.jit diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_storage.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_storage.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py new file mode 100644 index 00000000000..6f6cea4e5b9 --- /dev/null +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py @@ -0,0 +1,433 @@ +from re import I +from cugraph.experimental import PropertyGraph +from cugraph.experimental import MGPropertyGraph + +from torch_geometric.data.feature_store import ( + FeatureStore, + TensorAttr +) +from torch_geometric.data.graph_store import ( + GraphStore, + EdgeAttr, + EdgeLayout +) + +from typing import List, Optional, Tuple, Any +from torch_geometric.typing import ( + FeatureTensorType, + EdgeTensorType +) + +from torch_geometric.loader.utils import edge_type_to_str + +import torch +import cupy +import cudf +import dask_cudf +import cugraph +from datetime import datetime + +def to_pyg(G: PropertyGraph): + return CuGraphFeatureStore(G), CuGraphStore(G) + +class CuGraphStore(GraphStore): + def __init__(self, G): + """ + G : PropertyGraph or MGPropertyGraph + The cuGraph property graph where the + data is being stored. + """ + self.__graph = G + self.__subgraphs = {} + + self.__edge_type_lookup_table = G.get_edge_data( + columns=[ + G.src_col_name, + G.dst_col_name, + G.type_col_name + ] + ) + + self.__edge_types_to_attrs = {} + for edge_type in self.__graph.edge_types: + edges = self.__graph.get_edge_data(types=[edge_type]) + dsts = edges[self.__graph.dst_col_name].unique() + srcs = edges[self.__graph.src_col_name].unique() + + if self.is_mg: + dsts = dsts.compute() + srcs = srcs.compute() + + dst_types = self.__graph.get_vertex_data(vertex_ids=dsts, columns=['_TYPE_'])._TYPE_.unique() + src_types = self.__graph.get_vertex_data(vertex_ids=srcs, columns=['_TYPE_'])._TYPE_.unique() + + if self.is_mg: + dst_types = dst_types.compute() + src_types = src_types.compute() + + if len(dst_types) > 1 or len(src_types) > 1: + raise TypeError(f'Edge type {edge_type} has multiple src/dst type pairs associated with it') + + pyg_edge_type = (src_types[0], edge_type, dst_types[0]) + + self.__edge_types_to_attrs[edge_type] = EdgeAttr( + edge_type=pyg_edge_type, + layout=EdgeLayout.COO, + is_sorted=False, + size=len(edges) + ) + + super().__init__() + + @property + def is_mg(self): + return isinstance(self.__graph, MGPropertyGraph) + + def _put_edge_index(self, edge_index: EdgeTensorType, + edge_attr: EdgeAttr) -> bool: + raise NotImplementedError('Adding indices not supported.') + + def get_all_edge_attrs(self) -> List[EdgeAttr]: + """ + Returns all edge types and indices in this store. + """ + return self.__edge_types_to_attrs.values() + + def _get_edge_index(self, attr: EdgeAttr) -> Optional[EdgeTensorType]: + # returns the edge index for particular edge type + + if attr.layout != EdgeLayout.COO: + raise TypeError('Only COO direct access is supported!') + + if len(self.__graph.edge_types) == 1: + df = self.__graph.get_edge_data( + edge_ids=None, + types=None, + columns=[ + self.__graph.src_col_name, + self.__graph.dst_col_name + ] + ) + else: + if isinstance(attr.edge_type, str): + edge_type = attr.edge_type + else: + edge_type = attr.edge_type[1] + + # FIXME unrestricted edge type names + df = self.__graph.get_edge_data( + edge_ids=None, + types=[edge_type], + columns=[ + self.__graph.src_col_name, + self.__graph.dst_col_name + ] + ) + + if self.is_mg: + df = df.compute() + + src = torch.from_dlpack(df[self.__graph.src_col_name].to_dlpack()).to(torch.long) + dst = torch.from_dlpack(df[self.__graph.dst_col_name].to_dlpack()).to(torch.long) + assert src.shape[0] == dst.shape[0] + + # dst/src are flipped in PyG + return (src, dst) + + def _subgraph(self, edge_types:Tuple[str]): + """ + Returns a subgraph with edges limited to those of a given type + """ + edge_types = tuple(edge_types) + + if edge_types not in self.__subgraphs: + query = f'(_TYPE_=="{edge_types[0]}")' + for t in edge_types[1:]: + query += f' | (_TYPE_=="{t}")' + selection = self.__graph.select_edges(query) + + sg = self.__graph.extract_subgraph( + selection=selection, + default_edge_weight=1.0, + allow_multi_edges=True, + renumber_graph=False, # FIXME enforce int type + add_edge_data=False + ) + self.__subgraphs[edge_types] = sg + + return self.__subgraphs[edge_types] + + @torch.no_grad() + def neighbor_sample( + self, + index: torch.Tensor, + num_neighbors: torch.Tensor, + replace: bool, + directed: bool, + edge_types: List[Tuple[str]]) -> Any: + + start_time = datetime.now() + + if isinstance(num_neighbors, dict): + # FIXME support variable num neighbors per edge type + num_neighbors = list(num_neighbors.values())[0] + + if not isinstance(index, torch.Tensor): + index = torch.Tensor(index) + if not isinstance(num_neighbors, torch.Tensor): + num_neighbors = torch.Tensor(num_neighbors).to(torch.long) + + if not index.is_cuda: + index = index.cuda() + if num_neighbors.is_cuda: + num_neighbors = num_neighbors.cpu() + + if not index.dtype == torch.int32: + index = index.to(torch.int32) + + if not num_neighbors.dtype == torch.int32: + num_neighbors = num_neighbors.to(torch.int32) + + index = cupy.from_dlpack(index.__dlpack__()) + + # FIXME resolve the directed/undirected issue + #G = self.graph.extract_subgraph(add_edge_data=False, default_edge_weight=1.0, allow_multi_edges=True) + G = self._subgraph([et[1] for et in edge_types]) + + sampling_start = datetime.now() + index = cudf.Series(index) + if self.is_mg: + sampling_results = cugraph.dask.uniform_neighbor_sample( + G, + index, + list(num_neighbors), # conversion required by cugraph api + replace + ) + else: + sampling_results = cugraph.uniform_neighbor_sample( + G, + index, + list(num_neighbors), # conversion required by cugraph api + replace + ) + + VERBOSE = True + + concat_fn = dask_cudf.concat if self.is_mg else cudf.concat + + end_time = datetime.now() + td = end_time - start_time + if VERBOSE: + print('first half', td.total_seconds()) + print('sampling', (end_time - sampling_start).total_seconds()) + + start_time = datetime.now() + + noi_start = datetime.now() + nodes_of_interest = concat_fn( + [sampling_results.destinations, sampling_results.sources] + ).unique() + noi_end = datetime.now() + print('noi time:', (noi_end - noi_start).total_seconds()) + + gd_start = datetime.now() + noi = self.__graph.get_vertex_data( + nodes_of_interest.compute() if self.is_mg else nodes_of_interest, + columns=[self.__graph.vertex_col_name, self.__graph.type_col_name] + ) + + gd_end = datetime.now() + print('get_vertex_data call:', (gd_end - gd_start).total_seconds()) + + noi_group_start = datetime.now() + noi_types = noi[self.__graph.type_col_name].unique() + if len(noi_types) > 1: + noi = noi.groupby(self.__graph.type_col_name) + else: + class FakeGroupBy: + def __init__(self, df): + self.df = df + + def get_group(self, g): + return self.df + noi = FakeGroupBy(noi) + + if self.is_mg: + noi_types = noi_types.compute() + noi_types = noi_types.to_pandas() + + noi_group_end = datetime.now() + print('noi group time:', (noi_group_end - noi_group_start).total_seconds()) + + # these should contain the original ids, they will be auto-renumbered + noi_groups = {} + for t in noi_types: + v = noi.get_group(t) + if self.is_mg: + v = v.compute() + noi_groups[t] = torch.from_dlpack(v[self.__graph.vertex_col_name].to_dlpack()) + + eoi_group_start = datetime.now() + eoi = cudf.merge( + sampling_results, + self.__edge_type_lookup_table, + left_on=[ + 'sources', + 'destinations' + ], + right_on=[ + self.__graph.src_col_name, + self.__graph.dst_col_name + ] + ) + eoi_types = eoi[self.__graph.type_col_name].unique() + eoi = eoi.groupby(self.__graph.type_col_name) + + if self.is_mg: + eoi_types = eoi_types.compute() + eoi_types = eoi_types.to_pandas() + + eoi_group_end = datetime.now() + print('eoi_group_time:', (eoi_group_end - eoi_group_start).total_seconds()) + + # PyG expects these to be pre-renumbered; the pre-renumbering must match + # the auto-renumbering + row_dict = {} + col_dict = {} + for t in eoi_types: + t_pyg_type = self.__edge_types_to_attrs[t].edge_type + t_pyg_c_type = edge_type_to_str(t_pyg_type) + gr = eoi.get_group(t) + if self.is_mg: + gr = gr.compute() + + sources = gr.sources + src_id_table = cudf.DataFrame( + {'id':range(len(noi_groups[t_pyg_type[0]]))}, + index=cudf.from_dlpack(noi_groups[t_pyg_type[0]].__dlpack__()) + ) + + src = torch.from_dlpack( + src_id_table.loc[sources].to_dlpack() + ) + row_dict[t_pyg_c_type] = src + + destinations = gr.destinations + dst_id_table = cudf.DataFrame( + {'id':range(len(noi_groups[t_pyg_type[2]]))}, + index=cudf.from_dlpack(noi_groups[t_pyg_type[2]].__dlpack__()) + ) + dst = torch.from_dlpack( + dst_id_table.loc[destinations].to_dlpack() + ) + col_dict[t_pyg_c_type] = dst + + end_time = datetime.now() + print('second half:', (end_time - start_time).total_seconds()) + + #FIXME handle edge ids + return (noi_groups, row_dict, col_dict, None) + + +class CuGraphFeatureStore(FeatureStore): + def __init__(self, G:PropertyGraph, reserved_keys=[]): + self.__graph = G + self.__reserved_keys = list(reserved_keys) + super().__init__() + + #TODO ensure all x properties are float32 type + #TODO ensure y is of long type + + @property + def is_mg(self): + return isinstance(self.__graph, MGPropertyGraph) + + def _put_tensor(self, tensor: FeatureTensorType, attr: TensorAttr) -> bool: + raise NotImplementedError('Adding properties not supported.') + + def create_named_tensor(self, attr:TensorAttr, properties:list) -> None: + """ + Create a named tensor that contains a subset of + properties in the graph. + """ + #FIXME implement this to allow props other than x and y + raise NotImplementedError('Not yet supported') + + def get_all_tensor_attrs(self) -> List[TensorAttr]: + r"""Obtains all tensor attributes stored in this feature store.""" + attrs = [] + for vertex_type in self.__graph.vertex_types: + #FIXME handle differing properties by type + # once property graph supports it + + #FIXME allow props other than x and y + attrs.append( + TensorAttr(vertex_type, 'x') + ) + if 'y' in self.__graph.vertex_property_names: + attrs.append( + TensorAttr(vertex_type, 'y') + ) + + return attrs + + def _get_tensor(self, attr: TensorAttr) -> Optional[FeatureTensorType]: + if attr.attr_name == 'x': + cols = None + else: + cols = [attr.attr_name] + + idx = attr.index + if not idx.is_cuda: + idx = idx.cuda() + idx = cupy.fromDlpack(idx.__dlpack__()) + + if len(self.__graph.vertex_types) == 1: + # make sure we don't waste computation if there's only 1 type + df = self.__graph.get_vertex_data( + vertex_ids=idx, + types=None, + columns=cols + ) + else: + df = self.__graph.get_vertex_data( + vertex_ids=idx, + types=[attr.group_name], + columns=cols + ) + + #FIXME allow properties other than x and y + if attr.attr_name == 'x': + if 'y' in df.columns: + df = df.drop('y', axis=1) + + idx_cols = [ + self.__graph.type_col_name, + self.__graph.vertex_col_name + ] + + for dropcol in self.__reserved_keys + idx_cols: + df = df.drop(dropcol, axis=1) + + if self.is_mg: + df = df.compute() + + #FIXME handle vertices without properties + output = torch.from_dlpack( + df.fillna(0).to_dlpack() + ) + + # FIXME look up the dtypes for x and other properties + if attr.attr_name == 'x' and output.dtype != torch.float: + output = output.to(torch.float) + + return output + + def _get_tensor_size(self, attr: TensorAttr) -> Tuple: + return self._get_tensor(attr).size() + + def _remove_tensor(self, attr: TensorAttr) -> bool: + raise NotImplementedError('Removing features not supported') + + def __len__(self): + return len(self.get_all_tensor_attrs()) \ No newline at end of file diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/loader/__init__.py b/python/cugraph/cugraph/gnn/pyg_extensions/loader/__init__.py new file mode 100644 index 00000000000..22855b1ad59 --- /dev/null +++ b/python/cugraph/cugraph/gnn/pyg_extensions/loader/__init__.py @@ -0,0 +1,2 @@ +from cugraph.gnn.pyg_extensions.loader.link_neighbor_loader import CuGraphLinkNeighborLoader +from cugraph.gnn.pyg_extensions.loader.neighbor_loader import CuGraphNeighborLoader \ No newline at end of file diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py b/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py new file mode 100644 index 00000000000..66fc4b6df97 --- /dev/null +++ b/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py @@ -0,0 +1,297 @@ +from torch_geometric.loader.link_neighbor_loader import Dataset +from cugraph.gnn.pyg_extensions.loader.neighbor_loader import CuGraphNeighborSampler +from cugraph.gnn.pyg_extensions.loader.neighbor_loader import CuGraphNeighborLoader + +from typing import Any, Callable, Iterator, List, Optional, Tuple, Union + +import torch +from torch import Tensor + +from torch_geometric.data import Data, HeteroData +from torch_geometric.data.feature_store import FeatureStore +from torch_geometric.data.graph_store import ( + GraphStore, + EdgeAttr, + EdgeLayout +) +from torch_geometric.loader.base import DataLoaderIterator +from torch_geometric.loader.utils import filter_custom_store +from torch_geometric.typing import InputEdges, NumNeighbors, OptTensor + +class CuGraphLinkNeighborSampler(CuGraphNeighborSampler): + def __init__( + self, + data, + *args, + neg_sampling_ratio: float = 0.0, + num_src_nodes: Optional[int] = None, + num_dst_nodes: Optional[int] = None, + **kwargs, + ): + super().__init__(data, *args, **kwargs) + self.neg_sampling_ratio = neg_sampling_ratio + + _, graph_store = data + edge_attrs = graph_store.get_all_edge_attrs() + edge_types = [attr.edge_type for attr in edge_attrs] + + # Edge label index is part of the graph. + if self.input_type in edge_types: + self.num_src_nodes, self.num_dst_nodes = edge_attrs[ + edge_types.index(self.input_type)].size + + else: + self.num_src_nodes = num_src_nodes + self.num_dst_nodes = num_dst_nodes + + def _create_label(self, edge_label_index, edge_label): + device = edge_label_index.device + + num_pos_edges = edge_label_index.size(1) + num_neg_edges = int(num_pos_edges * self.neg_sampling_ratio) + + if num_neg_edges == 0: + return edge_label_index, edge_label + + if edge_label is None: + edge_label = torch.ones(num_pos_edges, device=device) + else: + assert edge_label.dtype == torch.long + edge_label = edge_label + 1 + + neg_row = torch.randint(self.num_src_nodes, (num_neg_edges, )) + neg_col = torch.randint(self.num_dst_nodes, (num_neg_edges, )) + neg_edge_label_index = torch.stack([neg_row, neg_col], dim=0) + + neg_edge_label = edge_label.new_zeros((num_neg_edges, ) + + edge_label.size()[1:]) + + edge_label_index = torch.cat([ + edge_label_index, + neg_edge_label_index, + ], dim=1) + + edge_label = torch.cat([edge_label, neg_edge_label], dim=0) + + return edge_label_index, edge_label + + def __call__(self, query: List[Tuple[Tensor]]): + query = [torch.tensor(s) for s in zip(*query)] + if len(query) == 2: + edge_label_index = torch.stack(query, dim=0) + edge_label = None + else: + edge_label_index = torch.stack(query[:2], dim=0) + edge_label = query[2] + + edge_label_index, edge_label = self._create_label( + edge_label_index, edge_label) + + # CuGraph can pull vertices of any type + # Edges can be from/to any arbitrary types (many to many) + # Merge both source and destination node indices: + query_nodes = edge_label_index.view(-1) + query_nodes, reverse = query_nodes.unique(return_inverse=True) + edge_label_index = reverse.view(2, -1) + + out = self.graph_store.neighbor_sample( + query_nodes, + self.num_neighbors, + self.replace, + self.directed, + self.edge_types + ) + + # Call cuGraph sampler + return out + (edge_label_index, edge_label) + +class CuGraphLinkNeighborLoader(torch.utils.data.DataLoader): + r"""A link-based data loader derived as an extension of the node-based + :class:`torch_geometric.loader.NeighborLoader`. + This loader allows for mini-batch training of GNNs on large-scale graphs + where full-batch training is not feasible. + + More specifically, this loader first selects a sample of edges from the + set of input edges :obj:`edge_label_index` (which may or not be edges in + the original graph) and then constructs a subgraph from all the nodes + present in this list by sampling :obj:`num_neighbors` neighbors in each + iteration. + + Args: + data (Tuple[FeatureStore, GraphStore]): + The feature and graph stores for the cugraph graph. + num_neighbors (List[int] or Dict[Tuple[str, str, str], List[int]]): The + number of neighbors to sample for each node in each iteration. + In heterogeneous graphs, may also take in a dictionary denoting + the amount of neighbors to sample for each individual edge type. + If an entry is set to :obj:`-1`, all neighbors will be included. + edge_label_index (Tensor or EdgeType or Tuple[EdgeType, Tensor]): + The edge indices for which neighbors are sampled to create + mini-batches. + If set to :obj:`None`, all edges will be considered. + In heterogeneous graphs, needs to be passed as a tuple that holds + the edge type and corresponding edge indices. + (default: :obj:`None`) + edge_label (Tensor): The labels of edge indices for which neighbors are + sampled. Must be the same length as the :obj:`edge_label_index`. + If set to :obj:`None` then no labels are returned in the batch. + num_src_nodes (optional, int): Not supported. + num_dst_nodes (optional, int): Not support. + replace (bool, optional): If set to :obj:`True`, will sample with + replacement. (default: :obj:`False`) + directed (bool, optional): If set to :obj:`False`, will include all + edges between all sampled nodes. (default: :obj:`True`) + neg_sampling_ratio (float, optional): The ratio of sampled negative + edges to the number of positive edges. + If :obj:`edge_label` does not exist, it will be automatically + created and represents a binary classification task + (:obj:`1` = edge, :obj:`0` = no edge). + If :obj:`edge_label` exists, it has to be a categorical label from + :obj:`0` to :obj:`num_classes - 1`. + After negative sampling, label :obj:`0` represents negative edges, + and labels :obj:`1` to :obj:`num_classes` represent the labels of + positive edges. + Note that returned labels are of type :obj:`torch.float` for binary + classification (to facilitate the ease-of-use of + :meth:`F.binary_cross_entropy`) and of type + :obj:`torch.long` for multi-class classification (to facilitate the + ease-of-use of :meth:`F.cross_entropy`). (default: :obj:`0.0`). + time_attr (str, optional): The name of the attribute that denotes + timestamps for the nodes in the graph. + If set, temporal sampling will be used such that neighbors are + guaranteed to fulfill temporal constraints, *i.e.* neighbors have + an earlier timestamp than the center node. (default: :obj:`None`) + transform (Callable, optional): A function/transform that takes in + a sampled mini-batch and returns a transformed version. + (default: :obj:`None`) + is_sorted (bool, optional): Not supported. + filter_per_worker (bool, optional): If set to :obj:`True`, will filter + the returning data in each worker's subprocess rather than in the + main process. + Setting this to :obj:`True` is generally not recommended: + (1) it may result in too many open file handles, + (2) it may slown down data loading, + (3) it requires operating on CPU tensors. + (default: :obj:`False`) + **kwargs (optional): Additional arguments of + :class:`torch.utils.data.DataLoader`, such as :obj:`batch_size`, + :obj:`shuffle`, :obj:`drop_last` or :obj:`num_workers`. + """ + def __init__( + self, + data: Tuple[FeatureStore, GraphStore], + num_neighbors: NumNeighbors, + edge_label_index: InputEdges = None, + edge_label: OptTensor = None, + num_src_nodes: Optional[int] = None, + num_dst_nodes: Optional[int] = None, + replace: bool = False, + directed: bool = True, + neg_sampling_ratio: float = 0.0, + time_attr: Optional[str] = None, + transform: Callable = None, + is_sorted: bool = False, + filter_per_worker: bool = False, + neighbor_sampler: Optional[CuGraphLinkNeighborSampler] = None, + **kwargs, + ): + # Remove for PyTorch Lightning: + if 'dataset' in kwargs: + del kwargs['dataset'] + if 'collate_fn' in kwargs: + del kwargs['collate_fn'] + + if num_src_nodes is not None: + raise ValueError('num_src_nodes parameter is not supported!') + if num_dst_nodes is not None: + raise ValueError('num_dst_nodes parameter is not supported!') + if is_sorted is not False: + raise ValueError('is_sorted parameter must be false!') + + self.data = data + + # Save for PyTorch Lightning < 1.6: + self.num_neighbors = num_neighbors + self.edge_label_index = edge_label_index + self.edge_label = edge_label + self.replace = replace + self.directed = directed + self.neg_sampling_ratio = neg_sampling_ratio + self.transform = transform + self.filter_per_worker = filter_per_worker + self.neighbor_sampler = neighbor_sampler + + edge_type, edge_label_index = get_edge_label_index( + data, edge_label_index) + + if neighbor_sampler is None: + self.neighbor_sampler = CuGraphLinkNeighborSampler( + data, + num_neighbors, + replace, + directed, + input_type=edge_type, + neg_sampling_ratio=self.neg_sampling_ratio, + time_attr=time_attr, + share_memory=kwargs.get('num_workers', 0) > 0, + ) + + super().__init__(Dataset(edge_label_index, edge_label), + collate_fn=self.collate_fn, **kwargs) + + def filter_fn(self, out: Any) -> Union[Data, HeteroData]: + (node_dict, row_dict, col_dict, edge_dict, edge_label_index, + edge_label) = out + feature_store, graph_store = self.data + + data = filter_custom_store(feature_store, graph_store, node_dict, + row_dict, col_dict, edge_dict) + edge_type = self.neighbor_sampler.input_type + data[edge_type].edge_label_index = edge_label_index + if edge_label is not None: + data[edge_type].edge_label = edge_label + + return data if self.transform is None else self.transform(data) + + def collate_fn(self, index: Union[List[int], Tensor]) -> Any: + out = self.neighbor_sampler(index) + if self.filter_per_worker: + # We execute `filter_fn` in the worker process. + out = self.filter_fn(out) + return out + + def _get_iterator(self) -> Iterator: + if self.filter_per_worker: + return super()._get_iterator() + # We execute `filter_fn` in the main process. + return DataLoaderIterator(super()._get_iterator(), self.filter_fn) + + def __repr__(self) -> str: + return f'{self.__class__.__name__}()' + + +def get_edge_label_index(data: Tuple[FeatureStore, GraphStore], + edge_label_index: InputEdges + ) -> Tuple[Optional[str], Tensor]: + _, graph_store = data + + # Need the edge index in COO for LinkNeighborLoader: + def _get_edge_index(edge_type): + row, col = graph_store.get_edge_index( + edge_type=edge_type, + layout=EdgeLayout.COO, + is_sorted=False + ) + return torch.stack((row, col), dim=0) + + if isinstance(edge_label_index, str) or isinstance(edge_label_index[0], str): + edge_type = edge_label_index + return edge_type, _get_edge_index(edge_type) + + assert len(edge_label_index) == 2 + edge_type, edge_label_index = edge_label_index + + if edge_label_index is None: + return edge_type, _get_edge_index(edge_type) + + return edge_type, edge_label_index \ No newline at end of file diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/loader/neighbor_loader.py b/python/cugraph/cugraph/gnn/pyg_extensions/loader/neighbor_loader.py new file mode 100644 index 00000000000..9685b414f5f --- /dev/null +++ b/python/cugraph/cugraph/gnn/pyg_extensions/loader/neighbor_loader.py @@ -0,0 +1,262 @@ +from collections.abc import Sequence +from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union + +import torch +from torch import Tensor + +from torch_geometric.data import Data, HeteroData +from torch_geometric.data.feature_store import FeatureStore, TensorAttr +from torch_geometric.data.graph_store import GraphStore +from torch_geometric.loader.base import DataLoaderIterator +from torch_geometric.loader.neighbor_loader import get_input_nodes +from torch_geometric.loader.utils import ( + edge_type_to_str, + filter_custom_store +) +from torch_geometric.typing import InputNodes, NumNeighbors + + +class CuGraphNeighborSampler: + def __init__( + self, + data: Tuple[FeatureStore, GraphStore], + num_neighbors: NumNeighbors, + replace: bool = False, + directed: bool = True, + input_type: Optional[Any] = None, + time_attr: Optional[str] = None, + is_sorted: bool = False, + share_memory: bool = False, + ): + self.num_neighbors = num_neighbors + self.replace = replace + self.directed = directed + self.node_time = None + + feature_store, graph_store = data + + self.node_time_dict = None + if time_attr is not None: + # We need to obtain all features with 'attr_name=time_attr' + # from the feature store and store them in node_time_dict. To + # do so, we make an explicit feature store GET call here with + # the relevant 'TensorAttr's + time_attrs = [ + attr for attr in feature_store.get_all_tensor_attrs() + if attr.attr_name == time_attr + ] + for attr in time_attrs: + attr.index = None + time_tensors = feature_store.multi_get_tensor(time_attrs) + self.node_time_dict = { + time_attr.group_name: time_tensor + for time_attr, time_tensor in zip(time_attrs, time_tensors) + } + + # Obtain all node and edge metadata: + node_attrs = feature_store.get_all_tensor_attrs() + edge_attrs = graph_store.get_all_edge_attrs() + + self.node_types = list( + set(node_attr.group_name for node_attr in node_attrs)) + self.edge_types = list( + set(edge_attr.edge_type for edge_attr in edge_attrs)) + + # Set other required parameters: + self._set_num_neighbors_and_num_hops(num_neighbors) + + assert input_type is not None + self.input_type = input_type + + self.feature_store = feature_store + self.graph_store = graph_store + + def _set_num_neighbors_and_num_hops(self, num_neighbors): + if isinstance(num_neighbors, (list, tuple)): + num_neighbors = {key: num_neighbors for key in self.edge_types} + assert isinstance(num_neighbors, dict) + self.num_neighbors = { + edge_type_to_str(key): value + for key, value in num_neighbors.items() + } + # Add at least one element to the list to ensure `max` is well-defined + self.num_hops = max([0] + [len(v) for v in num_neighbors.values()]) + + def __call__(self, index: Union[List[int], Tensor]): + if not isinstance(index, torch.LongTensor): + index = torch.LongTensor(index) + + out = self.graph_store.neighbor_sample( + index, + self.num_neighbors, + self.replace, + self.directed, + self.edge_types + ) + + # call cugraph sampler + return out + (index.numel(), ) + + +class CuGraphNeighborLoader(torch.utils.data.DataLoader): + r"""A data loader that performs neighbor sampling as introduced in the + `"Inductive Representation Learning on Large Graphs" + `_ paper. + This loader allows for mini-batch training of GNNs on large-scale graphs + where full-batch training is not feasible. + + More specifically, :obj:`num_neighbors` denotes how much neighbors are + sampled for each node in each iteration. + :class:`~torch_geometric.loader.NeighborLoader` takes in this list of + :obj:`num_neighbors` and iteratively samples :obj:`num_neighbors[i]` for + each node involved in iteration :obj:`i - 1`. + + Sampled nodes are sorted based on the order in which they were sampled. + In particular, the first :obj:`batch_size` nodes represent the set of + original mini-batch nodes. + + By default, the data loader will only include the edges that were + originally sampled (:obj:`directed = True`). + This option should only be used in case the number of hops is equivalent to + the number of GNN layers. + In case the number of GNN layers is greater than the number of hops, + consider setting :obj:`directed = False`, which will include all edges + between all sampled nodes (but is slightly slower as a result). + + .. note:: + + For an example of using + :class:`~torch_geometric.loader.NeighborLoader`, see + `examples/hetero/to_hetero_mag.py `_. + + The :class:`~torch_geometric.loader.NeighborLoader` will return subgraphs + where global node indices are mapped to local indices corresponding to this + specific subgraph. However, often times it is desired to map the nodes of + the current subgraph back to the global node indices. A simple trick to + achieve this is to include this mapping as part of the :obj:`data` object: + + .. code-block:: python + + # Assign each node its global node index: + data.n_id = torch.arange(data.num_nodes) + + loader = NeighborLoader(data, ...) + sampled_data = next(iter(loader)) + print(sampled_data.n_id) + + Args: + data (torch_geometric.data.Data or torch_geometric.data.HeteroData): + The :class:`~torch_geometric.data.Data` or + :class:`~torch_geometric.data.HeteroData` graph object. + num_neighbors (List[int] or Dict[Tuple[str, str, str], List[int]]): The + number of neighbors to sample for each node in each iteration. + In heterogeneous graphs, may also take in a dictionary denoting + the amount of neighbors to sample for each individual edge type. + If an entry is set to :obj:`-1`, all neighbors will be included. + input_nodes (torch.Tensor or str or Tuple[str, torch.Tensor]): The + indices of nodes for which neighbors are sampled to create + mini-batches. + Needs to be either given as a :obj:`torch.LongTensor` or + :obj:`torch.BoolTensor`. + If set to :obj:`None`, all nodes will be considered. + In heterogeneous graphs, needs to be passed as a tuple that holds + the node type and node indices. (default: :obj:`None`) + replace (bool, optional): If set to :obj:`True`, will sample with + replacement. (default: :obj:`False`) + directed (bool, optional): If set to :obj:`False`, will include all + edges between all sampled nodes. (default: :obj:`True`) + time_attr (str, optional): The name of the attribute that denotes + timestamps for the nodes in the graph. + If set, temporal sampling will be used such that neighbors are + guaranteed to fulfill temporal constraints, *i.e.* neighbors have + an earlier timestamp than the center node. (default: :obj:`None`) + transform (Callable, optional): A function/transform that takes in + a sampled mini-batch and returns a transformed version. + (default: :obj:`None`) + is_sorted (bool, optional): Not supported + filter_per_worker (bool, optional): If set to :obj:`True`, will filter + the returning data in each worker's subprocess rather than in the + main process. + Setting this to :obj:`True` is generally not recommended: + (1) it may result in too many open file handles, + (2) it may slown down data loading, + (3) it requires operating on CPU tensors. + (default: :obj:`False`) + **kwargs (optional): Additional arguments of + :class:`torch.utils.data.DataLoader`, such as :obj:`batch_size`, + :obj:`shuffle`, :obj:`drop_last` or :obj:`num_workers`. + """ + def __init__( + self, + data: Tuple[FeatureStore, GraphStore], + num_neighbors: NumNeighbors, + input_nodes: InputNodes = None, + replace: bool = False, + directed: bool = True, + time_attr: Optional[str] = None, + transform: Callable = None, + is_sorted: bool = False, + filter_per_worker: bool = False, + neighbor_sampler: Optional[CuGraphNeighborSampler] = None, + **kwargs, + ): + # Remove for PyTorch Lightning: + if 'dataset' in kwargs: + del kwargs['dataset'] + if 'collate_fn' in kwargs: + del kwargs['collate_fn'] + + if is_sorted is not False: + raise ValueError('is_sorted must be false') + + self.data = data + + # Save for PyTorch Lightning < 1.6: + self.num_neighbors = num_neighbors + self.input_nodes = input_nodes + self.replace = replace + self.directed = directed + self.transform = transform + self.filter_per_worker = filter_per_worker + self.neighbor_sampler = neighbor_sampler + + node_type, input_nodes = get_input_nodes(data, input_nodes) + + if neighbor_sampler is None: + self.neighbor_sampler = CuGraphNeighborSampler( + data, + num_neighbors, + replace, + directed, + input_type=node_type, + time_attr=time_attr, + share_memory=kwargs.get('num_workers', 0) > 0, + ) + + super().__init__(input_nodes, collate_fn=self.collate_fn, **kwargs) + + def filter_fn(self, out: Any) -> HeteroData: + node_dict, row_dict, col_dict, edge_dict, batch_size = out + feature_store, graph_store = self.data + data = filter_custom_store(feature_store, graph_store, node_dict, + row_dict, col_dict, edge_dict) + data[self.neighbor_sampler.input_type].batch_size = batch_size + + return data if self.transform is None else self.transform(data) + + def collate_fn(self, index: Union[List[int], Tensor]) -> Any: + out = self.neighbor_sampler(index) + if self.filter_per_worker: + # We execute `filter_fn` in the worker process. + out = self.filter_fn(out) + return out + + def _get_iterator(self) -> Iterator: + if self.filter_per_worker: + return super()._get_iterator() + # We execute `filter_fn` in the main process. + return DataLoaderIterator(super()._get_iterator(), self.filter_fn) + + def __repr__(self) -> str: + return f'{self.__class__.__name__}()' From 1e4bde071ccc6225e367ba5ae15645ecc7b0aff8 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Thu, 11 Aug 2022 21:50:10 +0000 Subject: [PATCH 43/71] remove old api classes --- .../gnn/pyg_extensions/data/cugraph_data.py | 330 ------------------ .../gnn/pyg_extensions/data/gaas_data.py | 180 ---------- .../gnn/pyg_extensions/data/gaas_storage.py | 220 ------------ 3 files changed, 730 deletions(-) delete mode 100644 python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_data.py delete mode 100644 python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_data.py delete mode 100644 python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_storage.py diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_data.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_data.py deleted file mode 100644 index a4c1cd88800..00000000000 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_data.py +++ /dev/null @@ -1,330 +0,0 @@ -from typing import Any, Union, List -from torch_geometric.data.storage import BaseStorage, EdgeStorage, NodeStorage - -import torch -from torch_geometric.data.data import BaseData, RemoteData, Data -from torch import device as TorchDevice -from torch import Tensor -from torch_sparse import SparseTensor -from cugraph.gnn.pyg_extensions.data.cudf_storage import CudfEdgeStorage, CudfNodeStorage - -import numpy as np -import cupy -import cudf - -import cugraph -from cugraph import Graph -from cugraph.experimental import PropertyGraph -from cugraph.experimental import MGPropertyGraph -from datetime import datetime - -from numba import cuda as ncuda - -class CuGraphData(BaseData, RemoteData): - reserved_keys = [ - PropertyGraph.vertex_col_name, - PropertyGraph.src_col_name, - PropertyGraph.dst_col_name, - PropertyGraph.type_col_name, - PropertyGraph.edge_id_col_name, - PropertyGraph.vertex_id_col_name, - PropertyGraph.weight_col_name - ] - def __init__(self, graph:Union[Graph,PropertyGraph], device:TorchDevice=TorchDevice('cpu'), node_storage:CudfNodeStorage=None, edge_storage:CudfEdgeStorage=None, reserved_keys=[], **kwargs): - super().__init__() - - is_property_graph = isinstance(graph, (PropertyGraph, MGPropertyGraph)) - #if is_property_graph: - # if graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe.index.name != PropertyGraph.vertex_col_name: - # graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe = graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe.set_index(PropertyGraph.vertex_col_name) - # - # graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe = graph._EXPERIMENTAL__PropertyGraph__vertex_prop_dataframe.fillna(0) - - if node_storage is None: - self.__node_storage = CudfNodeStorage( - dataframe=graph._vertex_prop_dataframe if is_property_graph \ - else cudf.DataFrame( - cudf.Series(cupy.arange(graph.number_of_vertices()), - name=PropertyGraph.vertex_col_name) - ), - device=device, - parent=self, - reserved_keys=CuGraphData.reserved_keys + reserved_keys, - vertex_col_name=PropertyGraph.vertex_col_name, - **kwargs - ) - else: - self.__node_storage = node_storage - - if edge_storage is None: - self.__edge_storage = CudfEdgeStorage( - dataframe=graph._edge_prop_dataframe if is_property_graph else graph.edgelist_df, - device=device, - parent=self, - reserved_keys=CuGraphData.reserved_keys + reserved_keys, - src_col_name=PropertyGraph.src_col_name if is_property_graph else 'src', - dst_col_name=PropertyGraph.dst_col_name if is_property_graph else 'dst', - **kwargs - ) - else: - self.__edge_storage = edge_storage - - self.graph = graph - self.device = device - self.__extracted_subgraph = None - - @property - def _extracted_subgraph(self) -> cugraph.Graph: - if self.__extracted_subgraph is None: - self.__extracted_subgraph = cugraph.Graph(directed=True) - self.__extracted_subgraph.from_cudf_edgelist( - self.graph._edge_prop_dataframe.join(cudf.Series(cupy.ones(len(self.graph._edge_prop_dataframe), dtype='float32'), name='weight')), - source=PropertyGraph.src_col_name, - destination=PropertyGraph.dst_col_name, - edge_attr='weight', - renumber=False, - ) - - return self.__extracted_subgraph - - def to(self, to_device: TorchDevice) -> BaseData: - return CuGraphData( - graph=self.graph, - device=TorchDevice(to_device), - node_storage=self.__node_storage.to(to_device), - edge_storage=self.__edge_storage.to(to_device) - ) - - def cuda(self): - return self.to('cuda') - - def cpu(self): - return self.to('cpu') - - def stores_as(self, data: 'CuGraphData'): - return self - - @ncuda.jit - def select(A, B, I): - i, j = ncuda.grid(2) - stride_i, stride_j = ncuda.gridsize(2) - for irow in range(i, I.shape[0], stride_i): - for icol in range(j, B.shape[1], stride_j): - B[irow, icol] = A[I[irow], icol] - - @torch.no_grad() - def neighbor_sample( - self, - index: Tensor, - num_neighbors: Tensor, - replace: bool, - directed: bool) -> Any: - - start_time = datetime.now() - - if not isinstance(index, Tensor): - index = Tensor(index).to(torch.long) - if not isinstance(num_neighbors, Tensor): - num_neighbors = Tensor(num_neighbors).to(torch.long) - - index = index.to(self.device) - num_neighbors = num_neighbors.to(self.device) - - if self.device == 'cpu': - index = np.array(index) - # num_neighbors is required to be on the cpu per cugraph api - num_neighbors = np.array(num_neighbors) - else: - index = cupy.from_dlpack(index.__dlpack__()) - # num_neighbors is required to be on the cpu per cugraph api - num_neighbors = cupy.from_dlpack(num_neighbors.__dlpack__()).get() - - is_property_graph = isinstance(self.graph, PropertyGraph) - - if is_property_graph: - # FIXME resolve the renumbering issue with extract_subgraph so it can be used here - #G = self.graph.extract_subgraph(add_edge_data=False, default_edge_weight=1.0, allow_multi_edges=True) - G = self._extracted_subgraph - else: - if self.graph.is_directed() == directed: - G = self.graph - elif directed: - G = self.graph.to_directed() - else: - G = self.graph.to_undirected() - - sampling_start = datetime.now() - index = cudf.Series(index) - sampling_results = cugraph.uniform_neighbor_sample( - G, - index, - list(num_neighbors), # conversion required by cugraph api - replace - ) - - VERBOSE = False - - end_time = datetime.now() - td = end_time - start_time - if VERBOSE: - print('first half', td.total_seconds()) - print('sampling', (end_time - sampling_start).total_seconds()) - - start_time = datetime.now() - - noi_start = datetime.now() - nodes_of_interest = cudf.concat([sampling_results.destinations, sampling_results.sources]).unique().to_cupy(dtype='long') - noi_tensor = torch.from_dlpack(nodes_of_interest.toDlpack()) - noi_end = datetime.now() - if VERBOSE: - print('noi time:', (noi_end - noi_start).total_seconds()) - - renumber_start = datetime.now() - rda = cupy.stack([nodes_of_interest, cupy.arange(len(nodes_of_interest), dtype='long')], axis=-1) - rda = cupy.sort(rda,axis=0) - - ixe = cupy.searchsorted(rda[:,0], cupy.concatenate([sampling_results.destinations.to_cupy(), sampling_results.sources.to_cupy()])) - eix = rda[ixe,1].reshape((2, len(sampling_results.sources))) - - ei = torch.from_dlpack(eix.toDlpack()) - - renumber_end = datetime.now() - if VERBOSE: - print('renumber time:', (renumber_end - renumber_start).total_seconds()) - - if is_property_graph: - iloc_start = datetime.now() - - sampled_y = self.y - if sampled_y is not None: - sampled_y = sampled_y[noi_tensor] - #sampled_y = torch.from_dlpack(self.__node_storage.y[nodes_of_interest].toDlpack()) - - - #sampled_x = self.x[noi_tensor] - #sampled_x = torch.from_dlpack(self.__node_storage._data[self.__node_storage._feature_names].to_cupy()[nodes_of_interest].toDlpack()) - cupy_start = datetime.now() - A = self.__node_storage._x_cupy - cupy_end = datetime.now() - if VERBOSE: - print('cupy time:', (cupy_end - cupy_start).total_seconds()) - B = cupy.empty((len(nodes_of_interest), A.shape[1]), dtype='float32') - I = nodes_of_interest - kernel_start = datetime.now() - CuGraphData.select[128,1024](A, B, I) - kernel_end = datetime.now() - if VERBOSE: - print('kernel time:', (kernel_end - kernel_start).total_seconds()) - sampled_x = torch.from_dlpack(B.toDlpack()) - - #CuGraphData.select(self.__node_storage._data[self.__node_storage._feature_names].to_cupy(), B, nodes_of_interest.to_cupy()) - - iloc_end = datetime.now() - if VERBOSE: - print('iloc time:', (iloc_end - iloc_start).total_seconds()) - - data = Data( - x=sampled_x, - edge_index=ei, - edge_attr=None, - y=sampled_y - ) - - else: - data = Data( - x=None, - edge_index=ei, - edge_attr=None, - y=None - ) - - end_time = datetime.now() - td = end_time - start_time - if VERBOSE: - print('second half', td.total_seconds()) - - return data - - def __remove_internal_columns(self, input_cols, additional_columns_to_remove=[]): - internal_columns = CuGraphData.reserved_keys + additional_columns_to_remove - - # Create a list of user-visible columns by removing the internals while - # preserving order - output_cols = list(input_cols) - for col_name in internal_columns: - if col_name in output_cols: - output_cols.remove(col_name) - - return output_cols - - def extract_subgraph( - self, - node: Tensor, - edges: Tensor, - enumerated_edges: Tensor, - perm: Tensor) -> Any: - """ - node: Nodes to extract - edges: Edges to extract (0: src, 1: dst) - enumerated_edges: Numbered edges to extract - """ - raise NotImplementedError - - @property - def stores(self) -> List[BaseStorage]: - return [self.__node_storage, self.__edge_storage] - - @property - def node_stores(self) -> List[NodeStorage]: - return [self.__node_storage] - - @property - def edge_stores(self) -> List[EdgeStorage]: - return [self.__edge_storage] - - def __getattr__(self, key:str) -> Any: - if key in self.__dict__: - return self.__dict__[key] - - try: - return self.__node_storage[key] - except AttributeError: - try: - return self.__edge_storage[key] - except AttributeError: - raise AttributeError(key) - - - def __setattr__(self, key:str, value:Any): - self.__dict__[key] = value - - def __getitem__(self, key: str) -> Any: - if not isinstance(key, str): - print(key, 'is not string') - return getattr(self, key) - - def __setitem__(self, key: str, value: Any): - raise NotImplementedError() - - def stores_as(self, data: 'CuGraphData'): - return self - - @property - def is_cuda(self) -> bool: - return self.device.type == 'cuda' - - def __cat_dim__(self, key: str, value: Any, *args, **kwargs) -> Any: - if isinstance(value, SparseTensor) and 'adj' in key: - return (0, 1) - elif 'index' in key or key == 'face': - return -1 - else: - return 0 - - def __inc__(self, key: str, value: Any, *args, **kwargs) -> Any: - if 'batch' in key: - return int(value.max()) + 1 - elif 'index' in key or key == 'face': - return self.num_nodes - else: - return 0 \ No newline at end of file diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_data.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_data.py deleted file mode 100644 index 482a1ba0a1e..00000000000 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_data.py +++ /dev/null @@ -1,180 +0,0 @@ -from typing import Any -from torch_geometric.typing import Tensor - -import torch -from torch import device as TorchDevice -from torch.utils.data import IterableDataset -from torch_geometric.data import Data, RemoteData -from cugraph.gnn.pyg_extensions.data.gaas_storage import GaasStorage - -from gaas_client.client import GaasClient -from gaas_client.defaults import graph_id as DEFAULT_GRAPH_ID - -import numpy as np -import pandas as pd -import cupy -import cudf - -class GaasData(Data, RemoteData, IterableDataset): - def __init__(self, gaas_client: GaasClient, graph_id: int=DEFAULT_GRAPH_ID, device=TorchDevice('cpu'), - ephemeral=False, batch_size=1, shuffle=False): - super().__init__() - - # have to access __dict__ here to ensure the store is a GaasStorage - storage = GaasStorage(gaas_client, graph_id, device=device, parent=self) - self.__dict__['_store'] = storage - self.device = device - self.ephemeral = ephemeral - self.batch_size = batch_size - self.shuffle = shuffle - self.__extracted_subgraph = None - self.__iters = 0 - - def __del__(self): - print('destroying a gaasdata object') - if self.ephemeral: - self.gaas_client.delete_graph(self.gaas_graph_id) - if self.__extracted_subgraph is not None: - self.gaas_client.delete_graph(self.__extracted_subgraph) - - def __next__(self): - #FIXME handle shuffle - if self.shuffle: - raise NotImplementedError('shuffle currently not supported') - - start = self.__iters * self.batch_size - end = min(self.num_edges, (1 + self.__iters) * self.batch_size) - if start >= self.num_edges: - raise StopIteration - batch_idx = range(start, end) - - self.__iters += 1 - - eix = self.edge_index[-1, batch_idx] - - #FIXME property handle edge labels - eli = torch.zeros(eix.shape[1], dtype=torch.long, device=self.device) - - yield eix, eli - - def __iter__(self): - self.reset_iter() - return self - - def reset_iter(self): - self.__iters__ = 0 - - def to(self, to_device: TorchDevice) -> Data: - return GaasData( - gaas_client=self.gaas_client, - graph_id=self.gaas_graph_id, - device=TorchDevice(to_device), - ephemeral=self.ephemeral, - batch_size=self.batch_size, - shuffle=self.shuffle - ) - - def cuda(self): - return self.to('cuda') - - def cpu(self): - return self.to('cpu') - - def stores_as(self, data: 'Data'): - return self - - def neighbor_sample( - self, - index: Tensor, - num_neighbors: Tensor, - replace: bool, - directed: bool) -> Any: - - if directed is False: - raise NotImplementedError('Undirected support not available') - - if isinstance(index, torch.Tensor): - index = index.to('cpu') - if isinstance(num_neighbors, torch.Tensor): - num_neighbors = num_neighbors.to('cpu') - - sampling_results = self.gaas_client.uniform_neighbor_sample( - np.array(index, dtype='int32'), - np.array(num_neighbors, dtype='int32'), - replace, - self.extracted_subgraph - ) - - toseries_fn = pd.Series if self.device == 'cpu' else cudf.Series - concat_fn = pd.concat if self.device == 'cpu' else cudf.concat - stack_fn = np.stack if self.device == 'cpu' else cupy.stack - sort_fn = np.sort if self.device == 'cpu' else cupy.sort - searchsorted_fn = np.searchsorted if self.device == 'cpu' else cupy.searchsorted - arrayconcat_fn = np.concatenate if self.device == 'cpu' else cupy.concatenate - arange_fn = np.arange if self.device == 'cpu' else cupy.arange - toarray_fn = pd.Series.to_numpy if self.device == 'cpu' else cudf.Series.to_cupy - - destinations = toseries_fn(sampling_results.destinations) - sources = toseries_fn(sampling_results.sources) - - nodes_of_interest = toarray_fn(concat_fn([destinations, sources], axis=0).unique(), dtype='long') - if self.device == 'cpu': - noi_tensor = Tensor(nodes_of_interest) - else: - noi_tensor = torch.from_dlpack(nodes_of_interest.toDlpack()) - - - rda = stack_fn([nodes_of_interest, arange_fn(len(nodes_of_interest), dtype='long')], axis=-1) - rda = sort_fn(rda,axis=0) - - ixe = searchsorted_fn(rda[:,0], arrayconcat_fn([toarray_fn(destinations), toarray_fn(sources)])) - eix = rda[ixe,1].reshape((2, len(sources))) - - if self.device == 'cpu': - ei = Tensor(eix) - else: - ei = torch.from_dlpack(eix.toDlpack()) - - sampled_y = self.y - if sampled_y is not None: - sampled_y = sampled_y[noi_tensor] - - sampled_x = self.x[noi_tensor] - - data = Data( - x=sampled_x, - edge_index=ei, - edge_attr=None, - y=sampled_y - ) - - return data - - @property - def extracted_subgraph(self) -> int: - if self.__extracted_subgraph is None: - sG = self.gaas_client.extract_subgraph( - default_edge_weight=1.0, - allow_multi_edges=True, - renumber_graph=False, - add_edge_data=False, - graph_id=self.gaas_graph_id - ) - self.__extracted_subgraph = sG - - return self.__extracted_subgraph - - - - def extract_subgraph( - self, - node: Tensor, - edges: Tensor, - enumerated_edges: Tensor, - perm: Tensor) -> Any: - """ - node: Nodes to extract - edges: Edges to extract (0: src, 1: dst) - enumerated_edges: Numbered edges to extract - """ - raise NotImplementedError \ No newline at end of file diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_storage.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_storage.py deleted file mode 100644 index d86ba6a68b9..00000000000 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/gaas_storage.py +++ /dev/null @@ -1,220 +0,0 @@ -from typing import Any -from typing import List -from typing import Union - -import torch -from torch import device as TorchDevice -from torch_geometric.typing import ProxyTensor -from torch_geometric.data.storage import GlobalStorage - -from gaas_client.client import GaasClient - -import numpy as np - -EDGE_KEYS = ["_DST_", "_SRC_"] # reversed order in PyG -VERTEX_KEYS = ["_VERTEX_"] - - -class TorchTensorGaasGraphDataProxy(ProxyTensor): - """ - Implements a partial Torch Tensor interface that forwards requests to a - GaaS server maintaining the actual data in a graph instance. - The interface supported consists of only the APIs specific DGL workflows - need - anything else will raise AttributeError. - """ - _data_categories = ["vertex", "edge"] - - def __init__(self, - gaas_client: GaasClient, - gaas_graph_id: int, - data_category: str, - device:TorchDevice=TorchDevice('cpu'), - property_keys: List[str]=None, - transposed: bool=False, - dtype: torch.dtype=torch.float32): - if data_category not in self._data_categories: - raise ValueError("data_category must be one of " - f"{self._data_categories}, got {data_category}") - - if property_keys is None: - if data_category == 'vertex': - property_keys = VERTEX_KEYS - else: - property_keys = EDGE_KEYS - - self.__client = gaas_client - self.__graph_id = gaas_graph_id - self.__category = data_category - self.__device = device - self.__property_keys = np.array(property_keys) - self.__transposed = transposed - self.dtype = dtype - - def __getitem__(self, index: Union[int, tuple]) -> Any: - """ - Returns a torch.Tensor containing the edge or vertex data (based on the - instance's data_category) for index, retrieved from graph data on the - instance's GaaS server. - """ - - if isinstance(index, torch.Tensor): - index = [int(i) for i in index] - - property_keys = self.__property_keys - - if isinstance(index, (list, tuple)): - if len(index) == 2: - index = [index[0], index[1]] - else: - index = [index, -1] - else: - index = [index, -1] - - if self.__transposed: - index = [index[1], index[0]] - - if index[1] != -1: - property_keys = property_keys[index[1]] - if isinstance(property_keys, str): - property_keys = [property_keys] - - if self.__category == "edge": - data = self.__client.get_graph_edge_dataframe_rows( - index_or_indices=index[0], graph_id=self.__graph_id, - property_keys=list(property_keys)) - - else: - data = self.__client.get_graph_vertex_dataframe_rows( - index_or_indices=index[0], graph_id=self.__graph_id, - property_keys=list(property_keys)) - - if self.__transposed: - torch_data = torch.from_numpy(data.T).to(self.device) - else: - # FIXME handle non-numeric datatypes - torch_data = torch.from_numpy(data) - - return torch_data.to(self.dtype).to(self.__device) - - @property - def shape(self) -> torch.Size: - if self.__category == "edge": - # Handle Edge properties - s = [self.__client.get_num_edges(self.__graph_id), len(self.__property_keys)] - elif self.__category == "vertex": - # Handle Vertex properties - s = [self.__client.get_num_vertices(self.__graph_id), len(self.__property_keys)] - else: - raise AttributeError(f'invalid category {self.__category}') - - if self.__transposed: - s = [s[1],s[0]] - - return torch.Size(s) - - @property - def device(self) -> TorchDevice: - return self.__device - - @property - def is_cuda(self) -> bool: - return self.__device._type == 'cuda' - - def to(self, to_device: TorchDevice): - return TorchTensorGaasGraphDataProxy( - self.__client, - self.__graph_id, - self.__category, - to_device, - property_keys=self.__property_keys, - transposed=self.__transposed - ) - - def dim(self) -> int: - return self.shape[0] - - def size(self, idx=None) -> Any: - if idx is None: - return self.shape - else: - return self.shape[idx] - - -class GaasStorage(GlobalStorage): - def __init__(self, gaas_client: GaasClient, gaas_graph_id: int, device: TorchDevice=TorchDevice('cpu'), parent=None): - super().__init__(_parent=parent) - setattr(self, 'gaas_client', gaas_client) - setattr(self, 'gaas_graph_id', gaas_graph_id) - setattr(self, 'node_index', TorchTensorGaasGraphDataProxy(gaas_client, gaas_graph_id, 'vertex', device, dtype=torch.long)) - setattr(self, 'edge_index', TorchTensorGaasGraphDataProxy(gaas_client, gaas_graph_id, 'edge', device, transposed=True, dtype=torch.long)) - - vertex_property_keys = gaas_client.get_graph_vertex_property_keys(graph_id=gaas_graph_id) - if 'y' in vertex_property_keys: - vertex_property_keys.remove('y') - #edge_property_keys = gaas_client.get_graph_edge_property_keys(graph_id=gaas_graph_id) - - setattr(self, 'x', TorchTensorGaasGraphDataProxy(gaas_client, gaas_graph_id, 'vertex', device, dtype=torch.float, property_keys=vertex_property_keys)) - - # The y attribute is special and needs to be overridden - if self.is_node_attr('y'): - setattr(self, 'y', TorchTensorGaasGraphDataProxy(gaas_client, gaas_graph_id, 'vertex', device, dtype=torch.float, property_keys=['y'], transposed=False)) - - setattr( - self, - 'graph_info', - gaas_client.get_graph_info( - keys=[ - 'num_vertices', - 'num_edges', - 'num_vertex_properties', - 'num_edge_properties' - ], - graph_id=gaas_graph_id - ) - ) - - @property - def num_nodes(self) -> int: - return self.graph_info['num_vertices'] - - @property - def num_node_features(self) -> int: - return self.graph_info['num_vertex_properties'] - - @property - def num_edge_features(self) -> int: - return self.graph_info['num_edge_properties'] - - @property - def num_edges(self) -> int: - return self.graph_info['num_edges'] - - def is_node_attr(self, key: str) -> bool: - if key == 'x': - return True - return self.gaas_client.is_vertex_property(key, self.gaas_graph_id) - - def is_edge_attr(self, key: str) -> bool: - return self.gaas_client.is_edge_property(key, self.gaas_graph_id) - - def __getattr__(self, key: str) -> Any: - if key in self: - return self[key] - elif self.gaas_client.is_vertex_property(key, self.gaas_graph_id): - return TorchTensorGaasGraphDataProxy( - self.gaas_client, - self.gaas_graph_id, - 'vertex', - self.node_index.device, - [key] - ) - elif self.gaas_client.is_edge_property(key, self.gaas_graph_id): - return TorchTensorGaasGraphDataProxy( - self.gaas_client, - self.gaas_graph_id, - 'edge', - self.edge_index.device, - [key] - ) - - raise AttributeError(key) \ No newline at end of file From 4e5ac2d5eefe83ee352267cf8c7ad67b127fa88f Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Thu, 11 Aug 2022 22:01:32 +0000 Subject: [PATCH 44/71] more fixes and cleanup --- notebooks/gnn/pyg_graphSAGE_reddit.ipynb | 278 ------------------ ...g_multi_gpu2.ipynb => pyg_hetero_mag.ipynb | 0 .../datasets/metadata/karate.yaml | 8 +- .../cugraph/gnn/gaas_extensions/__init__.py | 1 - .../gaas_extensions/reddit_gaas_extension.py | 52 ---- .../sampling/uniform_neighbor_sample.py | 5 +- .../graph_implementation/simpleGraph.py | 7 - .../cugraph/structure/property_graph.py | 6 +- 8 files changed, 7 insertions(+), 350 deletions(-) delete mode 100644 notebooks/gnn/pyg_graphSAGE_reddit.ipynb rename notebooks/gnn/pyg_multi_gpu2.ipynb => pyg_hetero_mag.ipynb (100%) delete mode 100644 python/cugraph/cugraph/gnn/gaas_extensions/__init__.py delete mode 100644 python/cugraph/cugraph/gnn/gaas_extensions/reddit_gaas_extension.py diff --git a/notebooks/gnn/pyg_graphSAGE_reddit.ipynb b/notebooks/gnn/pyg_graphSAGE_reddit.ipynb deleted file mode 100644 index 4cfc61dc30c..00000000000 --- a/notebooks/gnn/pyg_graphSAGE_reddit.ipynb +++ /dev/null @@ -1,278 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Load Data

" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import sys\n", - "sys.path += ['/work/pytorch_geometric', '/work/gaas/python']" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import rmm\n", - "\n", - "rmm.reinitialize(pool_allocator=True,initial_pool_size=5e+9, maximum_pool_size=20e+9)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import cudf\n", - "import cugraph\n", - "from cugraph.experimental import PropertyGraph\n", - "from cugraph.gnn.gaas_extensions import load_reddit\n", - "G = load_reddit(None, '/work/data/reddit')\n", - "G" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from cugraph.gnn.pyg_extensions import CuGraphData\n", - "cd = CuGraphData(G, reserved_keys=['id','type'])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Training

" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import torch\n", - "from torch_geometric.data import Data\n", - "\n", - "TRAINING_ARGS = {\n", - " 'batch_size':1000,\n", - " 'fanout':[10,25],\n", - " 'num_epochs':1,\n", - "}\n", - "\n", - "device = torch.device('cuda:0' if torch.cuda.is_available() else 'cpu')\n", - "\n", - "data = cd.to(device)\n", - "#data = Data(x=cd.x, edge_index = cd.edge_index, y = cd.y) #uncomment to run w/o cugraph" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Create the Data Loader

" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from torch_geometric.loader import LinkNeighborLoader\n", - "import numpy as np\n", - "\n", - "train_loader = LinkNeighborLoader(\n", - " data,\n", - " num_neighbors=TRAINING_ARGS['fanout'],\n", - " batch_size=TRAINING_ARGS['batch_size'],\n", - " shuffle=True\n", - ")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "

Define the GraphSAGE Model

" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import torch\n", - "from torch.nn import LSTM\n", - "import torch.nn as nn\n", - "import torch.nn.functional as F\n", - "\n", - "from torch_geometric.nn import SAGEConv\n", - "\n", - "class SAGE(nn.Module):\n", - " def __init__(self, in_channels, hidden_channels, num_classes, num_layers):\n", - " super().__init__()\n", - " self.num_layers = num_layers\n", - " self.convs = nn.ModuleList()\n", - " for i in range(num_layers):\n", - " in_channels = in_channels if i == 0 else hidden_channels\n", - " out_channels = num_classes if i == num_layers - 1 else hidden_channels\n", - " self.convs.append(SAGEConv(in_channels, out_channels))\n", - "\n", - " def forward(self, x, edge_index):\n", - " for i, conv in enumerate(self.convs):\n", - " x = conv(x, edge_index)\n", - " if i != self.num_layers - 1:\n", - " x = x.relu()\n", - " x = F.dropout(x, p=0.3, training=self.training)\n", - " return F.log_softmax(x, dim=1)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import pandas as pd\n", - "num_classes = len(pd.Series(np.array(cd.y, dtype=int)).unique())\n", - "num_classes" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import torch.nn.functional as F\n", - "import tqdm\n", - "from math import ceil\n", - "from torch_geometric.loader import DataLoader\n", - "from torch.nn.functional import nll_loss\n", - "\n", - "from datetime import datetime\n", - "\n", - "import cupy\n", - "from cuml.metrics import accuracy_score\n", - "from sklearn.metrics import balanced_accuracy_score\n", - "\n", - "#model = SAGE(data.num_node_features, hidden_channels=256, num_classes=num_classes, num_layers=3)\n", - "model = SAGE(data.num_node_features, hidden_channels=64, num_classes=num_classes, num_layers=1)\n", - "model = model.to(device)\n", - "optimizer = torch.optim.Adam(model.parameters(), lr=0.1)\n", - "\n", - "num_batches = int(ceil(data.num_nodes / TRAINING_ARGS['batch_size']))\n", - "#num_batches = 5\n", - "\n", - "def train():\n", - " model.train()\n", - "\n", - " total_loss = 0\n", - " for i, sampled_data in enumerate(tqdm.tqdm(train_loader)):\n", - " if i == num_batches:\n", - " return total_loss / data.num_nodes # FIXME is this right?\n", - " sampled_data = sampled_data.to(device)\n", - " print(f'iter: {i}')\n", - " print('# nodes: ', sampled_data.num_nodes)\n", - " print('# edges: ', sampled_data.num_edges)\n", - " #out = model(sampled_data.x[-1], sampled_data.edge_index[0:2])\n", - " out = model(sampled_data.x, sampled_data.edge_index)\n", - " \n", - " #loss = F.nll_loss(out, sampled_data.y[-1].T[0].to(torch.long))\n", - " loss = F.nll_loss(out, sampled_data.y.T.to(torch.long))\n", - " print(f'loss: {loss}')\n", - "\n", - " optimizer.zero_grad()\n", - " loss.backward()\n", - " optimizer.step()\n", - "\n", - " total_loss += float(loss) * out.size(0)\n", - "\n", - "@torch.no_grad()\n", - "def encode(loader):\n", - " model.eval()\n", - "\n", - " xs, ys = [], []\n", - " for i, data in enumerate(loader):\n", - " print(f'encode {i}')\n", - " if i == num_batches:\n", - " break\n", - "\n", - " out = model(data.x, data.edge_index)\n", - " xs.append(torch.argmax(out, dim=1))\n", - " ys.append(data.y)\n", - "\n", - " return torch.cat(xs, dim=0), torch.cat(ys, dim=0)\n", - "\n", - "@torch.no_grad()\n", - "def test():\n", - " model.eval()\n", - " eval_loader = LinkNeighborLoader(data, num_neighbors=TRAINING_ARGS['fanout'], batch_size=TRAINING_ARGS['batch_size'])\n", - " x_out, y_out = encode(eval_loader)\n", - "\n", - " val_acc = 0\n", - " test_acc = balanced_accuracy_score(cupy.from_dlpack(y_out.__dlpack__()).get(), cupy.from_dlpack(x_out.__dlpack__()).get())\n", - "\n", - " return val_acc, test_acc, x_out, y_out\n", - "\n", - "\n", - "for epoch in range(1, 1 + TRAINING_ARGS['num_epochs']):\n", - " train_start = datetime.now()\n", - " loss = train()\n", - " train_end = datetime.now()\n", - " print('train time:', (train_end - train_start).total_seconds())\n", - "\n", - " test_start = datetime.now()\n", - " val_acc, test_acc, x_out, y_out = test()\n", - " test_end = datetime.now()\n", - " print('test time:', (test_end - test_start).total_seconds())\n", - " print(f'Epoch: {epoch:03d}, Loss: {loss:.4f}, '\n", - " f'Val: {val_acc:.4f}, Test: {test_acc:.4f}')" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3.9.7 ('base')", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.7" - }, - "orig_nbformat": 4, - "vscode": { - "interpreter": { - "hash": "f708a36acfaef0acf74ccd43dfb58100269bf08fb79032a1e0a6f35bd9856f51" - } - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/gnn/pyg_multi_gpu2.ipynb b/pyg_hetero_mag.ipynb similarity index 100% rename from notebooks/gnn/pyg_multi_gpu2.ipynb rename to pyg_hetero_mag.ipynb diff --git a/python/cugraph/cugraph/experimental/datasets/metadata/karate.yaml b/python/cugraph/cugraph/experimental/datasets/metadata/karate.yaml index d86c7b1a241..9b7ac679e96 100644 --- a/python/cugraph/cugraph/experimental/datasets/metadata/karate.yaml +++ b/python/cugraph/cugraph/experimental/datasets/metadata/karate.yaml @@ -1,17 +1,19 @@ -name: karate-data +name: karate file_type: .csv author: Zachary W. -url: https://raw.githubusercontent.com/rapidsai/cugraph/branch-22.08/datasets/karate-data.csv +url: https://raw.githubusercontent.com/rapidsai/cugraph/branch-22.08/datasets/karate.csv refs: W. W. Zachary, An information flow model for conflict and fission in small groups, Journal of Anthropological Research 33, 452-473 (1977). -delim: "\t" +delim: " " col_names: - src - dst + - wgt col_types: - int32 - int32 + - float32 has_loop: true is_directed: true is_multigraph: false diff --git a/python/cugraph/cugraph/gnn/gaas_extensions/__init__.py b/python/cugraph/cugraph/gnn/gaas_extensions/__init__.py deleted file mode 100644 index d736c476b48..00000000000 --- a/python/cugraph/cugraph/gnn/gaas_extensions/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .reddit_gaas_extension import load_reddit diff --git a/python/cugraph/cugraph/gnn/gaas_extensions/reddit_gaas_extension.py b/python/cugraph/cugraph/gnn/gaas_extensions/reddit_gaas_extension.py deleted file mode 100644 index ef33508aa2c..00000000000 --- a/python/cugraph/cugraph/gnn/gaas_extensions/reddit_gaas_extension.py +++ /dev/null @@ -1,52 +0,0 @@ -''' -Naming this with the _extension suffix allows it to be read by GaaS -as a graph creation extension. This extension loads in the reddit -graph. -''' - -import os -import numpy as np -import scipy.sparse as sp -import cudf -import dask_cudf -from dask.distributed import wait, default_client -import cugraph -import networkx as nx -from cugraph.experimental import PropertyGraph -from cugraph.experimental import MGPropertyGraph - -def load_reddit(sv, data_dir, mg=False): - if mg: - G = MGPropertyGraph() - client = default_client() - else: - G = PropertyGraph() - - with open(os.path.join(data_dir, 'reddit_data.npz'), 'rb') as f: - reddit_data = np.load(f) - features = cudf.DataFrame(reddit_data["feature"], dtype='float32') - features['id'] = cudf.Series(reddit_data['node_ids'], dtype='int32') - features['y'] = cudf.Series(reddit_data['label'], dtype='int32') - features['type'] = cudf.Series(reddit_data['node_types'], dtype='int32') - features.columns = features.columns.astype('str') - - if mg: - features = dask_cudf.from_cudf(features, npartitions=len(client.cluster.workers)) - - G.add_vertex_data(features, vertex_col_name='id') - - with open(os.path.join(data_dir, 'reddit_graph.npz'), 'rb') as f: - M = sp.load_npz(f).tocsr() - offsets = cudf.Series(M.indptr) - indices = cudf.Series(M.indices) - - H = cugraph.Graph() - H.from_cudf_adjlist(offsets, indices) - - el = H.view_edge_list() - if mg: - el = dask_cudf.from_cudf(el, npartitions=len(client.cluster.workers)) - - G.add_edge_data(el, vertex_col_names=['src','dst']) - - return G diff --git a/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py b/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py index 9104c1a42e0..c9ce13de831 100644 --- a/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py +++ b/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py @@ -79,10 +79,7 @@ def uniform_neighbor_sample(G, raise TypeError("fanout_vals must be a list, " f"got: {type(fanout_vals)}") - if 'weights' in G.edgelist.edgelist_df: - weight_t = G.edgelist.edgelist_df['weights'].dtype - else: - weight_t = 'float32' + weight_t = G.edgelist.edgelist_df['weights'].dtype if G.renumbered is True: if isinstance(start_list, cudf.DataFrame): diff --git a/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py b/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py index ce2b5db9969..889d7c3218e 100644 --- a/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py +++ b/python/cugraph/cugraph/structure/graph_implementation/simpleGraph.py @@ -836,13 +836,6 @@ def to_undirected(self, G, store_transposed=False): value_col = None G.edgelist = simpleGraphImpl.EdgeList(source_col, dest_col, value_col) - - if 'weights' in self.edgelist.edgelist_df: - value_col = self.edgelist.edgelist_df['weights'] - else: - value_col = None - - G.make_plc_graph(value_col, store_transposed) if 'weights' in self.edgelist.edgelist_df: value_col = self.edgelist.edgelist_df['weights'] diff --git a/python/cugraph/cugraph/structure/property_graph.py b/python/cugraph/cugraph/structure/property_graph.py index c0401bb4a37..09c7f6b0040 100644 --- a/python/cugraph/cugraph/structure/property_graph.py +++ b/python/cugraph/cugraph/structure/property_graph.py @@ -746,8 +746,7 @@ def extract_subgraph(self, default_edge_weight=None, allow_multi_edges=False, renumber_graph=True, - add_edge_data=True, - legacy_renum_only=False, + add_edge_data=True ): """ Return a subgraph of the overall PropertyGraph containing vertices @@ -782,9 +781,6 @@ def extract_subgraph(self, add_edge_data : bool (default is True) If True, add meta data about the edges contained in the extracted graph which are required for future calls to annotate_dataframe(). - legacy_renum_only : bool (default is False) - If True, skips the C++ renumbering. Should be True if using a - pylibcugraph algorithm, otherwise should be false. Returns ------- From c0ed9a7f00bda053df649b928b021f9949118c0b Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Thu, 11 Aug 2022 22:02:09 +0000 Subject: [PATCH 45/71] move notebook to correct location --- pyg_hetero_mag.ipynb => notebooks/gnn/pyg_hetero_mag.ipynb | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename pyg_hetero_mag.ipynb => notebooks/gnn/pyg_hetero_mag.ipynb (100%) diff --git a/pyg_hetero_mag.ipynb b/notebooks/gnn/pyg_hetero_mag.ipynb similarity index 100% rename from pyg_hetero_mag.ipynb rename to notebooks/gnn/pyg_hetero_mag.ipynb From f7b8362fe7205688be0f722fa609d3db141b7c21 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Thu, 11 Aug 2022 22:06:20 +0000 Subject: [PATCH 46/71] update notebook --- notebooks/gnn/pyg_hetero_mag.ipynb | 30713 +-------------------------- 1 file changed, 18 insertions(+), 30695 deletions(-) diff --git a/notebooks/gnn/pyg_hetero_mag.ipynb b/notebooks/gnn/pyg_hetero_mag.ipynb index 8c120647d4d..4c64bb98279 100644 --- a/notebooks/gnn/pyg_hetero_mag.ipynb +++ b/notebooks/gnn/pyg_hetero_mag.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -15,7 +15,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -30,23 +30,9 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'author': 0,\n", - " 'field_of_study': 1134649,\n", - " 'institution': 1194614,\n", - " 'paper': 1203354}" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "import cudf\n", "import dask_cudf\n", @@ -73,7 +59,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -92,20 +78,9 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "author affiliated_with institution\n", - "author writes paper\n", - "paper cites paper\n", - "paper has_topic field_of_study\n" - ] - } - ], + "outputs": [], "source": [ "for i, (edge_key, eidx) in enumerate(data[0]['edge_index_dict'].items()):\n", " node_type_src, edge_type, node_type_dst = edge_key\n", @@ -127,7 +102,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -142,7 +117,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -153,7 +128,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -178,27 +153,9 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[('author', 'affiliated_with', 'institution'),\n", - " ('paper', 'cites_bw', 'paper'),\n", - " ('institution', 'affiliated_with_bw', 'author'),\n", - " ('paper', 'has_topic', 'field_of_study'),\n", - " ('field_of_study', 'has_topic_bw', 'paper'),\n", - " ('paper', 'writes_bw', 'author'),\n", - " ('paper', 'cites', 'paper'),\n", - " ('author', 'writes', 'paper')]" - ] - }, - "execution_count": 10, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "edge_types = [attr.edge_type for attr in graph_store.get_all_edge_attrs()]\n", "edge_types" @@ -206,20 +163,9 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "349" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "num_classes = pG.get_vertex_data(columns=['y'])['y'].max() + 1\n", "if isinstance(pG, MGPropertyGraph):\n", @@ -229,30641 +175,18 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
_VERTEX__TYPE_01234567...119120121122123124125126127y
19371181939695paper-0.179181-0.052097-0.377248-0.077404-0.029473-0.009189-0.310679-0.458934...-0.265351-0.3386740.0182070.197812-0.1587860.0241970.324385-0.207437-0.17253635
\n", - "

1 rows × 131 columns

\n", - "
" - ], - "text/plain": [ - " _VERTEX_ _TYPE_ 0 1 2 3 4 \\\n", - "1937118 1939695 paper -0.179181 -0.052097 -0.377248 -0.077404 -0.029473 \n", - "\n", - " 5 6 7 ... 119 120 121 \\\n", - "1937118 -0.009189 -0.310679 -0.458934 ... -0.265351 -0.338674 0.018207 \n", - "\n", - " 122 123 124 125 126 127 y \n", - "1937118 0.197812 -0.158786 0.024197 0.324385 -0.207437 -0.172536 35 \n", - "\n", - "[1 rows x 131 columns]" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "pG._vertex_prop_dataframe[pG._vertex_prop_dataframe._VERTEX_==1939695]" ] }, { "cell_type": "code", - "execution_count": 14, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.020461\n", - "sampling 0.019958\n", - "noi time: 0.002007\n", - "get_vertex_data call: 0.070973\n", - "noi group time: 0.00405\n", - "eoi_group_time: 0.016979\n", - "second half: 0.25943\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 16823, 31145, ..., 1130635, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 16823, 31145, ..., 1130635, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210831, 1209795, 1209807, ..., 1937004, 1936996, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210831, 1209795, 1209807, ..., 1937004, 1936996, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1137435, 1135061, 1137204, 1137212, 1141424, 1140285, 1135926,\n", - " 1135160, 1137784, 1140799, 1141758, 1138335, 1142327, 1136969, 1139811,\n", - " 1137937, 1145999, 1139143, 1143372, 1146640, 1146644, 1140783, 1148977,\n", - " 1139866, 1149216, 1155686, 1155689, 1149633, 1149646, 1147473, 1147487,\n", - " 1149283, 1142881, 1153938, 1144632, 1148346, 1146661, 1152665, 1152664,\n", - " 1138347, 1153220, 1139371, 1147211, 1136683, 1150330, 1152427, 1136256,\n", - " 1146376, 1138745, 1140308, 1140537, 1140542, 1138112, 1137254, 1137182,\n", - " 1140151, 1134729, 1140953, 1135367, 1135202, 1135903, 1137804, 1141036,\n", - " 1136770, 1134794, 1157443, 1135953, 1143377, 1138504, 1137342, 1143068,\n", - " 1157088, 1137693, 1137687, 1136619, 1144786, 1144791, 1144390, 1144395,\n", - " 1136826, 1137532, 1135423, 1157393, 1136581, 1137441, 1143320, 1136941,\n", - " 1135265, 1135268, 1156149, 1156159, 1139161, 1135583, 1135828, 1138514,\n", - " 1153099, 1158136, 1145127, 1137019, 1156899, 1137287, 1138436, 1138440,\n", - " 1138461, 1157186, 1136594, 1158386, 1149331, 1138834, 1156606, 1147112,\n", - " 1142611, 1135352, 1135624, 1158987, 1145842, 1148531, 1150948, 1137109,\n", - " 1139667, 1139664, 1138069, 1136081, 1136087, 1134992, 1142434, 1139754,\n", - " 1158974, 1159019, 1141065, 1153537, 1143631, 1139084, 1136065, 1138148,\n", - " 1138151, 1141963, 1146075, 1140557, 1152042, 1152044, 1142299, 1137728,\n", - " 1147317, 1134922, 1134750, 1141088, 1144134, 1149001, 1139889, 1141979,\n", - " 1142021, 1154855, 1139025, 1161971, 1141695, 1136426, 1136625, 1140467,\n", - " 1141111, 1139386, 1136917, 1143677, 1143676, 1137190, 1144237, 1140598,\n", - " 1144650, 1134979, 1136862, 1147850, 1138482, 1142056, 1143153, 1142093,\n", - " 1158749, 1149114, 1138708, 1140102, 1140110, 1142913, 1138424, 1143113,\n", - " 1143114, 1144596, 1136864, 1145298, 1145302, 1135315, 1140442, 1139560,\n", - " 1137854, 1147153, 1136378, 1136371, 1142641, 1142646, 1141365, 1153068,\n", - " 1149090, 1149097, 1139022, 1138292, 1138293, 1144279, 1139508, 1139510,\n", - " 1138815, 1139127, 1144992, 1140616, 1140990, 1146695, 1135040, 1147050,\n", - " 1145885, 1145873, 1143543, 1152980, 1141925, 1141841, 1137149, 1143643,\n", - " 1145974, 1143851, 1146024, 1154328, 1141642, 1149928, 1139990, 1146296,\n", - " 1146302, 1143293, 1143283, 1143294, 1147543, 1147540, 1148763, 1147282,\n", - " 1147293, 1142816, 1143656, 1142637, 1139408, 1148003, 1136167, 1138927,\n", - " 1136836, 1146105, 1139329, 1139341, 1141490, 1136445, 1143345, 1144611,\n", - " 1144615, 1145808, 1145816, 1140844, 1144088, 1135876, 1150755, 1150294,\n", - " 1146514, 1146523, 1143460, 1143470, 1143457, 1137697, 1144291, 1144303,\n", - " 1140483, 1140829, 1146578, 1147574, 1155700, 1155709, 1146636, 1147521,\n", - " 1147530, 1140364, 1143080, 1168914, 1168921, 1144219, 1144222, 1147999,\n", - " 1139252, 1139249, 1148704, 1148715, 1148719, 1143310, 1150996, 1142700,\n", - " 1149722, 1147032, 1158226, 1158230, 1158235, 1151644, 1145240, 1145750,\n", - " 1145751, 1142377, 1142369, 1138632, 1148391, 1146178, 1148214, 1152530,\n", - " 1152531, 1152537, 1151182, 1150438, 1150445, 1148940, 1148819, 1155006,\n", - " 1151870, 1149791, 1144514, 1144526, 1144523, 1145833, 1150342, 1165253,\n", - " 1151482, 1152023, 1152024, 1152026, 1145255, 1145262, 1139914, 1140566,\n", - " 1150112, 1147019, 1147021, 1141187, 1150745, 1141267, 1141266, 1144825,\n", - " 1148744, 1153574, 1153580, 1147653, 1143560, 1143564, 1168504, 1149412,\n", - " 1148288, 1152073, 1135087, 1148623, 1148608, 1139090, 1154420, 1151363,\n", - " 1146686, 1138404, 1148720, 1171341, 1146547, 1146549, 1149812, 1148204,\n", - " 1154168, 1153192, 1153188, 1150935, 1143092, 1144863, 1150352, 1143129,\n", - " 1143134, 1141017, 1147442, 1151816, 1151913, 1160687, 1148498, 1148505,\n", - " 1141420, 1141419, 1150637, 1151352, 1146975, 1146974, 1156402, 1146623,\n", - " 1164774, 1144472, 1156320, 1153032, 1153038, 1150085, 1137746, 1137759,\n", - " 1140521, 1136401, 1136410, 1149203, 1157107, 1157115, 1152753, 1152826,\n", - " 1155337, 1154123, 1155356, 1152673, 1154633, 1151573, 1164756, 1151617,\n", - " 1151622, 1150579, 1136134, 1136798, 1152944, 1152946, 1152952, 1140451,\n", - " 1153387, 1138990, 1151311, 1152341, 1156830, 1153311, 1138279, 1138281,\n", - " 1136028, 1136031, 1136029, 1158704, 1156621, 1140687, 1152928, 1154733,\n", - " 1142777, 1150150, 1150159, 1150168, 1150164, 1149273, 1144016, 1148033,\n", - " 1148040, 1152603, 1145652, 1149792, 1137048, 1168183, 1148628, 1137458,\n", - " 1135698, 1178122, 1157466, 1142387, 1150872, 1156500, 1157064, 1145191,\n", - " 1145196, 1137811, 1137819, 1150465, 1146854, 1149045, 1135730, 1135740,\n", - " 1152183, 1152182, 1156638, 1165703, 1156942, 1135645, 1147810, 1147818,\n", - " 1157779, 1158308, 1158311, 1155441, 1162120, 1156207, 1138777, 1151379,\n", - " 1155366, 1152527, 1153479, 1155755, 1151424, 1135396, 1146924, 1145806,\n", - " 1145793, 1155628, 1155631, 1155572, 1136466, 1158823, 1158824, 1158829,\n", - " 1153715, 1157000, 1148836, 1148838, 1148647, 1143254, 1143263, 1154250,\n", - " 1151317, 1154902, 1143189, 1143526, 1150371, 1153326, 1155606, 1155613,\n", - " 1150981, 1150983, 1150984, 1150987, 1155293, 1137167, 1157650, 1158126,\n", - " 1137381, 1159116, 1138268, 1145690, 1145681, 1140916, 1140918, 1140919,\n", - " 1140913, 1134677, 1135601, 1163894, 1155848, 1157685, 1146321, 1149145,\n", - " 1144463, 1152209, 1152220, 1140380, 1140381, 1156016, 1159130, 1144843,\n", - " 1155975, 1161670, 1155403, 1154600, 1154605, 1136899, 1136896, 1158760,\n", - " 1158764, 1158882, 1158886, 1158891, 1140213, 1157304, 1159155, 1158806,\n", - " 1158815, 1158278, 1164188, 1161625, 1156665, 1156657, 1147599, 1155304,\n", - " 1156488, 1153808, 1136640, 1134757, 1158558, 1153827, 1156516, 1146126,\n", - " 1155856, 1158007, 1161539, 1169888, 1164276, 1142666, 1150674, 1159042,\n", - " 1159052, 1159057, 1157944, 1153052, 1153045, 1144156, 1153842, 1138393,\n", - " 1149063, 1154299, 1154300, 1153514, 1153519, 1147300, 1142405, 1146870,\n", - " 1161652, 1138161, 1156787, 1149956, 1146063, 1146356, 1162308, 1165309,\n", - " 1158866, 1140641, 1140643, 1141862, 1148600, 1143139, 1159646, 1156361,\n", - " 1185124, 1141800, 1141802, 1158653, 1158655, 1156187, 1156181, 1159025,\n", - " 1159029, 1159032, 1168096, 1152247, 1160470, 1155588, 1159551, 1138674,\n", - " 1153924, 1144977, 1146500, 1153232, 1153247, 1164580, 1161240, 1144739,\n", - " 1152776, 1163527, 1145139, 1141471, 1141459, 1151650, 1147426, 1147427,\n", - " 1179979, 1156739, 1157955, 1153663, 1144812, 1177077, 1162088, 1135567,\n", - " 1164741, 1142722, 1156293, 1156300, 1156303, 1145732, 1145229, 1146042,\n", - " 1155320, 1142136, 1139351, 1145902, 1153520, 1151752, 1152203, 1143395,\n", - " 1143404, 1171227, 1158724, 1166670, 1154076, 1147331, 1147339, 1147338,\n", - " 1170766, 1192410, 1179488, 1167817, 1167821, 1171785, 1155172, 1144336,\n", - " 1157534, 1138383, 1147746, 1154670, 1154882, 1169162, 1157331, 1151664,\n", - " 1151669, 1151674, 1169359, 1154353, 1154364, 1154354, 1146344, 1138609,\n", - " 1149688, 1158611, 1158623, 1147423, 1152353, 1168380, 1143170, 1168451,\n", - " 1168400, 1168049, 1149402, 1148667, 1148324, 1177990, 1171560, 1173307,\n", - " 1145028, 1160934, 1154027, 1152150, 1152152, 1153754, 1169583, 1157158,\n", - " 1157153, 1155461, 1157373, 1167232, 1147708, 1147711, 1157592, 1169687,\n", - " 1160990, 1146755, 1170016, 1170874, 1154148, 1154150, 1149173, 1181608,\n", - " 1168481, 1143410, 1143420, 1166299, 1177656, 1181241, 1153803, 1170520,\n", - " 1153141, 1178466, 1153619, 1180921, 1175567, 1155253, 1155262, 1157792,\n", - " 1172033, 1172548, 1171623, 1164032, 1163225, 1185582, 1183118, 1153890,\n", - " 1153898, 1188790, 1164564, 1164203, 1162403, 1145626, 1156443, 1154840,\n", - " 1178025, 1180383, 1157474, 1161911, 1149753, 1149755, 1146252, 1153609,\n", - " 1157761, 1158779, 1158940, 1167636, 1158370, 1155892, 1155899, 1189597,\n", - " 1160402, 1178696, 1168273, 1182330, 1168886, 1165474, 1185422, 1164231,\n", - " 1166442, 1184277, 1165082, 1170341, 1170342, 1147182, 1156162, 1178246,\n", - " 1159524, 1162757, 1167668, 1167670, 1191540, 1181475, 1156528, 1156532,\n", - " 1139828, 1139831, 1150265, 1154812, 1164927, 1187899, 1156055, 1151977,\n", - " 1146394, 1190668, 1156838, 1169964, 1190246, 1153733, 1152124, 1191604,\n", - " 1169707, 1178637, 1194303, 1171201, 1179317, 1172429, 1158064, 1145392,\n", - " 1180528, 1155959, 1155962, 1193401, 1187846, 1176833, 1187547, 1188738,\n", - " 1191877], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1137435, 1135061, 1137204, 1137212, 1141424, 1140285, 1135926,\n", - " 1135160, 1137784, 1140799, 1141758, 1138335, 1142327, 1136969, 1139811,\n", - " 1137937, 1145999, 1139143, 1143372, 1146640, 1146644, 1140783, 1148977,\n", - " 1139866, 1149216, 1155686, 1155689, 1149633, 1149646, 1147473, 1147487,\n", - " 1149283, 1142881, 1153938, 1144632, 1148346, 1146661, 1152665, 1152664,\n", - " 1138347, 1153220, 1139371, 1147211, 1136683, 1150330, 1152427, 1136256,\n", - " 1146376, 1138745, 1140308, 1140537, 1140542, 1138112, 1137254, 1137182,\n", - " 1140151, 1134729, 1140953, 1135367, 1135202, 1135903, 1137804, 1141036,\n", - " 1136770, 1134794, 1157443, 1135953, 1143377, 1138504, 1137342, 1143068,\n", - " 1157088, 1137693, 1137687, 1136619, 1144786, 1144791, 1144390, 1144395,\n", - " 1136826, 1137532, 1135423, 1157393, 1136581, 1137441, 1143320, 1136941,\n", - " 1135265, 1135268, 1156149, 1156159, 1139161, 1135583, 1135828, 1138514,\n", - " 1153099, 1158136, 1145127, 1137019, 1156899, 1137287, 1138436, 1138440,\n", - " 1138461, 1157186, 1136594, 1158386, 1149331, 1138834, 1156606, 1147112,\n", - " 1142611, 1135352, 1135624, 1158987, 1145842, 1148531, 1150948, 1137109,\n", - " 1139667, 1139664, 1138069, 1136081, 1136087, 1134992, 1142434, 1139754,\n", - " 1158974, 1159019, 1141065, 1153537, 1143631, 1139084, 1136065, 1138148,\n", - " 1138151, 1141963, 1146075, 1140557, 1152042, 1152044, 1142299, 1137728,\n", - " 1147317, 1134922, 1134750, 1141088, 1144134, 1149001, 1139889, 1141979,\n", - " 1142021, 1154855, 1139025, 1161971, 1141695, 1136426, 1136625, 1140467,\n", - " 1141111, 1139386, 1136917, 1143677, 1143676, 1137190, 1144237, 1140598,\n", - " 1144650, 1134979, 1136862, 1147850, 1138482, 1142056, 1143153, 1142093,\n", - " 1158749, 1149114, 1138708, 1140102, 1140110, 1142913, 1138424, 1143113,\n", - " 1143114, 1144596, 1136864, 1145298, 1145302, 1135315, 1140442, 1139560,\n", - " 1137854, 1147153, 1136378, 1136371, 1142641, 1142646, 1141365, 1153068,\n", - " 1149090, 1149097, 1139022, 1138292, 1138293, 1144279, 1139508, 1139510,\n", - " 1138815, 1139127, 1144992, 1140616, 1140990, 1146695, 1135040, 1147050,\n", - " 1145885, 1145873, 1143543, 1152980, 1141925, 1141841, 1137149, 1143643,\n", - " 1145974, 1143851, 1146024, 1154328, 1141642, 1149928, 1139990, 1146296,\n", - " 1146302, 1143293, 1143283, 1143294, 1147543, 1147540, 1148763, 1147282,\n", - " 1147293, 1142816, 1143656, 1142637, 1139408, 1148003, 1136167, 1138927,\n", - " 1136836, 1146105, 1139329, 1139341, 1141490, 1136445, 1143345, 1144611,\n", - " 1144615, 1145808, 1145816, 1140844, 1144088, 1135876, 1150755, 1150294,\n", - " 1146514, 1146523, 1143460, 1143470, 1143457, 1137697, 1144291, 1144303,\n", - " 1140483, 1140829, 1146578, 1147574, 1155700, 1155709, 1146636, 1147521,\n", - " 1147530, 1140364, 1143080, 1168914, 1168921, 1144219, 1144222, 1147999,\n", - " 1139252, 1139249, 1148704, 1148715, 1148719, 1143310, 1150996, 1142700,\n", - " 1149722, 1147032, 1158226, 1158230, 1158235, 1151644, 1145240, 1145750,\n", - " 1145751, 1142377, 1142369, 1138632, 1148391, 1146178, 1148214, 1152530,\n", - " 1152531, 1152537, 1151182, 1150438, 1150445, 1148940, 1148819, 1155006,\n", - " 1151870, 1149791, 1144514, 1144526, 1144523, 1145833, 1150342, 1165253,\n", - " 1151482, 1152023, 1152024, 1152026, 1145255, 1145262, 1139914, 1140566,\n", - " 1150112, 1147019, 1147021, 1141187, 1150745, 1141267, 1141266, 1144825,\n", - " 1148744, 1153574, 1153580, 1147653, 1143560, 1143564, 1168504, 1149412,\n", - " 1148288, 1152073, 1135087, 1148623, 1148608, 1139090, 1154420, 1151363,\n", - " 1146686, 1138404, 1148720, 1171341, 1146547, 1146549, 1149812, 1148204,\n", - " 1154168, 1153192, 1153188, 1150935, 1143092, 1144863, 1150352, 1143129,\n", - " 1143134, 1141017, 1147442, 1151816, 1151913, 1160687, 1148498, 1148505,\n", - " 1141420, 1141419, 1150637, 1151352, 1146975, 1146974, 1156402, 1146623,\n", - " 1164774, 1144472, 1156320, 1153032, 1153038, 1150085, 1137746, 1137759,\n", - " 1140521, 1136401, 1136410, 1149203, 1157107, 1157115, 1152753, 1152826,\n", - " 1155337, 1154123, 1155356, 1152673, 1154633, 1151573, 1164756, 1151617,\n", - " 1151622, 1150579, 1136134, 1136798, 1152944, 1152946, 1152952, 1140451,\n", - " 1153387, 1138990, 1151311, 1152341, 1156830, 1153311, 1138279, 1138281,\n", - " 1136028, 1136031, 1136029, 1158704, 1156621, 1140687, 1152928, 1154733,\n", - " 1142777, 1150150, 1150159, 1150168, 1150164, 1149273, 1144016, 1148033,\n", - " 1148040, 1152603, 1145652, 1149792, 1137048, 1168183, 1148628, 1137458,\n", - " 1135698, 1178122, 1157466, 1142387, 1150872, 1156500, 1157064, 1145191,\n", - " 1145196, 1137811, 1137819, 1150465, 1146854, 1149045, 1135730, 1135740,\n", - " 1152183, 1152182, 1156638, 1165703, 1156942, 1135645, 1147810, 1147818,\n", - " 1157779, 1158308, 1158311, 1155441, 1162120, 1156207, 1138777, 1151379,\n", - " 1155366, 1152527, 1153479, 1155755, 1151424, 1135396, 1146924, 1145806,\n", - " 1145793, 1155628, 1155631, 1155572, 1136466, 1158823, 1158824, 1158829,\n", - " 1153715, 1157000, 1148836, 1148838, 1148647, 1143254, 1143263, 1154250,\n", - " 1151317, 1154902, 1143189, 1143526, 1150371, 1153326, 1155606, 1155613,\n", - " 1150981, 1150983, 1150984, 1150987, 1155293, 1137167, 1157650, 1158126,\n", - " 1137381, 1159116, 1138268, 1145690, 1145681, 1140916, 1140918, 1140919,\n", - " 1140913, 1134677, 1135601, 1163894, 1155848, 1157685, 1146321, 1149145,\n", - " 1144463, 1152209, 1152220, 1140380, 1140381, 1156016, 1159130, 1144843,\n", - " 1155975, 1161670, 1155403, 1154600, 1154605, 1136899, 1136896, 1158760,\n", - " 1158764, 1158882, 1158886, 1158891, 1140213, 1157304, 1159155, 1158806,\n", - " 1158815, 1158278, 1164188, 1161625, 1156665, 1156657, 1147599, 1155304,\n", - " 1156488, 1153808, 1136640, 1134757, 1158558, 1153827, 1156516, 1146126,\n", - " 1155856, 1158007, 1161539, 1169888, 1164276, 1142666, 1150674, 1159042,\n", - " 1159052, 1159057, 1157944, 1153052, 1153045, 1144156, 1153842, 1138393,\n", - " 1149063, 1154299, 1154300, 1153514, 1153519, 1147300, 1142405, 1146870,\n", - " 1161652, 1138161, 1156787, 1149956, 1146063, 1146356, 1162308, 1165309,\n", - " 1158866, 1140641, 1140643, 1141862, 1148600, 1143139, 1159646, 1156361,\n", - " 1185124, 1141800, 1141802, 1158653, 1158655, 1156187, 1156181, 1159025,\n", - " 1159029, 1159032, 1168096, 1152247, 1160470, 1155588, 1159551, 1138674,\n", - " 1153924, 1144977, 1146500, 1153232, 1153247, 1164580, 1161240, 1144739,\n", - " 1152776, 1163527, 1145139, 1141471, 1141459, 1151650, 1147426, 1147427,\n", - " 1179979, 1156739, 1157955, 1153663, 1144812, 1177077, 1162088, 1135567,\n", - " 1164741, 1142722, 1156293, 1156300, 1156303, 1145732, 1145229, 1146042,\n", - " 1155320, 1142136, 1139351, 1145902, 1153520, 1151752, 1152203, 1143395,\n", - " 1143404, 1171227, 1158724, 1166670, 1154076, 1147331, 1147339, 1147338,\n", - " 1170766, 1192410, 1179488, 1167817, 1167821, 1171785, 1155172, 1144336,\n", - " 1157534, 1138383, 1147746, 1154670, 1154882, 1169162, 1157331, 1151664,\n", - " 1151669, 1151674, 1169359, 1154353, 1154364, 1154354, 1146344, 1138609,\n", - " 1149688, 1158611, 1158623, 1147423, 1152353, 1168380, 1143170, 1168451,\n", - " 1168400, 1168049, 1149402, 1148667, 1148324, 1177990, 1171560, 1173307,\n", - " 1145028, 1160934, 1154027, 1152150, 1152152, 1153754, 1169583, 1157158,\n", - " 1157153, 1155461, 1157373, 1167232, 1147708, 1147711, 1157592, 1169687,\n", - " 1160990, 1146755, 1170016, 1170874, 1154148, 1154150, 1149173, 1181608,\n", - " 1168481, 1143410, 1143420, 1166299, 1177656, 1181241, 1153803, 1170520,\n", - " 1153141, 1178466, 1153619, 1180921, 1175567, 1155253, 1155262, 1157792,\n", - " 1172033, 1172548, 1171623, 1164032, 1163225, 1185582, 1183118, 1153890,\n", - " 1153898, 1188790, 1164564, 1164203, 1162403, 1145626, 1156443, 1154840,\n", - " 1178025, 1180383, 1157474, 1161911, 1149753, 1149755, 1146252, 1153609,\n", - " 1157761, 1158779, 1158940, 1167636, 1158370, 1155892, 1155899, 1189597,\n", - " 1160402, 1178696, 1168273, 1182330, 1168886, 1165474, 1185422, 1164231,\n", - " 1166442, 1184277, 1165082, 1170341, 1170342, 1147182, 1156162, 1178246,\n", - " 1159524, 1162757, 1167668, 1167670, 1191540, 1181475, 1156528, 1156532,\n", - " 1139828, 1139831, 1150265, 1154812, 1164927, 1187899, 1156055, 1151977,\n", - " 1146394, 1190668, 1156838, 1169964, 1190246, 1153733, 1152124, 1191604,\n", - " 1169707, 1178637, 1194303, 1171201, 1179317, 1172429, 1158064, 1145392,\n", - " 1180528, 1155959, 1155962, 1193401, 1187846, 1176833, 1187547, 1188738,\n", - " 1191877], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195442, 1197717, 1198730, 1199282, 1199292, 1198459, 1202255, 1198840,\n", - " 1201581, 1194626, 1197777, 1201016, 1201660, 1197351, 1197359, 1198624,\n", - " 1202804, 1197383, 1194866, 1194743, 1194780, 1194783, 1196631, 1196591,\n", - " 1195507, 1195263, 1197921, 1201992, 1198543, 1199519, 1194952, 1195888,\n", - " 1195740, 1196359, 1198106, 1194754, 1195313, 1195130, 1195571, 1198958,\n", - " 1198647, 1195143, 1195270, 1197141, 1197140, 1197273, 1196109, 1195852,\n", - " 1195659, 1197248, 1197186, 1196283, 1195353, 1198282, 1199060, 1199059,\n", - " 1197291, 1202747, 1196851, 1194928, 1199628, 1197676, 1200075, 1200403,\n", - " 1198407, 1195017, 1199676, 1200048, 1200060, 1199948, 1201511, 1202582,\n", - " 1199014, 1197970, 1197601, 1196727, 1195771, 1202618, 1200887, 1203239,\n", - " 1198416, 1198428, 1200596, 1198811, 1201824, 1201169, 1200169, 1198593,\n", - " 1196477, 1201075, 1201156, 1200991, 1201056, 1201405, 1194803, 1199539,\n", - " 1202640, 1202144, 1202508, 1201740, 1200553, 1200558, 1203071, 1197097,\n", - " 1203183, 1196889, 1199908, 1202239, 1202937, 1200899, 1202170, 1202669,\n", - " 1201291, 1197561, 1202889, 1198562, 1195048, 1202545, 1196827, 1195664,\n", - " 1202870, 1202432, 1200445, 1198929, 1198932, 1195421, 1197816, 1197822,\n", - " 1199778, 1200967, 1196605, 1201970, 1200585, 1203102, 1201143, 1194728,\n", - " 1199403, 1198824, 1197593, 1195066, 1195298, 1200301, 1195082, 1202323,\n", - " 1199007], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195442, 1197717, 1198730, 1199282, 1199292, 1198459, 1202255, 1198840,\n", - " 1201581, 1194626, 1197777, 1201016, 1201660, 1197351, 1197359, 1198624,\n", - " 1202804, 1197383, 1194866, 1194743, 1194780, 1194783, 1196631, 1196591,\n", - " 1195507, 1195263, 1197921, 1201992, 1198543, 1199519, 1194952, 1195888,\n", - " 1195740, 1196359, 1198106, 1194754, 1195313, 1195130, 1195571, 1198958,\n", - " 1198647, 1195143, 1195270, 1197141, 1197140, 1197273, 1196109, 1195852,\n", - " 1195659, 1197248, 1197186, 1196283, 1195353, 1198282, 1199060, 1199059,\n", - " 1197291, 1202747, 1196851, 1194928, 1199628, 1197676, 1200075, 1200403,\n", - " 1198407, 1195017, 1199676, 1200048, 1200060, 1199948, 1201511, 1202582,\n", - " 1199014, 1197970, 1197601, 1196727, 1195771, 1202618, 1200887, 1203239,\n", - " 1198416, 1198428, 1200596, 1198811, 1201824, 1201169, 1200169, 1198593,\n", - " 1196477, 1201075, 1201156, 1200991, 1201056, 1201405, 1194803, 1199539,\n", - " 1202640, 1202144, 1202508, 1201740, 1200553, 1200558, 1203071, 1197097,\n", - " 1203183, 1196889, 1199908, 1202239, 1202937, 1200899, 1202170, 1202669,\n", - " 1201291, 1197561, 1202889, 1198562, 1195048, 1202545, 1196827, 1195664,\n", - " 1202870, 1202432, 1200445, 1198929, 1198932, 1195421, 1197816, 1197822,\n", - " 1199778, 1200967, 1196605, 1201970, 1200585, 1203102, 1201143, 1194728,\n", - " 1199403, 1198824, 1197593, 1195066, 1195298, 1200301, 1195082, 1202323,\n", - " 1199007], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.7431e-02, -4.5182e-04, -7.1012e-04, ..., 5.5480e-02,\n", - " -2.9852e-04, -9.5734e-04],\n", - " [ 3.1083e-02, -5.1622e-04, -5.4608e-04, ..., 2.9270e-02,\n", - " -6.0375e-04, -5.2297e-04],\n", - " [ 5.1445e-03, -7.1320e-04, -1.5664e-04, ..., 4.3095e-02,\n", - " -7.1094e-04, -1.0171e-03],\n", - " ...,\n", - " [-2.4940e-04, -4.4784e-04, -1.4353e-05, ..., 3.2675e-02,\n", - " -9.6665e-04, -1.1089e-03],\n", - " [-5.1486e-05, -6.5495e-04, -4.2983e-05, ..., 6.7964e-02,\n", - " -3.4781e-04, -6.9628e-04],\n", - " [-3.4740e-04, -5.2016e-04, -5.0772e-05, ..., 6.5354e-02,\n", - " -2.3363e-04, -8.1344e-04]], device='cuda:0'), 'paper': tensor([[ 2.2871e-01, 5.1640e-01, -1.4549e-04, ..., -8.4123e-03,\n", - " -8.6248e-03, -1.5690e-03],\n", - " [ 2.3817e-02, 5.7933e-01, 2.0933e-01, ..., -6.9752e-03,\n", - " -6.5416e-03, -2.2890e-03],\n", - " [-2.2360e-03, 5.3797e-01, 2.0712e-01, ..., -7.5770e-03,\n", - " -8.4878e-03, -1.2718e-03],\n", - " ...,\n", - " [-5.6958e-04, 2.9594e-01, 3.6816e-01, ..., -7.4491e-03,\n", - " -7.8553e-03, -1.7304e-03],\n", - " [ 1.9831e-01, 7.5484e-02, 4.7227e-01, ..., -5.6610e-03,\n", - " -6.9593e-03, -1.3683e-03],\n", - " [ 3.5985e-02, 4.6099e-01, 1.4834e-01, ..., -4.9104e-03,\n", - " -4.2297e-03, -3.9683e-03]], device='cuda:0'), 'author': tensor([[ 9.7880e-02, -1.4598e-03, 1.4972e-01, ..., 2.4732e-01,\n", - " 2.6305e-02, -6.6921e-04],\n", - " [ 1.0829e-01, -9.8513e-04, 1.5266e-01, ..., 2.1159e-01,\n", - " 5.4805e-03, -3.9735e-04],\n", - " [ 8.9126e-02, -9.1099e-04, 5.3315e-02, ..., 2.3446e-01,\n", - " 6.1036e-02, -6.2949e-04],\n", - " ...,\n", - " [ 2.0879e-01, -1.3630e-03, 2.2950e-01, ..., 2.9158e-01,\n", - " -1.6125e-04, 6.7726e-02],\n", - " [ 8.5093e-02, -7.6771e-04, 8.4680e-02, ..., 2.1450e-01,\n", - " 7.0723e-02, -7.8829e-04],\n", - " [ 1.1475e-01, -8.5111e-04, 7.8376e-02, ..., 2.3301e-01,\n", - " 9.1721e-02, -4.8785e-04]], device='cuda:0'), 'field_of_study': tensor([[-3.7482e-04, -5.4988e-05, 2.0065e-01, ..., -7.3602e-04,\n", - " -1.9279e-03, -1.3838e-03],\n", - " [ 1.5298e-01, -8.9608e-04, 1.6817e-01, ..., -1.6158e-03,\n", - " -8.5545e-04, -1.2718e-03],\n", - " [ 1.1732e-01, 5.5552e-02, 2.0643e-01, ..., -1.5016e-03,\n", - " -6.7786e-04, -2.1718e-03],\n", - " ...,\n", - " [ 1.5516e-01, -3.1527e-04, 2.7135e-01, ..., -1.8977e-03,\n", - " -3.6342e-04, -1.4042e-03],\n", - " [-2.0252e-03, 3.9023e-02, 1.6524e-01, ..., -6.3102e-04,\n", - " 9.6026e-02, -1.4801e-05],\n", - " [ 1.3747e-01, -8.4025e-04, 2.1932e-01, ..., -1.1312e-03,\n", - " 5.7330e-03, -2.2624e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 8, 94, 168, 54, 184, 146, 72, 94, 94, 169, 88, 142,\n", - " 109, 109, 392, 50, 511, 260, 295, 379, 271, 341, 344, 657,\n", - " 657, 959, 374, 826, 606, 606, 825, 825, 759, 759, 1206, 1206,\n", - " 982, 982, 899, 1068, 1082, 1082, 1082, 1108, 1108, 1366, 1585, 1585,\n", - " 1190, 1382, 1468, 1468, 1468, 1479, 1502, 1502, 1502, 1645, 1784, 1698,\n", - " 1698, 1709, 1709, 1850, 1656, 1741, 1741, 1729, 1729, 1709, 1709, 1865,\n", - " 1910, 1935, 1842, 1966, 1954, 2078, 2142, 1945, 1962, 1962, 1962, 1962,\n", - " 1966, 2008, 2008, 2141, 2059, 2212, 2023, 2145, 2177, 2263, 2051, 2255,\n", - " 2255, 2255, 2362, 2372, 2390, 2310, 2444, 2533, 2477, 2533, 2424, 2455,\n", - " 2518, 2547, 2794, 2474, 2474, 2474, 2474, 2474, 2692, 2601, 2593, 2593,\n", - " 2842, 2842, 2650, 2729, 2927, 3095, 3095, 3095, 3095, 2990, 3149, 3075,\n", - " 3192, 3267, 3278, 3286, 3592, 3584, 3623, 3623, 3676, 3609, 3609, 3712,\n", - " 3737, 3737, 3839, 3818, 3860, 3836, 3924, 3915, 3915, 3893, 3850, 3951,\n", - " 3976, 4075, 4304, 4325, 4325, 4325, 4325, 4564, 4482, 4482, 4376, 4376,\n", - " 4703, 4650, 4395, 4395, 4395, 4395, 4435, 4458, 4642, 4419, 4419, 4588,\n", - " 4689, 4683, 4689, 4869, 4839, 4839, 4869, 4857, 4857, 4845, 5045, 5000,\n", - " 4995, 5242, 5242, 5214, 5214, 5378, 5287, 5389, 5389, 5398, 5398, 5791,\n", - " 5878, 5878, 5524, 5524, 5711, 5711, 5928, 5928, 5531, 5636, 5654, 5654,\n", - " 5480, 5480, 5775, 5686, 5532, 5532, 5949, 5742, 5633, 5633, 5633, 5781,\n", - " 5781, 5589, 5589, 5589, 5597, 5874, 5944, 5895, 5750],\n", - " [ 66, 126, 116, 75, 107, 101, 57, 54, 112, 8, 10, 67,\n", - " 35, 84, 60, 131, 111, 99, 3, 15, 8, 61, 67, 133,\n", - " 5, 8, 121, 72, 30, 143, 82, 77, 37, 64, 102, 134,\n", - " 40, 111, 33, 114, 106, 90, 11, 78, 49, 22, 103, 136,\n", - " 73, 99, 122, 9, 18, 3, 91, 14, 80, 71, 128, 1,\n", - " 79, 53, 109, 144, 120, 95, 84, 32, 137, 75, 21, 84,\n", - " 66, 44, 97, 39, 36, 85, 50, 75, 62, 117, 64, 37,\n", - " 98, 52, 34, 31, 29, 5, 55, 3, 119, 3, 26, 133,\n", - " 35, 84, 110, 60, 47, 5, 67, 69, 43, 25, 132, 140,\n", - " 3, 140, 23, 126, 38, 112, 4, 27, 113, 17, 129, 13,\n", - " 86, 68, 75, 21, 18, 3, 104, 25, 108, 135, 8, 5,\n", - " 94, 105, 56, 140, 20, 27, 60, 59, 6, 59, 70, 88,\n", - " 139, 115, 3, 23, 23, 0, 99, 60, 59, 138, 81, 23,\n", - " 3, 13, 75, 122, 31, 21, 83, 60, 114, 89, 8, 16,\n", - " 63, 16, 42, 48, 123, 2, 75, 141, 83, 24, 12, 25,\n", - " 30, 112, 31, 96, 29, 100, 75, 22, 93, 118, 75, 75,\n", - " 41, 28, 75, 106, 112, 51, 12, 75, 76, 130, 75, 74,\n", - " 65, 75, 75, 92, 75, 142, 32, 75, 127, 3, 75, 51,\n", - " 6, 75, 45, 123, 112, 87, 3, 46, 19, 75, 7, 65,\n", - " 112, 58, 60, 100, 125, 3, 3, 3, 124]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 30, 812, 4786, ..., 4561, 537, 1804],\n", - " [ 23, 208, 73, ..., 7434, 7275, 7428]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 122, 122, 99, ..., 3, 75, 66],\n", - " [ 163, 496, 58, ..., 5956, 5901, 5838]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 32, 32, 32, ..., 7360, 7360, 7360],\n", - " [ 65, 186, 825, ..., 781, 290, 265]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 450, 384, 254, ..., 290, 125, 820],\n", - " [ 215, 9, 72, ..., 7416, 7432, 7316]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 815, 330, 6200, ..., 3391, 5817, 7476],\n", - " [ 92, 11, 32, ..., 5868, 5953, 5881]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 32, 124, 102, ..., 7360, 7360, 7425],\n", - " [ 697, 814, 758, ..., 5034, 6791, 3212]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 168, 168, 168, ..., 5944, 5874, 5949],\n", - " [5425, 6002, 6199, ..., 7360, 7360, 7360]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005701\n", - "sampling 0.004675\n", - "noi time: 0.001112\n", - "get_vertex_data call: 0.06286\n", - "noi group time: 0.003081\n", - "eoi_group_time: 0.014039\n", - "second half: 0.23844\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 21471, 32616, 16542, ..., 1119184, 1132473, 1120124],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 21471, 32616, 16542, ..., 1119184, 1132473, 1120124],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1231427, 1210591, 1219066, ..., 1929435, 1938416, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1231427, 1210591, 1219066, ..., 1929435, 1938416, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1137435, 1141424, 1140282, 1140284, 1140285, 1136349, 1135926,\n", - " 1135726, 1140785, 1140799, 1141758, 1136216, 1141251, 1140294, 1136971,\n", - " 1138942, 1139142, 1143363, 1139241, 1139615, 1150509, 1142963, 1139865,\n", - " 1139866, 1149216, 1149228, 1142958, 1155683, 1155689, 1149644, 1147221,\n", - " 1147228, 1153936, 1144632, 1134694, 1135947, 1135111, 1146656, 1147095,\n", - " 1147094, 1155008, 1155019, 1139373, 1152427, 1134710, 1136268, 1146376,\n", - " 1134804, 1138742, 1134657, 1137835, 1136308, 1140537, 1138112, 1138118,\n", - " 1138119, 1137254, 1138356, 1140153, 1140020, 1140027, 1135367, 1135202,\n", - " 1154739, 1134970, 1141036, 1136770, 1134794, 1157443, 1138504, 1136178,\n", - " 1143069, 1137693, 1144389, 1144390, 1144395, 1137532, 1137534, 1135408,\n", - " 1136662, 1136942, 1156149, 1148488, 1139161, 1134841, 1135579, 1140970,\n", - " 1156342, 1137957, 1158136, 1156975, 1154132, 1136982, 1156899, 1135522,\n", - " 1139684, 1138305, 1138436, 1138440, 1138445, 1138461, 1138449, 1137932,\n", - " 1154097, 1158390, 1149328, 1138882, 1156606, 1147112, 1142611, 1158984,\n", - " 1150948, 1137109, 1139846, 1141530, 1139667, 1139668, 1138069, 1142255,\n", - " 1134992, 1142436, 1136730, 1140192, 1140197, 1139327, 1159018, 1153543,\n", - " 1140034, 1141963, 1141967, 1152044, 1139062, 1139069, 1142299, 1142302,\n", - " 1136059, 1140660, 1137734, 1137728, 1134922, 1134750, 1140228, 1141088,\n", - " 1144129, 1148996, 1149001, 1142021, 1139643, 1143767, 1143224, 1143225,\n", - " 1137670, 1139025, 1139039, 1139032, 1140003, 1149979, 1146834, 1146844,\n", - " 1135861, 1140467, 1139386, 1163301, 1136917, 1145056, 1144237, 1141785,\n", - " 1139495, 1141609, 1144650, 1136854, 1147844, 1164807, 1149434, 1139798,\n", - " 1144428, 1142050, 1141810, 1141821, 1143166, 1165098, 1142093, 1145152,\n", - " 1149111, 1139190, 1138708, 1140110, 1137662, 1144445, 1144596, 1142837,\n", - " 1136864, 1145302, 1140894, 1140432, 1144182, 1144179, 1137606, 1150906,\n", - " 1146201, 1139559, 1158698, 1158703, 1137846, 1147158, 1136378, 1142640,\n", - " 1162804, 1153068, 1149101, 1144279, 1139510, 1139769, 1140093, 1138815,\n", - " 1140990, 1140984, 1147047, 1155836, 1143543, 1152976, 1152989, 1139453,\n", - " 1141925, 1145339, 1150692, 1136885, 1134861, 1145971, 1145978, 1143845,\n", - " 1143851, 1136275, 1146024, 1146131, 1154327, 1141646, 1141585, 1139990,\n", - " 1151124, 1147543, 1147540, 1148762, 1147282, 1143721, 1136330, 1140337,\n", - " 1140345, 1140349, 1143663, 1142628, 1142637, 1149366, 1139415, 1143051,\n", - " 1136167, 1136161, 1142588, 1138923, 1157713, 1157718, 1157720, 1136836,\n", - " 1139297, 1139051, 1144957, 1143345, 1144765, 1144753, 1144619, 1135876,\n", - " 1150755, 1150294, 1143960, 1143457, 1144564, 1142003, 1146636, 1147521,\n", - " 1140364, 1149581, 1168921, 1147996, 1147999, 1134899, 1144013, 1144014,\n", - " 1148704, 1141319, 1141327, 1149714, 1147025, 1147027, 1147032, 1147971,\n", - " 1147982, 1139549, 1147196, 1158226, 1158229, 1154526, 1145237, 1145240,\n", - " 1145751, 1138638, 1146178, 1146188, 1151242, 1148223, 1152530, 1150438,\n", - " 1148819, 1155006, 1149791, 1144514, 1153983, 1147794, 1151480, 1154263,\n", - " 1139906, 1134869, 1149534, 1149530, 1135805, 1158949, 1141951, 1141949,\n", - " 1146776, 1141193, 1141199, 1144824, 1137641, 1153574, 1148461, 1147653,\n", - " 1149412, 1152068, 1152073, 1154420, 1158786, 1158794, 1148180, 1151367,\n", - " 1152561, 1157968, 1157977, 1157983, 1144110, 1151942, 1143895, 1171943,\n", - " 1153124, 1153188, 1145106, 1152921, 1150935, 1150352, 1150356, 1155088,\n", - " 1143129, 1147446, 1151811, 1154177, 1148498, 1148510, 1146565, 1141420,\n", - " 1147602, 1147737, 1153448, 1145079, 1156413, 1156402, 1153249, 1153255,\n", - " 1150219, 1146623, 1142986, 1144476, 1152098, 1150086, 1145539, 1137746,\n", - " 1146304, 1152622, 1140521, 1155148, 1136410, 1149205, 1152826, 1155337,\n", - " 1154119, 1154123, 1157842, 1157832, 1157835, 1154633, 1151580, 1151617,\n", - " 1150578, 1136798, 1153378, 1145952, 1138982, 1143988, 1156826, 1138281,\n", - " 1152294, 1136028, 1156622, 1151187, 1152928, 1156387, 1153914, 1149273,\n", - " 1148033, 1148040, 1155202, 1149300, 1149804, 1148628, 1158530, 1158540,\n", - " 1137458, 1137465, 1154564, 1135698, 1155379, 1155381, 1142041, 1157229,\n", - " 1135430, 1157547, 1142385, 1158860, 1150873, 1158916, 1154934, 1157064,\n", - " 1157069, 1157071, 1145191, 1145187, 1157560, 1135730, 1156638, 1152740,\n", - " 1150824, 1147810, 1147818, 1158308, 1155441, 1155514, 1150132, 1150136,\n", - " 1162120, 1138569, 1140866, 1154528, 1138969, 1156919, 1156921, 1156923,\n", - " 1142755, 1164631, 1156207, 1172954, 1156265, 1156269, 1157637, 1151379,\n", - " 1155360, 1155375, 1155122, 1155755, 1151431, 1135402, 1146920, 1158096,\n", - " 1168230, 1155670, 1155628, 1155630, 1155631, 1158824, 1157313, 1148836,\n", - " 1155646, 1158355, 1143256, 1143262, 1143189, 1143524, 1150371, 1153326,\n", - " 1155615, 1155613, 1150983, 1157933, 1157934, 1137152, 1153786, 1158192,\n", - " 1159116, 1140920, 1166187, 1164161, 1135601, 1135602, 1145514, 1148149,\n", - " 1150661, 1150671, 1155848, 1157684, 1146321, 1152209, 1159213, 1155434,\n", - " 1155439, 1152502, 1140374, 1156027, 1144843, 1155971, 1155975, 1156948,\n", - " 1153768, 1158841, 1158846, 1156811, 1155393, 1154592, 1154600, 1160163,\n", - " 1136896, 1158760, 1158886, 1140218, 1158815, 1158285, 1136491, 1136640,\n", - " 1140049, 1158558, 1146126, 1138110, 1158007, 1142487, 1142662, 1150684,\n", - " 1167359, 1161635, 1159042, 1159052, 1155196, 1153052, 1153045, 1159738,\n", - " 1153842, 1142674, 1142677, 1150046, 1149063, 1145948, 1153514, 1153519,\n", - " 1147300, 1161652, 1161656, 1164997, 1138161, 1156787, 1154590, 1139592,\n", - " 1139281, 1166032, 1166073, 1146058, 1146063, 1146055, 1170415, 1169493,\n", - " 1140643, 1148600, 1148607, 1165047, 1156355, 1158643, 1159032, 1188506,\n", - " 1152244, 1152247, 1171155, 1143729, 1158902, 1158907, 1162556, 1168426,\n", - " 1167933, 1147830, 1146510, 1164580, 1144750, 1152776, 1163522, 1145137,\n", - " 1145139, 1141471, 1141459, 1147426, 1147427, 1157042, 1157050, 1157052,\n", - " 1156737, 1156739, 1160849, 1157955, 1165171, 1171040, 1168748, 1168750,\n", - " 1144812, 1135567, 1164741, 1180505, 1167339, 1148683, 1154701, 1146038,\n", - " 1147674, 1171687, 1144972, 1144973, 1145441, 1145451, 1165746, 1147355,\n", - " 1152624, 1152626, 1139345, 1145902, 1153520, 1152206, 1169739, 1166661,\n", - " 1154076, 1177560, 1145671, 1145674, 1192410, 1151594, 1162893, 1167817,\n", - " 1171979, 1193345, 1149480, 1155172, 1150522, 1150518, 1161791, 1144336,\n", - " 1154670, 1142357, 1169162, 1169157, 1157331, 1157337, 1151668, 1151674,\n", - " 1169359, 1154364, 1154354, 1172750, 1149452, 1158611, 1158623, 1173047,\n", - " 1157385, 1154869, 1169945, 1155502, 1152353, 1152360, 1143858, 1168400,\n", - " 1164642, 1169921, 1148667, 1148666, 1148335, 1177215, 1169264, 1168464,\n", - " 1173307, 1154027, 1153755, 1178422, 1157158, 1157153, 1157373, 1147711,\n", - " 1151850, 1148131, 1149247, 1170490, 1167712, 1171293, 1173121, 1178415,\n", - " 1172234, 1146765, 1182091, 1140326, 1166016, 1172932, 1181134, 1144545,\n", - " 1144557, 1171823, 1154149, 1154148, 1149179, 1169979, 1143420, 1153803,\n", - " 1170519, 1153624, 1182106, 1172309, 1184093, 1179807, 1161255, 1176512,\n", - " 1182361, 1155262, 1172005, 1154718, 1157795, 1171629, 1171623, 1164034,\n", - " 1155804, 1190812, 1157991, 1158253, 1134650, 1178214, 1145626, 1179075,\n", - " 1149755, 1163718, 1179776, 1158512, 1158378, 1155890, 1155892, 1157268,\n", - " 1164404, 1140393, 1164798, 1162253, 1159329, 1168621, 1168866, 1168546,\n", - " 1165142, 1166442, 1164339, 1164264, 1161819, 1146169, 1156861, 1156170,\n", - " 1159535, 1182963, 1168930, 1168939, 1168943, 1168940, 1156528, 1139828,\n", - " 1139831, 1150265, 1154812, 1183956, 1190585, 1149626, 1156055, 1191993,\n", - " 1146392, 1146394, 1173057, 1172369, 1188803, 1177477, 1191015, 1169954,\n", - " 1141002, 1194454, 1181284, 1189970, 1151774, 1152113, 1177129, 1179001,\n", - " 1170128, 1160350, 1166788, 1145395, 1167730, 1180531, 1170168, 1179750,\n", - " 1155958, 1155959, 1155962, 1185607, 1188278, 1157022, 1185730],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1137435, 1141424, 1140282, 1140284, 1140285, 1136349, 1135926,\n", - " 1135726, 1140785, 1140799, 1141758, 1136216, 1141251, 1140294, 1136971,\n", - " 1138942, 1139142, 1143363, 1139241, 1139615, 1150509, 1142963, 1139865,\n", - " 1139866, 1149216, 1149228, 1142958, 1155683, 1155689, 1149644, 1147221,\n", - " 1147228, 1153936, 1144632, 1134694, 1135947, 1135111, 1146656, 1147095,\n", - " 1147094, 1155008, 1155019, 1139373, 1152427, 1134710, 1136268, 1146376,\n", - " 1134804, 1138742, 1134657, 1137835, 1136308, 1140537, 1138112, 1138118,\n", - " 1138119, 1137254, 1138356, 1140153, 1140020, 1140027, 1135367, 1135202,\n", - " 1154739, 1134970, 1141036, 1136770, 1134794, 1157443, 1138504, 1136178,\n", - " 1143069, 1137693, 1144389, 1144390, 1144395, 1137532, 1137534, 1135408,\n", - " 1136662, 1136942, 1156149, 1148488, 1139161, 1134841, 1135579, 1140970,\n", - " 1156342, 1137957, 1158136, 1156975, 1154132, 1136982, 1156899, 1135522,\n", - " 1139684, 1138305, 1138436, 1138440, 1138445, 1138461, 1138449, 1137932,\n", - " 1154097, 1158390, 1149328, 1138882, 1156606, 1147112, 1142611, 1158984,\n", - " 1150948, 1137109, 1139846, 1141530, 1139667, 1139668, 1138069, 1142255,\n", - " 1134992, 1142436, 1136730, 1140192, 1140197, 1139327, 1159018, 1153543,\n", - " 1140034, 1141963, 1141967, 1152044, 1139062, 1139069, 1142299, 1142302,\n", - " 1136059, 1140660, 1137734, 1137728, 1134922, 1134750, 1140228, 1141088,\n", - " 1144129, 1148996, 1149001, 1142021, 1139643, 1143767, 1143224, 1143225,\n", - " 1137670, 1139025, 1139039, 1139032, 1140003, 1149979, 1146834, 1146844,\n", - " 1135861, 1140467, 1139386, 1163301, 1136917, 1145056, 1144237, 1141785,\n", - " 1139495, 1141609, 1144650, 1136854, 1147844, 1164807, 1149434, 1139798,\n", - " 1144428, 1142050, 1141810, 1141821, 1143166, 1165098, 1142093, 1145152,\n", - " 1149111, 1139190, 1138708, 1140110, 1137662, 1144445, 1144596, 1142837,\n", - " 1136864, 1145302, 1140894, 1140432, 1144182, 1144179, 1137606, 1150906,\n", - " 1146201, 1139559, 1158698, 1158703, 1137846, 1147158, 1136378, 1142640,\n", - " 1162804, 1153068, 1149101, 1144279, 1139510, 1139769, 1140093, 1138815,\n", - " 1140990, 1140984, 1147047, 1155836, 1143543, 1152976, 1152989, 1139453,\n", - " 1141925, 1145339, 1150692, 1136885, 1134861, 1145971, 1145978, 1143845,\n", - " 1143851, 1136275, 1146024, 1146131, 1154327, 1141646, 1141585, 1139990,\n", - " 1151124, 1147543, 1147540, 1148762, 1147282, 1143721, 1136330, 1140337,\n", - " 1140345, 1140349, 1143663, 1142628, 1142637, 1149366, 1139415, 1143051,\n", - " 1136167, 1136161, 1142588, 1138923, 1157713, 1157718, 1157720, 1136836,\n", - " 1139297, 1139051, 1144957, 1143345, 1144765, 1144753, 1144619, 1135876,\n", - " 1150755, 1150294, 1143960, 1143457, 1144564, 1142003, 1146636, 1147521,\n", - " 1140364, 1149581, 1168921, 1147996, 1147999, 1134899, 1144013, 1144014,\n", - " 1148704, 1141319, 1141327, 1149714, 1147025, 1147027, 1147032, 1147971,\n", - " 1147982, 1139549, 1147196, 1158226, 1158229, 1154526, 1145237, 1145240,\n", - " 1145751, 1138638, 1146178, 1146188, 1151242, 1148223, 1152530, 1150438,\n", - " 1148819, 1155006, 1149791, 1144514, 1153983, 1147794, 1151480, 1154263,\n", - " 1139906, 1134869, 1149534, 1149530, 1135805, 1158949, 1141951, 1141949,\n", - " 1146776, 1141193, 1141199, 1144824, 1137641, 1153574, 1148461, 1147653,\n", - " 1149412, 1152068, 1152073, 1154420, 1158786, 1158794, 1148180, 1151367,\n", - " 1152561, 1157968, 1157977, 1157983, 1144110, 1151942, 1143895, 1171943,\n", - " 1153124, 1153188, 1145106, 1152921, 1150935, 1150352, 1150356, 1155088,\n", - " 1143129, 1147446, 1151811, 1154177, 1148498, 1148510, 1146565, 1141420,\n", - " 1147602, 1147737, 1153448, 1145079, 1156413, 1156402, 1153249, 1153255,\n", - " 1150219, 1146623, 1142986, 1144476, 1152098, 1150086, 1145539, 1137746,\n", - " 1146304, 1152622, 1140521, 1155148, 1136410, 1149205, 1152826, 1155337,\n", - " 1154119, 1154123, 1157842, 1157832, 1157835, 1154633, 1151580, 1151617,\n", - " 1150578, 1136798, 1153378, 1145952, 1138982, 1143988, 1156826, 1138281,\n", - " 1152294, 1136028, 1156622, 1151187, 1152928, 1156387, 1153914, 1149273,\n", - " 1148033, 1148040, 1155202, 1149300, 1149804, 1148628, 1158530, 1158540,\n", - " 1137458, 1137465, 1154564, 1135698, 1155379, 1155381, 1142041, 1157229,\n", - " 1135430, 1157547, 1142385, 1158860, 1150873, 1158916, 1154934, 1157064,\n", - " 1157069, 1157071, 1145191, 1145187, 1157560, 1135730, 1156638, 1152740,\n", - " 1150824, 1147810, 1147818, 1158308, 1155441, 1155514, 1150132, 1150136,\n", - " 1162120, 1138569, 1140866, 1154528, 1138969, 1156919, 1156921, 1156923,\n", - " 1142755, 1164631, 1156207, 1172954, 1156265, 1156269, 1157637, 1151379,\n", - " 1155360, 1155375, 1155122, 1155755, 1151431, 1135402, 1146920, 1158096,\n", - " 1168230, 1155670, 1155628, 1155630, 1155631, 1158824, 1157313, 1148836,\n", - " 1155646, 1158355, 1143256, 1143262, 1143189, 1143524, 1150371, 1153326,\n", - " 1155615, 1155613, 1150983, 1157933, 1157934, 1137152, 1153786, 1158192,\n", - " 1159116, 1140920, 1166187, 1164161, 1135601, 1135602, 1145514, 1148149,\n", - " 1150661, 1150671, 1155848, 1157684, 1146321, 1152209, 1159213, 1155434,\n", - " 1155439, 1152502, 1140374, 1156027, 1144843, 1155971, 1155975, 1156948,\n", - " 1153768, 1158841, 1158846, 1156811, 1155393, 1154592, 1154600, 1160163,\n", - " 1136896, 1158760, 1158886, 1140218, 1158815, 1158285, 1136491, 1136640,\n", - " 1140049, 1158558, 1146126, 1138110, 1158007, 1142487, 1142662, 1150684,\n", - " 1167359, 1161635, 1159042, 1159052, 1155196, 1153052, 1153045, 1159738,\n", - " 1153842, 1142674, 1142677, 1150046, 1149063, 1145948, 1153514, 1153519,\n", - " 1147300, 1161652, 1161656, 1164997, 1138161, 1156787, 1154590, 1139592,\n", - " 1139281, 1166032, 1166073, 1146058, 1146063, 1146055, 1170415, 1169493,\n", - " 1140643, 1148600, 1148607, 1165047, 1156355, 1158643, 1159032, 1188506,\n", - " 1152244, 1152247, 1171155, 1143729, 1158902, 1158907, 1162556, 1168426,\n", - " 1167933, 1147830, 1146510, 1164580, 1144750, 1152776, 1163522, 1145137,\n", - " 1145139, 1141471, 1141459, 1147426, 1147427, 1157042, 1157050, 1157052,\n", - " 1156737, 1156739, 1160849, 1157955, 1165171, 1171040, 1168748, 1168750,\n", - " 1144812, 1135567, 1164741, 1180505, 1167339, 1148683, 1154701, 1146038,\n", - " 1147674, 1171687, 1144972, 1144973, 1145441, 1145451, 1165746, 1147355,\n", - " 1152624, 1152626, 1139345, 1145902, 1153520, 1152206, 1169739, 1166661,\n", - " 1154076, 1177560, 1145671, 1145674, 1192410, 1151594, 1162893, 1167817,\n", - " 1171979, 1193345, 1149480, 1155172, 1150522, 1150518, 1161791, 1144336,\n", - " 1154670, 1142357, 1169162, 1169157, 1157331, 1157337, 1151668, 1151674,\n", - " 1169359, 1154364, 1154354, 1172750, 1149452, 1158611, 1158623, 1173047,\n", - " 1157385, 1154869, 1169945, 1155502, 1152353, 1152360, 1143858, 1168400,\n", - " 1164642, 1169921, 1148667, 1148666, 1148335, 1177215, 1169264, 1168464,\n", - " 1173307, 1154027, 1153755, 1178422, 1157158, 1157153, 1157373, 1147711,\n", - " 1151850, 1148131, 1149247, 1170490, 1167712, 1171293, 1173121, 1178415,\n", - " 1172234, 1146765, 1182091, 1140326, 1166016, 1172932, 1181134, 1144545,\n", - " 1144557, 1171823, 1154149, 1154148, 1149179, 1169979, 1143420, 1153803,\n", - " 1170519, 1153624, 1182106, 1172309, 1184093, 1179807, 1161255, 1176512,\n", - " 1182361, 1155262, 1172005, 1154718, 1157795, 1171629, 1171623, 1164034,\n", - " 1155804, 1190812, 1157991, 1158253, 1134650, 1178214, 1145626, 1179075,\n", - " 1149755, 1163718, 1179776, 1158512, 1158378, 1155890, 1155892, 1157268,\n", - " 1164404, 1140393, 1164798, 1162253, 1159329, 1168621, 1168866, 1168546,\n", - " 1165142, 1166442, 1164339, 1164264, 1161819, 1146169, 1156861, 1156170,\n", - " 1159535, 1182963, 1168930, 1168939, 1168943, 1168940, 1156528, 1139828,\n", - " 1139831, 1150265, 1154812, 1183956, 1190585, 1149626, 1156055, 1191993,\n", - " 1146392, 1146394, 1173057, 1172369, 1188803, 1177477, 1191015, 1169954,\n", - " 1141002, 1194454, 1181284, 1189970, 1151774, 1152113, 1177129, 1179001,\n", - " 1170128, 1160350, 1166788, 1145395, 1167730, 1180531, 1170168, 1179750,\n", - " 1155958, 1155959, 1155962, 1185607, 1188278, 1157022, 1185730],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196011, 1197717, 1199827, 1195860, 1199282, 1199283, 1198449, 1198459,\n", - " 1202243, 1202255, 1196195, 1198844, 1201577, 1201582, 1194626, 1201016,\n", - " 1198633, 1198690, 1196956, 1198557, 1196685, 1198190, 1194783, 1194648,\n", - " 1195511, 1195263, 1201992, 1196031, 1198542, 1198543, 1197697, 1197701,\n", - " 1199519, 1195888, 1194759, 1198668, 1196171, 1197795, 1198264, 1198357,\n", - " 1198163, 1198167, 1196711, 1196247, 1197273, 1194859, 1195038, 1198925,\n", - " 1199377, 1195541, 1196311, 1197640, 1195918, 1199710, 1199329, 1200949,\n", - " 1199059, 1197291, 1194928, 1197583, 1199685, 1199628, 1197676, 1197990,\n", - " 1200872, 1198404, 1199579, 1199231, 1196498, 1200668, 1197601, 1201117,\n", - " 1196727, 1203239, 1198416, 1198428, 1198811, 1199555, 1201824, 1200452,\n", - " 1200503, 1201079, 1202631, 1199546, 1201732, 1201737, 1200526, 1200553,\n", - " 1200557, 1197100, 1202102, 1201726, 1202541, 1200087, 1202138, 1196889,\n", - " 1199908, 1199917, 1200194, 1201442, 1202834, 1195876, 1195885, 1198474,\n", - " 1202205, 1195607, 1201590, 1201596, 1201796, 1200784, 1200793, 1199606,\n", - " 1195676, 1195664, 1200276, 1198911, 1197822, 1196597, 1197491, 1202269,\n", - " 1199659, 1196375, 1197735, 1199782, 1198819, 1198848, 1203077, 1201886,\n", - " 1200296, 1197035, 1197039, 1201877, 1196551, 1194907], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196011, 1197717, 1199827, 1195860, 1199282, 1199283, 1198449, 1198459,\n", - " 1202243, 1202255, 1196195, 1198844, 1201577, 1201582, 1194626, 1201016,\n", - " 1198633, 1198690, 1196956, 1198557, 1196685, 1198190, 1194783, 1194648,\n", - " 1195511, 1195263, 1201992, 1196031, 1198542, 1198543, 1197697, 1197701,\n", - " 1199519, 1195888, 1194759, 1198668, 1196171, 1197795, 1198264, 1198357,\n", - " 1198163, 1198167, 1196711, 1196247, 1197273, 1194859, 1195038, 1198925,\n", - " 1199377, 1195541, 1196311, 1197640, 1195918, 1199710, 1199329, 1200949,\n", - " 1199059, 1197291, 1194928, 1197583, 1199685, 1199628, 1197676, 1197990,\n", - " 1200872, 1198404, 1199579, 1199231, 1196498, 1200668, 1197601, 1201117,\n", - " 1196727, 1203239, 1198416, 1198428, 1198811, 1199555, 1201824, 1200452,\n", - " 1200503, 1201079, 1202631, 1199546, 1201732, 1201737, 1200526, 1200553,\n", - " 1200557, 1197100, 1202102, 1201726, 1202541, 1200087, 1202138, 1196889,\n", - " 1199908, 1199917, 1200194, 1201442, 1202834, 1195876, 1195885, 1198474,\n", - " 1202205, 1195607, 1201590, 1201596, 1201796, 1200784, 1200793, 1199606,\n", - " 1195676, 1195664, 1200276, 1198911, 1197822, 1196597, 1197491, 1202269,\n", - " 1199659, 1196375, 1197735, 1199782, 1198819, 1198848, 1203077, 1201886,\n", - " 1200296, 1197035, 1197039, 1201877, 1196551, 1194907], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[-2.8969e-04, -3.7513e-04, -4.1051e-04, ..., 6.1328e-02,\n", - " -6.8699e-04, -8.6784e-04],\n", - " [-7.0364e-05, -4.4445e-04, -5.5764e-04, ..., 6.0750e-02,\n", - " -5.3214e-04, -8.2146e-04],\n", - " [-5.4090e-04, -4.3103e-04, 1.6156e-02, ..., 8.4858e-02,\n", - " -1.0210e-03, -1.1232e-03],\n", - " ...,\n", - " [-7.2457e-05, -6.3565e-04, -8.3487e-05, ..., 6.2734e-02,\n", - " -2.8737e-04, -9.3870e-04],\n", - " [-2.2539e-06, -4.4004e-04, -2.1510e-04, ..., 6.1254e-02,\n", - " -6.0050e-04, -7.8816e-04],\n", - " [ 1.1060e-02, -4.3904e-04, -2.0045e-04, ..., 7.7166e-02,\n", - " -7.0092e-04, -9.1195e-04]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[-5.6414e-04, 6.3313e-01, 5.1790e-02, ..., -7.5988e-03,\n", - " -8.2001e-03, -2.2438e-03],\n", - " [ 2.1663e-02, 4.9150e-01, 3.7310e-01, ..., -6.3520e-03,\n", - " -7.4913e-03, -1.8673e-04],\n", - " [ 9.7289e-02, 2.8867e-01, 2.3320e-01, ..., -7.7379e-03,\n", - " -6.0595e-03, -2.7805e-03],\n", - " ...,\n", - " [ 6.7868e-02, 6.7335e-01, 1.4665e-01, ..., -4.6672e-03,\n", - " -6.3650e-03, -2.6325e-03],\n", - " [ 1.5348e-01, 1.2896e-01, 3.2575e-01, ..., -8.3606e-03,\n", - " -6.4938e-03, -5.0877e-03],\n", - " [ 3.6245e-02, 4.4061e-01, 1.4512e-01, ..., -4.8414e-03,\n", - " -4.2104e-03, -3.8255e-03]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-1.4046e-04, -2.0768e-03, 1.3466e-01, ..., 2.1598e-01,\n", - " -1.6707e-04, -9.2284e-05],\n", - " [ 7.2882e-02, -1.1622e-03, 7.9841e-02, ..., 2.5223e-01,\n", - " 3.0519e-02, -6.2904e-04],\n", - " [ 1.0236e-01, -1.8245e-03, 2.3238e-01, ..., 1.5530e-01,\n", - " -1.1444e-03, 6.3228e-02],\n", - " ...,\n", - " [ 8.8126e-02, -1.8024e-03, 2.6673e-01, ..., 1.7395e-01,\n", - " 9.0272e-02, -1.3586e-03],\n", - " [ 1.6054e-01, -1.6516e-03, 6.3852e-02, ..., 2.4682e-01,\n", - " 6.8403e-02, -4.6933e-04],\n", - " [ 1.3607e-01, -5.8137e-04, 1.7181e-01, ..., 2.3722e-01,\n", - " 1.0944e-01, -1.1320e-03]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[ 1.2958e-01, -9.3899e-04, 1.9506e-01, ..., -1.1655e-03,\n", - " -4.5781e-04, -9.3207e-04],\n", - " [ 1.4737e-01, -7.5470e-04, 2.1989e-01, ..., -1.9515e-03,\n", - " -1.3099e-03, -1.0351e-03],\n", - " [ 9.9590e-02, -5.7059e-04, 1.9298e-01, ..., -1.2252e-03,\n", - " -7.4886e-04, -1.8311e-03],\n", - " ...,\n", - " [ 8.7466e-02, -9.8278e-04, 1.7588e-01, ..., -1.8071e-03,\n", - " -1.1187e-03, -1.0108e-03],\n", - " [ 5.2126e-02, -1.1142e-04, 2.4839e-01, ..., -1.7268e-03,\n", - " -5.8183e-04, -2.1813e-03],\n", - " [ 1.5240e-01, -9.9509e-04, 1.8791e-01, ..., -1.4482e-03,\n", - " -7.7214e-04, -5.7369e-04]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 205, 37, 156, 217, 85, 13, 43, 473, 473, 75, 438, 438,\n", - " 415, 251, 251, 332, 332, 792, 386, 692, 575, 619, 619, 700,\n", - " 611, 611, 1092, 839, 839, 570, 756, 865, 969, 1005, 1368, 1368,\n", - " 1219, 1219, 1205, 1368, 1368, 1368, 1393, 1420, 1531, 1531, 1608, 1608,\n", - " 1608, 1586, 1580, 1549, 1664, 1763, 1822, 1565, 1565, 1842, 1544, 1927,\n", - " 1905, 2026, 1991, 2142, 2142, 2194, 2194, 2400, 2400, 2400, 2130, 2324,\n", - " 2324, 2317, 2374, 2112, 2397, 2397, 2516, 2516, 2283, 2283, 2321, 2326,\n", - " 2523, 2523, 2383, 2333, 2463, 2463, 2642, 2698, 2746, 2746, 2746, 2976,\n", - " 3058, 3058, 2819, 2784, 2646, 2771, 3016, 3136, 3033, 2934, 3053, 3162,\n", - " 3146, 3156, 3099, 3004, 3183, 3198, 3371, 3444, 3412, 3412, 3524, 3376,\n", - " 3457, 3976, 3871, 3783, 3865, 4059, 4133, 4170, 4147, 4303, 4199, 4199,\n", - " 4320, 4320, 4420, 4434, 4536, 4263, 4436, 4399, 4386, 4562, 4754, 4754,\n", - " 4776, 5025, 4884, 4970, 4923, 4923, 4943, 4946, 5083, 5069, 5069, 5069,\n", - " 5069, 5103, 5037, 5037, 5037, 5666, 5316, 5436, 5436, 5485, 5375, 5511,\n", - " 5509, 5509, 5406, 5614, 5729, 5846, 5717, 5509, 5532, 5723, 5814, 5814,\n", - " 5853, 5907, 5907, 5907, 6005, 6079, 6013, 6013],\n", - " [ 39, 3, 69, 17, 56, 63, 81, 27, 26, 95, 127, 53,\n", - " 41, 94, 42, 28, 117, 72, 113, 68, 111, 16, 8, 4,\n", - " 93, 133, 113, 36, 50, 111, 22, 93, 73, 123, 76, 72,\n", - " 69, 82, 21, 12, 77, 67, 52, 76, 74, 87, 98, 115,\n", - " 0, 58, 71, 6, 64, 25, 14, 92, 20, 76, 119, 18,\n", - " 10, 10, 98, 11, 48, 51, 107, 9, 132, 104, 103, 123,\n", - " 76, 25, 51, 20, 100, 1, 129, 121, 4, 85, 14, 56,\n", - " 19, 98, 51, 127, 37, 8, 2, 42, 60, 7, 40, 13,\n", - " 75, 86, 109, 108, 14, 72, 24, 30, 127, 99, 76, 9,\n", - " 118, 131, 2, 54, 72, 112, 37, 108, 50, 97, 4, 120,\n", - " 55, 64, 103, 62, 124, 25, 118, 105, 103, 2, 65, 11,\n", - " 33, 49, 118, 90, 114, 83, 43, 96, 5, 59, 79, 12,\n", - " 31, 88, 128, 29, 6, 91, 36, 45, 110, 76, 70, 67,\n", - " 66, 23, 63, 61, 32, 93, 125, 47, 34, 32, 44, 57,\n", - " 80, 112, 38, 46, 28, 102, 35, 106, 72, 130, 89, 126,\n", - " 116, 15, 56, 101, 78, 122, 84, 93]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2724, 875, 875, ..., 967, 6961, 967],\n", - " [ 61, 105, 20, ..., 7597, 7585, 7585]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 31, 3, 10, ..., 40, 112, 127],\n", - " [ 24, 27, 20, ..., 5986, 5936, 5881]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 38, 38, 38, ..., 7594, 7441, 7441],\n", - " [ 723, 285, 421, ..., 298, 244, 734]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 120, 275, 488, ..., 662, 68, 408],\n", - " [ 121, 321, 5, ..., 7425, 7586, 7502]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[7166, 6540, 6136, ..., 212, 7363, 3691],\n", - " [ 197, 197, 40, ..., 6064, 6028, 6021]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 38, 38, 38, ..., 7441, 7441, 7441],\n", - " [4751, 1577, 4178, ..., 3955, 53, 633]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 156, 43, 43, ..., 6005, 6005, 6005],\n", - " [4907, 6233, 6387, ..., 6250, 7071, 5857]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006105\n", - "sampling 0.005944\n", - "noi time: 0.001539\n", - "get_vertex_data call: 0.025431\n", - "noi group time: 0.003223\n", - "eoi_group_time: 0.016232\n", - "second half: 0.192641\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31145, 24187, 32616, ..., 1119684, 1100728, 1119041],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31145, 24187, 32616, ..., 1119684, 1100728, 1119041],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1208555, 1216134, ..., 1935650, 1936995, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1208555, 1216134, ..., 1935650, 1936995, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1141424, 1135933, 1138553, 1135726, 1141758, 1140297, 1138057,\n", - " 1138897, 1139811, 1146981, 1137947, 1138930, 1145055, 1143372, 1146640,\n", - " 1146641, 1139615, 1140781, 1150506, 1150509, 1145281, 1139866, 1155689,\n", - " 1147473, 1141882, 1142881, 1135251, 1149038, 1146992, 1135950, 1136122,\n", - " 1152658, 1137220, 1145412, 1155019, 1139371, 1136683, 1150329, 1134657,\n", - " 1137254, 1140158, 1134720, 1135367, 1135202, 1134794, 1137329, 1136178,\n", - " 1157088, 1137693, 1136619, 1136623, 1139215, 1157397, 1152376, 1137472,\n", - " 1137025, 1156149, 1156159, 1148481, 1135579, 1135583, 1136097, 1135670,\n", - " 1140970, 1158136, 1154132, 1139685, 1136352, 1138436, 1138440, 1138449,\n", - " 1136594, 1138846, 1138697, 1142611, 1142616, 1135036, 1135359, 1135618,\n", - " 1135631, 1156141, 1156139, 1138185, 1145843, 1134992, 1134771, 1136548,\n", - " 1135776, 1158965, 1158968, 1158974, 1159009, 1144406, 1153543, 1140034,\n", - " 1139072, 1138150, 1140557, 1141985, 1152044, 1139064, 1137728, 1135540,\n", - " 1135543, 1140228, 1141088, 1141100, 1144130, 1143224, 1143225, 1141690,\n", - " 1135860, 1141224, 1136917, 1145057, 1140598, 1141786, 1139495, 1144941,\n", - " 1144650, 1147850, 1137087, 1144428, 1138482, 1142052, 1143153, 1140160,\n", - " 1158749, 1139190, 1141479, 1141482, 1142925, 1144596, 1136867, 1136864,\n", - " 1150906, 1137369, 1158703, 1147153, 1136369, 1141365, 1153068, 1141678,\n", - " 1141664, 1144281, 1139510, 1139763, 1139653, 1143779, 1140976, 1140990,\n", - " 1141560, 1147050, 1145873, 1152976, 1152980, 1152985, 1139455, 1141925,\n", - " 1144242, 1150695, 1140689, 1145983, 1143845, 1146019, 1146024, 1146140,\n", - " 1154323, 1154328, 1141235, 1139990, 1143283, 1147543, 1147282, 1136330,\n", - " 1149159, 1140348, 1142630, 1149608, 1143051, 1136167, 1136836, 1136843,\n", - " 1139329, 1142153, 1158043, 1143345, 1144765, 1144615, 1140844, 1135876,\n", - " 1144319, 1150294, 1143456, 1143457, 1144291, 1143937, 1135454, 1147574,\n", - " 1143798, 1140364, 1149581, 1143082, 1166410, 1148962, 1144219, 1147984,\n", - " 1147999, 1148704, 1141319, 1146751, 1148473, 1153702, 1147056, 1149722,\n", - " 1147249, 1145011, 1145012, 1139549, 1158224, 1158226, 1150463, 1147874,\n", - " 1147880, 1145240, 1145751, 1148387, 1152530, 1152533, 1152540, 1150445,\n", - " 1149787, 1149791, 1144514, 1144526, 1150348, 1154819, 1147794, 1151480,\n", - " 1152024, 1152026, 1139914, 1150112, 1147019, 1153152, 1141936, 1150736,\n", - " 1150748, 1150843, 1148743, 1149991, 1148461, 1147653, 1143560, 1149412,\n", - " 1148288, 1148300, 1152070, 1154420, 1158794, 1148180, 1151363, 1146682,\n", - " 1152436, 1157968, 1148734, 1148729, 1139936, 1141739, 1153121, 1153124,\n", - " 1153197, 1145111, 1159828, 1148060, 1150356, 1155098, 1152581, 1135311,\n", - " 1154183, 1150715, 1148504, 1141420, 1136002, 1145079, 1150210, 1146623,\n", - " 1152409, 1152100, 1153032, 1145539, 1137746, 1152622, 1140521, 1152673,\n", - " 1151617, 1150578, 1148916, 1152944, 1138982, 1151311, 1152341, 1138279,\n", - " 1138281, 1136028, 1136029, 1158704, 1140678, 1152928, 1151071, 1156422,\n", - " 1150104, 1148033, 1148040, 1149300, 1155221, 1149792, 1137048, 1148628,\n", - " 1158530, 1158533, 1137458, 1149943, 1149947, 1154575, 1135707, 1135706,\n", - " 1154381, 1150872, 1154942, 1157064, 1155418, 1137809, 1151260, 1135729,\n", - " 1152181, 1156638, 1151788, 1151777, 1153413, 1147810, 1139530, 1158304,\n", - " 1158308, 1151271, 1151342, 1155441, 1150129, 1150132, 1150136, 1140865,\n", - " 1154536, 1145606, 1150495, 1142755, 1151379, 1155122, 1157174, 1153486,\n", - " 1155755, 1146920, 1145793, 1155626, 1155628, 1154550, 1158824, 1161796,\n", - " 1160223, 1154240, 1157439, 1159618, 1157934, 1151030, 1157653, 1155026,\n", - " 1167064, 1140920, 1166187, 1135601, 1158665, 1158671, 1157685, 1155724,\n", - " 1144451, 1157728, 1144843, 1155971, 1155975, 1155402, 1158753, 1161575,\n", - " 1158886, 1140213, 1140215, 1156778, 1152463, 1144127, 1166421, 1157867,\n", - " 1147785, 1158558, 1153824, 1155866, 1154340, 1144589, 1158257, 1155521,\n", - " 1171195, 1137563, 1167359, 1159042, 1159057, 1151075, 1151077, 1157945,\n", - " 1153042, 1153045, 1172998, 1159738, 1167708, 1156381, 1156096, 1138393,\n", - " 1142679, 1150046, 1149063, 1153519, 1147300, 1156252, 1161652, 1138161,\n", - " 1156785, 1156795, 1164909, 1163390, 1148025, 1146063, 1159928, 1165309,\n", - " 1141862, 1148600, 1148603, 1148607, 1143139, 1166805, 1166815, 1151872,\n", - " 1155809, 1185130, 1158655, 1156181, 1159029, 1159032, 1159038, 1152244,\n", - " 1152247, 1143729, 1144490, 1158905, 1160605, 1155588, 1160509, 1144989,\n", - " 1164580, 1152776, 1165422, 1141471, 1156739, 1153663, 1144810, 1144812,\n", - " 1165719, 1165721, 1165727, 1164741, 1161748, 1145743, 1163935, 1145228,\n", - " 1163518, 1142136, 1152626, 1155905, 1148124, 1193481, 1147723, 1153520,\n", - " 1143402, 1166670, 1154076, 1168754, 1168756, 1163646, 1145673, 1169602,\n", - " 1166653, 1150515, 1167905, 1145535, 1144336, 1169162, 1157331, 1151668,\n", - " 1169359, 1154353, 1149452, 1138609, 1158623, 1158052, 1158062, 1173047,\n", - " 1155502, 1152353, 1152360, 1172212, 1148667, 1172139, 1173307, 1145033,\n", - " 1160936, 1152151, 1151697, 1157153, 1157368, 1147708, 1147711, 1151850,\n", - " 1148131, 1157592, 1170488, 1169037, 1183427, 1178415, 1171881, 1166746,\n", - " 1160990, 1140326, 1172606, 1171614, 1153427, 1159099, 1159100, 1169084,\n", - " 1166684, 1182131, 1150234, 1154148, 1179965, 1158178, 1167517, 1149173,\n", - " 1179860, 1143279, 1143420, 1171302, 1170176, 1153803, 1171318, 1172309,\n", - " 1155260, 1154717, 1157792, 1157795, 1171623, 1158253, 1153890, 1145626,\n", - " 1172022, 1186793, 1157483, 1149755, 1146252, 1152279, 1155990, 1158517,\n", - " 1163862, 1158374, 1158380, 1155890, 1155892, 1191383, 1171644, 1185421,\n", - " 1166442, 1163422, 1163421, 1176976, 1165078, 1161819, 1147182, 1168943,\n", - " 1170822, 1139828, 1139825, 1139831, 1150265, 1154812, 1183966, 1156055,\n", - " 1149536, 1191018, 1169964, 1189545, 1140997, 1151774, 1166841, 1170128,\n", - " 1156672, 1172429, 1174606, 1187677, 1179282, 1184971, 1193629, 1186375,\n", - " 1182852, 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1141424, 1135933, 1138553, 1135726, 1141758, 1140297, 1138057,\n", - " 1138897, 1139811, 1146981, 1137947, 1138930, 1145055, 1143372, 1146640,\n", - " 1146641, 1139615, 1140781, 1150506, 1150509, 1145281, 1139866, 1155689,\n", - " 1147473, 1141882, 1142881, 1135251, 1149038, 1146992, 1135950, 1136122,\n", - " 1152658, 1137220, 1145412, 1155019, 1139371, 1136683, 1150329, 1134657,\n", - " 1137254, 1140158, 1134720, 1135367, 1135202, 1134794, 1137329, 1136178,\n", - " 1157088, 1137693, 1136619, 1136623, 1139215, 1157397, 1152376, 1137472,\n", - " 1137025, 1156149, 1156159, 1148481, 1135579, 1135583, 1136097, 1135670,\n", - " 1140970, 1158136, 1154132, 1139685, 1136352, 1138436, 1138440, 1138449,\n", - " 1136594, 1138846, 1138697, 1142611, 1142616, 1135036, 1135359, 1135618,\n", - " 1135631, 1156141, 1156139, 1138185, 1145843, 1134992, 1134771, 1136548,\n", - " 1135776, 1158965, 1158968, 1158974, 1159009, 1144406, 1153543, 1140034,\n", - " 1139072, 1138150, 1140557, 1141985, 1152044, 1139064, 1137728, 1135540,\n", - " 1135543, 1140228, 1141088, 1141100, 1144130, 1143224, 1143225, 1141690,\n", - " 1135860, 1141224, 1136917, 1145057, 1140598, 1141786, 1139495, 1144941,\n", - " 1144650, 1147850, 1137087, 1144428, 1138482, 1142052, 1143153, 1140160,\n", - " 1158749, 1139190, 1141479, 1141482, 1142925, 1144596, 1136867, 1136864,\n", - " 1150906, 1137369, 1158703, 1147153, 1136369, 1141365, 1153068, 1141678,\n", - " 1141664, 1144281, 1139510, 1139763, 1139653, 1143779, 1140976, 1140990,\n", - " 1141560, 1147050, 1145873, 1152976, 1152980, 1152985, 1139455, 1141925,\n", - " 1144242, 1150695, 1140689, 1145983, 1143845, 1146019, 1146024, 1146140,\n", - " 1154323, 1154328, 1141235, 1139990, 1143283, 1147543, 1147282, 1136330,\n", - " 1149159, 1140348, 1142630, 1149608, 1143051, 1136167, 1136836, 1136843,\n", - " 1139329, 1142153, 1158043, 1143345, 1144765, 1144615, 1140844, 1135876,\n", - " 1144319, 1150294, 1143456, 1143457, 1144291, 1143937, 1135454, 1147574,\n", - " 1143798, 1140364, 1149581, 1143082, 1166410, 1148962, 1144219, 1147984,\n", - " 1147999, 1148704, 1141319, 1146751, 1148473, 1153702, 1147056, 1149722,\n", - " 1147249, 1145011, 1145012, 1139549, 1158224, 1158226, 1150463, 1147874,\n", - " 1147880, 1145240, 1145751, 1148387, 1152530, 1152533, 1152540, 1150445,\n", - " 1149787, 1149791, 1144514, 1144526, 1150348, 1154819, 1147794, 1151480,\n", - " 1152024, 1152026, 1139914, 1150112, 1147019, 1153152, 1141936, 1150736,\n", - " 1150748, 1150843, 1148743, 1149991, 1148461, 1147653, 1143560, 1149412,\n", - " 1148288, 1148300, 1152070, 1154420, 1158794, 1148180, 1151363, 1146682,\n", - " 1152436, 1157968, 1148734, 1148729, 1139936, 1141739, 1153121, 1153124,\n", - " 1153197, 1145111, 1159828, 1148060, 1150356, 1155098, 1152581, 1135311,\n", - " 1154183, 1150715, 1148504, 1141420, 1136002, 1145079, 1150210, 1146623,\n", - " 1152409, 1152100, 1153032, 1145539, 1137746, 1152622, 1140521, 1152673,\n", - " 1151617, 1150578, 1148916, 1152944, 1138982, 1151311, 1152341, 1138279,\n", - " 1138281, 1136028, 1136029, 1158704, 1140678, 1152928, 1151071, 1156422,\n", - " 1150104, 1148033, 1148040, 1149300, 1155221, 1149792, 1137048, 1148628,\n", - " 1158530, 1158533, 1137458, 1149943, 1149947, 1154575, 1135707, 1135706,\n", - " 1154381, 1150872, 1154942, 1157064, 1155418, 1137809, 1151260, 1135729,\n", - " 1152181, 1156638, 1151788, 1151777, 1153413, 1147810, 1139530, 1158304,\n", - " 1158308, 1151271, 1151342, 1155441, 1150129, 1150132, 1150136, 1140865,\n", - " 1154536, 1145606, 1150495, 1142755, 1151379, 1155122, 1157174, 1153486,\n", - " 1155755, 1146920, 1145793, 1155626, 1155628, 1154550, 1158824, 1161796,\n", - " 1160223, 1154240, 1157439, 1159618, 1157934, 1151030, 1157653, 1155026,\n", - " 1167064, 1140920, 1166187, 1135601, 1158665, 1158671, 1157685, 1155724,\n", - " 1144451, 1157728, 1144843, 1155971, 1155975, 1155402, 1158753, 1161575,\n", - " 1158886, 1140213, 1140215, 1156778, 1152463, 1144127, 1166421, 1157867,\n", - " 1147785, 1158558, 1153824, 1155866, 1154340, 1144589, 1158257, 1155521,\n", - " 1171195, 1137563, 1167359, 1159042, 1159057, 1151075, 1151077, 1157945,\n", - " 1153042, 1153045, 1172998, 1159738, 1167708, 1156381, 1156096, 1138393,\n", - " 1142679, 1150046, 1149063, 1153519, 1147300, 1156252, 1161652, 1138161,\n", - " 1156785, 1156795, 1164909, 1163390, 1148025, 1146063, 1159928, 1165309,\n", - " 1141862, 1148600, 1148603, 1148607, 1143139, 1166805, 1166815, 1151872,\n", - " 1155809, 1185130, 1158655, 1156181, 1159029, 1159032, 1159038, 1152244,\n", - " 1152247, 1143729, 1144490, 1158905, 1160605, 1155588, 1160509, 1144989,\n", - " 1164580, 1152776, 1165422, 1141471, 1156739, 1153663, 1144810, 1144812,\n", - " 1165719, 1165721, 1165727, 1164741, 1161748, 1145743, 1163935, 1145228,\n", - " 1163518, 1142136, 1152626, 1155905, 1148124, 1193481, 1147723, 1153520,\n", - " 1143402, 1166670, 1154076, 1168754, 1168756, 1163646, 1145673, 1169602,\n", - " 1166653, 1150515, 1167905, 1145535, 1144336, 1169162, 1157331, 1151668,\n", - " 1169359, 1154353, 1149452, 1138609, 1158623, 1158052, 1158062, 1173047,\n", - " 1155502, 1152353, 1152360, 1172212, 1148667, 1172139, 1173307, 1145033,\n", - " 1160936, 1152151, 1151697, 1157153, 1157368, 1147708, 1147711, 1151850,\n", - " 1148131, 1157592, 1170488, 1169037, 1183427, 1178415, 1171881, 1166746,\n", - " 1160990, 1140326, 1172606, 1171614, 1153427, 1159099, 1159100, 1169084,\n", - " 1166684, 1182131, 1150234, 1154148, 1179965, 1158178, 1167517, 1149173,\n", - " 1179860, 1143279, 1143420, 1171302, 1170176, 1153803, 1171318, 1172309,\n", - " 1155260, 1154717, 1157792, 1157795, 1171623, 1158253, 1153890, 1145626,\n", - " 1172022, 1186793, 1157483, 1149755, 1146252, 1152279, 1155990, 1158517,\n", - " 1163862, 1158374, 1158380, 1155890, 1155892, 1191383, 1171644, 1185421,\n", - " 1166442, 1163422, 1163421, 1176976, 1165078, 1161819, 1147182, 1168943,\n", - " 1170822, 1139828, 1139825, 1139831, 1150265, 1154812, 1183966, 1156055,\n", - " 1149536, 1191018, 1169964, 1189545, 1140997, 1151774, 1166841, 1170128,\n", - " 1156672, 1172429, 1174606, 1187677, 1179282, 1184971, 1193629, 1186375,\n", - " 1182852, 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196007, 1196013, 1195406, 1197719, 1199282, 1198458, 1194626, 1200650,\n", - " 1197777, 1197791, 1201660, 1198690, 1202804, 1196669, 1194866, 1194741,\n", - " 1198180, 1194783, 1194655, 1196586, 1195511, 1195514, 1198609, 1195263,\n", - " 1196534, 1201992, 1196030, 1196031, 1198543, 1197697, 1197698, 1194889,\n", - " 1194880, 1195895, 1195740, 1197856, 1196359, 1196979, 1195313, 1196165,\n", - " 1198264, 1198036, 1195982, 1198163, 1196717, 1195146, 1195265, 1197141,\n", - " 1198884, 1197273, 1195027, 1198915, 1195541, 1202915, 1199352, 1199699,\n", - " 1196283, 1198272, 1200949, 1200959, 1202009, 1194928, 1199685, 1199628,\n", - " 1200878, 1200746, 1195021, 1196498, 1195807, 1197601, 1197603, 1197609,\n", - " 1196727, 1196734, 1195773, 1198428, 1199418, 1198811, 1200169, 1200507,\n", - " 1198066, 1196479, 1202627, 1202629, 1200991, 1200913, 1194803, 1201041,\n", - " 1201358, 1200526, 1202858, 1200546, 1197097, 1202138, 1200699, 1199099,\n", - " 1200194, 1200201, 1201442, 1197945, 1202239, 1195880, 1201291, 1198478,\n", - " 1202207, 1201871, 1202217, 1200398, 1196966, 1194846, 1203112, 1195679,\n", - " 1195664, 1198057, 1197334, 1198929, 1197816, 1194898, 1198587, 1199660,\n", - " 1199469, 1194720, 1194730, 1198824, 1201001, 1200468, 1197655, 1197335,\n", - " 1195082, 1202078, 1197872], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196007, 1196013, 1195406, 1197719, 1199282, 1198458, 1194626, 1200650,\n", - " 1197777, 1197791, 1201660, 1198690, 1202804, 1196669, 1194866, 1194741,\n", - " 1198180, 1194783, 1194655, 1196586, 1195511, 1195514, 1198609, 1195263,\n", - " 1196534, 1201992, 1196030, 1196031, 1198543, 1197697, 1197698, 1194889,\n", - " 1194880, 1195895, 1195740, 1197856, 1196359, 1196979, 1195313, 1196165,\n", - " 1198264, 1198036, 1195982, 1198163, 1196717, 1195146, 1195265, 1197141,\n", - " 1198884, 1197273, 1195027, 1198915, 1195541, 1202915, 1199352, 1199699,\n", - " 1196283, 1198272, 1200949, 1200959, 1202009, 1194928, 1199685, 1199628,\n", - " 1200878, 1200746, 1195021, 1196498, 1195807, 1197601, 1197603, 1197609,\n", - " 1196727, 1196734, 1195773, 1198428, 1199418, 1198811, 1200169, 1200507,\n", - " 1198066, 1196479, 1202627, 1202629, 1200991, 1200913, 1194803, 1201041,\n", - " 1201358, 1200526, 1202858, 1200546, 1197097, 1202138, 1200699, 1199099,\n", - " 1200194, 1200201, 1201442, 1197945, 1202239, 1195880, 1201291, 1198478,\n", - " 1202207, 1201871, 1202217, 1200398, 1196966, 1194846, 1203112, 1195679,\n", - " 1195664, 1198057, 1197334, 1198929, 1197816, 1194898, 1198587, 1199660,\n", - " 1199469, 1194720, 1194730, 1198824, 1201001, 1200468, 1197655, 1197335,\n", - " 1195082, 1202078, 1197872], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[-6.1371e-04, -3.9418e-04, 1.3237e-01, ..., 5.7292e-02,\n", - " -6.5825e-04, -6.6352e-04],\n", - " [-7.4511e-05, -8.6955e-04, 1.1496e-01, ..., 3.0648e-02,\n", - " -4.5016e-04, -1.2038e-03],\n", - " [-1.0807e-04, -7.1569e-04, 1.2188e-01, ..., 1.6376e-02,\n", - " -5.1246e-04, -1.1142e-03],\n", - " ...,\n", - " [ 5.6336e-03, -7.1940e-04, 1.0906e-01, ..., 3.3881e-02,\n", - " -5.3735e-04, -1.0763e-03],\n", - " [-6.6409e-04, -4.3175e-04, 1.2651e-01, ..., 2.7617e-02,\n", - " -2.0796e-04, -1.3746e-03],\n", - " [-4.2719e-05, -5.6031e-04, 9.6961e-02, ..., 4.4213e-02,\n", - " -6.8219e-04, -7.4224e-04]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[-9.2524e-06, -8.8036e-05, 5.3466e-01, ..., -1.4823e-03,\n", - " -2.8199e-03, -8.9009e-05],\n", - " [ 9.1585e-02, -1.9280e-03, 3.1051e-01, ..., -2.7518e-03,\n", - " -1.8417e-03, -2.9616e-04],\n", - " [ 5.1612e-02, -1.2178e-04, 3.7027e-01, ..., -1.2648e-03,\n", - " -2.0347e-03, 1.6739e-01],\n", - " ...,\n", - " [ 1.2226e-01, -7.4839e-04, 4.6801e-01, ..., -9.8685e-04,\n", - " -1.4788e-03, -1.5626e-04],\n", - " [ 1.2531e-01, -8.6967e-04, 4.0281e-01, ..., -4.5929e-03,\n", - " -2.7199e-03, -1.7427e-03],\n", - " [-9.3191e-04, 7.2431e-02, 4.0898e-01, ..., -2.4345e-04,\n", - " -1.1246e-03, 2.0824e-02]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[ 1.2313e-01, -1.2315e-03, 4.3235e-02, ..., 1.5604e-01,\n", - " 1.3184e-01, -1.1647e-04],\n", - " [ 6.0121e-02, -9.3868e-04, 1.7182e-02, ..., 1.2408e-01,\n", - " 6.2158e-02, -3.9533e-04],\n", - " [ 1.0428e-01, -1.5407e-03, 1.8209e-03, ..., 1.4183e-01,\n", - " 1.5025e-01, 3.2017e-03],\n", - " ...,\n", - " [ 1.2287e-01, -1.2837e-03, 5.9439e-02, ..., 2.1829e-01,\n", - " 9.3009e-02, 2.9073e-02],\n", - " [ 9.8447e-02, -7.6273e-04, 3.9412e-02, ..., 1.9853e-01,\n", - " 1.3036e-01, 2.1036e-02],\n", - " [ 1.2678e-01, -1.1433e-03, 9.9589e-02, ..., 1.6589e-01,\n", - " 1.6371e-01, 2.6737e-02]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-3.3088e-03, 7.5622e-02, -3.4418e-04, ..., 3.1724e-01,\n", - " -7.8832e-04, -2.3204e-03],\n", - " [-3.4688e-03, 1.3810e-01, -1.3776e-03, ..., 4.1719e-01,\n", - " -5.9370e-04, -2.3076e-03],\n", - " [-3.0483e-03, 1.5522e-01, -1.2272e-03, ..., 3.8512e-01,\n", - " -1.0215e-03, -3.5009e-03],\n", - " ...,\n", - " [-4.2063e-03, 1.5270e-01, -9.7728e-04, ..., 2.9216e-01,\n", - " 1.2131e-01, -3.1365e-03],\n", - " [-1.7146e-03, 1.9333e-01, -1.6479e-04, ..., 1.7186e-01,\n", - " 2.8836e-02, -2.9647e-03],\n", - " [-2.0086e-03, 1.8205e-01, 4.2381e-02, ..., 2.8405e-01,\n", - " -2.3128e-04, -2.9348e-03]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 32, 168, 32, 50, 114, 78, 96, 179, 179, 139, 139, 32,\n", - " 179, 179, 179, 179, 9, 9, 711, 512, 416, 492, 492, 388,\n", - " 507, 238, 250, 250, 409, 409, 634, 489, 235, 667, 667, 816,\n", - " 562, 873, 984, 1131, 1078, 792, 1283, 1063, 1063, 791, 876, 1336,\n", - " 1202, 1290, 1197, 1153, 1359, 1137, 1137, 1323, 1323, 1323, 1359, 1251,\n", - " 1251, 1482, 1663, 1602, 1707, 2106, 2106, 1839, 1839, 1876, 1773, 1920,\n", - " 1983, 1983, 1809, 1962, 1983, 1856, 2086, 2197, 2067, 2028, 2397, 2140,\n", - " 2140, 2140, 2268, 2400, 2505, 2505, 2548, 2548, 2521, 2544, 2544, 2756,\n", - " 3108, 2832, 2832, 2805, 3029, 3029, 3029, 3029, 2903, 3094, 3188, 3029,\n", - " 3250, 3325, 3227, 3227, 3227, 3227, 3534, 3564, 3494, 3519, 3445, 3662,\n", - " 3806, 3658, 3869, 3682, 3977, 3993, 3993, 4143, 4521, 4585, 4672, 4970,\n", - " 4576, 4676, 4823, 4650, 4650, 4650, 4788, 4788, 4788, 4731, 4998, 5131,\n", - " 5211, 5605, 5357, 5582, 5515, 5614, 5653, 5703, 5821, 5780, 6059, 6098,\n", - " 6098, 5653, 6098, 5620, 5844, 5903, 5936, 5856, 6345, 6263, 6253, 6338,\n", - " 6284, 6565, 6408, 6408, 6321, 6298, 6405, 6405, 6509, 6432, 6550, 6323,\n", - " 6551, 6589, 6417, 6544, 6581, 6542],\n", - " [ 58, 100, 17, 60, 4, 112, 52, 25, 79, 112, 4, 72,\n", - " 38, 112, 6, 1, 88, 66, 84, 100, 84, 63, 115, 67,\n", - " 17, 4, 100, 48, 102, 129, 64, 116, 59, 100, 70, 44,\n", - " 100, 128, 19, 107, 39, 71, 32, 37, 3, 92, 5, 64,\n", - " 23, 16, 100, 8, 91, 72, 116, 110, 45, 0, 6, 28,\n", - " 69, 32, 18, 53, 23, 74, 90, 120, 11, 106, 86, 123,\n", - " 73, 46, 101, 68, 91, 13, 4, 82, 23, 96, 119, 30,\n", - " 94, 25, 57, 23, 35, 15, 113, 65, 31, 33, 21, 124,\n", - " 14, 21, 93, 29, 43, 108, 56, 4, 72, 18, 72, 7,\n", - " 54, 100, 80, 89, 69, 93, 101, 76, 103, 18, 97, 127,\n", - " 4, 130, 52, 26, 83, 81, 55, 62, 104, 9, 60, 23,\n", - " 77, 87, 123, 63, 105, 98, 75, 4, 111, 10, 72, 87,\n", - " 49, 117, 121, 57, 42, 105, 3, 34, 111, 50, 78, 21,\n", - " 27, 118, 22, 41, 95, 126, 126, 12, 20, 72, 125, 12,\n", - " 47, 36, 114, 99, 51, 80, 124, 85, 117, 29, 102, 122,\n", - " 2, 61, 40, 24, 75, 109]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[5349, 2658, 1512, ..., 2751, 3921, 4661],\n", - " [ 53, 195, 62, ..., 5360, 5360, 5478]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 100, 101, 100, 78, 28, 12, 114, 100, 100, 126, 100, 126,\n", - " 28, 101, 12, 99, 30, 30, 72, 126, 100, 100, 114, 18,\n", - " 114, 114, 100, 101, 30, 72, 87, 69, 87, 87, 44, 28,\n", - " 99, 114, 12, 12, 100, 99, 72, 72, 126, 78, 30, 126,\n", - " 44, 100, 87, 30, 101, 44, 12, 28, 100, 18, 30, 101,\n", - " 101, 101, 101, 44, 99, 100, 126, 78, 87, 78, 78, 72,\n", - " 18, 114, 100, 114, 126, 44, 114, 30, 30, 99, 114, 12,\n", - " 18, 101, 78, 126, 18, 101, 18, 69, 28, 78, 101, 30,\n", - " 28, 114, 18, 99, 28, 44, 78, 69, 44, 18, 99, 12,\n", - " 99, 101, 100, 78, 100, 44, 114, 100, 18, 44, 100, 44,\n", - " 78, 69, 126, 18, 28, 78, 126, 101, 18, 78, 101, 101,\n", - " 87, 126, 99, 126, 69, 87, 126, 114, 30, 101, 126, 100,\n", - " 12, 100, 18, 101, 18, 78, 126, 69, 100, 100, 69, 72,\n", - " 101, 87, 30, 101, 87, 101, 101, 12, 114, 30, 100, 100,\n", - " 100, 78, 30, 69, 126, 28, 101, 28, 69, 100, 72, 18,\n", - " 126, 114, 114, 78, 101, 87, 87, 12, 30, 100, 114, 12,\n", - " 87, 18, 30, 30, 126, 69, 99, 18, 87, 44, 28, 100,\n", - " 100, 87, 30, 18, 30, 12, 69, 100, 12, 100, 28, 78,\n", - " 30, 99, 87, 126, 87, 114, 87, 30, 100, 126, 18, 100,\n", - " 78, 100, 100, 18, 12, 100, 87, 100, 12, 12, 28, 12,\n", - " 100, 18, 18, 12, 100, 126, 78, 12, 87, 100, 18, 100,\n", - " 78, 78, 114, 72, 12, 18, 30, 78, 114, 44, 72, 126,\n", - " 44, 30, 69, 12, 100, 114, 99, 87, 12, 12, 28, 126,\n", - " 44, 44, 30, 99, 44, 69, 100, 100, 30, 72, 99, 99,\n", - " 30, 28, 44, 44, 28, 12, 99, 44, 28, 72, 100, 100,\n", - " 72, 114, 78, 44, 69, 69, 12, 28, 99, 114, 100, 69,\n", - " 114, 78, 87, 87, 69, 114, 87, 18, 72, 72, 72, 69,\n", - " 101, 44, 18, 72, 99, 44, 101, 100, 78, 99, 69, 28,\n", - " 69, 44, 28, 72, 126, 99, 72, 100, 99, 72, 72, 114,\n", - " 69, 44, 72, 99, 69, 69, 72, 126, 72, 28, 99, 28,\n", - " 78, 28, 100, 69, 99, 44, 28, 99, 87, 69, 72, 87,\n", - " 28, 100, 72],\n", - " [ 122, 99, 164, 193, 47, 199, 64, 92, 143, 75, 218, 90,\n", - " 654, 480, 296, 88, 521, 664, 478, 870, 608, 573, 855, 683,\n", - " 585, 201, 833, 754, 699, 861, 834, 733, 583, 680, 549, 885,\n", - " 1125, 826, 963, 789, 1046, 1260, 1114, 523, 1062, 998, 983, 1250,\n", - " 979, 1076, 1203, 986, 1194, 1213, 1121, 1382, 1259, 1221, 1544, 1206,\n", - " 1491, 1310, 1444, 1331, 1340, 1464, 1477, 1704, 1456, 1523, 1338, 1497,\n", - " 1684, 1551, 1610, 1599, 1639, 1419, 1579, 1761, 1764, 1833, 1677, 1819,\n", - " 1712, 1658, 1961, 1535, 1755, 1799, 2166, 1849, 1874, 2068, 1817, 1858,\n", - " 2126, 1992, 1973, 1954, 2190, 2073, 2073, 2206, 2226, 2105, 2436, 2141,\n", - " 2224, 2466, 2271, 2273, 2382, 2369, 2307, 2405, 2402, 2337, 2504, 2301,\n", - " 2232, 2333, 2360, 2484, 2510, 2557, 2424, 2556, 2475, 2539, 2507, 2618,\n", - " 2592, 2559, 2489, 2573, 2601, 2643, 2740, 2631, 2720, 2683, 2664, 2699,\n", - " 2542, 2760, 2701, 2729, 2841, 2956, 2895, 2874, 3160, 3058, 3035, 3079,\n", - " 2952, 3201, 3178, 3151, 3155, 3323, 3207, 3154, 3196, 3228, 3372, 3285,\n", - " 3189, 3380, 3438, 3321, 3216, 3517, 3437, 3451, 3545, 3353, 3357, 3526,\n", - " 3581, 3468, 3788, 3636, 3574, 3593, 3817, 3575, 3776, 3602, 3820, 3728,\n", - " 3657, 3964, 3930, 3895, 3963, 4037, 3873, 3982, 3922, 3913, 4253, 4021,\n", - " 3928, 4154, 4277, 4260, 4151, 4009, 4210, 4098, 4299, 4249, 4196, 4329,\n", - " 4349, 4365, 4359, 4332, 4348, 4369, 4390, 4393, 4371, 4395, 4415, 4405,\n", - " 4438, 4392, 4431, 4389, 4422, 4450, 4426, 4475, 4411, 4402, 4474, 4473,\n", - " 4441, 4477, 4465, 4503, 4487, 4493, 4489, 4501, 4506, 4490, 4486, 4552,\n", - " 4540, 4570, 4538, 4643, 4479, 4500, 4635, 4498, 4534, 4708, 4772, 4667,\n", - " 4683, 4684, 4597, 4671, 4664, 4883, 4860, 4855, 4950, 4990, 4936, 4770,\n", - " 5220, 5179, 4892, 4980, 5231, 5199, 5085, 5163, 5282, 5186, 5061, 5232,\n", - " 5185, 5319, 5246, 5067, 5137, 5315, 5376, 5125, 5168, 5075, 5460, 5227,\n", - " 5209, 5471, 5104, 5370, 5408, 5337, 5483, 5253, 5451, 5423, 5347, 5506,\n", - " 5369, 5442, 5536, 5510, 5538, 5629, 5548, 5621, 5535, 5661, 5927, 5669,\n", - " 5596, 5625, 5771, 5796, 5619, 5523, 5784, 5820, 5649, 5791, 5755, 5860,\n", - " 5914, 5611, 5765, 5714, 5863, 5921, 5831, 5942, 6039, 6086, 6072, 6191,\n", - " 6026, 5957, 6017, 6315, 5758, 6214, 6489, 6319, 6234, 6369, 6187, 6201,\n", - " 6510, 6497, 6538, 6211, 6439, 6548, 6318, 6357, 6254, 6520, 6575, 6537,\n", - " 6607, 6452, 6178]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 135, 135, 246, ..., 5485, 5485, 5481],\n", - " [ 209, 388, 209, ..., 124, 43, 95]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 209, 209, 209, ..., 554, 318, 95],\n", - " [ 114, 6, 240, ..., 5445, 5406, 5473]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5518, 5226, 1043, ..., 3949, 4981, 4901],\n", - " [ 136, 82, 58, ..., 6534, 6602, 6478]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 53, 135, 135, ..., 5518, 5490, 5518],\n", - " [5349, 50, 157, ..., 1845, 344, 3540]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 82, 82, 82, ..., 6550, 6550, 6550],\n", - " [4126, 4032, 4498, ..., 5494, 5513, 4690]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005844\n", - "sampling 0.005686\n", - "noi time: 0.001766\n", - "get_vertex_data call: 0.02579\n", - "noi group time: 0.002822\n", - "eoi_group_time: 0.013616\n", - "second half: 0.181616\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27905, 31149, 31145, ..., 1132473, 1120069, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27905, 31149, 31145, ..., 1132473, 1120069, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224374, 1203797, 1231356, ..., 1935650, 1937149, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224374, 1203797, 1231356, ..., 1935650, 1937149, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1141424, 1136230, 1140275, 1140282, 1136349, 1135926, 1135726,\n", - " 1137784, 1141758, 1137509, 1138335, 1136971, 1143615, 1143609, 1139811,\n", - " 1137947, 1145999, 1138938, 1139241, 1150390, 1150395, 1146640, 1139615,\n", - " 1150497, 1150506, 1150509, 1142963, 1142964, 1149216, 1149219, 1142958,\n", - " 1141883, 1147007, 1153012, 1153016, 1135119, 1148337, 1146661, 1136122,\n", - " 1152666, 1153231, 1137220, 1139365, 1147202, 1136682, 1136685, 1152421,\n", - " 1134718, 1140537, 1154407, 1153463, 1140158, 1134735, 1135913, 1140949,\n", - " 1162456, 1135367, 1135202, 1134960, 1141036, 1134794, 1143381, 1138504,\n", - " 1137329, 1137693, 1137441, 1156159, 1135579, 1141086, 1136097, 1138514,\n", - " 1153099, 1145120, 1137008, 1156909, 1135522, 1135535, 1138436, 1138440,\n", - " 1138447, 1138461, 1138449, 1154790, 1137924, 1136594, 1158390, 1149328,\n", - " 1142611, 1135359, 1148531, 1148533, 1148540, 1137109, 1135769, 1139667,\n", - " 1139673, 1142244, 1134992, 1136551, 1152640, 1135782, 1140201, 1142906,\n", - " 1159009, 1144410, 1153543, 1139933, 1146075, 1152044, 1139071, 1136057,\n", - " 1140662, 1140670, 1137734, 1137728, 1135549, 1140228, 1137898, 1141088,\n", - " 1141098, 1144138, 1139889, 1136392, 1143767, 1154855, 1143224, 1139025,\n", - " 1139033, 1140003, 1149977, 1135860, 1142932, 1136917, 1144230, 1140607,\n", - " 1139495, 1141609, 1134979, 1134987, 1137087, 1137074, 1138482, 1142056,\n", - " 1143153, 1138470, 1149111, 1158595, 1141479, 1138708, 1140110, 1144596,\n", - " 1157414, 1140882, 1135327, 1141403, 1144182, 1144184, 1138539, 1137854,\n", - " 1147153, 1141365, 1141367, 1141375, 1151107, 1140815, 1141725, 1141664,\n", - " 1149101, 1144279, 1143917, 1139508, 1139510, 1139763, 1145004, 1140990,\n", - " 1147050, 1147047, 1141925, 1144242, 1140580, 1141853, 1137149, 1143643,\n", - " 1145982, 1146024, 1146141, 1154328, 1142533, 1149928, 1141236, 1139990,\n", - " 1143294, 1147543, 1147549, 1147540, 1147282, 1142816, 1149366, 1147363,\n", - " 1148003, 1143040, 1136167, 1142586, 1144923, 1157720, 1136836, 1136843,\n", - " 1139329, 1139341, 1139328, 1150188, 1141496, 1144957, 1142159, 1143345,\n", - " 1144766, 1144753, 1144080, 1146514, 1143960, 1138022, 1143456, 1143457,\n", - " 1137697, 1142015, 1146578, 1147574, 1140364, 1143075, 1143087, 1147996,\n", - " 1147999, 1134907, 1144013, 1139252, 1147131, 1148704, 1142690, 1141320,\n", - " 1148473, 1152330, 1143434, 1147249, 1158226, 1141137, 1154526, 1145240,\n", - " 1145751, 1146157, 1138626, 1138638, 1135588, 1146178, 1146189, 1151242,\n", - " 1148223, 1152537, 1150438, 1150445, 1149258, 1144514, 1144526, 1141358,\n", - " 1144203, 1151997, 1151473, 1152022, 1152031, 1154267, 1147019, 1158949,\n", - " 1153568, 1153574, 1147653, 1143560, 1149416, 1148300, 1135079, 1154420,\n", - " 1148180, 1139714, 1139721, 1152436, 1149810, 1148204, 1153124, 1153188,\n", - " 1152921, 1150935, 1150355, 1141017, 1141020, 1147446, 1151816, 1152581,\n", - " 1135307, 1135303, 1154190, 1148505, 1141420, 1150636, 1151356, 1153449,\n", - " 1146969, 1146616, 1146623, 1142989, 1142976, 1150794, 1152100, 1152107,\n", - " 1156325, 1153030, 1153026, 1153037, 1137746, 1137755, 1146307, 1146304,\n", - " 1152623, 1140521, 1154123, 1157824, 1151573, 1151617, 1150578, 1145278,\n", - " 1136134, 1140451, 1153387, 1145963, 1152233, 1152341, 1152342, 1153311,\n", - " 1138283, 1157147, 1152300, 1136028, 1156622, 1151187, 1140675, 1151064,\n", - " 1151071, 1150110, 1153909, 1149273, 1148040, 1155202, 1167408, 1157627,\n", - " 1145652, 1137048, 1148628, 1158530, 1158540, 1137458, 1149940, 1149942,\n", - " 1135705, 1153085, 1135434, 1157547, 1142387, 1158860, 1158857, 1157064,\n", - " 1155412, 1137809, 1137814, 1139473, 1150475, 1146854, 1135729, 1135730,\n", - " 1152179, 1150824, 1150828, 1156935, 1135643, 1147810, 1151469, 1158308,\n", - " 1158311, 1155441, 1137972, 1150494, 1138775, 1172954, 1151379, 1158639,\n", - " 1155374, 1140176, 1155122, 1152527, 1157183, 1149320, 1145793, 1145796,\n", - " 1156463, 1155675, 1156563, 1154555, 1161430, 1136466, 1158824, 1155646,\n", - " 1154644, 1146935, 1154240, 1154091, 1151327, 1154909, 1143524, 1153320,\n", - " 1153326, 1155606, 1150983, 1157288, 1137152, 1153781, 1159108, 1134677,\n", - " 1134685, 1135601, 1135614, 1150661, 1155852, 1158665, 1149138, 1149145,\n", - " 1161116, 1140633, 1152220, 1155439, 1167618, 1151095, 1155884, 1157732,\n", - " 1157735, 1157031, 1144843, 1142466, 1155971, 1155975, 1155950, 1136899,\n", - " 1136896, 1158753, 1158760, 1140215, 1157303, 1159164, 1158815, 1158285,\n", - " 1151615, 1136494, 1159241, 1155299, 1156490, 1153808, 1136640, 1136646,\n", - " 1179175, 1134757, 1166421, 1162021, 1155868, 1155871, 1150011, 1161539,\n", - " 1142666, 1157747, 1167346, 1159042, 1159068, 1159138, 1158300, 1155191,\n", - " 1157939, 1153052, 1153045, 1162835, 1156107, 1138393, 1142679, 1160646,\n", - " 1150032, 1153514, 1153519, 1146870, 1156787, 1154590, 1148025, 1166073,\n", - " 1146063, 1160189, 1165306, 1170415, 1140643, 1148600, 1148603, 1148607,\n", - " 1144501, 1151875, 1158643, 1158651, 1159025, 1159032, 1160892, 1152247,\n", - " 1166909, 1155588, 1156582, 1138679, 1144977, 1147397, 1147837, 1146500,\n", - " 1164580, 1161240, 1152776, 1165415, 1151650, 1159380, 1156739, 1165172,\n", - " 1165182, 1171040, 1144812, 1135564, 1135567, 1180500, 1156303, 1145228,\n", - " 1169282, 1166462, 1144973, 1160730, 1191920, 1166063, 1147689, 1145451,\n", - " 1165744, 1152624, 1145902, 1169544, 1143395, 1171867, 1166657, 1167503,\n", - " 1154076, 1144702, 1154917, 1167817, 1144681, 1169298, 1150518, 1144336,\n", - " 1157531, 1157534, 1147746, 1154660, 1171414, 1154893, 1169154, 1157331,\n", - " 1141043, 1151671, 1169359, 1149688, 1158615, 1158623, 1158049, 1158062,\n", - " 1163292, 1149846, 1172642, 1171479, 1155494, 1152353, 1152360, 1170907,\n", - " 1149404, 1148666, 1167012, 1148335, 1145033, 1154027, 1154023, 1152150,\n", - " 1152152, 1167857, 1194551, 1178097, 1157158, 1157153, 1147711, 1151850,\n", - " 1148128, 1147933, 1166827, 1169038, 1168604, 1177611, 1180475, 1171614,\n", - " 1153436, 1172062, 1171823, 1154148, 1154150, 1179962, 1158176, 1178887,\n", - " 1149173, 1179811, 1178648, 1169772, 1143420, 1156554, 1187247, 1153141,\n", - " 1164818, 1153628, 1182651, 1168771, 1181721, 1161255, 1162129, 1155262,\n", - " 1157792, 1157795, 1171623, 1178361, 1153898, 1153902, 1145626, 1149755,\n", - " 1146252, 1153609, 1153612, 1165225, 1163713, 1183165, 1158768, 1158512,\n", - " 1187090, 1158382, 1155892, 1155895, 1162984, 1157268, 1140399, 1167762,\n", - " 1188243, 1178324, 1181340, 1161819, 1146161, 1166772, 1141516, 1172623,\n", - " 1167670, 1190967, 1139828, 1139831, 1139837, 1150268, 1167135, 1154812,\n", - " 1149666, 1156049, 1156055, 1156057, 1151972, 1181888, 1173058, 1149539,\n", - " 1141002, 1183384, 1169560, 1181283, 1171675, 1178983, 1151774, 1172339,\n", - " 1162502, 1166838, 1174822, 1150413, 1166757, 1182277, 1182817, 1166788,\n", - " 1178135, 1172718, 1155956, 1191501, 1169833, 1191768, 1167471, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1141424, 1136230, 1140275, 1140282, 1136349, 1135926, 1135726,\n", - " 1137784, 1141758, 1137509, 1138335, 1136971, 1143615, 1143609, 1139811,\n", - " 1137947, 1145999, 1138938, 1139241, 1150390, 1150395, 1146640, 1139615,\n", - " 1150497, 1150506, 1150509, 1142963, 1142964, 1149216, 1149219, 1142958,\n", - " 1141883, 1147007, 1153012, 1153016, 1135119, 1148337, 1146661, 1136122,\n", - " 1152666, 1153231, 1137220, 1139365, 1147202, 1136682, 1136685, 1152421,\n", - " 1134718, 1140537, 1154407, 1153463, 1140158, 1134735, 1135913, 1140949,\n", - " 1162456, 1135367, 1135202, 1134960, 1141036, 1134794, 1143381, 1138504,\n", - " 1137329, 1137693, 1137441, 1156159, 1135579, 1141086, 1136097, 1138514,\n", - " 1153099, 1145120, 1137008, 1156909, 1135522, 1135535, 1138436, 1138440,\n", - " 1138447, 1138461, 1138449, 1154790, 1137924, 1136594, 1158390, 1149328,\n", - " 1142611, 1135359, 1148531, 1148533, 1148540, 1137109, 1135769, 1139667,\n", - " 1139673, 1142244, 1134992, 1136551, 1152640, 1135782, 1140201, 1142906,\n", - " 1159009, 1144410, 1153543, 1139933, 1146075, 1152044, 1139071, 1136057,\n", - " 1140662, 1140670, 1137734, 1137728, 1135549, 1140228, 1137898, 1141088,\n", - " 1141098, 1144138, 1139889, 1136392, 1143767, 1154855, 1143224, 1139025,\n", - " 1139033, 1140003, 1149977, 1135860, 1142932, 1136917, 1144230, 1140607,\n", - " 1139495, 1141609, 1134979, 1134987, 1137087, 1137074, 1138482, 1142056,\n", - " 1143153, 1138470, 1149111, 1158595, 1141479, 1138708, 1140110, 1144596,\n", - " 1157414, 1140882, 1135327, 1141403, 1144182, 1144184, 1138539, 1137854,\n", - " 1147153, 1141365, 1141367, 1141375, 1151107, 1140815, 1141725, 1141664,\n", - " 1149101, 1144279, 1143917, 1139508, 1139510, 1139763, 1145004, 1140990,\n", - " 1147050, 1147047, 1141925, 1144242, 1140580, 1141853, 1137149, 1143643,\n", - " 1145982, 1146024, 1146141, 1154328, 1142533, 1149928, 1141236, 1139990,\n", - " 1143294, 1147543, 1147549, 1147540, 1147282, 1142816, 1149366, 1147363,\n", - " 1148003, 1143040, 1136167, 1142586, 1144923, 1157720, 1136836, 1136843,\n", - " 1139329, 1139341, 1139328, 1150188, 1141496, 1144957, 1142159, 1143345,\n", - " 1144766, 1144753, 1144080, 1146514, 1143960, 1138022, 1143456, 1143457,\n", - " 1137697, 1142015, 1146578, 1147574, 1140364, 1143075, 1143087, 1147996,\n", - " 1147999, 1134907, 1144013, 1139252, 1147131, 1148704, 1142690, 1141320,\n", - " 1148473, 1152330, 1143434, 1147249, 1158226, 1141137, 1154526, 1145240,\n", - " 1145751, 1146157, 1138626, 1138638, 1135588, 1146178, 1146189, 1151242,\n", - " 1148223, 1152537, 1150438, 1150445, 1149258, 1144514, 1144526, 1141358,\n", - " 1144203, 1151997, 1151473, 1152022, 1152031, 1154267, 1147019, 1158949,\n", - " 1153568, 1153574, 1147653, 1143560, 1149416, 1148300, 1135079, 1154420,\n", - " 1148180, 1139714, 1139721, 1152436, 1149810, 1148204, 1153124, 1153188,\n", - " 1152921, 1150935, 1150355, 1141017, 1141020, 1147446, 1151816, 1152581,\n", - " 1135307, 1135303, 1154190, 1148505, 1141420, 1150636, 1151356, 1153449,\n", - " 1146969, 1146616, 1146623, 1142989, 1142976, 1150794, 1152100, 1152107,\n", - " 1156325, 1153030, 1153026, 1153037, 1137746, 1137755, 1146307, 1146304,\n", - " 1152623, 1140521, 1154123, 1157824, 1151573, 1151617, 1150578, 1145278,\n", - " 1136134, 1140451, 1153387, 1145963, 1152233, 1152341, 1152342, 1153311,\n", - " 1138283, 1157147, 1152300, 1136028, 1156622, 1151187, 1140675, 1151064,\n", - " 1151071, 1150110, 1153909, 1149273, 1148040, 1155202, 1167408, 1157627,\n", - " 1145652, 1137048, 1148628, 1158530, 1158540, 1137458, 1149940, 1149942,\n", - " 1135705, 1153085, 1135434, 1157547, 1142387, 1158860, 1158857, 1157064,\n", - " 1155412, 1137809, 1137814, 1139473, 1150475, 1146854, 1135729, 1135730,\n", - " 1152179, 1150824, 1150828, 1156935, 1135643, 1147810, 1151469, 1158308,\n", - " 1158311, 1155441, 1137972, 1150494, 1138775, 1172954, 1151379, 1158639,\n", - " 1155374, 1140176, 1155122, 1152527, 1157183, 1149320, 1145793, 1145796,\n", - " 1156463, 1155675, 1156563, 1154555, 1161430, 1136466, 1158824, 1155646,\n", - " 1154644, 1146935, 1154240, 1154091, 1151327, 1154909, 1143524, 1153320,\n", - " 1153326, 1155606, 1150983, 1157288, 1137152, 1153781, 1159108, 1134677,\n", - " 1134685, 1135601, 1135614, 1150661, 1155852, 1158665, 1149138, 1149145,\n", - " 1161116, 1140633, 1152220, 1155439, 1167618, 1151095, 1155884, 1157732,\n", - " 1157735, 1157031, 1144843, 1142466, 1155971, 1155975, 1155950, 1136899,\n", - " 1136896, 1158753, 1158760, 1140215, 1157303, 1159164, 1158815, 1158285,\n", - " 1151615, 1136494, 1159241, 1155299, 1156490, 1153808, 1136640, 1136646,\n", - " 1179175, 1134757, 1166421, 1162021, 1155868, 1155871, 1150011, 1161539,\n", - " 1142666, 1157747, 1167346, 1159042, 1159068, 1159138, 1158300, 1155191,\n", - " 1157939, 1153052, 1153045, 1162835, 1156107, 1138393, 1142679, 1160646,\n", - " 1150032, 1153514, 1153519, 1146870, 1156787, 1154590, 1148025, 1166073,\n", - " 1146063, 1160189, 1165306, 1170415, 1140643, 1148600, 1148603, 1148607,\n", - " 1144501, 1151875, 1158643, 1158651, 1159025, 1159032, 1160892, 1152247,\n", - " 1166909, 1155588, 1156582, 1138679, 1144977, 1147397, 1147837, 1146500,\n", - " 1164580, 1161240, 1152776, 1165415, 1151650, 1159380, 1156739, 1165172,\n", - " 1165182, 1171040, 1144812, 1135564, 1135567, 1180500, 1156303, 1145228,\n", - " 1169282, 1166462, 1144973, 1160730, 1191920, 1166063, 1147689, 1145451,\n", - " 1165744, 1152624, 1145902, 1169544, 1143395, 1171867, 1166657, 1167503,\n", - " 1154076, 1144702, 1154917, 1167817, 1144681, 1169298, 1150518, 1144336,\n", - " 1157531, 1157534, 1147746, 1154660, 1171414, 1154893, 1169154, 1157331,\n", - " 1141043, 1151671, 1169359, 1149688, 1158615, 1158623, 1158049, 1158062,\n", - " 1163292, 1149846, 1172642, 1171479, 1155494, 1152353, 1152360, 1170907,\n", - " 1149404, 1148666, 1167012, 1148335, 1145033, 1154027, 1154023, 1152150,\n", - " 1152152, 1167857, 1194551, 1178097, 1157158, 1157153, 1147711, 1151850,\n", - " 1148128, 1147933, 1166827, 1169038, 1168604, 1177611, 1180475, 1171614,\n", - " 1153436, 1172062, 1171823, 1154148, 1154150, 1179962, 1158176, 1178887,\n", - " 1149173, 1179811, 1178648, 1169772, 1143420, 1156554, 1187247, 1153141,\n", - " 1164818, 1153628, 1182651, 1168771, 1181721, 1161255, 1162129, 1155262,\n", - " 1157792, 1157795, 1171623, 1178361, 1153898, 1153902, 1145626, 1149755,\n", - " 1146252, 1153609, 1153612, 1165225, 1163713, 1183165, 1158768, 1158512,\n", - " 1187090, 1158382, 1155892, 1155895, 1162984, 1157268, 1140399, 1167762,\n", - " 1188243, 1178324, 1181340, 1161819, 1146161, 1166772, 1141516, 1172623,\n", - " 1167670, 1190967, 1139828, 1139831, 1139837, 1150268, 1167135, 1154812,\n", - " 1149666, 1156049, 1156055, 1156057, 1151972, 1181888, 1173058, 1149539,\n", - " 1141002, 1183384, 1169560, 1181283, 1171675, 1178983, 1151774, 1172339,\n", - " 1162502, 1166838, 1174822, 1150413, 1166757, 1182277, 1182817, 1166788,\n", - " 1178135, 1172718, 1155956, 1191501, 1169833, 1191768, 1167471, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195452, 1198242, 1197228, 1201307, 1200108, 1198449, 1198458, 1202255,\n", - " 1201582, 1202119, 1194626, 1199248, 1201016, 1201660, 1198697, 1198702,\n", - " 1196871, 1202804, 1198546, 1194866, 1196672, 1198180, 1194783, 1196631,\n", - " 1194649, 1195514, 1195263, 1201992, 1198542, 1199519, 1195888, 1195895,\n", - " 1199172, 1195740, 1196359, 1198036, 1196704, 1196717, 1195145, 1195265,\n", - " 1195270, 1196242, 1194859, 1198219, 1195847, 1198915, 1195541, 1197474,\n", - " 1200032, 1199697, 1196393, 1196283, 1196272, 1198282, 1199333, 1200959,\n", - " 1199060, 1199185, 1197628, 1199628, 1197676, 1197990, 1200872, 1198400,\n", - " 1199231, 1201911, 1195017, 1200116, 1200118, 1199676, 1194795, 1198762,\n", - " 1198763, 1200052, 1197609, 1196727, 1195771, 1195773, 1202618, 1200887,\n", - " 1200893, 1198434, 1198428, 1200592, 1201534, 1201547, 1199087, 1200570,\n", - " 1200501, 1200507, 1198066, 1199445, 1198797, 1201153, 1202401, 1200927,\n", - " 1200363, 1202499, 1200546, 1200553, 1200315, 1200429, 1200351, 1202103,\n", - " 1199909, 1196779, 1201455, 1201442, 1197945, 1202239, 1202338, 1195876,\n", - " 1195887, 1201291, 1195607, 1195610, 1203336, 1199929, 1196960, 1200784,\n", - " 1200785, 1199606, 1203112, 1195679, 1195664, 1197334, 1198897, 1198898,\n", - " 1197816, 1197822, 1197499, 1195074, 1194898, 1196602, 1196605, 1198299,\n", - " 1203102, 1194720, 1195157, 1198147, 1198824, 1197735, 1199782, 1195070,\n", - " 1201880, 1201886, 1200296, 1197652, 1197335, 1201361, 1202321, 1197872],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195452, 1198242, 1197228, 1201307, 1200108, 1198449, 1198458, 1202255,\n", - " 1201582, 1202119, 1194626, 1199248, 1201016, 1201660, 1198697, 1198702,\n", - " 1196871, 1202804, 1198546, 1194866, 1196672, 1198180, 1194783, 1196631,\n", - " 1194649, 1195514, 1195263, 1201992, 1198542, 1199519, 1195888, 1195895,\n", - " 1199172, 1195740, 1196359, 1198036, 1196704, 1196717, 1195145, 1195265,\n", - " 1195270, 1196242, 1194859, 1198219, 1195847, 1198915, 1195541, 1197474,\n", - " 1200032, 1199697, 1196393, 1196283, 1196272, 1198282, 1199333, 1200959,\n", - " 1199060, 1199185, 1197628, 1199628, 1197676, 1197990, 1200872, 1198400,\n", - " 1199231, 1201911, 1195017, 1200116, 1200118, 1199676, 1194795, 1198762,\n", - " 1198763, 1200052, 1197609, 1196727, 1195771, 1195773, 1202618, 1200887,\n", - " 1200893, 1198434, 1198428, 1200592, 1201534, 1201547, 1199087, 1200570,\n", - " 1200501, 1200507, 1198066, 1199445, 1198797, 1201153, 1202401, 1200927,\n", - " 1200363, 1202499, 1200546, 1200553, 1200315, 1200429, 1200351, 1202103,\n", - " 1199909, 1196779, 1201455, 1201442, 1197945, 1202239, 1202338, 1195876,\n", - " 1195887, 1201291, 1195607, 1195610, 1203336, 1199929, 1196960, 1200784,\n", - " 1200785, 1199606, 1203112, 1195679, 1195664, 1197334, 1198897, 1198898,\n", - " 1197816, 1197822, 1197499, 1195074, 1194898, 1196602, 1196605, 1198299,\n", - " 1203102, 1194720, 1195157, 1198147, 1198824, 1197735, 1199782, 1195070,\n", - " 1201880, 1201886, 1200296, 1197652, 1197335, 1201361, 1202321, 1197872],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[-3.3855e-04, -5.2821e-04, 1.6372e-01, ..., 2.1640e-02,\n", - " -3.7389e-04, -1.4769e-03],\n", - " [-3.5606e-05, -3.9514e-05, 1.2650e-01, ..., 4.7621e-02,\n", - " -7.0798e-04, -1.6990e-03],\n", - " [-2.9742e-04, -5.3830e-04, 1.7134e-01, ..., 2.6033e-02,\n", - " -3.8603e-04, -1.5203e-03],\n", - " ...,\n", - " [-2.7015e-04, -4.0198e-04, 1.4124e-01, ..., 4.3703e-02,\n", - " -3.4471e-04, -1.6911e-03],\n", - " [-2.2163e-04, -3.3995e-04, 1.6741e-01, ..., 2.7298e-02,\n", - " -6.0981e-04, -1.6975e-03],\n", - " [-1.7838e-04, -4.1599e-04, 1.7554e-02, ..., 2.9953e-02,\n", - " -9.3234e-04, -1.2398e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 4.0853e-01, -7.8893e-03, 5.4460e-01, ..., 1.1122e-01,\n", - " -9.7684e-04, 3.7077e-01],\n", - " [ 4.5245e-01, -6.9063e-03, 6.7434e-01, ..., -3.6337e-04,\n", - " -1.0425e-03, 3.4880e-01],\n", - " [ 4.1256e-01, -7.9137e-03, 5.8686e-01, ..., -7.5619e-04,\n", - " -2.6393e-03, 5.5072e-01],\n", - " ...,\n", - " [ 3.8066e-01, -5.8842e-03, 7.0199e-01, ..., 5.7336e-02,\n", - " -1.1370e-03, 2.9465e-01],\n", - " [ 3.8590e-01, -6.7215e-03, 5.8850e-01, ..., 8.1367e-02,\n", - " -2.1122e-03, 5.4876e-01],\n", - " [ 1.4104e-01, -5.0527e-03, 7.4033e-01, ..., 1.8577e-01,\n", - " -6.5082e-05, 3.4324e-01]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[ 2.3824e-01, -1.0684e-03, 4.6512e-02, ..., 7.2125e-02,\n", - " 8.7540e-02, 6.7963e-03],\n", - " [ 1.6396e-01, -7.2379e-04, 3.7181e-02, ..., 5.4701e-02,\n", - " 4.3050e-02, 8.4836e-02],\n", - " [ 1.4473e-01, -1.9317e-03, 7.3142e-02, ..., 3.7268e-02,\n", - " 1.0653e-01, 7.9459e-03],\n", - " ...,\n", - " [ 2.0639e-01, -2.2806e-03, -1.3830e-04, ..., 1.6120e-02,\n", - " 1.7929e-01, 1.1757e-01],\n", - " [ 2.0159e-01, -1.3868e-03, 2.7979e-02, ..., 1.9554e-02,\n", - " 7.6159e-02, 5.7358e-02],\n", - " [ 2.0789e-01, -1.7571e-03, 4.5025e-02, ..., -1.4587e-04,\n", - " 1.5028e-01, 9.3147e-02]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-3.3753e-03, 1.3101e-01, -1.9763e-03, ..., 4.0760e-01,\n", - " -7.4483e-04, -3.8665e-03],\n", - " [-6.5380e-03, 2.3802e-01, -2.2896e-03, ..., 6.2246e-01,\n", - " -6.9901e-04, -4.1383e-03],\n", - " [-4.1073e-03, 1.9721e-01, -1.1560e-03, ..., 4.9050e-01,\n", - " -1.4560e-03, -4.3834e-03],\n", - " ...,\n", - " [-5.2481e-03, 1.9079e-01, -2.4388e-03, ..., 6.7728e-01,\n", - " -1.3333e-03, -4.5971e-03],\n", - " [-4.9956e-03, 9.8415e-02, -2.0765e-03, ..., 4.2126e-01,\n", - " -8.5526e-04, -3.7268e-03],\n", - " [-5.5851e-03, 2.2843e-01, -1.9299e-03, ..., 7.0051e-01,\n", - " -1.1909e-03, -5.2776e-03]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 32, 79, 79, 170, 114, 143, 168, 168, 168, 295, 398, 671,\n", - " 385, 316, 316, 592, 424, 441, 737, 678, 539, 539, 759, 715,\n", - " 715, 407, 777, 1275, 1046, 1007, 1178, 1096, 1093, 1093, 800, 1254,\n", - " 793, 1102, 903, 903, 1299, 1101, 1101, 1356, 1371, 1316, 1278, 1289,\n", - " 1282, 1282, 1282, 1299, 1299, 1450, 1605, 1605, 1610, 1592, 1592, 1729,\n", - " 1495, 1782, 1804, 1811, 1845, 1570, 1570, 1570, 1675, 1752, 1706, 2117,\n", - " 1993, 1777, 1861, 2158, 2215, 2199, 2419, 2318, 2346, 2371, 2346, 2346,\n", - " 2360, 2481, 2680, 2680, 2481, 2705, 3042, 2678, 2929, 2929, 2929, 3072,\n", - " 2846, 2949, 3199, 3168, 3335, 2961, 3361, 3437, 3602, 3590, 3555, 3820,\n", - " 3816, 3747, 3975, 3681, 3753, 3753, 3803, 3848, 3848, 4030, 4030, 4139,\n", - " 4142, 4200, 4178, 4197, 4195, 4195, 4193, 4251, 4248, 4349, 4594, 4400,\n", - " 4360, 4501, 4364, 4506, 4532, 4532, 4532, 4648, 4733, 4441, 4549, 4731,\n", - " 4610, 4786, 4898, 4898, 5133, 4890, 5093, 4918, 5100, 4788, 4788, 5074,\n", - " 5039, 5039, 5192, 5039, 5340, 5284, 5467, 5427, 5427, 5379, 5420, 5590,\n", - " 5598, 5776, 5776, 5365, 5552, 5493, 5621, 5525, 5986, 6019, 6019, 5748,\n", - " 5872, 6085, 6085, 5790, 5931, 6135, 6287, 6216, 6111, 6111, 5981, 6132,\n", - " 6274, 6173, 6140, 6140, 6290, 6064, 5917, 6376, 5737, 6383, 6420, 6420,\n", - " 6420, 6168, 6286, 6186, 6187, 6187, 6186, 6186, 6098, 6098, 6423, 6604,\n", - " 6468, 6468, 6446, 6303, 6444, 6444, 6363, 6363, 6363, 6592, 6592, 6547,\n", - " 6547],\n", - " [ 12, 7, 126, 105, 140, 129, 144, 68, 127, 28, 67, 43,\n", - " 38, 136, 147, 118, 5, 13, 89, 14, 78, 25, 148, 31,\n", - " 7, 21, 48, 56, 10, 147, 63, 39, 103, 17, 111, 15,\n", - " 3, 0, 109, 98, 26, 39, 17, 108, 86, 12, 115, 71,\n", - " 7, 30, 133, 128, 27, 147, 123, 33, 53, 134, 94, 1,\n", - " 103, 25, 35, 61, 119, 2, 0, 81, 33, 86, 100, 123,\n", - " 63, 1, 103, 106, 65, 113, 41, 1, 115, 139, 52, 64,\n", - " 49, 98, 7, 54, 104, 88, 60, 93, 36, 75, 57, 75,\n", - " 65, 65, 18, 150, 79, 119, 34, 148, 78, 26, 23, 151,\n", - " 112, 104, 100, 45, 70, 31, 105, 99, 83, 78, 25, 150,\n", - " 80, 90, 102, 96, 122, 107, 88, 58, 137, 125, 102, 116,\n", - " 75, 102, 102, 102, 28, 13, 62, 143, 0, 22, 145, 11,\n", - " 117, 69, 28, 51, 62, 85, 32, 34, 70, 75, 132, 78,\n", - " 75, 37, 0, 9, 59, 72, 75, 82, 97, 24, 149, 77,\n", - " 118, 92, 59, 25, 135, 141, 7, 147, 131, 75, 146, 124,\n", - " 124, 123, 147, 6, 75, 74, 40, 4, 44, 75, 29, 95,\n", - " 110, 55, 28, 62, 47, 124, 63, 75, 19, 120, 138, 7,\n", - " 20, 8, 76, 133, 75, 57, 19, 46, 73, 130, 87, 78,\n", - " 77, 66, 121, 50, 42, 142, 114, 16, 84, 75, 91, 101,\n", - " 75]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 948, 1476, 1825, ..., 2905, 1206, 2649],\n", - " [ 95, 302, 55, ..., 5909, 6017, 6083]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 70, 70, 102, ..., 31, 119, 87],\n", - " [ 16, 202, 63, ..., 6284, 6245, 6623]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 160, 160, 160, ..., 5990, 6057, 6074],\n", - " [ 191, 506, 237, ..., 63, 539, 664]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 486, 486, 141, ..., 634, 237, 215],\n", - " [ 95, 161, 254, ..., 6070, 6045, 6001]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1509, 6073, 1916, ..., 5464, 147, 3561],\n", - " [ 112, 22, 92, ..., 6556, 6519, 6585]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 147, 298, 227, ..., 6059, 6050, 6050],\n", - " [3096, 104, 2623, ..., 2139, 4398, 4362]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 170, 170, 170, ..., 6547, 6547, 6547],\n", - " [3663, 3616, 4542, ..., 4192, 5543, 3305]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006499\n", - "sampling 0.006341\n", - "noi time: 0.003235\n", - "get_vertex_data call: 0.031288\n", - "noi group time: 0.009071\n", - "eoi_group_time: 0.014969\n", - "second half: 0.193184\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24187, 32616, 3253, ..., 1119693, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24187, 32616, 3253, ..., 1119693, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210591, 1209798, 1205183, ..., 1933652, 1929319, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210591, 1209798, 1205183, ..., 1933652, 1929319, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137426, 1137429, 1141424, 1140282, 1135926, 1135716, 1137783, 1141756,\n", - " 1141758, 1137506, 1138335, 1136215, 1141251, 1141257, 1140293, 1142802,\n", - " 1136971, 1141440, 1141443, 1138897, 1138909, 1143615, 1154771, 1145374,\n", - " 1138938, 1139143, 1143372, 1139613, 1140781, 1148584, 1149216, 1149220,\n", - " 1142947, 1155683, 1155689, 1143820, 1149633, 1147473, 1147483, 1147484,\n", - " 1144636, 1144632, 1135251, 1149038, 1153009, 1134701, 1135950, 1148346,\n", - " 1146669, 1146472, 1136112, 1152666, 1152667, 1153231, 1147095, 1137220,\n", - " 1145419, 1155014, 1155013, 1139371, 1147202, 1136683, 1136685, 1134710,\n", - " 1134807, 1138742, 1140304, 1140537, 1138112, 1137254, 1137172, 1140953,\n", - " 1135367, 1135202, 1135903, 1154739, 1136291, 1136297, 1134794, 1143377,\n", - " 1138504, 1137329, 1136189, 1137693, 1135333, 1135337, 1144786, 1136826,\n", - " 1157400, 1152376, 1137441, 1136199, 1136928, 1156159, 1139161, 1135579,\n", - " 1135583, 1141078, 1141081, 1140970, 1138514, 1138525, 1153099, 1137957,\n", - " 1158136, 1154132, 1135522, 1139684, 1137287, 1157706, 1138436, 1138440,\n", - " 1138461, 1138449, 1160590, 1154790, 1149328, 1135088, 1147111, 1147112,\n", - " 1142611, 1158987, 1145843, 1145845, 1148531, 1139844, 1136457, 1138069,\n", - " 1142255, 1134992, 1142785, 1152654, 1148805, 1135781, 1135789, 1136723,\n", - " 1158961, 1158974, 1139327, 1159012, 1144410, 1153544, 1140856, 1143631,\n", - " 1140034, 1137587, 1141963, 1152042, 1152044, 1139064, 1142299, 1137734,\n", - " 1137728, 1146222, 1140228, 1141088, 1141094, 1141098, 1144138, 1141980,\n", - " 1143767, 1137297, 1137299, 1143225, 1140005, 1140009, 1140000, 1142499,\n", - " 1141695, 1154467, 1139436, 1161175, 1141224, 1141223, 1139386, 1136917,\n", - " 1139739, 1137185, 1144230, 1140607, 1141155, 1141161, 1146449, 1141785,\n", - " 1141786, 1139495, 1144934, 1168566, 1141300, 1144650, 1134987, 1136851,\n", - " 1136852, 1137072, 1137074, 1149435, 1144428, 1141810, 1141821, 1139266,\n", - " 1158749, 1138464, 1138469, 1137766, 1149111, 1148872, 1137058, 1138708,\n", - " 1142913, 1144596, 1136867, 1136864, 1140432, 1144180, 1150906, 1146201,\n", - " 1139559, 1158690, 1137841, 1147153, 1136376, 1141365, 1141367, 1153068,\n", - " 1141672, 1149097, 1143907, 1143915, 1143917, 1139508, 1139510, 1139519,\n", - " 1139763, 1139127, 1144992, 1145001, 1145200, 1145213, 1140979, 1140990,\n", - " 1146695, 1147050, 1145885, 1145873, 1149876, 1143551, 1152976, 1135457,\n", - " 1139453, 1141925, 1146901, 1144242, 1145328, 1140582, 1150692, 1148313,\n", - " 1137570, 1143845, 1143851, 1136277, 1136275, 1146019, 1146024, 1146017,\n", - " 1141646, 1141585, 1147084, 1139990, 1143293, 1143283, 1143294, 1151120,\n", - " 1143876, 1147541, 1147540, 1147282, 1142816, 1147469, 1143656, 1139417,\n", - " 1139415, 1146084, 1143040, 1142586, 1136836, 1136843, 1139329, 1139328,\n", - " 1141490, 1141496, 1144957, 1142149, 1142158, 1143345, 1144765, 1144753,\n", - " 1144609, 1144619, 1140844, 1140836, 1137098, 1144310, 1135813, 1146523,\n", - " 1143960, 1143959, 1143456, 1143457, 1137697, 1143937, 1135451, 1147574,\n", - " 1147523, 1140364, 1137990, 1168914, 1148962, 1148966, 1148969, 1147999,\n", - " 1134902, 1147128, 1147131, 1148704, 1141327, 1153701, 1152328, 1143434,\n", - " 1147071, 1147025, 1141131, 1145017, 1139547, 1158226, 1158235, 1148365,\n", - " 1154526, 1145240, 1145246, 1145750, 1145751, 1142370, 1142376, 1142383,\n", - " 1146178, 1138861, 1151242, 1152530, 1149258, 1149263, 1148826, 1144514,\n", - " 1144526, 1151994, 1151997, 1151480, 1152022, 1152024, 1145263, 1145262,\n", - " 1146723, 1149588, 1150127, 1147021, 1147023, 1158959, 1141949, 1144828,\n", - " 1151803, 1150722, 1153574, 1147653, 1147659, 1149412, 1137727, 1148615,\n", - " 1148623, 1154420, 1158797, 1139721, 1146679, 1146682, 1146686, 1146547,\n", - " 1146559, 1150053, 1148204, 1153124, 1153192, 1153188, 1153197, 1145111,\n", - " 1167960, 1155547, 1150929, 1150935, 1152875, 1143092, 1144849, 1150356,\n", - " 1143127, 1143134, 1147442, 1151816, 1152581, 1151906, 1150708, 1150715,\n", - " 1148498, 1148502, 1149732, 1141420, 1136002, 1155156, 1147737, 1145080,\n", - " 1148949, 1146975, 1156402, 1146616, 1146623, 1152407, 1152415, 1150794,\n", - " 1152097, 1153030, 1153037, 1150085, 1137746, 1137755, 1146307, 1146304,\n", - " 1152622, 1140521, 1155140, 1136410, 1157104, 1152819, 1155337, 1154123,\n", - " 1157824, 1157833, 1139581, 1151627, 1151617, 1150578, 1150588, 1136131,\n", - " 1136134, 1136798, 1145952, 1152233, 1138991, 1152903, 1152341, 1146816,\n", - " 1156831, 1138275, 1138276, 1138279, 1138281, 1156007, 1156000, 1156005,\n", - " 1136028, 1158712, 1158704, 1156619, 1151187, 1152928, 1142777, 1156420,\n", - " 1150164, 1144018, 1148033, 1148035, 1148040, 1152601, 1155226, 1145656,\n", - " 1149794, 1144659, 1144667, 1137041, 1137047, 1137048, 1148628, 1158530,\n", - " 1158540, 1137458, 1149942, 1149943, 1135705, 1135707, 1142047, 1157229,\n", - " 1157546, 1158860, 1158856, 1150872, 1150877, 1158919, 1156505, 1157069,\n", - " 1157063, 1155408, 1155418, 1152833, 1137823, 1139479, 1150465, 1146851,\n", - " 1135222, 1135729, 1135740, 1152182, 1156638, 1151788, 1156935, 1135645,\n", - " 1147810, 1137625, 1139525, 1139524, 1158308, 1158311, 1151271, 1151340,\n", - " 1155441, 1153359, 1150132, 1150136, 1138573, 1145768, 1142755, 1160440,\n", - " 1157637, 1151386, 1151379, 1158639, 1155374, 1155375, 1140187, 1155122,\n", - " 1152519, 1152526, 1152527, 1157172, 1149321, 1149519, 1151424, 1156463,\n", - " 1158096, 1154763, 1155628, 1158491, 1158494, 1158824, 1153715, 1158325,\n", - " 1155646, 1143257, 1146935, 1154250, 1164292, 1156711, 1137359, 1154909,\n", - " 1157439, 1157430, 1150068, 1144711, 1155613, 1141627, 1150976, 1150987,\n", - " 1155281, 1155284, 1157928, 1137152, 1157663, 1158996, 1153786, 1155026,\n", - " 1158085, 1145682, 1134683, 1135601, 1148149, 1148159, 1155848, 1158671,\n", - " 1149145, 1156085, 1140634, 1144463, 1152209, 1152220, 1152208, 1140374,\n", - " 1155884, 1157031, 1144843, 1155971, 1155975, 1161676, 1158841, 1156811,\n", - " 1156812, 1161472, 1149700, 1166126, 1136899, 1136909, 1136896, 1157304,\n", - " 1158285, 1152463, 1136480, 1136494, 1164181, 1154387, 1152143, 1153808,\n", - " 1156278, 1156286, 1136646, 1163116, 1140049, 1157858, 1142178, 1158545,\n", - " 1158558, 1156525, 1146123, 1146126, 1138108, 1138110, 1155866, 1158006,\n", - " 1155521, 1161539, 1135662, 1157759, 1157751, 1159287, 1167359, 1159054,\n", - " 1163556, 1172279, 1153052, 1153045, 1171551, 1163075, 1155763, 1156235,\n", - " 1161925, 1166256, 1142865, 1156104, 1138393, 1150046, 1149063, 1145945,\n", - " 1155479, 1151020, 1153514, 1157600, 1138161, 1138163, 1164006, 1149963,\n", - " 1154590, 1160764, 1139286, 1139281, 1136813, 1162737, 1148771, 1171509,\n", - " 1146059, 1146356, 1158461, 1164048, 1140130, 1158868, 1158866, 1140641,\n", - " 1140643, 1148600, 1148603, 1148604, 1156363, 1141792, 1158643, 1159032,\n", - " 1165604, 1169105, 1178154, 1163968, 1163972, 1158911, 1160600, 1162550,\n", - " 1156589, 1151227, 1153931, 1168527, 1146500, 1146510, 1164580, 1144747,\n", - " 1152776, 1153204, 1141471, 1147426, 1147427, 1157044, 1157051, 1149890,\n", - " 1182247, 1156739, 1163480, 1167373, 1150648, 1150651, 1166638, 1144810,\n", - " 1144812, 1164750, 1142722, 1142733, 1156300, 1163777, 1166919, 1145567,\n", - " 1171683, 1184040, 1143037, 1143025, 1166054, 1169233, 1147694, 1147355,\n", - " 1152635, 1152624, 1139359, 1147724, 1145900, 1145902, 1153520, 1168659,\n", - " 1168660, 1171578, 1175240, 1143397, 1143402, 1143404, 1170982, 1158722,\n", - " 1154076, 1147336, 1145674, 1150773, 1170676, 1149130, 1169602, 1166653,\n", - " 1169304, 1145326, 1155180, 1155170, 1154212, 1150525, 1150518, 1156119,\n", - " 1154618, 1154617, 1144344, 1144346, 1144336, 1157534, 1147751, 1147745,\n", - " 1147757, 1154670, 1169162, 1157331, 1138129, 1141043, 1169359, 1150026,\n", - " 1154364, 1154354, 1149452, 1147495, 1147502, 1158611, 1158623, 1158060,\n", - " 1158062, 1173047, 1149847, 1169951, 1152353, 1175689, 1152546, 1155932,\n", - " 1161130, 1149402, 1171847, 1172838, 1173307, 1176768, 1145033, 1157158,\n", - " 1157153, 1155471, 1147711, 1151850, 1148131, 1169913, 1147925, 1169687,\n", - " 1135021, 1170688, 1155739, 1168819, 1175818, 1166028, 1174845, 1171080,\n", - " 1166684, 1171823, 1150234, 1154151, 1154148, 1158176, 1158187, 1149169,\n", - " 1149173, 1171931, 1186117, 1167658, 1143420, 1171302, 1159404, 1153803,\n", - " 1164826, 1177162, 1171122, 1180831, 1158027, 1158031, 1157795, 1181389,\n", - " 1155804, 1155796, 1157126, 1158253, 1153898, 1153902, 1164560, 1145626,\n", - " 1156433, 1178774, 1178757, 1179444, 1149753, 1149755, 1166959, 1163717,\n", - " 1157760, 1157761, 1155990, 1182703, 1158512, 1158517, 1155892, 1155899,\n", - " 1162977, 1140399, 1185405, 1171594, 1169064, 1177764, 1171633, 1180517,\n", - " 1185698, 1188842, 1182337, 1163422, 1154957, 1170349, 1147182, 1193440,\n", - " 1168943, 1190733, 1139828, 1139831, 1149677, 1192076, 1182067, 1156055,\n", - " 1146396, 1182891, 1186750, 1178523, 1170710, 1169959, 1181939, 1182555,\n", - " 1182060, 1193471, 1188360, 1170881, 1192331, 1188817, 1153729, 1193232,\n", - " 1185869, 1162502, 1181824, 1186573, 1191587, 1175349, 1167089, 1161857,\n", - " 1180786, 1158064, 1145395, 1178136, 1179750, 1179757, 1155959, 1172896,\n", - " 1186393, 1163071, 1189794, 1188718, 1157008, 1157017, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137426, 1137429, 1141424, 1140282, 1135926, 1135716, 1137783, 1141756,\n", - " 1141758, 1137506, 1138335, 1136215, 1141251, 1141257, 1140293, 1142802,\n", - " 1136971, 1141440, 1141443, 1138897, 1138909, 1143615, 1154771, 1145374,\n", - " 1138938, 1139143, 1143372, 1139613, 1140781, 1148584, 1149216, 1149220,\n", - " 1142947, 1155683, 1155689, 1143820, 1149633, 1147473, 1147483, 1147484,\n", - " 1144636, 1144632, 1135251, 1149038, 1153009, 1134701, 1135950, 1148346,\n", - " 1146669, 1146472, 1136112, 1152666, 1152667, 1153231, 1147095, 1137220,\n", - " 1145419, 1155014, 1155013, 1139371, 1147202, 1136683, 1136685, 1134710,\n", - " 1134807, 1138742, 1140304, 1140537, 1138112, 1137254, 1137172, 1140953,\n", - " 1135367, 1135202, 1135903, 1154739, 1136291, 1136297, 1134794, 1143377,\n", - " 1138504, 1137329, 1136189, 1137693, 1135333, 1135337, 1144786, 1136826,\n", - " 1157400, 1152376, 1137441, 1136199, 1136928, 1156159, 1139161, 1135579,\n", - " 1135583, 1141078, 1141081, 1140970, 1138514, 1138525, 1153099, 1137957,\n", - " 1158136, 1154132, 1135522, 1139684, 1137287, 1157706, 1138436, 1138440,\n", - " 1138461, 1138449, 1160590, 1154790, 1149328, 1135088, 1147111, 1147112,\n", - " 1142611, 1158987, 1145843, 1145845, 1148531, 1139844, 1136457, 1138069,\n", - " 1142255, 1134992, 1142785, 1152654, 1148805, 1135781, 1135789, 1136723,\n", - " 1158961, 1158974, 1139327, 1159012, 1144410, 1153544, 1140856, 1143631,\n", - " 1140034, 1137587, 1141963, 1152042, 1152044, 1139064, 1142299, 1137734,\n", - " 1137728, 1146222, 1140228, 1141088, 1141094, 1141098, 1144138, 1141980,\n", - " 1143767, 1137297, 1137299, 1143225, 1140005, 1140009, 1140000, 1142499,\n", - " 1141695, 1154467, 1139436, 1161175, 1141224, 1141223, 1139386, 1136917,\n", - " 1139739, 1137185, 1144230, 1140607, 1141155, 1141161, 1146449, 1141785,\n", - " 1141786, 1139495, 1144934, 1168566, 1141300, 1144650, 1134987, 1136851,\n", - " 1136852, 1137072, 1137074, 1149435, 1144428, 1141810, 1141821, 1139266,\n", - " 1158749, 1138464, 1138469, 1137766, 1149111, 1148872, 1137058, 1138708,\n", - " 1142913, 1144596, 1136867, 1136864, 1140432, 1144180, 1150906, 1146201,\n", - " 1139559, 1158690, 1137841, 1147153, 1136376, 1141365, 1141367, 1153068,\n", - " 1141672, 1149097, 1143907, 1143915, 1143917, 1139508, 1139510, 1139519,\n", - " 1139763, 1139127, 1144992, 1145001, 1145200, 1145213, 1140979, 1140990,\n", - " 1146695, 1147050, 1145885, 1145873, 1149876, 1143551, 1152976, 1135457,\n", - " 1139453, 1141925, 1146901, 1144242, 1145328, 1140582, 1150692, 1148313,\n", - " 1137570, 1143845, 1143851, 1136277, 1136275, 1146019, 1146024, 1146017,\n", - " 1141646, 1141585, 1147084, 1139990, 1143293, 1143283, 1143294, 1151120,\n", - " 1143876, 1147541, 1147540, 1147282, 1142816, 1147469, 1143656, 1139417,\n", - " 1139415, 1146084, 1143040, 1142586, 1136836, 1136843, 1139329, 1139328,\n", - " 1141490, 1141496, 1144957, 1142149, 1142158, 1143345, 1144765, 1144753,\n", - " 1144609, 1144619, 1140844, 1140836, 1137098, 1144310, 1135813, 1146523,\n", - " 1143960, 1143959, 1143456, 1143457, 1137697, 1143937, 1135451, 1147574,\n", - " 1147523, 1140364, 1137990, 1168914, 1148962, 1148966, 1148969, 1147999,\n", - " 1134902, 1147128, 1147131, 1148704, 1141327, 1153701, 1152328, 1143434,\n", - " 1147071, 1147025, 1141131, 1145017, 1139547, 1158226, 1158235, 1148365,\n", - " 1154526, 1145240, 1145246, 1145750, 1145751, 1142370, 1142376, 1142383,\n", - " 1146178, 1138861, 1151242, 1152530, 1149258, 1149263, 1148826, 1144514,\n", - " 1144526, 1151994, 1151997, 1151480, 1152022, 1152024, 1145263, 1145262,\n", - " 1146723, 1149588, 1150127, 1147021, 1147023, 1158959, 1141949, 1144828,\n", - " 1151803, 1150722, 1153574, 1147653, 1147659, 1149412, 1137727, 1148615,\n", - " 1148623, 1154420, 1158797, 1139721, 1146679, 1146682, 1146686, 1146547,\n", - " 1146559, 1150053, 1148204, 1153124, 1153192, 1153188, 1153197, 1145111,\n", - " 1167960, 1155547, 1150929, 1150935, 1152875, 1143092, 1144849, 1150356,\n", - " 1143127, 1143134, 1147442, 1151816, 1152581, 1151906, 1150708, 1150715,\n", - " 1148498, 1148502, 1149732, 1141420, 1136002, 1155156, 1147737, 1145080,\n", - " 1148949, 1146975, 1156402, 1146616, 1146623, 1152407, 1152415, 1150794,\n", - " 1152097, 1153030, 1153037, 1150085, 1137746, 1137755, 1146307, 1146304,\n", - " 1152622, 1140521, 1155140, 1136410, 1157104, 1152819, 1155337, 1154123,\n", - " 1157824, 1157833, 1139581, 1151627, 1151617, 1150578, 1150588, 1136131,\n", - " 1136134, 1136798, 1145952, 1152233, 1138991, 1152903, 1152341, 1146816,\n", - " 1156831, 1138275, 1138276, 1138279, 1138281, 1156007, 1156000, 1156005,\n", - " 1136028, 1158712, 1158704, 1156619, 1151187, 1152928, 1142777, 1156420,\n", - " 1150164, 1144018, 1148033, 1148035, 1148040, 1152601, 1155226, 1145656,\n", - " 1149794, 1144659, 1144667, 1137041, 1137047, 1137048, 1148628, 1158530,\n", - " 1158540, 1137458, 1149942, 1149943, 1135705, 1135707, 1142047, 1157229,\n", - " 1157546, 1158860, 1158856, 1150872, 1150877, 1158919, 1156505, 1157069,\n", - " 1157063, 1155408, 1155418, 1152833, 1137823, 1139479, 1150465, 1146851,\n", - " 1135222, 1135729, 1135740, 1152182, 1156638, 1151788, 1156935, 1135645,\n", - " 1147810, 1137625, 1139525, 1139524, 1158308, 1158311, 1151271, 1151340,\n", - " 1155441, 1153359, 1150132, 1150136, 1138573, 1145768, 1142755, 1160440,\n", - " 1157637, 1151386, 1151379, 1158639, 1155374, 1155375, 1140187, 1155122,\n", - " 1152519, 1152526, 1152527, 1157172, 1149321, 1149519, 1151424, 1156463,\n", - " 1158096, 1154763, 1155628, 1158491, 1158494, 1158824, 1153715, 1158325,\n", - " 1155646, 1143257, 1146935, 1154250, 1164292, 1156711, 1137359, 1154909,\n", - " 1157439, 1157430, 1150068, 1144711, 1155613, 1141627, 1150976, 1150987,\n", - " 1155281, 1155284, 1157928, 1137152, 1157663, 1158996, 1153786, 1155026,\n", - " 1158085, 1145682, 1134683, 1135601, 1148149, 1148159, 1155848, 1158671,\n", - " 1149145, 1156085, 1140634, 1144463, 1152209, 1152220, 1152208, 1140374,\n", - " 1155884, 1157031, 1144843, 1155971, 1155975, 1161676, 1158841, 1156811,\n", - " 1156812, 1161472, 1149700, 1166126, 1136899, 1136909, 1136896, 1157304,\n", - " 1158285, 1152463, 1136480, 1136494, 1164181, 1154387, 1152143, 1153808,\n", - " 1156278, 1156286, 1136646, 1163116, 1140049, 1157858, 1142178, 1158545,\n", - " 1158558, 1156525, 1146123, 1146126, 1138108, 1138110, 1155866, 1158006,\n", - " 1155521, 1161539, 1135662, 1157759, 1157751, 1159287, 1167359, 1159054,\n", - " 1163556, 1172279, 1153052, 1153045, 1171551, 1163075, 1155763, 1156235,\n", - " 1161925, 1166256, 1142865, 1156104, 1138393, 1150046, 1149063, 1145945,\n", - " 1155479, 1151020, 1153514, 1157600, 1138161, 1138163, 1164006, 1149963,\n", - " 1154590, 1160764, 1139286, 1139281, 1136813, 1162737, 1148771, 1171509,\n", - " 1146059, 1146356, 1158461, 1164048, 1140130, 1158868, 1158866, 1140641,\n", - " 1140643, 1148600, 1148603, 1148604, 1156363, 1141792, 1158643, 1159032,\n", - " 1165604, 1169105, 1178154, 1163968, 1163972, 1158911, 1160600, 1162550,\n", - " 1156589, 1151227, 1153931, 1168527, 1146500, 1146510, 1164580, 1144747,\n", - " 1152776, 1153204, 1141471, 1147426, 1147427, 1157044, 1157051, 1149890,\n", - " 1182247, 1156739, 1163480, 1167373, 1150648, 1150651, 1166638, 1144810,\n", - " 1144812, 1164750, 1142722, 1142733, 1156300, 1163777, 1166919, 1145567,\n", - " 1171683, 1184040, 1143037, 1143025, 1166054, 1169233, 1147694, 1147355,\n", - " 1152635, 1152624, 1139359, 1147724, 1145900, 1145902, 1153520, 1168659,\n", - " 1168660, 1171578, 1175240, 1143397, 1143402, 1143404, 1170982, 1158722,\n", - " 1154076, 1147336, 1145674, 1150773, 1170676, 1149130, 1169602, 1166653,\n", - " 1169304, 1145326, 1155180, 1155170, 1154212, 1150525, 1150518, 1156119,\n", - " 1154618, 1154617, 1144344, 1144346, 1144336, 1157534, 1147751, 1147745,\n", - " 1147757, 1154670, 1169162, 1157331, 1138129, 1141043, 1169359, 1150026,\n", - " 1154364, 1154354, 1149452, 1147495, 1147502, 1158611, 1158623, 1158060,\n", - " 1158062, 1173047, 1149847, 1169951, 1152353, 1175689, 1152546, 1155932,\n", - " 1161130, 1149402, 1171847, 1172838, 1173307, 1176768, 1145033, 1157158,\n", - " 1157153, 1155471, 1147711, 1151850, 1148131, 1169913, 1147925, 1169687,\n", - " 1135021, 1170688, 1155739, 1168819, 1175818, 1166028, 1174845, 1171080,\n", - " 1166684, 1171823, 1150234, 1154151, 1154148, 1158176, 1158187, 1149169,\n", - " 1149173, 1171931, 1186117, 1167658, 1143420, 1171302, 1159404, 1153803,\n", - " 1164826, 1177162, 1171122, 1180831, 1158027, 1158031, 1157795, 1181389,\n", - " 1155804, 1155796, 1157126, 1158253, 1153898, 1153902, 1164560, 1145626,\n", - " 1156433, 1178774, 1178757, 1179444, 1149753, 1149755, 1166959, 1163717,\n", - " 1157760, 1157761, 1155990, 1182703, 1158512, 1158517, 1155892, 1155899,\n", - " 1162977, 1140399, 1185405, 1171594, 1169064, 1177764, 1171633, 1180517,\n", - " 1185698, 1188842, 1182337, 1163422, 1154957, 1170349, 1147182, 1193440,\n", - " 1168943, 1190733, 1139828, 1139831, 1149677, 1192076, 1182067, 1156055,\n", - " 1146396, 1182891, 1186750, 1178523, 1170710, 1169959, 1181939, 1182555,\n", - " 1182060, 1193471, 1188360, 1170881, 1192331, 1188817, 1153729, 1193232,\n", - " 1185869, 1162502, 1181824, 1186573, 1191587, 1175349, 1167089, 1161857,\n", - " 1180786, 1158064, 1145395, 1178136, 1179750, 1179757, 1155959, 1172896,\n", - " 1186393, 1163071, 1189794, 1188718, 1157008, 1157017, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199434, 1199305, 1195397, 1197719, 1197727, 1198730, 1199282, 1202255,\n", - " 1201577, 1201582, 1194626, 1200644, 1197777, 1201016, 1203047, 1197232,\n", - " 1198694, 1196867, 1194864, 1194770, 1194771, 1196631, 1195103, 1195511,\n", - " 1195926, 1197924, 1196534, 1201992, 1198539, 1197697, 1198095, 1194949,\n", - " 1197760, 1195895, 1199171, 1196699, 1195313, 1198668, 1195998, 1195132,\n", - " 1195571, 1196711, 1199810, 1199823, 1195145, 1195221, 1195223, 1195265,\n", - " 1197273, 1196101, 1194854, 1198915, 1198924, 1195541, 1196117, 1198504,\n", - " 1197408, 1195358, 1199329, 1200950, 1200959, 1199856, 1199060, 1194928,\n", - " 1199628, 1200866, 1200872, 1199154, 1199038, 1198400, 1199231, 1199676,\n", - " 1200060, 1197601, 1196727, 1195773, 1200887, 1198428, 1199410, 1201547,\n", - " 1200166, 1200169, 1200507, 1198797, 1201421, 1201156, 1202631, 1199721,\n", - " 1200553, 1200429, 1201627, 1199887, 1196883, 1199908, 1201442, 1202337,\n", - " 1202175, 1197537, 1197544, 1201559, 1201291, 1198472, 1198478, 1203329,\n", - " 1202889, 1199925, 1196966, 1200784, 1199606, 1195438, 1195679, 1195664,\n", - " 1198055, 1200445, 1197334, 1198929, 1198911, 1195421, 1201789, 1195181,\n", - " 1197822, 1195074, 1199661, 1194730, 1199786, 1198819, 1200974, 1197035,\n", - " 1200211, 1194908], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199434, 1199305, 1195397, 1197719, 1197727, 1198730, 1199282, 1202255,\n", - " 1201577, 1201582, 1194626, 1200644, 1197777, 1201016, 1203047, 1197232,\n", - " 1198694, 1196867, 1194864, 1194770, 1194771, 1196631, 1195103, 1195511,\n", - " 1195926, 1197924, 1196534, 1201992, 1198539, 1197697, 1198095, 1194949,\n", - " 1197760, 1195895, 1199171, 1196699, 1195313, 1198668, 1195998, 1195132,\n", - " 1195571, 1196711, 1199810, 1199823, 1195145, 1195221, 1195223, 1195265,\n", - " 1197273, 1196101, 1194854, 1198915, 1198924, 1195541, 1196117, 1198504,\n", - " 1197408, 1195358, 1199329, 1200950, 1200959, 1199856, 1199060, 1194928,\n", - " 1199628, 1200866, 1200872, 1199154, 1199038, 1198400, 1199231, 1199676,\n", - " 1200060, 1197601, 1196727, 1195773, 1200887, 1198428, 1199410, 1201547,\n", - " 1200166, 1200169, 1200507, 1198797, 1201421, 1201156, 1202631, 1199721,\n", - " 1200553, 1200429, 1201627, 1199887, 1196883, 1199908, 1201442, 1202337,\n", - " 1202175, 1197537, 1197544, 1201559, 1201291, 1198472, 1198478, 1203329,\n", - " 1202889, 1199925, 1196966, 1200784, 1199606, 1195438, 1195679, 1195664,\n", - " 1198055, 1200445, 1197334, 1198929, 1198911, 1195421, 1201789, 1195181,\n", - " 1197822, 1195074, 1199661, 1194730, 1199786, 1198819, 1200974, 1197035,\n", - " 1200211, 1194908], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[-2.8453e-04, -1.5291e-04, 1.9592e-01, ..., 4.7854e-02,\n", - " -7.4410e-04, -2.1318e-03],\n", - " [-4.1389e-04, 1.4037e-02, 1.5951e-01, ..., 6.1028e-02,\n", - " -8.4176e-04, -1.8979e-03],\n", - " [-1.5681e-04, -1.0947e-05, 1.7249e-01, ..., 3.3520e-02,\n", - " -7.5673e-04, -2.3114e-03],\n", - " ...,\n", - " [-2.1102e-04, 1.2033e-02, 1.8334e-01, ..., 9.0940e-03,\n", - " -5.3726e-04, -2.1668e-03],\n", - " [-2.2422e-04, -1.4828e-04, 1.8665e-01, ..., 1.9892e-02,\n", - " -3.9805e-04, -2.0360e-03],\n", - " [ 1.7374e-03, -5.9832e-04, 2.2415e-01, ..., 7.9060e-03,\n", - " -3.9859e-04, -2.3470e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 6.9745e-01, -1.3679e-02, 1.0588e+00, ..., 5.0961e-02,\n", - " -1.8219e-03, 6.0336e-01],\n", - " [ 1.4956e+00, -2.7222e-02, 7.3571e-01, ..., -4.2561e-03,\n", - " -8.9166e-04, 7.5469e-01],\n", - " [ 9.4440e-01, -1.3005e-02, 8.7193e-01, ..., -1.2008e-03,\n", - " -3.8680e-03, 1.0930e+00],\n", - " ...,\n", - " [ 1.4938e+00, -3.2907e-02, 7.5440e-01, ..., -6.6876e-03,\n", - " -2.7153e-03, 4.9890e-01],\n", - " [ 9.8533e-01, -1.2744e-02, 9.2613e-01, ..., 1.4743e-01,\n", - " -1.3903e-03, 8.1953e-01],\n", - " [ 6.3358e-01, -1.3895e-02, 1.1931e+00, ..., 6.7598e-02,\n", - " -1.4916e-03, 8.7285e-01]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[ 1.8724e-01, -3.0749e-03, 9.1537e-02, ..., -1.4300e-03,\n", - " 1.5230e-01, 8.2414e-02],\n", - " [ 2.6750e-01, -3.4651e-03, -2.1022e-05, ..., -8.5285e-04,\n", - " 5.4993e-02, 1.5926e-01],\n", - " [ 3.0037e-01, -3.2242e-03, 3.5194e-02, ..., -2.5395e-03,\n", - " -4.3355e-04, 1.5248e-01],\n", - " ...,\n", - " [-3.9907e-04, -5.1697e-04, 1.5885e-01, ..., 7.5320e-02,\n", - " -1.7575e-04, -9.0663e-04],\n", - " [ 2.6360e-01, -3.0196e-03, 3.1380e-02, ..., -1.2630e-03,\n", - " 9.4294e-02, 1.3287e-01],\n", - " [ 3.5567e-01, -3.4443e-03, 3.1923e-02, ..., -1.6210e-03,\n", - " 8.7054e-02, 1.4060e-01]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-0.0073, 0.2050, -0.0025, ..., 0.7686, -0.0022, -0.0054],\n", - " [-0.0082, 0.1354, -0.0027, ..., 0.8438, -0.0016, -0.0047],\n", - " [-0.0101, 0.2382, -0.0034, ..., 1.1476, -0.0012, -0.0058],\n", - " ...,\n", - " [-0.0068, 0.1293, -0.0017, ..., 0.6205, -0.0023, -0.0049],\n", - " [-0.0071, 0.2200, -0.0024, ..., 0.7854, -0.0014, -0.0068],\n", - " [-0.0075, 0.2697, -0.0031, ..., 0.9977, -0.0016, -0.0063]],\n", - " device='cuda:0', grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 186, 115, 109, 228, 147, 323, 373, 373, 819, 565, 779, 779,\n", - " 756, 586, 586, 572, 626, 711, 711, 768, 632, 756, 617, 656,\n", - " 974, 951, 891, 891, 909, 780, 967, 995, 1109, 1109, 1277, 1362,\n", - " 1244, 1239, 1292, 1386, 1240, 1240, 1240, 1395, 1395, 1395, 1395, 1418,\n", - " 1418, 1573, 1573, 1565, 1565, 1602, 1602, 1442, 1602, 1639, 1832, 1688,\n", - " 1775, 1775, 1775, 1775, 1730, 1950, 1940, 2076, 1867, 1991, 2157, 2094,\n", - " 2121, 2172, 2153, 2235, 2341, 2327, 2370, 2512, 2239, 2239, 2239, 2704,\n", - " 2452, 2451, 2498, 2498, 2466, 2798, 2822, 2900, 2602, 2602, 2884, 3045,\n", - " 3045, 3091, 3124, 3228, 3107, 3177, 3249, 3249, 3249, 3298, 3489, 3452,\n", - " 3514, 3471, 3480, 3514, 3666, 3621, 3828, 3660, 3823, 3823, 3859, 3859,\n", - " 3849, 3856, 3934, 3967, 3977, 4109, 4150, 4063, 4346, 4285, 4265, 4354,\n", - " 4333, 4333, 4394, 4598, 4503, 4430, 4457, 4384, 4384, 4384, 4627, 4462,\n", - " 4618, 4752, 4740, 4814, 4799, 4969, 4915, 5033, 5092, 5023, 5023, 5156,\n", - " 5046, 5005, 5224, 5224, 5239, 5413, 5413, 5264, 5573, 5573, 5573, 5200,\n", - " 5487, 5929, 5222, 5660, 5627, 5911, 5911, 5725, 5725, 5982, 5854, 5814,\n", - " 5931, 5954, 5954, 5922],\n", - " [ 93, 100, 58, 64, 51, 114, 90, 27, 0, 112, 78, 80,\n", - " 39, 75, 103, 112, 112, 80, 50, 69, 72, 51, 49, 61,\n", - " 126, 25, 70, 73, 21, 17, 110, 6, 98, 25, 43, 10,\n", - " 106, 6, 13, 127, 11, 30, 46, 105, 118, 85, 82, 80,\n", - " 55, 33, 75, 31, 42, 34, 106, 29, 118, 129, 120, 81,\n", - " 96, 102, 67, 125, 27, 16, 119, 40, 10, 108, 45, 5,\n", - " 31, 2, 1, 127, 112, 23, 30, 1, 3, 91, 95, 20,\n", - " 112, 17, 126, 128, 24, 66, 32, 9, 37, 77, 19, 39,\n", - " 51, 8, 121, 74, 117, 26, 70, 103, 73, 48, 74, 57,\n", - " 115, 4, 111, 123, 120, 104, 2, 74, 24, 79, 116, 51,\n", - " 47, 84, 59, 104, 77, 28, 111, 6, 83, 87, 52, 120,\n", - " 99, 97, 88, 129, 21, 65, 86, 35, 109, 88, 44, 19,\n", - " 3, 113, 104, 15, 64, 12, 86, 94, 22, 101, 56, 36,\n", - " 122, 53, 113, 68, 124, 100, 62, 126, 54, 92, 60, 89,\n", - " 7, 84, 107, 14, 74, 2, 38, 74, 13, 71, 74, 76,\n", - " 18, 63, 88, 41]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1564, 7563, 830, ..., 3410, 4499, 5457],\n", - " [ 271, 182, 37, ..., 7604, 7639, 7572]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 73, 126, 21, ..., 47, 3, 21],\n", - " [ 179, 234, 142, ..., 5973, 5953, 5909]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 239, 239, 239, ..., 7544, 7544, 7738],\n", - " [ 150, 274, 524, ..., 766, 560, 323]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 820, 260, 43, ..., 249, 364, 303],\n", - " [ 102, 257, 2, ..., 7522, 7675, 7595]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3153, 4188, 6923, ..., 5149, 6989, 4445],\n", - " [ 22, 22, 209, ..., 5916, 5915, 5920]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 346, 346, 394, ..., 7544, 7544, 7738],\n", - " [3791, 2098, 3231, ..., 5828, 5061, 6440]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 2, 2, 2, ..., 5954, 5954, 5922],\n", - " [7499, 3049, 3573, ..., 239, 815, 5080]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.007104\n", - "sampling 0.006938\n", - "noi time: 0.002213\n", - "get_vertex_data call: 0.03326\n", - "noi group time: 0.002153\n", - "eoi_group_time: 0.014306\n", - "second half: 0.194884\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 468, 31145, 32616, ..., 1122197, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 468, 31145, 32616, ..., 1122197, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1203800, 1215819, 1231357, ..., 1930686, 1936967, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1203800, 1215819, 1231357, ..., 1930686, 1936967, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1137204, 1141424, 1136230, 1140282, 1136349, 1136339, 1135926,\n", - " 1135928, 1138544, 1135160, 1135719, 1137780, 1140785, 1139698, 1141751,\n", - " 1141756, 1141758, 1138322, 1138335, 1136965, 1136969, 1136970, 1141443,\n", - " 1138059, 1138058, 1137271, 1138933, 1138942, 1143372, 1143363, 1146644,\n", - " 1139615, 1150497, 1150509, 1142958, 1155689, 1143820, 1147483, 1135989,\n", - " 1153940, 1144636, 1153012, 1148337, 1148343, 1146666, 1146472, 1147094,\n", - " 1155009, 1155014, 1136683, 1150329, 1134712, 1146369, 1134804, 1140313,\n", - " 1140540, 1138112, 1138119, 1149461, 1151520, 1153461, 1153467, 1140159,\n", - " 1140947, 1140952, 1135367, 1135201, 1135202, 1135210, 1140753, 1135903,\n", - " 1141036, 1134794, 1138504, 1137329, 1137330, 1136179, 1143069, 1144390,\n", - " 1144394, 1144395, 1137521, 1137534, 1152376, 1137441, 1139161, 1141702,\n", - " 1135583, 1136100, 1138514, 1153094, 1153099, 1153092, 1137957, 1137959,\n", - " 1138584, 1158136, 1154141, 1137019, 1136985, 1156899, 1135522, 1135535,\n", - " 1139684, 1138319, 1139878, 1157697, 1138440, 1138445, 1136534, 1138461,\n", - " 1138449, 1136594, 1149328, 1138846, 1138882, 1156603, 1156602, 1142611,\n", - " 1142615, 1135359, 1135355, 1148531, 1150956, 1137108, 1137109, 1135769,\n", - " 1135772, 1139844, 1139667, 1139673, 1138069, 1134776, 1142434, 1152654,\n", - " 1148810, 1140195, 1158974, 1144406, 1153544, 1140853, 1140036, 1136065,\n", - " 1139929, 1139934, 1138148, 1137135, 1134891, 1141992, 1152044, 1136057,\n", - " 1137734, 1137728, 1140901, 1134750, 1138246, 1135546, 1141088, 1141098,\n", - " 1141091, 1139898, 1139889, 1137297, 1159672, 1149982, 1142504, 1152719,\n", - " 1154467, 1154472, 1161173, 1140467, 1141224, 1139386, 1136921, 1139730,\n", - " 1143667, 1143679, 1144233, 1144237, 1140598, 1140597, 1141786, 1139495,\n", - " 1144650, 1134979, 1136862, 1138482, 1143166, 1143202, 1140160, 1140173,\n", - " 1158749, 1158750, 1138469, 1149118, 1142712, 1139192, 1141479, 1137071,\n", - " 1138710, 1138708, 1142913, 1138423, 1143111, 1144596, 1142843, 1136866,\n", - " 1136864, 1144041, 1140880, 1141397, 1144180, 1144182, 1150906, 1144865,\n", - " 1146201, 1138539, 1137854, 1147153, 1136375, 1142646, 1141365, 1141367,\n", - " 1153068, 1151112, 1138293, 1139510, 1139127, 1145001, 1145202, 1143791,\n", - " 1140619, 1139171, 1140976, 1140979, 1140990, 1146695, 1147050, 1145873,\n", - " 1155835, 1152976, 1152988, 1135464, 1142556, 1139453, 1141925, 1146901,\n", - " 1144242, 1141841, 1138721, 1137574, 1134850, 1145983, 1145974, 1145982,\n", - " 1143851, 1146024, 1150599, 1150606, 1146140, 1154328, 1142533, 1139990,\n", - " 1143293, 1147543, 1147282, 1136330, 1149160, 1139408, 1148001, 1146084,\n", - " 1149608, 1143051, 1136168, 1157720, 1136836, 1165629, 1139297, 1141488,\n", - " 1141490, 1141496, 1144957, 1142149, 1143345, 1144766, 1144753, 1145818,\n", - " 1150294, 1150296, 1146514, 1146523, 1143957, 1143960, 1143961, 1143456,\n", - " 1143460, 1143470, 1143457, 1143937, 1147574, 1147521, 1147523, 1140364,\n", - " 1149569, 1137990, 1137995, 1143080, 1143082, 1147984, 1147995, 1147999,\n", - " 1144013, 1139252, 1145467, 1147244, 1148704, 1148715, 1150996, 1141327,\n", - " 1141836, 1146745, 1146742, 1152328, 1149722, 1147025, 1142858, 1147248,\n", - " 1141124, 1141128, 1158226, 1154526, 1145240, 1145750, 1145751, 1142377,\n", - " 1138638, 1146178, 1151242, 1152530, 1150280, 1150445, 1148928, 1148930,\n", - " 1154998, 1149791, 1150350, 1152013, 1154819, 1147794, 1151473, 1152023,\n", - " 1152027, 1154263, 1145255, 1145256, 1135504, 1146723, 1134869, 1150127,\n", - " 1147019, 1147020, 1147009, 1153962, 1158949, 1158950, 1141941, 1141949,\n", - " 1146782, 1144825, 1148744, 1148448, 1147653, 1147654, 1151717, 1148300,\n", - " 1137724, 1135087, 1148623, 1147863, 1147866, 1154420, 1158786, 1136247,\n", - " 1146679, 1146686, 1157983, 1139936, 1139941, 1154200, 1153124, 1153193,\n", - " 1153188, 1150932, 1150935, 1152877, 1143092, 1150356, 1148095, 1141016,\n", - " 1147440, 1135307, 1135311, 1151906, 1154183, 1150715, 1148498, 1141420,\n", - " 1152784, 1151352, 1157210, 1147737, 1146969, 1146975, 1156403, 1146623,\n", - " 1151691, 1151694, 1152109, 1146280, 1146287, 1156321, 1156325, 1153030,\n", - " 1153038, 1145539, 1137746, 1146304, 1152608, 1152622, 1140521, 1149203,\n", - " 1155337, 1155349, 1152673, 1152675, 1154633, 1154638, 1151576, 1151617,\n", - " 1151623, 1150588, 1136131, 1148914, 1148916, 1152944, 1144530, 1140929,\n", - " 1145952, 1152224, 1138989, 1143995, 1152341, 1158423, 1153311, 1138276,\n", - " 1138281, 1157147, 1136028, 1136031, 1158704, 1156622, 1151187, 1152928,\n", - " 1152934, 1151067, 1151071, 1153913, 1150164, 1148033, 1148040, 1149300,\n", - " 1155223, 1155231, 1157630, 1149807, 1137048, 1158477, 1148628, 1158530,\n", - " 1137458, 1154569, 1147635, 1139229, 1157547, 1158854, 1150877, 1156500,\n", - " 1156504, 1157064, 1155418, 1151257, 1150465, 1135230, 1135729, 1135730,\n", - " 1135734, 1156638, 1151788, 1150824, 1135634, 1147810, 1151469, 1158306,\n", - " 1158311, 1151271, 1155441, 1150129, 1150130, 1150132, 1154528, 1150490,\n", - " 1142758, 1156207, 1138775, 1151379, 1158624, 1155122, 1157183, 1149321,\n", - " 1149519, 1155746, 1135396, 1145799, 1156463, 1168230, 1157893, 1155628,\n", - " 1156563, 1154555, 1155574, 1136469, 1158824, 1177952, 1148835, 1148647,\n", - " 1155646, 1154240, 1163362, 1154902, 1154909, 1143189, 1143531, 1150371,\n", - " 1153325, 1150068, 1144707, 1155613, 1150987, 1155281, 1143517, 1159618,\n", - " 1159629, 1153776, 1159116, 1145694, 1134674, 1135601, 1135614, 1148149,\n", - " 1158665, 1157684, 1146325, 1149145, 1159258, 1156090, 1156692, 1140380,\n", - " 1156018, 1155881, 1142466, 1164215, 1155975, 1153765, 1156811, 1156812,\n", - " 1161892, 1149705, 1154600, 1136899, 1136905, 1136896, 1158753, 1185567,\n", - " 1158815, 1155246, 1152463, 1151615, 1136480, 1136494, 1136491, 1156664,\n", - " 1156665, 1152129, 1156490, 1136646, 1140049, 1157858, 1147787, 1158558,\n", - " 1153827, 1146126, 1154342, 1150011, 1164276, 1192532, 1142663, 1142666,\n", - " 1156045, 1159042, 1142426, 1157946, 1162044, 1153052, 1162833, 1163072,\n", - " 1163075, 1167698, 1167566, 1166256, 1163706, 1156107, 1138393, 1149063,\n", - " 1145948, 1145945, 1153514, 1153519, 1147307, 1147300, 1138161, 1156795,\n", - " 1156784, 1149952, 1164909, 1139281, 1166935, 1156983, 1156987, 1148771,\n", - " 1171255, 1171257, 1162305, 1158868, 1140650, 1140643, 1148603, 1148607,\n", - " 1143143, 1159646, 1144509, 1151872, 1163019, 1156357, 1156358, 1158653,\n", - " 1159025, 1159026, 1159029, 1159032, 1184734, 1171373, 1165877, 1152247,\n", - " 1143735, 1155588, 1162546, 1151227, 1138674, 1168426, 1148571, 1158405,\n", - " 1168521, 1144989, 1146500, 1146510, 1153247, 1144739, 1144747, 1152776,\n", - " 1155279, 1165415, 1141471, 1141459, 1147426, 1179979, 1156739, 1157955,\n", - " 1171040, 1168750, 1144810, 1144812, 1140112, 1135567, 1142733, 1156293,\n", - " 1156303, 1144057, 1145179, 1148683, 1145228, 1154695, 1155324, 1166462,\n", - " 1147677, 1138953, 1138954, 1142136, 1143025, 1147355, 1170502, 1170612,\n", - " 1152639, 1152624, 1139351, 1147723, 1145902, 1163606, 1152198, 1152203,\n", - " 1181049, 1170389, 1171230, 1158722, 1158734, 1170738, 1147331, 1150783,\n", - " 1149128, 1167817, 1144681, 1149487, 1149483, 1169298, 1155172, 1155170,\n", - " 1150526, 1156117, 1145531, 1154618, 1144336, 1157534, 1138376, 1147746,\n", - " 1154670, 1154893, 1169154, 1157331, 1141051, 1151668, 1150027, 1147495,\n", - " 1158611, 1158060, 1158061, 1158062, 1149847, 1157380, 1157383, 1165903,\n", - " 1171475, 1155502, 1152353, 1152360, 1175687, 1143177, 1169133, 1149398,\n", - " 1148667, 1172838, 1148324, 1148325, 1173307, 1145033, 1169144, 1154027,\n", - " 1153755, 1172791, 1167857, 1169583, 1157153, 1155465, 1147711, 1148131,\n", - " 1169914, 1157592, 1157593, 1170488, 1172961, 1155738, 1155739, 1174418,\n", - " 1168389, 1160979, 1174433, 1177614, 1172606, 1163990, 1182128, 1176452,\n", - " 1150234, 1154148, 1167517, 1184584, 1178889, 1149169, 1149173, 1143279,\n", - " 1169772, 1175620, 1168481, 1143420, 1156559, 1166299, 1184751, 1153803,\n", - " 1178467, 1171122, 1179714, 1171744, 1169387, 1184093, 1182651, 1182476,\n", - " 1158031, 1166554, 1161262, 1155262, 1175260, 1154718, 1157795, 1172034,\n", - " 1177585, 1172546, 1171623, 1179199, 1157132, 1157994, 1177357, 1158249,\n", - " 1158253, 1153898, 1154500, 1178208, 1145624, 1145626, 1156436, 1156437,\n", - " 1154840, 1178769, 1182632, 1157483, 1157487, 1161063, 1146241, 1146252,\n", - " 1181356, 1152274, 1155990, 1158512, 1155892, 1177090, 1162968, 1182786,\n", - " 1168540, 1168886, 1168621, 1164228, 1163422, 1164262, 1154957, 1170806,\n", - " 1156860, 1156861, 1166772, 1170341, 1169335, 1147180, 1156162, 1178246,\n", - " 1188411, 1139828, 1139831, 1139837, 1150265, 1170433, 1156055, 1190316,\n", - " 1180122, 1146394, 1146395, 1173058, 1149544, 1181803, 1193427, 1178523,\n", - " 1169964, 1189189, 1189096, 1140993, 1141006, 1140995, 1189256, 1162156,\n", - " 1151774, 1191859, 1193879, 1159169, 1191242, 1190076, 1191604, 1162502,\n", - " 1169707, 1169700, 1190747, 1191429, 1189662, 1192567, 1193727, 1156676,\n", - " 1174284, 1158064, 1167730, 1186248, 1155959, 1155962, 1186072, 1188280,\n", - " 1188272, 1191488, 1167471, 1182401, 1169398, 1184978, 1157022, 1161940],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1137204, 1141424, 1136230, 1140282, 1136349, 1136339, 1135926,\n", - " 1135928, 1138544, 1135160, 1135719, 1137780, 1140785, 1139698, 1141751,\n", - " 1141756, 1141758, 1138322, 1138335, 1136965, 1136969, 1136970, 1141443,\n", - " 1138059, 1138058, 1137271, 1138933, 1138942, 1143372, 1143363, 1146644,\n", - " 1139615, 1150497, 1150509, 1142958, 1155689, 1143820, 1147483, 1135989,\n", - " 1153940, 1144636, 1153012, 1148337, 1148343, 1146666, 1146472, 1147094,\n", - " 1155009, 1155014, 1136683, 1150329, 1134712, 1146369, 1134804, 1140313,\n", - " 1140540, 1138112, 1138119, 1149461, 1151520, 1153461, 1153467, 1140159,\n", - " 1140947, 1140952, 1135367, 1135201, 1135202, 1135210, 1140753, 1135903,\n", - " 1141036, 1134794, 1138504, 1137329, 1137330, 1136179, 1143069, 1144390,\n", - " 1144394, 1144395, 1137521, 1137534, 1152376, 1137441, 1139161, 1141702,\n", - " 1135583, 1136100, 1138514, 1153094, 1153099, 1153092, 1137957, 1137959,\n", - " 1138584, 1158136, 1154141, 1137019, 1136985, 1156899, 1135522, 1135535,\n", - " 1139684, 1138319, 1139878, 1157697, 1138440, 1138445, 1136534, 1138461,\n", - " 1138449, 1136594, 1149328, 1138846, 1138882, 1156603, 1156602, 1142611,\n", - " 1142615, 1135359, 1135355, 1148531, 1150956, 1137108, 1137109, 1135769,\n", - " 1135772, 1139844, 1139667, 1139673, 1138069, 1134776, 1142434, 1152654,\n", - " 1148810, 1140195, 1158974, 1144406, 1153544, 1140853, 1140036, 1136065,\n", - " 1139929, 1139934, 1138148, 1137135, 1134891, 1141992, 1152044, 1136057,\n", - " 1137734, 1137728, 1140901, 1134750, 1138246, 1135546, 1141088, 1141098,\n", - " 1141091, 1139898, 1139889, 1137297, 1159672, 1149982, 1142504, 1152719,\n", - " 1154467, 1154472, 1161173, 1140467, 1141224, 1139386, 1136921, 1139730,\n", - " 1143667, 1143679, 1144233, 1144237, 1140598, 1140597, 1141786, 1139495,\n", - " 1144650, 1134979, 1136862, 1138482, 1143166, 1143202, 1140160, 1140173,\n", - " 1158749, 1158750, 1138469, 1149118, 1142712, 1139192, 1141479, 1137071,\n", - " 1138710, 1138708, 1142913, 1138423, 1143111, 1144596, 1142843, 1136866,\n", - " 1136864, 1144041, 1140880, 1141397, 1144180, 1144182, 1150906, 1144865,\n", - " 1146201, 1138539, 1137854, 1147153, 1136375, 1142646, 1141365, 1141367,\n", - " 1153068, 1151112, 1138293, 1139510, 1139127, 1145001, 1145202, 1143791,\n", - " 1140619, 1139171, 1140976, 1140979, 1140990, 1146695, 1147050, 1145873,\n", - " 1155835, 1152976, 1152988, 1135464, 1142556, 1139453, 1141925, 1146901,\n", - " 1144242, 1141841, 1138721, 1137574, 1134850, 1145983, 1145974, 1145982,\n", - " 1143851, 1146024, 1150599, 1150606, 1146140, 1154328, 1142533, 1139990,\n", - " 1143293, 1147543, 1147282, 1136330, 1149160, 1139408, 1148001, 1146084,\n", - " 1149608, 1143051, 1136168, 1157720, 1136836, 1165629, 1139297, 1141488,\n", - " 1141490, 1141496, 1144957, 1142149, 1143345, 1144766, 1144753, 1145818,\n", - " 1150294, 1150296, 1146514, 1146523, 1143957, 1143960, 1143961, 1143456,\n", - " 1143460, 1143470, 1143457, 1143937, 1147574, 1147521, 1147523, 1140364,\n", - " 1149569, 1137990, 1137995, 1143080, 1143082, 1147984, 1147995, 1147999,\n", - " 1144013, 1139252, 1145467, 1147244, 1148704, 1148715, 1150996, 1141327,\n", - " 1141836, 1146745, 1146742, 1152328, 1149722, 1147025, 1142858, 1147248,\n", - " 1141124, 1141128, 1158226, 1154526, 1145240, 1145750, 1145751, 1142377,\n", - " 1138638, 1146178, 1151242, 1152530, 1150280, 1150445, 1148928, 1148930,\n", - " 1154998, 1149791, 1150350, 1152013, 1154819, 1147794, 1151473, 1152023,\n", - " 1152027, 1154263, 1145255, 1145256, 1135504, 1146723, 1134869, 1150127,\n", - " 1147019, 1147020, 1147009, 1153962, 1158949, 1158950, 1141941, 1141949,\n", - " 1146782, 1144825, 1148744, 1148448, 1147653, 1147654, 1151717, 1148300,\n", - " 1137724, 1135087, 1148623, 1147863, 1147866, 1154420, 1158786, 1136247,\n", - " 1146679, 1146686, 1157983, 1139936, 1139941, 1154200, 1153124, 1153193,\n", - " 1153188, 1150932, 1150935, 1152877, 1143092, 1150356, 1148095, 1141016,\n", - " 1147440, 1135307, 1135311, 1151906, 1154183, 1150715, 1148498, 1141420,\n", - " 1152784, 1151352, 1157210, 1147737, 1146969, 1146975, 1156403, 1146623,\n", - " 1151691, 1151694, 1152109, 1146280, 1146287, 1156321, 1156325, 1153030,\n", - " 1153038, 1145539, 1137746, 1146304, 1152608, 1152622, 1140521, 1149203,\n", - " 1155337, 1155349, 1152673, 1152675, 1154633, 1154638, 1151576, 1151617,\n", - " 1151623, 1150588, 1136131, 1148914, 1148916, 1152944, 1144530, 1140929,\n", - " 1145952, 1152224, 1138989, 1143995, 1152341, 1158423, 1153311, 1138276,\n", - " 1138281, 1157147, 1136028, 1136031, 1158704, 1156622, 1151187, 1152928,\n", - " 1152934, 1151067, 1151071, 1153913, 1150164, 1148033, 1148040, 1149300,\n", - " 1155223, 1155231, 1157630, 1149807, 1137048, 1158477, 1148628, 1158530,\n", - " 1137458, 1154569, 1147635, 1139229, 1157547, 1158854, 1150877, 1156500,\n", - " 1156504, 1157064, 1155418, 1151257, 1150465, 1135230, 1135729, 1135730,\n", - " 1135734, 1156638, 1151788, 1150824, 1135634, 1147810, 1151469, 1158306,\n", - " 1158311, 1151271, 1155441, 1150129, 1150130, 1150132, 1154528, 1150490,\n", - " 1142758, 1156207, 1138775, 1151379, 1158624, 1155122, 1157183, 1149321,\n", - " 1149519, 1155746, 1135396, 1145799, 1156463, 1168230, 1157893, 1155628,\n", - " 1156563, 1154555, 1155574, 1136469, 1158824, 1177952, 1148835, 1148647,\n", - " 1155646, 1154240, 1163362, 1154902, 1154909, 1143189, 1143531, 1150371,\n", - " 1153325, 1150068, 1144707, 1155613, 1150987, 1155281, 1143517, 1159618,\n", - " 1159629, 1153776, 1159116, 1145694, 1134674, 1135601, 1135614, 1148149,\n", - " 1158665, 1157684, 1146325, 1149145, 1159258, 1156090, 1156692, 1140380,\n", - " 1156018, 1155881, 1142466, 1164215, 1155975, 1153765, 1156811, 1156812,\n", - " 1161892, 1149705, 1154600, 1136899, 1136905, 1136896, 1158753, 1185567,\n", - " 1158815, 1155246, 1152463, 1151615, 1136480, 1136494, 1136491, 1156664,\n", - " 1156665, 1152129, 1156490, 1136646, 1140049, 1157858, 1147787, 1158558,\n", - " 1153827, 1146126, 1154342, 1150011, 1164276, 1192532, 1142663, 1142666,\n", - " 1156045, 1159042, 1142426, 1157946, 1162044, 1153052, 1162833, 1163072,\n", - " 1163075, 1167698, 1167566, 1166256, 1163706, 1156107, 1138393, 1149063,\n", - " 1145948, 1145945, 1153514, 1153519, 1147307, 1147300, 1138161, 1156795,\n", - " 1156784, 1149952, 1164909, 1139281, 1166935, 1156983, 1156987, 1148771,\n", - " 1171255, 1171257, 1162305, 1158868, 1140650, 1140643, 1148603, 1148607,\n", - " 1143143, 1159646, 1144509, 1151872, 1163019, 1156357, 1156358, 1158653,\n", - " 1159025, 1159026, 1159029, 1159032, 1184734, 1171373, 1165877, 1152247,\n", - " 1143735, 1155588, 1162546, 1151227, 1138674, 1168426, 1148571, 1158405,\n", - " 1168521, 1144989, 1146500, 1146510, 1153247, 1144739, 1144747, 1152776,\n", - " 1155279, 1165415, 1141471, 1141459, 1147426, 1179979, 1156739, 1157955,\n", - " 1171040, 1168750, 1144810, 1144812, 1140112, 1135567, 1142733, 1156293,\n", - " 1156303, 1144057, 1145179, 1148683, 1145228, 1154695, 1155324, 1166462,\n", - " 1147677, 1138953, 1138954, 1142136, 1143025, 1147355, 1170502, 1170612,\n", - " 1152639, 1152624, 1139351, 1147723, 1145902, 1163606, 1152198, 1152203,\n", - " 1181049, 1170389, 1171230, 1158722, 1158734, 1170738, 1147331, 1150783,\n", - " 1149128, 1167817, 1144681, 1149487, 1149483, 1169298, 1155172, 1155170,\n", - " 1150526, 1156117, 1145531, 1154618, 1144336, 1157534, 1138376, 1147746,\n", - " 1154670, 1154893, 1169154, 1157331, 1141051, 1151668, 1150027, 1147495,\n", - " 1158611, 1158060, 1158061, 1158062, 1149847, 1157380, 1157383, 1165903,\n", - " 1171475, 1155502, 1152353, 1152360, 1175687, 1143177, 1169133, 1149398,\n", - " 1148667, 1172838, 1148324, 1148325, 1173307, 1145033, 1169144, 1154027,\n", - " 1153755, 1172791, 1167857, 1169583, 1157153, 1155465, 1147711, 1148131,\n", - " 1169914, 1157592, 1157593, 1170488, 1172961, 1155738, 1155739, 1174418,\n", - " 1168389, 1160979, 1174433, 1177614, 1172606, 1163990, 1182128, 1176452,\n", - " 1150234, 1154148, 1167517, 1184584, 1178889, 1149169, 1149173, 1143279,\n", - " 1169772, 1175620, 1168481, 1143420, 1156559, 1166299, 1184751, 1153803,\n", - " 1178467, 1171122, 1179714, 1171744, 1169387, 1184093, 1182651, 1182476,\n", - " 1158031, 1166554, 1161262, 1155262, 1175260, 1154718, 1157795, 1172034,\n", - " 1177585, 1172546, 1171623, 1179199, 1157132, 1157994, 1177357, 1158249,\n", - " 1158253, 1153898, 1154500, 1178208, 1145624, 1145626, 1156436, 1156437,\n", - " 1154840, 1178769, 1182632, 1157483, 1157487, 1161063, 1146241, 1146252,\n", - " 1181356, 1152274, 1155990, 1158512, 1155892, 1177090, 1162968, 1182786,\n", - " 1168540, 1168886, 1168621, 1164228, 1163422, 1164262, 1154957, 1170806,\n", - " 1156860, 1156861, 1166772, 1170341, 1169335, 1147180, 1156162, 1178246,\n", - " 1188411, 1139828, 1139831, 1139837, 1150265, 1170433, 1156055, 1190316,\n", - " 1180122, 1146394, 1146395, 1173058, 1149544, 1181803, 1193427, 1178523,\n", - " 1169964, 1189189, 1189096, 1140993, 1141006, 1140995, 1189256, 1162156,\n", - " 1151774, 1191859, 1193879, 1159169, 1191242, 1190076, 1191604, 1162502,\n", - " 1169707, 1169700, 1190747, 1191429, 1189662, 1192567, 1193727, 1156676,\n", - " 1174284, 1158064, 1167730, 1186248, 1155959, 1155962, 1186072, 1188280,\n", - " 1188272, 1191488, 1167471, 1182401, 1169398, 1184978, 1157022, 1161940],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197727, 1199833, 1195860, 1195862, 1199281, 1199282, 1198449, 1202255,\n", - " 1198844, 1201577, 1201581, 1194626, 1200649, 1200650, 1197791, 1199248,\n", - " 1199250, 1198624, 1198557, 1194743, 1194770, 1196631, 1194642, 1194648,\n", - " 1195514, 1195263, 1199135, 1201992, 1196030, 1196031, 1195895, 1199171,\n", - " 1195740, 1197858, 1196977, 1198668, 1198034, 1198167, 1198161, 1199823,\n", - " 1195145, 1195148, 1195265, 1195278, 1200765, 1196242, 1196247, 1196109,\n", - " 1194859, 1195850, 1198915, 1195541, 1197474, 1196122, 1195758, 1196283,\n", - " 1199339, 1197291, 1199185, 1197629, 1199628, 1202374, 1199152, 1200751,\n", - " 1199231, 1195017, 1194786, 1194795, 1201511, 1195807, 1201116, 1196727,\n", - " 1198428, 1201547, 1202430, 1197214, 1197021, 1198066, 1201421, 1201156,\n", - " 1201405, 1201054, 1201691, 1201737, 1200553, 1200555, 1197097, 1200690,\n", - " 1196775, 1201442, 1202239, 1199976, 1202707, 1202706, 1198467, 1203329,\n", - " 1202210, 1200391, 1199606, 1198525, 1195664, 1200445, 1198929, 1198911,\n", - " 1195415, 1195181, 1201314, 1197816, 1197406, 1198973, 1203102, 1200221,\n", - " 1197735, 1198819, 1198848, 1201001, 1195066, 1200298, 1197652, 1197335,\n", - " 1195082, 1196552, 1197872], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197727, 1199833, 1195860, 1195862, 1199281, 1199282, 1198449, 1202255,\n", - " 1198844, 1201577, 1201581, 1194626, 1200649, 1200650, 1197791, 1199248,\n", - " 1199250, 1198624, 1198557, 1194743, 1194770, 1196631, 1194642, 1194648,\n", - " 1195514, 1195263, 1199135, 1201992, 1196030, 1196031, 1195895, 1199171,\n", - " 1195740, 1197858, 1196977, 1198668, 1198034, 1198167, 1198161, 1199823,\n", - " 1195145, 1195148, 1195265, 1195278, 1200765, 1196242, 1196247, 1196109,\n", - " 1194859, 1195850, 1198915, 1195541, 1197474, 1196122, 1195758, 1196283,\n", - " 1199339, 1197291, 1199185, 1197629, 1199628, 1202374, 1199152, 1200751,\n", - " 1199231, 1195017, 1194786, 1194795, 1201511, 1195807, 1201116, 1196727,\n", - " 1198428, 1201547, 1202430, 1197214, 1197021, 1198066, 1201421, 1201156,\n", - " 1201405, 1201054, 1201691, 1201737, 1200553, 1200555, 1197097, 1200690,\n", - " 1196775, 1201442, 1202239, 1199976, 1202707, 1202706, 1198467, 1203329,\n", - " 1202210, 1200391, 1199606, 1198525, 1195664, 1200445, 1198929, 1198911,\n", - " 1195415, 1195181, 1201314, 1197816, 1197406, 1198973, 1203102, 1200221,\n", - " 1197735, 1198819, 1198848, 1201001, 1195066, 1200298, 1197652, 1197335,\n", - " 1195082, 1196552, 1197872], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 4.4366e-02, -5.4618e-04, 2.5725e-01, ..., -3.3009e-05,\n", - " -3.1645e-04, -2.3455e-03],\n", - " [ 4.0473e-02, -5.8639e-04, 2.8487e-01, ..., -2.6589e-04,\n", - " -2.1081e-04, -2.7439e-03],\n", - " [ 3.0155e-02, 2.3248e-02, 1.7339e-01, ..., 1.5125e-02,\n", - " -1.6336e-04, -2.5772e-03],\n", - " ...,\n", - " [ 3.0107e-02, -4.9032e-04, 2.5297e-01, ..., -3.4257e-05,\n", - " -3.0870e-04, -2.6933e-03],\n", - " [-3.9694e-05, -2.8949e-04, 2.5678e-01, ..., 2.6113e-02,\n", - " -4.1975e-04, -2.4948e-03],\n", - " [ 4.4702e-02, -6.5625e-04, 2.8865e-01, ..., -1.4950e-04,\n", - " -1.1745e-04, -2.5406e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 1.4148, -0.0228, 1.8688, ..., -0.0039, -0.0087, 1.9058],\n", - " [ 2.6002, -0.0426, 2.8654, ..., -0.0099, -0.0197, 2.8420],\n", - " [ 1.8446, -0.0283, 2.0389, ..., -0.0065, -0.0095, 1.7227],\n", - " ...,\n", - " [ 1.8083, -0.0245, 1.7898, ..., -0.0059, -0.0083, 2.1891],\n", - " [ 2.4086, -0.0439, 1.6764, ..., -0.0134, -0.0089, 1.3453],\n", - " [ 1.4510, -0.0256, 2.0864, ..., -0.0034, -0.0073, 1.8283]],\n", - " device='cuda:0', grad_fn=), 'author': tensor([[ 2.8715e-01, -3.1700e-03, 3.8616e-02, ..., -1.6443e-03,\n", - " -2.7150e-04, 1.0888e-01],\n", - " [ 4.3228e-01, -4.1415e-03, 5.7999e-02, ..., -2.2744e-03,\n", - " 8.3019e-02, 1.9656e-01],\n", - " [ 3.7156e-01, -3.6573e-03, 5.4683e-02, ..., -2.0848e-03,\n", - " 1.9758e-02, 1.2341e-01],\n", - " ...,\n", - " [ 3.9355e-01, -2.7970e-03, 5.2608e-03, ..., -2.4192e-03,\n", - " -1.0386e-03, 6.5049e-02],\n", - " [ 4.6124e-01, -3.9446e-03, 2.1759e-02, ..., -2.3516e-03,\n", - " 1.2272e-02, 2.0323e-01],\n", - " [ 4.0229e-01, -3.8271e-03, 4.4277e-02, ..., -1.9746e-03,\n", - " -2.0978e-04, 1.3170e-01]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-0.0112, 0.3360, -0.0053, ..., 1.4925, -0.0021, -0.0086],\n", - " [-0.0093, 0.1654, -0.0034, ..., 0.9973, -0.0022, -0.0067],\n", - " [-0.0097, 0.1947, -0.0039, ..., 1.1270, -0.0020, -0.0074],\n", - " ...,\n", - " [-0.0104, 0.0772, -0.0045, ..., 1.1264, -0.0029, -0.0067],\n", - " [-0.0070, 0.0281, -0.0038, ..., 0.8162, -0.0027, -0.0064],\n", - " [-0.0104, 0.1985, -0.0044, ..., 1.3034, -0.0029, -0.0079]],\n", - " device='cuda:0', grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 168, 18, 130, 144, 57, 140, 140, 140, 140, 14, 374, 406,\n", - " 476, 476, 476, 231, 876, 876, 511, 511, 641, 778, 367, 367,\n", - " 367, 367, 639, 639, 733, 720, 1023, 1023, 1134, 816, 816, 816,\n", - " 930, 789, 795, 805, 873, 1264, 1228, 1053, 1053, 1053, 942, 1385,\n", - " 1115, 1194, 1603, 1368, 1250, 1276, 1276, 1508, 1508, 1508, 1418, 1418,\n", - " 1418, 1487, 1488, 1515, 1568, 1614, 1614, 1614, 1595, 1570, 1570, 1570,\n", - " 1529, 1529, 1650, 1650, 1650, 1791, 1760, 1807, 1664, 2113, 1868, 1868,\n", - " 1841, 1982, 1982, 1982, 2099, 1983, 1983, 1945, 1945, 1945, 2015, 2097,\n", - " 1869, 1894, 1894, 2008, 1973, 1998, 2005, 2214, 2136, 2151, 2181, 2269,\n", - " 2269, 2368, 2368, 2368, 2465, 2420, 2588, 2623, 2623, 2623, 2623, 2623,\n", - " 2623, 2732, 2732, 2582, 2616, 2688, 2751, 2953, 2929, 2919, 2669, 2669,\n", - " 2669, 2822, 2914, 3014, 3063, 3063, 3134, 3109, 3183, 3170, 3170, 3260,\n", - " 3329, 3412, 3293, 3320, 3320, 3672, 3605, 3731, 3782, 3769, 3769, 4080,\n", - " 4316, 4137, 4174, 4223, 4067, 4260, 4260, 4260, 4339, 4389, 4658, 4602,\n", - " 4725, 4790, 4790, 4790, 5743, 4857, 4863, 5126, 4943, 5018, 4971, 5018,\n", - " 4943, 4904, 5128, 5128, 5175, 5387, 5387, 5387, 5597, 5480, 5403, 5407,\n", - " 5658, 5658, 5473, 5471, 5471, 5687, 5687, 5539, 5539, 5719, 5556, 5770],\n", - " [ 41, 21, 42, 90, 116, 22, 71, 17, 100, 7, 15, 121,\n", - " 5, 117, 72, 55, 1, 5, 5, 42, 28, 10, 44, 30,\n", - " 26, 91, 11, 8, 42, 12, 93, 24, 88, 62, 71, 50,\n", - " 20, 23, 7, 118, 42, 3, 82, 16, 77, 112, 25, 0,\n", - " 5, 18, 25, 5, 54, 71, 64, 57, 83, 96, 60, 108,\n", - " 52, 99, 119, 99, 121, 70, 65, 40, 111, 18, 114, 44,\n", - " 9, 92, 118, 110, 61, 53, 52, 87, 29, 88, 101, 26,\n", - " 55, 36, 78, 89, 84, 35, 12, 5, 73, 25, 25, 26,\n", - " 21, 26, 115, 88, 75, 63, 106, 74, 109, 21, 104, 110,\n", - " 118, 98, 107, 82, 42, 79, 6, 110, 37, 39, 104, 17,\n", - " 113, 81, 111, 22, 99, 59, 52, 68, 110, 64, 76, 69,\n", - " 53, 3, 82, 90, 57, 105, 3, 112, 3, 97, 56, 13,\n", - " 90, 85, 71, 5, 79, 66, 71, 82, 25, 94, 4, 48,\n", - " 71, 58, 52, 80, 71, 95, 122, 71, 25, 90, 86, 2,\n", - " 88, 109, 8, 33, 84, 71, 103, 19, 51, 7, 71, 71,\n", - " 15, 103, 71, 80, 71, 67, 38, 35, 14, 46, 102, 27,\n", - " 71, 120, 31, 43, 71, 71, 34, 71, 49, 47, 32, 45]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 595, 3954, 3055, ..., 3666, 6192, 5609],\n", - " [ 79, 79, 53, ..., 7586, 7670, 7579]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 52, 52, 99, ..., 25, 42, 42],\n", - " [ 90, 58, 112, ..., 5837, 5868, 5911]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 70, 70, 70, ..., 7571, 7571, 7571],\n", - " [ 561, 532, 153, ..., 794, 828, 379]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 73, 171, 650, ..., 171, 389, 213],\n", - " [ 276, 80, 3, ..., 7502, 7515, 7660]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3346, 2834, 2528, ..., 950, 157, 4232],\n", - " [ 0, 139, 134, ..., 5870, 5824, 5668]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 70, 95, 70, ..., 7571, 7571, 7642],\n", - " [ 964, 1964, 2113, ..., 178, 5047, 2715]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 10, 10, 10, ..., 5556, 5556, 5556],\n", - " [3483, 3368, 5375, ..., 2765, 3664, 2340]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005199\n", - "sampling 0.005043\n", - "noi time: 0.000877\n", - "get_vertex_data call: 0.028057\n", - "noi group time: 0.003492\n", - "eoi_group_time: 0.014628\n", - "second half: 0.200426\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 477, 28262, 31145, ..., 1119043, 1117253, 1117256],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 477, 28262, 31145, ..., 1119043, 1117253, 1117256],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210551, 1224370, 1231427, ..., 1934862, 1937007, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210551, 1224370, 1231427, ..., 1934862, 1937007, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1137212, 1141424, 1136237, 1140282, 1136349, 1138553, 1135716,\n", - " 1137784, 1137791, 1140785, 1141756, 1141758, 1138335, 1136223, 1142810,\n", - " 1139462, 1142521, 1136969, 1141448, 1138897, 1151164, 1143615, 1146978,\n", - " 1146983, 1137264, 1143360, 1146644, 1139958, 1148983, 1148987, 1150497,\n", - " 1150509, 1142968, 1139866, 1148576, 1149228, 1142947, 1142958, 1143820,\n", - " 1147473, 1147483, 1135992, 1142881, 1149037, 1149038, 1135119, 1146666,\n", - " 1150193, 1150203, 1146472, 1152666, 1148546, 1153217, 1153220, 1147094,\n", - " 1137220, 1155014, 1155018, 1139364, 1139371, 1147211, 1150329, 1152427,\n", - " 1136268, 1146374, 1140535, 1140540, 1138112, 1154407, 1137254, 1137181,\n", - " 1138356, 1153463, 1140149, 1140159, 1134735, 1135367, 1135202, 1135903,\n", - " 1136037, 1141036, 1134791, 1134794, 1134797, 1137329, 1137684, 1136609,\n", - " 1139204, 1144395, 1135408, 1135413, 1157397, 1137441, 1136204, 1156159,\n", - " 1139153, 1155084, 1138514, 1153099, 1137957, 1135522, 1139875, 1157703,\n", - " 1157702, 1138436, 1138440, 1138457, 1138449, 1137498, 1154784, 1157190,\n", - " 1137932, 1136594, 1149328, 1138846, 1138882, 1156603, 1156606, 1147112,\n", - " 1142611, 1135352, 1135359, 1156141, 1138185, 1158985, 1158987, 1148531,\n", - " 1137109, 1137423, 1139667, 1139673, 1138067, 1134992, 1152648, 1135789,\n", - " 1136734, 1140199, 1158961, 1142909, 1144410, 1153543, 1153544, 1139074,\n", - " 1139929, 1139933, 1137598, 1155660, 1152042, 1152044, 1137734, 1137728,\n", - " 1136993, 1136994, 1138255, 1135549, 1137896, 1141088, 1141097, 1141098,\n", - " 1144138, 1145347, 1145357, 1145358, 1145346, 1156875, 1136392, 1143767,\n", - " 1154860, 1137298, 1139032, 1149979, 1146834, 1135860, 1154466, 1142932,\n", - " 1141224, 1136917, 1143667, 1143679, 1144230, 1141785, 1139495, 1141300,\n", - " 1144650, 1139798, 1138482, 1141810, 1141812, 1141821, 1143153, 1145161,\n", - " 1138477, 1149111, 1137058, 1138717, 1142917, 1142913, 1143107, 1144596,\n", - " 1136867, 1136864, 1144041, 1140885, 1135315, 1140442, 1144182, 1137606,\n", - " 1146194, 1158698, 1138539, 1161701, 1147153, 1142641, 1149193, 1149197,\n", - " 1141365, 1141375, 1138292, 1143917, 1139508, 1139510, 1139769, 1139774,\n", - " 1144998, 1145000, 1145001, 1140983, 1140990, 1147046, 1147050, 1147047,\n", - " 1145873, 1143543, 1152976, 1152982, 1135457, 1139448, 1141925, 1141928,\n", - " 1146898, 1144242, 1140580, 1141841, 1137146, 1166363, 1150700, 1140696,\n", - " 1136891, 1143637, 1137571, 1145983, 1145974, 1143845, 1143851, 1136277,\n", - " 1136275, 1142098, 1146024, 1146140, 1142533, 1141235, 1139990, 1143293,\n", - " 1143294, 1151124, 1147543, 1147540, 1148763, 1147282, 1140348, 1149366,\n", - " 1139417, 1136160, 1136161, 1136836, 1136843, 1144779, 1139048, 1142159,\n", - " 1142146, 1143345, 1144753, 1144619, 1144615, 1145808, 1144088, 1144095,\n", - " 1138000, 1150919, 1146523, 1143957, 1138018, 1143456, 1143467, 1137697,\n", - " 1143937, 1135441, 1140830, 1140829, 1146580, 1149082, 1140364, 1137990,\n", - " 1143080, 1166410, 1148965, 1144219, 1147999, 1144010, 1139252, 1148704,\n", - " 1159719, 1150996, 1141319, 1146742, 1153701, 1152328, 1149725, 1147025,\n", - " 1147259, 1147970, 1145012, 1147188, 1158226, 1147880, 1141137, 1154526,\n", - " 1145750, 1145751, 1148394, 1148397, 1146178, 1150274, 1150445, 1149250,\n", - " 1144526, 1152012, 1151994, 1142304, 1142316, 1151480, 1151487, 1152027,\n", - " 1151041, 1146723, 1134875, 1148693, 1150112, 1147019, 1147021, 1141937,\n", - " 1141194, 1150736, 1141269, 1148744, 1154977, 1154987, 1147653, 1147654,\n", - " 1147650, 1149412, 1146402, 1148288, 1148300, 1152079, 1151412, 1154420,\n", - " 1158790, 1148180, 1151363, 1136247, 1139723, 1146682, 1146683, 1152436,\n", - " 1148729, 1149810, 1151943, 1143981, 1143888, 1148204, 1148110, 1154206,\n", - " 1153124, 1153192, 1153197, 1155540, 1150356, 1143134, 1141014, 1151816,\n", - " 1152578, 1152581, 1151906, 1151918, 1154183, 1154190, 1160681, 1148505,\n", - " 1141420, 1150636, 1155164, 1147737, 1147743, 1145086, 1146969, 1146967,\n", - " 1156402, 1146616, 1146623, 1151399, 1152858, 1152409, 1146280, 1153028,\n", - " 1153030, 1153032, 1153038, 1137746, 1146307, 1152622, 1140521, 1140527,\n", - " 1136401, 1149203, 1152816, 1155337, 1154112, 1157833, 1154633, 1154638,\n", - " 1139578, 1151617, 1150578, 1145278, 1148913, 1148914, 1152950, 1138982,\n", - " 1151306, 1151311, 1152342, 1146816, 1156823, 1156826, 1156816, 1156004,\n", - " 1156007, 1156010, 1156001, 1136028, 1136024, 1152928, 1151064, 1156399,\n", - " 1154733, 1154734, 1142781, 1143480, 1137550, 1160545, 1148033, 1148040,\n", - " 1149300, 1157631, 1149792, 1149794, 1137048, 1177026, 1148628, 1158530,\n", - " 1158540, 1148373, 1137458, 1149940, 1153083, 1142047, 1157459, 1154374,\n", - " 1157229, 1157547, 1148890, 1158916, 1158918, 1158924, 1156505, 1157064,\n", - " 1157069, 1155412, 1152833, 1151256, 1150465, 1142221, 1135730, 1152179,\n", - " 1156935, 1147810, 1139525, 1158308, 1158311, 1151273, 1155441, 1153359,\n", - " 1150136, 1162113, 1142755, 1138775, 1154235, 1151379, 1140188, 1155122,\n", - " 1152527, 1155758, 1151424, 1135398, 1158096, 1168230, 1154763, 1155667,\n", - " 1155626, 1155628, 1169993, 1156563, 1154555, 1158824, 1155646, 1143263,\n", - " 1154240, 1154908, 1143189, 1157430, 1150077, 1157928, 1140749, 1158126,\n", - " 1158578, 1153781, 1153786, 1149911, 1145689, 1140920, 1164307, 1134677,\n", - " 1134674, 1135601, 1135614, 1148153, 1159586, 1155854, 1149145, 1159258,\n", - " 1152209, 1152220, 1156693, 1140381, 1140375, 1156027, 1144843, 1142466,\n", - " 1155975, 1159956, 1161667, 1158846, 1183177, 1156812, 1155402, 1149702,\n", - " 1149700, 1159790, 1159452, 1161305, 1160163, 1136909, 1136896, 1158753,\n", - " 1158760, 1159164, 1158815, 1158285, 1158274, 1151615, 1136491, 1153632,\n", - " 1153635, 1147586, 1147599, 1155301, 1153112, 1153808, 1156281, 1180568,\n", - " 1142178, 1153826, 1153829, 1151146, 1151144, 1165500, 1165497, 1146123,\n", - " 1159943, 1155871, 1158003, 1158007, 1150011, 1155521, 1142493, 1157759,\n", - " 1157751, 1167357, 1156044, 1162683, 1159071, 1151824, 1158300, 1160563,\n", - " 1153052, 1171551, 1155769, 1144158, 1142869, 1142875, 1153841, 1161317,\n", - " 1156107, 1138393, 1142681, 1160646, 1150033, 1150046, 1149063, 1149070,\n", - " 1145948, 1153519, 1147300, 1138161, 1164006, 1149963, 1163873, 1154590,\n", - " 1154578, 1159985, 1146063, 1146356, 1165306, 1158873, 1148600, 1148603,\n", - " 1164979, 1164986, 1143139, 1141792, 1158643, 1158653, 1158655, 1156177,\n", - " 1159025, 1159032, 1159038, 1152247, 1158896, 1158905, 1164623, 1162550,\n", - " 1156576, 1144977, 1144986, 1144989, 1146500, 1146510, 1164580, 1144739,\n", - " 1144747, 1144750, 1141471, 1147427, 1147438, 1156739, 1167372, 1150649,\n", - " 1168748, 1144810, 1144812, 1153268, 1153273, 1135567, 1165714, 1142733,\n", - " 1156293, 1156303, 1166137, 1145732, 1166922, 1145228, 1167751, 1169282,\n", - " 1144973, 1142136, 1143025, 1145447, 1147346, 1139350, 1147723, 1145902,\n", - " 1153534, 1163955, 1181040, 1160845, 1158724, 1158722, 1166670, 1167503,\n", - " 1164397, 1154076, 1167317, 1145674, 1145502, 1169602, 1167817, 1144686,\n", - " 1166653, 1155172, 1150518, 1156119, 1144336, 1157534, 1147746, 1154670,\n", - " 1154893, 1138129, 1138130, 1141043, 1169359, 1149452, 1158623, 1158054,\n", - " 1149846, 1149847, 1157380, 1157384, 1165903, 1147416, 1152353, 1152546,\n", - " 1143858, 1168055, 1149398, 1167016, 1177211, 1177998, 1173307, 1145033,\n", - " 1154027, 1152150, 1157158, 1157153, 1172101, 1147711, 1151850, 1147934,\n", - " 1157593, 1170495, 1135018, 1135021, 1163036, 1155738, 1175216, 1175418,\n", - " 1166028, 1163989, 1169073, 1166682, 1183662, 1150234, 1154151, 1154148,\n", - " 1167531, 1158176, 1149169, 1149173, 1177452, 1184636, 1178619, 1179525,\n", - " 1170290, 1168481, 1143420, 1179243, 1178344, 1171297, 1172313, 1151509,\n", - " 1151519, 1179807, 1161255, 1176527, 1155260, 1155262, 1160206, 1154718,\n", - " 1154713, 1157792, 1157795, 1177275, 1171623, 1155804, 1153890, 1153898,\n", - " 1153899, 1188790, 1161846, 1178216, 1145626, 1172022, 1185115, 1149753,\n", - " 1149755, 1152272, 1163045, 1157761, 1158512, 1167638, 1158379, 1155892,\n", - " 1180856, 1177090, 1140399, 1168277, 1187887, 1187779, 1168889, 1189469,\n", - " 1171644, 1165448, 1161819, 1189603, 1146161, 1180019, 1190101, 1147179,\n", - " 1141507, 1168989, 1170034, 1156528, 1139828, 1139825, 1139831, 1150265,\n", - " 1167135, 1154804, 1149677, 1156055, 1151972, 1193847, 1187358, 1146392,\n", - " 1146394, 1190955, 1194024, 1149544, 1180098, 1172696, 1169963, 1182060,\n", - " 1162156, 1189970, 1153733, 1159180, 1152123, 1162504, 1169707, 1171722,\n", - " 1177845, 1161189, 1178268, 1172424, 1158064, 1158071, 1183552, 1178135,\n", - " 1191445, 1155959, 1187547, 1188313, 1186773, 1191760, 1167471],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1137212, 1141424, 1136237, 1140282, 1136349, 1138553, 1135716,\n", - " 1137784, 1137791, 1140785, 1141756, 1141758, 1138335, 1136223, 1142810,\n", - " 1139462, 1142521, 1136969, 1141448, 1138897, 1151164, 1143615, 1146978,\n", - " 1146983, 1137264, 1143360, 1146644, 1139958, 1148983, 1148987, 1150497,\n", - " 1150509, 1142968, 1139866, 1148576, 1149228, 1142947, 1142958, 1143820,\n", - " 1147473, 1147483, 1135992, 1142881, 1149037, 1149038, 1135119, 1146666,\n", - " 1150193, 1150203, 1146472, 1152666, 1148546, 1153217, 1153220, 1147094,\n", - " 1137220, 1155014, 1155018, 1139364, 1139371, 1147211, 1150329, 1152427,\n", - " 1136268, 1146374, 1140535, 1140540, 1138112, 1154407, 1137254, 1137181,\n", - " 1138356, 1153463, 1140149, 1140159, 1134735, 1135367, 1135202, 1135903,\n", - " 1136037, 1141036, 1134791, 1134794, 1134797, 1137329, 1137684, 1136609,\n", - " 1139204, 1144395, 1135408, 1135413, 1157397, 1137441, 1136204, 1156159,\n", - " 1139153, 1155084, 1138514, 1153099, 1137957, 1135522, 1139875, 1157703,\n", - " 1157702, 1138436, 1138440, 1138457, 1138449, 1137498, 1154784, 1157190,\n", - " 1137932, 1136594, 1149328, 1138846, 1138882, 1156603, 1156606, 1147112,\n", - " 1142611, 1135352, 1135359, 1156141, 1138185, 1158985, 1158987, 1148531,\n", - " 1137109, 1137423, 1139667, 1139673, 1138067, 1134992, 1152648, 1135789,\n", - " 1136734, 1140199, 1158961, 1142909, 1144410, 1153543, 1153544, 1139074,\n", - " 1139929, 1139933, 1137598, 1155660, 1152042, 1152044, 1137734, 1137728,\n", - " 1136993, 1136994, 1138255, 1135549, 1137896, 1141088, 1141097, 1141098,\n", - " 1144138, 1145347, 1145357, 1145358, 1145346, 1156875, 1136392, 1143767,\n", - " 1154860, 1137298, 1139032, 1149979, 1146834, 1135860, 1154466, 1142932,\n", - " 1141224, 1136917, 1143667, 1143679, 1144230, 1141785, 1139495, 1141300,\n", - " 1144650, 1139798, 1138482, 1141810, 1141812, 1141821, 1143153, 1145161,\n", - " 1138477, 1149111, 1137058, 1138717, 1142917, 1142913, 1143107, 1144596,\n", - " 1136867, 1136864, 1144041, 1140885, 1135315, 1140442, 1144182, 1137606,\n", - " 1146194, 1158698, 1138539, 1161701, 1147153, 1142641, 1149193, 1149197,\n", - " 1141365, 1141375, 1138292, 1143917, 1139508, 1139510, 1139769, 1139774,\n", - " 1144998, 1145000, 1145001, 1140983, 1140990, 1147046, 1147050, 1147047,\n", - " 1145873, 1143543, 1152976, 1152982, 1135457, 1139448, 1141925, 1141928,\n", - " 1146898, 1144242, 1140580, 1141841, 1137146, 1166363, 1150700, 1140696,\n", - " 1136891, 1143637, 1137571, 1145983, 1145974, 1143845, 1143851, 1136277,\n", - " 1136275, 1142098, 1146024, 1146140, 1142533, 1141235, 1139990, 1143293,\n", - " 1143294, 1151124, 1147543, 1147540, 1148763, 1147282, 1140348, 1149366,\n", - " 1139417, 1136160, 1136161, 1136836, 1136843, 1144779, 1139048, 1142159,\n", - " 1142146, 1143345, 1144753, 1144619, 1144615, 1145808, 1144088, 1144095,\n", - " 1138000, 1150919, 1146523, 1143957, 1138018, 1143456, 1143467, 1137697,\n", - " 1143937, 1135441, 1140830, 1140829, 1146580, 1149082, 1140364, 1137990,\n", - " 1143080, 1166410, 1148965, 1144219, 1147999, 1144010, 1139252, 1148704,\n", - " 1159719, 1150996, 1141319, 1146742, 1153701, 1152328, 1149725, 1147025,\n", - " 1147259, 1147970, 1145012, 1147188, 1158226, 1147880, 1141137, 1154526,\n", - " 1145750, 1145751, 1148394, 1148397, 1146178, 1150274, 1150445, 1149250,\n", - " 1144526, 1152012, 1151994, 1142304, 1142316, 1151480, 1151487, 1152027,\n", - " 1151041, 1146723, 1134875, 1148693, 1150112, 1147019, 1147021, 1141937,\n", - " 1141194, 1150736, 1141269, 1148744, 1154977, 1154987, 1147653, 1147654,\n", - " 1147650, 1149412, 1146402, 1148288, 1148300, 1152079, 1151412, 1154420,\n", - " 1158790, 1148180, 1151363, 1136247, 1139723, 1146682, 1146683, 1152436,\n", - " 1148729, 1149810, 1151943, 1143981, 1143888, 1148204, 1148110, 1154206,\n", - " 1153124, 1153192, 1153197, 1155540, 1150356, 1143134, 1141014, 1151816,\n", - " 1152578, 1152581, 1151906, 1151918, 1154183, 1154190, 1160681, 1148505,\n", - " 1141420, 1150636, 1155164, 1147737, 1147743, 1145086, 1146969, 1146967,\n", - " 1156402, 1146616, 1146623, 1151399, 1152858, 1152409, 1146280, 1153028,\n", - " 1153030, 1153032, 1153038, 1137746, 1146307, 1152622, 1140521, 1140527,\n", - " 1136401, 1149203, 1152816, 1155337, 1154112, 1157833, 1154633, 1154638,\n", - " 1139578, 1151617, 1150578, 1145278, 1148913, 1148914, 1152950, 1138982,\n", - " 1151306, 1151311, 1152342, 1146816, 1156823, 1156826, 1156816, 1156004,\n", - " 1156007, 1156010, 1156001, 1136028, 1136024, 1152928, 1151064, 1156399,\n", - " 1154733, 1154734, 1142781, 1143480, 1137550, 1160545, 1148033, 1148040,\n", - " 1149300, 1157631, 1149792, 1149794, 1137048, 1177026, 1148628, 1158530,\n", - " 1158540, 1148373, 1137458, 1149940, 1153083, 1142047, 1157459, 1154374,\n", - " 1157229, 1157547, 1148890, 1158916, 1158918, 1158924, 1156505, 1157064,\n", - " 1157069, 1155412, 1152833, 1151256, 1150465, 1142221, 1135730, 1152179,\n", - " 1156935, 1147810, 1139525, 1158308, 1158311, 1151273, 1155441, 1153359,\n", - " 1150136, 1162113, 1142755, 1138775, 1154235, 1151379, 1140188, 1155122,\n", - " 1152527, 1155758, 1151424, 1135398, 1158096, 1168230, 1154763, 1155667,\n", - " 1155626, 1155628, 1169993, 1156563, 1154555, 1158824, 1155646, 1143263,\n", - " 1154240, 1154908, 1143189, 1157430, 1150077, 1157928, 1140749, 1158126,\n", - " 1158578, 1153781, 1153786, 1149911, 1145689, 1140920, 1164307, 1134677,\n", - " 1134674, 1135601, 1135614, 1148153, 1159586, 1155854, 1149145, 1159258,\n", - " 1152209, 1152220, 1156693, 1140381, 1140375, 1156027, 1144843, 1142466,\n", - " 1155975, 1159956, 1161667, 1158846, 1183177, 1156812, 1155402, 1149702,\n", - " 1149700, 1159790, 1159452, 1161305, 1160163, 1136909, 1136896, 1158753,\n", - " 1158760, 1159164, 1158815, 1158285, 1158274, 1151615, 1136491, 1153632,\n", - " 1153635, 1147586, 1147599, 1155301, 1153112, 1153808, 1156281, 1180568,\n", - " 1142178, 1153826, 1153829, 1151146, 1151144, 1165500, 1165497, 1146123,\n", - " 1159943, 1155871, 1158003, 1158007, 1150011, 1155521, 1142493, 1157759,\n", - " 1157751, 1167357, 1156044, 1162683, 1159071, 1151824, 1158300, 1160563,\n", - " 1153052, 1171551, 1155769, 1144158, 1142869, 1142875, 1153841, 1161317,\n", - " 1156107, 1138393, 1142681, 1160646, 1150033, 1150046, 1149063, 1149070,\n", - " 1145948, 1153519, 1147300, 1138161, 1164006, 1149963, 1163873, 1154590,\n", - " 1154578, 1159985, 1146063, 1146356, 1165306, 1158873, 1148600, 1148603,\n", - " 1164979, 1164986, 1143139, 1141792, 1158643, 1158653, 1158655, 1156177,\n", - " 1159025, 1159032, 1159038, 1152247, 1158896, 1158905, 1164623, 1162550,\n", - " 1156576, 1144977, 1144986, 1144989, 1146500, 1146510, 1164580, 1144739,\n", - " 1144747, 1144750, 1141471, 1147427, 1147438, 1156739, 1167372, 1150649,\n", - " 1168748, 1144810, 1144812, 1153268, 1153273, 1135567, 1165714, 1142733,\n", - " 1156293, 1156303, 1166137, 1145732, 1166922, 1145228, 1167751, 1169282,\n", - " 1144973, 1142136, 1143025, 1145447, 1147346, 1139350, 1147723, 1145902,\n", - " 1153534, 1163955, 1181040, 1160845, 1158724, 1158722, 1166670, 1167503,\n", - " 1164397, 1154076, 1167317, 1145674, 1145502, 1169602, 1167817, 1144686,\n", - " 1166653, 1155172, 1150518, 1156119, 1144336, 1157534, 1147746, 1154670,\n", - " 1154893, 1138129, 1138130, 1141043, 1169359, 1149452, 1158623, 1158054,\n", - " 1149846, 1149847, 1157380, 1157384, 1165903, 1147416, 1152353, 1152546,\n", - " 1143858, 1168055, 1149398, 1167016, 1177211, 1177998, 1173307, 1145033,\n", - " 1154027, 1152150, 1157158, 1157153, 1172101, 1147711, 1151850, 1147934,\n", - " 1157593, 1170495, 1135018, 1135021, 1163036, 1155738, 1175216, 1175418,\n", - " 1166028, 1163989, 1169073, 1166682, 1183662, 1150234, 1154151, 1154148,\n", - " 1167531, 1158176, 1149169, 1149173, 1177452, 1184636, 1178619, 1179525,\n", - " 1170290, 1168481, 1143420, 1179243, 1178344, 1171297, 1172313, 1151509,\n", - " 1151519, 1179807, 1161255, 1176527, 1155260, 1155262, 1160206, 1154718,\n", - " 1154713, 1157792, 1157795, 1177275, 1171623, 1155804, 1153890, 1153898,\n", - " 1153899, 1188790, 1161846, 1178216, 1145626, 1172022, 1185115, 1149753,\n", - " 1149755, 1152272, 1163045, 1157761, 1158512, 1167638, 1158379, 1155892,\n", - " 1180856, 1177090, 1140399, 1168277, 1187887, 1187779, 1168889, 1189469,\n", - " 1171644, 1165448, 1161819, 1189603, 1146161, 1180019, 1190101, 1147179,\n", - " 1141507, 1168989, 1170034, 1156528, 1139828, 1139825, 1139831, 1150265,\n", - " 1167135, 1154804, 1149677, 1156055, 1151972, 1193847, 1187358, 1146392,\n", - " 1146394, 1190955, 1194024, 1149544, 1180098, 1172696, 1169963, 1182060,\n", - " 1162156, 1189970, 1153733, 1159180, 1152123, 1162504, 1169707, 1171722,\n", - " 1177845, 1161189, 1178268, 1172424, 1158064, 1158071, 1183552, 1178135,\n", - " 1191445, 1155959, 1187547, 1188313, 1186773, 1191760, 1167471],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197841, 1198769, 1198731, 1202255, 1198844, 1201577, 1199278, 1194635,\n", - " 1197777, 1201016, 1198633, 1196956, 1196871, 1197512, 1194866, 1194743,\n", - " 1194745, 1194783, 1196624, 1196631, 1195511, 1195514, 1195263, 1197924,\n", - " 1199135, 1196534, 1201992, 1196030, 1197697, 1194882, 1194883, 1195888,\n", - " 1195895, 1196359, 1197831, 1199371, 1198666, 1195571, 1199810, 1199823,\n", - " 1195270, 1197141, 1197273, 1196109, 1198209, 1195841, 1198915, 1199377,\n", - " 1195659, 1197474, 1197478, 1197483, 1197640, 1197191, 1199699, 1196393,\n", - " 1198282, 1200949, 1194928, 1197583, 1199628, 1197994, 1199152, 1199572,\n", - " 1199231, 1197601, 1201116, 1201117, 1196727, 1202618, 1198428, 1199421,\n", - " 1199555, 1201547, 1199083, 1200171, 1200503, 1202630, 1202401, 1201056,\n", - " 1200913, 1197097, 1196883, 1199908, 1196779, 1201442, 1202239, 1200831,\n", - " 1200899, 1202669, 1201291, 1199925, 1200242, 1200398, 1196960, 1196963,\n", - " 1202687, 1194996, 1202432, 1198908, 1198911, 1195181, 1197816, 1197822,\n", - " 1198967, 1199659, 1199662, 1203102, 1194730, 1198147, 1197735, 1198819,\n", - " 1201001, 1200466, 1200468, 1201886, 1197335, 1196073, 1197035, 1195165,\n", - " 1194908, 1196424], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197841, 1198769, 1198731, 1202255, 1198844, 1201577, 1199278, 1194635,\n", - " 1197777, 1201016, 1198633, 1196956, 1196871, 1197512, 1194866, 1194743,\n", - " 1194745, 1194783, 1196624, 1196631, 1195511, 1195514, 1195263, 1197924,\n", - " 1199135, 1196534, 1201992, 1196030, 1197697, 1194882, 1194883, 1195888,\n", - " 1195895, 1196359, 1197831, 1199371, 1198666, 1195571, 1199810, 1199823,\n", - " 1195270, 1197141, 1197273, 1196109, 1198209, 1195841, 1198915, 1199377,\n", - " 1195659, 1197474, 1197478, 1197483, 1197640, 1197191, 1199699, 1196393,\n", - " 1198282, 1200949, 1194928, 1197583, 1199628, 1197994, 1199152, 1199572,\n", - " 1199231, 1197601, 1201116, 1201117, 1196727, 1202618, 1198428, 1199421,\n", - " 1199555, 1201547, 1199083, 1200171, 1200503, 1202630, 1202401, 1201056,\n", - " 1200913, 1197097, 1196883, 1199908, 1196779, 1201442, 1202239, 1200831,\n", - " 1200899, 1202669, 1201291, 1199925, 1200242, 1200398, 1196960, 1196963,\n", - " 1202687, 1194996, 1202432, 1198908, 1198911, 1195181, 1197816, 1197822,\n", - " 1198967, 1199659, 1199662, 1203102, 1194730, 1198147, 1197735, 1198819,\n", - " 1201001, 1200466, 1200468, 1201886, 1197335, 1196073, 1197035, 1195165,\n", - " 1194908, 1196424], device='cuda:0', dtype=torch.int32))\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.004248\n", - "sampling 0.003722\n", - "noi time: 0.000728\n", - "get_vertex_data call: 0.046673\n", - "noi group time: 0.003839\n", - "eoi_group_time: 0.01085\n", - "second half: 0.189936\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 18183, 16140, 27122, ..., 1120069, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 18183, 16140, 27122, ..., 1120069, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1203800, 1212294, 1224534, ..., 1929325, 1934170, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1203800, 1212294, 1224534, ..., 1929325, 1934170, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1141424, 1140282, 1136339, 1135926, 1135160, 1135716, 1141758,\n", - " 1138335, 1136215, 1140297, 1142807, 1142525, 1136971, 1138897, 1139811,\n", - " 1146982, 1137947, 1138938, 1143372, 1143363, 1150390, 1150395, 1146647,\n", - " 1150497, 1145281, 1134943, 1155689, 1143820, 1149646, 1141877, 1135989,\n", - " 1142881, 1153938, 1144636, 1144625, 1135262, 1153012, 1153019, 1146472,\n", - " 1152666, 1138347, 1148546, 1147094, 1141904, 1137220, 1139365, 1139373,\n", - " 1147211, 1150322, 1152427, 1134807, 1140304, 1140313, 1151546, 1140537,\n", - " 1140540, 1138112, 1138119, 1138356, 1135906, 1140953, 1135367, 1135202,\n", - " 1135210, 1140758, 1136041, 1134969, 1141036, 1136783, 1134794, 1157443,\n", - " 1136519, 1138504, 1137342, 1143068, 1137685, 1137693, 1136619, 1144395,\n", - " 1157406, 1157397, 1137441, 1156152, 1148481, 1148484, 1139161, 1135579,\n", - " 1142602, 1140704, 1138514, 1153099, 1153100, 1137953, 1137957, 1156899,\n", - " 1135522, 1138305, 1137287, 1139874, 1157703, 1138440, 1138445, 1136534,\n", - " 1138461, 1154785, 1137924, 1136594, 1149328, 1156606, 1147112, 1147119,\n", - " 1142611, 1142616, 1135352, 1135355, 1135631, 1156141, 1158984, 1145843,\n", - " 1148531, 1137109, 1143586, 1136449, 1138067, 1134992, 1148805, 1135789,\n", - " 1158961, 1158974, 1142906, 1159009, 1159011, 1141065, 1153543, 1153544,\n", - " 1143626, 1139085, 1139934, 1138648, 1138148, 1153396, 1146075, 1152044,\n", - " 1140670, 1137734, 1137728, 1147327, 1146222, 1134738, 1135547, 1136697,\n", - " 1141088, 1144130, 1149001, 1139889, 1141979, 1141980, 1143767, 1137297,\n", - " 1143225, 1139033, 1149979, 1146844, 1135860, 1136637, 1141224, 1139386,\n", - " 1163301, 1136917, 1143673, 1137186, 1137188, 1144237, 1146462, 1139495,\n", - " 1136752, 1136753, 1141603, 1134979, 1136854, 1137087, 1137074, 1139798,\n", - " 1138482, 1142050, 1141810, 1145154, 1158749, 1148872, 1138709, 1138717,\n", - " 1138719, 1142913, 1142562, 1143111, 1143113, 1148443, 1148444, 1144596,\n", - " 1142453, 1136867, 1136864, 1145298, 1141392, 1141405, 1144182, 1144179,\n", - " 1150906, 1146202, 1137364, 1137375, 1139559, 1138537, 1140510, 1137854,\n", - " 1137841, 1137844, 1147153, 1141365, 1141367, 1153068, 1141678, 1141664,\n", - " 1149090, 1149093, 1139013, 1138292, 1143917, 1139510, 1139764, 1139127,\n", - " 1144997, 1145000, 1140619, 1164534, 1140976, 1140990, 1141555, 1141565,\n", - " 1147050, 1145872, 1145873, 1152976, 1152977, 1152988, 1141925, 1146905,\n", - " 1144242, 1168730, 1140689, 1139405, 1137570, 1145971, 1145980, 1144073,\n", - " 1143851, 1146003, 1146024, 1146140, 1141646, 1141585, 1141592, 1141234,\n", - " 1141235, 1139990, 1150418, 1147543, 1147545, 1147540, 1147282, 1149155,\n", - " 1149366, 1147375, 1148003, 1146091, 1149608, 1143051, 1143040, 1148408,\n", - " 1136167, 1138927, 1136836, 1139301, 1139329, 1143345, 1144766, 1144767,\n", - " 1144619, 1144081, 1139976, 1135876, 1150755, 1150758, 1144306, 1138024,\n", - " 1143456, 1143467, 1137697, 1142015, 1146590, 1147574, 1140360, 1140364,\n", - " 1143075, 1166410, 1144219, 1147984, 1147995, 1147999, 1134899, 1134902,\n", - " 1144013, 1139252, 1148704, 1141836, 1146742, 1152321, 1152328, 1147025,\n", - " 1147249, 1147196, 1158226, 1150452, 1154526, 1151646, 1145240, 1145751,\n", - " 1142376, 1138638, 1146178, 1151239, 1151242, 1169870, 1150280, 1150285,\n", - " 1150441, 1149263, 1148819, 1154442, 1151856, 1149791, 1144514, 1146887,\n", - " 1150339, 1152013, 1165252, 1147794, 1147796, 1151475, 1151480, 1145256,\n", - " 1145261, 1139915, 1139919, 1146723, 1149588, 1134866, 1140566, 1149534,\n", - " 1150122, 1148273, 1147021, 1147023, 1153959, 1141949, 1148744, 1153578,\n", - " 1147653, 1143560, 1149420, 1149412, 1148294, 1152073, 1135079, 1139088,\n", - " 1154420, 1158792, 1148180, 1136251, 1136247, 1139712, 1146682, 1146686,\n", - " 1157983, 1146549, 1149815, 1150048, 1154166, 1153124, 1153192, 1153197,\n", - " 1145104, 1168626, 1152877, 1150352, 1150356, 1155088, 1143129, 1151810,\n", - " 1151816, 1152581, 1135311, 1151906, 1154183, 1148505, 1148510, 1141420,\n", - " 1150630, 1147602, 1147737, 1148949, 1146969, 1146967, 1156402, 1146623,\n", - " 1144476, 1144472, 1135688, 1152849, 1152409, 1154063, 1152098, 1146287,\n", - " 1153032, 1153038, 1137746, 1146304, 1152622, 1155148, 1149203, 1149207,\n", - " 1155358, 1164760, 1151617, 1150578, 1136134, 1148916, 1148927, 1144529,\n", - " 1145952, 1138991, 1138987, 1152903, 1151311, 1152341, 1158429, 1156826,\n", - " 1146708, 1138279, 1138281, 1156004, 1136028, 1158712, 1158704, 1162192,\n", - " 1152928, 1151071, 1156387, 1142777, 1156422, 1148033, 1148040, 1155202,\n", - " 1149300, 1155223, 1145649, 1145656, 1137048, 1148628, 1148637, 1158530,\n", - " 1158540, 1169177, 1137458, 1157518, 1135708, 1142047, 1154381, 1143448,\n", - " 1157540, 1137872, 1156501, 1156505, 1157064, 1157069, 1155422, 1155418,\n", - " 1146854, 1142221, 1135730, 1152179, 1152182, 1156633, 1156935, 1147812,\n", - " 1147818, 1158311, 1151342, 1155441, 1150136, 1154529, 1145600, 1142755,\n", - " 1156207, 1156258, 1156271, 1151379, 1137918, 1158629, 1155122, 1152527,\n", - " 1157172, 1149324, 1153482, 1155755, 1151432, 1146924, 1158104, 1157894,\n", - " 1155628, 1155629, 1156563, 1155574, 1136469, 1158824, 1158325, 1148640,\n", - " 1155646, 1143263, 1146938, 1154240, 1156711, 1152307, 1154909, 1143189,\n", - " 1143185, 1150371, 1153322, 1151030, 1137152, 1157663, 1157650, 1158123,\n", - " 1158578, 1153786, 1149904, 1137381, 1137387, 1159116, 1138264, 1145682,\n", - " 1145694, 1135601, 1145507, 1148149, 1150671, 1150659, 1155853, 1158664,\n", - " 1149145, 1152220, 1152498, 1140380, 1155884, 1144843, 1155970, 1155971,\n", - " 1155975, 1154682, 1142064, 1158841, 1158846, 1161900, 1149696, 1154600,\n", - " 1136909, 1136896, 1158753, 1158881, 1158891, 1140218, 1159164, 1158815,\n", - " 1158285, 1136494, 1155305, 1156488, 1153808, 1134757, 1183285, 1142178,\n", - " 1158545, 1158558, 1153834, 1151146, 1146123, 1146126, 1155871, 1144581,\n", - " 1144584, 1158260, 1150011, 1155529, 1142487, 1164276, 1142665, 1150684,\n", - " 1159042, 1159052, 1159065, 1159070, 1159137, 1153052, 1153045, 1156235,\n", - " 1156101, 1138393, 1150035, 1159475, 1149070, 1145948, 1155480, 1153514,\n", - " 1153519, 1147300, 1171994, 1138161, 1164006, 1156787, 1156795, 1149956,\n", - " 1154590, 1139586, 1139290, 1156983, 1157236, 1140731, 1157351, 1146063,\n", - " 1163455, 1158868, 1140643, 1148603, 1143143, 1144504, 1155810, 1156361,\n", - " 1156367, 1141800, 1156187, 1159025, 1159029, 1159032, 1159038, 1152247,\n", - " 1143729, 1155588, 1155598, 1158405, 1146500, 1146509, 1169263, 1144739,\n", - " 1144750, 1152776, 1155046, 1155267, 1160664, 1165422, 1141471, 1151650,\n", - " 1147426, 1147427, 1165867, 1156737, 1156739, 1156741, 1150646, 1144812,\n", - " 1162085, 1135567, 1164750, 1142722, 1161758, 1145743, 1148683, 1145567,\n", - " 1145228, 1145229, 1169282, 1154700, 1166454, 1166462, 1150531, 1142129,\n", - " 1146444, 1165746, 1170949, 1152624, 1139350, 1139351, 1145902, 1181049,\n", - " 1175240, 1143395, 1143402, 1143407, 1171219, 1167503, 1171279, 1154070,\n", - " 1154076, 1147331, 1147338, 1150773, 1145502, 1149130, 1154917, 1167817,\n", - " 1155172, 1155183, 1154212, 1150518, 1156113, 1145531, 1144346, 1144336,\n", - " 1157534, 1138376, 1138378, 1138383, 1154670, 1135854, 1157331, 1141051,\n", - " 1141043, 1151668, 1169359, 1154364, 1172744, 1149452, 1158146, 1149688,\n", - " 1158623, 1158062, 1173047, 1149846, 1157383, 1165899, 1160540, 1152353,\n", - " 1166594, 1168369, 1168371, 1188547, 1148667, 1172838, 1148325, 1169049,\n", - " 1173392, 1173307, 1145033, 1189239, 1160936, 1154027, 1152152, 1159658,\n", - " 1159655, 1169578, 1157158, 1157153, 1157373, 1167232, 1147711, 1151850,\n", - " 1148128, 1148131, 1145783, 1157593, 1167717, 1163027, 1155739, 1167892,\n", - " 1182093, 1140326, 1168340, 1171604, 1166682, 1166680, 1183661, 1154148,\n", - " 1149169, 1149173, 1177440, 1170473, 1170380, 1167657, 1156557, 1181246,\n", - " 1169628, 1181582, 1183024, 1173957, 1161025, 1161031, 1151509, 1179807,\n", - " 1158029, 1155260, 1176675, 1171773, 1157792, 1157795, 1182812, 1171623,\n", - " 1164034, 1155799, 1174958, 1157992, 1171738, 1183106, 1153889, 1153898,\n", - " 1153899, 1164564, 1145626, 1172024, 1154840, 1180383, 1178757, 1149755,\n", - " 1146252, 1153609, 1153605, 1183215, 1155990, 1158940, 1155890, 1155899,\n", - " 1157272, 1182797, 1159872, 1140395, 1166984, 1170597, 1185394, 1169064,\n", - " 1168886, 1179090, 1182337, 1163422, 1192897, 1154944, 1161819, 1172623,\n", - " 1186893, 1159529, 1139828, 1139831, 1150265, 1154812, 1151288, 1156055,\n", - " 1191984, 1188873, 1146386, 1146392, 1146389, 1146395, 1190958, 1173061,\n", - " 1149536, 1188421, 1178523, 1169964, 1181951, 1194472, 1140993, 1193012,\n", - " 1194221, 1167840, 1151774, 1190452, 1171458, 1182226, 1171201, 1170128,\n", - " 1194059, 1172423, 1158071, 1178135, 1155959, 1155962, 1178301, 1192351,\n", - " 1187339, 1182769, 1189798, 1184941, 1186149, 1157022, 1161940],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1141424, 1140282, 1136339, 1135926, 1135160, 1135716, 1141758,\n", - " 1138335, 1136215, 1140297, 1142807, 1142525, 1136971, 1138897, 1139811,\n", - " 1146982, 1137947, 1138938, 1143372, 1143363, 1150390, 1150395, 1146647,\n", - " 1150497, 1145281, 1134943, 1155689, 1143820, 1149646, 1141877, 1135989,\n", - " 1142881, 1153938, 1144636, 1144625, 1135262, 1153012, 1153019, 1146472,\n", - " 1152666, 1138347, 1148546, 1147094, 1141904, 1137220, 1139365, 1139373,\n", - " 1147211, 1150322, 1152427, 1134807, 1140304, 1140313, 1151546, 1140537,\n", - " 1140540, 1138112, 1138119, 1138356, 1135906, 1140953, 1135367, 1135202,\n", - " 1135210, 1140758, 1136041, 1134969, 1141036, 1136783, 1134794, 1157443,\n", - " 1136519, 1138504, 1137342, 1143068, 1137685, 1137693, 1136619, 1144395,\n", - " 1157406, 1157397, 1137441, 1156152, 1148481, 1148484, 1139161, 1135579,\n", - " 1142602, 1140704, 1138514, 1153099, 1153100, 1137953, 1137957, 1156899,\n", - " 1135522, 1138305, 1137287, 1139874, 1157703, 1138440, 1138445, 1136534,\n", - " 1138461, 1154785, 1137924, 1136594, 1149328, 1156606, 1147112, 1147119,\n", - " 1142611, 1142616, 1135352, 1135355, 1135631, 1156141, 1158984, 1145843,\n", - " 1148531, 1137109, 1143586, 1136449, 1138067, 1134992, 1148805, 1135789,\n", - " 1158961, 1158974, 1142906, 1159009, 1159011, 1141065, 1153543, 1153544,\n", - " 1143626, 1139085, 1139934, 1138648, 1138148, 1153396, 1146075, 1152044,\n", - " 1140670, 1137734, 1137728, 1147327, 1146222, 1134738, 1135547, 1136697,\n", - " 1141088, 1144130, 1149001, 1139889, 1141979, 1141980, 1143767, 1137297,\n", - " 1143225, 1139033, 1149979, 1146844, 1135860, 1136637, 1141224, 1139386,\n", - " 1163301, 1136917, 1143673, 1137186, 1137188, 1144237, 1146462, 1139495,\n", - " 1136752, 1136753, 1141603, 1134979, 1136854, 1137087, 1137074, 1139798,\n", - " 1138482, 1142050, 1141810, 1145154, 1158749, 1148872, 1138709, 1138717,\n", - " 1138719, 1142913, 1142562, 1143111, 1143113, 1148443, 1148444, 1144596,\n", - " 1142453, 1136867, 1136864, 1145298, 1141392, 1141405, 1144182, 1144179,\n", - " 1150906, 1146202, 1137364, 1137375, 1139559, 1138537, 1140510, 1137854,\n", - " 1137841, 1137844, 1147153, 1141365, 1141367, 1153068, 1141678, 1141664,\n", - " 1149090, 1149093, 1139013, 1138292, 1143917, 1139510, 1139764, 1139127,\n", - " 1144997, 1145000, 1140619, 1164534, 1140976, 1140990, 1141555, 1141565,\n", - " 1147050, 1145872, 1145873, 1152976, 1152977, 1152988, 1141925, 1146905,\n", - " 1144242, 1168730, 1140689, 1139405, 1137570, 1145971, 1145980, 1144073,\n", - " 1143851, 1146003, 1146024, 1146140, 1141646, 1141585, 1141592, 1141234,\n", - " 1141235, 1139990, 1150418, 1147543, 1147545, 1147540, 1147282, 1149155,\n", - " 1149366, 1147375, 1148003, 1146091, 1149608, 1143051, 1143040, 1148408,\n", - " 1136167, 1138927, 1136836, 1139301, 1139329, 1143345, 1144766, 1144767,\n", - " 1144619, 1144081, 1139976, 1135876, 1150755, 1150758, 1144306, 1138024,\n", - " 1143456, 1143467, 1137697, 1142015, 1146590, 1147574, 1140360, 1140364,\n", - " 1143075, 1166410, 1144219, 1147984, 1147995, 1147999, 1134899, 1134902,\n", - " 1144013, 1139252, 1148704, 1141836, 1146742, 1152321, 1152328, 1147025,\n", - " 1147249, 1147196, 1158226, 1150452, 1154526, 1151646, 1145240, 1145751,\n", - " 1142376, 1138638, 1146178, 1151239, 1151242, 1169870, 1150280, 1150285,\n", - " 1150441, 1149263, 1148819, 1154442, 1151856, 1149791, 1144514, 1146887,\n", - " 1150339, 1152013, 1165252, 1147794, 1147796, 1151475, 1151480, 1145256,\n", - " 1145261, 1139915, 1139919, 1146723, 1149588, 1134866, 1140566, 1149534,\n", - " 1150122, 1148273, 1147021, 1147023, 1153959, 1141949, 1148744, 1153578,\n", - " 1147653, 1143560, 1149420, 1149412, 1148294, 1152073, 1135079, 1139088,\n", - " 1154420, 1158792, 1148180, 1136251, 1136247, 1139712, 1146682, 1146686,\n", - " 1157983, 1146549, 1149815, 1150048, 1154166, 1153124, 1153192, 1153197,\n", - " 1145104, 1168626, 1152877, 1150352, 1150356, 1155088, 1143129, 1151810,\n", - " 1151816, 1152581, 1135311, 1151906, 1154183, 1148505, 1148510, 1141420,\n", - " 1150630, 1147602, 1147737, 1148949, 1146969, 1146967, 1156402, 1146623,\n", - " 1144476, 1144472, 1135688, 1152849, 1152409, 1154063, 1152098, 1146287,\n", - " 1153032, 1153038, 1137746, 1146304, 1152622, 1155148, 1149203, 1149207,\n", - " 1155358, 1164760, 1151617, 1150578, 1136134, 1148916, 1148927, 1144529,\n", - " 1145952, 1138991, 1138987, 1152903, 1151311, 1152341, 1158429, 1156826,\n", - " 1146708, 1138279, 1138281, 1156004, 1136028, 1158712, 1158704, 1162192,\n", - " 1152928, 1151071, 1156387, 1142777, 1156422, 1148033, 1148040, 1155202,\n", - " 1149300, 1155223, 1145649, 1145656, 1137048, 1148628, 1148637, 1158530,\n", - " 1158540, 1169177, 1137458, 1157518, 1135708, 1142047, 1154381, 1143448,\n", - " 1157540, 1137872, 1156501, 1156505, 1157064, 1157069, 1155422, 1155418,\n", - " 1146854, 1142221, 1135730, 1152179, 1152182, 1156633, 1156935, 1147812,\n", - " 1147818, 1158311, 1151342, 1155441, 1150136, 1154529, 1145600, 1142755,\n", - " 1156207, 1156258, 1156271, 1151379, 1137918, 1158629, 1155122, 1152527,\n", - " 1157172, 1149324, 1153482, 1155755, 1151432, 1146924, 1158104, 1157894,\n", - " 1155628, 1155629, 1156563, 1155574, 1136469, 1158824, 1158325, 1148640,\n", - " 1155646, 1143263, 1146938, 1154240, 1156711, 1152307, 1154909, 1143189,\n", - " 1143185, 1150371, 1153322, 1151030, 1137152, 1157663, 1157650, 1158123,\n", - " 1158578, 1153786, 1149904, 1137381, 1137387, 1159116, 1138264, 1145682,\n", - " 1145694, 1135601, 1145507, 1148149, 1150671, 1150659, 1155853, 1158664,\n", - " 1149145, 1152220, 1152498, 1140380, 1155884, 1144843, 1155970, 1155971,\n", - " 1155975, 1154682, 1142064, 1158841, 1158846, 1161900, 1149696, 1154600,\n", - " 1136909, 1136896, 1158753, 1158881, 1158891, 1140218, 1159164, 1158815,\n", - " 1158285, 1136494, 1155305, 1156488, 1153808, 1134757, 1183285, 1142178,\n", - " 1158545, 1158558, 1153834, 1151146, 1146123, 1146126, 1155871, 1144581,\n", - " 1144584, 1158260, 1150011, 1155529, 1142487, 1164276, 1142665, 1150684,\n", - " 1159042, 1159052, 1159065, 1159070, 1159137, 1153052, 1153045, 1156235,\n", - " 1156101, 1138393, 1150035, 1159475, 1149070, 1145948, 1155480, 1153514,\n", - " 1153519, 1147300, 1171994, 1138161, 1164006, 1156787, 1156795, 1149956,\n", - " 1154590, 1139586, 1139290, 1156983, 1157236, 1140731, 1157351, 1146063,\n", - " 1163455, 1158868, 1140643, 1148603, 1143143, 1144504, 1155810, 1156361,\n", - " 1156367, 1141800, 1156187, 1159025, 1159029, 1159032, 1159038, 1152247,\n", - " 1143729, 1155588, 1155598, 1158405, 1146500, 1146509, 1169263, 1144739,\n", - " 1144750, 1152776, 1155046, 1155267, 1160664, 1165422, 1141471, 1151650,\n", - " 1147426, 1147427, 1165867, 1156737, 1156739, 1156741, 1150646, 1144812,\n", - " 1162085, 1135567, 1164750, 1142722, 1161758, 1145743, 1148683, 1145567,\n", - " 1145228, 1145229, 1169282, 1154700, 1166454, 1166462, 1150531, 1142129,\n", - " 1146444, 1165746, 1170949, 1152624, 1139350, 1139351, 1145902, 1181049,\n", - " 1175240, 1143395, 1143402, 1143407, 1171219, 1167503, 1171279, 1154070,\n", - " 1154076, 1147331, 1147338, 1150773, 1145502, 1149130, 1154917, 1167817,\n", - " 1155172, 1155183, 1154212, 1150518, 1156113, 1145531, 1144346, 1144336,\n", - " 1157534, 1138376, 1138378, 1138383, 1154670, 1135854, 1157331, 1141051,\n", - " 1141043, 1151668, 1169359, 1154364, 1172744, 1149452, 1158146, 1149688,\n", - " 1158623, 1158062, 1173047, 1149846, 1157383, 1165899, 1160540, 1152353,\n", - " 1166594, 1168369, 1168371, 1188547, 1148667, 1172838, 1148325, 1169049,\n", - " 1173392, 1173307, 1145033, 1189239, 1160936, 1154027, 1152152, 1159658,\n", - " 1159655, 1169578, 1157158, 1157153, 1157373, 1167232, 1147711, 1151850,\n", - " 1148128, 1148131, 1145783, 1157593, 1167717, 1163027, 1155739, 1167892,\n", - " 1182093, 1140326, 1168340, 1171604, 1166682, 1166680, 1183661, 1154148,\n", - " 1149169, 1149173, 1177440, 1170473, 1170380, 1167657, 1156557, 1181246,\n", - " 1169628, 1181582, 1183024, 1173957, 1161025, 1161031, 1151509, 1179807,\n", - " 1158029, 1155260, 1176675, 1171773, 1157792, 1157795, 1182812, 1171623,\n", - " 1164034, 1155799, 1174958, 1157992, 1171738, 1183106, 1153889, 1153898,\n", - " 1153899, 1164564, 1145626, 1172024, 1154840, 1180383, 1178757, 1149755,\n", - " 1146252, 1153609, 1153605, 1183215, 1155990, 1158940, 1155890, 1155899,\n", - " 1157272, 1182797, 1159872, 1140395, 1166984, 1170597, 1185394, 1169064,\n", - " 1168886, 1179090, 1182337, 1163422, 1192897, 1154944, 1161819, 1172623,\n", - " 1186893, 1159529, 1139828, 1139831, 1150265, 1154812, 1151288, 1156055,\n", - " 1191984, 1188873, 1146386, 1146392, 1146389, 1146395, 1190958, 1173061,\n", - " 1149536, 1188421, 1178523, 1169964, 1181951, 1194472, 1140993, 1193012,\n", - " 1194221, 1167840, 1151774, 1190452, 1171458, 1182226, 1171201, 1170128,\n", - " 1194059, 1172423, 1158071, 1178135, 1155959, 1155962, 1178301, 1192351,\n", - " 1187339, 1182769, 1189798, 1184941, 1186149, 1157022, 1161940],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1195393, 1195394, 1198248, 1197719, 1199835, 1195860, 1199281,\n", - " 1199282, 1198459, 1202255, 1201577, 1201016, 1197359, 1198694, 1196871,\n", - " 1202804, 1194783, 1196631, 1194648, 1195514, 1195263, 1198543, 1194956,\n", - " 1195888, 1195895, 1202902, 1199171, 1196977, 1196979, 1196610, 1196840,\n", - " 1195980, 1195982, 1196704, 1199810, 1195278, 1197140, 1197367, 1196109,\n", - " 1195038, 1195039, 1202916, 1196311, 1202017, 1202021, 1195626, 1195918,\n", - " 1196283, 1195351, 1198280, 1200959, 1194928, 1200869, 1199154, 1198410,\n", - " 1199579, 1199231, 1201916, 1201511, 1196496, 1196508, 1197601, 1196727,\n", - " 1202618, 1198416, 1198428, 1198800, 1199555, 1201547, 1200612, 1201827,\n", - " 1198066, 1196477, 1201155, 1201156, 1201061, 1199539, 1201737, 1200526,\n", - " 1200551, 1200429, 1200861, 1196885, 1201442, 1202239, 1200899, 1201291,\n", - " 1195607, 1202308, 1196966, 1200784, 1202759, 1197334, 1198929, 1200684,\n", - " 1195181, 1197059, 1202269, 1199661, 1203102, 1197735, 1201981, 1202690,\n", - " 1203080, 1195066, 1200707, 1197335, 1201361, 1197035, 1197026, 1201966],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1195393, 1195394, 1198248, 1197719, 1199835, 1195860, 1199281,\n", - " 1199282, 1198459, 1202255, 1201577, 1201016, 1197359, 1198694, 1196871,\n", - " 1202804, 1194783, 1196631, 1194648, 1195514, 1195263, 1198543, 1194956,\n", - " 1195888, 1195895, 1202902, 1199171, 1196977, 1196979, 1196610, 1196840,\n", - " 1195980, 1195982, 1196704, 1199810, 1195278, 1197140, 1197367, 1196109,\n", - " 1195038, 1195039, 1202916, 1196311, 1202017, 1202021, 1195626, 1195918,\n", - " 1196283, 1195351, 1198280, 1200959, 1194928, 1200869, 1199154, 1198410,\n", - " 1199579, 1199231, 1201916, 1201511, 1196496, 1196508, 1197601, 1196727,\n", - " 1202618, 1198416, 1198428, 1198800, 1199555, 1201547, 1200612, 1201827,\n", - " 1198066, 1196477, 1201155, 1201156, 1201061, 1199539, 1201737, 1200526,\n", - " 1200551, 1200429, 1200861, 1196885, 1201442, 1202239, 1200899, 1201291,\n", - " 1195607, 1202308, 1196966, 1200784, 1202759, 1197334, 1198929, 1200684,\n", - " 1195181, 1197059, 1202269, 1199661, 1203102, 1197735, 1201981, 1202690,\n", - " 1203080, 1195066, 1200707, 1197335, 1201361, 1197035, 1197026, 1201966],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.8391e-02, -3.0335e-04, 2.7316e-01, ..., 1.0430e-02,\n", - " -3.8816e-04, -2.6469e-03],\n", - " [ 5.3786e-02, -7.9378e-04, 3.5755e-01, ..., -3.3261e-04,\n", - " -1.2166e-05, -3.1368e-03],\n", - " [ 6.1156e-02, -9.3814e-04, 3.2760e-01, ..., -3.9780e-04,\n", - " -3.3895e-05, -3.0046e-03],\n", - " ...,\n", - " [ 4.6351e-02, -5.9555e-04, 3.0273e-01, ..., -9.9217e-05,\n", - " -2.3361e-04, -2.7616e-03],\n", - " [-3.7055e-05, -2.2998e-04, 3.1103e-01, ..., 2.4722e-02,\n", - " -2.8910e-04, -2.7834e-03],\n", - " [ 3.7688e-02, -1.3466e-04, 2.6784e-01, ..., 4.6762e-03,\n", - " 4.0593e-03, -2.4623e-03]], device='cuda:0'), 'paper': tensor([[ 2.3793, -0.0328, 2.3625, ..., -0.0089, -0.0164, 3.0530],\n", - " [ 2.6872, -0.0368, 2.5031, ..., -0.0122, -0.0167, 2.8099],\n", - " [ 3.8502, -0.0621, 1.8482, ..., -0.0200, -0.0178, 3.2267],\n", - " ...,\n", - " [ 2.7099, -0.0370, 2.1851, ..., -0.0084, -0.0145, 2.8245],\n", - " [ 3.1252, -0.0451, 2.6791, ..., -0.0138, -0.0174, 3.0691],\n", - " [ 2.4529, -0.0365, 2.6216, ..., -0.0082, -0.0157, 3.0391]],\n", - " device='cuda:0'), 'author': tensor([[ 4.0065e-01, -4.8034e-03, 3.9267e-02, ..., -4.2049e-03,\n", - " -2.2280e-03, 1.4834e-01],\n", - " [ 5.2777e-01, -6.0578e-03, 6.5219e-04, ..., -2.2260e-03,\n", - " -7.4624e-05, 2.2126e-01],\n", - " [ 4.7709e-01, -4.5726e-03, -9.3033e-04, ..., -1.6786e-03,\n", - " -1.7984e-04, 2.1362e-01],\n", - " ...,\n", - " [ 4.5166e-01, -5.1206e-03, -5.0519e-04, ..., -1.8051e-03,\n", - " 8.6272e-02, 1.9335e-01],\n", - " [ 4.5091e-01, -5.3768e-03, -3.2818e-04, ..., -1.7149e-03,\n", - " 2.2450e-02, 1.9649e-01],\n", - " [ 5.5978e-01, -5.5210e-03, -2.2569e-04, ..., -2.6323e-03,\n", - " 4.4696e-02, 1.7861e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0104, 0.1315, -0.0032, ..., 0.8812, -0.0022, -0.0051],\n", - " [-0.0109, 0.1704, -0.0040, ..., 1.1415, -0.0021, -0.0068],\n", - " [-0.0081, 0.0220, -0.0038, ..., 0.8214, -0.0018, -0.0056],\n", - " ...,\n", - " [-0.0117, 0.2390, -0.0053, ..., 1.4594, -0.0032, -0.0083],\n", - " [-0.0118, 0.1633, -0.0047, ..., 1.3796, -0.0030, -0.0073],\n", - " [-0.0092, 0.2365, -0.0027, ..., 1.2333, -0.0034, -0.0089]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 111, 82, 75, 150, 144, 144, 291, 363, 292, 292, 245, 521,\n", - " 397, 286, 270, 522, 686, 252, 619, 470, 484, 484, 484, 819,\n", - " 723, 655, 655, 860, 927, 675, 675, 981, 955, 858, 1119, 1002,\n", - " 1097, 1131, 1131, 1131, 1114, 974, 1057, 1131, 1178, 1366, 1183, 1546,\n", - " 1342, 1539, 1528, 1271, 1251, 1338, 1481, 1431, 1431, 1591, 1591, 1580,\n", - " 1580, 1614, 1692, 1614, 1605, 1605, 1826, 1826, 1885, 2069, 2069, 1939,\n", - " 2042, 2007, 2028, 2050, 2200, 2121, 2135, 2135, 2300, 2391, 2259, 2665,\n", - " 2354, 2447, 2447, 2447, 2374, 2590, 2516, 2516, 2488, 2478, 2515, 2549,\n", - " 2843, 2719, 2846, 2689, 2726, 2835, 2835, 2783, 2737, 2649, 2878, 3029,\n", - " 2963, 3017, 3056, 2871, 2871, 3086, 3097, 3311, 3300, 3325, 3195, 3407,\n", - " 3393, 3386, 3367, 3404, 3424, 3559, 3491, 3521, 3521, 3561, 3599, 3655,\n", - " 3636, 3636, 3636, 3892, 3892, 3830, 3851, 3851, 3886, 3886, 3886, 4004,\n", - " 3886, 4145, 4006, 3941, 4108, 4049, 4065, 3996, 4179, 4265, 4424, 4411,\n", - " 4467, 4467, 4349, 4468, 4828, 4828, 4828, 4705, 4705, 4658, 4413, 4413,\n", - " 4413, 4413, 4413, 4413, 4710, 4890, 4890, 4945, 4945, 4921, 4811, 4928,\n", - " 5228, 5125, 5244, 4981, 4981, 4981, 5086, 5149, 5149, 5220],\n", - " [ 9, 61, 74, 20, 3, 90, 83, 57, 43, 111, 51, 95,\n", - " 85, 0, 55, 0, 55, 59, 86, 53, 91, 46, 5, 57,\n", - " 32, 26, 110, 52, 7, 99, 80, 8, 33, 89, 12, 59,\n", - " 108, 54, 100, 8, 98, 4, 2, 72, 70, 68, 66, 56,\n", - " 0, 25, 104, 38, 70, 102, 86, 29, 40, 92, 59, 107,\n", - " 70, 31, 74, 88, 70, 35, 76, 27, 84, 27, 76, 83,\n", - " 106, 0, 77, 85, 83, 27, 62, 57, 97, 24, 97, 0,\n", - " 32, 49, 66, 96, 81, 71, 70, 21, 62, 108, 93, 27,\n", - " 27, 27, 27, 70, 101, 41, 0, 27, 27, 99, 4, 17,\n", - " 4, 57, 14, 21, 106, 103, 12, 42, 13, 10, 23, 48,\n", - " 26, 30, 105, 22, 110, 82, 106, 26, 110, 105, 59, 59,\n", - " 64, 34, 8, 36, 39, 109, 94, 59, 1, 63, 19, 67,\n", - " 16, 73, 21, 3, 99, 67, 87, 12, 78, 6, 78, 95,\n", - " 32, 106, 3, 78, 63, 28, 60, 90, 27, 10, 45, 79,\n", - " 106, 58, 13, 69, 65, 75, 47, 26, 110, 15, 22, 48,\n", - " 37, 15, 0, 8, 11, 44, 94, 18, 63, 50]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[4078, 3119, 610, ..., 5839, 1915, 5839],\n", - " [ 79, 64, 182, ..., 7991, 7936, 7980]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 93, 110, 97, ..., 61, 105, 57],\n", - " [ 30, 92, 185, ..., 5211, 5193, 5243]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 64, 64, 64, ..., 7962, 7962, 7962],\n", - " [ 877, 82, 426, ..., 658, 392, 314]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 225, 314, 314, ..., 883, 882, 881],\n", - " [ 16, 325, 454, ..., 8004, 7804, 8054]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2552, 4426, 1258, ..., 6147, 4323, 7877],\n", - " [ 19, 50, 167, ..., 5217, 5241, 5209]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 64, 64, 147, ..., 7962, 7962, 7962],\n", - " [2857, 3119, 3000, ..., 5168, 3426, 7361]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 55, 55, 55, ..., 5149, 5149, 5149],\n", - " [6873, 41, 5850, ..., 6804, 7242, 6947]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006692\n", - "sampling 0.006526\n", - "noi time: 0.000672\n", - "get_vertex_data call: 0.025537\n", - "noi group time: 0.003375\n", - "eoi_group_time: 0.016328\n", - "second half: 0.2185\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 17525, 21471, ..., 1103850, 1120069, 1110064],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 17525, 21471, ..., 1103850, 1120069, 1110064],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1221603, 1209334, 1203800, ..., 1937139, 1927254, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1221603, 1209334, 1203800, ..., 1937139, 1927254, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137435, 1141424, 1140282, 1135165, 1135160, 1135716, 1140793, 1141758,\n", - " 1136208, 1136215, 1136971, 1138897, 1149834, 1149839, 1139820, 1139811,\n", - " 1145984, 1145989, 1145992, 1137268, 1138938, 1138942, 1143372, 1150507,\n", - " 1149216, 1142958, 1149633, 1147473, 1142881, 1146995, 1153012, 1148343,\n", - " 1148346, 1135481, 1152664, 1137220, 1139373, 1147202, 1136685, 1150329,\n", - " 1150333, 1140308, 1140537, 1140540, 1140542, 1138112, 1137171, 1137172,\n", - " 1137181, 1151520, 1140159, 1140953, 1135367, 1135202, 1135903, 1141036,\n", - " 1134794, 1157443, 1137329, 1137342, 1136178, 1143064, 1137691, 1137693,\n", - " 1137534, 1135408, 1136662, 1137441, 1136193, 1135275, 1156159, 1148483,\n", - " 1139161, 1134841, 1135579, 1135581, 1135583, 1140712, 1156342, 1153094,\n", - " 1153099, 1154132, 1156899, 1156909, 1135522, 1138436, 1138440, 1138445,\n", - " 1140079, 1136534, 1138461, 1138449, 1138462, 1137924, 1158390, 1138832,\n", - " 1138844, 1138846, 1135088, 1138882, 1156606, 1147112, 1135025, 1135618,\n", - " 1156137, 1158984, 1148531, 1137423, 1135769, 1141532, 1139667, 1139673,\n", - " 1138070, 1138069, 1134992, 1142434, 1136551, 1152654, 1139757, 1136728,\n", - " 1140199, 1159019, 1141058, 1143626, 1143625, 1139085, 1137587, 1137595,\n", - " 1146075, 1152044, 1137734, 1137728, 1138240, 1141088, 1141094, 1149001,\n", - " 1139898, 1139889, 1143767, 1137297, 1143703, 1143224, 1143225, 1159676,\n", - " 1140009, 1136625, 1141224, 1139386, 1141657, 1163301, 1136917, 1139728,\n", - " 1143677, 1143679, 1144237, 1141159, 1139495, 1136760, 1141302, 1144650,\n", - " 1134987, 1136851, 1137072, 1137074, 1138482, 1142050, 1165100, 1158746,\n", - " 1158749, 1149111, 1138708, 1142565, 1138423, 1144442, 1144596, 1142455,\n", - " 1136864, 1141579, 1135319, 1135327, 1144182, 1137606, 1150906, 1146202,\n", - " 1139559, 1137841, 1147153, 1147155, 1136378, 1162804, 1141365, 1153069,\n", - " 1163667, 1149101, 1138300, 1144279, 1139508, 1139127, 1145001, 1145213,\n", - " 1140616, 1140990, 1146693, 1135045, 1143692, 1147050, 1147043, 1147047,\n", - " 1143543, 1152976, 1141925, 1144242, 1134859, 1143851, 1146024, 1138085,\n", - " 1146140, 1141585, 1149928, 1147084, 1139990, 1143293, 1143294, 1143280,\n", - " 1151124, 1147543, 1147540, 1147282, 1147291, 1142816, 1164371, 1136330,\n", - " 1149372, 1148003, 1157720, 1136836, 1139297, 1139309, 1141496, 1143345,\n", - " 1144765, 1144088, 1135876, 1150755, 1135818, 1150294, 1146523, 1146524,\n", - " 1138016, 1143456, 1143457, 1144303, 1143937, 1147574, 1143798, 1146636,\n", - " 1147521, 1147530, 1147520, 1140364, 1137990, 1143075, 1166410, 1144725,\n", - " 1147999, 1146949, 1139252, 1139255, 1139249, 1147131, 1147244, 1148704,\n", - " 1148715, 1142700, 1141319, 1146742, 1152327, 1147070, 1149722, 1145012,\n", - " 1139549, 1158226, 1158230, 1143921, 1154526, 1145240, 1145246, 1145751,\n", - " 1142370, 1138638, 1146178, 1151242, 1152538, 1150438, 1150445, 1148827,\n", - " 1151860, 1144514, 1144526, 1150348, 1150350, 1150339, 1151480, 1152022,\n", - " 1152023, 1144888, 1154271, 1134869, 1148278, 1158950, 1141949, 1150736,\n", - " 1137646, 1149996, 1148448, 1147653, 1143567, 1149420, 1149412, 1148288,\n", - " 1139097, 1151412, 1154420, 1158786, 1148180, 1151363, 1152563, 1146678,\n", - " 1157970, 1148720, 1148729, 1146544, 1146547, 1146549, 1149810, 1148204,\n", - " 1153124, 1145104, 1152974, 1150935, 1148052, 1152875, 1152877, 1152878,\n", - " 1150352, 1150356, 1155098, 1141016, 1147442, 1151816, 1152581, 1151906,\n", - " 1151908, 1151907, 1150708, 1145640, 1148498, 1148510, 1141420, 1151344,\n", - " 1151351, 1155164, 1147602, 1147604, 1147737, 1148949, 1146969, 1156402,\n", - " 1153255, 1150210, 1146623, 1144468, 1144466, 1152098, 1156321, 1153029,\n", - " 1137746, 1152608, 1152622, 1140518, 1140521, 1152753, 1152826, 1151579,\n", - " 1151617, 1150578, 1145278, 1136134, 1136798, 1148913, 1148914, 1148916,\n", - " 1152224, 1138991, 1152903, 1151298, 1151311, 1152341, 1146816, 1156821,\n", - " 1156831, 1156816, 1153311, 1138281, 1152300, 1156007, 1156001, 1136028,\n", - " 1158704, 1156619, 1156622, 1162200, 1152928, 1154733, 1154734, 1142777,\n", - " 1156422, 1163489, 1150099, 1148040, 1149300, 1152601, 1155218, 1145652,\n", - " 1145656, 1149799, 1144659, 1137048, 1148628, 1148637, 1158530, 1158540,\n", - " 1137458, 1142041, 1142047, 1154374, 1157229, 1158860, 1150872, 1156500,\n", - " 1156505, 1157057, 1153884, 1155408, 1155418, 1151251, 1146854, 1135231,\n", - " 1135730, 1156629, 1151777, 1152737, 1150828, 1135634, 1147810, 1158311,\n", - " 1151340, 1155441, 1155442, 1150129, 1154529, 1142755, 1156207, 1156271,\n", - " 1157637, 1151379, 1155122, 1157174, 1149321, 1155755, 1146913, 1158096,\n", - " 1155626, 1155628, 1155630, 1158492, 1156563, 1156566, 1154557, 1155574,\n", - " 1136469, 1158566, 1158824, 1153715, 1148836, 1155646, 1160958, 1161389,\n", - " 1143263, 1154648, 1160210, 1154243, 1154250, 1151890, 1156713, 1139621,\n", - " 1151317, 1154902, 1154909, 1150371, 1155293, 1137152, 1158998, 1149904,\n", - " 1159116, 1138269, 1137316, 1140913, 1135601, 1155852, 1158665, 1157684,\n", - " 1146321, 1152209, 1152220, 1159213, 1155439, 1140374, 1155884, 1157735,\n", - " 1144843, 1155971, 1155975, 1158841, 1149702, 1154600, 1161309, 1153503,\n", - " 1136899, 1136896, 1158764, 1161577, 1158894, 1140208, 1158815, 1136480,\n", - " 1156665, 1156671, 1155304, 1153808, 1136640, 1136646, 1134757, 1162175,\n", - " 1147782, 1158558, 1153827, 1151144, 1156516, 1146126, 1155869, 1158006,\n", - " 1163183, 1155521, 1155529, 1155528, 1142663, 1142666, 1157747, 1159292,\n", - " 1167359, 1159042, 1159052, 1172279, 1160563, 1153043, 1153052, 1153045,\n", - " 1171551, 1155763, 1167555, 1166259, 1153842, 1153850, 1156101, 1156107,\n", - " 1138391, 1138393, 1150046, 1149070, 1145948, 1155479, 1153519, 1147300,\n", - " 1146870, 1146876, 1157600, 1138161, 1138167, 1164006, 1156787, 1156795,\n", - " 1139782, 1154590, 1169746, 1157236, 1157247, 1146063, 1159931, 1160701,\n", - " 1165309, 1140132, 1158868, 1170406, 1170415, 1140641, 1140643, 1141863,\n", - " 1148603, 1168081, 1143143, 1163013, 1155816, 1163758, 1141800, 1158653,\n", - " 1158654, 1156181, 1159032, 1152247, 1160605, 1155588, 1162549, 1168426,\n", - " 1168527, 1144979, 1149011, 1146509, 1161240, 1144737, 1144739, 1155044,\n", - " 1145139, 1155267, 1141471, 1141459, 1151650, 1147426, 1147433, 1157050,\n", - " 1159388, 1156739, 1160849, 1150642, 1150648, 1150649, 1144812, 1140112,\n", - " 1162085, 1156300, 1167329, 1145743, 1166917, 1148683, 1167753, 1160228,\n", - " 1169284, 1169282, 1166462, 1169517, 1170670, 1150533, 1150535, 1138762,\n", - " 1144973, 1146432, 1148175, 1143037, 1145447, 1147355, 1152626, 1148124,\n", - " 1147724, 1145900, 1145902, 1153534, 1168659, 1152206, 1143395, 1170980,\n", - " 1171222, 1158724, 1166670, 1168754, 1167817, 1144686, 1145320, 1155170,\n", - " 1165011, 1150526, 1161781, 1144336, 1157534, 1138369, 1154670, 1157331,\n", - " 1141043, 1151668, 1169359, 1154364, 1149452, 1146339, 1138609, 1138618,\n", - " 1158146, 1158611, 1158623, 1173047, 1163292, 1153288, 1149846, 1149847,\n", - " 1160135, 1172303, 1165322, 1152353, 1149402, 1173307, 1154027, 1152150,\n", - " 1152152, 1159648, 1159655, 1178419, 1151215, 1157153, 1157371, 1164693,\n", - " 1147711, 1169913, 1147933, 1157592, 1177415, 1166016, 1177702, 1144550,\n", - " 1170554, 1159100, 1166682, 1166684, 1167833, 1177182, 1150234, 1154151,\n", - " 1154148, 1154150, 1149169, 1149173, 1182426, 1143420, 1171301, 1171302,\n", - " 1169618, 1153803, 1179918, 1178475, 1173232, 1171745, 1151509, 1158030,\n", - " 1158029, 1171773, 1154718, 1171616, 1164034, 1155804, 1157992, 1178715,\n", - " 1154497, 1154500, 1134650, 1164560, 1178896, 1145626, 1180383, 1161063,\n", - " 1161067, 1161911, 1149755, 1158771, 1158512, 1158524, 1158374, 1155890,\n", - " 1155892, 1157278, 1191364, 1140393, 1140399, 1164794, 1162443, 1168889,\n", - " 1187271, 1162253, 1184013, 1168876, 1185169, 1165151, 1163422, 1154957,\n", - " 1146161, 1156849, 1166772, 1147182, 1156539, 1139828, 1139831, 1139837,\n", - " 1150265, 1154806, 1154812, 1149668, 1151288, 1156055, 1151972, 1146386,\n", - " 1146394, 1191742, 1191724, 1190830, 1140993, 1182058, 1194455, 1192613,\n", - " 1151774, 1190455, 1185760, 1193039, 1152113, 1152115, 1172337, 1169707,\n", - " 1153592, 1179317, 1172124, 1166789, 1167739, 1183949, 1155959, 1192472,\n", - " 1179769, 1189962, 1167471, 1192966, 1161348, 1186149], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137435, 1141424, 1140282, 1135165, 1135160, 1135716, 1140793, 1141758,\n", - " 1136208, 1136215, 1136971, 1138897, 1149834, 1149839, 1139820, 1139811,\n", - " 1145984, 1145989, 1145992, 1137268, 1138938, 1138942, 1143372, 1150507,\n", - " 1149216, 1142958, 1149633, 1147473, 1142881, 1146995, 1153012, 1148343,\n", - " 1148346, 1135481, 1152664, 1137220, 1139373, 1147202, 1136685, 1150329,\n", - " 1150333, 1140308, 1140537, 1140540, 1140542, 1138112, 1137171, 1137172,\n", - " 1137181, 1151520, 1140159, 1140953, 1135367, 1135202, 1135903, 1141036,\n", - " 1134794, 1157443, 1137329, 1137342, 1136178, 1143064, 1137691, 1137693,\n", - " 1137534, 1135408, 1136662, 1137441, 1136193, 1135275, 1156159, 1148483,\n", - " 1139161, 1134841, 1135579, 1135581, 1135583, 1140712, 1156342, 1153094,\n", - " 1153099, 1154132, 1156899, 1156909, 1135522, 1138436, 1138440, 1138445,\n", - " 1140079, 1136534, 1138461, 1138449, 1138462, 1137924, 1158390, 1138832,\n", - " 1138844, 1138846, 1135088, 1138882, 1156606, 1147112, 1135025, 1135618,\n", - " 1156137, 1158984, 1148531, 1137423, 1135769, 1141532, 1139667, 1139673,\n", - " 1138070, 1138069, 1134992, 1142434, 1136551, 1152654, 1139757, 1136728,\n", - " 1140199, 1159019, 1141058, 1143626, 1143625, 1139085, 1137587, 1137595,\n", - " 1146075, 1152044, 1137734, 1137728, 1138240, 1141088, 1141094, 1149001,\n", - " 1139898, 1139889, 1143767, 1137297, 1143703, 1143224, 1143225, 1159676,\n", - " 1140009, 1136625, 1141224, 1139386, 1141657, 1163301, 1136917, 1139728,\n", - " 1143677, 1143679, 1144237, 1141159, 1139495, 1136760, 1141302, 1144650,\n", - " 1134987, 1136851, 1137072, 1137074, 1138482, 1142050, 1165100, 1158746,\n", - " 1158749, 1149111, 1138708, 1142565, 1138423, 1144442, 1144596, 1142455,\n", - " 1136864, 1141579, 1135319, 1135327, 1144182, 1137606, 1150906, 1146202,\n", - " 1139559, 1137841, 1147153, 1147155, 1136378, 1162804, 1141365, 1153069,\n", - " 1163667, 1149101, 1138300, 1144279, 1139508, 1139127, 1145001, 1145213,\n", - " 1140616, 1140990, 1146693, 1135045, 1143692, 1147050, 1147043, 1147047,\n", - " 1143543, 1152976, 1141925, 1144242, 1134859, 1143851, 1146024, 1138085,\n", - " 1146140, 1141585, 1149928, 1147084, 1139990, 1143293, 1143294, 1143280,\n", - " 1151124, 1147543, 1147540, 1147282, 1147291, 1142816, 1164371, 1136330,\n", - " 1149372, 1148003, 1157720, 1136836, 1139297, 1139309, 1141496, 1143345,\n", - " 1144765, 1144088, 1135876, 1150755, 1135818, 1150294, 1146523, 1146524,\n", - " 1138016, 1143456, 1143457, 1144303, 1143937, 1147574, 1143798, 1146636,\n", - " 1147521, 1147530, 1147520, 1140364, 1137990, 1143075, 1166410, 1144725,\n", - " 1147999, 1146949, 1139252, 1139255, 1139249, 1147131, 1147244, 1148704,\n", - " 1148715, 1142700, 1141319, 1146742, 1152327, 1147070, 1149722, 1145012,\n", - " 1139549, 1158226, 1158230, 1143921, 1154526, 1145240, 1145246, 1145751,\n", - " 1142370, 1138638, 1146178, 1151242, 1152538, 1150438, 1150445, 1148827,\n", - " 1151860, 1144514, 1144526, 1150348, 1150350, 1150339, 1151480, 1152022,\n", - " 1152023, 1144888, 1154271, 1134869, 1148278, 1158950, 1141949, 1150736,\n", - " 1137646, 1149996, 1148448, 1147653, 1143567, 1149420, 1149412, 1148288,\n", - " 1139097, 1151412, 1154420, 1158786, 1148180, 1151363, 1152563, 1146678,\n", - " 1157970, 1148720, 1148729, 1146544, 1146547, 1146549, 1149810, 1148204,\n", - " 1153124, 1145104, 1152974, 1150935, 1148052, 1152875, 1152877, 1152878,\n", - " 1150352, 1150356, 1155098, 1141016, 1147442, 1151816, 1152581, 1151906,\n", - " 1151908, 1151907, 1150708, 1145640, 1148498, 1148510, 1141420, 1151344,\n", - " 1151351, 1155164, 1147602, 1147604, 1147737, 1148949, 1146969, 1156402,\n", - " 1153255, 1150210, 1146623, 1144468, 1144466, 1152098, 1156321, 1153029,\n", - " 1137746, 1152608, 1152622, 1140518, 1140521, 1152753, 1152826, 1151579,\n", - " 1151617, 1150578, 1145278, 1136134, 1136798, 1148913, 1148914, 1148916,\n", - " 1152224, 1138991, 1152903, 1151298, 1151311, 1152341, 1146816, 1156821,\n", - " 1156831, 1156816, 1153311, 1138281, 1152300, 1156007, 1156001, 1136028,\n", - " 1158704, 1156619, 1156622, 1162200, 1152928, 1154733, 1154734, 1142777,\n", - " 1156422, 1163489, 1150099, 1148040, 1149300, 1152601, 1155218, 1145652,\n", - " 1145656, 1149799, 1144659, 1137048, 1148628, 1148637, 1158530, 1158540,\n", - " 1137458, 1142041, 1142047, 1154374, 1157229, 1158860, 1150872, 1156500,\n", - " 1156505, 1157057, 1153884, 1155408, 1155418, 1151251, 1146854, 1135231,\n", - " 1135730, 1156629, 1151777, 1152737, 1150828, 1135634, 1147810, 1158311,\n", - " 1151340, 1155441, 1155442, 1150129, 1154529, 1142755, 1156207, 1156271,\n", - " 1157637, 1151379, 1155122, 1157174, 1149321, 1155755, 1146913, 1158096,\n", - " 1155626, 1155628, 1155630, 1158492, 1156563, 1156566, 1154557, 1155574,\n", - " 1136469, 1158566, 1158824, 1153715, 1148836, 1155646, 1160958, 1161389,\n", - " 1143263, 1154648, 1160210, 1154243, 1154250, 1151890, 1156713, 1139621,\n", - " 1151317, 1154902, 1154909, 1150371, 1155293, 1137152, 1158998, 1149904,\n", - " 1159116, 1138269, 1137316, 1140913, 1135601, 1155852, 1158665, 1157684,\n", - " 1146321, 1152209, 1152220, 1159213, 1155439, 1140374, 1155884, 1157735,\n", - " 1144843, 1155971, 1155975, 1158841, 1149702, 1154600, 1161309, 1153503,\n", - " 1136899, 1136896, 1158764, 1161577, 1158894, 1140208, 1158815, 1136480,\n", - " 1156665, 1156671, 1155304, 1153808, 1136640, 1136646, 1134757, 1162175,\n", - " 1147782, 1158558, 1153827, 1151144, 1156516, 1146126, 1155869, 1158006,\n", - " 1163183, 1155521, 1155529, 1155528, 1142663, 1142666, 1157747, 1159292,\n", - " 1167359, 1159042, 1159052, 1172279, 1160563, 1153043, 1153052, 1153045,\n", - " 1171551, 1155763, 1167555, 1166259, 1153842, 1153850, 1156101, 1156107,\n", - " 1138391, 1138393, 1150046, 1149070, 1145948, 1155479, 1153519, 1147300,\n", - " 1146870, 1146876, 1157600, 1138161, 1138167, 1164006, 1156787, 1156795,\n", - " 1139782, 1154590, 1169746, 1157236, 1157247, 1146063, 1159931, 1160701,\n", - " 1165309, 1140132, 1158868, 1170406, 1170415, 1140641, 1140643, 1141863,\n", - " 1148603, 1168081, 1143143, 1163013, 1155816, 1163758, 1141800, 1158653,\n", - " 1158654, 1156181, 1159032, 1152247, 1160605, 1155588, 1162549, 1168426,\n", - " 1168527, 1144979, 1149011, 1146509, 1161240, 1144737, 1144739, 1155044,\n", - " 1145139, 1155267, 1141471, 1141459, 1151650, 1147426, 1147433, 1157050,\n", - " 1159388, 1156739, 1160849, 1150642, 1150648, 1150649, 1144812, 1140112,\n", - " 1162085, 1156300, 1167329, 1145743, 1166917, 1148683, 1167753, 1160228,\n", - " 1169284, 1169282, 1166462, 1169517, 1170670, 1150533, 1150535, 1138762,\n", - " 1144973, 1146432, 1148175, 1143037, 1145447, 1147355, 1152626, 1148124,\n", - " 1147724, 1145900, 1145902, 1153534, 1168659, 1152206, 1143395, 1170980,\n", - " 1171222, 1158724, 1166670, 1168754, 1167817, 1144686, 1145320, 1155170,\n", - " 1165011, 1150526, 1161781, 1144336, 1157534, 1138369, 1154670, 1157331,\n", - " 1141043, 1151668, 1169359, 1154364, 1149452, 1146339, 1138609, 1138618,\n", - " 1158146, 1158611, 1158623, 1173047, 1163292, 1153288, 1149846, 1149847,\n", - " 1160135, 1172303, 1165322, 1152353, 1149402, 1173307, 1154027, 1152150,\n", - " 1152152, 1159648, 1159655, 1178419, 1151215, 1157153, 1157371, 1164693,\n", - " 1147711, 1169913, 1147933, 1157592, 1177415, 1166016, 1177702, 1144550,\n", - " 1170554, 1159100, 1166682, 1166684, 1167833, 1177182, 1150234, 1154151,\n", - " 1154148, 1154150, 1149169, 1149173, 1182426, 1143420, 1171301, 1171302,\n", - " 1169618, 1153803, 1179918, 1178475, 1173232, 1171745, 1151509, 1158030,\n", - " 1158029, 1171773, 1154718, 1171616, 1164034, 1155804, 1157992, 1178715,\n", - " 1154497, 1154500, 1134650, 1164560, 1178896, 1145626, 1180383, 1161063,\n", - " 1161067, 1161911, 1149755, 1158771, 1158512, 1158524, 1158374, 1155890,\n", - " 1155892, 1157278, 1191364, 1140393, 1140399, 1164794, 1162443, 1168889,\n", - " 1187271, 1162253, 1184013, 1168876, 1185169, 1165151, 1163422, 1154957,\n", - " 1146161, 1156849, 1166772, 1147182, 1156539, 1139828, 1139831, 1139837,\n", - " 1150265, 1154806, 1154812, 1149668, 1151288, 1156055, 1151972, 1146386,\n", - " 1146394, 1191742, 1191724, 1190830, 1140993, 1182058, 1194455, 1192613,\n", - " 1151774, 1190455, 1185760, 1193039, 1152113, 1152115, 1172337, 1169707,\n", - " 1153592, 1179317, 1172124, 1166789, 1167739, 1183949, 1155959, 1192472,\n", - " 1179769, 1189962, 1167471, 1192966, 1161348, 1186149], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196000, 1195711, 1195522, 1197719, 1199282, 1198840, 1198844, 1201577,\n", - " 1202804, 1198557, 1194743, 1194649, 1194648, 1195103, 1195511, 1195263,\n", - " 1201992, 1196031, 1195895, 1197856, 1196979, 1199371, 1195325, 1198262,\n", - " 1198362, 1195982, 1198161, 1199810, 1199823, 1195148, 1195265, 1194923,\n", - " 1196109, 1195850, 1195541, 1199998, 1202021, 1196396, 1198282, 1200949,\n", - " 1196043, 1194928, 1199685, 1199628, 1200878, 1199231, 1201916, 1195017,\n", - " 1195018, 1199676, 1201511, 1199021, 1197601, 1197609, 1196727, 1196734,\n", - " 1202618, 1198811, 1199083, 1198593, 1201079, 1202630, 1200991, 1200913,\n", - " 1200918, 1194803, 1199712, 1200553, 1200558, 1203071, 1200345, 1200194,\n", - " 1196779, 1201029, 1199485, 1200899, 1202338, 1202337, 1201555, 1201291,\n", - " 1195611, 1203329, 1196960, 1196966, 1200784, 1195664, 1200445, 1198932,\n", - " 1198904, 1195418, 1197811, 1197822, 1196597, 1200437, 1200295, 1197652,\n", - " 1197335, 1201877, 1203162, 1196430, 1197872], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196000, 1195711, 1195522, 1197719, 1199282, 1198840, 1198844, 1201577,\n", - " 1202804, 1198557, 1194743, 1194649, 1194648, 1195103, 1195511, 1195263,\n", - " 1201992, 1196031, 1195895, 1197856, 1196979, 1199371, 1195325, 1198262,\n", - " 1198362, 1195982, 1198161, 1199810, 1199823, 1195148, 1195265, 1194923,\n", - " 1196109, 1195850, 1195541, 1199998, 1202021, 1196396, 1198282, 1200949,\n", - " 1196043, 1194928, 1199685, 1199628, 1200878, 1199231, 1201916, 1195017,\n", - " 1195018, 1199676, 1201511, 1199021, 1197601, 1197609, 1196727, 1196734,\n", - " 1202618, 1198811, 1199083, 1198593, 1201079, 1202630, 1200991, 1200913,\n", - " 1200918, 1194803, 1199712, 1200553, 1200558, 1203071, 1200345, 1200194,\n", - " 1196779, 1201029, 1199485, 1200899, 1202338, 1202337, 1201555, 1201291,\n", - " 1195611, 1203329, 1196960, 1196966, 1200784, 1195664, 1200445, 1198932,\n", - " 1198904, 1195418, 1197811, 1197822, 1196597, 1200437, 1200295, 1197652,\n", - " 1197335, 1201877, 1203162, 1196430, 1197872], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 3.2517e-03, -3.0811e-04, 2.9787e-01, ..., 2.1787e-02,\n", - " -4.0121e-04, -2.4500e-03],\n", - " [ 6.7705e-03, -4.7634e-04, 3.3817e-01, ..., -3.3548e-05,\n", - " 1.7659e-02, -2.8353e-03],\n", - " [ 5.0970e-02, -6.0724e-04, 3.3440e-01, ..., -1.5281e-04,\n", - " -1.9004e-04, -2.7397e-03],\n", - " ...,\n", - " [ 6.9683e-03, -2.4223e-04, 2.9434e-01, ..., 2.5859e-02,\n", - " -4.1635e-04, -2.4287e-03],\n", - " [ 1.6644e-02, -2.0397e-05, 2.4344e-01, ..., 4.2574e-02,\n", - " -2.7023e-04, -2.6675e-03],\n", - " [ 6.5747e-02, -6.8213e-04, 3.1854e-01, ..., -1.7301e-04,\n", - " -1.2661e-04, -2.7693e-03]], device='cuda:0'), 'paper': tensor([[ 3.7234, -0.0479, 3.2608, ..., -0.0178, -0.0238, 3.2408],\n", - " [ 2.4806, -0.0338, 2.0538, ..., -0.0104, -0.0132, 2.4143],\n", - " [ 2.3541, -0.0327, 2.3486, ..., -0.0087, -0.0164, 3.0183],\n", - " ...,\n", - " [ 3.3153, -0.0546, 2.0307, ..., -0.0159, -0.0147, 2.6587],\n", - " [ 3.8064, -0.0646, 2.1259, ..., -0.0235, -0.0186, 3.0563],\n", - " [ 2.4518, -0.0366, 2.6346, ..., -0.0082, -0.0158, 3.0736]],\n", - " device='cuda:0'), 'author': tensor([[ 5.0445e-01, -5.5879e-03, -3.8019e-04, ..., -1.9562e-03,\n", - " 4.5444e-02, 1.8721e-01],\n", - " [ 3.8373e-01, -1.2565e-03, -2.3542e-04, ..., -6.6052e-04,\n", - " -1.4161e-03, -1.9798e-03],\n", - " [ 4.0459e-01, -4.0393e-03, -1.2846e-04, ..., -2.4255e-03,\n", - " -1.0530e-03, 7.9846e-02],\n", - " ...,\n", - " [ 4.9725e-01, -4.9718e-03, -3.6006e-04, ..., -2.0197e-03,\n", - " 2.8858e-02, 1.4644e-01],\n", - " [ 5.0316e-01, -6.2341e-03, 1.5154e-01, ..., -4.1936e-03,\n", - " 2.4170e-02, 2.1707e-01],\n", - " [ 4.7492e-01, -5.5732e-03, -3.5577e-04, ..., -2.6229e-03,\n", - " 8.7566e-02, 1.8495e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0102, 0.1130, -0.0035, ..., 0.9264, -0.0023, -0.0052],\n", - " [-0.0110, 0.2189, -0.0042, ..., 1.2534, -0.0024, -0.0076],\n", - " [-0.0097, 0.1413, -0.0040, ..., 1.1801, -0.0028, -0.0073],\n", - " ...,\n", - " [-0.0085, 0.1685, -0.0032, ..., 0.9824, -0.0016, -0.0053],\n", - " [-0.0104, 0.4072, -0.0032, ..., 1.4197, -0.0041, -0.0105],\n", - " [-0.0118, 0.2817, -0.0046, ..., 1.4287, -0.0036, -0.0093]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 60, 190, 135, 123, 134, 147, 13, 80, 80, 62, 188, 146,\n", - " 201, 444, 285, 930, 930, 930, 494, 494, 507, 729, 760, 760,\n", - " 760, 773, 679, 917, 1049, 1182, 956, 944, 1121, 1533, 1121, 1342,\n", - " 1342, 1342, 1201, 1188, 1316, 1391, 1335, 1434, 1547, 1505, 1505, 1496,\n", - " 1564, 1564, 1587, 1598, 1650, 1604, 1691, 1568, 1646, 1759, 1671, 1750,\n", - " 1799, 1973, 1900, 1900, 1900, 1969, 2154, 2172, 2137, 2234, 2192, 2310,\n", - " 2310, 2348, 2250, 2241, 2467, 2442, 2384, 2481, 2481, 2383, 2383, 2418,\n", - " 2475, 2900, 2792, 2735, 2735, 2904, 2906, 3050, 2707, 2707, 2747, 2963,\n", - " 3016, 3148, 3341, 3240, 3180, 3151, 3229, 3370, 3296, 3468, 3574, 3938,\n", - " 3938, 3693, 3626, 3773, 3810, 3971, 3992, 4059, 4082, 4089, 4089, 4089,\n", - " 4183, 4255, 4242, 4242, 4242, 4242, 4250, 4303, 4470, 4517, 4808, 4872,\n", - " 4815, 4762, 4723, 4783, 4985, 5147, 5246, 5246, 5435, 5435, 5307, 5611,\n", - " 5611, 5400, 5558, 5581, 5391, 5391, 5710, 5608, 5608, 5692, 5817, 5817,\n", - " 5817, 5828, 5828, 5675, 5675, 5675, 5644, 5644, 5997, 6052, 5802, 5813],\n", - " [ 64, 4, 98, 30, 98, 99, 78, 50, 41, 36, 68, 54,\n", - " 72, 54, 92, 83, 87, 64, 20, 46, 97, 64, 54, 75,\n", - " 41, 46, 42, 46, 89, 61, 96, 40, 88, 85, 90, 81,\n", - " 19, 80, 47, 83, 73, 15, 62, 38, 3, 15, 6, 95,\n", - " 25, 74, 15, 56, 41, 15, 7, 93, 73, 46, 45, 52,\n", - " 50, 78, 18, 17, 69, 11, 86, 50, 55, 64, 27, 44,\n", - " 87, 31, 77, 35, 24, 51, 24, 27, 49, 98, 46, 67,\n", - " 70, 15, 66, 49, 13, 79, 36, 56, 58, 43, 4, 39,\n", - " 2, 3, 99, 35, 0, 85, 54, 46, 76, 27, 57, 28,\n", - " 55, 46, 15, 9, 3, 78, 22, 48, 49, 91, 71, 16,\n", - " 88, 46, 54, 61, 41, 34, 53, 9, 82, 27, 83, 94,\n", - " 79, 29, 54, 84, 1, 54, 32, 54, 100, 81, 21, 83,\n", - " 84, 54, 23, 60, 12, 43, 43, 33, 54, 8, 54, 63,\n", - " 26, 65, 54, 10, 54, 5, 54, 14, 54, 43, 37, 59]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 872, 648, 743, ..., 279, 5524, 6040],\n", - " [ 165, 205, 129, ..., 7528, 7484, 7459]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 83, 34, 41, ..., 54, 37, 17],\n", - " [ 18, 72, 11, ..., 6076, 5802, 6015]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 129, 129, 129, ..., 7363, 7426, 7560],\n", - " [ 56, 541, 806, ..., 293, 60, 813]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 431, 231, 271, ..., 431, 431, 271],\n", - " [ 156, 264, 210, ..., 7525, 7475, 7470]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4363, 5805, 3866, ..., 4090, 2683, 6759],\n", - " [ 80, 80, 81, ..., 6087, 6087, 6025]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 129, 129, 129, ..., 7560, 7560, 7523],\n", - " [2427, 3367, 526, ..., 7130, 6545, 4909]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 80, 80, 80, ..., 6014, 6014, 6014],\n", - " [6420, 5831, 5805, ..., 4909, 4408, 4540]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.00648\n", - "sampling 0.006328\n", - "noi time: 0.001925\n", - "get_vertex_data call: 0.03087\n", - "noi group time: 0.003609\n", - "eoi_group_time: 0.013925\n", - "second half: 0.228749\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31145, 32616, 10012, ..., 1117383, 1119687, 1120069],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31145, 32616, 10012, ..., 1117383, 1119687, 1120069],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1212860, 1208551, 1231430, ..., 1934174, 1936965, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1212860, 1208551, 1231430, ..., 1934174, 1936965, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1141424, 1136225, 1136228, 1140282, 1140284, 1135926, 1138553,\n", - " 1135726, 1135721, 1141758, 1137506, 1138335, 1138321, 1136223, 1136154,\n", - " 1136969, 1136971, 1141443, 1138059, 1143600, 1143609, 1138942, 1146428,\n", - " 1139142, 1143372, 1150395, 1146640, 1146643, 1139958, 1150497, 1150509,\n", - " 1145292, 1139865, 1134940, 1136959, 1136945, 1142958, 1155689, 1143820,\n", - " 1149636, 1147473, 1147477, 1147229, 1135998, 1149287, 1144636, 1146995,\n", - " 1146996, 1135947, 1146472, 1148548, 1148546, 1137219, 1155019, 1139371,\n", - " 1150320, 1152423, 1134709, 1138739, 1151548, 1140540, 1138112, 1154414,\n", - " 1140159, 1134735, 1135913, 1140020, 1135367, 1135202, 1135903, 1141036,\n", - " 1136770, 1134794, 1157443, 1157450, 1135962, 1143386, 1138504, 1138505,\n", - " 1137342, 1143064, 1143069, 1157102, 1137682, 1144799, 1144395, 1137521,\n", - " 1137529, 1137534, 1157395, 1152371, 1137441, 1143317, 1137480, 1136197,\n", - " 1156159, 1139161, 1141702, 1135579, 1135583, 1136098, 1135246, 1135828,\n", - " 1140712, 1156342, 1153102, 1137953, 1158136, 1154132, 1136978, 1136986,\n", - " 1136988, 1156909, 1139685, 1139687, 1136352, 1136358, 1157698, 1138436,\n", - " 1138440, 1138445, 1138457, 1138461, 1138449, 1136594, 1135135, 1135133,\n", - " 1138846, 1147112, 1142611, 1138185, 1148530, 1148531, 1150951, 1135760,\n", - " 1135773, 1139855, 1139674, 1142255, 1134992, 1134770, 1134772, 1158974,\n", - " 1139327, 1159017, 1143630, 1140034, 1152696, 1138648, 1138151, 1155662,\n", - " 1155654, 1141985, 1152044, 1139069, 1142293, 1140660, 1137734, 1137728,\n", - " 1135549, 1140228, 1141088, 1141098, 1149001, 1139899, 1139889, 1156875,\n", - " 1135291, 1142021, 1136397, 1136392, 1143221, 1139025, 1140003, 1149970,\n", - " 1149979, 1149982, 1142503, 1152705, 1141681, 1141690, 1154466, 1154467,\n", - " 1139436, 1140473, 1142932, 1141224, 1142171, 1136924, 1145065, 1144239,\n", - " 1140598, 1140597, 1138785, 1139494, 1136760, 1136767, 1168566, 1134979,\n", - " 1147844, 1137074, 1149435, 1153666, 1142085, 1145161, 1158749, 1149113,\n", - " 1148864, 1141479, 1138709, 1138708, 1142913, 1137661, 1138423, 1138424,\n", - " 1143111, 1144596, 1142451, 1136867, 1136864, 1140885, 1135324, 1144186,\n", - " 1137611, 1137606, 1150906, 1166711, 1143752, 1143757, 1146203, 1141760,\n", - " 1158691, 1138529, 1140508, 1137846, 1137849, 1161701, 1147153, 1142640,\n", - " 1142649, 1149193, 1141365, 1141367, 1153068, 1141664, 1149101, 1138292,\n", - " 1144279, 1139508, 1139510, 1140081, 1139127, 1145000, 1140616, 1140619,\n", - " 1139168, 1140976, 1140983, 1140990, 1147050, 1152976, 1152980, 1160255,\n", - " 1135461, 1142556, 1163917, 1139007, 1141925, 1141929, 1146898, 1144251,\n", - " 1144242, 1140580, 1137149, 1160352, 1143851, 1146024, 1146129, 1141585,\n", - " 1142540, 1149933, 1139990, 1146302, 1143294, 1143883, 1148763, 1147282,\n", - " 1142816, 1143723, 1142637, 1142638, 1139408, 1139417, 1139418, 1143051,\n", - " 1143040, 1136160, 1138923, 1136836, 1136843, 1139328, 1141490, 1141496,\n", - " 1142159, 1145428, 1143345, 1144765, 1144753, 1144615, 1145810, 1135814,\n", - " 1146523, 1143957, 1143457, 1137697, 1144293, 1144303, 1144564, 1143937,\n", - " 1146587, 1147574, 1147521, 1140364, 1149569, 1149582, 1137990, 1143076,\n", - " 1143080, 1149500, 1147999, 1134899, 1144008, 1139252, 1139249, 1147235,\n", - " 1154482, 1154483, 1148704, 1141314, 1141319, 1141825, 1141836, 1146751,\n", - " 1152335, 1149722, 1147971, 1145009, 1139549, 1158226, 1158235, 1149871,\n", - " 1151636, 1145240, 1138632, 1146178, 1151239, 1151242, 1148208, 1148214,\n", - " 1152530, 1150280, 1150438, 1150445, 1149250, 1154438, 1151856, 1144526,\n", - " 1150342, 1152013, 1151985, 1151997, 1147794, 1151482, 1152027, 1154271,\n", - " 1149535, 1148693, 1148698, 1147016, 1147019, 1147009, 1158950, 1158957,\n", - " 1141949, 1146771, 1141193, 1144817, 1167216, 1147770, 1153574, 1154985,\n", - " 1147653, 1143560, 1152070, 1148623, 1154420, 1148180, 1136249, 1136244,\n", - " 1138197, 1139718, 1146683, 1146686, 1138864, 1152444, 1157968, 1157974,\n", - " 1148726, 1148729, 1144096, 1147627, 1146544, 1146549, 1148204, 1148101,\n", - " 1148106, 1156212, 1153124, 1153188, 1159829, 1150932, 1150935, 1144863,\n", - " 1150352, 1150356, 1146227, 1148084, 1151821, 1135311, 1135303, 1151909,\n", - " 1151907, 1154183, 1148498, 1148505, 1146562, 1141420, 1155152, 1153441,\n", - " 1150894, 1148949, 1146969, 1149355, 1151922, 1146623, 1151691, 1152407,\n", - " 1152097, 1151738, 1156321, 1153037, 1150085, 1137746, 1137755, 1146304,\n", - " 1152622, 1152612, 1140521, 1155146, 1155140, 1136401, 1149203, 1151959,\n", - " 1152826, 1155337, 1155356, 1157824, 1152673, 1152681, 1154638, 1151579,\n", - " 1151617, 1150578, 1136134, 1136140, 1136142, 1140451, 1150612, 1138991,\n", - " 1152903, 1151311, 1152341, 1146816, 1153311, 1145581, 1138281, 1136028,\n", - " 1158704, 1156622, 1152928, 1151065, 1150099, 1150164, 1148033, 1148040,\n", - " 1152601, 1145652, 1149792, 1144671, 1137052, 1148628, 1158530, 1137458,\n", - " 1147643, 1159222, 1153085, 1142041, 1157470, 1157229, 1143444, 1157536,\n", - " 1157547, 1150877, 1150869, 1158916, 1156505, 1157064, 1139473, 1143491,\n", - " 1151258, 1149045, 1135730, 1156638, 1156631, 1153413, 1147810, 1143022,\n", - " 1158311, 1174266, 1155441, 1150130, 1150132, 1144361, 1144362, 1140865,\n", - " 1145764, 1145600, 1150488, 1142755, 1142758, 1156207, 1156205, 1156267,\n", - " 1156256, 1151390, 1151379, 1158626, 1156640, 1155122, 1152527, 1155755,\n", - " 1155628, 1155631, 1158487, 1155574, 1155583, 1136469, 1158569, 1158823,\n", - " 1158824, 1148834, 1158355, 1143250, 1146935, 1161796, 1139620, 1151325,\n", - " 1151327, 1154902, 1154909, 1143189, 1150371, 1153322, 1157424, 1177492,\n", - " 1150987, 1143517, 1137152, 1159001, 1153786, 1137381, 1137380, 1173248,\n", - " 1159116, 1168157, 1140919, 1166187, 1134677, 1134687, 1134674, 1135601,\n", - " 1135614, 1145507, 1150661, 1150671, 1150659, 1158665, 1149145, 1140627,\n", - " 1140633, 1152209, 1152220, 1152498, 1152502, 1156692, 1140381, 1156023,\n", - " 1155881, 1157732, 1157733, 1159132, 1155970, 1155971, 1155975, 1135190,\n", - " 1149700, 1154600, 1154605, 1159452, 1153491, 1136896, 1158760, 1140221,\n", - " 1159164, 1158815, 1158447, 1158432, 1158285, 1155246, 1152463, 1136494,\n", - " 1153632, 1147594, 1155296, 1153112, 1156490, 1153808, 1136640, 1163112,\n", - " 1162167, 1145477, 1140049, 1157819, 1163813, 1163814, 1146123, 1138111,\n", - " 1158002, 1155521, 1142489, 1135661, 1142663, 1142662, 1150684, 1159054,\n", - " 1167589, 1142427, 1158295, 1153052, 1153045, 1155769, 1155770, 1166243,\n", - " 1167708, 1156228, 1144158, 1153841, 1153842, 1156098, 1156107, 1138393,\n", - " 1150035, 1150046, 1159475, 1149063, 1149070, 1149071, 1164857, 1147300,\n", - " 1146876, 1138161, 1149953, 1149956, 1154590, 1160758, 1139592, 1139284,\n", - " 1139286, 1139281, 1148777, 1148771, 1157351, 1159773, 1146063, 1146356,\n", - " 1158459, 1140140, 1140641, 1140650, 1140643, 1148592, 1148594, 1148600,\n", - " 1164990, 1143143, 1143149, 1151875, 1151872, 1155816, 1154274, 1158653,\n", - " 1159025, 1159026, 1159032, 1163740, 1152244, 1152247, 1143729, 1143733,\n", - " 1167539, 1155588, 1155596, 1164592, 1153924, 1168428, 1148571, 1158405,\n", - " 1168527, 1144984, 1147402, 1170577, 1149011, 1146510, 1144736, 1144737,\n", - " 1144739, 1163527, 1155272, 1141468, 1141471, 1169475, 1151650, 1147433,\n", - " 1181325, 1182254, 1156739, 1161008, 1150643, 1171040, 1150309, 1168748,\n", - " 1144810, 1144812, 1140127, 1140126, 1135567, 1142733, 1145743, 1145910,\n", - " 1166924, 1145228, 1155324, 1166462, 1171687, 1185486, 1185474, 1138762,\n", - " 1146433, 1148168, 1143037, 1145447, 1165745, 1165746, 1148124, 1139351,\n", - " 1145900, 1148417, 1153535, 1153534, 1163961, 1152192, 1152203, 1181040,\n", - " 1175240, 1143395, 1143402, 1170980, 1169729, 1149565, 1158724, 1167497,\n", - " 1154073, 1154070, 1154076, 1170742, 1147330, 1147331, 1147339, 1160018,\n", - " 1145674, 1150773, 1150781, 1179488, 1149130, 1169602, 1171979, 1156308,\n", - " 1169216, 1169298, 1165011, 1150515, 1150522, 1150518, 1167915, 1169458,\n", - " 1161780, 1157534, 1138369, 1147746, 1154670, 1135841, 1169162, 1157331,\n", - " 1138130, 1141043, 1151668, 1173228, 1158623, 1158054, 1149847, 1172076,\n", - " 1154875, 1154871, 1184802, 1152353, 1152361, 1152362, 1143170, 1164647,\n", - " 1155931, 1170062, 1168055, 1149402, 1148667, 1193758, 1173307, 1145028,\n", - " 1145037, 1154024, 1154027, 1152150, 1153751, 1164964, 1159658, 1151208,\n", - " 1151201, 1157153, 1147711, 1148128, 1149247, 1170490, 1135021, 1172961,\n", - " 1178824, 1165121, 1168828, 1178273, 1140326, 1166016, 1163990, 1153428,\n", - " 1178056, 1166684, 1177510, 1150234, 1154148, 1154150, 1149173, 1178610,\n", - " 1186117, 1143271, 1169761, 1167657, 1143418, 1171301, 1153803, 1164818,\n", - " 1183400, 1173865, 1144896, 1161255, 1154718, 1157792, 1157795, 1171623,\n", - " 1164034, 1163827, 1155799, 1155804, 1157131, 1157134, 1161612, 1153898,\n", - " 1153902, 1186806, 1134650, 1160007, 1145626, 1178761, 1161068, 1184996,\n", - " 1183754, 1149755, 1149759, 1153609, 1190511, 1158933, 1158370, 1158374,\n", - " 1158379, 1155892, 1155899, 1187700, 1157268, 1191815, 1140399, 1168273,\n", - " 1170631, 1169068, 1168886, 1165487, 1180489, 1184012, 1164231, 1183477,\n", - " 1186919, 1191268, 1154955, 1154957, 1181811, 1147182, 1156162, 1189294,\n", - " 1163621, 1184050, 1156530, 1156528, 1156539, 1139831, 1150265, 1170433,\n", - " 1154810, 1149669, 1182066, 1151280, 1156055, 1151974, 1173019, 1180122,\n", - " 1146395, 1149536, 1192160, 1172470, 1188161, 1187721, 1172696, 1177472,\n", - " 1169963, 1140993, 1190444, 1189741, 1194351, 1189256, 1162156, 1170893,\n", - " 1170881, 1153733, 1171111, 1169700, 1166841, 1193804, 1182286, 1158064,\n", - " 1145395, 1160972, 1185644, 1179742, 1155958, 1155962, 1186064, 1182674,\n", - " 1185198, 1193620, 1179773, 1182178, 1182772, 1179617, 1191882, 1157008],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1141424, 1136225, 1136228, 1140282, 1140284, 1135926, 1138553,\n", - " 1135726, 1135721, 1141758, 1137506, 1138335, 1138321, 1136223, 1136154,\n", - " 1136969, 1136971, 1141443, 1138059, 1143600, 1143609, 1138942, 1146428,\n", - " 1139142, 1143372, 1150395, 1146640, 1146643, 1139958, 1150497, 1150509,\n", - " 1145292, 1139865, 1134940, 1136959, 1136945, 1142958, 1155689, 1143820,\n", - " 1149636, 1147473, 1147477, 1147229, 1135998, 1149287, 1144636, 1146995,\n", - " 1146996, 1135947, 1146472, 1148548, 1148546, 1137219, 1155019, 1139371,\n", - " 1150320, 1152423, 1134709, 1138739, 1151548, 1140540, 1138112, 1154414,\n", - " 1140159, 1134735, 1135913, 1140020, 1135367, 1135202, 1135903, 1141036,\n", - " 1136770, 1134794, 1157443, 1157450, 1135962, 1143386, 1138504, 1138505,\n", - " 1137342, 1143064, 1143069, 1157102, 1137682, 1144799, 1144395, 1137521,\n", - " 1137529, 1137534, 1157395, 1152371, 1137441, 1143317, 1137480, 1136197,\n", - " 1156159, 1139161, 1141702, 1135579, 1135583, 1136098, 1135246, 1135828,\n", - " 1140712, 1156342, 1153102, 1137953, 1158136, 1154132, 1136978, 1136986,\n", - " 1136988, 1156909, 1139685, 1139687, 1136352, 1136358, 1157698, 1138436,\n", - " 1138440, 1138445, 1138457, 1138461, 1138449, 1136594, 1135135, 1135133,\n", - " 1138846, 1147112, 1142611, 1138185, 1148530, 1148531, 1150951, 1135760,\n", - " 1135773, 1139855, 1139674, 1142255, 1134992, 1134770, 1134772, 1158974,\n", - " 1139327, 1159017, 1143630, 1140034, 1152696, 1138648, 1138151, 1155662,\n", - " 1155654, 1141985, 1152044, 1139069, 1142293, 1140660, 1137734, 1137728,\n", - " 1135549, 1140228, 1141088, 1141098, 1149001, 1139899, 1139889, 1156875,\n", - " 1135291, 1142021, 1136397, 1136392, 1143221, 1139025, 1140003, 1149970,\n", - " 1149979, 1149982, 1142503, 1152705, 1141681, 1141690, 1154466, 1154467,\n", - " 1139436, 1140473, 1142932, 1141224, 1142171, 1136924, 1145065, 1144239,\n", - " 1140598, 1140597, 1138785, 1139494, 1136760, 1136767, 1168566, 1134979,\n", - " 1147844, 1137074, 1149435, 1153666, 1142085, 1145161, 1158749, 1149113,\n", - " 1148864, 1141479, 1138709, 1138708, 1142913, 1137661, 1138423, 1138424,\n", - " 1143111, 1144596, 1142451, 1136867, 1136864, 1140885, 1135324, 1144186,\n", - " 1137611, 1137606, 1150906, 1166711, 1143752, 1143757, 1146203, 1141760,\n", - " 1158691, 1138529, 1140508, 1137846, 1137849, 1161701, 1147153, 1142640,\n", - " 1142649, 1149193, 1141365, 1141367, 1153068, 1141664, 1149101, 1138292,\n", - " 1144279, 1139508, 1139510, 1140081, 1139127, 1145000, 1140616, 1140619,\n", - " 1139168, 1140976, 1140983, 1140990, 1147050, 1152976, 1152980, 1160255,\n", - " 1135461, 1142556, 1163917, 1139007, 1141925, 1141929, 1146898, 1144251,\n", - " 1144242, 1140580, 1137149, 1160352, 1143851, 1146024, 1146129, 1141585,\n", - " 1142540, 1149933, 1139990, 1146302, 1143294, 1143883, 1148763, 1147282,\n", - " 1142816, 1143723, 1142637, 1142638, 1139408, 1139417, 1139418, 1143051,\n", - " 1143040, 1136160, 1138923, 1136836, 1136843, 1139328, 1141490, 1141496,\n", - " 1142159, 1145428, 1143345, 1144765, 1144753, 1144615, 1145810, 1135814,\n", - " 1146523, 1143957, 1143457, 1137697, 1144293, 1144303, 1144564, 1143937,\n", - " 1146587, 1147574, 1147521, 1140364, 1149569, 1149582, 1137990, 1143076,\n", - " 1143080, 1149500, 1147999, 1134899, 1144008, 1139252, 1139249, 1147235,\n", - " 1154482, 1154483, 1148704, 1141314, 1141319, 1141825, 1141836, 1146751,\n", - " 1152335, 1149722, 1147971, 1145009, 1139549, 1158226, 1158235, 1149871,\n", - " 1151636, 1145240, 1138632, 1146178, 1151239, 1151242, 1148208, 1148214,\n", - " 1152530, 1150280, 1150438, 1150445, 1149250, 1154438, 1151856, 1144526,\n", - " 1150342, 1152013, 1151985, 1151997, 1147794, 1151482, 1152027, 1154271,\n", - " 1149535, 1148693, 1148698, 1147016, 1147019, 1147009, 1158950, 1158957,\n", - " 1141949, 1146771, 1141193, 1144817, 1167216, 1147770, 1153574, 1154985,\n", - " 1147653, 1143560, 1152070, 1148623, 1154420, 1148180, 1136249, 1136244,\n", - " 1138197, 1139718, 1146683, 1146686, 1138864, 1152444, 1157968, 1157974,\n", - " 1148726, 1148729, 1144096, 1147627, 1146544, 1146549, 1148204, 1148101,\n", - " 1148106, 1156212, 1153124, 1153188, 1159829, 1150932, 1150935, 1144863,\n", - " 1150352, 1150356, 1146227, 1148084, 1151821, 1135311, 1135303, 1151909,\n", - " 1151907, 1154183, 1148498, 1148505, 1146562, 1141420, 1155152, 1153441,\n", - " 1150894, 1148949, 1146969, 1149355, 1151922, 1146623, 1151691, 1152407,\n", - " 1152097, 1151738, 1156321, 1153037, 1150085, 1137746, 1137755, 1146304,\n", - " 1152622, 1152612, 1140521, 1155146, 1155140, 1136401, 1149203, 1151959,\n", - " 1152826, 1155337, 1155356, 1157824, 1152673, 1152681, 1154638, 1151579,\n", - " 1151617, 1150578, 1136134, 1136140, 1136142, 1140451, 1150612, 1138991,\n", - " 1152903, 1151311, 1152341, 1146816, 1153311, 1145581, 1138281, 1136028,\n", - " 1158704, 1156622, 1152928, 1151065, 1150099, 1150164, 1148033, 1148040,\n", - " 1152601, 1145652, 1149792, 1144671, 1137052, 1148628, 1158530, 1137458,\n", - " 1147643, 1159222, 1153085, 1142041, 1157470, 1157229, 1143444, 1157536,\n", - " 1157547, 1150877, 1150869, 1158916, 1156505, 1157064, 1139473, 1143491,\n", - " 1151258, 1149045, 1135730, 1156638, 1156631, 1153413, 1147810, 1143022,\n", - " 1158311, 1174266, 1155441, 1150130, 1150132, 1144361, 1144362, 1140865,\n", - " 1145764, 1145600, 1150488, 1142755, 1142758, 1156207, 1156205, 1156267,\n", - " 1156256, 1151390, 1151379, 1158626, 1156640, 1155122, 1152527, 1155755,\n", - " 1155628, 1155631, 1158487, 1155574, 1155583, 1136469, 1158569, 1158823,\n", - " 1158824, 1148834, 1158355, 1143250, 1146935, 1161796, 1139620, 1151325,\n", - " 1151327, 1154902, 1154909, 1143189, 1150371, 1153322, 1157424, 1177492,\n", - " 1150987, 1143517, 1137152, 1159001, 1153786, 1137381, 1137380, 1173248,\n", - " 1159116, 1168157, 1140919, 1166187, 1134677, 1134687, 1134674, 1135601,\n", - " 1135614, 1145507, 1150661, 1150671, 1150659, 1158665, 1149145, 1140627,\n", - " 1140633, 1152209, 1152220, 1152498, 1152502, 1156692, 1140381, 1156023,\n", - " 1155881, 1157732, 1157733, 1159132, 1155970, 1155971, 1155975, 1135190,\n", - " 1149700, 1154600, 1154605, 1159452, 1153491, 1136896, 1158760, 1140221,\n", - " 1159164, 1158815, 1158447, 1158432, 1158285, 1155246, 1152463, 1136494,\n", - " 1153632, 1147594, 1155296, 1153112, 1156490, 1153808, 1136640, 1163112,\n", - " 1162167, 1145477, 1140049, 1157819, 1163813, 1163814, 1146123, 1138111,\n", - " 1158002, 1155521, 1142489, 1135661, 1142663, 1142662, 1150684, 1159054,\n", - " 1167589, 1142427, 1158295, 1153052, 1153045, 1155769, 1155770, 1166243,\n", - " 1167708, 1156228, 1144158, 1153841, 1153842, 1156098, 1156107, 1138393,\n", - " 1150035, 1150046, 1159475, 1149063, 1149070, 1149071, 1164857, 1147300,\n", - " 1146876, 1138161, 1149953, 1149956, 1154590, 1160758, 1139592, 1139284,\n", - " 1139286, 1139281, 1148777, 1148771, 1157351, 1159773, 1146063, 1146356,\n", - " 1158459, 1140140, 1140641, 1140650, 1140643, 1148592, 1148594, 1148600,\n", - " 1164990, 1143143, 1143149, 1151875, 1151872, 1155816, 1154274, 1158653,\n", - " 1159025, 1159026, 1159032, 1163740, 1152244, 1152247, 1143729, 1143733,\n", - " 1167539, 1155588, 1155596, 1164592, 1153924, 1168428, 1148571, 1158405,\n", - " 1168527, 1144984, 1147402, 1170577, 1149011, 1146510, 1144736, 1144737,\n", - " 1144739, 1163527, 1155272, 1141468, 1141471, 1169475, 1151650, 1147433,\n", - " 1181325, 1182254, 1156739, 1161008, 1150643, 1171040, 1150309, 1168748,\n", - " 1144810, 1144812, 1140127, 1140126, 1135567, 1142733, 1145743, 1145910,\n", - " 1166924, 1145228, 1155324, 1166462, 1171687, 1185486, 1185474, 1138762,\n", - " 1146433, 1148168, 1143037, 1145447, 1165745, 1165746, 1148124, 1139351,\n", - " 1145900, 1148417, 1153535, 1153534, 1163961, 1152192, 1152203, 1181040,\n", - " 1175240, 1143395, 1143402, 1170980, 1169729, 1149565, 1158724, 1167497,\n", - " 1154073, 1154070, 1154076, 1170742, 1147330, 1147331, 1147339, 1160018,\n", - " 1145674, 1150773, 1150781, 1179488, 1149130, 1169602, 1171979, 1156308,\n", - " 1169216, 1169298, 1165011, 1150515, 1150522, 1150518, 1167915, 1169458,\n", - " 1161780, 1157534, 1138369, 1147746, 1154670, 1135841, 1169162, 1157331,\n", - " 1138130, 1141043, 1151668, 1173228, 1158623, 1158054, 1149847, 1172076,\n", - " 1154875, 1154871, 1184802, 1152353, 1152361, 1152362, 1143170, 1164647,\n", - " 1155931, 1170062, 1168055, 1149402, 1148667, 1193758, 1173307, 1145028,\n", - " 1145037, 1154024, 1154027, 1152150, 1153751, 1164964, 1159658, 1151208,\n", - " 1151201, 1157153, 1147711, 1148128, 1149247, 1170490, 1135021, 1172961,\n", - " 1178824, 1165121, 1168828, 1178273, 1140326, 1166016, 1163990, 1153428,\n", - " 1178056, 1166684, 1177510, 1150234, 1154148, 1154150, 1149173, 1178610,\n", - " 1186117, 1143271, 1169761, 1167657, 1143418, 1171301, 1153803, 1164818,\n", - " 1183400, 1173865, 1144896, 1161255, 1154718, 1157792, 1157795, 1171623,\n", - " 1164034, 1163827, 1155799, 1155804, 1157131, 1157134, 1161612, 1153898,\n", - " 1153902, 1186806, 1134650, 1160007, 1145626, 1178761, 1161068, 1184996,\n", - " 1183754, 1149755, 1149759, 1153609, 1190511, 1158933, 1158370, 1158374,\n", - " 1158379, 1155892, 1155899, 1187700, 1157268, 1191815, 1140399, 1168273,\n", - " 1170631, 1169068, 1168886, 1165487, 1180489, 1184012, 1164231, 1183477,\n", - " 1186919, 1191268, 1154955, 1154957, 1181811, 1147182, 1156162, 1189294,\n", - " 1163621, 1184050, 1156530, 1156528, 1156539, 1139831, 1150265, 1170433,\n", - " 1154810, 1149669, 1182066, 1151280, 1156055, 1151974, 1173019, 1180122,\n", - " 1146395, 1149536, 1192160, 1172470, 1188161, 1187721, 1172696, 1177472,\n", - " 1169963, 1140993, 1190444, 1189741, 1194351, 1189256, 1162156, 1170893,\n", - " 1170881, 1153733, 1171111, 1169700, 1166841, 1193804, 1182286, 1158064,\n", - " 1145395, 1160972, 1185644, 1179742, 1155958, 1155962, 1186064, 1182674,\n", - " 1185198, 1193620, 1179773, 1182178, 1182772, 1179617, 1191882, 1157008],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197174, 1195697, 1199730, 1197226, 1197719, 1198721, 1198731,\n", - " 1199282, 1201581, 1201582, 1194626, 1202803, 1202804, 1196669, 1198557,\n", - " 1194743, 1194750, 1194770, 1194783, 1196631, 1195514, 1195263, 1199135,\n", - " 1196534, 1201935, 1201992, 1196031, 1198543, 1197697, 1197701, 1199519,\n", - " 1195740, 1196359, 1198991, 1198668, 1196711, 1195219, 1196214, 1195265,\n", - " 1197140, 1196109, 1195541, 1202916, 1197253, 1195746, 1200037, 1196283,\n", - " 1195351, 1198282, 1199329, 1199066, 1197291, 1202747, 1199185, 1198673,\n", - " 1194941, 1194928, 1197990, 1199579, 1201908, 1195014, 1199664, 1199673,\n", - " 1198762, 1199949, 1201511, 1199021, 1195807, 1197601, 1196727, 1195773,\n", - " 1199410, 1199418, 1202390, 1199891, 1198811, 1201547, 1201827, 1200501,\n", - " 1201156, 1202630, 1201056, 1198481, 1201043, 1200526, 1200546, 1202102,\n", - " 1202110, 1201029, 1202239, 1202338, 1202175, 1200328, 1196960, 1196966,\n", - " 1200784, 1194846, 1195431, 1195664, 1198055, 1197816, 1197495, 1201484,\n", - " 1202271, 1198299, 1199659, 1203102, 1201138, 1194730, 1198823, 1198824,\n", - " 1197731, 1197735, 1198819, 1195070, 1201886, 1200301, 1197652, 1197343,\n", - " 1195082, 1197035], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197174, 1195697, 1199730, 1197226, 1197719, 1198721, 1198731,\n", - " 1199282, 1201581, 1201582, 1194626, 1202803, 1202804, 1196669, 1198557,\n", - " 1194743, 1194750, 1194770, 1194783, 1196631, 1195514, 1195263, 1199135,\n", - " 1196534, 1201935, 1201992, 1196031, 1198543, 1197697, 1197701, 1199519,\n", - " 1195740, 1196359, 1198991, 1198668, 1196711, 1195219, 1196214, 1195265,\n", - " 1197140, 1196109, 1195541, 1202916, 1197253, 1195746, 1200037, 1196283,\n", - " 1195351, 1198282, 1199329, 1199066, 1197291, 1202747, 1199185, 1198673,\n", - " 1194941, 1194928, 1197990, 1199579, 1201908, 1195014, 1199664, 1199673,\n", - " 1198762, 1199949, 1201511, 1199021, 1195807, 1197601, 1196727, 1195773,\n", - " 1199410, 1199418, 1202390, 1199891, 1198811, 1201547, 1201827, 1200501,\n", - " 1201156, 1202630, 1201056, 1198481, 1201043, 1200526, 1200546, 1202102,\n", - " 1202110, 1201029, 1202239, 1202338, 1202175, 1200328, 1196960, 1196966,\n", - " 1200784, 1194846, 1195431, 1195664, 1198055, 1197816, 1197495, 1201484,\n", - " 1202271, 1198299, 1199659, 1203102, 1201138, 1194730, 1198823, 1198824,\n", - " 1197731, 1197735, 1198819, 1195070, 1201886, 1200301, 1197652, 1197343,\n", - " 1195082, 1197035], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 7.7670e-02, -6.2057e-04, 3.1211e-01, ..., -2.3174e-04,\n", - " -1.6338e-04, -2.8580e-03],\n", - " [ 1.6018e-02, -1.0623e-04, 2.8187e-01, ..., 2.3380e-02,\n", - " -4.6561e-04, -2.6953e-03],\n", - " [ 1.7808e-02, -9.4814e-05, 2.7859e-01, ..., 2.0770e-02,\n", - " -6.4398e-04, -2.8109e-03],\n", - " ...,\n", - " [ 1.1730e-02, -3.2684e-04, 3.1276e-01, ..., 9.5744e-03,\n", - " -7.0899e-05, -2.7257e-03],\n", - " [ 3.2323e-02, -3.1163e-04, 3.0332e-01, ..., -6.5442e-05,\n", - " -2.5634e-04, -2.5105e-03],\n", - " [ 2.6303e-02, -3.0485e-04, 2.6967e-01, ..., 2.0263e-02,\n", - " -4.5080e-04, -2.5540e-03]], device='cuda:0'), 'paper': tensor([[ 2.4911, -0.0319, 2.0449, ..., -0.0113, -0.0142, 2.3905],\n", - " [ 3.6502, -0.0481, 3.1349, ..., -0.0161, -0.0230, 3.6561],\n", - " [ 3.1843, -0.0484, 1.7956, ..., -0.0170, -0.0135, 2.3199],\n", - " ...,\n", - " [ 4.2004, -0.0700, 2.4999, ..., -0.0252, -0.0215, 3.3627],\n", - " [ 2.3280, -0.0326, 1.9750, ..., -0.0089, -0.0147, 2.6772],\n", - " [ 2.4459, -0.0363, 2.5963, ..., -0.0082, -0.0157, 3.0143]],\n", - " device='cuda:0'), 'author': tensor([[ 5.5928e-01, -4.0132e-03, -1.3636e-04, ..., -2.3374e-03,\n", - " 4.5288e-02, 2.0138e-01],\n", - " [ 4.3486e-01, -4.6114e-03, 1.6277e-02, ..., -2.1044e-03,\n", - " -8.6052e-05, 8.9405e-02],\n", - " [ 5.2184e-01, -4.4919e-03, -2.5288e-04, ..., -2.8441e-03,\n", - " -3.2228e-05, 1.2000e-01],\n", - " ...,\n", - " [ 5.3371e-01, -5.3116e-03, -3.9280e-04, ..., -2.2193e-03,\n", - " 5.0947e-02, 2.5752e-01],\n", - " [ 4.4546e-01, -5.6316e-03, 8.7183e-03, ..., -1.5832e-03,\n", - " 3.4120e-02, 2.4481e-01],\n", - " [ 5.3303e-01, -4.8705e-03, -5.5602e-04, ..., -2.2640e-03,\n", - " -3.8344e-05, 1.9870e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0136, 0.3031, -0.0039, ..., 1.4325, -0.0030, -0.0075],\n", - " [-0.0105, 0.2113, -0.0040, ..., 1.1892, -0.0020, -0.0070],\n", - " [-0.0129, 0.2819, -0.0040, ..., 1.3439, -0.0029, -0.0078],\n", - " ...,\n", - " [-0.0116, 0.1620, -0.0043, ..., 1.2961, -0.0026, -0.0064],\n", - " [-0.0104, 0.2029, -0.0046, ..., 1.2577, -0.0022, -0.0062],\n", - " [-0.0106, 0.2301, -0.0031, ..., 1.0629, -0.0026, -0.0069]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 33, 175, 101, 101, 138, 138, 89, 89, 461, 211, 345, 412,\n", - " 448, 352, 254, 308, 606, 555, 807, 807, 855, 944, 1044, 1044,\n", - " 1044, 798, 798, 869, 1070, 1149, 1149, 1304, 1156, 1210, 1203, 1204,\n", - " 1198, 1210, 1210, 1210, 1401, 1401, 1269, 1430, 1430, 1466, 1466, 1466,\n", - " 1466, 1466, 1466, 1466, 1592, 1592, 1491, 1463, 1540, 1540, 1582, 1582,\n", - " 1512, 1790, 1790, 1790, 1856, 1854, 1854, 1928, 1928, 2097, 1945, 2009,\n", - " 2009, 1977, 1908, 1977, 1977, 2132, 2099, 2099, 2099, 2099, 2167, 2209,\n", - " 2181, 2103, 2259, 2123, 2189, 2285, 2267, 2330, 2498, 2409, 2409, 2598,\n", - " 2504, 2504, 2504, 2504, 2634, 2579, 2402, 2402, 2402, 2775, 2782, 2852,\n", - " 2857, 2942, 2942, 2975, 3051, 3017, 3098, 3264, 3264, 3235, 3187, 3187,\n", - " 3187, 3187, 3481, 3319, 3696, 3660, 3853, 3929, 3966, 4001, 3936, 4134,\n", - " 4256, 4247, 4181, 4424, 4453, 4579, 4536, 4701, 4709, 4688, 4599, 4786,\n", - " 4786, 4777, 4554, 4554, 4590, 4678, 4678, 4711, 4711, 4646, 4676, 4983,\n", - " 4857, 4857, 4773, 4804, 4969, 4969, 4953, 4948, 4948, 4948, 5313, 5313,\n", - " 5207, 4948, 5197, 5487, 5318, 5484, 5484, 5484, 5484, 5484, 5484, 5484,\n", - " 5484, 5519, 5519, 5473, 5473, 5496, 5496, 5769, 5769, 5806, 5806],\n", - " [ 13, 81, 8, 91, 37, 117, 76, 59, 113, 114, 56, 112,\n", - " 42, 37, 74, 92, 76, 82, 90, 42, 26, 61, 1, 64,\n", - " 100, 117, 37, 83, 62, 55, 17, 106, 83, 47, 24, 66,\n", - " 112, 116, 76, 54, 119, 69, 34, 60, 5, 109, 57, 70,\n", - " 97, 65, 80, 101, 59, 76, 43, 104, 15, 22, 29, 30,\n", - " 112, 3, 75, 121, 70, 118, 107, 84, 87, 95, 49, 25,\n", - " 85, 21, 2, 43, 63, 26, 111, 77, 19, 52, 11, 29,\n", - " 22, 91, 43, 66, 23, 31, 93, 82, 16, 13, 9, 2,\n", - " 84, 102, 48, 45, 22, 12, 4, 121, 38, 41, 115, 55,\n", - " 10, 72, 13, 6, 18, 68, 45, 70, 21, 108, 39, 99,\n", - " 13, 67, 50, 110, 51, 79, 89, 44, 22, 33, 22, 40,\n", - " 22, 50, 70, 21, 112, 80, 99, 32, 71, 36, 7, 78,\n", - " 35, 39, 31, 58, 35, 86, 18, 86, 18, 20, 53, 109,\n", - " 94, 111, 121, 120, 10, 33, 121, 22, 103, 98, 76, 59,\n", - " 28, 88, 14, 70, 93, 27, 67, 105, 0, 44, 73, 70,\n", - " 46, 22, 15, 70, 96, 56, 74, 20, 70, 8, 121]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2343, 1822, 3109, ..., 1353, 6054, 4701],\n", - " [ 105, 154, 188, ..., 6539, 6523, 6582]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 33, 55, 55, ..., 93, 42, 104],\n", - " [ 183, 173, 109, ..., 5754, 5558, 5778]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 154, 154, 154, ..., 6476, 6476, 6476],\n", - " [ 590, 306, 318, ..., 276, 753, 338]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 87, 338, 984, ..., 605, 437, 465],\n", - " [ 270, 223, 44, ..., 6527, 6496, 6477]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 320, 4698, 6461, ..., 383, 2540, 357],\n", - " [ 8, 8, 8, ..., 5804, 5777, 5816]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 154, 154, 154, ..., 6543, 6476, 6476],\n", - " [1518, 2468, 2991, ..., 1788, 1833, 3707]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 138, 138, 138, ..., 5806, 5806, 5806],\n", - " [ 688, 844, 1336, ..., 924, 2594, 1010]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.00576\n", - "sampling 0.005604\n", - "noi time: 0.001687\n", - "get_vertex_data call: 0.038945\n", - "noi group time: 0.003561\n", - "eoi_group_time: 0.016949\n", - "second half: 0.231298\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 28267, 31145, ..., 1120124, 1119043, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 28267, 31145, ..., 1120124, 1119043, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227501, 1210817, 1214764, ..., 1939384, 1937149, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227501, 1210817, 1214764, ..., 1939384, 1937149, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137209, 1141424, 1136230, 1140282, 1135926, 1141758, 1138335, 1136223,\n", - " 1141260, 1140297, 1136155, 1142525, 1136962, 1136965, 1143600, 1149831,\n", - " 1139811, 1145374, 1145999, 1139141, 1143372, 1139615, 1140781, 1148976,\n", - " 1150497, 1148576, 1149216, 1149220, 1155683, 1155689, 1149646, 1135991,\n", - " 1149283, 1153940, 1144636, 1144632, 1146992, 1146996, 1148343, 1146656,\n", - " 1146660, 1146472, 1152666, 1138345, 1147100, 1141904, 1137220, 1147211,\n", - " 1150329, 1138749, 1137829, 1138112, 1135183, 1138356, 1151520, 1151530,\n", - " 1134735, 1140953, 1135367, 1140767, 1141036, 1134794, 1157443, 1136521,\n", - " 1143389, 1138504, 1137329, 1136178, 1137693, 1136610, 1136617, 1144786,\n", - " 1144395, 1136826, 1137529, 1135408, 1136714, 1137441, 1137448, 1156159,\n", - " 1139161, 1135583, 1142607, 1148860, 1155076, 1155081, 1140712, 1138514,\n", - " 1153099, 1137959, 1135499, 1156899, 1156908, 1135522, 1139684, 1139685,\n", - " 1137287, 1138440, 1138451, 1138452, 1138461, 1138449, 1154788, 1154787,\n", - " 1136594, 1138889, 1156606, 1147116, 1142611, 1135359, 1135631, 1141523,\n", - " 1141520, 1139673, 1139674, 1138079, 1142255, 1134992, 1134778, 1136551,\n", - " 1140199, 1158974, 1159019, 1144410, 1143625, 1139085, 1138648, 1138148,\n", - " 1138150, 1141963, 1146077, 1140550, 1141985, 1152044, 1142295, 1142302,\n", - " 1137732, 1137728, 1147317, 1134922, 1134742, 1135549, 1141088, 1141097,\n", - " 1141098, 1148998, 1149001, 1141980, 1136397, 1136392, 1143225, 1139025,\n", - " 1139033, 1146844, 1152719, 1141681, 1136625, 1161173, 1141224, 1141648,\n", - " 1136921, 1141159, 1138785, 1139495, 1144937, 1136752, 1168566, 1141608,\n", - " 1162799, 1136862, 1147850, 1144428, 1138490, 1142050, 1146796, 1153666,\n", - " 1140163, 1137766, 1137762, 1137243, 1138708, 1144596, 1136864, 1144182,\n", - " 1137606, 1150906, 1161095, 1141760, 1158698, 1158690, 1140501, 1137852,\n", - " 1137841, 1147153, 1141365, 1141678, 1139508, 1138814, 1139127, 1139130,\n", - " 1144998, 1145001, 1143784, 1143785, 1139168, 1140980, 1146693, 1146695,\n", - " 1152976, 1152978, 1135459, 1141925, 1144242, 1145329, 1145331, 1145339,\n", - " 1140689, 1136891, 1137570, 1143844, 1163657, 1146024, 1141585, 1142533,\n", - " 1139990, 1143293, 1143294, 1151124, 1147543, 1147540, 1147282, 1142816,\n", - " 1149155, 1140346, 1148003, 1149608, 1143051, 1148414, 1136160, 1157717,\n", - " 1157720, 1148225, 1139296, 1139301, 1139328, 1144768, 1145427, 1143345,\n", - " 1144767, 1144619, 1144615, 1169022, 1138004, 1150919, 1146514, 1146523,\n", - " 1143456, 1143457, 1137703, 1142000, 1135441, 1149082, 1143798, 1146636,\n", - " 1140364, 1137985, 1149489, 1148966, 1147984, 1147996, 1147999, 1147127,\n", - " 1148704, 1151002, 1141327, 1141825, 1146742, 1148468, 1148473, 1153701,\n", - " 1149714, 1147027, 1147972, 1141135, 1158226, 1158235, 1151646, 1145240,\n", - " 1146178, 1151242, 1148215, 1150438, 1149258, 1154438, 1144514, 1145833,\n", - " 1152013, 1151998, 1151997, 1151480, 1145262, 1146723, 1148696, 1150127,\n", - " 1147019, 1147021, 1141949, 1150736, 1150837, 1150843, 1150728, 1149996,\n", - " 1154985, 1149412, 1148288, 1135085, 1147871, 1139096, 1139097, 1154420,\n", - " 1151369, 1152561, 1136251, 1136247, 1146676, 1138877, 1138404, 1157968,\n", - " 1157983, 1148729, 1144110, 1153181, 1154166, 1153124, 1153186, 1153188,\n", - " 1145104, 1145107, 1150934, 1150935, 1144861, 1155098, 1147446, 1151811,\n", - " 1152581, 1135307, 1135311, 1154183, 1154190, 1146571, 1141420, 1141419,\n", - " 1136009, 1155152, 1155161, 1147737, 1149385, 1155061, 1146969, 1146967,\n", - " 1156409, 1147381, 1149359, 1146623, 1151694, 1142986, 1146492, 1144476,\n", - " 1135688, 1152097, 1146287, 1153030, 1150085, 1137746, 1146307, 1146304,\n", - " 1155337, 1154112, 1154123, 1157826, 1152673, 1151617, 1151629, 1150578,\n", - " 1150588, 1136131, 1136142, 1136789, 1148913, 1140451, 1178185, 1144533,\n", - " 1138991, 1152903, 1151311, 1152341, 1153298, 1153311, 1156001, 1136028,\n", - " 1158704, 1152928, 1152886, 1154722, 1154727, 1156422, 1150106, 1150164,\n", - " 1150171, 1148040, 1152601, 1137048, 1168183, 1148628, 1158530, 1158540,\n", - " 1148369, 1137458, 1154563, 1157509, 1142047, 1154368, 1158854, 1148892,\n", - " 1158924, 1152384, 1157064, 1155408, 1155413, 1152833, 1145187, 1137814,\n", - " 1139473, 1135222, 1135231, 1149052, 1135730, 1156629, 1157909, 1156935,\n", - " 1153413, 1135645, 1157783, 1151469, 1139525, 1158308, 1158311, 1151271,\n", - " 1151334, 1155441, 1137979, 1150136, 1154530, 1156919, 1142755, 1142758,\n", - " 1156207, 1151379, 1140187, 1155122, 1160399, 1152527, 1152518, 1149321,\n", - " 1153478, 1151425, 1135406, 1168230, 1157898, 1155620, 1155628, 1155630,\n", - " 1155631, 1154547, 1154555, 1136474, 1158566, 1158824, 1158825, 1153721,\n", - " 1158325, 1155646, 1155645, 1158354, 1143263, 1146935, 1157489, 1162190,\n", - " 1154909, 1143189, 1143521, 1160904, 1150371, 1155608, 1141620, 1150990,\n", - " 1150987, 1143517, 1157933, 1137152, 1157663, 1158126, 1171834, 1158578,\n", - " 1153786, 1149913, 1158204, 1159116, 1138257, 1158350, 1145695, 1154014,\n", - " 1134685, 1135601, 1135611, 1148149, 1158665, 1157685, 1156092, 1156081,\n", - " 1144451, 1152220, 1167310, 1140380, 1140381, 1140374, 1157739, 1159132,\n", - " 1144843, 1155971, 1155975, 1158846, 1155393, 1149702, 1149700, 1154600,\n", - " 1161311, 1153503, 1136896, 1158753, 1158760, 1158886, 1157296, 1158815,\n", - " 1136487, 1136494, 1161616, 1159241, 1153808, 1140049, 1142178, 1157823,\n", - " 1158558, 1158547, 1153834, 1151140, 1165497, 1163814, 1138110, 1144581,\n", - " 1158257, 1150011, 1155521, 1155528, 1164276, 1162431, 1167359, 1159052,\n", - " 1159057, 1155197, 1153052, 1153045, 1155769, 1155772, 1166243, 1156226,\n", - " 1144158, 1166258, 1153842, 1138393, 1142679, 1150046, 1150041, 1149070,\n", - " 1155476, 1147300, 1165386, 1149956, 1149963, 1154590, 1139286, 1139281,\n", - " 1169745, 1148773, 1146063, 1164429, 1140643, 1141861, 1148603, 1148607,\n", - " 1172727, 1164990, 1143143, 1156177, 1159025, 1159029, 1159032, 1166279,\n", - " 1152245, 1152247, 1152250, 1178146, 1187374, 1148567, 1144990, 1167931,\n", - " 1170577, 1149012, 1153239, 1152776, 1145139, 1151650, 1147426, 1147427,\n", - " 1157044, 1156739, 1157955, 1153663, 1171040, 1168748, 1144812, 1162085,\n", - " 1165713, 1156303, 1145228, 1169281, 1147694, 1152624, 1148124, 1145892,\n", - " 1145900, 1145902, 1153535, 1143395, 1143397, 1171230, 1158724, 1167503,\n", - " 1154076, 1147338, 1144690, 1145489, 1171975, 1155172, 1155170, 1150518,\n", - " 1177234, 1156113, 1156119, 1144336, 1147746, 1154670, 1135854, 1169154,\n", - " 1169162, 1138142, 1141045, 1141043, 1151674, 1169359, 1154352, 1149452,\n", - " 1158611, 1158623, 1149847, 1165903, 1165109, 1155494, 1152353, 1168400,\n", - " 1172838, 1173307, 1153751, 1172785, 1172791, 1159653, 1157158, 1157153,\n", - " 1147696, 1147711, 1151850, 1148131, 1147925, 1157593, 1189748, 1166820,\n", - " 1135021, 1168825, 1146765, 1167898, 1170027, 1172601, 1144545, 1153427,\n", - " 1159100, 1166682, 1170874, 1181772, 1183655, 1177115, 1150234, 1154148,\n", - " 1167510, 1149173, 1181860, 1143279, 1169765, 1171297, 1179918, 1153137,\n", - " 1144910, 1164467, 1166554, 1161255, 1155262, 1171773, 1154707, 1154718,\n", - " 1157795, 1178358, 1155802, 1157134, 1162828, 1162819, 1172154, 1182011,\n", - " 1153898, 1178532, 1134650, 1162403, 1145626, 1180800, 1149744, 1153601,\n", - " 1157763, 1157771, 1155985, 1158771, 1145088, 1158517, 1158940, 1166616,\n", - " 1158371, 1155890, 1155892, 1157268, 1157276, 1182797, 1140399, 1168280,\n", - " 1168533, 1168886, 1168889, 1171641, 1161395, 1168870, 1164228, 1179090,\n", - " 1154957, 1166781, 1170341, 1172636, 1159532, 1168943, 1170431, 1139831,\n", - " 1139837, 1150265, 1149668, 1163848, 1156055, 1146395, 1188671, 1180098,\n", - " 1186690, 1192166, 1188390, 1168678, 1182057, 1181283, 1178976, 1151774,\n", - " 1152112, 1169786, 1171201, 1167089, 1172423, 1145395, 1155958, 1187846,\n", - " 1178304, 1162656, 1189038, 1189075, 1174695, 1157008], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137209, 1141424, 1136230, 1140282, 1135926, 1141758, 1138335, 1136223,\n", - " 1141260, 1140297, 1136155, 1142525, 1136962, 1136965, 1143600, 1149831,\n", - " 1139811, 1145374, 1145999, 1139141, 1143372, 1139615, 1140781, 1148976,\n", - " 1150497, 1148576, 1149216, 1149220, 1155683, 1155689, 1149646, 1135991,\n", - " 1149283, 1153940, 1144636, 1144632, 1146992, 1146996, 1148343, 1146656,\n", - " 1146660, 1146472, 1152666, 1138345, 1147100, 1141904, 1137220, 1147211,\n", - " 1150329, 1138749, 1137829, 1138112, 1135183, 1138356, 1151520, 1151530,\n", - " 1134735, 1140953, 1135367, 1140767, 1141036, 1134794, 1157443, 1136521,\n", - " 1143389, 1138504, 1137329, 1136178, 1137693, 1136610, 1136617, 1144786,\n", - " 1144395, 1136826, 1137529, 1135408, 1136714, 1137441, 1137448, 1156159,\n", - " 1139161, 1135583, 1142607, 1148860, 1155076, 1155081, 1140712, 1138514,\n", - " 1153099, 1137959, 1135499, 1156899, 1156908, 1135522, 1139684, 1139685,\n", - " 1137287, 1138440, 1138451, 1138452, 1138461, 1138449, 1154788, 1154787,\n", - " 1136594, 1138889, 1156606, 1147116, 1142611, 1135359, 1135631, 1141523,\n", - " 1141520, 1139673, 1139674, 1138079, 1142255, 1134992, 1134778, 1136551,\n", - " 1140199, 1158974, 1159019, 1144410, 1143625, 1139085, 1138648, 1138148,\n", - " 1138150, 1141963, 1146077, 1140550, 1141985, 1152044, 1142295, 1142302,\n", - " 1137732, 1137728, 1147317, 1134922, 1134742, 1135549, 1141088, 1141097,\n", - " 1141098, 1148998, 1149001, 1141980, 1136397, 1136392, 1143225, 1139025,\n", - " 1139033, 1146844, 1152719, 1141681, 1136625, 1161173, 1141224, 1141648,\n", - " 1136921, 1141159, 1138785, 1139495, 1144937, 1136752, 1168566, 1141608,\n", - " 1162799, 1136862, 1147850, 1144428, 1138490, 1142050, 1146796, 1153666,\n", - " 1140163, 1137766, 1137762, 1137243, 1138708, 1144596, 1136864, 1144182,\n", - " 1137606, 1150906, 1161095, 1141760, 1158698, 1158690, 1140501, 1137852,\n", - " 1137841, 1147153, 1141365, 1141678, 1139508, 1138814, 1139127, 1139130,\n", - " 1144998, 1145001, 1143784, 1143785, 1139168, 1140980, 1146693, 1146695,\n", - " 1152976, 1152978, 1135459, 1141925, 1144242, 1145329, 1145331, 1145339,\n", - " 1140689, 1136891, 1137570, 1143844, 1163657, 1146024, 1141585, 1142533,\n", - " 1139990, 1143293, 1143294, 1151124, 1147543, 1147540, 1147282, 1142816,\n", - " 1149155, 1140346, 1148003, 1149608, 1143051, 1148414, 1136160, 1157717,\n", - " 1157720, 1148225, 1139296, 1139301, 1139328, 1144768, 1145427, 1143345,\n", - " 1144767, 1144619, 1144615, 1169022, 1138004, 1150919, 1146514, 1146523,\n", - " 1143456, 1143457, 1137703, 1142000, 1135441, 1149082, 1143798, 1146636,\n", - " 1140364, 1137985, 1149489, 1148966, 1147984, 1147996, 1147999, 1147127,\n", - " 1148704, 1151002, 1141327, 1141825, 1146742, 1148468, 1148473, 1153701,\n", - " 1149714, 1147027, 1147972, 1141135, 1158226, 1158235, 1151646, 1145240,\n", - " 1146178, 1151242, 1148215, 1150438, 1149258, 1154438, 1144514, 1145833,\n", - " 1152013, 1151998, 1151997, 1151480, 1145262, 1146723, 1148696, 1150127,\n", - " 1147019, 1147021, 1141949, 1150736, 1150837, 1150843, 1150728, 1149996,\n", - " 1154985, 1149412, 1148288, 1135085, 1147871, 1139096, 1139097, 1154420,\n", - " 1151369, 1152561, 1136251, 1136247, 1146676, 1138877, 1138404, 1157968,\n", - " 1157983, 1148729, 1144110, 1153181, 1154166, 1153124, 1153186, 1153188,\n", - " 1145104, 1145107, 1150934, 1150935, 1144861, 1155098, 1147446, 1151811,\n", - " 1152581, 1135307, 1135311, 1154183, 1154190, 1146571, 1141420, 1141419,\n", - " 1136009, 1155152, 1155161, 1147737, 1149385, 1155061, 1146969, 1146967,\n", - " 1156409, 1147381, 1149359, 1146623, 1151694, 1142986, 1146492, 1144476,\n", - " 1135688, 1152097, 1146287, 1153030, 1150085, 1137746, 1146307, 1146304,\n", - " 1155337, 1154112, 1154123, 1157826, 1152673, 1151617, 1151629, 1150578,\n", - " 1150588, 1136131, 1136142, 1136789, 1148913, 1140451, 1178185, 1144533,\n", - " 1138991, 1152903, 1151311, 1152341, 1153298, 1153311, 1156001, 1136028,\n", - " 1158704, 1152928, 1152886, 1154722, 1154727, 1156422, 1150106, 1150164,\n", - " 1150171, 1148040, 1152601, 1137048, 1168183, 1148628, 1158530, 1158540,\n", - " 1148369, 1137458, 1154563, 1157509, 1142047, 1154368, 1158854, 1148892,\n", - " 1158924, 1152384, 1157064, 1155408, 1155413, 1152833, 1145187, 1137814,\n", - " 1139473, 1135222, 1135231, 1149052, 1135730, 1156629, 1157909, 1156935,\n", - " 1153413, 1135645, 1157783, 1151469, 1139525, 1158308, 1158311, 1151271,\n", - " 1151334, 1155441, 1137979, 1150136, 1154530, 1156919, 1142755, 1142758,\n", - " 1156207, 1151379, 1140187, 1155122, 1160399, 1152527, 1152518, 1149321,\n", - " 1153478, 1151425, 1135406, 1168230, 1157898, 1155620, 1155628, 1155630,\n", - " 1155631, 1154547, 1154555, 1136474, 1158566, 1158824, 1158825, 1153721,\n", - " 1158325, 1155646, 1155645, 1158354, 1143263, 1146935, 1157489, 1162190,\n", - " 1154909, 1143189, 1143521, 1160904, 1150371, 1155608, 1141620, 1150990,\n", - " 1150987, 1143517, 1157933, 1137152, 1157663, 1158126, 1171834, 1158578,\n", - " 1153786, 1149913, 1158204, 1159116, 1138257, 1158350, 1145695, 1154014,\n", - " 1134685, 1135601, 1135611, 1148149, 1158665, 1157685, 1156092, 1156081,\n", - " 1144451, 1152220, 1167310, 1140380, 1140381, 1140374, 1157739, 1159132,\n", - " 1144843, 1155971, 1155975, 1158846, 1155393, 1149702, 1149700, 1154600,\n", - " 1161311, 1153503, 1136896, 1158753, 1158760, 1158886, 1157296, 1158815,\n", - " 1136487, 1136494, 1161616, 1159241, 1153808, 1140049, 1142178, 1157823,\n", - " 1158558, 1158547, 1153834, 1151140, 1165497, 1163814, 1138110, 1144581,\n", - " 1158257, 1150011, 1155521, 1155528, 1164276, 1162431, 1167359, 1159052,\n", - " 1159057, 1155197, 1153052, 1153045, 1155769, 1155772, 1166243, 1156226,\n", - " 1144158, 1166258, 1153842, 1138393, 1142679, 1150046, 1150041, 1149070,\n", - " 1155476, 1147300, 1165386, 1149956, 1149963, 1154590, 1139286, 1139281,\n", - " 1169745, 1148773, 1146063, 1164429, 1140643, 1141861, 1148603, 1148607,\n", - " 1172727, 1164990, 1143143, 1156177, 1159025, 1159029, 1159032, 1166279,\n", - " 1152245, 1152247, 1152250, 1178146, 1187374, 1148567, 1144990, 1167931,\n", - " 1170577, 1149012, 1153239, 1152776, 1145139, 1151650, 1147426, 1147427,\n", - " 1157044, 1156739, 1157955, 1153663, 1171040, 1168748, 1144812, 1162085,\n", - " 1165713, 1156303, 1145228, 1169281, 1147694, 1152624, 1148124, 1145892,\n", - " 1145900, 1145902, 1153535, 1143395, 1143397, 1171230, 1158724, 1167503,\n", - " 1154076, 1147338, 1144690, 1145489, 1171975, 1155172, 1155170, 1150518,\n", - " 1177234, 1156113, 1156119, 1144336, 1147746, 1154670, 1135854, 1169154,\n", - " 1169162, 1138142, 1141045, 1141043, 1151674, 1169359, 1154352, 1149452,\n", - " 1158611, 1158623, 1149847, 1165903, 1165109, 1155494, 1152353, 1168400,\n", - " 1172838, 1173307, 1153751, 1172785, 1172791, 1159653, 1157158, 1157153,\n", - " 1147696, 1147711, 1151850, 1148131, 1147925, 1157593, 1189748, 1166820,\n", - " 1135021, 1168825, 1146765, 1167898, 1170027, 1172601, 1144545, 1153427,\n", - " 1159100, 1166682, 1170874, 1181772, 1183655, 1177115, 1150234, 1154148,\n", - " 1167510, 1149173, 1181860, 1143279, 1169765, 1171297, 1179918, 1153137,\n", - " 1144910, 1164467, 1166554, 1161255, 1155262, 1171773, 1154707, 1154718,\n", - " 1157795, 1178358, 1155802, 1157134, 1162828, 1162819, 1172154, 1182011,\n", - " 1153898, 1178532, 1134650, 1162403, 1145626, 1180800, 1149744, 1153601,\n", - " 1157763, 1157771, 1155985, 1158771, 1145088, 1158517, 1158940, 1166616,\n", - " 1158371, 1155890, 1155892, 1157268, 1157276, 1182797, 1140399, 1168280,\n", - " 1168533, 1168886, 1168889, 1171641, 1161395, 1168870, 1164228, 1179090,\n", - " 1154957, 1166781, 1170341, 1172636, 1159532, 1168943, 1170431, 1139831,\n", - " 1139837, 1150265, 1149668, 1163848, 1156055, 1146395, 1188671, 1180098,\n", - " 1186690, 1192166, 1188390, 1168678, 1182057, 1181283, 1178976, 1151774,\n", - " 1152112, 1169786, 1171201, 1167089, 1172423, 1145395, 1155958, 1187846,\n", - " 1178304, 1162656, 1189038, 1189075, 1174695, 1157008], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195442, 1196013, 1198769, 1199439, 1199306, 1195406, 1197719, 1200225,\n", - " 1195859, 1199282, 1198451, 1202255, 1201582, 1199278, 1194626, 1201016,\n", - " 1197359, 1198694, 1196871, 1202803, 1198557, 1197516, 1194866, 1195494,\n", - " 1195498, 1196624, 1195263, 1197921, 1197930, 1201992, 1199519, 1194882,\n", - " 1195895, 1199172, 1196359, 1196979, 1194754, 1195325, 1196835, 1198262,\n", - " 1195980, 1198643, 1198163, 1195145, 1195216, 1197141, 1197140, 1196242,\n", - " 1197273, 1194923, 1194859, 1195841, 1195850, 1198915, 1195659, 1197474,\n", - " 1197478, 1197476, 1196393, 1195351, 1198280, 1199329, 1199856, 1194928,\n", - " 1197577, 1199628, 1197990, 1199154, 1199038, 1198400, 1199231, 1199949,\n", - " 1201511, 1197695, 1196508, 1200668, 1199021, 1197970, 1196727, 1196734,\n", - " 1195773, 1200892, 1198428, 1200016, 1199410, 1199418, 1198811, 1195598,\n", - " 1198075, 1199445, 1201421, 1201156, 1202403, 1201056, 1200363, 1200515,\n", - " 1197097, 1197100, 1200690, 1200692, 1199908, 1202239, 1199482, 1200899,\n", - " 1200907, 1195876, 1195885, 1201291, 1198478, 1203329, 1202889, 1200245,\n", - " 1196960, 1196963, 1200785, 1199606, 1195438, 1195664, 1200445, 1198929,\n", - " 1201789, 1197816, 1197822, 1198118, 1196597, 1198587, 1198299, 1196373,\n", - " 1203102, 1198147, 1198824, 1197735, 1195070, 1203077, 1200296, 1197652,\n", - " 1195082, 1197035, 1201875, 1196428, 1197872], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195442, 1196013, 1198769, 1199439, 1199306, 1195406, 1197719, 1200225,\n", - " 1195859, 1199282, 1198451, 1202255, 1201582, 1199278, 1194626, 1201016,\n", - " 1197359, 1198694, 1196871, 1202803, 1198557, 1197516, 1194866, 1195494,\n", - " 1195498, 1196624, 1195263, 1197921, 1197930, 1201992, 1199519, 1194882,\n", - " 1195895, 1199172, 1196359, 1196979, 1194754, 1195325, 1196835, 1198262,\n", - " 1195980, 1198643, 1198163, 1195145, 1195216, 1197141, 1197140, 1196242,\n", - " 1197273, 1194923, 1194859, 1195841, 1195850, 1198915, 1195659, 1197474,\n", - " 1197478, 1197476, 1196393, 1195351, 1198280, 1199329, 1199856, 1194928,\n", - " 1197577, 1199628, 1197990, 1199154, 1199038, 1198400, 1199231, 1199949,\n", - " 1201511, 1197695, 1196508, 1200668, 1199021, 1197970, 1196727, 1196734,\n", - " 1195773, 1200892, 1198428, 1200016, 1199410, 1199418, 1198811, 1195598,\n", - " 1198075, 1199445, 1201421, 1201156, 1202403, 1201056, 1200363, 1200515,\n", - " 1197097, 1197100, 1200690, 1200692, 1199908, 1202239, 1199482, 1200899,\n", - " 1200907, 1195876, 1195885, 1201291, 1198478, 1203329, 1202889, 1200245,\n", - " 1196960, 1196963, 1200785, 1199606, 1195438, 1195664, 1200445, 1198929,\n", - " 1201789, 1197816, 1197822, 1198118, 1196597, 1198587, 1198299, 1196373,\n", - " 1203102, 1198147, 1198824, 1197735, 1195070, 1203077, 1200296, 1197652,\n", - " 1195082, 1197035, 1201875, 1196428, 1197872], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 3.7105e-02, -1.3527e-03, 4.2256e-01, ..., -6.6401e-05,\n", - " 7.6447e-03, -3.1526e-03],\n", - " [ 4.0365e-02, -7.8962e-04, 3.2802e-01, ..., -2.5635e-04,\n", - " -1.1260e-04, -2.9477e-03],\n", - " [ 2.5862e-02, 1.9690e-02, 2.5833e-01, ..., 1.6905e-02,\n", - " 3.5833e-05, -2.3657e-03],\n", - " ...,\n", - " [-4.0598e-05, -4.9816e-04, 1.9967e-01, ..., -1.0981e-04,\n", - " -2.3607e-04, -2.0168e-03],\n", - " [ 3.7851e-02, -5.9793e-04, 3.3604e-01, ..., -1.6703e-04,\n", - " -2.9006e-04, -2.7442e-03],\n", - " [ 4.6209e-02, -1.0362e-03, 3.7765e-01, ..., -9.7807e-05,\n", - " -1.9519e-05, -2.9966e-03]], device='cuda:0'), 'paper': tensor([[ 2.5282, -0.0357, 2.1807, ..., -0.0117, -0.0145, 2.4289],\n", - " [ 2.4149, -0.0331, 2.1125, ..., -0.0100, -0.0135, 2.5090],\n", - " [ 3.6597, -0.0603, 1.9579, ..., -0.0209, -0.0183, 2.9738],\n", - " ...,\n", - " [ 2.6131, -0.0335, 2.3252, ..., -0.0122, -0.0165, 2.7760],\n", - " [ 2.6058, -0.0358, 2.3406, ..., -0.0088, -0.0164, 3.1312],\n", - " [ 2.4214, -0.0363, 2.5750, ..., -0.0081, -0.0153, 2.9913]],\n", - " device='cuda:0'), 'author': tensor([[ 4.5752e-01, -4.0426e-03, -3.2594e-04, ..., -2.1255e-03,\n", - " -3.6266e-04, 1.1410e-01],\n", - " [ 4.9348e-01, -3.6523e-03, -4.7674e-06, ..., -2.4111e-03,\n", - " 3.6256e-02, 6.6916e-02],\n", - " [ 4.3615e-01, -5.1850e-03, -1.3696e-04, ..., -2.6514e-03,\n", - " 2.1403e-02, 1.3115e-01],\n", - " ...,\n", - " [ 5.1317e-01, -3.0309e-03, -5.9294e-04, ..., -2.1647e-03,\n", - " -2.8141e-04, 8.9414e-02],\n", - " [ 5.1985e-01, -4.9403e-03, -9.7611e-05, ..., -2.1400e-03,\n", - " -1.8231e-04, 1.4859e-01],\n", - " [ 5.2697e-01, -5.0379e-03, -1.8615e-04, ..., -2.1895e-03,\n", - " 6.7784e-02, 1.7441e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0086, 0.1595, -0.0033, ..., 1.0185, -0.0034, -0.0060],\n", - " [-0.0110, 0.1150, -0.0041, ..., 1.1674, -0.0029, -0.0062],\n", - " [-0.0091, 0.1814, -0.0030, ..., 1.0563, -0.0029, -0.0061],\n", - " ...,\n", - " [-0.0104, 0.1433, -0.0032, ..., 1.0087, -0.0019, -0.0067],\n", - " [-0.0106, 0.1793, -0.0032, ..., 0.9327, -0.0023, -0.0071],\n", - " [-0.0105, 0.2317, -0.0032, ..., 1.0526, -0.0033, -0.0067]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 109, 21, 186, 186, 186, 109, 109, 200, 558, 267, 458, 375,\n", - " 550, 432, 680, 680, 750, 628, 628, 697, 992, 1106, 844, 851,\n", - " 1308, 1381, 1100, 1100, 1184, 1184, 1184, 1316, 1319, 1316, 1581, 1256,\n", - " 1643, 1643, 1582, 1593, 1607, 1607, 1643, 1643, 1522, 1593, 1593, 1593,\n", - " 1510, 1510, 1678, 1667, 1701, 1667, 1834, 1871, 1871, 1873, 1928, 1906,\n", - " 1945, 1945, 2080, 2054, 1928, 1928, 2147, 2093, 2077, 2441, 2441, 2441,\n", - " 2394, 2235, 2235, 2235, 2377, 2309, 2488, 2360, 2360, 2537, 2734, 2707,\n", - " 2633, 2807, 2880, 2595, 2595, 2595, 2595, 2851, 2853, 2853, 2847, 2851,\n", - " 2851, 2739, 2739, 2739, 3051, 3051, 2819, 2819, 2819, 3035, 3074, 2957,\n", - " 3115, 3082, 3082, 3036, 3074, 3074, 3074, 3170, 3336, 3331, 3319, 3288,\n", - " 3207, 3473, 3473, 3574, 3479, 3526, 3850, 3850, 4213, 3749, 4286, 4117,\n", - " 4004, 3663, 4281, 4151, 4274, 4183, 4183, 4451, 4113, 4459, 4459, 4528,\n", - " 4576, 4597, 4596, 4622, 4723, 4906, 4718, 4648, 4719, 5076, 5012, 4832,\n", - " 4832, 4832, 4918, 5047, 5037, 5199, 5137, 5137, 5137, 5158, 5158, 5077,\n", - " 5077, 5077, 5234, 5230, 5558, 5230, 5396, 5554, 5554, 5375, 5375, 5375,\n", - " 5375, 5375, 5354, 5485, 5485, 5756, 5718, 5718, 5815, 5646, 5972, 5828,\n", - " 5828, 5763, 5763, 5831, 5943, 6142, 6126, 6365, 6365, 5864, 6252, 6653,\n", - " 6625, 6524, 6746, 6635, 6524, 6524, 6612, 6469, 6874, 6756, 6756, 6756,\n", - " 6756, 6756, 6756, 6409, 6746, 6746, 6655, 6501, 6939, 6822],\n", - " [ 111, 42, 48, 140, 109, 59, 58, 9, 96, 51, 101, 131,\n", - " 78, 65, 133, 129, 29, 129, 7, 63, 83, 99, 77, 136,\n", - " 120, 97, 107, 121, 44, 39, 29, 108, 138, 31, 78, 105,\n", - " 20, 85, 19, 37, 34, 65, 14, 139, 43, 71, 94, 96,\n", - " 46, 78, 14, 118, 36, 79, 98, 88, 114, 103, 32, 16,\n", - " 91, 22, 106, 6, 94, 134, 6, 129, 81, 73, 67, 95,\n", - " 69, 122, 49, 61, 90, 64, 138, 123, 65, 129, 108, 101,\n", - " 65, 11, 53, 78, 135, 139, 87, 1, 56, 137, 90, 103,\n", - " 125, 26, 10, 117, 89, 41, 126, 90, 76, 60, 128, 26,\n", - " 65, 24, 127, 78, 3, 71, 134, 118, 26, 131, 29, 47,\n", - " 80, 54, 4, 28, 62, 65, 78, 116, 112, 99, 104, 17,\n", - " 32, 18, 122, 56, 65, 27, 50, 99, 11, 116, 65, 99,\n", - " 101, 101, 110, 90, 72, 140, 20, 23, 33, 62, 6, 69,\n", - " 8, 90, 11, 14, 25, 13, 0, 92, 6, 44, 29, 82,\n", - " 2, 102, 122, 115, 78, 12, 78, 66, 30, 40, 44, 100,\n", - " 39, 15, 52, 78, 50, 78, 21, 130, 78, 121, 98, 119,\n", - " 75, 78, 140, 78, 6, 29, 74, 86, 132, 93, 103, 124,\n", - " 124, 38, 6, 66, 84, 130, 78, 33, 11, 5, 130, 45,\n", - " 113, 108, 68, 12, 55, 35, 115, 57, 107, 70]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2802, 2135, 356, ..., 1388, 4938, 3028],\n", - " [ 222, 10, 54, ..., 5783, 5630, 5787]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 65, 124, 73, ..., 99, 73, 65],\n", - " [ 90, 197, 10, ..., 7009, 7053, 7043]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 260, 260, 260, ..., 5649, 5787, 5787],\n", - " [ 339, 377, 683, ..., 363, 630, 272]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 606, 230, 168, ..., 312, 649, 272],\n", - " [ 129, 66, 81, ..., 5704, 5608, 5672]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 197, 706, 423, ..., 4934, 4325, 3321],\n", - " [ 78, 30, 30, ..., 6781, 6958, 7011]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 172, 172, 172, ..., 5787, 5787, 5787],\n", - " [1567, 682, 176, ..., 1049, 1514, 2185]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 30, 30, 30, ..., 6979, 6979, 6979],\n", - " [4275, 422, 860, ..., 2693, 2628, 2593]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005711\n", - "sampling 0.005556\n", - "noi time: 0.001786\n", - "get_vertex_data call: 0.04332\n", - "noi group time: 0.003485\n", - "eoi_group_time: 0.014966\n", - "second half: 0.223663\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16823, 31572, 31571, ..., 1132469, 1125891, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16823, 31572, 31571, ..., 1132469, 1125891, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1230240, 1230254, 1212192, ..., 1931109, 1933696, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1230240, 1230254, 1212192, ..., 1931109, 1933696, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1141424, 1136228, ..., 1167741, 1187536, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1141424, 1136228, ..., 1167741, 1187536, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196007, 1196011, 1198731, 1199282, 1199292, 1202255, 1198844, 1201577,\n", - " 1201582, 1194626, 1200650, 1197777, 1199248, 1201015, 1203048, 1198628,\n", - " 1198633, 1198690, 1197383, 1194770, 1194655, 1195097, 1195263, 1201992,\n", - " 1198542, 1197697, 1199519, 1195463, 1194889, 1195888, 1199171, 1196334,\n", - " 1196359, 1196618, 1197831, 1195313, 1196835, 1196171, 1197793, 1199117,\n", - " 1198163, 1198167, 1196704, 1196711, 1199810, 1195270, 1195278, 1197141,\n", - " 1200755, 1196249, 1196109, 1195847, 1195850, 1198915, 1195659, 1195650,\n", - " 1202916, 1198195, 1198205, 1196122, 1202017, 1195353, 1198273, 1200949,\n", - " 1199060, 1199965, 1194928, 1199685, 1199628, 1197676, 1200116, 1200118,\n", - " 1199676, 1198765, 1198762, 1201511, 1196498, 1200670, 1197970, 1196727,\n", - " 1195773, 1202618, 1200894, 1200895, 1198811, 1200621, 1201827, 1200452,\n", - " 1200169, 1198593, 1201079, 1201156, 1201056, 1200913, 1200918, 1200363,\n", - " 1195815, 1202046, 1200546, 1200555, 1197097, 1199879, 1202138, 1199908,\n", - " 1201027, 1202239, 1199482, 1197546, 1201291, 1196966, 1200784, 1200793,\n", - " 1202685, 1202687, 1199606, 1195438, 1195679, 1195664, 1196929, 1195177,\n", - " 1197822, 1198127, 1202433, 1199659, 1203102, 1194730, 1199403, 1198147,\n", - " 1200437, 1198819, 1201886, 1200301, 1197652, 1195082, 1203162, 1197872,\n", - " 1198748], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196007, 1196011, 1198731, 1199282, 1199292, 1202255, 1198844, 1201577,\n", - " 1201582, 1194626, 1200650, 1197777, 1199248, 1201015, 1203048, 1198628,\n", - " 1198633, 1198690, 1197383, 1194770, 1194655, 1195097, 1195263, 1201992,\n", - " 1198542, 1197697, 1199519, 1195463, 1194889, 1195888, 1199171, 1196334,\n", - " 1196359, 1196618, 1197831, 1195313, 1196835, 1196171, 1197793, 1199117,\n", - " 1198163, 1198167, 1196704, 1196711, 1199810, 1195270, 1195278, 1197141,\n", - " 1200755, 1196249, 1196109, 1195847, 1195850, 1198915, 1195659, 1195650,\n", - " 1202916, 1198195, 1198205, 1196122, 1202017, 1195353, 1198273, 1200949,\n", - " 1199060, 1199965, 1194928, 1199685, 1199628, 1197676, 1200116, 1200118,\n", - " 1199676, 1198765, 1198762, 1201511, 1196498, 1200670, 1197970, 1196727,\n", - " 1195773, 1202618, 1200894, 1200895, 1198811, 1200621, 1201827, 1200452,\n", - " 1200169, 1198593, 1201079, 1201156, 1201056, 1200913, 1200918, 1200363,\n", - " 1195815, 1202046, 1200546, 1200555, 1197097, 1199879, 1202138, 1199908,\n", - " 1201027, 1202239, 1199482, 1197546, 1201291, 1196966, 1200784, 1200793,\n", - " 1202685, 1202687, 1199606, 1195438, 1195679, 1195664, 1196929, 1195177,\n", - " 1197822, 1198127, 1202433, 1199659, 1203102, 1194730, 1199403, 1198147,\n", - " 1200437, 1198819, 1201886, 1200301, 1197652, 1195082, 1203162, 1197872,\n", - " 1198748], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 3.3645e-02, 7.5220e-03, 2.7641e-01, ..., 2.2626e-02,\n", - " -2.0232e-05, -2.7527e-03],\n", - " [ 4.3025e-03, -5.7827e-04, 3.1533e-01, ..., 1.9469e-02,\n", - " -2.9368e-04, -2.2535e-03],\n", - " [ 9.8316e-03, -1.2329e-04, 2.8617e-01, ..., 4.4017e-02,\n", - " -7.9027e-04, -3.1791e-03],\n", - " ...,\n", - " [ 4.3309e-02, -1.0923e-03, 3.5795e-01, ..., -2.7635e-04,\n", - " -2.1757e-04, -3.0707e-03],\n", - " [ 6.0949e-02, -7.1309e-04, 3.2420e-01, ..., -2.0169e-04,\n", - " -1.6517e-04, -2.7802e-03],\n", - " [ 5.7141e-02, 1.9173e-02, 2.7510e-01, ..., -4.6545e-05,\n", - " 4.5796e-03, -2.6828e-03]], device='cuda:0'), 'paper': tensor([[ 3.8683, -0.0624, 2.0550, ..., -0.0207, -0.0178, 3.3612],\n", - " [ 4.0232, -0.0537, 3.6327, ..., -0.0187, -0.0281, 4.2506],\n", - " [ 2.6566, -0.0334, 2.0936, ..., -0.0107, -0.0137, 2.4968],\n", - " ...,\n", - " [ 2.6392, -0.0366, 2.3550, ..., -0.0120, -0.0149, 2.4996],\n", - " [ 3.8252, -0.0515, 3.3045, ..., -0.0194, -0.0284, 4.2077],\n", - " [ 2.4536, -0.0365, 2.6319, ..., -0.0082, -0.0158, 3.0685]],\n", - " device='cuda:0'), 'author': tensor([[ 4.6289e-01, -3.2173e-03, 6.2695e-02, ..., -1.3993e-03,\n", - " -1.6679e-03, 1.7603e-02],\n", - " [ 5.4192e-01, -5.0866e-03, -1.8860e-04, ..., -2.3448e-03,\n", - " 5.4560e-02, 1.6000e-01],\n", - " [ 4.6430e-01, -4.0082e-03, -4.4303e-04, ..., -1.7690e-03,\n", - " -1.9022e-04, 1.3828e-01],\n", - " ...,\n", - " [ 4.9768e-01, -3.4308e-03, 5.4789e-03, ..., -1.9461e-03,\n", - " -2.5092e-04, 8.9439e-02],\n", - " [-3.9500e-04, -3.7329e-04, 1.4553e-01, ..., 9.1423e-02,\n", - " -2.6445e-04, -9.5572e-04],\n", - " [ 5.3041e-01, -5.4203e-03, -5.9159e-05, ..., -2.6161e-03,\n", - " 6.6782e-02, 1.7986e-01]], device='cuda:0'), 'field_of_study': tensor([[-9.6562e-03, 1.4950e-01, -2.8582e-03, ..., 8.2047e-01,\n", - " -1.1793e-03, -5.5273e-03],\n", - " [-9.2996e-03, 1.5932e-01, -4.1417e-03, ..., 1.0995e+00,\n", - " -1.7679e-03, -6.2581e-03],\n", - " [-1.1770e-02, 4.0785e-01, -3.5028e-03, ..., 1.4419e+00,\n", - " -2.6472e-03, -5.6451e-03],\n", - " ...,\n", - " [-8.4236e-03, 1.7897e-01, -3.2937e-03, ..., 1.0512e+00,\n", - " -3.4344e-03, -6.7070e-03],\n", - " [-8.9395e-03, 2.1388e-01, -3.9622e-03, ..., 1.1690e+00,\n", - " -2.8470e-03, -8.1924e-03],\n", - " [-1.2310e-02, 4.5425e-01, -4.4314e-03, ..., 1.4772e+00,\n", - " -2.4391e-03, -1.0109e-02]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 88, 7, 184, 184, 109, 63, 33, 108, 51, 129, 129, 490,\n", - " 335, 524, 313, 313, 239, 239, 418, 528, 723, 605, 605, 489,\n", - " 528, 532, 723, 723, 723, 1133, 853, 869, 1009, 1009, 1126, 1126,\n", - " 813, 813, 1003, 1155, 907, 907, 907, 1346, 1036, 1148, 1263, 1583,\n", - " 1510, 1510, 1507, 1272, 1272, 1354, 1354, 1499, 1586, 1778, 1420, 1420,\n", - " 1495, 1598, 1598, 1419, 1419, 1419, 1727, 1676, 1676, 1676, 1676, 1677,\n", - " 1680, 1827, 1796, 1904, 1904, 1946, 1869, 1871, 2255, 2237, 1978, 2319,\n", - " 2193, 2250, 2162, 2170, 2178, 2312, 2248, 2381, 2538, 2667, 2667, 2612,\n", - " 2662, 2603, 2628, 2628, 2652, 2620, 2754, 2754, 2649, 2806, 2806, 2712,\n", - " 2712, 2978, 2711, 2883, 2883, 2872, 2654, 2654, 2941, 3021, 3556, 3497,\n", - " 3556, 3556, 3556, 3556, 3553, 3432, 3507, 3448, 3661, 3717, 3946, 3863,\n", - " 3863, 3901, 3960, 3991, 4071, 4083, 4114, 4059, 4059, 4283, 4283, 4222,\n", - " 4222, 4222, 4512, 4540, 4639, 4681, 4680, 4527, 4730, 4730, 4731, 4854,\n", - " 5041, 5041, 5089, 5089, 5228, 5228, 5346, 5235, 5235, 5296, 5234, 5234,\n", - " 5235, 5497, 5240, 5240, 5240, 5235, 5235, 5459, 5752, 5363, 5655, 5366,\n", - " 5769, 5769, 5526, 5552, 5680, 5481, 5726, 5600, 5606, 5606, 5739, 5739,\n", - " 5739, 5739, 5739, 5711, 5560, 5633, 5778, 5778, 5691, 5780, 5754, 5810,\n", - " 5737, 5737, 5918, 5918, 5937, 5951, 5951],\n", - " [ 112, 77, 103, 75, 31, 21, 106, 19, 37, 76, 107, 65,\n", - " 2, 73, 74, 58, 105, 104, 1, 103, 14, 102, 86, 114,\n", - " 25, 72, 127, 84, 136, 4, 23, 85, 111, 124, 24, 13,\n", - " 17, 83, 29, 97, 19, 98, 105, 133, 118, 81, 119, 126,\n", - " 88, 17, 15, 6, 31, 64, 11, 79, 22, 68, 122, 102,\n", - " 99, 9, 49, 9, 103, 101, 43, 44, 62, 57, 39, 71,\n", - " 119, 125, 59, 124, 132, 76, 107, 102, 81, 121, 55, 80,\n", - " 40, 66, 83, 119, 37, 72, 103, 21, 18, 3, 42, 105,\n", - " 71, 119, 72, 59, 93, 3, 94, 22, 78, 68, 32, 95,\n", - " 45, 19, 28, 55, 65, 115, 100, 67, 105, 55, 61, 129,\n", - " 41, 94, 116, 69, 27, 22, 119, 56, 105, 72, 71, 53,\n", - " 22, 22, 19, 17, 63, 19, 130, 118, 30, 30, 118, 131,\n", - " 7, 70, 35, 5, 102, 96, 128, 19, 40, 16, 123, 8,\n", - " 0, 56, 82, 79, 79, 92, 48, 110, 90, 54, 3, 131,\n", - " 51, 79, 60, 122, 102, 38, 103, 26, 109, 79, 33, 34,\n", - " 20, 79, 134, 41, 117, 108, 81, 114, 79, 116, 89, 36,\n", - " 91, 10, 113, 87, 52, 12, 79, 135, 47, 66, 135, 79,\n", - " 79, 117, 50, 79, 120, 79, 46]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[4029, 898, 7431, ..., 1210, 804, 4733],\n", - " [ 326, 68, 11, ..., 8118, 8074, 8021]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 17, 125, 17, ..., 123, 31, 13],\n", - " [ 157, 60, 148, ..., 5958, 5922, 5988]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 109, 109, 109, ..., 8063, 8063, 8063],\n", - " [ 117, 920, 374, ..., 670, 1003, 951]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 692, 699, 1069, ..., 438, 640, 231],\n", - " [ 309, 334, 122, ..., 8178, 8149, 8076]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1832, 2283, 3052, ..., 3670, 6896, 7629],\n", - " [ 55, 159, 159, ..., 5891, 5987, 5919]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 109, 109, 109, ..., 8098, 8098, 8098],\n", - " [3460, 3598, 4136, ..., 7628, 3863, 6529]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 109, 109, 109, ..., 5937, 5937, 5937],\n", - " [1349, 3051, 5660, ..., 3942, 1042, 1898]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005758\n", - "sampling 0.005604\n", - "noi time: 0.00118\n", - "get_vertex_data call: 0.028156\n", - "noi group time: 0.002205\n", - "eoi_group_time: 0.013704\n", - "second half: 0.200731\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31149, 32616, 20109, ..., 1123988, 1100728, 1100733],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31149, 32616, 20109, ..., 1123988, 1100728, 1100733],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1232973, 1214756, 1232754, ..., 1939381, 1921018, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1232973, 1214756, 1232754, ..., 1939381, 1921018, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1137426, 1141424, ..., 1167459, 1189800, 1186149],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1137426, 1141424, ..., 1167459, 1189800, 1186149],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199428, 1196800, 1198731, 1199835, 1201097, 1199282, 1198459, 1202255,\n", - " 1201582, 1197777, 1199248, 1203048, 1198696, 1198557, 1198180, 1197158,\n", - " 1195263, 1201992, 1198095, 1195475, 1197760, 1195895, 1194976, 1196521,\n", - " 1194752, 1195313, 1195325, 1195982, 1198958, 1198643, 1198167, 1196704,\n", - " 1195221, 1195225, 1195216, 1195265, 1195270, 1195278, 1197140, 1196255,\n", - " 1197273, 1196109, 1195841, 1195541, 1195631, 1199699, 1199710, 1197409,\n", - " 1196393, 1196283, 1196286, 1199628, 1199803, 1197676, 1198400, 1198406,\n", - " 1200750, 1201916, 1195017, 1199021, 1197970, 1196727, 1195773, 1202623,\n", - " 1199903, 1198811, 1200503, 1200507, 1198075, 1198066, 1198593, 1199445,\n", - " 1201421, 1201056, 1199761, 1194803, 1202529, 1201851, 1199886, 1200690,\n", - " 1199917, 1201442, 1201024, 1201029, 1202239, 1202175, 1201291, 1195610,\n", - " 1196761, 1199925, 1196966, 1196971, 1195664, 1200445, 1198937, 1200277,\n", - " 1201318, 1201321, 1197816, 1197822, 1196597, 1196600, 1198973, 1198587,\n", - " 1200585, 1198299, 1199660, 1203102, 1198147, 1198148, 1198824, 1199782,\n", - " 1198819, 1200465, 1195063, 1201886, 1197652, 1197655, 1201966],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199428, 1196800, 1198731, 1199835, 1201097, 1199282, 1198459, 1202255,\n", - " 1201582, 1197777, 1199248, 1203048, 1198696, 1198557, 1198180, 1197158,\n", - " 1195263, 1201992, 1198095, 1195475, 1197760, 1195895, 1194976, 1196521,\n", - " 1194752, 1195313, 1195325, 1195982, 1198958, 1198643, 1198167, 1196704,\n", - " 1195221, 1195225, 1195216, 1195265, 1195270, 1195278, 1197140, 1196255,\n", - " 1197273, 1196109, 1195841, 1195541, 1195631, 1199699, 1199710, 1197409,\n", - " 1196393, 1196283, 1196286, 1199628, 1199803, 1197676, 1198400, 1198406,\n", - " 1200750, 1201916, 1195017, 1199021, 1197970, 1196727, 1195773, 1202623,\n", - " 1199903, 1198811, 1200503, 1200507, 1198075, 1198066, 1198593, 1199445,\n", - " 1201421, 1201056, 1199761, 1194803, 1202529, 1201851, 1199886, 1200690,\n", - " 1199917, 1201442, 1201024, 1201029, 1202239, 1202175, 1201291, 1195610,\n", - " 1196761, 1199925, 1196966, 1196971, 1195664, 1200445, 1198937, 1200277,\n", - " 1201318, 1201321, 1197816, 1197822, 1196597, 1196600, 1198973, 1198587,\n", - " 1200585, 1198299, 1199660, 1203102, 1198147, 1198148, 1198824, 1199782,\n", - " 1198819, 1200465, 1195063, 1201886, 1197652, 1197655, 1201966],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 2.2595e-02, -8.9115e-05, 2.7348e-01, ..., 1.3970e-02,\n", - " -8.8858e-05, -2.6376e-03],\n", - " [ 3.4933e-02, -2.7721e-04, 2.9125e-01, ..., 4.6623e-03,\n", - " -1.8289e-04, -2.7561e-03],\n", - " [ 5.2925e-02, -1.0501e-03, 3.7423e-01, ..., -2.3390e-04,\n", - " -1.8492e-04, -3.0481e-03],\n", - " ...,\n", - " [ 8.5104e-03, -3.1097e-04, 3.0241e-01, ..., 2.5190e-02,\n", - " -5.5749e-04, -2.6244e-03],\n", - " [ 4.2583e-02, 2.3968e-02, 2.5961e-01, ..., -8.6307e-05,\n", - " -3.6770e-04, -2.4808e-03],\n", - " [ 4.0925e-02, -3.1793e-04, 2.5607e-01, ..., 7.5521e-03,\n", - " -3.9510e-04, -2.6816e-03]], device='cuda:0'), 'paper': tensor([[ 4.7961, -0.0664, 4.6448, ..., -0.0231, -0.0349, 4.1980],\n", - " [ 3.6133, -0.0561, 2.0663, ..., -0.0164, -0.0165, 3.0444],\n", - " [ 3.6128, -0.0573, 1.9378, ..., -0.0206, -0.0159, 3.0363],\n", - " ...,\n", - " [ 2.2440, -0.0282, 1.9863, ..., -0.0105, -0.0152, 2.1668],\n", - " [ 3.8210, -0.0596, 2.1137, ..., -0.0209, -0.0190, 3.0412],\n", - " [ 2.4541, -0.0365, 2.6362, ..., -0.0085, -0.0157, 3.0635]],\n", - " device='cuda:0'), 'author': tensor([[ 3.7552e-01, -2.8739e-03, -2.7927e-04, ..., -1.6940e-03,\n", - " -1.4958e-03, 1.1806e-01],\n", - " [ 5.0849e-01, -5.4312e-03, -7.1641e-04, ..., -1.9699e-03,\n", - " 2.2539e-02, 2.1800e-01],\n", - " [ 4.5330e-01, -5.2273e-03, 7.8447e-02, ..., -2.9514e-03,\n", - " -9.8594e-04, 8.5724e-02],\n", - " ...,\n", - " [ 5.7912e-01, -3.4694e-03, 3.8524e-02, ..., -1.8656e-03,\n", - " -9.5542e-04, 1.2212e-01],\n", - " [ 5.3971e-01, -5.9359e-03, -7.3679e-05, ..., -2.8729e-03,\n", - " 8.9588e-02, 2.3319e-01],\n", - " [ 3.7595e-01, -2.9662e-03, -4.3737e-04, ..., -1.6611e-03,\n", - " 2.6175e-04, 1.4021e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0087, 0.1524, -0.0038, ..., 0.9405, -0.0031, -0.0059],\n", - " [-0.0084, 0.1698, -0.0031, ..., 0.9993, -0.0023, -0.0045],\n", - " [-0.0112, 0.2053, -0.0039, ..., 1.1756, -0.0021, -0.0067],\n", - " ...,\n", - " [-0.0080, 0.2395, -0.0035, ..., 1.1265, -0.0026, -0.0068],\n", - " [-0.0102, 0.3543, -0.0028, ..., 1.2326, -0.0024, -0.0088],\n", - " [-0.0086, 0.2233, -0.0036, ..., 1.1605, -0.0031, -0.0073]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 96, 2, 189, 68, 64, 64, 260, 830, 830, 779, 663, 721,\n", - " 568, 812, 812, 683, 547, 487, 487, 1172, 854, 838, 838, 1130,\n", - " 860, 817, 920, 958, 958, 783, 783, 783, 783, 1079, 1079, 1192,\n", - " 1335, 1335, 1335, 1152, 1152, 1143, 1143, 1143, 1143, 999, 1149, 1580,\n", - " 1456, 1456, 1456, 1619, 1802, 1642, 1676, 1743, 1570, 1544, 1711, 1723,\n", - " 1727, 1810, 1868, 1868, 1993, 1956, 1956, 1899, 1854, 1978, 2001, 1992,\n", - " 2132, 1999, 1999, 2001, 2001, 2011, 2193, 2212, 2192, 2192, 2042, 2042,\n", - " 2161, 2209, 2249, 2249, 2249, 2239, 2301, 2301, 2301, 2550, 2490, 2584,\n", - " 2644, 2669, 2641, 2802, 2884, 2884, 2539, 2719, 3087, 3087, 3015, 3368,\n", - " 3205, 3312, 3435, 3250, 3314, 3314, 3639, 3425, 3425, 3746, 3711, 3791,\n", - " 3806, 3881, 3849, 3849, 3951, 4011, 4015, 4042, 4263, 4449, 4449, 4256,\n", - " 4311, 4311, 4313, 4292, 4421, 4425, 4425, 4495, 4309, 4487, 4345, 4534,\n", - " 4609, 4609, 4535, 4546, 4697, 4639, 4885, 4847, 4847, 4871, 4829, 4829,\n", - " 4801, 4911, 4911, 5097, 5097, 5097, 5097, 5097, 5182, 5101, 5322, 5322,\n", - " 5394, 5594, 5543, 5524, 5524],\n", - " [ 61, 70, 115, 25, 94, 12, 61, 55, 107, 97, 18, 30,\n", - " 110, 9, 14, 67, 72, 59, 105, 67, 89, 45, 46, 81,\n", - " 78, 51, 7, 12, 94, 102, 71, 106, 21, 87, 89, 68,\n", - " 98, 113, 17, 48, 39, 74, 56, 17, 113, 67, 77, 64,\n", - " 79, 63, 28, 95, 0, 118, 94, 50, 111, 17, 37, 112,\n", - " 2, 92, 1, 30, 77, 35, 8, 88, 32, 22, 73, 6,\n", - " 52, 30, 76, 116, 36, 31, 70, 70, 91, 19, 96, 103,\n", - " 108, 77, 12, 94, 57, 23, 17, 33, 98, 50, 53, 22,\n", - " 90, 23, 43, 62, 67, 109, 90, 60, 108, 29, 82, 49,\n", - " 40, 20, 85, 80, 86, 85, 58, 24, 47, 84, 17, 22,\n", - " 111, 112, 90, 3, 7, 100, 10, 15, 83, 44, 42, 75,\n", - " 37, 87, 26, 34, 40, 16, 13, 100, 104, 41, 11, 93,\n", - " 117, 78, 5, 17, 97, 4, 54, 41, 70, 69, 118, 52,\n", - " 65, 51, 61, 38, 27, 101, 114, 66, 61, 17, 65, 99,\n", - " 8, 60, 110, 61, 8]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3160, 4367, 4004, ..., 509, 4243, 7422],\n", - " [ 297, 275, 17, ..., 7775, 7856, 7839]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 67, 77, 93, ..., 67, 39, 105],\n", - " [ 179, 23, 78, ..., 5436, 5612, 5598]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 28, 28, 28, ..., 7890, 7890, 7890],\n", - " [ 590, 236, 372, ..., 668, 281, 572]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 459, 973, 380, ..., 986, 688, 894],\n", - " [ 315, 109, 81, ..., 7830, 7905, 7850]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4311, 6146, 1924, ..., 4997, 4367, 7709],\n", - " [ 39, 14, 39, ..., 5586, 5620, 5579]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 28, 28, 28, ..., 7890, 7890, 7759],\n", - " [1889, 2133, 2553, ..., 2978, 4036, 3705]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 39, 39, 39, ..., 5541, 5541, 5541],\n", - " [3994, 4354, 4311, ..., 6148, 6764, 6643]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.003722\n", - "sampling 0.003643\n", - "noi time: 0.000713\n", - "get_vertex_data call: 0.015\n", - "noi group time: 0.001848\n", - "eoi_group_time: 0.010963\n", - "second half: 0.114503\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 32616, 17409, 10192, ..., 1124612, 1108464, 1133328],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 32616, 17409, 10192, ..., 1124612, 1108464, 1133328],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227492, 1224370, 1203800, ..., 1921023, 1939424, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227492, 1224370, 1203800, ..., 1921023, 1939424, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137426, 1137429, 1137212, ..., 1163071, 1157017, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137426, 1137429, 1137212, ..., 1163071, 1157017, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195452, 1197841, 1198769, 1196800, 1197719, 1198721, 1199282, 1198449,\n", - " 1198844, 1201581, 1201582, 1198023, 1194635, 1199248, 1198624, 1198694,\n", - " 1196956, 1202804, 1198557, 1194866, 1194770, 1195494, 1196631, 1195511,\n", - " 1195263, 1201926, 1201992, 1196031, 1198093, 1195469, 1196517, 1195313,\n", - " 1198649, 1196711, 1195223, 1196214, 1195265, 1195278, 1197141, 1197265,\n", - " 1197273, 1196109, 1195847, 1199699, 1199330, 1199333, 1200949, 1199856,\n", - " 1199060, 1199185, 1194928, 1199628, 1197676, 1199156, 1199038, 1198404,\n", - " 1199579, 1199676, 1194786, 1199843, 1201513, 1199021, 1201116, 1196727,\n", - " 1203238, 1203239, 1198428, 1202997, 1200155, 1199410, 1198811, 1199552,\n", - " 1201547, 1202630, 1200991, 1201056, 1200913, 1200918, 1194803, 1200515,\n", - " 1200526, 1200546, 1200553, 1200310, 1200315, 1200428, 1197095, 1202138,\n", - " 1199908, 1196768, 1201029, 1202239, 1202175, 1195876, 1201291, 1198472,\n", - " 1198478, 1203254, 1202209, 1196963, 1200785, 1195676, 1195679, 1196929,\n", - " 1197821, 1196414, 1195074, 1196605, 1199661, 1201143, 1197735, 1199234,\n", - " 1200465, 1200301, 1200707, 1201365, 1197026, 1198748], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195452, 1197841, 1198769, 1196800, 1197719, 1198721, 1199282, 1198449,\n", - " 1198844, 1201581, 1201582, 1198023, 1194635, 1199248, 1198624, 1198694,\n", - " 1196956, 1202804, 1198557, 1194866, 1194770, 1195494, 1196631, 1195511,\n", - " 1195263, 1201926, 1201992, 1196031, 1198093, 1195469, 1196517, 1195313,\n", - " 1198649, 1196711, 1195223, 1196214, 1195265, 1195278, 1197141, 1197265,\n", - " 1197273, 1196109, 1195847, 1199699, 1199330, 1199333, 1200949, 1199856,\n", - " 1199060, 1199185, 1194928, 1199628, 1197676, 1199156, 1199038, 1198404,\n", - " 1199579, 1199676, 1194786, 1199843, 1201513, 1199021, 1201116, 1196727,\n", - " 1203238, 1203239, 1198428, 1202997, 1200155, 1199410, 1198811, 1199552,\n", - " 1201547, 1202630, 1200991, 1201056, 1200913, 1200918, 1194803, 1200515,\n", - " 1200526, 1200546, 1200553, 1200310, 1200315, 1200428, 1197095, 1202138,\n", - " 1199908, 1196768, 1201029, 1202239, 1202175, 1195876, 1201291, 1198472,\n", - " 1198478, 1203254, 1202209, 1196963, 1200785, 1195676, 1195679, 1196929,\n", - " 1197821, 1196414, 1195074, 1196605, 1199661, 1201143, 1197735, 1199234,\n", - " 1200465, 1200301, 1200707, 1201365, 1197026, 1198748], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 3.9377e-02, 4.8396e-04, 2.6777e-01, ..., 1.3896e-02,\n", - " -3.0094e-04, -2.7379e-03],\n", - " [ 2.0431e-02, -4.6591e-04, 2.8839e-01, ..., 6.9275e-03,\n", - " -3.6144e-04, -2.8153e-03],\n", - " [ 4.2797e-02, -1.1040e-03, 3.9729e-01, ..., -2.9840e-04,\n", - " 7.6429e-03, -3.1636e-03],\n", - " ...,\n", - " [ 1.9889e-02, -2.7925e-04, 2.7963e-01, ..., 4.6985e-03,\n", - " -2.9392e-04, -2.7111e-03],\n", - " [ 1.9446e-02, -1.2376e-04, 2.7548e-01, ..., 1.2847e-02,\n", - " -4.4332e-04, -2.9755e-03],\n", - " [ 4.1875e-02, 1.9836e-02, 2.3974e-01, ..., 2.1620e-02,\n", - " -2.0683e-04, -2.3214e-03]], device='cuda:0'), 'paper': tensor([[ 2.7021, -0.0368, 2.1035, ..., -0.0120, -0.0156, 2.8200],\n", - " [ 2.5914, -0.0368, 2.6303, ..., -0.0105, -0.0165, 2.9189],\n", - " [ 2.3559, -0.0329, 2.3759, ..., -0.0085, -0.0164, 3.0453],\n", - " ...,\n", - " [ 2.4520, -0.0352, 2.1300, ..., -0.0121, -0.0154, 2.4287],\n", - " [ 3.3589, -0.0573, 1.6791, ..., -0.0196, -0.0150, 2.8820],\n", - " [ 2.4460, -0.0365, 2.6181, ..., -0.0082, -0.0157, 3.0485]],\n", - " device='cuda:0'), 'author': tensor([[ 4.7158e-01, -5.0114e-03, -4.6600e-04, ..., -1.9569e-03,\n", - " -3.6439e-04, 1.9215e-01],\n", - " [ 4.3293e-01, -5.9534e-03, 1.1386e-01, ..., -3.5794e-03,\n", - " -5.0980e-05, 3.0579e-02],\n", - " [-3.9500e-04, -3.7329e-04, 1.4553e-01, ..., 9.1423e-02,\n", - " -2.6445e-04, -9.5572e-04],\n", - " ...,\n", - " [ 5.8400e-01, -5.7329e-03, -1.2050e-04, ..., -3.0577e-03,\n", - " 8.0406e-02, 1.7694e-01],\n", - " [ 5.7508e-01, -5.3318e-03, -2.8572e-04, ..., -2.5861e-03,\n", - " 4.5117e-02, 1.9054e-01],\n", - " [ 4.1371e-01, -2.3284e-03, 2.7274e-02, ..., -1.1772e-03,\n", - " -2.1403e-03, -6.9011e-04]], device='cuda:0'), 'field_of_study': tensor([[-1.1117e-02, 2.2009e-01, -3.0832e-03, ..., 1.0504e+00,\n", - " -2.0501e-03, -5.8040e-03],\n", - " [-8.3757e-03, -1.9204e-04, -2.9427e-03, ..., 7.9950e-01,\n", - " -2.9552e-03, -3.6497e-03],\n", - " [-1.0681e-02, 1.4866e-01, -3.3812e-03, ..., 8.8386e-01,\n", - " -2.0050e-03, -4.8748e-03],\n", - " ...,\n", - " [-9.4776e-03, 4.3091e-01, -2.6511e-03, ..., 1.2644e+00,\n", - " -1.9547e-03, -7.4560e-03],\n", - " [-1.0753e-02, 1.7681e-01, -3.4363e-03, ..., 1.1414e+00,\n", - " -2.7710e-03, -7.4211e-03],\n", - " [-1.2022e-02, 3.9670e-01, -4.7081e-03, ..., 1.5831e+00,\n", - " -3.0113e-03, -1.0199e-02]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 21, 167, 60, 41, 107, 107, 169, 157, 84, 214, 235, 212,\n", - " 212, 212, 666, 381, 708, 881, 563, 648, 725, 774, 880, 880,\n", - " 880, 827, 961, 1110, 1110, 980, 958, 1044, 1154, 1142, 1256, 1256,\n", - " 1184, 1182, 1182, 1182, 1182, 1278, 1278, 1226, 1226, 1203, 1286, 1286,\n", - " 1054, 1190, 1327, 1411, 1479, 1624, 1624, 1347, 1486, 1517, 1498, 1698,\n", - " 1496, 1586, 1586, 1512, 1495, 1512, 1512, 1648, 1648, 1543, 1725, 1754,\n", - " 1630, 1630, 1630, 1497, 1497, 1497, 1531, 1531, 1907, 1853, 1764, 1800,\n", - " 1774, 1774, 1774, 1676, 1907, 1907, 1907, 1833, 1833, 1876, 2081, 1992,\n", - " 1945, 1803, 1885, 2002, 2002, 1989, 2117, 1961, 2307, 2312, 2515, 2421,\n", - " 2408, 2596, 2440, 2468, 2596, 2596, 2605, 2701, 2566, 2566, 2697, 2613,\n", - " 2719, 2719, 2809, 2809, 2981, 2951, 2894, 2988, 2988, 3031, 2956, 3099,\n", - " 3310, 3310, 3249, 3249, 3061, 3454, 3395, 3395, 3490, 3490, 3343, 3343,\n", - " 3577, 3554, 3605, 3639, 3516, 3516, 3708, 3747, 3770, 3896, 3885, 4132,\n", - " 4217, 4110, 4110, 4110, 4373, 4225, 4299, 4299, 4432, 4530, 4530, 4342,\n", - " 4440, 4440, 4508, 4577, 4546, 4756, 4729, 4811, 4705, 4871, 4833, 4833,\n", - " 4833, 4846, 4663, 4786, 4786, 4786, 5034, 4868, 5204, 5142, 5045, 5366,\n", - " 5366, 5328, 5405, 5513, 5593, 5448, 5489],\n", - " [ 10, 82, 17, 113, 68, 26, 10, 59, 55, 73, 13, 31,\n", - " 66, 40, 71, 49, 97, 77, 80, 104, 110, 85, 112, 109,\n", - " 88, 71, 87, 19, 84, 70, 62, 32, 71, 77, 91, 28,\n", - " 85, 24, 4, 15, 22, 39, 36, 70, 56, 54, 16, 8,\n", - " 38, 91, 75, 61, 2, 25, 95, 74, 53, 90, 98, 63,\n", - " 76, 78, 89, 65, 70, 105, 86, 60, 53, 116, 90, 90,\n", - " 103, 72, 64, 69, 36, 17, 108, 53, 46, 90, 27, 71,\n", - " 8, 98, 83, 3, 12, 20, 7, 44, 111, 77, 84, 24,\n", - " 70, 98, 91, 115, 52, 63, 24, 101, 111, 68, 22, 85,\n", - " 47, 29, 66, 5, 51, 5, 100, 67, 24, 4, 99, 66,\n", - " 48, 58, 24, 0, 14, 111, 0, 41, 107, 71, 17, 0,\n", - " 20, 81, 94, 79, 63, 45, 18, 24, 6, 117, 17, 69,\n", - " 84, 102, 116, 114, 37, 93, 35, 72, 72, 22, 11, 0,\n", - " 1, 68, 26, 92, 35, 22, 26, 68, 63, 68, 26, 72,\n", - " 7, 63, 82, 96, 23, 34, 63, 63, 106, 24, 18, 24,\n", - " 72, 2, 82, 63, 7, 42, 57, 58, 33, 87, 21, 63,\n", - " 27, 114, 9, 50, 30, 26, 43]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3080, 2426, 4548, ..., 4191, 334, 7559],\n", - " [ 103, 77, 8, ..., 8044, 7990, 7867]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 98, 72, 25, ..., 63, 55, 24],\n", - " [ 9, 110, 48, ..., 5478, 5583, 5582]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 30, 30, 30, ..., 7867, 7867, 7867],\n", - " [ 888, 379, 1048, ..., 379, 812, 1049]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 379, 379, 687, ..., 379, 101, 392],\n", - " [ 399, 398, 220, ..., 7957, 8006, 7983]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 226, 4265, 808, ..., 7389, 7497, 7631],\n", - " [ 57, 136, 54, ..., 5539, 5491, 5491]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 98, 98, 31, ..., 7953, 7963, 7867],\n", - " [1171, 1841, 160, ..., 4914, 622, 2591]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 36, 167, 167, ..., 5513, 5489, 5489],\n", - " [2211, 7825, 7834, ..., 4511, 4446, 4511]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.007017\n", - "sampling 0.006845\n", - "noi time: 0.002161\n", - "get_vertex_data call: 0.027953\n", - "noi group time: 0.002904\n", - "eoi_group_time: 0.011005\n", - "second half: 0.186505\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 32616, 17409, ..., 1120069, 1120077, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 32616, 17409, ..., 1120069, 1120077, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1231429, 1217957, 1219061, ..., 1937998, 1936965, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1231429, 1217957, 1219061, ..., 1937998, 1936965, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1141424, 1136349, ..., 1157017, 1157022, 1161940],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1141424, 1136349, ..., 1157017, 1157022, 1161940],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1198770, 1199424, 1199302, 1195406, 1197719, 1199282, 1199293, 1198844,\n", - " 1201577, 1201462, 1194626, 1199250, 1197359, 1198633, 1198690, 1196956,\n", - " 1202804, 1194866, 1194743, 1198708, 1195488, 1196624, 1195511, 1195263,\n", - " 1197930, 1196534, 1201992, 1195895, 1199173, 1195738, 1196367, 1196979,\n", - " 1196615, 1197831, 1195121, 1195571, 1198163, 1196711, 1195221, 1195270,\n", - " 1197136, 1196245, 1197367, 1196109, 1198219, 1195659, 1196316, 1199984,\n", - " 1197255, 1200037, 1196283, 1195351, 1199060, 1195119, 1199628, 1197676,\n", - " 1199152, 1201513, 1196498, 1196727, 1195771, 1200892, 1198416, 1198428,\n", - " 1199410, 1202386, 1198811, 1199552, 1201543, 1199445, 1201421, 1201156,\n", - " 1202640, 1201043, 1200363, 1201739, 1200526, 1200263, 1200546, 1203071,\n", - " 1199208, 1202138, 1197050, 1196883, 1196778, 1201442, 1201029, 1199976,\n", - " 1195876, 1200181, 1200185, 1201291, 1201871, 1203329, 1202209, 1201796,\n", - " 1195043, 1202258, 1195666, 1195664, 1200445, 1200382, 1198932, 1195415,\n", - " 1197816, 1201499, 1199659, 1201138, 1194733, 1198148, 1199395, 1197731,\n", - " 1200014, 1198819, 1201886, 1200296, 1200302, 1197652, 1195078, 1197883],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1198770, 1199424, 1199302, 1195406, 1197719, 1199282, 1199293, 1198844,\n", - " 1201577, 1201462, 1194626, 1199250, 1197359, 1198633, 1198690, 1196956,\n", - " 1202804, 1194866, 1194743, 1198708, 1195488, 1196624, 1195511, 1195263,\n", - " 1197930, 1196534, 1201992, 1195895, 1199173, 1195738, 1196367, 1196979,\n", - " 1196615, 1197831, 1195121, 1195571, 1198163, 1196711, 1195221, 1195270,\n", - " 1197136, 1196245, 1197367, 1196109, 1198219, 1195659, 1196316, 1199984,\n", - " 1197255, 1200037, 1196283, 1195351, 1199060, 1195119, 1199628, 1197676,\n", - " 1199152, 1201513, 1196498, 1196727, 1195771, 1200892, 1198416, 1198428,\n", - " 1199410, 1202386, 1198811, 1199552, 1201543, 1199445, 1201421, 1201156,\n", - " 1202640, 1201043, 1200363, 1201739, 1200526, 1200263, 1200546, 1203071,\n", - " 1199208, 1202138, 1197050, 1196883, 1196778, 1201442, 1201029, 1199976,\n", - " 1195876, 1200181, 1200185, 1201291, 1201871, 1203329, 1202209, 1201796,\n", - " 1195043, 1202258, 1195666, 1195664, 1200445, 1200382, 1198932, 1195415,\n", - " 1197816, 1201499, 1199659, 1201138, 1194733, 1198148, 1199395, 1197731,\n", - " 1200014, 1198819, 1201886, 1200296, 1200302, 1197652, 1195078, 1197883],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.7641e-02, -2.8245e-04, 2.7550e-01, ..., 1.5387e-02,\n", - " -4.8576e-04, -2.7226e-03],\n", - " [ 2.7910e-02, -1.7870e-04, 2.1479e-01, ..., 5.3191e-03,\n", - " -4.9516e-04, -2.3667e-03],\n", - " [ 2.2358e-02, 5.7358e-03, 2.4046e-01, ..., -4.4029e-05,\n", - " -5.4465e-04, -2.3771e-03],\n", - " ...,\n", - " [ 2.8729e-02, -3.9117e-04, 2.8811e-01, ..., -3.3252e-05,\n", - " -3.5434e-04, -2.7466e-03],\n", - " [ 1.3828e-02, 6.7676e-03, 2.4690e-01, ..., 2.1792e-02,\n", - " -7.0565e-04, -2.9247e-03],\n", - " [ 5.0861e-03, -2.1133e-04, 2.6844e-01, ..., 4.3841e-02,\n", - " -5.1639e-04, -2.5439e-03]], device='cuda:0'), 'paper': tensor([[ 4.1736, -0.0532, 3.7090, ..., -0.0181, -0.0313, 4.2893],\n", - " [ 4.4681, -0.0697, 2.9422, ..., -0.0236, -0.0264, 4.0423],\n", - " [ 2.4915, -0.0325, 1.8837, ..., -0.0100, -0.0138, 2.3747],\n", - " ...,\n", - " [ 2.6226, -0.0342, 2.0705, ..., -0.0106, -0.0158, 2.8544],\n", - " [ 2.3403, -0.0326, 1.9853, ..., -0.0089, -0.0147, 2.6807],\n", - " [ 2.4538, -0.0364, 2.6141, ..., -0.0082, -0.0156, 3.0420]],\n", - " device='cuda:0'), 'author': tensor([[ 5.4803e-01, -5.9009e-03, -8.5127e-05, ..., -2.9112e-03,\n", - " 5.3734e-02, 2.0646e-01],\n", - " [ 4.9135e-01, -4.6981e-03, -5.2908e-04, ..., -2.1570e-03,\n", - " 2.0833e-02, 1.6998e-01],\n", - " [ 4.5221e-01, -5.7487e-03, -6.6465e-04, ..., -2.2145e-03,\n", - " 1.3270e-01, 2.5220e-01],\n", - " ...,\n", - " [ 5.5997e-01, -5.0930e-03, -4.0275e-04, ..., -2.4025e-03,\n", - " 6.2478e-02, 1.8923e-01],\n", - " [ 5.5617e-01, -6.7261e-03, -2.6059e-04, ..., -2.5782e-03,\n", - " 1.1541e-01, 2.6652e-01],\n", - " [ 5.3280e-01, -5.1873e-03, -3.1872e-04, ..., -2.3130e-03,\n", - " 7.4489e-02, 1.6771e-01]], device='cuda:0'), 'field_of_study': tensor([[-1.1482e-02, 2.0711e-01, -3.5147e-03, ..., 1.2221e+00,\n", - " -2.3541e-03, -6.3145e-03],\n", - " [-1.1026e-02, 1.9184e-01, -3.7502e-03, ..., 1.1774e+00,\n", - " -2.0205e-03, -7.0497e-03],\n", - " [-9.2898e-03, 1.7495e-01, -3.2951e-03, ..., 9.7196e-01,\n", - " -1.8542e-03, -4.2165e-03],\n", - " ...,\n", - " [-1.1633e-02, 1.6647e-01, -4.2231e-03, ..., 1.2233e+00,\n", - " -2.5991e-03, -7.4681e-03],\n", - " [-8.3708e-03, 1.6243e-01, -3.3885e-03, ..., 1.0859e+00,\n", - " -2.8742e-03, -6.6981e-03],\n", - " [-1.1506e-02, 4.1381e-01, -4.5384e-03, ..., 1.4284e+00,\n", - " -1.2880e-03, -7.1106e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 166, 107, 107, 158, 75, 32, 81, 81, 81, 323, 449, 280,\n", - " 260, 260, 805, 438, 611, 605, 605, 605, 605, 734, 734, 768,\n", - " 983, 724, 1165, 1357, 908, 908, 797, 797, 797, 920, 920, 1045,\n", - " 839, 1209, 1209, 1063, 1063, 1229, 1226, 1226, 1308, 1345, 1148, 1148,\n", - " 1308, 1537, 1433, 1433, 1507, 1507, 1445, 1445, 1445, 1550, 1480, 1445,\n", - " 1652, 1506, 1454, 1454, 1698, 1395, 1395, 1610, 1610, 1874, 1874, 1853,\n", - " 1768, 1678, 1658, 2011, 1894, 1894, 1712, 1838, 1838, 1838, 1937, 1937,\n", - " 2120, 2206, 2206, 2034, 2034, 2059, 2059, 2059, 2059, 2057, 2040, 2060,\n", - " 2060, 2092, 2092, 2290, 2423, 2462, 2590, 2439, 2680, 2680, 2639, 2701,\n", - " 2588, 2723, 2835, 2835, 2835, 2879, 3085, 2914, 3074, 3062, 2990, 3207,\n", - " 3210, 3411, 3227, 3227, 3392, 3320, 3320, 3320, 3413, 3739, 3696, 3745,\n", - " 3745, 3745, 3815, 3676, 3676, 3676, 3750, 3750, 3668, 3873, 3971, 3860,\n", - " 3987, 3987, 4001, 4001, 4048, 4088, 4104, 4168, 4150, 4059, 4282, 4282,\n", - " 4564, 4351, 4476, 4476, 4546, 4616, 4675, 4798, 4751, 4977, 4977, 4977,\n", - " 4977, 4790, 4932, 4664, 4946, 4946, 4930, 4930, 4930, 5124, 5088, 5140,\n", - " 5140, 5402, 5508, 5627, 5792, 5951, 5918, 5795],\n", - " [ 26, 18, 60, 96, 111, 70, 19, 103, 0, 5, 24, 85,\n", - " 35, 26, 56, 67, 5, 26, 35, 3, 46, 26, 53, 5,\n", - " 77, 114, 111, 118, 29, 80, 109, 5, 92, 64, 49, 69,\n", - " 112, 39, 50, 68, 73, 4, 100, 13, 93, 86, 95, 0,\n", - " 63, 81, 119, 28, 11, 108, 33, 106, 113, 29, 9, 27,\n", - " 23, 28, 48, 36, 87, 6, 82, 44, 58, 37, 81, 81,\n", - " 84, 76, 5, 76, 97, 86, 23, 2, 42, 107, 29, 75,\n", - " 89, 35, 26, 38, 116, 74, 10, 104, 4, 68, 24, 4,\n", - " 110, 90, 98, 41, 25, 101, 30, 51, 23, 1, 52, 16,\n", - " 96, 38, 22, 81, 71, 70, 12, 40, 109, 84, 17, 21,\n", - " 86, 89, 48, 117, 31, 32, 13, 89, 47, 8, 63, 99,\n", - " 7, 102, 117, 15, 62, 61, 115, 105, 55, 20, 24, 23,\n", - " 34, 23, 65, 56, 86, 23, 23, 88, 4, 23, 91, 104,\n", - " 48, 6, 14, 2, 57, 114, 5, 6, 91, 66, 78, 12,\n", - " 62, 79, 72, 38, 59, 54, 5, 92, 109, 2, 59, 45,\n", - " 83, 14, 92, 43, 23, 94, 8, 59]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2458, 2524, 1373, ..., 155, 1992, 3489],\n", - " [ 312, 369, 313, ..., 7837, 7811, 7864]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 50, 108, 88, ..., 26, 34, 71],\n", - " [ 7, 191, 53, ..., 5961, 5953, 6010]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 23, 23, 23, ..., 7864, 7864, 7864],\n", - " [ 290, 381, 367, ..., 101, 557, 706]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 367, 256, 612, ..., 18, 643, 511],\n", - " [ 265, 56, 65, ..., 7763, 7754, 7873]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2649, 223, 137, ..., 4199, 6823, 5054],\n", - " [ 127, 34, 23, ..., 6009, 5816, 5880]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 31, 31, 31, ..., 7864, 7864, 7864],\n", - " [1517, 1674, 2532, ..., 1911, 2480, 2858]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 50, 50, 50, ..., 6037, 6037, 6037],\n", - " [4400, 7687, 3664, ..., 4204, 4088, 4344]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005608\n", - "sampling 0.005456\n", - "noi time: 0.001694\n", - "get_vertex_data call: 0.026025\n", - "noi group time: 0.002212\n", - "eoi_group_time: 0.013286\n", - "second half: 0.195675\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 19148, 36074, 16818, ..., 1103850, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 19148, 36074, 16818, ..., 1103850, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1211787, 1221054, 1230244, ..., 1937141, 1938520, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1211787, 1221054, 1230244, ..., 1937141, 1938520, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1137204, 1141424, 1140284, 1140285, 1135926, 1135726, 1137791,\n", - " 1141758, 1138335, 1141250, 1136969, 1143600, 1154774, 1145993, 1146418,\n", - " 1139241, 1146641, 1146646, 1150509, 1148582, 1149216, 1142947, 1142949,\n", - " 1155683, 1143820, 1147483, 1149037, 1146656, 1146660, 1152664, 1153231,\n", - " 1137220, 1155019, 1138739, 1140953, 1135367, 1135202, 1136037, 1141036,\n", - " 1134794, 1157443, 1138504, 1157088, 1136619, 1144791, 1139215, 1156152,\n", - " 1156159, 1135582, 1135583, 1135828, 1138514, 1153094, 1137957, 1135494,\n", - " 1145132, 1156899, 1135522, 1138440, 1140079, 1138461, 1138449, 1138462,\n", - " 1157190, 1158390, 1156603, 1156605, 1156602, 1156606, 1142611, 1160819,\n", - " 1135631, 1156141, 1138185, 1145843, 1137109, 1137119, 1139667, 1139673,\n", - " 1138069, 1142243, 1136087, 1134992, 1142786, 1136554, 1158974, 1140034,\n", - " 1138151, 1146075, 1152042, 1152044, 1137741, 1135543, 1135549, 1137888,\n", - " 1141088, 1141100, 1149001, 1137299, 1162705, 1139025, 1149979, 1146847,\n", - " 1135859, 1135861, 1139436, 1139386, 1167117, 1141657, 1136917, 1137186,\n", - " 1141156, 1141159, 1152727, 1136752, 1149435, 1139799, 1139800, 1145161,\n", - " 1158749, 1139190, 1138424, 1144596, 1136867, 1136864, 1145298, 1144039,\n", - " 1140442, 1144182, 1150910, 1147153, 1141365, 1151119, 1149101, 1139019,\n", - " 1138292, 1144279, 1143915, 1139508, 1139127, 1143692, 1147050, 1145873,\n", - " 1145887, 1152976, 1139007, 1141925, 1146901, 1144242, 1141378, 1145974,\n", - " 1146024, 1146025, 1138085, 1141644, 1149928, 1139990, 1143294, 1147540,\n", - " 1148763, 1147282, 1149155, 1143663, 1142628, 1149608, 1143049, 1143052,\n", - " 1136167, 1136836, 1136845, 1141502, 1139051, 1142159, 1158043, 1143345,\n", - " 1144765, 1135757, 1135876, 1150294, 1138013, 1146523, 1143457, 1143937,\n", - " 1140824, 1146636, 1140364, 1143075, 1143082, 1168921, 1147999, 1145467,\n", - " 1148704, 1150996, 1141836, 1147070, 1149722, 1147031, 1147981, 1147971,\n", - " 1145018, 1158225, 1145240, 1145750, 1145751, 1138638, 1146178, 1151242,\n", - " 1152530, 1150280, 1150274, 1149258, 1148819, 1151856, 1144514, 1147794,\n", - " 1152022, 1152023, 1154267, 1139919, 1149588, 1140566, 1148278, 1147021,\n", - " 1153956, 1153959, 1141949, 1144819, 1148744, 1153574, 1147653, 1143565,\n", - " 1149412, 1148288, 1148300, 1152073, 1151421, 1148180, 1152561, 1146682,\n", - " 1152494, 1146547, 1149810, 1148204, 1148101, 1171943, 1171945, 1154200,\n", - " 1153197, 1145104, 1152867, 1152875, 1155088, 1143134, 1147442, 1151816,\n", - " 1152581, 1146265, 1146975, 1156402, 1150210, 1146623, 1144468, 1152100,\n", - " 1150085, 1145539, 1137746, 1146304, 1152622, 1136410, 1155337, 1154119,\n", - " 1154123, 1157842, 1151617, 1151622, 1136134, 1151440, 1152163, 1144540,\n", - " 1152227, 1152903, 1156823, 1153311, 1152294, 1156007, 1136028, 1136029,\n", - " 1158704, 1140684, 1142777, 1143486, 1166850, 1150159, 1150164, 1148040,\n", - " 1137048, 1148628, 1158540, 1137458, 1149946, 1149944, 1158860, 1150872,\n", - " 1156500, 1157064, 1157069, 1152841, 1145191, 1137809, 1150465, 1138822,\n", - " 1156629, 1156940, 1135644, 1157784, 1158308, 1155441, 1150136, 1142756,\n", - " 1156207, 1151379, 1158639, 1155122, 1152527, 1149321, 1168230, 1155628,\n", - " 1156563, 1158824, 1153715, 1154644, 1156713, 1137359, 1143189, 1150371,\n", - " 1155613, 1159629, 1157282, 1157650, 1158204, 1137381, 1137380, 1159116,\n", - " 1145694, 1134674, 1135601, 1135614, 1150661, 1155848, 1157685, 1157684,\n", - " 1159258, 1156693, 1159131, 1144835, 1155971, 1155975, 1135184, 1158846,\n", - " 1156811, 1156812, 1149700, 1154600, 1180781, 1136905, 1158753, 1140218,\n", - " 1151615, 1136491, 1156665, 1155309, 1152136, 1156490, 1136646, 1144121,\n", - " 1158545, 1158558, 1153827, 1158257, 1150003, 1155521, 1155528, 1164276,\n", - " 1159042, 1162061, 1158301, 1153052, 1153045, 1166256, 1163357, 1153842,\n", - " 1161326, 1138384, 1138385, 1138393, 1149061, 1155476, 1155479, 1151014,\n", - " 1154297, 1138161, 1163396, 1154590, 1139290, 1166073, 1148771, 1157351,\n", - " 1146063, 1140643, 1141857, 1141862, 1151879, 1156363, 1141802, 1158643,\n", - " 1158653, 1156181, 1165604, 1152247, 1143729, 1160605, 1155588, 1151227,\n", - " 1148571, 1169638, 1164580, 1144739, 1152776, 1141471, 1141459, 1147426,\n", - " 1147427, 1156739, 1150646, 1144812, 1142733, 1165636, 1148683, 1170671,\n", - " 1144973, 1166053, 1148124, 1139345, 1145902, 1163961, 1143404, 1149560,\n", - " 1147339, 1147338, 1170758, 1149130, 1167817, 1166653, 1150515, 1150522,\n", - " 1167905, 1156119, 1144346, 1144336, 1157534, 1147757, 1154659, 1154670,\n", - " 1171409, 1157331, 1154353, 1172750, 1149452, 1171529, 1158623, 1172303,\n", - " 1154869, 1152353, 1152362, 1149402, 1169271, 1173307, 1145037, 1160936,\n", - " 1154027, 1154028, 1153755, 1153754, 1159658, 1178422, 1151696, 1157373,\n", - " 1147711, 1148128, 1148131, 1157593, 1157598, 1135021, 1179679, 1177700,\n", - " 1163998, 1176327, 1154151, 1154148, 1186117, 1143279, 1168481, 1143418,\n", - " 1153805, 1153141, 1174076, 1161031, 1182651, 1179807, 1155260, 1157795,\n", - " 1143341, 1143343, 1151496, 1151498, 1171623, 1163572, 1158249, 1153898,\n", - " 1185104, 1186223, 1149744, 1149755, 1146240, 1153609, 1153612, 1183215,\n", - " 1158771, 1165067, 1158940, 1158380, 1160276, 1164798, 1162253, 1164231,\n", - " 1178331, 1176976, 1179123, 1165444, 1147182, 1156528, 1184839, 1139831,\n", - " 1150265, 1154812, 1192076, 1191674, 1156055, 1170010, 1146392, 1146395,\n", - " 1169964, 1190246, 1140997, 1190381, 1151771, 1151774, 1192824, 1192956,\n", - " 1191604, 1171215, 1150406, 1185914, 1178135, 1177819, 1186621, 1152080,\n", - " 1155962, 1179769, 1169831, 1169837, 1190853, 1172903, 1189368, 1182773,\n", - " 1194044, 1157008, 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1137204, 1141424, 1140284, 1140285, 1135926, 1135726, 1137791,\n", - " 1141758, 1138335, 1141250, 1136969, 1143600, 1154774, 1145993, 1146418,\n", - " 1139241, 1146641, 1146646, 1150509, 1148582, 1149216, 1142947, 1142949,\n", - " 1155683, 1143820, 1147483, 1149037, 1146656, 1146660, 1152664, 1153231,\n", - " 1137220, 1155019, 1138739, 1140953, 1135367, 1135202, 1136037, 1141036,\n", - " 1134794, 1157443, 1138504, 1157088, 1136619, 1144791, 1139215, 1156152,\n", - " 1156159, 1135582, 1135583, 1135828, 1138514, 1153094, 1137957, 1135494,\n", - " 1145132, 1156899, 1135522, 1138440, 1140079, 1138461, 1138449, 1138462,\n", - " 1157190, 1158390, 1156603, 1156605, 1156602, 1156606, 1142611, 1160819,\n", - " 1135631, 1156141, 1138185, 1145843, 1137109, 1137119, 1139667, 1139673,\n", - " 1138069, 1142243, 1136087, 1134992, 1142786, 1136554, 1158974, 1140034,\n", - " 1138151, 1146075, 1152042, 1152044, 1137741, 1135543, 1135549, 1137888,\n", - " 1141088, 1141100, 1149001, 1137299, 1162705, 1139025, 1149979, 1146847,\n", - " 1135859, 1135861, 1139436, 1139386, 1167117, 1141657, 1136917, 1137186,\n", - " 1141156, 1141159, 1152727, 1136752, 1149435, 1139799, 1139800, 1145161,\n", - " 1158749, 1139190, 1138424, 1144596, 1136867, 1136864, 1145298, 1144039,\n", - " 1140442, 1144182, 1150910, 1147153, 1141365, 1151119, 1149101, 1139019,\n", - " 1138292, 1144279, 1143915, 1139508, 1139127, 1143692, 1147050, 1145873,\n", - " 1145887, 1152976, 1139007, 1141925, 1146901, 1144242, 1141378, 1145974,\n", - " 1146024, 1146025, 1138085, 1141644, 1149928, 1139990, 1143294, 1147540,\n", - " 1148763, 1147282, 1149155, 1143663, 1142628, 1149608, 1143049, 1143052,\n", - " 1136167, 1136836, 1136845, 1141502, 1139051, 1142159, 1158043, 1143345,\n", - " 1144765, 1135757, 1135876, 1150294, 1138013, 1146523, 1143457, 1143937,\n", - " 1140824, 1146636, 1140364, 1143075, 1143082, 1168921, 1147999, 1145467,\n", - " 1148704, 1150996, 1141836, 1147070, 1149722, 1147031, 1147981, 1147971,\n", - " 1145018, 1158225, 1145240, 1145750, 1145751, 1138638, 1146178, 1151242,\n", - " 1152530, 1150280, 1150274, 1149258, 1148819, 1151856, 1144514, 1147794,\n", - " 1152022, 1152023, 1154267, 1139919, 1149588, 1140566, 1148278, 1147021,\n", - " 1153956, 1153959, 1141949, 1144819, 1148744, 1153574, 1147653, 1143565,\n", - " 1149412, 1148288, 1148300, 1152073, 1151421, 1148180, 1152561, 1146682,\n", - " 1152494, 1146547, 1149810, 1148204, 1148101, 1171943, 1171945, 1154200,\n", - " 1153197, 1145104, 1152867, 1152875, 1155088, 1143134, 1147442, 1151816,\n", - " 1152581, 1146265, 1146975, 1156402, 1150210, 1146623, 1144468, 1152100,\n", - " 1150085, 1145539, 1137746, 1146304, 1152622, 1136410, 1155337, 1154119,\n", - " 1154123, 1157842, 1151617, 1151622, 1136134, 1151440, 1152163, 1144540,\n", - " 1152227, 1152903, 1156823, 1153311, 1152294, 1156007, 1136028, 1136029,\n", - " 1158704, 1140684, 1142777, 1143486, 1166850, 1150159, 1150164, 1148040,\n", - " 1137048, 1148628, 1158540, 1137458, 1149946, 1149944, 1158860, 1150872,\n", - " 1156500, 1157064, 1157069, 1152841, 1145191, 1137809, 1150465, 1138822,\n", - " 1156629, 1156940, 1135644, 1157784, 1158308, 1155441, 1150136, 1142756,\n", - " 1156207, 1151379, 1158639, 1155122, 1152527, 1149321, 1168230, 1155628,\n", - " 1156563, 1158824, 1153715, 1154644, 1156713, 1137359, 1143189, 1150371,\n", - " 1155613, 1159629, 1157282, 1157650, 1158204, 1137381, 1137380, 1159116,\n", - " 1145694, 1134674, 1135601, 1135614, 1150661, 1155848, 1157685, 1157684,\n", - " 1159258, 1156693, 1159131, 1144835, 1155971, 1155975, 1135184, 1158846,\n", - " 1156811, 1156812, 1149700, 1154600, 1180781, 1136905, 1158753, 1140218,\n", - " 1151615, 1136491, 1156665, 1155309, 1152136, 1156490, 1136646, 1144121,\n", - " 1158545, 1158558, 1153827, 1158257, 1150003, 1155521, 1155528, 1164276,\n", - " 1159042, 1162061, 1158301, 1153052, 1153045, 1166256, 1163357, 1153842,\n", - " 1161326, 1138384, 1138385, 1138393, 1149061, 1155476, 1155479, 1151014,\n", - " 1154297, 1138161, 1163396, 1154590, 1139290, 1166073, 1148771, 1157351,\n", - " 1146063, 1140643, 1141857, 1141862, 1151879, 1156363, 1141802, 1158643,\n", - " 1158653, 1156181, 1165604, 1152247, 1143729, 1160605, 1155588, 1151227,\n", - " 1148571, 1169638, 1164580, 1144739, 1152776, 1141471, 1141459, 1147426,\n", - " 1147427, 1156739, 1150646, 1144812, 1142733, 1165636, 1148683, 1170671,\n", - " 1144973, 1166053, 1148124, 1139345, 1145902, 1163961, 1143404, 1149560,\n", - " 1147339, 1147338, 1170758, 1149130, 1167817, 1166653, 1150515, 1150522,\n", - " 1167905, 1156119, 1144346, 1144336, 1157534, 1147757, 1154659, 1154670,\n", - " 1171409, 1157331, 1154353, 1172750, 1149452, 1171529, 1158623, 1172303,\n", - " 1154869, 1152353, 1152362, 1149402, 1169271, 1173307, 1145037, 1160936,\n", - " 1154027, 1154028, 1153755, 1153754, 1159658, 1178422, 1151696, 1157373,\n", - " 1147711, 1148128, 1148131, 1157593, 1157598, 1135021, 1179679, 1177700,\n", - " 1163998, 1176327, 1154151, 1154148, 1186117, 1143279, 1168481, 1143418,\n", - " 1153805, 1153141, 1174076, 1161031, 1182651, 1179807, 1155260, 1157795,\n", - " 1143341, 1143343, 1151496, 1151498, 1171623, 1163572, 1158249, 1153898,\n", - " 1185104, 1186223, 1149744, 1149755, 1146240, 1153609, 1153612, 1183215,\n", - " 1158771, 1165067, 1158940, 1158380, 1160276, 1164798, 1162253, 1164231,\n", - " 1178331, 1176976, 1179123, 1165444, 1147182, 1156528, 1184839, 1139831,\n", - " 1150265, 1154812, 1192076, 1191674, 1156055, 1170010, 1146392, 1146395,\n", - " 1169964, 1190246, 1140997, 1190381, 1151771, 1151774, 1192824, 1192956,\n", - " 1191604, 1171215, 1150406, 1185914, 1178135, 1177819, 1186621, 1152080,\n", - " 1155962, 1179769, 1169831, 1169837, 1190853, 1172903, 1189368, 1182773,\n", - " 1194044, 1157008, 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197841, 1195697, 1199436, 1198730, 1199835, 1199282, 1198449,\n", - " 1198844, 1201237, 1200650, 1197791, 1201015, 1201016, 1198624, 1196871,\n", - " 1202815, 1198555, 1198557, 1196573, 1194743, 1194782, 1195494, 1196631,\n", - " 1194649, 1197434, 1199120, 1201992, 1195187, 1196030, 1195895, 1202896,\n", - " 1195740, 1196334, 1196359, 1194759, 1195320, 1196835, 1196837, 1198262,\n", - " 1198034, 1198643, 1198163, 1198164, 1198161, 1195221, 1195223, 1197141,\n", - " 1196242, 1196255, 1197367, 1196109, 1195038, 1198915, 1195659, 1202916,\n", - " 1199315, 1197474, 1200037, 1196283, 1198282, 1200959, 1199060, 1199059,\n", - " 1199185, 1194941, 1194928, 1199685, 1199628, 1199803, 1200076, 1200869,\n", - " 1200872, 1199152, 1198400, 1198410, 1199579, 1199231, 1201916, 1199744,\n", - " 1199676, 1201511, 1196498, 1196501, 1197601, 1196727, 1196734, 1198428,\n", - " 1200155, 1198811, 1201529, 1201534, 1199555, 1201824, 1201827, 1200452,\n", - " 1200450, 1200507, 1198593, 1199445, 1201073, 1201156, 1202630, 1200988,\n", - " 1201056, 1200913, 1200918, 1199712, 1201042, 1202144, 1200526, 1200553,\n", - " 1201617, 1199886, 1196883, 1200692, 1199908, 1199917, 1196779, 1201442,\n", - " 1197945, 1199482, 1200899, 1199976, 1202175, 1197546, 1201291, 1203279,\n", - " 1196761, 1199923, 1201800, 1198562, 1200784, 1202687, 1199606, 1195047,\n", - " 1196827, 1195679, 1195664, 1198929, 1198932, 1197816, 1197822, 1201482,\n", - " 1200585, 1199659, 1203102, 1194730, 1198824, 1197731, 1203150, 1198819,\n", - " 1200468, 1200301, 1197335, 1195082, 1198751], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197841, 1195697, 1199436, 1198730, 1199835, 1199282, 1198449,\n", - " 1198844, 1201237, 1200650, 1197791, 1201015, 1201016, 1198624, 1196871,\n", - " 1202815, 1198555, 1198557, 1196573, 1194743, 1194782, 1195494, 1196631,\n", - " 1194649, 1197434, 1199120, 1201992, 1195187, 1196030, 1195895, 1202896,\n", - " 1195740, 1196334, 1196359, 1194759, 1195320, 1196835, 1196837, 1198262,\n", - " 1198034, 1198643, 1198163, 1198164, 1198161, 1195221, 1195223, 1197141,\n", - " 1196242, 1196255, 1197367, 1196109, 1195038, 1198915, 1195659, 1202916,\n", - " 1199315, 1197474, 1200037, 1196283, 1198282, 1200959, 1199060, 1199059,\n", - " 1199185, 1194941, 1194928, 1199685, 1199628, 1199803, 1200076, 1200869,\n", - " 1200872, 1199152, 1198400, 1198410, 1199579, 1199231, 1201916, 1199744,\n", - " 1199676, 1201511, 1196498, 1196501, 1197601, 1196727, 1196734, 1198428,\n", - " 1200155, 1198811, 1201529, 1201534, 1199555, 1201824, 1201827, 1200452,\n", - " 1200450, 1200507, 1198593, 1199445, 1201073, 1201156, 1202630, 1200988,\n", - " 1201056, 1200913, 1200918, 1199712, 1201042, 1202144, 1200526, 1200553,\n", - " 1201617, 1199886, 1196883, 1200692, 1199908, 1199917, 1196779, 1201442,\n", - " 1197945, 1199482, 1200899, 1199976, 1202175, 1197546, 1201291, 1203279,\n", - " 1196761, 1199923, 1201800, 1198562, 1200784, 1202687, 1199606, 1195047,\n", - " 1196827, 1195679, 1195664, 1198929, 1198932, 1197816, 1197822, 1201482,\n", - " 1200585, 1199659, 1203102, 1194730, 1198824, 1197731, 1203150, 1198819,\n", - " 1200468, 1200301, 1197335, 1195082, 1198751], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 3.4078e-02, -7.0976e-04, 3.3456e-01, ..., -2.3902e-04,\n", - " -1.7120e-04, -2.8508e-03],\n", - " [ 3.4078e-02, -7.0976e-04, 3.3456e-01, ..., -2.3902e-04,\n", - " -1.7120e-04, -2.8508e-03],\n", - " [ 4.4248e-02, -6.0353e-04, 3.2198e-01, ..., -6.6366e-05,\n", - " -1.4332e-04, -2.9431e-03],\n", - " ...,\n", - " [ 4.6463e-02, 2.2734e-03, 2.3657e-01, ..., 1.2035e-02,\n", - " -1.3672e-04, -2.4417e-03],\n", - " [ 4.6025e-02, -6.1651e-04, 3.1648e-01, ..., -1.1221e-04,\n", - " -1.7873e-04, -2.8396e-03],\n", - " [ 4.6025e-02, -6.1651e-04, 3.1648e-01, ..., -1.1221e-04,\n", - " -1.7873e-04, -2.8396e-03]], device='cuda:0'), 'paper': tensor([[ 2.5207, -0.0319, 2.2074, ..., -0.0125, -0.0163, 2.5266],\n", - " [ 2.5540, -0.0351, 2.3564, ..., -0.0105, -0.0167, 2.9942],\n", - " [ 2.5964, -0.0371, 2.4444, ..., -0.0097, -0.0168, 3.1145],\n", - " ...,\n", - " [ 2.8346, -0.0357, 2.6375, ..., -0.0143, -0.0187, 2.7645],\n", - " [ 3.8895, -0.0655, 2.2712, ..., -0.0213, -0.0183, 3.1255],\n", - " [ 2.4491, -0.0365, 2.6260, ..., -0.0082, -0.0158, 3.0531]],\n", - " device='cuda:0'), 'author': tensor([[-3.9500e-04, -3.7329e-04, 1.4553e-01, ..., 9.1423e-02,\n", - " -2.6445e-04, -9.5572e-04],\n", - " [-3.9500e-04, -3.7329e-04, 1.4553e-01, ..., 9.1423e-02,\n", - " -2.6445e-04, -9.5572e-04],\n", - " [ 6.1111e-01, -4.6681e-03, 1.6001e-01, ..., -4.0802e-03,\n", - " -2.8398e-03, 4.0655e-02],\n", - " ...,\n", - " [ 6.5323e-01, -7.8976e-03, 6.3667e-03, ..., -4.8377e-03,\n", - " 4.1664e-02, 2.8927e-01],\n", - " [ 5.2612e-01, -5.1160e-03, 1.3423e-02, ..., -2.1966e-03,\n", - " 8.4485e-02, 2.1876e-01],\n", - " [ 5.3223e-01, -5.3226e-03, -5.7904e-04, ..., -2.3862e-03,\n", - " 6.6097e-02, 1.9719e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0111, 0.3483, -0.0033, ..., 1.2487, -0.0018, -0.0076],\n", - " [-0.0123, 0.1694, -0.0046, ..., 1.3231, -0.0026, -0.0072],\n", - " [-0.0111, 0.1994, -0.0044, ..., 1.2454, -0.0027, -0.0070],\n", - " ...,\n", - " [-0.0102, 0.1419, -0.0032, ..., 1.0065, -0.0030, -0.0057],\n", - " [-0.0101, 0.1754, -0.0038, ..., 1.0710, -0.0036, -0.0054],\n", - " [-0.0107, 0.3435, -0.0038, ..., 1.3803, -0.0028, -0.0086]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 164, 60, 157, 52, 34, 34, 34, 192, 207, 207, 55, 495,\n", - " 495, 286, 481, 481, 495, 470, 1155, 525, 922, 525, 821, 939,\n", - " 939, 949, 746, 940, 910, 1045, 1045, 1125, 1088, 1317, 1147, 897,\n", - " 1254, 1650, 1469, 1397, 1076, 1076, 1555, 1375, 1634, 1400, 1574, 1542,\n", - " 1542, 1706, 1729, 1558, 1574, 1542, 1542, 1574, 1574, 1639, 1706, 1706,\n", - " 1706, 1706, 1706, 1951, 1909, 1857, 1871, 1929, 1784, 1784, 1784, 1790,\n", - " 1790, 1803, 2024, 2024, 2094, 1984, 2159, 2113, 2169, 2494, 2055, 2096,\n", - " 2211, 2211, 2297, 2155, 2325, 2325, 2325, 2287, 2492, 2360, 2194, 2530,\n", - " 2492, 2369, 2544, 2544, 2544, 2544, 2544, 2620, 2727, 2727, 2729, 2744,\n", - " 2756, 2774, 2974, 2980, 2971, 2949, 2949, 2965, 3159, 3444, 3515, 3515,\n", - " 3515, 3448, 3537, 3752, 3986, 3872, 3861, 4029, 4219, 3833, 4298, 4150,\n", - " 3933, 4329, 4322, 4164, 4164, 4164, 3922, 4339, 4339, 4339, 4214, 4527,\n", - " 4405, 4211, 4601, 4657, 4720, 4780, 4739, 4739, 4928, 4886, 4902, 5015,\n", - " 5157, 5157, 5157, 5147, 5383, 5383, 5383, 5229, 5169, 5157, 5520, 5520,\n", - " 5520, 5520, 5135, 5135, 5370, 5188, 5394, 5394, 5478, 5431, 5648, 5511,\n", - " 5864, 5870, 5717, 5873, 6107, 5987, 6074, 6106, 6054, 6054, 6552, 6248,\n", - " 6166, 6386, 6315, 6654, 6496, 6496, 6496, 6496, 6920, 6648, 6708, 6782,\n", - " 6782, 6782, 6763, 6763, 6796, 6853, 6904, 6894, 6894, 6894, 6894, 6937,\n", - " 7027, 7027, 7027, 6804, 7022, 6904, 6866, 6916, 6811, 6811, 7173, 6934,\n", - " 6934, 7034, 7148, 7146, 7044, 7044, 6773, 6955, 7004, 7004, 7160],\n", - " [ 114, 65, 149, 71, 111, 70, 7, 15, 135, 116, 74, 45,\n", - " 117, 6, 21, 16, 27, 94, 62, 132, 96, 136, 68, 105,\n", - " 26, 72, 146, 152, 85, 63, 34, 12, 80, 17, 60, 6,\n", - " 149, 6, 129, 94, 27, 116, 44, 47, 125, 83, 124, 27,\n", - " 126, 105, 14, 50, 69, 13, 141, 33, 1, 125, 42, 18,\n", - " 140, 30, 8, 127, 85, 71, 125, 75, 106, 108, 9, 103,\n", - " 130, 50, 48, 115, 76, 39, 138, 148, 56, 139, 43, 40,\n", - " 55, 109, 134, 29, 57, 154, 100, 92, 141, 101, 78, 50,\n", - " 132, 80, 77, 30, 151, 0, 18, 138, 94, 153, 147, 6,\n", - " 6, 25, 90, 28, 81, 61, 110, 150, 52, 99, 23, 125,\n", - " 132, 67, 97, 4, 97, 19, 153, 141, 85, 144, 113, 57,\n", - " 36, 11, 35, 64, 7, 84, 63, 122, 27, 123, 125, 6,\n", - " 85, 118, 38, 96, 85, 32, 126, 13, 6, 133, 102, 107,\n", - " 85, 89, 46, 96, 80, 99, 87, 132, 31, 93, 62, 144,\n", - " 112, 13, 16, 21, 3, 126, 137, 145, 144, 27, 143, 89,\n", - " 83, 97, 126, 121, 82, 20, 119, 35, 54, 85, 20, 86,\n", - " 51, 85, 45, 88, 128, 95, 2, 24, 120, 29, 58, 59,\n", - " 104, 85, 85, 51, 79, 85, 85, 98, 37, 10, 133, 5,\n", - " 85, 91, 45, 41, 148, 155, 49, 134, 22, 85, 66, 85,\n", - " 156, 66, 85, 85, 85, 142, 131, 54, 73, 53, 147]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 76, 1630, 3618, ..., 5172, 1458, 3470],\n", - " [ 170, 127, 63, ..., 5894, 5920, 5940]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 65, 125, 6, 97, 90, 49, 65, 57, 100, 90, 100, 6,\n", - " 72, 65, 72, 6, 65, 150, 132, 36, 57, 6, 85, 49,\n", - " 150, 132, 65, 36, 55, 6, 72, 36, 36, 85, 55, 55,\n", - " 125, 85, 57, 36, 72, 90, 97, 109, 109, 90, 57, 132,\n", - " 125, 125, 90, 90, 90, 90, 132, 57, 125, 90, 55, 55,\n", - " 97, 57, 90, 109, 65, 6, 97, 57, 125, 57, 90, 57,\n", - " 49, 100, 90, 97, 6, 125, 49, 57, 36, 125, 36, 109,\n", - " 85, 132, 132, 57, 55, 125, 97, 72, 97, 109, 125, 49,\n", - " 36, 97, 57, 6, 65, 72, 57, 65, 6, 109, 132, 97,\n", - " 65, 57, 65, 65, 57, 65, 100, 55, 57, 57, 55, 49,\n", - " 57, 49, 109, 125, 97, 109, 57, 97, 6, 109, 6, 150,\n", - " 49, 65, 150, 6, 109, 55, 65, 57, 100, 132, 90, 6,\n", - " 65, 36, 65, 6, 109, 90, 125, 6, 55, 97, 49, 57,\n", - " 125, 57, 125, 109, 132, 85, 57, 55, 150, 90, 97, 55,\n", - " 55, 57, 100, 150, 132, 150, 72, 125, 6, 55, 65, 85,\n", - " 150, 65, 150, 65, 65, 109, 65, 90, 132, 57, 36, 57,\n", - " 36, 90, 72, 72, 100, 49, 100, 125, 72, 72, 57, 57,\n", - " 150, 100, 72, 100, 85, 90, 100, 49, 150, 90, 49, 100,\n", - " 132, 55, 36, 57, 125, 6, 109, 100, 90, 6, 109, 72,\n", - " 65, 57, 97, 109, 55, 132, 6, 85, 57, 36, 125, 6,\n", - " 150, 6, 36, 57, 125, 90, 150, 36, 6, 150, 150, 57,\n", - " 6, 97, 100, 90, 49, 125, 57, 150, 6, 100, 100, 36,\n", - " 150, 85, 100, 150, 36, 36, 65, 57, 150, 125, 150, 72,\n", - " 109, 125, 85, 132, 125, 55, 132, 125, 150, 57, 109, 109,\n", - " 6, 132, 97, 109, 72, 72, 125, 90, 6, 97, 100, 72,\n", - " 65, 49, 72, 6, 36, 6, 85, 65, 36, 57, 57, 132,\n", - " 97, 55, 72, 57, 100, 72, 57, 97, 6, 109, 109, 55,\n", - " 109, 100, 150, 6, 97, 6, 132, 132, 109, 85, 36, 132,\n", - " 57, 49, 97, 100, 6, 132, 55, 57, 57, 132, 49, 49,\n", - " 55, 72, 6, 57, 72, 57, 90, 6, 132, 6, 6, 55,\n", - " 100, 150, 57, 132, 55, 6, 55, 72, 6, 72, 85, 6,\n", - " 6, 85, 6, 100, 36, 36, 85, 36, 49, 97, 6, 100,\n", - " 36, 49, 57, 57, 55, 49, 150, 85, 85, 85, 150, 72,\n", - " 132, 49, 49, 97, 85, 6, 85, 109, 49, 85, 85, 49,\n", - " 6, 100, 6, 57, 85, 85, 6, 6, 90, 6, 6, 97,\n", - " 85, 49, 97, 6],\n", - " [ 147, 41, 259, 98, 233, 96, 7, 214, 230, 187, 45, 99,\n", - " 209, 227, 0, 58, 219, 46, 382, 80, 163, 1, 168, 291,\n", - " 552, 427, 356, 568, 265, 277, 364, 478, 538, 1151, 320, 342,\n", - " 362, 440, 793, 834, 289, 811, 1058, 1008, 708, 635, 1145, 583,\n", - " 982, 629, 667, 680, 974, 648, 693, 798, 926, 823, 1463, 1106,\n", - " 904, 776, 981, 1024, 550, 712, 1543, 1219, 1436, 1346, 1162, 1232,\n", - " 1181, 740, 1157, 1372, 1117, 1196, 1271, 1462, 1242, 1093, 1316, 1095,\n", - " 1180, 1332, 1740, 1675, 1366, 1590, 1428, 1373, 1536, 1673, 1191, 1564,\n", - " 1396, 1635, 1646, 1374, 1557, 1761, 1701, 1583, 1582, 1479, 1726, 1680,\n", - " 1736, 1527, 1822, 1820, 1681, 1440, 1751, 1849, 1805, 1848, 1778, 1842,\n", - " 1975, 1809, 1899, 1700, 1813, 2051, 2243, 1763, 2016, 2110, 2198, 2375,\n", - " 2298, 2509, 2324, 2149, 2058, 2340, 2195, 2333, 2325, 2093, 2189, 2241,\n", - " 2232, 2513, 2393, 2417, 2415, 2524, 2433, 2355, 2506, 2505, 2639, 2414,\n", - " 2790, 2666, 2788, 2486, 2540, 2682, 2558, 2681, 2738, 2757, 2748, 2795,\n", - " 2839, 2716, 2745, 2704, 2739, 3208, 2832, 2809, 3101, 2769, 2931, 2831,\n", - " 2842, 2952, 3006, 2921, 2958, 2897, 2898, 2771, 2892, 3044, 2913, 3104,\n", - " 3096, 3129, 3221, 3142, 3141, 3265, 3394, 3137, 3313, 3559, 3485, 3363,\n", - " 3468, 3342, 3285, 3426, 3435, 3554, 3182, 3483, 3459, 3384, 3561, 3614,\n", - " 3712, 3677, 3675, 3767, 3782, 3651, 3714, 3746, 3583, 3602, 3650, 3827,\n", - " 3868, 3959, 3803, 3943, 3893, 3946, 4035, 3862, 3961, 3812, 4161, 3885,\n", - " 3970, 4155, 4162, 4341, 4000, 4139, 3907, 4328, 4332, 4497, 4154, 4367,\n", - " 4483, 4197, 4554, 4299, 4313, 4263, 4376, 4575, 4589, 4606, 4633, 4624,\n", - " 4603, 4602, 4636, 4605, 4643, 4604, 4665, 4658, 4671, 4743, 4689, 4677,\n", - " 4696, 4707, 4708, 4724, 4721, 4672, 4702, 4807, 4713, 4716, 4749, 4744,\n", - " 4840, 4797, 4873, 4888, 4922, 5000, 4899, 4818, 4973, 4986, 5041, 5050,\n", - " 5048, 5043, 4999, 4978, 4997, 5045, 5060, 5070, 5204, 4976, 5207, 5213,\n", - " 5183, 5156, 5362, 5242, 5106, 5300, 5201, 5453, 5256, 5446, 5322, 5307,\n", - " 5575, 5238, 5437, 5489, 5596, 5408, 5618, 5297, 5502, 5323, 5484, 5427,\n", - " 5564, 5816, 5557, 5659, 5395, 5457, 5770, 5657, 5599, 5464, 5874, 5591,\n", - " 5609, 5678, 5737, 5666, 5587, 5601, 5768, 5797, 5706, 5684, 5802, 5784,\n", - " 6031, 5669, 5928, 5824, 5887, 5791, 6064, 5960, 6238, 6233, 6164, 6149,\n", - " 5932, 6073, 5910, 6297, 6421, 6309, 6179, 6399, 6423, 6518, 6377, 6657,\n", - " 6192, 6394, 6621, 6316, 6544, 6823, 6769, 6489, 6629, 6794, 6605, 6403,\n", - " 6613, 6723, 6772, 6882, 6719, 6762, 6732, 6879, 7005, 6827, 7121, 7023,\n", - " 6958, 6969, 6733, 7201, 6994, 7054, 7174, 7199, 7046, 7172, 7149, 7178,\n", - " 7220, 7083, 7131, 7140]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 95, 95, 95, ..., 6008, 6008, 6008],\n", - " [ 443, 435, 560, ..., 256, 357, 266]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 436, 309, 436, ..., 161, 249, 573],\n", - " [ 68, 100, 35, ..., 5996, 6022, 5873]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3226, 2077, 5735, ..., 3221, 5966, 3548],\n", - " [ 128, 182, 134, ..., 7251, 7261, 7197]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 95, 288, 288, ..., 5969, 5969, 5969],\n", - " [ 117, 487, 622, ..., 2129, 1240, 5867]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 60, 60, 60, ..., 7256, 7256, 7256],\n", - " [2706, 2901, 3349, ..., 289, 3583, 3601]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005798\n", - "sampling 0.005645\n", - "noi time: 0.001782\n", - "get_vertex_data call: 0.025944\n", - "noi group time: 0.002106\n", - "eoi_group_time: 0.013328\n", - "second half: 0.190085\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16691, 36709, 32616, ..., 1120069, 1110068, 1110077],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16691, 36709, 32616, ..., 1120069, 1110068, 1110077],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208586, 1228165, 1205181, ..., 1929326, 1929220, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208586, 1228165, 1205181, ..., 1929326, 1929220, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1136345, 1135160, 1135726, 1141748, 1141751, 1141758, 1138335,\n", - " 1136223, 1136213, 1141250, 1139471, 1143600, 1139821, 1137947, 1138933,\n", - " 1143372, 1146646, 1139609, 1139615, 1148976, 1150497, 1142964, 1148582,\n", - " 1149216, 1149228, 1155686, 1143820, 1147473, 1147477, 1147483, 1147486,\n", - " 1135992, 1153936, 1153943, 1149033, 1134697, 1134700, 1135118, 1148346,\n", - " 1146661, 1136125, 1152671, 1138345, 1148546, 1153217, 1141904, 1155018,\n", - " 1147211, 1136674, 1152427, 1134710, 1146371, 1137834, 1151547, 1138112,\n", - " 1138119, 1140158, 1140020, 1162460, 1135367, 1135202, 1134967, 1141036,\n", - " 1136770, 1134794, 1138504, 1137329, 1137342, 1157088, 1136826, 1137534,\n", - " 1157397, 1136662, 1156152, 1148481, 1140970, 1158136, 1156962, 1154132,\n", - " 1139685, 1139689, 1137287, 1157703, 1157706, 1138436, 1138440, 1138445,\n", - " 1138847, 1135103, 1138696, 1156603, 1147113, 1138185, 1145843, 1139844,\n", - " 1138069, 1142255, 1136085, 1136095, 1134992, 1136730, 1159012, 1144410,\n", - " 1153536, 1143631, 1136071, 1136068, 1138148, 1134891, 1134888, 1152042,\n", - " 1152044, 1152045, 1139069, 1142298, 1140670, 1137734, 1147327, 1135543,\n", - " 1135549, 1141088, 1141094, 1141095, 1141098, 1139898, 1145358, 1135291,\n", - " 1143767, 1137299, 1139033, 1146834, 1141681, 1135860, 1136427, 1136637,\n", - " 1161173, 1141112, 1141648, 1136917, 1143673, 1137198, 1160616, 1141156,\n", - " 1139495, 1144650, 1134987, 1147850, 1144428, 1138490, 1142056, 1142048,\n", - " 1141813, 1141821, 1138465, 1137764, 1143576, 1139190, 1140110, 1142913,\n", - " 1143107, 1136867, 1136864, 1136874, 1140885, 1144182, 1144190, 1137614,\n", - " 1146201, 1136565, 1137854, 1149193, 1162804, 1141367, 1153068, 1141720,\n", - " 1141719, 1149097, 1149101, 1144277, 1143904, 1139510, 1145001, 1164534,\n", - " 1146693, 1146695, 1147050, 1147047, 1145873, 1141925, 1145339, 1140580,\n", - " 1150243, 1148313, 1143643, 1141390, 1145974, 1143845, 1143851, 1163652,\n", - " 1146024, 1147266, 1154328, 1141234, 1139990, 1143293, 1143283, 1143294,\n", - " 1147543, 1147540, 1147282, 1142829, 1142637, 1148003, 1136167, 1142584,\n", - " 1157720, 1136836, 1146100, 1139329, 1139341, 1142149, 1142159, 1143345,\n", - " 1143350, 1145813, 1140845, 1144083, 1138600, 1138602, 1135874, 1150756,\n", - " 1150294, 1150919, 1150567, 1146514, 1143456, 1140483, 1140824, 1146578,\n", - " 1146580, 1147524, 1147523, 1140364, 1137990, 1166404, 1147984, 1147995,\n", - " 1147999, 1134899, 1139252, 1148704, 1142700, 1148473, 1147031, 1143828,\n", - " 1158226, 1150452, 1154526, 1145240, 1145246, 1145750, 1142370, 1138638,\n", - " 1151242, 1152530, 1152538, 1152537, 1150287, 1150445, 1148935, 1154433,\n", - " 1149791, 1144514, 1154825, 1169727, 1151480, 1139919, 1147012, 1158950,\n", - " 1141943, 1141949, 1150731, 1148744, 1153568, 1153574, 1154985, 1147653,\n", - " 1137725, 1154420, 1158799, 1136247, 1136252, 1138204, 1139721, 1152482,\n", - " 1152436, 1157978, 1157983, 1148720, 1148734, 1148729, 1150057, 1148204,\n", - " 1169369, 1154203, 1153124, 1153188, 1153197, 1145111, 1150935, 1147442,\n", - " 1154190, 1148498, 1146565, 1141420, 1150636, 1150637, 1151356, 1147743,\n", - " 1153447, 1153449, 1148957, 1146969, 1146967, 1153257, 1150219, 1146623,\n", - " 1146492, 1152849, 1152409, 1152415, 1152106, 1156324, 1156325, 1153032,\n", - " 1153037, 1150093, 1145546, 1137746, 1137755, 1146307, 1159974, 1136402,\n", - " 1155337, 1151617, 1145278, 1136131, 1136134, 1136142, 1136798, 1140451,\n", - " 1152160, 1140939, 1152341, 1152342, 1156816, 1153311, 1138279, 1138281,\n", - " 1152928, 1151064, 1156399, 1156422, 1148040, 1155202, 1149300, 1155226,\n", - " 1173616, 1168188, 1148628, 1158530, 1158540, 1137458, 1157518, 1142047,\n", - " 1154381, 1157229, 1157547, 1142387, 1158916, 1157064, 1153884, 1155422,\n", - " 1152841, 1152833, 1139484, 1143491, 1135729, 1152180, 1156638, 1151788,\n", - " 1165700, 1139525, 1158308, 1158311, 1155441, 1150136, 1162113, 1162120,\n", - " 1138569, 1154536, 1142755, 1164638, 1138775, 1151379, 1155122, 1152527,\n", - " 1157183, 1149321, 1149519, 1151424, 1146920, 1156460, 1157873, 1155626,\n", - " 1155628, 1156563, 1154555, 1155572, 1158824, 1148835, 1155646, 1154642,\n", - " 1163374, 1179427, 1160896, 1160907, 1150371, 1153317, 1155293, 1143517,\n", - " 1159622, 1151030, 1157288, 1137152, 1158996, 1137381, 1137385, 1137387,\n", - " 1137323, 1164314, 1134685, 1135601, 1148149, 1150661, 1158665, 1149145,\n", - " 1159258, 1144451, 1152209, 1152220, 1167309, 1152498, 1156693, 1140374,\n", - " 1144843, 1142466, 1155971, 1155975, 1153766, 1158846, 1155404, 1149700,\n", - " 1166124, 1136896, 1158760, 1171176, 1158438, 1158439, 1158447, 1158285,\n", - " 1136494, 1136491, 1157575, 1156665, 1156490, 1153808, 1136646, 1151146,\n", - " 1146126, 1164524, 1188202, 1138110, 1155521, 1155528, 1152466, 1157759,\n", - " 1157751, 1162683, 1159042, 1159052, 1159049, 1159056, 1159057, 1172286,\n", - " 1157946, 1153052, 1171551, 1163079, 1163081, 1166246, 1167557, 1144158,\n", - " 1144156, 1165823, 1153843, 1138393, 1162917, 1149070, 1145948, 1155480,\n", - " 1153514, 1153519, 1164857, 1147300, 1158680, 1162564, 1138161, 1164006,\n", - " 1164012, 1156787, 1149963, 1154590, 1139281, 1161001, 1159999, 1140731,\n", - " 1159773, 1146063, 1159560, 1158865, 1158878, 1140643, 1148603, 1141800,\n", - " 1159025, 1159032, 1186971, 1165604, 1165609, 1152247, 1158902, 1155588,\n", - " 1160498, 1156582, 1158405, 1168527, 1144986, 1146510, 1161237, 1144747,\n", - " 1153209, 1151650, 1157052, 1149901, 1156739, 1163260, 1144812, 1162087,\n", - " 1164750, 1156303, 1144054, 1167751, 1169282, 1185486, 1160732, 1147681,\n", - " 1147693, 1145447, 1152624, 1148124, 1139351, 1139345, 1147723, 1145900,\n", - " 1153534, 1168659, 1151752, 1171571, 1181052, 1170980, 1149555, 1149560,\n", - " 1158724, 1158735, 1158722, 1144690, 1145674, 1150783, 1171973, 1144681,\n", - " 1166653, 1155180, 1155170, 1165011, 1150515, 1164832, 1145529, 1145531,\n", - " 1144346, 1144336, 1157534, 1138383, 1154670, 1135852, 1152998, 1157331,\n", - " 1138130, 1141045, 1141043, 1169352, 1169359, 1154353, 1149452, 1158156,\n", - " 1158611, 1158054, 1149846, 1159840, 1177149, 1152353, 1179597, 1168455,\n", - " 1168413, 1148330, 1177430, 1173307, 1169144, 1154027, 1152154, 1164973,\n", - " 1159658, 1159655, 1157153, 1147708, 1145783, 1157593, 1177413, 1154314,\n", - " 1171805, 1155739, 1162106, 1181021, 1171886, 1180312, 1160150, 1174917,\n", - " 1177680, 1177015, 1150234, 1161591, 1154148, 1158176, 1149173, 1143279,\n", - " 1169761, 1167658, 1153803, 1153805, 1181575, 1177219, 1171396, 1184087,\n", - " 1161255, 1177981, 1171773, 1172010, 1157795, 1143330, 1182801, 1171623,\n", - " 1157132, 1157124, 1176765, 1183707, 1181920, 1180085, 1153898, 1145584,\n", - " 1188789, 1160007, 1162403, 1145626, 1156443, 1180736, 1161906, 1149755,\n", - " 1146252, 1186957, 1155992, 1181141, 1158512, 1186505, 1155899, 1183633,\n", - " 1180942, 1164462, 1168282, 1164227, 1162485, 1154957, 1161819, 1147182,\n", - " 1156170, 1168939, 1181509, 1139828, 1139831, 1192068, 1156055, 1189273,\n", - " 1146392, 1146395, 1173058, 1159085, 1181939, 1182555, 1177307, 1170151,\n", - " 1151774, 1153741, 1152115, 1162502, 1186572, 1171201, 1163142, 1177842,\n", - " 1150406, 1172423, 1172429, 1172122, 1171953, 1181626, 1187104, 1183950,\n", - " 1178135, 1176826, 1181646, 1162656, 1172896, 1181710, 1182854, 1187645],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1136345, 1135160, 1135726, 1141748, 1141751, 1141758, 1138335,\n", - " 1136223, 1136213, 1141250, 1139471, 1143600, 1139821, 1137947, 1138933,\n", - " 1143372, 1146646, 1139609, 1139615, 1148976, 1150497, 1142964, 1148582,\n", - " 1149216, 1149228, 1155686, 1143820, 1147473, 1147477, 1147483, 1147486,\n", - " 1135992, 1153936, 1153943, 1149033, 1134697, 1134700, 1135118, 1148346,\n", - " 1146661, 1136125, 1152671, 1138345, 1148546, 1153217, 1141904, 1155018,\n", - " 1147211, 1136674, 1152427, 1134710, 1146371, 1137834, 1151547, 1138112,\n", - " 1138119, 1140158, 1140020, 1162460, 1135367, 1135202, 1134967, 1141036,\n", - " 1136770, 1134794, 1138504, 1137329, 1137342, 1157088, 1136826, 1137534,\n", - " 1157397, 1136662, 1156152, 1148481, 1140970, 1158136, 1156962, 1154132,\n", - " 1139685, 1139689, 1137287, 1157703, 1157706, 1138436, 1138440, 1138445,\n", - " 1138847, 1135103, 1138696, 1156603, 1147113, 1138185, 1145843, 1139844,\n", - " 1138069, 1142255, 1136085, 1136095, 1134992, 1136730, 1159012, 1144410,\n", - " 1153536, 1143631, 1136071, 1136068, 1138148, 1134891, 1134888, 1152042,\n", - " 1152044, 1152045, 1139069, 1142298, 1140670, 1137734, 1147327, 1135543,\n", - " 1135549, 1141088, 1141094, 1141095, 1141098, 1139898, 1145358, 1135291,\n", - " 1143767, 1137299, 1139033, 1146834, 1141681, 1135860, 1136427, 1136637,\n", - " 1161173, 1141112, 1141648, 1136917, 1143673, 1137198, 1160616, 1141156,\n", - " 1139495, 1144650, 1134987, 1147850, 1144428, 1138490, 1142056, 1142048,\n", - " 1141813, 1141821, 1138465, 1137764, 1143576, 1139190, 1140110, 1142913,\n", - " 1143107, 1136867, 1136864, 1136874, 1140885, 1144182, 1144190, 1137614,\n", - " 1146201, 1136565, 1137854, 1149193, 1162804, 1141367, 1153068, 1141720,\n", - " 1141719, 1149097, 1149101, 1144277, 1143904, 1139510, 1145001, 1164534,\n", - " 1146693, 1146695, 1147050, 1147047, 1145873, 1141925, 1145339, 1140580,\n", - " 1150243, 1148313, 1143643, 1141390, 1145974, 1143845, 1143851, 1163652,\n", - " 1146024, 1147266, 1154328, 1141234, 1139990, 1143293, 1143283, 1143294,\n", - " 1147543, 1147540, 1147282, 1142829, 1142637, 1148003, 1136167, 1142584,\n", - " 1157720, 1136836, 1146100, 1139329, 1139341, 1142149, 1142159, 1143345,\n", - " 1143350, 1145813, 1140845, 1144083, 1138600, 1138602, 1135874, 1150756,\n", - " 1150294, 1150919, 1150567, 1146514, 1143456, 1140483, 1140824, 1146578,\n", - " 1146580, 1147524, 1147523, 1140364, 1137990, 1166404, 1147984, 1147995,\n", - " 1147999, 1134899, 1139252, 1148704, 1142700, 1148473, 1147031, 1143828,\n", - " 1158226, 1150452, 1154526, 1145240, 1145246, 1145750, 1142370, 1138638,\n", - " 1151242, 1152530, 1152538, 1152537, 1150287, 1150445, 1148935, 1154433,\n", - " 1149791, 1144514, 1154825, 1169727, 1151480, 1139919, 1147012, 1158950,\n", - " 1141943, 1141949, 1150731, 1148744, 1153568, 1153574, 1154985, 1147653,\n", - " 1137725, 1154420, 1158799, 1136247, 1136252, 1138204, 1139721, 1152482,\n", - " 1152436, 1157978, 1157983, 1148720, 1148734, 1148729, 1150057, 1148204,\n", - " 1169369, 1154203, 1153124, 1153188, 1153197, 1145111, 1150935, 1147442,\n", - " 1154190, 1148498, 1146565, 1141420, 1150636, 1150637, 1151356, 1147743,\n", - " 1153447, 1153449, 1148957, 1146969, 1146967, 1153257, 1150219, 1146623,\n", - " 1146492, 1152849, 1152409, 1152415, 1152106, 1156324, 1156325, 1153032,\n", - " 1153037, 1150093, 1145546, 1137746, 1137755, 1146307, 1159974, 1136402,\n", - " 1155337, 1151617, 1145278, 1136131, 1136134, 1136142, 1136798, 1140451,\n", - " 1152160, 1140939, 1152341, 1152342, 1156816, 1153311, 1138279, 1138281,\n", - " 1152928, 1151064, 1156399, 1156422, 1148040, 1155202, 1149300, 1155226,\n", - " 1173616, 1168188, 1148628, 1158530, 1158540, 1137458, 1157518, 1142047,\n", - " 1154381, 1157229, 1157547, 1142387, 1158916, 1157064, 1153884, 1155422,\n", - " 1152841, 1152833, 1139484, 1143491, 1135729, 1152180, 1156638, 1151788,\n", - " 1165700, 1139525, 1158308, 1158311, 1155441, 1150136, 1162113, 1162120,\n", - " 1138569, 1154536, 1142755, 1164638, 1138775, 1151379, 1155122, 1152527,\n", - " 1157183, 1149321, 1149519, 1151424, 1146920, 1156460, 1157873, 1155626,\n", - " 1155628, 1156563, 1154555, 1155572, 1158824, 1148835, 1155646, 1154642,\n", - " 1163374, 1179427, 1160896, 1160907, 1150371, 1153317, 1155293, 1143517,\n", - " 1159622, 1151030, 1157288, 1137152, 1158996, 1137381, 1137385, 1137387,\n", - " 1137323, 1164314, 1134685, 1135601, 1148149, 1150661, 1158665, 1149145,\n", - " 1159258, 1144451, 1152209, 1152220, 1167309, 1152498, 1156693, 1140374,\n", - " 1144843, 1142466, 1155971, 1155975, 1153766, 1158846, 1155404, 1149700,\n", - " 1166124, 1136896, 1158760, 1171176, 1158438, 1158439, 1158447, 1158285,\n", - " 1136494, 1136491, 1157575, 1156665, 1156490, 1153808, 1136646, 1151146,\n", - " 1146126, 1164524, 1188202, 1138110, 1155521, 1155528, 1152466, 1157759,\n", - " 1157751, 1162683, 1159042, 1159052, 1159049, 1159056, 1159057, 1172286,\n", - " 1157946, 1153052, 1171551, 1163079, 1163081, 1166246, 1167557, 1144158,\n", - " 1144156, 1165823, 1153843, 1138393, 1162917, 1149070, 1145948, 1155480,\n", - " 1153514, 1153519, 1164857, 1147300, 1158680, 1162564, 1138161, 1164006,\n", - " 1164012, 1156787, 1149963, 1154590, 1139281, 1161001, 1159999, 1140731,\n", - " 1159773, 1146063, 1159560, 1158865, 1158878, 1140643, 1148603, 1141800,\n", - " 1159025, 1159032, 1186971, 1165604, 1165609, 1152247, 1158902, 1155588,\n", - " 1160498, 1156582, 1158405, 1168527, 1144986, 1146510, 1161237, 1144747,\n", - " 1153209, 1151650, 1157052, 1149901, 1156739, 1163260, 1144812, 1162087,\n", - " 1164750, 1156303, 1144054, 1167751, 1169282, 1185486, 1160732, 1147681,\n", - " 1147693, 1145447, 1152624, 1148124, 1139351, 1139345, 1147723, 1145900,\n", - " 1153534, 1168659, 1151752, 1171571, 1181052, 1170980, 1149555, 1149560,\n", - " 1158724, 1158735, 1158722, 1144690, 1145674, 1150783, 1171973, 1144681,\n", - " 1166653, 1155180, 1155170, 1165011, 1150515, 1164832, 1145529, 1145531,\n", - " 1144346, 1144336, 1157534, 1138383, 1154670, 1135852, 1152998, 1157331,\n", - " 1138130, 1141045, 1141043, 1169352, 1169359, 1154353, 1149452, 1158156,\n", - " 1158611, 1158054, 1149846, 1159840, 1177149, 1152353, 1179597, 1168455,\n", - " 1168413, 1148330, 1177430, 1173307, 1169144, 1154027, 1152154, 1164973,\n", - " 1159658, 1159655, 1157153, 1147708, 1145783, 1157593, 1177413, 1154314,\n", - " 1171805, 1155739, 1162106, 1181021, 1171886, 1180312, 1160150, 1174917,\n", - " 1177680, 1177015, 1150234, 1161591, 1154148, 1158176, 1149173, 1143279,\n", - " 1169761, 1167658, 1153803, 1153805, 1181575, 1177219, 1171396, 1184087,\n", - " 1161255, 1177981, 1171773, 1172010, 1157795, 1143330, 1182801, 1171623,\n", - " 1157132, 1157124, 1176765, 1183707, 1181920, 1180085, 1153898, 1145584,\n", - " 1188789, 1160007, 1162403, 1145626, 1156443, 1180736, 1161906, 1149755,\n", - " 1146252, 1186957, 1155992, 1181141, 1158512, 1186505, 1155899, 1183633,\n", - " 1180942, 1164462, 1168282, 1164227, 1162485, 1154957, 1161819, 1147182,\n", - " 1156170, 1168939, 1181509, 1139828, 1139831, 1192068, 1156055, 1189273,\n", - " 1146392, 1146395, 1173058, 1159085, 1181939, 1182555, 1177307, 1170151,\n", - " 1151774, 1153741, 1152115, 1162502, 1186572, 1171201, 1163142, 1177842,\n", - " 1150406, 1172423, 1172429, 1172122, 1171953, 1181626, 1187104, 1183950,\n", - " 1178135, 1176826, 1181646, 1162656, 1172896, 1181710, 1182854, 1187645],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1195697, 1197744, 1199736, 1198248, 1199282, 1202255, 1198832,\n", - " 1201582, 1197777, 1198557, 1194745, 1197164, 1195491, 1199053, 1195511,\n", - " 1195512, 1195263, 1199135, 1196529, 1201992, 1196030, 1195457, 1195888,\n", - " 1195895, 1199171, 1196148, 1195740, 1196334, 1196979, 1197831, 1199371,\n", - " 1195313, 1195325, 1195987, 1195989, 1198036, 1198958, 1195145, 1195221,\n", - " 1197141, 1196249, 1196247, 1195841, 1195918, 1198504, 1195351, 1200949,\n", - " 1197291, 1199185, 1194928, 1199628, 1201639, 1199797, 1199803, 1197676,\n", - " 1195017, 1194795, 1198762, 1200060, 1201511, 1197983, 1201116, 1196727,\n", - " 1195771, 1200887, 1198428, 1199893, 1198811, 1201526, 1200169, 1198786,\n", - " 1201156, 1202629, 1202630, 1201056, 1201041, 1202499, 1196645, 1200429,\n", - " 1197097, 1199886, 1202138, 1199908, 1196779, 1201029, 1200907, 1199976,\n", - " 1200323, 1202714, 1195876, 1195885, 1202209, 1202210, 1199929, 1202304,\n", - " 1196963, 1196966, 1199606, 1195664, 1198929, 1195418, 1200928, 1197822,\n", - " 1197821, 1196415, 1201499, 1200585, 1196373, 1201138, 1194730, 1198147,\n", - " 1198830, 1197735, 1199782, 1198819, 1200707, 1201361, 1194908, 1198751],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1195697, 1197744, 1199736, 1198248, 1199282, 1202255, 1198832,\n", - " 1201582, 1197777, 1198557, 1194745, 1197164, 1195491, 1199053, 1195511,\n", - " 1195512, 1195263, 1199135, 1196529, 1201992, 1196030, 1195457, 1195888,\n", - " 1195895, 1199171, 1196148, 1195740, 1196334, 1196979, 1197831, 1199371,\n", - " 1195313, 1195325, 1195987, 1195989, 1198036, 1198958, 1195145, 1195221,\n", - " 1197141, 1196249, 1196247, 1195841, 1195918, 1198504, 1195351, 1200949,\n", - " 1197291, 1199185, 1194928, 1199628, 1201639, 1199797, 1199803, 1197676,\n", - " 1195017, 1194795, 1198762, 1200060, 1201511, 1197983, 1201116, 1196727,\n", - " 1195771, 1200887, 1198428, 1199893, 1198811, 1201526, 1200169, 1198786,\n", - " 1201156, 1202629, 1202630, 1201056, 1201041, 1202499, 1196645, 1200429,\n", - " 1197097, 1199886, 1202138, 1199908, 1196779, 1201029, 1200907, 1199976,\n", - " 1200323, 1202714, 1195876, 1195885, 1202209, 1202210, 1199929, 1202304,\n", - " 1196963, 1196966, 1199606, 1195664, 1198929, 1195418, 1200928, 1197822,\n", - " 1197821, 1196415, 1201499, 1200585, 1196373, 1201138, 1194730, 1198147,\n", - " 1198830, 1197735, 1199782, 1198819, 1200707, 1201361, 1194908, 1198751],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 5.1737e-02, -8.9742e-04, 3.6105e-01, ..., -4.2562e-04,\n", - " -1.7395e-05, -2.9809e-03],\n", - " [ 7.3244e-02, -7.0254e-04, 3.4986e-01, ..., -1.7039e-04,\n", - " -1.3101e-05, -3.1074e-03],\n", - " [ 5.1737e-02, -8.9742e-04, 3.6105e-01, ..., -4.2562e-04,\n", - " -1.7395e-05, -2.9809e-03],\n", - " ...,\n", - " [ 1.9835e-02, -4.4677e-04, 2.6740e-01, ..., 1.3836e-02,\n", - " -3.6593e-04, -2.7666e-03],\n", - " [ 4.6660e-02, -1.1382e-03, 3.8133e-01, ..., -2.2805e-04,\n", - " 7.7521e-04, -3.1189e-03],\n", - " [ 3.4518e-02, -8.3620e-04, 3.5888e-01, ..., -2.1533e-04,\n", - " -1.1717e-04, -2.9574e-03]], device='cuda:0'), 'paper': tensor([[ 2.4233, -0.0342, 2.2095, ..., -0.0107, -0.0146, 2.4849],\n", - " [ 3.8883, -0.0540, 3.6027, ..., -0.0184, -0.0273, 3.6740],\n", - " [ 2.6528, -0.0329, 2.1113, ..., -0.0100, -0.0140, 2.5643],\n", - " ...,\n", - " [ 2.5426, -0.0343, 2.1314, ..., -0.0095, -0.0136, 2.9124],\n", - " [ 3.2361, -0.0414, 2.9459, ..., -0.0147, -0.0207, 3.2679],\n", - " [ 2.4619, -0.0366, 2.6394, ..., -0.0082, -0.0159, 3.0667]],\n", - " device='cuda:0'), 'author': tensor([[ 5.2193e-01, -3.5538e-03, 4.2435e-02, ..., -1.2800e-03,\n", - " -9.2577e-04, 5.0402e-02],\n", - " [ 4.4873e-01, -4.8643e-03, 7.0067e-02, ..., -3.7178e-03,\n", - " -9.5531e-04, 8.2385e-02],\n", - " [ 5.4802e-01, -4.7611e-03, -1.9377e-04, ..., -2.3507e-03,\n", - " -1.8433e-04, 1.4393e-01],\n", - " ...,\n", - " [ 4.9352e-01, -5.6128e-03, -3.3577e-04, ..., -2.4867e-03,\n", - " 4.4781e-02, 1.7011e-01],\n", - " [ 5.1292e-01, -4.1225e-03, 3.5444e-02, ..., -1.7522e-03,\n", - " -4.1797e-04, 5.7068e-02],\n", - " [ 4.0525e-01, -4.2727e-03, -4.2145e-04, ..., -1.7394e-03,\n", - " -3.3960e-05, 9.9620e-02]], device='cuda:0'), 'field_of_study': tensor([[-0.0110, 0.2031, -0.0036, ..., 1.2689, -0.0021, -0.0072],\n", - " [-0.0085, 0.2545, -0.0034, ..., 1.1194, -0.0023, -0.0065],\n", - " [-0.0109, 0.2080, -0.0042, ..., 1.2320, -0.0026, -0.0080],\n", - " ...,\n", - " [-0.0087, 0.0240, -0.0025, ..., 0.8290, -0.0022, -0.0052],\n", - " [-0.0079, 0.1069, -0.0031, ..., 0.8079, -0.0021, -0.0055],\n", - " [-0.0117, 0.3158, -0.0032, ..., 1.2531, -0.0018, -0.0091]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 118, 164, 21, 432, 357, 199, 216, 216, 404, 175, 175, 381,\n", - " 381, 393, 298, 425, 746, 512, 621, 621, 925, 726, 918, 1009,\n", - " 1037, 1066, 972, 1205, 1151, 1151, 1151, 1208, 1289, 1172, 1172, 1289,\n", - " 1396, 1292, 1292, 1469, 1166, 1166, 1374, 1534, 1504, 1362, 1355, 1355,\n", - " 1446, 1443, 1505, 1676, 1726, 1706, 1718, 1730, 1695, 1706, 1893, 1964,\n", - " 1720, 1942, 2027, 1924, 1754, 1910, 1867, 1867, 1969, 2252, 1920, 2046,\n", - " 2174, 2192, 2151, 2221, 2170, 2258, 2182, 2258, 2258, 2337, 2400, 2343,\n", - " 2471, 2339, 2770, 2577, 2638, 2643, 2566, 2654, 2980, 3056, 3142, 3157,\n", - " 3010, 3191, 3231, 3400, 3400, 3490, 3368, 3397, 3684, 3368, 3368, 3544,\n", - " 3507, 3601, 3816, 3617, 3827, 3933, 3893, 4002, 4112, 4101, 4146, 4294,\n", - " 4294, 4229, 4229, 4229, 4697, 4587, 4587, 4427, 4404, 4540, 4466, 4715,\n", - " 4580, 4757, 4545, 4545, 4617, 4709, 4607, 4457, 4805, 4754, 5130, 5387,\n", - " 5147, 5034, 5034, 5327, 5469, 5061, 5064, 5477, 5142, 5142, 5123, 5522,\n", - " 5425, 5509, 5509, 5505, 5291, 6104, 5429, 5418, 5418, 5418, 5418, 5418,\n", - " 5418, 5683, 5822, 5822, 5929, 5992, 5858, 5886, 5931, 5907, 5776, 5776,\n", - " 6139, 6031, 5860, 5920, 6103, 6092, 6092],\n", - " [ 104, 45, 86, 80, 63, 82, 26, 88, 97, 47, 32, 63,\n", - " 79, 13, 82, 47, 82, 113, 66, 77, 40, 47, 11, 103,\n", - " 20, 55, 28, 15, 25, 78, 118, 55, 3, 41, 14, 31,\n", - " 73, 39, 29, 51, 85, 71, 60, 12, 85, 100, 35, 15,\n", - " 65, 0, 58, 40, 68, 63, 116, 30, 82, 106, 55, 40,\n", - " 45, 53, 67, 45, 116, 63, 61, 69, 14, 47, 21, 86,\n", - " 53, 13, 19, 72, 100, 93, 32, 22, 48, 105, 82, 73,\n", - " 82, 12, 26, 103, 23, 71, 26, 103, 63, 45, 86, 55,\n", - " 76, 115, 108, 52, 84, 19, 7, 96, 51, 55, 4, 91,\n", - " 89, 61, 49, 101, 19, 117, 17, 85, 74, 92, 16, 1,\n", - " 37, 102, 20, 90, 117, 75, 66, 55, 107, 5, 81, 46,\n", - " 52, 52, 111, 52, 119, 27, 57, 52, 29, 62, 52, 10,\n", - " 9, 52, 84, 86, 70, 98, 43, 2, 94, 44, 24, 8,\n", - " 64, 112, 48, 16, 33, 63, 117, 115, 87, 59, 110, 54,\n", - " 99, 114, 90, 83, 51, 42, 6, 18, 75, 56, 36, 38,\n", - " 50, 20, 95, 99, 109, 6, 34]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2718, 2741, 3174, ..., 988, 2741, 578],\n", - " [ 202, 218, 150, ..., 6063, 5980, 6016]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 58, 82, 29, ..., 47, 49, 19],\n", - " [ 26, 8, 81, ..., 6166, 6089, 6156]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 232, 232, 232, ..., 5880, 5880, 6074],\n", - " [ 293, 13, 351, ..., 417, 682, 344]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 673, 71, 249, ..., 607, 251, 251],\n", - " [ 20, 131, 24, ..., 6080, 5974, 6070]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5468, 5558, 1572, ..., 4385, 4484, 4568],\n", - " [ 34, 21, 153, ..., 6031, 6031, 6092]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 232, 232, 232, ..., 5880, 5880, 5880],\n", - " [ 421, 484, 544, ..., 3585, 3786, 4211]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 21, 11, 11, ..., 6092, 6092, 6092],\n", - " [5558, 1099, 864, ..., 5441, 5449, 5337]], device='cuda:0')}\n", - "Epoch: 001, Loss: 1.0230, Train: 244.6000\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.007484\n", - "sampling 0.007031\n", - "noi time: 0.002206\n", - "get_vertex_data call: 0.069707\n", - "noi group time: 0.003644\n", - "eoi_group_time: 0.01361\n", - "second half: 0.249576\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 19138, 16691, 31145, ..., 1132465, 1120069, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 19138, 16691, 31145, ..., 1132465, 1120069, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1216136, 1203800, 1231359, ..., 1937000, 1936963, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1216136, 1203800, 1231359, ..., 1937000, 1936963, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1141424, 1135926, 1138555, 1135716, 1135723, 1135726, 1140787,\n", - " 1141756, 1141758, 1138335, 1139462, 1136156, 1136969, 1141443, 1146803,\n", - " 1138897, 1138906, 1143600, 1146978, 1146983, 1145989, 1145992, 1137268,\n", - " 1143366, 1143372, 1146644, 1140781, 1148987, 1150506, 1150509, 1142964,\n", - " 1136959, 1149216, 1143820, 1149646, 1147473, 1147483, 1141882, 1142881,\n", - " 1153940, 1144636, 1149037, 1146992, 1146660, 1153217, 1153223, 1147101,\n", - " 1135144, 1150554, 1155014, 1139373, 1147211, 1136683, 1136685, 1150322,\n", - " 1152427, 1134710, 1146376, 1134806, 1140313, 1140540, 1138112, 1135179,\n", - " 1137171, 1149461, 1138366, 1153463, 1140158, 1135909, 1135910, 1140020,\n", - " 1140029, 1162460, 1135367, 1135202, 1135204, 1140767, 1134974, 1141036,\n", - " 1134794, 1143377, 1138504, 1137342, 1157088, 1137693, 1136619, 1144395,\n", - " 1136714, 1157398, 1157397, 1136662, 1137441, 1143321, 1137472, 1136928,\n", - " 1135265, 1139161, 1134841, 1141703, 1135579, 1135583, 1142596, 1141081,\n", - " 1136111, 1140240, 1140970, 1138514, 1153094, 1153101, 1153092, 1137957,\n", - " 1158136, 1137019, 1156899, 1139684, 1139687, 1139874, 1157702, 1138440,\n", - " 1138445, 1138461, 1158386, 1149328, 1138843, 1138847, 1156603, 1156606,\n", - " 1147112, 1147118, 1142611, 1160819, 1138190, 1158984, 1145843, 1145851,\n", - " 1148531, 1137423, 1135760, 1138067, 1138069, 1136089, 1134992, 1135002,\n", - " 1134771, 1152654, 1135776, 1139751, 1136730, 1140199, 1139318, 1141070,\n", - " 1153543, 1143631, 1139084, 1136068, 1139929, 1139934, 1137587, 1138648,\n", - " 1138148, 1146075, 1140551, 1152042, 1152044, 1140656, 1137734, 1137728,\n", - " 1146222, 1134738, 1134742, 1134750, 1135540, 1141088, 1141098, 1149001,\n", - " 1143767, 1154860, 1137299, 1143225, 1137674, 1139032, 1149979, 1152719,\n", - " 1135860, 1136426, 1139436, 1136637, 1141224, 1139386, 1159794, 1136917,\n", - " 1143673, 1143677, 1144230, 1140607, 1141155, 1141156, 1141161, 1141785,\n", - " 1139495, 1141609, 1144650, 1147844, 1147850, 1137074, 1144417, 1144428,\n", - " 1142050, 1143158, 1143153, 1146787, 1145161, 1143203, 1140175, 1158746,\n", - " 1158749, 1137764, 1137771, 1149105, 1148871, 1139190, 1137062, 1138708,\n", - " 1140102, 1142913, 1143107, 1143111, 1144596, 1142843, 1142840, 1136866,\n", - " 1136867, 1136864, 1140885, 1140442, 1144182, 1150906, 1158699, 1138529,\n", - " 1140501, 1137846, 1137841, 1147153, 1136378, 1141365, 1141367, 1151109,\n", - " 1149101, 1138292, 1138293, 1143919, 1139508, 1139510, 1139769, 1140093,\n", - " 1139127, 1145000, 1145200, 1140619, 1139171, 1143692, 1147050, 1145873,\n", - " 1143543, 1152976, 1135457, 1135459, 1142555, 1139447, 1139448, 1138995,\n", - " 1141925, 1141933, 1144241, 1144242, 1141853, 1137149, 1150243, 1137571,\n", - " 1134852, 1134861, 1141382, 1145976, 1145974, 1143851, 1142098, 1146024,\n", - " 1146025, 1138085, 1146140, 1146131, 1141235, 1139990, 1143293, 1151124,\n", - " 1150423, 1147543, 1148763, 1147282, 1142816, 1138669, 1149155, 1149162,\n", - " 1147458, 1142637, 1149366, 1149372, 1139417, 1143052, 1148408, 1148414,\n", - " 1142584, 1138923, 1157720, 1136836, 1141496, 1138226, 1139051, 1142159,\n", - " 1142158, 1143345, 1144765, 1144766, 1137089, 1137098, 1144093, 1139969,\n", - " 1139979, 1135876, 1150919, 1143957, 1143456, 1143457, 1143007, 1137703,\n", - " 1144291, 1140483, 1143937, 1135454, 1140824, 1140829, 1146590, 1147581,\n", - " 1147574, 1146626, 1147521, 1140361, 1140364, 1143080, 1143079, 1144219,\n", - " 1147999, 1139252, 1147244, 1148704, 1148466, 1153701, 1152328, 1147056,\n", - " 1149722, 1147025, 1147027, 1147257, 1147248, 1141131, 1147198, 1158226,\n", - " 1147880, 1145240, 1145750, 1145751, 1142369, 1142376, 1148387, 1146178,\n", - " 1151242, 1152530, 1152531, 1148941, 1154438, 1151856, 1149791, 1144514,\n", - " 1144526, 1146887, 1150350, 1144203, 1169727, 1147796, 1151487, 1151473,\n", - " 1152022, 1154263, 1146723, 1134869, 1140403, 1150127, 1147021, 1147023,\n", - " 1158949, 1141949, 1146772, 1148740, 1148744, 1153574, 1162284, 1147653,\n", - " 1143567, 1149412, 1148288, 1139096, 1154420, 1148180, 1139718, 1152435,\n", - " 1152441, 1148720, 1148725, 1148729, 1144110, 1146547, 1139936, 1148204,\n", - " 1153181, 1171943, 1153124, 1153192, 1153188, 1153197, 1145104, 1159828,\n", - " 1152974, 1152867, 1152877, 1152878, 1143091, 1150356, 1151816, 1135311,\n", - " 1135302, 1151906, 1151908, 1154182, 1145640, 1148498, 1141420, 1141408,\n", - " 1136002, 1136004, 1151351, 1151345, 1151358, 1147602, 1153449, 1145079,\n", - " 1146969, 1146975, 1151927, 1146623, 1142986, 1146488, 1152407, 1152409,\n", - " 1152415, 1152098, 1152100, 1156325, 1153030, 1153032, 1153038, 1150085,\n", - " 1137746, 1146304, 1152608, 1152622, 1140521, 1136401, 1149203, 1152819,\n", - " 1152826, 1155337, 1154123, 1155354, 1152673, 1151617, 1151623, 1150578,\n", - " 1145278, 1136134, 1136798, 1148916, 1148921, 1152944, 1152958, 1152903,\n", - " 1152341, 1156831, 1153310, 1153311, 1138283, 1138281, 1156001, 1156002,\n", - " 1136028, 1136031, 1158704, 1151195, 1152928, 1151064, 1156387, 1154728,\n", - " 1142777, 1156416, 1148040, 1149794, 1149804, 1137048, 1148628, 1158530,\n", - " 1158540, 1158529, 1148376, 1137458, 1153869, 1148255, 1154374, 1158854,\n", - " 1150872, 1137873, 1156505, 1157064, 1157071, 1157067, 1152833, 1145191,\n", - " 1139473, 1143502, 1150465, 1142221, 1135730, 1152183, 1151788, 1157913,\n", - " 1150828, 1156935, 1156942, 1156932, 1156939, 1153410, 1139525, 1158308,\n", - " 1151331, 1155441, 1140865, 1140866, 1154530, 1150484, 1156207, 1156271,\n", - " 1157642, 1151379, 1158639, 1155122, 1152527, 1157183, 1155755, 1151424,\n", - " 1145799, 1155667, 1155628, 1154555, 1161430, 1158824, 1158829, 1177952,\n", - " 1154036, 1148835, 1155646, 1161231, 1154649, 1154250, 1154240, 1151892,\n", - " 1137359, 1154902, 1154909, 1163132, 1143189, 1157430, 1150987, 1159622,\n", - " 1157928, 1157288, 1157663, 1157653, 1158123, 1156760, 1158996, 1153776,\n", - " 1153786, 1149904, 1137381, 1137385, 1137380, 1138262, 1158347, 1140920,\n", - " 1134677, 1135601, 1148149, 1150661, 1158502, 1158665, 1157685, 1149145,\n", - " 1152222, 1156693, 1140381, 1155971, 1155975, 1158841, 1156807, 1155393,\n", - " 1154600, 1159454, 1136897, 1136896, 1158891, 1157304, 1153632, 1155305,\n", - " 1152143, 1153808, 1136640, 1136646, 1166421, 1180565, 1157858, 1158558,\n", - " 1165497, 1138101, 1138110, 1155871, 1158006, 1144581, 1155528, 1135662,\n", - " 1142657, 1142663, 1142666, 1150684, 1157751, 1156032, 1159042, 1159052,\n", - " 1144270, 1159071, 1142426, 1142427, 1158303, 1160563, 1153052, 1167707,\n", - " 1156226, 1156235, 1156107, 1160651, 1150033, 1150046, 1149063, 1149070,\n", - " 1153514, 1153519, 1147300, 1157600, 1138161, 1138168, 1164006, 1149963,\n", - " 1154578, 1139592, 1166936, 1146353, 1164055, 1170415, 1140643, 1141862,\n", - " 1148600, 1148603, 1143139, 1156361, 1158653, 1156187, 1156181, 1159025,\n", - " 1159032, 1165604, 1168106, 1169116, 1152247, 1155590, 1164592, 1153934,\n", - " 1168420, 1168194, 1168515, 1167933, 1149011, 1146500, 1153247, 1144739,\n", - " 1144747, 1155046, 1141471, 1151650, 1147426, 1156739, 1160849, 1153663,\n", - " 1150649, 1163260, 1144812, 1168850, 1135567, 1165718, 1142722, 1142733,\n", - " 1156303, 1145227, 1169282, 1154695, 1166462, 1144972, 1144973, 1146444,\n", - " 1147355, 1152624, 1139351, 1145900, 1145902, 1153534, 1168659, 1151755,\n", - " 1171581, 1152203, 1181040, 1175240, 1143395, 1143402, 1143404, 1169742,\n", - " 1149555, 1158722, 1147338, 1169602, 1167817, 1166653, 1165018, 1164836,\n", - " 1156119, 1144336, 1157527, 1157534, 1138376, 1138369, 1154670, 1168433,\n", - " 1154882, 1169164, 1169162, 1157331, 1157333, 1138130, 1169359, 1154353,\n", - " 1154354, 1154352, 1172750, 1149452, 1149688, 1158623, 1149847, 1192054,\n", - " 1172882, 1152353, 1152359, 1152360, 1168400, 1169133, 1148667, 1148666,\n", - " 1148328, 1148331, 1177984, 1173307, 1154027, 1152150, 1159655, 1151210,\n", - " 1157153, 1147711, 1157593, 1149237, 1149247, 1166827, 1135021, 1170688,\n", - " 1173660, 1168345, 1144549, 1153429, 1166682, 1166684, 1150234, 1154148,\n", - " 1158187, 1178889, 1149179, 1149173, 1179811, 1176292, 1178610, 1186117,\n", - " 1143420, 1171297, 1170178, 1153803, 1153141, 1189183, 1151509, 1151519,\n", - " 1158030, 1178920, 1161255, 1182353, 1155262, 1176675, 1157795, 1171623,\n", - " 1164032, 1155804, 1157992, 1182011, 1178955, 1158252, 1153898, 1153899,\n", - " 1188798, 1180753, 1178214, 1178216, 1162403, 1145626, 1145618, 1172022,\n", - " 1178028, 1180383, 1161067, 1149753, 1149755, 1153605, 1165186, 1157772,\n", - " 1158512, 1155898, 1155899, 1181981, 1185431, 1182896, 1168273, 1162441,\n", - " 1185409, 1188835, 1164437, 1181548, 1163421, 1188525, 1164271, 1170806,\n", - " 1180019, 1147182, 1170034, 1178247, 1168943, 1181509, 1139831, 1154812,\n", - " 1164924, 1163848, 1149627, 1156055, 1178549, 1151972, 1173019, 1188295,\n", - " 1186695, 1172384, 1170713, 1177477, 1181939, 1189543, 1190246, 1179420,\n", - " 1162156, 1192809, 1178986, 1151774, 1178488, 1182169, 1162502, 1184859,\n", - " 1153597, 1171201, 1177845, 1156681, 1156672, 1194229, 1171957, 1158064,\n", - " 1181616, 1145398, 1167739, 1167741, 1190784, 1180528, 1177812, 1152080,\n", - " 1155956, 1162656, 1172903, 1173110, 1190211, 1187159, 1191771, 1182852,\n", - " 1191003, 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1141424, 1135926, 1138555, 1135716, 1135723, 1135726, 1140787,\n", - " 1141756, 1141758, 1138335, 1139462, 1136156, 1136969, 1141443, 1146803,\n", - " 1138897, 1138906, 1143600, 1146978, 1146983, 1145989, 1145992, 1137268,\n", - " 1143366, 1143372, 1146644, 1140781, 1148987, 1150506, 1150509, 1142964,\n", - " 1136959, 1149216, 1143820, 1149646, 1147473, 1147483, 1141882, 1142881,\n", - " 1153940, 1144636, 1149037, 1146992, 1146660, 1153217, 1153223, 1147101,\n", - " 1135144, 1150554, 1155014, 1139373, 1147211, 1136683, 1136685, 1150322,\n", - " 1152427, 1134710, 1146376, 1134806, 1140313, 1140540, 1138112, 1135179,\n", - " 1137171, 1149461, 1138366, 1153463, 1140158, 1135909, 1135910, 1140020,\n", - " 1140029, 1162460, 1135367, 1135202, 1135204, 1140767, 1134974, 1141036,\n", - " 1134794, 1143377, 1138504, 1137342, 1157088, 1137693, 1136619, 1144395,\n", - " 1136714, 1157398, 1157397, 1136662, 1137441, 1143321, 1137472, 1136928,\n", - " 1135265, 1139161, 1134841, 1141703, 1135579, 1135583, 1142596, 1141081,\n", - " 1136111, 1140240, 1140970, 1138514, 1153094, 1153101, 1153092, 1137957,\n", - " 1158136, 1137019, 1156899, 1139684, 1139687, 1139874, 1157702, 1138440,\n", - " 1138445, 1138461, 1158386, 1149328, 1138843, 1138847, 1156603, 1156606,\n", - " 1147112, 1147118, 1142611, 1160819, 1138190, 1158984, 1145843, 1145851,\n", - " 1148531, 1137423, 1135760, 1138067, 1138069, 1136089, 1134992, 1135002,\n", - " 1134771, 1152654, 1135776, 1139751, 1136730, 1140199, 1139318, 1141070,\n", - " 1153543, 1143631, 1139084, 1136068, 1139929, 1139934, 1137587, 1138648,\n", - " 1138148, 1146075, 1140551, 1152042, 1152044, 1140656, 1137734, 1137728,\n", - " 1146222, 1134738, 1134742, 1134750, 1135540, 1141088, 1141098, 1149001,\n", - " 1143767, 1154860, 1137299, 1143225, 1137674, 1139032, 1149979, 1152719,\n", - " 1135860, 1136426, 1139436, 1136637, 1141224, 1139386, 1159794, 1136917,\n", - " 1143673, 1143677, 1144230, 1140607, 1141155, 1141156, 1141161, 1141785,\n", - " 1139495, 1141609, 1144650, 1147844, 1147850, 1137074, 1144417, 1144428,\n", - " 1142050, 1143158, 1143153, 1146787, 1145161, 1143203, 1140175, 1158746,\n", - " 1158749, 1137764, 1137771, 1149105, 1148871, 1139190, 1137062, 1138708,\n", - " 1140102, 1142913, 1143107, 1143111, 1144596, 1142843, 1142840, 1136866,\n", - " 1136867, 1136864, 1140885, 1140442, 1144182, 1150906, 1158699, 1138529,\n", - " 1140501, 1137846, 1137841, 1147153, 1136378, 1141365, 1141367, 1151109,\n", - " 1149101, 1138292, 1138293, 1143919, 1139508, 1139510, 1139769, 1140093,\n", - " 1139127, 1145000, 1145200, 1140619, 1139171, 1143692, 1147050, 1145873,\n", - " 1143543, 1152976, 1135457, 1135459, 1142555, 1139447, 1139448, 1138995,\n", - " 1141925, 1141933, 1144241, 1144242, 1141853, 1137149, 1150243, 1137571,\n", - " 1134852, 1134861, 1141382, 1145976, 1145974, 1143851, 1142098, 1146024,\n", - " 1146025, 1138085, 1146140, 1146131, 1141235, 1139990, 1143293, 1151124,\n", - " 1150423, 1147543, 1148763, 1147282, 1142816, 1138669, 1149155, 1149162,\n", - " 1147458, 1142637, 1149366, 1149372, 1139417, 1143052, 1148408, 1148414,\n", - " 1142584, 1138923, 1157720, 1136836, 1141496, 1138226, 1139051, 1142159,\n", - " 1142158, 1143345, 1144765, 1144766, 1137089, 1137098, 1144093, 1139969,\n", - " 1139979, 1135876, 1150919, 1143957, 1143456, 1143457, 1143007, 1137703,\n", - " 1144291, 1140483, 1143937, 1135454, 1140824, 1140829, 1146590, 1147581,\n", - " 1147574, 1146626, 1147521, 1140361, 1140364, 1143080, 1143079, 1144219,\n", - " 1147999, 1139252, 1147244, 1148704, 1148466, 1153701, 1152328, 1147056,\n", - " 1149722, 1147025, 1147027, 1147257, 1147248, 1141131, 1147198, 1158226,\n", - " 1147880, 1145240, 1145750, 1145751, 1142369, 1142376, 1148387, 1146178,\n", - " 1151242, 1152530, 1152531, 1148941, 1154438, 1151856, 1149791, 1144514,\n", - " 1144526, 1146887, 1150350, 1144203, 1169727, 1147796, 1151487, 1151473,\n", - " 1152022, 1154263, 1146723, 1134869, 1140403, 1150127, 1147021, 1147023,\n", - " 1158949, 1141949, 1146772, 1148740, 1148744, 1153574, 1162284, 1147653,\n", - " 1143567, 1149412, 1148288, 1139096, 1154420, 1148180, 1139718, 1152435,\n", - " 1152441, 1148720, 1148725, 1148729, 1144110, 1146547, 1139936, 1148204,\n", - " 1153181, 1171943, 1153124, 1153192, 1153188, 1153197, 1145104, 1159828,\n", - " 1152974, 1152867, 1152877, 1152878, 1143091, 1150356, 1151816, 1135311,\n", - " 1135302, 1151906, 1151908, 1154182, 1145640, 1148498, 1141420, 1141408,\n", - " 1136002, 1136004, 1151351, 1151345, 1151358, 1147602, 1153449, 1145079,\n", - " 1146969, 1146975, 1151927, 1146623, 1142986, 1146488, 1152407, 1152409,\n", - " 1152415, 1152098, 1152100, 1156325, 1153030, 1153032, 1153038, 1150085,\n", - " 1137746, 1146304, 1152608, 1152622, 1140521, 1136401, 1149203, 1152819,\n", - " 1152826, 1155337, 1154123, 1155354, 1152673, 1151617, 1151623, 1150578,\n", - " 1145278, 1136134, 1136798, 1148916, 1148921, 1152944, 1152958, 1152903,\n", - " 1152341, 1156831, 1153310, 1153311, 1138283, 1138281, 1156001, 1156002,\n", - " 1136028, 1136031, 1158704, 1151195, 1152928, 1151064, 1156387, 1154728,\n", - " 1142777, 1156416, 1148040, 1149794, 1149804, 1137048, 1148628, 1158530,\n", - " 1158540, 1158529, 1148376, 1137458, 1153869, 1148255, 1154374, 1158854,\n", - " 1150872, 1137873, 1156505, 1157064, 1157071, 1157067, 1152833, 1145191,\n", - " 1139473, 1143502, 1150465, 1142221, 1135730, 1152183, 1151788, 1157913,\n", - " 1150828, 1156935, 1156942, 1156932, 1156939, 1153410, 1139525, 1158308,\n", - " 1151331, 1155441, 1140865, 1140866, 1154530, 1150484, 1156207, 1156271,\n", - " 1157642, 1151379, 1158639, 1155122, 1152527, 1157183, 1155755, 1151424,\n", - " 1145799, 1155667, 1155628, 1154555, 1161430, 1158824, 1158829, 1177952,\n", - " 1154036, 1148835, 1155646, 1161231, 1154649, 1154250, 1154240, 1151892,\n", - " 1137359, 1154902, 1154909, 1163132, 1143189, 1157430, 1150987, 1159622,\n", - " 1157928, 1157288, 1157663, 1157653, 1158123, 1156760, 1158996, 1153776,\n", - " 1153786, 1149904, 1137381, 1137385, 1137380, 1138262, 1158347, 1140920,\n", - " 1134677, 1135601, 1148149, 1150661, 1158502, 1158665, 1157685, 1149145,\n", - " 1152222, 1156693, 1140381, 1155971, 1155975, 1158841, 1156807, 1155393,\n", - " 1154600, 1159454, 1136897, 1136896, 1158891, 1157304, 1153632, 1155305,\n", - " 1152143, 1153808, 1136640, 1136646, 1166421, 1180565, 1157858, 1158558,\n", - " 1165497, 1138101, 1138110, 1155871, 1158006, 1144581, 1155528, 1135662,\n", - " 1142657, 1142663, 1142666, 1150684, 1157751, 1156032, 1159042, 1159052,\n", - " 1144270, 1159071, 1142426, 1142427, 1158303, 1160563, 1153052, 1167707,\n", - " 1156226, 1156235, 1156107, 1160651, 1150033, 1150046, 1149063, 1149070,\n", - " 1153514, 1153519, 1147300, 1157600, 1138161, 1138168, 1164006, 1149963,\n", - " 1154578, 1139592, 1166936, 1146353, 1164055, 1170415, 1140643, 1141862,\n", - " 1148600, 1148603, 1143139, 1156361, 1158653, 1156187, 1156181, 1159025,\n", - " 1159032, 1165604, 1168106, 1169116, 1152247, 1155590, 1164592, 1153934,\n", - " 1168420, 1168194, 1168515, 1167933, 1149011, 1146500, 1153247, 1144739,\n", - " 1144747, 1155046, 1141471, 1151650, 1147426, 1156739, 1160849, 1153663,\n", - " 1150649, 1163260, 1144812, 1168850, 1135567, 1165718, 1142722, 1142733,\n", - " 1156303, 1145227, 1169282, 1154695, 1166462, 1144972, 1144973, 1146444,\n", - " 1147355, 1152624, 1139351, 1145900, 1145902, 1153534, 1168659, 1151755,\n", - " 1171581, 1152203, 1181040, 1175240, 1143395, 1143402, 1143404, 1169742,\n", - " 1149555, 1158722, 1147338, 1169602, 1167817, 1166653, 1165018, 1164836,\n", - " 1156119, 1144336, 1157527, 1157534, 1138376, 1138369, 1154670, 1168433,\n", - " 1154882, 1169164, 1169162, 1157331, 1157333, 1138130, 1169359, 1154353,\n", - " 1154354, 1154352, 1172750, 1149452, 1149688, 1158623, 1149847, 1192054,\n", - " 1172882, 1152353, 1152359, 1152360, 1168400, 1169133, 1148667, 1148666,\n", - " 1148328, 1148331, 1177984, 1173307, 1154027, 1152150, 1159655, 1151210,\n", - " 1157153, 1147711, 1157593, 1149237, 1149247, 1166827, 1135021, 1170688,\n", - " 1173660, 1168345, 1144549, 1153429, 1166682, 1166684, 1150234, 1154148,\n", - " 1158187, 1178889, 1149179, 1149173, 1179811, 1176292, 1178610, 1186117,\n", - " 1143420, 1171297, 1170178, 1153803, 1153141, 1189183, 1151509, 1151519,\n", - " 1158030, 1178920, 1161255, 1182353, 1155262, 1176675, 1157795, 1171623,\n", - " 1164032, 1155804, 1157992, 1182011, 1178955, 1158252, 1153898, 1153899,\n", - " 1188798, 1180753, 1178214, 1178216, 1162403, 1145626, 1145618, 1172022,\n", - " 1178028, 1180383, 1161067, 1149753, 1149755, 1153605, 1165186, 1157772,\n", - " 1158512, 1155898, 1155899, 1181981, 1185431, 1182896, 1168273, 1162441,\n", - " 1185409, 1188835, 1164437, 1181548, 1163421, 1188525, 1164271, 1170806,\n", - " 1180019, 1147182, 1170034, 1178247, 1168943, 1181509, 1139831, 1154812,\n", - " 1164924, 1163848, 1149627, 1156055, 1178549, 1151972, 1173019, 1188295,\n", - " 1186695, 1172384, 1170713, 1177477, 1181939, 1189543, 1190246, 1179420,\n", - " 1162156, 1192809, 1178986, 1151774, 1178488, 1182169, 1162502, 1184859,\n", - " 1153597, 1171201, 1177845, 1156681, 1156672, 1194229, 1171957, 1158064,\n", - " 1181616, 1145398, 1167739, 1167741, 1190784, 1180528, 1177812, 1152080,\n", - " 1155956, 1162656, 1172903, 1173110, 1190211, 1187159, 1191771, 1182852,\n", - " 1191003, 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199424, 1196800, 1195860, 1199282, 1202255, 1198844, 1201577, 1201582,\n", - " 1194626, 1200643, 1198633, 1198702, 1202803, 1202804, 1198558, 1197512,\n", - " 1194866, 1194743, 1195726, 1194782, 1195263, 1199135, 1201992, 1195187,\n", - " 1197697, 1198317, 1195888, 1199171, 1196359, 1194754, 1195313, 1196835,\n", - " 1196171, 1195579, 1195148, 1195265, 1195270, 1195278, 1196242, 1195245,\n", - " 1197265, 1196109, 1194859, 1195841, 1198925, 1195541, 1202916, 1197478,\n", - " 1197253, 1202017, 1199697, 1200949, 1196043, 1199059, 1199185, 1194928,\n", - " 1197583, 1199616, 1199628, 1201636, 1202381, 1200878, 1198404, 1194786,\n", - " 1194795, 1201511, 1197689, 1197976, 1201116, 1196727, 1196734, 1195771,\n", - " 1198428, 1199421, 1202417, 1197214, 1202630, 1201056, 1200913, 1194805,\n", - " 1199546, 1202640, 1199712, 1201043, 1201737, 1200429, 1202061, 1199887,\n", - " 1201752, 1199917, 1201442, 1202239, 1202175, 1200327, 1201291, 1195607,\n", - " 1203329, 1202209, 1199929, 1196966, 1200790, 1199606, 1202555, 1195438,\n", - " 1196827, 1195669, 1195664, 1200445, 1195415, 1195420, 1197066, 1197811,\n", - " 1197816, 1197822, 1199778, 1196602, 1198147, 1197735, 1199786, 1199787,\n", - " 1198819, 1200296, 1200301, 1203296, 1202075, 1196428], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199424, 1196800, 1195860, 1199282, 1202255, 1198844, 1201577, 1201582,\n", - " 1194626, 1200643, 1198633, 1198702, 1202803, 1202804, 1198558, 1197512,\n", - " 1194866, 1194743, 1195726, 1194782, 1195263, 1199135, 1201992, 1195187,\n", - " 1197697, 1198317, 1195888, 1199171, 1196359, 1194754, 1195313, 1196835,\n", - " 1196171, 1195579, 1195148, 1195265, 1195270, 1195278, 1196242, 1195245,\n", - " 1197265, 1196109, 1194859, 1195841, 1198925, 1195541, 1202916, 1197478,\n", - " 1197253, 1202017, 1199697, 1200949, 1196043, 1199059, 1199185, 1194928,\n", - " 1197583, 1199616, 1199628, 1201636, 1202381, 1200878, 1198404, 1194786,\n", - " 1194795, 1201511, 1197689, 1197976, 1201116, 1196727, 1196734, 1195771,\n", - " 1198428, 1199421, 1202417, 1197214, 1202630, 1201056, 1200913, 1194805,\n", - " 1199546, 1202640, 1199712, 1201043, 1201737, 1200429, 1202061, 1199887,\n", - " 1201752, 1199917, 1201442, 1202239, 1202175, 1200327, 1201291, 1195607,\n", - " 1203329, 1202209, 1199929, 1196966, 1200790, 1199606, 1202555, 1195438,\n", - " 1196827, 1195669, 1195664, 1200445, 1195415, 1195420, 1197066, 1197811,\n", - " 1197816, 1197822, 1199778, 1196602, 1198147, 1197735, 1199786, 1199787,\n", - " 1198819, 1200296, 1200301, 1203296, 1202075, 1196428], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 3.7368e-02, -2.7283e-04, 2.7082e-01, ..., 1.5655e-02,\n", - " -2.4213e-04, -2.5679e-03],\n", - " [ 3.7386e-02, 7.5596e-03, 2.5725e-01, ..., 7.4647e-03,\n", - " -2.7715e-04, -2.6410e-03],\n", - " [ 4.2516e-02, -5.0800e-04, 3.3846e-01, ..., -3.3395e-04,\n", - " -1.0794e-04, -3.0180e-03],\n", - " ...,\n", - " [ 7.4718e-03, -2.6454e-04, 2.6259e-01, ..., 2.0169e-02,\n", - " -4.3370e-04, -2.6364e-03],\n", - " [-8.8673e-05, -2.4266e-04, 2.9993e-01, ..., 2.4016e-02,\n", - " -4.7760e-04, -2.6777e-03],\n", - " [ 5.9636e-02, -8.1591e-04, 3.5503e-01, ..., -3.4962e-04,\n", - " -1.0035e-04, -3.0148e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 2.2939, -0.0325, 2.3872, ..., -0.0081, -0.0140, 2.5310],\n", - " [ 2.3693, -0.0329, 2.3674, ..., -0.0087, -0.0165, 3.0524],\n", - " [ 2.6877, -0.0366, 2.2917, ..., -0.0136, -0.0147, 2.4354],\n", - " ...,\n", - " [ 3.7538, -0.0580, 2.3283, ..., -0.0217, -0.0177, 2.8106],\n", - " [ 3.8193, -0.0591, 2.1015, ..., -0.0226, -0.0180, 3.0109],\n", - " [ 2.4536, -0.0365, 2.6297, ..., -0.0083, -0.0158, 3.0543]],\n", - " device='cuda:0', grad_fn=), 'author': tensor([[ 4.8492e-01, -3.6416e-03, -1.6069e-04, ..., -4.0048e-03,\n", - " -1.3780e-03, 1.2308e-01],\n", - " [ 5.0694e-01, -3.2107e-03, 4.9390e-02, ..., -1.7806e-03,\n", - " -9.3658e-04, 4.0759e-02],\n", - " [ 5.8357e-01, -5.7206e-03, -4.0363e-04, ..., -3.8954e-03,\n", - " 2.9662e-02, 2.0942e-01],\n", - " ...,\n", - " [ 3.7886e-01, -2.5798e-03, 1.0261e-02, ..., -1.1527e-03,\n", - " -1.8896e-03, -1.6135e-04],\n", - " [ 5.0185e-01, -5.2734e-03, -4.8641e-04, ..., -2.1968e-03,\n", - " 5.3001e-02, 1.9897e-01],\n", - " [ 5.5978e-01, -5.5210e-03, -2.2569e-04, ..., -2.6323e-03,\n", - " 4.4696e-02, 1.7861e-01]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-0.0128, 0.2423, -0.0047, ..., 1.3087, -0.0023, -0.0055],\n", - " [-0.0094, 0.1611, -0.0037, ..., 1.1233, -0.0019, -0.0062],\n", - " [-0.0101, 0.1927, -0.0036, ..., 1.1267, -0.0024, -0.0053],\n", - " ...,\n", - " [-0.0105, 0.1859, -0.0037, ..., 1.1942, -0.0022, -0.0061],\n", - " [-0.0129, 0.2740, -0.0047, ..., 1.5578, -0.0042, -0.0091],\n", - " [-0.0124, 0.2577, -0.0052, ..., 1.5666, -0.0039, -0.0090]],\n", - " device='cuda:0', grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 85, 527, 501, 490, 483, 305, 375, 683, 473, 473, 1010, 668,\n", - " 461, 750, 778, 1104, 1104, 1104, 1104, 958, 958, 958, 800, 1351,\n", - " 994, 1201, 1206, 1117, 1117, 874, 1005, 984, 846, 1067, 917, 1138,\n", - " 1166, 1228, 1228, 1281, 1584, 1584, 1417, 1585, 1166, 1166, 1166, 1166,\n", - " 1166, 1428, 1369, 1281, 1281, 1415, 1415, 1635, 1714, 1620, 1620, 1620,\n", - " 1535, 1535, 1535, 1718, 1817, 1817, 1793, 1793, 1877, 1764, 1901, 1826,\n", - " 1826, 1826, 1991, 1989, 1989, 1989, 1989, 1989, 1888, 2062, 1984, 1995,\n", - " 2158, 2158, 2239, 2172, 2428, 2428, 2428, 2428, 2436, 2202, 2579, 2726,\n", - " 2726, 2393, 2393, 2445, 2751, 2751, 2751, 2751, 2751, 2751, 2710, 2808,\n", - " 2808, 2808, 2927, 3132, 3018, 2930, 2992, 2992, 3274, 2926, 2926, 3226,\n", - " 3291, 3147, 3057, 3284, 3326, 3147, 3147, 3274, 3684, 4163, 4019, 4019,\n", - " 4154, 4154, 4131, 4250, 4204, 4243, 4241, 4264, 4355, 4355, 4355, 4505,\n", - " 4388, 4388, 4388, 4537, 4697, 4592, 4592, 4574, 4553, 4553, 4553, 4755,\n", - " 4721, 5134, 5134, 4891, 4891, 5325, 5348, 5566, 5569, 5388, 5856, 5890,\n", - " 5803, 5663, 5782, 6155, 5753, 6190, 6275, 6277, 6154, 6284, 6284, 6284,\n", - " 6313, 6264],\n", - " [ 33, 25, 78, 18, 3, 69, 36, 113, 13, 38, 35, 112,\n", - " 66, 77, 7, 48, 34, 10, 85, 86, 102, 111, 76, 60,\n", - " 3, 84, 66, 6, 69, 81, 7, 59, 55, 100, 46, 7,\n", - " 34, 122, 29, 2, 32, 89, 23, 3, 80, 68, 112, 54,\n", - " 117, 52, 25, 26, 120, 88, 61, 45, 57, 75, 20, 0,\n", - " 3, 93, 37, 33, 28, 90, 1, 46, 51, 21, 103, 53,\n", - " 95, 119, 99, 30, 106, 104, 18, 15, 108, 65, 43, 122,\n", - " 67, 73, 81, 116, 32, 5, 62, 3, 37, 114, 110, 81,\n", - " 92, 14, 91, 64, 121, 70, 69, 125, 24, 31, 110, 71,\n", - " 41, 69, 105, 72, 79, 72, 8, 49, 120, 105, 123, 63,\n", - " 107, 124, 109, 110, 37, 9, 44, 17, 58, 82, 21, 3,\n", - " 7, 19, 47, 66, 66, 37, 16, 87, 115, 98, 54, 94,\n", - " 72, 74, 97, 116, 69, 16, 118, 116, 56, 116, 12, 101,\n", - " 40, 32, 89, 32, 89, 58, 22, 27, 69, 96, 36, 71,\n", - " 69, 83, 0, 14, 41, 0, 2, 39, 4, 42, 50, 69,\n", - " 11, 81]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 713, 1872, 4107, ..., 638, 6532, 2068],\n", - " [ 181, 136, 122, ..., 7357, 7493, 7411]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 25, 7, 25, 7, 77, 75, 89, 66, 19, 77, 38, 13,\n", - " 13, 36, 29, 25, 38, 25, 13, 87, 113, 122, 7, 77,\n", - " 32, 29, 25, 122, 75, 113, 19, 29, 38, 32, 89, 25,\n", - " 89, 29, 122, 14, 19, 29, 77, 7, 122, 75, 29, 66,\n", - " 25, 19, 77, 19, 99, 113, 25, 87, 32, 99, 32, 13,\n", - " 99, 122, 77, 29, 29, 19, 32, 19, 122, 113, 29, 113,\n", - " 19, 89, 13, 19, 7, 69, 25, 19, 14, 32, 77, 38,\n", - " 77, 99, 25, 66, 87, 25, 19, 99, 75, 14, 32, 75,\n", - " 122, 29, 38, 7, 87, 113, 122, 89, 89, 99, 13, 32,\n", - " 99, 25, 122, 77, 32, 36, 32, 113, 75, 75, 32, 25,\n", - " 77, 87, 113, 32, 89, 89, 113, 13, 29, 89, 36, 36,\n", - " 122, 38, 113, 87, 14, 122, 122, 122, 99, 29, 87, 75,\n", - " 89, 99, 99, 75, 89, 19, 75, 36, 25, 19, 14, 87,\n", - " 99, 66, 66, 122, 19, 87, 29, 89, 19, 19, 32, 25,\n", - " 7, 122, 32, 32, 66, 25, 29, 99, 69, 87, 32, 29,\n", - " 38, 66, 38, 14, 19, 13, 89, 99, 7, 25, 14, 36,\n", - " 75, 29, 66, 66, 36, 99, 14, 13, 13, 19, 13, 13,\n", - " 89, 75, 66, 32, 77, 99, 69, 14, 122, 99, 89, 7,\n", - " 66, 7, 38, 36, 87, 66, 122, 14, 122, 14, 89, 38,\n", - " 7, 14, 38, 113, 89, 14, 29, 19, 25, 69, 113, 32,\n", - " 29, 75, 77, 29, 13, 19, 66, 7, 113, 99, 36, 32,\n", - " 75, 75, 99, 38, 75, 66, 89, 122, 13, 75, 87, 14,\n", - " 75, 89, 29, 66, 122, 87, 19, 66, 66, 99, 25, 13,\n", - " 25, 14, 77, 66, 66, 13, 14, 99, 87, 113, 36, 29,\n", - " 66, 87, 36, 77, 87, 122, 19, 25, 87, 7, 66, 69,\n", - " 66, 113, 36, 13, 77, 87, 77, 99, 122, 99, 13, 113,\n", - " 77, 77, 13, 122, 32, 36, 38, 66, 14, 66, 36, 7,\n", - " 69, 25, 7, 87, 29, 113, 13, 113, 13, 113, 38, 19,\n", - " 25, 14, 13, 69, 25, 36, 89, 69, 77, 99, 89, 32,\n", - " 7, 36, 29, 36, 77, 89, 36, 14, 89, 69, 77, 14,\n", - " 75, 122, 75, 38, 77, 29, 13, 36, 87, 69, 19, 14,\n", - " 75, 13, 36, 69, 87, 99, 87, 113, 19, 38, 32, 25,\n", - " 7, 113, 69, 113, 36, 87, 69, 14, 13, 7, 7, 69,\n", - " 77, 75, 66, 7, 36, 87, 69, 69, 36, 69, 77, 75,\n", - " 77, 36, 14, 69, 113, 38, 7, 69, 113, 14, 7, 69,\n", - " 32, 69, 14, 75, 89, 69, 99, 113, 38, 75, 69, 32,\n", - " 7, 7, 7, 69, 38, 87, 29, 38, 122, 38, 89, 38,\n", - " 32, 36, 69, 38, 38, 38],\n", - " [ 102, 55, 12, 101, 27, 152, 137, 54, 4, 11, 79, 78,\n", - " 72, 47, 8, 122, 66, 114, 184, 328, 62, 186, 121, 411,\n", - " 358, 247, 218, 514, 248, 424, 234, 506, 163, 661, 370, 416,\n", - " 525, 793, 738, 277, 484, 295, 618, 569, 780, 851, 649, 391,\n", - " 720, 274, 1011, 875, 380, 1003, 731, 701, 695, 556, 755, 743,\n", - " 1029, 745, 995, 647, 551, 920, 1018, 1170, 1325, 954, 1048, 1134,\n", - " 1025, 1353, 1163, 1332, 1227, 1373, 1155, 1434, 1409, 1151, 1471, 1255,\n", - " 1182, 1120, 1267, 1368, 1588, 1560, 1460, 1511, 1340, 1445, 1571, 1606,\n", - " 1661, 1443, 1538, 1527, 1759, 1413, 1736, 1556, 1610, 1651, 1740, 1570,\n", - " 1638, 1837, 1665, 1958, 1881, 1806, 1811, 1829, 1772, 1830, 1865, 2166,\n", - " 1957, 1910, 2026, 2234, 2063, 2111, 2192, 2130, 2021, 2180, 2118, 2240,\n", - " 2152, 2352, 2212, 2211, 2232, 2306, 2403, 2135, 2187, 2256, 2194, 2292,\n", - " 2419, 2300, 2357, 2185, 2327, 2448, 2494, 2314, 2542, 2389, 2563, 2439,\n", - " 2566, 2492, 2541, 2396, 2529, 2605, 2590, 2670, 2607, 2497, 2493, 2596,\n", - " 2531, 2652, 2669, 2614, 2752, 2719, 2615, 2762, 2802, 2904, 2791, 2790,\n", - " 2716, 2863, 2781, 2795, 2899, 2910, 2917, 2770, 2793, 3082, 2833, 3261,\n", - " 3010, 3254, 3255, 2990, 3070, 3017, 3196, 3052, 3184, 3047, 3232, 3106,\n", - " 3303, 3119, 3220, 3213, 3192, 3253, 3117, 3304, 3313, 3219, 3210, 3221,\n", - " 3107, 3339, 3332, 3346, 3289, 3457, 3426, 3351, 3367, 3349, 3360, 3417,\n", - " 3570, 3497, 3357, 3507, 3546, 3494, 3629, 3512, 3683, 3551, 3587, 3600,\n", - " 3636, 3621, 3761, 3714, 3690, 3807, 3682, 3637, 3657, 3590, 3711, 3796,\n", - " 3973, 3946, 4054, 4139, 4012, 3945, 4188, 4103, 3732, 3921, 4124, 3827,\n", - " 4044, 4130, 4015, 4146, 3866, 4165, 4119, 4010, 4201, 4228, 4192, 4196,\n", - " 4144, 4109, 4223, 4218, 4217, 4215, 4222, 4291, 4248, 4287, 4293, 4247,\n", - " 4259, 4224, 4319, 4300, 4320, 4315, 4398, 4301, 4330, 4470, 4333, 4390,\n", - " 4357, 4433, 4474, 4325, 4464, 4417, 4329, 4522, 4453, 4492, 4547, 4407,\n", - " 4494, 4525, 4545, 4506, 4483, 4410, 4606, 4737, 4611, 4658, 4549, 4578,\n", - " 4616, 4620, 4701, 4596, 4768, 4780, 4827, 4802, 4761, 4791, 4922, 4903,\n", - " 4868, 4769, 4893, 5076, 4709, 4814, 4790, 4803, 4865, 4938, 4886, 5019,\n", - " 4923, 5035, 4874, 5013, 4773, 4898, 4963, 5021, 4891, 4999, 5177, 5161,\n", - " 4984, 5008, 4992, 5077, 5100, 5145, 5070, 5016, 4890, 5117, 5230, 5081,\n", - " 5172, 5067, 5123, 5101, 5351, 5274, 5295, 5372, 5191, 5287, 5383, 5313,\n", - " 5400, 5411, 5300, 5393, 5495, 5637, 6068, 5479, 5446, 5734, 5682, 5760,\n", - " 5905, 5699, 5933, 5527, 5665, 5547, 5679, 5748, 5900, 5858, 5804, 5795,\n", - " 5859, 5775, 6103, 5908, 5932, 5746, 5824, 5929, 5894, 6094, 5927, 5949,\n", - " 5828, 6065, 5695, 5785, 5627, 6220, 5832, 5681, 6001, 6083, 5965, 6318,\n", - " 6340, 6303, 6162, 6062, 5937, 6071, 6166, 6038, 6325, 6201, 6129, 6146,\n", - " 6052, 6133, 6236, 6104, 6262, 6326]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 231, 231, 231, ..., 7372, 7372, 7372],\n", - " [ 472, 119, 262, ..., 662, 152, 853]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 384, 355, 300, ..., 520, 829, 485],\n", - " [ 19, 108, 7, ..., 7460, 7441, 7265]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1820, 5675, 906, ..., 6532, 5392, 4984],\n", - " [ 39, 46, 49, ..., 6282, 6251, 6298]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 231, 231, 231, ..., 7444, 7444, 7447],\n", - " [4239, 785, 4432, ..., 126, 1028, 1926]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 58, 58, 74, ..., 6313, 6313, 6313],\n", - " [ 137, 507, 1261, ..., 4337, 3904, 3736]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.004762\n", - "sampling 0.004605\n", - "noi time: 0.002223\n", - "get_vertex_data call: 0.018829\n", - "noi group time: 0.00187\n", - "eoi_group_time: 0.014959\n", - "second half: 0.190485\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 40259, 21459, 21471, ..., 1119195, 1118701, 1120077],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 40259, 21459, 21471, ..., 1119195, 1118701, 1120077],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227488, 1210831, 1210552, ..., 1937996, 1937992, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227488, 1210831, 1210552, ..., 1937996, 1937992, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1141424, 1136237, 1140285, 1135926, 1135935, 1135726, 1137791,\n", - " 1140785, 1140799, 1141758, 1137506, 1136223, 1142813, 1139462, 1136969,\n", - " 1136971, 1141443, 1138907, 1139811, 1146641, 1140781, 1150509, 1145288,\n", - " 1145281, 1142965, 1134940, 1149228, 1142958, 1155689, 1155692, 1147473,\n", - " 1147483, 1141882, 1135989, 1153940, 1144636, 1134697, 1135941, 1135950,\n", - " 1150193, 1152666, 1152664, 1148558, 1148546, 1147094, 1147202, 1147211,\n", - " 1138742, 1134667, 1134669, 1140537, 1140540, 1138112, 1137254, 1140159,\n", - " 1135202, 1154739, 1134794, 1136517, 1136521, 1138504, 1137329, 1137693,\n", - " 1135408, 1157397, 1136662, 1137441, 1137449, 1137472, 1137025, 1136193,\n", - " 1135265, 1135278, 1156146, 1156159, 1139165, 1139161, 1135579, 1135828,\n", - " 1135664, 1135675, 1140970, 1138525, 1137957, 1154132, 1135522, 1139685,\n", - " 1137287, 1138440, 1138445, 1138461, 1138449, 1137493, 1135123, 1158390,\n", - " 1149328, 1135088, 1135098, 1156606, 1147112, 1142611, 1158984, 1148531,\n", - " 1135762, 1139667, 1138067, 1138079, 1138069, 1134992, 1142439, 1136546,\n", - " 1152651, 1135782, 1159009, 1159017, 1159019, 1140849, 1143631, 1152696,\n", - " 1138148, 1141963, 1141966, 1152042, 1152044, 1139069, 1142302, 1137728,\n", - " 1137731, 1140906, 1138240, 1140228, 1141098, 1141099, 1162958, 1144129,\n", - " 1149001, 1139898, 1141979, 1141980, 1136397, 1143767, 1162705, 1139025,\n", - " 1139033, 1140009, 1146834, 1146844, 1146832, 1135862, 1136625, 1136632,\n", - " 1140470, 1142932, 1141224, 1136917, 1143673, 1143677, 1137188, 1141785,\n", - " 1141786, 1139495, 1144934, 1141609, 1141300, 1134979, 1147844, 1147850,\n", - " 1139798, 1141821, 1141816, 1145154, 1145161, 1140173, 1158749, 1138478,\n", - " 1137766, 1140110, 1137661, 1148441, 1144434, 1144596, 1148263, 1144042,\n", - " 1140885, 1140892, 1144182, 1144184, 1137607, 1150906, 1150910, 1134827,\n", - " 1158690, 1138539, 1137846, 1137854, 1161710, 1147153, 1136371, 1142646,\n", - " 1149197, 1141365, 1141367, 1153068, 1153069, 1141664, 1149088, 1153556,\n", - " 1139508, 1139510, 1139773, 1140093, 1144998, 1145000, 1145001, 1145211,\n", - " 1143779, 1139171, 1140976, 1140990, 1146695, 1135049, 1143692, 1147050,\n", - " 1147047, 1145873, 1135457, 1135460, 1141925, 1146898, 1144242, 1141853,\n", - " 1136891, 1139405, 1145971, 1143845, 1143851, 1163662, 1136277, 1146024,\n", - " 1146025, 1150605, 1141646, 1149930, 1149933, 1141235, 1139990, 1143283,\n", - " 1147540, 1147282, 1142816, 1136330, 1149162, 1140349, 1143663, 1142637,\n", - " 1149366, 1143051, 1138927, 1157720, 1136836, 1148235, 1165626, 1139328,\n", - " 1141496, 1143345, 1144766, 1144619, 1144615, 1145813, 1140836, 1137098,\n", - " 1135876, 1144319, 1135818, 1135813, 1150300, 1144376, 1146514, 1146523,\n", - " 1143456, 1137697, 1137703, 1143937, 1135451, 1146580, 1146591, 1147521,\n", - " 1140360, 1140364, 1137990, 1143082, 1148966, 1144730, 1144219, 1147999,\n", - " 1146949, 1134907, 1147233, 1147244, 1148704, 1146742, 1153703, 1152328,\n", - " 1147056, 1147024, 1142858, 1147971, 1145011, 1145013, 1139549, 1147196,\n", - " 1158226, 1143921, 1147880, 1147881, 1154526, 1151646, 1145240, 1145246,\n", - " 1142378, 1142369, 1146144, 1146145, 1146188, 1151242, 1148215, 1148223,\n", - " 1152538, 1151179, 1150442, 1150445, 1149258, 1149251, 1154437, 1149791,\n", - " 1144514, 1144526, 1138035, 1151994, 1151480, 1152022, 1152027, 1144881,\n", - " 1154271, 1154263, 1145255, 1139914, 1146723, 1148693, 1150127, 1158950,\n", - " 1158959, 1141949, 1150837, 1153572, 1154976, 1147653, 1143560, 1149409,\n", - " 1149412, 1148300, 1135086, 1148622, 1147866, 1151417, 1154426, 1154420,\n", - " 1148180, 1152561, 1146672, 1146676, 1146679, 1146686, 1138867, 1138404,\n", - " 1157968, 1157983, 1148724, 1148729, 1171342, 1148204, 1171939, 1171943,\n", - " 1154168, 1153124, 1145104, 1150929, 1150932, 1152879, 1173078, 1144863,\n", - " 1144849, 1150356, 1155088, 1148084, 1141017, 1147446, 1147442, 1151811,\n", - " 1151816, 1135303, 1151906, 1148498, 1156886, 1156894, 1146562, 1141420,\n", - " 1141419, 1151351, 1151352, 1151345, 1151350, 1153449, 1146969, 1146967,\n", - " 1149359, 1167293, 1146623, 1146608, 1135688, 1152098, 1146280, 1153032,\n", - " 1153038, 1150091, 1137746, 1159983, 1152622, 1152623, 1140521, 1155146,\n", - " 1155140, 1136410, 1136414, 1157107, 1152826, 1154119, 1154123, 1157826,\n", - " 1152673, 1154633, 1139573, 1151582, 1151573, 1151627, 1151617, 1151622,\n", - " 1150578, 1150586, 1136131, 1136788, 1148914, 1145931, 1138989, 1138991,\n", - " 1151311, 1152341, 1146816, 1156826, 1156816, 1153296, 1153311, 1138283,\n", - " 1138281, 1152301, 1152294, 1136028, 1156608, 1151187, 1142777, 1166850,\n", - " 1150150, 1149273, 1148033, 1148040, 1149307, 1149300, 1155223, 1145656,\n", - " 1144659, 1149655, 1148628, 1158530, 1137458, 1148254, 1142047, 1158857,\n", - " 1148892, 1156505, 1151260, 1150465, 1135730, 1135740, 1152179, 1156638,\n", - " 1151788, 1165703, 1152737, 1150824, 1156935, 1158308, 1158311, 1151273,\n", - " 1155441, 1155508, 1153359, 1150129, 1154530, 1154528, 1145771, 1156919,\n", - " 1142755, 1142758, 1156207, 1151379, 1155122, 1152527, 1157183, 1153480,\n", - " 1155755, 1135396, 1135398, 1146913, 1155626, 1155628, 1158494, 1154555,\n", - " 1155576, 1158566, 1158824, 1158825, 1158325, 1157000, 1148836, 1148834,\n", - " 1155646, 1153368, 1158365, 1143263, 1154652, 1146935, 1151898, 1152310,\n", - " 1151327, 1154902, 1154909, 1163127, 1179427, 1153318, 1153322, 1157439,\n", - " 1155606, 1155613, 1150982, 1150990, 1157933, 1140749, 1137154, 1137161,\n", - " 1137152, 1159116, 1134674, 1135601, 1148153, 1148159, 1150661, 1158665,\n", - " 1157684, 1140632, 1152220, 1159213, 1159132, 1157026, 1144843, 1155975,\n", - " 1158846, 1156802, 1156812, 1149696, 1154600, 1136899, 1136896, 1158760,\n", - " 1158882, 1156778, 1151602, 1151615, 1136480, 1136494, 1136491, 1154393,\n", - " 1156665, 1155309, 1157249, 1153808, 1136640, 1147782, 1157821, 1158558,\n", - " 1156516, 1163814, 1162016, 1164524, 1138110, 1161539, 1165840, 1163456,\n", - " 1142666, 1157751, 1167359, 1159042, 1159070, 1165928, 1167592, 1142427,\n", - " 1158295, 1158303, 1157944, 1157946, 1164491, 1153052, 1153045, 1144150,\n", - " 1153842, 1156098, 1138393, 1150046, 1149063, 1155479, 1155480, 1154294,\n", - " 1153519, 1158680, 1158685, 1146876, 1157600, 1138161, 1167206, 1156787,\n", - " 1165662, 1168327, 1149963, 1184337, 1154590, 1139592, 1139286, 1170415,\n", - " 1140650, 1140643, 1148600, 1151875, 1154275, 1156355, 1158643, 1156181,\n", - " 1159025, 1159029, 1159032, 1168107, 1169108, 1152247, 1158905, 1144327,\n", - " 1144320, 1165996, 1151220, 1138674, 1168428, 1148567, 1147836, 1146510,\n", - " 1164580, 1144747, 1152776, 1163522, 1145139, 1155272, 1147426, 1147427,\n", - " 1156739, 1160856, 1153663, 1150648, 1150319, 1144812, 1153267, 1168855,\n", - " 1156300, 1161757, 1166922, 1163935, 1169282, 1155324, 1166462, 1138950,\n", - " 1147694, 1145447, 1165746, 1155905, 1148124, 1147723, 1145889, 1145900,\n", - " 1145902, 1181049, 1169742, 1158722, 1144690, 1150783, 1169602, 1166653,\n", - " 1155170, 1156119, 1161779, 1144336, 1157534, 1157528, 1138376, 1154660,\n", - " 1154670, 1154893, 1169162, 1157331, 1141043, 1169359, 1154364, 1154366,\n", - " 1149444, 1146337, 1171522, 1158611, 1158062, 1173047, 1172763, 1149846,\n", - " 1149847, 1157379, 1169941, 1167388, 1170463, 1152353, 1165528, 1168462,\n", - " 1168407, 1155930, 1155931, 1161130, 1168049, 1149402, 1148667, 1148323,\n", - " 1147504, 1173307, 1169144, 1154029, 1152150, 1152152, 1172791, 1159655,\n", - " 1157158, 1157153, 1157373, 1147697, 1147711, 1148128, 1148131, 1148141,\n", - " 1147934, 1157592, 1170490, 1177051, 1168808, 1146755, 1160150, 1174845,\n", - " 1159100, 1172061, 1166679, 1166682, 1171823, 1150234, 1161587, 1161595,\n", - " 1154148, 1179965, 1149169, 1143279, 1143420, 1171300, 1153803, 1178475,\n", - " 1181746, 1161255, 1171623, 1178359, 1157126, 1187534, 1181922, 1178706,\n", - " 1145597, 1191755, 1178218, 1183463, 1145626, 1181279, 1149755, 1180729,\n", - " 1180732, 1152287, 1181143, 1183342, 1158935, 1158940, 1158379, 1155890,\n", - " 1184317, 1166989, 1182330, 1167771, 1167765, 1168533, 1168886, 1165474,\n", - " 1180521, 1179090, 1165149, 1163422, 1166520, 1161819, 1170341, 1189290,\n", - " 1170420, 1139828, 1139831, 1139837, 1150265, 1170433, 1154812, 1182022,\n", - " 1164677, 1191674, 1156055, 1151972, 1151978, 1191984, 1149544, 1159083,\n", - " 1156836, 1187982, 1140993, 1188778, 1193895, 1181422, 1181423, 1167840,\n", - " 1151774, 1153743, 1194172, 1152115, 1169699, 1177617, 1175356, 1150412,\n", - " 1172976, 1158064, 1158077, 1158071, 1181616, 1183949, 1182560, 1180531,\n", - " 1170168, 1184440, 1176817, 1155959, 1155962, 1192792, 1189956, 1188330,\n", - " 1192368, 1192554], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1141424, 1136237, 1140285, 1135926, 1135935, 1135726, 1137791,\n", - " 1140785, 1140799, 1141758, 1137506, 1136223, 1142813, 1139462, 1136969,\n", - " 1136971, 1141443, 1138907, 1139811, 1146641, 1140781, 1150509, 1145288,\n", - " 1145281, 1142965, 1134940, 1149228, 1142958, 1155689, 1155692, 1147473,\n", - " 1147483, 1141882, 1135989, 1153940, 1144636, 1134697, 1135941, 1135950,\n", - " 1150193, 1152666, 1152664, 1148558, 1148546, 1147094, 1147202, 1147211,\n", - " 1138742, 1134667, 1134669, 1140537, 1140540, 1138112, 1137254, 1140159,\n", - " 1135202, 1154739, 1134794, 1136517, 1136521, 1138504, 1137329, 1137693,\n", - " 1135408, 1157397, 1136662, 1137441, 1137449, 1137472, 1137025, 1136193,\n", - " 1135265, 1135278, 1156146, 1156159, 1139165, 1139161, 1135579, 1135828,\n", - " 1135664, 1135675, 1140970, 1138525, 1137957, 1154132, 1135522, 1139685,\n", - " 1137287, 1138440, 1138445, 1138461, 1138449, 1137493, 1135123, 1158390,\n", - " 1149328, 1135088, 1135098, 1156606, 1147112, 1142611, 1158984, 1148531,\n", - " 1135762, 1139667, 1138067, 1138079, 1138069, 1134992, 1142439, 1136546,\n", - " 1152651, 1135782, 1159009, 1159017, 1159019, 1140849, 1143631, 1152696,\n", - " 1138148, 1141963, 1141966, 1152042, 1152044, 1139069, 1142302, 1137728,\n", - " 1137731, 1140906, 1138240, 1140228, 1141098, 1141099, 1162958, 1144129,\n", - " 1149001, 1139898, 1141979, 1141980, 1136397, 1143767, 1162705, 1139025,\n", - " 1139033, 1140009, 1146834, 1146844, 1146832, 1135862, 1136625, 1136632,\n", - " 1140470, 1142932, 1141224, 1136917, 1143673, 1143677, 1137188, 1141785,\n", - " 1141786, 1139495, 1144934, 1141609, 1141300, 1134979, 1147844, 1147850,\n", - " 1139798, 1141821, 1141816, 1145154, 1145161, 1140173, 1158749, 1138478,\n", - " 1137766, 1140110, 1137661, 1148441, 1144434, 1144596, 1148263, 1144042,\n", - " 1140885, 1140892, 1144182, 1144184, 1137607, 1150906, 1150910, 1134827,\n", - " 1158690, 1138539, 1137846, 1137854, 1161710, 1147153, 1136371, 1142646,\n", - " 1149197, 1141365, 1141367, 1153068, 1153069, 1141664, 1149088, 1153556,\n", - " 1139508, 1139510, 1139773, 1140093, 1144998, 1145000, 1145001, 1145211,\n", - " 1143779, 1139171, 1140976, 1140990, 1146695, 1135049, 1143692, 1147050,\n", - " 1147047, 1145873, 1135457, 1135460, 1141925, 1146898, 1144242, 1141853,\n", - " 1136891, 1139405, 1145971, 1143845, 1143851, 1163662, 1136277, 1146024,\n", - " 1146025, 1150605, 1141646, 1149930, 1149933, 1141235, 1139990, 1143283,\n", - " 1147540, 1147282, 1142816, 1136330, 1149162, 1140349, 1143663, 1142637,\n", - " 1149366, 1143051, 1138927, 1157720, 1136836, 1148235, 1165626, 1139328,\n", - " 1141496, 1143345, 1144766, 1144619, 1144615, 1145813, 1140836, 1137098,\n", - " 1135876, 1144319, 1135818, 1135813, 1150300, 1144376, 1146514, 1146523,\n", - " 1143456, 1137697, 1137703, 1143937, 1135451, 1146580, 1146591, 1147521,\n", - " 1140360, 1140364, 1137990, 1143082, 1148966, 1144730, 1144219, 1147999,\n", - " 1146949, 1134907, 1147233, 1147244, 1148704, 1146742, 1153703, 1152328,\n", - " 1147056, 1147024, 1142858, 1147971, 1145011, 1145013, 1139549, 1147196,\n", - " 1158226, 1143921, 1147880, 1147881, 1154526, 1151646, 1145240, 1145246,\n", - " 1142378, 1142369, 1146144, 1146145, 1146188, 1151242, 1148215, 1148223,\n", - " 1152538, 1151179, 1150442, 1150445, 1149258, 1149251, 1154437, 1149791,\n", - " 1144514, 1144526, 1138035, 1151994, 1151480, 1152022, 1152027, 1144881,\n", - " 1154271, 1154263, 1145255, 1139914, 1146723, 1148693, 1150127, 1158950,\n", - " 1158959, 1141949, 1150837, 1153572, 1154976, 1147653, 1143560, 1149409,\n", - " 1149412, 1148300, 1135086, 1148622, 1147866, 1151417, 1154426, 1154420,\n", - " 1148180, 1152561, 1146672, 1146676, 1146679, 1146686, 1138867, 1138404,\n", - " 1157968, 1157983, 1148724, 1148729, 1171342, 1148204, 1171939, 1171943,\n", - " 1154168, 1153124, 1145104, 1150929, 1150932, 1152879, 1173078, 1144863,\n", - " 1144849, 1150356, 1155088, 1148084, 1141017, 1147446, 1147442, 1151811,\n", - " 1151816, 1135303, 1151906, 1148498, 1156886, 1156894, 1146562, 1141420,\n", - " 1141419, 1151351, 1151352, 1151345, 1151350, 1153449, 1146969, 1146967,\n", - " 1149359, 1167293, 1146623, 1146608, 1135688, 1152098, 1146280, 1153032,\n", - " 1153038, 1150091, 1137746, 1159983, 1152622, 1152623, 1140521, 1155146,\n", - " 1155140, 1136410, 1136414, 1157107, 1152826, 1154119, 1154123, 1157826,\n", - " 1152673, 1154633, 1139573, 1151582, 1151573, 1151627, 1151617, 1151622,\n", - " 1150578, 1150586, 1136131, 1136788, 1148914, 1145931, 1138989, 1138991,\n", - " 1151311, 1152341, 1146816, 1156826, 1156816, 1153296, 1153311, 1138283,\n", - " 1138281, 1152301, 1152294, 1136028, 1156608, 1151187, 1142777, 1166850,\n", - " 1150150, 1149273, 1148033, 1148040, 1149307, 1149300, 1155223, 1145656,\n", - " 1144659, 1149655, 1148628, 1158530, 1137458, 1148254, 1142047, 1158857,\n", - " 1148892, 1156505, 1151260, 1150465, 1135730, 1135740, 1152179, 1156638,\n", - " 1151788, 1165703, 1152737, 1150824, 1156935, 1158308, 1158311, 1151273,\n", - " 1155441, 1155508, 1153359, 1150129, 1154530, 1154528, 1145771, 1156919,\n", - " 1142755, 1142758, 1156207, 1151379, 1155122, 1152527, 1157183, 1153480,\n", - " 1155755, 1135396, 1135398, 1146913, 1155626, 1155628, 1158494, 1154555,\n", - " 1155576, 1158566, 1158824, 1158825, 1158325, 1157000, 1148836, 1148834,\n", - " 1155646, 1153368, 1158365, 1143263, 1154652, 1146935, 1151898, 1152310,\n", - " 1151327, 1154902, 1154909, 1163127, 1179427, 1153318, 1153322, 1157439,\n", - " 1155606, 1155613, 1150982, 1150990, 1157933, 1140749, 1137154, 1137161,\n", - " 1137152, 1159116, 1134674, 1135601, 1148153, 1148159, 1150661, 1158665,\n", - " 1157684, 1140632, 1152220, 1159213, 1159132, 1157026, 1144843, 1155975,\n", - " 1158846, 1156802, 1156812, 1149696, 1154600, 1136899, 1136896, 1158760,\n", - " 1158882, 1156778, 1151602, 1151615, 1136480, 1136494, 1136491, 1154393,\n", - " 1156665, 1155309, 1157249, 1153808, 1136640, 1147782, 1157821, 1158558,\n", - " 1156516, 1163814, 1162016, 1164524, 1138110, 1161539, 1165840, 1163456,\n", - " 1142666, 1157751, 1167359, 1159042, 1159070, 1165928, 1167592, 1142427,\n", - " 1158295, 1158303, 1157944, 1157946, 1164491, 1153052, 1153045, 1144150,\n", - " 1153842, 1156098, 1138393, 1150046, 1149063, 1155479, 1155480, 1154294,\n", - " 1153519, 1158680, 1158685, 1146876, 1157600, 1138161, 1167206, 1156787,\n", - " 1165662, 1168327, 1149963, 1184337, 1154590, 1139592, 1139286, 1170415,\n", - " 1140650, 1140643, 1148600, 1151875, 1154275, 1156355, 1158643, 1156181,\n", - " 1159025, 1159029, 1159032, 1168107, 1169108, 1152247, 1158905, 1144327,\n", - " 1144320, 1165996, 1151220, 1138674, 1168428, 1148567, 1147836, 1146510,\n", - " 1164580, 1144747, 1152776, 1163522, 1145139, 1155272, 1147426, 1147427,\n", - " 1156739, 1160856, 1153663, 1150648, 1150319, 1144812, 1153267, 1168855,\n", - " 1156300, 1161757, 1166922, 1163935, 1169282, 1155324, 1166462, 1138950,\n", - " 1147694, 1145447, 1165746, 1155905, 1148124, 1147723, 1145889, 1145900,\n", - " 1145902, 1181049, 1169742, 1158722, 1144690, 1150783, 1169602, 1166653,\n", - " 1155170, 1156119, 1161779, 1144336, 1157534, 1157528, 1138376, 1154660,\n", - " 1154670, 1154893, 1169162, 1157331, 1141043, 1169359, 1154364, 1154366,\n", - " 1149444, 1146337, 1171522, 1158611, 1158062, 1173047, 1172763, 1149846,\n", - " 1149847, 1157379, 1169941, 1167388, 1170463, 1152353, 1165528, 1168462,\n", - " 1168407, 1155930, 1155931, 1161130, 1168049, 1149402, 1148667, 1148323,\n", - " 1147504, 1173307, 1169144, 1154029, 1152150, 1152152, 1172791, 1159655,\n", - " 1157158, 1157153, 1157373, 1147697, 1147711, 1148128, 1148131, 1148141,\n", - " 1147934, 1157592, 1170490, 1177051, 1168808, 1146755, 1160150, 1174845,\n", - " 1159100, 1172061, 1166679, 1166682, 1171823, 1150234, 1161587, 1161595,\n", - " 1154148, 1179965, 1149169, 1143279, 1143420, 1171300, 1153803, 1178475,\n", - " 1181746, 1161255, 1171623, 1178359, 1157126, 1187534, 1181922, 1178706,\n", - " 1145597, 1191755, 1178218, 1183463, 1145626, 1181279, 1149755, 1180729,\n", - " 1180732, 1152287, 1181143, 1183342, 1158935, 1158940, 1158379, 1155890,\n", - " 1184317, 1166989, 1182330, 1167771, 1167765, 1168533, 1168886, 1165474,\n", - " 1180521, 1179090, 1165149, 1163422, 1166520, 1161819, 1170341, 1189290,\n", - " 1170420, 1139828, 1139831, 1139837, 1150265, 1170433, 1154812, 1182022,\n", - " 1164677, 1191674, 1156055, 1151972, 1151978, 1191984, 1149544, 1159083,\n", - " 1156836, 1187982, 1140993, 1188778, 1193895, 1181422, 1181423, 1167840,\n", - " 1151774, 1153743, 1194172, 1152115, 1169699, 1177617, 1175356, 1150412,\n", - " 1172976, 1158064, 1158077, 1158071, 1181616, 1183949, 1182560, 1180531,\n", - " 1170168, 1184440, 1176817, 1155959, 1155962, 1192792, 1189956, 1188330,\n", - " 1192368, 1192554], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1195530, 1198730, 1199282, 1198449, 1198458, 1196202, 1198844,\n", - " 1201581, 1201582, 1201237, 1198023, 1198027, 1194626, 1196956, 1202803,\n", - " 1202804, 1198557, 1198717, 1194770, 1195494, 1195514, 1195263, 1197921,\n", - " 1197930, 1196529, 1201992, 1198539, 1196461, 1194882, 1195888, 1195740,\n", - " 1196334, 1197856, 1196618, 1195313, 1197793, 1198647, 1199809, 1195216,\n", - " 1195265, 1195278, 1197140, 1195234, 1195245, 1197273, 1196109, 1195850,\n", - " 1198915, 1198925, 1197474, 1195750, 1195758, 1195626, 1199697, 1195353,\n", - " 1198273, 1198282, 1200959, 1199859, 1197295, 1199185, 1194928, 1197583,\n", - " 1199628, 1197674, 1197990, 1202457, 1200872, 1200403, 1198400, 1199579,\n", - " 1201904, 1201908, 1201916, 1201511, 1196496, 1196499, 1199014, 1196727,\n", - " 1200018, 1198811, 1199555, 1200503, 1203282, 1199445, 1201081, 1202630,\n", - " 1200980, 1199761, 1199546, 1201042, 1202043, 1200553, 1200558, 1197100,\n", - " 1196883, 1201442, 1202669, 1202207, 1200242, 1196960, 1196966, 1200785,\n", - " 1200793, 1201129, 1203113, 1195664, 1200445, 1198911, 1195421, 1197811,\n", - " 1197816, 1198127, 1201484, 1196602, 1201138, 1194730, 1198147, 1201706,\n", - " 1197735, 1199786, 1198819, 1200468, 1200974, 1197652, 1197660, 1194908,\n", - " 1203161, 1198751], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1195530, 1198730, 1199282, 1198449, 1198458, 1196202, 1198844,\n", - " 1201581, 1201582, 1201237, 1198023, 1198027, 1194626, 1196956, 1202803,\n", - " 1202804, 1198557, 1198717, 1194770, 1195494, 1195514, 1195263, 1197921,\n", - " 1197930, 1196529, 1201992, 1198539, 1196461, 1194882, 1195888, 1195740,\n", - " 1196334, 1197856, 1196618, 1195313, 1197793, 1198647, 1199809, 1195216,\n", - " 1195265, 1195278, 1197140, 1195234, 1195245, 1197273, 1196109, 1195850,\n", - " 1198915, 1198925, 1197474, 1195750, 1195758, 1195626, 1199697, 1195353,\n", - " 1198273, 1198282, 1200959, 1199859, 1197295, 1199185, 1194928, 1197583,\n", - " 1199628, 1197674, 1197990, 1202457, 1200872, 1200403, 1198400, 1199579,\n", - " 1201904, 1201908, 1201916, 1201511, 1196496, 1196499, 1199014, 1196727,\n", - " 1200018, 1198811, 1199555, 1200503, 1203282, 1199445, 1201081, 1202630,\n", - " 1200980, 1199761, 1199546, 1201042, 1202043, 1200553, 1200558, 1197100,\n", - " 1196883, 1201442, 1202669, 1202207, 1200242, 1196960, 1196966, 1200785,\n", - " 1200793, 1201129, 1203113, 1195664, 1200445, 1198911, 1195421, 1197811,\n", - " 1197816, 1198127, 1201484, 1196602, 1201138, 1194730, 1198147, 1201706,\n", - " 1197735, 1199786, 1198819, 1200468, 1200974, 1197652, 1197660, 1194908,\n", - " 1203161, 1198751], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 6.9391e-02, -3.3209e-04, 3.2116e-01, ..., -1.3039e-04,\n", - " -4.3427e-04, -2.9522e-03],\n", - " [ 4.1140e-02, -6.4791e-04, 3.7246e-01, ..., -1.0671e-04,\n", - " -2.9826e-04, -2.8408e-03],\n", - " [ 4.1140e-02, -6.4791e-04, 3.7246e-01, ..., -1.0671e-04,\n", - " -2.9826e-04, -2.8408e-03],\n", - " ...,\n", - " [ 2.7286e-02, -1.5964e-04, 2.8646e-01, ..., 1.2833e-03,\n", - " -2.8487e-04, -2.4179e-03],\n", - " [ 2.3887e-02, -3.3883e-04, 3.3368e-01, ..., 1.8168e-02,\n", - " -2.6472e-04, -3.0902e-03],\n", - " [ 6.7805e-02, -8.7634e-04, 3.5113e-01, ..., -3.8243e-04,\n", - " -2.4122e-04, -3.2783e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 2.9305, -0.0327, 1.8550, ..., -0.0133, -0.0222, 3.5872],\n", - " [ 3.5243, -0.0368, 2.4856, ..., -0.0194, -0.0223, 3.0577],\n", - " [ 2.9956, -0.0363, 1.8444, ..., -0.0133, -0.0188, 3.2664],\n", - " ...,\n", - " [ 4.0515, -0.0663, 1.6992, ..., -0.0256, -0.0245, 3.5960],\n", - " [ 3.6591, -0.0583, 1.6187, ..., -0.0229, -0.0228, 3.5534],\n", - " [ 3.1486, -0.0416, 2.4564, ..., -0.0120, -0.0227, 3.9688]],\n", - " device='cuda:0', grad_fn=), 'author': tensor([[ 4.4839e-01, -2.6903e-03, -7.5641e-05, ..., -2.1515e-04,\n", - " -1.9597e-03, -1.3231e-04],\n", - " [ 5.5567e-01, -3.8761e-03, 3.2488e-02, ..., -4.6263e-04,\n", - " -1.4003e-04, 1.5839e-01],\n", - " [ 5.7631e-01, -5.3720e-03, -8.0449e-04, ..., -9.7723e-04,\n", - " 6.9554e-02, 2.5698e-01],\n", - " ...,\n", - " [ 6.3119e-01, -5.8111e-03, -3.3762e-04, ..., -2.0797e-03,\n", - " 7.8551e-02, 1.7591e-01],\n", - " [ 6.6545e-01, -6.8630e-03, -1.5577e-03, ..., -2.7865e-03,\n", - " 1.4020e-01, 3.2739e-01],\n", - " [ 5.1060e-01, -4.6312e-03, -1.0643e-03, ..., -1.0423e-03,\n", - " 4.7867e-02, 2.0641e-01]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-0.0102, 0.2481, -0.0025, ..., 0.8552, -0.0013, -0.0067],\n", - " [-0.0093, 0.1104, -0.0032, ..., 0.8478, -0.0023, -0.0071],\n", - " [-0.0106, 0.0689, -0.0033, ..., 0.7469, -0.0012, -0.0050],\n", - " ...,\n", - " [-0.0102, 0.2582, -0.0028, ..., 0.9304, -0.0030, -0.0067],\n", - " [-0.0122, 0.3518, -0.0034, ..., 1.1938, -0.0022, -0.0073],\n", - " [-0.0096, 0.2435, -0.0027, ..., 1.0649, -0.0032, -0.0066]],\n", - " device='cuda:0', grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 53, 84, 212, 47, 136, 39, 38, 12, 117, 117, 117, 14,\n", - " 14, 14, 495, 432, 557, 539, 539, 437, 621, 605, 748, 748,\n", - " 572, 572, 572, 918, 800, 800, 1392, 1124, 1156, 1309, 1161, 1168,\n", - " 1168, 1168, 1250, 1250, 1250, 1372, 1383, 1491, 1226, 1360, 1358, 1441,\n", - " 1441, 1431, 1462, 1431, 1711, 1339, 1627, 1543, 1565, 1565, 1623, 1492,\n", - " 1709, 1651, 1614, 1779, 1779, 1779, 1722, 1722, 1760, 1973, 1953, 1953,\n", - " 1919, 1932, 1878, 1857, 1857, 1857, 1857, 2055, 2016, 2169, 2169, 2284,\n", - " 2284, 2426, 2104, 2356, 2335, 2411, 2359, 2565, 2254, 2499, 2540, 2633,\n", - " 2659, 2642, 2642, 2631, 2766, 2744, 2820, 2713, 2721, 2898, 2932, 2932,\n", - " 2960, 2960, 2802, 2640, 2974, 3040, 3203, 2983, 2983, 3237, 2802, 2802,\n", - " 3226, 3226, 3099, 3099, 3087, 3087, 3083, 3083, 3212, 3269, 3318, 3205,\n", - " 3317, 3317, 3457, 3384, 3384, 3578, 3438, 3596, 3520, 3438, 3525, 3525,\n", - " 3680, 3655, 3784, 3642, 3836, 3828, 3841, 3803, 3803, 3803, 3742, 4089,\n", - " 4089, 4138, 4138, 4100, 4100, 4181, 4210, 4246, 4393, 4393, 4830, 4635,\n", - " 4815, 4763, 4659, 4830, 5042, 4937, 4963, 5147, 5147, 5202, 5179, 5216,\n", - " 5220, 5214, 5671, 5499, 5813, 5852, 5714, 6035, 5949, 5943, 5927, 5927,\n", - " 5927, 6071, 6071, 6019, 5927, 5927, 6071],\n", - " [ 21, 9, 4, 87, 94, 78, 8, 8, 127, 37, 123, 35,\n", - " 120, 57, 58, 5, 96, 38, 76, 91, 75, 97, 125, 66,\n", - " 99, 37, 123, 79, 68, 105, 122, 98, 84, 89, 18, 26,\n", - " 112, 12, 60, 53, 91, 24, 42, 30, 83, 3, 52, 65,\n", - " 30, 22, 85, 43, 3, 27, 98, 56, 119, 81, 17, 17,\n", - " 46, 46, 20, 101, 116, 125, 51, 67, 70, 109, 30, 13,\n", - " 72, 111, 22, 16, 117, 40, 19, 109, 129, 114, 17, 11,\n", - " 17, 107, 43, 26, 3, 23, 126, 86, 91, 104, 74, 45,\n", - " 3, 126, 128, 27, 88, 93, 36, 97, 90, 8, 15, 63,\n", - " 77, 96, 121, 22, 79, 50, 3, 73, 88, 69, 62, 14,\n", - " 17, 22, 43, 22, 34, 22, 22, 43, 30, 108, 7, 27,\n", - " 96, 81, 61, 6, 49, 81, 95, 61, 39, 29, 115, 92,\n", - " 127, 82, 44, 33, 21, 113, 106, 3, 81, 71, 79, 114,\n", - " 17, 96, 10, 98, 59, 98, 107, 43, 25, 81, 102, 103,\n", - " 32, 47, 54, 55, 79, 23, 64, 85, 41, 31, 66, 110,\n", - " 100, 31, 0, 79, 72, 80, 89, 124, 33, 118, 28, 79,\n", - " 1, 48, 15, 55, 2, 50, 34]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 308, 1780, 1315, ..., 3680, 1004, 7141],\n", - " [ 253, 242, 261, ..., 7347, 7322, 7295]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 96, 77, 111, ..., 90, 79, 79],\n", - " [ 174, 52, 65, ..., 6034, 6005, 5976]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 305, 305, 305, ..., 7338, 7338, 7338],\n", - " [ 80, 158, 77, ..., 385, 575, 451]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 536, 120, 260, ..., 582, 183, 543],\n", - " [ 34, 148, 7, ..., 7378, 7409, 7224]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5756, 5341, 677, ..., 6677, 407, 6223],\n", - " [ 194, 117, 117, ..., 5988, 6044, 6067]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 253, 308, 308, ..., 7385, 7325, 7325],\n", - " [1164, 253, 236, ..., 458, 3691, 801]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 117, 117, 117, ..., 6019, 6019, 6019],\n", - " [6593, 6224, 5341, ..., 168, 96, 5299]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005573\n", - "sampling 0.005419\n", - "noi time: 0.001475\n", - "get_vertex_data call: 0.028508\n", - "noi group time: 0.003926\n", - "eoi_group_time: 0.016025\n", - "second half: 0.195352\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16829, 522, 31145, ..., 1119196, 1103852, 1100734],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16829, 522, 31145, ..., 1119196, 1103852, 1100734],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210552, 1209799, 1231353, ..., 1921009, 1931106, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210552, 1209799, 1231353, ..., 1921009, 1931106, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137435, 1137204, 1137212, ..., 1192554, 1189949, 1189798],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137435, 1137204, 1137212, ..., 1192554, 1189949, 1189798],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199439, 1198248, 1197226, 1197719, 1200099, 1198730, 1199831, 1199282,\n", - " 1198449, 1202255, 1198840, 1201582, 1201462, 1199278, 1201016, 1203054,\n", - " 1198624, 1197512, 1194866, 1197464, 1196631, 1195514, 1195263, 1197924,\n", - " 1196534, 1201992, 1198543, 1198095, 1195459, 1194889, 1195888, 1199172,\n", - " 1195740, 1197856, 1196517, 1197830, 1195325, 1196840, 1198958, 1198167,\n", - " 1196704, 1195216, 1195265, 1196109, 1194859, 1195841, 1199315, 1196120,\n", - " 1195918, 1198280, 1198285, 1198282, 1200959, 1199066, 1199185, 1194928,\n", - " 1199628, 1202368, 1202457, 1200872, 1198400, 1199231, 1201918, 1194786,\n", - " 1200052, 1201511, 1200491, 1200659, 1197973, 1197976, 1196727, 1198428,\n", - " 1199418, 1199889, 1198811, 1199555, 1201827, 1200450, 1195592, 1200503,\n", - " 1198066, 1196474, 1198792, 1201078, 1201155, 1202403, 1201056, 1200927,\n", - " 1201042, 1195685, 1200526, 1195637, 1200553, 1197097, 1196889, 1196768,\n", - " 1201442, 1201029, 1202239, 1202338, 1201291, 1198478, 1195607, 1195610,\n", - " 1203329, 1198562, 1196966, 1199606, 1198525, 1203112, 1203113, 1195664,\n", - " 1198929, 1198909, 1195181, 1197060, 1197822, 1197821, 1198299, 1197735,\n", - " 1200436, 1200437, 1201190, 1203077, 1201886, 1197655, 1197039, 1194908,\n", - " 1203162, 1197872], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199439, 1198248, 1197226, 1197719, 1200099, 1198730, 1199831, 1199282,\n", - " 1198449, 1202255, 1198840, 1201582, 1201462, 1199278, 1201016, 1203054,\n", - " 1198624, 1197512, 1194866, 1197464, 1196631, 1195514, 1195263, 1197924,\n", - " 1196534, 1201992, 1198543, 1198095, 1195459, 1194889, 1195888, 1199172,\n", - " 1195740, 1197856, 1196517, 1197830, 1195325, 1196840, 1198958, 1198167,\n", - " 1196704, 1195216, 1195265, 1196109, 1194859, 1195841, 1199315, 1196120,\n", - " 1195918, 1198280, 1198285, 1198282, 1200959, 1199066, 1199185, 1194928,\n", - " 1199628, 1202368, 1202457, 1200872, 1198400, 1199231, 1201918, 1194786,\n", - " 1200052, 1201511, 1200491, 1200659, 1197973, 1197976, 1196727, 1198428,\n", - " 1199418, 1199889, 1198811, 1199555, 1201827, 1200450, 1195592, 1200503,\n", - " 1198066, 1196474, 1198792, 1201078, 1201155, 1202403, 1201056, 1200927,\n", - " 1201042, 1195685, 1200526, 1195637, 1200553, 1197097, 1196889, 1196768,\n", - " 1201442, 1201029, 1202239, 1202338, 1201291, 1198478, 1195607, 1195610,\n", - " 1203329, 1198562, 1196966, 1199606, 1198525, 1203112, 1203113, 1195664,\n", - " 1198929, 1198909, 1195181, 1197060, 1197822, 1197821, 1198299, 1197735,\n", - " 1200436, 1200437, 1201190, 1203077, 1201886, 1197655, 1197039, 1194908,\n", - " 1203162, 1197872], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 5.7517e-02, -1.8347e-04, 3.3680e-01, ..., 2.1664e-02,\n", - " -8.9481e-04, -2.8693e-03],\n", - " [ 4.1705e-02, -4.6869e-04, 3.6647e-01, ..., 2.8620e-02,\n", - " -6.0034e-04, -2.6611e-03],\n", - " [ 3.3684e-02, -3.9706e-04, 3.2479e-01, ..., 4.2866e-02,\n", - " -9.5447e-04, -2.5414e-03],\n", - " ...,\n", - " [ 4.0515e-02, -4.3612e-05, 3.2192e-01, ..., 4.2416e-02,\n", - " -6.0942e-04, -2.6780e-03],\n", - " [ 6.5812e-02, -7.1343e-04, 4.0084e-01, ..., 7.1804e-03,\n", - " -5.9295e-04, -3.2236e-03],\n", - " [ 6.8344e-02, -7.2198e-04, 4.0462e-01, ..., 8.5096e-04,\n", - " -5.5775e-04, -3.2390e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 2.9069, -0.0354, 1.2412, ..., -0.0143, -0.0209, 3.2992],\n", - " [ 3.1819, -0.0368, 1.7136, ..., -0.0182, -0.0243, 3.3394],\n", - " [ 5.0018, -0.0784, 1.6286, ..., -0.0312, -0.0341, 4.4210],\n", - " ...,\n", - " [ 2.6769, -0.0325, 1.0604, ..., -0.0132, -0.0200, 3.2448],\n", - " [ 3.2911, -0.0456, 0.3706, ..., -0.0150, -0.0197, 3.0518],\n", - " [ 3.3495, -0.0414, 1.9126, ..., -0.0135, -0.0270, 4.3840]],\n", - " device='cuda:0', grad_fn=), 'author': tensor([[ 4.6921e-01, -5.4357e-03, -1.4451e-03, ..., -2.6941e-04,\n", - " 1.7886e-01, 4.5925e-01],\n", - " [-4.3627e-04, -2.3746e-04, 1.4040e-01, ..., 9.8954e-02,\n", - " -2.8513e-04, -9.4116e-04],\n", - " [ 5.5902e-01, -5.2734e-03, -7.4593e-04, ..., -2.0776e-04,\n", - " 1.1393e-01, 2.6902e-01],\n", - " ...,\n", - " [ 4.7330e-01, -1.9461e-03, -1.3761e-03, ..., 2.9394e-02,\n", - " -6.0372e-05, 1.9448e-01],\n", - " [ 4.9547e-01, -4.4379e-03, -1.0035e-03, ..., 6.7700e-02,\n", - " 4.7361e-02, 2.8487e-01],\n", - " [ 5.4603e-01, -2.3286e-03, -1.1007e-03, ..., 1.1619e-01,\n", - " 2.1663e-02, 2.6819e-01]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-9.0766e-03, 2.7081e-01, -1.3817e-03, ..., 7.1563e-01,\n", - " -1.2717e-03, -4.4322e-03],\n", - " [-8.2525e-03, 2.0211e-01, -2.1520e-03, ..., 7.8196e-01,\n", - " -2.5909e-03, -6.4390e-03],\n", - " [-8.6887e-03, 2.3968e-01, -6.9929e-04, ..., 4.8351e-01,\n", - " -1.0179e-03, -4.9529e-03],\n", - " ...,\n", - " [-7.2690e-03, 1.2636e-01, -1.8510e-03, ..., 5.6219e-01,\n", - " -2.4037e-03, -5.1862e-03],\n", - " [-8.5133e-03, 2.6497e-01, -3.0475e-03, ..., 8.4367e-01,\n", - " -1.1309e-03, -7.3330e-03],\n", - " [-1.0533e-02, 1.9158e-01, -4.0069e-03, ..., 1.0190e+00,\n", - " -2.8014e-03, -8.7492e-03]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 112, 82, 179, 179, 183, 111, 75, 41, 117, 117, 618, 248,\n", - " 277, 275, 457, 457, 284, 682, 682, 682, 841, 841, 444, 444,\n", - " 668, 671, 671, 801, 872, 1004, 1045, 1045, 1349, 1337, 1362, 1207,\n", - " 1151, 799, 1359, 1343, 1673, 1673, 1709, 1562, 1609, 1645, 1645, 1717,\n", - " 1769, 1978, 1975, 2026, 1993, 1993, 2029, 1877, 1876, 1942, 2052, 2107,\n", - " 2156, 2183, 2177, 2177, 2221, 2221, 2072, 2072, 2072, 2213, 2213, 2241,\n", - " 2241, 2151, 2140, 2140, 2307, 2307, 2307, 2307, 2165, 2510, 2558, 2532,\n", - " 2532, 2454, 2607, 2791, 2651, 2667, 2738, 2738, 2810, 2649, 2733, 2733,\n", - " 2669, 2669, 2875, 2992, 2955, 2813, 3051, 3023, 3023, 3366, 3108, 3108,\n", - " 3200, 3227, 3317, 3304, 3251, 3147, 3147, 3333, 3333, 3467, 3467, 3324,\n", - " 3472, 3393, 3585, 3667, 3728, 3880, 3804, 3934, 3794, 3842, 3759, 3782,\n", - " 3782, 4030, 4016, 4016, 4016, 4005, 4056, 4056, 3952, 3952, 3952, 3952,\n", - " 4121, 4066, 4114, 4114, 4245, 4166, 4166, 4533, 4456, 4412, 4411, 4411,\n", - " 4554, 4592, 4592, 4557, 4557, 4557, 4336, 4533, 4514, 4514, 4555, 4555,\n", - " 4804, 4804, 4804, 4804, 4804, 4659, 4636, 4806, 4645, 4589, 4817, 4888,\n", - " 4888, 4720, 5129, 5322, 5074, 5319],\n", - " [ 101, 82, 30, 74, 12, 61, 64, 65, 126, 73, 26, 67,\n", - " 18, 7, 65, 99, 92, 72, 30, 17, 57, 28, 83, 96,\n", - " 80, 54, 37, 1, 70, 111, 41, 67, 38, 119, 59, 49,\n", - " 102, 123, 68, 125, 34, 80, 68, 41, 129, 62, 68, 1,\n", - " 84, 75, 91, 18, 58, 25, 88, 103, 97, 116, 22, 90,\n", - " 122, 113, 33, 23, 35, 25, 3, 84, 2, 78, 118, 93,\n", - " 94, 46, 47, 105, 5, 120, 4, 98, 0, 22, 39, 8,\n", - " 79, 84, 18, 39, 1, 94, 10, 71, 20, 22, 100, 15,\n", - " 29, 51, 11, 70, 16, 88, 21, 7, 65, 44, 3, 27,\n", - " 42, 43, 86, 110, 106, 27, 9, 76, 56, 75, 61, 53,\n", - " 102, 0, 22, 127, 97, 94, 87, 70, 37, 38, 81, 60,\n", - " 74, 24, 36, 19, 86, 106, 70, 89, 70, 77, 32, 102,\n", - " 22, 66, 63, 85, 71, 70, 129, 6, 45, 108, 56, 112,\n", - " 14, 129, 70, 70, 55, 56, 40, 69, 114, 70, 86, 70,\n", - " 70, 124, 128, 31, 107, 104, 13, 48, 109, 115, 121, 117,\n", - " 70, 95, 1, 117, 50, 52]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1304, 63, 5247, ..., 1218, 1781, 3428],\n", - " [ 10, 261, 33, ..., 7931, 7931, 7931]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 25, 83, 103, ..., 119, 25, 127],\n", - " [ 17, 30, 1, ..., 5357, 5320, 5286]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 225, 225, 225, ..., 7962, 7962, 7962],\n", - " [ 320, 239, 548, ..., 677, 452, 495]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 247, 675, 382, ..., 531, 90, 656],\n", - " [ 26, 340, 46, ..., 7910, 8030, 7956]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[7091, 6465, 668, ..., 3961, 7267, 6015],\n", - " [ 179, 180, 180, ..., 5402, 5363, 5353]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 33, 33, 33, ..., 8009, 8009, 8009],\n", - " [4072, 5247, 7251, ..., 1959, 2304, 2126]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 179, 179, 179, ..., 5397, 5397, 5397],\n", - " [7091, 7663, 5951, ..., 6603, 181, 3853]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006575\n", - "sampling 0.006416\n", - "noi time: 0.001934\n", - "get_vertex_data call: 0.039743\n", - "noi group time: 0.001912\n", - "eoi_group_time: 0.016991\n", - "second half: 0.222278\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 10206, 10012, 31571, ..., 1130746, 1133969, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 10206, 10012, 31571, ..., 1130746, 1133969, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1231426, 1215975, 1208425, ..., 1937554, 1935116, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1231426, 1215975, 1208425, ..., 1937554, 1935116, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1141424, 1141435, 1140284, 1135933, 1135726, 1140799, 1141758,\n", - " 1136208, 1139462, 1136969, 1146803, 1138059, 1143615, 1137947, 1137271,\n", - " 1143362, 1143372, 1139241, 1146647, 1139610, 1139613, 1139615, 1139958,\n", - " 1150509, 1142963, 1136950, 1149216, 1155689, 1147473, 1147476, 1147483,\n", - " 1149037, 1146995, 1146996, 1153012, 1148345, 1150200, 1136125, 1152667,\n", - " 1152669, 1153217, 1136742, 1147095, 1155014, 1155018, 1155019, 1147211,\n", - " 1136685, 1152427, 1134662, 1140304, 1151546, 1140540, 1137172, 1151520,\n", - " 1134735, 1140029, 1140947, 1140953, 1135367, 1135202, 1135204, 1137798,\n", - " 1136034, 1141036, 1134794, 1157443, 1137329, 1136185, 1143069, 1157102,\n", - " 1157103, 1137693, 1136609, 1136619, 1135340, 1135342, 1144395, 1157393,\n", - " 1136662, 1137441, 1137449, 1156159, 1141702, 1135579, 1135583, 1142596,\n", - " 1142607, 1136097, 1138514, 1138524, 1153098, 1138580, 1156967, 1154132,\n", - " 1154141, 1139685, 1138440, 1136541, 1138461, 1160579, 1137922, 1136594,\n", - " 1149328, 1149333, 1156606, 1147112, 1147118, 1142611, 1135359, 1138177,\n", - " 1138185, 1158984, 1148531, 1137109, 1139667, 1139673, 1138070, 1136085,\n", - " 1134992, 1142439, 1135781, 1136734, 1158961, 1158974, 1144410, 1153543,\n", - " 1140034, 1139085, 1138148, 1141963, 1141966, 1155660, 1141992, 1141985,\n", - " 1152042, 1152044, 1136054, 1137734, 1137728, 1146222, 1134750, 1135540,\n", - " 1135551, 1135549, 1136697, 1140228, 1137895, 1141088, 1141095, 1149001,\n", - " 1145347, 1141975, 1143711, 1137670, 1139033, 1135861, 1135865, 1136426,\n", - " 1141224, 1141226, 1141891, 1139386, 1136917, 1143673, 1144237, 1139495,\n", - " 1134979, 1147850, 1149435, 1144428, 1141816, 1145161, 1143202, 1140173,\n", - " 1158749, 1149108, 1137070, 1140110, 1142913, 1144596, 1136867, 1140892,\n", - " 1135327, 1144182, 1137604, 1150906, 1161701, 1147153, 1142646, 1149186,\n", - " 1141365, 1151112, 1141664, 1149097, 1138292, 1144279, 1153556, 1139508,\n", - " 1139510, 1138815, 1145001, 1140977, 1140990, 1147050, 1147047, 1145873,\n", - " 1152976, 1152980, 1152988, 1152991, 1139007, 1141925, 1144242, 1140585,\n", - " 1150255, 1140690, 1143637, 1137571, 1134856, 1145983, 1143851, 1136275,\n", - " 1146024, 1146134, 1141585, 1149928, 1149930, 1139990, 1143293, 1151123,\n", - " 1147543, 1147282, 1142817, 1142829, 1142816, 1164371, 1149159, 1149160,\n", - " 1149161, 1142628, 1142637, 1146094, 1149608, 1136836, 1139329, 1144779,\n", - " 1142149, 1145429, 1144754, 1144765, 1144753, 1144611, 1145816, 1137098,\n", - " 1139979, 1135876, 1144316, 1135813, 1150294, 1146514, 1146516, 1146523,\n", - " 1146526, 1138024, 1143456, 1143457, 1144291, 1144303, 1140364, 1149574,\n", - " 1137985, 1137994, 1143081, 1166410, 1148966, 1144725, 1144213, 1147984,\n", - " 1147995, 1147999, 1134899, 1139252, 1147131, 1148704, 1141327, 1141836,\n", - " 1146749, 1153701, 1152328, 1143434, 1147070, 1149714, 1147025, 1147253,\n", - " 1147249, 1147970, 1147873, 1147882, 1154526, 1145240, 1145245, 1145750,\n", - " 1145751, 1151239, 1151242, 1152538, 1150280, 1150445, 1149258, 1148928,\n", - " 1156468, 1146887, 1152013, 1147794, 1151482, 1139914, 1140566, 1149530,\n", - " 1147009, 1135806, 1158944, 1141949, 1141278, 1144821, 1151795, 1154976,\n", - " 1154982, 1147653, 1149412, 1146412, 1148288, 1148294, 1148302, 1137724,\n", - " 1151412, 1158786, 1158798, 1152561, 1136251, 1146676, 1157973, 1157983,\n", - " 1148720, 1148724, 1148725, 1148729, 1145862, 1171341, 1143901, 1148204,\n", - " 1153182, 1153186, 1153188, 1153197, 1152974, 1150935, 1148058, 1152877,\n", - " 1144860, 1155088, 1141017, 1147446, 1147447, 1147442, 1151821, 1152581,\n", - " 1152586, 1151906, 1151913, 1154183, 1154190, 1148498, 1151351, 1155152,\n", - " 1146975, 1146623, 1151691, 1146490, 1135688, 1152415, 1146280, 1150085,\n", - " 1145539, 1137746, 1146307, 1146304, 1152622, 1140521, 1151967, 1155337,\n", - " 1155334, 1154120, 1154123, 1157826, 1157835, 1157839, 1152673, 1151580,\n", - " 1151617, 1150588, 1150591, 1136131, 1136134, 1136788, 1152950, 1140935,\n", - " 1145952, 1152898, 1152903, 1152341, 1158422, 1153311, 1145576, 1138275,\n", - " 1138279, 1152296, 1136028, 1136031, 1136016, 1158704, 1140684, 1151064,\n", - " 1154733, 1142777, 1156422, 1149272, 1149273, 1144023, 1148033, 1148040,\n", - " 1154453, 1154457, 1137048, 1148628, 1158530, 1137458, 1148242, 1135698,\n", - " 1153075, 1142041, 1154381, 1157225, 1157229, 1158860, 1157064, 1152833,\n", - " 1145191, 1143502, 1150465, 1150475, 1146854, 1135219, 1135231, 1135740,\n", - " 1151788, 1135644, 1158306, 1158308, 1158311, 1155441, 1161728, 1150129,\n", - " 1150130, 1150132, 1150136, 1138569, 1154529, 1154528, 1145603, 1142755,\n", - " 1142764, 1142758, 1156207, 1156271, 1151379, 1140186, 1155122, 1149321,\n", - " 1155748, 1155758, 1156463, 1158096, 1168230, 1155675, 1155628, 1156563,\n", - " 1156566, 1155572, 1136466, 1158824, 1153721, 1158330, 1157000, 1148835,\n", - " 1153367, 1161391, 1154648, 1154241, 1154080, 1156714, 1137359, 1154911,\n", - " 1143189, 1157439, 1157430, 1150068, 1150069, 1143517, 1157282, 1137152,\n", - " 1158585, 1153786, 1159116, 1145693, 1145690, 1145681, 1134677, 1135601,\n", - " 1135605, 1148148, 1148149, 1158502, 1158665, 1157684, 1149145, 1152213,\n", - " 1140380, 1140374, 1155872, 1157033, 1142466, 1155975, 1156957, 1153765,\n", - " 1142076, 1158834, 1158841, 1156811, 1162534, 1155393, 1160163, 1153503,\n", - " 1136896, 1140213, 1158803, 1156778, 1158284, 1136480, 1136494, 1136491,\n", - " 1153632, 1156663, 1156665, 1147586, 1156490, 1153808, 1157678, 1136646,\n", - " 1179181, 1158558, 1165778, 1138101, 1155871, 1161539, 1183449, 1163456,\n", - " 1164276, 1142666, 1157751, 1167359, 1159057, 1167589, 1142427, 1157944,\n", - " 1157946, 1162039, 1153052, 1153042, 1153045, 1155763, 1155772, 1163707,\n", - " 1156098, 1138393, 1162917, 1160646, 1150046, 1159475, 1149063, 1145948,\n", - " 1155476, 1153519, 1161652, 1164006, 1165386, 1149956, 1149966, 1139290,\n", - " 1159999, 1148771, 1146063, 1146356, 1160181, 1184916, 1165308, 1158878,\n", - " 1158876, 1170415, 1140641, 1140643, 1141864, 1148600, 1159646, 1155810,\n", - " 1185124, 1141800, 1159025, 1159037, 1166281, 1169109, 1152247, 1186660,\n", - " 1160605, 1155588, 1165993, 1138674, 1148560, 1148569, 1144989, 1149016,\n", - " 1146500, 1153239, 1164580, 1161240, 1144739, 1144747, 1144750, 1152776,\n", - " 1155044, 1141468, 1141471, 1141459, 1151651, 1147426, 1147427, 1157047,\n", - " 1156737, 1156739, 1165182, 1153663, 1171040, 1150315, 1144812, 1140112,\n", - " 1192121, 1135567, 1165716, 1142722, 1156293, 1156289, 1165644, 1145743,\n", - " 1145738, 1145228, 1155320, 1171687, 1144972, 1144973, 1152624, 1152630,\n", - " 1139351, 1147714, 1153520, 1153534, 1158724, 1154076, 1147339, 1144681,\n", - " 1166653, 1169300, 1169304, 1155172, 1150515, 1150518, 1154618, 1144346,\n", - " 1144336, 1157534, 1138372, 1138375, 1147750, 1154670, 1154885, 1157331,\n", - " 1138130, 1141051, 1141043, 1151668, 1169359, 1149452, 1158623, 1172875,\n", - " 1147416, 1152353, 1170284, 1172782, 1168400, 1155931, 1149402, 1173307,\n", - " 1183927, 1154027, 1152151, 1180341, 1167857, 1151201, 1151697, 1157158,\n", - " 1157153, 1167239, 1147711, 1151850, 1157592, 1157593, 1165122, 1140333,\n", - " 1153428, 1166535, 1169083, 1170874, 1179555, 1150234, 1154148, 1167520,\n", - " 1169814, 1143420, 1179243, 1153803, 1153141, 1172814, 1179721, 1144910,\n", - " 1151519, 1161255, 1155262, 1171773, 1154707, 1154718, 1157798, 1157795,\n", - " 1177277, 1182812, 1171623, 1155799, 1155806, 1157992, 1153898, 1182454,\n", - " 1154497, 1154508, 1134650, 1145626, 1156432, 1178757, 1149753, 1149755,\n", - " 1146242, 1153601, 1157760, 1160117, 1184144, 1181143, 1158771, 1158380,\n", - " 1158371, 1155899, 1157270, 1188460, 1184317, 1186712, 1162253, 1164231,\n", - " 1182337, 1190156, 1193376, 1164262, 1170802, 1156161, 1168943, 1172174,\n", - " 1156539, 1170826, 1170828, 1139828, 1139831, 1150265, 1149668, 1156055,\n", - " 1149539, 1177483, 1187210, 1170881, 1181283, 1189972, 1186028, 1151774,\n", - " 1171243, 1153733, 1181692, 1172339, 1162502, 1169707, 1171201, 1177842,\n", - " 1172429, 1172122, 1171953, 1182828, 1181621, 1166789, 1155962, 1162661,\n", - " 1192793, 1186393, 1194151, 1191142, 1189800, 1169398, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1141424, 1141435, 1140284, 1135933, 1135726, 1140799, 1141758,\n", - " 1136208, 1139462, 1136969, 1146803, 1138059, 1143615, 1137947, 1137271,\n", - " 1143362, 1143372, 1139241, 1146647, 1139610, 1139613, 1139615, 1139958,\n", - " 1150509, 1142963, 1136950, 1149216, 1155689, 1147473, 1147476, 1147483,\n", - " 1149037, 1146995, 1146996, 1153012, 1148345, 1150200, 1136125, 1152667,\n", - " 1152669, 1153217, 1136742, 1147095, 1155014, 1155018, 1155019, 1147211,\n", - " 1136685, 1152427, 1134662, 1140304, 1151546, 1140540, 1137172, 1151520,\n", - " 1134735, 1140029, 1140947, 1140953, 1135367, 1135202, 1135204, 1137798,\n", - " 1136034, 1141036, 1134794, 1157443, 1137329, 1136185, 1143069, 1157102,\n", - " 1157103, 1137693, 1136609, 1136619, 1135340, 1135342, 1144395, 1157393,\n", - " 1136662, 1137441, 1137449, 1156159, 1141702, 1135579, 1135583, 1142596,\n", - " 1142607, 1136097, 1138514, 1138524, 1153098, 1138580, 1156967, 1154132,\n", - " 1154141, 1139685, 1138440, 1136541, 1138461, 1160579, 1137922, 1136594,\n", - " 1149328, 1149333, 1156606, 1147112, 1147118, 1142611, 1135359, 1138177,\n", - " 1138185, 1158984, 1148531, 1137109, 1139667, 1139673, 1138070, 1136085,\n", - " 1134992, 1142439, 1135781, 1136734, 1158961, 1158974, 1144410, 1153543,\n", - " 1140034, 1139085, 1138148, 1141963, 1141966, 1155660, 1141992, 1141985,\n", - " 1152042, 1152044, 1136054, 1137734, 1137728, 1146222, 1134750, 1135540,\n", - " 1135551, 1135549, 1136697, 1140228, 1137895, 1141088, 1141095, 1149001,\n", - " 1145347, 1141975, 1143711, 1137670, 1139033, 1135861, 1135865, 1136426,\n", - " 1141224, 1141226, 1141891, 1139386, 1136917, 1143673, 1144237, 1139495,\n", - " 1134979, 1147850, 1149435, 1144428, 1141816, 1145161, 1143202, 1140173,\n", - " 1158749, 1149108, 1137070, 1140110, 1142913, 1144596, 1136867, 1140892,\n", - " 1135327, 1144182, 1137604, 1150906, 1161701, 1147153, 1142646, 1149186,\n", - " 1141365, 1151112, 1141664, 1149097, 1138292, 1144279, 1153556, 1139508,\n", - " 1139510, 1138815, 1145001, 1140977, 1140990, 1147050, 1147047, 1145873,\n", - " 1152976, 1152980, 1152988, 1152991, 1139007, 1141925, 1144242, 1140585,\n", - " 1150255, 1140690, 1143637, 1137571, 1134856, 1145983, 1143851, 1136275,\n", - " 1146024, 1146134, 1141585, 1149928, 1149930, 1139990, 1143293, 1151123,\n", - " 1147543, 1147282, 1142817, 1142829, 1142816, 1164371, 1149159, 1149160,\n", - " 1149161, 1142628, 1142637, 1146094, 1149608, 1136836, 1139329, 1144779,\n", - " 1142149, 1145429, 1144754, 1144765, 1144753, 1144611, 1145816, 1137098,\n", - " 1139979, 1135876, 1144316, 1135813, 1150294, 1146514, 1146516, 1146523,\n", - " 1146526, 1138024, 1143456, 1143457, 1144291, 1144303, 1140364, 1149574,\n", - " 1137985, 1137994, 1143081, 1166410, 1148966, 1144725, 1144213, 1147984,\n", - " 1147995, 1147999, 1134899, 1139252, 1147131, 1148704, 1141327, 1141836,\n", - " 1146749, 1153701, 1152328, 1143434, 1147070, 1149714, 1147025, 1147253,\n", - " 1147249, 1147970, 1147873, 1147882, 1154526, 1145240, 1145245, 1145750,\n", - " 1145751, 1151239, 1151242, 1152538, 1150280, 1150445, 1149258, 1148928,\n", - " 1156468, 1146887, 1152013, 1147794, 1151482, 1139914, 1140566, 1149530,\n", - " 1147009, 1135806, 1158944, 1141949, 1141278, 1144821, 1151795, 1154976,\n", - " 1154982, 1147653, 1149412, 1146412, 1148288, 1148294, 1148302, 1137724,\n", - " 1151412, 1158786, 1158798, 1152561, 1136251, 1146676, 1157973, 1157983,\n", - " 1148720, 1148724, 1148725, 1148729, 1145862, 1171341, 1143901, 1148204,\n", - " 1153182, 1153186, 1153188, 1153197, 1152974, 1150935, 1148058, 1152877,\n", - " 1144860, 1155088, 1141017, 1147446, 1147447, 1147442, 1151821, 1152581,\n", - " 1152586, 1151906, 1151913, 1154183, 1154190, 1148498, 1151351, 1155152,\n", - " 1146975, 1146623, 1151691, 1146490, 1135688, 1152415, 1146280, 1150085,\n", - " 1145539, 1137746, 1146307, 1146304, 1152622, 1140521, 1151967, 1155337,\n", - " 1155334, 1154120, 1154123, 1157826, 1157835, 1157839, 1152673, 1151580,\n", - " 1151617, 1150588, 1150591, 1136131, 1136134, 1136788, 1152950, 1140935,\n", - " 1145952, 1152898, 1152903, 1152341, 1158422, 1153311, 1145576, 1138275,\n", - " 1138279, 1152296, 1136028, 1136031, 1136016, 1158704, 1140684, 1151064,\n", - " 1154733, 1142777, 1156422, 1149272, 1149273, 1144023, 1148033, 1148040,\n", - " 1154453, 1154457, 1137048, 1148628, 1158530, 1137458, 1148242, 1135698,\n", - " 1153075, 1142041, 1154381, 1157225, 1157229, 1158860, 1157064, 1152833,\n", - " 1145191, 1143502, 1150465, 1150475, 1146854, 1135219, 1135231, 1135740,\n", - " 1151788, 1135644, 1158306, 1158308, 1158311, 1155441, 1161728, 1150129,\n", - " 1150130, 1150132, 1150136, 1138569, 1154529, 1154528, 1145603, 1142755,\n", - " 1142764, 1142758, 1156207, 1156271, 1151379, 1140186, 1155122, 1149321,\n", - " 1155748, 1155758, 1156463, 1158096, 1168230, 1155675, 1155628, 1156563,\n", - " 1156566, 1155572, 1136466, 1158824, 1153721, 1158330, 1157000, 1148835,\n", - " 1153367, 1161391, 1154648, 1154241, 1154080, 1156714, 1137359, 1154911,\n", - " 1143189, 1157439, 1157430, 1150068, 1150069, 1143517, 1157282, 1137152,\n", - " 1158585, 1153786, 1159116, 1145693, 1145690, 1145681, 1134677, 1135601,\n", - " 1135605, 1148148, 1148149, 1158502, 1158665, 1157684, 1149145, 1152213,\n", - " 1140380, 1140374, 1155872, 1157033, 1142466, 1155975, 1156957, 1153765,\n", - " 1142076, 1158834, 1158841, 1156811, 1162534, 1155393, 1160163, 1153503,\n", - " 1136896, 1140213, 1158803, 1156778, 1158284, 1136480, 1136494, 1136491,\n", - " 1153632, 1156663, 1156665, 1147586, 1156490, 1153808, 1157678, 1136646,\n", - " 1179181, 1158558, 1165778, 1138101, 1155871, 1161539, 1183449, 1163456,\n", - " 1164276, 1142666, 1157751, 1167359, 1159057, 1167589, 1142427, 1157944,\n", - " 1157946, 1162039, 1153052, 1153042, 1153045, 1155763, 1155772, 1163707,\n", - " 1156098, 1138393, 1162917, 1160646, 1150046, 1159475, 1149063, 1145948,\n", - " 1155476, 1153519, 1161652, 1164006, 1165386, 1149956, 1149966, 1139290,\n", - " 1159999, 1148771, 1146063, 1146356, 1160181, 1184916, 1165308, 1158878,\n", - " 1158876, 1170415, 1140641, 1140643, 1141864, 1148600, 1159646, 1155810,\n", - " 1185124, 1141800, 1159025, 1159037, 1166281, 1169109, 1152247, 1186660,\n", - " 1160605, 1155588, 1165993, 1138674, 1148560, 1148569, 1144989, 1149016,\n", - " 1146500, 1153239, 1164580, 1161240, 1144739, 1144747, 1144750, 1152776,\n", - " 1155044, 1141468, 1141471, 1141459, 1151651, 1147426, 1147427, 1157047,\n", - " 1156737, 1156739, 1165182, 1153663, 1171040, 1150315, 1144812, 1140112,\n", - " 1192121, 1135567, 1165716, 1142722, 1156293, 1156289, 1165644, 1145743,\n", - " 1145738, 1145228, 1155320, 1171687, 1144972, 1144973, 1152624, 1152630,\n", - " 1139351, 1147714, 1153520, 1153534, 1158724, 1154076, 1147339, 1144681,\n", - " 1166653, 1169300, 1169304, 1155172, 1150515, 1150518, 1154618, 1144346,\n", - " 1144336, 1157534, 1138372, 1138375, 1147750, 1154670, 1154885, 1157331,\n", - " 1138130, 1141051, 1141043, 1151668, 1169359, 1149452, 1158623, 1172875,\n", - " 1147416, 1152353, 1170284, 1172782, 1168400, 1155931, 1149402, 1173307,\n", - " 1183927, 1154027, 1152151, 1180341, 1167857, 1151201, 1151697, 1157158,\n", - " 1157153, 1167239, 1147711, 1151850, 1157592, 1157593, 1165122, 1140333,\n", - " 1153428, 1166535, 1169083, 1170874, 1179555, 1150234, 1154148, 1167520,\n", - " 1169814, 1143420, 1179243, 1153803, 1153141, 1172814, 1179721, 1144910,\n", - " 1151519, 1161255, 1155262, 1171773, 1154707, 1154718, 1157798, 1157795,\n", - " 1177277, 1182812, 1171623, 1155799, 1155806, 1157992, 1153898, 1182454,\n", - " 1154497, 1154508, 1134650, 1145626, 1156432, 1178757, 1149753, 1149755,\n", - " 1146242, 1153601, 1157760, 1160117, 1184144, 1181143, 1158771, 1158380,\n", - " 1158371, 1155899, 1157270, 1188460, 1184317, 1186712, 1162253, 1164231,\n", - " 1182337, 1190156, 1193376, 1164262, 1170802, 1156161, 1168943, 1172174,\n", - " 1156539, 1170826, 1170828, 1139828, 1139831, 1150265, 1149668, 1156055,\n", - " 1149539, 1177483, 1187210, 1170881, 1181283, 1189972, 1186028, 1151774,\n", - " 1171243, 1153733, 1181692, 1172339, 1162502, 1169707, 1171201, 1177842,\n", - " 1172429, 1172122, 1171953, 1182828, 1181621, 1166789, 1155962, 1162661,\n", - " 1192793, 1186393, 1194151, 1191142, 1189800, 1169398, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195452, 1197175, 1199439, 1197719, 1199282, 1202255, 1196337, 1201577,\n", - " 1201582, 1199264, 1200644, 1199259, 1201016, 1202804, 1194864, 1194745,\n", - " 1199053, 1196624, 1195514, 1195263, 1196539, 1201992, 1195190, 1197697,\n", - " 1195828, 1195459, 1194882, 1195895, 1195740, 1197856, 1196977, 1199361,\n", - " 1195320, 1195325, 1195121, 1198958, 1198163, 1196716, 1199823, 1195148,\n", - " 1195265, 1195267, 1195279, 1197141, 1194830, 1195659, 1195541, 1196122,\n", - " 1199699, 1196283, 1195353, 1197316, 1198280, 1198282, 1200949, 1200959,\n", - " 1199856, 1199685, 1200872, 1199231, 1201908, 1195018, 1199676, 1194786,\n", - " 1199949, 1201511, 1200668, 1197970, 1197601, 1196727, 1195773, 1198428,\n", - " 1199410, 1199418, 1198811, 1201547, 1201169, 1198066, 1198593, 1201156,\n", - " 1202630, 1202635, 1200913, 1200918, 1199546, 1202641, 1199712, 1201041,\n", - " 1201737, 1200526, 1200315, 1203071, 1197097, 1202055, 1199887, 1199099,\n", - " 1199908, 1202239, 1202338, 1201291, 1198478, 1201871, 1202889, 1201796,\n", - " 1200784, 1195679, 1195379, 1197816, 1196414, 1198967, 1201143, 1198148,\n", - " 1197735, 1199782, 1198819, 1200707, 1197335, 1197343, 1195165, 1203162,\n", - " 1196428], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195452, 1197175, 1199439, 1197719, 1199282, 1202255, 1196337, 1201577,\n", - " 1201582, 1199264, 1200644, 1199259, 1201016, 1202804, 1194864, 1194745,\n", - " 1199053, 1196624, 1195514, 1195263, 1196539, 1201992, 1195190, 1197697,\n", - " 1195828, 1195459, 1194882, 1195895, 1195740, 1197856, 1196977, 1199361,\n", - " 1195320, 1195325, 1195121, 1198958, 1198163, 1196716, 1199823, 1195148,\n", - " 1195265, 1195267, 1195279, 1197141, 1194830, 1195659, 1195541, 1196122,\n", - " 1199699, 1196283, 1195353, 1197316, 1198280, 1198282, 1200949, 1200959,\n", - " 1199856, 1199685, 1200872, 1199231, 1201908, 1195018, 1199676, 1194786,\n", - " 1199949, 1201511, 1200668, 1197970, 1197601, 1196727, 1195773, 1198428,\n", - " 1199410, 1199418, 1198811, 1201547, 1201169, 1198066, 1198593, 1201156,\n", - " 1202630, 1202635, 1200913, 1200918, 1199546, 1202641, 1199712, 1201041,\n", - " 1201737, 1200526, 1200315, 1203071, 1197097, 1202055, 1199887, 1199099,\n", - " 1199908, 1202239, 1202338, 1201291, 1198478, 1201871, 1202889, 1201796,\n", - " 1200784, 1195679, 1195379, 1197816, 1196414, 1198967, 1201143, 1198148,\n", - " 1197735, 1199782, 1198819, 1200707, 1197335, 1197343, 1195165, 1203162,\n", - " 1196428], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 5.0862e-02, -4.6986e-04, 3.5768e-01, ..., 4.7521e-02,\n", - " -9.9710e-04, -2.8460e-03],\n", - " [ 4.0783e-02, -3.8207e-04, 3.7358e-01, ..., 6.1623e-02,\n", - " -7.0280e-04, -2.9549e-03],\n", - " [ 8.5673e-02, -7.1514e-04, 4.7133e-01, ..., 1.1165e-02,\n", - " -8.1525e-04, -3.6689e-03],\n", - " ...,\n", - " [ 5.0424e-02, -3.3973e-04, 3.5035e-01, ..., 4.4888e-02,\n", - " -9.2635e-04, -2.7544e-03],\n", - " [ 2.0199e-02, -7.5688e-04, 4.3619e-01, ..., 3.9643e-02,\n", - " -9.2760e-04, -2.9035e-03],\n", - " [ 8.5991e-02, -6.7618e-04, 4.6963e-01, ..., 1.1108e-02,\n", - " -8.6400e-04, -3.6659e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 2.7657, -0.0424, 0.9949, ..., -0.0169, -0.0255, 3.4087],\n", - " [ 4.6868, -0.0802, 1.7049, ..., -0.0358, -0.0357, 3.8847],\n", - " [ 4.4140, -0.0728, 1.7348, ..., -0.0348, -0.0395, 3.8641],\n", - " ...,\n", - " [ 3.7054, -0.0526, 1.9648, ..., -0.0271, -0.0326, 3.6837],\n", - " [ 2.3469, -0.0342, 0.8676, ..., -0.0157, -0.0198, 2.4281],\n", - " [ 2.8908, -0.0379, 1.2349, ..., -0.0128, -0.0277, 4.0770]],\n", - " device='cuda:0', grad_fn=), 'author': tensor([[ 3.4465e-01, -1.8814e-03, -2.6780e-04, ..., 2.1621e-01,\n", - " -8.5516e-04, 1.3117e-01],\n", - " [ 4.0086e-01, -2.8989e-03, -9.6691e-04, ..., 2.5633e-01,\n", - " 7.0916e-02, 2.5887e-01],\n", - " [ 4.2983e-01, -2.8658e-03, -9.7331e-04, ..., 2.1933e-01,\n", - " 1.3198e-01, 2.5076e-01],\n", - " ...,\n", - " [ 4.3379e-01, -5.6626e-04, -9.1054e-04, ..., 2.5683e-01,\n", - " -1.4935e-03, 2.4990e-01],\n", - " [ 4.9602e-01, -1.5961e-03, -3.5838e-04, ..., 2.0342e-01,\n", - " -4.8141e-04, 2.1011e-01],\n", - " [ 4.3532e-01, -3.0681e-03, -1.1507e-03, ..., 2.6950e-01,\n", - " 1.9691e-01, 3.8935e-01]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-5.8628e-03, 1.5290e-01, 8.1887e-02, ..., 1.8965e-01,\n", - " -2.3748e-03, -2.5891e-03],\n", - " [-5.7656e-03, 1.5479e-01, -5.5383e-04, ..., 4.0940e-01,\n", - " -1.2218e-03, -4.1854e-03],\n", - " [-7.1748e-03, 3.4785e-01, -5.9103e-04, ..., 6.6684e-01,\n", - " -5.6793e-04, -5.0437e-03],\n", - " ...,\n", - " [-8.0530e-03, 4.6345e-01, -5.6410e-04, ..., 7.3258e-01,\n", - " -2.2968e-03, -6.9830e-03],\n", - " [-6.5888e-03, 1.4312e-01, -1.0200e-03, ..., 4.9242e-01,\n", - " -3.0387e-03, -4.8603e-03],\n", - " [-8.4281e-03, 2.9007e-01, -2.4269e-03, ..., 7.7723e-01,\n", - " -1.9652e-03, -6.9540e-03]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 109, 109, 62, 70, 70, 426, 465, 283, 344, 344, 344, 344,\n", - " 251, 793, 513, 513, 497, 497, 803, 803, 535, 535, 636, 850,\n", - " 701, 871, 966, 1110, 1080, 1083, 1266, 1297, 1297, 1443, 1180, 1274,\n", - " 1247, 1297, 1297, 1297, 1159, 1381, 1509, 1325, 1261, 1638, 1638, 1336,\n", - " 1610, 1610, 1582, 1582, 1582, 1582, 1767, 1617, 1445, 1813, 1674, 1649,\n", - " 1649, 1649, 1664, 1901, 1824, 1824, 1814, 1814, 2061, 1982, 2043, 2043,\n", - " 2058, 2074, 2081, 2152, 2152, 2058, 2248, 2314, 2238, 2264, 2292, 2292,\n", - " 2292, 2292, 2329, 2324, 2456, 2456, 2373, 2440, 2631, 2631, 2631, 2540,\n", - " 2988, 2659, 3102, 2896, 2864, 3073, 2817, 3090, 2974, 2974, 2716, 2876,\n", - " 3070, 3068, 3036, 3276, 3276, 3083, 3083, 3195, 3292, 3361, 3623, 3623,\n", - " 3311, 3311, 3623, 3733, 3537, 3553, 3895, 3872, 3834, 3834, 4041, 4063,\n", - " 4105, 4112, 4077, 4180, 4118, 4171, 4232, 4232, 4284, 4214, 4362, 4425,\n", - " 4527, 4527, 4527, 4485, 4485, 4485, 4461, 4461, 4425, 4425, 4712, 4955,\n", - " 4663, 4900, 4900, 4801, 4801, 4871, 4795, 4795, 4983, 5131, 5131, 4880,\n", - " 5046, 5106, 5355, 5084, 5401, 5516, 5516, 5516, 5516, 5398, 5521, 6142,\n", - " 6142, 6142, 6175, 6037, 6037, 5914, 5914, 6110, 6138, 6138, 6115, 6115,\n", - " 6140, 6167, 6167, 6167],\n", - " [ 59, 68, 112, 13, 40, 118, 55, 58, 110, 99, 86, 21,\n", - " 69, 74, 26, 64, 22, 11, 65, 88, 24, 61, 106, 18,\n", - " 81, 91, 119, 21, 92, 12, 71, 16, 12, 42, 120, 50,\n", - " 50, 99, 21, 7, 78, 53, 114, 47, 84, 74, 17, 1,\n", - " 73, 69, 34, 75, 87, 94, 56, 27, 75, 36, 118, 52,\n", - " 97, 4, 19, 18, 21, 107, 38, 100, 19, 11, 19, 29,\n", - " 50, 77, 81, 60, 115, 83, 103, 101, 4, 109, 92, 35,\n", - " 31, 82, 4, 19, 37, 61, 19, 62, 43, 22, 11, 17,\n", - " 109, 95, 19, 76, 81, 57, 0, 50, 118, 6, 61, 19,\n", - " 3, 19, 29, 96, 98, 44, 36, 51, 59, 102, 27, 49,\n", - " 68, 70, 64, 46, 11, 40, 79, 80, 7, 10, 45, 0,\n", - " 19, 44, 114, 90, 70, 8, 23, 28, 47, 52, 15, 104,\n", - " 4, 65, 96, 68, 59, 117, 74, 93, 36, 25, 71, 66,\n", - " 9, 96, 26, 21, 33, 54, 101, 4, 2, 96, 85, 39,\n", - " 109, 69, 116, 14, 32, 63, 28, 27, 21, 67, 48, 72,\n", - " 4, 12, 40, 71, 20, 98, 4, 113, 111, 4, 30, 89,\n", - " 5, 105, 108, 41]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1842, 3326, 4154, ..., 7172, 3326, 2991],\n", - " [ 27, 116, 86, ..., 7710, 7730, 7588]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 17, 96, 96, ..., 36, 40, 87],\n", - " [ 118, 91, 83, ..., 6101, 6123, 6222]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 84, 84, 84, ..., 7582, 7573, 7664],\n", - " [ 127, 719, 43, ..., 106, 285, 533]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 232, 638, 285, ..., 551, 751, 66],\n", - " [ 102, 26, 111, ..., 7729, 7682, 7680]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[6056, 2849, 6979, ..., 6273, 6752, 7448],\n", - " [ 176, 148, 33, ..., 6167, 6133, 6178]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 84, 84, 84, ..., 7582, 7582, 7647],\n", - " [ 655, 827, 981, ..., 6712, 6354, 6673]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 8, 8, 109, ..., 6167, 6167, 6167],\n", - " [1424, 1965, 4967, ..., 5653, 6273, 5976]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006508\n", - "sampling 0.006351\n", - "noi time: 0.002047\n", - "get_vertex_data call: 0.037779\n", - "noi group time: 0.003535\n", - "eoi_group_time: 0.015003\n", - "second half: 0.218709\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 36710, 31149, 21464, ..., 1121585, 1100733, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 36710, 31149, 21464, ..., 1121585, 1100733, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210557, 1210580, 1230573, ..., 1935110, 1931106, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210557, 1210580, 1230573, ..., 1935110, 1931106, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1136225, 1136228, 1135719, 1135723, 1135721, 1141758, 1134954,\n", - " 1138335, 1136965, 1146803, 1143600, 1137937, 1137274, 1138942, 1143362,\n", - " 1143372, 1139244, 1146640, 1146641, 1139615, 1139958, 1140781, 1150497,\n", - " 1150509, 1148582, 1149216, 1142958, 1155689, 1149634, 1147483, 1135992,\n", - " 1144636, 1153012, 1153022, 1148343, 1148345, 1150200, 1135476, 1152667,\n", - " 1148546, 1153217, 1153220, 1153231, 1153221, 1155018, 1147211, 1136683,\n", - " 1134715, 1134806, 1151545, 1140537, 1140540, 1140530, 1138112, 1154407,\n", - " 1154414, 1137254, 1138353, 1151531, 1140020, 1140953, 1135367, 1135202,\n", - " 1141036, 1136770, 1136775, 1134794, 1157443, 1135956, 1136517, 1138504,\n", - " 1157088, 1137693, 1144387, 1137529, 1135408, 1157398, 1157393, 1152376,\n", - " 1152378, 1152383, 1136581, 1136662, 1137441, 1156159, 1148481, 1148484,\n", - " 1134841, 1141696, 1135983, 1135576, 1135579, 1135583, 1141081, 1136097,\n", - " 1148859, 1135670, 1153099, 1153100, 1137953, 1154132, 1145132, 1145135,\n", - " 1156899, 1135522, 1139685, 1137287, 1138440, 1138445, 1138461, 1138462,\n", - " 1137924, 1149328, 1138843, 1138694, 1156606, 1147112, 1142616, 1135346,\n", - " 1135359, 1135355, 1156141, 1138185, 1145843, 1148531, 1150949, 1137109,\n", - " 1139849, 1139855, 1139667, 1139673, 1138067, 1138070, 1138069, 1140261,\n", - " 1134992, 1142439, 1140199, 1158974, 1159009, 1141058, 1144410, 1143626,\n", - " 1143631, 1140034, 1136065, 1139933, 1137598, 1138648, 1138148, 1138150,\n", - " 1141962, 1153401, 1146064, 1146075, 1140557, 1152044, 1142301, 1142302,\n", - " 1137734, 1137728, 1134922, 1146215, 1138246, 1135540, 1135549, 1140228,\n", - " 1141088, 1141098, 1141102, 1149001, 1139898, 1145347, 1145358, 1141980,\n", - " 1143767, 1137298, 1143225, 1159676, 1141681, 1141690, 1142342, 1135860,\n", - " 1136417, 1136625, 1161173, 1140469, 1141224, 1136917, 1143677, 1143676,\n", - " 1137186, 1144237, 1140592, 1140597, 1141786, 1138786, 1139495, 1144940,\n", - " 1136752, 1141609, 1162790, 1165291, 1137087, 1137074, 1141821, 1140173,\n", - " 1140175, 1158749, 1137764, 1148872, 1137062, 1138708, 1142913, 1142451,\n", - " 1140885, 1144182, 1150904, 1150906, 1161092, 1144865, 1136565, 1138537,\n", - " 1147153, 1149189, 1149193, 1149197, 1162804, 1141365, 1141367, 1153069,\n", - " 1151109, 1138292, 1144284, 1144279, 1153556, 1143907, 1143906, 1139510,\n", - " 1139763, 1140990, 1146693, 1146695, 1141561, 1147050, 1145873, 1149887,\n", - " 1152976, 1152980, 1141932, 1146904, 1144247, 1144250, 1144242, 1140585,\n", - " 1141846, 1150241, 1140696, 1137571, 1134850, 1145980, 1145983, 1145974,\n", - " 1144073, 1142102, 1146024, 1138084, 1141646, 1149928, 1141235, 1139990,\n", - " 1143294, 1147543, 1147540, 1147282, 1142829, 1142816, 1136330, 1139417,\n", - " 1143049, 1143040, 1136160, 1157717, 1157720, 1136836, 1139301, 1139048,\n", - " 1142149, 1142159, 1143345, 1144765, 1144753, 1144619, 1140846, 1135874,\n", - " 1135883, 1150294, 1150919, 1146514, 1146523, 1138024, 1143457, 1144303,\n", - " 1144562, 1144564, 1142001, 1135451, 1135454, 1140827, 1146590, 1147521,\n", - " 1140364, 1143080, 1149489, 1148962, 1148966, 1144725, 1144219, 1147984,\n", - " 1147988, 1147999, 1134902, 1139252, 1147131, 1148704, 1150997, 1141836,\n", - " 1146742, 1148473, 1153701, 1152327, 1152328, 1152335, 1147025, 1147031,\n", - " 1141124, 1145018, 1139549, 1158226, 1154526, 1145240, 1145751, 1146178,\n", - " 1151242, 1152530, 1152538, 1150280, 1150437, 1150445, 1147962, 1144526,\n", - " 1151994, 1154822, 1151480, 1151482, 1152031, 1154271, 1139919, 1146723,\n", - " 1158950, 1158955, 1141941, 1141949, 1150736, 1151795, 1148740, 1154985,\n", - " 1149412, 1148288, 1148623, 1154420, 1158786, 1151363, 1151361, 1151365,\n", - " 1146682, 1152436, 1157976, 1148720, 1149821, 1149812, 1143971, 1148203,\n", - " 1148204, 1148098, 1153124, 1153186, 1153192, 1153188, 1148056, 1150352,\n", - " 1155089, 1147442, 1151821, 1152581, 1135307, 1154190, 1148498, 1141420,\n", - " 1141423, 1147737, 1145080, 1148947, 1146975, 1146623, 1151694, 1154052,\n", - " 1150794, 1152097, 1152098, 1152100, 1156325, 1156334, 1153036, 1153038,\n", - " 1150094, 1137746, 1152622, 1149203, 1151967, 1157842, 1157835, 1154638,\n", - " 1150578, 1145277, 1136132, 1136789, 1148913, 1144533, 1140935, 1152227,\n", - " 1138978, 1152903, 1151311, 1152341, 1146830, 1156823, 1156816, 1153310,\n", - " 1153311, 1138283, 1138281, 1136028, 1158704, 1151195, 1162200, 1152928,\n", - " 1151071, 1156399, 1163941, 1142777, 1156422, 1166848, 1150164, 1148040,\n", - " 1152602, 1167408, 1145656, 1137048, 1158477, 1148628, 1158530, 1148382,\n", - " 1137458, 1149947, 1155376, 1153085, 1154377, 1156720, 1157225, 1157228,\n", - " 1157229, 1135434, 1143448, 1157547, 1148884, 1154929, 1156505, 1157064,\n", - " 1157069, 1155412, 1155418, 1152841, 1152833, 1150465, 1150475, 1135231,\n", - " 1135730, 1152182, 1151788, 1152737, 1153413, 1158304, 1158308, 1158311,\n", - " 1151340, 1155441, 1150136, 1162117, 1144361, 1138573, 1142764, 1156271,\n", - " 1157637, 1151379, 1158628, 1155375, 1155122, 1155123, 1152527, 1157172,\n", - " 1149323, 1149505, 1156563, 1154547, 1155573, 1158566, 1158823, 1158824,\n", - " 1158331, 1156993, 1148835, 1153365, 1160958, 1143263, 1154642, 1154648,\n", - " 1146937, 1154243, 1151893, 1153326, 1157439, 1145716, 1150987, 1143517,\n", - " 1157928, 1157934, 1158123, 1158578, 1158996, 1154014, 1134674, 1134682,\n", - " 1135601, 1135614, 1148149, 1150661, 1150671, 1157685, 1155724, 1144463,\n", - " 1152209, 1152496, 1152502, 1140380, 1157031, 1144843, 1155971, 1155975,\n", - " 1158846, 1155404, 1159777, 1161375, 1166122, 1153503, 1136899, 1136896,\n", - " 1159164, 1158815, 1158447, 1156778, 1151615, 1136480, 1136491, 1156490,\n", - " 1153808, 1157668, 1136640, 1136646, 1140049, 1166424, 1166421, 1158545,\n", - " 1158558, 1151145, 1161161, 1138110, 1155521, 1161539, 1142492, 1142663,\n", - " 1142666, 1157747, 1157751, 1144270, 1159058, 1159071, 1151074, 1142416,\n", - " 1158295, 1157945, 1160563, 1162044, 1153052, 1153045, 1162842, 1155763,\n", - " 1156369, 1166256, 1156100, 1156107, 1142674, 1150046, 1149063, 1155479,\n", - " 1153519, 1147308, 1138161, 1164006, 1165385, 1149963, 1139782, 1163391,\n", - " 1154590, 1158461, 1160702, 1164048, 1158878, 1140643, 1148603, 1172731,\n", - " 1143139, 1143143, 1151877, 1155810, 1159025, 1159026, 1159029, 1159032,\n", - " 1168134, 1165604, 1152244, 1152247, 1155588, 1153921, 1168426, 1148560,\n", - " 1158405, 1144977, 1144989, 1149011, 1146500, 1146509, 1153236, 1153239,\n", - " 1164580, 1169261, 1163525, 1165415, 1161723, 1141471, 1141459, 1147426,\n", - " 1157044, 1156739, 1157955, 1166591, 1150646, 1150651, 1150649, 1171040,\n", - " 1144810, 1144812, 1167253, 1168850, 1142733, 1156292, 1156300, 1156303,\n", - " 1144055, 1166917, 1148683, 1145563, 1155320, 1147673, 1150531, 1163518,\n", - " 1144973, 1148175, 1147355, 1148124, 1147723, 1145889, 1145900, 1145902,\n", - " 1168659, 1171571, 1181052, 1143393, 1167136, 1158722, 1158734, 1171270,\n", - " 1164395, 1154070, 1154076, 1168756, 1145674, 1151598, 1167817, 1169216,\n", - " 1150515, 1156119, 1145523, 1144346, 1144336, 1157534, 1138378, 1147746,\n", - " 1154667, 1154670, 1169154, 1169162, 1157331, 1157329, 1169359, 1154353,\n", - " 1149452, 1149446, 1147491, 1138609, 1158623, 1158060, 1158062, 1149847,\n", - " 1157380, 1170542, 1152353, 1143858, 1155927, 1188547, 1148330, 1177426,\n", - " 1168470, 1173307, 1154027, 1153751, 1153754, 1183546, 1157158, 1157153,\n", - " 1157373, 1167239, 1147711, 1148131, 1148139, 1147925, 1157593, 1177415,\n", - " 1172961, 1162855, 1155739, 1171881, 1168817, 1167896, 1166016, 1172606,\n", - " 1144550, 1153429, 1159100, 1177683, 1170874, 1170922, 1150234, 1183573,\n", - " 1154148, 1167520, 1149173, 1169821, 1143279, 1169772, 1167658, 1185666,\n", - " 1143420, 1170176, 1170177, 1169631, 1153803, 1178171, 1184699, 1179714,\n", - " 1174897, 1158030, 1161255, 1155260, 1155262, 1154718, 1157795, 1164043,\n", - " 1171738, 1179540, 1153898, 1191749, 1145626, 1156433, 1180371, 1182266,\n", - " 1149744, 1149753, 1152273, 1155990, 1158370, 1158374, 1155899, 1177090,\n", - " 1183645, 1140397, 1168273, 1188934, 1168621, 1193128, 1164231, 1181548,\n", - " 1163422, 1188525, 1147179, 1147172, 1168930, 1168943, 1163621, 1139831,\n", - " 1150262, 1150268, 1167135, 1194517, 1156055, 1190269, 1146394, 1146399,\n", - " 1146395, 1173065, 1173058, 1172371, 1149547, 1191511, 1191023, 1182550,\n", - " 1168683, 1140992, 1141006, 1188781, 1162156, 1170890, 1151774, 1182226,\n", - " 1177850, 1145395, 1178135, 1187491, 1183147, 1191449, 1155959, 1155962,\n", - " 1180278, 1185269, 1191033, 1172896, 1177539, 1189948], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1136225, 1136228, 1135719, 1135723, 1135721, 1141758, 1134954,\n", - " 1138335, 1136965, 1146803, 1143600, 1137937, 1137274, 1138942, 1143362,\n", - " 1143372, 1139244, 1146640, 1146641, 1139615, 1139958, 1140781, 1150497,\n", - " 1150509, 1148582, 1149216, 1142958, 1155689, 1149634, 1147483, 1135992,\n", - " 1144636, 1153012, 1153022, 1148343, 1148345, 1150200, 1135476, 1152667,\n", - " 1148546, 1153217, 1153220, 1153231, 1153221, 1155018, 1147211, 1136683,\n", - " 1134715, 1134806, 1151545, 1140537, 1140540, 1140530, 1138112, 1154407,\n", - " 1154414, 1137254, 1138353, 1151531, 1140020, 1140953, 1135367, 1135202,\n", - " 1141036, 1136770, 1136775, 1134794, 1157443, 1135956, 1136517, 1138504,\n", - " 1157088, 1137693, 1144387, 1137529, 1135408, 1157398, 1157393, 1152376,\n", - " 1152378, 1152383, 1136581, 1136662, 1137441, 1156159, 1148481, 1148484,\n", - " 1134841, 1141696, 1135983, 1135576, 1135579, 1135583, 1141081, 1136097,\n", - " 1148859, 1135670, 1153099, 1153100, 1137953, 1154132, 1145132, 1145135,\n", - " 1156899, 1135522, 1139685, 1137287, 1138440, 1138445, 1138461, 1138462,\n", - " 1137924, 1149328, 1138843, 1138694, 1156606, 1147112, 1142616, 1135346,\n", - " 1135359, 1135355, 1156141, 1138185, 1145843, 1148531, 1150949, 1137109,\n", - " 1139849, 1139855, 1139667, 1139673, 1138067, 1138070, 1138069, 1140261,\n", - " 1134992, 1142439, 1140199, 1158974, 1159009, 1141058, 1144410, 1143626,\n", - " 1143631, 1140034, 1136065, 1139933, 1137598, 1138648, 1138148, 1138150,\n", - " 1141962, 1153401, 1146064, 1146075, 1140557, 1152044, 1142301, 1142302,\n", - " 1137734, 1137728, 1134922, 1146215, 1138246, 1135540, 1135549, 1140228,\n", - " 1141088, 1141098, 1141102, 1149001, 1139898, 1145347, 1145358, 1141980,\n", - " 1143767, 1137298, 1143225, 1159676, 1141681, 1141690, 1142342, 1135860,\n", - " 1136417, 1136625, 1161173, 1140469, 1141224, 1136917, 1143677, 1143676,\n", - " 1137186, 1144237, 1140592, 1140597, 1141786, 1138786, 1139495, 1144940,\n", - " 1136752, 1141609, 1162790, 1165291, 1137087, 1137074, 1141821, 1140173,\n", - " 1140175, 1158749, 1137764, 1148872, 1137062, 1138708, 1142913, 1142451,\n", - " 1140885, 1144182, 1150904, 1150906, 1161092, 1144865, 1136565, 1138537,\n", - " 1147153, 1149189, 1149193, 1149197, 1162804, 1141365, 1141367, 1153069,\n", - " 1151109, 1138292, 1144284, 1144279, 1153556, 1143907, 1143906, 1139510,\n", - " 1139763, 1140990, 1146693, 1146695, 1141561, 1147050, 1145873, 1149887,\n", - " 1152976, 1152980, 1141932, 1146904, 1144247, 1144250, 1144242, 1140585,\n", - " 1141846, 1150241, 1140696, 1137571, 1134850, 1145980, 1145983, 1145974,\n", - " 1144073, 1142102, 1146024, 1138084, 1141646, 1149928, 1141235, 1139990,\n", - " 1143294, 1147543, 1147540, 1147282, 1142829, 1142816, 1136330, 1139417,\n", - " 1143049, 1143040, 1136160, 1157717, 1157720, 1136836, 1139301, 1139048,\n", - " 1142149, 1142159, 1143345, 1144765, 1144753, 1144619, 1140846, 1135874,\n", - " 1135883, 1150294, 1150919, 1146514, 1146523, 1138024, 1143457, 1144303,\n", - " 1144562, 1144564, 1142001, 1135451, 1135454, 1140827, 1146590, 1147521,\n", - " 1140364, 1143080, 1149489, 1148962, 1148966, 1144725, 1144219, 1147984,\n", - " 1147988, 1147999, 1134902, 1139252, 1147131, 1148704, 1150997, 1141836,\n", - " 1146742, 1148473, 1153701, 1152327, 1152328, 1152335, 1147025, 1147031,\n", - " 1141124, 1145018, 1139549, 1158226, 1154526, 1145240, 1145751, 1146178,\n", - " 1151242, 1152530, 1152538, 1150280, 1150437, 1150445, 1147962, 1144526,\n", - " 1151994, 1154822, 1151480, 1151482, 1152031, 1154271, 1139919, 1146723,\n", - " 1158950, 1158955, 1141941, 1141949, 1150736, 1151795, 1148740, 1154985,\n", - " 1149412, 1148288, 1148623, 1154420, 1158786, 1151363, 1151361, 1151365,\n", - " 1146682, 1152436, 1157976, 1148720, 1149821, 1149812, 1143971, 1148203,\n", - " 1148204, 1148098, 1153124, 1153186, 1153192, 1153188, 1148056, 1150352,\n", - " 1155089, 1147442, 1151821, 1152581, 1135307, 1154190, 1148498, 1141420,\n", - " 1141423, 1147737, 1145080, 1148947, 1146975, 1146623, 1151694, 1154052,\n", - " 1150794, 1152097, 1152098, 1152100, 1156325, 1156334, 1153036, 1153038,\n", - " 1150094, 1137746, 1152622, 1149203, 1151967, 1157842, 1157835, 1154638,\n", - " 1150578, 1145277, 1136132, 1136789, 1148913, 1144533, 1140935, 1152227,\n", - " 1138978, 1152903, 1151311, 1152341, 1146830, 1156823, 1156816, 1153310,\n", - " 1153311, 1138283, 1138281, 1136028, 1158704, 1151195, 1162200, 1152928,\n", - " 1151071, 1156399, 1163941, 1142777, 1156422, 1166848, 1150164, 1148040,\n", - " 1152602, 1167408, 1145656, 1137048, 1158477, 1148628, 1158530, 1148382,\n", - " 1137458, 1149947, 1155376, 1153085, 1154377, 1156720, 1157225, 1157228,\n", - " 1157229, 1135434, 1143448, 1157547, 1148884, 1154929, 1156505, 1157064,\n", - " 1157069, 1155412, 1155418, 1152841, 1152833, 1150465, 1150475, 1135231,\n", - " 1135730, 1152182, 1151788, 1152737, 1153413, 1158304, 1158308, 1158311,\n", - " 1151340, 1155441, 1150136, 1162117, 1144361, 1138573, 1142764, 1156271,\n", - " 1157637, 1151379, 1158628, 1155375, 1155122, 1155123, 1152527, 1157172,\n", - " 1149323, 1149505, 1156563, 1154547, 1155573, 1158566, 1158823, 1158824,\n", - " 1158331, 1156993, 1148835, 1153365, 1160958, 1143263, 1154642, 1154648,\n", - " 1146937, 1154243, 1151893, 1153326, 1157439, 1145716, 1150987, 1143517,\n", - " 1157928, 1157934, 1158123, 1158578, 1158996, 1154014, 1134674, 1134682,\n", - " 1135601, 1135614, 1148149, 1150661, 1150671, 1157685, 1155724, 1144463,\n", - " 1152209, 1152496, 1152502, 1140380, 1157031, 1144843, 1155971, 1155975,\n", - " 1158846, 1155404, 1159777, 1161375, 1166122, 1153503, 1136899, 1136896,\n", - " 1159164, 1158815, 1158447, 1156778, 1151615, 1136480, 1136491, 1156490,\n", - " 1153808, 1157668, 1136640, 1136646, 1140049, 1166424, 1166421, 1158545,\n", - " 1158558, 1151145, 1161161, 1138110, 1155521, 1161539, 1142492, 1142663,\n", - " 1142666, 1157747, 1157751, 1144270, 1159058, 1159071, 1151074, 1142416,\n", - " 1158295, 1157945, 1160563, 1162044, 1153052, 1153045, 1162842, 1155763,\n", - " 1156369, 1166256, 1156100, 1156107, 1142674, 1150046, 1149063, 1155479,\n", - " 1153519, 1147308, 1138161, 1164006, 1165385, 1149963, 1139782, 1163391,\n", - " 1154590, 1158461, 1160702, 1164048, 1158878, 1140643, 1148603, 1172731,\n", - " 1143139, 1143143, 1151877, 1155810, 1159025, 1159026, 1159029, 1159032,\n", - " 1168134, 1165604, 1152244, 1152247, 1155588, 1153921, 1168426, 1148560,\n", - " 1158405, 1144977, 1144989, 1149011, 1146500, 1146509, 1153236, 1153239,\n", - " 1164580, 1169261, 1163525, 1165415, 1161723, 1141471, 1141459, 1147426,\n", - " 1157044, 1156739, 1157955, 1166591, 1150646, 1150651, 1150649, 1171040,\n", - " 1144810, 1144812, 1167253, 1168850, 1142733, 1156292, 1156300, 1156303,\n", - " 1144055, 1166917, 1148683, 1145563, 1155320, 1147673, 1150531, 1163518,\n", - " 1144973, 1148175, 1147355, 1148124, 1147723, 1145889, 1145900, 1145902,\n", - " 1168659, 1171571, 1181052, 1143393, 1167136, 1158722, 1158734, 1171270,\n", - " 1164395, 1154070, 1154076, 1168756, 1145674, 1151598, 1167817, 1169216,\n", - " 1150515, 1156119, 1145523, 1144346, 1144336, 1157534, 1138378, 1147746,\n", - " 1154667, 1154670, 1169154, 1169162, 1157331, 1157329, 1169359, 1154353,\n", - " 1149452, 1149446, 1147491, 1138609, 1158623, 1158060, 1158062, 1149847,\n", - " 1157380, 1170542, 1152353, 1143858, 1155927, 1188547, 1148330, 1177426,\n", - " 1168470, 1173307, 1154027, 1153751, 1153754, 1183546, 1157158, 1157153,\n", - " 1157373, 1167239, 1147711, 1148131, 1148139, 1147925, 1157593, 1177415,\n", - " 1172961, 1162855, 1155739, 1171881, 1168817, 1167896, 1166016, 1172606,\n", - " 1144550, 1153429, 1159100, 1177683, 1170874, 1170922, 1150234, 1183573,\n", - " 1154148, 1167520, 1149173, 1169821, 1143279, 1169772, 1167658, 1185666,\n", - " 1143420, 1170176, 1170177, 1169631, 1153803, 1178171, 1184699, 1179714,\n", - " 1174897, 1158030, 1161255, 1155260, 1155262, 1154718, 1157795, 1164043,\n", - " 1171738, 1179540, 1153898, 1191749, 1145626, 1156433, 1180371, 1182266,\n", - " 1149744, 1149753, 1152273, 1155990, 1158370, 1158374, 1155899, 1177090,\n", - " 1183645, 1140397, 1168273, 1188934, 1168621, 1193128, 1164231, 1181548,\n", - " 1163422, 1188525, 1147179, 1147172, 1168930, 1168943, 1163621, 1139831,\n", - " 1150262, 1150268, 1167135, 1194517, 1156055, 1190269, 1146394, 1146399,\n", - " 1146395, 1173065, 1173058, 1172371, 1149547, 1191511, 1191023, 1182550,\n", - " 1168683, 1140992, 1141006, 1188781, 1162156, 1170890, 1151774, 1182226,\n", - " 1177850, 1145395, 1178135, 1187491, 1183147, 1191449, 1155959, 1155962,\n", - " 1180278, 1185269, 1191033, 1172896, 1177539, 1189948], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195202, 1197841, 1197183, 1197719, 1198723, 1198730, 1199282, 1198458,\n", - " 1202255, 1201582, 1200643, 1197777, 1199248, 1203047, 1201660, 1197359,\n", - " 1198557, 1196685, 1198180, 1196631, 1196586, 1195514, 1195259, 1195263,\n", - " 1199135, 1201920, 1201992, 1199519, 1195474, 1195895, 1199172, 1196979,\n", - " 1198099, 1195325, 1196845, 1197803, 1197807, 1198352, 1198163, 1198161,\n", - " 1195148, 1195265, 1195270, 1196247, 1197273, 1196109, 1195841, 1195850,\n", - " 1198915, 1199315, 1197474, 1197478, 1197255, 1196283, 1195351, 1199329,\n", - " 1200959, 1199059, 1194928, 1199804, 1197990, 1200079, 1200878, 1199665,\n", - " 1194786, 1200060, 1199942, 1199949, 1197682, 1200668, 1197601, 1196727,\n", - " 1195773, 1198416, 1198428, 1199593, 1199418, 1199421, 1199555, 1199557,\n", - " 1201824, 1195599, 1200169, 1196479, 1200988, 1200918, 1199539, 1200546,\n", - " 1200553, 1201726, 1199908, 1201442, 1200899, 1195885, 1196960, 1196966,\n", - " 1199606, 1195438, 1203113, 1195669, 1195679, 1198929, 1198932, 1197059,\n", - " 1197822, 1200279, 1196605, 1198299, 1201138, 1198147, 1198824, 1199782,\n", - " 1198819, 1198822, 1197077, 1195070, 1197335, 1203300], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195202, 1197841, 1197183, 1197719, 1198723, 1198730, 1199282, 1198458,\n", - " 1202255, 1201582, 1200643, 1197777, 1199248, 1203047, 1201660, 1197359,\n", - " 1198557, 1196685, 1198180, 1196631, 1196586, 1195514, 1195259, 1195263,\n", - " 1199135, 1201920, 1201992, 1199519, 1195474, 1195895, 1199172, 1196979,\n", - " 1198099, 1195325, 1196845, 1197803, 1197807, 1198352, 1198163, 1198161,\n", - " 1195148, 1195265, 1195270, 1196247, 1197273, 1196109, 1195841, 1195850,\n", - " 1198915, 1199315, 1197474, 1197478, 1197255, 1196283, 1195351, 1199329,\n", - " 1200959, 1199059, 1194928, 1199804, 1197990, 1200079, 1200878, 1199665,\n", - " 1194786, 1200060, 1199942, 1199949, 1197682, 1200668, 1197601, 1196727,\n", - " 1195773, 1198416, 1198428, 1199593, 1199418, 1199421, 1199555, 1199557,\n", - " 1201824, 1195599, 1200169, 1196479, 1200988, 1200918, 1199539, 1200546,\n", - " 1200553, 1201726, 1199908, 1201442, 1200899, 1195885, 1196960, 1196966,\n", - " 1199606, 1195438, 1203113, 1195669, 1195679, 1198929, 1198932, 1197059,\n", - " 1197822, 1200279, 1196605, 1198299, 1201138, 1198147, 1198824, 1199782,\n", - " 1198819, 1198822, 1197077, 1195070, 1197335, 1203300], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 3.9700e-02, -3.2973e-04, 3.5285e-01, ..., 5.1345e-02,\n", - " -1.2109e-03, -2.7910e-03],\n", - " [ 1.0763e-01, -5.6496e-04, 5.0943e-01, ..., 4.3347e-02,\n", - " -1.0606e-03, -3.6892e-03],\n", - " [ 5.8084e-02, -1.7561e-04, 3.7567e-01, ..., 5.5838e-02,\n", - " -8.5019e-04, -2.9105e-03],\n", - " ...,\n", - " [ 9.2858e-02, -6.3511e-04, 4.5046e-01, ..., 3.1650e-02,\n", - " -1.1263e-03, -3.5592e-03],\n", - " [ 1.1694e-01, -5.7497e-04, 4.6352e-01, ..., 2.6256e-02,\n", - " -1.0231e-03, -3.6799e-03],\n", - " [ 3.4364e-02, -3.2630e-04, 3.5738e-01, ..., 6.9531e-02,\n", - " -1.1241e-03, -2.6408e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 2.1108e+00, -2.9557e-02, 1.0243e+00, ..., -1.4009e-02,\n", - " -2.2692e-02, 2.2213e+00],\n", - " [ 1.8223e+00, -3.8160e-02, -2.6599e-04, ..., -1.9660e-02,\n", - " -2.0743e-02, 1.4658e+00],\n", - " [ 2.9572e+00, -5.1439e-02, 1.3300e+00, ..., -2.5991e-02,\n", - " -3.0649e-02, 2.9290e+00],\n", - " ...,\n", - " [ 1.6148e+00, -2.7181e-02, 8.7518e-02, ..., -1.2153e-02,\n", - " -1.8328e-02, 1.8134e+00],\n", - " [ 1.2569e+00, -2.7008e-02, -4.3316e-03, ..., -9.9698e-03,\n", - " -1.5313e-02, 1.1980e+00],\n", - " [ 2.3554e+00, -3.2979e-02, 8.3089e-01, ..., -1.0291e-02,\n", - " -2.7598e-02, 3.6141e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[ 3.8344e-02, 1.1552e-01, -9.8173e-04, ..., 4.6362e-01,\n", - " 5.6924e-02, 2.5295e-01],\n", - " [ 1.5732e-01, -3.3048e-04, -2.2457e-05, ..., 3.5720e-01,\n", - " 4.2228e-02, 1.7097e-01],\n", - " [ 1.6937e-01, -4.8178e-04, 9.4198e-03, ..., 4.0306e-01,\n", - " 2.2148e-01, 3.1593e-01],\n", - " ...,\n", - " [ 1.6676e-01, -1.5630e-03, 8.1437e-02, ..., 2.2529e-01,\n", - " -3.6905e-04, 2.6451e-01],\n", - " [ 2.1710e-01, -9.8690e-04, -3.8988e-04, ..., 4.6144e-01,\n", - " 6.2331e-02, 2.9841e-01],\n", - " [ 3.5981e-01, -2.1556e-03, -6.1740e-04, ..., 4.5864e-01,\n", - " 2.2041e-01, 3.2650e-01]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-4.4953e-03, 1.0187e-01, -4.7855e-04, ..., 7.9713e-02,\n", - " -1.0410e-03, -3.9661e-03],\n", - " [-5.4190e-03, 1.1202e-01, -1.9627e-04, ..., 1.7264e-01,\n", - " -1.2940e-03, -3.9719e-03],\n", - " [-5.4463e-03, 2.5075e-01, -6.7014e-04, ..., 3.2391e-01,\n", - " -6.2059e-04, -4.8611e-03],\n", - " ...,\n", - " [-2.4894e-03, 8.5929e-02, 1.1768e-01, ..., -1.9174e-03,\n", - " -1.6186e-03, -3.2604e-03],\n", - " [-3.7364e-03, -4.5196e-04, -2.1789e-04, ..., -4.8727e-04,\n", - " -1.0937e-03, -3.2579e-03],\n", - " [-4.4584e-03, 1.0286e-01, -1.9294e-04, ..., -1.3090e-04,\n", - " -1.6306e-03, -4.1697e-03]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 108, 77, 303, 229, 229, 415, 415, 415, 258, 258, 486, 486,\n", - " 395, 453, 500, 607, 622, 622, 610, 941, 824, 502, 502, 799,\n", - " 799, 503, 1040, 1040, 784, 784, 708, 910, 910, 1183, 1183, 1094,\n", - " 1137, 1112, 1094, 1054, 1212, 1212, 1328, 991, 1517, 1409, 1409, 1526,\n", - " 1409, 1292, 1526, 1371, 1371, 1214, 1515, 1515, 1515, 1803, 1515, 1686,\n", - " 1653, 1501, 1812, 1663, 1651, 1891, 1956, 1848, 1823, 1823, 1823, 1978,\n", - " 1741, 1816, 1816, 2010, 2010, 2010, 1887, 1940, 1940, 2108, 2029, 2029,\n", - " 2158, 2249, 2190, 2190, 2280, 2306, 2309, 2347, 2227, 2227, 2449, 2150,\n", - " 2379, 2450, 2457, 2666, 2666, 2666, 2701, 2806, 2997, 3125, 3199, 3069,\n", - " 3165, 3355, 3267, 3230, 3360, 3447, 3480, 3795, 3965, 4079, 3856, 3797,\n", - " 3797, 3888, 4030, 3977, 3977, 4180, 4238, 4310, 4567, 4908, 4922, 4891,\n", - " 4886, 5076, 4923, 4945, 4945, 5068, 5132, 5211, 5170, 5170, 5177, 5177,\n", - " 5231, 5349, 5319, 5323, 5323, 5539, 5539, 5612, 5683, 5796, 5946, 5946,\n", - " 5946, 5946, 5727, 5687, 5946, 6001, 6089, 6197, 6160, 6160, 6160, 6160,\n", - " 6386, 6386, 6195, 6321, 6268, 6348, 6113, 6113, 6144, 5927, 6321, 6317,\n", - " 6254, 6254],\n", - " [ 47, 41, 31, 26, 33, 81, 13, 37, 43, 85, 95, 85,\n", - " 23, 47, 76, 34, 9, 1, 34, 6, 70, 64, 104, 58,\n", - " 46, 71, 77, 18, 20, 32, 91, 17, 95, 113, 64, 110,\n", - " 97, 97, 105, 6, 91, 6, 75, 7, 71, 14, 20, 62,\n", - " 45, 61, 102, 19, 89, 59, 38, 49, 71, 102, 67, 3,\n", - " 25, 3, 15, 41, 34, 107, 2, 21, 29, 78, 8, 71,\n", - " 2, 103, 83, 69, 36, 101, 86, 114, 68, 102, 28, 72,\n", - " 68, 2, 84, 117, 98, 68, 25, 24, 82, 79, 0, 99,\n", - " 86, 80, 92, 109, 63, 28, 22, 20, 71, 40, 3, 66,\n", - " 21, 41, 33, 104, 110, 21, 116, 35, 11, 108, 7, 27,\n", - " 60, 55, 30, 90, 26, 29, 3, 16, 54, 51, 65, 52,\n", - " 83, 31, 19, 93, 73, 21, 112, 4, 87, 88, 3, 79,\n", - " 96, 57, 71, 71, 74, 100, 71, 19, 10, 39, 19, 94,\n", - " 42, 53, 20, 60, 110, 56, 71, 115, 11, 71, 111, 26,\n", - " 96, 71, 44, 71, 106, 71, 71, 12, 104, 101, 48, 71,\n", - " 50, 5]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2444, 492, 1564, ..., 87, 3518, 3578],\n", - " [ 19, 33, 87, ..., 6345, 6345, 6421]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 81, 10, 83, ..., 41, 37, 7],\n", - " [ 8, 21, 74, ..., 6137, 6405, 6225]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 87, 87, 87, ..., 6338, 6338, 6338],\n", - " [ 181, 173, 325, ..., 559, 836, 767]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 564, 325, 511, ..., 331, 323, 836],\n", - " [ 313, 201, 72, ..., 6419, 6410, 6344]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2941, 4929, 143, ..., 6211, 4482, 5414],\n", - " [ 86, 57, 20, ..., 6375, 6387, 6346]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 125, 87, 87, ..., 6338, 6338, 6338],\n", - " [3385, 240, 1094, ..., 6405, 4247, 1902]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 31, 31, 31, ..., 6414, 6414, 6414],\n", - " [3860, 4894, 4702, ..., 2988, 3116, 5251]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006081\n", - "sampling 0.005925\n", - "noi time: 0.001918\n", - "get_vertex_data call: 0.038316\n", - "noi group time: 0.003474\n", - "eoi_group_time: 0.015106\n", - "second half: 0.231628\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 18176, 24187, 20107, ..., 1123985, 1103853, 1120067],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 18176, 24187, 20107, ..., 1123985, 1103853, 1120067],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1209332, 1221048, ..., 1929230, 1937984, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1209332, 1221048, ..., 1929230, 1937984, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1136237, 1140282, 1140284, 1135926, 1135726, 1135727, 1140785,\n", - " 1140788, 1140799, 1141758, 1138335, 1136215, 1140297, 1140292, 1136971,\n", - " 1138897, 1149826, 1139820, 1143362, 1143372, 1139241, 1140781, 1150497,\n", - " 1139866, 1149216, 1142947, 1155683, 1147473, 1144636, 1144632, 1149038,\n", - " 1146995, 1134697, 1148337, 1148346, 1146656, 1150200, 1146472, 1136122,\n", - " 1152664, 1136742, 1137220, 1139371, 1150320, 1134710, 1134718, 1134806,\n", - " 1134807, 1140537, 1140540, 1138112, 1138356, 1134735, 1140953, 1140954,\n", - " 1135367, 1135202, 1141036, 1136289, 1134794, 1138504, 1137329, 1135408,\n", - " 1157397, 1137441, 1156159, 1148481, 1139161, 1141702, 1135583, 1135664,\n", - " 1138514, 1138524, 1153099, 1158136, 1135522, 1138440, 1138461, 1138449,\n", - " 1158390, 1156605, 1142611, 1156141, 1158984, 1145843, 1148531, 1148533,\n", - " 1137109, 1139673, 1134992, 1136551, 1158961, 1139327, 1159012, 1144406,\n", - " 1153543, 1140034, 1152701, 1137587, 1137598, 1146075, 1152044, 1137741,\n", - " 1137728, 1134750, 1138240, 1135543, 1141088, 1162958, 1144135, 1149001,\n", - " 1145347, 1136392, 1143767, 1137299, 1143221, 1143224, 1143225, 1139032,\n", - " 1140003, 1149982, 1146844, 1146847, 1141690, 1154466, 1139436, 1142932,\n", - " 1141224, 1141903, 1167117, 1143676, 1140592, 1136852, 1147850, 1164812,\n", - " 1142060, 1149111, 1139190, 1138708, 1140110, 1144596, 1142837, 1136867,\n", - " 1136864, 1141209, 1140885, 1144182, 1144190, 1137614, 1147153, 1147155,\n", - " 1136376, 1141365, 1141375, 1141678, 1149090, 1149101, 1139508, 1139510,\n", - " 1139127, 1140979, 1140990, 1146695, 1141560, 1147050, 1145873, 1149878,\n", - " 1152976, 1144244, 1144242, 1165366, 1150243, 1140696, 1143845, 1146024,\n", - " 1150599, 1138085, 1141585, 1142533, 1149928, 1141236, 1139990, 1143293,\n", - " 1150418, 1147282, 1147290, 1142816, 1143719, 1143663, 1139417, 1138923,\n", - " 1157720, 1136836, 1158043, 1143345, 1144767, 1144615, 1137098, 1135883,\n", - " 1150756, 1146523, 1138024, 1143456, 1143457, 1140364, 1143080, 1144219,\n", - " 1144222, 1147995, 1147999, 1146949, 1147131, 1148704, 1141327, 1141836,\n", - " 1146751, 1148468, 1153701, 1149722, 1158226, 1143923, 1151644, 1145237,\n", - " 1145240, 1138635, 1138638, 1146178, 1138861, 1150445, 1148940, 1155006,\n", - " 1149791, 1144514, 1146887, 1150350, 1151997, 1154819, 1152023, 1154267,\n", - " 1135504, 1146731, 1140566, 1150127, 1147021, 1153956, 1146776, 1141269,\n", - " 1148744, 1153574, 1154976, 1148448, 1147659, 1148288, 1148300, 1154420,\n", - " 1136247, 1152436, 1157983, 1148720, 1148724, 1148726, 1146544, 1146547,\n", - " 1146549, 1139936, 1154196, 1153192, 1153188, 1153197, 1159837, 1150935,\n", - " 1152875, 1144863, 1144851, 1143129, 1147442, 1152581, 1154183, 1141408,\n", - " 1146265, 1146967, 1146974, 1156402, 1150210, 1146623, 1151687, 1144477,\n", - " 1152407, 1152409, 1156327, 1153028, 1145539, 1137746, 1146307, 1155337,\n", - " 1154123, 1152673, 1151617, 1145278, 1136134, 1152903, 1151298, 1143988,\n", - " 1138279, 1138281, 1156002, 1136028, 1158704, 1151067, 1156396, 1142777,\n", - " 1150159, 1148033, 1148040, 1149300, 1152602, 1160866, 1149801, 1137048,\n", - " 1158477, 1148628, 1148637, 1158530, 1142047, 1156722, 1157229, 1135434,\n", - " 1150872, 1156500, 1155422, 1152833, 1145191, 1137823, 1135729, 1156632,\n", - " 1135647, 1147812, 1151470, 1158308, 1151340, 1155441, 1144361, 1154529,\n", - " 1156207, 1151379, 1158639, 1152527, 1149321, 1155755, 1145806, 1145807,\n", - " 1156452, 1158096, 1155628, 1158824, 1148834, 1153363, 1161391, 1143263,\n", - " 1151327, 1153322, 1157439, 1150070, 1155613, 1150811, 1155293, 1159622,\n", - " 1157282, 1137152, 1158996, 1153776, 1153786, 1137381, 1159116, 1134685,\n", - " 1135601, 1148149, 1150661, 1150671, 1158665, 1157685, 1157684, 1144451,\n", - " 1152220, 1159213, 1167618, 1140375, 1159132, 1155971, 1155975, 1161667,\n", - " 1161673, 1135190, 1149702, 1154600, 1153503, 1158891, 1158442, 1158285,\n", - " 1154393, 1153808, 1156278, 1134757, 1158547, 1146126, 1138101, 1155521,\n", - " 1142493, 1169890, 1142666, 1162683, 1159071, 1153052, 1153045, 1155763,\n", - " 1167708, 1153842, 1161313, 1138393, 1150046, 1149070, 1155479, 1146873,\n", - " 1157600, 1138161, 1164006, 1156795, 1139777, 1154590, 1154578, 1139592,\n", - " 1156983, 1166073, 1146356, 1169489, 1169495, 1140643, 1141862, 1148600,\n", - " 1151872, 1156177, 1159032, 1163740, 1152247, 1155588, 1162547, 1168428,\n", - " 1144977, 1147836, 1161240, 1152776, 1161724, 1141471, 1151650, 1156739,\n", - " 1157955, 1150646, 1144812, 1142722, 1144060, 1145176, 1166924, 1169282,\n", - " 1170307, 1144972, 1144973, 1162295, 1143025, 1165746, 1147355, 1152624,\n", - " 1145902, 1163961, 1152206, 1143407, 1171867, 1166661, 1167503, 1154076,\n", - " 1167317, 1147334, 1147338, 1145674, 1145665, 1156119, 1161781, 1161791,\n", - " 1138383, 1154893, 1157331, 1138136, 1141043, 1154364, 1149452, 1138609,\n", - " 1158611, 1158623, 1163292, 1149846, 1149847, 1157384, 1172642, 1155494,\n", - " 1168400, 1170061, 1169144, 1159658, 1157153, 1157373, 1147711, 1172436,\n", - " 1151850, 1148128, 1147925, 1157593, 1172961, 1162106, 1168697, 1175225,\n", - " 1180318, 1140324, 1159100, 1166682, 1150234, 1154148, 1149169, 1149173,\n", - " 1170465, 1178388, 1159404, 1153803, 1153141, 1164818, 1181578, 1157792,\n", - " 1157795, 1151496, 1178603, 1164034, 1164044, 1153898, 1164563, 1145618,\n", - " 1156440, 1156446, 1161911, 1184253, 1149755, 1146242, 1146248, 1153609,\n", - " 1158771, 1158380, 1158379, 1155890, 1140393, 1170625, 1168886, 1174190,\n", - " 1188930, 1168621, 1164228, 1182337, 1163421, 1176976, 1165072, 1181469,\n", - " 1161819, 1147182, 1164133, 1181518, 1139828, 1139831, 1150265, 1150260,\n", - " 1154812, 1156055, 1170003, 1181899, 1181801, 1156846, 1182060, 1153733,\n", - " 1152113, 1189827, 1166840, 1170140, 1167094, 1177285, 1156681, 1156672,\n", - " 1172122, 1181616, 1166785, 1152080, 1155959, 1155962, 1182680, 1187196,\n", - " 1194006, 1189078], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1136237, 1140282, 1140284, 1135926, 1135726, 1135727, 1140785,\n", - " 1140788, 1140799, 1141758, 1138335, 1136215, 1140297, 1140292, 1136971,\n", - " 1138897, 1149826, 1139820, 1143362, 1143372, 1139241, 1140781, 1150497,\n", - " 1139866, 1149216, 1142947, 1155683, 1147473, 1144636, 1144632, 1149038,\n", - " 1146995, 1134697, 1148337, 1148346, 1146656, 1150200, 1146472, 1136122,\n", - " 1152664, 1136742, 1137220, 1139371, 1150320, 1134710, 1134718, 1134806,\n", - " 1134807, 1140537, 1140540, 1138112, 1138356, 1134735, 1140953, 1140954,\n", - " 1135367, 1135202, 1141036, 1136289, 1134794, 1138504, 1137329, 1135408,\n", - " 1157397, 1137441, 1156159, 1148481, 1139161, 1141702, 1135583, 1135664,\n", - " 1138514, 1138524, 1153099, 1158136, 1135522, 1138440, 1138461, 1138449,\n", - " 1158390, 1156605, 1142611, 1156141, 1158984, 1145843, 1148531, 1148533,\n", - " 1137109, 1139673, 1134992, 1136551, 1158961, 1139327, 1159012, 1144406,\n", - " 1153543, 1140034, 1152701, 1137587, 1137598, 1146075, 1152044, 1137741,\n", - " 1137728, 1134750, 1138240, 1135543, 1141088, 1162958, 1144135, 1149001,\n", - " 1145347, 1136392, 1143767, 1137299, 1143221, 1143224, 1143225, 1139032,\n", - " 1140003, 1149982, 1146844, 1146847, 1141690, 1154466, 1139436, 1142932,\n", - " 1141224, 1141903, 1167117, 1143676, 1140592, 1136852, 1147850, 1164812,\n", - " 1142060, 1149111, 1139190, 1138708, 1140110, 1144596, 1142837, 1136867,\n", - " 1136864, 1141209, 1140885, 1144182, 1144190, 1137614, 1147153, 1147155,\n", - " 1136376, 1141365, 1141375, 1141678, 1149090, 1149101, 1139508, 1139510,\n", - " 1139127, 1140979, 1140990, 1146695, 1141560, 1147050, 1145873, 1149878,\n", - " 1152976, 1144244, 1144242, 1165366, 1150243, 1140696, 1143845, 1146024,\n", - " 1150599, 1138085, 1141585, 1142533, 1149928, 1141236, 1139990, 1143293,\n", - " 1150418, 1147282, 1147290, 1142816, 1143719, 1143663, 1139417, 1138923,\n", - " 1157720, 1136836, 1158043, 1143345, 1144767, 1144615, 1137098, 1135883,\n", - " 1150756, 1146523, 1138024, 1143456, 1143457, 1140364, 1143080, 1144219,\n", - " 1144222, 1147995, 1147999, 1146949, 1147131, 1148704, 1141327, 1141836,\n", - " 1146751, 1148468, 1153701, 1149722, 1158226, 1143923, 1151644, 1145237,\n", - " 1145240, 1138635, 1138638, 1146178, 1138861, 1150445, 1148940, 1155006,\n", - " 1149791, 1144514, 1146887, 1150350, 1151997, 1154819, 1152023, 1154267,\n", - " 1135504, 1146731, 1140566, 1150127, 1147021, 1153956, 1146776, 1141269,\n", - " 1148744, 1153574, 1154976, 1148448, 1147659, 1148288, 1148300, 1154420,\n", - " 1136247, 1152436, 1157983, 1148720, 1148724, 1148726, 1146544, 1146547,\n", - " 1146549, 1139936, 1154196, 1153192, 1153188, 1153197, 1159837, 1150935,\n", - " 1152875, 1144863, 1144851, 1143129, 1147442, 1152581, 1154183, 1141408,\n", - " 1146265, 1146967, 1146974, 1156402, 1150210, 1146623, 1151687, 1144477,\n", - " 1152407, 1152409, 1156327, 1153028, 1145539, 1137746, 1146307, 1155337,\n", - " 1154123, 1152673, 1151617, 1145278, 1136134, 1152903, 1151298, 1143988,\n", - " 1138279, 1138281, 1156002, 1136028, 1158704, 1151067, 1156396, 1142777,\n", - " 1150159, 1148033, 1148040, 1149300, 1152602, 1160866, 1149801, 1137048,\n", - " 1158477, 1148628, 1148637, 1158530, 1142047, 1156722, 1157229, 1135434,\n", - " 1150872, 1156500, 1155422, 1152833, 1145191, 1137823, 1135729, 1156632,\n", - " 1135647, 1147812, 1151470, 1158308, 1151340, 1155441, 1144361, 1154529,\n", - " 1156207, 1151379, 1158639, 1152527, 1149321, 1155755, 1145806, 1145807,\n", - " 1156452, 1158096, 1155628, 1158824, 1148834, 1153363, 1161391, 1143263,\n", - " 1151327, 1153322, 1157439, 1150070, 1155613, 1150811, 1155293, 1159622,\n", - " 1157282, 1137152, 1158996, 1153776, 1153786, 1137381, 1159116, 1134685,\n", - " 1135601, 1148149, 1150661, 1150671, 1158665, 1157685, 1157684, 1144451,\n", - " 1152220, 1159213, 1167618, 1140375, 1159132, 1155971, 1155975, 1161667,\n", - " 1161673, 1135190, 1149702, 1154600, 1153503, 1158891, 1158442, 1158285,\n", - " 1154393, 1153808, 1156278, 1134757, 1158547, 1146126, 1138101, 1155521,\n", - " 1142493, 1169890, 1142666, 1162683, 1159071, 1153052, 1153045, 1155763,\n", - " 1167708, 1153842, 1161313, 1138393, 1150046, 1149070, 1155479, 1146873,\n", - " 1157600, 1138161, 1164006, 1156795, 1139777, 1154590, 1154578, 1139592,\n", - " 1156983, 1166073, 1146356, 1169489, 1169495, 1140643, 1141862, 1148600,\n", - " 1151872, 1156177, 1159032, 1163740, 1152247, 1155588, 1162547, 1168428,\n", - " 1144977, 1147836, 1161240, 1152776, 1161724, 1141471, 1151650, 1156739,\n", - " 1157955, 1150646, 1144812, 1142722, 1144060, 1145176, 1166924, 1169282,\n", - " 1170307, 1144972, 1144973, 1162295, 1143025, 1165746, 1147355, 1152624,\n", - " 1145902, 1163961, 1152206, 1143407, 1171867, 1166661, 1167503, 1154076,\n", - " 1167317, 1147334, 1147338, 1145674, 1145665, 1156119, 1161781, 1161791,\n", - " 1138383, 1154893, 1157331, 1138136, 1141043, 1154364, 1149452, 1138609,\n", - " 1158611, 1158623, 1163292, 1149846, 1149847, 1157384, 1172642, 1155494,\n", - " 1168400, 1170061, 1169144, 1159658, 1157153, 1157373, 1147711, 1172436,\n", - " 1151850, 1148128, 1147925, 1157593, 1172961, 1162106, 1168697, 1175225,\n", - " 1180318, 1140324, 1159100, 1166682, 1150234, 1154148, 1149169, 1149173,\n", - " 1170465, 1178388, 1159404, 1153803, 1153141, 1164818, 1181578, 1157792,\n", - " 1157795, 1151496, 1178603, 1164034, 1164044, 1153898, 1164563, 1145618,\n", - " 1156440, 1156446, 1161911, 1184253, 1149755, 1146242, 1146248, 1153609,\n", - " 1158771, 1158380, 1158379, 1155890, 1140393, 1170625, 1168886, 1174190,\n", - " 1188930, 1168621, 1164228, 1182337, 1163421, 1176976, 1165072, 1181469,\n", - " 1161819, 1147182, 1164133, 1181518, 1139828, 1139831, 1150265, 1150260,\n", - " 1154812, 1156055, 1170003, 1181899, 1181801, 1156846, 1182060, 1153733,\n", - " 1152113, 1189827, 1166840, 1170140, 1167094, 1177285, 1156681, 1156672,\n", - " 1172122, 1181616, 1166785, 1152080, 1155959, 1155962, 1182680, 1187196,\n", - " 1194006, 1189078], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197183, 1199428, 1197744, 1198242, 1199835, 1195860, 1199282, 1202255,\n", - " 1198840, 1198844, 1201016, 1197351, 1196871, 1202804, 1196178, 1194743,\n", - " 1194770, 1194780, 1194783, 1194782, 1194642, 1195514, 1195263, 1201992,\n", - " 1197697, 1201427, 1194882, 1194895, 1195888, 1199172, 1196977, 1197831,\n", - " 1195325, 1198668, 1198262, 1198163, 1195145, 1195148, 1195216, 1195270,\n", - " 1195279, 1197140, 1200761, 1194859, 1195841, 1195659, 1195541, 1197474,\n", - " 1199344, 1197248, 1199705, 1196393, 1196283, 1196272, 1200959, 1199856,\n", - " 1199060, 1199185, 1196851, 1194928, 1199628, 1197676, 1200872, 1198404,\n", - " 1199231, 1199676, 1194786, 1201511, 1196496, 1196508, 1197970, 1197976,\n", - " 1197601, 1196727, 1195771, 1200892, 1198428, 1199489, 1199501, 1200018,\n", - " 1198811, 1199552, 1199555, 1201824, 1196477, 1196479, 1199445, 1201156,\n", - " 1201056, 1200927, 1194805, 1202640, 1201358, 1202499, 1201737, 1200526,\n", - " 1199532, 1200546, 1200553, 1199886, 1202141, 1199908, 1197945, 1202239,\n", - " 1200907, 1199976, 1195876, 1201291, 1198478, 1195610, 1203329, 1200398,\n", - " 1200625, 1198562, 1200784, 1202257, 1203117, 1195679, 1195664, 1200445,\n", - " 1198929, 1200276, 1198911, 1200928, 1197816, 1197822, 1202269, 1198299,\n", - " 1199659, 1203102, 1199786, 1198819, 1199234, 1201886, 1200301, 1197652,\n", - " 1197655, 1202323, 1197039, 1201875], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197183, 1199428, 1197744, 1198242, 1199835, 1195860, 1199282, 1202255,\n", - " 1198840, 1198844, 1201016, 1197351, 1196871, 1202804, 1196178, 1194743,\n", - " 1194770, 1194780, 1194783, 1194782, 1194642, 1195514, 1195263, 1201992,\n", - " 1197697, 1201427, 1194882, 1194895, 1195888, 1199172, 1196977, 1197831,\n", - " 1195325, 1198668, 1198262, 1198163, 1195145, 1195148, 1195216, 1195270,\n", - " 1195279, 1197140, 1200761, 1194859, 1195841, 1195659, 1195541, 1197474,\n", - " 1199344, 1197248, 1199705, 1196393, 1196283, 1196272, 1200959, 1199856,\n", - " 1199060, 1199185, 1196851, 1194928, 1199628, 1197676, 1200872, 1198404,\n", - " 1199231, 1199676, 1194786, 1201511, 1196496, 1196508, 1197970, 1197976,\n", - " 1197601, 1196727, 1195771, 1200892, 1198428, 1199489, 1199501, 1200018,\n", - " 1198811, 1199552, 1199555, 1201824, 1196477, 1196479, 1199445, 1201156,\n", - " 1201056, 1200927, 1194805, 1202640, 1201358, 1202499, 1201737, 1200526,\n", - " 1199532, 1200546, 1200553, 1199886, 1202141, 1199908, 1197945, 1202239,\n", - " 1200907, 1199976, 1195876, 1201291, 1198478, 1195610, 1203329, 1200398,\n", - " 1200625, 1198562, 1200784, 1202257, 1203117, 1195679, 1195664, 1200445,\n", - " 1198929, 1200276, 1198911, 1200928, 1197816, 1197822, 1202269, 1198299,\n", - " 1199659, 1203102, 1199786, 1198819, 1199234, 1201886, 1200301, 1197652,\n", - " 1197655, 1202323, 1197039, 1201875], device='cuda:0',\n", - " dtype=torch.int32))\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.004508\n", - "sampling 0.003871\n", - "noi time: 0.001032\n", - "get_vertex_data call: 0.047034\n", - "noi group time: 0.002016\n", - "eoi_group_time: 0.016539\n", - "second half: 0.192634\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16821, 31145, 24177, ..., 1116001, 1111733, 1120077],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16821, 31145, 24177, ..., 1116001, 1111733, 1120077],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210820, 1210822, 1210558, ..., 1938518, 1934173, 1930678],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210820, 1210822, 1210558, ..., 1938518, 1934173, 1930678],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1141424, 1140282, 1140284, 1138553, 1137784, 1137791, 1140785,\n", - " 1139701, 1141751, 1141757, 1141758, 1138335, 1142321, 1136971, 1149831,\n", - " 1139808, 1145373, 1137947, 1145999, 1138938, 1143362, 1143363, 1139615,\n", - " 1134937, 1155683, 1155686, 1155689, 1143820, 1147473, 1147483, 1149294,\n", - " 1142881, 1144632, 1149038, 1146992, 1146996, 1146656, 1146472, 1152664,\n", - " 1136742, 1155008, 1155014, 1155018, 1155019, 1147202, 1147204, 1150329,\n", - " 1140304, 1138112, 1137254, 1149461, 1151520, 1140159, 1140027, 1140953,\n", - " 1135367, 1135202, 1154751, 1141036, 1134794, 1157443, 1157453, 1135967,\n", - " 1137329, 1157103, 1137687, 1136610, 1136617, 1135333, 1144787, 1144395,\n", - " 1137529, 1137534, 1157395, 1157397, 1136662, 1156146, 1156159, 1148481,\n", - " 1141702, 1135579, 1135583, 1135830, 1140240, 1156342, 1153099, 1138584,\n", - " 1135499, 1145132, 1136978, 1156899, 1139684, 1157703, 1138436, 1138440,\n", - " 1138445, 1138449, 1138462, 1137925, 1136594, 1149328, 1138696, 1156603,\n", - " 1156606, 1147112, 1142611, 1135355, 1135618, 1135627, 1156141, 1158984,\n", - " 1158987, 1145843, 1148531, 1135769, 1141532, 1139667, 1139673, 1139674,\n", - " 1138069, 1142255, 1134992, 1134778, 1136553, 1136557, 1135789, 1139755,\n", - " 1140199, 1159009, 1159019, 1160088, 1138648, 1138148, 1142238, 1141992,\n", - " 1152042, 1152044, 1142290, 1137728, 1134922, 1134750, 1138246, 1135549,\n", - " 1141088, 1141097, 1144128, 1144130, 1141980, 1136392, 1143767, 1154860,\n", - " 1137299, 1139025, 1139033, 1149969, 1149982, 1146832, 1152709, 1135860,\n", - " 1136632, 1161173, 1141224, 1141891, 1141648, 1136917, 1145066, 1144230,\n", - " 1140592, 1138797, 1139495, 1136752, 1136753, 1136851, 1160062, 1137074,\n", - " 1141821, 1143153, 1139276, 1142080, 1140173, 1158749, 1149111, 1141479,\n", - " 1138709, 1138708, 1140110, 1142913, 1144596, 1136867, 1136864, 1141202,\n", - " 1141579, 1140432, 1144182, 1137606, 1150906, 1161093, 1146201, 1158692,\n", - " 1138539, 1137849, 1137841, 1161698, 1147153, 1141365, 1141367, 1141375,\n", - " 1149101, 1139510, 1145213, 1143779, 1140990, 1141555, 1147050, 1147047,\n", - " 1145873, 1149878, 1152976, 1152980, 1152982, 1135459, 1141925, 1146901,\n", - " 1144242, 1140580, 1141841, 1141846, 1137149, 1143636, 1141377, 1144070,\n", - " 1143845, 1143851, 1136277, 1146019, 1146024, 1146025, 1138085, 1149928,\n", - " 1139990, 1143293, 1147541, 1147540, 1148755, 1147282, 1142816, 1140346,\n", - " 1149366, 1139418, 1147362, 1143051, 1136160, 1136167, 1157720, 1136836,\n", - " 1136843, 1146110, 1165626, 1139329, 1139328, 1141496, 1142159, 1143345,\n", - " 1144615, 1145812, 1138600, 1150294, 1146514, 1146523, 1146526, 1143456,\n", - " 1143007, 1143937, 1143949, 1135454, 1147574, 1143798, 1146636, 1140364,\n", - " 1137990, 1143082, 1144219, 1147984, 1147995, 1147999, 1146949, 1139252,\n", - " 1147127, 1148704, 1143307, 1142700, 1141325, 1146751, 1153699, 1152328,\n", - " 1147056, 1147070, 1149722, 1149717, 1147025, 1145009, 1148366, 1141137,\n", - " 1154526, 1145246, 1145751, 1142370, 1146159, 1148397, 1151242, 1150438,\n", - " 1150445, 1149777, 1144514, 1144526, 1144174, 1146894, 1150339, 1147794,\n", - " 1152027, 1139919, 1146723, 1134869, 1140566, 1150127, 1147021, 1135800,\n", - " 1158949, 1141949, 1150736, 1150728, 1153578, 1147653, 1143560, 1143564,\n", - " 1149412, 1148288, 1148294, 1148300, 1139096, 1154420, 1148180, 1152561,\n", - " 1152563, 1139721, 1146676, 1146682, 1146673, 1146687, 1141181, 1157968,\n", - " 1148720, 1148724, 1148725, 1148734, 1148729, 1147630, 1139936, 1143971,\n", - " 1143975, 1148204, 1154203, 1154206, 1141728, 1141733, 1154166, 1154168,\n", - " 1153124, 1153192, 1153188, 1153197, 1145104, 1154970, 1152864, 1143091,\n", - " 1150356, 1143134, 1151816, 1152581, 1154183, 1141420, 1136000, 1149378,\n", - " 1149376, 1148949, 1146975, 1146623, 1142988, 1152849, 1152097, 1153036,\n", - " 1153038, 1137746, 1137755, 1152622, 1149203, 1154123, 1152673, 1152682,\n", - " 1154633, 1139576, 1151617, 1150579, 1145278, 1136131, 1136795, 1148913,\n", - " 1148916, 1156826, 1153310, 1153311, 1138283, 1138281, 1136028, 1136031,\n", - " 1158704, 1152928, 1151064, 1151067, 1163941, 1143477, 1150164, 1148033,\n", - " 1148040, 1154457, 1149300, 1148903, 1149794, 1144669, 1137048, 1148628,\n", - " 1158530, 1158540, 1148373, 1148383, 1137458, 1154564, 1157509, 1155376,\n", - " 1154381, 1156720, 1135434, 1148892, 1148894, 1158913, 1158924, 1154929,\n", - " 1156505, 1152392, 1152388, 1157064, 1155412, 1152833, 1145184, 1139473,\n", - " 1139479, 1151257, 1150465, 1145390, 1151788, 1150828, 1153413, 1153415,\n", - " 1135645, 1135634, 1147810, 1151469, 1139535, 1158311, 1151271, 1155441,\n", - " 1153359, 1150132, 1162120, 1140865, 1140877, 1154530, 1154528, 1145606,\n", - " 1156207, 1151379, 1155122, 1152527, 1157172, 1149321, 1149508, 1135398,\n", - " 1145807, 1156463, 1158111, 1155626, 1155628, 1156563, 1154547, 1155573,\n", - " 1158824, 1158325, 1155646, 1153363, 1143263, 1154240, 1154080, 1152307,\n", - " 1143188, 1143189, 1160904, 1150371, 1153322, 1157439, 1143518, 1157928,\n", - " 1151030, 1153337, 1159116, 1145682, 1145694, 1134683, 1135601, 1135602,\n", - " 1155848, 1155843, 1158664, 1158665, 1157685, 1146325, 1144451, 1152220,\n", - " 1140381, 1144843, 1155975, 1135184, 1158846, 1155942, 1159440, 1136896,\n", - " 1158753, 1158760, 1140218, 1159156, 1156778, 1151615, 1136494, 1164931,\n", - " 1161616, 1153647, 1153808, 1156273, 1156278, 1156277, 1136640, 1134757,\n", - " 1166421, 1163814, 1165786, 1144581, 1150011, 1155535, 1161539, 1142487,\n", - " 1135662, 1164276, 1142663, 1157747, 1167359, 1159042, 1159052, 1159070,\n", - " 1159057, 1167474, 1165838, 1155191, 1157944, 1157946, 1160563, 1162044,\n", - " 1153052, 1153045, 1171551, 1162835, 1163072, 1155769, 1166258, 1142869,\n", - " 1138393, 1142673, 1142681, 1150033, 1150046, 1149063, 1149070, 1145948,\n", - " 1154295, 1153519, 1146873, 1138161, 1164006, 1156797, 1149963, 1163878,\n", - " 1148021, 1157236, 1146063, 1164048, 1165307, 1140130, 1169493, 1140641,\n", - " 1140650, 1140649, 1148603, 1164990, 1143143, 1144509, 1163201, 1158653,\n", - " 1159029, 1159032, 1169105, 1169109, 1152247, 1138674, 1149017, 1146509,\n", - " 1161240, 1144747, 1155044, 1155045, 1168070, 1153212, 1141471, 1147426,\n", - " 1156739, 1156741, 1156744, 1153663, 1150645, 1150649, 1168748, 1144812,\n", - " 1167253, 1177087, 1135567, 1156303, 1144058, 1145183, 1148683, 1145561,\n", - " 1145229, 1169282, 1166462, 1144971, 1166053, 1148124, 1168659, 1163961,\n", - " 1143404, 1158724, 1158722, 1171279, 1154076, 1147331, 1147334, 1159277,\n", - " 1179488, 1151598, 1169602, 1167817, 1193350, 1155172, 1155170, 1180431,\n", - " 1150518, 1156119, 1144338, 1144336, 1157531, 1157534, 1138372, 1138378,\n", - " 1154670, 1135841, 1169162, 1157331, 1141048, 1141043, 1169351, 1169359,\n", - " 1154364, 1149452, 1138609, 1158623, 1149847, 1157379, 1165533, 1152546,\n", - " 1169921, 1172838, 1173307, 1145033, 1160936, 1169144, 1171705, 1154027,\n", - " 1172787, 1164962, 1178419, 1151201, 1151696, 1157153, 1147711, 1172435,\n", - " 1151850, 1148131, 1157592, 1157593, 1161877, 1162106, 1168824, 1140326,\n", - " 1179204, 1166028, 1163989, 1144550, 1177686, 1177174, 1150234, 1154149,\n", - " 1154151, 1154148, 1149169, 1149173, 1169817, 1186117, 1143277, 1167658,\n", - " 1156559, 1171302, 1164818, 1161038, 1153619, 1172309, 1182651, 1179807,\n", - " 1158030, 1161255, 1162129, 1182364, 1155262, 1154718, 1157792, 1157795,\n", - " 1143343, 1182802, 1171623, 1157072, 1182600, 1158253, 1153898, 1154503,\n", - " 1164560, 1164571, 1145626, 1156437, 1178768, 1178028, 1182624, 1161067,\n", - " 1185006, 1184243, 1146242, 1163718, 1157761, 1182690, 1181149, 1158512,\n", - " 1158374, 1155895, 1183633, 1140397, 1169061, 1180517, 1168872, 1164228,\n", - " 1164231, 1179090, 1183833, 1170802, 1187579, 1170034, 1170421, 1170822,\n", - " 1139828, 1139838, 1139831, 1139837, 1154806, 1154812, 1151288, 1151295,\n", - " 1186942, 1156055, 1151972, 1151975, 1181447, 1146395, 1173058, 1189989,\n", - " 1191964, 1172696, 1191018, 1168678, 1140993, 1141001, 1151774, 1153733,\n", - " 1185765, 1152118, 1152124, 1192870, 1169707, 1178637, 1186422, 1172122,\n", - " 1174284, 1183938, 1160968, 1176829, 1155956, 1155958, 1155962, 1178290,\n", - " 1179769, 1172896, 1182191, 1193301, 1157008, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1141424, 1140282, 1140284, 1138553, 1137784, 1137791, 1140785,\n", - " 1139701, 1141751, 1141757, 1141758, 1138335, 1142321, 1136971, 1149831,\n", - " 1139808, 1145373, 1137947, 1145999, 1138938, 1143362, 1143363, 1139615,\n", - " 1134937, 1155683, 1155686, 1155689, 1143820, 1147473, 1147483, 1149294,\n", - " 1142881, 1144632, 1149038, 1146992, 1146996, 1146656, 1146472, 1152664,\n", - " 1136742, 1155008, 1155014, 1155018, 1155019, 1147202, 1147204, 1150329,\n", - " 1140304, 1138112, 1137254, 1149461, 1151520, 1140159, 1140027, 1140953,\n", - " 1135367, 1135202, 1154751, 1141036, 1134794, 1157443, 1157453, 1135967,\n", - " 1137329, 1157103, 1137687, 1136610, 1136617, 1135333, 1144787, 1144395,\n", - " 1137529, 1137534, 1157395, 1157397, 1136662, 1156146, 1156159, 1148481,\n", - " 1141702, 1135579, 1135583, 1135830, 1140240, 1156342, 1153099, 1138584,\n", - " 1135499, 1145132, 1136978, 1156899, 1139684, 1157703, 1138436, 1138440,\n", - " 1138445, 1138449, 1138462, 1137925, 1136594, 1149328, 1138696, 1156603,\n", - " 1156606, 1147112, 1142611, 1135355, 1135618, 1135627, 1156141, 1158984,\n", - " 1158987, 1145843, 1148531, 1135769, 1141532, 1139667, 1139673, 1139674,\n", - " 1138069, 1142255, 1134992, 1134778, 1136553, 1136557, 1135789, 1139755,\n", - " 1140199, 1159009, 1159019, 1160088, 1138648, 1138148, 1142238, 1141992,\n", - " 1152042, 1152044, 1142290, 1137728, 1134922, 1134750, 1138246, 1135549,\n", - " 1141088, 1141097, 1144128, 1144130, 1141980, 1136392, 1143767, 1154860,\n", - " 1137299, 1139025, 1139033, 1149969, 1149982, 1146832, 1152709, 1135860,\n", - " 1136632, 1161173, 1141224, 1141891, 1141648, 1136917, 1145066, 1144230,\n", - " 1140592, 1138797, 1139495, 1136752, 1136753, 1136851, 1160062, 1137074,\n", - " 1141821, 1143153, 1139276, 1142080, 1140173, 1158749, 1149111, 1141479,\n", - " 1138709, 1138708, 1140110, 1142913, 1144596, 1136867, 1136864, 1141202,\n", - " 1141579, 1140432, 1144182, 1137606, 1150906, 1161093, 1146201, 1158692,\n", - " 1138539, 1137849, 1137841, 1161698, 1147153, 1141365, 1141367, 1141375,\n", - " 1149101, 1139510, 1145213, 1143779, 1140990, 1141555, 1147050, 1147047,\n", - " 1145873, 1149878, 1152976, 1152980, 1152982, 1135459, 1141925, 1146901,\n", - " 1144242, 1140580, 1141841, 1141846, 1137149, 1143636, 1141377, 1144070,\n", - " 1143845, 1143851, 1136277, 1146019, 1146024, 1146025, 1138085, 1149928,\n", - " 1139990, 1143293, 1147541, 1147540, 1148755, 1147282, 1142816, 1140346,\n", - " 1149366, 1139418, 1147362, 1143051, 1136160, 1136167, 1157720, 1136836,\n", - " 1136843, 1146110, 1165626, 1139329, 1139328, 1141496, 1142159, 1143345,\n", - " 1144615, 1145812, 1138600, 1150294, 1146514, 1146523, 1146526, 1143456,\n", - " 1143007, 1143937, 1143949, 1135454, 1147574, 1143798, 1146636, 1140364,\n", - " 1137990, 1143082, 1144219, 1147984, 1147995, 1147999, 1146949, 1139252,\n", - " 1147127, 1148704, 1143307, 1142700, 1141325, 1146751, 1153699, 1152328,\n", - " 1147056, 1147070, 1149722, 1149717, 1147025, 1145009, 1148366, 1141137,\n", - " 1154526, 1145246, 1145751, 1142370, 1146159, 1148397, 1151242, 1150438,\n", - " 1150445, 1149777, 1144514, 1144526, 1144174, 1146894, 1150339, 1147794,\n", - " 1152027, 1139919, 1146723, 1134869, 1140566, 1150127, 1147021, 1135800,\n", - " 1158949, 1141949, 1150736, 1150728, 1153578, 1147653, 1143560, 1143564,\n", - " 1149412, 1148288, 1148294, 1148300, 1139096, 1154420, 1148180, 1152561,\n", - " 1152563, 1139721, 1146676, 1146682, 1146673, 1146687, 1141181, 1157968,\n", - " 1148720, 1148724, 1148725, 1148734, 1148729, 1147630, 1139936, 1143971,\n", - " 1143975, 1148204, 1154203, 1154206, 1141728, 1141733, 1154166, 1154168,\n", - " 1153124, 1153192, 1153188, 1153197, 1145104, 1154970, 1152864, 1143091,\n", - " 1150356, 1143134, 1151816, 1152581, 1154183, 1141420, 1136000, 1149378,\n", - " 1149376, 1148949, 1146975, 1146623, 1142988, 1152849, 1152097, 1153036,\n", - " 1153038, 1137746, 1137755, 1152622, 1149203, 1154123, 1152673, 1152682,\n", - " 1154633, 1139576, 1151617, 1150579, 1145278, 1136131, 1136795, 1148913,\n", - " 1148916, 1156826, 1153310, 1153311, 1138283, 1138281, 1136028, 1136031,\n", - " 1158704, 1152928, 1151064, 1151067, 1163941, 1143477, 1150164, 1148033,\n", - " 1148040, 1154457, 1149300, 1148903, 1149794, 1144669, 1137048, 1148628,\n", - " 1158530, 1158540, 1148373, 1148383, 1137458, 1154564, 1157509, 1155376,\n", - " 1154381, 1156720, 1135434, 1148892, 1148894, 1158913, 1158924, 1154929,\n", - " 1156505, 1152392, 1152388, 1157064, 1155412, 1152833, 1145184, 1139473,\n", - " 1139479, 1151257, 1150465, 1145390, 1151788, 1150828, 1153413, 1153415,\n", - " 1135645, 1135634, 1147810, 1151469, 1139535, 1158311, 1151271, 1155441,\n", - " 1153359, 1150132, 1162120, 1140865, 1140877, 1154530, 1154528, 1145606,\n", - " 1156207, 1151379, 1155122, 1152527, 1157172, 1149321, 1149508, 1135398,\n", - " 1145807, 1156463, 1158111, 1155626, 1155628, 1156563, 1154547, 1155573,\n", - " 1158824, 1158325, 1155646, 1153363, 1143263, 1154240, 1154080, 1152307,\n", - " 1143188, 1143189, 1160904, 1150371, 1153322, 1157439, 1143518, 1157928,\n", - " 1151030, 1153337, 1159116, 1145682, 1145694, 1134683, 1135601, 1135602,\n", - " 1155848, 1155843, 1158664, 1158665, 1157685, 1146325, 1144451, 1152220,\n", - " 1140381, 1144843, 1155975, 1135184, 1158846, 1155942, 1159440, 1136896,\n", - " 1158753, 1158760, 1140218, 1159156, 1156778, 1151615, 1136494, 1164931,\n", - " 1161616, 1153647, 1153808, 1156273, 1156278, 1156277, 1136640, 1134757,\n", - " 1166421, 1163814, 1165786, 1144581, 1150011, 1155535, 1161539, 1142487,\n", - " 1135662, 1164276, 1142663, 1157747, 1167359, 1159042, 1159052, 1159070,\n", - " 1159057, 1167474, 1165838, 1155191, 1157944, 1157946, 1160563, 1162044,\n", - " 1153052, 1153045, 1171551, 1162835, 1163072, 1155769, 1166258, 1142869,\n", - " 1138393, 1142673, 1142681, 1150033, 1150046, 1149063, 1149070, 1145948,\n", - " 1154295, 1153519, 1146873, 1138161, 1164006, 1156797, 1149963, 1163878,\n", - " 1148021, 1157236, 1146063, 1164048, 1165307, 1140130, 1169493, 1140641,\n", - " 1140650, 1140649, 1148603, 1164990, 1143143, 1144509, 1163201, 1158653,\n", - " 1159029, 1159032, 1169105, 1169109, 1152247, 1138674, 1149017, 1146509,\n", - " 1161240, 1144747, 1155044, 1155045, 1168070, 1153212, 1141471, 1147426,\n", - " 1156739, 1156741, 1156744, 1153663, 1150645, 1150649, 1168748, 1144812,\n", - " 1167253, 1177087, 1135567, 1156303, 1144058, 1145183, 1148683, 1145561,\n", - " 1145229, 1169282, 1166462, 1144971, 1166053, 1148124, 1168659, 1163961,\n", - " 1143404, 1158724, 1158722, 1171279, 1154076, 1147331, 1147334, 1159277,\n", - " 1179488, 1151598, 1169602, 1167817, 1193350, 1155172, 1155170, 1180431,\n", - " 1150518, 1156119, 1144338, 1144336, 1157531, 1157534, 1138372, 1138378,\n", - " 1154670, 1135841, 1169162, 1157331, 1141048, 1141043, 1169351, 1169359,\n", - " 1154364, 1149452, 1138609, 1158623, 1149847, 1157379, 1165533, 1152546,\n", - " 1169921, 1172838, 1173307, 1145033, 1160936, 1169144, 1171705, 1154027,\n", - " 1172787, 1164962, 1178419, 1151201, 1151696, 1157153, 1147711, 1172435,\n", - " 1151850, 1148131, 1157592, 1157593, 1161877, 1162106, 1168824, 1140326,\n", - " 1179204, 1166028, 1163989, 1144550, 1177686, 1177174, 1150234, 1154149,\n", - " 1154151, 1154148, 1149169, 1149173, 1169817, 1186117, 1143277, 1167658,\n", - " 1156559, 1171302, 1164818, 1161038, 1153619, 1172309, 1182651, 1179807,\n", - " 1158030, 1161255, 1162129, 1182364, 1155262, 1154718, 1157792, 1157795,\n", - " 1143343, 1182802, 1171623, 1157072, 1182600, 1158253, 1153898, 1154503,\n", - " 1164560, 1164571, 1145626, 1156437, 1178768, 1178028, 1182624, 1161067,\n", - " 1185006, 1184243, 1146242, 1163718, 1157761, 1182690, 1181149, 1158512,\n", - " 1158374, 1155895, 1183633, 1140397, 1169061, 1180517, 1168872, 1164228,\n", - " 1164231, 1179090, 1183833, 1170802, 1187579, 1170034, 1170421, 1170822,\n", - " 1139828, 1139838, 1139831, 1139837, 1154806, 1154812, 1151288, 1151295,\n", - " 1186942, 1156055, 1151972, 1151975, 1181447, 1146395, 1173058, 1189989,\n", - " 1191964, 1172696, 1191018, 1168678, 1140993, 1141001, 1151774, 1153733,\n", - " 1185765, 1152118, 1152124, 1192870, 1169707, 1178637, 1186422, 1172122,\n", - " 1174284, 1183938, 1160968, 1176829, 1155956, 1155958, 1155962, 1178290,\n", - " 1179769, 1172896, 1182191, 1193301, 1157008, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197719, 1199281, 1199282, 1198459, 1202255, 1201582, 1199150,\n", - " 1200644, 1198633, 1198694, 1196871, 1202804, 1198557, 1197512, 1194866,\n", - " 1194745, 1198707, 1194648, 1197430, 1195514, 1201992, 1198542, 1199519,\n", - " 1194880, 1199172, 1196334, 1194668, 1195325, 1195571, 1198167, 1195148,\n", - " 1195223, 1195265, 1195278, 1197141, 1197265, 1195850, 1198915, 1195648,\n", - " 1195659, 1197199, 1195917, 1199710, 1196272, 1198273, 1198282, 1200959,\n", - " 1197291, 1196858, 1194928, 1195119, 1199685, 1199616, 1199804, 1197676,\n", - " 1199154, 1199231, 1195014, 1194786, 1197970, 1197601, 1196727, 1202623,\n", - " 1200894, 1198416, 1199410, 1195555, 1201547, 1200452, 1200572, 1199445,\n", - " 1202630, 1202635, 1200991, 1200913, 1200918, 1199539, 1199721, 1201743,\n", - " 1200315, 1197097, 1199908, 1200194, 1201442, 1202239, 1202337, 1199976,\n", - " 1202175, 1200189, 1201291, 1198467, 1198875, 1200784, 1195679, 1197334,\n", - " 1200684, 1196916, 1197060, 1197816, 1194898, 1196597, 1201138, 1197735,\n", - " 1200437, 1198819, 1199234, 1200974, 1195070, 1201886, 1200296, 1200302,\n", - " 1195082, 1195165, 1202072], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197719, 1199281, 1199282, 1198459, 1202255, 1201582, 1199150,\n", - " 1200644, 1198633, 1198694, 1196871, 1202804, 1198557, 1197512, 1194866,\n", - " 1194745, 1198707, 1194648, 1197430, 1195514, 1201992, 1198542, 1199519,\n", - " 1194880, 1199172, 1196334, 1194668, 1195325, 1195571, 1198167, 1195148,\n", - " 1195223, 1195265, 1195278, 1197141, 1197265, 1195850, 1198915, 1195648,\n", - " 1195659, 1197199, 1195917, 1199710, 1196272, 1198273, 1198282, 1200959,\n", - " 1197291, 1196858, 1194928, 1195119, 1199685, 1199616, 1199804, 1197676,\n", - " 1199154, 1199231, 1195014, 1194786, 1197970, 1197601, 1196727, 1202623,\n", - " 1200894, 1198416, 1199410, 1195555, 1201547, 1200452, 1200572, 1199445,\n", - " 1202630, 1202635, 1200991, 1200913, 1200918, 1199539, 1199721, 1201743,\n", - " 1200315, 1197097, 1199908, 1200194, 1201442, 1202239, 1202337, 1199976,\n", - " 1202175, 1200189, 1201291, 1198467, 1198875, 1200784, 1195679, 1197334,\n", - " 1200684, 1196916, 1197060, 1197816, 1194898, 1196597, 1201138, 1197735,\n", - " 1200437, 1198819, 1199234, 1200974, 1195070, 1201886, 1200296, 1200302,\n", - " 1195082, 1195165, 1202072], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.2301e-02, -4.6775e-04, 3.9259e-01, ..., 9.9537e-02,\n", - " -1.4352e-03, -2.6713e-03],\n", - " [ 5.1977e-02, -3.6856e-04, 3.9866e-01, ..., 9.0406e-02,\n", - " -1.5099e-03, -3.1744e-03],\n", - " [ 5.3547e-02, 5.0677e-05, 3.5955e-01, ..., 7.7765e-02,\n", - " -9.1053e-04, -2.7549e-03],\n", - " ...,\n", - " [ 5.2490e-02, -2.5017e-04, 5.3400e-01, ..., 9.3654e-02,\n", - " -1.3790e-03, -3.8124e-03],\n", - " [ 1.3162e-01, -5.3712e-04, 5.5172e-01, ..., 5.7839e-02,\n", - " -1.1523e-03, -4.0398e-03],\n", - " [ 2.0223e-02, -4.2015e-04, 3.5674e-01, ..., 7.6369e-02,\n", - " -1.3611e-03, -2.6746e-03]], device='cuda:0'), 'paper': tensor([[ 1.6561e+00, -2.5480e-02, 7.1273e-01, ..., -1.0696e-02,\n", - " -2.3569e-02, 1.9474e+00],\n", - " [ 1.3956e+00, -3.4713e-02, -9.1473e-04, ..., -1.5660e-02,\n", - " -2.0048e-02, 1.2073e+00],\n", - " [ 6.8357e-01, -1.3789e-02, -3.1638e-03, ..., -6.8683e-03,\n", - " -1.1822e-02, 9.3929e-01],\n", - " ...,\n", - " [ 9.8738e-01, -3.3616e-02, -2.5672e-03, ..., -1.3971e-02,\n", - " -2.0039e-02, 1.1758e+00],\n", - " [ 1.4955e+00, -4.5735e-02, 4.9025e-01, ..., -1.9941e-02,\n", - " -2.4353e-02, 9.5655e-01],\n", - " [ 1.0526e+00, -2.6227e-02, -3.8210e-03, ..., -1.4028e-02,\n", - " -1.6322e-02, 8.3785e-01]], device='cuda:0'), 'author': tensor([[-5.2906e-04, -3.5063e-05, 1.5153e-01, ..., 1.0313e-01,\n", - " -3.1383e-04, -9.0066e-04],\n", - " [ 2.9387e-01, -3.1946e-03, 2.0466e-02, ..., 7.3948e-01,\n", - " 2.2952e-01, 3.5337e-01],\n", - " [ 2.2156e-01, -1.2186e-03, 1.5738e-01, ..., 6.8919e-01,\n", - " 1.0229e-01, 1.9513e-01],\n", - " ...,\n", - " [ 4.2032e-02, -5.6105e-04, 1.9889e-01, ..., 3.6094e-01,\n", - " 4.8562e-02, 1.6076e-01],\n", - " [ 8.0559e-03, 5.1741e-02, 1.1494e-01, ..., 5.2754e-01,\n", - " 2.2480e-02, 9.8383e-02],\n", - " [ 1.7808e-01, -1.4119e-03, 2.6234e-02, ..., 8.1223e-01,\n", - " 2.0480e-01, 3.4357e-01]], device='cuda:0'), 'field_of_study': tensor([[-2.0584e-03, 5.4714e-02, 1.2958e-01, ..., -3.7679e-03,\n", - " -2.6390e-04, -1.6335e-03],\n", - " [-2.1041e-03, 5.8972e-02, 6.6197e-02, ..., -1.3619e-03,\n", - " -1.9450e-04, -2.4578e-03],\n", - " [-2.9492e-03, 1.9307e-01, 9.9064e-02, ..., 1.1450e-02,\n", - " -9.7840e-04, -3.6932e-03],\n", - " ...,\n", - " [-1.9091e-03, 1.7389e-02, 7.6869e-02, ..., -1.3516e-03,\n", - " -5.9520e-04, -2.4535e-03],\n", - " [-1.7763e-03, 1.9189e-01, 1.2375e-01, ..., -1.3333e-03,\n", - " -5.3693e-04, -1.6024e-03],\n", - " [-2.3615e-03, 3.1414e-01, 9.2433e-02, ..., 9.3565e-03,\n", - " -1.9129e-03, -5.8427e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 54, 159, 163, 163, 49, 2, 2, 125, 11, 23, 152, 23,\n", - " 23, 23, 187, 187, 195, 113, 255, 408, 342, 522, 454, 454,\n", - " 431, 642, 642, 642, 603, 603, 603, 689, 463, 463, 463, 940,\n", - " 1143, 1143, 1009, 1009, 860, 860, 1052, 1073, 1073, 1145, 1145, 1375,\n", - " 1274, 1274, 1274, 752, 752, 1274, 1274, 1411, 1302, 1342, 1591, 1474,\n", - " 1358, 1312, 1500, 1706, 1519, 1699, 1495, 1989, 1670, 1750, 1721, 1721,\n", - " 1755, 1755, 1858, 1774, 1800, 2041, 2128, 1770, 1770, 1864, 1908, 1908,\n", - " 1949, 2170, 1980, 1980, 1980, 1980, 2020, 2285, 2148, 2192, 2350, 2240,\n", - " 2323, 2484, 2425, 2630, 2462, 2374, 2374, 2626, 2626, 2815, 2759, 2759,\n", - " 3126, 2989, 3101, 2967, 2967, 2967, 3003, 2987, 3269, 3269, 3304, 3196,\n", - " 3323, 3499, 3499, 3413, 3610, 3490, 3573, 3727, 3685, 3820, 3977, 3977,\n", - " 3977, 3946, 3662, 3647, 3647, 3647, 3936, 3973, 3874, 3707, 4084, 4101,\n", - " 4101, 4148, 4187, 4187, 4187, 4187, 4233, 4254, 4410, 4480, 4564, 4818,\n", - " 4703, 4703, 4843, 5362, 5395, 5460, 5272, 5398, 5398, 5454, 5524, 5524,\n", - " 5665, 5690, 5674, 5415, 5576, 5973, 6109, 5776, 5614, 5614, 6085, 5942,\n", - " 5812, 5812],\n", - " [ 72, 69, 66, 85, 82, 6, 101, 3, 71, 74, 85, 26,\n", - " 56, 52, 90, 38, 53, 101, 103, 60, 24, 58, 19, 17,\n", - " 58, 29, 0, 59, 64, 104, 62, 34, 27, 41, 114, 14,\n", - " 79, 73, 35, 39, 84, 75, 19, 29, 59, 1, 36, 19,\n", - " 105, 110, 88, 15, 35, 113, 28, 102, 81, 89, 87, 85,\n", - " 49, 46, 65, 33, 30, 77, 21, 81, 92, 77, 95, 55,\n", - " 109, 43, 106, 40, 25, 92, 94, 83, 50, 49, 44, 109,\n", - " 77, 62, 20, 57, 86, 61, 77, 54, 1, 92, 108, 4,\n", - " 9, 111, 3, 7, 67, 1, 102, 34, 1, 70, 100, 31,\n", - " 85, 85, 47, 90, 93, 88, 18, 92, 68, 45, 10, 32,\n", - " 16, 62, 109, 54, 85, 62, 6, 6, 27, 89, 85, 73,\n", - " 3, 22, 21, 93, 12, 24, 112, 63, 96, 107, 85, 91,\n", - " 2, 3, 92, 97, 37, 81, 85, 49, 33, 106, 18, 3,\n", - " 78, 42, 82, 105, 5, 13, 11, 3, 98, 105, 8, 85,\n", - " 48, 29, 29, 29, 29, 50, 80, 99, 76, 51, 18, 62,\n", - " 62, 23]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 768, 1445, 553, ..., 5327, 1440, 2715],\n", - " [ 25, 19, 286, ..., 6842, 6811, 6931]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 86, 18, 57, ..., 20, 63, 81],\n", - " [ 19, 217, 139, ..., 5997, 6098, 6097]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 63, 63, 63, ..., 6940, 6940, 6940],\n", - " [ 194, 338, 289, ..., 7, 222, 351]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 144, 338, 324, ..., 729, 482, 88],\n", - " [ 38, 61, 122, ..., 6844, 6844, 6923]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1351, 4131, 1734, ..., 3396, 172, 5619],\n", - " [ 117, 112, 18, ..., 6054, 6036, 6056]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 310, 63, 63, ..., 6940, 6940, 6940],\n", - " [3451, 918, 1194, ..., 6846, 5503, 4325]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 187, 187, 187, ..., 5980, 5980, 5980],\n", - " [6134, 6044, 6023, ..., 6860, 3634, 5292]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006509\n", - "sampling 0.006356\n", - "noi time: 0.001938\n", - "get_vertex_data call: 0.036044\n", - "noi group time: 0.003613\n", - "eoi_group_time: 0.016271\n", - "second half: 0.217229\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 17409, 19416, 53252, ..., 1124620, 1120124, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 17409, 19416, 53252, ..., 1124620, 1120124, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1231432, 1216136, ..., 1937985, 1929220, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1231432, 1216136, ..., 1937985, 1929220, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1141424, 1136228, 1140282, 1136349, 1138553, 1135726, 1135721,\n", - " 1142198, 1137791, 1140785, 1139703, 1141758, 1138335, 1136223, 1140297,\n", - " 1142517, 1136971, 1141445, 1138059, 1154776, 1145373, 1145984, 1137264,\n", - " 1138930, 1138933, 1139141, 1143372, 1146646, 1139609, 1139615, 1150497,\n", - " 1139866, 1134940, 1134943, 1149216, 1142947, 1155683, 1143820, 1147473,\n", - " 1147483, 1135989, 1144636, 1149037, 1153012, 1135950, 1148338, 1135484,\n", - " 1148546, 1153217, 1136742, 1147095, 1145419, 1155014, 1139364, 1146371,\n", - " 1134807, 1138745, 1140308, 1138119, 1137181, 1151530, 1140159, 1134735,\n", - " 1140030, 1135360, 1135367, 1135202, 1135903, 1134965, 1141036, 1134794,\n", - " 1157453, 1143377, 1137329, 1157103, 1139215, 1144399, 1144395, 1137534,\n", - " 1157393, 1136662, 1137441, 1143317, 1136928, 1148481, 1148484, 1139152,\n", - " 1135583, 1141086, 1136105, 1140970, 1140716, 1138514, 1153099, 1137957,\n", - " 1138584, 1137008, 1156909, 1135522, 1139684, 1138436, 1138440, 1140071,\n", - " 1138457, 1138462, 1158390, 1138846, 1135088, 1156606, 1138185, 1158984,\n", - " 1145843, 1137109, 1135769, 1139667, 1138070, 1142252, 1134992, 1135782,\n", - " 1139755, 1136723, 1140199, 1158971, 1142906, 1142911, 1141065, 1144410,\n", - " 1153543, 1153544, 1143625, 1138148, 1141966, 1152042, 1140660, 1137734,\n", - " 1137728, 1137743, 1134922, 1134738, 1134742, 1134750, 1134740, 1135549,\n", - " 1140228, 1141088, 1141097, 1144130, 1149001, 1141980, 1143767, 1139032,\n", - " 1139033, 1149979, 1149982, 1135865, 1136426, 1136427, 1136419, 1136625,\n", - " 1142931, 1142932, 1141224, 1141223, 1141891, 1143678, 1141161, 1141785,\n", - " 1141786, 1136760, 1141609, 1144650, 1144641, 1134987, 1136849, 1147850,\n", - " 1165291, 1142052, 1143167, 1140160, 1140173, 1140163, 1138472, 1138719,\n", - " 1138708, 1142913, 1137661, 1143107, 1143113, 1144596, 1136867, 1136871,\n", - " 1136864, 1144041, 1140885, 1144182, 1150906, 1136565, 1139559, 1138539,\n", - " 1140501, 1137849, 1137854, 1147153, 1136369, 1136378, 1149198, 1141365,\n", - " 1141367, 1153068, 1149088, 1149090, 1149097, 1139017, 1138292, 1138293,\n", - " 1153563, 1139510, 1139774, 1139763, 1139127, 1145001, 1140619, 1140990,\n", - " 1146695, 1147050, 1145873, 1155832, 1152976, 1152980, 1139453, 1141925,\n", - " 1146898, 1144242, 1141841, 1141853, 1150689, 1150692, 1150697, 1140700,\n", - " 1140696, 1137571, 1137570, 1143851, 1136273, 1146024, 1146141, 1154328,\n", - " 1139990, 1143293, 1143283, 1143294, 1143290, 1151124, 1151128, 1147543,\n", - " 1147540, 1148763, 1147282, 1142816, 1142629, 1149366, 1139417, 1149610,\n", - " 1143051, 1143052, 1136160, 1136161, 1157720, 1136836, 1136843, 1139329,\n", - " 1141496, 1136445, 1142149, 1143345, 1144766, 1144753, 1144619, 1144615,\n", - " 1145818, 1145816, 1144083, 1144088, 1144087, 1138597, 1138600, 1135876,\n", - " 1135813, 1138013, 1144375, 1146514, 1146523, 1143456, 1143457, 1143004,\n", - " 1137697, 1144568, 1140483, 1140488, 1143937, 1147574, 1143799, 1147521,\n", - " 1140352, 1140364, 1137990, 1143080, 1168921, 1148962, 1148969, 1147984,\n", - " 1147999, 1146949, 1134907, 1139252, 1139255, 1148704, 1148715, 1142700,\n", - " 1141319, 1146745, 1153701, 1152328, 1149718, 1149725, 1145705, 1147971,\n", - " 1145012, 1147196, 1158226, 1150452, 1143931, 1147873, 1147880, 1147879,\n", - " 1154526, 1145237, 1145240, 1145750, 1145751, 1138626, 1138632, 1138638,\n", - " 1146178, 1151242, 1150445, 1149258, 1148816, 1151856, 1144526, 1150350,\n", - " 1144203, 1165252, 1151480, 1151482, 1152024, 1145259, 1146723, 1149534,\n", - " 1148281, 1147009, 1147023, 1158949, 1158950, 1141949, 1150728, 1147653,\n", - " 1143559, 1148288, 1148300, 1135083, 1135084, 1135087, 1148608, 1139096,\n", - " 1151421, 1154420, 1154424, 1148188, 1151363, 1152561, 1139717, 1146682,\n", - " 1146684, 1152493, 1157968, 1148720, 1148724, 1144110, 1147627, 1151937,\n", - " 1143895, 1148203, 1148204, 1153124, 1153192, 1153197, 1145104, 1145111,\n", - " 1159828, 1152968, 1150935, 1154960, 1152877, 1152879, 1150356, 1141022,\n", - " 1151816, 1152581, 1135311, 1135303, 1151908, 1154183, 1148498, 1141420,\n", - " 1151348, 1147737, 1145086, 1146975, 1156402, 1149359, 1146623, 1146276,\n", - " 1146287, 1156325, 1153036, 1153038, 1137746, 1137755, 1137756, 1146317,\n", - " 1159974, 1152622, 1152057, 1157107, 1152826, 1154112, 1154120, 1157842,\n", - " 1157824, 1157833, 1152673, 1154633, 1151573, 1164753, 1164761, 1151617,\n", - " 1150578, 1145278, 1136131, 1136134, 1148916, 1152169, 1138991, 1151311,\n", - " 1152341, 1152342, 1153311, 1138279, 1138281, 1157141, 1152295, 1136028,\n", - " 1136031, 1158704, 1151188, 1152928, 1151064, 1151071, 1156387, 1163941,\n", - " 1150109, 1150101, 1166848, 1150168, 1150164, 1142261, 1148033, 1148040,\n", - " 1149300, 1152601, 1157630, 1149792, 1137048, 1148628, 1158530, 1169177,\n", - " 1137458, 1149947, 1135698, 1147643, 1153085, 1142041, 1157547, 1150877,\n", - " 1148884, 1158924, 1158919, 1156500, 1156501, 1156505, 1157064, 1157069,\n", - " 1145191, 1145187, 1137814, 1143491, 1150465, 1150472, 1160262, 1135730,\n", - " 1135733, 1135740, 1156638, 1153413, 1135645, 1147810, 1151469, 1139525,\n", - " 1139524, 1158308, 1158311, 1140422, 1155441, 1155452, 1161730, 1153359,\n", - " 1140866, 1154530, 1153994, 1145610, 1145600, 1150488, 1142755, 1142758,\n", - " 1156207, 1156205, 1156269, 1156271, 1151386, 1151379, 1158626, 1155122,\n", - " 1152527, 1149321, 1155755, 1151430, 1151431, 1151424, 1146920, 1156463,\n", - " 1158096, 1155628, 1155629, 1156563, 1154559, 1154555, 1158824, 1158325,\n", - " 1157323, 1154035, 1148834, 1148837, 1155646, 1143263, 1146938, 1154240,\n", - " 1137347, 1154902, 1154909, 1143189, 1143531, 1150371, 1157439, 1141627,\n", - " 1150987, 1155293, 1159622, 1140743, 1137167, 1137152, 1157653, 1160458,\n", - " 1158117, 1158996, 1153784, 1153786, 1158204, 1137381, 1158087, 1134677,\n", - " 1135601, 1135605, 1150661, 1150671, 1158502, 1157684, 1140634, 1140632,\n", - " 1144463, 1152217, 1152220, 1140380, 1140381, 1140374, 1155872, 1157735,\n", - " 1157033, 1157038, 1157031, 1144843, 1144845, 1155971, 1155975, 1142076,\n", - " 1158846, 1156804, 1156812, 1154592, 1154600, 1160164, 1153503, 1136898,\n", - " 1136899, 1136901, 1136896, 1140208, 1158815, 1156778, 1158278, 1155237,\n", - " 1155246, 1136480, 1136481, 1159241, 1154394, 1156665, 1152143, 1153808,\n", - " 1136640, 1134757, 1153834, 1163814, 1146123, 1162021, 1138109, 1144585,\n", - " 1150011, 1155521, 1155529, 1161539, 1164276, 1164282, 1142666, 1162417,\n", - " 1157759, 1157751, 1156032, 1159042, 1159052, 1159041, 1159070, 1159071,\n", - " 1164493, 1153052, 1153045, 1163075, 1156104, 1138393, 1165244, 1149063,\n", - " 1145948, 1145945, 1153519, 1147300, 1138161, 1164006, 1156787, 1149963,\n", - " 1154590, 1139592, 1139284, 1166032, 1166073, 1157236, 1148771, 1140731,\n", - " 1159773, 1146063, 1159931, 1159552, 1171257, 1160701, 1184914, 1164048,\n", - " 1140130, 1170415, 1148600, 1148603, 1168082, 1143143, 1159025, 1159029,\n", - " 1159032, 1165877, 1169104, 1152247, 1171162, 1158911, 1160605, 1155588,\n", - " 1151223, 1151227, 1151220, 1168420, 1168525, 1144977, 1147830, 1146500,\n", - " 1146510, 1146509, 1153239, 1161240, 1144748, 1152776, 1155049, 1163522,\n", - " 1163527, 1165422, 1141471, 1151650, 1147427, 1157050, 1157054, 1156737,\n", - " 1160849, 1157955, 1166591, 1179012, 1150646, 1171044, 1171040, 1150315,\n", - " 1144810, 1144812, 1177077, 1162087, 1153276, 1135567, 1165714, 1165727,\n", - " 1156303, 1145228, 1169282, 1154700, 1155323, 1159513, 1166454, 1166462,\n", - " 1162300, 1143025, 1152624, 1139349, 1145900, 1145902, 1153534, 1181049,\n", - " 1143399, 1143404, 1149557, 1158724, 1167317, 1167315, 1147331, 1147338,\n", - " 1191355, 1145674, 1145675, 1145665, 1169602, 1167817, 1144681, 1155172,\n", - " 1150515, 1150518, 1150526, 1156119, 1154618, 1144336, 1154656, 1154670,\n", - " 1171408, 1171422, 1169162, 1157331, 1151671, 1169359, 1149452, 1149451,\n", - " 1158146, 1149688, 1158611, 1158623, 1158052, 1173047, 1149847, 1184810,\n", - " 1155494, 1172488, 1152353, 1166600, 1165528, 1175689, 1170279, 1168055,\n", - " 1149402, 1148666, 1173307, 1145033, 1169144, 1154019, 1154027, 1154028,\n", - " 1152150, 1159651, 1159655, 1167857, 1151696, 1157153, 1157373, 1147698,\n", - " 1147711, 1147707, 1151850, 1157593, 1167712, 1155738, 1155739, 1181021,\n", - " 1175812, 1170023, 1177708, 1173092, 1166535, 1166684, 1183518, 1177117,\n", - " 1177118, 1176320, 1150234, 1154148, 1158176, 1178889, 1149173, 1186117,\n", - " 1143420, 1153803, 1180817, 1161031, 1153617, 1185146, 1151509, 1182651,\n", - " 1179807, 1158030, 1161255, 1161262, 1155262, 1154718, 1157792, 1157795,\n", - " 1143341, 1171623, 1178359, 1179185, 1180036, 1178955, 1158249, 1153898,\n", - " 1153893, 1154497, 1178221, 1145626, 1145618, 1157483, 1161906, 1161911,\n", - " 1184996, 1149755, 1153601, 1155990, 1158771, 1158512, 1158513, 1158940,\n", - " 1158378, 1158380, 1155892, 1155899, 1185057, 1191814, 1140389, 1168273,\n", - " 1164792, 1185960, 1169062, 1180521, 1185168, 1166210, 1164228, 1188136,\n", - " 1187468, 1163422, 1183713, 1146161, 1180019, 1182733, 1178255, 1159532,\n", - " 1139828, 1139831, 1139837, 1183873, 1150265, 1160495, 1154806, 1154812,\n", - " 1183952, 1185628, 1156055, 1182847, 1146394, 1146395, 1149536, 1188174,\n", - " 1169964, 1187974, 1141006, 1186031, 1188817, 1193232, 1186336, 1186348,\n", - " 1152115, 1162502, 1169703, 1169707, 1189655, 1177468, 1183370, 1178265,\n", - " 1156676, 1172423, 1172429, 1178042, 1145395, 1145398, 1183949, 1176829,\n", - " 1152080, 1155959, 1181248, 1179769, 1178315, 1192792, 1185358, 1194332,\n", - " 1189804, 1169397, 1184641], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1141424, 1136228, 1140282, 1136349, 1138553, 1135726, 1135721,\n", - " 1142198, 1137791, 1140785, 1139703, 1141758, 1138335, 1136223, 1140297,\n", - " 1142517, 1136971, 1141445, 1138059, 1154776, 1145373, 1145984, 1137264,\n", - " 1138930, 1138933, 1139141, 1143372, 1146646, 1139609, 1139615, 1150497,\n", - " 1139866, 1134940, 1134943, 1149216, 1142947, 1155683, 1143820, 1147473,\n", - " 1147483, 1135989, 1144636, 1149037, 1153012, 1135950, 1148338, 1135484,\n", - " 1148546, 1153217, 1136742, 1147095, 1145419, 1155014, 1139364, 1146371,\n", - " 1134807, 1138745, 1140308, 1138119, 1137181, 1151530, 1140159, 1134735,\n", - " 1140030, 1135360, 1135367, 1135202, 1135903, 1134965, 1141036, 1134794,\n", - " 1157453, 1143377, 1137329, 1157103, 1139215, 1144399, 1144395, 1137534,\n", - " 1157393, 1136662, 1137441, 1143317, 1136928, 1148481, 1148484, 1139152,\n", - " 1135583, 1141086, 1136105, 1140970, 1140716, 1138514, 1153099, 1137957,\n", - " 1138584, 1137008, 1156909, 1135522, 1139684, 1138436, 1138440, 1140071,\n", - " 1138457, 1138462, 1158390, 1138846, 1135088, 1156606, 1138185, 1158984,\n", - " 1145843, 1137109, 1135769, 1139667, 1138070, 1142252, 1134992, 1135782,\n", - " 1139755, 1136723, 1140199, 1158971, 1142906, 1142911, 1141065, 1144410,\n", - " 1153543, 1153544, 1143625, 1138148, 1141966, 1152042, 1140660, 1137734,\n", - " 1137728, 1137743, 1134922, 1134738, 1134742, 1134750, 1134740, 1135549,\n", - " 1140228, 1141088, 1141097, 1144130, 1149001, 1141980, 1143767, 1139032,\n", - " 1139033, 1149979, 1149982, 1135865, 1136426, 1136427, 1136419, 1136625,\n", - " 1142931, 1142932, 1141224, 1141223, 1141891, 1143678, 1141161, 1141785,\n", - " 1141786, 1136760, 1141609, 1144650, 1144641, 1134987, 1136849, 1147850,\n", - " 1165291, 1142052, 1143167, 1140160, 1140173, 1140163, 1138472, 1138719,\n", - " 1138708, 1142913, 1137661, 1143107, 1143113, 1144596, 1136867, 1136871,\n", - " 1136864, 1144041, 1140885, 1144182, 1150906, 1136565, 1139559, 1138539,\n", - " 1140501, 1137849, 1137854, 1147153, 1136369, 1136378, 1149198, 1141365,\n", - " 1141367, 1153068, 1149088, 1149090, 1149097, 1139017, 1138292, 1138293,\n", - " 1153563, 1139510, 1139774, 1139763, 1139127, 1145001, 1140619, 1140990,\n", - " 1146695, 1147050, 1145873, 1155832, 1152976, 1152980, 1139453, 1141925,\n", - " 1146898, 1144242, 1141841, 1141853, 1150689, 1150692, 1150697, 1140700,\n", - " 1140696, 1137571, 1137570, 1143851, 1136273, 1146024, 1146141, 1154328,\n", - " 1139990, 1143293, 1143283, 1143294, 1143290, 1151124, 1151128, 1147543,\n", - " 1147540, 1148763, 1147282, 1142816, 1142629, 1149366, 1139417, 1149610,\n", - " 1143051, 1143052, 1136160, 1136161, 1157720, 1136836, 1136843, 1139329,\n", - " 1141496, 1136445, 1142149, 1143345, 1144766, 1144753, 1144619, 1144615,\n", - " 1145818, 1145816, 1144083, 1144088, 1144087, 1138597, 1138600, 1135876,\n", - " 1135813, 1138013, 1144375, 1146514, 1146523, 1143456, 1143457, 1143004,\n", - " 1137697, 1144568, 1140483, 1140488, 1143937, 1147574, 1143799, 1147521,\n", - " 1140352, 1140364, 1137990, 1143080, 1168921, 1148962, 1148969, 1147984,\n", - " 1147999, 1146949, 1134907, 1139252, 1139255, 1148704, 1148715, 1142700,\n", - " 1141319, 1146745, 1153701, 1152328, 1149718, 1149725, 1145705, 1147971,\n", - " 1145012, 1147196, 1158226, 1150452, 1143931, 1147873, 1147880, 1147879,\n", - " 1154526, 1145237, 1145240, 1145750, 1145751, 1138626, 1138632, 1138638,\n", - " 1146178, 1151242, 1150445, 1149258, 1148816, 1151856, 1144526, 1150350,\n", - " 1144203, 1165252, 1151480, 1151482, 1152024, 1145259, 1146723, 1149534,\n", - " 1148281, 1147009, 1147023, 1158949, 1158950, 1141949, 1150728, 1147653,\n", - " 1143559, 1148288, 1148300, 1135083, 1135084, 1135087, 1148608, 1139096,\n", - " 1151421, 1154420, 1154424, 1148188, 1151363, 1152561, 1139717, 1146682,\n", - " 1146684, 1152493, 1157968, 1148720, 1148724, 1144110, 1147627, 1151937,\n", - " 1143895, 1148203, 1148204, 1153124, 1153192, 1153197, 1145104, 1145111,\n", - " 1159828, 1152968, 1150935, 1154960, 1152877, 1152879, 1150356, 1141022,\n", - " 1151816, 1152581, 1135311, 1135303, 1151908, 1154183, 1148498, 1141420,\n", - " 1151348, 1147737, 1145086, 1146975, 1156402, 1149359, 1146623, 1146276,\n", - " 1146287, 1156325, 1153036, 1153038, 1137746, 1137755, 1137756, 1146317,\n", - " 1159974, 1152622, 1152057, 1157107, 1152826, 1154112, 1154120, 1157842,\n", - " 1157824, 1157833, 1152673, 1154633, 1151573, 1164753, 1164761, 1151617,\n", - " 1150578, 1145278, 1136131, 1136134, 1148916, 1152169, 1138991, 1151311,\n", - " 1152341, 1152342, 1153311, 1138279, 1138281, 1157141, 1152295, 1136028,\n", - " 1136031, 1158704, 1151188, 1152928, 1151064, 1151071, 1156387, 1163941,\n", - " 1150109, 1150101, 1166848, 1150168, 1150164, 1142261, 1148033, 1148040,\n", - " 1149300, 1152601, 1157630, 1149792, 1137048, 1148628, 1158530, 1169177,\n", - " 1137458, 1149947, 1135698, 1147643, 1153085, 1142041, 1157547, 1150877,\n", - " 1148884, 1158924, 1158919, 1156500, 1156501, 1156505, 1157064, 1157069,\n", - " 1145191, 1145187, 1137814, 1143491, 1150465, 1150472, 1160262, 1135730,\n", - " 1135733, 1135740, 1156638, 1153413, 1135645, 1147810, 1151469, 1139525,\n", - " 1139524, 1158308, 1158311, 1140422, 1155441, 1155452, 1161730, 1153359,\n", - " 1140866, 1154530, 1153994, 1145610, 1145600, 1150488, 1142755, 1142758,\n", - " 1156207, 1156205, 1156269, 1156271, 1151386, 1151379, 1158626, 1155122,\n", - " 1152527, 1149321, 1155755, 1151430, 1151431, 1151424, 1146920, 1156463,\n", - " 1158096, 1155628, 1155629, 1156563, 1154559, 1154555, 1158824, 1158325,\n", - " 1157323, 1154035, 1148834, 1148837, 1155646, 1143263, 1146938, 1154240,\n", - " 1137347, 1154902, 1154909, 1143189, 1143531, 1150371, 1157439, 1141627,\n", - " 1150987, 1155293, 1159622, 1140743, 1137167, 1137152, 1157653, 1160458,\n", - " 1158117, 1158996, 1153784, 1153786, 1158204, 1137381, 1158087, 1134677,\n", - " 1135601, 1135605, 1150661, 1150671, 1158502, 1157684, 1140634, 1140632,\n", - " 1144463, 1152217, 1152220, 1140380, 1140381, 1140374, 1155872, 1157735,\n", - " 1157033, 1157038, 1157031, 1144843, 1144845, 1155971, 1155975, 1142076,\n", - " 1158846, 1156804, 1156812, 1154592, 1154600, 1160164, 1153503, 1136898,\n", - " 1136899, 1136901, 1136896, 1140208, 1158815, 1156778, 1158278, 1155237,\n", - " 1155246, 1136480, 1136481, 1159241, 1154394, 1156665, 1152143, 1153808,\n", - " 1136640, 1134757, 1153834, 1163814, 1146123, 1162021, 1138109, 1144585,\n", - " 1150011, 1155521, 1155529, 1161539, 1164276, 1164282, 1142666, 1162417,\n", - " 1157759, 1157751, 1156032, 1159042, 1159052, 1159041, 1159070, 1159071,\n", - " 1164493, 1153052, 1153045, 1163075, 1156104, 1138393, 1165244, 1149063,\n", - " 1145948, 1145945, 1153519, 1147300, 1138161, 1164006, 1156787, 1149963,\n", - " 1154590, 1139592, 1139284, 1166032, 1166073, 1157236, 1148771, 1140731,\n", - " 1159773, 1146063, 1159931, 1159552, 1171257, 1160701, 1184914, 1164048,\n", - " 1140130, 1170415, 1148600, 1148603, 1168082, 1143143, 1159025, 1159029,\n", - " 1159032, 1165877, 1169104, 1152247, 1171162, 1158911, 1160605, 1155588,\n", - " 1151223, 1151227, 1151220, 1168420, 1168525, 1144977, 1147830, 1146500,\n", - " 1146510, 1146509, 1153239, 1161240, 1144748, 1152776, 1155049, 1163522,\n", - " 1163527, 1165422, 1141471, 1151650, 1147427, 1157050, 1157054, 1156737,\n", - " 1160849, 1157955, 1166591, 1179012, 1150646, 1171044, 1171040, 1150315,\n", - " 1144810, 1144812, 1177077, 1162087, 1153276, 1135567, 1165714, 1165727,\n", - " 1156303, 1145228, 1169282, 1154700, 1155323, 1159513, 1166454, 1166462,\n", - " 1162300, 1143025, 1152624, 1139349, 1145900, 1145902, 1153534, 1181049,\n", - " 1143399, 1143404, 1149557, 1158724, 1167317, 1167315, 1147331, 1147338,\n", - " 1191355, 1145674, 1145675, 1145665, 1169602, 1167817, 1144681, 1155172,\n", - " 1150515, 1150518, 1150526, 1156119, 1154618, 1144336, 1154656, 1154670,\n", - " 1171408, 1171422, 1169162, 1157331, 1151671, 1169359, 1149452, 1149451,\n", - " 1158146, 1149688, 1158611, 1158623, 1158052, 1173047, 1149847, 1184810,\n", - " 1155494, 1172488, 1152353, 1166600, 1165528, 1175689, 1170279, 1168055,\n", - " 1149402, 1148666, 1173307, 1145033, 1169144, 1154019, 1154027, 1154028,\n", - " 1152150, 1159651, 1159655, 1167857, 1151696, 1157153, 1157373, 1147698,\n", - " 1147711, 1147707, 1151850, 1157593, 1167712, 1155738, 1155739, 1181021,\n", - " 1175812, 1170023, 1177708, 1173092, 1166535, 1166684, 1183518, 1177117,\n", - " 1177118, 1176320, 1150234, 1154148, 1158176, 1178889, 1149173, 1186117,\n", - " 1143420, 1153803, 1180817, 1161031, 1153617, 1185146, 1151509, 1182651,\n", - " 1179807, 1158030, 1161255, 1161262, 1155262, 1154718, 1157792, 1157795,\n", - " 1143341, 1171623, 1178359, 1179185, 1180036, 1178955, 1158249, 1153898,\n", - " 1153893, 1154497, 1178221, 1145626, 1145618, 1157483, 1161906, 1161911,\n", - " 1184996, 1149755, 1153601, 1155990, 1158771, 1158512, 1158513, 1158940,\n", - " 1158378, 1158380, 1155892, 1155899, 1185057, 1191814, 1140389, 1168273,\n", - " 1164792, 1185960, 1169062, 1180521, 1185168, 1166210, 1164228, 1188136,\n", - " 1187468, 1163422, 1183713, 1146161, 1180019, 1182733, 1178255, 1159532,\n", - " 1139828, 1139831, 1139837, 1183873, 1150265, 1160495, 1154806, 1154812,\n", - " 1183952, 1185628, 1156055, 1182847, 1146394, 1146395, 1149536, 1188174,\n", - " 1169964, 1187974, 1141006, 1186031, 1188817, 1193232, 1186336, 1186348,\n", - " 1152115, 1162502, 1169703, 1169707, 1189655, 1177468, 1183370, 1178265,\n", - " 1156676, 1172423, 1172429, 1178042, 1145395, 1145398, 1183949, 1176829,\n", - " 1152080, 1155959, 1181248, 1179769, 1178315, 1192792, 1185358, 1194332,\n", - " 1189804, 1169397, 1184641], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196011, 1199424, 1199282, 1202245, 1202255, 1201577, 1201582, 1201237,\n", - " 1194626, 1197791, 1195945, 1198697, 1202812, 1198557, 1196573, 1194745,\n", - " 1195726, 1194783, 1195494, 1196631, 1194648, 1195263, 1196529, 1201992,\n", - " 1196030, 1198543, 1197697, 1195895, 1196359, 1194766, 1195325, 1196840,\n", - " 1198958, 1195147, 1195149, 1195265, 1197141, 1197375, 1196109, 1198219,\n", - " 1198915, 1198195, 1197478, 1195759, 1197640, 1202017, 1195918, 1196283,\n", - " 1197291, 1197574, 1199628, 1197674, 1197676, 1199579, 1194786, 1196498,\n", - " 1196727, 1196728, 1200892, 1200894, 1198428, 1198811, 1200450, 1200507,\n", - " 1201079, 1201156, 1200918, 1201042, 1201043, 1199532, 1200553, 1199887,\n", - " 1203222, 1196768, 1200899, 1200907, 1200189, 1198478, 1195607, 1199925,\n", - " 1196966, 1200784, 1199606, 1200633, 1195676, 1195679, 1196929, 1198929,\n", - " 1198943, 1198908, 1202754, 1195181, 1197821, 1196480, 1202269, 1194720,\n", - " 1194732, 1198147, 1200003, 1197735, 1197593, 1200974, 1197652, 1197655,\n", - " 1201875, 1198996, 1196424, 1198751], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196011, 1199424, 1199282, 1202245, 1202255, 1201577, 1201582, 1201237,\n", - " 1194626, 1197791, 1195945, 1198697, 1202812, 1198557, 1196573, 1194745,\n", - " 1195726, 1194783, 1195494, 1196631, 1194648, 1195263, 1196529, 1201992,\n", - " 1196030, 1198543, 1197697, 1195895, 1196359, 1194766, 1195325, 1196840,\n", - " 1198958, 1195147, 1195149, 1195265, 1197141, 1197375, 1196109, 1198219,\n", - " 1198915, 1198195, 1197478, 1195759, 1197640, 1202017, 1195918, 1196283,\n", - " 1197291, 1197574, 1199628, 1197674, 1197676, 1199579, 1194786, 1196498,\n", - " 1196727, 1196728, 1200892, 1200894, 1198428, 1198811, 1200450, 1200507,\n", - " 1201079, 1201156, 1200918, 1201042, 1201043, 1199532, 1200553, 1199887,\n", - " 1203222, 1196768, 1200899, 1200907, 1200189, 1198478, 1195607, 1199925,\n", - " 1196966, 1200784, 1199606, 1200633, 1195676, 1195679, 1196929, 1198929,\n", - " 1198943, 1198908, 1202754, 1195181, 1197821, 1196480, 1202269, 1194720,\n", - " 1194732, 1198147, 1200003, 1197735, 1197593, 1200974, 1197652, 1197655,\n", - " 1201875, 1198996, 1196424, 1198751], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 7.7796e-02, -1.9874e-04, 4.0902e-01, ..., 4.8687e-02,\n", - " -1.0159e-03, -3.0544e-03],\n", - " [ 6.4172e-02, -2.0140e-04, 4.3267e-01, ..., 6.0631e-02,\n", - " -1.0676e-03, -3.2055e-03],\n", - " [ 3.9653e-02, -2.7024e-04, 3.9715e-01, ..., 8.1262e-02,\n", - " -1.3133e-03, -3.0062e-03],\n", - " ...,\n", - " [ 5.3783e-02, -1.7980e-04, 4.2919e-01, ..., 6.0471e-02,\n", - " -1.0692e-03, -3.1928e-03],\n", - " [ 3.3684e-02, -1.6188e-04, 4.0024e-01, ..., 1.1158e-01,\n", - " -1.6397e-03, -2.8684e-03],\n", - " [ 5.5282e-02, -2.9896e-05, 4.6677e-01, ..., 6.9384e-02,\n", - " -1.1177e-03, -3.3423e-03]], device='cuda:0'), 'paper': tensor([[ 1.6010, -0.0246, 0.6798, ..., -0.0083, -0.0239, 2.3777],\n", - " [ 1.1741, -0.0454, 0.3673, ..., -0.0178, -0.0228, 0.9806],\n", - " [ 1.4451, -0.0308, 0.3510, ..., -0.0119, -0.0209, 1.9141],\n", - " ...,\n", - " [ 0.8567, -0.0294, -0.0034, ..., -0.0120, -0.0192, 1.3344],\n", - " [ 0.6867, -0.0166, 0.0595, ..., -0.0108, -0.0138, 0.6791],\n", - " [ 1.7653, -0.0273, 0.5523, ..., -0.0070, -0.0266, 3.0635]],\n", - " device='cuda:0'), 'author': tensor([[ 0.1426, -0.0007, 0.0207, ..., 0.5240, 0.0470, 0.2117],\n", - " [ 0.1793, -0.0018, 0.0593, ..., 0.6562, 0.1621, 0.2738],\n", - " [-0.0016, 0.0630, 0.1009, ..., 0.4133, 0.0147, 0.0441],\n", - " ...,\n", - " [ 0.1974, -0.0012, 0.0567, ..., 0.6505, 0.0666, 0.1958],\n", - " [ 0.1251, 0.0118, 0.0845, ..., 0.5577, -0.0012, 0.1166],\n", - " [ 0.2717, -0.0015, 0.0199, ..., 0.6529, 0.1966, 0.3064]],\n", - " device='cuda:0'), 'field_of_study': tensor([[-1.6911e-03, 1.0349e-01, 1.1919e-01, ..., -2.1231e-03,\n", - " -1.5064e-03, -1.9119e-03],\n", - " [-2.1273e-03, 9.0518e-02, 1.0686e-01, ..., -1.7824e-03,\n", - " -6.4513e-04, -3.3209e-03],\n", - " [-1.1448e-03, 1.1320e-01, 5.8920e-02, ..., -2.1104e-03,\n", - " -1.9004e-04, -3.0483e-03],\n", - " ...,\n", - " [-3.4528e-03, 2.3384e-01, 4.0375e-02, ..., 5.0362e-03,\n", - " -1.3455e-04, -2.4451e-03],\n", - " [-1.9080e-03, -2.0137e-04, 9.5803e-02, ..., -1.4902e-03,\n", - " -9.1697e-04, -2.7262e-03],\n", - " [-3.1896e-03, 1.3444e-01, 1.3815e-01, ..., 3.3876e-02,\n", - " -1.6428e-03, -3.2879e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 173, 203, 203, 211, 211, 244, 272, 298, 244, 339, 227, 517,\n", - " 517, 357, 769, 540, 820, 394, 659, 818, 878, 1030, 1030, 827,\n", - " 723, 986, 845, 1051, 990, 1050, 1050, 1071, 1356, 1375, 1192, 1272,\n", - " 1268, 1268, 1268, 1273, 1264, 1664, 1452, 1418, 1491, 1585, 1493, 1493,\n", - " 1493, 1595, 1595, 1826, 1826, 1826, 1744, 1773, 1881, 1761, 1896, 1778,\n", - " 1969, 2083, 2254, 2059, 2279, 2279, 2279, 2307, 2216, 2399, 2310, 2415,\n", - " 2462, 2397, 2397, 2471, 2384, 2384, 2625, 2639, 2641, 2641, 2638, 2678,\n", - " 2693, 2941, 2857, 2727, 2847, 2622, 2948, 2972, 2972, 3051, 3051, 3069,\n", - " 3150, 3150, 3269, 3269, 3206, 3167, 3224, 3224, 3162, 3555, 3720, 3775,\n", - " 3598, 3665, 3523, 3857, 3887, 3905, 3894, 3802, 3802, 3852, 3898, 4032,\n", - " 4149, 4205, 4317, 4325, 4413, 4210, 4313, 4500, 4624, 4587, 4750, 4536,\n", - " 4808, 4721, 4782, 4986, 4829, 4832, 4813, 5108, 5011, 5011, 5194, 5194,\n", - " 5256, 5205, 5296, 5446, 5663, 5683, 5792, 5588, 5588, 5597, 5597, 5597,\n", - " 5815, 5572, 5754, 5819, 5741, 5741, 5741, 5741, 5713, 5713],\n", - " [ 56, 90, 34, 106, 72, 82, 23, 50, 59, 56, 34, 76,\n", - " 39, 80, 44, 86, 74, 84, 50, 51, 75, 102, 47, 11,\n", - " 81, 56, 96, 77, 97, 44, 76, 37, 83, 41, 10, 33,\n", - " 61, 53, 42, 15, 1, 22, 68, 21, 56, 62, 66, 67,\n", - " 7, 44, 77, 64, 97, 0, 105, 83, 2, 22, 31, 32,\n", - " 82, 21, 49, 60, 65, 82, 32, 96, 13, 58, 11, 87,\n", - " 86, 80, 52, 14, 71, 41, 1, 48, 73, 55, 21, 22,\n", - " 100, 8, 32, 104, 96, 48, 21, 94, 93, 54, 44, 31,\n", - " 88, 19, 50, 75, 9, 8, 79, 103, 28, 98, 30, 12,\n", - " 85, 84, 6, 50, 99, 16, 95, 29, 21, 41, 13, 13,\n", - " 35, 21, 43, 5, 26, 46, 89, 95, 21, 56, 24, 107,\n", - " 62, 17, 20, 50, 63, 56, 2, 56, 50, 3, 56, 69,\n", - " 91, 92, 25, 101, 56, 78, 56, 40, 4, 38, 54, 36,\n", - " 70, 18, 87, 24, 4, 57, 102, 56, 27, 45]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3758, 895, 895, ..., 6294, 1819, 6554],\n", - " [ 182, 46, 68, ..., 7296, 7296, 7420]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 37, 67, 37, ..., 41, 88, 56],\n", - " [ 91, 82, 5, ..., 5769, 5833, 5828]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 73, 73, 73, ..., 7408, 7408, 7361],\n", - " [ 241, 163, 486, ..., 317, 109, 317]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 373, 305, 194, ..., 259, 373, 78],\n", - " [ 25, 250, 138, ..., 7320, 7373, 7334]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4355, 608, 1715, ..., 4451, 6540, 983],\n", - " [ 122, 187, 187, ..., 5719, 5860, 5842]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 69, 69, 69, ..., 7408, 7408, 7415],\n", - " [2496, 4740, 4914, ..., 4609, 360, 23]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 173, 173, 173, ..., 5824, 5824, 5824],\n", - " [3768, 3758, 3882, ..., 6742, 4574, 6934]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006644\n", - "sampling 0.00648\n", - "noi time: 0.001944\n", - "get_vertex_data call: 0.038107\n", - "noi group time: 0.003511\n", - "eoi_group_time: 0.01614\n", - "second half: 0.223916\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 31145, 24187, ..., 1132919, 1118700, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 31145, 24187, ..., 1132919, 1118700, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227498, 1219063, 1212302, ..., 1935105, 1937005, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227498, 1219063, 1212302, ..., 1935105, 1937005, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1141424, 1140282, 1140285, 1135926, 1135716, 1135727, 1140785,\n", - " 1141756, 1141758, 1140297, 1142802, 1136156, 1142525, 1136969, 1136971,\n", - " 1146803, 1138897, 1145992, 1143362, 1143372, 1139241, 1146640, 1146646,\n", - " 1139615, 1148983, 1150497, 1139866, 1134937, 1149216, 1149219, 1155686,\n", - " 1147473, 1147483, 1147486, 1142892, 1142881, 1153948, 1144636, 1146992,\n", - " 1135950, 1148346, 1146656, 1146666, 1146471, 1152666, 1152664, 1147094,\n", - " 1137220, 1150555, 1155014, 1147211, 1136685, 1136268, 1134667, 1140304,\n", - " 1140540, 1138112, 1138356, 1153463, 1134735, 1140953, 1135367, 1135202,\n", - " 1140767, 1135903, 1136039, 1141036, 1134794, 1157443, 1157450, 1136518,\n", - " 1157088, 1137693, 1136619, 1136621, 1144786, 1144793, 1144390, 1144395,\n", - " 1137529, 1137534, 1135418, 1157395, 1157397, 1152376, 1136662, 1137441,\n", - " 1136204, 1156159, 1135583, 1142593, 1136105, 1135239, 1140970, 1138514,\n", - " 1153099, 1137953, 1158136, 1145132, 1156899, 1135522, 1135535, 1138305,\n", - " 1157703, 1138436, 1138440, 1140079, 1138450, 1138461, 1138449, 1137494,\n", - " 1137491, 1137493, 1149328, 1138846, 1135088, 1135090, 1135101, 1138696,\n", - " 1138882, 1156606, 1147112, 1142611, 1160827, 1135618, 1156137, 1138185,\n", - " 1145842, 1145843, 1148531, 1135772, 1139844, 1139667, 1139673, 1134992,\n", - " 1142439, 1142793, 1152651, 1135776, 1135786, 1136734, 1158971, 1141065,\n", - " 1141070, 1143631, 1140034, 1137587, 1138646, 1146065, 1146075, 1152044,\n", - " 1140657, 1137741, 1137728, 1140904, 1138240, 1135549, 1136697, 1141088,\n", - " 1149001, 1136384, 1143767, 1137298, 1137305, 1143711, 1143221, 1143225,\n", - " 1146832, 1141688, 1136625, 1141224, 1136917, 1139731, 1145066, 1140592,\n", - " 1141155, 1141786, 1144937, 1136752, 1134987, 1147850, 1164807, 1165291,\n", - " 1137087, 1137074, 1139803, 1142050, 1142093, 1145162, 1145161, 1143202,\n", - " 1158746, 1158749, 1158595, 1141479, 1141472, 1138708, 1140110, 1144596,\n", - " 1136864, 1145298, 1135327, 1141392, 1144182, 1144184, 1144865, 1146194,\n", - " 1158692, 1138529, 1138539, 1161710, 1141367, 1141374, 1153069, 1151119,\n", - " 1138293, 1144279, 1139508, 1139510, 1145001, 1140619, 1147892, 1140976,\n", - " 1147050, 1155835, 1152976, 1152988, 1142547, 1138995, 1141925, 1144242,\n", - " 1168728, 1141842, 1163658, 1136275, 1142098, 1146024, 1150603, 1138085,\n", - " 1154328, 1141585, 1141235, 1139990, 1143293, 1143294, 1151124, 1147549,\n", - " 1147540, 1148763, 1147282, 1136330, 1149155, 1140337, 1140341, 1147458,\n", - " 1142637, 1149366, 1139417, 1139418, 1149608, 1143051, 1136160, 1136167,\n", - " 1138927, 1157720, 1136836, 1146105, 1139329, 1138238, 1139055, 1144957,\n", - " 1142159, 1145427, 1143345, 1137098, 1144081, 1135874, 1135876, 1150294,\n", - " 1144375, 1146514, 1146523, 1143960, 1138024, 1143456, 1143457, 1144291,\n", - " 1143937, 1143799, 1146636, 1147524, 1140364, 1137990, 1137994, 1144731,\n", - " 1147984, 1147999, 1148704, 1159719, 1162724, 1152328, 1149722, 1147025,\n", - " 1142858, 1147971, 1145021, 1158226, 1158228, 1147872, 1149871, 1145237,\n", - " 1145240, 1145750, 1145751, 1142370, 1146178, 1151236, 1151242, 1150274,\n", - " 1150445, 1149258, 1148928, 1148822, 1154438, 1149791, 1144526, 1145833,\n", - " 1151994, 1165252, 1151473, 1139919, 1139906, 1146723, 1150127, 1148278,\n", - " 1146768, 1146772, 1141278, 1170087, 1148744, 1137647, 1154985, 1147653,\n", - " 1143560, 1149412, 1148288, 1152073, 1151361, 1136251, 1139718, 1146682,\n", - " 1146684, 1152494, 1157968, 1157983, 1148724, 1148729, 1145862, 1171341,\n", - " 1146544, 1143971, 1148204, 1145111, 1155545, 1150929, 1150935, 1148056,\n", - " 1144849, 1150356, 1148084, 1147442, 1151811, 1151816, 1152581, 1160681,\n", - " 1148498, 1148505, 1149732, 1146565, 1141420, 1151348, 1146974, 1156402,\n", - " 1146623, 1144467, 1152097, 1152106, 1153038, 1137746, 1137755, 1146304,\n", - " 1152622, 1149203, 1152826, 1155337, 1154123, 1152673, 1151617, 1151623,\n", - " 1136131, 1136132, 1148914, 1152944, 1153387, 1144529, 1145957, 1173503,\n", - " 1152341, 1153311, 1138281, 1157138, 1152297, 1156001, 1136028, 1136029,\n", - " 1152928, 1155780, 1151064, 1151067, 1156396, 1156399, 1152888, 1143483,\n", - " 1150110, 1137405, 1150150, 1148033, 1148040, 1145656, 1137048, 1148628,\n", - " 1158530, 1158540, 1148383, 1137458, 1154381, 1157229, 1150872, 1158919,\n", - " 1156501, 1156505, 1152384, 1157067, 1155418, 1152833, 1145191, 1137819,\n", - " 1157563, 1152179, 1151788, 1152737, 1156942, 1135643, 1135645, 1135634,\n", - " 1147810, 1139525, 1158304, 1158308, 1137971, 1150130, 1140877, 1154530,\n", - " 1153985, 1142755, 1156207, 1157642, 1151379, 1158626, 1158633, 1155122,\n", - " 1157183, 1155748, 1155755, 1135396, 1156463, 1158096, 1168230, 1155628,\n", - " 1158492, 1154547, 1158574, 1158824, 1153712, 1153715, 1158325, 1148835,\n", - " 1155646, 1158361, 1143254, 1162384, 1139619, 1137359, 1154902, 1154911,\n", - " 1143189, 1157439, 1157430, 1144715, 1157934, 1137152, 1158996, 1137380,\n", - " 1159117, 1145693, 1140918, 1135601, 1145508, 1148147, 1157685, 1140633,\n", - " 1159213, 1140380, 1140374, 1157733, 1157735, 1160426, 1155975, 1142073,\n", - " 1142076, 1158840, 1155403, 1149696, 1136896, 1158886, 1140213, 1140215,\n", - " 1158444, 1155240, 1164181, 1156665, 1155299, 1136646, 1142178, 1157809,\n", - " 1158558, 1161161, 1146114, 1146126, 1164524, 1155869, 1154345, 1163183,\n", - " 1150011, 1155529, 1161539, 1142493, 1150684, 1157747, 1162683, 1159042,\n", - " 1159052, 1165838, 1167587, 1142426, 1158301, 1157946, 1160563, 1153052,\n", - " 1153045, 1171551, 1173005, 1159738, 1153842, 1156096, 1156107, 1138393,\n", - " 1150033, 1150035, 1150046, 1147300, 1171995, 1146873, 1157600, 1138161,\n", - " 1164006, 1156787, 1149963, 1139281, 1157246, 1148769, 1146063, 1159924,\n", - " 1146356, 1140130, 1140641, 1140643, 1141862, 1148600, 1148603, 1143139,\n", - " 1156358, 1156181, 1159032, 1169108, 1152247, 1143729, 1170100, 1155588,\n", - " 1164592, 1169636, 1153239, 1162577, 1153201, 1151650, 1147427, 1163795,\n", - " 1157955, 1150646, 1168748, 1144812, 1162085, 1162080, 1164741, 1142733,\n", - " 1156303, 1167332, 1148683, 1163935, 1170316, 1144973, 1162517, 1169212,\n", - " 1145447, 1165746, 1147355, 1152624, 1148124, 1139359, 1139345, 1145892,\n", - " 1145900, 1145902, 1168659, 1152203, 1143404, 1149560, 1171268, 1144690,\n", - " 1145674, 1149487, 1155169, 1155172, 1150524, 1146605, 1144346, 1144336,\n", - " 1157534, 1138382, 1147750, 1154670, 1135854, 1154882, 1169164, 1169162,\n", - " 1157331, 1138129, 1141045, 1169358, 1154353, 1149452, 1149446, 1146337,\n", - " 1158623, 1173047, 1172877, 1149846, 1149847, 1165899, 1169941, 1155489,\n", - " 1155502, 1152353, 1143859, 1155927, 1161130, 1170059, 1148335, 1173307,\n", - " 1169144, 1154027, 1153751, 1153754, 1175363, 1169572, 1169583, 1157153,\n", - " 1151848, 1151850, 1148128, 1173796, 1135018, 1175877, 1172941, 1153428,\n", - " 1169083, 1170874, 1154148, 1165672, 1149169, 1149173, 1186117, 1143420,\n", - " 1179243, 1171302, 1181241, 1153803, 1153141, 1174076, 1180817, 1151509,\n", - " 1178914, 1178920, 1155262, 1154718, 1157795, 1143341, 1171623, 1157124,\n", - " 1171738, 1183702, 1180383, 1178756, 1161068, 1179086, 1182266, 1149755,\n", - " 1181345, 1153609, 1153612, 1155990, 1158512, 1166622, 1158380, 1158382,\n", - " 1155899, 1162986, 1157270, 1170638, 1170628, 1187783, 1168892, 1182337,\n", - " 1181342, 1170257, 1181783, 1147169, 1147182, 1168943, 1172174, 1156528,\n", - " 1139828, 1139831, 1154812, 1156055, 1191480, 1192214, 1180050, 1190922,\n", - " 1174516, 1193360, 1191200, 1191167, 1192888, 1140997, 1162156, 1170157,\n", - " 1151774, 1181693, 1172339, 1169707, 1161857, 1187764, 1191414, 1187550,\n", - " 1191259, 1192681, 1157017, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1141424, 1140282, 1140285, 1135926, 1135716, 1135727, 1140785,\n", - " 1141756, 1141758, 1140297, 1142802, 1136156, 1142525, 1136969, 1136971,\n", - " 1146803, 1138897, 1145992, 1143362, 1143372, 1139241, 1146640, 1146646,\n", - " 1139615, 1148983, 1150497, 1139866, 1134937, 1149216, 1149219, 1155686,\n", - " 1147473, 1147483, 1147486, 1142892, 1142881, 1153948, 1144636, 1146992,\n", - " 1135950, 1148346, 1146656, 1146666, 1146471, 1152666, 1152664, 1147094,\n", - " 1137220, 1150555, 1155014, 1147211, 1136685, 1136268, 1134667, 1140304,\n", - " 1140540, 1138112, 1138356, 1153463, 1134735, 1140953, 1135367, 1135202,\n", - " 1140767, 1135903, 1136039, 1141036, 1134794, 1157443, 1157450, 1136518,\n", - " 1157088, 1137693, 1136619, 1136621, 1144786, 1144793, 1144390, 1144395,\n", - " 1137529, 1137534, 1135418, 1157395, 1157397, 1152376, 1136662, 1137441,\n", - " 1136204, 1156159, 1135583, 1142593, 1136105, 1135239, 1140970, 1138514,\n", - " 1153099, 1137953, 1158136, 1145132, 1156899, 1135522, 1135535, 1138305,\n", - " 1157703, 1138436, 1138440, 1140079, 1138450, 1138461, 1138449, 1137494,\n", - " 1137491, 1137493, 1149328, 1138846, 1135088, 1135090, 1135101, 1138696,\n", - " 1138882, 1156606, 1147112, 1142611, 1160827, 1135618, 1156137, 1138185,\n", - " 1145842, 1145843, 1148531, 1135772, 1139844, 1139667, 1139673, 1134992,\n", - " 1142439, 1142793, 1152651, 1135776, 1135786, 1136734, 1158971, 1141065,\n", - " 1141070, 1143631, 1140034, 1137587, 1138646, 1146065, 1146075, 1152044,\n", - " 1140657, 1137741, 1137728, 1140904, 1138240, 1135549, 1136697, 1141088,\n", - " 1149001, 1136384, 1143767, 1137298, 1137305, 1143711, 1143221, 1143225,\n", - " 1146832, 1141688, 1136625, 1141224, 1136917, 1139731, 1145066, 1140592,\n", - " 1141155, 1141786, 1144937, 1136752, 1134987, 1147850, 1164807, 1165291,\n", - " 1137087, 1137074, 1139803, 1142050, 1142093, 1145162, 1145161, 1143202,\n", - " 1158746, 1158749, 1158595, 1141479, 1141472, 1138708, 1140110, 1144596,\n", - " 1136864, 1145298, 1135327, 1141392, 1144182, 1144184, 1144865, 1146194,\n", - " 1158692, 1138529, 1138539, 1161710, 1141367, 1141374, 1153069, 1151119,\n", - " 1138293, 1144279, 1139508, 1139510, 1145001, 1140619, 1147892, 1140976,\n", - " 1147050, 1155835, 1152976, 1152988, 1142547, 1138995, 1141925, 1144242,\n", - " 1168728, 1141842, 1163658, 1136275, 1142098, 1146024, 1150603, 1138085,\n", - " 1154328, 1141585, 1141235, 1139990, 1143293, 1143294, 1151124, 1147549,\n", - " 1147540, 1148763, 1147282, 1136330, 1149155, 1140337, 1140341, 1147458,\n", - " 1142637, 1149366, 1139417, 1139418, 1149608, 1143051, 1136160, 1136167,\n", - " 1138927, 1157720, 1136836, 1146105, 1139329, 1138238, 1139055, 1144957,\n", - " 1142159, 1145427, 1143345, 1137098, 1144081, 1135874, 1135876, 1150294,\n", - " 1144375, 1146514, 1146523, 1143960, 1138024, 1143456, 1143457, 1144291,\n", - " 1143937, 1143799, 1146636, 1147524, 1140364, 1137990, 1137994, 1144731,\n", - " 1147984, 1147999, 1148704, 1159719, 1162724, 1152328, 1149722, 1147025,\n", - " 1142858, 1147971, 1145021, 1158226, 1158228, 1147872, 1149871, 1145237,\n", - " 1145240, 1145750, 1145751, 1142370, 1146178, 1151236, 1151242, 1150274,\n", - " 1150445, 1149258, 1148928, 1148822, 1154438, 1149791, 1144526, 1145833,\n", - " 1151994, 1165252, 1151473, 1139919, 1139906, 1146723, 1150127, 1148278,\n", - " 1146768, 1146772, 1141278, 1170087, 1148744, 1137647, 1154985, 1147653,\n", - " 1143560, 1149412, 1148288, 1152073, 1151361, 1136251, 1139718, 1146682,\n", - " 1146684, 1152494, 1157968, 1157983, 1148724, 1148729, 1145862, 1171341,\n", - " 1146544, 1143971, 1148204, 1145111, 1155545, 1150929, 1150935, 1148056,\n", - " 1144849, 1150356, 1148084, 1147442, 1151811, 1151816, 1152581, 1160681,\n", - " 1148498, 1148505, 1149732, 1146565, 1141420, 1151348, 1146974, 1156402,\n", - " 1146623, 1144467, 1152097, 1152106, 1153038, 1137746, 1137755, 1146304,\n", - " 1152622, 1149203, 1152826, 1155337, 1154123, 1152673, 1151617, 1151623,\n", - " 1136131, 1136132, 1148914, 1152944, 1153387, 1144529, 1145957, 1173503,\n", - " 1152341, 1153311, 1138281, 1157138, 1152297, 1156001, 1136028, 1136029,\n", - " 1152928, 1155780, 1151064, 1151067, 1156396, 1156399, 1152888, 1143483,\n", - " 1150110, 1137405, 1150150, 1148033, 1148040, 1145656, 1137048, 1148628,\n", - " 1158530, 1158540, 1148383, 1137458, 1154381, 1157229, 1150872, 1158919,\n", - " 1156501, 1156505, 1152384, 1157067, 1155418, 1152833, 1145191, 1137819,\n", - " 1157563, 1152179, 1151788, 1152737, 1156942, 1135643, 1135645, 1135634,\n", - " 1147810, 1139525, 1158304, 1158308, 1137971, 1150130, 1140877, 1154530,\n", - " 1153985, 1142755, 1156207, 1157642, 1151379, 1158626, 1158633, 1155122,\n", - " 1157183, 1155748, 1155755, 1135396, 1156463, 1158096, 1168230, 1155628,\n", - " 1158492, 1154547, 1158574, 1158824, 1153712, 1153715, 1158325, 1148835,\n", - " 1155646, 1158361, 1143254, 1162384, 1139619, 1137359, 1154902, 1154911,\n", - " 1143189, 1157439, 1157430, 1144715, 1157934, 1137152, 1158996, 1137380,\n", - " 1159117, 1145693, 1140918, 1135601, 1145508, 1148147, 1157685, 1140633,\n", - " 1159213, 1140380, 1140374, 1157733, 1157735, 1160426, 1155975, 1142073,\n", - " 1142076, 1158840, 1155403, 1149696, 1136896, 1158886, 1140213, 1140215,\n", - " 1158444, 1155240, 1164181, 1156665, 1155299, 1136646, 1142178, 1157809,\n", - " 1158558, 1161161, 1146114, 1146126, 1164524, 1155869, 1154345, 1163183,\n", - " 1150011, 1155529, 1161539, 1142493, 1150684, 1157747, 1162683, 1159042,\n", - " 1159052, 1165838, 1167587, 1142426, 1158301, 1157946, 1160563, 1153052,\n", - " 1153045, 1171551, 1173005, 1159738, 1153842, 1156096, 1156107, 1138393,\n", - " 1150033, 1150035, 1150046, 1147300, 1171995, 1146873, 1157600, 1138161,\n", - " 1164006, 1156787, 1149963, 1139281, 1157246, 1148769, 1146063, 1159924,\n", - " 1146356, 1140130, 1140641, 1140643, 1141862, 1148600, 1148603, 1143139,\n", - " 1156358, 1156181, 1159032, 1169108, 1152247, 1143729, 1170100, 1155588,\n", - " 1164592, 1169636, 1153239, 1162577, 1153201, 1151650, 1147427, 1163795,\n", - " 1157955, 1150646, 1168748, 1144812, 1162085, 1162080, 1164741, 1142733,\n", - " 1156303, 1167332, 1148683, 1163935, 1170316, 1144973, 1162517, 1169212,\n", - " 1145447, 1165746, 1147355, 1152624, 1148124, 1139359, 1139345, 1145892,\n", - " 1145900, 1145902, 1168659, 1152203, 1143404, 1149560, 1171268, 1144690,\n", - " 1145674, 1149487, 1155169, 1155172, 1150524, 1146605, 1144346, 1144336,\n", - " 1157534, 1138382, 1147750, 1154670, 1135854, 1154882, 1169164, 1169162,\n", - " 1157331, 1138129, 1141045, 1169358, 1154353, 1149452, 1149446, 1146337,\n", - " 1158623, 1173047, 1172877, 1149846, 1149847, 1165899, 1169941, 1155489,\n", - " 1155502, 1152353, 1143859, 1155927, 1161130, 1170059, 1148335, 1173307,\n", - " 1169144, 1154027, 1153751, 1153754, 1175363, 1169572, 1169583, 1157153,\n", - " 1151848, 1151850, 1148128, 1173796, 1135018, 1175877, 1172941, 1153428,\n", - " 1169083, 1170874, 1154148, 1165672, 1149169, 1149173, 1186117, 1143420,\n", - " 1179243, 1171302, 1181241, 1153803, 1153141, 1174076, 1180817, 1151509,\n", - " 1178914, 1178920, 1155262, 1154718, 1157795, 1143341, 1171623, 1157124,\n", - " 1171738, 1183702, 1180383, 1178756, 1161068, 1179086, 1182266, 1149755,\n", - " 1181345, 1153609, 1153612, 1155990, 1158512, 1166622, 1158380, 1158382,\n", - " 1155899, 1162986, 1157270, 1170638, 1170628, 1187783, 1168892, 1182337,\n", - " 1181342, 1170257, 1181783, 1147169, 1147182, 1168943, 1172174, 1156528,\n", - " 1139828, 1139831, 1154812, 1156055, 1191480, 1192214, 1180050, 1190922,\n", - " 1174516, 1193360, 1191200, 1191167, 1192888, 1140997, 1162156, 1170157,\n", - " 1151774, 1181693, 1172339, 1169707, 1161857, 1187764, 1191414, 1187550,\n", - " 1191259, 1192681, 1157017, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197178, 1198769, 1197719, 1198730, 1195860, 1199282, 1198459,\n", - " 1198832, 1198844, 1201582, 1202119, 1194626, 1199248, 1201016, 1198557,\n", - " 1196685, 1194745, 1195494, 1195511, 1195263, 1196537, 1201992, 1198542,\n", - " 1198543, 1195888, 1202902, 1195740, 1196979, 1196618, 1197831, 1194663,\n", - " 1195313, 1195325, 1196837, 1198367, 1198163, 1198164, 1199823, 1195148,\n", - " 1195221, 1197141, 1197265, 1198219, 1195850, 1195038, 1195659, 1195541,\n", - " 1198203, 1196122, 1197640, 1196393, 1196283, 1195353, 1200959, 1197291,\n", - " 1199185, 1194928, 1195119, 1197583, 1199628, 1200869, 1200872, 1199038,\n", - " 1200404, 1199231, 1201916, 1201511, 1197601, 1197603, 1197611, 1197609,\n", - " 1196727, 1195771, 1195773, 1200893, 1198416, 1200018, 1199410, 1199421,\n", - " 1195557, 1200450, 1200169, 1200501, 1199445, 1202635, 1200913, 1200918,\n", - " 1194803, 1194805, 1198488, 1200429, 1197097, 1199887, 1201756, 1200195,\n", - " 1196768, 1201442, 1200907, 1199976, 1202175, 1201291, 1196761, 1196960,\n", - " 1200784, 1194846, 1199606, 1198521, 1195676, 1195664, 1197334, 1198932,\n", - " 1200684, 1197816, 1197822, 1197821, 1201499, 1202269, 1200003, 1198824,\n", - " 1197735, 1200437, 1202777, 1199783, 1199787, 1198819, 1198848, 1200468,\n", - " 1200974, 1195066, 1201886, 1200301, 1200302, 1197652, 1195082, 1201361,\n", - " 1203162], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197178, 1198769, 1197719, 1198730, 1195860, 1199282, 1198459,\n", - " 1198832, 1198844, 1201582, 1202119, 1194626, 1199248, 1201016, 1198557,\n", - " 1196685, 1194745, 1195494, 1195511, 1195263, 1196537, 1201992, 1198542,\n", - " 1198543, 1195888, 1202902, 1195740, 1196979, 1196618, 1197831, 1194663,\n", - " 1195313, 1195325, 1196837, 1198367, 1198163, 1198164, 1199823, 1195148,\n", - " 1195221, 1197141, 1197265, 1198219, 1195850, 1195038, 1195659, 1195541,\n", - " 1198203, 1196122, 1197640, 1196393, 1196283, 1195353, 1200959, 1197291,\n", - " 1199185, 1194928, 1195119, 1197583, 1199628, 1200869, 1200872, 1199038,\n", - " 1200404, 1199231, 1201916, 1201511, 1197601, 1197603, 1197611, 1197609,\n", - " 1196727, 1195771, 1195773, 1200893, 1198416, 1200018, 1199410, 1199421,\n", - " 1195557, 1200450, 1200169, 1200501, 1199445, 1202635, 1200913, 1200918,\n", - " 1194803, 1194805, 1198488, 1200429, 1197097, 1199887, 1201756, 1200195,\n", - " 1196768, 1201442, 1200907, 1199976, 1202175, 1201291, 1196761, 1196960,\n", - " 1200784, 1194846, 1199606, 1198521, 1195676, 1195664, 1197334, 1198932,\n", - " 1200684, 1197816, 1197822, 1197821, 1201499, 1202269, 1200003, 1198824,\n", - " 1197735, 1200437, 1202777, 1199783, 1199787, 1198819, 1198848, 1200468,\n", - " 1200974, 1195066, 1201886, 1200301, 1200302, 1197652, 1195082, 1201361,\n", - " 1203162], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.2270e-01, -5.2834e-04, 5.2463e-01, ..., 5.1712e-02,\n", - " -1.3056e-03, -4.0549e-03],\n", - " [ 1.0329e-01, -5.9672e-04, 4.5708e-01, ..., 6.8346e-02,\n", - " -1.3911e-03, -3.5189e-03],\n", - " [ 6.0313e-02, -3.2558e-04, 4.1688e-01, ..., 6.3360e-02,\n", - " -1.0580e-03, -3.0536e-03],\n", - " ...,\n", - " [ 4.7671e-02, -2.5708e-04, 4.7734e-01, ..., 7.7678e-02,\n", - " -9.7571e-04, -3.4390e-03],\n", - " [ 3.5249e-02, -3.5525e-04, 3.8741e-01, ..., 9.8386e-02,\n", - " -1.4251e-03, -3.0071e-03],\n", - " [ 6.7908e-02, -2.1819e-04, 4.1338e-01, ..., 1.1006e-01,\n", - " -1.5215e-03, -2.8692e-03]], device='cuda:0'), 'paper': tensor([[ 1.2789e+00, -2.6164e-02, 1.6590e-01, ..., -1.0949e-02,\n", - " -1.7934e-02, 1.4611e+00],\n", - " [ 1.2721e+00, -3.8421e-02, 3.3734e-01, ..., -1.8079e-02,\n", - " -2.0914e-02, 7.7082e-01],\n", - " [ 7.6338e-01, -1.9131e-02, 1.1839e-01, ..., -1.0224e-02,\n", - " -1.6108e-02, 8.2478e-01],\n", - " ...,\n", - " [ 6.2376e-01, -1.8812e-02, -2.4426e-03, ..., -9.3247e-03,\n", - " -1.4503e-02, 9.6191e-01],\n", - " [ 5.0312e-01, -1.6108e-02, -3.6643e-03, ..., -7.3992e-03,\n", - " -1.1959e-02, 8.1055e-01],\n", - " [ 1.7809e+00, -2.7250e-02, 5.5943e-01, ..., -6.9811e-03,\n", - " -2.6680e-02, 3.0712e+00]], device='cuda:0'), 'author': tensor([[ 1.8045e-01, -1.7617e-03, 5.1250e-02, ..., 6.7672e-01,\n", - " 1.3045e-01, 3.2294e-01],\n", - " [ 1.1268e-01, -1.2111e-03, 8.5474e-02, ..., 6.9864e-01,\n", - " 5.8869e-02, 2.1264e-01],\n", - " [ 1.2839e-01, -6.8037e-04, 4.0362e-02, ..., 5.9590e-01,\n", - " 9.0193e-02, 2.3205e-01],\n", - " ...,\n", - " [ 1.3402e-01, -3.1858e-04, 4.1588e-02, ..., 5.7142e-01,\n", - " -7.3840e-04, 1.9756e-01],\n", - " [-5.2906e-04, -3.5063e-05, 1.5153e-01, ..., 1.0313e-01,\n", - " -3.1383e-04, -9.0066e-04],\n", - " [ 2.6399e-01, -1.8211e-03, 3.1515e-02, ..., 6.8638e-01,\n", - " 1.9922e-01, 2.9930e-01]], device='cuda:0'), 'field_of_study': tensor([[-2.6841e-03, 3.1397e-02, 1.7141e-01, ..., -2.5099e-03,\n", - " -6.8030e-04, -2.2015e-03],\n", - " [-1.7196e-03, 5.2058e-02, 7.1653e-02, ..., -1.7128e-03,\n", - " -1.0475e-03, -2.9198e-03],\n", - " [-2.5927e-03, 1.8629e-01, 7.9519e-02, ..., -1.2513e-04,\n", - " -4.8785e-04, -3.7657e-03],\n", - " ...,\n", - " [-2.2571e-03, 1.7102e-01, 1.3886e-01, ..., -1.5795e-03,\n", - " -2.6052e-04, -4.0794e-03],\n", - " [-1.6227e-03, 1.0725e-01, 1.2120e-01, ..., -2.5599e-03,\n", - " -9.4005e-04, -3.6344e-03],\n", - " [-3.5216e-03, 2.6669e-01, 3.4963e-02, ..., 8.7776e-02,\n", - " -1.0281e-03, -4.5864e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 217, 220, 36, 60, 125, 200, 200, 48, 243, 243, 243, 243,\n", - " 247, 50, 158, 15, 15, 15, 112, 440, 440, 459, 256, 465,\n", - " 612, 690, 715, 785, 650, 650, 1232, 1232, 1232, 1216, 923, 1012,\n", - " 1528, 1293, 1407, 1452, 1452, 1392, 1392, 1550, 1550, 1550, 1550, 1452,\n", - " 1452, 1416, 1452, 1560, 1564, 1540, 1720, 1663, 1663, 1663, 1544, 1639,\n", - " 1507, 1594, 1768, 1663, 1711, 1653, 1706, 1813, 1924, 1813, 1813, 2032,\n", - " 2007, 2048, 1856, 2007, 2096, 2096, 1956, 1956, 2072, 1977, 2064, 2202,\n", - " 2202, 2202, 2042, 2175, 2227, 2148, 2137, 2437, 2437, 2190, 2252, 2501,\n", - " 2501, 2465, 2559, 2760, 2694, 2837, 2837, 2837, 2838, 2889, 2984, 3417,\n", - " 3313, 3313, 3362, 3362, 3050, 3224, 3217, 3533, 3602, 3667, 3667, 3481,\n", - " 3758, 3758, 3758, 3918, 3716, 3815, 3994, 3994, 3873, 4227, 3949, 3909,\n", - " 3909, 4201, 4200, 4200, 4200, 4130, 4082, 4082, 4109, 4385, 4409, 4510,\n", - " 4447, 4525, 4952, 4691, 4915, 4721, 4932, 4932, 4932, 5039, 5053, 4827,\n", - " 5026, 5026, 5168, 5288, 5250, 5377, 5377, 5250, 5116, 5276, 5269, 5383,\n", - " 5596, 5805, 5805, 5622, 5622, 5619, 5831, 5839, 5784, 5784, 5675, 5832,\n", - " 5939, 6563, 6563, 6219, 6219, 6538, 6491, 6412, 6463, 6463, 6417, 6417,\n", - " 6417, 6340, 6340, 6340, 6792, 6792, 6538, 6538, 6538, 6538, 6422, 6547,\n", - " 6475, 6229, 6229, 6604, 6619, 6619, 6619, 6793, 6793, 6606, 6692, 6775,\n", - " 6596, 6556, 6556, 6604, 6604, 6604, 6776],\n", - " [ 23, 72, 58, 90, 70, 43, 52, 97, 11, 111, 16, 53,\n", - " 62, 47, 6, 82, 5, 75, 109, 118, 42, 94, 40, 119,\n", - " 102, 47, 37, 129, 72, 22, 105, 57, 25, 59, 86, 2,\n", - " 38, 72, 134, 121, 9, 113, 101, 126, 20, 15, 22, 100,\n", - " 117, 95, 39, 112, 20, 71, 106, 101, 22, 104, 7, 135,\n", - " 95, 13, 72, 99, 54, 85, 86, 22, 92, 105, 36, 26,\n", - " 107, 45, 60, 21, 55, 53, 28, 66, 132, 6, 72, 133,\n", - " 87, 47, 49, 65, 1, 72, 27, 122, 31, 41, 84, 8,\n", - " 111, 115, 94, 29, 56, 24, 51, 72, 94, 94, 128, 68,\n", - " 20, 83, 50, 136, 49, 14, 120, 49, 104, 61, 58, 59,\n", - " 54, 17, 88, 72, 32, 94, 29, 69, 72, 97, 95, 18,\n", - " 19, 7, 0, 116, 86, 74, 77, 123, 81, 93, 95, 119,\n", - " 136, 58, 4, 63, 20, 48, 53, 62, 16, 20, 72, 72,\n", - " 114, 131, 68, 25, 72, 72, 124, 10, 94, 30, 127, 67,\n", - " 59, 10, 72, 12, 15, 14, 47, 25, 72, 106, 91, 136,\n", - " 78, 130, 72, 72, 25, 39, 104, 35, 88, 79, 96, 72,\n", - " 88, 45, 46, 72, 110, 64, 76, 61, 98, 72, 4, 104,\n", - " 4, 72, 73, 12, 34, 44, 72, 119, 89, 103, 125, 80,\n", - " 108, 27, 72, 72, 33, 3, 5]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3968, 3752, 3770, ..., 1827, 3471, 635],\n", - " [ 204, 120, 88, ..., 5864, 5957, 5959]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 6, 112, 112, ..., 68, 72, 106],\n", - " [ 137, 31, 106, ..., 6711, 6605, 6814]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 130, 130, 130, ..., 5928, 5928, 6001],\n", - " [ 638, 235, 410, ..., 124, 298, 146]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 297, 419, 755, ..., 100, 419, 384],\n", - " [ 20, 39, 4, ..., 5988, 5990, 5918]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 389, 4785, 4349, ..., 2716, 3028, 1159],\n", - " [ 122, 73, 87, ..., 6735, 6727, 6759]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 130, 68, 114, ..., 6001, 5938, 6011],\n", - " [1117, 1117, 975, ..., 2546, 2614, 2912]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 15, 15, 15, ..., 6692, 6692, 6776],\n", - " [ 475, 5, 756, ..., 3354, 3328, 4559]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006487\n", - "sampling 0.006333\n", - "noi time: 0.00194\n", - "get_vertex_data call: 0.03753\n", - "noi group time: 0.003559\n", - "eoi_group_time: 0.015939\n", - "second half: 0.210821\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31145, 24187, 19416, ..., 1118699, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31145, 24187, 19416, ..., 1118699, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1215973, 1228004, ..., 1926878, 1925037, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1215973, 1228004, ..., 1926878, 1925037, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1141424, 1136228, 1135716, 1137780, 1137791, 1139698, 1141758,\n", - " 1138335, 1136215, 1141250, 1140290, 1142810, 1136969, 1136971, 1141443,\n", - " 1146802, 1138897, 1151164, 1143615, 1139820, 1154771, 1145373, 1138942,\n", - " 1139141, 1146640, 1146641, 1139615, 1150506, 1150509, 1149216, 1155689,\n", - " 1143820, 1149644, 1147483, 1148523, 1149037, 1149038, 1153016, 1134697,\n", - " 1134701, 1152666, 1153220, 1136742, 1150554, 1155014, 1139370, 1139373,\n", - " 1139371, 1150333, 1146371, 1138749, 1140537, 1140540, 1138112, 1151520,\n", - " 1140020, 1135367, 1135202, 1141036, 1136297, 1134794, 1138504, 1136189,\n", - " 1143069, 1157102, 1144395, 1137529, 1157397, 1136662, 1137441, 1139161,\n", - " 1141703, 1135980, 1135240, 1155076, 1140970, 1137957, 1135501, 1154132,\n", - " 1154142, 1145133, 1135522, 1138440, 1138461, 1137493, 1136594, 1154101,\n", - " 1158390, 1138847, 1156605, 1147111, 1147112, 1142611, 1135359, 1156141,\n", - " 1158984, 1150953, 1141533, 1143586, 1138067, 1138069, 1140261, 1134992,\n", - " 1134770, 1142785, 1136546, 1135782, 1139755, 1139321, 1140849, 1140034,\n", - " 1139933, 1141966, 1155648, 1139071, 1140660, 1137734, 1147317, 1147322,\n", - " 1134750, 1137000, 1138240, 1135549, 1141088, 1141099, 1141102, 1144138,\n", - " 1139898, 1145346, 1135291, 1142031, 1143767, 1143225, 1139033, 1146844,\n", - " 1142342, 1136917, 1143678, 1143677, 1145066, 1140601, 1160612, 1139495,\n", - " 1136760, 1134979, 1144422, 1138482, 1143153, 1138708, 1140110, 1143107,\n", - " 1144596, 1148263, 1157420, 1136866, 1136867, 1140885, 1144182, 1161094,\n", - " 1138539, 1147153, 1142650, 1149186, 1141365, 1141367, 1163674, 1151119,\n", - " 1138292, 1153564, 1139508, 1139773, 1139763, 1140089, 1138806, 1139127,\n", - " 1144997, 1144998, 1140616, 1147896, 1140984, 1147050, 1135457, 1142555,\n", - " 1141925, 1144242, 1165366, 1137149, 1140700, 1136891, 1139405, 1137575,\n", - " 1144070, 1143845, 1143851, 1146008, 1146024, 1146025, 1141646, 1139990,\n", - " 1143293, 1143283, 1143294, 1147150, 1148763, 1147282, 1142816, 1140348,\n", - " 1139417, 1136160, 1136836, 1139329, 1141490, 1143345, 1144753, 1144619,\n", - " 1144093, 1135876, 1144310, 1135813, 1169017, 1144375, 1146526, 1143457,\n", - " 1140487, 1143937, 1147574, 1155700, 1147523, 1140356, 1140360, 1140364,\n", - " 1149582, 1137990, 1168921, 1168927, 1147984, 1147995, 1147999, 1139249,\n", - " 1148704, 1146751, 1153701, 1152328, 1147971, 1139549, 1147198, 1150449,\n", - " 1143921, 1148359, 1145747, 1148397, 1146188, 1151239, 1152530, 1150445,\n", - " 1144514, 1144526, 1141349, 1141358, 1138044, 1151997, 1152022, 1144884,\n", - " 1139906, 1140561, 1140572, 1150127, 1147019, 1143560, 1148288, 1154420,\n", - " 1152563, 1146686, 1146687, 1141181, 1152436, 1157983, 1148720, 1148729,\n", - " 1146549, 1139950, 1148204, 1153124, 1153192, 1153188, 1153197, 1145111,\n", - " 1159837, 1150929, 1150932, 1150935, 1150356, 1155095, 1148084, 1151906,\n", - " 1145637, 1148510, 1146562, 1146565, 1141420, 1148949, 1146975, 1153249,\n", - " 1146623, 1144468, 1144476, 1152849, 1152100, 1146280, 1137746, 1137758,\n", - " 1152622, 1140521, 1152055, 1149203, 1155337, 1154123, 1151576, 1151582,\n", - " 1151617, 1145278, 1136788, 1152944, 1152169, 1145956, 1152903, 1151311,\n", - " 1152341, 1146816, 1138281, 1136028, 1158704, 1156619, 1156622, 1151188,\n", - " 1155779, 1151064, 1156396, 1156422, 1137405, 1150164, 1144017, 1148033,\n", - " 1148040, 1149792, 1149794, 1144657, 1144656, 1137048, 1148628, 1148637,\n", - " 1158530, 1158540, 1137458, 1149946, 1155376, 1135434, 1158927, 1156505,\n", - " 1157059, 1157064, 1145187, 1137814, 1149045, 1151788, 1156935, 1153413,\n", - " 1139525, 1158308, 1155441, 1162120, 1150494, 1142755, 1142752, 1156207,\n", - " 1151379, 1155122, 1152527, 1149321, 1149320, 1155755, 1151424, 1146920,\n", - " 1145806, 1158096, 1168230, 1157894, 1154555, 1158824, 1158325, 1157000,\n", - " 1148836, 1148834, 1155646, 1143254, 1154250, 1137359, 1154902, 1154909,\n", - " 1143189, 1157439, 1157928, 1137152, 1158126, 1153776, 1158350, 1145682,\n", - " 1134687, 1134682, 1135601, 1148149, 1148153, 1155852, 1156095, 1152209,\n", - " 1159213, 1140368, 1151101, 1157735, 1157030, 1144843, 1155975, 1159956,\n", - " 1158846, 1155393, 1149700, 1136905, 1136896, 1158753, 1158760, 1158764,\n", - " 1158815, 1136491, 1164941, 1156664, 1155296, 1155299, 1155309, 1156278,\n", - " 1134757, 1161161, 1144582, 1150011, 1155521, 1155529, 1161539, 1169890,\n", - " 1135659, 1157747, 1165838, 1157944, 1153052, 1153045, 1171551, 1142869,\n", - " 1159368, 1153841, 1153855, 1167189, 1150046, 1149063, 1145948, 1155479,\n", - " 1147300, 1138161, 1164006, 1154578, 1139286, 1139281, 1159985, 1148783,\n", - " 1158452, 1160176, 1170415, 1148603, 1148607, 1141792, 1158643, 1159025,\n", - " 1159029, 1159032, 1169106, 1160605, 1155588, 1144320, 1147562, 1168426,\n", - " 1149022, 1147835, 1146500, 1146505, 1163527, 1163525, 1155279, 1153201,\n", - " 1141471, 1147433, 1163800, 1156739, 1184103, 1144810, 1144812, 1162093,\n", - " 1135567, 1165724, 1156300, 1156303, 1192004, 1145176, 1163935, 1145228,\n", - " 1154700, 1166462, 1150531, 1144973, 1170945, 1139344, 1147723, 1145902,\n", - " 1143404, 1149557, 1158722, 1171279, 1147334, 1150777, 1149125, 1154922,\n", - " 1169602, 1166653, 1150518, 1156119, 1144346, 1144336, 1157534, 1147746,\n", - " 1147750, 1154670, 1154893, 1157331, 1141048, 1147491, 1147502, 1158156,\n", - " 1171522, 1158611, 1158623, 1158618, 1149846, 1147423, 1143177, 1148667,\n", - " 1173307, 1145028, 1154027, 1152150, 1155464, 1147711, 1151850, 1145783,\n", - " 1149247, 1169038, 1135016, 1170701, 1177601, 1182095, 1144545, 1144550,\n", - " 1166535, 1166682, 1150234, 1154148, 1169409, 1158176, 1149169, 1149173,\n", - " 1143279, 1168481, 1143420, 1179243, 1176490, 1181095, 1153803, 1153141,\n", - " 1171132, 1180817, 1164471, 1182651, 1161255, 1155260, 1155262, 1154718,\n", - " 1157792, 1157795, 1143343, 1151496, 1171623, 1181380, 1155799, 1155804,\n", - " 1157134, 1181935, 1180083, 1158253, 1153899, 1153902, 1145622, 1145626,\n", - " 1163538, 1180383, 1161907, 1146243, 1153601, 1153609, 1155990, 1158512,\n", - " 1158940, 1179064, 1155892, 1180849, 1179924, 1176690, 1168866, 1188188,\n", - " 1176976, 1184287, 1181469, 1170802, 1156162, 1156539, 1139828, 1139831,\n", - " 1154812, 1156055, 1146386, 1149544, 1156838, 1177059, 1189540, 1185976,\n", - " 1140996, 1188770, 1175171, 1179852, 1162146, 1162156, 1152113, 1152124,\n", - " 1179006, 1169699, 1169707, 1166841, 1192305, 1150400, 1193115, 1172429,\n", - " 1158064, 1145395, 1176829, 1179755, 1191451, 1155962, 1181646, 1193491,\n", - " 1175336, 1174698, 1177678], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1141424, 1136228, 1135716, 1137780, 1137791, 1139698, 1141758,\n", - " 1138335, 1136215, 1141250, 1140290, 1142810, 1136969, 1136971, 1141443,\n", - " 1146802, 1138897, 1151164, 1143615, 1139820, 1154771, 1145373, 1138942,\n", - " 1139141, 1146640, 1146641, 1139615, 1150506, 1150509, 1149216, 1155689,\n", - " 1143820, 1149644, 1147483, 1148523, 1149037, 1149038, 1153016, 1134697,\n", - " 1134701, 1152666, 1153220, 1136742, 1150554, 1155014, 1139370, 1139373,\n", - " 1139371, 1150333, 1146371, 1138749, 1140537, 1140540, 1138112, 1151520,\n", - " 1140020, 1135367, 1135202, 1141036, 1136297, 1134794, 1138504, 1136189,\n", - " 1143069, 1157102, 1144395, 1137529, 1157397, 1136662, 1137441, 1139161,\n", - " 1141703, 1135980, 1135240, 1155076, 1140970, 1137957, 1135501, 1154132,\n", - " 1154142, 1145133, 1135522, 1138440, 1138461, 1137493, 1136594, 1154101,\n", - " 1158390, 1138847, 1156605, 1147111, 1147112, 1142611, 1135359, 1156141,\n", - " 1158984, 1150953, 1141533, 1143586, 1138067, 1138069, 1140261, 1134992,\n", - " 1134770, 1142785, 1136546, 1135782, 1139755, 1139321, 1140849, 1140034,\n", - " 1139933, 1141966, 1155648, 1139071, 1140660, 1137734, 1147317, 1147322,\n", - " 1134750, 1137000, 1138240, 1135549, 1141088, 1141099, 1141102, 1144138,\n", - " 1139898, 1145346, 1135291, 1142031, 1143767, 1143225, 1139033, 1146844,\n", - " 1142342, 1136917, 1143678, 1143677, 1145066, 1140601, 1160612, 1139495,\n", - " 1136760, 1134979, 1144422, 1138482, 1143153, 1138708, 1140110, 1143107,\n", - " 1144596, 1148263, 1157420, 1136866, 1136867, 1140885, 1144182, 1161094,\n", - " 1138539, 1147153, 1142650, 1149186, 1141365, 1141367, 1163674, 1151119,\n", - " 1138292, 1153564, 1139508, 1139773, 1139763, 1140089, 1138806, 1139127,\n", - " 1144997, 1144998, 1140616, 1147896, 1140984, 1147050, 1135457, 1142555,\n", - " 1141925, 1144242, 1165366, 1137149, 1140700, 1136891, 1139405, 1137575,\n", - " 1144070, 1143845, 1143851, 1146008, 1146024, 1146025, 1141646, 1139990,\n", - " 1143293, 1143283, 1143294, 1147150, 1148763, 1147282, 1142816, 1140348,\n", - " 1139417, 1136160, 1136836, 1139329, 1141490, 1143345, 1144753, 1144619,\n", - " 1144093, 1135876, 1144310, 1135813, 1169017, 1144375, 1146526, 1143457,\n", - " 1140487, 1143937, 1147574, 1155700, 1147523, 1140356, 1140360, 1140364,\n", - " 1149582, 1137990, 1168921, 1168927, 1147984, 1147995, 1147999, 1139249,\n", - " 1148704, 1146751, 1153701, 1152328, 1147971, 1139549, 1147198, 1150449,\n", - " 1143921, 1148359, 1145747, 1148397, 1146188, 1151239, 1152530, 1150445,\n", - " 1144514, 1144526, 1141349, 1141358, 1138044, 1151997, 1152022, 1144884,\n", - " 1139906, 1140561, 1140572, 1150127, 1147019, 1143560, 1148288, 1154420,\n", - " 1152563, 1146686, 1146687, 1141181, 1152436, 1157983, 1148720, 1148729,\n", - " 1146549, 1139950, 1148204, 1153124, 1153192, 1153188, 1153197, 1145111,\n", - " 1159837, 1150929, 1150932, 1150935, 1150356, 1155095, 1148084, 1151906,\n", - " 1145637, 1148510, 1146562, 1146565, 1141420, 1148949, 1146975, 1153249,\n", - " 1146623, 1144468, 1144476, 1152849, 1152100, 1146280, 1137746, 1137758,\n", - " 1152622, 1140521, 1152055, 1149203, 1155337, 1154123, 1151576, 1151582,\n", - " 1151617, 1145278, 1136788, 1152944, 1152169, 1145956, 1152903, 1151311,\n", - " 1152341, 1146816, 1138281, 1136028, 1158704, 1156619, 1156622, 1151188,\n", - " 1155779, 1151064, 1156396, 1156422, 1137405, 1150164, 1144017, 1148033,\n", - " 1148040, 1149792, 1149794, 1144657, 1144656, 1137048, 1148628, 1148637,\n", - " 1158530, 1158540, 1137458, 1149946, 1155376, 1135434, 1158927, 1156505,\n", - " 1157059, 1157064, 1145187, 1137814, 1149045, 1151788, 1156935, 1153413,\n", - " 1139525, 1158308, 1155441, 1162120, 1150494, 1142755, 1142752, 1156207,\n", - " 1151379, 1155122, 1152527, 1149321, 1149320, 1155755, 1151424, 1146920,\n", - " 1145806, 1158096, 1168230, 1157894, 1154555, 1158824, 1158325, 1157000,\n", - " 1148836, 1148834, 1155646, 1143254, 1154250, 1137359, 1154902, 1154909,\n", - " 1143189, 1157439, 1157928, 1137152, 1158126, 1153776, 1158350, 1145682,\n", - " 1134687, 1134682, 1135601, 1148149, 1148153, 1155852, 1156095, 1152209,\n", - " 1159213, 1140368, 1151101, 1157735, 1157030, 1144843, 1155975, 1159956,\n", - " 1158846, 1155393, 1149700, 1136905, 1136896, 1158753, 1158760, 1158764,\n", - " 1158815, 1136491, 1164941, 1156664, 1155296, 1155299, 1155309, 1156278,\n", - " 1134757, 1161161, 1144582, 1150011, 1155521, 1155529, 1161539, 1169890,\n", - " 1135659, 1157747, 1165838, 1157944, 1153052, 1153045, 1171551, 1142869,\n", - " 1159368, 1153841, 1153855, 1167189, 1150046, 1149063, 1145948, 1155479,\n", - " 1147300, 1138161, 1164006, 1154578, 1139286, 1139281, 1159985, 1148783,\n", - " 1158452, 1160176, 1170415, 1148603, 1148607, 1141792, 1158643, 1159025,\n", - " 1159029, 1159032, 1169106, 1160605, 1155588, 1144320, 1147562, 1168426,\n", - " 1149022, 1147835, 1146500, 1146505, 1163527, 1163525, 1155279, 1153201,\n", - " 1141471, 1147433, 1163800, 1156739, 1184103, 1144810, 1144812, 1162093,\n", - " 1135567, 1165724, 1156300, 1156303, 1192004, 1145176, 1163935, 1145228,\n", - " 1154700, 1166462, 1150531, 1144973, 1170945, 1139344, 1147723, 1145902,\n", - " 1143404, 1149557, 1158722, 1171279, 1147334, 1150777, 1149125, 1154922,\n", - " 1169602, 1166653, 1150518, 1156119, 1144346, 1144336, 1157534, 1147746,\n", - " 1147750, 1154670, 1154893, 1157331, 1141048, 1147491, 1147502, 1158156,\n", - " 1171522, 1158611, 1158623, 1158618, 1149846, 1147423, 1143177, 1148667,\n", - " 1173307, 1145028, 1154027, 1152150, 1155464, 1147711, 1151850, 1145783,\n", - " 1149247, 1169038, 1135016, 1170701, 1177601, 1182095, 1144545, 1144550,\n", - " 1166535, 1166682, 1150234, 1154148, 1169409, 1158176, 1149169, 1149173,\n", - " 1143279, 1168481, 1143420, 1179243, 1176490, 1181095, 1153803, 1153141,\n", - " 1171132, 1180817, 1164471, 1182651, 1161255, 1155260, 1155262, 1154718,\n", - " 1157792, 1157795, 1143343, 1151496, 1171623, 1181380, 1155799, 1155804,\n", - " 1157134, 1181935, 1180083, 1158253, 1153899, 1153902, 1145622, 1145626,\n", - " 1163538, 1180383, 1161907, 1146243, 1153601, 1153609, 1155990, 1158512,\n", - " 1158940, 1179064, 1155892, 1180849, 1179924, 1176690, 1168866, 1188188,\n", - " 1176976, 1184287, 1181469, 1170802, 1156162, 1156539, 1139828, 1139831,\n", - " 1154812, 1156055, 1146386, 1149544, 1156838, 1177059, 1189540, 1185976,\n", - " 1140996, 1188770, 1175171, 1179852, 1162146, 1162156, 1152113, 1152124,\n", - " 1179006, 1169699, 1169707, 1166841, 1192305, 1150400, 1193115, 1172429,\n", - " 1158064, 1145395, 1176829, 1179755, 1191451, 1155962, 1181646, 1193491,\n", - " 1175336, 1174698, 1177678], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199424, 1198248, 1199282, 1202255, 1198844, 1201582, 1202119, 1200650,\n", - " 1201660, 1198633, 1198694, 1198546, 1198557, 1197512, 1194866, 1196685,\n", - " 1195494, 1196624, 1195507, 1195511, 1195263, 1197933, 1201992, 1198543,\n", - " 1199519, 1194882, 1195740, 1196979, 1194759, 1197831, 1195313, 1196837,\n", - " 1198668, 1195989, 1195571, 1196711, 1199823, 1195148, 1195216, 1195265,\n", - " 1195266, 1200765, 1197367, 1197273, 1195038, 1195541, 1199344, 1195790,\n", - " 1199697, 1196393, 1198282, 1199329, 1199060, 1196851, 1194928, 1197574,\n", - " 1199628, 1200079, 1200869, 1200872, 1199038, 1200404, 1199745, 1194786,\n", - " 1200060, 1196508, 1199021, 1197601, 1196727, 1196734, 1196728, 1198428,\n", - " 1200155, 1198811, 1199555, 1198593, 1201156, 1202630, 1202403, 1200991,\n", - " 1201056, 1200918, 1200927, 1199761, 1202640, 1201737, 1200546, 1200430,\n", - " 1197097, 1202541, 1202138, 1197050, 1199099, 1196779, 1201442, 1197945,\n", - " 1202239, 1200899, 1202175, 1195876, 1201291, 1198478, 1203329, 1200398,\n", - " 1198562, 1196966, 1200784, 1199606, 1200578, 1200638, 1195679, 1195664,\n", - " 1203105, 1198929, 1195421, 1195181, 1197816, 1197822, 1197821, 1198966,\n", - " 1203102, 1201138, 1199403, 1201705, 1197735, 1200677, 1201981, 1198819,\n", - " 1197652, 1197335, 1203162, 1198996, 1201966, 1196424], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199424, 1198248, 1199282, 1202255, 1198844, 1201582, 1202119, 1200650,\n", - " 1201660, 1198633, 1198694, 1198546, 1198557, 1197512, 1194866, 1196685,\n", - " 1195494, 1196624, 1195507, 1195511, 1195263, 1197933, 1201992, 1198543,\n", - " 1199519, 1194882, 1195740, 1196979, 1194759, 1197831, 1195313, 1196837,\n", - " 1198668, 1195989, 1195571, 1196711, 1199823, 1195148, 1195216, 1195265,\n", - " 1195266, 1200765, 1197367, 1197273, 1195038, 1195541, 1199344, 1195790,\n", - " 1199697, 1196393, 1198282, 1199329, 1199060, 1196851, 1194928, 1197574,\n", - " 1199628, 1200079, 1200869, 1200872, 1199038, 1200404, 1199745, 1194786,\n", - " 1200060, 1196508, 1199021, 1197601, 1196727, 1196734, 1196728, 1198428,\n", - " 1200155, 1198811, 1199555, 1198593, 1201156, 1202630, 1202403, 1200991,\n", - " 1201056, 1200918, 1200927, 1199761, 1202640, 1201737, 1200546, 1200430,\n", - " 1197097, 1202541, 1202138, 1197050, 1199099, 1196779, 1201442, 1197945,\n", - " 1202239, 1200899, 1202175, 1195876, 1201291, 1198478, 1203329, 1200398,\n", - " 1198562, 1196966, 1200784, 1199606, 1200578, 1200638, 1195679, 1195664,\n", - " 1203105, 1198929, 1195421, 1195181, 1197816, 1197822, 1197821, 1198966,\n", - " 1203102, 1201138, 1199403, 1201705, 1197735, 1200677, 1201981, 1198819,\n", - " 1197652, 1197335, 1203162, 1198996, 1201966, 1196424], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 2.7172e-02, -1.4960e-04, 4.4823e-01, ..., 6.6421e-02,\n", - " -1.1170e-03, -3.1555e-03],\n", - " [ 6.2826e-02, -2.8651e-04, 3.6665e-01, ..., 9.2633e-02,\n", - " -1.7038e-03, -2.9864e-03],\n", - " [ 6.1958e-02, -1.9628e-05, 3.2213e-01, ..., 6.8326e-02,\n", - " -9.5193e-04, -2.7489e-03],\n", - " ...,\n", - " [ 4.5325e-02, -2.3476e-04, 4.1168e-01, ..., 7.5845e-02,\n", - " -1.2050e-03, -3.0983e-03],\n", - " [ 5.1505e-02, 2.5738e-02, 3.9800e-01, ..., 9.0048e-02,\n", - " -1.2210e-03, -3.1642e-03],\n", - " [ 5.1505e-02, 2.5738e-02, 3.9800e-01, ..., 9.0048e-02,\n", - " -1.2210e-03, -3.1642e-03]], device='cuda:0'), 'paper': tensor([[ 2.0305e+00, -3.0223e-02, 1.0673e+00, ..., -1.3552e-02,\n", - " -2.6856e-02, 2.6805e+00],\n", - " [ 1.3358e+00, -1.4914e-02, 7.8948e-02, ..., -7.2884e-03,\n", - " -1.8496e-02, 1.7187e+00],\n", - " [ 1.0138e+00, -2.0558e-02, -1.2192e-03, ..., -1.0914e-02,\n", - " -1.4670e-02, 1.0882e+00],\n", - " ...,\n", - " [ 1.2266e+00, -3.7221e-02, -1.2622e-03, ..., -1.4983e-02,\n", - " -2.3278e-02, 1.7628e+00],\n", - " [ 1.1380e+00, -2.3346e-02, -2.7090e-03, ..., -1.0340e-02,\n", - " -1.6164e-02, 1.6020e+00],\n", - " [ 1.7877e+00, -2.7260e-02, 5.6755e-01, ..., -6.9712e-03,\n", - " -2.6776e-02, 3.0911e+00]], device='cuda:0'), 'author': tensor([[ 2.1258e-01, -2.3765e-03, 2.7377e-02, ..., 6.6749e-01,\n", - " 2.5377e-01, 3.6475e-01],\n", - " [ 2.5685e-01, -1.5462e-03, -2.6841e-04, ..., 6.3116e-01,\n", - " 1.1901e-01, 2.6296e-01],\n", - " [ 1.0531e-01, -6.0844e-04, 8.5669e-02, ..., 5.8077e-01,\n", - " 1.5370e-01, 1.7482e-01],\n", - " ...,\n", - " [-5.2906e-04, -3.5063e-05, 1.5153e-01, ..., 1.0313e-01,\n", - " -3.1383e-04, -9.0066e-04],\n", - " [ 2.4908e-01, -2.0581e-03, 1.5990e-02, ..., 7.3462e-01,\n", - " 2.1570e-01, 3.1508e-01],\n", - " [ 2.1787e-01, -1.6560e-03, 2.2827e-02, ..., 6.6272e-01,\n", - " 1.8638e-01, 2.8214e-01]], device='cuda:0'), 'field_of_study': tensor([[-1.8953e-03, 1.0615e-01, 9.6194e-02, ..., -2.5267e-03,\n", - " -5.2011e-04, -2.1385e-03],\n", - " [-1.9263e-03, 8.0009e-02, 7.6861e-02, ..., -1.4229e-03,\n", - " -5.3323e-04, -3.0678e-03],\n", - " [-1.8153e-03, 1.6474e-01, 4.2770e-02, ..., -9.3443e-04,\n", - " -3.8356e-04, -3.2467e-03],\n", - " ...,\n", - " [-2.0835e-03, 3.7486e-02, 1.4690e-01, ..., -1.2005e-03,\n", - " -1.1577e-03, -2.6507e-03],\n", - " [-2.0084e-03, -5.4125e-04, 1.0320e-01, ..., -2.5471e-03,\n", - " -1.1708e-04, -2.4887e-03],\n", - " [-1.3804e-03, 5.1979e-02, 1.0758e-01, ..., -3.3926e-03,\n", - " -1.4847e-03, -1.8843e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 167, 131, 31, 198, 92, 40, 64, 78, 13, 13, 13, 13,\n", - " 13, 13, 13, 296, 363, 413, 265, 254, 364, 517, 456, 512,\n", - " 595, 837, 972, 797, 665, 903, 1399, 863, 666, 866, 1062, 1266,\n", - " 1071, 1071, 1071, 1381, 1212, 1314, 1314, 1496, 1186, 1186, 1496, 1496,\n", - " 1390, 1390, 1390, 1498, 1371, 1133, 1520, 1613, 1613, 1390, 1390, 1923,\n", - " 1923, 1847, 1878, 1903, 2021, 2021, 2218, 2082, 2202, 2268, 2112, 2424,\n", - " 2374, 2393, 2393, 2408, 2457, 2780, 2621, 2621, 2621, 2491, 2623, 2532,\n", - " 2532, 2632, 2756, 2751, 2798, 2851, 2825, 2843, 3071, 3298, 3212, 3212,\n", - " 3212, 3212, 3298, 3223, 3223, 3383, 3366, 3438, 3528, 3573, 3758, 3582,\n", - " 3491, 3683, 3683, 3813, 4332, 4378, 4401, 4561, 4420, 4436, 4528, 4422,\n", - " 4650, 4549, 4657, 4632, 4845, 4845, 4642, 4664, 4939, 5030, 5077, 4864,\n", - " 4864, 5148, 5210, 5112, 5045, 5054, 5247, 5331, 5331, 4956, 5220, 5331,\n", - " 5331, 5331, 5259, 5121, 5125, 5317, 5317, 5230, 5330, 5419, 5321, 5433,\n", - " 5436, 5436, 5472, 5596, 5596, 5540, 5542, 5580, 5763, 5797, 5864, 5864,\n", - " 5580, 5580, 5953, 5793, 5868, 5947, 5940, 6002, 6002, 6298, 6298, 6298,\n", - " 5647, 5647, 6022, 6289, 6088, 6323, 6631, 6204, 6553, 6468, 6553, 6531,\n", - " 6531, 6412, 6618, 6729, 6729, 6729, 6783, 6751, 6751, 6902, 6902, 6805,\n", - " 6952, 6561, 6561, 6864, 6787],\n", - " [ 121, 113, 81, 25, 113, 111, 77, 123, 101, 124, 88, 30,\n", - " 68, 50, 65, 59, 68, 74, 68, 22, 96, 97, 106, 125,\n", - " 20, 77, 62, 16, 96, 24, 56, 74, 70, 96, 58, 77,\n", - " 105, 89, 81, 2, 53, 22, 83, 2, 126, 1, 122, 72,\n", - " 74, 98, 76, 109, 10, 47, 45, 68, 120, 54, 20, 132,\n", - " 133, 5, 9, 119, 15, 90, 125, 111, 7, 42, 103, 67,\n", - " 8, 112, 123, 95, 81, 55, 63, 130, 26, 38, 100, 87,\n", - " 78, 87, 35, 127, 45, 68, 20, 107, 99, 22, 128, 3,\n", - " 120, 88, 100, 6, 60, 36, 106, 116, 64, 3, 20, 82,\n", - " 127, 18, 2, 17, 41, 21, 34, 68, 74, 108, 127, 100,\n", - " 21, 131, 22, 73, 105, 89, 71, 94, 84, 20, 29, 85,\n", - " 7, 67, 93, 0, 66, 3, 31, 6, 98, 56, 14, 69,\n", - " 86, 106, 46, 26, 37, 104, 68, 56, 129, 80, 48, 19,\n", - " 12, 3, 40, 11, 68, 51, 61, 68, 20, 52, 68, 107,\n", - " 102, 79, 68, 68, 2, 68, 115, 91, 43, 68, 118, 27,\n", - " 75, 2, 92, 44, 114, 33, 13, 32, 110, 117, 68, 68,\n", - " 26, 56, 49, 68, 26, 118, 23, 28, 68, 68, 77, 4,\n", - " 68, 57, 68, 39, 80]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2674, 1173, 1173, ..., 2710, 4877, 3219],\n", - " [ 60, 24, 77, ..., 5352, 5310, 5267]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 123, 112, 93, 112, 111, 103, 125, 111, 22, 2, 81, 22,\n", - " 74, 103, 74, 111, 125, 96, 96, 93, 111, 21, 108, 125,\n", - " 108, 123, 83, 111, 2, 22, 96, 125, 119, 2, 112, 22,\n", - " 9, 2, 74, 111, 103, 96, 111, 74, 22, 9, 103, 123,\n", - " 123, 103, 111, 125, 123, 81, 123, 2, 103, 125, 68, 2,\n", - " 83, 81, 123, 112, 111, 81, 2, 96, 83, 93, 123, 93,\n", - " 74, 9, 22, 22, 123, 81, 21, 125, 125, 2, 83, 83,\n", - " 125, 103, 119, 81, 123, 103, 112, 21, 96, 9, 112, 2,\n", - " 119, 83, 9, 93, 83, 2, 123, 74, 21, 112, 21, 68,\n", - " 123, 119, 74, 9, 123, 81, 21, 125, 9, 93, 103, 112,\n", - " 2, 103, 108, 81, 68, 74, 81, 81, 9, 2, 2, 112,\n", - " 21, 81, 74, 125, 125, 125, 119, 81, 2, 83, 22, 2,\n", - " 83, 2, 93, 2, 9, 83, 81, 123, 119, 2, 2, 119,\n", - " 108, 93, 112, 96, 2, 93, 123, 123, 74, 103, 83, 96,\n", - " 125, 2, 111, 2, 22, 93, 83, 119, 2, 123, 112, 74,\n", - " 22, 93, 93, 96, 96, 123, 112, 108, 81, 96, 21, 103,\n", - " 2, 74, 111, 9, 21, 2, 108, 103, 83, 21, 96, 74,\n", - " 68, 81, 21, 2, 119, 9, 96, 21, 83, 123, 108, 103,\n", - " 93, 108, 9, 81, 22, 81, 9, 74, 68, 112, 2, 119,\n", - " 74, 93, 74, 119, 21, 81, 93, 112, 112, 83, 123, 9,\n", - " 119, 2, 108, 83, 74, 108, 96, 96, 119, 22, 96, 96,\n", - " 112, 22, 21, 112, 74, 108, 2, 108, 112, 21, 119, 125,\n", - " 123, 123, 96, 22, 68, 108, 119, 68, 96, 21, 22, 119,\n", - " 9, 108, 22, 74, 111, 119, 93, 108, 21, 93, 22, 111,\n", - " 119, 96, 119, 74, 11, 21, 21, 21, 119, 2, 119, 81,\n", - " 112, 111, 83, 21, 83, 111, 2, 83, 108, 108, 83, 83,\n", - " 9, 22, 108, 21, 81, 93, 21, 9, 9, 112, 21, 22,\n", - " 83, 111, 103, 108, 83, 103, 112, 74, 119, 125, 111, 112,\n", - " 96, 11, 125, 96, 125, 108, 103, 123, 9, 68, 83, 21,\n", - " 125, 112, 22, 11, 125, 111, 111, 93, 103, 68, 103, 2,\n", - " 83, 119, 2, 81, 2, 2, 119, 2, 96, 125, 119, 68,\n", - " 9, 9, 2, 11, 68, 2, 68, 68, 2, 112, 125, 68,\n", - " 125, 11, 81, 11, 11, 108, 11, 108, 11, 123, 22, 112,\n", - " 11, 74, 22, 2, 111, 11, 22, 22, 93, 2, 11, 11,\n", - " 108, 2, 68, 68, 2, 125, 93, 2, 81, 2, 11, 103,\n", - " 9, 11, 11, 123, 125, 68, 93, 111, 81, 81, 9, 96,\n", - " 111, 96, 74, 103, 93, 11, 68, 2, 93, 103, 11, 11,\n", - " 11, 74, 11, 111, 111, 108, 74, 68, 93, 68, 11, 11,\n", - " 108, 22, 11, 2, 68, 103, 2, 2, 68, 9, 103, 68,\n", - " 103, 68, 68, 11, 111, 9, 2],\n", - " [ 204, 200, 129, 39, 85, 166, 19, 177, 155, 197, 212, 159,\n", - " 275, 291, 59, 57, 109, 192, 156, 378, 292, 435, 25, 274,\n", - " 302, 800, 83, 329, 244, 353, 384, 466, 232, 542, 559, 570,\n", - " 592, 414, 791, 487, 591, 491, 501, 546, 598, 601, 935, 352,\n", - " 747, 1044, 913, 449, 687, 923, 888, 651, 964, 1041, 772, 524,\n", - " 840, 941, 1151, 970, 1110, 1166, 761, 1170, 1132, 1036, 1046, 1177,\n", - " 1206, 1127, 1181, 1023, 1407, 1279, 1434, 1051, 1252, 1480, 1295, 1385,\n", - " 1343, 1190, 1851, 1514, 1379, 1401, 1361, 1441, 1254, 1577, 1570, 1357,\n", - " 1646, 1827, 1804, 1507, 1544, 1817, 1142, 1473, 1642, 1837, 1500, 1660,\n", - " 1525, 1499, 1431, 1626, 1637, 1764, 1552, 1653, 1595, 1659, 1743, 1624,\n", - " 1839, 1706, 1780, 2037, 1953, 1826, 1724, 1967, 1720, 1963, 1965, 1834,\n", - " 1824, 1971, 2033, 2017, 2337, 2111, 2156, 2008, 2072, 2181, 2420, 2289,\n", - " 2133, 2244, 2186, 2400, 2227, 2417, 2359, 2093, 2269, 2325, 2320, 2484,\n", - " 2419, 2467, 2393, 2537, 2502, 2379, 2481, 2543, 2691, 2615, 2567, 2550,\n", - " 2513, 2633, 2465, 2478, 2719, 2638, 2636, 2681, 2741, 2557, 2557, 2622,\n", - " 2687, 2705, 2745, 2721, 2690, 3081, 3081, 2729, 2683, 3054, 2949, 3014,\n", - " 2884, 2961, 3043, 3070, 3004, 3084, 3184, 3222, 3108, 3105, 2963, 3088,\n", - " 3056, 3122, 2986, 3103, 3193, 3143, 3254, 3258, 3251, 3135, 3391, 3314,\n", - " 3371, 3362, 3202, 3368, 3397, 3541, 3299, 3497, 3425, 3353, 3382, 3663,\n", - " 3493, 3565, 3887, 3445, 3576, 3718, 3575, 3468, 3756, 3633, 4186, 3833,\n", - " 3745, 3668, 3859, 3685, 4052, 4262, 3966, 3899, 4007, 3917, 3828, 3829,\n", - " 4118, 3910, 4036, 3868, 4108, 4014, 4115, 3806, 4041, 4240, 4132, 4218,\n", - " 4313, 4304, 4288, 4281, 4297, 4298, 4271, 4290, 4322, 4307, 4295, 4302,\n", - " 4331, 4348, 4340, 4355, 4345, 4329, 4363, 4343, 4381, 4310, 4371, 4318,\n", - " 4334, 4346, 4352, 4380, 4395, 4473, 4430, 4404, 4445, 4433, 4461, 4429,\n", - " 4477, 4585, 4546, 4418, 4687, 4542, 4719, 4599, 4659, 4594, 4593, 4640,\n", - " 4645, 4509, 4856, 4697, 4774, 4815, 4940, 4686, 4644, 4918, 4972, 4702,\n", - " 5053, 4850, 4936, 4942, 4870, 4989, 4893, 4807, 4979, 4932, 4986, 4886,\n", - " 4998, 4890, 5003, 4903, 5229, 5005, 5014, 4852, 4908, 5200, 5275, 5140,\n", - " 4943, 5333, 5137, 5160, 5115, 5269, 5324, 5074, 5093, 5334, 5418, 5245,\n", - " 5206, 5465, 5161, 5369, 5308, 5343, 5396, 5421, 5366, 5476, 5499, 5489,\n", - " 5401, 5467, 5301, 5572, 5605, 5565, 5415, 5697, 5503, 5600, 5607, 5522,\n", - " 5712, 5618, 5442, 5639, 5860, 5686, 5654, 5731, 5652, 5903, 5569, 5604,\n", - " 5648, 5582, 5894, 5534, 6119, 5669, 5690, 5486, 5609, 6220, 5635, 5521,\n", - " 5881, 5972, 5563, 5899, 5773, 5895, 5997, 6142, 6037, 5949, 5853, 5862,\n", - " 6108, 6436, 6070, 6370, 6396, 5876, 6257, 6455, 6379, 5885, 6078, 6081,\n", - " 6728, 6395, 6227, 6150, 6366, 6241, 6569, 6361, 6232, 6102, 6027, 6393,\n", - " 6275, 5973, 6576, 6185, 6675, 6502, 6580, 6643, 6865, 6932, 6896, 6634,\n", - " 6790, 6889, 6496, 6741, 6934, 6810, 6508, 6867, 6713, 6734, 6905, 6746,\n", - " 6907, 6735, 6898, 6772, 6959, 6933, 6661]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 121, 241, 241, ..., 5253, 5393, 5256],\n", - " [ 240, 310, 158, ..., 90, 70, 301]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 394, 79, 592, ..., 31, 633, 126],\n", - " [ 10, 155, 54, ..., 5318, 5269, 5366]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4184, 5393, 8, ..., 2268, 802, 4096],\n", - " [ 74, 90, 99, ..., 6883, 6876, 6949]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 241, 250, 5, ..., 5356, 5356, 5352],\n", - " [2018, 2423, 3372, ..., 4937, 4970, 3748]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 78, 78, 31, ..., 6783, 6783, 6783],\n", - " [1838, 682, 1633, ..., 2904, 2605, 2757]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.00382\n", - "sampling 0.00374\n", - "noi time: 0.000697\n", - "get_vertex_data call: 0.014134\n", - "noi group time: 0.001838\n", - "eoi_group_time: 0.011061\n", - "second half: 0.11033\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31143, 21459, 17420, ..., 1100728, 1119043, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31143, 21459, 17420, ..., 1100728, 1119043, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1231436, 1230252, 1216134, ..., 1938421, 1936998, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1231436, 1230252, 1216134, ..., 1938421, 1936998, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137202, 1141424, 1136230, 1140284, 1136337, 1135726, 1137780, 1137784,\n", - " 1141756, 1141758, 1137506, 1136215, 1142802, 1139462, 1136965, 1138897,\n", - " 1138903, 1143615, 1139811, 1145363, 1146647, 1139615, 1148987, 1150497,\n", - " 1150507, 1150509, 1142963, 1149216, 1149228, 1142947, 1147473, 1153936,\n", - " 1144636, 1149033, 1135950, 1148345, 1146656, 1150193, 1146472, 1152664,\n", - " 1148546, 1153220, 1147095, 1137220, 1155008, 1139365, 1147202, 1147204,\n", - " 1147211, 1136683, 1134806, 1138742, 1138745, 1151546, 1140535, 1140537,\n", - " 1140539, 1140540, 1137254, 1134735, 1140029, 1140949, 1135367, 1135202,\n", - " 1135210, 1141036, 1136777, 1134794, 1137329, 1157103, 1144791, 1135408,\n", - " 1157397, 1156159, 1148484, 1139161, 1135579, 1135583, 1141086, 1136101,\n", - " 1138514, 1153096, 1137957, 1135522, 1139685, 1138436, 1138440, 1138445,\n", - " 1138449, 1137924, 1136594, 1138847, 1147112, 1135359, 1158984, 1158987,\n", - " 1148531, 1139673, 1139664, 1138069, 1134992, 1142793, 1136555, 1135776,\n", - " 1139755, 1140199, 1158974, 1139315, 1141070, 1144410, 1153543, 1153544,\n", - " 1140034, 1140036, 1136065, 1139933, 1138148, 1146075, 1141985, 1152042,\n", - " 1152044, 1136051, 1137734, 1147327, 1134922, 1136992, 1135549, 1141088,\n", - " 1141095, 1141097, 1141098, 1141100, 1145347, 1145348, 1143767, 1154860,\n", - " 1137297, 1139025, 1140003, 1146844, 1141695, 1139436, 1141224, 1139386,\n", - " 1139730, 1143676, 1144237, 1152731, 1139495, 1144650, 1134987, 1147850,\n", - " 1137074, 1149431, 1138482, 1138490, 1141821, 1145161, 1140173, 1137766,\n", - " 1137762, 1139190, 1138708, 1143107, 1144596, 1142451, 1136867, 1135315,\n", - " 1141398, 1144182, 1150906, 1137375, 1138539, 1137841, 1137848, 1147153,\n", - " 1141365, 1141367, 1153068, 1149088, 1149093, 1149101, 1138292, 1153557,\n", - " 1139508, 1139518, 1139510, 1143779, 1147895, 1139182, 1140976, 1140979,\n", - " 1140990, 1146695, 1143689, 1147050, 1152976, 1142555, 1141925, 1144242,\n", - " 1137149, 1166359, 1150243, 1137570, 1145980, 1142098, 1146024, 1146025,\n", - " 1138085, 1154328, 1141646, 1149928, 1139990, 1146302, 1143293, 1143294,\n", - " 1150424, 1143886, 1147543, 1147540, 1148763, 1147282, 1142816, 1164369,\n", - " 1136330, 1142630, 1149366, 1139417, 1147375, 1146084, 1143051, 1138920,\n", - " 1157720, 1136836, 1136843, 1146105, 1141490, 1144957, 1142148, 1143345,\n", - " 1144766, 1144619, 1144088, 1139982, 1150919, 1146514, 1146523, 1143457,\n", - " 1137703, 1135451, 1149082, 1140364, 1149575, 1143075, 1144219, 1144222,\n", - " 1147999, 1134899, 1134907, 1144013, 1139252, 1147128, 1147131, 1145462,\n", - " 1148704, 1143308, 1148470, 1149718, 1149722, 1147025, 1139549, 1158226,\n", - " 1148359, 1148362, 1154526, 1145240, 1145751, 1142374, 1142369, 1138638,\n", - " 1148387, 1146178, 1146191, 1151242, 1152530, 1152537, 1151179, 1149258,\n", - " 1148940, 1144526, 1151487, 1152031, 1154267, 1145261, 1146723, 1146732,\n", - " 1149597, 1147019, 1147021, 1147023, 1153963, 1158950, 1141949, 1147764,\n", - " 1153574, 1148448, 1147653, 1148288, 1154420, 1158798, 1148180, 1152563,\n", - " 1136247, 1139718, 1146686, 1138414, 1152435, 1144110, 1146547, 1151950,\n", - " 1148204, 1153192, 1153193, 1153188, 1152875, 1147446, 1147442, 1151815,\n", - " 1151816, 1152581, 1151906, 1154183, 1150715, 1141420, 1136002, 1153449,\n", - " 1146265, 1146969, 1146967, 1146623, 1151402, 1152849, 1154052, 1152097,\n", - " 1152099, 1152100, 1146284, 1153030, 1153038, 1137746, 1137755, 1137756,\n", - " 1152622, 1140521, 1157104, 1152754, 1152826, 1155337, 1154123, 1157824,\n", - " 1152673, 1154638, 1164761, 1151617, 1150578, 1145278, 1136131, 1136134,\n", - " 1148916, 1152163, 1152227, 1138991, 1151311, 1152341, 1152344, 1146816,\n", - " 1153297, 1153311, 1138276, 1138281, 1156001, 1136025, 1136028, 1136029,\n", - " 1151188, 1152928, 1151064, 1156387, 1156399, 1154733, 1137545, 1150164,\n", - " 1148040, 1155202, 1161208, 1155223, 1155231, 1145656, 1149794, 1137048,\n", - " 1137053, 1158477, 1177026, 1148628, 1158530, 1137458, 1153869, 1135705,\n", - " 1155376, 1178120, 1142047, 1142387, 1156505, 1152397, 1157064, 1157069,\n", - " 1153881, 1155412, 1155422, 1152833, 1145196, 1137809, 1151257, 1145389,\n", - " 1135729, 1151777, 1147810, 1143010, 1151469, 1139525, 1158304, 1158311,\n", - " 1151340, 1155441, 1153359, 1162120, 1140879, 1154528, 1156919, 1153994,\n", - " 1150494, 1142755, 1142756, 1156207, 1138770, 1157637, 1151379, 1137912,\n", - " 1155375, 1155122, 1152527, 1157183, 1149321, 1149320, 1135406, 1156463,\n", - " 1158096, 1154763, 1155628, 1155631, 1154555, 1158824, 1158325, 1148835,\n", - " 1155646, 1153368, 1143254, 1146941, 1154240, 1154902, 1154909, 1163132,\n", - " 1143531, 1160907, 1150371, 1157439, 1150070, 1141627, 1150990, 1150987,\n", - " 1155281, 1155293, 1159629, 1157934, 1157663, 1158123, 1158126, 1153336,\n", - " 1158996, 1135601, 1145507, 1148149, 1150661, 1150671, 1155853, 1155852,\n", - " 1138215, 1157685, 1149145, 1140633, 1155717, 1152209, 1152220, 1140368,\n", - " 1156017, 1144843, 1155971, 1155975, 1155982, 1161674, 1135196, 1155393,\n", - " 1149700, 1153503, 1136896, 1158815, 1151615, 1136480, 1136494, 1153640,\n", - " 1154393, 1147599, 1155309, 1152130, 1153808, 1163106, 1134757, 1166421,\n", - " 1158558, 1161167, 1138099, 1138110, 1155871, 1154342, 1154340, 1165840,\n", - " 1164276, 1142663, 1150684, 1157747, 1159042, 1159066, 1172273, 1158300,\n", - " 1153052, 1153045, 1171551, 1159731, 1163072, 1156381, 1161935, 1153842,\n", - " 1156107, 1138385, 1138393, 1165244, 1149063, 1149070, 1153519, 1164850,\n", - " 1138161, 1164006, 1156787, 1164911, 1154578, 1139599, 1139592, 1159985,\n", - " 1157355, 1157357, 1164429, 1165306, 1140641, 1140650, 1141867, 1141862,\n", - " 1148600, 1148607, 1164990, 1143139, 1168163, 1163019, 1158653, 1156181,\n", - " 1159025, 1159027, 1159032, 1152247, 1155588, 1165269, 1156589, 1151220,\n", - " 1153935, 1158405, 1144977, 1146510, 1164577, 1161243, 1144739, 1152776,\n", - " 1145139, 1153209, 1141471, 1147426, 1157050, 1157051, 1156737, 1156739,\n", - " 1153663, 1171040, 1144810, 1144812, 1184420, 1167253, 1168860, 1135567,\n", - " 1142733, 1162613, 1145740, 1145743, 1148683, 1165942, 1145228, 1160232,\n", - " 1169282, 1138762, 1144966, 1144972, 1146432, 1166063, 1166053, 1147694,\n", - " 1170502, 1152624, 1155911, 1139345, 1147723, 1145900, 1145902, 1153534,\n", - " 1163961, 1181040, 1143404, 1169738, 1149557, 1158724, 1154076, 1168756,\n", - " 1147338, 1167817, 1144676, 1166653, 1150515, 1156113, 1156119, 1156117,\n", - " 1156118, 1145535, 1154618, 1144336, 1157534, 1147746, 1154670, 1142358,\n", - " 1169162, 1157331, 1151668, 1151669, 1169359, 1154353, 1138609, 1149683,\n", - " 1158611, 1158623, 1173047, 1172753, 1153280, 1159844, 1154869, 1152353,\n", - " 1168413, 1161130, 1165913, 1173307, 1169144, 1183924, 1154027, 1152150,\n", - " 1159655, 1151696, 1157153, 1155468, 1155471, 1157373, 1164689, 1147711,\n", - " 1148131, 1157593, 1166820, 1172961, 1181020, 1172580, 1140326, 1172606,\n", - " 1174845, 1170874, 1150234, 1154151, 1154148, 1149173, 1170465, 1181612,\n", - " 1168481, 1179918, 1151509, 1158031, 1155262, 1154718, 1157792, 1157795,\n", - " 1143341, 1172546, 1171623, 1157126, 1153893, 1154508, 1178538, 1145626,\n", - " 1146252, 1152279, 1165218, 1185317, 1179776, 1190030, 1158512, 1181193,\n", - " 1179997, 1158380, 1155899, 1162986, 1182896, 1164413, 1164788, 1168886,\n", - " 1185696, 1166208, 1164228, 1164231, 1163422, 1163421, 1165444, 1161819,\n", - " 1147182, 1187481, 1181554, 1170417, 1170822, 1139828, 1139831, 1154806,\n", - " 1164927, 1181588, 1151288, 1194356, 1156055, 1146394, 1146395, 1194197,\n", - " 1186525, 1185795, 1194305, 1169954, 1177070, 1171358, 1140997, 1169560,\n", - " 1170150, 1159169, 1162502, 1176041, 1189655, 1179317, 1161865, 1194057,\n", - " 1178135, 1186167, 1188468, 1183805, 1186375, 1186376, 1191310, 1192546,\n", - " 1188348, 1157017], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137202, 1141424, 1136230, 1140284, 1136337, 1135726, 1137780, 1137784,\n", - " 1141756, 1141758, 1137506, 1136215, 1142802, 1139462, 1136965, 1138897,\n", - " 1138903, 1143615, 1139811, 1145363, 1146647, 1139615, 1148987, 1150497,\n", - " 1150507, 1150509, 1142963, 1149216, 1149228, 1142947, 1147473, 1153936,\n", - " 1144636, 1149033, 1135950, 1148345, 1146656, 1150193, 1146472, 1152664,\n", - " 1148546, 1153220, 1147095, 1137220, 1155008, 1139365, 1147202, 1147204,\n", - " 1147211, 1136683, 1134806, 1138742, 1138745, 1151546, 1140535, 1140537,\n", - " 1140539, 1140540, 1137254, 1134735, 1140029, 1140949, 1135367, 1135202,\n", - " 1135210, 1141036, 1136777, 1134794, 1137329, 1157103, 1144791, 1135408,\n", - " 1157397, 1156159, 1148484, 1139161, 1135579, 1135583, 1141086, 1136101,\n", - " 1138514, 1153096, 1137957, 1135522, 1139685, 1138436, 1138440, 1138445,\n", - " 1138449, 1137924, 1136594, 1138847, 1147112, 1135359, 1158984, 1158987,\n", - " 1148531, 1139673, 1139664, 1138069, 1134992, 1142793, 1136555, 1135776,\n", - " 1139755, 1140199, 1158974, 1139315, 1141070, 1144410, 1153543, 1153544,\n", - " 1140034, 1140036, 1136065, 1139933, 1138148, 1146075, 1141985, 1152042,\n", - " 1152044, 1136051, 1137734, 1147327, 1134922, 1136992, 1135549, 1141088,\n", - " 1141095, 1141097, 1141098, 1141100, 1145347, 1145348, 1143767, 1154860,\n", - " 1137297, 1139025, 1140003, 1146844, 1141695, 1139436, 1141224, 1139386,\n", - " 1139730, 1143676, 1144237, 1152731, 1139495, 1144650, 1134987, 1147850,\n", - " 1137074, 1149431, 1138482, 1138490, 1141821, 1145161, 1140173, 1137766,\n", - " 1137762, 1139190, 1138708, 1143107, 1144596, 1142451, 1136867, 1135315,\n", - " 1141398, 1144182, 1150906, 1137375, 1138539, 1137841, 1137848, 1147153,\n", - " 1141365, 1141367, 1153068, 1149088, 1149093, 1149101, 1138292, 1153557,\n", - " 1139508, 1139518, 1139510, 1143779, 1147895, 1139182, 1140976, 1140979,\n", - " 1140990, 1146695, 1143689, 1147050, 1152976, 1142555, 1141925, 1144242,\n", - " 1137149, 1166359, 1150243, 1137570, 1145980, 1142098, 1146024, 1146025,\n", - " 1138085, 1154328, 1141646, 1149928, 1139990, 1146302, 1143293, 1143294,\n", - " 1150424, 1143886, 1147543, 1147540, 1148763, 1147282, 1142816, 1164369,\n", - " 1136330, 1142630, 1149366, 1139417, 1147375, 1146084, 1143051, 1138920,\n", - " 1157720, 1136836, 1136843, 1146105, 1141490, 1144957, 1142148, 1143345,\n", - " 1144766, 1144619, 1144088, 1139982, 1150919, 1146514, 1146523, 1143457,\n", - " 1137703, 1135451, 1149082, 1140364, 1149575, 1143075, 1144219, 1144222,\n", - " 1147999, 1134899, 1134907, 1144013, 1139252, 1147128, 1147131, 1145462,\n", - " 1148704, 1143308, 1148470, 1149718, 1149722, 1147025, 1139549, 1158226,\n", - " 1148359, 1148362, 1154526, 1145240, 1145751, 1142374, 1142369, 1138638,\n", - " 1148387, 1146178, 1146191, 1151242, 1152530, 1152537, 1151179, 1149258,\n", - " 1148940, 1144526, 1151487, 1152031, 1154267, 1145261, 1146723, 1146732,\n", - " 1149597, 1147019, 1147021, 1147023, 1153963, 1158950, 1141949, 1147764,\n", - " 1153574, 1148448, 1147653, 1148288, 1154420, 1158798, 1148180, 1152563,\n", - " 1136247, 1139718, 1146686, 1138414, 1152435, 1144110, 1146547, 1151950,\n", - " 1148204, 1153192, 1153193, 1153188, 1152875, 1147446, 1147442, 1151815,\n", - " 1151816, 1152581, 1151906, 1154183, 1150715, 1141420, 1136002, 1153449,\n", - " 1146265, 1146969, 1146967, 1146623, 1151402, 1152849, 1154052, 1152097,\n", - " 1152099, 1152100, 1146284, 1153030, 1153038, 1137746, 1137755, 1137756,\n", - " 1152622, 1140521, 1157104, 1152754, 1152826, 1155337, 1154123, 1157824,\n", - " 1152673, 1154638, 1164761, 1151617, 1150578, 1145278, 1136131, 1136134,\n", - " 1148916, 1152163, 1152227, 1138991, 1151311, 1152341, 1152344, 1146816,\n", - " 1153297, 1153311, 1138276, 1138281, 1156001, 1136025, 1136028, 1136029,\n", - " 1151188, 1152928, 1151064, 1156387, 1156399, 1154733, 1137545, 1150164,\n", - " 1148040, 1155202, 1161208, 1155223, 1155231, 1145656, 1149794, 1137048,\n", - " 1137053, 1158477, 1177026, 1148628, 1158530, 1137458, 1153869, 1135705,\n", - " 1155376, 1178120, 1142047, 1142387, 1156505, 1152397, 1157064, 1157069,\n", - " 1153881, 1155412, 1155422, 1152833, 1145196, 1137809, 1151257, 1145389,\n", - " 1135729, 1151777, 1147810, 1143010, 1151469, 1139525, 1158304, 1158311,\n", - " 1151340, 1155441, 1153359, 1162120, 1140879, 1154528, 1156919, 1153994,\n", - " 1150494, 1142755, 1142756, 1156207, 1138770, 1157637, 1151379, 1137912,\n", - " 1155375, 1155122, 1152527, 1157183, 1149321, 1149320, 1135406, 1156463,\n", - " 1158096, 1154763, 1155628, 1155631, 1154555, 1158824, 1158325, 1148835,\n", - " 1155646, 1153368, 1143254, 1146941, 1154240, 1154902, 1154909, 1163132,\n", - " 1143531, 1160907, 1150371, 1157439, 1150070, 1141627, 1150990, 1150987,\n", - " 1155281, 1155293, 1159629, 1157934, 1157663, 1158123, 1158126, 1153336,\n", - " 1158996, 1135601, 1145507, 1148149, 1150661, 1150671, 1155853, 1155852,\n", - " 1138215, 1157685, 1149145, 1140633, 1155717, 1152209, 1152220, 1140368,\n", - " 1156017, 1144843, 1155971, 1155975, 1155982, 1161674, 1135196, 1155393,\n", - " 1149700, 1153503, 1136896, 1158815, 1151615, 1136480, 1136494, 1153640,\n", - " 1154393, 1147599, 1155309, 1152130, 1153808, 1163106, 1134757, 1166421,\n", - " 1158558, 1161167, 1138099, 1138110, 1155871, 1154342, 1154340, 1165840,\n", - " 1164276, 1142663, 1150684, 1157747, 1159042, 1159066, 1172273, 1158300,\n", - " 1153052, 1153045, 1171551, 1159731, 1163072, 1156381, 1161935, 1153842,\n", - " 1156107, 1138385, 1138393, 1165244, 1149063, 1149070, 1153519, 1164850,\n", - " 1138161, 1164006, 1156787, 1164911, 1154578, 1139599, 1139592, 1159985,\n", - " 1157355, 1157357, 1164429, 1165306, 1140641, 1140650, 1141867, 1141862,\n", - " 1148600, 1148607, 1164990, 1143139, 1168163, 1163019, 1158653, 1156181,\n", - " 1159025, 1159027, 1159032, 1152247, 1155588, 1165269, 1156589, 1151220,\n", - " 1153935, 1158405, 1144977, 1146510, 1164577, 1161243, 1144739, 1152776,\n", - " 1145139, 1153209, 1141471, 1147426, 1157050, 1157051, 1156737, 1156739,\n", - " 1153663, 1171040, 1144810, 1144812, 1184420, 1167253, 1168860, 1135567,\n", - " 1142733, 1162613, 1145740, 1145743, 1148683, 1165942, 1145228, 1160232,\n", - " 1169282, 1138762, 1144966, 1144972, 1146432, 1166063, 1166053, 1147694,\n", - " 1170502, 1152624, 1155911, 1139345, 1147723, 1145900, 1145902, 1153534,\n", - " 1163961, 1181040, 1143404, 1169738, 1149557, 1158724, 1154076, 1168756,\n", - " 1147338, 1167817, 1144676, 1166653, 1150515, 1156113, 1156119, 1156117,\n", - " 1156118, 1145535, 1154618, 1144336, 1157534, 1147746, 1154670, 1142358,\n", - " 1169162, 1157331, 1151668, 1151669, 1169359, 1154353, 1138609, 1149683,\n", - " 1158611, 1158623, 1173047, 1172753, 1153280, 1159844, 1154869, 1152353,\n", - " 1168413, 1161130, 1165913, 1173307, 1169144, 1183924, 1154027, 1152150,\n", - " 1159655, 1151696, 1157153, 1155468, 1155471, 1157373, 1164689, 1147711,\n", - " 1148131, 1157593, 1166820, 1172961, 1181020, 1172580, 1140326, 1172606,\n", - " 1174845, 1170874, 1150234, 1154151, 1154148, 1149173, 1170465, 1181612,\n", - " 1168481, 1179918, 1151509, 1158031, 1155262, 1154718, 1157792, 1157795,\n", - " 1143341, 1172546, 1171623, 1157126, 1153893, 1154508, 1178538, 1145626,\n", - " 1146252, 1152279, 1165218, 1185317, 1179776, 1190030, 1158512, 1181193,\n", - " 1179997, 1158380, 1155899, 1162986, 1182896, 1164413, 1164788, 1168886,\n", - " 1185696, 1166208, 1164228, 1164231, 1163422, 1163421, 1165444, 1161819,\n", - " 1147182, 1187481, 1181554, 1170417, 1170822, 1139828, 1139831, 1154806,\n", - " 1164927, 1181588, 1151288, 1194356, 1156055, 1146394, 1146395, 1194197,\n", - " 1186525, 1185795, 1194305, 1169954, 1177070, 1171358, 1140997, 1169560,\n", - " 1170150, 1159169, 1162502, 1176041, 1189655, 1179317, 1161865, 1194057,\n", - " 1178135, 1186167, 1188468, 1183805, 1186375, 1186376, 1191310, 1192546,\n", - " 1188348, 1157017], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197841, 1199439, 1199282, 1198449, 1198459, 1198832, 1194626,\n", - " 1197791, 1201016, 1197351, 1196956, 1202804, 1198557, 1196685, 1194783,\n", - " 1196588, 1195263, 1197921, 1201989, 1201992, 1196031, 1198542, 1197698,\n", - " 1194952, 1194882, 1195888, 1195895, 1196911, 1199171, 1196334, 1196618,\n", - " 1197831, 1195313, 1196835, 1196840, 1196171, 1198042, 1198958, 1196711,\n", - " 1196717, 1199823, 1195221, 1195216, 1195279, 1197273, 1196109, 1196742,\n", - " 1195847, 1195541, 1197478, 1197184, 1195917, 1196393, 1196272, 1198282,\n", - " 1199060, 1197282, 1197291, 1199628, 1202381, 1197994, 1200866, 1200872,\n", - " 1199024, 1199231, 1194786, 1201511, 1196498, 1196508, 1197970, 1195807,\n", - " 1197601, 1196727, 1195771, 1202618, 1200887, 1198432, 1200023, 1200154,\n", - " 1202390, 1198811, 1199555, 1200614, 1199083, 1201824, 1202423, 1200452,\n", - " 1200507, 1201421, 1201079, 1201156, 1202627, 1200991, 1201056, 1200927,\n", - " 1194803, 1199546, 1202640, 1202641, 1201045, 1203071, 1200429, 1201752,\n", - " 1200858, 1196883, 1201442, 1202239, 1201291, 1198472, 1195607, 1201590,\n", - " 1199925, 1198562, 1199606, 1195664, 1198911, 1201789, 1195181, 1197816,\n", - " 1197822, 1201482, 1196602, 1197528, 1198973, 1203102, 1201138, 1198147,\n", - " 1198824, 1197735, 1199782, 1198819, 1195070, 1201886, 1197652, 1194908],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197841, 1199439, 1199282, 1198449, 1198459, 1198832, 1194626,\n", - " 1197791, 1201016, 1197351, 1196956, 1202804, 1198557, 1196685, 1194783,\n", - " 1196588, 1195263, 1197921, 1201989, 1201992, 1196031, 1198542, 1197698,\n", - " 1194952, 1194882, 1195888, 1195895, 1196911, 1199171, 1196334, 1196618,\n", - " 1197831, 1195313, 1196835, 1196840, 1196171, 1198042, 1198958, 1196711,\n", - " 1196717, 1199823, 1195221, 1195216, 1195279, 1197273, 1196109, 1196742,\n", - " 1195847, 1195541, 1197478, 1197184, 1195917, 1196393, 1196272, 1198282,\n", - " 1199060, 1197282, 1197291, 1199628, 1202381, 1197994, 1200866, 1200872,\n", - " 1199024, 1199231, 1194786, 1201511, 1196498, 1196508, 1197970, 1195807,\n", - " 1197601, 1196727, 1195771, 1202618, 1200887, 1198432, 1200023, 1200154,\n", - " 1202390, 1198811, 1199555, 1200614, 1199083, 1201824, 1202423, 1200452,\n", - " 1200507, 1201421, 1201079, 1201156, 1202627, 1200991, 1201056, 1200927,\n", - " 1194803, 1199546, 1202640, 1202641, 1201045, 1203071, 1200429, 1201752,\n", - " 1200858, 1196883, 1201442, 1202239, 1201291, 1198472, 1195607, 1201590,\n", - " 1199925, 1198562, 1199606, 1195664, 1198911, 1201789, 1195181, 1197816,\n", - " 1197822, 1201482, 1196602, 1197528, 1198973, 1203102, 1201138, 1198147,\n", - " 1198824, 1197735, 1199782, 1198819, 1195070, 1201886, 1197652, 1194908],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.0900e-01, -5.7692e-04, 5.1946e-01, ..., 5.7196e-02,\n", - " -1.1678e-03, -3.9526e-03],\n", - " [ 8.3917e-03, -2.2069e-04, 3.6069e-02, ..., 4.4300e-02,\n", - " -9.3716e-04, -1.3547e-03],\n", - " [ 9.5485e-02, -5.6698e-04, 5.2252e-01, ..., 6.2127e-02,\n", - " -1.2411e-03, -4.0901e-03],\n", - " ...,\n", - " [ 1.1158e-01, -3.5541e-04, 4.6422e-01, ..., 5.8496e-02,\n", - " -1.1308e-03, -3.5337e-03],\n", - " [ 5.9483e-02, -2.6537e-04, 3.9485e-01, ..., 7.1339e-02,\n", - " -1.1839e-03, -3.0229e-03],\n", - " [ 1.6082e-01, -9.7271e-04, 6.0064e-01, ..., 4.2726e-02,\n", - " -1.1160e-03, -4.6733e-03]], device='cuda:0'), 'paper': tensor([[ 1.1228e+00, -2.4469e-02, -3.5189e-04, ..., -1.1005e-02,\n", - " -1.9097e-02, 1.6881e+00],\n", - " [ 8.6348e-01, -2.4940e-02, -3.4540e-03, ..., -1.1819e-02,\n", - " -1.5352e-02, 7.8716e-01],\n", - " [ 9.0738e-01, -1.7202e-02, 1.6415e-01, ..., -1.1844e-02,\n", - " -1.5108e-02, 9.5071e-01],\n", - " ...,\n", - " [ 9.6880e-01, -1.7618e-02, -2.2944e-03, ..., -8.4540e-03,\n", - " -1.4932e-02, 1.3060e+00],\n", - " [ 1.3385e+00, -1.7338e-02, 1.0282e-01, ..., -7.7100e-03,\n", - " -1.9399e-02, 1.8504e+00],\n", - " [ 1.7464e+00, -2.7241e-02, 5.3764e-01, ..., -7.0440e-03,\n", - " -2.6455e-02, 3.0217e+00]], device='cuda:0'), 'author': tensor([[ 1.5858e-01, -1.3389e-03, -2.2141e-04, ..., 6.5163e-01,\n", - " 1.6448e-01, 2.2975e-01],\n", - " [ 1.5049e-01, -7.1166e-04, 1.1932e-01, ..., 7.3439e-01,\n", - " 4.6725e-02, 2.1661e-01],\n", - " [-5.2906e-04, -3.5063e-05, 1.5153e-01, ..., 1.0313e-01,\n", - " -3.1383e-04, -9.0066e-04],\n", - " ...,\n", - " [ 1.6341e-01, -1.0838e-03, 3.8335e-02, ..., 5.7619e-01,\n", - " 1.0776e-01, 2.1942e-01],\n", - " [ 1.7247e-01, -9.3489e-04, 3.9723e-02, ..., 6.3166e-01,\n", - " 1.2342e-01, 2.5083e-01],\n", - " [ 1.7961e-01, -8.6563e-04, 2.3262e-02, ..., 6.1669e-01,\n", - " 1.2614e-01, 2.3377e-01]], device='cuda:0'), 'field_of_study': tensor([[-2.3811e-03, 1.2871e-01, 1.0247e-01, ..., -1.1901e-03,\n", - " -8.6050e-04, -3.4261e-03],\n", - " [-1.9007e-03, 9.5439e-02, 5.5316e-02, ..., -1.5923e-03,\n", - " -6.2444e-04, -3.2142e-03],\n", - " [-1.6774e-03, 1.7984e-01, 6.0521e-02, ..., -1.5818e-03,\n", - " -4.9369e-04, -3.9283e-03],\n", - " ...,\n", - " [-2.3442e-03, 4.8753e-02, 2.5831e-01, ..., -2.7095e-03,\n", - " -1.8063e-04, -2.5560e-03],\n", - " [-1.5374e-03, 7.7362e-02, 2.0310e-01, ..., -3.3440e-03,\n", - " -4.9526e-04, -2.6198e-03],\n", - " [-1.8162e-03, 7.3667e-02, 6.0440e-02, ..., -1.4629e-03,\n", - " -8.4859e-04, -2.8886e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 112, 112, 112, 144, 128, 201, 98, 56, 201, 201, 169, 169,\n", - " 386, 306, 218, 481, 217, 217, 392, 486, 486, 392, 392, 252,\n", - " 719, 544, 711, 590, 678, 802, 803, 803, 803, 803, 1137, 961,\n", - " 875, 893, 893, 1137, 737, 1137, 737, 914, 954, 1037, 1257, 1257,\n", - " 1241, 1257, 1257, 949, 949, 1154, 1154, 1154, 1154, 1154, 1154, 1257,\n", - " 1192, 1192, 1192, 1289, 1289, 1440, 1440, 1488, 1443, 1422, 1668, 1668,\n", - " 1668, 1668, 1409, 1409, 1409, 1638, 1706, 1706, 1691, 1785, 1785, 1925,\n", - " 1787, 1877, 1877, 1843, 1881, 1863, 1864, 1909, 1893, 1893, 1902, 1847,\n", - " 1984, 2071, 2071, 2123, 2289, 2286, 2245, 2341, 2297, 2172, 2172, 2262,\n", - " 2257, 2172, 2172, 2348, 2241, 2236, 2349, 2407, 2444, 2388, 2388, 2388,\n", - " 2388, 2388, 2425, 2439, 2537, 2472, 2759, 2725, 2626, 2692, 2722, 2722,\n", - " 2722, 2722, 2722, 2827, 3056, 3056, 2953, 3164, 3119, 3311, 3335, 3505,\n", - " 3387, 3394, 3562, 3593, 3786, 3786, 3786, 3786, 3786, 3804, 3917, 4064,\n", - " 4122, 4116, 4116, 4194, 4278, 4347, 4399, 4399, 4287, 4422, 4703, 4322,\n", - " 4527, 4527, 4292, 4308, 4480, 4651, 4651, 4641, 4641, 4809, 4565, 4610,\n", - " 4850, 4850, 4830, 4815, 4815, 4815, 4791, 5006, 4959, 4958, 5009, 5009,\n", - " 5000, 5167, 5012, 5276, 5144, 5198, 5211, 5377, 5290, 5321, 5350, 5350,\n", - " 5350, 5231, 5372, 5372, 5861, 5861, 5617, 5617, 5509, 5686, 5686, 5686,\n", - " 5651, 5651, 5651, 5559, 5683, 5683, 5589, 5589, 5589, 5589, 5994, 6305,\n", - " 5968, 5968, 5968, 5768, 5975, 5925, 6154, 6154, 5842, 5842, 6283],\n", - " [ 102, 58, 27, 35, 100, 24, 88, 108, 31, 107, 31, 47,\n", - " 17, 124, 113, 73, 54, 83, 24, 88, 10, 31, 107, 3,\n", - " 80, 73, 70, 89, 60, 103, 107, 31, 86, 24, 96, 116,\n", - " 89, 129, 113, 8, 124, 68, 43, 3, 73, 80, 40, 55,\n", - " 79, 7, 33, 119, 108, 21, 14, 4, 131, 0, 25, 82,\n", - " 77, 104, 42, 71, 64, 112, 117, 80, 19, 73, 61, 127,\n", - " 29, 119, 9, 20, 108, 71, 23, 20, 18, 97, 98, 75,\n", - " 73, 123, 25, 84, 106, 113, 11, 71, 80, 105, 36, 37,\n", - " 134, 80, 105, 37, 78, 114, 37, 36, 54, 13, 2, 54,\n", - " 37, 69, 14, 109, 63, 37, 105, 116, 107, 9, 20, 119,\n", - " 92, 99, 78, 66, 16, 46, 38, 1, 56, 91, 45, 57,\n", - " 125, 65, 134, 107, 104, 42, 50, 78, 25, 116, 48, 28,\n", - " 26, 95, 73, 128, 12, 111, 115, 30, 3, 66, 27, 109,\n", - " 115, 45, 65, 66, 73, 48, 20, 43, 87, 103, 9, 61,\n", - " 22, 48, 15, 72, 6, 25, 5, 52, 62, 135, 133, 85,\n", - " 73, 94, 73, 107, 24, 31, 66, 67, 93, 120, 76, 73,\n", - " 44, 133, 90, 41, 0, 34, 128, 114, 59, 61, 42, 51,\n", - " 104, 108, 39, 73, 67, 121, 45, 65, 74, 9, 101, 122,\n", - " 73, 21, 46, 67, 73, 20, 81, 132, 73, 130, 48, 32,\n", - " 126, 118, 53, 49, 73, 106, 73, 95, 110, 73, 3]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1187, 826, 503, ..., 434, 196, 3797],\n", - " [ 45, 278, 216, ..., 6376, 6389, 6214]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 113, 86, 54, ..., 108, 119, 67],\n", - " [ 60, 94, 163, ..., 6380, 6289, 6124]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 67, 67, 67, ..., 6337, 6342, 6337],\n", - " [ 63, 203, 99, ..., 502, 67, 438]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 212, 212, 508, ..., 176, 540, 354],\n", - " [ 59, 58, 150, ..., 6343, 6323, 6394]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[6304, 5715, 3280, ..., 4296, 5579, 4684],\n", - " [ 38, 46, 4, ..., 6378, 6320, 6348]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 67, 67, 67, ..., 6342, 6261, 6297],\n", - " [3307, 3485, 3012, ..., 3869, 561, 5548]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 62, 62, 62, ..., 6241, 6241, 6241],\n", - " [ 481, 3070, 477, ..., 6198, 2766, 2850]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005936\n", - "sampling 0.005784\n", - "noi time: 0.001557\n", - "get_vertex_data call: 0.025721\n", - "noi group time: 0.00241\n", - "eoi_group_time: 0.01317\n", - "second half: 0.189389\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16691, 32616, 16138, ..., 1103853, 1131749, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16691, 32616, 16138, ..., 1103853, 1131749, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224380, 1224382, 1228009, ..., 1927262, 1929219, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224380, 1224382, 1228009, ..., 1927262, 1929219, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1141424, 1136225, 1136228, 1136237, 1140282, 1140284, 1140285,\n", - " 1135926, 1135933, 1135727, 1137791, 1140785, 1137506, 1137509, 1136969,\n", - " 1149831, 1149839, 1145373, 1137271, 1137274, 1138942, 1145052, 1143362,\n", - " 1143372, 1146646, 1139609, 1150509, 1148576, 1149216, 1149228, 1142958,\n", - " 1155683, 1155689, 1143820, 1147473, 1135999, 1152263, 1144636, 1144632,\n", - " 1146996, 1153008, 1153015, 1134697, 1135111, 1148350, 1148346, 1146669,\n", - " 1150193, 1135475, 1152667, 1148546, 1147091, 1137220, 1155018, 1136680,\n", - " 1150329, 1134717, 1134718, 1137829, 1151546, 1140540, 1138112, 1137254,\n", - " 1138356, 1140147, 1140159, 1135909, 1140020, 1135367, 1135202, 1135204,\n", - " 1140753, 1141036, 1134794, 1157443, 1157447, 1135956, 1136518, 1138510,\n", - " 1137329, 1143069, 1136610, 1136617, 1144392, 1135408, 1157399, 1157393,\n", - " 1157397, 1137441, 1137448, 1156159, 1148481, 1139161, 1135579, 1135583,\n", - " 1135664, 1135670, 1140970, 1138514, 1135499, 1154132, 1135522, 1138440,\n", - " 1138443, 1140066, 1138461, 1138449, 1136594, 1158390, 1149328, 1138846,\n", - " 1135101, 1156606, 1142611, 1142615, 1135359, 1138185, 1145843, 1145845,\n", - " 1148531, 1148533, 1137109, 1141523, 1143586, 1139667, 1138067, 1142255,\n", - " 1136085, 1134992, 1134778, 1136551, 1140199, 1158974, 1139327, 1153543,\n", - " 1140032, 1139929, 1138148, 1140549, 1140550, 1140557, 1152042, 1152044,\n", - " 1137734, 1134742, 1134750, 1135540, 1135549, 1136700, 1141088, 1141095,\n", - " 1141097, 1144128, 1149001, 1139898, 1145346, 1141980, 1142031, 1143767,\n", - " 1154852, 1154855, 1143221, 1143225, 1137670, 1159672, 1149982, 1146832,\n", - " 1152709, 1141695, 1140470, 1139386, 1136917, 1143667, 1143676, 1144237,\n", - " 1140598, 1140597, 1146449, 1141785, 1141786, 1141609, 1144650, 1137074,\n", - " 1142050, 1141821, 1143153, 1139276, 1140173, 1158749, 1149111, 1143568,\n", - " 1141482, 1137061, 1140102, 1143113, 1144442, 1144596, 1136864, 1135315,\n", - " 1140442, 1144182, 1150906, 1161094, 1146193, 1146201, 1137854, 1142640,\n", - " 1141365, 1141367, 1153068, 1141678, 1139022, 1139508, 1139510, 1139763,\n", - " 1143779, 1140976, 1140990, 1146695, 1135046, 1147050, 1147047, 1145873,\n", - " 1149878, 1152976, 1152980, 1135457, 1142555, 1139448, 1141925, 1145332,\n", - " 1141841, 1143643, 1141388, 1143845, 1146024, 1146140, 1141585, 1142533,\n", - " 1141236, 1139990, 1143293, 1143294, 1147538, 1147540, 1148760, 1147282,\n", - " 1142829, 1142816, 1136330, 1143663, 1142637, 1139417, 1147362, 1148003,\n", - " 1136160, 1136161, 1142588, 1138922, 1157720, 1136836, 1141289, 1141496,\n", - " 1139048, 1144957, 1143345, 1144765, 1144753, 1144615, 1145813, 1140844,\n", - " 1135876, 1135818, 1135813, 1150294, 1150919, 1146514, 1146523, 1143957,\n", - " 1143456, 1143457, 1143937, 1143949, 1140817, 1143793, 1146636, 1140364,\n", - " 1149574, 1143082, 1166410, 1147984, 1147995, 1147999, 1139252, 1139249,\n", - " 1148704, 1141327, 1141825, 1146751, 1152323, 1147025, 1147971, 1139549,\n", - " 1158226, 1158235, 1167006, 1143921, 1149871, 1141143, 1141137, 1145240,\n", - " 1145751, 1142376, 1142383, 1146178, 1151242, 1152530, 1152538, 1150437,\n", - " 1150445, 1156468, 1144514, 1144524, 1150339, 1152013, 1151480, 1139919,\n", - " 1146729, 1149586, 1134869, 1140565, 1149535, 1150127, 1147019, 1147021,\n", - " 1153959, 1158950, 1141949, 1141278, 1153574, 1148453, 1147653, 1168497,\n", - " 1168504, 1149412, 1148288, 1148300, 1148623, 1147866, 1154420, 1158794,\n", - " 1151363, 1152561, 1136247, 1139721, 1152484, 1141177, 1157983, 1148729,\n", - " 1144110, 1143893, 1171943, 1141740, 1154166, 1153124, 1153188, 1145111,\n", - " 1152968, 1150935, 1152867, 1152878, 1173078, 1144849, 1150352, 1150356,\n", - " 1146232, 1143129, 1143134, 1147442, 1152580, 1152581, 1172680, 1154183,\n", - " 1141420, 1152790, 1136009, 1136002, 1147737, 1146969, 1146975, 1146967,\n", - " 1156402, 1149359, 1153255, 1146623, 1142988, 1152849, 1152405, 1152409,\n", - " 1152100, 1156325, 1153030, 1153038, 1153039, 1137746, 1146304, 1152622,\n", - " 1140521, 1136402, 1151952, 1152826, 1155337, 1152673, 1139576, 1151627,\n", - " 1151617, 1136798, 1148914, 1148916, 1148921, 1150618, 1152903, 1153311,\n", - " 1138283, 1138279, 1152294, 1136023, 1136028, 1136029, 1158712, 1158704,\n", - " 1140674, 1140687, 1152928, 1151064, 1142777, 1143486, 1137396, 1153909,\n", - " 1166850, 1166853, 1150150, 1150164, 1148040, 1149306, 1149300, 1144659,\n", - " 1137047, 1148628, 1158530, 1158540, 1137458, 1154563, 1157509, 1135707,\n", - " 1155376, 1142047, 1157219, 1158854, 1150877, 1158927, 1157069, 1152833,\n", - " 1145187, 1143491, 1157563, 1150465, 1146851, 1135729, 1138824, 1152185,\n", - " 1156629, 1156638, 1151788, 1153413, 1151469, 1158304, 1158308, 1158311,\n", - " 1151271, 1137979, 1153359, 1162120, 1154529, 1154530, 1154528, 1142758,\n", - " 1156207, 1156271, 1157642, 1151379, 1158638, 1155375, 1155122, 1135396,\n", - " 1135398, 1157898, 1155626, 1155628, 1155631, 1158492, 1156563, 1154547,\n", - " 1155572, 1158824, 1148835, 1155646, 1143262, 1162396, 1154080, 1151327,\n", - " 1179439, 1143189, 1160904, 1153322, 1150073, 1155606, 1155613, 1150983,\n", - " 1155293, 1155282, 1157933, 1137152, 1153781, 1158204, 1137380, 1159116,\n", - " 1177754, 1138269, 1145694, 1145681, 1140918, 1154010, 1134683, 1135601,\n", - " 1148149, 1150661, 1155848, 1158669, 1158656, 1157684, 1140633, 1152209,\n", - " 1152220, 1155439, 1157735, 1157033, 1157031, 1157030, 1144843, 1155975,\n", - " 1156811, 1156812, 1160164, 1136896, 1158760, 1158764, 1158815, 1151615,\n", - " 1136494, 1136491, 1161616, 1159241, 1156665, 1155305, 1153808, 1136640,\n", - " 1136646, 1134757, 1157863, 1153827, 1156516, 1146126, 1138110, 1155521,\n", - " 1155528, 1165852, 1161958, 1135661, 1142663, 1142666, 1167359, 1159042,\n", - " 1159070, 1157944, 1153052, 1153045, 1159731, 1163072, 1144158, 1138396,\n", - " 1138393, 1150046, 1150041, 1149070, 1145948, 1155479, 1153519, 1164857,\n", - " 1138161, 1149956, 1154590, 1148025, 1157357, 1166086, 1146356, 1164048,\n", - " 1140650, 1140643, 1148600, 1148603, 1148607, 1144503, 1151872, 1155816,\n", - " 1156361, 1156355, 1141800, 1158643, 1156181, 1159032, 1159038, 1168044,\n", - " 1169105, 1152247, 1165591, 1143729, 1143743, 1186671, 1155588, 1151220,\n", - " 1138674, 1168426, 1144977, 1147837, 1146510, 1146509, 1161240, 1166881,\n", - " 1155045, 1163522, 1163529, 1165421, 1147426, 1149890, 1156739, 1171040,\n", - " 1144810, 1144812, 1135567, 1164741, 1156300, 1167332, 1162613, 1145176,\n", - " 1148683, 1145557, 1145228, 1154695, 1138944, 1138752, 1144973, 1142132,\n", - " 1160720, 1166054, 1147694, 1145447, 1165746, 1148124, 1147723, 1145902,\n", - " 1181040, 1181049, 1170980, 1158735, 1158722, 1158734, 1168756, 1147338,\n", - " 1145489, 1156308, 1166653, 1169216, 1155172, 1155170, 1150515, 1167915,\n", - " 1156113, 1144346, 1144336, 1157534, 1147746, 1154660, 1154670, 1154893,\n", - " 1157331, 1141043, 1151669, 1151674, 1169359, 1154352, 1146344, 1138609,\n", - " 1158154, 1158611, 1158623, 1158051, 1157384, 1178728, 1154866, 1170275,\n", - " 1152546, 1152550, 1149402, 1172838, 1147513, 1173307, 1180710, 1154027,\n", - " 1154028, 1152150, 1169572, 1151703, 1157153, 1157373, 1157375, 1167232,\n", - " 1167239, 1147711, 1172435, 1151850, 1166820, 1177415, 1167722, 1167889,\n", - " 1140330, 1193970, 1143247, 1172939, 1171823, 1183656, 1150234, 1154151,\n", - " 1165668, 1167517, 1149170, 1169821, 1143279, 1185666, 1153803, 1170520,\n", - " 1153141, 1181746, 1176438, 1180916, 1180918, 1182651, 1158030, 1161255,\n", - " 1176527, 1155262, 1155104, 1186766, 1157792, 1157795, 1143341, 1151488,\n", - " 1171623, 1163572, 1155804, 1157134, 1180036, 1181922, 1184259, 1158253,\n", - " 1154497, 1161846, 1191749, 1164564, 1145626, 1172024, 1182632, 1149755,\n", - " 1153601, 1157761, 1155992, 1158771, 1158779, 1158512, 1158934, 1167638,\n", - " 1155890, 1181973, 1157268, 1182786, 1180491, 1162253, 1180521, 1168621,\n", - " 1160078, 1164232, 1187173, 1165448, 1170336, 1170034, 1168942, 1182158,\n", - " 1182760, 1156528, 1139831, 1154806, 1154812, 1180839, 1164677, 1191674,\n", - " 1151288, 1156055, 1151972, 1151977, 1191714, 1191726, 1149544, 1191968,\n", - " 1188174, 1177482, 1191018, 1190246, 1168678, 1188033, 1140992, 1141001,\n", - " 1171067, 1187629, 1151774, 1189479, 1193564, 1171462, 1171111, 1171201,\n", - " 1170135, 1172429, 1166785, 1179660, 1155962, 1188280, 1177875, 1179769,\n", - " 1178315, 1181113, 1173106, 1192670, 1167471, 1161344, 1184933, 1157008],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1141424, 1136225, 1136228, 1136237, 1140282, 1140284, 1140285,\n", - " 1135926, 1135933, 1135727, 1137791, 1140785, 1137506, 1137509, 1136969,\n", - " 1149831, 1149839, 1145373, 1137271, 1137274, 1138942, 1145052, 1143362,\n", - " 1143372, 1146646, 1139609, 1150509, 1148576, 1149216, 1149228, 1142958,\n", - " 1155683, 1155689, 1143820, 1147473, 1135999, 1152263, 1144636, 1144632,\n", - " 1146996, 1153008, 1153015, 1134697, 1135111, 1148350, 1148346, 1146669,\n", - " 1150193, 1135475, 1152667, 1148546, 1147091, 1137220, 1155018, 1136680,\n", - " 1150329, 1134717, 1134718, 1137829, 1151546, 1140540, 1138112, 1137254,\n", - " 1138356, 1140147, 1140159, 1135909, 1140020, 1135367, 1135202, 1135204,\n", - " 1140753, 1141036, 1134794, 1157443, 1157447, 1135956, 1136518, 1138510,\n", - " 1137329, 1143069, 1136610, 1136617, 1144392, 1135408, 1157399, 1157393,\n", - " 1157397, 1137441, 1137448, 1156159, 1148481, 1139161, 1135579, 1135583,\n", - " 1135664, 1135670, 1140970, 1138514, 1135499, 1154132, 1135522, 1138440,\n", - " 1138443, 1140066, 1138461, 1138449, 1136594, 1158390, 1149328, 1138846,\n", - " 1135101, 1156606, 1142611, 1142615, 1135359, 1138185, 1145843, 1145845,\n", - " 1148531, 1148533, 1137109, 1141523, 1143586, 1139667, 1138067, 1142255,\n", - " 1136085, 1134992, 1134778, 1136551, 1140199, 1158974, 1139327, 1153543,\n", - " 1140032, 1139929, 1138148, 1140549, 1140550, 1140557, 1152042, 1152044,\n", - " 1137734, 1134742, 1134750, 1135540, 1135549, 1136700, 1141088, 1141095,\n", - " 1141097, 1144128, 1149001, 1139898, 1145346, 1141980, 1142031, 1143767,\n", - " 1154852, 1154855, 1143221, 1143225, 1137670, 1159672, 1149982, 1146832,\n", - " 1152709, 1141695, 1140470, 1139386, 1136917, 1143667, 1143676, 1144237,\n", - " 1140598, 1140597, 1146449, 1141785, 1141786, 1141609, 1144650, 1137074,\n", - " 1142050, 1141821, 1143153, 1139276, 1140173, 1158749, 1149111, 1143568,\n", - " 1141482, 1137061, 1140102, 1143113, 1144442, 1144596, 1136864, 1135315,\n", - " 1140442, 1144182, 1150906, 1161094, 1146193, 1146201, 1137854, 1142640,\n", - " 1141365, 1141367, 1153068, 1141678, 1139022, 1139508, 1139510, 1139763,\n", - " 1143779, 1140976, 1140990, 1146695, 1135046, 1147050, 1147047, 1145873,\n", - " 1149878, 1152976, 1152980, 1135457, 1142555, 1139448, 1141925, 1145332,\n", - " 1141841, 1143643, 1141388, 1143845, 1146024, 1146140, 1141585, 1142533,\n", - " 1141236, 1139990, 1143293, 1143294, 1147538, 1147540, 1148760, 1147282,\n", - " 1142829, 1142816, 1136330, 1143663, 1142637, 1139417, 1147362, 1148003,\n", - " 1136160, 1136161, 1142588, 1138922, 1157720, 1136836, 1141289, 1141496,\n", - " 1139048, 1144957, 1143345, 1144765, 1144753, 1144615, 1145813, 1140844,\n", - " 1135876, 1135818, 1135813, 1150294, 1150919, 1146514, 1146523, 1143957,\n", - " 1143456, 1143457, 1143937, 1143949, 1140817, 1143793, 1146636, 1140364,\n", - " 1149574, 1143082, 1166410, 1147984, 1147995, 1147999, 1139252, 1139249,\n", - " 1148704, 1141327, 1141825, 1146751, 1152323, 1147025, 1147971, 1139549,\n", - " 1158226, 1158235, 1167006, 1143921, 1149871, 1141143, 1141137, 1145240,\n", - " 1145751, 1142376, 1142383, 1146178, 1151242, 1152530, 1152538, 1150437,\n", - " 1150445, 1156468, 1144514, 1144524, 1150339, 1152013, 1151480, 1139919,\n", - " 1146729, 1149586, 1134869, 1140565, 1149535, 1150127, 1147019, 1147021,\n", - " 1153959, 1158950, 1141949, 1141278, 1153574, 1148453, 1147653, 1168497,\n", - " 1168504, 1149412, 1148288, 1148300, 1148623, 1147866, 1154420, 1158794,\n", - " 1151363, 1152561, 1136247, 1139721, 1152484, 1141177, 1157983, 1148729,\n", - " 1144110, 1143893, 1171943, 1141740, 1154166, 1153124, 1153188, 1145111,\n", - " 1152968, 1150935, 1152867, 1152878, 1173078, 1144849, 1150352, 1150356,\n", - " 1146232, 1143129, 1143134, 1147442, 1152580, 1152581, 1172680, 1154183,\n", - " 1141420, 1152790, 1136009, 1136002, 1147737, 1146969, 1146975, 1146967,\n", - " 1156402, 1149359, 1153255, 1146623, 1142988, 1152849, 1152405, 1152409,\n", - " 1152100, 1156325, 1153030, 1153038, 1153039, 1137746, 1146304, 1152622,\n", - " 1140521, 1136402, 1151952, 1152826, 1155337, 1152673, 1139576, 1151627,\n", - " 1151617, 1136798, 1148914, 1148916, 1148921, 1150618, 1152903, 1153311,\n", - " 1138283, 1138279, 1152294, 1136023, 1136028, 1136029, 1158712, 1158704,\n", - " 1140674, 1140687, 1152928, 1151064, 1142777, 1143486, 1137396, 1153909,\n", - " 1166850, 1166853, 1150150, 1150164, 1148040, 1149306, 1149300, 1144659,\n", - " 1137047, 1148628, 1158530, 1158540, 1137458, 1154563, 1157509, 1135707,\n", - " 1155376, 1142047, 1157219, 1158854, 1150877, 1158927, 1157069, 1152833,\n", - " 1145187, 1143491, 1157563, 1150465, 1146851, 1135729, 1138824, 1152185,\n", - " 1156629, 1156638, 1151788, 1153413, 1151469, 1158304, 1158308, 1158311,\n", - " 1151271, 1137979, 1153359, 1162120, 1154529, 1154530, 1154528, 1142758,\n", - " 1156207, 1156271, 1157642, 1151379, 1158638, 1155375, 1155122, 1135396,\n", - " 1135398, 1157898, 1155626, 1155628, 1155631, 1158492, 1156563, 1154547,\n", - " 1155572, 1158824, 1148835, 1155646, 1143262, 1162396, 1154080, 1151327,\n", - " 1179439, 1143189, 1160904, 1153322, 1150073, 1155606, 1155613, 1150983,\n", - " 1155293, 1155282, 1157933, 1137152, 1153781, 1158204, 1137380, 1159116,\n", - " 1177754, 1138269, 1145694, 1145681, 1140918, 1154010, 1134683, 1135601,\n", - " 1148149, 1150661, 1155848, 1158669, 1158656, 1157684, 1140633, 1152209,\n", - " 1152220, 1155439, 1157735, 1157033, 1157031, 1157030, 1144843, 1155975,\n", - " 1156811, 1156812, 1160164, 1136896, 1158760, 1158764, 1158815, 1151615,\n", - " 1136494, 1136491, 1161616, 1159241, 1156665, 1155305, 1153808, 1136640,\n", - " 1136646, 1134757, 1157863, 1153827, 1156516, 1146126, 1138110, 1155521,\n", - " 1155528, 1165852, 1161958, 1135661, 1142663, 1142666, 1167359, 1159042,\n", - " 1159070, 1157944, 1153052, 1153045, 1159731, 1163072, 1144158, 1138396,\n", - " 1138393, 1150046, 1150041, 1149070, 1145948, 1155479, 1153519, 1164857,\n", - " 1138161, 1149956, 1154590, 1148025, 1157357, 1166086, 1146356, 1164048,\n", - " 1140650, 1140643, 1148600, 1148603, 1148607, 1144503, 1151872, 1155816,\n", - " 1156361, 1156355, 1141800, 1158643, 1156181, 1159032, 1159038, 1168044,\n", - " 1169105, 1152247, 1165591, 1143729, 1143743, 1186671, 1155588, 1151220,\n", - " 1138674, 1168426, 1144977, 1147837, 1146510, 1146509, 1161240, 1166881,\n", - " 1155045, 1163522, 1163529, 1165421, 1147426, 1149890, 1156739, 1171040,\n", - " 1144810, 1144812, 1135567, 1164741, 1156300, 1167332, 1162613, 1145176,\n", - " 1148683, 1145557, 1145228, 1154695, 1138944, 1138752, 1144973, 1142132,\n", - " 1160720, 1166054, 1147694, 1145447, 1165746, 1148124, 1147723, 1145902,\n", - " 1181040, 1181049, 1170980, 1158735, 1158722, 1158734, 1168756, 1147338,\n", - " 1145489, 1156308, 1166653, 1169216, 1155172, 1155170, 1150515, 1167915,\n", - " 1156113, 1144346, 1144336, 1157534, 1147746, 1154660, 1154670, 1154893,\n", - " 1157331, 1141043, 1151669, 1151674, 1169359, 1154352, 1146344, 1138609,\n", - " 1158154, 1158611, 1158623, 1158051, 1157384, 1178728, 1154866, 1170275,\n", - " 1152546, 1152550, 1149402, 1172838, 1147513, 1173307, 1180710, 1154027,\n", - " 1154028, 1152150, 1169572, 1151703, 1157153, 1157373, 1157375, 1167232,\n", - " 1167239, 1147711, 1172435, 1151850, 1166820, 1177415, 1167722, 1167889,\n", - " 1140330, 1193970, 1143247, 1172939, 1171823, 1183656, 1150234, 1154151,\n", - " 1165668, 1167517, 1149170, 1169821, 1143279, 1185666, 1153803, 1170520,\n", - " 1153141, 1181746, 1176438, 1180916, 1180918, 1182651, 1158030, 1161255,\n", - " 1176527, 1155262, 1155104, 1186766, 1157792, 1157795, 1143341, 1151488,\n", - " 1171623, 1163572, 1155804, 1157134, 1180036, 1181922, 1184259, 1158253,\n", - " 1154497, 1161846, 1191749, 1164564, 1145626, 1172024, 1182632, 1149755,\n", - " 1153601, 1157761, 1155992, 1158771, 1158779, 1158512, 1158934, 1167638,\n", - " 1155890, 1181973, 1157268, 1182786, 1180491, 1162253, 1180521, 1168621,\n", - " 1160078, 1164232, 1187173, 1165448, 1170336, 1170034, 1168942, 1182158,\n", - " 1182760, 1156528, 1139831, 1154806, 1154812, 1180839, 1164677, 1191674,\n", - " 1151288, 1156055, 1151972, 1151977, 1191714, 1191726, 1149544, 1191968,\n", - " 1188174, 1177482, 1191018, 1190246, 1168678, 1188033, 1140992, 1141001,\n", - " 1171067, 1187629, 1151774, 1189479, 1193564, 1171462, 1171111, 1171201,\n", - " 1170135, 1172429, 1166785, 1179660, 1155962, 1188280, 1177875, 1179769,\n", - " 1178315, 1181113, 1173106, 1192670, 1167471, 1161344, 1184933, 1157008],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195202, 1198248, 1197719, 1198730, 1195860, 1199282, 1198449, 1202255,\n", - " 1196199, 1198832, 1201581, 1201582, 1201237, 1194626, 1200650, 1201016,\n", - " 1197359, 1198633, 1198690, 1198694, 1196871, 1198557, 1194866, 1194745,\n", - " 1194770, 1194642, 1195514, 1195263, 1201992, 1197697, 1198095, 1194949,\n", - " 1195459, 1194882, 1195888, 1195892, 1195895, 1197856, 1196991, 1195320,\n", - " 1195325, 1196835, 1197807, 1198363, 1198167, 1199823, 1195148, 1195265,\n", - " 1197136, 1200765, 1196109, 1195841, 1195847, 1195541, 1197474, 1199697,\n", - " 1196272, 1198277, 1200949, 1200950, 1196034, 1197291, 1199185, 1196851,\n", - " 1194928, 1199803, 1197676, 1197990, 1200869, 1198406, 1198404, 1199231,\n", - " 1199745, 1196508, 1196727, 1196734, 1195771, 1198416, 1198428, 1198811,\n", - " 1201534, 1201547, 1201824, 1201179, 1200507, 1198066, 1198593, 1201156,\n", - " 1200918, 1202640, 1199723, 1201041, 1201052, 1200363, 1195685, 1201737,\n", - " 1200521, 1200553, 1200555, 1203071, 1199203, 1201726, 1202542, 1197050,\n", - " 1199908, 1201442, 1201034, 1202239, 1201291, 1198472, 1201871, 1203329,\n", - " 1199922, 1199929, 1200398, 1200784, 1202687, 1195048, 1195679, 1198932,\n", - " 1200276, 1196916, 1197816, 1196414, 1196597, 1196601, 1196602, 1198824,\n", - " 1197735, 1200437, 1198819, 1200468, 1197652, 1195165, 1194911, 1201966,\n", - " 1196424], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195202, 1198248, 1197719, 1198730, 1195860, 1199282, 1198449, 1202255,\n", - " 1196199, 1198832, 1201581, 1201582, 1201237, 1194626, 1200650, 1201016,\n", - " 1197359, 1198633, 1198690, 1198694, 1196871, 1198557, 1194866, 1194745,\n", - " 1194770, 1194642, 1195514, 1195263, 1201992, 1197697, 1198095, 1194949,\n", - " 1195459, 1194882, 1195888, 1195892, 1195895, 1197856, 1196991, 1195320,\n", - " 1195325, 1196835, 1197807, 1198363, 1198167, 1199823, 1195148, 1195265,\n", - " 1197136, 1200765, 1196109, 1195841, 1195847, 1195541, 1197474, 1199697,\n", - " 1196272, 1198277, 1200949, 1200950, 1196034, 1197291, 1199185, 1196851,\n", - " 1194928, 1199803, 1197676, 1197990, 1200869, 1198406, 1198404, 1199231,\n", - " 1199745, 1196508, 1196727, 1196734, 1195771, 1198416, 1198428, 1198811,\n", - " 1201534, 1201547, 1201824, 1201179, 1200507, 1198066, 1198593, 1201156,\n", - " 1200918, 1202640, 1199723, 1201041, 1201052, 1200363, 1195685, 1201737,\n", - " 1200521, 1200553, 1200555, 1203071, 1199203, 1201726, 1202542, 1197050,\n", - " 1199908, 1201442, 1201034, 1202239, 1201291, 1198472, 1201871, 1203329,\n", - " 1199922, 1199929, 1200398, 1200784, 1202687, 1195048, 1195679, 1198932,\n", - " 1200276, 1196916, 1197816, 1196414, 1196597, 1196601, 1196602, 1198824,\n", - " 1197735, 1200437, 1198819, 1200468, 1197652, 1195165, 1194911, 1201966,\n", - " 1196424], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 2.7138e-02, -6.1696e-04, 3.7804e-01, ..., 1.0325e-01,\n", - " -1.3880e-03, -2.9450e-03],\n", - " [ 2.7138e-02, -6.1696e-04, 3.7804e-01, ..., 1.0325e-01,\n", - " -1.3880e-03, -2.9450e-03],\n", - " [ 5.5846e-02, -3.4492e-04, 3.8707e-01, ..., 1.0039e-01,\n", - " -1.4247e-03, -2.9846e-03],\n", - " ...,\n", - " [ 2.2327e-02, -5.4168e-04, 4.1472e-01, ..., 9.0619e-02,\n", - " -1.4061e-03, -2.7496e-03],\n", - " [ 3.8293e-02, -8.6150e-05, 4.0183e-01, ..., 5.8091e-02,\n", - " -8.8304e-04, -2.8101e-03],\n", - " [ 5.8949e-02, 1.0051e-02, 3.8937e-01, ..., 6.3345e-02,\n", - " -7.2892e-04, -2.8255e-03]], device='cuda:0'), 'paper': tensor([[ 1.5903e+00, -3.7227e-02, 1.1655e+00, ..., -1.8782e-02,\n", - " -2.2820e-02, 1.5141e+00],\n", - " [ 1.2453e+00, -2.4418e-02, -1.5972e-03, ..., -1.3805e-02,\n", - " -1.7602e-02, 1.4992e+00],\n", - " [ 1.0289e+00, -1.2315e-02, -1.9489e-03, ..., -6.0432e-03,\n", - " -1.6383e-02, 1.5847e+00],\n", - " ...,\n", - " [ 1.0814e+00, -3.3380e-02, -5.5196e-04, ..., -1.4996e-02,\n", - " -1.8632e-02, 1.0854e+00],\n", - " [ 1.3018e+00, -4.3235e-02, 2.0330e-01, ..., -1.6643e-02,\n", - " -2.3859e-02, 1.3381e+00],\n", - " [ 1.7750e+00, -2.7278e-02, 5.6133e-01, ..., -7.0004e-03,\n", - " -2.6717e-02, 3.0845e+00]], device='cuda:0'), 'author': tensor([[ 7.3294e-02, 9.2627e-02, 1.3633e-01, ..., 5.6504e-01,\n", - " -1.8566e-03, 1.2206e-01],\n", - " [ 1.4592e-01, -9.1699e-04, 6.3076e-02, ..., 6.4091e-01,\n", - " 8.3548e-02, 2.2800e-01],\n", - " [ 1.2843e-01, 5.0141e-04, 9.6644e-02, ..., 5.3670e-01,\n", - " -9.2155e-04, 3.5432e-02],\n", - " ...,\n", - " [ 1.8282e-01, -1.5338e-03, 2.1859e-02, ..., 6.4408e-01,\n", - " 7.0339e-02, 1.9310e-01],\n", - " [-5.2906e-04, -3.5063e-05, 1.5153e-01, ..., 1.0313e-01,\n", - " -3.1383e-04, -9.0066e-04],\n", - " [ 2.0290e-01, -1.4726e-03, 1.3401e-02, ..., 6.5673e-01,\n", - " 9.7264e-02, 2.1126e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0016, 0.0618, 0.1049, ..., -0.0026, -0.0008, -0.0018],\n", - " [-0.0024, 0.1251, 0.0602, ..., -0.0017, -0.0007, -0.0029],\n", - " [-0.0022, 0.1311, 0.0947, ..., -0.0019, -0.0003, -0.0025],\n", - " ...,\n", - " [-0.0012, 0.1178, 0.0154, ..., -0.0021, -0.0009, -0.0030],\n", - " [-0.0028, 0.0595, 0.0781, ..., -0.0016, -0.0010, -0.0027],\n", - " [-0.0014, 0.0628, 0.1768, ..., -0.0037, -0.0016, -0.0014]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 114, 161, 77, 184, 421, 421, 276, 361, 424, 437, 719, 479,\n", - " 470, 445, 394, 233, 279, 622, 622, 574, 1040, 609, 831, 831,\n", - " 1188, 777, 777, 1078, 1103, 1103, 1103, 1052, 1018, 1287, 1230, 1388,\n", - " 1337, 1437, 1334, 1334, 1273, 1273, 1558, 1616, 1658, 1838, 1557, 1679,\n", - " 1845, 1667, 1667, 1779, 1779, 1862, 1635, 1836, 1785, 2022, 1918, 1887,\n", - " 1934, 1934, 1998, 1879, 2119, 2119, 2269, 2269, 2102, 2244, 2285, 2386,\n", - " 2301, 2301, 2301, 2301, 2249, 2250, 2250, 2250, 2493, 2493, 2383, 2601,\n", - " 2689, 2681, 2681, 2681, 2671, 2768, 2768, 2760, 2988, 2768, 2718, 3030,\n", - " 2808, 2808, 2870, 2905, 2942, 3354, 3047, 3132, 3104, 3141, 3204, 3377,\n", - " 3406, 3488, 3570, 3738, 3925, 3925, 3925, 4040, 3696, 4110, 4103, 4103,\n", - " 3751, 3751, 4031, 4234, 4115, 4308, 4308, 4254, 4270, 4299, 4299, 4314,\n", - " 4321, 4320, 4314, 4416, 4408, 4354, 4411, 4609, 4609, 4609, 4499, 4466,\n", - " 4610, 4707, 4801, 4801, 4880, 4801, 4801, 4801, 4801, 4801, 4801, 4801,\n", - " 4801, 4750, 4734, 4974, 4974, 4974, 5238, 5271, 5194, 5194, 5316, 5158,\n", - " 5158, 5136, 5396, 5290, 5290, 5307, 5502, 5619, 5700, 5720, 5537, 5537,\n", - " 5608, 5688, 5642, 5731, 5679, 5679, 5637, 5886, 5899, 5908, 6043, 6215,\n", - " 5932, 6173, 6173, 6321, 6406, 6383, 6299, 6311, 6311, 6408, 6500, 6390,\n", - " 6447],\n", - " [ 7, 74, 50, 15, 78, 110, 87, 135, 40, 107, 120, 107,\n", - " 107, 20, 67, 104, 64, 5, 95, 74, 74, 33, 5, 87,\n", - " 5, 5, 124, 17, 26, 34, 17, 50, 79, 94, 121, 27,\n", - " 136, 18, 82, 87, 21, 27, 16, 86, 93, 80, 124, 45,\n", - " 38, 134, 109, 92, 106, 67, 100, 31, 103, 43, 85, 31,\n", - " 123, 8, 18, 62, 32, 19, 1, 72, 50, 27, 12, 31,\n", - " 29, 107, 74, 23, 88, 56, 0, 88, 9, 119, 103, 68,\n", - " 117, 133, 64, 115, 111, 25, 75, 51, 42, 84, 125, 50,\n", - " 115, 124, 24, 96, 83, 101, 28, 35, 31, 89, 44, 58,\n", - " 27, 28, 70, 33, 65, 102, 17, 78, 39, 118, 21, 35,\n", - " 41, 69, 46, 47, 115, 71, 37, 7, 50, 54, 132, 92,\n", - " 10, 35, 27, 21, 74, 66, 90, 22, 11, 28, 122, 90,\n", - " 114, 76, 131, 98, 105, 74, 127, 112, 130, 73, 53, 52,\n", - " 77, 91, 49, 128, 129, 21, 74, 10, 74, 14, 5, 34,\n", - " 128, 59, 91, 28, 113, 90, 99, 81, 81, 55, 48, 116,\n", - " 19, 2, 57, 81, 73, 74, 74, 13, 60, 4, 58, 30,\n", - " 97, 74, 126, 63, 71, 6, 24, 61, 3, 5, 74, 36,\n", - " 108]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3844, 900, 2247, ..., 6683, 5015, 6126],\n", - " [ 97, 24, 32, ..., 7449, 7639, 7659]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 18, 19, 67, ..., 71, 5, 12],\n", - " [ 110, 91, 186, ..., 6531, 6546, 6366]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 113, 113, 113, ..., 7669, 7577, 7663],\n", - " [ 675, 554, 405, ..., 844, 839, 551]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 141, 817, 200, ..., 285, 780, 296],\n", - " [ 98, 294, 70, ..., 7600, 7667, 7550]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[6120, 4022, 1064, ..., 6832, 6832, 7273],\n", - " [ 10, 98, 122, ..., 6554, 6545, 6554]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 131, 131, 131, ..., 7659, 7659, 7659],\n", - " [2839, 3071, 4113, ..., 6126, 344, 367]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 114, 114, 114, ..., 6421, 6421, 6421],\n", - " [6065, 6174, 6123, ..., 6464, 7265, 6445]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.007188\n", - "sampling 0.007035\n", - "noi time: 0.001465\n", - "get_vertex_data call: 0.031622\n", - "noi group time: 0.004209\n", - "eoi_group_time: 0.018829\n", - "second half: 0.190525\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 18186, 32616, 17409, ..., 1132722, 1120069, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 18186, 32616, 17409, ..., 1132722, 1120069, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1221044, 1203800, ..., 1925034, 1936966, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1221044, 1203800, ..., 1925034, 1936966, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1136228, 1140282, 1140285, 1136337, 1136347, 1135726, 1137783,\n", - " 1137791, 1140785, 1140799, 1141758, 1143615, 1149831, 1139811, 1137271,\n", - " 1145055, 1143372, 1139241, 1139866, 1136959, 1149216, 1143820, 1147473,\n", - " 1147483, 1149283, 1146995, 1135947, 1148548, 1147094, 1155018, 1139365,\n", - " 1139373, 1136677, 1136679, 1136683, 1136685, 1150329, 1152427, 1134709,\n", - " 1140540, 1138112, 1137249, 1137173, 1140020, 1140030, 1140953, 1135367,\n", - " 1135370, 1135202, 1134970, 1141036, 1134794, 1157443, 1136518, 1138504,\n", - " 1136178, 1137693, 1136619, 1135333, 1144786, 1135423, 1157397, 1156159,\n", - " 1141084, 1140970, 1138514, 1138524, 1153098, 1137957, 1137959, 1154132,\n", - " 1156899, 1135522, 1135535, 1139684, 1138305, 1137287, 1138436, 1138440,\n", - " 1138445, 1140071, 1138461, 1149341, 1138844, 1156606, 1147112, 1142611,\n", - " 1135345, 1137109, 1135769, 1139667, 1139673, 1138067, 1138069, 1136085,\n", - " 1134992, 1142434, 1158974, 1159019, 1140046, 1139929, 1139934, 1138148,\n", - " 1152044, 1139069, 1136051, 1136697, 1149001, 1145357, 1141971, 1136392,\n", - " 1143767, 1143775, 1154860, 1143221, 1143225, 1137670, 1139025, 1152709,\n", - " 1141695, 1141690, 1135861, 1154467, 1141224, 1139386, 1136917, 1143676,\n", - " 1137188, 1145071, 1140599, 1141785, 1139494, 1136752, 1144650, 1144641,\n", - " 1134985, 1147850, 1158749, 1138469, 1149108, 1149111, 1141479, 1140110,\n", - " 1138423, 1143113, 1144432, 1144442, 1144596, 1136864, 1145298, 1135327,\n", - " 1144182, 1150906, 1161092, 1161093, 1161095, 1146194, 1139559, 1147153,\n", - " 1136378, 1162804, 1141365, 1141367, 1153068, 1141678, 1149097, 1149101,\n", - " 1144279, 1139508, 1139763, 1139127, 1145001, 1144996, 1140619, 1139171,\n", - " 1140990, 1147050, 1147047, 1145873, 1145886, 1145887, 1152976, 1135457,\n", - " 1141925, 1140580, 1150692, 1148306, 1139405, 1134861, 1143845, 1146014,\n", - " 1136287, 1146024, 1146140, 1141585, 1142533, 1149928, 1141235, 1139990,\n", - " 1143293, 1150424, 1147543, 1147540, 1147282, 1142816, 1142637, 1139417,\n", - " 1139418, 1146091, 1143049, 1143051, 1143052, 1148408, 1138923, 1138927,\n", - " 1136836, 1139296, 1139328, 1142149, 1143345, 1144765, 1144766, 1144611,\n", - " 1137098, 1135876, 1150917, 1146523, 1143456, 1143457, 1137703, 1147574,\n", - " 1155700, 1146634, 1140364, 1144725, 1147999, 1144013, 1147131, 1147244,\n", - " 1148704, 1146745, 1147056, 1147025, 1147027, 1139549, 1158226, 1141137,\n", - " 1145240, 1145246, 1145751, 1145752, 1142370, 1138638, 1151242, 1152530,\n", - " 1150438, 1150445, 1151856, 1149791, 1149777, 1144514, 1144526, 1151997,\n", - " 1147794, 1147796, 1151480, 1154263, 1145256, 1145262, 1147023, 1141949,\n", - " 1151795, 1147653, 1147659, 1143560, 1149412, 1148288, 1148299, 1148300,\n", - " 1150849, 1135079, 1147866, 1154420, 1148180, 1139721, 1146676, 1138867,\n", - " 1141172, 1152436, 1157968, 1148729, 1146544, 1150057, 1166312, 1148204,\n", - " 1153123, 1153124, 1153188, 1145104, 1167960, 1150935, 1173078, 1141022,\n", - " 1147442, 1151816, 1152581, 1135311, 1151906, 1154182, 1148498, 1141420,\n", - " 1136002, 1150630, 1150637, 1146268, 1148949, 1156402, 1146623, 1144476,\n", - " 1152415, 1168005, 1154063, 1146280, 1153038, 1137746, 1146304, 1152622,\n", - " 1152826, 1155337, 1154123, 1152673, 1154636, 1151617, 1151623, 1151629,\n", - " 1150586, 1136132, 1148914, 1152958, 1145952, 1145957, 1152903, 1152341,\n", - " 1138281, 1136028, 1158704, 1156621, 1152928, 1151064, 1154733, 1143483,\n", - " 1143486, 1148033, 1148040, 1160866, 1149798, 1148628, 1158540, 1148369,\n", - " 1157507, 1147641, 1142041, 1154377, 1158860, 1155418, 1135729, 1152179,\n", - " 1135644, 1157784, 1158306, 1158308, 1158311, 1155441, 1155452, 1162114,\n", - " 1145771, 1156919, 1142758, 1156207, 1156265, 1156269, 1155122, 1149519,\n", - " 1155755, 1156463, 1158096, 1158104, 1168230, 1155678, 1155628, 1156563,\n", - " 1154549, 1154555, 1155572, 1158824, 1158323, 1148654, 1155646, 1154644,\n", - " 1161282, 1156711, 1154906, 1154909, 1143189, 1143521, 1153326, 1157430,\n", - " 1155281, 1151031, 1158204, 1158084, 1159116, 1159106, 1138269, 1145681,\n", - " 1134677, 1134685, 1135601, 1135611, 1145507, 1178445, 1148149, 1148159,\n", - " 1155848, 1157684, 1149137, 1149145, 1152209, 1140370, 1140381, 1151093,\n", - " 1144843, 1142469, 1155971, 1155975, 1154682, 1156948, 1161667, 1158846,\n", - " 1156812, 1155393, 1149696, 1154600, 1155940, 1160163, 1136896, 1158883,\n", - " 1158886, 1158444, 1156778, 1151615, 1136480, 1136494, 1136491, 1159241,\n", - " 1154393, 1156668, 1156488, 1153808, 1136640, 1136646, 1157858, 1158558,\n", - " 1146126, 1165778, 1161539, 1142487, 1142493, 1159042, 1163266, 1158303,\n", - " 1157944, 1157945, 1153052, 1153045, 1184453, 1171551, 1155763, 1156235,\n", - " 1153842, 1156104, 1138393, 1150046, 1149063, 1155476, 1155479, 1153514,\n", - " 1147304, 1147300, 1161652, 1138161, 1165382, 1168327, 1154590, 1160758,\n", - " 1139281, 1159985, 1162742, 1157351, 1146063, 1171249, 1171259, 1164048,\n", - " 1165306, 1140650, 1140643, 1143143, 1143151, 1151882, 1185124, 1141800,\n", - " 1158643, 1159025, 1159037, 1168134, 1165604, 1169104, 1152247, 1144487,\n", - " 1155588, 1156589, 1151220, 1144977, 1146500, 1144739, 1155054, 1165415,\n", - " 1153201, 1141471, 1151650, 1147426, 1159386, 1156739, 1153663, 1144812,\n", - " 1162085, 1135567, 1165713, 1165718, 1142733, 1156303, 1145728, 1145176,\n", - " 1148683, 1165943, 1163935, 1145228, 1169284, 1154693, 1154695, 1144973,\n", - " 1168710, 1165746, 1145902, 1153520, 1143397, 1143404, 1154076, 1147341,\n", - " 1151598, 1169602, 1166653, 1155170, 1166195, 1145531, 1144336, 1138376,\n", - " 1154656, 1154670, 1193076, 1153001, 1157331, 1151668, 1169359, 1149442,\n", - " 1138609, 1171529, 1149695, 1158623, 1149847, 1155489, 1152360, 1143172,\n", - " 1168400, 1168059, 1149402, 1148335, 1148325, 1173307, 1169144, 1152150,\n", - " 1159655, 1157153, 1155471, 1157373, 1147711, 1151852, 1157593, 1170490,\n", - " 1166820, 1166823, 1166827, 1141539, 1169032, 1155738, 1163993, 1170554,\n", - " 1171823, 1182131, 1154148, 1179965, 1149169, 1186117, 1165956, 1168481,\n", - " 1179243, 1171302, 1181241, 1153803, 1164818, 1185146, 1184093, 1161255,\n", - " 1176794, 1157792, 1157798, 1157795, 1171623, 1157134, 1162828, 1178706,\n", - " 1164563, 1145626, 1156432, 1149755, 1146242, 1153609, 1155990, 1163192,\n", - " 1158779, 1158512, 1158513, 1166172, 1179068, 1158379, 1155892, 1155899,\n", - " 1155902, 1164798, 1159329, 1168621, 1162480, 1164256, 1164271, 1183826,\n", - " 1186270, 1170336, 1186363, 1170041, 1192746, 1139828, 1139831, 1150265,\n", - " 1154812, 1156049, 1156055, 1190261, 1151978, 1173058, 1190925, 1149544,\n", - " 1191512, 1140993, 1140996, 1162156, 1188593, 1151774, 1153733, 1193039,\n", - " 1171201, 1150400, 1172122, 1158070, 1158066, 1152080, 1155962, 1169831,\n", - " 1194262, 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1136228, 1140282, 1140285, 1136337, 1136347, 1135726, 1137783,\n", - " 1137791, 1140785, 1140799, 1141758, 1143615, 1149831, 1139811, 1137271,\n", - " 1145055, 1143372, 1139241, 1139866, 1136959, 1149216, 1143820, 1147473,\n", - " 1147483, 1149283, 1146995, 1135947, 1148548, 1147094, 1155018, 1139365,\n", - " 1139373, 1136677, 1136679, 1136683, 1136685, 1150329, 1152427, 1134709,\n", - " 1140540, 1138112, 1137249, 1137173, 1140020, 1140030, 1140953, 1135367,\n", - " 1135370, 1135202, 1134970, 1141036, 1134794, 1157443, 1136518, 1138504,\n", - " 1136178, 1137693, 1136619, 1135333, 1144786, 1135423, 1157397, 1156159,\n", - " 1141084, 1140970, 1138514, 1138524, 1153098, 1137957, 1137959, 1154132,\n", - " 1156899, 1135522, 1135535, 1139684, 1138305, 1137287, 1138436, 1138440,\n", - " 1138445, 1140071, 1138461, 1149341, 1138844, 1156606, 1147112, 1142611,\n", - " 1135345, 1137109, 1135769, 1139667, 1139673, 1138067, 1138069, 1136085,\n", - " 1134992, 1142434, 1158974, 1159019, 1140046, 1139929, 1139934, 1138148,\n", - " 1152044, 1139069, 1136051, 1136697, 1149001, 1145357, 1141971, 1136392,\n", - " 1143767, 1143775, 1154860, 1143221, 1143225, 1137670, 1139025, 1152709,\n", - " 1141695, 1141690, 1135861, 1154467, 1141224, 1139386, 1136917, 1143676,\n", - " 1137188, 1145071, 1140599, 1141785, 1139494, 1136752, 1144650, 1144641,\n", - " 1134985, 1147850, 1158749, 1138469, 1149108, 1149111, 1141479, 1140110,\n", - " 1138423, 1143113, 1144432, 1144442, 1144596, 1136864, 1145298, 1135327,\n", - " 1144182, 1150906, 1161092, 1161093, 1161095, 1146194, 1139559, 1147153,\n", - " 1136378, 1162804, 1141365, 1141367, 1153068, 1141678, 1149097, 1149101,\n", - " 1144279, 1139508, 1139763, 1139127, 1145001, 1144996, 1140619, 1139171,\n", - " 1140990, 1147050, 1147047, 1145873, 1145886, 1145887, 1152976, 1135457,\n", - " 1141925, 1140580, 1150692, 1148306, 1139405, 1134861, 1143845, 1146014,\n", - " 1136287, 1146024, 1146140, 1141585, 1142533, 1149928, 1141235, 1139990,\n", - " 1143293, 1150424, 1147543, 1147540, 1147282, 1142816, 1142637, 1139417,\n", - " 1139418, 1146091, 1143049, 1143051, 1143052, 1148408, 1138923, 1138927,\n", - " 1136836, 1139296, 1139328, 1142149, 1143345, 1144765, 1144766, 1144611,\n", - " 1137098, 1135876, 1150917, 1146523, 1143456, 1143457, 1137703, 1147574,\n", - " 1155700, 1146634, 1140364, 1144725, 1147999, 1144013, 1147131, 1147244,\n", - " 1148704, 1146745, 1147056, 1147025, 1147027, 1139549, 1158226, 1141137,\n", - " 1145240, 1145246, 1145751, 1145752, 1142370, 1138638, 1151242, 1152530,\n", - " 1150438, 1150445, 1151856, 1149791, 1149777, 1144514, 1144526, 1151997,\n", - " 1147794, 1147796, 1151480, 1154263, 1145256, 1145262, 1147023, 1141949,\n", - " 1151795, 1147653, 1147659, 1143560, 1149412, 1148288, 1148299, 1148300,\n", - " 1150849, 1135079, 1147866, 1154420, 1148180, 1139721, 1146676, 1138867,\n", - " 1141172, 1152436, 1157968, 1148729, 1146544, 1150057, 1166312, 1148204,\n", - " 1153123, 1153124, 1153188, 1145104, 1167960, 1150935, 1173078, 1141022,\n", - " 1147442, 1151816, 1152581, 1135311, 1151906, 1154182, 1148498, 1141420,\n", - " 1136002, 1150630, 1150637, 1146268, 1148949, 1156402, 1146623, 1144476,\n", - " 1152415, 1168005, 1154063, 1146280, 1153038, 1137746, 1146304, 1152622,\n", - " 1152826, 1155337, 1154123, 1152673, 1154636, 1151617, 1151623, 1151629,\n", - " 1150586, 1136132, 1148914, 1152958, 1145952, 1145957, 1152903, 1152341,\n", - " 1138281, 1136028, 1158704, 1156621, 1152928, 1151064, 1154733, 1143483,\n", - " 1143486, 1148033, 1148040, 1160866, 1149798, 1148628, 1158540, 1148369,\n", - " 1157507, 1147641, 1142041, 1154377, 1158860, 1155418, 1135729, 1152179,\n", - " 1135644, 1157784, 1158306, 1158308, 1158311, 1155441, 1155452, 1162114,\n", - " 1145771, 1156919, 1142758, 1156207, 1156265, 1156269, 1155122, 1149519,\n", - " 1155755, 1156463, 1158096, 1158104, 1168230, 1155678, 1155628, 1156563,\n", - " 1154549, 1154555, 1155572, 1158824, 1158323, 1148654, 1155646, 1154644,\n", - " 1161282, 1156711, 1154906, 1154909, 1143189, 1143521, 1153326, 1157430,\n", - " 1155281, 1151031, 1158204, 1158084, 1159116, 1159106, 1138269, 1145681,\n", - " 1134677, 1134685, 1135601, 1135611, 1145507, 1178445, 1148149, 1148159,\n", - " 1155848, 1157684, 1149137, 1149145, 1152209, 1140370, 1140381, 1151093,\n", - " 1144843, 1142469, 1155971, 1155975, 1154682, 1156948, 1161667, 1158846,\n", - " 1156812, 1155393, 1149696, 1154600, 1155940, 1160163, 1136896, 1158883,\n", - " 1158886, 1158444, 1156778, 1151615, 1136480, 1136494, 1136491, 1159241,\n", - " 1154393, 1156668, 1156488, 1153808, 1136640, 1136646, 1157858, 1158558,\n", - " 1146126, 1165778, 1161539, 1142487, 1142493, 1159042, 1163266, 1158303,\n", - " 1157944, 1157945, 1153052, 1153045, 1184453, 1171551, 1155763, 1156235,\n", - " 1153842, 1156104, 1138393, 1150046, 1149063, 1155476, 1155479, 1153514,\n", - " 1147304, 1147300, 1161652, 1138161, 1165382, 1168327, 1154590, 1160758,\n", - " 1139281, 1159985, 1162742, 1157351, 1146063, 1171249, 1171259, 1164048,\n", - " 1165306, 1140650, 1140643, 1143143, 1143151, 1151882, 1185124, 1141800,\n", - " 1158643, 1159025, 1159037, 1168134, 1165604, 1169104, 1152247, 1144487,\n", - " 1155588, 1156589, 1151220, 1144977, 1146500, 1144739, 1155054, 1165415,\n", - " 1153201, 1141471, 1151650, 1147426, 1159386, 1156739, 1153663, 1144812,\n", - " 1162085, 1135567, 1165713, 1165718, 1142733, 1156303, 1145728, 1145176,\n", - " 1148683, 1165943, 1163935, 1145228, 1169284, 1154693, 1154695, 1144973,\n", - " 1168710, 1165746, 1145902, 1153520, 1143397, 1143404, 1154076, 1147341,\n", - " 1151598, 1169602, 1166653, 1155170, 1166195, 1145531, 1144336, 1138376,\n", - " 1154656, 1154670, 1193076, 1153001, 1157331, 1151668, 1169359, 1149442,\n", - " 1138609, 1171529, 1149695, 1158623, 1149847, 1155489, 1152360, 1143172,\n", - " 1168400, 1168059, 1149402, 1148335, 1148325, 1173307, 1169144, 1152150,\n", - " 1159655, 1157153, 1155471, 1157373, 1147711, 1151852, 1157593, 1170490,\n", - " 1166820, 1166823, 1166827, 1141539, 1169032, 1155738, 1163993, 1170554,\n", - " 1171823, 1182131, 1154148, 1179965, 1149169, 1186117, 1165956, 1168481,\n", - " 1179243, 1171302, 1181241, 1153803, 1164818, 1185146, 1184093, 1161255,\n", - " 1176794, 1157792, 1157798, 1157795, 1171623, 1157134, 1162828, 1178706,\n", - " 1164563, 1145626, 1156432, 1149755, 1146242, 1153609, 1155990, 1163192,\n", - " 1158779, 1158512, 1158513, 1166172, 1179068, 1158379, 1155892, 1155899,\n", - " 1155902, 1164798, 1159329, 1168621, 1162480, 1164256, 1164271, 1183826,\n", - " 1186270, 1170336, 1186363, 1170041, 1192746, 1139828, 1139831, 1150265,\n", - " 1154812, 1156049, 1156055, 1190261, 1151978, 1173058, 1190925, 1149544,\n", - " 1191512, 1140993, 1140996, 1162156, 1188593, 1151774, 1153733, 1193039,\n", - " 1171201, 1150400, 1172122, 1158070, 1158066, 1152080, 1155962, 1169831,\n", - " 1194262, 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195697, 1199424, 1200099, 1198730, 1198731, 1201094, 1199282, 1202255,\n", - " 1201582, 1199146, 1202119, 1200641, 1201660, 1198694, 1196956, 1202804,\n", - " 1196665, 1198557, 1197512, 1195494, 1194649, 1194655, 1195511, 1195514,\n", - " 1195263, 1197924, 1201992, 1198542, 1197697, 1199519, 1195459, 1194882,\n", - " 1195888, 1195740, 1196359, 1196618, 1195313, 1195325, 1197107, 1196837,\n", - " 1198264, 1196711, 1199823, 1195147, 1196209, 1195265, 1195278, 1196242,\n", - " 1196109, 1195841, 1198915, 1195659, 1195536, 1196313, 1197478, 1196117,\n", - " 1199998, 1202017, 1195918, 1199697, 1199699, 1200959, 1199860, 1199059,\n", - " 1199185, 1194928, 1199628, 1197990, 1200872, 1200404, 1198400, 1199231,\n", - " 1194786, 1196501, 1196508, 1197970, 1197976, 1197601, 1196727, 1195771,\n", - " 1200894, 1198428, 1201827, 1200570, 1198596, 1199445, 1201156, 1201056,\n", - " 1200927, 1199539, 1202640, 1201049, 1201052, 1200526, 1200083, 1201451,\n", - " 1201442, 1200899, 1202338, 1202175, 1201291, 1195607, 1203329, 1202876,\n", - " 1200784, 1199606, 1195676, 1195679, 1197334, 1200276, 1195181, 1197816,\n", - " 1197822, 1200590, 1194730, 1200003, 1198824, 1203321, 1197735, 1200014,\n", - " 1199787, 1198819, 1199234, 1195070, 1197652, 1197655, 1197335, 1195082,\n", - " 1195165, 1194908, 1203162, 1197872], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195697, 1199424, 1200099, 1198730, 1198731, 1201094, 1199282, 1202255,\n", - " 1201582, 1199146, 1202119, 1200641, 1201660, 1198694, 1196956, 1202804,\n", - " 1196665, 1198557, 1197512, 1195494, 1194649, 1194655, 1195511, 1195514,\n", - " 1195263, 1197924, 1201992, 1198542, 1197697, 1199519, 1195459, 1194882,\n", - " 1195888, 1195740, 1196359, 1196618, 1195313, 1195325, 1197107, 1196837,\n", - " 1198264, 1196711, 1199823, 1195147, 1196209, 1195265, 1195278, 1196242,\n", - " 1196109, 1195841, 1198915, 1195659, 1195536, 1196313, 1197478, 1196117,\n", - " 1199998, 1202017, 1195918, 1199697, 1199699, 1200959, 1199860, 1199059,\n", - " 1199185, 1194928, 1199628, 1197990, 1200872, 1200404, 1198400, 1199231,\n", - " 1194786, 1196501, 1196508, 1197970, 1197976, 1197601, 1196727, 1195771,\n", - " 1200894, 1198428, 1201827, 1200570, 1198596, 1199445, 1201156, 1201056,\n", - " 1200927, 1199539, 1202640, 1201049, 1201052, 1200526, 1200083, 1201451,\n", - " 1201442, 1200899, 1202338, 1202175, 1201291, 1195607, 1203329, 1202876,\n", - " 1200784, 1199606, 1195676, 1195679, 1197334, 1200276, 1195181, 1197816,\n", - " 1197822, 1200590, 1194730, 1200003, 1198824, 1203321, 1197735, 1200014,\n", - " 1199787, 1198819, 1199234, 1195070, 1197652, 1197655, 1197335, 1195082,\n", - " 1195165, 1194908, 1203162, 1197872], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 1.2000e-01, -6.7633e-04, 5.2492e-01, ..., 5.9299e-02,\n", - " -1.2125e-03, -3.9111e-03],\n", - " [ 9.1921e-02, -3.5534e-04, 4.6425e-01, ..., 6.1032e-02,\n", - " -1.2119e-03, -3.5269e-03],\n", - " [ 5.0210e-02, 2.7920e-02, 3.7026e-01, ..., 7.8158e-02,\n", - " -1.0465e-03, -2.9519e-03],\n", - " ...,\n", - " [ 3.4331e-02, 7.8661e-03, 3.6633e-01, ..., 8.6947e-02,\n", - " -1.0281e-03, -2.8660e-03],\n", - " [ 2.5830e-02, -3.1113e-04, 3.6982e-01, ..., 1.3763e-01,\n", - " -2.0436e-03, -2.7309e-03],\n", - " [ 1.1473e-01, -7.2028e-04, 5.1327e-01, ..., 6.5263e-02,\n", - " -1.2476e-03, -3.8526e-03]], device='cuda:0'), 'paper': tensor([[ 1.5739e+00, -2.4621e-02, 6.4777e-01, ..., -8.3909e-03,\n", - " -2.3555e-02, 2.3162e+00],\n", - " [ 9.0691e-01, -1.7310e-02, -1.9451e-03, ..., -8.5891e-03,\n", - " -1.3368e-02, 1.0956e+00],\n", - " [ 1.5884e+00, -2.6284e-02, 6.0181e-01, ..., -8.3102e-03,\n", - " -2.5218e-02, 2.7258e+00],\n", - " ...,\n", - " [ 1.8673e+00, -4.7221e-02, 1.3667e+00, ..., -2.3437e-02,\n", - " -2.7328e-02, 1.6089e+00],\n", - " [ 1.6631e+00, -6.1472e-02, 7.4706e-01, ..., -2.4124e-02,\n", - " -3.0157e-02, 8.8055e-01],\n", - " [ 1.6533e+00, -2.7365e-02, 4.6221e-01, ..., -7.3201e-03,\n", - " -2.5722e-02, 2.9082e+00]], device='cuda:0'), 'author': tensor([[-3.1653e-04, 2.1107e-02, 8.6501e-02, ..., 5.3042e-01,\n", - " 1.0397e-01, 1.4975e-01],\n", - " [ 1.7686e-01, -1.4298e-03, 4.1919e-02, ..., 7.3837e-01,\n", - " 8.4623e-02, 2.5334e-01],\n", - " [ 7.2691e-02, -4.1956e-04, 5.0192e-02, ..., 5.1714e-01,\n", - " 7.0029e-02, 7.8743e-02],\n", - " ...,\n", - " [ 2.0228e-01, -1.2344e-03, 3.1649e-02, ..., 6.7236e-01,\n", - " 1.2862e-01, 2.5698e-01],\n", - " [ 1.8643e-01, -1.5565e-03, 3.7133e-02, ..., 6.1208e-01,\n", - " 1.6496e-01, 2.5658e-01],\n", - " [ 1.8503e-01, -1.0595e-03, 4.6721e-02, ..., 6.6514e-01,\n", - " 1.9634e-01, 3.3980e-01]], device='cuda:0'), 'field_of_study': tensor([[-1.8440e-03, 4.9803e-02, 7.2897e-02, ..., -1.3608e-03,\n", - " -8.4324e-04, -2.5901e-03],\n", - " [-3.2767e-03, 3.2830e-01, 9.4042e-02, ..., 9.4261e-02,\n", - " -2.5238e-04, -4.1032e-03],\n", - " [-4.3489e-03, 3.2337e-01, 3.3893e-04, ..., 7.7636e-02,\n", - " -1.0419e-03, -5.3718e-03],\n", - " ...,\n", - " [-4.0348e-03, 2.3721e-01, 2.7591e-02, ..., 9.9250e-02,\n", - " -9.7954e-04, -3.2901e-03],\n", - " [-3.3989e-03, -7.9402e-05, 6.4109e-02, ..., -1.4792e-03,\n", - " -1.9045e-04, -2.1782e-03],\n", - " [-4.0527e-03, 3.6008e-01, 3.0587e-02, ..., 1.6329e-01,\n", - " -1.2633e-03, -5.6238e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 153, 217, 217, 246, 13, 6, 6, 192, 191, 76, 6, 212,\n", - " 212, 35, 564, 458, 447, 548, 834, 627, 1082, 855, 822, 1082,\n", - " 1082, 1082, 1082, 1082, 1117, 1220, 1220, 929, 885, 914, 914, 914,\n", - " 1102, 1102, 1201, 1463, 1102, 1102, 1102, 1102, 1102, 1102, 1378, 1378,\n", - " 1378, 1477, 1565, 1301, 1723, 1478, 1584, 1499, 1479, 1667, 1355, 1966,\n", - " 1966, 1544, 1774, 1774, 1914, 1751, 1751, 1774, 1774, 1787, 2026, 2201,\n", - " 2121, 2110, 2440, 2440, 2378, 2378, 2516, 2380, 2542, 2542, 2478, 2533,\n", - " 2533, 2498, 2562, 2699, 2699, 2699, 2725, 2606, 2806, 2690, 2844, 2770,\n", - " 2821, 2728, 2728, 2728, 2899, 2899, 2952, 3194, 3194, 3184, 3434, 3296,\n", - " 3547, 3286, 3376, 3376, 3547, 3547, 3891, 3689, 3496, 3742, 3872, 3502,\n", - " 3552, 3972, 3988, 3988, 4050, 4109, 4126, 4292, 4292, 4292, 4312, 4160,\n", - " 4255, 4255, 4356, 4224, 4472, 4655, 4607, 4597, 4825, 4825, 4786, 4786,\n", - " 4766, 4766, 4990, 4990, 4858, 5017, 5017, 4986, 4955, 4955, 4955, 4955,\n", - " 4955, 4772, 4674, 4966, 4965, 5191, 4982, 5130, 5299, 5218, 5178, 5178,\n", - " 5397, 5397, 5489, 5337, 5753, 5488, 5797, 5797, 5696, 5714, 5714, 5979,\n", - " 5979, 5937, 5937, 5696, 5931, 5931, 6063, 6063, 5962, 5846, 5740, 6050,\n", - " 6050, 6437, 6437, 6103, 6103, 6103, 6069, 6069, 5831, 5831, 5831, 6305,\n", - " 6305, 6250, 6215, 6215, 6305, 6305, 6305, 6466, 6466, 6101, 6101, 6115,\n", - " 6115, 6374, 6374, 6374, 6501, 5885, 6420, 6535, 6535, 6446, 6172],\n", - " [ 104, 26, 111, 68, 126, 93, 85, 14, 5, 83, 131, 13,\n", - " 27, 95, 26, 38, 116, 109, 68, 48, 71, 52, 41, 98,\n", - " 61, 113, 6, 57, 41, 25, 11, 82, 51, 6, 81, 77,\n", - " 23, 15, 11, 78, 99, 100, 39, 4, 17, 28, 72, 130,\n", - " 61, 24, 11, 51, 51, 129, 3, 79, 38, 75, 41, 77,\n", - " 81, 6, 115, 55, 38, 77, 102, 79, 32, 16, 118, 70,\n", - " 119, 24, 41, 89, 6, 60, 121, 16, 47, 78, 41, 56,\n", - " 44, 97, 41, 38, 117, 92, 53, 6, 10, 37, 71, 87,\n", - " 32, 50, 101, 78, 104, 90, 116, 72, 130, 61, 118, 12,\n", - " 42, 2, 26, 37, 54, 36, 30, 110, 0, 129, 96, 49,\n", - " 7, 80, 130, 33, 118, 122, 9, 22, 73, 123, 105, 48,\n", - " 43, 94, 45, 19, 15, 66, 3, 103, 62, 41, 2, 45,\n", - " 78, 65, 111, 1, 6, 106, 52, 21, 78, 120, 63, 34,\n", - " 101, 128, 50, 114, 45, 8, 66, 97, 65, 84, 58, 125,\n", - " 78, 85, 116, 74, 15, 107, 7, 124, 79, 93, 78, 127,\n", - " 27, 112, 78, 76, 27, 108, 31, 78, 102, 64, 75, 82,\n", - " 48, 50, 78, 46, 107, 78, 88, 78, 18, 59, 78, 40,\n", - " 91, 104, 78, 131, 20, 21, 0, 7, 78, 78, 33, 78,\n", - " 81, 67, 78, 29, 35, 86, 121, 108, 69, 116, 37]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2959, 1714, 2514, ..., 794, 1028, 2168],\n", - " [ 219, 172, 22, ..., 6847, 6960, 6880]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 116, 118, 121, ..., 6, 78, 74],\n", - " [ 85, 216, 249, ..., 6163, 6477, 6436]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 241, 241, 59, ..., 6960, 6960, 6960],\n", - " [ 49, 177, 325, ..., 29, 240, 246]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 281, 220, 284, ..., 535, 11, 224],\n", - " [ 208, 75, 100, ..., 6887, 6818, 6925]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4065, 5105, 2209, ..., 3417, 5014, 5060],\n", - " [ 75, 54, 57, ..., 6506, 6461, 6504]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 59, 59, 59, ..., 6771, 6771, 6771],\n", - " [ 944, 1329, 2273, ..., 4432, 4729, 4321]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 35, 35, 35, ..., 6505, 6505, 6505],\n", - " [3307, 3139, 2137, ..., 481, 531, 1041]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.007036\n", - "sampling 0.006833\n", - "noi time: 0.002088\n", - "get_vertex_data call: 0.029267\n", - "noi group time: 0.002977\n", - "eoi_group_time: 0.010939\n", - "second half: 0.130523\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 1334, 31145, 24187, ..., 1120067, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 1334, 31145, 24187, ..., 1120067, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1211779, 1230244, ..., 1938521, 1930682, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1211779, 1230244, ..., 1938521, 1930682, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1141424, 1140282, 1140284, 1140285, 1138553, 1135716, 1135723,\n", - " 1135721, 1137791, 1139711, 1141758, 1137506, 1136969, 1143615, 1139808,\n", - " 1139820, 1145370, 1145374, 1145984, 1145992, 1145999, 1137271, 1137274,\n", - " 1146640, 1146647, 1140781, 1142968, 1134937, 1149216, 1149219, 1147949,\n", - " 1143820, 1147473, 1147483, 1142881, 1144636, 1149037, 1135950, 1148345,\n", - " 1148346, 1150193, 1148546, 1137220, 1155018, 1139371, 1147202, 1136683,\n", - " 1150329, 1152427, 1146369, 1140535, 1140537, 1140540, 1138112, 1138119,\n", - " 1137181, 1138356, 1135367, 1135202, 1135903, 1137798, 1141036, 1134794,\n", - " 1157443, 1138510, 1137329, 1137342, 1137337, 1157088, 1137693, 1139201,\n", - " 1144395, 1137534, 1135408, 1157398, 1157393, 1157397, 1156159, 1139161,\n", - " 1135579, 1142607, 1141086, 1136111, 1136101, 1135664, 1140970, 1138514,\n", - " 1138524, 1153091, 1137957, 1137959, 1154132, 1145127, 1156899, 1139685,\n", - " 1139878, 1138440, 1138445, 1138451, 1138461, 1136594, 1135122, 1149328,\n", - " 1135088, 1138881, 1156603, 1156606, 1147112, 1160819, 1135357, 1138183,\n", - " 1138185, 1158984, 1137108, 1139667, 1139673, 1139664, 1138069, 1142243,\n", - " 1134992, 1136557, 1148809, 1140199, 1158961, 1159009, 1141058, 1153543,\n", - " 1143625, 1140034, 1136073, 1138648, 1138151, 1153396, 1146075, 1152042,\n", - " 1152044, 1140670, 1137734, 1137728, 1134742, 1134750, 1135540, 1135549,\n", - " 1136697, 1141088, 1141097, 1141100, 1141102, 1149001, 1139898, 1135287,\n", - " 1136384, 1143767, 1143775, 1143706, 1143704, 1143225, 1143230, 1139025,\n", - " 1149982, 1135861, 1136637, 1163310, 1136917, 1144237, 1141785, 1136760,\n", - " 1147850, 1138488, 1141810, 1141821, 1143211, 1140163, 1158749, 1137762,\n", - " 1142713, 1139190, 1138709, 1138708, 1142913, 1138424, 1143107, 1145298,\n", - " 1144039, 1140885, 1144184, 1144190, 1144179, 1144185, 1150906, 1146201,\n", - " 1139559, 1158698, 1140504, 1147153, 1142655, 1141365, 1153069, 1149088,\n", - " 1144279, 1141332, 1143915, 1139510, 1140093, 1145001, 1140990, 1146695,\n", - " 1141560, 1147050, 1152976, 1142549, 1139450, 1141925, 1144242, 1140580,\n", - " 1150243, 1150692, 1140689, 1140696, 1137582, 1144079, 1143845, 1143851,\n", - " 1146024, 1146140, 1141585, 1149928, 1139990, 1146302, 1143290, 1143883,\n", - " 1147543, 1147540, 1148763, 1147282, 1136330, 1142628, 1149366, 1143042,\n", - " 1143051, 1136160, 1138923, 1136836, 1141292, 1139328, 1145427, 1143345,\n", - " 1144619, 1140846, 1144083, 1144088, 1135876, 1144310, 1144319, 1150294,\n", - " 1150296, 1146514, 1143957, 1143456, 1143457, 1144291, 1143937, 1135454,\n", - " 1147574, 1146636, 1147521, 1140364, 1143080, 1143075, 1168921, 1168927,\n", - " 1144725, 1144219, 1144222, 1147984, 1147999, 1134902, 1134907, 1147127,\n", - " 1147131, 1148704, 1141825, 1141836, 1146745, 1148468, 1148473, 1152327,\n", - " 1152328, 1149719, 1147025, 1147971, 1145009, 1158226, 1150452, 1146178,\n", - " 1152530, 1150445, 1149258, 1148930, 1148942, 1148827, 1156473, 1151860,\n", - " 1149791, 1144514, 1144526, 1138034, 1165252, 1152022, 1144888, 1154271,\n", - " 1145256, 1145262, 1139914, 1146731, 1149535, 1148702, 1141940, 1141949,\n", - " 1150745, 1141267, 1149989, 1147653, 1143560, 1149412, 1148288, 1148300,\n", - " 1139090, 1154420, 1148180, 1151363, 1151361, 1146684, 1138867, 1138404,\n", - " 1141182, 1151566, 1148720, 1148729, 1146549, 1139936, 1166314, 1153120,\n", - " 1153124, 1153125, 1153192, 1145111, 1159837, 1144851, 1150352, 1147447,\n", - " 1152579, 1152581, 1135311, 1151906, 1154183, 1154190, 1148498, 1148505,\n", - " 1146565, 1141420, 1141408, 1136002, 1150634, 1147737, 1145080, 1146265,\n", - " 1148949, 1146975, 1146967, 1156413, 1147391, 1150219, 1167290, 1146623,\n", - " 1142986, 1142987, 1144476, 1152103, 1146280, 1146287, 1151729, 1156334,\n", - " 1153037, 1153038, 1137746, 1159978, 1152622, 1152058, 1152826, 1155337,\n", - " 1154119, 1154123, 1152673, 1154633, 1151617, 1151623, 1150578, 1145278,\n", - " 1136131, 1136134, 1136798, 1148916, 1152958, 1152163, 1152169, 1153387,\n", - " 1144529, 1145952, 1151311, 1156831, 1153311, 1138280, 1138283, 1138279,\n", - " 1138281, 1152300, 1156001, 1136028, 1136029, 1158704, 1154733, 1142777,\n", - " 1156422, 1150164, 1149273, 1142257, 1148040, 1149300, 1160874, 1145656,\n", - " 1149794, 1144669, 1137048, 1148628, 1158530, 1137458, 1149946, 1149944,\n", - " 1142041, 1157229, 1142385, 1154929, 1152384, 1157058, 1145191, 1151257,\n", - " 1151260, 1150465, 1165703, 1150818, 1135645, 1147810, 1158304, 1158306,\n", - " 1158308, 1158307, 1151273, 1151331, 1155441, 1155452, 1153359, 1150130,\n", - " 1150132, 1154528, 1156913, 1142758, 1156207, 1151386, 1151379, 1158626,\n", - " 1140186, 1155122, 1155123, 1152515, 1157183, 1153473, 1155755, 1155758,\n", - " 1151424, 1135398, 1158096, 1155630, 1155631, 1156563, 1154555, 1155576,\n", - " 1136466, 1158824, 1158325, 1148838, 1155646, 1153368, 1143254, 1143263,\n", - " 1146938, 1154250, 1154080, 1137359, 1160907, 1150371, 1150068, 1155613,\n", - " 1143508, 1157926, 1157928, 1137381, 1137388, 1159117, 1158342, 1145694,\n", - " 1145690, 1134683, 1135601, 1145507, 1150661, 1150659, 1155852, 1158665,\n", - " 1140633, 1140632, 1152220, 1159213, 1156692, 1140382, 1140374, 1157732,\n", - " 1157735, 1159132, 1157039, 1144843, 1155975, 1158846, 1156815, 1155393,\n", - " 1149700, 1158760, 1158882, 1140221, 1161692, 1162998, 1158278, 1151615,\n", - " 1159429, 1136480, 1136491, 1153632, 1156665, 1183098, 1156490, 1136640,\n", - " 1136646, 1136642, 1144121, 1158209, 1140049, 1157858, 1158558, 1158544,\n", - " 1151147, 1156516, 1165497, 1165778, 1165786, 1138110, 1150011, 1161539,\n", - " 1142482, 1142666, 1157747, 1167359, 1162679, 1159042, 1159057, 1157946,\n", - " 1162044, 1153052, 1153042, 1153045, 1162835, 1155772, 1167707, 1167566,\n", - " 1156235, 1161318, 1156107, 1165244, 1150046, 1149063, 1155479, 1154302,\n", - " 1153519, 1147300, 1142406, 1146872, 1138161, 1164006, 1167206, 1156795,\n", - " 1139790, 1164901, 1139290, 1136802, 1171515, 1157357, 1146063, 1146356,\n", - " 1170415, 1156365, 1158653, 1156181, 1156184, 1159025, 1159032, 1169105,\n", - " 1152247, 1156580, 1138674, 1138685, 1153931, 1148571, 1144977, 1144989,\n", - " 1167933, 1169647, 1146510, 1170996, 1164580, 1161232, 1161240, 1144739,\n", - " 1152776, 1155272, 1155273, 1141471, 1147426, 1156739, 1156744, 1163260,\n", - " 1171040, 1144812, 1162085, 1164750, 1144052, 1145743, 1145176, 1163783,\n", - " 1148683, 1167757, 1154700, 1146042, 1155324, 1159513, 1163504, 1142136,\n", - " 1143025, 1147346, 1139351, 1145902, 1152203, 1143404, 1154076, 1168767,\n", - " 1147331, 1147339, 1170758, 1144699, 1145674, 1149125, 1155172, 1165023,\n", - " 1150515, 1156119, 1154618, 1144346, 1144336, 1157534, 1138383, 1154670,\n", - " 1168433, 1135841, 1169162, 1157331, 1138130, 1141048, 1151664, 1169359,\n", - " 1150025, 1149452, 1147489, 1147491, 1158615, 1158623, 1158062, 1173047,\n", - " 1163292, 1171090, 1179890, 1184807, 1155494, 1152353, 1170907, 1168383,\n", - " 1161121, 1182112, 1165904, 1147510, 1172669, 1173307, 1154027, 1152150,\n", - " 1172790, 1178102, 1157153, 1177404, 1157373, 1147711, 1147707, 1172435,\n", - " 1151850, 1151852, 1148131, 1157593, 1157598, 1172961, 1181020, 1140326,\n", - " 1144548, 1173092, 1182129, 1150234, 1154148, 1149173, 1177455, 1143279,\n", - " 1168481, 1166299, 1171297, 1153803, 1171314, 1172801, 1172309, 1180916,\n", - " 1155262, 1184112, 1154718, 1157803, 1157795, 1175774, 1155804, 1157986,\n", - " 1157991, 1172148, 1181935, 1153898, 1153893, 1154497, 1154500, 1134650,\n", - " 1180290, 1145626, 1172024, 1161909, 1149755, 1146243, 1153609, 1153612,\n", - " 1163721, 1155990, 1170069, 1186057, 1158940, 1175498, 1158371, 1155892,\n", - " 1164411, 1140399, 1163327, 1184534, 1171644, 1177917, 1179090, 1181548,\n", - " 1188516, 1161819, 1146161, 1156170, 1164133, 1168939, 1139828, 1139831,\n", - " 1139837, 1150265, 1154812, 1164924, 1177936, 1188613, 1156055, 1193849,\n", - " 1191989, 1181453, 1181889, 1173058, 1190922, 1167435, 1183048, 1192759,\n", - " 1190033, 1169700, 1166838, 1171201, 1189931, 1175349, 1187115, 1178135,\n", - " 1155956, 1155959, 1155553, 1177875, 1178304, 1162661, 1192228, 1190350,\n", - " 1167471, 1192961], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1141424, 1140282, 1140284, 1140285, 1138553, 1135716, 1135723,\n", - " 1135721, 1137791, 1139711, 1141758, 1137506, 1136969, 1143615, 1139808,\n", - " 1139820, 1145370, 1145374, 1145984, 1145992, 1145999, 1137271, 1137274,\n", - " 1146640, 1146647, 1140781, 1142968, 1134937, 1149216, 1149219, 1147949,\n", - " 1143820, 1147473, 1147483, 1142881, 1144636, 1149037, 1135950, 1148345,\n", - " 1148346, 1150193, 1148546, 1137220, 1155018, 1139371, 1147202, 1136683,\n", - " 1150329, 1152427, 1146369, 1140535, 1140537, 1140540, 1138112, 1138119,\n", - " 1137181, 1138356, 1135367, 1135202, 1135903, 1137798, 1141036, 1134794,\n", - " 1157443, 1138510, 1137329, 1137342, 1137337, 1157088, 1137693, 1139201,\n", - " 1144395, 1137534, 1135408, 1157398, 1157393, 1157397, 1156159, 1139161,\n", - " 1135579, 1142607, 1141086, 1136111, 1136101, 1135664, 1140970, 1138514,\n", - " 1138524, 1153091, 1137957, 1137959, 1154132, 1145127, 1156899, 1139685,\n", - " 1139878, 1138440, 1138445, 1138451, 1138461, 1136594, 1135122, 1149328,\n", - " 1135088, 1138881, 1156603, 1156606, 1147112, 1160819, 1135357, 1138183,\n", - " 1138185, 1158984, 1137108, 1139667, 1139673, 1139664, 1138069, 1142243,\n", - " 1134992, 1136557, 1148809, 1140199, 1158961, 1159009, 1141058, 1153543,\n", - " 1143625, 1140034, 1136073, 1138648, 1138151, 1153396, 1146075, 1152042,\n", - " 1152044, 1140670, 1137734, 1137728, 1134742, 1134750, 1135540, 1135549,\n", - " 1136697, 1141088, 1141097, 1141100, 1141102, 1149001, 1139898, 1135287,\n", - " 1136384, 1143767, 1143775, 1143706, 1143704, 1143225, 1143230, 1139025,\n", - " 1149982, 1135861, 1136637, 1163310, 1136917, 1144237, 1141785, 1136760,\n", - " 1147850, 1138488, 1141810, 1141821, 1143211, 1140163, 1158749, 1137762,\n", - " 1142713, 1139190, 1138709, 1138708, 1142913, 1138424, 1143107, 1145298,\n", - " 1144039, 1140885, 1144184, 1144190, 1144179, 1144185, 1150906, 1146201,\n", - " 1139559, 1158698, 1140504, 1147153, 1142655, 1141365, 1153069, 1149088,\n", - " 1144279, 1141332, 1143915, 1139510, 1140093, 1145001, 1140990, 1146695,\n", - " 1141560, 1147050, 1152976, 1142549, 1139450, 1141925, 1144242, 1140580,\n", - " 1150243, 1150692, 1140689, 1140696, 1137582, 1144079, 1143845, 1143851,\n", - " 1146024, 1146140, 1141585, 1149928, 1139990, 1146302, 1143290, 1143883,\n", - " 1147543, 1147540, 1148763, 1147282, 1136330, 1142628, 1149366, 1143042,\n", - " 1143051, 1136160, 1138923, 1136836, 1141292, 1139328, 1145427, 1143345,\n", - " 1144619, 1140846, 1144083, 1144088, 1135876, 1144310, 1144319, 1150294,\n", - " 1150296, 1146514, 1143957, 1143456, 1143457, 1144291, 1143937, 1135454,\n", - " 1147574, 1146636, 1147521, 1140364, 1143080, 1143075, 1168921, 1168927,\n", - " 1144725, 1144219, 1144222, 1147984, 1147999, 1134902, 1134907, 1147127,\n", - " 1147131, 1148704, 1141825, 1141836, 1146745, 1148468, 1148473, 1152327,\n", - " 1152328, 1149719, 1147025, 1147971, 1145009, 1158226, 1150452, 1146178,\n", - " 1152530, 1150445, 1149258, 1148930, 1148942, 1148827, 1156473, 1151860,\n", - " 1149791, 1144514, 1144526, 1138034, 1165252, 1152022, 1144888, 1154271,\n", - " 1145256, 1145262, 1139914, 1146731, 1149535, 1148702, 1141940, 1141949,\n", - " 1150745, 1141267, 1149989, 1147653, 1143560, 1149412, 1148288, 1148300,\n", - " 1139090, 1154420, 1148180, 1151363, 1151361, 1146684, 1138867, 1138404,\n", - " 1141182, 1151566, 1148720, 1148729, 1146549, 1139936, 1166314, 1153120,\n", - " 1153124, 1153125, 1153192, 1145111, 1159837, 1144851, 1150352, 1147447,\n", - " 1152579, 1152581, 1135311, 1151906, 1154183, 1154190, 1148498, 1148505,\n", - " 1146565, 1141420, 1141408, 1136002, 1150634, 1147737, 1145080, 1146265,\n", - " 1148949, 1146975, 1146967, 1156413, 1147391, 1150219, 1167290, 1146623,\n", - " 1142986, 1142987, 1144476, 1152103, 1146280, 1146287, 1151729, 1156334,\n", - " 1153037, 1153038, 1137746, 1159978, 1152622, 1152058, 1152826, 1155337,\n", - " 1154119, 1154123, 1152673, 1154633, 1151617, 1151623, 1150578, 1145278,\n", - " 1136131, 1136134, 1136798, 1148916, 1152958, 1152163, 1152169, 1153387,\n", - " 1144529, 1145952, 1151311, 1156831, 1153311, 1138280, 1138283, 1138279,\n", - " 1138281, 1152300, 1156001, 1136028, 1136029, 1158704, 1154733, 1142777,\n", - " 1156422, 1150164, 1149273, 1142257, 1148040, 1149300, 1160874, 1145656,\n", - " 1149794, 1144669, 1137048, 1148628, 1158530, 1137458, 1149946, 1149944,\n", - " 1142041, 1157229, 1142385, 1154929, 1152384, 1157058, 1145191, 1151257,\n", - " 1151260, 1150465, 1165703, 1150818, 1135645, 1147810, 1158304, 1158306,\n", - " 1158308, 1158307, 1151273, 1151331, 1155441, 1155452, 1153359, 1150130,\n", - " 1150132, 1154528, 1156913, 1142758, 1156207, 1151386, 1151379, 1158626,\n", - " 1140186, 1155122, 1155123, 1152515, 1157183, 1153473, 1155755, 1155758,\n", - " 1151424, 1135398, 1158096, 1155630, 1155631, 1156563, 1154555, 1155576,\n", - " 1136466, 1158824, 1158325, 1148838, 1155646, 1153368, 1143254, 1143263,\n", - " 1146938, 1154250, 1154080, 1137359, 1160907, 1150371, 1150068, 1155613,\n", - " 1143508, 1157926, 1157928, 1137381, 1137388, 1159117, 1158342, 1145694,\n", - " 1145690, 1134683, 1135601, 1145507, 1150661, 1150659, 1155852, 1158665,\n", - " 1140633, 1140632, 1152220, 1159213, 1156692, 1140382, 1140374, 1157732,\n", - " 1157735, 1159132, 1157039, 1144843, 1155975, 1158846, 1156815, 1155393,\n", - " 1149700, 1158760, 1158882, 1140221, 1161692, 1162998, 1158278, 1151615,\n", - " 1159429, 1136480, 1136491, 1153632, 1156665, 1183098, 1156490, 1136640,\n", - " 1136646, 1136642, 1144121, 1158209, 1140049, 1157858, 1158558, 1158544,\n", - " 1151147, 1156516, 1165497, 1165778, 1165786, 1138110, 1150011, 1161539,\n", - " 1142482, 1142666, 1157747, 1167359, 1162679, 1159042, 1159057, 1157946,\n", - " 1162044, 1153052, 1153042, 1153045, 1162835, 1155772, 1167707, 1167566,\n", - " 1156235, 1161318, 1156107, 1165244, 1150046, 1149063, 1155479, 1154302,\n", - " 1153519, 1147300, 1142406, 1146872, 1138161, 1164006, 1167206, 1156795,\n", - " 1139790, 1164901, 1139290, 1136802, 1171515, 1157357, 1146063, 1146356,\n", - " 1170415, 1156365, 1158653, 1156181, 1156184, 1159025, 1159032, 1169105,\n", - " 1152247, 1156580, 1138674, 1138685, 1153931, 1148571, 1144977, 1144989,\n", - " 1167933, 1169647, 1146510, 1170996, 1164580, 1161232, 1161240, 1144739,\n", - " 1152776, 1155272, 1155273, 1141471, 1147426, 1156739, 1156744, 1163260,\n", - " 1171040, 1144812, 1162085, 1164750, 1144052, 1145743, 1145176, 1163783,\n", - " 1148683, 1167757, 1154700, 1146042, 1155324, 1159513, 1163504, 1142136,\n", - " 1143025, 1147346, 1139351, 1145902, 1152203, 1143404, 1154076, 1168767,\n", - " 1147331, 1147339, 1170758, 1144699, 1145674, 1149125, 1155172, 1165023,\n", - " 1150515, 1156119, 1154618, 1144346, 1144336, 1157534, 1138383, 1154670,\n", - " 1168433, 1135841, 1169162, 1157331, 1138130, 1141048, 1151664, 1169359,\n", - " 1150025, 1149452, 1147489, 1147491, 1158615, 1158623, 1158062, 1173047,\n", - " 1163292, 1171090, 1179890, 1184807, 1155494, 1152353, 1170907, 1168383,\n", - " 1161121, 1182112, 1165904, 1147510, 1172669, 1173307, 1154027, 1152150,\n", - " 1172790, 1178102, 1157153, 1177404, 1157373, 1147711, 1147707, 1172435,\n", - " 1151850, 1151852, 1148131, 1157593, 1157598, 1172961, 1181020, 1140326,\n", - " 1144548, 1173092, 1182129, 1150234, 1154148, 1149173, 1177455, 1143279,\n", - " 1168481, 1166299, 1171297, 1153803, 1171314, 1172801, 1172309, 1180916,\n", - " 1155262, 1184112, 1154718, 1157803, 1157795, 1175774, 1155804, 1157986,\n", - " 1157991, 1172148, 1181935, 1153898, 1153893, 1154497, 1154500, 1134650,\n", - " 1180290, 1145626, 1172024, 1161909, 1149755, 1146243, 1153609, 1153612,\n", - " 1163721, 1155990, 1170069, 1186057, 1158940, 1175498, 1158371, 1155892,\n", - " 1164411, 1140399, 1163327, 1184534, 1171644, 1177917, 1179090, 1181548,\n", - " 1188516, 1161819, 1146161, 1156170, 1164133, 1168939, 1139828, 1139831,\n", - " 1139837, 1150265, 1154812, 1164924, 1177936, 1188613, 1156055, 1193849,\n", - " 1191989, 1181453, 1181889, 1173058, 1190922, 1167435, 1183048, 1192759,\n", - " 1190033, 1169700, 1166838, 1171201, 1189931, 1175349, 1187115, 1178135,\n", - " 1155956, 1155959, 1155553, 1177875, 1178304, 1162661, 1192228, 1190350,\n", - " 1167471, 1192961], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1200105, 1199835, 1202255, 1201581, 1201462, 1194626, 1197777, 1198624,\n", - " 1198696, 1202804, 1198557, 1194866, 1194867, 1197155, 1195494, 1197464,\n", - " 1195514, 1195263, 1196539, 1201992, 1201427, 1194958, 1195469, 1199170,\n", - " 1199171, 1195740, 1194752, 1194759, 1195313, 1195320, 1196835, 1198668,\n", - " 1195989, 1198036, 1195982, 1198958, 1198167, 1196705, 1196711, 1199823,\n", - " 1195223, 1195270, 1195273, 1197141, 1200765, 1198884, 1197361, 1196109,\n", - " 1194859, 1200032, 1198273, 1198280, 1200959, 1199062, 1199059, 1197291,\n", - " 1199185, 1194941, 1199685, 1199628, 1199152, 1195008, 1195014, 1195017,\n", - " 1199673, 1199676, 1194795, 1199018, 1199021, 1197609, 1196727, 1195771,\n", - " 1202618, 1200894, 1198416, 1198428, 1199899, 1201525, 1199555, 1199560,\n", - " 1201547, 1201824, 1201827, 1198593, 1201156, 1202630, 1202403, 1194803,\n", - " 1199539, 1202640, 1200546, 1200555, 1196883, 1199910, 1201442, 1197946,\n", - " 1201029, 1202239, 1199481, 1199976, 1197539, 1200327, 1195885, 1200181,\n", - " 1201291, 1203263, 1201590, 1196966, 1202687, 1195679, 1195664, 1194996,\n", - " 1196929, 1198929, 1200684, 1200275, 1195415, 1201789, 1195179, 1200928,\n", - " 1197816, 1197822, 1197499, 1196597, 1198147, 1198148, 1198824, 1196796,\n", - " 1201475, 1199234, 1197652, 1197342, 1197035, 1195165, 1201877, 1196557,\n", - " 1197872], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1200105, 1199835, 1202255, 1201581, 1201462, 1194626, 1197777, 1198624,\n", - " 1198696, 1202804, 1198557, 1194866, 1194867, 1197155, 1195494, 1197464,\n", - " 1195514, 1195263, 1196539, 1201992, 1201427, 1194958, 1195469, 1199170,\n", - " 1199171, 1195740, 1194752, 1194759, 1195313, 1195320, 1196835, 1198668,\n", - " 1195989, 1198036, 1195982, 1198958, 1198167, 1196705, 1196711, 1199823,\n", - " 1195223, 1195270, 1195273, 1197141, 1200765, 1198884, 1197361, 1196109,\n", - " 1194859, 1200032, 1198273, 1198280, 1200959, 1199062, 1199059, 1197291,\n", - " 1199185, 1194941, 1199685, 1199628, 1199152, 1195008, 1195014, 1195017,\n", - " 1199673, 1199676, 1194795, 1199018, 1199021, 1197609, 1196727, 1195771,\n", - " 1202618, 1200894, 1198416, 1198428, 1199899, 1201525, 1199555, 1199560,\n", - " 1201547, 1201824, 1201827, 1198593, 1201156, 1202630, 1202403, 1194803,\n", - " 1199539, 1202640, 1200546, 1200555, 1196883, 1199910, 1201442, 1197946,\n", - " 1201029, 1202239, 1199481, 1199976, 1197539, 1200327, 1195885, 1200181,\n", - " 1201291, 1203263, 1201590, 1196966, 1202687, 1195679, 1195664, 1194996,\n", - " 1196929, 1198929, 1200684, 1200275, 1195415, 1201789, 1195179, 1200928,\n", - " 1197816, 1197822, 1197499, 1196597, 1198147, 1198148, 1198824, 1196796,\n", - " 1201475, 1199234, 1197652, 1197342, 1197035, 1195165, 1201877, 1196557,\n", - " 1197872], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 4.2345e-02, -4.4467e-04, 4.0815e-01, ..., 8.6306e-02,\n", - " -1.2302e-03, -2.8253e-03],\n", - " [ 1.1568e-01, -6.5662e-04, 5.2992e-01, ..., 5.0106e-02,\n", - " -1.2357e-03, -4.0895e-03],\n", - " [ 1.2253e-01, -6.1045e-04, 5.2412e-01, ..., 6.2029e-02,\n", - " -1.3440e-03, -4.0144e-03],\n", - " ...,\n", - " [ 3.5693e-02, -2.5099e-04, 3.7112e-01, ..., 6.8744e-02,\n", - " -1.1408e-03, -2.6793e-03],\n", - " [ 5.0025e-03, -1.3457e-04, 3.6536e-01, ..., 1.2259e-01,\n", - " -1.6392e-03, -2.4551e-03],\n", - " [ 1.3961e-01, -5.6221e-04, 5.4184e-01, ..., 7.3202e-02,\n", - " -1.4382e-03, -3.8006e-03]], device='cuda:0'), 'paper': tensor([[ 1.6622, -0.0247, 0.7457, ..., -0.0081, -0.0244, 2.4874],\n", - " [ 1.2542, -0.0170, 0.1468, ..., -0.0078, -0.0182, 1.5727],\n", - " [ 1.6873, -0.0246, 0.4275, ..., -0.0069, -0.0238, 2.6677],\n", - " ...,\n", - " [ 1.2325, -0.0371, 0.1005, ..., -0.0156, -0.0218, 1.3596],\n", - " [ 1.4362, -0.0223, 0.6514, ..., -0.0096, -0.0225, 1.6729],\n", - " [ 1.7468, -0.0273, 0.5545, ..., -0.0070, -0.0265, 3.0461]],\n", - " device='cuda:0'), 'author': tensor([[ 6.3228e-02, -6.8048e-04, 1.1423e-01, ..., 4.6208e-01,\n", - " -1.3707e-03, 1.7145e-01],\n", - " [ 2.9776e-01, -2.4022e-03, -2.4449e-04, ..., 6.9975e-01,\n", - " 2.3722e-01, 3.1533e-01],\n", - " [ 1.7420e-01, -1.1096e-03, -2.9545e-04, ..., 6.5305e-01,\n", - " 1.4329e-01, 2.6620e-01],\n", - " ...,\n", - " [ 1.7920e-01, -8.8378e-04, 3.8237e-02, ..., 5.3757e-01,\n", - " 4.8050e-02, 1.6142e-01],\n", - " [ 2.6399e-01, -1.8211e-03, 3.1515e-02, ..., 6.8638e-01,\n", - " 1.9922e-01, 2.9930e-01],\n", - " [-5.2906e-04, -3.5063e-05, 1.5153e-01, ..., 1.0313e-01,\n", - " -3.1383e-04, -9.0066e-04]], device='cuda:0'), 'field_of_study': tensor([[-0.0017, 0.2195, 0.0746, ..., -0.0013, -0.0013, -0.0045],\n", - " [-0.0024, 0.0811, 0.0770, ..., -0.0015, -0.0007, -0.0031],\n", - " [-0.0030, 0.4034, 0.1189, ..., 0.0600, -0.0008, -0.0055],\n", - " ...,\n", - " [-0.0028, 0.0386, 0.0412, ..., 0.0089, -0.0007, -0.0030],\n", - " [-0.0025, 0.1002, 0.0268, ..., -0.0011, -0.0007, -0.0028],\n", - " [-0.0029, 0.0068, 0.0399, ..., -0.0007, -0.0006, -0.0029]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 14, 69, 56, 3, 214, 79, 189, 149, 109, 109, 109, 109,\n", - " 303, 558, 446, 543, 566, 337, 379, 404, 310, 310, 852, 609,\n", - " 719, 719, 675, 801, 850, 808, 832, 1170, 1075, 1102, 818, 818,\n", - " 953, 953, 953, 783, 783, 783, 1364, 1258, 1104, 1491, 1342, 1342,\n", - " 1080, 1442, 1289, 1209, 1359, 1654, 1379, 1230, 1230, 1718, 1521, 1584,\n", - " 1742, 1853, 1685, 1685, 1832, 1832, 1790, 1790, 1790, 2110, 1941, 1911,\n", - " 1911, 1952, 2026, 2202, 2195, 2202, 2318, 2310, 2310, 2310, 2186, 2187,\n", - " 2337, 2412, 2313, 2313, 2402, 2305, 2425, 2504, 2504, 2504, 2742, 2703,\n", - " 2703, 2697, 2507, 2811, 2792, 2792, 2785, 2675, 2733, 2813, 2813, 2803,\n", - " 2826, 2970, 2970, 2895, 2895, 2965, 2975, 3300, 2966, 3191, 3347, 3315,\n", - " 3315, 3343, 3151, 3472, 3425, 3503, 3521, 3617, 3912, 3912, 3840, 3912,\n", - " 3990, 3750, 4053, 3972, 4178, 4058, 4058, 4198, 4116, 4066, 4103, 4059,\n", - " 4267, 4294, 4361, 4368, 4614, 4621, 4560, 4531, 4585, 4585, 4585, 4471,\n", - " 4659, 4664, 4664, 4664, 4686, 4686, 4855, 4855, 4756, 4715, 4939, 4927,\n", - " 4931, 4964, 4970, 5082, 4858, 5222, 4979, 5364, 5429, 5476, 5618, 5570,\n", - " 5682, 5798, 5626, 5896, 5815, 6071, 5620, 5699, 6108, 6147, 6310, 6310,\n", - " 5932, 6364, 6088, 6156, 6254, 6453, 6359, 6333, 6333],\n", - " [ 70, 28, 110, 83, 85, 129, 85, 110, 91, 81, 7, 90,\n", - " 57, 18, 51, 104, 62, 83, 45, 134, 104, 19, 97, 114,\n", - " 47, 89, 33, 134, 29, 70, 118, 97, 60, 29, 50, 62,\n", - " 127, 47, 130, 108, 30, 19, 79, 117, 121, 4, 106, 13,\n", - " 135, 24, 36, 97, 109, 70, 97, 62, 111, 42, 10, 111,\n", - " 31, 94, 34, 67, 25, 126, 21, 23, 0, 112, 40, 132,\n", - " 17, 75, 92, 76, 107, 115, 96, 128, 36, 107, 24, 63,\n", - " 125, 37, 135, 8, 71, 54, 12, 2, 14, 70, 99, 48,\n", - " 17, 54, 87, 9, 98, 97, 95, 97, 104, 78, 104, 113,\n", - " 68, 22, 59, 120, 119, 73, 61, 122, 95, 82, 116, 39,\n", - " 47, 51, 11, 64, 136, 43, 70, 84, 70, 25, 58, 74,\n", - " 53, 96, 5, 24, 49, 101, 37, 82, 82, 115, 59, 70,\n", - " 3, 55, 47, 133, 70, 100, 69, 27, 15, 105, 131, 100,\n", - " 56, 80, 86, 106, 97, 98, 32, 72, 122, 1, 16, 103,\n", - " 38, 97, 107, 70, 20, 3, 46, 88, 26, 35, 6, 59,\n", - " 102, 77, 65, 94, 10, 97, 107, 44, 70, 70, 70, 123,\n", - " 52, 102, 113, 66, 2, 93, 41, 123, 124]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1198, 352, 2072, ..., 4062, 599, 5393],\n", - " [ 154, 76, 306, ..., 6988, 6919, 6854]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 13, 13, 98, ..., 82, 94, 106],\n", - " [ 231, 164, 31, ..., 6334, 6415, 6255]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 154, 154, 154, ..., 6880, 6880, 6880],\n", - " [ 50, 330, 621, ..., 248, 281, 532]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 698, 576, 280, ..., 310, 257, 428],\n", - " [ 77, 145, 35, ..., 6937, 6873, 6945]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5437, 4635, 1729, ..., 2969, 6182, 5154],\n", - " [ 0, 0, 126, ..., 6399, 6442, 6377]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 154, 154, 154, ..., 6880, 6880, 6880],\n", - " [ 958, 1198, 1379, ..., 1472, 4633, 1076]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 88, 88, 88, ..., 6254, 6254, 6254],\n", - " [6550, 6928, 6805, ..., 3690, 402, 1333]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006385\n", - "sampling 0.006232\n", - "noi time: 0.00191\n", - "get_vertex_data call: 0.037866\n", - "noi group time: 0.003495\n", - "eoi_group_time: 0.017095\n", - "second half: 0.221239\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16691, 28267, 31143, ..., 1119681, 1129724, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16691, 28267, 31143, ..., 1119681, 1129724, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224380, 1221607, 1203800, ..., 1926878, 1930679, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224380, 1221607, 1203800, ..., 1926878, 1930679, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1137204, 1137212, 1141424, 1141435, 1136237, 1140285, 1135926,\n", - " 1141758, 1136215, 1136156, 1136962, 1143600, 1143615, 1139808, 1139811,\n", - " 1145373, 1145999, 1138938, 1143362, 1143372, 1139241, 1146644, 1146646,\n", - " 1139615, 1140781, 1140783, 1150502, 1150509, 1145292, 1142964, 1134943,\n", - " 1149216, 1149220, 1149646, 1147473, 1147225, 1142881, 1144632, 1146995,\n", - " 1148346, 1146656, 1146472, 1138338, 1138345, 1148546, 1153217, 1141909,\n", - " 1137220, 1155019, 1147211, 1136685, 1150322, 1152427, 1136270, 1140308,\n", - " 1151549, 1140537, 1140540, 1138112, 1137254, 1140146, 1140159, 1134720,\n", - " 1135367, 1135202, 1141036, 1134794, 1136518, 1136512, 1138504, 1137342,\n", - " 1137693, 1139215, 1144389, 1137529, 1137534, 1136705, 1137441, 1156159,\n", - " 1139161, 1141703, 1135579, 1142607, 1148860, 1135675, 1138514, 1136985,\n", - " 1139685, 1138436, 1138440, 1138445, 1138461, 1138462, 1149328, 1135102,\n", - " 1156603, 1156606, 1147116, 1135352, 1158984, 1158987, 1148531, 1141532,\n", - " 1136449, 1139668, 1139673, 1138067, 1138069, 1134992, 1135789, 1158961,\n", - " 1158974, 1159009, 1159011, 1141070, 1144407, 1144410, 1140034, 1138648,\n", - " 1134891, 1155661, 1146075, 1140557, 1152044, 1142299, 1137734, 1137728,\n", - " 1146222, 1134742, 1134750, 1135549, 1136697, 1140228, 1137888, 1141088,\n", - " 1144130, 1148996, 1149001, 1141980, 1136397, 1143767, 1154851, 1143706,\n", - " 1143224, 1143225, 1139025, 1139033, 1140003, 1140009, 1141695, 1135860,\n", - " 1135861, 1136426, 1141224, 1159800, 1141657, 1141653, 1139730, 1143677,\n", - " 1144237, 1141155, 1141786, 1138793, 1139495, 1136766, 1141609, 1137074,\n", - " 1139798, 1138482, 1142056, 1141821, 1143153, 1137761, 1148867, 1142713,\n", - " 1158605, 1139188, 1141475, 1141479, 1138708, 1140110, 1142913, 1144442,\n", - " 1136867, 1136864, 1145298, 1144042, 1141398, 1144182, 1150906, 1146193,\n", - " 1138539, 1147155, 1136369, 1162804, 1141365, 1153068, 1141720, 1141664,\n", - " 1139014, 1165339, 1139510, 1139774, 1139653, 1140093, 1138815, 1145000,\n", - " 1140619, 1140987, 1135047, 1147050, 1145873, 1152976, 1152988, 1141925,\n", - " 1144242, 1145339, 1141841, 1141846, 1139405, 1143633, 1137571, 1145983,\n", - " 1143845, 1143851, 1146005, 1146024, 1146140, 1141646, 1142533, 1139990,\n", - " 1143293, 1143294, 1151124, 1150417, 1147543, 1147540, 1148763, 1147282,\n", - " 1142816, 1136330, 1140349, 1149366, 1139417, 1147364, 1149610, 1143051,\n", - " 1148408, 1144923, 1138923, 1157717, 1136836, 1148230, 1165630, 1139329,\n", - " 1141496, 1142159, 1143345, 1144765, 1144081, 1144083, 1138600, 1144376,\n", - " 1146514, 1146523, 1143456, 1143457, 1137697, 1142015, 1146590, 1143798,\n", - " 1143807, 1140364, 1149574, 1137990, 1166410, 1148962, 1144219, 1147984,\n", - " 1147999, 1146949, 1139252, 1139258, 1148704, 1143311, 1148475, 1147056,\n", - " 1147070, 1145011, 1139549, 1158226, 1141138, 1154526, 1145751, 1142383,\n", - " 1148393, 1146178, 1138856, 1151244, 1152530, 1151182, 1150445, 1154998,\n", - " 1149791, 1146895, 1165252, 1151480, 1154271, 1154263, 1151050, 1146723,\n", - " 1140566, 1150127, 1147009, 1147023, 1146772, 1150736, 1151795, 1148744,\n", - " 1149991, 1143552, 1149416, 1149412, 1148288, 1148290, 1148294, 1137724,\n", - " 1147866, 1154420, 1158794, 1151363, 1136247, 1139718, 1146676, 1138878,\n", - " 1138877, 1152442, 1148720, 1148724, 1148729, 1145862, 1168973, 1146559,\n", - " 1139936, 1148203, 1148204, 1154168, 1153124, 1153192, 1153188, 1148052,\n", - " 1150352, 1150356, 1143128, 1147447, 1147444, 1151816, 1151821, 1152581,\n", - " 1149737, 1141420, 1151351, 1151345, 1155156, 1147728, 1147737, 1145079,\n", - " 1146969, 1151920, 1146623, 1144472, 1152849, 1152100, 1152105, 1146287,\n", - " 1156321, 1153032, 1153036, 1153026, 1153038, 1150093, 1145539, 1137746,\n", - " 1137755, 1152622, 1149203, 1152826, 1157833, 1139581, 1151580, 1151573,\n", - " 1151617, 1150578, 1145278, 1148913, 1148916, 1143997, 1158423, 1156823,\n", - " 1153311, 1138279, 1138281, 1156007, 1156000, 1156001, 1156005, 1136028,\n", - " 1158704, 1152928, 1151064, 1156396, 1163941, 1156422, 1150099, 1137403,\n", - " 1150164, 1148033, 1148040, 1149300, 1148909, 1145656, 1149792, 1158477,\n", - " 1149649, 1148628, 1158530, 1158540, 1153863, 1148255, 1135706, 1155376,\n", - " 1142041, 1157466, 1143450, 1157547, 1142387, 1157064, 1157069, 1145196,\n", - " 1145187, 1139473, 1151260, 1150465, 1135733, 1152179, 1152190, 1157909,\n", - " 1157911, 1150828, 1156929, 1156932, 1147813, 1158308, 1151331, 1155441,\n", - " 1150132, 1162120, 1144361, 1154529, 1156919, 1142755, 1164634, 1157637,\n", - " 1157642, 1151379, 1158637, 1158639, 1155122, 1145793, 1145796, 1156463,\n", - " 1158096, 1155628, 1155630, 1158486, 1156563, 1158566, 1158823, 1158824,\n", - " 1157315, 1154036, 1155646, 1155647, 1143263, 1154644, 1146938, 1154240,\n", - " 1154080, 1156711, 1151317, 1143189, 1150371, 1153326, 1147908, 1141627,\n", - " 1141620, 1159618, 1151030, 1157660, 1158996, 1159116, 1145688, 1135605,\n", - " 1145515, 1155848, 1158664, 1158665, 1157684, 1149145, 1159258, 1152209,\n", - " 1152220, 1140374, 1159126, 1157033, 1144843, 1155975, 1161667, 1149700,\n", - " 1154601, 1158760, 1158891, 1158815, 1158804, 1158447, 1158444, 1156778,\n", - " 1151615, 1136480, 1147599, 1157675, 1136640, 1136646, 1163112, 1134757,\n", - " 1166424, 1180573, 1156514, 1146126, 1138110, 1158006, 1150011, 1155521,\n", - " 1142666, 1142658, 1157747, 1162683, 1159042, 1159052, 1159071, 1157939,\n", - " 1162044, 1153045, 1171551, 1155769, 1170855, 1153841, 1156107, 1138393,\n", - " 1150035, 1150046, 1149067, 1145948, 1142405, 1146873, 1157600, 1164006,\n", - " 1164012, 1156785, 1156787, 1149963, 1139286, 1146063, 1165309, 1158866,\n", - " 1148592, 1143139, 1156177, 1156181, 1156189, 1159025, 1159032, 1169105,\n", - " 1152247, 1171162, 1155588, 1160509, 1151220, 1168428, 1158411, 1144980,\n", - " 1147830, 1146500, 1161243, 1144739, 1155052, 1141471, 1141459, 1151650,\n", - " 1147427, 1149899, 1165867, 1156739, 1153649, 1153663, 1150648, 1171040,\n", - " 1144810, 1144812, 1140112, 1165721, 1156300, 1180582, 1145728, 1145176,\n", - " 1166917, 1148675, 1148683, 1145228, 1154700, 1155324, 1147671, 1147675,\n", - " 1169509, 1144973, 1167051, 1143038, 1147694, 1145447, 1152624, 1139357,\n", - " 1139349, 1147723, 1145900, 1145902, 1153534, 1152206, 1143405, 1169742,\n", - " 1158728, 1167498, 1144690, 1151598, 1149124, 1167817, 1155172, 1150515,\n", - " 1156119, 1156118, 1145526, 1144346, 1144336, 1157534, 1154670, 1169162,\n", - " 1157331, 1154352, 1149452, 1158611, 1158623, 1158051, 1158054, 1158062,\n", - " 1173047, 1149846, 1157384, 1160040, 1154871, 1167383, 1152353, 1166594,\n", - " 1143170, 1168055, 1149402, 1148328, 1148324, 1173307, 1160942, 1154027,\n", - " 1152150, 1171148, 1168126, 1147696, 1147711, 1151850, 1148131, 1166827,\n", - " 1169032, 1169037, 1171288, 1140326, 1171823, 1181772, 1150234, 1154151,\n", - " 1154148, 1169422, 1149173, 1143279, 1180393, 1168481, 1143420, 1171297,\n", - " 1153803, 1161025, 1172309, 1172314, 1183123, 1151509, 1151519, 1176269,\n", - " 1155260, 1155262, 1154707, 1157792, 1157795, 1143341, 1171623, 1163572,\n", - " 1157133, 1172148, 1182010, 1186047, 1158253, 1154500, 1177865, 1145626,\n", - " 1172022, 1154840, 1163538, 1178028, 1182624, 1178757, 1161067, 1149744,\n", - " 1149753, 1153609, 1180953, 1155990, 1158512, 1158934, 1158374, 1158379,\n", - " 1155890, 1155892, 1162988, 1157272, 1160276, 1171644, 1160811, 1163422,\n", - " 1166520, 1165072, 1165447, 1164133, 1156528, 1156539, 1139828, 1139825,\n", - " 1139831, 1154806, 1154812, 1164924, 1164927, 1149669, 1194514, 1156049,\n", - " 1156055, 1151972, 1151978, 1146392, 1146395, 1173058, 1188233, 1185795,\n", - " 1187904, 1191961, 1191647, 1189898, 1190444, 1192326, 1192101, 1152118,\n", - " 1191615, 1162502, 1169707, 1150400, 1156681, 1145395, 1155962, 1155960,\n", - " 1181646, 1190093, 1165516, 1167607, 1178315, 1191230, 1188972, 1192018,\n", - " 1184978], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1137204, 1137212, 1141424, 1141435, 1136237, 1140285, 1135926,\n", - " 1141758, 1136215, 1136156, 1136962, 1143600, 1143615, 1139808, 1139811,\n", - " 1145373, 1145999, 1138938, 1143362, 1143372, 1139241, 1146644, 1146646,\n", - " 1139615, 1140781, 1140783, 1150502, 1150509, 1145292, 1142964, 1134943,\n", - " 1149216, 1149220, 1149646, 1147473, 1147225, 1142881, 1144632, 1146995,\n", - " 1148346, 1146656, 1146472, 1138338, 1138345, 1148546, 1153217, 1141909,\n", - " 1137220, 1155019, 1147211, 1136685, 1150322, 1152427, 1136270, 1140308,\n", - " 1151549, 1140537, 1140540, 1138112, 1137254, 1140146, 1140159, 1134720,\n", - " 1135367, 1135202, 1141036, 1134794, 1136518, 1136512, 1138504, 1137342,\n", - " 1137693, 1139215, 1144389, 1137529, 1137534, 1136705, 1137441, 1156159,\n", - " 1139161, 1141703, 1135579, 1142607, 1148860, 1135675, 1138514, 1136985,\n", - " 1139685, 1138436, 1138440, 1138445, 1138461, 1138462, 1149328, 1135102,\n", - " 1156603, 1156606, 1147116, 1135352, 1158984, 1158987, 1148531, 1141532,\n", - " 1136449, 1139668, 1139673, 1138067, 1138069, 1134992, 1135789, 1158961,\n", - " 1158974, 1159009, 1159011, 1141070, 1144407, 1144410, 1140034, 1138648,\n", - " 1134891, 1155661, 1146075, 1140557, 1152044, 1142299, 1137734, 1137728,\n", - " 1146222, 1134742, 1134750, 1135549, 1136697, 1140228, 1137888, 1141088,\n", - " 1144130, 1148996, 1149001, 1141980, 1136397, 1143767, 1154851, 1143706,\n", - " 1143224, 1143225, 1139025, 1139033, 1140003, 1140009, 1141695, 1135860,\n", - " 1135861, 1136426, 1141224, 1159800, 1141657, 1141653, 1139730, 1143677,\n", - " 1144237, 1141155, 1141786, 1138793, 1139495, 1136766, 1141609, 1137074,\n", - " 1139798, 1138482, 1142056, 1141821, 1143153, 1137761, 1148867, 1142713,\n", - " 1158605, 1139188, 1141475, 1141479, 1138708, 1140110, 1142913, 1144442,\n", - " 1136867, 1136864, 1145298, 1144042, 1141398, 1144182, 1150906, 1146193,\n", - " 1138539, 1147155, 1136369, 1162804, 1141365, 1153068, 1141720, 1141664,\n", - " 1139014, 1165339, 1139510, 1139774, 1139653, 1140093, 1138815, 1145000,\n", - " 1140619, 1140987, 1135047, 1147050, 1145873, 1152976, 1152988, 1141925,\n", - " 1144242, 1145339, 1141841, 1141846, 1139405, 1143633, 1137571, 1145983,\n", - " 1143845, 1143851, 1146005, 1146024, 1146140, 1141646, 1142533, 1139990,\n", - " 1143293, 1143294, 1151124, 1150417, 1147543, 1147540, 1148763, 1147282,\n", - " 1142816, 1136330, 1140349, 1149366, 1139417, 1147364, 1149610, 1143051,\n", - " 1148408, 1144923, 1138923, 1157717, 1136836, 1148230, 1165630, 1139329,\n", - " 1141496, 1142159, 1143345, 1144765, 1144081, 1144083, 1138600, 1144376,\n", - " 1146514, 1146523, 1143456, 1143457, 1137697, 1142015, 1146590, 1143798,\n", - " 1143807, 1140364, 1149574, 1137990, 1166410, 1148962, 1144219, 1147984,\n", - " 1147999, 1146949, 1139252, 1139258, 1148704, 1143311, 1148475, 1147056,\n", - " 1147070, 1145011, 1139549, 1158226, 1141138, 1154526, 1145751, 1142383,\n", - " 1148393, 1146178, 1138856, 1151244, 1152530, 1151182, 1150445, 1154998,\n", - " 1149791, 1146895, 1165252, 1151480, 1154271, 1154263, 1151050, 1146723,\n", - " 1140566, 1150127, 1147009, 1147023, 1146772, 1150736, 1151795, 1148744,\n", - " 1149991, 1143552, 1149416, 1149412, 1148288, 1148290, 1148294, 1137724,\n", - " 1147866, 1154420, 1158794, 1151363, 1136247, 1139718, 1146676, 1138878,\n", - " 1138877, 1152442, 1148720, 1148724, 1148729, 1145862, 1168973, 1146559,\n", - " 1139936, 1148203, 1148204, 1154168, 1153124, 1153192, 1153188, 1148052,\n", - " 1150352, 1150356, 1143128, 1147447, 1147444, 1151816, 1151821, 1152581,\n", - " 1149737, 1141420, 1151351, 1151345, 1155156, 1147728, 1147737, 1145079,\n", - " 1146969, 1151920, 1146623, 1144472, 1152849, 1152100, 1152105, 1146287,\n", - " 1156321, 1153032, 1153036, 1153026, 1153038, 1150093, 1145539, 1137746,\n", - " 1137755, 1152622, 1149203, 1152826, 1157833, 1139581, 1151580, 1151573,\n", - " 1151617, 1150578, 1145278, 1148913, 1148916, 1143997, 1158423, 1156823,\n", - " 1153311, 1138279, 1138281, 1156007, 1156000, 1156001, 1156005, 1136028,\n", - " 1158704, 1152928, 1151064, 1156396, 1163941, 1156422, 1150099, 1137403,\n", - " 1150164, 1148033, 1148040, 1149300, 1148909, 1145656, 1149792, 1158477,\n", - " 1149649, 1148628, 1158530, 1158540, 1153863, 1148255, 1135706, 1155376,\n", - " 1142041, 1157466, 1143450, 1157547, 1142387, 1157064, 1157069, 1145196,\n", - " 1145187, 1139473, 1151260, 1150465, 1135733, 1152179, 1152190, 1157909,\n", - " 1157911, 1150828, 1156929, 1156932, 1147813, 1158308, 1151331, 1155441,\n", - " 1150132, 1162120, 1144361, 1154529, 1156919, 1142755, 1164634, 1157637,\n", - " 1157642, 1151379, 1158637, 1158639, 1155122, 1145793, 1145796, 1156463,\n", - " 1158096, 1155628, 1155630, 1158486, 1156563, 1158566, 1158823, 1158824,\n", - " 1157315, 1154036, 1155646, 1155647, 1143263, 1154644, 1146938, 1154240,\n", - " 1154080, 1156711, 1151317, 1143189, 1150371, 1153326, 1147908, 1141627,\n", - " 1141620, 1159618, 1151030, 1157660, 1158996, 1159116, 1145688, 1135605,\n", - " 1145515, 1155848, 1158664, 1158665, 1157684, 1149145, 1159258, 1152209,\n", - " 1152220, 1140374, 1159126, 1157033, 1144843, 1155975, 1161667, 1149700,\n", - " 1154601, 1158760, 1158891, 1158815, 1158804, 1158447, 1158444, 1156778,\n", - " 1151615, 1136480, 1147599, 1157675, 1136640, 1136646, 1163112, 1134757,\n", - " 1166424, 1180573, 1156514, 1146126, 1138110, 1158006, 1150011, 1155521,\n", - " 1142666, 1142658, 1157747, 1162683, 1159042, 1159052, 1159071, 1157939,\n", - " 1162044, 1153045, 1171551, 1155769, 1170855, 1153841, 1156107, 1138393,\n", - " 1150035, 1150046, 1149067, 1145948, 1142405, 1146873, 1157600, 1164006,\n", - " 1164012, 1156785, 1156787, 1149963, 1139286, 1146063, 1165309, 1158866,\n", - " 1148592, 1143139, 1156177, 1156181, 1156189, 1159025, 1159032, 1169105,\n", - " 1152247, 1171162, 1155588, 1160509, 1151220, 1168428, 1158411, 1144980,\n", - " 1147830, 1146500, 1161243, 1144739, 1155052, 1141471, 1141459, 1151650,\n", - " 1147427, 1149899, 1165867, 1156739, 1153649, 1153663, 1150648, 1171040,\n", - " 1144810, 1144812, 1140112, 1165721, 1156300, 1180582, 1145728, 1145176,\n", - " 1166917, 1148675, 1148683, 1145228, 1154700, 1155324, 1147671, 1147675,\n", - " 1169509, 1144973, 1167051, 1143038, 1147694, 1145447, 1152624, 1139357,\n", - " 1139349, 1147723, 1145900, 1145902, 1153534, 1152206, 1143405, 1169742,\n", - " 1158728, 1167498, 1144690, 1151598, 1149124, 1167817, 1155172, 1150515,\n", - " 1156119, 1156118, 1145526, 1144346, 1144336, 1157534, 1154670, 1169162,\n", - " 1157331, 1154352, 1149452, 1158611, 1158623, 1158051, 1158054, 1158062,\n", - " 1173047, 1149846, 1157384, 1160040, 1154871, 1167383, 1152353, 1166594,\n", - " 1143170, 1168055, 1149402, 1148328, 1148324, 1173307, 1160942, 1154027,\n", - " 1152150, 1171148, 1168126, 1147696, 1147711, 1151850, 1148131, 1166827,\n", - " 1169032, 1169037, 1171288, 1140326, 1171823, 1181772, 1150234, 1154151,\n", - " 1154148, 1169422, 1149173, 1143279, 1180393, 1168481, 1143420, 1171297,\n", - " 1153803, 1161025, 1172309, 1172314, 1183123, 1151509, 1151519, 1176269,\n", - " 1155260, 1155262, 1154707, 1157792, 1157795, 1143341, 1171623, 1163572,\n", - " 1157133, 1172148, 1182010, 1186047, 1158253, 1154500, 1177865, 1145626,\n", - " 1172022, 1154840, 1163538, 1178028, 1182624, 1178757, 1161067, 1149744,\n", - " 1149753, 1153609, 1180953, 1155990, 1158512, 1158934, 1158374, 1158379,\n", - " 1155890, 1155892, 1162988, 1157272, 1160276, 1171644, 1160811, 1163422,\n", - " 1166520, 1165072, 1165447, 1164133, 1156528, 1156539, 1139828, 1139825,\n", - " 1139831, 1154806, 1154812, 1164924, 1164927, 1149669, 1194514, 1156049,\n", - " 1156055, 1151972, 1151978, 1146392, 1146395, 1173058, 1188233, 1185795,\n", - " 1187904, 1191961, 1191647, 1189898, 1190444, 1192326, 1192101, 1152118,\n", - " 1191615, 1162502, 1169707, 1150400, 1156681, 1145395, 1155962, 1155960,\n", - " 1181646, 1190093, 1165516, 1167607, 1178315, 1191230, 1188972, 1192018,\n", - " 1184978], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196008, 1196011, 1196013, 1197183, 1199835, 1199282, 1198449, 1202255,\n", - " 1198844, 1201582, 1199274, 1201016, 1198690, 1194866, 1194879, 1196624,\n", - " 1196631, 1194648, 1195263, 1201992, 1198543, 1195463, 1195888, 1195895,\n", - " 1199171, 1195740, 1196334, 1199366, 1198668, 1197807, 1195134, 1198950,\n", - " 1196704, 1199823, 1195148, 1197136, 1200762, 1197273, 1196109, 1194859,\n", - " 1195850, 1195039, 1195541, 1196122, 1196393, 1195353, 1198273, 1198277,\n", - " 1198282, 1200959, 1199628, 1199803, 1197676, 1199154, 1199038, 1199231,\n", - " 1196501, 1199021, 1197601, 1196727, 1202618, 1200018, 1200019, 1198811,\n", - " 1201534, 1200780, 1202421, 1200450, 1200570, 1200503, 1198593, 1199445,\n", - " 1201421, 1201079, 1202630, 1202401, 1200913, 1200363, 1200315, 1202529,\n", - " 1196779, 1201029, 1200327, 1200330, 1201226, 1201291, 1198478, 1195611,\n", - " 1201871, 1203329, 1202209, 1199929, 1200398, 1196966, 1195679, 1195664,\n", - " 1200439, 1198932, 1197816, 1197822, 1194898, 1196382, 1203102, 1201138,\n", - " 1194728, 1200003, 1198824, 1197735, 1200437, 1197652, 1197655, 1197335,\n", - " 1197035, 1197039], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196008, 1196011, 1196013, 1197183, 1199835, 1199282, 1198449, 1202255,\n", - " 1198844, 1201582, 1199274, 1201016, 1198690, 1194866, 1194879, 1196624,\n", - " 1196631, 1194648, 1195263, 1201992, 1198543, 1195463, 1195888, 1195895,\n", - " 1199171, 1195740, 1196334, 1199366, 1198668, 1197807, 1195134, 1198950,\n", - " 1196704, 1199823, 1195148, 1197136, 1200762, 1197273, 1196109, 1194859,\n", - " 1195850, 1195039, 1195541, 1196122, 1196393, 1195353, 1198273, 1198277,\n", - " 1198282, 1200959, 1199628, 1199803, 1197676, 1199154, 1199038, 1199231,\n", - " 1196501, 1199021, 1197601, 1196727, 1202618, 1200018, 1200019, 1198811,\n", - " 1201534, 1200780, 1202421, 1200450, 1200570, 1200503, 1198593, 1199445,\n", - " 1201421, 1201079, 1202630, 1202401, 1200913, 1200363, 1200315, 1202529,\n", - " 1196779, 1201029, 1200327, 1200330, 1201226, 1201291, 1198478, 1195611,\n", - " 1201871, 1203329, 1202209, 1199929, 1200398, 1196966, 1195679, 1195664,\n", - " 1200439, 1198932, 1197816, 1197822, 1194898, 1196382, 1203102, 1201138,\n", - " 1194728, 1200003, 1198824, 1197735, 1200437, 1197652, 1197655, 1197335,\n", - " 1197035, 1197039], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 7.7578e-02, -3.5791e-04, 4.0400e-01, ..., 8.5606e-02,\n", - " -1.2604e-03, -3.0720e-03],\n", - " [ 5.4380e-02, -4.3521e-04, 2.8843e-01, ..., 5.0874e-02,\n", - " -1.0105e-03, -2.7416e-03],\n", - " [ 7.5343e-02, -3.0142e-04, 4.2748e-01, ..., 5.9197e-02,\n", - " -1.2860e-03, -3.1207e-03],\n", - " ...,\n", - " [ 4.5401e-02, -1.7725e-04, 4.1216e-01, ..., 8.0560e-02,\n", - " -1.3286e-03, -2.8007e-03],\n", - " [ 1.7747e-02, -5.8663e-04, 3.9071e-01, ..., 9.4709e-02,\n", - " -1.3116e-03, -2.9192e-03],\n", - " [ 3.7950e-02, -4.7422e-04, 3.5506e-01, ..., 6.9780e-02,\n", - " -1.2972e-03, -3.0673e-03]], device='cuda:0'), 'paper': tensor([[ 1.4823, -0.0398, 0.5506, ..., -0.0189, -0.0208, 1.0512],\n", - " [ 1.1746, -0.0221, -0.0034, ..., -0.0116, -0.0164, 1.4230],\n", - " [ 1.7136, -0.0264, 0.7145, ..., -0.0080, -0.0265, 2.9592],\n", - " ...,\n", - " [ 1.3092, -0.0287, 0.0700, ..., -0.0108, -0.0204, 2.0171],\n", - " [ 1.5430, -0.0571, 0.6180, ..., -0.0213, -0.0287, 1.1266],\n", - " [ 1.7293, -0.0272, 0.5213, ..., -0.0072, -0.0263, 2.9994]],\n", - " device='cuda:0'), 'author': tensor([[ 8.6796e-02, 7.3153e-02, 9.9881e-02, ..., 7.8186e-01,\n", - " -1.0310e-03, 2.7144e-01],\n", - " [ 4.4950e-02, 2.0816e-02, 5.1713e-02, ..., 5.2255e-01,\n", - " -2.1821e-04, 8.0423e-02],\n", - " [ 1.4036e-01, -1.3897e-03, 1.3210e-02, ..., 6.8254e-01,\n", - " 1.4013e-01, 2.2842e-01],\n", - " ...,\n", - " [ 1.5246e-01, -5.1772e-04, 8.4610e-02, ..., 6.3104e-01,\n", - " 3.8011e-02, 2.3521e-01],\n", - " [ 2.2931e-01, -1.6111e-03, 5.4275e-02, ..., 6.8537e-01,\n", - " 1.3796e-01, 2.5367e-01],\n", - " [ 1.7008e-01, -7.5971e-04, 4.3612e-03, ..., 5.5954e-01,\n", - " 1.0591e-01, 2.2282e-01]], device='cuda:0'), 'field_of_study': tensor([[-2.3250e-03, 9.1389e-03, 1.4731e-01, ..., -2.6863e-03,\n", - " -1.6749e-04, -2.5203e-03],\n", - " [-2.3906e-03, 3.5112e-02, 1.1456e-01, ..., -2.2096e-03,\n", - " -1.0987e-03, -2.7060e-03],\n", - " [-2.0462e-03, 5.9031e-02, 1.3801e-01, ..., -2.9226e-03,\n", - " -2.4436e-04, -1.8487e-03],\n", - " ...,\n", - " [-2.2663e-03, 1.7809e-01, 5.3542e-02, ..., -2.4345e-03,\n", - " -5.2006e-04, -2.7419e-03],\n", - " [-3.0339e-03, 1.1883e-01, 9.4106e-02, ..., -1.6934e-03,\n", - " -1.1390e-03, -2.3262e-03],\n", - " [-2.1502e-03, 6.4073e-02, 1.7501e-01, ..., -3.1022e-03,\n", - " -1.2921e-03, -3.1220e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 137, 190, 55, 180, 116, 80, 308, 303, 427, 277, 353, 697,\n", - " 697, 675, 675, 675, 699, 1124, 643, 1111, 842, 911, 846, 1048,\n", - " 1043, 861, 861, 861, 975, 1223, 1248, 1117, 1117, 1301, 1369, 1254,\n", - " 1254, 1367, 1093, 1112, 1405, 1405, 1433, 1320, 1269, 1269, 1503, 1491,\n", - " 1520, 1520, 1640, 1602, 1602, 1423, 1423, 1494, 1699, 1692, 1633, 1633,\n", - " 1892, 1596, 1718, 1842, 1936, 1936, 1859, 1966, 1952, 1880, 1890, 2189,\n", - " 2189, 2061, 2061, 2029, 2029, 2029, 2264, 2199, 2277, 2277, 2277, 2192,\n", - " 2312, 2351, 2520, 2520, 2446, 2516, 2467, 2905, 2786, 2601, 2785, 2872,\n", - " 2752, 2996, 2831, 3107, 3124, 2974, 3051, 3044, 3091, 2972, 3061, 2890,\n", - " 2890, 2890, 3091, 3091, 3118, 3339, 3169, 3197, 3316, 3316, 3316, 3187,\n", - " 3187, 3187, 3321, 3465, 3465, 3378, 3419, 3736, 3577, 3682, 3682, 3798,\n", - " 3798, 3872, 3894, 4008, 3956, 3960, 4141, 4174, 4174, 4174, 4270, 4083,\n", - " 4083, 4270, 4100, 4100, 4194, 4315, 4411, 4233, 4593, 4752, 4821, 4884,\n", - " 5052, 5052, 5052, 5052, 5052, 5052, 5132, 5241, 5059, 5059, 5059, 5272,\n", - " 5185, 5276, 5286, 5543, 5281, 5691, 5732, 5787, 5734, 5738, 5636, 5851,\n", - " 5676, 5962],\n", - " [ 103, 25, 68, 96, 50, 109, 28, 53, 68, 71, 28, 10,\n", - " 68, 58, 89, 55, 27, 82, 82, 51, 9, 10, 65, 5,\n", - " 5, 38, 95, 92, 52, 47, 10, 5, 32, 40, 31, 63,\n", - " 15, 43, 2, 18, 59, 1, 16, 112, 36, 14, 34, 74,\n", - " 5, 69, 58, 18, 77, 106, 8, 73, 26, 43, 58, 46,\n", - " 50, 70, 5, 109, 21, 6, 8, 36, 8, 43, 90, 113,\n", - " 68, 4, 93, 65, 79, 45, 24, 38, 86, 73, 48, 59,\n", - " 29, 104, 5, 78, 39, 30, 57, 9, 18, 100, 48, 60,\n", - " 2, 16, 13, 18, 18, 109, 11, 87, 66, 84, 2, 94,\n", - " 109, 102, 112, 22, 51, 5, 47, 72, 62, 75, 83, 16,\n", - " 23, 7, 101, 12, 101, 33, 72, 50, 7, 63, 86, 101,\n", - " 81, 85, 0, 43, 84, 105, 84, 13, 91, 107, 17, 41,\n", - " 64, 108, 68, 54, 59, 72, 16, 43, 39, 1, 111, 56,\n", - " 110, 98, 85, 19, 59, 80, 67, 9, 5, 88, 35, 76,\n", - " 3, 44, 59, 37, 20, 99, 61, 42, 97, 49, 99, 20,\n", - " 3, 5]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2071, 1891, 1891, ..., 740, 740, 6550],\n", - " [ 166, 23, 309, ..., 7314, 7377, 7265]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 63, 58, 16, ..., 16, 5, 86],\n", - " [ 160, 27, 40, ..., 5955, 5624, 5904]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 85, 85, 85, ..., 7168, 7168, 7241],\n", - " [ 150, 491, 501, ..., 20, 625, 370]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 215, 216, 658, ..., 118, 17, 17],\n", - " [ 286, 296, 308, ..., 7303, 7295, 7351]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3493, 7147, 877, ..., 7064, 7064, 4924],\n", - " [ 26, 31, 57, ..., 5919, 5920, 5712]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 85, 85, 85, ..., 7241, 7241, 7366],\n", - " [1334, 2197, 3268, ..., 6843, 6254, 1721]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 137, 137, 137, ..., 5962, 5962, 5962],\n", - " [ 174, 175, 194, ..., 6204, 7097, 6891]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.00661\n", - "sampling 0.006455\n", - "noi time: 0.002016\n", - "get_vertex_data call: 0.036329\n", - "noi group time: 0.003596\n", - "eoi_group_time: 0.015783\n", - "second half: 0.230773\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 1334, 24187, 32616, ..., 1100734, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 1334, 24187, 32616, ..., 1100734, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210831, 1224370, 1224373, ..., 1933649, 1939387, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210831, 1224370, 1224373, ..., 1933649, 1939387, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1141435, 1136235, 1135926, 1138558, 1135152, 1135165, 1135716,\n", - " 1135724, 1137791, 1141756, 1141758, 1137506, 1138320, 1138322, 1138335,\n", - " 1136215, 1141250, 1146802, 1143600, 1143615, 1139808, 1139820, 1139811,\n", - " 1154783, 1145366, 1146977, 1146978, 1146990, 1145992, 1138940, 1143363,\n", - " 1150497, 1142958, 1143820, 1149646, 1147477, 1147483, 1144636, 1135119,\n", - " 1148343, 1136742, 1137220, 1145419, 1147211, 1136676, 1150329, 1152427,\n", - " 1134807, 1134658, 1138112, 1137254, 1137257, 1153467, 1140158, 1140020,\n", - " 1140029, 1162460, 1162461, 1135360, 1135367, 1135202, 1141036, 1136292,\n", - " 1134794, 1143377, 1137329, 1136178, 1136186, 1143064, 1143069, 1157103,\n", - " 1137693, 1135337, 1144394, 1144395, 1136705, 1136662, 1137441, 1136206,\n", - " 1136928, 1139161, 1135664, 1140969, 1140716, 1156342, 1138514, 1158136,\n", - " 1135522, 1137291, 1138445, 1137491, 1157190, 1137932, 1136593, 1149328,\n", - " 1138835, 1138846, 1156606, 1147113, 1142616, 1160822, 1156141, 1138185,\n", - " 1145843, 1135760, 1135769, 1135772, 1136449, 1136457, 1139673, 1138069,\n", - " 1134992, 1148805, 1158961, 1159009, 1141070, 1144410, 1136067, 1139929,\n", - " 1137587, 1138648, 1141963, 1140559, 1140557, 1152042, 1136057, 1137734,\n", - " 1137728, 1134922, 1138255, 1136688, 1141088, 1141098, 1141100, 1139889,\n", - " 1145357, 1141980, 1136385, 1136387, 1143767, 1154855, 1137297, 1137298,\n", - " 1143221, 1143225, 1139025, 1149982, 1152709, 1154467, 1139436, 1136632,\n", - " 1142936, 1141224, 1143678, 1137186, 1144237, 1140592, 1141785, 1136760,\n", - " 1141609, 1141608, 1137087, 1138490, 1138488, 1142050, 1142082, 1142087,\n", - " 1138464, 1149111, 1139190, 1138710, 1138708, 1142913, 1142925, 1137652,\n", - " 1143111, 1144445, 1144596, 1144603, 1136867, 1136864, 1140885, 1141398,\n", - " 1140447, 1144182, 1137606, 1139559, 1139560, 1158692, 1140504, 1140501,\n", - " 1137854, 1147153, 1136369, 1136378, 1141365, 1153056, 1153068, 1163665,\n", - " 1141664, 1139022, 1139019, 1139510, 1140093, 1139127, 1164536, 1147888,\n", - " 1147896, 1140983, 1140990, 1146693, 1147050, 1147047, 1145885, 1145873,\n", - " 1143543, 1143538, 1152976, 1152980, 1152985, 1139447, 1141925, 1146901,\n", - " 1144242, 1141846, 1140695, 1143647, 1143637, 1137570, 1145974, 1143851,\n", - " 1163662, 1146005, 1146024, 1138085, 1154328, 1142533, 1139990, 1143293,\n", - " 1143294, 1147543, 1147540, 1147150, 1148763, 1147282, 1147287, 1142816,\n", - " 1142629, 1142638, 1149366, 1139417, 1143051, 1143040, 1143052, 1148414,\n", - " 1136160, 1157717, 1157720, 1136836, 1136843, 1139297, 1139329, 1144776,\n", - " 1142149, 1143345, 1144619, 1137098, 1144088, 1138600, 1135876, 1150294,\n", - " 1144375, 1146523, 1143957, 1143465, 1143457, 1143947, 1135451, 1147582,\n", - " 1147574, 1149076, 1140361, 1140364, 1137990, 1143075, 1143082, 1144219,\n", - " 1147999, 1134902, 1139252, 1147244, 1148704, 1148715, 1142700, 1141319,\n", - " 1146745, 1146749, 1148465, 1153701, 1158226, 1158228, 1158230, 1143921,\n", - " 1148365, 1154526, 1145240, 1145751, 1142370, 1138638, 1146178, 1138861,\n", - " 1151242, 1152530, 1150445, 1149250, 1148825, 1154438, 1138038, 1144171,\n", - " 1146895, 1152013, 1152023, 1152031, 1145261, 1145262, 1139919, 1139906,\n", - " 1140561, 1148693, 1148696, 1150112, 1150127, 1147019, 1141949, 1150843,\n", - " 1144831, 1151795, 1148744, 1153574, 1148448, 1147653, 1143560, 1143564,\n", - " 1143565, 1151717, 1148288, 1148300, 1137724, 1154420, 1148180, 1148181,\n", - " 1139718, 1146682, 1138872, 1152436, 1152445, 1148729, 1146559, 1148204,\n", - " 1154166, 1153124, 1153192, 1153188, 1153197, 1150935, 1148060, 1152877,\n", - " 1152878, 1143092, 1150352, 1150356, 1146233, 1148095, 1150715, 1148498,\n", - " 1148505, 1149737, 1141423, 1150637, 1146969, 1146972, 1146975, 1146967,\n", - " 1150219, 1146623, 1151691, 1144472, 1156325, 1153026, 1153038, 1150085,\n", - " 1137746, 1137755, 1152820, 1155337, 1152673, 1151617, 1151623, 1150586,\n", - " 1145271, 1136134, 1152957, 1152958, 1152169, 1140932, 1138991, 1152903,\n", - " 1151311, 1143995, 1152341, 1138279, 1136025, 1136028, 1151064, 1151067,\n", - " 1152886, 1152888, 1154722, 1163489, 1137540, 1150104, 1150164, 1144016,\n", - " 1148040, 1161201, 1148903, 1157629, 1137048, 1148626, 1148628, 1158530,\n", - " 1158540, 1137458, 1157456, 1139229, 1157229, 1143442, 1150967, 1158854,\n", - " 1156500, 1152384, 1157064, 1157067, 1139473, 1150465, 1135730, 1152179,\n", - " 1156638, 1153410, 1135647, 1147810, 1139525, 1158308, 1158311, 1151271,\n", - " 1162113, 1154530, 1153999, 1142755, 1156207, 1160440, 1172944, 1156256,\n", - " 1151379, 1155122, 1152519, 1152527, 1155755, 1151425, 1151424, 1135406,\n", - " 1145806, 1145807, 1156463, 1158096, 1154763, 1155620, 1155628, 1155630,\n", - " 1158485, 1154555, 1155576, 1136469, 1158566, 1155646, 1153363, 1161389,\n", - " 1161796, 1154240, 1143189, 1150371, 1153318, 1157439, 1157430, 1150805,\n", - " 1159622, 1159629, 1140748, 1157288, 1157657, 1157663, 1137381, 1138262,\n", - " 1158342, 1145688, 1134682, 1135601, 1135605, 1148149, 1155853, 1155852,\n", - " 1161118, 1156085, 1152220, 1152506, 1140380, 1140381, 1140374, 1155873,\n", - " 1157732, 1157735, 1159132, 1155971, 1155975, 1142070, 1158841, 1156812,\n", - " 1149700, 1136896, 1158815, 1158285, 1151615, 1136480, 1153112, 1152143,\n", - " 1156490, 1153808, 1136640, 1144112, 1144127, 1166424, 1158558, 1159494,\n", - " 1138110, 1155867, 1154337, 1154339, 1158006, 1144581, 1144589, 1155529,\n", - " 1164276, 1142665, 1157759, 1159290, 1156045, 1159042, 1159052, 1159061,\n", - " 1163267, 1158295, 1157945, 1160563, 1162044, 1153052, 1153045, 1171551,\n", - " 1172995, 1162835, 1144146, 1153841, 1153842, 1156104, 1156109, 1138393,\n", - " 1150046, 1164547, 1155479, 1153519, 1146870, 1157614, 1138161, 1138163,\n", - " 1164006, 1164012, 1156795, 1163407, 1154590, 1139592, 1156987, 1148771,\n", - " 1146063, 1158452, 1163452, 1162308, 1140130, 1148607, 1143143, 1165047,\n", - " 1156363, 1158653, 1156181, 1159032, 1169112, 1143735, 1160600, 1155588,\n", - " 1144320, 1162549, 1151223, 1153932, 1148567, 1146500, 1146510, 1144739,\n", - " 1152776, 1165422, 1153201, 1141464, 1141471, 1147433, 1159380, 1182249,\n", - " 1182254, 1156739, 1156742, 1157954, 1150646, 1170253, 1144801, 1144812,\n", - " 1184431, 1140112, 1135567, 1142722, 1167332, 1148683, 1145217, 1145228,\n", - " 1155320, 1147673, 1171683, 1138954, 1150533, 1142136, 1148165, 1143031,\n", - " 1166057, 1166053, 1152624, 1145892, 1145900, 1145902, 1168659, 1152200,\n", - " 1181052, 1143402, 1167503, 1154078, 1170740, 1147338, 1170758, 1145490,\n", - " 1171981, 1144681, 1150525, 1150518, 1156112, 1156119, 1144336, 1157534,\n", - " 1169164, 1169162, 1157331, 1141048, 1180443, 1169359, 1150027, 1150026,\n", - " 1172747, 1171532, 1149683, 1173228, 1158611, 1158623, 1158054, 1149852,\n", - " 1149847, 1152353, 1149398, 1148667, 1148666, 1173307, 1145033, 1169144,\n", - " 1164974, 1151208, 1151696, 1151697, 1157153, 1147709, 1147711, 1151850,\n", - " 1148131, 1147934, 1157593, 1170488, 1183695, 1135021, 1179569, 1167712,\n", - " 1172961, 1146767, 1140326, 1180472, 1144548, 1144550, 1153428, 1159100,\n", - " 1166682, 1181772, 1160314, 1150234, 1154148, 1167504, 1167517, 1186117,\n", - " 1169772, 1167657, 1165967, 1168481, 1143420, 1169618, 1153803, 1153805,\n", - " 1179717, 1158030, 1158031, 1161255, 1161262, 1162129, 1155262, 1154707,\n", - " 1154718, 1157792, 1157795, 1172037, 1143330, 1143333, 1143335, 1178592,\n", - " 1171623, 1157991, 1171738, 1180081, 1184264, 1153899, 1154500, 1164197,\n", - " 1145626, 1156436, 1180383, 1149753, 1152276, 1155990, 1179469, 1158771,\n", - " 1158512, 1158517, 1187090, 1179995, 1158371, 1155899, 1162981, 1162968,\n", - " 1180943, 1189634, 1167762, 1171641, 1182337, 1187407, 1146161, 1170034,\n", - " 1168930, 1190731, 1139828, 1139831, 1139837, 1189379, 1156055, 1191487,\n", - " 1169659, 1146394, 1146395, 1146390, 1176223, 1149544, 1182913, 1140995,\n", - " 1182060, 1189970, 1189977, 1153733, 1194093, 1152115, 1162503, 1162502,\n", - " 1177370, 1185851, 1152080, 1155959, 1185655, 1178290, 1182178, 1190605,\n", - " 1189038, 1191250, 1173826, 1163071, 1191619, 1187036, 1187638, 1194046],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1141435, 1136235, 1135926, 1138558, 1135152, 1135165, 1135716,\n", - " 1135724, 1137791, 1141756, 1141758, 1137506, 1138320, 1138322, 1138335,\n", - " 1136215, 1141250, 1146802, 1143600, 1143615, 1139808, 1139820, 1139811,\n", - " 1154783, 1145366, 1146977, 1146978, 1146990, 1145992, 1138940, 1143363,\n", - " 1150497, 1142958, 1143820, 1149646, 1147477, 1147483, 1144636, 1135119,\n", - " 1148343, 1136742, 1137220, 1145419, 1147211, 1136676, 1150329, 1152427,\n", - " 1134807, 1134658, 1138112, 1137254, 1137257, 1153467, 1140158, 1140020,\n", - " 1140029, 1162460, 1162461, 1135360, 1135367, 1135202, 1141036, 1136292,\n", - " 1134794, 1143377, 1137329, 1136178, 1136186, 1143064, 1143069, 1157103,\n", - " 1137693, 1135337, 1144394, 1144395, 1136705, 1136662, 1137441, 1136206,\n", - " 1136928, 1139161, 1135664, 1140969, 1140716, 1156342, 1138514, 1158136,\n", - " 1135522, 1137291, 1138445, 1137491, 1157190, 1137932, 1136593, 1149328,\n", - " 1138835, 1138846, 1156606, 1147113, 1142616, 1160822, 1156141, 1138185,\n", - " 1145843, 1135760, 1135769, 1135772, 1136449, 1136457, 1139673, 1138069,\n", - " 1134992, 1148805, 1158961, 1159009, 1141070, 1144410, 1136067, 1139929,\n", - " 1137587, 1138648, 1141963, 1140559, 1140557, 1152042, 1136057, 1137734,\n", - " 1137728, 1134922, 1138255, 1136688, 1141088, 1141098, 1141100, 1139889,\n", - " 1145357, 1141980, 1136385, 1136387, 1143767, 1154855, 1137297, 1137298,\n", - " 1143221, 1143225, 1139025, 1149982, 1152709, 1154467, 1139436, 1136632,\n", - " 1142936, 1141224, 1143678, 1137186, 1144237, 1140592, 1141785, 1136760,\n", - " 1141609, 1141608, 1137087, 1138490, 1138488, 1142050, 1142082, 1142087,\n", - " 1138464, 1149111, 1139190, 1138710, 1138708, 1142913, 1142925, 1137652,\n", - " 1143111, 1144445, 1144596, 1144603, 1136867, 1136864, 1140885, 1141398,\n", - " 1140447, 1144182, 1137606, 1139559, 1139560, 1158692, 1140504, 1140501,\n", - " 1137854, 1147153, 1136369, 1136378, 1141365, 1153056, 1153068, 1163665,\n", - " 1141664, 1139022, 1139019, 1139510, 1140093, 1139127, 1164536, 1147888,\n", - " 1147896, 1140983, 1140990, 1146693, 1147050, 1147047, 1145885, 1145873,\n", - " 1143543, 1143538, 1152976, 1152980, 1152985, 1139447, 1141925, 1146901,\n", - " 1144242, 1141846, 1140695, 1143647, 1143637, 1137570, 1145974, 1143851,\n", - " 1163662, 1146005, 1146024, 1138085, 1154328, 1142533, 1139990, 1143293,\n", - " 1143294, 1147543, 1147540, 1147150, 1148763, 1147282, 1147287, 1142816,\n", - " 1142629, 1142638, 1149366, 1139417, 1143051, 1143040, 1143052, 1148414,\n", - " 1136160, 1157717, 1157720, 1136836, 1136843, 1139297, 1139329, 1144776,\n", - " 1142149, 1143345, 1144619, 1137098, 1144088, 1138600, 1135876, 1150294,\n", - " 1144375, 1146523, 1143957, 1143465, 1143457, 1143947, 1135451, 1147582,\n", - " 1147574, 1149076, 1140361, 1140364, 1137990, 1143075, 1143082, 1144219,\n", - " 1147999, 1134902, 1139252, 1147244, 1148704, 1148715, 1142700, 1141319,\n", - " 1146745, 1146749, 1148465, 1153701, 1158226, 1158228, 1158230, 1143921,\n", - " 1148365, 1154526, 1145240, 1145751, 1142370, 1138638, 1146178, 1138861,\n", - " 1151242, 1152530, 1150445, 1149250, 1148825, 1154438, 1138038, 1144171,\n", - " 1146895, 1152013, 1152023, 1152031, 1145261, 1145262, 1139919, 1139906,\n", - " 1140561, 1148693, 1148696, 1150112, 1150127, 1147019, 1141949, 1150843,\n", - " 1144831, 1151795, 1148744, 1153574, 1148448, 1147653, 1143560, 1143564,\n", - " 1143565, 1151717, 1148288, 1148300, 1137724, 1154420, 1148180, 1148181,\n", - " 1139718, 1146682, 1138872, 1152436, 1152445, 1148729, 1146559, 1148204,\n", - " 1154166, 1153124, 1153192, 1153188, 1153197, 1150935, 1148060, 1152877,\n", - " 1152878, 1143092, 1150352, 1150356, 1146233, 1148095, 1150715, 1148498,\n", - " 1148505, 1149737, 1141423, 1150637, 1146969, 1146972, 1146975, 1146967,\n", - " 1150219, 1146623, 1151691, 1144472, 1156325, 1153026, 1153038, 1150085,\n", - " 1137746, 1137755, 1152820, 1155337, 1152673, 1151617, 1151623, 1150586,\n", - " 1145271, 1136134, 1152957, 1152958, 1152169, 1140932, 1138991, 1152903,\n", - " 1151311, 1143995, 1152341, 1138279, 1136025, 1136028, 1151064, 1151067,\n", - " 1152886, 1152888, 1154722, 1163489, 1137540, 1150104, 1150164, 1144016,\n", - " 1148040, 1161201, 1148903, 1157629, 1137048, 1148626, 1148628, 1158530,\n", - " 1158540, 1137458, 1157456, 1139229, 1157229, 1143442, 1150967, 1158854,\n", - " 1156500, 1152384, 1157064, 1157067, 1139473, 1150465, 1135730, 1152179,\n", - " 1156638, 1153410, 1135647, 1147810, 1139525, 1158308, 1158311, 1151271,\n", - " 1162113, 1154530, 1153999, 1142755, 1156207, 1160440, 1172944, 1156256,\n", - " 1151379, 1155122, 1152519, 1152527, 1155755, 1151425, 1151424, 1135406,\n", - " 1145806, 1145807, 1156463, 1158096, 1154763, 1155620, 1155628, 1155630,\n", - " 1158485, 1154555, 1155576, 1136469, 1158566, 1155646, 1153363, 1161389,\n", - " 1161796, 1154240, 1143189, 1150371, 1153318, 1157439, 1157430, 1150805,\n", - " 1159622, 1159629, 1140748, 1157288, 1157657, 1157663, 1137381, 1138262,\n", - " 1158342, 1145688, 1134682, 1135601, 1135605, 1148149, 1155853, 1155852,\n", - " 1161118, 1156085, 1152220, 1152506, 1140380, 1140381, 1140374, 1155873,\n", - " 1157732, 1157735, 1159132, 1155971, 1155975, 1142070, 1158841, 1156812,\n", - " 1149700, 1136896, 1158815, 1158285, 1151615, 1136480, 1153112, 1152143,\n", - " 1156490, 1153808, 1136640, 1144112, 1144127, 1166424, 1158558, 1159494,\n", - " 1138110, 1155867, 1154337, 1154339, 1158006, 1144581, 1144589, 1155529,\n", - " 1164276, 1142665, 1157759, 1159290, 1156045, 1159042, 1159052, 1159061,\n", - " 1163267, 1158295, 1157945, 1160563, 1162044, 1153052, 1153045, 1171551,\n", - " 1172995, 1162835, 1144146, 1153841, 1153842, 1156104, 1156109, 1138393,\n", - " 1150046, 1164547, 1155479, 1153519, 1146870, 1157614, 1138161, 1138163,\n", - " 1164006, 1164012, 1156795, 1163407, 1154590, 1139592, 1156987, 1148771,\n", - " 1146063, 1158452, 1163452, 1162308, 1140130, 1148607, 1143143, 1165047,\n", - " 1156363, 1158653, 1156181, 1159032, 1169112, 1143735, 1160600, 1155588,\n", - " 1144320, 1162549, 1151223, 1153932, 1148567, 1146500, 1146510, 1144739,\n", - " 1152776, 1165422, 1153201, 1141464, 1141471, 1147433, 1159380, 1182249,\n", - " 1182254, 1156739, 1156742, 1157954, 1150646, 1170253, 1144801, 1144812,\n", - " 1184431, 1140112, 1135567, 1142722, 1167332, 1148683, 1145217, 1145228,\n", - " 1155320, 1147673, 1171683, 1138954, 1150533, 1142136, 1148165, 1143031,\n", - " 1166057, 1166053, 1152624, 1145892, 1145900, 1145902, 1168659, 1152200,\n", - " 1181052, 1143402, 1167503, 1154078, 1170740, 1147338, 1170758, 1145490,\n", - " 1171981, 1144681, 1150525, 1150518, 1156112, 1156119, 1144336, 1157534,\n", - " 1169164, 1169162, 1157331, 1141048, 1180443, 1169359, 1150027, 1150026,\n", - " 1172747, 1171532, 1149683, 1173228, 1158611, 1158623, 1158054, 1149852,\n", - " 1149847, 1152353, 1149398, 1148667, 1148666, 1173307, 1145033, 1169144,\n", - " 1164974, 1151208, 1151696, 1151697, 1157153, 1147709, 1147711, 1151850,\n", - " 1148131, 1147934, 1157593, 1170488, 1183695, 1135021, 1179569, 1167712,\n", - " 1172961, 1146767, 1140326, 1180472, 1144548, 1144550, 1153428, 1159100,\n", - " 1166682, 1181772, 1160314, 1150234, 1154148, 1167504, 1167517, 1186117,\n", - " 1169772, 1167657, 1165967, 1168481, 1143420, 1169618, 1153803, 1153805,\n", - " 1179717, 1158030, 1158031, 1161255, 1161262, 1162129, 1155262, 1154707,\n", - " 1154718, 1157792, 1157795, 1172037, 1143330, 1143333, 1143335, 1178592,\n", - " 1171623, 1157991, 1171738, 1180081, 1184264, 1153899, 1154500, 1164197,\n", - " 1145626, 1156436, 1180383, 1149753, 1152276, 1155990, 1179469, 1158771,\n", - " 1158512, 1158517, 1187090, 1179995, 1158371, 1155899, 1162981, 1162968,\n", - " 1180943, 1189634, 1167762, 1171641, 1182337, 1187407, 1146161, 1170034,\n", - " 1168930, 1190731, 1139828, 1139831, 1139837, 1189379, 1156055, 1191487,\n", - " 1169659, 1146394, 1146395, 1146390, 1176223, 1149544, 1182913, 1140995,\n", - " 1182060, 1189970, 1189977, 1153733, 1194093, 1152115, 1162503, 1162502,\n", - " 1177370, 1185851, 1152080, 1155959, 1185655, 1178290, 1182178, 1190605,\n", - " 1189038, 1191250, 1173826, 1163071, 1191619, 1187036, 1187638, 1194046],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195202, 1199428, 1196800, 1197719, 1195860, 1199282, 1198449, 1198458,\n", - " 1202255, 1198835, 1198840, 1201581, 1201582, 1199248, 1201016, 1196956,\n", - " 1202804, 1194743, 1196631, 1194649, 1194642, 1194648, 1195507, 1195926,\n", - " 1195263, 1196534, 1201992, 1197697, 1201429, 1195895, 1195740, 1196977,\n", - " 1196979, 1195325, 1198668, 1198036, 1198163, 1198167, 1196711, 1199823,\n", - " 1195148, 1195265, 1195270, 1195278, 1197141, 1196242, 1195245, 1197367,\n", - " 1196109, 1198915, 1195659, 1195541, 1196122, 1199998, 1195917, 1196393,\n", - " 1196272, 1198280, 1196851, 1197583, 1199628, 1199803, 1197990, 1197994,\n", - " 1200116, 1194795, 1200671, 1200668, 1197970, 1201117, 1196727, 1202618,\n", - " 1200018, 1199410, 1198811, 1201529, 1200769, 1200450, 1200507, 1198593,\n", - " 1202630, 1201056, 1194814, 1199712, 1199721, 1201047, 1200264, 1200553,\n", - " 1202485, 1196889, 1199908, 1202239, 1200899, 1200907, 1201254, 1202170,\n", - " 1202662, 1201291, 1196761, 1202695, 1198562, 1199606, 1195679, 1195664,\n", - " 1198929, 1198932, 1196920, 1197816, 1197822, 1194720, 1194730, 1197731,\n", - " 1197735, 1199782, 1198819, 1195082, 1201365, 1196428], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195202, 1199428, 1196800, 1197719, 1195860, 1199282, 1198449, 1198458,\n", - " 1202255, 1198835, 1198840, 1201581, 1201582, 1199248, 1201016, 1196956,\n", - " 1202804, 1194743, 1196631, 1194649, 1194642, 1194648, 1195507, 1195926,\n", - " 1195263, 1196534, 1201992, 1197697, 1201429, 1195895, 1195740, 1196977,\n", - " 1196979, 1195325, 1198668, 1198036, 1198163, 1198167, 1196711, 1199823,\n", - " 1195148, 1195265, 1195270, 1195278, 1197141, 1196242, 1195245, 1197367,\n", - " 1196109, 1198915, 1195659, 1195541, 1196122, 1199998, 1195917, 1196393,\n", - " 1196272, 1198280, 1196851, 1197583, 1199628, 1199803, 1197990, 1197994,\n", - " 1200116, 1194795, 1200671, 1200668, 1197970, 1201117, 1196727, 1202618,\n", - " 1200018, 1199410, 1198811, 1201529, 1200769, 1200450, 1200507, 1198593,\n", - " 1202630, 1201056, 1194814, 1199712, 1199721, 1201047, 1200264, 1200553,\n", - " 1202485, 1196889, 1199908, 1202239, 1200899, 1200907, 1201254, 1202170,\n", - " 1202662, 1201291, 1196761, 1202695, 1198562, 1199606, 1195679, 1195664,\n", - " 1198929, 1198932, 1196920, 1197816, 1197822, 1194720, 1194730, 1197731,\n", - " 1197735, 1199782, 1198819, 1195082, 1201365, 1196428], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 1.1617e-01, -5.6722e-04, 5.1253e-01, ..., 6.9444e-02,\n", - " -1.3416e-03, -3.7353e-03],\n", - " [ 1.2761e-01, -7.0637e-04, 5.3704e-01, ..., 5.6844e-02,\n", - " -1.4194e-03, -4.3045e-03],\n", - " [ 1.1078e-01, -5.9348e-04, 5.3184e-01, ..., 6.2231e-02,\n", - " -1.2335e-03, -3.9584e-03],\n", - " ...,\n", - " [ 1.2569e-01, -6.4809e-04, 5.3687e-01, ..., 6.6112e-02,\n", - " -1.3844e-03, -3.9103e-03],\n", - " [ 4.7153e-02, -1.2728e-04, 4.5169e-01, ..., 8.1979e-02,\n", - " -1.0795e-03, -3.2492e-03],\n", - " [ 1.1078e-01, -5.9348e-04, 5.3184e-01, ..., 6.2231e-02,\n", - " -1.2335e-03, -3.9584e-03]], device='cuda:0'), 'paper': tensor([[ 1.7345, -0.0262, 1.0314, ..., -0.0147, -0.0236, 1.5998],\n", - " [ 1.6460, -0.0246, 0.7091, ..., -0.0082, -0.0243, 2.4618],\n", - " [ 1.1195, -0.0257, 0.0045, ..., -0.0124, -0.0172, 1.1925],\n", - " ...,\n", - " [ 1.5277, -0.0212, 0.4150, ..., -0.0078, -0.0215, 2.1988],\n", - " [ 1.0702, -0.0343, 0.0069, ..., -0.0148, -0.0193, 0.9063],\n", - " [ 1.7907, -0.0273, 0.5696, ..., -0.0070, -0.0268, 3.1016]],\n", - " device='cuda:0'), 'author': tensor([[ 8.4447e-02, 7.1657e-02, 1.0786e-01, ..., 6.6527e-01,\n", - " -2.3071e-03, 2.3157e-02],\n", - " [ 1.5826e-01, -1.0095e-03, 6.9458e-02, ..., 6.7714e-01,\n", - " 9.5723e-02, 2.3384e-01],\n", - " [ 1.8875e-01, -1.6494e-03, 8.0020e-02, ..., 6.3587e-01,\n", - " 1.1417e-01, 2.0276e-01],\n", - " ...,\n", - " [ 1.9937e-01, -1.1015e-03, 1.0018e-01, ..., 6.7359e-01,\n", - " 1.1252e-01, 2.9333e-01],\n", - " [ 1.8126e-01, -4.8921e-04, 4.1620e-02, ..., 5.3881e-01,\n", - " 6.4547e-02, 2.1725e-01],\n", - " [ 2.4167e-01, -1.7658e-03, 4.2846e-03, ..., 6.5103e-01,\n", - " 2.2909e-01, 3.0364e-01]], device='cuda:0'), 'field_of_study': tensor([[-1.9498e-03, 8.4408e-02, 8.7395e-02, ..., -1.5821e-03,\n", - " -6.2645e-04, -2.9237e-03],\n", - " [-3.4505e-03, 3.1482e-01, 1.3617e-01, ..., 1.7516e-01,\n", - " -3.9444e-04, -3.8454e-03],\n", - " [-2.5713e-03, 1.2751e-01, 6.4691e-02, ..., -5.8713e-04,\n", - " -3.5806e-04, -3.1093e-03],\n", - " ...,\n", - " [-1.5537e-03, 1.7336e-01, 1.2573e-01, ..., -2.0156e-03,\n", - " -1.5186e-03, -2.6885e-03],\n", - " [-2.2931e-03, 1.1553e-01, 3.4614e-02, ..., -8.8188e-04,\n", - " -2.5359e-04, -3.2607e-03],\n", - " [-1.6055e-03, 2.1779e-01, 9.6045e-02, ..., -9.9164e-04,\n", - " 1.0560e-02, -3.8710e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 149, 97, 86, 112, 106, 136, 136, 10, 331, 254, 254, 254,\n", - " 315, 254, 303, 383, 450, 536, 609, 664, 794, 751, 751, 598,\n", - " 598, 598, 831, 1049, 1049, 1120, 1078, 1126, 1257, 1488, 1382, 1382,\n", - " 1382, 1134, 1134, 1275, 1475, 1311, 1311, 1588, 1276, 1276, 1561, 1510,\n", - " 1510, 1608, 1546, 1812, 1546, 1546, 1731, 1699, 1652, 1798, 2046, 2012,\n", - " 1863, 1863, 2110, 2110, 2028, 2118, 2221, 2212, 2556, 2271, 2438, 2427,\n", - " 2528, 2604, 2616, 2813, 2813, 2813, 3089, 3206, 3206, 3243, 3205, 3247,\n", - " 3247, 3274, 3274, 3274, 3377, 3549, 3473, 3850, 3730, 3874, 3748, 4198,\n", - " 4019, 4038, 4038, 3801, 3801, 4256, 4087, 3895, 4280, 4319, 4408, 4527,\n", - " 4595, 4813, 4685, 4662, 4787, 4849, 4751, 4751, 4806, 4852, 4751, 4970,\n", - " 4970, 4868, 4984, 5132, 5079, 5089, 5089, 5042, 5290, 5476, 5364, 5364,\n", - " 5439, 5576, 5643, 5646, 5646, 5703, 5643, 5676, 5676, 5512, 5800, 5602,\n", - " 5602, 5602, 5602, 5674, 5674, 5859, 6102, 5968, 5750, 6172, 6795, 6693,\n", - " 6676, 6676, 6676, 6258, 6015, 6015, 6830, 6470, 6356, 6830, 6801, 6763,\n", - " 6763, 6423, 6423, 6639, 6743, 6743, 6743, 6667],\n", - " [ 6, 98, 100, 7, 13, 115, 41, 63, 82, 3, 103, 15,\n", - " 88, 20, 25, 91, 74, 8, 103, 35, 25, 54, 70, 106,\n", - " 53, 12, 27, 104, 60, 19, 58, 70, 22, 68, 14, 97,\n", - " 26, 70, 16, 46, 47, 70, 34, 81, 70, 92, 52, 64,\n", - " 5, 105, 70, 39, 84, 32, 18, 116, 93, 52, 97, 114,\n", - " 52, 23, 66, 42, 47, 52, 52, 47, 86, 91, 70, 12,\n", - " 18, 42, 78, 24, 42, 43, 109, 106, 75, 101, 37, 99,\n", - " 5, 33, 61, 69, 92, 6, 113, 10, 42, 94, 63, 30,\n", - " 24, 71, 56, 95, 28, 62, 21, 116, 96, 89, 70, 72,\n", - " 9, 106, 85, 59, 65, 32, 29, 105, 77, 6, 83, 99,\n", - " 4, 45, 70, 9, 48, 2, 36, 113, 44, 51, 57, 11,\n", - " 70, 70, 107, 50, 70, 1, 26, 13, 70, 73, 17, 79,\n", - " 117, 90, 6, 70, 108, 80, 110, 45, 40, 87, 68, 70,\n", - " 75, 111, 76, 8, 70, 102, 70, 49, 112, 67, 110, 55,\n", - " 70, 70, 30, 105, 38, 70, 0, 31]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 289, 938, 938, ..., 5019, 938, 789],\n", - " [ 178, 178, 285, ..., 5727, 5857, 5930]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 13, 25, 12, ..., 25, 99, 5],\n", - " [ 11, 182, 184, ..., 6710, 6858, 6637]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 123, 123, 123, ..., 5765, 5765, 5765],\n", - " [ 111, 116, 242, ..., 667, 744, 753]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 496, 454, 153, ..., 503, 72, 739],\n", - " [ 206, 112, 5, ..., 5862, 5925, 5876]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5893, 4433, 3368, ..., 5521, 2792, 1093],\n", - " [ 3, 32, 49, ..., 6814, 6786, 6777]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 123, 123, 123, ..., 5898, 5853, 5797],\n", - " [1199, 1269, 1225, ..., 3128, 3501, 2394]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 157, 157, 157, ..., 6639, 6639, 6639],\n", - " [2251, 3688, 4685, ..., 5634, 5675, 5055]], device='cuda:0')}\n", - "Epoch: 002, Loss: 0.9566, Train: 388.6000\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.015263\n", - "sampling 0.014001\n", - "noi time: 0.003088\n", - "get_vertex_data call: 0.064078\n", - "noi group time: 0.00271\n", - "eoi_group_time: 0.013957\n", - "second half: 0.239551\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16691, 31145, 24187, ..., 1118700, 1120077, 1133550],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16691, 31145, 24187, ..., 1118700, 1120077, 1133550],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1203800, 1215822, 1214596, ..., 1937149, 1937998, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1203800, 1215822, 1214596, ..., 1937149, 1937998, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1137204, 1137212, 1141424, 1140284, 1135926, 1135152, 1141758,\n", - " 1137517, 1140297, 1136969, 1136971, 1146803, 1143615, 1149831, 1149839,\n", - " 1145373, 1137947, 1137271, 1138938, 1146427, 1143372, 1139246, 1139241,\n", - " 1140781, 1150504, 1139866, 1135385, 1149216, 1143820, 1149632, 1147473,\n", - " 1147477, 1135992, 1149283, 1142893, 1144636, 1149039, 1146995, 1148345,\n", - " 1148350, 1152664, 1148546, 1153221, 1147094, 1137220, 1155019, 1147201,\n", - " 1147211, 1136679, 1150329, 1138749, 1140308, 1151545, 1140540, 1138112,\n", - " 1151531, 1140158, 1140020, 1135367, 1135202, 1135903, 1141036, 1134794,\n", - " 1138508, 1135342, 1139204, 1144395, 1135408, 1135418, 1157395, 1136662,\n", - " 1137441, 1139161, 1135579, 1136111, 1140970, 1140719, 1138514, 1153094,\n", - " 1153099, 1137957, 1158136, 1154132, 1145132, 1156899, 1156909, 1135522,\n", - " 1139685, 1138319, 1137289, 1157703, 1138436, 1138440, 1138445, 1138457,\n", - " 1138461, 1138462, 1137491, 1136594, 1135088, 1138889, 1156605, 1147112,\n", - " 1142611, 1142612, 1135346, 1135631, 1138185, 1158984, 1145843, 1148531,\n", - " 1139667, 1139673, 1138069, 1134992, 1142434, 1148809, 1135789, 1136734,\n", - " 1158961, 1158968, 1158971, 1158974, 1159009, 1159019, 1144406, 1153544,\n", - " 1140034, 1139076, 1141963, 1141966, 1134891, 1140557, 1141995, 1152044,\n", - " 1142302, 1136057, 1137734, 1137728, 1147317, 1134750, 1137005, 1135549,\n", - " 1136697, 1141088, 1141097, 1143767, 1142499, 1152709, 1141224, 1139386,\n", - " 1143667, 1144237, 1140592, 1140597, 1141156, 1141786, 1139495, 1144941,\n", - " 1136760, 1141609, 1134987, 1136854, 1137087, 1138482, 1141810, 1143153,\n", - " 1140173, 1140163, 1137766, 1149111, 1141482, 1138708, 1140101, 1142917,\n", - " 1142913, 1143113, 1144596, 1136871, 1144182, 1144184, 1137614, 1144865,\n", - " 1158699, 1147153, 1141365, 1141367, 1153068, 1141678, 1149097, 1138292,\n", - " 1144277, 1144284, 1143917, 1139508, 1139510, 1139127, 1145000, 1145001,\n", - " 1140616, 1140619, 1140990, 1143692, 1147050, 1145873, 1149876, 1152976,\n", - " 1135457, 1139453, 1141925, 1146901, 1144242, 1145332, 1140579, 1140582,\n", - " 1141841, 1134856, 1145974, 1143845, 1143851, 1146016, 1146024, 1138094,\n", - " 1146140, 1139990, 1143294, 1143280, 1147147, 1147150, 1148763, 1147282,\n", - " 1142816, 1140349, 1143663, 1149366, 1139417, 1143042, 1136167, 1157718,\n", - " 1157720, 1136836, 1139329, 1139328, 1143345, 1135876, 1146523, 1138018,\n", - " 1143456, 1143457, 1137697, 1140483, 1143937, 1147521, 1147523, 1140364,\n", - " 1149582, 1143080, 1168921, 1144219, 1147996, 1147999, 1134899, 1144013,\n", - " 1139252, 1147237, 1154481, 1148704, 1141327, 1141825, 1146745, 1146742,\n", - " 1147024, 1147971, 1145012, 1145021, 1145009, 1139549, 1158228, 1143927,\n", - " 1145751, 1138626, 1148397, 1146178, 1150438, 1150445, 1148826, 1144526,\n", - " 1146887, 1152013, 1169726, 1151480, 1151482, 1152022, 1152023, 1154271,\n", - " 1154263, 1149594, 1134873, 1149534, 1147023, 1141949, 1141271, 1151795,\n", - " 1148745, 1153574, 1143560, 1149412, 1148300, 1152073, 1135083, 1164893,\n", - " 1139088, 1139096, 1154430, 1154420, 1136249, 1146676, 1146686, 1138867,\n", - " 1157968, 1148720, 1148725, 1145862, 1146544, 1149821, 1151941, 1148096,\n", - " 1148108, 1171943, 1169367, 1154201, 1153124, 1153192, 1153188, 1150935,\n", - " 1152878, 1144863, 1150352, 1150356, 1155094, 1143129, 1143135, 1147442,\n", - " 1151821, 1152591, 1154183, 1148498, 1149737, 1141420, 1155164, 1147733,\n", - " 1147737, 1153449, 1145080, 1146969, 1146972, 1149356, 1149359, 1151935,\n", - " 1153249, 1153255, 1146616, 1146623, 1151402, 1152407, 1154063, 1151731,\n", - " 1156321, 1153032, 1153038, 1137746, 1152622, 1155145, 1155146, 1136410,\n", - " 1149203, 1151964, 1155337, 1155334, 1154120, 1154123, 1157833, 1152673,\n", - " 1151617, 1150578, 1148914, 1148916, 1152946, 1152950, 1152227, 1138991,\n", - " 1152903, 1152341, 1156823, 1156826, 1156816, 1146708, 1138275, 1157147,\n", - " 1136028, 1158704, 1150150, 1150164, 1148040, 1155231, 1144667, 1137048,\n", - " 1148628, 1158540, 1148380, 1137458, 1149947, 1154564, 1178126, 1153085,\n", - " 1142041, 1142047, 1143442, 1158863, 1158916, 1156505, 1155418, 1146851,\n", - " 1135231, 1135730, 1152183, 1156638, 1151788, 1157909, 1150828, 1156935,\n", - " 1158304, 1158306, 1158308, 1158311, 1151330, 1155441, 1155442, 1153359,\n", - " 1150129, 1150130, 1154529, 1154530, 1156913, 1142755, 1164631, 1151379,\n", - " 1137912, 1158629, 1155122, 1155755, 1155758, 1151424, 1135394, 1146924,\n", - " 1155628, 1155630, 1154555, 1158824, 1158325, 1157000, 1155646, 1155634,\n", - " 1158355, 1143254, 1143263, 1154240, 1154080, 1154902, 1143189, 1153322,\n", - " 1157439, 1150077, 1155613, 1141627, 1150987, 1155288, 1157289, 1137167,\n", - " 1137152, 1157653, 1157660, 1153776, 1153781, 1168145, 1134677, 1134685,\n", - " 1134682, 1135601, 1150661, 1155852, 1157684, 1146326, 1161116, 1140633,\n", - " 1144451, 1152220, 1152509, 1156695, 1140374, 1157026, 1142466, 1155975,\n", - " 1158846, 1155396, 1149700, 1154600, 1158760, 1158886, 1157304, 1159164,\n", - " 1158815, 1158274, 1151615, 1136480, 1164931, 1156665, 1147585, 1147599,\n", - " 1153808, 1156276, 1136640, 1136646, 1158558, 1153827, 1156514, 1146126,\n", - " 1138099, 1138110, 1155529, 1155528, 1161539, 1135661, 1142658, 1164148,\n", - " 1157747, 1162672, 1159042, 1159052, 1159061, 1158300, 1157944, 1153052,\n", - " 1153045, 1170855, 1156104, 1138396, 1138393, 1167184, 1150032, 1150046,\n", - " 1149063, 1149070, 1145945, 1153519, 1138161, 1156785, 1156789, 1149956,\n", - " 1149963, 1148021, 1156991, 1157357, 1146354, 1140643, 1148600, 1148607,\n", - " 1143143, 1163019, 1164497, 1156355, 1158643, 1158653, 1156187, 1159025,\n", - " 1159029, 1159032, 1143729, 1155588, 1156589, 1144989, 1167933, 1147401,\n", - " 1149014, 1146509, 1153239, 1144737, 1144747, 1152776, 1155048, 1165421,\n", - " 1153201, 1141471, 1156737, 1156739, 1156744, 1153663, 1171040, 1144812,\n", - " 1135567, 1156300, 1166917, 1148683, 1169282, 1146042, 1155320, 1147673,\n", - " 1138762, 1142136, 1143025, 1147680, 1147689, 1147694, 1145447, 1147355,\n", - " 1170502, 1139351, 1139345, 1147724, 1145902, 1153520, 1153534, 1171571,\n", - " 1152203, 1152206, 1170980, 1171277, 1154070, 1167326, 1163639, 1177922,\n", - " 1169298, 1155172, 1156119, 1144336, 1157534, 1154670, 1152998, 1166006,\n", - " 1157331, 1141043, 1154364, 1149684, 1158051, 1173047, 1153294, 1149846,\n", - " 1149847, 1172076, 1167383, 1172488, 1170279, 1149398, 1149402, 1148667,\n", - " 1148666, 1172838, 1172143, 1148324, 1173307, 1145025, 1189233, 1154018,\n", - " 1154027, 1157158, 1157153, 1167232, 1167238, 1147711, 1151850, 1149247,\n", - " 1170488, 1170490, 1135018, 1171798, 1155739, 1174417, 1162106, 1168697,\n", - " 1166746, 1168597, 1160977, 1160979, 1166028, 1178056, 1159099, 1159100,\n", - " 1171823, 1150234, 1161591, 1154151, 1154148, 1158176, 1149169, 1149174,\n", - " 1149173, 1143279, 1169769, 1165960, 1153803, 1172354, 1178467, 1180817,\n", - " 1172800, 1185145, 1183123, 1151519, 1179807, 1166551, 1161255, 1177576,\n", - " 1171623, 1178359, 1155799, 1157126, 1187529, 1192691, 1153898, 1154497,\n", - " 1191749, 1145626, 1156433, 1157483, 1161067, 1184996, 1180732, 1174403,\n", - " 1181354, 1153601, 1163045, 1158512, 1181952, 1186007, 1158940, 1186995,\n", - " 1155890, 1155892, 1155899, 1155889, 1155895, 1186099, 1168886, 1168890,\n", - " 1166107, 1163422, 1181469, 1161819, 1183831, 1183008, 1156539, 1139831,\n", - " 1150265, 1154812, 1156055, 1191726, 1149536, 1182891, 1192167, 1178523,\n", - " 1181946, 1192195, 1193246, 1159169, 1152112, 1189521, 1162503, 1169707,\n", - " 1177285, 1172423, 1172424, 1172122, 1166789, 1179749, 1155956, 1155959,\n", - " 1155962, 1180276, 1179769, 1185356, 1189667, 1190908, 1182852, 1157008],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1137204, 1137212, 1141424, 1140284, 1135926, 1135152, 1141758,\n", - " 1137517, 1140297, 1136969, 1136971, 1146803, 1143615, 1149831, 1149839,\n", - " 1145373, 1137947, 1137271, 1138938, 1146427, 1143372, 1139246, 1139241,\n", - " 1140781, 1150504, 1139866, 1135385, 1149216, 1143820, 1149632, 1147473,\n", - " 1147477, 1135992, 1149283, 1142893, 1144636, 1149039, 1146995, 1148345,\n", - " 1148350, 1152664, 1148546, 1153221, 1147094, 1137220, 1155019, 1147201,\n", - " 1147211, 1136679, 1150329, 1138749, 1140308, 1151545, 1140540, 1138112,\n", - " 1151531, 1140158, 1140020, 1135367, 1135202, 1135903, 1141036, 1134794,\n", - " 1138508, 1135342, 1139204, 1144395, 1135408, 1135418, 1157395, 1136662,\n", - " 1137441, 1139161, 1135579, 1136111, 1140970, 1140719, 1138514, 1153094,\n", - " 1153099, 1137957, 1158136, 1154132, 1145132, 1156899, 1156909, 1135522,\n", - " 1139685, 1138319, 1137289, 1157703, 1138436, 1138440, 1138445, 1138457,\n", - " 1138461, 1138462, 1137491, 1136594, 1135088, 1138889, 1156605, 1147112,\n", - " 1142611, 1142612, 1135346, 1135631, 1138185, 1158984, 1145843, 1148531,\n", - " 1139667, 1139673, 1138069, 1134992, 1142434, 1148809, 1135789, 1136734,\n", - " 1158961, 1158968, 1158971, 1158974, 1159009, 1159019, 1144406, 1153544,\n", - " 1140034, 1139076, 1141963, 1141966, 1134891, 1140557, 1141995, 1152044,\n", - " 1142302, 1136057, 1137734, 1137728, 1147317, 1134750, 1137005, 1135549,\n", - " 1136697, 1141088, 1141097, 1143767, 1142499, 1152709, 1141224, 1139386,\n", - " 1143667, 1144237, 1140592, 1140597, 1141156, 1141786, 1139495, 1144941,\n", - " 1136760, 1141609, 1134987, 1136854, 1137087, 1138482, 1141810, 1143153,\n", - " 1140173, 1140163, 1137766, 1149111, 1141482, 1138708, 1140101, 1142917,\n", - " 1142913, 1143113, 1144596, 1136871, 1144182, 1144184, 1137614, 1144865,\n", - " 1158699, 1147153, 1141365, 1141367, 1153068, 1141678, 1149097, 1138292,\n", - " 1144277, 1144284, 1143917, 1139508, 1139510, 1139127, 1145000, 1145001,\n", - " 1140616, 1140619, 1140990, 1143692, 1147050, 1145873, 1149876, 1152976,\n", - " 1135457, 1139453, 1141925, 1146901, 1144242, 1145332, 1140579, 1140582,\n", - " 1141841, 1134856, 1145974, 1143845, 1143851, 1146016, 1146024, 1138094,\n", - " 1146140, 1139990, 1143294, 1143280, 1147147, 1147150, 1148763, 1147282,\n", - " 1142816, 1140349, 1143663, 1149366, 1139417, 1143042, 1136167, 1157718,\n", - " 1157720, 1136836, 1139329, 1139328, 1143345, 1135876, 1146523, 1138018,\n", - " 1143456, 1143457, 1137697, 1140483, 1143937, 1147521, 1147523, 1140364,\n", - " 1149582, 1143080, 1168921, 1144219, 1147996, 1147999, 1134899, 1144013,\n", - " 1139252, 1147237, 1154481, 1148704, 1141327, 1141825, 1146745, 1146742,\n", - " 1147024, 1147971, 1145012, 1145021, 1145009, 1139549, 1158228, 1143927,\n", - " 1145751, 1138626, 1148397, 1146178, 1150438, 1150445, 1148826, 1144526,\n", - " 1146887, 1152013, 1169726, 1151480, 1151482, 1152022, 1152023, 1154271,\n", - " 1154263, 1149594, 1134873, 1149534, 1147023, 1141949, 1141271, 1151795,\n", - " 1148745, 1153574, 1143560, 1149412, 1148300, 1152073, 1135083, 1164893,\n", - " 1139088, 1139096, 1154430, 1154420, 1136249, 1146676, 1146686, 1138867,\n", - " 1157968, 1148720, 1148725, 1145862, 1146544, 1149821, 1151941, 1148096,\n", - " 1148108, 1171943, 1169367, 1154201, 1153124, 1153192, 1153188, 1150935,\n", - " 1152878, 1144863, 1150352, 1150356, 1155094, 1143129, 1143135, 1147442,\n", - " 1151821, 1152591, 1154183, 1148498, 1149737, 1141420, 1155164, 1147733,\n", - " 1147737, 1153449, 1145080, 1146969, 1146972, 1149356, 1149359, 1151935,\n", - " 1153249, 1153255, 1146616, 1146623, 1151402, 1152407, 1154063, 1151731,\n", - " 1156321, 1153032, 1153038, 1137746, 1152622, 1155145, 1155146, 1136410,\n", - " 1149203, 1151964, 1155337, 1155334, 1154120, 1154123, 1157833, 1152673,\n", - " 1151617, 1150578, 1148914, 1148916, 1152946, 1152950, 1152227, 1138991,\n", - " 1152903, 1152341, 1156823, 1156826, 1156816, 1146708, 1138275, 1157147,\n", - " 1136028, 1158704, 1150150, 1150164, 1148040, 1155231, 1144667, 1137048,\n", - " 1148628, 1158540, 1148380, 1137458, 1149947, 1154564, 1178126, 1153085,\n", - " 1142041, 1142047, 1143442, 1158863, 1158916, 1156505, 1155418, 1146851,\n", - " 1135231, 1135730, 1152183, 1156638, 1151788, 1157909, 1150828, 1156935,\n", - " 1158304, 1158306, 1158308, 1158311, 1151330, 1155441, 1155442, 1153359,\n", - " 1150129, 1150130, 1154529, 1154530, 1156913, 1142755, 1164631, 1151379,\n", - " 1137912, 1158629, 1155122, 1155755, 1155758, 1151424, 1135394, 1146924,\n", - " 1155628, 1155630, 1154555, 1158824, 1158325, 1157000, 1155646, 1155634,\n", - " 1158355, 1143254, 1143263, 1154240, 1154080, 1154902, 1143189, 1153322,\n", - " 1157439, 1150077, 1155613, 1141627, 1150987, 1155288, 1157289, 1137167,\n", - " 1137152, 1157653, 1157660, 1153776, 1153781, 1168145, 1134677, 1134685,\n", - " 1134682, 1135601, 1150661, 1155852, 1157684, 1146326, 1161116, 1140633,\n", - " 1144451, 1152220, 1152509, 1156695, 1140374, 1157026, 1142466, 1155975,\n", - " 1158846, 1155396, 1149700, 1154600, 1158760, 1158886, 1157304, 1159164,\n", - " 1158815, 1158274, 1151615, 1136480, 1164931, 1156665, 1147585, 1147599,\n", - " 1153808, 1156276, 1136640, 1136646, 1158558, 1153827, 1156514, 1146126,\n", - " 1138099, 1138110, 1155529, 1155528, 1161539, 1135661, 1142658, 1164148,\n", - " 1157747, 1162672, 1159042, 1159052, 1159061, 1158300, 1157944, 1153052,\n", - " 1153045, 1170855, 1156104, 1138396, 1138393, 1167184, 1150032, 1150046,\n", - " 1149063, 1149070, 1145945, 1153519, 1138161, 1156785, 1156789, 1149956,\n", - " 1149963, 1148021, 1156991, 1157357, 1146354, 1140643, 1148600, 1148607,\n", - " 1143143, 1163019, 1164497, 1156355, 1158643, 1158653, 1156187, 1159025,\n", - " 1159029, 1159032, 1143729, 1155588, 1156589, 1144989, 1167933, 1147401,\n", - " 1149014, 1146509, 1153239, 1144737, 1144747, 1152776, 1155048, 1165421,\n", - " 1153201, 1141471, 1156737, 1156739, 1156744, 1153663, 1171040, 1144812,\n", - " 1135567, 1156300, 1166917, 1148683, 1169282, 1146042, 1155320, 1147673,\n", - " 1138762, 1142136, 1143025, 1147680, 1147689, 1147694, 1145447, 1147355,\n", - " 1170502, 1139351, 1139345, 1147724, 1145902, 1153520, 1153534, 1171571,\n", - " 1152203, 1152206, 1170980, 1171277, 1154070, 1167326, 1163639, 1177922,\n", - " 1169298, 1155172, 1156119, 1144336, 1157534, 1154670, 1152998, 1166006,\n", - " 1157331, 1141043, 1154364, 1149684, 1158051, 1173047, 1153294, 1149846,\n", - " 1149847, 1172076, 1167383, 1172488, 1170279, 1149398, 1149402, 1148667,\n", - " 1148666, 1172838, 1172143, 1148324, 1173307, 1145025, 1189233, 1154018,\n", - " 1154027, 1157158, 1157153, 1167232, 1167238, 1147711, 1151850, 1149247,\n", - " 1170488, 1170490, 1135018, 1171798, 1155739, 1174417, 1162106, 1168697,\n", - " 1166746, 1168597, 1160977, 1160979, 1166028, 1178056, 1159099, 1159100,\n", - " 1171823, 1150234, 1161591, 1154151, 1154148, 1158176, 1149169, 1149174,\n", - " 1149173, 1143279, 1169769, 1165960, 1153803, 1172354, 1178467, 1180817,\n", - " 1172800, 1185145, 1183123, 1151519, 1179807, 1166551, 1161255, 1177576,\n", - " 1171623, 1178359, 1155799, 1157126, 1187529, 1192691, 1153898, 1154497,\n", - " 1191749, 1145626, 1156433, 1157483, 1161067, 1184996, 1180732, 1174403,\n", - " 1181354, 1153601, 1163045, 1158512, 1181952, 1186007, 1158940, 1186995,\n", - " 1155890, 1155892, 1155899, 1155889, 1155895, 1186099, 1168886, 1168890,\n", - " 1166107, 1163422, 1181469, 1161819, 1183831, 1183008, 1156539, 1139831,\n", - " 1150265, 1154812, 1156055, 1191726, 1149536, 1182891, 1192167, 1178523,\n", - " 1181946, 1192195, 1193246, 1159169, 1152112, 1189521, 1162503, 1169707,\n", - " 1177285, 1172423, 1172424, 1172122, 1166789, 1179749, 1155956, 1155959,\n", - " 1155962, 1180276, 1179769, 1185356, 1189667, 1190908, 1182852, 1157008],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196011, 1199424, 1199439, 1197719, 1198459, 1202243, 1202255, 1198840,\n", - " 1198844, 1201577, 1201581, 1194626, 1196956, 1194866, 1194743, 1194745,\n", - " 1195726, 1196631, 1194655, 1194642, 1195514, 1195263, 1199135, 1201992,\n", - " 1196031, 1198542, 1198543, 1201431, 1201427, 1194956, 1194952, 1195888,\n", - " 1195740, 1198097, 1194754, 1198668, 1199109, 1198958, 1198163, 1198167,\n", - " 1196711, 1195270, 1195278, 1197139, 1197141, 1197140, 1200765, 1196247,\n", - " 1197265, 1196109, 1194830, 1195842, 1198915, 1195541, 1197476, 1196122,\n", - " 1196128, 1194928, 1199685, 1200872, 1199152, 1198404, 1199231, 1198329,\n", - " 1201511, 1196508, 1199018, 1196727, 1196734, 1195773, 1198428, 1198811,\n", - " 1199083, 1200779, 1200570, 1200503, 1201421, 1200991, 1199723, 1201043,\n", - " 1200363, 1201737, 1200546, 1200553, 1200555, 1203071, 1200430, 1199208,\n", - " 1197100, 1201757, 1202138, 1196779, 1202239, 1200899, 1202170, 1195878,\n", - " 1200176, 1201291, 1196761, 1202209, 1200784, 1198518, 1195672, 1195679,\n", - " 1200439, 1200276, 1198911, 1195285, 1200590, 1203102, 1198824, 1199395,\n", - " 1196786, 1200437, 1202690, 1201001, 1198131, 1200302, 1200710, 1195165,\n", - " 1197872], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196011, 1199424, 1199439, 1197719, 1198459, 1202243, 1202255, 1198840,\n", - " 1198844, 1201577, 1201581, 1194626, 1196956, 1194866, 1194743, 1194745,\n", - " 1195726, 1196631, 1194655, 1194642, 1195514, 1195263, 1199135, 1201992,\n", - " 1196031, 1198542, 1198543, 1201431, 1201427, 1194956, 1194952, 1195888,\n", - " 1195740, 1198097, 1194754, 1198668, 1199109, 1198958, 1198163, 1198167,\n", - " 1196711, 1195270, 1195278, 1197139, 1197141, 1197140, 1200765, 1196247,\n", - " 1197265, 1196109, 1194830, 1195842, 1198915, 1195541, 1197476, 1196122,\n", - " 1196128, 1194928, 1199685, 1200872, 1199152, 1198404, 1199231, 1198329,\n", - " 1201511, 1196508, 1199018, 1196727, 1196734, 1195773, 1198428, 1198811,\n", - " 1199083, 1200779, 1200570, 1200503, 1201421, 1200991, 1199723, 1201043,\n", - " 1200363, 1201737, 1200546, 1200553, 1200555, 1203071, 1200430, 1199208,\n", - " 1197100, 1201757, 1202138, 1196779, 1202239, 1200899, 1202170, 1195878,\n", - " 1200176, 1201291, 1196761, 1202209, 1200784, 1198518, 1195672, 1195679,\n", - " 1200439, 1200276, 1198911, 1195285, 1200590, 1203102, 1198824, 1199395,\n", - " 1196786, 1200437, 1202690, 1201001, 1198131, 1200302, 1200710, 1195165,\n", - " 1197872], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 5.1992e-02, -4.3465e-04, 4.2451e-01, ..., 7.7193e-02,\n", - " -1.3491e-03, -3.1488e-03],\n", - " [ 5.4810e-02, -4.1705e-04, 3.5623e-01, ..., 9.8565e-02,\n", - " -1.4694e-03, -2.8250e-03],\n", - " [ 7.8316e-02, 3.3431e-02, 3.8726e-01, ..., 5.6384e-02,\n", - " -9.2579e-04, -3.2133e-03],\n", - " ...,\n", - " [ 1.6332e-02, -2.4656e-04, 3.6560e-01, ..., 5.6286e-02,\n", - " -1.1152e-03, -2.5627e-03],\n", - " [ 5.1992e-02, -4.3465e-04, 4.2451e-01, ..., 7.7193e-02,\n", - " -1.3491e-03, -3.1488e-03],\n", - " [ 6.4692e-02, -4.0498e-04, 2.8418e-01, ..., 5.2420e-02,\n", - " -1.1165e-03, -2.6077e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 1.6635e+00, -2.6259e-02, 6.4218e-01, ..., -8.3131e-03,\n", - " -2.5819e-02, 2.8293e+00],\n", - " [ 9.6518e-01, -1.9156e-02, -6.5899e-04, ..., -9.0506e-03,\n", - " -1.5645e-02, 1.3231e+00],\n", - " [ 1.0109e+00, -2.1872e-02, 1.1132e-01, ..., -8.9635e-03,\n", - " -1.5363e-02, 1.2731e+00],\n", - " ...,\n", - " [ 1.6749e+00, -2.0999e-02, 2.6114e-01, ..., -6.7426e-03,\n", - " -2.2453e-02, 2.5585e+00],\n", - " [ 1.0790e+00, -2.0094e-02, -2.5618e-03, ..., -1.0270e-02,\n", - " -1.5083e-02, 1.3267e+00],\n", - " [ 1.7654e+00, -2.7284e-02, 5.4501e-01, ..., -7.0840e-03,\n", - " -2.6571e-02, 3.0444e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[ 1.0260e-01, 8.7138e-02, 1.5722e-01, ..., 6.3163e-01,\n", - " -8.9118e-04, 1.2361e-01],\n", - " [ 2.2610e-01, -2.1483e-03, 5.6139e-02, ..., 6.5570e-01,\n", - " 2.1593e-01, 2.8637e-01],\n", - " [ 2.5104e-01, -2.1603e-03, 1.6324e-02, ..., 6.6822e-01,\n", - " 1.4365e-01, 2.8322e-01],\n", - " ...,\n", - " [ 1.2852e-01, -5.6280e-04, 1.5346e-01, ..., 5.6720e-01,\n", - " 1.2429e-01, 2.0867e-01],\n", - " [ 1.6941e-01, -1.6750e-03, 2.7314e-02, ..., 6.5562e-01,\n", - " 1.2153e-01, 2.5389e-01],\n", - " [ 5.9613e-02, -1.6822e-04, 6.4506e-03, ..., 4.9856e-01,\n", - " -2.1998e-04, 1.0285e-01]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-2.5385e-03, 7.1286e-02, 1.7819e-01, ..., -2.5200e-03,\n", - " -1.0245e-03, -2.5253e-03],\n", - " [-1.8792e-03, -7.6287e-05, 1.3996e-01, ..., -2.2510e-03,\n", - " -1.1344e-03, -2.6145e-03],\n", - " [-2.0532e-03, 9.4183e-02, 1.1071e-01, ..., -3.2795e-03,\n", - " -2.5767e-04, -1.7977e-03],\n", - " ...,\n", - " [-2.3726e-03, 1.3396e-01, 1.9929e-01, ..., -2.5884e-03,\n", - " -2.4023e-04, -3.0172e-03],\n", - " [-9.8958e-04, 1.5667e-01, 2.4098e-01, ..., -1.6729e-03,\n", - " -7.8339e-04, -1.1919e-03],\n", - " [-9.2941e-04, 5.3158e-02, 8.7636e-02, ..., -3.5287e-03,\n", - " -1.5912e-03, -2.5052e-03]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 94, 4, 151, 69, 4, 4, 167, 167, 531, 261, 559, 250,\n", - " 404, 553, 388, 706, 891, 891, 783, 504, 655, 1123, 673, 673,\n", - " 589, 1108, 1180, 1224, 852, 1022, 833, 833, 833, 1229, 1470, 1417,\n", - " 1691, 1584, 1584, 1584, 1654, 1651, 1737, 1682, 1676, 1676, 1693, 2012,\n", - " 1979, 1794, 1837, 1849, 2167, 2170, 1954, 1959, 2064, 2094, 2133, 1989,\n", - " 1989, 2133, 2081, 2081, 2123, 2123, 2144, 2240, 2315, 2460, 2278, 2297,\n", - " 2385, 2433, 2318, 2464, 2374, 2374, 2480, 2480, 2357, 2357, 2480, 2562,\n", - " 2647, 2638, 2664, 2611, 2805, 2800, 3090, 3034, 3202, 3299, 3397, 3331,\n", - " 3388, 3369, 3370, 3403, 3482, 3378, 3453, 3421, 3533, 3754, 3509, 3770,\n", - " 3770, 3770, 3663, 3663, 3953, 3795, 3941, 3691, 3943, 3943, 3860, 4079,\n", - " 4049, 4049, 3825, 3825, 4085, 4169, 4215, 4169, 4236, 4238, 4328, 4367,\n", - " 4439, 4383, 4441, 4537, 4785, 4549, 4549, 4802, 4899, 4899, 4899, 4688,\n", - " 4688, 4688, 4816, 4718, 4961, 4808, 4846, 4861, 5014, 4970, 5078, 5173,\n", - " 5110, 5161, 4995, 5135, 5135, 5562, 5506, 5491, 5491, 5585, 5427, 5532,\n", - " 5427, 5427, 5585, 5645, 5572, 5572, 5828, 5828, 5782, 5782, 5700, 5691,\n", - " 5778, 5778, 6159, 5829, 6228, 6228, 6228, 6056, 6025, 6025, 6061, 5974,\n", - " 5974, 6149, 6165, 6121, 6121, 6121],\n", - " [ 82, 84, 9, 33, 38, 57, 96, 33, 105, 31, 79, 59,\n", - " 67, 93, 102, 93, 110, 67, 17, 7, 63, 79, 93, 67,\n", - " 88, 104, 87, 43, 89, 15, 41, 22, 73, 53, 48, 34,\n", - " 14, 81, 66, 61, 102, 55, 1, 98, 65, 93, 79, 64,\n", - " 80, 67, 24, 6, 40, 63, 93, 9, 53, 67, 111, 56,\n", - " 45, 55, 57, 83, 40, 39, 20, 58, 29, 12, 1, 40,\n", - " 11, 51, 107, 62, 106, 23, 108, 100, 50, 90, 9, 119,\n", - " 79, 11, 77, 46, 120, 92, 67, 46, 54, 101, 102, 71,\n", - " 114, 21, 79, 19, 110, 115, 99, 103, 76, 77, 48, 55,\n", - " 3, 111, 42, 20, 25, 72, 110, 10, 85, 116, 49, 8,\n", - " 115, 42, 67, 109, 65, 55, 79, 3, 102, 114, 4, 118,\n", - " 62, 116, 67, 78, 31, 8, 31, 63, 86, 21, 95, 61,\n", - " 70, 64, 2, 117, 36, 28, 1, 112, 30, 114, 74, 91,\n", - " 18, 75, 44, 115, 42, 27, 32, 67, 120, 37, 5, 31,\n", - " 113, 22, 67, 67, 32, 67, 67, 13, 67, 70, 97, 47,\n", - " 16, 67, 70, 35, 0, 20, 103, 94, 69, 67, 103, 26,\n", - " 67, 119, 68, 6, 60, 52]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 857, 175, 600, ..., 3823, 5839, 6506],\n", - " [ 206, 74, 80, ..., 6975, 6976, 6992]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 53, 99, 88, ..., 9, 120, 116],\n", - " [ 76, 211, 181, ..., 6009, 6176, 6225]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 80, 80, 80, ..., 6905, 6905, 6905],\n", - " [ 267, 338, 382, ..., 267, 289, 712]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 178, 754, 122, ..., 259, 710, 710],\n", - " [ 20, 202, 24, ..., 7006, 6889, 6974]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1756, 6042, 6506, ..., 5871, 2414, 3991],\n", - " [ 102, 6, 40, ..., 6157, 6232, 6170]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 80, 80, 80, ..., 6954, 6954, 6905],\n", - " [ 600, 1125, 1389, ..., 2074, 3312, 6127]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 4, 4, 4, ..., 6165, 6165, 6165],\n", - " [3909, 4085, 4067, ..., 6414, 3959, 6973]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005414\n", - "sampling 0.005258\n", - "noi time: 0.001433\n", - "get_vertex_data call: 0.022755\n", - "noi group time: 0.002472\n", - "eoi_group_time: 0.014509\n", - "second half: 0.196987\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 24187, 32616, ..., 1110069, 1119043, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 24187, 32616, ..., 1110069, 1119043, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1209336, 1203800, 1205169, ..., 1921021, 1926878, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1209336, 1203800, 1205169, ..., 1921021, 1926878, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1140284, 1140285, 1135926, 1138553, 1135160, 1135716, 1140799,\n", - " 1141758, 1138335, 1136208, 1136215, 1141251, 1140290, 1140297, 1142800,\n", - " 1139462, 1136971, 1151164, 1149831, 1149834, 1139811, 1145366, 1146982,\n", - " 1137947, 1145992, 1145999, 1137274, 1138933, 1143372, 1143363, 1139615,\n", - " 1140781, 1150507, 1150509, 1142968, 1149216, 1142958, 1155683, 1149634,\n", - " 1141876, 1141882, 1135992, 1135989, 1149283, 1142892, 1153940, 1144636,\n", - " 1134697, 1148337, 1148343, 1146660, 1135476, 1152666, 1152664, 1148546,\n", - " 1153220, 1153231, 1137220, 1150555, 1155019, 1150329, 1138739, 1134657,\n", - " 1137171, 1137172, 1137169, 1149461, 1140147, 1134720, 1140027, 1140952,\n", - " 1135367, 1135202, 1135210, 1140753, 1154739, 1134960, 1134794, 1135956,\n", - " 1138504, 1143064, 1137693, 1136610, 1144786, 1136826, 1137529, 1137534,\n", - " 1135408, 1157395, 1137441, 1136204, 1148483, 1141702, 1135576, 1135583,\n", - " 1142593, 1135833, 1155079, 1140240, 1138514, 1138524, 1153098, 1153099,\n", - " 1137957, 1158136, 1156902, 1139684, 1138316, 1137287, 1157706, 1138440,\n", - " 1138461, 1138449, 1137495, 1154792, 1136594, 1149328, 1138846, 1138882,\n", - " 1156603, 1156606, 1142611, 1160819, 1135359, 1135355, 1156141, 1138185,\n", - " 1145843, 1148531, 1148533, 1135769, 1139667, 1139673, 1138070, 1138079,\n", - " 1138069, 1142254, 1134782, 1142445, 1135782, 1136729, 1140199, 1158974,\n", - " 1139314, 1142900, 1159009, 1159019, 1153543, 1143631, 1139084, 1139933,\n", - " 1138648, 1138148, 1138150, 1137125, 1141963, 1140550, 1140558, 1152044,\n", - " 1140670, 1137734, 1137728, 1134922, 1134750, 1135549, 1136697, 1141088,\n", - " 1141098, 1144138, 1139889, 1141980, 1143767, 1154852, 1154855, 1143225,\n", - " 1139039, 1139033, 1159676, 1149982, 1146844, 1152719, 1141681, 1154466,\n", - " 1136625, 1136637, 1161175, 1141224, 1141901, 1139386, 1159794, 1143667,\n", - " 1145057, 1145071, 1144237, 1139495, 1144934, 1141609, 1147844, 1147854,\n", - " 1137074, 1148067, 1139798, 1144428, 1144420, 1141821, 1143153, 1146799,\n", - " 1142093, 1158749, 1138469, 1143580, 1139190, 1142913, 1137661, 1138423,\n", - " 1144596, 1148256, 1136871, 1136864, 1145298, 1140885, 1141397, 1141401,\n", - " 1140442, 1144182, 1137614, 1150906, 1146194, 1146201, 1146203, 1137367,\n", - " 1137374, 1136565, 1158699, 1147153, 1136381, 1151114, 1138293, 1141337,\n", - " 1139508, 1139510, 1139127, 1145001, 1145213, 1140977, 1140990, 1147050,\n", - " 1145873, 1149876, 1152976, 1139453, 1139455, 1141925, 1144242, 1140580,\n", - " 1140585, 1137149, 1150243, 1150696, 1137571, 1141382, 1145980, 1145974,\n", - " 1143851, 1146024, 1150603, 1146140, 1154323, 1142533, 1149928, 1139990,\n", - " 1146302, 1143293, 1143294, 1151124, 1147543, 1147549, 1147540, 1148763,\n", - " 1147282, 1142821, 1142816, 1143716, 1136330, 1149152, 1142630, 1142637,\n", - " 1139417, 1139418, 1143051, 1143040, 1136167, 1138923, 1157720, 1136836,\n", - " 1138233, 1144957, 1142158, 1145429, 1143345, 1144765, 1144766, 1144611,\n", - " 1144619, 1140844, 1144086, 1139979, 1135876, 1150294, 1146514, 1146523,\n", - " 1143960, 1138024, 1143460, 1143457, 1143007, 1137703, 1144291, 1144303,\n", - " 1143937, 1143949, 1147520, 1140364, 1137994, 1143080, 1166410, 1148962,\n", - " 1144219, 1147984, 1147988, 1147996, 1147999, 1146957, 1146949, 1134902,\n", - " 1144013, 1147130, 1145456, 1148704, 1143301, 1142700, 1141825, 1141827,\n", - " 1141836, 1148468, 1148476, 1153709, 1152335, 1147025, 1147257, 1147249,\n", - " 1141128, 1141131, 1158226, 1165540, 1154526, 1151646, 1145240, 1145751,\n", - " 1142369, 1146178, 1151239, 1151242, 1148223, 1152530, 1150445, 1149250,\n", - " 1148831, 1154998, 1149791, 1144514, 1144526, 1150342, 1150350, 1154826,\n", - " 1165253, 1147794, 1151472, 1151480, 1152022, 1152026, 1154263, 1146723,\n", - " 1146731, 1140572, 1148693, 1150127, 1148273, 1147019, 1147021, 1147009,\n", - " 1141949, 1141267, 1148744, 1148454, 1147653, 1143559, 1168504, 1149412,\n", - " 1146412, 1135076, 1135085, 1135087, 1148612, 1151412, 1154420, 1158786,\n", - " 1148180, 1148188, 1136251, 1136247, 1139721, 1146676, 1152482, 1152484,\n", - " 1138867, 1157983, 1148725, 1145862, 1148204, 1154203, 1153188, 1153197,\n", - " 1159837, 1152974, 1150935, 1152878, 1144853, 1144859, 1144863, 1144851,\n", - " 1146237, 1169431, 1147442, 1151811, 1152580, 1152581, 1135307, 1151906,\n", - " 1154183, 1148498, 1146565, 1141417, 1141420, 1141419, 1150636, 1145079,\n", - " 1146265, 1146969, 1146974, 1156413, 1147381, 1146623, 1144476, 1152409,\n", - " 1152415, 1154063, 1146276, 1150085, 1150090, 1150093, 1137746, 1146307,\n", - " 1146304, 1152608, 1152622, 1140521, 1140527, 1151967, 1154123, 1157826,\n", - " 1152673, 1154638, 1151580, 1151617, 1150578, 1150588, 1152169, 1152903,\n", - " 1143988, 1152341, 1146816, 1153311, 1146708, 1145576, 1138275, 1138283,\n", - " 1138281, 1136023, 1136028, 1151195, 1151064, 1143477, 1143484, 1143483,\n", - " 1156422, 1153909, 1150159, 1150164, 1144016, 1148040, 1155202, 1152597,\n", - " 1155222, 1149792, 1149794, 1158477, 1148628, 1148637, 1158530, 1158540,\n", - " 1169177, 1148370, 1137458, 1153863, 1154564, 1135707, 1155376, 1142041,\n", - " 1157229, 1135430, 1135434, 1158862, 1148884, 1156504, 1156505, 1157064,\n", - " 1157069, 1152833, 1145191, 1145196, 1143502, 1151257, 1151262, 1135222,\n", - " 1152737, 1150824, 1150817, 1135645, 1135634, 1147810, 1151469, 1139525,\n", - " 1158306, 1158308, 1151271, 1155441, 1153359, 1150130, 1150132, 1138569,\n", - " 1138966, 1150488, 1157637, 1151379, 1158639, 1155375, 1156649, 1155122,\n", - " 1152527, 1157183, 1155755, 1155747, 1151430, 1151424, 1146924, 1145806,\n", - " 1156460, 1156463, 1154763, 1155628, 1156563, 1154555, 1155572, 1158561,\n", - " 1158824, 1153715, 1158325, 1148835, 1155639, 1155646, 1153367, 1143263,\n", - " 1154650, 1162396, 1151317, 1179427, 1143189, 1143524, 1160904, 1150371,\n", - " 1153322, 1153320, 1157439, 1144707, 1150990, 1157928, 1158578, 1159001,\n", - " 1153776, 1153786, 1158192, 1158204, 1137381, 1137389, 1137390, 1137380,\n", - " 1159116, 1138258, 1145693, 1145694, 1145681, 1164307, 1154014, 1134677,\n", - " 1134683, 1164165, 1135601, 1150671, 1155848, 1155852, 1158665, 1138215,\n", - " 1149145, 1140633, 1140632, 1152215, 1152223, 1167309, 1152498, 1156692,\n", - " 1155971, 1155975, 1158840, 1158846, 1156804, 1161892, 1149700, 1159790,\n", - " 1154592, 1153490, 1136909, 1136896, 1158753, 1158760, 1158882, 1140215,\n", - " 1158815, 1158447, 1158285, 1151615, 1136494, 1152139, 1153808, 1134757,\n", - " 1140049, 1166424, 1158545, 1158558, 1158547, 1153827, 1165497, 1163814,\n", - " 1146126, 1138110, 1155521, 1142658, 1159295, 1162685, 1144270, 1159057,\n", - " 1163274, 1142427, 1157939, 1157946, 1162044, 1153052, 1153042, 1153045,\n", - " 1159738, 1153842, 1138396, 1138393, 1150046, 1150041, 1149063, 1149070,\n", - " 1145948, 1154294, 1153514, 1153519, 1147300, 1156252, 1146876, 1157607,\n", - " 1138161, 1156787, 1156795, 1160758, 1163331, 1165772, 1166073, 1148771,\n", - " 1159768, 1146054, 1146063, 1159556, 1163455, 1162308, 1164055, 1158878,\n", - " 1140643, 1141862, 1148600, 1148603, 1148607, 1143143, 1144509, 1151872,\n", - " 1156363, 1158653, 1156177, 1156187, 1159025, 1159029, 1159032, 1159038,\n", - " 1165604, 1168096, 1152244, 1152245, 1160600, 1155588, 1164600, 1151225,\n", - " 1138674, 1148560, 1168515, 1144982, 1146509, 1153236, 1153239, 1144739,\n", - " 1144747, 1152776, 1162580, 1153212, 1153201, 1141471, 1141459, 1147427,\n", - " 1156739, 1160849, 1167372, 1150648, 1144810, 1144812, 1167249, 1140112,\n", - " 1168860, 1165718, 1165721, 1164741, 1142722, 1156300, 1167334, 1167777,\n", - " 1145743, 1145738, 1145914, 1148683, 1145228, 1160231, 1154695, 1154700,\n", - " 1144973, 1167050, 1148175, 1143037, 1166053, 1147694, 1145445, 1147355,\n", - " 1152624, 1152630, 1148124, 1139345, 1145902, 1170386, 1171222, 1158734,\n", - " 1171279, 1154070, 1154076, 1147341, 1145674, 1170675, 1145489, 1144681,\n", - " 1169304, 1145326, 1155180, 1165023, 1150515, 1150526, 1167915, 1144346,\n", - " 1144336, 1157534, 1147746, 1147750, 1154670, 1135841, 1169162, 1157331,\n", - " 1138129, 1141045, 1141051, 1151664, 1149452, 1149446, 1158623, 1158060,\n", - " 1163292, 1157384, 1160035, 1154869, 1152353, 1143178, 1149402, 1177995,\n", - " 1165352, 1173307, 1169148, 1169144, 1154018, 1154027, 1152150, 1152151,\n", - " 1152152, 1159658, 1159655, 1167857, 1151696, 1157153, 1157371, 1157373,\n", - " 1147711, 1151850, 1151845, 1148131, 1157592, 1135021, 1171288, 1155739,\n", - " 1162106, 1178411, 1166742, 1140326, 1159100, 1170874, 1150234, 1183583,\n", - " 1154148, 1149169, 1149173, 1159751, 1143271, 1179243, 1178346, 1153801,\n", - " 1153803, 1153137, 1171122, 1179727, 1172309, 1180915, 1171407, 1179385,\n", - " 1158031, 1161255, 1161262, 1155262, 1177580, 1154718, 1157792, 1157795,\n", - " 1171623, 1155804, 1157126, 1176761, 1158249, 1153898, 1153891, 1171435,\n", - " 1161846, 1164563, 1145626, 1180383, 1149744, 1149750, 1146252, 1153609,\n", - " 1182702, 1158512, 1181186, 1185087, 1158371, 1185788, 1155892, 1155899,\n", - " 1181973, 1185068, 1140393, 1168282, 1163327, 1164231, 1158174, 1154944,\n", - " 1154952, 1154957, 1180019, 1147172, 1147182, 1182152, 1170421, 1191540,\n", - " 1139828, 1139831, 1139837, 1154812, 1164927, 1151288, 1156055, 1170000,\n", - " 1146392, 1146394, 1146399, 1194454, 1183768, 1193093, 1192397, 1184877,\n", - " 1169707, 1189012, 1172414, 1172423, 1172122, 1182286, 1158064, 1145395,\n", - " 1178136, 1152090, 1178662, 1155962, 1155960, 1187514, 1188280, 1192792,\n", - " 1193324, 1182855, 1186149, 1157022, 1161940, 1185739], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1140284, 1140285, 1135926, 1138553, 1135160, 1135716, 1140799,\n", - " 1141758, 1138335, 1136208, 1136215, 1141251, 1140290, 1140297, 1142800,\n", - " 1139462, 1136971, 1151164, 1149831, 1149834, 1139811, 1145366, 1146982,\n", - " 1137947, 1145992, 1145999, 1137274, 1138933, 1143372, 1143363, 1139615,\n", - " 1140781, 1150507, 1150509, 1142968, 1149216, 1142958, 1155683, 1149634,\n", - " 1141876, 1141882, 1135992, 1135989, 1149283, 1142892, 1153940, 1144636,\n", - " 1134697, 1148337, 1148343, 1146660, 1135476, 1152666, 1152664, 1148546,\n", - " 1153220, 1153231, 1137220, 1150555, 1155019, 1150329, 1138739, 1134657,\n", - " 1137171, 1137172, 1137169, 1149461, 1140147, 1134720, 1140027, 1140952,\n", - " 1135367, 1135202, 1135210, 1140753, 1154739, 1134960, 1134794, 1135956,\n", - " 1138504, 1143064, 1137693, 1136610, 1144786, 1136826, 1137529, 1137534,\n", - " 1135408, 1157395, 1137441, 1136204, 1148483, 1141702, 1135576, 1135583,\n", - " 1142593, 1135833, 1155079, 1140240, 1138514, 1138524, 1153098, 1153099,\n", - " 1137957, 1158136, 1156902, 1139684, 1138316, 1137287, 1157706, 1138440,\n", - " 1138461, 1138449, 1137495, 1154792, 1136594, 1149328, 1138846, 1138882,\n", - " 1156603, 1156606, 1142611, 1160819, 1135359, 1135355, 1156141, 1138185,\n", - " 1145843, 1148531, 1148533, 1135769, 1139667, 1139673, 1138070, 1138079,\n", - " 1138069, 1142254, 1134782, 1142445, 1135782, 1136729, 1140199, 1158974,\n", - " 1139314, 1142900, 1159009, 1159019, 1153543, 1143631, 1139084, 1139933,\n", - " 1138648, 1138148, 1138150, 1137125, 1141963, 1140550, 1140558, 1152044,\n", - " 1140670, 1137734, 1137728, 1134922, 1134750, 1135549, 1136697, 1141088,\n", - " 1141098, 1144138, 1139889, 1141980, 1143767, 1154852, 1154855, 1143225,\n", - " 1139039, 1139033, 1159676, 1149982, 1146844, 1152719, 1141681, 1154466,\n", - " 1136625, 1136637, 1161175, 1141224, 1141901, 1139386, 1159794, 1143667,\n", - " 1145057, 1145071, 1144237, 1139495, 1144934, 1141609, 1147844, 1147854,\n", - " 1137074, 1148067, 1139798, 1144428, 1144420, 1141821, 1143153, 1146799,\n", - " 1142093, 1158749, 1138469, 1143580, 1139190, 1142913, 1137661, 1138423,\n", - " 1144596, 1148256, 1136871, 1136864, 1145298, 1140885, 1141397, 1141401,\n", - " 1140442, 1144182, 1137614, 1150906, 1146194, 1146201, 1146203, 1137367,\n", - " 1137374, 1136565, 1158699, 1147153, 1136381, 1151114, 1138293, 1141337,\n", - " 1139508, 1139510, 1139127, 1145001, 1145213, 1140977, 1140990, 1147050,\n", - " 1145873, 1149876, 1152976, 1139453, 1139455, 1141925, 1144242, 1140580,\n", - " 1140585, 1137149, 1150243, 1150696, 1137571, 1141382, 1145980, 1145974,\n", - " 1143851, 1146024, 1150603, 1146140, 1154323, 1142533, 1149928, 1139990,\n", - " 1146302, 1143293, 1143294, 1151124, 1147543, 1147549, 1147540, 1148763,\n", - " 1147282, 1142821, 1142816, 1143716, 1136330, 1149152, 1142630, 1142637,\n", - " 1139417, 1139418, 1143051, 1143040, 1136167, 1138923, 1157720, 1136836,\n", - " 1138233, 1144957, 1142158, 1145429, 1143345, 1144765, 1144766, 1144611,\n", - " 1144619, 1140844, 1144086, 1139979, 1135876, 1150294, 1146514, 1146523,\n", - " 1143960, 1138024, 1143460, 1143457, 1143007, 1137703, 1144291, 1144303,\n", - " 1143937, 1143949, 1147520, 1140364, 1137994, 1143080, 1166410, 1148962,\n", - " 1144219, 1147984, 1147988, 1147996, 1147999, 1146957, 1146949, 1134902,\n", - " 1144013, 1147130, 1145456, 1148704, 1143301, 1142700, 1141825, 1141827,\n", - " 1141836, 1148468, 1148476, 1153709, 1152335, 1147025, 1147257, 1147249,\n", - " 1141128, 1141131, 1158226, 1165540, 1154526, 1151646, 1145240, 1145751,\n", - " 1142369, 1146178, 1151239, 1151242, 1148223, 1152530, 1150445, 1149250,\n", - " 1148831, 1154998, 1149791, 1144514, 1144526, 1150342, 1150350, 1154826,\n", - " 1165253, 1147794, 1151472, 1151480, 1152022, 1152026, 1154263, 1146723,\n", - " 1146731, 1140572, 1148693, 1150127, 1148273, 1147019, 1147021, 1147009,\n", - " 1141949, 1141267, 1148744, 1148454, 1147653, 1143559, 1168504, 1149412,\n", - " 1146412, 1135076, 1135085, 1135087, 1148612, 1151412, 1154420, 1158786,\n", - " 1148180, 1148188, 1136251, 1136247, 1139721, 1146676, 1152482, 1152484,\n", - " 1138867, 1157983, 1148725, 1145862, 1148204, 1154203, 1153188, 1153197,\n", - " 1159837, 1152974, 1150935, 1152878, 1144853, 1144859, 1144863, 1144851,\n", - " 1146237, 1169431, 1147442, 1151811, 1152580, 1152581, 1135307, 1151906,\n", - " 1154183, 1148498, 1146565, 1141417, 1141420, 1141419, 1150636, 1145079,\n", - " 1146265, 1146969, 1146974, 1156413, 1147381, 1146623, 1144476, 1152409,\n", - " 1152415, 1154063, 1146276, 1150085, 1150090, 1150093, 1137746, 1146307,\n", - " 1146304, 1152608, 1152622, 1140521, 1140527, 1151967, 1154123, 1157826,\n", - " 1152673, 1154638, 1151580, 1151617, 1150578, 1150588, 1152169, 1152903,\n", - " 1143988, 1152341, 1146816, 1153311, 1146708, 1145576, 1138275, 1138283,\n", - " 1138281, 1136023, 1136028, 1151195, 1151064, 1143477, 1143484, 1143483,\n", - " 1156422, 1153909, 1150159, 1150164, 1144016, 1148040, 1155202, 1152597,\n", - " 1155222, 1149792, 1149794, 1158477, 1148628, 1148637, 1158530, 1158540,\n", - " 1169177, 1148370, 1137458, 1153863, 1154564, 1135707, 1155376, 1142041,\n", - " 1157229, 1135430, 1135434, 1158862, 1148884, 1156504, 1156505, 1157064,\n", - " 1157069, 1152833, 1145191, 1145196, 1143502, 1151257, 1151262, 1135222,\n", - " 1152737, 1150824, 1150817, 1135645, 1135634, 1147810, 1151469, 1139525,\n", - " 1158306, 1158308, 1151271, 1155441, 1153359, 1150130, 1150132, 1138569,\n", - " 1138966, 1150488, 1157637, 1151379, 1158639, 1155375, 1156649, 1155122,\n", - " 1152527, 1157183, 1155755, 1155747, 1151430, 1151424, 1146924, 1145806,\n", - " 1156460, 1156463, 1154763, 1155628, 1156563, 1154555, 1155572, 1158561,\n", - " 1158824, 1153715, 1158325, 1148835, 1155639, 1155646, 1153367, 1143263,\n", - " 1154650, 1162396, 1151317, 1179427, 1143189, 1143524, 1160904, 1150371,\n", - " 1153322, 1153320, 1157439, 1144707, 1150990, 1157928, 1158578, 1159001,\n", - " 1153776, 1153786, 1158192, 1158204, 1137381, 1137389, 1137390, 1137380,\n", - " 1159116, 1138258, 1145693, 1145694, 1145681, 1164307, 1154014, 1134677,\n", - " 1134683, 1164165, 1135601, 1150671, 1155848, 1155852, 1158665, 1138215,\n", - " 1149145, 1140633, 1140632, 1152215, 1152223, 1167309, 1152498, 1156692,\n", - " 1155971, 1155975, 1158840, 1158846, 1156804, 1161892, 1149700, 1159790,\n", - " 1154592, 1153490, 1136909, 1136896, 1158753, 1158760, 1158882, 1140215,\n", - " 1158815, 1158447, 1158285, 1151615, 1136494, 1152139, 1153808, 1134757,\n", - " 1140049, 1166424, 1158545, 1158558, 1158547, 1153827, 1165497, 1163814,\n", - " 1146126, 1138110, 1155521, 1142658, 1159295, 1162685, 1144270, 1159057,\n", - " 1163274, 1142427, 1157939, 1157946, 1162044, 1153052, 1153042, 1153045,\n", - " 1159738, 1153842, 1138396, 1138393, 1150046, 1150041, 1149063, 1149070,\n", - " 1145948, 1154294, 1153514, 1153519, 1147300, 1156252, 1146876, 1157607,\n", - " 1138161, 1156787, 1156795, 1160758, 1163331, 1165772, 1166073, 1148771,\n", - " 1159768, 1146054, 1146063, 1159556, 1163455, 1162308, 1164055, 1158878,\n", - " 1140643, 1141862, 1148600, 1148603, 1148607, 1143143, 1144509, 1151872,\n", - " 1156363, 1158653, 1156177, 1156187, 1159025, 1159029, 1159032, 1159038,\n", - " 1165604, 1168096, 1152244, 1152245, 1160600, 1155588, 1164600, 1151225,\n", - " 1138674, 1148560, 1168515, 1144982, 1146509, 1153236, 1153239, 1144739,\n", - " 1144747, 1152776, 1162580, 1153212, 1153201, 1141471, 1141459, 1147427,\n", - " 1156739, 1160849, 1167372, 1150648, 1144810, 1144812, 1167249, 1140112,\n", - " 1168860, 1165718, 1165721, 1164741, 1142722, 1156300, 1167334, 1167777,\n", - " 1145743, 1145738, 1145914, 1148683, 1145228, 1160231, 1154695, 1154700,\n", - " 1144973, 1167050, 1148175, 1143037, 1166053, 1147694, 1145445, 1147355,\n", - " 1152624, 1152630, 1148124, 1139345, 1145902, 1170386, 1171222, 1158734,\n", - " 1171279, 1154070, 1154076, 1147341, 1145674, 1170675, 1145489, 1144681,\n", - " 1169304, 1145326, 1155180, 1165023, 1150515, 1150526, 1167915, 1144346,\n", - " 1144336, 1157534, 1147746, 1147750, 1154670, 1135841, 1169162, 1157331,\n", - " 1138129, 1141045, 1141051, 1151664, 1149452, 1149446, 1158623, 1158060,\n", - " 1163292, 1157384, 1160035, 1154869, 1152353, 1143178, 1149402, 1177995,\n", - " 1165352, 1173307, 1169148, 1169144, 1154018, 1154027, 1152150, 1152151,\n", - " 1152152, 1159658, 1159655, 1167857, 1151696, 1157153, 1157371, 1157373,\n", - " 1147711, 1151850, 1151845, 1148131, 1157592, 1135021, 1171288, 1155739,\n", - " 1162106, 1178411, 1166742, 1140326, 1159100, 1170874, 1150234, 1183583,\n", - " 1154148, 1149169, 1149173, 1159751, 1143271, 1179243, 1178346, 1153801,\n", - " 1153803, 1153137, 1171122, 1179727, 1172309, 1180915, 1171407, 1179385,\n", - " 1158031, 1161255, 1161262, 1155262, 1177580, 1154718, 1157792, 1157795,\n", - " 1171623, 1155804, 1157126, 1176761, 1158249, 1153898, 1153891, 1171435,\n", - " 1161846, 1164563, 1145626, 1180383, 1149744, 1149750, 1146252, 1153609,\n", - " 1182702, 1158512, 1181186, 1185087, 1158371, 1185788, 1155892, 1155899,\n", - " 1181973, 1185068, 1140393, 1168282, 1163327, 1164231, 1158174, 1154944,\n", - " 1154952, 1154957, 1180019, 1147172, 1147182, 1182152, 1170421, 1191540,\n", - " 1139828, 1139831, 1139837, 1154812, 1164927, 1151288, 1156055, 1170000,\n", - " 1146392, 1146394, 1146399, 1194454, 1183768, 1193093, 1192397, 1184877,\n", - " 1169707, 1189012, 1172414, 1172423, 1172122, 1182286, 1158064, 1145395,\n", - " 1178136, 1152090, 1178662, 1155962, 1155960, 1187514, 1188280, 1192792,\n", - " 1193324, 1182855, 1186149, 1157022, 1161940, 1185739], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197178, 1197451, 1198769, 1197719, 1201094, 1199282, 1202255,\n", - " 1198844, 1201581, 1194635, 1194637, 1197791, 1201016, 1203048, 1197359,\n", - " 1197239, 1197240, 1202803, 1202804, 1198557, 1196438, 1194745, 1194783,\n", - " 1196624, 1196631, 1195263, 1197931, 1198543, 1194882, 1199171, 1196616,\n", - " 1194752, 1195325, 1196837, 1195571, 1198036, 1198958, 1198161, 1197273,\n", - " 1196747, 1198915, 1195541, 1202916, 1197474, 1197478, 1195758, 1195918,\n", - " 1200949, 1194941, 1199628, 1197990, 1200865, 1198410, 1200747, 1195017,\n", - " 1199949, 1201511, 1197970, 1197601, 1197609, 1201116, 1196727, 1195771,\n", - " 1195773, 1198428, 1198811, 1198797, 1201079, 1201087, 1201156, 1202630,\n", - " 1202635, 1200991, 1201065, 1200918, 1194805, 1202035, 1200345, 1202102,\n", - " 1202138, 1196883, 1200690, 1199909, 1201442, 1202239, 1198478, 1195601,\n", - " 1197553, 1203329, 1199929, 1202695, 1196963, 1196966, 1202876, 1200784,\n", - " 1200792, 1195676, 1195679, 1194996, 1198932, 1198911, 1195181, 1197403,\n", - " 1199661, 1203102, 1198147, 1197735, 1201475, 1198817, 1198819, 1195070,\n", - " 1203162, 1196428], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197178, 1197451, 1198769, 1197719, 1201094, 1199282, 1202255,\n", - " 1198844, 1201581, 1194635, 1194637, 1197791, 1201016, 1203048, 1197359,\n", - " 1197239, 1197240, 1202803, 1202804, 1198557, 1196438, 1194745, 1194783,\n", - " 1196624, 1196631, 1195263, 1197931, 1198543, 1194882, 1199171, 1196616,\n", - " 1194752, 1195325, 1196837, 1195571, 1198036, 1198958, 1198161, 1197273,\n", - " 1196747, 1198915, 1195541, 1202916, 1197474, 1197478, 1195758, 1195918,\n", - " 1200949, 1194941, 1199628, 1197990, 1200865, 1198410, 1200747, 1195017,\n", - " 1199949, 1201511, 1197970, 1197601, 1197609, 1201116, 1196727, 1195771,\n", - " 1195773, 1198428, 1198811, 1198797, 1201079, 1201087, 1201156, 1202630,\n", - " 1202635, 1200991, 1201065, 1200918, 1194805, 1202035, 1200345, 1202102,\n", - " 1202138, 1196883, 1200690, 1199909, 1201442, 1202239, 1198478, 1195601,\n", - " 1197553, 1203329, 1199929, 1202695, 1196963, 1196966, 1202876, 1200784,\n", - " 1200792, 1195676, 1195679, 1194996, 1198932, 1198911, 1195181, 1197403,\n", - " 1199661, 1203102, 1198147, 1197735, 1201475, 1198817, 1198819, 1195070,\n", - " 1203162, 1196428], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.1690e-01, -6.8979e-04, 5.6754e-01, ..., 6.9566e-02,\n", - " -1.1415e-03, -4.1611e-03],\n", - " [ 5.0553e-02, -1.2331e-04, 4.1124e-01, ..., 1.3890e-01,\n", - " -1.7732e-03, -2.9445e-03],\n", - " [ 4.8400e-02, -2.5161e-04, 4.5609e-01, ..., 9.0550e-02,\n", - " -1.3016e-03, -3.4999e-03],\n", - " ...,\n", - " [ 1.4773e-01, -6.9733e-04, 5.9126e-01, ..., 7.8041e-02,\n", - " -1.4165e-03, -4.2939e-03],\n", - " [ 1.6837e-01, -9.7916e-04, 6.8049e-01, ..., 7.5537e-02,\n", - " -1.2905e-03, -5.0780e-03],\n", - " [ 1.2857e-01, -6.2998e-04, 6.1259e-01, ..., 7.7089e-02,\n", - " -1.3459e-03, -4.7020e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 1.2607e+00, -1.9752e-02, 6.7956e-01, ..., -9.7625e-03,\n", - " -1.7936e-02, 9.9336e-01],\n", - " [ 1.4173e+00, -2.1032e-02, 6.9771e-01, ..., -5.8086e-03,\n", - " -2.5485e-02, 2.5363e+00],\n", - " [ 8.8981e-01, -2.4043e-02, 7.8627e-01, ..., -1.2568e-02,\n", - " -1.8952e-02, 8.8297e-01],\n", - " ...,\n", - " [ 1.0934e+00, -5.5105e-02, 1.1523e+00, ..., -2.2465e-02,\n", - " -2.8698e-02, 4.0570e-01],\n", - " [ 7.5188e-01, -2.9868e-02, -4.2019e-04, ..., -1.2614e-02,\n", - " -2.0194e-02, 1.1362e+00],\n", - " [ 1.4687e+00, -2.1957e-02, 5.7391e-01, ..., -4.5503e-03,\n", - " -2.6076e-02, 2.7203e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[ 1.1818e-01, -1.3007e-03, 6.6778e-02, ..., 9.2460e-01,\n", - " 1.2982e-01, 2.9735e-01],\n", - " [ 9.0892e-02, -6.3228e-04, 1.1607e-01, ..., 8.1270e-01,\n", - " 4.6422e-02, 2.2360e-01],\n", - " [ 1.2184e-01, -1.4991e-03, 1.3382e-01, ..., 8.5095e-01,\n", - " 1.2443e-01, 1.9986e-01],\n", - " ...,\n", - " [ 1.0046e-01, -1.1002e-03, 1.1395e-01, ..., 7.5640e-01,\n", - " 8.2491e-02, 1.5719e-01],\n", - " [ 7.3525e-02, -9.4531e-04, 8.5645e-02, ..., 8.9544e-01,\n", - " 1.6498e-01, 2.3921e-01],\n", - " [ 4.9716e-02, -8.5988e-04, 1.0402e-01, ..., 8.8443e-01,\n", - " 1.7127e-01, 2.6528e-01]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-9.5973e-04, 9.9859e-02, 1.4357e-01, ..., -2.8966e-03,\n", - " -2.7917e-04, -1.3023e-03],\n", - " [-1.5761e-03, 2.6878e-01, 2.0441e-01, ..., -1.5475e-03,\n", - " -2.6540e-04, -2.8937e-03],\n", - " [-2.0448e-03, 3.3812e-01, 1.8378e-01, ..., -6.0798e-04,\n", - " -1.5384e-03, -4.4069e-03],\n", - " ...,\n", - " [-2.0695e-03, 2.2290e-01, 1.7667e-01, ..., -1.8408e-03,\n", - " -2.7196e-04, -2.9193e-03],\n", - " [-1.9135e-03, 2.0814e-01, 1.4524e-01, ..., -1.0394e-03,\n", - " -1.5528e-04, -2.9233e-03],\n", - " [-1.3738e-03, 2.2017e-01, 8.2752e-02, ..., -2.3971e-03,\n", - " 5.9074e-02, -2.7602e-03]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 158, 13, 13, 13, 348, 289, 397, 461, 461, 232, 730, 267,\n", - " 538, 538, 538, 593, 593, 823, 1013, 967, 1163, 1163, 1163, 940,\n", - " 907, 1402, 1180, 1194, 1202, 1261, 1399, 1256, 1256, 1480, 1416, 1416,\n", - " 1416, 1416, 1416, 1416, 1416, 1517, 1669, 1671, 1696, 1606, 1714, 1727,\n", - " 1595, 1655, 1781, 1913, 1913, 1913, 1743, 1992, 1992, 1808, 1900, 1900,\n", - " 1751, 1992, 1992, 1992, 1740, 1957, 1819, 1892, 1951, 1631, 1747, 1891,\n", - " 2169, 2180, 2120, 2120, 2144, 2295, 2335, 2355, 2321, 2317, 2386, 2324,\n", - " 2393, 2548, 2674, 2674, 2534, 2713, 2881, 2881, 2768, 2970, 2768, 2947,\n", - " 2942, 2964, 2920, 2920, 2920, 2920, 2920, 3124, 3191, 3508, 3508, 3395,\n", - " 3403, 3403, 3516, 3979, 4017, 3880, 3915, 4052, 4102, 4062, 4062, 4065,\n", - " 4099, 4082, 4128, 4128, 4120, 4246, 4332, 4423, 4601, 4631, 4865, 4865,\n", - " 4887, 4979, 5512, 5545, 5370, 5370, 5445, 5545, 5528, 5528, 5329, 5650,\n", - " 5753, 5567, 5751, 5772, 6004, 6004, 6105, 5963, 5878, 6047, 5972, 5961,\n", - " 6167, 5949, 6213, 6213, 6213, 6213],\n", - " [ 63, 110, 56, 33, 43, 17, 99, 52, 93, 49, 105, 34,\n", - " 96, 65, 59, 99, 13, 83, 64, 25, 93, 75, 108, 112,\n", - " 109, 88, 62, 89, 81, 15, 31, 17, 69, 78, 61, 73,\n", - " 95, 5, 113, 53, 24, 106, 32, 70, 101, 4, 76, 86,\n", - " 39, 8, 46, 87, 54, 85, 80, 10, 22, 85, 111, 66,\n", - " 68, 92, 45, 100, 48, 40, 9, 83, 37, 79, 82, 37,\n", - " 99, 62, 9, 19, 77, 67, 20, 71, 4, 109, 32, 101,\n", - " 109, 51, 6, 74, 30, 65, 97, 14, 42, 62, 62, 86,\n", - " 20, 98, 26, 28, 20, 38, 2, 21, 9, 37, 21, 93,\n", - " 103, 94, 62, 63, 44, 60, 23, 91, 62, 1, 16, 20,\n", - " 85, 9, 11, 20, 101, 20, 107, 0, 9, 18, 84, 57,\n", - " 7, 85, 62, 72, 47, 90, 20, 6, 35, 29, 3, 36,\n", - " 37, 30, 62, 66, 7, 41, 102, 62, 24, 50, 58, 63,\n", - " 60, 12, 104, 27, 55, 88]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 723, 2088, 1979, ..., 2703, 6812, 979],\n", - " [ 12, 104, 87, ..., 7070, 7066, 7084]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 68, 49, 41, ..., 6, 75, 68],\n", - " [ 151, 106, 29, ..., 6183, 6114, 6126]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 46, 46, 46, ..., 7125, 7124, 7124],\n", - " [ 109, 393, 300, ..., 493, 632, 339]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 845, 254, 940, ..., 682, 339, 555],\n", - " [ 150, 223, 83, ..., 7086, 7159, 7092]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[6996, 6024, 2533, ..., 5347, 6751, 6562],\n", - " [ 56, 14, 109, ..., 6187, 6188, 6196]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 247, 247, 147, ..., 7125, 7124, 7141],\n", - " [ 168, 204, 20, ..., 220, 6312, 1772]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 40, 40, 40, ..., 6246, 6246, 6246],\n", - " [5545, 5512, 5433, ..., 6333, 6173, 6087]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005922\n", - "sampling 0.005767\n", - "noi time: 0.001371\n", - "get_vertex_data call: 0.025747\n", - "noi group time: 0.003325\n", - "eoi_group_time: 0.014451\n", - "second half: 0.17933\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31143, 31145, 4764, ..., 1128742, 1120069, 1110069],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31143, 31145, 4764, ..., 1128742, 1120069, 1110069],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210831, 1221603, 1221048, ..., 1927262, 1937987, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210831, 1221603, 1221048, ..., 1927262, 1937987, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1141424, 1136239, 1140284, 1140285, 1135926, 1135160, 1135721,\n", - " 1141751, 1141758, 1138335, 1136223, 1138059, 1138897, 1151164, 1143600,\n", - " 1143609, 1149826, 1149839, 1139808, 1154771, 1146989, 1145993, 1138938,\n", - " 1146418, 1143372, 1139241, 1139615, 1150509, 1145292, 1134943, 1149216,\n", - " 1149220, 1155689, 1143820, 1149646, 1147473, 1147482, 1147486, 1147226,\n", - " 1142881, 1153943, 1144636, 1146992, 1134701, 1152666, 1152667, 1152664,\n", - " 1153217, 1153220, 1136742, 1147094, 1135151, 1155014, 1139371, 1147211,\n", - " 1136685, 1150329, 1134807, 1151546, 1140537, 1140540, 1138112, 1154414,\n", - " 1137251, 1137177, 1140020, 1135367, 1135202, 1135204, 1141036, 1134794,\n", - " 1135953, 1136512, 1138504, 1138508, 1136610, 1144395, 1137534, 1135408,\n", - " 1157399, 1152376, 1137441, 1143317, 1156158, 1148484, 1141702, 1135579,\n", - " 1135583, 1142593, 1136097, 1140240, 1156342, 1156350, 1156345, 1138514,\n", - " 1153102, 1137953, 1158136, 1154132, 1145134, 1137008, 1156908, 1135522,\n", - " 1139685, 1138319, 1138314, 1136356, 1139874, 1138440, 1137489, 1137491,\n", - " 1149328, 1138846, 1138837, 1138880, 1147116, 1142611, 1142615, 1135036,\n", - " 1135618, 1135631, 1156137, 1138185, 1148531, 1150956, 1137109, 1135772,\n", - " 1139673, 1136081, 1140261, 1134992, 1134776, 1148805, 1136730, 1140199,\n", - " 1158971, 1144410, 1153543, 1143631, 1139933, 1138648, 1138148, 1141963,\n", - " 1155661, 1141992, 1152044, 1142302, 1140665, 1137734, 1134922, 1140901,\n", - " 1134740, 1135540, 1140231, 1141088, 1141095, 1141097, 1141098, 1141100,\n", - " 1144138, 1148996, 1149001, 1143767, 1139025, 1139033, 1140007, 1149979,\n", - " 1146834, 1146844, 1141690, 1135860, 1139436, 1161173, 1140467, 1139386,\n", - " 1141657, 1141653, 1136917, 1136752, 1136756, 1144646, 1134979, 1136862,\n", - " 1164807, 1139798, 1144428, 1138482, 1142093, 1148872, 1137239, 1137062,\n", - " 1137656, 1136864, 1141577, 1140892, 1144176, 1137604, 1139559, 1158698,\n", - " 1140501, 1147153, 1149199, 1149197, 1141365, 1141669, 1141664, 1149099,\n", - " 1149101, 1138292, 1143907, 1139508, 1139510, 1139763, 1145000, 1143779,\n", - " 1140990, 1135047, 1141560, 1147050, 1147047, 1145873, 1152976, 1163917,\n", - " 1138995, 1141925, 1144245, 1144242, 1145339, 1141841, 1137149, 1150698,\n", - " 1140689, 1140695, 1137571, 1137570, 1134861, 1145976, 1143845, 1143851,\n", - " 1146024, 1138085, 1139990, 1143293, 1151127, 1143875, 1143882, 1147543,\n", - " 1147540, 1147282, 1142829, 1142816, 1142822, 1149152, 1149155, 1149610,\n", - " 1143049, 1143051, 1136166, 1136161, 1157720, 1136836, 1139297, 1139329,\n", - " 1141496, 1141498, 1142159, 1143345, 1144611, 1145818, 1137089, 1137096,\n", - " 1144088, 1144095, 1135818, 1150294, 1144375, 1150919, 1146523, 1143456,\n", - " 1143457, 1143007, 1146628, 1147521, 1140364, 1137990, 1137994, 1144219,\n", - " 1144222, 1147984, 1147999, 1146949, 1134902, 1139252, 1145467, 1148704,\n", - " 1143299, 1143302, 1150998, 1142690, 1142700, 1141327, 1141828, 1146751,\n", - " 1147070, 1149722, 1149720, 1149725, 1147981, 1147971, 1145018, 1158226,\n", - " 1150460, 1143922, 1154526, 1145238, 1145240, 1138638, 1148391, 1146178,\n", - " 1148223, 1150438, 1150445, 1149250, 1149258, 1149791, 1144514, 1144526,\n", - " 1141349, 1145826, 1145834, 1150350, 1152001, 1151994, 1165252, 1169717,\n", - " 1147794, 1151050, 1145259, 1139919, 1146723, 1140566, 1140572, 1149530,\n", - " 1148703, 1147019, 1147021, 1147023, 1144824, 1148746, 1153574, 1143560,\n", - " 1151717, 1148288, 1152066, 1154420, 1148180, 1146675, 1146676, 1146686,\n", - " 1157983, 1151557, 1145862, 1146547, 1146559, 1143888, 1148204, 1153181,\n", - " 1148096, 1156211, 1141733, 1154168, 1153121, 1153124, 1153188, 1148052,\n", - " 1148063, 1152875, 1152877, 1155095, 1148090, 1147446, 1147442, 1151821,\n", - " 1152581, 1135306, 1154183, 1149733, 1141420, 1147737, 1145079, 1145080,\n", - " 1148949, 1146967, 1156402, 1150219, 1146623, 1151691, 1144472, 1152849,\n", - " 1152407, 1152100, 1152103, 1146287, 1153035, 1153026, 1153038, 1150085,\n", - " 1150093, 1145539, 1137746, 1146304, 1152063, 1149211, 1152819, 1155337,\n", - " 1157826, 1151617, 1150578, 1150586, 1145278, 1136131, 1136134, 1151449,\n", - " 1138991, 1152898, 1152903, 1151311, 1143995, 1152341, 1153311, 1146704,\n", - " 1138279, 1138281, 1136028, 1136031, 1158704, 1152928, 1152931, 1156395,\n", - " 1156422, 1163490, 1150159, 1150164, 1144016, 1142261, 1148040, 1152601,\n", - " 1149792, 1137048, 1148628, 1158530, 1148369, 1148382, 1137458, 1148243,\n", - " 1157466, 1143454, 1157547, 1158860, 1158862, 1150872, 1150877, 1150869,\n", - " 1148892, 1157064, 1157069, 1155422, 1152833, 1145191, 1137809, 1135730,\n", - " 1138830, 1152184, 1153413, 1135645, 1135634, 1139525, 1158308, 1158311,\n", - " 1151271, 1150132, 1162113, 1144361, 1154528, 1150488, 1142755, 1142764,\n", - " 1156207, 1157637, 1151379, 1158639, 1156647, 1152527, 1157183, 1149321,\n", - " 1145806, 1145793, 1156463, 1158096, 1155630, 1156569, 1136476, 1158824,\n", - " 1153715, 1155646, 1153363, 1143262, 1143263, 1146937, 1162389, 1154250,\n", - " 1151898, 1151317, 1143189, 1160904, 1150371, 1150369, 1157439, 1141620,\n", - " 1151030, 1157288, 1137157, 1157663, 1158126, 1153786, 1158204, 1137381,\n", - " 1137380, 1159116, 1135601, 1135602, 1145507, 1148149, 1150671, 1158665,\n", - " 1157684, 1146325, 1149145, 1152217, 1152222, 1152502, 1140380, 1140381,\n", - " 1159132, 1155975, 1158841, 1158846, 1161472, 1155393, 1154605, 1136896,\n", - " 1158882, 1140221, 1158438, 1158444, 1155246, 1136494, 1136491, 1164941,\n", - " 1164942, 1152143, 1156490, 1157675, 1157676, 1156278, 1136646, 1162324,\n", - " 1163116, 1134757, 1140049, 1166421, 1158558, 1158547, 1146126, 1150006,\n", - " 1150011, 1155521, 1155528, 1142487, 1164276, 1142663, 1142666, 1157753,\n", - " 1159284, 1144270, 1188644, 1158296, 1157945, 1157946, 1153052, 1153045,\n", - " 1155769, 1156238, 1153842, 1156107, 1138393, 1165235, 1150046, 1149070,\n", - " 1145948, 1155482, 1151014, 1154299, 1153514, 1153519, 1138161, 1164006,\n", - " 1156795, 1149956, 1139777, 1139791, 1139284, 1169745, 1166073, 1148771,\n", - " 1169315, 1157357, 1146063, 1164420, 1171259, 1158878, 1169493, 1140643,\n", - " 1141862, 1148600, 1148603, 1156358, 1158642, 1158653, 1159029, 1159032,\n", - " 1169109, 1158899, 1155588, 1147554, 1138674, 1148571, 1168523, 1144982,\n", - " 1144984, 1144989, 1167933, 1147830, 1146500, 1153246, 1155053, 1153201,\n", - " 1151650, 1147427, 1147438, 1156744, 1153663, 1179009, 1144810, 1144812,\n", - " 1142733, 1156303, 1156289, 1145176, 1163777, 1148683, 1164087, 1145228,\n", - " 1154700, 1147677, 1169511, 1142136, 1143038, 1148124, 1145902, 1153520,\n", - " 1181049, 1143395, 1143405, 1143404, 1170987, 1171859, 1158722, 1168756,\n", - " 1147331, 1147338, 1170758, 1145674, 1150773, 1167817, 1166653, 1193350,\n", - " 1155172, 1150522, 1150518, 1156119, 1145529, 1144346, 1157534, 1157528,\n", - " 1138372, 1147746, 1154670, 1142357, 1157331, 1138142, 1193662, 1151664,\n", - " 1169359, 1172331, 1154353, 1149452, 1171529, 1149688, 1163292, 1172868,\n", - " 1149847, 1165903, 1152353, 1143865, 1168400, 1161130, 1171897, 1169049,\n", - " 1145028, 1169144, 1154027, 1152152, 1157153, 1147711, 1151850, 1148128,\n", - " 1169910, 1157588, 1157591, 1157592, 1157593, 1157598, 1140326, 1163989,\n", - " 1153436, 1169083, 1181772, 1160307, 1150234, 1154148, 1149169, 1149179,\n", - " 1149173, 1168481, 1143420, 1178344, 1170176, 1153803, 1153630, 1153619,\n", - " 1161255, 1162129, 1177576, 1154707, 1154718, 1157792, 1157795, 1171623,\n", - " 1171619, 1157124, 1183789, 1158249, 1153898, 1154500, 1164564, 1145626,\n", - " 1145618, 1154834, 1163538, 1179453, 1146252, 1153601, 1163195, 1184326,\n", - " 1158512, 1181190, 1186995, 1158370, 1155892, 1168886, 1168889, 1185700,\n", - " 1162370, 1164231, 1164238, 1162487, 1165444, 1159410, 1166768, 1166772,\n", - " 1147182, 1141507, 1175718, 1184050, 1156539, 1181509, 1139828, 1139831,\n", - " 1139837, 1150265, 1151288, 1189681, 1156055, 1151972, 1179686, 1146394,\n", - " 1146395, 1173058, 1178236, 1178237, 1191511, 1156846, 1181951, 1168673,\n", - " 1194469, 1140997, 1191647, 1170194, 1192614, 1181692, 1193098, 1162502,\n", - " 1166838, 1188694, 1179317, 1178265, 1172122, 1178133, 1178141, 1155959,\n", - " 1178292, 1185209, 1184960, 1162661, 1187536, 1179621, 1167471, 1187556,\n", - " 1191880, 1189948, 1189795, 1157022, 1161940, 1161945], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1141424, 1136239, 1140284, 1140285, 1135926, 1135160, 1135721,\n", - " 1141751, 1141758, 1138335, 1136223, 1138059, 1138897, 1151164, 1143600,\n", - " 1143609, 1149826, 1149839, 1139808, 1154771, 1146989, 1145993, 1138938,\n", - " 1146418, 1143372, 1139241, 1139615, 1150509, 1145292, 1134943, 1149216,\n", - " 1149220, 1155689, 1143820, 1149646, 1147473, 1147482, 1147486, 1147226,\n", - " 1142881, 1153943, 1144636, 1146992, 1134701, 1152666, 1152667, 1152664,\n", - " 1153217, 1153220, 1136742, 1147094, 1135151, 1155014, 1139371, 1147211,\n", - " 1136685, 1150329, 1134807, 1151546, 1140537, 1140540, 1138112, 1154414,\n", - " 1137251, 1137177, 1140020, 1135367, 1135202, 1135204, 1141036, 1134794,\n", - " 1135953, 1136512, 1138504, 1138508, 1136610, 1144395, 1137534, 1135408,\n", - " 1157399, 1152376, 1137441, 1143317, 1156158, 1148484, 1141702, 1135579,\n", - " 1135583, 1142593, 1136097, 1140240, 1156342, 1156350, 1156345, 1138514,\n", - " 1153102, 1137953, 1158136, 1154132, 1145134, 1137008, 1156908, 1135522,\n", - " 1139685, 1138319, 1138314, 1136356, 1139874, 1138440, 1137489, 1137491,\n", - " 1149328, 1138846, 1138837, 1138880, 1147116, 1142611, 1142615, 1135036,\n", - " 1135618, 1135631, 1156137, 1138185, 1148531, 1150956, 1137109, 1135772,\n", - " 1139673, 1136081, 1140261, 1134992, 1134776, 1148805, 1136730, 1140199,\n", - " 1158971, 1144410, 1153543, 1143631, 1139933, 1138648, 1138148, 1141963,\n", - " 1155661, 1141992, 1152044, 1142302, 1140665, 1137734, 1134922, 1140901,\n", - " 1134740, 1135540, 1140231, 1141088, 1141095, 1141097, 1141098, 1141100,\n", - " 1144138, 1148996, 1149001, 1143767, 1139025, 1139033, 1140007, 1149979,\n", - " 1146834, 1146844, 1141690, 1135860, 1139436, 1161173, 1140467, 1139386,\n", - " 1141657, 1141653, 1136917, 1136752, 1136756, 1144646, 1134979, 1136862,\n", - " 1164807, 1139798, 1144428, 1138482, 1142093, 1148872, 1137239, 1137062,\n", - " 1137656, 1136864, 1141577, 1140892, 1144176, 1137604, 1139559, 1158698,\n", - " 1140501, 1147153, 1149199, 1149197, 1141365, 1141669, 1141664, 1149099,\n", - " 1149101, 1138292, 1143907, 1139508, 1139510, 1139763, 1145000, 1143779,\n", - " 1140990, 1135047, 1141560, 1147050, 1147047, 1145873, 1152976, 1163917,\n", - " 1138995, 1141925, 1144245, 1144242, 1145339, 1141841, 1137149, 1150698,\n", - " 1140689, 1140695, 1137571, 1137570, 1134861, 1145976, 1143845, 1143851,\n", - " 1146024, 1138085, 1139990, 1143293, 1151127, 1143875, 1143882, 1147543,\n", - " 1147540, 1147282, 1142829, 1142816, 1142822, 1149152, 1149155, 1149610,\n", - " 1143049, 1143051, 1136166, 1136161, 1157720, 1136836, 1139297, 1139329,\n", - " 1141496, 1141498, 1142159, 1143345, 1144611, 1145818, 1137089, 1137096,\n", - " 1144088, 1144095, 1135818, 1150294, 1144375, 1150919, 1146523, 1143456,\n", - " 1143457, 1143007, 1146628, 1147521, 1140364, 1137990, 1137994, 1144219,\n", - " 1144222, 1147984, 1147999, 1146949, 1134902, 1139252, 1145467, 1148704,\n", - " 1143299, 1143302, 1150998, 1142690, 1142700, 1141327, 1141828, 1146751,\n", - " 1147070, 1149722, 1149720, 1149725, 1147981, 1147971, 1145018, 1158226,\n", - " 1150460, 1143922, 1154526, 1145238, 1145240, 1138638, 1148391, 1146178,\n", - " 1148223, 1150438, 1150445, 1149250, 1149258, 1149791, 1144514, 1144526,\n", - " 1141349, 1145826, 1145834, 1150350, 1152001, 1151994, 1165252, 1169717,\n", - " 1147794, 1151050, 1145259, 1139919, 1146723, 1140566, 1140572, 1149530,\n", - " 1148703, 1147019, 1147021, 1147023, 1144824, 1148746, 1153574, 1143560,\n", - " 1151717, 1148288, 1152066, 1154420, 1148180, 1146675, 1146676, 1146686,\n", - " 1157983, 1151557, 1145862, 1146547, 1146559, 1143888, 1148204, 1153181,\n", - " 1148096, 1156211, 1141733, 1154168, 1153121, 1153124, 1153188, 1148052,\n", - " 1148063, 1152875, 1152877, 1155095, 1148090, 1147446, 1147442, 1151821,\n", - " 1152581, 1135306, 1154183, 1149733, 1141420, 1147737, 1145079, 1145080,\n", - " 1148949, 1146967, 1156402, 1150219, 1146623, 1151691, 1144472, 1152849,\n", - " 1152407, 1152100, 1152103, 1146287, 1153035, 1153026, 1153038, 1150085,\n", - " 1150093, 1145539, 1137746, 1146304, 1152063, 1149211, 1152819, 1155337,\n", - " 1157826, 1151617, 1150578, 1150586, 1145278, 1136131, 1136134, 1151449,\n", - " 1138991, 1152898, 1152903, 1151311, 1143995, 1152341, 1153311, 1146704,\n", - " 1138279, 1138281, 1136028, 1136031, 1158704, 1152928, 1152931, 1156395,\n", - " 1156422, 1163490, 1150159, 1150164, 1144016, 1142261, 1148040, 1152601,\n", - " 1149792, 1137048, 1148628, 1158530, 1148369, 1148382, 1137458, 1148243,\n", - " 1157466, 1143454, 1157547, 1158860, 1158862, 1150872, 1150877, 1150869,\n", - " 1148892, 1157064, 1157069, 1155422, 1152833, 1145191, 1137809, 1135730,\n", - " 1138830, 1152184, 1153413, 1135645, 1135634, 1139525, 1158308, 1158311,\n", - " 1151271, 1150132, 1162113, 1144361, 1154528, 1150488, 1142755, 1142764,\n", - " 1156207, 1157637, 1151379, 1158639, 1156647, 1152527, 1157183, 1149321,\n", - " 1145806, 1145793, 1156463, 1158096, 1155630, 1156569, 1136476, 1158824,\n", - " 1153715, 1155646, 1153363, 1143262, 1143263, 1146937, 1162389, 1154250,\n", - " 1151898, 1151317, 1143189, 1160904, 1150371, 1150369, 1157439, 1141620,\n", - " 1151030, 1157288, 1137157, 1157663, 1158126, 1153786, 1158204, 1137381,\n", - " 1137380, 1159116, 1135601, 1135602, 1145507, 1148149, 1150671, 1158665,\n", - " 1157684, 1146325, 1149145, 1152217, 1152222, 1152502, 1140380, 1140381,\n", - " 1159132, 1155975, 1158841, 1158846, 1161472, 1155393, 1154605, 1136896,\n", - " 1158882, 1140221, 1158438, 1158444, 1155246, 1136494, 1136491, 1164941,\n", - " 1164942, 1152143, 1156490, 1157675, 1157676, 1156278, 1136646, 1162324,\n", - " 1163116, 1134757, 1140049, 1166421, 1158558, 1158547, 1146126, 1150006,\n", - " 1150011, 1155521, 1155528, 1142487, 1164276, 1142663, 1142666, 1157753,\n", - " 1159284, 1144270, 1188644, 1158296, 1157945, 1157946, 1153052, 1153045,\n", - " 1155769, 1156238, 1153842, 1156107, 1138393, 1165235, 1150046, 1149070,\n", - " 1145948, 1155482, 1151014, 1154299, 1153514, 1153519, 1138161, 1164006,\n", - " 1156795, 1149956, 1139777, 1139791, 1139284, 1169745, 1166073, 1148771,\n", - " 1169315, 1157357, 1146063, 1164420, 1171259, 1158878, 1169493, 1140643,\n", - " 1141862, 1148600, 1148603, 1156358, 1158642, 1158653, 1159029, 1159032,\n", - " 1169109, 1158899, 1155588, 1147554, 1138674, 1148571, 1168523, 1144982,\n", - " 1144984, 1144989, 1167933, 1147830, 1146500, 1153246, 1155053, 1153201,\n", - " 1151650, 1147427, 1147438, 1156744, 1153663, 1179009, 1144810, 1144812,\n", - " 1142733, 1156303, 1156289, 1145176, 1163777, 1148683, 1164087, 1145228,\n", - " 1154700, 1147677, 1169511, 1142136, 1143038, 1148124, 1145902, 1153520,\n", - " 1181049, 1143395, 1143405, 1143404, 1170987, 1171859, 1158722, 1168756,\n", - " 1147331, 1147338, 1170758, 1145674, 1150773, 1167817, 1166653, 1193350,\n", - " 1155172, 1150522, 1150518, 1156119, 1145529, 1144346, 1157534, 1157528,\n", - " 1138372, 1147746, 1154670, 1142357, 1157331, 1138142, 1193662, 1151664,\n", - " 1169359, 1172331, 1154353, 1149452, 1171529, 1149688, 1163292, 1172868,\n", - " 1149847, 1165903, 1152353, 1143865, 1168400, 1161130, 1171897, 1169049,\n", - " 1145028, 1169144, 1154027, 1152152, 1157153, 1147711, 1151850, 1148128,\n", - " 1169910, 1157588, 1157591, 1157592, 1157593, 1157598, 1140326, 1163989,\n", - " 1153436, 1169083, 1181772, 1160307, 1150234, 1154148, 1149169, 1149179,\n", - " 1149173, 1168481, 1143420, 1178344, 1170176, 1153803, 1153630, 1153619,\n", - " 1161255, 1162129, 1177576, 1154707, 1154718, 1157792, 1157795, 1171623,\n", - " 1171619, 1157124, 1183789, 1158249, 1153898, 1154500, 1164564, 1145626,\n", - " 1145618, 1154834, 1163538, 1179453, 1146252, 1153601, 1163195, 1184326,\n", - " 1158512, 1181190, 1186995, 1158370, 1155892, 1168886, 1168889, 1185700,\n", - " 1162370, 1164231, 1164238, 1162487, 1165444, 1159410, 1166768, 1166772,\n", - " 1147182, 1141507, 1175718, 1184050, 1156539, 1181509, 1139828, 1139831,\n", - " 1139837, 1150265, 1151288, 1189681, 1156055, 1151972, 1179686, 1146394,\n", - " 1146395, 1173058, 1178236, 1178237, 1191511, 1156846, 1181951, 1168673,\n", - " 1194469, 1140997, 1191647, 1170194, 1192614, 1181692, 1193098, 1162502,\n", - " 1166838, 1188694, 1179317, 1178265, 1172122, 1178133, 1178141, 1155959,\n", - " 1178292, 1185209, 1184960, 1162661, 1187536, 1179621, 1167471, 1187556,\n", - " 1191880, 1189948, 1189795, 1157022, 1161940, 1161945], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197841, 1198248, 1202255, 1198832, 1201577, 1199278, 1194626,\n", - " 1197777, 1201010, 1201016, 1198633, 1196956, 1196871, 1202803, 1194866,\n", - " 1196573, 1194743, 1194745, 1194782, 1194648, 1195514, 1195263, 1197921,\n", - " 1201992, 1194882, 1195325, 1196840, 1195216, 1195279, 1196255, 1196109,\n", - " 1194853, 1202916, 1197474, 1196122, 1199697, 1196393, 1195353, 1198273,\n", - " 1200949, 1199856, 1194928, 1197583, 1197676, 1197990, 1200068, 1200878,\n", - " 1198413, 1198404, 1200751, 1195017, 1199676, 1199951, 1197683, 1200670,\n", - " 1197970, 1197601, 1201116, 1202830, 1196727, 1196734, 1195773, 1198428,\n", - " 1200155, 1198811, 1199087, 1200570, 1196477, 1199445, 1201079, 1201056,\n", - " 1202720, 1202499, 1200526, 1197100, 1199098, 1199908, 1201442, 1202239,\n", - " 1200899, 1202349, 1199976, 1202170, 1202175, 1202834, 1195876, 1201291,\n", - " 1201857, 1200254, 1200398, 1200997, 1194846, 1198014, 1195679, 1195664,\n", - " 1201788, 1197060, 1197816, 1196605, 1201138, 1194733, 1199403, 1201196,\n", - " 1197655, 1197657, 1197039, 1195165], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197841, 1198248, 1202255, 1198832, 1201577, 1199278, 1194626,\n", - " 1197777, 1201010, 1201016, 1198633, 1196956, 1196871, 1202803, 1194866,\n", - " 1196573, 1194743, 1194745, 1194782, 1194648, 1195514, 1195263, 1197921,\n", - " 1201992, 1194882, 1195325, 1196840, 1195216, 1195279, 1196255, 1196109,\n", - " 1194853, 1202916, 1197474, 1196122, 1199697, 1196393, 1195353, 1198273,\n", - " 1200949, 1199856, 1194928, 1197583, 1197676, 1197990, 1200068, 1200878,\n", - " 1198413, 1198404, 1200751, 1195017, 1199676, 1199951, 1197683, 1200670,\n", - " 1197970, 1197601, 1201116, 1202830, 1196727, 1196734, 1195773, 1198428,\n", - " 1200155, 1198811, 1199087, 1200570, 1196477, 1199445, 1201079, 1201056,\n", - " 1202720, 1202499, 1200526, 1197100, 1199098, 1199908, 1201442, 1202239,\n", - " 1200899, 1202349, 1199976, 1202170, 1202175, 1202834, 1195876, 1201291,\n", - " 1201857, 1200254, 1200398, 1200997, 1194846, 1198014, 1195679, 1195664,\n", - " 1201788, 1197060, 1197816, 1196605, 1201138, 1194733, 1199403, 1201196,\n", - " 1197655, 1197657, 1197039, 1195165], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 1.5515e-01, -4.7013e-04, 6.4844e-01, ..., 8.9635e-02,\n", - " -1.4965e-03, -4.6745e-03],\n", - " [ 1.5768e-02, -1.7823e-04, 4.4729e-02, ..., 4.6669e-02,\n", - " -9.9789e-04, -1.3849e-03],\n", - " [ 5.7927e-02, -3.0028e-05, 4.9277e-01, ..., 1.0756e-01,\n", - " -1.4625e-03, -3.1720e-03],\n", - " ...,\n", - " [ 7.1311e-02, 1.3950e-02, 4.4799e-01, ..., 1.0510e-01,\n", - " -1.3772e-03, -3.2741e-03],\n", - " [ 4.5900e-02, -2.4894e-04, 4.4789e-01, ..., 1.3981e-01,\n", - " -1.9293e-03, -3.3195e-03],\n", - " [ 1.4467e-01, -2.3728e-04, 6.4778e-01, ..., 1.0308e-01,\n", - " -1.7240e-03, -4.7119e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 6.4034e-01, -1.9579e-02, 7.3258e-01, ..., -1.3542e-02,\n", - " -1.5995e-02, 1.8839e-01],\n", - " [ 1.0270e+00, -8.0446e-03, 1.1673e+00, ..., -5.4344e-03,\n", - " -1.6805e-02, 7.9596e-01],\n", - " [ 1.1656e+00, -1.1004e-02, 7.7344e-01, ..., -3.2801e-03,\n", - " -2.0437e-02, 1.5804e+00],\n", - " ...,\n", - " [ 5.6092e-01, -1.1292e-02, 2.8924e-01, ..., -7.0072e-03,\n", - " -1.1978e-02, 4.9820e-01],\n", - " [ 5.7165e-01, -3.0237e-02, 1.2632e+00, ..., -1.2939e-02,\n", - " -1.9099e-02, -4.2812e-04],\n", - " [ 1.2680e+00, -1.7770e-02, 7.3259e-01, ..., -3.1691e-03,\n", - " -2.5932e-02, 2.3823e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-1.5285e-04, 1.7959e-02, 5.9852e-02, ..., 1.0475e+00,\n", - " 6.6702e-02, 2.1293e-01],\n", - " [ 4.0473e-02, -3.9293e-04, 3.4568e-02, ..., 1.1025e+00,\n", - " 1.4011e-01, 3.1319e-01],\n", - " [ 3.0483e-02, -6.5601e-04, 1.3089e-01, ..., 1.0582e+00,\n", - " 8.6007e-02, 2.6709e-01],\n", - " ...,\n", - " [-9.7084e-04, 3.9132e-03, 1.8012e-01, ..., 8.9592e-01,\n", - " -2.2921e-03, -6.6939e-05],\n", - " [-2.1135e-04, 4.8116e-03, 1.5477e-01, ..., 1.0980e+00,\n", - " 8.6279e-02, 2.4631e-01],\n", - " [ 2.2446e-02, -4.6241e-04, 1.1525e-01, ..., 9.4739e-01,\n", - " 3.7856e-02, 1.6444e-01]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-7.7835e-04, 1.4972e-01, 1.1174e-01, ..., -4.1735e-03,\n", - " -2.8654e-04, -2.3703e-04],\n", - " [-7.6585e-04, 1.1919e-01, 1.2260e-01, ..., -4.2049e-03,\n", - " -4.0884e-05, -4.6015e-04],\n", - " [-1.7959e-03, 1.0099e-01, 1.5578e-01, ..., -3.1878e-03,\n", - " -1.2010e-04, -9.9164e-04],\n", - " ...,\n", - " [-8.1629e-04, 4.0283e-01, 2.3552e-01, ..., -1.5733e-03,\n", - " -7.1911e-06, -2.8097e-03],\n", - " [-1.1130e-03, 2.3205e-01, 1.6493e-01, ..., -2.3575e-03,\n", - " -2.1544e-04, -1.1739e-03],\n", - " [-8.0780e-04, 1.8058e-01, 1.3967e-01, ..., -2.9478e-03,\n", - " 1.1026e-01, -3.3070e-05]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 164, 100, 100, 145, 145, 145, 80, 80, 287, 318, 210, 210,\n", - " 210, 298, 579, 598, 907, 907, 311, 888, 957, 328, 328, 1001,\n", - " 1001, 961, 890, 890, 890, 890, 890, 1102, 1102, 1257, 1145, 1145,\n", - " 1174, 1156, 1156, 1173, 1462, 852, 1034, 1436, 1315, 1549, 1538, 1538,\n", - " 1538, 1538, 1538, 1631, 1631, 1631, 1631, 1631, 1616, 1788, 1584, 1709,\n", - " 1892, 1778, 1973, 2034, 1746, 2093, 1955, 2043, 2082, 2187, 2172, 2405,\n", - " 2516, 2392, 2351, 2411, 2462, 2462, 2554, 2495, 2495, 2442, 2977, 2753,\n", - " 2766, 3105, 3193, 3193, 2984, 3197, 3033, 3233, 3466, 3545, 3619, 3601,\n", - " 3652, 3763, 4052, 4121, 3667, 3667, 3885, 4137, 3751, 3832, 4192, 4192,\n", - " 4192, 4205, 4051, 4236, 4237, 4262, 4322, 4326, 4359, 4346, 4627, 4518,\n", - " 4598, 4589, 4645, 4645, 4747, 4920, 4865, 5222, 5277, 4907, 5021, 5179,\n", - " 5165, 5165, 5281, 5347, 5426, 5407, 5452, 5547, 5471, 5471, 5471, 5471,\n", - " 5595, 5856, 5984, 5721, 5976, 6260, 6260, 5964, 6183, 6046, 6046, 6257,\n", - " 6173, 6144, 6232],\n", - " [ 79, 33, 4, 88, 59, 15, 24, 98, 64, 60, 95, 12,\n", - " 45, 14, 91, 94, 0, 97, 59, 4, 83, 78, 31, 30,\n", - " 103, 20, 55, 39, 106, 11, 85, 69, 57, 98, 23, 11,\n", - " 60, 13, 101, 60, 60, 92, 24, 35, 48, 22, 75, 82,\n", - " 84, 87, 98, 45, 41, 107, 80, 95, 53, 8, 35, 22,\n", - " 50, 90, 89, 66, 42, 32, 28, 89, 9, 2, 72, 81,\n", - " 6, 51, 19, 22, 38, 47, 71, 83, 74, 58, 70, 38,\n", - " 66, 96, 63, 73, 96, 79, 96, 63, 105, 96, 46, 52,\n", - " 36, 50, 5, 79, 104, 24, 76, 60, 65, 17, 44, 33,\n", - " 21, 96, 86, 96, 96, 79, 96, 96, 22, 35, 56, 87,\n", - " 79, 63, 10, 77, 60, 37, 93, 7, 43, 60, 60, 26,\n", - " 67, 99, 60, 54, 60, 49, 29, 62, 40, 1, 61, 65,\n", - " 25, 57, 99, 3, 34, 102, 18, 68, 42, 11, 27, 100,\n", - " 63, 60, 16]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3232, 2953, 3494, ..., 5493, 1799, 1880],\n", - " [ 25, 251, 149, ..., 6377, 6372, 6361]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 79, 76, 101, ..., 61, 23, 88],\n", - " [ 103, 107, 39, ..., 6164, 6087, 6196]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 277, 277, 277, ..., 6330, 6330, 6395],\n", - " [ 832, 803, 262, ..., 553, 295, 401]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 551, 295, 527, ..., 295, 295, 71],\n", - " [ 72, 67, 164, ..., 6350, 6340, 6323]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1775, 825, 1951, ..., 6415, 5807, 5015],\n", - " [ 9, 9, 47, ..., 6245, 6295, 6250]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 277, 326, 326, ..., 6330, 6330, 6330],\n", - " [2843, 1212, 1287, ..., 5863, 4367, 6268]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 132, 132, 132, ..., 6173, 6232, 6232],\n", - " [2162, 2179, 2525, ..., 3344, 3003, 3196]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006546\n", - "sampling 0.006337\n", - "noi time: 0.002203\n", - "get_vertex_data call: 0.035217\n", - "noi group time: 0.003451\n", - "eoi_group_time: 0.013781\n", - "second half: 0.19682\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 28266, 31145, ..., 1126558, 1131756, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 28266, 31145, ..., 1126558, 1131756, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1230245, 1230252, 1215983, ..., 1930821, 1939382, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1230245, 1230252, 1215983, ..., 1930821, 1939382, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137426, 1137204, 1141424, 1141435, 1136230, 1140284, 1140285, 1136347,\n", - " 1135926, 1135933, 1135716, 1137784, 1140799, 1141758, 1137506, 1136223,\n", - " 1141250, 1136969, 1141443, 1139813, 1145984, 1145992, 1137264, 1137274,\n", - " 1138938, 1139141, 1143372, 1146640, 1139609, 1139615, 1140783, 1145288,\n", - " 1149216, 1142958, 1142959, 1155689, 1143820, 1147473, 1142881, 1144632,\n", - " 1148350, 1146656, 1152666, 1138347, 1148552, 1137229, 1150555, 1147211,\n", - " 1136685, 1152427, 1134715, 1140311, 1137254, 1137263, 1138356, 1153467,\n", - " 1140156, 1135918, 1140030, 1135363, 1135367, 1135202, 1141036, 1136288,\n", - " 1134794, 1157443, 1138504, 1138508, 1137329, 1157103, 1137693, 1137695,\n", - " 1144395, 1157395, 1156159, 1134841, 1141705, 1135579, 1135583, 1142607,\n", - " 1141086, 1138514, 1153099, 1137957, 1154132, 1137022, 1156899, 1139695,\n", - " 1138436, 1136536, 1138461, 1157186, 1157190, 1136594, 1149328, 1149343,\n", - " 1156606, 1147112, 1142611, 1156141, 1158984, 1145842, 1145843, 1141533,\n", - " 1139667, 1139673, 1138069, 1142255, 1165568, 1134992, 1136730, 1158961,\n", - " 1139321, 1142909, 1141070, 1153544, 1141966, 1155648, 1152044, 1136051,\n", - " 1140657, 1137728, 1146214, 1134750, 1135540, 1136697, 1140227, 1140231,\n", - " 1140228, 1141088, 1141098, 1141100, 1149001, 1139889, 1145346, 1143767,\n", - " 1143221, 1139025, 1139029, 1140007, 1140009, 1146834, 1135861, 1136625,\n", - " 1141224, 1136917, 1139730, 1143679, 1144237, 1141155, 1141156, 1141159,\n", - " 1139495, 1144650, 1134979, 1136862, 1137072, 1137074, 1144428, 1138495,\n", - " 1142050, 1142060, 1141810, 1158749, 1142719, 1139190, 1141479, 1138708,\n", - " 1140110, 1144434, 1144596, 1148263, 1136864, 1135315, 1141398, 1141405,\n", - " 1140443, 1144182, 1144179, 1150906, 1150910, 1144865, 1139559, 1139563,\n", - " 1138539, 1142650, 1141365, 1153068, 1163674, 1141664, 1149093, 1149101,\n", - " 1139019, 1138292, 1144279, 1139508, 1139510, 1138815, 1139127, 1145000,\n", - " 1143779, 1140616, 1147901, 1140979, 1140990, 1147050, 1145873, 1152976,\n", - " 1135460, 1163917, 1141925, 1144242, 1141846, 1150248, 1143851, 1146024,\n", - " 1138084, 1154332, 1141585, 1149928, 1141236, 1139990, 1139988, 1143293,\n", - " 1151124, 1143883, 1147543, 1147545, 1147540, 1148763, 1147282, 1147290,\n", - " 1142816, 1140346, 1149366, 1148003, 1143049, 1143051, 1142583, 1144921,\n", - " 1157720, 1136836, 1165623, 1141496, 1143345, 1144766, 1144753, 1144611,\n", - " 1144618, 1144619, 1150294, 1146523, 1143961, 1143456, 1143471, 1143457,\n", - " 1137703, 1155700, 1140358, 1140364, 1137998, 1137997, 1143082, 1148966,\n", - " 1144219, 1144222, 1147999, 1146949, 1144013, 1147243, 1148704, 1162731,\n", - " 1153701, 1147064, 1147070, 1147027, 1147031, 1147248, 1158226, 1143922,\n", - " 1141143, 1141138, 1154526, 1145751, 1142376, 1138638, 1146178, 1152530,\n", - " 1150280, 1150445, 1149258, 1149791, 1144514, 1144524, 1144526, 1152013,\n", - " 1154816, 1151480, 1152022, 1152026, 1154263, 1139919, 1139914, 1147023,\n", - " 1141949, 1151795, 1148744, 1137637, 1153568, 1147653, 1149412, 1148288,\n", - " 1148294, 1135079, 1154420, 1158794, 1148180, 1151363, 1152561, 1136251,\n", - " 1136247, 1146676, 1146682, 1146686, 1141177, 1157983, 1171341, 1144110,\n", - " 1151948, 1143901, 1143895, 1148204, 1141737, 1153124, 1153192, 1153188,\n", - " 1145111, 1148058, 1152878, 1144863, 1150352, 1155098, 1147446, 1152581,\n", - " 1151908, 1154183, 1154182, 1150715, 1148498, 1149737, 1146562, 1141420,\n", - " 1157203, 1155161, 1150890, 1146623, 1151401, 1152099, 1146280, 1153032,\n", - " 1150085, 1137746, 1146304, 1152622, 1140521, 1155145, 1155140, 1136410,\n", - " 1152826, 1155337, 1154123, 1157839, 1152673, 1152680, 1154633, 1151582,\n", - " 1151617, 1150578, 1152944, 1152903, 1152342, 1152348, 1156816, 1138279,\n", - " 1138281, 1136028, 1158704, 1156622, 1151195, 1152928, 1151064, 1156395,\n", - " 1154722, 1142777, 1150110, 1153907, 1150162, 1150164, 1144016, 1148033,\n", - " 1148040, 1152601, 1145656, 1144667, 1137048, 1158477, 1148628, 1158540,\n", - " 1137458, 1149947, 1154563, 1135698, 1155376, 1142041, 1135434, 1158860,\n", - " 1158862, 1156505, 1152384, 1157069, 1155408, 1145189, 1145191, 1151260,\n", - " 1156638, 1165700, 1152738, 1153413, 1135644, 1135645, 1147810, 1158306,\n", - " 1158311, 1151271, 1155441, 1137972, 1150130, 1144355, 1154530, 1142764,\n", - " 1156207, 1151379, 1155122, 1149519, 1151432, 1145793, 1158096, 1155628,\n", - " 1155630, 1155631, 1156563, 1154550, 1136466, 1158824, 1158325, 1148835,\n", - " 1155646, 1161231, 1154246, 1154250, 1154080, 1151892, 1154909, 1143189,\n", - " 1150371, 1157439, 1141627, 1150987, 1140737, 1137152, 1158204, 1137381,\n", - " 1159116, 1134677, 1134685, 1135601, 1135611, 1135605, 1135614, 1163899,\n", - " 1155848, 1155843, 1155852, 1157684, 1149145, 1140627, 1140633, 1152209,\n", - " 1159213, 1140381, 1151093, 1159130, 1157033, 1144843, 1155975, 1158846,\n", - " 1156812, 1154600, 1136899, 1136896, 1158753, 1158882, 1140218, 1158447,\n", - " 1156778, 1158285, 1136494, 1136491, 1147586, 1152143, 1153808, 1136640,\n", - " 1136646, 1140049, 1158558, 1154339, 1158004, 1158257, 1169897, 1135649,\n", - " 1164276, 1150684, 1167359, 1156045, 1159042, 1159052, 1159046, 1159071,\n", - " 1167589, 1142416, 1162044, 1153052, 1153045, 1159738, 1167555, 1156235,\n", - " 1144158, 1161933, 1153842, 1156096, 1138393, 1150046, 1149070, 1155476,\n", - " 1155479, 1153514, 1153519, 1147300, 1158680, 1171995, 1138161, 1164002,\n", - " 1156795, 1149956, 1149963, 1148026, 1166073, 1159985, 1140731, 1157355,\n", - " 1146063, 1163443, 1164048, 1158868, 1140643, 1141862, 1148603, 1163019,\n", - " 1158643, 1158653, 1156181, 1159032, 1152247, 1138674, 1138676, 1144977,\n", - " 1147836, 1146510, 1146509, 1164580, 1144739, 1161723, 1151650, 1147426,\n", - " 1184829, 1157054, 1159380, 1156739, 1156744, 1160849, 1157955, 1150649,\n", - " 1168750, 1144812, 1167253, 1142733, 1167777, 1145743, 1145176, 1165154,\n", - " 1144972, 1144973, 1146444, 1162292, 1166063, 1152624, 1152626, 1155911,\n", - " 1139350, 1139351, 1139345, 1145900, 1151752, 1163959, 1152203, 1143395,\n", - " 1149565, 1158722, 1154076, 1168756, 1147331, 1147339, 1147338, 1179488,\n", - " 1169602, 1149480, 1155172, 1150518, 1144346, 1144336, 1157534, 1138378,\n", - " 1138382, 1169162, 1157331, 1141043, 1169359, 1149452, 1146344, 1149688,\n", - " 1158611, 1158623, 1158051, 1158062, 1160138, 1165899, 1155502, 1152353,\n", - " 1152360, 1152550, 1168049, 1192141, 1172838, 1173307, 1160936, 1152151,\n", - " 1157158, 1157153, 1157373, 1147711, 1147707, 1172435, 1148128, 1148131,\n", - " 1166820, 1154311, 1172606, 1181135, 1177700, 1171614, 1144545, 1144557,\n", - " 1166673, 1182134, 1161595, 1154148, 1149173, 1172537, 1143279, 1169976,\n", - " 1168481, 1143410, 1181092, 1169619, 1153803, 1153141, 1164818, 1163100,\n", - " 1179299, 1151519, 1178569, 1158027, 1161255, 1178500, 1162129, 1179229,\n", - " 1155262, 1171773, 1157795, 1171623, 1164034, 1178366, 1157132, 1180036,\n", - " 1157072, 1158249, 1161612, 1153898, 1134650, 1164200, 1145626, 1161067,\n", - " 1161068, 1184253, 1149755, 1180732, 1157761, 1179776, 1158779, 1158513,\n", - " 1158380, 1155899, 1164411, 1140386, 1169061, 1160810, 1162382, 1165142,\n", - " 1163414, 1181469, 1187131, 1166772, 1147182, 1156162, 1170034, 1156539,\n", - " 1139828, 1139825, 1139831, 1150265, 1154812, 1149668, 1149619, 1156055,\n", - " 1151972, 1181453, 1149544, 1194316, 1189189, 1141001, 1179414, 1192809,\n", - " 1151774, 1152117, 1184355, 1169707, 1166838, 1171200, 1191592, 1179313,\n", - " 1177290, 1172122, 1158064, 1183558, 1176829, 1155958, 1155962, 1155960,\n", - " 1187536, 1194006, 1167471, 1182302, 1169397, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137426, 1137204, 1141424, 1141435, 1136230, 1140284, 1140285, 1136347,\n", - " 1135926, 1135933, 1135716, 1137784, 1140799, 1141758, 1137506, 1136223,\n", - " 1141250, 1136969, 1141443, 1139813, 1145984, 1145992, 1137264, 1137274,\n", - " 1138938, 1139141, 1143372, 1146640, 1139609, 1139615, 1140783, 1145288,\n", - " 1149216, 1142958, 1142959, 1155689, 1143820, 1147473, 1142881, 1144632,\n", - " 1148350, 1146656, 1152666, 1138347, 1148552, 1137229, 1150555, 1147211,\n", - " 1136685, 1152427, 1134715, 1140311, 1137254, 1137263, 1138356, 1153467,\n", - " 1140156, 1135918, 1140030, 1135363, 1135367, 1135202, 1141036, 1136288,\n", - " 1134794, 1157443, 1138504, 1138508, 1137329, 1157103, 1137693, 1137695,\n", - " 1144395, 1157395, 1156159, 1134841, 1141705, 1135579, 1135583, 1142607,\n", - " 1141086, 1138514, 1153099, 1137957, 1154132, 1137022, 1156899, 1139695,\n", - " 1138436, 1136536, 1138461, 1157186, 1157190, 1136594, 1149328, 1149343,\n", - " 1156606, 1147112, 1142611, 1156141, 1158984, 1145842, 1145843, 1141533,\n", - " 1139667, 1139673, 1138069, 1142255, 1165568, 1134992, 1136730, 1158961,\n", - " 1139321, 1142909, 1141070, 1153544, 1141966, 1155648, 1152044, 1136051,\n", - " 1140657, 1137728, 1146214, 1134750, 1135540, 1136697, 1140227, 1140231,\n", - " 1140228, 1141088, 1141098, 1141100, 1149001, 1139889, 1145346, 1143767,\n", - " 1143221, 1139025, 1139029, 1140007, 1140009, 1146834, 1135861, 1136625,\n", - " 1141224, 1136917, 1139730, 1143679, 1144237, 1141155, 1141156, 1141159,\n", - " 1139495, 1144650, 1134979, 1136862, 1137072, 1137074, 1144428, 1138495,\n", - " 1142050, 1142060, 1141810, 1158749, 1142719, 1139190, 1141479, 1138708,\n", - " 1140110, 1144434, 1144596, 1148263, 1136864, 1135315, 1141398, 1141405,\n", - " 1140443, 1144182, 1144179, 1150906, 1150910, 1144865, 1139559, 1139563,\n", - " 1138539, 1142650, 1141365, 1153068, 1163674, 1141664, 1149093, 1149101,\n", - " 1139019, 1138292, 1144279, 1139508, 1139510, 1138815, 1139127, 1145000,\n", - " 1143779, 1140616, 1147901, 1140979, 1140990, 1147050, 1145873, 1152976,\n", - " 1135460, 1163917, 1141925, 1144242, 1141846, 1150248, 1143851, 1146024,\n", - " 1138084, 1154332, 1141585, 1149928, 1141236, 1139990, 1139988, 1143293,\n", - " 1151124, 1143883, 1147543, 1147545, 1147540, 1148763, 1147282, 1147290,\n", - " 1142816, 1140346, 1149366, 1148003, 1143049, 1143051, 1142583, 1144921,\n", - " 1157720, 1136836, 1165623, 1141496, 1143345, 1144766, 1144753, 1144611,\n", - " 1144618, 1144619, 1150294, 1146523, 1143961, 1143456, 1143471, 1143457,\n", - " 1137703, 1155700, 1140358, 1140364, 1137998, 1137997, 1143082, 1148966,\n", - " 1144219, 1144222, 1147999, 1146949, 1144013, 1147243, 1148704, 1162731,\n", - " 1153701, 1147064, 1147070, 1147027, 1147031, 1147248, 1158226, 1143922,\n", - " 1141143, 1141138, 1154526, 1145751, 1142376, 1138638, 1146178, 1152530,\n", - " 1150280, 1150445, 1149258, 1149791, 1144514, 1144524, 1144526, 1152013,\n", - " 1154816, 1151480, 1152022, 1152026, 1154263, 1139919, 1139914, 1147023,\n", - " 1141949, 1151795, 1148744, 1137637, 1153568, 1147653, 1149412, 1148288,\n", - " 1148294, 1135079, 1154420, 1158794, 1148180, 1151363, 1152561, 1136251,\n", - " 1136247, 1146676, 1146682, 1146686, 1141177, 1157983, 1171341, 1144110,\n", - " 1151948, 1143901, 1143895, 1148204, 1141737, 1153124, 1153192, 1153188,\n", - " 1145111, 1148058, 1152878, 1144863, 1150352, 1155098, 1147446, 1152581,\n", - " 1151908, 1154183, 1154182, 1150715, 1148498, 1149737, 1146562, 1141420,\n", - " 1157203, 1155161, 1150890, 1146623, 1151401, 1152099, 1146280, 1153032,\n", - " 1150085, 1137746, 1146304, 1152622, 1140521, 1155145, 1155140, 1136410,\n", - " 1152826, 1155337, 1154123, 1157839, 1152673, 1152680, 1154633, 1151582,\n", - " 1151617, 1150578, 1152944, 1152903, 1152342, 1152348, 1156816, 1138279,\n", - " 1138281, 1136028, 1158704, 1156622, 1151195, 1152928, 1151064, 1156395,\n", - " 1154722, 1142777, 1150110, 1153907, 1150162, 1150164, 1144016, 1148033,\n", - " 1148040, 1152601, 1145656, 1144667, 1137048, 1158477, 1148628, 1158540,\n", - " 1137458, 1149947, 1154563, 1135698, 1155376, 1142041, 1135434, 1158860,\n", - " 1158862, 1156505, 1152384, 1157069, 1155408, 1145189, 1145191, 1151260,\n", - " 1156638, 1165700, 1152738, 1153413, 1135644, 1135645, 1147810, 1158306,\n", - " 1158311, 1151271, 1155441, 1137972, 1150130, 1144355, 1154530, 1142764,\n", - " 1156207, 1151379, 1155122, 1149519, 1151432, 1145793, 1158096, 1155628,\n", - " 1155630, 1155631, 1156563, 1154550, 1136466, 1158824, 1158325, 1148835,\n", - " 1155646, 1161231, 1154246, 1154250, 1154080, 1151892, 1154909, 1143189,\n", - " 1150371, 1157439, 1141627, 1150987, 1140737, 1137152, 1158204, 1137381,\n", - " 1159116, 1134677, 1134685, 1135601, 1135611, 1135605, 1135614, 1163899,\n", - " 1155848, 1155843, 1155852, 1157684, 1149145, 1140627, 1140633, 1152209,\n", - " 1159213, 1140381, 1151093, 1159130, 1157033, 1144843, 1155975, 1158846,\n", - " 1156812, 1154600, 1136899, 1136896, 1158753, 1158882, 1140218, 1158447,\n", - " 1156778, 1158285, 1136494, 1136491, 1147586, 1152143, 1153808, 1136640,\n", - " 1136646, 1140049, 1158558, 1154339, 1158004, 1158257, 1169897, 1135649,\n", - " 1164276, 1150684, 1167359, 1156045, 1159042, 1159052, 1159046, 1159071,\n", - " 1167589, 1142416, 1162044, 1153052, 1153045, 1159738, 1167555, 1156235,\n", - " 1144158, 1161933, 1153842, 1156096, 1138393, 1150046, 1149070, 1155476,\n", - " 1155479, 1153514, 1153519, 1147300, 1158680, 1171995, 1138161, 1164002,\n", - " 1156795, 1149956, 1149963, 1148026, 1166073, 1159985, 1140731, 1157355,\n", - " 1146063, 1163443, 1164048, 1158868, 1140643, 1141862, 1148603, 1163019,\n", - " 1158643, 1158653, 1156181, 1159032, 1152247, 1138674, 1138676, 1144977,\n", - " 1147836, 1146510, 1146509, 1164580, 1144739, 1161723, 1151650, 1147426,\n", - " 1184829, 1157054, 1159380, 1156739, 1156744, 1160849, 1157955, 1150649,\n", - " 1168750, 1144812, 1167253, 1142733, 1167777, 1145743, 1145176, 1165154,\n", - " 1144972, 1144973, 1146444, 1162292, 1166063, 1152624, 1152626, 1155911,\n", - " 1139350, 1139351, 1139345, 1145900, 1151752, 1163959, 1152203, 1143395,\n", - " 1149565, 1158722, 1154076, 1168756, 1147331, 1147339, 1147338, 1179488,\n", - " 1169602, 1149480, 1155172, 1150518, 1144346, 1144336, 1157534, 1138378,\n", - " 1138382, 1169162, 1157331, 1141043, 1169359, 1149452, 1146344, 1149688,\n", - " 1158611, 1158623, 1158051, 1158062, 1160138, 1165899, 1155502, 1152353,\n", - " 1152360, 1152550, 1168049, 1192141, 1172838, 1173307, 1160936, 1152151,\n", - " 1157158, 1157153, 1157373, 1147711, 1147707, 1172435, 1148128, 1148131,\n", - " 1166820, 1154311, 1172606, 1181135, 1177700, 1171614, 1144545, 1144557,\n", - " 1166673, 1182134, 1161595, 1154148, 1149173, 1172537, 1143279, 1169976,\n", - " 1168481, 1143410, 1181092, 1169619, 1153803, 1153141, 1164818, 1163100,\n", - " 1179299, 1151519, 1178569, 1158027, 1161255, 1178500, 1162129, 1179229,\n", - " 1155262, 1171773, 1157795, 1171623, 1164034, 1178366, 1157132, 1180036,\n", - " 1157072, 1158249, 1161612, 1153898, 1134650, 1164200, 1145626, 1161067,\n", - " 1161068, 1184253, 1149755, 1180732, 1157761, 1179776, 1158779, 1158513,\n", - " 1158380, 1155899, 1164411, 1140386, 1169061, 1160810, 1162382, 1165142,\n", - " 1163414, 1181469, 1187131, 1166772, 1147182, 1156162, 1170034, 1156539,\n", - " 1139828, 1139825, 1139831, 1150265, 1154812, 1149668, 1149619, 1156055,\n", - " 1151972, 1181453, 1149544, 1194316, 1189189, 1141001, 1179414, 1192809,\n", - " 1151774, 1152117, 1184355, 1169707, 1166838, 1171200, 1191592, 1179313,\n", - " 1177290, 1172122, 1158064, 1183558, 1176829, 1155958, 1155962, 1155960,\n", - " 1187536, 1194006, 1167471, 1182302, 1169397, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197841, 1198769, 1199424, 1197719, 1201094, 1195860, 1199282,\n", - " 1198459, 1202243, 1202255, 1198840, 1198844, 1201577, 1201458, 1199250,\n", - " 1198624, 1196956, 1202804, 1196433, 1194866, 1197931, 1199135, 1196534,\n", - " 1201992, 1198314, 1195888, 1195895, 1196334, 1196977, 1196987, 1194759,\n", - " 1196835, 1198668, 1196165, 1198262, 1198367, 1198958, 1198161, 1196711,\n", - " 1199823, 1195148, 1195221, 1195270, 1195278, 1197136, 1196242, 1196247,\n", - " 1195850, 1198925, 1195541, 1197478, 1197483, 1199699, 1196393, 1195351,\n", - " 1195353, 1200949, 1197285, 1197291, 1195119, 1197577, 1197583, 1199628,\n", - " 1199803, 1200076, 1199038, 1198400, 1199231, 1199673, 1199676, 1199949,\n", - " 1201511, 1196508, 1199021, 1199022, 1197601, 1196727, 1195773, 1198428,\n", - " 1198811, 1201534, 1200612, 1199087, 1201947, 1200503, 1199445, 1201079,\n", - " 1202630, 1202635, 1201056, 1200927, 1198481, 1200553, 1200429, 1197097,\n", - " 1202138, 1196889, 1199908, 1200194, 1196779, 1199485, 1200825, 1201291,\n", - " 1201871, 1203329, 1201590, 1202209, 1202219, 1198565, 1196966, 1200784,\n", - " 1200793, 1202687, 1196071, 1199606, 1195047, 1203112, 1195677, 1200276,\n", - " 1195418, 1197816, 1196597, 1198973, 1203102, 1201138, 1199403, 1198147,\n", - " 1198824, 1197735, 1199786, 1200468, 1200974, 1201886, 1200296, 1197652,\n", - " 1197026, 1195163, 1196428, 1196424], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197841, 1198769, 1199424, 1197719, 1201094, 1195860, 1199282,\n", - " 1198459, 1202243, 1202255, 1198840, 1198844, 1201577, 1201458, 1199250,\n", - " 1198624, 1196956, 1202804, 1196433, 1194866, 1197931, 1199135, 1196534,\n", - " 1201992, 1198314, 1195888, 1195895, 1196334, 1196977, 1196987, 1194759,\n", - " 1196835, 1198668, 1196165, 1198262, 1198367, 1198958, 1198161, 1196711,\n", - " 1199823, 1195148, 1195221, 1195270, 1195278, 1197136, 1196242, 1196247,\n", - " 1195850, 1198925, 1195541, 1197478, 1197483, 1199699, 1196393, 1195351,\n", - " 1195353, 1200949, 1197285, 1197291, 1195119, 1197577, 1197583, 1199628,\n", - " 1199803, 1200076, 1199038, 1198400, 1199231, 1199673, 1199676, 1199949,\n", - " 1201511, 1196508, 1199021, 1199022, 1197601, 1196727, 1195773, 1198428,\n", - " 1198811, 1201534, 1200612, 1199087, 1201947, 1200503, 1199445, 1201079,\n", - " 1202630, 1202635, 1201056, 1200927, 1198481, 1200553, 1200429, 1197097,\n", - " 1202138, 1196889, 1199908, 1200194, 1196779, 1199485, 1200825, 1201291,\n", - " 1201871, 1203329, 1201590, 1202209, 1202219, 1198565, 1196966, 1200784,\n", - " 1200793, 1202687, 1196071, 1199606, 1195047, 1203112, 1195677, 1200276,\n", - " 1195418, 1197816, 1196597, 1198973, 1203102, 1201138, 1199403, 1198147,\n", - " 1198824, 1197735, 1199786, 1200468, 1200974, 1201886, 1200296, 1197652,\n", - " 1197026, 1195163, 1196428, 1196424], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 1.4580e-01, -5.0995e-04, 7.4196e-01, ..., 1.0940e-01,\n", - " -1.5185e-03, -5.2942e-03],\n", - " [ 1.5772e-01, -3.5987e-04, 6.8864e-01, ..., 1.0823e-01,\n", - " -1.6092e-03, -4.6980e-03],\n", - " [ 1.3977e-01, -1.5733e-04, 6.7059e-01, ..., 1.2421e-01,\n", - " -1.8590e-03, -4.5064e-03],\n", - " ...,\n", - " [ 5.6636e-02, -1.0702e-04, 4.8480e-01, ..., 1.3390e-01,\n", - " -1.6107e-03, -3.3915e-03],\n", - " [ 1.3170e-01, -1.6684e-04, 6.5096e-01, ..., 1.1122e-01,\n", - " -1.6217e-03, -4.4604e-03],\n", - " [ 8.3653e-02, 6.0994e-02, 4.7558e-01, ..., 1.3816e-01,\n", - " -1.7175e-03, -3.2993e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 6.2051e-01, -1.1496e-02, 6.0427e-01, ..., -6.2833e-03,\n", - " -1.0862e-02, -9.4134e-04],\n", - " [ 2.8599e-01, -8.5862e-03, 7.0153e-01, ..., -4.8162e-03,\n", - " -8.2376e-03, -4.4125e-03],\n", - " [ 5.4517e-01, -7.8412e-03, 4.8705e-01, ..., -6.2128e-03,\n", - " -1.1107e-02, 2.4785e-01],\n", - " ...,\n", - " [ 3.7848e-01, -2.9864e-02, 1.7716e+00, ..., -1.2974e-02,\n", - " -1.9462e-02, -4.5759e-03],\n", - " [ 2.3046e-01, -7.5484e-03, 5.6868e-01, ..., -5.3272e-03,\n", - " -8.2881e-03, -1.1090e-03],\n", - " [ 1.4310e+00, -1.4952e-02, 1.1351e+00, ..., -1.6277e-03,\n", - " -2.8299e-02, 2.4069e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-9.8903e-04, 3.3424e-02, 1.6932e-01, ..., 1.2126e+00,\n", - " -6.4542e-04, 1.4642e-01],\n", - " [-3.4743e-03, 6.0096e-02, 4.0024e-01, ..., 8.2458e-01,\n", - " -1.2657e-03, -1.2240e-03],\n", - " [-6.0716e-04, -5.1985e-04, 1.5167e-01, ..., 1.2496e+00,\n", - " -2.1792e-04, 2.2259e-01],\n", - " ...,\n", - " [-6.2777e-04, 1.3390e-02, 1.5371e-01, ..., 1.2021e-01,\n", - " -2.7591e-04, -8.3313e-04],\n", - " [-2.0490e-03, 4.3354e-02, 2.3779e-01, ..., 9.1993e-01,\n", - " -2.2778e-03, -1.2444e-03],\n", - " [-2.7932e-04, -5.3619e-04, 1.5005e-01, ..., 1.2785e+00,\n", - " 6.4135e-02, 2.7272e-01]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-5.0795e-04, 1.7876e-01, 3.2372e-02, ..., -3.9273e-03,\n", - " -1.9980e-05, 1.2529e-02],\n", - " [-8.1462e-04, 2.1381e-01, 1.5654e-01, ..., -5.5320e-03,\n", - " 7.7796e-02, 4.4482e-02],\n", - " [-3.3024e-04, 1.8322e-01, 1.2531e-01, ..., -4.6438e-03,\n", - " -7.6517e-05, 5.3291e-02],\n", - " ...,\n", - " [-7.4148e-04, 2.0820e-01, 1.5764e-01, ..., -4.5846e-03,\n", - " 5.4519e-02, 4.4591e-02],\n", - " [-3.7963e-04, 1.6198e-01, 9.7746e-02, ..., -5.1512e-03,\n", - " 5.8003e-02, -2.5404e-04],\n", - " [ 3.1718e-02, 5.6321e-01, 3.6890e-01, ..., -4.4291e-03,\n", - " 1.1810e-01, -8.8148e-04]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 79, 75, 19, 101, 109, 104, 208, 208, 208, 384, 336, 381,\n", - " 459, 459, 459, 459, 443, 443, 642, 642, 681, 651, 653, 672,\n", - " 672, 595, 500, 1037, 1037, 625, 843, 1126, 879, 893, 882, 1301,\n", - " 611, 1065, 1065, 1269, 1366, 1343, 1343, 1299, 1361, 1674, 1539, 1679,\n", - " 1685, 1598, 1658, 1658, 1521, 1647, 1601, 1601, 1601, 1719, 1719, 1832,\n", - " 1784, 1748, 1696, 1855, 1922, 1922, 1986, 1907, 1907, 2128, 2180, 2143,\n", - " 2093, 2253, 2263, 2212, 2212, 2368, 2338, 2283, 2283, 2357, 2574, 2525,\n", - " 2525, 2371, 2700, 2851, 2790, 2790, 2790, 2658, 2658, 2658, 2658, 2763,\n", - " 2790, 2878, 3072, 2986, 3135, 3135, 3259, 3259, 3259, 3298, 3566, 3603,\n", - " 3784, 3560, 3540, 3638, 3652, 3661, 3788, 3741, 3869, 4047, 3964, 4075,\n", - " 4008, 4031, 4015, 4077, 4143, 4230, 4176, 4209, 4291, 4291, 4291, 4275,\n", - " 4398, 4412, 4412, 4409, 4355, 4441, 4369, 4291, 4291, 4423, 4661, 4640,\n", - " 4540, 4755, 4814, 4825, 4723, 4821, 4826, 5044, 5044, 4986, 4850, 5058,\n", - " 4954, 5076, 4866, 4866, 5131, 5131, 5168, 5261, 5204, 5308, 5192, 5467,\n", - " 5318, 5558, 5348, 5454, 5363, 5680, 5633, 5393, 5393, 5711, 5897, 5897,\n", - " 5626, 5626, 5756, 5688, 5688, 5446, 5446, 5446, 5690, 5580, 5580, 5578,\n", - " 5493, 5810, 5889, 5782, 5782, 6200, 6200, 6160, 6054, 6054, 6106, 6106,\n", - " 6106, 6106, 6263, 6252, 6010, 6176, 6101, 6239, 6195, 6166, 6251],\n", - " [ 2, 93, 26, 85, 10, 7, 107, 30, 9, 67, 45, 7,\n", - " 23, 45, 110, 43, 89, 7, 77, 65, 75, 72, 77, 100,\n", - " 24, 139, 80, 43, 73, 28, 19, 125, 69, 61, 21, 88,\n", - " 98, 122, 136, 118, 124, 109, 123, 75, 92, 33, 50, 37,\n", - " 95, 83, 6, 133, 4, 7, 12, 111, 124, 86, 64, 82,\n", - " 43, 101, 21, 110, 117, 7, 23, 126, 96, 4, 110, 130,\n", - " 30, 59, 56, 44, 83, 83, 53, 106, 55, 13, 43, 27,\n", - " 49, 77, 77, 111, 63, 16, 110, 79, 22, 58, 96, 12,\n", - " 85, 41, 63, 83, 122, 87, 76, 84, 86, 136, 77, 60,\n", - " 119, 23, 115, 35, 62, 99, 74, 112, 34, 135, 83, 77,\n", - " 7, 11, 127, 59, 132, 51, 97, 119, 77, 138, 66, 83,\n", - " 77, 113, 32, 4, 57, 131, 15, 57, 68, 46, 1, 94,\n", - " 108, 104, 77, 20, 59, 59, 105, 121, 3, 77, 77, 116,\n", - " 59, 5, 110, 56, 43, 71, 25, 137, 118, 137, 10, 72,\n", - " 59, 79, 33, 0, 80, 48, 47, 129, 114, 77, 77, 134,\n", - " 17, 77, 52, 77, 40, 29, 90, 43, 14, 86, 84, 18,\n", - " 103, 77, 70, 77, 93, 42, 81, 39, 124, 135, 36, 91,\n", - " 54, 120, 31, 14, 38, 128, 137, 26, 102, 78, 8]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[6952, 3989, 3018, ..., 513, 7227, 2395],\n", - " [ 197, 33, 268, ..., 7178, 7272, 7087]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 44, 63, 63, ..., 48, 53, 48],\n", - " [ 88, 230, 80, ..., 6253, 6237, 6309]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 307, 140, 140, ..., 7047, 7047, 7047],\n", - " [ 593, 173, 81, ..., 136, 532, 372]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 659, 349, 122, ..., 115, 700, 738],\n", - " [ 120, 54, 241, ..., 7162, 7266, 7117]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 375, 375, 4267, ..., 5700, 6479, 2634],\n", - " [ 208, 136, 208, ..., 6273, 6310, 6150]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 140, 140, 140, ..., 7047, 7047, 7047],\n", - " [ 855, 1673, 1626, ..., 350, 381, 870]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 208, 208, 208, ..., 6251, 6195, 6195],\n", - " [6040, 692, 809, ..., 4699, 7206, 6638]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.003631\n", - "sampling 0.003546\n", - "noi time: 0.000843\n", - "get_vertex_data call: 0.037929\n", - "noi group time: 0.00394\n", - "eoi_group_time: 0.014468\n", - "second half: 0.201975\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 32616, 27122, 28974, ..., 1111402, 1131749, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 32616, 27122, 28974, ..., 1111402, 1131749, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1231425, 1221051, 1212206, ..., 1935650, 1929315, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1231425, 1221051, 1212206, ..., 1935650, 1929315, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1135061, 1137212, 1141424, 1140282, 1135933, 1135716, 1140785, 1141758,\n", - " 1138335, 1136208, 1136223, 1141443, 1149826, 1145370, 1145373, 1137947,\n", - " 1145992, 1145999, 1143360, 1143372, 1139241, 1150506, 1145281, 1139866,\n", - " 1134943, 1148582, 1149216, 1143812, 1149646, 1147473, 1147483, 1147486,\n", - " 1141879, 1135994, 1142881, 1144632, 1149033, 1134701, 1135947, 1135950,\n", - " 1148350, 1135478, 1146472, 1146465, 1138341, 1141916, 1137220, 1150546,\n", - " 1155014, 1139364, 1147211, 1136683, 1136685, 1150329, 1136268, 1140313,\n", - " 1140535, 1140540, 1154410, 1137254, 1137172, 1137181, 1149460, 1138356,\n", - " 1134735, 1140020, 1162453, 1135367, 1135200, 1135202, 1141033, 1141036,\n", - " 1134794, 1134797, 1138504, 1137329, 1137341, 1137342, 1143064, 1136609,\n", - " 1136619, 1144395, 1137534, 1136662, 1137479, 1156149, 1156152, 1148481,\n", - " 1148489, 1148483, 1134841, 1141703, 1135983, 1135579, 1135583, 1141086,\n", - " 1136111, 1135828, 1140240, 1156347, 1138514, 1158136, 1156908, 1156897,\n", - " 1135522, 1139685, 1138434, 1138436, 1138440, 1138445, 1140074, 1137493,\n", - " 1154790, 1157190, 1136594, 1158390, 1135088, 1138693, 1147111, 1147112,\n", - " 1147113, 1142611, 1142616, 1160819, 1135352, 1138177, 1158984, 1148531,\n", - " 1150953, 1137119, 1139844, 1141533, 1136457, 1139667, 1139673, 1138067,\n", - " 1142243, 1136085, 1134992, 1142793, 1148805, 1135789, 1140199, 1158974,\n", - " 1142906, 1141058, 1141065, 1140034, 1138147, 1138148, 1138151, 1141955,\n", - " 1140554, 1152042, 1152044, 1139063, 1142299, 1137734, 1146222, 1138246,\n", - " 1135540, 1141097, 1141098, 1144134, 1144138, 1139889, 1145357, 1141983,\n", - " 1136392, 1143767, 1154855, 1143225, 1139025, 1140003, 1149979, 1149975,\n", - " 1135860, 1154466, 1139436, 1136627, 1141224, 1141901, 1139386, 1159794,\n", - " 1136917, 1139741, 1137186, 1137188, 1144237, 1140607, 1146453, 1141786,\n", - " 1139495, 1139501, 1144934, 1136862, 1136852, 1147848, 1147852, 1144422,\n", - " 1144428, 1138482, 1142052, 1141821, 1140175, 1158749, 1148864, 1148871,\n", - " 1143574, 1139190, 1137243, 1138706, 1142913, 1143111, 1144596, 1142451,\n", - " 1157417, 1144042, 1141570, 1141573, 1140882, 1135312, 1135325, 1140433,\n", - " 1140444, 1146194, 1134827, 1138539, 1147153, 1142650, 1141365, 1141367,\n", - " 1153069, 1141678, 1144284, 1144279, 1143917, 1139510, 1139127, 1145001,\n", - " 1145200, 1140616, 1147888, 1139171, 1146695, 1135047, 1141560, 1143692,\n", - " 1143680, 1147050, 1147047, 1145873, 1135457, 1139455, 1139000, 1141925,\n", - " 1146909, 1144242, 1140579, 1140696, 1140695, 1139407, 1139405, 1141390,\n", - " 1145974, 1143844, 1143851, 1146008, 1136277, 1136275, 1146024, 1138085,\n", - " 1146129, 1146140, 1146131, 1154323, 1142533, 1141245, 1139990, 1143293,\n", - " 1143883, 1147543, 1148763, 1147282, 1142816, 1136330, 1140349, 1149366,\n", - " 1139417, 1146088, 1149610, 1143040, 1136160, 1136167, 1144923, 1157717,\n", - " 1157720, 1136836, 1165631, 1144768, 1144769, 1138226, 1139051, 1142158,\n", - " 1145429, 1143345, 1144765, 1138597, 1139979, 1135876, 1150756, 1138013,\n", - " 1144375, 1146514, 1143456, 1143457, 1137697, 1143937, 1140829, 1146580,\n", - " 1146590, 1147574, 1155700, 1143806, 1146636, 1147521, 1147523, 1140364,\n", - " 1149569, 1149581, 1137990, 1143080, 1168914, 1147984, 1147999, 1146957,\n", - " 1134899, 1134902, 1139252, 1145457, 1148704, 1143310, 1141825, 1153701,\n", - " 1152328, 1147070, 1149722, 1147257, 1147971, 1139549, 1158226, 1158235,\n", - " 1147880, 1154526, 1145237, 1145240, 1145235, 1145747, 1145750, 1145751,\n", - " 1148397, 1138861, 1151236, 1151242, 1148214, 1152530, 1150284, 1150445,\n", - " 1148928, 1148940, 1144526, 1146887, 1153977, 1152013, 1154828, 1151480,\n", - " 1152024, 1154263, 1145256, 1145260, 1145262, 1135504, 1139914, 1150119,\n", - " 1141938, 1141949, 1141193, 1148448, 1147653, 1143560, 1143552, 1149412,\n", - " 1146401, 1152073, 1137724, 1147866, 1151412, 1154430, 1154420, 1148188,\n", - " 1136247, 1146676, 1151565, 1148720, 1148726, 1148729, 1144110, 1146549,\n", - " 1143901, 1148204, 1154196, 1153124, 1145104, 1159837, 1152974, 1150935,\n", - " 1152867, 1150352, 1150356, 1169594, 1147446, 1147442, 1151816, 1151913,\n", - " 1154183, 1150707, 1148498, 1141420, 1150634, 1145085, 1148949, 1146969,\n", - " 1146974, 1156402, 1153249, 1146623, 1142987, 1152858, 1152405, 1154052,\n", - " 1153032, 1153038, 1137746, 1137755, 1146307, 1146304, 1140521, 1136410,\n", - " 1149210, 1152819, 1155337, 1154123, 1154638, 1164761, 1151617, 1151623,\n", - " 1150586, 1136798, 1148916, 1152946, 1152169, 1145957, 1145966, 1152903,\n", - " 1156831, 1153311, 1138283, 1138279, 1138281, 1152297, 1156007, 1136028,\n", - " 1158704, 1155779, 1151056, 1151064, 1156422, 1150164, 1148033, 1148040,\n", - " 1155218, 1155223, 1175478, 1160879, 1145656, 1137048, 1158473, 1148628,\n", - " 1158530, 1169169, 1137458, 1149944, 1153868, 1157518, 1135699, 1142041,\n", - " 1135429, 1158860, 1156501, 1156505, 1145191, 1139473, 1143491, 1151260,\n", - " 1150465, 1135730, 1135741, 1165700, 1150824, 1150828, 1135647, 1139525,\n", - " 1158304, 1151273, 1155441, 1153354, 1162120, 1138573, 1154528, 1156919,\n", - " 1142755, 1142758, 1151390, 1151379, 1155360, 1155375, 1155122, 1152527,\n", - " 1155755, 1135398, 1145806, 1145807, 1156463, 1158096, 1158104, 1168230,\n", - " 1155628, 1155630, 1136468, 1136469, 1158824, 1153715, 1158325, 1158335,\n", - " 1154033, 1155646, 1153368, 1160958, 1143263, 1154644, 1160223, 1154243,\n", - " 1154240, 1151890, 1139629, 1143189, 1150371, 1157439, 1145727, 1157933,\n", - " 1151030, 1153786, 1137385, 1159116, 1138260, 1145693, 1145681, 1137317,\n", - " 1140920, 1140913, 1166187, 1164161, 1135601, 1135602, 1155848, 1155852,\n", - " 1158665, 1149145, 1144463, 1159213, 1156693, 1140379, 1157732, 1157735,\n", - " 1159132, 1144843, 1155975, 1156811, 1156812, 1161480, 1149702, 1149700,\n", - " 1166126, 1136899, 1136896, 1158882, 1158886, 1140213, 1161270, 1157304,\n", - " 1159164, 1158438, 1156770, 1151615, 1159435, 1156665, 1152143, 1156490,\n", - " 1153808, 1136640, 1140049, 1157858, 1146123, 1146126, 1138108, 1138110,\n", - " 1155871, 1144581, 1158256, 1150011, 1155528, 1161539, 1135661, 1164276,\n", - " 1164287, 1142669, 1159288, 1167346, 1159052, 1159066, 1142427, 1162044,\n", - " 1153052, 1153042, 1153045, 1159733, 1163072, 1167707, 1167565, 1156235,\n", - " 1161923, 1166256, 1142875, 1138387, 1150035, 1149063, 1145948, 1154300,\n", - " 1153514, 1153519, 1147300, 1158673, 1138161, 1156787, 1139781, 1154590,\n", - " 1148771, 1140735, 1169319, 1158461, 1164048, 1140132, 1170415, 1140643,\n", - " 1148600, 1168081, 1143143, 1158653, 1159025, 1159032, 1152247, 1165585,\n", - " 1168300, 1155588, 1168421, 1167933, 1147393, 1149015, 1146500, 1161235,\n", - " 1155272, 1160660, 1153212, 1141459, 1169485, 1151650, 1157955, 1153663,\n", - " 1150648, 1163260, 1171040, 1150315, 1168748, 1144812, 1140116, 1168860,\n", - " 1135567, 1165721, 1164750, 1142733, 1156303, 1145743, 1165943, 1163935,\n", - " 1145229, 1167757, 1160232, 1155324, 1166462, 1144972, 1160730, 1143025,\n", - " 1166053, 1165746, 1152624, 1152626, 1152630, 1139344, 1139350, 1145900,\n", - " 1145902, 1148426, 1153520, 1153534, 1169550, 1181040, 1170398, 1170989,\n", - " 1158724, 1158722, 1166670, 1167315, 1147333, 1151598, 1145326, 1155172,\n", - " 1150515, 1150518, 1144336, 1157534, 1138376, 1147750, 1142352, 1169164,\n", - " 1157331, 1141045, 1151664, 1169359, 1154364, 1147491, 1138609, 1158146,\n", - " 1149688, 1158611, 1158623, 1158054, 1158062, 1173047, 1153288, 1165113,\n", - " 1165322, 1171475, 1155502, 1172488, 1169935, 1169921, 1148325, 1168906,\n", - " 1169144, 1152150, 1159658, 1151210, 1151696, 1151697, 1157158, 1172111,\n", - " 1157371, 1157373, 1157375, 1147711, 1151852, 1148131, 1148132, 1157585,\n", - " 1157592, 1157593, 1157595, 1135021, 1172961, 1183427, 1178282, 1175223,\n", - " 1140326, 1172606, 1144550, 1153427, 1166532, 1166682, 1166684, 1169448,\n", - " 1150234, 1154148, 1167520, 1149173, 1167658, 1172863, 1166299, 1177260,\n", - " 1171305, 1153802, 1153803, 1178166, 1184699, 1181574, 1184093, 1168778,\n", - " 1179807, 1161255, 1155262, 1157792, 1157803, 1157795, 1151498, 1172550,\n", - " 1171623, 1185052, 1157126, 1158253, 1153890, 1164571, 1188569, 1162403,\n", - " 1145626, 1156446, 1182632, 1161911, 1149744, 1149755, 1180732, 1153605,\n", - " 1157770, 1157761, 1155990, 1158512, 1165067, 1158933, 1158380, 1155890,\n", - " 1155889, 1187699, 1162988, 1162967, 1164411, 1140397, 1188241, 1165484,\n", - " 1163424, 1186278, 1162253, 1164231, 1182337, 1188133, 1163421, 1176976,\n", - " 1158175, 1147182, 1156162, 1170034, 1168930, 1170431, 1186328, 1156528,\n", - " 1139831, 1150265, 1167135, 1156055, 1170000, 1173018, 1146392, 1173058,\n", - " 1193043, 1189125, 1184959, 1188232, 1187044, 1167429, 1170713, 1181936,\n", - " 1189545, 1140997, 1170880, 1178983, 1151774, 1153733, 1152113, 1172339,\n", - " 1182226, 1169707, 1186548, 1189107, 1160339, 1150400, 1194059, 1166763,\n", - " 1172417, 1172127, 1158064, 1145395, 1145392, 1178135, 1185244, 1155959,\n", - " 1169831, 1185356, 1193831, 1157017, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1135061, 1137212, 1141424, 1140282, 1135933, 1135716, 1140785, 1141758,\n", - " 1138335, 1136208, 1136223, 1141443, 1149826, 1145370, 1145373, 1137947,\n", - " 1145992, 1145999, 1143360, 1143372, 1139241, 1150506, 1145281, 1139866,\n", - " 1134943, 1148582, 1149216, 1143812, 1149646, 1147473, 1147483, 1147486,\n", - " 1141879, 1135994, 1142881, 1144632, 1149033, 1134701, 1135947, 1135950,\n", - " 1148350, 1135478, 1146472, 1146465, 1138341, 1141916, 1137220, 1150546,\n", - " 1155014, 1139364, 1147211, 1136683, 1136685, 1150329, 1136268, 1140313,\n", - " 1140535, 1140540, 1154410, 1137254, 1137172, 1137181, 1149460, 1138356,\n", - " 1134735, 1140020, 1162453, 1135367, 1135200, 1135202, 1141033, 1141036,\n", - " 1134794, 1134797, 1138504, 1137329, 1137341, 1137342, 1143064, 1136609,\n", - " 1136619, 1144395, 1137534, 1136662, 1137479, 1156149, 1156152, 1148481,\n", - " 1148489, 1148483, 1134841, 1141703, 1135983, 1135579, 1135583, 1141086,\n", - " 1136111, 1135828, 1140240, 1156347, 1138514, 1158136, 1156908, 1156897,\n", - " 1135522, 1139685, 1138434, 1138436, 1138440, 1138445, 1140074, 1137493,\n", - " 1154790, 1157190, 1136594, 1158390, 1135088, 1138693, 1147111, 1147112,\n", - " 1147113, 1142611, 1142616, 1160819, 1135352, 1138177, 1158984, 1148531,\n", - " 1150953, 1137119, 1139844, 1141533, 1136457, 1139667, 1139673, 1138067,\n", - " 1142243, 1136085, 1134992, 1142793, 1148805, 1135789, 1140199, 1158974,\n", - " 1142906, 1141058, 1141065, 1140034, 1138147, 1138148, 1138151, 1141955,\n", - " 1140554, 1152042, 1152044, 1139063, 1142299, 1137734, 1146222, 1138246,\n", - " 1135540, 1141097, 1141098, 1144134, 1144138, 1139889, 1145357, 1141983,\n", - " 1136392, 1143767, 1154855, 1143225, 1139025, 1140003, 1149979, 1149975,\n", - " 1135860, 1154466, 1139436, 1136627, 1141224, 1141901, 1139386, 1159794,\n", - " 1136917, 1139741, 1137186, 1137188, 1144237, 1140607, 1146453, 1141786,\n", - " 1139495, 1139501, 1144934, 1136862, 1136852, 1147848, 1147852, 1144422,\n", - " 1144428, 1138482, 1142052, 1141821, 1140175, 1158749, 1148864, 1148871,\n", - " 1143574, 1139190, 1137243, 1138706, 1142913, 1143111, 1144596, 1142451,\n", - " 1157417, 1144042, 1141570, 1141573, 1140882, 1135312, 1135325, 1140433,\n", - " 1140444, 1146194, 1134827, 1138539, 1147153, 1142650, 1141365, 1141367,\n", - " 1153069, 1141678, 1144284, 1144279, 1143917, 1139510, 1139127, 1145001,\n", - " 1145200, 1140616, 1147888, 1139171, 1146695, 1135047, 1141560, 1143692,\n", - " 1143680, 1147050, 1147047, 1145873, 1135457, 1139455, 1139000, 1141925,\n", - " 1146909, 1144242, 1140579, 1140696, 1140695, 1139407, 1139405, 1141390,\n", - " 1145974, 1143844, 1143851, 1146008, 1136277, 1136275, 1146024, 1138085,\n", - " 1146129, 1146140, 1146131, 1154323, 1142533, 1141245, 1139990, 1143293,\n", - " 1143883, 1147543, 1148763, 1147282, 1142816, 1136330, 1140349, 1149366,\n", - " 1139417, 1146088, 1149610, 1143040, 1136160, 1136167, 1144923, 1157717,\n", - " 1157720, 1136836, 1165631, 1144768, 1144769, 1138226, 1139051, 1142158,\n", - " 1145429, 1143345, 1144765, 1138597, 1139979, 1135876, 1150756, 1138013,\n", - " 1144375, 1146514, 1143456, 1143457, 1137697, 1143937, 1140829, 1146580,\n", - " 1146590, 1147574, 1155700, 1143806, 1146636, 1147521, 1147523, 1140364,\n", - " 1149569, 1149581, 1137990, 1143080, 1168914, 1147984, 1147999, 1146957,\n", - " 1134899, 1134902, 1139252, 1145457, 1148704, 1143310, 1141825, 1153701,\n", - " 1152328, 1147070, 1149722, 1147257, 1147971, 1139549, 1158226, 1158235,\n", - " 1147880, 1154526, 1145237, 1145240, 1145235, 1145747, 1145750, 1145751,\n", - " 1148397, 1138861, 1151236, 1151242, 1148214, 1152530, 1150284, 1150445,\n", - " 1148928, 1148940, 1144526, 1146887, 1153977, 1152013, 1154828, 1151480,\n", - " 1152024, 1154263, 1145256, 1145260, 1145262, 1135504, 1139914, 1150119,\n", - " 1141938, 1141949, 1141193, 1148448, 1147653, 1143560, 1143552, 1149412,\n", - " 1146401, 1152073, 1137724, 1147866, 1151412, 1154430, 1154420, 1148188,\n", - " 1136247, 1146676, 1151565, 1148720, 1148726, 1148729, 1144110, 1146549,\n", - " 1143901, 1148204, 1154196, 1153124, 1145104, 1159837, 1152974, 1150935,\n", - " 1152867, 1150352, 1150356, 1169594, 1147446, 1147442, 1151816, 1151913,\n", - " 1154183, 1150707, 1148498, 1141420, 1150634, 1145085, 1148949, 1146969,\n", - " 1146974, 1156402, 1153249, 1146623, 1142987, 1152858, 1152405, 1154052,\n", - " 1153032, 1153038, 1137746, 1137755, 1146307, 1146304, 1140521, 1136410,\n", - " 1149210, 1152819, 1155337, 1154123, 1154638, 1164761, 1151617, 1151623,\n", - " 1150586, 1136798, 1148916, 1152946, 1152169, 1145957, 1145966, 1152903,\n", - " 1156831, 1153311, 1138283, 1138279, 1138281, 1152297, 1156007, 1136028,\n", - " 1158704, 1155779, 1151056, 1151064, 1156422, 1150164, 1148033, 1148040,\n", - " 1155218, 1155223, 1175478, 1160879, 1145656, 1137048, 1158473, 1148628,\n", - " 1158530, 1169169, 1137458, 1149944, 1153868, 1157518, 1135699, 1142041,\n", - " 1135429, 1158860, 1156501, 1156505, 1145191, 1139473, 1143491, 1151260,\n", - " 1150465, 1135730, 1135741, 1165700, 1150824, 1150828, 1135647, 1139525,\n", - " 1158304, 1151273, 1155441, 1153354, 1162120, 1138573, 1154528, 1156919,\n", - " 1142755, 1142758, 1151390, 1151379, 1155360, 1155375, 1155122, 1152527,\n", - " 1155755, 1135398, 1145806, 1145807, 1156463, 1158096, 1158104, 1168230,\n", - " 1155628, 1155630, 1136468, 1136469, 1158824, 1153715, 1158325, 1158335,\n", - " 1154033, 1155646, 1153368, 1160958, 1143263, 1154644, 1160223, 1154243,\n", - " 1154240, 1151890, 1139629, 1143189, 1150371, 1157439, 1145727, 1157933,\n", - " 1151030, 1153786, 1137385, 1159116, 1138260, 1145693, 1145681, 1137317,\n", - " 1140920, 1140913, 1166187, 1164161, 1135601, 1135602, 1155848, 1155852,\n", - " 1158665, 1149145, 1144463, 1159213, 1156693, 1140379, 1157732, 1157735,\n", - " 1159132, 1144843, 1155975, 1156811, 1156812, 1161480, 1149702, 1149700,\n", - " 1166126, 1136899, 1136896, 1158882, 1158886, 1140213, 1161270, 1157304,\n", - " 1159164, 1158438, 1156770, 1151615, 1159435, 1156665, 1152143, 1156490,\n", - " 1153808, 1136640, 1140049, 1157858, 1146123, 1146126, 1138108, 1138110,\n", - " 1155871, 1144581, 1158256, 1150011, 1155528, 1161539, 1135661, 1164276,\n", - " 1164287, 1142669, 1159288, 1167346, 1159052, 1159066, 1142427, 1162044,\n", - " 1153052, 1153042, 1153045, 1159733, 1163072, 1167707, 1167565, 1156235,\n", - " 1161923, 1166256, 1142875, 1138387, 1150035, 1149063, 1145948, 1154300,\n", - " 1153514, 1153519, 1147300, 1158673, 1138161, 1156787, 1139781, 1154590,\n", - " 1148771, 1140735, 1169319, 1158461, 1164048, 1140132, 1170415, 1140643,\n", - " 1148600, 1168081, 1143143, 1158653, 1159025, 1159032, 1152247, 1165585,\n", - " 1168300, 1155588, 1168421, 1167933, 1147393, 1149015, 1146500, 1161235,\n", - " 1155272, 1160660, 1153212, 1141459, 1169485, 1151650, 1157955, 1153663,\n", - " 1150648, 1163260, 1171040, 1150315, 1168748, 1144812, 1140116, 1168860,\n", - " 1135567, 1165721, 1164750, 1142733, 1156303, 1145743, 1165943, 1163935,\n", - " 1145229, 1167757, 1160232, 1155324, 1166462, 1144972, 1160730, 1143025,\n", - " 1166053, 1165746, 1152624, 1152626, 1152630, 1139344, 1139350, 1145900,\n", - " 1145902, 1148426, 1153520, 1153534, 1169550, 1181040, 1170398, 1170989,\n", - " 1158724, 1158722, 1166670, 1167315, 1147333, 1151598, 1145326, 1155172,\n", - " 1150515, 1150518, 1144336, 1157534, 1138376, 1147750, 1142352, 1169164,\n", - " 1157331, 1141045, 1151664, 1169359, 1154364, 1147491, 1138609, 1158146,\n", - " 1149688, 1158611, 1158623, 1158054, 1158062, 1173047, 1153288, 1165113,\n", - " 1165322, 1171475, 1155502, 1172488, 1169935, 1169921, 1148325, 1168906,\n", - " 1169144, 1152150, 1159658, 1151210, 1151696, 1151697, 1157158, 1172111,\n", - " 1157371, 1157373, 1157375, 1147711, 1151852, 1148131, 1148132, 1157585,\n", - " 1157592, 1157593, 1157595, 1135021, 1172961, 1183427, 1178282, 1175223,\n", - " 1140326, 1172606, 1144550, 1153427, 1166532, 1166682, 1166684, 1169448,\n", - " 1150234, 1154148, 1167520, 1149173, 1167658, 1172863, 1166299, 1177260,\n", - " 1171305, 1153802, 1153803, 1178166, 1184699, 1181574, 1184093, 1168778,\n", - " 1179807, 1161255, 1155262, 1157792, 1157803, 1157795, 1151498, 1172550,\n", - " 1171623, 1185052, 1157126, 1158253, 1153890, 1164571, 1188569, 1162403,\n", - " 1145626, 1156446, 1182632, 1161911, 1149744, 1149755, 1180732, 1153605,\n", - " 1157770, 1157761, 1155990, 1158512, 1165067, 1158933, 1158380, 1155890,\n", - " 1155889, 1187699, 1162988, 1162967, 1164411, 1140397, 1188241, 1165484,\n", - " 1163424, 1186278, 1162253, 1164231, 1182337, 1188133, 1163421, 1176976,\n", - " 1158175, 1147182, 1156162, 1170034, 1168930, 1170431, 1186328, 1156528,\n", - " 1139831, 1150265, 1167135, 1156055, 1170000, 1173018, 1146392, 1173058,\n", - " 1193043, 1189125, 1184959, 1188232, 1187044, 1167429, 1170713, 1181936,\n", - " 1189545, 1140997, 1170880, 1178983, 1151774, 1153733, 1152113, 1172339,\n", - " 1182226, 1169707, 1186548, 1189107, 1160339, 1150400, 1194059, 1166763,\n", - " 1172417, 1172127, 1158064, 1145395, 1145392, 1178135, 1185244, 1155959,\n", - " 1169831, 1185356, 1193831, 1157017, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197841, 1197174, 1199424, 1199439, 1197719, 1200099, 1198723,\n", - " 1198731, 1199282, 1198459, 1202255, 1198844, 1201577, 1201582, 1201465,\n", - " 1199278, 1201660, 1202804, 1198557, 1194770, 1195488, 1195494, 1196631,\n", - " 1195514, 1195263, 1201992, 1196030, 1198543, 1197697, 1194882, 1199172,\n", - " 1196695, 1194663, 1195325, 1195986, 1196717, 1195148, 1195265, 1195270,\n", - " 1195278, 1197140, 1196247, 1197273, 1194927, 1196109, 1194849, 1194859,\n", - " 1198915, 1197478, 1199998, 1195918, 1199711, 1196283, 1199338, 1200959,\n", - " 1197134, 1199071, 1199695, 1199803, 1197990, 1202457, 1200079, 1200077,\n", - " 1200872, 1200878, 1199038, 1200403, 1200748, 1201904, 1199676, 1200060,\n", - " 1199949, 1197601, 1201116, 1196727, 1202618, 1200892, 1200894, 1198416,\n", - " 1198428, 1199555, 1201547, 1201824, 1200501, 1200503, 1198066, 1198593,\n", - " 1199445, 1201156, 1202632, 1202635, 1200988, 1194808, 1202640, 1202641,\n", - " 1199712, 1201041, 1201358, 1201735, 1200419, 1202129, 1196883, 1199908,\n", - " 1200899, 1195885, 1201291, 1195610, 1203329, 1203336, 1201590, 1200398,\n", - " 1196973, 1200784, 1200793, 1196823, 1195679, 1198932, 1198911, 1195415,\n", - " 1201787, 1195181, 1197811, 1197822, 1197821, 1194898, 1194680, 1197027,\n", - " 1201138, 1194730, 1198147, 1198824, 1197735, 1200437, 1198819, 1201886,\n", - " 1200297, 1197652, 1197335, 1195165], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197841, 1197174, 1199424, 1199439, 1197719, 1200099, 1198723,\n", - " 1198731, 1199282, 1198459, 1202255, 1198844, 1201577, 1201582, 1201465,\n", - " 1199278, 1201660, 1202804, 1198557, 1194770, 1195488, 1195494, 1196631,\n", - " 1195514, 1195263, 1201992, 1196030, 1198543, 1197697, 1194882, 1199172,\n", - " 1196695, 1194663, 1195325, 1195986, 1196717, 1195148, 1195265, 1195270,\n", - " 1195278, 1197140, 1196247, 1197273, 1194927, 1196109, 1194849, 1194859,\n", - " 1198915, 1197478, 1199998, 1195918, 1199711, 1196283, 1199338, 1200959,\n", - " 1197134, 1199071, 1199695, 1199803, 1197990, 1202457, 1200079, 1200077,\n", - " 1200872, 1200878, 1199038, 1200403, 1200748, 1201904, 1199676, 1200060,\n", - " 1199949, 1197601, 1201116, 1196727, 1202618, 1200892, 1200894, 1198416,\n", - " 1198428, 1199555, 1201547, 1201824, 1200501, 1200503, 1198066, 1198593,\n", - " 1199445, 1201156, 1202632, 1202635, 1200988, 1194808, 1202640, 1202641,\n", - " 1199712, 1201041, 1201358, 1201735, 1200419, 1202129, 1196883, 1199908,\n", - " 1200899, 1195885, 1201291, 1195610, 1203329, 1203336, 1201590, 1200398,\n", - " 1196973, 1200784, 1200793, 1196823, 1195679, 1198932, 1198911, 1195415,\n", - " 1201787, 1195181, 1197811, 1197822, 1197821, 1194898, 1194680, 1197027,\n", - " 1201138, 1194730, 1198147, 1198824, 1197735, 1200437, 1198819, 1201886,\n", - " 1200297, 1197652, 1197335, 1195165], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 1.4480e-01, -5.8836e-05, 6.7659e-01, ..., 1.1229e-01,\n", - " -1.7070e-03, -4.6822e-03],\n", - " [ 1.7351e-01, -1.6882e-04, 7.7978e-01, ..., 1.0965e-01,\n", - " -1.6434e-03, -5.4036e-03],\n", - " [ 8.4424e-02, 9.7916e-03, 5.7174e-01, ..., 1.5883e-01,\n", - " -2.2404e-03, -4.0545e-03],\n", - " ...,\n", - " [ 7.8278e-02, 2.9195e-02, 5.7392e-01, ..., 1.3752e-01,\n", - " -1.8175e-03, -3.8692e-03],\n", - " [ 1.0225e-01, 2.4935e-02, 6.1823e-01, ..., 1.2254e-01,\n", - " -1.6177e-03, -4.1119e-03],\n", - " [ 1.8997e-01, -2.9973e-04, 8.1169e-01, ..., 1.1564e-01,\n", - " -1.6651e-03, -5.5074e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 5.1137e-01, -2.2603e-03, 4.5814e-01, ..., -4.3157e-03,\n", - " -8.1947e-03, 1.6082e-01],\n", - " [ 1.2168e-01, 1.8783e-01, 1.3302e+00, ..., -4.5970e-03,\n", - " -8.1966e-03, -6.8628e-03],\n", - " [ 1.2089e+00, -1.7274e-05, 1.8880e+00, ..., 5.3089e-02,\n", - " -1.4082e-02, 5.8643e-01],\n", - " ...,\n", - " [ 1.4962e+00, -8.9090e-03, 1.5414e+00, ..., -3.0768e-03,\n", - " -2.4252e-02, 1.5693e+00],\n", - " [ 3.1555e-01, -3.0091e-03, 7.9620e-01, ..., -4.2895e-03,\n", - " -7.7692e-03, -2.6937e-03],\n", - " [ 1.7689e+00, -1.3228e-02, 1.6695e+00, ..., -5.3566e-05,\n", - " -3.2320e-02, 2.6309e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-1.0369e-03, 8.4368e-02, 1.9586e-01, ..., 1.4044e+00,\n", - " -1.0143e-03, 1.5384e-01],\n", - " [-5.9065e-04, 1.1477e-01, 8.3421e-02, ..., 1.2351e+00,\n", - " 2.9466e-02, 1.7349e-01],\n", - " [-1.1541e-03, 2.2425e-02, 1.8778e-01, ..., 1.4929e+00,\n", - " -7.2928e-04, 1.2120e-01],\n", - " ...,\n", - " [-7.4453e-04, 1.4278e-01, 1.4733e-01, ..., 1.4743e+00,\n", - " -4.5976e-04, 2.1909e-01],\n", - " [-6.5901e-04, 1.8315e-02, 1.5249e-01, ..., 1.2963e-01,\n", - " -2.6328e-04, -8.1703e-04],\n", - " [-5.2211e-04, 2.4580e-02, 1.7812e-01, ..., 1.3410e+00,\n", - " -1.3394e-04, 1.2158e-01]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-1.7442e-03, 3.6973e-01, 1.2297e-01, ..., -3.9926e-03,\n", - " 1.8004e-01, 9.7555e-02],\n", - " [-1.3881e-03, 2.8261e-01, 1.4154e-01, ..., -4.6791e-03,\n", - " 2.0007e-02, 1.6073e-01],\n", - " [-5.6633e-04, 3.1081e-01, 9.0094e-02, ..., -5.0870e-03,\n", - " 1.4885e-01, 8.8209e-02],\n", - " ...,\n", - " [-7.1851e-04, 4.0253e-01, 1.9288e-01, ..., -4.7991e-03,\n", - " 1.6055e-01, 1.3409e-01],\n", - " [-2.0179e-04, 2.5852e-01, 1.6477e-01, ..., -5.9533e-03,\n", - " 8.3406e-02, 1.4301e-01],\n", - " [ 2.8883e-02, 3.8087e-01, 2.8217e-01, ..., -4.0431e-03,\n", - " 7.4456e-02, -4.0703e-04]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 14, 220, 172, 220, 220, 220, 208, 180, 33, 218, 218, 133,\n", - " 294, 294, 335, 353, 299, 549, 750, 483, 856, 657, 840, 642,\n", - " 642, 642, 770, 770, 919, 812, 663, 851, 851, 1057, 661, 1011,\n", - " 1355, 831, 1341, 1341, 1178, 1052, 1219, 1258, 1258, 1347, 1157, 1188,\n", - " 1328, 1365, 1270, 1270, 1154, 1154, 1154, 1418, 1478, 1478, 1462, 1233,\n", - " 1454, 1424, 1424, 1465, 1465, 1545, 1545, 1545, 1545, 1866, 1866, 1866,\n", - " 1627, 1627, 1784, 1751, 1751, 1865, 1819, 2029, 2085, 1836, 2085, 2085,\n", - " 2085, 2085, 1934, 2097, 2267, 2097, 2370, 2438, 2438, 2465, 2749, 2623,\n", - " 2469, 2469, 2469, 2469, 2596, 2596, 2596, 2611, 2602, 2602, 2602, 2596,\n", - " 2596, 2598, 2507, 2507, 2372, 2372, 2686, 2792, 2778, 2778, 2709, 2789,\n", - " 2722, 2975, 2814, 3034, 3085, 3158, 3158, 3218, 3465, 3218, 3509, 3485,\n", - " 3490, 3546, 3546, 3546, 3412, 3613, 3481, 3481, 3824, 3718, 3673, 3607,\n", - " 3632, 3883, 4181, 4027, 4045, 4045, 4174, 4068, 4173, 4265, 4186, 4294,\n", - " 4293, 4351, 4415, 4384, 4426, 4589, 4519, 4618, 4629, 4609, 4765, 4670,\n", - " 4653, 4847, 4692, 4888, 4884, 4884, 4884, 4939, 4962, 4935, 4988, 5115,\n", - " 5136, 5256, 5256, 5337, 5355, 5263, 5263, 5301, 5448, 5479, 5398, 5521,\n", - " 5676, 5718, 5765, 5735, 5862, 5735, 5931, 5852, 5852, 6146, 6066, 6152,\n", - " 6152, 6254, 6254, 6438, 6438, 6347, 6347, 6153, 6153, 6153, 6093, 6093,\n", - " 6076, 6076, 6414, 6133, 6133, 6195, 6318, 6209, 6406, 6406],\n", - " [ 78, 49, 17, 96, 104, 16, 75, 31, 9, 32, 112, 113,\n", - " 38, 6, 90, 138, 78, 58, 113, 118, 70, 75, 92, 6,\n", - " 38, 98, 128, 137, 65, 119, 70, 102, 37, 128, 80, 9,\n", - " 108, 12, 9, 48, 92, 10, 75, 90, 46, 9, 73, 101,\n", - " 122, 11, 2, 99, 86, 34, 26, 100, 94, 106, 20, 117,\n", - " 25, 136, 50, 132, 15, 86, 72, 89, 13, 9, 118, 61,\n", - " 88, 83, 113, 51, 5, 52, 137, 25, 135, 35, 62, 134,\n", - " 24, 66, 134, 83, 129, 122, 107, 56, 64, 25, 98, 25,\n", - " 82, 110, 84, 19, 113, 64, 111, 44, 91, 57, 74, 139,\n", - " 60, 81, 74, 114, 2, 123, 29, 30, 98, 38, 43, 97,\n", - " 100, 36, 92, 28, 9, 38, 6, 12, 0, 71, 133, 69,\n", - " 84, 67, 103, 95, 40, 75, 33, 43, 8, 113, 113, 120,\n", - " 39, 59, 6, 25, 63, 84, 11, 75, 136, 44, 4, 75,\n", - " 35, 93, 44, 9, 39, 43, 26, 97, 127, 47, 10, 130,\n", - " 41, 68, 52, 18, 21, 54, 25, 125, 48, 11, 75, 70,\n", - " 115, 79, 77, 131, 43, 26, 90, 122, 14, 109, 85, 126,\n", - " 23, 87, 76, 7, 25, 1, 55, 116, 124, 3, 105, 75,\n", - " 45, 27, 75, 73, 121, 75, 42, 11, 75, 43, 53, 75,\n", - " 75, 116, 25, 22, 75, 75, 116, 75, 78, 73]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1706, 3925, 2840, ..., 6814, 4691, 1392],\n", - " [ 11, 11, 278, ..., 6777, 6948, 6875]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 99, 2, 48, ..., 9, 113, 6],\n", - " [ 192, 92, 109, ..., 6367, 6333, 6323]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 11, 11, 11, ..., 6735, 6735, 6735],\n", - " [ 340, 912, 388, ..., 574, 777, 9]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 340, 907, 278, ..., 233, 487, 19],\n", - " [ 344, 206, 12, ..., 6920, 6849, 6832]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3127, 6923, 195, ..., 3179, 6354, 213],\n", - " [ 47, 48, 13, ..., 6402, 6315, 6388]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 11, 11, 11, ..., 6875, 6875, 6875],\n", - " [1384, 1676, 1906, ..., 5522, 5923, 5562]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 33, 33, 33, ..., 6297, 6297, 6297],\n", - " [1734, 2341, 6875, ..., 498, 644, 501]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.007168\n", - "sampling 0.007011\n", - "noi time: 0.001517\n", - "get_vertex_data call: 0.034801\n", - "noi group time: 0.00473\n", - "eoi_group_time: 0.018377\n", - "second half: 0.193644\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 1893, 23828, 21459, ..., 1120069, 1119043, 1117254],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 1893, 23828, 21459, ..., 1120069, 1119043, 1117254],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227491, 1230250, 1215980, ..., 1930676, 1936968, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227491, 1230250, 1215980, ..., 1930676, 1936968, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137213, 1141424, 1135926, 1135160, 1137784, 1141758, 1136215, 1142321,\n", - " 1136962, 1141443, 1149831, 1139811, 1146978, 1137936, 1145999, 1138933,\n", - " 1138938, 1145043, 1143372, 1143363, 1139241, 1146640, 1142963, 1139865,\n", - " 1139866, 1148589, 1149216, 1155686, 1147473, 1147483, 1149294, 1153943,\n", - " 1144636, 1149033, 1146656, 1146660, 1135477, 1135481, 1136122, 1152666,\n", - " 1147089, 1147095, 1147204, 1136683, 1150322, 1150329, 1140537, 1138112,\n", - " 1138119, 1137172, 1140159, 1134720, 1134735, 1140020, 1135360, 1135367,\n", - " 1135202, 1140767, 1141036, 1134794, 1143386, 1136178, 1144395, 1137529,\n", - " 1137534, 1157398, 1157397, 1137441, 1135265, 1135583, 1141086, 1135830,\n", - " 1155086, 1156342, 1138514, 1138524, 1137957, 1154132, 1137021, 1135522,\n", - " 1138305, 1138436, 1138440, 1138461, 1138449, 1154787, 1137925, 1158390,\n", - " 1149328, 1138846, 1147112, 1147119, 1142611, 1160518, 1138181, 1148531,\n", - " 1135760, 1143584, 1134992, 1134770, 1142434, 1148805, 1136728, 1158974,\n", - " 1139321, 1141070, 1153543, 1140034, 1138151, 1155654, 1140557, 1141997,\n", - " 1152042, 1152044, 1147317, 1134742, 1134750, 1138246, 1136697, 1141098,\n", - " 1141100, 1144128, 1149001, 1139889, 1141975, 1143775, 1143221, 1143224,\n", - " 1139025, 1140007, 1140470, 1141224, 1141892, 1136917, 1137185, 1144230,\n", - " 1141786, 1139495, 1144929, 1144934, 1141606, 1141609, 1144650, 1134979,\n", - " 1136852, 1160054, 1139798, 1144428, 1149105, 1149111, 1148867, 1158600,\n", - " 1139190, 1137060, 1138708, 1140110, 1142913, 1138424, 1143111, 1144596,\n", - " 1144599, 1136864, 1145298, 1141578, 1141398, 1141396, 1140445, 1144182,\n", - " 1139563, 1158703, 1147153, 1141365, 1153068, 1151106, 1141718, 1149097,\n", - " 1139022, 1139505, 1139508, 1139127, 1140976, 1140983, 1140990, 1146695,\n", - " 1146702, 1147050, 1152976, 1135457, 1139446, 1141925, 1144243, 1144242,\n", - " 1141841, 1138728, 1137571, 1141378, 1144072, 1143851, 1146024, 1138085,\n", - " 1154323, 1139990, 1143293, 1147543, 1147540, 1148763, 1147282, 1142816,\n", - " 1147458, 1139417, 1136160, 1142588, 1157720, 1136836, 1139328, 1142158,\n", - " 1143345, 1144619, 1144088, 1144093, 1150755, 1144380, 1143457, 1144303,\n", - " 1140482, 1142001, 1143937, 1135441, 1135442, 1147532, 1140364, 1143080,\n", - " 1147999, 1146957, 1146950, 1148704, 1141825, 1146742, 1147025, 1145011,\n", - " 1158226, 1150459, 1143921, 1154526, 1145240, 1145747, 1152530, 1152532,\n", - " 1150280, 1150438, 1150437, 1150445, 1149263, 1149791, 1141358, 1150342,\n", - " 1147794, 1151480, 1144884, 1144888, 1145259, 1135512, 1135516, 1134869,\n", - " 1140566, 1148702, 1150127, 1147021, 1147023, 1153152, 1152806, 1144819,\n", - " 1149991, 1153575, 1147653, 1148294, 1148300, 1139099, 1154420, 1154424,\n", - " 1148180, 1139718, 1146686, 1152481, 1152435, 1152441, 1148204, 1154168,\n", - " 1153124, 1153188, 1145106, 1145111, 1152974, 1150932, 1152867, 1144863,\n", - " 1150356, 1146237, 1143121, 1147446, 1147447, 1152581, 1135307, 1151906,\n", - " 1172680, 1148498, 1141420, 1136002, 1147737, 1149385, 1150890, 1146967,\n", - " 1146623, 1164772, 1144465, 1152409, 1152100, 1153038, 1137746, 1152612,\n", - " 1157107, 1155337, 1154123, 1157842, 1154633, 1164760, 1151617, 1150585,\n", - " 1150588, 1145952, 1152903, 1156826, 1138272, 1152300, 1156001, 1136028,\n", - " 1136029, 1158704, 1151187, 1140676, 1152928, 1154733, 1142777, 1156422,\n", - " 1150150, 1153686, 1148040, 1145656, 1149794, 1137048, 1148628, 1148637,\n", - " 1158540, 1137458, 1149946, 1148253, 1135698, 1153085, 1158859, 1158860,\n", - " 1158916, 1137877, 1156505, 1157057, 1155412, 1152841, 1145187, 1143502,\n", - " 1157565, 1150465, 1149047, 1152179, 1156629, 1156638, 1156935, 1147810,\n", - " 1158308, 1155441, 1150132, 1150136, 1138969, 1156919, 1145610, 1154227,\n", - " 1151379, 1158628, 1155374, 1155122, 1157174, 1135396, 1135406, 1146913,\n", - " 1145806, 1156463, 1154763, 1155628, 1148647, 1155646, 1143257, 1161792,\n", - " 1160210, 1163371, 1139619, 1137359, 1151327, 1143189, 1153322, 1147908,\n", - " 1141627, 1143517, 1143516, 1157934, 1145693, 1145690, 1154000, 1134677,\n", - " 1135601, 1135605, 1148149, 1158664, 1158665, 1157684, 1146321, 1149145,\n", - " 1149146, 1156085, 1152209, 1152220, 1159213, 1155439, 1156693, 1159132,\n", - " 1157028, 1157031, 1144843, 1142475, 1155975, 1156812, 1156810, 1161897,\n", - " 1155402, 1149702, 1154600, 1136896, 1158760, 1158447, 1152131, 1153812,\n", - " 1157675, 1166424, 1142178, 1147788, 1158558, 1146113, 1146126, 1158006,\n", - " 1142487, 1142663, 1167359, 1156032, 1162683, 1159061, 1151832, 1153052,\n", - " 1153042, 1153045, 1171551, 1153841, 1156100, 1156107, 1138393, 1150046,\n", - " 1164557, 1155479, 1153519, 1138161, 1156787, 1154590, 1139290, 1139281,\n", - " 1156983, 1157346, 1146063, 1159931, 1184913, 1158868, 1170415, 1140643,\n", - " 1143139, 1143146, 1159641, 1158643, 1156181, 1159025, 1159032, 1152247,\n", - " 1160605, 1155588, 1158405, 1147830, 1164580, 1161240, 1144739, 1144750,\n", - " 1163522, 1163527, 1145139, 1141471, 1151650, 1147426, 1147427, 1184816,\n", - " 1156739, 1184097, 1150646, 1171040, 1144812, 1135567, 1165716, 1180505,\n", - " 1142733, 1167339, 1145743, 1145728, 1163777, 1166924, 1165943, 1169295,\n", - " 1160781, 1166451, 1150531, 1142136, 1152624, 1145900, 1145902, 1153534,\n", - " 1151744, 1143395, 1143404, 1170980, 1171863, 1169743, 1158722, 1154076,\n", - " 1170766, 1162893, 1166653, 1171777, 1154213, 1150518, 1146605, 1144346,\n", - " 1144336, 1147750, 1154670, 1153005, 1169162, 1169359, 1149680, 1158062,\n", - " 1149847, 1159851, 1167085, 1155494, 1152353, 1152362, 1143865, 1149402,\n", - " 1165911, 1173307, 1154019, 1152151, 1169575, 1151696, 1157153, 1157371,\n", - " 1147696, 1147711, 1151850, 1151852, 1148141, 1170488, 1170490, 1179578,\n", - " 1170688, 1155734, 1162106, 1140326, 1143241, 1179351, 1172932, 1174845,\n", - " 1173091, 1159100, 1150234, 1154151, 1154148, 1167511, 1149169, 1186117,\n", - " 1143279, 1169761, 1168481, 1143420, 1171297, 1153141, 1171122, 1182651,\n", - " 1179807, 1171623, 1176933, 1183256, 1155804, 1157081, 1178952, 1191755,\n", - " 1164563, 1178213, 1145626, 1156446, 1178028, 1149753, 1149755, 1153601,\n", - " 1153609, 1155992, 1155990, 1155892, 1155899, 1155897, 1189641, 1169064,\n", - " 1164437, 1163422, 1179130, 1176706, 1170034, 1168943, 1192781, 1156539,\n", - " 1139828, 1139831, 1150265, 1154812, 1149668, 1189687, 1163847, 1156055,\n", - " 1173019, 1181452, 1149544, 1167840, 1181913, 1182165, 1152113, 1177192,\n", - " 1177374, 1172403, 1170128, 1175349, 1150406, 1167089, 1172429, 1182562,\n", - " 1155959, 1155962, 1187504, 1183672, 1179361, 1191250], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137213, 1141424, 1135926, 1135160, 1137784, 1141758, 1136215, 1142321,\n", - " 1136962, 1141443, 1149831, 1139811, 1146978, 1137936, 1145999, 1138933,\n", - " 1138938, 1145043, 1143372, 1143363, 1139241, 1146640, 1142963, 1139865,\n", - " 1139866, 1148589, 1149216, 1155686, 1147473, 1147483, 1149294, 1153943,\n", - " 1144636, 1149033, 1146656, 1146660, 1135477, 1135481, 1136122, 1152666,\n", - " 1147089, 1147095, 1147204, 1136683, 1150322, 1150329, 1140537, 1138112,\n", - " 1138119, 1137172, 1140159, 1134720, 1134735, 1140020, 1135360, 1135367,\n", - " 1135202, 1140767, 1141036, 1134794, 1143386, 1136178, 1144395, 1137529,\n", - " 1137534, 1157398, 1157397, 1137441, 1135265, 1135583, 1141086, 1135830,\n", - " 1155086, 1156342, 1138514, 1138524, 1137957, 1154132, 1137021, 1135522,\n", - " 1138305, 1138436, 1138440, 1138461, 1138449, 1154787, 1137925, 1158390,\n", - " 1149328, 1138846, 1147112, 1147119, 1142611, 1160518, 1138181, 1148531,\n", - " 1135760, 1143584, 1134992, 1134770, 1142434, 1148805, 1136728, 1158974,\n", - " 1139321, 1141070, 1153543, 1140034, 1138151, 1155654, 1140557, 1141997,\n", - " 1152042, 1152044, 1147317, 1134742, 1134750, 1138246, 1136697, 1141098,\n", - " 1141100, 1144128, 1149001, 1139889, 1141975, 1143775, 1143221, 1143224,\n", - " 1139025, 1140007, 1140470, 1141224, 1141892, 1136917, 1137185, 1144230,\n", - " 1141786, 1139495, 1144929, 1144934, 1141606, 1141609, 1144650, 1134979,\n", - " 1136852, 1160054, 1139798, 1144428, 1149105, 1149111, 1148867, 1158600,\n", - " 1139190, 1137060, 1138708, 1140110, 1142913, 1138424, 1143111, 1144596,\n", - " 1144599, 1136864, 1145298, 1141578, 1141398, 1141396, 1140445, 1144182,\n", - " 1139563, 1158703, 1147153, 1141365, 1153068, 1151106, 1141718, 1149097,\n", - " 1139022, 1139505, 1139508, 1139127, 1140976, 1140983, 1140990, 1146695,\n", - " 1146702, 1147050, 1152976, 1135457, 1139446, 1141925, 1144243, 1144242,\n", - " 1141841, 1138728, 1137571, 1141378, 1144072, 1143851, 1146024, 1138085,\n", - " 1154323, 1139990, 1143293, 1147543, 1147540, 1148763, 1147282, 1142816,\n", - " 1147458, 1139417, 1136160, 1142588, 1157720, 1136836, 1139328, 1142158,\n", - " 1143345, 1144619, 1144088, 1144093, 1150755, 1144380, 1143457, 1144303,\n", - " 1140482, 1142001, 1143937, 1135441, 1135442, 1147532, 1140364, 1143080,\n", - " 1147999, 1146957, 1146950, 1148704, 1141825, 1146742, 1147025, 1145011,\n", - " 1158226, 1150459, 1143921, 1154526, 1145240, 1145747, 1152530, 1152532,\n", - " 1150280, 1150438, 1150437, 1150445, 1149263, 1149791, 1141358, 1150342,\n", - " 1147794, 1151480, 1144884, 1144888, 1145259, 1135512, 1135516, 1134869,\n", - " 1140566, 1148702, 1150127, 1147021, 1147023, 1153152, 1152806, 1144819,\n", - " 1149991, 1153575, 1147653, 1148294, 1148300, 1139099, 1154420, 1154424,\n", - " 1148180, 1139718, 1146686, 1152481, 1152435, 1152441, 1148204, 1154168,\n", - " 1153124, 1153188, 1145106, 1145111, 1152974, 1150932, 1152867, 1144863,\n", - " 1150356, 1146237, 1143121, 1147446, 1147447, 1152581, 1135307, 1151906,\n", - " 1172680, 1148498, 1141420, 1136002, 1147737, 1149385, 1150890, 1146967,\n", - " 1146623, 1164772, 1144465, 1152409, 1152100, 1153038, 1137746, 1152612,\n", - " 1157107, 1155337, 1154123, 1157842, 1154633, 1164760, 1151617, 1150585,\n", - " 1150588, 1145952, 1152903, 1156826, 1138272, 1152300, 1156001, 1136028,\n", - " 1136029, 1158704, 1151187, 1140676, 1152928, 1154733, 1142777, 1156422,\n", - " 1150150, 1153686, 1148040, 1145656, 1149794, 1137048, 1148628, 1148637,\n", - " 1158540, 1137458, 1149946, 1148253, 1135698, 1153085, 1158859, 1158860,\n", - " 1158916, 1137877, 1156505, 1157057, 1155412, 1152841, 1145187, 1143502,\n", - " 1157565, 1150465, 1149047, 1152179, 1156629, 1156638, 1156935, 1147810,\n", - " 1158308, 1155441, 1150132, 1150136, 1138969, 1156919, 1145610, 1154227,\n", - " 1151379, 1158628, 1155374, 1155122, 1157174, 1135396, 1135406, 1146913,\n", - " 1145806, 1156463, 1154763, 1155628, 1148647, 1155646, 1143257, 1161792,\n", - " 1160210, 1163371, 1139619, 1137359, 1151327, 1143189, 1153322, 1147908,\n", - " 1141627, 1143517, 1143516, 1157934, 1145693, 1145690, 1154000, 1134677,\n", - " 1135601, 1135605, 1148149, 1158664, 1158665, 1157684, 1146321, 1149145,\n", - " 1149146, 1156085, 1152209, 1152220, 1159213, 1155439, 1156693, 1159132,\n", - " 1157028, 1157031, 1144843, 1142475, 1155975, 1156812, 1156810, 1161897,\n", - " 1155402, 1149702, 1154600, 1136896, 1158760, 1158447, 1152131, 1153812,\n", - " 1157675, 1166424, 1142178, 1147788, 1158558, 1146113, 1146126, 1158006,\n", - " 1142487, 1142663, 1167359, 1156032, 1162683, 1159061, 1151832, 1153052,\n", - " 1153042, 1153045, 1171551, 1153841, 1156100, 1156107, 1138393, 1150046,\n", - " 1164557, 1155479, 1153519, 1138161, 1156787, 1154590, 1139290, 1139281,\n", - " 1156983, 1157346, 1146063, 1159931, 1184913, 1158868, 1170415, 1140643,\n", - " 1143139, 1143146, 1159641, 1158643, 1156181, 1159025, 1159032, 1152247,\n", - " 1160605, 1155588, 1158405, 1147830, 1164580, 1161240, 1144739, 1144750,\n", - " 1163522, 1163527, 1145139, 1141471, 1151650, 1147426, 1147427, 1184816,\n", - " 1156739, 1184097, 1150646, 1171040, 1144812, 1135567, 1165716, 1180505,\n", - " 1142733, 1167339, 1145743, 1145728, 1163777, 1166924, 1165943, 1169295,\n", - " 1160781, 1166451, 1150531, 1142136, 1152624, 1145900, 1145902, 1153534,\n", - " 1151744, 1143395, 1143404, 1170980, 1171863, 1169743, 1158722, 1154076,\n", - " 1170766, 1162893, 1166653, 1171777, 1154213, 1150518, 1146605, 1144346,\n", - " 1144336, 1147750, 1154670, 1153005, 1169162, 1169359, 1149680, 1158062,\n", - " 1149847, 1159851, 1167085, 1155494, 1152353, 1152362, 1143865, 1149402,\n", - " 1165911, 1173307, 1154019, 1152151, 1169575, 1151696, 1157153, 1157371,\n", - " 1147696, 1147711, 1151850, 1151852, 1148141, 1170488, 1170490, 1179578,\n", - " 1170688, 1155734, 1162106, 1140326, 1143241, 1179351, 1172932, 1174845,\n", - " 1173091, 1159100, 1150234, 1154151, 1154148, 1167511, 1149169, 1186117,\n", - " 1143279, 1169761, 1168481, 1143420, 1171297, 1153141, 1171122, 1182651,\n", - " 1179807, 1171623, 1176933, 1183256, 1155804, 1157081, 1178952, 1191755,\n", - " 1164563, 1178213, 1145626, 1156446, 1178028, 1149753, 1149755, 1153601,\n", - " 1153609, 1155992, 1155990, 1155892, 1155899, 1155897, 1189641, 1169064,\n", - " 1164437, 1163422, 1179130, 1176706, 1170034, 1168943, 1192781, 1156539,\n", - " 1139828, 1139831, 1150265, 1154812, 1149668, 1189687, 1163847, 1156055,\n", - " 1173019, 1181452, 1149544, 1167840, 1181913, 1182165, 1152113, 1177192,\n", - " 1177374, 1172403, 1170128, 1175349, 1150406, 1167089, 1172429, 1182562,\n", - " 1155959, 1155962, 1187504, 1183672, 1179361, 1191250], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195202, 1196013, 1197841, 1195697, 1199736, 1197719, 1198729, 1198730,\n", - " 1199282, 1198449, 1202255, 1198844, 1201577, 1201582, 1199146, 1202119,\n", - " 1194626, 1200643, 1201016, 1198694, 1196956, 1202803, 1202812, 1198557,\n", - " 1196573, 1194770, 1196631, 1194649, 1194655, 1195514, 1195259, 1199135,\n", - " 1196030, 1196031, 1198542, 1199519, 1194882, 1195888, 1195895, 1199171,\n", - " 1197856, 1196359, 1197831, 1194664, 1195313, 1195325, 1197792, 1197793,\n", - " 1196230, 1198163, 1198167, 1198161, 1195265, 1197141, 1197140, 1195245,\n", - " 1196109, 1198219, 1195847, 1195541, 1197474, 1197478, 1195744, 1199697,\n", - " 1196283, 1198282, 1199329, 1199333, 1199059, 1197291, 1194928, 1197577,\n", - " 1197674, 1198406, 1198410, 1200747, 1199231, 1201916, 1194795, 1200060,\n", - " 1199949, 1201511, 1197601, 1196727, 1200894, 1198416, 1199557, 1201824,\n", - " 1201827, 1200563, 1200169, 1200503, 1198066, 1201079, 1201155, 1201156,\n", - " 1202630, 1200991, 1201056, 1194805, 1199712, 1203347, 1200526, 1200553,\n", - " 1197097, 1201726, 1197040, 1200692, 1199908, 1196779, 1201442, 1202239,\n", - " 1200831, 1200899, 1202175, 1201291, 1202477, 1198478, 1195601, 1199925,\n", - " 1196963, 1200784, 1200785, 1195438, 1195676, 1198055, 1198929, 1200684,\n", - " 1195181, 1194898, 1200585, 1199659, 1201138, 1198830, 1198824, 1197735,\n", - " 1198819, 1195066, 1201886, 1200301, 1196428], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195202, 1196013, 1197841, 1195697, 1199736, 1197719, 1198729, 1198730,\n", - " 1199282, 1198449, 1202255, 1198844, 1201577, 1201582, 1199146, 1202119,\n", - " 1194626, 1200643, 1201016, 1198694, 1196956, 1202803, 1202812, 1198557,\n", - " 1196573, 1194770, 1196631, 1194649, 1194655, 1195514, 1195259, 1199135,\n", - " 1196030, 1196031, 1198542, 1199519, 1194882, 1195888, 1195895, 1199171,\n", - " 1197856, 1196359, 1197831, 1194664, 1195313, 1195325, 1197792, 1197793,\n", - " 1196230, 1198163, 1198167, 1198161, 1195265, 1197141, 1197140, 1195245,\n", - " 1196109, 1198219, 1195847, 1195541, 1197474, 1197478, 1195744, 1199697,\n", - " 1196283, 1198282, 1199329, 1199333, 1199059, 1197291, 1194928, 1197577,\n", - " 1197674, 1198406, 1198410, 1200747, 1199231, 1201916, 1194795, 1200060,\n", - " 1199949, 1201511, 1197601, 1196727, 1200894, 1198416, 1199557, 1201824,\n", - " 1201827, 1200563, 1200169, 1200503, 1198066, 1201079, 1201155, 1201156,\n", - " 1202630, 1200991, 1201056, 1194805, 1199712, 1203347, 1200526, 1200553,\n", - " 1197097, 1201726, 1197040, 1200692, 1199908, 1196779, 1201442, 1202239,\n", - " 1200831, 1200899, 1202175, 1201291, 1202477, 1198478, 1195601, 1199925,\n", - " 1196963, 1200784, 1200785, 1195438, 1195676, 1198055, 1198929, 1200684,\n", - " 1195181, 1194898, 1200585, 1199659, 1201138, 1198830, 1198824, 1197735,\n", - " 1198819, 1195066, 1201886, 1200301, 1196428], device='cuda:0',\n", - " dtype=torch.int32))\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006935\n", - "sampling 0.006426\n", - "noi time: 0.001936\n", - "get_vertex_data call: 0.070939\n", - "noi group time: 0.002056\n", - "eoi_group_time: 0.016206\n", - "second half: 0.258737\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 24187, 21471, ..., 1110065, 1119052, 1133551],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 24187, 21471, ..., 1110065, 1119052, 1133551],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1221610, 1221043, 1203800, ..., 1937986, 1930684, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1221610, 1221043, 1203800, ..., 1937986, 1930684, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1137435, 1141424, 1141435, 1136349, 1135920, 1135926, 1135152,\n", - " 1135726, 1137791, 1140785, 1140793, 1141751, 1141758, 1134955, 1136208,\n", - " 1142802, 1142807, 1136150, 1141443, 1146804, 1143615, 1139808, 1139817,\n", - " 1139821, 1139811, 1137947, 1138936, 1143372, 1146640, 1146647, 1139615,\n", - " 1140783, 1150503, 1150506, 1139865, 1134937, 1134943, 1136959, 1143820,\n", - " 1149633, 1147473, 1147483, 1141882, 1135990, 1135999, 1149283, 1144636,\n", - " 1153008, 1134701, 1135951, 1148350, 1146661, 1136112, 1152666, 1153220,\n", - " 1147094, 1147102, 1141912, 1155019, 1139364, 1139374, 1139371, 1147202,\n", - " 1147211, 1134661, 1134662, 1140540, 1140542, 1154414, 1137254, 1137261,\n", - " 1137180, 1138366, 1135913, 1140020, 1140028, 1140947, 1140953, 1135367,\n", - " 1135202, 1134968, 1136778, 1134794, 1134797, 1138504, 1138508, 1143068,\n", - " 1143069, 1137682, 1136618, 1135328, 1144395, 1137529, 1137534, 1157397,\n", - " 1152376, 1136578, 1137441, 1136195, 1135265, 1148481, 1139162, 1139161,\n", - " 1135582, 1142602, 1142607, 1141084, 1141086, 1136105, 1138514, 1138516,\n", - " 1153094, 1153099, 1137953, 1137959, 1138590, 1145127, 1137019, 1135527,\n", - " 1139684, 1138319, 1137287, 1139877, 1138436, 1138440, 1138445, 1138451,\n", - " 1138461, 1137498, 1136594, 1135123, 1158386, 1149328, 1138836, 1138846,\n", - " 1156606, 1147116, 1147118, 1142611, 1135034, 1135359, 1158987, 1145843,\n", - " 1148536, 1141523, 1141533, 1139674, 1139664, 1138067, 1138070, 1142255,\n", - " 1134992, 1152651, 1136723, 1158974, 1139318, 1153544, 1153547, 1152696,\n", - " 1139933, 1138150, 1141963, 1134888, 1140557, 1141985, 1152042, 1139069,\n", - " 1142302, 1140660, 1137728, 1135540, 1135541, 1141088, 1141100, 1149001,\n", - " 1143767, 1154860, 1154863, 1137299, 1139025, 1149979, 1146832, 1141681,\n", - " 1135860, 1136418, 1136625, 1140469, 1139386, 1136917, 1143673, 1143676,\n", - " 1137188, 1144237, 1139495, 1136753, 1168566, 1136862, 1147851, 1137086,\n", - " 1144428, 1138482, 1142056, 1142053, 1153668, 1143202, 1140110, 1142913,\n", - " 1143107, 1143113, 1144596, 1136866, 1136867, 1136864, 1144182, 1134827,\n", - " 1137841, 1141365, 1141367, 1141720, 1149090, 1138292, 1138293, 1144279,\n", - " 1144287, 1153556, 1139508, 1139510, 1145200, 1140977, 1141560, 1141565,\n", - " 1147050, 1145885, 1145873, 1143543, 1152976, 1152988, 1142556, 1139000,\n", - " 1141925, 1144245, 1140585, 1137149, 1150243, 1139405, 1143643, 1141382,\n", - " 1143851, 1146140, 1154332, 1141585, 1142533, 1139990, 1143293, 1143283,\n", - " 1143294, 1143290, 1151124, 1150424, 1147549, 1147282, 1142816, 1149161,\n", - " 1149362, 1149366, 1149372, 1148010, 1146091, 1146087, 1136160, 1157720,\n", - " 1136836, 1136843, 1139297, 1139329, 1139341, 1150184, 1144778, 1142159,\n", - " 1143345, 1144765, 1144619, 1135876, 1150756, 1146513, 1146523, 1143957,\n", - " 1143960, 1143959, 1138024, 1138018, 1143456, 1143457, 1143949, 1135454,\n", - " 1155700, 1143799, 1143807, 1146626, 1147521, 1140364, 1137990, 1166410,\n", - " 1148962, 1144219, 1146949, 1144008, 1139255, 1147121, 1148704, 1141825,\n", - " 1141827, 1153701, 1143434, 1147025, 1147971, 1158226, 1158231, 1143921,\n", - " 1143928, 1147873, 1147874, 1145240, 1145750, 1142374, 1135598, 1135586,\n", - " 1148391, 1138857, 1151242, 1152530, 1150280, 1150274, 1151182, 1150445,\n", - " 1148821, 1154437, 1151860, 1149791, 1144514, 1144526, 1141349, 1138044,\n", - " 1138045, 1138034, 1152013, 1144203, 1151987, 1144881, 1151041, 1140561,\n", - " 1148693, 1148701, 1147019, 1147009, 1158958, 1141942, 1141949, 1144821,\n", - " 1151792, 1167217, 1153574, 1147653, 1143560, 1149412, 1146412, 1151724,\n", - " 1152073, 1135087, 1147866, 1151412, 1154420, 1136251, 1136247, 1136252,\n", - " 1146686, 1138404, 1152436, 1148720, 1144107, 1147616, 1146549, 1149810,\n", - " 1150061, 1143895, 1148204, 1156212, 1154203, 1153125, 1153192, 1153197,\n", - " 1145119, 1152963, 1152919, 1148062, 1143093, 1150352, 1150356, 1150358,\n", - " 1150367, 1147446, 1152581, 1150715, 1145640, 1148505, 1141408, 1136002,\n", - " 1150637, 1151356, 1147602, 1147737, 1153454, 1148949, 1156413, 1147383,\n", - " 1149359, 1153249, 1146623, 1144472, 1135688, 1152849, 1152407, 1152409,\n", - " 1146280, 1156325, 1153030, 1153034, 1153037, 1153038, 1150085, 1150093,\n", - " 1145542, 1137746, 1146304, 1152622, 1140517, 1152057, 1136401, 1136410,\n", - " 1149203, 1151953, 1155337, 1154119, 1157833, 1152673, 1152680, 1154625,\n", - " 1151573, 1151617, 1150586, 1136132, 1136134, 1148916, 1148921, 1152944,\n", - " 1153387, 1152903, 1151296, 1143998, 1152341, 1158429, 1138279, 1157139,\n", - " 1152301, 1136028, 1158704, 1156619, 1156622, 1151064, 1143479, 1156422,\n", - " 1163489, 1150099, 1160551, 1167940, 1153690, 1148033, 1148040, 1149300,\n", - " 1155222, 1149792, 1149804, 1137048, 1148628, 1158530, 1158540, 1148373,\n", - " 1137458, 1166145, 1143444, 1150966, 1157547, 1148884, 1158918, 1152392,\n", - " 1152397, 1157064, 1155414, 1155418, 1152838, 1152833, 1137814, 1145388,\n", - " 1145387, 1156638, 1151788, 1150819, 1150830, 1135634, 1137625, 1158311,\n", - " 1151271, 1155441, 1153359, 1162120, 1140868, 1154530, 1138963, 1156915,\n", - " 1145610, 1150485, 1142755, 1142764, 1156207, 1156269, 1157637, 1158635,\n", - " 1156649, 1155122, 1160393, 1152527, 1157172, 1155755, 1146913, 1145794,\n", - " 1155626, 1155628, 1155629, 1155630, 1158824, 1158331, 1157315, 1154036,\n", - " 1156998, 1148836, 1148834, 1148835, 1153368, 1154250, 1154240, 1151892,\n", - " 1151321, 1143189, 1141623, 1143517, 1157920, 1157654, 1157663, 1180909,\n", - " 1158126, 1158584, 1153781, 1158205, 1137381, 1137385, 1159116, 1135601,\n", - " 1135611, 1148148, 1148149, 1163894, 1150671, 1138215, 1149151, 1140628,\n", - " 1155717, 1152215, 1152509, 1156692, 1140380, 1140381, 1155884, 1157732,\n", - " 1155975, 1142073, 1135199, 1158846, 1149696, 1149700, 1154604, 1160163,\n", - " 1136899, 1158886, 1140208, 1161692, 1159164, 1158815, 1156774, 1136494,\n", - " 1156665, 1153112, 1153808, 1136646, 1136642, 1134762, 1134757, 1140049,\n", - " 1140055, 1157858, 1158558, 1156513, 1146123, 1154339, 1144584, 1150011,\n", - " 1155521, 1155529, 1161539, 1142492, 1135662, 1142666, 1157759, 1157751,\n", - " 1159054, 1172286, 1159146, 1163267, 1142424, 1158303, 1155185, 1160572,\n", - " 1153052, 1156235, 1166271, 1153842, 1156098, 1156104, 1156111, 1150035,\n", - " 1149063, 1149070, 1145948, 1153514, 1153519, 1147300, 1138162, 1164006,\n", - " 1160764, 1139281, 1146063, 1160189, 1140643, 1141867, 1148603, 1172725,\n", - " 1168165, 1155816, 1156355, 1158653, 1159025, 1159032, 1166284, 1169104,\n", - " 1152247, 1143729, 1158905, 1155588, 1162552, 1151227, 1153924, 1153933,\n", - " 1153934, 1168426, 1148560, 1144979, 1167933, 1146500, 1146510, 1152776,\n", - " 1147433, 1149899, 1156739, 1166591, 1150649, 1144812, 1184422, 1162085,\n", - " 1156303, 1162613, 1145736, 1163783, 1145567, 1145228, 1167757, 1154695,\n", - " 1144966, 1162513, 1184040, 1148166, 1191935, 1143036, 1143025, 1165202,\n", - " 1152626, 1148124, 1193477, 1147723, 1145900, 1145902, 1153520, 1143397,\n", - " 1158724, 1158734, 1154076, 1147338, 1144699, 1177935, 1150781, 1150783,\n", - " 1149130, 1154912, 1171979, 1144681, 1166653, 1145326, 1150515, 1150518,\n", - " 1156112, 1156119, 1144342, 1144347, 1144336, 1147746, 1147751, 1154656,\n", - " 1154670, 1135854, 1152997, 1157331, 1169359, 1149452, 1149688, 1158623,\n", - " 1158062, 1173047, 1149845, 1157383, 1159849, 1159851, 1172644, 1178729,\n", - " 1169948, 1160530, 1152353, 1148667, 1177984, 1169264, 1171705, 1152150,\n", - " 1167857, 1151696, 1157153, 1167232, 1168122, 1168126, 1147711, 1151850,\n", - " 1149247, 1149235, 1141549, 1140326, 1143238, 1144548, 1174845, 1159100,\n", - " 1166682, 1166684, 1170874, 1161591, 1158176, 1149179, 1149173, 1172538,\n", - " 1159751, 1167658, 1156559, 1171311, 1181246, 1159404, 1153137, 1163099,\n", - " 1144910, 1168774, 1166554, 1161255, 1154718, 1157792, 1157795, 1171623,\n", - " 1157997, 1180036, 1158253, 1153898, 1154497, 1162403, 1162407, 1145626,\n", - " 1156443, 1156446, 1180383, 1157483, 1161911, 1149755, 1153609, 1157772,\n", - " 1158513, 1158934, 1158940, 1155890, 1155899, 1155895, 1180852, 1140399,\n", - " 1189885, 1168883, 1165078, 1154953, 1161819, 1146161, 1147172, 1172608,\n", - " 1156162, 1189070, 1183860, 1170041, 1185377, 1183021, 1170822, 1139831,\n", - " 1164914, 1151286, 1151295, 1156049, 1156055, 1182836, 1146394, 1146395,\n", - " 1173058, 1186648, 1194031, 1149547, 1149536, 1192166, 1156838, 1148787,\n", - " 1169964, 1182551, 1190250, 1185978, 1171059, 1179852, 1188825, 1151774,\n", - " 1152115, 1169703, 1166841, 1186573, 1163146, 1177845, 1150406, 1150400,\n", - " 1161186, 1158064, 1145395, 1155959, 1155952, 1181656, 1187846, 1178456,\n", - " 1155553, 1192282, 1169831, 1189036, 1190342, 1188736, 1157012],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1137435, 1141424, 1141435, 1136349, 1135920, 1135926, 1135152,\n", - " 1135726, 1137791, 1140785, 1140793, 1141751, 1141758, 1134955, 1136208,\n", - " 1142802, 1142807, 1136150, 1141443, 1146804, 1143615, 1139808, 1139817,\n", - " 1139821, 1139811, 1137947, 1138936, 1143372, 1146640, 1146647, 1139615,\n", - " 1140783, 1150503, 1150506, 1139865, 1134937, 1134943, 1136959, 1143820,\n", - " 1149633, 1147473, 1147483, 1141882, 1135990, 1135999, 1149283, 1144636,\n", - " 1153008, 1134701, 1135951, 1148350, 1146661, 1136112, 1152666, 1153220,\n", - " 1147094, 1147102, 1141912, 1155019, 1139364, 1139374, 1139371, 1147202,\n", - " 1147211, 1134661, 1134662, 1140540, 1140542, 1154414, 1137254, 1137261,\n", - " 1137180, 1138366, 1135913, 1140020, 1140028, 1140947, 1140953, 1135367,\n", - " 1135202, 1134968, 1136778, 1134794, 1134797, 1138504, 1138508, 1143068,\n", - " 1143069, 1137682, 1136618, 1135328, 1144395, 1137529, 1137534, 1157397,\n", - " 1152376, 1136578, 1137441, 1136195, 1135265, 1148481, 1139162, 1139161,\n", - " 1135582, 1142602, 1142607, 1141084, 1141086, 1136105, 1138514, 1138516,\n", - " 1153094, 1153099, 1137953, 1137959, 1138590, 1145127, 1137019, 1135527,\n", - " 1139684, 1138319, 1137287, 1139877, 1138436, 1138440, 1138445, 1138451,\n", - " 1138461, 1137498, 1136594, 1135123, 1158386, 1149328, 1138836, 1138846,\n", - " 1156606, 1147116, 1147118, 1142611, 1135034, 1135359, 1158987, 1145843,\n", - " 1148536, 1141523, 1141533, 1139674, 1139664, 1138067, 1138070, 1142255,\n", - " 1134992, 1152651, 1136723, 1158974, 1139318, 1153544, 1153547, 1152696,\n", - " 1139933, 1138150, 1141963, 1134888, 1140557, 1141985, 1152042, 1139069,\n", - " 1142302, 1140660, 1137728, 1135540, 1135541, 1141088, 1141100, 1149001,\n", - " 1143767, 1154860, 1154863, 1137299, 1139025, 1149979, 1146832, 1141681,\n", - " 1135860, 1136418, 1136625, 1140469, 1139386, 1136917, 1143673, 1143676,\n", - " 1137188, 1144237, 1139495, 1136753, 1168566, 1136862, 1147851, 1137086,\n", - " 1144428, 1138482, 1142056, 1142053, 1153668, 1143202, 1140110, 1142913,\n", - " 1143107, 1143113, 1144596, 1136866, 1136867, 1136864, 1144182, 1134827,\n", - " 1137841, 1141365, 1141367, 1141720, 1149090, 1138292, 1138293, 1144279,\n", - " 1144287, 1153556, 1139508, 1139510, 1145200, 1140977, 1141560, 1141565,\n", - " 1147050, 1145885, 1145873, 1143543, 1152976, 1152988, 1142556, 1139000,\n", - " 1141925, 1144245, 1140585, 1137149, 1150243, 1139405, 1143643, 1141382,\n", - " 1143851, 1146140, 1154332, 1141585, 1142533, 1139990, 1143293, 1143283,\n", - " 1143294, 1143290, 1151124, 1150424, 1147549, 1147282, 1142816, 1149161,\n", - " 1149362, 1149366, 1149372, 1148010, 1146091, 1146087, 1136160, 1157720,\n", - " 1136836, 1136843, 1139297, 1139329, 1139341, 1150184, 1144778, 1142159,\n", - " 1143345, 1144765, 1144619, 1135876, 1150756, 1146513, 1146523, 1143957,\n", - " 1143960, 1143959, 1138024, 1138018, 1143456, 1143457, 1143949, 1135454,\n", - " 1155700, 1143799, 1143807, 1146626, 1147521, 1140364, 1137990, 1166410,\n", - " 1148962, 1144219, 1146949, 1144008, 1139255, 1147121, 1148704, 1141825,\n", - " 1141827, 1153701, 1143434, 1147025, 1147971, 1158226, 1158231, 1143921,\n", - " 1143928, 1147873, 1147874, 1145240, 1145750, 1142374, 1135598, 1135586,\n", - " 1148391, 1138857, 1151242, 1152530, 1150280, 1150274, 1151182, 1150445,\n", - " 1148821, 1154437, 1151860, 1149791, 1144514, 1144526, 1141349, 1138044,\n", - " 1138045, 1138034, 1152013, 1144203, 1151987, 1144881, 1151041, 1140561,\n", - " 1148693, 1148701, 1147019, 1147009, 1158958, 1141942, 1141949, 1144821,\n", - " 1151792, 1167217, 1153574, 1147653, 1143560, 1149412, 1146412, 1151724,\n", - " 1152073, 1135087, 1147866, 1151412, 1154420, 1136251, 1136247, 1136252,\n", - " 1146686, 1138404, 1152436, 1148720, 1144107, 1147616, 1146549, 1149810,\n", - " 1150061, 1143895, 1148204, 1156212, 1154203, 1153125, 1153192, 1153197,\n", - " 1145119, 1152963, 1152919, 1148062, 1143093, 1150352, 1150356, 1150358,\n", - " 1150367, 1147446, 1152581, 1150715, 1145640, 1148505, 1141408, 1136002,\n", - " 1150637, 1151356, 1147602, 1147737, 1153454, 1148949, 1156413, 1147383,\n", - " 1149359, 1153249, 1146623, 1144472, 1135688, 1152849, 1152407, 1152409,\n", - " 1146280, 1156325, 1153030, 1153034, 1153037, 1153038, 1150085, 1150093,\n", - " 1145542, 1137746, 1146304, 1152622, 1140517, 1152057, 1136401, 1136410,\n", - " 1149203, 1151953, 1155337, 1154119, 1157833, 1152673, 1152680, 1154625,\n", - " 1151573, 1151617, 1150586, 1136132, 1136134, 1148916, 1148921, 1152944,\n", - " 1153387, 1152903, 1151296, 1143998, 1152341, 1158429, 1138279, 1157139,\n", - " 1152301, 1136028, 1158704, 1156619, 1156622, 1151064, 1143479, 1156422,\n", - " 1163489, 1150099, 1160551, 1167940, 1153690, 1148033, 1148040, 1149300,\n", - " 1155222, 1149792, 1149804, 1137048, 1148628, 1158530, 1158540, 1148373,\n", - " 1137458, 1166145, 1143444, 1150966, 1157547, 1148884, 1158918, 1152392,\n", - " 1152397, 1157064, 1155414, 1155418, 1152838, 1152833, 1137814, 1145388,\n", - " 1145387, 1156638, 1151788, 1150819, 1150830, 1135634, 1137625, 1158311,\n", - " 1151271, 1155441, 1153359, 1162120, 1140868, 1154530, 1138963, 1156915,\n", - " 1145610, 1150485, 1142755, 1142764, 1156207, 1156269, 1157637, 1158635,\n", - " 1156649, 1155122, 1160393, 1152527, 1157172, 1155755, 1146913, 1145794,\n", - " 1155626, 1155628, 1155629, 1155630, 1158824, 1158331, 1157315, 1154036,\n", - " 1156998, 1148836, 1148834, 1148835, 1153368, 1154250, 1154240, 1151892,\n", - " 1151321, 1143189, 1141623, 1143517, 1157920, 1157654, 1157663, 1180909,\n", - " 1158126, 1158584, 1153781, 1158205, 1137381, 1137385, 1159116, 1135601,\n", - " 1135611, 1148148, 1148149, 1163894, 1150671, 1138215, 1149151, 1140628,\n", - " 1155717, 1152215, 1152509, 1156692, 1140380, 1140381, 1155884, 1157732,\n", - " 1155975, 1142073, 1135199, 1158846, 1149696, 1149700, 1154604, 1160163,\n", - " 1136899, 1158886, 1140208, 1161692, 1159164, 1158815, 1156774, 1136494,\n", - " 1156665, 1153112, 1153808, 1136646, 1136642, 1134762, 1134757, 1140049,\n", - " 1140055, 1157858, 1158558, 1156513, 1146123, 1154339, 1144584, 1150011,\n", - " 1155521, 1155529, 1161539, 1142492, 1135662, 1142666, 1157759, 1157751,\n", - " 1159054, 1172286, 1159146, 1163267, 1142424, 1158303, 1155185, 1160572,\n", - " 1153052, 1156235, 1166271, 1153842, 1156098, 1156104, 1156111, 1150035,\n", - " 1149063, 1149070, 1145948, 1153514, 1153519, 1147300, 1138162, 1164006,\n", - " 1160764, 1139281, 1146063, 1160189, 1140643, 1141867, 1148603, 1172725,\n", - " 1168165, 1155816, 1156355, 1158653, 1159025, 1159032, 1166284, 1169104,\n", - " 1152247, 1143729, 1158905, 1155588, 1162552, 1151227, 1153924, 1153933,\n", - " 1153934, 1168426, 1148560, 1144979, 1167933, 1146500, 1146510, 1152776,\n", - " 1147433, 1149899, 1156739, 1166591, 1150649, 1144812, 1184422, 1162085,\n", - " 1156303, 1162613, 1145736, 1163783, 1145567, 1145228, 1167757, 1154695,\n", - " 1144966, 1162513, 1184040, 1148166, 1191935, 1143036, 1143025, 1165202,\n", - " 1152626, 1148124, 1193477, 1147723, 1145900, 1145902, 1153520, 1143397,\n", - " 1158724, 1158734, 1154076, 1147338, 1144699, 1177935, 1150781, 1150783,\n", - " 1149130, 1154912, 1171979, 1144681, 1166653, 1145326, 1150515, 1150518,\n", - " 1156112, 1156119, 1144342, 1144347, 1144336, 1147746, 1147751, 1154656,\n", - " 1154670, 1135854, 1152997, 1157331, 1169359, 1149452, 1149688, 1158623,\n", - " 1158062, 1173047, 1149845, 1157383, 1159849, 1159851, 1172644, 1178729,\n", - " 1169948, 1160530, 1152353, 1148667, 1177984, 1169264, 1171705, 1152150,\n", - " 1167857, 1151696, 1157153, 1167232, 1168122, 1168126, 1147711, 1151850,\n", - " 1149247, 1149235, 1141549, 1140326, 1143238, 1144548, 1174845, 1159100,\n", - " 1166682, 1166684, 1170874, 1161591, 1158176, 1149179, 1149173, 1172538,\n", - " 1159751, 1167658, 1156559, 1171311, 1181246, 1159404, 1153137, 1163099,\n", - " 1144910, 1168774, 1166554, 1161255, 1154718, 1157792, 1157795, 1171623,\n", - " 1157997, 1180036, 1158253, 1153898, 1154497, 1162403, 1162407, 1145626,\n", - " 1156443, 1156446, 1180383, 1157483, 1161911, 1149755, 1153609, 1157772,\n", - " 1158513, 1158934, 1158940, 1155890, 1155899, 1155895, 1180852, 1140399,\n", - " 1189885, 1168883, 1165078, 1154953, 1161819, 1146161, 1147172, 1172608,\n", - " 1156162, 1189070, 1183860, 1170041, 1185377, 1183021, 1170822, 1139831,\n", - " 1164914, 1151286, 1151295, 1156049, 1156055, 1182836, 1146394, 1146395,\n", - " 1173058, 1186648, 1194031, 1149547, 1149536, 1192166, 1156838, 1148787,\n", - " 1169964, 1182551, 1190250, 1185978, 1171059, 1179852, 1188825, 1151774,\n", - " 1152115, 1169703, 1166841, 1186573, 1163146, 1177845, 1150406, 1150400,\n", - " 1161186, 1158064, 1145395, 1155959, 1155952, 1181656, 1187846, 1178456,\n", - " 1155553, 1192282, 1169831, 1189036, 1190342, 1188736, 1157012],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196011, 1196013, 1198783, 1198242, 1201094, 1195860, 1199282, 1202255,\n", - " 1198021, 1194626, 1200643, 1200644, 1201016, 1197351, 1196956, 1202803,\n", - " 1202804, 1194866, 1194770, 1194642, 1195511, 1195514, 1195263, 1196529,\n", - " 1201992, 1196031, 1198543, 1197697, 1194882, 1195888, 1194982, 1196353,\n", - " 1199366, 1195325, 1195323, 1198668, 1198262, 1198163, 1196711, 1195223,\n", - " 1195216, 1195265, 1195278, 1197136, 1196247, 1197272, 1197273, 1196109,\n", - " 1198219, 1196737, 1195850, 1195651, 1195659, 1195650, 1195541, 1195758,\n", - " 1197640, 1195918, 1195353, 1195358, 1200949, 1199185, 1196851, 1196857,\n", - " 1199685, 1199628, 1201636, 1199803, 1197676, 1197990, 1200076, 1200866,\n", - " 1199154, 1200748, 1199229, 1195017, 1199676, 1201511, 1196501, 1196727,\n", - " 1202618, 1200893, 1198428, 1199555, 1201547, 1201824, 1201827, 1200507,\n", - " 1198066, 1203293, 1201156, 1202406, 1200988, 1202641, 1201042, 1202733,\n", - " 1200553, 1202138, 1199908, 1201442, 1202239, 1199976, 1195876, 1201291,\n", - " 1198472, 1198478, 1202205, 1202209, 1202889, 1199929, 1196963, 1196966,\n", - " 1202876, 1199606, 1200638, 1195679, 1195664, 1202432, 1198055, 1200439,\n", - " 1198932, 1195181, 1196916, 1197060, 1197816, 1197403, 1199659, 1203102,\n", - " 1201138, 1194730, 1198824, 1196795, 1200011, 1199782, 1199786, 1200465,\n", - " 1195070, 1198131, 1197652, 1195082, 1195163, 1196551, 1194907],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196011, 1196013, 1198783, 1198242, 1201094, 1195860, 1199282, 1202255,\n", - " 1198021, 1194626, 1200643, 1200644, 1201016, 1197351, 1196956, 1202803,\n", - " 1202804, 1194866, 1194770, 1194642, 1195511, 1195514, 1195263, 1196529,\n", - " 1201992, 1196031, 1198543, 1197697, 1194882, 1195888, 1194982, 1196353,\n", - " 1199366, 1195325, 1195323, 1198668, 1198262, 1198163, 1196711, 1195223,\n", - " 1195216, 1195265, 1195278, 1197136, 1196247, 1197272, 1197273, 1196109,\n", - " 1198219, 1196737, 1195850, 1195651, 1195659, 1195650, 1195541, 1195758,\n", - " 1197640, 1195918, 1195353, 1195358, 1200949, 1199185, 1196851, 1196857,\n", - " 1199685, 1199628, 1201636, 1199803, 1197676, 1197990, 1200076, 1200866,\n", - " 1199154, 1200748, 1199229, 1195017, 1199676, 1201511, 1196501, 1196727,\n", - " 1202618, 1200893, 1198428, 1199555, 1201547, 1201824, 1201827, 1200507,\n", - " 1198066, 1203293, 1201156, 1202406, 1200988, 1202641, 1201042, 1202733,\n", - " 1200553, 1202138, 1199908, 1201442, 1202239, 1199976, 1195876, 1201291,\n", - " 1198472, 1198478, 1202205, 1202209, 1202889, 1199929, 1196963, 1196966,\n", - " 1202876, 1199606, 1200638, 1195679, 1195664, 1202432, 1198055, 1200439,\n", - " 1198932, 1195181, 1196916, 1197060, 1197816, 1197403, 1199659, 1203102,\n", - " 1201138, 1194730, 1198824, 1196795, 1200011, 1199782, 1199786, 1200465,\n", - " 1195070, 1198131, 1197652, 1195082, 1195163, 1196551, 1194907],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.7751e-01, -3.4587e-04, 8.7869e-01, ..., 1.2300e-01,\n", - " -1.7109e-03, -6.0561e-03],\n", - " [ 1.6652e-01, 2.6164e-02, 7.5300e-01, ..., 1.3370e-01,\n", - " -1.8340e-03, -5.0270e-03],\n", - " [ 6.9191e-02, 1.4787e-02, 3.1484e-01, ..., 1.0026e-01,\n", - " -1.4767e-03, -2.8065e-03],\n", - " ...,\n", - " [ 8.8299e-02, 2.8905e-02, 5.4988e-01, ..., 1.3072e-01,\n", - " -1.9228e-03, -3.6019e-03],\n", - " [ 9.6906e-02, 4.9408e-02, 6.0392e-01, ..., 1.5820e-01,\n", - " -1.8439e-03, -3.7267e-03],\n", - " [ 1.1853e-01, 3.6890e-02, 6.5859e-01, ..., 1.4759e-01,\n", - " -1.8949e-03, -4.3294e-03]], device='cuda:0'), 'paper': tensor([[ 9.3948e-01, -1.1414e-02, 1.2353e+00, ..., -6.4664e-03,\n", - " -1.7518e-02, 3.7766e-01],\n", - " [ 6.5734e-01, -4.8868e-03, 1.1099e+00, ..., -6.4725e-03,\n", - " -1.1747e-02, -7.8639e-04],\n", - " [ 2.0619e+00, -1.1255e-02, 2.4270e+00, ..., 1.0701e-02,\n", - " -3.5564e-02, 2.5793e+00],\n", - " ...,\n", - " [ 7.6962e-01, -6.6529e-03, 1.0462e+00, ..., -5.8504e-03,\n", - " -1.3472e-02, 7.2888e-02],\n", - " [ 8.3249e-01, -5.0970e-03, 9.7768e-01, ..., -6.4299e-03,\n", - " -1.2509e-02, 1.3033e-01],\n", - " [ 2.0213e+00, -1.2071e-02, 2.1714e+00, ..., 1.0055e-01,\n", - " -3.6342e-02, 2.6646e+00]], device='cuda:0'), 'author': tensor([[-1.8159e-03, 1.6042e-01, 2.6391e-01, ..., 1.4353e+00,\n", - " -1.6452e-03, 3.1729e-02],\n", - " [-1.7940e-03, 1.6561e-01, 3.1799e-01, ..., 1.5129e+00,\n", - " -2.5929e-03, -1.6177e-04],\n", - " [-1.6294e-03, 1.7556e-01, 2.4801e-01, ..., 1.5230e+00,\n", - " -9.3722e-04, 1.5403e-01],\n", - " ...,\n", - " [-2.1431e-03, 2.1178e-01, 4.4076e-01, ..., 1.1904e+00,\n", - " -5.5246e-03, -3.7181e-03],\n", - " [-2.2867e-03, 1.8915e-01, 3.7411e-01, ..., 1.1968e+00,\n", - " -4.3716e-03, -2.5918e-03],\n", - " [-2.9954e-03, 1.4405e-01, 4.3209e-01, ..., 1.1799e+00,\n", - " -5.6142e-03, -4.5401e-03]], device='cuda:0'), 'field_of_study': tensor([[-1.2636e-03, 4.3966e-01, 2.0444e-01, ..., -9.0097e-03,\n", - " 2.2268e-01, 1.9685e-01],\n", - " [-1.0194e-03, 4.0295e-01, 2.0398e-01, ..., -6.6134e-03,\n", - " 8.4754e-02, 2.3658e-01],\n", - " [-8.3451e-04, 2.9811e-01, 1.6922e-01, ..., -5.7330e-03,\n", - " 7.8953e-02, 1.9608e-01],\n", - " ...,\n", - " [-4.6199e-04, 3.9287e-01, 1.0695e-01, ..., -6.1509e-03,\n", - " 1.7958e-01, 1.7807e-01],\n", - " [ 4.9805e-02, 5.0380e-01, 3.4159e-01, ..., -4.4132e-03,\n", - " 1.8280e-01, -2.5709e-04],\n", - " [-6.3045e-04, 4.7997e-01, 2.0991e-01, ..., -5.6380e-03,\n", - " 2.4741e-01, 1.2773e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 138, 189, 145, 97, 97, 4, 184, 444, 444, 444, 488, 250,\n", - " 265, 220, 220, 220, 303, 303, 418, 418, 458, 715, 565, 845,\n", - " 845, 845, 825, 779, 779, 1207, 779, 779, 779, 851, 1163, 864,\n", - " 864, 1065, 1065, 1082, 1082, 1082, 1096, 1290, 1290, 1290, 1075, 1379,\n", - " 1379, 1379, 1229, 1096, 1258, 1321, 1351, 1346, 1402, 1402, 1560, 1481,\n", - " 1481, 1511, 1802, 1828, 1679, 1760, 1851, 2145, 1874, 1874, 1874, 1860,\n", - " 1989, 2071, 2071, 2044, 2075, 2075, 2074, 2074, 2154, 2113, 2149, 2281,\n", - " 2281, 2309, 2258, 2276, 2444, 2352, 2352, 2339, 2339, 2325, 2325, 2325,\n", - " 2416, 2416, 2451, 2533, 2533, 2521, 2738, 2738, 2580, 2603, 2738, 2854,\n", - " 2854, 2886, 2886, 2875, 2914, 2846, 2797, 2797, 2797, 3027, 2950, 3072,\n", - " 3091, 3182, 3180, 3242, 3180, 3180, 3180, 3459, 3479, 3285, 3379, 3704,\n", - " 3621, 3621, 3621, 3334, 3747, 3747, 3812, 3856, 3837, 3937, 3964, 3980,\n", - " 4132, 4131, 4126, 4126, 4126, 4126, 4126, 4126, 4258, 4351, 4282, 4346,\n", - " 4335, 4335, 4364, 4336, 4693, 4398, 4370, 4370, 4370, 4370, 4370, 4463,\n", - " 4463, 4463, 4463, 4463, 4463, 4517, 4574, 4574, 4658, 4541, 4541, 4867,\n", - " 4867, 4867, 4839, 4921, 4996, 4953, 5040, 5040, 5042, 4988, 4988, 5067,\n", - " 5067, 5116, 5180, 5180, 5106, 5106, 5106, 5106, 5219, 5126, 5504, 5428,\n", - " 5470, 5551, 5706, 5707, 5726, 5791, 5658, 5912, 5899, 5899, 5917, 5780,\n", - " 5903, 5996, 5996],\n", - " [ 56, 63, 139, 59, 90, 82, 63, 23, 30, 13, 100, 79,\n", - " 129, 106, 60, 34, 107, 85, 78, 35, 94, 126, 91, 101,\n", - " 110, 14, 8, 114, 64, 6, 1, 29, 21, 115, 4, 106,\n", - " 60, 19, 134, 27, 24, 103, 126, 21, 84, 31, 10, 141,\n", - " 106, 60, 65, 25, 127, 9, 133, 57, 109, 17, 30, 71,\n", - " 117, 96, 124, 11, 62, 79, 54, 97, 135, 92, 102, 126,\n", - " 47, 71, 117, 123, 91, 74, 124, 82, 79, 24, 31, 53,\n", - " 3, 5, 104, 57, 57, 31, 140, 6, 42, 58, 29, 132,\n", - " 100, 95, 66, 99, 77, 9, 52, 41, 73, 39, 16, 116,\n", - " 100, 46, 76, 131, 125, 136, 36, 40, 124, 117, 2, 22,\n", - " 89, 43, 103, 7, 26, 9, 79, 79, 113, 104, 138, 79,\n", - " 38, 68, 6, 11, 81, 43, 12, 51, 6, 104, 51, 66,\n", - " 128, 7, 93, 98, 103, 102, 6, 12, 67, 111, 33, 86,\n", - " 25, 70, 89, 0, 45, 107, 13, 37, 111, 61, 130, 1,\n", - " 79, 28, 120, 105, 72, 89, 80, 108, 82, 75, 118, 137,\n", - " 90, 6, 32, 44, 9, 96, 103, 79, 130, 55, 112, 15,\n", - " 83, 79, 98, 24, 77, 49, 2, 25, 29, 119, 130, 87,\n", - " 142, 109, 18, 122, 69, 121, 50, 136, 20, 88, 48, 122,\n", - " 107, 125, 112]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 789, 493, 1140, ..., 2626, 3741, 3430],\n", - " [ 8, 133, 86, ..., 7181, 7142, 7144]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 74, 91, 74, ..., 82, 97, 79],\n", - " [ 168, 52, 204, ..., 5816, 5919, 5957]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 30, 30, 30, ..., 7092, 7092, 7083],\n", - " [ 192, 56, 804, ..., 443, 720, 124]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 502, 627, 310, ..., 192, 484, 251],\n", - " [ 64, 279, 12, ..., 7143, 7118, 7055]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[6955, 6014, 657, ..., 5778, 5222, 5926],\n", - " [ 45, 11, 95, ..., 5949, 5921, 5929]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 30, 30, 30, ..., 7217, 7083, 7167],\n", - " [2714, 3026, 3691, ..., 6411, 6476, 3557]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 4, 169, 169, ..., 5903, 5903, 5903],\n", - " [2171, 973, 1266, ..., 4120, 4407, 4663]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.007231\n", - "sampling 0.00705\n", - "noi time: 0.001376\n", - "get_vertex_data call: 0.013719\n", - "noi group time: 0.00179\n", - "eoi_group_time: 0.010936\n", - "second half: 0.16045\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 31143, 31145, ..., 1119043, 1119055, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 31143, 31145, ..., 1119043, 1119055, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1231429, 1231430, ..., 1935650, 1929320, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1231429, 1231430, ..., 1935650, 1929320, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137426, 1141424, 1136237, 1140282, 1135926, 1138553, 1135165, 1135726,\n", - " 1141758, 1137509, 1138335, 1136223, 1141257, 1139462, 1136969, 1136971,\n", - " 1141443, 1138897, 1143600, 1145999, 1137268, 1138938, 1139143, 1146640,\n", - " 1140781, 1148983, 1150497, 1142965, 1139857, 1142958, 1155683, 1155686,\n", - " 1147473, 1135997, 1142881, 1153938, 1153940, 1144636, 1149037, 1148337,\n", - " 1146472, 1148546, 1147089, 1147094, 1137220, 1150555, 1155008, 1155018,\n", - " 1155019, 1139373, 1147202, 1136680, 1136682, 1136683, 1136685, 1138745,\n", - " 1134667, 1137829, 1151548, 1140540, 1138112, 1137257, 1138356, 1151531,\n", - " 1140159, 1140020, 1140953, 1135367, 1135202, 1141036, 1136288, 1134794,\n", - " 1157443, 1138504, 1138508, 1137693, 1144786, 1144395, 1136821, 1137534,\n", - " 1157397, 1143317, 1135268, 1139161, 1141698, 1135579, 1135583, 1140711,\n", - " 1156345, 1153094, 1135492, 1135499, 1154132, 1156899, 1156903, 1139685,\n", - " 1139878, 1138440, 1154790, 1149328, 1135088, 1138694, 1156606, 1147112,\n", - " 1147118, 1142611, 1158987, 1137109, 1135769, 1139844, 1141530, 1136449,\n", - " 1139667, 1138067, 1136094, 1134992, 1136551, 1152640, 1152651, 1158974,\n", - " 1139327, 1141065, 1153544, 1143626, 1139929, 1138148, 1141963, 1146075,\n", - " 1152044, 1142302, 1137728, 1134922, 1140901, 1134742, 1135549, 1136694,\n", - " 1140228, 1141098, 1141100, 1162946, 1145347, 1156875, 1141980, 1143767,\n", - " 1139025, 1146834, 1141224, 1139386, 1137188, 1145071, 1141785, 1141786,\n", - " 1136760, 1141300, 1134979, 1134987, 1147850, 1137074, 1141821, 1143166,\n", - " 1142093, 1158605, 1138708, 1142913, 1143107, 1144596, 1136864, 1145298,\n", - " 1144042, 1141578, 1140885, 1141398, 1144182, 1138539, 1137854, 1137841,\n", - " 1136378, 1141365, 1141367, 1153068, 1138292, 1143917, 1139510, 1139774,\n", - " 1139763, 1139127, 1140612, 1140976, 1140979, 1140990, 1141560, 1147050,\n", - " 1145872, 1149886, 1143543, 1152976, 1152980, 1135457, 1142547, 1139453,\n", - " 1139455, 1138995, 1141925, 1144242, 1145339, 1140580, 1166360, 1140690,\n", - " 1145974, 1143845, 1143851, 1146024, 1147272, 1154332, 1149930, 1149929,\n", - " 1141236, 1139990, 1143293, 1147540, 1147144, 1148763, 1147282, 1147290,\n", - " 1142829, 1142816, 1138669, 1149155, 1143663, 1143651, 1149366, 1148003,\n", - " 1143051, 1143040, 1148402, 1148408, 1136160, 1144919, 1138920, 1138927,\n", - " 1157720, 1136836, 1139328, 1141490, 1144957, 1143345, 1144753, 1144619,\n", - " 1140844, 1144081, 1135876, 1150294, 1146514, 1146523, 1143957, 1143456,\n", - " 1143457, 1137707, 1143937, 1140817, 1140364, 1143082, 1144734, 1144222,\n", - " 1147984, 1147999, 1148704, 1142697, 1141825, 1141836, 1149722, 1147971,\n", - " 1158226, 1158228, 1150452, 1166999, 1143921, 1143925, 1147880, 1149871,\n", - " 1154526, 1145750, 1145751, 1138638, 1152530, 1152538, 1150280, 1150438,\n", - " 1150445, 1149263, 1151856, 1151860, 1149791, 1144514, 1152001, 1142316,\n", - " 1147807, 1151482, 1154266, 1151041, 1135516, 1134869, 1150127, 1153956,\n", - " 1158944, 1141949, 1146776, 1150736, 1148740, 1148744, 1147659, 1143560,\n", - " 1143564, 1149412, 1148300, 1135083, 1135087, 1139096, 1139097, 1154420,\n", - " 1148188, 1152561, 1152482, 1138877, 1157977, 1148724, 1151937, 1148204,\n", - " 1153124, 1153133, 1153188, 1145104, 1155551, 1150932, 1143092, 1144849,\n", - " 1150352, 1147442, 1152578, 1152581, 1135307, 1151906, 1151913, 1150715,\n", - " 1148498, 1148505, 1148500, 1141420, 1150628, 1147728, 1145075, 1150890,\n", - " 1146262, 1148949, 1146969, 1146967, 1146974, 1156403, 1149349, 1153255,\n", - " 1150219, 1146623, 1144476, 1146280, 1156321, 1156325, 1153028, 1153038,\n", - " 1150085, 1145541, 1137746, 1137756, 1146304, 1159969, 1152622, 1140518,\n", - " 1140521, 1155140, 1149205, 1155337, 1154123, 1157826, 1164761, 1151617,\n", - " 1150578, 1136131, 1136134, 1148916, 1152958, 1145952, 1152227, 1152897,\n", - " 1152341, 1156831, 1153311, 1138281, 1152294, 1156007, 1156005, 1136028,\n", - " 1156623, 1151187, 1152928, 1155776, 1154734, 1150104, 1153909, 1150164,\n", - " 1148033, 1148035, 1148040, 1149300, 1148896, 1145656, 1149798, 1148628,\n", - " 1158530, 1137458, 1149944, 1153078, 1153085, 1142047, 1156720, 1158860,\n", - " 1158857, 1158916, 1158924, 1154929, 1156500, 1156501, 1157069, 1155412,\n", - " 1155422, 1152833, 1145184, 1137809, 1137814, 1139473, 1151251, 1150465,\n", - " 1146854, 1135230, 1135730, 1152179, 1153408, 1135634, 1158308, 1158311,\n", - " 1155441, 1137972, 1137969, 1150129, 1144360, 1144361, 1140871, 1140866,\n", - " 1156921, 1150493, 1142755, 1142758, 1156207, 1138775, 1151383, 1151379,\n", - " 1158635, 1152527, 1149313, 1149504, 1155755, 1151424, 1135396, 1156463,\n", - " 1168230, 1155628, 1155631, 1154555, 1155582, 1158824, 1155646, 1146935,\n", - " 1151892, 1154909, 1179427, 1143189, 1157439, 1155613, 1150987, 1157934,\n", - " 1137152, 1180900, 1158194, 1137380, 1145688, 1137323, 1140919, 1134677,\n", - " 1134674, 1135601, 1135614, 1148149, 1150661, 1150671, 1155848, 1155852,\n", - " 1158664, 1158656, 1157685, 1157684, 1149145, 1159258, 1152209, 1152220,\n", - " 1152498, 1140377, 1156017, 1155975, 1158841, 1158846, 1155404, 1149696,\n", - " 1154600, 1136896, 1158806, 1158285, 1136494, 1136491, 1164941, 1159241,\n", - " 1154394, 1156665, 1155309, 1156495, 1156490, 1153808, 1136640, 1136646,\n", - " 1142178, 1158558, 1156516, 1156525, 1156515, 1163814, 1162021, 1138108,\n", - " 1154343, 1158005, 1155529, 1142663, 1159052, 1159070, 1159071, 1163267,\n", - " 1155191, 1160563, 1153052, 1156235, 1153842, 1138393, 1149070, 1145945,\n", - " 1155479, 1153514, 1147307, 1147300, 1158680, 1146870, 1164012, 1156795,\n", - " 1164901, 1163379, 1139592, 1165762, 1159999, 1148771, 1157346, 1146063,\n", - " 1164048, 1140134, 1140643, 1148600, 1164979, 1141800, 1158643, 1159029,\n", - " 1159032, 1168110, 1152247, 1143729, 1160600, 1155588, 1144330, 1151223,\n", - " 1144984, 1147830, 1146500, 1146510, 1164577, 1141471, 1141459, 1151650,\n", - " 1147427, 1157044, 1156739, 1156745, 1153663, 1163477, 1150309, 1170253,\n", - " 1144810, 1144812, 1135567, 1164741, 1180589, 1148683, 1163935, 1169282,\n", - " 1187746, 1147673, 1142136, 1169201, 1165756, 1148124, 1147724, 1145900,\n", - " 1145902, 1169538, 1143395, 1154076, 1150783, 1145490, 1162886, 1149125,\n", - " 1169602, 1167817, 1166653, 1149483, 1169298, 1150518, 1156119, 1144346,\n", - " 1144336, 1138369, 1147745, 1135854, 1157331, 1138143, 1141048, 1141043,\n", - " 1169359, 1154364, 1158623, 1173047, 1153288, 1149847, 1154869, 1152362,\n", - " 1149394, 1173307, 1154027, 1152150, 1157158, 1157153, 1157373, 1147711,\n", - " 1148128, 1157593, 1169687, 1149247, 1135021, 1172961, 1176537, 1178400,\n", - " 1160986, 1167896, 1140326, 1174845, 1166682, 1150234, 1154151, 1154148,\n", - " 1169417, 1149169, 1143279, 1153803, 1171755, 1179807, 1161255, 1182353,\n", - " 1171623, 1188579, 1158253, 1178538, 1145626, 1180371, 1161068, 1149744,\n", - " 1149755, 1146242, 1180948, 1185327, 1181190, 1182443, 1158371, 1155899,\n", - " 1140399, 1185396, 1180673, 1180674, 1168886, 1171027, 1182337, 1181548,\n", - " 1184287, 1146161, 1156861, 1170336, 1147182, 1172624, 1163616, 1139828,\n", - " 1139831, 1150265, 1182988, 1154806, 1181360, 1151288, 1194356, 1170211,\n", - " 1156055, 1191481, 1146388, 1173058, 1149544, 1182891, 1190552, 1192357,\n", - " 1193439, 1194314, 1184793, 1194467, 1191340, 1188821, 1182172, 1172339,\n", - " 1193003, 1192386, 1177621, 1180964, 1179317, 1172423, 1155959, 1179771,\n", - " 1183297, 1190850, 1185356, 1190904, 1181997], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137426, 1141424, 1136237, 1140282, 1135926, 1138553, 1135165, 1135726,\n", - " 1141758, 1137509, 1138335, 1136223, 1141257, 1139462, 1136969, 1136971,\n", - " 1141443, 1138897, 1143600, 1145999, 1137268, 1138938, 1139143, 1146640,\n", - " 1140781, 1148983, 1150497, 1142965, 1139857, 1142958, 1155683, 1155686,\n", - " 1147473, 1135997, 1142881, 1153938, 1153940, 1144636, 1149037, 1148337,\n", - " 1146472, 1148546, 1147089, 1147094, 1137220, 1150555, 1155008, 1155018,\n", - " 1155019, 1139373, 1147202, 1136680, 1136682, 1136683, 1136685, 1138745,\n", - " 1134667, 1137829, 1151548, 1140540, 1138112, 1137257, 1138356, 1151531,\n", - " 1140159, 1140020, 1140953, 1135367, 1135202, 1141036, 1136288, 1134794,\n", - " 1157443, 1138504, 1138508, 1137693, 1144786, 1144395, 1136821, 1137534,\n", - " 1157397, 1143317, 1135268, 1139161, 1141698, 1135579, 1135583, 1140711,\n", - " 1156345, 1153094, 1135492, 1135499, 1154132, 1156899, 1156903, 1139685,\n", - " 1139878, 1138440, 1154790, 1149328, 1135088, 1138694, 1156606, 1147112,\n", - " 1147118, 1142611, 1158987, 1137109, 1135769, 1139844, 1141530, 1136449,\n", - " 1139667, 1138067, 1136094, 1134992, 1136551, 1152640, 1152651, 1158974,\n", - " 1139327, 1141065, 1153544, 1143626, 1139929, 1138148, 1141963, 1146075,\n", - " 1152044, 1142302, 1137728, 1134922, 1140901, 1134742, 1135549, 1136694,\n", - " 1140228, 1141098, 1141100, 1162946, 1145347, 1156875, 1141980, 1143767,\n", - " 1139025, 1146834, 1141224, 1139386, 1137188, 1145071, 1141785, 1141786,\n", - " 1136760, 1141300, 1134979, 1134987, 1147850, 1137074, 1141821, 1143166,\n", - " 1142093, 1158605, 1138708, 1142913, 1143107, 1144596, 1136864, 1145298,\n", - " 1144042, 1141578, 1140885, 1141398, 1144182, 1138539, 1137854, 1137841,\n", - " 1136378, 1141365, 1141367, 1153068, 1138292, 1143917, 1139510, 1139774,\n", - " 1139763, 1139127, 1140612, 1140976, 1140979, 1140990, 1141560, 1147050,\n", - " 1145872, 1149886, 1143543, 1152976, 1152980, 1135457, 1142547, 1139453,\n", - " 1139455, 1138995, 1141925, 1144242, 1145339, 1140580, 1166360, 1140690,\n", - " 1145974, 1143845, 1143851, 1146024, 1147272, 1154332, 1149930, 1149929,\n", - " 1141236, 1139990, 1143293, 1147540, 1147144, 1148763, 1147282, 1147290,\n", - " 1142829, 1142816, 1138669, 1149155, 1143663, 1143651, 1149366, 1148003,\n", - " 1143051, 1143040, 1148402, 1148408, 1136160, 1144919, 1138920, 1138927,\n", - " 1157720, 1136836, 1139328, 1141490, 1144957, 1143345, 1144753, 1144619,\n", - " 1140844, 1144081, 1135876, 1150294, 1146514, 1146523, 1143957, 1143456,\n", - " 1143457, 1137707, 1143937, 1140817, 1140364, 1143082, 1144734, 1144222,\n", - " 1147984, 1147999, 1148704, 1142697, 1141825, 1141836, 1149722, 1147971,\n", - " 1158226, 1158228, 1150452, 1166999, 1143921, 1143925, 1147880, 1149871,\n", - " 1154526, 1145750, 1145751, 1138638, 1152530, 1152538, 1150280, 1150438,\n", - " 1150445, 1149263, 1151856, 1151860, 1149791, 1144514, 1152001, 1142316,\n", - " 1147807, 1151482, 1154266, 1151041, 1135516, 1134869, 1150127, 1153956,\n", - " 1158944, 1141949, 1146776, 1150736, 1148740, 1148744, 1147659, 1143560,\n", - " 1143564, 1149412, 1148300, 1135083, 1135087, 1139096, 1139097, 1154420,\n", - " 1148188, 1152561, 1152482, 1138877, 1157977, 1148724, 1151937, 1148204,\n", - " 1153124, 1153133, 1153188, 1145104, 1155551, 1150932, 1143092, 1144849,\n", - " 1150352, 1147442, 1152578, 1152581, 1135307, 1151906, 1151913, 1150715,\n", - " 1148498, 1148505, 1148500, 1141420, 1150628, 1147728, 1145075, 1150890,\n", - " 1146262, 1148949, 1146969, 1146967, 1146974, 1156403, 1149349, 1153255,\n", - " 1150219, 1146623, 1144476, 1146280, 1156321, 1156325, 1153028, 1153038,\n", - " 1150085, 1145541, 1137746, 1137756, 1146304, 1159969, 1152622, 1140518,\n", - " 1140521, 1155140, 1149205, 1155337, 1154123, 1157826, 1164761, 1151617,\n", - " 1150578, 1136131, 1136134, 1148916, 1152958, 1145952, 1152227, 1152897,\n", - " 1152341, 1156831, 1153311, 1138281, 1152294, 1156007, 1156005, 1136028,\n", - " 1156623, 1151187, 1152928, 1155776, 1154734, 1150104, 1153909, 1150164,\n", - " 1148033, 1148035, 1148040, 1149300, 1148896, 1145656, 1149798, 1148628,\n", - " 1158530, 1137458, 1149944, 1153078, 1153085, 1142047, 1156720, 1158860,\n", - " 1158857, 1158916, 1158924, 1154929, 1156500, 1156501, 1157069, 1155412,\n", - " 1155422, 1152833, 1145184, 1137809, 1137814, 1139473, 1151251, 1150465,\n", - " 1146854, 1135230, 1135730, 1152179, 1153408, 1135634, 1158308, 1158311,\n", - " 1155441, 1137972, 1137969, 1150129, 1144360, 1144361, 1140871, 1140866,\n", - " 1156921, 1150493, 1142755, 1142758, 1156207, 1138775, 1151383, 1151379,\n", - " 1158635, 1152527, 1149313, 1149504, 1155755, 1151424, 1135396, 1156463,\n", - " 1168230, 1155628, 1155631, 1154555, 1155582, 1158824, 1155646, 1146935,\n", - " 1151892, 1154909, 1179427, 1143189, 1157439, 1155613, 1150987, 1157934,\n", - " 1137152, 1180900, 1158194, 1137380, 1145688, 1137323, 1140919, 1134677,\n", - " 1134674, 1135601, 1135614, 1148149, 1150661, 1150671, 1155848, 1155852,\n", - " 1158664, 1158656, 1157685, 1157684, 1149145, 1159258, 1152209, 1152220,\n", - " 1152498, 1140377, 1156017, 1155975, 1158841, 1158846, 1155404, 1149696,\n", - " 1154600, 1136896, 1158806, 1158285, 1136494, 1136491, 1164941, 1159241,\n", - " 1154394, 1156665, 1155309, 1156495, 1156490, 1153808, 1136640, 1136646,\n", - " 1142178, 1158558, 1156516, 1156525, 1156515, 1163814, 1162021, 1138108,\n", - " 1154343, 1158005, 1155529, 1142663, 1159052, 1159070, 1159071, 1163267,\n", - " 1155191, 1160563, 1153052, 1156235, 1153842, 1138393, 1149070, 1145945,\n", - " 1155479, 1153514, 1147307, 1147300, 1158680, 1146870, 1164012, 1156795,\n", - " 1164901, 1163379, 1139592, 1165762, 1159999, 1148771, 1157346, 1146063,\n", - " 1164048, 1140134, 1140643, 1148600, 1164979, 1141800, 1158643, 1159029,\n", - " 1159032, 1168110, 1152247, 1143729, 1160600, 1155588, 1144330, 1151223,\n", - " 1144984, 1147830, 1146500, 1146510, 1164577, 1141471, 1141459, 1151650,\n", - " 1147427, 1157044, 1156739, 1156745, 1153663, 1163477, 1150309, 1170253,\n", - " 1144810, 1144812, 1135567, 1164741, 1180589, 1148683, 1163935, 1169282,\n", - " 1187746, 1147673, 1142136, 1169201, 1165756, 1148124, 1147724, 1145900,\n", - " 1145902, 1169538, 1143395, 1154076, 1150783, 1145490, 1162886, 1149125,\n", - " 1169602, 1167817, 1166653, 1149483, 1169298, 1150518, 1156119, 1144346,\n", - " 1144336, 1138369, 1147745, 1135854, 1157331, 1138143, 1141048, 1141043,\n", - " 1169359, 1154364, 1158623, 1173047, 1153288, 1149847, 1154869, 1152362,\n", - " 1149394, 1173307, 1154027, 1152150, 1157158, 1157153, 1157373, 1147711,\n", - " 1148128, 1157593, 1169687, 1149247, 1135021, 1172961, 1176537, 1178400,\n", - " 1160986, 1167896, 1140326, 1174845, 1166682, 1150234, 1154151, 1154148,\n", - " 1169417, 1149169, 1143279, 1153803, 1171755, 1179807, 1161255, 1182353,\n", - " 1171623, 1188579, 1158253, 1178538, 1145626, 1180371, 1161068, 1149744,\n", - " 1149755, 1146242, 1180948, 1185327, 1181190, 1182443, 1158371, 1155899,\n", - " 1140399, 1185396, 1180673, 1180674, 1168886, 1171027, 1182337, 1181548,\n", - " 1184287, 1146161, 1156861, 1170336, 1147182, 1172624, 1163616, 1139828,\n", - " 1139831, 1150265, 1182988, 1154806, 1181360, 1151288, 1194356, 1170211,\n", - " 1156055, 1191481, 1146388, 1173058, 1149544, 1182891, 1190552, 1192357,\n", - " 1193439, 1194314, 1184793, 1194467, 1191340, 1188821, 1182172, 1172339,\n", - " 1193003, 1192386, 1177621, 1180964, 1179317, 1172423, 1155959, 1179771,\n", - " 1183297, 1190850, 1185356, 1190904, 1181997], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1198769, 1198730, 1195860, 1199282, 1198459, 1202243, 1202249, 1202255,\n", - " 1198844, 1196336, 1201582, 1202119, 1197777, 1197359, 1198633, 1196956,\n", - " 1202803, 1202804, 1202284, 1198557, 1194743, 1194770, 1197466, 1194642,\n", - " 1199135, 1201992, 1195190, 1196031, 1197704, 1198095, 1195469, 1196457,\n", - " 1195888, 1196334, 1197856, 1196359, 1196517, 1194752, 1197831, 1195313,\n", - " 1197115, 1196837, 1198036, 1198167, 1196704, 1195148, 1195223, 1195278,\n", - " 1197140, 1195847, 1195039, 1197474, 1197477, 1197478, 1196122, 1199998,\n", - " 1196393, 1195353, 1195358, 1198273, 1200949, 1199071, 1202740, 1199185,\n", - " 1199187, 1199685, 1199628, 1199803, 1197990, 1199156, 1200405, 1199231,\n", - " 1195017, 1199853, 1200060, 1199949, 1196498, 1196508, 1200668, 1197601,\n", - " 1197603, 1201117, 1196727, 1196734, 1202618, 1198428, 1198811, 1201529,\n", - " 1200452, 1200456, 1200570, 1199445, 1201079, 1201156, 1202630, 1201056,\n", - " 1200918, 1194805, 1200555, 1200310, 1200429, 1202964, 1201726, 1202529,\n", - " 1200861, 1199915, 1196779, 1201442, 1200899, 1200907, 1199976, 1202707,\n", - " 1195885, 1201291, 1196761, 1201871, 1199925, 1200248, 1198562, 1196963,\n", - " 1200785, 1196065, 1199606, 1200638, 1195431, 1203117, 1195670, 1195664,\n", - " 1200380, 1198929, 1195418, 1195181, 1196923, 1197822, 1198127, 1198117,\n", - " 1198973, 1198587, 1199661, 1199659, 1196381, 1198147, 1197731, 1197735,\n", - " 1197729, 1201475, 1200974, 1195066, 1200296, 1197652, 1197655, 1195082,\n", - " 1195165], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1198769, 1198730, 1195860, 1199282, 1198459, 1202243, 1202249, 1202255,\n", - " 1198844, 1196336, 1201582, 1202119, 1197777, 1197359, 1198633, 1196956,\n", - " 1202803, 1202804, 1202284, 1198557, 1194743, 1194770, 1197466, 1194642,\n", - " 1199135, 1201992, 1195190, 1196031, 1197704, 1198095, 1195469, 1196457,\n", - " 1195888, 1196334, 1197856, 1196359, 1196517, 1194752, 1197831, 1195313,\n", - " 1197115, 1196837, 1198036, 1198167, 1196704, 1195148, 1195223, 1195278,\n", - " 1197140, 1195847, 1195039, 1197474, 1197477, 1197478, 1196122, 1199998,\n", - " 1196393, 1195353, 1195358, 1198273, 1200949, 1199071, 1202740, 1199185,\n", - " 1199187, 1199685, 1199628, 1199803, 1197990, 1199156, 1200405, 1199231,\n", - " 1195017, 1199853, 1200060, 1199949, 1196498, 1196508, 1200668, 1197601,\n", - " 1197603, 1201117, 1196727, 1196734, 1202618, 1198428, 1198811, 1201529,\n", - " 1200452, 1200456, 1200570, 1199445, 1201079, 1201156, 1202630, 1201056,\n", - " 1200918, 1194805, 1200555, 1200310, 1200429, 1202964, 1201726, 1202529,\n", - " 1200861, 1199915, 1196779, 1201442, 1200899, 1200907, 1199976, 1202707,\n", - " 1195885, 1201291, 1196761, 1201871, 1199925, 1200248, 1198562, 1196963,\n", - " 1200785, 1196065, 1199606, 1200638, 1195431, 1203117, 1195670, 1195664,\n", - " 1200380, 1198929, 1195418, 1195181, 1196923, 1197822, 1198127, 1198117,\n", - " 1198973, 1198587, 1199661, 1199659, 1196381, 1198147, 1197731, 1197735,\n", - " 1197729, 1201475, 1200974, 1195066, 1200296, 1197652, 1197655, 1195082,\n", - " 1195165], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.8655e-01, 2.6991e-02, 8.3453e-01, ..., 1.5503e-01,\n", - " -1.9835e-03, -5.4544e-03],\n", - " [ 2.8019e-02, -9.7780e-05, 6.0648e-02, ..., 4.5551e-02,\n", - " -1.1000e-03, -1.4560e-03],\n", - " [ 1.9878e-01, -6.6756e-05, 8.4285e-01, ..., 1.3513e-01,\n", - " -1.8904e-03, -5.5442e-03],\n", - " ...,\n", - " [ 2.6172e-01, -6.3954e-04, 1.0460e+00, ..., 1.3148e-01,\n", - " -1.8261e-03, -7.0979e-03],\n", - " [ 1.7526e-01, 3.9326e-02, 7.6236e-01, ..., 1.5510e-01,\n", - " -1.9538e-03, -5.0714e-03],\n", - " [ 1.9878e-01, -6.6756e-05, 8.4285e-01, ..., 1.3513e-01,\n", - " -1.8904e-03, -5.5442e-03]], device='cuda:0'), 'paper': tensor([[ 5.8015e-01, -1.9761e-02, 2.2524e+00, ..., -7.7380e-03,\n", - " -1.8130e-02, -5.2956e-03],\n", - " [ 8.5247e-01, -1.5160e-02, 1.6561e+00, ..., -8.2014e-03,\n", - " -2.0092e-02, 2.1734e-01],\n", - " [ 3.9497e-01, -9.4876e-03, 1.6469e+00, ..., -5.9005e-03,\n", - " -1.0978e-02, -6.9950e-03],\n", - " ...,\n", - " [ 1.9491e+00, -6.8416e-03, 2.1238e+00, ..., -1.1481e-03,\n", - " -2.9019e-02, 1.9825e+00],\n", - " [ 2.0951e+00, -8.9742e-03, 2.1288e+00, ..., 1.3236e-02,\n", - " -3.4299e-02, 2.5888e+00],\n", - " [ 2.0907e+00, -1.1864e-02, 2.2079e+00, ..., 1.2532e-01,\n", - " -3.6804e-02, 2.7462e+00]], device='cuda:0'), 'author': tensor([[-1.0569e-03, 9.5535e-02, 1.9306e-01, ..., 1.4960e+00,\n", - " -4.7084e-04, 1.0686e-01],\n", - " [-1.1989e-03, 1.1767e-01, 1.1800e-01, ..., 1.3846e+00,\n", - " 1.4500e-02, 1.4456e-01],\n", - " [-1.4132e-03, 5.4455e-02, 2.4007e-01, ..., 1.5103e+00,\n", - " -1.5052e-04, 1.3602e-01],\n", - " ...,\n", - " [-1.5331e-03, 1.6863e-01, 1.8126e-01, ..., 1.5815e+00,\n", - " -1.1899e-03, 8.9750e-02],\n", - " [-1.4660e-03, 1.3140e-01, 2.6532e-01, ..., 1.4526e+00,\n", - " -9.1224e-04, 8.9750e-02],\n", - " [-1.2424e-03, 1.6508e-01, 1.9553e-01, ..., 1.4901e+00,\n", - " -9.8537e-04, 1.3355e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0009, 0.4931, 0.1592, ..., -0.0082, 0.2536, 0.2134],\n", - " [-0.0011, 0.4002, 0.1285, ..., -0.0075, 0.2181, 0.2105],\n", - " [-0.0008, 0.3584, 0.2063, ..., -0.0063, 0.0718, 0.1577],\n", - " ...,\n", - " [-0.0013, 0.4769, 0.2258, ..., -0.0086, 0.2480, 0.3260],\n", - " [-0.0007, 0.5017, 0.3119, ..., -0.0080, 0.2349, 0.2831],\n", - " [-0.0005, 0.4085, 0.1757, ..., -0.0035, 0.0995, 0.0480]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 162, 34, 125, 125, 306, 322, 243, 471, 512, 216, 380, 245,\n", - " 767, 767, 767, 954, 694, 923, 923, 1019, 1546, 1229, 1229, 1111,\n", - " 1268, 1530, 1244, 1254, 1340, 1337, 1405, 1405, 1405, 1369, 1369, 1369,\n", - " 1369, 1472, 1472, 1472, 1398, 1558, 1649, 1770, 1781, 1864, 1864, 1914,\n", - " 1845, 1814, 1814, 2125, 2000, 1954, 2098, 2033, 2033, 2098, 2125, 2125,\n", - " 2125, 2125, 2106, 2106, 2106, 2199, 2199, 2199, 2175, 2152, 2152, 2300,\n", - " 2300, 2378, 2380, 2268, 2554, 2554, 2552, 2552, 2422, 2512, 2443, 2529,\n", - " 2563, 2695, 2695, 2610, 2515, 2591, 2681, 2681, 2751, 2854, 2731, 2772,\n", - " 2952, 2954, 2954, 2708, 3194, 3194, 2924, 3094, 3104, 3252, 3376, 3515,\n", - " 3564, 3589, 3623, 3506, 3506, 3506, 3506, 3685, 3604, 3604, 3715, 3604,\n", - " 3715, 4182, 3588, 4136, 4021, 4165, 4227, 4054, 3800, 4192, 3984, 4258,\n", - " 4338, 4356, 4356, 4448, 4475, 4429, 4429, 4429, 4495, 4677, 4482, 4589,\n", - " 4589, 4597, 4835, 4835, 4929, 5123, 4981, 4869, 5142, 5123, 5123, 5123,\n", - " 4891, 4980, 5089, 5082, 5182, 5227, 5225, 5244, 5051, 5051, 5111, 5073,\n", - " 5275, 5356, 5176, 5168, 5256, 5118, 5367, 5470, 5469, 5614, 5614, 5455,\n", - " 5623, 5741, 5682, 5682, 5746, 5874, 5807, 5949, 5949, 6033, 5741, 5898,\n", - " 5898, 6065, 5979, 5988, 6159, 6261, 6432, 6380, 6380, 6508, 5877, 6193,\n", - " 6635, 6657, 6309, 6424, 6684, 6709, 6643, 6643, 6702, 6630],\n", - " [ 25, 8, 64, 144, 67, 96, 43, 149, 48, 21, 68, 94,\n", - " 105, 101, 89, 97, 119, 143, 118, 33, 142, 25, 106, 118,\n", - " 8, 129, 118, 68, 107, 114, 44, 4, 25, 41, 104, 136,\n", - " 74, 140, 111, 92, 118, 63, 82, 133, 37, 62, 95, 117,\n", - " 112, 94, 81, 83, 97, 118, 71, 96, 3, 79, 75, 137,\n", - " 108, 113, 69, 138, 130, 103, 145, 96, 118, 18, 8, 66,\n", - " 35, 7, 118, 61, 95, 62, 78, 115, 26, 34, 37, 125,\n", - " 55, 48, 82, 143, 29, 134, 99, 3, 8, 6, 23, 108,\n", - " 69, 3, 123, 76, 28, 134, 142, 34, 58, 59, 57, 60,\n", - " 15, 127, 49, 126, 121, 128, 14, 76, 107, 88, 118, 25,\n", - " 143, 139, 76, 99, 39, 84, 45, 8, 65, 27, 32, 38,\n", - " 12, 72, 69, 120, 96, 31, 9, 86, 90, 132, 141, 127,\n", - " 17, 102, 141, 93, 54, 5, 150, 47, 52, 99, 22, 41,\n", - " 98, 148, 151, 6, 109, 93, 110, 152, 24, 124, 13, 46,\n", - " 106, 2, 60, 36, 50, 53, 149, 100, 70, 146, 10, 42,\n", - " 35, 20, 40, 19, 91, 87, 30, 100, 114, 77, 73, 11,\n", - " 33, 9, 122, 45, 66, 80, 1, 131, 56, 106, 135, 63,\n", - " 82, 51, 85, 147, 71, 82, 16, 0, 149, 116]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1511, 630, 1325, ..., 5980, 1103, 5196],\n", - " [ 208, 31, 90, ..., 5951, 6047, 6068]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 118, 134, 142, ..., 12, 9, 12],\n", - " [ 10, 55, 132, ..., 6482, 6633, 6594]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 68, 68, 68, ..., 6023, 6023, 6023],\n", - " [ 731, 744, 736, ..., 433, 377, 22]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 415, 266, 402, ..., 266, 266, 610],\n", - " [ 231, 333, 260, ..., 6149, 6144, 6119]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2049, 570, 527, ..., 5888, 2950, 3602],\n", - " [ 25, 179, 56, ..., 6620, 6646, 6621]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 68, 68, 68, ..., 6023, 6090, 6111],\n", - " [ 709, 2581, 2228, ..., 1878, 2781, 2826]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 59, 59, 59, ..., 6630, 6630, 6630],\n", - " [1230, 1696, 448, ..., 3727, 4391, 4397]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006691\n", - "sampling 0.006538\n", - "noi time: 0.001907\n", - "get_vertex_data call: 0.03773\n", - "noi group time: 0.002988\n", - "eoi_group_time: 0.015477\n", - "second half: 0.213499\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 19138, 31145, 4764, ..., 1117376, 1110493, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 19138, 31145, 4764, ..., 1117376, 1110493, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210816, 1210831, 1221611, ..., 1925031, 1930676, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210816, 1210831, 1221611, ..., 1925031, 1930676, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1137429, 1137204, 1141424, 1136238, 1140282, 1135935, 1135716,\n", - " 1135721, 1142198, 1140785, 1140788, 1141758, 1138335, 1136223, 1139462,\n", - " 1136971, 1141448, 1143610, 1149839, 1146982, 1137271, 1138930, 1143362,\n", - " 1143372, 1139241, 1146644, 1139615, 1148987, 1135381, 1148576, 1149216,\n", - " 1155685, 1143820, 1149644, 1147473, 1147483, 1147486, 1142881, 1153940,\n", - " 1144636, 1144632, 1149037, 1146996, 1153018, 1146472, 1152667, 1148557,\n", - " 1147099, 1150546, 1155014, 1155019, 1147202, 1147214, 1147211, 1150329,\n", - " 1134710, 1136268, 1140304, 1151549, 1151545, 1138112, 1135173, 1137181,\n", - " 1149460, 1149467, 1138354, 1138366, 1134735, 1140020, 1140027, 1140952,\n", - " 1135367, 1135202, 1135210, 1154739, 1134960, 1141036, 1134794, 1157443,\n", - " 1135967, 1138504, 1138508, 1137329, 1136178, 1144395, 1136718, 1157398,\n", - " 1157397, 1136590, 1136662, 1137441, 1137026, 1135265, 1139161, 1134841,\n", - " 1141702, 1135980, 1135583, 1135830, 1140240, 1138514, 1153099, 1137957,\n", - " 1158136, 1156965, 1137019, 1156909, 1138436, 1138440, 1138445, 1138457,\n", - " 1157190, 1136594, 1158386, 1158390, 1149328, 1135088, 1135095, 1156606,\n", - " 1147112, 1142611, 1135346, 1135625, 1145843, 1145845, 1148531, 1137109,\n", - " 1135762, 1135766, 1139855, 1141532, 1136449, 1139673, 1136094, 1134992,\n", - " 1134994, 1134771, 1152646, 1135789, 1158974, 1159012, 1159019, 1153539,\n", - " 1140034, 1139085, 1139933, 1137588, 1138148, 1138150, 1141964, 1153404,\n", - " 1134891, 1152042, 1152044, 1137734, 1137728, 1147317, 1134750, 1135549,\n", - " 1141088, 1141095, 1141098, 1144143, 1139889, 1145347, 1145358, 1156875,\n", - " 1141980, 1143767, 1137299, 1139025, 1139033, 1140003, 1142499, 1142501,\n", - " 1141681, 1141690, 1142347, 1154466, 1139436, 1136632, 1141224, 1163301,\n", - " 1143676, 1140598, 1140592, 1138785, 1139495, 1144650, 1136853, 1147850,\n", - " 1147855, 1164810, 1139798, 1142053, 1141821, 1143153, 1153666, 1145161,\n", - " 1143202, 1143212, 1158749, 1149111, 1148872, 1141472, 1137058, 1138709,\n", - " 1140110, 1142913, 1144596, 1141578, 1141579, 1140894, 1135322, 1135327,\n", - " 1144865, 1146201, 1158703, 1138539, 1138540, 1140501, 1137854, 1137841,\n", - " 1147153, 1141367, 1141664, 1149101, 1138293, 1143917, 1139510, 1144992,\n", - " 1145000, 1145001, 1140976, 1140990, 1147050, 1147047, 1145873, 1155835,\n", - " 1149876, 1143543, 1143551, 1152976, 1152980, 1135457, 1141925, 1144242,\n", - " 1145328, 1141841, 1137149, 1150692, 1143643, 1137571, 1137570, 1134856,\n", - " 1145980, 1143851, 1146008, 1146024, 1146025, 1138085, 1139990, 1143293,\n", - " 1143283, 1147543, 1147540, 1147282, 1142816, 1149155, 1140346, 1139408,\n", - " 1139417, 1143051, 1148414, 1136167, 1142586, 1136836, 1142149, 1143345,\n", - " 1144765, 1144766, 1144615, 1145808, 1140844, 1139979, 1135876, 1150755,\n", - " 1135813, 1150294, 1138013, 1146514, 1138024, 1143456, 1143457, 1144298,\n", - " 1144303, 1143937, 1143949, 1147521, 1147524, 1147523, 1140352, 1140364,\n", - " 1137990, 1143080, 1168921, 1166410, 1144725, 1147996, 1147999, 1134899,\n", - " 1134907, 1144010, 1147131, 1147240, 1148704, 1141319, 1146745, 1146749,\n", - " 1146751, 1148466, 1148468, 1148473, 1153701, 1149717, 1147025, 1147249,\n", - " 1147983, 1145011, 1145012, 1145009, 1158226, 1143931, 1147880, 1141140,\n", - " 1145240, 1145246, 1145751, 1142370, 1146144, 1138638, 1148391, 1138850,\n", - " 1151236, 1151242, 1151182, 1149258, 1151856, 1144526, 1141358, 1145833,\n", - " 1146887, 1150350, 1152013, 1154819, 1147807, 1151480, 1151473, 1152022,\n", - " 1152024, 1154271, 1145255, 1145260, 1139919, 1134869, 1147023, 1135805,\n", - " 1141949, 1146776, 1150843, 1151795, 1153574, 1147653, 1143552, 1148294,\n", - " 1148299, 1152070, 1152073, 1135084, 1154420, 1151361, 1152561, 1136247,\n", - " 1136252, 1157983, 1148734, 1148729, 1166312, 1143981, 1143888, 1143901,\n", - " 1143895, 1154196, 1141728, 1153192, 1145104, 1145111, 1168633, 1155543,\n", - " 1152920, 1148052, 1148058, 1143092, 1150356, 1155088, 1148084, 1147442,\n", - " 1151816, 1151906, 1148498, 1146565, 1141420, 1152784, 1151351, 1151352,\n", - " 1147743, 1145080, 1155067, 1146969, 1146975, 1149359, 1146623, 1144472,\n", - " 1146280, 1156320, 1156325, 1153027, 1153032, 1153038, 1145539, 1137746,\n", - " 1137755, 1146304, 1152622, 1155140, 1152057, 1136401, 1136410, 1149203,\n", - " 1152826, 1155330, 1155337, 1155331, 1154123, 1157842, 1157824, 1152682,\n", - " 1151617, 1145278, 1136134, 1136140, 1148927, 1152944, 1140459, 1144533,\n", - " 1152898, 1143988, 1173501, 1152341, 1156826, 1156816, 1153311, 1146704,\n", - " 1138275, 1138283, 1138279, 1152294, 1156001, 1136028, 1158704, 1152928,\n", - " 1154721, 1143483, 1156416, 1150099, 1153907, 1150150, 1142266, 1153688,\n", - " 1148040, 1155202, 1155218, 1149794, 1137048, 1148628, 1158530, 1137458,\n", - " 1157518, 1135698, 1135430, 1135434, 1150962, 1157547, 1158854, 1150877,\n", - " 1158916, 1154929, 1156505, 1152397, 1157064, 1157069, 1155408, 1137823,\n", - " 1143502, 1157565, 1150465, 1146854, 1142221, 1135730, 1135733, 1152179,\n", - " 1165703, 1150828, 1147810, 1147818, 1157784, 1158304, 1158306, 1158311,\n", - " 1151271, 1155441, 1155512, 1150130, 1150136, 1154530, 1154528, 1156919,\n", - " 1142755, 1142764, 1142752, 1142758, 1156271, 1151379, 1155122, 1149321,\n", - " 1149505, 1153486, 1155755, 1155757, 1151424, 1146913, 1145806, 1158096,\n", - " 1155628, 1156563, 1154555, 1158824, 1177965, 1158325, 1154036, 1148836,\n", - " 1148835, 1155646, 1153363, 1158355, 1143256, 1143263, 1143257, 1154642,\n", - " 1154652, 1154250, 1154240, 1156711, 1139627, 1160106, 1154902, 1154909,\n", - " 1150371, 1157439, 1150987, 1157928, 1160453, 1158578, 1156764, 1153786,\n", - " 1149904, 1137381, 1145682, 1145688, 1145694, 1164161, 1150661, 1158665,\n", - " 1157685, 1149145, 1159258, 1161108, 1140633, 1152209, 1152220, 1155433,\n", - " 1140374, 1155975, 1135196, 1156811, 1149700, 1159777, 1159441, 1160163,\n", - " 1136909, 1136896, 1158760, 1158882, 1140213, 1140221, 1159164, 1159158,\n", - " 1158815, 1158803, 1156778, 1136487, 1136494, 1136491, 1153632, 1153647,\n", - " 1156665, 1156490, 1153808, 1156278, 1136640, 1153834, 1153831, 1151140,\n", - " 1156516, 1165497, 1146123, 1146126, 1165786, 1188201, 1138110, 1158006,\n", - " 1155528, 1135661, 1164276, 1142666, 1162683, 1159042, 1159052, 1159071,\n", - " 1155197, 1160563, 1153052, 1153045, 1171551, 1173007, 1163072, 1155763,\n", - " 1156235, 1144156, 1142870, 1156107, 1165244, 1150046, 1149063, 1145948,\n", - " 1154297, 1153519, 1158680, 1164006, 1164012, 1149956, 1139592, 1139286,\n", - " 1157238, 1148771, 1146063, 1140130, 1158868, 1170403, 1140641, 1140650,\n", - " 1140643, 1148600, 1159641, 1144509, 1155816, 1165047, 1158643, 1158653,\n", - " 1159025, 1159032, 1155588, 1188672, 1156589, 1168426, 1144979, 1149008,\n", - " 1161240, 1144750, 1152776, 1166881, 1155054, 1141468, 1141471, 1147426,\n", - " 1147427, 1147436, 1179982, 1156739, 1160849, 1157955, 1166591, 1150648,\n", - " 1171040, 1144810, 1144812, 1144808, 1153268, 1135567, 1165716, 1164750,\n", - " 1156293, 1156303, 1166924, 1145228, 1169281, 1169282, 1155324, 1166462,\n", - " 1144972, 1144973, 1142136, 1165686, 1143028, 1145447, 1147355, 1148124,\n", - " 1147723, 1145892, 1145902, 1168659, 1163965, 1152203, 1143397, 1170980,\n", - " 1158724, 1154070, 1154075, 1147339, 1170758, 1192410, 1179496, 1151598,\n", - " 1149125, 1154915, 1167817, 1166653, 1169298, 1155172, 1155180, 1150515,\n", - " 1150518, 1156119, 1145533, 1145531, 1144346, 1144336, 1157534, 1154670,\n", - " 1157331, 1177717, 1138129, 1141051, 1151668, 1169359, 1154353, 1154354,\n", - " 1154352, 1147502, 1138613, 1149680, 1158611, 1158623, 1158062, 1172877,\n", - " 1149846, 1157385, 1160135, 1155494, 1152353, 1165528, 1169929, 1161130,\n", - " 1149402, 1148667, 1148666, 1173307, 1169144, 1152150, 1153759, 1153754,\n", - " 1159655, 1151696, 1157158, 1157153, 1155459, 1157373, 1147711, 1147707,\n", - " 1148131, 1169913, 1147929, 1157593, 1157595, 1169038, 1167712, 1155739,\n", - " 1166016, 1160152, 1174845, 1170555, 1166684, 1170874, 1171823, 1182131,\n", - " 1150234, 1154151, 1154148, 1167517, 1149169, 1149176, 1149173, 1172537,\n", - " 1181860, 1186117, 1143279, 1167658, 1168481, 1182423, 1143420, 1166299,\n", - " 1174333, 1153803, 1153794, 1153141, 1178914, 1155257, 1157792, 1157795,\n", - " 1172550, 1171623, 1157126, 1157124, 1153898, 1145586, 1188790, 1191749,\n", - " 1162403, 1145626, 1154834, 1180383, 1157483, 1161067, 1149753, 1149755,\n", - " 1153609, 1157761, 1155990, 1179776, 1181149, 1158512, 1158933, 1158940,\n", - " 1158374, 1155892, 1155899, 1160377, 1183068, 1140393, 1140399, 1168273,\n", - " 1188249, 1187272, 1186278, 1162253, 1165146, 1164437, 1182337, 1188137,\n", - " 1165078, 1188074, 1147180, 1147172, 1147182, 1156162, 1192736, 1139828,\n", - " 1139831, 1139837, 1154812, 1156055, 1187231, 1182834, 1151972, 1173058,\n", - " 1149544, 1187055, 1191964, 1188172, 1141001, 1184493, 1188360, 1178065,\n", - " 1187685, 1151774, 1193774, 1152117, 1169707, 1166841, 1192567, 1170128,\n", - " 1167094, 1161188, 1156681, 1172423, 1158064, 1158067, 1181616, 1145395,\n", - " 1185848, 1187596, 1194419, 1155962, 1176833, 1179769, 1182191, 1189372,\n", - " 1182660], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1137429, 1137204, 1141424, 1136238, 1140282, 1135935, 1135716,\n", - " 1135721, 1142198, 1140785, 1140788, 1141758, 1138335, 1136223, 1139462,\n", - " 1136971, 1141448, 1143610, 1149839, 1146982, 1137271, 1138930, 1143362,\n", - " 1143372, 1139241, 1146644, 1139615, 1148987, 1135381, 1148576, 1149216,\n", - " 1155685, 1143820, 1149644, 1147473, 1147483, 1147486, 1142881, 1153940,\n", - " 1144636, 1144632, 1149037, 1146996, 1153018, 1146472, 1152667, 1148557,\n", - " 1147099, 1150546, 1155014, 1155019, 1147202, 1147214, 1147211, 1150329,\n", - " 1134710, 1136268, 1140304, 1151549, 1151545, 1138112, 1135173, 1137181,\n", - " 1149460, 1149467, 1138354, 1138366, 1134735, 1140020, 1140027, 1140952,\n", - " 1135367, 1135202, 1135210, 1154739, 1134960, 1141036, 1134794, 1157443,\n", - " 1135967, 1138504, 1138508, 1137329, 1136178, 1144395, 1136718, 1157398,\n", - " 1157397, 1136590, 1136662, 1137441, 1137026, 1135265, 1139161, 1134841,\n", - " 1141702, 1135980, 1135583, 1135830, 1140240, 1138514, 1153099, 1137957,\n", - " 1158136, 1156965, 1137019, 1156909, 1138436, 1138440, 1138445, 1138457,\n", - " 1157190, 1136594, 1158386, 1158390, 1149328, 1135088, 1135095, 1156606,\n", - " 1147112, 1142611, 1135346, 1135625, 1145843, 1145845, 1148531, 1137109,\n", - " 1135762, 1135766, 1139855, 1141532, 1136449, 1139673, 1136094, 1134992,\n", - " 1134994, 1134771, 1152646, 1135789, 1158974, 1159012, 1159019, 1153539,\n", - " 1140034, 1139085, 1139933, 1137588, 1138148, 1138150, 1141964, 1153404,\n", - " 1134891, 1152042, 1152044, 1137734, 1137728, 1147317, 1134750, 1135549,\n", - " 1141088, 1141095, 1141098, 1144143, 1139889, 1145347, 1145358, 1156875,\n", - " 1141980, 1143767, 1137299, 1139025, 1139033, 1140003, 1142499, 1142501,\n", - " 1141681, 1141690, 1142347, 1154466, 1139436, 1136632, 1141224, 1163301,\n", - " 1143676, 1140598, 1140592, 1138785, 1139495, 1144650, 1136853, 1147850,\n", - " 1147855, 1164810, 1139798, 1142053, 1141821, 1143153, 1153666, 1145161,\n", - " 1143202, 1143212, 1158749, 1149111, 1148872, 1141472, 1137058, 1138709,\n", - " 1140110, 1142913, 1144596, 1141578, 1141579, 1140894, 1135322, 1135327,\n", - " 1144865, 1146201, 1158703, 1138539, 1138540, 1140501, 1137854, 1137841,\n", - " 1147153, 1141367, 1141664, 1149101, 1138293, 1143917, 1139510, 1144992,\n", - " 1145000, 1145001, 1140976, 1140990, 1147050, 1147047, 1145873, 1155835,\n", - " 1149876, 1143543, 1143551, 1152976, 1152980, 1135457, 1141925, 1144242,\n", - " 1145328, 1141841, 1137149, 1150692, 1143643, 1137571, 1137570, 1134856,\n", - " 1145980, 1143851, 1146008, 1146024, 1146025, 1138085, 1139990, 1143293,\n", - " 1143283, 1147543, 1147540, 1147282, 1142816, 1149155, 1140346, 1139408,\n", - " 1139417, 1143051, 1148414, 1136167, 1142586, 1136836, 1142149, 1143345,\n", - " 1144765, 1144766, 1144615, 1145808, 1140844, 1139979, 1135876, 1150755,\n", - " 1135813, 1150294, 1138013, 1146514, 1138024, 1143456, 1143457, 1144298,\n", - " 1144303, 1143937, 1143949, 1147521, 1147524, 1147523, 1140352, 1140364,\n", - " 1137990, 1143080, 1168921, 1166410, 1144725, 1147996, 1147999, 1134899,\n", - " 1134907, 1144010, 1147131, 1147240, 1148704, 1141319, 1146745, 1146749,\n", - " 1146751, 1148466, 1148468, 1148473, 1153701, 1149717, 1147025, 1147249,\n", - " 1147983, 1145011, 1145012, 1145009, 1158226, 1143931, 1147880, 1141140,\n", - " 1145240, 1145246, 1145751, 1142370, 1146144, 1138638, 1148391, 1138850,\n", - " 1151236, 1151242, 1151182, 1149258, 1151856, 1144526, 1141358, 1145833,\n", - " 1146887, 1150350, 1152013, 1154819, 1147807, 1151480, 1151473, 1152022,\n", - " 1152024, 1154271, 1145255, 1145260, 1139919, 1134869, 1147023, 1135805,\n", - " 1141949, 1146776, 1150843, 1151795, 1153574, 1147653, 1143552, 1148294,\n", - " 1148299, 1152070, 1152073, 1135084, 1154420, 1151361, 1152561, 1136247,\n", - " 1136252, 1157983, 1148734, 1148729, 1166312, 1143981, 1143888, 1143901,\n", - " 1143895, 1154196, 1141728, 1153192, 1145104, 1145111, 1168633, 1155543,\n", - " 1152920, 1148052, 1148058, 1143092, 1150356, 1155088, 1148084, 1147442,\n", - " 1151816, 1151906, 1148498, 1146565, 1141420, 1152784, 1151351, 1151352,\n", - " 1147743, 1145080, 1155067, 1146969, 1146975, 1149359, 1146623, 1144472,\n", - " 1146280, 1156320, 1156325, 1153027, 1153032, 1153038, 1145539, 1137746,\n", - " 1137755, 1146304, 1152622, 1155140, 1152057, 1136401, 1136410, 1149203,\n", - " 1152826, 1155330, 1155337, 1155331, 1154123, 1157842, 1157824, 1152682,\n", - " 1151617, 1145278, 1136134, 1136140, 1148927, 1152944, 1140459, 1144533,\n", - " 1152898, 1143988, 1173501, 1152341, 1156826, 1156816, 1153311, 1146704,\n", - " 1138275, 1138283, 1138279, 1152294, 1156001, 1136028, 1158704, 1152928,\n", - " 1154721, 1143483, 1156416, 1150099, 1153907, 1150150, 1142266, 1153688,\n", - " 1148040, 1155202, 1155218, 1149794, 1137048, 1148628, 1158530, 1137458,\n", - " 1157518, 1135698, 1135430, 1135434, 1150962, 1157547, 1158854, 1150877,\n", - " 1158916, 1154929, 1156505, 1152397, 1157064, 1157069, 1155408, 1137823,\n", - " 1143502, 1157565, 1150465, 1146854, 1142221, 1135730, 1135733, 1152179,\n", - " 1165703, 1150828, 1147810, 1147818, 1157784, 1158304, 1158306, 1158311,\n", - " 1151271, 1155441, 1155512, 1150130, 1150136, 1154530, 1154528, 1156919,\n", - " 1142755, 1142764, 1142752, 1142758, 1156271, 1151379, 1155122, 1149321,\n", - " 1149505, 1153486, 1155755, 1155757, 1151424, 1146913, 1145806, 1158096,\n", - " 1155628, 1156563, 1154555, 1158824, 1177965, 1158325, 1154036, 1148836,\n", - " 1148835, 1155646, 1153363, 1158355, 1143256, 1143263, 1143257, 1154642,\n", - " 1154652, 1154250, 1154240, 1156711, 1139627, 1160106, 1154902, 1154909,\n", - " 1150371, 1157439, 1150987, 1157928, 1160453, 1158578, 1156764, 1153786,\n", - " 1149904, 1137381, 1145682, 1145688, 1145694, 1164161, 1150661, 1158665,\n", - " 1157685, 1149145, 1159258, 1161108, 1140633, 1152209, 1152220, 1155433,\n", - " 1140374, 1155975, 1135196, 1156811, 1149700, 1159777, 1159441, 1160163,\n", - " 1136909, 1136896, 1158760, 1158882, 1140213, 1140221, 1159164, 1159158,\n", - " 1158815, 1158803, 1156778, 1136487, 1136494, 1136491, 1153632, 1153647,\n", - " 1156665, 1156490, 1153808, 1156278, 1136640, 1153834, 1153831, 1151140,\n", - " 1156516, 1165497, 1146123, 1146126, 1165786, 1188201, 1138110, 1158006,\n", - " 1155528, 1135661, 1164276, 1142666, 1162683, 1159042, 1159052, 1159071,\n", - " 1155197, 1160563, 1153052, 1153045, 1171551, 1173007, 1163072, 1155763,\n", - " 1156235, 1144156, 1142870, 1156107, 1165244, 1150046, 1149063, 1145948,\n", - " 1154297, 1153519, 1158680, 1164006, 1164012, 1149956, 1139592, 1139286,\n", - " 1157238, 1148771, 1146063, 1140130, 1158868, 1170403, 1140641, 1140650,\n", - " 1140643, 1148600, 1159641, 1144509, 1155816, 1165047, 1158643, 1158653,\n", - " 1159025, 1159032, 1155588, 1188672, 1156589, 1168426, 1144979, 1149008,\n", - " 1161240, 1144750, 1152776, 1166881, 1155054, 1141468, 1141471, 1147426,\n", - " 1147427, 1147436, 1179982, 1156739, 1160849, 1157955, 1166591, 1150648,\n", - " 1171040, 1144810, 1144812, 1144808, 1153268, 1135567, 1165716, 1164750,\n", - " 1156293, 1156303, 1166924, 1145228, 1169281, 1169282, 1155324, 1166462,\n", - " 1144972, 1144973, 1142136, 1165686, 1143028, 1145447, 1147355, 1148124,\n", - " 1147723, 1145892, 1145902, 1168659, 1163965, 1152203, 1143397, 1170980,\n", - " 1158724, 1154070, 1154075, 1147339, 1170758, 1192410, 1179496, 1151598,\n", - " 1149125, 1154915, 1167817, 1166653, 1169298, 1155172, 1155180, 1150515,\n", - " 1150518, 1156119, 1145533, 1145531, 1144346, 1144336, 1157534, 1154670,\n", - " 1157331, 1177717, 1138129, 1141051, 1151668, 1169359, 1154353, 1154354,\n", - " 1154352, 1147502, 1138613, 1149680, 1158611, 1158623, 1158062, 1172877,\n", - " 1149846, 1157385, 1160135, 1155494, 1152353, 1165528, 1169929, 1161130,\n", - " 1149402, 1148667, 1148666, 1173307, 1169144, 1152150, 1153759, 1153754,\n", - " 1159655, 1151696, 1157158, 1157153, 1155459, 1157373, 1147711, 1147707,\n", - " 1148131, 1169913, 1147929, 1157593, 1157595, 1169038, 1167712, 1155739,\n", - " 1166016, 1160152, 1174845, 1170555, 1166684, 1170874, 1171823, 1182131,\n", - " 1150234, 1154151, 1154148, 1167517, 1149169, 1149176, 1149173, 1172537,\n", - " 1181860, 1186117, 1143279, 1167658, 1168481, 1182423, 1143420, 1166299,\n", - " 1174333, 1153803, 1153794, 1153141, 1178914, 1155257, 1157792, 1157795,\n", - " 1172550, 1171623, 1157126, 1157124, 1153898, 1145586, 1188790, 1191749,\n", - " 1162403, 1145626, 1154834, 1180383, 1157483, 1161067, 1149753, 1149755,\n", - " 1153609, 1157761, 1155990, 1179776, 1181149, 1158512, 1158933, 1158940,\n", - " 1158374, 1155892, 1155899, 1160377, 1183068, 1140393, 1140399, 1168273,\n", - " 1188249, 1187272, 1186278, 1162253, 1165146, 1164437, 1182337, 1188137,\n", - " 1165078, 1188074, 1147180, 1147172, 1147182, 1156162, 1192736, 1139828,\n", - " 1139831, 1139837, 1154812, 1156055, 1187231, 1182834, 1151972, 1173058,\n", - " 1149544, 1187055, 1191964, 1188172, 1141001, 1184493, 1188360, 1178065,\n", - " 1187685, 1151774, 1193774, 1152117, 1169707, 1166841, 1192567, 1170128,\n", - " 1167094, 1161188, 1156681, 1172423, 1158064, 1158067, 1181616, 1145395,\n", - " 1185848, 1187596, 1194419, 1155962, 1176833, 1179769, 1182191, 1189372,\n", - " 1182660], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195397, 1198248, 1197219, 1199282, 1198449, 1202243, 1202255, 1196195,\n", - " 1198844, 1201577, 1194626, 1197777, 1199252, 1201016, 1198633, 1198690,\n", - " 1198557, 1198559, 1197376, 1194866, 1194748, 1194770, 1195488, 1196631,\n", - " 1195263, 1197921, 1197924, 1199135, 1201989, 1194880, 1195888, 1195896,\n", - " 1202902, 1199171, 1195740, 1197856, 1197867, 1196989, 1196521, 1194752,\n", - " 1198983, 1195313, 1196840, 1195571, 1196715, 1199810, 1195143, 1195216,\n", - " 1195265, 1199379, 1195541, 1197253, 1197409, 1198273, 1200949, 1200959,\n", - " 1199062, 1199688, 1199628, 1199803, 1197676, 1197990, 1200873, 1199152,\n", - " 1198321, 1199676, 1194786, 1201511, 1197682, 1197686, 1196508, 1200668,\n", - " 1197601, 1197603, 1196727, 1195771, 1202618, 1200155, 1201547, 1197214,\n", - " 1200507, 1199445, 1198797, 1201079, 1200913, 1201405, 1202641, 1201492,\n", - " 1201737, 1200526, 1202055, 1202978, 1202138, 1196888, 1200692, 1199907,\n", - " 1201442, 1201029, 1199979, 1195876, 1201862, 1201871, 1201590, 1199929,\n", - " 1201800, 1200398, 1200794, 1196071, 1199606, 1197334, 1198929, 1195177,\n", - " 1195379, 1197822, 1196480, 1201499, 1199405, 1198824, 1197731, 1200437,\n", - " 1201003, 1195064, 1197652, 1200707, 1197335, 1203300, 1197035, 1197039,\n", - " 1195163, 1203162], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195397, 1198248, 1197219, 1199282, 1198449, 1202243, 1202255, 1196195,\n", - " 1198844, 1201577, 1194626, 1197777, 1199252, 1201016, 1198633, 1198690,\n", - " 1198557, 1198559, 1197376, 1194866, 1194748, 1194770, 1195488, 1196631,\n", - " 1195263, 1197921, 1197924, 1199135, 1201989, 1194880, 1195888, 1195896,\n", - " 1202902, 1199171, 1195740, 1197856, 1197867, 1196989, 1196521, 1194752,\n", - " 1198983, 1195313, 1196840, 1195571, 1196715, 1199810, 1195143, 1195216,\n", - " 1195265, 1199379, 1195541, 1197253, 1197409, 1198273, 1200949, 1200959,\n", - " 1199062, 1199688, 1199628, 1199803, 1197676, 1197990, 1200873, 1199152,\n", - " 1198321, 1199676, 1194786, 1201511, 1197682, 1197686, 1196508, 1200668,\n", - " 1197601, 1197603, 1196727, 1195771, 1202618, 1200155, 1201547, 1197214,\n", - " 1200507, 1199445, 1198797, 1201079, 1200913, 1201405, 1202641, 1201492,\n", - " 1201737, 1200526, 1202055, 1202978, 1202138, 1196888, 1200692, 1199907,\n", - " 1201442, 1201029, 1199979, 1195876, 1201862, 1201871, 1201590, 1199929,\n", - " 1201800, 1200398, 1200794, 1196071, 1199606, 1197334, 1198929, 1195177,\n", - " 1195379, 1197822, 1196480, 1201499, 1199405, 1198824, 1197731, 1200437,\n", - " 1201003, 1195064, 1197652, 1200707, 1197335, 1203300, 1197035, 1197039,\n", - " 1195163, 1203162], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 0.1281, 0.0232, 0.6368, ..., 0.1247, -0.0017, -0.0041],\n", - " [ 0.1600, 0.0661, 0.8028, ..., 0.1579, -0.0019, -0.0052],\n", - " [ 0.0956, 0.0155, 0.5924, ..., 0.1581, -0.0021, -0.0038],\n", - " ...,\n", - " [ 0.0824, 0.0179, 0.6169, ..., 0.1580, -0.0021, -0.0040],\n", - " [ 0.0900, 0.0355, 0.6042, ..., 0.1637, -0.0022, -0.0040],\n", - " [ 0.1106, 0.0120, 0.6370, ..., 0.1316, -0.0017, -0.0042]],\n", - " device='cuda:0'), 'paper': tensor([[ 4.8223e-01, -8.0554e-03, 1.7704e+00, ..., -3.5806e-03,\n", - " -1.0070e-02, -7.7288e-03],\n", - " [ 1.5183e+00, -1.5777e-02, 3.3986e+00, ..., -9.8926e-03,\n", - " -2.7720e-02, 2.9521e-01],\n", - " [ 8.0327e-01, -5.2254e-03, 9.8283e-01, ..., -6.1775e-03,\n", - " -1.2248e-02, 1.3175e-01],\n", - " ...,\n", - " [ 1.5156e+00, 6.9658e-01, 1.9207e+00, ..., 5.3357e-02,\n", - " -1.7876e-02, 1.1375e+00],\n", - " [ 7.8748e-01, -6.0274e-03, 9.4865e-01, ..., -5.5414e-03,\n", - " -1.5395e-02, 4.9695e-01],\n", - " [ 2.1718e+00, -2.0330e-02, 3.0112e+00, ..., -2.9252e-03,\n", - " -3.6684e-02, 2.2896e+00]], device='cuda:0'), 'author': tensor([[-2.5083e-03, 1.7450e-01, 2.8274e-01, ..., 1.2572e+00,\n", - " -4.7181e-03, -2.0848e-03],\n", - " [-1.3345e-03, 1.4045e-01, 2.0687e-01, ..., 1.4594e+00,\n", - " -8.2530e-04, 1.2362e-01],\n", - " [-1.3096e-03, 1.7210e-01, 2.2206e-01, ..., 1.4650e+00,\n", - " -3.9159e-04, 1.7801e-01],\n", - " ...,\n", - " [-1.4783e-03, 1.4838e-01, 2.7012e-01, ..., 1.3806e+00,\n", - " -2.2894e-03, 6.5670e-02],\n", - " [-1.3563e-03, 2.6995e-01, 3.5611e-01, ..., 1.2050e+00,\n", - " -3.7868e-03, -3.1792e-03],\n", - " [-1.0154e-03, 7.6715e-02, 2.3650e-01, ..., 1.5429e+00,\n", - " 2.2793e-02, 2.3743e-01]], device='cuda:0'), 'field_of_study': tensor([[ 8.1340e-03, 5.2010e-01, 1.9217e-01, ..., -5.7421e-03,\n", - " 2.0423e-01, 6.6255e-02],\n", - " [-9.7573e-04, 4.5509e-01, 2.5626e-01, ..., -7.5471e-03,\n", - " 1.6370e-01, 2.7345e-01],\n", - " [-8.0247e-04, 4.1642e-01, 2.5082e-01, ..., -5.7798e-03,\n", - " 1.0188e-01, 1.9331e-01],\n", - " ...,\n", - " [-8.6413e-05, 4.2799e-01, 1.3191e-01, ..., -5.8494e-03,\n", - " 1.3934e-01, 1.4121e-01],\n", - " [-1.1355e-03, 4.3201e-01, 2.1821e-01, ..., -7.2296e-03,\n", - " 1.7371e-01, 3.2641e-01],\n", - " [-7.3585e-04, 4.8931e-01, 1.4469e-01, ..., -7.3464e-03,\n", - " 2.1492e-01, 2.2633e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 102, 180, 61, 36, 134, 364, 477, 477, 373, 373, 373, 437,\n", - " 437, 390, 390, 390, 532, 453, 760, 760, 781, 781, 622, 805,\n", - " 754, 898, 777, 831, 831, 831, 1004, 829, 1335, 1176, 1261, 1186,\n", - " 1511, 1511, 1501, 1501, 1477, 1384, 1395, 1671, 1671, 1536, 1380, 1495,\n", - " 1495, 1495, 1587, 1744, 1656, 1710, 1857, 1767, 1778, 1763, 1902, 1902,\n", - " 2159, 1944, 1956, 2101, 2101, 2115, 2115, 2115, 2016, 2082, 2082, 1988,\n", - " 2185, 1891, 2114, 2169, 2260, 2061, 2143, 2223, 2061, 2234, 2296, 2288,\n", - " 2374, 2394, 2503, 2509, 2701, 2558, 2558, 2457, 2555, 2542, 2542, 2637,\n", - " 2817, 2790, 2790, 2790, 2672, 2943, 3021, 2870, 2847, 2847, 2869, 2832,\n", - " 3034, 2932, 3138, 3138, 3333, 3311, 3286, 3234, 3471, 3471, 3428, 3641,\n", - " 3699, 3630, 3630, 3534, 3534, 3764, 3867, 3942, 3928, 3904, 3950, 3910,\n", - " 3962, 3962, 3962, 3962, 3927, 4062, 4199, 4199, 4230, 4294, 4294, 4294,\n", - " 4423, 4363, 4396, 4396, 4570, 4750, 4587, 4559, 4568, 4700, 4596, 4584,\n", - " 4763, 4830, 4796, 4676, 5021, 4786, 5122, 5028, 4922, 5106, 5106, 5053,\n", - " 5090, 5039, 5042, 5042, 5093, 4995, 5147, 5189, 5055, 5203, 5502, 5385,\n", - " 5502, 5576, 5682, 5774],\n", - " [ 3, 94, 7, 6, 69, 74, 27, 125, 98, 68, 2, 88,\n", - " 3, 113, 3, 127, 3, 37, 15, 89, 67, 88, 96, 36,\n", - " 61, 30, 8, 13, 100, 86, 98, 3, 115, 16, 12, 99,\n", - " 121, 40, 87, 28, 24, 97, 41, 122, 23, 117, 16, 57,\n", - " 89, 62, 85, 75, 104, 6, 60, 120, 44, 12, 91, 10,\n", - " 109, 60, 12, 116, 78, 119, 70, 14, 56, 116, 22, 74,\n", - " 93, 103, 64, 76, 127, 1, 97, 33, 60, 79, 59, 95,\n", - " 10, 39, 42, 82, 29, 126, 123, 116, 31, 111, 20, 82,\n", - " 5, 102, 25, 10, 84, 46, 106, 45, 90, 3, 12, 47,\n", - " 84, 9, 108, 18, 64, 128, 128, 128, 4, 74, 27, 55,\n", - " 96, 83, 80, 39, 52, 60, 32, 17, 26, 73, 65, 39,\n", - " 74, 84, 129, 118, 63, 39, 43, 0, 16, 30, 105, 50,\n", - " 114, 99, 48, 112, 38, 46, 107, 21, 11, 96, 76, 58,\n", - " 74, 38, 34, 92, 49, 3, 81, 51, 66, 88, 9, 101,\n", - " 54, 122, 72, 8, 19, 3, 23, 74, 43, 53, 110, 124,\n", - " 71, 35, 77, 104]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 319, 3350, 2125, ..., 521, 1943, 4704],\n", - " [ 259, 211, 310, ..., 8028, 8104, 8005]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 120, 68, 31, ..., 3, 3, 104],\n", - " [ 126, 40, 107, ..., 5735, 5538, 5680]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 34, 285, 259, ..., 7861, 8010, 8010],\n", - " [ 905, 78, 266, ..., 650, 437, 246]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 671, 798, 316, ..., 246, 135, 225],\n", - " [ 121, 230, 95, ..., 7978, 8096, 8103]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2561, 6385, 6345, ..., 5267, 5267, 7674],\n", - " [ 151, 183, 43, ..., 5761, 5732, 5728]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 34, 319, 319, ..., 8010, 8010, 8010],\n", - " [3775, 259, 2920, ..., 4093, 4578, 4882]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 168, 168, 168, ..., 5682, 5682, 5682],\n", - " [3210, 3262, 3324, ..., 3694, 3849, 3756]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006472\n", - "sampling 0.00632\n", - "noi time: 0.001939\n", - "get_vertex_data call: 0.036513\n", - "noi group time: 0.003521\n", - "eoi_group_time: 0.016074\n", - "second half: 0.214117\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 17533, 31145, 24187, ..., 1100728, 1119043, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 17533, 31145, 24187, ..., 1100728, 1119043, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208576, 1227503, 1224370, ..., 1929320, 1931115, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208576, 1227503, 1224370, ..., 1929320, 1931115, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1136228, 1136342, 1135933, 1135716, 1135726, 1137791, 1140785,\n", - " 1139698, 1141756, 1141758, 1137506, 1138335, 1136219, 1140297, 1136965,\n", - " 1136969, 1136971, 1141443, 1146803, 1151164, 1149831, 1149834, 1139811,\n", - " 1145992, 1143363, 1139243, 1150395, 1139958, 1150506, 1136959, 1155689,\n", - " 1143820, 1149644, 1149646, 1147483, 1142894, 1153940, 1144636, 1135262,\n", - " 1146995, 1153012, 1148346, 1146661, 1146472, 1136125, 1152666, 1153231,\n", - " 1147095, 1136683, 1136685, 1150329, 1134710, 1146376, 1138745, 1138749,\n", - " 1134658, 1151547, 1138112, 1135183, 1137181, 1162460, 1135367, 1135202,\n", - " 1135210, 1140767, 1137798, 1134794, 1137329, 1137330, 1136178, 1157102,\n", - " 1144395, 1136826, 1137529, 1136712, 1152376, 1137441, 1135274, 1156159,\n", - " 1148481, 1139161, 1135576, 1135583, 1135827, 1135828, 1135670, 1138514,\n", - " 1138525, 1137957, 1137959, 1158136, 1136982, 1137295, 1139878, 1138440,\n", - " 1138461, 1158390, 1147112, 1147119, 1142611, 1160819, 1145842, 1145843,\n", - " 1145852, 1148531, 1139844, 1136457, 1139673, 1142255, 1165579, 1136085,\n", - " 1136092, 1134992, 1134770, 1136555, 1152646, 1158974, 1142909, 1159009,\n", - " 1144410, 1153543, 1153548, 1140034, 1139084, 1138148, 1141964, 1155661,\n", - " 1140557, 1152042, 1152044, 1137728, 1147317, 1147322, 1146222, 1134750,\n", - " 1141098, 1141100, 1144138, 1149001, 1141971, 1136392, 1154860, 1137299,\n", - " 1162713, 1143225, 1139025, 1140000, 1149979, 1146844, 1135865, 1139436,\n", - " 1136637, 1161173, 1136917, 1144237, 1140607, 1141161, 1139495, 1134987,\n", - " 1142056, 1142053, 1146799, 1142093, 1145161, 1158749, 1139190, 1142913,\n", - " 1137651, 1144596, 1136864, 1141578, 1135327, 1141398, 1150906, 1150910,\n", - " 1137374, 1158698, 1138539, 1137849, 1137854, 1147153, 1141365, 1141367,\n", - " 1149101, 1144279, 1139510, 1140990, 1146695, 1141560, 1141565, 1143692,\n", - " 1147050, 1147047, 1145876, 1155835, 1152976, 1152980, 1160251, 1135457,\n", - " 1138995, 1139007, 1141925, 1144250, 1144242, 1140689, 1137571, 1134851,\n", - " 1145974, 1142111, 1146024, 1146025, 1150606, 1138085, 1146129, 1154323,\n", - " 1154328, 1154332, 1149928, 1149933, 1147084, 1139990, 1143294, 1147543,\n", - " 1147282, 1142816, 1136330, 1140341, 1147461, 1147470, 1142637, 1148003,\n", - " 1146080, 1136160, 1142591, 1138924, 1157713, 1136836, 1136845, 1141289,\n", - " 1139329, 1139341, 1144779, 1144778, 1138226, 1142153, 1142158, 1143345,\n", - " 1144765, 1140844, 1139975, 1135819, 1146514, 1146523, 1143456, 1143460,\n", - " 1143457, 1143937, 1140829, 1146631, 1146636, 1146634, 1140364, 1137990,\n", - " 1143075, 1143082, 1148966, 1147984, 1147988, 1147995, 1147999, 1134902,\n", - " 1134907, 1139252, 1139255, 1139258, 1147120, 1147131, 1145467, 1148704,\n", - " 1148719, 1141836, 1148468, 1148476, 1149725, 1147025, 1147257, 1145017,\n", - " 1147196, 1158226, 1143922, 1141144, 1145238, 1145240, 1145751, 1151242,\n", - " 1148214, 1148940, 1147966, 1156468, 1149791, 1149777, 1144514, 1144203,\n", - " 1165252, 1151480, 1151485, 1140409, 1149535, 1150127, 1152813, 1141949,\n", - " 1141279, 1144828, 1148744, 1153574, 1154985, 1147653, 1149412, 1148294,\n", - " 1148300, 1152070, 1148612, 1154430, 1154420, 1148180, 1139718, 1146682,\n", - " 1138876, 1152435, 1148720, 1148729, 1147627, 1146559, 1139936, 1153182,\n", - " 1154202, 1141739, 1153124, 1153192, 1153188, 1159828, 1159837, 1150935,\n", - " 1152877, 1143092, 1147446, 1147442, 1151811, 1135303, 1148498, 1136002,\n", - " 1150637, 1151348, 1151351, 1148949, 1146969, 1156402, 1147391, 1146623,\n", - " 1151691, 1152100, 1153030, 1150086, 1145539, 1137746, 1146307, 1146304,\n", - " 1152612, 1140521, 1149203, 1152826, 1155337, 1154123, 1155356, 1152673,\n", - " 1151617, 1136131, 1136132, 1148916, 1152958, 1140451, 1144533, 1138986,\n", - " 1143995, 1152336, 1152341, 1146816, 1153311, 1138276, 1138280, 1138281,\n", - " 1136025, 1136028, 1152928, 1150099, 1150164, 1144016, 1148040, 1155202,\n", - " 1152601, 1149792, 1137047, 1137048, 1148628, 1158530, 1158540, 1148369,\n", - " 1137458, 1148253, 1159223, 1153085, 1135438, 1157547, 1158854, 1158860,\n", - " 1158862, 1150869, 1156505, 1152833, 1145191, 1139473, 1151257, 1151262,\n", - " 1157558, 1150465, 1160258, 1142221, 1138830, 1152179, 1152737, 1156935,\n", - " 1143010, 1139525, 1158304, 1158308, 1158311, 1151273, 1155441, 1155452,\n", - " 1137970, 1153354, 1150130, 1150136, 1140877, 1154529, 1154539, 1156913,\n", - " 1142755, 1142758, 1154226, 1151379, 1155375, 1155122, 1152527, 1157183,\n", - " 1153481, 1155749, 1151424, 1146924, 1145793, 1156463, 1158096, 1168226,\n", - " 1154555, 1136476, 1158824, 1153721, 1148836, 1148835, 1155646, 1160958,\n", - " 1161389, 1154644, 1154645, 1154240, 1163375, 1162190, 1156711, 1139627,\n", - " 1151317, 1154909, 1163127, 1143189, 1143531, 1150371, 1144712, 1141627,\n", - " 1141620, 1150982, 1155293, 1143517, 1159629, 1157934, 1158123, 1158578,\n", - " 1156762, 1159001, 1153786, 1158193, 1137381, 1159116, 1164319, 1154014,\n", - " 1135601, 1135602, 1148147, 1157685, 1149145, 1159253, 1140634, 1152209,\n", - " 1152215, 1140380, 1140381, 1155884, 1144843, 1155971, 1155975, 1136896,\n", - " 1158759, 1158886, 1140218, 1161270, 1159164, 1158285, 1152463, 1151615,\n", - " 1161625, 1156665, 1152136, 1152143, 1152131, 1157261, 1153808, 1136640,\n", - " 1134757, 1157860, 1158545, 1158558, 1165787, 1138110, 1144582, 1150011,\n", - " 1155535, 1161539, 1142495, 1163456, 1164276, 1142666, 1159052, 1157939,\n", - " 1160563, 1162044, 1153052, 1153042, 1153045, 1172995, 1163072, 1167707,\n", - " 1156381, 1144158, 1166256, 1166258, 1142865, 1159370, 1153842, 1138384,\n", - " 1150046, 1149063, 1151020, 1153514, 1153519, 1147300, 1158685, 1171986,\n", - " 1146870, 1161652, 1164997, 1157600, 1138161, 1156795, 1163381, 1139286,\n", - " 1148021, 1166073, 1148771, 1140735, 1157357, 1146056, 1146063, 1164423,\n", - " 1171249, 1164048, 1158878, 1170415, 1169493, 1140643, 1148600, 1148603,\n", - " 1148607, 1172725, 1159646, 1155816, 1163210, 1158653, 1159032, 1169108,\n", - " 1144492, 1155588, 1165989, 1138674, 1148567, 1144977, 1170577, 1149011,\n", - " 1167682, 1144739, 1144750, 1155268, 1165413, 1141471, 1141459, 1169475,\n", - " 1151650, 1147427, 1182242, 1156737, 1156739, 1160849, 1161015, 1150648,\n", - " 1171040, 1144810, 1144812, 1144808, 1164727, 1140112, 1135567, 1156300,\n", - " 1156303, 1162622, 1145228, 1145229, 1160232, 1147673, 1144973, 1143027,\n", - " 1166053, 1152639, 1152624, 1152630, 1148124, 1153534, 1168659, 1160832,\n", - " 1149555, 1149565, 1158724, 1158722, 1168764, 1150773, 1150781, 1154916,\n", - " 1169602, 1167817, 1155172, 1155170, 1166194, 1150518, 1156119, 1156118,\n", - " 1145523, 1154617, 1144336, 1147745, 1190644, 1169162, 1157331, 1150031,\n", - " 1149452, 1149688, 1158611, 1158623, 1158062, 1157385, 1147416, 1167388,\n", - " 1152353, 1165525, 1143177, 1165906, 1173307, 1169144, 1152150, 1153751,\n", - " 1159651, 1167857, 1157153, 1148131, 1169913, 1167712, 1181021, 1178820,\n", - " 1160982, 1182084, 1172932, 1172606, 1153428, 1159100, 1171073, 1166682,\n", - " 1166684, 1183662, 1160314, 1150234, 1154148, 1158176, 1149169, 1186117,\n", - " 1168481, 1143410, 1143420, 1171303, 1170178, 1181241, 1153805, 1189183,\n", - " 1158030, 1180203, 1161255, 1161262, 1162129, 1182354, 1155262, 1171770,\n", - " 1157795, 1177585, 1171623, 1178360, 1157126, 1153898, 1154497, 1186813,\n", - " 1162412, 1145626, 1156443, 1172024, 1180383, 1180004, 1161911, 1149744,\n", - " 1149755, 1146240, 1181081, 1165225, 1155990, 1155985, 1185327, 1181138,\n", - " 1163869, 1158374, 1155899, 1182797, 1182795, 1162694, 1140399, 1182330,\n", - " 1188241, 1171037, 1166442, 1176983, 1188270, 1164271, 1179135, 1165444,\n", - " 1146161, 1147179, 1147180, 1147182, 1156161, 1189200, 1168943, 1170421,\n", - " 1139828, 1139831, 1139837, 1182991, 1154812, 1164924, 1164914, 1151288,\n", - " 1149619, 1156055, 1173058, 1181796, 1156835, 1188039, 1141001, 1172823,\n", - " 1181413, 1181917, 1171675, 1151774, 1194093, 1192959, 1166841, 1192576,\n", - " 1194120, 1171201, 1177461, 1175354, 1189575, 1178268, 1178265, 1158064,\n", - " 1145395, 1145403, 1183941, 1179734, 1155962, 1187840, 1183610, 1179766,\n", - " 1179767, 1186605, 1176972, 1189910, 1163071, 1182863], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1136228, 1136342, 1135933, 1135716, 1135726, 1137791, 1140785,\n", - " 1139698, 1141756, 1141758, 1137506, 1138335, 1136219, 1140297, 1136965,\n", - " 1136969, 1136971, 1141443, 1146803, 1151164, 1149831, 1149834, 1139811,\n", - " 1145992, 1143363, 1139243, 1150395, 1139958, 1150506, 1136959, 1155689,\n", - " 1143820, 1149644, 1149646, 1147483, 1142894, 1153940, 1144636, 1135262,\n", - " 1146995, 1153012, 1148346, 1146661, 1146472, 1136125, 1152666, 1153231,\n", - " 1147095, 1136683, 1136685, 1150329, 1134710, 1146376, 1138745, 1138749,\n", - " 1134658, 1151547, 1138112, 1135183, 1137181, 1162460, 1135367, 1135202,\n", - " 1135210, 1140767, 1137798, 1134794, 1137329, 1137330, 1136178, 1157102,\n", - " 1144395, 1136826, 1137529, 1136712, 1152376, 1137441, 1135274, 1156159,\n", - " 1148481, 1139161, 1135576, 1135583, 1135827, 1135828, 1135670, 1138514,\n", - " 1138525, 1137957, 1137959, 1158136, 1136982, 1137295, 1139878, 1138440,\n", - " 1138461, 1158390, 1147112, 1147119, 1142611, 1160819, 1145842, 1145843,\n", - " 1145852, 1148531, 1139844, 1136457, 1139673, 1142255, 1165579, 1136085,\n", - " 1136092, 1134992, 1134770, 1136555, 1152646, 1158974, 1142909, 1159009,\n", - " 1144410, 1153543, 1153548, 1140034, 1139084, 1138148, 1141964, 1155661,\n", - " 1140557, 1152042, 1152044, 1137728, 1147317, 1147322, 1146222, 1134750,\n", - " 1141098, 1141100, 1144138, 1149001, 1141971, 1136392, 1154860, 1137299,\n", - " 1162713, 1143225, 1139025, 1140000, 1149979, 1146844, 1135865, 1139436,\n", - " 1136637, 1161173, 1136917, 1144237, 1140607, 1141161, 1139495, 1134987,\n", - " 1142056, 1142053, 1146799, 1142093, 1145161, 1158749, 1139190, 1142913,\n", - " 1137651, 1144596, 1136864, 1141578, 1135327, 1141398, 1150906, 1150910,\n", - " 1137374, 1158698, 1138539, 1137849, 1137854, 1147153, 1141365, 1141367,\n", - " 1149101, 1144279, 1139510, 1140990, 1146695, 1141560, 1141565, 1143692,\n", - " 1147050, 1147047, 1145876, 1155835, 1152976, 1152980, 1160251, 1135457,\n", - " 1138995, 1139007, 1141925, 1144250, 1144242, 1140689, 1137571, 1134851,\n", - " 1145974, 1142111, 1146024, 1146025, 1150606, 1138085, 1146129, 1154323,\n", - " 1154328, 1154332, 1149928, 1149933, 1147084, 1139990, 1143294, 1147543,\n", - " 1147282, 1142816, 1136330, 1140341, 1147461, 1147470, 1142637, 1148003,\n", - " 1146080, 1136160, 1142591, 1138924, 1157713, 1136836, 1136845, 1141289,\n", - " 1139329, 1139341, 1144779, 1144778, 1138226, 1142153, 1142158, 1143345,\n", - " 1144765, 1140844, 1139975, 1135819, 1146514, 1146523, 1143456, 1143460,\n", - " 1143457, 1143937, 1140829, 1146631, 1146636, 1146634, 1140364, 1137990,\n", - " 1143075, 1143082, 1148966, 1147984, 1147988, 1147995, 1147999, 1134902,\n", - " 1134907, 1139252, 1139255, 1139258, 1147120, 1147131, 1145467, 1148704,\n", - " 1148719, 1141836, 1148468, 1148476, 1149725, 1147025, 1147257, 1145017,\n", - " 1147196, 1158226, 1143922, 1141144, 1145238, 1145240, 1145751, 1151242,\n", - " 1148214, 1148940, 1147966, 1156468, 1149791, 1149777, 1144514, 1144203,\n", - " 1165252, 1151480, 1151485, 1140409, 1149535, 1150127, 1152813, 1141949,\n", - " 1141279, 1144828, 1148744, 1153574, 1154985, 1147653, 1149412, 1148294,\n", - " 1148300, 1152070, 1148612, 1154430, 1154420, 1148180, 1139718, 1146682,\n", - " 1138876, 1152435, 1148720, 1148729, 1147627, 1146559, 1139936, 1153182,\n", - " 1154202, 1141739, 1153124, 1153192, 1153188, 1159828, 1159837, 1150935,\n", - " 1152877, 1143092, 1147446, 1147442, 1151811, 1135303, 1148498, 1136002,\n", - " 1150637, 1151348, 1151351, 1148949, 1146969, 1156402, 1147391, 1146623,\n", - " 1151691, 1152100, 1153030, 1150086, 1145539, 1137746, 1146307, 1146304,\n", - " 1152612, 1140521, 1149203, 1152826, 1155337, 1154123, 1155356, 1152673,\n", - " 1151617, 1136131, 1136132, 1148916, 1152958, 1140451, 1144533, 1138986,\n", - " 1143995, 1152336, 1152341, 1146816, 1153311, 1138276, 1138280, 1138281,\n", - " 1136025, 1136028, 1152928, 1150099, 1150164, 1144016, 1148040, 1155202,\n", - " 1152601, 1149792, 1137047, 1137048, 1148628, 1158530, 1158540, 1148369,\n", - " 1137458, 1148253, 1159223, 1153085, 1135438, 1157547, 1158854, 1158860,\n", - " 1158862, 1150869, 1156505, 1152833, 1145191, 1139473, 1151257, 1151262,\n", - " 1157558, 1150465, 1160258, 1142221, 1138830, 1152179, 1152737, 1156935,\n", - " 1143010, 1139525, 1158304, 1158308, 1158311, 1151273, 1155441, 1155452,\n", - " 1137970, 1153354, 1150130, 1150136, 1140877, 1154529, 1154539, 1156913,\n", - " 1142755, 1142758, 1154226, 1151379, 1155375, 1155122, 1152527, 1157183,\n", - " 1153481, 1155749, 1151424, 1146924, 1145793, 1156463, 1158096, 1168226,\n", - " 1154555, 1136476, 1158824, 1153721, 1148836, 1148835, 1155646, 1160958,\n", - " 1161389, 1154644, 1154645, 1154240, 1163375, 1162190, 1156711, 1139627,\n", - " 1151317, 1154909, 1163127, 1143189, 1143531, 1150371, 1144712, 1141627,\n", - " 1141620, 1150982, 1155293, 1143517, 1159629, 1157934, 1158123, 1158578,\n", - " 1156762, 1159001, 1153786, 1158193, 1137381, 1159116, 1164319, 1154014,\n", - " 1135601, 1135602, 1148147, 1157685, 1149145, 1159253, 1140634, 1152209,\n", - " 1152215, 1140380, 1140381, 1155884, 1144843, 1155971, 1155975, 1136896,\n", - " 1158759, 1158886, 1140218, 1161270, 1159164, 1158285, 1152463, 1151615,\n", - " 1161625, 1156665, 1152136, 1152143, 1152131, 1157261, 1153808, 1136640,\n", - " 1134757, 1157860, 1158545, 1158558, 1165787, 1138110, 1144582, 1150011,\n", - " 1155535, 1161539, 1142495, 1163456, 1164276, 1142666, 1159052, 1157939,\n", - " 1160563, 1162044, 1153052, 1153042, 1153045, 1172995, 1163072, 1167707,\n", - " 1156381, 1144158, 1166256, 1166258, 1142865, 1159370, 1153842, 1138384,\n", - " 1150046, 1149063, 1151020, 1153514, 1153519, 1147300, 1158685, 1171986,\n", - " 1146870, 1161652, 1164997, 1157600, 1138161, 1156795, 1163381, 1139286,\n", - " 1148021, 1166073, 1148771, 1140735, 1157357, 1146056, 1146063, 1164423,\n", - " 1171249, 1164048, 1158878, 1170415, 1169493, 1140643, 1148600, 1148603,\n", - " 1148607, 1172725, 1159646, 1155816, 1163210, 1158653, 1159032, 1169108,\n", - " 1144492, 1155588, 1165989, 1138674, 1148567, 1144977, 1170577, 1149011,\n", - " 1167682, 1144739, 1144750, 1155268, 1165413, 1141471, 1141459, 1169475,\n", - " 1151650, 1147427, 1182242, 1156737, 1156739, 1160849, 1161015, 1150648,\n", - " 1171040, 1144810, 1144812, 1144808, 1164727, 1140112, 1135567, 1156300,\n", - " 1156303, 1162622, 1145228, 1145229, 1160232, 1147673, 1144973, 1143027,\n", - " 1166053, 1152639, 1152624, 1152630, 1148124, 1153534, 1168659, 1160832,\n", - " 1149555, 1149565, 1158724, 1158722, 1168764, 1150773, 1150781, 1154916,\n", - " 1169602, 1167817, 1155172, 1155170, 1166194, 1150518, 1156119, 1156118,\n", - " 1145523, 1154617, 1144336, 1147745, 1190644, 1169162, 1157331, 1150031,\n", - " 1149452, 1149688, 1158611, 1158623, 1158062, 1157385, 1147416, 1167388,\n", - " 1152353, 1165525, 1143177, 1165906, 1173307, 1169144, 1152150, 1153751,\n", - " 1159651, 1167857, 1157153, 1148131, 1169913, 1167712, 1181021, 1178820,\n", - " 1160982, 1182084, 1172932, 1172606, 1153428, 1159100, 1171073, 1166682,\n", - " 1166684, 1183662, 1160314, 1150234, 1154148, 1158176, 1149169, 1186117,\n", - " 1168481, 1143410, 1143420, 1171303, 1170178, 1181241, 1153805, 1189183,\n", - " 1158030, 1180203, 1161255, 1161262, 1162129, 1182354, 1155262, 1171770,\n", - " 1157795, 1177585, 1171623, 1178360, 1157126, 1153898, 1154497, 1186813,\n", - " 1162412, 1145626, 1156443, 1172024, 1180383, 1180004, 1161911, 1149744,\n", - " 1149755, 1146240, 1181081, 1165225, 1155990, 1155985, 1185327, 1181138,\n", - " 1163869, 1158374, 1155899, 1182797, 1182795, 1162694, 1140399, 1182330,\n", - " 1188241, 1171037, 1166442, 1176983, 1188270, 1164271, 1179135, 1165444,\n", - " 1146161, 1147179, 1147180, 1147182, 1156161, 1189200, 1168943, 1170421,\n", - " 1139828, 1139831, 1139837, 1182991, 1154812, 1164924, 1164914, 1151288,\n", - " 1149619, 1156055, 1173058, 1181796, 1156835, 1188039, 1141001, 1172823,\n", - " 1181413, 1181917, 1171675, 1151774, 1194093, 1192959, 1166841, 1192576,\n", - " 1194120, 1171201, 1177461, 1175354, 1189575, 1178268, 1178265, 1158064,\n", - " 1145395, 1145403, 1183941, 1179734, 1155962, 1187840, 1183610, 1179766,\n", - " 1179767, 1186605, 1176972, 1189910, 1163071, 1182863], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197228, 1199282, 1202255, 1198832, 1198840, 1198844, 1201581, 1201582,\n", - " 1199270, 1198021, 1194626, 1197777, 1197791, 1199248, 1201016, 1202804,\n", - " 1198557, 1194745, 1197152, 1195494, 1196631, 1195263, 1199135, 1201933,\n", - " 1201989, 1201992, 1196031, 1199519, 1194882, 1195895, 1199172, 1197856,\n", - " 1196359, 1196695, 1196837, 1198958, 1198163, 1195265, 1197136, 1197140,\n", - " 1196247, 1196109, 1195850, 1195039, 1195541, 1197474, 1197640, 1202017,\n", - " 1196393, 1195353, 1199333, 1199060, 1197291, 1194941, 1194928, 1199685,\n", - " 1199628, 1202450, 1200076, 1200866, 1200872, 1200403, 1199676, 1201511,\n", - " 1196498, 1197970, 1197976, 1197601, 1201116, 1196727, 1196734, 1195771,\n", - " 1195773, 1200887, 1200893, 1198428, 1198811, 1201824, 1202417, 1197215,\n", - " 1198066, 1202630, 1202401, 1194803, 1200553, 1203071, 1197095, 1197100,\n", - " 1199908, 1200194, 1200198, 1196779, 1201442, 1202239, 1200899, 1202175,\n", - " 1195876, 1201291, 1201590, 1199925, 1199923, 1200398, 1200391, 1196966,\n", - " 1200784, 1195431, 1195676, 1195679, 1195664, 1200471, 1202432, 1200445,\n", - " 1198929, 1195415, 1201786, 1197822, 1194898, 1196597, 1196605, 1198819,\n", - " 1197035, 1194908], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197228, 1199282, 1202255, 1198832, 1198840, 1198844, 1201581, 1201582,\n", - " 1199270, 1198021, 1194626, 1197777, 1197791, 1199248, 1201016, 1202804,\n", - " 1198557, 1194745, 1197152, 1195494, 1196631, 1195263, 1199135, 1201933,\n", - " 1201989, 1201992, 1196031, 1199519, 1194882, 1195895, 1199172, 1197856,\n", - " 1196359, 1196695, 1196837, 1198958, 1198163, 1195265, 1197136, 1197140,\n", - " 1196247, 1196109, 1195850, 1195039, 1195541, 1197474, 1197640, 1202017,\n", - " 1196393, 1195353, 1199333, 1199060, 1197291, 1194941, 1194928, 1199685,\n", - " 1199628, 1202450, 1200076, 1200866, 1200872, 1200403, 1199676, 1201511,\n", - " 1196498, 1197970, 1197976, 1197601, 1201116, 1196727, 1196734, 1195771,\n", - " 1195773, 1200887, 1200893, 1198428, 1198811, 1201824, 1202417, 1197215,\n", - " 1198066, 1202630, 1202401, 1194803, 1200553, 1203071, 1197095, 1197100,\n", - " 1199908, 1200194, 1200198, 1196779, 1201442, 1202239, 1200899, 1202175,\n", - " 1195876, 1201291, 1201590, 1199925, 1199923, 1200398, 1200391, 1196966,\n", - " 1200784, 1195431, 1195676, 1195679, 1195664, 1200471, 1202432, 1200445,\n", - " 1198929, 1195415, 1201786, 1197822, 1194898, 1196597, 1196605, 1198819,\n", - " 1197035, 1194908], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.0639e-01, 1.6423e-02, 5.7119e-01, ..., 1.4944e-01,\n", - " -2.2314e-03, -3.9939e-03],\n", - " [ 1.7790e-01, 2.8342e-02, 7.6124e-01, ..., 1.2683e-01,\n", - " -1.8802e-03, -5.1404e-03],\n", - " [ 1.9375e-01, 1.6864e-03, 8.0334e-01, ..., 1.3775e-01,\n", - " -1.9774e-03, -5.1408e-03],\n", - " ...,\n", - " [ 2.0408e-01, 8.0506e-03, 8.5161e-01, ..., 1.2137e-01,\n", - " -1.8594e-03, -5.6550e-03],\n", - " [ 7.5963e-02, -8.5559e-05, 6.1356e-01, ..., 1.5166e-01,\n", - " -1.8198e-03, -3.9429e-03],\n", - " [ 1.0943e-01, 2.2238e-02, 6.3772e-01, ..., 1.6030e-01,\n", - " -2.2200e-03, -4.1285e-03]], device='cuda:0'), 'paper': tensor([[ 9.1670e-01, -3.0260e-03, 8.4657e-01, ..., -7.7590e-03,\n", - " -1.1750e-02, 2.5147e-01],\n", - " [ 1.9537e+00, 3.9204e-01, 1.7267e+00, ..., -1.7331e-03,\n", - " -1.9009e-02, 1.6700e+00],\n", - " [ 1.7612e+00, -7.0811e-03, 2.3802e+00, ..., -1.6982e-03,\n", - " -2.9063e-02, 1.6242e+00],\n", - " ...,\n", - " [ 1.9700e+00, -9.3481e-03, 2.0330e+00, ..., -5.7081e-04,\n", - " -3.3326e-02, 2.3692e+00],\n", - " [ 4.6368e-01, -3.5969e-02, 3.6392e+00, ..., -1.4570e-02,\n", - " -2.6862e-02, -1.4596e-02],\n", - " [ 2.1379e+00, -1.1685e-02, 2.2448e+00, ..., 1.5003e-01,\n", - " -3.7125e-02, 2.8358e+00]], device='cuda:0'), 'author': tensor([[-4.7517e-03, 3.1620e-01, 2.6016e-01, ..., 9.2186e-01,\n", - " -2.6871e-03, -2.9418e-03],\n", - " [-1.3148e-03, 7.6564e-02, 2.4277e-01, ..., 1.4046e+00,\n", - " -4.3690e-04, 4.4410e-02],\n", - " [-1.4132e-03, 5.4455e-02, 2.4007e-01, ..., 1.5103e+00,\n", - " -1.5052e-04, 1.3602e-01],\n", - " ...,\n", - " [-1.7676e-03, 1.9834e-01, 1.7166e-01, ..., 1.1394e+00,\n", - " -2.7303e-03, -8.4781e-04],\n", - " [-1.0757e-03, 1.0651e-01, 1.8477e-01, ..., 1.4990e+00,\n", - " -7.2718e-04, 1.5283e-01],\n", - " [-1.5006e-03, 1.4742e-01, 2.2416e-01, ..., 1.4156e+00,\n", - " -1.5245e-03, 7.0379e-02]], device='cuda:0'), 'field_of_study': tensor([[-3.8126e-04, 5.6092e-01, 1.1146e-01, ..., -7.3617e-03,\n", - " 3.3474e-01, 1.6823e-01],\n", - " [-3.2699e-04, 4.8191e-01, 3.5422e-01, ..., -6.0328e-03,\n", - " 8.3791e-02, 2.5398e-01],\n", - " [-8.9580e-04, 3.9457e-01, 1.2237e-01, ..., -6.8435e-03,\n", - " 1.6664e-01, 2.0704e-01],\n", - " ...,\n", - " [-1.1714e-03, 3.5655e-01, 1.8468e-01, ..., -5.2514e-03,\n", - " 1.4916e-01, 1.9265e-01],\n", - " [-1.2019e-03, 8.7460e-01, 4.2611e-01, ..., -3.9647e-04,\n", - " 1.2699e-01, -2.5709e-03],\n", - " [-2.5978e-04, 3.7901e-01, 2.2304e-01, ..., -5.5587e-03,\n", - " -7.6299e-05, 2.0729e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 220, 182, 70, 67, 57, 737, 300, 236, 527, 527, 496, 496,\n", - " 337, 274, 382, 382, 558, 476, 463, 447, 682, 677, 814, 1256,\n", - " 979, 935, 1003, 834, 899, 899, 1000, 977, 1151, 973, 973, 1251,\n", - " 1251, 1069, 1487, 1487, 1333, 1487, 1487, 1487, 1449, 1233, 1595, 1487,\n", - " 1487, 1487, 1419, 1419, 1372, 1604, 1372, 1372, 1372, 1372, 1372, 1880,\n", - " 1877, 1877, 1877, 1763, 1763, 1763, 1734, 1847, 1847, 1847, 1950, 1950,\n", - " 1881, 1881, 1771, 1771, 1771, 1967, 1982, 2200, 2386, 2256, 2386, 2247,\n", - " 2386, 2386, 2427, 2283, 2356, 2695, 2567, 2403, 2704, 2671, 2762, 3015,\n", - " 2682, 2642, 2593, 2593, 2660, 2782, 2920, 2758, 2762, 2899, 2899, 2838,\n", - " 2834, 3131, 2941, 3010, 3010, 3163, 2879, 2879, 3285, 3228, 3260, 3293,\n", - " 3422, 3330, 3351, 3515, 3515, 3515, 3493, 3560, 3617, 3593, 3649, 3408,\n", - " 3408, 3773, 4021, 3861, 3904, 4261, 4256, 4310, 4319, 4415, 4668, 4734,\n", - " 4947, 4554, 4761, 4991, 4994, 5004, 5004, 4832, 5136, 5156, 5156, 5156,\n", - " 5079, 5335, 5370, 5370, 5415, 5415, 5354, 5573, 5801, 5801, 5801, 5522,\n", - " 5887, 5522, 5522, 5522, 6083, 5839, 6119, 5836, 6200, 6380, 6335],\n", - " [ 57, 12, 90, 23, 81, 121, 48, 15, 43, 90, 114, 27,\n", - " 3, 81, 75, 114, 121, 110, 31, 117, 7, 90, 41, 23,\n", - " 86, 99, 77, 66, 13, 2, 69, 111, 65, 35, 49, 96,\n", - " 26, 58, 89, 68, 72, 103, 76, 119, 92, 121, 55, 70,\n", - " 108, 17, 19, 112, 116, 28, 55, 54, 44, 87, 36, 86,\n", - " 33, 41, 4, 118, 109, 82, 24, 120, 74, 98, 21, 98,\n", - " 34, 113, 18, 102, 12, 74, 53, 37, 26, 30, 50, 21,\n", - " 95, 81, 84, 21, 21, 62, 32, 69, 9, 104, 83, 63,\n", - " 46, 8, 41, 85, 101, 10, 52, 24, 64, 1, 76, 76,\n", - " 1, 79, 25, 98, 74, 100, 105, 118, 80, 90, 117, 41,\n", - " 115, 67, 79, 61, 14, 88, 118, 6, 10, 71, 6, 67,\n", - " 72, 107, 81, 5, 21, 75, 38, 21, 93, 73, 16, 69,\n", - " 59, 56, 111, 11, 59, 60, 69, 51, 22, 47, 106, 78,\n", - " 28, 91, 6, 15, 111, 75, 11, 42, 77, 29, 106, 39,\n", - " 69, 94, 5, 97, 75, 22, 0, 45, 79, 20, 40]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2893, 2893, 700, ..., 3424, 2859, 990],\n", - " [ 23, 146, 203, ..., 6299, 6412, 6287]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 121, 57, 47, ..., 106, 47, 104],\n", - " [ 131, 184, 172, ..., 6476, 6367, 6491]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 80, 80, 80, ..., 6374, 6374, 6300],\n", - " [ 125, 391, 221, ..., 279, 69, 271]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 518, 291, 495, ..., 403, 183, 406],\n", - " [ 18, 63, 89, ..., 6431, 6345, 6405]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1895, 466, 1660, ..., 5613, 5063, 1729],\n", - " [ 7, 7, 36, ..., 6489, 6548, 6573]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 101, 74, 74, ..., 6374, 6374, 6374],\n", - " [2032, 2924, 1571, ..., 2399, 4558, 4751]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 57, 57, 57, ..., 6511, 6511, 6511],\n", - " [ 620, 800, 4016, ..., 4512, 4006, 4030]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006849\n", - "sampling 0.00668\n", - "noi time: 0.00208\n", - "get_vertex_data call: 0.032652\n", - "noi group time: 0.003124\n", - "eoi_group_time: 0.016255\n", - "second half: 0.217568\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 31145, 21459, ..., 1117748, 1117754, 1122301],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 31145, 21459, ..., 1117748, 1117754, 1122301],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1209341, 1203800, 1227422, ..., 1927250, 1925027, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1209341, 1203800, 1227422, ..., 1927250, 1925027, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1135057, 1137204, 1141424, 1136237, 1140284, 1135926, 1135152, 1141756,\n", - " 1141757, 1141758, 1137506, 1137519, 1138335, 1141251, 1142807, 1136971,\n", - " 1141448, 1138059, 1139813, 1145370, 1137947, 1145992, 1138938, 1138936,\n", - " 1143372, 1139246, 1146640, 1139605, 1139615, 1140781, 1150503, 1142968,\n", - " 1139866, 1148582, 1149216, 1155689, 1143820, 1149644, 1147473, 1147483,\n", - " 1135992, 1149283, 1142881, 1144636, 1144632, 1146995, 1153008, 1148345,\n", - " 1148350, 1148346, 1150193, 1135482, 1146472, 1136125, 1148546, 1147095,\n", - " 1137220, 1150555, 1155018, 1139371, 1136683, 1136685, 1150329, 1152427,\n", - " 1134718, 1134807, 1140540, 1154407, 1137254, 1137181, 1138356, 1153467,\n", - " 1140158, 1135910, 1140029, 1162454, 1135360, 1135367, 1135202, 1137798,\n", - " 1141036, 1136768, 1134794, 1134797, 1137329, 1143068, 1137693, 1144395,\n", - " 1137534, 1157397, 1152376, 1137441, 1156159, 1148481, 1139161, 1135579,\n", - " 1135583, 1136108, 1135664, 1156342, 1138514, 1138524, 1138584, 1158136,\n", - " 1154132, 1145132, 1135522, 1139684, 1139685, 1138305, 1157706, 1138436,\n", - " 1138440, 1138445, 1138461, 1138449, 1136594, 1158390, 1149328, 1135088,\n", - " 1135095, 1138697, 1156603, 1147119, 1135359, 1156137, 1138185, 1145843,\n", - " 1139841, 1139849, 1139844, 1136449, 1139667, 1139673, 1134992, 1142445,\n", - " 1136734, 1158961, 1139315, 1141058, 1144410, 1153543, 1153544, 1140034,\n", - " 1139087, 1139933, 1155660, 1146072, 1152042, 1152044, 1139069, 1142293,\n", - " 1140657, 1140670, 1137734, 1137741, 1137728, 1137743, 1134922, 1134742,\n", - " 1134750, 1135549, 1141088, 1141100, 1144143, 1139889, 1141980, 1141975,\n", - " 1139119, 1136392, 1143221, 1143227, 1139033, 1140007, 1140009, 1149979,\n", - " 1142499, 1141688, 1141695, 1136427, 1142932, 1142929, 1141224, 1136917,\n", - " 1143677, 1137185, 1145066, 1144237, 1141159, 1141785, 1141786, 1144934,\n", - " 1141609, 1141300, 1144641, 1147850, 1138495, 1141810, 1141821, 1158749,\n", - " 1148866, 1148871, 1140100, 1140110, 1138423, 1143107, 1144596, 1136867,\n", - " 1136864, 1141572, 1140885, 1141403, 1144182, 1144184, 1137614, 1146201,\n", - " 1134829, 1158703, 1158692, 1161710, 1147153, 1141365, 1153059, 1153068,\n", - " 1140815, 1141720, 1141672, 1141664, 1149088, 1144279, 1143907, 1139506,\n", - " 1139510, 1145001, 1143791, 1147888, 1140990, 1146695, 1141561, 1145873,\n", - " 1155829, 1149878, 1152976, 1135457, 1139453, 1141925, 1146901, 1144242,\n", - " 1145340, 1141841, 1137149, 1141382, 1145983, 1145974, 1143845, 1136275,\n", - " 1146024, 1150605, 1154328, 1141646, 1141585, 1149928, 1139990, 1146302,\n", - " 1143293, 1143294, 1147543, 1147549, 1147540, 1148763, 1147282, 1136330,\n", - " 1143663, 1142628, 1142637, 1148003, 1149608, 1143040, 1148406, 1136160,\n", - " 1136167, 1157720, 1136836, 1139329, 1139328, 1138229, 1142149, 1143345,\n", - " 1144619, 1144095, 1150296, 1146513, 1146523, 1143456, 1143457, 1144291,\n", - " 1144566, 1140483, 1143937, 1135454, 1147521, 1140364, 1149569, 1137990,\n", - " 1168921, 1148962, 1148966, 1147999, 1148704, 1141836, 1146751, 1149725,\n", - " 1147024, 1147971, 1141131, 1145012, 1139549, 1158228, 1147876, 1154526,\n", - " 1145240, 1145750, 1145751, 1146154, 1146159, 1146178, 1152530, 1150280,\n", - " 1150445, 1149791, 1144526, 1141349, 1150350, 1152013, 1151994, 1151480,\n", - " 1154271, 1135504, 1139919, 1149590, 1140560, 1150127, 1141949, 1141266,\n", - " 1144825, 1147653, 1143552, 1168504, 1149412, 1148288, 1148300, 1151421,\n", - " 1154420, 1152563, 1136246, 1138204, 1146682, 1157981, 1157983, 1148720,\n", - " 1148734, 1148729, 1146549, 1149810, 1139936, 1166305, 1143983, 1148204,\n", - " 1171943, 1154203, 1141743, 1153188, 1145111, 1150935, 1150352, 1148095,\n", - " 1141015, 1151810, 1151816, 1151906, 1154183, 1148498, 1149732, 1141420,\n", - " 1141423, 1150630, 1151356, 1151345, 1147728, 1147737, 1145086, 1155066,\n", - " 1148949, 1146967, 1156413, 1153255, 1146623, 1146485, 1152409, 1156321,\n", - " 1153032, 1153026, 1153038, 1137746, 1146304, 1152622, 1152623, 1140521,\n", - " 1149203, 1152819, 1155337, 1154122, 1154123, 1152673, 1152680, 1154633,\n", - " 1154638, 1139582, 1151617, 1150578, 1150586, 1136132, 1136798, 1148916,\n", - " 1144537, 1140935, 1151311, 1143995, 1152341, 1152344, 1156816, 1153311,\n", - " 1145568, 1138272, 1138279, 1138281, 1152300, 1136028, 1136031, 1158704,\n", - " 1156608, 1152928, 1150150, 1150164, 1144016, 1148033, 1148040, 1148034,\n", - " 1149300, 1152601, 1137048, 1137042, 1148628, 1148637, 1158530, 1137458,\n", - " 1159217, 1155376, 1142041, 1135434, 1148880, 1156500, 1156505, 1157064,\n", - " 1145187, 1145184, 1137814, 1151260, 1135730, 1156638, 1153410, 1135634,\n", - " 1143008, 1143022, 1151466, 1139525, 1139529, 1158304, 1158308, 1158311,\n", - " 1155441, 1137978, 1153353, 1153359, 1150136, 1140866, 1154530, 1145771,\n", - " 1156207, 1156256, 1157637, 1151379, 1155122, 1152527, 1157174, 1135398,\n", - " 1146920, 1156452, 1156463, 1158096, 1154763, 1155679, 1155626, 1155628,\n", - " 1156563, 1156565, 1161429, 1158566, 1158824, 1148835, 1155646, 1153363,\n", - " 1143257, 1146928, 1156711, 1151327, 1154909, 1150371, 1157437, 1157439,\n", - " 1150805, 1141620, 1143517, 1157282, 1137152, 1158578, 1159003, 1137381,\n", - " 1137380, 1140913, 1135601, 1145508, 1145507, 1150661, 1159585, 1157684,\n", - " 1146325, 1152209, 1152502, 1140370, 1156027, 1155884, 1144843, 1155971,\n", - " 1155975, 1161667, 1149702, 1154600, 1158764, 1171183, 1158882, 1159164,\n", - " 1158815, 1156779, 1151615, 1136494, 1153808, 1156278, 1136640, 1134757,\n", - " 1140049, 1158558, 1151144, 1156516, 1146126, 1155868, 1158006, 1161539,\n", - " 1161962, 1142658, 1157747, 1157753, 1157759, 1159284, 1161645, 1159052,\n", - " 1158301, 1157945, 1153052, 1153045, 1153841, 1153842, 1156107, 1138393,\n", - " 1165244, 1150046, 1145945, 1155479, 1153514, 1153519, 1171987, 1138161,\n", - " 1164006, 1156787, 1149956, 1149963, 1139286, 1148021, 1148025, 1166073,\n", - " 1171519, 1146356, 1158461, 1164055, 1140135, 1140641, 1140650, 1140643,\n", - " 1141864, 1151875, 1158643, 1158653, 1156181, 1156184, 1159032, 1166286,\n", - " 1168107, 1152247, 1168022, 1155588, 1162550, 1153934, 1168426, 1144977,\n", - " 1147830, 1146510, 1146509, 1161239, 1161243, 1144739, 1144747, 1168070,\n", - " 1141465, 1141471, 1147427, 1157047, 1157052, 1156739, 1153663, 1171040,\n", - " 1144812, 1135567, 1165721, 1165716, 1164741, 1142722, 1142733, 1145738,\n", - " 1148683, 1155324, 1170670, 1144973, 1143025, 1147694, 1147355, 1152624,\n", - " 1152626, 1139351, 1139345, 1147723, 1145900, 1145902, 1153520, 1153534,\n", - " 1168659, 1152203, 1175240, 1187284, 1143393, 1158724, 1154076, 1170740,\n", - " 1147338, 1160030, 1145664, 1192303, 1162883, 1167817, 1155172, 1155170,\n", - " 1150518, 1154618, 1144346, 1144336, 1157534, 1157528, 1147750, 1147745,\n", - " 1154670, 1171418, 1154893, 1169162, 1157331, 1141043, 1151664, 1169359,\n", - " 1154364, 1138609, 1158611, 1158623, 1158062, 1173047, 1149846, 1149855,\n", - " 1149847, 1165326, 1147416, 1155502, 1152353, 1143170, 1143172, 1152546,\n", - " 1168400, 1173307, 1161136, 1154021, 1154027, 1152150, 1180341, 1172790,\n", - " 1151696, 1157153, 1164689, 1147711, 1151850, 1148128, 1148131, 1157593,\n", - " 1149247, 1166827, 1155738, 1155739, 1183439, 1183427, 1140326, 1179201,\n", - " 1179204, 1180472, 1172606, 1163991, 1178205, 1171823, 1150234, 1154151,\n", - " 1154148, 1149169, 1149173, 1178610, 1186117, 1143279, 1143420, 1171302,\n", - " 1170176, 1170179, 1170965, 1159404, 1153803, 1181499, 1180817, 1179727,\n", - " 1182649, 1179807, 1161255, 1155262, 1177574, 1157792, 1157795, 1171623,\n", - " 1163825, 1155804, 1157126, 1177315, 1178936, 1158249, 1153898, 1153899,\n", - " 1177866, 1164560, 1145626, 1156443, 1156446, 1157483, 1149753, 1149755,\n", - " 1146242, 1155992, 1155990, 1182690, 1158512, 1181952, 1158934, 1158940,\n", - " 1167637, 1158380, 1155890, 1155892, 1182901, 1180942, 1168532, 1189872,\n", - " 1188631, 1154944, 1146169, 1170341, 1147179, 1193865, 1168943, 1139828,\n", - " 1139825, 1139831, 1139837, 1150265, 1154812, 1164677, 1186928, 1156055,\n", - " 1151972, 1151978, 1146394, 1146395, 1173058, 1176209, 1149544, 1192363,\n", - " 1189318, 1177062, 1181936, 1181951, 1189545, 1182550, 1193895, 1185714,\n", - " 1151774, 1153729, 1153733, 1188059, 1152113, 1152115, 1177621, 1180965,\n", - " 1171200, 1177461, 1181854, 1156672, 1185637, 1155962, 1193396, 1191790,\n", - " 1189678, 1187337, 1193815, 1189803, 1157020, 1157022, 1161940],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1135057, 1137204, 1141424, 1136237, 1140284, 1135926, 1135152, 1141756,\n", - " 1141757, 1141758, 1137506, 1137519, 1138335, 1141251, 1142807, 1136971,\n", - " 1141448, 1138059, 1139813, 1145370, 1137947, 1145992, 1138938, 1138936,\n", - " 1143372, 1139246, 1146640, 1139605, 1139615, 1140781, 1150503, 1142968,\n", - " 1139866, 1148582, 1149216, 1155689, 1143820, 1149644, 1147473, 1147483,\n", - " 1135992, 1149283, 1142881, 1144636, 1144632, 1146995, 1153008, 1148345,\n", - " 1148350, 1148346, 1150193, 1135482, 1146472, 1136125, 1148546, 1147095,\n", - " 1137220, 1150555, 1155018, 1139371, 1136683, 1136685, 1150329, 1152427,\n", - " 1134718, 1134807, 1140540, 1154407, 1137254, 1137181, 1138356, 1153467,\n", - " 1140158, 1135910, 1140029, 1162454, 1135360, 1135367, 1135202, 1137798,\n", - " 1141036, 1136768, 1134794, 1134797, 1137329, 1143068, 1137693, 1144395,\n", - " 1137534, 1157397, 1152376, 1137441, 1156159, 1148481, 1139161, 1135579,\n", - " 1135583, 1136108, 1135664, 1156342, 1138514, 1138524, 1138584, 1158136,\n", - " 1154132, 1145132, 1135522, 1139684, 1139685, 1138305, 1157706, 1138436,\n", - " 1138440, 1138445, 1138461, 1138449, 1136594, 1158390, 1149328, 1135088,\n", - " 1135095, 1138697, 1156603, 1147119, 1135359, 1156137, 1138185, 1145843,\n", - " 1139841, 1139849, 1139844, 1136449, 1139667, 1139673, 1134992, 1142445,\n", - " 1136734, 1158961, 1139315, 1141058, 1144410, 1153543, 1153544, 1140034,\n", - " 1139087, 1139933, 1155660, 1146072, 1152042, 1152044, 1139069, 1142293,\n", - " 1140657, 1140670, 1137734, 1137741, 1137728, 1137743, 1134922, 1134742,\n", - " 1134750, 1135549, 1141088, 1141100, 1144143, 1139889, 1141980, 1141975,\n", - " 1139119, 1136392, 1143221, 1143227, 1139033, 1140007, 1140009, 1149979,\n", - " 1142499, 1141688, 1141695, 1136427, 1142932, 1142929, 1141224, 1136917,\n", - " 1143677, 1137185, 1145066, 1144237, 1141159, 1141785, 1141786, 1144934,\n", - " 1141609, 1141300, 1144641, 1147850, 1138495, 1141810, 1141821, 1158749,\n", - " 1148866, 1148871, 1140100, 1140110, 1138423, 1143107, 1144596, 1136867,\n", - " 1136864, 1141572, 1140885, 1141403, 1144182, 1144184, 1137614, 1146201,\n", - " 1134829, 1158703, 1158692, 1161710, 1147153, 1141365, 1153059, 1153068,\n", - " 1140815, 1141720, 1141672, 1141664, 1149088, 1144279, 1143907, 1139506,\n", - " 1139510, 1145001, 1143791, 1147888, 1140990, 1146695, 1141561, 1145873,\n", - " 1155829, 1149878, 1152976, 1135457, 1139453, 1141925, 1146901, 1144242,\n", - " 1145340, 1141841, 1137149, 1141382, 1145983, 1145974, 1143845, 1136275,\n", - " 1146024, 1150605, 1154328, 1141646, 1141585, 1149928, 1139990, 1146302,\n", - " 1143293, 1143294, 1147543, 1147549, 1147540, 1148763, 1147282, 1136330,\n", - " 1143663, 1142628, 1142637, 1148003, 1149608, 1143040, 1148406, 1136160,\n", - " 1136167, 1157720, 1136836, 1139329, 1139328, 1138229, 1142149, 1143345,\n", - " 1144619, 1144095, 1150296, 1146513, 1146523, 1143456, 1143457, 1144291,\n", - " 1144566, 1140483, 1143937, 1135454, 1147521, 1140364, 1149569, 1137990,\n", - " 1168921, 1148962, 1148966, 1147999, 1148704, 1141836, 1146751, 1149725,\n", - " 1147024, 1147971, 1141131, 1145012, 1139549, 1158228, 1147876, 1154526,\n", - " 1145240, 1145750, 1145751, 1146154, 1146159, 1146178, 1152530, 1150280,\n", - " 1150445, 1149791, 1144526, 1141349, 1150350, 1152013, 1151994, 1151480,\n", - " 1154271, 1135504, 1139919, 1149590, 1140560, 1150127, 1141949, 1141266,\n", - " 1144825, 1147653, 1143552, 1168504, 1149412, 1148288, 1148300, 1151421,\n", - " 1154420, 1152563, 1136246, 1138204, 1146682, 1157981, 1157983, 1148720,\n", - " 1148734, 1148729, 1146549, 1149810, 1139936, 1166305, 1143983, 1148204,\n", - " 1171943, 1154203, 1141743, 1153188, 1145111, 1150935, 1150352, 1148095,\n", - " 1141015, 1151810, 1151816, 1151906, 1154183, 1148498, 1149732, 1141420,\n", - " 1141423, 1150630, 1151356, 1151345, 1147728, 1147737, 1145086, 1155066,\n", - " 1148949, 1146967, 1156413, 1153255, 1146623, 1146485, 1152409, 1156321,\n", - " 1153032, 1153026, 1153038, 1137746, 1146304, 1152622, 1152623, 1140521,\n", - " 1149203, 1152819, 1155337, 1154122, 1154123, 1152673, 1152680, 1154633,\n", - " 1154638, 1139582, 1151617, 1150578, 1150586, 1136132, 1136798, 1148916,\n", - " 1144537, 1140935, 1151311, 1143995, 1152341, 1152344, 1156816, 1153311,\n", - " 1145568, 1138272, 1138279, 1138281, 1152300, 1136028, 1136031, 1158704,\n", - " 1156608, 1152928, 1150150, 1150164, 1144016, 1148033, 1148040, 1148034,\n", - " 1149300, 1152601, 1137048, 1137042, 1148628, 1148637, 1158530, 1137458,\n", - " 1159217, 1155376, 1142041, 1135434, 1148880, 1156500, 1156505, 1157064,\n", - " 1145187, 1145184, 1137814, 1151260, 1135730, 1156638, 1153410, 1135634,\n", - " 1143008, 1143022, 1151466, 1139525, 1139529, 1158304, 1158308, 1158311,\n", - " 1155441, 1137978, 1153353, 1153359, 1150136, 1140866, 1154530, 1145771,\n", - " 1156207, 1156256, 1157637, 1151379, 1155122, 1152527, 1157174, 1135398,\n", - " 1146920, 1156452, 1156463, 1158096, 1154763, 1155679, 1155626, 1155628,\n", - " 1156563, 1156565, 1161429, 1158566, 1158824, 1148835, 1155646, 1153363,\n", - " 1143257, 1146928, 1156711, 1151327, 1154909, 1150371, 1157437, 1157439,\n", - " 1150805, 1141620, 1143517, 1157282, 1137152, 1158578, 1159003, 1137381,\n", - " 1137380, 1140913, 1135601, 1145508, 1145507, 1150661, 1159585, 1157684,\n", - " 1146325, 1152209, 1152502, 1140370, 1156027, 1155884, 1144843, 1155971,\n", - " 1155975, 1161667, 1149702, 1154600, 1158764, 1171183, 1158882, 1159164,\n", - " 1158815, 1156779, 1151615, 1136494, 1153808, 1156278, 1136640, 1134757,\n", - " 1140049, 1158558, 1151144, 1156516, 1146126, 1155868, 1158006, 1161539,\n", - " 1161962, 1142658, 1157747, 1157753, 1157759, 1159284, 1161645, 1159052,\n", - " 1158301, 1157945, 1153052, 1153045, 1153841, 1153842, 1156107, 1138393,\n", - " 1165244, 1150046, 1145945, 1155479, 1153514, 1153519, 1171987, 1138161,\n", - " 1164006, 1156787, 1149956, 1149963, 1139286, 1148021, 1148025, 1166073,\n", - " 1171519, 1146356, 1158461, 1164055, 1140135, 1140641, 1140650, 1140643,\n", - " 1141864, 1151875, 1158643, 1158653, 1156181, 1156184, 1159032, 1166286,\n", - " 1168107, 1152247, 1168022, 1155588, 1162550, 1153934, 1168426, 1144977,\n", - " 1147830, 1146510, 1146509, 1161239, 1161243, 1144739, 1144747, 1168070,\n", - " 1141465, 1141471, 1147427, 1157047, 1157052, 1156739, 1153663, 1171040,\n", - " 1144812, 1135567, 1165721, 1165716, 1164741, 1142722, 1142733, 1145738,\n", - " 1148683, 1155324, 1170670, 1144973, 1143025, 1147694, 1147355, 1152624,\n", - " 1152626, 1139351, 1139345, 1147723, 1145900, 1145902, 1153520, 1153534,\n", - " 1168659, 1152203, 1175240, 1187284, 1143393, 1158724, 1154076, 1170740,\n", - " 1147338, 1160030, 1145664, 1192303, 1162883, 1167817, 1155172, 1155170,\n", - " 1150518, 1154618, 1144346, 1144336, 1157534, 1157528, 1147750, 1147745,\n", - " 1154670, 1171418, 1154893, 1169162, 1157331, 1141043, 1151664, 1169359,\n", - " 1154364, 1138609, 1158611, 1158623, 1158062, 1173047, 1149846, 1149855,\n", - " 1149847, 1165326, 1147416, 1155502, 1152353, 1143170, 1143172, 1152546,\n", - " 1168400, 1173307, 1161136, 1154021, 1154027, 1152150, 1180341, 1172790,\n", - " 1151696, 1157153, 1164689, 1147711, 1151850, 1148128, 1148131, 1157593,\n", - " 1149247, 1166827, 1155738, 1155739, 1183439, 1183427, 1140326, 1179201,\n", - " 1179204, 1180472, 1172606, 1163991, 1178205, 1171823, 1150234, 1154151,\n", - " 1154148, 1149169, 1149173, 1178610, 1186117, 1143279, 1143420, 1171302,\n", - " 1170176, 1170179, 1170965, 1159404, 1153803, 1181499, 1180817, 1179727,\n", - " 1182649, 1179807, 1161255, 1155262, 1177574, 1157792, 1157795, 1171623,\n", - " 1163825, 1155804, 1157126, 1177315, 1178936, 1158249, 1153898, 1153899,\n", - " 1177866, 1164560, 1145626, 1156443, 1156446, 1157483, 1149753, 1149755,\n", - " 1146242, 1155992, 1155990, 1182690, 1158512, 1181952, 1158934, 1158940,\n", - " 1167637, 1158380, 1155890, 1155892, 1182901, 1180942, 1168532, 1189872,\n", - " 1188631, 1154944, 1146169, 1170341, 1147179, 1193865, 1168943, 1139828,\n", - " 1139825, 1139831, 1139837, 1150265, 1154812, 1164677, 1186928, 1156055,\n", - " 1151972, 1151978, 1146394, 1146395, 1173058, 1176209, 1149544, 1192363,\n", - " 1189318, 1177062, 1181936, 1181951, 1189545, 1182550, 1193895, 1185714,\n", - " 1151774, 1153729, 1153733, 1188059, 1152113, 1152115, 1177621, 1180965,\n", - " 1171200, 1177461, 1181854, 1156672, 1185637, 1155962, 1193396, 1191790,\n", - " 1189678, 1187337, 1193815, 1189803, 1157020, 1157022, 1161940],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196011, 1196013, 1195397, 1200108, 1198730, 1199282, 1198449, 1198459,\n", - " 1202255, 1201577, 1201582, 1199141, 1199278, 1194626, 1199248, 1201016,\n", - " 1202804, 1196672, 1198180, 1196624, 1196631, 1194655, 1195514, 1195263,\n", - " 1201992, 1198542, 1198543, 1194952, 1197760, 1195888, 1195895, 1199172,\n", - " 1196334, 1196977, 1196699, 1195313, 1196835, 1196840, 1195988, 1195982,\n", - " 1196705, 1199823, 1195223, 1195265, 1197140, 1196247, 1198219, 1195847,\n", - " 1198915, 1195659, 1195541, 1198207, 1197478, 1196122, 1197186, 1195918,\n", - " 1199711, 1196283, 1195353, 1200959, 1197127, 1199060, 1199059, 1194928,\n", - " 1195119, 1199685, 1199628, 1202381, 1197676, 1197990, 1201388, 1200872,\n", - " 1200404, 1198400, 1199579, 1200747, 1195017, 1194786, 1195807, 1202819,\n", - " 1196727, 1195773, 1202618, 1198428, 1198811, 1201547, 1201824, 1201827,\n", - " 1202417, 1200452, 1198066, 1199445, 1201421, 1201156, 1202630, 1201056,\n", - " 1200918, 1194805, 1199712, 1199721, 1201040, 1200526, 1200345, 1200090,\n", - " 1202062, 1199886, 1202128, 1202138, 1196779, 1202239, 1199474, 1199976,\n", - " 1201291, 1195611, 1203329, 1202217, 1202696, 1200792, 1199606, 1195048,\n", - " 1202545, 1195664, 1200445, 1198929, 1195181, 1198118, 1201484, 1198299,\n", - " 1203102, 1201138, 1194732, 1198824, 1199392, 1199782, 1198819, 1195066,\n", - " 1201886, 1197652, 1197655, 1197035], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196011, 1196013, 1195397, 1200108, 1198730, 1199282, 1198449, 1198459,\n", - " 1202255, 1201577, 1201582, 1199141, 1199278, 1194626, 1199248, 1201016,\n", - " 1202804, 1196672, 1198180, 1196624, 1196631, 1194655, 1195514, 1195263,\n", - " 1201992, 1198542, 1198543, 1194952, 1197760, 1195888, 1195895, 1199172,\n", - " 1196334, 1196977, 1196699, 1195313, 1196835, 1196840, 1195988, 1195982,\n", - " 1196705, 1199823, 1195223, 1195265, 1197140, 1196247, 1198219, 1195847,\n", - " 1198915, 1195659, 1195541, 1198207, 1197478, 1196122, 1197186, 1195918,\n", - " 1199711, 1196283, 1195353, 1200959, 1197127, 1199060, 1199059, 1194928,\n", - " 1195119, 1199685, 1199628, 1202381, 1197676, 1197990, 1201388, 1200872,\n", - " 1200404, 1198400, 1199579, 1200747, 1195017, 1194786, 1195807, 1202819,\n", - " 1196727, 1195773, 1202618, 1198428, 1198811, 1201547, 1201824, 1201827,\n", - " 1202417, 1200452, 1198066, 1199445, 1201421, 1201156, 1202630, 1201056,\n", - " 1200918, 1194805, 1199712, 1199721, 1201040, 1200526, 1200345, 1200090,\n", - " 1202062, 1199886, 1202128, 1202138, 1196779, 1202239, 1199474, 1199976,\n", - " 1201291, 1195611, 1203329, 1202217, 1202696, 1200792, 1199606, 1195048,\n", - " 1202545, 1195664, 1200445, 1198929, 1195181, 1198118, 1201484, 1198299,\n", - " 1203102, 1201138, 1194732, 1198824, 1199392, 1199782, 1198819, 1195066,\n", - " 1201886, 1197652, 1197655, 1197035], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 1.6322e-01, 1.3116e-02, 7.5103e-01, ..., 1.2081e-01,\n", - " -1.7188e-03, -5.0557e-03],\n", - " [ 1.6322e-01, 1.3116e-02, 7.5103e-01, ..., 1.2081e-01,\n", - " -1.7188e-03, -5.0557e-03],\n", - " [ 9.0387e-02, 6.0783e-02, 5.4548e-01, ..., 1.3981e-01,\n", - " -1.6991e-03, -3.7059e-03],\n", - " ...,\n", - " [ 1.7042e-01, 1.9206e-02, 7.6884e-01, ..., 1.2316e-01,\n", - " -1.8582e-03, -5.1058e-03],\n", - " [ 2.0022e-01, -1.8263e-04, 7.8683e-01, ..., 1.1692e-01,\n", - " -1.6770e-03, -5.4301e-03],\n", - " [ 7.8141e-02, 2.8055e-02, 6.7176e-01, ..., 1.6864e-01,\n", - " -2.2521e-03, -4.3816e-03]], device='cuda:0'), 'paper': tensor([[ 6.6141e-01, -6.0806e-03, 1.2057e+00, ..., -6.2078e-03,\n", - " -1.2746e-02, -7.5322e-04],\n", - " [ 1.9560e+00, -1.1604e-02, 2.3381e+00, ..., -5.2426e-04,\n", - " -3.4690e-02, 2.4181e+00],\n", - " [ 3.1053e-01, -1.6660e-02, 3.0570e+00, ..., -1.5827e-02,\n", - " -2.2881e-02, -1.2128e-02],\n", - " ...,\n", - " [ 1.8230e-01, -4.2131e-03, 2.7152e+00, ..., -7.6449e-03,\n", - " -1.4983e-02, -1.3237e-02],\n", - " [ 6.9517e-01, -2.3845e-03, 9.1509e-01, ..., -4.8645e-03,\n", - " -8.3882e-03, -1.8310e-03],\n", - " [ 1.9596e+00, -1.2274e-02, 2.1155e+00, ..., 7.1003e-02,\n", - " -3.5824e-02, 2.5690e+00]], device='cuda:0'), 'author': tensor([[-1.8160e-03, 9.2293e-02, 2.9874e-01, ..., 1.4694e+00,\n", - " -1.2906e-03, 1.1710e-01],\n", - " [-1.5963e-03, 1.7751e-01, 2.8998e-01, ..., 1.4928e+00,\n", - " -7.7343e-04, 6.1004e-03],\n", - " [-2.4725e-03, 1.8838e-01, 3.6822e-01, ..., 1.3499e+00,\n", - " -3.4810e-03, -9.7830e-04],\n", - " ...,\n", - " [-1.6069e-03, 1.5854e-01, 2.1554e-01, ..., 1.4441e+00,\n", - " -1.7021e-03, 6.3332e-02],\n", - " [-2.4039e-03, 1.5882e-01, 2.8402e-01, ..., 1.2126e+00,\n", - " -3.1429e-03, -1.1728e-03],\n", - " [-1.2007e-03, 1.4710e-01, 2.1573e-01, ..., 1.4005e+00,\n", - " -1.2328e-03, 1.0816e-01]], device='cuda:0'), 'field_of_study': tensor([[-9.0864e-04, 4.5542e-01, 1.4368e-01, ..., -8.0859e-03,\n", - " 2.6135e-01, 1.8432e-01],\n", - " [-9.9614e-04, 4.0954e-01, 1.8898e-01, ..., -7.3003e-03,\n", - " 1.3866e-01, 2.3375e-01],\n", - " [-5.2713e-04, 4.3046e-01, 1.8296e-01, ..., -5.8761e-03,\n", - " 1.9648e-01, 1.3172e-01],\n", - " ...,\n", - " [-1.1011e-03, 3.5928e-01, 1.2654e-01, ..., -7.2324e-03,\n", - " 1.8451e-01, 1.2453e-01],\n", - " [-4.0161e-05, 5.0290e-01, 2.4717e-01, ..., -7.5357e-03,\n", - " 3.4566e-01, 2.7466e-02],\n", - " [ 1.1834e-01, 8.5812e-01, 5.8006e-01, ..., -8.7499e-03,\n", - " 3.3359e-01, 5.9599e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 62, 239, 168, 49, 24, 291, 679, 246, 263, 263, 453, 453,\n", - " 648, 648, 568, 759, 825, 744, 835, 609, 718, 970, 919, 1111,\n", - " 1311, 1081, 1031, 1044, 1044, 1031, 1056, 1056, 1081, 1336, 1378, 1399,\n", - " 1278, 1492, 1492, 1492, 1492, 1425, 1524, 1595, 1595, 1577, 1601, 1748,\n", - " 1339, 1432, 1644, 1973, 1745, 1691, 1691, 1904, 1993, 1993, 2031, 1944,\n", - " 1944, 2040, 2040, 1926, 2214, 1960, 2120, 2089, 2089, 2089, 2089, 2089,\n", - " 2120, 2120, 2120, 2120, 2029, 2201, 2201, 2066, 2107, 2145, 2336, 2336,\n", - " 2366, 2461, 2310, 2310, 2472, 2643, 2396, 2389, 2589, 2589, 2667, 2617,\n", - " 2617, 2617, 3164, 2979, 3099, 3016, 3079, 2830, 3046, 3046, 3112, 3112,\n", - " 3112, 3112, 3112, 3419, 3357, 3267, 3512, 3399, 3799, 3626, 3626, 3889,\n", - " 3889, 3861, 3861, 4170, 3954, 3892, 3892, 3892, 4028, 3873, 3991, 4232,\n", - " 3903, 3903, 3903, 4227, 4270, 4296, 4296, 4304, 4506, 4506, 4514, 4585,\n", - " 4597, 4757, 4586, 4769, 5015, 5015, 4968, 5105, 4979, 5227, 5244, 5244,\n", - " 5011, 5150, 5284, 5191, 5363, 5212, 5351, 5504, 5424, 5427, 5502, 5502,\n", - " 5396, 5643, 5601, 5555, 5587, 5656, 5638, 5837, 6062, 5694, 5631, 5974,\n", - " 5974, 6076, 5838, 6117, 6122, 5923, 5923, 5923, 5923, 6028, 6145, 6113,\n", - " 6333, 6374, 6374, 6195, 6303, 6423, 6411, 6570],\n", - " [ 66, 50, 96, 49, 56, 80, 45, 77, 115, 132, 3, 18,\n", - " 109, 43, 80, 87, 5, 46, 82, 82, 34, 24, 57, 137,\n", - " 77, 128, 86, 123, 59, 122, 93, 120, 19, 96, 26, 51,\n", - " 40, 64, 5, 101, 24, 30, 41, 5, 99, 53, 94, 53,\n", - " 80, 125, 50, 85, 139, 65, 47, 103, 79, 83, 80, 57,\n", - " 108, 106, 107, 88, 23, 116, 12, 81, 91, 83, 117, 114,\n", - " 121, 46, 35, 63, 129, 54, 139, 78, 11, 68, 109, 70,\n", - " 6, 85, 73, 130, 7, 127, 9, 40, 68, 38, 0, 20,\n", - " 90, 125, 10, 92, 22, 119, 136, 13, 105, 138, 98, 136,\n", - " 39, 14, 29, 21, 113, 134, 23, 85, 67, 100, 43, 23,\n", - " 126, 80, 134, 92, 95, 131, 17, 20, 60, 28, 33, 71,\n", - " 27, 5, 92, 110, 92, 126, 23, 50, 102, 104, 36, 55,\n", - " 72, 112, 58, 134, 48, 80, 1, 85, 80, 124, 80, 19,\n", - " 80, 32, 97, 4, 2, 23, 23, 69, 2, 2, 74, 84,\n", - " 89, 25, 51, 57, 75, 111, 135, 8, 61, 8, 80, 32,\n", - " 80, 10, 133, 118, 80, 15, 42, 80, 52, 76, 43, 81,\n", - " 80, 97, 25, 44, 31, 62, 16, 37]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2086, 1008, 642, ..., 6489, 2556, 6435],\n", - " [ 88, 90, 124, ..., 6653, 6633, 6566]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 123, 4, 109, ..., 92, 92, 2],\n", - " [ 231, 145, 134, ..., 6540, 6551, 6371]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 93, 93, 93, ..., 6611, 6611, 6634],\n", - " [ 271, 262, 307, ..., 82, 809, 799]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 293, 308, 3, ..., 308, 723, 482],\n", - " [ 211, 87, 6, ..., 6504, 6573, 6501]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1975, 1943, 6286, ..., 6103, 5504, 5695],\n", - " [ 197, 197, 66, ..., 6555, 6603, 6538]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 71, 71, 71, ..., 6611, 6584, 6584],\n", - " [2309, 1505, 131, ..., 6150, 2942, 4573]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 197, 197, 197, ..., 6570, 6570, 6570],\n", - " [5169, 6435, 1943, ..., 6541, 6610, 6550]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.004812\n", - "sampling 0.004659\n", - "noi time: 0.000686\n", - "get_vertex_data call: 0.025177\n", - "noi group time: 0.003777\n", - "eoi_group_time: 0.016074\n", - "second half: 0.209576\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 40271, 24176, ..., 1121122, 1124620, 1133072],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 40271, 24176, ..., 1121122, 1124620, 1133072],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210824, 1210548, 1210550, ..., 1921008, 1930682, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210824, 1210548, 1210550, ..., 1921008, 1930682, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1141424, 1136237, 1136239, 1140284, 1140285, 1136337, 1137791,\n", - " 1141756, 1141758, 1137506, 1136219, 1136969, 1136971, 1138909, 1149835,\n", - " 1139811, 1145370, 1143362, 1139605, 1139615, 1148987, 1145281, 1134943,\n", - " 1149216, 1155689, 1143820, 1147473, 1147483, 1147221, 1135992, 1144636,\n", - " 1144632, 1146995, 1135950, 1136122, 1152670, 1138349, 1153231, 1147094,\n", - " 1137220, 1155018, 1155019, 1139373, 1139371, 1150329, 1152427, 1136270,\n", - " 1140537, 1140540, 1138112, 1149457, 1140954, 1135367, 1135375, 1135202,\n", - " 1141036, 1134794, 1138504, 1137329, 1157103, 1137693, 1144395, 1137529,\n", - " 1157397, 1137441, 1156159, 1148481, 1139161, 1135583, 1141078, 1136097,\n", - " 1135827, 1140970, 1140712, 1138514, 1153099, 1137957, 1158132, 1154132,\n", - " 1136978, 1156899, 1156908, 1135522, 1135535, 1138440, 1138461, 1138462,\n", - " 1137491, 1136594, 1135122, 1149328, 1149340, 1135088, 1135098, 1138880,\n", - " 1147112, 1142611, 1142615, 1135623, 1148531, 1135769, 1139844, 1139667,\n", - " 1138069, 1142249, 1140270, 1134992, 1142445, 1139757, 1136730, 1136734,\n", - " 1139321, 1159009, 1153543, 1153547, 1140034, 1139929, 1141964, 1141966,\n", - " 1155660, 1155654, 1141985, 1141993, 1152044, 1139064, 1134742, 1134750,\n", - " 1135540, 1135546, 1136697, 1141088, 1145346, 1143767, 1154851, 1137299,\n", - " 1139025, 1139033, 1149969, 1142347, 1154467, 1140467, 1141224, 1139386,\n", - " 1136917, 1141161, 1139495, 1147850, 1164807, 1137087, 1139800, 1144426,\n", - " 1138488, 1142053, 1141810, 1153666, 1140163, 1158749, 1137766, 1149111,\n", - " 1139190, 1141479, 1138708, 1142924, 1137661, 1137662, 1138423, 1143107,\n", - " 1144596, 1136871, 1144044, 1141578, 1140885, 1135327, 1140432, 1144182,\n", - " 1150906, 1144876, 1139559, 1147153, 1142646, 1141365, 1141367, 1153068,\n", - " 1141714, 1141664, 1149088, 1149090, 1149101, 1139019, 1153554, 1139510,\n", - " 1139768, 1139763, 1140093, 1138815, 1145200, 1143779, 1140619, 1140990,\n", - " 1146695, 1135047, 1147050, 1145873, 1152976, 1152980, 1163909, 1138995,\n", - " 1141925, 1144242, 1145332, 1150700, 1136891, 1143643, 1143637, 1141382,\n", - " 1143845, 1143851, 1136275, 1146024, 1146027, 1138085, 1141585, 1149928,\n", - " 1139990, 1143875, 1143883, 1147543, 1147150, 1147282, 1142816, 1136330,\n", - " 1142628, 1143051, 1148414, 1138923, 1157720, 1136836, 1136843, 1141280,\n", - " 1139329, 1139328, 1143345, 1144753, 1144611, 1144619, 1145818, 1137098,\n", - " 1144088, 1135813, 1150294, 1146523, 1143457, 1137711, 1144303, 1143937,\n", - " 1155701, 1147521, 1140364, 1149569, 1137990, 1147995, 1147999, 1134899,\n", - " 1134902, 1144011, 1139252, 1147131, 1145457, 1148704, 1141836, 1146742,\n", - " 1147070, 1149722, 1147025, 1147249, 1147248, 1139549, 1158226, 1143921,\n", - " 1165546, 1154526, 1145240, 1145751, 1146159, 1146178, 1151242, 1148217,\n", - " 1150445, 1149258, 1149261, 1149791, 1144514, 1144526, 1150339, 1152031,\n", - " 1144888, 1154263, 1149588, 1142286, 1140566, 1150127, 1147021, 1147023,\n", - " 1141949, 1154985, 1143564, 1149412, 1151717, 1148288, 1148290, 1152067,\n", - " 1147866, 1139097, 1154420, 1158786, 1148180, 1152561, 1157970, 1148734,\n", - " 1146559, 1149810, 1139936, 1143895, 1148204, 1145111, 1150935, 1148049,\n", - " 1148052, 1144863, 1150356, 1150365, 1146231, 1148084, 1148095, 1141017,\n", - " 1147446, 1147442, 1151816, 1152581, 1151906, 1156894, 1146571, 1141420,\n", - " 1136015, 1150630, 1150634, 1155163, 1155164, 1153447, 1145079, 1150890,\n", - " 1150894, 1146975, 1149359, 1146623, 1152109, 1152103, 1156325, 1153036,\n", - " 1153037, 1153038, 1137746, 1152622, 1140521, 1157107, 1154123, 1157826,\n", - " 1152673, 1151580, 1151573, 1151617, 1150578, 1145278, 1136131, 1148914,\n", - " 1148921, 1152958, 1167164, 1138991, 1152903, 1143995, 1152341, 1152344,\n", - " 1146816, 1156816, 1138279, 1152294, 1136028, 1158712, 1158704, 1152928,\n", - " 1151064, 1156420, 1163489, 1150150, 1150159, 1142266, 1148040, 1167408,\n", - " 1149795, 1144656, 1137048, 1148628, 1137458, 1154564, 1135705, 1157466,\n", - " 1156720, 1157225, 1143454, 1158862, 1148891, 1156505, 1157064, 1152833,\n", - " 1145184, 1139479, 1143502, 1150465, 1152179, 1151788, 1152737, 1150824,\n", - " 1150828, 1139525, 1139530, 1158308, 1155441, 1153359, 1150132, 1154529,\n", - " 1154528, 1142755, 1156207, 1160438, 1151379, 1145796, 1156463, 1158096,\n", - " 1154763, 1157898, 1158824, 1158325, 1148835, 1148654, 1155646, 1143263,\n", - " 1154240, 1170648, 1139620, 1154909, 1163127, 1179427, 1143189, 1143531,\n", - " 1155286, 1157663, 1158584, 1158578, 1156762, 1153786, 1159116, 1168159,\n", - " 1140918, 1134685, 1135601, 1148149, 1155852, 1146325, 1144463, 1152220,\n", - " 1140380, 1140381, 1155975, 1183179, 1156812, 1155393, 1159440, 1160163,\n", - " 1160164, 1136896, 1158753, 1158882, 1158886, 1140215, 1158447, 1158278,\n", - " 1155246, 1136493, 1136494, 1155296, 1156488, 1156490, 1153808, 1183284,\n", - " 1140049, 1142184, 1142191, 1158545, 1158558, 1156516, 1146126, 1142487,\n", - " 1142666, 1157747, 1144258, 1159071, 1158300, 1153052, 1153045, 1171551,\n", - " 1155763, 1138393, 1160645, 1150046, 1149063, 1149070, 1155479, 1154299,\n", - " 1147300, 1157600, 1164006, 1165651, 1149963, 1139782, 1154590, 1139592,\n", - " 1171518, 1169493, 1140643, 1148603, 1172725, 1143151, 1151872, 1155816,\n", - " 1156364, 1156361, 1158653, 1159032, 1152244, 1152247, 1155588, 1165993,\n", - " 1153924, 1158405, 1164580, 1163527, 1163525, 1145137, 1141471, 1151650,\n", - " 1151654, 1147427, 1184817, 1156739, 1165182, 1153663, 1166591, 1150648,\n", - " 1171040, 1144812, 1164741, 1142733, 1156303, 1156289, 1144051, 1145743,\n", - " 1145176, 1170307, 1144973, 1160730, 1143038, 1166053, 1147346, 1152631,\n", - " 1148124, 1193476, 1145889, 1145892, 1145900, 1145902, 1152203, 1170982,\n", - " 1168752, 1147339, 1147338, 1145664, 1192302, 1151598, 1167817, 1166653,\n", - " 1155172, 1150518, 1167915, 1156119, 1145531, 1144346, 1144350, 1144336,\n", - " 1157534, 1138376, 1154670, 1171408, 1154893, 1154882, 1169154, 1169162,\n", - " 1157331, 1138129, 1141051, 1169359, 1146337, 1158611, 1158623, 1158062,\n", - " 1173047, 1163292, 1149847, 1160135, 1154869, 1147416, 1155494, 1152353,\n", - " 1168400, 1155927, 1149402, 1148324, 1148325, 1154027, 1154028, 1153751,\n", - " 1159655, 1157158, 1157153, 1157373, 1147711, 1178961, 1151850, 1148128,\n", - " 1148131, 1157593, 1157595, 1169688, 1170490, 1169037, 1179576, 1155738,\n", - " 1165132, 1168604, 1178277, 1187435, 1166016, 1172605, 1144550, 1159100,\n", - " 1166682, 1154151, 1154148, 1154153, 1149169, 1186117, 1167657, 1143420,\n", - " 1179243, 1174333, 1171302, 1181241, 1169628, 1153803, 1153141, 1171318,\n", - " 1168778, 1158029, 1161255, 1155262, 1157792, 1157795, 1171623, 1171391,\n", - " 1157124, 1162820, 1172148, 1183699, 1180762, 1178218, 1145626, 1186793,\n", - " 1178776, 1146243, 1146252, 1153609, 1157770, 1157761, 1184148, 1158934,\n", - " 1155899, 1140399, 1169064, 1168621, 1182337, 1161819, 1156861, 1170336,\n", - " 1172609, 1186355, 1156539, 1139828, 1139831, 1150265, 1154812, 1192076,\n", - " 1189681, 1156055, 1193848, 1191993, 1149544, 1159083, 1191018, 1168683,\n", - " 1141002, 1193701, 1179409, 1162156, 1192326, 1151774, 1153733, 1181402,\n", - " 1193239, 1183774, 1152123, 1169786, 1162502, 1169707, 1187857, 1172423,\n", - " 1172429, 1158071, 1145395, 1167730, 1178133, 1180532, 1176829, 1155962,\n", - " 1172187, 1178292, 1165506, 1179769, 1169831, 1162670, 1167471, 1167460,\n", - " 1193296, 1187556, 1161945], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1141424, 1136237, 1136239, 1140284, 1140285, 1136337, 1137791,\n", - " 1141756, 1141758, 1137506, 1136219, 1136969, 1136971, 1138909, 1149835,\n", - " 1139811, 1145370, 1143362, 1139605, 1139615, 1148987, 1145281, 1134943,\n", - " 1149216, 1155689, 1143820, 1147473, 1147483, 1147221, 1135992, 1144636,\n", - " 1144632, 1146995, 1135950, 1136122, 1152670, 1138349, 1153231, 1147094,\n", - " 1137220, 1155018, 1155019, 1139373, 1139371, 1150329, 1152427, 1136270,\n", - " 1140537, 1140540, 1138112, 1149457, 1140954, 1135367, 1135375, 1135202,\n", - " 1141036, 1134794, 1138504, 1137329, 1157103, 1137693, 1144395, 1137529,\n", - " 1157397, 1137441, 1156159, 1148481, 1139161, 1135583, 1141078, 1136097,\n", - " 1135827, 1140970, 1140712, 1138514, 1153099, 1137957, 1158132, 1154132,\n", - " 1136978, 1156899, 1156908, 1135522, 1135535, 1138440, 1138461, 1138462,\n", - " 1137491, 1136594, 1135122, 1149328, 1149340, 1135088, 1135098, 1138880,\n", - " 1147112, 1142611, 1142615, 1135623, 1148531, 1135769, 1139844, 1139667,\n", - " 1138069, 1142249, 1140270, 1134992, 1142445, 1139757, 1136730, 1136734,\n", - " 1139321, 1159009, 1153543, 1153547, 1140034, 1139929, 1141964, 1141966,\n", - " 1155660, 1155654, 1141985, 1141993, 1152044, 1139064, 1134742, 1134750,\n", - " 1135540, 1135546, 1136697, 1141088, 1145346, 1143767, 1154851, 1137299,\n", - " 1139025, 1139033, 1149969, 1142347, 1154467, 1140467, 1141224, 1139386,\n", - " 1136917, 1141161, 1139495, 1147850, 1164807, 1137087, 1139800, 1144426,\n", - " 1138488, 1142053, 1141810, 1153666, 1140163, 1158749, 1137766, 1149111,\n", - " 1139190, 1141479, 1138708, 1142924, 1137661, 1137662, 1138423, 1143107,\n", - " 1144596, 1136871, 1144044, 1141578, 1140885, 1135327, 1140432, 1144182,\n", - " 1150906, 1144876, 1139559, 1147153, 1142646, 1141365, 1141367, 1153068,\n", - " 1141714, 1141664, 1149088, 1149090, 1149101, 1139019, 1153554, 1139510,\n", - " 1139768, 1139763, 1140093, 1138815, 1145200, 1143779, 1140619, 1140990,\n", - " 1146695, 1135047, 1147050, 1145873, 1152976, 1152980, 1163909, 1138995,\n", - " 1141925, 1144242, 1145332, 1150700, 1136891, 1143643, 1143637, 1141382,\n", - " 1143845, 1143851, 1136275, 1146024, 1146027, 1138085, 1141585, 1149928,\n", - " 1139990, 1143875, 1143883, 1147543, 1147150, 1147282, 1142816, 1136330,\n", - " 1142628, 1143051, 1148414, 1138923, 1157720, 1136836, 1136843, 1141280,\n", - " 1139329, 1139328, 1143345, 1144753, 1144611, 1144619, 1145818, 1137098,\n", - " 1144088, 1135813, 1150294, 1146523, 1143457, 1137711, 1144303, 1143937,\n", - " 1155701, 1147521, 1140364, 1149569, 1137990, 1147995, 1147999, 1134899,\n", - " 1134902, 1144011, 1139252, 1147131, 1145457, 1148704, 1141836, 1146742,\n", - " 1147070, 1149722, 1147025, 1147249, 1147248, 1139549, 1158226, 1143921,\n", - " 1165546, 1154526, 1145240, 1145751, 1146159, 1146178, 1151242, 1148217,\n", - " 1150445, 1149258, 1149261, 1149791, 1144514, 1144526, 1150339, 1152031,\n", - " 1144888, 1154263, 1149588, 1142286, 1140566, 1150127, 1147021, 1147023,\n", - " 1141949, 1154985, 1143564, 1149412, 1151717, 1148288, 1148290, 1152067,\n", - " 1147866, 1139097, 1154420, 1158786, 1148180, 1152561, 1157970, 1148734,\n", - " 1146559, 1149810, 1139936, 1143895, 1148204, 1145111, 1150935, 1148049,\n", - " 1148052, 1144863, 1150356, 1150365, 1146231, 1148084, 1148095, 1141017,\n", - " 1147446, 1147442, 1151816, 1152581, 1151906, 1156894, 1146571, 1141420,\n", - " 1136015, 1150630, 1150634, 1155163, 1155164, 1153447, 1145079, 1150890,\n", - " 1150894, 1146975, 1149359, 1146623, 1152109, 1152103, 1156325, 1153036,\n", - " 1153037, 1153038, 1137746, 1152622, 1140521, 1157107, 1154123, 1157826,\n", - " 1152673, 1151580, 1151573, 1151617, 1150578, 1145278, 1136131, 1148914,\n", - " 1148921, 1152958, 1167164, 1138991, 1152903, 1143995, 1152341, 1152344,\n", - " 1146816, 1156816, 1138279, 1152294, 1136028, 1158712, 1158704, 1152928,\n", - " 1151064, 1156420, 1163489, 1150150, 1150159, 1142266, 1148040, 1167408,\n", - " 1149795, 1144656, 1137048, 1148628, 1137458, 1154564, 1135705, 1157466,\n", - " 1156720, 1157225, 1143454, 1158862, 1148891, 1156505, 1157064, 1152833,\n", - " 1145184, 1139479, 1143502, 1150465, 1152179, 1151788, 1152737, 1150824,\n", - " 1150828, 1139525, 1139530, 1158308, 1155441, 1153359, 1150132, 1154529,\n", - " 1154528, 1142755, 1156207, 1160438, 1151379, 1145796, 1156463, 1158096,\n", - " 1154763, 1157898, 1158824, 1158325, 1148835, 1148654, 1155646, 1143263,\n", - " 1154240, 1170648, 1139620, 1154909, 1163127, 1179427, 1143189, 1143531,\n", - " 1155286, 1157663, 1158584, 1158578, 1156762, 1153786, 1159116, 1168159,\n", - " 1140918, 1134685, 1135601, 1148149, 1155852, 1146325, 1144463, 1152220,\n", - " 1140380, 1140381, 1155975, 1183179, 1156812, 1155393, 1159440, 1160163,\n", - " 1160164, 1136896, 1158753, 1158882, 1158886, 1140215, 1158447, 1158278,\n", - " 1155246, 1136493, 1136494, 1155296, 1156488, 1156490, 1153808, 1183284,\n", - " 1140049, 1142184, 1142191, 1158545, 1158558, 1156516, 1146126, 1142487,\n", - " 1142666, 1157747, 1144258, 1159071, 1158300, 1153052, 1153045, 1171551,\n", - " 1155763, 1138393, 1160645, 1150046, 1149063, 1149070, 1155479, 1154299,\n", - " 1147300, 1157600, 1164006, 1165651, 1149963, 1139782, 1154590, 1139592,\n", - " 1171518, 1169493, 1140643, 1148603, 1172725, 1143151, 1151872, 1155816,\n", - " 1156364, 1156361, 1158653, 1159032, 1152244, 1152247, 1155588, 1165993,\n", - " 1153924, 1158405, 1164580, 1163527, 1163525, 1145137, 1141471, 1151650,\n", - " 1151654, 1147427, 1184817, 1156739, 1165182, 1153663, 1166591, 1150648,\n", - " 1171040, 1144812, 1164741, 1142733, 1156303, 1156289, 1144051, 1145743,\n", - " 1145176, 1170307, 1144973, 1160730, 1143038, 1166053, 1147346, 1152631,\n", - " 1148124, 1193476, 1145889, 1145892, 1145900, 1145902, 1152203, 1170982,\n", - " 1168752, 1147339, 1147338, 1145664, 1192302, 1151598, 1167817, 1166653,\n", - " 1155172, 1150518, 1167915, 1156119, 1145531, 1144346, 1144350, 1144336,\n", - " 1157534, 1138376, 1154670, 1171408, 1154893, 1154882, 1169154, 1169162,\n", - " 1157331, 1138129, 1141051, 1169359, 1146337, 1158611, 1158623, 1158062,\n", - " 1173047, 1163292, 1149847, 1160135, 1154869, 1147416, 1155494, 1152353,\n", - " 1168400, 1155927, 1149402, 1148324, 1148325, 1154027, 1154028, 1153751,\n", - " 1159655, 1157158, 1157153, 1157373, 1147711, 1178961, 1151850, 1148128,\n", - " 1148131, 1157593, 1157595, 1169688, 1170490, 1169037, 1179576, 1155738,\n", - " 1165132, 1168604, 1178277, 1187435, 1166016, 1172605, 1144550, 1159100,\n", - " 1166682, 1154151, 1154148, 1154153, 1149169, 1186117, 1167657, 1143420,\n", - " 1179243, 1174333, 1171302, 1181241, 1169628, 1153803, 1153141, 1171318,\n", - " 1168778, 1158029, 1161255, 1155262, 1157792, 1157795, 1171623, 1171391,\n", - " 1157124, 1162820, 1172148, 1183699, 1180762, 1178218, 1145626, 1186793,\n", - " 1178776, 1146243, 1146252, 1153609, 1157770, 1157761, 1184148, 1158934,\n", - " 1155899, 1140399, 1169064, 1168621, 1182337, 1161819, 1156861, 1170336,\n", - " 1172609, 1186355, 1156539, 1139828, 1139831, 1150265, 1154812, 1192076,\n", - " 1189681, 1156055, 1193848, 1191993, 1149544, 1159083, 1191018, 1168683,\n", - " 1141002, 1193701, 1179409, 1162156, 1192326, 1151774, 1153733, 1181402,\n", - " 1193239, 1183774, 1152123, 1169786, 1162502, 1169707, 1187857, 1172423,\n", - " 1172429, 1158071, 1145395, 1167730, 1178133, 1180532, 1176829, 1155962,\n", - " 1172187, 1178292, 1165506, 1179769, 1169831, 1162670, 1167471, 1167460,\n", - " 1193296, 1187556, 1161945], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1199428, 1199282, 1198461, 1202255, 1198832, 1198840, 1201577,\n", - " 1203048, 1196956, 1202804, 1194866, 1198180, 1194770, 1194783, 1197466,\n", - " 1194649, 1195263, 1199135, 1201992, 1196031, 1194882, 1195895, 1199172,\n", - " 1197856, 1196517, 1195313, 1195320, 1196835, 1195999, 1198163, 1196711,\n", - " 1196717, 1199823, 1195148, 1195223, 1195270, 1197141, 1200765, 1197374,\n", - " 1197273, 1196109, 1196737, 1195847, 1195850, 1195026, 1195659, 1195536,\n", - " 1197474, 1197478, 1195778, 1202017, 1195353, 1198282, 1199333, 1199339,\n", - " 1200949, 1199856, 1196851, 1194928, 1197583, 1200872, 1199038, 1198413,\n", - " 1198410, 1199231, 1201916, 1194795, 1201511, 1197683, 1197601, 1201116,\n", - " 1196727, 1200894, 1198428, 1199889, 1198811, 1201547, 1200768, 1201824,\n", - " 1200452, 1198066, 1199445, 1201421, 1201405, 1194805, 1199712, 1201049,\n", - " 1200363, 1200553, 1203071, 1200429, 1202102, 1199879, 1201757, 1202138,\n", - " 1200690, 1200703, 1199917, 1200194, 1196779, 1202239, 1200899, 1201871,\n", - " 1199925, 1201796, 1200241, 1200398, 1200784, 1200785, 1198525, 1195664,\n", - " 1200445, 1198911, 1195415, 1201788, 1197822, 1199659, 1203102, 1201138,\n", - " 1201139, 1195157, 1198147, 1198824, 1200674, 1198819, 1203077, 1200296,\n", - " 1197652, 1200707, 1197335, 1196428, 1196424], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1199428, 1199282, 1198461, 1202255, 1198832, 1198840, 1201577,\n", - " 1203048, 1196956, 1202804, 1194866, 1198180, 1194770, 1194783, 1197466,\n", - " 1194649, 1195263, 1199135, 1201992, 1196031, 1194882, 1195895, 1199172,\n", - " 1197856, 1196517, 1195313, 1195320, 1196835, 1195999, 1198163, 1196711,\n", - " 1196717, 1199823, 1195148, 1195223, 1195270, 1197141, 1200765, 1197374,\n", - " 1197273, 1196109, 1196737, 1195847, 1195850, 1195026, 1195659, 1195536,\n", - " 1197474, 1197478, 1195778, 1202017, 1195353, 1198282, 1199333, 1199339,\n", - " 1200949, 1199856, 1196851, 1194928, 1197583, 1200872, 1199038, 1198413,\n", - " 1198410, 1199231, 1201916, 1194795, 1201511, 1197683, 1197601, 1201116,\n", - " 1196727, 1200894, 1198428, 1199889, 1198811, 1201547, 1200768, 1201824,\n", - " 1200452, 1198066, 1199445, 1201421, 1201405, 1194805, 1199712, 1201049,\n", - " 1200363, 1200553, 1203071, 1200429, 1202102, 1199879, 1201757, 1202138,\n", - " 1200690, 1200703, 1199917, 1200194, 1196779, 1202239, 1200899, 1201871,\n", - " 1199925, 1201796, 1200241, 1200398, 1200784, 1200785, 1198525, 1195664,\n", - " 1200445, 1198911, 1195415, 1201788, 1197822, 1199659, 1203102, 1201138,\n", - " 1201139, 1195157, 1198147, 1198824, 1200674, 1198819, 1203077, 1200296,\n", - " 1197652, 1200707, 1197335, 1196428, 1196424], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 1.9417e-01, -1.2247e-04, 8.4144e-01, ..., 1.2399e-01,\n", - " -1.8633e-03, -5.6059e-03],\n", - " [ 1.0859e-01, 5.4147e-02, 5.8715e-01, ..., 1.1992e-01,\n", - " -1.5802e-03, -3.3929e-03],\n", - " [ 1.4299e-01, 7.4150e-02, 6.4855e-01, ..., 1.4929e-01,\n", - " -1.7602e-03, -4.3689e-03],\n", - " ...,\n", - " [ 1.2111e-01, 5.8488e-02, 7.0111e-01, ..., 1.5379e-01,\n", - " -1.6336e-03, -4.4007e-03],\n", - " [ 2.5447e-01, -1.6756e-04, 9.5235e-01, ..., 1.1304e-01,\n", - " -1.9237e-03, -6.4691e-03],\n", - " [ 1.2668e-01, 7.3443e-02, 6.4823e-01, ..., 1.5990e-01,\n", - " -1.6195e-03, -4.2236e-03]], device='cuda:0'), 'paper': tensor([[ 1.7794e+00, -4.4449e-03, 2.1511e+00, ..., -5.9633e-04,\n", - " -2.6879e-02, 1.5912e+00],\n", - " [ 6.5960e-01, -5.2226e-03, 1.0069e+00, ..., -6.7029e-03,\n", - " -1.2449e-02, -1.1840e-04],\n", - " [ 1.4555e+00, -6.6720e-04, 2.0014e+00, ..., -1.7532e-03,\n", - " -2.1265e-02, 9.1759e-01],\n", - " ...,\n", - " [ 4.7140e-01, -2.4278e-02, 2.6990e+00, ..., -1.1731e-02,\n", - " -2.1677e-02, -9.1155e-03],\n", - " [ 3.8700e-01, -2.6587e-02, 2.7653e+00, ..., -9.3229e-03,\n", - " -1.9588e-02, -1.2143e-02],\n", - " [ 2.1321e+00, -1.1738e-02, 2.2478e+00, ..., 1.5272e-01,\n", - " -3.7153e-02, 2.8271e+00]], device='cuda:0'), 'author': tensor([[-1.1535e-03, 1.2351e-01, 2.4612e-01, ..., 1.4409e+00,\n", - " -9.6527e-04, 4.7411e-02],\n", - " [-5.2555e-03, 2.7499e-01, 3.0039e-01, ..., 1.1013e+00,\n", - " -2.9728e-03, -3.6920e-03],\n", - " [-5.0085e-03, 1.3424e-01, 3.5598e-01, ..., 1.0915e+00,\n", - " -3.2949e-03, -5.2472e-03],\n", - " ...,\n", - " [-3.6025e-03, 9.5193e-02, 3.8217e-01, ..., 1.0575e+00,\n", - " -3.1319e-03, -3.1249e-03],\n", - " [-1.3744e-03, 1.4651e-01, 2.4659e-01, ..., 1.5141e+00,\n", - " -1.0931e-03, 1.1497e-01],\n", - " [-6.8971e-04, 2.3554e-02, 1.5061e-01, ..., 1.4001e-01,\n", - " -2.4980e-04, -8.0816e-04]], device='cuda:0'), 'field_of_study': tensor([[-1.1006e-03, 4.4691e-01, 2.1927e-01, ..., -7.4080e-03,\n", - " 1.4448e-01, 3.0965e-01],\n", - " [-8.9465e-04, 3.7623e-01, 1.3867e-01, ..., -6.4157e-03,\n", - " 1.9603e-01, 1.5508e-01],\n", - " [ 3.6249e-02, 5.7000e-01, 2.5923e-01, ..., -6.1537e-03,\n", - " 2.8951e-01, 6.5480e-02],\n", - " ...,\n", - " [-1.9928e-03, 3.6668e-01, 1.8746e-01, ..., -5.9165e-03,\n", - " 5.8663e-02, 2.6866e-01],\n", - " [ 5.0178e-02, 6.3818e-01, 4.6858e-01, ..., -6.3077e-03,\n", - " 2.4075e-01, 5.3959e-02],\n", - " [-2.3051e-04, 4.5770e-01, 1.9168e-01, ..., -5.3025e-03,\n", - " 3.0988e-01, 1.3873e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 94, 94, 126, 191, 143, 191, 191, 191, 55, 48, 48, 48,\n", - " 470, 470, 1, 443, 454, 926, 926, 829, 925, 1001, 1129, 1018,\n", - " 811, 1252, 1430, 1430, 1117, 1112, 1112, 1189, 1112, 1520, 1581, 1581,\n", - " 1581, 1394, 1691, 1607, 1364, 1364, 1364, 1613, 1565, 1699, 1699, 1767,\n", - " 1715, 1812, 1812, 1672, 1812, 1838, 1838, 2013, 1838, 1838, 1838, 1838,\n", - " 1737, 1975, 1948, 1883, 1759, 1759, 1831, 1831, 1964, 1879, 1846, 1966,\n", - " 2016, 2016, 2011, 2088, 2088, 2088, 2088, 2145, 2145, 2063, 2063, 2063,\n", - " 2170, 2170, 2170, 2264, 2178, 2178, 2295, 2295, 2352, 2373, 2322, 2453,\n", - " 2502, 2366, 2420, 2468, 2613, 2454, 2454, 2454, 2454, 2454, 2540, 2672,\n", - " 2618, 2973, 2833, 2833, 2729, 2693, 3032, 2775, 2900, 3189, 2963, 3027,\n", - " 3338, 3338, 3352, 3366, 3462, 3535, 3472, 3773, 3479, 3354, 3548, 3711,\n", - " 3617, 3584, 3584, 3525, 3525, 3795, 3765, 3684, 3885, 3765, 4022, 3698,\n", - " 4120, 4158, 4174, 4159, 4243, 4246, 4191, 4270, 4405, 4317, 4317, 4470,\n", - " 4432, 4623, 4623, 4579, 4579, 4754, 4511, 4617, 4617, 4524, 4615, 4831,\n", - " 5172, 5138, 5023, 5218, 5307, 5390, 5355, 5434, 5515, 5573, 5869, 5777,\n", - " 5777, 5648, 5858, 5951, 5802, 5817, 5923, 5923, 6118, 6215, 6243, 6243,\n", - " 6141, 6141, 6141, 6266, 6310, 6249, 6281],\n", - " [ 20, 121, 43, 20, 132, 30, 28, 65, 42, 76, 47, 34,\n", - " 3, 63, 75, 128, 29, 72, 33, 50, 97, 72, 68, 122,\n", - " 69, 111, 79, 72, 101, 72, 128, 5, 91, 76, 76, 49,\n", - " 91, 118, 67, 129, 25, 53, 112, 86, 64, 15, 2, 90,\n", - " 94, 9, 125, 126, 114, 37, 113, 99, 89, 33, 127, 21,\n", - " 130, 114, 108, 46, 40, 70, 24, 23, 33, 39, 38, 4,\n", - " 50, 77, 100, 7, 26, 54, 0, 1, 66, 83, 124, 116,\n", - " 35, 14, 112, 30, 106, 17, 116, 83, 63, 57, 19, 60,\n", - " 20, 10, 12, 109, 61, 52, 93, 104, 120, 8, 10, 27,\n", - " 96, 102, 71, 130, 60, 27, 115, 85, 115, 57, 115, 60,\n", - " 78, 110, 64, 72, 60, 74, 115, 13, 74, 88, 10, 1,\n", - " 123, 92, 68, 98, 129, 4, 72, 117, 119, 79, 107, 2,\n", - " 115, 115, 4, 115, 115, 115, 110, 116, 116, 116, 83, 62,\n", - " 59, 0, 56, 72, 131, 105, 45, 16, 87, 81, 22, 58,\n", - " 82, 11, 44, 73, 41, 11, 55, 32, 6, 101, 11, 95,\n", - " 51, 101, 36, 84, 4, 18, 103, 2, 103, 72, 48, 8,\n", - " 65, 123, 112, 99, 31, 72, 80]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2854, 1580, 2855, ..., 339, 4602, 509],\n", - " [ 215, 12, 36, ..., 6839, 6784, 6790]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 39, 100, 0, ..., 110, 70, 27],\n", - " [ 45, 174, 59, ..., 6261, 6344, 6180]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 287, 287, 287, ..., 6710, 6710, 6735],\n", - " [ 86, 46, 708, ..., 57, 269, 229]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 595, 609, 269, ..., 286, 230, 269],\n", - " [ 188, 153, 143, ..., 6893, 6842, 6857]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4402, 5990, 5865, ..., 5838, 5519, 4518],\n", - " [ 109, 188, 74, ..., 6341, 6263, 6333]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 310, 287, 287, ..., 6710, 6773, 6814],\n", - " [2949, 3489, 3770, ..., 5721, 3659, 1427]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 126, 126, 126, ..., 6281, 6281, 6281],\n", - " [6734, 5626, 3468, ..., 3728, 3512, 3539]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006823\n", - "sampling 0.006668\n", - "noi time: 0.000749\n", - "get_vertex_data call: 0.034314\n", - "noi group time: 0.001902\n", - "eoi_group_time: 0.016559\n", - "second half: 0.219362\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 476, 18176, 32616, ..., 1132926, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 476, 18176, 32616, ..., 1132926, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208589, 1221609, 1208550, ..., 1934161, 1935109, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208589, 1221609, 1208550, ..., 1934161, 1935109, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137435, 1137214, 1141424, 1141435, 1136228, 1136237, 1136239, 1140285,\n", - " 1136349, 1138544, 1135160, 1135716, 1135726, 1137791, 1140785, 1140799,\n", - " 1141758, 1136210, 1136215, 1136962, 1141443, 1138897, 1151163, 1151164,\n", - " 1139808, 1139820, 1145373, 1145999, 1145993, 1143372, 1140772, 1140781,\n", - " 1150506, 1142965, 1139866, 1148576, 1149216, 1147943, 1155683, 1155689,\n", - " 1147473, 1135989, 1142881, 1144636, 1146992, 1134697, 1150193, 1136125,\n", - " 1152664, 1138345, 1147094, 1155019, 1147211, 1136268, 1134670, 1140540,\n", - " 1138112, 1138119, 1137171, 1137181, 1138356, 1151520, 1135913, 1140020,\n", - " 1140947, 1135367, 1135202, 1140767, 1137798, 1136047, 1154739, 1141036,\n", - " 1136288, 1134794, 1157450, 1136519, 1138504, 1138510, 1137334, 1136189,\n", - " 1143069, 1157088, 1136619, 1136623, 1144395, 1137534, 1135408, 1136705,\n", - " 1157395, 1157399, 1157393, 1157397, 1152376, 1148481, 1135579, 1135583,\n", - " 1142593, 1142607, 1136098, 1136108, 1135664, 1135675, 1138516, 1158136,\n", - " 1154132, 1139685, 1138436, 1138440, 1138445, 1140071, 1138461, 1138449,\n", - " 1157190, 1137920, 1137924, 1149328, 1138847, 1156606, 1147111, 1142611,\n", - " 1158984, 1145842, 1148531, 1148536, 1138067, 1140269, 1134992, 1136551,\n", - " 1158974, 1159018, 1141070, 1136067, 1138648, 1141985, 1152044, 1142303,\n", - " 1140660, 1137734, 1137728, 1140901, 1134742, 1134750, 1135549, 1137895,\n", - " 1144138, 1139889, 1141980, 1136398, 1137299, 1139025, 1140003, 1146832,\n", - " 1141695, 1135860, 1135861, 1136421, 1140470, 1139386, 1136917, 1143677,\n", - " 1144237, 1141786, 1139495, 1136763, 1141609, 1141300, 1147854, 1149433,\n", - " 1142050, 1142053, 1141821, 1143158, 1138469, 1148867, 1158600, 1139190,\n", - " 1141479, 1138708, 1137661, 1138424, 1143113, 1144596, 1136864, 1135319,\n", - " 1144182, 1137606, 1150906, 1150910, 1144865, 1139559, 1137841, 1142640,\n", - " 1162804, 1162811, 1141365, 1139514, 1139763, 1140983, 1140990, 1141557,\n", - " 1147050, 1145873, 1143551, 1152976, 1152980, 1152988, 1135457, 1139447,\n", - " 1139455, 1141925, 1144242, 1141841, 1136885, 1145974, 1136277, 1136275,\n", - " 1142098, 1146024, 1138093, 1154323, 1154328, 1139990, 1143293, 1151124,\n", - " 1147543, 1147545, 1147540, 1147150, 1148763, 1147282, 1147290, 1142816,\n", - " 1136330, 1143663, 1149366, 1149372, 1143051, 1143040, 1136160, 1138923,\n", - " 1136836, 1146105, 1139328, 1144778, 1141490, 1142149, 1142159, 1143345,\n", - " 1144754, 1144765, 1144611, 1144619, 1145808, 1145816, 1137098, 1139979,\n", - " 1135876, 1150294, 1144375, 1146523, 1143456, 1143457, 1144291, 1144303,\n", - " 1143937, 1147574, 1155700, 1143807, 1140356, 1140364, 1149581, 1166410,\n", - " 1147999, 1146949, 1144003, 1144013, 1148704, 1141836, 1146751, 1146742,\n", - " 1148473, 1153701, 1152328, 1149722, 1147025, 1147981, 1147979, 1139549,\n", - " 1147198, 1158226, 1143922, 1154526, 1145237, 1145240, 1145751, 1142378,\n", - " 1146159, 1148392, 1146178, 1151242, 1148223, 1152530, 1152537, 1151182,\n", - " 1150438, 1150445, 1149250, 1149263, 1147962, 1154438, 1151860, 1149787,\n", - " 1144174, 1150348, 1150339, 1147794, 1151480, 1151473, 1152031, 1152026,\n", - " 1154263, 1145259, 1135516, 1134873, 1149535, 1148698, 1147009, 1153959,\n", - " 1158944, 1141949, 1146783, 1141269, 1153574, 1148288, 1148294, 1148300,\n", - " 1139088, 1139097, 1154420, 1148188, 1139718, 1146675, 1146676, 1152482,\n", - " 1138874, 1141181, 1152436, 1157983, 1148725, 1146547, 1149821, 1148204,\n", - " 1153121, 1153188, 1159837, 1150932, 1150935, 1148058, 1148057, 1143092,\n", - " 1150352, 1150356, 1155098, 1143134, 1143133, 1141017, 1147442, 1152581,\n", - " 1135306, 1151906, 1151913, 1151908, 1154183, 1148498, 1146565, 1141420,\n", - " 1152784, 1136002, 1151352, 1147737, 1145079, 1146969, 1156403, 1156413,\n", - " 1151920, 1153249, 1150210, 1146623, 1151691, 1142986, 1152409, 1154063,\n", - " 1152097, 1153038, 1150085, 1145539, 1137746, 1146304, 1149203, 1157107,\n", - " 1155337, 1157842, 1157824, 1151617, 1150578, 1145930, 1152163, 1152224,\n", - " 1152225, 1151298, 1151311, 1152341, 1152344, 1156816, 1138272, 1138283,\n", - " 1138281, 1157147, 1136028, 1136029, 1158708, 1156619, 1156621, 1156622,\n", - " 1151187, 1152928, 1152934, 1152886, 1156422, 1150106, 1150159, 1144016,\n", - " 1142257, 1148040, 1155202, 1149300, 1157631, 1149792, 1144659, 1148628,\n", - " 1158530, 1137458, 1156068, 1155376, 1142041, 1142047, 1154377, 1139221,\n", - " 1157229, 1135429, 1135434, 1157547, 1142385, 1142396, 1158854, 1150872,\n", - " 1158916, 1156499, 1157064, 1157069, 1155418, 1152841, 1152833, 1157559,\n", - " 1150465, 1150475, 1135729, 1138816, 1156632, 1165711, 1156940, 1147810,\n", - " 1147818, 1158308, 1151340, 1155441, 1155452, 1150129, 1150136, 1144353,\n", - " 1140866, 1145768, 1145610, 1142755, 1172954, 1156269, 1156271, 1151379,\n", - " 1158638, 1155360, 1155122, 1152527, 1157182, 1151424, 1135396, 1135398,\n", - " 1146913, 1145806, 1156463, 1158096, 1155626, 1155628, 1155631, 1154550,\n", - " 1154555, 1136466, 1158824, 1157000, 1156994, 1148836, 1148834, 1148835,\n", - " 1155646, 1153368, 1143263, 1143257, 1143260, 1160223, 1154095, 1143196,\n", - " 1150371, 1153322, 1150068, 1144712, 1141623, 1141620, 1150983, 1158996,\n", - " 1149907, 1137381, 1159116, 1159115, 1145681, 1140913, 1134677, 1135601,\n", - " 1145515, 1150661, 1150659, 1155853, 1155848, 1155852, 1158665, 1158669,\n", - " 1157685, 1157684, 1149137, 1149145, 1152209, 1155433, 1156692, 1167625,\n", - " 1156027, 1157732, 1157735, 1159132, 1142466, 1155971, 1155975, 1155980,\n", - " 1158841, 1158846, 1156804, 1156812, 1155404, 1149700, 1154605, 1161302,\n", - " 1136910, 1136896, 1158886, 1158891, 1140221, 1157296, 1158814, 1158284,\n", - " 1155233, 1152463, 1153640, 1156665, 1142747, 1153808, 1144122, 1166424,\n", - " 1157858, 1142178, 1142191, 1158545, 1158547, 1146126, 1138110, 1158006,\n", - " 1144576, 1155528, 1165853, 1142487, 1161967, 1142663, 1152479, 1150674,\n", - " 1161645, 1159052, 1144270, 1159057, 1151830, 1157944, 1153052, 1159730,\n", - " 1144158, 1153841, 1156096, 1138384, 1138393, 1150046, 1149063, 1149070,\n", - " 1153514, 1153519, 1146876, 1138161, 1167210, 1156795, 1149956, 1139592,\n", - " 1148021, 1156983, 1166073, 1157356, 1140130, 1140643, 1141862, 1148600,\n", - " 1148603, 1148607, 1143139, 1156357, 1159029, 1159032, 1152244, 1152247,\n", - " 1171154, 1143740, 1155588, 1168426, 1144977, 1144989, 1149016, 1146510,\n", - " 1146509, 1144739, 1144750, 1152776, 1165413, 1141459, 1147427, 1156739,\n", - " 1156742, 1153648, 1166591, 1150309, 1168743, 1144810, 1144812, 1192117,\n", - " 1164741, 1156303, 1145743, 1148683, 1145228, 1160232, 1169288, 1166462,\n", - " 1147673, 1169509, 1142136, 1143025, 1169233, 1145445, 1155905, 1148124,\n", - " 1145892, 1145902, 1148426, 1153520, 1153535, 1163961, 1175240, 1143404,\n", - " 1158734, 1147338, 1150783, 1179499, 1151585, 1166653, 1193345, 1165011,\n", - " 1156119, 1156118, 1154614, 1144336, 1157534, 1154670, 1135855, 1169162,\n", - " 1157331, 1157333, 1151668, 1169359, 1154364, 1149452, 1158623, 1173047,\n", - " 1149846, 1149847, 1147423, 1169948, 1155492, 1155502, 1152353, 1168369,\n", - " 1143170, 1143858, 1155931, 1161130, 1169133, 1172838, 1177426, 1173307,\n", - " 1189233, 1154027, 1152154, 1152151, 1152158, 1159658, 1151202, 1151697,\n", - " 1157153, 1147711, 1151850, 1148128, 1148131, 1147934, 1170488, 1169037,\n", - " 1172961, 1155730, 1155739, 1165132, 1166746, 1140326, 1144550, 1173092,\n", - " 1166682, 1170874, 1154148, 1149169, 1159751, 1180596, 1143279, 1169969,\n", - " 1164956, 1171302, 1171309, 1181241, 1169619, 1153803, 1153805, 1178810,\n", - " 1178805, 1164818, 1164828, 1183129, 1183123, 1161255, 1161262, 1182353,\n", - " 1155262, 1154718, 1143330, 1151488, 1151496, 1171616, 1171623, 1157991,\n", - " 1187454, 1187263, 1153898, 1154500, 1134650, 1180763, 1145626, 1185116,\n", - " 1178028, 1178757, 1186727, 1157483, 1179080, 1149755, 1170069, 1158771,\n", - " 1158779, 1186509, 1155890, 1155892, 1162988, 1184317, 1140399, 1182335,\n", - " 1165474, 1180521, 1164231, 1176976, 1180633, 1161819, 1146172, 1147182,\n", - " 1181181, 1185384, 1164133, 1163622, 1139828, 1139831, 1139837, 1154812,\n", - " 1164914, 1156049, 1156055, 1146386, 1173058, 1186648, 1190297, 1186516,\n", - " 1156842, 1191197, 1169964, 1140993, 1170201, 1170886, 1181283, 1153733,\n", - " 1184366, 1190528, 1169698, 1178637, 1153587, 1177842, 1156681, 1172122,\n", - " 1158064, 1158070, 1166789, 1145395, 1160967, 1152084, 1174341, 1188107,\n", - " 1183297, 1187541, 1187547, 1192336, 1181698, 1194153, 1189368, 1167471,\n", - " 1157017, 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137435, 1137214, 1141424, 1141435, 1136228, 1136237, 1136239, 1140285,\n", - " 1136349, 1138544, 1135160, 1135716, 1135726, 1137791, 1140785, 1140799,\n", - " 1141758, 1136210, 1136215, 1136962, 1141443, 1138897, 1151163, 1151164,\n", - " 1139808, 1139820, 1145373, 1145999, 1145993, 1143372, 1140772, 1140781,\n", - " 1150506, 1142965, 1139866, 1148576, 1149216, 1147943, 1155683, 1155689,\n", - " 1147473, 1135989, 1142881, 1144636, 1146992, 1134697, 1150193, 1136125,\n", - " 1152664, 1138345, 1147094, 1155019, 1147211, 1136268, 1134670, 1140540,\n", - " 1138112, 1138119, 1137171, 1137181, 1138356, 1151520, 1135913, 1140020,\n", - " 1140947, 1135367, 1135202, 1140767, 1137798, 1136047, 1154739, 1141036,\n", - " 1136288, 1134794, 1157450, 1136519, 1138504, 1138510, 1137334, 1136189,\n", - " 1143069, 1157088, 1136619, 1136623, 1144395, 1137534, 1135408, 1136705,\n", - " 1157395, 1157399, 1157393, 1157397, 1152376, 1148481, 1135579, 1135583,\n", - " 1142593, 1142607, 1136098, 1136108, 1135664, 1135675, 1138516, 1158136,\n", - " 1154132, 1139685, 1138436, 1138440, 1138445, 1140071, 1138461, 1138449,\n", - " 1157190, 1137920, 1137924, 1149328, 1138847, 1156606, 1147111, 1142611,\n", - " 1158984, 1145842, 1148531, 1148536, 1138067, 1140269, 1134992, 1136551,\n", - " 1158974, 1159018, 1141070, 1136067, 1138648, 1141985, 1152044, 1142303,\n", - " 1140660, 1137734, 1137728, 1140901, 1134742, 1134750, 1135549, 1137895,\n", - " 1144138, 1139889, 1141980, 1136398, 1137299, 1139025, 1140003, 1146832,\n", - " 1141695, 1135860, 1135861, 1136421, 1140470, 1139386, 1136917, 1143677,\n", - " 1144237, 1141786, 1139495, 1136763, 1141609, 1141300, 1147854, 1149433,\n", - " 1142050, 1142053, 1141821, 1143158, 1138469, 1148867, 1158600, 1139190,\n", - " 1141479, 1138708, 1137661, 1138424, 1143113, 1144596, 1136864, 1135319,\n", - " 1144182, 1137606, 1150906, 1150910, 1144865, 1139559, 1137841, 1142640,\n", - " 1162804, 1162811, 1141365, 1139514, 1139763, 1140983, 1140990, 1141557,\n", - " 1147050, 1145873, 1143551, 1152976, 1152980, 1152988, 1135457, 1139447,\n", - " 1139455, 1141925, 1144242, 1141841, 1136885, 1145974, 1136277, 1136275,\n", - " 1142098, 1146024, 1138093, 1154323, 1154328, 1139990, 1143293, 1151124,\n", - " 1147543, 1147545, 1147540, 1147150, 1148763, 1147282, 1147290, 1142816,\n", - " 1136330, 1143663, 1149366, 1149372, 1143051, 1143040, 1136160, 1138923,\n", - " 1136836, 1146105, 1139328, 1144778, 1141490, 1142149, 1142159, 1143345,\n", - " 1144754, 1144765, 1144611, 1144619, 1145808, 1145816, 1137098, 1139979,\n", - " 1135876, 1150294, 1144375, 1146523, 1143456, 1143457, 1144291, 1144303,\n", - " 1143937, 1147574, 1155700, 1143807, 1140356, 1140364, 1149581, 1166410,\n", - " 1147999, 1146949, 1144003, 1144013, 1148704, 1141836, 1146751, 1146742,\n", - " 1148473, 1153701, 1152328, 1149722, 1147025, 1147981, 1147979, 1139549,\n", - " 1147198, 1158226, 1143922, 1154526, 1145237, 1145240, 1145751, 1142378,\n", - " 1146159, 1148392, 1146178, 1151242, 1148223, 1152530, 1152537, 1151182,\n", - " 1150438, 1150445, 1149250, 1149263, 1147962, 1154438, 1151860, 1149787,\n", - " 1144174, 1150348, 1150339, 1147794, 1151480, 1151473, 1152031, 1152026,\n", - " 1154263, 1145259, 1135516, 1134873, 1149535, 1148698, 1147009, 1153959,\n", - " 1158944, 1141949, 1146783, 1141269, 1153574, 1148288, 1148294, 1148300,\n", - " 1139088, 1139097, 1154420, 1148188, 1139718, 1146675, 1146676, 1152482,\n", - " 1138874, 1141181, 1152436, 1157983, 1148725, 1146547, 1149821, 1148204,\n", - " 1153121, 1153188, 1159837, 1150932, 1150935, 1148058, 1148057, 1143092,\n", - " 1150352, 1150356, 1155098, 1143134, 1143133, 1141017, 1147442, 1152581,\n", - " 1135306, 1151906, 1151913, 1151908, 1154183, 1148498, 1146565, 1141420,\n", - " 1152784, 1136002, 1151352, 1147737, 1145079, 1146969, 1156403, 1156413,\n", - " 1151920, 1153249, 1150210, 1146623, 1151691, 1142986, 1152409, 1154063,\n", - " 1152097, 1153038, 1150085, 1145539, 1137746, 1146304, 1149203, 1157107,\n", - " 1155337, 1157842, 1157824, 1151617, 1150578, 1145930, 1152163, 1152224,\n", - " 1152225, 1151298, 1151311, 1152341, 1152344, 1156816, 1138272, 1138283,\n", - " 1138281, 1157147, 1136028, 1136029, 1158708, 1156619, 1156621, 1156622,\n", - " 1151187, 1152928, 1152934, 1152886, 1156422, 1150106, 1150159, 1144016,\n", - " 1142257, 1148040, 1155202, 1149300, 1157631, 1149792, 1144659, 1148628,\n", - " 1158530, 1137458, 1156068, 1155376, 1142041, 1142047, 1154377, 1139221,\n", - " 1157229, 1135429, 1135434, 1157547, 1142385, 1142396, 1158854, 1150872,\n", - " 1158916, 1156499, 1157064, 1157069, 1155418, 1152841, 1152833, 1157559,\n", - " 1150465, 1150475, 1135729, 1138816, 1156632, 1165711, 1156940, 1147810,\n", - " 1147818, 1158308, 1151340, 1155441, 1155452, 1150129, 1150136, 1144353,\n", - " 1140866, 1145768, 1145610, 1142755, 1172954, 1156269, 1156271, 1151379,\n", - " 1158638, 1155360, 1155122, 1152527, 1157182, 1151424, 1135396, 1135398,\n", - " 1146913, 1145806, 1156463, 1158096, 1155626, 1155628, 1155631, 1154550,\n", - " 1154555, 1136466, 1158824, 1157000, 1156994, 1148836, 1148834, 1148835,\n", - " 1155646, 1153368, 1143263, 1143257, 1143260, 1160223, 1154095, 1143196,\n", - " 1150371, 1153322, 1150068, 1144712, 1141623, 1141620, 1150983, 1158996,\n", - " 1149907, 1137381, 1159116, 1159115, 1145681, 1140913, 1134677, 1135601,\n", - " 1145515, 1150661, 1150659, 1155853, 1155848, 1155852, 1158665, 1158669,\n", - " 1157685, 1157684, 1149137, 1149145, 1152209, 1155433, 1156692, 1167625,\n", - " 1156027, 1157732, 1157735, 1159132, 1142466, 1155971, 1155975, 1155980,\n", - " 1158841, 1158846, 1156804, 1156812, 1155404, 1149700, 1154605, 1161302,\n", - " 1136910, 1136896, 1158886, 1158891, 1140221, 1157296, 1158814, 1158284,\n", - " 1155233, 1152463, 1153640, 1156665, 1142747, 1153808, 1144122, 1166424,\n", - " 1157858, 1142178, 1142191, 1158545, 1158547, 1146126, 1138110, 1158006,\n", - " 1144576, 1155528, 1165853, 1142487, 1161967, 1142663, 1152479, 1150674,\n", - " 1161645, 1159052, 1144270, 1159057, 1151830, 1157944, 1153052, 1159730,\n", - " 1144158, 1153841, 1156096, 1138384, 1138393, 1150046, 1149063, 1149070,\n", - " 1153514, 1153519, 1146876, 1138161, 1167210, 1156795, 1149956, 1139592,\n", - " 1148021, 1156983, 1166073, 1157356, 1140130, 1140643, 1141862, 1148600,\n", - " 1148603, 1148607, 1143139, 1156357, 1159029, 1159032, 1152244, 1152247,\n", - " 1171154, 1143740, 1155588, 1168426, 1144977, 1144989, 1149016, 1146510,\n", - " 1146509, 1144739, 1144750, 1152776, 1165413, 1141459, 1147427, 1156739,\n", - " 1156742, 1153648, 1166591, 1150309, 1168743, 1144810, 1144812, 1192117,\n", - " 1164741, 1156303, 1145743, 1148683, 1145228, 1160232, 1169288, 1166462,\n", - " 1147673, 1169509, 1142136, 1143025, 1169233, 1145445, 1155905, 1148124,\n", - " 1145892, 1145902, 1148426, 1153520, 1153535, 1163961, 1175240, 1143404,\n", - " 1158734, 1147338, 1150783, 1179499, 1151585, 1166653, 1193345, 1165011,\n", - " 1156119, 1156118, 1154614, 1144336, 1157534, 1154670, 1135855, 1169162,\n", - " 1157331, 1157333, 1151668, 1169359, 1154364, 1149452, 1158623, 1173047,\n", - " 1149846, 1149847, 1147423, 1169948, 1155492, 1155502, 1152353, 1168369,\n", - " 1143170, 1143858, 1155931, 1161130, 1169133, 1172838, 1177426, 1173307,\n", - " 1189233, 1154027, 1152154, 1152151, 1152158, 1159658, 1151202, 1151697,\n", - " 1157153, 1147711, 1151850, 1148128, 1148131, 1147934, 1170488, 1169037,\n", - " 1172961, 1155730, 1155739, 1165132, 1166746, 1140326, 1144550, 1173092,\n", - " 1166682, 1170874, 1154148, 1149169, 1159751, 1180596, 1143279, 1169969,\n", - " 1164956, 1171302, 1171309, 1181241, 1169619, 1153803, 1153805, 1178810,\n", - " 1178805, 1164818, 1164828, 1183129, 1183123, 1161255, 1161262, 1182353,\n", - " 1155262, 1154718, 1143330, 1151488, 1151496, 1171616, 1171623, 1157991,\n", - " 1187454, 1187263, 1153898, 1154500, 1134650, 1180763, 1145626, 1185116,\n", - " 1178028, 1178757, 1186727, 1157483, 1179080, 1149755, 1170069, 1158771,\n", - " 1158779, 1186509, 1155890, 1155892, 1162988, 1184317, 1140399, 1182335,\n", - " 1165474, 1180521, 1164231, 1176976, 1180633, 1161819, 1146172, 1147182,\n", - " 1181181, 1185384, 1164133, 1163622, 1139828, 1139831, 1139837, 1154812,\n", - " 1164914, 1156049, 1156055, 1146386, 1173058, 1186648, 1190297, 1186516,\n", - " 1156842, 1191197, 1169964, 1140993, 1170201, 1170886, 1181283, 1153733,\n", - " 1184366, 1190528, 1169698, 1178637, 1153587, 1177842, 1156681, 1172122,\n", - " 1158064, 1158070, 1166789, 1145395, 1160967, 1152084, 1174341, 1188107,\n", - " 1183297, 1187541, 1187547, 1192336, 1181698, 1194153, 1189368, 1167471,\n", - " 1157017, 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197896, 1195711, 1199428, 1197719, 1199826, 1199282, 1196199, 1198832,\n", - " 1198844, 1201577, 1201581, 1201582, 1194626, 1201670, 1200650, 1197359,\n", - " 1198633, 1198557, 1194771, 1196631, 1194648, 1195263, 1199135, 1201992,\n", - " 1198095, 1195459, 1195463, 1198306, 1194882, 1195888, 1195895, 1199178,\n", - " 1197831, 1195313, 1198669, 1198958, 1198167, 1196711, 1196717, 1199823,\n", - " 1195148, 1195223, 1195270, 1197136, 1197140, 1195841, 1195847, 1195659,\n", - " 1195541, 1197478, 1195778, 1195626, 1199699, 1195351, 1195353, 1198282,\n", - " 1199329, 1199333, 1196033, 1194941, 1194928, 1199628, 1201636, 1199804,\n", - " 1197676, 1197990, 1202457, 1200079, 1200869, 1200872, 1199024, 1198407,\n", - " 1198404, 1198410, 1199745, 1200060, 1199951, 1196727, 1195773, 1200892,\n", - " 1198428, 1199418, 1201534, 1201543, 1201547, 1199085, 1201827, 1200570,\n", - " 1198066, 1198593, 1199445, 1201156, 1200991, 1201056, 1200918, 1194805,\n", - " 1200363, 1200526, 1202047, 1200546, 1200555, 1200429, 1197097, 1196779,\n", - " 1196256, 1202239, 1200899, 1202338, 1202175, 1202666, 1195884, 1201291,\n", - " 1203329, 1203336, 1196966, 1200784, 1195438, 1195664, 1200445, 1198929,\n", - " 1198932, 1195421, 1197822, 1197821, 1196412, 1195285, 1198587, 1198146,\n", - " 1199395, 1200014, 1199786, 1195070, 1195066, 1203300], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197896, 1195711, 1199428, 1197719, 1199826, 1199282, 1196199, 1198832,\n", - " 1198844, 1201577, 1201581, 1201582, 1194626, 1201670, 1200650, 1197359,\n", - " 1198633, 1198557, 1194771, 1196631, 1194648, 1195263, 1199135, 1201992,\n", - " 1198095, 1195459, 1195463, 1198306, 1194882, 1195888, 1195895, 1199178,\n", - " 1197831, 1195313, 1198669, 1198958, 1198167, 1196711, 1196717, 1199823,\n", - " 1195148, 1195223, 1195270, 1197136, 1197140, 1195841, 1195847, 1195659,\n", - " 1195541, 1197478, 1195778, 1195626, 1199699, 1195351, 1195353, 1198282,\n", - " 1199329, 1199333, 1196033, 1194941, 1194928, 1199628, 1201636, 1199804,\n", - " 1197676, 1197990, 1202457, 1200079, 1200869, 1200872, 1199024, 1198407,\n", - " 1198404, 1198410, 1199745, 1200060, 1199951, 1196727, 1195773, 1200892,\n", - " 1198428, 1199418, 1201534, 1201543, 1201547, 1199085, 1201827, 1200570,\n", - " 1198066, 1198593, 1199445, 1201156, 1200991, 1201056, 1200918, 1194805,\n", - " 1200363, 1200526, 1202047, 1200546, 1200555, 1200429, 1197097, 1196779,\n", - " 1196256, 1202239, 1200899, 1202338, 1202175, 1202666, 1195884, 1201291,\n", - " 1203329, 1203336, 1196966, 1200784, 1195438, 1195664, 1200445, 1198929,\n", - " 1198932, 1195421, 1197822, 1197821, 1196412, 1195285, 1198587, 1198146,\n", - " 1199395, 1200014, 1199786, 1195070, 1195066, 1203300], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 8.6966e-02, 1.1794e-02, 6.5110e-01, ..., 1.8272e-01,\n", - " -2.2560e-03, -4.1566e-03],\n", - " [ 1.2078e-01, 5.2775e-02, 6.9783e-01, ..., 1.3886e-01,\n", - " -1.5372e-03, -4.4556e-03],\n", - " [ 2.0049e-01, 1.8297e-02, 8.3657e-01, ..., 1.3334e-01,\n", - " -1.8704e-03, -5.4758e-03],\n", - " ...,\n", - " [ 2.1187e-01, -8.6521e-05, 8.8213e-01, ..., 1.4126e-01,\n", - " -2.1025e-03, -5.7393e-03],\n", - " [ 1.1666e-01, 1.1110e-03, 6.3724e-01, ..., 1.5393e-01,\n", - " -2.1578e-03, -4.2566e-03],\n", - " [ 1.5614e-01, 7.7998e-02, 5.7583e-01, ..., 1.2294e-01,\n", - " -1.3210e-03, -4.0125e-03]], device='cuda:0'), 'paper': tensor([[ 6.4877e-01, -1.4293e-03, 1.6705e+00, ..., -5.8960e-03,\n", - " -1.2995e-02, -3.0628e-03],\n", - " [ 1.8938e+00, -4.2653e-03, 2.4242e+00, ..., -3.4183e-03,\n", - " -2.4204e-02, 1.0370e+00],\n", - " [ 7.6431e-01, -3.0347e-03, 1.0529e+00, ..., -6.8296e-03,\n", - " -1.0928e-02, -1.1681e-03],\n", - " ...,\n", - " [ 1.9482e-01, -1.6460e-03, 1.8181e+00, ..., -3.3647e-03,\n", - " -1.0041e-02, -5.6042e-03],\n", - " [ 3.1387e-01, -1.1011e-02, 1.9883e+00, ..., -5.0350e-03,\n", - " -1.2743e-02, -5.8320e-03],\n", - " [ 2.1376e+00, -1.1695e-02, 2.2456e+00, ..., 1.4574e-01,\n", - " -3.7183e-02, 2.8214e+00]], device='cuda:0'), 'author': tensor([[-2.7702e-03, 1.7765e-01, 3.4866e-01, ..., 1.0099e+00,\n", - " -2.9386e-03, -2.0652e-03],\n", - " [-6.8971e-04, 2.3554e-02, 1.5061e-01, ..., 1.4001e-01,\n", - " -2.4980e-04, -8.0816e-04],\n", - " [-1.4102e-03, 1.0354e-01, 3.0471e-01, ..., 1.5205e+00,\n", - " -3.2635e-04, 9.7246e-02],\n", - " ...,\n", - " [-2.0829e-03, 1.8619e-01, 3.2820e-01, ..., 1.1042e+00,\n", - " -5.1238e-03, -4.0409e-03],\n", - " [-1.8448e-03, 1.7924e-01, 2.9858e-01, ..., 1.4428e+00,\n", - " -1.0567e-03, 6.3576e-02],\n", - " [-1.6425e-03, 1.5750e-01, 2.1603e-01, ..., 1.4098e+00,\n", - " -1.1824e-03, 7.5567e-02]], device='cuda:0'), 'field_of_study': tensor([[ 3.3017e-03, 4.9577e-01, 3.9992e-01, ..., -7.2606e-03,\n", - " 1.4403e-01, 3.0333e-01],\n", - " [-1.3635e-03, 3.5997e-01, 7.6264e-02, ..., -7.5339e-03,\n", - " 2.3340e-01, 2.4932e-01],\n", - " [-6.0098e-04, 3.8762e-01, 1.6948e-01, ..., -6.5376e-03,\n", - " 1.7799e-01, 2.0086e-01],\n", - " ...,\n", - " [-7.3773e-04, 4.3582e-01, 2.0807e-01, ..., -6.4436e-03,\n", - " 2.4831e-01, 1.6075e-01],\n", - " [-7.0573e-04, 3.5462e-01, 9.3134e-02, ..., -7.1740e-03,\n", - " 1.6040e-01, 1.7699e-01],\n", - " [ 1.7106e-02, 5.5968e-01, 2.6052e-01, ..., -5.2974e-03,\n", - " 2.6802e-01, -4.5318e-04]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 158, 27, 60, 20, 80, 36, 9, 6, 16, 16, 16, 98,\n", - " 139, 27, 27, 27, 236, 262, 459, 950, 407, 407, 407, 472,\n", - " 539, 546, 551, 690, 565, 565, 713, 816, 816, 877, 997, 997,\n", - " 997, 997, 1091, 796, 878, 1039, 1057, 933, 881, 881, 1240, 1377,\n", - " 1257, 1201, 1231, 1209, 1209, 1444, 1254, 1483, 1417, 1450, 1305, 1230,\n", - " 1230, 1468, 1239, 1239, 1239, 1417, 1417, 1511, 1458, 1411, 1411, 1411,\n", - " 1411, 1445, 1467, 1631, 1683, 1683, 1494, 1683, 1683, 1494, 1494, 1624,\n", - " 1624, 1705, 1683, 1683, 1683, 2160, 1755, 1767, 2014, 2014, 1982, 1982,\n", - " 1919, 1919, 1919, 1793, 1886, 1850, 1850, 2083, 2108, 2035, 2260, 2260,\n", - " 2260, 2308, 2429, 2397, 2473, 2463, 2675, 2861, 2683, 2786, 2786, 2781,\n", - " 2781, 2882, 2816, 2990, 2990, 3065, 3063, 3138, 3187, 3318, 3318, 3234,\n", - " 3234, 3234, 3234, 3234, 3234, 3234, 3234, 3234, 3234, 3130, 3261, 3258,\n", - " 3258, 3310, 3310, 3469, 3117, 3405, 3405, 3335, 3330, 3390, 3336, 3416,\n", - " 3527, 3805, 3464, 3537, 3884, 3629, 3629, 3629, 3629, 3602, 4006, 3907,\n", - " 4030, 3926, 4049, 4133, 4102, 4151, 4172, 4307, 4363, 4488, 4327, 4444,\n", - " 4708, 4590, 4590, 4590, 4590, 4590, 4456, 4456, 4621, 4621, 4588, 4588,\n", - " 4588, 4588, 4806, 4743, 4772, 5031, 5012, 4933, 5070, 5057, 5220, 5314,\n", - " 5359, 5674, 5650, 5746, 5719, 5631, 6117, 5983, 6127, 5982, 5893, 5893,\n", - " 6113, 6132, 6132, 6059, 5989, 5989, 5977],\n", - " [ 53, 7, 66, 75, 104, 33, 93, 16, 29, 44, 127, 6,\n", - " 113, 69, 81, 10, 59, 94, 86, 105, 124, 18, 105, 61,\n", - " 20, 103, 31, 86, 4, 56, 61, 18, 105, 20, 48, 30,\n", - " 67, 17, 90, 122, 125, 33, 77, 115, 18, 105, 85, 78,\n", - " 105, 86, 86, 42, 19, 75, 76, 86, 54, 132, 77, 114,\n", - " 94, 62, 74, 94, 83, 94, 120, 21, 17, 133, 22, 109,\n", - " 37, 76, 12, 21, 55, 126, 23, 29, 77, 103, 91, 9,\n", - " 111, 94, 99, 9, 118, 116, 54, 50, 27, 57, 80, 97,\n", - " 21, 3, 127, 21, 79, 114, 94, 132, 46, 107, 36, 94,\n", - " 114, 24, 89, 116, 29, 62, 40, 64, 5, 84, 111, 63,\n", - " 87, 86, 73, 13, 59, 77, 58, 29, 35, 116, 72, 106,\n", - " 17, 23, 38, 118, 91, 26, 28, 101, 120, 50, 21, 28,\n", - " 11, 2, 25, 88, 8, 110, 121, 20, 60, 77, 31, 96,\n", - " 122, 43, 95, 45, 77, 44, 8, 102, 71, 51, 68, 98,\n", - " 79, 75, 132, 61, 17, 33, 70, 100, 128, 65, 52, 47,\n", - " 61, 49, 92, 55, 77, 99, 108, 89, 45, 61, 29, 32,\n", - " 69, 117, 1, 23, 39, 128, 8, 41, 14, 19, 86, 129,\n", - " 112, 34, 77, 131, 23, 130, 3, 0, 60, 15, 119, 77,\n", - " 77, 123, 3, 82, 48, 96, 77]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1322, 743, 2801, ..., 6545, 6634, 413],\n", - " [ 83, 241, 141, ..., 6623, 6623, 6567]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 88, 128, 75, ..., 132, 80, 29],\n", - " [ 34, 31, 5, ..., 6163, 6107, 6041]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 265, 265, 265, ..., 6634, 6634, 6634],\n", - " [ 553, 837, 828, ..., 276, 76, 229]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 188, 435, 147, ..., 787, 60, 821],\n", - " [ 278, 83, 56, ..., 6662, 6621, 6601]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4000, 3059, 5977, ..., 2939, 5890, 5552],\n", - " [ 26, 42, 33, ..., 6073, 6044, 6102]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 265, 265, 265, ..., 6634, 6634, 6634],\n", - " [2231, 2624, 3059, ..., 1199, 1769, 839]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 9, 6, 6, ..., 5989, 5989, 5989],\n", - " [4581, 5852, 6003, ..., 3749, 3314, 3730]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.004252\n", - "sampling 0.0041\n", - "noi time: 0.000688\n", - "get_vertex_data call: 0.037295\n", - "noi group time: 0.002902\n", - "eoi_group_time: 0.011569\n", - "second half: 0.221822\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 1334, 14490, 31145, ..., 1100728, 1119052, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 1334, 14490, 31145, ..., 1100728, 1119052, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1211565, 1231438, 1221045, ..., 1931107, 1930681, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1211565, 1231438, 1221045, ..., 1931107, 1930681, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1141424, 1141439, ..., 1187566, 1157022, 1161937],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1141424, 1141439, ..., 1187566, 1157022, 1161937],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195203, 1195406, 1198242, 1197719, 1199282, 1202255, 1198844, 1201577,\n", - " 1201582, 1201465, 1203047, 1197359, 1198690, 1198694, 1202804, 1202812,\n", - " 1197512, 1197514, 1194866, 1194782, 1196631, 1196588, 1197434, 1195512,\n", - " 1195263, 1199135, 1196529, 1196534, 1201992, 1196031, 1198542, 1198543,\n", - " 1197701, 1194958, 1195895, 1199172, 1195740, 1194754, 1194759, 1198989,\n", - " 1198643, 1199823, 1195265, 1195278, 1196247, 1197273, 1196109, 1194859,\n", - " 1195847, 1195850, 1198915, 1195541, 1199315, 1197474, 1197199, 1200032,\n", - " 1195918, 1196393, 1196283, 1198280, 1199059, 1199191, 1198673, 1195119,\n", - " 1197577, 1199628, 1197676, 1200872, 1200878, 1199152, 1199154, 1198406,\n", - " 1198410, 1199231, 1195020, 1200116, 1194795, 1199949, 1201511, 1196496,\n", - " 1196501, 1200668, 1197601, 1196727, 1195773, 1202618, 1200887, 1200025,\n", - " 1199418, 1199421, 1199555, 1201169, 1199445, 1201212, 1201156, 1202632,\n", - " 1200913, 1202640, 1203350, 1201691, 1201729, 1200553, 1203219, 1199904,\n", - " 1200899, 1197546, 1202706, 1201552, 1195876, 1201291, 1198478, 1203329,\n", - " 1201590, 1199929, 1202695, 1198562, 1196960, 1196975, 1200784, 1195048,\n", - " 1196816, 1195679, 1200478, 1202432, 1200445, 1197334, 1198911, 1197816,\n", - " 1198127, 1198973, 1199659, 1196375, 1203102, 1194732, 1198824, 1197735,\n", - " 1199784, 1198819, 1200974, 1197335, 1197343, 1195082, 1197035, 1203162],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195203, 1195406, 1198242, 1197719, 1199282, 1202255, 1198844, 1201577,\n", - " 1201582, 1201465, 1203047, 1197359, 1198690, 1198694, 1202804, 1202812,\n", - " 1197512, 1197514, 1194866, 1194782, 1196631, 1196588, 1197434, 1195512,\n", - " 1195263, 1199135, 1196529, 1196534, 1201992, 1196031, 1198542, 1198543,\n", - " 1197701, 1194958, 1195895, 1199172, 1195740, 1194754, 1194759, 1198989,\n", - " 1198643, 1199823, 1195265, 1195278, 1196247, 1197273, 1196109, 1194859,\n", - " 1195847, 1195850, 1198915, 1195541, 1199315, 1197474, 1197199, 1200032,\n", - " 1195918, 1196393, 1196283, 1198280, 1199059, 1199191, 1198673, 1195119,\n", - " 1197577, 1199628, 1197676, 1200872, 1200878, 1199152, 1199154, 1198406,\n", - " 1198410, 1199231, 1195020, 1200116, 1194795, 1199949, 1201511, 1196496,\n", - " 1196501, 1200668, 1197601, 1196727, 1195773, 1202618, 1200887, 1200025,\n", - " 1199418, 1199421, 1199555, 1201169, 1199445, 1201212, 1201156, 1202632,\n", - " 1200913, 1202640, 1203350, 1201691, 1201729, 1200553, 1203219, 1199904,\n", - " 1200899, 1197546, 1202706, 1201552, 1195876, 1201291, 1198478, 1203329,\n", - " 1201590, 1199929, 1202695, 1198562, 1196960, 1196975, 1200784, 1195048,\n", - " 1196816, 1195679, 1200478, 1202432, 1200445, 1197334, 1198911, 1197816,\n", - " 1198127, 1198973, 1199659, 1196375, 1203102, 1194732, 1198824, 1197735,\n", - " 1199784, 1198819, 1200974, 1197335, 1197343, 1195082, 1197035, 1203162],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 7.9992e-02, 3.3468e-02, 6.1555e-01, ..., 1.6399e-01,\n", - " -2.0716e-03, -3.9140e-03],\n", - " [ 1.6912e-01, 9.2836e-03, 7.5848e-01, ..., 1.1683e-01,\n", - " -1.7903e-03, -5.1396e-03],\n", - " [ 1.7967e-01, 1.9355e-02, 7.8534e-01, ..., 1.2731e-01,\n", - " -1.8395e-03, -5.2436e-03],\n", - " ...,\n", - " [ 2.0781e-01, -4.6462e-05, 8.3837e-01, ..., 1.1915e-01,\n", - " -1.7892e-03, -5.7203e-03],\n", - " [ 8.2026e-02, 4.0395e-02, 6.2940e-01, ..., 1.4449e-01,\n", - " -2.0254e-03, -3.9676e-03],\n", - " [ 1.1217e-01, 1.0264e-01, 5.6684e-01, ..., 1.4528e-01,\n", - " -1.6072e-03, -3.5787e-03]], device='cuda:0'), 'paper': tensor([[ 9.6047e-01, -5.7902e-03, 9.1198e-01, ..., -7.5122e-03,\n", - " -1.3173e-02, 2.6909e-01],\n", - " [ 7.8797e-01, -1.5676e-02, 1.7387e+00, ..., -1.0283e-02,\n", - " -1.8570e-02, -1.6198e-03],\n", - " [ 2.6260e-01, -9.5096e-03, 1.9205e+00, ..., -5.3558e-03,\n", - " -1.1560e-02, -7.4784e-03],\n", - " ...,\n", - " [ 6.7790e-01, -9.8694e-04, 1.8235e+00, ..., -4.7847e-03,\n", - " -1.2973e-02, -4.4677e-03],\n", - " [ 7.6643e-01, -1.0730e-02, 1.4156e+00, ..., -7.9422e-03,\n", - " -1.5690e-02, -1.9722e-03],\n", - " [ 2.1191e+00, -1.1681e-02, 2.2300e+00, ..., 1.3248e-01,\n", - " -3.7063e-02, 2.7793e+00]], device='cuda:0'), 'author': tensor([[-3.3439e-03, 1.6955e-01, 3.4537e-01, ..., 1.2084e+00,\n", - " -3.9490e-03, -2.7002e-03],\n", - " [-3.7711e-03, 1.4936e-01, 3.5290e-01, ..., 1.5097e+00,\n", - " -2.3619e-03, -2.1681e-03],\n", - " [-1.5174e-03, 1.1100e-01, 2.0716e-01, ..., 1.3970e+00,\n", - " -5.6502e-04, 6.7384e-02],\n", - " ...,\n", - " [-1.6586e-03, 1.3851e-01, 2.0814e-01, ..., 1.3549e+00,\n", - " -1.2521e-03, 8.5175e-02],\n", - " [-2.7035e-03, 1.4833e-01, 3.6471e-01, ..., 1.2535e+00,\n", - " -4.7393e-03, -2.4553e-03],\n", - " [-1.2296e-03, 1.1985e-01, 2.3510e-01, ..., 1.4611e+00,\n", - " -9.8642e-04, 1.1508e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0007, 0.4513, 0.2683, ..., -0.0061, 0.1507, 0.2071],\n", - " [-0.0010, 0.3454, 0.1198, ..., -0.0059, 0.1419, 0.1745],\n", - " [-0.0008, 0.3434, 0.1794, ..., -0.0073, 0.2153, 0.2258],\n", - " ...,\n", - " [-0.0011, 0.4695, 0.2997, ..., -0.0071, 0.1597, 0.2453],\n", - " [ 0.0421, 0.4867, 0.3211, ..., -0.0045, 0.1174, 0.0333],\n", - " [-0.0013, 0.3542, 0.2679, ..., -0.0056, 0.0875, 0.1823]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 16, 44, 48, 185, 125, 190, 190, 449, 325, 471, 405, 516,\n", - " 327, 298, 298, 298, 340, 340, 256, 342, 294, 294, 511, 511,\n", - " 552, 552, 910, 533, 270, 546, 835, 638, 716, 716, 707, 1042,\n", - " 1042, 796, 874, 874, 874, 1083, 1156, 1126, 1282, 934, 934, 1054,\n", - " 1073, 1354, 1210, 1354, 1478, 1486, 1420, 1363, 1480, 1480, 1480, 1474,\n", - " 1549, 1486, 1486, 1576, 1464, 1511, 1511, 1511, 1511, 1646, 1848, 1793,\n", - " 1961, 1842, 1842, 1842, 1985, 2005, 2005, 2069, 1938, 2104, 2001, 2131,\n", - " 2176, 2176, 2183, 2148, 2246, 2243, 2088, 2088, 2088, 2188, 2188, 2321,\n", - " 2323, 2304, 2435, 2435, 2435, 2469, 2413, 2360, 2482, 2662, 2662, 2872,\n", - " 2586, 2586, 2505, 2505, 2505, 2798, 2692, 2681, 2933, 3023, 3023, 3023,\n", - " 3020, 2931, 3175, 3248, 3298, 3298, 3298, 3371, 3371, 3371, 3371, 3352,\n", - " 3536, 3414, 3582, 3554, 3597, 3727, 3754, 3738, 3934, 3868, 3868, 3958,\n", - " 4004, 3911, 3983, 3983, 3911, 3911, 3912, 4114, 4114, 4064, 4064, 3961,\n", - " 4121, 4121, 4120, 4121, 4147, 4534, 4534, 4327, 4266, 4266, 4266, 4316,\n", - " 4296, 4296, 4561, 4631, 4729, 4729, 4622, 4653, 4653, 5124, 5124, 5124,\n", - " 5063, 5063, 4733, 4733, 4915, 5191, 5158, 5315, 5163, 5246, 5246, 5081,\n", - " 5081, 5345, 5325, 5475, 5233, 5434, 5335, 5335, 5523, 5524, 5555, 5645,\n", - " 5645, 5645, 5658, 5658, 5661, 5725, 5725],\n", - " [ 54, 122, 91, 134, 134, 100, 62, 21, 123, 90, 54, 6,\n", - " 37, 34, 44, 96, 38, 83, 26, 74, 118, 59, 78, 28,\n", - " 111, 92, 93, 67, 92, 32, 103, 113, 63, 28, 26, 68,\n", - " 114, 83, 27, 128, 66, 19, 112, 143, 95, 73, 82, 97,\n", - " 8, 41, 117, 137, 29, 0, 68, 17, 82, 73, 134, 121,\n", - " 79, 107, 79, 87, 33, 140, 82, 98, 111, 142, 120, 131,\n", - " 109, 133, 10, 102, 83, 27, 128, 131, 69, 84, 37, 2,\n", - " 43, 17, 26, 126, 120, 20, 25, 121, 49, 86, 53, 61,\n", - " 133, 101, 12, 81, 126, 55, 72, 61, 24, 127, 109, 40,\n", - " 124, 30, 20, 111, 85, 53, 76, 15, 99, 48, 106, 75,\n", - " 61, 61, 45, 58, 22, 28, 127, 129, 4, 111, 46, 142,\n", - " 34, 30, 115, 118, 123, 131, 10, 24, 39, 64, 54, 71,\n", - " 121, 9, 108, 127, 136, 119, 23, 135, 38, 82, 105, 18,\n", - " 25, 35, 131, 31, 7, 13, 36, 130, 7, 110, 70, 5,\n", - " 125, 30, 11, 132, 139, 3, 34, 56, 126, 88, 65, 78,\n", - " 60, 78, 46, 80, 120, 138, 42, 83, 47, 83, 104, 83,\n", - " 51, 35, 14, 4, 57, 83, 77, 116, 89, 16, 141, 69,\n", - " 83, 50, 83, 94, 52, 83, 1]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1647, 4624, 4518, ..., 3089, 6885, 3722],\n", - " [ 78, 25, 107, ..., 8173, 8223, 8211]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 133, 28, 62, ..., 38, 29, 83],\n", - " [ 157, 151, 7, ..., 5697, 5707, 5713]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 94, 94, 94, ..., 8142, 8142, 8142],\n", - " [ 352, 648, 1014, ..., 684, 352, 261]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 562, 437, 781, ..., 989, 273, 985],\n", - " [ 267, 118, 348, ..., 8112, 8270, 8260]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4786, 446, 458, ..., 6550, 3120, 768],\n", - " [ 15, 0, 0, ..., 5660, 5635, 5698]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 94, 70, 70, ..., 8142, 8142, 8142],\n", - " [1553, 4342, 4695, ..., 2948, 2402, 5923]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 16, 16, 16, ..., 5661, 5661, 5661],\n", - " [2099, 2133, 3209, ..., 6545, 6839, 6345]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.004694\n", - "sampling 0.004613\n", - "noi time: 0.000715\n", - "get_vertex_data call: 0.014157\n", - "noi group time: 0.001779\n", - "eoi_group_time: 0.010947\n", - "second half: 0.128429\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 27905, 19149, ..., 1125898, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 27905, 19149, ..., 1125898, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208545, 1231438, 1228162, ..., 1938426, 1933651, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208545, 1231438, 1228162, ..., 1938426, 1933651, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1141424, 1136349, 1135160, 1135726, 1137506, 1138335, 1141443,\n", - " 1139811, 1137271, 1143362, 1143372, 1146640, 1148976, 1150497, 1150503,\n", - " 1150509, 1148576, 1149216, 1149228, 1155689, 1155692, 1147483, 1135992,\n", - " 1135998, 1144636, 1144625, 1146992, 1146660, 1136747, 1147094, 1147211,\n", - " 1152427, 1134710, 1140313, 1140537, 1140540, 1138112, 1138126, 1149467,\n", - " 1138366, 1153456, 1140020, 1135367, 1135202, 1135204, 1154739, 1141029,\n", - " 1136777, 1134794, 1138504, 1137693, 1136609, 1144395, 1157399, 1157393,\n", - " 1136662, 1137441, 1143317, 1136930, 1135278, 1156159, 1141702, 1135579,\n", - " 1141086, 1135668, 1140972, 1138514, 1138524, 1137959, 1135493, 1137019,\n", - " 1156899, 1135522, 1139685, 1138305, 1157706, 1138440, 1138461, 1136594,\n", - " 1158390, 1149328, 1135088, 1138695, 1138881, 1156603, 1156606, 1147112,\n", - " 1135346, 1135355, 1148533, 1150953, 1137109, 1141533, 1139674, 1138067,\n", - " 1138073, 1134992, 1134770, 1140199, 1139318, 1153539, 1153543, 1139929,\n", - " 1141963, 1153404, 1155648, 1155654, 1146078, 1141985, 1137734, 1137728,\n", - " 1134922, 1135549, 1139898, 1145346, 1141980, 1143767, 1143775, 1154855,\n", - " 1143711, 1143221, 1139025, 1149979, 1141690, 1141111, 1141224, 1163301,\n", - " 1136917, 1143669, 1145056, 1144230, 1141785, 1139495, 1134979, 1147850,\n", - " 1137074, 1148067, 1144426, 1142050, 1141821, 1142093, 1138469, 1138478,\n", - " 1141479, 1138708, 1142913, 1138424, 1144596, 1136867, 1136864, 1140881,\n", - " 1141398, 1140442, 1144182, 1150906, 1144865, 1158703, 1138529, 1137854,\n", - " 1147153, 1149186, 1141365, 1151112, 1149101, 1139014, 1153554, 1141332,\n", - " 1139508, 1139127, 1140616, 1139171, 1140976, 1140990, 1147050, 1145885,\n", - " 1143543, 1152976, 1152980, 1142555, 1139453, 1141925, 1144242, 1145339,\n", - " 1165366, 1150700, 1148306, 1160357, 1145983, 1145974, 1146024, 1146141,\n", - " 1141235, 1139990, 1143293, 1143283, 1143294, 1150416, 1147541, 1147543,\n", - " 1147540, 1147150, 1148763, 1147282, 1147290, 1143663, 1149365, 1139418,\n", - " 1146088, 1146080, 1143051, 1157720, 1136836, 1146099, 1141283, 1139328,\n", - " 1150183, 1150188, 1143345, 1145808, 1145816, 1140836, 1138597, 1150294,\n", - " 1146514, 1143957, 1138024, 1143457, 1140483, 1140364, 1137990, 1137994,\n", - " 1143082, 1166410, 1148965, 1144219, 1147999, 1134902, 1139252, 1145457,\n", - " 1148704, 1148719, 1141825, 1141836, 1146742, 1148473, 1153701, 1147256,\n", - " 1147249, 1147970, 1145021, 1145009, 1158226, 1143921, 1149867, 1154526,\n", - " 1145240, 1138630, 1146178, 1148223, 1152541, 1150445, 1149250, 1148822,\n", - " 1144524, 1144526, 1141346, 1145834, 1152013, 1151994, 1165252, 1147807,\n", - " 1151482, 1152024, 1151041, 1145255, 1145256, 1146723, 1140562, 1148279,\n", - " 1147021, 1135805, 1141949, 1146772, 1147774, 1153574, 1143553, 1149412,\n", - " 1148293, 1152067, 1154420, 1158786, 1152561, 1152441, 1148731, 1148729,\n", - " 1146549, 1150053, 1151943, 1166311, 1148204, 1169363, 1154203, 1154168,\n", - " 1153124, 1153192, 1153193, 1153188, 1168631, 1150935, 1148056, 1144863,\n", - " 1143133, 1141017, 1151821, 1151906, 1154190, 1145640, 1148498, 1156894,\n", - " 1146565, 1141420, 1152784, 1150888, 1146623, 1146284, 1153038, 1150085,\n", - " 1137746, 1146307, 1152622, 1157107, 1157842, 1157843, 1157826, 1139570,\n", - " 1151617, 1150578, 1150586, 1152950, 1152958, 1145925, 1138982, 1152341,\n", - " 1136028, 1158704, 1152928, 1152931, 1142777, 1150156, 1153688, 1148040,\n", - " 1149300, 1152601, 1149794, 1148628, 1158530, 1137458, 1149944, 1154569,\n", - " 1152384, 1155422, 1145184, 1151257, 1150475, 1146852, 1135231, 1152183,\n", - " 1157905, 1150828, 1174399, 1147810, 1143010, 1158308, 1158311, 1158315,\n", - " 1140421, 1155441, 1155512, 1153359, 1150132, 1162112, 1144361, 1154529,\n", - " 1154530, 1145610, 1142755, 1142764, 1151379, 1155122, 1152527, 1157183,\n", - " 1149321, 1151432, 1151424, 1135396, 1156460, 1156463, 1157893, 1157894,\n", - " 1158484, 1154555, 1158823, 1158824, 1148836, 1143254, 1161803, 1154250,\n", - " 1154240, 1154080, 1137359, 1154909, 1160907, 1150371, 1159629, 1157928,\n", - " 1137152, 1158584, 1159116, 1135601, 1135602, 1178445, 1148149, 1148159,\n", - " 1150661, 1150671, 1155852, 1157685, 1159258, 1140627, 1140632, 1144448,\n", - " 1152498, 1140381, 1159131, 1163683, 1144843, 1155975, 1156812, 1154592,\n", - " 1161368, 1136896, 1158753, 1158760, 1158815, 1156778, 1136480, 1136487,\n", - " 1156490, 1136646, 1145479, 1140049, 1166421, 1147781, 1158558, 1151143,\n", - " 1161167, 1162021, 1158006, 1161539, 1165853, 1183448, 1164272, 1157751,\n", - " 1162683, 1159042, 1172279, 1159146, 1151073, 1158303, 1157944, 1162044,\n", - " 1153052, 1153045, 1167181, 1156235, 1142865, 1138393, 1142687, 1150046,\n", - " 1149063, 1153514, 1158672, 1138161, 1164006, 1164014, 1156787, 1161761,\n", - " 1149953, 1154590, 1146063, 1164423, 1164055, 1158868, 1140641, 1140643,\n", - " 1148600, 1155816, 1156363, 1158643, 1165872, 1165877, 1162607, 1143735,\n", - " 1155588, 1158415, 1146500, 1161240, 1144747, 1152776, 1166881, 1165415,\n", - " 1161724, 1141471, 1151650, 1147426, 1147427, 1156739, 1171040, 1168741,\n", - " 1144810, 1144812, 1165721, 1164741, 1142733, 1156293, 1145743, 1166924,\n", - " 1145567, 1145228, 1170771, 1166462, 1138950, 1160730, 1147689, 1152639,\n", - " 1152624, 1152626, 1148121, 1147719, 1147723, 1145902, 1152203, 1158723,\n", - " 1158722, 1166661, 1147338, 1145674, 1145664, 1150781, 1179488, 1167817,\n", - " 1144681, 1156308, 1166653, 1155180, 1150518, 1156119, 1144336, 1138376,\n", - " 1154656, 1142352, 1171414, 1141043, 1169359, 1138609, 1149684, 1158611,\n", - " 1173047, 1172759, 1149847, 1152353, 1148667, 1172838, 1148335, 1148325,\n", - " 1171560, 1165907, 1173307, 1145039, 1154027, 1153754, 1167857, 1169581,\n", - " 1151201, 1157153, 1157373, 1147711, 1151850, 1148131, 1147934, 1157593,\n", - " 1169037, 1172961, 1171293, 1170688, 1163027, 1166682, 1154148, 1167517,\n", - " 1149169, 1180593, 1186117, 1170373, 1167658, 1153803, 1181759, 1161255,\n", - " 1155262, 1180151, 1177892, 1171623, 1163568, 1158253, 1180702, 1164563,\n", - " 1178214, 1145626, 1161067, 1161068, 1149753, 1146252, 1192271, 1158934,\n", - " 1158940, 1186496, 1155890, 1155892, 1155895, 1177094, 1160383, 1183002,\n", - " 1183004, 1140393, 1171633, 1182337, 1181340, 1154944, 1146161, 1147179,\n", - " 1141507, 1167670, 1186334, 1139828, 1139831, 1150265, 1154806, 1149673,\n", - " 1182024, 1188618, 1156055, 1170010, 1146386, 1173058, 1149544, 1185008,\n", - " 1194476, 1171669, 1151774, 1152115, 1184867, 1169703, 1169707, 1166838,\n", - " 1171201, 1167089, 1172424, 1158064, 1166785, 1180540, 1178662, 1179769,\n", - " 1182178, 1190599, 1191140, 1194576], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1141424, 1136349, 1135160, 1135726, 1137506, 1138335, 1141443,\n", - " 1139811, 1137271, 1143362, 1143372, 1146640, 1148976, 1150497, 1150503,\n", - " 1150509, 1148576, 1149216, 1149228, 1155689, 1155692, 1147483, 1135992,\n", - " 1135998, 1144636, 1144625, 1146992, 1146660, 1136747, 1147094, 1147211,\n", - " 1152427, 1134710, 1140313, 1140537, 1140540, 1138112, 1138126, 1149467,\n", - " 1138366, 1153456, 1140020, 1135367, 1135202, 1135204, 1154739, 1141029,\n", - " 1136777, 1134794, 1138504, 1137693, 1136609, 1144395, 1157399, 1157393,\n", - " 1136662, 1137441, 1143317, 1136930, 1135278, 1156159, 1141702, 1135579,\n", - " 1141086, 1135668, 1140972, 1138514, 1138524, 1137959, 1135493, 1137019,\n", - " 1156899, 1135522, 1139685, 1138305, 1157706, 1138440, 1138461, 1136594,\n", - " 1158390, 1149328, 1135088, 1138695, 1138881, 1156603, 1156606, 1147112,\n", - " 1135346, 1135355, 1148533, 1150953, 1137109, 1141533, 1139674, 1138067,\n", - " 1138073, 1134992, 1134770, 1140199, 1139318, 1153539, 1153543, 1139929,\n", - " 1141963, 1153404, 1155648, 1155654, 1146078, 1141985, 1137734, 1137728,\n", - " 1134922, 1135549, 1139898, 1145346, 1141980, 1143767, 1143775, 1154855,\n", - " 1143711, 1143221, 1139025, 1149979, 1141690, 1141111, 1141224, 1163301,\n", - " 1136917, 1143669, 1145056, 1144230, 1141785, 1139495, 1134979, 1147850,\n", - " 1137074, 1148067, 1144426, 1142050, 1141821, 1142093, 1138469, 1138478,\n", - " 1141479, 1138708, 1142913, 1138424, 1144596, 1136867, 1136864, 1140881,\n", - " 1141398, 1140442, 1144182, 1150906, 1144865, 1158703, 1138529, 1137854,\n", - " 1147153, 1149186, 1141365, 1151112, 1149101, 1139014, 1153554, 1141332,\n", - " 1139508, 1139127, 1140616, 1139171, 1140976, 1140990, 1147050, 1145885,\n", - " 1143543, 1152976, 1152980, 1142555, 1139453, 1141925, 1144242, 1145339,\n", - " 1165366, 1150700, 1148306, 1160357, 1145983, 1145974, 1146024, 1146141,\n", - " 1141235, 1139990, 1143293, 1143283, 1143294, 1150416, 1147541, 1147543,\n", - " 1147540, 1147150, 1148763, 1147282, 1147290, 1143663, 1149365, 1139418,\n", - " 1146088, 1146080, 1143051, 1157720, 1136836, 1146099, 1141283, 1139328,\n", - " 1150183, 1150188, 1143345, 1145808, 1145816, 1140836, 1138597, 1150294,\n", - " 1146514, 1143957, 1138024, 1143457, 1140483, 1140364, 1137990, 1137994,\n", - " 1143082, 1166410, 1148965, 1144219, 1147999, 1134902, 1139252, 1145457,\n", - " 1148704, 1148719, 1141825, 1141836, 1146742, 1148473, 1153701, 1147256,\n", - " 1147249, 1147970, 1145021, 1145009, 1158226, 1143921, 1149867, 1154526,\n", - " 1145240, 1138630, 1146178, 1148223, 1152541, 1150445, 1149250, 1148822,\n", - " 1144524, 1144526, 1141346, 1145834, 1152013, 1151994, 1165252, 1147807,\n", - " 1151482, 1152024, 1151041, 1145255, 1145256, 1146723, 1140562, 1148279,\n", - " 1147021, 1135805, 1141949, 1146772, 1147774, 1153574, 1143553, 1149412,\n", - " 1148293, 1152067, 1154420, 1158786, 1152561, 1152441, 1148731, 1148729,\n", - " 1146549, 1150053, 1151943, 1166311, 1148204, 1169363, 1154203, 1154168,\n", - " 1153124, 1153192, 1153193, 1153188, 1168631, 1150935, 1148056, 1144863,\n", - " 1143133, 1141017, 1151821, 1151906, 1154190, 1145640, 1148498, 1156894,\n", - " 1146565, 1141420, 1152784, 1150888, 1146623, 1146284, 1153038, 1150085,\n", - " 1137746, 1146307, 1152622, 1157107, 1157842, 1157843, 1157826, 1139570,\n", - " 1151617, 1150578, 1150586, 1152950, 1152958, 1145925, 1138982, 1152341,\n", - " 1136028, 1158704, 1152928, 1152931, 1142777, 1150156, 1153688, 1148040,\n", - " 1149300, 1152601, 1149794, 1148628, 1158530, 1137458, 1149944, 1154569,\n", - " 1152384, 1155422, 1145184, 1151257, 1150475, 1146852, 1135231, 1152183,\n", - " 1157905, 1150828, 1174399, 1147810, 1143010, 1158308, 1158311, 1158315,\n", - " 1140421, 1155441, 1155512, 1153359, 1150132, 1162112, 1144361, 1154529,\n", - " 1154530, 1145610, 1142755, 1142764, 1151379, 1155122, 1152527, 1157183,\n", - " 1149321, 1151432, 1151424, 1135396, 1156460, 1156463, 1157893, 1157894,\n", - " 1158484, 1154555, 1158823, 1158824, 1148836, 1143254, 1161803, 1154250,\n", - " 1154240, 1154080, 1137359, 1154909, 1160907, 1150371, 1159629, 1157928,\n", - " 1137152, 1158584, 1159116, 1135601, 1135602, 1178445, 1148149, 1148159,\n", - " 1150661, 1150671, 1155852, 1157685, 1159258, 1140627, 1140632, 1144448,\n", - " 1152498, 1140381, 1159131, 1163683, 1144843, 1155975, 1156812, 1154592,\n", - " 1161368, 1136896, 1158753, 1158760, 1158815, 1156778, 1136480, 1136487,\n", - " 1156490, 1136646, 1145479, 1140049, 1166421, 1147781, 1158558, 1151143,\n", - " 1161167, 1162021, 1158006, 1161539, 1165853, 1183448, 1164272, 1157751,\n", - " 1162683, 1159042, 1172279, 1159146, 1151073, 1158303, 1157944, 1162044,\n", - " 1153052, 1153045, 1167181, 1156235, 1142865, 1138393, 1142687, 1150046,\n", - " 1149063, 1153514, 1158672, 1138161, 1164006, 1164014, 1156787, 1161761,\n", - " 1149953, 1154590, 1146063, 1164423, 1164055, 1158868, 1140641, 1140643,\n", - " 1148600, 1155816, 1156363, 1158643, 1165872, 1165877, 1162607, 1143735,\n", - " 1155588, 1158415, 1146500, 1161240, 1144747, 1152776, 1166881, 1165415,\n", - " 1161724, 1141471, 1151650, 1147426, 1147427, 1156739, 1171040, 1168741,\n", - " 1144810, 1144812, 1165721, 1164741, 1142733, 1156293, 1145743, 1166924,\n", - " 1145567, 1145228, 1170771, 1166462, 1138950, 1160730, 1147689, 1152639,\n", - " 1152624, 1152626, 1148121, 1147719, 1147723, 1145902, 1152203, 1158723,\n", - " 1158722, 1166661, 1147338, 1145674, 1145664, 1150781, 1179488, 1167817,\n", - " 1144681, 1156308, 1166653, 1155180, 1150518, 1156119, 1144336, 1138376,\n", - " 1154656, 1142352, 1171414, 1141043, 1169359, 1138609, 1149684, 1158611,\n", - " 1173047, 1172759, 1149847, 1152353, 1148667, 1172838, 1148335, 1148325,\n", - " 1171560, 1165907, 1173307, 1145039, 1154027, 1153754, 1167857, 1169581,\n", - " 1151201, 1157153, 1157373, 1147711, 1151850, 1148131, 1147934, 1157593,\n", - " 1169037, 1172961, 1171293, 1170688, 1163027, 1166682, 1154148, 1167517,\n", - " 1149169, 1180593, 1186117, 1170373, 1167658, 1153803, 1181759, 1161255,\n", - " 1155262, 1180151, 1177892, 1171623, 1163568, 1158253, 1180702, 1164563,\n", - " 1178214, 1145626, 1161067, 1161068, 1149753, 1146252, 1192271, 1158934,\n", - " 1158940, 1186496, 1155890, 1155892, 1155895, 1177094, 1160383, 1183002,\n", - " 1183004, 1140393, 1171633, 1182337, 1181340, 1154944, 1146161, 1147179,\n", - " 1141507, 1167670, 1186334, 1139828, 1139831, 1150265, 1154806, 1149673,\n", - " 1182024, 1188618, 1156055, 1170010, 1146386, 1173058, 1149544, 1185008,\n", - " 1194476, 1171669, 1151774, 1152115, 1184867, 1169703, 1169707, 1166838,\n", - " 1171201, 1167089, 1172424, 1158064, 1166785, 1180540, 1178662, 1179769,\n", - " 1182178, 1190599, 1191140, 1194576], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197853, 1198770, 1197719, 1199282, 1198458, 1198459, 1198835,\n", - " 1198844, 1201582, 1194626, 1200643, 1197791, 1199250, 1201016, 1198633,\n", - " 1198694, 1196956, 1202804, 1202287, 1197383, 1194866, 1194867, 1194770,\n", - " 1196624, 1195514, 1195259, 1201992, 1196031, 1196081, 1196088, 1198542,\n", - " 1198543, 1197697, 1199519, 1194952, 1195457, 1195895, 1199171, 1196359,\n", - " 1196977, 1195325, 1196835, 1198668, 1196165, 1198367, 1196231, 1195970,\n", - " 1196705, 1196711, 1195145, 1195221, 1195265, 1195278, 1197136, 1197273,\n", - " 1196109, 1195847, 1195541, 1195545, 1197474, 1196117, 1199984, 1197640,\n", - " 1197191, 1200037, 1202017, 1199699, 1195353, 1199329, 1199060, 1197285,\n", - " 1197291, 1198680, 1199680, 1199628, 1200872, 1200878, 1199154, 1200401,\n", - " 1198410, 1199231, 1201916, 1195008, 1195017, 1199676, 1198763, 1201511,\n", - " 1196508, 1201894, 1201903, 1197601, 1196727, 1202618, 1200894, 1198428,\n", - " 1200018, 1199410, 1201526, 1201824, 1201827, 1200566, 1200172, 1198066,\n", - " 1198593, 1196479, 1198785, 1201421, 1201156, 1199721, 1201691, 1202499,\n", - " 1202503, 1200526, 1200546, 1200553, 1200555, 1200429, 1197097, 1202541,\n", - " 1202138, 1199908, 1201442, 1202239, 1199482, 1198478, 1203329, 1199925,\n", - " 1199929, 1200388, 1200628, 1196966, 1200784, 1202687, 1199606, 1200578,\n", - " 1200627, 1198514, 1195664, 1198932, 1201318, 1197822, 1194899, 1196602,\n", - " 1198587, 1198299, 1199659, 1196382, 1203102, 1198147, 1198824, 1197735,\n", - " 1198819, 1195066, 1201886, 1200301, 1200302, 1197652, 1200707, 1200212,\n", - " 1196428], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197853, 1198770, 1197719, 1199282, 1198458, 1198459, 1198835,\n", - " 1198844, 1201582, 1194626, 1200643, 1197791, 1199250, 1201016, 1198633,\n", - " 1198694, 1196956, 1202804, 1202287, 1197383, 1194866, 1194867, 1194770,\n", - " 1196624, 1195514, 1195259, 1201992, 1196031, 1196081, 1196088, 1198542,\n", - " 1198543, 1197697, 1199519, 1194952, 1195457, 1195895, 1199171, 1196359,\n", - " 1196977, 1195325, 1196835, 1198668, 1196165, 1198367, 1196231, 1195970,\n", - " 1196705, 1196711, 1195145, 1195221, 1195265, 1195278, 1197136, 1197273,\n", - " 1196109, 1195847, 1195541, 1195545, 1197474, 1196117, 1199984, 1197640,\n", - " 1197191, 1200037, 1202017, 1199699, 1195353, 1199329, 1199060, 1197285,\n", - " 1197291, 1198680, 1199680, 1199628, 1200872, 1200878, 1199154, 1200401,\n", - " 1198410, 1199231, 1201916, 1195008, 1195017, 1199676, 1198763, 1201511,\n", - " 1196508, 1201894, 1201903, 1197601, 1196727, 1202618, 1200894, 1198428,\n", - " 1200018, 1199410, 1201526, 1201824, 1201827, 1200566, 1200172, 1198066,\n", - " 1198593, 1196479, 1198785, 1201421, 1201156, 1199721, 1201691, 1202499,\n", - " 1202503, 1200526, 1200546, 1200553, 1200555, 1200429, 1197097, 1202541,\n", - " 1202138, 1199908, 1201442, 1202239, 1199482, 1198478, 1203329, 1199925,\n", - " 1199929, 1200388, 1200628, 1196966, 1200784, 1202687, 1199606, 1200578,\n", - " 1200627, 1198514, 1195664, 1198932, 1201318, 1197822, 1194899, 1196602,\n", - " 1198587, 1198299, 1199659, 1196382, 1203102, 1198147, 1198824, 1197735,\n", - " 1198819, 1195066, 1201886, 1200301, 1200302, 1197652, 1200707, 1200212,\n", - " 1196428], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.1711e-01, 4.3365e-02, 6.8526e-01, ..., 1.6544e-01,\n", - " -1.9137e-03, -4.2989e-03],\n", - " [ 2.0085e-01, -7.0405e-05, 8.2807e-01, ..., 1.2722e-01,\n", - " -1.8424e-03, -5.5696e-03],\n", - " [ 1.0132e-01, 5.6431e-02, 5.6768e-01, ..., 1.6213e-01,\n", - " -2.2955e-03, -3.6085e-03],\n", - " ...,\n", - " [ 9.0986e-02, 1.6740e-02, 5.7281e-01, ..., 1.5734e-01,\n", - " -2.1168e-03, -3.7200e-03],\n", - " [ 2.0085e-01, -7.0405e-05, 8.2807e-01, ..., 1.2722e-01,\n", - " -1.8424e-03, -5.5696e-03],\n", - " [ 1.7903e-01, 3.7731e-02, 8.0249e-01, ..., 1.4413e-01,\n", - " -2.0511e-03, -5.2231e-03]], device='cuda:0'), 'paper': tensor([[ 4.1294e-01, -1.1073e-03, 1.4516e+00, ..., -4.8746e-03,\n", - " -1.0140e-02, -3.3470e-03],\n", - " [ 7.8259e-01, -1.5658e-02, 1.7383e+00, ..., -1.0253e-02,\n", - " -1.8576e-02, -1.6643e-03],\n", - " [ 9.3830e-01, -1.5522e-03, 8.8883e-01, ..., -8.2075e-03,\n", - " -1.1502e-02, 2.3346e-01],\n", - " ...,\n", - " [ 6.9647e-01, -1.5336e-02, 1.9094e+00, ..., -6.9647e-03,\n", - " -1.7107e-02, -3.3820e-03],\n", - " [ 1.7629e+00, -1.3974e-02, 2.7974e+00, ..., -7.1507e-03,\n", - " -3.1139e-02, 9.2907e-01],\n", - " [ 1.8250e+00, -1.2846e-02, 2.0024e+00, ..., 1.4951e-02,\n", - " -3.4744e-02, 2.4188e+00]], device='cuda:0'), 'author': tensor([[-1.4688e-03, 1.2296e-01, 2.4770e-01, ..., 1.5291e+00,\n", - " -8.0291e-04, 1.1700e-01],\n", - " [-1.7926e-03, 1.8525e-01, 2.6474e-01, ..., 1.2919e+00,\n", - " -2.0754e-03, 3.1753e-02],\n", - " [-9.4333e-04, 1.6815e-01, 2.4643e-01, ..., 1.6210e+00,\n", - " -6.5470e-05, 2.5338e-01],\n", - " ...,\n", - " [-1.5735e-03, 1.7322e-01, 2.2008e-01, ..., 1.3612e+00,\n", - " -1.3794e-03, 4.2886e-02],\n", - " [-1.4916e-03, 1.3703e-01, 2.0825e-01, ..., 1.5162e+00,\n", - " -2.6260e-04, 1.4145e-01],\n", - " [-1.4025e-03, 1.4422e-01, 2.1899e-01, ..., 1.4314e+00,\n", - " -8.9941e-04, 1.1399e-01]], device='cuda:0'), 'field_of_study': tensor([[-8.9144e-04, 3.6513e-01, 1.6362e-01, ..., -6.4233e-03,\n", - " 8.7499e-02, 2.3840e-01],\n", - " [-1.3089e-03, 3.4494e-01, 1.0071e-01, ..., -6.9091e-03,\n", - " 1.7383e-01, 2.6284e-01],\n", - " [-3.0556e-04, 4.4354e-01, 1.7962e-01, ..., -5.2316e-03,\n", - " 1.7490e-01, 1.6189e-01],\n", - " ...,\n", - " [-8.4128e-04, 4.4043e-01, 1.3520e-01, ..., -5.3210e-03,\n", - " 2.0572e-01, 1.1129e-01],\n", - " [-6.9004e-04, 4.3057e-01, 1.1185e-01, ..., -6.1177e-03,\n", - " 1.6319e-01, 2.2984e-01],\n", - " [-7.7122e-04, 5.1563e-01, 3.0548e-01, ..., -4.6738e-03,\n", - " 2.0696e-01, 1.0246e-02]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 92, 223, 126, 126, 126, 204, 432, 516, 490, 263, 505, 403,\n", - " 265, 304, 304, 574, 554, 554, 554, 757, 491, 819, 740, 872,\n", - " 885, 934, 1164, 1164, 1130, 1130, 965, 965, 1432, 1432, 1244, 1244,\n", - " 1244, 1386, 1386, 1140, 1431, 1432, 1367, 1367, 1367, 1136, 1681, 1614,\n", - " 1426, 1426, 1548, 1275, 1523, 1523, 1596, 1800, 1710, 1683, 1710, 1710,\n", - " 1710, 1710, 1838, 1965, 1965, 1990, 1776, 1776, 1950, 2053, 1840, 1831,\n", - " 1831, 1831, 1916, 1916, 1954, 1958, 2063, 2124, 2177, 2404, 2109, 2109,\n", - " 2109, 2109, 2222, 2222, 2310, 2310, 2467, 2555, 2483, 2513, 2520, 2459,\n", - " 2515, 2460, 2452, 2531, 2675, 2656, 2545, 2643, 2603, 2603, 2603, 2603,\n", - " 2686, 2952, 2811, 2811, 2859, 2707, 2919, 2919, 2919, 3006, 3155, 2789,\n", - " 3049, 3052, 3027, 3027, 3020, 3071, 3071, 3370, 3284, 3286, 3310, 3423,\n", - " 3365, 3422, 3522, 3410, 3410, 3761, 3440, 3722, 3634, 3907, 4098, 3912,\n", - " 3900, 3961, 3804, 4080, 4080, 4080, 3907, 3907, 3756, 3892, 4082, 4042,\n", - " 3989, 4084, 4207, 4162, 4272, 4272, 4572, 4340, 4548, 4428, 4398, 4464,\n", - " 4502, 4590, 4735, 4417, 4750, 4750, 4761, 4758, 4766, 4691, 4630, 4630,\n", - " 4936, 5198, 4877, 4720, 5071, 5016, 5018, 5248, 5013, 5038, 5052, 5082,\n", - " 5095, 4849, 4849, 5245, 5045, 5206, 5129, 4982, 5085, 5085, 5085, 5197,\n", - " 5268, 5197, 5343, 5343, 5443, 5303, 5632, 5632, 5450, 5450, 5834, 5576,\n", - " 5404, 5404, 5792, 5780, 5780, 5780, 5654, 5638, 5706, 5706, 5729, 6035,\n", - " 5991, 5991, 6078, 5993, 5993, 6043, 5975, 6298, 6209, 6422, 6422, 6435,\n", - " 6435, 6407],\n", - " [ 83, 4, 39, 5, 106, 14, 127, 105, 134, 92, 90, 141,\n", - " 150, 29, 107, 95, 21, 33, 27, 151, 153, 120, 146, 25,\n", - " 151, 115, 121, 14, 75, 39, 148, 157, 139, 92, 73, 121,\n", - " 137, 89, 67, 71, 4, 116, 8, 147, 118, 84, 36, 52,\n", - " 92, 142, 104, 62, 59, 40, 39, 112, 114, 37, 117, 81,\n", - " 17, 23, 151, 20, 98, 36, 24, 46, 60, 57, 21, 64,\n", - " 93, 159, 6, 110, 36, 4, 109, 152, 22, 24, 48, 79,\n", - " 131, 77, 124, 66, 69, 61, 152, 101, 26, 36, 16, 39,\n", - " 4, 62, 62, 83, 158, 152, 36, 146, 103, 120, 2, 49,\n", - " 96, 76, 97, 123, 122, 113, 154, 45, 44, 4, 123, 120,\n", - " 135, 27, 127, 131, 143, 100, 55, 132, 13, 41, 74, 145,\n", - " 68, 1, 33, 9, 152, 94, 139, 50, 115, 148, 111, 152,\n", - " 0, 65, 123, 136, 128, 86, 157, 99, 150, 78, 35, 68,\n", - " 68, 94, 113, 19, 135, 102, 78, 54, 76, 82, 113, 150,\n", - " 96, 158, 4, 31, 31, 57, 47, 68, 10, 62, 91, 56,\n", - " 107, 32, 92, 19, 156, 160, 15, 11, 72, 38, 157, 51,\n", - " 129, 155, 150, 107, 28, 76, 43, 127, 144, 140, 85, 80,\n", - " 108, 156, 3, 4, 95, 96, 42, 133, 87, 119, 30, 53,\n", - " 56, 40, 130, 125, 121, 63, 70, 34, 88, 92, 18, 58,\n", - " 3, 49, 12, 138, 92, 132, 7, 27, 10, 126, 91, 127,\n", - " 149, 92]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3199, 1441, 518, ..., 241, 5355, 3049],\n", - " [ 23, 23, 23, ..., 6148, 6014, 6149]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 19, 60, 35, ..., 119, 87, 32],\n", - " [ 178, 188, 235, ..., 6382, 6322, 6217]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 224, 224, 23, ..., 6093, 6116, 5963],\n", - " [ 328, 196, 366, ..., 240, 203, 240]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 617, 605, 493, ..., 146, 240, 346],\n", - " [ 68, 61, 17, ..., 6138, 6079, 6053]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2722, 550, 2898, ..., 4976, 5615, 4899],\n", - " [ 161, 156, 175, ..., 6209, 6270, 6347]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 224, 23, 23, ..., 6093, 6093, 6093],\n", - " [1111, 1441, 1620, ..., 1297, 4870, 2291]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 54, 223, 223, ..., 6209, 6209, 6209],\n", - " [5763, 550, 667, ..., 2788, 4976, 3986]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006367\n", - "sampling 0.006214\n", - "noi time: 0.001899\n", - "get_vertex_data call: 0.02136\n", - "noi group time: 0.00184\n", - "eoi_group_time: 0.013124\n", - "second half: 0.211114\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16691, 468, 24187, ..., 1111730, 1120124, 1128784],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16691, 468, 24187, ..., 1111730, 1120124, 1128784],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1211781, 1212860, ..., 1936992, 1931114, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1211781, 1212860, ..., 1936992, 1931114, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1137212, 1141424, 1136228, 1140285, 1136349, 1135928, 1135716,\n", - " 1135727, 1141751, 1141758, 1136210, 1136215, 1136144, 1136148, 1136962,\n", - " 1136969, 1138897, 1143600, 1149839, 1145373, 1146978, 1146983, 1137947,\n", - " 1145999, 1137268, 1143372, 1143363, 1146646, 1146647, 1139615, 1148976,\n", - " 1150509, 1149216, 1142958, 1155689, 1143820, 1147473, 1142881, 1153940,\n", - " 1144637, 1144632, 1135262, 1149038, 1146995, 1147003, 1153012, 1153018,\n", - " 1134701, 1148346, 1136112, 1152664, 1153220, 1147094, 1137220, 1137225,\n", - " 1145419, 1155019, 1139365, 1139371, 1150330, 1152416, 1152427, 1134717,\n", - " 1134710, 1140540, 1138112, 1154415, 1137254, 1137263, 1138356, 1153463,\n", - " 1135913, 1140027, 1140953, 1135367, 1135202, 1134970, 1141036, 1134794,\n", - " 1157443, 1138504, 1137329, 1137693, 1139215, 1144395, 1137529, 1135408,\n", - " 1157405, 1136662, 1137441, 1156146, 1156149, 1156159, 1148481, 1135583,\n", - " 1136097, 1136100, 1136101, 1140240, 1138514, 1137957, 1156967, 1135522,\n", - " 1157706, 1138440, 1138461, 1136594, 1135123, 1158390, 1156605, 1147111,\n", - " 1147119, 1142611, 1135359, 1135627, 1158984, 1135772, 1139855, 1139844,\n", - " 1136457, 1139667, 1139668, 1139673, 1139664, 1138067, 1138069, 1134992,\n", - " 1152640, 1152654, 1158971, 1158974, 1139318, 1142900, 1142906, 1142909,\n", - " 1159018, 1159019, 1141065, 1153543, 1143625, 1140034, 1139933, 1138148,\n", - " 1141963, 1146075, 1140550, 1140556, 1152044, 1142299, 1137734, 1137728,\n", - " 1137743, 1134924, 1134922, 1140901, 1135540, 1135549, 1141088, 1141097,\n", - " 1141098, 1141102, 1144138, 1149001, 1139898, 1143767, 1154855, 1137297,\n", - " 1143221, 1139025, 1140007, 1146832, 1135860, 1135861, 1136426, 1154472,\n", - " 1139436, 1136638, 1141226, 1141901, 1139386, 1136917, 1139741, 1139495,\n", - " 1141609, 1144650, 1144428, 1138482, 1142056, 1141821, 1146796, 1153670,\n", - " 1143204, 1137766, 1137070, 1137057, 1142917, 1142924, 1142913, 1148444,\n", - " 1144596, 1148265, 1136867, 1145298, 1145302, 1141209, 1140885, 1137614,\n", - " 1144865, 1136565, 1139559, 1158691, 1158703, 1138529, 1138539, 1138537,\n", - " 1137841, 1147153, 1136369, 1142640, 1141365, 1153068, 1141664, 1149101,\n", - " 1138293, 1144279, 1139508, 1139510, 1139127, 1145001, 1143790, 1143779,\n", - " 1140619, 1140990, 1147050, 1145873, 1143551, 1152976, 1139447, 1141925,\n", - " 1144242, 1140580, 1150700, 1139405, 1143643, 1134861, 1136274, 1146024,\n", - " 1150601, 1138085, 1146140, 1141585, 1139990, 1143293, 1151122, 1151124,\n", - " 1147543, 1147540, 1148763, 1148765, 1147282, 1142817, 1142816, 1138660,\n", - " 1136330, 1140348, 1142637, 1149366, 1148001, 1143040, 1148408, 1136167,\n", - " 1138922, 1138923, 1146105, 1139297, 1139304, 1139329, 1136445, 1142126,\n", - " 1142149, 1142159, 1143345, 1144765, 1137098, 1144086, 1144319, 1150294,\n", - " 1146523, 1138024, 1143465, 1143457, 1144303, 1143937, 1143949, 1135441,\n", - " 1140364, 1143080, 1148965, 1147984, 1147996, 1147999, 1146949, 1134902,\n", - " 1134907, 1144011, 1139252, 1139249, 1148704, 1141327, 1141827, 1141833,\n", - " 1146742, 1153701, 1152328, 1147056, 1149722, 1147025, 1147031, 1147970,\n", - " 1147187, 1158226, 1154526, 1145232, 1145237, 1145240, 1145235, 1145751,\n", - " 1148397, 1146178, 1151242, 1152537, 1150274, 1150445, 1149791, 1141356,\n", - " 1145833, 1150342, 1150348, 1150350, 1152013, 1165251, 1165253, 1147807,\n", - " 1151482, 1151487, 1151473, 1152023, 1144881, 1151041, 1145256, 1145259,\n", - " 1145263, 1134869, 1150127, 1147019, 1147023, 1153963, 1158949, 1141949,\n", - " 1146776, 1148744, 1153568, 1162284, 1147653, 1147659, 1149412, 1148288,\n", - " 1148294, 1139096, 1154420, 1148180, 1136251, 1146676, 1157968, 1157976,\n", - " 1157983, 1148724, 1148729, 1144110, 1168970, 1168960, 1146547, 1146559,\n", - " 1148204, 1148108, 1171939, 1154168, 1153192, 1153188, 1153197, 1145104,\n", - " 1150935, 1152878, 1144848, 1155088, 1146231, 1147442, 1151906, 1154183,\n", - " 1150708, 1150707, 1148505, 1141420, 1141419, 1141408, 1136000, 1151358,\n", - " 1147728, 1148949, 1146969, 1146972, 1153249, 1150210, 1146623, 1151694,\n", - " 1152849, 1152405, 1152409, 1152097, 1152100, 1146280, 1151728, 1156321,\n", - " 1153029, 1153038, 1150085, 1137746, 1146307, 1146304, 1159974, 1152612,\n", - " 1155140, 1136410, 1152831, 1155337, 1154123, 1155354, 1152673, 1152672,\n", - " 1154633, 1151580, 1151617, 1151623, 1150586, 1148927, 1150613, 1144529,\n", - " 1145952, 1138982, 1138991, 1151298, 1152342, 1146704, 1145576, 1138272,\n", - " 1138283, 1138279, 1138281, 1157147, 1156004, 1136028, 1136029, 1156619,\n", - " 1156621, 1156622, 1152928, 1151061, 1156399, 1152888, 1143484, 1143486,\n", - " 1150172, 1150164, 1149273, 1167939, 1148040, 1155202, 1155222, 1145656,\n", - " 1149794, 1148628, 1148637, 1158530, 1137458, 1135698, 1159216, 1153085,\n", - " 1154371, 1142387, 1150872, 1148892, 1158916, 1154942, 1156505, 1157064,\n", - " 1157069, 1155422, 1155418, 1152833, 1151251, 1135222, 1135729, 1135730,\n", - " 1138830, 1151788, 1151777, 1153413, 1147810, 1139525, 1139524, 1158304,\n", - " 1158308, 1155441, 1137972, 1153359, 1150129, 1150130, 1150132, 1162120,\n", - " 1140877, 1154529, 1154530, 1154528, 1145768, 1142755, 1142758, 1138775,\n", - " 1156269, 1156271, 1151379, 1155375, 1155122, 1152526, 1157183, 1155755,\n", - " 1151438, 1146913, 1145806, 1145807, 1156452, 1156463, 1158096, 1158104,\n", - " 1168230, 1168238, 1154763, 1155628, 1155630, 1156563, 1154555, 1136476,\n", - " 1158824, 1153715, 1148654, 1154650, 1146938, 1154241, 1154095, 1156718,\n", - " 1143189, 1143196, 1143528, 1150371, 1150379, 1150811, 1150977, 1150987,\n", - " 1157928, 1151030, 1158126, 1137381, 1159116, 1137316, 1168154, 1135601,\n", - " 1148149, 1150661, 1155848, 1155852, 1158664, 1158665, 1157685, 1159258,\n", - " 1152209, 1152220, 1140381, 1155880, 1157732, 1157740, 1157735, 1157033,\n", - " 1144843, 1155971, 1155975, 1158841, 1158846, 1156811, 1155403, 1149700,\n", - " 1154600, 1154605, 1165556, 1159441, 1171171, 1140213, 1140221, 1161691,\n", - " 1162995, 1158815, 1158814, 1158444, 1158285, 1156665, 1147599, 1142747,\n", - " 1156488, 1153808, 1136640, 1136646, 1134757, 1140049, 1142184, 1158558,\n", - " 1146126, 1165778, 1164514, 1154340, 1158006, 1150011, 1155521, 1165848,\n", - " 1142493, 1163471, 1137557, 1164276, 1142663, 1142666, 1150684, 1167346,\n", - " 1159042, 1159052, 1159070, 1159143, 1158295, 1153052, 1153045, 1167174,\n", - " 1166241, 1156226, 1142864, 1153842, 1156096, 1156101, 1156107, 1165244,\n", - " 1167189, 1150046, 1149063, 1145948, 1155479, 1155480, 1158680, 1138161,\n", - " 1164006, 1156795, 1160764, 1166072, 1148771, 1140731, 1146063, 1171258,\n", - " 1162471, 1160689, 1160176, 1165309, 1140641, 1140643, 1141862, 1148600,\n", - " 1148603, 1148607, 1143139, 1166805, 1151883, 1155810, 1156357, 1158653,\n", - " 1156184, 1159032, 1159038, 1169109, 1152244, 1143729, 1143735, 1155588,\n", - " 1162549, 1144984, 1146500, 1153239, 1169257, 1144736, 1144739, 1152776,\n", - " 1155046, 1141471, 1141459, 1151650, 1156739, 1157955, 1153649, 1153661,\n", - " 1166591, 1150648, 1171040, 1144812, 1135567, 1145743, 1145222, 1169282,\n", - " 1155324, 1166462, 1147673, 1150535, 1144973, 1167055, 1148168, 1166053,\n", - " 1152624, 1148113, 1148124, 1147714, 1147724, 1145892, 1145900, 1145902,\n", - " 1153520, 1171581, 1152194, 1152203, 1175240, 1143397, 1143404, 1149565,\n", - " 1147343, 1147338, 1160030, 1160024, 1177920, 1145665, 1145664, 1151587,\n", - " 1166653, 1149487, 1169304, 1155172, 1165018, 1150515, 1161781, 1154614,\n", - " 1144336, 1157534, 1154670, 1154882, 1169162, 1157331, 1151668, 1151674,\n", - " 1169359, 1149688, 1158611, 1158623, 1158060, 1173047, 1165899, 1155502,\n", - " 1152353, 1170278, 1143170, 1168451, 1168400, 1168059, 1149402, 1148657,\n", - " 1148667, 1162215, 1172143, 1173307, 1154027, 1152150, 1159658, 1167857,\n", - " 1157158, 1157153, 1157371, 1157373, 1147696, 1147711, 1148131, 1157592,\n", - " 1170490, 1166827, 1169032, 1162106, 1165126, 1166016, 1177700, 1163989,\n", - " 1144550, 1153428, 1166531, 1166535, 1166684, 1154148, 1154159, 1158176,\n", - " 1184392, 1143279, 1180393, 1168481, 1143420, 1170176, 1181246, 1153803,\n", - " 1170527, 1153141, 1181572, 1153624, 1185142, 1182651, 1178565, 1179807,\n", - " 1158030, 1155262, 1177901, 1157792, 1157795, 1171623, 1157134, 1180036,\n", - " 1179540, 1153889, 1153898, 1145591, 1134650, 1164563, 1145626, 1156443,\n", - " 1172024, 1161917, 1149753, 1149755, 1146252, 1157761, 1170069, 1158940,\n", - " 1158380, 1155890, 1155899, 1162977, 1180940, 1140399, 1168282, 1182330,\n", - " 1161405, 1168621, 1164228, 1164231, 1183723, 1181461, 1154957, 1165444,\n", - " 1161819, 1146161, 1156861, 1156849, 1182395, 1147172, 1147182, 1183976,\n", - " 1170034, 1139831, 1150265, 1154812, 1182220, 1151288, 1186405, 1156055,\n", - " 1151972, 1181889, 1179686, 1188371, 1189316, 1156842, 1194067, 1189191,\n", - " 1181939, 1190246, 1182060, 1193165, 1162156, 1181295, 1151774, 1153733,\n", - " 1190040, 1190452, 1152117, 1191606, 1178003, 1177461, 1193725, 1177285,\n", - " 1177295, 1156672, 1172423, 1166788, 1145395, 1145397, 1179750, 1155959,\n", - " 1155962, 1181646, 1188105, 1187189, 1183794, 1179765, 1169831, 1193503,\n", - " 1192554, 1193329, 1191142, 1181033, 1192960, 1157008, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1137212, 1141424, 1136228, 1140285, 1136349, 1135928, 1135716,\n", - " 1135727, 1141751, 1141758, 1136210, 1136215, 1136144, 1136148, 1136962,\n", - " 1136969, 1138897, 1143600, 1149839, 1145373, 1146978, 1146983, 1137947,\n", - " 1145999, 1137268, 1143372, 1143363, 1146646, 1146647, 1139615, 1148976,\n", - " 1150509, 1149216, 1142958, 1155689, 1143820, 1147473, 1142881, 1153940,\n", - " 1144637, 1144632, 1135262, 1149038, 1146995, 1147003, 1153012, 1153018,\n", - " 1134701, 1148346, 1136112, 1152664, 1153220, 1147094, 1137220, 1137225,\n", - " 1145419, 1155019, 1139365, 1139371, 1150330, 1152416, 1152427, 1134717,\n", - " 1134710, 1140540, 1138112, 1154415, 1137254, 1137263, 1138356, 1153463,\n", - " 1135913, 1140027, 1140953, 1135367, 1135202, 1134970, 1141036, 1134794,\n", - " 1157443, 1138504, 1137329, 1137693, 1139215, 1144395, 1137529, 1135408,\n", - " 1157405, 1136662, 1137441, 1156146, 1156149, 1156159, 1148481, 1135583,\n", - " 1136097, 1136100, 1136101, 1140240, 1138514, 1137957, 1156967, 1135522,\n", - " 1157706, 1138440, 1138461, 1136594, 1135123, 1158390, 1156605, 1147111,\n", - " 1147119, 1142611, 1135359, 1135627, 1158984, 1135772, 1139855, 1139844,\n", - " 1136457, 1139667, 1139668, 1139673, 1139664, 1138067, 1138069, 1134992,\n", - " 1152640, 1152654, 1158971, 1158974, 1139318, 1142900, 1142906, 1142909,\n", - " 1159018, 1159019, 1141065, 1153543, 1143625, 1140034, 1139933, 1138148,\n", - " 1141963, 1146075, 1140550, 1140556, 1152044, 1142299, 1137734, 1137728,\n", - " 1137743, 1134924, 1134922, 1140901, 1135540, 1135549, 1141088, 1141097,\n", - " 1141098, 1141102, 1144138, 1149001, 1139898, 1143767, 1154855, 1137297,\n", - " 1143221, 1139025, 1140007, 1146832, 1135860, 1135861, 1136426, 1154472,\n", - " 1139436, 1136638, 1141226, 1141901, 1139386, 1136917, 1139741, 1139495,\n", - " 1141609, 1144650, 1144428, 1138482, 1142056, 1141821, 1146796, 1153670,\n", - " 1143204, 1137766, 1137070, 1137057, 1142917, 1142924, 1142913, 1148444,\n", - " 1144596, 1148265, 1136867, 1145298, 1145302, 1141209, 1140885, 1137614,\n", - " 1144865, 1136565, 1139559, 1158691, 1158703, 1138529, 1138539, 1138537,\n", - " 1137841, 1147153, 1136369, 1142640, 1141365, 1153068, 1141664, 1149101,\n", - " 1138293, 1144279, 1139508, 1139510, 1139127, 1145001, 1143790, 1143779,\n", - " 1140619, 1140990, 1147050, 1145873, 1143551, 1152976, 1139447, 1141925,\n", - " 1144242, 1140580, 1150700, 1139405, 1143643, 1134861, 1136274, 1146024,\n", - " 1150601, 1138085, 1146140, 1141585, 1139990, 1143293, 1151122, 1151124,\n", - " 1147543, 1147540, 1148763, 1148765, 1147282, 1142817, 1142816, 1138660,\n", - " 1136330, 1140348, 1142637, 1149366, 1148001, 1143040, 1148408, 1136167,\n", - " 1138922, 1138923, 1146105, 1139297, 1139304, 1139329, 1136445, 1142126,\n", - " 1142149, 1142159, 1143345, 1144765, 1137098, 1144086, 1144319, 1150294,\n", - " 1146523, 1138024, 1143465, 1143457, 1144303, 1143937, 1143949, 1135441,\n", - " 1140364, 1143080, 1148965, 1147984, 1147996, 1147999, 1146949, 1134902,\n", - " 1134907, 1144011, 1139252, 1139249, 1148704, 1141327, 1141827, 1141833,\n", - " 1146742, 1153701, 1152328, 1147056, 1149722, 1147025, 1147031, 1147970,\n", - " 1147187, 1158226, 1154526, 1145232, 1145237, 1145240, 1145235, 1145751,\n", - " 1148397, 1146178, 1151242, 1152537, 1150274, 1150445, 1149791, 1141356,\n", - " 1145833, 1150342, 1150348, 1150350, 1152013, 1165251, 1165253, 1147807,\n", - " 1151482, 1151487, 1151473, 1152023, 1144881, 1151041, 1145256, 1145259,\n", - " 1145263, 1134869, 1150127, 1147019, 1147023, 1153963, 1158949, 1141949,\n", - " 1146776, 1148744, 1153568, 1162284, 1147653, 1147659, 1149412, 1148288,\n", - " 1148294, 1139096, 1154420, 1148180, 1136251, 1146676, 1157968, 1157976,\n", - " 1157983, 1148724, 1148729, 1144110, 1168970, 1168960, 1146547, 1146559,\n", - " 1148204, 1148108, 1171939, 1154168, 1153192, 1153188, 1153197, 1145104,\n", - " 1150935, 1152878, 1144848, 1155088, 1146231, 1147442, 1151906, 1154183,\n", - " 1150708, 1150707, 1148505, 1141420, 1141419, 1141408, 1136000, 1151358,\n", - " 1147728, 1148949, 1146969, 1146972, 1153249, 1150210, 1146623, 1151694,\n", - " 1152849, 1152405, 1152409, 1152097, 1152100, 1146280, 1151728, 1156321,\n", - " 1153029, 1153038, 1150085, 1137746, 1146307, 1146304, 1159974, 1152612,\n", - " 1155140, 1136410, 1152831, 1155337, 1154123, 1155354, 1152673, 1152672,\n", - " 1154633, 1151580, 1151617, 1151623, 1150586, 1148927, 1150613, 1144529,\n", - " 1145952, 1138982, 1138991, 1151298, 1152342, 1146704, 1145576, 1138272,\n", - " 1138283, 1138279, 1138281, 1157147, 1156004, 1136028, 1136029, 1156619,\n", - " 1156621, 1156622, 1152928, 1151061, 1156399, 1152888, 1143484, 1143486,\n", - " 1150172, 1150164, 1149273, 1167939, 1148040, 1155202, 1155222, 1145656,\n", - " 1149794, 1148628, 1148637, 1158530, 1137458, 1135698, 1159216, 1153085,\n", - " 1154371, 1142387, 1150872, 1148892, 1158916, 1154942, 1156505, 1157064,\n", - " 1157069, 1155422, 1155418, 1152833, 1151251, 1135222, 1135729, 1135730,\n", - " 1138830, 1151788, 1151777, 1153413, 1147810, 1139525, 1139524, 1158304,\n", - " 1158308, 1155441, 1137972, 1153359, 1150129, 1150130, 1150132, 1162120,\n", - " 1140877, 1154529, 1154530, 1154528, 1145768, 1142755, 1142758, 1138775,\n", - " 1156269, 1156271, 1151379, 1155375, 1155122, 1152526, 1157183, 1155755,\n", - " 1151438, 1146913, 1145806, 1145807, 1156452, 1156463, 1158096, 1158104,\n", - " 1168230, 1168238, 1154763, 1155628, 1155630, 1156563, 1154555, 1136476,\n", - " 1158824, 1153715, 1148654, 1154650, 1146938, 1154241, 1154095, 1156718,\n", - " 1143189, 1143196, 1143528, 1150371, 1150379, 1150811, 1150977, 1150987,\n", - " 1157928, 1151030, 1158126, 1137381, 1159116, 1137316, 1168154, 1135601,\n", - " 1148149, 1150661, 1155848, 1155852, 1158664, 1158665, 1157685, 1159258,\n", - " 1152209, 1152220, 1140381, 1155880, 1157732, 1157740, 1157735, 1157033,\n", - " 1144843, 1155971, 1155975, 1158841, 1158846, 1156811, 1155403, 1149700,\n", - " 1154600, 1154605, 1165556, 1159441, 1171171, 1140213, 1140221, 1161691,\n", - " 1162995, 1158815, 1158814, 1158444, 1158285, 1156665, 1147599, 1142747,\n", - " 1156488, 1153808, 1136640, 1136646, 1134757, 1140049, 1142184, 1158558,\n", - " 1146126, 1165778, 1164514, 1154340, 1158006, 1150011, 1155521, 1165848,\n", - " 1142493, 1163471, 1137557, 1164276, 1142663, 1142666, 1150684, 1167346,\n", - " 1159042, 1159052, 1159070, 1159143, 1158295, 1153052, 1153045, 1167174,\n", - " 1166241, 1156226, 1142864, 1153842, 1156096, 1156101, 1156107, 1165244,\n", - " 1167189, 1150046, 1149063, 1145948, 1155479, 1155480, 1158680, 1138161,\n", - " 1164006, 1156795, 1160764, 1166072, 1148771, 1140731, 1146063, 1171258,\n", - " 1162471, 1160689, 1160176, 1165309, 1140641, 1140643, 1141862, 1148600,\n", - " 1148603, 1148607, 1143139, 1166805, 1151883, 1155810, 1156357, 1158653,\n", - " 1156184, 1159032, 1159038, 1169109, 1152244, 1143729, 1143735, 1155588,\n", - " 1162549, 1144984, 1146500, 1153239, 1169257, 1144736, 1144739, 1152776,\n", - " 1155046, 1141471, 1141459, 1151650, 1156739, 1157955, 1153649, 1153661,\n", - " 1166591, 1150648, 1171040, 1144812, 1135567, 1145743, 1145222, 1169282,\n", - " 1155324, 1166462, 1147673, 1150535, 1144973, 1167055, 1148168, 1166053,\n", - " 1152624, 1148113, 1148124, 1147714, 1147724, 1145892, 1145900, 1145902,\n", - " 1153520, 1171581, 1152194, 1152203, 1175240, 1143397, 1143404, 1149565,\n", - " 1147343, 1147338, 1160030, 1160024, 1177920, 1145665, 1145664, 1151587,\n", - " 1166653, 1149487, 1169304, 1155172, 1165018, 1150515, 1161781, 1154614,\n", - " 1144336, 1157534, 1154670, 1154882, 1169162, 1157331, 1151668, 1151674,\n", - " 1169359, 1149688, 1158611, 1158623, 1158060, 1173047, 1165899, 1155502,\n", - " 1152353, 1170278, 1143170, 1168451, 1168400, 1168059, 1149402, 1148657,\n", - " 1148667, 1162215, 1172143, 1173307, 1154027, 1152150, 1159658, 1167857,\n", - " 1157158, 1157153, 1157371, 1157373, 1147696, 1147711, 1148131, 1157592,\n", - " 1170490, 1166827, 1169032, 1162106, 1165126, 1166016, 1177700, 1163989,\n", - " 1144550, 1153428, 1166531, 1166535, 1166684, 1154148, 1154159, 1158176,\n", - " 1184392, 1143279, 1180393, 1168481, 1143420, 1170176, 1181246, 1153803,\n", - " 1170527, 1153141, 1181572, 1153624, 1185142, 1182651, 1178565, 1179807,\n", - " 1158030, 1155262, 1177901, 1157792, 1157795, 1171623, 1157134, 1180036,\n", - " 1179540, 1153889, 1153898, 1145591, 1134650, 1164563, 1145626, 1156443,\n", - " 1172024, 1161917, 1149753, 1149755, 1146252, 1157761, 1170069, 1158940,\n", - " 1158380, 1155890, 1155899, 1162977, 1180940, 1140399, 1168282, 1182330,\n", - " 1161405, 1168621, 1164228, 1164231, 1183723, 1181461, 1154957, 1165444,\n", - " 1161819, 1146161, 1156861, 1156849, 1182395, 1147172, 1147182, 1183976,\n", - " 1170034, 1139831, 1150265, 1154812, 1182220, 1151288, 1186405, 1156055,\n", - " 1151972, 1181889, 1179686, 1188371, 1189316, 1156842, 1194067, 1189191,\n", - " 1181939, 1190246, 1182060, 1193165, 1162156, 1181295, 1151774, 1153733,\n", - " 1190040, 1190452, 1152117, 1191606, 1178003, 1177461, 1193725, 1177285,\n", - " 1177295, 1156672, 1172423, 1166788, 1145395, 1145397, 1179750, 1155959,\n", - " 1155962, 1181646, 1188105, 1187189, 1183794, 1179765, 1169831, 1193503,\n", - " 1192554, 1193329, 1191142, 1181033, 1192960, 1157008, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197719, 1198723, 1198730, 1199835, 1199282, 1198459, 1202255, 1198844,\n", - " 1201577, 1201582, 1200642, 1200644, 1200650, 1197777, 1201016, 1194866,\n", - " 1194770, 1195499, 1196631, 1195514, 1197921, 1201992, 1198542, 1198543,\n", - " 1194952, 1195459, 1197860, 1196977, 1194756, 1197831, 1195313, 1195325,\n", - " 1197104, 1195989, 1195145, 1195148, 1195265, 1195267, 1197141, 1197140,\n", - " 1200765, 1197367, 1197265, 1196109, 1195847, 1195038, 1198915, 1197474,\n", - " 1196122, 1200032, 1196272, 1195353, 1199329, 1200959, 1199060, 1197286,\n", - " 1202747, 1194928, 1199688, 1199628, 1197990, 1200872, 1199154, 1199038,\n", - " 1201904, 1202585, 1195795, 1197601, 1197609, 1196727, 1195771, 1198428,\n", - " 1201525, 1199555, 1200769, 1200779, 1201827, 1202417, 1200570, 1195592,\n", - " 1198593, 1201156, 1200913, 1200927, 1202641, 1200526, 1200546, 1200553,\n", - " 1203071, 1200345, 1197945, 1195882, 1200181, 1201291, 1198478, 1196966,\n", - " 1195679, 1195664, 1198932, 1200276, 1197816, 1197822, 1197821, 1200585,\n", - " 1198299, 1203102, 1201138, 1194730, 1198824, 1197731, 1197735, 1200011,\n", - " 1198819, 1200974, 1195066, 1201886, 1200301, 1197652, 1200707, 1195082,\n", - " 1197872], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197719, 1198723, 1198730, 1199835, 1199282, 1198459, 1202255, 1198844,\n", - " 1201577, 1201582, 1200642, 1200644, 1200650, 1197777, 1201016, 1194866,\n", - " 1194770, 1195499, 1196631, 1195514, 1197921, 1201992, 1198542, 1198543,\n", - " 1194952, 1195459, 1197860, 1196977, 1194756, 1197831, 1195313, 1195325,\n", - " 1197104, 1195989, 1195145, 1195148, 1195265, 1195267, 1197141, 1197140,\n", - " 1200765, 1197367, 1197265, 1196109, 1195847, 1195038, 1198915, 1197474,\n", - " 1196122, 1200032, 1196272, 1195353, 1199329, 1200959, 1199060, 1197286,\n", - " 1202747, 1194928, 1199688, 1199628, 1197990, 1200872, 1199154, 1199038,\n", - " 1201904, 1202585, 1195795, 1197601, 1197609, 1196727, 1195771, 1198428,\n", - " 1201525, 1199555, 1200769, 1200779, 1201827, 1202417, 1200570, 1195592,\n", - " 1198593, 1201156, 1200913, 1200927, 1202641, 1200526, 1200546, 1200553,\n", - " 1203071, 1200345, 1197945, 1195882, 1200181, 1201291, 1198478, 1196966,\n", - " 1195679, 1195664, 1198932, 1200276, 1197816, 1197822, 1197821, 1200585,\n", - " 1198299, 1203102, 1201138, 1194730, 1198824, 1197731, 1197735, 1200011,\n", - " 1198819, 1200974, 1195066, 1201886, 1200301, 1197652, 1200707, 1195082,\n", - " 1197872], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 0.1130, 0.0319, 0.6558, ..., 0.1513, -0.0017, -0.0038],\n", - " [ 0.1889, 0.0121, 0.7903, ..., 0.1323, -0.0019, -0.0052],\n", - " [ 0.1568, 0.0186, 0.7560, ..., 0.1366, -0.0018, -0.0049],\n", - " ...,\n", - " [ 0.1130, 0.0319, 0.6558, ..., 0.1513, -0.0017, -0.0038],\n", - " [ 0.1666, 0.0759, 0.7758, ..., 0.1760, -0.0021, -0.0050],\n", - " [ 0.1546, 0.0550, 0.7157, ..., 0.1238, -0.0018, -0.0048]],\n", - " device='cuda:0'), 'paper': tensor([[ 1.9468e+00, -6.4165e-03, 2.5342e+00, ..., -7.9967e-04,\n", - " -3.0600e-02, 1.9092e+00],\n", - " [ 1.2766e+00, 4.3600e-01, 2.6611e+00, ..., -1.7503e-03,\n", - " -1.9148e-02, 4.8630e-01],\n", - " [ 6.0194e-01, -3.8674e-03, 1.1570e+00, ..., -6.4420e-03,\n", - " -1.0419e-02, -2.8176e-03],\n", - " ...,\n", - " [ 8.5102e-01, -1.1952e-02, 1.1043e+00, ..., -5.6150e-03,\n", - " -2.0024e-02, 5.5994e-01],\n", - " [ 8.3296e-01, -1.3857e-02, 1.6422e+00, ..., -9.7093e-03,\n", - " -1.7513e-02, -2.6691e-03],\n", - " [ 2.0882e+00, -1.1928e-02, 2.2080e+00, ..., 1.2732e-01,\n", - " -3.6706e-02, 2.7361e+00]], device='cuda:0'), 'author': tensor([[-2.9035e-03, 1.8955e-01, 3.6573e-01, ..., 1.3198e+00,\n", - " -4.1947e-03, -2.1062e-03],\n", - " [-6.2875e-03, 2.1849e-01, 4.2860e-01, ..., 1.3514e+00,\n", - " -5.2331e-03, -5.3316e-03],\n", - " [-1.5110e-03, 1.5724e-01, 1.7526e-01, ..., 1.3351e+00,\n", - " -1.2940e-03, 3.7435e-02],\n", - " ...,\n", - " [-1.1303e-03, 2.0667e-02, 2.9023e-01, ..., 1.6147e+00,\n", - " 6.5162e-02, 1.3219e-01],\n", - " [-1.5284e-03, 1.4312e-01, 3.2023e-01, ..., 1.3841e+00,\n", - " -1.9238e-03, -7.0702e-04],\n", - " [-4.5085e-03, 1.7423e-01, 3.7293e-01, ..., 1.1571e+00,\n", - " -4.6635e-03, -3.3582e-03]], device='cuda:0'), 'field_of_study': tensor([[-1.1965e-03, 4.3201e-01, 1.8061e-01, ..., -7.4116e-03,\n", - " 1.8145e-01, 2.9837e-01],\n", - " [-1.2282e-03, 3.8441e-01, 1.5130e-01, ..., -6.2631e-03,\n", - " 1.1329e-01, 2.3040e-01],\n", - " [-9.4573e-04, 3.7256e-01, 1.2489e-01, ..., -6.1380e-03,\n", - " 1.8832e-01, 1.8719e-01],\n", - " ...,\n", - " [-5.3203e-04, 4.5018e-01, 1.8470e-01, ..., -5.6600e-03,\n", - " 2.7055e-01, 1.0747e-01],\n", - " [-7.0073e-04, 3.1125e-01, 1.2548e-01, ..., -4.6079e-03,\n", - " -2.5087e-04, 2.1341e-01],\n", - " [ 1.9066e-01, 6.2994e-01, 4.2866e-01, ..., -5.5681e-03,\n", - " 1.8121e-01, -1.0766e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 211, 110, 100, 157, 157, 22, 9, 178, 178, 178, 178, 178,\n", - " 424, 541, 342, 264, 264, 300, 238, 696, 696, 462, 541, 423,\n", - " 423, 660, 581, 761, 623, 818, 785, 733, 855, 855, 1108, 1280,\n", - " 1133, 918, 918, 934, 934, 1224, 1322, 1160, 1402, 1549, 1402, 1404,\n", - " 1404, 1404, 1258, 1591, 1391, 1454, 1469, 1655, 1693, 1359, 1359, 1560,\n", - " 1507, 1625, 1521, 1766, 1873, 1752, 1688, 1636, 1750, 1798, 1798, 1852,\n", - " 1852, 1852, 2144, 2019, 2019, 1923, 1923, 1842, 2184, 2066, 2066, 2206,\n", - " 2256, 2289, 2289, 2394, 2339, 2312, 2582, 2537, 2537, 2537, 2537, 2565,\n", - " 2521, 2606, 2606, 2578, 2501, 2501, 2501, 2764, 2858, 2784, 2784, 2663,\n", - " 2926, 2782, 2882, 2984, 2984, 3036, 3127, 3101, 3139, 3141, 3180, 3180,\n", - " 3180, 3180, 3314, 3319, 3319, 3319, 3319, 3558, 3522, 3706, 3987, 4111,\n", - " 4078, 4089, 4000, 4125, 4206, 4206, 4313, 4308, 4507, 4507, 4360, 4488,\n", - " 4453, 4566, 4451, 4587, 4802, 4802, 4774, 5079, 5079, 4905, 5095, 5095,\n", - " 5022, 5082, 5173, 5147, 5264, 5258, 5481, 5481, 5571, 5837, 5566, 5566,\n", - " 5649, 5612, 5887, 5911, 5694, 5596, 6124, 6124, 6090, 6090, 6328, 6126,\n", - " 6024, 6340, 6172, 5897, 5897, 6229, 6229, 6080, 6091, 6091, 6229, 6229,\n", - " 6296, 6296],\n", - " [ 4, 76, 32, 50, 11, 62, 4, 40, 52, 51, 77, 3,\n", - " 116, 74, 53, 58, 85, 23, 59, 109, 74, 108, 109, 37,\n", - " 73, 95, 65, 22, 25, 56, 69, 46, 55, 24, 42, 4,\n", - " 64, 74, 109, 75, 26, 116, 0, 69, 104, 61, 79, 117,\n", - " 105, 6, 80, 118, 111, 64, 39, 23, 78, 82, 12, 64,\n", - " 65, 6, 28, 41, 89, 41, 29, 67, 63, 92, 112, 109,\n", - " 74, 68, 96, 14, 88, 74, 109, 64, 41, 48, 41, 64,\n", - " 76, 67, 19, 65, 64, 76, 4, 7, 53, 81, 4, 65,\n", - " 74, 63, 10, 120, 21, 84, 14, 17, 4, 22, 116, 98,\n", - " 4, 50, 35, 21, 113, 20, 103, 70, 112, 119, 31, 106,\n", - " 57, 100, 105, 99, 4, 30, 110, 81, 2, 36, 69, 49,\n", - " 22, 55, 117, 71, 91, 33, 97, 108, 97, 112, 38, 94,\n", - " 34, 45, 66, 112, 16, 86, 4, 16, 86, 83, 108, 22,\n", - " 108, 4, 22, 8, 15, 5, 71, 72, 44, 120, 60, 59,\n", - " 97, 102, 90, 13, 115, 1, 114, 87, 69, 101, 108, 46,\n", - " 107, 9, 59, 69, 43, 71, 27, 47, 88, 93, 18, 69,\n", - " 54, 93]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1089, 681, 1301, ..., 6763, 2767, 5865],\n", - " [ 316, 85, 46, ..., 7692, 7825, 7831]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 109, 116, 26, ..., 104, 112, 85],\n", - " [ 107, 105, 15, ..., 6305, 6274, 6255]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 159, 159, 159, ..., 7822, 7822, 7771],\n", - " [ 232, 155, 279, ..., 35, 528, 512]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 356, 889, 308, ..., 127, 584, 113],\n", - " [ 480, 109, 343, ..., 7751, 7845, 7787]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1391, 7260, 5897, ..., 3361, 681, 4285],\n", - " [ 1, 39, 154, ..., 6298, 6260, 6259]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 159, 159, 159, ..., 7822, 7822, 7822],\n", - " [ 994, 1534, 2314, ..., 6193, 6595, 5774]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 211, 211, 211, ..., 6172, 6172, 6172],\n", - " [3898, 5026, 7334, ..., 5150, 1085, 5188]], device='cuda:0')}\n", - "Epoch: 003, Loss: 0.9613, Train: 341.3500\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005891\n", - "sampling 0.005429\n", - "noi time: 0.000734\n", - "get_vertex_data call: 0.070267\n", - "noi group time: 0.003811\n", - "eoi_group_time: 0.013731\n", - "second half: 0.262934\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 19149, 3106, ..., 1134482, 1100728, 1110070],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 19149, 3106, ..., 1134482, 1100728, 1110070],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1211788, 1221048, 1227408, ..., 1925034, 1930673, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1211788, 1221048, 1227408, ..., 1925034, 1930673, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137201, 1140284, 1135926, 1135160, 1140799, 1141758, 1136223, 1136969,\n", - " 1136971, 1138897, 1139808, 1139811, 1145999, 1137273, 1138942, 1143362,\n", - " 1143372, 1139241, 1150503, 1142963, 1139857, 1149216, 1142958, 1147473,\n", - " 1135987, 1153937, 1144632, 1134697, 1135111, 1148346, 1146669, 1146661,\n", - " 1146471, 1153220, 1136742, 1137220, 1139365, 1139371, 1147204, 1136683,\n", - " 1150329, 1152427, 1135183, 1138356, 1153467, 1134735, 1140030, 1140952,\n", - " 1140954, 1135367, 1135202, 1141036, 1136770, 1134794, 1138504, 1137342,\n", - " 1137534, 1143320, 1139161, 1142607, 1141081, 1138514, 1137957, 1154132,\n", - " 1135522, 1139684, 1138305, 1138440, 1140079, 1138461, 1138449, 1154790,\n", - " 1138695, 1156606, 1147116, 1142611, 1142615, 1142622, 1135359, 1158984,\n", - " 1148531, 1135769, 1139667, 1139673, 1134992, 1152640, 1159009, 1159018,\n", - " 1140034, 1139933, 1134891, 1146075, 1140557, 1152044, 1134922, 1140906,\n", - " 1134750, 1138246, 1135549, 1149001, 1145357, 1143767, 1139025, 1139033,\n", - " 1149969, 1146834, 1146832, 1142499, 1141681, 1141695, 1140469, 1141221,\n", - " 1141891, 1139386, 1141653, 1136917, 1143667, 1143677, 1139495, 1168566,\n", - " 1144650, 1147850, 1148075, 1142093, 1140169, 1158748, 1158749, 1138708,\n", - " 1140110, 1143107, 1136864, 1144182, 1144865, 1146201, 1134827, 1139560,\n", - " 1141365, 1153068, 1141664, 1149090, 1139015, 1139508, 1139510, 1145001,\n", - " 1143692, 1147050, 1147047, 1143536, 1141925, 1144242, 1141841, 1141853,\n", - " 1137149, 1150696, 1150698, 1143845, 1146024, 1146025, 1154323, 1141585,\n", - " 1142537, 1139990, 1139998, 1147543, 1147282, 1142816, 1142629, 1149366,\n", - " 1144923, 1138923, 1157720, 1136836, 1136832, 1144771, 1141496, 1142153,\n", - " 1145429, 1143345, 1144753, 1144083, 1150763, 1144310, 1150296, 1146523,\n", - " 1143456, 1143937, 1143949, 1135451, 1146636, 1140360, 1140364, 1168921,\n", - " 1144219, 1144222, 1147984, 1147999, 1148704, 1148710, 1141825, 1153702,\n", - " 1147070, 1147025, 1147031, 1142861, 1147971, 1147880, 1148364, 1149865,\n", - " 1154526, 1151646, 1145232, 1145240, 1145751, 1152530, 1152538, 1150438,\n", - " 1150350, 1165251, 1165252, 1152030, 1139914, 1149530, 1148278, 1147009,\n", - " 1147023, 1141949, 1146776, 1150736, 1141269, 1151795, 1154976, 1147653,\n", - " 1149412, 1148288, 1148291, 1146678, 1138404, 1157983, 1149810, 1148204,\n", - " 1153124, 1153188, 1152974, 1167964, 1152878, 1150356, 1155088, 1147442,\n", - " 1148498, 1148510, 1146565, 1141420, 1141408, 1152784, 1147737, 1149388,\n", - " 1146266, 1146972, 1156402, 1151920, 1151925, 1146623, 1151687, 1144465,\n", - " 1152103, 1146280, 1151729, 1137746, 1146304, 1140521, 1154123, 1152673,\n", - " 1154638, 1151617, 1151622, 1150578, 1136134, 1136798, 1148914, 1148916,\n", - " 1153385, 1152341, 1146816, 1153297, 1153311, 1152300, 1136028, 1158712,\n", - " 1151195, 1152928, 1151067, 1142777, 1150110, 1148040, 1167408, 1145656,\n", - " 1137052, 1148628, 1149947, 1154564, 1142041, 1157226, 1158857, 1145191,\n", - " 1137811, 1151257, 1135730, 1156638, 1153413, 1155441, 1137971, 1150132,\n", - " 1162120, 1154530, 1142755, 1142764, 1156207, 1156271, 1151379, 1155122,\n", - " 1149324, 1155748, 1156563, 1158566, 1158823, 1158824, 1158829, 1153715,\n", - " 1148835, 1148647, 1143262, 1143263, 1146936, 1156711, 1163132, 1143189,\n", - " 1150371, 1153322, 1153325, 1155615, 1155613, 1140751, 1157654, 1158584,\n", - " 1153786, 1145693, 1178445, 1150661, 1150671, 1158665, 1149137, 1149145,\n", - " 1159258, 1152209, 1159213, 1152498, 1156698, 1140368, 1140380, 1140374,\n", - " 1156031, 1157033, 1144843, 1155971, 1155975, 1161673, 1142076, 1158840,\n", - " 1158846, 1161899, 1154600, 1160163, 1136896, 1158753, 1157304, 1158802,\n", - " 1158815, 1158438, 1158447, 1158444, 1156778, 1158285, 1152458, 1136487,\n", - " 1136494, 1156665, 1156490, 1153808, 1136640, 1140049, 1146123, 1146126,\n", - " 1155521, 1142493, 1167359, 1157944, 1162039, 1153052, 1153045, 1156104,\n", - " 1156107, 1138393, 1150046, 1155479, 1154299, 1153514, 1164857, 1164859,\n", - " 1146873, 1156784, 1149953, 1139782, 1154590, 1166073, 1157236, 1157247,\n", - " 1146063, 1158449, 1160697, 1158868, 1169493, 1140643, 1148593, 1159646,\n", - " 1156363, 1156353, 1156361, 1159025, 1169109, 1152247, 1158905, 1160605,\n", - " 1155588, 1151227, 1148567, 1147836, 1146500, 1144737, 1144739, 1153212,\n", - " 1141471, 1147426, 1157052, 1156737, 1156739, 1156742, 1157955, 1153663,\n", - " 1166579, 1150648, 1144812, 1135567, 1142722, 1142733, 1156303, 1165644,\n", - " 1145743, 1145176, 1165943, 1169282, 1155326, 1155324, 1144973, 1147694,\n", - " 1145447, 1152630, 1155907, 1148113, 1148124, 1145902, 1153520, 1168666,\n", - " 1143392, 1143404, 1171229, 1158735, 1154076, 1150773, 1171777, 1180418,\n", - " 1150515, 1150518, 1144336, 1157534, 1147746, 1147750, 1171413, 1141048,\n", - " 1141054, 1151664, 1146337, 1138609, 1149688, 1158611, 1172575, 1172866,\n", - " 1149847, 1160138, 1160032, 1147409, 1172486, 1152353, 1164652, 1149402,\n", - " 1148661, 1162222, 1167010, 1173307, 1160935, 1154028, 1152150, 1152151,\n", - " 1157158, 1157153, 1172111, 1157371, 1157373, 1147711, 1151850, 1157598,\n", - " 1169037, 1166746, 1178281, 1178056, 1159100, 1177683, 1170874, 1182132,\n", - " 1154151, 1154148, 1149173, 1179243, 1171302, 1153803, 1153141, 1164818,\n", - " 1171122, 1186306, 1171407, 1171773, 1171623, 1181380, 1155794, 1155796,\n", - " 1157132, 1174947, 1158249, 1154497, 1134654, 1164563, 1145626, 1156432,\n", - " 1172024, 1178760, 1161907, 1146252, 1153609, 1184313, 1140399, 1168273,\n", - " 1162253, 1164231, 1161819, 1189069, 1162754, 1164133, 1168943, 1170431,\n", - " 1192741, 1139831, 1150265, 1154812, 1192076, 1156049, 1156055, 1151972,\n", - " 1173019, 1193366, 1188161, 1181951, 1168683, 1171675, 1151774, 1190455,\n", - " 1175349, 1160350, 1156681, 1156672, 1172122, 1166789, 1145395, 1160963,\n", - " 1155962, 1185603, 1155553, 1191288, 1169831, 1169837, 1172896, 1167471,\n", - " 1187634], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137201, 1140284, 1135926, 1135160, 1140799, 1141758, 1136223, 1136969,\n", - " 1136971, 1138897, 1139808, 1139811, 1145999, 1137273, 1138942, 1143362,\n", - " 1143372, 1139241, 1150503, 1142963, 1139857, 1149216, 1142958, 1147473,\n", - " 1135987, 1153937, 1144632, 1134697, 1135111, 1148346, 1146669, 1146661,\n", - " 1146471, 1153220, 1136742, 1137220, 1139365, 1139371, 1147204, 1136683,\n", - " 1150329, 1152427, 1135183, 1138356, 1153467, 1134735, 1140030, 1140952,\n", - " 1140954, 1135367, 1135202, 1141036, 1136770, 1134794, 1138504, 1137342,\n", - " 1137534, 1143320, 1139161, 1142607, 1141081, 1138514, 1137957, 1154132,\n", - " 1135522, 1139684, 1138305, 1138440, 1140079, 1138461, 1138449, 1154790,\n", - " 1138695, 1156606, 1147116, 1142611, 1142615, 1142622, 1135359, 1158984,\n", - " 1148531, 1135769, 1139667, 1139673, 1134992, 1152640, 1159009, 1159018,\n", - " 1140034, 1139933, 1134891, 1146075, 1140557, 1152044, 1134922, 1140906,\n", - " 1134750, 1138246, 1135549, 1149001, 1145357, 1143767, 1139025, 1139033,\n", - " 1149969, 1146834, 1146832, 1142499, 1141681, 1141695, 1140469, 1141221,\n", - " 1141891, 1139386, 1141653, 1136917, 1143667, 1143677, 1139495, 1168566,\n", - " 1144650, 1147850, 1148075, 1142093, 1140169, 1158748, 1158749, 1138708,\n", - " 1140110, 1143107, 1136864, 1144182, 1144865, 1146201, 1134827, 1139560,\n", - " 1141365, 1153068, 1141664, 1149090, 1139015, 1139508, 1139510, 1145001,\n", - " 1143692, 1147050, 1147047, 1143536, 1141925, 1144242, 1141841, 1141853,\n", - " 1137149, 1150696, 1150698, 1143845, 1146024, 1146025, 1154323, 1141585,\n", - " 1142537, 1139990, 1139998, 1147543, 1147282, 1142816, 1142629, 1149366,\n", - " 1144923, 1138923, 1157720, 1136836, 1136832, 1144771, 1141496, 1142153,\n", - " 1145429, 1143345, 1144753, 1144083, 1150763, 1144310, 1150296, 1146523,\n", - " 1143456, 1143937, 1143949, 1135451, 1146636, 1140360, 1140364, 1168921,\n", - " 1144219, 1144222, 1147984, 1147999, 1148704, 1148710, 1141825, 1153702,\n", - " 1147070, 1147025, 1147031, 1142861, 1147971, 1147880, 1148364, 1149865,\n", - " 1154526, 1151646, 1145232, 1145240, 1145751, 1152530, 1152538, 1150438,\n", - " 1150350, 1165251, 1165252, 1152030, 1139914, 1149530, 1148278, 1147009,\n", - " 1147023, 1141949, 1146776, 1150736, 1141269, 1151795, 1154976, 1147653,\n", - " 1149412, 1148288, 1148291, 1146678, 1138404, 1157983, 1149810, 1148204,\n", - " 1153124, 1153188, 1152974, 1167964, 1152878, 1150356, 1155088, 1147442,\n", - " 1148498, 1148510, 1146565, 1141420, 1141408, 1152784, 1147737, 1149388,\n", - " 1146266, 1146972, 1156402, 1151920, 1151925, 1146623, 1151687, 1144465,\n", - " 1152103, 1146280, 1151729, 1137746, 1146304, 1140521, 1154123, 1152673,\n", - " 1154638, 1151617, 1151622, 1150578, 1136134, 1136798, 1148914, 1148916,\n", - " 1153385, 1152341, 1146816, 1153297, 1153311, 1152300, 1136028, 1158712,\n", - " 1151195, 1152928, 1151067, 1142777, 1150110, 1148040, 1167408, 1145656,\n", - " 1137052, 1148628, 1149947, 1154564, 1142041, 1157226, 1158857, 1145191,\n", - " 1137811, 1151257, 1135730, 1156638, 1153413, 1155441, 1137971, 1150132,\n", - " 1162120, 1154530, 1142755, 1142764, 1156207, 1156271, 1151379, 1155122,\n", - " 1149324, 1155748, 1156563, 1158566, 1158823, 1158824, 1158829, 1153715,\n", - " 1148835, 1148647, 1143262, 1143263, 1146936, 1156711, 1163132, 1143189,\n", - " 1150371, 1153322, 1153325, 1155615, 1155613, 1140751, 1157654, 1158584,\n", - " 1153786, 1145693, 1178445, 1150661, 1150671, 1158665, 1149137, 1149145,\n", - " 1159258, 1152209, 1159213, 1152498, 1156698, 1140368, 1140380, 1140374,\n", - " 1156031, 1157033, 1144843, 1155971, 1155975, 1161673, 1142076, 1158840,\n", - " 1158846, 1161899, 1154600, 1160163, 1136896, 1158753, 1157304, 1158802,\n", - " 1158815, 1158438, 1158447, 1158444, 1156778, 1158285, 1152458, 1136487,\n", - " 1136494, 1156665, 1156490, 1153808, 1136640, 1140049, 1146123, 1146126,\n", - " 1155521, 1142493, 1167359, 1157944, 1162039, 1153052, 1153045, 1156104,\n", - " 1156107, 1138393, 1150046, 1155479, 1154299, 1153514, 1164857, 1164859,\n", - " 1146873, 1156784, 1149953, 1139782, 1154590, 1166073, 1157236, 1157247,\n", - " 1146063, 1158449, 1160697, 1158868, 1169493, 1140643, 1148593, 1159646,\n", - " 1156363, 1156353, 1156361, 1159025, 1169109, 1152247, 1158905, 1160605,\n", - " 1155588, 1151227, 1148567, 1147836, 1146500, 1144737, 1144739, 1153212,\n", - " 1141471, 1147426, 1157052, 1156737, 1156739, 1156742, 1157955, 1153663,\n", - " 1166579, 1150648, 1144812, 1135567, 1142722, 1142733, 1156303, 1165644,\n", - " 1145743, 1145176, 1165943, 1169282, 1155326, 1155324, 1144973, 1147694,\n", - " 1145447, 1152630, 1155907, 1148113, 1148124, 1145902, 1153520, 1168666,\n", - " 1143392, 1143404, 1171229, 1158735, 1154076, 1150773, 1171777, 1180418,\n", - " 1150515, 1150518, 1144336, 1157534, 1147746, 1147750, 1171413, 1141048,\n", - " 1141054, 1151664, 1146337, 1138609, 1149688, 1158611, 1172575, 1172866,\n", - " 1149847, 1160138, 1160032, 1147409, 1172486, 1152353, 1164652, 1149402,\n", - " 1148661, 1162222, 1167010, 1173307, 1160935, 1154028, 1152150, 1152151,\n", - " 1157158, 1157153, 1172111, 1157371, 1157373, 1147711, 1151850, 1157598,\n", - " 1169037, 1166746, 1178281, 1178056, 1159100, 1177683, 1170874, 1182132,\n", - " 1154151, 1154148, 1149173, 1179243, 1171302, 1153803, 1153141, 1164818,\n", - " 1171122, 1186306, 1171407, 1171773, 1171623, 1181380, 1155794, 1155796,\n", - " 1157132, 1174947, 1158249, 1154497, 1134654, 1164563, 1145626, 1156432,\n", - " 1172024, 1178760, 1161907, 1146252, 1153609, 1184313, 1140399, 1168273,\n", - " 1162253, 1164231, 1161819, 1189069, 1162754, 1164133, 1168943, 1170431,\n", - " 1192741, 1139831, 1150265, 1154812, 1192076, 1156049, 1156055, 1151972,\n", - " 1173019, 1193366, 1188161, 1181951, 1168683, 1171675, 1151774, 1190455,\n", - " 1175349, 1160350, 1156681, 1156672, 1172122, 1166789, 1145395, 1160963,\n", - " 1155962, 1185603, 1155553, 1191288, 1169831, 1169837, 1172896, 1167471,\n", - " 1187634], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195442, 1197226, 1197717, 1199282, 1198458, 1202255, 1198844, 1201582,\n", - " 1202119, 1199248, 1201016, 1198694, 1198546, 1198557, 1197512, 1194743,\n", - " 1194780, 1194783, 1199053, 1195511, 1195922, 1195263, 1199135, 1201992,\n", - " 1198543, 1199519, 1195888, 1199171, 1195740, 1196359, 1197807, 1195571,\n", - " 1198958, 1198646, 1198650, 1198163, 1196717, 1195279, 1195245, 1197273,\n", - " 1194859, 1195850, 1199384, 1195541, 1196283, 1196034, 1199060, 1194928,\n", - " 1199628, 1197990, 1200878, 1198400, 1198410, 1199579, 1199231, 1201908,\n", - " 1198765, 1196496, 1197977, 1201889, 1197601, 1196727, 1200887, 1200892,\n", - " 1200894, 1198811, 1199555, 1201824, 1201827, 1198066, 1199445, 1201079,\n", - " 1201156, 1200913, 1199546, 1202641, 1199712, 1199723, 1201049, 1201052,\n", - " 1200546, 1200553, 1200429, 1197097, 1202541, 1202055, 1199917, 1201442,\n", - " 1201034, 1200831, 1199976, 1195876, 1201291, 1199922, 1200242, 1200398,\n", - " 1196960, 1196966, 1198338, 1200997, 1200784, 1199606, 1194699, 1195679,\n", - " 1200445, 1200276, 1203102, 1201138, 1200003, 1197731, 1197735, 1200437,\n", - " 1199786, 1198819, 1199234, 1201001, 1200974, 1195070, 1201886, 1198140,\n", - " 1197652, 1201808, 1194908, 1201966, 1196428], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195442, 1197226, 1197717, 1199282, 1198458, 1202255, 1198844, 1201582,\n", - " 1202119, 1199248, 1201016, 1198694, 1198546, 1198557, 1197512, 1194743,\n", - " 1194780, 1194783, 1199053, 1195511, 1195922, 1195263, 1199135, 1201992,\n", - " 1198543, 1199519, 1195888, 1199171, 1195740, 1196359, 1197807, 1195571,\n", - " 1198958, 1198646, 1198650, 1198163, 1196717, 1195279, 1195245, 1197273,\n", - " 1194859, 1195850, 1199384, 1195541, 1196283, 1196034, 1199060, 1194928,\n", - " 1199628, 1197990, 1200878, 1198400, 1198410, 1199579, 1199231, 1201908,\n", - " 1198765, 1196496, 1197977, 1201889, 1197601, 1196727, 1200887, 1200892,\n", - " 1200894, 1198811, 1199555, 1201824, 1201827, 1198066, 1199445, 1201079,\n", - " 1201156, 1200913, 1199546, 1202641, 1199712, 1199723, 1201049, 1201052,\n", - " 1200546, 1200553, 1200429, 1197097, 1202541, 1202055, 1199917, 1201442,\n", - " 1201034, 1200831, 1199976, 1195876, 1201291, 1199922, 1200242, 1200398,\n", - " 1196960, 1196966, 1198338, 1200997, 1200784, 1199606, 1194699, 1195679,\n", - " 1200445, 1200276, 1203102, 1201138, 1200003, 1197731, 1197735, 1200437,\n", - " 1199786, 1198819, 1199234, 1201001, 1200974, 1195070, 1201886, 1198140,\n", - " 1197652, 1201808, 1194908, 1201966, 1196428], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 1.2123e-01, 2.2561e-02, 7.0872e-01, ..., 1.5348e-01,\n", - " -2.0622e-03, -4.5803e-03],\n", - " [ 9.0456e-02, 3.9586e-02, 4.7644e-01, ..., 1.5348e-01,\n", - " -1.9690e-03, -3.3386e-03],\n", - " [ 1.1881e-01, 1.0650e-01, 5.6896e-01, ..., 1.6203e-01,\n", - " -1.6057e-03, -3.9764e-03],\n", - " ...,\n", - " [ 1.1204e-01, -8.7632e-05, 4.4628e-01, ..., 7.8640e-02,\n", - " -1.3438e-03, -3.5754e-03],\n", - " [ 1.0758e-01, 8.1110e-02, 5.5243e-01, ..., 1.4873e-01,\n", - " -1.4875e-03, -3.8021e-03],\n", - " [ 1.9635e-01, 2.0944e-02, 7.9077e-01, ..., 1.3242e-01,\n", - " -1.7907e-03, -5.3158e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 7.0131e-01, -3.6628e-03, 1.0389e+00, ..., -6.0191e-03,\n", - " -1.0773e-02, -8.9746e-04],\n", - " [ 1.6596e+00, -9.8609e-04, 3.1419e+00, ..., -3.4709e-03,\n", - " -2.7373e-02, 9.9045e-01],\n", - " [ 8.9519e-01, -1.6882e-03, 8.9895e-01, ..., -6.9233e-03,\n", - " -1.0210e-02, 8.1416e-02],\n", - " ...,\n", - " [ 3.8787e-01, -2.3835e-02, 3.6763e+00, ..., -1.8915e-02,\n", - " -2.6146e-02, -1.4781e-02],\n", - " [ 1.7666e+00, -5.4134e-03, 2.7908e+00, ..., -8.5502e-04,\n", - " -2.2349e-02, 8.8432e-01],\n", - " [ 2.1060e+00, -1.1809e-02, 2.2252e+00, ..., 1.3899e-01,\n", - " -3.6905e-02, 2.7772e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-1.3774e-03, 9.9079e-02, 2.7270e-01, ..., 1.5326e+00,\n", - " -6.3714e-04, 7.3957e-02],\n", - " [-6.8971e-04, 2.3554e-02, 1.5061e-01, ..., 1.4001e-01,\n", - " -2.4980e-04, -8.0816e-04],\n", - " [-6.8971e-04, 2.3554e-02, 1.5061e-01, ..., 1.4001e-01,\n", - " -2.4980e-04, -8.0816e-04],\n", - " ...,\n", - " [-1.5553e-03, 1.0538e-01, 2.3715e-01, ..., 1.3952e+00,\n", - " -9.1861e-04, 9.8272e-02],\n", - " [-1.1710e-03, 1.1931e-01, 2.1049e-01, ..., 1.5464e+00,\n", - " 1.5040e-02, 1.7390e-01],\n", - " [-2.1186e-03, 1.2042e-01, 3.1702e-01, ..., 1.2350e+00,\n", - " -2.7637e-03, -8.1186e-04]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-4.4007e-04, 3.9447e-01, 1.5817e-01, ..., -6.0696e-03,\n", - " 2.1972e-01, 1.2876e-01],\n", - " [ 1.4964e-01, 6.8409e-01, 4.7271e-01, ..., -5.2975e-03,\n", - " 2.3427e-01, -1.0414e-03],\n", - " [-3.3001e-05, 4.2393e-01, 2.4285e-02, ..., -5.3938e-03,\n", - " 3.2358e-01, 8.8539e-02],\n", - " ...,\n", - " [-3.0007e-04, 4.2925e-01, 1.9298e-01, ..., -5.9721e-03,\n", - " 9.3939e-03, 2.3228e-01],\n", - " [-1.0335e-03, 5.9045e-01, 4.5685e-01, ..., -1.0164e-02,\n", - " 2.8636e-01, 3.9017e-01],\n", - " [-8.3029e-04, 4.7312e-01, 2.4143e-01, ..., -5.2789e-03,\n", - " 2.3118e-01, 1.3535e-01]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 150, 135, 135, 23, 135, 330, 386, 476, 262, 304, 327, 327,\n", - " 964, 619, 692, 1000, 1000, 1000, 1000, 1172, 1129, 1097, 1389, 1423,\n", - " 1423, 1535, 1410, 1413, 1535, 1758, 1528, 1528, 1535, 1535, 1535, 1486,\n", - " 1586, 1416, 1416, 1599, 1451, 1823, 1527, 1795, 1795, 1795, 1855, 1855,\n", - " 1855, 1856, 2052, 2193, 2193, 2124, 2343, 2252, 2276, 2276, 2276, 2426,\n", - " 2118, 2118, 2118, 2416, 2439, 2474, 2417, 2327, 2655, 2655, 2472, 2723,\n", - " 2723, 2439, 2518, 2654, 2654, 2633, 2633, 2771, 2667, 2679, 2783, 2946,\n", - " 3102, 3020, 3222, 3222, 3101, 3300, 3254, 3442, 3333, 3333, 3596, 3522,\n", - " 3399, 3426, 3621, 3578, 4024, 3615, 3579, 3785, 3709, 4075, 4076, 4004,\n", - " 4089, 3972, 3991, 4031, 4137, 4137, 4091, 4141, 4141, 4193, 4241, 4449,\n", - " 4476, 4519, 4387, 4578, 4456, 4829, 4635, 4745, 4718, 4516, 4919, 4820,\n", - " 5047, 5039, 5039, 5128, 5140, 5231, 5231, 5093, 5164, 5276, 5369, 5323,\n", - " 5454, 5762, 5750, 5750, 5597, 5511, 5386, 5386, 5386, 5537, 6130, 6592,\n", - " 6186, 6309, 6326, 6156, 6050, 6525, 6500, 6376, 6342, 6442, 6338, 6500,\n", - " 6500, 6500, 6500, 6352, 6552],\n", - " [ 23, 99, 34, 57, 8, 40, 18, 26, 84, 80, 97, 50,\n", - " 114, 102, 5, 124, 73, 44, 61, 37, 122, 61, 26, 6,\n", - " 84, 5, 18, 36, 47, 114, 58, 59, 3, 90, 52, 66,\n", - " 57, 65, 53, 25, 11, 96, 102, 60, 68, 106, 47, 113,\n", - " 43, 84, 64, 33, 85, 81, 18, 115, 110, 94, 54, 21,\n", - " 87, 14, 61, 114, 72, 83, 30, 42, 91, 31, 107, 92,\n", - " 23, 61, 61, 13, 1, 3, 21, 114, 13, 43, 92, 17,\n", - " 42, 3, 77, 119, 16, 63, 45, 2, 92, 105, 99, 110,\n", - " 38, 122, 71, 119, 119, 44, 120, 27, 26, 32, 49, 59,\n", - " 20, 59, 121, 57, 109, 23, 108, 55, 0, 0, 42, 76,\n", - " 51, 86, 12, 104, 82, 114, 69, 22, 118, 29, 24, 13,\n", - " 28, 6, 62, 48, 54, 116, 89, 35, 67, 117, 4, 111,\n", - " 78, 93, 97, 56, 15, 70, 75, 31, 10, 95, 101, 103,\n", - " 9, 23, 100, 74, 9, 61, 85, 112, 46, 7, 41, 79,\n", - " 123, 88, 98, 39, 19]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2032, 3078, 3330, ..., 1393, 5382, 429],\n", - " [ 140, 186, 114, ..., 6062, 6087, 6082]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 122, 28, 91, 122, 122, 66, 69, 102, 92, 18, 66, 102,\n", - " 119, 69, 28, 28, 92, 91, 18, 122, 102, 31, 42, 20,\n", - " 92, 121, 18, 66, 18, 83, 28, 28, 31, 69, 91, 66,\n", - " 42, 102, 18, 121, 83, 28, 42, 83, 28, 42, 83, 83,\n", - " 102, 57, 102, 83, 57, 57, 69, 31, 92, 91, 18, 42,\n", - " 28, 102, 31, 122, 121, 91, 18, 83, 69, 31, 91, 57,\n", - " 42, 69, 18, 57, 122, 31, 69, 92, 122, 31, 102, 83,\n", - " 42, 114, 42, 114, 114, 42, 66, 119, 18, 121, 114, 92,\n", - " 57, 18, 31, 114, 42, 119, 66, 102, 92, 83, 114, 114,\n", - " 31, 122, 114, 102, 31, 28, 57, 92, 66, 18, 119, 114,\n", - " 42, 42, 122, 119, 114, 121, 28, 114, 119, 122, 83, 114,\n", - " 42, 18, 102, 18, 28, 57, 57, 83, 31, 28, 28, 102,\n", - " 57, 28, 42, 119, 102, 91, 69, 69, 114, 18, 20, 119,\n", - " 119, 66, 57, 92, 42, 121, 57, 121, 31, 31, 122, 102,\n", - " 66, 102, 83, 28, 121, 91, 66, 31, 122, 18, 91, 31,\n", - " 92, 18, 66, 18, 18, 121, 57, 122, 122, 18, 122, 119,\n", - " 122, 83, 66, 121, 69, 92, 92, 42, 119, 122, 119, 83,\n", - " 119, 92, 42, 20, 114, 20, 102, 42, 91, 102, 114, 91,\n", - " 121, 69, 31, 114, 91, 119, 91, 57, 102, 83, 18, 66,\n", - " 83, 114, 102, 119, 102, 91, 114, 57, 83, 69, 28, 119,\n", - " 121, 114, 119, 91, 57, 31, 119, 20, 69, 20, 114, 20,\n", - " 121, 121, 66, 92, 69, 20, 121, 31, 92, 42, 119, 66,\n", - " 57, 122, 92, 121, 18, 57, 121, 57, 20, 83, 114, 91,\n", - " 122, 69, 20, 20, 119, 83, 28, 102, 57, 31, 91, 28,\n", - " 57, 28, 92, 83, 31, 121, 92, 83, 66, 57, 122, 66,\n", - " 122, 119, 114, 91, 102, 69, 102, 121, 31, 119, 102, 91,\n", - " 122, 66, 66, 114, 83, 92, 91, 119, 119, 102, 28, 121,\n", - " 57, 42, 121, 31, 91, 42, 92, 28, 122, 42, 92, 91,\n", - " 122, 121, 42, 18, 114, 119, 31, 18, 28, 28, 42, 122,\n", - " 92, 121, 66, 69, 121, 69, 83, 31, 83, 42, 91, 28,\n", - " 18, 66, 28, 66, 121, 69, 31, 69, 69, 66, 69, 66,\n", - " 92, 91, 83, 114, 69, 18, 69, 92, 92, 91, 57, 57,\n", - " 69, 66],\n", - " [ 2, 72, 103, 172, 120, 139, 19, 160, 85, 117, 110, 121,\n", - " 39, 112, 151, 452, 1, 321, 58, 63, 208, 324, 287, 229,\n", - " 353, 11, 404, 380, 254, 835, 351, 393, 275, 397, 618, 315,\n", - " 716, 619, 515, 432, 680, 601, 818, 729, 850, 725, 1113, 833,\n", - " 793, 907, 780, 862, 812, 840, 1111, 1204, 1291, 884, 1138, 1133,\n", - " 1209, 1038, 1176, 1245, 1057, 943, 873, 1235, 1310, 1039, 1272, 1445,\n", - " 1159, 1270, 1211, 1504, 1373, 1512, 1639, 1544, 1435, 1462, 1279, 1567,\n", - " 1368, 1442, 1380, 1455, 1426, 1572, 1534, 1575, 1525, 1771, 1571, 1687,\n", - " 1699, 1768, 1882, 1712, 1662, 1777, 1615, 1766, 1627, 1691, 1787, 1733,\n", - " 1718, 1750, 1945, 1917, 1736, 1779, 1671, 1813, 1818, 1846, 1894, 2002,\n", - " 2020, 1968, 1971, 2120, 1943, 2042, 2089, 2072, 1941, 2227, 2201, 1940,\n", - " 2099, 2007, 2427, 2279, 2191, 2245, 2114, 2287, 2293, 2311, 2295, 2269,\n", - " 2303, 2225, 2223, 2379, 2273, 2359, 2306, 2385, 2376, 2347, 2383, 2333,\n", - " 2660, 2437, 2432, 2425, 2528, 2435, 2361, 2340, 2447, 2490, 2625, 2406,\n", - " 2573, 2572, 2492, 2720, 2507, 2575, 2837, 2457, 2630, 2588, 2742, 2636,\n", - " 2651, 2765, 2695, 2682, 2615, 2714, 2762, 2645, 2914, 3017, 2979, 2980,\n", - " 3030, 2960, 3112, 2911, 3299, 3239, 3077, 3129, 3144, 3175, 3014, 3083,\n", - " 3259, 3354, 3170, 3297, 3261, 3280, 3336, 3266, 3287, 3427, 3141, 3371,\n", - " 3352, 3370, 3432, 3514, 3439, 3466, 3557, 3493, 3494, 3671, 3418, 3898,\n", - " 3622, 3558, 3633, 3744, 3760, 3769, 3764, 3600, 4019, 3599, 3918, 4036,\n", - " 3938, 3986, 3968, 4014, 3672, 4026, 3975, 3771, 3920, 3921, 4085, 4042,\n", - " 4082, 4073, 4078, 4084, 4113, 4089, 4065, 4107, 4115, 4119, 4092, 4093,\n", - " 4147, 4134, 4144, 4148, 4153, 4173, 4169, 4112, 4171, 4152, 4160, 4195,\n", - " 4174, 4218, 4298, 4245, 4288, 4275, 4231, 4302, 4385, 4309, 4526, 4432,\n", - " 4255, 4389, 4419, 4537, 4329, 4401, 4504, 4412, 4305, 4604, 4532, 4344,\n", - " 4448, 4576, 4325, 4855, 4560, 4529, 4600, 4638, 4628, 4554, 4768, 4653,\n", - " 4556, 4759, 4781, 4631, 4614, 4751, 4946, 4739, 4789, 5104, 5041, 4971,\n", - " 4803, 5061, 5174, 4964, 5060, 5143, 5233, 5173, 5232, 5224, 5201, 5206,\n", - " 5337, 5262, 5353, 5556, 5451, 5452, 5448, 5390, 5298, 5600, 5609, 5515,\n", - " 5547, 5712, 5625, 5469, 5370, 5381, 5528, 5311, 5937, 5696, 5578, 5893,\n", - " 5823, 5496, 5953, 5986, 6244, 6005, 5736, 5982, 5944, 6199, 6253, 6028,\n", - " 6045, 6172, 6507, 6184, 6377, 6430, 6144, 6151, 6494, 6549, 6504, 6304,\n", - " 6493, 6471]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 120, 120, 120, ..., 6062, 6062, 6062],\n", - " [ 267, 136, 165, ..., 82, 569, 265]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 40, 342, 267, ..., 128, 569, 293],\n", - " [ 84, 103, 20, ..., 6033, 6065, 6140]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1035, 2139, 1041, ..., 3578, 6123, 2728],\n", - " [ 161, 161, 32, ..., 6503, 6618, 6584]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 126, 126, 126, ..., 6062, 6062, 6062],\n", - " [3493, 3568, 955, ..., 4426, 3122, 5931]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 23, 23, 23, ..., 6579, 6579, 6579],\n", - " [ 58, 1665, 2309, ..., 4652, 4711, 1786]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006284\n", - "sampling 0.00613\n", - "noi time: 0.002697\n", - "get_vertex_data call: 0.035234\n", - "noi group time: 0.003582\n", - "eoi_group_time: 0.015329\n", - "second half: 0.230384\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24182, 24187, 21468, ..., 1120069, 1110069, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24182, 24187, 21468, ..., 1120069, 1110069, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224372, 1219057, 1227414, ..., 1929220, 1931110, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224372, 1219057, 1227414, ..., 1929220, 1931110, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1140282, 1140285, 1135926, 1135160, 1137784, 1137791, 1139698,\n", - " 1141758, 1137506, 1137513, 1138335, 1141251, 1136151, 1136971, 1141443,\n", - " 1146803, 1143615, 1149839, 1139811, 1137271, 1138933, 1138938, 1143372,\n", - " 1139241, 1146646, 1139609, 1139615, 1139958, 1148987, 1150497, 1150506,\n", - " 1150509, 1148576, 1149216, 1142958, 1155689, 1143820, 1147473, 1147483,\n", - " 1147487, 1135992, 1149294, 1135260, 1146995, 1146996, 1153015, 1134694,\n", - " 1134697, 1148337, 1146656, 1146669, 1150193, 1146475, 1136125, 1152664,\n", - " 1138345, 1153217, 1153231, 1147095, 1147094, 1137220, 1150554, 1155018,\n", - " 1155019, 1136268, 1140540, 1138112, 1138116, 1138356, 1140151, 1140159,\n", - " 1134735, 1140020, 1140027, 1135360, 1135367, 1135202, 1135903, 1137798,\n", - " 1141036, 1136297, 1134794, 1134797, 1136519, 1138504, 1137329, 1157103,\n", - " 1137693, 1136619, 1139215, 1144395, 1135408, 1157397, 1152376, 1136662,\n", - " 1137441, 1137472, 1136193, 1136204, 1136942, 1135265, 1156148, 1156149,\n", - " 1148481, 1134841, 1141702, 1135583, 1136111, 1135246, 1138514, 1153094,\n", - " 1137957, 1137959, 1158136, 1154132, 1145132, 1145120, 1135522, 1139684,\n", - " 1139685, 1138305, 1137287, 1138440, 1138445, 1138461, 1154790, 1157188,\n", - " 1137924, 1136594, 1135135, 1158386, 1158390, 1149328, 1135088, 1156603,\n", - " 1156606, 1147112, 1142611, 1160825, 1135359, 1135618, 1156141, 1138185,\n", - " 1145842, 1145843, 1148531, 1150956, 1141533, 1139673, 1138067, 1134992,\n", - " 1139755, 1140193, 1140199, 1158974, 1153543, 1140034, 1140036, 1139078,\n", - " 1139933, 1138648, 1138147, 1146075, 1141985, 1152042, 1152044, 1137734,\n", - " 1137728, 1134922, 1140901, 1134750, 1135549, 1136697, 1141088, 1141098,\n", - " 1149001, 1139898, 1136397, 1143767, 1143224, 1139033, 1149979, 1149982,\n", - " 1146844, 1141695, 1135860, 1135861, 1136632, 1141224, 1139386, 1143667,\n", - " 1143673, 1143677, 1137188, 1145066, 1144237, 1140607, 1141156, 1141159,\n", - " 1138785, 1139495, 1144937, 1134979, 1147850, 1137087, 1144428, 1141821,\n", - " 1143203, 1140166, 1158746, 1158749, 1142713, 1141479, 1138708, 1140102,\n", - " 1140110, 1142913, 1138424, 1143107, 1144442, 1144596, 1136867, 1136864,\n", - " 1145298, 1140885, 1144182, 1137603, 1134827, 1136565, 1158699, 1137844,\n", - " 1161701, 1147153, 1136378, 1149188, 1141365, 1141367, 1153068, 1151119,\n", - " 1141669, 1138292, 1138293, 1144277, 1144279, 1143915, 1143919, 1139510,\n", - " 1139763, 1144992, 1145200, 1140616, 1140619, 1147888, 1139171, 1140976,\n", - " 1140990, 1141565, 1147050, 1147047, 1145873, 1152976, 1160248, 1160251,\n", - " 1135457, 1142555, 1139453, 1139000, 1141925, 1144242, 1141841, 1150689,\n", - " 1140690, 1139405, 1134851, 1134861, 1143845, 1136277, 1146024, 1146129,\n", - " 1146131, 1154327, 1149935, 1139990, 1143293, 1143283, 1143294, 1151134,\n", - " 1148760, 1147282, 1142816, 1142628, 1149372, 1149608, 1149610, 1143051,\n", - " 1136167, 1138922, 1138923, 1136836, 1139304, 1139329, 1141490, 1141496,\n", - " 1141502, 1142149, 1143345, 1144765, 1144611, 1145808, 1145812, 1145813,\n", - " 1144083, 1135876, 1135813, 1146523, 1143954, 1143961, 1143467, 1140488,\n", - " 1143937, 1140816, 1147580, 1147574, 1143798, 1146628, 1146636, 1147521,\n", - " 1140361, 1140360, 1140364, 1143080, 1144219, 1147996, 1147999, 1134899,\n", - " 1139252, 1145462, 1147234, 1147244, 1148704, 1150996, 1141316, 1141327,\n", - " 1141825, 1141836, 1146742, 1148466, 1153701, 1143434, 1149725, 1147025,\n", - " 1147027, 1147024, 1139549, 1158226, 1148355, 1149871, 1154526, 1151644,\n", - " 1145240, 1145750, 1145751, 1146159, 1138638, 1148391, 1151239, 1151240,\n", - " 1151242, 1148210, 1169870, 1152530, 1150445, 1155003, 1154435, 1149791,\n", - " 1144514, 1144526, 1150339, 1152013, 1165253, 1147794, 1151480, 1152023,\n", - " 1152024, 1152027, 1152026, 1154263, 1151041, 1145255, 1134878, 1140566,\n", - " 1149522, 1147019, 1147009, 1147023, 1153159, 1135805, 1158950, 1158955,\n", - " 1141941, 1141949, 1150745, 1144819, 1148740, 1137640, 1153572, 1153574,\n", - " 1147653, 1147654, 1143560, 1149412, 1148288, 1152073, 1137724, 1147866,\n", - " 1154420, 1154424, 1148188, 1152561, 1138202, 1139721, 1146686, 1157968,\n", - " 1157983, 1148720, 1145858, 1149810, 1148204, 1153181, 1154195, 1153124,\n", - " 1153125, 1153192, 1153188, 1153197, 1145106, 1145111, 1150932, 1152867,\n", - " 1152868, 1152878, 1173078, 1150356, 1155088, 1148084, 1147442, 1152581,\n", - " 1135303, 1151906, 1160681, 1148498, 1156894, 1146575, 1146565, 1141420,\n", - " 1150637, 1151352, 1155152, 1149385, 1146975, 1156402, 1146623, 1152407,\n", - " 1154063, 1156320, 1156325, 1153028, 1153038, 1150085, 1145539, 1137746,\n", - " 1146304, 1159974, 1152622, 1140521, 1136401, 1136410, 1149203, 1152753,\n", - " 1152820, 1152826, 1154120, 1154123, 1157839, 1157824, 1152673, 1154638,\n", - " 1151573, 1151617, 1150578, 1150586, 1136134, 1136142, 1151454, 1148914,\n", - " 1148924, 1152951, 1153387, 1144529, 1145952, 1138991, 1152344, 1158423,\n", - " 1156829, 1153311, 1138279, 1157147, 1152296, 1136025, 1136028, 1158704,\n", - " 1156619, 1156622, 1151188, 1152928, 1155779, 1151064, 1154722, 1142777,\n", - " 1143484, 1163489, 1137400, 1137406, 1150159, 1148033, 1148040, 1161205,\n", - " 1149300, 1145656, 1144658, 1144659, 1137048, 1148628, 1158530, 1158540,\n", - " 1148376, 1137458, 1149942, 1155376, 1156720, 1157225, 1157229, 1135434,\n", - " 1158854, 1158916, 1157064, 1157069, 1157071, 1137809, 1150465, 1149052,\n", - " 1135740, 1151788, 1156935, 1153413, 1139525, 1158306, 1158308, 1158311,\n", - " 1153359, 1150130, 1150132, 1154530, 1154528, 1153999, 1150488, 1142755,\n", - " 1151379, 1137910, 1155360, 1155366, 1155375, 1140179, 1155122, 1152527,\n", - " 1157172, 1149321, 1155755, 1151424, 1135406, 1146913, 1158096, 1155667,\n", - " 1155675, 1155628, 1155631, 1154547, 1154550, 1154555, 1155572, 1155576,\n", - " 1158824, 1148836, 1148647, 1155646, 1143263, 1143257, 1154644, 1154250,\n", - " 1154240, 1156711, 1137359, 1143189, 1150371, 1155606, 1155613, 1150987,\n", - " 1155293, 1143517, 1143516, 1159622, 1157928, 1140751, 1159001, 1153776,\n", - " 1153786, 1158192, 1137376, 1137381, 1159116, 1158342, 1145694, 1145684,\n", - " 1145690, 1140913, 1148148, 1150661, 1150671, 1155848, 1158665, 1149145,\n", - " 1159253, 1156085, 1140627, 1140633, 1152209, 1152220, 1156693, 1140374,\n", - " 1156026, 1151091, 1157732, 1144843, 1142466, 1164215, 1155971, 1155975,\n", - " 1158841, 1158846, 1149696, 1149700, 1154600, 1155949, 1159440, 1161305,\n", - " 1136899, 1136896, 1158760, 1158764, 1136494, 1153647, 1159232, 1159241,\n", - " 1147585, 1167445, 1152130, 1157249, 1153808, 1157675, 1134757, 1145477,\n", - " 1140049, 1157813, 1146123, 1146126, 1164514, 1138099, 1138110, 1158256,\n", - " 1158260, 1155521, 1155528, 1161539, 1142487, 1135661, 1164287, 1142663,\n", - " 1142666, 1157747, 1157751, 1159042, 1159052, 1163267, 1158303, 1160563,\n", - " 1162044, 1153052, 1153045, 1184452, 1159738, 1163072, 1167707, 1144158,\n", - " 1164879, 1138393, 1150046, 1149063, 1149070, 1153514, 1153519, 1164857,\n", - " 1146876, 1146873, 1138161, 1164006, 1156795, 1164909, 1163387, 1139593,\n", - " 1139592, 1139281, 1165760, 1136810, 1166073, 1157357, 1159773, 1160178,\n", - " 1158868, 1140643, 1148600, 1148603, 1166813, 1144506, 1156363, 1158643,\n", - " 1159026, 1159029, 1159032, 1163740, 1152247, 1143739, 1158905, 1155588,\n", - " 1151227, 1153933, 1144977, 1144980, 1149015, 1149023, 1147835, 1164580,\n", - " 1152776, 1155053, 1141465, 1147426, 1147427, 1157047, 1159388, 1156737,\n", - " 1156739, 1157967, 1150649, 1171040, 1168750, 1144810, 1144812, 1167251,\n", - " 1140112, 1165718, 1165719, 1142722, 1156293, 1166134, 1180583, 1145728,\n", - " 1163935, 1145222, 1145228, 1167757, 1160232, 1155317, 1171687, 1165154,\n", - " 1144972, 1144973, 1143028, 1143037, 1166053, 1165746, 1170507, 1155911,\n", - " 1148120, 1139357, 1139359, 1147723, 1145900, 1145902, 1153534, 1168659,\n", - " 1143395, 1170980, 1166658, 1167490, 1171279, 1154075, 1154076, 1170767,\n", - " 1170758, 1145674, 1150781, 1149130, 1144676, 1166653, 1155170, 1150515,\n", - " 1156119, 1156118, 1144346, 1144336, 1157534, 1138376, 1153004, 1169154,\n", - " 1169162, 1157331, 1141045, 1141043, 1151678, 1169359, 1154364, 1158623,\n", - " 1158054, 1158060, 1158062, 1159846, 1160035, 1154871, 1155494, 1155502,\n", - " 1160540, 1152353, 1152362, 1152544, 1155932, 1168055, 1149402, 1148667,\n", - " 1148666, 1167017, 1148324, 1148325, 1173307, 1160942, 1154019, 1154027,\n", - " 1152144, 1153751, 1164974, 1159658, 1151210, 1157373, 1147711, 1151850,\n", - " 1151846, 1148128, 1148131, 1170495, 1172521, 1172961, 1162852, 1163027,\n", - " 1166751, 1172932, 1153436, 1166682, 1154148, 1149169, 1149173, 1181225,\n", - " 1186117, 1143279, 1170377, 1168482, 1143420, 1179243, 1156559, 1174333,\n", - " 1181241, 1153141, 1183392, 1161031, 1184232, 1151519, 1178926, 1155260,\n", - " 1155262, 1154717, 1157792, 1157795, 1171623, 1155798, 1155804, 1155796,\n", - " 1180411, 1158249, 1153898, 1153902, 1173818, 1145626, 1172024, 1154840,\n", - " 1180004, 1161068, 1184995, 1149753, 1149755, 1181081, 1153609, 1153612,\n", - " 1187060, 1187940, 1158771, 1161339, 1158512, 1158513, 1182443, 1155892,\n", - " 1155899, 1184310, 1180942, 1168273, 1164798, 1168888, 1168621, 1165151,\n", - " 1182337, 1176989, 1179126, 1161819, 1146161, 1156861, 1166772, 1170349,\n", - " 1147182, 1156162, 1170034, 1156539, 1139828, 1139831, 1154812, 1164686,\n", - " 1151288, 1156055, 1170010, 1173019, 1182750, 1169964, 1189156, 1174728,\n", - " 1179852, 1187692, 1151774, 1190032, 1191864, 1171458, 1152117, 1191615,\n", - " 1162502, 1175349, 1150406, 1172978, 1167094, 1172122, 1158064, 1158071,\n", - " 1182828, 1166797, 1145395, 1178135, 1174606, 1155958, 1155959, 1155960,\n", - " 1178305, 1187149, 1193831, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1140282, 1140285, 1135926, 1135160, 1137784, 1137791, 1139698,\n", - " 1141758, 1137506, 1137513, 1138335, 1141251, 1136151, 1136971, 1141443,\n", - " 1146803, 1143615, 1149839, 1139811, 1137271, 1138933, 1138938, 1143372,\n", - " 1139241, 1146646, 1139609, 1139615, 1139958, 1148987, 1150497, 1150506,\n", - " 1150509, 1148576, 1149216, 1142958, 1155689, 1143820, 1147473, 1147483,\n", - " 1147487, 1135992, 1149294, 1135260, 1146995, 1146996, 1153015, 1134694,\n", - " 1134697, 1148337, 1146656, 1146669, 1150193, 1146475, 1136125, 1152664,\n", - " 1138345, 1153217, 1153231, 1147095, 1147094, 1137220, 1150554, 1155018,\n", - " 1155019, 1136268, 1140540, 1138112, 1138116, 1138356, 1140151, 1140159,\n", - " 1134735, 1140020, 1140027, 1135360, 1135367, 1135202, 1135903, 1137798,\n", - " 1141036, 1136297, 1134794, 1134797, 1136519, 1138504, 1137329, 1157103,\n", - " 1137693, 1136619, 1139215, 1144395, 1135408, 1157397, 1152376, 1136662,\n", - " 1137441, 1137472, 1136193, 1136204, 1136942, 1135265, 1156148, 1156149,\n", - " 1148481, 1134841, 1141702, 1135583, 1136111, 1135246, 1138514, 1153094,\n", - " 1137957, 1137959, 1158136, 1154132, 1145132, 1145120, 1135522, 1139684,\n", - " 1139685, 1138305, 1137287, 1138440, 1138445, 1138461, 1154790, 1157188,\n", - " 1137924, 1136594, 1135135, 1158386, 1158390, 1149328, 1135088, 1156603,\n", - " 1156606, 1147112, 1142611, 1160825, 1135359, 1135618, 1156141, 1138185,\n", - " 1145842, 1145843, 1148531, 1150956, 1141533, 1139673, 1138067, 1134992,\n", - " 1139755, 1140193, 1140199, 1158974, 1153543, 1140034, 1140036, 1139078,\n", - " 1139933, 1138648, 1138147, 1146075, 1141985, 1152042, 1152044, 1137734,\n", - " 1137728, 1134922, 1140901, 1134750, 1135549, 1136697, 1141088, 1141098,\n", - " 1149001, 1139898, 1136397, 1143767, 1143224, 1139033, 1149979, 1149982,\n", - " 1146844, 1141695, 1135860, 1135861, 1136632, 1141224, 1139386, 1143667,\n", - " 1143673, 1143677, 1137188, 1145066, 1144237, 1140607, 1141156, 1141159,\n", - " 1138785, 1139495, 1144937, 1134979, 1147850, 1137087, 1144428, 1141821,\n", - " 1143203, 1140166, 1158746, 1158749, 1142713, 1141479, 1138708, 1140102,\n", - " 1140110, 1142913, 1138424, 1143107, 1144442, 1144596, 1136867, 1136864,\n", - " 1145298, 1140885, 1144182, 1137603, 1134827, 1136565, 1158699, 1137844,\n", - " 1161701, 1147153, 1136378, 1149188, 1141365, 1141367, 1153068, 1151119,\n", - " 1141669, 1138292, 1138293, 1144277, 1144279, 1143915, 1143919, 1139510,\n", - " 1139763, 1144992, 1145200, 1140616, 1140619, 1147888, 1139171, 1140976,\n", - " 1140990, 1141565, 1147050, 1147047, 1145873, 1152976, 1160248, 1160251,\n", - " 1135457, 1142555, 1139453, 1139000, 1141925, 1144242, 1141841, 1150689,\n", - " 1140690, 1139405, 1134851, 1134861, 1143845, 1136277, 1146024, 1146129,\n", - " 1146131, 1154327, 1149935, 1139990, 1143293, 1143283, 1143294, 1151134,\n", - " 1148760, 1147282, 1142816, 1142628, 1149372, 1149608, 1149610, 1143051,\n", - " 1136167, 1138922, 1138923, 1136836, 1139304, 1139329, 1141490, 1141496,\n", - " 1141502, 1142149, 1143345, 1144765, 1144611, 1145808, 1145812, 1145813,\n", - " 1144083, 1135876, 1135813, 1146523, 1143954, 1143961, 1143467, 1140488,\n", - " 1143937, 1140816, 1147580, 1147574, 1143798, 1146628, 1146636, 1147521,\n", - " 1140361, 1140360, 1140364, 1143080, 1144219, 1147996, 1147999, 1134899,\n", - " 1139252, 1145462, 1147234, 1147244, 1148704, 1150996, 1141316, 1141327,\n", - " 1141825, 1141836, 1146742, 1148466, 1153701, 1143434, 1149725, 1147025,\n", - " 1147027, 1147024, 1139549, 1158226, 1148355, 1149871, 1154526, 1151644,\n", - " 1145240, 1145750, 1145751, 1146159, 1138638, 1148391, 1151239, 1151240,\n", - " 1151242, 1148210, 1169870, 1152530, 1150445, 1155003, 1154435, 1149791,\n", - " 1144514, 1144526, 1150339, 1152013, 1165253, 1147794, 1151480, 1152023,\n", - " 1152024, 1152027, 1152026, 1154263, 1151041, 1145255, 1134878, 1140566,\n", - " 1149522, 1147019, 1147009, 1147023, 1153159, 1135805, 1158950, 1158955,\n", - " 1141941, 1141949, 1150745, 1144819, 1148740, 1137640, 1153572, 1153574,\n", - " 1147653, 1147654, 1143560, 1149412, 1148288, 1152073, 1137724, 1147866,\n", - " 1154420, 1154424, 1148188, 1152561, 1138202, 1139721, 1146686, 1157968,\n", - " 1157983, 1148720, 1145858, 1149810, 1148204, 1153181, 1154195, 1153124,\n", - " 1153125, 1153192, 1153188, 1153197, 1145106, 1145111, 1150932, 1152867,\n", - " 1152868, 1152878, 1173078, 1150356, 1155088, 1148084, 1147442, 1152581,\n", - " 1135303, 1151906, 1160681, 1148498, 1156894, 1146575, 1146565, 1141420,\n", - " 1150637, 1151352, 1155152, 1149385, 1146975, 1156402, 1146623, 1152407,\n", - " 1154063, 1156320, 1156325, 1153028, 1153038, 1150085, 1145539, 1137746,\n", - " 1146304, 1159974, 1152622, 1140521, 1136401, 1136410, 1149203, 1152753,\n", - " 1152820, 1152826, 1154120, 1154123, 1157839, 1157824, 1152673, 1154638,\n", - " 1151573, 1151617, 1150578, 1150586, 1136134, 1136142, 1151454, 1148914,\n", - " 1148924, 1152951, 1153387, 1144529, 1145952, 1138991, 1152344, 1158423,\n", - " 1156829, 1153311, 1138279, 1157147, 1152296, 1136025, 1136028, 1158704,\n", - " 1156619, 1156622, 1151188, 1152928, 1155779, 1151064, 1154722, 1142777,\n", - " 1143484, 1163489, 1137400, 1137406, 1150159, 1148033, 1148040, 1161205,\n", - " 1149300, 1145656, 1144658, 1144659, 1137048, 1148628, 1158530, 1158540,\n", - " 1148376, 1137458, 1149942, 1155376, 1156720, 1157225, 1157229, 1135434,\n", - " 1158854, 1158916, 1157064, 1157069, 1157071, 1137809, 1150465, 1149052,\n", - " 1135740, 1151788, 1156935, 1153413, 1139525, 1158306, 1158308, 1158311,\n", - " 1153359, 1150130, 1150132, 1154530, 1154528, 1153999, 1150488, 1142755,\n", - " 1151379, 1137910, 1155360, 1155366, 1155375, 1140179, 1155122, 1152527,\n", - " 1157172, 1149321, 1155755, 1151424, 1135406, 1146913, 1158096, 1155667,\n", - " 1155675, 1155628, 1155631, 1154547, 1154550, 1154555, 1155572, 1155576,\n", - " 1158824, 1148836, 1148647, 1155646, 1143263, 1143257, 1154644, 1154250,\n", - " 1154240, 1156711, 1137359, 1143189, 1150371, 1155606, 1155613, 1150987,\n", - " 1155293, 1143517, 1143516, 1159622, 1157928, 1140751, 1159001, 1153776,\n", - " 1153786, 1158192, 1137376, 1137381, 1159116, 1158342, 1145694, 1145684,\n", - " 1145690, 1140913, 1148148, 1150661, 1150671, 1155848, 1158665, 1149145,\n", - " 1159253, 1156085, 1140627, 1140633, 1152209, 1152220, 1156693, 1140374,\n", - " 1156026, 1151091, 1157732, 1144843, 1142466, 1164215, 1155971, 1155975,\n", - " 1158841, 1158846, 1149696, 1149700, 1154600, 1155949, 1159440, 1161305,\n", - " 1136899, 1136896, 1158760, 1158764, 1136494, 1153647, 1159232, 1159241,\n", - " 1147585, 1167445, 1152130, 1157249, 1153808, 1157675, 1134757, 1145477,\n", - " 1140049, 1157813, 1146123, 1146126, 1164514, 1138099, 1138110, 1158256,\n", - " 1158260, 1155521, 1155528, 1161539, 1142487, 1135661, 1164287, 1142663,\n", - " 1142666, 1157747, 1157751, 1159042, 1159052, 1163267, 1158303, 1160563,\n", - " 1162044, 1153052, 1153045, 1184452, 1159738, 1163072, 1167707, 1144158,\n", - " 1164879, 1138393, 1150046, 1149063, 1149070, 1153514, 1153519, 1164857,\n", - " 1146876, 1146873, 1138161, 1164006, 1156795, 1164909, 1163387, 1139593,\n", - " 1139592, 1139281, 1165760, 1136810, 1166073, 1157357, 1159773, 1160178,\n", - " 1158868, 1140643, 1148600, 1148603, 1166813, 1144506, 1156363, 1158643,\n", - " 1159026, 1159029, 1159032, 1163740, 1152247, 1143739, 1158905, 1155588,\n", - " 1151227, 1153933, 1144977, 1144980, 1149015, 1149023, 1147835, 1164580,\n", - " 1152776, 1155053, 1141465, 1147426, 1147427, 1157047, 1159388, 1156737,\n", - " 1156739, 1157967, 1150649, 1171040, 1168750, 1144810, 1144812, 1167251,\n", - " 1140112, 1165718, 1165719, 1142722, 1156293, 1166134, 1180583, 1145728,\n", - " 1163935, 1145222, 1145228, 1167757, 1160232, 1155317, 1171687, 1165154,\n", - " 1144972, 1144973, 1143028, 1143037, 1166053, 1165746, 1170507, 1155911,\n", - " 1148120, 1139357, 1139359, 1147723, 1145900, 1145902, 1153534, 1168659,\n", - " 1143395, 1170980, 1166658, 1167490, 1171279, 1154075, 1154076, 1170767,\n", - " 1170758, 1145674, 1150781, 1149130, 1144676, 1166653, 1155170, 1150515,\n", - " 1156119, 1156118, 1144346, 1144336, 1157534, 1138376, 1153004, 1169154,\n", - " 1169162, 1157331, 1141045, 1141043, 1151678, 1169359, 1154364, 1158623,\n", - " 1158054, 1158060, 1158062, 1159846, 1160035, 1154871, 1155494, 1155502,\n", - " 1160540, 1152353, 1152362, 1152544, 1155932, 1168055, 1149402, 1148667,\n", - " 1148666, 1167017, 1148324, 1148325, 1173307, 1160942, 1154019, 1154027,\n", - " 1152144, 1153751, 1164974, 1159658, 1151210, 1157373, 1147711, 1151850,\n", - " 1151846, 1148128, 1148131, 1170495, 1172521, 1172961, 1162852, 1163027,\n", - " 1166751, 1172932, 1153436, 1166682, 1154148, 1149169, 1149173, 1181225,\n", - " 1186117, 1143279, 1170377, 1168482, 1143420, 1179243, 1156559, 1174333,\n", - " 1181241, 1153141, 1183392, 1161031, 1184232, 1151519, 1178926, 1155260,\n", - " 1155262, 1154717, 1157792, 1157795, 1171623, 1155798, 1155804, 1155796,\n", - " 1180411, 1158249, 1153898, 1153902, 1173818, 1145626, 1172024, 1154840,\n", - " 1180004, 1161068, 1184995, 1149753, 1149755, 1181081, 1153609, 1153612,\n", - " 1187060, 1187940, 1158771, 1161339, 1158512, 1158513, 1182443, 1155892,\n", - " 1155899, 1184310, 1180942, 1168273, 1164798, 1168888, 1168621, 1165151,\n", - " 1182337, 1176989, 1179126, 1161819, 1146161, 1156861, 1166772, 1170349,\n", - " 1147182, 1156162, 1170034, 1156539, 1139828, 1139831, 1154812, 1164686,\n", - " 1151288, 1156055, 1170010, 1173019, 1182750, 1169964, 1189156, 1174728,\n", - " 1179852, 1187692, 1151774, 1190032, 1191864, 1171458, 1152117, 1191615,\n", - " 1162502, 1175349, 1150406, 1172978, 1167094, 1172122, 1158064, 1158071,\n", - " 1182828, 1166797, 1145395, 1178135, 1174606, 1155958, 1155959, 1155960,\n", - " 1178305, 1187149, 1193831, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199428, 1198244, 1198248, 1197719, 1199282, 1199293, 1198449, 1202255,\n", - " 1199263, 1198633, 1197383, 1197389, 1194770, 1194783, 1195494, 1196631,\n", - " 1195511, 1195514, 1195263, 1197924, 1201992, 1195187, 1196028, 1198534,\n", - " 1194952, 1201269, 1196148, 1195740, 1196977, 1195325, 1195982, 1196711,\n", - " 1199810, 1195216, 1195265, 1195278, 1197136, 1197273, 1194859, 1196742,\n", - " 1195844, 1196122, 1199998, 1197640, 1196393, 1198273, 1198280, 1198284,\n", - " 1200949, 1196851, 1194928, 1199628, 1197990, 1198404, 1199579, 1201904,\n", - " 1194795, 1201511, 1197601, 1197609, 1201116, 1201117, 1196727, 1195773,\n", - " 1202616, 1203239, 1203246, 1198428, 1199421, 1198811, 1200452, 1200562,\n", - " 1200570, 1199445, 1201421, 1201156, 1202627, 1202635, 1200913, 1201041,\n", - " 1201052, 1201358, 1201737, 1200267, 1200546, 1200553, 1200555, 1200310,\n", - " 1200832, 1203071, 1200429, 1202138, 1201442, 1202239, 1202338, 1202337,\n", - " 1202175, 1202706, 1201291, 1198478, 1198466, 1195611, 1203329, 1201590,\n", - " 1201800, 1196966, 1198338, 1200784, 1200793, 1199606, 1195676, 1195679,\n", - " 1195664, 1196929, 1195177, 1196414, 1197492, 1198299, 1196382, 1194730,\n", - " 1198148, 1198824, 1196799, 1200011, 1200974, 1195066, 1198131, 1200296,\n", - " 1197652, 1201966, 1198751], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199428, 1198244, 1198248, 1197719, 1199282, 1199293, 1198449, 1202255,\n", - " 1199263, 1198633, 1197383, 1197389, 1194770, 1194783, 1195494, 1196631,\n", - " 1195511, 1195514, 1195263, 1197924, 1201992, 1195187, 1196028, 1198534,\n", - " 1194952, 1201269, 1196148, 1195740, 1196977, 1195325, 1195982, 1196711,\n", - " 1199810, 1195216, 1195265, 1195278, 1197136, 1197273, 1194859, 1196742,\n", - " 1195844, 1196122, 1199998, 1197640, 1196393, 1198273, 1198280, 1198284,\n", - " 1200949, 1196851, 1194928, 1199628, 1197990, 1198404, 1199579, 1201904,\n", - " 1194795, 1201511, 1197601, 1197609, 1201116, 1201117, 1196727, 1195773,\n", - " 1202616, 1203239, 1203246, 1198428, 1199421, 1198811, 1200452, 1200562,\n", - " 1200570, 1199445, 1201421, 1201156, 1202627, 1202635, 1200913, 1201041,\n", - " 1201052, 1201358, 1201737, 1200267, 1200546, 1200553, 1200555, 1200310,\n", - " 1200832, 1203071, 1200429, 1202138, 1201442, 1202239, 1202338, 1202337,\n", - " 1202175, 1202706, 1201291, 1198478, 1198466, 1195611, 1203329, 1201590,\n", - " 1201800, 1196966, 1198338, 1200784, 1200793, 1199606, 1195676, 1195679,\n", - " 1195664, 1196929, 1195177, 1196414, 1197492, 1198299, 1196382, 1194730,\n", - " 1198148, 1198824, 1196799, 1200011, 1200974, 1195066, 1198131, 1200296,\n", - " 1197652, 1201966, 1198751], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.6278e-01, 1.5273e-01, 6.8938e-01, ..., 1.6938e-01,\n", - " -1.3936e-03, -4.4709e-03],\n", - " [ 1.9688e-01, 3.1807e-02, 8.2684e-01, ..., 1.3114e-01,\n", - " -1.8194e-03, -5.4645e-03],\n", - " [ 1.0576e-01, 1.1030e-02, 6.6974e-01, ..., 1.3299e-01,\n", - " -1.7182e-03, -4.0458e-03],\n", - " ...,\n", - " [ 2.3108e-01, 3.1190e-02, 8.8761e-01, ..., 1.4028e-01,\n", - " -2.0021e-03, -5.7491e-03],\n", - " [ 1.2285e-01, 8.8184e-02, 6.1047e-01, ..., 1.4952e-01,\n", - " -1.6002e-03, -4.0662e-03],\n", - " [ 2.1131e-01, -3.0104e-04, 1.0015e+00, ..., 1.2942e-01,\n", - " -1.6842e-03, -6.7769e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 3.5235e-01, 3.6682e-01, 2.2927e+00, ..., -4.9724e-03,\n", - " -1.3277e-02, -1.0449e-02],\n", - " [ 4.4020e-01, -9.5219e-03, 2.4183e+00, ..., -4.2398e-03,\n", - " -1.2606e-02, -8.0900e-03],\n", - " [ 2.4816e-01, -1.1519e-02, 3.8475e+00, ..., -1.3765e-02,\n", - " -2.4420e-02, -1.5095e-02],\n", - " ...,\n", - " [ 3.7603e-01, 6.3379e-01, 2.2409e+00, ..., -4.8837e-03,\n", - " -1.1671e-02, -9.4452e-03],\n", - " [ 6.3506e-01, 4.3525e-03, 2.2296e+00, ..., -3.4781e-03,\n", - " -1.2059e-02, -6.3547e-03],\n", - " [ 1.9313e+00, -1.1448e-02, 2.4036e+00, ..., 2.6285e-01,\n", - " -3.8235e-02, 2.4092e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-7.0935e-04, 2.7669e-02, 1.4767e-01, ..., 1.5002e-01,\n", - " -2.3385e-04, -7.9306e-04],\n", - " [-1.5914e-03, 1.1715e-01, 3.5174e-01, ..., 1.7132e+00,\n", - " -4.9365e-05, 6.8517e-02],\n", - " [-6.4047e-03, 3.3914e-01, 2.3016e-01, ..., 1.3029e+00,\n", - " -2.6914e-03, -4.5064e-03],\n", - " ...,\n", - " [-1.4221e-03, 1.9393e-01, 2.5604e-01, ..., 1.6106e+00,\n", - " -1.1966e-03, 5.7849e-02],\n", - " [-1.3104e-03, 1.6172e-01, 2.4747e-01, ..., 1.6537e+00,\n", - " -4.6671e-04, 1.1315e-01],\n", - " [-1.9040e-03, 1.6354e-01, 2.8448e-01, ..., 1.4973e+00,\n", - " -4.0419e-04, 6.1494e-02]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-7.6462e-04, 4.3556e-01, 1.9867e-01, ..., -6.9942e-03,\n", - " 2.2426e-01, 2.3096e-01],\n", - " [ 9.6755e-02, 6.1741e-01, 3.6714e-01, ..., -5.4598e-03,\n", - " 1.9986e-01, 2.6375e-02],\n", - " [ 1.6354e-01, 8.1526e-01, 4.4791e-01, ..., -7.6192e-03,\n", - " 3.8674e-01, -6.2358e-04],\n", - " ...,\n", - " [ 1.3290e-01, 6.1777e-01, 3.8182e-01, ..., -5.3589e-03,\n", - " 2.2239e-01, 2.7877e-02],\n", - " [ 1.7274e-02, 6.4933e-01, 3.0484e-01, ..., -7.2263e-03,\n", - " 3.8361e-01, 6.3407e-02],\n", - " [ 1.3980e-01, 6.1383e-01, 4.3469e-01, ..., -5.5385e-03,\n", - " 2.0022e-01, -3.4343e-04]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 45, 45, 63, 2, 73, 73, 73, 73, 73, 149, 275, 398,\n", - " 262, 550, 586, 551, 836, 352, 352, 580, 601, 798, 814, 902,\n", - " 1011, 1161, 1161, 880, 880, 851, 709, 709, 709, 1169, 1111, 1185,\n", - " 1132, 1132, 1138, 1374, 1374, 1370, 1150, 1218, 1346, 1337, 1337, 1337,\n", - " 1337, 1420, 1420, 1405, 1342, 1566, 1405, 1405, 1345, 1590, 1534, 1561,\n", - " 1557, 1577, 1699, 1860, 1810, 1924, 1788, 1894, 1943, 1915, 1915, 1915,\n", - " 1958, 1898, 1983, 2215, 2215, 2243, 2185, 2041, 2041, 2041, 2044, 2155,\n", - " 2237, 2237, 2310, 2310, 2440, 2310, 2310, 2365, 2422, 2356, 2356, 2356,\n", - " 2356, 2356, 2414, 2505, 2591, 2529, 2571, 2571, 2571, 2753, 2605, 2776,\n", - " 2907, 2873, 2873, 2907, 2907, 2907, 2907, 2859, 3007, 2826, 2769, 2769,\n", - " 2973, 3032, 3032, 2977, 3100, 3130, 3130, 3280, 3280, 3326, 3360, 3353,\n", - " 3491, 3491, 3491, 3491, 3480, 3507, 3653, 3540, 3528, 3528, 3455, 3644,\n", - " 3657, 3551, 3614, 3675, 3680, 3731, 3790, 3819, 3803, 3811, 4043, 4043,\n", - " 4043, 4143, 4165, 4297, 4297, 4297, 4094, 4269, 4228, 4367, 4356, 4441,\n", - " 4441, 4542, 4465, 4396, 4637, 4421, 4315, 4315, 4315, 4357, 4614, 4616,\n", - " 4681, 4583, 4666, 4666, 4776, 4991, 5020, 4794, 5137, 5279, 5198, 5198,\n", - " 5047, 5420, 5347, 5246, 5236, 5355, 5271, 5318, 5364, 5395, 5383, 5234,\n", - " 5234, 5410, 5410, 5428, 5428, 5428],\n", - " [ 24, 39, 93, 93, 24, 23, 39, 61, 81, 120, 25, 4,\n", - " 34, 93, 76, 112, 93, 46, 34, 57, 85, 101, 62, 27,\n", - " 80, 124, 126, 45, 80, 24, 118, 77, 78, 107, 93, 64,\n", - " 34, 93, 121, 9, 65, 56, 35, 64, 15, 97, 53, 82,\n", - " 50, 20, 33, 79, 76, 57, 125, 3, 123, 129, 4, 3,\n", - " 41, 35, 98, 64, 47, 87, 71, 120, 3, 8, 104, 91,\n", - " 62, 47, 35, 52, 51, 19, 31, 31, 17, 95, 42, 47,\n", - " 12, 84, 75, 89, 93, 70, 0, 24, 24, 30, 31, 95,\n", - " 99, 43, 62, 48, 74, 71, 96, 128, 62, 64, 92, 120,\n", - " 94, 108, 60, 17, 99, 11, 21, 51, 26, 56, 58, 16,\n", - " 1, 113, 76, 19, 3, 4, 38, 34, 93, 127, 55, 4,\n", - " 83, 114, 123, 32, 93, 59, 17, 14, 84, 12, 62, 14,\n", - " 26, 5, 100, 112, 40, 2, 105, 62, 35, 74, 67, 4,\n", - " 111, 10, 62, 84, 12, 116, 49, 117, 107, 36, 77, 51,\n", - " 85, 6, 73, 28, 106, 37, 54, 66, 69, 73, 41, 33,\n", - " 7, 115, 122, 88, 18, 109, 69, 78, 110, 93, 103, 62,\n", - " 57, 62, 119, 90, 32, 86, 29, 3, 119, 20, 13, 102,\n", - " 63, 68, 72, 22, 130, 44]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1667, 3010, 4042, ..., 4340, 4489, 1567],\n", - " [ 4, 14, 145, ..., 8202, 8273, 8283]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 91, 19, 85, ..., 34, 12, 41],\n", - " [ 184, 128, 93, ..., 5435, 5376, 5442]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 346, 145, 145, ..., 8273, 8273, 8273],\n", - " [ 289, 92, 10, ..., 433, 738, 533]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 671, 691, 458, ..., 462, 414, 585],\n", - " [ 136, 114, 306, ..., 8241, 8292, 8281]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1889, 753, 212, ..., 8217, 8203, 2583],\n", - " [ 105, 73, 73, ..., 5467, 5382, 5452]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 145, 145, 145, ..., 8273, 8273, 8273],\n", - " [4197, 4042, 934, ..., 4963, 1370, 2627]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 73, 45, 45, ..., 5421, 5395, 5383],\n", - " [7388, 252, 1278, ..., 6531, 7921, 7921]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006717\n", - "sampling 0.006559\n", - "noi time: 0.002856\n", - "get_vertex_data call: 0.03266\n", - "noi group time: 0.00352\n", - "eoi_group_time: 0.016253\n", - "second half: 0.221699\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 23828, 24180, 17409, ..., 1124620, 1132728, 1128785],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 23828, 24180, 17409, ..., 1124620, 1132728, 1128785],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1209525, 1210591, 1203800, ..., 1935118, 1937004, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1209525, 1210591, 1203800, ..., 1935118, 1937004, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137426, 1137429, 1141424, 1140282, 1140284, 1135716, 1135726, 1137791,\n", - " 1140799, 1141758, 1138328, 1138335, 1136223, 1136215, 1141251, 1139462,\n", - " 1138897, 1143600, 1143615, 1139820, 1139811, 1145366, 1137936, 1139141,\n", - " 1143372, 1139243, 1146640, 1146646, 1139615, 1140773, 1148983, 1150509,\n", - " 1145281, 1139866, 1135376, 1149216, 1149217, 1149228, 1155683, 1155689,\n", - " 1149646, 1147477, 1152270, 1144636, 1135111, 1152666, 1153231, 1147094,\n", - " 1147102, 1137220, 1150555, 1136685, 1150329, 1134718, 1146371, 1134807,\n", - " 1138739, 1140304, 1140313, 1151546, 1140540, 1138112, 1140020, 1140953,\n", - " 1135367, 1135202, 1154739, 1141036, 1136777, 1134794, 1135967, 1138504,\n", - " 1137329, 1137693, 1136619, 1136622, 1144395, 1137534, 1157399, 1157397,\n", - " 1137441, 1136942, 1156159, 1139161, 1134841, 1134843, 1135583, 1142595,\n", - " 1141086, 1156342, 1138514, 1156909, 1135522, 1135532, 1137286, 1136352,\n", - " 1138436, 1138440, 1138461, 1137924, 1136594, 1154101, 1158390, 1149328,\n", - " 1135098, 1156606, 1147106, 1142611, 1160819, 1135359, 1135625, 1156137,\n", - " 1138185, 1145843, 1150956, 1139844, 1141523, 1143584, 1138067, 1142255,\n", - " 1134992, 1152651, 1135782, 1159009, 1141070, 1144410, 1153544, 1139929,\n", - " 1138646, 1138648, 1138148, 1141966, 1142238, 1146075, 1152044, 1139064,\n", - " 1137734, 1137728, 1140901, 1134742, 1134750, 1136697, 1141088, 1141094,\n", - " 1141097, 1141098, 1144138, 1139889, 1141980, 1139632, 1136384, 1136392,\n", - " 1137299, 1140003, 1149982, 1146834, 1152709, 1142347, 1135860, 1136631,\n", - " 1136637, 1161173, 1141111, 1142932, 1163303, 1136917, 1139731, 1143667,\n", - " 1143673, 1143678, 1137188, 1144237, 1140592, 1141155, 1152731, 1136760,\n", - " 1144650, 1144641, 1134987, 1136848, 1136852, 1147845, 1148069, 1139268,\n", - " 1153670, 1142093, 1140169, 1158749, 1138476, 1138478, 1137761, 1139190,\n", - " 1139194, 1141479, 1137058, 1137060, 1138708, 1142924, 1138424, 1143107,\n", - " 1144596, 1136867, 1136864, 1145298, 1144182, 1143752, 1137364, 1136562,\n", - " 1139559, 1158703, 1140501, 1137841, 1147153, 1147163, 1136369, 1136375,\n", - " 1136378, 1162811, 1141365, 1141720, 1141678, 1139510, 1139760, 1139763,\n", - " 1140089, 1144997, 1145001, 1145200, 1145213, 1143789, 1139171, 1140976,\n", - " 1140990, 1146693, 1146695, 1141560, 1147050, 1143551, 1152976, 1139000,\n", - " 1141925, 1146898, 1144242, 1145337, 1150250, 1150696, 1139405, 1145974,\n", - " 1144073, 1143851, 1146013, 1146004, 1146024, 1138085, 1142533, 1149928,\n", - " 1139990, 1146293, 1146302, 1143293, 1143294, 1151124, 1147540, 1148763,\n", - " 1147282, 1142816, 1136330, 1149165, 1140341, 1143649, 1142628, 1149366,\n", - " 1136160, 1142584, 1138922, 1157720, 1136836, 1139297, 1141496, 1142149,\n", - " 1142159, 1143345, 1143349, 1140844, 1140845, 1144083, 1144088, 1135876,\n", - " 1150756, 1135818, 1144375, 1146514, 1146523, 1138024, 1143456, 1143457,\n", - " 1144291, 1144303, 1143949, 1140817, 1147574, 1149082, 1143798, 1143799,\n", - " 1146636, 1140364, 1149582, 1143085, 1143075, 1144219, 1147995, 1147999,\n", - " 1146949, 1134899, 1134902, 1139249, 1147234, 1148704, 1148715, 1146749,\n", - " 1146742, 1148466, 1148468, 1149722, 1147027, 1143829, 1147981, 1139549,\n", - " 1158225, 1158226, 1158230, 1150452, 1143921, 1145240, 1142378, 1146159,\n", - " 1138626, 1138638, 1146178, 1151242, 1151179, 1147954, 1144514, 1141349,\n", - " 1152013, 1151994, 1147796, 1151475, 1152022, 1152023, 1145259, 1139919,\n", - " 1150127, 1153959, 1158949, 1141949, 1141269, 1148740, 1148745, 1147653,\n", - " 1143552, 1143567, 1149416, 1148294, 1137724, 1147866, 1151412, 1154430,\n", - " 1154420, 1148180, 1152561, 1136251, 1146682, 1146684, 1152439, 1157983,\n", - " 1148720, 1148724, 1148734, 1149816, 1148204, 1171943, 1154203, 1154168,\n", - " 1153124, 1153188, 1153197, 1145104, 1150935, 1152867, 1144849, 1150352,\n", - " 1150356, 1155088, 1148084, 1143134, 1141017, 1152581, 1135303, 1150708,\n", - " 1148505, 1141420, 1136012, 1147737, 1146265, 1148949, 1150208, 1146623,\n", - " 1151402, 1152849, 1152098, 1152100, 1153032, 1153036, 1153038, 1137746,\n", - " 1137756, 1146307, 1152622, 1140521, 1157107, 1152826, 1155337, 1154123,\n", - " 1154638, 1151580, 1151617, 1151623, 1150578, 1136132, 1151440, 1152958,\n", - " 1138982, 1151298, 1152341, 1156816, 1153311, 1138283, 1138281, 1152294,\n", - " 1156007, 1156005, 1136028, 1136029, 1158704, 1151195, 1140682, 1140687,\n", - " 1152928, 1152888, 1143486, 1156422, 1150110, 1150164, 1148033, 1148035,\n", - " 1148040, 1144657, 1137048, 1158470, 1148628, 1158530, 1158537, 1169170,\n", - " 1137458, 1153072, 1135434, 1143448, 1142387, 1158916, 1158927, 1156500,\n", - " 1157064, 1155412, 1152841, 1137814, 1151257, 1150468, 1156629, 1158308,\n", - " 1158311, 1151271, 1155441, 1150129, 1150130, 1138573, 1154528, 1145770,\n", - " 1150484, 1142766, 1142758, 1151379, 1155122, 1152527, 1157172, 1155755,\n", - " 1135396, 1146920, 1156452, 1156460, 1158096, 1158097, 1154763, 1155670,\n", - " 1155626, 1155575, 1155576, 1136476, 1158566, 1158824, 1158325, 1143263,\n", - " 1146935, 1161794, 1154243, 1160907, 1150371, 1153325, 1155613, 1141627,\n", - " 1143518, 1159629, 1159630, 1137152, 1158123, 1158996, 1153776, 1153786,\n", - " 1137316, 1135601, 1158665, 1138216, 1144451, 1152220, 1159213, 1140380,\n", - " 1157732, 1157735, 1144843, 1164215, 1155971, 1155975, 1153765, 1161676,\n", - " 1142070, 1156804, 1149696, 1154592, 1160163, 1160164, 1136896, 1158760,\n", - " 1158764, 1159164, 1155246, 1151615, 1136494, 1156490, 1136646, 1134757,\n", - " 1157858, 1158547, 1153827, 1146123, 1146126, 1138110, 1155871, 1158006,\n", - " 1144584, 1150011, 1155521, 1155529, 1142663, 1142662, 1159052, 1159071,\n", - " 1159057, 1151832, 1151080, 1163267, 1142416, 1155196, 1162044, 1153052,\n", - " 1153045, 1159738, 1163072, 1167566, 1156235, 1166256, 1153841, 1156109,\n", - " 1138393, 1142679, 1167187, 1149063, 1145948, 1153507, 1153519, 1158680,\n", - " 1138161, 1164006, 1164002, 1156787, 1156795, 1149963, 1154590, 1139592,\n", - " 1156983, 1156984, 1156987, 1166073, 1146063, 1159932, 1160702, 1148600,\n", - " 1148603, 1159646, 1155816, 1156361, 1156355, 1186180, 1158643, 1158653,\n", - " 1156187, 1156181, 1159032, 1169104, 1152247, 1143739, 1160605, 1155588,\n", - " 1151220, 1158405, 1149008, 1146500, 1153239, 1164580, 1161239, 1161243,\n", - " 1144737, 1144747, 1152776, 1155055, 1141471, 1157055, 1182247, 1156739,\n", - " 1157955, 1157958, 1144812, 1164732, 1168860, 1135567, 1165721, 1165727,\n", - " 1164750, 1142733, 1156300, 1156303, 1145743, 1148683, 1145227, 1167757,\n", - " 1160228, 1155324, 1166462, 1144972, 1144973, 1166054, 1166053, 1147694,\n", - " 1152639, 1155907, 1147724, 1145900, 1145902, 1153533, 1152198, 1152206,\n", - " 1143402, 1143404, 1158722, 1154070, 1154074, 1154076, 1147331, 1147342,\n", - " 1147338, 1150773, 1151587, 1151598, 1162886, 1167817, 1144681, 1169298,\n", - " 1155172, 1155170, 1150518, 1154619, 1144336, 1138376, 1154670, 1135841,\n", - " 1166006, 1157331, 1169359, 1154364, 1149452, 1138609, 1158146, 1158611,\n", - " 1158623, 1173047, 1149846, 1149847, 1157384, 1147423, 1172486, 1152353,\n", - " 1166601, 1168400, 1169134, 1149402, 1152151, 1152146, 1153755, 1151696,\n", - " 1157153, 1157373, 1147711, 1151850, 1148128, 1148131, 1157593, 1157596,\n", - " 1169038, 1172961, 1171797, 1160990, 1166016, 1177700, 1144550, 1173092,\n", - " 1171811, 1169448, 1154148, 1167520, 1169528, 1186117, 1143279, 1143277,\n", - " 1182423, 1166299, 1177253, 1153803, 1170519, 1153141, 1151519, 1166554,\n", - " 1161255, 1155262, 1160206, 1154718, 1157792, 1157795, 1143333, 1143341,\n", - " 1172154, 1188584, 1182011, 1158253, 1153898, 1145597, 1134650, 1145626,\n", - " 1156437, 1154840, 1157483, 1161068, 1152276, 1180665, 1181143, 1158779,\n", - " 1165067, 1166621, 1158380, 1155892, 1155899, 1179926, 1140386, 1164462,\n", - " 1168273, 1165487, 1162253, 1164228, 1179101, 1164436, 1163421, 1154944,\n", - " 1165444, 1166781, 1170336, 1147182, 1168930, 1170822, 1139831, 1139837,\n", - " 1150265, 1154812, 1192076, 1184379, 1182216, 1151284, 1156055, 1146395,\n", - " 1173058, 1149544, 1193369, 1175853, 1189095, 1168683, 1140992, 1140993,\n", - " 1151774, 1153733, 1152113, 1177129, 1171201, 1177842, 1174574, 1179317,\n", - " 1161188, 1172423, 1182286, 1166788, 1152083, 1180869, 1179769, 1157017,\n", - " 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137426, 1137429, 1141424, 1140282, 1140284, 1135716, 1135726, 1137791,\n", - " 1140799, 1141758, 1138328, 1138335, 1136223, 1136215, 1141251, 1139462,\n", - " 1138897, 1143600, 1143615, 1139820, 1139811, 1145366, 1137936, 1139141,\n", - " 1143372, 1139243, 1146640, 1146646, 1139615, 1140773, 1148983, 1150509,\n", - " 1145281, 1139866, 1135376, 1149216, 1149217, 1149228, 1155683, 1155689,\n", - " 1149646, 1147477, 1152270, 1144636, 1135111, 1152666, 1153231, 1147094,\n", - " 1147102, 1137220, 1150555, 1136685, 1150329, 1134718, 1146371, 1134807,\n", - " 1138739, 1140304, 1140313, 1151546, 1140540, 1138112, 1140020, 1140953,\n", - " 1135367, 1135202, 1154739, 1141036, 1136777, 1134794, 1135967, 1138504,\n", - " 1137329, 1137693, 1136619, 1136622, 1144395, 1137534, 1157399, 1157397,\n", - " 1137441, 1136942, 1156159, 1139161, 1134841, 1134843, 1135583, 1142595,\n", - " 1141086, 1156342, 1138514, 1156909, 1135522, 1135532, 1137286, 1136352,\n", - " 1138436, 1138440, 1138461, 1137924, 1136594, 1154101, 1158390, 1149328,\n", - " 1135098, 1156606, 1147106, 1142611, 1160819, 1135359, 1135625, 1156137,\n", - " 1138185, 1145843, 1150956, 1139844, 1141523, 1143584, 1138067, 1142255,\n", - " 1134992, 1152651, 1135782, 1159009, 1141070, 1144410, 1153544, 1139929,\n", - " 1138646, 1138648, 1138148, 1141966, 1142238, 1146075, 1152044, 1139064,\n", - " 1137734, 1137728, 1140901, 1134742, 1134750, 1136697, 1141088, 1141094,\n", - " 1141097, 1141098, 1144138, 1139889, 1141980, 1139632, 1136384, 1136392,\n", - " 1137299, 1140003, 1149982, 1146834, 1152709, 1142347, 1135860, 1136631,\n", - " 1136637, 1161173, 1141111, 1142932, 1163303, 1136917, 1139731, 1143667,\n", - " 1143673, 1143678, 1137188, 1144237, 1140592, 1141155, 1152731, 1136760,\n", - " 1144650, 1144641, 1134987, 1136848, 1136852, 1147845, 1148069, 1139268,\n", - " 1153670, 1142093, 1140169, 1158749, 1138476, 1138478, 1137761, 1139190,\n", - " 1139194, 1141479, 1137058, 1137060, 1138708, 1142924, 1138424, 1143107,\n", - " 1144596, 1136867, 1136864, 1145298, 1144182, 1143752, 1137364, 1136562,\n", - " 1139559, 1158703, 1140501, 1137841, 1147153, 1147163, 1136369, 1136375,\n", - " 1136378, 1162811, 1141365, 1141720, 1141678, 1139510, 1139760, 1139763,\n", - " 1140089, 1144997, 1145001, 1145200, 1145213, 1143789, 1139171, 1140976,\n", - " 1140990, 1146693, 1146695, 1141560, 1147050, 1143551, 1152976, 1139000,\n", - " 1141925, 1146898, 1144242, 1145337, 1150250, 1150696, 1139405, 1145974,\n", - " 1144073, 1143851, 1146013, 1146004, 1146024, 1138085, 1142533, 1149928,\n", - " 1139990, 1146293, 1146302, 1143293, 1143294, 1151124, 1147540, 1148763,\n", - " 1147282, 1142816, 1136330, 1149165, 1140341, 1143649, 1142628, 1149366,\n", - " 1136160, 1142584, 1138922, 1157720, 1136836, 1139297, 1141496, 1142149,\n", - " 1142159, 1143345, 1143349, 1140844, 1140845, 1144083, 1144088, 1135876,\n", - " 1150756, 1135818, 1144375, 1146514, 1146523, 1138024, 1143456, 1143457,\n", - " 1144291, 1144303, 1143949, 1140817, 1147574, 1149082, 1143798, 1143799,\n", - " 1146636, 1140364, 1149582, 1143085, 1143075, 1144219, 1147995, 1147999,\n", - " 1146949, 1134899, 1134902, 1139249, 1147234, 1148704, 1148715, 1146749,\n", - " 1146742, 1148466, 1148468, 1149722, 1147027, 1143829, 1147981, 1139549,\n", - " 1158225, 1158226, 1158230, 1150452, 1143921, 1145240, 1142378, 1146159,\n", - " 1138626, 1138638, 1146178, 1151242, 1151179, 1147954, 1144514, 1141349,\n", - " 1152013, 1151994, 1147796, 1151475, 1152022, 1152023, 1145259, 1139919,\n", - " 1150127, 1153959, 1158949, 1141949, 1141269, 1148740, 1148745, 1147653,\n", - " 1143552, 1143567, 1149416, 1148294, 1137724, 1147866, 1151412, 1154430,\n", - " 1154420, 1148180, 1152561, 1136251, 1146682, 1146684, 1152439, 1157983,\n", - " 1148720, 1148724, 1148734, 1149816, 1148204, 1171943, 1154203, 1154168,\n", - " 1153124, 1153188, 1153197, 1145104, 1150935, 1152867, 1144849, 1150352,\n", - " 1150356, 1155088, 1148084, 1143134, 1141017, 1152581, 1135303, 1150708,\n", - " 1148505, 1141420, 1136012, 1147737, 1146265, 1148949, 1150208, 1146623,\n", - " 1151402, 1152849, 1152098, 1152100, 1153032, 1153036, 1153038, 1137746,\n", - " 1137756, 1146307, 1152622, 1140521, 1157107, 1152826, 1155337, 1154123,\n", - " 1154638, 1151580, 1151617, 1151623, 1150578, 1136132, 1151440, 1152958,\n", - " 1138982, 1151298, 1152341, 1156816, 1153311, 1138283, 1138281, 1152294,\n", - " 1156007, 1156005, 1136028, 1136029, 1158704, 1151195, 1140682, 1140687,\n", - " 1152928, 1152888, 1143486, 1156422, 1150110, 1150164, 1148033, 1148035,\n", - " 1148040, 1144657, 1137048, 1158470, 1148628, 1158530, 1158537, 1169170,\n", - " 1137458, 1153072, 1135434, 1143448, 1142387, 1158916, 1158927, 1156500,\n", - " 1157064, 1155412, 1152841, 1137814, 1151257, 1150468, 1156629, 1158308,\n", - " 1158311, 1151271, 1155441, 1150129, 1150130, 1138573, 1154528, 1145770,\n", - " 1150484, 1142766, 1142758, 1151379, 1155122, 1152527, 1157172, 1155755,\n", - " 1135396, 1146920, 1156452, 1156460, 1158096, 1158097, 1154763, 1155670,\n", - " 1155626, 1155575, 1155576, 1136476, 1158566, 1158824, 1158325, 1143263,\n", - " 1146935, 1161794, 1154243, 1160907, 1150371, 1153325, 1155613, 1141627,\n", - " 1143518, 1159629, 1159630, 1137152, 1158123, 1158996, 1153776, 1153786,\n", - " 1137316, 1135601, 1158665, 1138216, 1144451, 1152220, 1159213, 1140380,\n", - " 1157732, 1157735, 1144843, 1164215, 1155971, 1155975, 1153765, 1161676,\n", - " 1142070, 1156804, 1149696, 1154592, 1160163, 1160164, 1136896, 1158760,\n", - " 1158764, 1159164, 1155246, 1151615, 1136494, 1156490, 1136646, 1134757,\n", - " 1157858, 1158547, 1153827, 1146123, 1146126, 1138110, 1155871, 1158006,\n", - " 1144584, 1150011, 1155521, 1155529, 1142663, 1142662, 1159052, 1159071,\n", - " 1159057, 1151832, 1151080, 1163267, 1142416, 1155196, 1162044, 1153052,\n", - " 1153045, 1159738, 1163072, 1167566, 1156235, 1166256, 1153841, 1156109,\n", - " 1138393, 1142679, 1167187, 1149063, 1145948, 1153507, 1153519, 1158680,\n", - " 1138161, 1164006, 1164002, 1156787, 1156795, 1149963, 1154590, 1139592,\n", - " 1156983, 1156984, 1156987, 1166073, 1146063, 1159932, 1160702, 1148600,\n", - " 1148603, 1159646, 1155816, 1156361, 1156355, 1186180, 1158643, 1158653,\n", - " 1156187, 1156181, 1159032, 1169104, 1152247, 1143739, 1160605, 1155588,\n", - " 1151220, 1158405, 1149008, 1146500, 1153239, 1164580, 1161239, 1161243,\n", - " 1144737, 1144747, 1152776, 1155055, 1141471, 1157055, 1182247, 1156739,\n", - " 1157955, 1157958, 1144812, 1164732, 1168860, 1135567, 1165721, 1165727,\n", - " 1164750, 1142733, 1156300, 1156303, 1145743, 1148683, 1145227, 1167757,\n", - " 1160228, 1155324, 1166462, 1144972, 1144973, 1166054, 1166053, 1147694,\n", - " 1152639, 1155907, 1147724, 1145900, 1145902, 1153533, 1152198, 1152206,\n", - " 1143402, 1143404, 1158722, 1154070, 1154074, 1154076, 1147331, 1147342,\n", - " 1147338, 1150773, 1151587, 1151598, 1162886, 1167817, 1144681, 1169298,\n", - " 1155172, 1155170, 1150518, 1154619, 1144336, 1138376, 1154670, 1135841,\n", - " 1166006, 1157331, 1169359, 1154364, 1149452, 1138609, 1158146, 1158611,\n", - " 1158623, 1173047, 1149846, 1149847, 1157384, 1147423, 1172486, 1152353,\n", - " 1166601, 1168400, 1169134, 1149402, 1152151, 1152146, 1153755, 1151696,\n", - " 1157153, 1157373, 1147711, 1151850, 1148128, 1148131, 1157593, 1157596,\n", - " 1169038, 1172961, 1171797, 1160990, 1166016, 1177700, 1144550, 1173092,\n", - " 1171811, 1169448, 1154148, 1167520, 1169528, 1186117, 1143279, 1143277,\n", - " 1182423, 1166299, 1177253, 1153803, 1170519, 1153141, 1151519, 1166554,\n", - " 1161255, 1155262, 1160206, 1154718, 1157792, 1157795, 1143333, 1143341,\n", - " 1172154, 1188584, 1182011, 1158253, 1153898, 1145597, 1134650, 1145626,\n", - " 1156437, 1154840, 1157483, 1161068, 1152276, 1180665, 1181143, 1158779,\n", - " 1165067, 1166621, 1158380, 1155892, 1155899, 1179926, 1140386, 1164462,\n", - " 1168273, 1165487, 1162253, 1164228, 1179101, 1164436, 1163421, 1154944,\n", - " 1165444, 1166781, 1170336, 1147182, 1168930, 1170822, 1139831, 1139837,\n", - " 1150265, 1154812, 1192076, 1184379, 1182216, 1151284, 1156055, 1146395,\n", - " 1173058, 1149544, 1193369, 1175853, 1189095, 1168683, 1140992, 1140993,\n", - " 1151774, 1153733, 1152113, 1177129, 1171201, 1177842, 1174574, 1179317,\n", - " 1161188, 1172423, 1182286, 1166788, 1152083, 1180869, 1179769, 1157017,\n", - " 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196007, 1196013, 1195697, 1199439, 1195522, 1197719, 1198730, 1195860,\n", - " 1199282, 1198459, 1202255, 1198840, 1198844, 1201581, 1194626, 1197350,\n", - " 1198694, 1198557, 1194866, 1194770, 1195494, 1196631, 1194642, 1195514,\n", - " 1198609, 1195263, 1197921, 1196534, 1201992, 1198542, 1198543, 1197697,\n", - " 1195740, 1194982, 1196334, 1197856, 1197867, 1195325, 1198668, 1198654,\n", - " 1196704, 1199823, 1195145, 1197367, 1196109, 1194859, 1195841, 1198915,\n", - " 1202916, 1199322, 1197474, 1196122, 1195918, 1195353, 1200959, 1196851,\n", - " 1199628, 1200869, 1200872, 1200878, 1199152, 1199154, 1199038, 1198404,\n", - " 1198410, 1199231, 1194786, 1199942, 1201511, 1196508, 1200668, 1199018,\n", - " 1195807, 1197601, 1196727, 1200892, 1200018, 1198811, 1201827, 1198593,\n", - " 1201421, 1201156, 1200991, 1200913, 1200918, 1201041, 1195637, 1200429,\n", - " 1197100, 1202110, 1196883, 1200692, 1199917, 1200899, 1202707, 1201291,\n", - " 1195610, 1201796, 1196966, 1200784, 1198015, 1198929, 1197816, 1197822,\n", - " 1198127, 1199660, 1199659, 1198145, 1198824, 1200011, 1200468, 1200301,\n", - " 1201365, 1196070, 1203162], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196007, 1196013, 1195697, 1199439, 1195522, 1197719, 1198730, 1195860,\n", - " 1199282, 1198459, 1202255, 1198840, 1198844, 1201581, 1194626, 1197350,\n", - " 1198694, 1198557, 1194866, 1194770, 1195494, 1196631, 1194642, 1195514,\n", - " 1198609, 1195263, 1197921, 1196534, 1201992, 1198542, 1198543, 1197697,\n", - " 1195740, 1194982, 1196334, 1197856, 1197867, 1195325, 1198668, 1198654,\n", - " 1196704, 1199823, 1195145, 1197367, 1196109, 1194859, 1195841, 1198915,\n", - " 1202916, 1199322, 1197474, 1196122, 1195918, 1195353, 1200959, 1196851,\n", - " 1199628, 1200869, 1200872, 1200878, 1199152, 1199154, 1199038, 1198404,\n", - " 1198410, 1199231, 1194786, 1199942, 1201511, 1196508, 1200668, 1199018,\n", - " 1195807, 1197601, 1196727, 1200892, 1200018, 1198811, 1201827, 1198593,\n", - " 1201421, 1201156, 1200991, 1200913, 1200918, 1201041, 1195637, 1200429,\n", - " 1197100, 1202110, 1196883, 1200692, 1199917, 1200899, 1202707, 1201291,\n", - " 1195610, 1201796, 1196966, 1200784, 1198015, 1198929, 1197816, 1197822,\n", - " 1198127, 1199660, 1199659, 1198145, 1198824, 1200011, 1200468, 1200301,\n", - " 1201365, 1196070, 1203162], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 0.1112, 0.0155, 0.7244, ..., 0.1470, -0.0021, -0.0043],\n", - " [ 0.1112, 0.0155, 0.7244, ..., 0.1470, -0.0021, -0.0043],\n", - " [ 0.0924, 0.0419, 0.6498, ..., 0.1574, -0.0023, -0.0039],\n", - " ...,\n", - " [ 0.1576, 0.0419, 0.7976, ..., 0.1341, -0.0017, -0.0050],\n", - " [ 0.1103, 0.0502, 0.6838, ..., 0.1519, -0.0020, -0.0043],\n", - " [ 0.1434, 0.0666, 0.7314, ..., 0.1383, -0.0017, -0.0046]],\n", - " device='cuda:0', grad_fn=), 'paper': tensor([[ 2.1106e-01, 6.2013e-01, 2.7499e+00, ..., -5.3582e-03,\n", - " -1.6079e-02, -1.1895e-02],\n", - " [ 6.8288e-01, -1.9075e-03, 2.7190e+00, ..., -2.9244e-03,\n", - " -1.4752e-02, -6.0232e-03],\n", - " [ 1.5471e+00, -1.0220e-02, 2.6985e+00, ..., 2.5845e-01,\n", - " -3.7957e-02, 1.7886e+00],\n", - " ...,\n", - " [ 4.0818e-01, -4.6055e-03, 2.7372e+00, ..., -3.6507e-03,\n", - " -1.5579e-02, -1.0848e-02],\n", - " [ 4.9312e-01, -5.4136e-03, 2.8966e+00, ..., -3.1643e-03,\n", - " -1.8039e-02, -7.6506e-03],\n", - " [ 2.4696e+00, -5.8035e-03, 3.2058e+00, ..., 9.7847e-01,\n", - " -4.6873e-02, 3.2232e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-2.5952e-03, 2.9615e-01, 4.2968e-01, ..., 1.7838e+00,\n", - " -3.3344e-03, -1.5831e-03],\n", - " [-2.6905e-03, 3.1700e-01, 3.3064e-01, ..., 1.4594e+00,\n", - " -2.8445e-03, -1.2117e-03],\n", - " [-1.7635e-03, 2.5683e-01, 3.1578e-01, ..., 1.6504e+00,\n", - " -6.4482e-04, -3.4802e-04],\n", - " ...,\n", - " [-1.8191e-03, 2.3895e-01, 3.2798e-01, ..., 1.7737e+00,\n", - " -8.6112e-04, 4.7550e-03],\n", - " [-1.6785e-03, 1.8012e-01, 2.6841e-01, ..., 1.6388e+00,\n", - " -6.1324e-04, 1.2025e-01],\n", - " [-7.1334e-04, 3.0380e-02, 1.4300e-01, ..., 1.5941e-01,\n", - " -2.0931e-04, -7.6962e-04]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[ 1.1011e-02, 5.3189e-01, 2.5343e-01, ..., -6.5649e-03,\n", - " 1.7558e-01, 2.8992e-01],\n", - " [-3.4909e-04, 7.0298e-01, 2.3471e-01, ..., -8.3248e-03,\n", - " 4.2035e-01, 2.7089e-01],\n", - " [-9.0914e-05, 5.1561e-01, 2.1774e-01, ..., -6.7793e-03,\n", - " 2.5609e-01, 2.0888e-01],\n", - " ...,\n", - " [-4.2785e-04, 6.6137e-01, 3.1353e-01, ..., -1.0260e-02,\n", - " 4.1229e-01, 3.7871e-01],\n", - " [-1.8289e-04, 5.9573e-01, 1.9961e-01, ..., -9.9011e-03,\n", - " 3.8644e-01, 3.2027e-01],\n", - " [ 3.2847e-01, 1.0069e+00, 8.3069e-01, ..., -7.2340e-03,\n", - " 2.7834e-01, -1.3780e-03]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 173, 220, 180, 143, 143, 24, 74, 74, 280, 541, 915, 830,\n", - " 838, 633, 633, 1138, 996, 996, 1228, 1022, 1352, 1713, 1713, 1300,\n", - " 1323, 1354, 1298, 1344, 1344, 1260, 1260, 1260, 1569, 1692, 1610, 1610,\n", - " 1678, 1694, 1671, 1704, 1907, 1910, 1920, 1961, 1961, 2205, 2205, 2450,\n", - " 2338, 2408, 2482, 2222, 2467, 2281, 2281, 2475, 2466, 2537, 2501, 2501,\n", - " 2598, 2509, 2552, 2524, 2524, 2788, 2517, 2643, 2643, 2684, 2656, 2774,\n", - " 2774, 2819, 2712, 2855, 2934, 2855, 2855, 2855, 2805, 2820, 2820, 2820,\n", - " 2910, 3055, 2860, 2860, 3215, 3301, 3237, 3237, 3305, 3315, 3148, 3223,\n", - " 3223, 3367, 3442, 3507, 3471, 3546, 3450, 3636, 3499, 3641, 3896, 3842,\n", - " 3706, 3781, 3767, 3781, 3781, 4217, 3837, 4130, 3929, 4052, 4152, 4260,\n", - " 4174, 4322, 4305, 4305, 4312, 4348, 4341, 4593, 4589, 4436, 4459, 4459,\n", - " 4488, 4601, 4546, 4714, 4714, 4586, 4521, 4773, 4872, 4783, 4875, 4875,\n", - " 4875, 4875, 4910, 5122, 4908, 4878, 4907, 4889, 5154, 5154, 4980, 5009,\n", - " 5306, 5306, 5284, 5284, 5284, 5326, 5554, 5554, 5512, 5520, 5520, 5780,\n", - " 5662, 5662, 5613, 5710, 5690, 5690, 5772, 6161, 6303, 6232, 6232, 6232,\n", - " 6350, 6362],\n", - " [ 8, 55, 54, 19, 39, 47, 46, 56, 90, 74, 112, 24,\n", - " 97, 24, 106, 41, 92, 96, 65, 2, 74, 56, 46, 36,\n", - " 75, 63, 79, 74, 23, 2, 50, 15, 35, 30, 51, 107,\n", - " 107, 72, 10, 2, 16, 43, 59, 22, 52, 85, 4, 94,\n", - " 113, 62, 76, 13, 74, 98, 114, 74, 13, 2, 25, 94,\n", - " 75, 81, 1, 46, 56, 98, 104, 98, 84, 13, 78, 25,\n", - " 89, 13, 100, 38, 111, 113, 5, 25, 105, 61, 103, 86,\n", - " 47, 70, 9, 109, 58, 74, 0, 8, 13, 60, 29, 31,\n", - " 71, 49, 13, 35, 44, 89, 101, 75, 27, 104, 4, 21,\n", - " 64, 57, 40, 83, 93, 99, 58, 89, 53, 45, 80, 91,\n", - " 50, 33, 25, 5, 69, 98, 36, 34, 11, 99, 93, 69,\n", - " 102, 69, 69, 69, 83, 69, 7, 28, 3, 37, 110, 108,\n", - " 17, 95, 42, 95, 87, 98, 73, 99, 12, 74, 26, 99,\n", - " 29, 82, 66, 14, 32, 29, 37, 28, 74, 88, 8, 67,\n", - " 59, 48, 18, 56, 77, 68, 25, 20, 74, 29, 6, 108,\n", - " 74, 65]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[4101, 2448, 1864, ..., 4030, 2448, 4025],\n", - " [ 212, 314, 30, ..., 6531, 6626, 6662]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 16, 33, 89, ..., 16, 98, 93],\n", - " [ 43, 103, 10, ..., 6280, 6352, 6366]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 192, 192, 192, ..., 6472, 6472, 6472],\n", - " [ 82, 706, 442, ..., 317, 645, 450]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 426, 510, 256, ..., 705, 492, 317],\n", - " [ 39, 29, 256, ..., 6711, 6625, 6650]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 171, 4455, 3733, ..., 4683, 3272, 6132],\n", - " [ 105, 142, 27, ..., 6379, 6378, 6356]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 192, 192, 192, ..., 6472, 6472, 6472],\n", - " [ 443, 789, 1240, ..., 5888, 5103, 5266]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 163, 163, 231, ..., 6362, 6362, 6362],\n", - " [2878, 2843, 1067, ..., 78, 4683, 4500]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006655\n", - "sampling 0.006498\n", - "noi time: 0.001907\n", - "get_vertex_data call: 0.024178\n", - "noi group time: 0.004253\n", - "eoi_group_time: 0.015078\n", - "second half: 0.218104\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24187, 8556, 34166, ..., 1118692, 1120069, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24187, 8556, 34166, ..., 1118692, 1120069, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1221612, 1209801, 1203807, ..., 1937007, 1928581, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1221612, 1209801, 1203807, ..., 1937007, 1928581, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1137212, 1141424, 1141439, 1140282, 1140285, 1135926, 1135928,\n", - " 1135160, 1135716, 1135727, 1142201, 1137791, 1141758, 1137506, 1138335,\n", - " 1141251, 1141250, 1140295, 1136969, 1136971, 1138897, 1145363, 1145373,\n", - " 1146983, 1137947, 1143362, 1143372, 1143363, 1139241, 1146640, 1139615,\n", - " 1140781, 1150497, 1134940, 1136959, 1149216, 1155683, 1143820, 1147473,\n", - " 1141882, 1135992, 1135999, 1142881, 1144636, 1146995, 1146996, 1134700,\n", - " 1152664, 1148546, 1147091, 1147101, 1137220, 1145419, 1155018, 1147204,\n", - " 1147211, 1136679, 1152425, 1146369, 1134807, 1151546, 1138112, 1137254,\n", - " 1137181, 1149457, 1138353, 1140029, 1140953, 1135367, 1135202, 1136039,\n", - " 1134965, 1134960, 1141036, 1134794, 1138508, 1137328, 1137342, 1137693,\n", - " 1144786, 1144395, 1137529, 1137534, 1136590, 1156149, 1156159, 1148484,\n", - " 1139161, 1135579, 1135583, 1135830, 1138514, 1138524, 1153094, 1153099,\n", - " 1158136, 1154132, 1145120, 1156899, 1139684, 1138314, 1139878, 1138436,\n", - " 1138440, 1136534, 1138461, 1138449, 1157190, 1136594, 1138847, 1135088,\n", - " 1156603, 1156606, 1142611, 1145843, 1148531, 1148533, 1137109, 1139667,\n", - " 1139673, 1138079, 1138069, 1142243, 1134992, 1142793, 1136551, 1152642,\n", - " 1152648, 1135789, 1136734, 1159009, 1141070, 1144406, 1144410, 1153543,\n", - " 1139933, 1138648, 1155648, 1155654, 1141992, 1152044, 1142302, 1140670,\n", - " 1137734, 1137741, 1137728, 1134922, 1134750, 1135549, 1140228, 1141088,\n", - " 1141097, 1148993, 1149001, 1145356, 1143767, 1154860, 1143225, 1139033,\n", - " 1140003, 1152709, 1152719, 1136419, 1154479, 1141223, 1141891, 1139386,\n", - " 1141657, 1136917, 1139730, 1139732, 1143667, 1143677, 1145066, 1140592,\n", - " 1147844, 1137074, 1144428, 1141821, 1142093, 1140166, 1140173, 1158749,\n", - " 1141479, 1142917, 1142913, 1142560, 1137661, 1144596, 1136867, 1136864,\n", - " 1144041, 1141570, 1135322, 1144182, 1150906, 1166711, 1144865, 1146201,\n", - " 1134827, 1136565, 1139559, 1161701, 1147153, 1141365, 1153068, 1149088,\n", - " 1149090, 1153556, 1143917, 1139508, 1139510, 1139763, 1145213, 1143783,\n", - " 1143784, 1140616, 1140976, 1146693, 1147050, 1147047, 1145873, 1152988,\n", - " 1135457, 1141925, 1144242, 1140580, 1140582, 1141841, 1137146, 1137149,\n", - " 1137571, 1141382, 1141390, 1143845, 1143851, 1146024, 1146017, 1154332,\n", - " 1139990, 1146302, 1143293, 1143294, 1151124, 1147543, 1147540, 1147282,\n", - " 1142816, 1136330, 1140346, 1142628, 1149608, 1143051, 1136164, 1157717,\n", - " 1136836, 1136843, 1139329, 1139328, 1141490, 1141496, 1138238, 1145427,\n", - " 1143345, 1144766, 1144753, 1137098, 1144086, 1138600, 1139979, 1135874,\n", - " 1135876, 1150761, 1150294, 1146514, 1146523, 1138024, 1143456, 1143457,\n", - " 1143007, 1137703, 1144291, 1140482, 1140483, 1140492, 1143937, 1146636,\n", - " 1147523, 1140364, 1149575, 1137990, 1143075, 1166402, 1148966, 1144725,\n", - " 1147984, 1147988, 1147999, 1134899, 1144013, 1139252, 1147127, 1147131,\n", - " 1147244, 1148704, 1141319, 1141327, 1146751, 1146742, 1162729, 1148468,\n", - " 1152328, 1149718, 1145015, 1139549, 1158226, 1143921, 1147880, 1154526,\n", - " 1145240, 1145751, 1148397, 1146178, 1151242, 1152530, 1152537, 1150274,\n", - " 1151182, 1150438, 1150445, 1154437, 1154438, 1151860, 1149787, 1149791,\n", - " 1144514, 1145827, 1152013, 1165252, 1151487, 1154263, 1139919, 1149534,\n", - " 1150127, 1147019, 1147009, 1141945, 1141949, 1150733, 1153572, 1154976,\n", - " 1147653, 1148288, 1148300, 1137724, 1135079, 1154420, 1148180, 1148188,\n", - " 1151360, 1136251, 1139721, 1139718, 1146674, 1146676, 1146682, 1152494,\n", - " 1138404, 1148720, 1144110, 1151941, 1148204, 1153181, 1148108, 1154192,\n", - " 1154196, 1153124, 1153192, 1152962, 1152968, 1150932, 1154960, 1152864,\n", - " 1152878, 1143134, 1147442, 1151821, 1154183, 1148498, 1141420, 1141419,\n", - " 1146265, 1146969, 1146967, 1149359, 1150219, 1167290, 1146623, 1146608,\n", - " 1151401, 1146488, 1144472, 1135688, 1152407, 1152409, 1154063, 1152097,\n", - " 1152109, 1146280, 1146287, 1156321, 1153037, 1153039, 1137746, 1140521,\n", - " 1155140, 1136401, 1136403, 1151952, 1152826, 1155337, 1154120, 1154123,\n", - " 1157839, 1152673, 1154633, 1139582, 1151579, 1151580, 1164753, 1151617,\n", - " 1150578, 1136132, 1136134, 1148916, 1172255, 1153379, 1152903, 1143988,\n", - " 1152341, 1152344, 1146816, 1156826, 1156831, 1156816, 1138283, 1138279,\n", - " 1138281, 1136028, 1158712, 1158704, 1151187, 1140684, 1152928, 1151064,\n", - " 1151071, 1156399, 1152890, 1142777, 1137539, 1153909, 1148040, 1155202,\n", - " 1149300, 1152601, 1152607, 1145656, 1149794, 1144659, 1137048, 1148628,\n", - " 1158530, 1158540, 1137458, 1149940, 1155376, 1157459, 1143442, 1157547,\n", - " 1142385, 1158860, 1148884, 1158916, 1156505, 1157064, 1153885, 1155412,\n", - " 1152833, 1145187, 1137808, 1139479, 1143496, 1157563, 1135730, 1150824,\n", - " 1156932, 1153413, 1153422, 1135644, 1135647, 1147810, 1151469, 1158306,\n", - " 1158308, 1158311, 1155441, 1155442, 1161730, 1150130, 1150136, 1162120,\n", - " 1144362, 1140866, 1154529, 1154530, 1150486, 1142758, 1156207, 1156271,\n", - " 1157637, 1151379, 1140186, 1155122, 1152527, 1157172, 1149321, 1149320,\n", - " 1149519, 1151424, 1135396, 1156452, 1156463, 1168230, 1155626, 1155628,\n", - " 1156563, 1154555, 1155576, 1158817, 1158824, 1177960, 1153712, 1153715,\n", - " 1148835, 1155635, 1155646, 1153363, 1143263, 1154080, 1154909, 1163122,\n", - " 1143189, 1153322, 1157430, 1150073, 1155613, 1150983, 1150990, 1151030,\n", - " 1137152, 1137158, 1153776, 1153786, 1149904, 1158204, 1137381, 1137380,\n", - " 1159116, 1138258, 1145694, 1134677, 1134683, 1135601, 1135602, 1150661,\n", - " 1155852, 1158665, 1157684, 1149145, 1140633, 1152220, 1152215, 1167298,\n", - " 1155971, 1155975, 1158846, 1156811, 1156812, 1155393, 1154600, 1159440,\n", - " 1136896, 1158753, 1158760, 1158764, 1158891, 1140215, 1158436, 1152463,\n", - " 1136480, 1136494, 1136491, 1159241, 1152143, 1156488, 1153808, 1156273,\n", - " 1136640, 1136646, 1158217, 1134757, 1140049, 1158558, 1146126, 1159936,\n", - " 1158006, 1155521, 1161541, 1171195, 1135650, 1164276, 1142666, 1167359,\n", - " 1159042, 1153052, 1153045, 1159738, 1167702, 1144158, 1142865, 1156107,\n", - " 1138396, 1138393, 1142683, 1167189, 1150046, 1149063, 1145948, 1155480,\n", - " 1153514, 1153519, 1147307, 1147300, 1142405, 1138161, 1164006, 1156795,\n", - " 1149963, 1139776, 1164901, 1184339, 1154590, 1154578, 1148021, 1166073,\n", - " 1161007, 1148771, 1169327, 1146063, 1165309, 1170415, 1140650, 1140643,\n", - " 1148600, 1148603, 1143139, 1144509, 1158653, 1159025, 1159032, 1159038,\n", - " 1163740, 1146542, 1160605, 1155588, 1144320, 1151220, 1168194, 1144977,\n", - " 1144986, 1144989, 1169646, 1147830, 1147836, 1146497, 1146500, 1146509,\n", - " 1153239, 1161240, 1144739, 1152776, 1155046, 1161562, 1147426, 1159386,\n", - " 1156739, 1160848, 1160849, 1153648, 1166579, 1166583, 1166591, 1150647,\n", - " 1150648, 1150649, 1166632, 1171040, 1150315, 1168748, 1144812, 1140112,\n", - " 1135567, 1135558, 1165719, 1162613, 1148683, 1165943, 1145228, 1170772,\n", - " 1146042, 1155324, 1144973, 1190699, 1162288, 1143037, 1165746, 1152626,\n", - " 1148124, 1147724, 1153534, 1152194, 1175240, 1143404, 1170980, 1166670,\n", - " 1171279, 1154076, 1168756, 1167315, 1147338, 1150783, 1149130, 1144686,\n", - " 1166653, 1145326, 1155172, 1155180, 1150515, 1156117, 1146601, 1154618,\n", - " 1144346, 1144336, 1157534, 1147746, 1154670, 1154893, 1169162, 1157331,\n", - " 1138129, 1138131, 1151664, 1151668, 1169359, 1149452, 1138609, 1158154,\n", - " 1149681, 1149688, 1158611, 1158051, 1158052, 1149847, 1157380, 1157384,\n", - " 1174454, 1179900, 1165892, 1154869, 1155502, 1172486, 1152353, 1169196,\n", - " 1168451, 1168400, 1155928, 1149403, 1148667, 1171560, 1147518, 1173307,\n", - " 1145033, 1154027, 1152150, 1169583, 1157153, 1172111, 1157371, 1147711,\n", - " 1157592, 1149237, 1169029, 1169037, 1179575, 1167712, 1181021, 1165122,\n", - " 1168598, 1160158, 1177700, 1159100, 1150234, 1154148, 1149173, 1179860,\n", - " 1184637, 1143279, 1169969, 1168481, 1156554, 1171302, 1170176, 1181241,\n", - " 1153803, 1153141, 1180916, 1151519, 1168778, 1179807, 1158030, 1158031,\n", - " 1161255, 1155262, 1171773, 1154716, 1157795, 1151488, 1182812, 1171623,\n", - " 1179191, 1153889, 1153899, 1145586, 1191744, 1145626, 1145618, 1156438,\n", - " 1172022, 1172024, 1178028, 1149755, 1146252, 1181348, 1153601, 1153609,\n", - " 1170069, 1158512, 1158524, 1181192, 1158370, 1158379, 1162988, 1140399,\n", - " 1162253, 1164231, 1164232, 1166446, 1183723, 1164264, 1181469, 1179125,\n", - " 1154957, 1165448, 1181778, 1170342, 1147169, 1147182, 1139828, 1139831,\n", - " 1139837, 1150265, 1170437, 1167131, 1154812, 1149668, 1190585, 1186928,\n", - " 1156055, 1151972, 1192212, 1173019, 1146386, 1146392, 1180052, 1191726,\n", - " 1182885, 1190298, 1178523, 1178527, 1193699, 1192328, 1168315, 1151774,\n", - " 1178484, 1152124, 1169789, 1162502, 1166838, 1171201, 1189659, 1188698,\n", - " 1194059, 1180786, 1158064, 1166785, 1145395, 1145398, 1179603, 1178135,\n", - " 1179662, 1155959, 1155962, 1193175, 1184966, 1179771, 1169837, 1191032,\n", - " 1172896, 1189962, 1194191, 1182863, 1176340, 1157017, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1137212, 1141424, 1141439, 1140282, 1140285, 1135926, 1135928,\n", - " 1135160, 1135716, 1135727, 1142201, 1137791, 1141758, 1137506, 1138335,\n", - " 1141251, 1141250, 1140295, 1136969, 1136971, 1138897, 1145363, 1145373,\n", - " 1146983, 1137947, 1143362, 1143372, 1143363, 1139241, 1146640, 1139615,\n", - " 1140781, 1150497, 1134940, 1136959, 1149216, 1155683, 1143820, 1147473,\n", - " 1141882, 1135992, 1135999, 1142881, 1144636, 1146995, 1146996, 1134700,\n", - " 1152664, 1148546, 1147091, 1147101, 1137220, 1145419, 1155018, 1147204,\n", - " 1147211, 1136679, 1152425, 1146369, 1134807, 1151546, 1138112, 1137254,\n", - " 1137181, 1149457, 1138353, 1140029, 1140953, 1135367, 1135202, 1136039,\n", - " 1134965, 1134960, 1141036, 1134794, 1138508, 1137328, 1137342, 1137693,\n", - " 1144786, 1144395, 1137529, 1137534, 1136590, 1156149, 1156159, 1148484,\n", - " 1139161, 1135579, 1135583, 1135830, 1138514, 1138524, 1153094, 1153099,\n", - " 1158136, 1154132, 1145120, 1156899, 1139684, 1138314, 1139878, 1138436,\n", - " 1138440, 1136534, 1138461, 1138449, 1157190, 1136594, 1138847, 1135088,\n", - " 1156603, 1156606, 1142611, 1145843, 1148531, 1148533, 1137109, 1139667,\n", - " 1139673, 1138079, 1138069, 1142243, 1134992, 1142793, 1136551, 1152642,\n", - " 1152648, 1135789, 1136734, 1159009, 1141070, 1144406, 1144410, 1153543,\n", - " 1139933, 1138648, 1155648, 1155654, 1141992, 1152044, 1142302, 1140670,\n", - " 1137734, 1137741, 1137728, 1134922, 1134750, 1135549, 1140228, 1141088,\n", - " 1141097, 1148993, 1149001, 1145356, 1143767, 1154860, 1143225, 1139033,\n", - " 1140003, 1152709, 1152719, 1136419, 1154479, 1141223, 1141891, 1139386,\n", - " 1141657, 1136917, 1139730, 1139732, 1143667, 1143677, 1145066, 1140592,\n", - " 1147844, 1137074, 1144428, 1141821, 1142093, 1140166, 1140173, 1158749,\n", - " 1141479, 1142917, 1142913, 1142560, 1137661, 1144596, 1136867, 1136864,\n", - " 1144041, 1141570, 1135322, 1144182, 1150906, 1166711, 1144865, 1146201,\n", - " 1134827, 1136565, 1139559, 1161701, 1147153, 1141365, 1153068, 1149088,\n", - " 1149090, 1153556, 1143917, 1139508, 1139510, 1139763, 1145213, 1143783,\n", - " 1143784, 1140616, 1140976, 1146693, 1147050, 1147047, 1145873, 1152988,\n", - " 1135457, 1141925, 1144242, 1140580, 1140582, 1141841, 1137146, 1137149,\n", - " 1137571, 1141382, 1141390, 1143845, 1143851, 1146024, 1146017, 1154332,\n", - " 1139990, 1146302, 1143293, 1143294, 1151124, 1147543, 1147540, 1147282,\n", - " 1142816, 1136330, 1140346, 1142628, 1149608, 1143051, 1136164, 1157717,\n", - " 1136836, 1136843, 1139329, 1139328, 1141490, 1141496, 1138238, 1145427,\n", - " 1143345, 1144766, 1144753, 1137098, 1144086, 1138600, 1139979, 1135874,\n", - " 1135876, 1150761, 1150294, 1146514, 1146523, 1138024, 1143456, 1143457,\n", - " 1143007, 1137703, 1144291, 1140482, 1140483, 1140492, 1143937, 1146636,\n", - " 1147523, 1140364, 1149575, 1137990, 1143075, 1166402, 1148966, 1144725,\n", - " 1147984, 1147988, 1147999, 1134899, 1144013, 1139252, 1147127, 1147131,\n", - " 1147244, 1148704, 1141319, 1141327, 1146751, 1146742, 1162729, 1148468,\n", - " 1152328, 1149718, 1145015, 1139549, 1158226, 1143921, 1147880, 1154526,\n", - " 1145240, 1145751, 1148397, 1146178, 1151242, 1152530, 1152537, 1150274,\n", - " 1151182, 1150438, 1150445, 1154437, 1154438, 1151860, 1149787, 1149791,\n", - " 1144514, 1145827, 1152013, 1165252, 1151487, 1154263, 1139919, 1149534,\n", - " 1150127, 1147019, 1147009, 1141945, 1141949, 1150733, 1153572, 1154976,\n", - " 1147653, 1148288, 1148300, 1137724, 1135079, 1154420, 1148180, 1148188,\n", - " 1151360, 1136251, 1139721, 1139718, 1146674, 1146676, 1146682, 1152494,\n", - " 1138404, 1148720, 1144110, 1151941, 1148204, 1153181, 1148108, 1154192,\n", - " 1154196, 1153124, 1153192, 1152962, 1152968, 1150932, 1154960, 1152864,\n", - " 1152878, 1143134, 1147442, 1151821, 1154183, 1148498, 1141420, 1141419,\n", - " 1146265, 1146969, 1146967, 1149359, 1150219, 1167290, 1146623, 1146608,\n", - " 1151401, 1146488, 1144472, 1135688, 1152407, 1152409, 1154063, 1152097,\n", - " 1152109, 1146280, 1146287, 1156321, 1153037, 1153039, 1137746, 1140521,\n", - " 1155140, 1136401, 1136403, 1151952, 1152826, 1155337, 1154120, 1154123,\n", - " 1157839, 1152673, 1154633, 1139582, 1151579, 1151580, 1164753, 1151617,\n", - " 1150578, 1136132, 1136134, 1148916, 1172255, 1153379, 1152903, 1143988,\n", - " 1152341, 1152344, 1146816, 1156826, 1156831, 1156816, 1138283, 1138279,\n", - " 1138281, 1136028, 1158712, 1158704, 1151187, 1140684, 1152928, 1151064,\n", - " 1151071, 1156399, 1152890, 1142777, 1137539, 1153909, 1148040, 1155202,\n", - " 1149300, 1152601, 1152607, 1145656, 1149794, 1144659, 1137048, 1148628,\n", - " 1158530, 1158540, 1137458, 1149940, 1155376, 1157459, 1143442, 1157547,\n", - " 1142385, 1158860, 1148884, 1158916, 1156505, 1157064, 1153885, 1155412,\n", - " 1152833, 1145187, 1137808, 1139479, 1143496, 1157563, 1135730, 1150824,\n", - " 1156932, 1153413, 1153422, 1135644, 1135647, 1147810, 1151469, 1158306,\n", - " 1158308, 1158311, 1155441, 1155442, 1161730, 1150130, 1150136, 1162120,\n", - " 1144362, 1140866, 1154529, 1154530, 1150486, 1142758, 1156207, 1156271,\n", - " 1157637, 1151379, 1140186, 1155122, 1152527, 1157172, 1149321, 1149320,\n", - " 1149519, 1151424, 1135396, 1156452, 1156463, 1168230, 1155626, 1155628,\n", - " 1156563, 1154555, 1155576, 1158817, 1158824, 1177960, 1153712, 1153715,\n", - " 1148835, 1155635, 1155646, 1153363, 1143263, 1154080, 1154909, 1163122,\n", - " 1143189, 1153322, 1157430, 1150073, 1155613, 1150983, 1150990, 1151030,\n", - " 1137152, 1137158, 1153776, 1153786, 1149904, 1158204, 1137381, 1137380,\n", - " 1159116, 1138258, 1145694, 1134677, 1134683, 1135601, 1135602, 1150661,\n", - " 1155852, 1158665, 1157684, 1149145, 1140633, 1152220, 1152215, 1167298,\n", - " 1155971, 1155975, 1158846, 1156811, 1156812, 1155393, 1154600, 1159440,\n", - " 1136896, 1158753, 1158760, 1158764, 1158891, 1140215, 1158436, 1152463,\n", - " 1136480, 1136494, 1136491, 1159241, 1152143, 1156488, 1153808, 1156273,\n", - " 1136640, 1136646, 1158217, 1134757, 1140049, 1158558, 1146126, 1159936,\n", - " 1158006, 1155521, 1161541, 1171195, 1135650, 1164276, 1142666, 1167359,\n", - " 1159042, 1153052, 1153045, 1159738, 1167702, 1144158, 1142865, 1156107,\n", - " 1138396, 1138393, 1142683, 1167189, 1150046, 1149063, 1145948, 1155480,\n", - " 1153514, 1153519, 1147307, 1147300, 1142405, 1138161, 1164006, 1156795,\n", - " 1149963, 1139776, 1164901, 1184339, 1154590, 1154578, 1148021, 1166073,\n", - " 1161007, 1148771, 1169327, 1146063, 1165309, 1170415, 1140650, 1140643,\n", - " 1148600, 1148603, 1143139, 1144509, 1158653, 1159025, 1159032, 1159038,\n", - " 1163740, 1146542, 1160605, 1155588, 1144320, 1151220, 1168194, 1144977,\n", - " 1144986, 1144989, 1169646, 1147830, 1147836, 1146497, 1146500, 1146509,\n", - " 1153239, 1161240, 1144739, 1152776, 1155046, 1161562, 1147426, 1159386,\n", - " 1156739, 1160848, 1160849, 1153648, 1166579, 1166583, 1166591, 1150647,\n", - " 1150648, 1150649, 1166632, 1171040, 1150315, 1168748, 1144812, 1140112,\n", - " 1135567, 1135558, 1165719, 1162613, 1148683, 1165943, 1145228, 1170772,\n", - " 1146042, 1155324, 1144973, 1190699, 1162288, 1143037, 1165746, 1152626,\n", - " 1148124, 1147724, 1153534, 1152194, 1175240, 1143404, 1170980, 1166670,\n", - " 1171279, 1154076, 1168756, 1167315, 1147338, 1150783, 1149130, 1144686,\n", - " 1166653, 1145326, 1155172, 1155180, 1150515, 1156117, 1146601, 1154618,\n", - " 1144346, 1144336, 1157534, 1147746, 1154670, 1154893, 1169162, 1157331,\n", - " 1138129, 1138131, 1151664, 1151668, 1169359, 1149452, 1138609, 1158154,\n", - " 1149681, 1149688, 1158611, 1158051, 1158052, 1149847, 1157380, 1157384,\n", - " 1174454, 1179900, 1165892, 1154869, 1155502, 1172486, 1152353, 1169196,\n", - " 1168451, 1168400, 1155928, 1149403, 1148667, 1171560, 1147518, 1173307,\n", - " 1145033, 1154027, 1152150, 1169583, 1157153, 1172111, 1157371, 1147711,\n", - " 1157592, 1149237, 1169029, 1169037, 1179575, 1167712, 1181021, 1165122,\n", - " 1168598, 1160158, 1177700, 1159100, 1150234, 1154148, 1149173, 1179860,\n", - " 1184637, 1143279, 1169969, 1168481, 1156554, 1171302, 1170176, 1181241,\n", - " 1153803, 1153141, 1180916, 1151519, 1168778, 1179807, 1158030, 1158031,\n", - " 1161255, 1155262, 1171773, 1154716, 1157795, 1151488, 1182812, 1171623,\n", - " 1179191, 1153889, 1153899, 1145586, 1191744, 1145626, 1145618, 1156438,\n", - " 1172022, 1172024, 1178028, 1149755, 1146252, 1181348, 1153601, 1153609,\n", - " 1170069, 1158512, 1158524, 1181192, 1158370, 1158379, 1162988, 1140399,\n", - " 1162253, 1164231, 1164232, 1166446, 1183723, 1164264, 1181469, 1179125,\n", - " 1154957, 1165448, 1181778, 1170342, 1147169, 1147182, 1139828, 1139831,\n", - " 1139837, 1150265, 1170437, 1167131, 1154812, 1149668, 1190585, 1186928,\n", - " 1156055, 1151972, 1192212, 1173019, 1146386, 1146392, 1180052, 1191726,\n", - " 1182885, 1190298, 1178523, 1178527, 1193699, 1192328, 1168315, 1151774,\n", - " 1178484, 1152124, 1169789, 1162502, 1166838, 1171201, 1189659, 1188698,\n", - " 1194059, 1180786, 1158064, 1166785, 1145395, 1145398, 1179603, 1178135,\n", - " 1179662, 1155959, 1155962, 1193175, 1184966, 1179771, 1169837, 1191032,\n", - " 1172896, 1189962, 1194191, 1182863, 1176340, 1157017, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195697, 1199282, 1202255, 1198844, 1201577, 1201582, 1201462, 1199278,\n", - " 1194626, 1198557, 1197516, 1194743, 1195494, 1199053, 1196631, 1197930,\n", - " 1201935, 1201992, 1197697, 1198095, 1194956, 1195888, 1195740, 1196835,\n", - " 1197807, 1198958, 1198163, 1198167, 1198169, 1196711, 1195270, 1197136,\n", - " 1196247, 1196109, 1199377, 1202017, 1195351, 1195353, 1197318, 1199329,\n", - " 1200949, 1194928, 1199628, 1197990, 1200079, 1200869, 1200872, 1200878,\n", - " 1199154, 1198406, 1199579, 1201917, 1199745, 1194795, 1201511, 1196499,\n", - " 1199018, 1197977, 1197601, 1196727, 1196734, 1195762, 1195771, 1202612,\n", - " 1198428, 1198811, 1200163, 1200503, 1203282, 1201421, 1201155, 1201156,\n", - " 1200918, 1201358, 1201737, 1200553, 1197100, 1199088, 1199908, 1201442,\n", - " 1201029, 1202239, 1199482, 1202175, 1202662, 1201291, 1198478, 1203263,\n", - " 1200388, 1200398, 1198562, 1196966, 1198512, 1195679, 1198929, 1195415,\n", - " 1195379, 1197822, 1196414, 1196605, 1198967, 1200585, 1201138, 1194730,\n", - " 1200003, 1198824, 1197731, 1197735, 1200010, 1198819, 1201196, 1200302,\n", - " 1197652, 1197335, 1196557, 1197872], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195697, 1199282, 1202255, 1198844, 1201577, 1201582, 1201462, 1199278,\n", - " 1194626, 1198557, 1197516, 1194743, 1195494, 1199053, 1196631, 1197930,\n", - " 1201935, 1201992, 1197697, 1198095, 1194956, 1195888, 1195740, 1196835,\n", - " 1197807, 1198958, 1198163, 1198167, 1198169, 1196711, 1195270, 1197136,\n", - " 1196247, 1196109, 1199377, 1202017, 1195351, 1195353, 1197318, 1199329,\n", - " 1200949, 1194928, 1199628, 1197990, 1200079, 1200869, 1200872, 1200878,\n", - " 1199154, 1198406, 1199579, 1201917, 1199745, 1194795, 1201511, 1196499,\n", - " 1199018, 1197977, 1197601, 1196727, 1196734, 1195762, 1195771, 1202612,\n", - " 1198428, 1198811, 1200163, 1200503, 1203282, 1201421, 1201155, 1201156,\n", - " 1200918, 1201358, 1201737, 1200553, 1197100, 1199088, 1199908, 1201442,\n", - " 1201029, 1202239, 1199482, 1202175, 1202662, 1201291, 1198478, 1203263,\n", - " 1200388, 1200398, 1198562, 1196966, 1198512, 1195679, 1198929, 1195415,\n", - " 1195379, 1197822, 1196414, 1196605, 1198967, 1200585, 1201138, 1194730,\n", - " 1200003, 1198824, 1197731, 1197735, 1200010, 1198819, 1201196, 1200302,\n", - " 1197652, 1197335, 1196557, 1197872], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 2.1845e-01, -4.5682e-06, 9.4267e-01, ..., 1.3915e-01,\n", - " -2.0142e-03, -6.0337e-03],\n", - " [ 1.5090e-01, 9.8135e-02, 6.2236e-01, ..., 1.4364e-01,\n", - " -1.4881e-03, -4.2146e-03],\n", - " [ 1.8049e-01, 2.6570e-02, 8.9035e-01, ..., 1.3949e-01,\n", - " -1.8757e-03, -5.7157e-03],\n", - " ...,\n", - " [ 9.9492e-02, 1.0651e-02, 7.0766e-01, ..., 1.7134e-01,\n", - " -2.3004e-03, -4.3384e-03],\n", - " [ 1.0815e-01, -6.8823e-05, 7.6239e-01, ..., 1.7273e-01,\n", - " -2.2390e-03, -5.0121e-03],\n", - " [ 1.2952e-01, -1.5213e-04, 7.6516e-01, ..., 1.6862e-01,\n", - " -2.4270e-03, -4.9554e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 9.2035e-01, 1.7147e-01, 1.7754e+00, ..., -4.4240e-03,\n", - " -1.8613e-02, 1.3265e-01],\n", - " [ 2.4188e-01, -2.3353e-02, 4.3729e+00, ..., -9.9940e-03,\n", - " -3.5612e-02, -1.6014e-02],\n", - " [ 7.2933e-01, 2.9555e-01, 2.6138e+00, ..., -3.3224e-03,\n", - " -1.9120e-02, -5.5413e-03],\n", - " ...,\n", - " [ 2.9411e-01, -8.1498e-03, 3.1944e+00, ..., -4.5959e-03,\n", - " -2.1180e-02, -1.2381e-02],\n", - " [ 5.6519e-01, 1.2229e-01, 1.9795e+00, ..., -3.5765e-03,\n", - " -1.8863e-02, -3.2459e-03],\n", - " [ 2.2768e+00, -9.4701e-04, 3.3311e+00, ..., 1.5243e+00,\n", - " -5.0333e-02, 3.3531e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-1.5159e-03, 2.8165e-01, 2.7883e-01, ..., 1.7956e+00,\n", - " -1.2684e-03, 7.1719e-02],\n", - " [-6.9840e-04, 3.1375e-02, 1.3777e-01, ..., 1.6635e-01,\n", - " -1.7806e-04, -7.4179e-04],\n", - " [-2.9389e-03, 2.7104e-01, 3.1278e-01, ..., 1.5114e+00,\n", - " -3.1550e-03, -2.3285e-03],\n", - " ...,\n", - " [-6.9840e-04, 3.1375e-02, 1.3777e-01, ..., 1.6635e-01,\n", - " -1.7806e-04, -7.4179e-04],\n", - " [-1.3775e-03, 2.2075e-01, 2.8576e-01, ..., 1.6914e+00,\n", - " -7.0190e-04, 1.9177e-03],\n", - " [-1.9778e-03, 2.6290e-01, 2.6520e-01, ..., 1.6558e+00,\n", - " -2.0039e-03, -3.8949e-04]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-4.9376e-04, 6.2343e-01, 3.6783e-01, ..., -7.5502e-03,\n", - " 5.8651e-02, 4.4053e-01],\n", - " [-3.7096e-04, 6.6328e-01, 3.8373e-01, ..., -7.8828e-03,\n", - " 2.3160e-01, 4.1840e-01],\n", - " [ 3.9359e-02, 6.1675e-01, 2.3136e-01, ..., -7.6779e-03,\n", - " 3.8888e-01, 1.6905e-01],\n", - " ...,\n", - " [ 8.2975e-02, 6.6428e-01, 3.0306e-01, ..., -7.5404e-03,\n", - " 3.5128e-01, 2.0797e-01],\n", - " [ 3.7490e-02, 6.8307e-01, 3.8635e-01, ..., -8.8509e-03,\n", - " 2.7786e-01, 4.3009e-01],\n", - " [ 2.0291e-01, 6.8223e-01, 4.4676e-01, ..., -6.6920e-03,\n", - " 2.5390e-01, 8.9572e-03]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 98, 20, 149, 149, 192, 76, 139, 139, 139, 139, 139, 139,\n", - " 139, 139, 132, 132, 132, 132, 109, 109, 443, 400, 313, 294,\n", - " 307, 307, 307, 505, 396, 396, 533, 550, 670, 835, 835, 852,\n", - " 852, 782, 772, 874, 992, 831, 1374, 1119, 1119, 891, 751, 905,\n", - " 1012, 992, 1071, 1270, 1033, 1033, 1434, 1367, 1275, 1432, 1342, 1392,\n", - " 1501, 1853, 1403, 1403, 1403, 1344, 1551, 1551, 1551, 1633, 1416, 1416,\n", - " 1416, 1712, 2083, 1828, 1760, 2119, 2108, 1954, 2181, 2215, 2137, 2113,\n", - " 2088, 2106, 2288, 2205, 2155, 2362, 2362, 2429, 2403, 2328, 2354, 2354,\n", - " 2379, 2379, 2233, 2479, 2497, 2498, 2451, 2474, 2474, 2474, 2474, 2474,\n", - " 2602, 2553, 2553, 2641, 2481, 2859, 2835, 3125, 2957, 3133, 2995, 3139,\n", - " 3139, 3216, 3169, 3269, 3280, 3280, 3268, 3397, 3324, 3324, 3324, 3206,\n", - " 3517, 3630, 3602, 3734, 3675, 3675, 4068, 4068, 3949, 4117, 4097, 4209,\n", - " 4399, 4399, 4399, 4441, 4441, 4441, 4571, 4414, 4649, 4762, 4643, 4620,\n", - " 4512, 4512, 4512, 4781, 4800, 4800, 4767, 4882, 4819, 4932, 4809, 4933,\n", - " 5004, 5050, 5145, 5082, 5099, 5099, 5099, 5018, 5034, 5486, 5254, 5306,\n", - " 5306, 5306, 5306, 5306, 5306, 5282, 5519, 5421, 5420, 5519, 5564, 5947,\n", - " 5716, 5977, 5991, 6086],\n", - " [ 24, 1, 94, 104, 39, 34, 16, 84, 57, 96, 112, 70,\n", - " 58, 3, 50, 68, 65, 82, 10, 107, 94, 59, 76, 39,\n", - " 50, 18, 65, 10, 54, 1, 10, 13, 38, 92, 37, 74,\n", - " 54, 27, 49, 50, 68, 22, 53, 66, 101, 102, 46, 5,\n", - " 71, 108, 56, 52, 1, 34, 80, 21, 42, 25, 25, 87,\n", - " 14, 35, 61, 37, 47, 91, 7, 89, 109, 52, 18, 8,\n", - " 21, 9, 60, 59, 80, 99, 114, 91, 91, 113, 35, 35,\n", - " 80, 107, 21, 22, 94, 103, 101, 101, 115, 39, 54, 41,\n", - " 17, 77, 35, 89, 22, 25, 101, 21, 88, 4, 6, 101,\n", - " 20, 69, 15, 69, 35, 42, 100, 97, 26, 33, 35, 42,\n", - " 12, 74, 25, 2, 91, 72, 71, 95, 48, 1, 51, 5,\n", - " 102, 19, 85, 93, 64, 106, 73, 114, 45, 107, 40, 23,\n", - " 63, 32, 115, 64, 1, 93, 17, 14, 105, 31, 59, 74,\n", - " 79, 43, 42, 29, 105, 22, 67, 1, 43, 1, 2, 101,\n", - " 98, 1, 81, 18, 50, 28, 65, 105, 62, 17, 90, 11,\n", - " 83, 1, 44, 86, 78, 0, 107, 41, 36, 55, 81, 110,\n", - " 30, 38, 75, 111]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3638, 2549, 3071, ..., 585, 5731, 3656],\n", - " [ 89, 143, 151, ..., 7695, 7708, 7683]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 55, 107, 1, ..., 89, 107, 91],\n", - " [ 154, 26, 25, ..., 6070, 5974, 6015]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 151, 151, 151, ..., 7741, 7741, 7741],\n", - " [ 712, 879, 415, ..., 689, 821, 549]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 286, 397, 226, ..., 305, 146, 88],\n", - " [ 78, 186, 295, ..., 7691, 7714, 7699]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[7234, 4029, 6090, ..., 7527, 6368, 7142],\n", - " [ 115, 24, 39, ..., 6074, 6009, 5863]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 151, 151, 151, ..., 7666, 7666, 7690],\n", - " [ 377, 1960, 2885, ..., 5234, 5372, 1494]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 76, 76, 140, ..., 6086, 6086, 6086],\n", - " [2206, 3071, 4815, ..., 4029, 3568, 3658]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.007111\n", - "sampling 0.006954\n", - "noi time: 0.002103\n", - "get_vertex_data call: 0.033106\n", - "noi group time: 0.002561\n", - "eoi_group_time: 0.01348\n", - "second half: 0.206896\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24187, 32616, 24818, ..., 1120070, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24187, 32616, 24818, ..., 1120070, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1212293, 1232753, 1208425, ..., 1931114, 1925024, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1212293, 1232753, 1208425, ..., 1931114, 1925024, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137439, 1137204, 1140282, 1135926, 1135165, 1135723, 1137784, 1137791,\n", - " 1141748, 1141756, 1141758, 1136213, 1141250, 1140293, 1142813, 1136965,\n", - " 1136969, 1141448, 1138897, 1151164, 1139811, 1145366, 1145992, 1138938,\n", - " 1139141, 1143372, 1139235, 1139243, 1139241, 1146640, 1139609, 1139615,\n", - " 1150497, 1142968, 1139865, 1139866, 1149216, 1142958, 1143820, 1147483,\n", - " 1142894, 1142881, 1144636, 1148512, 1149037, 1149038, 1146995, 1134700,\n", - " 1148343, 1146656, 1152666, 1153220, 1155014, 1155018, 1147202, 1136256,\n", - " 1136268, 1134807, 1138112, 1137254, 1138356, 1135367, 1135202, 1136036,\n", - " 1141036, 1136768, 1134794, 1157443, 1138504, 1138508, 1137691, 1137693,\n", - " 1144395, 1136714, 1157393, 1157397, 1136581, 1136662, 1137441, 1137472,\n", - " 1136928, 1135265, 1156149, 1156159, 1135579, 1135583, 1135670, 1140963,\n", - " 1138514, 1153094, 1153099, 1156967, 1135499, 1154141, 1135522, 1139687,\n", - " 1137287, 1157703, 1138436, 1138440, 1138445, 1138461, 1138462, 1137491,\n", - " 1154798, 1157190, 1136594, 1158390, 1142611, 1135359, 1135624, 1156141,\n", - " 1138185, 1145855, 1148531, 1148543, 1137109, 1139667, 1139668, 1138070,\n", - " 1134992, 1136551, 1135776, 1135781, 1136730, 1142909, 1159012, 1153543,\n", - " 1140045, 1140036, 1136065, 1139933, 1138151, 1141962, 1141992, 1152044,\n", - " 1139069, 1137741, 1137728, 1146222, 1134750, 1137005, 1136697, 1141088,\n", - " 1141097, 1141102, 1149001, 1143767, 1154860, 1137299, 1143225, 1140003,\n", - " 1149979, 1135860, 1135861, 1136417, 1136418, 1136426, 1136625, 1141112,\n", - " 1141224, 1139386, 1145071, 1144237, 1140592, 1141159, 1139495, 1144650,\n", - " 1134987, 1147850, 1138482, 1142063, 1141821, 1140173, 1141479, 1138708,\n", - " 1140110, 1142913, 1143111, 1144596, 1136867, 1141578, 1135315, 1135327,\n", - " 1141405, 1144182, 1150906, 1146201, 1134827, 1158703, 1137841, 1147153,\n", - " 1141365, 1153068, 1141664, 1149088, 1149101, 1144279, 1153556, 1139508,\n", - " 1139510, 1139127, 1145001, 1140976, 1140990, 1147050, 1147047, 1145873,\n", - " 1143551, 1152976, 1152982, 1135457, 1139447, 1141925, 1146898, 1144242,\n", - " 1140580, 1140585, 1140582, 1165365, 1141841, 1137149, 1150692, 1150695,\n", - " 1143643, 1143637, 1137571, 1137570, 1141382, 1145983, 1143845, 1146006,\n", - " 1136273, 1142098, 1146024, 1150596, 1154328, 1142533, 1139990, 1139988,\n", - " 1143293, 1143294, 1151121, 1147543, 1147540, 1148763, 1147282, 1149155,\n", - " 1149161, 1140337, 1140346, 1142637, 1139417, 1149608, 1149610, 1136167,\n", - " 1136836, 1139301, 1139329, 1145431, 1143345, 1144765, 1150294, 1146523,\n", - " 1143967, 1138024, 1143456, 1143470, 1140482, 1146590, 1149076, 1143799,\n", - " 1143807, 1140352, 1140364, 1137990, 1137985, 1143080, 1143082, 1143083,\n", - " 1144219, 1144222, 1147995, 1147999, 1144013, 1139252, 1148704, 1150997,\n", - " 1153701, 1143434, 1149722, 1147025, 1147971, 1141131, 1158226, 1158235,\n", - " 1143921, 1145240, 1145751, 1148394, 1146178, 1151242, 1152531, 1150280,\n", - " 1150438, 1150445, 1154437, 1151862, 1149791, 1149777, 1144514, 1144526,\n", - " 1150350, 1152013, 1165260, 1151473, 1154263, 1139919, 1140561, 1147019,\n", - " 1147021, 1141949, 1141194, 1150736, 1141269, 1147653, 1147654, 1147659,\n", - " 1137724, 1135083, 1151412, 1154420, 1152563, 1138198, 1146682, 1138867,\n", - " 1138400, 1147627, 1146547, 1143983, 1171939, 1154197, 1153186, 1153197,\n", - " 1145109, 1145111, 1150935, 1148054, 1144863, 1150356, 1169594, 1143134,\n", - " 1147442, 1151816, 1151821, 1151913, 1154183, 1154190, 1150715, 1145640,\n", - " 1148510, 1146565, 1141420, 1150637, 1150632, 1147609, 1147737, 1145079,\n", - " 1150210, 1146623, 1151691, 1144468, 1135688, 1152407, 1152409, 1152415,\n", - " 1151729, 1156325, 1137746, 1146304, 1152623, 1140521, 1155150, 1149208,\n", - " 1151967, 1155337, 1154123, 1152673, 1151617, 1151629, 1136131, 1136798,\n", - " 1148916, 1148921, 1138991, 1152341, 1156007, 1136028, 1136031, 1158704,\n", - " 1152928, 1156396, 1154722, 1156422, 1150161, 1144016, 1142257, 1148040,\n", - " 1155202, 1149300, 1152601, 1144657, 1137047, 1137048, 1148628, 1158530,\n", - " 1137458, 1142041, 1142047, 1157229, 1150872, 1148884, 1158920, 1154929,\n", - " 1156505, 1157064, 1157071, 1155422, 1145191, 1150465, 1146854, 1135231,\n", - " 1135740, 1152183, 1156638, 1151777, 1150824, 1147810, 1143010, 1158304,\n", - " 1158308, 1158311, 1151276, 1174265, 1155441, 1155442, 1153359, 1150130,\n", - " 1150132, 1154529, 1142756, 1156207, 1138775, 1151380, 1151379, 1140179,\n", - " 1155122, 1149321, 1149320, 1153478, 1153481, 1146913, 1155628, 1155630,\n", - " 1155631, 1156563, 1156566, 1158573, 1158824, 1177960, 1158324, 1156993,\n", - " 1148835, 1155646, 1153363, 1162396, 1154241, 1154240, 1143189, 1143531,\n", - " 1150371, 1145723, 1143517, 1143504, 1157928, 1157933, 1151030, 1157653,\n", - " 1158126, 1158584, 1153776, 1153786, 1145694, 1145690, 1145681, 1137316,\n", - " 1140920, 1134682, 1164163, 1148149, 1150664, 1150671, 1158665, 1158669,\n", - " 1138215, 1157684, 1146325, 1149145, 1159258, 1155717, 1152220, 1152215,\n", - " 1152498, 1140370, 1140380, 1159132, 1157031, 1155975, 1158846, 1163238,\n", - " 1154592, 1154600, 1154605, 1161309, 1136896, 1158753, 1158760, 1158815,\n", - " 1158438, 1158447, 1136480, 1136494, 1164931, 1159241, 1147586, 1156490,\n", - " 1153808, 1156278, 1136646, 1134757, 1158558, 1156516, 1165489, 1163181,\n", - " 1163183, 1150011, 1155521, 1137567, 1135661, 1192539, 1142666, 1152479,\n", - " 1157759, 1167346, 1162683, 1159052, 1159065, 1157946, 1153052, 1153045,\n", - " 1156235, 1153842, 1156098, 1138393, 1150046, 1149063, 1149070, 1151020,\n", - " 1153514, 1153519, 1171987, 1164006, 1156787, 1149963, 1139286, 1140735,\n", - " 1157357, 1146063, 1159931, 1165306, 1158878, 1169493, 1140641, 1140643,\n", - " 1148603, 1143139, 1143143, 1159032, 1169114, 1152247, 1143734, 1160605,\n", - " 1155588, 1156584, 1151226, 1148567, 1144977, 1144979, 1149016, 1153239,\n", - " 1169257, 1144739, 1152776, 1162580, 1155268, 1168067, 1153212, 1147426,\n", - " 1147433, 1156737, 1156739, 1157955, 1165182, 1168748, 1144812, 1153267,\n", - " 1135567, 1145176, 1148683, 1169282, 1154695, 1155320, 1144972, 1144973,\n", - " 1142136, 1146444, 1148168, 1143025, 1165746, 1152624, 1139345, 1147723,\n", - " 1153520, 1152203, 1181048, 1175240, 1143395, 1170978, 1158734, 1154076,\n", - " 1147338, 1173912, 1170758, 1169602, 1167817, 1154213, 1180431, 1150522,\n", - " 1154618, 1144346, 1144336, 1157534, 1138378, 1147746, 1154670, 1154882,\n", - " 1157331, 1157342, 1138130, 1141043, 1169359, 1150027, 1154364, 1149452,\n", - " 1138609, 1158623, 1158052, 1173047, 1149847, 1157380, 1165892, 1152353,\n", - " 1166486, 1168400, 1149402, 1148656, 1167014, 1171560, 1173307, 1161145,\n", - " 1160936, 1154027, 1169583, 1151696, 1157158, 1157153, 1157373, 1168126,\n", - " 1147711, 1151850, 1148133, 1147934, 1149247, 1172961, 1166746, 1168604,\n", - " 1172234, 1172226, 1180476, 1172932, 1179882, 1166535, 1150234, 1154148,\n", - " 1158176, 1167517, 1143271, 1168481, 1181237, 1153803, 1153141, 1173243,\n", - " 1171318, 1144910, 1172309, 1182647, 1178914, 1161255, 1155260, 1155262,\n", - " 1171773, 1157792, 1157795, 1171623, 1171391, 1155806, 1157126, 1157991,\n", - " 1153898, 1191749, 1185933, 1145626, 1157483, 1179453, 1149755, 1153601,\n", - " 1186957, 1158512, 1158380, 1155890, 1155892, 1180852, 1157268, 1157279,\n", - " 1162968, 1140399, 1164788, 1187779, 1171634, 1160806, 1188939, 1168621,\n", - " 1164228, 1164339, 1184287, 1165082, 1170264, 1156862, 1147182, 1186355,\n", - " 1168943, 1184050, 1139825, 1139831, 1139837, 1150265, 1154812, 1149668,\n", - " 1156055, 1170001, 1181447, 1191134, 1146394, 1173058, 1186746, 1182370,\n", - " 1170207, 1181909, 1186472, 1151774, 1166838, 1180962, 1189924, 1192979,\n", - " 1180998, 1172423, 1172429, 1178046, 1145395, 1145398, 1176233, 1185244,\n", - " 1155962, 1172187, 1181248, 1172896, 1189360, 1189075, 1157017, 1161940],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137439, 1137204, 1140282, 1135926, 1135165, 1135723, 1137784, 1137791,\n", - " 1141748, 1141756, 1141758, 1136213, 1141250, 1140293, 1142813, 1136965,\n", - " 1136969, 1141448, 1138897, 1151164, 1139811, 1145366, 1145992, 1138938,\n", - " 1139141, 1143372, 1139235, 1139243, 1139241, 1146640, 1139609, 1139615,\n", - " 1150497, 1142968, 1139865, 1139866, 1149216, 1142958, 1143820, 1147483,\n", - " 1142894, 1142881, 1144636, 1148512, 1149037, 1149038, 1146995, 1134700,\n", - " 1148343, 1146656, 1152666, 1153220, 1155014, 1155018, 1147202, 1136256,\n", - " 1136268, 1134807, 1138112, 1137254, 1138356, 1135367, 1135202, 1136036,\n", - " 1141036, 1136768, 1134794, 1157443, 1138504, 1138508, 1137691, 1137693,\n", - " 1144395, 1136714, 1157393, 1157397, 1136581, 1136662, 1137441, 1137472,\n", - " 1136928, 1135265, 1156149, 1156159, 1135579, 1135583, 1135670, 1140963,\n", - " 1138514, 1153094, 1153099, 1156967, 1135499, 1154141, 1135522, 1139687,\n", - " 1137287, 1157703, 1138436, 1138440, 1138445, 1138461, 1138462, 1137491,\n", - " 1154798, 1157190, 1136594, 1158390, 1142611, 1135359, 1135624, 1156141,\n", - " 1138185, 1145855, 1148531, 1148543, 1137109, 1139667, 1139668, 1138070,\n", - " 1134992, 1136551, 1135776, 1135781, 1136730, 1142909, 1159012, 1153543,\n", - " 1140045, 1140036, 1136065, 1139933, 1138151, 1141962, 1141992, 1152044,\n", - " 1139069, 1137741, 1137728, 1146222, 1134750, 1137005, 1136697, 1141088,\n", - " 1141097, 1141102, 1149001, 1143767, 1154860, 1137299, 1143225, 1140003,\n", - " 1149979, 1135860, 1135861, 1136417, 1136418, 1136426, 1136625, 1141112,\n", - " 1141224, 1139386, 1145071, 1144237, 1140592, 1141159, 1139495, 1144650,\n", - " 1134987, 1147850, 1138482, 1142063, 1141821, 1140173, 1141479, 1138708,\n", - " 1140110, 1142913, 1143111, 1144596, 1136867, 1141578, 1135315, 1135327,\n", - " 1141405, 1144182, 1150906, 1146201, 1134827, 1158703, 1137841, 1147153,\n", - " 1141365, 1153068, 1141664, 1149088, 1149101, 1144279, 1153556, 1139508,\n", - " 1139510, 1139127, 1145001, 1140976, 1140990, 1147050, 1147047, 1145873,\n", - " 1143551, 1152976, 1152982, 1135457, 1139447, 1141925, 1146898, 1144242,\n", - " 1140580, 1140585, 1140582, 1165365, 1141841, 1137149, 1150692, 1150695,\n", - " 1143643, 1143637, 1137571, 1137570, 1141382, 1145983, 1143845, 1146006,\n", - " 1136273, 1142098, 1146024, 1150596, 1154328, 1142533, 1139990, 1139988,\n", - " 1143293, 1143294, 1151121, 1147543, 1147540, 1148763, 1147282, 1149155,\n", - " 1149161, 1140337, 1140346, 1142637, 1139417, 1149608, 1149610, 1136167,\n", - " 1136836, 1139301, 1139329, 1145431, 1143345, 1144765, 1150294, 1146523,\n", - " 1143967, 1138024, 1143456, 1143470, 1140482, 1146590, 1149076, 1143799,\n", - " 1143807, 1140352, 1140364, 1137990, 1137985, 1143080, 1143082, 1143083,\n", - " 1144219, 1144222, 1147995, 1147999, 1144013, 1139252, 1148704, 1150997,\n", - " 1153701, 1143434, 1149722, 1147025, 1147971, 1141131, 1158226, 1158235,\n", - " 1143921, 1145240, 1145751, 1148394, 1146178, 1151242, 1152531, 1150280,\n", - " 1150438, 1150445, 1154437, 1151862, 1149791, 1149777, 1144514, 1144526,\n", - " 1150350, 1152013, 1165260, 1151473, 1154263, 1139919, 1140561, 1147019,\n", - " 1147021, 1141949, 1141194, 1150736, 1141269, 1147653, 1147654, 1147659,\n", - " 1137724, 1135083, 1151412, 1154420, 1152563, 1138198, 1146682, 1138867,\n", - " 1138400, 1147627, 1146547, 1143983, 1171939, 1154197, 1153186, 1153197,\n", - " 1145109, 1145111, 1150935, 1148054, 1144863, 1150356, 1169594, 1143134,\n", - " 1147442, 1151816, 1151821, 1151913, 1154183, 1154190, 1150715, 1145640,\n", - " 1148510, 1146565, 1141420, 1150637, 1150632, 1147609, 1147737, 1145079,\n", - " 1150210, 1146623, 1151691, 1144468, 1135688, 1152407, 1152409, 1152415,\n", - " 1151729, 1156325, 1137746, 1146304, 1152623, 1140521, 1155150, 1149208,\n", - " 1151967, 1155337, 1154123, 1152673, 1151617, 1151629, 1136131, 1136798,\n", - " 1148916, 1148921, 1138991, 1152341, 1156007, 1136028, 1136031, 1158704,\n", - " 1152928, 1156396, 1154722, 1156422, 1150161, 1144016, 1142257, 1148040,\n", - " 1155202, 1149300, 1152601, 1144657, 1137047, 1137048, 1148628, 1158530,\n", - " 1137458, 1142041, 1142047, 1157229, 1150872, 1148884, 1158920, 1154929,\n", - " 1156505, 1157064, 1157071, 1155422, 1145191, 1150465, 1146854, 1135231,\n", - " 1135740, 1152183, 1156638, 1151777, 1150824, 1147810, 1143010, 1158304,\n", - " 1158308, 1158311, 1151276, 1174265, 1155441, 1155442, 1153359, 1150130,\n", - " 1150132, 1154529, 1142756, 1156207, 1138775, 1151380, 1151379, 1140179,\n", - " 1155122, 1149321, 1149320, 1153478, 1153481, 1146913, 1155628, 1155630,\n", - " 1155631, 1156563, 1156566, 1158573, 1158824, 1177960, 1158324, 1156993,\n", - " 1148835, 1155646, 1153363, 1162396, 1154241, 1154240, 1143189, 1143531,\n", - " 1150371, 1145723, 1143517, 1143504, 1157928, 1157933, 1151030, 1157653,\n", - " 1158126, 1158584, 1153776, 1153786, 1145694, 1145690, 1145681, 1137316,\n", - " 1140920, 1134682, 1164163, 1148149, 1150664, 1150671, 1158665, 1158669,\n", - " 1138215, 1157684, 1146325, 1149145, 1159258, 1155717, 1152220, 1152215,\n", - " 1152498, 1140370, 1140380, 1159132, 1157031, 1155975, 1158846, 1163238,\n", - " 1154592, 1154600, 1154605, 1161309, 1136896, 1158753, 1158760, 1158815,\n", - " 1158438, 1158447, 1136480, 1136494, 1164931, 1159241, 1147586, 1156490,\n", - " 1153808, 1156278, 1136646, 1134757, 1158558, 1156516, 1165489, 1163181,\n", - " 1163183, 1150011, 1155521, 1137567, 1135661, 1192539, 1142666, 1152479,\n", - " 1157759, 1167346, 1162683, 1159052, 1159065, 1157946, 1153052, 1153045,\n", - " 1156235, 1153842, 1156098, 1138393, 1150046, 1149063, 1149070, 1151020,\n", - " 1153514, 1153519, 1171987, 1164006, 1156787, 1149963, 1139286, 1140735,\n", - " 1157357, 1146063, 1159931, 1165306, 1158878, 1169493, 1140641, 1140643,\n", - " 1148603, 1143139, 1143143, 1159032, 1169114, 1152247, 1143734, 1160605,\n", - " 1155588, 1156584, 1151226, 1148567, 1144977, 1144979, 1149016, 1153239,\n", - " 1169257, 1144739, 1152776, 1162580, 1155268, 1168067, 1153212, 1147426,\n", - " 1147433, 1156737, 1156739, 1157955, 1165182, 1168748, 1144812, 1153267,\n", - " 1135567, 1145176, 1148683, 1169282, 1154695, 1155320, 1144972, 1144973,\n", - " 1142136, 1146444, 1148168, 1143025, 1165746, 1152624, 1139345, 1147723,\n", - " 1153520, 1152203, 1181048, 1175240, 1143395, 1170978, 1158734, 1154076,\n", - " 1147338, 1173912, 1170758, 1169602, 1167817, 1154213, 1180431, 1150522,\n", - " 1154618, 1144346, 1144336, 1157534, 1138378, 1147746, 1154670, 1154882,\n", - " 1157331, 1157342, 1138130, 1141043, 1169359, 1150027, 1154364, 1149452,\n", - " 1138609, 1158623, 1158052, 1173047, 1149847, 1157380, 1165892, 1152353,\n", - " 1166486, 1168400, 1149402, 1148656, 1167014, 1171560, 1173307, 1161145,\n", - " 1160936, 1154027, 1169583, 1151696, 1157158, 1157153, 1157373, 1168126,\n", - " 1147711, 1151850, 1148133, 1147934, 1149247, 1172961, 1166746, 1168604,\n", - " 1172234, 1172226, 1180476, 1172932, 1179882, 1166535, 1150234, 1154148,\n", - " 1158176, 1167517, 1143271, 1168481, 1181237, 1153803, 1153141, 1173243,\n", - " 1171318, 1144910, 1172309, 1182647, 1178914, 1161255, 1155260, 1155262,\n", - " 1171773, 1157792, 1157795, 1171623, 1171391, 1155806, 1157126, 1157991,\n", - " 1153898, 1191749, 1185933, 1145626, 1157483, 1179453, 1149755, 1153601,\n", - " 1186957, 1158512, 1158380, 1155890, 1155892, 1180852, 1157268, 1157279,\n", - " 1162968, 1140399, 1164788, 1187779, 1171634, 1160806, 1188939, 1168621,\n", - " 1164228, 1164339, 1184287, 1165082, 1170264, 1156862, 1147182, 1186355,\n", - " 1168943, 1184050, 1139825, 1139831, 1139837, 1150265, 1154812, 1149668,\n", - " 1156055, 1170001, 1181447, 1191134, 1146394, 1173058, 1186746, 1182370,\n", - " 1170207, 1181909, 1186472, 1151774, 1166838, 1180962, 1189924, 1192979,\n", - " 1180998, 1172423, 1172429, 1178046, 1145395, 1145398, 1176233, 1185244,\n", - " 1155962, 1172187, 1181248, 1172896, 1189360, 1189075, 1157017, 1161940],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195710, 1199428, 1199439, 1198730, 1199282, 1199284, 1198449, 1198459,\n", - " 1202255, 1201577, 1201582, 1194626, 1203131, 1197351, 1197512, 1196685,\n", - " 1194743, 1194648, 1195263, 1196534, 1201992, 1195187, 1196031, 1198543,\n", - " 1195459, 1202902, 1199171, 1196334, 1196359, 1196977, 1196521, 1194759,\n", - " 1199371, 1196165, 1198039, 1198164, 1198161, 1195141, 1195221, 1197141,\n", - " 1196242, 1197265, 1196109, 1194859, 1195847, 1196312, 1199984, 1195351,\n", - " 1198273, 1199070, 1196851, 1194928, 1197583, 1197990, 1200866, 1200869,\n", - " 1200872, 1200874, 1200878, 1198404, 1199231, 1195017, 1198763, 1201511,\n", - " 1196496, 1199014, 1197977, 1197609, 1201116, 1196727, 1195771, 1200892,\n", - " 1203239, 1198428, 1200018, 1198811, 1201528, 1201547, 1200503, 1199445,\n", - " 1201156, 1201056, 1200913, 1194805, 1202640, 1199712, 1200352, 1200526,\n", - " 1199886, 1197050, 1200194, 1196779, 1201442, 1196256, 1201029, 1202239,\n", - " 1202338, 1202170, 1202175, 1201291, 1198478, 1199929, 1200245, 1200398,\n", - " 1196966, 1200793, 1195676, 1195664, 1200445, 1198929, 1195421, 1201789,\n", - " 1195386, 1197816, 1197822, 1196601, 1196547, 1203102, 1194730, 1199405,\n", - " 1198824, 1197735, 1200677, 1195070, 1201886, 1195306, 1201365, 1203162,\n", - " 1198741], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195710, 1199428, 1199439, 1198730, 1199282, 1199284, 1198449, 1198459,\n", - " 1202255, 1201577, 1201582, 1194626, 1203131, 1197351, 1197512, 1196685,\n", - " 1194743, 1194648, 1195263, 1196534, 1201992, 1195187, 1196031, 1198543,\n", - " 1195459, 1202902, 1199171, 1196334, 1196359, 1196977, 1196521, 1194759,\n", - " 1199371, 1196165, 1198039, 1198164, 1198161, 1195141, 1195221, 1197141,\n", - " 1196242, 1197265, 1196109, 1194859, 1195847, 1196312, 1199984, 1195351,\n", - " 1198273, 1199070, 1196851, 1194928, 1197583, 1197990, 1200866, 1200869,\n", - " 1200872, 1200874, 1200878, 1198404, 1199231, 1195017, 1198763, 1201511,\n", - " 1196496, 1199014, 1197977, 1197609, 1201116, 1196727, 1195771, 1200892,\n", - " 1203239, 1198428, 1200018, 1198811, 1201528, 1201547, 1200503, 1199445,\n", - " 1201156, 1201056, 1200913, 1194805, 1202640, 1199712, 1200352, 1200526,\n", - " 1199886, 1197050, 1200194, 1196779, 1201442, 1196256, 1201029, 1202239,\n", - " 1202338, 1202170, 1202175, 1201291, 1198478, 1199929, 1200245, 1200398,\n", - " 1196966, 1200793, 1195676, 1195664, 1200445, 1198929, 1195421, 1201789,\n", - " 1195386, 1197816, 1197822, 1196601, 1196547, 1203102, 1194730, 1199405,\n", - " 1198824, 1197735, 1200677, 1195070, 1201886, 1195306, 1201365, 1203162,\n", - " 1198741], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.2163e-01, 5.3435e-02, 6.1223e-01, ..., 1.4424e-01,\n", - " -1.3775e-03, -3.7783e-03],\n", - " [ 1.5289e-01, 3.3022e-02, 8.2321e-01, ..., 1.2083e-01,\n", - " -1.5056e-03, -5.4788e-03],\n", - " [ 2.5385e-01, -7.9654e-05, 1.0357e+00, ..., 1.2070e-01,\n", - " -1.9931e-03, -6.8963e-03],\n", - " ...,\n", - " [ 2.3004e-01, -2.2116e-04, 9.4880e-01, ..., 1.1974e-01,\n", - " -1.8205e-03, -6.1601e-03],\n", - " [ 2.4842e-01, -3.3096e-04, 1.0126e+00, ..., 1.1887e-01,\n", - " -1.8989e-03, -6.6186e-03],\n", - " [ 1.2139e-01, -1.1561e-05, 7.0034e-01, ..., 1.4744e-01,\n", - " -2.0239e-03, -4.3704e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 6.3389e-01, 4.2009e-01, 2.1255e+00, ..., -2.8526e-03,\n", - " -2.1797e-02, -2.6961e-03],\n", - " [ 9.6630e-02, 2.7755e-01, 3.2975e+00, ..., -8.6029e-03,\n", - " -2.7431e-02, -1.1940e-02],\n", - " [ 1.7517e-01, -8.5743e-03, 3.2414e+00, ..., -5.9369e-03,\n", - " -2.9397e-02, -8.3298e-03],\n", - " ...,\n", - " [ 9.9413e-03, -1.2529e-02, 3.7403e+00, ..., -7.4358e-03,\n", - " -3.2479e-02, -1.6189e-02],\n", - " [ 7.0108e-01, 2.3525e-02, 1.7657e+00, ..., -7.1107e-05,\n", - " -2.4733e-02, 2.9787e-01],\n", - " [ 2.0645e+00, 6.2006e-01, 3.3952e+00, ..., 2.0231e+00,\n", - " -5.4146e-02, 3.6642e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-1.2690e-03, 2.7179e-01, 2.0371e-01, ..., 1.7812e+00,\n", - " -4.0496e-05, 4.0502e-02],\n", - " [-1.5649e-03, 3.1231e-01, 2.2292e-01, ..., 1.6855e+00,\n", - " -8.3877e-04, 2.0014e-02],\n", - " [-6.6755e-04, 3.1032e-02, 1.3299e-01, ..., 1.6966e-01,\n", - " -1.4311e-04, -7.1015e-04],\n", - " ...,\n", - " [-1.0368e-03, 2.1684e-01, 3.7271e-01, ..., 1.8221e+00,\n", - " 1.6174e-02, -1.3230e-03],\n", - " [-1.8253e-03, 3.1547e-01, 2.4912e-01, ..., 1.6859e+00,\n", - " 1.0932e-02, 2.5573e-02],\n", - " [-1.2823e-03, 2.7159e-01, 1.9792e-01, ..., 1.7375e+00,\n", - " -1.1329e-04, 7.4401e-02]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[ 1.4935e-01, 7.1175e-01, 3.6846e-01, ..., -5.1303e-03,\n", - " 3.4234e-01, -1.6028e-04],\n", - " [ 1.2357e-01, 8.9588e-01, 5.4986e-01, ..., -1.0667e-02,\n", - " 3.9886e-01, 4.4455e-01],\n", - " [ 8.3066e-02, 9.5762e-01, 5.2089e-01, ..., -1.0343e-02,\n", - " 4.5474e-01, 4.6604e-01],\n", - " ...,\n", - " [ 1.0409e-01, 7.3511e-01, 5.1090e-01, ..., -7.1713e-03,\n", - " 1.4275e-01, 3.2288e-01],\n", - " [ 8.1208e-02, 6.4201e-01, 4.1398e-01, ..., -8.3211e-03,\n", - " 2.6070e-01, 3.0932e-01],\n", - " [ 2.2899e-01, 9.6919e-01, 5.1691e-01, ..., -1.1644e-02,\n", - " 5.7256e-01, 1.0452e-01]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 106, 58, 183, 36, 1057, 315, 534, 509, 509, 468, 468, 328,\n", - " 291, 832, 610, 625, 690, 756, 816, 816, 719, 719, 719, 537,\n", - " 537, 644, 1220, 1111, 817, 1151, 1043, 1151, 1068, 1068, 1308, 1298,\n", - " 1176, 1438, 1440, 1102, 1102, 1268, 1580, 1323, 1457, 1423, 1781, 1637,\n", - " 1637, 1579, 1579, 1625, 1625, 1624, 1624, 1624, 1762, 1762, 1762, 1762,\n", - " 1889, 1889, 1889, 1717, 1825, 1904, 1848, 1985, 2104, 2026, 2377, 2308,\n", - " 2162, 2209, 2206, 2221, 2221, 2221, 2221, 2478, 2420, 2594, 2666, 2665,\n", - " 2682, 2745, 2745, 2646, 2485, 2485, 2612, 2808, 2745, 2980, 2957, 2811,\n", - " 3068, 3241, 3213, 3345, 3419, 3493, 3493, 3839, 3831, 3593, 3803, 3803,\n", - " 3932, 4190, 4225, 4296, 4313, 4313, 4434, 4437, 4507, 4436, 4822, 4822,\n", - " 4822, 4839, 5140, 4816, 5009, 5166, 5200, 5108, 5350, 5254, 5245, 5245,\n", - " 5367, 5367, 5367, 5355, 5479, 6209, 5742, 5848, 5904, 6044, 5794, 5794,\n", - " 5871, 5934, 5891, 5838, 5838, 6004, 6004, 6028, 6028, 6028, 6028, 6214,\n", - " 6195, 6195, 5884, 6085, 6313, 6628, 6154, 6154, 5982, 5982, 6385, 6272,\n", - " 6393, 6393, 6393, 6591, 6506, 6506],\n", - " [ 33, 0, 92, 67, 53, 23, 81, 101, 20, 59, 39, 3,\n", - " 127, 41, 67, 22, 21, 36, 33, 45, 86, 44, 4, 108,\n", - " 66, 42, 88, 104, 105, 8, 4, 69, 12, 97, 107, 124,\n", - " 27, 128, 124, 13, 7, 67, 56, 24, 111, 102, 4, 26,\n", - " 58, 78, 6, 11, 85, 5, 46, 109, 30, 96, 64, 4,\n", - " 35, 111, 84, 89, 82, 113, 49, 89, 124, 69, 65, 18,\n", - " 18, 60, 75, 38, 52, 14, 104, 20, 94, 55, 81, 103,\n", - " 12, 117, 17, 95, 119, 125, 37, 25, 41, 15, 32, 69,\n", - " 125, 18, 29, 83, 47, 99, 98, 9, 94, 19, 61, 93,\n", - " 69, 122, 16, 19, 69, 90, 62, 63, 106, 110, 72, 48,\n", - " 115, 25, 74, 54, 50, 69, 99, 78, 89, 107, 76, 4,\n", - " 43, 69, 91, 34, 79, 40, 100, 1, 51, 31, 80, 126,\n", - " 121, 79, 10, 69, 71, 75, 123, 69, 78, 120, 2, 10,\n", - " 57, 116, 84, 114, 77, 87, 69, 118, 73, 112, 28, 69,\n", - " 33, 69, 70, 20, 69, 68]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1641, 1346, 3580, ..., 6195, 3471, 1568],\n", - " [ 256, 74, 209, ..., 7277, 7095, 7183]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 44, 37, 66, ..., 4, 4, 70],\n", - " [ 187, 16, 9, ..., 6538, 6399, 6584]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 29, 43, 43, ..., 7206, 7206, 7228],\n", - " [ 422, 78, 378, ..., 600, 152, 246]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 422, 514, 286, ..., 251, 378, 388],\n", - " [ 29, 85, 266, ..., 7238, 7253, 7077]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5426, 4509, 7213, ..., 6801, 2830, 3354],\n", - " [ 20, 142, 71, ..., 6559, 6547, 6582]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 267, 324, 324, ..., 7262, 7262, 7228],\n", - " [1513, 4588, 693, ..., 3141, 3132, 3365]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 183, 183, 183, ..., 6576, 6576, 6576],\n", - " [1192, 1677, 2705, ..., 361, 30, 152]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.003622\n", - "sampling 0.003535\n", - "noi time: 0.000705\n", - "get_vertex_data call: 0.013837\n", - "noi group time: 0.00185\n", - "eoi_group_time: 0.010957\n", - "second half: 0.11428\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31145, 24187, 17409, ..., 1103849, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31145, 24187, 17409, ..., 1103849, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1211567, 1203800, 1232112, ..., 1937149, 1936995, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1211567, 1203800, 1232112, ..., 1937149, 1936995, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1140282, 1140285, 1138549, 1140785, 1140793, 1141756, 1141758,\n", - " 1138335, 1139462, 1136969, 1143600, 1139820, 1145373, 1146983, 1137937,\n", - " 1137947, 1138930, 1139145, 1143372, 1139241, 1139615, 1140783, 1150502,\n", - " 1149216, 1147473, 1147477, 1147482, 1141877, 1142881, 1144636, 1144625,\n", - " 1144632, 1146995, 1134697, 1135947, 1135950, 1148350, 1146472, 1138350,\n", - " 1147089, 1137220, 1150555, 1147203, 1147211, 1136676, 1150329, 1152427,\n", - " 1146375, 1140313, 1140537, 1138112, 1137254, 1137181, 1138356, 1138360,\n", - " 1138366, 1151520, 1135909, 1140020, 1140953, 1135367, 1135202, 1135903,\n", - " 1134969, 1141036, 1134794, 1138504, 1138508, 1137331, 1143069, 1137693,\n", - " 1136618, 1144395, 1137521, 1137534, 1157397, 1137441, 1136206, 1156149,\n", - " 1156159, 1148484, 1139152, 1139161, 1135583, 1138514, 1153094, 1137957,\n", - " 1138590, 1158136, 1135499, 1154132, 1156899, 1135522, 1138305, 1137287,\n", - " 1157703, 1157702, 1138434, 1138436, 1138440, 1138445, 1138447, 1140079,\n", - " 1138451, 1138461, 1137920, 1136598, 1158387, 1149328, 1135088, 1156605,\n", - " 1156606, 1147111, 1147112, 1142611, 1135618, 1138177, 1145843, 1148531,\n", - " 1136453, 1139667, 1139673, 1136094, 1134992, 1136551, 1139755, 1136734,\n", - " 1140197, 1158961, 1142911, 1141070, 1144410, 1153543, 1143621, 1140034,\n", - " 1139929, 1138648, 1138148, 1141963, 1140548, 1152044, 1139070, 1136059,\n", - " 1137728, 1147317, 1146208, 1134738, 1134750, 1141088, 1141095, 1141098,\n", - " 1144138, 1139889, 1145346, 1135290, 1135291, 1143711, 1139025, 1149979,\n", - " 1141695, 1135860, 1154472, 1136625, 1161173, 1142929, 1141224, 1139386,\n", - " 1136917, 1141785, 1139495, 1144650, 1134979, 1147850, 1149434, 1142049,\n", - " 1142050, 1141810, 1141820, 1141821, 1143153, 1140175, 1158749, 1138472,\n", - " 1137762, 1143574, 1148442, 1144596, 1148263, 1136864, 1145298, 1144041,\n", - " 1141397, 1144182, 1144184, 1137614, 1166711, 1144865, 1146194, 1146201,\n", - " 1137854, 1147153, 1136378, 1141365, 1141367, 1153068, 1141678, 1149090,\n", - " 1149093, 1149101, 1138292, 1165340, 1144284, 1144279, 1139510, 1139654,\n", - " 1143789, 1143779, 1147896, 1147901, 1140990, 1135047, 1141560, 1143690,\n", - " 1147050, 1147047, 1145873, 1155829, 1143543, 1152976, 1152988, 1135457,\n", - " 1139446, 1141925, 1146909, 1144242, 1140580, 1137149, 1150701, 1140690,\n", - " 1140697, 1140702, 1143637, 1134861, 1134849, 1143851, 1146024, 1154328,\n", - " 1142533, 1139990, 1151124, 1151133, 1143876, 1147543, 1147545, 1147540,\n", - " 1147150, 1147282, 1147290, 1142817, 1142816, 1142637, 1149608, 1143051,\n", - " 1136836, 1144957, 1142123, 1143345, 1144766, 1144753, 1144619, 1144080,\n", - " 1150294, 1150919, 1146523, 1143961, 1138027, 1143456, 1144291, 1146590,\n", - " 1155700, 1140364, 1137998, 1137994, 1143080, 1166410, 1144219, 1144222,\n", - " 1147999, 1144013, 1139252, 1139249, 1147120, 1147244, 1148704, 1150996,\n", - " 1142700, 1141836, 1152327, 1152328, 1147070, 1149722, 1145707, 1145009,\n", - " 1158226, 1148364, 1145751, 1146159, 1146178, 1151239, 1152530, 1150280,\n", - " 1150445, 1149791, 1144514, 1138044, 1145833, 1146887, 1152013, 1147794,\n", - " 1147796, 1152023, 1151041, 1145256, 1135512, 1148698, 1150127, 1147021,\n", - " 1147023, 1153956, 1141949, 1150736, 1137647, 1153574, 1147653, 1143560,\n", - " 1143567, 1148288, 1139096, 1139097, 1154420, 1158786, 1148180, 1151366,\n", - " 1152563, 1136247, 1139718, 1146676, 1152436, 1157968, 1157983, 1148720,\n", - " 1148726, 1148729, 1171341, 1146559, 1143893, 1143895, 1148204, 1171943,\n", - " 1154203, 1154206, 1154196, 1153124, 1153199, 1167960, 1155547, 1150932,\n", - " 1150356, 1148084, 1141017, 1147442, 1152581, 1151913, 1151907, 1154183,\n", - " 1148498, 1148505, 1146565, 1174860, 1155152, 1153447, 1150890, 1146265,\n", - " 1146969, 1153251, 1150219, 1146623, 1151691, 1152407, 1152100, 1151729,\n", - " 1156334, 1153030, 1137746, 1137756, 1146304, 1155146, 1149205, 1152826,\n", - " 1155337, 1154119, 1154123, 1152673, 1151617, 1145278, 1151441, 1136798,\n", - " 1144528, 1138989, 1138991, 1151311, 1152342, 1138281, 1136028, 1136031,\n", - " 1158704, 1158713, 1151187, 1140674, 1152928, 1156387, 1156399, 1150164,\n", - " 1149273, 1148033, 1148040, 1148042, 1152601, 1145656, 1149794, 1137048,\n", - " 1148628, 1148637, 1158530, 1158540, 1148369, 1137458, 1149947, 1135707,\n", - " 1135708, 1155376, 1142047, 1166145, 1154368, 1157229, 1158862, 1158857,\n", - " 1156505, 1152392, 1157064, 1157071, 1155422, 1145191, 1145187, 1151257,\n", - " 1157559, 1150465, 1150475, 1146862, 1135730, 1152183, 1156638, 1156631,\n", - " 1150824, 1156940, 1153410, 1147810, 1157790, 1139529, 1158311, 1155441,\n", - " 1144361, 1138567, 1154530, 1154528, 1156913, 1156919, 1150488, 1142755,\n", - " 1156207, 1138775, 1151379, 1155372, 1140186, 1155122, 1152527, 1157183,\n", - " 1135394, 1135399, 1156463, 1168230, 1154763, 1157898, 1157894, 1155675,\n", - " 1155628, 1155631, 1154555, 1158824, 1153713, 1148650, 1155646, 1153368,\n", - " 1153366, 1143263, 1146937, 1160221, 1154240, 1160106, 1154909, 1163130,\n", - " 1143189, 1150371, 1157439, 1157430, 1157426, 1144714, 1150984, 1150987,\n", - " 1159627, 1151031, 1156761, 1153776, 1153786, 1155026, 1137381, 1159116,\n", - " 1138258, 1145681, 1135601, 1145514, 1148149, 1150671, 1158665, 1158656,\n", - " 1157684, 1159258, 1140633, 1152209, 1167308, 1152496, 1155971, 1155975,\n", - " 1155983, 1154683, 1154592, 1154600, 1160164, 1153503, 1136896, 1185567,\n", - " 1158882, 1158886, 1140213, 1159164, 1151615, 1136480, 1136494, 1136491,\n", - " 1156665, 1153112, 1156495, 1156490, 1153808, 1153811, 1136640, 1163116,\n", - " 1134757, 1151145, 1146123, 1146126, 1165778, 1155871, 1158006, 1155528,\n", - " 1171195, 1157747, 1157751, 1161643, 1159052, 1151824, 1159146, 1158295,\n", - " 1153052, 1153045, 1167172, 1159731, 1155769, 1155770, 1178588, 1153842,\n", - " 1161313, 1156101, 1156107, 1138393, 1150046, 1150041, 1145948, 1153514,\n", - " 1158680, 1146870, 1138161, 1161774, 1184337, 1154590, 1166073, 1148783,\n", - " 1171518, 1169315, 1159556, 1158452, 1170415, 1140650, 1140643, 1141863,\n", - " 1148603, 1168163, 1155816, 1155821, 1141803, 1156184, 1168043, 1163742,\n", - " 1165887, 1152247, 1143735, 1155588, 1144320, 1138674, 1162011, 1144977,\n", - " 1144989, 1169257, 1161235, 1161240, 1144739, 1162580, 1145137, 1141471,\n", - " 1151650, 1147426, 1156739, 1166584, 1171040, 1144812, 1135567, 1142722,\n", - " 1156303, 1145738, 1148683, 1145228, 1160232, 1146040, 1166462, 1143037,\n", - " 1145447, 1165746, 1152626, 1152203, 1181049, 1143395, 1158722, 1167503,\n", - " 1167501, 1170738, 1147338, 1144690, 1145502, 1162893, 1149130, 1167817,\n", - " 1166653, 1169216, 1145326, 1155172, 1154213, 1150526, 1156119, 1144346,\n", - " 1144336, 1157534, 1138380, 1138375, 1154670, 1168437, 1135853, 1154893,\n", - " 1169165, 1169162, 1157331, 1141045, 1141043, 1180434, 1169359, 1149452,\n", - " 1138609, 1149688, 1158623, 1149847, 1172076, 1178729, 1147416, 1155502,\n", - " 1160540, 1152353, 1149402, 1148667, 1172139, 1148324, 1173307, 1154027,\n", - " 1153754, 1164968, 1159658, 1151211, 1151210, 1162627, 1157153, 1157373,\n", - " 1147711, 1151850, 1148131, 1157585, 1157593, 1169683, 1170483, 1163770,\n", - " 1162859, 1155739, 1168398, 1165132, 1173727, 1146755, 1144550, 1166682,\n", - " 1171823, 1174229, 1154157, 1154148, 1158187, 1149183, 1183495, 1186117,\n", - " 1175603, 1171297, 1159404, 1153803, 1153796, 1179918, 1170520, 1153141,\n", - " 1189174, 1169387, 1171407, 1184709, 1166554, 1161255, 1155250, 1155256,\n", - " 1155262, 1154718, 1157792, 1171623, 1157134, 1172148, 1187532, 1181922,\n", - " 1178945, 1158249, 1153898, 1153902, 1164563, 1178214, 1145626, 1172022,\n", - " 1178757, 1161068, 1149755, 1146252, 1165219, 1157761, 1161341, 1158513,\n", - " 1165066, 1165067, 1177089, 1177090, 1168273, 1167762, 1162441, 1169062,\n", - " 1168886, 1180480, 1162253, 1185422, 1188271, 1188637, 1165448, 1161819,\n", - " 1170348, 1147182, 1141507, 1189056, 1183008, 1168943, 1170417, 1156539,\n", - " 1139828, 1139831, 1170437, 1167135, 1154812, 1192076, 1182067, 1187314,\n", - " 1190585, 1194356, 1185616, 1156055, 1191482, 1169662, 1189270, 1191726,\n", - " 1173058, 1189630, 1188371, 1182955, 1173486, 1185976, 1168683, 1192884,\n", - " 1140993, 1140996, 1193155, 1193614, 1170881, 1192326, 1189970, 1153733,\n", - " 1189557, 1193774, 1186343, 1152113, 1191806, 1177196, 1153592, 1189019,\n", - " 1171201, 1163146, 1150406, 1150400, 1190685, 1156681, 1172423, 1178042,\n", - " 1166789, 1182564, 1185467, 1176824, 1155962, 1187517, 1174034, 1179769,\n", - " 1192231, 1189673, 1181710, 1157017, 1161940], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1140282, 1140285, 1138549, 1140785, 1140793, 1141756, 1141758,\n", - " 1138335, 1139462, 1136969, 1143600, 1139820, 1145373, 1146983, 1137937,\n", - " 1137947, 1138930, 1139145, 1143372, 1139241, 1139615, 1140783, 1150502,\n", - " 1149216, 1147473, 1147477, 1147482, 1141877, 1142881, 1144636, 1144625,\n", - " 1144632, 1146995, 1134697, 1135947, 1135950, 1148350, 1146472, 1138350,\n", - " 1147089, 1137220, 1150555, 1147203, 1147211, 1136676, 1150329, 1152427,\n", - " 1146375, 1140313, 1140537, 1138112, 1137254, 1137181, 1138356, 1138360,\n", - " 1138366, 1151520, 1135909, 1140020, 1140953, 1135367, 1135202, 1135903,\n", - " 1134969, 1141036, 1134794, 1138504, 1138508, 1137331, 1143069, 1137693,\n", - " 1136618, 1144395, 1137521, 1137534, 1157397, 1137441, 1136206, 1156149,\n", - " 1156159, 1148484, 1139152, 1139161, 1135583, 1138514, 1153094, 1137957,\n", - " 1138590, 1158136, 1135499, 1154132, 1156899, 1135522, 1138305, 1137287,\n", - " 1157703, 1157702, 1138434, 1138436, 1138440, 1138445, 1138447, 1140079,\n", - " 1138451, 1138461, 1137920, 1136598, 1158387, 1149328, 1135088, 1156605,\n", - " 1156606, 1147111, 1147112, 1142611, 1135618, 1138177, 1145843, 1148531,\n", - " 1136453, 1139667, 1139673, 1136094, 1134992, 1136551, 1139755, 1136734,\n", - " 1140197, 1158961, 1142911, 1141070, 1144410, 1153543, 1143621, 1140034,\n", - " 1139929, 1138648, 1138148, 1141963, 1140548, 1152044, 1139070, 1136059,\n", - " 1137728, 1147317, 1146208, 1134738, 1134750, 1141088, 1141095, 1141098,\n", - " 1144138, 1139889, 1145346, 1135290, 1135291, 1143711, 1139025, 1149979,\n", - " 1141695, 1135860, 1154472, 1136625, 1161173, 1142929, 1141224, 1139386,\n", - " 1136917, 1141785, 1139495, 1144650, 1134979, 1147850, 1149434, 1142049,\n", - " 1142050, 1141810, 1141820, 1141821, 1143153, 1140175, 1158749, 1138472,\n", - " 1137762, 1143574, 1148442, 1144596, 1148263, 1136864, 1145298, 1144041,\n", - " 1141397, 1144182, 1144184, 1137614, 1166711, 1144865, 1146194, 1146201,\n", - " 1137854, 1147153, 1136378, 1141365, 1141367, 1153068, 1141678, 1149090,\n", - " 1149093, 1149101, 1138292, 1165340, 1144284, 1144279, 1139510, 1139654,\n", - " 1143789, 1143779, 1147896, 1147901, 1140990, 1135047, 1141560, 1143690,\n", - " 1147050, 1147047, 1145873, 1155829, 1143543, 1152976, 1152988, 1135457,\n", - " 1139446, 1141925, 1146909, 1144242, 1140580, 1137149, 1150701, 1140690,\n", - " 1140697, 1140702, 1143637, 1134861, 1134849, 1143851, 1146024, 1154328,\n", - " 1142533, 1139990, 1151124, 1151133, 1143876, 1147543, 1147545, 1147540,\n", - " 1147150, 1147282, 1147290, 1142817, 1142816, 1142637, 1149608, 1143051,\n", - " 1136836, 1144957, 1142123, 1143345, 1144766, 1144753, 1144619, 1144080,\n", - " 1150294, 1150919, 1146523, 1143961, 1138027, 1143456, 1144291, 1146590,\n", - " 1155700, 1140364, 1137998, 1137994, 1143080, 1166410, 1144219, 1144222,\n", - " 1147999, 1144013, 1139252, 1139249, 1147120, 1147244, 1148704, 1150996,\n", - " 1142700, 1141836, 1152327, 1152328, 1147070, 1149722, 1145707, 1145009,\n", - " 1158226, 1148364, 1145751, 1146159, 1146178, 1151239, 1152530, 1150280,\n", - " 1150445, 1149791, 1144514, 1138044, 1145833, 1146887, 1152013, 1147794,\n", - " 1147796, 1152023, 1151041, 1145256, 1135512, 1148698, 1150127, 1147021,\n", - " 1147023, 1153956, 1141949, 1150736, 1137647, 1153574, 1147653, 1143560,\n", - " 1143567, 1148288, 1139096, 1139097, 1154420, 1158786, 1148180, 1151366,\n", - " 1152563, 1136247, 1139718, 1146676, 1152436, 1157968, 1157983, 1148720,\n", - " 1148726, 1148729, 1171341, 1146559, 1143893, 1143895, 1148204, 1171943,\n", - " 1154203, 1154206, 1154196, 1153124, 1153199, 1167960, 1155547, 1150932,\n", - " 1150356, 1148084, 1141017, 1147442, 1152581, 1151913, 1151907, 1154183,\n", - " 1148498, 1148505, 1146565, 1174860, 1155152, 1153447, 1150890, 1146265,\n", - " 1146969, 1153251, 1150219, 1146623, 1151691, 1152407, 1152100, 1151729,\n", - " 1156334, 1153030, 1137746, 1137756, 1146304, 1155146, 1149205, 1152826,\n", - " 1155337, 1154119, 1154123, 1152673, 1151617, 1145278, 1151441, 1136798,\n", - " 1144528, 1138989, 1138991, 1151311, 1152342, 1138281, 1136028, 1136031,\n", - " 1158704, 1158713, 1151187, 1140674, 1152928, 1156387, 1156399, 1150164,\n", - " 1149273, 1148033, 1148040, 1148042, 1152601, 1145656, 1149794, 1137048,\n", - " 1148628, 1148637, 1158530, 1158540, 1148369, 1137458, 1149947, 1135707,\n", - " 1135708, 1155376, 1142047, 1166145, 1154368, 1157229, 1158862, 1158857,\n", - " 1156505, 1152392, 1157064, 1157071, 1155422, 1145191, 1145187, 1151257,\n", - " 1157559, 1150465, 1150475, 1146862, 1135730, 1152183, 1156638, 1156631,\n", - " 1150824, 1156940, 1153410, 1147810, 1157790, 1139529, 1158311, 1155441,\n", - " 1144361, 1138567, 1154530, 1154528, 1156913, 1156919, 1150488, 1142755,\n", - " 1156207, 1138775, 1151379, 1155372, 1140186, 1155122, 1152527, 1157183,\n", - " 1135394, 1135399, 1156463, 1168230, 1154763, 1157898, 1157894, 1155675,\n", - " 1155628, 1155631, 1154555, 1158824, 1153713, 1148650, 1155646, 1153368,\n", - " 1153366, 1143263, 1146937, 1160221, 1154240, 1160106, 1154909, 1163130,\n", - " 1143189, 1150371, 1157439, 1157430, 1157426, 1144714, 1150984, 1150987,\n", - " 1159627, 1151031, 1156761, 1153776, 1153786, 1155026, 1137381, 1159116,\n", - " 1138258, 1145681, 1135601, 1145514, 1148149, 1150671, 1158665, 1158656,\n", - " 1157684, 1159258, 1140633, 1152209, 1167308, 1152496, 1155971, 1155975,\n", - " 1155983, 1154683, 1154592, 1154600, 1160164, 1153503, 1136896, 1185567,\n", - " 1158882, 1158886, 1140213, 1159164, 1151615, 1136480, 1136494, 1136491,\n", - " 1156665, 1153112, 1156495, 1156490, 1153808, 1153811, 1136640, 1163116,\n", - " 1134757, 1151145, 1146123, 1146126, 1165778, 1155871, 1158006, 1155528,\n", - " 1171195, 1157747, 1157751, 1161643, 1159052, 1151824, 1159146, 1158295,\n", - " 1153052, 1153045, 1167172, 1159731, 1155769, 1155770, 1178588, 1153842,\n", - " 1161313, 1156101, 1156107, 1138393, 1150046, 1150041, 1145948, 1153514,\n", - " 1158680, 1146870, 1138161, 1161774, 1184337, 1154590, 1166073, 1148783,\n", - " 1171518, 1169315, 1159556, 1158452, 1170415, 1140650, 1140643, 1141863,\n", - " 1148603, 1168163, 1155816, 1155821, 1141803, 1156184, 1168043, 1163742,\n", - " 1165887, 1152247, 1143735, 1155588, 1144320, 1138674, 1162011, 1144977,\n", - " 1144989, 1169257, 1161235, 1161240, 1144739, 1162580, 1145137, 1141471,\n", - " 1151650, 1147426, 1156739, 1166584, 1171040, 1144812, 1135567, 1142722,\n", - " 1156303, 1145738, 1148683, 1145228, 1160232, 1146040, 1166462, 1143037,\n", - " 1145447, 1165746, 1152626, 1152203, 1181049, 1143395, 1158722, 1167503,\n", - " 1167501, 1170738, 1147338, 1144690, 1145502, 1162893, 1149130, 1167817,\n", - " 1166653, 1169216, 1145326, 1155172, 1154213, 1150526, 1156119, 1144346,\n", - " 1144336, 1157534, 1138380, 1138375, 1154670, 1168437, 1135853, 1154893,\n", - " 1169165, 1169162, 1157331, 1141045, 1141043, 1180434, 1169359, 1149452,\n", - " 1138609, 1149688, 1158623, 1149847, 1172076, 1178729, 1147416, 1155502,\n", - " 1160540, 1152353, 1149402, 1148667, 1172139, 1148324, 1173307, 1154027,\n", - " 1153754, 1164968, 1159658, 1151211, 1151210, 1162627, 1157153, 1157373,\n", - " 1147711, 1151850, 1148131, 1157585, 1157593, 1169683, 1170483, 1163770,\n", - " 1162859, 1155739, 1168398, 1165132, 1173727, 1146755, 1144550, 1166682,\n", - " 1171823, 1174229, 1154157, 1154148, 1158187, 1149183, 1183495, 1186117,\n", - " 1175603, 1171297, 1159404, 1153803, 1153796, 1179918, 1170520, 1153141,\n", - " 1189174, 1169387, 1171407, 1184709, 1166554, 1161255, 1155250, 1155256,\n", - " 1155262, 1154718, 1157792, 1171623, 1157134, 1172148, 1187532, 1181922,\n", - " 1178945, 1158249, 1153898, 1153902, 1164563, 1178214, 1145626, 1172022,\n", - " 1178757, 1161068, 1149755, 1146252, 1165219, 1157761, 1161341, 1158513,\n", - " 1165066, 1165067, 1177089, 1177090, 1168273, 1167762, 1162441, 1169062,\n", - " 1168886, 1180480, 1162253, 1185422, 1188271, 1188637, 1165448, 1161819,\n", - " 1170348, 1147182, 1141507, 1189056, 1183008, 1168943, 1170417, 1156539,\n", - " 1139828, 1139831, 1170437, 1167135, 1154812, 1192076, 1182067, 1187314,\n", - " 1190585, 1194356, 1185616, 1156055, 1191482, 1169662, 1189270, 1191726,\n", - " 1173058, 1189630, 1188371, 1182955, 1173486, 1185976, 1168683, 1192884,\n", - " 1140993, 1140996, 1193155, 1193614, 1170881, 1192326, 1189970, 1153733,\n", - " 1189557, 1193774, 1186343, 1152113, 1191806, 1177196, 1153592, 1189019,\n", - " 1171201, 1163146, 1150406, 1150400, 1190685, 1156681, 1172423, 1178042,\n", - " 1166789, 1182564, 1185467, 1176824, 1155962, 1187517, 1174034, 1179769,\n", - " 1192231, 1189673, 1181710, 1157017, 1161940], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197841, 1199424, 1199436, 1197719, 1199282, 1199283, 1202255, 1201577,\n", - " 1201582, 1199141, 1201462, 1200644, 1197777, 1201016, 1201660, 1198694,\n", - " 1202804, 1194780, 1195496, 1195514, 1195263, 1201992, 1196031, 1198543,\n", - " 1201427, 1195888, 1195892, 1194759, 1196835, 1197793, 1198036, 1198039,\n", - " 1195982, 1198958, 1198163, 1198167, 1198161, 1195145, 1195148, 1195223,\n", - " 1195267, 1195270, 1197141, 1197140, 1196242, 1197367, 1197273, 1196109,\n", - " 1195850, 1195039, 1195541, 1197474, 1195918, 1196283, 1195353, 1198279,\n", - " 1200959, 1197285, 1194928, 1197583, 1199685, 1197676, 1197990, 1197994,\n", - " 1200866, 1198413, 1200748, 1199231, 1199676, 1194795, 1199842, 1200491,\n", - " 1197609, 1196727, 1195773, 1202618, 1200887, 1198428, 1198811, 1200450,\n", - " 1200503, 1198593, 1201079, 1201156, 1200991, 1201043, 1201358, 1200553,\n", - " 1200557, 1203071, 1199879, 1197040, 1196883, 1196779, 1202239, 1200899,\n", - " 1195876, 1201291, 1196761, 1202209, 1199929, 1198565, 1196963, 1196966,\n", - " 1202876, 1200784, 1196071, 1199606, 1195048, 1194698, 1195676, 1195664,\n", - " 1200439, 1195181, 1197060, 1197059, 1197816, 1197822, 1200285, 1202269,\n", - " 1195294, 1200585, 1203102, 1194730, 1199396, 1198147, 1198824, 1197735,\n", - " 1200014, 1200437, 1198819, 1199234, 1201001, 1200468, 1200974, 1200301,\n", - " 1197652, 1197335], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197841, 1199424, 1199436, 1197719, 1199282, 1199283, 1202255, 1201577,\n", - " 1201582, 1199141, 1201462, 1200644, 1197777, 1201016, 1201660, 1198694,\n", - " 1202804, 1194780, 1195496, 1195514, 1195263, 1201992, 1196031, 1198543,\n", - " 1201427, 1195888, 1195892, 1194759, 1196835, 1197793, 1198036, 1198039,\n", - " 1195982, 1198958, 1198163, 1198167, 1198161, 1195145, 1195148, 1195223,\n", - " 1195267, 1195270, 1197141, 1197140, 1196242, 1197367, 1197273, 1196109,\n", - " 1195850, 1195039, 1195541, 1197474, 1195918, 1196283, 1195353, 1198279,\n", - " 1200959, 1197285, 1194928, 1197583, 1199685, 1197676, 1197990, 1197994,\n", - " 1200866, 1198413, 1200748, 1199231, 1199676, 1194795, 1199842, 1200491,\n", - " 1197609, 1196727, 1195773, 1202618, 1200887, 1198428, 1198811, 1200450,\n", - " 1200503, 1198593, 1201079, 1201156, 1200991, 1201043, 1201358, 1200553,\n", - " 1200557, 1203071, 1199879, 1197040, 1196883, 1196779, 1202239, 1200899,\n", - " 1195876, 1201291, 1196761, 1202209, 1199929, 1198565, 1196963, 1196966,\n", - " 1202876, 1200784, 1196071, 1199606, 1195048, 1194698, 1195676, 1195664,\n", - " 1200439, 1195181, 1197060, 1197059, 1197816, 1197822, 1200285, 1202269,\n", - " 1195294, 1200585, 1203102, 1194730, 1199396, 1198147, 1198824, 1197735,\n", - " 1200014, 1200437, 1198819, 1199234, 1201001, 1200468, 1200974, 1200301,\n", - " 1197652, 1197335], device='cuda:0', dtype=torch.int32))\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.007913\n", - "sampling 0.007423\n", - "noi time: 0.002475\n", - "get_vertex_data call: 0.066711\n", - "noi group time: 0.003144\n", - "eoi_group_time: 0.013429\n", - "second half: 0.217729\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16823, 24187, 27122, ..., 1123985, 1103852, 1133333],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16823, 24187, 27122, ..., 1123985, 1103852, 1133333],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208553, 1215970, 1203800, ..., 1921018, 1931117, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208553, 1215970, 1203800, ..., 1921018, 1931117, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1141424, 1140282, 1140285, 1136337, 1135926, 1135933, 1135716,\n", - " 1135723, 1137791, 1140785, 1140799, 1141756, 1141758, 1136208, 1136223,\n", - " 1141251, 1136156, 1136969, 1136971, 1141443, 1146802, 1143600, 1143615,\n", - " 1149826, 1139811, 1146983, 1145992, 1137271, 1139143, 1143372, 1139241,\n", - " 1146647, 1139615, 1149216, 1142958, 1155686, 1143820, 1149646, 1147473,\n", - " 1147483, 1135992, 1149290, 1142881, 1144636, 1144632, 1146995, 1153012,\n", - " 1135950, 1148337, 1150193, 1136125, 1148546, 1153220, 1137220, 1135149,\n", - " 1150555, 1155019, 1147211, 1146371, 1134806, 1140304, 1140540, 1140542,\n", - " 1138112, 1153463, 1134735, 1140953, 1135360, 1135367, 1135371, 1135202,\n", - " 1137802, 1134969, 1141036, 1134791, 1134794, 1157450, 1138504, 1137329,\n", - " 1157103, 1137682, 1137693, 1136619, 1144395, 1137529, 1137534, 1135418,\n", - " 1157393, 1157397, 1137441, 1137025, 1135265, 1156149, 1139161, 1141705,\n", - " 1142593, 1142607, 1135246, 1148856, 1140970, 1156342, 1138514, 1137959,\n", - " 1138584, 1154132, 1139684, 1138436, 1138440, 1138445, 1138461, 1154790,\n", - " 1136594, 1149328, 1138846, 1138881, 1156603, 1147106, 1147112, 1147116,\n", - " 1147119, 1142611, 1160822, 1135359, 1138177, 1145852, 1135760, 1136454,\n", - " 1139667, 1139673, 1140261, 1134992, 1142788, 1152654, 1136730, 1136734,\n", - " 1136723, 1142905, 1144406, 1153544, 1140034, 1152696, 1139086, 1136076,\n", - " 1139933, 1137595, 1138148, 1146071, 1152042, 1152044, 1137728, 1147322,\n", - " 1134750, 1136992, 1138246, 1135549, 1136691, 1136697, 1141088, 1141096,\n", - " 1141098, 1144138, 1139898, 1156875, 1139111, 1136385, 1143769, 1154857,\n", - " 1143711, 1139025, 1139033, 1152704, 1141685, 1141695, 1135860, 1135861,\n", - " 1136625, 1161173, 1140467, 1141226, 1139386, 1141648, 1136917, 1139730,\n", - " 1143677, 1144237, 1140598, 1141786, 1138785, 1139495, 1144650, 1134991,\n", - " 1136862, 1138482, 1138490, 1142050, 1142053, 1142093, 1142080, 1138469,\n", - " 1149111, 1148871, 1137243, 1140110, 1137661, 1138423, 1143111, 1143113,\n", - " 1144445, 1144596, 1142453, 1136864, 1145298, 1144041, 1144182, 1150906,\n", - " 1150910, 1138539, 1140501, 1137854, 1147153, 1136378, 1141365, 1141367,\n", - " 1141375, 1141664, 1149101, 1139022, 1144277, 1139510, 1140093, 1145001,\n", - " 1140616, 1140976, 1140990, 1140980, 1146693, 1141560, 1147050, 1147047,\n", - " 1145873, 1152976, 1135457, 1135459, 1141925, 1141933, 1146898, 1146901,\n", - " 1144242, 1141846, 1137149, 1150692, 1150698, 1140696, 1143633, 1137571,\n", - " 1137570, 1134861, 1145983, 1143851, 1136277, 1146024, 1146025, 1146141,\n", - " 1154328, 1142533, 1139990, 1143293, 1143283, 1151124, 1147543, 1147545,\n", - " 1147540, 1147150, 1148763, 1147282, 1142816, 1142820, 1149162, 1147461,\n", - " 1142637, 1149366, 1139408, 1136160, 1138923, 1157720, 1136836, 1136843,\n", - " 1139329, 1139328, 1144778, 1141490, 1142153, 1143345, 1144767, 1144753,\n", - " 1144611, 1144619, 1145810, 1144083, 1139979, 1135876, 1144319, 1135813,\n", - " 1144376, 1146514, 1146526, 1143460, 1143457, 1143007, 1142000, 1143937,\n", - " 1147574, 1155700, 1149075, 1143799, 1147523, 1140364, 1149575, 1137990,\n", - " 1137994, 1143085, 1143080, 1144219, 1147996, 1147999, 1146949, 1144003,\n", - " 1144013, 1139252, 1147244, 1148704, 1148715, 1142690, 1141319, 1141327,\n", - " 1141825, 1141836, 1146745, 1147056, 1147025, 1143824, 1142858, 1139549,\n", - " 1158226, 1158228, 1149871, 1145240, 1145750, 1145751, 1142370, 1146159,\n", - " 1138626, 1148395, 1146178, 1151242, 1150280, 1150445, 1154998, 1154443,\n", - " 1149791, 1144514, 1144526, 1141349, 1141358, 1138044, 1151994, 1147794,\n", - " 1147796, 1151487, 1151473, 1152026, 1154271, 1139919, 1142286, 1140566,\n", - " 1149530, 1147019, 1147021, 1158950, 1141949, 1148450, 1147653, 1143560,\n", - " 1149412, 1148300, 1152073, 1137724, 1148623, 1154420, 1154424, 1151363,\n", - " 1151361, 1152561, 1146678, 1146682, 1146686, 1141181, 1152441, 1148720,\n", - " 1148731, 1148729, 1148204, 1171943, 1153124, 1153125, 1153188, 1159828,\n", - " 1155545, 1150932, 1150935, 1152878, 1143091, 1144861, 1150352, 1150356,\n", - " 1155089, 1147442, 1151816, 1141420, 1136002, 1151352, 1155067, 1146962,\n", - " 1146975, 1156402, 1147390, 1146623, 1146493, 1144476, 1152409, 1168005,\n", - " 1152098, 1152109, 1153038, 1145540, 1137746, 1146307, 1152622, 1140521,\n", - " 1136401, 1149203, 1157107, 1155337, 1154120, 1154123, 1154124, 1152673,\n", - " 1139582, 1151627, 1151617, 1145269, 1136131, 1136134, 1136798, 1152944,\n", - " 1145952, 1152903, 1151311, 1152341, 1146816, 1156826, 1156816, 1153301,\n", - " 1153302, 1138272, 1138281, 1157139, 1157147, 1156001, 1156005, 1136028,\n", - " 1136031, 1158704, 1151188, 1151187, 1152928, 1151064, 1156422, 1137396,\n", - " 1148040, 1155202, 1152597, 1160866, 1137048, 1148626, 1148628, 1158530,\n", - " 1158540, 1137458, 1149940, 1149944, 1142041, 1154381, 1150960, 1157547,\n", - " 1158860, 1157064, 1157069, 1157067, 1155412, 1152838, 1152833, 1145191,\n", - " 1145187, 1137809, 1151260, 1150465, 1135222, 1135231, 1160262, 1142221,\n", - " 1135729, 1135730, 1152191, 1156633, 1151788, 1151777, 1157918, 1153415,\n", - " 1139525, 1158306, 1140421, 1155441, 1155452, 1161731, 1150130, 1150132,\n", - " 1154529, 1153994, 1145600, 1142755, 1156271, 1157637, 1151383, 1151379,\n", - " 1137910, 1158639, 1155374, 1156649, 1155122, 1152527, 1157172, 1149321,\n", - " 1149320, 1155746, 1151431, 1135396, 1135398, 1146920, 1156463, 1168230,\n", - " 1155667, 1155628, 1155630, 1156563, 1154547, 1154550, 1158824, 1158829,\n", - " 1158325, 1156993, 1156996, 1148836, 1148646, 1155646, 1153366, 1161231,\n", - " 1146943, 1146935, 1157492, 1154240, 1151327, 1143185, 1153325, 1155613,\n", - " 1150987, 1157934, 1140751, 1157283, 1137167, 1158126, 1153776, 1153786,\n", - " 1149907, 1137381, 1137387, 1159116, 1138269, 1140919, 1154001, 1134674,\n", - " 1135601, 1145507, 1148147, 1150671, 1159585, 1155853, 1155848, 1158665,\n", - " 1138215, 1157684, 1149145, 1149151, 1155717, 1152509, 1140380, 1140381,\n", - " 1155872, 1157735, 1159132, 1159124, 1157028, 1144843, 1155975, 1142073,\n", - " 1183177, 1156812, 1155950, 1160163, 1136896, 1158753, 1158764, 1159156,\n", - " 1158815, 1158447, 1151615, 1136480, 1136494, 1156665, 1147585, 1152136,\n", - " 1153820, 1134757, 1180561, 1161161, 1146126, 1165786, 1188205, 1138099,\n", - " 1138101, 1138108, 1155871, 1144582, 1158260, 1150011, 1155521, 1155535,\n", - " 1142487, 1164276, 1142666, 1162417, 1157758, 1159042, 1165825, 1158295,\n", - " 1158300, 1157946, 1153052, 1155769, 1161930, 1161935, 1156107, 1156109,\n", - " 1138393, 1165244, 1150046, 1159475, 1149063, 1145948, 1153519, 1161652,\n", - " 1157600, 1138161, 1164006, 1165663, 1139286, 1157236, 1157351, 1146063,\n", - " 1171249, 1148600, 1148603, 1148607, 1172725, 1143139, 1155816, 1164505,\n", - " 1158653, 1156184, 1159025, 1159029, 1159032, 1159038, 1165877, 1165585,\n", - " 1158905, 1155588, 1164623, 1162550, 1162552, 1156589, 1151227, 1168426,\n", - " 1147830, 1147835, 1146500, 1146509, 1164580, 1169257, 1144737, 1141471,\n", - " 1161562, 1147427, 1156737, 1156739, 1163260, 1168748, 1135567, 1165718,\n", - " 1142722, 1156293, 1156300, 1156303, 1148683, 1144973, 1146446, 1191923,\n", - " 1169233, 1147693, 1165746, 1147355, 1152624, 1148124, 1139359, 1139345,\n", - " 1145900, 1152200, 1181049, 1169741, 1167503, 1154076, 1162892, 1154919,\n", - " 1169602, 1167817, 1144681, 1169222, 1155172, 1154213, 1165011, 1150515,\n", - " 1156119, 1145529, 1144346, 1144336, 1157534, 1147746, 1154670, 1157331,\n", - " 1141045, 1141048, 1169359, 1149452, 1149446, 1147502, 1138609, 1158611,\n", - " 1158623, 1158063, 1158062, 1173047, 1174641, 1157379, 1159846, 1155494,\n", - " 1172488, 1170462, 1152353, 1152360, 1169186, 1143177, 1149402, 1149394,\n", - " 1172838, 1148324, 1175993, 1173307, 1161143, 1169144, 1169149, 1154026,\n", - " 1154027, 1154023, 1152150, 1172787, 1159655, 1167857, 1169583, 1178419,\n", - " 1157153, 1157373, 1147711, 1169687, 1179335, 1162106, 1181009, 1168822,\n", - " 1167902, 1143244, 1180475, 1172932, 1172939, 1172605, 1163984, 1153428,\n", - " 1169072, 1171823, 1160307, 1154148, 1149169, 1149173, 1180600, 1143278,\n", - " 1164956, 1168481, 1170569, 1178344, 1171297, 1174079, 1164826, 1189170,\n", - " 1180649, 1151519, 1182651, 1179807, 1158030, 1155262, 1172010, 1154707,\n", - " 1154718, 1174623, 1151488, 1171623, 1163568, 1171380, 1182011, 1158249,\n", - " 1158253, 1153898, 1153899, 1154497, 1134655, 1178910, 1145626, 1156443,\n", - " 1172024, 1157483, 1179442, 1161911, 1184997, 1149755, 1146243, 1166959,\n", - " 1174409, 1179783, 1145092, 1158524, 1164106, 1158940, 1163863, 1182434,\n", - " 1158370, 1158380, 1158379, 1155899, 1182786, 1168282, 1169064, 1160078,\n", - " 1164228, 1182337, 1166516, 1164264, 1154957, 1159410, 1147179, 1147182,\n", - " 1172609, 1156162, 1181300, 1184048, 1156528, 1156539, 1139831, 1139837,\n", - " 1150265, 1154812, 1149668, 1151284, 1163848, 1156055, 1173019, 1146392,\n", - " 1146394, 1146395, 1188984, 1149539, 1175656, 1172469, 1191962, 1148787,\n", - " 1148798, 1177473, 1169964, 1189546, 1166328, 1188781, 1182060, 1192458,\n", - " 1174007, 1178065, 1194172, 1193873, 1193774, 1152117, 1185901, 1169703,\n", - " 1169707, 1190741, 1166841, 1153595, 1186424, 1177365, 1150406, 1161863,\n", - " 1190686, 1180992, 1172423, 1158064, 1158070, 1180532, 1179750, 1155962,\n", - " 1191854, 1194244, 1191422, 1192792, 1182178, 1176975, 1190336, 1193307,\n", - " 1190992, 1184940, 1157017], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1141424, 1140282, 1140285, 1136337, 1135926, 1135933, 1135716,\n", - " 1135723, 1137791, 1140785, 1140799, 1141756, 1141758, 1136208, 1136223,\n", - " 1141251, 1136156, 1136969, 1136971, 1141443, 1146802, 1143600, 1143615,\n", - " 1149826, 1139811, 1146983, 1145992, 1137271, 1139143, 1143372, 1139241,\n", - " 1146647, 1139615, 1149216, 1142958, 1155686, 1143820, 1149646, 1147473,\n", - " 1147483, 1135992, 1149290, 1142881, 1144636, 1144632, 1146995, 1153012,\n", - " 1135950, 1148337, 1150193, 1136125, 1148546, 1153220, 1137220, 1135149,\n", - " 1150555, 1155019, 1147211, 1146371, 1134806, 1140304, 1140540, 1140542,\n", - " 1138112, 1153463, 1134735, 1140953, 1135360, 1135367, 1135371, 1135202,\n", - " 1137802, 1134969, 1141036, 1134791, 1134794, 1157450, 1138504, 1137329,\n", - " 1157103, 1137682, 1137693, 1136619, 1144395, 1137529, 1137534, 1135418,\n", - " 1157393, 1157397, 1137441, 1137025, 1135265, 1156149, 1139161, 1141705,\n", - " 1142593, 1142607, 1135246, 1148856, 1140970, 1156342, 1138514, 1137959,\n", - " 1138584, 1154132, 1139684, 1138436, 1138440, 1138445, 1138461, 1154790,\n", - " 1136594, 1149328, 1138846, 1138881, 1156603, 1147106, 1147112, 1147116,\n", - " 1147119, 1142611, 1160822, 1135359, 1138177, 1145852, 1135760, 1136454,\n", - " 1139667, 1139673, 1140261, 1134992, 1142788, 1152654, 1136730, 1136734,\n", - " 1136723, 1142905, 1144406, 1153544, 1140034, 1152696, 1139086, 1136076,\n", - " 1139933, 1137595, 1138148, 1146071, 1152042, 1152044, 1137728, 1147322,\n", - " 1134750, 1136992, 1138246, 1135549, 1136691, 1136697, 1141088, 1141096,\n", - " 1141098, 1144138, 1139898, 1156875, 1139111, 1136385, 1143769, 1154857,\n", - " 1143711, 1139025, 1139033, 1152704, 1141685, 1141695, 1135860, 1135861,\n", - " 1136625, 1161173, 1140467, 1141226, 1139386, 1141648, 1136917, 1139730,\n", - " 1143677, 1144237, 1140598, 1141786, 1138785, 1139495, 1144650, 1134991,\n", - " 1136862, 1138482, 1138490, 1142050, 1142053, 1142093, 1142080, 1138469,\n", - " 1149111, 1148871, 1137243, 1140110, 1137661, 1138423, 1143111, 1143113,\n", - " 1144445, 1144596, 1142453, 1136864, 1145298, 1144041, 1144182, 1150906,\n", - " 1150910, 1138539, 1140501, 1137854, 1147153, 1136378, 1141365, 1141367,\n", - " 1141375, 1141664, 1149101, 1139022, 1144277, 1139510, 1140093, 1145001,\n", - " 1140616, 1140976, 1140990, 1140980, 1146693, 1141560, 1147050, 1147047,\n", - " 1145873, 1152976, 1135457, 1135459, 1141925, 1141933, 1146898, 1146901,\n", - " 1144242, 1141846, 1137149, 1150692, 1150698, 1140696, 1143633, 1137571,\n", - " 1137570, 1134861, 1145983, 1143851, 1136277, 1146024, 1146025, 1146141,\n", - " 1154328, 1142533, 1139990, 1143293, 1143283, 1151124, 1147543, 1147545,\n", - " 1147540, 1147150, 1148763, 1147282, 1142816, 1142820, 1149162, 1147461,\n", - " 1142637, 1149366, 1139408, 1136160, 1138923, 1157720, 1136836, 1136843,\n", - " 1139329, 1139328, 1144778, 1141490, 1142153, 1143345, 1144767, 1144753,\n", - " 1144611, 1144619, 1145810, 1144083, 1139979, 1135876, 1144319, 1135813,\n", - " 1144376, 1146514, 1146526, 1143460, 1143457, 1143007, 1142000, 1143937,\n", - " 1147574, 1155700, 1149075, 1143799, 1147523, 1140364, 1149575, 1137990,\n", - " 1137994, 1143085, 1143080, 1144219, 1147996, 1147999, 1146949, 1144003,\n", - " 1144013, 1139252, 1147244, 1148704, 1148715, 1142690, 1141319, 1141327,\n", - " 1141825, 1141836, 1146745, 1147056, 1147025, 1143824, 1142858, 1139549,\n", - " 1158226, 1158228, 1149871, 1145240, 1145750, 1145751, 1142370, 1146159,\n", - " 1138626, 1148395, 1146178, 1151242, 1150280, 1150445, 1154998, 1154443,\n", - " 1149791, 1144514, 1144526, 1141349, 1141358, 1138044, 1151994, 1147794,\n", - " 1147796, 1151487, 1151473, 1152026, 1154271, 1139919, 1142286, 1140566,\n", - " 1149530, 1147019, 1147021, 1158950, 1141949, 1148450, 1147653, 1143560,\n", - " 1149412, 1148300, 1152073, 1137724, 1148623, 1154420, 1154424, 1151363,\n", - " 1151361, 1152561, 1146678, 1146682, 1146686, 1141181, 1152441, 1148720,\n", - " 1148731, 1148729, 1148204, 1171943, 1153124, 1153125, 1153188, 1159828,\n", - " 1155545, 1150932, 1150935, 1152878, 1143091, 1144861, 1150352, 1150356,\n", - " 1155089, 1147442, 1151816, 1141420, 1136002, 1151352, 1155067, 1146962,\n", - " 1146975, 1156402, 1147390, 1146623, 1146493, 1144476, 1152409, 1168005,\n", - " 1152098, 1152109, 1153038, 1145540, 1137746, 1146307, 1152622, 1140521,\n", - " 1136401, 1149203, 1157107, 1155337, 1154120, 1154123, 1154124, 1152673,\n", - " 1139582, 1151627, 1151617, 1145269, 1136131, 1136134, 1136798, 1152944,\n", - " 1145952, 1152903, 1151311, 1152341, 1146816, 1156826, 1156816, 1153301,\n", - " 1153302, 1138272, 1138281, 1157139, 1157147, 1156001, 1156005, 1136028,\n", - " 1136031, 1158704, 1151188, 1151187, 1152928, 1151064, 1156422, 1137396,\n", - " 1148040, 1155202, 1152597, 1160866, 1137048, 1148626, 1148628, 1158530,\n", - " 1158540, 1137458, 1149940, 1149944, 1142041, 1154381, 1150960, 1157547,\n", - " 1158860, 1157064, 1157069, 1157067, 1155412, 1152838, 1152833, 1145191,\n", - " 1145187, 1137809, 1151260, 1150465, 1135222, 1135231, 1160262, 1142221,\n", - " 1135729, 1135730, 1152191, 1156633, 1151788, 1151777, 1157918, 1153415,\n", - " 1139525, 1158306, 1140421, 1155441, 1155452, 1161731, 1150130, 1150132,\n", - " 1154529, 1153994, 1145600, 1142755, 1156271, 1157637, 1151383, 1151379,\n", - " 1137910, 1158639, 1155374, 1156649, 1155122, 1152527, 1157172, 1149321,\n", - " 1149320, 1155746, 1151431, 1135396, 1135398, 1146920, 1156463, 1168230,\n", - " 1155667, 1155628, 1155630, 1156563, 1154547, 1154550, 1158824, 1158829,\n", - " 1158325, 1156993, 1156996, 1148836, 1148646, 1155646, 1153366, 1161231,\n", - " 1146943, 1146935, 1157492, 1154240, 1151327, 1143185, 1153325, 1155613,\n", - " 1150987, 1157934, 1140751, 1157283, 1137167, 1158126, 1153776, 1153786,\n", - " 1149907, 1137381, 1137387, 1159116, 1138269, 1140919, 1154001, 1134674,\n", - " 1135601, 1145507, 1148147, 1150671, 1159585, 1155853, 1155848, 1158665,\n", - " 1138215, 1157684, 1149145, 1149151, 1155717, 1152509, 1140380, 1140381,\n", - " 1155872, 1157735, 1159132, 1159124, 1157028, 1144843, 1155975, 1142073,\n", - " 1183177, 1156812, 1155950, 1160163, 1136896, 1158753, 1158764, 1159156,\n", - " 1158815, 1158447, 1151615, 1136480, 1136494, 1156665, 1147585, 1152136,\n", - " 1153820, 1134757, 1180561, 1161161, 1146126, 1165786, 1188205, 1138099,\n", - " 1138101, 1138108, 1155871, 1144582, 1158260, 1150011, 1155521, 1155535,\n", - " 1142487, 1164276, 1142666, 1162417, 1157758, 1159042, 1165825, 1158295,\n", - " 1158300, 1157946, 1153052, 1155769, 1161930, 1161935, 1156107, 1156109,\n", - " 1138393, 1165244, 1150046, 1159475, 1149063, 1145948, 1153519, 1161652,\n", - " 1157600, 1138161, 1164006, 1165663, 1139286, 1157236, 1157351, 1146063,\n", - " 1171249, 1148600, 1148603, 1148607, 1172725, 1143139, 1155816, 1164505,\n", - " 1158653, 1156184, 1159025, 1159029, 1159032, 1159038, 1165877, 1165585,\n", - " 1158905, 1155588, 1164623, 1162550, 1162552, 1156589, 1151227, 1168426,\n", - " 1147830, 1147835, 1146500, 1146509, 1164580, 1169257, 1144737, 1141471,\n", - " 1161562, 1147427, 1156737, 1156739, 1163260, 1168748, 1135567, 1165718,\n", - " 1142722, 1156293, 1156300, 1156303, 1148683, 1144973, 1146446, 1191923,\n", - " 1169233, 1147693, 1165746, 1147355, 1152624, 1148124, 1139359, 1139345,\n", - " 1145900, 1152200, 1181049, 1169741, 1167503, 1154076, 1162892, 1154919,\n", - " 1169602, 1167817, 1144681, 1169222, 1155172, 1154213, 1165011, 1150515,\n", - " 1156119, 1145529, 1144346, 1144336, 1157534, 1147746, 1154670, 1157331,\n", - " 1141045, 1141048, 1169359, 1149452, 1149446, 1147502, 1138609, 1158611,\n", - " 1158623, 1158063, 1158062, 1173047, 1174641, 1157379, 1159846, 1155494,\n", - " 1172488, 1170462, 1152353, 1152360, 1169186, 1143177, 1149402, 1149394,\n", - " 1172838, 1148324, 1175993, 1173307, 1161143, 1169144, 1169149, 1154026,\n", - " 1154027, 1154023, 1152150, 1172787, 1159655, 1167857, 1169583, 1178419,\n", - " 1157153, 1157373, 1147711, 1169687, 1179335, 1162106, 1181009, 1168822,\n", - " 1167902, 1143244, 1180475, 1172932, 1172939, 1172605, 1163984, 1153428,\n", - " 1169072, 1171823, 1160307, 1154148, 1149169, 1149173, 1180600, 1143278,\n", - " 1164956, 1168481, 1170569, 1178344, 1171297, 1174079, 1164826, 1189170,\n", - " 1180649, 1151519, 1182651, 1179807, 1158030, 1155262, 1172010, 1154707,\n", - " 1154718, 1174623, 1151488, 1171623, 1163568, 1171380, 1182011, 1158249,\n", - " 1158253, 1153898, 1153899, 1154497, 1134655, 1178910, 1145626, 1156443,\n", - " 1172024, 1157483, 1179442, 1161911, 1184997, 1149755, 1146243, 1166959,\n", - " 1174409, 1179783, 1145092, 1158524, 1164106, 1158940, 1163863, 1182434,\n", - " 1158370, 1158380, 1158379, 1155899, 1182786, 1168282, 1169064, 1160078,\n", - " 1164228, 1182337, 1166516, 1164264, 1154957, 1159410, 1147179, 1147182,\n", - " 1172609, 1156162, 1181300, 1184048, 1156528, 1156539, 1139831, 1139837,\n", - " 1150265, 1154812, 1149668, 1151284, 1163848, 1156055, 1173019, 1146392,\n", - " 1146394, 1146395, 1188984, 1149539, 1175656, 1172469, 1191962, 1148787,\n", - " 1148798, 1177473, 1169964, 1189546, 1166328, 1188781, 1182060, 1192458,\n", - " 1174007, 1178065, 1194172, 1193873, 1193774, 1152117, 1185901, 1169703,\n", - " 1169707, 1190741, 1166841, 1153595, 1186424, 1177365, 1150406, 1161863,\n", - " 1190686, 1180992, 1172423, 1158064, 1158070, 1180532, 1179750, 1155962,\n", - " 1191854, 1194244, 1191422, 1192792, 1182178, 1176975, 1190336, 1193307,\n", - " 1190992, 1184940, 1157017], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1198769, 1198782, 1197719, 1200096, 1200099, 1195860, 1202255,\n", - " 1198844, 1201582, 1197777, 1203044, 1198633, 1198697, 1196956, 1202804,\n", - " 1198557, 1196631, 1197434, 1195514, 1196534, 1201935, 1201992, 1196030,\n", - " 1198530, 1198543, 1201427, 1194952, 1194882, 1195888, 1195740, 1196359,\n", - " 1196977, 1196695, 1196526, 1194759, 1197830, 1197831, 1195325, 1196165,\n", - " 1198958, 1198164, 1196704, 1196707, 1195216, 1195265, 1197141, 1200765,\n", - " 1196254, 1195841, 1195850, 1195659, 1199315, 1197474, 1200032, 1196393,\n", - " 1196283, 1195351, 1198279, 1200949, 1197291, 1202747, 1196859, 1194928,\n", - " 1201641, 1197990, 1200869, 1199231, 1201904, 1194786, 1201511, 1196508,\n", - " 1200663, 1199021, 1196727, 1202618, 1200887, 1198416, 1198428, 1200155,\n", - " 1200593, 1198811, 1201827, 1202417, 1200461, 1198593, 1199445, 1198791,\n", - " 1202630, 1200913, 1198481, 1201041, 1200548, 1200555, 1200557, 1200429,\n", - " 1200861, 1196883, 1200690, 1200194, 1200899, 1195885, 1201291, 1195607,\n", - " 1195611, 1195610, 1199929, 1201796, 1200784, 1200785, 1198525, 1195664,\n", - " 1200471, 1198055, 1200445, 1198929, 1200684, 1195181, 1197816, 1197523,\n", - " 1199456, 1201138, 1201139, 1194720, 1198823, 1197735, 1199786, 1198849,\n", - " 1200468, 1195070, 1195066, 1201886, 1197335, 1201877, 1201765],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1198769, 1198782, 1197719, 1200096, 1200099, 1195860, 1202255,\n", - " 1198844, 1201582, 1197777, 1203044, 1198633, 1198697, 1196956, 1202804,\n", - " 1198557, 1196631, 1197434, 1195514, 1196534, 1201935, 1201992, 1196030,\n", - " 1198530, 1198543, 1201427, 1194952, 1194882, 1195888, 1195740, 1196359,\n", - " 1196977, 1196695, 1196526, 1194759, 1197830, 1197831, 1195325, 1196165,\n", - " 1198958, 1198164, 1196704, 1196707, 1195216, 1195265, 1197141, 1200765,\n", - " 1196254, 1195841, 1195850, 1195659, 1199315, 1197474, 1200032, 1196393,\n", - " 1196283, 1195351, 1198279, 1200949, 1197291, 1202747, 1196859, 1194928,\n", - " 1201641, 1197990, 1200869, 1199231, 1201904, 1194786, 1201511, 1196508,\n", - " 1200663, 1199021, 1196727, 1202618, 1200887, 1198416, 1198428, 1200155,\n", - " 1200593, 1198811, 1201827, 1202417, 1200461, 1198593, 1199445, 1198791,\n", - " 1202630, 1200913, 1198481, 1201041, 1200548, 1200555, 1200557, 1200429,\n", - " 1200861, 1196883, 1200690, 1200194, 1200899, 1195885, 1201291, 1195607,\n", - " 1195611, 1195610, 1199929, 1201796, 1200784, 1200785, 1198525, 1195664,\n", - " 1200471, 1198055, 1200445, 1198929, 1200684, 1195181, 1197816, 1197523,\n", - " 1199456, 1201138, 1201139, 1194720, 1198823, 1197735, 1199786, 1198849,\n", - " 1200468, 1195070, 1195066, 1201886, 1197335, 1201877, 1201765],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.9575e-01, -3.9008e-04, 9.0268e-01, ..., 1.3050e-01,\n", - " -2.0186e-03, -5.7577e-03],\n", - " [ 2.0327e-01, -1.6202e-04, 8.8554e-01, ..., 1.1994e-01,\n", - " -1.9476e-03, -5.8869e-03],\n", - " [ 1.3533e-01, -6.2244e-04, 7.5504e-01, ..., 1.3363e-01,\n", - " -1.8451e-03, -4.8839e-03],\n", - " ...,\n", - " [ 1.9575e-01, -3.9008e-04, 9.0268e-01, ..., 1.3050e-01,\n", - " -2.0186e-03, -5.7577e-03],\n", - " [ 1.1073e-01, -9.9944e-05, 5.9402e-01, ..., 1.3460e-01,\n", - " -2.0347e-03, -3.9225e-03],\n", - " [ 1.1672e-01, -2.5286e-04, 7.0464e-01, ..., 1.3050e-01,\n", - " -1.8829e-03, -4.3308e-03]], device='cuda:0'), 'paper': tensor([[ 4.7623e-01, 1.5859e+00, 2.4604e+00, ..., -6.2772e-03,\n", - " -2.2197e-02, -3.4292e-03],\n", - " [ 1.4526e+00, 7.2905e-01, 1.3455e+00, ..., -9.3880e-03,\n", - " -2.4259e-02, 8.7922e-01],\n", - " [ 1.6827e+00, 1.0869e+00, 3.4610e+00, ..., 1.6884e+00,\n", - " -5.3592e-02, 3.3845e+00],\n", - " ...,\n", - " [ 1.7712e-01, 1.5303e-01, 3.2877e+00, ..., -8.3566e-03,\n", - " -2.9259e-02, -1.3395e-02],\n", - " [ 1.0982e+00, 1.6117e+00, 2.6427e+00, ..., -9.0847e-03,\n", - " -2.8282e-02, 5.0302e-02],\n", - " [ 1.7233e+00, 1.4404e+00, 3.2820e+00, ..., 2.4133e+00,\n", - " -5.6331e-02, 3.9020e+00]], device='cuda:0'), 'author': tensor([[-2.7399e-03, 3.2331e-01, 2.2014e-01, ..., 1.5465e+00,\n", - " -2.8473e-03, -2.4783e-03],\n", - " [-1.5510e-03, 2.9349e-01, 2.6279e-01, ..., 1.6829e+00,\n", - " -3.8587e-04, -8.8221e-05],\n", - " [-1.2845e-03, 3.0435e-01, 1.2721e-01, ..., 1.6502e+00,\n", - " 1.9725e-01, 6.2516e-02],\n", - " ...,\n", - " [-1.6965e-03, 3.5365e-01, 1.6086e-01, ..., 1.6362e+00,\n", - " -1.7183e-04, -2.5398e-04],\n", - " [-1.7701e-03, 2.7926e-01, 2.5626e-01, ..., 1.6602e+00,\n", - " -1.2530e-03, -7.2262e-04],\n", - " [-6.2942e-04, 2.9830e-02, 1.2906e-01, ..., 1.6955e-01,\n", - " -1.0748e-04, -6.7757e-04]], device='cuda:0'), 'field_of_study': tensor([[ 5.4439e-02, 7.9439e-01, 5.0535e-01, ..., -1.0312e-02,\n", - " 3.1152e-01, 4.5751e-01],\n", - " [ 6.2965e-02, 6.9989e-01, 4.0292e-01, ..., -9.5817e-03,\n", - " 3.7398e-01, 4.1545e-01],\n", - " [ 8.9203e-02, 6.4959e-01, 3.2999e-01, ..., -6.2474e-03,\n", - " 1.7432e-01, 3.0208e-01],\n", - " ...,\n", - " [-5.9228e-05, 7.2953e-01, 4.0836e-01, ..., -9.4065e-03,\n", - " 2.3167e-01, 5.1931e-01],\n", - " [-5.9228e-05, 7.2953e-01, 4.0836e-01, ..., -9.4065e-03,\n", - " 2.3167e-01, 5.1931e-01],\n", - " [ 1.4605e-01, 7.2323e-01, 4.7318e-01, ..., -1.0489e-02,\n", - " 3.9277e-01, 4.3446e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 11, 223, 55, 189, 189, 21, 21, 21, 21, 21, 55, 218,\n", - " 218, 218, 355, 245, 378, 544, 314, 314, 501, 663, 500, 519,\n", - " 1087, 1174, 817, 1093, 1179, 982, 1273, 1326, 1688, 1399, 1417, 1411,\n", - " 1408, 1666, 1812, 1732, 1732, 1773, 1669, 1667, 1757, 1617, 1773, 1826,\n", - " 1826, 1938, 1968, 1968, 1968, 1968, 2250, 2172, 2172, 2236, 2182, 2182,\n", - " 2256, 2216, 2262, 2446, 2370, 2369, 2369, 2405, 2461, 2461, 2391, 2305,\n", - " 2595, 2595, 2595, 2591, 2555, 2455, 2455, 2455, 2571, 2673, 2562, 2716,\n", - " 2869, 2863, 2890, 2919, 2715, 3054, 2872, 2872, 3191, 3152, 3063, 3112,\n", - " 3239, 3164, 3164, 3111, 3331, 3399, 3356, 3356, 3341, 3775, 3775, 3775,\n", - " 3394, 3394, 3459, 3420, 3680, 3680, 3590, 3779, 3603, 3672, 3779, 3789,\n", - " 3429, 3703, 3703, 3806, 3651, 3908, 3879, 3899, 3958, 4022, 3990, 4034,\n", - " 4045, 4018, 4017, 4028, 4076, 4118, 4095, 4068, 4087, 4110, 4123, 4265,\n", - " 4339, 4563, 4384, 4384, 4415, 4540, 5072, 5024, 5046, 5157, 5157, 5020,\n", - " 5033, 5033, 5318, 5076, 5138, 5483, 5551, 5730, 5822, 5822, 5389, 5340,\n", - " 5481, 5481, 5481, 5845, 5780, 5780, 5966, 5843, 5843, 5900, 5900, 6147,\n", - " 6147, 5779, 5779, 5985, 5841, 5841, 5985, 5985, 5985, 6088, 6074, 6074,\n", - " 6074, 5945],\n", - " [ 88, 119, 11, 18, 36, 46, 8, 89, 73, 37, 53, 39,\n", - " 131, 61, 35, 75, 28, 133, 8, 67, 55, 107, 34, 96,\n", - " 35, 59, 83, 54, 27, 35, 108, 30, 72, 96, 2, 91,\n", - " 74, 91, 6, 34, 81, 16, 48, 60, 91, 129, 98, 65,\n", - " 93, 90, 114, 43, 64, 92, 28, 132, 53, 122, 15, 31,\n", - " 24, 77, 134, 72, 29, 26, 84, 121, 3, 4, 119, 48,\n", - " 118, 102, 22, 91, 134, 38, 22, 18, 66, 107, 56, 21,\n", - " 71, 68, 47, 127, 97, 71, 75, 19, 28, 134, 108, 113,\n", - " 57, 123, 124, 110, 112, 70, 79, 44, 42, 5, 58, 45,\n", - " 62, 13, 0, 87, 117, 80, 3, 118, 74, 38, 38, 22,\n", - " 14, 117, 87, 114, 13, 134, 83, 125, 52, 124, 94, 19,\n", - " 16, 16, 74, 50, 0, 130, 69, 32, 124, 99, 116, 111,\n", - " 110, 100, 17, 8, 3, 126, 20, 120, 115, 95, 41, 81,\n", - " 74, 78, 104, 31, 85, 1, 86, 23, 128, 12, 128, 63,\n", - " 40, 109, 103, 76, 74, 51, 63, 101, 74, 74, 9, 49,\n", - " 74, 22, 102, 22, 74, 7, 10, 106, 74, 82, 74, 33,\n", - " 25, 105]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1233, 3238, 2674, ..., 1861, 2674, 6236],\n", - " [ 19, 52, 168, ..., 7203, 7378, 7318]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 79, 21, 35, ..., 79, 97, 5],\n", - " [ 7, 99, 65, ..., 6068, 6058, 6014]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 94, 94, 94, ..., 7328, 7198, 7298],\n", - " [ 684, 260, 436, ..., 475, 122, 402]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 458, 458, 436, ..., 784, 293, 908],\n", - " [ 97, 192, 256, ..., 7142, 7349, 7316]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5148, 2079, 2904, ..., 5782, 145, 1916],\n", - " [ 121, 55, 167, ..., 6134, 6078, 6028]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 94, 94, 94, ..., 7198, 7198, 7367],\n", - " [2799, 2212, 2122, ..., 6547, 6025, 377]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 55, 55, 55, ..., 5945, 5945, 5945],\n", - " [ 549, 2762, 3101, ..., 325, 295, 74]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.003631\n", - "sampling 0.00355\n", - "noi time: 0.000719\n", - "get_vertex_data call: 0.01432\n", - "noi group time: 0.001903\n", - "eoi_group_time: 0.011083\n", - "second half: 0.113118\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 527, 31145, 24187, ..., 1120077, 1120067, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 527, 31145, 24187, ..., 1120077, 1120067, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1224372, 1208551, ..., 1934173, 1933696, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1224372, 1208551, ..., 1934173, 1933696, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1141424, 1136237, 1140282, 1140285, 1135926, 1138553, 1135165,\n", - " 1135716, 1135727, 1140787, 1140799, 1141758, 1137506, 1138335, 1140297,\n", - " 1142523, 1142525, 1136969, 1145372, 1145993, 1137271, 1143362, 1143372,\n", - " 1143363, 1139246, 1146640, 1139609, 1145292, 1134937, 1148582, 1149216,\n", - " 1142958, 1155683, 1155686, 1149633, 1147473, 1147483, 1141876, 1142881,\n", - " 1144632, 1135118, 1148343, 1146656, 1146660, 1150200, 1146472, 1146471,\n", - " 1138347, 1137220, 1150555, 1155008, 1155019, 1150324, 1152430, 1152427,\n", - " 1134709, 1134804, 1140537, 1138112, 1138126, 1137249, 1137169, 1138356,\n", - " 1151526, 1135367, 1135202, 1135210, 1154739, 1141036, 1136778, 1134794,\n", - " 1157443, 1138508, 1137329, 1137342, 1137693, 1136619, 1144395, 1157397,\n", - " 1136662, 1137441, 1136204, 1136928, 1156159, 1148481, 1139161, 1134841,\n", - " 1141702, 1135579, 1136097, 1140712, 1156347, 1138514, 1158140, 1154132,\n", - " 1137021, 1135522, 1139685, 1138436, 1138440, 1140079, 1138461, 1138449,\n", - " 1137924, 1135088, 1142611, 1142615, 1158984, 1148531, 1137109, 1135769,\n", - " 1135772, 1141532, 1139667, 1139673, 1138069, 1134992, 1134782, 1142793,\n", - " 1135782, 1136734, 1140034, 1138655, 1155648, 1146075, 1141985, 1152044,\n", - " 1139064, 1137728, 1147316, 1147317, 1134750, 1134741, 1137005, 1135549,\n", - " 1136697, 1141088, 1141097, 1148996, 1149001, 1139898, 1142025, 1143775,\n", - " 1137298, 1137299, 1143225, 1139025, 1139033, 1149979, 1135861, 1154472,\n", - " 1136625, 1140470, 1141224, 1159800, 1136917, 1143677, 1145066, 1140598,\n", - " 1141786, 1152731, 1139495, 1141609, 1144646, 1144650, 1147844, 1147850,\n", - " 1137072, 1148065, 1144428, 1144420, 1142053, 1141810, 1143202, 1158749,\n", - " 1149108, 1138708, 1140110, 1144596, 1144598, 1145298, 1140885, 1135322,\n", - " 1135324, 1135327, 1140442, 1144182, 1146202, 1139559, 1138539, 1137846,\n", - " 1137841, 1147153, 1147155, 1136369, 1136378, 1142640, 1141365, 1141367,\n", - " 1153068, 1153069, 1141725, 1141664, 1149099, 1149101, 1144279, 1143904,\n", - " 1139506, 1139508, 1139510, 1139763, 1140093, 1139127, 1145001, 1140976,\n", - " 1140990, 1135047, 1147050, 1147052, 1147047, 1155829, 1152976, 1135457,\n", - " 1139453, 1141925, 1144242, 1140580, 1140582, 1140696, 1136885, 1134851,\n", - " 1134861, 1141390, 1143851, 1136275, 1146024, 1150606, 1146140, 1139990,\n", - " 1146302, 1143293, 1143294, 1151124, 1147545, 1147282, 1147290, 1142816,\n", - " 1142638, 1146084, 1143051, 1157720, 1136836, 1139328, 1144957, 1145427,\n", - " 1143345, 1144611, 1144615, 1145818, 1137098, 1139979, 1146514, 1146523,\n", - " 1143456, 1143457, 1137711, 1137703, 1140488, 1143937, 1143949, 1140816,\n", - " 1143803, 1146631, 1140364, 1137994, 1143080, 1143082, 1166410, 1148962,\n", - " 1148966, 1147988, 1147995, 1147996, 1147999, 1146949, 1144013, 1139252,\n", - " 1147127, 1147131, 1148704, 1148468, 1147056, 1147070, 1147025, 1147024,\n", - " 1145009, 1139549, 1158226, 1158230, 1141137, 1145750, 1145751, 1142370,\n", - " 1142369, 1138638, 1148223, 1152530, 1152537, 1150280, 1150438, 1150445,\n", - " 1149258, 1148831, 1148828, 1149791, 1144514, 1144526, 1150350, 1165252,\n", - " 1142304, 1147794, 1151480, 1151482, 1152023, 1152026, 1154271, 1154263,\n", - " 1139914, 1146723, 1140566, 1141949, 1146772, 1151795, 1147763, 1153568,\n", - " 1153574, 1148450, 1147653, 1147659, 1143559, 1143561, 1149409, 1149412,\n", - " 1147858, 1151412, 1154420, 1152561, 1139721, 1146686, 1141181, 1148729,\n", - " 1144110, 1146549, 1149810, 1150057, 1166312, 1143971, 1143888, 1148204,\n", - " 1141728, 1153188, 1145106, 1168631, 1150932, 1148052, 1152878, 1144863,\n", - " 1147442, 1151816, 1151821, 1135303, 1148498, 1148505, 1141420, 1141419,\n", - " 1151351, 1148949, 1146975, 1146967, 1146623, 1144472, 1146280, 1146281,\n", - " 1153028, 1153038, 1150085, 1137746, 1137755, 1152622, 1140521, 1136410,\n", - " 1152820, 1155337, 1154119, 1154123, 1157839, 1152673, 1154633, 1154638,\n", - " 1151617, 1151623, 1136131, 1136134, 1136798, 1148916, 1152950, 1144532,\n", - " 1138991, 1152903, 1146816, 1156826, 1153311, 1138279, 1138281, 1136028,\n", - " 1158712, 1158704, 1152928, 1156387, 1152888, 1142774, 1142777, 1150109,\n", - " 1150110, 1153909, 1150150, 1148040, 1155202, 1149300, 1152601, 1149794,\n", - " 1149798, 1149805, 1137048, 1158477, 1177026, 1148628, 1158530, 1158540,\n", - " 1137458, 1153863, 1147643, 1142047, 1143442, 1142387, 1158860, 1148892,\n", - " 1158916, 1156500, 1157064, 1155408, 1155412, 1152845, 1139473, 1151257,\n", - " 1135222, 1135729, 1135730, 1138816, 1151777, 1153422, 1135645, 1139525,\n", - " 1158306, 1158308, 1158311, 1155441, 1155512, 1153353, 1153359, 1150136,\n", - " 1154529, 1156913, 1145606, 1142764, 1142758, 1156265, 1156271, 1151388,\n", - " 1151379, 1155122, 1152527, 1149327, 1155755, 1135406, 1156463, 1155626,\n", - " 1156563, 1154550, 1155572, 1158824, 1148835, 1155646, 1143263, 1154644,\n", - " 1162389, 1161796, 1154080, 1154902, 1160907, 1150371, 1153318, 1153322,\n", - " 1155613, 1150811, 1150801, 1150976, 1155281, 1137152, 1157650, 1153786,\n", - " 1137381, 1159116, 1134683, 1135601, 1135605, 1148149, 1150661, 1150671,\n", - " 1155848, 1155852, 1149145, 1140633, 1152220, 1152222, 1155439, 1157733,\n", - " 1157031, 1155971, 1155975, 1161673, 1142070, 1135190, 1135186, 1158846,\n", - " 1156812, 1155404, 1136896, 1158882, 1140221, 1158447, 1136487, 1136491,\n", - " 1164941, 1164181, 1156665, 1152143, 1156488, 1153808, 1136640, 1136646,\n", - " 1145477, 1183285, 1166424, 1146126, 1165786, 1138101, 1138110, 1155871,\n", - " 1161539, 1142487, 1157747, 1167346, 1167359, 1162685, 1159052, 1167589,\n", - " 1155191, 1157944, 1157946, 1160563, 1162044, 1153052, 1153045, 1171551,\n", - " 1169840, 1138393, 1142677, 1150046, 1149063, 1149070, 1155482, 1155473,\n", - " 1153519, 1158685, 1146876, 1161652, 1157600, 1138161, 1156787, 1156795,\n", - " 1149956, 1149966, 1139592, 1139286, 1139290, 1156983, 1166073, 1171515,\n", - " 1146063, 1146356, 1171255, 1158452, 1184925, 1140130, 1158868, 1148600,\n", - " 1172722, 1143143, 1154279, 1156361, 1156355, 1173873, 1156181, 1159025,\n", - " 1159029, 1159032, 1152247, 1165585, 1143729, 1155588, 1144320, 1162549,\n", - " 1151223, 1151225, 1168428, 1144977, 1146500, 1163522, 1141471, 1147426,\n", - " 1147427, 1157052, 1156739, 1160856, 1153663, 1150643, 1150648, 1168748,\n", - " 1144810, 1144812, 1162085, 1165718, 1142733, 1156300, 1144056, 1145732,\n", - " 1148683, 1154701, 1144973, 1143038, 1165746, 1147355, 1148118, 1148120,\n", - " 1145902, 1179106, 1153520, 1168659, 1171571, 1152206, 1158724, 1154076,\n", - " 1147334, 1147339, 1144699, 1177933, 1145674, 1145673, 1151594, 1151598,\n", - " 1149130, 1167817, 1166653, 1155172, 1155180, 1165011, 1150522, 1150518,\n", - " 1156119, 1144336, 1138382, 1154670, 1154893, 1169162, 1157331, 1141051,\n", - " 1151664, 1154364, 1138609, 1171522, 1171529, 1149684, 1158623, 1158054,\n", - " 1158060, 1158062, 1149846, 1157384, 1174454, 1179900, 1152353, 1152360,\n", - " 1152546, 1168400, 1173307, 1154018, 1152150, 1159655, 1178423, 1157153,\n", - " 1157373, 1147711, 1148128, 1148131, 1147934, 1166827, 1135018, 1170701,\n", - " 1155739, 1177601, 1166028, 1163990, 1166684, 1170874, 1171823, 1154151,\n", - " 1154148, 1167523, 1167531, 1158176, 1184583, 1149169, 1149173, 1143279,\n", - " 1164956, 1168481, 1143420, 1156559, 1171302, 1170176, 1180247, 1153803,\n", - " 1153805, 1153141, 1183847, 1183135, 1161255, 1155262, 1180152, 1154718,\n", - " 1157795, 1143341, 1171623, 1171619, 1164034, 1181380, 1155804, 1187521,\n", - " 1153898, 1166476, 1180756, 1178218, 1162403, 1145626, 1172024, 1149755,\n", - " 1146242, 1153609, 1152276, 1158934, 1155892, 1155899, 1180852, 1186100,\n", - " 1185068, 1159874, 1165474, 1162253, 1190156, 1146169, 1176712, 1172623,\n", - " 1179053, 1170034, 1190622, 1168930, 1172169, 1139828, 1139831, 1139837,\n", - " 1150265, 1154812, 1156055, 1190261, 1182834, 1151972, 1181889, 1191018,\n", - " 1169954, 1140993, 1190444, 1167840, 1178076, 1192809, 1153743, 1194169,\n", - " 1188057, 1152115, 1177127, 1162504, 1169707, 1177845, 1181728, 1177285,\n", - " 1145395, 1160968, 1152080, 1178296, 1179364, 1172903, 1172896, 1185526,\n", - " 1191760, 1191142, 1175438, 1182863, 1192018, 1157022, 1161940],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1141424, 1136237, 1140282, 1140285, 1135926, 1138553, 1135165,\n", - " 1135716, 1135727, 1140787, 1140799, 1141758, 1137506, 1138335, 1140297,\n", - " 1142523, 1142525, 1136969, 1145372, 1145993, 1137271, 1143362, 1143372,\n", - " 1143363, 1139246, 1146640, 1139609, 1145292, 1134937, 1148582, 1149216,\n", - " 1142958, 1155683, 1155686, 1149633, 1147473, 1147483, 1141876, 1142881,\n", - " 1144632, 1135118, 1148343, 1146656, 1146660, 1150200, 1146472, 1146471,\n", - " 1138347, 1137220, 1150555, 1155008, 1155019, 1150324, 1152430, 1152427,\n", - " 1134709, 1134804, 1140537, 1138112, 1138126, 1137249, 1137169, 1138356,\n", - " 1151526, 1135367, 1135202, 1135210, 1154739, 1141036, 1136778, 1134794,\n", - " 1157443, 1138508, 1137329, 1137342, 1137693, 1136619, 1144395, 1157397,\n", - " 1136662, 1137441, 1136204, 1136928, 1156159, 1148481, 1139161, 1134841,\n", - " 1141702, 1135579, 1136097, 1140712, 1156347, 1138514, 1158140, 1154132,\n", - " 1137021, 1135522, 1139685, 1138436, 1138440, 1140079, 1138461, 1138449,\n", - " 1137924, 1135088, 1142611, 1142615, 1158984, 1148531, 1137109, 1135769,\n", - " 1135772, 1141532, 1139667, 1139673, 1138069, 1134992, 1134782, 1142793,\n", - " 1135782, 1136734, 1140034, 1138655, 1155648, 1146075, 1141985, 1152044,\n", - " 1139064, 1137728, 1147316, 1147317, 1134750, 1134741, 1137005, 1135549,\n", - " 1136697, 1141088, 1141097, 1148996, 1149001, 1139898, 1142025, 1143775,\n", - " 1137298, 1137299, 1143225, 1139025, 1139033, 1149979, 1135861, 1154472,\n", - " 1136625, 1140470, 1141224, 1159800, 1136917, 1143677, 1145066, 1140598,\n", - " 1141786, 1152731, 1139495, 1141609, 1144646, 1144650, 1147844, 1147850,\n", - " 1137072, 1148065, 1144428, 1144420, 1142053, 1141810, 1143202, 1158749,\n", - " 1149108, 1138708, 1140110, 1144596, 1144598, 1145298, 1140885, 1135322,\n", - " 1135324, 1135327, 1140442, 1144182, 1146202, 1139559, 1138539, 1137846,\n", - " 1137841, 1147153, 1147155, 1136369, 1136378, 1142640, 1141365, 1141367,\n", - " 1153068, 1153069, 1141725, 1141664, 1149099, 1149101, 1144279, 1143904,\n", - " 1139506, 1139508, 1139510, 1139763, 1140093, 1139127, 1145001, 1140976,\n", - " 1140990, 1135047, 1147050, 1147052, 1147047, 1155829, 1152976, 1135457,\n", - " 1139453, 1141925, 1144242, 1140580, 1140582, 1140696, 1136885, 1134851,\n", - " 1134861, 1141390, 1143851, 1136275, 1146024, 1150606, 1146140, 1139990,\n", - " 1146302, 1143293, 1143294, 1151124, 1147545, 1147282, 1147290, 1142816,\n", - " 1142638, 1146084, 1143051, 1157720, 1136836, 1139328, 1144957, 1145427,\n", - " 1143345, 1144611, 1144615, 1145818, 1137098, 1139979, 1146514, 1146523,\n", - " 1143456, 1143457, 1137711, 1137703, 1140488, 1143937, 1143949, 1140816,\n", - " 1143803, 1146631, 1140364, 1137994, 1143080, 1143082, 1166410, 1148962,\n", - " 1148966, 1147988, 1147995, 1147996, 1147999, 1146949, 1144013, 1139252,\n", - " 1147127, 1147131, 1148704, 1148468, 1147056, 1147070, 1147025, 1147024,\n", - " 1145009, 1139549, 1158226, 1158230, 1141137, 1145750, 1145751, 1142370,\n", - " 1142369, 1138638, 1148223, 1152530, 1152537, 1150280, 1150438, 1150445,\n", - " 1149258, 1148831, 1148828, 1149791, 1144514, 1144526, 1150350, 1165252,\n", - " 1142304, 1147794, 1151480, 1151482, 1152023, 1152026, 1154271, 1154263,\n", - " 1139914, 1146723, 1140566, 1141949, 1146772, 1151795, 1147763, 1153568,\n", - " 1153574, 1148450, 1147653, 1147659, 1143559, 1143561, 1149409, 1149412,\n", - " 1147858, 1151412, 1154420, 1152561, 1139721, 1146686, 1141181, 1148729,\n", - " 1144110, 1146549, 1149810, 1150057, 1166312, 1143971, 1143888, 1148204,\n", - " 1141728, 1153188, 1145106, 1168631, 1150932, 1148052, 1152878, 1144863,\n", - " 1147442, 1151816, 1151821, 1135303, 1148498, 1148505, 1141420, 1141419,\n", - " 1151351, 1148949, 1146975, 1146967, 1146623, 1144472, 1146280, 1146281,\n", - " 1153028, 1153038, 1150085, 1137746, 1137755, 1152622, 1140521, 1136410,\n", - " 1152820, 1155337, 1154119, 1154123, 1157839, 1152673, 1154633, 1154638,\n", - " 1151617, 1151623, 1136131, 1136134, 1136798, 1148916, 1152950, 1144532,\n", - " 1138991, 1152903, 1146816, 1156826, 1153311, 1138279, 1138281, 1136028,\n", - " 1158712, 1158704, 1152928, 1156387, 1152888, 1142774, 1142777, 1150109,\n", - " 1150110, 1153909, 1150150, 1148040, 1155202, 1149300, 1152601, 1149794,\n", - " 1149798, 1149805, 1137048, 1158477, 1177026, 1148628, 1158530, 1158540,\n", - " 1137458, 1153863, 1147643, 1142047, 1143442, 1142387, 1158860, 1148892,\n", - " 1158916, 1156500, 1157064, 1155408, 1155412, 1152845, 1139473, 1151257,\n", - " 1135222, 1135729, 1135730, 1138816, 1151777, 1153422, 1135645, 1139525,\n", - " 1158306, 1158308, 1158311, 1155441, 1155512, 1153353, 1153359, 1150136,\n", - " 1154529, 1156913, 1145606, 1142764, 1142758, 1156265, 1156271, 1151388,\n", - " 1151379, 1155122, 1152527, 1149327, 1155755, 1135406, 1156463, 1155626,\n", - " 1156563, 1154550, 1155572, 1158824, 1148835, 1155646, 1143263, 1154644,\n", - " 1162389, 1161796, 1154080, 1154902, 1160907, 1150371, 1153318, 1153322,\n", - " 1155613, 1150811, 1150801, 1150976, 1155281, 1137152, 1157650, 1153786,\n", - " 1137381, 1159116, 1134683, 1135601, 1135605, 1148149, 1150661, 1150671,\n", - " 1155848, 1155852, 1149145, 1140633, 1152220, 1152222, 1155439, 1157733,\n", - " 1157031, 1155971, 1155975, 1161673, 1142070, 1135190, 1135186, 1158846,\n", - " 1156812, 1155404, 1136896, 1158882, 1140221, 1158447, 1136487, 1136491,\n", - " 1164941, 1164181, 1156665, 1152143, 1156488, 1153808, 1136640, 1136646,\n", - " 1145477, 1183285, 1166424, 1146126, 1165786, 1138101, 1138110, 1155871,\n", - " 1161539, 1142487, 1157747, 1167346, 1167359, 1162685, 1159052, 1167589,\n", - " 1155191, 1157944, 1157946, 1160563, 1162044, 1153052, 1153045, 1171551,\n", - " 1169840, 1138393, 1142677, 1150046, 1149063, 1149070, 1155482, 1155473,\n", - " 1153519, 1158685, 1146876, 1161652, 1157600, 1138161, 1156787, 1156795,\n", - " 1149956, 1149966, 1139592, 1139286, 1139290, 1156983, 1166073, 1171515,\n", - " 1146063, 1146356, 1171255, 1158452, 1184925, 1140130, 1158868, 1148600,\n", - " 1172722, 1143143, 1154279, 1156361, 1156355, 1173873, 1156181, 1159025,\n", - " 1159029, 1159032, 1152247, 1165585, 1143729, 1155588, 1144320, 1162549,\n", - " 1151223, 1151225, 1168428, 1144977, 1146500, 1163522, 1141471, 1147426,\n", - " 1147427, 1157052, 1156739, 1160856, 1153663, 1150643, 1150648, 1168748,\n", - " 1144810, 1144812, 1162085, 1165718, 1142733, 1156300, 1144056, 1145732,\n", - " 1148683, 1154701, 1144973, 1143038, 1165746, 1147355, 1148118, 1148120,\n", - " 1145902, 1179106, 1153520, 1168659, 1171571, 1152206, 1158724, 1154076,\n", - " 1147334, 1147339, 1144699, 1177933, 1145674, 1145673, 1151594, 1151598,\n", - " 1149130, 1167817, 1166653, 1155172, 1155180, 1165011, 1150522, 1150518,\n", - " 1156119, 1144336, 1138382, 1154670, 1154893, 1169162, 1157331, 1141051,\n", - " 1151664, 1154364, 1138609, 1171522, 1171529, 1149684, 1158623, 1158054,\n", - " 1158060, 1158062, 1149846, 1157384, 1174454, 1179900, 1152353, 1152360,\n", - " 1152546, 1168400, 1173307, 1154018, 1152150, 1159655, 1178423, 1157153,\n", - " 1157373, 1147711, 1148128, 1148131, 1147934, 1166827, 1135018, 1170701,\n", - " 1155739, 1177601, 1166028, 1163990, 1166684, 1170874, 1171823, 1154151,\n", - " 1154148, 1167523, 1167531, 1158176, 1184583, 1149169, 1149173, 1143279,\n", - " 1164956, 1168481, 1143420, 1156559, 1171302, 1170176, 1180247, 1153803,\n", - " 1153805, 1153141, 1183847, 1183135, 1161255, 1155262, 1180152, 1154718,\n", - " 1157795, 1143341, 1171623, 1171619, 1164034, 1181380, 1155804, 1187521,\n", - " 1153898, 1166476, 1180756, 1178218, 1162403, 1145626, 1172024, 1149755,\n", - " 1146242, 1153609, 1152276, 1158934, 1155892, 1155899, 1180852, 1186100,\n", - " 1185068, 1159874, 1165474, 1162253, 1190156, 1146169, 1176712, 1172623,\n", - " 1179053, 1170034, 1190622, 1168930, 1172169, 1139828, 1139831, 1139837,\n", - " 1150265, 1154812, 1156055, 1190261, 1182834, 1151972, 1181889, 1191018,\n", - " 1169954, 1140993, 1190444, 1167840, 1178076, 1192809, 1153743, 1194169,\n", - " 1188057, 1152115, 1177127, 1162504, 1169707, 1177845, 1181728, 1177285,\n", - " 1145395, 1160968, 1152080, 1178296, 1179364, 1172903, 1172896, 1185526,\n", - " 1191760, 1191142, 1175438, 1182863, 1192018, 1157022, 1161940],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1195697, 1198248, 1200225, 1199282, 1202245, 1202249, 1198832,\n", - " 1194626, 1203054, 1198633, 1202804, 1196685, 1194743, 1196624, 1196631,\n", - " 1194648, 1196586, 1195507, 1195263, 1196534, 1196030, 1198543, 1197697,\n", - " 1198095, 1195888, 1197856, 1196699, 1196616, 1197831, 1198668, 1198161,\n", - " 1196711, 1195148, 1195270, 1195278, 1197141, 1196247, 1196109, 1194859,\n", - " 1194826, 1198915, 1195659, 1195541, 1199322, 1197640, 1199699, 1199711,\n", - " 1195351, 1199062, 1199185, 1197618, 1198673, 1199628, 1197676, 1200878,\n", - " 1198404, 1199231, 1201908, 1195010, 1195017, 1200061, 1197681, 1196498,\n", - " 1197970, 1197601, 1197953, 1196727, 1200887, 1199586, 1199421, 1200769,\n", - " 1200452, 1200450, 1200169, 1200913, 1200918, 1200927, 1201043, 1200526,\n", - " 1200553, 1202102, 1202138, 1199910, 1196768, 1202239, 1202338, 1202337,\n", - " 1201291, 1195611, 1198562, 1196966, 1195048, 1200578, 1195664, 1198929,\n", - " 1198932, 1198911, 1195415, 1197059, 1197821, 1197495, 1198961, 1199659,\n", - " 1203102, 1194734, 1198824, 1197731, 1200437, 1200468, 1195308, 1197652,\n", - " 1202077, 1201760, 1197872], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1195697, 1198248, 1200225, 1199282, 1202245, 1202249, 1198832,\n", - " 1194626, 1203054, 1198633, 1202804, 1196685, 1194743, 1196624, 1196631,\n", - " 1194648, 1196586, 1195507, 1195263, 1196534, 1196030, 1198543, 1197697,\n", - " 1198095, 1195888, 1197856, 1196699, 1196616, 1197831, 1198668, 1198161,\n", - " 1196711, 1195148, 1195270, 1195278, 1197141, 1196247, 1196109, 1194859,\n", - " 1194826, 1198915, 1195659, 1195541, 1199322, 1197640, 1199699, 1199711,\n", - " 1195351, 1199062, 1199185, 1197618, 1198673, 1199628, 1197676, 1200878,\n", - " 1198404, 1199231, 1201908, 1195010, 1195017, 1200061, 1197681, 1196498,\n", - " 1197970, 1197601, 1197953, 1196727, 1200887, 1199586, 1199421, 1200769,\n", - " 1200452, 1200450, 1200169, 1200913, 1200918, 1200927, 1201043, 1200526,\n", - " 1200553, 1202102, 1202138, 1199910, 1196768, 1202239, 1202338, 1202337,\n", - " 1201291, 1195611, 1198562, 1196966, 1195048, 1200578, 1195664, 1198929,\n", - " 1198932, 1198911, 1195415, 1197059, 1197821, 1197495, 1198961, 1199659,\n", - " 1203102, 1194734, 1198824, 1197731, 1200437, 1200468, 1195308, 1197652,\n", - " 1202077, 1201760, 1197872], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.8145e-01, -1.4261e-04, 8.8698e-01, ..., 1.1846e-01,\n", - " -1.8426e-03, -5.6050e-03],\n", - " [ 1.3756e-01, -4.3129e-04, 8.1664e-01, ..., 1.3501e-01,\n", - " -1.8942e-03, -5.0510e-03],\n", - " [ 1.3374e-01, -8.4623e-05, 7.4158e-01, ..., 1.3870e-01,\n", - " -2.0328e-03, -4.7509e-03],\n", - " ...,\n", - " [ 1.3501e-01, 4.0625e-03, 7.1416e-01, ..., 1.4473e-01,\n", - " -2.1614e-03, -4.5976e-03],\n", - " [ 8.1913e-02, -1.7032e-04, 6.8873e-01, ..., 1.9082e-01,\n", - " -2.2999e-03, -4.1398e-03],\n", - " [ 2.0808e-01, -5.1389e-04, 9.4460e-01, ..., 1.1429e-01,\n", - " -1.7043e-03, -6.1277e-03]], device='cuda:0'), 'paper': tensor([[ 1.7463e+00, 1.6784e+00, 3.7359e+00, ..., 1.4942e+00,\n", - " -4.7880e-02, 2.8602e+00],\n", - " [ 9.9621e-01, 9.7400e-01, 1.5151e+00, ..., -5.9369e-03,\n", - " -2.0433e-02, 3.1666e-01],\n", - " [ 1.5789e+00, 2.3065e+00, 2.9828e+00, ..., 4.9920e-01,\n", - " -3.3365e-02, 1.8080e+00],\n", - " ...,\n", - " [-5.7880e-03, -1.2004e-02, 3.8324e+00, ..., -1.1219e-02,\n", - " -3.5562e-02, -2.2395e-02],\n", - " [ 4.9121e-01, 5.1887e-01, 2.1306e+00, ..., -6.4924e-03,\n", - " -2.6385e-02, -9.8691e-04],\n", - " [ 1.7246e+00, 1.4422e+00, 3.2764e+00, ..., 2.4144e+00,\n", - " -5.6264e-02, 3.9019e+00]], device='cuda:0'), 'author': tensor([[-6.2942e-04, 2.9830e-02, 1.2906e-01, ..., 1.6955e-01,\n", - " -1.0748e-04, -6.7757e-04],\n", - " [-1.0651e-03, 3.0923e-01, 1.7742e-01, ..., 1.7128e+00,\n", - " 1.0415e-01, 5.0821e-02],\n", - " [-2.1024e-03, 2.7811e-01, 2.1898e-01, ..., 1.5742e+00,\n", - " -1.4760e-03, -1.1173e-03],\n", - " ...,\n", - " [-6.2942e-04, 2.9830e-02, 1.2906e-01, ..., 1.6955e-01,\n", - " -1.0748e-04, -6.7757e-04],\n", - " [-9.2417e-04, 2.5192e-01, 2.5549e-01, ..., 1.7451e+00,\n", - " 1.5365e-01, 1.2249e-01],\n", - " [-1.4002e-03, 3.1938e-01, 2.2827e-01, ..., 1.6829e+00,\n", - " 6.6612e-02, 1.9162e-03]], device='cuda:0'), 'field_of_study': tensor([[-6.8913e-05, 7.0412e-01, 4.3833e-01, ..., -8.8834e-03,\n", - " 1.7312e-01, 4.2085e-01],\n", - " [ 7.9977e-02, 7.4328e-01, 3.5072e-01, ..., -9.6397e-03,\n", - " 3.9181e-01, 4.0462e-01],\n", - " [ 6.3719e-02, 6.1390e-01, 3.2200e-01, ..., -7.2047e-03,\n", - " 2.4928e-01, 2.5849e-01],\n", - " ...,\n", - " [ 7.4982e-02, 8.3257e-01, 5.4215e-01, ..., -1.0528e-02,\n", - " 2.4078e-01, 5.8190e-01],\n", - " [ 1.0679e-01, 9.7020e-01, 5.6827e-01, ..., -1.1568e-02,\n", - " 5.6805e-01, 3.8809e-01],\n", - " [ 1.0046e-01, 1.0088e+00, 5.8959e-01, ..., -1.3019e-02,\n", - " 6.3601e-01, 3.4751e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 16, 3, 99, 155, 161, 161, 93, 93, 15, 32, 120, 302,\n", - " 327, 322, 470, 609, 503, 890, 438, 738, 738, 725, 935, 885,\n", - " 885, 1040, 847, 896, 916, 906, 1072, 1002, 1089, 1134, 1131, 1131,\n", - " 1131, 1131, 1302, 1528, 1185, 1185, 1319, 1215, 1240, 1240, 1240, 1473,\n", - " 1426, 1473, 1550, 1362, 1680, 1385, 1912, 1717, 1717, 1683, 1709, 1903,\n", - " 1795, 1947, 1707, 1866, 1961, 2008, 1887, 2061, 2070, 2070, 2121, 2116,\n", - " 2156, 2168, 2168, 2180, 2296, 2296, 2296, 2117, 2267, 2267, 2257, 2365,\n", - " 2387, 2387, 2435, 2291, 2291, 2448, 2573, 2573, 2584, 2572, 2709, 2838,\n", - " 2591, 2831, 2831, 3041, 2958, 3043, 3066, 3198, 3272, 3220, 3271, 3417,\n", - " 3450, 3608, 3654, 3663, 3812, 3764, 3735, 3785, 3939, 4263, 4236, 4275,\n", - " 4399, 4399, 4538, 4538, 4538, 4538, 4605, 4524, 4407, 4610, 4430, 4651,\n", - " 4763, 4882, 4882, 4849, 4975, 5339, 5339, 5246, 5246, 5246, 4953, 4953,\n", - " 5000, 5107, 5078, 5106, 5324, 5324, 5384, 5024, 5126, 5033, 5565, 5279,\n", - " 4993, 5184, 5464, 5263, 5263, 5263, 5263, 5263, 5263, 5957, 5334, 5740,\n", - " 5740, 5745, 5480, 5630, 5574, 5870, 5731, 5731, 5684, 6002, 6002, 5479,\n", - " 5479, 5802, 5802, 5875, 5920, 5630, 5630, 5615, 5480, 5827, 5859, 5948],\n", - " [ 55, 10, 21, 82, 21, 33, 27, 80, 112, 17, 72, 90,\n", - " 4, 67, 76, 41, 62, 91, 44, 56, 108, 70, 39, 39,\n", - " 46, 62, 99, 88, 66, 91, 78, 98, 67, 79, 78, 81,\n", - " 61, 40, 82, 83, 78, 61, 29, 102, 50, 109, 43, 96,\n", - " 67, 2, 82, 7, 47, 67, 54, 32, 87, 9, 8, 82,\n", - " 44, 67, 13, 113, 91, 75, 25, 20, 57, 65, 107, 101,\n", - " 82, 5, 21, 49, 15, 35, 58, 99, 55, 54, 11, 9,\n", - " 107, 71, 26, 18, 59, 82, 6, 51, 1, 33, 0, 97,\n", - " 75, 52, 102, 52, 91, 67, 62, 25, 67, 82, 110, 88,\n", - " 67, 74, 82, 99, 86, 85, 19, 19, 73, 53, 12, 93,\n", - " 4, 53, 69, 4, 77, 67, 99, 67, 106, 46, 103, 16,\n", - " 92, 88, 21, 35, 67, 14, 67, 104, 4, 111, 42, 67,\n", - " 31, 4, 4, 4, 19, 28, 4, 3, 4, 4, 4, 4,\n", - " 105, 22, 114, 89, 37, 68, 67, 73, 106, 64, 95, 38,\n", - " 67, 4, 24, 30, 4, 94, 34, 67, 48, 45, 99, 67,\n", - " 60, 84, 63, 95, 21, 67, 100, 23, 67, 67, 67, 36]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 217, 1455, 2055, ..., 5455, 3268, 2435],\n", - " [ 205, 73, 284, ..., 7044, 7011, 7011]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 39, 71, 4, ..., 13, 4, 4],\n", - " [ 139, 150, 28, ..., 5972, 5912, 6022]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 81, 158, 86, ..., 6994, 6950, 6950],\n", - " [ 790, 251, 226, ..., 536, 71, 48]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 415, 290, 230, ..., 374, 714, 194],\n", - " [ 194, 113, 288, ..., 6920, 6985, 6943]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3305, 6559, 5631, ..., 6380, 101, 3145],\n", - " [ 172, 35, 104, ..., 5961, 5976, 5977]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 284, 284, 284, ..., 6950, 6950, 6950],\n", - " [ 784, 1240, 1303, ..., 170, 81, 3874]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 16, 16, 16, ..., 5948, 5948, 5948],\n", - " [5672, 367, 1457, ..., 5288, 5308, 5100]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006024\n", - "sampling 0.005944\n", - "noi time: 0.001978\n", - "get_vertex_data call: 0.038412\n", - "noi group time: 0.003622\n", - "eoi_group_time: 0.017189\n", - "second half: 0.181031\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24187, 20111, 23798, ..., 1120077, 1110069, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24187, 20111, 23798, ..., 1120077, 1110069, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210822, 1217957, 1215981, ..., 1939277, 1929220, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210822, 1217957, 1215981, ..., 1939277, 1929220, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1141424, 1136228, 1140284, 1135716, 1135726, 1135727, 1137784,\n", - " 1140785, 1141758, 1137506, 1142802, 1136154, 1142525, 1136969, 1141443,\n", - " 1154781, 1137271, 1138938, 1145040, 1143372, 1148983, 1150497, 1150509,\n", - " 1142963, 1142958, 1142959, 1155683, 1143810, 1149283, 1144636, 1146996,\n", - " 1146660, 1148546, 1137220, 1147202, 1147211, 1138745, 1134659, 1134667,\n", - " 1140313, 1137829, 1151546, 1140540, 1138112, 1138119, 1154414, 1138366,\n", - " 1153457, 1153463, 1134735, 1140020, 1140946, 1140947, 1140953, 1135367,\n", - " 1135202, 1134969, 1141036, 1136288, 1136301, 1134794, 1157443, 1136517,\n", - " 1143377, 1143389, 1143069, 1135333, 1144395, 1137534, 1157397, 1152376,\n", - " 1136662, 1137441, 1136942, 1135265, 1156159, 1139161, 1141702, 1140707,\n", - " 1138514, 1153099, 1137957, 1137019, 1156899, 1135522, 1135535, 1139684,\n", - " 1138436, 1138440, 1138445, 1138461, 1138449, 1157190, 1136594, 1149328,\n", - " 1135088, 1138697, 1156606, 1147112, 1142611, 1160819, 1135352, 1135355,\n", - " 1135618, 1135631, 1148531, 1148533, 1137109, 1139667, 1139673, 1138067,\n", - " 1138079, 1136094, 1134992, 1136551, 1148805, 1136734, 1158961, 1142909,\n", - " 1159012, 1159019, 1153543, 1143631, 1140034, 1137588, 1155660, 1140558,\n", - " 1152044, 1140660, 1137728, 1147322, 1140901, 1135549, 1141097, 1149001,\n", - " 1139889, 1136384, 1143224, 1139025, 1139033, 1149968, 1149982, 1141681,\n", - " 1135860, 1140467, 1139386, 1163310, 1136917, 1143667, 1160616, 1146449,\n", - " 1141786, 1139495, 1136752, 1141300, 1144650, 1147850, 1142053, 1139274,\n", - " 1142713, 1141479, 1138708, 1142914, 1143107, 1144596, 1136866, 1136867,\n", - " 1135322, 1135327, 1140433, 1144182, 1137606, 1150906, 1161095, 1144865,\n", - " 1146201, 1139559, 1158698, 1158703, 1147153, 1141365, 1153069, 1141664,\n", - " 1149101, 1144279, 1139127, 1140616, 1140979, 1140983, 1140990, 1146695,\n", - " 1147050, 1145873, 1152976, 1152980, 1152988, 1141925, 1141929, 1146901,\n", - " 1144242, 1145339, 1165366, 1150689, 1143851, 1146024, 1142533, 1139990,\n", - " 1143293, 1143294, 1151121, 1147543, 1147540, 1148763, 1147282, 1142816,\n", - " 1149155, 1140348, 1143663, 1139417, 1148003, 1148408, 1136167, 1142586,\n", - " 1157720, 1136836, 1139297, 1144768, 1141496, 1142159, 1143345, 1144615,\n", - " 1145818, 1144081, 1144088, 1135876, 1135818, 1150919, 1146514, 1146526,\n", - " 1138024, 1142003, 1143937, 1140356, 1140360, 1140364, 1149582, 1137990,\n", - " 1143075, 1143082, 1168914, 1144725, 1147984, 1147992, 1147999, 1139252,\n", - " 1139249, 1147131, 1148704, 1142700, 1148468, 1148473, 1153701, 1147056,\n", - " 1147259, 1158226, 1143921, 1145751, 1142369, 1138632, 1146178, 1152530,\n", - " 1152542, 1152537, 1150280, 1150274, 1150438, 1150445, 1151856, 1144526,\n", - " 1151994, 1169717, 1142304, 1151473, 1152031, 1145255, 1140560, 1147019,\n", - " 1141269, 1147764, 1153574, 1154979, 1154991, 1147653, 1149412, 1148288,\n", - " 1148300, 1152073, 1137716, 1139096, 1154420, 1148180, 1152561, 1138404,\n", - " 1141181, 1151557, 1148729, 1144110, 1149810, 1143888, 1148203, 1154168,\n", - " 1153124, 1153192, 1153188, 1145104, 1143092, 1144863, 1150356, 1155102,\n", - " 1143121, 1151811, 1152581, 1151910, 1154190, 1145640, 1148498, 1148505,\n", - " 1146565, 1141420, 1141419, 1147603, 1147737, 1148949, 1146969, 1156402,\n", - " 1153249, 1146623, 1151691, 1151399, 1152407, 1152409, 1154052, 1154058,\n", - " 1152103, 1146280, 1153028, 1153030, 1153026, 1153038, 1150085, 1137746,\n", - " 1152622, 1140527, 1136401, 1152826, 1154123, 1157824, 1154633, 1151573,\n", - " 1151617, 1136134, 1152944, 1152341, 1152344, 1156816, 1153311, 1136028,\n", - " 1156608, 1156619, 1156622, 1151195, 1140678, 1152939, 1151064, 1156387,\n", - " 1156399, 1150106, 1153907, 1153918, 1149272, 1148033, 1148040, 1155202,\n", - " 1152601, 1152602, 1149794, 1144668, 1137048, 1137052, 1177026, 1148628,\n", - " 1158530, 1158540, 1137458, 1153085, 1142047, 1157229, 1135434, 1150871,\n", - " 1148884, 1158916, 1137885, 1156505, 1152397, 1157069, 1157071, 1155422,\n", - " 1152833, 1137814, 1139476, 1150465, 1135729, 1152179, 1152183, 1156629,\n", - " 1156632, 1150824, 1153413, 1153415, 1147818, 1143010, 1151470, 1139525,\n", - " 1158304, 1158306, 1158311, 1140417, 1155441, 1155442, 1153354, 1153359,\n", - " 1154529, 1154536, 1154542, 1145771, 1156921, 1151386, 1151379, 1158639,\n", - " 1155122, 1149321, 1149505, 1153479, 1153486, 1145806, 1156463, 1158096,\n", - " 1154763, 1155620, 1156563, 1154554, 1155576, 1158566, 1158824, 1153715,\n", - " 1155646, 1143263, 1154644, 1154250, 1154240, 1143189, 1143531, 1150371,\n", - " 1150983, 1158117, 1171832, 1156764, 1153786, 1149913, 1159116, 1145682,\n", - " 1145690, 1137316, 1134683, 1135601, 1178445, 1148153, 1150661, 1150659,\n", - " 1158656, 1149145, 1155724, 1144463, 1152220, 1140368, 1140380, 1155971,\n", - " 1155975, 1156958, 1158846, 1155404, 1149700, 1160164, 1136896, 1157296,\n", - " 1158815, 1158447, 1158285, 1151615, 1136494, 1136491, 1164931, 1153640,\n", - " 1142747, 1156494, 1156490, 1153808, 1136646, 1157811, 1153835, 1146126,\n", - " 1165786, 1138099, 1155871, 1161539, 1142666, 1157751, 1167359, 1162683,\n", - " 1158300, 1162044, 1153052, 1153045, 1159738, 1155763, 1155771, 1156235,\n", - " 1138393, 1149070, 1147300, 1142406, 1138161, 1164006, 1156787, 1149963,\n", - " 1164901, 1139592, 1166073, 1157236, 1146063, 1146356, 1184923, 1140643,\n", - " 1143138, 1168168, 1163201, 1141800, 1156181, 1159032, 1165875, 1152247,\n", - " 1143729, 1155588, 1165276, 1147560, 1138674, 1148567, 1144977, 1169646,\n", - " 1146510, 1161243, 1161240, 1144737, 1144747, 1152776, 1166883, 1155048,\n", - " 1163524, 1162580, 1145137, 1161718, 1151650, 1147426, 1147427, 1157050,\n", - " 1149890, 1179982, 1156739, 1166591, 1144810, 1144812, 1162093, 1135567,\n", - " 1142733, 1156293, 1144057, 1145732, 1145743, 1150535, 1170307, 1146432,\n", - " 1143028, 1147355, 1152624, 1139359, 1147723, 1145892, 1145902, 1181040,\n", - " 1143404, 1158724, 1158722, 1154076, 1168756, 1145674, 1179488, 1167817,\n", - " 1150518, 1150526, 1156113, 1144346, 1144336, 1157534, 1135853, 1191396,\n", - " 1154893, 1169162, 1141043, 1169359, 1154364, 1149452, 1138619, 1149688,\n", - " 1158611, 1158623, 1172575, 1173047, 1163292, 1149847, 1165899, 1165903,\n", - " 1154869, 1171479, 1169948, 1155494, 1152353, 1152362, 1143172, 1149402,\n", - " 1148667, 1172129, 1173307, 1154027, 1154028, 1152150, 1153751, 1153754,\n", - " 1157153, 1147708, 1147711, 1151848, 1151850, 1151852, 1157598, 1163772,\n", - " 1166827, 1168352, 1168604, 1146762, 1140326, 1178053, 1150234, 1154151,\n", - " 1154148, 1158176, 1149169, 1149179, 1149173, 1169820, 1178649, 1178610,\n", - " 1168481, 1177659, 1153803, 1153149, 1179721, 1180916, 1151519, 1166554,\n", - " 1178914, 1155262, 1155117, 1157792, 1157795, 1182812, 1171623, 1153898,\n", - " 1161846, 1183461, 1145626, 1156443, 1161068, 1149755, 1146242, 1146252,\n", - " 1181143, 1183342, 1158940, 1158370, 1158381, 1185514, 1157270, 1180930,\n", - " 1168273, 1164798, 1162443, 1164231, 1181329, 1181331, 1156162, 1170034,\n", - " 1193451, 1167665, 1164133, 1163624, 1156532, 1139831, 1139837, 1150265,\n", - " 1149668, 1192076, 1163848, 1156055, 1173058, 1176506, 1183196, 1191963,\n", - " 1184795, 1188780, 1178985, 1151762, 1171458, 1152113, 1169781, 1169707,\n", - " 1191323, 1158064, 1158067, 1158070, 1193396, 1189360, 1191760, 1167460,\n", - " 1184942], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1141424, 1136228, 1140284, 1135716, 1135726, 1135727, 1137784,\n", - " 1140785, 1141758, 1137506, 1142802, 1136154, 1142525, 1136969, 1141443,\n", - " 1154781, 1137271, 1138938, 1145040, 1143372, 1148983, 1150497, 1150509,\n", - " 1142963, 1142958, 1142959, 1155683, 1143810, 1149283, 1144636, 1146996,\n", - " 1146660, 1148546, 1137220, 1147202, 1147211, 1138745, 1134659, 1134667,\n", - " 1140313, 1137829, 1151546, 1140540, 1138112, 1138119, 1154414, 1138366,\n", - " 1153457, 1153463, 1134735, 1140020, 1140946, 1140947, 1140953, 1135367,\n", - " 1135202, 1134969, 1141036, 1136288, 1136301, 1134794, 1157443, 1136517,\n", - " 1143377, 1143389, 1143069, 1135333, 1144395, 1137534, 1157397, 1152376,\n", - " 1136662, 1137441, 1136942, 1135265, 1156159, 1139161, 1141702, 1140707,\n", - " 1138514, 1153099, 1137957, 1137019, 1156899, 1135522, 1135535, 1139684,\n", - " 1138436, 1138440, 1138445, 1138461, 1138449, 1157190, 1136594, 1149328,\n", - " 1135088, 1138697, 1156606, 1147112, 1142611, 1160819, 1135352, 1135355,\n", - " 1135618, 1135631, 1148531, 1148533, 1137109, 1139667, 1139673, 1138067,\n", - " 1138079, 1136094, 1134992, 1136551, 1148805, 1136734, 1158961, 1142909,\n", - " 1159012, 1159019, 1153543, 1143631, 1140034, 1137588, 1155660, 1140558,\n", - " 1152044, 1140660, 1137728, 1147322, 1140901, 1135549, 1141097, 1149001,\n", - " 1139889, 1136384, 1143224, 1139025, 1139033, 1149968, 1149982, 1141681,\n", - " 1135860, 1140467, 1139386, 1163310, 1136917, 1143667, 1160616, 1146449,\n", - " 1141786, 1139495, 1136752, 1141300, 1144650, 1147850, 1142053, 1139274,\n", - " 1142713, 1141479, 1138708, 1142914, 1143107, 1144596, 1136866, 1136867,\n", - " 1135322, 1135327, 1140433, 1144182, 1137606, 1150906, 1161095, 1144865,\n", - " 1146201, 1139559, 1158698, 1158703, 1147153, 1141365, 1153069, 1141664,\n", - " 1149101, 1144279, 1139127, 1140616, 1140979, 1140983, 1140990, 1146695,\n", - " 1147050, 1145873, 1152976, 1152980, 1152988, 1141925, 1141929, 1146901,\n", - " 1144242, 1145339, 1165366, 1150689, 1143851, 1146024, 1142533, 1139990,\n", - " 1143293, 1143294, 1151121, 1147543, 1147540, 1148763, 1147282, 1142816,\n", - " 1149155, 1140348, 1143663, 1139417, 1148003, 1148408, 1136167, 1142586,\n", - " 1157720, 1136836, 1139297, 1144768, 1141496, 1142159, 1143345, 1144615,\n", - " 1145818, 1144081, 1144088, 1135876, 1135818, 1150919, 1146514, 1146526,\n", - " 1138024, 1142003, 1143937, 1140356, 1140360, 1140364, 1149582, 1137990,\n", - " 1143075, 1143082, 1168914, 1144725, 1147984, 1147992, 1147999, 1139252,\n", - " 1139249, 1147131, 1148704, 1142700, 1148468, 1148473, 1153701, 1147056,\n", - " 1147259, 1158226, 1143921, 1145751, 1142369, 1138632, 1146178, 1152530,\n", - " 1152542, 1152537, 1150280, 1150274, 1150438, 1150445, 1151856, 1144526,\n", - " 1151994, 1169717, 1142304, 1151473, 1152031, 1145255, 1140560, 1147019,\n", - " 1141269, 1147764, 1153574, 1154979, 1154991, 1147653, 1149412, 1148288,\n", - " 1148300, 1152073, 1137716, 1139096, 1154420, 1148180, 1152561, 1138404,\n", - " 1141181, 1151557, 1148729, 1144110, 1149810, 1143888, 1148203, 1154168,\n", - " 1153124, 1153192, 1153188, 1145104, 1143092, 1144863, 1150356, 1155102,\n", - " 1143121, 1151811, 1152581, 1151910, 1154190, 1145640, 1148498, 1148505,\n", - " 1146565, 1141420, 1141419, 1147603, 1147737, 1148949, 1146969, 1156402,\n", - " 1153249, 1146623, 1151691, 1151399, 1152407, 1152409, 1154052, 1154058,\n", - " 1152103, 1146280, 1153028, 1153030, 1153026, 1153038, 1150085, 1137746,\n", - " 1152622, 1140527, 1136401, 1152826, 1154123, 1157824, 1154633, 1151573,\n", - " 1151617, 1136134, 1152944, 1152341, 1152344, 1156816, 1153311, 1136028,\n", - " 1156608, 1156619, 1156622, 1151195, 1140678, 1152939, 1151064, 1156387,\n", - " 1156399, 1150106, 1153907, 1153918, 1149272, 1148033, 1148040, 1155202,\n", - " 1152601, 1152602, 1149794, 1144668, 1137048, 1137052, 1177026, 1148628,\n", - " 1158530, 1158540, 1137458, 1153085, 1142047, 1157229, 1135434, 1150871,\n", - " 1148884, 1158916, 1137885, 1156505, 1152397, 1157069, 1157071, 1155422,\n", - " 1152833, 1137814, 1139476, 1150465, 1135729, 1152179, 1152183, 1156629,\n", - " 1156632, 1150824, 1153413, 1153415, 1147818, 1143010, 1151470, 1139525,\n", - " 1158304, 1158306, 1158311, 1140417, 1155441, 1155442, 1153354, 1153359,\n", - " 1154529, 1154536, 1154542, 1145771, 1156921, 1151386, 1151379, 1158639,\n", - " 1155122, 1149321, 1149505, 1153479, 1153486, 1145806, 1156463, 1158096,\n", - " 1154763, 1155620, 1156563, 1154554, 1155576, 1158566, 1158824, 1153715,\n", - " 1155646, 1143263, 1154644, 1154250, 1154240, 1143189, 1143531, 1150371,\n", - " 1150983, 1158117, 1171832, 1156764, 1153786, 1149913, 1159116, 1145682,\n", - " 1145690, 1137316, 1134683, 1135601, 1178445, 1148153, 1150661, 1150659,\n", - " 1158656, 1149145, 1155724, 1144463, 1152220, 1140368, 1140380, 1155971,\n", - " 1155975, 1156958, 1158846, 1155404, 1149700, 1160164, 1136896, 1157296,\n", - " 1158815, 1158447, 1158285, 1151615, 1136494, 1136491, 1164931, 1153640,\n", - " 1142747, 1156494, 1156490, 1153808, 1136646, 1157811, 1153835, 1146126,\n", - " 1165786, 1138099, 1155871, 1161539, 1142666, 1157751, 1167359, 1162683,\n", - " 1158300, 1162044, 1153052, 1153045, 1159738, 1155763, 1155771, 1156235,\n", - " 1138393, 1149070, 1147300, 1142406, 1138161, 1164006, 1156787, 1149963,\n", - " 1164901, 1139592, 1166073, 1157236, 1146063, 1146356, 1184923, 1140643,\n", - " 1143138, 1168168, 1163201, 1141800, 1156181, 1159032, 1165875, 1152247,\n", - " 1143729, 1155588, 1165276, 1147560, 1138674, 1148567, 1144977, 1169646,\n", - " 1146510, 1161243, 1161240, 1144737, 1144747, 1152776, 1166883, 1155048,\n", - " 1163524, 1162580, 1145137, 1161718, 1151650, 1147426, 1147427, 1157050,\n", - " 1149890, 1179982, 1156739, 1166591, 1144810, 1144812, 1162093, 1135567,\n", - " 1142733, 1156293, 1144057, 1145732, 1145743, 1150535, 1170307, 1146432,\n", - " 1143028, 1147355, 1152624, 1139359, 1147723, 1145892, 1145902, 1181040,\n", - " 1143404, 1158724, 1158722, 1154076, 1168756, 1145674, 1179488, 1167817,\n", - " 1150518, 1150526, 1156113, 1144346, 1144336, 1157534, 1135853, 1191396,\n", - " 1154893, 1169162, 1141043, 1169359, 1154364, 1149452, 1138619, 1149688,\n", - " 1158611, 1158623, 1172575, 1173047, 1163292, 1149847, 1165899, 1165903,\n", - " 1154869, 1171479, 1169948, 1155494, 1152353, 1152362, 1143172, 1149402,\n", - " 1148667, 1172129, 1173307, 1154027, 1154028, 1152150, 1153751, 1153754,\n", - " 1157153, 1147708, 1147711, 1151848, 1151850, 1151852, 1157598, 1163772,\n", - " 1166827, 1168352, 1168604, 1146762, 1140326, 1178053, 1150234, 1154151,\n", - " 1154148, 1158176, 1149169, 1149179, 1149173, 1169820, 1178649, 1178610,\n", - " 1168481, 1177659, 1153803, 1153149, 1179721, 1180916, 1151519, 1166554,\n", - " 1178914, 1155262, 1155117, 1157792, 1157795, 1182812, 1171623, 1153898,\n", - " 1161846, 1183461, 1145626, 1156443, 1161068, 1149755, 1146242, 1146252,\n", - " 1181143, 1183342, 1158940, 1158370, 1158381, 1185514, 1157270, 1180930,\n", - " 1168273, 1164798, 1162443, 1164231, 1181329, 1181331, 1156162, 1170034,\n", - " 1193451, 1167665, 1164133, 1163624, 1156532, 1139831, 1139837, 1150265,\n", - " 1149668, 1192076, 1163848, 1156055, 1173058, 1176506, 1183196, 1191963,\n", - " 1184795, 1188780, 1178985, 1151762, 1171458, 1152113, 1169781, 1169707,\n", - " 1191323, 1158064, 1158067, 1158070, 1193396, 1189360, 1191760, 1167460,\n", - " 1184942], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199282, 1202255, 1198844, 1198845, 1201582, 1199145, 1194626, 1197777,\n", - " 1201016, 1198690, 1198702, 1202803, 1197512, 1194866, 1194743, 1198180,\n", - " 1194783, 1194782, 1195491, 1195494, 1196631, 1195514, 1195263, 1196539,\n", - " 1201992, 1198095, 1195732, 1195740, 1196334, 1196359, 1196517, 1194759,\n", - " 1195313, 1196840, 1198262, 1196237, 1195571, 1195982, 1198958, 1196711,\n", - " 1199823, 1195145, 1195148, 1195216, 1195265, 1195270, 1195278, 1197141,\n", - " 1196242, 1197374, 1197273, 1198219, 1198915, 1199314, 1197478, 1199998,\n", - " 1197253, 1197640, 1198277, 1200949, 1199060, 1197286, 1198679, 1194928,\n", - " 1197577, 1199628, 1202448, 1199154, 1199231, 1201917, 1195017, 1199676,\n", - " 1199847, 1200668, 1197977, 1196727, 1202618, 1200887, 1198428, 1199552,\n", - " 1200570, 1200169, 1200503, 1198066, 1201421, 1201075, 1202630, 1202632,\n", - " 1201056, 1202640, 1200363, 1200521, 1200345, 1197040, 1201442, 1202239,\n", - " 1202337, 1197546, 1198478, 1203329, 1202209, 1196960, 1196966, 1200997,\n", - " 1199606, 1198518, 1198929, 1198932, 1198909, 1195418, 1195421, 1195181,\n", - " 1200928, 1196414, 1198127, 1196597, 1196605, 1201971, 1200585, 1196786,\n", - " 1197735, 1198819, 1201196, 1200974, 1201877, 1198751], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199282, 1202255, 1198844, 1198845, 1201582, 1199145, 1194626, 1197777,\n", - " 1201016, 1198690, 1198702, 1202803, 1197512, 1194866, 1194743, 1198180,\n", - " 1194783, 1194782, 1195491, 1195494, 1196631, 1195514, 1195263, 1196539,\n", - " 1201992, 1198095, 1195732, 1195740, 1196334, 1196359, 1196517, 1194759,\n", - " 1195313, 1196840, 1198262, 1196237, 1195571, 1195982, 1198958, 1196711,\n", - " 1199823, 1195145, 1195148, 1195216, 1195265, 1195270, 1195278, 1197141,\n", - " 1196242, 1197374, 1197273, 1198219, 1198915, 1199314, 1197478, 1199998,\n", - " 1197253, 1197640, 1198277, 1200949, 1199060, 1197286, 1198679, 1194928,\n", - " 1197577, 1199628, 1202448, 1199154, 1199231, 1201917, 1195017, 1199676,\n", - " 1199847, 1200668, 1197977, 1196727, 1202618, 1200887, 1198428, 1199552,\n", - " 1200570, 1200169, 1200503, 1198066, 1201421, 1201075, 1202630, 1202632,\n", - " 1201056, 1202640, 1200363, 1200521, 1200345, 1197040, 1201442, 1202239,\n", - " 1202337, 1197546, 1198478, 1203329, 1202209, 1196960, 1196966, 1200997,\n", - " 1199606, 1198518, 1198929, 1198932, 1198909, 1195418, 1195421, 1195181,\n", - " 1200928, 1196414, 1198127, 1196597, 1196605, 1201971, 1200585, 1196786,\n", - " 1197735, 1198819, 1201196, 1200974, 1201877, 1198751], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 1.5291e-01, 1.2206e-02, 8.0802e-01, ..., 1.3525e-01,\n", - " -1.7004e-03, -5.1159e-03],\n", - " [ 2.2953e-01, -4.5560e-04, 9.3357e-01, ..., 1.1083e-01,\n", - " -1.7938e-03, -6.1541e-03],\n", - " [ 1.4730e-01, 3.6429e-02, 7.4573e-01, ..., 1.4571e-01,\n", - " -1.4791e-03, -4.8095e-03],\n", - " ...,\n", - " [ 1.8991e-01, -3.3320e-04, 9.0735e-01, ..., 1.1272e-01,\n", - " -1.7913e-03, -5.8140e-03],\n", - " [ 1.1506e-01, -1.0815e-04, 7.1086e-01, ..., 1.2739e-01,\n", - " -1.8114e-03, -4.4944e-03],\n", - " [ 2.2454e-01, -4.0989e-04, 9.4806e-01, ..., 1.1853e-01,\n", - " -1.7803e-03, -6.1966e-03]], device='cuda:0'), 'paper': tensor([[ 1.7697e+00, 1.9351e+00, 2.9037e+00, ..., 4.3553e-01,\n", - " -3.5942e-02, 2.0156e+00],\n", - " [ 6.7382e-01, 9.8011e-01, 1.4826e+00, ..., -5.1858e-03,\n", - " -1.8106e-02, 1.0411e-01],\n", - " [ 5.9057e-01, 1.4252e+00, 2.2981e+00, ..., -5.4715e-03,\n", - " -2.2800e-02, -1.3712e-03],\n", - " ...,\n", - " [ 1.2913e+00, 2.3057e+00, 2.3877e+00, ..., -1.3692e-02,\n", - " -3.0207e-02, 6.2882e-02],\n", - " [ 1.5393e+00, 2.2469e+00, 2.6563e+00, ..., 3.9629e-01,\n", - " -2.9753e-02, 1.9262e+00],\n", - " [ 1.7953e+00, 1.4894e+00, 3.3565e+00, ..., 2.4746e+00,\n", - " -5.7183e-02, 4.0522e+00]], device='cuda:0'), 'author': tensor([[-1.0491e-03, 2.6344e-01, 1.8689e-01, ..., 1.6956e+00,\n", - " 1.8640e-01, 4.3199e-02],\n", - " [-3.3006e-03, 4.2542e-01, 2.8417e-01, ..., 1.5207e+00,\n", - " -2.4040e-03, -2.1435e-03],\n", - " [-1.6879e-03, 3.2628e-01, 2.2934e-01, ..., 1.6603e+00,\n", - " -8.0075e-04, -2.7147e-04],\n", - " ...,\n", - " [-2.3853e-03, 2.9674e-01, 2.2471e-01, ..., 1.5635e+00,\n", - " -1.6731e-03, -1.3464e-03],\n", - " [-7.1789e-04, 1.3095e-01, 3.2230e-01, ..., 1.7951e+00,\n", - " 1.2089e-01, 6.3322e-02],\n", - " [-3.4376e-04, 2.2838e-01, 1.2376e-01, ..., 1.8094e+00,\n", - " 2.9255e-01, 1.7058e-01]], device='cuda:0'), 'field_of_study': tensor([[ 0.0820, 0.7518, 0.5370, ..., -0.0083, 0.2186, 0.4126],\n", - " [ 0.0701, 0.6611, 0.3249, ..., -0.0084, 0.2881, 0.3409],\n", - " [ 0.0627, 0.8266, 0.5090, ..., -0.0090, 0.2885, 0.4716],\n", - " ...,\n", - " [ 0.0485, 0.6608, 0.3503, ..., -0.0069, 0.3886, 0.2848],\n", - " [ 0.0505, 0.7737, 0.4831, ..., -0.0099, 0.2539, 0.5047],\n", - " [ 0.0742, 0.9372, 0.5955, ..., -0.0117, 0.3814, 0.6117]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 198, 159, 159, 276, 271, 216, 284, 336, 421, 421, 421, 1002,\n", - " 1042, 682, 947, 801, 405, 644, 590, 589, 724, 743, 852, 949,\n", - " 1180, 1180, 1268, 1091, 1086, 1179, 1564, 1346, 1436, 1505, 1516, 1585,\n", - " 1638, 1682, 1698, 1645, 1754, 1562, 1562, 1657, 1590, 1563, 1712, 1702,\n", - " 1929, 1927, 1924, 1966, 2118, 2150, 2003, 2003, 2290, 2099, 2093, 2146,\n", - " 2351, 2481, 2448, 2475, 2405, 2581, 2667, 2689, 2507, 2717, 2717, 2796,\n", - " 2731, 2731, 3038, 3072, 3167, 3130, 3130, 3241, 3241, 3250, 3186, 3186,\n", - " 3255, 3255, 3547, 3310, 3310, 3469, 3469, 3442, 3469, 3469, 3481, 3760,\n", - " 3774, 3746, 3668, 3978, 3889, 3608, 3832, 3910, 3910, 4005, 4168, 4215,\n", - " 4214, 4250, 4250, 4271, 4338, 4508, 4477, 4477, 4577, 4660, 4783, 4660,\n", - " 4550, 4884, 4939, 4803, 4935, 4981, 4931, 4863, 4863, 4863, 5119, 5063,\n", - " 5145, 5145, 5227, 5227, 5205, 5163, 5209, 5224, 5224, 5410, 5410, 5326,\n", - " 5358, 5551, 5551, 5217, 5333, 5415, 5415, 5455, 5455, 5446, 5982, 5982,\n", - " 5734, 5734, 5734, 5393, 5778, 5778, 5578, 5501, 5632, 6239, 6022, 5803,\n", - " 5803, 5578, 5722, 5784, 5784, 6440, 6440, 5843, 5843, 6104, 6098, 6098,\n", - " 6098, 6073, 5943, 6026, 6062, 6254, 6362, 6164, 6276, 6276, 6299, 6325,\n", - " 6405],\n", - " [ 86, 0, 115, 60, 39, 57, 4, 31, 13, 107, 95, 52,\n", - " 35, 74, 5, 0, 3, 123, 98, 114, 42, 104, 30, 25,\n", - " 35, 12, 101, 53, 123, 124, 84, 18, 107, 57, 90, 32,\n", - " 85, 78, 76, 17, 64, 37, 113, 90, 83, 119, 46, 85,\n", - " 21, 112, 67, 118, 75, 75, 63, 68, 57, 1, 9, 6,\n", - " 105, 97, 96, 32, 52, 84, 50, 111, 56, 43, 34, 3,\n", - " 40, 108, 94, 58, 0, 55, 32, 19, 15, 68, 87, 24,\n", - " 26, 117, 57, 20, 78, 28, 70, 82, 65, 94, 0, 39,\n", - " 68, 0, 64, 84, 33, 68, 100, 45, 66, 14, 59, 110,\n", - " 102, 74, 93, 7, 22, 27, 43, 34, 61, 6, 75, 91,\n", - " 68, 8, 22, 30, 121, 75, 8, 33, 47, 73, 99, 38,\n", - " 123, 7, 92, 103, 69, 109, 106, 62, 2, 89, 86, 120,\n", - " 54, 99, 71, 72, 49, 88, 75, 43, 34, 57, 51, 75,\n", - " 39, 16, 116, 104, 8, 75, 122, 46, 75, 81, 75, 44,\n", - " 75, 76, 11, 27, 75, 41, 75, 10, 75, 36, 48, 80,\n", - " 75, 123, 25, 23, 75, 29, 125, 60, 77, 75, 20, 22,\n", - " 79]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 889, 1306, 1817, ..., 1154, 4225, 5745],\n", - " [ 63, 31, 75, ..., 6321, 6470, 6509]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 76, 24, 57, ..., 118, 68, 43],\n", - " [ 148, 15, 71, ..., 6471, 6283, 6462]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 96, 96, 96, ..., 6418, 6418, 6418],\n", - " [ 201, 391, 488, ..., 318, 344, 362]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 289, 391, 258, ..., 289, 399, 739],\n", - " [ 253, 220, 317, ..., 6489, 6451, 6346]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 401, 829, 1521, ..., 6387, 5368, 5254],\n", - " [ 72, 72, 33, ..., 6393, 6379, 6405]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 96, 96, 96, ..., 6514, 6514, 6514],\n", - " [2327, 1206, 1575, ..., 5314, 4720, 4747]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 28, 28, 28, ..., 6405, 6405, 6405],\n", - " [5715, 5680, 6099, ..., 5571, 5254, 5436]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005681\n", - "sampling 0.005529\n", - "noi time: 0.001608\n", - "get_vertex_data call: 0.026152\n", - "noi group time: 0.002546\n", - "eoi_group_time: 0.013353\n", - "second half: 0.192122\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 1902, 31145, 24187, ..., 1131756, 1133072, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 1902, 31145, 24187, ..., 1131756, 1133072, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1231438, 1203800, 1223056, ..., 1933659, 1929219, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1231438, 1203800, 1223056, ..., 1933659, 1929219, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136225, 1136231, 1140285, 1135926, 1140799, 1141756, 1141758, 1138335,\n", - " 1141251, 1141250, 1142813, 1136965, 1136969, 1141443, 1146803, 1143600,\n", - " 1149826, 1149831, 1139811, 1139141, 1146647, 1139865, 1153938, 1135251,\n", - " 1149038, 1146995, 1147000, 1147102, 1155014, 1155019, 1152427, 1137254,\n", - " 1149457, 1149461, 1134735, 1140020, 1135367, 1135202, 1140767, 1134975,\n", - " 1141036, 1136777, 1134794, 1157443, 1138504, 1137329, 1157088, 1137693,\n", - " 1144787, 1144395, 1137534, 1135408, 1136714, 1157393, 1136662, 1137441,\n", - " 1143321, 1156149, 1156159, 1148484, 1134841, 1135583, 1142593, 1141084,\n", - " 1136097, 1155081, 1140970, 1137957, 1158136, 1135494, 1135499, 1136978,\n", - " 1135522, 1139684, 1138305, 1137287, 1136352, 1157703, 1138436, 1138461,\n", - " 1137491, 1154790, 1137924, 1149328, 1138845, 1156603, 1156606, 1147112,\n", - " 1142611, 1135359, 1145842, 1150948, 1137109, 1141533, 1138079, 1142243,\n", - " 1134992, 1159019, 1141070, 1153543, 1153544, 1140034, 1139087, 1139933,\n", - " 1139927, 1138148, 1141963, 1141966, 1155661, 1152044, 1137728, 1147313,\n", - " 1134742, 1134750, 1137005, 1136700, 1141088, 1141095, 1141097, 1141098,\n", - " 1149003, 1154855, 1154860, 1143711, 1143221, 1140007, 1146832, 1146847,\n", - " 1154467, 1139436, 1141223, 1141901, 1139386, 1143673, 1137186, 1141161,\n", - " 1146452, 1138785, 1144941, 1168566, 1134979, 1144428, 1138490, 1141821,\n", - " 1158749, 1138473, 1138706, 1138713, 1138715, 1138708, 1142914, 1143111,\n", - " 1144596, 1136867, 1145298, 1135322, 1144182, 1139559, 1137854, 1147153,\n", - " 1136376, 1136371, 1141367, 1149090, 1153556, 1139510, 1139763, 1143779,\n", - " 1164531, 1140990, 1135046, 1147050, 1147045, 1145873, 1155826, 1149876,\n", - " 1152976, 1139003, 1141925, 1144242, 1140585, 1148313, 1136885, 1139392,\n", - " 1143637, 1137571, 1145983, 1143851, 1136275, 1142098, 1146024, 1146141,\n", - " 1141585, 1142533, 1139990, 1143283, 1143294, 1151128, 1147540, 1147282,\n", - " 1142829, 1142816, 1143652, 1142635, 1142637, 1149608, 1143051, 1148414,\n", - " 1142578, 1157720, 1136836, 1136843, 1146099, 1139297, 1139301, 1139329,\n", - " 1143345, 1144766, 1144753, 1144615, 1140844, 1135874, 1150294, 1146514,\n", - " 1146523, 1143960, 1138024, 1143456, 1144291, 1144298, 1144568, 1143937,\n", - " 1147574, 1143803, 1147521, 1140364, 1137990, 1144222, 1147984, 1147999,\n", - " 1134899, 1134902, 1144013, 1147244, 1148704, 1148719, 1150996, 1141314,\n", - " 1141836, 1146742, 1152328, 1143434, 1149718, 1147033, 1142858, 1158226,\n", - " 1141137, 1154526, 1145240, 1145750, 1145751, 1142376, 1138626, 1138638,\n", - " 1146178, 1151242, 1150445, 1149791, 1144521, 1141349, 1150348, 1150341,\n", - " 1165252, 1165253, 1147794, 1151473, 1151050, 1139919, 1146723, 1147009,\n", - " 1141949, 1150744, 1167220, 1147764, 1149996, 1154985, 1147653, 1152073,\n", - " 1135083, 1151421, 1154420, 1148180, 1152561, 1136247, 1139721, 1139718,\n", - " 1146686, 1138409, 1141181, 1157983, 1148720, 1148724, 1148729, 1166304,\n", - " 1153179, 1171943, 1153124, 1153188, 1153197, 1145104, 1173078, 1143129,\n", - " 1147442, 1135311, 1148498, 1141420, 1151351, 1148949, 1146969, 1146967,\n", - " 1146616, 1146623, 1142986, 1135688, 1152849, 1152097, 1152099, 1156325,\n", - " 1153039, 1137746, 1137755, 1146304, 1155137, 1155337, 1157842, 1154638,\n", - " 1139575, 1151617, 1150586, 1136131, 1144533, 1140929, 1152903, 1151298,\n", - " 1152341, 1153302, 1153310, 1138281, 1156001, 1136028, 1158704, 1156608,\n", - " 1140682, 1140674, 1152928, 1153909, 1150161, 1144016, 1148040, 1155202,\n", - " 1149300, 1145656, 1144661, 1137048, 1148628, 1158530, 1158540, 1137458,\n", - " 1154378, 1157547, 1158912, 1158924, 1154929, 1156505, 1157064, 1155422,\n", - " 1150465, 1142221, 1135729, 1135730, 1156638, 1150824, 1158304, 1158308,\n", - " 1158311, 1155441, 1150130, 1150136, 1162117, 1154530, 1154528, 1153999,\n", - " 1142758, 1151380, 1151379, 1137918, 1158639, 1140187, 1140186, 1155122,\n", - " 1152527, 1157183, 1156463, 1158096, 1155675, 1155628, 1154555, 1158574,\n", - " 1158824, 1158325, 1156994, 1148835, 1155646, 1154644, 1161287, 1154902,\n", - " 1154909, 1143189, 1153322, 1157430, 1150984, 1150987, 1155293, 1143517,\n", - " 1157288, 1137152, 1180900, 1159006, 1149907, 1158193, 1159116, 1134677,\n", - " 1135601, 1135614, 1148147, 1150661, 1150671, 1155854, 1155848, 1158665,\n", - " 1157685, 1157684, 1146323, 1149145, 1140634, 1156693, 1140380, 1140374,\n", - " 1159131, 1159132, 1159120, 1163681, 1160428, 1155975, 1158841, 1156812,\n", - " 1154600, 1161300, 1180777, 1136899, 1136905, 1158753, 1140218, 1158436,\n", - " 1158442, 1158285, 1151615, 1136487, 1136494, 1155309, 1156490, 1153808,\n", - " 1136642, 1134757, 1158558, 1153827, 1146126, 1138101, 1150011, 1155521,\n", - " 1161539, 1142666, 1159070, 1159141, 1142427, 1153052, 1173005, 1156235,\n", - " 1153842, 1138384, 1138393, 1150046, 1149063, 1145948, 1155479, 1153519,\n", - " 1156787, 1149956, 1136806, 1162744, 1140729, 1169315, 1157357, 1164430,\n", - " 1158461, 1140135, 1140641, 1140650, 1140643, 1143139, 1159632, 1163201,\n", - " 1154285, 1141800, 1169108, 1160335, 1138674, 1153924, 1148571, 1149015,\n", - " 1167682, 1144737, 1141471, 1141459, 1147427, 1163798, 1156737, 1156739,\n", - " 1166591, 1144810, 1144812, 1135567, 1165716, 1162613, 1148683, 1145567,\n", - " 1154700, 1147676, 1150531, 1144973, 1165756, 1170506, 1152624, 1148124,\n", - " 1145892, 1145900, 1145902, 1168659, 1152203, 1175240, 1187284, 1158724,\n", - " 1158734, 1154076, 1168754, 1147330, 1169602, 1171982, 1166653, 1169224,\n", - " 1155172, 1150518, 1177236, 1144346, 1157534, 1138378, 1154670, 1152998,\n", - " 1169154, 1138129, 1141043, 1169359, 1150027, 1154353, 1154354, 1149447,\n", - " 1138609, 1158611, 1158623, 1149847, 1160135, 1155494, 1152353, 1152362,\n", - " 1192131, 1149395, 1173307, 1188761, 1169144, 1154027, 1152150, 1153751,\n", - " 1159658, 1159655, 1167857, 1151704, 1157153, 1157373, 1147711, 1157593,\n", - " 1135018, 1160984, 1177614, 1140326, 1166351, 1160150, 1171614, 1153428,\n", - " 1170554, 1169083, 1171817, 1171823, 1179560, 1150234, 1154148, 1158176,\n", - " 1149169, 1169821, 1182416, 1143420, 1153803, 1161024, 1161039, 1172314,\n", - " 1180915, 1184093, 1162129, 1159913, 1177581, 1157792, 1157795, 1143343,\n", - " 1171623, 1171380, 1158249, 1158253, 1153902, 1145597, 1145626, 1172024,\n", - " 1161911, 1155990, 1158512, 1158934, 1155892, 1155899, 1171590, 1170625,\n", - " 1169062, 1169064, 1168886, 1165478, 1165487, 1179125, 1190103, 1147172,\n", - " 1147182, 1141506, 1183983, 1139831, 1139837, 1150262, 1163848, 1156055,\n", - " 1173065, 1186653, 1189624, 1185009, 1169963, 1193786, 1189256, 1171116,\n", - " 1162502, 1171713, 1153585, 1185165, 1189650, 1177850, 1150406, 1180999,\n", - " 1172423, 1158064, 1158070, 1145392, 1174606, 1183149, 1155962, 1187854,\n", - " 1183804, 1178306, 1192792], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136225, 1136231, 1140285, 1135926, 1140799, 1141756, 1141758, 1138335,\n", - " 1141251, 1141250, 1142813, 1136965, 1136969, 1141443, 1146803, 1143600,\n", - " 1149826, 1149831, 1139811, 1139141, 1146647, 1139865, 1153938, 1135251,\n", - " 1149038, 1146995, 1147000, 1147102, 1155014, 1155019, 1152427, 1137254,\n", - " 1149457, 1149461, 1134735, 1140020, 1135367, 1135202, 1140767, 1134975,\n", - " 1141036, 1136777, 1134794, 1157443, 1138504, 1137329, 1157088, 1137693,\n", - " 1144787, 1144395, 1137534, 1135408, 1136714, 1157393, 1136662, 1137441,\n", - " 1143321, 1156149, 1156159, 1148484, 1134841, 1135583, 1142593, 1141084,\n", - " 1136097, 1155081, 1140970, 1137957, 1158136, 1135494, 1135499, 1136978,\n", - " 1135522, 1139684, 1138305, 1137287, 1136352, 1157703, 1138436, 1138461,\n", - " 1137491, 1154790, 1137924, 1149328, 1138845, 1156603, 1156606, 1147112,\n", - " 1142611, 1135359, 1145842, 1150948, 1137109, 1141533, 1138079, 1142243,\n", - " 1134992, 1159019, 1141070, 1153543, 1153544, 1140034, 1139087, 1139933,\n", - " 1139927, 1138148, 1141963, 1141966, 1155661, 1152044, 1137728, 1147313,\n", - " 1134742, 1134750, 1137005, 1136700, 1141088, 1141095, 1141097, 1141098,\n", - " 1149003, 1154855, 1154860, 1143711, 1143221, 1140007, 1146832, 1146847,\n", - " 1154467, 1139436, 1141223, 1141901, 1139386, 1143673, 1137186, 1141161,\n", - " 1146452, 1138785, 1144941, 1168566, 1134979, 1144428, 1138490, 1141821,\n", - " 1158749, 1138473, 1138706, 1138713, 1138715, 1138708, 1142914, 1143111,\n", - " 1144596, 1136867, 1145298, 1135322, 1144182, 1139559, 1137854, 1147153,\n", - " 1136376, 1136371, 1141367, 1149090, 1153556, 1139510, 1139763, 1143779,\n", - " 1164531, 1140990, 1135046, 1147050, 1147045, 1145873, 1155826, 1149876,\n", - " 1152976, 1139003, 1141925, 1144242, 1140585, 1148313, 1136885, 1139392,\n", - " 1143637, 1137571, 1145983, 1143851, 1136275, 1142098, 1146024, 1146141,\n", - " 1141585, 1142533, 1139990, 1143283, 1143294, 1151128, 1147540, 1147282,\n", - " 1142829, 1142816, 1143652, 1142635, 1142637, 1149608, 1143051, 1148414,\n", - " 1142578, 1157720, 1136836, 1136843, 1146099, 1139297, 1139301, 1139329,\n", - " 1143345, 1144766, 1144753, 1144615, 1140844, 1135874, 1150294, 1146514,\n", - " 1146523, 1143960, 1138024, 1143456, 1144291, 1144298, 1144568, 1143937,\n", - " 1147574, 1143803, 1147521, 1140364, 1137990, 1144222, 1147984, 1147999,\n", - " 1134899, 1134902, 1144013, 1147244, 1148704, 1148719, 1150996, 1141314,\n", - " 1141836, 1146742, 1152328, 1143434, 1149718, 1147033, 1142858, 1158226,\n", - " 1141137, 1154526, 1145240, 1145750, 1145751, 1142376, 1138626, 1138638,\n", - " 1146178, 1151242, 1150445, 1149791, 1144521, 1141349, 1150348, 1150341,\n", - " 1165252, 1165253, 1147794, 1151473, 1151050, 1139919, 1146723, 1147009,\n", - " 1141949, 1150744, 1167220, 1147764, 1149996, 1154985, 1147653, 1152073,\n", - " 1135083, 1151421, 1154420, 1148180, 1152561, 1136247, 1139721, 1139718,\n", - " 1146686, 1138409, 1141181, 1157983, 1148720, 1148724, 1148729, 1166304,\n", - " 1153179, 1171943, 1153124, 1153188, 1153197, 1145104, 1173078, 1143129,\n", - " 1147442, 1135311, 1148498, 1141420, 1151351, 1148949, 1146969, 1146967,\n", - " 1146616, 1146623, 1142986, 1135688, 1152849, 1152097, 1152099, 1156325,\n", - " 1153039, 1137746, 1137755, 1146304, 1155137, 1155337, 1157842, 1154638,\n", - " 1139575, 1151617, 1150586, 1136131, 1144533, 1140929, 1152903, 1151298,\n", - " 1152341, 1153302, 1153310, 1138281, 1156001, 1136028, 1158704, 1156608,\n", - " 1140682, 1140674, 1152928, 1153909, 1150161, 1144016, 1148040, 1155202,\n", - " 1149300, 1145656, 1144661, 1137048, 1148628, 1158530, 1158540, 1137458,\n", - " 1154378, 1157547, 1158912, 1158924, 1154929, 1156505, 1157064, 1155422,\n", - " 1150465, 1142221, 1135729, 1135730, 1156638, 1150824, 1158304, 1158308,\n", - " 1158311, 1155441, 1150130, 1150136, 1162117, 1154530, 1154528, 1153999,\n", - " 1142758, 1151380, 1151379, 1137918, 1158639, 1140187, 1140186, 1155122,\n", - " 1152527, 1157183, 1156463, 1158096, 1155675, 1155628, 1154555, 1158574,\n", - " 1158824, 1158325, 1156994, 1148835, 1155646, 1154644, 1161287, 1154902,\n", - " 1154909, 1143189, 1153322, 1157430, 1150984, 1150987, 1155293, 1143517,\n", - " 1157288, 1137152, 1180900, 1159006, 1149907, 1158193, 1159116, 1134677,\n", - " 1135601, 1135614, 1148147, 1150661, 1150671, 1155854, 1155848, 1158665,\n", - " 1157685, 1157684, 1146323, 1149145, 1140634, 1156693, 1140380, 1140374,\n", - " 1159131, 1159132, 1159120, 1163681, 1160428, 1155975, 1158841, 1156812,\n", - " 1154600, 1161300, 1180777, 1136899, 1136905, 1158753, 1140218, 1158436,\n", - " 1158442, 1158285, 1151615, 1136487, 1136494, 1155309, 1156490, 1153808,\n", - " 1136642, 1134757, 1158558, 1153827, 1146126, 1138101, 1150011, 1155521,\n", - " 1161539, 1142666, 1159070, 1159141, 1142427, 1153052, 1173005, 1156235,\n", - " 1153842, 1138384, 1138393, 1150046, 1149063, 1145948, 1155479, 1153519,\n", - " 1156787, 1149956, 1136806, 1162744, 1140729, 1169315, 1157357, 1164430,\n", - " 1158461, 1140135, 1140641, 1140650, 1140643, 1143139, 1159632, 1163201,\n", - " 1154285, 1141800, 1169108, 1160335, 1138674, 1153924, 1148571, 1149015,\n", - " 1167682, 1144737, 1141471, 1141459, 1147427, 1163798, 1156737, 1156739,\n", - " 1166591, 1144810, 1144812, 1135567, 1165716, 1162613, 1148683, 1145567,\n", - " 1154700, 1147676, 1150531, 1144973, 1165756, 1170506, 1152624, 1148124,\n", - " 1145892, 1145900, 1145902, 1168659, 1152203, 1175240, 1187284, 1158724,\n", - " 1158734, 1154076, 1168754, 1147330, 1169602, 1171982, 1166653, 1169224,\n", - " 1155172, 1150518, 1177236, 1144346, 1157534, 1138378, 1154670, 1152998,\n", - " 1169154, 1138129, 1141043, 1169359, 1150027, 1154353, 1154354, 1149447,\n", - " 1138609, 1158611, 1158623, 1149847, 1160135, 1155494, 1152353, 1152362,\n", - " 1192131, 1149395, 1173307, 1188761, 1169144, 1154027, 1152150, 1153751,\n", - " 1159658, 1159655, 1167857, 1151704, 1157153, 1157373, 1147711, 1157593,\n", - " 1135018, 1160984, 1177614, 1140326, 1166351, 1160150, 1171614, 1153428,\n", - " 1170554, 1169083, 1171817, 1171823, 1179560, 1150234, 1154148, 1158176,\n", - " 1149169, 1169821, 1182416, 1143420, 1153803, 1161024, 1161039, 1172314,\n", - " 1180915, 1184093, 1162129, 1159913, 1177581, 1157792, 1157795, 1143343,\n", - " 1171623, 1171380, 1158249, 1158253, 1153902, 1145597, 1145626, 1172024,\n", - " 1161911, 1155990, 1158512, 1158934, 1155892, 1155899, 1171590, 1170625,\n", - " 1169062, 1169064, 1168886, 1165478, 1165487, 1179125, 1190103, 1147172,\n", - " 1147182, 1141506, 1183983, 1139831, 1139837, 1150262, 1163848, 1156055,\n", - " 1173065, 1186653, 1189624, 1185009, 1169963, 1193786, 1189256, 1171116,\n", - " 1162502, 1171713, 1153585, 1185165, 1189650, 1177850, 1150406, 1180999,\n", - " 1172423, 1158064, 1158070, 1145392, 1174606, 1183149, 1155962, 1187854,\n", - " 1183804, 1178306, 1192792], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1198248, 1198730, 1200230, 1199282, 1202255, 1198844, 1201577,\n", - " 1201582, 1203044, 1197351, 1197355, 1196956, 1202801, 1196685, 1194745,\n", - " 1194783, 1196624, 1196631, 1194648, 1195511, 1195514, 1196534, 1197697,\n", - " 1195888, 1195895, 1195740, 1196334, 1195313, 1196835, 1197803, 1198268,\n", - " 1195982, 1198163, 1196705, 1196711, 1195148, 1195223, 1195265, 1196247,\n", - " 1195541, 1199317, 1197474, 1197478, 1195351, 1195353, 1198282, 1200949,\n", - " 1197291, 1194928, 1197990, 1202457, 1200872, 1199152, 1199154, 1199038,\n", - " 1199231, 1194786, 1199951, 1201511, 1199018, 1195792, 1197601, 1197609,\n", - " 1196727, 1198428, 1200155, 1199410, 1199421, 1199900, 1201528, 1200779,\n", - " 1201824, 1202430, 1200503, 1196479, 1198797, 1196999, 1201156, 1202630,\n", - " 1200991, 1200918, 1199712, 1199723, 1201737, 1200553, 1200555, 1200557,\n", - " 1200315, 1200429, 1202138, 1203230, 1196883, 1201442, 1202239, 1199976,\n", - " 1201291, 1198472, 1196761, 1197553, 1203329, 1199929, 1200398, 1196963,\n", - " 1196966, 1202876, 1200784, 1199606, 1195048, 1195676, 1202432, 1200445,\n", - " 1198929, 1198911, 1195421, 1197059, 1197822, 1197495, 1194898, 1200585,\n", - " 1199661, 1197735, 1200437, 1199782, 1199787, 1200468, 1195066, 1201886,\n", - " 1197652, 1194908, 1201761, 1201966, 1196428, 1197872], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1198248, 1198730, 1200230, 1199282, 1202255, 1198844, 1201577,\n", - " 1201582, 1203044, 1197351, 1197355, 1196956, 1202801, 1196685, 1194745,\n", - " 1194783, 1196624, 1196631, 1194648, 1195511, 1195514, 1196534, 1197697,\n", - " 1195888, 1195895, 1195740, 1196334, 1195313, 1196835, 1197803, 1198268,\n", - " 1195982, 1198163, 1196705, 1196711, 1195148, 1195223, 1195265, 1196247,\n", - " 1195541, 1199317, 1197474, 1197478, 1195351, 1195353, 1198282, 1200949,\n", - " 1197291, 1194928, 1197990, 1202457, 1200872, 1199152, 1199154, 1199038,\n", - " 1199231, 1194786, 1199951, 1201511, 1199018, 1195792, 1197601, 1197609,\n", - " 1196727, 1198428, 1200155, 1199410, 1199421, 1199900, 1201528, 1200779,\n", - " 1201824, 1202430, 1200503, 1196479, 1198797, 1196999, 1201156, 1202630,\n", - " 1200991, 1200918, 1199712, 1199723, 1201737, 1200553, 1200555, 1200557,\n", - " 1200315, 1200429, 1202138, 1203230, 1196883, 1201442, 1202239, 1199976,\n", - " 1201291, 1198472, 1196761, 1197553, 1203329, 1199929, 1200398, 1196963,\n", - " 1196966, 1202876, 1200784, 1199606, 1195048, 1195676, 1202432, 1200445,\n", - " 1198929, 1198911, 1195421, 1197059, 1197822, 1197495, 1194898, 1200585,\n", - " 1199661, 1197735, 1200437, 1199782, 1199787, 1200468, 1195066, 1201886,\n", - " 1197652, 1194908, 1201761, 1201966, 1196428, 1197872], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 1.4962e-01, 1.1184e-02, 7.8071e-01, ..., 1.4384e-01,\n", - " -1.7980e-03, -4.7033e-03],\n", - " [ 1.3429e-01, -3.3774e-04, 7.5808e-01, ..., 1.3432e-01,\n", - " -1.9837e-03, -4.9373e-03],\n", - " [ 2.4017e-01, -3.7581e-04, 9.9095e-01, ..., 1.1816e-01,\n", - " -1.8921e-03, -6.5153e-03],\n", - " ...,\n", - " [ 2.3538e-01, -3.3158e-04, 9.6178e-01, ..., 1.2248e-01,\n", - " -2.0182e-03, -6.3460e-03],\n", - " [ 2.5493e-01, -4.4015e-04, 1.0174e+00, ..., 1.0785e-01,\n", - " -1.7346e-03, -6.7316e-03],\n", - " [ 2.2244e-01, -6.8014e-04, 1.0242e+00, ..., 1.2189e-01,\n", - " -1.9442e-03, -6.8474e-03]], device='cuda:0'), 'paper': tensor([[ 3.4902e-01, -1.2533e-04, 2.5846e+00, ..., -6.4320e-03,\n", - " -3.0300e-02, -3.9592e-03],\n", - " [ 1.8629e+00, 1.2151e+00, 3.6363e+00, ..., 1.8086e+00,\n", - " -5.5502e-02, 3.7050e+00],\n", - " [-2.5916e-03, 8.2397e-01, 3.4019e+00, ..., -1.1425e-02,\n", - " -3.0918e-02, -1.5565e-02],\n", - " ...,\n", - " [ 7.4033e-01, 3.0759e-01, 4.8995e+00, ..., 1.4716e-02,\n", - " -4.3975e-02, 2.5945e-01],\n", - " [ 1.2189e+00, 1.2825e+00, 3.2348e+00, ..., 5.9787e-01,\n", - " -4.0712e-02, 1.4781e+00],\n", - " [ 1.8849e+00, 1.5514e+00, 3.4578e+00, ..., 2.5420e+00,\n", - " -5.8223e-02, 4.1994e+00]], device='cuda:0'), 'author': tensor([[-6.2942e-04, 2.9830e-02, 1.2906e-01, ..., 1.6955e-01,\n", - " -1.0748e-04, -6.7757e-04],\n", - " [-1.2126e-03, 2.1661e-01, 2.7407e-01, ..., 1.7096e+00,\n", - " 8.7549e-02, 4.6903e-02],\n", - " [-1.8205e-03, 3.4610e-01, 2.6584e-01, ..., 1.6963e+00,\n", - " -1.2218e-03, -7.8609e-04],\n", - " ...,\n", - " [-4.4792e-03, 3.0359e-01, 3.0204e-01, ..., 1.2937e+00,\n", - " -3.5922e-03, -5.4613e-03],\n", - " [-3.2412e-03, 3.5070e-01, 2.7817e-01, ..., 1.3691e+00,\n", - " -2.8817e-03, -3.1414e-03],\n", - " [-1.4256e-03, 2.7100e-01, 1.8311e-01, ..., 1.5839e+00,\n", - " 5.0640e-02, 3.7668e-02]], device='cuda:0'), 'field_of_study': tensor([[ 0.0455, 0.8825, 0.6200, ..., -0.0122, 0.4037, 0.5637],\n", - " [ 0.1576, 0.5687, 0.2822, ..., -0.0060, 0.2212, 0.1903],\n", - " [ 0.3468, 0.9209, 0.5953, ..., -0.0071, 0.2829, -0.0010],\n", - " ...,\n", - " [ 0.1079, 0.6509, 0.4262, ..., -0.0081, 0.1087, 0.4522],\n", - " [ 0.0272, 0.7383, 0.4565, ..., -0.0103, 0.3419, 0.4881],\n", - " [ 0.0783, 0.8847, 0.6318, ..., -0.0101, 0.2864, 0.5674]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 56, 48, 200, 30, 91, 115, 115, 149, 525, 438, 234, 358,\n", - " 446, 405, 585, 585, 546, 586, 569, 569, 721, 962, 1004, 1102,\n", - " 1071, 846, 800, 849, 877, 1084, 1512, 1432, 1418, 1483, 1395, 1395,\n", - " 1395, 1395, 1504, 1517, 1842, 1842, 1395, 1395, 1505, 1505, 1606, 1860,\n", - " 1712, 1588, 1656, 1804, 1783, 1932, 1932, 1909, 2256, 1988, 2145, 2162,\n", - " 2162, 2162, 2117, 1980, 2162, 2162, 2162, 2162, 2162, 2110, 2165, 2165,\n", - " 2165, 2165, 2165, 2319, 2347, 2416, 2416, 2383, 2519, 2335, 2335, 2335,\n", - " 2335, 2468, 2733, 2611, 2392, 2666, 2624, 2602, 2660, 2702, 2761, 2584,\n", - " 3015, 3015, 3015, 3015, 3015, 2830, 3084, 3066, 2989, 3059, 3100, 3133,\n", - " 3020, 3072, 3323, 3230, 3275, 3275, 3403, 3340, 3571, 3571, 3502, 3448,\n", - " 3756, 3837, 3879, 3835, 3711, 3987, 3953, 3997, 4041, 4041, 4104, 4078,\n", - " 4095, 4107, 4053, 4083, 4100, 4351, 4412, 4341, 4373, 4373, 4336, 4338,\n", - " 4404, 4404, 4523, 4523, 4523, 4523, 4576, 4576, 4553, 4430, 4557, 4702,\n", - " 4730, 4780, 4911, 5003, 5058, 5157, 5157, 5132, 5277, 5142, 5142, 5242,\n", - " 5242, 5421, 5421, 5402, 5402, 5326, 5224, 5224, 5224, 5199, 5892, 5831,\n", - " 5831, 5831, 5440, 5440, 5234, 5643, 5754, 6020, 6020, 6020, 5756, 5708,\n", - " 5815, 5967, 5967, 5730, 6280, 6280, 5922, 6226, 6045, 6130, 6130, 6051,\n", - " 6051, 6274, 6254, 6254, 6122, 6122, 6312, 6499, 6296],\n", - " [ 87, 112, 87, 8, 74, 64, 132, 114, 0, 116, 64, 114,\n", - " 29, 4, 1, 81, 44, 35, 94, 67, 62, 51, 114, 16,\n", - " 93, 124, 63, 89, 61, 64, 14, 49, 88, 129, 22, 104,\n", - " 15, 33, 117, 0, 84, 59, 78, 47, 108, 98, 58, 80,\n", - " 26, 110, 12, 110, 57, 72, 37, 31, 43, 71, 31, 52,\n", - " 85, 96, 110, 76, 36, 28, 19, 46, 102, 64, 37, 106,\n", - " 96, 125, 10, 1, 23, 90, 120, 58, 75, 60, 54, 4,\n", - " 51, 132, 75, 1, 7, 95, 24, 131, 117, 3, 109, 0,\n", - " 95, 86, 56, 55, 72, 1, 40, 61, 25, 113, 27, 53,\n", - " 70, 129, 40, 4, 83, 34, 45, 31, 100, 65, 101, 113,\n", - " 17, 68, 18, 73, 82, 57, 83, 130, 42, 128, 21, 121,\n", - " 5, 83, 20, 4, 4, 113, 39, 64, 77, 115, 92, 118,\n", - " 62, 128, 91, 105, 97, 24, 84, 59, 119, 18, 128, 66,\n", - " 32, 9, 35, 30, 126, 129, 69, 99, 5, 103, 64, 78,\n", - " 64, 116, 64, 26, 64, 8, 64, 48, 2, 45, 111, 82,\n", - " 64, 127, 107, 64, 122, 61, 50, 11, 6, 33, 64, 39,\n", - " 99, 15, 64, 13, 5, 64, 50, 65, 41, 114, 64, 64,\n", - " 79, 26, 64, 35, 38, 64, 123, 133, 107]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2220, 396, 2220, ..., 1290, 1182, 472],\n", - " [ 32, 283, 144, ..., 6370, 6391, 6415]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 73, 73, 69, ..., 73, 23, 64],\n", - " [ 45, 77, 101, ..., 6414, 6182, 6498]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 12, 12, 12, ..., 6286, 6286, 6429],\n", - " [ 275, 413, 453, ..., 659, 244, 101]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 206, 244, 364, ..., 453, 244, 500],\n", - " [ 85, 58, 95, ..., 6233, 6321, 6359]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4913, 4029, 5690, ..., 3635, 3201, 5402],\n", - " [ 25, 15, 103, ..., 6440, 6391, 6405]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 12, 12, 133, ..., 6314, 6416, 6416],\n", - " [ 565, 2931, 558, ..., 1456, 572, 2164]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 56, 56, 56, ..., 6438, 6438, 6438],\n", - " [3063, 5849, 5972, ..., 6158, 6083, 6094]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.007146\n", - "sampling 0.006974\n", - "noi time: 0.002204\n", - "get_vertex_data call: 0.033407\n", - "noi group time: 0.002611\n", - "eoi_group_time: 0.01289\n", - "second half: 0.18995\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24187, 32616, 16542, ..., 1128739, 1119042, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24187, 32616, 16542, ..., 1128739, 1119042, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1215972, 1203800, ..., 1914439, 1925034, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1215972, 1203800, ..., 1914439, 1925034, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1140282, 1135165, 1135160, 1140785, 1141758, 1136208, 1136223,\n", - " 1142525, 1136962, 1136965, 1136971, 1141442, 1139808, 1139811, 1154770,\n", - " 1146983, 1137271, 1139142, 1145055, 1143372, 1150509, 1139865, 1142958,\n", - " 1143820, 1147473, 1141877, 1142881, 1144632, 1138347, 1138345, 1136742,\n", - " 1147095, 1137220, 1155019, 1139373, 1139371, 1150322, 1152416, 1134707,\n", - " 1134715, 1136268, 1146376, 1134807, 1140305, 1137829, 1140537, 1140540,\n", - " 1138112, 1138356, 1140147, 1140159, 1134720, 1140952, 1140953, 1162460,\n", - " 1135367, 1135370, 1135202, 1135903, 1134969, 1134794, 1157443, 1157447,\n", - " 1138504, 1136178, 1143064, 1137693, 1144395, 1137534, 1152376, 1137441,\n", - " 1156149, 1148484, 1135574, 1142607, 1156347, 1138514, 1153099, 1137957,\n", - " 1156899, 1135522, 1139684, 1138305, 1138436, 1138440, 1138461, 1156606,\n", - " 1147112, 1147116, 1142611, 1142615, 1135624, 1138185, 1148531, 1150958,\n", - " 1137422, 1135769, 1139673, 1139674, 1139664, 1142243, 1134992, 1142434,\n", - " 1136548, 1148800, 1135781, 1135782, 1136730, 1158974, 1144406, 1153544,\n", - " 1138648, 1138148, 1141964, 1140549, 1152044, 1137734, 1137728, 1146212,\n", - " 1134750, 1137001, 1135549, 1140228, 1149001, 1139898, 1141977, 1137299,\n", - " 1143225, 1139025, 1149982, 1141695, 1135861, 1161170, 1161176, 1140469,\n", - " 1141891, 1141901, 1139386, 1141657, 1136917, 1143675, 1137190, 1141155,\n", - " 1141786, 1139488, 1139495, 1136752, 1144422, 1140173, 1158749, 1142713,\n", - " 1139190, 1143107, 1148441, 1144596, 1142451, 1145298, 1141399, 1150910,\n", - " 1144868, 1146201, 1134827, 1140496, 1137854, 1137841, 1141367, 1141664,\n", - " 1149093, 1149097, 1149101, 1138293, 1144279, 1153554, 1140093, 1138815,\n", - " 1139127, 1140990, 1146702, 1147050, 1147047, 1143551, 1152976, 1141925,\n", - " 1144242, 1140580, 1140585, 1136891, 1134861, 1146024, 1149928, 1139990,\n", - " 1146302, 1151124, 1150423, 1147543, 1147150, 1147282, 1142816, 1138665,\n", - " 1140345, 1142628, 1157720, 1136836, 1148235, 1138238, 1139053, 1142146,\n", - " 1145427, 1143345, 1135876, 1135818, 1150296, 1146523, 1143456, 1143457,\n", - " 1144291, 1143937, 1147521, 1147524, 1140364, 1143082, 1149489, 1144725,\n", - " 1144219, 1147984, 1147999, 1146949, 1134899, 1147127, 1147131, 1147244,\n", - " 1148704, 1142700, 1141825, 1146749, 1146751, 1146742, 1153702, 1152328,\n", - " 1147025, 1145011, 1147196, 1158226, 1158231, 1158235, 1167006, 1147880,\n", - " 1149862, 1154526, 1145240, 1145751, 1142378, 1138638, 1146178, 1151242,\n", - " 1148223, 1152530, 1150274, 1150445, 1149250, 1148822, 1154438, 1149791,\n", - " 1144526, 1151988, 1147796, 1151480, 1151487, 1151473, 1150127, 1148281,\n", - " 1148278, 1147016, 1168846, 1144823, 1144828, 1147653, 1143564, 1149412,\n", - " 1148288, 1148300, 1137724, 1154430, 1148180, 1151363, 1136249, 1136247,\n", - " 1139718, 1147631, 1149810, 1148204, 1153124, 1153125, 1153188, 1152877,\n", - " 1144863, 1148095, 1147442, 1151811, 1151816, 1135307, 1151918, 1172677,\n", - " 1136002, 1151348, 1147737, 1146261, 1156402, 1149359, 1150219, 1146623,\n", - " 1144476, 1135695, 1146287, 1150085, 1150091, 1145545, 1137746, 1137756,\n", - " 1146304, 1159983, 1155149, 1136401, 1149203, 1154123, 1157826, 1152673,\n", - " 1139575, 1151617, 1150578, 1136131, 1136134, 1136798, 1148913, 1148924,\n", - " 1152958, 1153387, 1145957, 1138982, 1151311, 1143998, 1152342, 1152344,\n", - " 1156823, 1156831, 1153311, 1138279, 1138281, 1156007, 1156001, 1136028,\n", - " 1136029, 1152928, 1151067, 1151061, 1154722, 1154727, 1154734, 1156422,\n", - " 1150104, 1150154, 1150164, 1148040, 1152601, 1155222, 1145649, 1145656,\n", - " 1137047, 1137048, 1148628, 1158530, 1158533, 1137458, 1178126, 1157547,\n", - " 1182205, 1158924, 1154929, 1157064, 1157069, 1155422, 1152833, 1145196,\n", - " 1145192, 1139473, 1151260, 1146854, 1152179, 1152183, 1151788, 1151777,\n", - " 1157911, 1156932, 1158304, 1158306, 1158308, 1158311, 1151271, 1155441,\n", - " 1155442, 1155519, 1150129, 1150136, 1153999, 1145611, 1142755, 1156207,\n", - " 1156269, 1156271, 1151379, 1158628, 1152527, 1149321, 1135406, 1145794,\n", - " 1156463, 1158096, 1167581, 1168230, 1155667, 1155630, 1156563, 1155572,\n", - " 1155576, 1136466, 1158824, 1158325, 1157320, 1155646, 1162190, 1164291,\n", - " 1139619, 1154909, 1150371, 1157439, 1157430, 1150068, 1150077, 1150976,\n", - " 1150983, 1137152, 1157650, 1153776, 1137380, 1159116, 1138269, 1145681,\n", - " 1140914, 1135601, 1135614, 1148149, 1148159, 1155852, 1158665, 1149137,\n", - " 1149145, 1156081, 1159213, 1155439, 1140368, 1156027, 1157033, 1155971,\n", - " 1155975, 1155396, 1154592, 1166115, 1153503, 1153498, 1136896, 1158760,\n", - " 1158886, 1158815, 1156778, 1152463, 1151615, 1155309, 1153808, 1156278,\n", - " 1166876, 1140049, 1160912, 1158558, 1155528, 1171195, 1142658, 1157756,\n", - " 1167346, 1159042, 1165838, 1167592, 1142426, 1153052, 1153045, 1167708,\n", - " 1156235, 1144158, 1153842, 1156107, 1138393, 1155476, 1151020, 1154300,\n", - " 1153514, 1153519, 1138161, 1164006, 1156787, 1156795, 1139281, 1159999,\n", - " 1157236, 1148777, 1146063, 1169493, 1140643, 1148592, 1164979, 1143138,\n", - " 1143139, 1143143, 1163201, 1154274, 1141800, 1156181, 1159032, 1152247,\n", - " 1155588, 1160498, 1151220, 1153924, 1158405, 1168527, 1144977, 1147830,\n", - " 1147836, 1164580, 1161243, 1144739, 1144747, 1152776, 1160668, 1168067,\n", - " 1147426, 1156737, 1156739, 1156742, 1153663, 1171040, 1144812, 1144808,\n", - " 1153268, 1153273, 1165719, 1164741, 1142733, 1156303, 1148675, 1154689,\n", - " 1154700, 1146042, 1171695, 1138762, 1144973, 1143037, 1147355, 1152624,\n", - " 1155911, 1145900, 1153520, 1151752, 1152203, 1143395, 1171229, 1158735,\n", - " 1158734, 1154076, 1145674, 1150773, 1145490, 1169602, 1167817, 1171975,\n", - " 1166653, 1155172, 1155170, 1165023, 1150522, 1154618, 1144346, 1157534,\n", - " 1154670, 1157340, 1138130, 1141048, 1169359, 1149452, 1149688, 1158623,\n", - " 1158052, 1173047, 1149846, 1157385, 1152353, 1152546, 1172782, 1143858,\n", - " 1168059, 1172209, 1172838, 1148335, 1173307, 1154028, 1152152, 1167859,\n", - " 1169572, 1157153, 1157373, 1147711, 1151850, 1148131, 1157593, 1135016,\n", - " 1180212, 1168604, 1172932, 1166682, 1150234, 1154148, 1154159, 1167520,\n", - " 1149169, 1149173, 1170117, 1170299, 1170297, 1143410, 1143420, 1171302,\n", - " 1181241, 1153803, 1153141, 1181568, 1182106, 1161255, 1154718, 1157795,\n", - " 1155800, 1155804, 1157134, 1183789, 1153898, 1153899, 1153893, 1134650,\n", - " 1145626, 1172024, 1161067, 1149753, 1149755, 1153601, 1155990, 1181149,\n", - " 1158512, 1158517, 1155892, 1155899, 1162690, 1168276, 1186875, 1168886,\n", - " 1189458, 1162253, 1160078, 1164228, 1182337, 1188271, 1154957, 1161819,\n", - " 1146161, 1146172, 1156861, 1167395, 1179053, 1178246, 1156528, 1139828,\n", - " 1139831, 1154812, 1180847, 1149668, 1156049, 1156055, 1151977, 1146392,\n", - " 1146395, 1183186, 1182959, 1191518, 1172475, 1178526, 1169964, 1168683,\n", - " 1192192, 1193708, 1181284, 1151774, 1162502, 1178005, 1193117, 1145395,\n", - " 1160967, 1178135, 1185469, 1155962, 1192634, 1188350, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1140282, 1135165, 1135160, 1140785, 1141758, 1136208, 1136223,\n", - " 1142525, 1136962, 1136965, 1136971, 1141442, 1139808, 1139811, 1154770,\n", - " 1146983, 1137271, 1139142, 1145055, 1143372, 1150509, 1139865, 1142958,\n", - " 1143820, 1147473, 1141877, 1142881, 1144632, 1138347, 1138345, 1136742,\n", - " 1147095, 1137220, 1155019, 1139373, 1139371, 1150322, 1152416, 1134707,\n", - " 1134715, 1136268, 1146376, 1134807, 1140305, 1137829, 1140537, 1140540,\n", - " 1138112, 1138356, 1140147, 1140159, 1134720, 1140952, 1140953, 1162460,\n", - " 1135367, 1135370, 1135202, 1135903, 1134969, 1134794, 1157443, 1157447,\n", - " 1138504, 1136178, 1143064, 1137693, 1144395, 1137534, 1152376, 1137441,\n", - " 1156149, 1148484, 1135574, 1142607, 1156347, 1138514, 1153099, 1137957,\n", - " 1156899, 1135522, 1139684, 1138305, 1138436, 1138440, 1138461, 1156606,\n", - " 1147112, 1147116, 1142611, 1142615, 1135624, 1138185, 1148531, 1150958,\n", - " 1137422, 1135769, 1139673, 1139674, 1139664, 1142243, 1134992, 1142434,\n", - " 1136548, 1148800, 1135781, 1135782, 1136730, 1158974, 1144406, 1153544,\n", - " 1138648, 1138148, 1141964, 1140549, 1152044, 1137734, 1137728, 1146212,\n", - " 1134750, 1137001, 1135549, 1140228, 1149001, 1139898, 1141977, 1137299,\n", - " 1143225, 1139025, 1149982, 1141695, 1135861, 1161170, 1161176, 1140469,\n", - " 1141891, 1141901, 1139386, 1141657, 1136917, 1143675, 1137190, 1141155,\n", - " 1141786, 1139488, 1139495, 1136752, 1144422, 1140173, 1158749, 1142713,\n", - " 1139190, 1143107, 1148441, 1144596, 1142451, 1145298, 1141399, 1150910,\n", - " 1144868, 1146201, 1134827, 1140496, 1137854, 1137841, 1141367, 1141664,\n", - " 1149093, 1149097, 1149101, 1138293, 1144279, 1153554, 1140093, 1138815,\n", - " 1139127, 1140990, 1146702, 1147050, 1147047, 1143551, 1152976, 1141925,\n", - " 1144242, 1140580, 1140585, 1136891, 1134861, 1146024, 1149928, 1139990,\n", - " 1146302, 1151124, 1150423, 1147543, 1147150, 1147282, 1142816, 1138665,\n", - " 1140345, 1142628, 1157720, 1136836, 1148235, 1138238, 1139053, 1142146,\n", - " 1145427, 1143345, 1135876, 1135818, 1150296, 1146523, 1143456, 1143457,\n", - " 1144291, 1143937, 1147521, 1147524, 1140364, 1143082, 1149489, 1144725,\n", - " 1144219, 1147984, 1147999, 1146949, 1134899, 1147127, 1147131, 1147244,\n", - " 1148704, 1142700, 1141825, 1146749, 1146751, 1146742, 1153702, 1152328,\n", - " 1147025, 1145011, 1147196, 1158226, 1158231, 1158235, 1167006, 1147880,\n", - " 1149862, 1154526, 1145240, 1145751, 1142378, 1138638, 1146178, 1151242,\n", - " 1148223, 1152530, 1150274, 1150445, 1149250, 1148822, 1154438, 1149791,\n", - " 1144526, 1151988, 1147796, 1151480, 1151487, 1151473, 1150127, 1148281,\n", - " 1148278, 1147016, 1168846, 1144823, 1144828, 1147653, 1143564, 1149412,\n", - " 1148288, 1148300, 1137724, 1154430, 1148180, 1151363, 1136249, 1136247,\n", - " 1139718, 1147631, 1149810, 1148204, 1153124, 1153125, 1153188, 1152877,\n", - " 1144863, 1148095, 1147442, 1151811, 1151816, 1135307, 1151918, 1172677,\n", - " 1136002, 1151348, 1147737, 1146261, 1156402, 1149359, 1150219, 1146623,\n", - " 1144476, 1135695, 1146287, 1150085, 1150091, 1145545, 1137746, 1137756,\n", - " 1146304, 1159983, 1155149, 1136401, 1149203, 1154123, 1157826, 1152673,\n", - " 1139575, 1151617, 1150578, 1136131, 1136134, 1136798, 1148913, 1148924,\n", - " 1152958, 1153387, 1145957, 1138982, 1151311, 1143998, 1152342, 1152344,\n", - " 1156823, 1156831, 1153311, 1138279, 1138281, 1156007, 1156001, 1136028,\n", - " 1136029, 1152928, 1151067, 1151061, 1154722, 1154727, 1154734, 1156422,\n", - " 1150104, 1150154, 1150164, 1148040, 1152601, 1155222, 1145649, 1145656,\n", - " 1137047, 1137048, 1148628, 1158530, 1158533, 1137458, 1178126, 1157547,\n", - " 1182205, 1158924, 1154929, 1157064, 1157069, 1155422, 1152833, 1145196,\n", - " 1145192, 1139473, 1151260, 1146854, 1152179, 1152183, 1151788, 1151777,\n", - " 1157911, 1156932, 1158304, 1158306, 1158308, 1158311, 1151271, 1155441,\n", - " 1155442, 1155519, 1150129, 1150136, 1153999, 1145611, 1142755, 1156207,\n", - " 1156269, 1156271, 1151379, 1158628, 1152527, 1149321, 1135406, 1145794,\n", - " 1156463, 1158096, 1167581, 1168230, 1155667, 1155630, 1156563, 1155572,\n", - " 1155576, 1136466, 1158824, 1158325, 1157320, 1155646, 1162190, 1164291,\n", - " 1139619, 1154909, 1150371, 1157439, 1157430, 1150068, 1150077, 1150976,\n", - " 1150983, 1137152, 1157650, 1153776, 1137380, 1159116, 1138269, 1145681,\n", - " 1140914, 1135601, 1135614, 1148149, 1148159, 1155852, 1158665, 1149137,\n", - " 1149145, 1156081, 1159213, 1155439, 1140368, 1156027, 1157033, 1155971,\n", - " 1155975, 1155396, 1154592, 1166115, 1153503, 1153498, 1136896, 1158760,\n", - " 1158886, 1158815, 1156778, 1152463, 1151615, 1155309, 1153808, 1156278,\n", - " 1166876, 1140049, 1160912, 1158558, 1155528, 1171195, 1142658, 1157756,\n", - " 1167346, 1159042, 1165838, 1167592, 1142426, 1153052, 1153045, 1167708,\n", - " 1156235, 1144158, 1153842, 1156107, 1138393, 1155476, 1151020, 1154300,\n", - " 1153514, 1153519, 1138161, 1164006, 1156787, 1156795, 1139281, 1159999,\n", - " 1157236, 1148777, 1146063, 1169493, 1140643, 1148592, 1164979, 1143138,\n", - " 1143139, 1143143, 1163201, 1154274, 1141800, 1156181, 1159032, 1152247,\n", - " 1155588, 1160498, 1151220, 1153924, 1158405, 1168527, 1144977, 1147830,\n", - " 1147836, 1164580, 1161243, 1144739, 1144747, 1152776, 1160668, 1168067,\n", - " 1147426, 1156737, 1156739, 1156742, 1153663, 1171040, 1144812, 1144808,\n", - " 1153268, 1153273, 1165719, 1164741, 1142733, 1156303, 1148675, 1154689,\n", - " 1154700, 1146042, 1171695, 1138762, 1144973, 1143037, 1147355, 1152624,\n", - " 1155911, 1145900, 1153520, 1151752, 1152203, 1143395, 1171229, 1158735,\n", - " 1158734, 1154076, 1145674, 1150773, 1145490, 1169602, 1167817, 1171975,\n", - " 1166653, 1155172, 1155170, 1165023, 1150522, 1154618, 1144346, 1157534,\n", - " 1154670, 1157340, 1138130, 1141048, 1169359, 1149452, 1149688, 1158623,\n", - " 1158052, 1173047, 1149846, 1157385, 1152353, 1152546, 1172782, 1143858,\n", - " 1168059, 1172209, 1172838, 1148335, 1173307, 1154028, 1152152, 1167859,\n", - " 1169572, 1157153, 1157373, 1147711, 1151850, 1148131, 1157593, 1135016,\n", - " 1180212, 1168604, 1172932, 1166682, 1150234, 1154148, 1154159, 1167520,\n", - " 1149169, 1149173, 1170117, 1170299, 1170297, 1143410, 1143420, 1171302,\n", - " 1181241, 1153803, 1153141, 1181568, 1182106, 1161255, 1154718, 1157795,\n", - " 1155800, 1155804, 1157134, 1183789, 1153898, 1153899, 1153893, 1134650,\n", - " 1145626, 1172024, 1161067, 1149753, 1149755, 1153601, 1155990, 1181149,\n", - " 1158512, 1158517, 1155892, 1155899, 1162690, 1168276, 1186875, 1168886,\n", - " 1189458, 1162253, 1160078, 1164228, 1182337, 1188271, 1154957, 1161819,\n", - " 1146161, 1146172, 1156861, 1167395, 1179053, 1178246, 1156528, 1139828,\n", - " 1139831, 1154812, 1180847, 1149668, 1156049, 1156055, 1151977, 1146392,\n", - " 1146395, 1183186, 1182959, 1191518, 1172475, 1178526, 1169964, 1168683,\n", - " 1192192, 1193708, 1181284, 1151774, 1162502, 1178005, 1193117, 1145395,\n", - " 1160967, 1178135, 1185469, 1155962, 1192634, 1188350, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197226, 1197717, 1195333, 1195860, 1199282, 1198459, 1202255, 1198844,\n", - " 1200642, 1200650, 1197777, 1199248, 1201015, 1201016, 1197359, 1196956,\n", - " 1198557, 1196573, 1195713, 1195726, 1195514, 1195259, 1195263, 1199135,\n", - " 1201992, 1196030, 1201427, 1198090, 1198095, 1195888, 1195895, 1196144,\n", - " 1195740, 1196699, 1195325, 1196840, 1198668, 1197807, 1195571, 1198163,\n", - " 1198161, 1196711, 1196717, 1199823, 1195216, 1195265, 1195278, 1197140,\n", - " 1196109, 1194859, 1195038, 1195660, 1195541, 1197248, 1196393, 1198277,\n", - " 1198282, 1200959, 1196034, 1199060, 1199685, 1199628, 1197674, 1197990,\n", - " 1200872, 1199572, 1199231, 1195017, 1199676, 1194795, 1196508, 1200668,\n", - " 1202582, 1199021, 1196727, 1202618, 1198428, 1198811, 1199555, 1201827,\n", - " 1198066, 1201079, 1202630, 1200913, 1200918, 1194803, 1194805, 1202641,\n", - " 1199712, 1200363, 1202499, 1200553, 1200555, 1200315, 1202232, 1200899,\n", - " 1202338, 1202351, 1202337, 1202175, 1200323, 1201291, 1201871, 1202889,\n", - " 1199922, 1199929, 1196960, 1196966, 1194846, 1199606, 1195664, 1195415,\n", - " 1195379, 1201321, 1197816, 1197822, 1197821, 1198127, 1198973, 1203102,\n", - " 1201138, 1199782, 1198819, 1200296, 1195082, 1203300, 1203162, 1197872],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197226, 1197717, 1195333, 1195860, 1199282, 1198459, 1202255, 1198844,\n", - " 1200642, 1200650, 1197777, 1199248, 1201015, 1201016, 1197359, 1196956,\n", - " 1198557, 1196573, 1195713, 1195726, 1195514, 1195259, 1195263, 1199135,\n", - " 1201992, 1196030, 1201427, 1198090, 1198095, 1195888, 1195895, 1196144,\n", - " 1195740, 1196699, 1195325, 1196840, 1198668, 1197807, 1195571, 1198163,\n", - " 1198161, 1196711, 1196717, 1199823, 1195216, 1195265, 1195278, 1197140,\n", - " 1196109, 1194859, 1195038, 1195660, 1195541, 1197248, 1196393, 1198277,\n", - " 1198282, 1200959, 1196034, 1199060, 1199685, 1199628, 1197674, 1197990,\n", - " 1200872, 1199572, 1199231, 1195017, 1199676, 1194795, 1196508, 1200668,\n", - " 1202582, 1199021, 1196727, 1202618, 1198428, 1198811, 1199555, 1201827,\n", - " 1198066, 1201079, 1202630, 1200913, 1200918, 1194803, 1194805, 1202641,\n", - " 1199712, 1200363, 1202499, 1200553, 1200555, 1200315, 1202232, 1200899,\n", - " 1202338, 1202351, 1202337, 1202175, 1200323, 1201291, 1201871, 1202889,\n", - " 1199922, 1199929, 1196960, 1196966, 1194846, 1199606, 1195664, 1195415,\n", - " 1195379, 1201321, 1197816, 1197822, 1197821, 1198127, 1198973, 1203102,\n", - " 1201138, 1199782, 1198819, 1200296, 1195082, 1203300, 1203162, 1197872],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 2.3988e-01, -3.7425e-04, 9.6890e-01, ..., 1.0986e-01,\n", - " -1.8822e-03, -6.3646e-03],\n", - " [ 1.3941e-01, -3.0871e-04, 7.5980e-01, ..., 1.3024e-01,\n", - " -1.8610e-03, -4.9198e-03],\n", - " [ 7.7116e-02, -2.3209e-04, 4.0895e-01, ..., 9.7314e-02,\n", - " -1.6728e-03, -3.3297e-03],\n", - " ...,\n", - " [ 1.4969e-01, 2.9492e-02, 8.6308e-01, ..., 1.5566e-01,\n", - " -1.6669e-03, -5.3881e-03],\n", - " [ 1.3670e-01, 1.1313e-02, 6.8465e-01, ..., 1.0960e-01,\n", - " -1.7184e-03, -4.5683e-03],\n", - " [ 1.4552e-01, -6.6933e-05, 7.5316e-01, ..., 1.2237e-01,\n", - " -1.7963e-03, -4.9158e-03]], device='cuda:0'), 'paper': tensor([[ 1.6767e+00, 1.6297e+00, 3.6686e+00, ..., 1.4405e+00,\n", - " -4.7188e-02, 2.7111e+00],\n", - " [ 1.9002e+00, 2.5043e+00, 3.5355e+00, ..., 1.3126e-01,\n", - " -3.6579e-02, 2.0047e+00],\n", - " [ 1.9587e+00, 5.8450e-01, 4.6153e+00, ..., 8.8035e-01,\n", - " -5.6407e-02, 2.7441e+00],\n", - " ...,\n", - " [ 1.1816e+00, 1.2994e+00, 1.5533e+00, ..., -6.4855e-03,\n", - " -2.1656e-02, 6.9461e-01],\n", - " [-9.3351e-03, -3.8752e-03, 6.0293e+00, ..., -1.6869e-02,\n", - " -4.5449e-02, -3.1671e-02],\n", - " [ 1.7409e+00, 1.4549e+00, 3.2896e+00, ..., 2.4236e+00,\n", - " -5.6513e-02, 3.9344e+00]], device='cuda:0'), 'author': tensor([[-1.4245e-03, 3.8438e-01, 1.6965e-01, ..., 1.5962e+00,\n", - " -6.8483e-04, -4.8424e-04],\n", - " [-2.1205e-03, 2.9669e-01, 2.8783e-01, ..., 1.6984e+00,\n", - " -9.2692e-04, -1.0877e-03],\n", - " [-3.0321e-03, 3.5492e-01, 1.0627e-01, ..., 1.4384e+00,\n", - " -2.7700e-03, -2.3856e-03],\n", - " ...,\n", - " [-3.7866e-03, 3.6480e-01, 2.6412e-01, ..., 1.5486e+00,\n", - " -1.9109e-03, -2.7011e-03],\n", - " [-3.0027e-03, 3.2437e-01, 2.8045e-01, ..., 1.4686e+00,\n", - " -3.4307e-03, -2.9796e-03],\n", - " [-1.3574e-03, 3.1513e-01, 2.3353e-01, ..., 1.6921e+00,\n", - " -1.7054e-04, -6.3603e-05]], device='cuda:0'), 'field_of_study': tensor([[ 0.0737, 0.7690, 0.3866, ..., -0.0087, 0.3852, 0.3582],\n", - " [ 0.1214, 0.8559, 0.5206, ..., -0.0104, 0.4334, 0.2731],\n", - " [ 0.0812, 0.6878, 0.3709, ..., -0.0105, 0.3953, 0.3603],\n", - " ...,\n", - " [ 0.0605, 0.8250, 0.5318, ..., -0.0102, 0.3460, 0.5008],\n", - " [ 0.0183, 0.6283, 0.3197, ..., -0.0064, 0.3348, 0.1936],\n", - " [ 0.2300, 0.8739, 0.4595, ..., -0.0093, 0.4512, 0.1234]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 9, 170, 170, 148, 148, 208, 539, 232, 272, 261, 355, 240,\n", - " 520, 246, 345, 1094, 1094, 771, 771, 772, 576, 413, 413, 637,\n", - " 516, 1195, 666, 666, 1158, 935, 961, 1036, 777, 1179, 1543, 1543,\n", - " 1543, 1543, 1463, 1175, 900, 900, 1297, 1543, 1394, 1572, 1572, 1572,\n", - " 1530, 1530, 1203, 1203, 1443, 1443, 1530, 1530, 1530, 1530, 1331, 1572,\n", - " 1572, 1678, 1775, 1805, 1805, 1834, 2071, 2010, 2144, 1947, 1947, 1955,\n", - " 2036, 2100, 2100, 2171, 2171, 2171, 2171, 2218, 2324, 2463, 2549, 2482,\n", - " 2482, 2482, 2571, 2651, 2828, 2868, 2636, 2636, 2885, 2885, 2885, 2885,\n", - " 2885, 2885, 2756, 2756, 2970, 2970, 3125, 3196, 3196, 3070, 3070, 3028,\n", - " 3030, 2976, 3354, 3271, 3268, 3473, 3490, 3605, 3795, 3730, 3682, 3758,\n", - " 3862, 3771, 3950, 3969, 4018, 4027, 4166, 4194, 4183, 4202, 4283, 4321,\n", - " 4321, 4574, 4574, 4959, 4767, 4770, 4770, 4871, 4963, 5078, 5061, 5061,\n", - " 5229, 5229, 5062, 5167, 5153, 5303, 5177, 5216, 5324, 5747, 5458, 5458,\n", - " 5483, 5483, 5748, 5739, 5742, 5468, 5611, 5621, 5621, 5621, 5715, 5874,\n", - " 5936, 5677, 5940, 6076, 6033, 6030, 6030, 6099, 6099, 6097, 6109, 6097,\n", - " 6097, 6094, 5945, 6132, 6132, 6192, 6192, 6083, 6045, 6231, 6215, 6215,\n", - " 6226, 6098, 6207, 6248],\n", - " [ 8, 33, 91, 53, 116, 14, 8, 18, 74, 45, 47, 74,\n", - " 5, 9, 110, 31, 55, 125, 41, 16, 28, 63, 15, 36,\n", - " 35, 58, 77, 24, 58, 7, 102, 93, 6, 14, 20, 66,\n", - " 68, 56, 124, 16, 18, 97, 88, 95, 114, 43, 119, 99,\n", - " 39, 74, 41, 48, 18, 51, 103, 83, 123, 89, 37, 52,\n", - " 111, 84, 74, 78, 95, 69, 115, 12, 112, 33, 91, 84,\n", - " 22, 72, 60, 114, 13, 24, 101, 22, 90, 69, 127, 38,\n", - " 29, 101, 8, 80, 8, 46, 75, 70, 3, 30, 17, 123,\n", - " 43, 73, 69, 79, 62, 4, 0, 86, 95, 65, 100, 46,\n", - " 37, 87, 4, 123, 107, 21, 57, 105, 29, 109, 117, 123,\n", - " 45, 47, 42, 71, 96, 8, 69, 84, 110, 69, 94, 118,\n", - " 26, 61, 6, 22, 70, 56, 34, 74, 46, 36, 41, 98,\n", - " 54, 74, 49, 122, 104, 111, 41, 70, 24, 10, 40, 74,\n", - " 25, 74, 27, 67, 2, 74, 81, 74, 110, 82, 1, 121,\n", - " 74, 2, 19, 85, 66, 23, 74, 74, 106, 108, 64, 32,\n", - " 59, 126, 76, 74, 50, 74, 11, 120, 45, 92, 24, 44,\n", - " 4, 113, 95, 91]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2930, 2635, 6237, ..., 357, 1223, 5903],\n", - " [ 152, 2, 250, ..., 6412, 6462, 6368]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 58, 92, 70, ..., 4, 15, 21],\n", - " [ 108, 117, 51, ..., 6287, 6310, 6190]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 29, 129, 129, ..., 6368, 6368, 6368],\n", - " [ 368, 348, 232, ..., 232, 652, 227]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 586, 340, 232, ..., 131, 598, 61],\n", - " [ 63, 170, 154, ..., 6514, 6397, 6327]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4186, 3139, 2782, ..., 3199, 6494, 5193],\n", - " [ 111, 120, 55, ..., 6215, 6240, 6098]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 29, 29, 29, ..., 6368, 6368, 6483],\n", - " [1486, 3273, 1264, ..., 6071, 5903, 1667]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 175, 175, 175, ..., 6098, 6098, 6098],\n", - " [1424, 1518, 2685, ..., 5193, 5771, 5608]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005902\n", - "sampling 0.005749\n", - "noi time: 0.000988\n", - "get_vertex_data call: 0.026044\n", - "noi group time: 0.003406\n", - "eoi_group_time: 0.016661\n", - "second half: 0.197608\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31143, 21471, 32616, ..., 1128792, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31143, 21471, 32616, ..., 1128792, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1215810, 1212301, 1228171, ..., 1929225, 1928591, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1215810, 1212301, 1228171, ..., 1929225, 1928591, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137439, 1137204, 1137212, 1141424, 1136228, 1136233, 1136239, 1140282,\n", - " 1140285, 1136349, 1135716, 1135723, 1135727, 1137784, 1137791, 1140785,\n", - " 1140788, 1140799, 1141758, 1136971, 1141440, 1141443, 1146803, 1138897,\n", - " 1149831, 1139811, 1145373, 1146978, 1138930, 1138933, 1143363, 1139609,\n", - " 1150497, 1139866, 1134937, 1155686, 1155689, 1143820, 1147473, 1135990,\n", - " 1135992, 1142881, 1144636, 1153008, 1135947, 1135104, 1138344, 1148546,\n", - " 1153220, 1153231, 1147096, 1141912, 1155014, 1147202, 1147211, 1136685,\n", - " 1150329, 1151548, 1140531, 1140540, 1138112, 1138119, 1137254, 1151520,\n", - " 1140953, 1135367, 1135202, 1134970, 1141036, 1134794, 1157443, 1143382,\n", - " 1136178, 1143069, 1136619, 1144395, 1137521, 1152376, 1136662, 1137448,\n", - " 1143317, 1143321, 1135265, 1156159, 1141702, 1135583, 1142594, 1136097,\n", - " 1136101, 1148860, 1138514, 1158136, 1156899, 1135522, 1138305, 1136354,\n", - " 1139878, 1138436, 1138440, 1138445, 1138449, 1138462, 1136594, 1135122,\n", - " 1149328, 1138846, 1138847, 1135088, 1156605, 1156606, 1142611, 1142616,\n", - " 1135352, 1135359, 1135631, 1138177, 1145843, 1148533, 1139673, 1159195,\n", - " 1142255, 1165568, 1134992, 1142434, 1136551, 1152651, 1148805, 1135776,\n", - " 1140199, 1159009, 1159012, 1159019, 1141070, 1144410, 1153543, 1139933,\n", - " 1138648, 1138148, 1155661, 1141992, 1141997, 1152044, 1140660, 1137728,\n", - " 1134922, 1134742, 1135549, 1137893, 1141088, 1141095, 1141098, 1139889,\n", - " 1136397, 1143767, 1154851, 1143221, 1149982, 1146832, 1135860, 1139436,\n", - " 1136637, 1139386, 1141657, 1136917, 1139730, 1143678, 1140607, 1139495,\n", - " 1136760, 1141609, 1144650, 1144655, 1134979, 1142063, 1141821, 1143158,\n", - " 1143153, 1158749, 1137762, 1149111, 1139190, 1141475, 1137067, 1142917,\n", - " 1142913, 1137661, 1137662, 1138424, 1144445, 1144596, 1144603, 1136867,\n", - " 1145298, 1144041, 1144182, 1137614, 1137606, 1150906, 1144865, 1137365,\n", - " 1139559, 1137841, 1161710, 1147153, 1136378, 1149194, 1141365, 1153068,\n", - " 1141664, 1149090, 1149093, 1139022, 1144284, 1144279, 1139510, 1139127,\n", - " 1143779, 1140619, 1140990, 1140984, 1145873, 1149876, 1143551, 1152976,\n", - " 1135457, 1141925, 1146898, 1146901, 1144242, 1145328, 1140580, 1141853,\n", - " 1137149, 1150692, 1143643, 1141377, 1163657, 1146005, 1146024, 1154323,\n", - " 1149928, 1147084, 1141235, 1141236, 1139990, 1143293, 1143283, 1143294,\n", - " 1147543, 1147540, 1148763, 1147282, 1142829, 1142816, 1136330, 1140348,\n", - " 1149366, 1139417, 1148009, 1149608, 1143052, 1136160, 1157720, 1136836,\n", - " 1139329, 1141496, 1136445, 1142159, 1145427, 1143345, 1144619, 1144615,\n", - " 1144086, 1144088, 1138600, 1135747, 1135876, 1135818, 1143456, 1143457,\n", - " 1140483, 1143937, 1164017, 1147574, 1155700, 1146628, 1147521, 1140363,\n", - " 1140364, 1137990, 1143075, 1166410, 1148966, 1144219, 1147984, 1147999,\n", - " 1146949, 1134899, 1139252, 1145462, 1147244, 1148704, 1148715, 1142700,\n", - " 1141327, 1141825, 1141836, 1146745, 1146751, 1148473, 1153702, 1147056,\n", - " 1147064, 1149722, 1147025, 1141124, 1141131, 1158228, 1158230, 1143922,\n", - " 1151644, 1145232, 1145240, 1145751, 1138638, 1148387, 1148397, 1146178,\n", - " 1146180, 1152530, 1150275, 1150438, 1150445, 1149250, 1149258, 1149787,\n", - " 1149791, 1144526, 1154831, 1152023, 1154260, 1154271, 1135504, 1146723,\n", - " 1149586, 1140566, 1150127, 1147019, 1147021, 1158949, 1144825, 1148744,\n", - " 1149996, 1147653, 1143560, 1143552, 1149412, 1148288, 1148300, 1135076,\n", - " 1164894, 1154420, 1148180, 1148188, 1139718, 1146675, 1146676, 1146686,\n", - " 1152481, 1152494, 1157968, 1157983, 1157974, 1148720, 1148725, 1148729,\n", - " 1146549, 1149810, 1143895, 1148204, 1148108, 1171939, 1154203, 1154168,\n", - " 1153188, 1167960, 1150935, 1150352, 1150356, 1148084, 1151816, 1152581,\n", - " 1135307, 1135303, 1151915, 1154183, 1154182, 1148500, 1141420, 1151345,\n", - " 1147602, 1146616, 1146623, 1144468, 1144476, 1152849, 1153026, 1137746,\n", - " 1137756, 1140521, 1155140, 1151962, 1157107, 1155337, 1154119, 1155358,\n", - " 1157835, 1151617, 1136788, 1148916, 1150609, 1144529, 1151311, 1158417,\n", - " 1156826, 1153310, 1153311, 1138281, 1152294, 1156007, 1156002, 1136028,\n", - " 1136029, 1158704, 1156608, 1156622, 1151064, 1152888, 1156422, 1137539,\n", - " 1150156, 1150162, 1150164, 1153686, 1148040, 1152597, 1149792, 1144661,\n", - " 1144669, 1137048, 1148628, 1158530, 1137458, 1135705, 1155376, 1154377,\n", - " 1139218, 1135434, 1150877, 1156500, 1156505, 1157064, 1157069, 1139473,\n", - " 1150475, 1151788, 1157911, 1150828, 1156935, 1153413, 1147818, 1157790,\n", - " 1151469, 1139525, 1158311, 1155441, 1153359, 1162120, 1144361, 1144355,\n", - " 1138573, 1154528, 1153999, 1150481, 1142755, 1142756, 1156207, 1151379,\n", - " 1140186, 1160399, 1157172, 1149320, 1149519, 1153486, 1155755, 1151431,\n", - " 1135396, 1158096, 1157898, 1155628, 1155631, 1156563, 1158824, 1158325,\n", - " 1157313, 1157323, 1154036, 1157000, 1148839, 1155646, 1143263, 1146938,\n", - " 1154240, 1162190, 1154909, 1150371, 1150379, 1153326, 1155286, 1143517,\n", - " 1151027, 1137152, 1158126, 1149904, 1158192, 1159116, 1138269, 1145687,\n", - " 1145694, 1134685, 1135601, 1148148, 1150661, 1138223, 1157684, 1146321,\n", - " 1140633, 1144463, 1152209, 1152220, 1152498, 1157735, 1159130, 1144843,\n", - " 1155971, 1155975, 1161892, 1155403, 1154605, 1161297, 1136899, 1136909,\n", - " 1136896, 1158760, 1157296, 1158813, 1158815, 1136494, 1136491, 1159241,\n", - " 1156495, 1136640, 1145483, 1183286, 1166424, 1142178, 1157819, 1158547,\n", - " 1161163, 1154340, 1158006, 1155521, 1155529, 1135663, 1164276, 1142663,\n", - " 1150684, 1157751, 1159042, 1159041, 1157944, 1153052, 1153045, 1171551,\n", - " 1144149, 1166256, 1163711, 1156096, 1156107, 1138393, 1150046, 1149063,\n", - " 1145948, 1155479, 1147300, 1142405, 1146870, 1138161, 1164006, 1161771,\n", - " 1163381, 1154590, 1156991, 1161004, 1148771, 1148780, 1171515, 1140641,\n", - " 1141862, 1148600, 1148603, 1164990, 1143139, 1143143, 1155816, 1163207,\n", - " 1158653, 1158655, 1158640, 1156181, 1159025, 1159029, 1159032, 1168096,\n", - " 1152244, 1152247, 1171162, 1155588, 1147567, 1138674, 1158405, 1144977,\n", - " 1144989, 1149022, 1161240, 1144739, 1155054, 1163522, 1141471, 1169474,\n", - " 1161556, 1147426, 1157052, 1156739, 1156744, 1160849, 1150646, 1171040,\n", - " 1144810, 1144812, 1168850, 1180496, 1142724, 1142733, 1142730, 1167777,\n", - " 1145728, 1145738, 1145913, 1148683, 1169282, 1142136, 1145447, 1165746,\n", - " 1152624, 1148124, 1147724, 1145892, 1145902, 1148425, 1163961, 1175240,\n", - " 1143395, 1143404, 1171219, 1154076, 1187020, 1147331, 1147339, 1163636,\n", - " 1144690, 1150783, 1145502, 1151598, 1167817, 1156308, 1155172, 1164835,\n", - " 1156118, 1144336, 1157534, 1138372, 1147746, 1154659, 1154670, 1191401,\n", - " 1169164, 1157331, 1138129, 1151674, 1169353, 1169359, 1154353, 1154364,\n", - " 1158146, 1149689, 1158611, 1158623, 1173047, 1149847, 1157380, 1179898,\n", - " 1152353, 1155931, 1148667, 1169264, 1169144, 1152150, 1153755, 1153754,\n", - " 1164974, 1159658, 1159655, 1169572, 1157153, 1157373, 1147711, 1151850,\n", - " 1148131, 1170490, 1169037, 1154311, 1162106, 1168817, 1140324, 1140326,\n", - " 1166351, 1166682, 1177112, 1150234, 1154148, 1154153, 1167520, 1158176,\n", - " 1167517, 1149169, 1149173, 1179814, 1177440, 1143279, 1167657, 1143420,\n", - " 1184606, 1153803, 1183406, 1171122, 1151509, 1151519, 1182651, 1176269,\n", - " 1161255, 1155262, 1177576, 1177889, 1154718, 1154713, 1157792, 1157795,\n", - " 1143334, 1172550, 1182802, 1171623, 1157133, 1153898, 1164560, 1145626,\n", - " 1145618, 1178757, 1186720, 1183744, 1149755, 1181345, 1153601, 1153609,\n", - " 1186957, 1187948, 1158771, 1158779, 1158512, 1181198, 1167636, 1179069,\n", - " 1158374, 1158380, 1158371, 1155892, 1157272, 1184310, 1140393, 1177772,\n", - " 1186277, 1180521, 1159341, 1168876, 1163421, 1158161, 1161819, 1166783,\n", - " 1147182, 1167395, 1168981, 1164130, 1164133, 1170421, 1190720, 1139828,\n", - " 1139831, 1154806, 1149668, 1182021, 1151288, 1194515, 1156055, 1170000,\n", - " 1146398, 1146395, 1190227, 1149544, 1176390, 1192167, 1182370, 1156846,\n", - " 1169960, 1179517, 1194469, 1140997, 1183389, 1191655, 1181422, 1179852,\n", - " 1162156, 1151774, 1171113, 1191705, 1188125, 1167089, 1194059, 1180997,\n", - " 1172423, 1172122, 1178135, 1180532, 1162670, 1182186, 1181115, 1193580,\n", - " 1192670, 1189075, 1169397, 1169402, 1157017, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137439, 1137204, 1137212, 1141424, 1136228, 1136233, 1136239, 1140282,\n", - " 1140285, 1136349, 1135716, 1135723, 1135727, 1137784, 1137791, 1140785,\n", - " 1140788, 1140799, 1141758, 1136971, 1141440, 1141443, 1146803, 1138897,\n", - " 1149831, 1139811, 1145373, 1146978, 1138930, 1138933, 1143363, 1139609,\n", - " 1150497, 1139866, 1134937, 1155686, 1155689, 1143820, 1147473, 1135990,\n", - " 1135992, 1142881, 1144636, 1153008, 1135947, 1135104, 1138344, 1148546,\n", - " 1153220, 1153231, 1147096, 1141912, 1155014, 1147202, 1147211, 1136685,\n", - " 1150329, 1151548, 1140531, 1140540, 1138112, 1138119, 1137254, 1151520,\n", - " 1140953, 1135367, 1135202, 1134970, 1141036, 1134794, 1157443, 1143382,\n", - " 1136178, 1143069, 1136619, 1144395, 1137521, 1152376, 1136662, 1137448,\n", - " 1143317, 1143321, 1135265, 1156159, 1141702, 1135583, 1142594, 1136097,\n", - " 1136101, 1148860, 1138514, 1158136, 1156899, 1135522, 1138305, 1136354,\n", - " 1139878, 1138436, 1138440, 1138445, 1138449, 1138462, 1136594, 1135122,\n", - " 1149328, 1138846, 1138847, 1135088, 1156605, 1156606, 1142611, 1142616,\n", - " 1135352, 1135359, 1135631, 1138177, 1145843, 1148533, 1139673, 1159195,\n", - " 1142255, 1165568, 1134992, 1142434, 1136551, 1152651, 1148805, 1135776,\n", - " 1140199, 1159009, 1159012, 1159019, 1141070, 1144410, 1153543, 1139933,\n", - " 1138648, 1138148, 1155661, 1141992, 1141997, 1152044, 1140660, 1137728,\n", - " 1134922, 1134742, 1135549, 1137893, 1141088, 1141095, 1141098, 1139889,\n", - " 1136397, 1143767, 1154851, 1143221, 1149982, 1146832, 1135860, 1139436,\n", - " 1136637, 1139386, 1141657, 1136917, 1139730, 1143678, 1140607, 1139495,\n", - " 1136760, 1141609, 1144650, 1144655, 1134979, 1142063, 1141821, 1143158,\n", - " 1143153, 1158749, 1137762, 1149111, 1139190, 1141475, 1137067, 1142917,\n", - " 1142913, 1137661, 1137662, 1138424, 1144445, 1144596, 1144603, 1136867,\n", - " 1145298, 1144041, 1144182, 1137614, 1137606, 1150906, 1144865, 1137365,\n", - " 1139559, 1137841, 1161710, 1147153, 1136378, 1149194, 1141365, 1153068,\n", - " 1141664, 1149090, 1149093, 1139022, 1144284, 1144279, 1139510, 1139127,\n", - " 1143779, 1140619, 1140990, 1140984, 1145873, 1149876, 1143551, 1152976,\n", - " 1135457, 1141925, 1146898, 1146901, 1144242, 1145328, 1140580, 1141853,\n", - " 1137149, 1150692, 1143643, 1141377, 1163657, 1146005, 1146024, 1154323,\n", - " 1149928, 1147084, 1141235, 1141236, 1139990, 1143293, 1143283, 1143294,\n", - " 1147543, 1147540, 1148763, 1147282, 1142829, 1142816, 1136330, 1140348,\n", - " 1149366, 1139417, 1148009, 1149608, 1143052, 1136160, 1157720, 1136836,\n", - " 1139329, 1141496, 1136445, 1142159, 1145427, 1143345, 1144619, 1144615,\n", - " 1144086, 1144088, 1138600, 1135747, 1135876, 1135818, 1143456, 1143457,\n", - " 1140483, 1143937, 1164017, 1147574, 1155700, 1146628, 1147521, 1140363,\n", - " 1140364, 1137990, 1143075, 1166410, 1148966, 1144219, 1147984, 1147999,\n", - " 1146949, 1134899, 1139252, 1145462, 1147244, 1148704, 1148715, 1142700,\n", - " 1141327, 1141825, 1141836, 1146745, 1146751, 1148473, 1153702, 1147056,\n", - " 1147064, 1149722, 1147025, 1141124, 1141131, 1158228, 1158230, 1143922,\n", - " 1151644, 1145232, 1145240, 1145751, 1138638, 1148387, 1148397, 1146178,\n", - " 1146180, 1152530, 1150275, 1150438, 1150445, 1149250, 1149258, 1149787,\n", - " 1149791, 1144526, 1154831, 1152023, 1154260, 1154271, 1135504, 1146723,\n", - " 1149586, 1140566, 1150127, 1147019, 1147021, 1158949, 1144825, 1148744,\n", - " 1149996, 1147653, 1143560, 1143552, 1149412, 1148288, 1148300, 1135076,\n", - " 1164894, 1154420, 1148180, 1148188, 1139718, 1146675, 1146676, 1146686,\n", - " 1152481, 1152494, 1157968, 1157983, 1157974, 1148720, 1148725, 1148729,\n", - " 1146549, 1149810, 1143895, 1148204, 1148108, 1171939, 1154203, 1154168,\n", - " 1153188, 1167960, 1150935, 1150352, 1150356, 1148084, 1151816, 1152581,\n", - " 1135307, 1135303, 1151915, 1154183, 1154182, 1148500, 1141420, 1151345,\n", - " 1147602, 1146616, 1146623, 1144468, 1144476, 1152849, 1153026, 1137746,\n", - " 1137756, 1140521, 1155140, 1151962, 1157107, 1155337, 1154119, 1155358,\n", - " 1157835, 1151617, 1136788, 1148916, 1150609, 1144529, 1151311, 1158417,\n", - " 1156826, 1153310, 1153311, 1138281, 1152294, 1156007, 1156002, 1136028,\n", - " 1136029, 1158704, 1156608, 1156622, 1151064, 1152888, 1156422, 1137539,\n", - " 1150156, 1150162, 1150164, 1153686, 1148040, 1152597, 1149792, 1144661,\n", - " 1144669, 1137048, 1148628, 1158530, 1137458, 1135705, 1155376, 1154377,\n", - " 1139218, 1135434, 1150877, 1156500, 1156505, 1157064, 1157069, 1139473,\n", - " 1150475, 1151788, 1157911, 1150828, 1156935, 1153413, 1147818, 1157790,\n", - " 1151469, 1139525, 1158311, 1155441, 1153359, 1162120, 1144361, 1144355,\n", - " 1138573, 1154528, 1153999, 1150481, 1142755, 1142756, 1156207, 1151379,\n", - " 1140186, 1160399, 1157172, 1149320, 1149519, 1153486, 1155755, 1151431,\n", - " 1135396, 1158096, 1157898, 1155628, 1155631, 1156563, 1158824, 1158325,\n", - " 1157313, 1157323, 1154036, 1157000, 1148839, 1155646, 1143263, 1146938,\n", - " 1154240, 1162190, 1154909, 1150371, 1150379, 1153326, 1155286, 1143517,\n", - " 1151027, 1137152, 1158126, 1149904, 1158192, 1159116, 1138269, 1145687,\n", - " 1145694, 1134685, 1135601, 1148148, 1150661, 1138223, 1157684, 1146321,\n", - " 1140633, 1144463, 1152209, 1152220, 1152498, 1157735, 1159130, 1144843,\n", - " 1155971, 1155975, 1161892, 1155403, 1154605, 1161297, 1136899, 1136909,\n", - " 1136896, 1158760, 1157296, 1158813, 1158815, 1136494, 1136491, 1159241,\n", - " 1156495, 1136640, 1145483, 1183286, 1166424, 1142178, 1157819, 1158547,\n", - " 1161163, 1154340, 1158006, 1155521, 1155529, 1135663, 1164276, 1142663,\n", - " 1150684, 1157751, 1159042, 1159041, 1157944, 1153052, 1153045, 1171551,\n", - " 1144149, 1166256, 1163711, 1156096, 1156107, 1138393, 1150046, 1149063,\n", - " 1145948, 1155479, 1147300, 1142405, 1146870, 1138161, 1164006, 1161771,\n", - " 1163381, 1154590, 1156991, 1161004, 1148771, 1148780, 1171515, 1140641,\n", - " 1141862, 1148600, 1148603, 1164990, 1143139, 1143143, 1155816, 1163207,\n", - " 1158653, 1158655, 1158640, 1156181, 1159025, 1159029, 1159032, 1168096,\n", - " 1152244, 1152247, 1171162, 1155588, 1147567, 1138674, 1158405, 1144977,\n", - " 1144989, 1149022, 1161240, 1144739, 1155054, 1163522, 1141471, 1169474,\n", - " 1161556, 1147426, 1157052, 1156739, 1156744, 1160849, 1150646, 1171040,\n", - " 1144810, 1144812, 1168850, 1180496, 1142724, 1142733, 1142730, 1167777,\n", - " 1145728, 1145738, 1145913, 1148683, 1169282, 1142136, 1145447, 1165746,\n", - " 1152624, 1148124, 1147724, 1145892, 1145902, 1148425, 1163961, 1175240,\n", - " 1143395, 1143404, 1171219, 1154076, 1187020, 1147331, 1147339, 1163636,\n", - " 1144690, 1150783, 1145502, 1151598, 1167817, 1156308, 1155172, 1164835,\n", - " 1156118, 1144336, 1157534, 1138372, 1147746, 1154659, 1154670, 1191401,\n", - " 1169164, 1157331, 1138129, 1151674, 1169353, 1169359, 1154353, 1154364,\n", - " 1158146, 1149689, 1158611, 1158623, 1173047, 1149847, 1157380, 1179898,\n", - " 1152353, 1155931, 1148667, 1169264, 1169144, 1152150, 1153755, 1153754,\n", - " 1164974, 1159658, 1159655, 1169572, 1157153, 1157373, 1147711, 1151850,\n", - " 1148131, 1170490, 1169037, 1154311, 1162106, 1168817, 1140324, 1140326,\n", - " 1166351, 1166682, 1177112, 1150234, 1154148, 1154153, 1167520, 1158176,\n", - " 1167517, 1149169, 1149173, 1179814, 1177440, 1143279, 1167657, 1143420,\n", - " 1184606, 1153803, 1183406, 1171122, 1151509, 1151519, 1182651, 1176269,\n", - " 1161255, 1155262, 1177576, 1177889, 1154718, 1154713, 1157792, 1157795,\n", - " 1143334, 1172550, 1182802, 1171623, 1157133, 1153898, 1164560, 1145626,\n", - " 1145618, 1178757, 1186720, 1183744, 1149755, 1181345, 1153601, 1153609,\n", - " 1186957, 1187948, 1158771, 1158779, 1158512, 1181198, 1167636, 1179069,\n", - " 1158374, 1158380, 1158371, 1155892, 1157272, 1184310, 1140393, 1177772,\n", - " 1186277, 1180521, 1159341, 1168876, 1163421, 1158161, 1161819, 1166783,\n", - " 1147182, 1167395, 1168981, 1164130, 1164133, 1170421, 1190720, 1139828,\n", - " 1139831, 1154806, 1149668, 1182021, 1151288, 1194515, 1156055, 1170000,\n", - " 1146398, 1146395, 1190227, 1149544, 1176390, 1192167, 1182370, 1156846,\n", - " 1169960, 1179517, 1194469, 1140997, 1183389, 1191655, 1181422, 1179852,\n", - " 1162156, 1151774, 1171113, 1191705, 1188125, 1167089, 1194059, 1180997,\n", - " 1172423, 1172122, 1178135, 1180532, 1162670, 1182186, 1181115, 1193580,\n", - " 1192670, 1189075, 1169397, 1169402, 1157017, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1198770, 1195697, 1199439, 1195397, 1199736, 1198731, 1195860, 1199282,\n", - " 1201577, 1201582, 1202119, 1201015, 1201016, 1198694, 1198702, 1202803,\n", - " 1198546, 1198557, 1196685, 1199053, 1194651, 1195263, 1197923, 1201992,\n", - " 1196030, 1198542, 1195828, 1197766, 1196461, 1195888, 1199171, 1197856,\n", - " 1196359, 1196517, 1194759, 1196837, 1196711, 1199823, 1195265, 1196249,\n", - " 1198219, 1195038, 1195541, 1199314, 1197474, 1195910, 1196281, 1196283,\n", - " 1195353, 1200959, 1197129, 1197291, 1195119, 1199685, 1199628, 1197990,\n", - " 1197994, 1200872, 1199152, 1199154, 1198406, 1199231, 1201910, 1201916,\n", - " 1199745, 1199676, 1194795, 1201511, 1196498, 1196508, 1197970, 1197609,\n", - " 1197957, 1196727, 1202618, 1198428, 1200018, 1200154, 1199555, 1201827,\n", - " 1195592, 1202631, 1194805, 1199546, 1202640, 1201042, 1200363, 1199532,\n", - " 1200546, 1200553, 1200315, 1197097, 1197100, 1199877, 1200853, 1196883,\n", - " 1199908, 1201442, 1202239, 1202175, 1195885, 1201291, 1195607, 1202889,\n", - " 1196966, 1200784, 1199606, 1195048, 1203113, 1195676, 1200684, 1198911,\n", - " 1197822, 1197823, 1198114, 1198127, 1196597, 1199659, 1194730, 1198147,\n", - " 1200003, 1197735, 1198819, 1201886, 1197652, 1197655, 1194908, 1203166,\n", - " 1196428], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1198770, 1195697, 1199439, 1195397, 1199736, 1198731, 1195860, 1199282,\n", - " 1201577, 1201582, 1202119, 1201015, 1201016, 1198694, 1198702, 1202803,\n", - " 1198546, 1198557, 1196685, 1199053, 1194651, 1195263, 1197923, 1201992,\n", - " 1196030, 1198542, 1195828, 1197766, 1196461, 1195888, 1199171, 1197856,\n", - " 1196359, 1196517, 1194759, 1196837, 1196711, 1199823, 1195265, 1196249,\n", - " 1198219, 1195038, 1195541, 1199314, 1197474, 1195910, 1196281, 1196283,\n", - " 1195353, 1200959, 1197129, 1197291, 1195119, 1199685, 1199628, 1197990,\n", - " 1197994, 1200872, 1199152, 1199154, 1198406, 1199231, 1201910, 1201916,\n", - " 1199745, 1199676, 1194795, 1201511, 1196498, 1196508, 1197970, 1197609,\n", - " 1197957, 1196727, 1202618, 1198428, 1200018, 1200154, 1199555, 1201827,\n", - " 1195592, 1202631, 1194805, 1199546, 1202640, 1201042, 1200363, 1199532,\n", - " 1200546, 1200553, 1200315, 1197097, 1197100, 1199877, 1200853, 1196883,\n", - " 1199908, 1201442, 1202239, 1202175, 1195885, 1201291, 1195607, 1202889,\n", - " 1196966, 1200784, 1199606, 1195048, 1203113, 1195676, 1200684, 1198911,\n", - " 1197822, 1197823, 1198114, 1198127, 1196597, 1199659, 1194730, 1198147,\n", - " 1200003, 1197735, 1198819, 1201886, 1197652, 1197655, 1194908, 1203166,\n", - " 1196428], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.1075e-01, -2.6651e-04, 6.9062e-01, ..., 1.3342e-01,\n", - " -2.0865e-03, -4.8313e-03],\n", - " [ 3.3284e-02, -1.4092e-04, 7.6009e-02, ..., 4.1521e-02,\n", - " -1.1156e-03, -1.5161e-03],\n", - " [ 1.2578e-01, -3.8778e-04, 7.5794e-01, ..., 1.3613e-01,\n", - " -1.9239e-03, -4.7740e-03],\n", - " ...,\n", - " [ 2.4815e-01, -5.8711e-04, 1.0339e+00, ..., 1.1001e-01,\n", - " -1.8086e-03, -6.8858e-03],\n", - " [ 1.2848e-01, 1.5444e-02, 6.8528e-01, ..., 1.3011e-01,\n", - " -2.0121e-03, -4.2327e-03],\n", - " [ 2.5296e-01, -3.1016e-04, 1.0267e+00, ..., 1.1647e-01,\n", - " -1.8209e-03, -6.6583e-03]], device='cuda:0'), 'paper': tensor([[ 5.7582e-01, -1.8126e-03, 2.1354e+00, ..., -2.1286e-03,\n", - " -3.6192e-02, 4.2954e-01],\n", - " [ 3.3105e-01, 1.0439e+00, 2.7967e+00, ..., -5.0392e-03,\n", - " -2.4256e-02, -8.1743e-03],\n", - " [ 1.8651e+00, 1.8555e+00, 1.0978e+00, ..., -1.2491e-02,\n", - " -2.2580e-02, 1.5375e+00],\n", - " ...,\n", - " [ 8.1326e-01, 1.3346e+00, 2.5839e+00, ..., -8.4545e-03,\n", - " -2.6932e-02, -1.7145e-03],\n", - " [ 8.5888e-02, 7.8362e-01, 2.9543e+00, ..., -5.5897e-03,\n", - " -2.5225e-02, -1.2119e-02],\n", - " [ 1.7837e+00, 1.4742e+00, 3.3471e+00, ..., 2.4622e+00,\n", - " -5.7030e-02, 4.0187e+00]], device='cuda:0'), 'author': tensor([[-1.4064e-03, 3.4156e-01, 1.4631e-01, ..., 1.7310e+00,\n", - " 1.2861e-01, 6.9943e-02],\n", - " [-1.1809e-03, 2.9681e-01, 2.6704e-01, ..., 1.6108e+00,\n", - " -4.2496e-04, -5.3246e-04],\n", - " [-1.9481e-03, 3.2055e-01, 2.4701e-01, ..., 1.7040e+00,\n", - " -9.5708e-04, -9.2335e-04],\n", - " ...,\n", - " [-6.2942e-04, 2.9830e-02, 1.2906e-01, ..., 1.6955e-01,\n", - " -1.0748e-04, -6.7757e-04],\n", - " [-1.0459e-03, 2.5793e-01, 1.5795e-01, ..., 1.6474e+00,\n", - " 1.6390e-01, 5.3643e-02],\n", - " [-1.6092e-03, 2.5930e-01, 2.5846e-01, ..., 1.7087e+00,\n", - " 8.1279e-02, -2.9219e-04]], device='cuda:0'), 'field_of_study': tensor([[ 0.1864, 0.9021, 0.4607, ..., -0.0060, 0.3441, 0.0066],\n", - " [ 0.0605, 0.7622, 0.3574, ..., -0.0089, 0.3478, 0.2874],\n", - " [ 0.0487, 0.7108, 0.4521, ..., -0.0078, 0.1566, 0.4619],\n", - " ...,\n", - " [ 0.0780, 0.5119, 0.2822, ..., -0.0053, 0.2862, 0.0812],\n", - " [ 0.0307, 0.7361, 0.4116, ..., -0.0093, 0.3244, 0.4087],\n", - " [ 0.2502, 0.7902, 0.5053, ..., -0.0070, 0.3219, 0.0422]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 25, 260, 275, 286, 270, 270, 270, 455, 477, 304, 304, 495,\n", - " 557, 557, 557, 1183, 942, 984, 817, 831, 1033, 1089, 1028, 1205,\n", - " 1122, 1124, 1124, 1346, 1366, 1456, 1310, 1290, 1335, 1411, 1373, 1581,\n", - " 1625, 1559, 1547, 1568, 1707, 1666, 1691, 1781, 1615, 1718, 1911, 1911,\n", - " 2011, 2091, 2067, 2067, 2067, 2067, 2067, 2043, 1933, 1933, 2057, 2057,\n", - " 2053, 1992, 2001, 2001, 2247, 2237, 2298, 2336, 2323, 2323, 2348, 2263,\n", - " 2263, 2594, 2494, 2352, 2450, 2555, 2555, 2490, 2579, 2677, 2574, 2673,\n", - " 2650, 2752, 2696, 2696, 2758, 2724, 2764, 2764, 2764, 2764, 2690, 2717,\n", - " 2764, 2764, 3045, 3066, 2963, 3176, 3072, 3072, 3140, 3229, 3195, 3195,\n", - " 3217, 3201, 3496, 3350, 3501, 3377, 3579, 3579, 3622, 3622, 3781, 3781,\n", - " 3781, 3766, 3793, 3716, 3843, 3798, 3798, 3798, 3969, 3876, 3665, 4028,\n", - " 3986, 3994, 3852, 4147, 4099, 4087, 4013, 4159, 4123, 4226, 4213, 4213,\n", - " 4435, 4314, 4398, 4441, 4441, 4345, 4345, 4385, 4385, 4381, 4617, 4520,\n", - " 4392, 4590, 5021, 4868, 5054, 4861, 5068, 5068, 4996, 4996, 5267, 5156,\n", - " 5260, 5260, 5369, 5478, 5307, 5521, 5521, 5521, 5239, 5239, 5862, 5319,\n", - " 5319, 5661, 5734, 5734, 5664, 5769, 5912, 5760, 5730, 6098, 6020, 6051,\n", - " 6051, 6096, 6130, 6274, 6225, 6225, 6265],\n", - " [ 73, 89, 125, 126, 117, 86, 103, 14, 52, 88, 98, 77,\n", - " 52, 68, 89, 89, 97, 64, 19, 115, 49, 76, 28, 7,\n", - " 106, 1, 69, 31, 90, 114, 126, 106, 105, 22, 74, 8,\n", - " 15, 82, 43, 2, 21, 106, 19, 95, 74, 102, 113, 3,\n", - " 106, 35, 20, 2, 45, 53, 85, 48, 18, 104, 83, 29,\n", - " 19, 23, 113, 3, 100, 83, 11, 73, 111, 0, 22, 13,\n", - " 25, 19, 11, 73, 83, 85, 21, 36, 29, 92, 44, 21,\n", - " 110, 56, 54, 32, 39, 125, 6, 33, 128, 69, 42, 58,\n", - " 78, 81, 114, 102, 9, 116, 52, 23, 113, 51, 21, 17,\n", - " 120, 114, 65, 122, 107, 61, 23, 30, 37, 99, 93, 115,\n", - " 94, 21, 66, 5, 91, 46, 11, 116, 43, 118, 124, 27,\n", - " 16, 83, 110, 62, 72, 27, 108, 27, 98, 127, 21, 17,\n", - " 67, 27, 10, 89, 54, 63, 119, 109, 79, 4, 123, 84,\n", - " 26, 101, 54, 73, 107, 59, 56, 34, 47, 60, 11, 65,\n", - " 32, 54, 80, 73, 36, 40, 54, 126, 17, 21, 112, 58,\n", - " 24, 70, 96, 12, 21, 26, 87, 9, 121, 41, 57, 70,\n", - " 73, 50, 75, 55, 38, 112, 71]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1351, 1652, 914, ..., 4873, 4870, 5910],\n", - " [ 51, 26, 35, ..., 6746, 6746, 6529]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 77, 83, 52, ..., 17, 69, 83],\n", - " [ 113, 188, 36, ..., 6280, 6251, 6233]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 305, 246, 4, ..., 6608, 6738, 6696],\n", - " [ 301, 822, 185, ..., 525, 301, 301]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 787, 301, 11, ..., 614, 530, 313],\n", - " [ 269, 169, 201, ..., 6647, 6649, 6728]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4177, 4998, 2535, ..., 3897, 3546, 6710],\n", - " [ 31, 44, 22, ..., 6239, 6259, 6254]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 4, 4, 4, ..., 6711, 6694, 6696],\n", - " [4708, 1666, 1656, ..., 2095, 120, 3276]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 181, 181, 181, ..., 6265, 6265, 6265],\n", - " [ 244, 728, 712, ..., 3658, 3885, 6719]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005355\n", - "sampling 0.005276\n", - "noi time: 0.002031\n", - "get_vertex_data call: 0.036243\n", - "noi group time: 0.002842\n", - "eoi_group_time: 0.012836\n", - "second half: 0.209318\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24187, 4080, 10012, ..., 1100734, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24187, 4080, 10012, ..., 1100734, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1221601, 1203800, 1230561, ..., 1936972, 1936974, 1936964],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1221601, 1203800, 1230561, ..., 1936972, 1936974, 1936964],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1136228, 1140282, 1135933, 1135716, 1140785, 1140799, 1139701,\n", - " 1141758, 1138335, 1136971, 1139811, 1145984, 1138930, 1138933, 1138942,\n", - " 1138936, 1139241, 1146640, 1140781, 1150503, 1150509, 1134937, 1149217,\n", - " 1149220, 1155683, 1155689, 1149640, 1147473, 1147483, 1147221, 1147226,\n", - " 1153948, 1144636, 1134700, 1148343, 1152666, 1148546, 1141904, 1137220,\n", - " 1139364, 1139371, 1136685, 1136268, 1146369, 1146376, 1146375, 1138745,\n", - " 1134667, 1137829, 1136308, 1151520, 1134735, 1140020, 1135367, 1135202,\n", - " 1154739, 1141036, 1136289, 1134794, 1157447, 1143069, 1137687, 1136619,\n", - " 1144389, 1144395, 1137529, 1137534, 1135408, 1136662, 1137441, 1139161,\n", - " 1141702, 1135977, 1135579, 1140970, 1138514, 1153094, 1158136, 1136985,\n", - " 1156899, 1135522, 1138436, 1138440, 1136542, 1138450, 1138461, 1138449,\n", - " 1136599, 1149328, 1138834, 1135101, 1138695, 1138694, 1138882, 1156606,\n", - " 1147112, 1147118, 1142611, 1135355, 1138181, 1148531, 1137113, 1137109,\n", - " 1141520, 1139668, 1139673, 1142255, 1134992, 1134771, 1142434, 1136551,\n", - " 1139755, 1140199, 1158974, 1139321, 1153543, 1140034, 1138654, 1138148,\n", - " 1141966, 1141985, 1152044, 1142302, 1140660, 1137734, 1137728, 1134741,\n", - " 1138240, 1135540, 1137889, 1141095, 1141097, 1141100, 1162946, 1135291,\n", - " 1139632, 1143711, 1139025, 1149968, 1141690, 1136637, 1142932, 1159799,\n", - " 1136917, 1144237, 1144239, 1140598, 1141785, 1136760, 1141300, 1134979,\n", - " 1147850, 1149433, 1149435, 1141810, 1141821, 1143166, 1145154, 1143580,\n", - " 1158595, 1139194, 1141479, 1138709, 1138708, 1137660, 1137661, 1138418,\n", - " 1143107, 1143113, 1144596, 1140442, 1144182, 1150898, 1146201, 1158698,\n", - " 1158703, 1147153, 1149193, 1149197, 1141365, 1141367, 1141725, 1149088,\n", - " 1144279, 1139508, 1139510, 1139763, 1140089, 1139127, 1145213, 1140979,\n", - " 1140990, 1140984, 1146702, 1135047, 1147050, 1145873, 1152976, 1152980,\n", - " 1139447, 1141925, 1146898, 1144242, 1145337, 1140580, 1165366, 1141841,\n", - " 1141846, 1141853, 1137570, 1145971, 1145979, 1143845, 1146008, 1136273,\n", - " 1146024, 1150606, 1149933, 1139990, 1146302, 1147543, 1147150, 1148763,\n", - " 1147282, 1142829, 1149160, 1147469, 1139415, 1148009, 1143051, 1143040,\n", - " 1157720, 1136836, 1136843, 1144771, 1136445, 1144946, 1143345, 1144765,\n", - " 1144753, 1144611, 1144619, 1144615, 1145813, 1144088, 1135876, 1146526,\n", - " 1143457, 1137711, 1142015, 1143937, 1140360, 1140364, 1137994, 1143080,\n", - " 1166410, 1144725, 1147999, 1146949, 1134899, 1139252, 1139249, 1145457,\n", - " 1148704, 1142702, 1141319, 1141327, 1146751, 1146742, 1148473, 1153701,\n", - " 1141131, 1158226, 1143922, 1143931, 1141137, 1145240, 1145751, 1142376,\n", - " 1146147, 1146178, 1146180, 1138863, 1152530, 1152537, 1151179, 1150438,\n", - " 1150445, 1147954, 1155006, 1156468, 1151856, 1149791, 1144524, 1144203,\n", - " 1154823, 1144888, 1154271, 1139914, 1134869, 1142286, 1140564, 1147023,\n", - " 1158944, 1137644, 1149985, 1149991, 1147653, 1143552, 1149412, 1148288,\n", - " 1135073, 1139096, 1154420, 1148180, 1152561, 1136247, 1139721, 1152494,\n", - " 1141177, 1141181, 1141182, 1157968, 1144110, 1143888, 1148204, 1153124,\n", - " 1153192, 1153188, 1150356, 1169587, 1143134, 1147442, 1152581, 1152591,\n", - " 1135303, 1154182, 1150715, 1148498, 1149732, 1147737, 1145086, 1146974,\n", - " 1156403, 1156402, 1146616, 1146623, 1152100, 1152103, 1156325, 1153034,\n", - " 1137746, 1146307, 1146304, 1151952, 1152819, 1155337, 1154633, 1151617,\n", - " 1150578, 1136131, 1136788, 1148914, 1156826, 1138283, 1152300, 1136028,\n", - " 1136029, 1151195, 1151067, 1151058, 1152886, 1142777, 1143483, 1150099,\n", - " 1153913, 1150164, 1148040, 1155202, 1149300, 1155218, 1149798, 1144667,\n", - " 1168185, 1148628, 1158540, 1149942, 1154563, 1154567, 1135698, 1153085,\n", - " 1142047, 1154377, 1157547, 1158857, 1182205, 1156505, 1152384, 1137814,\n", - " 1137823, 1139479, 1143491, 1151257, 1150475, 1135231, 1152179, 1152182,\n", - " 1153413, 1147810, 1147818, 1157779, 1139529, 1158308, 1155441, 1154528,\n", - " 1145771, 1138961, 1142755, 1156207, 1151379, 1158639, 1155122, 1151431,\n", - " 1146913, 1156463, 1158096, 1154763, 1155665, 1155628, 1156563, 1136466,\n", - " 1158823, 1158824, 1148834, 1155646, 1143254, 1143262, 1143263, 1146943,\n", - " 1154240, 1156718, 1154903, 1143189, 1143531, 1150371, 1153322, 1155606,\n", - " 1140746, 1137152, 1158204, 1137381, 1138269, 1134674, 1135601, 1150661,\n", - " 1150659, 1155848, 1155852, 1146326, 1149145, 1144463, 1152220, 1140381,\n", - " 1140374, 1157732, 1144845, 1142466, 1155975, 1153762, 1156812, 1155393,\n", - " 1155403, 1149700, 1159790, 1136899, 1136909, 1136896, 1158886, 1158891,\n", - " 1157296, 1158815, 1156778, 1155246, 1136480, 1136494, 1136491, 1157571,\n", - " 1156488, 1153808, 1156278, 1136640, 1136646, 1134754, 1140049, 1161162,\n", - " 1156516, 1146126, 1158004, 1158006, 1165853, 1142487, 1150674, 1167346,\n", - " 1159042, 1151080, 1157944, 1160563, 1153052, 1153045, 1155770, 1166242,\n", - " 1144158, 1153841, 1156109, 1138393, 1150046, 1159475, 1149063, 1149070,\n", - " 1145945, 1155479, 1153514, 1156247, 1164006, 1149963, 1154590, 1139593,\n", - " 1139284, 1139286, 1139281, 1148021, 1166073, 1159985, 1169315, 1146063,\n", - " 1164423, 1165309, 1140135, 1158878, 1170415, 1140643, 1148607, 1168081,\n", - " 1168168, 1151875, 1141800, 1156177, 1159032, 1160895, 1152247, 1143729,\n", - " 1160605, 1155588, 1138679, 1144984, 1144989, 1169647, 1146500, 1146510,\n", - " 1146509, 1153247, 1166881, 1145137, 1155266, 1155272, 1141471, 1147426,\n", - " 1157044, 1156737, 1156739, 1153660, 1150646, 1171044, 1171040, 1144812,\n", - " 1140115, 1153276, 1135567, 1156292, 1145728, 1166462, 1169509, 1146444,\n", - " 1169212, 1169201, 1184040, 1143025, 1145454, 1145447, 1165746, 1147346,\n", - " 1147355, 1152624, 1145902, 1153534, 1143402, 1170980, 1171867, 1144702,\n", - " 1167817, 1155172, 1150518, 1167915, 1144344, 1144346, 1144336, 1157534,\n", - " 1154670, 1193085, 1154893, 1154885, 1151674, 1169359, 1154364, 1147502,\n", - " 1146344, 1171534, 1158623, 1172575, 1158051, 1173047, 1149846, 1155502,\n", - " 1152353, 1152360, 1165528, 1143172, 1152546, 1152550, 1172838, 1169040,\n", - " 1173307, 1154027, 1159652, 1169583, 1162638, 1157158, 1157153, 1157373,\n", - " 1147711, 1151850, 1148131, 1157592, 1170490, 1160979, 1177708, 1166682,\n", - " 1177178, 1150234, 1154151, 1154148, 1149169, 1178610, 1143279, 1171297,\n", - " 1171299, 1177781, 1186306, 1181756, 1153619, 1182106, 1182651, 1162129,\n", - " 1155250, 1155262, 1154718, 1177584, 1151488, 1172546, 1171623, 1164044,\n", - " 1157124, 1157072, 1158249, 1158253, 1153898, 1154497, 1164200, 1145626,\n", - " 1154834, 1180015, 1161907, 1149755, 1146242, 1153601, 1145092, 1183274,\n", - " 1158512, 1158940, 1155890, 1155892, 1155899, 1185514, 1181971, 1181982,\n", - " 1183069, 1140399, 1171025, 1160078, 1166107, 1164437, 1179130, 1161819,\n", - " 1146161, 1170034, 1185386, 1139831, 1139837, 1167131, 1192076, 1156049,\n", - " 1156055, 1170000, 1151978, 1173183, 1181899, 1191714, 1192426, 1159079,\n", - " 1188169, 1167840, 1190127, 1186492, 1151774, 1193225, 1183618, 1192999,\n", - " 1176041, 1181834, 1186423, 1155959, 1155962, 1190863, 1181699, 1175334,\n", - " 1182855, 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1136228, 1140282, 1135933, 1135716, 1140785, 1140799, 1139701,\n", - " 1141758, 1138335, 1136971, 1139811, 1145984, 1138930, 1138933, 1138942,\n", - " 1138936, 1139241, 1146640, 1140781, 1150503, 1150509, 1134937, 1149217,\n", - " 1149220, 1155683, 1155689, 1149640, 1147473, 1147483, 1147221, 1147226,\n", - " 1153948, 1144636, 1134700, 1148343, 1152666, 1148546, 1141904, 1137220,\n", - " 1139364, 1139371, 1136685, 1136268, 1146369, 1146376, 1146375, 1138745,\n", - " 1134667, 1137829, 1136308, 1151520, 1134735, 1140020, 1135367, 1135202,\n", - " 1154739, 1141036, 1136289, 1134794, 1157447, 1143069, 1137687, 1136619,\n", - " 1144389, 1144395, 1137529, 1137534, 1135408, 1136662, 1137441, 1139161,\n", - " 1141702, 1135977, 1135579, 1140970, 1138514, 1153094, 1158136, 1136985,\n", - " 1156899, 1135522, 1138436, 1138440, 1136542, 1138450, 1138461, 1138449,\n", - " 1136599, 1149328, 1138834, 1135101, 1138695, 1138694, 1138882, 1156606,\n", - " 1147112, 1147118, 1142611, 1135355, 1138181, 1148531, 1137113, 1137109,\n", - " 1141520, 1139668, 1139673, 1142255, 1134992, 1134771, 1142434, 1136551,\n", - " 1139755, 1140199, 1158974, 1139321, 1153543, 1140034, 1138654, 1138148,\n", - " 1141966, 1141985, 1152044, 1142302, 1140660, 1137734, 1137728, 1134741,\n", - " 1138240, 1135540, 1137889, 1141095, 1141097, 1141100, 1162946, 1135291,\n", - " 1139632, 1143711, 1139025, 1149968, 1141690, 1136637, 1142932, 1159799,\n", - " 1136917, 1144237, 1144239, 1140598, 1141785, 1136760, 1141300, 1134979,\n", - " 1147850, 1149433, 1149435, 1141810, 1141821, 1143166, 1145154, 1143580,\n", - " 1158595, 1139194, 1141479, 1138709, 1138708, 1137660, 1137661, 1138418,\n", - " 1143107, 1143113, 1144596, 1140442, 1144182, 1150898, 1146201, 1158698,\n", - " 1158703, 1147153, 1149193, 1149197, 1141365, 1141367, 1141725, 1149088,\n", - " 1144279, 1139508, 1139510, 1139763, 1140089, 1139127, 1145213, 1140979,\n", - " 1140990, 1140984, 1146702, 1135047, 1147050, 1145873, 1152976, 1152980,\n", - " 1139447, 1141925, 1146898, 1144242, 1145337, 1140580, 1165366, 1141841,\n", - " 1141846, 1141853, 1137570, 1145971, 1145979, 1143845, 1146008, 1136273,\n", - " 1146024, 1150606, 1149933, 1139990, 1146302, 1147543, 1147150, 1148763,\n", - " 1147282, 1142829, 1149160, 1147469, 1139415, 1148009, 1143051, 1143040,\n", - " 1157720, 1136836, 1136843, 1144771, 1136445, 1144946, 1143345, 1144765,\n", - " 1144753, 1144611, 1144619, 1144615, 1145813, 1144088, 1135876, 1146526,\n", - " 1143457, 1137711, 1142015, 1143937, 1140360, 1140364, 1137994, 1143080,\n", - " 1166410, 1144725, 1147999, 1146949, 1134899, 1139252, 1139249, 1145457,\n", - " 1148704, 1142702, 1141319, 1141327, 1146751, 1146742, 1148473, 1153701,\n", - " 1141131, 1158226, 1143922, 1143931, 1141137, 1145240, 1145751, 1142376,\n", - " 1146147, 1146178, 1146180, 1138863, 1152530, 1152537, 1151179, 1150438,\n", - " 1150445, 1147954, 1155006, 1156468, 1151856, 1149791, 1144524, 1144203,\n", - " 1154823, 1144888, 1154271, 1139914, 1134869, 1142286, 1140564, 1147023,\n", - " 1158944, 1137644, 1149985, 1149991, 1147653, 1143552, 1149412, 1148288,\n", - " 1135073, 1139096, 1154420, 1148180, 1152561, 1136247, 1139721, 1152494,\n", - " 1141177, 1141181, 1141182, 1157968, 1144110, 1143888, 1148204, 1153124,\n", - " 1153192, 1153188, 1150356, 1169587, 1143134, 1147442, 1152581, 1152591,\n", - " 1135303, 1154182, 1150715, 1148498, 1149732, 1147737, 1145086, 1146974,\n", - " 1156403, 1156402, 1146616, 1146623, 1152100, 1152103, 1156325, 1153034,\n", - " 1137746, 1146307, 1146304, 1151952, 1152819, 1155337, 1154633, 1151617,\n", - " 1150578, 1136131, 1136788, 1148914, 1156826, 1138283, 1152300, 1136028,\n", - " 1136029, 1151195, 1151067, 1151058, 1152886, 1142777, 1143483, 1150099,\n", - " 1153913, 1150164, 1148040, 1155202, 1149300, 1155218, 1149798, 1144667,\n", - " 1168185, 1148628, 1158540, 1149942, 1154563, 1154567, 1135698, 1153085,\n", - " 1142047, 1154377, 1157547, 1158857, 1182205, 1156505, 1152384, 1137814,\n", - " 1137823, 1139479, 1143491, 1151257, 1150475, 1135231, 1152179, 1152182,\n", - " 1153413, 1147810, 1147818, 1157779, 1139529, 1158308, 1155441, 1154528,\n", - " 1145771, 1138961, 1142755, 1156207, 1151379, 1158639, 1155122, 1151431,\n", - " 1146913, 1156463, 1158096, 1154763, 1155665, 1155628, 1156563, 1136466,\n", - " 1158823, 1158824, 1148834, 1155646, 1143254, 1143262, 1143263, 1146943,\n", - " 1154240, 1156718, 1154903, 1143189, 1143531, 1150371, 1153322, 1155606,\n", - " 1140746, 1137152, 1158204, 1137381, 1138269, 1134674, 1135601, 1150661,\n", - " 1150659, 1155848, 1155852, 1146326, 1149145, 1144463, 1152220, 1140381,\n", - " 1140374, 1157732, 1144845, 1142466, 1155975, 1153762, 1156812, 1155393,\n", - " 1155403, 1149700, 1159790, 1136899, 1136909, 1136896, 1158886, 1158891,\n", - " 1157296, 1158815, 1156778, 1155246, 1136480, 1136494, 1136491, 1157571,\n", - " 1156488, 1153808, 1156278, 1136640, 1136646, 1134754, 1140049, 1161162,\n", - " 1156516, 1146126, 1158004, 1158006, 1165853, 1142487, 1150674, 1167346,\n", - " 1159042, 1151080, 1157944, 1160563, 1153052, 1153045, 1155770, 1166242,\n", - " 1144158, 1153841, 1156109, 1138393, 1150046, 1159475, 1149063, 1149070,\n", - " 1145945, 1155479, 1153514, 1156247, 1164006, 1149963, 1154590, 1139593,\n", - " 1139284, 1139286, 1139281, 1148021, 1166073, 1159985, 1169315, 1146063,\n", - " 1164423, 1165309, 1140135, 1158878, 1170415, 1140643, 1148607, 1168081,\n", - " 1168168, 1151875, 1141800, 1156177, 1159032, 1160895, 1152247, 1143729,\n", - " 1160605, 1155588, 1138679, 1144984, 1144989, 1169647, 1146500, 1146510,\n", - " 1146509, 1153247, 1166881, 1145137, 1155266, 1155272, 1141471, 1147426,\n", - " 1157044, 1156737, 1156739, 1153660, 1150646, 1171044, 1171040, 1144812,\n", - " 1140115, 1153276, 1135567, 1156292, 1145728, 1166462, 1169509, 1146444,\n", - " 1169212, 1169201, 1184040, 1143025, 1145454, 1145447, 1165746, 1147346,\n", - " 1147355, 1152624, 1145902, 1153534, 1143402, 1170980, 1171867, 1144702,\n", - " 1167817, 1155172, 1150518, 1167915, 1144344, 1144346, 1144336, 1157534,\n", - " 1154670, 1193085, 1154893, 1154885, 1151674, 1169359, 1154364, 1147502,\n", - " 1146344, 1171534, 1158623, 1172575, 1158051, 1173047, 1149846, 1155502,\n", - " 1152353, 1152360, 1165528, 1143172, 1152546, 1152550, 1172838, 1169040,\n", - " 1173307, 1154027, 1159652, 1169583, 1162638, 1157158, 1157153, 1157373,\n", - " 1147711, 1151850, 1148131, 1157592, 1170490, 1160979, 1177708, 1166682,\n", - " 1177178, 1150234, 1154151, 1154148, 1149169, 1178610, 1143279, 1171297,\n", - " 1171299, 1177781, 1186306, 1181756, 1153619, 1182106, 1182651, 1162129,\n", - " 1155250, 1155262, 1154718, 1177584, 1151488, 1172546, 1171623, 1164044,\n", - " 1157124, 1157072, 1158249, 1158253, 1153898, 1154497, 1164200, 1145626,\n", - " 1154834, 1180015, 1161907, 1149755, 1146242, 1153601, 1145092, 1183274,\n", - " 1158512, 1158940, 1155890, 1155892, 1155899, 1185514, 1181971, 1181982,\n", - " 1183069, 1140399, 1171025, 1160078, 1166107, 1164437, 1179130, 1161819,\n", - " 1146161, 1170034, 1185386, 1139831, 1139837, 1167131, 1192076, 1156049,\n", - " 1156055, 1170000, 1151978, 1173183, 1181899, 1191714, 1192426, 1159079,\n", - " 1188169, 1167840, 1190127, 1186492, 1151774, 1193225, 1183618, 1192999,\n", - " 1176041, 1181834, 1186423, 1155959, 1155962, 1190863, 1181699, 1175334,\n", - " 1182855, 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199428, 1199282, 1201577, 1201582, 1201462, 1201660, 1197359, 1198633,\n", - " 1194745, 1195726, 1195494, 1196631, 1194649, 1195514, 1195263, 1199135,\n", - " 1201992, 1196030, 1195459, 1197760, 1195895, 1199172, 1195740, 1196334,\n", - " 1196359, 1196979, 1198106, 1194759, 1195313, 1196837, 1198668, 1198163,\n", - " 1196704, 1196711, 1199823, 1195148, 1195223, 1195267, 1196247, 1195850,\n", - " 1195541, 1199344, 1197248, 1196283, 1195353, 1198285, 1198282, 1199865,\n", - " 1199060, 1197282, 1195119, 1199685, 1199628, 1197676, 1197990, 1197994,\n", - " 1200872, 1199152, 1199038, 1195018, 1200051, 1196498, 1197970, 1197601,\n", - " 1196727, 1195773, 1200887, 1198428, 1199490, 1199421, 1198811, 1200570,\n", - " 1200503, 1198066, 1201421, 1201155, 1201056, 1200927, 1203350, 1201737,\n", - " 1200553, 1200557, 1200836, 1200429, 1197100, 1199879, 1200862, 1196889,\n", - " 1200194, 1196768, 1197944, 1197945, 1200823, 1200825, 1195876, 1201291,\n", - " 1200398, 1196960, 1196963, 1196966, 1200995, 1199606, 1195048, 1195438,\n", - " 1195679, 1195664, 1198055, 1195181, 1197821, 1198127, 1198973, 1199659,\n", - " 1201138, 1198824, 1199782, 1198819, 1201886, 1198140, 1200298, 1197035,\n", - " 1202077, 1194908, 1196428], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199428, 1199282, 1201577, 1201582, 1201462, 1201660, 1197359, 1198633,\n", - " 1194745, 1195726, 1195494, 1196631, 1194649, 1195514, 1195263, 1199135,\n", - " 1201992, 1196030, 1195459, 1197760, 1195895, 1199172, 1195740, 1196334,\n", - " 1196359, 1196979, 1198106, 1194759, 1195313, 1196837, 1198668, 1198163,\n", - " 1196704, 1196711, 1199823, 1195148, 1195223, 1195267, 1196247, 1195850,\n", - " 1195541, 1199344, 1197248, 1196283, 1195353, 1198285, 1198282, 1199865,\n", - " 1199060, 1197282, 1195119, 1199685, 1199628, 1197676, 1197990, 1197994,\n", - " 1200872, 1199152, 1199038, 1195018, 1200051, 1196498, 1197970, 1197601,\n", - " 1196727, 1195773, 1200887, 1198428, 1199490, 1199421, 1198811, 1200570,\n", - " 1200503, 1198066, 1201421, 1201155, 1201056, 1200927, 1203350, 1201737,\n", - " 1200553, 1200557, 1200836, 1200429, 1197100, 1199879, 1200862, 1196889,\n", - " 1200194, 1196768, 1197944, 1197945, 1200823, 1200825, 1195876, 1201291,\n", - " 1200398, 1196960, 1196963, 1196966, 1200995, 1199606, 1195048, 1195438,\n", - " 1195679, 1195664, 1198055, 1195181, 1197821, 1198127, 1198973, 1199659,\n", - " 1201138, 1198824, 1199782, 1198819, 1201886, 1198140, 1200298, 1197035,\n", - " 1202077, 1194908, 1196428], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 2.3489e-01, -3.1386e-04, 9.7175e-01, ..., 1.1584e-01,\n", - " -1.8786e-03, -6.3509e-03],\n", - " [ 2.3061e-01, -2.0820e-04, 9.5385e-01, ..., 1.0918e-01,\n", - " -1.8631e-03, -6.3392e-03],\n", - " [ 2.1077e-01, -1.5986e-04, 8.5851e-01, ..., 1.0768e-01,\n", - " -1.7793e-03, -5.5518e-03],\n", - " ...,\n", - " [ 1.5205e-01, -4.5661e-04, 8.3893e-01, ..., 1.6529e-01,\n", - " -1.9912e-03, -4.6799e-03],\n", - " [ 1.4003e-01, 1.0894e-02, 8.0368e-01, ..., 1.4797e-01,\n", - " -1.6635e-03, -5.1696e-03],\n", - " [ 2.1077e-01, -1.5986e-04, 8.5851e-01, ..., 1.0768e-01,\n", - " -1.7793e-03, -5.5518e-03]], device='cuda:0'), 'paper': tensor([[ 7.1083e-01, 9.4195e-01, 1.4424e+00, ..., -3.5973e-03,\n", - " -1.8626e-02, 7.5475e-02],\n", - " [ 1.6462e+00, 1.0645e+00, 3.4100e+00, ..., 1.6620e+00,\n", - " -5.3127e-02, 3.3042e+00],\n", - " [-4.1079e-03, -5.6471e-03, 3.4499e+00, ..., -9.3052e-03,\n", - " -3.2764e-02, -1.8560e-02],\n", - " ...,\n", - " [-3.1330e-03, -1.0501e-03, 3.5253e+00, ..., -8.2552e-03,\n", - " -3.0307e-02, -1.6449e-02],\n", - " [ 1.6483e+00, 1.3863e+00, 3.1884e+00, ..., 2.3451e+00,\n", - " -5.5425e-02, 3.7594e+00],\n", - " [ 3.9815e-01, 4.4679e-01, 2.0636e+00, ..., -5.0328e-03,\n", - " -2.1936e-02, -4.7708e-03]], device='cuda:0'), 'author': tensor([[-1.4027e-03, 2.9266e-01, 2.1801e-01, ..., 1.5789e+00,\n", - " -4.3711e-04, -2.5796e-04],\n", - " [-6.2942e-04, 2.9830e-02, 1.2906e-01, ..., 1.6955e-01,\n", - " -1.0748e-04, -6.7757e-04],\n", - " [-2.0584e-03, 2.8996e-01, 2.4777e-01, ..., 1.7625e+00,\n", - " -1.1091e-03, -1.2927e-03],\n", - " ...,\n", - " [-3.0134e-03, 3.0993e-01, 2.6525e-01, ..., 1.4310e+00,\n", - " -2.8805e-03, -2.7856e-03],\n", - " [-1.4679e-03, 3.2749e-01, 2.0413e-01, ..., 1.6952e+00,\n", - " -3.8934e-05, 5.0600e-03],\n", - " [-1.4772e-03, 2.2084e-01, 2.6138e-01, ..., 1.6553e+00,\n", - " 4.9215e-02, -2.9141e-04]], device='cuda:0'), 'field_of_study': tensor([[ 5.5628e-02, 6.9646e-01, 4.5369e-01, ..., -1.0086e-02,\n", - " 2.9101e-01, 4.8803e-01],\n", - " [ 9.6476e-02, 8.3679e-01, 4.2529e-01, ..., -8.6402e-03,\n", - " 3.6626e-01, 3.4997e-01],\n", - " [ 9.8711e-02, 7.8459e-01, 4.1872e-01, ..., -8.7670e-03,\n", - " 3.2343e-01, 3.5116e-01],\n", - " ...,\n", - " [-1.7452e-04, 6.0867e-01, 3.8239e-01, ..., -6.0822e-03,\n", - " 2.2226e-01, 1.9959e-01],\n", - " [ 4.9776e-02, 6.6711e-01, 3.8771e-01, ..., -8.3622e-03,\n", - " 2.4150e-01, 3.9205e-01],\n", - " [ 2.6501e-01, 9.0011e-01, 5.9561e-01, ..., -8.9496e-03,\n", - " 3.8971e-01, 1.4427e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 141, 8, 224, 184, 57, 176, 164, 6, 312, 464, 583, 282,\n", - " 360, 384, 396, 490, 490, 634, 838, 1124, 574, 884, 579, 1108,\n", - " 1084, 989, 946, 1163, 998, 1168, 1149, 1145, 1231, 1623, 1404, 1690,\n", - " 1616, 1826, 1627, 1627, 1726, 1675, 1645, 1745, 1664, 1737, 1664, 1664,\n", - " 1766, 1785, 1785, 1893, 1986, 2032, 2014, 2014, 2170, 2267, 2216, 2216,\n", - " 2360, 2548, 2262, 2462, 2441, 2448, 2448, 2510, 2510, 2513, 2601, 2601,\n", - " 2440, 2561, 2668, 2619, 2599, 2599, 2624, 2634, 2841, 2767, 2767, 2723,\n", - " 2634, 2634, 2803, 2828, 3127, 2910, 2924, 2910, 2910, 3015, 2932, 2932,\n", - " 3148, 3153, 3216, 3151, 3350, 3113, 3350, 3330, 3379, 3489, 3489, 3363,\n", - " 3786, 3786, 3621, 3777, 4103, 4200, 3944, 4250, 4116, 4116, 4290, 4317,\n", - " 4317, 4452, 4445, 4558, 4519, 4566, 4405, 4558, 4558, 4698, 4855, 4672,\n", - " 4627, 4658, 4784, 4901, 5102, 5231, 5041, 5046, 5269, 5421, 5437, 5437,\n", - " 5180, 5583, 5573, 5652, 5566, 5912, 5912, 5821, 5821, 5911, 5911, 5910,\n", - " 5982, 5848, 6235, 6109, 6564, 6564, 6329, 6289, 6665, 6575, 6575, 6368,\n", - " 6608, 6608, 6996, 6956, 6956, 6112, 6926, 6471, 6347, 6347, 6697, 6641,\n", - " 6556, 6556, 6691, 6691, 6547, 6897, 6897, 6395, 6665, 6884, 6884, 6884,\n", - " 6884, 6790, 6790],\n", - " [ 120, 105, 47, 53, 22, 32, 93, 65, 73, 22, 98, 46,\n", - " 84, 22, 64, 61, 89, 99, 116, 39, 79, 81, 17, 31,\n", - " 64, 60, 74, 110, 4, 63, 86, 29, 36, 44, 20, 119,\n", - " 64, 109, 46, 41, 105, 26, 50, 70, 4, 64, 110, 97,\n", - " 121, 14, 118, 44, 96, 113, 64, 111, 15, 14, 44, 85,\n", - " 9, 121, 55, 99, 33, 19, 25, 44, 99, 58, 44, 99,\n", - " 64, 113, 99, 68, 40, 4, 117, 90, 12, 13, 92, 115,\n", - " 106, 47, 52, 45, 64, 8, 31, 116, 88, 43, 57, 64,\n", - " 54, 99, 23, 99, 51, 113, 29, 68, 94, 0, 18, 72,\n", - " 10, 52, 64, 24, 115, 21, 37, 64, 113, 30, 24, 59,\n", - " 75, 111, 64, 50, 6, 22, 68, 16, 49, 26, 100, 82,\n", - " 28, 35, 16, 56, 87, 11, 22, 22, 104, 79, 65, 1,\n", - " 1, 115, 69, 5, 67, 3, 64, 78, 22, 71, 104, 31,\n", - " 7, 83, 28, 101, 64, 80, 39, 66, 95, 64, 101, 103,\n", - " 116, 64, 62, 64, 108, 27, 62, 42, 64, 3, 113, 107,\n", - " 76, 64, 112, 114, 91, 64, 38, 102, 48, 34, 2, 16,\n", - " 122, 64, 77]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1230, 1903, 2198, ..., 5502, 2995, 1884],\n", - " [ 163, 83, 54, ..., 5413, 5447, 5528]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 105, 8, 116, ..., 103, 8, 8],\n", - " [ 52, 5, 131, ..., 6766, 6783, 6971]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 113, 113, 113, ..., 5520, 5520, 5520],\n", - " [ 352, 87, 318, ..., 352, 30, 264]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 352, 205, 306, ..., 264, 76, 80],\n", - " [ 208, 158, 71, ..., 5555, 5570, 5353]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4323, 4252, 997, ..., 2282, 1791, 916],\n", - " [ 48, 68, 57, ..., 6902, 6749, 6749]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 105, 105, 105, ..., 5520, 5520, 5516],\n", - " [1432, 203, 185, ..., 184, 3762, 938]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 57, 57, 57, ..., 7002, 7002, 7002],\n", - " [ 84, 340, 1234, ..., 3130, 5373, 5517]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006553\n", - "sampling 0.006401\n", - "noi time: 0.001899\n", - "get_vertex_data call: 0.037767\n", - "noi group time: 0.003157\n", - "eoi_group_time: 0.015211\n", - "second half: 0.219895\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24187, 20846, 10012, ..., 1100728, 1119043, 1119055],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24187, 20846, 10012, ..., 1100728, 1119043, 1119055],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210831, 1224370, 1209341, ..., 1937998, 1937987, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210831, 1224370, 1209341, ..., 1937998, 1937987, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137435, 1137201, 1137204, 1137212, 1137213, 1137214, 1141424, 1136237,\n", - " 1136239, 1140282, 1140285, 1135926, 1138554, 1135716, 1137784, 1141758,\n", - " 1137506, 1136223, 1142807, 1139462, 1136156, 1136969, 1136971, 1136970,\n", - " 1141443, 1139820, 1139811, 1145370, 1145373, 1146977, 1146978, 1137937,\n", - " 1137271, 1138930, 1138938, 1139141, 1143372, 1143363, 1146644, 1139615,\n", - " 1140781, 1150509, 1142968, 1135376, 1149216, 1149228, 1155689, 1149632,\n", - " 1147473, 1147483, 1147486, 1135990, 1135989, 1142885, 1142881, 1153948,\n", - " 1144636, 1144632, 1146992, 1148337, 1146656, 1150193, 1152664, 1148546,\n", - " 1147089, 1155014, 1139371, 1147211, 1136676, 1136685, 1134715, 1134806,\n", - " 1138742, 1140537, 1140540, 1138112, 1138126, 1151520, 1140147, 1140159,\n", - " 1140953, 1135367, 1135202, 1140758, 1135903, 1141036, 1134794, 1134797,\n", - " 1138504, 1137342, 1136178, 1143069, 1137693, 1136619, 1135340, 1144395,\n", - " 1137529, 1137534, 1135408, 1157395, 1136662, 1137441, 1137025, 1136199,\n", - " 1139161, 1135579, 1135582, 1136098, 1135664, 1140970, 1137953, 1137957,\n", - " 1158136, 1158138, 1156965, 1137008, 1156899, 1135522, 1137291, 1138440,\n", - " 1140079, 1138461, 1157190, 1137924, 1149328, 1138845, 1135088, 1138695,\n", - " 1147112, 1147119, 1142611, 1160825, 1158980, 1158984, 1158982, 1145842,\n", - " 1148531, 1137109, 1137409, 1136449, 1136457, 1139667, 1134992, 1134772,\n", - " 1134780, 1136551, 1135776, 1140206, 1153543, 1140045, 1139085, 1139929,\n", - " 1138148, 1134886, 1146071, 1140557, 1141985, 1152044, 1140657, 1140660,\n", - " 1137728, 1147317, 1134750, 1138240, 1135549, 1136697, 1141097, 1144128,\n", - " 1145347, 1143767, 1143711, 1162716, 1137670, 1139025, 1139033, 1140003,\n", - " 1149979, 1141688, 1154467, 1136632, 1142929, 1141223, 1139386, 1163301,\n", - " 1136917, 1143666, 1143667, 1137188, 1145066, 1144237, 1140598, 1141156,\n", - " 1146449, 1141786, 1139495, 1136757, 1141609, 1144650, 1164807, 1139798,\n", - " 1144428, 1141810, 1141821, 1142093, 1143204, 1140173, 1158749, 1137762,\n", - " 1149111, 1148872, 1148871, 1138708, 1142913, 1138423, 1138424, 1144596,\n", - " 1142453, 1136864, 1144041, 1135315, 1144182, 1137606, 1150906, 1144869,\n", - " 1158698, 1137849, 1147153, 1142646, 1141365, 1141367, 1153068, 1141664,\n", - " 1149101, 1144279, 1139662, 1139127, 1143791, 1140619, 1140977, 1140990,\n", - " 1147050, 1143543, 1152976, 1152982, 1135466, 1141925, 1146900, 1144242,\n", - " 1150255, 1136885, 1139405, 1143643, 1137570, 1141381, 1145980, 1143851,\n", - " 1146019, 1146024, 1147084, 1141235, 1139990, 1143283, 1143883, 1147543,\n", - " 1148763, 1148760, 1147282, 1142829, 1142816, 1138669, 1142629, 1142637,\n", - " 1149608, 1143051, 1143052, 1136160, 1142588, 1144921, 1138922, 1138923,\n", - " 1136836, 1146105, 1139329, 1139328, 1143345, 1144619, 1144615, 1145816,\n", - " 1144093, 1144095, 1138595, 1135751, 1150755, 1150294, 1144375, 1143465,\n", - " 1143457, 1144291, 1143937, 1143949, 1140824, 1140817, 1147525, 1140361,\n", - " 1140364, 1137990, 1143080, 1143075, 1143082, 1168914, 1148966, 1144219,\n", - " 1147995, 1147996, 1147999, 1139252, 1147128, 1148704, 1142697, 1141825,\n", - " 1148468, 1148473, 1153701, 1153703, 1152327, 1152328, 1149718, 1147027,\n", - " 1143839, 1147971, 1145011, 1145021, 1145009, 1139549, 1158224, 1158226,\n", - " 1154526, 1145751, 1142369, 1138638, 1146178, 1146180, 1138861, 1138863,\n", - " 1150438, 1150445, 1149263, 1151867, 1149791, 1149777, 1144526, 1152013,\n", - " 1165252, 1147796, 1151480, 1152026, 1144884, 1145259, 1135504, 1146723,\n", - " 1134869, 1149530, 1149535, 1150127, 1147021, 1141949, 1146772, 1151795,\n", - " 1150723, 1137639, 1147653, 1149420, 1149412, 1148300, 1154420, 1158786,\n", - " 1148180, 1148188, 1151361, 1152561, 1152563, 1136249, 1136247, 1138197,\n", - " 1138877, 1152439, 1157968, 1157970, 1148729, 1144110, 1146544, 1146559,\n", - " 1146549, 1148204, 1154166, 1153124, 1153188, 1145104, 1159837, 1150932,\n", - " 1150935, 1152878, 1143092, 1150356, 1150365, 1151816, 1151821, 1152581,\n", - " 1135303, 1154183, 1150708, 1148505, 1141420, 1136002, 1156403, 1153255,\n", - " 1146623, 1144467, 1152409, 1154052, 1152107, 1146280, 1150085, 1145546,\n", - " 1137746, 1137756, 1146304, 1152622, 1140521, 1155140, 1136401, 1136402,\n", - " 1155337, 1154112, 1154119, 1154120, 1154124, 1152673, 1152672, 1151617,\n", - " 1145278, 1136134, 1136798, 1136788, 1153378, 1153391, 1138982, 1151311,\n", - " 1152349, 1146816, 1156826, 1156816, 1153297, 1138281, 1136028, 1158704,\n", - " 1151067, 1156396, 1163941, 1152886, 1143486, 1150164, 1148033, 1148040,\n", - " 1154453, 1152601, 1149794, 1144669, 1137048, 1148628, 1158530, 1158540,\n", - " 1149936, 1149940, 1149947, 1135707, 1147635, 1159223, 1142047, 1135434,\n", - " 1158927, 1154928, 1156505, 1145191, 1145184, 1137809, 1150465, 1150475,\n", - " 1142221, 1152179, 1156632, 1156638, 1157911, 1152737, 1150824, 1156932,\n", - " 1147810, 1158311, 1155441, 1150132, 1154530, 1154528, 1142755, 1142764,\n", - " 1142758, 1156271, 1157646, 1151390, 1151379, 1140187, 1155122, 1152527,\n", - " 1155755, 1151424, 1146913, 1158096, 1154763, 1155628, 1155630, 1156563,\n", - " 1154559, 1154555, 1136466, 1158823, 1158824, 1153712, 1158325, 1157323,\n", - " 1148836, 1148834, 1148835, 1155646, 1158361, 1159304, 1143263, 1154240,\n", - " 1162190, 1156711, 1156713, 1151317, 1154902, 1154909, 1154911, 1143189,\n", - " 1143531, 1150371, 1153322, 1157424, 1150077, 1150805, 1143508, 1137152,\n", - " 1153786, 1149908, 1137381, 1138269, 1135601, 1135614, 1145507, 1148147,\n", - " 1148149, 1146321, 1156085, 1140633, 1159213, 1152498, 1156027, 1157732,\n", - " 1157735, 1142466, 1155971, 1155975, 1154682, 1153765, 1158844, 1149700,\n", - " 1154592, 1154604, 1136909, 1136896, 1185567, 1161570, 1140221, 1158438,\n", - " 1156778, 1136482, 1136494, 1136491, 1154393, 1156665, 1156670, 1147599,\n", - " 1155309, 1152136, 1153808, 1136640, 1136646, 1144122, 1140049, 1153827,\n", - " 1151144, 1165497, 1146126, 1144581, 1150011, 1155528, 1169895, 1163471,\n", - " 1142666, 1157747, 1167346, 1167359, 1162679, 1159042, 1159052, 1159071,\n", - " 1165838, 1157946, 1153047, 1153052, 1171551, 1172995, 1144158, 1156107,\n", - " 1138393, 1150046, 1149063, 1153519, 1146870, 1138161, 1138167, 1156787,\n", - " 1161771, 1149953, 1163872, 1139286, 1139281, 1166939, 1165763, 1156983,\n", - " 1157236, 1148771, 1171506, 1146063, 1159552, 1146356, 1163443, 1160182,\n", - " 1165309, 1169494, 1140641, 1140643, 1141862, 1148600, 1148603, 1148607,\n", - " 1143139, 1143143, 1154274, 1158643, 1158653, 1158651, 1156181, 1159029,\n", - " 1159032, 1159038, 1163740, 1152247, 1165584, 1143729, 1160593, 1187369,\n", - " 1155588, 1153934, 1168525, 1149011, 1164580, 1161243, 1144737, 1144750,\n", - " 1152776, 1155054, 1145139, 1141459, 1147426, 1147427, 1157050, 1156737,\n", - " 1156739, 1156744, 1153663, 1150642, 1144810, 1144812, 1192121, 1153273,\n", - " 1142733, 1167329, 1144051, 1144062, 1192012, 1148683, 1145228, 1172193,\n", - " 1155324, 1166462, 1170793, 1144973, 1147346, 1152624, 1139344, 1193483,\n", - " 1145902, 1153520, 1152194, 1143395, 1143404, 1158724, 1166661, 1171273,\n", - " 1154076, 1168755, 1147331, 1147339, 1145677, 1145502, 1169602, 1167817,\n", - " 1144686, 1166653, 1155172, 1155170, 1150518, 1154613, 1144346, 1144336,\n", - " 1157534, 1138383, 1154670, 1154882, 1169162, 1157331, 1138129, 1169359,\n", - " 1154353, 1154364, 1154352, 1147491, 1158146, 1158152, 1173220, 1158611,\n", - " 1158623, 1149846, 1149847, 1157380, 1159851, 1154866, 1147416, 1155502,\n", - " 1172508, 1170459, 1152353, 1170279, 1192129, 1149402, 1148667, 1148335,\n", - " 1148324, 1177984, 1173307, 1160935, 1169144, 1159651, 1159658, 1159655,\n", - " 1157153, 1157373, 1147711, 1172435, 1151850, 1148128, 1147923, 1157593,\n", - " 1170488, 1170490, 1172961, 1155739, 1179204, 1143240, 1174779, 1174915,\n", - " 1144550, 1166684, 1177015, 1170874, 1150234, 1154151, 1154148, 1149169,\n", - " 1172455, 1179865, 1184393, 1186117, 1167658, 1167657, 1168481, 1170560,\n", - " 1170571, 1185991, 1180245, 1181241, 1153803, 1164818, 1153619, 1182106,\n", - " 1166551, 1184300, 1161255, 1162129, 1180152, 1154718, 1171623, 1164032,\n", - " 1178361, 1181379, 1157134, 1157133, 1180407, 1164073, 1153898, 1153899,\n", - " 1153893, 1161846, 1134650, 1164200, 1145626, 1156437, 1156446, 1172024,\n", - " 1157483, 1149753, 1153601, 1153609, 1157761, 1170064, 1158512, 1181189,\n", - " 1158934, 1186995, 1167646, 1155892, 1155899, 1182786, 1140399, 1166976,\n", - " 1162253, 1184000, 1168875, 1185181, 1182337, 1176981, 1164264, 1146161,\n", - " 1188070, 1156863, 1170336, 1147182, 1164133, 1171015, 1170417, 1139828,\n", - " 1139831, 1150265, 1182988, 1154806, 1182025, 1181599, 1151288, 1190585,\n", - " 1181883, 1156055, 1178555, 1190270, 1151978, 1181452, 1181454, 1146394,\n", - " 1194206, 1149544, 1184895, 1188230, 1159083, 1172696, 1181951, 1141002,\n", - " 1153733, 1192920, 1177842, 1188700, 1166767, 1172423, 1158064, 1179752,\n", - " 1155959, 1155962, 1194244, 1178296, 1184522, 1185947, 1179373, 1187536,\n", - " 1190607, 1189851, 1191118, 1181989, 1194264, 1189948, 1176339, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137435, 1137201, 1137204, 1137212, 1137213, 1137214, 1141424, 1136237,\n", - " 1136239, 1140282, 1140285, 1135926, 1138554, 1135716, 1137784, 1141758,\n", - " 1137506, 1136223, 1142807, 1139462, 1136156, 1136969, 1136971, 1136970,\n", - " 1141443, 1139820, 1139811, 1145370, 1145373, 1146977, 1146978, 1137937,\n", - " 1137271, 1138930, 1138938, 1139141, 1143372, 1143363, 1146644, 1139615,\n", - " 1140781, 1150509, 1142968, 1135376, 1149216, 1149228, 1155689, 1149632,\n", - " 1147473, 1147483, 1147486, 1135990, 1135989, 1142885, 1142881, 1153948,\n", - " 1144636, 1144632, 1146992, 1148337, 1146656, 1150193, 1152664, 1148546,\n", - " 1147089, 1155014, 1139371, 1147211, 1136676, 1136685, 1134715, 1134806,\n", - " 1138742, 1140537, 1140540, 1138112, 1138126, 1151520, 1140147, 1140159,\n", - " 1140953, 1135367, 1135202, 1140758, 1135903, 1141036, 1134794, 1134797,\n", - " 1138504, 1137342, 1136178, 1143069, 1137693, 1136619, 1135340, 1144395,\n", - " 1137529, 1137534, 1135408, 1157395, 1136662, 1137441, 1137025, 1136199,\n", - " 1139161, 1135579, 1135582, 1136098, 1135664, 1140970, 1137953, 1137957,\n", - " 1158136, 1158138, 1156965, 1137008, 1156899, 1135522, 1137291, 1138440,\n", - " 1140079, 1138461, 1157190, 1137924, 1149328, 1138845, 1135088, 1138695,\n", - " 1147112, 1147119, 1142611, 1160825, 1158980, 1158984, 1158982, 1145842,\n", - " 1148531, 1137109, 1137409, 1136449, 1136457, 1139667, 1134992, 1134772,\n", - " 1134780, 1136551, 1135776, 1140206, 1153543, 1140045, 1139085, 1139929,\n", - " 1138148, 1134886, 1146071, 1140557, 1141985, 1152044, 1140657, 1140660,\n", - " 1137728, 1147317, 1134750, 1138240, 1135549, 1136697, 1141097, 1144128,\n", - " 1145347, 1143767, 1143711, 1162716, 1137670, 1139025, 1139033, 1140003,\n", - " 1149979, 1141688, 1154467, 1136632, 1142929, 1141223, 1139386, 1163301,\n", - " 1136917, 1143666, 1143667, 1137188, 1145066, 1144237, 1140598, 1141156,\n", - " 1146449, 1141786, 1139495, 1136757, 1141609, 1144650, 1164807, 1139798,\n", - " 1144428, 1141810, 1141821, 1142093, 1143204, 1140173, 1158749, 1137762,\n", - " 1149111, 1148872, 1148871, 1138708, 1142913, 1138423, 1138424, 1144596,\n", - " 1142453, 1136864, 1144041, 1135315, 1144182, 1137606, 1150906, 1144869,\n", - " 1158698, 1137849, 1147153, 1142646, 1141365, 1141367, 1153068, 1141664,\n", - " 1149101, 1144279, 1139662, 1139127, 1143791, 1140619, 1140977, 1140990,\n", - " 1147050, 1143543, 1152976, 1152982, 1135466, 1141925, 1146900, 1144242,\n", - " 1150255, 1136885, 1139405, 1143643, 1137570, 1141381, 1145980, 1143851,\n", - " 1146019, 1146024, 1147084, 1141235, 1139990, 1143283, 1143883, 1147543,\n", - " 1148763, 1148760, 1147282, 1142829, 1142816, 1138669, 1142629, 1142637,\n", - " 1149608, 1143051, 1143052, 1136160, 1142588, 1144921, 1138922, 1138923,\n", - " 1136836, 1146105, 1139329, 1139328, 1143345, 1144619, 1144615, 1145816,\n", - " 1144093, 1144095, 1138595, 1135751, 1150755, 1150294, 1144375, 1143465,\n", - " 1143457, 1144291, 1143937, 1143949, 1140824, 1140817, 1147525, 1140361,\n", - " 1140364, 1137990, 1143080, 1143075, 1143082, 1168914, 1148966, 1144219,\n", - " 1147995, 1147996, 1147999, 1139252, 1147128, 1148704, 1142697, 1141825,\n", - " 1148468, 1148473, 1153701, 1153703, 1152327, 1152328, 1149718, 1147027,\n", - " 1143839, 1147971, 1145011, 1145021, 1145009, 1139549, 1158224, 1158226,\n", - " 1154526, 1145751, 1142369, 1138638, 1146178, 1146180, 1138861, 1138863,\n", - " 1150438, 1150445, 1149263, 1151867, 1149791, 1149777, 1144526, 1152013,\n", - " 1165252, 1147796, 1151480, 1152026, 1144884, 1145259, 1135504, 1146723,\n", - " 1134869, 1149530, 1149535, 1150127, 1147021, 1141949, 1146772, 1151795,\n", - " 1150723, 1137639, 1147653, 1149420, 1149412, 1148300, 1154420, 1158786,\n", - " 1148180, 1148188, 1151361, 1152561, 1152563, 1136249, 1136247, 1138197,\n", - " 1138877, 1152439, 1157968, 1157970, 1148729, 1144110, 1146544, 1146559,\n", - " 1146549, 1148204, 1154166, 1153124, 1153188, 1145104, 1159837, 1150932,\n", - " 1150935, 1152878, 1143092, 1150356, 1150365, 1151816, 1151821, 1152581,\n", - " 1135303, 1154183, 1150708, 1148505, 1141420, 1136002, 1156403, 1153255,\n", - " 1146623, 1144467, 1152409, 1154052, 1152107, 1146280, 1150085, 1145546,\n", - " 1137746, 1137756, 1146304, 1152622, 1140521, 1155140, 1136401, 1136402,\n", - " 1155337, 1154112, 1154119, 1154120, 1154124, 1152673, 1152672, 1151617,\n", - " 1145278, 1136134, 1136798, 1136788, 1153378, 1153391, 1138982, 1151311,\n", - " 1152349, 1146816, 1156826, 1156816, 1153297, 1138281, 1136028, 1158704,\n", - " 1151067, 1156396, 1163941, 1152886, 1143486, 1150164, 1148033, 1148040,\n", - " 1154453, 1152601, 1149794, 1144669, 1137048, 1148628, 1158530, 1158540,\n", - " 1149936, 1149940, 1149947, 1135707, 1147635, 1159223, 1142047, 1135434,\n", - " 1158927, 1154928, 1156505, 1145191, 1145184, 1137809, 1150465, 1150475,\n", - " 1142221, 1152179, 1156632, 1156638, 1157911, 1152737, 1150824, 1156932,\n", - " 1147810, 1158311, 1155441, 1150132, 1154530, 1154528, 1142755, 1142764,\n", - " 1142758, 1156271, 1157646, 1151390, 1151379, 1140187, 1155122, 1152527,\n", - " 1155755, 1151424, 1146913, 1158096, 1154763, 1155628, 1155630, 1156563,\n", - " 1154559, 1154555, 1136466, 1158823, 1158824, 1153712, 1158325, 1157323,\n", - " 1148836, 1148834, 1148835, 1155646, 1158361, 1159304, 1143263, 1154240,\n", - " 1162190, 1156711, 1156713, 1151317, 1154902, 1154909, 1154911, 1143189,\n", - " 1143531, 1150371, 1153322, 1157424, 1150077, 1150805, 1143508, 1137152,\n", - " 1153786, 1149908, 1137381, 1138269, 1135601, 1135614, 1145507, 1148147,\n", - " 1148149, 1146321, 1156085, 1140633, 1159213, 1152498, 1156027, 1157732,\n", - " 1157735, 1142466, 1155971, 1155975, 1154682, 1153765, 1158844, 1149700,\n", - " 1154592, 1154604, 1136909, 1136896, 1185567, 1161570, 1140221, 1158438,\n", - " 1156778, 1136482, 1136494, 1136491, 1154393, 1156665, 1156670, 1147599,\n", - " 1155309, 1152136, 1153808, 1136640, 1136646, 1144122, 1140049, 1153827,\n", - " 1151144, 1165497, 1146126, 1144581, 1150011, 1155528, 1169895, 1163471,\n", - " 1142666, 1157747, 1167346, 1167359, 1162679, 1159042, 1159052, 1159071,\n", - " 1165838, 1157946, 1153047, 1153052, 1171551, 1172995, 1144158, 1156107,\n", - " 1138393, 1150046, 1149063, 1153519, 1146870, 1138161, 1138167, 1156787,\n", - " 1161771, 1149953, 1163872, 1139286, 1139281, 1166939, 1165763, 1156983,\n", - " 1157236, 1148771, 1171506, 1146063, 1159552, 1146356, 1163443, 1160182,\n", - " 1165309, 1169494, 1140641, 1140643, 1141862, 1148600, 1148603, 1148607,\n", - " 1143139, 1143143, 1154274, 1158643, 1158653, 1158651, 1156181, 1159029,\n", - " 1159032, 1159038, 1163740, 1152247, 1165584, 1143729, 1160593, 1187369,\n", - " 1155588, 1153934, 1168525, 1149011, 1164580, 1161243, 1144737, 1144750,\n", - " 1152776, 1155054, 1145139, 1141459, 1147426, 1147427, 1157050, 1156737,\n", - " 1156739, 1156744, 1153663, 1150642, 1144810, 1144812, 1192121, 1153273,\n", - " 1142733, 1167329, 1144051, 1144062, 1192012, 1148683, 1145228, 1172193,\n", - " 1155324, 1166462, 1170793, 1144973, 1147346, 1152624, 1139344, 1193483,\n", - " 1145902, 1153520, 1152194, 1143395, 1143404, 1158724, 1166661, 1171273,\n", - " 1154076, 1168755, 1147331, 1147339, 1145677, 1145502, 1169602, 1167817,\n", - " 1144686, 1166653, 1155172, 1155170, 1150518, 1154613, 1144346, 1144336,\n", - " 1157534, 1138383, 1154670, 1154882, 1169162, 1157331, 1138129, 1169359,\n", - " 1154353, 1154364, 1154352, 1147491, 1158146, 1158152, 1173220, 1158611,\n", - " 1158623, 1149846, 1149847, 1157380, 1159851, 1154866, 1147416, 1155502,\n", - " 1172508, 1170459, 1152353, 1170279, 1192129, 1149402, 1148667, 1148335,\n", - " 1148324, 1177984, 1173307, 1160935, 1169144, 1159651, 1159658, 1159655,\n", - " 1157153, 1157373, 1147711, 1172435, 1151850, 1148128, 1147923, 1157593,\n", - " 1170488, 1170490, 1172961, 1155739, 1179204, 1143240, 1174779, 1174915,\n", - " 1144550, 1166684, 1177015, 1170874, 1150234, 1154151, 1154148, 1149169,\n", - " 1172455, 1179865, 1184393, 1186117, 1167658, 1167657, 1168481, 1170560,\n", - " 1170571, 1185991, 1180245, 1181241, 1153803, 1164818, 1153619, 1182106,\n", - " 1166551, 1184300, 1161255, 1162129, 1180152, 1154718, 1171623, 1164032,\n", - " 1178361, 1181379, 1157134, 1157133, 1180407, 1164073, 1153898, 1153899,\n", - " 1153893, 1161846, 1134650, 1164200, 1145626, 1156437, 1156446, 1172024,\n", - " 1157483, 1149753, 1153601, 1153609, 1157761, 1170064, 1158512, 1181189,\n", - " 1158934, 1186995, 1167646, 1155892, 1155899, 1182786, 1140399, 1166976,\n", - " 1162253, 1184000, 1168875, 1185181, 1182337, 1176981, 1164264, 1146161,\n", - " 1188070, 1156863, 1170336, 1147182, 1164133, 1171015, 1170417, 1139828,\n", - " 1139831, 1150265, 1182988, 1154806, 1182025, 1181599, 1151288, 1190585,\n", - " 1181883, 1156055, 1178555, 1190270, 1151978, 1181452, 1181454, 1146394,\n", - " 1194206, 1149544, 1184895, 1188230, 1159083, 1172696, 1181951, 1141002,\n", - " 1153733, 1192920, 1177842, 1188700, 1166767, 1172423, 1158064, 1179752,\n", - " 1155959, 1155962, 1194244, 1178296, 1184522, 1185947, 1179373, 1187536,\n", - " 1190607, 1189851, 1191118, 1181989, 1194264, 1189948, 1176339, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196007, 1196013, 1200108, 1198730, 1199282, 1198459, 1202245, 1202255,\n", - " 1198832, 1201581, 1201582, 1202119, 1194626, 1197777, 1201016, 1198633,\n", - " 1197301, 1196631, 1195263, 1197924, 1199122, 1196538, 1201992, 1196030,\n", - " 1198533, 1199519, 1195471, 1195888, 1195895, 1199172, 1195740, 1196359,\n", - " 1195325, 1196840, 1198668, 1198036, 1196717, 1195270, 1195279, 1197265,\n", - " 1197273, 1195841, 1195847, 1195038, 1195659, 1195541, 1199352, 1198504,\n", - " 1199697, 1196393, 1195351, 1195353, 1198273, 1199857, 1197291, 1199185,\n", - " 1194928, 1199628, 1197676, 1197990, 1200076, 1198404, 1201908, 1199676,\n", - " 1194795, 1201511, 1196501, 1196503, 1196508, 1201894, 1197609, 1201116,\n", - " 1196727, 1195771, 1200887, 1200893, 1203239, 1198428, 1200155, 1199418,\n", - " 1198811, 1199555, 1201824, 1200570, 1198593, 1196477, 1198797, 1201418,\n", - " 1201421, 1201155, 1201156, 1202630, 1194803, 1202641, 1201043, 1201358,\n", - " 1200363, 1200558, 1200725, 1202529, 1197040, 1201453, 1201442, 1202239,\n", - " 1202937, 1200899, 1202338, 1200320, 1195886, 1195876, 1201291, 1203329,\n", - " 1200398, 1196966, 1200785, 1194846, 1195048, 1200638, 1195438, 1203112,\n", - " 1195679, 1200439, 1196929, 1198911, 1195421, 1195383, 1200928, 1197816,\n", - " 1197821, 1199778, 1197492, 1199783, 1197593, 1200468, 1201886, 1200302,\n", - " 1201877, 1196424], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196007, 1196013, 1200108, 1198730, 1199282, 1198459, 1202245, 1202255,\n", - " 1198832, 1201581, 1201582, 1202119, 1194626, 1197777, 1201016, 1198633,\n", - " 1197301, 1196631, 1195263, 1197924, 1199122, 1196538, 1201992, 1196030,\n", - " 1198533, 1199519, 1195471, 1195888, 1195895, 1199172, 1195740, 1196359,\n", - " 1195325, 1196840, 1198668, 1198036, 1196717, 1195270, 1195279, 1197265,\n", - " 1197273, 1195841, 1195847, 1195038, 1195659, 1195541, 1199352, 1198504,\n", - " 1199697, 1196393, 1195351, 1195353, 1198273, 1199857, 1197291, 1199185,\n", - " 1194928, 1199628, 1197676, 1197990, 1200076, 1198404, 1201908, 1199676,\n", - " 1194795, 1201511, 1196501, 1196503, 1196508, 1201894, 1197609, 1201116,\n", - " 1196727, 1195771, 1200887, 1200893, 1203239, 1198428, 1200155, 1199418,\n", - " 1198811, 1199555, 1201824, 1200570, 1198593, 1196477, 1198797, 1201418,\n", - " 1201421, 1201155, 1201156, 1202630, 1194803, 1202641, 1201043, 1201358,\n", - " 1200363, 1200558, 1200725, 1202529, 1197040, 1201453, 1201442, 1202239,\n", - " 1202937, 1200899, 1202338, 1200320, 1195886, 1195876, 1201291, 1203329,\n", - " 1200398, 1196966, 1200785, 1194846, 1195048, 1200638, 1195438, 1203112,\n", - " 1195679, 1200439, 1196929, 1198911, 1195421, 1195383, 1200928, 1197816,\n", - " 1197821, 1199778, 1197492, 1199783, 1197593, 1200468, 1201886, 1200302,\n", - " 1201877, 1196424], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.4758e-01, 5.8499e-02, 6.7140e-01, ..., 1.4109e-01,\n", - " -1.7217e-03, -4.3933e-03],\n", - " [ 1.1530e-01, -2.5132e-04, 7.0948e-01, ..., 1.3859e-01,\n", - " -1.9185e-03, -4.4044e-03],\n", - " [ 1.4597e-01, 1.6104e-02, 6.9389e-01, ..., 1.1918e-01,\n", - " -1.8152e-03, -4.2806e-03],\n", - " ...,\n", - " [ 1.0700e-01, -4.4459e-04, 6.7622e-01, ..., 1.5941e-01,\n", - " -2.2394e-03, -4.5408e-03],\n", - " [ 1.6382e-01, -3.1871e-04, 7.8976e-01, ..., 1.1761e-01,\n", - " -1.7105e-03, -5.2182e-03],\n", - " [ 1.3881e-01, 2.0491e-02, 6.8943e-01, ..., 1.2946e-01,\n", - " -1.5715e-03, -4.4407e-03]], device='cuda:0'), 'paper': tensor([[ 9.1836e-01, 9.2079e-01, 3.9809e+00, ..., 1.3037e-01,\n", - " -4.3703e-02, 7.5779e-01],\n", - " [ 1.2979e+00, 1.3523e+00, 3.2657e+00, ..., 1.1326e+00,\n", - " -4.2844e-02, 1.9635e+00],\n", - " [ 1.4556e+00, 2.7244e+00, 4.1706e+00, ..., -4.0467e-04,\n", - " -3.9488e-02, 1.0725e+00],\n", - " ...,\n", - " [ 1.0329e+00, 1.1416e+00, 1.4239e+00, ..., -7.0365e-03,\n", - " -2.0675e-02, 5.9286e-01],\n", - " [-5.9745e-03, -1.0234e-02, 3.8469e+00, ..., -9.8879e-03,\n", - " -3.6582e-02, -1.9531e-02],\n", - " [ 1.8953e+00, 1.5625e+00, 3.4515e+00, ..., 2.5478e+00,\n", - " -5.8235e-02, 4.2321e+00]], device='cuda:0'), 'author': tensor([[-8.5410e-04, 1.9542e-01, 2.9447e-01, ..., 1.9036e+00,\n", - " 1.9091e-01, 7.9892e-02],\n", - " [-2.8401e-03, 3.4922e-01, 3.3462e-01, ..., 1.6431e+00,\n", - " -2.2211e-03, -1.6440e-03],\n", - " [-1.5244e-03, 2.9964e-01, 2.2191e-01, ..., 1.7259e+00,\n", - " 9.4080e-02, -3.5987e-04],\n", - " ...,\n", - " [-1.5027e-03, 3.0284e-01, 1.7646e-01, ..., 1.6274e+00,\n", - " 5.6796e-02, -3.6692e-05],\n", - " [-1.4072e-03, 3.3204e-01, 1.8982e-01, ..., 1.7011e+00,\n", - " 4.6930e-02, 1.2901e-02],\n", - " [-1.6846e-03, 3.1783e-01, 2.3601e-01, ..., 1.6511e+00,\n", - " -8.4559e-04, -3.2647e-04]], device='cuda:0'), 'field_of_study': tensor([[ 6.3951e-02, 1.0628e+00, 7.6602e-01, ..., -1.4456e-02,\n", - " 5.1826e-01, 6.3685e-01],\n", - " [ 1.2615e-01, 7.5624e-01, 3.9267e-01, ..., -9.3499e-03,\n", - " 4.2486e-01, 3.5807e-01],\n", - " [ 1.0760e-03, 7.9725e-01, 4.7739e-01, ..., -1.1208e-02,\n", - " 4.0315e-01, 5.4488e-01],\n", - " ...,\n", - " [ 5.8569e-02, 7.1050e-01, 2.5567e-01, ..., -7.4764e-03,\n", - " 3.7612e-01, 2.3714e-01],\n", - " [-8.0530e-04, 8.5934e-01, 5.7039e-01, ..., -1.1485e-02,\n", - " 3.4036e-01, 5.3727e-01],\n", - " [ 1.7225e-01, 9.0868e-01, 5.1015e-01, ..., -1.1327e-02,\n", - " 4.8340e-01, 1.8833e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 27, 111, 111, 117, 27, 58, 374, 560, 449, 342, 706, 784,\n", - " 523, 523, 796, 770, 770, 614, 987, 987, 1018, 687, 1168, 1168,\n", - " 1168, 881, 927, 927, 1168, 1168, 1140, 973, 1036, 1096, 1096, 1206,\n", - " 1258, 1196, 1196, 1156, 1335, 1336, 1415, 1336, 1387, 1465, 1511, 1511,\n", - " 1511, 1520, 1520, 1623, 1623, 1434, 1495, 1495, 1495, 1616, 1616, 1847,\n", - " 1786, 1602, 1602, 1640, 1812, 1797, 1778, 1783, 1792, 1861, 2168, 1880,\n", - " 1880, 1998, 1927, 1927, 2081, 2159, 2159, 2298, 2298, 2039, 1874, 2331,\n", - " 2247, 2357, 2247, 2247, 2431, 2463, 2463, 2359, 2359, 2367, 2367, 2367,\n", - " 2367, 2367, 2367, 2557, 2593, 2593, 2593, 2561, 2561, 2667, 2710, 2746,\n", - " 2622, 2910, 2896, 2886, 3106, 3066, 3066, 3199, 3149, 3265, 3310, 3424,\n", - " 3506, 3615, 3616, 3455, 3624, 3733, 3733, 3663, 3586, 3481, 3578, 3702,\n", - " 3861, 3695, 3907, 4118, 4287, 4249, 4449, 4360, 4386, 4649, 4589, 4589,\n", - " 4689, 4547, 4843, 4842, 4655, 4655, 4954, 5010, 4809, 5028, 5028, 5028,\n", - " 5028, 5059, 5059, 5168, 5168, 5081, 5097, 5122, 5364, 5282, 5282, 5556,\n", - " 5308, 5592, 5592, 5525, 5540, 5294, 5294, 5294, 5294, 5294, 5462, 5775,\n", - " 5547, 5659, 5692, 5532, 5532, 6028, 5727, 5727, 5718, 5718, 5879, 6296,\n", - " 6227, 6285, 6308, 6308, 6223, 6223, 6289, 6289, 6059, 6243, 6243, 6243,\n", - " 6251],\n", - " [ 9, 27, 19, 102, 8, 63, 4, 60, 135, 43, 85, 118,\n", - " 130, 103, 102, 72, 56, 72, 106, 15, 122, 58, 90, 11,\n", - " 113, 55, 0, 119, 81, 133, 58, 125, 7, 52, 131, 72,\n", - " 122, 88, 1, 64, 107, 77, 48, 111, 36, 94, 129, 76,\n", - " 137, 26, 5, 23, 6, 58, 51, 58, 99, 66, 136, 35,\n", - " 54, 96, 53, 67, 110, 52, 55, 91, 48, 51, 102, 100,\n", - " 62, 22, 6, 23, 63, 130, 103, 46, 20, 24, 118, 126,\n", - " 117, 63, 42, 21, 94, 95, 103, 57, 65, 123, 111, 87,\n", - " 34, 28, 37, 101, 86, 67, 132, 120, 75, 48, 7, 89,\n", - " 28, 39, 69, 86, 93, 18, 104, 18, 57, 40, 12, 97,\n", - " 37, 55, 72, 18, 102, 38, 2, 29, 116, 18, 4, 72,\n", - " 121, 73, 23, 18, 70, 71, 18, 4, 58, 100, 115, 72,\n", - " 78, 10, 128, 72, 102, 72, 127, 112, 91, 44, 68, 3,\n", - " 72, 105, 72, 18, 16, 75, 93, 84, 134, 7, 108, 93,\n", - " 82, 72, 4, 83, 50, 21, 117, 98, 103, 47, 72, 31,\n", - " 27, 124, 30, 72, 32, 13, 41, 56, 25, 59, 80, 109,\n", - " 74, 14, 33, 49, 17, 114, 79, 72, 92, 4, 45, 61,\n", - " 7]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3225, 2916, 1050, ..., 4913, 3371, 2176],\n", - " [ 125, 76, 206, ..., 7148, 7073, 7218]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 4, 118, 131, ..., 135, 45, 117],\n", - " [ 19, 36, 5, ..., 6265, 6316, 6043]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 286, 286, 286, ..., 7238, 7238, 7199],\n", - " [ 86, 365, 317, ..., 424, 317, 693]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 474, 387, 319, ..., 520, 872, 508],\n", - " [ 143, 255, 77, ..., 7207, 7175, 7143]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[6008, 6790, 3667, ..., 6308, 4137, 5026],\n", - " [ 158, 115, 89, ..., 6274, 6134, 6134]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 254, 254, 254, ..., 7238, 7212, 7174],\n", - " [1242, 1198, 1226, ..., 5941, 4422, 764]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 204, 111, 111, ..., 6308, 6308, 6308],\n", - " [6511, 3341, 3625, ..., 882, 3617, 1921]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006663\n", - "sampling 0.006511\n", - "noi time: 0.001946\n", - "get_vertex_data call: 0.038015\n", - "noi group time: 0.003544\n", - "eoi_group_time: 0.016108\n", - "second half: 0.213458\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31143, 24184, 24187, ..., 1119681, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31143, 24184, 24187, ..., 1119681, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1203800, 1214594, 1228165, ..., 1936995, 1937001, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1203800, 1214594, 1228165, ..., 1936995, 1937001, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1141439, 1140282, 1140285, 1135926, 1135727, 1140785, 1140799,\n", - " 1141758, 1134948, 1138335, 1136215, 1141251, 1136150, 1136156, 1142526,\n", - " 1136969, 1136971, 1141450, 1138897, 1139811, 1146983, 1137271, 1145055,\n", - " 1143372, 1148976, 1148987, 1149216, 1147949, 1155686, 1155689, 1143812,\n", - " 1149646, 1147483, 1141877, 1144632, 1146995, 1134701, 1148346, 1150193,\n", - " 1150200, 1136122, 1150555, 1155014, 1155019, 1139373, 1139371, 1136683,\n", - " 1136685, 1152427, 1140313, 1140540, 1137171, 1138356, 1153463, 1140159,\n", - " 1140020, 1135367, 1135370, 1135202, 1141036, 1134794, 1157443, 1138504,\n", - " 1137328, 1137329, 1136186, 1137693, 1136619, 1135333, 1144786, 1137529,\n", - " 1157397, 1156159, 1134841, 1141702, 1135579, 1135830, 1148860, 1138514,\n", - " 1153094, 1153099, 1135500, 1156899, 1135522, 1135535, 1139684, 1139687,\n", - " 1137287, 1138440, 1140079, 1138461, 1138462, 1158390, 1149328, 1138844,\n", - " 1135098, 1156605, 1156606, 1142611, 1142616, 1135025, 1160827, 1160830,\n", - " 1135631, 1158984, 1137109, 1135761, 1139849, 1136457, 1139667, 1138067,\n", - " 1134992, 1136554, 1152646, 1136723, 1139327, 1141065, 1140034, 1140045,\n", - " 1141963, 1153404, 1152042, 1152044, 1139063, 1142302, 1137728, 1134738,\n", - " 1135540, 1136697, 1141098, 1141100, 1162946, 1149001, 1136392, 1143766,\n", - " 1154860, 1137298, 1137299, 1137670, 1139025, 1146844, 1146832, 1135861,\n", - " 1136631, 1136637, 1139379, 1159794, 1136912, 1136917, 1137188, 1141156,\n", - " 1138789, 1139495, 1141609, 1144650, 1147847, 1165291, 1144428, 1144420,\n", - " 1165098, 1139267, 1140173, 1137762, 1137062, 1138710, 1138708, 1142913,\n", - " 1143107, 1136864, 1144039, 1135327, 1141398, 1140432, 1150906, 1144865,\n", - " 1143759, 1147153, 1153059, 1153068, 1141678, 1138288, 1144279, 1139510,\n", - " 1145200, 1140977, 1140979, 1140990, 1146702, 1147050, 1155824, 1152988,\n", - " 1135457, 1139447, 1139000, 1141925, 1144242, 1141841, 1141846, 1139405,\n", - " 1145974, 1144073, 1143851, 1136277, 1146024, 1150606, 1141585, 1149928,\n", - " 1139990, 1151124, 1147540, 1148763, 1147282, 1142816, 1136330, 1149155,\n", - " 1149366, 1148003, 1148009, 1146088, 1149608, 1149610, 1143040, 1148406,\n", - " 1136160, 1136167, 1142584, 1157720, 1136836, 1141490, 1143345, 1144619,\n", - " 1144088, 1135876, 1135813, 1150294, 1150299, 1143957, 1138024, 1138018,\n", - " 1143456, 1143457, 1143007, 1144291, 1135451, 1149082, 1143807, 1146633,\n", - " 1146636, 1147521, 1140364, 1143080, 1143082, 1166410, 1147999, 1146949,\n", - " 1134902, 1147131, 1145461, 1147244, 1148704, 1148715, 1142700, 1141327,\n", - " 1141825, 1147070, 1147971, 1147982, 1139549, 1158226, 1158235, 1167006,\n", - " 1148362, 1154526, 1145237, 1145750, 1145751, 1148390, 1146178, 1146189,\n", - " 1148223, 1150280, 1150445, 1149263, 1148823, 1144514, 1150350, 1153982,\n", - " 1151994, 1151475, 1151480, 1151487, 1152027, 1154263, 1135516, 1135519,\n", - " 1139916, 1146731, 1134869, 1147021, 1147023, 1135793, 1153959, 1141949,\n", - " 1146776, 1144824, 1153574, 1147653, 1143560, 1149412, 1148288, 1148300,\n", - " 1152073, 1154420, 1158786, 1148180, 1138204, 1146676, 1138867, 1148729,\n", - " 1144096, 1144098, 1144107, 1168975, 1146547, 1150057, 1148204, 1153124,\n", - " 1153192, 1153188, 1145111, 1159830, 1152879, 1150356, 1148095, 1147446,\n", - " 1147442, 1151906, 1150714, 1141420, 1145080, 1148949, 1146969, 1146975,\n", - " 1156402, 1146623, 1164781, 1146280, 1156321, 1153037, 1153038, 1137746,\n", - " 1137756, 1146304, 1140521, 1140517, 1152819, 1155334, 1154120, 1154123,\n", - " 1155358, 1157842, 1157826, 1152673, 1154632, 1154636, 1164761, 1164760,\n", - " 1151617, 1150586, 1136134, 1148916, 1145952, 1152227, 1138991, 1152903,\n", - " 1151298, 1151306, 1152341, 1138279, 1156001, 1136028, 1158704, 1140674,\n", - " 1156396, 1142777, 1150099, 1166848, 1150172, 1150164, 1144017, 1148040,\n", - " 1149794, 1149798, 1137048, 1168183, 1148628, 1137458, 1135707, 1135698,\n", - " 1155386, 1157547, 1158854, 1148889, 1158916, 1152392, 1155412, 1145187,\n", - " 1157565, 1150465, 1135730, 1152179, 1156629, 1165703, 1147810, 1139530,\n", - " 1158306, 1155441, 1150130, 1150132, 1140868, 1156919, 1172953, 1151379,\n", - " 1137912, 1137917, 1158639, 1140186, 1155122, 1152527, 1155755, 1135394,\n", - " 1135396, 1135398, 1146918, 1145806, 1158096, 1154755, 1155620, 1155626,\n", - " 1155627, 1155628, 1156563, 1158325, 1160958, 1143263, 1154644, 1154652,\n", - " 1143189, 1150371, 1147918, 1150987, 1155293, 1155284, 1157928, 1158578,\n", - " 1156765, 1158996, 1149913, 1155026, 1137385, 1137380, 1158084, 1159106,\n", - " 1138264, 1164309, 1134677, 1134685, 1135601, 1135611, 1148149, 1150671,\n", - " 1155848, 1149145, 1152209, 1159213, 1157732, 1155971, 1155975, 1155402,\n", - " 1149696, 1149702, 1149700, 1154600, 1154601, 1153503, 1136896, 1171171,\n", - " 1158815, 1136494, 1136491, 1147586, 1156490, 1153808, 1136640, 1136646,\n", - " 1166424, 1142178, 1147785, 1158558, 1151140, 1161167, 1165488, 1146126,\n", - " 1138110, 1155856, 1158006, 1144584, 1161539, 1135662, 1142663, 1157751,\n", - " 1167359, 1142426, 1157946, 1153052, 1153045, 1167181, 1163087, 1155763,\n", - " 1155771, 1156235, 1144144, 1153841, 1153842, 1156107, 1138391, 1138393,\n", - " 1160643, 1150046, 1159475, 1149060, 1149071, 1151023, 1153514, 1138161,\n", - " 1138167, 1156787, 1161774, 1149963, 1154590, 1169751, 1159999, 1159985,\n", - " 1148771, 1157351, 1157357, 1146063, 1171257, 1165306, 1165309, 1158865,\n", - " 1140643, 1143139, 1143143, 1151872, 1155816, 1155818, 1158653, 1159025,\n", - " 1159029, 1152244, 1152247, 1158902, 1160605, 1165274, 1165993, 1144989,\n", - " 1147397, 1147830, 1146500, 1164580, 1155046, 1160660, 1141464, 1141471,\n", - " 1147426, 1157044, 1165182, 1171041, 1168750, 1144812, 1140112, 1135567,\n", - " 1165636, 1163783, 1163935, 1145557, 1145561, 1167757, 1160232, 1170670,\n", - " 1144973, 1165746, 1147344, 1152624, 1145900, 1145902, 1153520, 1153526,\n", - " 1164395, 1154076, 1168756, 1167315, 1147338, 1145674, 1167817, 1149475,\n", - " 1155172, 1150522, 1150518, 1144336, 1170939, 1157534, 1135854, 1185874,\n", - " 1157331, 1169359, 1150031, 1149452, 1146339, 1149688, 1172575, 1157384,\n", - " 1193728, 1155494, 1155502, 1148325, 1182113, 1173307, 1145028, 1189239,\n", - " 1160936, 1169144, 1177801, 1153754, 1159658, 1159655, 1157158, 1157153,\n", - " 1172111, 1147711, 1151850, 1148142, 1157593, 1135021, 1179679, 1162106,\n", - " 1171614, 1176452, 1150234, 1154148, 1158176, 1172537, 1186117, 1168481,\n", - " 1143410, 1181095, 1170184, 1181241, 1153803, 1166554, 1178922, 1162131,\n", - " 1155105, 1154711, 1157795, 1157796, 1171623, 1155799, 1157124, 1188790,\n", - " 1145626, 1182629, 1149755, 1181354, 1182870, 1158512, 1158513, 1189590,\n", - " 1183641, 1165406, 1140399, 1168282, 1180172, 1177772, 1165484, 1171640,\n", - " 1162253, 1166210, 1164231, 1182337, 1188129, 1183319, 1158168, 1154944,\n", - " 1154952, 1141510, 1189280, 1172174, 1139828, 1139831, 1150265, 1150267,\n", - " 1170447, 1192076, 1156049, 1156055, 1151978, 1175961, 1146386, 1193360,\n", - " 1186443, 1190297, 1189121, 1168683, 1192754, 1162147, 1151774, 1186343,\n", - " 1152115, 1177125, 1169786, 1191610, 1178634, 1186561, 1192567, 1192916,\n", - " 1178268, 1193116, 1172122, 1178135, 1162781, 1155956, 1194246, 1194244,\n", - " 1190093, 1180869, 1155555, 1169831, 1182179, 1182191, 1187163, 1192676,\n", - " 1187556, 1191878], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1141439, 1140282, 1140285, 1135926, 1135727, 1140785, 1140799,\n", - " 1141758, 1134948, 1138335, 1136215, 1141251, 1136150, 1136156, 1142526,\n", - " 1136969, 1136971, 1141450, 1138897, 1139811, 1146983, 1137271, 1145055,\n", - " 1143372, 1148976, 1148987, 1149216, 1147949, 1155686, 1155689, 1143812,\n", - " 1149646, 1147483, 1141877, 1144632, 1146995, 1134701, 1148346, 1150193,\n", - " 1150200, 1136122, 1150555, 1155014, 1155019, 1139373, 1139371, 1136683,\n", - " 1136685, 1152427, 1140313, 1140540, 1137171, 1138356, 1153463, 1140159,\n", - " 1140020, 1135367, 1135370, 1135202, 1141036, 1134794, 1157443, 1138504,\n", - " 1137328, 1137329, 1136186, 1137693, 1136619, 1135333, 1144786, 1137529,\n", - " 1157397, 1156159, 1134841, 1141702, 1135579, 1135830, 1148860, 1138514,\n", - " 1153094, 1153099, 1135500, 1156899, 1135522, 1135535, 1139684, 1139687,\n", - " 1137287, 1138440, 1140079, 1138461, 1138462, 1158390, 1149328, 1138844,\n", - " 1135098, 1156605, 1156606, 1142611, 1142616, 1135025, 1160827, 1160830,\n", - " 1135631, 1158984, 1137109, 1135761, 1139849, 1136457, 1139667, 1138067,\n", - " 1134992, 1136554, 1152646, 1136723, 1139327, 1141065, 1140034, 1140045,\n", - " 1141963, 1153404, 1152042, 1152044, 1139063, 1142302, 1137728, 1134738,\n", - " 1135540, 1136697, 1141098, 1141100, 1162946, 1149001, 1136392, 1143766,\n", - " 1154860, 1137298, 1137299, 1137670, 1139025, 1146844, 1146832, 1135861,\n", - " 1136631, 1136637, 1139379, 1159794, 1136912, 1136917, 1137188, 1141156,\n", - " 1138789, 1139495, 1141609, 1144650, 1147847, 1165291, 1144428, 1144420,\n", - " 1165098, 1139267, 1140173, 1137762, 1137062, 1138710, 1138708, 1142913,\n", - " 1143107, 1136864, 1144039, 1135327, 1141398, 1140432, 1150906, 1144865,\n", - " 1143759, 1147153, 1153059, 1153068, 1141678, 1138288, 1144279, 1139510,\n", - " 1145200, 1140977, 1140979, 1140990, 1146702, 1147050, 1155824, 1152988,\n", - " 1135457, 1139447, 1139000, 1141925, 1144242, 1141841, 1141846, 1139405,\n", - " 1145974, 1144073, 1143851, 1136277, 1146024, 1150606, 1141585, 1149928,\n", - " 1139990, 1151124, 1147540, 1148763, 1147282, 1142816, 1136330, 1149155,\n", - " 1149366, 1148003, 1148009, 1146088, 1149608, 1149610, 1143040, 1148406,\n", - " 1136160, 1136167, 1142584, 1157720, 1136836, 1141490, 1143345, 1144619,\n", - " 1144088, 1135876, 1135813, 1150294, 1150299, 1143957, 1138024, 1138018,\n", - " 1143456, 1143457, 1143007, 1144291, 1135451, 1149082, 1143807, 1146633,\n", - " 1146636, 1147521, 1140364, 1143080, 1143082, 1166410, 1147999, 1146949,\n", - " 1134902, 1147131, 1145461, 1147244, 1148704, 1148715, 1142700, 1141327,\n", - " 1141825, 1147070, 1147971, 1147982, 1139549, 1158226, 1158235, 1167006,\n", - " 1148362, 1154526, 1145237, 1145750, 1145751, 1148390, 1146178, 1146189,\n", - " 1148223, 1150280, 1150445, 1149263, 1148823, 1144514, 1150350, 1153982,\n", - " 1151994, 1151475, 1151480, 1151487, 1152027, 1154263, 1135516, 1135519,\n", - " 1139916, 1146731, 1134869, 1147021, 1147023, 1135793, 1153959, 1141949,\n", - " 1146776, 1144824, 1153574, 1147653, 1143560, 1149412, 1148288, 1148300,\n", - " 1152073, 1154420, 1158786, 1148180, 1138204, 1146676, 1138867, 1148729,\n", - " 1144096, 1144098, 1144107, 1168975, 1146547, 1150057, 1148204, 1153124,\n", - " 1153192, 1153188, 1145111, 1159830, 1152879, 1150356, 1148095, 1147446,\n", - " 1147442, 1151906, 1150714, 1141420, 1145080, 1148949, 1146969, 1146975,\n", - " 1156402, 1146623, 1164781, 1146280, 1156321, 1153037, 1153038, 1137746,\n", - " 1137756, 1146304, 1140521, 1140517, 1152819, 1155334, 1154120, 1154123,\n", - " 1155358, 1157842, 1157826, 1152673, 1154632, 1154636, 1164761, 1164760,\n", - " 1151617, 1150586, 1136134, 1148916, 1145952, 1152227, 1138991, 1152903,\n", - " 1151298, 1151306, 1152341, 1138279, 1156001, 1136028, 1158704, 1140674,\n", - " 1156396, 1142777, 1150099, 1166848, 1150172, 1150164, 1144017, 1148040,\n", - " 1149794, 1149798, 1137048, 1168183, 1148628, 1137458, 1135707, 1135698,\n", - " 1155386, 1157547, 1158854, 1148889, 1158916, 1152392, 1155412, 1145187,\n", - " 1157565, 1150465, 1135730, 1152179, 1156629, 1165703, 1147810, 1139530,\n", - " 1158306, 1155441, 1150130, 1150132, 1140868, 1156919, 1172953, 1151379,\n", - " 1137912, 1137917, 1158639, 1140186, 1155122, 1152527, 1155755, 1135394,\n", - " 1135396, 1135398, 1146918, 1145806, 1158096, 1154755, 1155620, 1155626,\n", - " 1155627, 1155628, 1156563, 1158325, 1160958, 1143263, 1154644, 1154652,\n", - " 1143189, 1150371, 1147918, 1150987, 1155293, 1155284, 1157928, 1158578,\n", - " 1156765, 1158996, 1149913, 1155026, 1137385, 1137380, 1158084, 1159106,\n", - " 1138264, 1164309, 1134677, 1134685, 1135601, 1135611, 1148149, 1150671,\n", - " 1155848, 1149145, 1152209, 1159213, 1157732, 1155971, 1155975, 1155402,\n", - " 1149696, 1149702, 1149700, 1154600, 1154601, 1153503, 1136896, 1171171,\n", - " 1158815, 1136494, 1136491, 1147586, 1156490, 1153808, 1136640, 1136646,\n", - " 1166424, 1142178, 1147785, 1158558, 1151140, 1161167, 1165488, 1146126,\n", - " 1138110, 1155856, 1158006, 1144584, 1161539, 1135662, 1142663, 1157751,\n", - " 1167359, 1142426, 1157946, 1153052, 1153045, 1167181, 1163087, 1155763,\n", - " 1155771, 1156235, 1144144, 1153841, 1153842, 1156107, 1138391, 1138393,\n", - " 1160643, 1150046, 1159475, 1149060, 1149071, 1151023, 1153514, 1138161,\n", - " 1138167, 1156787, 1161774, 1149963, 1154590, 1169751, 1159999, 1159985,\n", - " 1148771, 1157351, 1157357, 1146063, 1171257, 1165306, 1165309, 1158865,\n", - " 1140643, 1143139, 1143143, 1151872, 1155816, 1155818, 1158653, 1159025,\n", - " 1159029, 1152244, 1152247, 1158902, 1160605, 1165274, 1165993, 1144989,\n", - " 1147397, 1147830, 1146500, 1164580, 1155046, 1160660, 1141464, 1141471,\n", - " 1147426, 1157044, 1165182, 1171041, 1168750, 1144812, 1140112, 1135567,\n", - " 1165636, 1163783, 1163935, 1145557, 1145561, 1167757, 1160232, 1170670,\n", - " 1144973, 1165746, 1147344, 1152624, 1145900, 1145902, 1153520, 1153526,\n", - " 1164395, 1154076, 1168756, 1167315, 1147338, 1145674, 1167817, 1149475,\n", - " 1155172, 1150522, 1150518, 1144336, 1170939, 1157534, 1135854, 1185874,\n", - " 1157331, 1169359, 1150031, 1149452, 1146339, 1149688, 1172575, 1157384,\n", - " 1193728, 1155494, 1155502, 1148325, 1182113, 1173307, 1145028, 1189239,\n", - " 1160936, 1169144, 1177801, 1153754, 1159658, 1159655, 1157158, 1157153,\n", - " 1172111, 1147711, 1151850, 1148142, 1157593, 1135021, 1179679, 1162106,\n", - " 1171614, 1176452, 1150234, 1154148, 1158176, 1172537, 1186117, 1168481,\n", - " 1143410, 1181095, 1170184, 1181241, 1153803, 1166554, 1178922, 1162131,\n", - " 1155105, 1154711, 1157795, 1157796, 1171623, 1155799, 1157124, 1188790,\n", - " 1145626, 1182629, 1149755, 1181354, 1182870, 1158512, 1158513, 1189590,\n", - " 1183641, 1165406, 1140399, 1168282, 1180172, 1177772, 1165484, 1171640,\n", - " 1162253, 1166210, 1164231, 1182337, 1188129, 1183319, 1158168, 1154944,\n", - " 1154952, 1141510, 1189280, 1172174, 1139828, 1139831, 1150265, 1150267,\n", - " 1170447, 1192076, 1156049, 1156055, 1151978, 1175961, 1146386, 1193360,\n", - " 1186443, 1190297, 1189121, 1168683, 1192754, 1162147, 1151774, 1186343,\n", - " 1152115, 1177125, 1169786, 1191610, 1178634, 1186561, 1192567, 1192916,\n", - " 1178268, 1193116, 1172122, 1178135, 1162781, 1155956, 1194246, 1194244,\n", - " 1190093, 1180869, 1155555, 1169831, 1182179, 1182191, 1187163, 1192676,\n", - " 1187556, 1191878], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195452, 1196007, 1196011, 1197451, 1197719, 1200099, 1195858, 1199282,\n", - " 1199293, 1202255, 1198840, 1202119, 1197777, 1197791, 1201016, 1198624,\n", - " 1198633, 1198694, 1202804, 1198557, 1194743, 1194745, 1197159, 1195511,\n", - " 1195263, 1199135, 1201992, 1198371, 1198380, 1198383, 1197697, 1199519,\n", - " 1195457, 1198306, 1194882, 1195888, 1199172, 1195740, 1199371, 1199373,\n", - " 1195323, 1196837, 1198668, 1195132, 1198260, 1198036, 1198646, 1198167,\n", - " 1198161, 1196717, 1195145, 1195265, 1195270, 1197141, 1196109, 1195841,\n", - " 1195850, 1195659, 1197478, 1195778, 1196283, 1199856, 1199062, 1199059,\n", - " 1197285, 1202747, 1199185, 1194928, 1199628, 1199803, 1197990, 1200076,\n", - " 1200869, 1200747, 1199847, 1197683, 1196501, 1199021, 1197609, 1197961,\n", - " 1196727, 1200894, 1203239, 1198811, 1201827, 1200503, 1200507, 1198593,\n", - " 1199445, 1201156, 1202630, 1201056, 1200913, 1201405, 1194803, 1199723,\n", - " 1203344, 1201492, 1200553, 1200556, 1197097, 1197100, 1203183, 1202138,\n", - " 1200692, 1202232, 1199482, 1199976, 1195876, 1200189, 1201596, 1199929,\n", - " 1196966, 1202879, 1200997, 1202687, 1198525, 1203112, 1195664, 1200445,\n", - " 1200382, 1198929, 1197060, 1197066, 1201499, 1196605, 1196375, 1203102,\n", - " 1201138, 1198824, 1197731, 1197735, 1200437, 1199782, 1198819, 1195066,\n", - " 1200296, 1197652, 1197335, 1198996], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195452, 1196007, 1196011, 1197451, 1197719, 1200099, 1195858, 1199282,\n", - " 1199293, 1202255, 1198840, 1202119, 1197777, 1197791, 1201016, 1198624,\n", - " 1198633, 1198694, 1202804, 1198557, 1194743, 1194745, 1197159, 1195511,\n", - " 1195263, 1199135, 1201992, 1198371, 1198380, 1198383, 1197697, 1199519,\n", - " 1195457, 1198306, 1194882, 1195888, 1199172, 1195740, 1199371, 1199373,\n", - " 1195323, 1196837, 1198668, 1195132, 1198260, 1198036, 1198646, 1198167,\n", - " 1198161, 1196717, 1195145, 1195265, 1195270, 1197141, 1196109, 1195841,\n", - " 1195850, 1195659, 1197478, 1195778, 1196283, 1199856, 1199062, 1199059,\n", - " 1197285, 1202747, 1199185, 1194928, 1199628, 1199803, 1197990, 1200076,\n", - " 1200869, 1200747, 1199847, 1197683, 1196501, 1199021, 1197609, 1197961,\n", - " 1196727, 1200894, 1203239, 1198811, 1201827, 1200503, 1200507, 1198593,\n", - " 1199445, 1201156, 1202630, 1201056, 1200913, 1201405, 1194803, 1199723,\n", - " 1203344, 1201492, 1200553, 1200556, 1197097, 1197100, 1203183, 1202138,\n", - " 1200692, 1202232, 1199482, 1199976, 1195876, 1200189, 1201596, 1199929,\n", - " 1196966, 1202879, 1200997, 1202687, 1198525, 1203112, 1195664, 1200445,\n", - " 1200382, 1198929, 1197060, 1197066, 1201499, 1196605, 1196375, 1203102,\n", - " 1201138, 1198824, 1197731, 1197735, 1200437, 1199782, 1198819, 1195066,\n", - " 1200296, 1197652, 1197335, 1198996], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 9.4907e-02, -1.9377e-04, 6.7879e-01, ..., 1.2993e-01,\n", - " -2.0570e-03, -4.2902e-03],\n", - " [ 1.5515e-01, 3.3271e-02, 7.7551e-01, ..., 1.1307e-01,\n", - " -1.3062e-03, -5.0525e-03],\n", - " [ 2.6585e-01, -7.0733e-04, 1.0615e+00, ..., 9.9214e-02,\n", - " -1.6479e-03, -7.0683e-03],\n", - " ...,\n", - " [ 2.4959e-01, -3.6386e-04, 1.0130e+00, ..., 1.2114e-01,\n", - " -1.8941e-03, -6.6330e-03],\n", - " [ 9.6698e-02, -3.4821e-04, 7.5005e-01, ..., 1.4794e-01,\n", - " -2.0655e-03, -4.6512e-03],\n", - " [ 1.8392e-01, 5.0560e-02, 8.7916e-01, ..., 1.3993e-01,\n", - " -1.3329e-03, -5.7126e-03]], device='cuda:0'), 'paper': tensor([[ 1.7440e+00, 1.1309e+00, 3.4969e+00, ..., 1.7177e+00,\n", - " -5.4172e-02, 3.4434e+00],\n", - " [-2.1427e-03, -2.4585e-03, 3.3745e+00, ..., -6.4266e-03,\n", - " -3.1249e-02, -1.3353e-02],\n", - " [-6.5476e-03, 7.0371e-02, 4.5025e+00, ..., -1.3597e-02,\n", - " -3.6916e-02, -2.2355e-02],\n", - " ...,\n", - " [ 1.1016e+00, 1.1312e+00, 3.0793e+00, ..., 3.1033e-01,\n", - " -3.4092e-02, 1.1064e+00],\n", - " [ 5.0084e-01, 7.2352e-01, 1.6093e+00, ..., -2.3644e-03,\n", - " -1.9352e-02, -1.3095e-03],\n", - " [ 1.8491e+00, 1.5275e+00, 3.3966e+00, ..., 2.5052e+00,\n", - " -5.7626e-02, 4.1123e+00]], device='cuda:0'), 'author': tensor([[-6.0341e-04, 2.3675e-01, 9.7394e-02, ..., 1.7071e+00,\n", - " 2.4746e-01, 1.5053e-01],\n", - " [-3.7296e-03, 4.2299e-01, 3.5326e-01, ..., 1.5820e+00,\n", - " -4.6692e-03, -5.0751e-03],\n", - " [-1.6579e-03, 3.1000e-01, 2.0966e-01, ..., 1.6301e+00,\n", - " -8.1979e-04, -6.2492e-04],\n", - " ...,\n", - " [-2.4578e-03, 3.2652e-01, 3.2190e-01, ..., 1.7080e+00,\n", - " -1.3047e-03, -1.3410e-03],\n", - " [-1.1845e-03, 3.3461e-01, 2.0293e-01, ..., 1.6528e+00,\n", - " 4.7052e-02, 4.3120e-02],\n", - " [-1.0881e-03, 2.6289e-01, 1.6748e-01, ..., 1.5942e+00,\n", - " 7.4486e-02, 3.4086e-02]], device='cuda:0'), 'field_of_study': tensor([[-7.3721e-06, 6.9022e-01, 4.0581e-01, ..., -9.5715e-03,\n", - " 2.9425e-01, 4.6294e-01],\n", - " [-1.2918e-04, 7.0959e-01, 3.9642e-01, ..., -1.0700e-02,\n", - " 3.6603e-01, 4.7404e-01],\n", - " [ 1.5628e-01, 8.0690e-01, 4.6925e-01, ..., -9.4472e-03,\n", - " 3.9140e-01, 2.5964e-01],\n", - " ...,\n", - " [-2.3318e-04, 1.0308e+00, 6.8771e-01, ..., -1.2852e-02,\n", - " 4.3223e-01, 7.5916e-01],\n", - " [ 1.3008e-01, 7.2214e-01, 4.8979e-01, ..., -5.9905e-03,\n", - " 3.3123e-01, 1.3543e-01],\n", - " [ 2.2268e-02, 6.8360e-01, 3.4903e-01, ..., -8.7452e-03,\n", - " 3.1595e-01, 3.5948e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 101, 171, 154, 93, 113, 135, 26, 365, 462, 512, 240, 49,\n", - " 449, 449, 253, 438, 980, 973, 905, 900, 855, 1146, 1146, 1239,\n", - " 1214, 1285, 1410, 1129, 1285, 1190, 1316, 1362, 1388, 1515, 1454, 1732,\n", - " 1535, 1719, 1742, 1949, 1844, 1844, 1949, 1885, 1816, 1789, 1996, 1906,\n", - " 1800, 2010, 1784, 1923, 2054, 2061, 2060, 1957, 2061, 2061, 2023, 2106,\n", - " 2073, 2073, 2275, 2364, 2364, 2364, 2287, 2164, 2324, 2324, 2324, 2315,\n", - " 2542, 2542, 2427, 2427, 2441, 2441, 2866, 2955, 2740, 2692, 2692, 2692,\n", - " 2668, 2517, 2836, 2792, 2882, 3125, 3075, 3276, 3276, 3198, 3198, 3198,\n", - " 3198, 3308, 3291, 3718, 3377, 3736, 3554, 3660, 3711, 3742, 3765, 3765,\n", - " 3726, 3700, 3765, 3792, 3804, 3804, 3853, 3817, 3817, 3876, 3873, 3846,\n", - " 3846, 3846, 3913, 3914, 3962, 3952, 4068, 4068, 4068, 4068, 4043, 4077,\n", - " 4014, 4256, 4051, 4176, 4178, 4241, 4198, 4337, 4355, 4400, 4398, 4616,\n", - " 4616, 4532, 4732, 4732, 4543, 4390, 4390, 4390, 4390, 4390, 4702, 4697,\n", - " 4610, 4608, 4687, 4791, 4791, 4796, 4861, 4861, 4861, 4911, 5075, 5075,\n", - " 4939, 5157, 5188, 5188, 5609, 5609, 5416, 5397, 5485, 5580, 5499, 5396,\n", - " 5619, 5586, 5586, 5720, 5295, 5638, 5461, 5818, 5818, 5741, 6074, 5652,\n", - " 5652, 5652, 5825, 6114, 6028, 5638, 5638, 5638, 5638, 5638, 5677, 5983,\n", - " 5624, 5624, 5802, 5802, 5802, 6069, 6076, 6076, 6070, 6034, 6034, 6036,\n", - " 6036],\n", - " [ 54, 91, 29, 109, 72, 51, 139, 13, 66, 71, 41, 6,\n", - " 27, 39, 121, 18, 78, 138, 7, 52, 119, 134, 92, 110,\n", - " 60, 127, 24, 116, 83, 135, 86, 38, 124, 24, 32, 7,\n", - " 122, 37, 42, 47, 46, 82, 21, 21, 13, 135, 91, 24,\n", - " 123, 90, 22, 24, 77, 109, 34, 111, 126, 59, 24, 7,\n", - " 5, 51, 45, 0, 95, 3, 32, 121, 44, 17, 97, 50,\n", - " 24, 108, 51, 5, 88, 6, 58, 0, 116, 79, 122, 105,\n", - " 8, 24, 98, 80, 24, 135, 131, 130, 57, 77, 69, 81,\n", - " 85, 24, 101, 61, 7, 99, 132, 87, 68, 96, 54, 76,\n", - " 7, 24, 80, 8, 117, 1, 113, 128, 91, 24, 24, 53,\n", - " 16, 114, 28, 115, 135, 24, 136, 100, 111, 131, 113, 113,\n", - " 120, 68, 9, 74, 113, 26, 6, 2, 14, 30, 118, 106,\n", - " 75, 15, 33, 68, 73, 43, 64, 102, 24, 19, 40, 36,\n", - " 80, 11, 106, 103, 25, 12, 49, 84, 62, 24, 117, 88,\n", - " 24, 77, 54, 80, 70, 31, 68, 71, 93, 125, 91, 63,\n", - " 91, 56, 80, 80, 4, 34, 133, 94, 80, 80, 104, 20,\n", - " 80, 10, 48, 24, 138, 80, 89, 26, 14, 107, 112, 65,\n", - " 80, 23, 80, 92, 48, 80, 35, 54, 129, 137, 80, 55,\n", - " 67]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2680, 2018, 1682, ..., 429, 1836, 3268],\n", - " [ 204, 3, 99, ..., 7113, 7189, 7241]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 117, 39, 40, ..., 91, 91, 5],\n", - " [ 105, 46, 59, ..., 6020, 6093, 6016]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 61, 61, 61, ..., 7271, 7271, 7271],\n", - " [ 612, 431, 144, ..., 61, 405, 260]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 301, 317, 260, ..., 368, 212, 316],\n", - " [ 90, 65, 51, ..., 7261, 7178, 7092]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 426, 1324, 3002, ..., 7141, 7043, 6596],\n", - " [ 159, 159, 159, ..., 6055, 6104, 6070]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 286, 286, 286, ..., 7077, 7077, 7177],\n", - " [3849, 1053, 1015, ..., 7235, 7166, 1225]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 93, 93, 93, ..., 6056, 6056, 6056],\n", - " [2552, 2825, 847, ..., 4680, 4721, 4847]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006348\n", - "sampling 0.00619\n", - "noi time: 0.002488\n", - "get_vertex_data call: 0.035092\n", - "noi group time: 0.001813\n", - "eoi_group_time: 0.011248\n", - "second half: 0.184427\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 24178, 24187, 32616, ..., 1132728, 1120067, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 24178, 24187, 32616, ..., 1132728, 1120067, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1212857, 1231431, ..., 1933651, 1935650, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1212857, 1231431, ..., 1933651, 1935650, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1141439, 1136230, 1140282, 1140284, 1135926, 1135935, 1135726,\n", - " 1140785, 1139698, 1136208, 1136223, 1136211, 1142802, 1136962, 1136971,\n", - " 1141443, 1143615, 1139808, 1139817, 1139811, 1146983, 1145999, 1143372,\n", - " 1150497, 1150506, 1145282, 1142968, 1134937, 1149216, 1155682, 1155685,\n", - " 1155689, 1143820, 1149639, 1147483, 1144632, 1146992, 1146995, 1153008,\n", - " 1135475, 1136112, 1152666, 1138347, 1138345, 1147094, 1155014, 1139365,\n", - " 1139371, 1136685, 1150326, 1136268, 1134661, 1137829, 1137833, 1151536,\n", - " 1140537, 1140540, 1138112, 1137254, 1135171, 1137170, 1138356, 1138366,\n", - " 1140020, 1140946, 1140953, 1135367, 1135202, 1140767, 1154739, 1141036,\n", - " 1134794, 1157447, 1138504, 1157103, 1137693, 1144395, 1157393, 1136662,\n", - " 1143317, 1135265, 1156146, 1141086, 1136111, 1135670, 1140970, 1140707,\n", - " 1156342, 1138514, 1153092, 1158136, 1156967, 1135490, 1135522, 1139684,\n", - " 1139685, 1139687, 1138434, 1138440, 1138461, 1158390, 1149328, 1156603,\n", - " 1156606, 1142611, 1160819, 1148536, 1139667, 1159185, 1142249, 1136094,\n", - " 1134992, 1136551, 1136546, 1139745, 1158970, 1158974, 1141070, 1144410,\n", - " 1153543, 1153544, 1143626, 1143631, 1140034, 1138647, 1138147, 1138150,\n", - " 1141964, 1152042, 1152044, 1137728, 1147317, 1134750, 1135540, 1136697,\n", - " 1140228, 1137902, 1144138, 1144143, 1149001, 1139119, 1139632, 1143767,\n", - " 1143775, 1154860, 1137299, 1143225, 1139025, 1149968, 1141695, 1135861,\n", - " 1136625, 1142931, 1139386, 1139387, 1143676, 1139495, 1144650, 1136862,\n", - " 1136851, 1147844, 1147850, 1137074, 1144428, 1138482, 1141821, 1143158,\n", - " 1140160, 1138469, 1138472, 1137771, 1137058, 1140110, 1138423, 1143107,\n", - " 1148444, 1144596, 1157420, 1136864, 1140885, 1144182, 1144865, 1143755,\n", - " 1139559, 1138529, 1138539, 1137854, 1142640, 1149193, 1141664, 1149088,\n", - " 1149090, 1139018, 1138293, 1144279, 1139510, 1139763, 1139650, 1138815,\n", - " 1139127, 1145001, 1140616, 1140990, 1147050, 1143543, 1152980, 1152985,\n", - " 1141925, 1146901, 1145332, 1145343, 1165366, 1141841, 1134859, 1143845,\n", - " 1143851, 1146024, 1138085, 1146140, 1141585, 1139990, 1148763, 1147282,\n", - " 1147458, 1149365, 1149366, 1139408, 1147375, 1148003, 1157720, 1136836,\n", - " 1146099, 1139297, 1144778, 1158045, 1143345, 1144611, 1144619, 1145808,\n", - " 1140844, 1144080, 1138595, 1150294, 1144376, 1138024, 1143456, 1143457,\n", - " 1147574, 1143798, 1146633, 1146626, 1147521, 1140364, 1137990, 1144732,\n", - " 1147995, 1147996, 1147999, 1134902, 1144013, 1148704, 1141327, 1141836,\n", - " 1153701, 1147066, 1149714, 1149719, 1147970, 1147981, 1139549, 1158226,\n", - " 1158230, 1158235, 1147874, 1154519, 1145238, 1145751, 1146159, 1146178,\n", - " 1138857, 1151242, 1148217, 1152530, 1152538, 1150274, 1151179, 1150438,\n", - " 1150445, 1149250, 1148821, 1147962, 1154438, 1154445, 1149791, 1144514,\n", - " 1144526, 1138041, 1138044, 1144174, 1146895, 1152013, 1151473, 1152022,\n", - " 1152027, 1154263, 1151041, 1145255, 1145259, 1142278, 1150123, 1153152,\n", - " 1141941, 1146772, 1148744, 1153574, 1148453, 1147653, 1151717, 1148300,\n", - " 1137724, 1135085, 1139097, 1154430, 1154420, 1151363, 1136251, 1136247,\n", - " 1139718, 1146676, 1138874, 1138404, 1141181, 1157978, 1148720, 1147627,\n", - " 1143893, 1143895, 1148204, 1148096, 1171943, 1153124, 1153192, 1153188,\n", - " 1150935, 1144863, 1155088, 1146232, 1147442, 1152581, 1135307, 1148498,\n", - " 1146562, 1146571, 1141420, 1152784, 1136002, 1149359, 1153261, 1150219,\n", - " 1146623, 1152407, 1154052, 1152100, 1152103, 1153026, 1153037, 1153039,\n", - " 1137746, 1137756, 1146307, 1146304, 1136401, 1152819, 1155337, 1154119,\n", - " 1154123, 1154126, 1157824, 1152673, 1139570, 1150578, 1150579, 1136134,\n", - " 1136798, 1148914, 1152957, 1140461, 1145925, 1153377, 1144540, 1140932,\n", - " 1138982, 1152903, 1151311, 1152341, 1146816, 1146704, 1138279, 1152295,\n", - " 1156004, 1156001, 1136028, 1136024, 1158704, 1156621, 1156622, 1140682,\n", - " 1152928, 1154733, 1142777, 1150150, 1150164, 1144016, 1148036, 1148040,\n", - " 1148034, 1155202, 1154457, 1149804, 1137048, 1148628, 1158530, 1158540,\n", - " 1137458, 1148246, 1157229, 1158916, 1156505, 1157064, 1155418, 1152833,\n", - " 1145191, 1137808, 1151260, 1157559, 1150465, 1152179, 1152183, 1152182,\n", - " 1156629, 1156638, 1165700, 1150824, 1156932, 1153415, 1147810, 1143019,\n", - " 1157784, 1158308, 1158311, 1151271, 1151331, 1174257, 1155441, 1155442,\n", - " 1137972, 1162120, 1154529, 1154530, 1154542, 1153999, 1142755, 1138775,\n", - " 1156269, 1151379, 1155122, 1152527, 1149519, 1153486, 1155746, 1151424,\n", - " 1145793, 1156455, 1156463, 1158096, 1154763, 1155628, 1155630, 1156563,\n", - " 1158824, 1158325, 1148835, 1154648, 1162396, 1154250, 1156711, 1143189,\n", - " 1150371, 1157439, 1157430, 1141620, 1150987, 1155293, 1143517, 1157663,\n", - " 1153786, 1158192, 1158206, 1137381, 1145690, 1135601, 1150661, 1155848,\n", - " 1149145, 1152209, 1167297, 1140370, 1140380, 1140381, 1140374, 1157732,\n", - " 1159132, 1155971, 1155975, 1158846, 1183182, 1155402, 1155404, 1149700,\n", - " 1154604, 1160163, 1136910, 1136896, 1158753, 1140208, 1158438, 1156778,\n", - " 1158285, 1152463, 1151615, 1136494, 1164931, 1157581, 1153632, 1155302,\n", - " 1156488, 1153808, 1136640, 1157858, 1142178, 1160912, 1158555, 1146126,\n", - " 1155521, 1142666, 1157751, 1167359, 1156045, 1151080, 1153052, 1153045,\n", - " 1171551, 1167566, 1170863, 1153841, 1138391, 1138393, 1149063, 1145945,\n", - " 1155479, 1154297, 1154299, 1153514, 1153519, 1146876, 1163391, 1160764,\n", - " 1139592, 1139290, 1166073, 1157359, 1146063, 1159552, 1160697, 1158878,\n", - " 1169489, 1140643, 1140649, 1143139, 1143146, 1166805, 1151872, 1156357,\n", - " 1158643, 1156183, 1159025, 1159032, 1160882, 1186967, 1152247, 1143735,\n", - " 1143737, 1155588, 1144320, 1168427, 1164580, 1144747, 1155044, 1163527,\n", - " 1145137, 1155268, 1153204, 1156750, 1157958, 1171040, 1144810, 1144812,\n", - " 1164741, 1156293, 1156303, 1162611, 1144058, 1145729, 1145728, 1145228,\n", - " 1160773, 1166462, 1144973, 1143028, 1143025, 1145447, 1139344, 1145900,\n", - " 1145902, 1153534, 1169538, 1143397, 1143402, 1158724, 1158734, 1154076,\n", - " 1147338, 1144690, 1169602, 1144681, 1166653, 1169298, 1155172, 1150518,\n", - " 1167918, 1156113, 1146601, 1144346, 1157534, 1184188, 1138369, 1157331,\n", - " 1157333, 1138130, 1141043, 1158611, 1149847, 1160141, 1176720, 1152353,\n", - " 1143172, 1168049, 1149402, 1148667, 1167022, 1177984, 1165904, 1173307,\n", - " 1169149, 1154027, 1159655, 1157158, 1147711, 1151850, 1148141, 1148142,\n", - " 1157585, 1166827, 1181014, 1170023, 1166679, 1166682, 1170874, 1171823,\n", - " 1149169, 1169821, 1181216, 1186127, 1143271, 1143420, 1166299, 1181246,\n", - " 1153803, 1172801, 1180649, 1171407, 1161255, 1177581, 1154718, 1143335,\n", - " 1171623, 1164034, 1178359, 1178367, 1190802, 1157134, 1174951, 1158249,\n", - " 1153890, 1153897, 1134650, 1164560, 1178214, 1145626, 1180383, 1146242,\n", - " 1152274, 1155992, 1155892, 1155899, 1155889, 1162694, 1159872, 1160400,\n", - " 1189641, 1170597, 1169064, 1186712, 1162253, 1187743, 1177911, 1164230,\n", - " 1188259, 1181457, 1181821, 1179473, 1156528, 1156539, 1139831, 1139837,\n", - " 1150265, 1154810, 1190585, 1156049, 1156055, 1151978, 1146395, 1182370,\n", - " 1172399, 1156838, 1178526, 1170207, 1162156, 1167840, 1151774, 1172339,\n", - " 1169707, 1166841, 1178625, 1178636, 1171201, 1158064, 1158067, 1167730,\n", - " 1180262, 1184442, 1176829, 1155962, 1188473, 1180867, 1169831, 1191142],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1141439, 1136230, 1140282, 1140284, 1135926, 1135935, 1135726,\n", - " 1140785, 1139698, 1136208, 1136223, 1136211, 1142802, 1136962, 1136971,\n", - " 1141443, 1143615, 1139808, 1139817, 1139811, 1146983, 1145999, 1143372,\n", - " 1150497, 1150506, 1145282, 1142968, 1134937, 1149216, 1155682, 1155685,\n", - " 1155689, 1143820, 1149639, 1147483, 1144632, 1146992, 1146995, 1153008,\n", - " 1135475, 1136112, 1152666, 1138347, 1138345, 1147094, 1155014, 1139365,\n", - " 1139371, 1136685, 1150326, 1136268, 1134661, 1137829, 1137833, 1151536,\n", - " 1140537, 1140540, 1138112, 1137254, 1135171, 1137170, 1138356, 1138366,\n", - " 1140020, 1140946, 1140953, 1135367, 1135202, 1140767, 1154739, 1141036,\n", - " 1134794, 1157447, 1138504, 1157103, 1137693, 1144395, 1157393, 1136662,\n", - " 1143317, 1135265, 1156146, 1141086, 1136111, 1135670, 1140970, 1140707,\n", - " 1156342, 1138514, 1153092, 1158136, 1156967, 1135490, 1135522, 1139684,\n", - " 1139685, 1139687, 1138434, 1138440, 1138461, 1158390, 1149328, 1156603,\n", - " 1156606, 1142611, 1160819, 1148536, 1139667, 1159185, 1142249, 1136094,\n", - " 1134992, 1136551, 1136546, 1139745, 1158970, 1158974, 1141070, 1144410,\n", - " 1153543, 1153544, 1143626, 1143631, 1140034, 1138647, 1138147, 1138150,\n", - " 1141964, 1152042, 1152044, 1137728, 1147317, 1134750, 1135540, 1136697,\n", - " 1140228, 1137902, 1144138, 1144143, 1149001, 1139119, 1139632, 1143767,\n", - " 1143775, 1154860, 1137299, 1143225, 1139025, 1149968, 1141695, 1135861,\n", - " 1136625, 1142931, 1139386, 1139387, 1143676, 1139495, 1144650, 1136862,\n", - " 1136851, 1147844, 1147850, 1137074, 1144428, 1138482, 1141821, 1143158,\n", - " 1140160, 1138469, 1138472, 1137771, 1137058, 1140110, 1138423, 1143107,\n", - " 1148444, 1144596, 1157420, 1136864, 1140885, 1144182, 1144865, 1143755,\n", - " 1139559, 1138529, 1138539, 1137854, 1142640, 1149193, 1141664, 1149088,\n", - " 1149090, 1139018, 1138293, 1144279, 1139510, 1139763, 1139650, 1138815,\n", - " 1139127, 1145001, 1140616, 1140990, 1147050, 1143543, 1152980, 1152985,\n", - " 1141925, 1146901, 1145332, 1145343, 1165366, 1141841, 1134859, 1143845,\n", - " 1143851, 1146024, 1138085, 1146140, 1141585, 1139990, 1148763, 1147282,\n", - " 1147458, 1149365, 1149366, 1139408, 1147375, 1148003, 1157720, 1136836,\n", - " 1146099, 1139297, 1144778, 1158045, 1143345, 1144611, 1144619, 1145808,\n", - " 1140844, 1144080, 1138595, 1150294, 1144376, 1138024, 1143456, 1143457,\n", - " 1147574, 1143798, 1146633, 1146626, 1147521, 1140364, 1137990, 1144732,\n", - " 1147995, 1147996, 1147999, 1134902, 1144013, 1148704, 1141327, 1141836,\n", - " 1153701, 1147066, 1149714, 1149719, 1147970, 1147981, 1139549, 1158226,\n", - " 1158230, 1158235, 1147874, 1154519, 1145238, 1145751, 1146159, 1146178,\n", - " 1138857, 1151242, 1148217, 1152530, 1152538, 1150274, 1151179, 1150438,\n", - " 1150445, 1149250, 1148821, 1147962, 1154438, 1154445, 1149791, 1144514,\n", - " 1144526, 1138041, 1138044, 1144174, 1146895, 1152013, 1151473, 1152022,\n", - " 1152027, 1154263, 1151041, 1145255, 1145259, 1142278, 1150123, 1153152,\n", - " 1141941, 1146772, 1148744, 1153574, 1148453, 1147653, 1151717, 1148300,\n", - " 1137724, 1135085, 1139097, 1154430, 1154420, 1151363, 1136251, 1136247,\n", - " 1139718, 1146676, 1138874, 1138404, 1141181, 1157978, 1148720, 1147627,\n", - " 1143893, 1143895, 1148204, 1148096, 1171943, 1153124, 1153192, 1153188,\n", - " 1150935, 1144863, 1155088, 1146232, 1147442, 1152581, 1135307, 1148498,\n", - " 1146562, 1146571, 1141420, 1152784, 1136002, 1149359, 1153261, 1150219,\n", - " 1146623, 1152407, 1154052, 1152100, 1152103, 1153026, 1153037, 1153039,\n", - " 1137746, 1137756, 1146307, 1146304, 1136401, 1152819, 1155337, 1154119,\n", - " 1154123, 1154126, 1157824, 1152673, 1139570, 1150578, 1150579, 1136134,\n", - " 1136798, 1148914, 1152957, 1140461, 1145925, 1153377, 1144540, 1140932,\n", - " 1138982, 1152903, 1151311, 1152341, 1146816, 1146704, 1138279, 1152295,\n", - " 1156004, 1156001, 1136028, 1136024, 1158704, 1156621, 1156622, 1140682,\n", - " 1152928, 1154733, 1142777, 1150150, 1150164, 1144016, 1148036, 1148040,\n", - " 1148034, 1155202, 1154457, 1149804, 1137048, 1148628, 1158530, 1158540,\n", - " 1137458, 1148246, 1157229, 1158916, 1156505, 1157064, 1155418, 1152833,\n", - " 1145191, 1137808, 1151260, 1157559, 1150465, 1152179, 1152183, 1152182,\n", - " 1156629, 1156638, 1165700, 1150824, 1156932, 1153415, 1147810, 1143019,\n", - " 1157784, 1158308, 1158311, 1151271, 1151331, 1174257, 1155441, 1155442,\n", - " 1137972, 1162120, 1154529, 1154530, 1154542, 1153999, 1142755, 1138775,\n", - " 1156269, 1151379, 1155122, 1152527, 1149519, 1153486, 1155746, 1151424,\n", - " 1145793, 1156455, 1156463, 1158096, 1154763, 1155628, 1155630, 1156563,\n", - " 1158824, 1158325, 1148835, 1154648, 1162396, 1154250, 1156711, 1143189,\n", - " 1150371, 1157439, 1157430, 1141620, 1150987, 1155293, 1143517, 1157663,\n", - " 1153786, 1158192, 1158206, 1137381, 1145690, 1135601, 1150661, 1155848,\n", - " 1149145, 1152209, 1167297, 1140370, 1140380, 1140381, 1140374, 1157732,\n", - " 1159132, 1155971, 1155975, 1158846, 1183182, 1155402, 1155404, 1149700,\n", - " 1154604, 1160163, 1136910, 1136896, 1158753, 1140208, 1158438, 1156778,\n", - " 1158285, 1152463, 1151615, 1136494, 1164931, 1157581, 1153632, 1155302,\n", - " 1156488, 1153808, 1136640, 1157858, 1142178, 1160912, 1158555, 1146126,\n", - " 1155521, 1142666, 1157751, 1167359, 1156045, 1151080, 1153052, 1153045,\n", - " 1171551, 1167566, 1170863, 1153841, 1138391, 1138393, 1149063, 1145945,\n", - " 1155479, 1154297, 1154299, 1153514, 1153519, 1146876, 1163391, 1160764,\n", - " 1139592, 1139290, 1166073, 1157359, 1146063, 1159552, 1160697, 1158878,\n", - " 1169489, 1140643, 1140649, 1143139, 1143146, 1166805, 1151872, 1156357,\n", - " 1158643, 1156183, 1159025, 1159032, 1160882, 1186967, 1152247, 1143735,\n", - " 1143737, 1155588, 1144320, 1168427, 1164580, 1144747, 1155044, 1163527,\n", - " 1145137, 1155268, 1153204, 1156750, 1157958, 1171040, 1144810, 1144812,\n", - " 1164741, 1156293, 1156303, 1162611, 1144058, 1145729, 1145728, 1145228,\n", - " 1160773, 1166462, 1144973, 1143028, 1143025, 1145447, 1139344, 1145900,\n", - " 1145902, 1153534, 1169538, 1143397, 1143402, 1158724, 1158734, 1154076,\n", - " 1147338, 1144690, 1169602, 1144681, 1166653, 1169298, 1155172, 1150518,\n", - " 1167918, 1156113, 1146601, 1144346, 1157534, 1184188, 1138369, 1157331,\n", - " 1157333, 1138130, 1141043, 1158611, 1149847, 1160141, 1176720, 1152353,\n", - " 1143172, 1168049, 1149402, 1148667, 1167022, 1177984, 1165904, 1173307,\n", - " 1169149, 1154027, 1159655, 1157158, 1147711, 1151850, 1148141, 1148142,\n", - " 1157585, 1166827, 1181014, 1170023, 1166679, 1166682, 1170874, 1171823,\n", - " 1149169, 1169821, 1181216, 1186127, 1143271, 1143420, 1166299, 1181246,\n", - " 1153803, 1172801, 1180649, 1171407, 1161255, 1177581, 1154718, 1143335,\n", - " 1171623, 1164034, 1178359, 1178367, 1190802, 1157134, 1174951, 1158249,\n", - " 1153890, 1153897, 1134650, 1164560, 1178214, 1145626, 1180383, 1146242,\n", - " 1152274, 1155992, 1155892, 1155899, 1155889, 1162694, 1159872, 1160400,\n", - " 1189641, 1170597, 1169064, 1186712, 1162253, 1187743, 1177911, 1164230,\n", - " 1188259, 1181457, 1181821, 1179473, 1156528, 1156539, 1139831, 1139837,\n", - " 1150265, 1154810, 1190585, 1156049, 1156055, 1151978, 1146395, 1182370,\n", - " 1172399, 1156838, 1178526, 1170207, 1162156, 1167840, 1151774, 1172339,\n", - " 1169707, 1166841, 1178625, 1178636, 1171201, 1158064, 1158067, 1167730,\n", - " 1180262, 1184442, 1176829, 1155962, 1188473, 1180867, 1169831, 1191142],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197168, 1197183, 1199424, 1197719, 1198721, 1199831, 1199835,\n", - " 1201094, 1199282, 1198458, 1198459, 1198844, 1201577, 1201582, 1197777,\n", - " 1198557, 1197512, 1194866, 1198180, 1195726, 1197430, 1198623, 1195263,\n", - " 1201992, 1195457, 1198306, 1194882, 1195888, 1199171, 1194976, 1195313,\n", - " 1196835, 1198669, 1196165, 1198167, 1196711, 1199823, 1195265, 1195278,\n", - " 1197141, 1197136, 1197366, 1197273, 1194859, 1195846, 1195038, 1198915,\n", - " 1195659, 1195541, 1198207, 1196305, 1195626, 1196393, 1199059, 1199185,\n", - " 1199628, 1197674, 1197676, 1199231, 1201904, 1195017, 1200116, 1194795,\n", - " 1199949, 1195807, 1197611, 1201116, 1196727, 1196734, 1202623, 1200894,\n", - " 1198428, 1198811, 1199555, 1201824, 1201827, 1200503, 1198066, 1198593,\n", - " 1199445, 1201156, 1201056, 1200913, 1201405, 1194803, 1199712, 1201041,\n", - " 1201492, 1202499, 1200553, 1203071, 1201721, 1202541, 1199886, 1201757,\n", - " 1197040, 1200692, 1200194, 1201442, 1196256, 1201029, 1199976, 1202707,\n", - " 1201291, 1198466, 1202209, 1202889, 1199925, 1199929, 1201800, 1196963,\n", - " 1196966, 1200793, 1195664, 1198929, 1200684, 1201789, 1195386, 1201321,\n", - " 1197816, 1196597, 1197403, 1199659, 1194730, 1198824, 1199782, 1198819,\n", - " 1200466, 1195070, 1195066, 1197655, 1201365, 1201960, 1197872],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197168, 1197183, 1199424, 1197719, 1198721, 1199831, 1199835,\n", - " 1201094, 1199282, 1198458, 1198459, 1198844, 1201577, 1201582, 1197777,\n", - " 1198557, 1197512, 1194866, 1198180, 1195726, 1197430, 1198623, 1195263,\n", - " 1201992, 1195457, 1198306, 1194882, 1195888, 1199171, 1194976, 1195313,\n", - " 1196835, 1198669, 1196165, 1198167, 1196711, 1199823, 1195265, 1195278,\n", - " 1197141, 1197136, 1197366, 1197273, 1194859, 1195846, 1195038, 1198915,\n", - " 1195659, 1195541, 1198207, 1196305, 1195626, 1196393, 1199059, 1199185,\n", - " 1199628, 1197674, 1197676, 1199231, 1201904, 1195017, 1200116, 1194795,\n", - " 1199949, 1195807, 1197611, 1201116, 1196727, 1196734, 1202623, 1200894,\n", - " 1198428, 1198811, 1199555, 1201824, 1201827, 1200503, 1198066, 1198593,\n", - " 1199445, 1201156, 1201056, 1200913, 1201405, 1194803, 1199712, 1201041,\n", - " 1201492, 1202499, 1200553, 1203071, 1201721, 1202541, 1199886, 1201757,\n", - " 1197040, 1200692, 1200194, 1201442, 1196256, 1201029, 1199976, 1202707,\n", - " 1201291, 1198466, 1202209, 1202889, 1199925, 1199929, 1201800, 1196963,\n", - " 1196966, 1200793, 1195664, 1198929, 1200684, 1201789, 1195386, 1201321,\n", - " 1197816, 1196597, 1197403, 1199659, 1194730, 1198824, 1199782, 1198819,\n", - " 1200466, 1195070, 1195066, 1197655, 1201365, 1201960, 1197872],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.2872e-01, -1.2329e-04, 6.9476e-01, ..., 1.2898e-01,\n", - " -1.8241e-03, -4.4191e-03],\n", - " [ 1.5011e-01, -1.3253e-04, 7.3237e-01, ..., 1.1072e-01,\n", - " -1.8696e-03, -4.8519e-03],\n", - " [ 1.6725e-01, 3.3701e-02, 7.9337e-01, ..., 1.5143e-01,\n", - " -1.8256e-03, -5.2311e-03],\n", - " ...,\n", - " [ 1.5868e-01, -1.2379e-04, 8.7253e-01, ..., 1.1463e-01,\n", - " -1.8283e-03, -5.6990e-03],\n", - " [ 9.9127e-02, -1.6772e-04, 6.9051e-01, ..., 1.1172e-01,\n", - " -1.6382e-03, -4.4362e-03],\n", - " [ 1.6080e-01, 1.7755e-02, 8.0996e-01, ..., 1.2146e-01,\n", - " -1.6124e-03, -4.8144e-03]], device='cuda:0'), 'paper': tensor([[ 1.5717e+00, 1.5430e+00, 3.5637e+00, ..., 1.3510e+00,\n", - " -4.5979e-02, 2.4665e+00],\n", - " [-6.1295e-04, 2.7894e-02, 2.9825e+00, ..., -6.4898e-03,\n", - " -2.8191e-02, -1.1624e-02],\n", - " [ 6.0932e-01, 5.5024e-01, 1.6359e+00, ..., -6.6373e-03,\n", - " -1.9979e-02, -1.6293e-03],\n", - " ...,\n", - " [ 1.1491e+00, 6.9976e-01, 4.3543e+00, ..., 3.5792e-01,\n", - " -4.8781e-02, 1.1177e+00],\n", - " [ 1.5123e+00, 1.0991e+00, 2.9213e+00, ..., 9.3083e-01,\n", - " -4.1763e-02, 2.2800e+00],\n", - " [ 1.8052e+00, 1.5011e+00, 3.3714e+00, ..., 2.4810e+00,\n", - " -5.7320e-02, 4.0724e+00]], device='cuda:0'), 'author': tensor([[-6.2942e-04, 2.9830e-02, 1.2906e-01, ..., 1.6955e-01,\n", - " -1.0748e-04, -6.7757e-04],\n", - " [-8.5410e-04, 1.9542e-01, 2.9447e-01, ..., 1.9036e+00,\n", - " 1.9091e-01, 7.9892e-02],\n", - " [-1.9428e-03, 2.9374e-01, 2.7768e-01, ..., 1.6352e+00,\n", - " -1.0820e-03, -8.2422e-04],\n", - " ...,\n", - " [-1.5352e-03, 3.6787e-01, 1.7827e-01, ..., 1.6608e+00,\n", - " -2.9783e-04, -1.8092e-04],\n", - " [-1.0534e-03, 1.8817e-01, 2.5647e-01, ..., 1.7018e+00,\n", - " 1.4196e-01, 7.1753e-02],\n", - " [-1.3743e-03, 2.7496e-01, 1.9719e-01, ..., 1.6351e+00,\n", - " 5.7165e-02, 4.3624e-02]], device='cuda:0'), 'field_of_study': tensor([[ 0.0508, 0.7132, 0.3974, ..., -0.0089, 0.3456, 0.4069],\n", - " [ 0.0195, 0.7504, 0.4123, ..., -0.0094, 0.3786, 0.4867],\n", - " [ 0.1407, 0.8652, 0.4476, ..., -0.0096, 0.3740, 0.3416],\n", - " ...,\n", - " [ 0.0212, 0.8466, 0.5391, ..., -0.0115, 0.4381, 0.5852],\n", - " [ 0.2442, 0.8352, 0.5578, ..., -0.0076, 0.3454, 0.0527],\n", - " [ 0.0603, 0.8582, 0.4097, ..., -0.0112, 0.5654, 0.3104]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 61, 57, 160, 160, 37, 37, 105, 68, 68, 15, 452, 303,\n", - " 326, 377, 340, 221, 964, 756, 640, 741, 507, 507, 552, 663,\n", - " 663, 552, 762, 762, 753, 995, 1067, 1067, 1067, 1067, 1069, 1079,\n", - " 1372, 1097, 926, 926, 1129, 1201, 1201, 1326, 1197, 1512, 1466, 1466,\n", - " 1632, 1427, 1466, 1466, 1459, 1560, 1687, 1587, 1587, 1587, 1749, 1823,\n", - " 1788, 1688, 1688, 1688, 1845, 1845, 1911, 1753, 2096, 2049, 2049, 1880,\n", - " 1981, 1910, 2096, 2176, 2090, 1966, 2199, 2062, 2178, 2178, 2305, 2445,\n", - " 2390, 2392, 2392, 2344, 2344, 2344, 2344, 2344, 2474, 2417, 2629, 2637,\n", - " 2637, 2615, 2475, 2621, 2581, 2578, 2510, 2562, 2747, 2843, 2614, 2807,\n", - " 2807, 2807, 2807, 2889, 2808, 2796, 2997, 3117, 3240, 3238, 3238, 3238,\n", - " 3238, 3275, 3336, 3388, 3423, 3336, 3336, 3336, 3416, 4122, 3485, 3659,\n", - " 3806, 4042, 3898, 3795, 3713, 3928, 3782, 4086, 4018, 4211, 4181, 4225,\n", - " 4350, 4313, 4277, 4417, 4417, 4381, 4427, 4405, 4412, 4571, 4724, 4794,\n", - " 4689, 4817, 4800, 4793, 4579, 4803, 4803, 4781, 5083, 5039, 4849, 5133,\n", - " 5139, 5107, 5048, 5048, 5308, 5157, 5368, 5443, 5443, 5611, 5466, 5726,\n", - " 5407, 5762, 5880, 5916, 5785, 5785, 5768, 6130, 6130, 5942, 6303, 6303,\n", - " 6175, 6193],\n", - " [ 93, 31, 71, 68, 15, 24, 10, 11, 5, 64, 113, 68,\n", - " 100, 106, 123, 59, 84, 43, 111, 46, 113, 105, 73, 38,\n", - " 6, 128, 88, 82, 95, 36, 49, 22, 41, 52, 54, 130,\n", - " 48, 68, 17, 19, 87, 9, 66, 34, 76, 68, 89, 7,\n", - " 23, 107, 112, 72, 133, 133, 23, 94, 131, 120, 44, 133,\n", - " 125, 104, 24, 120, 3, 23, 133, 23, 92, 115, 9, 60,\n", - " 68, 133, 122, 127, 25, 37, 56, 129, 23, 96, 0, 121,\n", - " 66, 58, 21, 113, 105, 12, 57, 67, 134, 86, 99, 118,\n", - " 9, 42, 23, 62, 70, 78, 74, 110, 71, 119, 101, 127,\n", - " 3, 102, 98, 115, 47, 79, 28, 123, 68, 23, 9, 103,\n", - " 4, 68, 27, 132, 45, 83, 104, 29, 35, 116, 32, 81,\n", - " 112, 114, 2, 13, 45, 45, 69, 25, 58, 45, 63, 101,\n", - " 101, 39, 108, 8, 26, 80, 109, 16, 30, 40, 90, 87,\n", - " 81, 68, 124, 39, 9, 51, 91, 40, 50, 50, 85, 55,\n", - " 23, 65, 68, 44, 117, 77, 39, 53, 33, 18, 69, 61,\n", - " 73, 0, 126, 1, 100, 24, 55, 15, 24, 20, 97, 44,\n", - " 75, 14]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3578, 3214, 3827, ..., 4693, 5091, 3827],\n", - " [ 3, 27, 14, ..., 6940, 6943, 7034]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 24, 21, 129, ..., 9, 42, 110],\n", - " [ 60, 14, 49, ..., 6298, 6352, 6312]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 163, 163, 163, ..., 6935, 6935, 6935],\n", - " [ 280, 525, 57, ..., 456, 74, 391]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 313, 514, 261, ..., 261, 261, 389],\n", - " [ 41, 13, 101, ..., 6990, 6998, 6870]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2691, 21, 4988, ..., 5209, 3593, 3308],\n", - " [ 92, 167, 125, ..., 6289, 6293, 6327]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 14, 14, 14, ..., 7046, 7046, 7046],\n", - " [ 223, 539, 1034, ..., 299, 2821, 4890]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 61, 61, 126, ..., 6213, 6213, 6213],\n", - " [1156, 1571, 4865, ..., 5964, 5548, 5146]], device='cuda:0')}\n", - "Epoch: 004, Loss: 0.8498, Train: 488.7000\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005524\n", - "sampling 0.004975\n", - "noi time: 0.001565\n", - "get_vertex_data call: 0.076151\n", - "noi group time: 0.003668\n", - "eoi_group_time: 0.015828\n", - "second half: 0.258141\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 18191, 31145, 24187, ..., 1119684, 1118692, 1118700],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 18191, 31145, 24187, ..., 1119684, 1118692, 1118700],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210831, 1221602, 1221611, ..., 1927249, 1933696, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210831, 1221602, 1221611, ..., 1927249, 1933696, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1137212, 1141424, 1136228, 1140285, 1135926, 1140785, 1141758,\n", - " 1136223, 1136213, 1141251, 1140297, 1142518, 1136969, 1141443, 1145373,\n", - " 1146977, 1145992, 1137271, 1138932, 1139141, 1143372, 1139241, 1140781,\n", - " 1140776, 1142963, 1139866, 1134934, 1149216, 1142953, 1155689, 1143820,\n", - " 1149636, 1147473, 1147477, 1141882, 1135989, 1142881, 1153940, 1144636,\n", - " 1144632, 1148520, 1135262, 1134701, 1148346, 1146656, 1148546, 1153220,\n", - " 1136742, 1147101, 1137225, 1147211, 1150329, 1152416, 1152417, 1138742,\n", - " 1134657, 1140540, 1137254, 1138366, 1151520, 1140149, 1134735, 1140020,\n", - " 1135367, 1135202, 1134970, 1141036, 1134794, 1135956, 1136520, 1138504,\n", - " 1137329, 1143069, 1137682, 1137693, 1136619, 1144395, 1137529, 1137534,\n", - " 1152371, 1136662, 1137441, 1143321, 1137480, 1137025, 1136204, 1135265,\n", - " 1156159, 1141703, 1135977, 1135579, 1142593, 1148860, 1140970, 1140712,\n", - " 1138524, 1137953, 1137960, 1138584, 1156965, 1137019, 1137022, 1135522,\n", - " 1135535, 1136365, 1157703, 1138436, 1138445, 1138461, 1138462, 1137493,\n", - " 1136594, 1135121, 1158386, 1158390, 1149328, 1138847, 1160822, 1135359,\n", - " 1135347, 1138185, 1158984, 1158987, 1145843, 1148531, 1137119, 1135772,\n", - " 1139667, 1139668, 1139673, 1138067, 1140256, 1134992, 1142784, 1152651,\n", - " 1136734, 1158971, 1159009, 1159019, 1141065, 1153544, 1140849, 1143631,\n", - " 1140036, 1139933, 1141963, 1141984, 1152044, 1139069, 1137734, 1137728,\n", - " 1137731, 1147317, 1136993, 1135547, 1135549, 1141088, 1141102, 1149001,\n", - " 1139899, 1143767, 1143775, 1154851, 1154860, 1137297, 1162705, 1137678,\n", - " 1139025, 1140003, 1149979, 1146839, 1141695, 1135860, 1136418, 1136426,\n", - " 1136631, 1141224, 1141648, 1141661, 1136917, 1145065, 1145066, 1144237,\n", - " 1141155, 1146449, 1141786, 1139495, 1136755, 1134979, 1134987, 1137087,\n", - " 1142053, 1141821, 1143153, 1142080, 1145161, 1158742, 1158749, 1138708,\n", - " 1140110, 1142913, 1137661, 1143107, 1143113, 1148443, 1144596, 1142843,\n", - " 1136866, 1144041, 1140882, 1140447, 1144182, 1137606, 1146201, 1137364,\n", - " 1138539, 1137843, 1147153, 1147163, 1142640, 1141365, 1141367, 1141375,\n", - " 1141678, 1149088, 1149093, 1149101, 1138292, 1144284, 1144279, 1143904,\n", - " 1143917, 1139510, 1139763, 1139127, 1145001, 1140619, 1140976, 1140990,\n", - " 1135047, 1141560, 1147047, 1152976, 1152982, 1152988, 1160248, 1141925,\n", - " 1144242, 1140580, 1140696, 1139405, 1143637, 1137570, 1134851, 1145974,\n", - " 1143851, 1146019, 1146024, 1146017, 1154328, 1142533, 1149928, 1139990,\n", - " 1146302, 1143293, 1147543, 1147540, 1147150, 1147282, 1142816, 1138660,\n", - " 1149366, 1143040, 1144912, 1144923, 1138927, 1157720, 1136836, 1139328,\n", - " 1139055, 1139046, 1144950, 1142159, 1143345, 1144766, 1144619, 1144083,\n", - " 1135876, 1138004, 1150919, 1146514, 1146523, 1143958, 1143960, 1143456,\n", - " 1143457, 1146636, 1147521, 1140364, 1137999, 1143080, 1143082, 1166410,\n", - " 1144219, 1144222, 1147988, 1147999, 1134907, 1139252, 1148704, 1148709,\n", - " 1141319, 1141836, 1143434, 1147025, 1143824, 1147249, 1147971, 1141127,\n", - " 1145009, 1139549, 1158226, 1158228, 1147880, 1154526, 1142369, 1146159,\n", - " 1146178, 1151242, 1148223, 1152530, 1150274, 1151182, 1150445, 1148928,\n", - " 1154998, 1154446, 1149791, 1144526, 1151480, 1152022, 1145255, 1145262,\n", - " 1140400, 1147019, 1153956, 1158944, 1146772, 1141198, 1141269, 1149984,\n", - " 1147653, 1143560, 1149412, 1148300, 1147856, 1147866, 1139097, 1151415,\n", - " 1154420, 1158786, 1148180, 1148181, 1151363, 1146676, 1146686, 1152494,\n", - " 1157983, 1157974, 1148725, 1148729, 1145861, 1166312, 1143971, 1148204,\n", - " 1154203, 1154206, 1154196, 1153124, 1153192, 1153197, 1159828, 1150935,\n", - " 1148049, 1152878, 1150356, 1155088, 1169439, 1151816, 1152581, 1154183,\n", - " 1148498, 1141420, 1136002, 1151352, 1147737, 1153449, 1145080, 1146265,\n", - " 1146266, 1148949, 1146969, 1146974, 1150219, 1146623, 1151403, 1142986,\n", - " 1144476, 1152409, 1152100, 1153027, 1153030, 1153038, 1137746, 1146304,\n", - " 1140521, 1149203, 1152819, 1152826, 1155330, 1155337, 1154119, 1154120,\n", - " 1154123, 1157839, 1152673, 1164761, 1151617, 1150578, 1145278, 1136131,\n", - " 1148916, 1148924, 1152944, 1145966, 1138982, 1138989, 1138991, 1152903,\n", - " 1151311, 1138281, 1157141, 1136028, 1158712, 1158704, 1156621, 1152928,\n", - " 1156395, 1152886, 1142777, 1163489, 1137403, 1153907, 1150150, 1150164,\n", - " 1142261, 1148033, 1148040, 1155202, 1161205, 1152601, 1155218, 1155223,\n", - " 1175478, 1149792, 1149794, 1148628, 1148637, 1148633, 1158530, 1148378,\n", - " 1137458, 1149944, 1135706, 1157545, 1157547, 1158860, 1158916, 1156499,\n", - " 1156501, 1156505, 1157064, 1157069, 1155418, 1152833, 1145191, 1145187,\n", - " 1139473, 1143491, 1151260, 1152179, 1156638, 1150824, 1150828, 1156935,\n", - " 1153421, 1157779, 1139525, 1158304, 1158308, 1158311, 1151271, 1155441,\n", - " 1150130, 1150132, 1162114, 1162120, 1144361, 1140878, 1145760, 1142755,\n", - " 1151379, 1155122, 1155130, 1160394, 1152519, 1157183, 1149321, 1153476,\n", - " 1145806, 1156460, 1154763, 1155628, 1155630, 1156563, 1154555, 1158823,\n", - " 1158824, 1153715, 1157323, 1148836, 1148838, 1155646, 1153365, 1159305,\n", - " 1143261, 1154243, 1154250, 1160103, 1151325, 1154909, 1143189, 1143521,\n", - " 1150371, 1157439, 1141620, 1150990, 1150987, 1157933, 1137167, 1137152,\n", - " 1158126, 1156765, 1158192, 1158204, 1137381, 1159116, 1140913, 1134685,\n", - " 1135601, 1145507, 1150661, 1150659, 1158665, 1146320, 1159253, 1156692,\n", - " 1140381, 1140374, 1156023, 1157732, 1144843, 1155975, 1142074, 1158841,\n", - " 1158846, 1156812, 1162538, 1161473, 1161480, 1155393, 1149696, 1154600,\n", - " 1154601, 1153503, 1136896, 1158880, 1158882, 1158815, 1158438, 1156778,\n", - " 1158286, 1155237, 1151615, 1136480, 1136494, 1164181, 1147599, 1152134,\n", - " 1156495, 1156488, 1153808, 1136640, 1136646, 1140049, 1142178, 1158545,\n", - " 1151144, 1146126, 1138110, 1155535, 1155528, 1135654, 1135658, 1142666,\n", - " 1164154, 1150684, 1156045, 1159042, 1159052, 1157944, 1153052, 1153045,\n", - " 1163072, 1153842, 1160652, 1150046, 1149070, 1155475, 1155479, 1153514,\n", - " 1153519, 1138161, 1164006, 1156787, 1156795, 1149963, 1163381, 1154590,\n", - " 1139286, 1139290, 1166073, 1159552, 1171257, 1160178, 1165306, 1169489,\n", - " 1140641, 1143138, 1168162, 1156352, 1156177, 1156181, 1159025, 1159029,\n", - " 1159032, 1159038, 1171366, 1152247, 1143729, 1143735, 1151227, 1153932,\n", - " 1148562, 1147835, 1146500, 1153247, 1164580, 1161239, 1161240, 1144739,\n", - " 1168067, 1141471, 1147427, 1182242, 1156739, 1156741, 1165172, 1150649,\n", - " 1168748, 1144810, 1144812, 1167253, 1153268, 1145740, 1145743, 1145738,\n", - " 1163935, 1145567, 1145228, 1155324, 1144973, 1143028, 1143037, 1166063,\n", - " 1152624, 1145900, 1145902, 1153520, 1152203, 1175240, 1158722, 1154070,\n", - " 1154076, 1147330, 1147339, 1147341, 1147338, 1145677, 1150781, 1162892,\n", - " 1166653, 1169220, 1169300, 1169298, 1155172, 1144336, 1157532, 1157534,\n", - " 1147746, 1169162, 1157331, 1138130, 1138131, 1193662, 1141045, 1141043,\n", - " 1154364, 1158611, 1158623, 1158051, 1158062, 1173047, 1165903, 1178729,\n", - " 1154869, 1147416, 1176615, 1152353, 1169186, 1168400, 1149402, 1148667,\n", - " 1175997, 1168898, 1147516, 1168474, 1173307, 1145033, 1160935, 1169144,\n", - " 1154018, 1154027, 1154028, 1172787, 1159655, 1151696, 1157153, 1177404,\n", - " 1157373, 1167239, 1147711, 1151850, 1148128, 1157599, 1163772, 1177415,\n", - " 1172961, 1168697, 1140326, 1170016, 1166346, 1179880, 1144550, 1153429,\n", - " 1174366, 1171823, 1171815, 1174119, 1177112, 1154148, 1169409, 1158176,\n", - " 1158187, 1167517, 1149169, 1149173, 1170125, 1181601, 1169979, 1179245,\n", - " 1181095, 1178082, 1170179, 1153803, 1178171, 1171122, 1179727, 1185440,\n", - " 1158030, 1180200, 1166554, 1178921, 1161255, 1155262, 1172010, 1186766,\n", - " 1157792, 1157803, 1143341, 1171623, 1163231, 1157126, 1177312, 1164073,\n", - " 1158249, 1153898, 1153893, 1191749, 1164564, 1145626, 1154834, 1179453,\n", - " 1153601, 1157770, 1179783, 1182690, 1158512, 1158524, 1158940, 1158381,\n", - " 1158379, 1140397, 1140393, 1167762, 1168886, 1165487, 1186712, 1162253,\n", - " 1162376, 1184405, 1164232, 1179096, 1163422, 1183723, 1154957, 1161819,\n", - " 1166772, 1180019, 1159532, 1164130, 1171015, 1184050, 1156528, 1139828,\n", - " 1139831, 1154812, 1180847, 1149668, 1164677, 1186539, 1156055, 1178555,\n", - " 1179686, 1146394, 1173058, 1172374, 1149544, 1190292, 1188233, 1191968,\n", - " 1159083, 1167435, 1182922, 1194482, 1191054, 1177484, 1169964, 1168683,\n", - " 1140993, 1141001, 1141006, 1182058, 1174546, 1186017, 1178981, 1153733,\n", - " 1152117, 1183630, 1192947, 1162502, 1169707, 1181824, 1166841, 1194294,\n", - " 1182519, 1177365, 1177842, 1175349, 1150406, 1167089, 1179317, 1177285,\n", - " 1156681, 1158064, 1145395, 1170168, 1155958, 1155962, 1194255, 1178460,\n", - " 1178304, 1188964, 1172897, 1189958, 1192929, 1190222, 1182852, 1174699,\n", - " 1161940], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1137212, 1141424, 1136228, 1140285, 1135926, 1140785, 1141758,\n", - " 1136223, 1136213, 1141251, 1140297, 1142518, 1136969, 1141443, 1145373,\n", - " 1146977, 1145992, 1137271, 1138932, 1139141, 1143372, 1139241, 1140781,\n", - " 1140776, 1142963, 1139866, 1134934, 1149216, 1142953, 1155689, 1143820,\n", - " 1149636, 1147473, 1147477, 1141882, 1135989, 1142881, 1153940, 1144636,\n", - " 1144632, 1148520, 1135262, 1134701, 1148346, 1146656, 1148546, 1153220,\n", - " 1136742, 1147101, 1137225, 1147211, 1150329, 1152416, 1152417, 1138742,\n", - " 1134657, 1140540, 1137254, 1138366, 1151520, 1140149, 1134735, 1140020,\n", - " 1135367, 1135202, 1134970, 1141036, 1134794, 1135956, 1136520, 1138504,\n", - " 1137329, 1143069, 1137682, 1137693, 1136619, 1144395, 1137529, 1137534,\n", - " 1152371, 1136662, 1137441, 1143321, 1137480, 1137025, 1136204, 1135265,\n", - " 1156159, 1141703, 1135977, 1135579, 1142593, 1148860, 1140970, 1140712,\n", - " 1138524, 1137953, 1137960, 1138584, 1156965, 1137019, 1137022, 1135522,\n", - " 1135535, 1136365, 1157703, 1138436, 1138445, 1138461, 1138462, 1137493,\n", - " 1136594, 1135121, 1158386, 1158390, 1149328, 1138847, 1160822, 1135359,\n", - " 1135347, 1138185, 1158984, 1158987, 1145843, 1148531, 1137119, 1135772,\n", - " 1139667, 1139668, 1139673, 1138067, 1140256, 1134992, 1142784, 1152651,\n", - " 1136734, 1158971, 1159009, 1159019, 1141065, 1153544, 1140849, 1143631,\n", - " 1140036, 1139933, 1141963, 1141984, 1152044, 1139069, 1137734, 1137728,\n", - " 1137731, 1147317, 1136993, 1135547, 1135549, 1141088, 1141102, 1149001,\n", - " 1139899, 1143767, 1143775, 1154851, 1154860, 1137297, 1162705, 1137678,\n", - " 1139025, 1140003, 1149979, 1146839, 1141695, 1135860, 1136418, 1136426,\n", - " 1136631, 1141224, 1141648, 1141661, 1136917, 1145065, 1145066, 1144237,\n", - " 1141155, 1146449, 1141786, 1139495, 1136755, 1134979, 1134987, 1137087,\n", - " 1142053, 1141821, 1143153, 1142080, 1145161, 1158742, 1158749, 1138708,\n", - " 1140110, 1142913, 1137661, 1143107, 1143113, 1148443, 1144596, 1142843,\n", - " 1136866, 1144041, 1140882, 1140447, 1144182, 1137606, 1146201, 1137364,\n", - " 1138539, 1137843, 1147153, 1147163, 1142640, 1141365, 1141367, 1141375,\n", - " 1141678, 1149088, 1149093, 1149101, 1138292, 1144284, 1144279, 1143904,\n", - " 1143917, 1139510, 1139763, 1139127, 1145001, 1140619, 1140976, 1140990,\n", - " 1135047, 1141560, 1147047, 1152976, 1152982, 1152988, 1160248, 1141925,\n", - " 1144242, 1140580, 1140696, 1139405, 1143637, 1137570, 1134851, 1145974,\n", - " 1143851, 1146019, 1146024, 1146017, 1154328, 1142533, 1149928, 1139990,\n", - " 1146302, 1143293, 1147543, 1147540, 1147150, 1147282, 1142816, 1138660,\n", - " 1149366, 1143040, 1144912, 1144923, 1138927, 1157720, 1136836, 1139328,\n", - " 1139055, 1139046, 1144950, 1142159, 1143345, 1144766, 1144619, 1144083,\n", - " 1135876, 1138004, 1150919, 1146514, 1146523, 1143958, 1143960, 1143456,\n", - " 1143457, 1146636, 1147521, 1140364, 1137999, 1143080, 1143082, 1166410,\n", - " 1144219, 1144222, 1147988, 1147999, 1134907, 1139252, 1148704, 1148709,\n", - " 1141319, 1141836, 1143434, 1147025, 1143824, 1147249, 1147971, 1141127,\n", - " 1145009, 1139549, 1158226, 1158228, 1147880, 1154526, 1142369, 1146159,\n", - " 1146178, 1151242, 1148223, 1152530, 1150274, 1151182, 1150445, 1148928,\n", - " 1154998, 1154446, 1149791, 1144526, 1151480, 1152022, 1145255, 1145262,\n", - " 1140400, 1147019, 1153956, 1158944, 1146772, 1141198, 1141269, 1149984,\n", - " 1147653, 1143560, 1149412, 1148300, 1147856, 1147866, 1139097, 1151415,\n", - " 1154420, 1158786, 1148180, 1148181, 1151363, 1146676, 1146686, 1152494,\n", - " 1157983, 1157974, 1148725, 1148729, 1145861, 1166312, 1143971, 1148204,\n", - " 1154203, 1154206, 1154196, 1153124, 1153192, 1153197, 1159828, 1150935,\n", - " 1148049, 1152878, 1150356, 1155088, 1169439, 1151816, 1152581, 1154183,\n", - " 1148498, 1141420, 1136002, 1151352, 1147737, 1153449, 1145080, 1146265,\n", - " 1146266, 1148949, 1146969, 1146974, 1150219, 1146623, 1151403, 1142986,\n", - " 1144476, 1152409, 1152100, 1153027, 1153030, 1153038, 1137746, 1146304,\n", - " 1140521, 1149203, 1152819, 1152826, 1155330, 1155337, 1154119, 1154120,\n", - " 1154123, 1157839, 1152673, 1164761, 1151617, 1150578, 1145278, 1136131,\n", - " 1148916, 1148924, 1152944, 1145966, 1138982, 1138989, 1138991, 1152903,\n", - " 1151311, 1138281, 1157141, 1136028, 1158712, 1158704, 1156621, 1152928,\n", - " 1156395, 1152886, 1142777, 1163489, 1137403, 1153907, 1150150, 1150164,\n", - " 1142261, 1148033, 1148040, 1155202, 1161205, 1152601, 1155218, 1155223,\n", - " 1175478, 1149792, 1149794, 1148628, 1148637, 1148633, 1158530, 1148378,\n", - " 1137458, 1149944, 1135706, 1157545, 1157547, 1158860, 1158916, 1156499,\n", - " 1156501, 1156505, 1157064, 1157069, 1155418, 1152833, 1145191, 1145187,\n", - " 1139473, 1143491, 1151260, 1152179, 1156638, 1150824, 1150828, 1156935,\n", - " 1153421, 1157779, 1139525, 1158304, 1158308, 1158311, 1151271, 1155441,\n", - " 1150130, 1150132, 1162114, 1162120, 1144361, 1140878, 1145760, 1142755,\n", - " 1151379, 1155122, 1155130, 1160394, 1152519, 1157183, 1149321, 1153476,\n", - " 1145806, 1156460, 1154763, 1155628, 1155630, 1156563, 1154555, 1158823,\n", - " 1158824, 1153715, 1157323, 1148836, 1148838, 1155646, 1153365, 1159305,\n", - " 1143261, 1154243, 1154250, 1160103, 1151325, 1154909, 1143189, 1143521,\n", - " 1150371, 1157439, 1141620, 1150990, 1150987, 1157933, 1137167, 1137152,\n", - " 1158126, 1156765, 1158192, 1158204, 1137381, 1159116, 1140913, 1134685,\n", - " 1135601, 1145507, 1150661, 1150659, 1158665, 1146320, 1159253, 1156692,\n", - " 1140381, 1140374, 1156023, 1157732, 1144843, 1155975, 1142074, 1158841,\n", - " 1158846, 1156812, 1162538, 1161473, 1161480, 1155393, 1149696, 1154600,\n", - " 1154601, 1153503, 1136896, 1158880, 1158882, 1158815, 1158438, 1156778,\n", - " 1158286, 1155237, 1151615, 1136480, 1136494, 1164181, 1147599, 1152134,\n", - " 1156495, 1156488, 1153808, 1136640, 1136646, 1140049, 1142178, 1158545,\n", - " 1151144, 1146126, 1138110, 1155535, 1155528, 1135654, 1135658, 1142666,\n", - " 1164154, 1150684, 1156045, 1159042, 1159052, 1157944, 1153052, 1153045,\n", - " 1163072, 1153842, 1160652, 1150046, 1149070, 1155475, 1155479, 1153514,\n", - " 1153519, 1138161, 1164006, 1156787, 1156795, 1149963, 1163381, 1154590,\n", - " 1139286, 1139290, 1166073, 1159552, 1171257, 1160178, 1165306, 1169489,\n", - " 1140641, 1143138, 1168162, 1156352, 1156177, 1156181, 1159025, 1159029,\n", - " 1159032, 1159038, 1171366, 1152247, 1143729, 1143735, 1151227, 1153932,\n", - " 1148562, 1147835, 1146500, 1153247, 1164580, 1161239, 1161240, 1144739,\n", - " 1168067, 1141471, 1147427, 1182242, 1156739, 1156741, 1165172, 1150649,\n", - " 1168748, 1144810, 1144812, 1167253, 1153268, 1145740, 1145743, 1145738,\n", - " 1163935, 1145567, 1145228, 1155324, 1144973, 1143028, 1143037, 1166063,\n", - " 1152624, 1145900, 1145902, 1153520, 1152203, 1175240, 1158722, 1154070,\n", - " 1154076, 1147330, 1147339, 1147341, 1147338, 1145677, 1150781, 1162892,\n", - " 1166653, 1169220, 1169300, 1169298, 1155172, 1144336, 1157532, 1157534,\n", - " 1147746, 1169162, 1157331, 1138130, 1138131, 1193662, 1141045, 1141043,\n", - " 1154364, 1158611, 1158623, 1158051, 1158062, 1173047, 1165903, 1178729,\n", - " 1154869, 1147416, 1176615, 1152353, 1169186, 1168400, 1149402, 1148667,\n", - " 1175997, 1168898, 1147516, 1168474, 1173307, 1145033, 1160935, 1169144,\n", - " 1154018, 1154027, 1154028, 1172787, 1159655, 1151696, 1157153, 1177404,\n", - " 1157373, 1167239, 1147711, 1151850, 1148128, 1157599, 1163772, 1177415,\n", - " 1172961, 1168697, 1140326, 1170016, 1166346, 1179880, 1144550, 1153429,\n", - " 1174366, 1171823, 1171815, 1174119, 1177112, 1154148, 1169409, 1158176,\n", - " 1158187, 1167517, 1149169, 1149173, 1170125, 1181601, 1169979, 1179245,\n", - " 1181095, 1178082, 1170179, 1153803, 1178171, 1171122, 1179727, 1185440,\n", - " 1158030, 1180200, 1166554, 1178921, 1161255, 1155262, 1172010, 1186766,\n", - " 1157792, 1157803, 1143341, 1171623, 1163231, 1157126, 1177312, 1164073,\n", - " 1158249, 1153898, 1153893, 1191749, 1164564, 1145626, 1154834, 1179453,\n", - " 1153601, 1157770, 1179783, 1182690, 1158512, 1158524, 1158940, 1158381,\n", - " 1158379, 1140397, 1140393, 1167762, 1168886, 1165487, 1186712, 1162253,\n", - " 1162376, 1184405, 1164232, 1179096, 1163422, 1183723, 1154957, 1161819,\n", - " 1166772, 1180019, 1159532, 1164130, 1171015, 1184050, 1156528, 1139828,\n", - " 1139831, 1154812, 1180847, 1149668, 1164677, 1186539, 1156055, 1178555,\n", - " 1179686, 1146394, 1173058, 1172374, 1149544, 1190292, 1188233, 1191968,\n", - " 1159083, 1167435, 1182922, 1194482, 1191054, 1177484, 1169964, 1168683,\n", - " 1140993, 1141001, 1141006, 1182058, 1174546, 1186017, 1178981, 1153733,\n", - " 1152117, 1183630, 1192947, 1162502, 1169707, 1181824, 1166841, 1194294,\n", - " 1182519, 1177365, 1177842, 1175349, 1150406, 1167089, 1179317, 1177285,\n", - " 1156681, 1158064, 1145395, 1170168, 1155958, 1155962, 1194255, 1178460,\n", - " 1178304, 1188964, 1172897, 1189958, 1192929, 1190222, 1182852, 1174699,\n", - " 1161940], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195452, 1195202, 1197451, 1199282, 1198459, 1202255, 1201577, 1201582,\n", - " 1194626, 1195946, 1198624, 1198633, 1202804, 1194967, 1198557, 1196573,\n", - " 1198182, 1194780, 1196631, 1195514, 1195263, 1201992, 1195187, 1196030,\n", - " 1196031, 1198542, 1198543, 1197706, 1199519, 1198095, 1195469, 1196911,\n", - " 1198668, 1197793, 1198367, 1195982, 1198161, 1196711, 1196717, 1195265,\n", - " 1195270, 1195278, 1196247, 1197272, 1196109, 1194859, 1195541, 1197256,\n", - " 1195748, 1195783, 1200037, 1195918, 1196283, 1197313, 1198280, 1198282,\n", - " 1200949, 1199856, 1202005, 1196851, 1199685, 1199628, 1199231, 1199676,\n", - " 1194795, 1201511, 1196498, 1196727, 1202618, 1198416, 1198428, 1199489,\n", - " 1199555, 1201547, 1201824, 1199445, 1201421, 1201156, 1201056, 1194803,\n", - " 1202641, 1196655, 1200555, 1200429, 1202542, 1199886, 1200690, 1199908,\n", - " 1196779, 1202239, 1200899, 1202338, 1198478, 1200398, 1200784, 1201125,\n", - " 1195676, 1195679, 1195664, 1195000, 1198055, 1198929, 1200684, 1198909,\n", - " 1197811, 1197816, 1201484, 1196597, 1195285, 1199659, 1201138, 1198824,\n", - " 1200011, 1198817, 1199234, 1201880, 1200301, 1197655, 1200707, 1197335,\n", - " 1197035, 1195165, 1194908, 1203162, 1196424, 1197872], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195452, 1195202, 1197451, 1199282, 1198459, 1202255, 1201577, 1201582,\n", - " 1194626, 1195946, 1198624, 1198633, 1202804, 1194967, 1198557, 1196573,\n", - " 1198182, 1194780, 1196631, 1195514, 1195263, 1201992, 1195187, 1196030,\n", - " 1196031, 1198542, 1198543, 1197706, 1199519, 1198095, 1195469, 1196911,\n", - " 1198668, 1197793, 1198367, 1195982, 1198161, 1196711, 1196717, 1195265,\n", - " 1195270, 1195278, 1196247, 1197272, 1196109, 1194859, 1195541, 1197256,\n", - " 1195748, 1195783, 1200037, 1195918, 1196283, 1197313, 1198280, 1198282,\n", - " 1200949, 1199856, 1202005, 1196851, 1199685, 1199628, 1199231, 1199676,\n", - " 1194795, 1201511, 1196498, 1196727, 1202618, 1198416, 1198428, 1199489,\n", - " 1199555, 1201547, 1201824, 1199445, 1201421, 1201156, 1201056, 1194803,\n", - " 1202641, 1196655, 1200555, 1200429, 1202542, 1199886, 1200690, 1199908,\n", - " 1196779, 1202239, 1200899, 1202338, 1198478, 1200398, 1200784, 1201125,\n", - " 1195676, 1195679, 1195664, 1195000, 1198055, 1198929, 1200684, 1198909,\n", - " 1197811, 1197816, 1201484, 1196597, 1195285, 1199659, 1201138, 1198824,\n", - " 1200011, 1198817, 1199234, 1201880, 1200301, 1197655, 1200707, 1197335,\n", - " 1197035, 1195165, 1194908, 1203162, 1196424, 1197872], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 1.5725e-01, 1.0108e-02, 7.0136e-01, ..., 1.3788e-01,\n", - " -2.0843e-03, -4.7914e-03],\n", - " [ 1.5824e-01, 2.0613e-02, 8.1405e-01, ..., 1.4357e-01,\n", - " -1.6051e-03, -5.3294e-03],\n", - " [ 9.7420e-02, -3.4516e-04, 6.9431e-01, ..., 1.6006e-01,\n", - " -2.1403e-03, -4.3729e-03],\n", - " ...,\n", - " [ 2.1941e-01, -2.4732e-04, 8.9885e-01, ..., 9.5989e-02,\n", - " -1.7138e-03, -6.0594e-03],\n", - " [ 1.1500e-01, 5.4979e-02, 6.3607e-01, ..., 1.2768e-01,\n", - " -1.6795e-03, -3.9530e-03],\n", - " [ 2.4567e-01, -5.1800e-04, 9.2963e-01, ..., 7.7239e-02,\n", - " -1.7047e-03, -6.4968e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 9.3941e-01, 9.3312e-01, 4.0129e+00, ..., 1.7643e-01,\n", - " -4.3981e-02, 8.2033e-01],\n", - " [-5.2388e-03, -1.6200e-02, 4.6586e+00, ..., -1.2587e-02,\n", - " -4.0808e-02, -2.3565e-02],\n", - " [ 1.9329e+00, 2.0154e+00, 2.7273e+00, ..., 3.9736e-01,\n", - " -3.4753e-02, 2.3263e+00],\n", - " ...,\n", - " [ 7.6877e-01, 9.9148e-01, 1.6782e+00, ..., -3.3780e-03,\n", - " -2.3555e-02, 5.5100e-01],\n", - " [ 1.4118e+00, 1.0912e+00, 4.8906e+00, ..., 1.2484e-01,\n", - " -4.6183e-02, 8.7255e-01],\n", - " [ 1.1352e+00, 9.8890e-01, 2.5930e+00, ..., 1.9419e+00,\n", - " -4.9504e-02, 2.8835e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-6.0988e-03, 5.2008e-01, 2.2164e-01, ..., 1.3555e+00,\n", - " -2.3537e-03, -4.3073e-03],\n", - " [-1.5842e-03, 3.4898e-01, 2.1646e-01, ..., 1.7363e+00,\n", - " -1.3637e-04, 5.0981e-03],\n", - " [-1.5439e-03, 2.5322e-01, 2.1591e-01, ..., 1.6338e+00,\n", - " 1.0820e-01, 3.3238e-02],\n", - " ...,\n", - " [-1.1704e-03, 3.5306e-01, 2.3371e-01, ..., 1.7657e+00,\n", - " 1.0883e-02, 4.2804e-02],\n", - " [-1.2625e-03, 3.3212e-01, 1.7230e-01, ..., 1.5389e+00,\n", - " 6.0558e-02, 1.8108e-02],\n", - " [-2.2241e-03, 4.0214e-01, 2.7032e-01, ..., 1.5011e+00,\n", - " -1.6780e-03, -1.4019e-03]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[ 1.3974e-01, 6.8798e-01, 3.6876e-01, ..., -7.4147e-03,\n", - " 2.4673e-01, 3.4897e-01],\n", - " [ 3.7663e-02, 7.2737e-01, 4.3306e-01, ..., -9.1707e-03,\n", - " 2.0163e-01, 5.4989e-01],\n", - " [ 1.2734e-02, 6.3728e-01, 3.6947e-01, ..., -8.5852e-03,\n", - " 2.5820e-01, 4.1700e-01],\n", - " ...,\n", - " [ 1.2916e-01, 6.0151e-01, 2.6098e-01, ..., -6.3384e-03,\n", - " 3.1410e-01, 1.7428e-01],\n", - " [ 9.5491e-02, 7.5612e-01, 4.7055e-01, ..., -9.8168e-03,\n", - " 3.4106e-01, 4.5872e-01],\n", - " [ 4.1889e-01, 1.0074e+00, 6.0315e-01, ..., -8.3570e-03,\n", - " 3.8319e-01, -8.7203e-05]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 40, 4, 96, 4, 4, 4, 119, 119, 343, 348, 327, 327,\n", - " 437, 323, 475, 421, 327, 508, 508, 976, 976, 598, 637, 637,\n", - " 633, 960, 906, 1067, 1065, 1065, 1447, 1234, 1234, 1035, 1060, 1068,\n", - " 1326, 1184, 1184, 1184, 1184, 1184, 1246, 1338, 1291, 1312, 1312, 1312,\n", - " 1312, 1338, 1338, 1449, 1392, 1375, 1375, 1375, 1375, 1375, 1375, 1414,\n", - " 1729, 1527, 1452, 1452, 1537, 1754, 1754, 1631, 1631, 1631, 1747, 1779,\n", - " 1862, 1773, 1979, 1739, 1739, 1875, 1943, 2057, 2284, 2135, 2149, 2149,\n", - " 2246, 2246, 2246, 2168, 2187, 2187, 2168, 2243, 2243, 2336, 2366, 2306,\n", - " 2381, 2660, 2506, 2490, 2493, 2509, 2594, 2594, 2506, 2506, 2807, 2807,\n", - " 2789, 2723, 2686, 2779, 2749, 2716, 2716, 2883, 2887, 2887, 2887, 2887,\n", - " 2871, 2937, 2990, 3064, 3200, 3123, 3383, 3322, 3436, 3357, 3684, 3566,\n", - " 3701, 3515, 3515, 3515, 3640, 3640, 3721, 3742, 3755, 3780, 3937, 3980,\n", - " 4163, 4105, 4349, 4326, 4263, 4297, 4297, 4395, 4480, 4557, 4557, 4610,\n", - " 4557, 4630, 4630, 4589, 4648, 4648, 4867, 4823, 4953, 4782, 4868, 4826,\n", - " 5155, 4943, 5007, 5007, 5038, 5038, 5075, 4963, 5201, 5167, 5285, 5081,\n", - " 5256, 5256, 5235, 5504, 5193, 5370, 5631, 5539],\n", - " [ 3, 11, 107, 94, 83, 82, 37, 32, 35, 58, 67, 38,\n", - " 76, 67, 77, 4, 10, 48, 41, 20, 106, 73, 97, 111,\n", - " 80, 8, 39, 105, 87, 21, 59, 3, 91, 65, 69, 7,\n", - " 3, 88, 92, 102, 122, 117, 17, 98, 2, 27, 87, 21,\n", - " 80, 60, 55, 56, 118, 51, 14, 62, 68, 29, 74, 86,\n", - " 93, 105, 78, 18, 84, 121, 67, 45, 123, 34, 41, 99,\n", - " 52, 93, 31, 22, 3, 49, 53, 23, 111, 2, 6, 88,\n", - " 90, 63, 68, 108, 115, 48, 41, 44, 112, 81, 7, 47,\n", - " 76, 33, 79, 5, 69, 4, 67, 12, 66, 43, 89, 39,\n", - " 9, 0, 2, 16, 3, 76, 101, 47, 78, 90, 18, 22,\n", - " 0, 116, 125, 16, 58, 67, 0, 113, 110, 73, 57, 114,\n", - " 70, 48, 95, 13, 119, 71, 73, 100, 124, 120, 42, 9,\n", - " 75, 19, 32, 61, 9, 85, 117, 17, 40, 3, 21, 112,\n", - " 91, 104, 72, 104, 87, 103, 5, 42, 64, 54, 26, 7,\n", - " 21, 30, 50, 56, 46, 3, 70, 3, 119, 28, 36, 109,\n", - " 25, 1, 96, 24, 23, 5, 15, 64]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 771, 788, 989, ..., 5847, 1188, 2343],\n", - " [ 296, 296, 92, ..., 7384, 7383, 7396]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 37, 48, 30, ..., 67, 38, 2],\n", - " [ 16, 159, 211, ..., 5671, 5660, 5594]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 296, 296, 12, ..., 7350, 7350, 7350],\n", - " [ 403, 137, 109, ..., 901, 767, 797]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 256, 573, 619, ..., 868, 474, 216],\n", - " [ 304, 142, 111, ..., 7385, 7343, 7432]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5324, 2497, 7195, ..., 7105, 7236, 1072],\n", - " [ 22, 66, 35, ..., 5621, 5609, 5589]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 296, 296, 296, ..., 7350, 7350, 7350],\n", - " [ 867, 1032, 1024, ..., 3301, 683, 1953]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 119, 119, 119, ..., 5631, 5666, 5666],\n", - " [ 840, 6771, 6583, ..., 3224, 2700, 3006]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006722\n", - "sampling 0.006564\n", - "noi time: 0.001923\n", - "get_vertex_data call: 0.03699\n", - "noi group time: 0.003543\n", - "eoi_group_time: 0.013909\n", - "second half: 0.214762\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 18181, 519, 31145, ..., 1103850, 1132473, 1120075],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 18181, 519, 31145, ..., 1103850, 1132473, 1120075],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224380, 1203800, 1232974, ..., 1921022, 1934136, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224380, 1203800, 1232974, ..., 1921022, 1934136, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1136230, 1140282, 1135726, 1140785, 1141758, 1134948, 1138335,\n", - " 1136208, 1141251, 1141250, 1142802, 1136969, 1136971, 1141452, 1151164,\n", - " 1143600, 1149839, 1139811, 1145370, 1146991, 1139145, 1143372, 1146647,\n", - " 1139955, 1140781, 1145281, 1139866, 1134937, 1136959, 1148576, 1149216,\n", - " 1142959, 1155683, 1143820, 1149632, 1147473, 1147486, 1135990, 1153936,\n", - " 1153940, 1144632, 1134700, 1146656, 1150193, 1150203, 1146472, 1136112,\n", - " 1136114, 1148546, 1147094, 1155014, 1155018, 1155019, 1139371, 1147211,\n", - " 1136683, 1136685, 1150329, 1152416, 1134718, 1136268, 1134657, 1140540,\n", - " 1138112, 1154414, 1137257, 1137172, 1137180, 1153456, 1140159, 1134720,\n", - " 1134735, 1135909, 1140020, 1135360, 1135367, 1135202, 1134960, 1141036,\n", - " 1134794, 1157443, 1157447, 1138504, 1138510, 1137329, 1137342, 1136181,\n", - " 1143069, 1136619, 1144786, 1144395, 1136821, 1136826, 1137534, 1157397,\n", - " 1152376, 1136662, 1137441, 1156159, 1148481, 1139161, 1141702, 1135583,\n", - " 1141084, 1135827, 1135830, 1140240, 1140970, 1140712, 1138514, 1138524,\n", - " 1153098, 1153099, 1137957, 1158136, 1156965, 1135522, 1138314, 1138436,\n", - " 1138440, 1138445, 1138461, 1138449, 1138462, 1137495, 1149331, 1138846,\n", - " 1135088, 1156602, 1156606, 1147112, 1142611, 1158984, 1148531, 1148533,\n", - " 1137104, 1136457, 1139667, 1139668, 1139673, 1138067, 1138069, 1134992,\n", - " 1135789, 1158961, 1158974, 1159009, 1159019, 1160089, 1144410, 1153544,\n", - " 1143631, 1141964, 1152044, 1142299, 1142302, 1136057, 1137734, 1137728,\n", - " 1134750, 1135540, 1135537, 1135549, 1141088, 1141098, 1143767, 1137299,\n", - " 1143225, 1137679, 1139025, 1146847, 1152719, 1141695, 1139386, 1136917,\n", - " 1137188, 1145066, 1141155, 1146453, 1141785, 1141786, 1141609, 1144650,\n", - " 1134979, 1134987, 1147844, 1147850, 1137074, 1144428, 1138482, 1138490,\n", - " 1141821, 1143167, 1153666, 1143212, 1158749, 1138469, 1139190, 1140110,\n", - " 1137661, 1144445, 1144596, 1141209, 1140885, 1141397, 1144182, 1137606,\n", - " 1144865, 1146201, 1137374, 1158691, 1158699, 1161701, 1147153, 1136379,\n", - " 1141367, 1153068, 1149097, 1149101, 1138293, 1144279, 1153554, 1139510,\n", - " 1140092, 1139127, 1145001, 1145005, 1139173, 1140976, 1140983, 1141560,\n", - " 1147050, 1147047, 1145873, 1152976, 1138992, 1141925, 1146898, 1144245,\n", - " 1144242, 1141841, 1141846, 1150253, 1140690, 1139405, 1143640, 1134849,\n", - " 1144072, 1143845, 1143851, 1146019, 1146024, 1146025, 1146140, 1154323,\n", - " 1149928, 1149935, 1139990, 1143294, 1143885, 1147543, 1147540, 1148763,\n", - " 1147282, 1142816, 1149155, 1147461, 1149366, 1149372, 1143051, 1144920,\n", - " 1138923, 1136836, 1139328, 1144779, 1136445, 1144957, 1142153, 1142158,\n", - " 1145429, 1143345, 1144765, 1144615, 1144083, 1139979, 1135876, 1150756,\n", - " 1144376, 1146523, 1143957, 1143456, 1143457, 1137703, 1140483, 1143937,\n", - " 1146591, 1147524, 1140364, 1149569, 1137990, 1168921, 1168924, 1166410,\n", - " 1148962, 1144219, 1147995, 1147999, 1146944, 1146949, 1134907, 1144010,\n", - " 1147131, 1148704, 1141327, 1141828, 1146742, 1148468, 1148473, 1153701,\n", - " 1152328, 1149725, 1147027, 1147029, 1147024, 1147257, 1145009, 1139549,\n", - " 1158224, 1158226, 1150463, 1143921, 1141137, 1145750, 1145751, 1146178,\n", - " 1138857, 1152530, 1150438, 1150445, 1148821, 1149791, 1144514, 1144526,\n", - " 1144174, 1150339, 1153982, 1169727, 1151480, 1151482, 1152022, 1151041,\n", - " 1145256, 1149590, 1142286, 1150127, 1153956, 1158949, 1141949, 1146773,\n", - " 1150728, 1153574, 1153575, 1147653, 1149412, 1148300, 1135079, 1147858,\n", - " 1147866, 1139096, 1151421, 1154420, 1148180, 1152563, 1136249, 1146686,\n", - " 1157970, 1148725, 1148731, 1148729, 1149810, 1139936, 1139938, 1143901,\n", - " 1141728, 1153124, 1153192, 1153188, 1145104, 1145111, 1152974, 1152920,\n", - " 1152864, 1152867, 1150356, 1143126, 1143134, 1147442, 1151816, 1152581,\n", - " 1154183, 1148498, 1148505, 1149738, 1146571, 1141420, 1150634, 1155152,\n", - " 1153447, 1150890, 1146969, 1147390, 1153249, 1150219, 1146623, 1154052,\n", - " 1150794, 1152098, 1156321, 1153038, 1137746, 1146304, 1152622, 1152623,\n", - " 1140521, 1155337, 1154123, 1157835, 1157824, 1151617, 1151629, 1150578,\n", - " 1151441, 1136798, 1148914, 1148916, 1152163, 1152168, 1145957, 1145963,\n", - " 1152903, 1152341, 1146816, 1138276, 1138279, 1152294, 1136028, 1158704,\n", - " 1158708, 1156619, 1140682, 1152928, 1149273, 1153690, 1148040, 1149300,\n", - " 1155223, 1149794, 1149804, 1148628, 1158530, 1158540, 1137458, 1135705,\n", - " 1142041, 1142047, 1154377, 1157547, 1158916, 1156505, 1152397, 1157064,\n", - " 1157069, 1155408, 1155422, 1145184, 1150475, 1146854, 1135730, 1152178,\n", - " 1150824, 1150828, 1135645, 1147810, 1139525, 1158308, 1158311, 1151273,\n", - " 1140431, 1153354, 1150136, 1162120, 1154542, 1156919, 1142755, 1142758,\n", - " 1164634, 1156207, 1154227, 1151379, 1152527, 1157183, 1149321, 1155749,\n", - " 1146920, 1145806, 1156460, 1156463, 1158096, 1168230, 1154763, 1157898,\n", - " 1157894, 1155626, 1155628, 1155630, 1155631, 1154555, 1158824, 1158325,\n", - " 1157323, 1148839, 1148834, 1155635, 1143253, 1161228, 1154650, 1146937,\n", - " 1172261, 1160103, 1151317, 1154902, 1154909, 1150371, 1153322, 1157424,\n", - " 1155613, 1141627, 1150984, 1157934, 1157663, 1158578, 1153786, 1149916,\n", - " 1137380, 1159116, 1158338, 1145682, 1140914, 1134677, 1134683, 1135601,\n", - " 1148148, 1155848, 1158665, 1157684, 1149151, 1159254, 1152220, 1159213,\n", - " 1167618, 1155971, 1155975, 1155976, 1135190, 1158841, 1155393, 1149696,\n", - " 1154600, 1160164, 1180782, 1136899, 1136896, 1140221, 1163001, 1158285,\n", - " 1151615, 1136480, 1136494, 1164941, 1153114, 1156495, 1157664, 1179183,\n", - " 1158220, 1140049, 1158558, 1165497, 1165502, 1163814, 1146126, 1138110,\n", - " 1155870, 1158003, 1158004, 1158006, 1144581, 1155521, 1155528, 1164276,\n", - " 1192539, 1142663, 1157747, 1157759, 1167359, 1159057, 1188644, 1165926,\n", - " 1165922, 1151080, 1142426, 1157939, 1157944, 1157945, 1153052, 1153042,\n", - " 1153045, 1163075, 1166240, 1167707, 1138393, 1167189, 1150046, 1149070,\n", - " 1155473, 1153514, 1162360, 1164006, 1167206, 1149967, 1163407, 1154590,\n", - " 1139281, 1148025, 1166073, 1162746, 1146063, 1171259, 1158461, 1160178,\n", - " 1140643, 1148600, 1168168, 1159632, 1151877, 1151872, 1163019, 1158653,\n", - " 1159025, 1159032, 1160885, 1184726, 1162604, 1169108, 1152247, 1143737,\n", - " 1143739, 1160600, 1155588, 1151227, 1168527, 1147393, 1147837, 1144739,\n", - " 1144747, 1155269, 1153212, 1153201, 1141465, 1141471, 1141457, 1147427,\n", - " 1149890, 1156739, 1153663, 1150651, 1163260, 1171040, 1144810, 1144812,\n", - " 1164741, 1142733, 1163935, 1145562, 1167748, 1170772, 1166462, 1171688,\n", - " 1144973, 1194497, 1194508, 1142136, 1146446, 1169201, 1145447, 1152630,\n", - " 1147723, 1147720, 1145892, 1145900, 1145902, 1145897, 1153520, 1175240,\n", - " 1143395, 1160841, 1171867, 1169742, 1158723, 1158722, 1167503, 1147339,\n", - " 1145677, 1159268, 1170676, 1145502, 1151598, 1149130, 1167817, 1166653,\n", - " 1149474, 1169298, 1155172, 1155170, 1150518, 1145528, 1144336, 1138369,\n", - " 1147750, 1154670, 1142352, 1154893, 1169162, 1157331, 1141045, 1151674,\n", - " 1169359, 1149452, 1158146, 1171534, 1158611, 1158051, 1153281, 1149847,\n", - " 1160033, 1160042, 1171475, 1155502, 1176622, 1170462, 1152353, 1152360,\n", - " 1175689, 1168400, 1169921, 1173307, 1169144, 1154027, 1152150, 1152151,\n", - " 1157153, 1157371, 1157373, 1147708, 1147711, 1151850, 1148128, 1148142,\n", - " 1177415, 1169037, 1154311, 1167712, 1172961, 1171802, 1155739, 1179705,\n", - " 1140326, 1179215, 1144550, 1170546, 1166684, 1170874, 1150234, 1154148,\n", - " 1174709, 1158176, 1149169, 1183497, 1172537, 1181092, 1159401, 1153803,\n", - " 1178171, 1181568, 1171318, 1163099, 1153619, 1182651, 1166554, 1161255,\n", - " 1176527, 1155262, 1180152, 1177576, 1154718, 1157795, 1179155, 1182808,\n", - " 1171629, 1171623, 1164039, 1157124, 1177345, 1183791, 1158249, 1158253,\n", - " 1180692, 1164564, 1178218, 1164200, 1145626, 1172024, 1178769, 1179087,\n", - " 1176544, 1149755, 1181357, 1153601, 1163044, 1170069, 1179788, 1179064,\n", - " 1155892, 1180852, 1157272, 1157266, 1157279, 1179924, 1182621, 1188241,\n", - " 1162253, 1159341, 1162378, 1164436, 1182337, 1164271, 1181460, 1188637,\n", - " 1170336, 1183870, 1170034, 1168939, 1172160, 1139831, 1139837, 1150265,\n", - " 1167131, 1156055, 1151972, 1173019, 1176217, 1149544, 1184948, 1178520,\n", - " 1170713, 1169964, 1188923, 1190455, 1193025, 1179002, 1171111, 1162497,\n", - " 1186545, 1153585, 1191587, 1177365, 1175349, 1172976, 1167099, 1172423,\n", - " 1172424, 1194233, 1161198, 1172124, 1158067, 1145395, 1172718, 1180531,\n", - " 1152080, 1176225, 1155958, 1155962, 1173461, 1165508, 1185613, 1181259,\n", - " 1169831, 1185947, 1188972, 1189676, 1189370, 1190188, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1136230, 1140282, 1135726, 1140785, 1141758, 1134948, 1138335,\n", - " 1136208, 1141251, 1141250, 1142802, 1136969, 1136971, 1141452, 1151164,\n", - " 1143600, 1149839, 1139811, 1145370, 1146991, 1139145, 1143372, 1146647,\n", - " 1139955, 1140781, 1145281, 1139866, 1134937, 1136959, 1148576, 1149216,\n", - " 1142959, 1155683, 1143820, 1149632, 1147473, 1147486, 1135990, 1153936,\n", - " 1153940, 1144632, 1134700, 1146656, 1150193, 1150203, 1146472, 1136112,\n", - " 1136114, 1148546, 1147094, 1155014, 1155018, 1155019, 1139371, 1147211,\n", - " 1136683, 1136685, 1150329, 1152416, 1134718, 1136268, 1134657, 1140540,\n", - " 1138112, 1154414, 1137257, 1137172, 1137180, 1153456, 1140159, 1134720,\n", - " 1134735, 1135909, 1140020, 1135360, 1135367, 1135202, 1134960, 1141036,\n", - " 1134794, 1157443, 1157447, 1138504, 1138510, 1137329, 1137342, 1136181,\n", - " 1143069, 1136619, 1144786, 1144395, 1136821, 1136826, 1137534, 1157397,\n", - " 1152376, 1136662, 1137441, 1156159, 1148481, 1139161, 1141702, 1135583,\n", - " 1141084, 1135827, 1135830, 1140240, 1140970, 1140712, 1138514, 1138524,\n", - " 1153098, 1153099, 1137957, 1158136, 1156965, 1135522, 1138314, 1138436,\n", - " 1138440, 1138445, 1138461, 1138449, 1138462, 1137495, 1149331, 1138846,\n", - " 1135088, 1156602, 1156606, 1147112, 1142611, 1158984, 1148531, 1148533,\n", - " 1137104, 1136457, 1139667, 1139668, 1139673, 1138067, 1138069, 1134992,\n", - " 1135789, 1158961, 1158974, 1159009, 1159019, 1160089, 1144410, 1153544,\n", - " 1143631, 1141964, 1152044, 1142299, 1142302, 1136057, 1137734, 1137728,\n", - " 1134750, 1135540, 1135537, 1135549, 1141088, 1141098, 1143767, 1137299,\n", - " 1143225, 1137679, 1139025, 1146847, 1152719, 1141695, 1139386, 1136917,\n", - " 1137188, 1145066, 1141155, 1146453, 1141785, 1141786, 1141609, 1144650,\n", - " 1134979, 1134987, 1147844, 1147850, 1137074, 1144428, 1138482, 1138490,\n", - " 1141821, 1143167, 1153666, 1143212, 1158749, 1138469, 1139190, 1140110,\n", - " 1137661, 1144445, 1144596, 1141209, 1140885, 1141397, 1144182, 1137606,\n", - " 1144865, 1146201, 1137374, 1158691, 1158699, 1161701, 1147153, 1136379,\n", - " 1141367, 1153068, 1149097, 1149101, 1138293, 1144279, 1153554, 1139510,\n", - " 1140092, 1139127, 1145001, 1145005, 1139173, 1140976, 1140983, 1141560,\n", - " 1147050, 1147047, 1145873, 1152976, 1138992, 1141925, 1146898, 1144245,\n", - " 1144242, 1141841, 1141846, 1150253, 1140690, 1139405, 1143640, 1134849,\n", - " 1144072, 1143845, 1143851, 1146019, 1146024, 1146025, 1146140, 1154323,\n", - " 1149928, 1149935, 1139990, 1143294, 1143885, 1147543, 1147540, 1148763,\n", - " 1147282, 1142816, 1149155, 1147461, 1149366, 1149372, 1143051, 1144920,\n", - " 1138923, 1136836, 1139328, 1144779, 1136445, 1144957, 1142153, 1142158,\n", - " 1145429, 1143345, 1144765, 1144615, 1144083, 1139979, 1135876, 1150756,\n", - " 1144376, 1146523, 1143957, 1143456, 1143457, 1137703, 1140483, 1143937,\n", - " 1146591, 1147524, 1140364, 1149569, 1137990, 1168921, 1168924, 1166410,\n", - " 1148962, 1144219, 1147995, 1147999, 1146944, 1146949, 1134907, 1144010,\n", - " 1147131, 1148704, 1141327, 1141828, 1146742, 1148468, 1148473, 1153701,\n", - " 1152328, 1149725, 1147027, 1147029, 1147024, 1147257, 1145009, 1139549,\n", - " 1158224, 1158226, 1150463, 1143921, 1141137, 1145750, 1145751, 1146178,\n", - " 1138857, 1152530, 1150438, 1150445, 1148821, 1149791, 1144514, 1144526,\n", - " 1144174, 1150339, 1153982, 1169727, 1151480, 1151482, 1152022, 1151041,\n", - " 1145256, 1149590, 1142286, 1150127, 1153956, 1158949, 1141949, 1146773,\n", - " 1150728, 1153574, 1153575, 1147653, 1149412, 1148300, 1135079, 1147858,\n", - " 1147866, 1139096, 1151421, 1154420, 1148180, 1152563, 1136249, 1146686,\n", - " 1157970, 1148725, 1148731, 1148729, 1149810, 1139936, 1139938, 1143901,\n", - " 1141728, 1153124, 1153192, 1153188, 1145104, 1145111, 1152974, 1152920,\n", - " 1152864, 1152867, 1150356, 1143126, 1143134, 1147442, 1151816, 1152581,\n", - " 1154183, 1148498, 1148505, 1149738, 1146571, 1141420, 1150634, 1155152,\n", - " 1153447, 1150890, 1146969, 1147390, 1153249, 1150219, 1146623, 1154052,\n", - " 1150794, 1152098, 1156321, 1153038, 1137746, 1146304, 1152622, 1152623,\n", - " 1140521, 1155337, 1154123, 1157835, 1157824, 1151617, 1151629, 1150578,\n", - " 1151441, 1136798, 1148914, 1148916, 1152163, 1152168, 1145957, 1145963,\n", - " 1152903, 1152341, 1146816, 1138276, 1138279, 1152294, 1136028, 1158704,\n", - " 1158708, 1156619, 1140682, 1152928, 1149273, 1153690, 1148040, 1149300,\n", - " 1155223, 1149794, 1149804, 1148628, 1158530, 1158540, 1137458, 1135705,\n", - " 1142041, 1142047, 1154377, 1157547, 1158916, 1156505, 1152397, 1157064,\n", - " 1157069, 1155408, 1155422, 1145184, 1150475, 1146854, 1135730, 1152178,\n", - " 1150824, 1150828, 1135645, 1147810, 1139525, 1158308, 1158311, 1151273,\n", - " 1140431, 1153354, 1150136, 1162120, 1154542, 1156919, 1142755, 1142758,\n", - " 1164634, 1156207, 1154227, 1151379, 1152527, 1157183, 1149321, 1155749,\n", - " 1146920, 1145806, 1156460, 1156463, 1158096, 1168230, 1154763, 1157898,\n", - " 1157894, 1155626, 1155628, 1155630, 1155631, 1154555, 1158824, 1158325,\n", - " 1157323, 1148839, 1148834, 1155635, 1143253, 1161228, 1154650, 1146937,\n", - " 1172261, 1160103, 1151317, 1154902, 1154909, 1150371, 1153322, 1157424,\n", - " 1155613, 1141627, 1150984, 1157934, 1157663, 1158578, 1153786, 1149916,\n", - " 1137380, 1159116, 1158338, 1145682, 1140914, 1134677, 1134683, 1135601,\n", - " 1148148, 1155848, 1158665, 1157684, 1149151, 1159254, 1152220, 1159213,\n", - " 1167618, 1155971, 1155975, 1155976, 1135190, 1158841, 1155393, 1149696,\n", - " 1154600, 1160164, 1180782, 1136899, 1136896, 1140221, 1163001, 1158285,\n", - " 1151615, 1136480, 1136494, 1164941, 1153114, 1156495, 1157664, 1179183,\n", - " 1158220, 1140049, 1158558, 1165497, 1165502, 1163814, 1146126, 1138110,\n", - " 1155870, 1158003, 1158004, 1158006, 1144581, 1155521, 1155528, 1164276,\n", - " 1192539, 1142663, 1157747, 1157759, 1167359, 1159057, 1188644, 1165926,\n", - " 1165922, 1151080, 1142426, 1157939, 1157944, 1157945, 1153052, 1153042,\n", - " 1153045, 1163075, 1166240, 1167707, 1138393, 1167189, 1150046, 1149070,\n", - " 1155473, 1153514, 1162360, 1164006, 1167206, 1149967, 1163407, 1154590,\n", - " 1139281, 1148025, 1166073, 1162746, 1146063, 1171259, 1158461, 1160178,\n", - " 1140643, 1148600, 1168168, 1159632, 1151877, 1151872, 1163019, 1158653,\n", - " 1159025, 1159032, 1160885, 1184726, 1162604, 1169108, 1152247, 1143737,\n", - " 1143739, 1160600, 1155588, 1151227, 1168527, 1147393, 1147837, 1144739,\n", - " 1144747, 1155269, 1153212, 1153201, 1141465, 1141471, 1141457, 1147427,\n", - " 1149890, 1156739, 1153663, 1150651, 1163260, 1171040, 1144810, 1144812,\n", - " 1164741, 1142733, 1163935, 1145562, 1167748, 1170772, 1166462, 1171688,\n", - " 1144973, 1194497, 1194508, 1142136, 1146446, 1169201, 1145447, 1152630,\n", - " 1147723, 1147720, 1145892, 1145900, 1145902, 1145897, 1153520, 1175240,\n", - " 1143395, 1160841, 1171867, 1169742, 1158723, 1158722, 1167503, 1147339,\n", - " 1145677, 1159268, 1170676, 1145502, 1151598, 1149130, 1167817, 1166653,\n", - " 1149474, 1169298, 1155172, 1155170, 1150518, 1145528, 1144336, 1138369,\n", - " 1147750, 1154670, 1142352, 1154893, 1169162, 1157331, 1141045, 1151674,\n", - " 1169359, 1149452, 1158146, 1171534, 1158611, 1158051, 1153281, 1149847,\n", - " 1160033, 1160042, 1171475, 1155502, 1176622, 1170462, 1152353, 1152360,\n", - " 1175689, 1168400, 1169921, 1173307, 1169144, 1154027, 1152150, 1152151,\n", - " 1157153, 1157371, 1157373, 1147708, 1147711, 1151850, 1148128, 1148142,\n", - " 1177415, 1169037, 1154311, 1167712, 1172961, 1171802, 1155739, 1179705,\n", - " 1140326, 1179215, 1144550, 1170546, 1166684, 1170874, 1150234, 1154148,\n", - " 1174709, 1158176, 1149169, 1183497, 1172537, 1181092, 1159401, 1153803,\n", - " 1178171, 1181568, 1171318, 1163099, 1153619, 1182651, 1166554, 1161255,\n", - " 1176527, 1155262, 1180152, 1177576, 1154718, 1157795, 1179155, 1182808,\n", - " 1171629, 1171623, 1164039, 1157124, 1177345, 1183791, 1158249, 1158253,\n", - " 1180692, 1164564, 1178218, 1164200, 1145626, 1172024, 1178769, 1179087,\n", - " 1176544, 1149755, 1181357, 1153601, 1163044, 1170069, 1179788, 1179064,\n", - " 1155892, 1180852, 1157272, 1157266, 1157279, 1179924, 1182621, 1188241,\n", - " 1162253, 1159341, 1162378, 1164436, 1182337, 1164271, 1181460, 1188637,\n", - " 1170336, 1183870, 1170034, 1168939, 1172160, 1139831, 1139837, 1150265,\n", - " 1167131, 1156055, 1151972, 1173019, 1176217, 1149544, 1184948, 1178520,\n", - " 1170713, 1169964, 1188923, 1190455, 1193025, 1179002, 1171111, 1162497,\n", - " 1186545, 1153585, 1191587, 1177365, 1175349, 1172976, 1167099, 1172423,\n", - " 1172424, 1194233, 1161198, 1172124, 1158067, 1145395, 1172718, 1180531,\n", - " 1152080, 1176225, 1155958, 1155962, 1173461, 1165508, 1185613, 1181259,\n", - " 1169831, 1185947, 1188972, 1189676, 1189370, 1190188, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196007, 1197847, 1198769, 1199439, 1200105, 1199282, 1202255, 1198844,\n", - " 1201582, 1199270, 1194626, 1201668, 1200650, 1201016, 1196956, 1194866,\n", - " 1196631, 1195263, 1197921, 1196534, 1201992, 1194882, 1199172, 1199171,\n", - " 1196359, 1195325, 1197104, 1196835, 1198668, 1195571, 1198167, 1198161,\n", - " 1196717, 1195148, 1195223, 1195216, 1195265, 1197141, 1197140, 1197273,\n", - " 1196109, 1198219, 1195841, 1195659, 1195541, 1197249, 1195783, 1195778,\n", - " 1195631, 1195626, 1195353, 1198282, 1199060, 1194928, 1197676, 1197990,\n", - " 1200878, 1199676, 1194795, 1198763, 1199018, 1197601, 1197609, 1196727,\n", - " 1195773, 1202616, 1200887, 1200894, 1198428, 1199414, 1199421, 1195557,\n", - " 1198811, 1201547, 1200570, 1199445, 1201156, 1201056, 1200913, 1199766,\n", - " 1199539, 1202641, 1200526, 1200553, 1200555, 1200429, 1197097, 1197100,\n", - " 1202055, 1202129, 1197040, 1196768, 1197945, 1201034, 1202239, 1200907,\n", - " 1202175, 1201291, 1198478, 1203329, 1202889, 1199922, 1196960, 1196964,\n", - " 1196966, 1200995, 1200792, 1200638, 1198518, 1195664, 1196929, 1198932,\n", - " 1198909, 1198911, 1195415, 1195386, 1197816, 1197821, 1195289, 1196547,\n", - " 1196375, 1196373, 1203102, 1197735, 1198848, 1200974, 1200296, 1197652,\n", - " 1201361, 1201365, 1197035, 1202077, 1194908, 1196417, 1203162, 1201966,\n", - " 1197886], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196007, 1197847, 1198769, 1199439, 1200105, 1199282, 1202255, 1198844,\n", - " 1201582, 1199270, 1194626, 1201668, 1200650, 1201016, 1196956, 1194866,\n", - " 1196631, 1195263, 1197921, 1196534, 1201992, 1194882, 1199172, 1199171,\n", - " 1196359, 1195325, 1197104, 1196835, 1198668, 1195571, 1198167, 1198161,\n", - " 1196717, 1195148, 1195223, 1195216, 1195265, 1197141, 1197140, 1197273,\n", - " 1196109, 1198219, 1195841, 1195659, 1195541, 1197249, 1195783, 1195778,\n", - " 1195631, 1195626, 1195353, 1198282, 1199060, 1194928, 1197676, 1197990,\n", - " 1200878, 1199676, 1194795, 1198763, 1199018, 1197601, 1197609, 1196727,\n", - " 1195773, 1202616, 1200887, 1200894, 1198428, 1199414, 1199421, 1195557,\n", - " 1198811, 1201547, 1200570, 1199445, 1201156, 1201056, 1200913, 1199766,\n", - " 1199539, 1202641, 1200526, 1200553, 1200555, 1200429, 1197097, 1197100,\n", - " 1202055, 1202129, 1197040, 1196768, 1197945, 1201034, 1202239, 1200907,\n", - " 1202175, 1201291, 1198478, 1203329, 1202889, 1199922, 1196960, 1196964,\n", - " 1196966, 1200995, 1200792, 1200638, 1198518, 1195664, 1196929, 1198932,\n", - " 1198909, 1198911, 1195415, 1195386, 1197816, 1197821, 1195289, 1196547,\n", - " 1196375, 1196373, 1203102, 1197735, 1198848, 1200974, 1200296, 1197652,\n", - " 1201361, 1201365, 1197035, 1202077, 1194908, 1196417, 1203162, 1201966,\n", - " 1197886], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.1965e-01, 3.1732e-03, 5.8375e-01, ..., 1.0040e-01,\n", - " -1.4372e-03, -3.8640e-03],\n", - " [ 9.3490e-02, -2.7171e-04, 6.0166e-01, ..., 1.2245e-01,\n", - " -2.0252e-03, -3.8173e-03],\n", - " [ 2.3105e-01, -5.6952e-04, 9.3376e-01, ..., 1.0260e-01,\n", - " -1.8096e-03, -6.2580e-03],\n", - " ...,\n", - " [ 2.5540e-01, -7.7677e-04, 9.8786e-01, ..., 9.5978e-02,\n", - " -1.7559e-03, -6.6811e-03],\n", - " [ 1.4989e-01, -1.0460e-04, 7.0554e-01, ..., 1.0039e-01,\n", - " -1.4354e-03, -4.7232e-03],\n", - " [ 1.2592e-01, -4.3996e-04, 6.5371e-01, ..., 1.0860e-01,\n", - " -1.8694e-03, -4.5276e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[-3.4411e-03, 4.5184e-01, 3.2086e+00, ..., -9.1712e-03,\n", - " -3.0353e-02, -1.7606e-02],\n", - " [ 1.3396e+00, 1.7049e+00, 3.2933e+00, ..., 1.9531e+00,\n", - " -5.4315e-02, 3.3472e+00],\n", - " [ 1.3056e+00, 2.3606e+00, 1.6973e+00, ..., -1.4648e-02,\n", - " -2.8858e-02, 5.8698e-01],\n", - " ...,\n", - " [ 7.6562e-01, 1.8658e+00, 1.6951e+00, ..., -9.9596e-03,\n", - " -2.6606e-02, 1.1646e-01],\n", - " [ 1.4964e+00, 1.5990e+00, 1.2229e+00, ..., -1.2487e-02,\n", - " -2.5568e-02, 8.5850e-01],\n", - " [ 1.3715e+00, 2.2035e+00, 3.1426e+00, ..., 2.8561e+00,\n", - " -5.7674e-02, 4.0337e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-5.9217e-04, 2.9088e-02, 1.2542e-01, ..., 1.6878e-01,\n", - " -7.4513e-05, -6.6133e-04],\n", - " [-4.1598e-03, 3.3162e-01, 2.7513e-01, ..., 1.3838e+00,\n", - " -2.5187e-03, -5.2989e-03],\n", - " [-1.1896e-03, 4.0179e-01, 9.8840e-02, ..., 1.5815e+00,\n", - " 1.2072e-01, 3.0604e-02],\n", - " ...,\n", - " [-1.4697e-03, 3.1848e-01, 2.0593e-01, ..., 1.6435e+00,\n", - " 1.8472e-02, -6.3162e-04],\n", - " [-2.1116e-03, 3.6206e-01, 1.4068e-01, ..., 1.4178e+00,\n", - " -8.8161e-04, -1.3785e-03],\n", - " [-1.7858e-03, 4.1373e-01, 9.7328e-02, ..., 1.6181e+00,\n", - " 1.0081e-01, -3.1901e-04]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-0.0013, 0.7193, 0.5061, ..., -0.0092, 0.2066, 0.4524],\n", - " [ 0.0741, 0.7569, 0.4598, ..., -0.0063, 0.2465, 0.2723],\n", - " [ 0.3289, 1.0138, 0.6221, ..., -0.0100, 0.5164, 0.0900],\n", - " ...,\n", - " [ 0.0337, 0.7986, 0.4459, ..., -0.0108, 0.4945, 0.3193],\n", - " [ 0.0601, 0.6679, 0.3300, ..., -0.0077, 0.2869, 0.2819],\n", - " [ 0.1024, 0.9497, 0.6397, ..., -0.0110, 0.5280, 0.2928]],\n", - " device='cuda:0', grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 3, 4, 4, 98, 98, 146, 134, 134, 134, 237, 410, 239,\n", - " 697, 939, 646, 998, 998, 998, 998, 860, 1092, 1027, 1056, 1056,\n", - " 1056, 1384, 1288, 1177, 1117, 1117, 1117, 1309, 1422, 1276, 1270, 1393,\n", - " 1519, 1519, 1519, 1562, 1562, 1586, 1586, 1481, 1477, 1489, 1562, 1562,\n", - " 1562, 1562, 1562, 1477, 1477, 1639, 1680, 1628, 1574, 1574, 1549, 1624,\n", - " 1675, 1986, 1986, 1986, 1760, 2039, 1827, 1827, 1913, 1913, 1913, 1913,\n", - " 1979, 2064, 1868, 2054, 2271, 2271, 2150, 2149, 2149, 2149, 2149, 2294,\n", - " 2294, 2024, 2233, 2268, 2229, 2515, 2342, 2342, 2396, 2323, 2468, 2468,\n", - " 2586, 2340, 2580, 2640, 2613, 2713, 2742, 3129, 2854, 2823, 3111, 3111,\n", - " 3100, 3091, 3091, 3049, 3079, 3138, 3093, 3381, 3265, 3313, 3337, 3579,\n", - " 3412, 3560, 3560, 3560, 3560, 3560, 3560, 3733, 3665, 3665, 3665, 3665,\n", - " 3828, 3980, 4070, 4046, 4011, 4072, 4072, 4213, 4233, 4233, 4233, 4316,\n", - " 4273, 4273, 4303, 4521, 4473, 4487, 4487, 4487, 4432, 4550, 4634, 4634,\n", - " 4634, 4634, 4688, 4688, 4650, 4634, 4634, 4634, 4664, 4664, 4785, 4859,\n", - " 4944, 5100, 5076, 5129, 5088, 5264, 5027, 4963, 5210, 5210, 5535, 5535,\n", - " 5139, 5569, 5569, 5512, 5274, 5230, 5120, 5414, 5414, 5297, 5604, 5604,\n", - " 5653, 6117, 5552, 5582, 5713, 5713, 5713, 5713, 5752, 5884, 5877, 5709,\n", - " 5900, 5900, 6109, 6035, 6043, 5924, 5924, 5957, 6009, 6009, 5913, 5913,\n", - " 5871, 5871, 5933, 6194, 6194],\n", - " [ 7, 85, 84, 72, 60, 26, 13, 116, 20, 109, 20, 128,\n", - " 50, 6, 131, 67, 17, 10, 32, 5, 10, 46, 94, 47,\n", - " 76, 46, 20, 51, 88, 118, 5, 121, 17, 51, 16, 108,\n", - " 134, 31, 63, 49, 118, 80, 45, 63, 12, 9, 5, 93,\n", - " 135, 133, 88, 86, 10, 10, 54, 40, 41, 53, 120, 39,\n", - " 104, 20, 81, 112, 38, 47, 56, 50, 75, 68, 106, 99,\n", - " 49, 49, 47, 104, 75, 71, 63, 4, 30, 19, 110, 124,\n", - " 103, 55, 127, 63, 113, 69, 110, 4, 51, 111, 109, 62,\n", - " 54, 73, 17, 123, 101, 65, 83, 135, 124, 1, 98, 87,\n", - " 17, 132, 24, 6, 1, 121, 9, 63, 59, 72, 36, 79,\n", - " 53, 97, 122, 10, 14, 114, 109, 35, 21, 107, 15, 34,\n", - " 117, 35, 9, 120, 3, 27, 63, 23, 48, 43, 42, 63,\n", - " 115, 0, 17, 105, 73, 90, 130, 120, 105, 25, 126, 96,\n", - " 100, 78, 60, 11, 17, 33, 44, 63, 63, 119, 79, 109,\n", - " 39, 54, 63, 29, 79, 7, 91, 32, 82, 63, 8, 63,\n", - " 2, 37, 95, 57, 52, 129, 89, 50, 63, 58, 63, 68,\n", - " 42, 67, 20, 63, 64, 61, 99, 57, 66, 125, 136, 22,\n", - " 63, 83, 83, 92, 35, 63, 18, 28, 63, 64, 63, 117,\n", - " 77, 63, 102, 70, 74]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1657, 1819, 1518, ..., 832, 2010, 4923],\n", - " [ 245, 245, 179, ..., 6764, 6887, 6934]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 75, 29, 77, ..., 63, 32, 77],\n", - " [ 22, 46, 18, ..., 6127, 6143, 6040]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 210, 210, 67, ..., 6848, 6848, 6848],\n", - " [ 176, 776, 298, ..., 853, 313, 341]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 281, 313, 222, ..., 399, 599, 879],\n", - " [ 166, 50, 124, ..., 6944, 6851, 6859]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5806, 3906, 1546, ..., 3076, 4013, 1062],\n", - " [ 1, 8, 164, ..., 6172, 6082, 6203]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 210, 210, 210, ..., 6848, 6910, 6809],\n", - " [ 972, 1072, 1351, ..., 6831, 3293, 840]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 55, 55, 55, ..., 5819, 5819, 5819],\n", - " [ 992, 2885, 3103, ..., 6639, 6658, 6731]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006725\n", - "sampling 0.006569\n", - "noi time: 0.001834\n", - "get_vertex_data call: 0.037485\n", - "noi group time: 0.003609\n", - "eoi_group_time: 0.016177\n", - "second half: 0.218803\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 31142, 24187, ..., 1134320, 1125832, 1120069],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 31142, 24187, ..., 1134320, 1125832, 1120069],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1208558, 1231430, ..., 1938525, 1937354, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1208558, 1231430, ..., 1938525, 1937354, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1141424, 1140282, 1135926, 1135716, 1135726, 1137784, 1141748,\n", - " 1141758, 1137506, 1136969, 1141443, 1138897, 1151156, 1149839, 1139811,\n", - " 1146978, 1137947, 1145992, 1138933, 1143372, 1143363, 1139243, 1139615,\n", - " 1150497, 1150509, 1143820, 1147473, 1144636, 1148512, 1146992, 1153009,\n", - " 1134697, 1135950, 1152664, 1147089, 1141904, 1150555, 1155018, 1155019,\n", - " 1147211, 1136685, 1146369, 1146375, 1140537, 1140542, 1138112, 1138356,\n", - " 1151531, 1135913, 1140953, 1135367, 1135202, 1136036, 1141036, 1134794,\n", - " 1157443, 1138508, 1136189, 1137693, 1136619, 1139215, 1144395, 1136826,\n", - " 1137441, 1135265, 1156159, 1139161, 1135579, 1141086, 1136111, 1138514,\n", - " 1153098, 1153099, 1154132, 1137008, 1156899, 1135522, 1135535, 1139685,\n", - " 1137287, 1157703, 1157706, 1138436, 1138440, 1138445, 1138461, 1138449,\n", - " 1137924, 1136594, 1158390, 1149328, 1138846, 1135098, 1138882, 1156605,\n", - " 1147112, 1147115, 1147118, 1142611, 1135359, 1135355, 1135631, 1138185,\n", - " 1148531, 1137109, 1135771, 1135772, 1141532, 1143584, 1136453, 1136457,\n", - " 1139667, 1136092, 1134992, 1142788, 1152651, 1136734, 1142905, 1159019,\n", - " 1153544, 1152701, 1137595, 1138648, 1138148, 1134891, 1141985, 1152044,\n", - " 1142299, 1137734, 1137728, 1147316, 1146222, 1134742, 1135549, 1140231,\n", - " 1140228, 1141088, 1141095, 1141097, 1141102, 1144130, 1136398, 1154860,\n", - " 1143706, 1143221, 1143231, 1139033, 1149968, 1149982, 1141695, 1135861,\n", - " 1136426, 1136637, 1141224, 1163301, 1136917, 1139730, 1143667, 1144237,\n", - " 1141786, 1139495, 1144641, 1134979, 1147850, 1137086, 1141810, 1141821,\n", - " 1141816, 1140160, 1140173, 1148867, 1142716, 1139190, 1137060, 1138708,\n", - " 1140110, 1142917, 1142913, 1138423, 1138424, 1144445, 1144596, 1136864,\n", - " 1141578, 1135315, 1135327, 1140442, 1144182, 1150906, 1146201, 1137364,\n", - " 1139559, 1158698, 1158703, 1138536, 1161710, 1147153, 1142646, 1142650,\n", - " 1149186, 1162804, 1141365, 1141367, 1141669, 1144279, 1139508, 1139510,\n", - " 1139774, 1138815, 1139127, 1140616, 1140620, 1140990, 1146695, 1146702,\n", - " 1135047, 1147050, 1145873, 1143543, 1152976, 1152988, 1135457, 1135460,\n", - " 1141925, 1144242, 1140582, 1141853, 1166362, 1150243, 1150253, 1140696,\n", - " 1136885, 1171652, 1134851, 1141390, 1143845, 1136275, 1146019, 1146024,\n", - " 1146140, 1141585, 1141235, 1141236, 1139990, 1147543, 1147545, 1147540,\n", - " 1147282, 1142816, 1164374, 1138660, 1138661, 1138669, 1136330, 1140337,\n", - " 1147469, 1142628, 1148004, 1146094, 1149608, 1143051, 1136836, 1139329,\n", - " 1139341, 1139328, 1138238, 1142159, 1143345, 1144088, 1144093, 1135876,\n", - " 1150296, 1150919, 1146523, 1146526, 1143456, 1143470, 1143471, 1143457,\n", - " 1143463, 1143007, 1142015, 1143937, 1135451, 1147574, 1146636, 1140364,\n", - " 1149582, 1137999, 1143082, 1144218, 1144219, 1147995, 1147999, 1134902,\n", - " 1139252, 1147131, 1147234, 1147240, 1148704, 1141327, 1141825, 1141836,\n", - " 1152327, 1147070, 1149722, 1147025, 1147024, 1145011, 1139549, 1158235,\n", - " 1147880, 1151646, 1145240, 1145750, 1145751, 1142370, 1146153, 1146178,\n", - " 1151242, 1148223, 1169870, 1151182, 1151175, 1147961, 1154437, 1149791,\n", - " 1144526, 1141358, 1146881, 1147794, 1151473, 1152026, 1149599, 1140566,\n", - " 1140402, 1150122, 1147019, 1147009, 1147023, 1135805, 1158959, 1151795,\n", - " 1153574, 1154990, 1148463, 1147653, 1147654, 1147656, 1149412, 1151718,\n", - " 1148288, 1151412, 1154420, 1148180, 1146676, 1146686, 1146684, 1138867,\n", - " 1148724, 1148729, 1145859, 1150057, 1148204, 1154203, 1153124, 1153125,\n", - " 1153192, 1145104, 1159828, 1159837, 1152877, 1143092, 1150356, 1155088,\n", - " 1146231, 1143134, 1151811, 1151821, 1151906, 1150708, 1150715, 1148498,\n", - " 1146565, 1141420, 1146969, 1146967, 1156402, 1146623, 1151691, 1144476,\n", - " 1135688, 1152407, 1150794, 1152098, 1156325, 1156334, 1150094, 1137746,\n", - " 1152622, 1140521, 1151962, 1151967, 1152826, 1155337, 1155334, 1154123,\n", - " 1152673, 1151618, 1151617, 1150578, 1150588, 1136134, 1136788, 1148916,\n", - " 1152958, 1153387, 1145952, 1152903, 1151311, 1143988, 1152341, 1146816,\n", - " 1156816, 1153308, 1145577, 1138281, 1152288, 1156005, 1136028, 1158704,\n", - " 1156619, 1151195, 1140674, 1140684, 1152928, 1163941, 1152888, 1156422,\n", - " 1137396, 1150159, 1148040, 1149300, 1152601, 1152597, 1157619, 1145656,\n", - " 1144659, 1148628, 1158530, 1137458, 1154564, 1148242, 1157514, 1147646,\n", - " 1142047, 1135434, 1148894, 1157064, 1157069, 1153885, 1155422, 1145191,\n", - " 1143502, 1135231, 1156638, 1151788, 1150828, 1135634, 1147810, 1151469,\n", - " 1139525, 1139530, 1158308, 1158311, 1151271, 1155441, 1150132, 1150136,\n", - " 1154529, 1154528, 1145610, 1142755, 1157637, 1151379, 1140186, 1156649,\n", - " 1149321, 1155748, 1155758, 1156463, 1168230, 1168239, 1154755, 1155626,\n", - " 1155628, 1155631, 1156563, 1154555, 1155582, 1161429, 1158824, 1158330,\n", - " 1157001, 1155646, 1153368, 1160956, 1143263, 1154648, 1146937, 1154240,\n", - " 1137347, 1154909, 1143189, 1157439, 1147918, 1141627, 1150987, 1157928,\n", - " 1157934, 1157653, 1157650, 1158126, 1156764, 1159116, 1145694, 1135601,\n", - " 1150661, 1150671, 1155848, 1158665, 1138215, 1157684, 1149145, 1156081,\n", - " 1155717, 1155433, 1155434, 1167311, 1167618, 1140380, 1157733, 1144843,\n", - " 1144844, 1155971, 1155975, 1135184, 1158840, 1158846, 1183168, 1156815,\n", - " 1163238, 1153503, 1136896, 1158760, 1158764, 1158881, 1140221, 1158815,\n", - " 1158804, 1158447, 1136480, 1136494, 1136491, 1164942, 1152136, 1153808,\n", - " 1156277, 1136640, 1140049, 1157861, 1156516, 1165778, 1138110, 1154350,\n", - " 1158003, 1158006, 1150011, 1169890, 1164274, 1164276, 1150674, 1167359,\n", - " 1162683, 1159356, 1159070, 1159061, 1157939, 1157946, 1153052, 1153045,\n", - " 1171551, 1155763, 1156370, 1144158, 1166256, 1156107, 1138393, 1150046,\n", - " 1159475, 1149070, 1145945, 1155476, 1155479, 1154294, 1153514, 1147300,\n", - " 1142405, 1158680, 1146876, 1161658, 1157607, 1138161, 1164006, 1156787,\n", - " 1149956, 1149963, 1164909, 1163396, 1163379, 1154590, 1165772, 1157236,\n", - " 1148769, 1157351, 1146063, 1158449, 1165299, 1169502, 1164990, 1144506,\n", - " 1141800, 1158643, 1159025, 1159029, 1159032, 1165602, 1152247, 1171154,\n", - " 1164116, 1155588, 1148571, 1144977, 1146500, 1161240, 1144739, 1141470,\n", - " 1141471, 1157044, 1156739, 1157955, 1153663, 1167373, 1150648, 1150649,\n", - " 1171040, 1168748, 1144812, 1162085, 1135567, 1156300, 1144051, 1145176,\n", - " 1145229, 1169282, 1188489, 1155324, 1147673, 1170670, 1144971, 1143037,\n", - " 1147693, 1145447, 1165746, 1170945, 1145889, 1168659, 1169548, 1143395,\n", - " 1143404, 1171867, 1158722, 1154076, 1170738, 1144690, 1145674, 1150773,\n", - " 1165737, 1145502, 1151587, 1167817, 1169298, 1155172, 1150522, 1150518,\n", - " 1145531, 1144336, 1157534, 1154670, 1135854, 1190647, 1169162, 1157331,\n", - " 1157342, 1141043, 1151668, 1151674, 1169359, 1149452, 1171529, 1158611,\n", - " 1158623, 1158062, 1173047, 1149847, 1172642, 1165903, 1154869, 1155493,\n", - " 1152353, 1152546, 1148324, 1147509, 1173307, 1180710, 1169144, 1154027,\n", - " 1159651, 1159658, 1171145, 1178422, 1157158, 1157153, 1157373, 1147711,\n", - " 1151850, 1148131, 1169913, 1145790, 1147925, 1149247, 1169037, 1168800,\n", - " 1166751, 1168604, 1170020, 1164362, 1144545, 1178056, 1171823, 1160314,\n", - " 1150234, 1154151, 1154148, 1178889, 1149169, 1171921, 1143279, 1180389,\n", - " 1168481, 1171305, 1169620, 1153803, 1189183, 1153625, 1172309, 1183123,\n", - " 1171396, 1151519, 1155262, 1157792, 1157795, 1182808, 1171623, 1164034,\n", - " 1163219, 1157128, 1157992, 1172148, 1187251, 1158253, 1153898, 1145626,\n", - " 1178776, 1157483, 1149755, 1153609, 1158512, 1158940, 1155890, 1179923,\n", - " 1182786, 1182797, 1180679, 1171634, 1162253, 1188939, 1185411, 1168876,\n", - " 1163422, 1161819, 1156162, 1190612, 1168936, 1156539, 1139831, 1150265,\n", - " 1154812, 1188613, 1187899, 1183900, 1156055, 1151978, 1181888, 1146392,\n", - " 1146394, 1146395, 1173058, 1149544, 1193369, 1191693, 1190835, 1167439,\n", - " 1169964, 1140995, 1193709, 1186488, 1171668, 1189486, 1171240, 1189403,\n", - " 1162502, 1169703, 1175349, 1172429, 1180786, 1176829, 1152080, 1155962,\n", - " 1179769, 1172896, 1167467, 1182852, 1157022, 1161940], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1141424, 1140282, 1135926, 1135716, 1135726, 1137784, 1141748,\n", - " 1141758, 1137506, 1136969, 1141443, 1138897, 1151156, 1149839, 1139811,\n", - " 1146978, 1137947, 1145992, 1138933, 1143372, 1143363, 1139243, 1139615,\n", - " 1150497, 1150509, 1143820, 1147473, 1144636, 1148512, 1146992, 1153009,\n", - " 1134697, 1135950, 1152664, 1147089, 1141904, 1150555, 1155018, 1155019,\n", - " 1147211, 1136685, 1146369, 1146375, 1140537, 1140542, 1138112, 1138356,\n", - " 1151531, 1135913, 1140953, 1135367, 1135202, 1136036, 1141036, 1134794,\n", - " 1157443, 1138508, 1136189, 1137693, 1136619, 1139215, 1144395, 1136826,\n", - " 1137441, 1135265, 1156159, 1139161, 1135579, 1141086, 1136111, 1138514,\n", - " 1153098, 1153099, 1154132, 1137008, 1156899, 1135522, 1135535, 1139685,\n", - " 1137287, 1157703, 1157706, 1138436, 1138440, 1138445, 1138461, 1138449,\n", - " 1137924, 1136594, 1158390, 1149328, 1138846, 1135098, 1138882, 1156605,\n", - " 1147112, 1147115, 1147118, 1142611, 1135359, 1135355, 1135631, 1138185,\n", - " 1148531, 1137109, 1135771, 1135772, 1141532, 1143584, 1136453, 1136457,\n", - " 1139667, 1136092, 1134992, 1142788, 1152651, 1136734, 1142905, 1159019,\n", - " 1153544, 1152701, 1137595, 1138648, 1138148, 1134891, 1141985, 1152044,\n", - " 1142299, 1137734, 1137728, 1147316, 1146222, 1134742, 1135549, 1140231,\n", - " 1140228, 1141088, 1141095, 1141097, 1141102, 1144130, 1136398, 1154860,\n", - " 1143706, 1143221, 1143231, 1139033, 1149968, 1149982, 1141695, 1135861,\n", - " 1136426, 1136637, 1141224, 1163301, 1136917, 1139730, 1143667, 1144237,\n", - " 1141786, 1139495, 1144641, 1134979, 1147850, 1137086, 1141810, 1141821,\n", - " 1141816, 1140160, 1140173, 1148867, 1142716, 1139190, 1137060, 1138708,\n", - " 1140110, 1142917, 1142913, 1138423, 1138424, 1144445, 1144596, 1136864,\n", - " 1141578, 1135315, 1135327, 1140442, 1144182, 1150906, 1146201, 1137364,\n", - " 1139559, 1158698, 1158703, 1138536, 1161710, 1147153, 1142646, 1142650,\n", - " 1149186, 1162804, 1141365, 1141367, 1141669, 1144279, 1139508, 1139510,\n", - " 1139774, 1138815, 1139127, 1140616, 1140620, 1140990, 1146695, 1146702,\n", - " 1135047, 1147050, 1145873, 1143543, 1152976, 1152988, 1135457, 1135460,\n", - " 1141925, 1144242, 1140582, 1141853, 1166362, 1150243, 1150253, 1140696,\n", - " 1136885, 1171652, 1134851, 1141390, 1143845, 1136275, 1146019, 1146024,\n", - " 1146140, 1141585, 1141235, 1141236, 1139990, 1147543, 1147545, 1147540,\n", - " 1147282, 1142816, 1164374, 1138660, 1138661, 1138669, 1136330, 1140337,\n", - " 1147469, 1142628, 1148004, 1146094, 1149608, 1143051, 1136836, 1139329,\n", - " 1139341, 1139328, 1138238, 1142159, 1143345, 1144088, 1144093, 1135876,\n", - " 1150296, 1150919, 1146523, 1146526, 1143456, 1143470, 1143471, 1143457,\n", - " 1143463, 1143007, 1142015, 1143937, 1135451, 1147574, 1146636, 1140364,\n", - " 1149582, 1137999, 1143082, 1144218, 1144219, 1147995, 1147999, 1134902,\n", - " 1139252, 1147131, 1147234, 1147240, 1148704, 1141327, 1141825, 1141836,\n", - " 1152327, 1147070, 1149722, 1147025, 1147024, 1145011, 1139549, 1158235,\n", - " 1147880, 1151646, 1145240, 1145750, 1145751, 1142370, 1146153, 1146178,\n", - " 1151242, 1148223, 1169870, 1151182, 1151175, 1147961, 1154437, 1149791,\n", - " 1144526, 1141358, 1146881, 1147794, 1151473, 1152026, 1149599, 1140566,\n", - " 1140402, 1150122, 1147019, 1147009, 1147023, 1135805, 1158959, 1151795,\n", - " 1153574, 1154990, 1148463, 1147653, 1147654, 1147656, 1149412, 1151718,\n", - " 1148288, 1151412, 1154420, 1148180, 1146676, 1146686, 1146684, 1138867,\n", - " 1148724, 1148729, 1145859, 1150057, 1148204, 1154203, 1153124, 1153125,\n", - " 1153192, 1145104, 1159828, 1159837, 1152877, 1143092, 1150356, 1155088,\n", - " 1146231, 1143134, 1151811, 1151821, 1151906, 1150708, 1150715, 1148498,\n", - " 1146565, 1141420, 1146969, 1146967, 1156402, 1146623, 1151691, 1144476,\n", - " 1135688, 1152407, 1150794, 1152098, 1156325, 1156334, 1150094, 1137746,\n", - " 1152622, 1140521, 1151962, 1151967, 1152826, 1155337, 1155334, 1154123,\n", - " 1152673, 1151618, 1151617, 1150578, 1150588, 1136134, 1136788, 1148916,\n", - " 1152958, 1153387, 1145952, 1152903, 1151311, 1143988, 1152341, 1146816,\n", - " 1156816, 1153308, 1145577, 1138281, 1152288, 1156005, 1136028, 1158704,\n", - " 1156619, 1151195, 1140674, 1140684, 1152928, 1163941, 1152888, 1156422,\n", - " 1137396, 1150159, 1148040, 1149300, 1152601, 1152597, 1157619, 1145656,\n", - " 1144659, 1148628, 1158530, 1137458, 1154564, 1148242, 1157514, 1147646,\n", - " 1142047, 1135434, 1148894, 1157064, 1157069, 1153885, 1155422, 1145191,\n", - " 1143502, 1135231, 1156638, 1151788, 1150828, 1135634, 1147810, 1151469,\n", - " 1139525, 1139530, 1158308, 1158311, 1151271, 1155441, 1150132, 1150136,\n", - " 1154529, 1154528, 1145610, 1142755, 1157637, 1151379, 1140186, 1156649,\n", - " 1149321, 1155748, 1155758, 1156463, 1168230, 1168239, 1154755, 1155626,\n", - " 1155628, 1155631, 1156563, 1154555, 1155582, 1161429, 1158824, 1158330,\n", - " 1157001, 1155646, 1153368, 1160956, 1143263, 1154648, 1146937, 1154240,\n", - " 1137347, 1154909, 1143189, 1157439, 1147918, 1141627, 1150987, 1157928,\n", - " 1157934, 1157653, 1157650, 1158126, 1156764, 1159116, 1145694, 1135601,\n", - " 1150661, 1150671, 1155848, 1158665, 1138215, 1157684, 1149145, 1156081,\n", - " 1155717, 1155433, 1155434, 1167311, 1167618, 1140380, 1157733, 1144843,\n", - " 1144844, 1155971, 1155975, 1135184, 1158840, 1158846, 1183168, 1156815,\n", - " 1163238, 1153503, 1136896, 1158760, 1158764, 1158881, 1140221, 1158815,\n", - " 1158804, 1158447, 1136480, 1136494, 1136491, 1164942, 1152136, 1153808,\n", - " 1156277, 1136640, 1140049, 1157861, 1156516, 1165778, 1138110, 1154350,\n", - " 1158003, 1158006, 1150011, 1169890, 1164274, 1164276, 1150674, 1167359,\n", - " 1162683, 1159356, 1159070, 1159061, 1157939, 1157946, 1153052, 1153045,\n", - " 1171551, 1155763, 1156370, 1144158, 1166256, 1156107, 1138393, 1150046,\n", - " 1159475, 1149070, 1145945, 1155476, 1155479, 1154294, 1153514, 1147300,\n", - " 1142405, 1158680, 1146876, 1161658, 1157607, 1138161, 1164006, 1156787,\n", - " 1149956, 1149963, 1164909, 1163396, 1163379, 1154590, 1165772, 1157236,\n", - " 1148769, 1157351, 1146063, 1158449, 1165299, 1169502, 1164990, 1144506,\n", - " 1141800, 1158643, 1159025, 1159029, 1159032, 1165602, 1152247, 1171154,\n", - " 1164116, 1155588, 1148571, 1144977, 1146500, 1161240, 1144739, 1141470,\n", - " 1141471, 1157044, 1156739, 1157955, 1153663, 1167373, 1150648, 1150649,\n", - " 1171040, 1168748, 1144812, 1162085, 1135567, 1156300, 1144051, 1145176,\n", - " 1145229, 1169282, 1188489, 1155324, 1147673, 1170670, 1144971, 1143037,\n", - " 1147693, 1145447, 1165746, 1170945, 1145889, 1168659, 1169548, 1143395,\n", - " 1143404, 1171867, 1158722, 1154076, 1170738, 1144690, 1145674, 1150773,\n", - " 1165737, 1145502, 1151587, 1167817, 1169298, 1155172, 1150522, 1150518,\n", - " 1145531, 1144336, 1157534, 1154670, 1135854, 1190647, 1169162, 1157331,\n", - " 1157342, 1141043, 1151668, 1151674, 1169359, 1149452, 1171529, 1158611,\n", - " 1158623, 1158062, 1173047, 1149847, 1172642, 1165903, 1154869, 1155493,\n", - " 1152353, 1152546, 1148324, 1147509, 1173307, 1180710, 1169144, 1154027,\n", - " 1159651, 1159658, 1171145, 1178422, 1157158, 1157153, 1157373, 1147711,\n", - " 1151850, 1148131, 1169913, 1145790, 1147925, 1149247, 1169037, 1168800,\n", - " 1166751, 1168604, 1170020, 1164362, 1144545, 1178056, 1171823, 1160314,\n", - " 1150234, 1154151, 1154148, 1178889, 1149169, 1171921, 1143279, 1180389,\n", - " 1168481, 1171305, 1169620, 1153803, 1189183, 1153625, 1172309, 1183123,\n", - " 1171396, 1151519, 1155262, 1157792, 1157795, 1182808, 1171623, 1164034,\n", - " 1163219, 1157128, 1157992, 1172148, 1187251, 1158253, 1153898, 1145626,\n", - " 1178776, 1157483, 1149755, 1153609, 1158512, 1158940, 1155890, 1179923,\n", - " 1182786, 1182797, 1180679, 1171634, 1162253, 1188939, 1185411, 1168876,\n", - " 1163422, 1161819, 1156162, 1190612, 1168936, 1156539, 1139831, 1150265,\n", - " 1154812, 1188613, 1187899, 1183900, 1156055, 1151978, 1181888, 1146392,\n", - " 1146394, 1146395, 1173058, 1149544, 1193369, 1191693, 1190835, 1167439,\n", - " 1169964, 1140995, 1193709, 1186488, 1171668, 1189486, 1171240, 1189403,\n", - " 1162502, 1169703, 1175349, 1172429, 1180786, 1176829, 1152080, 1155962,\n", - " 1179769, 1172896, 1167467, 1182852, 1157022, 1161940], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197892, 1198244, 1200099, 1199282, 1202255, 1198844, 1201582, 1201462,\n", - " 1202119, 1200644, 1197777, 1201016, 1195938, 1196956, 1196876, 1196684,\n", - " 1194783, 1196624, 1196631, 1194649, 1195259, 1195263, 1196543, 1201992,\n", - " 1196031, 1198306, 1194882, 1195888, 1202902, 1199171, 1195740, 1196977,\n", - " 1196979, 1196517, 1195325, 1196835, 1196837, 1196845, 1196165, 1196704,\n", - " 1196711, 1196717, 1195265, 1195270, 1197141, 1197374, 1197265, 1195841,\n", - " 1195659, 1198203, 1197474, 1195778, 1199711, 1196283, 1195353, 1198282,\n", - " 1200949, 1199856, 1194928, 1199628, 1199800, 1200076, 1200872, 1200878,\n", - " 1199154, 1199038, 1198400, 1199223, 1199231, 1194786, 1200491, 1199021,\n", - " 1197977, 1197601, 1196727, 1195771, 1195773, 1198428, 1199410, 1200452,\n", - " 1200570, 1201421, 1200991, 1200918, 1194805, 1199546, 1199532, 1196889,\n", - " 1199908, 1196781, 1202239, 1199482, 1200899, 1195886, 1198478, 1201871,\n", - " 1202209, 1196960, 1196963, 1196966, 1200784, 1199606, 1195679, 1195664,\n", - " 1198929, 1198932, 1198908, 1195181, 1197821, 1196601, 1201970, 1200590,\n", - " 1199659, 1196380, 1194730, 1198824, 1197735, 1198819, 1201001, 1197593,\n", - " 1200974, 1195070, 1198131, 1195308, 1195165, 1202077, 1200211, 1197872],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197892, 1198244, 1200099, 1199282, 1202255, 1198844, 1201582, 1201462,\n", - " 1202119, 1200644, 1197777, 1201016, 1195938, 1196956, 1196876, 1196684,\n", - " 1194783, 1196624, 1196631, 1194649, 1195259, 1195263, 1196543, 1201992,\n", - " 1196031, 1198306, 1194882, 1195888, 1202902, 1199171, 1195740, 1196977,\n", - " 1196979, 1196517, 1195325, 1196835, 1196837, 1196845, 1196165, 1196704,\n", - " 1196711, 1196717, 1195265, 1195270, 1197141, 1197374, 1197265, 1195841,\n", - " 1195659, 1198203, 1197474, 1195778, 1199711, 1196283, 1195353, 1198282,\n", - " 1200949, 1199856, 1194928, 1199628, 1199800, 1200076, 1200872, 1200878,\n", - " 1199154, 1199038, 1198400, 1199223, 1199231, 1194786, 1200491, 1199021,\n", - " 1197977, 1197601, 1196727, 1195771, 1195773, 1198428, 1199410, 1200452,\n", - " 1200570, 1201421, 1200991, 1200918, 1194805, 1199546, 1199532, 1196889,\n", - " 1199908, 1196781, 1202239, 1199482, 1200899, 1195886, 1198478, 1201871,\n", - " 1202209, 1196960, 1196963, 1196966, 1200784, 1199606, 1195679, 1195664,\n", - " 1198929, 1198932, 1198908, 1195181, 1197821, 1196601, 1201970, 1200590,\n", - " 1199659, 1196380, 1194730, 1198824, 1197735, 1198819, 1201001, 1197593,\n", - " 1200974, 1195070, 1198131, 1195308, 1195165, 1202077, 1200211, 1197872],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.1681e-01, -4.8509e-04, 6.2136e-01, ..., 1.1056e-01,\n", - " -2.0883e-03, -4.5252e-03],\n", - " [ 2.7257e-01, -7.3645e-04, 9.7863e-01, ..., 9.8599e-02,\n", - " -1.9107e-03, -6.6536e-03],\n", - " [ 1.2532e-01, 3.0713e-02, 6.0704e-01, ..., 1.2188e-01,\n", - " -1.3942e-03, -4.0919e-03],\n", - " ...,\n", - " [ 1.1928e-01, -4.0217e-04, 6.1111e-01, ..., 1.2229e-01,\n", - " -1.7452e-03, -4.0178e-03],\n", - " [ 1.5211e-01, -1.3505e-04, 6.7304e-01, ..., 8.7017e-02,\n", - " -1.4714e-03, -4.6474e-03],\n", - " [ 2.4862e-01, -5.1969e-04, 9.3666e-01, ..., 9.7849e-02,\n", - " -1.9623e-03, -6.1983e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 0.8102, 2.4864, 3.2845, ..., 1.7631, -0.0465, 2.2696],\n", - " [ 1.5459, 1.6995, 0.7094, ..., -0.0148, -0.0255, 1.1819],\n", - " [ 0.7869, 1.2724, 1.1350, ..., -0.0060, -0.0221, 0.4782],\n", - " ...,\n", - " [ 0.6351, 2.3186, 1.1973, ..., -0.0117, -0.0238, 0.5839],\n", - " [-0.0135, 1.1285, 3.6696, ..., -0.0143, -0.0341, -0.0302],\n", - " [ 1.0361, 2.9083, 3.1262, ..., 3.4773, -0.0590, 4.1369]],\n", - " device='cuda:0', grad_fn=), 'author': tensor([[-1.2570e-03, 2.6259e-01, 2.2438e-01, ..., 1.6687e+00,\n", - " 1.6221e-01, -4.7799e-04],\n", - " [-4.8729e-03, 4.3481e-01, 2.2977e-01, ..., 1.4327e+00,\n", - " -3.9128e-03, -5.9554e-03],\n", - " [-1.0177e-03, 1.1851e-01, 3.3779e-01, ..., 1.5529e+00,\n", - " 1.8635e-01, -8.0478e-06],\n", - " ...,\n", - " [-3.1979e-03, 3.9368e-01, 2.3355e-01, ..., 1.5891e+00,\n", - " -2.0205e-03, -3.1769e-03],\n", - " [-1.5893e-03, 3.2060e-01, 1.9796e-01, ..., 1.5331e+00,\n", - " 1.0247e-02, -1.2054e-03],\n", - " [-1.1795e-03, 3.1254e-01, 2.0595e-01, ..., 1.6902e+00,\n", - " 1.5751e-01, -4.3219e-05]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-3.0203e-04, 5.6479e-01, 2.2431e-01, ..., -6.6200e-03,\n", - " 2.3906e-01, 2.8070e-01],\n", - " [-8.8527e-05, 6.2938e-01, 2.6831e-01, ..., -8.4883e-03,\n", - " 3.3506e-01, 3.6997e-01],\n", - " [ 9.5086e-02, 8.7679e-01, 5.0511e-01, ..., -1.0361e-02,\n", - " 5.3097e-01, 2.6728e-01],\n", - " ...,\n", - " [-2.8959e-04, 6.5871e-01, 2.7076e-01, ..., -8.6918e-03,\n", - " 3.1954e-01, 3.3966e-01],\n", - " [ 1.2185e-01, 7.4154e-01, 3.6021e-01, ..., -7.6602e-03,\n", - " 3.5518e-01, 2.1501e-01],\n", - " [ 2.5748e-01, 8.3326e-01, 4.6637e-01, ..., -8.2312e-03,\n", - " 3.7190e-01, 3.5244e-02]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 111, 111, 21, 186, 185, 173, 227, 1, 185, 4, 4, 187,\n", - " 187, 215, 147, 272, 420, 465, 465, 794, 994, 1248, 1198, 1258,\n", - " 977, 977, 817, 1304, 1304, 1090, 1527, 1621, 1319, 1464, 1584, 1598,\n", - " 1598, 1540, 1683, 1912, 1912, 1816, 1816, 1816, 1816, 1934, 1976, 1997,\n", - " 1997, 1997, 2374, 2370, 2370, 2358, 2358, 2358, 2332, 2522, 2467, 2476,\n", - " 2494, 2374, 2374, 2581, 2632, 2520, 2697, 2697, 2494, 2627, 2643, 2643,\n", - " 2735, 2752, 2771, 2738, 2770, 2770, 2820, 2820, 3140, 3309, 3393, 3393,\n", - " 3760, 3503, 3760, 3760, 3760, 3510, 3491, 3528, 3528, 3674, 3847, 3681,\n", - " 3681, 4042, 3683, 3683, 4003, 3785, 3864, 3954, 3800, 4180, 4300, 4311,\n", - " 4139, 4360, 4385, 4385, 4539, 4525, 4950, 4950, 4795, 4795, 4955, 5149,\n", - " 5191, 5191, 5216, 5149, 5149, 5149, 5149, 5149, 5119, 5253, 5315, 5372,\n", - " 5372, 5460, 5410, 5430, 5450, 5437, 5539, 5470, 5593, 5645, 5781, 5874,\n", - " 5721, 5721, 5721, 6210, 5852, 5984, 5702, 5743, 5943, 5943, 5954, 6133,\n", - " 6133, 6258, 5939, 5975, 6271, 6367, 6367, 6433, 6071, 6071, 6189, 6465,\n", - " 6280, 6354, 6498, 6424, 6396, 6360, 6561, 6561, 6551],\n", - " [ 47, 59, 69, 37, 91, 7, 6, 78, 45, 105, 63, 55,\n", - " 30, 72, 90, 48, 101, 110, 27, 76, 4, 57, 59, 90,\n", - " 70, 14, 24, 15, 23, 115, 6, 123, 123, 125, 16, 17,\n", - " 28, 36, 60, 34, 71, 109, 120, 122, 126, 6, 67, 52,\n", - " 56, 29, 5, 121, 17, 80, 89, 51, 53, 61, 87, 88,\n", - " 60, 93, 27, 59, 22, 127, 126, 10, 125, 60, 104, 81,\n", - " 67, 90, 18, 67, 27, 85, 42, 2, 67, 118, 69, 14,\n", - " 74, 44, 46, 25, 68, 108, 35, 31, 77, 3, 65, 84,\n", - " 9, 62, 90, 123, 49, 117, 90, 96, 41, 39, 30, 4,\n", - " 111, 113, 81, 104, 69, 8, 97, 1, 107, 82, 21, 54,\n", - " 38, 33, 52, 98, 106, 92, 99, 100, 124, 27, 27, 83,\n", - " 50, 23, 90, 32, 64, 60, 36, 94, 13, 112, 20, 73,\n", - " 11, 88, 116, 0, 69, 83, 114, 105, 119, 115, 12, 79,\n", - " 19, 40, 59, 58, 86, 26, 74, 103, 66, 30, 23, 76,\n", - " 11, 75, 43, 95, 100, 80, 6, 102, 59]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2307, 1439, 1772, ..., 3226, 5113, 2165],\n", - " [ 47, 48, 98, ..., 6361, 6374, 6374]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 5, 17, 18, ..., 103, 3, 17],\n", - " [ 176, 221, 256, ..., 6624, 6578, 6622]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 193, 193, 32, ..., 6277, 6277, 6277],\n", - " [ 128, 248, 809, ..., 545, 431, 675]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 430, 300, 365, ..., 202, 224, 564],\n", - " [ 4, 92, 272, ..., 6371, 6447, 6446]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1901, 5577, 2776, ..., 1709, 3678, 6267],\n", - " [ 79, 209, 132, ..., 6552, 6636, 6609]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 32, 12, 62, ..., 6277, 6277, 6277],\n", - " [3065, 1081, 5054, ..., 6291, 6254, 6337]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 143, 143, 143, ..., 6350, 6350, 6350],\n", - " [1021, 2188, 1451, ..., 5520, 5372, 5343]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.007839\n", - "sampling 0.007583\n", - "noi time: 0.001791\n", - "get_vertex_data call: 0.035004\n", - "noi group time: 0.003232\n", - "eoi_group_time: 0.016077\n", - "second half: 0.224652\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31145, 24187, 32616, ..., 1100728, 1119043, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31145, 24187, 32616, ..., 1100728, 1119043, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210831, 1212194, 1209115, ..., 1939389, 1937149, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210831, 1212194, 1209115, ..., 1939389, 1937149, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1140282, 1136349, 1141758, 1136223, 1136971, 1149834, 1139808,\n", - " 1145370, 1146982, 1139143, 1143360, 1143372, 1143363, 1146640, 1139615,\n", - " 1140772, 1139866, 1155689, 1147473, 1147476, 1147483, 1144636, 1148512,\n", - " 1146992, 1134701, 1135947, 1146661, 1138344, 1148546, 1153217, 1153220,\n", - " 1136742, 1155018, 1139364, 1147202, 1136683, 1150329, 1134715, 1146376,\n", - " 1137829, 1140540, 1140542, 1138112, 1138119, 1138356, 1135367, 1135202,\n", - " 1135210, 1134970, 1134960, 1141036, 1134794, 1136518, 1143377, 1138504,\n", - " 1137342, 1136610, 1144395, 1136662, 1137441, 1143321, 1136199, 1156146,\n", - " 1156159, 1139161, 1142607, 1135238, 1156339, 1158136, 1154141, 1137019,\n", - " 1156899, 1135535, 1138440, 1138445, 1160590, 1136594, 1135122, 1156603,\n", - " 1156606, 1147112, 1142611, 1142615, 1142616, 1135359, 1148531, 1139667,\n", - " 1138069, 1136087, 1136089, 1134992, 1158961, 1158974, 1160088, 1140034,\n", - " 1152696, 1139933, 1137598, 1138648, 1141963, 1152042, 1152044, 1140670,\n", - " 1137734, 1137728, 1147322, 1135549, 1137895, 1141088, 1141097, 1141100,\n", - " 1149001, 1139889, 1143767, 1137299, 1143225, 1137679, 1139039, 1140003,\n", - " 1146834, 1152713, 1141695, 1135860, 1154466, 1141224, 1136917, 1139730,\n", - " 1140598, 1141785, 1141300, 1147853, 1137074, 1149434, 1144428, 1141821,\n", - " 1165098, 1140160, 1140163, 1158600, 1144596, 1144598, 1136866, 1136864,\n", - " 1141578, 1135327, 1144179, 1137614, 1150906, 1138539, 1140501, 1137854,\n", - " 1147153, 1141365, 1153068, 1153069, 1163667, 1141664, 1149090, 1139019,\n", - " 1139510, 1140093, 1139127, 1144992, 1145001, 1143791, 1140984, 1145873,\n", - " 1143543, 1152976, 1139453, 1141925, 1146901, 1144242, 1150692, 1148313,\n", - " 1145980, 1143851, 1136277, 1146016, 1146024, 1146140, 1154323, 1154328,\n", - " 1141585, 1149928, 1139990, 1143293, 1143876, 1147543, 1147545, 1147540,\n", - " 1148763, 1147282, 1142825, 1142816, 1138669, 1149155, 1140346, 1157720,\n", - " 1136836, 1136843, 1139329, 1139328, 1144778, 1141490, 1142149, 1143345,\n", - " 1144765, 1144766, 1135876, 1150760, 1135819, 1146523, 1138024, 1143456,\n", - " 1143471, 1143457, 1137696, 1143937, 1147574, 1149073, 1147521, 1140360,\n", - " 1140364, 1137990, 1143075, 1147999, 1146949, 1146950, 1134902, 1134907,\n", - " 1139252, 1147131, 1148704, 1141836, 1153701, 1153708, 1152328, 1147025,\n", - " 1158226, 1145240, 1145750, 1145751, 1138638, 1148391, 1146189, 1146180,\n", - " 1148223, 1150445, 1149250, 1156473, 1141349, 1152013, 1165252, 1147807,\n", - " 1152031, 1154267, 1145255, 1145262, 1135516, 1146723, 1147019, 1141194,\n", - " 1141278, 1151795, 1143564, 1148300, 1135079, 1154420, 1146676, 1138404,\n", - " 1148720, 1144110, 1149810, 1154203, 1153124, 1153192, 1145106, 1150932,\n", - " 1152877, 1150356, 1151821, 1145640, 1148498, 1148505, 1149733, 1149737,\n", - " 1141419, 1136002, 1147737, 1149378, 1146975, 1153255, 1146623, 1146490,\n", - " 1135688, 1154056, 1153038, 1150085, 1137746, 1152622, 1155140, 1152826,\n", - " 1155337, 1151617, 1150588, 1136131, 1151440, 1152944, 1140457, 1145952,\n", - " 1146816, 1153303, 1138279, 1152294, 1156004, 1136028, 1158710, 1156621,\n", - " 1152928, 1151064, 1153918, 1150164, 1148040, 1145652, 1137048, 1148628,\n", - " 1158530, 1158540, 1137458, 1149946, 1154569, 1157510, 1135434, 1154928,\n", - " 1156505, 1157064, 1157069, 1145187, 1150465, 1138830, 1151788, 1165703,\n", - " 1152737, 1147810, 1143010, 1158308, 1155441, 1153359, 1162120, 1144361,\n", - " 1154530, 1157642, 1155375, 1140179, 1149321, 1146920, 1156463, 1155628,\n", - " 1156563, 1154555, 1158824, 1158828, 1153715, 1154033, 1156994, 1148835,\n", - " 1155635, 1153368, 1154240, 1143189, 1157439, 1155613, 1141627, 1155281,\n", - " 1151035, 1137167, 1137152, 1158126, 1156761, 1137323, 1134677, 1134674,\n", - " 1135605, 1148159, 1150671, 1155848, 1157685, 1157684, 1149145, 1161108,\n", - " 1156081, 1152209, 1152498, 1140380, 1156023, 1155884, 1157732, 1155971,\n", - " 1155975, 1135190, 1156812, 1154592, 1136896, 1158760, 1158764, 1158815,\n", - " 1152463, 1136480, 1153808, 1136646, 1134757, 1145484, 1140049, 1166424,\n", - " 1158558, 1151146, 1163813, 1155871, 1158003, 1158013, 1158006, 1144584,\n", - " 1150011, 1155521, 1142666, 1164159, 1157747, 1156045, 1162056, 1172279,\n", - " 1157946, 1153052, 1153045, 1155763, 1155770, 1167707, 1153842, 1156107,\n", - " 1138393, 1162922, 1150046, 1149063, 1145948, 1155479, 1153514, 1153519,\n", - " 1157600, 1138161, 1139286, 1139290, 1148769, 1148771, 1171509, 1146063,\n", - " 1146356, 1171255, 1140643, 1148600, 1148603, 1143143, 1166809, 1156191,\n", - " 1156189, 1159025, 1159032, 1161836, 1152247, 1160605, 1155588, 1162552,\n", - " 1144977, 1146509, 1144747, 1163522, 1155268, 1153212, 1153201, 1141471,\n", - " 1141459, 1151650, 1184820, 1157042, 1156737, 1156739, 1150317, 1144810,\n", - " 1144812, 1135567, 1165715, 1164741, 1164750, 1156300, 1163785, 1145228,\n", - " 1166462, 1147673, 1170316, 1142136, 1143038, 1147355, 1145892, 1145902,\n", - " 1153520, 1168659, 1151752, 1169538, 1143402, 1149565, 1154076, 1177934,\n", - " 1145673, 1169602, 1167817, 1171979, 1144681, 1145326, 1155172, 1165011,\n", - " 1156119, 1144346, 1144336, 1157534, 1138383, 1147746, 1154670, 1169162,\n", - " 1157331, 1138129, 1141043, 1180443, 1169359, 1173228, 1158623, 1173047,\n", - " 1149847, 1147423, 1169937, 1172488, 1170459, 1152353, 1152354, 1152360,\n", - " 1161130, 1172838, 1177984, 1173307, 1154027, 1152150, 1152151, 1171151,\n", - " 1167857, 1178099, 1151210, 1157153, 1168126, 1147711, 1151850, 1148141,\n", - " 1177415, 1155739, 1170321, 1140326, 1192652, 1172939, 1175742, 1166535,\n", - " 1154148, 1167517, 1180389, 1143420, 1178344, 1180552, 1171297, 1170178,\n", - " 1181245, 1153803, 1178171, 1164818, 1163099, 1153628, 1153621, 1179807,\n", - " 1180199, 1161255, 1162129, 1155262, 1177576, 1160199, 1157792, 1157795,\n", - " 1177584, 1151488, 1171623, 1157134, 1157128, 1164065, 1158253, 1153898,\n", - " 1191749, 1145626, 1163538, 1157483, 1157487, 1149755, 1152287, 1157761,\n", - " 1155990, 1187946, 1185327, 1158512, 1158517, 1158940, 1155890, 1155892,\n", - " 1177090, 1182908, 1146161, 1170034, 1139828, 1139831, 1139837, 1170435,\n", - " 1149668, 1149619, 1156055, 1173019, 1146394, 1146395, 1173058, 1186650,\n", - " 1194202, 1194319, 1162156, 1170881, 1186486, 1151774, 1181695, 1152113,\n", - " 1171201, 1191061, 1179317, 1172423, 1172429, 1158064, 1181628, 1166788,\n", - " 1180538, 1155958, 1190708, 1179769, 1190060, 1167471, 1182863, 1192018,\n", - " 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1140282, 1136349, 1141758, 1136223, 1136971, 1149834, 1139808,\n", - " 1145370, 1146982, 1139143, 1143360, 1143372, 1143363, 1146640, 1139615,\n", - " 1140772, 1139866, 1155689, 1147473, 1147476, 1147483, 1144636, 1148512,\n", - " 1146992, 1134701, 1135947, 1146661, 1138344, 1148546, 1153217, 1153220,\n", - " 1136742, 1155018, 1139364, 1147202, 1136683, 1150329, 1134715, 1146376,\n", - " 1137829, 1140540, 1140542, 1138112, 1138119, 1138356, 1135367, 1135202,\n", - " 1135210, 1134970, 1134960, 1141036, 1134794, 1136518, 1143377, 1138504,\n", - " 1137342, 1136610, 1144395, 1136662, 1137441, 1143321, 1136199, 1156146,\n", - " 1156159, 1139161, 1142607, 1135238, 1156339, 1158136, 1154141, 1137019,\n", - " 1156899, 1135535, 1138440, 1138445, 1160590, 1136594, 1135122, 1156603,\n", - " 1156606, 1147112, 1142611, 1142615, 1142616, 1135359, 1148531, 1139667,\n", - " 1138069, 1136087, 1136089, 1134992, 1158961, 1158974, 1160088, 1140034,\n", - " 1152696, 1139933, 1137598, 1138648, 1141963, 1152042, 1152044, 1140670,\n", - " 1137734, 1137728, 1147322, 1135549, 1137895, 1141088, 1141097, 1141100,\n", - " 1149001, 1139889, 1143767, 1137299, 1143225, 1137679, 1139039, 1140003,\n", - " 1146834, 1152713, 1141695, 1135860, 1154466, 1141224, 1136917, 1139730,\n", - " 1140598, 1141785, 1141300, 1147853, 1137074, 1149434, 1144428, 1141821,\n", - " 1165098, 1140160, 1140163, 1158600, 1144596, 1144598, 1136866, 1136864,\n", - " 1141578, 1135327, 1144179, 1137614, 1150906, 1138539, 1140501, 1137854,\n", - " 1147153, 1141365, 1153068, 1153069, 1163667, 1141664, 1149090, 1139019,\n", - " 1139510, 1140093, 1139127, 1144992, 1145001, 1143791, 1140984, 1145873,\n", - " 1143543, 1152976, 1139453, 1141925, 1146901, 1144242, 1150692, 1148313,\n", - " 1145980, 1143851, 1136277, 1146016, 1146024, 1146140, 1154323, 1154328,\n", - " 1141585, 1149928, 1139990, 1143293, 1143876, 1147543, 1147545, 1147540,\n", - " 1148763, 1147282, 1142825, 1142816, 1138669, 1149155, 1140346, 1157720,\n", - " 1136836, 1136843, 1139329, 1139328, 1144778, 1141490, 1142149, 1143345,\n", - " 1144765, 1144766, 1135876, 1150760, 1135819, 1146523, 1138024, 1143456,\n", - " 1143471, 1143457, 1137696, 1143937, 1147574, 1149073, 1147521, 1140360,\n", - " 1140364, 1137990, 1143075, 1147999, 1146949, 1146950, 1134902, 1134907,\n", - " 1139252, 1147131, 1148704, 1141836, 1153701, 1153708, 1152328, 1147025,\n", - " 1158226, 1145240, 1145750, 1145751, 1138638, 1148391, 1146189, 1146180,\n", - " 1148223, 1150445, 1149250, 1156473, 1141349, 1152013, 1165252, 1147807,\n", - " 1152031, 1154267, 1145255, 1145262, 1135516, 1146723, 1147019, 1141194,\n", - " 1141278, 1151795, 1143564, 1148300, 1135079, 1154420, 1146676, 1138404,\n", - " 1148720, 1144110, 1149810, 1154203, 1153124, 1153192, 1145106, 1150932,\n", - " 1152877, 1150356, 1151821, 1145640, 1148498, 1148505, 1149733, 1149737,\n", - " 1141419, 1136002, 1147737, 1149378, 1146975, 1153255, 1146623, 1146490,\n", - " 1135688, 1154056, 1153038, 1150085, 1137746, 1152622, 1155140, 1152826,\n", - " 1155337, 1151617, 1150588, 1136131, 1151440, 1152944, 1140457, 1145952,\n", - " 1146816, 1153303, 1138279, 1152294, 1156004, 1136028, 1158710, 1156621,\n", - " 1152928, 1151064, 1153918, 1150164, 1148040, 1145652, 1137048, 1148628,\n", - " 1158530, 1158540, 1137458, 1149946, 1154569, 1157510, 1135434, 1154928,\n", - " 1156505, 1157064, 1157069, 1145187, 1150465, 1138830, 1151788, 1165703,\n", - " 1152737, 1147810, 1143010, 1158308, 1155441, 1153359, 1162120, 1144361,\n", - " 1154530, 1157642, 1155375, 1140179, 1149321, 1146920, 1156463, 1155628,\n", - " 1156563, 1154555, 1158824, 1158828, 1153715, 1154033, 1156994, 1148835,\n", - " 1155635, 1153368, 1154240, 1143189, 1157439, 1155613, 1141627, 1155281,\n", - " 1151035, 1137167, 1137152, 1158126, 1156761, 1137323, 1134677, 1134674,\n", - " 1135605, 1148159, 1150671, 1155848, 1157685, 1157684, 1149145, 1161108,\n", - " 1156081, 1152209, 1152498, 1140380, 1156023, 1155884, 1157732, 1155971,\n", - " 1155975, 1135190, 1156812, 1154592, 1136896, 1158760, 1158764, 1158815,\n", - " 1152463, 1136480, 1153808, 1136646, 1134757, 1145484, 1140049, 1166424,\n", - " 1158558, 1151146, 1163813, 1155871, 1158003, 1158013, 1158006, 1144584,\n", - " 1150011, 1155521, 1142666, 1164159, 1157747, 1156045, 1162056, 1172279,\n", - " 1157946, 1153052, 1153045, 1155763, 1155770, 1167707, 1153842, 1156107,\n", - " 1138393, 1162922, 1150046, 1149063, 1145948, 1155479, 1153514, 1153519,\n", - " 1157600, 1138161, 1139286, 1139290, 1148769, 1148771, 1171509, 1146063,\n", - " 1146356, 1171255, 1140643, 1148600, 1148603, 1143143, 1166809, 1156191,\n", - " 1156189, 1159025, 1159032, 1161836, 1152247, 1160605, 1155588, 1162552,\n", - " 1144977, 1146509, 1144747, 1163522, 1155268, 1153212, 1153201, 1141471,\n", - " 1141459, 1151650, 1184820, 1157042, 1156737, 1156739, 1150317, 1144810,\n", - " 1144812, 1135567, 1165715, 1164741, 1164750, 1156300, 1163785, 1145228,\n", - " 1166462, 1147673, 1170316, 1142136, 1143038, 1147355, 1145892, 1145902,\n", - " 1153520, 1168659, 1151752, 1169538, 1143402, 1149565, 1154076, 1177934,\n", - " 1145673, 1169602, 1167817, 1171979, 1144681, 1145326, 1155172, 1165011,\n", - " 1156119, 1144346, 1144336, 1157534, 1138383, 1147746, 1154670, 1169162,\n", - " 1157331, 1138129, 1141043, 1180443, 1169359, 1173228, 1158623, 1173047,\n", - " 1149847, 1147423, 1169937, 1172488, 1170459, 1152353, 1152354, 1152360,\n", - " 1161130, 1172838, 1177984, 1173307, 1154027, 1152150, 1152151, 1171151,\n", - " 1167857, 1178099, 1151210, 1157153, 1168126, 1147711, 1151850, 1148141,\n", - " 1177415, 1155739, 1170321, 1140326, 1192652, 1172939, 1175742, 1166535,\n", - " 1154148, 1167517, 1180389, 1143420, 1178344, 1180552, 1171297, 1170178,\n", - " 1181245, 1153803, 1178171, 1164818, 1163099, 1153628, 1153621, 1179807,\n", - " 1180199, 1161255, 1162129, 1155262, 1177576, 1160199, 1157792, 1157795,\n", - " 1177584, 1151488, 1171623, 1157134, 1157128, 1164065, 1158253, 1153898,\n", - " 1191749, 1145626, 1163538, 1157483, 1157487, 1149755, 1152287, 1157761,\n", - " 1155990, 1187946, 1185327, 1158512, 1158517, 1158940, 1155890, 1155892,\n", - " 1177090, 1182908, 1146161, 1170034, 1139828, 1139831, 1139837, 1170435,\n", - " 1149668, 1149619, 1156055, 1173019, 1146394, 1146395, 1173058, 1186650,\n", - " 1194202, 1194319, 1162156, 1170881, 1186486, 1151774, 1181695, 1152113,\n", - " 1171201, 1191061, 1179317, 1172423, 1172429, 1158064, 1181628, 1166788,\n", - " 1180538, 1155958, 1190708, 1179769, 1190060, 1167471, 1182863, 1192018,\n", - " 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196011, 1196013, 1197178, 1199424, 1197744, 1195406, 1199736, 1197719,\n", - " 1195329, 1201094, 1199282, 1198832, 1198844, 1201577, 1201668, 1198697,\n", - " 1197301, 1198557, 1197512, 1194866, 1196685, 1194783, 1195494, 1196624,\n", - " 1196631, 1194649, 1195511, 1195263, 1197921, 1201992, 1198542, 1199519,\n", - " 1195895, 1199171, 1195740, 1197856, 1196977, 1196979, 1196521, 1194754,\n", - " 1195313, 1196840, 1198668, 1198036, 1195982, 1195145, 1195216, 1195265,\n", - " 1195270, 1195278, 1197136, 1196242, 1195245, 1197273, 1196109, 1194859,\n", - " 1195847, 1195026, 1195659, 1195541, 1197474, 1199344, 1195917, 1196283,\n", - " 1195351, 1199329, 1200949, 1200959, 1197124, 1199856, 1199060, 1198673,\n", - " 1194928, 1199628, 1200872, 1195017, 1196498, 1199021, 1197601, 1197609,\n", - " 1196727, 1195773, 1202618, 1200894, 1198428, 1199418, 1198811, 1201527,\n", - " 1201824, 1200450, 1199445, 1198791, 1201079, 1202635, 1201056, 1200913,\n", - " 1200918, 1194805, 1198488, 1199712, 1200553, 1199208, 1197097, 1202138,\n", - " 1200899, 1197546, 1200327, 1201566, 1195876, 1201291, 1201871, 1203329,\n", - " 1198562, 1196960, 1196963, 1196966, 1198338, 1200793, 1199606, 1199609,\n", - " 1195438, 1203113, 1195679, 1195664, 1196929, 1198932, 1196062, 1197822,\n", - " 1201143, 1198819, 1200974, 1195066, 1203077, 1197652, 1201960, 1196428],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196011, 1196013, 1197178, 1199424, 1197744, 1195406, 1199736, 1197719,\n", - " 1195329, 1201094, 1199282, 1198832, 1198844, 1201577, 1201668, 1198697,\n", - " 1197301, 1198557, 1197512, 1194866, 1196685, 1194783, 1195494, 1196624,\n", - " 1196631, 1194649, 1195511, 1195263, 1197921, 1201992, 1198542, 1199519,\n", - " 1195895, 1199171, 1195740, 1197856, 1196977, 1196979, 1196521, 1194754,\n", - " 1195313, 1196840, 1198668, 1198036, 1195982, 1195145, 1195216, 1195265,\n", - " 1195270, 1195278, 1197136, 1196242, 1195245, 1197273, 1196109, 1194859,\n", - " 1195847, 1195026, 1195659, 1195541, 1197474, 1199344, 1195917, 1196283,\n", - " 1195351, 1199329, 1200949, 1200959, 1197124, 1199856, 1199060, 1198673,\n", - " 1194928, 1199628, 1200872, 1195017, 1196498, 1199021, 1197601, 1197609,\n", - " 1196727, 1195773, 1202618, 1200894, 1198428, 1199418, 1198811, 1201527,\n", - " 1201824, 1200450, 1199445, 1198791, 1201079, 1202635, 1201056, 1200913,\n", - " 1200918, 1194805, 1198488, 1199712, 1200553, 1199208, 1197097, 1202138,\n", - " 1200899, 1197546, 1200327, 1201566, 1195876, 1201291, 1201871, 1203329,\n", - " 1198562, 1196960, 1196963, 1196966, 1198338, 1200793, 1199606, 1199609,\n", - " 1195438, 1203113, 1195679, 1195664, 1196929, 1198932, 1196062, 1197822,\n", - " 1201143, 1198819, 1200974, 1195066, 1203077, 1197652, 1201960, 1196428],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 2.9540e-01, -1.4920e-03, 1.1638e+00, ..., 7.7818e-02,\n", - " -1.3553e-03, -8.0530e-03],\n", - " [ 2.6681e-01, -7.6925e-04, 9.2925e-01, ..., 6.7754e-02,\n", - " -1.5585e-03, -6.5526e-03],\n", - " [ 2.3368e-01, -8.6910e-04, 8.4610e-01, ..., 7.0018e-02,\n", - " -1.6973e-03, -5.9908e-03],\n", - " ...,\n", - " [ 1.6239e-01, -3.2298e-04, 6.7106e-01, ..., 1.0001e-01,\n", - " -1.6367e-03, -4.6574e-03],\n", - " [ 6.3833e-02, -7.2017e-04, 5.8194e-01, ..., 1.0117e-01,\n", - " -1.2929e-03, -3.7967e-03],\n", - " [ 1.9266e-01, -4.1723e-04, 7.7628e-01, ..., 8.5587e-02,\n", - " -1.6128e-03, -5.3315e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[-7.5006e-03, 3.1146e-01, 2.0544e+00, ..., -1.0917e-02,\n", - " -3.0578e-02, -1.5080e-02],\n", - " [-4.2777e-04, 1.6505e+00, 1.4246e+00, ..., -8.4266e-03,\n", - " -2.4793e-02, -4.3883e-03],\n", - " [-8.2194e-03, 6.8385e-01, 2.1175e+00, ..., -2.8956e-03,\n", - " -2.9765e-02, -1.2824e-02],\n", - " ...,\n", - " [-1.0849e-02, 1.1656e-01, 2.3549e+00, ..., -7.2281e-03,\n", - " -3.2067e-02, -1.6427e-02],\n", - " [ 1.1451e+00, 3.3952e+00, 3.1653e+00, ..., 2.6979e+00,\n", - " -4.9155e-02, 3.5769e+00],\n", - " [ 3.9917e-01, 3.2204e+00, 2.7731e+00, ..., 3.9221e+00,\n", - " -5.6100e-02, 3.6001e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-2.0614e-03, 3.2970e-01, 7.5603e-02, ..., 1.3865e+00,\n", - " 1.9472e-02, -2.3843e-03],\n", - " [-1.2897e-03, 2.7309e-01, 1.9545e-01, ..., 1.4883e+00,\n", - " 1.1087e-01, -1.1598e-03],\n", - " [-4.0238e-03, 2.9549e-01, 2.4090e-01, ..., 1.3457e+00,\n", - " -2.0561e-03, -5.2124e-03],\n", - " ...,\n", - " [-6.1034e-04, 3.0292e-01, 1.5669e-01, ..., 1.4758e+00,\n", - " 3.1678e-01, 4.3052e-02],\n", - " [-1.5511e-03, 3.3288e-01, 1.4572e-01, ..., 1.4485e+00,\n", - " 1.1095e-01, -9.6725e-04],\n", - " [-1.4942e-03, 3.0816e-01, 1.5900e-01, ..., 1.4779e+00,\n", - " 1.3898e-01, -1.3427e-03]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-9.6097e-04, 6.3456e-01, 2.5581e-01, ..., -8.9169e-03,\n", - " 3.7899e-01, 4.5283e-01],\n", - " [ 2.0369e-01, 8.3817e-01, 5.5123e-01, ..., -1.1203e-02,\n", - " 5.2757e-01, 2.1057e-01],\n", - " [-4.0367e-04, 6.9124e-01, 4.2955e-01, ..., -8.4498e-03,\n", - " 1.8434e-01, 4.8497e-01],\n", - " ...,\n", - " [-9.5296e-04, 6.5686e-01, 3.1071e-01, ..., -8.1143e-03,\n", - " 2.0397e-01, 4.8656e-01],\n", - " [-7.5001e-04, 7.8674e-01, 4.1931e-01, ..., -7.5315e-03,\n", - " 2.5862e-01, 4.6759e-01],\n", - " [ 1.6203e-01, 8.0948e-01, 4.2182e-01, ..., -1.3330e-02,\n", - " 6.0568e-01, 2.3826e-01]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 65, 37, 104, 104, 104, 325, 214, 321, 377, 377, 377, 377,\n", - " 541, 541, 404, 404, 322, 883, 860, 627, 741, 843, 843, 796,\n", - " 826, 1030, 1030, 1077, 1077, 1015, 1015, 1099, 881, 838, 1088, 955,\n", - " 1088, 1088, 1088, 1195, 1247, 864, 1201, 1201, 983, 1325, 1358, 1433,\n", - " 1489, 1435, 1557, 1636, 1615, 1728, 2029, 1798, 2131, 1815, 1766, 2074,\n", - " 2136, 2337, 2319, 2407, 2266, 2510, 2529, 2421, 2537, 2583, 2622, 2675,\n", - " 2791, 2751, 2658, 3089, 3065, 3218, 3145, 3208, 3140, 3017, 3159, 3187,\n", - " 3187, 3306, 3448, 3272, 3272, 3272, 3272, 3430, 3598, 3609, 3600, 4177,\n", - " 3902, 3748, 3768, 4157, 4097, 4092, 4190, 3958, 3996, 4236, 4236, 4288,\n", - " 4333, 4399, 4305, 4378, 4379, 4419, 4519, 4565, 4528, 4579, 4724, 4768,\n", - " 4722, 4875, 4510, 4510, 4510, 4798, 5198, 5224, 5224, 4942, 4942, 5185,\n", - " 5298, 5006, 5408, 5030, 5041, 5220, 5431, 5328, 5415, 5274, 5274, 5569,\n", - " 5325, 5440, 5644, 5602, 5392, 5392, 5515, 5596, 5571, 5767, 5585, 5717,\n", - " 5828, 5685, 5970, 5983, 6180, 6180, 6228, 6228, 6228, 6296, 6296, 6016,\n", - " 6193, 6032, 6196, 6270, 6270, 6617, 6710, 6292, 6292, 6674, 6621, 6683,\n", - " 6683, 6683, 6601],\n", - " [ 10, 123, 103, 19, 122, 12, 70, 40, 128, 109, 29, 99,\n", - " 121, 68, 59, 50, 65, 8, 70, 76, 113, 66, 114, 69,\n", - " 72, 81, 16, 135, 95, 124, 33, 25, 86, 126, 87, 9,\n", - " 44, 38, 101, 71, 83, 122, 80, 108, 15, 120, 135, 119,\n", - " 56, 7, 27, 106, 36, 43, 86, 124, 115, 17, 109, 11,\n", - " 27, 73, 119, 27, 134, 48, 55, 123, 23, 84, 117, 5,\n", - " 78, 58, 39, 124, 131, 30, 1, 75, 75, 22, 2, 82,\n", - " 127, 133, 85, 96, 125, 115, 111, 81, 4, 129, 1, 107,\n", - " 52, 34, 124, 31, 131, 72, 129, 78, 30, 91, 32, 27,\n", - " 130, 27, 132, 75, 105, 27, 133, 42, 20, 14, 98, 102,\n", - " 85, 45, 57, 93, 21, 13, 5, 0, 113, 49, 3, 19,\n", - " 30, 62, 6, 77, 110, 61, 41, 39, 67, 112, 80, 116,\n", - " 30, 51, 64, 26, 46, 116, 89, 37, 24, 53, 17, 90,\n", - " 92, 118, 88, 60, 63, 94, 79, 54, 108, 70, 109, 97,\n", - " 35, 80, 69, 30, 74, 80, 45, 104, 95, 47, 12, 55,\n", - " 18, 28, 100]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1213, 1522, 1526, ..., 4665, 4150, 2748],\n", - " [ 138, 10, 233, ..., 5628, 5702, 5581]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 105, 129, 32, 58, 135, 135, 133, 135, 106, 83, 133, 75,\n", - " 58, 75, 83, 73, 105, 129, 73, 45, 32, 83, 105, 58,\n", - " 84, 105, 32, 80, 27, 73, 135, 108, 129, 115, 115, 84,\n", - " 115, 84, 58, 115, 58, 84, 133, 24, 83, 108, 83, 108,\n", - " 129, 24, 45, 108, 115, 73, 133, 32, 58, 24, 83, 135,\n", - " 75, 135, 115, 135, 58, 105, 133, 105, 115, 105, 27, 105,\n", - " 108, 45, 133, 83, 115, 27, 133, 32, 91, 105, 32, 27,\n", - " 133, 129, 45, 75, 58, 129, 106, 17, 108, 133, 135, 105,\n", - " 133, 84, 45, 108, 27, 84, 24, 115, 45, 105, 58, 84,\n", - " 106, 80, 32, 58, 84, 135, 135, 27, 73, 75, 73, 45,\n", - " 17, 75, 133, 24, 129, 108, 115, 73, 135, 91, 58, 115,\n", - " 27, 32, 91, 129, 115, 133, 27, 27, 80, 129, 84, 115,\n", - " 24, 32, 17, 24, 91, 91, 32, 105, 58, 84, 75, 115,\n", - " 91, 129, 27, 84, 84, 135, 24, 108, 115, 45, 27, 17,\n", - " 135, 73, 106, 27, 75, 32, 129, 108, 45, 24, 27, 24,\n", - " 73, 91, 17, 108, 135, 58, 27, 83, 45, 106, 133, 27,\n", - " 84, 58, 84, 32, 83, 24, 105, 27, 129, 129, 58, 58,\n", - " 84, 24, 32, 105, 83, 73, 27, 27, 45, 105, 133, 115,\n", - " 84, 17, 45, 106, 106, 17, 73, 91, 108, 129, 83, 105,\n", - " 106, 91, 75, 80, 91, 17, 17, 108, 105, 32, 115, 91,\n", - " 115, 91, 105, 129, 91, 75, 129, 106, 80, 91, 129, 45,\n", - " 133, 91, 91, 106, 108, 83, 17, 91, 58, 27, 84, 108,\n", - " 83, 129, 32, 45, 133, 129, 27, 135, 106, 91, 105, 135,\n", - " 27, 106, 27, 45, 75, 75, 106, 135, 73, 27, 106, 27,\n", - " 27, 115, 106, 27, 27, 27, 32, 106, 17, 17, 108, 45,\n", - " 32, 106, 105, 58, 133, 27, 17, 133, 73, 75, 27, 105,\n", - " 73, 91, 32, 84, 27, 91, 73, 27, 24, 17, 27, 133,\n", - " 17, 106, 24, 27, 17, 133, 27, 105, 24, 27, 91, 27,\n", - " 75, 17, 24, 27, 115, 133, 115, 32, 32, 108, 17, 80,\n", - " 75, 91, 45, 106, 108, 45, 27, 32, 108, 27, 108, 45,\n", - " 17, 83, 80, 75, 73, 73, 24, 24, 27, 133, 24, 58,\n", - " 73, 32, 58, 83, 129, 75, 17, 105, 32, 17, 80, 73,\n", - " 135, 75, 84, 80, 27, 58, 108, 75, 129, 84, 45, 24,\n", - " 24, 27, 73, 83, 80, 75, 80, 129, 133, 27, 105, 106,\n", - " 83, 80, 115, 17, 84, 80, 129, 75, 45, 83, 105, 80,\n", - " 106, 73, 27, 106, 45, 24, 80, 27, 32, 91, 135, 80,\n", - " 73, 135, 106, 91, 91, 58, 108, 73, 106, 135, 27, 108,\n", - " 75, 24, 83, 83, 73, 17, 17, 108, 80, 135, 75, 84,\n", - " 45, 83, 45, 80, 24, 80, 80, 58, 75, 133, 133, 80,\n", - " 115, 75, 80, 129, 129, 83, 83, 80, 84, 58, 80, 84,\n", - " 27, 27, 83, 108, 27, 32, 115, 135, 73, 24, 83, 135,\n", - " 17, 106, 80, 45, 135, 115, 84, 58],\n", - " [ 93, 9, 150, 67, 116, 52, 24, 204, 63, 14, 167, 109,\n", - " 252, 51, 103, 276, 216, 153, 178, 186, 302, 260, 409, 432,\n", - " 249, 446, 299, 834, 697, 624, 696, 229, 559, 616, 589, 399,\n", - " 793, 645, 555, 649, 498, 612, 737, 811, 1057, 562, 971, 982,\n", - " 762, 1322, 634, 1157, 1113, 1149, 556, 965, 705, 898, 995, 1071,\n", - " 1068, 1286, 964, 1135, 1182, 1380, 966, 1299, 1366, 1241, 1295, 1144,\n", - " 1375, 1573, 1252, 1420, 1254, 1360, 1515, 1410, 1462, 1464, 1426, 1362,\n", - " 1484, 1292, 1367, 1436, 1274, 1521, 1471, 1541, 1658, 1699, 1365, 1475,\n", - " 1675, 1551, 1488, 1383, 1711, 1617, 1555, 1614, 1883, 1761, 1888, 1757,\n", - " 2049, 1752, 1707, 1762, 1800, 1793, 1790, 1892, 1760, 1844, 1803, 1677,\n", - " 1852, 1825, 1937, 2133, 1805, 1780, 1894, 2073, 1948, 1811, 2118, 1919,\n", - " 1847, 2316, 2204, 1902, 2038, 1887, 2028, 2066, 2076, 2016, 2300, 1996,\n", - " 2052, 2086, 2050, 2177, 2135, 2169, 2071, 2232, 2111, 2140, 2173, 2267,\n", - " 2228, 2195, 2179, 2031, 2443, 2330, 2360, 2394, 2538, 2162, 2436, 2485,\n", - " 2420, 2305, 2501, 2433, 2489, 2369, 2497, 2564, 2593, 2516, 2482, 2578,\n", - " 2560, 2600, 2714, 2532, 2559, 2476, 2626, 2623, 2653, 2610, 2659, 2606,\n", - " 2666, 2624, 2462, 2738, 2605, 2555, 2807, 2764, 2878, 2716, 2759, 2704,\n", - " 2949, 2875, 2854, 2742, 2808, 2770, 2839, 2765, 2845, 2768, 2909, 3153,\n", - " 2940, 3161, 3045, 3229, 2979, 3086, 3152, 3264, 3310, 3213, 3139, 3241,\n", - " 3210, 3329, 3336, 3327, 3358, 3348, 3412, 3365, 3243, 3386, 3393, 3312,\n", - " 3338, 3510, 3479, 3446, 3457, 3573, 3520, 3643, 3496, 3680, 3637, 3554,\n", - " 3566, 3673, 3708, 3605, 3428, 3541, 3635, 3737, 3709, 3868, 3772, 3893,\n", - " 3929, 3825, 3791, 3820, 4156, 3897, 3876, 4041, 3978, 4023, 4116, 3783,\n", - " 3779, 4257, 4057, 3979, 3922, 3804, 3914, 3898, 3980, 4205, 4123, 4146,\n", - " 4231, 4182, 4301, 4287, 4095, 4265, 4189, 4219, 4254, 4276, 4339, 4260,\n", - " 4264, 4413, 4315, 4289, 4346, 4235, 4341, 4197, 4373, 4335, 4334, 4279,\n", - " 4343, 4369, 4284, 4351, 4326, 4436, 4453, 4392, 4363, 4414, 4401, 4410,\n", - " 4504, 4407, 4691, 4420, 4456, 4465, 4478, 4709, 4388, 4463, 4468, 4443,\n", - " 4563, 4444, 4445, 4648, 4541, 4564, 4644, 4610, 4427, 4549, 4550, 4615,\n", - " 4716, 4764, 4656, 4905, 4925, 4813, 4913, 4817, 4713, 4739, 4886, 4747,\n", - " 4951, 5217, 5076, 4850, 4881, 5044, 4940, 5075, 4827, 5166, 5029, 5286,\n", - " 4963, 5063, 5153, 5238, 5194, 5128, 4866, 4989, 4988, 4862, 4972, 5090,\n", - " 5116, 5155, 5134, 5009, 5089, 5310, 5129, 5150, 5339, 5201, 5276, 5378,\n", - " 5329, 5260, 5402, 5196, 5406, 5367, 5385, 5510, 5454, 5452, 5389, 5464,\n", - " 5636, 5430, 5474, 5457, 5460, 5537, 5442, 5463, 5373, 5633, 5517, 5570,\n", - " 5674, 5518, 5471, 5397, 5533, 5577, 5700, 5862, 5486, 5547, 5851, 5836,\n", - " 5597, 5686, 5734, 5505, 5719, 5704, 5647, 5705, 5702, 5968, 6064, 5739,\n", - " 5792, 5805, 5793, 5653, 5582, 5616, 6178, 5903, 6133, 6210, 5829, 5946,\n", - " 5929, 6039, 6332, 6174, 5893, 6232, 6434, 6488, 6044, 6138, 6645, 6269,\n", - " 6489, 6471, 6260, 6376, 6475, 6438, 6194, 6421, 6606, 6455, 6467, 6417,\n", - " 6626, 6558, 6319, 6395, 6356, 6449, 6481, 6610, 6699, 6459, 6630, 6738,\n", - " 6725, 6677, 6689, 6693, 6732, 6560, 6548, 6735]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 69, 69, 69, ..., 5702, 5702, 5702],\n", - " [ 247, 625, 234, ..., 100, 234, 205]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 234, 195, 601, ..., 446, 384, 16],\n", - " [ 58, 117, 13, ..., 5718, 5644, 5525]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5493, 523, 5702, ..., 2972, 71, 4606],\n", - " [ 41, 57, 189, ..., 6679, 6682, 6482]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 148, 148, 148, ..., 5702, 5702, 5702],\n", - " [2507, 3405, 1636, ..., 4150, 4792, 4245]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 27, 27, 27, ..., 6674, 6621, 6621],\n", - " [ 292, 1555, 3608, ..., 3053, 3053, 3093]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006456\n", - "sampling 0.006276\n", - "noi time: 0.00289\n", - "get_vertex_data call: 0.032539\n", - "noi group time: 0.003568\n", - "eoi_group_time: 0.016388\n", - "second half: 0.223658\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31145, 2949, 23798, ..., 1124620, 1119687, 1118692],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31145, 2949, 23798, ..., 1124620, 1119687, 1118692],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1216253, 1216139, 1203793, ..., 1938525, 1928579, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1216253, 1216139, 1203793, ..., 1938525, 1928579, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1137436, 1141424, 1140284, 1135926, 1135933, 1135726, 1141758,\n", - " 1138320, 1138335, 1136969, 1141443, 1143600, 1143615, 1139808, 1154774,\n", - " 1137268, 1138930, 1145051, 1150390, 1146644, 1139615, 1145282, 1139857,\n", - " 1136950, 1136956, 1149216, 1143820, 1147473, 1147483, 1135992, 1135999,\n", - " 1142894, 1153940, 1144636, 1135260, 1149038, 1146995, 1146996, 1153012,\n", - " 1153018, 1146656, 1146472, 1152666, 1152664, 1147094, 1137220, 1155014,\n", - " 1136683, 1136685, 1150329, 1152427, 1146377, 1138745, 1140537, 1140540,\n", - " 1138112, 1138126, 1138366, 1134735, 1140952, 1162460, 1135367, 1135202,\n", - " 1154739, 1141036, 1136289, 1136300, 1134794, 1157442, 1136519, 1138504,\n", - " 1137329, 1137342, 1137693, 1144789, 1144395, 1137534, 1157395, 1157399,\n", - " 1157393, 1157397, 1136581, 1136204, 1156159, 1156150, 1139161, 1135583,\n", - " 1135664, 1138514, 1138524, 1138585, 1156909, 1139684, 1139685, 1138319,\n", - " 1157703, 1138436, 1138440, 1138445, 1140079, 1138461, 1160590, 1160579,\n", - " 1137493, 1137920, 1136594, 1158386, 1149328, 1156605, 1156606, 1147112,\n", - " 1142611, 1135030, 1135359, 1138185, 1158980, 1158984, 1148531, 1135760,\n", - " 1135772, 1139667, 1138067, 1138070, 1138079, 1134992, 1152651, 1135779,\n", - " 1142906, 1159011, 1143631, 1139933, 1139934, 1138148, 1137127, 1134891,\n", - " 1146075, 1140557, 1152044, 1139069, 1136054, 1140670, 1137728, 1134922,\n", - " 1146208, 1134742, 1134750, 1134741, 1136997, 1135549, 1141088, 1141095,\n", - " 1144138, 1145347, 1141980, 1143767, 1137297, 1143225, 1139032, 1139033,\n", - " 1159667, 1149968, 1149979, 1149982, 1140467, 1141229, 1141223, 1136917,\n", - " 1139741, 1143667, 1143677, 1137188, 1144650, 1134978, 1144428, 1138482,\n", - " 1142050, 1143153, 1158749, 1137766, 1139190, 1137060, 1137071, 1138708,\n", - " 1140110, 1142922, 1143107, 1143111, 1144596, 1142845, 1144182, 1143745,\n", - " 1134829, 1139560, 1158698, 1138529, 1138537, 1140501, 1147153, 1136378,\n", - " 1141365, 1141367, 1153068, 1149088, 1149097, 1153556, 1139508, 1139510,\n", - " 1140082, 1139127, 1145001, 1145200, 1147888, 1147901, 1139171, 1140990,\n", - " 1146702, 1141565, 1147050, 1145873, 1138992, 1141925, 1146901, 1144242,\n", - " 1137149, 1150255, 1139405, 1137571, 1134850, 1143851, 1136287, 1146024,\n", - " 1150601, 1138085, 1141585, 1149928, 1139990, 1143293, 1143294, 1147541,\n", - " 1147540, 1148763, 1147282, 1142816, 1138660, 1140346, 1147461, 1149366,\n", - " 1142585, 1136836, 1136843, 1139329, 1144768, 1144779, 1136445, 1142126,\n", - " 1142159, 1143345, 1144766, 1144080, 1144086, 1138600, 1139973, 1150294,\n", - " 1146514, 1146523, 1143456, 1140487, 1143949, 1140829, 1140823, 1146580,\n", - " 1147574, 1146636, 1147521, 1140364, 1137990, 1137994, 1168914, 1144222,\n", - " 1147984, 1147995, 1147999, 1134899, 1134907, 1139249, 1154495, 1148704,\n", - " 1143310, 1150997, 1146751, 1148476, 1153701, 1152328, 1152335, 1147027,\n", - " 1147971, 1158225, 1158228, 1147880, 1145237, 1145240, 1145750, 1145751,\n", - " 1142369, 1148394, 1151242, 1152530, 1151182, 1150445, 1148928, 1148825,\n", - " 1154437, 1149791, 1149777, 1144514, 1144526, 1150348, 1154819, 1165262,\n", - " 1151473, 1145255, 1145256, 1139914, 1146723, 1140572, 1140402, 1150112,\n", - " 1150127, 1141949, 1150744, 1141278, 1148744, 1148461, 1147653, 1143560,\n", - " 1143552, 1151717, 1152079, 1137724, 1135079, 1135083, 1147866, 1154420,\n", - " 1158786, 1146684, 1138872, 1152441, 1157968, 1157972, 1148720, 1148724,\n", - " 1148725, 1148731, 1145862, 1147627, 1139938, 1143983, 1154202, 1154166,\n", - " 1153186, 1153188, 1145104, 1152915, 1150935, 1152878, 1150356, 1155088,\n", - " 1155089, 1147442, 1151816, 1151821, 1152581, 1151906, 1151908, 1154183,\n", - " 1154190, 1145640, 1148498, 1146565, 1141420, 1141419, 1152784, 1150637,\n", - " 1149391, 1150890, 1148947, 1146969, 1146975, 1146967, 1150219, 1146623,\n", - " 1151397, 1144476, 1144472, 1135688, 1152109, 1146280, 1146287, 1145550,\n", - " 1137746, 1146307, 1146304, 1140521, 1140527, 1151964, 1154123, 1157824,\n", - " 1152673, 1139575, 1151573, 1151617, 1136140, 1136788, 1152957, 1140459,\n", - " 1153387, 1140935, 1145952, 1152898, 1152903, 1152341, 1146816, 1156826,\n", - " 1153311, 1138275, 1138276, 1138279, 1138281, 1152295, 1136028, 1151191,\n", - " 1140674, 1140684, 1152928, 1151056, 1151064, 1151067, 1151071, 1156422,\n", - " 1150101, 1137405, 1150158, 1150172, 1148040, 1152602, 1155218, 1149804,\n", - " 1148628, 1158530, 1158540, 1137458, 1149944, 1155376, 1142041, 1135434,\n", - " 1157547, 1142387, 1150872, 1148892, 1157064, 1157069, 1155412, 1151251,\n", - " 1150465, 1150475, 1156638, 1157912, 1150824, 1156935, 1157777, 1158306,\n", - " 1158308, 1158311, 1155441, 1154536, 1154528, 1145760, 1145771, 1156919,\n", - " 1150488, 1156207, 1151379, 1158626, 1156649, 1156653, 1155122, 1152527,\n", - " 1155755, 1145797, 1156460, 1156463, 1168238, 1155675, 1155628, 1154547,\n", - " 1155576, 1158824, 1158325, 1148836, 1148839, 1155646, 1153365, 1158355,\n", - " 1143254, 1154644, 1154250, 1137355, 1154902, 1163127, 1143189, 1160911,\n", - " 1159629, 1137167, 1137152, 1153333, 1153786, 1137385, 1138258, 1135601,\n", - " 1158665, 1149145, 1159260, 1156085, 1140633, 1152220, 1159203, 1159213,\n", - " 1152496, 1140380, 1140374, 1142466, 1155975, 1158840, 1156811, 1155404,\n", - " 1149696, 1136896, 1158815, 1158803, 1152463, 1151615, 1136481, 1136494,\n", - " 1161625, 1147586, 1153112, 1156490, 1153808, 1158220, 1134757, 1157858,\n", - " 1157860, 1158558, 1153834, 1156516, 1146123, 1146126, 1158007, 1158006,\n", - " 1158256, 1155521, 1155529, 1155535, 1142666, 1157747, 1167359, 1159057,\n", - " 1157946, 1153052, 1153045, 1172995, 1144156, 1153842, 1156098, 1150035,\n", - " 1150046, 1150041, 1149063, 1155480, 1153514, 1153519, 1164856, 1147300,\n", - " 1158680, 1138161, 1156787, 1149963, 1139782, 1139788, 1154590, 1160758,\n", - " 1160764, 1139592, 1148025, 1156987, 1171515, 1146063, 1163452, 1140134,\n", - " 1140643, 1141862, 1148600, 1148603, 1143139, 1143146, 1158643, 1156181,\n", - " 1159025, 1159032, 1159038, 1152247, 1165591, 1167538, 1155588, 1155598,\n", - " 1155590, 1160501, 1151218, 1151220, 1138674, 1148571, 1158405, 1146509,\n", - " 1170998, 1169261, 1144736, 1144739, 1144747, 1152776, 1163522, 1163527,\n", - " 1141471, 1147426, 1147438, 1157050, 1182244, 1182247, 1156737, 1156739,\n", - " 1157955, 1167372, 1171040, 1144812, 1135561, 1135567, 1164750, 1180496,\n", - " 1142733, 1156303, 1145728, 1148683, 1163935, 1145228, 1169282, 1155320,\n", - " 1166462, 1171687, 1169510, 1144972, 1144973, 1170357, 1162288, 1147694,\n", - " 1145447, 1165746, 1170502, 1139351, 1145902, 1153520, 1152198, 1143402,\n", - " 1169728, 1158722, 1158734, 1154076, 1147338, 1160030, 1145668, 1169602,\n", - " 1156308, 1166653, 1145326, 1166198, 1180418, 1165011, 1161781, 1144344,\n", - " 1144346, 1144336, 1157534, 1157528, 1138376, 1138383, 1147746, 1154670,\n", - " 1154884, 1154890, 1157331, 1141051, 1141043, 1169359, 1149452, 1147492,\n", - " 1138609, 1158154, 1171529, 1149689, 1158611, 1149847, 1147416, 1147423,\n", - " 1155494, 1160539, 1152353, 1166600, 1143172, 1149402, 1148667, 1148325,\n", - " 1177207, 1165907, 1173307, 1152150, 1152152, 1153754, 1159652, 1151210,\n", - " 1151697, 1157158, 1157153, 1157373, 1157375, 1147708, 1147711, 1157593,\n", - " 1155735, 1165120, 1175591, 1160990, 1178857, 1179707, 1181207, 1163988,\n", - " 1174927, 1171823, 1180238, 1154148, 1149169, 1149173, 1168481, 1143420,\n", - " 1179243, 1166299, 1171301, 1153803, 1153630, 1151509, 1182651, 1182476,\n", - " 1166554, 1161255, 1176523, 1155262, 1180148, 1154718, 1157792, 1171623,\n", - " 1180036, 1172154, 1153898, 1153899, 1162403, 1145626, 1178028, 1178757,\n", - " 1157483, 1179086, 1149755, 1146242, 1155987, 1155990, 1158512, 1155899,\n", - " 1182896, 1159872, 1191815, 1189641, 1140393, 1168273, 1182330, 1180164,\n", - " 1168543, 1169062, 1177772, 1189335, 1166227, 1179090, 1182337, 1181548,\n", - " 1164338, 1184278, 1147182, 1156162, 1190628, 1190629, 1164133, 1139828,\n", - " 1139831, 1139837, 1150265, 1167135, 1154814, 1154812, 1188612, 1183890,\n", - " 1156055, 1151978, 1181453, 1182704, 1146394, 1146399, 1173058, 1176218,\n", - " 1149544, 1178236, 1192426, 1193995, 1190246, 1188533, 1171355, 1192436,\n", - " 1179845, 1162148, 1192454, 1170150, 1152115, 1152124, 1176041, 1171201,\n", - " 1186419, 1186422, 1186423, 1172405, 1170128, 1189577, 1172976, 1180998,\n", - " 1156681, 1172423, 1158064, 1182828, 1166785, 1145397, 1185853, 1177818,\n", - " 1183809, 1155962, 1183611, 1178306, 1162661, 1192679, 1191142, 1179623,\n", - " 1190187, 1182409, 1194256, 1184933, 1184641], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1137436, 1141424, 1140284, 1135926, 1135933, 1135726, 1141758,\n", - " 1138320, 1138335, 1136969, 1141443, 1143600, 1143615, 1139808, 1154774,\n", - " 1137268, 1138930, 1145051, 1150390, 1146644, 1139615, 1145282, 1139857,\n", - " 1136950, 1136956, 1149216, 1143820, 1147473, 1147483, 1135992, 1135999,\n", - " 1142894, 1153940, 1144636, 1135260, 1149038, 1146995, 1146996, 1153012,\n", - " 1153018, 1146656, 1146472, 1152666, 1152664, 1147094, 1137220, 1155014,\n", - " 1136683, 1136685, 1150329, 1152427, 1146377, 1138745, 1140537, 1140540,\n", - " 1138112, 1138126, 1138366, 1134735, 1140952, 1162460, 1135367, 1135202,\n", - " 1154739, 1141036, 1136289, 1136300, 1134794, 1157442, 1136519, 1138504,\n", - " 1137329, 1137342, 1137693, 1144789, 1144395, 1137534, 1157395, 1157399,\n", - " 1157393, 1157397, 1136581, 1136204, 1156159, 1156150, 1139161, 1135583,\n", - " 1135664, 1138514, 1138524, 1138585, 1156909, 1139684, 1139685, 1138319,\n", - " 1157703, 1138436, 1138440, 1138445, 1140079, 1138461, 1160590, 1160579,\n", - " 1137493, 1137920, 1136594, 1158386, 1149328, 1156605, 1156606, 1147112,\n", - " 1142611, 1135030, 1135359, 1138185, 1158980, 1158984, 1148531, 1135760,\n", - " 1135772, 1139667, 1138067, 1138070, 1138079, 1134992, 1152651, 1135779,\n", - " 1142906, 1159011, 1143631, 1139933, 1139934, 1138148, 1137127, 1134891,\n", - " 1146075, 1140557, 1152044, 1139069, 1136054, 1140670, 1137728, 1134922,\n", - " 1146208, 1134742, 1134750, 1134741, 1136997, 1135549, 1141088, 1141095,\n", - " 1144138, 1145347, 1141980, 1143767, 1137297, 1143225, 1139032, 1139033,\n", - " 1159667, 1149968, 1149979, 1149982, 1140467, 1141229, 1141223, 1136917,\n", - " 1139741, 1143667, 1143677, 1137188, 1144650, 1134978, 1144428, 1138482,\n", - " 1142050, 1143153, 1158749, 1137766, 1139190, 1137060, 1137071, 1138708,\n", - " 1140110, 1142922, 1143107, 1143111, 1144596, 1142845, 1144182, 1143745,\n", - " 1134829, 1139560, 1158698, 1138529, 1138537, 1140501, 1147153, 1136378,\n", - " 1141365, 1141367, 1153068, 1149088, 1149097, 1153556, 1139508, 1139510,\n", - " 1140082, 1139127, 1145001, 1145200, 1147888, 1147901, 1139171, 1140990,\n", - " 1146702, 1141565, 1147050, 1145873, 1138992, 1141925, 1146901, 1144242,\n", - " 1137149, 1150255, 1139405, 1137571, 1134850, 1143851, 1136287, 1146024,\n", - " 1150601, 1138085, 1141585, 1149928, 1139990, 1143293, 1143294, 1147541,\n", - " 1147540, 1148763, 1147282, 1142816, 1138660, 1140346, 1147461, 1149366,\n", - " 1142585, 1136836, 1136843, 1139329, 1144768, 1144779, 1136445, 1142126,\n", - " 1142159, 1143345, 1144766, 1144080, 1144086, 1138600, 1139973, 1150294,\n", - " 1146514, 1146523, 1143456, 1140487, 1143949, 1140829, 1140823, 1146580,\n", - " 1147574, 1146636, 1147521, 1140364, 1137990, 1137994, 1168914, 1144222,\n", - " 1147984, 1147995, 1147999, 1134899, 1134907, 1139249, 1154495, 1148704,\n", - " 1143310, 1150997, 1146751, 1148476, 1153701, 1152328, 1152335, 1147027,\n", - " 1147971, 1158225, 1158228, 1147880, 1145237, 1145240, 1145750, 1145751,\n", - " 1142369, 1148394, 1151242, 1152530, 1151182, 1150445, 1148928, 1148825,\n", - " 1154437, 1149791, 1149777, 1144514, 1144526, 1150348, 1154819, 1165262,\n", - " 1151473, 1145255, 1145256, 1139914, 1146723, 1140572, 1140402, 1150112,\n", - " 1150127, 1141949, 1150744, 1141278, 1148744, 1148461, 1147653, 1143560,\n", - " 1143552, 1151717, 1152079, 1137724, 1135079, 1135083, 1147866, 1154420,\n", - " 1158786, 1146684, 1138872, 1152441, 1157968, 1157972, 1148720, 1148724,\n", - " 1148725, 1148731, 1145862, 1147627, 1139938, 1143983, 1154202, 1154166,\n", - " 1153186, 1153188, 1145104, 1152915, 1150935, 1152878, 1150356, 1155088,\n", - " 1155089, 1147442, 1151816, 1151821, 1152581, 1151906, 1151908, 1154183,\n", - " 1154190, 1145640, 1148498, 1146565, 1141420, 1141419, 1152784, 1150637,\n", - " 1149391, 1150890, 1148947, 1146969, 1146975, 1146967, 1150219, 1146623,\n", - " 1151397, 1144476, 1144472, 1135688, 1152109, 1146280, 1146287, 1145550,\n", - " 1137746, 1146307, 1146304, 1140521, 1140527, 1151964, 1154123, 1157824,\n", - " 1152673, 1139575, 1151573, 1151617, 1136140, 1136788, 1152957, 1140459,\n", - " 1153387, 1140935, 1145952, 1152898, 1152903, 1152341, 1146816, 1156826,\n", - " 1153311, 1138275, 1138276, 1138279, 1138281, 1152295, 1136028, 1151191,\n", - " 1140674, 1140684, 1152928, 1151056, 1151064, 1151067, 1151071, 1156422,\n", - " 1150101, 1137405, 1150158, 1150172, 1148040, 1152602, 1155218, 1149804,\n", - " 1148628, 1158530, 1158540, 1137458, 1149944, 1155376, 1142041, 1135434,\n", - " 1157547, 1142387, 1150872, 1148892, 1157064, 1157069, 1155412, 1151251,\n", - " 1150465, 1150475, 1156638, 1157912, 1150824, 1156935, 1157777, 1158306,\n", - " 1158308, 1158311, 1155441, 1154536, 1154528, 1145760, 1145771, 1156919,\n", - " 1150488, 1156207, 1151379, 1158626, 1156649, 1156653, 1155122, 1152527,\n", - " 1155755, 1145797, 1156460, 1156463, 1168238, 1155675, 1155628, 1154547,\n", - " 1155576, 1158824, 1158325, 1148836, 1148839, 1155646, 1153365, 1158355,\n", - " 1143254, 1154644, 1154250, 1137355, 1154902, 1163127, 1143189, 1160911,\n", - " 1159629, 1137167, 1137152, 1153333, 1153786, 1137385, 1138258, 1135601,\n", - " 1158665, 1149145, 1159260, 1156085, 1140633, 1152220, 1159203, 1159213,\n", - " 1152496, 1140380, 1140374, 1142466, 1155975, 1158840, 1156811, 1155404,\n", - " 1149696, 1136896, 1158815, 1158803, 1152463, 1151615, 1136481, 1136494,\n", - " 1161625, 1147586, 1153112, 1156490, 1153808, 1158220, 1134757, 1157858,\n", - " 1157860, 1158558, 1153834, 1156516, 1146123, 1146126, 1158007, 1158006,\n", - " 1158256, 1155521, 1155529, 1155535, 1142666, 1157747, 1167359, 1159057,\n", - " 1157946, 1153052, 1153045, 1172995, 1144156, 1153842, 1156098, 1150035,\n", - " 1150046, 1150041, 1149063, 1155480, 1153514, 1153519, 1164856, 1147300,\n", - " 1158680, 1138161, 1156787, 1149963, 1139782, 1139788, 1154590, 1160758,\n", - " 1160764, 1139592, 1148025, 1156987, 1171515, 1146063, 1163452, 1140134,\n", - " 1140643, 1141862, 1148600, 1148603, 1143139, 1143146, 1158643, 1156181,\n", - " 1159025, 1159032, 1159038, 1152247, 1165591, 1167538, 1155588, 1155598,\n", - " 1155590, 1160501, 1151218, 1151220, 1138674, 1148571, 1158405, 1146509,\n", - " 1170998, 1169261, 1144736, 1144739, 1144747, 1152776, 1163522, 1163527,\n", - " 1141471, 1147426, 1147438, 1157050, 1182244, 1182247, 1156737, 1156739,\n", - " 1157955, 1167372, 1171040, 1144812, 1135561, 1135567, 1164750, 1180496,\n", - " 1142733, 1156303, 1145728, 1148683, 1163935, 1145228, 1169282, 1155320,\n", - " 1166462, 1171687, 1169510, 1144972, 1144973, 1170357, 1162288, 1147694,\n", - " 1145447, 1165746, 1170502, 1139351, 1145902, 1153520, 1152198, 1143402,\n", - " 1169728, 1158722, 1158734, 1154076, 1147338, 1160030, 1145668, 1169602,\n", - " 1156308, 1166653, 1145326, 1166198, 1180418, 1165011, 1161781, 1144344,\n", - " 1144346, 1144336, 1157534, 1157528, 1138376, 1138383, 1147746, 1154670,\n", - " 1154884, 1154890, 1157331, 1141051, 1141043, 1169359, 1149452, 1147492,\n", - " 1138609, 1158154, 1171529, 1149689, 1158611, 1149847, 1147416, 1147423,\n", - " 1155494, 1160539, 1152353, 1166600, 1143172, 1149402, 1148667, 1148325,\n", - " 1177207, 1165907, 1173307, 1152150, 1152152, 1153754, 1159652, 1151210,\n", - " 1151697, 1157158, 1157153, 1157373, 1157375, 1147708, 1147711, 1157593,\n", - " 1155735, 1165120, 1175591, 1160990, 1178857, 1179707, 1181207, 1163988,\n", - " 1174927, 1171823, 1180238, 1154148, 1149169, 1149173, 1168481, 1143420,\n", - " 1179243, 1166299, 1171301, 1153803, 1153630, 1151509, 1182651, 1182476,\n", - " 1166554, 1161255, 1176523, 1155262, 1180148, 1154718, 1157792, 1171623,\n", - " 1180036, 1172154, 1153898, 1153899, 1162403, 1145626, 1178028, 1178757,\n", - " 1157483, 1179086, 1149755, 1146242, 1155987, 1155990, 1158512, 1155899,\n", - " 1182896, 1159872, 1191815, 1189641, 1140393, 1168273, 1182330, 1180164,\n", - " 1168543, 1169062, 1177772, 1189335, 1166227, 1179090, 1182337, 1181548,\n", - " 1164338, 1184278, 1147182, 1156162, 1190628, 1190629, 1164133, 1139828,\n", - " 1139831, 1139837, 1150265, 1167135, 1154814, 1154812, 1188612, 1183890,\n", - " 1156055, 1151978, 1181453, 1182704, 1146394, 1146399, 1173058, 1176218,\n", - " 1149544, 1178236, 1192426, 1193995, 1190246, 1188533, 1171355, 1192436,\n", - " 1179845, 1162148, 1192454, 1170150, 1152115, 1152124, 1176041, 1171201,\n", - " 1186419, 1186422, 1186423, 1172405, 1170128, 1189577, 1172976, 1180998,\n", - " 1156681, 1172423, 1158064, 1182828, 1166785, 1145397, 1185853, 1177818,\n", - " 1183809, 1155962, 1183611, 1178306, 1162661, 1192679, 1191142, 1179623,\n", - " 1190187, 1182409, 1194256, 1184933, 1184641], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195202, 1196011, 1197451, 1199424, 1199302, 1198244, 1197719, 1198731,\n", - " 1199282, 1199293, 1198449, 1202255, 1202119, 1194635, 1199248, 1202803,\n", - " 1202275, 1198557, 1197383, 1194748, 1194649, 1194642, 1195263, 1201992,\n", - " 1196031, 1198095, 1195888, 1202902, 1199171, 1195740, 1197856, 1194759,\n", - " 1199371, 1197104, 1196845, 1196237, 1198958, 1196717, 1195145, 1195148,\n", - " 1197139, 1197141, 1200761, 1196242, 1198219, 1195841, 1195026, 1198915,\n", - " 1195541, 1202916, 1197640, 1196283, 1195351, 1198282, 1199060, 1197291,\n", - " 1199628, 1197675, 1197994, 1200076, 1199154, 1199038, 1199231, 1199676,\n", - " 1194786, 1200052, 1196508, 1200668, 1197970, 1196727, 1195771, 1195773,\n", - " 1200892, 1199555, 1201827, 1200456, 1201169, 1200501, 1200503, 1199445,\n", - " 1194803, 1194805, 1202641, 1200363, 1195815, 1200555, 1199208, 1196883,\n", - " 1200194, 1196779, 1201442, 1202239, 1200899, 1202338, 1199976, 1197539,\n", - " 1198478, 1195601, 1201871, 1202210, 1199925, 1199929, 1197919, 1198561,\n", - " 1196960, 1196966, 1202545, 1198525, 1195676, 1195664, 1200684, 1198911,\n", - " 1195415, 1197060, 1197816, 1197406, 1203102, 1194730, 1198148, 1198824,\n", - " 1203316, 1200011, 1199786, 1198819, 1200974, 1197652, 1197655, 1197035,\n", - " 1197026, 1194908, 1194911, 1203162], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195202, 1196011, 1197451, 1199424, 1199302, 1198244, 1197719, 1198731,\n", - " 1199282, 1199293, 1198449, 1202255, 1202119, 1194635, 1199248, 1202803,\n", - " 1202275, 1198557, 1197383, 1194748, 1194649, 1194642, 1195263, 1201992,\n", - " 1196031, 1198095, 1195888, 1202902, 1199171, 1195740, 1197856, 1194759,\n", - " 1199371, 1197104, 1196845, 1196237, 1198958, 1196717, 1195145, 1195148,\n", - " 1197139, 1197141, 1200761, 1196242, 1198219, 1195841, 1195026, 1198915,\n", - " 1195541, 1202916, 1197640, 1196283, 1195351, 1198282, 1199060, 1197291,\n", - " 1199628, 1197675, 1197994, 1200076, 1199154, 1199038, 1199231, 1199676,\n", - " 1194786, 1200052, 1196508, 1200668, 1197970, 1196727, 1195771, 1195773,\n", - " 1200892, 1199555, 1201827, 1200456, 1201169, 1200501, 1200503, 1199445,\n", - " 1194803, 1194805, 1202641, 1200363, 1195815, 1200555, 1199208, 1196883,\n", - " 1200194, 1196779, 1201442, 1202239, 1200899, 1202338, 1199976, 1197539,\n", - " 1198478, 1195601, 1201871, 1202210, 1199925, 1199929, 1197919, 1198561,\n", - " 1196960, 1196966, 1202545, 1198525, 1195676, 1195664, 1200684, 1198911,\n", - " 1195415, 1197060, 1197816, 1197406, 1203102, 1194730, 1198148, 1198824,\n", - " 1203316, 1200011, 1199786, 1198819, 1200974, 1197652, 1197655, 1197035,\n", - " 1197026, 1194908, 1194911, 1203162], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 1.5044e-01, -5.4931e-04, 6.5964e-01, ..., 8.6461e-02,\n", - " -1.7376e-03, -4.4631e-03],\n", - " [ 3.0903e-01, -1.2985e-03, 1.0744e+00, ..., 6.1682e-02,\n", - " -1.4250e-03, -7.6085e-03],\n", - " [ 1.2422e-01, -7.1834e-04, 5.8384e-01, ..., 8.7296e-02,\n", - " -1.7097e-03, -4.5512e-03],\n", - " ...,\n", - " [ 3.0903e-01, -1.2985e-03, 1.0744e+00, ..., 6.1682e-02,\n", - " -1.4250e-03, -7.6085e-03],\n", - " [ 1.0413e-01, -4.7466e-04, 5.0893e-01, ..., 9.0270e-02,\n", - " -1.7565e-03, -3.6686e-03],\n", - " [ 3.0591e-01, -1.2276e-03, 1.0102e+00, ..., 7.0534e-02,\n", - " -1.6671e-03, -7.0298e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 2.8048e-02, 1.9081e+00, 7.4565e-01, ..., -1.3638e-02,\n", - " -2.6577e-02, -1.5540e-03],\n", - " [ 1.1914e+00, 1.1602e+00, 3.8720e-02, ..., -1.4365e-02,\n", - " -2.3472e-02, 1.0061e+00],\n", - " [-1.7255e-02, 1.8837e-01, 2.5055e+00, ..., -6.4662e-03,\n", - " -3.2048e-02, -2.8532e-02],\n", - " ...,\n", - " [ 1.0421e-01, 1.9082e+00, 5.7595e-01, ..., -1.1593e-02,\n", - " -2.1962e-02, -3.2961e-06],\n", - " [-2.3794e-03, 8.9305e-01, 1.0757e+00, ..., 7.9605e-02,\n", - " -2.7071e-02, 2.8967e-01],\n", - " [-2.6572e-04, 3.6809e+00, 2.7971e+00, ..., 4.7031e+00,\n", - " -5.6056e-02, 3.5675e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-5.8007e-04, 2.4581e-01, 1.6424e-01, ..., 1.3706e+00,\n", - " 3.6853e-01, 1.6935e-02],\n", - " [-9.3911e-04, 3.5278e-01, -3.6603e-06, ..., 1.2619e+00,\n", - " 2.9222e-01, -3.1101e-04],\n", - " [-2.2710e-03, 2.9500e-01, 1.1000e-01, ..., 1.2887e+00,\n", - " 1.6548e-02, -2.8001e-03],\n", - " ...,\n", - " [-4.7649e-04, 1.8026e-01, 2.7938e-01, ..., 1.5068e+00,\n", - " 4.2988e-01, -4.4751e-04],\n", - " [-1.7503e-03, 3.1687e-01, 9.8953e-02, ..., 1.2946e+00,\n", - " 1.5212e-01, -1.7237e-03],\n", - " [-3.2597e-04, 2.2092e-01, 1.8432e-01, ..., 1.4117e+00,\n", - " 4.9005e-01, 7.5197e-02]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-2.0449e-03, 6.0746e-01, 2.2168e-01, ..., -7.9716e-03,\n", - " 3.2232e-01, 4.3021e-01],\n", - " [-1.8512e-03, 6.4922e-01, 2.8632e-01, ..., -1.0330e-02,\n", - " 4.7655e-01, 4.6298e-01],\n", - " [-1.9786e-03, 5.4620e-01, 1.7151e-01, ..., -8.1510e-03,\n", - " 3.6535e-01, 4.6029e-01],\n", - " ...,\n", - " [-2.1806e-04, 5.5123e-01, 2.1390e-01, ..., -9.4317e-03,\n", - " 4.3997e-01, 3.9335e-01],\n", - " [-1.0351e-03, 5.2828e-01, 3.6178e-01, ..., -8.8748e-03,\n", - " 3.1356e-01, 3.8195e-01],\n", - " [-1.1600e-03, 9.3175e-01, 4.4906e-01, ..., -9.5520e-03,\n", - " 4.0517e-01, 6.0964e-01]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 219, 190, 32, 197, 197, 197, 197, 406, 432, 369, 369, 265,\n", - " 620, 793, 626, 626, 976, 729, 974, 999, 956, 842, 970, 990,\n", - " 842, 935, 1367, 1367, 1332, 952, 952, 1354, 1234, 1465, 1321, 1321,\n", - " 1321, 1321, 1405, 1720, 1530, 1448, 1694, 1614, 1782, 1530, 1617, 1617,\n", - " 1745, 1743, 1708, 1708, 1708, 1708, 1567, 1585, 1825, 1825, 1708, 1708,\n", - " 1708, 1563, 1563, 1563, 1980, 1980, 1729, 1864, 1926, 1724, 2030, 2076,\n", - " 2076, 1992, 2020, 1934, 2076, 2058, 2067, 2092, 2358, 2243, 2548, 2548,\n", - " 2243, 2452, 2356, 2443, 2318, 2515, 2763, 2861, 2523, 2646, 2636, 2618,\n", - " 2861, 2861, 2861, 3056, 2906, 2885, 2733, 2733, 2839, 2809, 3013, 2742,\n", - " 2742, 3042, 2733, 2733, 2966, 2923, 2923, 2999, 2999, 3154, 3035, 3024,\n", - " 3139, 3139, 3243, 3364, 3571, 3442, 3442, 3405, 3508, 3491, 3618, 3511,\n", - " 3511, 4029, 3980, 3895, 3695, 3963, 3997, 4016, 4023, 4007, 4007, 4107,\n", - " 4139, 4140, 4140, 4204, 4154, 4263, 4244, 4479, 4283, 4439, 4544, 4487,\n", - " 4514, 4514, 4457, 4457, 4473, 4473, 4473, 4695, 4494, 4789, 4736, 4764,\n", - " 4973, 5080, 4856, 4994, 5065, 4920, 4920, 4984, 4984, 5210, 5210, 5225,\n", - " 5377, 5339, 5530, 5530, 5748, 5748, 5748, 5975, 5524, 5736, 6132, 5891,\n", - " 5891, 6320, 6191, 6191, 6162, 6316, 6176, 6176, 6203, 6176, 6330],\n", - " [ 69, 39, 91, 20, 42, 14, 31, 67, 69, 106, 66, 95,\n", - " 95, 69, 122, 21, 35, 104, 67, 53, 119, 123, 34, 11,\n", - " 72, 69, 91, 40, 8, 57, 49, 88, 78, 73, 89, 28,\n", - " 69, 126, 36, 76, 121, 107, 127, 2, 76, 33, 119, 17,\n", - " 112, 113, 96, 7, 110, 58, 117, 84, 43, 51, 69, 129,\n", - " 108, 111, 99, 55, 125, 62, 130, 107, 69, 64, 2, 45,\n", - " 6, 41, 9, 23, 59, 120, 107, 22, 127, 71, 46, 4,\n", - " 93, 2, 91, 18, 30, 100, 17, 127, 54, 117, 13, 63,\n", - " 83, 94, 3, 69, 3, 109, 85, 8, 97, 95, 16, 21,\n", - " 122, 9, 24, 26, 27, 102, 107, 19, 65, 116, 68, 124,\n", - " 22, 77, 124, 25, 70, 84, 50, 32, 61, 58, 37, 81,\n", - " 103, 63, 126, 79, 11, 65, 60, 48, 11, 125, 94, 91,\n", - " 17, 125, 0, 9, 127, 128, 127, 34, 115, 74, 10, 1,\n", - " 97, 75, 108, 69, 82, 54, 114, 105, 69, 84, 56, 75,\n", - " 6, 38, 118, 59, 12, 10, 87, 69, 90, 53, 64, 6,\n", - " 1, 131, 29, 80, 118, 8, 98, 45, 5, 92, 44, 69,\n", - " 52, 70, 86, 120, 101, 69, 30, 47, 11, 15, 95]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3821, 1497, 3339, ..., 1192, 3177, 3752],\n", - " [ 2, 13, 230, ..., 6927, 6927, 6998]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 67, 54, 75, ..., 120, 8, 8],\n", - " [ 17, 7, 42, ..., 6283, 6250, 6323]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 207, 207, 207, ..., 6941, 6982, 6875],\n", - " [ 341, 128, 252, ..., 336, 597, 450]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 748, 204, 34, ..., 620, 109, 829],\n", - " [ 18, 87, 49, ..., 6926, 6853, 6968]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3958, 2604, 6032, ..., 6881, 195, 195],\n", - " [ 162, 108, 1, ..., 6322, 6286, 6243]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 207, 207, 207, ..., 6882, 6873, 6998],\n", - " [ 876, 1180, 1534, ..., 298, 2029, 5523]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 219, 219, 219, ..., 6330, 6330, 6330],\n", - " [6331, 5507, 6557, ..., 4987, 5356, 5371]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.007607\n", - "sampling 0.007294\n", - "noi time: 0.000824\n", - "get_vertex_data call: 0.032458\n", - "noi group time: 0.003549\n", - "eoi_group_time: 0.016569\n", - "second half: 0.225616\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 14480, 24187, 9921, ..., 1130750, 1131340, 1119684],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 14480, 24187, 9921, ..., 1130750, 1131340, 1119684],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210817, 1224380, 1211790, ..., 1933659, 1925038, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210817, 1224380, 1211790, ..., 1933659, 1925038, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1141424, 1136232, 1140282, 1140285, 1135926, 1135716, 1140785,\n", - " 1140799, 1139696, 1141758, 1137506, 1141250, 1136971, 1141440, 1143609,\n", - " 1149836, 1145366, 1143372, 1146646, 1150509, 1149216, 1155683, 1155686,\n", - " 1143820, 1147482, 1147483, 1144632, 1146995, 1153022, 1135947, 1148346,\n", - " 1152666, 1138347, 1147089, 1155018, 1155019, 1139365, 1139371, 1152425,\n", - " 1152427, 1134718, 1134662, 1137829, 1140537, 1138112, 1137254, 1137171,\n", - " 1138356, 1153456, 1140159, 1140020, 1135367, 1135202, 1141036, 1134794,\n", - " 1157443, 1138504, 1137693, 1136609, 1136619, 1139215, 1144395, 1135408,\n", - " 1157395, 1137441, 1135265, 1156159, 1148481, 1148484, 1141702, 1141705,\n", - " 1135579, 1135581, 1135583, 1141086, 1136098, 1135664, 1140240, 1138514,\n", - " 1153094, 1158136, 1154132, 1145132, 1156899, 1156904, 1139684, 1136362,\n", - " 1139878, 1157706, 1138436, 1138440, 1138456, 1138461, 1138449, 1136594,\n", - " 1149328, 1138847, 1147112, 1142611, 1142615, 1142616, 1160819, 1135619,\n", - " 1135631, 1148533, 1139855, 1139667, 1134992, 1142434, 1142788, 1158974,\n", - " 1143626, 1143631, 1139933, 1138148, 1155654, 1141997, 1152042, 1152044,\n", - " 1136058, 1140670, 1137741, 1137728, 1137743, 1146222, 1134750, 1134741,\n", - " 1136697, 1140224, 1141088, 1141100, 1149001, 1139889, 1156872, 1136397,\n", - " 1143221, 1143227, 1146832, 1152719, 1141695, 1141690, 1135860, 1135861,\n", - " 1136625, 1141224, 1141223, 1139386, 1163306, 1136917, 1139730, 1143673,\n", - " 1143675, 1137186, 1144232, 1144237, 1140592, 1144931, 1136752, 1168566,\n", - " 1144641, 1147844, 1139798, 1142058, 1141821, 1165093, 1143202, 1140166,\n", - " 1158742, 1149105, 1139190, 1138710, 1138708, 1140110, 1142913, 1144596,\n", - " 1148263, 1142451, 1157420, 1136867, 1136864, 1145310, 1141579, 1140885,\n", - " 1135327, 1140445, 1140432, 1144182, 1144865, 1146201, 1147153, 1136378,\n", - " 1149197, 1141365, 1141713, 1141718, 1141664, 1149090, 1149097, 1149101,\n", - " 1138298, 1144277, 1144279, 1139505, 1139510, 1139763, 1139127, 1145001,\n", - " 1143779, 1140977, 1141560, 1141565, 1147050, 1147047, 1145884, 1145873,\n", - " 1143551, 1152976, 1141925, 1146901, 1144242, 1140580, 1140585, 1141846,\n", - " 1139405, 1137571, 1143851, 1142097, 1146024, 1154328, 1141585, 1149928,\n", - " 1149933, 1141236, 1139990, 1143293, 1143294, 1147543, 1147540, 1148763,\n", - " 1147282, 1136330, 1149155, 1140346, 1140348, 1149366, 1148003, 1149608,\n", - " 1136160, 1138915, 1138923, 1157720, 1136836, 1141283, 1139301, 1144768,\n", - " 1144957, 1142149, 1142159, 1143345, 1144765, 1144611, 1144088, 1135757,\n", - " 1135876, 1150756, 1150758, 1144306, 1150294, 1144375, 1146523, 1143960,\n", - " 1143456, 1143470, 1143457, 1143937, 1140364, 1149569, 1168927, 1148971,\n", - " 1144222, 1147984, 1147999, 1146949, 1134899, 1134902, 1139252, 1147244,\n", - " 1148704, 1148715, 1148713, 1148719, 1141327, 1141836, 1143428, 1143434,\n", - " 1147056, 1149718, 1147971, 1147198, 1158226, 1158230, 1158235, 1143921,\n", - " 1148366, 1149871, 1154524, 1145240, 1145246, 1145751, 1138638, 1148397,\n", - " 1146178, 1151242, 1148223, 1152530, 1152537, 1151179, 1150438, 1149258,\n", - " 1148826, 1151860, 1149791, 1144202, 1165252, 1147794, 1152022, 1152023,\n", - " 1135519, 1139914, 1134873, 1142273, 1140561, 1147019, 1147021, 1147009,\n", - " 1147023, 1141949, 1141278, 1144819, 1151795, 1148744, 1137646, 1153574,\n", - " 1147653, 1168496, 1149414, 1149412, 1148288, 1148300, 1137716, 1135087,\n", - " 1148612, 1148623, 1154420, 1148180, 1148188, 1136247, 1139721, 1148726,\n", - " 1146549, 1146555, 1143888, 1148204, 1148101, 1171943, 1153188, 1153197,\n", - " 1145104, 1145111, 1155551, 1150935, 1152878, 1143092, 1144863, 1144851,\n", - " 1150352, 1155088, 1148095, 1147455, 1147442, 1151811, 1151816, 1152581,\n", - " 1151906, 1154183, 1141420, 1150630, 1151351, 1145079, 1148957, 1148955,\n", - " 1146969, 1146975, 1149359, 1153255, 1150219, 1146616, 1146623, 1151694,\n", - " 1154063, 1152100, 1153030, 1150085, 1137746, 1146307, 1146304, 1159974,\n", - " 1152623, 1140521, 1155337, 1154123, 1157824, 1157833, 1152673, 1151617,\n", - " 1151623, 1148916, 1152959, 1145952, 1152903, 1152341, 1156816, 1138281,\n", - " 1136028, 1136029, 1158704, 1156623, 1152928, 1152890, 1143483, 1163490,\n", - " 1163489, 1150109, 1137405, 1150150, 1150159, 1149273, 1148040, 1155202,\n", - " 1149300, 1149794, 1149798, 1137048, 1148628, 1158530, 1158539, 1148382,\n", - " 1137458, 1149947, 1148243, 1155387, 1142047, 1156729, 1150971, 1150960,\n", - " 1158860, 1158857, 1150875, 1158916, 1156500, 1157057, 1157069, 1155408,\n", - " 1145191, 1145187, 1137819, 1150465, 1135231, 1149053, 1142221, 1135729,\n", - " 1152179, 1156629, 1156638, 1152738, 1150824, 1150828, 1151469, 1139525,\n", - " 1158304, 1158306, 1158308, 1158311, 1151271, 1155441, 1161735, 1150129,\n", - " 1154530, 1154537, 1156913, 1156207, 1151379, 1137912, 1155122, 1152527,\n", - " 1157183, 1155755, 1151424, 1146913, 1156463, 1168230, 1155626, 1155628,\n", - " 1158492, 1156563, 1154547, 1154550, 1154557, 1154555, 1136476, 1158824,\n", - " 1153715, 1148652, 1155646, 1143254, 1161216, 1154644, 1154648, 1146938,\n", - " 1151895, 1143189, 1155608, 1150981, 1150990, 1151030, 1153786, 1149907,\n", - " 1158192, 1159116, 1158347, 1145694, 1145681, 1137317, 1140913, 1134677,\n", - " 1134685, 1134682, 1134680, 1135601, 1148149, 1150664, 1150671, 1155848,\n", - " 1155852, 1158665, 1157684, 1146326, 1149146, 1140632, 1152209, 1167618,\n", - " 1140380, 1140374, 1157735, 1159132, 1157033, 1144843, 1142479, 1155971,\n", - " 1155975, 1161673, 1156812, 1161369, 1136898, 1136896, 1158886, 1140218,\n", - " 1157304, 1158815, 1158438, 1158447, 1156779, 1136487, 1136494, 1156669,\n", - " 1153808, 1156272, 1136642, 1134757, 1162170, 1145479, 1140049, 1158555,\n", - " 1153827, 1151140, 1161167, 1156516, 1165497, 1146126, 1138110, 1158268,\n", - " 1150011, 1155521, 1155529, 1155528, 1142487, 1159042, 1157945, 1162044,\n", - " 1153052, 1153045, 1171551, 1159738, 1163072, 1144158, 1142873, 1156101,\n", - " 1138393, 1150046, 1159475, 1145948, 1155479, 1154302, 1153514, 1153519,\n", - " 1147300, 1146870, 1157601, 1138161, 1164006, 1156784, 1149966, 1163881,\n", - " 1163396, 1166073, 1148771, 1140734, 1171515, 1157351, 1146063, 1163443,\n", - " 1164048, 1165309, 1170415, 1140643, 1148603, 1148607, 1168162, 1159646,\n", - " 1151872, 1155816, 1158643, 1158653, 1156177, 1156181, 1159032, 1165877,\n", - " 1152247, 1143729, 1162544, 1151218, 1168428, 1148560, 1144986, 1149023,\n", - " 1147830, 1146509, 1164580, 1152776, 1163527, 1141465, 1141471, 1147426,\n", - " 1147427, 1156739, 1157955, 1161022, 1150646, 1171051, 1144812, 1140112,\n", - " 1135567, 1142722, 1156300, 1167332, 1145728, 1145228, 1154695, 1169510,\n", - " 1144972, 1184047, 1165746, 1148124, 1139345, 1145902, 1145898, 1152203,\n", - " 1171230, 1171867, 1149565, 1158724, 1158722, 1158734, 1167503, 1154076,\n", - " 1168754, 1159268, 1145503, 1154924, 1167817, 1155172, 1155180, 1165011,\n", - " 1150515, 1150522, 1150518, 1157534, 1147758, 1147757, 1168447, 1157331,\n", - " 1180435, 1149452, 1158051, 1158052, 1158062, 1149847, 1157384, 1157388,\n", - " 1154866, 1152353, 1152360, 1165528, 1152544, 1168451, 1149402, 1148661,\n", - " 1148666, 1172669, 1173307, 1145037, 1154018, 1154027, 1152150, 1167857,\n", - " 1169572, 1151696, 1157153, 1157373, 1147711, 1178961, 1151850, 1148128,\n", - " 1148131, 1157593, 1181021, 1165120, 1172932, 1163990, 1166535, 1159100,\n", - " 1159102, 1171072, 1166682, 1166684, 1180133, 1183357, 1154148, 1167517,\n", - " 1149169, 1179860, 1178655, 1186117, 1143279, 1167658, 1167657, 1164956,\n", - " 1176487, 1181092, 1156550, 1177261, 1170177, 1181237, 1159404, 1153803,\n", - " 1177785, 1171323, 1151519, 1179807, 1182361, 1155262, 1157795, 1172034,\n", - " 1143341, 1151498, 1171623, 1171391, 1183256, 1157124, 1157074, 1181922,\n", - " 1158249, 1153898, 1178214, 1145626, 1172024, 1161914, 1149755, 1153609,\n", - " 1153605, 1157771, 1157772, 1160121, 1177832, 1177826, 1158771, 1158779,\n", - " 1158512, 1155890, 1155899, 1162988, 1157272, 1159878, 1140396, 1162253,\n", - " 1193121, 1160078, 1164231, 1189603, 1180019, 1181177, 1193452, 1156539,\n", - " 1139828, 1139831, 1185369, 1150269, 1154806, 1154812, 1151288, 1156055,\n", - " 1151972, 1181892, 1146392, 1146395, 1194031, 1149544, 1188371, 1189700,\n", - " 1182370, 1178526, 1169964, 1181949, 1166325, 1171345, 1194415, 1140992,\n", - " 1187687, 1151774, 1181687, 1192245, 1193098, 1162503, 1160339, 1178265,\n", - " 1156681, 1172423, 1158070, 1182816, 1176829, 1155959, 1155962, 1181660,\n", - " 1169831, 1182781, 1193831, 1157008, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1141424, 1136232, 1140282, 1140285, 1135926, 1135716, 1140785,\n", - " 1140799, 1139696, 1141758, 1137506, 1141250, 1136971, 1141440, 1143609,\n", - " 1149836, 1145366, 1143372, 1146646, 1150509, 1149216, 1155683, 1155686,\n", - " 1143820, 1147482, 1147483, 1144632, 1146995, 1153022, 1135947, 1148346,\n", - " 1152666, 1138347, 1147089, 1155018, 1155019, 1139365, 1139371, 1152425,\n", - " 1152427, 1134718, 1134662, 1137829, 1140537, 1138112, 1137254, 1137171,\n", - " 1138356, 1153456, 1140159, 1140020, 1135367, 1135202, 1141036, 1134794,\n", - " 1157443, 1138504, 1137693, 1136609, 1136619, 1139215, 1144395, 1135408,\n", - " 1157395, 1137441, 1135265, 1156159, 1148481, 1148484, 1141702, 1141705,\n", - " 1135579, 1135581, 1135583, 1141086, 1136098, 1135664, 1140240, 1138514,\n", - " 1153094, 1158136, 1154132, 1145132, 1156899, 1156904, 1139684, 1136362,\n", - " 1139878, 1157706, 1138436, 1138440, 1138456, 1138461, 1138449, 1136594,\n", - " 1149328, 1138847, 1147112, 1142611, 1142615, 1142616, 1160819, 1135619,\n", - " 1135631, 1148533, 1139855, 1139667, 1134992, 1142434, 1142788, 1158974,\n", - " 1143626, 1143631, 1139933, 1138148, 1155654, 1141997, 1152042, 1152044,\n", - " 1136058, 1140670, 1137741, 1137728, 1137743, 1146222, 1134750, 1134741,\n", - " 1136697, 1140224, 1141088, 1141100, 1149001, 1139889, 1156872, 1136397,\n", - " 1143221, 1143227, 1146832, 1152719, 1141695, 1141690, 1135860, 1135861,\n", - " 1136625, 1141224, 1141223, 1139386, 1163306, 1136917, 1139730, 1143673,\n", - " 1143675, 1137186, 1144232, 1144237, 1140592, 1144931, 1136752, 1168566,\n", - " 1144641, 1147844, 1139798, 1142058, 1141821, 1165093, 1143202, 1140166,\n", - " 1158742, 1149105, 1139190, 1138710, 1138708, 1140110, 1142913, 1144596,\n", - " 1148263, 1142451, 1157420, 1136867, 1136864, 1145310, 1141579, 1140885,\n", - " 1135327, 1140445, 1140432, 1144182, 1144865, 1146201, 1147153, 1136378,\n", - " 1149197, 1141365, 1141713, 1141718, 1141664, 1149090, 1149097, 1149101,\n", - " 1138298, 1144277, 1144279, 1139505, 1139510, 1139763, 1139127, 1145001,\n", - " 1143779, 1140977, 1141560, 1141565, 1147050, 1147047, 1145884, 1145873,\n", - " 1143551, 1152976, 1141925, 1146901, 1144242, 1140580, 1140585, 1141846,\n", - " 1139405, 1137571, 1143851, 1142097, 1146024, 1154328, 1141585, 1149928,\n", - " 1149933, 1141236, 1139990, 1143293, 1143294, 1147543, 1147540, 1148763,\n", - " 1147282, 1136330, 1149155, 1140346, 1140348, 1149366, 1148003, 1149608,\n", - " 1136160, 1138915, 1138923, 1157720, 1136836, 1141283, 1139301, 1144768,\n", - " 1144957, 1142149, 1142159, 1143345, 1144765, 1144611, 1144088, 1135757,\n", - " 1135876, 1150756, 1150758, 1144306, 1150294, 1144375, 1146523, 1143960,\n", - " 1143456, 1143470, 1143457, 1143937, 1140364, 1149569, 1168927, 1148971,\n", - " 1144222, 1147984, 1147999, 1146949, 1134899, 1134902, 1139252, 1147244,\n", - " 1148704, 1148715, 1148713, 1148719, 1141327, 1141836, 1143428, 1143434,\n", - " 1147056, 1149718, 1147971, 1147198, 1158226, 1158230, 1158235, 1143921,\n", - " 1148366, 1149871, 1154524, 1145240, 1145246, 1145751, 1138638, 1148397,\n", - " 1146178, 1151242, 1148223, 1152530, 1152537, 1151179, 1150438, 1149258,\n", - " 1148826, 1151860, 1149791, 1144202, 1165252, 1147794, 1152022, 1152023,\n", - " 1135519, 1139914, 1134873, 1142273, 1140561, 1147019, 1147021, 1147009,\n", - " 1147023, 1141949, 1141278, 1144819, 1151795, 1148744, 1137646, 1153574,\n", - " 1147653, 1168496, 1149414, 1149412, 1148288, 1148300, 1137716, 1135087,\n", - " 1148612, 1148623, 1154420, 1148180, 1148188, 1136247, 1139721, 1148726,\n", - " 1146549, 1146555, 1143888, 1148204, 1148101, 1171943, 1153188, 1153197,\n", - " 1145104, 1145111, 1155551, 1150935, 1152878, 1143092, 1144863, 1144851,\n", - " 1150352, 1155088, 1148095, 1147455, 1147442, 1151811, 1151816, 1152581,\n", - " 1151906, 1154183, 1141420, 1150630, 1151351, 1145079, 1148957, 1148955,\n", - " 1146969, 1146975, 1149359, 1153255, 1150219, 1146616, 1146623, 1151694,\n", - " 1154063, 1152100, 1153030, 1150085, 1137746, 1146307, 1146304, 1159974,\n", - " 1152623, 1140521, 1155337, 1154123, 1157824, 1157833, 1152673, 1151617,\n", - " 1151623, 1148916, 1152959, 1145952, 1152903, 1152341, 1156816, 1138281,\n", - " 1136028, 1136029, 1158704, 1156623, 1152928, 1152890, 1143483, 1163490,\n", - " 1163489, 1150109, 1137405, 1150150, 1150159, 1149273, 1148040, 1155202,\n", - " 1149300, 1149794, 1149798, 1137048, 1148628, 1158530, 1158539, 1148382,\n", - " 1137458, 1149947, 1148243, 1155387, 1142047, 1156729, 1150971, 1150960,\n", - " 1158860, 1158857, 1150875, 1158916, 1156500, 1157057, 1157069, 1155408,\n", - " 1145191, 1145187, 1137819, 1150465, 1135231, 1149053, 1142221, 1135729,\n", - " 1152179, 1156629, 1156638, 1152738, 1150824, 1150828, 1151469, 1139525,\n", - " 1158304, 1158306, 1158308, 1158311, 1151271, 1155441, 1161735, 1150129,\n", - " 1154530, 1154537, 1156913, 1156207, 1151379, 1137912, 1155122, 1152527,\n", - " 1157183, 1155755, 1151424, 1146913, 1156463, 1168230, 1155626, 1155628,\n", - " 1158492, 1156563, 1154547, 1154550, 1154557, 1154555, 1136476, 1158824,\n", - " 1153715, 1148652, 1155646, 1143254, 1161216, 1154644, 1154648, 1146938,\n", - " 1151895, 1143189, 1155608, 1150981, 1150990, 1151030, 1153786, 1149907,\n", - " 1158192, 1159116, 1158347, 1145694, 1145681, 1137317, 1140913, 1134677,\n", - " 1134685, 1134682, 1134680, 1135601, 1148149, 1150664, 1150671, 1155848,\n", - " 1155852, 1158665, 1157684, 1146326, 1149146, 1140632, 1152209, 1167618,\n", - " 1140380, 1140374, 1157735, 1159132, 1157033, 1144843, 1142479, 1155971,\n", - " 1155975, 1161673, 1156812, 1161369, 1136898, 1136896, 1158886, 1140218,\n", - " 1157304, 1158815, 1158438, 1158447, 1156779, 1136487, 1136494, 1156669,\n", - " 1153808, 1156272, 1136642, 1134757, 1162170, 1145479, 1140049, 1158555,\n", - " 1153827, 1151140, 1161167, 1156516, 1165497, 1146126, 1138110, 1158268,\n", - " 1150011, 1155521, 1155529, 1155528, 1142487, 1159042, 1157945, 1162044,\n", - " 1153052, 1153045, 1171551, 1159738, 1163072, 1144158, 1142873, 1156101,\n", - " 1138393, 1150046, 1159475, 1145948, 1155479, 1154302, 1153514, 1153519,\n", - " 1147300, 1146870, 1157601, 1138161, 1164006, 1156784, 1149966, 1163881,\n", - " 1163396, 1166073, 1148771, 1140734, 1171515, 1157351, 1146063, 1163443,\n", - " 1164048, 1165309, 1170415, 1140643, 1148603, 1148607, 1168162, 1159646,\n", - " 1151872, 1155816, 1158643, 1158653, 1156177, 1156181, 1159032, 1165877,\n", - " 1152247, 1143729, 1162544, 1151218, 1168428, 1148560, 1144986, 1149023,\n", - " 1147830, 1146509, 1164580, 1152776, 1163527, 1141465, 1141471, 1147426,\n", - " 1147427, 1156739, 1157955, 1161022, 1150646, 1171051, 1144812, 1140112,\n", - " 1135567, 1142722, 1156300, 1167332, 1145728, 1145228, 1154695, 1169510,\n", - " 1144972, 1184047, 1165746, 1148124, 1139345, 1145902, 1145898, 1152203,\n", - " 1171230, 1171867, 1149565, 1158724, 1158722, 1158734, 1167503, 1154076,\n", - " 1168754, 1159268, 1145503, 1154924, 1167817, 1155172, 1155180, 1165011,\n", - " 1150515, 1150522, 1150518, 1157534, 1147758, 1147757, 1168447, 1157331,\n", - " 1180435, 1149452, 1158051, 1158052, 1158062, 1149847, 1157384, 1157388,\n", - " 1154866, 1152353, 1152360, 1165528, 1152544, 1168451, 1149402, 1148661,\n", - " 1148666, 1172669, 1173307, 1145037, 1154018, 1154027, 1152150, 1167857,\n", - " 1169572, 1151696, 1157153, 1157373, 1147711, 1178961, 1151850, 1148128,\n", - " 1148131, 1157593, 1181021, 1165120, 1172932, 1163990, 1166535, 1159100,\n", - " 1159102, 1171072, 1166682, 1166684, 1180133, 1183357, 1154148, 1167517,\n", - " 1149169, 1179860, 1178655, 1186117, 1143279, 1167658, 1167657, 1164956,\n", - " 1176487, 1181092, 1156550, 1177261, 1170177, 1181237, 1159404, 1153803,\n", - " 1177785, 1171323, 1151519, 1179807, 1182361, 1155262, 1157795, 1172034,\n", - " 1143341, 1151498, 1171623, 1171391, 1183256, 1157124, 1157074, 1181922,\n", - " 1158249, 1153898, 1178214, 1145626, 1172024, 1161914, 1149755, 1153609,\n", - " 1153605, 1157771, 1157772, 1160121, 1177832, 1177826, 1158771, 1158779,\n", - " 1158512, 1155890, 1155899, 1162988, 1157272, 1159878, 1140396, 1162253,\n", - " 1193121, 1160078, 1164231, 1189603, 1180019, 1181177, 1193452, 1156539,\n", - " 1139828, 1139831, 1185369, 1150269, 1154806, 1154812, 1151288, 1156055,\n", - " 1151972, 1181892, 1146392, 1146395, 1194031, 1149544, 1188371, 1189700,\n", - " 1182370, 1178526, 1169964, 1181949, 1166325, 1171345, 1194415, 1140992,\n", - " 1187687, 1151774, 1181687, 1192245, 1193098, 1162503, 1160339, 1178265,\n", - " 1156681, 1172423, 1158070, 1182816, 1176829, 1155959, 1155962, 1181660,\n", - " 1169831, 1182781, 1193831, 1157008, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199439, 1198248, 1198731, 1195860, 1199282, 1202255, 1198832, 1201581,\n", - " 1201582, 1198023, 1200644, 1201015, 1201016, 1201660, 1197359, 1202803,\n", - " 1202804, 1198557, 1197516, 1196685, 1195726, 1196631, 1194642, 1194648,\n", - " 1195093, 1195511, 1195923, 1195259, 1195263, 1197930, 1199120, 1201992,\n", - " 1196031, 1198542, 1194956, 1195459, 1198306, 1194882, 1195895, 1196334,\n", - " 1196359, 1195325, 1196840, 1196171, 1195581, 1198163, 1199823, 1197265,\n", - " 1197273, 1194859, 1196750, 1198925, 1196305, 1197483, 1197256, 1197191,\n", - " 1200949, 1200959, 1199059, 1197285, 1197291, 1199185, 1194928, 1199695,\n", - " 1199685, 1197994, 1200076, 1199156, 1198406, 1198410, 1199579, 1200748,\n", - " 1199231, 1198763, 1201511, 1200670, 1196727, 1195771, 1195773, 1200596,\n", - " 1198811, 1201547, 1201824, 1198389, 1201156, 1200913, 1200915, 1202640,\n", - " 1199716, 1201737, 1195635, 1196645, 1200546, 1200555, 1199886, 1202138,\n", - " 1202092, 1200907, 1199976, 1195876, 1201291, 1198478, 1197553, 1203336,\n", - " 1200391, 1202308, 1200638, 1200627, 1195438, 1203112, 1195386, 1200928,\n", - " 1197822, 1199661, 1199659, 1203102, 1197735, 1202777, 1195063, 1195070,\n", - " 1197655, 1197335, 1195082, 1197039, 1198748], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199439, 1198248, 1198731, 1195860, 1199282, 1202255, 1198832, 1201581,\n", - " 1201582, 1198023, 1200644, 1201015, 1201016, 1201660, 1197359, 1202803,\n", - " 1202804, 1198557, 1197516, 1196685, 1195726, 1196631, 1194642, 1194648,\n", - " 1195093, 1195511, 1195923, 1195259, 1195263, 1197930, 1199120, 1201992,\n", - " 1196031, 1198542, 1194956, 1195459, 1198306, 1194882, 1195895, 1196334,\n", - " 1196359, 1195325, 1196840, 1196171, 1195581, 1198163, 1199823, 1197265,\n", - " 1197273, 1194859, 1196750, 1198925, 1196305, 1197483, 1197256, 1197191,\n", - " 1200949, 1200959, 1199059, 1197285, 1197291, 1199185, 1194928, 1199695,\n", - " 1199685, 1197994, 1200076, 1199156, 1198406, 1198410, 1199579, 1200748,\n", - " 1199231, 1198763, 1201511, 1200670, 1196727, 1195771, 1195773, 1200596,\n", - " 1198811, 1201547, 1201824, 1198389, 1201156, 1200913, 1200915, 1202640,\n", - " 1199716, 1201737, 1195635, 1196645, 1200546, 1200555, 1199886, 1202138,\n", - " 1202092, 1200907, 1199976, 1195876, 1201291, 1198478, 1197553, 1203336,\n", - " 1200391, 1202308, 1200638, 1200627, 1195438, 1203112, 1195386, 1200928,\n", - " 1197822, 1199661, 1199659, 1203102, 1197735, 1202777, 1195063, 1195070,\n", - " 1197655, 1197335, 1195082, 1197039, 1198748], device='cuda:0',\n", - " dtype=torch.int32))\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005216\n", - "sampling 0.004776\n", - "noi time: 0.001545\n", - "get_vertex_data call: 0.064772\n", - "noi group time: 0.003808\n", - "eoi_group_time: 0.016398\n", - "second half: 0.252359\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16819, 23835, 28259, ..., 1100728, 1119043, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16819, 23835, 28259, ..., 1100728, 1119043, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1211778, 1230249, ..., 1929229, 1931117, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1211778, 1230249, ..., 1929229, 1931117, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1136225, 1136228, 1140282, 1135926, 1135160, 1135716, 1135727,\n", - " 1140785, 1140799, 1141758, 1138335, 1136223, 1140297, 1136969, 1149831,\n", - " 1139808, 1145373, 1137936, 1145999, 1139141, 1143372, 1148987, 1150497,\n", - " 1139866, 1148576, 1149216, 1155683, 1155689, 1143820, 1147473, 1147483,\n", - " 1142885, 1152271, 1144636, 1135262, 1149038, 1135950, 1135119, 1146656,\n", - " 1152660, 1148546, 1141904, 1137219, 1139371, 1147211, 1138742, 1151545,\n", - " 1140537, 1140540, 1138112, 1137254, 1138353, 1138356, 1134735, 1140952,\n", - " 1135367, 1135370, 1135202, 1140766, 1134794, 1135956, 1136518, 1138504,\n", - " 1138508, 1137329, 1137342, 1143069, 1157103, 1135333, 1144395, 1157397,\n", - " 1152376, 1137441, 1137025, 1136928, 1148481, 1134841, 1135579, 1142600,\n", - " 1141075, 1141086, 1137953, 1137957, 1154132, 1145132, 1137016, 1135522,\n", - " 1138305, 1157703, 1138436, 1138440, 1138445, 1138461, 1138449, 1138462,\n", - " 1157190, 1136594, 1149328, 1135088, 1147112, 1147113, 1147116, 1142611,\n", - " 1142616, 1135352, 1156141, 1138185, 1158984, 1148531, 1148533, 1135769,\n", - " 1139843, 1136457, 1136458, 1139667, 1134992, 1142434, 1136551, 1152640,\n", - " 1135789, 1136728, 1144407, 1153543, 1153544, 1143625, 1139081, 1139085,\n", - " 1138648, 1138148, 1155648, 1152044, 1142299, 1142302, 1137734, 1137741,\n", - " 1134750, 1138240, 1140228, 1141088, 1141098, 1141100, 1144138, 1149001,\n", - " 1139889, 1145347, 1135291, 1143767, 1154855, 1137299, 1162705, 1143224,\n", - " 1143225, 1139025, 1139033, 1146832, 1152719, 1135860, 1140469, 1141224,\n", - " 1139380, 1139386, 1139730, 1143667, 1137186, 1137188, 1141161, 1141785,\n", - " 1152731, 1139495, 1144937, 1144941, 1144650, 1134979, 1134987, 1147850,\n", - " 1138482, 1141821, 1143153, 1145161, 1140173, 1158739, 1138469, 1138709,\n", - " 1138710, 1138715, 1140110, 1157416, 1144041, 1140885, 1144182, 1150906,\n", - " 1146201, 1158699, 1140501, 1147153, 1142640, 1142646, 1149193, 1141365,\n", - " 1141371, 1153068, 1149099, 1149101, 1138293, 1144277, 1139510, 1139763,\n", - " 1140093, 1145001, 1143779, 1140616, 1140976, 1140983, 1140990, 1146695,\n", - " 1141560, 1145873, 1143543, 1143551, 1152976, 1135457, 1139447, 1139453,\n", - " 1141925, 1146901, 1144242, 1141841, 1145974, 1143845, 1143851, 1146024,\n", - " 1146129, 1146140, 1154328, 1142533, 1149933, 1139990, 1143293, 1143294,\n", - " 1147541, 1147543, 1148763, 1147282, 1142829, 1142816, 1138660, 1149155,\n", - " 1140349, 1139408, 1139417, 1149608, 1149610, 1143051, 1143040, 1136836,\n", - " 1165623, 1139329, 1139328, 1142159, 1143345, 1144619, 1140837, 1140845,\n", - " 1144086, 1135872, 1150756, 1144306, 1143957, 1138018, 1143456, 1143937,\n", - " 1143807, 1147521, 1140364, 1168921, 1144219, 1147984, 1147995, 1147999,\n", - " 1134899, 1144003, 1144010, 1139252, 1145466, 1148704, 1142690, 1141327,\n", - " 1153701, 1147060, 1149725, 1147024, 1141131, 1145011, 1145012, 1158226,\n", - " 1143921, 1147880, 1145238, 1145751, 1145756, 1148384, 1146178, 1146180,\n", - " 1151239, 1151242, 1152530, 1150438, 1150445, 1149791, 1149777, 1144514,\n", - " 1144526, 1145839, 1150339, 1151988, 1151994, 1147794, 1147795, 1151480,\n", - " 1144888, 1146723, 1134879, 1148693, 1150127, 1147021, 1147023, 1135800,\n", - " 1144819, 1148744, 1153574, 1148461, 1147653, 1143552, 1146407, 1148300,\n", - " 1135079, 1139096, 1154420, 1158794, 1152563, 1136251, 1136247, 1139721,\n", - " 1139723, 1146682, 1146686, 1138871, 1138409, 1157968, 1157979, 1157983,\n", - " 1148720, 1139936, 1139938, 1139940, 1150052, 1148204, 1141733, 1153192,\n", - " 1153188, 1144849, 1150356, 1169594, 1148084, 1141022, 1147442, 1151816,\n", - " 1151821, 1152581, 1135307, 1151909, 1148498, 1149732, 1141420, 1150630,\n", - " 1151352, 1155164, 1147602, 1147738, 1149385, 1146969, 1149356, 1153249,\n", - " 1146623, 1151691, 1152849, 1146280, 1150086, 1137746, 1146307, 1152622,\n", - " 1140521, 1155140, 1149203, 1154123, 1151576, 1151627, 1151617, 1150578,\n", - " 1145273, 1136131, 1151441, 1148914, 1145952, 1145957, 1152903, 1152341,\n", - " 1146816, 1156816, 1138283, 1138279, 1152294, 1152300, 1136023, 1136028,\n", - " 1136031, 1158704, 1156619, 1156622, 1151188, 1151187, 1140675, 1152928,\n", - " 1150159, 1150164, 1148033, 1148040, 1149300, 1152607, 1155223, 1149794,\n", - " 1137048, 1148628, 1158530, 1158540, 1137458, 1149942, 1135698, 1153085,\n", - " 1142047, 1154381, 1156720, 1156723, 1156728, 1135434, 1157540, 1142385,\n", - " 1158860, 1150873, 1154929, 1156505, 1152397, 1157064, 1157069, 1155412,\n", - " 1145196, 1137809, 1139473, 1149054, 1151788, 1150824, 1150817, 1150828,\n", - " 1153415, 1135634, 1147810, 1139525, 1158306, 1158311, 1140421, 1155441,\n", - " 1155451, 1153359, 1162120, 1140877, 1154529, 1154530, 1150489, 1142755,\n", - " 1142764, 1156207, 1157642, 1151379, 1155122, 1152527, 1157172, 1157183,\n", - " 1153480, 1151424, 1145806, 1168230, 1155628, 1155630, 1158491, 1155572,\n", - " 1155582, 1158824, 1158325, 1148834, 1155646, 1143254, 1154250, 1154240,\n", - " 1154908, 1154909, 1143189, 1150371, 1155293, 1159622, 1151030, 1158578,\n", - " 1159003, 1153784, 1153786, 1159108, 1159116, 1159106, 1145682, 1145688,\n", - " 1145690, 1145681, 1137316, 1137323, 1140918, 1134677, 1135601, 1148149,\n", - " 1148159, 1150661, 1158665, 1158667, 1158669, 1157684, 1159258, 1152220,\n", - " 1159213, 1152498, 1140381, 1155975, 1135190, 1156812, 1161472, 1155392,\n", - " 1155403, 1149700, 1160163, 1153491, 1136896, 1158760, 1158764, 1140209,\n", - " 1158815, 1158437, 1158447, 1151615, 1136494, 1159244, 1156488, 1156490,\n", - " 1153808, 1136640, 1162167, 1156516, 1146126, 1155865, 1158006, 1155521,\n", - " 1155528, 1161539, 1135662, 1135652, 1142666, 1164158, 1167359, 1144270,\n", - " 1157946, 1160563, 1153052, 1153045, 1162835, 1162845, 1144159, 1156111,\n", - " 1138393, 1142679, 1142681, 1150046, 1149063, 1149070, 1145948, 1155479,\n", - " 1155480, 1154300, 1153519, 1147300, 1171987, 1157606, 1164006, 1156787,\n", - " 1149953, 1149963, 1163878, 1163407, 1139592, 1166073, 1148769, 1159760,\n", - " 1164052, 1140650, 1140643, 1148600, 1148603, 1148607, 1148598, 1144504,\n", - " 1158643, 1158653, 1159025, 1159029, 1159032, 1163742, 1152247, 1160605,\n", - " 1155588, 1156589, 1153924, 1144979, 1146500, 1164580, 1145137, 1141471,\n", - " 1141457, 1157050, 1182254, 1156737, 1156739, 1156744, 1157955, 1153648,\n", - " 1153663, 1150648, 1144812, 1153273, 1135567, 1164744, 1142722, 1156300,\n", - " 1144051, 1145728, 1145228, 1145229, 1154700, 1154701, 1146045, 1175801,\n", - " 1144973, 1169201, 1152624, 1145900, 1145902, 1153520, 1143402, 1143404,\n", - " 1171867, 1158722, 1162876, 1154076, 1167317, 1147338, 1144690, 1177930,\n", - " 1169602, 1167817, 1156308, 1166653, 1155170, 1154213, 1150515, 1150518,\n", - " 1156113, 1156119, 1144346, 1144336, 1157531, 1157534, 1138378, 1147751,\n", - " 1154670, 1154893, 1169162, 1138129, 1141048, 1141043, 1151674, 1172330,\n", - " 1154364, 1154352, 1149452, 1158623, 1173047, 1173050, 1172759, 1169948,\n", - " 1152353, 1152546, 1168400, 1149402, 1148667, 1167016, 1148335, 1182124,\n", - " 1173307, 1145033, 1169144, 1154028, 1152150, 1164974, 1159658, 1159655,\n", - " 1169572, 1169583, 1151697, 1157153, 1172111, 1147711, 1151850, 1147934,\n", - " 1157592, 1149247, 1170495, 1170490, 1189748, 1172961, 1171293, 1155739,\n", - " 1168392, 1168398, 1168604, 1172226, 1146755, 1180475, 1159091, 1166682,\n", - " 1154148, 1149169, 1179811, 1180600, 1143279, 1180393, 1185666, 1168481,\n", - " 1179233, 1171302, 1153803, 1186319, 1171396, 1182651, 1178571, 1158027,\n", - " 1161255, 1162129, 1155250, 1155262, 1172010, 1176798, 1154707, 1157792,\n", - " 1157803, 1157795, 1171623, 1163569, 1178361, 1155796, 1157126, 1157991,\n", - " 1180034, 1157072, 1178706, 1158253, 1153898, 1161846, 1134651, 1164563,\n", - " 1145626, 1163538, 1178757, 1179442, 1149755, 1146242, 1186957, 1157761,\n", - " 1187940, 1158512, 1183330, 1179635, 1158934, 1179991, 1155890, 1155895,\n", - " 1180849, 1162986, 1179924, 1140395, 1140399, 1182330, 1174999, 1167762,\n", - " 1168886, 1179836, 1171634, 1171644, 1160078, 1164231, 1182337, 1165082,\n", - " 1156861, 1170341, 1147179, 1172608, 1156162, 1179052, 1170034, 1156539,\n", - " 1170822, 1139831, 1170433, 1154806, 1154812, 1149668, 1191674, 1151284,\n", - " 1189687, 1156049, 1156055, 1190913, 1149544, 1188814, 1182370, 1148798,\n", - " 1181951, 1194454, 1171669, 1175030, 1159169, 1162502, 1169707, 1181834,\n", - " 1172122, 1152094, 1181649, 1178301, 1188286, 1179769, 1187536, 1194149,\n", - " 1167466, 1157008, 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1136225, 1136228, 1140282, 1135926, 1135160, 1135716, 1135727,\n", - " 1140785, 1140799, 1141758, 1138335, 1136223, 1140297, 1136969, 1149831,\n", - " 1139808, 1145373, 1137936, 1145999, 1139141, 1143372, 1148987, 1150497,\n", - " 1139866, 1148576, 1149216, 1155683, 1155689, 1143820, 1147473, 1147483,\n", - " 1142885, 1152271, 1144636, 1135262, 1149038, 1135950, 1135119, 1146656,\n", - " 1152660, 1148546, 1141904, 1137219, 1139371, 1147211, 1138742, 1151545,\n", - " 1140537, 1140540, 1138112, 1137254, 1138353, 1138356, 1134735, 1140952,\n", - " 1135367, 1135370, 1135202, 1140766, 1134794, 1135956, 1136518, 1138504,\n", - " 1138508, 1137329, 1137342, 1143069, 1157103, 1135333, 1144395, 1157397,\n", - " 1152376, 1137441, 1137025, 1136928, 1148481, 1134841, 1135579, 1142600,\n", - " 1141075, 1141086, 1137953, 1137957, 1154132, 1145132, 1137016, 1135522,\n", - " 1138305, 1157703, 1138436, 1138440, 1138445, 1138461, 1138449, 1138462,\n", - " 1157190, 1136594, 1149328, 1135088, 1147112, 1147113, 1147116, 1142611,\n", - " 1142616, 1135352, 1156141, 1138185, 1158984, 1148531, 1148533, 1135769,\n", - " 1139843, 1136457, 1136458, 1139667, 1134992, 1142434, 1136551, 1152640,\n", - " 1135789, 1136728, 1144407, 1153543, 1153544, 1143625, 1139081, 1139085,\n", - " 1138648, 1138148, 1155648, 1152044, 1142299, 1142302, 1137734, 1137741,\n", - " 1134750, 1138240, 1140228, 1141088, 1141098, 1141100, 1144138, 1149001,\n", - " 1139889, 1145347, 1135291, 1143767, 1154855, 1137299, 1162705, 1143224,\n", - " 1143225, 1139025, 1139033, 1146832, 1152719, 1135860, 1140469, 1141224,\n", - " 1139380, 1139386, 1139730, 1143667, 1137186, 1137188, 1141161, 1141785,\n", - " 1152731, 1139495, 1144937, 1144941, 1144650, 1134979, 1134987, 1147850,\n", - " 1138482, 1141821, 1143153, 1145161, 1140173, 1158739, 1138469, 1138709,\n", - " 1138710, 1138715, 1140110, 1157416, 1144041, 1140885, 1144182, 1150906,\n", - " 1146201, 1158699, 1140501, 1147153, 1142640, 1142646, 1149193, 1141365,\n", - " 1141371, 1153068, 1149099, 1149101, 1138293, 1144277, 1139510, 1139763,\n", - " 1140093, 1145001, 1143779, 1140616, 1140976, 1140983, 1140990, 1146695,\n", - " 1141560, 1145873, 1143543, 1143551, 1152976, 1135457, 1139447, 1139453,\n", - " 1141925, 1146901, 1144242, 1141841, 1145974, 1143845, 1143851, 1146024,\n", - " 1146129, 1146140, 1154328, 1142533, 1149933, 1139990, 1143293, 1143294,\n", - " 1147541, 1147543, 1148763, 1147282, 1142829, 1142816, 1138660, 1149155,\n", - " 1140349, 1139408, 1139417, 1149608, 1149610, 1143051, 1143040, 1136836,\n", - " 1165623, 1139329, 1139328, 1142159, 1143345, 1144619, 1140837, 1140845,\n", - " 1144086, 1135872, 1150756, 1144306, 1143957, 1138018, 1143456, 1143937,\n", - " 1143807, 1147521, 1140364, 1168921, 1144219, 1147984, 1147995, 1147999,\n", - " 1134899, 1144003, 1144010, 1139252, 1145466, 1148704, 1142690, 1141327,\n", - " 1153701, 1147060, 1149725, 1147024, 1141131, 1145011, 1145012, 1158226,\n", - " 1143921, 1147880, 1145238, 1145751, 1145756, 1148384, 1146178, 1146180,\n", - " 1151239, 1151242, 1152530, 1150438, 1150445, 1149791, 1149777, 1144514,\n", - " 1144526, 1145839, 1150339, 1151988, 1151994, 1147794, 1147795, 1151480,\n", - " 1144888, 1146723, 1134879, 1148693, 1150127, 1147021, 1147023, 1135800,\n", - " 1144819, 1148744, 1153574, 1148461, 1147653, 1143552, 1146407, 1148300,\n", - " 1135079, 1139096, 1154420, 1158794, 1152563, 1136251, 1136247, 1139721,\n", - " 1139723, 1146682, 1146686, 1138871, 1138409, 1157968, 1157979, 1157983,\n", - " 1148720, 1139936, 1139938, 1139940, 1150052, 1148204, 1141733, 1153192,\n", - " 1153188, 1144849, 1150356, 1169594, 1148084, 1141022, 1147442, 1151816,\n", - " 1151821, 1152581, 1135307, 1151909, 1148498, 1149732, 1141420, 1150630,\n", - " 1151352, 1155164, 1147602, 1147738, 1149385, 1146969, 1149356, 1153249,\n", - " 1146623, 1151691, 1152849, 1146280, 1150086, 1137746, 1146307, 1152622,\n", - " 1140521, 1155140, 1149203, 1154123, 1151576, 1151627, 1151617, 1150578,\n", - " 1145273, 1136131, 1151441, 1148914, 1145952, 1145957, 1152903, 1152341,\n", - " 1146816, 1156816, 1138283, 1138279, 1152294, 1152300, 1136023, 1136028,\n", - " 1136031, 1158704, 1156619, 1156622, 1151188, 1151187, 1140675, 1152928,\n", - " 1150159, 1150164, 1148033, 1148040, 1149300, 1152607, 1155223, 1149794,\n", - " 1137048, 1148628, 1158530, 1158540, 1137458, 1149942, 1135698, 1153085,\n", - " 1142047, 1154381, 1156720, 1156723, 1156728, 1135434, 1157540, 1142385,\n", - " 1158860, 1150873, 1154929, 1156505, 1152397, 1157064, 1157069, 1155412,\n", - " 1145196, 1137809, 1139473, 1149054, 1151788, 1150824, 1150817, 1150828,\n", - " 1153415, 1135634, 1147810, 1139525, 1158306, 1158311, 1140421, 1155441,\n", - " 1155451, 1153359, 1162120, 1140877, 1154529, 1154530, 1150489, 1142755,\n", - " 1142764, 1156207, 1157642, 1151379, 1155122, 1152527, 1157172, 1157183,\n", - " 1153480, 1151424, 1145806, 1168230, 1155628, 1155630, 1158491, 1155572,\n", - " 1155582, 1158824, 1158325, 1148834, 1155646, 1143254, 1154250, 1154240,\n", - " 1154908, 1154909, 1143189, 1150371, 1155293, 1159622, 1151030, 1158578,\n", - " 1159003, 1153784, 1153786, 1159108, 1159116, 1159106, 1145682, 1145688,\n", - " 1145690, 1145681, 1137316, 1137323, 1140918, 1134677, 1135601, 1148149,\n", - " 1148159, 1150661, 1158665, 1158667, 1158669, 1157684, 1159258, 1152220,\n", - " 1159213, 1152498, 1140381, 1155975, 1135190, 1156812, 1161472, 1155392,\n", - " 1155403, 1149700, 1160163, 1153491, 1136896, 1158760, 1158764, 1140209,\n", - " 1158815, 1158437, 1158447, 1151615, 1136494, 1159244, 1156488, 1156490,\n", - " 1153808, 1136640, 1162167, 1156516, 1146126, 1155865, 1158006, 1155521,\n", - " 1155528, 1161539, 1135662, 1135652, 1142666, 1164158, 1167359, 1144270,\n", - " 1157946, 1160563, 1153052, 1153045, 1162835, 1162845, 1144159, 1156111,\n", - " 1138393, 1142679, 1142681, 1150046, 1149063, 1149070, 1145948, 1155479,\n", - " 1155480, 1154300, 1153519, 1147300, 1171987, 1157606, 1164006, 1156787,\n", - " 1149953, 1149963, 1163878, 1163407, 1139592, 1166073, 1148769, 1159760,\n", - " 1164052, 1140650, 1140643, 1148600, 1148603, 1148607, 1148598, 1144504,\n", - " 1158643, 1158653, 1159025, 1159029, 1159032, 1163742, 1152247, 1160605,\n", - " 1155588, 1156589, 1153924, 1144979, 1146500, 1164580, 1145137, 1141471,\n", - " 1141457, 1157050, 1182254, 1156737, 1156739, 1156744, 1157955, 1153648,\n", - " 1153663, 1150648, 1144812, 1153273, 1135567, 1164744, 1142722, 1156300,\n", - " 1144051, 1145728, 1145228, 1145229, 1154700, 1154701, 1146045, 1175801,\n", - " 1144973, 1169201, 1152624, 1145900, 1145902, 1153520, 1143402, 1143404,\n", - " 1171867, 1158722, 1162876, 1154076, 1167317, 1147338, 1144690, 1177930,\n", - " 1169602, 1167817, 1156308, 1166653, 1155170, 1154213, 1150515, 1150518,\n", - " 1156113, 1156119, 1144346, 1144336, 1157531, 1157534, 1138378, 1147751,\n", - " 1154670, 1154893, 1169162, 1138129, 1141048, 1141043, 1151674, 1172330,\n", - " 1154364, 1154352, 1149452, 1158623, 1173047, 1173050, 1172759, 1169948,\n", - " 1152353, 1152546, 1168400, 1149402, 1148667, 1167016, 1148335, 1182124,\n", - " 1173307, 1145033, 1169144, 1154028, 1152150, 1164974, 1159658, 1159655,\n", - " 1169572, 1169583, 1151697, 1157153, 1172111, 1147711, 1151850, 1147934,\n", - " 1157592, 1149247, 1170495, 1170490, 1189748, 1172961, 1171293, 1155739,\n", - " 1168392, 1168398, 1168604, 1172226, 1146755, 1180475, 1159091, 1166682,\n", - " 1154148, 1149169, 1179811, 1180600, 1143279, 1180393, 1185666, 1168481,\n", - " 1179233, 1171302, 1153803, 1186319, 1171396, 1182651, 1178571, 1158027,\n", - " 1161255, 1162129, 1155250, 1155262, 1172010, 1176798, 1154707, 1157792,\n", - " 1157803, 1157795, 1171623, 1163569, 1178361, 1155796, 1157126, 1157991,\n", - " 1180034, 1157072, 1178706, 1158253, 1153898, 1161846, 1134651, 1164563,\n", - " 1145626, 1163538, 1178757, 1179442, 1149755, 1146242, 1186957, 1157761,\n", - " 1187940, 1158512, 1183330, 1179635, 1158934, 1179991, 1155890, 1155895,\n", - " 1180849, 1162986, 1179924, 1140395, 1140399, 1182330, 1174999, 1167762,\n", - " 1168886, 1179836, 1171634, 1171644, 1160078, 1164231, 1182337, 1165082,\n", - " 1156861, 1170341, 1147179, 1172608, 1156162, 1179052, 1170034, 1156539,\n", - " 1170822, 1139831, 1170433, 1154806, 1154812, 1149668, 1191674, 1151284,\n", - " 1189687, 1156049, 1156055, 1190913, 1149544, 1188814, 1182370, 1148798,\n", - " 1181951, 1194454, 1171669, 1175030, 1159169, 1162502, 1169707, 1181834,\n", - " 1172122, 1152094, 1181649, 1178301, 1188286, 1179769, 1187536, 1194149,\n", - " 1167466, 1157008, 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195442, 1197451, 1195397, 1195406, 1198242, 1197717, 1198730, 1198731,\n", - " 1198734, 1195858, 1199282, 1198458, 1198463, 1198832, 1201582, 1197777,\n", - " 1203047, 1195948, 1196871, 1194745, 1194770, 1195494, 1196631, 1195103,\n", - " 1195263, 1199135, 1196534, 1201992, 1196030, 1198543, 1201427, 1194952,\n", - " 1195457, 1194882, 1194880, 1199172, 1199171, 1195740, 1197856, 1196694,\n", - " 1195970, 1198643, 1198167, 1198169, 1199823, 1195270, 1197141, 1197136,\n", - " 1196255, 1197265, 1197273, 1195842, 1195850, 1198915, 1197474, 1200036,\n", - " 1200032, 1199710, 1196282, 1195351, 1198284, 1199330, 1196034, 1197291,\n", - " 1194928, 1195119, 1199685, 1196302, 1199152, 1198400, 1199579, 1196498,\n", - " 1196501, 1197601, 1196727, 1195773, 1202623, 1200894, 1198428, 1198811,\n", - " 1199555, 1199557, 1200612, 1200570, 1196477, 1199445, 1202630, 1201056,\n", - " 1200918, 1201405, 1202640, 1199716, 1199532, 1200546, 1200339, 1197100,\n", - " 1202529, 1199886, 1200690, 1199908, 1196768, 1200189, 1201291, 1198472,\n", - " 1198478, 1197553, 1203329, 1202304, 1196966, 1195679, 1195664, 1198932,\n", - " 1195418, 1197822, 1197821, 1194680, 1199469, 1198824, 1201475, 1199240,\n", - " 1197593, 1201886, 1200296, 1197652, 1197035, 1197872], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195442, 1197451, 1195397, 1195406, 1198242, 1197717, 1198730, 1198731,\n", - " 1198734, 1195858, 1199282, 1198458, 1198463, 1198832, 1201582, 1197777,\n", - " 1203047, 1195948, 1196871, 1194745, 1194770, 1195494, 1196631, 1195103,\n", - " 1195263, 1199135, 1196534, 1201992, 1196030, 1198543, 1201427, 1194952,\n", - " 1195457, 1194882, 1194880, 1199172, 1199171, 1195740, 1197856, 1196694,\n", - " 1195970, 1198643, 1198167, 1198169, 1199823, 1195270, 1197141, 1197136,\n", - " 1196255, 1197265, 1197273, 1195842, 1195850, 1198915, 1197474, 1200036,\n", - " 1200032, 1199710, 1196282, 1195351, 1198284, 1199330, 1196034, 1197291,\n", - " 1194928, 1195119, 1199685, 1196302, 1199152, 1198400, 1199579, 1196498,\n", - " 1196501, 1197601, 1196727, 1195773, 1202623, 1200894, 1198428, 1198811,\n", - " 1199555, 1199557, 1200612, 1200570, 1196477, 1199445, 1202630, 1201056,\n", - " 1200918, 1201405, 1202640, 1199716, 1199532, 1200546, 1200339, 1197100,\n", - " 1202529, 1199886, 1200690, 1199908, 1196768, 1200189, 1201291, 1198472,\n", - " 1198478, 1197553, 1203329, 1202304, 1196966, 1195679, 1195664, 1198932,\n", - " 1195418, 1197822, 1197821, 1194680, 1199469, 1198824, 1201475, 1199240,\n", - " 1197593, 1201886, 1200296, 1197652, 1197035, 1197872], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 1.5618e-01, -3.1472e-04, 5.0962e-01, ..., 6.3640e-02,\n", - " -1.6380e-03, -3.8159e-03],\n", - " [ 1.5909e-01, -1.6151e-04, 4.4616e-01, ..., 1.2431e-01,\n", - " -2.5891e-03, -3.8731e-03],\n", - " [ 1.7596e-01, -3.5311e-04, 6.1203e-01, ..., 8.0340e-02,\n", - " -1.8355e-03, -4.5960e-03],\n", - " ...,\n", - " [ 1.7269e-01, -3.4343e-04, 5.3881e-01, ..., 5.7106e-02,\n", - " -1.5565e-03, -4.1279e-03],\n", - " [ 1.4665e-01, -2.5287e-04, 4.6079e-01, ..., 1.2009e-01,\n", - " -2.4106e-03, -3.8640e-03],\n", - " [ 2.9373e-01, -9.4085e-04, 8.8808e-01, ..., 3.3441e-02,\n", - " -1.3231e-03, -6.5409e-03]], device='cuda:0'), 'paper': tensor([[-5.5951e-03, 2.8548e+00, 3.0372e+00, ..., 2.7591e+00,\n", - " -4.2473e-02, 1.4771e+00],\n", - " [-3.7388e-03, 8.6817e-01, 5.9696e-01, ..., -6.7653e-03,\n", - " -1.4894e-02, -4.5201e-03],\n", - " [-4.6318e-03, 5.4676e-01, 7.5483e-01, ..., -7.1013e-03,\n", - " -1.6605e-02, -7.0008e-03],\n", - " ...,\n", - " [-2.4276e-03, 1.5489e+00, 2.2734e-01, ..., -6.9845e-03,\n", - " -2.0484e-02, -3.5922e-04],\n", - " [ 5.5221e-02, 2.2462e+00, 1.6808e+00, ..., -4.5095e-04,\n", - " -3.0054e-02, 8.5426e-01],\n", - " [-5.0538e-03, 3.8616e+00, 2.7032e+00, ..., 5.2975e+00,\n", - " -5.5538e-02, 3.3620e+00]], device='cuda:0'), 'author': tensor([[-5.3376e-03, 5.6218e-01, 3.5569e-04, ..., 1.1310e+00,\n", - " 1.2410e-01, -3.9716e-03],\n", - " [-1.7257e-03, 2.8658e-01, 4.8988e-02, ..., 1.1342e+00,\n", - " 2.4808e-01, -1.4063e-03],\n", - " [-4.6994e-04, 2.7382e-02, 1.1459e-01, ..., 1.5975e-01,\n", - " 5.6292e-04, -6.6914e-04],\n", - " ...,\n", - " [-2.1332e-03, 2.5272e-01, 1.2292e-01, ..., 1.4199e+00,\n", - " 2.1455e-01, -2.0714e-03],\n", - " [-8.8278e-04, 1.8383e-01, 1.4199e-01, ..., 1.2047e+00,\n", - " 4.1184e-01, -3.3056e-04],\n", - " [-1.4280e-03, 2.3146e-01, 1.1802e-01, ..., 1.2527e+00,\n", - " 3.4264e-01, -5.2775e-04]], device='cuda:0'), 'field_of_study': tensor([[-0.0040, 0.7011, 0.2571, ..., -0.0067, 0.2616, 0.5759],\n", - " [-0.0024, 0.4844, 0.2182, ..., -0.0086, 0.3706, 0.3444],\n", - " [-0.0018, 0.6050, 0.3290, ..., -0.0062, 0.1156, 0.4864],\n", - " ...,\n", - " [-0.0019, 0.6500, 0.2068, ..., -0.0083, 0.3132, 0.5679],\n", - " [-0.0012, 0.7501, 0.2807, ..., -0.0098, 0.4322, 0.6136],\n", - " [ 0.1226, 0.7179, 0.2025, ..., -0.0100, 0.5545, 0.0221]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 141, 94, 86, 484, 306, 365, 484, 275, 396, 396, 206, 206,\n", - " 529, 584, 931, 680, 680, 1022, 1022, 1022, 1314, 1314, 996, 1251,\n", - " 1235, 1235, 1109, 1171, 1239, 1561, 1561, 1225, 1225, 1225, 1438, 1518,\n", - " 1660, 1468, 1549, 1549, 1549, 1549, 1775, 1668, 1668, 1668, 1769, 1697,\n", - " 1697, 1762, 1708, 1703, 1703, 1656, 1736, 1736, 1889, 1791, 1860, 1860,\n", - " 1951, 1845, 1831, 2041, 1968, 2003, 2158, 1938, 2004, 2004, 2004, 1958,\n", - " 1958, 2141, 2004, 2004, 2108, 2217, 2363, 2361, 2453, 2256, 2389, 2562,\n", - " 2562, 2562, 2476, 2576, 2576, 2802, 2715, 2838, 2595, 2595, 2595, 2951,\n", - " 2791, 3092, 2945, 3251, 3137, 3116, 3261, 3273, 3273, 3273, 3281, 3363,\n", - " 3363, 3569, 3569, 3456, 3287, 3539, 3332, 3597, 3599, 3382, 3382, 3382,\n", - " 3866, 3785, 4022, 4117, 4098, 4232, 4081, 4152, 4256, 4213, 4283, 4310,\n", - " 4296, 4339, 4292, 4292, 4296, 4358, 4438, 4317, 4303, 4303, 4457, 4362,\n", - " 4450, 4410, 4655, 4644, 4688, 4777, 4777, 4645, 4758, 4758, 4886, 5006,\n", - " 5282, 5148, 4918, 5203, 5079, 5435, 5467, 5026, 5093, 5561, 5168, 5480,\n", - " 5202, 5540, 5540, 5462, 5728, 5710, 5609, 5609, 5512, 5596, 5596, 5596,\n", - " 5632, 5697],\n", - " [ 41, 104, 13, 68, 7, 49, 22, 16, 101, 80, 88, 118,\n", - " 64, 40, 120, 113, 67, 6, 70, 79, 75, 85, 116, 84,\n", - " 109, 86, 108, 89, 121, 54, 12, 0, 61, 32, 26, 1,\n", - " 95, 62, 33, 3, 99, 122, 22, 81, 113, 115, 105, 24,\n", - " 124, 124, 36, 23, 24, 19, 44, 104, 90, 74, 1, 124,\n", - " 74, 50, 124, 103, 114, 88, 74, 114, 79, 10, 111, 57,\n", - " 121, 65, 46, 33, 14, 112, 82, 56, 76, 82, 63, 8,\n", - " 2, 119, 74, 96, 25, 111, 50, 50, 79, 43, 69, 94,\n", - " 47, 39, 98, 79, 105, 55, 113, 106, 78, 85, 123, 41,\n", - " 123, 23, 124, 74, 110, 108, 53, 66, 58, 34, 97, 77,\n", - " 107, 65, 86, 35, 105, 17, 4, 17, 17, 91, 17, 17,\n", - " 92, 83, 31, 78, 21, 117, 87, 99, 93, 20, 74, 30,\n", - " 45, 72, 108, 18, 14, 9, 22, 88, 51, 79, 60, 5,\n", - " 37, 37, 74, 79, 29, 42, 102, 60, 83, 38, 74, 48,\n", - " 74, 15, 27, 92, 125, 11, 100, 71, 59, 106, 52, 73,\n", - " 75, 28]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1030, 2836, 3184, ..., 662, 7165, 4214],\n", - " [ 108, 18, 222, ..., 7181, 7142, 7192]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 19, 52, 41, ..., 104, 83, 105],\n", - " [ 35, 134, 154, ..., 5624, 5683, 5688]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 108, 108, 108, ..., 7092, 7092, 7080],\n", - " [ 433, 502, 820, ..., 389, 850, 243]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 689, 190, 291, ..., 60, 302, 534],\n", - " [ 210, 121, 55, ..., 7232, 7188, 7231]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2443, 5409, 6974, ..., 2951, 5714, 5811],\n", - " [ 86, 90, 78, ..., 5677, 5568, 5656]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 108, 108, 149, ..., 7092, 7092, 7198],\n", - " [1027, 1030, 1755, ..., 7134, 7194, 40]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 86, 86, 86, ..., 5690, 5690, 5690],\n", - " [2456, 2499, 2739, ..., 4204, 4126, 4594]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006074\n", - "sampling 0.005922\n", - "noi time: 0.001975\n", - "get_vertex_data call: 0.030687\n", - "noi group time: 0.003779\n", - "eoi_group_time: 0.01418\n", - "second half: 0.224603\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 14491, 24187, 32616, ..., 1126550, 1130624, 1130498],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 14491, 24187, 32616, ..., 1126550, 1130624, 1130498],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208584, 1210552, 1231437, ..., 1927252, 1937986, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208584, 1210552, 1231437, ..., 1927252, 1937986, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137212, 1136228, 1136230, ..., 1184675, 1182401, 1187035],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137212, 1136228, 1136230, ..., 1184675, 1182401, 1187035],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195442, 1198721, 1198732, 1199282, 1198459, 1202255, 1201577, 1194626,\n", - " 1194629, 1201016, 1203047, 1197232, 1202804, 1198557, 1196685, 1194743,\n", - " 1198188, 1196624, 1196631, 1194642, 1194648, 1196586, 1195514, 1195263,\n", - " 1197930, 1197933, 1201992, 1196031, 1199519, 1197760, 1195888, 1195895,\n", - " 1194754, 1195989, 1197807, 1198950, 1198163, 1199810, 1195273, 1196747,\n", - " 1195850, 1198915, 1195541, 1198195, 1196316, 1199317, 1200037, 1195918,\n", - " 1199699, 1198280, 1199339, 1200949, 1199059, 1199685, 1199628, 1200878,\n", - " 1200403, 1200748, 1199231, 1200060, 1201511, 1196508, 1199023, 1197970,\n", - " 1196727, 1195771, 1195773, 1200895, 1198428, 1200154, 1199410, 1198811,\n", - " 1199555, 1201824, 1202430, 1200570, 1195599, 1198389, 1202629, 1201056,\n", - " 1200918, 1202640, 1200557, 1197102, 1201841, 1197040, 1199908, 1200200,\n", - " 1202239, 1202706, 1195886, 1201590, 1199606, 1195006, 1196929, 1198929,\n", - " 1200680, 1201321, 1200928, 1197816, 1198127, 1198967, 1203102, 1201138,\n", - " 1194720, 1194724, 1198147, 1198824, 1198819, 1199232, 1195370, 1197652,\n", - " 1201361, 1197872], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195442, 1198721, 1198732, 1199282, 1198459, 1202255, 1201577, 1194626,\n", - " 1194629, 1201016, 1203047, 1197232, 1202804, 1198557, 1196685, 1194743,\n", - " 1198188, 1196624, 1196631, 1194642, 1194648, 1196586, 1195514, 1195263,\n", - " 1197930, 1197933, 1201992, 1196031, 1199519, 1197760, 1195888, 1195895,\n", - " 1194754, 1195989, 1197807, 1198950, 1198163, 1199810, 1195273, 1196747,\n", - " 1195850, 1198915, 1195541, 1198195, 1196316, 1199317, 1200037, 1195918,\n", - " 1199699, 1198280, 1199339, 1200949, 1199059, 1199685, 1199628, 1200878,\n", - " 1200403, 1200748, 1199231, 1200060, 1201511, 1196508, 1199023, 1197970,\n", - " 1196727, 1195771, 1195773, 1200895, 1198428, 1200154, 1199410, 1198811,\n", - " 1199555, 1201824, 1202430, 1200570, 1195599, 1198389, 1202629, 1201056,\n", - " 1200918, 1202640, 1200557, 1197102, 1201841, 1197040, 1199908, 1200200,\n", - " 1202239, 1202706, 1195886, 1201590, 1199606, 1195006, 1196929, 1198929,\n", - " 1200680, 1201321, 1200928, 1197816, 1198127, 1198967, 1203102, 1201138,\n", - " 1194720, 1194724, 1198147, 1198824, 1198819, 1199232, 1195370, 1197652,\n", - " 1201361, 1197872], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.5763e-01, -2.5737e-04, 6.1846e-01, ..., 5.0920e-02,\n", - " -1.3589e-03, -4.3213e-03],\n", - " [ 1.1172e-01, -1.5978e-04, 4.8818e-01, ..., 4.7870e-02,\n", - " -1.2374e-03, -3.5541e-03],\n", - " [ 1.3612e-01, -3.4438e-04, 5.8945e-01, ..., 6.0047e-02,\n", - " -1.6783e-03, -3.9373e-03],\n", - " ...,\n", - " [ 1.7681e-01, -4.4368e-04, 5.9966e-01, ..., 7.7358e-02,\n", - " -1.7854e-03, -4.5126e-03],\n", - " [ 1.1422e-01, 2.5563e-02, 5.8134e-01, ..., 8.2881e-02,\n", - " -1.3806e-03, -3.8984e-03],\n", - " [ 3.2628e-02, -1.8917e-04, 6.5057e-02, ..., 3.7059e-02,\n", - " -1.0314e-03, -1.4317e-03]], device='cuda:0'), 'paper': tensor([[-3.2692e-03, 1.5179e+00, 7.9863e-01, ..., -1.1558e-02,\n", - " -2.1714e-02, -1.0304e-02],\n", - " [ 2.8937e-01, 1.0963e+00, 1.1575e-01, ..., -1.0385e-02,\n", - " -1.7703e-02, 2.9530e-01],\n", - " [-1.3797e-02, -1.4645e-03, 1.6373e+00, ..., -7.9391e-03,\n", - " -2.4724e-02, -1.8234e-02],\n", - " ...,\n", - " [ 2.1081e-02, 1.0814e+00, 2.3365e-01, ..., -7.3318e-03,\n", - " -1.4495e-02, 8.8237e-02],\n", - " [-3.0458e-03, 9.7831e-01, 6.2191e-01, ..., -4.3298e-03,\n", - " -1.8557e-02, -2.0278e-03],\n", - " [-5.5616e-03, 3.7931e+00, 2.6026e+00, ..., 5.2091e+00,\n", - " -5.4528e-02, 3.2369e+00]], device='cuda:0'), 'author': tensor([[-4.6994e-04, 2.7382e-02, 1.1459e-01, ..., 1.5975e-01,\n", - " 5.6292e-04, -6.6914e-04],\n", - " [-2.0458e-03, 2.1361e-01, 8.8853e-02, ..., 1.1819e+00,\n", - " 2.2842e-01, -2.0175e-03],\n", - " [-1.9208e-03, 2.7360e-01, 9.1330e-02, ..., 1.2384e+00,\n", - " 1.4647e-01, -1.7421e-03],\n", - " ...,\n", - " [-1.2292e-03, 1.7705e-01, 2.2129e-01, ..., 1.3087e+00,\n", - " 2.8807e-01, -1.2053e-03],\n", - " [-4.6994e-04, 2.7382e-02, 1.1459e-01, ..., 1.5975e-01,\n", - " 5.6292e-04, -6.6914e-04],\n", - " [-4.6994e-04, 2.7382e-02, 1.1459e-01, ..., 1.5975e-01,\n", - " 5.6292e-04, -6.6914e-04]], device='cuda:0'), 'field_of_study': tensor([[-0.0032, 0.6871, 0.2601, ..., -0.0076, 0.2377, 0.5613],\n", - " [-0.0019, 0.6629, 0.3755, ..., -0.0089, 0.3548, 0.4908],\n", - " [-0.0010, 0.7561, 0.3788, ..., -0.0080, 0.3402, 0.4787],\n", - " ...,\n", - " [-0.0014, 0.5452, 0.1754, ..., -0.0074, 0.4607, 0.3836],\n", - " [-0.0020, 0.3990, 0.0341, ..., -0.0060, 0.2446, 0.3360],\n", - " [-0.0020, 0.3990, 0.0341, ..., -0.0060, 0.2446, 0.3360]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 148, 118, 26, 73, 73, 73, 108, 427, 196, 196, 372, 267,\n", - " 406, 406, 328, 445, 682, 507, 507, 494, 549, 549, 735, 844,\n", - " 688, 456, 456, 469, 469, 823, 823, 730, 877, 1015, 1233, 1203,\n", - " 1145, 1270, 1046, 1281, 1050, 1270, 1057, 1016, 1225, 1274, 1225, 1383,\n", - " 1451, 1453, 1675, 1568, 1522, 1522, 1522, 1444, 1444, 1614, 1879, 1744,\n", - " 1591, 1767, 1767, 1767, 1767, 1767, 1842, 1896, 1777, 1838, 1892, 1892,\n", - " 1888, 1888, 1926, 1917, 1917, 2008, 2008, 2008, 1881, 2011, 1975, 2048,\n", - " 2127, 1989, 1989, 2069, 2162, 2246, 2044, 2044, 2212, 2269, 2300, 2282,\n", - " 2235, 2386, 2426, 2423, 2423, 2609, 2413, 2464, 2464, 2464, 2640, 2749,\n", - " 2547, 2819, 2767, 2767, 2882, 3011, 3011, 2962, 2962, 3300, 3296, 3156,\n", - " 3055, 3055, 3328, 3263, 3127, 3466, 3466, 3089, 3428, 3290, 3528, 3568,\n", - " 3654, 3652, 3545, 3712, 3738, 3906, 3906, 3906, 4041, 4231, 4134, 4407,\n", - " 4255, 4408, 4329, 4572, 4582, 4495, 4774, 4520, 4590, 4526, 4628, 4531,\n", - " 4587, 4643, 4914, 5067, 4793, 4793, 5023, 4978, 5024, 5024, 5080, 5294,\n", - " 5224, 5281, 5281, 5342],\n", - " [ 109, 7, 54, 32, 111, 73, 108, 88, 36, 59, 56, 88,\n", - " 82, 88, 24, 1, 20, 68, 36, 38, 11, 74, 88, 78,\n", - " 7, 62, 58, 72, 92, 65, 113, 15, 3, 78, 64, 46,\n", - " 71, 108, 25, 105, 45, 19, 94, 77, 11, 36, 74, 42,\n", - " 61, 23, 1, 3, 90, 61, 87, 51, 22, 53, 95, 107,\n", - " 84, 27, 71, 48, 51, 6, 76, 8, 55, 105, 23, 85,\n", - " 17, 35, 14, 88, 29, 111, 100, 102, 18, 78, 94, 44,\n", - " 21, 70, 88, 80, 79, 5, 104, 8, 26, 84, 41, 109,\n", - " 31, 63, 101, 18, 43, 73, 3, 33, 34, 54, 84, 88,\n", - " 94, 49, 50, 110, 0, 21, 64, 91, 37, 69, 88, 108,\n", - " 105, 67, 68, 6, 86, 23, 83, 4, 26, 5, 45, 52,\n", - " 10, 75, 84, 13, 23, 98, 16, 26, 106, 51, 64, 47,\n", - " 40, 93, 64, 2, 97, 99, 22, 60, 18, 64, 23, 18,\n", - " 57, 96, 9, 39, 89, 112, 66, 81, 26, 23, 64, 28,\n", - " 12, 103, 30, 4]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 197, 1638, 3644, ..., 2400, 2568, 3307],\n", - " [ 73, 21, 369, ..., 8504, 8635, 8693]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 113, 113, 3, ..., 88, 3, 3],\n", - " [ 0, 39, 46, ..., 5377, 5320, 5371]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 11, 11, 11, ..., 8618, 8618, 8618],\n", - " [ 10, 365, 658, ..., 832, 365, 681]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 95, 330, 1005, ..., 861, 611, 1003],\n", - " [ 183, 410, 261, ..., 8668, 8699, 8517]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[7304, 7863, 3307, ..., 1224, 8463, 2479],\n", - " [ 35, 143, 44, ..., 5347, 5342, 5290]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 389, 389, 53, ..., 8635, 8635, 8624],\n", - " [1330, 1694, 128, ..., 4819, 5370, 6251]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 148, 118, 118, ..., 5281, 5349, 5342],\n", - " [3717, 595, 3568, ..., 7496, 5228, 8463]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.003673\n", - "sampling 0.00359\n", - "noi time: 0.000673\n", - "get_vertex_data call: 0.013792\n", - "noi group time: 0.001851\n", - "eoi_group_time: 0.011041\n", - "second half: 0.110849\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 23829, 31145, 24187, ..., 1119184, 1126559, 1119684],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 23829, 31145, 24187, ..., 1119184, 1126559, 1119684],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1217957, 1203800, 1215823, ..., 1938519, 1935119, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1217957, 1203800, 1215823, ..., 1938519, 1935119, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137213, 1141424, 1136228, 1136230, 1135926, 1135165, 1135160, 1135716,\n", - " 1137784, 1137791, 1141751, 1141756, 1141758, 1138335, 1136223, 1141257,\n", - " 1141250, 1136969, 1141443, 1143600, 1139811, 1137946, 1137947, 1143372,\n", - " 1139615, 1139608, 1140783, 1150497, 1142963, 1135376, 1136948, 1149228,\n", - " 1142947, 1147949, 1155683, 1155689, 1143820, 1149644, 1149646, 1147473,\n", - " 1147483, 1142885, 1152257, 1144636, 1135262, 1146992, 1153012, 1135947,\n", - " 1135111, 1148346, 1146656, 1136125, 1147089, 1147095, 1147091, 1155018,\n", - " 1147202, 1147211, 1136674, 1136679, 1152427, 1146382, 1140540, 1138112,\n", - " 1138118, 1138119, 1137254, 1137177, 1149456, 1140159, 1134720, 1134728,\n", - " 1134735, 1135909, 1135915, 1135367, 1135202, 1140767, 1154739, 1134967,\n", - " 1141036, 1134794, 1157443, 1143377, 1138504, 1138508, 1137329, 1137693,\n", - " 1144395, 1136816, 1137529, 1157397, 1152376, 1136662, 1135268, 1148484,\n", - " 1139161, 1141702, 1135579, 1135583, 1141086, 1136105, 1135668, 1153094,\n", - " 1137957, 1158136, 1135499, 1137019, 1156899, 1138306, 1138314, 1139878,\n", - " 1138436, 1138440, 1138461, 1138449, 1138462, 1136594, 1135134, 1135123,\n", - " 1149328, 1138844, 1138846, 1156603, 1147112, 1142611, 1135355, 1138185,\n", - " 1158984, 1145842, 1148531, 1137409, 1141532, 1138067, 1138073, 1134992,\n", - " 1142434, 1136546, 1148805, 1139755, 1136734, 1140204, 1158971, 1158974,\n", - " 1142906, 1159009, 1159012, 1159019, 1141065, 1141070, 1153543, 1143631,\n", - " 1138642, 1138154, 1146075, 1140557, 1141985, 1152042, 1152044, 1139063,\n", - " 1139064, 1136057, 1136051, 1140670, 1137734, 1137728, 1134750, 1138255,\n", - " 1135549, 1162958, 1144130, 1149001, 1139889, 1145356, 1141980, 1141974,\n", - " 1143767, 1154863, 1143706, 1143224, 1137668, 1137670, 1139025, 1140009,\n", - " 1146834, 1146844, 1146847, 1135860, 1135865, 1136426, 1136627, 1140467,\n", - " 1141224, 1141891, 1139386, 1136917, 1139741, 1143667, 1137196, 1137188,\n", - " 1144237, 1146449, 1141785, 1141786, 1139495, 1136760, 1141609, 1141300,\n", - " 1134987, 1136854, 1144428, 1144420, 1141821, 1138476, 1149111, 1142713,\n", - " 1138708, 1142913, 1137661, 1138423, 1143113, 1148443, 1144596, 1136866,\n", - " 1145298, 1144044, 1141579, 1141398, 1144182, 1144179, 1137614, 1137610,\n", - " 1150906, 1166711, 1139559, 1140501, 1147153, 1136378, 1142650, 1162804,\n", - " 1141365, 1141367, 1141664, 1149090, 1139022, 1144279, 1139508, 1139510,\n", - " 1139769, 1139774, 1140093, 1139127, 1144992, 1144997, 1145000, 1145001,\n", - " 1140619, 1140990, 1147050, 1145885, 1145873, 1152976, 1152988, 1142556,\n", - " 1141925, 1144241, 1144242, 1145328, 1140580, 1137149, 1139405, 1137570,\n", - " 1141390, 1145980, 1145974, 1146005, 1142098, 1146024, 1138085, 1146140,\n", - " 1146141, 1142533, 1149933, 1147086, 1139990, 1146302, 1143293, 1143283,\n", - " 1151124, 1147541, 1147543, 1147150, 1148761, 1147282, 1142816, 1142629,\n", - " 1149366, 1148003, 1149608, 1138927, 1136836, 1146099, 1139298, 1144957,\n", - " 1143345, 1144765, 1145818, 1139969, 1135872, 1135876, 1150294, 1150300,\n", - " 1150301, 1146514, 1146523, 1146526, 1143456, 1143470, 1143457, 1142997,\n", - " 1143937, 1147574, 1140360, 1140364, 1137990, 1143083, 1148965, 1148966,\n", - " 1144222, 1147984, 1147999, 1134909, 1144003, 1139252, 1139258, 1139249,\n", - " 1145467, 1147233, 1148704, 1142697, 1141319, 1141836, 1152328, 1143434,\n", - " 1147071, 1149714, 1147025, 1143826, 1142858, 1141131, 1139547, 1158226,\n", - " 1158228, 1150452, 1143922, 1147880, 1148362, 1154526, 1145240, 1145246,\n", - " 1145751, 1142370, 1146152, 1148391, 1146178, 1138854, 1138858, 1151242,\n", - " 1148215, 1148214, 1148223, 1152530, 1152538, 1150445, 1149258, 1148928,\n", - " 1148826, 1148827, 1156470, 1154438, 1149791, 1144526, 1141347, 1150342,\n", - " 1152013, 1144203, 1165252, 1147794, 1151480, 1152022, 1152024, 1152027,\n", - " 1144884, 1154271, 1145255, 1135516, 1134869, 1150127, 1147019, 1147021,\n", - " 1147023, 1141949, 1150736, 1154976, 1154979, 1143560, 1143565, 1146412,\n", - " 1148288, 1148294, 1148300, 1152070, 1137724, 1135072, 1164883, 1139096,\n", - " 1152561, 1136247, 1139721, 1139718, 1146676, 1152441, 1148724, 1148726,\n", - " 1168973, 1150052, 1143983, 1148204, 1153181, 1171943, 1153124, 1153192,\n", - " 1145104, 1145111, 1150932, 1152878, 1150352, 1150356, 1147446, 1151816,\n", - " 1135303, 1154183, 1148510, 1141420, 1151352, 1151356, 1151345, 1155152,\n", - " 1147737, 1153447, 1146969, 1153255, 1146623, 1151692, 1142986, 1144476,\n", - " 1152405, 1154056, 1152097, 1152100, 1152109, 1156320, 1153032, 1153038,\n", - " 1137746, 1137755, 1146307, 1146304, 1146317, 1152612, 1155148, 1136401,\n", - " 1157115, 1155358, 1157842, 1157824, 1157833, 1154633, 1151573, 1151627,\n", - " 1151617, 1145278, 1136788, 1148916, 1148927, 1152944, 1152169, 1140934,\n", - " 1138991, 1151298, 1143997, 1156826, 1153311, 1138279, 1138281, 1136028,\n", - " 1156609, 1152928, 1151064, 1137545, 1137392, 1153909, 1166850, 1150164,\n", - " 1148040, 1149300, 1137048, 1148628, 1158530, 1158540, 1137458, 1157514,\n", - " 1155378, 1155376, 1142047, 1156501, 1156505, 1152397, 1157064, 1152833,\n", - " 1145191, 1145187, 1139473, 1146851, 1146854, 1152179, 1147810, 1157777,\n", - " 1139525, 1158304, 1158311, 1151271, 1151340, 1161731, 1162120, 1145771,\n", - " 1156919, 1142755, 1160435, 1157637, 1151379, 1137912, 1158639, 1155374,\n", - " 1155375, 1140186, 1155122, 1155124, 1152527, 1149327, 1153486, 1155748,\n", - " 1155755, 1151424, 1146913, 1156463, 1158096, 1168230, 1155626, 1155628,\n", - " 1155630, 1155631, 1158485, 1154555, 1155573, 1136469, 1158566, 1158824,\n", - " 1158325, 1148836, 1155646, 1153373, 1154648, 1154250, 1154240, 1156711,\n", - " 1160098, 1137359, 1154909, 1143189, 1150371, 1150068, 1155613, 1145727,\n", - " 1155281, 1155293, 1151030, 1137152, 1158578, 1158996, 1153781, 1158347,\n", - " 1145688, 1145681, 1137316, 1140913, 1134677, 1134685, 1135601, 1135605,\n", - " 1145515, 1145507, 1150661, 1155848, 1155843, 1158664, 1158665, 1157684,\n", - " 1146326, 1149145, 1161116, 1156081, 1152220, 1155436, 1156698, 1156693,\n", - " 1155884, 1157732, 1157038, 1142466, 1155975, 1154682, 1142064, 1135199,\n", - " 1158846, 1149696, 1149700, 1154600, 1161309, 1136899, 1136896, 1158753,\n", - " 1140210, 1140218, 1140221, 1158804, 1156778, 1152451, 1152462, 1161625,\n", - " 1152130, 1153808, 1136640, 1151144, 1158006, 1163173, 1144581, 1150011,\n", - " 1155521, 1155528, 1142483, 1163471, 1135662, 1164276, 1142666, 1161647,\n", - " 1159042, 1159071, 1188649, 1159150, 1151081, 1142427, 1157945, 1157946,\n", - " 1160563, 1153052, 1171551, 1155769, 1144149, 1159360, 1153842, 1156107,\n", - " 1138393, 1150035, 1150046, 1150041, 1149063, 1149070, 1151014, 1154294,\n", - " 1153519, 1147300, 1142405, 1146876, 1164012, 1156787, 1149966, 1149963,\n", - " 1139785, 1164910, 1154590, 1160764, 1165762, 1136802, 1148771, 1146063,\n", - " 1159931, 1140130, 1140641, 1148601, 1148607, 1143139, 1143146, 1155813,\n", - " 1156355, 1158643, 1158653, 1156177, 1156191, 1156181, 1159025, 1159032,\n", - " 1163742, 1168110, 1152247, 1178151, 1165585, 1143729, 1155588, 1156582,\n", - " 1156589, 1168428, 1148567, 1144977, 1144979, 1167931, 1147401, 1164580,\n", - " 1152776, 1155044, 1155054, 1162589, 1155272, 1155274, 1141471, 1141463,\n", - " 1141459, 1151650, 1147426, 1147427, 1147433, 1157050, 1149893, 1156737,\n", - " 1156739, 1153663, 1166591, 1150646, 1144810, 1144812, 1167263, 1140112,\n", - " 1162087, 1164741, 1142733, 1156293, 1145176, 1145228, 1169282, 1154700,\n", - " 1172193, 1155324, 1147673, 1147675, 1170789, 1146432, 1146444, 1148168,\n", - " 1148175, 1143037, 1143025, 1147693, 1147694, 1145900, 1145902, 1153534,\n", - " 1168659, 1151755, 1143395, 1143405, 1149555, 1158724, 1158722, 1158728,\n", - " 1154070, 1154076, 1168764, 1170738, 1147339, 1147338, 1145502, 1162893,\n", - " 1149124, 1144681, 1149483, 1155172, 1150515, 1150522, 1150525, 1150518,\n", - " 1156113, 1156119, 1145531, 1144336, 1157534, 1154670, 1154893, 1169162,\n", - " 1157331, 1138129, 1147502, 1158611, 1158623, 1158052, 1153288, 1157380,\n", - " 1171479, 1147416, 1147423, 1155494, 1155502, 1170462, 1152353, 1152362,\n", - " 1170907, 1143172, 1143177, 1152546, 1172778, 1169929, 1161130, 1167010,\n", - " 1165352, 1169144, 1152150, 1153754, 1159655, 1167857, 1157153, 1157373,\n", - " 1157368, 1147697, 1147711, 1147929, 1149239, 1167720, 1173126, 1162106,\n", - " 1168697, 1160987, 1173727, 1146755, 1146765, 1187436, 1167898, 1174845,\n", - " 1178056, 1171073, 1166682, 1170874, 1150234, 1154148, 1171921, 1181871,\n", - " 1186117, 1167662, 1156544, 1158025, 1166554, 1155262, 1177889, 1154718,\n", - " 1157792, 1157795, 1151488, 1181377, 1155799, 1155804, 1187524, 1158249,\n", - " 1153898, 1153893, 1154497, 1164563, 1164203, 1145626, 1163538, 1161515,\n", - " 1180813, 1161911, 1182260, 1182265, 1149744, 1149753, 1149755, 1153609,\n", - " 1155990, 1160121, 1187947, 1177826, 1158512, 1158513, 1187796, 1158934,\n", - " 1158374, 1155890, 1155892, 1155899, 1162690, 1140397, 1170592, 1168621,\n", - " 1171027, 1168876, 1164228, 1182337, 1146169, 1170804, 1156852, 1147182,\n", - " 1156162, 1171443, 1183016, 1156532, 1139828, 1139831, 1150265, 1185819,\n", - " 1156055, 1151972, 1151977, 1149549, 1182371, 1156833, 1140993, 1140995,\n", - " 1182057, 1187629, 1192608, 1171457, 1185892, 1186429, 1158064, 1158067,\n", - " 1166784, 1160968, 1155959, 1179769, 1169837, 1181032, 1182849, 1157022,\n", - " 1161950], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137213, 1141424, 1136228, 1136230, 1135926, 1135165, 1135160, 1135716,\n", - " 1137784, 1137791, 1141751, 1141756, 1141758, 1138335, 1136223, 1141257,\n", - " 1141250, 1136969, 1141443, 1143600, 1139811, 1137946, 1137947, 1143372,\n", - " 1139615, 1139608, 1140783, 1150497, 1142963, 1135376, 1136948, 1149228,\n", - " 1142947, 1147949, 1155683, 1155689, 1143820, 1149644, 1149646, 1147473,\n", - " 1147483, 1142885, 1152257, 1144636, 1135262, 1146992, 1153012, 1135947,\n", - " 1135111, 1148346, 1146656, 1136125, 1147089, 1147095, 1147091, 1155018,\n", - " 1147202, 1147211, 1136674, 1136679, 1152427, 1146382, 1140540, 1138112,\n", - " 1138118, 1138119, 1137254, 1137177, 1149456, 1140159, 1134720, 1134728,\n", - " 1134735, 1135909, 1135915, 1135367, 1135202, 1140767, 1154739, 1134967,\n", - " 1141036, 1134794, 1157443, 1143377, 1138504, 1138508, 1137329, 1137693,\n", - " 1144395, 1136816, 1137529, 1157397, 1152376, 1136662, 1135268, 1148484,\n", - " 1139161, 1141702, 1135579, 1135583, 1141086, 1136105, 1135668, 1153094,\n", - " 1137957, 1158136, 1135499, 1137019, 1156899, 1138306, 1138314, 1139878,\n", - " 1138436, 1138440, 1138461, 1138449, 1138462, 1136594, 1135134, 1135123,\n", - " 1149328, 1138844, 1138846, 1156603, 1147112, 1142611, 1135355, 1138185,\n", - " 1158984, 1145842, 1148531, 1137409, 1141532, 1138067, 1138073, 1134992,\n", - " 1142434, 1136546, 1148805, 1139755, 1136734, 1140204, 1158971, 1158974,\n", - " 1142906, 1159009, 1159012, 1159019, 1141065, 1141070, 1153543, 1143631,\n", - " 1138642, 1138154, 1146075, 1140557, 1141985, 1152042, 1152044, 1139063,\n", - " 1139064, 1136057, 1136051, 1140670, 1137734, 1137728, 1134750, 1138255,\n", - " 1135549, 1162958, 1144130, 1149001, 1139889, 1145356, 1141980, 1141974,\n", - " 1143767, 1154863, 1143706, 1143224, 1137668, 1137670, 1139025, 1140009,\n", - " 1146834, 1146844, 1146847, 1135860, 1135865, 1136426, 1136627, 1140467,\n", - " 1141224, 1141891, 1139386, 1136917, 1139741, 1143667, 1137196, 1137188,\n", - " 1144237, 1146449, 1141785, 1141786, 1139495, 1136760, 1141609, 1141300,\n", - " 1134987, 1136854, 1144428, 1144420, 1141821, 1138476, 1149111, 1142713,\n", - " 1138708, 1142913, 1137661, 1138423, 1143113, 1148443, 1144596, 1136866,\n", - " 1145298, 1144044, 1141579, 1141398, 1144182, 1144179, 1137614, 1137610,\n", - " 1150906, 1166711, 1139559, 1140501, 1147153, 1136378, 1142650, 1162804,\n", - " 1141365, 1141367, 1141664, 1149090, 1139022, 1144279, 1139508, 1139510,\n", - " 1139769, 1139774, 1140093, 1139127, 1144992, 1144997, 1145000, 1145001,\n", - " 1140619, 1140990, 1147050, 1145885, 1145873, 1152976, 1152988, 1142556,\n", - " 1141925, 1144241, 1144242, 1145328, 1140580, 1137149, 1139405, 1137570,\n", - " 1141390, 1145980, 1145974, 1146005, 1142098, 1146024, 1138085, 1146140,\n", - " 1146141, 1142533, 1149933, 1147086, 1139990, 1146302, 1143293, 1143283,\n", - " 1151124, 1147541, 1147543, 1147150, 1148761, 1147282, 1142816, 1142629,\n", - " 1149366, 1148003, 1149608, 1138927, 1136836, 1146099, 1139298, 1144957,\n", - " 1143345, 1144765, 1145818, 1139969, 1135872, 1135876, 1150294, 1150300,\n", - " 1150301, 1146514, 1146523, 1146526, 1143456, 1143470, 1143457, 1142997,\n", - " 1143937, 1147574, 1140360, 1140364, 1137990, 1143083, 1148965, 1148966,\n", - " 1144222, 1147984, 1147999, 1134909, 1144003, 1139252, 1139258, 1139249,\n", - " 1145467, 1147233, 1148704, 1142697, 1141319, 1141836, 1152328, 1143434,\n", - " 1147071, 1149714, 1147025, 1143826, 1142858, 1141131, 1139547, 1158226,\n", - " 1158228, 1150452, 1143922, 1147880, 1148362, 1154526, 1145240, 1145246,\n", - " 1145751, 1142370, 1146152, 1148391, 1146178, 1138854, 1138858, 1151242,\n", - " 1148215, 1148214, 1148223, 1152530, 1152538, 1150445, 1149258, 1148928,\n", - " 1148826, 1148827, 1156470, 1154438, 1149791, 1144526, 1141347, 1150342,\n", - " 1152013, 1144203, 1165252, 1147794, 1151480, 1152022, 1152024, 1152027,\n", - " 1144884, 1154271, 1145255, 1135516, 1134869, 1150127, 1147019, 1147021,\n", - " 1147023, 1141949, 1150736, 1154976, 1154979, 1143560, 1143565, 1146412,\n", - " 1148288, 1148294, 1148300, 1152070, 1137724, 1135072, 1164883, 1139096,\n", - " 1152561, 1136247, 1139721, 1139718, 1146676, 1152441, 1148724, 1148726,\n", - " 1168973, 1150052, 1143983, 1148204, 1153181, 1171943, 1153124, 1153192,\n", - " 1145104, 1145111, 1150932, 1152878, 1150352, 1150356, 1147446, 1151816,\n", - " 1135303, 1154183, 1148510, 1141420, 1151352, 1151356, 1151345, 1155152,\n", - " 1147737, 1153447, 1146969, 1153255, 1146623, 1151692, 1142986, 1144476,\n", - " 1152405, 1154056, 1152097, 1152100, 1152109, 1156320, 1153032, 1153038,\n", - " 1137746, 1137755, 1146307, 1146304, 1146317, 1152612, 1155148, 1136401,\n", - " 1157115, 1155358, 1157842, 1157824, 1157833, 1154633, 1151573, 1151627,\n", - " 1151617, 1145278, 1136788, 1148916, 1148927, 1152944, 1152169, 1140934,\n", - " 1138991, 1151298, 1143997, 1156826, 1153311, 1138279, 1138281, 1136028,\n", - " 1156609, 1152928, 1151064, 1137545, 1137392, 1153909, 1166850, 1150164,\n", - " 1148040, 1149300, 1137048, 1148628, 1158530, 1158540, 1137458, 1157514,\n", - " 1155378, 1155376, 1142047, 1156501, 1156505, 1152397, 1157064, 1152833,\n", - " 1145191, 1145187, 1139473, 1146851, 1146854, 1152179, 1147810, 1157777,\n", - " 1139525, 1158304, 1158311, 1151271, 1151340, 1161731, 1162120, 1145771,\n", - " 1156919, 1142755, 1160435, 1157637, 1151379, 1137912, 1158639, 1155374,\n", - " 1155375, 1140186, 1155122, 1155124, 1152527, 1149327, 1153486, 1155748,\n", - " 1155755, 1151424, 1146913, 1156463, 1158096, 1168230, 1155626, 1155628,\n", - " 1155630, 1155631, 1158485, 1154555, 1155573, 1136469, 1158566, 1158824,\n", - " 1158325, 1148836, 1155646, 1153373, 1154648, 1154250, 1154240, 1156711,\n", - " 1160098, 1137359, 1154909, 1143189, 1150371, 1150068, 1155613, 1145727,\n", - " 1155281, 1155293, 1151030, 1137152, 1158578, 1158996, 1153781, 1158347,\n", - " 1145688, 1145681, 1137316, 1140913, 1134677, 1134685, 1135601, 1135605,\n", - " 1145515, 1145507, 1150661, 1155848, 1155843, 1158664, 1158665, 1157684,\n", - " 1146326, 1149145, 1161116, 1156081, 1152220, 1155436, 1156698, 1156693,\n", - " 1155884, 1157732, 1157038, 1142466, 1155975, 1154682, 1142064, 1135199,\n", - " 1158846, 1149696, 1149700, 1154600, 1161309, 1136899, 1136896, 1158753,\n", - " 1140210, 1140218, 1140221, 1158804, 1156778, 1152451, 1152462, 1161625,\n", - " 1152130, 1153808, 1136640, 1151144, 1158006, 1163173, 1144581, 1150011,\n", - " 1155521, 1155528, 1142483, 1163471, 1135662, 1164276, 1142666, 1161647,\n", - " 1159042, 1159071, 1188649, 1159150, 1151081, 1142427, 1157945, 1157946,\n", - " 1160563, 1153052, 1171551, 1155769, 1144149, 1159360, 1153842, 1156107,\n", - " 1138393, 1150035, 1150046, 1150041, 1149063, 1149070, 1151014, 1154294,\n", - " 1153519, 1147300, 1142405, 1146876, 1164012, 1156787, 1149966, 1149963,\n", - " 1139785, 1164910, 1154590, 1160764, 1165762, 1136802, 1148771, 1146063,\n", - " 1159931, 1140130, 1140641, 1148601, 1148607, 1143139, 1143146, 1155813,\n", - " 1156355, 1158643, 1158653, 1156177, 1156191, 1156181, 1159025, 1159032,\n", - " 1163742, 1168110, 1152247, 1178151, 1165585, 1143729, 1155588, 1156582,\n", - " 1156589, 1168428, 1148567, 1144977, 1144979, 1167931, 1147401, 1164580,\n", - " 1152776, 1155044, 1155054, 1162589, 1155272, 1155274, 1141471, 1141463,\n", - " 1141459, 1151650, 1147426, 1147427, 1147433, 1157050, 1149893, 1156737,\n", - " 1156739, 1153663, 1166591, 1150646, 1144810, 1144812, 1167263, 1140112,\n", - " 1162087, 1164741, 1142733, 1156293, 1145176, 1145228, 1169282, 1154700,\n", - " 1172193, 1155324, 1147673, 1147675, 1170789, 1146432, 1146444, 1148168,\n", - " 1148175, 1143037, 1143025, 1147693, 1147694, 1145900, 1145902, 1153534,\n", - " 1168659, 1151755, 1143395, 1143405, 1149555, 1158724, 1158722, 1158728,\n", - " 1154070, 1154076, 1168764, 1170738, 1147339, 1147338, 1145502, 1162893,\n", - " 1149124, 1144681, 1149483, 1155172, 1150515, 1150522, 1150525, 1150518,\n", - " 1156113, 1156119, 1145531, 1144336, 1157534, 1154670, 1154893, 1169162,\n", - " 1157331, 1138129, 1147502, 1158611, 1158623, 1158052, 1153288, 1157380,\n", - " 1171479, 1147416, 1147423, 1155494, 1155502, 1170462, 1152353, 1152362,\n", - " 1170907, 1143172, 1143177, 1152546, 1172778, 1169929, 1161130, 1167010,\n", - " 1165352, 1169144, 1152150, 1153754, 1159655, 1167857, 1157153, 1157373,\n", - " 1157368, 1147697, 1147711, 1147929, 1149239, 1167720, 1173126, 1162106,\n", - " 1168697, 1160987, 1173727, 1146755, 1146765, 1187436, 1167898, 1174845,\n", - " 1178056, 1171073, 1166682, 1170874, 1150234, 1154148, 1171921, 1181871,\n", - " 1186117, 1167662, 1156544, 1158025, 1166554, 1155262, 1177889, 1154718,\n", - " 1157792, 1157795, 1151488, 1181377, 1155799, 1155804, 1187524, 1158249,\n", - " 1153898, 1153893, 1154497, 1164563, 1164203, 1145626, 1163538, 1161515,\n", - " 1180813, 1161911, 1182260, 1182265, 1149744, 1149753, 1149755, 1153609,\n", - " 1155990, 1160121, 1187947, 1177826, 1158512, 1158513, 1187796, 1158934,\n", - " 1158374, 1155890, 1155892, 1155899, 1162690, 1140397, 1170592, 1168621,\n", - " 1171027, 1168876, 1164228, 1182337, 1146169, 1170804, 1156852, 1147182,\n", - " 1156162, 1171443, 1183016, 1156532, 1139828, 1139831, 1150265, 1185819,\n", - " 1156055, 1151972, 1151977, 1149549, 1182371, 1156833, 1140993, 1140995,\n", - " 1182057, 1187629, 1192608, 1171457, 1185892, 1186429, 1158064, 1158067,\n", - " 1166784, 1160968, 1155959, 1179769, 1169837, 1181032, 1182849, 1157022,\n", - " 1161950], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197719, 1195860, 1195863, 1199282, 1198458, 1202255, 1201577, 1201581,\n", - " 1202295, 1199145, 1201462, 1201465, 1202119, 1197777, 1201016, 1198633,\n", - " 1196956, 1202803, 1198557, 1194866, 1194780, 1194655, 1194642, 1201992,\n", - " 1196031, 1194952, 1194882, 1195888, 1199172, 1197856, 1196977, 1199109,\n", - " 1199823, 1195216, 1195265, 1197141, 1196242, 1196109, 1194859, 1195541,\n", - " 1202915, 1197474, 1196122, 1196272, 1199865, 1199856, 1199628, 1197676,\n", - " 1198410, 1199229, 1199231, 1201916, 1194795, 1200060, 1199942, 1199949,\n", - " 1196508, 1197601, 1196727, 1198428, 1200155, 1198811, 1201534, 1200507,\n", - " 1199445, 1199454, 1201156, 1201056, 1194803, 1199723, 1195689, 1200553,\n", - " 1199203, 1197097, 1197100, 1201627, 1197040, 1201442, 1200899, 1195876,\n", - " 1201291, 1195601, 1203329, 1200398, 1196960, 1200784, 1202685, 1195048,\n", - " 1194698, 1195676, 1195679, 1195415, 1197821, 1199778, 1198966, 1199659,\n", - " 1201138, 1194730, 1198147, 1197735, 1200013, 1200011, 1198819, 1201001,\n", - " 1200465, 1195070, 1197652, 1200211, 1201808, 1203162], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197719, 1195860, 1195863, 1199282, 1198458, 1202255, 1201577, 1201581,\n", - " 1202295, 1199145, 1201462, 1201465, 1202119, 1197777, 1201016, 1198633,\n", - " 1196956, 1202803, 1198557, 1194866, 1194780, 1194655, 1194642, 1201992,\n", - " 1196031, 1194952, 1194882, 1195888, 1199172, 1197856, 1196977, 1199109,\n", - " 1199823, 1195216, 1195265, 1197141, 1196242, 1196109, 1194859, 1195541,\n", - " 1202915, 1197474, 1196122, 1196272, 1199865, 1199856, 1199628, 1197676,\n", - " 1198410, 1199229, 1199231, 1201916, 1194795, 1200060, 1199942, 1199949,\n", - " 1196508, 1197601, 1196727, 1198428, 1200155, 1198811, 1201534, 1200507,\n", - " 1199445, 1199454, 1201156, 1201056, 1194803, 1199723, 1195689, 1200553,\n", - " 1199203, 1197097, 1197100, 1201627, 1197040, 1201442, 1200899, 1195876,\n", - " 1201291, 1195601, 1203329, 1200398, 1196960, 1200784, 1202685, 1195048,\n", - " 1194698, 1195676, 1195679, 1195415, 1197821, 1199778, 1198966, 1199659,\n", - " 1201138, 1194730, 1198147, 1197735, 1200013, 1200011, 1198819, 1201001,\n", - " 1200465, 1195070, 1197652, 1200211, 1201808, 1203162], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 2.3456e-01, -7.0880e-04, 7.5920e-01, ..., 4.2586e-02,\n", - " -1.4897e-03, -5.6438e-03],\n", - " [ 2.0987e-01, -3.4428e-04, 6.5833e-01, ..., 4.1798e-02,\n", - " -1.6051e-03, -5.1268e-03],\n", - " [ 1.1368e-01, -4.4755e-04, 4.7887e-01, ..., 1.1509e-01,\n", - " -2.0896e-03, -3.6215e-03],\n", - " ...,\n", - " [ 1.3811e-01, -3.5751e-04, 4.7740e-01, ..., 6.4579e-02,\n", - " -1.6973e-03, -3.5778e-03],\n", - " [ 1.5334e-01, -2.7173e-04, 4.8594e-01, ..., 4.3441e-02,\n", - " -1.5016e-03, -3.5673e-03],\n", - " [ 1.5524e-01, -3.4377e-04, 5.5425e-01, ..., 5.3260e-02,\n", - " -1.5770e-03, -4.0210e-03]], device='cuda:0'), 'paper': tensor([[-7.7769e-03, 1.3813e+00, 8.5689e-01, ..., -9.4147e-03,\n", - " -1.8169e-02, -1.2630e-02],\n", - " [-5.8080e-03, 2.6722e+00, 2.6305e+00, ..., 3.4090e+00,\n", - " -5.0310e-02, 2.1729e+00],\n", - " [-3.9244e-03, 5.7701e-01, 7.4909e-01, ..., -9.6429e-03,\n", - " -1.8958e-02, -5.7079e-03],\n", - " ...,\n", - " [-2.5885e-03, 1.9632e+00, 1.7406e+00, ..., 1.2223e-01,\n", - " -2.4868e-02, 5.6583e-01],\n", - " [-7.1521e-03, 1.3939e+00, 7.2101e-01, ..., 9.9544e-01,\n", - " -2.3538e-02, -1.9083e-03],\n", - " [-5.5890e-03, 3.8017e+00, 2.6161e+00, ..., 5.2188e+00,\n", - " -5.4662e-02, 3.2497e+00]], device='cuda:0'), 'author': tensor([[-4.6994e-04, 2.7382e-02, 1.1459e-01, ..., 1.5975e-01,\n", - " 5.6292e-04, -6.6914e-04],\n", - " [-1.6722e-03, 2.3361e-01, 8.5189e-02, ..., 1.2857e+00,\n", - " 2.6736e-01, -1.4974e-03],\n", - " [-5.6955e-04, 2.3848e-01, 9.9395e-02, ..., 1.2718e+00,\n", - " 4.3209e-01, 9.4246e-03],\n", - " ...,\n", - " [-8.0587e-04, 1.9147e-01, 1.4411e-01, ..., 1.3146e+00,\n", - " 5.1111e-01, -6.1041e-06],\n", - " [-1.1556e-03, 1.5946e-01, 1.9466e-01, ..., 1.3223e+00,\n", - " 3.5228e-01, -4.4390e-04],\n", - " [-1.3994e-03, 2.1460e-01, 1.4102e-01, ..., 1.2523e+00,\n", - " 2.8063e-01, -1.1626e-03]], device='cuda:0'), 'field_of_study': tensor([[-0.0011, 0.5697, 0.1934, ..., -0.0101, 0.4867, 0.2475],\n", - " [-0.0028, 0.5034, 0.1103, ..., -0.0076, 0.3656, 0.4469],\n", - " [-0.0038, 0.7202, 0.2688, ..., -0.0071, 0.2949, 0.6107],\n", - " ...,\n", - " [-0.0024, 0.5424, 0.1366, ..., -0.0071, 0.3273, 0.4546],\n", - " [-0.0018, 0.4520, 0.1410, ..., -0.0081, 0.2972, 0.3326],\n", - " [-0.0022, 0.4962, 0.1030, ..., -0.0063, 0.2226, 0.2886]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 83, 41, 41, 98, 134, 221, 221, 332, 529, 310, 331, 293,\n", - " 532, 550, 720, 646, 721, 830, 676, 429, 614, 614, 705, 931,\n", - " 1250, 1009, 1014, 954, 954, 1173, 1173, 1131, 1168, 1628, 1239, 1260,\n", - " 1204, 1321, 1399, 1296, 1420, 1378, 1510, 1443, 1606, 1616, 1649, 1598,\n", - " 1593, 1786, 1810, 1810, 1642, 1780, 1780, 1870, 1955, 1955, 1677, 1991,\n", - " 1962, 1984, 2096, 2272, 2354, 2228, 2426, 2586, 2492, 2612, 2800, 2714,\n", - " 2503, 2819, 2621, 2742, 2744, 2986, 2906, 3189, 2915, 3012, 3205, 3205,\n", - " 3475, 3256, 3435, 3299, 3822, 3647, 3721, 3721, 3838, 3816, 3816, 3816,\n", - " 3819, 3921, 3962, 3992, 4010, 4010, 4022, 4022, 4137, 4472, 4528, 4317,\n", - " 4317, 4424, 4370, 4492, 4680, 4657, 4657, 4715, 4719, 4941, 4837, 4862,\n", - " 4902, 4891, 4855, 5031, 4966, 5027, 4948, 5176, 5176, 5626, 5626, 5345,\n", - " 5548, 5548, 5338, 5361, 5687, 5902, 5538, 5538, 5606, 5927, 5620, 5620,\n", - " 5710, 5816, 5816, 5816, 6029, 6067, 6072, 5918, 5811, 5811, 5974],\n", - " [ 83, 23, 75, 3, 70, 93, 88, 7, 95, 45, 105, 58,\n", - " 85, 25, 77, 84, 25, 107, 25, 71, 80, 17, 87, 46,\n", - " 70, 90, 25, 10, 5, 78, 15, 99, 74, 62, 23, 11,\n", - " 9, 69, 55, 109, 22, 69, 43, 16, 19, 69, 30, 73,\n", - " 62, 69, 40, 27, 53, 2, 93, 23, 93, 2, 72, 57,\n", - " 67, 27, 78, 52, 86, 100, 66, 51, 25, 46, 62, 76,\n", - " 36, 89, 54, 58, 76, 108, 60, 3, 59, 20, 23, 33,\n", - " 23, 98, 76, 12, 14, 47, 61, 99, 63, 49, 104, 103,\n", - " 106, 76, 94, 41, 101, 42, 29, 51, 1, 81, 8, 35,\n", - " 44, 6, 65, 21, 66, 0, 18, 64, 79, 39, 106, 66,\n", - " 33, 102, 13, 91, 96, 48, 56, 58, 68, 57, 82, 50,\n", - " 58, 38, 58, 78, 23, 31, 34, 4, 37, 26, 58, 90,\n", - " 34, 58, 24, 32, 58, 94, 90, 28, 97, 92, 106]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2444, 2368, 574, ..., 3464, 3997, 1003],\n", - " [ 186, 11, 75, ..., 6641, 6697, 6639]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 104, 8, 4, ..., 25, 3, 59],\n", - " [ 123, 17, 53, ..., 5916, 6008, 5955]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 160, 160, 160, ..., 6627, 6627, 6627],\n", - " [ 264, 394, 843, ..., 338, 604, 169]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 456, 543, 24, ..., 2, 774, 338],\n", - " [ 231, 110, 74, ..., 6706, 6654, 6710]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4362, 5433, 5988, ..., 6096, 6137, 6142],\n", - " [ 28, 73, 130, ..., 6018, 5997, 5966]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 160, 160, 160, ..., 6723, 6711, 6664],\n", - " [2266, 3091, 678, ..., 1104, 26, 410]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 49, 49, 49, ..., 5966, 5966, 5966],\n", - " [3774, 5923, 5867, ..., 6378, 6155, 6424]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005662\n", - "sampling 0.005508\n", - "noi time: 0.002226\n", - "get_vertex_data call: 0.031029\n", - "noi group time: 0.001843\n", - "eoi_group_time: 0.015849\n", - "second half: 0.226556\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27905, 31145, 24187, ..., 1130624, 1120067, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27905, 31145, 24187, ..., 1130624, 1120067, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210831, 1209332, 1209801, ..., 1933649, 1938464, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210831, 1209332, 1209801, ..., 1933649, 1938464, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1141424, 1140282, 1140285, 1136347, 1135926, 1135160, 1137791,\n", - " 1141758, 1138335, 1141250, 1136969, 1136971, 1138903, 1143609, 1139811,\n", - " 1145373, 1145989, 1143372, 1139243, 1146644, 1148987, 1136950, 1149216,\n", - " 1147943, 1149646, 1147473, 1147483, 1135998, 1142885, 1142894, 1142881,\n", - " 1153946, 1146995, 1134697, 1134701, 1148346, 1147089, 1147096, 1136682,\n", - " 1134662, 1138112, 1137254, 1138356, 1140146, 1134720, 1140953, 1135367,\n", - " 1135202, 1141036, 1136778, 1136302, 1134794, 1137329, 1137693, 1144791,\n", - " 1135412, 1157400, 1157393, 1157397, 1137441, 1156159, 1141702, 1141086,\n", - " 1155076, 1135664, 1138514, 1153094, 1137953, 1156899, 1156909, 1138305,\n", - " 1138440, 1138445, 1138457, 1138461, 1154790, 1137924, 1135122, 1156606,\n", - " 1142611, 1142612, 1142616, 1138177, 1138180, 1158984, 1148531, 1148533,\n", - " 1135773, 1139667, 1139673, 1134992, 1134782, 1142438, 1148805, 1158971,\n", - " 1158974, 1142906, 1153543, 1140034, 1139085, 1138148, 1141963, 1155656,\n", - " 1141992, 1141985, 1152042, 1152044, 1137728, 1146222, 1134750, 1138240,\n", - " 1135549, 1136697, 1141088, 1141098, 1149001, 1141980, 1136384, 1143775,\n", - " 1154855, 1137297, 1137670, 1139033, 1136625, 1139386, 1136917, 1139731,\n", - " 1143667, 1143676, 1141786, 1136760, 1134979, 1147850, 1138482, 1138488,\n", - " 1142049, 1142053, 1141821, 1140160, 1140173, 1140163, 1158749, 1137062,\n", - " 1138710, 1138708, 1142917, 1142913, 1144596, 1136864, 1145298, 1141398,\n", - " 1141405, 1140436, 1144182, 1150906, 1139559, 1147153, 1136378, 1142646,\n", - " 1149193, 1141367, 1149088, 1149090, 1149101, 1138292, 1139508, 1139510,\n", - " 1139127, 1144993, 1140976, 1140979, 1140990, 1147050, 1143551, 1152980,\n", - " 1152982, 1152988, 1142548, 1141925, 1144242, 1140580, 1150692, 1150695,\n", - " 1136885, 1143637, 1134848, 1141378, 1145977, 1143851, 1146024, 1154328,\n", - " 1141585, 1149928, 1139990, 1143290, 1147543, 1147540, 1148763, 1147282,\n", - " 1142829, 1142816, 1142628, 1149366, 1149608, 1143051, 1142586, 1144923,\n", - " 1138923, 1157717, 1157726, 1136836, 1136843, 1146104, 1165626, 1139328,\n", - " 1141496, 1141489, 1139055, 1142149, 1143345, 1144619, 1135818, 1135822,\n", - " 1146514, 1146523, 1138025, 1143457, 1142995, 1147574, 1143798, 1140364,\n", - " 1168921, 1147995, 1147999, 1139252, 1147243, 1148704, 1148715, 1148719,\n", - " 1142700, 1149714, 1147025, 1147249, 1145011, 1145012, 1158226, 1167006,\n", - " 1141137, 1145240, 1145751, 1146159, 1138632, 1146178, 1150280, 1148826,\n", - " 1151856, 1149791, 1144514, 1144526, 1145826, 1146887, 1144203, 1152023,\n", - " 1134869, 1134878, 1150127, 1150843, 1154976, 1148461, 1147653, 1143559,\n", - " 1143552, 1149412, 1146414, 1146406, 1151727, 1135085, 1135087, 1139088,\n", - " 1154420, 1151370, 1136249, 1146686, 1152435, 1151553, 1148724, 1148729,\n", - " 1143971, 1148204, 1153188, 1145109, 1167965, 1150935, 1150941, 1144849,\n", - " 1155088, 1148505, 1146573, 1141420, 1141419, 1151351, 1174861, 1155164,\n", - " 1147602, 1147737, 1148957, 1146975, 1149356, 1150219, 1146623, 1151691,\n", - " 1151687, 1151402, 1146280, 1156334, 1150085, 1137746, 1146307, 1152622,\n", - " 1140521, 1155337, 1154123, 1152673, 1151617, 1151622, 1145278, 1136140,\n", - " 1151441, 1152341, 1157141, 1136028, 1136029, 1158704, 1140684, 1151064,\n", - " 1156387, 1152888, 1154733, 1142777, 1156422, 1150150, 1148040, 1137048,\n", - " 1158477, 1168183, 1148628, 1158530, 1137458, 1149947, 1142041, 1142047,\n", - " 1157547, 1142385, 1158854, 1152386, 1152833, 1145191, 1143496, 1135221,\n", - " 1142221, 1135730, 1138822, 1156638, 1158306, 1158308, 1158311, 1155441,\n", - " 1150130, 1150132, 1154529, 1142755, 1142766, 1156207, 1138775, 1151379,\n", - " 1158628, 1152527, 1157170, 1149321, 1151431, 1156463, 1155626, 1155628,\n", - " 1156563, 1158566, 1158824, 1143254, 1146942, 1154240, 1151899, 1162190,\n", - " 1137359, 1163127, 1143531, 1150371, 1157439, 1155606, 1155613, 1150987,\n", - " 1157934, 1140736, 1140741, 1137152, 1158120, 1153776, 1153786, 1138258,\n", - " 1145682, 1135601, 1135605, 1135614, 1145513, 1150661, 1150671, 1158665,\n", - " 1144463, 1155433, 1155434, 1140381, 1156017, 1157735, 1159132, 1155971,\n", - " 1155975, 1156958, 1153762, 1153765, 1158837, 1149700, 1160163, 1153498,\n", - " 1136899, 1136896, 1158886, 1140218, 1157304, 1158285, 1136480, 1136494,\n", - " 1147586, 1152136, 1152139, 1136640, 1136646, 1140049, 1158558, 1153827,\n", - " 1151140, 1156516, 1146126, 1161539, 1169888, 1150685, 1156045, 1159052,\n", - " 1158300, 1153047, 1153052, 1153045, 1144156, 1176079, 1138393, 1150046,\n", - " 1164547, 1155479, 1153514, 1147307, 1147300, 1146870, 1164006, 1163396,\n", - " 1139286, 1136802, 1166032, 1160999, 1146063, 1165306, 1140643, 1148603,\n", - " 1155816, 1163746, 1156361, 1141800, 1141802, 1158653, 1156181, 1159025,\n", - " 1159026, 1159032, 1152247, 1155588, 1162550, 1162547, 1162546, 1151225,\n", - " 1158405, 1147830, 1146500, 1170998, 1161240, 1144736, 1144737, 1155054,\n", - " 1145137, 1155268, 1165415, 1141471, 1151650, 1147427, 1157050, 1157051,\n", - " 1156737, 1156739, 1153663, 1168748, 1144812, 1135567, 1164750, 1142722,\n", - " 1165943, 1155320, 1150533, 1150542, 1144973, 1146446, 1175469, 1143037,\n", - " 1170618, 1152624, 1145900, 1153520, 1152203, 1143404, 1169742, 1149555,\n", - " 1162877, 1154076, 1191349, 1144699, 1151598, 1149125, 1154919, 1154927,\n", - " 1144681, 1166653, 1169298, 1150515, 1150518, 1150526, 1156119, 1144336,\n", - " 1157534, 1135841, 1154893, 1157331, 1147502, 1158146, 1149681, 1158619,\n", - " 1158623, 1149847, 1157380, 1157384, 1159848, 1165116, 1155489, 1152353,\n", - " 1152546, 1168451, 1149402, 1169050, 1173307, 1152150, 1153754, 1159658,\n", - " 1157158, 1157153, 1147711, 1151850, 1157593, 1170488, 1155731, 1168828,\n", - " 1160990, 1140326, 1166351, 1166529, 1154148, 1149173, 1143279, 1169772,\n", - " 1179243, 1170178, 1153803, 1153141, 1180817, 1153624, 1184093, 1182651,\n", - " 1179807, 1166554, 1161255, 1180152, 1171623, 1164034, 1164560, 1164200,\n", - " 1145626, 1145618, 1157483, 1157487, 1149755, 1174409, 1170069, 1158512,\n", - " 1158517, 1155899, 1162988, 1186303, 1140399, 1168886, 1164231, 1164232,\n", - " 1165149, 1182337, 1176986, 1161819, 1170341, 1180028, 1164133, 1139831,\n", - " 1150265, 1154812, 1192076, 1151288, 1156055, 1151972, 1151978, 1159083,\n", - " 1148798, 1177473, 1193608, 1151774, 1152115, 1152124, 1169703, 1169707,\n", - " 1171966, 1178135, 1155959, 1155962, 1178448, 1182186, 1157008, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1141424, 1140282, 1140285, 1136347, 1135926, 1135160, 1137791,\n", - " 1141758, 1138335, 1141250, 1136969, 1136971, 1138903, 1143609, 1139811,\n", - " 1145373, 1145989, 1143372, 1139243, 1146644, 1148987, 1136950, 1149216,\n", - " 1147943, 1149646, 1147473, 1147483, 1135998, 1142885, 1142894, 1142881,\n", - " 1153946, 1146995, 1134697, 1134701, 1148346, 1147089, 1147096, 1136682,\n", - " 1134662, 1138112, 1137254, 1138356, 1140146, 1134720, 1140953, 1135367,\n", - " 1135202, 1141036, 1136778, 1136302, 1134794, 1137329, 1137693, 1144791,\n", - " 1135412, 1157400, 1157393, 1157397, 1137441, 1156159, 1141702, 1141086,\n", - " 1155076, 1135664, 1138514, 1153094, 1137953, 1156899, 1156909, 1138305,\n", - " 1138440, 1138445, 1138457, 1138461, 1154790, 1137924, 1135122, 1156606,\n", - " 1142611, 1142612, 1142616, 1138177, 1138180, 1158984, 1148531, 1148533,\n", - " 1135773, 1139667, 1139673, 1134992, 1134782, 1142438, 1148805, 1158971,\n", - " 1158974, 1142906, 1153543, 1140034, 1139085, 1138148, 1141963, 1155656,\n", - " 1141992, 1141985, 1152042, 1152044, 1137728, 1146222, 1134750, 1138240,\n", - " 1135549, 1136697, 1141088, 1141098, 1149001, 1141980, 1136384, 1143775,\n", - " 1154855, 1137297, 1137670, 1139033, 1136625, 1139386, 1136917, 1139731,\n", - " 1143667, 1143676, 1141786, 1136760, 1134979, 1147850, 1138482, 1138488,\n", - " 1142049, 1142053, 1141821, 1140160, 1140173, 1140163, 1158749, 1137062,\n", - " 1138710, 1138708, 1142917, 1142913, 1144596, 1136864, 1145298, 1141398,\n", - " 1141405, 1140436, 1144182, 1150906, 1139559, 1147153, 1136378, 1142646,\n", - " 1149193, 1141367, 1149088, 1149090, 1149101, 1138292, 1139508, 1139510,\n", - " 1139127, 1144993, 1140976, 1140979, 1140990, 1147050, 1143551, 1152980,\n", - " 1152982, 1152988, 1142548, 1141925, 1144242, 1140580, 1150692, 1150695,\n", - " 1136885, 1143637, 1134848, 1141378, 1145977, 1143851, 1146024, 1154328,\n", - " 1141585, 1149928, 1139990, 1143290, 1147543, 1147540, 1148763, 1147282,\n", - " 1142829, 1142816, 1142628, 1149366, 1149608, 1143051, 1142586, 1144923,\n", - " 1138923, 1157717, 1157726, 1136836, 1136843, 1146104, 1165626, 1139328,\n", - " 1141496, 1141489, 1139055, 1142149, 1143345, 1144619, 1135818, 1135822,\n", - " 1146514, 1146523, 1138025, 1143457, 1142995, 1147574, 1143798, 1140364,\n", - " 1168921, 1147995, 1147999, 1139252, 1147243, 1148704, 1148715, 1148719,\n", - " 1142700, 1149714, 1147025, 1147249, 1145011, 1145012, 1158226, 1167006,\n", - " 1141137, 1145240, 1145751, 1146159, 1138632, 1146178, 1150280, 1148826,\n", - " 1151856, 1149791, 1144514, 1144526, 1145826, 1146887, 1144203, 1152023,\n", - " 1134869, 1134878, 1150127, 1150843, 1154976, 1148461, 1147653, 1143559,\n", - " 1143552, 1149412, 1146414, 1146406, 1151727, 1135085, 1135087, 1139088,\n", - " 1154420, 1151370, 1136249, 1146686, 1152435, 1151553, 1148724, 1148729,\n", - " 1143971, 1148204, 1153188, 1145109, 1167965, 1150935, 1150941, 1144849,\n", - " 1155088, 1148505, 1146573, 1141420, 1141419, 1151351, 1174861, 1155164,\n", - " 1147602, 1147737, 1148957, 1146975, 1149356, 1150219, 1146623, 1151691,\n", - " 1151687, 1151402, 1146280, 1156334, 1150085, 1137746, 1146307, 1152622,\n", - " 1140521, 1155337, 1154123, 1152673, 1151617, 1151622, 1145278, 1136140,\n", - " 1151441, 1152341, 1157141, 1136028, 1136029, 1158704, 1140684, 1151064,\n", - " 1156387, 1152888, 1154733, 1142777, 1156422, 1150150, 1148040, 1137048,\n", - " 1158477, 1168183, 1148628, 1158530, 1137458, 1149947, 1142041, 1142047,\n", - " 1157547, 1142385, 1158854, 1152386, 1152833, 1145191, 1143496, 1135221,\n", - " 1142221, 1135730, 1138822, 1156638, 1158306, 1158308, 1158311, 1155441,\n", - " 1150130, 1150132, 1154529, 1142755, 1142766, 1156207, 1138775, 1151379,\n", - " 1158628, 1152527, 1157170, 1149321, 1151431, 1156463, 1155626, 1155628,\n", - " 1156563, 1158566, 1158824, 1143254, 1146942, 1154240, 1151899, 1162190,\n", - " 1137359, 1163127, 1143531, 1150371, 1157439, 1155606, 1155613, 1150987,\n", - " 1157934, 1140736, 1140741, 1137152, 1158120, 1153776, 1153786, 1138258,\n", - " 1145682, 1135601, 1135605, 1135614, 1145513, 1150661, 1150671, 1158665,\n", - " 1144463, 1155433, 1155434, 1140381, 1156017, 1157735, 1159132, 1155971,\n", - " 1155975, 1156958, 1153762, 1153765, 1158837, 1149700, 1160163, 1153498,\n", - " 1136899, 1136896, 1158886, 1140218, 1157304, 1158285, 1136480, 1136494,\n", - " 1147586, 1152136, 1152139, 1136640, 1136646, 1140049, 1158558, 1153827,\n", - " 1151140, 1156516, 1146126, 1161539, 1169888, 1150685, 1156045, 1159052,\n", - " 1158300, 1153047, 1153052, 1153045, 1144156, 1176079, 1138393, 1150046,\n", - " 1164547, 1155479, 1153514, 1147307, 1147300, 1146870, 1164006, 1163396,\n", - " 1139286, 1136802, 1166032, 1160999, 1146063, 1165306, 1140643, 1148603,\n", - " 1155816, 1163746, 1156361, 1141800, 1141802, 1158653, 1156181, 1159025,\n", - " 1159026, 1159032, 1152247, 1155588, 1162550, 1162547, 1162546, 1151225,\n", - " 1158405, 1147830, 1146500, 1170998, 1161240, 1144736, 1144737, 1155054,\n", - " 1145137, 1155268, 1165415, 1141471, 1151650, 1147427, 1157050, 1157051,\n", - " 1156737, 1156739, 1153663, 1168748, 1144812, 1135567, 1164750, 1142722,\n", - " 1165943, 1155320, 1150533, 1150542, 1144973, 1146446, 1175469, 1143037,\n", - " 1170618, 1152624, 1145900, 1153520, 1152203, 1143404, 1169742, 1149555,\n", - " 1162877, 1154076, 1191349, 1144699, 1151598, 1149125, 1154919, 1154927,\n", - " 1144681, 1166653, 1169298, 1150515, 1150518, 1150526, 1156119, 1144336,\n", - " 1157534, 1135841, 1154893, 1157331, 1147502, 1158146, 1149681, 1158619,\n", - " 1158623, 1149847, 1157380, 1157384, 1159848, 1165116, 1155489, 1152353,\n", - " 1152546, 1168451, 1149402, 1169050, 1173307, 1152150, 1153754, 1159658,\n", - " 1157158, 1157153, 1147711, 1151850, 1157593, 1170488, 1155731, 1168828,\n", - " 1160990, 1140326, 1166351, 1166529, 1154148, 1149173, 1143279, 1169772,\n", - " 1179243, 1170178, 1153803, 1153141, 1180817, 1153624, 1184093, 1182651,\n", - " 1179807, 1166554, 1161255, 1180152, 1171623, 1164034, 1164560, 1164200,\n", - " 1145626, 1145618, 1157483, 1157487, 1149755, 1174409, 1170069, 1158512,\n", - " 1158517, 1155899, 1162988, 1186303, 1140399, 1168886, 1164231, 1164232,\n", - " 1165149, 1182337, 1176986, 1161819, 1170341, 1180028, 1164133, 1139831,\n", - " 1150265, 1154812, 1192076, 1151288, 1156055, 1151972, 1151978, 1159083,\n", - " 1148798, 1177473, 1193608, 1151774, 1152115, 1152124, 1169703, 1169707,\n", - " 1171966, 1178135, 1155959, 1155962, 1178448, 1182186, 1157008, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199428, 1199439, 1197744, 1197226, 1199282, 1199293, 1202255, 1201581,\n", - " 1201582, 1199278, 1202119, 1201237, 1199248, 1201015, 1201660, 1196871,\n", - " 1198557, 1194864, 1194879, 1194743, 1194770, 1194649, 1195093, 1195263,\n", - " 1201927, 1201992, 1196028, 1196030, 1196031, 1199172, 1195740, 1196695,\n", - " 1198980, 1198991, 1195325, 1196836, 1196844, 1198668, 1198958, 1196711,\n", - " 1195221, 1195265, 1195270, 1200761, 1196242, 1197273, 1196109, 1195847,\n", - " 1195850, 1195026, 1196305, 1197248, 1196393, 1196281, 1198273, 1198280,\n", - " 1199060, 1194928, 1195119, 1199803, 1202377, 1199231, 1199676, 1194795,\n", - " 1197601, 1197957, 1196727, 1195771, 1200887, 1198428, 1198811, 1200612,\n", - " 1200452, 1200563, 1197018, 1201155, 1201156, 1202630, 1201056, 1200927,\n", - " 1199712, 1201049, 1200546, 1200832, 1203066, 1200428, 1202541, 1201757,\n", - " 1196889, 1196779, 1201442, 1197945, 1196264, 1201029, 1199976, 1195876,\n", - " 1200181, 1201291, 1196761, 1203329, 1202209, 1199929, 1200398, 1202304,\n", - " 1196966, 1196975, 1200785, 1199606, 1194698, 1195679, 1198052, 1200445,\n", - " 1198911, 1197816, 1203102, 1201138, 1194730, 1203316, 1200437, 1199787,\n", - " 1200970, 1195367, 1200301, 1197652, 1195082, 1201361, 1203162, 1196428,\n", - " 1197872], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199428, 1199439, 1197744, 1197226, 1199282, 1199293, 1202255, 1201581,\n", - " 1201582, 1199278, 1202119, 1201237, 1199248, 1201015, 1201660, 1196871,\n", - " 1198557, 1194864, 1194879, 1194743, 1194770, 1194649, 1195093, 1195263,\n", - " 1201927, 1201992, 1196028, 1196030, 1196031, 1199172, 1195740, 1196695,\n", - " 1198980, 1198991, 1195325, 1196836, 1196844, 1198668, 1198958, 1196711,\n", - " 1195221, 1195265, 1195270, 1200761, 1196242, 1197273, 1196109, 1195847,\n", - " 1195850, 1195026, 1196305, 1197248, 1196393, 1196281, 1198273, 1198280,\n", - " 1199060, 1194928, 1195119, 1199803, 1202377, 1199231, 1199676, 1194795,\n", - " 1197601, 1197957, 1196727, 1195771, 1200887, 1198428, 1198811, 1200612,\n", - " 1200452, 1200563, 1197018, 1201155, 1201156, 1202630, 1201056, 1200927,\n", - " 1199712, 1201049, 1200546, 1200832, 1203066, 1200428, 1202541, 1201757,\n", - " 1196889, 1196779, 1201442, 1197945, 1196264, 1201029, 1199976, 1195876,\n", - " 1200181, 1201291, 1196761, 1203329, 1202209, 1199929, 1200398, 1202304,\n", - " 1196966, 1196975, 1200785, 1199606, 1194698, 1195679, 1198052, 1200445,\n", - " 1198911, 1197816, 1203102, 1201138, 1194730, 1203316, 1200437, 1199787,\n", - " 1200970, 1195367, 1200301, 1197652, 1195082, 1201361, 1203162, 1196428,\n", - " 1197872], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 2.9275e-01, -7.4775e-04, 8.8574e-01, ..., 5.2880e-02,\n", - " -1.6371e-03, -6.4857e-03],\n", - " [ 1.3894e-01, -7.1388e-04, 7.6452e-01, ..., 8.3243e-02,\n", - " -1.4252e-03, -4.6664e-03],\n", - " [ 3.1370e-01, -1.0226e-03, 9.8168e-01, ..., 3.6735e-02,\n", - " -1.3700e-03, -7.0373e-03],\n", - " ...,\n", - " [ 1.9719e-01, -8.0771e-04, 7.0695e-01, ..., 8.4149e-02,\n", - " -1.9011e-03, -5.1858e-03],\n", - " [ 1.3684e-01, -5.5571e-04, 5.2920e-01, ..., 7.4353e-02,\n", - " -1.7561e-03, -3.8988e-03],\n", - " [ 3.6735e-01, -1.0110e-03, 1.1128e+00, ..., 3.7833e-02,\n", - " -1.5673e-03, -7.9588e-03]], device='cuda:0'), 'paper': tensor([[-1.4388e-02, 8.1346e-01, 3.3522e+00, ..., -2.4181e-03,\n", - " -3.8851e-02, -1.2788e-02],\n", - " [ 2.3858e-01, 1.7282e+00, 2.0495e-01, ..., -1.6586e-02,\n", - " -2.1828e-02, 1.8588e-02],\n", - " [-2.9145e-02, -1.2417e-02, 3.4134e+00, ..., -1.3510e-02,\n", - " -3.8809e-02, -4.2780e-02],\n", - " ...,\n", - " [-3.1978e-03, 2.7403e+00, 2.6669e+00, ..., 1.9889e+00,\n", - " -3.7711e-02, 1.3071e+00],\n", - " [-3.5360e-02, -2.3906e-03, 3.8338e+00, ..., -1.9891e-02,\n", - " -3.7024e-02, -4.7617e-02],\n", - " [-5.7536e-03, 3.7766e+00, 2.5923e+00, ..., 5.1982e+00,\n", - " -5.4373e-02, 3.1995e+00]], device='cuda:0'), 'author': tensor([[-2.0420e-03, 2.9141e-01, 3.7253e-01, ..., 1.4566e+00,\n", - " 1.8724e-01, -3.2095e-03],\n", - " [-1.4916e-03, 2.6345e-01, 2.9084e-02, ..., 1.2145e+00,\n", - " 3.3970e-01, -8.2772e-04],\n", - " [ 8.2532e-02, 6.7982e-02, 2.1745e-01, ..., 1.3279e+00,\n", - " 5.7098e-01, 1.5972e-01],\n", - " ...,\n", - " [-4.5874e-03, 3.2265e-01, 1.4473e-01, ..., 1.3428e+00,\n", - " -3.5640e-03, -8.1768e-03],\n", - " [-1.2346e-03, 2.2945e-01, 1.4368e-01, ..., 1.2227e+00,\n", - " 2.8239e-01, -7.6948e-04],\n", - " [-1.6015e-03, 2.2135e-01, 1.5322e-01, ..., 1.2138e+00,\n", - " 2.3804e-01, -1.3684e-03]], device='cuda:0'), 'field_of_study': tensor([[-1.6020e-03, 4.4531e-01, 1.2746e-01, ..., -7.4177e-03,\n", - " 2.3479e-01, 3.6345e-01],\n", - " [-2.0407e-03, 4.6759e-01, 9.0971e-02, ..., -8.1251e-03,\n", - " 3.8683e-01, 4.1138e-01],\n", - " [-6.3832e-04, 4.7078e-01, 1.1006e-01, ..., -7.9485e-03,\n", - " 3.5110e-01, 2.2674e-01],\n", - " ...,\n", - " [-1.9854e-04, 7.5339e-01, 2.3548e-01, ..., -9.6054e-03,\n", - " 5.5276e-01, 5.2878e-01],\n", - " [-2.7843e-03, 7.4014e-01, 2.8016e-01, ..., -9.2927e-03,\n", - " 4.3744e-01, 6.2859e-01],\n", - " [-5.8464e-04, 5.4361e-01, 1.6769e-01, ..., -7.0955e-03,\n", - " 3.4423e-01, 1.6373e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 14, 191, 97, 97, 97, 118, 62, 62, 62, 152, 293, 435,\n", - " 261, 261, 261, 584, 879, 1013, 1013, 1013, 1043, 673, 673, 786,\n", - " 786, 667, 971, 971, 1053, 592, 592, 1353, 1202, 1590, 1547, 1624,\n", - " 1542, 1595, 1912, 1912, 1857, 1953, 1953, 1890, 1912, 1926, 2234, 2222,\n", - " 1878, 2293, 2141, 2103, 2183, 2232, 2232, 2232, 2232, 2232, 2257, 2422,\n", - " 2422, 2422, 2393, 2493, 2416, 2463, 2556, 2705, 2787, 2721, 2721, 2785,\n", - " 2994, 2761, 2868, 2752, 3032, 2887, 2799, 3140, 3069, 3099, 3099, 3137,\n", - " 3021, 3285, 3380, 3218, 3252, 3462, 3271, 3280, 3280, 3523, 3537, 3657,\n", - " 3922, 3953, 3996, 3996, 4010, 4036, 4036, 4048, 4127, 4136, 4136, 4248,\n", - " 4248, 4207, 4179, 4165, 4238, 4270, 4221, 4226, 4313, 4204, 4204, 4403,\n", - " 4285, 4356, 4411, 4320, 4320, 4555, 4573, 4662, 4485, 4978, 4618, 4672,\n", - " 4821, 4821, 4961, 4917, 4839, 4900, 4903, 5088, 5088, 4951, 4951, 5174,\n", - " 4914, 5078, 5081, 5225, 5226, 5697, 5697, 5641, 5601, 5475, 5687, 5193,\n", - " 5193, 5193, 5470, 5409, 5483, 5567, 5710, 5321, 5321, 5919, 5863, 5658,\n", - " 5751, 5824, 5824, 5824, 5824, 5824, 5824, 5867, 5866, 5643, 5721, 5721,\n", - " 5883, 5883, 6111, 6111, 6111, 5843, 6070, 6070, 6056, 5867, 5867, 5886,\n", - " 5886, 6112, 5996, 5996, 5996, 5823, 6205, 6205, 6006, 6006, 6006, 6006,\n", - " 5983, 5983, 6248, 6258, 6260, 6260, 6260],\n", - " [ 25, 6, 87, 125, 59, 13, 123, 127, 114, 66, 66, 97,\n", - " 34, 50, 69, 123, 32, 104, 86, 45, 91, 108, 61, 25,\n", - " 34, 66, 28, 40, 7, 14, 49, 46, 15, 16, 16, 36,\n", - " 25, 49, 126, 61, 87, 4, 103, 11, 30, 75, 23, 76,\n", - " 77, 80, 66, 112, 113, 28, 60, 73, 24, 84, 53, 71,\n", - " 5, 62, 104, 122, 106, 76, 95, 101, 98, 61, 107, 88,\n", - " 45, 49, 10, 94, 70, 122, 93, 105, 93, 55, 41, 4,\n", - " 78, 107, 44, 10, 116, 97, 54, 41, 19, 23, 8, 46,\n", - " 104, 113, 75, 65, 102, 3, 23, 16, 121, 25, 89, 61,\n", - " 118, 9, 93, 117, 23, 16, 29, 10, 13, 23, 16, 3,\n", - " 111, 38, 69, 83, 22, 25, 34, 97, 95, 85, 96, 16,\n", - " 35, 16, 13, 42, 23, 58, 105, 99, 64, 39, 37, 12,\n", - " 17, 45, 1, 34, 45, 52, 66, 57, 51, 47, 2, 18,\n", - " 33, 92, 66, 74, 110, 66, 56, 20, 82, 27, 115, 120,\n", - " 66, 0, 81, 21, 43, 119, 72, 66, 56, 100, 40, 22,\n", - " 63, 66, 48, 66, 68, 126, 115, 66, 66, 69, 90, 12,\n", - " 6, 6, 66, 67, 109, 124, 66, 42, 26, 52, 79, 66,\n", - " 78, 66, 128, 31, 8, 107, 66]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1733, 450, 4143, ..., 6051, 1710, 2512],\n", - " [ 269, 58, 58, ..., 6594, 6460, 6547]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 108, 94, 33, ..., 10, 128, 4],\n", - " [ 96, 228, 203, ..., 6222, 6233, 6156]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 20, 20, 20, ..., 6628, 6628, 6628],\n", - " [ 424, 332, 118, ..., 548, 310, 587]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 631, 255, 309, ..., 409, 126, 194],\n", - " [ 99, 255, 82, ..., 6623, 6607, 6645]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2112, 908, 156, ..., 2845, 1027, 1710],\n", - " [ 114, 114, 114, ..., 6257, 6253, 6300]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 20, 20, 20, ..., 6594, 6594, 6594],\n", - " [6611, 401, 6385, ..., 1785, 1187, 572]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 121, 62, 62, ..., 6107, 6107, 6107],\n", - " [ 404, 246, 243, ..., 4770, 4721, 4864]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006689\n", - "sampling 0.006536\n", - "noi time: 0.000942\n", - "get_vertex_data call: 0.033262\n", - "noi group time: 0.003774\n", - "eoi_group_time: 0.012125\n", - "second half: 0.212\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 16691, 19416, ..., 1119684, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 16691, 19416, ..., 1119684, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227493, 1224370, 1231432, ..., 1930681, 1936963, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227493, 1224370, 1231432, ..., 1930681, 1936963, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137433, 1137213, 1141424, 1140282, 1136347, 1135926, 1135935, 1135716,\n", - " 1135727, 1140785, 1140799, 1139698, 1141756, 1141758, 1137517, 1136223,\n", - " 1140290, 1139811, 1145373, 1146990, 1139141, 1143372, 1139241, 1150390,\n", - " 1150395, 1148976, 1150506, 1150509, 1139866, 1134940, 1149216, 1155686,\n", - " 1135992, 1142881, 1144632, 1135262, 1146995, 1153008, 1153012, 1134694,\n", - " 1135941, 1148343, 1148350, 1153217, 1147091, 1147094, 1147096, 1137220,\n", - " 1155014, 1139371, 1147211, 1150329, 1152427, 1134715, 1138742, 1138749,\n", - " 1140540, 1138112, 1137171, 1137180, 1149467, 1138366, 1151528, 1140020,\n", - " 1140952, 1135367, 1135202, 1135204, 1141036, 1134794, 1157443, 1143377,\n", - " 1137329, 1135337, 1144395, 1136826, 1137534, 1135408, 1157395, 1136662,\n", - " 1137440, 1137441, 1135265, 1156149, 1148494, 1135246, 1140254, 1140970,\n", - " 1138514, 1153094, 1137957, 1135499, 1137019, 1156899, 1139687, 1136364,\n", - " 1138436, 1138440, 1136534, 1138461, 1137493, 1137924, 1136594, 1158386,\n", - " 1158391, 1149328, 1138695, 1156603, 1156606, 1147112, 1147119, 1142611,\n", - " 1142615, 1135355, 1148531, 1135769, 1141532, 1136457, 1139667, 1159191,\n", - " 1136089, 1134992, 1148805, 1135789, 1158974, 1159009, 1159012, 1159018,\n", - " 1159019, 1141065, 1138655, 1141963, 1155648, 1146077, 1146078, 1146075,\n", - " 1140557, 1152044, 1139069, 1137734, 1137728, 1134750, 1135549, 1140228,\n", - " 1137898, 1141088, 1149001, 1139889, 1136392, 1143767, 1143703, 1143225,\n", - " 1139025, 1141695, 1135857, 1135860, 1135861, 1136419, 1154466, 1136625,\n", - " 1141224, 1141655, 1136917, 1143673, 1141154, 1141161, 1141786, 1139495,\n", - " 1144941, 1144650, 1134987, 1136852, 1147845, 1138482, 1145161, 1137761,\n", - " 1137771, 1139190, 1141479, 1141486, 1138708, 1140110, 1142913, 1137649,\n", - " 1137661, 1138423, 1145298, 1141579, 1146199, 1139559, 1158698, 1138539,\n", - " 1137854, 1161698, 1147153, 1142640, 1149186, 1149197, 1141365, 1153068,\n", - " 1141664, 1139018, 1139019, 1138293, 1139508, 1139509, 1139510, 1139764,\n", - " 1145000, 1140616, 1140619, 1140984, 1141560, 1143692, 1147050, 1145873,\n", - " 1143547, 1143538, 1152976, 1152985, 1152988, 1141925, 1144250, 1144242,\n", - " 1145339, 1141853, 1150243, 1148313, 1143643, 1143851, 1146024, 1146025,\n", - " 1146140, 1154328, 1149933, 1139990, 1143293, 1143283, 1147136, 1148763,\n", - " 1147282, 1164371, 1140348, 1139408, 1139417, 1148003, 1143051, 1138923,\n", - " 1136836, 1139329, 1141492, 1138235, 1139055, 1142118, 1142149, 1142153,\n", - " 1142159, 1143345, 1140844, 1137098, 1135876, 1135886, 1138013, 1143958,\n", - " 1143456, 1143458, 1143457, 1143007, 1142003, 1143937, 1146590, 1146633,\n", - " 1146626, 1147521, 1140364, 1149569, 1137990, 1137992, 1143075, 1166410,\n", - " 1148962, 1144725, 1147984, 1147988, 1147996, 1147999, 1134907, 1144003,\n", - " 1139252, 1139255, 1147244, 1148704, 1141825, 1141827, 1147070, 1147025,\n", - " 1147027, 1147031, 1147970, 1145011, 1139549, 1147198, 1158226, 1158235,\n", - " 1145237, 1145240, 1145751, 1138632, 1138638, 1148391, 1148397, 1146178,\n", - " 1151242, 1148223, 1150272, 1150445, 1149258, 1148829, 1149791, 1144514,\n", - " 1144526, 1145833, 1150342, 1153982, 1152013, 1165253, 1147807, 1154263,\n", - " 1146723, 1134869, 1134878, 1140566, 1150127, 1147021, 1147009, 1158950,\n", - " 1141274, 1148744, 1149985, 1147654, 1149412, 1148288, 1135076, 1135087,\n", - " 1139096, 1154420, 1148180, 1152561, 1136247, 1146676, 1146687, 1138404,\n", - " 1152436, 1148724, 1148726, 1148729, 1147627, 1139936, 1166314, 1148204,\n", - " 1171937, 1171943, 1154168, 1153125, 1153192, 1159837, 1152968, 1150935,\n", - " 1148060, 1152878, 1144863, 1155088, 1143129, 1147446, 1147447, 1147442,\n", - " 1151809, 1151816, 1151821, 1154183, 1145640, 1156889, 1141420, 1150628,\n", - " 1153449, 1148949, 1146969, 1146623, 1152409, 1154052, 1152100, 1152103,\n", - " 1156325, 1153032, 1153038, 1137746, 1137757, 1152608, 1152622, 1140521,\n", - " 1152826, 1154123, 1152673, 1154633, 1151617, 1151629, 1150578, 1151440,\n", - " 1136789, 1136798, 1148916, 1148921, 1152958, 1144529, 1138991, 1152903,\n", - " 1151311, 1152341, 1146816, 1158429, 1156831, 1153298, 1138279, 1138281,\n", - " 1152297, 1152301, 1152300, 1136028, 1158704, 1156619, 1156622, 1140684,\n", - " 1152928, 1151064, 1173593, 1152888, 1154728, 1143477, 1156422, 1150106,\n", - " 1150157, 1150164, 1153690, 1148040, 1145656, 1149792, 1137048, 1148628,\n", - " 1158530, 1148378, 1137458, 1149948, 1153865, 1157515, 1135698, 1135706,\n", - " 1155391, 1153085, 1142041, 1154377, 1135430, 1135434, 1157547, 1148892,\n", - " 1154929, 1156505, 1157064, 1153883, 1155418, 1145191, 1145184, 1139473,\n", - " 1151260, 1156629, 1156638, 1151788, 1152737, 1137624, 1158308, 1158311,\n", - " 1155441, 1153359, 1138573, 1142755, 1142758, 1156207, 1156271, 1157642,\n", - " 1151379, 1158628, 1152527, 1157183, 1135403, 1135406, 1146913, 1146920,\n", - " 1154763, 1155628, 1155630, 1158484, 1156563, 1154549, 1161429, 1161434,\n", - " 1136466, 1158824, 1158325, 1148836, 1155644, 1155646, 1146942, 1154250,\n", - " 1154240, 1139620, 1179427, 1143189, 1150371, 1153326, 1157439, 1141627,\n", - " 1159622, 1157934, 1157935, 1151030, 1137152, 1157650, 1158124, 1158996,\n", - " 1159116, 1159119, 1177753, 1138269, 1145694, 1145681, 1140919, 1166187,\n", - " 1134677, 1164161, 1135601, 1135602, 1148149, 1150661, 1155852, 1158664,\n", - " 1149145, 1152209, 1152220, 1152222, 1159213, 1157732, 1163684, 1155975,\n", - " 1156950, 1158846, 1149700, 1154600, 1153503, 1136896, 1158753, 1158882,\n", - " 1140221, 1158805, 1158447, 1158285, 1136491, 1154387, 1152128, 1153808,\n", - " 1157675, 1136640, 1136646, 1134757, 1166424, 1157858, 1157869, 1142184,\n", - " 1158545, 1158558, 1165497, 1146126, 1158006, 1150011, 1161539, 1137559,\n", - " 1135661, 1164276, 1142663, 1142666, 1167359, 1162685, 1144258, 1159070,\n", - " 1165830, 1163267, 1157941, 1153052, 1153045, 1171551, 1167707, 1159370,\n", - " 1156100, 1150046, 1150041, 1164554, 1149063, 1145948, 1155476, 1155479,\n", - " 1153519, 1142406, 1146870, 1138161, 1164006, 1164010, 1168327, 1149953,\n", - " 1149961, 1164909, 1163396, 1154590, 1139592, 1139284, 1139290, 1166936,\n", - " 1159890, 1169745, 1166073, 1157236, 1148771, 1146063, 1159552, 1146356,\n", - " 1171249, 1158461, 1162308, 1160701, 1165309, 1140134, 1158868, 1148600,\n", - " 1156361, 1176642, 1156181, 1159025, 1159032, 1152247, 1146532, 1155588,\n", - " 1160335, 1147562, 1151220, 1158405, 1144979, 1169647, 1146510, 1153239,\n", - " 1144739, 1166881, 1163527, 1155273, 1153204, 1141471, 1157050, 1149899,\n", - " 1179981, 1156739, 1153663, 1153273, 1168860, 1135567, 1142733, 1156293,\n", - " 1155324, 1166459, 1171691, 1138758, 1184043, 1143025, 1166053, 1147681,\n", - " 1145441, 1145455, 1170507, 1152624, 1152626, 1139344, 1139351, 1147719,\n", - " 1145902, 1143397, 1143405, 1143404, 1171279, 1154076, 1168756, 1144699,\n", - " 1177929, 1145674, 1192407, 1188857, 1149121, 1154917, 1166653, 1187829,\n", - " 1155172, 1150518, 1156119, 1144336, 1170930, 1157534, 1169154, 1169162,\n", - " 1151668, 1169359, 1149452, 1149688, 1158611, 1158623, 1158060, 1158062,\n", - " 1149847, 1154869, 1154875, 1152353, 1169185, 1170278, 1168451, 1168400,\n", - " 1149398, 1148667, 1148335, 1169271, 1173307, 1145027, 1169144, 1154027,\n", - " 1152150, 1159654, 1167857, 1169583, 1157153, 1157373, 1147711, 1178966,\n", - " 1151850, 1148131, 1148141, 1147925, 1176319, 1166825, 1168598, 1140326,\n", - " 1166028, 1172606, 1181131, 1163989, 1166682, 1166684, 1171823, 1182134,\n", - " 1179556, 1181772, 1150234, 1154148, 1154153, 1149169, 1149179, 1149183,\n", - " 1149173, 1172455, 1143269, 1169760, 1180393, 1168481, 1143420, 1181241,\n", - " 1153803, 1178163, 1164818, 1161039, 1184093, 1179807, 1161262, 1155262,\n", - " 1157792, 1157795, 1177585, 1182810, 1171623, 1180036, 1172148, 1153898,\n", - " 1145626, 1145618, 1157474, 1161911, 1149755, 1146252, 1153609, 1183215,\n", - " 1186957, 1163045, 1157761, 1155994, 1160115, 1160121, 1158512, 1187802,\n", - " 1158382, 1187922, 1177094, 1164411, 1140399, 1168273, 1180168, 1165487,\n", - " 1166227, 1168621, 1168874, 1168876, 1159459, 1182337, 1180983, 1165444,\n", - " 1161819, 1183824, 1181811, 1156162, 1162757, 1168930, 1156528, 1139831,\n", - " 1150265, 1154812, 1149668, 1156049, 1156055, 1151978, 1151977, 1180125,\n", - " 1188215, 1193369, 1194316, 1181951, 1194475, 1151774, 1183629, 1169707,\n", - " 1192661, 1177186, 1184757, 1191327, 1171201, 1177461, 1191064, 1161866,\n", - " 1172122, 1158064, 1184559, 1185632, 1155962, 1179769, 1194006, 1193904,\n", - " 1188747, 1189938, 1184977, 1157017, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137433, 1137213, 1141424, 1140282, 1136347, 1135926, 1135935, 1135716,\n", - " 1135727, 1140785, 1140799, 1139698, 1141756, 1141758, 1137517, 1136223,\n", - " 1140290, 1139811, 1145373, 1146990, 1139141, 1143372, 1139241, 1150390,\n", - " 1150395, 1148976, 1150506, 1150509, 1139866, 1134940, 1149216, 1155686,\n", - " 1135992, 1142881, 1144632, 1135262, 1146995, 1153008, 1153012, 1134694,\n", - " 1135941, 1148343, 1148350, 1153217, 1147091, 1147094, 1147096, 1137220,\n", - " 1155014, 1139371, 1147211, 1150329, 1152427, 1134715, 1138742, 1138749,\n", - " 1140540, 1138112, 1137171, 1137180, 1149467, 1138366, 1151528, 1140020,\n", - " 1140952, 1135367, 1135202, 1135204, 1141036, 1134794, 1157443, 1143377,\n", - " 1137329, 1135337, 1144395, 1136826, 1137534, 1135408, 1157395, 1136662,\n", - " 1137440, 1137441, 1135265, 1156149, 1148494, 1135246, 1140254, 1140970,\n", - " 1138514, 1153094, 1137957, 1135499, 1137019, 1156899, 1139687, 1136364,\n", - " 1138436, 1138440, 1136534, 1138461, 1137493, 1137924, 1136594, 1158386,\n", - " 1158391, 1149328, 1138695, 1156603, 1156606, 1147112, 1147119, 1142611,\n", - " 1142615, 1135355, 1148531, 1135769, 1141532, 1136457, 1139667, 1159191,\n", - " 1136089, 1134992, 1148805, 1135789, 1158974, 1159009, 1159012, 1159018,\n", - " 1159019, 1141065, 1138655, 1141963, 1155648, 1146077, 1146078, 1146075,\n", - " 1140557, 1152044, 1139069, 1137734, 1137728, 1134750, 1135549, 1140228,\n", - " 1137898, 1141088, 1149001, 1139889, 1136392, 1143767, 1143703, 1143225,\n", - " 1139025, 1141695, 1135857, 1135860, 1135861, 1136419, 1154466, 1136625,\n", - " 1141224, 1141655, 1136917, 1143673, 1141154, 1141161, 1141786, 1139495,\n", - " 1144941, 1144650, 1134987, 1136852, 1147845, 1138482, 1145161, 1137761,\n", - " 1137771, 1139190, 1141479, 1141486, 1138708, 1140110, 1142913, 1137649,\n", - " 1137661, 1138423, 1145298, 1141579, 1146199, 1139559, 1158698, 1138539,\n", - " 1137854, 1161698, 1147153, 1142640, 1149186, 1149197, 1141365, 1153068,\n", - " 1141664, 1139018, 1139019, 1138293, 1139508, 1139509, 1139510, 1139764,\n", - " 1145000, 1140616, 1140619, 1140984, 1141560, 1143692, 1147050, 1145873,\n", - " 1143547, 1143538, 1152976, 1152985, 1152988, 1141925, 1144250, 1144242,\n", - " 1145339, 1141853, 1150243, 1148313, 1143643, 1143851, 1146024, 1146025,\n", - " 1146140, 1154328, 1149933, 1139990, 1143293, 1143283, 1147136, 1148763,\n", - " 1147282, 1164371, 1140348, 1139408, 1139417, 1148003, 1143051, 1138923,\n", - " 1136836, 1139329, 1141492, 1138235, 1139055, 1142118, 1142149, 1142153,\n", - " 1142159, 1143345, 1140844, 1137098, 1135876, 1135886, 1138013, 1143958,\n", - " 1143456, 1143458, 1143457, 1143007, 1142003, 1143937, 1146590, 1146633,\n", - " 1146626, 1147521, 1140364, 1149569, 1137990, 1137992, 1143075, 1166410,\n", - " 1148962, 1144725, 1147984, 1147988, 1147996, 1147999, 1134907, 1144003,\n", - " 1139252, 1139255, 1147244, 1148704, 1141825, 1141827, 1147070, 1147025,\n", - " 1147027, 1147031, 1147970, 1145011, 1139549, 1147198, 1158226, 1158235,\n", - " 1145237, 1145240, 1145751, 1138632, 1138638, 1148391, 1148397, 1146178,\n", - " 1151242, 1148223, 1150272, 1150445, 1149258, 1148829, 1149791, 1144514,\n", - " 1144526, 1145833, 1150342, 1153982, 1152013, 1165253, 1147807, 1154263,\n", - " 1146723, 1134869, 1134878, 1140566, 1150127, 1147021, 1147009, 1158950,\n", - " 1141274, 1148744, 1149985, 1147654, 1149412, 1148288, 1135076, 1135087,\n", - " 1139096, 1154420, 1148180, 1152561, 1136247, 1146676, 1146687, 1138404,\n", - " 1152436, 1148724, 1148726, 1148729, 1147627, 1139936, 1166314, 1148204,\n", - " 1171937, 1171943, 1154168, 1153125, 1153192, 1159837, 1152968, 1150935,\n", - " 1148060, 1152878, 1144863, 1155088, 1143129, 1147446, 1147447, 1147442,\n", - " 1151809, 1151816, 1151821, 1154183, 1145640, 1156889, 1141420, 1150628,\n", - " 1153449, 1148949, 1146969, 1146623, 1152409, 1154052, 1152100, 1152103,\n", - " 1156325, 1153032, 1153038, 1137746, 1137757, 1152608, 1152622, 1140521,\n", - " 1152826, 1154123, 1152673, 1154633, 1151617, 1151629, 1150578, 1151440,\n", - " 1136789, 1136798, 1148916, 1148921, 1152958, 1144529, 1138991, 1152903,\n", - " 1151311, 1152341, 1146816, 1158429, 1156831, 1153298, 1138279, 1138281,\n", - " 1152297, 1152301, 1152300, 1136028, 1158704, 1156619, 1156622, 1140684,\n", - " 1152928, 1151064, 1173593, 1152888, 1154728, 1143477, 1156422, 1150106,\n", - " 1150157, 1150164, 1153690, 1148040, 1145656, 1149792, 1137048, 1148628,\n", - " 1158530, 1148378, 1137458, 1149948, 1153865, 1157515, 1135698, 1135706,\n", - " 1155391, 1153085, 1142041, 1154377, 1135430, 1135434, 1157547, 1148892,\n", - " 1154929, 1156505, 1157064, 1153883, 1155418, 1145191, 1145184, 1139473,\n", - " 1151260, 1156629, 1156638, 1151788, 1152737, 1137624, 1158308, 1158311,\n", - " 1155441, 1153359, 1138573, 1142755, 1142758, 1156207, 1156271, 1157642,\n", - " 1151379, 1158628, 1152527, 1157183, 1135403, 1135406, 1146913, 1146920,\n", - " 1154763, 1155628, 1155630, 1158484, 1156563, 1154549, 1161429, 1161434,\n", - " 1136466, 1158824, 1158325, 1148836, 1155644, 1155646, 1146942, 1154250,\n", - " 1154240, 1139620, 1179427, 1143189, 1150371, 1153326, 1157439, 1141627,\n", - " 1159622, 1157934, 1157935, 1151030, 1137152, 1157650, 1158124, 1158996,\n", - " 1159116, 1159119, 1177753, 1138269, 1145694, 1145681, 1140919, 1166187,\n", - " 1134677, 1164161, 1135601, 1135602, 1148149, 1150661, 1155852, 1158664,\n", - " 1149145, 1152209, 1152220, 1152222, 1159213, 1157732, 1163684, 1155975,\n", - " 1156950, 1158846, 1149700, 1154600, 1153503, 1136896, 1158753, 1158882,\n", - " 1140221, 1158805, 1158447, 1158285, 1136491, 1154387, 1152128, 1153808,\n", - " 1157675, 1136640, 1136646, 1134757, 1166424, 1157858, 1157869, 1142184,\n", - " 1158545, 1158558, 1165497, 1146126, 1158006, 1150011, 1161539, 1137559,\n", - " 1135661, 1164276, 1142663, 1142666, 1167359, 1162685, 1144258, 1159070,\n", - " 1165830, 1163267, 1157941, 1153052, 1153045, 1171551, 1167707, 1159370,\n", - " 1156100, 1150046, 1150041, 1164554, 1149063, 1145948, 1155476, 1155479,\n", - " 1153519, 1142406, 1146870, 1138161, 1164006, 1164010, 1168327, 1149953,\n", - " 1149961, 1164909, 1163396, 1154590, 1139592, 1139284, 1139290, 1166936,\n", - " 1159890, 1169745, 1166073, 1157236, 1148771, 1146063, 1159552, 1146356,\n", - " 1171249, 1158461, 1162308, 1160701, 1165309, 1140134, 1158868, 1148600,\n", - " 1156361, 1176642, 1156181, 1159025, 1159032, 1152247, 1146532, 1155588,\n", - " 1160335, 1147562, 1151220, 1158405, 1144979, 1169647, 1146510, 1153239,\n", - " 1144739, 1166881, 1163527, 1155273, 1153204, 1141471, 1157050, 1149899,\n", - " 1179981, 1156739, 1153663, 1153273, 1168860, 1135567, 1142733, 1156293,\n", - " 1155324, 1166459, 1171691, 1138758, 1184043, 1143025, 1166053, 1147681,\n", - " 1145441, 1145455, 1170507, 1152624, 1152626, 1139344, 1139351, 1147719,\n", - " 1145902, 1143397, 1143405, 1143404, 1171279, 1154076, 1168756, 1144699,\n", - " 1177929, 1145674, 1192407, 1188857, 1149121, 1154917, 1166653, 1187829,\n", - " 1155172, 1150518, 1156119, 1144336, 1170930, 1157534, 1169154, 1169162,\n", - " 1151668, 1169359, 1149452, 1149688, 1158611, 1158623, 1158060, 1158062,\n", - " 1149847, 1154869, 1154875, 1152353, 1169185, 1170278, 1168451, 1168400,\n", - " 1149398, 1148667, 1148335, 1169271, 1173307, 1145027, 1169144, 1154027,\n", - " 1152150, 1159654, 1167857, 1169583, 1157153, 1157373, 1147711, 1178966,\n", - " 1151850, 1148131, 1148141, 1147925, 1176319, 1166825, 1168598, 1140326,\n", - " 1166028, 1172606, 1181131, 1163989, 1166682, 1166684, 1171823, 1182134,\n", - " 1179556, 1181772, 1150234, 1154148, 1154153, 1149169, 1149179, 1149183,\n", - " 1149173, 1172455, 1143269, 1169760, 1180393, 1168481, 1143420, 1181241,\n", - " 1153803, 1178163, 1164818, 1161039, 1184093, 1179807, 1161262, 1155262,\n", - " 1157792, 1157795, 1177585, 1182810, 1171623, 1180036, 1172148, 1153898,\n", - " 1145626, 1145618, 1157474, 1161911, 1149755, 1146252, 1153609, 1183215,\n", - " 1186957, 1163045, 1157761, 1155994, 1160115, 1160121, 1158512, 1187802,\n", - " 1158382, 1187922, 1177094, 1164411, 1140399, 1168273, 1180168, 1165487,\n", - " 1166227, 1168621, 1168874, 1168876, 1159459, 1182337, 1180983, 1165444,\n", - " 1161819, 1183824, 1181811, 1156162, 1162757, 1168930, 1156528, 1139831,\n", - " 1150265, 1154812, 1149668, 1156049, 1156055, 1151978, 1151977, 1180125,\n", - " 1188215, 1193369, 1194316, 1181951, 1194475, 1151774, 1183629, 1169707,\n", - " 1192661, 1177186, 1184757, 1191327, 1171201, 1177461, 1191064, 1161866,\n", - " 1172122, 1158064, 1184559, 1185632, 1155962, 1179769, 1194006, 1193904,\n", - " 1188747, 1189938, 1184977, 1157017, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196011, 1199833, 1195860, 1199282, 1198449, 1198459, 1202255, 1198832,\n", - " 1198840, 1198844, 1201582, 1202119, 1194626, 1200644, 1197359, 1198624,\n", - " 1196956, 1198557, 1197514, 1194866, 1194770, 1194648, 1195512, 1195514,\n", - " 1198619, 1195263, 1197697, 1199519, 1195830, 1198306, 1194882, 1195888,\n", - " 1196616, 1194754, 1196840, 1197807, 1195134, 1198268, 1195571, 1198041,\n", - " 1198958, 1198163, 1196705, 1195145, 1195148, 1195223, 1195278, 1197141,\n", - " 1197136, 1196255, 1197273, 1198220, 1195847, 1197474, 1197478, 1199998,\n", - " 1200037, 1195626, 1198273, 1200959, 1199856, 1199185, 1194928, 1200076,\n", - " 1198404, 1199579, 1200739, 1199676, 1199845, 1199949, 1201511, 1200668,\n", - " 1195807, 1197601, 1196727, 1195773, 1198428, 1198811, 1199555, 1201547,\n", - " 1200612, 1201824, 1200169, 1196479, 1201155, 1200915, 1202641, 1199712,\n", - " 1200546, 1200429, 1197100, 1202978, 1202138, 1200690, 1199908, 1201451,\n", - " 1201029, 1202239, 1200181, 1201865, 1203336, 1201590, 1196966, 1202687,\n", - " 1196823, 1195676, 1195679, 1195664, 1198911, 1201789, 1197816, 1197822,\n", - " 1199659, 1199469, 1203102, 1199234, 1195070, 1201886, 1197035, 1195165],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196011, 1199833, 1195860, 1199282, 1198449, 1198459, 1202255, 1198832,\n", - " 1198840, 1198844, 1201582, 1202119, 1194626, 1200644, 1197359, 1198624,\n", - " 1196956, 1198557, 1197514, 1194866, 1194770, 1194648, 1195512, 1195514,\n", - " 1198619, 1195263, 1197697, 1199519, 1195830, 1198306, 1194882, 1195888,\n", - " 1196616, 1194754, 1196840, 1197807, 1195134, 1198268, 1195571, 1198041,\n", - " 1198958, 1198163, 1196705, 1195145, 1195148, 1195223, 1195278, 1197141,\n", - " 1197136, 1196255, 1197273, 1198220, 1195847, 1197474, 1197478, 1199998,\n", - " 1200037, 1195626, 1198273, 1200959, 1199856, 1199185, 1194928, 1200076,\n", - " 1198404, 1199579, 1200739, 1199676, 1199845, 1199949, 1201511, 1200668,\n", - " 1195807, 1197601, 1196727, 1195773, 1198428, 1198811, 1199555, 1201547,\n", - " 1200612, 1201824, 1200169, 1196479, 1201155, 1200915, 1202641, 1199712,\n", - " 1200546, 1200429, 1197100, 1202978, 1202138, 1200690, 1199908, 1201451,\n", - " 1201029, 1202239, 1200181, 1201865, 1203336, 1201590, 1196966, 1202687,\n", - " 1196823, 1195676, 1195679, 1195664, 1198911, 1201789, 1197816, 1197822,\n", - " 1199659, 1199469, 1203102, 1199234, 1195070, 1201886, 1197035, 1195165],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 2.7790e-01, -9.7593e-04, 9.5593e-01, ..., 5.4811e-02,\n", - " -1.4583e-03, -6.9159e-03],\n", - " [ 2.5839e-01, -7.3130e-04, 8.4318e-01, ..., 5.1233e-02,\n", - " -1.5688e-03, -6.1404e-03],\n", - " [ 2.7470e-01, -8.1009e-04, 8.6883e-01, ..., 5.0518e-02,\n", - " -1.5933e-03, -6.2901e-03],\n", - " ...,\n", - " [ 2.7470e-01, -8.1009e-04, 8.6883e-01, ..., 5.0518e-02,\n", - " -1.5933e-03, -6.2901e-03],\n", - " [ 1.7898e-01, -3.5548e-04, 6.2006e-01, ..., 8.7517e-02,\n", - " -1.8244e-03, -4.4984e-03],\n", - " [ 2.5418e-01, -8.5428e-04, 7.4312e-01, ..., 3.6122e-02,\n", - " -1.4218e-03, -5.7450e-03]], device='cuda:0'), 'paper': tensor([[ 1.8004e-01, 3.8060e-01, 3.7755e-01, ..., -8.9129e-03,\n", - " -1.8329e-02, 1.5243e-02],\n", - " [-6.8880e-03, 2.6298e+00, 2.7252e+00, ..., 2.5055e+00,\n", - " -3.9528e-02, 1.0837e+00],\n", - " [-2.0523e-02, 2.0311e-01, 2.1080e+00, ..., -9.4458e-03,\n", - " -2.5914e-02, -2.8705e-02],\n", - " ...,\n", - " [-7.7427e-03, 1.4467e+00, 2.7491e+00, ..., 9.3921e-02,\n", - " -3.6822e-02, -2.7652e-03],\n", - " [-6.1512e-03, 5.8494e-01, 9.4915e-01, ..., -6.5472e-03,\n", - " -1.8168e-02, -8.4632e-03],\n", - " [-6.4981e-03, 3.6437e+00, 2.4055e+00, ..., 5.0421e+00,\n", - " -5.2713e-02, 2.9811e+00]], device='cuda:0'), 'author': tensor([[-1.4851e-03, 2.2034e-01, 1.6209e-01, ..., 1.2635e+00,\n", - " 2.4778e-01, -1.1046e-03],\n", - " [-3.5529e-03, 3.2501e-01, 1.5433e-01, ..., 1.3393e+00,\n", - " -1.9874e-03, -4.5694e-03],\n", - " [-1.9924e-03, 2.0165e-01, 1.4836e-01, ..., 1.0912e+00,\n", - " 2.7255e-01, -1.1302e-03],\n", - " ...,\n", - " [-1.0245e-03, 2.7875e-01, 1.2002e-01, ..., 1.3879e+00,\n", - " 4.0598e-01, -3.9022e-04],\n", - " [-1.5765e-03, 2.0122e-01, 1.9051e-01, ..., 1.2493e+00,\n", - " 3.0369e-01, -1.1601e-03],\n", - " [ 9.9808e-03, 2.4886e-01, 9.1215e-02, ..., 1.2407e+00,\n", - " 5.8302e-01, 1.2796e-01]], device='cuda:0'), 'field_of_study': tensor([[-0.0019, 0.4585, 0.1457, ..., -0.0078, 0.2984, 0.3659],\n", - " [-0.0027, 0.6220, 0.2414, ..., -0.0077, 0.3741, 0.3710],\n", - " [-0.0022, 0.5502, 0.0940, ..., -0.0080, 0.4017, 0.3975],\n", - " ...,\n", - " [-0.0020, 0.3407, 0.0337, ..., -0.0066, 0.2737, 0.2966],\n", - " [-0.0021, 0.5313, 0.1283, ..., -0.0084, 0.4090, 0.4838],\n", - " [ 0.0064, 0.6601, 0.2743, ..., -0.0106, 0.4986, 0.2495]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 158, 43, 96, 96, 92, 171, 317, 317, 198, 247, 407, 407,\n", - " 434, 361, 476, 789, 914, 676, 796, 796, 796, 980, 1091, 1263,\n", - " 968, 968, 1404, 1090, 1090, 1090, 1090, 1090, 1421, 1366, 1366, 1366,\n", - " 1090, 1090, 1090, 1450, 1429, 1537, 1628, 1553, 1377, 1339, 1570, 1570,\n", - " 1585, 1584, 1683, 1910, 1763, 1807, 2025, 2114, 1763, 1763, 1763, 1763,\n", - " 1894, 1978, 2059, 2059, 1867, 2069, 2069, 2069, 2069, 2162, 2162, 2037,\n", - " 2037, 2037, 2176, 2414, 2582, 2686, 2675, 2740, 2698, 2879, 3215, 3215,\n", - " 3215, 2999, 3231, 3231, 3301, 3301, 3313, 3313, 3394, 3376, 3376, 3457,\n", - " 3513, 3656, 3642, 3874, 4051, 4131, 4081, 4209, 4209, 4281, 4237, 4320,\n", - " 4320, 4365, 4356, 4467, 4386, 4507, 4609, 4500, 4500, 4757, 4765, 4630,\n", - " 4612, 4855, 4855, 4627, 4600, 4600, 4865, 4882, 4731, 4786, 4786, 4774,\n", - " 4774, 4917, 4980, 4844, 5151, 5151, 5073, 5223, 5223, 5223, 5010, 5010,\n", - " 5011, 4954, 5208, 5164, 5382, 5291, 5320, 5320, 5265, 5479, 5449, 5492,\n", - " 5655, 5407, 5359, 5954, 5590, 5590, 5590, 5886, 5607, 5793, 5795, 5983,\n", - " 6006, 5838, 6003, 5812, 5629, 6234, 6043, 6389, 6270, 6086, 6001, 6001,\n", - " 6058, 6369, 6241, 6503, 6223, 6223, 6081, 6384, 6506],\n", - " [ 59, 46, 55, 10, 10, 23, 100, 33, 111, 97, 95, 55,\n", - " 103, 83, 34, 26, 111, 28, 75, 67, 37, 83, 65, 101,\n", - " 85, 70, 6, 60, 63, 44, 21, 74, 110, 67, 37, 75,\n", - " 14, 104, 54, 76, 36, 18, 51, 105, 96, 1, 80, 115,\n", - " 61, 79, 115, 109, 13, 112, 99, 48, 89, 29, 16, 7,\n", - " 10, 55, 26, 87, 25, 45, 91, 57, 31, 37, 75, 74,\n", - " 81, 105, 50, 51, 68, 76, 94, 69, 74, 97, 48, 3,\n", - " 66, 19, 108, 9, 84, 5, 118, 72, 110, 3, 70, 27,\n", - " 75, 77, 25, 8, 32, 73, 62, 17, 25, 25, 65, 64,\n", - " 3, 25, 97, 25, 110, 116, 58, 3, 113, 110, 4, 110,\n", - " 106, 30, 70, 111, 65, 63, 110, 115, 0, 24, 102, 88,\n", - " 20, 11, 114, 47, 92, 3, 3, 74, 117, 2, 74, 90,\n", - " 119, 73, 34, 41, 56, 110, 74, 47, 78, 110, 68, 40,\n", - " 86, 12, 21, 82, 53, 12, 108, 42, 77, 38, 66, 52,\n", - " 74, 98, 22, 58, 39, 49, 76, 35, 43, 15, 74, 89,\n", - " 61, 107, 106, 93, 30, 74, 74, 74, 71]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2984, 873, 2018, ..., 5314, 459, 3149],\n", - " [ 80, 54, 54, ..., 7039, 7107, 7088]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 76, 84, 62, ..., 77, 84, 35],\n", - " [ 167, 118, 42, ..., 6393, 6404, 6516]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 100, 100, 100, ..., 7152, 6993, 6993],\n", - " [ 571, 214, 107, ..., 469, 831, 775]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 291, 494, 147, ..., 69, 831, 447],\n", - " [ 404, 244, 223, ..., 7160, 7076, 7020]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2822, 3744, 1267, ..., 1968, 6734, 5660],\n", - " [ 48, 44, 13, ..., 6566, 6521, 6488]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 100, 100, 100, ..., 7152, 7152, 7152],\n", - " [1164, 1196, 1910, ..., 6138, 6374, 5929]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 158, 158, 158, ..., 6506, 6506, 6506],\n", - " [4233, 3222, 2704, ..., 5660, 5170, 4706]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006533\n", - "sampling 0.006381\n", - "noi time: 0.002038\n", - "get_vertex_data call: 0.037658\n", - "noi group time: 0.003509\n", - "eoi_group_time: 0.016812\n", - "second half: 0.219811\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 23835, 24187, 21459, ..., 1120069, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 23835, 24187, 21459, ..., 1120069, 1100728, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208581, 1221048, 1203797, ..., 1933651, 1935650, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208581, 1221048, 1203797, ..., 1933651, 1935650, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1137212, 1141424, 1140282, 1140284, 1135926, 1135160, 1135727,\n", - " 1140785, 1139701, 1141758, 1137506, 1138335, 1136208, 1136213, 1136155,\n", - " 1136965, 1136969, 1138903, 1151164, 1143609, 1149836, 1139811, 1154774,\n", - " 1145370, 1146991, 1137274, 1138933, 1146426, 1139140, 1143372, 1150390,\n", - " 1146641, 1139957, 1150497, 1145288, 1149216, 1143820, 1147483, 1135991,\n", - " 1149290, 1144636, 1148347, 1148546, 1153217, 1137220, 1139373, 1136677,\n", - " 1150329, 1151546, 1140531, 1140535, 1140540, 1138112, 1137254, 1137172,\n", - " 1149461, 1153463, 1140158, 1134735, 1140020, 1135367, 1135202, 1135210,\n", - " 1136047, 1134969, 1141036, 1136770, 1134791, 1134794, 1157443, 1137329,\n", - " 1136178, 1143064, 1157103, 1137693, 1136826, 1136928, 1156159, 1139153,\n", - " 1139161, 1134841, 1141703, 1142602, 1136111, 1140240, 1140970, 1138514,\n", - " 1138527, 1137953, 1154132, 1136985, 1156899, 1135522, 1135535, 1139685,\n", - " 1138311, 1136357, 1139878, 1138440, 1138461, 1137493, 1136594, 1149328,\n", - " 1142611, 1142615, 1145843, 1148531, 1139667, 1139673, 1138067, 1138069,\n", - " 1142255, 1136087, 1134992, 1142788, 1148805, 1153543, 1138148, 1141963,\n", - " 1134888, 1146077, 1146075, 1140557, 1152042, 1152044, 1139063, 1140657,\n", - " 1137734, 1137728, 1147317, 1140901, 1134738, 1134742, 1134750, 1135549,\n", - " 1141095, 1141098, 1154860, 1143224, 1143225, 1143229, 1149982, 1146834,\n", - " 1152719, 1135860, 1136625, 1136632, 1141106, 1141223, 1141891, 1163306,\n", - " 1136917, 1139742, 1143678, 1137188, 1139495, 1141609, 1144650, 1147850,\n", - " 1143153, 1140163, 1158749, 1141479, 1138710, 1138708, 1142913, 1143107,\n", - " 1143113, 1144445, 1144596, 1142455, 1142451, 1136864, 1145298, 1144182,\n", - " 1137611, 1150906, 1161093, 1139559, 1139560, 1158703, 1147153, 1141367,\n", - " 1140815, 1149088, 1149097, 1139019, 1144279, 1139510, 1139655, 1138815,\n", - " 1144998, 1145000, 1143779, 1140977, 1140990, 1146693, 1146695, 1147050,\n", - " 1143543, 1152976, 1139450, 1141925, 1141929, 1146901, 1144242, 1145339,\n", - " 1140580, 1150253, 1140689, 1136891, 1139405, 1143643, 1145980, 1143851,\n", - " 1146024, 1146140, 1154328, 1142533, 1149928, 1139990, 1143293, 1143283,\n", - " 1143294, 1143290, 1150418, 1147543, 1147540, 1148763, 1147282, 1142817,\n", - " 1142816, 1138660, 1140348, 1142629, 1149366, 1138927, 1136836, 1139306,\n", - " 1139329, 1139328, 1142159, 1145427, 1143345, 1137098, 1144088, 1135876,\n", - " 1135813, 1150300, 1150919, 1146514, 1146523, 1146526, 1143958, 1143457,\n", - " 1140823, 1147574, 1147521, 1140352, 1140364, 1137990, 1143075, 1144725,\n", - " 1144219, 1147999, 1134902, 1139252, 1139249, 1147127, 1147131, 1148704,\n", - " 1141836, 1147056, 1147066, 1149714, 1149718, 1149722, 1145012, 1139549,\n", - " 1158226, 1145237, 1145750, 1138638, 1146178, 1152530, 1151182, 1150445,\n", - " 1154998, 1150339, 1144203, 1151991, 1151994, 1165252, 1151480, 1151473,\n", - " 1154260, 1145261, 1145262, 1142286, 1150127, 1148278, 1147023, 1158959,\n", - " 1141189, 1144819, 1137636, 1153574, 1154979, 1143560, 1148288, 1135083,\n", - " 1147866, 1154420, 1148180, 1136249, 1136247, 1146684, 1157983, 1148720,\n", - " 1148729, 1144110, 1146544, 1139950, 1148204, 1153124, 1153188, 1145104,\n", - " 1152915, 1152921, 1150935, 1144863, 1144851, 1155088, 1151816, 1152581,\n", - " 1152586, 1154183, 1148505, 1148510, 1146565, 1141420, 1145086, 1149385,\n", - " 1150894, 1146969, 1146975, 1150219, 1146623, 1151694, 1151401, 1151403,\n", - " 1144472, 1156334, 1153029, 1153030, 1153026, 1137746, 1137755, 1146307,\n", - " 1152622, 1140517, 1140524, 1152816, 1152826, 1154123, 1157839, 1152673,\n", - " 1152686, 1151617, 1150578, 1145278, 1136794, 1153387, 1138989, 1152341,\n", - " 1153311, 1138281, 1156004, 1156001, 1136028, 1158704, 1140674, 1140684,\n", - " 1155786, 1156387, 1156399, 1150099, 1137403, 1149269, 1149273, 1148040,\n", - " 1161207, 1149300, 1152601, 1174935, 1148628, 1158530, 1149947, 1135698,\n", - " 1155376, 1142047, 1150967, 1150972, 1158854, 1150877, 1152833, 1143491,\n", - " 1150465, 1135219, 1135730, 1152179, 1152191, 1152182, 1151788, 1139525,\n", - " 1158306, 1158308, 1158311, 1151340, 1155441, 1161738, 1150132, 1154529,\n", - " 1156919, 1138775, 1151379, 1158628, 1155122, 1152527, 1149504, 1155755,\n", - " 1145793, 1156463, 1158096, 1168230, 1155626, 1155628, 1156563, 1158824,\n", - " 1158829, 1158325, 1148837, 1148650, 1155646, 1154240, 1157430, 1155606,\n", - " 1155615, 1145713, 1150983, 1143517, 1157288, 1137152, 1153776, 1159116,\n", - " 1135601, 1135605, 1150671, 1155852, 1158665, 1138216, 1149145, 1140634,\n", - " 1140633, 1159213, 1155439, 1156692, 1156693, 1160749, 1157741, 1157735,\n", - " 1157028, 1144843, 1155971, 1155975, 1156948, 1153766, 1158846, 1156811,\n", - " 1149696, 1154592, 1166126, 1160164, 1180771, 1136896, 1158753, 1140221,\n", - " 1158803, 1158285, 1151602, 1136494, 1136491, 1156490, 1153808, 1136640,\n", - " 1136646, 1166424, 1158558, 1165778, 1155856, 1155521, 1161539, 1142487,\n", - " 1142493, 1159042, 1159052, 1142420, 1157945, 1153052, 1153045, 1163072,\n", - " 1155763, 1156226, 1156104, 1138393, 1142687, 1142685, 1150046, 1150041,\n", - " 1149063, 1149070, 1153514, 1153519, 1164859, 1147300, 1138161, 1164006,\n", - " 1139776, 1164901, 1163396, 1163381, 1154590, 1139284, 1139286, 1166073,\n", - " 1148771, 1146063, 1159931, 1170415, 1148603, 1143143, 1158653, 1156178,\n", - " 1159025, 1160893, 1168129, 1152247, 1178146, 1155588, 1165993, 1188677,\n", - " 1138674, 1138685, 1148571, 1158405, 1144977, 1146500, 1146510, 1146509,\n", - " 1161239, 1161240, 1144737, 1152776, 1155279, 1147426, 1160849, 1168748,\n", - " 1140112, 1164741, 1142722, 1142733, 1156300, 1148683, 1163935, 1145228,\n", - " 1146042, 1166462, 1138952, 1150533, 1144972, 1144973, 1147681, 1147689,\n", - " 1147691, 1147355, 1152630, 1139359, 1193481, 1145902, 1153520, 1181049,\n", - " 1175240, 1143404, 1169741, 1168755, 1147331, 1147334, 1147338, 1163640,\n", - " 1144690, 1151587, 1151598, 1167817, 1155183, 1150522, 1150518, 1167915,\n", - " 1156119, 1161781, 1144346, 1144336, 1157534, 1147750, 1154670, 1154893,\n", - " 1157331, 1157333, 1141043, 1169359, 1149452, 1138609, 1149688, 1158611,\n", - " 1158623, 1172574, 1149847, 1172295, 1178728, 1155502, 1152353, 1168462,\n", - " 1143859, 1166488, 1192139, 1149393, 1148335, 1169271, 1173307, 1145033,\n", - " 1154018, 1154027, 1152145, 1152150, 1153758, 1178102, 1151208, 1151697,\n", - " 1157153, 1157371, 1167243, 1147711, 1148131, 1169913, 1157593, 1166827,\n", - " 1169037, 1172961, 1168604, 1179699, 1146757, 1170335, 1140326, 1170018,\n", - " 1172601, 1174845, 1150234, 1150238, 1154148, 1167517, 1149173, 1170465,\n", - " 1167657, 1168481, 1179243, 1171297, 1153141, 1181489, 1180818, 1179807,\n", - " 1158030, 1180200, 1166554, 1155262, 1157792, 1157795, 1151488, 1172546,\n", - " 1171623, 1155804, 1180036, 1179540, 1182596, 1153889, 1153898, 1145626,\n", - " 1156446, 1177743, 1149755, 1153609, 1186957, 1155990, 1173137, 1158771,\n", - " 1181190, 1155892, 1157270, 1182785, 1183071, 1168273, 1168282, 1164798,\n", - " 1168889, 1184536, 1162253, 1163422, 1165082, 1161819, 1147181, 1172636,\n", - " 1170034, 1182158, 1181561, 1139828, 1139831, 1150265, 1154812, 1184377,\n", - " 1156055, 1151978, 1173019, 1194204, 1149536, 1188371, 1186736, 1188156,\n", - " 1187040, 1167435, 1171358, 1140992, 1141003, 1192614, 1193696, 1179410,\n", - " 1190455, 1171462, 1191604, 1162497, 1176041, 1169700, 1194292, 1171201,\n", - " 1172984, 1145395, 1155962, 1172187, 1185938, 1188350, 1189075, 1188749,\n", - " 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1137212, 1141424, 1140282, 1140284, 1135926, 1135160, 1135727,\n", - " 1140785, 1139701, 1141758, 1137506, 1138335, 1136208, 1136213, 1136155,\n", - " 1136965, 1136969, 1138903, 1151164, 1143609, 1149836, 1139811, 1154774,\n", - " 1145370, 1146991, 1137274, 1138933, 1146426, 1139140, 1143372, 1150390,\n", - " 1146641, 1139957, 1150497, 1145288, 1149216, 1143820, 1147483, 1135991,\n", - " 1149290, 1144636, 1148347, 1148546, 1153217, 1137220, 1139373, 1136677,\n", - " 1150329, 1151546, 1140531, 1140535, 1140540, 1138112, 1137254, 1137172,\n", - " 1149461, 1153463, 1140158, 1134735, 1140020, 1135367, 1135202, 1135210,\n", - " 1136047, 1134969, 1141036, 1136770, 1134791, 1134794, 1157443, 1137329,\n", - " 1136178, 1143064, 1157103, 1137693, 1136826, 1136928, 1156159, 1139153,\n", - " 1139161, 1134841, 1141703, 1142602, 1136111, 1140240, 1140970, 1138514,\n", - " 1138527, 1137953, 1154132, 1136985, 1156899, 1135522, 1135535, 1139685,\n", - " 1138311, 1136357, 1139878, 1138440, 1138461, 1137493, 1136594, 1149328,\n", - " 1142611, 1142615, 1145843, 1148531, 1139667, 1139673, 1138067, 1138069,\n", - " 1142255, 1136087, 1134992, 1142788, 1148805, 1153543, 1138148, 1141963,\n", - " 1134888, 1146077, 1146075, 1140557, 1152042, 1152044, 1139063, 1140657,\n", - " 1137734, 1137728, 1147317, 1140901, 1134738, 1134742, 1134750, 1135549,\n", - " 1141095, 1141098, 1154860, 1143224, 1143225, 1143229, 1149982, 1146834,\n", - " 1152719, 1135860, 1136625, 1136632, 1141106, 1141223, 1141891, 1163306,\n", - " 1136917, 1139742, 1143678, 1137188, 1139495, 1141609, 1144650, 1147850,\n", - " 1143153, 1140163, 1158749, 1141479, 1138710, 1138708, 1142913, 1143107,\n", - " 1143113, 1144445, 1144596, 1142455, 1142451, 1136864, 1145298, 1144182,\n", - " 1137611, 1150906, 1161093, 1139559, 1139560, 1158703, 1147153, 1141367,\n", - " 1140815, 1149088, 1149097, 1139019, 1144279, 1139510, 1139655, 1138815,\n", - " 1144998, 1145000, 1143779, 1140977, 1140990, 1146693, 1146695, 1147050,\n", - " 1143543, 1152976, 1139450, 1141925, 1141929, 1146901, 1144242, 1145339,\n", - " 1140580, 1150253, 1140689, 1136891, 1139405, 1143643, 1145980, 1143851,\n", - " 1146024, 1146140, 1154328, 1142533, 1149928, 1139990, 1143293, 1143283,\n", - " 1143294, 1143290, 1150418, 1147543, 1147540, 1148763, 1147282, 1142817,\n", - " 1142816, 1138660, 1140348, 1142629, 1149366, 1138927, 1136836, 1139306,\n", - " 1139329, 1139328, 1142159, 1145427, 1143345, 1137098, 1144088, 1135876,\n", - " 1135813, 1150300, 1150919, 1146514, 1146523, 1146526, 1143958, 1143457,\n", - " 1140823, 1147574, 1147521, 1140352, 1140364, 1137990, 1143075, 1144725,\n", - " 1144219, 1147999, 1134902, 1139252, 1139249, 1147127, 1147131, 1148704,\n", - " 1141836, 1147056, 1147066, 1149714, 1149718, 1149722, 1145012, 1139549,\n", - " 1158226, 1145237, 1145750, 1138638, 1146178, 1152530, 1151182, 1150445,\n", - " 1154998, 1150339, 1144203, 1151991, 1151994, 1165252, 1151480, 1151473,\n", - " 1154260, 1145261, 1145262, 1142286, 1150127, 1148278, 1147023, 1158959,\n", - " 1141189, 1144819, 1137636, 1153574, 1154979, 1143560, 1148288, 1135083,\n", - " 1147866, 1154420, 1148180, 1136249, 1136247, 1146684, 1157983, 1148720,\n", - " 1148729, 1144110, 1146544, 1139950, 1148204, 1153124, 1153188, 1145104,\n", - " 1152915, 1152921, 1150935, 1144863, 1144851, 1155088, 1151816, 1152581,\n", - " 1152586, 1154183, 1148505, 1148510, 1146565, 1141420, 1145086, 1149385,\n", - " 1150894, 1146969, 1146975, 1150219, 1146623, 1151694, 1151401, 1151403,\n", - " 1144472, 1156334, 1153029, 1153030, 1153026, 1137746, 1137755, 1146307,\n", - " 1152622, 1140517, 1140524, 1152816, 1152826, 1154123, 1157839, 1152673,\n", - " 1152686, 1151617, 1150578, 1145278, 1136794, 1153387, 1138989, 1152341,\n", - " 1153311, 1138281, 1156004, 1156001, 1136028, 1158704, 1140674, 1140684,\n", - " 1155786, 1156387, 1156399, 1150099, 1137403, 1149269, 1149273, 1148040,\n", - " 1161207, 1149300, 1152601, 1174935, 1148628, 1158530, 1149947, 1135698,\n", - " 1155376, 1142047, 1150967, 1150972, 1158854, 1150877, 1152833, 1143491,\n", - " 1150465, 1135219, 1135730, 1152179, 1152191, 1152182, 1151788, 1139525,\n", - " 1158306, 1158308, 1158311, 1151340, 1155441, 1161738, 1150132, 1154529,\n", - " 1156919, 1138775, 1151379, 1158628, 1155122, 1152527, 1149504, 1155755,\n", - " 1145793, 1156463, 1158096, 1168230, 1155626, 1155628, 1156563, 1158824,\n", - " 1158829, 1158325, 1148837, 1148650, 1155646, 1154240, 1157430, 1155606,\n", - " 1155615, 1145713, 1150983, 1143517, 1157288, 1137152, 1153776, 1159116,\n", - " 1135601, 1135605, 1150671, 1155852, 1158665, 1138216, 1149145, 1140634,\n", - " 1140633, 1159213, 1155439, 1156692, 1156693, 1160749, 1157741, 1157735,\n", - " 1157028, 1144843, 1155971, 1155975, 1156948, 1153766, 1158846, 1156811,\n", - " 1149696, 1154592, 1166126, 1160164, 1180771, 1136896, 1158753, 1140221,\n", - " 1158803, 1158285, 1151602, 1136494, 1136491, 1156490, 1153808, 1136640,\n", - " 1136646, 1166424, 1158558, 1165778, 1155856, 1155521, 1161539, 1142487,\n", - " 1142493, 1159042, 1159052, 1142420, 1157945, 1153052, 1153045, 1163072,\n", - " 1155763, 1156226, 1156104, 1138393, 1142687, 1142685, 1150046, 1150041,\n", - " 1149063, 1149070, 1153514, 1153519, 1164859, 1147300, 1138161, 1164006,\n", - " 1139776, 1164901, 1163396, 1163381, 1154590, 1139284, 1139286, 1166073,\n", - " 1148771, 1146063, 1159931, 1170415, 1148603, 1143143, 1158653, 1156178,\n", - " 1159025, 1160893, 1168129, 1152247, 1178146, 1155588, 1165993, 1188677,\n", - " 1138674, 1138685, 1148571, 1158405, 1144977, 1146500, 1146510, 1146509,\n", - " 1161239, 1161240, 1144737, 1152776, 1155279, 1147426, 1160849, 1168748,\n", - " 1140112, 1164741, 1142722, 1142733, 1156300, 1148683, 1163935, 1145228,\n", - " 1146042, 1166462, 1138952, 1150533, 1144972, 1144973, 1147681, 1147689,\n", - " 1147691, 1147355, 1152630, 1139359, 1193481, 1145902, 1153520, 1181049,\n", - " 1175240, 1143404, 1169741, 1168755, 1147331, 1147334, 1147338, 1163640,\n", - " 1144690, 1151587, 1151598, 1167817, 1155183, 1150522, 1150518, 1167915,\n", - " 1156119, 1161781, 1144346, 1144336, 1157534, 1147750, 1154670, 1154893,\n", - " 1157331, 1157333, 1141043, 1169359, 1149452, 1138609, 1149688, 1158611,\n", - " 1158623, 1172574, 1149847, 1172295, 1178728, 1155502, 1152353, 1168462,\n", - " 1143859, 1166488, 1192139, 1149393, 1148335, 1169271, 1173307, 1145033,\n", - " 1154018, 1154027, 1152145, 1152150, 1153758, 1178102, 1151208, 1151697,\n", - " 1157153, 1157371, 1167243, 1147711, 1148131, 1169913, 1157593, 1166827,\n", - " 1169037, 1172961, 1168604, 1179699, 1146757, 1170335, 1140326, 1170018,\n", - " 1172601, 1174845, 1150234, 1150238, 1154148, 1167517, 1149173, 1170465,\n", - " 1167657, 1168481, 1179243, 1171297, 1153141, 1181489, 1180818, 1179807,\n", - " 1158030, 1180200, 1166554, 1155262, 1157792, 1157795, 1151488, 1172546,\n", - " 1171623, 1155804, 1180036, 1179540, 1182596, 1153889, 1153898, 1145626,\n", - " 1156446, 1177743, 1149755, 1153609, 1186957, 1155990, 1173137, 1158771,\n", - " 1181190, 1155892, 1157270, 1182785, 1183071, 1168273, 1168282, 1164798,\n", - " 1168889, 1184536, 1162253, 1163422, 1165082, 1161819, 1147181, 1172636,\n", - " 1170034, 1182158, 1181561, 1139828, 1139831, 1150265, 1154812, 1184377,\n", - " 1156055, 1151978, 1173019, 1194204, 1149536, 1188371, 1186736, 1188156,\n", - " 1187040, 1167435, 1171358, 1140992, 1141003, 1192614, 1193696, 1179410,\n", - " 1190455, 1171462, 1191604, 1162497, 1176041, 1169700, 1194292, 1171201,\n", - " 1172984, 1145395, 1155962, 1172187, 1185938, 1188350, 1189075, 1188749,\n", - " 1157022], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1198769, 1198248, 1198726, 1198730, 1199282, 1198449, 1202255, 1201577,\n", - " 1201462, 1194626, 1201016, 1197350, 1198633, 1194866, 1196685, 1196624,\n", - " 1194648, 1195511, 1195263, 1196534, 1196539, 1201992, 1196030, 1196031,\n", - " 1198543, 1197697, 1197701, 1195888, 1199172, 1195740, 1196977, 1196988,\n", - " 1194752, 1195989, 1197807, 1195571, 1198650, 1198167, 1196704, 1196711,\n", - " 1196708, 1199823, 1195148, 1195221, 1195265, 1195278, 1197141, 1196242,\n", - " 1197265, 1197273, 1196109, 1196747, 1195841, 1198915, 1197474, 1197256,\n", - " 1196283, 1196272, 1195353, 1199856, 1199060, 1199059, 1197291, 1199185,\n", - " 1199685, 1199621, 1199628, 1200076, 1200869, 1199152, 1199154, 1198406,\n", - " 1199231, 1197609, 1197962, 1196727, 1195773, 1202618, 1198428, 1199492,\n", - " 1200592, 1198811, 1199555, 1201827, 1200450, 1200507, 1198066, 1196474,\n", - " 1202630, 1201405, 1201042, 1202499, 1201737, 1200526, 1202035, 1200557,\n", - " 1197097, 1197040, 1199917, 1201442, 1201029, 1201291, 1195607, 1195610,\n", - " 1201871, 1202209, 1202210, 1199925, 1202304, 1200997, 1200785, 1199606,\n", - " 1195679, 1198055, 1196929, 1198929, 1195415, 1195181, 1195379, 1197816,\n", - " 1197822, 1197821, 1196602, 1199659, 1203102, 1198147, 1200003, 1197735,\n", - " 1199786, 1199787, 1198819, 1200974, 1195066, 1197652, 1195165, 1202515,\n", - " 1201767], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1198769, 1198248, 1198726, 1198730, 1199282, 1198449, 1202255, 1201577,\n", - " 1201462, 1194626, 1201016, 1197350, 1198633, 1194866, 1196685, 1196624,\n", - " 1194648, 1195511, 1195263, 1196534, 1196539, 1201992, 1196030, 1196031,\n", - " 1198543, 1197697, 1197701, 1195888, 1199172, 1195740, 1196977, 1196988,\n", - " 1194752, 1195989, 1197807, 1195571, 1198650, 1198167, 1196704, 1196711,\n", - " 1196708, 1199823, 1195148, 1195221, 1195265, 1195278, 1197141, 1196242,\n", - " 1197265, 1197273, 1196109, 1196747, 1195841, 1198915, 1197474, 1197256,\n", - " 1196283, 1196272, 1195353, 1199856, 1199060, 1199059, 1197291, 1199185,\n", - " 1199685, 1199621, 1199628, 1200076, 1200869, 1199152, 1199154, 1198406,\n", - " 1199231, 1197609, 1197962, 1196727, 1195773, 1202618, 1198428, 1199492,\n", - " 1200592, 1198811, 1199555, 1201827, 1200450, 1200507, 1198066, 1196474,\n", - " 1202630, 1201405, 1201042, 1202499, 1201737, 1200526, 1202035, 1200557,\n", - " 1197097, 1197040, 1199917, 1201442, 1201029, 1201291, 1195607, 1195610,\n", - " 1201871, 1202209, 1202210, 1199925, 1202304, 1200997, 1200785, 1199606,\n", - " 1195679, 1198055, 1196929, 1198929, 1195415, 1195181, 1195379, 1197816,\n", - " 1197822, 1197821, 1196602, 1199659, 1203102, 1198147, 1200003, 1197735,\n", - " 1199786, 1199787, 1198819, 1200974, 1195066, 1197652, 1195165, 1202515,\n", - " 1201767], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 2.6747e-01, -8.0558e-04, 8.1362e-01, ..., 4.1754e-02,\n", - " -1.5200e-03, -6.0046e-03],\n", - " [ 1.5725e-01, -4.5858e-04, 5.4450e-01, ..., 7.5717e-02,\n", - " -1.7001e-03, -4.0324e-03],\n", - " [ 1.3563e-01, -5.4117e-04, 5.5234e-01, ..., 8.7463e-02,\n", - " -1.6226e-03, -3.9101e-03],\n", - " ...,\n", - " [ 2.5388e-01, -5.7127e-04, 7.5783e-01, ..., 4.3298e-02,\n", - " -1.4866e-03, -5.5421e-03],\n", - " [ 1.2778e-01, -2.7616e-04, 4.8768e-01, ..., 7.6281e-02,\n", - " -1.8072e-03, -3.7341e-03],\n", - " [ 1.2269e-01, -3.0684e-04, 4.5864e-01, ..., 6.5743e-02,\n", - " -1.7750e-03, -3.4676e-03]], device='cuda:0'), 'paper': tensor([[-6.3423e-03, 3.5338e-01, 9.1331e-01, ..., -6.3811e-03,\n", - " -1.8274e-02, -7.7429e-03],\n", - " [-4.6153e-03, 2.9265e+00, 2.0027e+00, ..., 2.3947e+00,\n", - " -3.7655e-02, 1.3429e+00],\n", - " [-1.2416e-02, 1.1597e+00, 1.5391e+00, ..., -1.4654e-02,\n", - " -2.5999e-02, -2.0185e-02],\n", - " ...,\n", - " [-2.6107e-02, -6.1798e-03, 2.6576e+00, ..., -1.1013e-02,\n", - " -3.1943e-02, -3.7584e-02],\n", - " [ 2.2506e-02, 2.6271e+00, 2.8290e+00, ..., 2.7378e+00,\n", - " -4.3854e-02, 2.2001e+00],\n", - " [-6.2701e-03, 3.6798e+00, 2.4605e+00, ..., 5.0815e+00,\n", - " -5.3220e-02, 3.0448e+00]], device='cuda:0'), 'author': tensor([[-1.5582e-03, 2.4329e-01, 1.5596e-01, ..., 1.2515e+00,\n", - " 3.2803e-01, -9.1824e-04],\n", - " [-1.0873e-03, 2.2947e-01, 1.0241e-01, ..., 1.2715e+00,\n", - " 3.5710e-01, -5.6638e-04],\n", - " [-4.2047e-03, 3.2513e-01, 1.8955e-01, ..., 1.3474e+00,\n", - " -1.3911e-03, -4.8921e-03],\n", - " ...,\n", - " [-6.2887e-04, 2.1184e-01, 1.6656e-01, ..., 1.2986e+00,\n", - " 4.1464e-01, -1.2159e-04],\n", - " [-1.4809e-03, 1.3695e-01, 2.2225e-01, ..., 1.2052e+00,\n", - " 2.6991e-01, -1.1868e-03],\n", - " [-1.2912e-03, 1.9385e-01, 1.6704e-01, ..., 1.2619e+00,\n", - " 3.1830e-01, -9.1764e-04]], device='cuda:0'), 'field_of_study': tensor([[-0.0030, 0.7294, 0.1969, ..., -0.0078, 0.4855, 0.5329],\n", - " [-0.0027, 0.5650, 0.1075, ..., -0.0073, 0.3706, 0.5036],\n", - " [-0.0024, 0.5567, 0.1593, ..., -0.0077, 0.4473, 0.4418],\n", - " ...,\n", - " [-0.0032, 0.5551, 0.1574, ..., -0.0076, 0.3468, 0.4099],\n", - " [-0.0027, 0.6014, 0.1635, ..., -0.0081, 0.3621, 0.5308],\n", - " [ 0.1477, 0.7909, 0.4268, ..., -0.0130, 0.5362, 0.1401]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 10, 34, 129, 129, 214, 152, 75, 149, 30, 315, 411, 306,\n", - " 547, 608, 530, 530, 652, 891, 682, 755, 527, 527, 1039, 563,\n", - " 563, 898, 898, 755, 900, 710, 962, 803, 941, 1059, 1059, 1059,\n", - " 1257, 1318, 1073, 1073, 1167, 1167, 1250, 1407, 1407, 1407, 1395, 1390,\n", - " 1274, 1274, 1274, 1273, 1409, 1409, 1379, 1405, 1496, 1590, 1332, 1457,\n", - " 1564, 1332, 1332, 1570, 1533, 1533, 1748, 1918, 1918, 1918, 1610, 1812,\n", - " 1799, 1695, 1781, 1841, 1773, 1732, 1732, 1732, 1732, 1886, 1858, 1935,\n", - " 1967, 1943, 2159, 2159, 2159, 2345, 2098, 2098, 2166, 2109, 2309, 2306,\n", - " 2203, 2211, 2211, 2293, 2293, 2293, 2289, 2530, 2530, 2422, 2440, 2440,\n", - " 2884, 2668, 2645, 2523, 3078, 2948, 2944, 3054, 3054, 3182, 3233, 3175,\n", - " 3100, 3282, 3175, 3478, 3478, 3478, 3478, 3478, 3693, 3774, 3613, 4121,\n", - " 3700, 3829, 4022, 4022, 4230, 4270, 3925, 4003, 4062, 3868, 4319, 4319,\n", - " 4186, 4345, 4345, 4345, 4198, 4390, 4389, 4389, 4427, 4510, 4537, 4602,\n", - " 4598, 4705, 4607, 4607, 4607, 4721, 4810, 4933, 4905, 4825, 5218, 4997,\n", - " 5055, 5218, 5073, 5076, 4963, 5430, 5352, 5687, 5687, 5687, 6226, 5923,\n", - " 5759, 5879, 6128, 5949, 5949, 5871, 5951, 5934, 6124, 6386, 6126, 6126,\n", - " 6461, 6461, 6184, 6184, 6320, 6475, 6202, 6567],\n", - " [ 29, 122, 22, 80, 5, 94, 134, 30, 121, 59, 75, 23,\n", - " 123, 15, 72, 101, 109, 26, 16, 106, 29, 9, 129, 23,\n", - " 25, 44, 94, 62, 71, 50, 4, 17, 2, 13, 25, 42,\n", - " 38, 83, 34, 61, 8, 4, 90, 106, 74, 62, 97, 45,\n", - " 32, 135, 87, 53, 107, 125, 81, 119, 97, 33, 136, 49,\n", - " 120, 11, 113, 63, 43, 75, 29, 85, 97, 60, 120, 133,\n", - " 107, 117, 51, 48, 75, 62, 92, 106, 35, 12, 51, 128,\n", - " 105, 97, 76, 30, 93, 63, 58, 114, 14, 86, 1, 51,\n", - " 46, 55, 120, 117, 62, 106, 51, 34, 61, 37, 61, 34,\n", - " 31, 52, 36, 102, 31, 118, 108, 20, 104, 54, 40, 34,\n", - " 6, 52, 61, 103, 57, 63, 72, 98, 88, 47, 130, 118,\n", - " 56, 116, 19, 58, 41, 21, 130, 84, 73, 28, 89, 39,\n", - " 133, 23, 111, 7, 78, 131, 100, 36, 83, 18, 132, 127,\n", - " 82, 79, 66, 65, 126, 112, 75, 70, 26, 77, 108, 58,\n", - " 3, 95, 124, 107, 115, 68, 53, 27, 75, 119, 106, 42,\n", - " 54, 0, 55, 78, 91, 10, 42, 67, 119, 75, 96, 78,\n", - " 24, 69, 110, 64, 99, 75, 93, 75]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1830, 670, 168, ..., 5914, 4340, 467],\n", - " [ 100, 161, 121, ..., 6627, 6631, 6613]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 113, 62, 58, ..., 86, 35, 85],\n", - " [ 126, 23, 180, ..., 6538, 6594, 6634]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 197, 197, 197, ..., 6555, 6555, 6555],\n", - " [ 120, 13, 221, ..., 446, 673, 271]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 224, 221, 219, ..., 345, 75, 69],\n", - " [ 11, 134, 19, ..., 6660, 6604, 6683]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[ 461, 3660, 2784, ..., 6308, 5619, 6526],\n", - " [ 31, 11, 10, ..., 6622, 6588, 6615]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 168, 197, 197, ..., 6555, 6555, 6669],\n", - " [ 729, 2, 729, ..., 3137, 1616, 3913]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 10, 10, 10, ..., 6567, 6567, 6567],\n", - " [1878, 2784, 3876, ..., 3577, 3567, 3482]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006418\n", - "sampling 0.006262\n", - "noi time: 0.001147\n", - "get_vertex_data call: 0.037823\n", - "noi group time: 0.003585\n", - "eoi_group_time: 0.015417\n", - "second half: 0.213006\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 27905, 31145, ..., 1100728, 1110064, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 27905, 31145, ..., 1100728, 1110064, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227420, 1231353, 1214597, ..., 1927253, 1937007, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227420, 1231353, 1214597, ..., 1927253, 1937007, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1136230, 1140282, 1140285, 1136349, 1135926, 1138544, 1135726,\n", - " 1137784, 1140785, 1141758, 1138335, 1136223, 1141260, 1136965, 1138897,\n", - " 1151164, 1143600, 1139817, 1139811, 1146983, 1137947, 1143372, 1143363,\n", - " 1139241, 1150395, 1146644, 1139605, 1139615, 1139957, 1150497, 1139865,\n", - " 1148576, 1155683, 1155686, 1155689, 1143820, 1147218, 1135991, 1146992,\n", - " 1134701, 1148350, 1148346, 1146656, 1146661, 1146472, 1153231, 1136742,\n", - " 1147095, 1155014, 1155018, 1139364, 1147211, 1136685, 1150329, 1134710,\n", - " 1134807, 1138745, 1140540, 1138119, 1137252, 1137177, 1134735, 1140020,\n", - " 1140953, 1135367, 1135202, 1135213, 1135903, 1141036, 1134794, 1138504,\n", - " 1157103, 1137693, 1136614, 1139215, 1144395, 1136710, 1157395, 1135265,\n", - " 1148484, 1139161, 1134841, 1141702, 1135828, 1138514, 1153094, 1137953,\n", - " 1135498, 1154128, 1156909, 1139684, 1138319, 1137287, 1138436, 1138440,\n", - " 1138445, 1138461, 1137920, 1137924, 1136594, 1158390, 1138846, 1156606,\n", - " 1147112, 1147116, 1142611, 1135618, 1138177, 1158985, 1145842, 1137108,\n", - " 1159868, 1139667, 1134992, 1152646, 1158971, 1158974, 1139318, 1142905,\n", - " 1153543, 1143621, 1139933, 1137597, 1138151, 1142226, 1134891, 1146070,\n", - " 1146075, 1152044, 1142302, 1140660, 1137734, 1137728, 1134922, 1137001,\n", - " 1135549, 1141098, 1144138, 1149001, 1139889, 1145357, 1141971, 1142021,\n", - " 1136392, 1143767, 1137297, 1143221, 1139025, 1140003, 1149969, 1149979,\n", - " 1149982, 1146832, 1141695, 1161173, 1140469, 1141223, 1139386, 1141648,\n", - " 1136912, 1136917, 1139730, 1143673, 1143676, 1144237, 1141785, 1141786,\n", - " 1136760, 1134979, 1136853, 1147850, 1138490, 1142056, 1142053, 1143158,\n", - " 1140160, 1140169, 1158749, 1149111, 1148872, 1143574, 1139190, 1141479,\n", - " 1137062, 1140110, 1142575, 1143107, 1144596, 1157411, 1136867, 1136864,\n", - " 1141579, 1141392, 1140432, 1144182, 1150906, 1139559, 1140501, 1137846,\n", - " 1147153, 1136378, 1142640, 1141375, 1151114, 1140801, 1140806, 1149090,\n", - " 1149097, 1149101, 1139013, 1144279, 1139510, 1139127, 1145000, 1146693,\n", - " 1146702, 1135047, 1141562, 1147050, 1147047, 1149876, 1143543, 1143551,\n", - " 1143538, 1152976, 1152980, 1152982, 1152988, 1139453, 1139455, 1141925,\n", - " 1146901, 1144242, 1140580, 1141853, 1150243, 1150253, 1148313, 1136891,\n", - " 1143637, 1134861, 1141382, 1143851, 1146005, 1136275, 1146016, 1146024,\n", - " 1146129, 1149928, 1141235, 1139984, 1139990, 1143283, 1151124, 1150418,\n", - " 1143883, 1147543, 1147540, 1148763, 1147282, 1149372, 1148003, 1149608,\n", - " 1143051, 1143053, 1143040, 1136160, 1157717, 1157720, 1136836, 1139329,\n", - " 1139341, 1144778, 1139053, 1142159, 1143345, 1143355, 1144611, 1138600,\n", - " 1135876, 1135818, 1135813, 1150294, 1146514, 1146523, 1143457, 1143937,\n", - " 1143947, 1140816, 1149073, 1143798, 1143803, 1147521, 1140364, 1149581,\n", - " 1137990, 1143082, 1149489, 1144213, 1144222, 1147984, 1147999, 1134899,\n", - " 1134902, 1139252, 1147244, 1148704, 1148715, 1141825, 1146751, 1148473,\n", - " 1153701, 1152323, 1149718, 1147038, 1141124, 1141127, 1139549, 1158226,\n", - " 1149871, 1141137, 1154526, 1151646, 1145237, 1145750, 1146153, 1138632,\n", - " 1148389, 1148397, 1146178, 1148217, 1152537, 1151182, 1150445, 1149250,\n", - " 1147966, 1151856, 1144526, 1141349, 1146887, 1152013, 1147794, 1147807,\n", - " 1151482, 1151473, 1152023, 1152028, 1145256, 1145262, 1135504, 1146723,\n", - " 1140573, 1147021, 1158949, 1141949, 1141193, 1141269, 1150728, 1148744,\n", - " 1137640, 1147649, 1143560, 1168497, 1148288, 1148300, 1135083, 1148623,\n", - " 1147866, 1139096, 1154420, 1148180, 1139718, 1146674, 1146686, 1138864,\n", - " 1157968, 1151566, 1148720, 1148724, 1148725, 1148731, 1146559, 1150052,\n", - " 1143895, 1154206, 1153192, 1153188, 1153197, 1145104, 1145107, 1159828,\n", - " 1152921, 1150935, 1143092, 1150352, 1150356, 1155095, 1148095, 1152584,\n", - " 1151906, 1154183, 1154190, 1150708, 1146565, 1151344, 1151356, 1155161,\n", - " 1153441, 1145079, 1145080, 1146975, 1156402, 1149359, 1150213, 1146623,\n", - " 1144476, 1152849, 1154052, 1154063, 1152100, 1152103, 1146280, 1146287,\n", - " 1156325, 1153028, 1153037, 1153038, 1145539, 1137746, 1146307, 1159974,\n", - " 1152622, 1140521, 1155337, 1154119, 1154124, 1157826, 1151573, 1164761,\n", - " 1151617, 1145278, 1136134, 1148916, 1152958, 1140460, 1140457, 1140459,\n", - " 1150617, 1167153, 1145952, 1152225, 1138982, 1152341, 1146816, 1138272,\n", - " 1138281, 1152294, 1156002, 1158704, 1156608, 1152928, 1151064, 1156396,\n", - " 1156422, 1150097, 1150100, 1150159, 1150164, 1148040, 1152601, 1152602,\n", - " 1155222, 1144669, 1137047, 1137048, 1148628, 1158530, 1148379, 1137469,\n", - " 1137458, 1154572, 1135698, 1155385, 1155376, 1139225, 1157218, 1157229,\n", - " 1157547, 1142385, 1158854, 1156501, 1157064, 1157069, 1155422, 1152833,\n", - " 1137809, 1137819, 1150465, 1146854, 1135729, 1135730, 1138830, 1156629,\n", - " 1157912, 1156940, 1153410, 1153413, 1135645, 1135647, 1135634, 1147810,\n", - " 1151466, 1139525, 1158304, 1158308, 1158311, 1155441, 1161732, 1153359,\n", - " 1150136, 1162112, 1153990, 1142755, 1156207, 1151379, 1155374, 1155375,\n", - " 1155122, 1152527, 1149321, 1155755, 1155756, 1151425, 1135406, 1146920,\n", - " 1145794, 1145793, 1156460, 1154763, 1155628, 1155629, 1155631, 1154550,\n", - " 1158819, 1158824, 1158321, 1157001, 1148836, 1148835, 1148646, 1160950,\n", - " 1161231, 1161287, 1157499, 1154250, 1154240, 1162190, 1139620, 1151312,\n", - " 1154902, 1154909, 1154903, 1179437, 1143189, 1150371, 1153326, 1157439,\n", - " 1157430, 1155606, 1141627, 1150981, 1157928, 1158578, 1153786, 1137385,\n", - " 1159116, 1145690, 1135601, 1148159, 1150671, 1155855, 1155848, 1157684,\n", - " 1149145, 1140633, 1152209, 1159213, 1167618, 1140377, 1140381, 1140375,\n", - " 1155884, 1157733, 1144836, 1142466, 1155970, 1155975, 1155978, 1153766,\n", - " 1156811, 1161897, 1175275, 1149709, 1154600, 1136896, 1158886, 1140213,\n", - " 1140215, 1140221, 1158815, 1155233, 1151615, 1136494, 1147599, 1152143,\n", - " 1153808, 1136640, 1162898, 1163119, 1134757, 1145484, 1157858, 1157864,\n", - " 1146123, 1146126, 1155521, 1155529, 1155535, 1161539, 1137552, 1164273,\n", - " 1142666, 1157747, 1157751, 1159042, 1159052, 1159054, 1159057, 1159144,\n", - " 1157945, 1153052, 1159738, 1162835, 1166256, 1159361, 1153841, 1156107,\n", - " 1138393, 1160651, 1150046, 1149063, 1145948, 1155479, 1151019, 1153504,\n", - " 1147298, 1146876, 1164997, 1138161, 1164006, 1156795, 1149963, 1154590,\n", - " 1154578, 1165760, 1136806, 1146063, 1165309, 1140650, 1140643, 1148607,\n", - " 1143139, 1143143, 1159646, 1163201, 1141792, 1141800, 1158653, 1156181,\n", - " 1159025, 1159032, 1165875, 1169112, 1152247, 1166735, 1155588, 1144977,\n", - " 1146500, 1146509, 1170996, 1164580, 1169252, 1161243, 1144737, 1144739,\n", - " 1152776, 1155272, 1141471, 1141459, 1151650, 1147433, 1157052, 1156737,\n", - " 1156739, 1156742, 1156744, 1160849, 1160856, 1160717, 1150642, 1163260,\n", - " 1171040, 1144812, 1168850, 1164741, 1180506, 1180496, 1142722, 1142733,\n", - " 1156303, 1166134, 1145183, 1145228, 1160232, 1154700, 1166462, 1144972,\n", - " 1142140, 1148175, 1191932, 1147356, 1152624, 1152626, 1148124, 1139351,\n", - " 1145902, 1153520, 1151752, 1152200, 1143395, 1171867, 1158723, 1158724,\n", - " 1158722, 1167503, 1168764, 1167315, 1147338, 1144702, 1150773, 1145502,\n", - " 1151598, 1162893, 1166653, 1155172, 1180418, 1150515, 1150518, 1156117,\n", - " 1156118, 1144336, 1157534, 1154670, 1152998, 1157331, 1138130, 1138142,\n", - " 1141048, 1151674, 1169359, 1149452, 1138609, 1149688, 1158623, 1158618,\n", - " 1157380, 1157384, 1157385, 1157388, 1170532, 1171479, 1170463, 1152353,\n", - " 1152360, 1152546, 1166486, 1148667, 1193759, 1165911, 1172668, 1173307,\n", - " 1145033, 1154019, 1154027, 1154028, 1177795, 1159651, 1167859, 1167867,\n", - " 1157153, 1172111, 1155468, 1157375, 1147711, 1148131, 1148140, 1147925,\n", - " 1177415, 1135018, 1154311, 1172961, 1163027, 1155738, 1155739, 1168817,\n", - " 1168593, 1160990, 1140326, 1166351, 1172932, 1166682, 1175906, 1154148,\n", - " 1169409, 1179965, 1158176, 1149169, 1179245, 1180545, 1153803, 1179918,\n", - " 1187244, 1175540, 1182651, 1179807, 1161255, 1161262, 1162129, 1155262,\n", - " 1154718, 1157792, 1157803, 1179166, 1151488, 1171629, 1171623, 1155796,\n", - " 1185047, 1157999, 1157991, 1176754, 1180089, 1192692, 1153889, 1153898,\n", - " 1145626, 1156436, 1156443, 1180383, 1182632, 1161906, 1161911, 1149744,\n", - " 1149755, 1153601, 1153609, 1179947, 1181141, 1158513, 1158940, 1179058,\n", - " 1158380, 1187927, 1155892, 1155899, 1162690, 1140399, 1168280, 1171587,\n", - " 1188240, 1168533, 1159331, 1164228, 1164231, 1161819, 1167977, 1141516,\n", - " 1164133, 1181486, 1170822, 1139831, 1150265, 1149668, 1181876, 1156049,\n", - " 1156055, 1146394, 1191738, 1190838, 1189443, 1172478, 1182750, 1148792,\n", - " 1191825, 1189902, 1189256, 1178072, 1187692, 1151774, 1153733, 1193876,\n", - " 1192487, 1169786, 1179006, 1171201, 1150406, 1158064, 1181621, 1172718,\n", - " 1155959, 1186071, 1157008], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1136230, 1140282, 1140285, 1136349, 1135926, 1138544, 1135726,\n", - " 1137784, 1140785, 1141758, 1138335, 1136223, 1141260, 1136965, 1138897,\n", - " 1151164, 1143600, 1139817, 1139811, 1146983, 1137947, 1143372, 1143363,\n", - " 1139241, 1150395, 1146644, 1139605, 1139615, 1139957, 1150497, 1139865,\n", - " 1148576, 1155683, 1155686, 1155689, 1143820, 1147218, 1135991, 1146992,\n", - " 1134701, 1148350, 1148346, 1146656, 1146661, 1146472, 1153231, 1136742,\n", - " 1147095, 1155014, 1155018, 1139364, 1147211, 1136685, 1150329, 1134710,\n", - " 1134807, 1138745, 1140540, 1138119, 1137252, 1137177, 1134735, 1140020,\n", - " 1140953, 1135367, 1135202, 1135213, 1135903, 1141036, 1134794, 1138504,\n", - " 1157103, 1137693, 1136614, 1139215, 1144395, 1136710, 1157395, 1135265,\n", - " 1148484, 1139161, 1134841, 1141702, 1135828, 1138514, 1153094, 1137953,\n", - " 1135498, 1154128, 1156909, 1139684, 1138319, 1137287, 1138436, 1138440,\n", - " 1138445, 1138461, 1137920, 1137924, 1136594, 1158390, 1138846, 1156606,\n", - " 1147112, 1147116, 1142611, 1135618, 1138177, 1158985, 1145842, 1137108,\n", - " 1159868, 1139667, 1134992, 1152646, 1158971, 1158974, 1139318, 1142905,\n", - " 1153543, 1143621, 1139933, 1137597, 1138151, 1142226, 1134891, 1146070,\n", - " 1146075, 1152044, 1142302, 1140660, 1137734, 1137728, 1134922, 1137001,\n", - " 1135549, 1141098, 1144138, 1149001, 1139889, 1145357, 1141971, 1142021,\n", - " 1136392, 1143767, 1137297, 1143221, 1139025, 1140003, 1149969, 1149979,\n", - " 1149982, 1146832, 1141695, 1161173, 1140469, 1141223, 1139386, 1141648,\n", - " 1136912, 1136917, 1139730, 1143673, 1143676, 1144237, 1141785, 1141786,\n", - " 1136760, 1134979, 1136853, 1147850, 1138490, 1142056, 1142053, 1143158,\n", - " 1140160, 1140169, 1158749, 1149111, 1148872, 1143574, 1139190, 1141479,\n", - " 1137062, 1140110, 1142575, 1143107, 1144596, 1157411, 1136867, 1136864,\n", - " 1141579, 1141392, 1140432, 1144182, 1150906, 1139559, 1140501, 1137846,\n", - " 1147153, 1136378, 1142640, 1141375, 1151114, 1140801, 1140806, 1149090,\n", - " 1149097, 1149101, 1139013, 1144279, 1139510, 1139127, 1145000, 1146693,\n", - " 1146702, 1135047, 1141562, 1147050, 1147047, 1149876, 1143543, 1143551,\n", - " 1143538, 1152976, 1152980, 1152982, 1152988, 1139453, 1139455, 1141925,\n", - " 1146901, 1144242, 1140580, 1141853, 1150243, 1150253, 1148313, 1136891,\n", - " 1143637, 1134861, 1141382, 1143851, 1146005, 1136275, 1146016, 1146024,\n", - " 1146129, 1149928, 1141235, 1139984, 1139990, 1143283, 1151124, 1150418,\n", - " 1143883, 1147543, 1147540, 1148763, 1147282, 1149372, 1148003, 1149608,\n", - " 1143051, 1143053, 1143040, 1136160, 1157717, 1157720, 1136836, 1139329,\n", - " 1139341, 1144778, 1139053, 1142159, 1143345, 1143355, 1144611, 1138600,\n", - " 1135876, 1135818, 1135813, 1150294, 1146514, 1146523, 1143457, 1143937,\n", - " 1143947, 1140816, 1149073, 1143798, 1143803, 1147521, 1140364, 1149581,\n", - " 1137990, 1143082, 1149489, 1144213, 1144222, 1147984, 1147999, 1134899,\n", - " 1134902, 1139252, 1147244, 1148704, 1148715, 1141825, 1146751, 1148473,\n", - " 1153701, 1152323, 1149718, 1147038, 1141124, 1141127, 1139549, 1158226,\n", - " 1149871, 1141137, 1154526, 1151646, 1145237, 1145750, 1146153, 1138632,\n", - " 1148389, 1148397, 1146178, 1148217, 1152537, 1151182, 1150445, 1149250,\n", - " 1147966, 1151856, 1144526, 1141349, 1146887, 1152013, 1147794, 1147807,\n", - " 1151482, 1151473, 1152023, 1152028, 1145256, 1145262, 1135504, 1146723,\n", - " 1140573, 1147021, 1158949, 1141949, 1141193, 1141269, 1150728, 1148744,\n", - " 1137640, 1147649, 1143560, 1168497, 1148288, 1148300, 1135083, 1148623,\n", - " 1147866, 1139096, 1154420, 1148180, 1139718, 1146674, 1146686, 1138864,\n", - " 1157968, 1151566, 1148720, 1148724, 1148725, 1148731, 1146559, 1150052,\n", - " 1143895, 1154206, 1153192, 1153188, 1153197, 1145104, 1145107, 1159828,\n", - " 1152921, 1150935, 1143092, 1150352, 1150356, 1155095, 1148095, 1152584,\n", - " 1151906, 1154183, 1154190, 1150708, 1146565, 1151344, 1151356, 1155161,\n", - " 1153441, 1145079, 1145080, 1146975, 1156402, 1149359, 1150213, 1146623,\n", - " 1144476, 1152849, 1154052, 1154063, 1152100, 1152103, 1146280, 1146287,\n", - " 1156325, 1153028, 1153037, 1153038, 1145539, 1137746, 1146307, 1159974,\n", - " 1152622, 1140521, 1155337, 1154119, 1154124, 1157826, 1151573, 1164761,\n", - " 1151617, 1145278, 1136134, 1148916, 1152958, 1140460, 1140457, 1140459,\n", - " 1150617, 1167153, 1145952, 1152225, 1138982, 1152341, 1146816, 1138272,\n", - " 1138281, 1152294, 1156002, 1158704, 1156608, 1152928, 1151064, 1156396,\n", - " 1156422, 1150097, 1150100, 1150159, 1150164, 1148040, 1152601, 1152602,\n", - " 1155222, 1144669, 1137047, 1137048, 1148628, 1158530, 1148379, 1137469,\n", - " 1137458, 1154572, 1135698, 1155385, 1155376, 1139225, 1157218, 1157229,\n", - " 1157547, 1142385, 1158854, 1156501, 1157064, 1157069, 1155422, 1152833,\n", - " 1137809, 1137819, 1150465, 1146854, 1135729, 1135730, 1138830, 1156629,\n", - " 1157912, 1156940, 1153410, 1153413, 1135645, 1135647, 1135634, 1147810,\n", - " 1151466, 1139525, 1158304, 1158308, 1158311, 1155441, 1161732, 1153359,\n", - " 1150136, 1162112, 1153990, 1142755, 1156207, 1151379, 1155374, 1155375,\n", - " 1155122, 1152527, 1149321, 1155755, 1155756, 1151425, 1135406, 1146920,\n", - " 1145794, 1145793, 1156460, 1154763, 1155628, 1155629, 1155631, 1154550,\n", - " 1158819, 1158824, 1158321, 1157001, 1148836, 1148835, 1148646, 1160950,\n", - " 1161231, 1161287, 1157499, 1154250, 1154240, 1162190, 1139620, 1151312,\n", - " 1154902, 1154909, 1154903, 1179437, 1143189, 1150371, 1153326, 1157439,\n", - " 1157430, 1155606, 1141627, 1150981, 1157928, 1158578, 1153786, 1137385,\n", - " 1159116, 1145690, 1135601, 1148159, 1150671, 1155855, 1155848, 1157684,\n", - " 1149145, 1140633, 1152209, 1159213, 1167618, 1140377, 1140381, 1140375,\n", - " 1155884, 1157733, 1144836, 1142466, 1155970, 1155975, 1155978, 1153766,\n", - " 1156811, 1161897, 1175275, 1149709, 1154600, 1136896, 1158886, 1140213,\n", - " 1140215, 1140221, 1158815, 1155233, 1151615, 1136494, 1147599, 1152143,\n", - " 1153808, 1136640, 1162898, 1163119, 1134757, 1145484, 1157858, 1157864,\n", - " 1146123, 1146126, 1155521, 1155529, 1155535, 1161539, 1137552, 1164273,\n", - " 1142666, 1157747, 1157751, 1159042, 1159052, 1159054, 1159057, 1159144,\n", - " 1157945, 1153052, 1159738, 1162835, 1166256, 1159361, 1153841, 1156107,\n", - " 1138393, 1160651, 1150046, 1149063, 1145948, 1155479, 1151019, 1153504,\n", - " 1147298, 1146876, 1164997, 1138161, 1164006, 1156795, 1149963, 1154590,\n", - " 1154578, 1165760, 1136806, 1146063, 1165309, 1140650, 1140643, 1148607,\n", - " 1143139, 1143143, 1159646, 1163201, 1141792, 1141800, 1158653, 1156181,\n", - " 1159025, 1159032, 1165875, 1169112, 1152247, 1166735, 1155588, 1144977,\n", - " 1146500, 1146509, 1170996, 1164580, 1169252, 1161243, 1144737, 1144739,\n", - " 1152776, 1155272, 1141471, 1141459, 1151650, 1147433, 1157052, 1156737,\n", - " 1156739, 1156742, 1156744, 1160849, 1160856, 1160717, 1150642, 1163260,\n", - " 1171040, 1144812, 1168850, 1164741, 1180506, 1180496, 1142722, 1142733,\n", - " 1156303, 1166134, 1145183, 1145228, 1160232, 1154700, 1166462, 1144972,\n", - " 1142140, 1148175, 1191932, 1147356, 1152624, 1152626, 1148124, 1139351,\n", - " 1145902, 1153520, 1151752, 1152200, 1143395, 1171867, 1158723, 1158724,\n", - " 1158722, 1167503, 1168764, 1167315, 1147338, 1144702, 1150773, 1145502,\n", - " 1151598, 1162893, 1166653, 1155172, 1180418, 1150515, 1150518, 1156117,\n", - " 1156118, 1144336, 1157534, 1154670, 1152998, 1157331, 1138130, 1138142,\n", - " 1141048, 1151674, 1169359, 1149452, 1138609, 1149688, 1158623, 1158618,\n", - " 1157380, 1157384, 1157385, 1157388, 1170532, 1171479, 1170463, 1152353,\n", - " 1152360, 1152546, 1166486, 1148667, 1193759, 1165911, 1172668, 1173307,\n", - " 1145033, 1154019, 1154027, 1154028, 1177795, 1159651, 1167859, 1167867,\n", - " 1157153, 1172111, 1155468, 1157375, 1147711, 1148131, 1148140, 1147925,\n", - " 1177415, 1135018, 1154311, 1172961, 1163027, 1155738, 1155739, 1168817,\n", - " 1168593, 1160990, 1140326, 1166351, 1172932, 1166682, 1175906, 1154148,\n", - " 1169409, 1179965, 1158176, 1149169, 1179245, 1180545, 1153803, 1179918,\n", - " 1187244, 1175540, 1182651, 1179807, 1161255, 1161262, 1162129, 1155262,\n", - " 1154718, 1157792, 1157803, 1179166, 1151488, 1171629, 1171623, 1155796,\n", - " 1185047, 1157999, 1157991, 1176754, 1180089, 1192692, 1153889, 1153898,\n", - " 1145626, 1156436, 1156443, 1180383, 1182632, 1161906, 1161911, 1149744,\n", - " 1149755, 1153601, 1153609, 1179947, 1181141, 1158513, 1158940, 1179058,\n", - " 1158380, 1187927, 1155892, 1155899, 1162690, 1140399, 1168280, 1171587,\n", - " 1188240, 1168533, 1159331, 1164228, 1164231, 1161819, 1167977, 1141516,\n", - " 1164133, 1181486, 1170822, 1139831, 1150265, 1149668, 1181876, 1156049,\n", - " 1156055, 1146394, 1191738, 1190838, 1189443, 1172478, 1182750, 1148792,\n", - " 1191825, 1189902, 1189256, 1178072, 1187692, 1151774, 1153733, 1193876,\n", - " 1192487, 1169786, 1179006, 1171201, 1150406, 1158064, 1181621, 1172718,\n", - " 1155959, 1186071, 1157008], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1198769, 1197226, 1197719, 1201094, 1195860, 1199282, 1202255,\n", - " 1198844, 1201577, 1201581, 1201582, 1202119, 1194626, 1197791, 1201021,\n", - " 1197351, 1198690, 1196871, 1198557, 1194745, 1194770, 1194783, 1194642,\n", - " 1195263, 1195187, 1196031, 1198543, 1195457, 1194882, 1195888, 1195895,\n", - " 1199172, 1199171, 1195740, 1194759, 1194663, 1195313, 1195325, 1196840,\n", - " 1198036, 1198958, 1198167, 1198161, 1195221, 1197140, 1197273, 1194859,\n", - " 1198216, 1196737, 1195039, 1202915, 1198193, 1198203, 1199344, 1196393,\n", - " 1198273, 1198282, 1199339, 1200949, 1199856, 1194928, 1199628, 1197676,\n", - " 1197994, 1199038, 1201908, 1195018, 1199676, 1194786, 1200060, 1196498,\n", - " 1196501, 1202585, 1197977, 1201116, 1196727, 1202618, 1202612, 1198428,\n", - " 1199555, 1201547, 1201824, 1201827, 1200503, 1197023, 1198593, 1201421,\n", - " 1201155, 1201156, 1202630, 1201056, 1200913, 1194803, 1195637, 1200553,\n", - " 1196890, 1200692, 1200693, 1196768, 1196779, 1201033, 1202239, 1200831,\n", - " 1202337, 1201291, 1200249, 1198562, 1200793, 1195048, 1200627, 1195679,\n", - " 1195664, 1198929, 1198932, 1200684, 1197816, 1197820, 1197821, 1198587,\n", - " 1203102, 1198819, 1201886, 1195165, 1194908, 1203162], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1198769, 1197226, 1197719, 1201094, 1195860, 1199282, 1202255,\n", - " 1198844, 1201577, 1201581, 1201582, 1202119, 1194626, 1197791, 1201021,\n", - " 1197351, 1198690, 1196871, 1198557, 1194745, 1194770, 1194783, 1194642,\n", - " 1195263, 1195187, 1196031, 1198543, 1195457, 1194882, 1195888, 1195895,\n", - " 1199172, 1199171, 1195740, 1194759, 1194663, 1195313, 1195325, 1196840,\n", - " 1198036, 1198958, 1198167, 1198161, 1195221, 1197140, 1197273, 1194859,\n", - " 1198216, 1196737, 1195039, 1202915, 1198193, 1198203, 1199344, 1196393,\n", - " 1198273, 1198282, 1199339, 1200949, 1199856, 1194928, 1199628, 1197676,\n", - " 1197994, 1199038, 1201908, 1195018, 1199676, 1194786, 1200060, 1196498,\n", - " 1196501, 1202585, 1197977, 1201116, 1196727, 1202618, 1202612, 1198428,\n", - " 1199555, 1201547, 1201824, 1201827, 1200503, 1197023, 1198593, 1201421,\n", - " 1201155, 1201156, 1202630, 1201056, 1200913, 1194803, 1195637, 1200553,\n", - " 1196890, 1200692, 1200693, 1196768, 1196779, 1201033, 1202239, 1200831,\n", - " 1202337, 1201291, 1200249, 1198562, 1200793, 1195048, 1200627, 1195679,\n", - " 1195664, 1198929, 1198932, 1200684, 1197816, 1197820, 1197821, 1198587,\n", - " 1203102, 1198819, 1201886, 1195165, 1194908, 1203162], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 3.0919e-01, -9.7165e-04, 9.1761e-01, ..., 4.0855e-02,\n", - " -1.4694e-03, -6.8499e-03],\n", - " [ 2.4525e-01, -8.7218e-04, 7.7295e-01, ..., 4.8926e-02,\n", - " -1.4529e-03, -5.6671e-03],\n", - " [ 1.4389e-01, -1.8320e-04, 5.7445e-01, ..., 7.5193e-02,\n", - " -1.8615e-03, -4.3013e-03],\n", - " ...,\n", - " [ 2.0007e-01, -4.3810e-04, 6.1885e-01, ..., 8.9256e-02,\n", - " -2.0281e-03, -5.0304e-03],\n", - " [ 1.8324e-01, -7.9609e-05, 7.0633e-01, ..., 6.3025e-02,\n", - " -1.6063e-03, -4.9142e-03],\n", - " [ 2.9363e-01, -1.0688e-03, 9.0640e-01, ..., 4.1327e-02,\n", - " -1.4924e-03, -6.6170e-03]], device='cuda:0'), 'paper': tensor([[ 2.0888e-01, 8.1838e-01, 2.7729e-01, ..., -1.2978e-02,\n", - " -2.1333e-02, 9.4050e-02],\n", - " [-1.4762e-02, 1.6625e-01, 1.8289e+00, ..., -1.2528e-02,\n", - " -3.1941e-02, -1.9874e-02],\n", - " [-1.9138e-02, -6.8854e-03, 2.2166e+00, ..., -1.4356e-02,\n", - " -3.1959e-02, -2.6074e-02],\n", - " ...,\n", - " [-2.7420e-02, -2.2428e-02, 3.4489e+00, ..., -1.8835e-02,\n", - " -4.5723e-02, -3.5568e-02],\n", - " [-1.9888e-02, -2.9086e-03, 1.7670e+00, ..., -1.2221e-02,\n", - " -2.4005e-02, -3.1530e-02],\n", - " [-6.4125e-03, 3.6550e+00, 2.4229e+00, ..., 5.0494e+00,\n", - " -5.2858e-02, 2.9959e+00]], device='cuda:0'), 'author': tensor([[-8.4677e-04, 1.6694e-01, 2.1464e-01, ..., 1.2997e+00,\n", - " 3.8120e-01, -3.5684e-04],\n", - " [-3.9701e-03, 4.4849e-01, 1.1575e-02, ..., 1.1579e+00,\n", - " -5.3340e-05, -3.4098e-03],\n", - " [-9.2135e-04, 1.8105e-01, 1.7758e-01, ..., 1.2313e+00,\n", - " 3.8589e-01, -5.3409e-04],\n", - " ...,\n", - " [-1.3067e-03, 1.9869e-01, 1.5402e-01, ..., 1.2401e+00,\n", - " 3.5232e-01, -5.0612e-04],\n", - " [-1.5761e-03, 1.9645e-01, 1.8100e-01, ..., 1.2538e+00,\n", - " 2.4471e-01, -1.8762e-03],\n", - " [-1.3067e-03, 1.9869e-01, 1.5402e-01, ..., 1.2401e+00,\n", - " 3.5232e-01, -5.0612e-04]], device='cuda:0'), 'field_of_study': tensor([[-0.0024, 0.4827, 0.1025, ..., -0.0079, 0.3633, 0.4353],\n", - " [-0.0019, 0.7552, 0.3058, ..., -0.0097, 0.5281, 0.5726],\n", - " [-0.0016, 0.4938, 0.0838, ..., -0.0075, 0.3584, 0.3748],\n", - " ...,\n", - " [-0.0023, 0.4918, 0.1037, ..., -0.0082, 0.4027, 0.4283],\n", - " [-0.0030, 0.6132, 0.1412, ..., -0.0077, 0.4790, 0.5023],\n", - " [-0.0017, 0.5601, 0.2218, ..., -0.0069, 0.1535, 0.4697]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 95, 88, 135, 135, 135, 135, 135, 462, 495, 229, 462, 355,\n", - " 220, 280, 568, 504, 752, 712, 667, 546, 752, 433, 433, 433,\n", - " 780, 529, 562, 841, 660, 865, 774, 1018, 1018, 685, 906, 918,\n", - " 995, 877, 776, 775, 1274, 1077, 929, 1142, 1152, 1152, 1152, 1394,\n", - " 1142, 1353, 1294, 1436, 1436, 1436, 1435, 1270, 1409, 1409, 1539, 1549,\n", - " 1538, 1634, 1634, 1529, 1529, 1653, 1787, 1730, 1858, 1950, 1958, 1971,\n", - " 1971, 1922, 2068, 2071, 2071, 1981, 2071, 2082, 2082, 2294, 2294, 2294,\n", - " 2237, 2435, 2504, 2407, 2639, 2639, 2639, 2624, 2657, 2657, 2657, 2657,\n", - " 2629, 2783, 3095, 2657, 2657, 2913, 2935, 2953, 3050, 3019, 3019, 3019,\n", - " 3019, 3272, 3487, 3195, 3236, 3236, 3561, 3155, 3387, 3360, 3726, 3318,\n", - " 3706, 3706, 3881, 3781, 3781, 3608, 3907, 3822, 3839, 3562, 4006, 4006,\n", - " 4055, 4186, 3996, 4136, 4160, 4312, 4298, 4283, 4397, 4545, 4609, 4769,\n", - " 4769, 4606, 4472, 4682, 4691, 4651, 4651, 4698, 4602, 4711, 4755, 4799,\n", - " 4693, 4693, 4693, 5083, 5126, 5126, 5110, 5252, 5313, 5241, 5224, 5320,\n", - " 5320, 5389, 5559, 5795, 5352, 5316, 5484, 5626, 5289, 5289, 5289, 5289,\n", - " 5539, 5479, 5479, 5479, 5597, 5603, 5603, 5768, 5830, 5868, 5865, 5873,\n", - " 5922, 5856, 5856, 6037, 5878, 5895, 5891, 5891, 5895, 5895, 5895, 5895,\n", - " 5803, 5961, 5961, 6101, 6101, 5987],\n", - " [ 49, 89, 109, 90, 35, 112, 64, 52, 105, 48, 74, 121,\n", - " 48, 97, 108, 58, 76, 1, 102, 85, 9, 53, 56, 24,\n", - " 9, 85, 7, 86, 123, 16, 80, 41, 68, 125, 57, 29,\n", - " 51, 40, 85, 86, 50, 61, 101, 106, 53, 24, 56, 62,\n", - " 104, 28, 94, 125, 43, 76, 67, 85, 5, 101, 28, 88,\n", - " 28, 6, 41, 58, 73, 104, 20, 74, 10, 56, 42, 76,\n", - " 9, 41, 36, 89, 83, 74, 0, 80, 78, 69, 100, 86,\n", - " 80, 68, 59, 76, 110, 115, 64, 45, 53, 65, 33, 21,\n", - " 12, 22, 11, 122, 4, 23, 37, 101, 45, 76, 120, 84,\n", - " 8, 24, 103, 24, 15, 76, 58, 121, 92, 75, 2, 17,\n", - " 114, 54, 76, 3, 66, 63, 76, 24, 24, 76, 62, 76,\n", - " 13, 11, 24, 58, 72, 119, 34, 70, 23, 23, 23, 91,\n", - " 76, 34, 46, 61, 111, 51, 87, 23, 51, 23, 51, 51,\n", - " 31, 82, 117, 26, 76, 27, 116, 124, 105, 76, 81, 40,\n", - " 18, 95, 60, 23, 96, 98, 44, 44, 71, 99, 93, 14,\n", - " 76, 46, 118, 76, 113, 76, 105, 76, 76, 76, 76, 25,\n", - " 24, 79, 32, 76, 51, 120, 76, 46, 5, 38, 19, 30,\n", - " 107, 77, 47, 39, 55, 76]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 575, 1127, 2425, ..., 3908, 340, 4832],\n", - " [ 198, 198, 120, ..., 6208, 6361, 6328]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 78, 46, 29, ..., 68, 12, 46],\n", - " [ 72, 170, 70, ..., 5893, 6161, 6147]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 142, 142, 142, ..., 6397, 6397, 6397],\n", - " [ 43, 684, 886, ..., 915, 859, 307]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 365, 476, 82, ..., 231, 307, 260],\n", - " [ 14, 204, 44, ..., 6324, 6321, 6302]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3429, 5705, 3612, ..., 5890, 5840, 6291],\n", - " [ 24, 42, 12, ..., 6107, 6078, 6078]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 48, 48, 90, ..., 6397, 6397, 6397],\n", - " [ 250, 94, 2886, ..., 4326, 3844, 3332]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 88, 88, 88, ..., 6101, 6101, 5878],\n", - " [3955, 3438, 3239, ..., 3254, 775, 5137]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.00649\n", - "sampling 0.006336\n", - "noi time: 0.001937\n", - "get_vertex_data call: 0.037473\n", - "noi group time: 0.003544\n", - "eoi_group_time: 0.016224\n", - "second half: 0.214856\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 32845, 1899, 31145, ..., 1111394, 1132720, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 32845, 1899, 31145, ..., 1111394, 1132720, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1232117, 1214757, ..., 1935110, 1931113, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1232117, 1214757, ..., 1935110, 1931113, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1136349, 1135721, 1135727, 1137791, 1140785, 1141756, 1141758,\n", - " 1136221, 1136223, 1136969, 1136971, 1141442, 1141443, 1143600, 1143615,\n", - " 1149831, 1139811, 1154772, 1137271, 1138943, 1138936, 1143362, 1139243,\n", - " 1146640, 1150506, 1139866, 1149216, 1149220, 1149228, 1155683, 1155689,\n", - " 1143810, 1143811, 1143820, 1147483, 1135992, 1144636, 1148522, 1153008,\n", - " 1153012, 1153023, 1136122, 1136125, 1148546, 1136742, 1147095, 1141916,\n", - " 1150555, 1155018, 1139365, 1147202, 1136685, 1150329, 1146376, 1134669,\n", - " 1140531, 1137254, 1137172, 1137181, 1151520, 1140149, 1140158, 1140159,\n", - " 1135913, 1162460, 1135367, 1135202, 1154739, 1141036, 1136777, 1134794,\n", - " 1135953, 1138498, 1138504, 1137329, 1143069, 1137693, 1144395, 1137529,\n", - " 1137534, 1157405, 1157397, 1136581, 1137441, 1156146, 1156159, 1148484,\n", - " 1139161, 1141702, 1135583, 1155075, 1138514, 1156964, 1135499, 1154132,\n", - " 1137018, 1156899, 1135522, 1139684, 1138314, 1137287, 1138436, 1138440,\n", - " 1140071, 1140079, 1136542, 1138461, 1138449, 1137924, 1136594, 1135132,\n", - " 1138846, 1135088, 1156605, 1147112, 1142611, 1135359, 1160516, 1145843,\n", - " 1150946, 1159868, 1139667, 1139673, 1138079, 1134992, 1148809, 1135789,\n", - " 1144406, 1153544, 1140852, 1139933, 1138646, 1138648, 1152042, 1152044,\n", - " 1152047, 1137734, 1137728, 1134750, 1141088, 1141102, 1144143, 1139889,\n", - " 1136392, 1143767, 1154860, 1137298, 1137299, 1143225, 1139033, 1140003,\n", - " 1146834, 1146832, 1141688, 1135860, 1136625, 1140470, 1141224, 1141891,\n", - " 1142160, 1139730, 1141159, 1141161, 1141786, 1136760, 1144640, 1147844,\n", - " 1137074, 1138482, 1140173, 1141472, 1138708, 1137652, 1137661, 1137663,\n", - " 1138424, 1143111, 1144596, 1136864, 1144041, 1141406, 1144182, 1150906,\n", - " 1146201, 1137365, 1141760, 1139559, 1139560, 1138539, 1147153, 1136378,\n", - " 1141365, 1141722, 1149097, 1149101, 1139022, 1143904, 1143915, 1139506,\n", - " 1139510, 1140093, 1139127, 1144992, 1140616, 1140976, 1140990, 1143694,\n", - " 1147050, 1145873, 1143543, 1152976, 1152980, 1135459, 1163910, 1141925,\n", - " 1146898, 1144242, 1141846, 1140691, 1143643, 1137571, 1143845, 1146024,\n", - " 1149928, 1139990, 1143293, 1143283, 1143294, 1151131, 1147540, 1148763,\n", - " 1147282, 1142816, 1136330, 1140349, 1147458, 1143663, 1149366, 1139417,\n", - " 1149615, 1143051, 1143040, 1143052, 1157720, 1136836, 1139329, 1141496,\n", - " 1142159, 1145429, 1143345, 1144766, 1144753, 1145813, 1145818, 1144080,\n", - " 1144083, 1135876, 1135813, 1150294, 1138004, 1144375, 1146514, 1143457,\n", - " 1137703, 1144291, 1147574, 1146636, 1146634, 1140361, 1140360, 1140364,\n", - " 1137990, 1147984, 1147996, 1147999, 1146949, 1139252, 1147244, 1148704,\n", - " 1148715, 1141319, 1141836, 1147191, 1158226, 1158230, 1150450, 1145238,\n", - " 1145240, 1145750, 1145751, 1142377, 1142369, 1148397, 1146178, 1151235,\n", - " 1148223, 1150280, 1150445, 1148940, 1154438, 1144514, 1144526, 1138044,\n", - " 1150339, 1152013, 1151994, 1151997, 1147796, 1147807, 1152023, 1152024,\n", - " 1145262, 1139914, 1146723, 1134869, 1148693, 1147019, 1147021, 1141949,\n", - " 1146776, 1150843, 1150730, 1149985, 1147653, 1143567, 1148288, 1148294,\n", - " 1148300, 1147871, 1154420, 1148188, 1151363, 1152565, 1138198, 1139718,\n", - " 1152435, 1152439, 1148720, 1148724, 1148726, 1147627, 1146544, 1146559,\n", - " 1146549, 1148204, 1148108, 1154168, 1153124, 1153125, 1153192, 1153188,\n", - " 1145104, 1145111, 1150935, 1148057, 1144863, 1150352, 1150356, 1143126,\n", - " 1147446, 1151821, 1152581, 1151906, 1154183, 1145640, 1148498, 1148505,\n", - " 1141419, 1136002, 1148949, 1146975, 1149358, 1153249, 1146623, 1151695,\n", - " 1151402, 1144467, 1144476, 1152849, 1152103, 1146287, 1150094, 1137746,\n", - " 1146307, 1152622, 1140518, 1155140, 1136401, 1151967, 1151960, 1152826,\n", - " 1155337, 1155358, 1157824, 1152673, 1154633, 1151617, 1150578, 1150588,\n", - " 1136131, 1136134, 1148913, 1148916, 1152951, 1140459, 1150615, 1152227,\n", - " 1138991, 1152903, 1151311, 1152341, 1146816, 1153311, 1138281, 1157147,\n", - " 1152300, 1136028, 1158712, 1158704, 1156622, 1152928, 1151064, 1156387,\n", - " 1152887, 1150102, 1150104, 1150101, 1153918, 1150150, 1150172, 1150164,\n", - " 1148033, 1148040, 1149300, 1152601, 1157621, 1137048, 1148628, 1158530,\n", - " 1158540, 1149946, 1154564, 1147647, 1159223, 1142047, 1157229, 1135434,\n", - " 1143442, 1157547, 1158854, 1158857, 1156500, 1157064, 1157069, 1155408,\n", - " 1145196, 1145187, 1137814, 1143496, 1150465, 1135231, 1135741, 1138830,\n", - " 1152183, 1156631, 1156942, 1153413, 1153415, 1139525, 1139524, 1158304,\n", - " 1140427, 1140431, 1155441, 1155442, 1155452, 1153359, 1150129, 1150136,\n", - " 1144357, 1140866, 1140879, 1154531, 1142755, 1156207, 1157642, 1151379,\n", - " 1158626, 1140187, 1156640, 1155122, 1157183, 1155755, 1156463, 1158096,\n", - " 1154763, 1155628, 1154555, 1161429, 1158824, 1158829, 1153715, 1153723,\n", - " 1156993, 1148836, 1155646, 1143254, 1143257, 1146938, 1154250, 1154240,\n", - " 1154080, 1162190, 1154909, 1163127, 1143189, 1153320, 1157430, 1150811,\n", - " 1150983, 1150987, 1157934, 1151030, 1137166, 1157663, 1158124, 1158126,\n", - " 1158578, 1153330, 1137381, 1159116, 1140914, 1134677, 1135601, 1135602,\n", - " 1148147, 1150671, 1159584, 1155855, 1155852, 1158656, 1138215, 1157685,\n", - " 1157684, 1140633, 1155717, 1144463, 1152209, 1157735, 1159130, 1164223,\n", - " 1155971, 1155975, 1142070, 1158840, 1158846, 1155393, 1155404, 1160163,\n", - " 1153503, 1136909, 1136896, 1158815, 1156778, 1158286, 1136480, 1136494,\n", - " 1153632, 1147599, 1155304, 1153112, 1152143, 1153808, 1157675, 1136646,\n", - " 1163111, 1134757, 1166421, 1146114, 1146126, 1144581, 1161539, 1142666,\n", - " 1150684, 1157747, 1157759, 1167346, 1167359, 1159042, 1159052, 1142426,\n", - " 1158300, 1155194, 1157944, 1162039, 1162044, 1153052, 1153042, 1153045,\n", - " 1155772, 1156235, 1166256, 1142869, 1156098, 1138391, 1138393, 1150046,\n", - " 1149063, 1149070, 1145945, 1155479, 1153519, 1146870, 1164006, 1139281,\n", - " 1156983, 1159773, 1146050, 1146063, 1146364, 1140130, 1140650, 1148600,\n", - " 1148607, 1143138, 1143139, 1151875, 1163019, 1155816, 1158653, 1156181,\n", - " 1159026, 1159032, 1168096, 1169108, 1152250, 1160600, 1155588, 1159536,\n", - " 1148566, 1148571, 1144977, 1144979, 1146509, 1171002, 1164580, 1167682,\n", - " 1161240, 1144739, 1155046, 1163527, 1145137, 1156739, 1165182, 1179009,\n", - " 1150642, 1171040, 1144800, 1144812, 1144808, 1135567, 1164741, 1164750,\n", - " 1165644, 1162619, 1165946, 1145567, 1145228, 1166462, 1144973, 1162291,\n", - " 1152639, 1152624, 1148120, 1148124, 1139351, 1145892, 1145902, 1153534,\n", - " 1169542, 1152200, 1158724, 1158722, 1147338, 1192302, 1145502, 1154927,\n", - " 1149480, 1155172, 1155178, 1165011, 1150518, 1156113, 1144336, 1157527,\n", - " 1147746, 1157331, 1141051, 1169359, 1154353, 1149452, 1146339, 1138609,\n", - " 1158611, 1158623, 1173047, 1163292, 1155494, 1160537, 1167383, 1152353,\n", - " 1170273, 1169929, 1149402, 1148667, 1173307, 1152150, 1152151, 1153755,\n", - " 1164974, 1159651, 1157153, 1157371, 1157373, 1167239, 1167247, 1147711,\n", - " 1151850, 1148141, 1169687, 1170488, 1177415, 1135021, 1172961, 1155739,\n", - " 1168818, 1177003, 1167903, 1140326, 1193975, 1143238, 1172932, 1163989,\n", - " 1154151, 1154148, 1158176, 1178887, 1149169, 1175665, 1181229, 1169772,\n", - " 1167658, 1170176, 1153803, 1171122, 1186309, 1153628, 1144898, 1180916,\n", - " 1161255, 1162129, 1154718, 1157792, 1157795, 1171623, 1179190, 1155804,\n", - " 1157134, 1180036, 1172154, 1158249, 1153898, 1154500, 1178216, 1145626,\n", - " 1145618, 1172024, 1178757, 1161911, 1146242, 1166959, 1152276, 1155990,\n", - " 1190502, 1167636, 1155899, 1160412, 1166981, 1168273, 1167764, 1188241,\n", - " 1166507, 1169064, 1168892, 1164228, 1164339, 1164271, 1146161, 1188070,\n", - " 1170802, 1167392, 1156161, 1156162, 1182158, 1170421, 1184050, 1192736,\n", - " 1139828, 1139831, 1150265, 1154812, 1188613, 1151288, 1181882, 1156055,\n", - " 1193365, 1192417, 1193186, 1194491, 1185976, 1162156, 1153729, 1152115,\n", - " 1186572, 1178003, 1167089, 1193116, 1158064, 1167739, 1178135, 1186174,\n", - " 1152084, 1165509, 1155555, 1192792, 1181710, 1175438, 1157008],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1136349, 1135721, 1135727, 1137791, 1140785, 1141756, 1141758,\n", - " 1136221, 1136223, 1136969, 1136971, 1141442, 1141443, 1143600, 1143615,\n", - " 1149831, 1139811, 1154772, 1137271, 1138943, 1138936, 1143362, 1139243,\n", - " 1146640, 1150506, 1139866, 1149216, 1149220, 1149228, 1155683, 1155689,\n", - " 1143810, 1143811, 1143820, 1147483, 1135992, 1144636, 1148522, 1153008,\n", - " 1153012, 1153023, 1136122, 1136125, 1148546, 1136742, 1147095, 1141916,\n", - " 1150555, 1155018, 1139365, 1147202, 1136685, 1150329, 1146376, 1134669,\n", - " 1140531, 1137254, 1137172, 1137181, 1151520, 1140149, 1140158, 1140159,\n", - " 1135913, 1162460, 1135367, 1135202, 1154739, 1141036, 1136777, 1134794,\n", - " 1135953, 1138498, 1138504, 1137329, 1143069, 1137693, 1144395, 1137529,\n", - " 1137534, 1157405, 1157397, 1136581, 1137441, 1156146, 1156159, 1148484,\n", - " 1139161, 1141702, 1135583, 1155075, 1138514, 1156964, 1135499, 1154132,\n", - " 1137018, 1156899, 1135522, 1139684, 1138314, 1137287, 1138436, 1138440,\n", - " 1140071, 1140079, 1136542, 1138461, 1138449, 1137924, 1136594, 1135132,\n", - " 1138846, 1135088, 1156605, 1147112, 1142611, 1135359, 1160516, 1145843,\n", - " 1150946, 1159868, 1139667, 1139673, 1138079, 1134992, 1148809, 1135789,\n", - " 1144406, 1153544, 1140852, 1139933, 1138646, 1138648, 1152042, 1152044,\n", - " 1152047, 1137734, 1137728, 1134750, 1141088, 1141102, 1144143, 1139889,\n", - " 1136392, 1143767, 1154860, 1137298, 1137299, 1143225, 1139033, 1140003,\n", - " 1146834, 1146832, 1141688, 1135860, 1136625, 1140470, 1141224, 1141891,\n", - " 1142160, 1139730, 1141159, 1141161, 1141786, 1136760, 1144640, 1147844,\n", - " 1137074, 1138482, 1140173, 1141472, 1138708, 1137652, 1137661, 1137663,\n", - " 1138424, 1143111, 1144596, 1136864, 1144041, 1141406, 1144182, 1150906,\n", - " 1146201, 1137365, 1141760, 1139559, 1139560, 1138539, 1147153, 1136378,\n", - " 1141365, 1141722, 1149097, 1149101, 1139022, 1143904, 1143915, 1139506,\n", - " 1139510, 1140093, 1139127, 1144992, 1140616, 1140976, 1140990, 1143694,\n", - " 1147050, 1145873, 1143543, 1152976, 1152980, 1135459, 1163910, 1141925,\n", - " 1146898, 1144242, 1141846, 1140691, 1143643, 1137571, 1143845, 1146024,\n", - " 1149928, 1139990, 1143293, 1143283, 1143294, 1151131, 1147540, 1148763,\n", - " 1147282, 1142816, 1136330, 1140349, 1147458, 1143663, 1149366, 1139417,\n", - " 1149615, 1143051, 1143040, 1143052, 1157720, 1136836, 1139329, 1141496,\n", - " 1142159, 1145429, 1143345, 1144766, 1144753, 1145813, 1145818, 1144080,\n", - " 1144083, 1135876, 1135813, 1150294, 1138004, 1144375, 1146514, 1143457,\n", - " 1137703, 1144291, 1147574, 1146636, 1146634, 1140361, 1140360, 1140364,\n", - " 1137990, 1147984, 1147996, 1147999, 1146949, 1139252, 1147244, 1148704,\n", - " 1148715, 1141319, 1141836, 1147191, 1158226, 1158230, 1150450, 1145238,\n", - " 1145240, 1145750, 1145751, 1142377, 1142369, 1148397, 1146178, 1151235,\n", - " 1148223, 1150280, 1150445, 1148940, 1154438, 1144514, 1144526, 1138044,\n", - " 1150339, 1152013, 1151994, 1151997, 1147796, 1147807, 1152023, 1152024,\n", - " 1145262, 1139914, 1146723, 1134869, 1148693, 1147019, 1147021, 1141949,\n", - " 1146776, 1150843, 1150730, 1149985, 1147653, 1143567, 1148288, 1148294,\n", - " 1148300, 1147871, 1154420, 1148188, 1151363, 1152565, 1138198, 1139718,\n", - " 1152435, 1152439, 1148720, 1148724, 1148726, 1147627, 1146544, 1146559,\n", - " 1146549, 1148204, 1148108, 1154168, 1153124, 1153125, 1153192, 1153188,\n", - " 1145104, 1145111, 1150935, 1148057, 1144863, 1150352, 1150356, 1143126,\n", - " 1147446, 1151821, 1152581, 1151906, 1154183, 1145640, 1148498, 1148505,\n", - " 1141419, 1136002, 1148949, 1146975, 1149358, 1153249, 1146623, 1151695,\n", - " 1151402, 1144467, 1144476, 1152849, 1152103, 1146287, 1150094, 1137746,\n", - " 1146307, 1152622, 1140518, 1155140, 1136401, 1151967, 1151960, 1152826,\n", - " 1155337, 1155358, 1157824, 1152673, 1154633, 1151617, 1150578, 1150588,\n", - " 1136131, 1136134, 1148913, 1148916, 1152951, 1140459, 1150615, 1152227,\n", - " 1138991, 1152903, 1151311, 1152341, 1146816, 1153311, 1138281, 1157147,\n", - " 1152300, 1136028, 1158712, 1158704, 1156622, 1152928, 1151064, 1156387,\n", - " 1152887, 1150102, 1150104, 1150101, 1153918, 1150150, 1150172, 1150164,\n", - " 1148033, 1148040, 1149300, 1152601, 1157621, 1137048, 1148628, 1158530,\n", - " 1158540, 1149946, 1154564, 1147647, 1159223, 1142047, 1157229, 1135434,\n", - " 1143442, 1157547, 1158854, 1158857, 1156500, 1157064, 1157069, 1155408,\n", - " 1145196, 1145187, 1137814, 1143496, 1150465, 1135231, 1135741, 1138830,\n", - " 1152183, 1156631, 1156942, 1153413, 1153415, 1139525, 1139524, 1158304,\n", - " 1140427, 1140431, 1155441, 1155442, 1155452, 1153359, 1150129, 1150136,\n", - " 1144357, 1140866, 1140879, 1154531, 1142755, 1156207, 1157642, 1151379,\n", - " 1158626, 1140187, 1156640, 1155122, 1157183, 1155755, 1156463, 1158096,\n", - " 1154763, 1155628, 1154555, 1161429, 1158824, 1158829, 1153715, 1153723,\n", - " 1156993, 1148836, 1155646, 1143254, 1143257, 1146938, 1154250, 1154240,\n", - " 1154080, 1162190, 1154909, 1163127, 1143189, 1153320, 1157430, 1150811,\n", - " 1150983, 1150987, 1157934, 1151030, 1137166, 1157663, 1158124, 1158126,\n", - " 1158578, 1153330, 1137381, 1159116, 1140914, 1134677, 1135601, 1135602,\n", - " 1148147, 1150671, 1159584, 1155855, 1155852, 1158656, 1138215, 1157685,\n", - " 1157684, 1140633, 1155717, 1144463, 1152209, 1157735, 1159130, 1164223,\n", - " 1155971, 1155975, 1142070, 1158840, 1158846, 1155393, 1155404, 1160163,\n", - " 1153503, 1136909, 1136896, 1158815, 1156778, 1158286, 1136480, 1136494,\n", - " 1153632, 1147599, 1155304, 1153112, 1152143, 1153808, 1157675, 1136646,\n", - " 1163111, 1134757, 1166421, 1146114, 1146126, 1144581, 1161539, 1142666,\n", - " 1150684, 1157747, 1157759, 1167346, 1167359, 1159042, 1159052, 1142426,\n", - " 1158300, 1155194, 1157944, 1162039, 1162044, 1153052, 1153042, 1153045,\n", - " 1155772, 1156235, 1166256, 1142869, 1156098, 1138391, 1138393, 1150046,\n", - " 1149063, 1149070, 1145945, 1155479, 1153519, 1146870, 1164006, 1139281,\n", - " 1156983, 1159773, 1146050, 1146063, 1146364, 1140130, 1140650, 1148600,\n", - " 1148607, 1143138, 1143139, 1151875, 1163019, 1155816, 1158653, 1156181,\n", - " 1159026, 1159032, 1168096, 1169108, 1152250, 1160600, 1155588, 1159536,\n", - " 1148566, 1148571, 1144977, 1144979, 1146509, 1171002, 1164580, 1167682,\n", - " 1161240, 1144739, 1155046, 1163527, 1145137, 1156739, 1165182, 1179009,\n", - " 1150642, 1171040, 1144800, 1144812, 1144808, 1135567, 1164741, 1164750,\n", - " 1165644, 1162619, 1165946, 1145567, 1145228, 1166462, 1144973, 1162291,\n", - " 1152639, 1152624, 1148120, 1148124, 1139351, 1145892, 1145902, 1153534,\n", - " 1169542, 1152200, 1158724, 1158722, 1147338, 1192302, 1145502, 1154927,\n", - " 1149480, 1155172, 1155178, 1165011, 1150518, 1156113, 1144336, 1157527,\n", - " 1147746, 1157331, 1141051, 1169359, 1154353, 1149452, 1146339, 1138609,\n", - " 1158611, 1158623, 1173047, 1163292, 1155494, 1160537, 1167383, 1152353,\n", - " 1170273, 1169929, 1149402, 1148667, 1173307, 1152150, 1152151, 1153755,\n", - " 1164974, 1159651, 1157153, 1157371, 1157373, 1167239, 1167247, 1147711,\n", - " 1151850, 1148141, 1169687, 1170488, 1177415, 1135021, 1172961, 1155739,\n", - " 1168818, 1177003, 1167903, 1140326, 1193975, 1143238, 1172932, 1163989,\n", - " 1154151, 1154148, 1158176, 1178887, 1149169, 1175665, 1181229, 1169772,\n", - " 1167658, 1170176, 1153803, 1171122, 1186309, 1153628, 1144898, 1180916,\n", - " 1161255, 1162129, 1154718, 1157792, 1157795, 1171623, 1179190, 1155804,\n", - " 1157134, 1180036, 1172154, 1158249, 1153898, 1154500, 1178216, 1145626,\n", - " 1145618, 1172024, 1178757, 1161911, 1146242, 1166959, 1152276, 1155990,\n", - " 1190502, 1167636, 1155899, 1160412, 1166981, 1168273, 1167764, 1188241,\n", - " 1166507, 1169064, 1168892, 1164228, 1164339, 1164271, 1146161, 1188070,\n", - " 1170802, 1167392, 1156161, 1156162, 1182158, 1170421, 1184050, 1192736,\n", - " 1139828, 1139831, 1150265, 1154812, 1188613, 1151288, 1181882, 1156055,\n", - " 1193365, 1192417, 1193186, 1194491, 1185976, 1162156, 1153729, 1152115,\n", - " 1186572, 1178003, 1167089, 1193116, 1158064, 1167739, 1178135, 1186174,\n", - " 1152084, 1165509, 1155555, 1192792, 1181710, 1175438, 1157008],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197181, 1198769, 1197747, 1199736, 1197226, 1199831, 1195860,\n", - " 1198449, 1198459, 1202255, 1201581, 1201582, 1194626, 1197777, 1197786,\n", - " 1199248, 1201016, 1197359, 1198628, 1198697, 1202803, 1202804, 1197512,\n", - " 1196684, 1194743, 1195725, 1194770, 1194648, 1195511, 1195263, 1197921,\n", - " 1201992, 1198542, 1198543, 1199519, 1194952, 1198310, 1194884, 1195888,\n", - " 1195895, 1196359, 1196699, 1194759, 1194762, 1194661, 1195320, 1197793,\n", - " 1198163, 1198167, 1198161, 1196717, 1195148, 1195279, 1196242, 1196249,\n", - " 1197273, 1194849, 1199315, 1197248, 1197253, 1199697, 1198280, 1200949,\n", - " 1199060, 1199059, 1197295, 1199185, 1194928, 1197583, 1199628, 1197994,\n", - " 1200878, 1200746, 1199231, 1199673, 1194786, 1194795, 1200665, 1199021,\n", - " 1197601, 1197609, 1196727, 1195773, 1202618, 1200893, 1198428, 1199410,\n", - " 1198811, 1201827, 1201155, 1201156, 1202630, 1200991, 1200918, 1199712,\n", - " 1201043, 1200363, 1202499, 1200526, 1200267, 1200271, 1200553, 1200556,\n", - " 1200310, 1200853, 1196883, 1199908, 1201442, 1202087, 1202239, 1200825,\n", - " 1202337, 1200189, 1201291, 1203329, 1200398, 1198561, 1198338, 1199606,\n", - " 1195676, 1195006, 1202869, 1200445, 1198929, 1200684, 1198911, 1195421,\n", - " 1201789, 1197816, 1197821, 1197491, 1202269, 1195294, 1200585, 1199405,\n", - " 1198824, 1197735, 1200437, 1201886, 1200301, 1201365, 1196072],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197181, 1198769, 1197747, 1199736, 1197226, 1199831, 1195860,\n", - " 1198449, 1198459, 1202255, 1201581, 1201582, 1194626, 1197777, 1197786,\n", - " 1199248, 1201016, 1197359, 1198628, 1198697, 1202803, 1202804, 1197512,\n", - " 1196684, 1194743, 1195725, 1194770, 1194648, 1195511, 1195263, 1197921,\n", - " 1201992, 1198542, 1198543, 1199519, 1194952, 1198310, 1194884, 1195888,\n", - " 1195895, 1196359, 1196699, 1194759, 1194762, 1194661, 1195320, 1197793,\n", - " 1198163, 1198167, 1198161, 1196717, 1195148, 1195279, 1196242, 1196249,\n", - " 1197273, 1194849, 1199315, 1197248, 1197253, 1199697, 1198280, 1200949,\n", - " 1199060, 1199059, 1197295, 1199185, 1194928, 1197583, 1199628, 1197994,\n", - " 1200878, 1200746, 1199231, 1199673, 1194786, 1194795, 1200665, 1199021,\n", - " 1197601, 1197609, 1196727, 1195773, 1202618, 1200893, 1198428, 1199410,\n", - " 1198811, 1201827, 1201155, 1201156, 1202630, 1200991, 1200918, 1199712,\n", - " 1201043, 1200363, 1202499, 1200526, 1200267, 1200271, 1200553, 1200556,\n", - " 1200310, 1200853, 1196883, 1199908, 1201442, 1202087, 1202239, 1200825,\n", - " 1202337, 1200189, 1201291, 1203329, 1200398, 1198561, 1198338, 1199606,\n", - " 1195676, 1195006, 1202869, 1200445, 1198929, 1200684, 1198911, 1195421,\n", - " 1201789, 1197816, 1197821, 1197491, 1202269, 1195294, 1200585, 1199405,\n", - " 1198824, 1197735, 1200437, 1201886, 1200301, 1201365, 1196072],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 2.9338e-01, -9.3776e-04, 9.6535e-01, ..., 4.9945e-02,\n", - " -1.5921e-03, -6.9756e-03],\n", - " [ 1.3656e-01, -2.0638e-04, 4.4295e-01, ..., 8.5412e-02,\n", - " -1.9738e-03, -3.6143e-03],\n", - " [ 2.6487e-01, -1.0189e-03, 8.7150e-01, ..., 4.2911e-02,\n", - " -1.3245e-03, -6.3397e-03],\n", - " ...,\n", - " [ 2.2628e-01, -3.3257e-04, 8.4546e-01, ..., 5.3536e-02,\n", - " -1.3867e-03, -5.7759e-03],\n", - " [ 1.6186e-01, -3.0621e-04, 6.1265e-01, ..., 5.3373e-02,\n", - " -1.3829e-03, -4.4085e-03],\n", - " [ 1.3853e-01, -3.6733e-04, 4.6111e-01, ..., 7.3565e-02,\n", - " -1.7879e-03, -3.6131e-03]], device='cuda:0'), 'paper': tensor([[-5.6668e-03, 2.8332e+00, 2.9977e+00, ..., 2.7343e+00,\n", - " -4.2038e-02, 1.4244e+00],\n", - " [-1.4899e-04, 1.1293e+00, 3.9576e-01, ..., -7.0663e-03,\n", - " -1.6946e-02, 3.1256e-03],\n", - " [-9.6980e-03, 2.1436e+00, 3.4297e+00, ..., 9.3487e-02,\n", - " -4.1365e-02, -3.4515e-03],\n", - " ...,\n", - " [ 1.6626e-01, 1.0295e+00, 2.2263e-01, ..., -9.7655e-03,\n", - " -1.8603e-02, 1.1275e-01],\n", - " [-5.7564e-03, 5.9404e-01, 7.3733e-01, ..., -8.5026e-03,\n", - " -1.6341e-02, -7.7892e-03],\n", - " [-6.4739e-03, 3.6483e+00, 2.4281e+00, ..., 5.0474e+00,\n", - " -5.2943e-02, 2.9920e+00]], device='cuda:0'), 'author': tensor([[-2.0876e-03, 2.1820e-01, 1.2300e-01, ..., 1.2783e+00,\n", - " 9.5896e-03, -2.0374e-03],\n", - " [-4.3030e-03, 4.5678e-01, -4.5512e-04, ..., 1.1790e+00,\n", - " 4.5005e-02, -3.2260e-03],\n", - " [-1.8352e-03, 2.6834e-01, 1.2494e-01, ..., 1.2720e+00,\n", - " 1.1550e-01, -1.4876e-03],\n", - " ...,\n", - " [-1.1769e-03, 1.7338e-01, 1.9489e-01, ..., 1.2244e+00,\n", - " 3.4520e-01, -7.1638e-04],\n", - " [-6.3400e-03, 5.9773e-01, -6.0723e-04, ..., 1.2747e+00,\n", - " 2.3186e-01, -3.5525e-03],\n", - " [-1.2220e-03, 2.0820e-01, 1.7112e-01, ..., 1.2728e+00,\n", - " 4.0718e-01, -4.7205e-04]], device='cuda:0'), 'field_of_study': tensor([[-2.6532e-03, 5.4115e-01, 1.4629e-01, ..., -7.6144e-03,\n", - " 3.4547e-01, 4.9583e-01],\n", - " [-2.2734e-03, 6.0886e-01, 1.9051e-01, ..., -7.7208e-03,\n", - " 3.0956e-01, 4.8128e-01],\n", - " [-2.2171e-03, 5.2644e-01, 1.0041e-01, ..., -7.7952e-03,\n", - " 3.6478e-01, 4.6030e-01],\n", - " ...,\n", - " [-6.7158e-04, 5.7104e-01, 1.1613e-01, ..., -7.0070e-03,\n", - " 4.3082e-01, 1.1707e-01],\n", - " [-2.7795e-03, 5.4148e-01, 8.6870e-02, ..., -6.8570e-03,\n", - " 2.9691e-01, 4.2902e-01],\n", - " [-3.2611e-03, 7.5036e-01, 2.7867e-01, ..., -9.3118e-03,\n", - " 4.2477e-01, 6.0559e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 183, 183, 32, 204, 204, 183, 98, 134, 223, 336, 396, 396,\n", - " 396, 396, 291, 308, 299, 330, 330, 330, 291, 291, 372, 230,\n", - " 230, 400, 660, 796, 311, 603, 603, 603, 1043, 584, 1236, 995,\n", - " 1084, 948, 1105, 904, 833, 833, 1156, 1063, 1063, 1147, 1270, 1139,\n", - " 1139, 1139, 1154, 1229, 1356, 1246, 1246, 1182, 1182, 1531, 1334, 1448,\n", - " 1956, 1805, 1568, 1568, 1820, 1820, 1655, 1853, 1843, 2008, 1877, 1958,\n", - " 1958, 2118, 1850, 1921, 1889, 2132, 2022, 2040, 2040, 2083, 2083, 2083,\n", - " 2000, 2309, 2134, 2268, 2258, 2258, 2291, 2245, 2302, 2313, 2313, 2313,\n", - " 2346, 2330, 2424, 2273, 2400, 2369, 2586, 2586, 2558, 2706, 2446, 2556,\n", - " 2902, 2710, 2924, 2759, 2759, 2759, 2669, 2946, 3060, 3125, 3200, 3200,\n", - " 3298, 3298, 3722, 3455, 3455, 3455, 3645, 3536, 3664, 3754, 3695, 3479,\n", - " 3479, 3764, 3623, 3816, 3756, 3812, 3876, 3881, 3957, 3987, 4087, 4087,\n", - " 4061, 4061, 4061, 4065, 4108, 4244, 4042, 4109, 4109, 4548, 4312, 4518,\n", - " 4518, 4603, 4603, 4459, 4512, 4976, 4752, 4777, 4921, 5035, 5476, 5476,\n", - " 5027, 5476, 5476, 5070, 5051, 5425, 5425, 4853, 4853, 4853, 4853, 5240,\n", - " 4949, 5638, 5703, 5703, 5703, 5392, 5750, 5467, 5361, 5620, 5587, 5718,\n", - " 5682, 5791, 5791, 5791, 5791, 5794, 5794],\n", - " [ 87, 11, 11, 73, 43, 22, 22, 110, 139, 45, 66, 32,\n", - " 101, 13, 133, 125, 50, 113, 69, 21, 123, 135, 82, 80,\n", - " 74, 93, 71, 48, 51, 36, 135, 19, 113, 11, 46, 94,\n", - " 137, 94, 120, 63, 28, 38, 15, 53, 108, 35, 82, 86,\n", - " 98, 89, 71, 1, 109, 10, 115, 96, 72, 62, 82, 75,\n", - " 121, 134, 5, 85, 100, 85, 41, 79, 90, 122, 72, 126,\n", - " 107, 104, 20, 77, 82, 108, 20, 32, 24, 99, 112, 130,\n", - " 18, 110, 26, 30, 103, 30, 93, 109, 114, 124, 131, 73,\n", - " 76, 33, 109, 58, 142, 92, 78, 136, 41, 49, 110, 67,\n", - " 62, 95, 139, 42, 102, 70, 55, 109, 33, 140, 27, 105,\n", - " 44, 91, 0, 8, 80, 138, 83, 76, 14, 84, 12, 33,\n", - " 74, 37, 82, 71, 110, 37, 93, 71, 110, 29, 40, 116,\n", - " 52, 106, 88, 128, 24, 30, 7, 114, 118, 82, 50, 60,\n", - " 79, 82, 39, 141, 2, 6, 9, 97, 114, 56, 54, 3,\n", - " 117, 111, 4, 76, 59, 68, 16, 57, 114, 129, 64, 127,\n", - " 52, 110, 25, 34, 21, 119, 82, 132, 65, 113, 17, 81,\n", - " 5, 23, 61, 82, 31, 120, 47]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 653, 896, 1106, ..., 4178, 4927, 534],\n", - " [ 24, 24, 77, ..., 6882, 7041, 7038]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 94, 18, 28, ..., 85, 85, 117],\n", - " [ 38, 171, 24, ..., 5832, 5827, 5813]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 2, 158, 158, ..., 6963, 6870, 6927],\n", - " [ 230, 279, 27, ..., 828, 440, 815]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 78, 41, 279, ..., 619, 213, 599],\n", - " [ 131, 215, 90, ..., 6893, 6967, 6977]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3401, 6808, 273, ..., 3940, 3699, 6451],\n", - " [ 157, 50, 1, ..., 5843, 5853, 5838]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 158, 158, 158, ..., 6870, 6856, 6927],\n", - " [2028, 1754, 150, ..., 3247, 1277, 627]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 223, 223, 223, ..., 5794, 5794, 5794],\n", - " [5763, 5904, 6054, ..., 3757, 3595, 3866]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.005999\n", - "sampling 0.005843\n", - "noi time: 0.001907\n", - "get_vertex_data call: 0.026715\n", - "noi group time: 0.004221\n", - "eoi_group_time: 0.016207\n", - "second half: 0.220567\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 16691, 16702, ..., 1111730, 1111394, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 16691, 16702, ..., 1111730, 1111394, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210825, 1224375, 1212857, ..., 1931111, 1936972, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210825, 1224375, 1212857, ..., 1931111, 1936972, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1137212, 1141424, 1140282, 1140284, 1140285, 1136347, 1136349,\n", - " 1135723, 1139698, 1141758, 1138335, 1136223, 1141251, 1140297, 1136969,\n", - " 1136971, 1143615, 1145373, 1145989, 1145993, 1138942, 1143372, 1143363,\n", - " 1146640, 1146644, 1146653, 1139615, 1140776, 1150497, 1150506, 1149216,\n", - " 1147949, 1155683, 1155689, 1143820, 1147473, 1147483, 1147486, 1142881,\n", - " 1144636, 1146992, 1146995, 1146996, 1134697, 1148343, 1150200, 1152664,\n", - " 1137220, 1155014, 1155018, 1139364, 1139373, 1139371, 1147202, 1136683,\n", - " 1136263, 1146371, 1134804, 1134810, 1138112, 1137254, 1138356, 1138362,\n", - " 1153467, 1140158, 1135913, 1140952, 1162456, 1135360, 1135367, 1135370,\n", - " 1135202, 1135903, 1154739, 1141036, 1136779, 1134794, 1157443, 1157450,\n", - " 1135953, 1143377, 1138504, 1137329, 1157103, 1137687, 1136618, 1136619,\n", - " 1144395, 1137534, 1157395, 1157397, 1137441, 1143317, 1137480, 1137025,\n", - " 1148481, 1148489, 1139161, 1135983, 1142596, 1141084, 1136111, 1155084,\n", - " 1156348, 1156350, 1138514, 1153099, 1153092, 1137957, 1138584, 1154132,\n", - " 1154128, 1156899, 1156909, 1138309, 1137287, 1138436, 1138440, 1138451,\n", - " 1138461, 1138449, 1138462, 1137924, 1136594, 1138846, 1156603, 1156606,\n", - " 1147112, 1142611, 1142612, 1135352, 1135359, 1135347, 1135618, 1135631,\n", - " 1138185, 1145843, 1137108, 1137109, 1139667, 1139668, 1139673, 1138070,\n", - " 1134992, 1142788, 1152651, 1152654, 1136730, 1158974, 1139315, 1153543,\n", - " 1153544, 1139933, 1137587, 1138647, 1138648, 1141964, 1134891, 1141997,\n", - " 1141985, 1152042, 1152044, 1136057, 1137734, 1137728, 1134922, 1134750,\n", - " 1136993, 1137000, 1135549, 1140228, 1141088, 1141097, 1141098, 1144138,\n", - " 1149001, 1139889, 1139642, 1143767, 1137298, 1137299, 1143711, 1139025,\n", - " 1149982, 1146844, 1135860, 1136426, 1140470, 1141112, 1142929, 1139386,\n", - " 1136917, 1143667, 1143678, 1143677, 1140601, 1140597, 1141786, 1136760,\n", - " 1144650, 1137075, 1138482, 1141821, 1143158, 1143153, 1153666, 1148864,\n", - " 1138708, 1140110, 1142913, 1144596, 1157416, 1136867, 1145298, 1144039,\n", - " 1140885, 1144182, 1150906, 1143753, 1137854, 1147153, 1141365, 1153062,\n", - " 1153068, 1163674, 1139022, 1144279, 1139508, 1139510, 1139773, 1140093,\n", - " 1139127, 1144998, 1145000, 1145001, 1145213, 1143779, 1164531, 1147896,\n", - " 1140976, 1140990, 1135047, 1147050, 1147047, 1145872, 1145873, 1143543,\n", - " 1152976, 1141925, 1141931, 1146901, 1144242, 1141846, 1137149, 1140695,\n", - " 1136891, 1143639, 1137571, 1141378, 1145974, 1146024, 1138085, 1146140,\n", - " 1154328, 1141646, 1149928, 1139990, 1143293, 1143294, 1147543, 1147540,\n", - " 1148763, 1148760, 1147282, 1147293, 1149155, 1147461, 1149372, 1139408,\n", - " 1149608, 1143040, 1136160, 1136836, 1136843, 1139328, 1142149, 1142153,\n", - " 1143345, 1144765, 1144753, 1144615, 1140844, 1144083, 1138592, 1135876,\n", - " 1150756, 1144319, 1135813, 1150294, 1146523, 1143967, 1138018, 1143460,\n", - " 1143457, 1143007, 1144291, 1140492, 1143949, 1147574, 1146634, 1146637,\n", - " 1147521, 1140364, 1137990, 1168914, 1149489, 1148962, 1147984, 1147999,\n", - " 1134902, 1144013, 1139252, 1147244, 1148704, 1141327, 1148476, 1147056,\n", - " 1149718, 1147025, 1142858, 1147970, 1158226, 1158235, 1149871, 1141137,\n", - " 1154526, 1145240, 1145751, 1142378, 1146157, 1146145, 1138638, 1148397,\n", - " 1146178, 1151242, 1148214, 1152531, 1150274, 1150445, 1149263, 1147954,\n", - " 1149791, 1144514, 1154816, 1147794, 1147807, 1151473, 1152022, 1154271,\n", - " 1135504, 1139914, 1146731, 1149530, 1147019, 1147021, 1141267, 1141269,\n", - " 1154979, 1148453, 1148448, 1147653, 1143560, 1149412, 1152068, 1152073,\n", - " 1152079, 1137716, 1137724, 1148623, 1164894, 1147856, 1139088, 1139096,\n", - " 1154420, 1158795, 1148188, 1138404, 1152435, 1151560, 1148720, 1148734,\n", - " 1147627, 1149810, 1148204, 1154203, 1153124, 1153192, 1153188, 1145104,\n", - " 1152962, 1152965, 1150935, 1144863, 1155093, 1147442, 1151821, 1152581,\n", - " 1154183, 1148505, 1148503, 1141420, 1136002, 1151351, 1151352, 1146967,\n", - " 1156402, 1149359, 1150219, 1146623, 1144468, 1144477, 1144466, 1144476,\n", - " 1152100, 1152103, 1146280, 1156325, 1153027, 1153030, 1153032, 1153038,\n", - " 1145546, 1145551, 1137746, 1146304, 1140521, 1155146, 1155140, 1136401,\n", - " 1149203, 1152819, 1155334, 1154123, 1157835, 1157824, 1152673, 1151582,\n", - " 1151617, 1150578, 1136134, 1148927, 1140935, 1146816, 1156826, 1156816,\n", - " 1146708, 1138279, 1138281, 1136028, 1158712, 1158704, 1140687, 1152928,\n", - " 1151064, 1137401, 1153918, 1150150, 1150164, 1149273, 1153691, 1148040,\n", - " 1149300, 1148907, 1145649, 1149798, 1137048, 1137054, 1148628, 1148633,\n", - " 1158530, 1137458, 1142047, 1156720, 1157229, 1158860, 1158916, 1157064,\n", - " 1157069, 1155422, 1152833, 1145187, 1137814, 1150465, 1149052, 1135733,\n", - " 1152183, 1152182, 1156629, 1150817, 1156935, 1153413, 1153415, 1147810,\n", - " 1143010, 1151469, 1158304, 1158306, 1158311, 1151271, 1155441, 1155452,\n", - " 1150130, 1150132, 1140865, 1154529, 1145771, 1142755, 1156207, 1156271,\n", - " 1151383, 1151379, 1158639, 1156649, 1155122, 1152527, 1155752, 1155755,\n", - " 1155756, 1151425, 1151432, 1135406, 1146913, 1145793, 1156463, 1158096,\n", - " 1154755, 1154766, 1155626, 1155628, 1156563, 1154550, 1154555, 1155576,\n", - " 1136469, 1158817, 1158824, 1158325, 1158335, 1155646, 1143254, 1143257,\n", - " 1154644, 1146935, 1162396, 1154250, 1154240, 1162190, 1156713, 1139625,\n", - " 1143189, 1150371, 1153320, 1150987, 1143517, 1157928, 1157934, 1151030,\n", - " 1157653, 1157650, 1158126, 1153786, 1159116, 1145681, 1134677, 1134685,\n", - " 1138215, 1149145, 1159258, 1140633, 1155717, 1152220, 1156693, 1140381,\n", - " 1140374, 1156017, 1157735, 1159130, 1144843, 1155971, 1155975, 1159956,\n", - " 1158846, 1156811, 1156812, 1161897, 1155393, 1149700, 1136899, 1136896,\n", - " 1158881, 1158882, 1158815, 1156778, 1151615, 1136494, 1136491, 1147585,\n", - " 1155309, 1156490, 1153808, 1136640, 1136646, 1144127, 1134757, 1140049,\n", - " 1166424, 1158555, 1153825, 1153827, 1146126, 1159943, 1158006, 1144584,\n", - " 1155521, 1161539, 1142487, 1142493, 1142666, 1162417, 1159052, 1144258,\n", - " 1159071, 1160563, 1186580, 1153052, 1153045, 1167176, 1166243, 1159368,\n", - " 1153842, 1156107, 1138384, 1138393, 1150046, 1149063, 1145948, 1145945,\n", - " 1155480, 1147300, 1157600, 1138161, 1164006, 1156789, 1156795, 1149956,\n", - " 1163396, 1139286, 1139295, 1166073, 1159985, 1157234, 1171515, 1157351,\n", - " 1146063, 1160178, 1158878, 1148600, 1148603, 1159646, 1151876, 1151872,\n", - " 1163201, 1158653, 1158655, 1156184, 1156189, 1159025, 1159026, 1159032,\n", - " 1171373, 1165596, 1143737, 1160607, 1155588, 1155597, 1164610, 1173744,\n", - " 1144327, 1151223, 1151227, 1138679, 1168428, 1147830, 1164580, 1144739,\n", - " 1166882, 1168067, 1153209, 1141471, 1151650, 1147426, 1147427, 1157050,\n", - " 1156739, 1165182, 1150649, 1171040, 1168750, 1144810, 1144812, 1153270,\n", - " 1164750, 1142722, 1142733, 1156293, 1165636, 1144058, 1161758, 1167780,\n", - " 1145736, 1145915, 1145228, 1155317, 1166462, 1138766, 1144972, 1144973,\n", - " 1146433, 1143038, 1165458, 1165746, 1147355, 1170502, 1170949, 1170952,\n", - " 1152624, 1139351, 1147723, 1147724, 1145902, 1153520, 1153534, 1152204,\n", - " 1175240, 1143402, 1149552, 1158724, 1158734, 1167503, 1154075, 1154076,\n", - " 1147330, 1145667, 1145674, 1192401, 1149130, 1169602, 1167817, 1193345,\n", - " 1155172, 1165023, 1165011, 1150515, 1150522, 1150518, 1156119, 1144346,\n", - " 1144336, 1157534, 1138382, 1138369, 1147746, 1154670, 1135845, 1169162,\n", - " 1157331, 1141051, 1141043, 1151664, 1147491, 1138609, 1158146, 1158154,\n", - " 1158611, 1158623, 1158054, 1157379, 1157380, 1165900, 1154871, 1165322,\n", - " 1155494, 1152353, 1152545, 1168451, 1149402, 1148666, 1148335, 1148324,\n", - " 1177984, 1168906, 1147504, 1173307, 1189233, 1169144, 1154027, 1169572,\n", - " 1151208, 1157153, 1167232, 1147711, 1148128, 1157598, 1181019, 1168691,\n", - " 1168817, 1168604, 1175418, 1140326, 1140330, 1166028, 1143240, 1160150,\n", - " 1178201, 1159091, 1181765, 1181772, 1177177, 1150234, 1161588, 1154151,\n", - " 1154148, 1149169, 1149176, 1172461, 1184634, 1178610, 1186117, 1143279,\n", - " 1168481, 1143420, 1179243, 1177262, 1184597, 1153792, 1153803, 1178171,\n", - " 1153141, 1181678, 1164826, 1177155, 1161024, 1153628, 1183135, 1180916,\n", - " 1184093, 1151519, 1168779, 1158030, 1161255, 1155262, 1154705, 1157792,\n", - " 1157795, 1171623, 1164044, 1155799, 1190803, 1157124, 1157133, 1157992,\n", - " 1157991, 1182011, 1153889, 1153898, 1153902, 1154500, 1182486, 1160009,\n", - " 1145626, 1178028, 1161911, 1149755, 1181345, 1186052, 1181143, 1158512,\n", - " 1158513, 1158379, 1155899, 1184317, 1164798, 1162253, 1180517, 1168621,\n", - " 1187382, 1188723, 1146161, 1141516, 1182318, 1171015, 1156528, 1190733,\n", - " 1165024, 1139828, 1139831, 1139837, 1150265, 1154812, 1149668, 1194512,\n", - " 1156055, 1180127, 1146392, 1146394, 1146395, 1173058, 1194023, 1186703,\n", - " 1166325, 1183383, 1190444, 1193456, 1188912, 1151774, 1153733, 1169781,\n", - " 1169707, 1166841, 1166838, 1173330, 1171201, 1150406, 1161186, 1194059,\n", - " 1156681, 1172423, 1178135, 1152092, 1155959, 1155962, 1174034, 1179768,\n", - " 1179769, 1183297, 1188305, 1181033, 1184941, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1137212, 1141424, 1140282, 1140284, 1140285, 1136347, 1136349,\n", - " 1135723, 1139698, 1141758, 1138335, 1136223, 1141251, 1140297, 1136969,\n", - " 1136971, 1143615, 1145373, 1145989, 1145993, 1138942, 1143372, 1143363,\n", - " 1146640, 1146644, 1146653, 1139615, 1140776, 1150497, 1150506, 1149216,\n", - " 1147949, 1155683, 1155689, 1143820, 1147473, 1147483, 1147486, 1142881,\n", - " 1144636, 1146992, 1146995, 1146996, 1134697, 1148343, 1150200, 1152664,\n", - " 1137220, 1155014, 1155018, 1139364, 1139373, 1139371, 1147202, 1136683,\n", - " 1136263, 1146371, 1134804, 1134810, 1138112, 1137254, 1138356, 1138362,\n", - " 1153467, 1140158, 1135913, 1140952, 1162456, 1135360, 1135367, 1135370,\n", - " 1135202, 1135903, 1154739, 1141036, 1136779, 1134794, 1157443, 1157450,\n", - " 1135953, 1143377, 1138504, 1137329, 1157103, 1137687, 1136618, 1136619,\n", - " 1144395, 1137534, 1157395, 1157397, 1137441, 1143317, 1137480, 1137025,\n", - " 1148481, 1148489, 1139161, 1135983, 1142596, 1141084, 1136111, 1155084,\n", - " 1156348, 1156350, 1138514, 1153099, 1153092, 1137957, 1138584, 1154132,\n", - " 1154128, 1156899, 1156909, 1138309, 1137287, 1138436, 1138440, 1138451,\n", - " 1138461, 1138449, 1138462, 1137924, 1136594, 1138846, 1156603, 1156606,\n", - " 1147112, 1142611, 1142612, 1135352, 1135359, 1135347, 1135618, 1135631,\n", - " 1138185, 1145843, 1137108, 1137109, 1139667, 1139668, 1139673, 1138070,\n", - " 1134992, 1142788, 1152651, 1152654, 1136730, 1158974, 1139315, 1153543,\n", - " 1153544, 1139933, 1137587, 1138647, 1138648, 1141964, 1134891, 1141997,\n", - " 1141985, 1152042, 1152044, 1136057, 1137734, 1137728, 1134922, 1134750,\n", - " 1136993, 1137000, 1135549, 1140228, 1141088, 1141097, 1141098, 1144138,\n", - " 1149001, 1139889, 1139642, 1143767, 1137298, 1137299, 1143711, 1139025,\n", - " 1149982, 1146844, 1135860, 1136426, 1140470, 1141112, 1142929, 1139386,\n", - " 1136917, 1143667, 1143678, 1143677, 1140601, 1140597, 1141786, 1136760,\n", - " 1144650, 1137075, 1138482, 1141821, 1143158, 1143153, 1153666, 1148864,\n", - " 1138708, 1140110, 1142913, 1144596, 1157416, 1136867, 1145298, 1144039,\n", - " 1140885, 1144182, 1150906, 1143753, 1137854, 1147153, 1141365, 1153062,\n", - " 1153068, 1163674, 1139022, 1144279, 1139508, 1139510, 1139773, 1140093,\n", - " 1139127, 1144998, 1145000, 1145001, 1145213, 1143779, 1164531, 1147896,\n", - " 1140976, 1140990, 1135047, 1147050, 1147047, 1145872, 1145873, 1143543,\n", - " 1152976, 1141925, 1141931, 1146901, 1144242, 1141846, 1137149, 1140695,\n", - " 1136891, 1143639, 1137571, 1141378, 1145974, 1146024, 1138085, 1146140,\n", - " 1154328, 1141646, 1149928, 1139990, 1143293, 1143294, 1147543, 1147540,\n", - " 1148763, 1148760, 1147282, 1147293, 1149155, 1147461, 1149372, 1139408,\n", - " 1149608, 1143040, 1136160, 1136836, 1136843, 1139328, 1142149, 1142153,\n", - " 1143345, 1144765, 1144753, 1144615, 1140844, 1144083, 1138592, 1135876,\n", - " 1150756, 1144319, 1135813, 1150294, 1146523, 1143967, 1138018, 1143460,\n", - " 1143457, 1143007, 1144291, 1140492, 1143949, 1147574, 1146634, 1146637,\n", - " 1147521, 1140364, 1137990, 1168914, 1149489, 1148962, 1147984, 1147999,\n", - " 1134902, 1144013, 1139252, 1147244, 1148704, 1141327, 1148476, 1147056,\n", - " 1149718, 1147025, 1142858, 1147970, 1158226, 1158235, 1149871, 1141137,\n", - " 1154526, 1145240, 1145751, 1142378, 1146157, 1146145, 1138638, 1148397,\n", - " 1146178, 1151242, 1148214, 1152531, 1150274, 1150445, 1149263, 1147954,\n", - " 1149791, 1144514, 1154816, 1147794, 1147807, 1151473, 1152022, 1154271,\n", - " 1135504, 1139914, 1146731, 1149530, 1147019, 1147021, 1141267, 1141269,\n", - " 1154979, 1148453, 1148448, 1147653, 1143560, 1149412, 1152068, 1152073,\n", - " 1152079, 1137716, 1137724, 1148623, 1164894, 1147856, 1139088, 1139096,\n", - " 1154420, 1158795, 1148188, 1138404, 1152435, 1151560, 1148720, 1148734,\n", - " 1147627, 1149810, 1148204, 1154203, 1153124, 1153192, 1153188, 1145104,\n", - " 1152962, 1152965, 1150935, 1144863, 1155093, 1147442, 1151821, 1152581,\n", - " 1154183, 1148505, 1148503, 1141420, 1136002, 1151351, 1151352, 1146967,\n", - " 1156402, 1149359, 1150219, 1146623, 1144468, 1144477, 1144466, 1144476,\n", - " 1152100, 1152103, 1146280, 1156325, 1153027, 1153030, 1153032, 1153038,\n", - " 1145546, 1145551, 1137746, 1146304, 1140521, 1155146, 1155140, 1136401,\n", - " 1149203, 1152819, 1155334, 1154123, 1157835, 1157824, 1152673, 1151582,\n", - " 1151617, 1150578, 1136134, 1148927, 1140935, 1146816, 1156826, 1156816,\n", - " 1146708, 1138279, 1138281, 1136028, 1158712, 1158704, 1140687, 1152928,\n", - " 1151064, 1137401, 1153918, 1150150, 1150164, 1149273, 1153691, 1148040,\n", - " 1149300, 1148907, 1145649, 1149798, 1137048, 1137054, 1148628, 1148633,\n", - " 1158530, 1137458, 1142047, 1156720, 1157229, 1158860, 1158916, 1157064,\n", - " 1157069, 1155422, 1152833, 1145187, 1137814, 1150465, 1149052, 1135733,\n", - " 1152183, 1152182, 1156629, 1150817, 1156935, 1153413, 1153415, 1147810,\n", - " 1143010, 1151469, 1158304, 1158306, 1158311, 1151271, 1155441, 1155452,\n", - " 1150130, 1150132, 1140865, 1154529, 1145771, 1142755, 1156207, 1156271,\n", - " 1151383, 1151379, 1158639, 1156649, 1155122, 1152527, 1155752, 1155755,\n", - " 1155756, 1151425, 1151432, 1135406, 1146913, 1145793, 1156463, 1158096,\n", - " 1154755, 1154766, 1155626, 1155628, 1156563, 1154550, 1154555, 1155576,\n", - " 1136469, 1158817, 1158824, 1158325, 1158335, 1155646, 1143254, 1143257,\n", - " 1154644, 1146935, 1162396, 1154250, 1154240, 1162190, 1156713, 1139625,\n", - " 1143189, 1150371, 1153320, 1150987, 1143517, 1157928, 1157934, 1151030,\n", - " 1157653, 1157650, 1158126, 1153786, 1159116, 1145681, 1134677, 1134685,\n", - " 1138215, 1149145, 1159258, 1140633, 1155717, 1152220, 1156693, 1140381,\n", - " 1140374, 1156017, 1157735, 1159130, 1144843, 1155971, 1155975, 1159956,\n", - " 1158846, 1156811, 1156812, 1161897, 1155393, 1149700, 1136899, 1136896,\n", - " 1158881, 1158882, 1158815, 1156778, 1151615, 1136494, 1136491, 1147585,\n", - " 1155309, 1156490, 1153808, 1136640, 1136646, 1144127, 1134757, 1140049,\n", - " 1166424, 1158555, 1153825, 1153827, 1146126, 1159943, 1158006, 1144584,\n", - " 1155521, 1161539, 1142487, 1142493, 1142666, 1162417, 1159052, 1144258,\n", - " 1159071, 1160563, 1186580, 1153052, 1153045, 1167176, 1166243, 1159368,\n", - " 1153842, 1156107, 1138384, 1138393, 1150046, 1149063, 1145948, 1145945,\n", - " 1155480, 1147300, 1157600, 1138161, 1164006, 1156789, 1156795, 1149956,\n", - " 1163396, 1139286, 1139295, 1166073, 1159985, 1157234, 1171515, 1157351,\n", - " 1146063, 1160178, 1158878, 1148600, 1148603, 1159646, 1151876, 1151872,\n", - " 1163201, 1158653, 1158655, 1156184, 1156189, 1159025, 1159026, 1159032,\n", - " 1171373, 1165596, 1143737, 1160607, 1155588, 1155597, 1164610, 1173744,\n", - " 1144327, 1151223, 1151227, 1138679, 1168428, 1147830, 1164580, 1144739,\n", - " 1166882, 1168067, 1153209, 1141471, 1151650, 1147426, 1147427, 1157050,\n", - " 1156739, 1165182, 1150649, 1171040, 1168750, 1144810, 1144812, 1153270,\n", - " 1164750, 1142722, 1142733, 1156293, 1165636, 1144058, 1161758, 1167780,\n", - " 1145736, 1145915, 1145228, 1155317, 1166462, 1138766, 1144972, 1144973,\n", - " 1146433, 1143038, 1165458, 1165746, 1147355, 1170502, 1170949, 1170952,\n", - " 1152624, 1139351, 1147723, 1147724, 1145902, 1153520, 1153534, 1152204,\n", - " 1175240, 1143402, 1149552, 1158724, 1158734, 1167503, 1154075, 1154076,\n", - " 1147330, 1145667, 1145674, 1192401, 1149130, 1169602, 1167817, 1193345,\n", - " 1155172, 1165023, 1165011, 1150515, 1150522, 1150518, 1156119, 1144346,\n", - " 1144336, 1157534, 1138382, 1138369, 1147746, 1154670, 1135845, 1169162,\n", - " 1157331, 1141051, 1141043, 1151664, 1147491, 1138609, 1158146, 1158154,\n", - " 1158611, 1158623, 1158054, 1157379, 1157380, 1165900, 1154871, 1165322,\n", - " 1155494, 1152353, 1152545, 1168451, 1149402, 1148666, 1148335, 1148324,\n", - " 1177984, 1168906, 1147504, 1173307, 1189233, 1169144, 1154027, 1169572,\n", - " 1151208, 1157153, 1167232, 1147711, 1148128, 1157598, 1181019, 1168691,\n", - " 1168817, 1168604, 1175418, 1140326, 1140330, 1166028, 1143240, 1160150,\n", - " 1178201, 1159091, 1181765, 1181772, 1177177, 1150234, 1161588, 1154151,\n", - " 1154148, 1149169, 1149176, 1172461, 1184634, 1178610, 1186117, 1143279,\n", - " 1168481, 1143420, 1179243, 1177262, 1184597, 1153792, 1153803, 1178171,\n", - " 1153141, 1181678, 1164826, 1177155, 1161024, 1153628, 1183135, 1180916,\n", - " 1184093, 1151519, 1168779, 1158030, 1161255, 1155262, 1154705, 1157792,\n", - " 1157795, 1171623, 1164044, 1155799, 1190803, 1157124, 1157133, 1157992,\n", - " 1157991, 1182011, 1153889, 1153898, 1153902, 1154500, 1182486, 1160009,\n", - " 1145626, 1178028, 1161911, 1149755, 1181345, 1186052, 1181143, 1158512,\n", - " 1158513, 1158379, 1155899, 1184317, 1164798, 1162253, 1180517, 1168621,\n", - " 1187382, 1188723, 1146161, 1141516, 1182318, 1171015, 1156528, 1190733,\n", - " 1165024, 1139828, 1139831, 1139837, 1150265, 1154812, 1149668, 1194512,\n", - " 1156055, 1180127, 1146392, 1146394, 1146395, 1173058, 1194023, 1186703,\n", - " 1166325, 1183383, 1190444, 1193456, 1188912, 1151774, 1153733, 1169781,\n", - " 1169707, 1166841, 1166838, 1173330, 1171201, 1150406, 1161186, 1194059,\n", - " 1156681, 1172423, 1178135, 1152092, 1155959, 1155962, 1174034, 1179768,\n", - " 1179769, 1183297, 1188305, 1181033, 1184941, 1157022], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197719, 1198725, 1195860, 1199282, 1201577, 1201462, 1199278, 1202119,\n", - " 1194626, 1200644, 1197791, 1201015, 1201016, 1197512, 1194879, 1198188,\n", - " 1194770, 1194783, 1194648, 1195263, 1201992, 1196030, 1198543, 1197697,\n", - " 1201427, 1199519, 1198095, 1194952, 1194880, 1195895, 1202899, 1195740,\n", - " 1196334, 1196359, 1199371, 1195148, 1195223, 1195265, 1195278, 1197367,\n", - " 1196109, 1198219, 1195038, 1195659, 1195541, 1198203, 1196122, 1197640,\n", - " 1195918, 1200949, 1200959, 1199060, 1197291, 1199185, 1196851, 1194928,\n", - " 1195119, 1197583, 1199685, 1199628, 1202379, 1197990, 1198400, 1200748,\n", - " 1199231, 1201908, 1194795, 1201511, 1196501, 1199018, 1199021, 1195807,\n", - " 1197601, 1201117, 1196727, 1195773, 1198416, 1198428, 1198811, 1199555,\n", - " 1201827, 1200503, 1200507, 1198593, 1201156, 1202630, 1201056, 1200913,\n", - " 1200918, 1200363, 1201737, 1200521, 1202043, 1199532, 1200546, 1200553,\n", - " 1200429, 1199886, 1199887, 1202138, 1199908, 1196779, 1202239, 1202338,\n", - " 1202175, 1197546, 1195876, 1201291, 1201871, 1199929, 1201800, 1200997,\n", - " 1200785, 1195431, 1203113, 1195664, 1200684, 1198901, 1198911, 1201786,\n", - " 1195181, 1200928, 1197816, 1197822, 1197821, 1201499, 1196597, 1197406,\n", - " 1198973, 1195280, 1199659, 1199469, 1198147, 1197735, 1200437, 1201001,\n", - " 1201196, 1195066, 1201879, 1201886, 1200301, 1197652, 1197655, 1197343,\n", - " 1195082, 1197039, 1201877, 1203162], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197719, 1198725, 1195860, 1199282, 1201577, 1201462, 1199278, 1202119,\n", - " 1194626, 1200644, 1197791, 1201015, 1201016, 1197512, 1194879, 1198188,\n", - " 1194770, 1194783, 1194648, 1195263, 1201992, 1196030, 1198543, 1197697,\n", - " 1201427, 1199519, 1198095, 1194952, 1194880, 1195895, 1202899, 1195740,\n", - " 1196334, 1196359, 1199371, 1195148, 1195223, 1195265, 1195278, 1197367,\n", - " 1196109, 1198219, 1195038, 1195659, 1195541, 1198203, 1196122, 1197640,\n", - " 1195918, 1200949, 1200959, 1199060, 1197291, 1199185, 1196851, 1194928,\n", - " 1195119, 1197583, 1199685, 1199628, 1202379, 1197990, 1198400, 1200748,\n", - " 1199231, 1201908, 1194795, 1201511, 1196501, 1199018, 1199021, 1195807,\n", - " 1197601, 1201117, 1196727, 1195773, 1198416, 1198428, 1198811, 1199555,\n", - " 1201827, 1200503, 1200507, 1198593, 1201156, 1202630, 1201056, 1200913,\n", - " 1200918, 1200363, 1201737, 1200521, 1202043, 1199532, 1200546, 1200553,\n", - " 1200429, 1199886, 1199887, 1202138, 1199908, 1196779, 1202239, 1202338,\n", - " 1202175, 1197546, 1195876, 1201291, 1201871, 1199929, 1201800, 1200997,\n", - " 1200785, 1195431, 1203113, 1195664, 1200684, 1198901, 1198911, 1201786,\n", - " 1195181, 1200928, 1197816, 1197822, 1197821, 1201499, 1196597, 1197406,\n", - " 1198973, 1195280, 1199659, 1199469, 1198147, 1197735, 1200437, 1201001,\n", - " 1201196, 1195066, 1201879, 1201886, 1200301, 1197652, 1197655, 1197343,\n", - " 1195082, 1197039, 1201877, 1203162], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 2.2190e-01, -2.9643e-04, 6.8702e-01, ..., 6.0376e-02,\n", - " -1.7294e-03, -5.1916e-03],\n", - " [ 1.3659e-01, -3.0611e-04, 5.0116e-01, ..., 8.5440e-02,\n", - " -1.8291e-03, -3.8336e-03],\n", - " [ 1.3521e-01, -2.7193e-05, 5.2084e-01, ..., 5.6667e-02,\n", - " -1.4402e-03, -3.7342e-03],\n", - " ...,\n", - " [ 1.5370e-01, -5.2390e-04, 5.4426e-01, ..., 8.6551e-02,\n", - " -1.9719e-03, -4.2379e-03],\n", - " [ 1.3815e-01, -4.6317e-04, 5.2167e-01, ..., 8.0078e-02,\n", - " -1.7564e-03, -3.9690e-03],\n", - " [ 3.0830e-01, -6.6109e-04, 8.9918e-01, ..., 5.4877e-02,\n", - " -1.5197e-03, -6.6904e-03]], device='cuda:0'), 'paper': tensor([[-1.7755e-03, 8.1362e-01, 4.6639e-01, ..., -1.1908e-02,\n", - " -1.9373e-02, -3.3049e-03],\n", - " [-2.5989e-02, 5.3035e-01, 2.6410e+00, ..., -1.1773e-02,\n", - " -2.9264e-02, -3.3874e-02],\n", - " [-8.4460e-03, 1.5612e+00, 2.4955e+00, ..., 3.3666e-01,\n", - " -3.1297e-02, -2.3812e-03],\n", - " ...,\n", - " [-1.4154e-02, 1.2589e+00, 1.2971e+00, ..., 6.4665e-01,\n", - " -2.5337e-02, -1.3085e-02],\n", - " [-2.2448e-02, -1.7366e-03, 2.1706e+00, ..., -1.0820e-02,\n", - " -2.7125e-02, -3.2089e-02],\n", - " [-7.6908e-03, 3.4400e+00, 2.1250e+00, ..., 4.8148e+00,\n", - " -5.0230e-02, 2.6402e+00]], device='cuda:0'), 'author': tensor([[-1.2460e-03, 1.7343e-01, 2.3474e-01, ..., 1.3358e+00,\n", - " 3.2012e-01, -6.8377e-04],\n", - " [-3.6925e-03, 2.5982e-01, 1.8030e-01, ..., 1.1523e+00,\n", - " -1.9580e-03, -5.3305e-03],\n", - " [-1.0739e-03, 2.1111e-01, 1.5257e-01, ..., 1.2862e+00,\n", - " 5.5421e-01, -2.3579e-04],\n", - " ...,\n", - " [-1.7663e-03, 3.2159e-01, 4.5293e-02, ..., 1.3118e+00,\n", - " 2.6670e-01, -1.1134e-03],\n", - " [-1.5535e-03, 1.6750e-01, 1.8119e-01, ..., 1.2777e+00,\n", - " 2.7676e-01, -1.2060e-03],\n", - " [-9.4491e-04, 2.0106e-01, 1.6584e-01, ..., 1.2616e+00,\n", - " 3.6609e-01, -4.0269e-04]], device='cuda:0'), 'field_of_study': tensor([[-0.0020, 0.5824, 0.1733, ..., -0.0088, 0.3973, 0.4810],\n", - " [-0.0033, 0.6516, 0.2372, ..., -0.0078, 0.2553, 0.5179],\n", - " [-0.0026, 0.5272, 0.1245, ..., -0.0075, 0.4058, 0.4504],\n", - " ...,\n", - " [-0.0025, 0.5709, 0.2101, ..., -0.0079, 0.2427, 0.4656],\n", - " [-0.0007, 0.6216, 0.3088, ..., -0.0105, 0.4703, 0.3949],\n", - " [ 0.0894, 0.6140, 0.2660, ..., -0.0097, 0.4034, 0.1083]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 166, 117, 221, 221, 253, 253, 457, 457, 330, 457, 378, 417,\n", - " 417, 817, 911, 911, 1064, 1097, 969, 823, 1167, 940, 1247, 1247,\n", - " 1003, 1095, 1678, 1434, 1551, 1460, 1444, 1444, 1420, 1464, 1444, 1444,\n", - " 1444, 1636, 1444, 1441, 1441, 1441, 1755, 1668, 1668, 1862, 1645, 1866,\n", - " 1901, 1901, 1901, 1752, 1752, 1825, 1825, 1814, 1887, 1969, 2112, 2116,\n", - " 2132, 2166, 2166, 2112, 2348, 2306, 2319, 2319, 2319, 2320, 2319, 2320,\n", - " 2320, 2274, 2567, 2590, 2463, 2463, 2494, 2494, 2621, 2645, 2600, 2600,\n", - " 2894, 2766, 2846, 2846, 2878, 2878, 2893, 2893, 2767, 2767, 2896, 2896,\n", - " 2896, 3413, 3413, 3102, 3247, 3230, 3122, 3101, 3101, 3101, 3101, 3101,\n", - " 2857, 3243, 3145, 3241, 3004, 3069, 3276, 3220, 3278, 3375, 3329, 3545,\n", - " 3287, 3540, 3550, 3646, 3646, 3660, 3826, 3686, 3660, 3660, 3670, 3914,\n", - " 3778, 3778, 4099, 4099, 3883, 3916, 3916, 4001, 3891, 4048, 4038, 4223,\n", - " 4130, 4128, 4128, 4128, 4272, 4314, 4314, 4452, 4452, 4520, 4502, 4500,\n", - " 4603, 4567, 4567, 4738, 4706, 4679, 4662, 4662, 4694, 4841, 4738, 4738,\n", - " 5094, 4860, 5314, 5314, 5047, 5274, 5411, 5489, 5684, 5709, 5613, 5510,\n", - " 5899, 5961, 5862, 5862, 5862, 5880, 5800, 5788, 6030, 5627, 5627, 5627,\n", - " 5627, 5797, 5797, 5797, 5991, 6084, 6147, 6147, 6264, 6264, 6264, 5850,\n", - " 5850, 5975, 5987, 6138, 6159, 6178, 6600, 6631, 6458, 6496, 6607, 6607,\n", - " 6479],\n", - " [ 55, 143, 9, 11, 100, 4, 64, 72, 56, 36, 134, 119,\n", - " 27, 1, 121, 106, 5, 50, 43, 111, 21, 19, 114, 123,\n", - " 126, 49, 74, 132, 27, 74, 58, 130, 86, 27, 32, 64,\n", - " 29, 10, 35, 110, 138, 30, 53, 135, 77, 53, 48, 28,\n", - " 47, 71, 123, 51, 101, 14, 129, 41, 99, 89, 69, 39,\n", - " 66, 117, 87, 140, 26, 23, 89, 8, 122, 55, 0, 105,\n", - " 61, 79, 8, 129, 67, 90, 2, 103, 37, 8, 17, 73,\n", - " 110, 122, 59, 54, 92, 91, 89, 113, 135, 98, 16, 94,\n", - " 102, 80, 75, 74, 74, 112, 34, 20, 106, 3, 121, 15,\n", - " 145, 46, 95, 13, 63, 18, 53, 136, 115, 57, 76, 6,\n", - " 118, 124, 59, 135, 77, 77, 65, 116, 128, 86, 127, 7,\n", - " 50, 133, 16, 55, 135, 142, 97, 44, 144, 4, 78, 53,\n", - " 70, 0, 24, 135, 125, 3, 84, 135, 77, 64, 74, 127,\n", - " 46, 88, 114, 45, 141, 146, 94, 102, 102, 55, 96, 81,\n", - " 108, 107, 25, 61, 12, 78, 16, 85, 64, 57, 78, 82,\n", - " 100, 74, 120, 27, 52, 131, 86, 22, 139, 104, 107, 80,\n", - " 75, 102, 72, 60, 50, 126, 137, 33, 68, 40, 93, 107,\n", - " 51, 83, 74, 74, 10, 147, 38, 61, 42, 75, 31, 62,\n", - " 109]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1574, 1328, 1801, ..., 1753, 413, 3176],\n", - " [ 126, 11, 126, ..., 7977, 7994, 7907]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 75, 79, 79, ..., 92, 16, 16],\n", - " [ 12, 109, 144, ..., 6687, 6612, 6641]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 12, 12, 12, ..., 7860, 7944, 7944],\n", - " [ 249, 250, 324, ..., 641, 261, 31]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 590, 324, 883, ..., 730, 249, 248],\n", - " [ 112, 85, 198, ..., 7968, 7943, 7980]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[3893, 6756, 5791, ..., 3364, 5037, 5733],\n", - " [ 108, 81, 215, ..., 6610, 6640, 6655]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 179, 12, 12, ..., 7944, 7944, 7944],\n", - " [5845, 133, 2729, ..., 5180, 6020, 6367]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 146, 146, 146, ..., 6600, 6631, 6631],\n", - " [3904, 5033, 5066, ..., 5668, 338, 646]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.003618\n", - "sampling 0.003537\n", - "noi time: 0.000688\n", - "get_vertex_data call: 0.013841\n", - "noi group time: 0.001783\n", - "eoi_group_time: 0.011014\n", - "second half: 0.129893\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27122, 31571, 23798, ..., 1133072, 1120124, 1118697],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27122, 31571, 23798, ..., 1133072, 1120124, 1118697],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224370, 1224382, 1211783, ..., 1934142, 1925032, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224370, 1224382, 1211783, ..., 1934142, 1925032, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136510, 1141424, 1136228, 1136230, 1140785, 1139698, 1141756, 1136208,\n", - " 1136212, 1140297, 1136963, 1136969, 1136971, 1139808, 1145992, 1145999,\n", - " 1139141, 1143372, 1143363, 1139241, 1146641, 1146647, 1149216, 1149228,\n", - " 1142959, 1147942, 1155683, 1155689, 1143820, 1147473, 1147483, 1149038,\n", - " 1134700, 1148337, 1146656, 1148546, 1153220, 1153231, 1147089, 1155014,\n", - " 1147211, 1136676, 1136685, 1150324, 1152427, 1134806, 1151545, 1138112,\n", - " 1137254, 1137257, 1151531, 1140159, 1135913, 1140949, 1140954, 1135367,\n", - " 1135202, 1140765, 1154739, 1134965, 1134960, 1141036, 1134794, 1136518,\n", - " 1138504, 1136178, 1143064, 1157103, 1137693, 1136609, 1144395, 1137529,\n", - " 1157395, 1157405, 1157397, 1152376, 1136662, 1143317, 1136195, 1136204,\n", - " 1156159, 1156150, 1148481, 1148484, 1139161, 1134841, 1141702, 1135583,\n", - " 1148860, 1135670, 1140970, 1140712, 1156342, 1153099, 1137957, 1138590,\n", - " 1138305, 1157703, 1138436, 1138440, 1138445, 1138443, 1138451, 1138461,\n", - " 1138449, 1154787, 1136594, 1138881, 1156603, 1156606, 1147119, 1142611,\n", - " 1135631, 1156141, 1145843, 1148531, 1150956, 1139846, 1139667, 1134992,\n", - " 1136551, 1148805, 1158974, 1142906, 1142909, 1141069, 1153548, 1140034,\n", - " 1139929, 1137587, 1137598, 1141963, 1153396, 1155648, 1146075, 1152042,\n", - " 1152044, 1137734, 1137728, 1147316, 1135547, 1136695, 1140228, 1141100,\n", - " 1144130, 1139898, 1139889, 1141980, 1143767, 1152711, 1141115, 1142932,\n", - " 1141891, 1139386, 1136917, 1140598, 1140607, 1141785, 1141786, 1152725,\n", - " 1139495, 1168566, 1141609, 1144650, 1147850, 1137072, 1137074, 1142050,\n", - " 1141821, 1143153, 1146787, 1153666, 1145161, 1140160, 1158746, 1158749,\n", - " 1138469, 1141479, 1138708, 1140110, 1142913, 1137661, 1137662, 1143113,\n", - " 1144596, 1141574, 1140885, 1144182, 1150906, 1139559, 1158698, 1147153,\n", - " 1142640, 1141365, 1141367, 1141664, 1149101, 1144279, 1139510, 1139773,\n", - " 1138815, 1139127, 1145200, 1140619, 1140985, 1140990, 1147050, 1145873,\n", - " 1149876, 1143543, 1143551, 1152976, 1152980, 1135457, 1141925, 1146898,\n", - " 1144245, 1144242, 1140585, 1150692, 1140690, 1136891, 1143643, 1134851,\n", - " 1143851, 1146019, 1146024, 1138085, 1146140, 1154328, 1149928, 1149930,\n", - " 1141235, 1139990, 1146302, 1143293, 1143283, 1143294, 1150417, 1147543,\n", - " 1147545, 1148763, 1147282, 1147290, 1142816, 1136330, 1140341, 1143663,\n", - " 1142637, 1149366, 1149372, 1143051, 1136160, 1157720, 1136836, 1144768,\n", - " 1141496, 1144957, 1143345, 1144765, 1144619, 1145808, 1140844, 1137098,\n", - " 1135876, 1146523, 1143456, 1143470, 1143457, 1143937, 1146636, 1147530,\n", - " 1140360, 1140364, 1143082, 1149490, 1166410, 1144219, 1147984, 1147999,\n", - " 1146949, 1134902, 1139252, 1139249, 1147131, 1154481, 1148704, 1141319,\n", - " 1148468, 1153701, 1152328, 1147263, 1147970, 1139549, 1158226, 1158231,\n", - " 1158238, 1147880, 1154526, 1145240, 1145751, 1142370, 1142369, 1146159,\n", - " 1138626, 1138635, 1148394, 1146178, 1146188, 1148214, 1148223, 1150274,\n", - " 1150438, 1150445, 1149791, 1144526, 1138044, 1150342, 1151994, 1165252,\n", - " 1147794, 1151480, 1139906, 1146723, 1142286, 1150113, 1147021, 1147009,\n", - " 1153152, 1158944, 1141949, 1148744, 1149991, 1147653, 1143564, 1148300,\n", - " 1154430, 1154420, 1158798, 1151363, 1152561, 1136247, 1139721, 1146682,\n", - " 1152435, 1157968, 1148720, 1148725, 1148729, 1144110, 1146549, 1148204,\n", - " 1153124, 1153197, 1168628, 1150932, 1143092, 1150356, 1148084, 1143129,\n", - " 1143133, 1147447, 1151816, 1152581, 1135307, 1135309, 1151917, 1148498,\n", - " 1146571, 1146565, 1141420, 1151345, 1155152, 1147737, 1155059, 1146975,\n", - " 1149359, 1146623, 1144468, 1152409, 1146287, 1150080, 1150090, 1145539,\n", - " 1137746, 1146304, 1155140, 1136401, 1136402, 1152826, 1155337, 1154119,\n", - " 1152673, 1151580, 1151582, 1151573, 1151621, 1151617, 1145278, 1136134,\n", - " 1136140, 1151440, 1148916, 1153387, 1145966, 1152233, 1152903, 1152341,\n", - " 1152342, 1156826, 1156816, 1153311, 1136023, 1136028, 1158704, 1151064,\n", - " 1143476, 1137396, 1160557, 1148033, 1148040, 1149300, 1148628, 1158530,\n", - " 1137458, 1149942, 1149947, 1153074, 1153085, 1142041, 1143444, 1157547,\n", - " 1142385, 1158916, 1158920, 1152397, 1157069, 1157071, 1155408, 1155418,\n", - " 1137814, 1139473, 1138830, 1156638, 1157914, 1153413, 1147810, 1158308,\n", - " 1158311, 1151271, 1151342, 1155441, 1161738, 1153359, 1162120, 1144361,\n", - " 1154530, 1154542, 1156919, 1142755, 1156207, 1151379, 1137918, 1155122,\n", - " 1155123, 1157174, 1149321, 1155755, 1151431, 1135396, 1135406, 1145806,\n", - " 1156460, 1154763, 1155626, 1155628, 1155630, 1156563, 1158824, 1158325,\n", - " 1155646, 1143254, 1143263, 1154240, 1156711, 1143188, 1143189, 1150371,\n", - " 1153325, 1157424, 1150068, 1143508, 1159629, 1137152, 1158578, 1153786,\n", - " 1149907, 1134677, 1134683, 1135601, 1145514, 1145515, 1148148, 1148149,\n", - " 1148159, 1150671, 1157684, 1146325, 1149138, 1156092, 1152220, 1152498,\n", - " 1140380, 1140381, 1156016, 1144843, 1142471, 1155971, 1155975, 1155393,\n", - " 1155404, 1154600, 1160163, 1153503, 1136905, 1136896, 1158753, 1158882,\n", - " 1158886, 1158891, 1140222, 1158815, 1158442, 1156778, 1156779, 1152463,\n", - " 1151615, 1136494, 1164181, 1153635, 1159241, 1147586, 1155301, 1183098,\n", - " 1157249, 1136640, 1134757, 1140049, 1166421, 1158545, 1158558, 1156516,\n", - " 1154339, 1154345, 1158006, 1155521, 1155529, 1155528, 1161539, 1164272,\n", - " 1142663, 1142666, 1159052, 1144258, 1164335, 1159146, 1160563, 1162044,\n", - " 1153043, 1153052, 1153045, 1167172, 1162835, 1155769, 1142875, 1153841,\n", - " 1153842, 1138393, 1160646, 1149063, 1149070, 1145948, 1153514, 1162358,\n", - " 1164012, 1156787, 1149963, 1139295, 1140735, 1146059, 1171249, 1164052,\n", - " 1170415, 1169493, 1148600, 1148603, 1148607, 1168082, 1164979, 1170236,\n", - " 1151875, 1155816, 1158643, 1158653, 1159032, 1152247, 1163972, 1160600,\n", - " 1155588, 1151227, 1138679, 1153924, 1153931, 1153932, 1147397, 1147836,\n", - " 1146500, 1146509, 1153239, 1144739, 1155268, 1165415, 1141471, 1141459,\n", - " 1147427, 1159386, 1156737, 1156739, 1153663, 1150648, 1163260, 1150308,\n", - " 1144810, 1144812, 1153271, 1168850, 1135554, 1164741, 1148675, 1169282,\n", - " 1154700, 1146038, 1144971, 1144972, 1144973, 1145447, 1147355, 1170502,\n", - " 1155915, 1155908, 1139351, 1139345, 1193479, 1145892, 1145902, 1152203,\n", - " 1175240, 1143402, 1149557, 1158730, 1171279, 1154076, 1147338, 1144696,\n", - " 1145674, 1159273, 1169602, 1166653, 1155180, 1155170, 1166198, 1150518,\n", - " 1144336, 1157331, 1141045, 1141051, 1151664, 1151674, 1154364, 1146350,\n", - " 1138609, 1158610, 1158623, 1158618, 1172753, 1157385, 1165903, 1147414,\n", - " 1147423, 1155502, 1152360, 1179588, 1152546, 1143858, 1167023, 1145033,\n", - " 1160936, 1154027, 1154028, 1157158, 1157153, 1147711, 1151850, 1148128,\n", - " 1148131, 1157588, 1157593, 1170490, 1177601, 1180306, 1171609, 1166532,\n", - " 1166682, 1150234, 1150238, 1154148, 1149183, 1185664, 1171297, 1170965,\n", - " 1153792, 1153803, 1153141, 1180822, 1153628, 1185146, 1151519, 1179807,\n", - " 1161255, 1155249, 1177581, 1176784, 1154718, 1157792, 1157803, 1143341,\n", - " 1151488, 1171623, 1178706, 1158253, 1153898, 1134655, 1178214, 1145626,\n", - " 1154840, 1157483, 1182265, 1184253, 1149755, 1146242, 1146252, 1153601,\n", - " 1157761, 1158779, 1155892, 1155902, 1157272, 1183642, 1165474, 1161405,\n", - " 1164437, 1163422, 1184287, 1181469, 1146161, 1176704, 1180017, 1141506,\n", - " 1186367, 1183021, 1192742, 1139831, 1150265, 1167135, 1154812, 1149668,\n", - " 1191531, 1190579, 1186415, 1156049, 1156055, 1151977, 1182704, 1189273,\n", - " 1146394, 1146395, 1173058, 1190922, 1149539, 1186691, 1191686, 1156840,\n", - " 1193286, 1182060, 1190438, 1189259, 1162156, 1186686, 1151774, 1153743,\n", - " 1169703, 1166840, 1166841, 1189008, 1170142, 1175349, 1174572, 1150406,\n", - " 1156681, 1172429, 1158066, 1178038, 1172710, 1184445, 1179750, 1155962,\n", - " 1172187, 1187676, 1162656, 1162670, 1194153, 1169098, 1157008],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136510, 1141424, 1136228, 1136230, 1140785, 1139698, 1141756, 1136208,\n", - " 1136212, 1140297, 1136963, 1136969, 1136971, 1139808, 1145992, 1145999,\n", - " 1139141, 1143372, 1143363, 1139241, 1146641, 1146647, 1149216, 1149228,\n", - " 1142959, 1147942, 1155683, 1155689, 1143820, 1147473, 1147483, 1149038,\n", - " 1134700, 1148337, 1146656, 1148546, 1153220, 1153231, 1147089, 1155014,\n", - " 1147211, 1136676, 1136685, 1150324, 1152427, 1134806, 1151545, 1138112,\n", - " 1137254, 1137257, 1151531, 1140159, 1135913, 1140949, 1140954, 1135367,\n", - " 1135202, 1140765, 1154739, 1134965, 1134960, 1141036, 1134794, 1136518,\n", - " 1138504, 1136178, 1143064, 1157103, 1137693, 1136609, 1144395, 1137529,\n", - " 1157395, 1157405, 1157397, 1152376, 1136662, 1143317, 1136195, 1136204,\n", - " 1156159, 1156150, 1148481, 1148484, 1139161, 1134841, 1141702, 1135583,\n", - " 1148860, 1135670, 1140970, 1140712, 1156342, 1153099, 1137957, 1138590,\n", - " 1138305, 1157703, 1138436, 1138440, 1138445, 1138443, 1138451, 1138461,\n", - " 1138449, 1154787, 1136594, 1138881, 1156603, 1156606, 1147119, 1142611,\n", - " 1135631, 1156141, 1145843, 1148531, 1150956, 1139846, 1139667, 1134992,\n", - " 1136551, 1148805, 1158974, 1142906, 1142909, 1141069, 1153548, 1140034,\n", - " 1139929, 1137587, 1137598, 1141963, 1153396, 1155648, 1146075, 1152042,\n", - " 1152044, 1137734, 1137728, 1147316, 1135547, 1136695, 1140228, 1141100,\n", - " 1144130, 1139898, 1139889, 1141980, 1143767, 1152711, 1141115, 1142932,\n", - " 1141891, 1139386, 1136917, 1140598, 1140607, 1141785, 1141786, 1152725,\n", - " 1139495, 1168566, 1141609, 1144650, 1147850, 1137072, 1137074, 1142050,\n", - " 1141821, 1143153, 1146787, 1153666, 1145161, 1140160, 1158746, 1158749,\n", - " 1138469, 1141479, 1138708, 1140110, 1142913, 1137661, 1137662, 1143113,\n", - " 1144596, 1141574, 1140885, 1144182, 1150906, 1139559, 1158698, 1147153,\n", - " 1142640, 1141365, 1141367, 1141664, 1149101, 1144279, 1139510, 1139773,\n", - " 1138815, 1139127, 1145200, 1140619, 1140985, 1140990, 1147050, 1145873,\n", - " 1149876, 1143543, 1143551, 1152976, 1152980, 1135457, 1141925, 1146898,\n", - " 1144245, 1144242, 1140585, 1150692, 1140690, 1136891, 1143643, 1134851,\n", - " 1143851, 1146019, 1146024, 1138085, 1146140, 1154328, 1149928, 1149930,\n", - " 1141235, 1139990, 1146302, 1143293, 1143283, 1143294, 1150417, 1147543,\n", - " 1147545, 1148763, 1147282, 1147290, 1142816, 1136330, 1140341, 1143663,\n", - " 1142637, 1149366, 1149372, 1143051, 1136160, 1157720, 1136836, 1144768,\n", - " 1141496, 1144957, 1143345, 1144765, 1144619, 1145808, 1140844, 1137098,\n", - " 1135876, 1146523, 1143456, 1143470, 1143457, 1143937, 1146636, 1147530,\n", - " 1140360, 1140364, 1143082, 1149490, 1166410, 1144219, 1147984, 1147999,\n", - " 1146949, 1134902, 1139252, 1139249, 1147131, 1154481, 1148704, 1141319,\n", - " 1148468, 1153701, 1152328, 1147263, 1147970, 1139549, 1158226, 1158231,\n", - " 1158238, 1147880, 1154526, 1145240, 1145751, 1142370, 1142369, 1146159,\n", - " 1138626, 1138635, 1148394, 1146178, 1146188, 1148214, 1148223, 1150274,\n", - " 1150438, 1150445, 1149791, 1144526, 1138044, 1150342, 1151994, 1165252,\n", - " 1147794, 1151480, 1139906, 1146723, 1142286, 1150113, 1147021, 1147009,\n", - " 1153152, 1158944, 1141949, 1148744, 1149991, 1147653, 1143564, 1148300,\n", - " 1154430, 1154420, 1158798, 1151363, 1152561, 1136247, 1139721, 1146682,\n", - " 1152435, 1157968, 1148720, 1148725, 1148729, 1144110, 1146549, 1148204,\n", - " 1153124, 1153197, 1168628, 1150932, 1143092, 1150356, 1148084, 1143129,\n", - " 1143133, 1147447, 1151816, 1152581, 1135307, 1135309, 1151917, 1148498,\n", - " 1146571, 1146565, 1141420, 1151345, 1155152, 1147737, 1155059, 1146975,\n", - " 1149359, 1146623, 1144468, 1152409, 1146287, 1150080, 1150090, 1145539,\n", - " 1137746, 1146304, 1155140, 1136401, 1136402, 1152826, 1155337, 1154119,\n", - " 1152673, 1151580, 1151582, 1151573, 1151621, 1151617, 1145278, 1136134,\n", - " 1136140, 1151440, 1148916, 1153387, 1145966, 1152233, 1152903, 1152341,\n", - " 1152342, 1156826, 1156816, 1153311, 1136023, 1136028, 1158704, 1151064,\n", - " 1143476, 1137396, 1160557, 1148033, 1148040, 1149300, 1148628, 1158530,\n", - " 1137458, 1149942, 1149947, 1153074, 1153085, 1142041, 1143444, 1157547,\n", - " 1142385, 1158916, 1158920, 1152397, 1157069, 1157071, 1155408, 1155418,\n", - " 1137814, 1139473, 1138830, 1156638, 1157914, 1153413, 1147810, 1158308,\n", - " 1158311, 1151271, 1151342, 1155441, 1161738, 1153359, 1162120, 1144361,\n", - " 1154530, 1154542, 1156919, 1142755, 1156207, 1151379, 1137918, 1155122,\n", - " 1155123, 1157174, 1149321, 1155755, 1151431, 1135396, 1135406, 1145806,\n", - " 1156460, 1154763, 1155626, 1155628, 1155630, 1156563, 1158824, 1158325,\n", - " 1155646, 1143254, 1143263, 1154240, 1156711, 1143188, 1143189, 1150371,\n", - " 1153325, 1157424, 1150068, 1143508, 1159629, 1137152, 1158578, 1153786,\n", - " 1149907, 1134677, 1134683, 1135601, 1145514, 1145515, 1148148, 1148149,\n", - " 1148159, 1150671, 1157684, 1146325, 1149138, 1156092, 1152220, 1152498,\n", - " 1140380, 1140381, 1156016, 1144843, 1142471, 1155971, 1155975, 1155393,\n", - " 1155404, 1154600, 1160163, 1153503, 1136905, 1136896, 1158753, 1158882,\n", - " 1158886, 1158891, 1140222, 1158815, 1158442, 1156778, 1156779, 1152463,\n", - " 1151615, 1136494, 1164181, 1153635, 1159241, 1147586, 1155301, 1183098,\n", - " 1157249, 1136640, 1134757, 1140049, 1166421, 1158545, 1158558, 1156516,\n", - " 1154339, 1154345, 1158006, 1155521, 1155529, 1155528, 1161539, 1164272,\n", - " 1142663, 1142666, 1159052, 1144258, 1164335, 1159146, 1160563, 1162044,\n", - " 1153043, 1153052, 1153045, 1167172, 1162835, 1155769, 1142875, 1153841,\n", - " 1153842, 1138393, 1160646, 1149063, 1149070, 1145948, 1153514, 1162358,\n", - " 1164012, 1156787, 1149963, 1139295, 1140735, 1146059, 1171249, 1164052,\n", - " 1170415, 1169493, 1148600, 1148603, 1148607, 1168082, 1164979, 1170236,\n", - " 1151875, 1155816, 1158643, 1158653, 1159032, 1152247, 1163972, 1160600,\n", - " 1155588, 1151227, 1138679, 1153924, 1153931, 1153932, 1147397, 1147836,\n", - " 1146500, 1146509, 1153239, 1144739, 1155268, 1165415, 1141471, 1141459,\n", - " 1147427, 1159386, 1156737, 1156739, 1153663, 1150648, 1163260, 1150308,\n", - " 1144810, 1144812, 1153271, 1168850, 1135554, 1164741, 1148675, 1169282,\n", - " 1154700, 1146038, 1144971, 1144972, 1144973, 1145447, 1147355, 1170502,\n", - " 1155915, 1155908, 1139351, 1139345, 1193479, 1145892, 1145902, 1152203,\n", - " 1175240, 1143402, 1149557, 1158730, 1171279, 1154076, 1147338, 1144696,\n", - " 1145674, 1159273, 1169602, 1166653, 1155180, 1155170, 1166198, 1150518,\n", - " 1144336, 1157331, 1141045, 1141051, 1151664, 1151674, 1154364, 1146350,\n", - " 1138609, 1158610, 1158623, 1158618, 1172753, 1157385, 1165903, 1147414,\n", - " 1147423, 1155502, 1152360, 1179588, 1152546, 1143858, 1167023, 1145033,\n", - " 1160936, 1154027, 1154028, 1157158, 1157153, 1147711, 1151850, 1148128,\n", - " 1148131, 1157588, 1157593, 1170490, 1177601, 1180306, 1171609, 1166532,\n", - " 1166682, 1150234, 1150238, 1154148, 1149183, 1185664, 1171297, 1170965,\n", - " 1153792, 1153803, 1153141, 1180822, 1153628, 1185146, 1151519, 1179807,\n", - " 1161255, 1155249, 1177581, 1176784, 1154718, 1157792, 1157803, 1143341,\n", - " 1151488, 1171623, 1178706, 1158253, 1153898, 1134655, 1178214, 1145626,\n", - " 1154840, 1157483, 1182265, 1184253, 1149755, 1146242, 1146252, 1153601,\n", - " 1157761, 1158779, 1155892, 1155902, 1157272, 1183642, 1165474, 1161405,\n", - " 1164437, 1163422, 1184287, 1181469, 1146161, 1176704, 1180017, 1141506,\n", - " 1186367, 1183021, 1192742, 1139831, 1150265, 1167135, 1154812, 1149668,\n", - " 1191531, 1190579, 1186415, 1156049, 1156055, 1151977, 1182704, 1189273,\n", - " 1146394, 1146395, 1173058, 1190922, 1149539, 1186691, 1191686, 1156840,\n", - " 1193286, 1182060, 1190438, 1189259, 1162156, 1186686, 1151774, 1153743,\n", - " 1169703, 1166840, 1166841, 1189008, 1170142, 1175349, 1174572, 1150406,\n", - " 1156681, 1172429, 1158066, 1178038, 1172710, 1184445, 1179750, 1155962,\n", - " 1172187, 1187676, 1162656, 1162670, 1194153, 1169098, 1157008],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196011, 1197841, 1197719, 1199282, 1198449, 1198459, 1202255, 1201582,\n", - " 1201237, 1194626, 1199263, 1201016, 1195488, 1199043, 1195514, 1195263,\n", - " 1201935, 1201992, 1196031, 1198095, 1195888, 1195895, 1195740, 1196359,\n", - " 1196977, 1195325, 1196835, 1198659, 1198668, 1195988, 1198649, 1198651,\n", - " 1198163, 1196711, 1195265, 1197141, 1195840, 1195841, 1198915, 1197474,\n", - " 1197640, 1196283, 1198282, 1199329, 1194928, 1197583, 1199628, 1197990,\n", - " 1200869, 1200872, 1200747, 1199231, 1201916, 1195017, 1194797, 1199951,\n", - " 1201511, 1196508, 1197601, 1196727, 1200893, 1200155, 1198811, 1200503,\n", - " 1200507, 1196466, 1201156, 1201056, 1200913, 1200927, 1194803, 1197097,\n", - " 1202542, 1196768, 1201442, 1202239, 1202170, 1201564, 1195885, 1198478,\n", - " 1195601, 1203336, 1196966, 1200784, 1195679, 1195664, 1202432, 1200445,\n", - " 1200382, 1198929, 1200684, 1197822, 1201499, 1194898, 1197731, 1199783,\n", - " 1200974, 1195070, 1195066, 1200301, 1197652, 1200710, 1195082, 1201813],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196011, 1197841, 1197719, 1199282, 1198449, 1198459, 1202255, 1201582,\n", - " 1201237, 1194626, 1199263, 1201016, 1195488, 1199043, 1195514, 1195263,\n", - " 1201935, 1201992, 1196031, 1198095, 1195888, 1195895, 1195740, 1196359,\n", - " 1196977, 1195325, 1196835, 1198659, 1198668, 1195988, 1198649, 1198651,\n", - " 1198163, 1196711, 1195265, 1197141, 1195840, 1195841, 1198915, 1197474,\n", - " 1197640, 1196283, 1198282, 1199329, 1194928, 1197583, 1199628, 1197990,\n", - " 1200869, 1200872, 1200747, 1199231, 1201916, 1195017, 1194797, 1199951,\n", - " 1201511, 1196508, 1197601, 1196727, 1200893, 1200155, 1198811, 1200503,\n", - " 1200507, 1196466, 1201156, 1201056, 1200913, 1200927, 1194803, 1197097,\n", - " 1202542, 1196768, 1201442, 1202239, 1202170, 1201564, 1195885, 1198478,\n", - " 1195601, 1203336, 1196966, 1200784, 1195679, 1195664, 1202432, 1200445,\n", - " 1200382, 1198929, 1200684, 1197822, 1201499, 1194898, 1197731, 1199783,\n", - " 1200974, 1195070, 1195066, 1200301, 1197652, 1200710, 1195082, 1201813],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.8194e-01, -3.4417e-04, 6.1533e-01, ..., 4.8375e-02,\n", - " -1.2927e-03, -4.5031e-03],\n", - " [ 2.6582e-01, -6.1571e-04, 8.1702e-01, ..., 4.3225e-02,\n", - " -1.6074e-03, -6.1268e-03],\n", - " [ 2.9617e-01, -7.4126e-04, 9.6915e-01, ..., 3.4801e-02,\n", - " -1.2510e-03, -6.7525e-03],\n", - " ...,\n", - " [ 1.1095e-01, -2.4504e-04, 4.9299e-01, ..., 5.7902e-02,\n", - " -1.5082e-03, -3.1981e-03],\n", - " [ 3.2628e-02, -1.8917e-04, 6.5057e-02, ..., 3.7059e-02,\n", - " -1.0314e-03, -1.4317e-03],\n", - " [ 1.1095e-01, -2.4504e-04, 4.9299e-01, ..., 5.7902e-02,\n", - " -1.5082e-03, -3.1981e-03]], device='cuda:0'), 'paper': tensor([[-5.7145e-03, 2.8361e+00, 3.0150e+00, ..., 2.7385e+00,\n", - " -4.2181e-02, 1.4432e+00],\n", - " [ 9.0279e-01, 9.1900e-01, -1.9403e-03, ..., -1.3804e-02,\n", - " -2.2306e-02, 8.0579e-01],\n", - " [-3.2916e-03, 1.6118e+00, 5.4584e-01, ..., -1.5076e-02,\n", - " -2.5282e-02, -6.8552e-03],\n", - " ...,\n", - " [ 1.5236e-01, 1.0774e+00, 3.0364e-01, ..., -6.2957e-03,\n", - " -2.0958e-02, 2.2600e-01],\n", - " [-2.8550e-03, 9.6486e-01, 6.1301e-01, ..., -4.1558e-03,\n", - " -1.8167e-02, -1.9679e-03],\n", - " [-8.4246e-03, 3.3162e+00, 1.9465e+00, ..., 4.6769e+00,\n", - " -4.8640e-02, 2.4532e+00]], device='cuda:0'), 'author': tensor([[-2.3361e-03, 2.5453e-01, 8.3674e-02, ..., 1.1669e+00,\n", - " 1.3605e-01, -2.1231e-03],\n", - " [-1.2484e-03, 1.7504e-01, 1.9750e-01, ..., 1.2250e+00,\n", - " 3.0267e-01, -9.1214e-04],\n", - " [-1.2017e-03, 1.9710e-01, 1.7399e-01, ..., 1.2466e+00,\n", - " 3.8775e-01, -6.9027e-04],\n", - " ...,\n", - " [-4.5056e-03, 5.0090e-01, -1.1680e-03, ..., 1.1530e+00,\n", - " 7.6052e-02, -2.4970e-03],\n", - " [-3.1565e-03, 3.1666e-01, 1.1814e-01, ..., 1.1901e+00,\n", - " -1.0062e-03, -3.6697e-03],\n", - " [-1.6197e-03, 1.9836e-01, 1.2698e-01, ..., 1.2433e+00,\n", - " 2.7482e-01, -1.6999e-03]], device='cuda:0'), 'field_of_study': tensor([[-0.0016, 0.4453, 0.0739, ..., -0.0061, 0.3358, 0.3285],\n", - " [-0.0028, 0.4625, 0.0750, ..., -0.0073, 0.3767, 0.3618],\n", - " [-0.0027, 0.6465, 0.2316, ..., -0.0075, 0.2880, 0.5298],\n", - " ...,\n", - " [-0.0029, 0.5838, 0.1796, ..., -0.0079, 0.3444, 0.3914],\n", - " [-0.0021, 0.5400, 0.1146, ..., -0.0073, 0.3234, 0.4526],\n", - " [-0.0024, 0.6848, 0.2291, ..., -0.0085, 0.4043, 0.5665]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 119, 119, 172, 111, 11, 11, 360, 520, 523, 328, 387, 387,\n", - " 368, 521, 888, 779, 246, 722, 722, 722, 913, 471, 471, 471,\n", - " 884, 763, 987, 1110, 954, 954, 1151, 1185, 1323, 1323, 1331, 1185,\n", - " 1344, 1436, 1462, 1514, 1593, 1386, 1386, 1730, 1730, 1730, 1726, 1599,\n", - " 1632, 1409, 1409, 1409, 1409, 1624, 1518, 1518, 1667, 1940, 1954, 1954,\n", - " 2106, 2117, 2065, 2058, 2058, 2058, 2058, 2058, 2150, 2302, 2238, 2238,\n", - " 2150, 2393, 2403, 2403, 2524, 2509, 2626, 2640, 2640, 2750, 2700, 2700,\n", - " 2700, 2700, 2916, 2840, 2956, 2956, 2980, 2891, 3170, 3409, 2934, 3099,\n", - " 3173, 3216, 3344, 3433, 3568, 3766, 3766, 3693, 3556, 3556, 3861, 4027,\n", - " 4059, 4131, 4131, 4157, 4114, 4150, 4227, 4227, 4277, 4317, 4388, 4294,\n", - " 4336, 4336, 4396, 4407, 4491, 4563, 4546, 4429, 4558, 4457, 4491, 4668,\n", - " 4668, 4601, 4601, 4706, 4526, 4717, 4760, 4760, 4913, 5007, 5005, 4950,\n", - " 5139, 4890, 5047, 5182, 5182, 5142, 5236, 5164, 5230, 5216, 5302, 5416,\n", - " 5416, 5416, 5704, 5759, 5593, 5621, 6324, 6083, 6072, 5938, 6065, 6258,\n", - " 6289, 6354, 6354, 6387, 6387, 6458, 6481, 6471, 6320, 6426],\n", - " [ 7, 90, 81, 5, 79, 94, 59, 30, 3, 3, 75, 50,\n", - " 3, 56, 3, 8, 6, 34, 74, 53, 67, 71, 60, 100,\n", - " 3, 62, 91, 48, 94, 77, 3, 95, 94, 77, 31, 7,\n", - " 29, 59, 30, 39, 55, 46, 47, 75, 50, 80, 1, 8,\n", - " 24, 58, 51, 57, 21, 17, 66, 3, 31, 79, 35, 49,\n", - " 19, 54, 38, 65, 56, 16, 10, 89, 95, 41, 41, 68,\n", - " 5, 4, 36, 27, 91, 54, 31, 33, 2, 11, 43, 92,\n", - " 62, 3, 55, 25, 98, 13, 20, 15, 95, 31, 30, 99,\n", - " 3, 17, 30, 20, 17, 21, 82, 41, 17, 25, 23, 18,\n", - " 17, 56, 44, 22, 12, 78, 50, 75, 98, 98, 50, 11,\n", - " 103, 101, 85, 0, 62, 11, 87, 45, 96, 40, 97, 94,\n", - " 77, 77, 94, 9, 32, 3, 52, 76, 25, 88, 6, 42,\n", - " 15, 102, 99, 59, 63, 26, 72, 17, 75, 64, 14, 93,\n", - " 83, 62, 86, 69, 44, 63, 38, 62, 28, 62, 84, 37,\n", - " 89, 17, 61, 70, 73, 17, 3, 3, 58, 3]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3294, 1643, 3985, ..., 7041, 794, 6520],\n", - " [ 267, 22, 124, ..., 7230, 7216, 7264]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 30, 76, 94, ..., 3, 62, 98],\n", - " [ 101, 129, 83, ..., 6411, 6364, 6480]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 43, 43, 43, ..., 7143, 7143, 7143],\n", - " [ 302, 359, 576, ..., 649, 752, 286]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 58, 351, 730, ..., 499, 672, 286],\n", - " [ 262, 114, 118, ..., 7258, 7214, 7209]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[6079, 2785, 3144, ..., 3515, 6134, 5912],\n", - " [ 71, 102, 119, ..., 6460, 6382, 6403]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 43, 43, 43, ..., 7215, 7165, 7215],\n", - " [ 769, 880, 1203, ..., 735, 721, 4012]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 119, 119, 119, ..., 6458, 6458, 6458],\n", - " [ 52, 602, 727, ..., 7200, 6854, 6990]], device='cuda:0')}\n", - "Epoch: 005, Loss: 0.8152, Train: 627.1000\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006927\n", - "sampling 0.006198\n", - "noi time: 0.002034\n", - "get_vertex_data call: 0.071158\n", - "noi group time: 0.001968\n", - "eoi_group_time: 0.015094\n", - "second half: 0.259936\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 21459, 10001, ..., 1100728, 1133331, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 21459, 10001, ..., 1100728, 1133331, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227500, 1210830, 1224370, ..., 1937987, 1928586, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227500, 1210830, 1224370, ..., 1937987, 1928586, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1136228, 1135926, 1135723, 1137784, 1137791, 1140789, 1139698,\n", - " 1141758, 1141251, 1136971, 1141442, 1141443, 1143615, 1145998, 1137274,\n", - " 1138933, 1138938, 1139243, 1139241, 1146646, 1140781, 1150506, 1139866,\n", - " 1135385, 1148576, 1149228, 1155689, 1147483, 1135992, 1149286, 1144636,\n", - " 1135260, 1149033, 1146995, 1148337, 1146472, 1146465, 1153220, 1147211,\n", - " 1136683, 1152427, 1138742, 1134661, 1140537, 1137254, 1137181, 1138356,\n", - " 1140159, 1135913, 1135367, 1135202, 1135903, 1141036, 1134794, 1136517,\n", - " 1138504, 1137329, 1137685, 1137693, 1144395, 1137534, 1135408, 1157397,\n", - " 1137441, 1137472, 1135265, 1135278, 1156149, 1156152, 1139161, 1134843,\n", - " 1135579, 1141086, 1136108, 1155073, 1135668, 1156342, 1138514, 1137957,\n", - " 1154128, 1137023, 1135522, 1139685, 1137287, 1138436, 1138440, 1138443,\n", - " 1138461, 1138449, 1154785, 1136594, 1138843, 1138837, 1156606, 1147111,\n", - " 1147112, 1142611, 1135624, 1135631, 1158987, 1148536, 1139668, 1136087,\n", - " 1134992, 1134994, 1136551, 1136546, 1148805, 1139755, 1136730, 1158968,\n", - " 1159009, 1144410, 1153544, 1143625, 1139933, 1141966, 1155648, 1146077,\n", - " 1152044, 1137734, 1137728, 1134922, 1146222, 1135549, 1140228, 1141094,\n", - " 1141097, 1141098, 1144129, 1144130, 1144136, 1144138, 1139889, 1141980,\n", - " 1143767, 1143711, 1143221, 1143224, 1139033, 1146844, 1146847, 1141688,\n", - " 1135861, 1161173, 1141111, 1142932, 1141224, 1139386, 1141648, 1136917,\n", - " 1139730, 1144237, 1146449, 1141786, 1136765, 1147850, 1137087, 1144428,\n", - " 1141810, 1153673, 1145161, 1140173, 1138469, 1149105, 1158597, 1139188,\n", - " 1138708, 1137661, 1138423, 1144442, 1144596, 1141581, 1144182, 1137374,\n", - " 1138539, 1137846, 1137841, 1161703, 1147153, 1141365, 1141367, 1141664,\n", - " 1149090, 1149093, 1139022, 1138292, 1144279, 1143917, 1139510, 1139763,\n", - " 1139650, 1139653, 1138815, 1145001, 1140616, 1140976, 1140990, 1146693,\n", - " 1141560, 1141565, 1147050, 1143543, 1152976, 1152980, 1135457, 1141925,\n", - " 1141934, 1144245, 1144242, 1150689, 1150692, 1140690, 1139396, 1143845,\n", - " 1143851, 1146019, 1146024, 1142533, 1149924, 1139990, 1146298, 1143294,\n", - " 1147538, 1147543, 1148763, 1147282, 1142816, 1149155, 1143051, 1138922,\n", - " 1157720, 1136836, 1150188, 1141496, 1139048, 1144957, 1143345, 1143349,\n", - " 1144619, 1144083, 1144086, 1144095, 1144319, 1150919, 1146514, 1146526,\n", - " 1143456, 1143457, 1143007, 1137697, 1143937, 1147521, 1140364, 1143080,\n", - " 1143082, 1168921, 1144219, 1147999, 1146957, 1134902, 1139252, 1148704,\n", - " 1143310, 1149714, 1139549, 1158225, 1158226, 1167006, 1145751, 1142370,\n", - " 1142376, 1138632, 1148217, 1152530, 1152537, 1150280, 1149263, 1144514,\n", - " 1144526, 1138045, 1146888, 1150342, 1152013, 1151994, 1151480, 1152022,\n", - " 1152031, 1146723, 1134873, 1149535, 1150112, 1150127, 1147012, 1147021,\n", - " 1135805, 1150736, 1151795, 1150728, 1154976, 1162274, 1148300, 1148612,\n", - " 1148623, 1139096, 1154420, 1158794, 1148188, 1151361, 1152561, 1146676,\n", - " 1146678, 1146686, 1138867, 1145862, 1168973, 1150057, 1148204, 1171943,\n", - " 1153124, 1153192, 1153188, 1145104, 1152867, 1150356, 1169594, 1155088,\n", - " 1143128, 1143134, 1151816, 1152581, 1148498, 1148505, 1141420, 1136002,\n", - " 1149385, 1148949, 1146969, 1153255, 1146616, 1146623, 1151687, 1144472,\n", - " 1152407, 1152415, 1152103, 1137746, 1146304, 1152622, 1155140, 1136401,\n", - " 1157107, 1155337, 1154123, 1152673, 1139581, 1151617, 1150578, 1136788,\n", - " 1148916, 1145930, 1150615, 1145952, 1152903, 1151311, 1156831, 1156816,\n", - " 1153311, 1138276, 1156007, 1156005, 1136028, 1158712, 1158704, 1152928,\n", - " 1151071, 1154727, 1143478, 1153918, 1167943, 1148033, 1148040, 1161201,\n", - " 1149300, 1157625, 1149798, 1137048, 1158477, 1148628, 1158530, 1158540,\n", - " 1137458, 1149946, 1142047, 1135434, 1157547, 1142387, 1158860, 1148894,\n", - " 1156505, 1157064, 1157071, 1155408, 1152833, 1137809, 1137814, 1157555,\n", - " 1150465, 1152183, 1156638, 1151788, 1153415, 1135645, 1147810, 1143010,\n", - " 1158308, 1158311, 1151271, 1151342, 1155441, 1154530, 1145771, 1156919,\n", - " 1145606, 1142755, 1142758, 1154233, 1157637, 1151379, 1155122, 1152527,\n", - " 1149325, 1151436, 1135396, 1135400, 1135402, 1146913, 1145806, 1158096,\n", - " 1154763, 1155626, 1155630, 1155576, 1158824, 1148836, 1148647, 1155646,\n", - " 1143262, 1143263, 1146938, 1161287, 1162386, 1154250, 1143189, 1143521,\n", - " 1150077, 1151035, 1137152, 1157663, 1153786, 1168145, 1135601, 1135614,\n", - " 1148149, 1148159, 1150671, 1155848, 1155852, 1158669, 1161116, 1152209,\n", - " 1159213, 1155439, 1140381, 1140374, 1156021, 1157031, 1144843, 1155971,\n", - " 1155975, 1158846, 1156809, 1156812, 1161897, 1149709, 1154600, 1160163,\n", - " 1136905, 1136896, 1158760, 1140221, 1157304, 1162993, 1158815, 1158814,\n", - " 1158438, 1158444, 1156778, 1158285, 1151615, 1157574, 1153641, 1147585,\n", - " 1155301, 1153808, 1136640, 1142178, 1158558, 1161167, 1156514, 1146126,\n", - " 1138101, 1138110, 1158006, 1155521, 1142666, 1156045, 1159071, 1142427,\n", - " 1158297, 1155196, 1153052, 1153045, 1171551, 1155763, 1155772, 1178584,\n", - " 1142865, 1153841, 1163711, 1156104, 1138393, 1165244, 1150046, 1149070,\n", - " 1151009, 1154294, 1153514, 1153519, 1158680, 1161662, 1156787, 1156798,\n", - " 1154588, 1154590, 1139281, 1156985, 1146063, 1166092, 1171249, 1158878,\n", - " 1158866, 1169493, 1140643, 1148600, 1148603, 1164979, 1143146, 1151887,\n", - " 1151872, 1158643, 1158655, 1156177, 1159025, 1159029, 1159032, 1159028,\n", - " 1165604, 1152247, 1155588, 1151227, 1148571, 1148564, 1144977, 1146500,\n", - " 1155052, 1145137, 1141471, 1156739, 1161012, 1168748, 1144812, 1153273,\n", - " 1135567, 1164741, 1156303, 1145728, 1145228, 1138765, 1144973, 1147694,\n", - " 1165746, 1170502, 1152626, 1139345, 1145902, 1152198, 1152203, 1181049,\n", - " 1143395, 1158734, 1154076, 1177562, 1144702, 1170676, 1162892, 1169600,\n", - " 1169602, 1167817, 1155172, 1155180, 1150518, 1167915, 1156113, 1156119,\n", - " 1144346, 1144336, 1154670, 1169162, 1141051, 1169359, 1149452, 1173219,\n", - " 1158611, 1158623, 1149847, 1147423, 1169948, 1155494, 1155502, 1167388,\n", - " 1152353, 1143172, 1152546, 1170053, 1192133, 1172211, 1149398, 1149402,\n", - " 1165904, 1173307, 1145033, 1154027, 1152150, 1172787, 1159655, 1178424,\n", - " 1157153, 1164694, 1151850, 1151852, 1157593, 1157599, 1177046, 1166826,\n", - " 1154307, 1183439, 1168822, 1173636, 1177607, 1140326, 1170023, 1153436,\n", - " 1176452, 1150234, 1154148, 1179964, 1149169, 1149173, 1169821, 1178644,\n", - " 1181229, 1181228, 1186117, 1153803, 1153141, 1183027, 1161027, 1158030,\n", - " 1161255, 1176527, 1155262, 1171760, 1177889, 1157792, 1157795, 1171623,\n", - " 1173192, 1157133, 1157992, 1180413, 1158253, 1153898, 1134650, 1134655,\n", - " 1145626, 1180372, 1161056, 1161911, 1149755, 1146242, 1153601, 1157772,\n", - " 1155995, 1184157, 1184144, 1179776, 1179783, 1182690, 1181141, 1158779,\n", - " 1158512, 1158513, 1158524, 1158940, 1158382, 1155899, 1162692, 1178696,\n", - " 1164448, 1168282, 1171587, 1168886, 1179095, 1163422, 1170259, 1146161,\n", - " 1146171, 1170802, 1166772, 1166781, 1170336, 1156162, 1186883, 1139828,\n", - " 1139831, 1154812, 1156049, 1156055, 1179685, 1180120, 1173058, 1194024,\n", - " 1149544, 1191889, 1188371, 1189352, 1185801, 1194567, 1194218, 1192809,\n", - " 1151774, 1166841, 1171201, 1175349, 1150406, 1166788, 1187117, 1178142,\n", - " 1180613, 1176225, 1179650, 1155959, 1155962, 1172187, 1165516, 1169831,\n", - " 1192792, 1189082, 1188719], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1136228, 1135926, 1135723, 1137784, 1137791, 1140789, 1139698,\n", - " 1141758, 1141251, 1136971, 1141442, 1141443, 1143615, 1145998, 1137274,\n", - " 1138933, 1138938, 1139243, 1139241, 1146646, 1140781, 1150506, 1139866,\n", - " 1135385, 1148576, 1149228, 1155689, 1147483, 1135992, 1149286, 1144636,\n", - " 1135260, 1149033, 1146995, 1148337, 1146472, 1146465, 1153220, 1147211,\n", - " 1136683, 1152427, 1138742, 1134661, 1140537, 1137254, 1137181, 1138356,\n", - " 1140159, 1135913, 1135367, 1135202, 1135903, 1141036, 1134794, 1136517,\n", - " 1138504, 1137329, 1137685, 1137693, 1144395, 1137534, 1135408, 1157397,\n", - " 1137441, 1137472, 1135265, 1135278, 1156149, 1156152, 1139161, 1134843,\n", - " 1135579, 1141086, 1136108, 1155073, 1135668, 1156342, 1138514, 1137957,\n", - " 1154128, 1137023, 1135522, 1139685, 1137287, 1138436, 1138440, 1138443,\n", - " 1138461, 1138449, 1154785, 1136594, 1138843, 1138837, 1156606, 1147111,\n", - " 1147112, 1142611, 1135624, 1135631, 1158987, 1148536, 1139668, 1136087,\n", - " 1134992, 1134994, 1136551, 1136546, 1148805, 1139755, 1136730, 1158968,\n", - " 1159009, 1144410, 1153544, 1143625, 1139933, 1141966, 1155648, 1146077,\n", - " 1152044, 1137734, 1137728, 1134922, 1146222, 1135549, 1140228, 1141094,\n", - " 1141097, 1141098, 1144129, 1144130, 1144136, 1144138, 1139889, 1141980,\n", - " 1143767, 1143711, 1143221, 1143224, 1139033, 1146844, 1146847, 1141688,\n", - " 1135861, 1161173, 1141111, 1142932, 1141224, 1139386, 1141648, 1136917,\n", - " 1139730, 1144237, 1146449, 1141786, 1136765, 1147850, 1137087, 1144428,\n", - " 1141810, 1153673, 1145161, 1140173, 1138469, 1149105, 1158597, 1139188,\n", - " 1138708, 1137661, 1138423, 1144442, 1144596, 1141581, 1144182, 1137374,\n", - " 1138539, 1137846, 1137841, 1161703, 1147153, 1141365, 1141367, 1141664,\n", - " 1149090, 1149093, 1139022, 1138292, 1144279, 1143917, 1139510, 1139763,\n", - " 1139650, 1139653, 1138815, 1145001, 1140616, 1140976, 1140990, 1146693,\n", - " 1141560, 1141565, 1147050, 1143543, 1152976, 1152980, 1135457, 1141925,\n", - " 1141934, 1144245, 1144242, 1150689, 1150692, 1140690, 1139396, 1143845,\n", - " 1143851, 1146019, 1146024, 1142533, 1149924, 1139990, 1146298, 1143294,\n", - " 1147538, 1147543, 1148763, 1147282, 1142816, 1149155, 1143051, 1138922,\n", - " 1157720, 1136836, 1150188, 1141496, 1139048, 1144957, 1143345, 1143349,\n", - " 1144619, 1144083, 1144086, 1144095, 1144319, 1150919, 1146514, 1146526,\n", - " 1143456, 1143457, 1143007, 1137697, 1143937, 1147521, 1140364, 1143080,\n", - " 1143082, 1168921, 1144219, 1147999, 1146957, 1134902, 1139252, 1148704,\n", - " 1143310, 1149714, 1139549, 1158225, 1158226, 1167006, 1145751, 1142370,\n", - " 1142376, 1138632, 1148217, 1152530, 1152537, 1150280, 1149263, 1144514,\n", - " 1144526, 1138045, 1146888, 1150342, 1152013, 1151994, 1151480, 1152022,\n", - " 1152031, 1146723, 1134873, 1149535, 1150112, 1150127, 1147012, 1147021,\n", - " 1135805, 1150736, 1151795, 1150728, 1154976, 1162274, 1148300, 1148612,\n", - " 1148623, 1139096, 1154420, 1158794, 1148188, 1151361, 1152561, 1146676,\n", - " 1146678, 1146686, 1138867, 1145862, 1168973, 1150057, 1148204, 1171943,\n", - " 1153124, 1153192, 1153188, 1145104, 1152867, 1150356, 1169594, 1155088,\n", - " 1143128, 1143134, 1151816, 1152581, 1148498, 1148505, 1141420, 1136002,\n", - " 1149385, 1148949, 1146969, 1153255, 1146616, 1146623, 1151687, 1144472,\n", - " 1152407, 1152415, 1152103, 1137746, 1146304, 1152622, 1155140, 1136401,\n", - " 1157107, 1155337, 1154123, 1152673, 1139581, 1151617, 1150578, 1136788,\n", - " 1148916, 1145930, 1150615, 1145952, 1152903, 1151311, 1156831, 1156816,\n", - " 1153311, 1138276, 1156007, 1156005, 1136028, 1158712, 1158704, 1152928,\n", - " 1151071, 1154727, 1143478, 1153918, 1167943, 1148033, 1148040, 1161201,\n", - " 1149300, 1157625, 1149798, 1137048, 1158477, 1148628, 1158530, 1158540,\n", - " 1137458, 1149946, 1142047, 1135434, 1157547, 1142387, 1158860, 1148894,\n", - " 1156505, 1157064, 1157071, 1155408, 1152833, 1137809, 1137814, 1157555,\n", - " 1150465, 1152183, 1156638, 1151788, 1153415, 1135645, 1147810, 1143010,\n", - " 1158308, 1158311, 1151271, 1151342, 1155441, 1154530, 1145771, 1156919,\n", - " 1145606, 1142755, 1142758, 1154233, 1157637, 1151379, 1155122, 1152527,\n", - " 1149325, 1151436, 1135396, 1135400, 1135402, 1146913, 1145806, 1158096,\n", - " 1154763, 1155626, 1155630, 1155576, 1158824, 1148836, 1148647, 1155646,\n", - " 1143262, 1143263, 1146938, 1161287, 1162386, 1154250, 1143189, 1143521,\n", - " 1150077, 1151035, 1137152, 1157663, 1153786, 1168145, 1135601, 1135614,\n", - " 1148149, 1148159, 1150671, 1155848, 1155852, 1158669, 1161116, 1152209,\n", - " 1159213, 1155439, 1140381, 1140374, 1156021, 1157031, 1144843, 1155971,\n", - " 1155975, 1158846, 1156809, 1156812, 1161897, 1149709, 1154600, 1160163,\n", - " 1136905, 1136896, 1158760, 1140221, 1157304, 1162993, 1158815, 1158814,\n", - " 1158438, 1158444, 1156778, 1158285, 1151615, 1157574, 1153641, 1147585,\n", - " 1155301, 1153808, 1136640, 1142178, 1158558, 1161167, 1156514, 1146126,\n", - " 1138101, 1138110, 1158006, 1155521, 1142666, 1156045, 1159071, 1142427,\n", - " 1158297, 1155196, 1153052, 1153045, 1171551, 1155763, 1155772, 1178584,\n", - " 1142865, 1153841, 1163711, 1156104, 1138393, 1165244, 1150046, 1149070,\n", - " 1151009, 1154294, 1153514, 1153519, 1158680, 1161662, 1156787, 1156798,\n", - " 1154588, 1154590, 1139281, 1156985, 1146063, 1166092, 1171249, 1158878,\n", - " 1158866, 1169493, 1140643, 1148600, 1148603, 1164979, 1143146, 1151887,\n", - " 1151872, 1158643, 1158655, 1156177, 1159025, 1159029, 1159032, 1159028,\n", - " 1165604, 1152247, 1155588, 1151227, 1148571, 1148564, 1144977, 1146500,\n", - " 1155052, 1145137, 1141471, 1156739, 1161012, 1168748, 1144812, 1153273,\n", - " 1135567, 1164741, 1156303, 1145728, 1145228, 1138765, 1144973, 1147694,\n", - " 1165746, 1170502, 1152626, 1139345, 1145902, 1152198, 1152203, 1181049,\n", - " 1143395, 1158734, 1154076, 1177562, 1144702, 1170676, 1162892, 1169600,\n", - " 1169602, 1167817, 1155172, 1155180, 1150518, 1167915, 1156113, 1156119,\n", - " 1144346, 1144336, 1154670, 1169162, 1141051, 1169359, 1149452, 1173219,\n", - " 1158611, 1158623, 1149847, 1147423, 1169948, 1155494, 1155502, 1167388,\n", - " 1152353, 1143172, 1152546, 1170053, 1192133, 1172211, 1149398, 1149402,\n", - " 1165904, 1173307, 1145033, 1154027, 1152150, 1172787, 1159655, 1178424,\n", - " 1157153, 1164694, 1151850, 1151852, 1157593, 1157599, 1177046, 1166826,\n", - " 1154307, 1183439, 1168822, 1173636, 1177607, 1140326, 1170023, 1153436,\n", - " 1176452, 1150234, 1154148, 1179964, 1149169, 1149173, 1169821, 1178644,\n", - " 1181229, 1181228, 1186117, 1153803, 1153141, 1183027, 1161027, 1158030,\n", - " 1161255, 1176527, 1155262, 1171760, 1177889, 1157792, 1157795, 1171623,\n", - " 1173192, 1157133, 1157992, 1180413, 1158253, 1153898, 1134650, 1134655,\n", - " 1145626, 1180372, 1161056, 1161911, 1149755, 1146242, 1153601, 1157772,\n", - " 1155995, 1184157, 1184144, 1179776, 1179783, 1182690, 1181141, 1158779,\n", - " 1158512, 1158513, 1158524, 1158940, 1158382, 1155899, 1162692, 1178696,\n", - " 1164448, 1168282, 1171587, 1168886, 1179095, 1163422, 1170259, 1146161,\n", - " 1146171, 1170802, 1166772, 1166781, 1170336, 1156162, 1186883, 1139828,\n", - " 1139831, 1154812, 1156049, 1156055, 1179685, 1180120, 1173058, 1194024,\n", - " 1149544, 1191889, 1188371, 1189352, 1185801, 1194567, 1194218, 1192809,\n", - " 1151774, 1166841, 1171201, 1175349, 1150406, 1166788, 1187117, 1178142,\n", - " 1180613, 1176225, 1179650, 1155959, 1155962, 1172187, 1165516, 1169831,\n", - " 1192792, 1189082, 1188719], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1198769, 1199424, 1199439, 1197719, 1198459, 1202255, 1198840, 1201582,\n", - " 1198694, 1198702, 1202803, 1198557, 1194866, 1199053, 1196624, 1196631,\n", - " 1195512, 1195514, 1195263, 1199135, 1196529, 1196534, 1201992, 1196031,\n", - " 1198371, 1198542, 1194956, 1195888, 1195895, 1195896, 1199172, 1199171,\n", - " 1196334, 1197856, 1196359, 1196977, 1196979, 1194752, 1197824, 1195325,\n", - " 1198958, 1198163, 1199810, 1195148, 1195265, 1197141, 1200756, 1197367,\n", - " 1194919, 1196109, 1195038, 1195541, 1199317, 1197253, 1197641, 1202017,\n", - " 1199699, 1196283, 1195351, 1195358, 1199628, 1197676, 1197990, 1200745,\n", - " 1198763, 1199949, 1196498, 1200668, 1197601, 1196727, 1195771, 1198428,\n", - " 1199489, 1199593, 1199410, 1198811, 1200452, 1198593, 1201156, 1200988,\n", - " 1201056, 1200553, 1200429, 1197097, 1202129, 1196768, 1201442, 1202239,\n", - " 1199485, 1195876, 1201291, 1196960, 1196966, 1200784, 1200793, 1199606,\n", - " 1196823, 1198514, 1195679, 1195664, 1200445, 1196929, 1198911, 1197816,\n", - " 1198973, 1196381, 1203102, 1201138, 1200437, 1200011, 1199786, 1195066,\n", - " 1201886, 1197655, 1203300, 1197035, 1195165, 1194908, 1196428],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1198769, 1199424, 1199439, 1197719, 1198459, 1202255, 1198840, 1201582,\n", - " 1198694, 1198702, 1202803, 1198557, 1194866, 1199053, 1196624, 1196631,\n", - " 1195512, 1195514, 1195263, 1199135, 1196529, 1196534, 1201992, 1196031,\n", - " 1198371, 1198542, 1194956, 1195888, 1195895, 1195896, 1199172, 1199171,\n", - " 1196334, 1197856, 1196359, 1196977, 1196979, 1194752, 1197824, 1195325,\n", - " 1198958, 1198163, 1199810, 1195148, 1195265, 1197141, 1200756, 1197367,\n", - " 1194919, 1196109, 1195038, 1195541, 1199317, 1197253, 1197641, 1202017,\n", - " 1199699, 1196283, 1195351, 1195358, 1199628, 1197676, 1197990, 1200745,\n", - " 1198763, 1199949, 1196498, 1200668, 1197601, 1196727, 1195771, 1198428,\n", - " 1199489, 1199593, 1199410, 1198811, 1200452, 1198593, 1201156, 1200988,\n", - " 1201056, 1200553, 1200429, 1197097, 1202129, 1196768, 1201442, 1202239,\n", - " 1199485, 1195876, 1201291, 1196960, 1196966, 1200784, 1200793, 1199606,\n", - " 1196823, 1198514, 1195679, 1195664, 1200445, 1196929, 1198911, 1197816,\n", - " 1198973, 1196381, 1203102, 1201138, 1200437, 1200011, 1199786, 1195066,\n", - " 1201886, 1197655, 1203300, 1197035, 1195165, 1194908, 1196428],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 1.8428e-01, -5.0229e-04, 5.7649e-01, ..., 3.5960e-02,\n", - " -1.2420e-03, -4.2287e-03],\n", - " [ 1.9853e-01, -3.0194e-04, 6.5974e-01, ..., 4.2535e-02,\n", - " -1.4527e-03, -4.9627e-03],\n", - " [ 2.5776e-01, -7.5159e-04, 9.5749e-01, ..., 4.6132e-02,\n", - " -1.4816e-03, -6.4973e-03],\n", - " ...,\n", - " [ 3.2628e-02, -1.8917e-04, 6.5057e-02, ..., 3.7059e-02,\n", - " -1.0314e-03, -1.4317e-03],\n", - " [ 3.0245e-01, -1.2508e-03, 9.5070e-01, ..., 3.7359e-02,\n", - " -1.4785e-03, -7.0040e-03],\n", - " [ 1.8817e-01, -2.7272e-04, 6.5320e-01, ..., 2.7961e-02,\n", - " -1.0803e-03, -4.6592e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 6.8898e-01, 9.6566e-01, -1.0235e-03, ..., -1.5926e-02,\n", - " -2.1549e-02, 6.1670e-01],\n", - " [ 1.0277e+00, 9.9117e-01, -3.9371e-03, ..., -1.6833e-02,\n", - " -2.1288e-02, 1.1191e+00],\n", - " [-8.7299e-03, 2.3598e+00, 2.3715e+00, ..., 2.1633e+00,\n", - " -3.6209e-02, 5.4515e-01],\n", - " ...,\n", - " [-1.5992e-02, 6.2359e-01, 3.4697e+00, ..., -1.1475e-04,\n", - " -4.0123e-02, -1.2436e-02],\n", - " [-2.1122e-02, -2.8357e-03, 2.2976e+00, ..., -1.0759e-02,\n", - " -2.8358e-02, -3.1748e-02],\n", - " [-7.1992e-03, 3.5322e+00, 2.2536e+00, ..., 4.9234e+00,\n", - " -5.1371e-02, 2.8098e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-1.2931e-03, 2.1198e-01, 1.2761e-01, ..., 1.3588e+00,\n", - " 4.1660e-01, -1.8792e-04],\n", - " [-4.6994e-04, 2.7382e-02, 1.1459e-01, ..., 1.5975e-01,\n", - " 5.6292e-04, -6.6914e-04],\n", - " [-7.1716e-03, 6.8278e-01, -2.4277e-03, ..., 1.3203e+00,\n", - " 3.0809e-01, -3.3078e-03],\n", - " ...,\n", - " [-2.1286e-03, 3.2060e-01, 3.1899e-02, ..., 1.0479e+00,\n", - " 9.6703e-02, -2.3000e-03],\n", - " [-4.6994e-04, 2.7382e-02, 1.1459e-01, ..., 1.5975e-01,\n", - " 5.6292e-04, -6.6914e-04],\n", - " [-8.1754e-04, 1.4354e-01, 2.2268e-01, ..., 1.2870e+00,\n", - " 3.4820e-01, -4.3369e-04]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-0.0029, 0.5374, 0.1506, ..., -0.0076, 0.3573, 0.4613],\n", - " [-0.0020, 0.6041, 0.2541, ..., -0.0075, 0.3377, 0.4750],\n", - " [-0.0020, 0.6017, 0.2329, ..., -0.0073, 0.3299, 0.4618],\n", - " ...,\n", - " [-0.0020, 0.5920, 0.3461, ..., -0.0082, 0.3452, 0.4134],\n", - " [-0.0026, 0.7184, 0.2562, ..., -0.0085, 0.5095, 0.5094],\n", - " [-0.0025, 0.6746, 0.2770, ..., -0.0084, 0.4586, 0.4554]],\n", - " device='cuda:0', grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 5, 155, 217, 11, 11, 132, 132, 284, 284, 284, 284, 258,\n", - " 225, 263, 520, 284, 284, 554, 562, 611, 611, 657, 657, 657,\n", - " 764, 681, 594, 594, 703, 477, 774, 774, 993, 993, 690, 901,\n", - " 1184, 986, 1019, 1287, 1287, 1351, 1205, 1219, 1083, 1232, 1358, 1119,\n", - " 1323, 1464, 1349, 1464, 1506, 1677, 1359, 1064, 1064, 1563, 1506, 1454,\n", - " 1416, 1629, 1629, 1673, 1787, 1526, 1556, 1556, 1724, 1724, 1683, 1877,\n", - " 1861, 1861, 1944, 1953, 2111, 1938, 1938, 2147, 2029, 2114, 2018, 2018,\n", - " 2158, 2253, 2153, 2335, 2376, 2314, 2551, 2551, 2521, 2443, 2531, 2374,\n", - " 2365, 2412, 2575, 2534, 2760, 2549, 2865, 2721, 2721, 2832, 2832, 2506,\n", - " 2750, 3061, 3118, 2861, 2861, 3093, 3054, 3141, 3242, 3100, 3054, 3054,\n", - " 3046, 3046, 3234, 3234, 3418, 3750, 3536, 3553, 3667, 3711, 3700, 3471,\n", - " 3696, 3582, 3865, 3865, 3865, 3865, 4001, 4165, 4165, 4307, 4477, 4299,\n", - " 4501, 4519, 4594, 4623, 4939, 4750, 4928, 4860, 4959, 4803, 5097, 5097,\n", - " 5059, 5099, 5013, 5113, 5266, 5234, 5262, 5159, 5197, 5572, 5356, 5322,\n", - " 5322, 5530, 5530, 5408, 5510, 5838, 5543, 5569, 5569, 5621, 6080, 6084,\n", - " 6008],\n", - " [ 52, 103, 2, 66, 85, 21, 101, 77, 108, 78, 93, 31,\n", - " 48, 69, 31, 41, 17, 101, 80, 98, 71, 74, 87, 46,\n", - " 69, 31, 12, 51, 91, 61, 82, 84, 54, 92, 109, 69,\n", - " 9, 72, 44, 10, 0, 65, 102, 73, 63, 33, 54, 115,\n", - " 73, 25, 54, 76, 42, 113, 111, 118, 6, 64, 47, 57,\n", - " 33, 100, 15, 48, 20, 63, 11, 56, 97, 37, 32, 83,\n", - " 22, 39, 83, 116, 18, 73, 106, 28, 61, 63, 27, 13,\n", - " 23, 78, 63, 18, 1, 94, 90, 103, 111, 112, 39, 60,\n", - " 107, 111, 30, 5, 43, 52, 109, 117, 45, 104, 75, 102,\n", - " 69, 63, 111, 36, 33, 48, 17, 31, 109, 69, 35, 4,\n", - " 55, 110, 11, 18, 69, 3, 79, 78, 25, 59, 34, 17,\n", - " 49, 5, 40, 29, 42, 37, 69, 105, 115, 91, 16, 68,\n", - " 69, 36, 95, 62, 89, 96, 18, 7, 69, 86, 88, 38,\n", - " 71, 50, 115, 27, 90, 14, 5, 117, 109, 24, 26, 8,\n", - " 69, 43, 81, 58, 99, 67, 110, 114, 19, 19, 69, 70,\n", - " 53]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[4185, 1279, 3070, ..., 5706, 4116, 4429],\n", - " [ 227, 202, 86, ..., 6557, 6618, 6618]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 46, 74, 31, ..., 55, 69, 10],\n", - " [ 57, 190, 28, ..., 6068, 6103, 6099]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 137, 137, 137, ..., 6390, 6390, 6390],\n", - " [ 121, 347, 167, ..., 738, 347, 56]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 153, 18, 19, ..., 619, 207, 263],\n", - " [ 126, 124, 173, ..., 6515, 6547, 6520]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1351, 4469, 6178, ..., 3554, 5699, 3000],\n", - " [ 33, 8, 54, ..., 6055, 5905, 6047]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 127, 127, 127, ..., 6390, 6641, 6568],\n", - " [ 610, 2054, 557, ..., 4116, 117, 3698]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 132, 132, 132, ..., 6034, 6111, 6111],\n", - " [ 542, 1125, 1364, ..., 1238, 2832, 3117]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.007692\n", - "sampling 0.007532\n", - "noi time: 0.00115\n", - "get_vertex_data call: 0.030219\n", - "noi group time: 0.00357\n", - "eoi_group_time: 0.016314\n", - "second half: 0.227114\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31142, 31143, 24187, ..., 1070082, 1119687, 1130633],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31142, 31143, 24187, ..., 1070082, 1119687, 1130633],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1224369, 1211567, 1203800, ..., 1938513, 1935112, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1224369, 1211567, 1203800, ..., 1938513, 1935112, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137429, 1136228, 1136233, 1136237, 1140282, 1135933, 1138554, 1135160,\n", - " 1140785, 1141758, 1138335, 1136212, 1136965, 1136969, 1136971, 1141443,\n", - " 1139811, 1145366, 1137947, 1137268, 1143362, 1143372, 1139615, 1148987,\n", - " 1142965, 1136957, 1148584, 1149216, 1149220, 1135987, 1142881, 1144636,\n", - " 1135251, 1146995, 1135941, 1146656, 1146472, 1136122, 1152666, 1148546,\n", - " 1136742, 1141916, 1155014, 1155018, 1139371, 1147211, 1136685, 1150329,\n", - " 1152417, 1134710, 1138742, 1138112, 1138119, 1137181, 1149461, 1138356,\n", - " 1140020, 1135367, 1135202, 1154739, 1141036, 1134794, 1157443, 1135964,\n", - " 1143377, 1143069, 1137693, 1144395, 1157397, 1152371, 1136928, 1156159,\n", - " 1148484, 1139161, 1141081, 1140970, 1138514, 1138524, 1153094, 1153098,\n", - " 1153099, 1156965, 1156962, 1145132, 1145120, 1156899, 1135522, 1139684,\n", - " 1138305, 1138319, 1138314, 1137287, 1157703, 1138440, 1138447, 1138461,\n", - " 1138449, 1137924, 1137932, 1136594, 1149332, 1138846, 1142611, 1135359,\n", - " 1158984, 1145843, 1148531, 1137109, 1139667, 1139673, 1138079, 1134992,\n", - " 1142434, 1142788, 1136551, 1136546, 1135782, 1140199, 1158961, 1158974,\n", - " 1153543, 1143631, 1143625, 1139085, 1139933, 1141963, 1153396, 1134891,\n", - " 1155660, 1155654, 1140548, 1152044, 1137734, 1137728, 1134738, 1134750,\n", - " 1141088, 1162946, 1139889, 1156875, 1143767, 1154855, 1154863, 1137299,\n", - " 1143225, 1139032, 1149982, 1152709, 1141695, 1142339, 1135862, 1136625,\n", - " 1140470, 1141891, 1139386, 1141657, 1136923, 1136917, 1143667, 1145065,\n", - " 1140592, 1138785, 1139495, 1136752, 1141300, 1144641, 1147850, 1142049,\n", - " 1142060, 1141810, 1142093, 1138469, 1149111, 1148872, 1148867, 1143577,\n", - " 1139190, 1137058, 1138708, 1140110, 1142917, 1142913, 1137661, 1143107,\n", - " 1143111, 1144445, 1144596, 1144603, 1136864, 1140885, 1135326, 1141398,\n", - " 1144182, 1144190, 1150906, 1144865, 1140500, 1140501, 1161710, 1147152,\n", - " 1147153, 1149101, 1138293, 1144279, 1139508, 1139127, 1145001, 1143789,\n", - " 1140990, 1141565, 1143690, 1143692, 1147050, 1145873, 1149876, 1152976,\n", - " 1152988, 1135457, 1135471, 1139453, 1141925, 1146901, 1144242, 1140580,\n", - " 1137149, 1150697, 1150698, 1143643, 1141381, 1145974, 1143851, 1146024,\n", - " 1146025, 1138085, 1141585, 1149933, 1139990, 1143283, 1143294, 1147541,\n", - " 1147540, 1147150, 1148763, 1147282, 1147290, 1142829, 1142816, 1140346,\n", - " 1142638, 1146091, 1143040, 1148402, 1157720, 1136836, 1165623, 1139329,\n", - " 1139328, 1144768, 1141490, 1142149, 1145427, 1143345, 1144765, 1144611,\n", - " 1145808, 1140833, 1137098, 1135876, 1150756, 1150761, 1144319, 1138000,\n", - " 1144380, 1146514, 1146523, 1143456, 1143470, 1143457, 1142994, 1144303,\n", - " 1142000, 1143937, 1140829, 1147574, 1143799, 1146634, 1147521, 1140364,\n", - " 1137990, 1143080, 1143082, 1168921, 1166410, 1148965, 1144725, 1144213,\n", - " 1144222, 1147984, 1147995, 1147999, 1134899, 1139249, 1147127, 1147131,\n", - " 1147240, 1148704, 1141836, 1146745, 1146742, 1148468, 1148476, 1153701,\n", - " 1147070, 1149722, 1147031, 1147970, 1139549, 1158235, 1143921, 1147880,\n", - " 1148353, 1145240, 1145750, 1145751, 1142369, 1152532, 1152538, 1150438,\n", - " 1150445, 1155006, 1149791, 1144514, 1144526, 1150342, 1150344, 1151994,\n", - " 1165252, 1151480, 1151473, 1152024, 1154263, 1154267, 1145255, 1139919,\n", - " 1140562, 1148693, 1148698, 1148278, 1147019, 1147021, 1141949, 1146772,\n", - " 1144819, 1153568, 1153574, 1147653, 1143552, 1149412, 1152067, 1137716,\n", - " 1135083, 1135087, 1148612, 1148623, 1139096, 1154420, 1158794, 1148188,\n", - " 1136249, 1148729, 1146544, 1146559, 1139936, 1148204, 1148108, 1153124,\n", - " 1153192, 1150932, 1152877, 1150356, 1141017, 1154190, 1148498, 1146571,\n", - " 1146565, 1141419, 1136002, 1150636, 1155161, 1148949, 1156403, 1150219,\n", - " 1146623, 1156325, 1153028, 1153030, 1145539, 1137746, 1146304, 1152622,\n", - " 1140521, 1155145, 1155148, 1136401, 1136402, 1157107, 1155337, 1154119,\n", - " 1152673, 1151617, 1145278, 1151440, 1148924, 1152951, 1152903, 1151311,\n", - " 1146816, 1156823, 1156826, 1156831, 1138283, 1138279, 1152297, 1156004,\n", - " 1136023, 1136028, 1158704, 1156621, 1156622, 1152928, 1156399, 1163489,\n", - " 1150166, 1150172, 1150164, 1148033, 1148040, 1148034, 1145656, 1149792,\n", - " 1149794, 1137048, 1148628, 1148637, 1158530, 1158540, 1158537, 1137458,\n", - " 1149942, 1153868, 1135707, 1142041, 1157547, 1158854, 1148890, 1158916,\n", - " 1157064, 1157069, 1155422, 1145184, 1139473, 1150465, 1150475, 1156638,\n", - " 1151777, 1152738, 1135645, 1151459, 1158308, 1158311, 1140427, 1155441,\n", - " 1161738, 1153359, 1150136, 1144357, 1140868, 1154529, 1142755, 1142764,\n", - " 1156207, 1138775, 1151379, 1158635, 1140186, 1156649, 1155122, 1152527,\n", - " 1149504, 1135396, 1135398, 1135406, 1146913, 1156455, 1156463, 1157873,\n", - " 1155628, 1155630, 1156563, 1158824, 1158825, 1158325, 1156993, 1148836,\n", - " 1155646, 1146938, 1160210, 1154250, 1154901, 1154902, 1154903, 1143189,\n", - " 1153326, 1150984, 1155293, 1157934, 1151031, 1137152, 1158126, 1171832,\n", - " 1158578, 1156763, 1153786, 1137381, 1138264, 1145684, 1134677, 1135601,\n", - " 1148149, 1148153, 1150659, 1159585, 1157684, 1149145, 1156085, 1144453,\n", - " 1152209, 1152220, 1152215, 1159213, 1167309, 1140368, 1140381, 1144843,\n", - " 1155971, 1155975, 1158841, 1158846, 1161892, 1154600, 1154603, 1155949,\n", - " 1180783, 1153503, 1153491, 1136905, 1136896, 1158753, 1158760, 1158882,\n", - " 1158891, 1158815, 1158438, 1156665, 1155301, 1155302, 1153112, 1153116,\n", - " 1142747, 1156490, 1153808, 1136640, 1136646, 1145484, 1140049, 1147781,\n", - " 1158558, 1156516, 1165497, 1146126, 1165778, 1144581, 1142666, 1142658,\n", - " 1157753, 1157751, 1167346, 1158295, 1160570, 1153052, 1153045, 1171551,\n", - " 1172995, 1156226, 1166258, 1153842, 1161313, 1156104, 1156107, 1138393,\n", - " 1159475, 1149063, 1149070, 1155479, 1153514, 1153519, 1147300, 1146873,\n", - " 1164006, 1156787, 1139790, 1154590, 1139281, 1159895, 1157236, 1148771,\n", - " 1157351, 1157357, 1146063, 1146356, 1160701, 1165309, 1140650, 1140643,\n", - " 1148600, 1148603, 1164979, 1155816, 1141800, 1158643, 1158653, 1156181,\n", - " 1159032, 1152244, 1143729, 1143735, 1155588, 1151220, 1148571, 1144979,\n", - " 1144984, 1153237, 1164580, 1164589, 1144739, 1163522, 1168067, 1153201,\n", - " 1141471, 1141459, 1147426, 1147427, 1149893, 1179979, 1156737, 1156739,\n", - " 1153653, 1150646, 1144810, 1144812, 1140112, 1162085, 1135567, 1142722,\n", - " 1142733, 1144062, 1145743, 1166914, 1148683, 1145229, 1166462, 1144973,\n", - " 1190689, 1160730, 1143025, 1147347, 1147355, 1152624, 1139347, 1193479,\n", - " 1152194, 1187284, 1143404, 1149565, 1158724, 1158722, 1158734, 1154067,\n", - " 1145674, 1145677, 1150783, 1179488, 1169602, 1167817, 1156309, 1166653,\n", - " 1150518, 1150526, 1156119, 1154617, 1144336, 1157534, 1147746, 1154670,\n", - " 1169162, 1169157, 1194111, 1157334, 1138129, 1141043, 1151664, 1169359,\n", - " 1138609, 1173047, 1149847, 1159851, 1155494, 1172488, 1152353, 1169186,\n", - " 1168451, 1143857, 1155921, 1172212, 1149402, 1148667, 1148666, 1162217,\n", - " 1148335, 1173307, 1164974, 1159655, 1157153, 1157375, 1147711, 1151850,\n", - " 1151852, 1148128, 1148131, 1148141, 1157593, 1149247, 1149246, 1135018,\n", - " 1162106, 1166351, 1166682, 1169444, 1170915, 1150234, 1154151, 1154148,\n", - " 1158176, 1149169, 1172537, 1169772, 1168481, 1143420, 1171297, 1171302,\n", - " 1169618, 1169627, 1153803, 1181502, 1164818, 1177776, 1186314, 1144896,\n", - " 1158030, 1158031, 1161255, 1155262, 1154718, 1157795, 1171623, 1164034,\n", - " 1157122, 1157132, 1158253, 1153898, 1153902, 1178538, 1164564, 1162928,\n", - " 1145626, 1180383, 1180004, 1157483, 1179442, 1149755, 1153601, 1153609,\n", - " 1157761, 1177826, 1177839, 1155890, 1155892, 1180366, 1166981, 1182330,\n", - " 1162443, 1165474, 1171634, 1162253, 1160065, 1164228, 1164231, 1164437,\n", - " 1182337, 1181539, 1154956, 1146161, 1188074, 1156861, 1166783, 1180028,\n", - " 1190097, 1156162, 1178255, 1189414, 1187476, 1168930, 1172174, 1139828,\n", - " 1139831, 1150265, 1150260, 1154812, 1163848, 1156055, 1151977, 1181897,\n", - " 1146395, 1173058, 1188984, 1182885, 1169954, 1169964, 1174498, 1181939,\n", - " 1182060, 1151774, 1193243, 1185870, 1190071, 1178637, 1192508, 1177842,\n", - " 1183371, 1150400, 1156681, 1156672, 1172423, 1172429, 1171953, 1158064,\n", - " 1158070, 1145395, 1167739, 1180256, 1152080, 1178662, 1155962, 1155960,\n", - " 1192639, 1179769, 1169831, 1167471, 1193302, 1157008, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137429, 1136228, 1136233, 1136237, 1140282, 1135933, 1138554, 1135160,\n", - " 1140785, 1141758, 1138335, 1136212, 1136965, 1136969, 1136971, 1141443,\n", - " 1139811, 1145366, 1137947, 1137268, 1143362, 1143372, 1139615, 1148987,\n", - " 1142965, 1136957, 1148584, 1149216, 1149220, 1135987, 1142881, 1144636,\n", - " 1135251, 1146995, 1135941, 1146656, 1146472, 1136122, 1152666, 1148546,\n", - " 1136742, 1141916, 1155014, 1155018, 1139371, 1147211, 1136685, 1150329,\n", - " 1152417, 1134710, 1138742, 1138112, 1138119, 1137181, 1149461, 1138356,\n", - " 1140020, 1135367, 1135202, 1154739, 1141036, 1134794, 1157443, 1135964,\n", - " 1143377, 1143069, 1137693, 1144395, 1157397, 1152371, 1136928, 1156159,\n", - " 1148484, 1139161, 1141081, 1140970, 1138514, 1138524, 1153094, 1153098,\n", - " 1153099, 1156965, 1156962, 1145132, 1145120, 1156899, 1135522, 1139684,\n", - " 1138305, 1138319, 1138314, 1137287, 1157703, 1138440, 1138447, 1138461,\n", - " 1138449, 1137924, 1137932, 1136594, 1149332, 1138846, 1142611, 1135359,\n", - " 1158984, 1145843, 1148531, 1137109, 1139667, 1139673, 1138079, 1134992,\n", - " 1142434, 1142788, 1136551, 1136546, 1135782, 1140199, 1158961, 1158974,\n", - " 1153543, 1143631, 1143625, 1139085, 1139933, 1141963, 1153396, 1134891,\n", - " 1155660, 1155654, 1140548, 1152044, 1137734, 1137728, 1134738, 1134750,\n", - " 1141088, 1162946, 1139889, 1156875, 1143767, 1154855, 1154863, 1137299,\n", - " 1143225, 1139032, 1149982, 1152709, 1141695, 1142339, 1135862, 1136625,\n", - " 1140470, 1141891, 1139386, 1141657, 1136923, 1136917, 1143667, 1145065,\n", - " 1140592, 1138785, 1139495, 1136752, 1141300, 1144641, 1147850, 1142049,\n", - " 1142060, 1141810, 1142093, 1138469, 1149111, 1148872, 1148867, 1143577,\n", - " 1139190, 1137058, 1138708, 1140110, 1142917, 1142913, 1137661, 1143107,\n", - " 1143111, 1144445, 1144596, 1144603, 1136864, 1140885, 1135326, 1141398,\n", - " 1144182, 1144190, 1150906, 1144865, 1140500, 1140501, 1161710, 1147152,\n", - " 1147153, 1149101, 1138293, 1144279, 1139508, 1139127, 1145001, 1143789,\n", - " 1140990, 1141565, 1143690, 1143692, 1147050, 1145873, 1149876, 1152976,\n", - " 1152988, 1135457, 1135471, 1139453, 1141925, 1146901, 1144242, 1140580,\n", - " 1137149, 1150697, 1150698, 1143643, 1141381, 1145974, 1143851, 1146024,\n", - " 1146025, 1138085, 1141585, 1149933, 1139990, 1143283, 1143294, 1147541,\n", - " 1147540, 1147150, 1148763, 1147282, 1147290, 1142829, 1142816, 1140346,\n", - " 1142638, 1146091, 1143040, 1148402, 1157720, 1136836, 1165623, 1139329,\n", - " 1139328, 1144768, 1141490, 1142149, 1145427, 1143345, 1144765, 1144611,\n", - " 1145808, 1140833, 1137098, 1135876, 1150756, 1150761, 1144319, 1138000,\n", - " 1144380, 1146514, 1146523, 1143456, 1143470, 1143457, 1142994, 1144303,\n", - " 1142000, 1143937, 1140829, 1147574, 1143799, 1146634, 1147521, 1140364,\n", - " 1137990, 1143080, 1143082, 1168921, 1166410, 1148965, 1144725, 1144213,\n", - " 1144222, 1147984, 1147995, 1147999, 1134899, 1139249, 1147127, 1147131,\n", - " 1147240, 1148704, 1141836, 1146745, 1146742, 1148468, 1148476, 1153701,\n", - " 1147070, 1149722, 1147031, 1147970, 1139549, 1158235, 1143921, 1147880,\n", - " 1148353, 1145240, 1145750, 1145751, 1142369, 1152532, 1152538, 1150438,\n", - " 1150445, 1155006, 1149791, 1144514, 1144526, 1150342, 1150344, 1151994,\n", - " 1165252, 1151480, 1151473, 1152024, 1154263, 1154267, 1145255, 1139919,\n", - " 1140562, 1148693, 1148698, 1148278, 1147019, 1147021, 1141949, 1146772,\n", - " 1144819, 1153568, 1153574, 1147653, 1143552, 1149412, 1152067, 1137716,\n", - " 1135083, 1135087, 1148612, 1148623, 1139096, 1154420, 1158794, 1148188,\n", - " 1136249, 1148729, 1146544, 1146559, 1139936, 1148204, 1148108, 1153124,\n", - " 1153192, 1150932, 1152877, 1150356, 1141017, 1154190, 1148498, 1146571,\n", - " 1146565, 1141419, 1136002, 1150636, 1155161, 1148949, 1156403, 1150219,\n", - " 1146623, 1156325, 1153028, 1153030, 1145539, 1137746, 1146304, 1152622,\n", - " 1140521, 1155145, 1155148, 1136401, 1136402, 1157107, 1155337, 1154119,\n", - " 1152673, 1151617, 1145278, 1151440, 1148924, 1152951, 1152903, 1151311,\n", - " 1146816, 1156823, 1156826, 1156831, 1138283, 1138279, 1152297, 1156004,\n", - " 1136023, 1136028, 1158704, 1156621, 1156622, 1152928, 1156399, 1163489,\n", - " 1150166, 1150172, 1150164, 1148033, 1148040, 1148034, 1145656, 1149792,\n", - " 1149794, 1137048, 1148628, 1148637, 1158530, 1158540, 1158537, 1137458,\n", - " 1149942, 1153868, 1135707, 1142041, 1157547, 1158854, 1148890, 1158916,\n", - " 1157064, 1157069, 1155422, 1145184, 1139473, 1150465, 1150475, 1156638,\n", - " 1151777, 1152738, 1135645, 1151459, 1158308, 1158311, 1140427, 1155441,\n", - " 1161738, 1153359, 1150136, 1144357, 1140868, 1154529, 1142755, 1142764,\n", - " 1156207, 1138775, 1151379, 1158635, 1140186, 1156649, 1155122, 1152527,\n", - " 1149504, 1135396, 1135398, 1135406, 1146913, 1156455, 1156463, 1157873,\n", - " 1155628, 1155630, 1156563, 1158824, 1158825, 1158325, 1156993, 1148836,\n", - " 1155646, 1146938, 1160210, 1154250, 1154901, 1154902, 1154903, 1143189,\n", - " 1153326, 1150984, 1155293, 1157934, 1151031, 1137152, 1158126, 1171832,\n", - " 1158578, 1156763, 1153786, 1137381, 1138264, 1145684, 1134677, 1135601,\n", - " 1148149, 1148153, 1150659, 1159585, 1157684, 1149145, 1156085, 1144453,\n", - " 1152209, 1152220, 1152215, 1159213, 1167309, 1140368, 1140381, 1144843,\n", - " 1155971, 1155975, 1158841, 1158846, 1161892, 1154600, 1154603, 1155949,\n", - " 1180783, 1153503, 1153491, 1136905, 1136896, 1158753, 1158760, 1158882,\n", - " 1158891, 1158815, 1158438, 1156665, 1155301, 1155302, 1153112, 1153116,\n", - " 1142747, 1156490, 1153808, 1136640, 1136646, 1145484, 1140049, 1147781,\n", - " 1158558, 1156516, 1165497, 1146126, 1165778, 1144581, 1142666, 1142658,\n", - " 1157753, 1157751, 1167346, 1158295, 1160570, 1153052, 1153045, 1171551,\n", - " 1172995, 1156226, 1166258, 1153842, 1161313, 1156104, 1156107, 1138393,\n", - " 1159475, 1149063, 1149070, 1155479, 1153514, 1153519, 1147300, 1146873,\n", - " 1164006, 1156787, 1139790, 1154590, 1139281, 1159895, 1157236, 1148771,\n", - " 1157351, 1157357, 1146063, 1146356, 1160701, 1165309, 1140650, 1140643,\n", - " 1148600, 1148603, 1164979, 1155816, 1141800, 1158643, 1158653, 1156181,\n", - " 1159032, 1152244, 1143729, 1143735, 1155588, 1151220, 1148571, 1144979,\n", - " 1144984, 1153237, 1164580, 1164589, 1144739, 1163522, 1168067, 1153201,\n", - " 1141471, 1141459, 1147426, 1147427, 1149893, 1179979, 1156737, 1156739,\n", - " 1153653, 1150646, 1144810, 1144812, 1140112, 1162085, 1135567, 1142722,\n", - " 1142733, 1144062, 1145743, 1166914, 1148683, 1145229, 1166462, 1144973,\n", - " 1190689, 1160730, 1143025, 1147347, 1147355, 1152624, 1139347, 1193479,\n", - " 1152194, 1187284, 1143404, 1149565, 1158724, 1158722, 1158734, 1154067,\n", - " 1145674, 1145677, 1150783, 1179488, 1169602, 1167817, 1156309, 1166653,\n", - " 1150518, 1150526, 1156119, 1154617, 1144336, 1157534, 1147746, 1154670,\n", - " 1169162, 1169157, 1194111, 1157334, 1138129, 1141043, 1151664, 1169359,\n", - " 1138609, 1173047, 1149847, 1159851, 1155494, 1172488, 1152353, 1169186,\n", - " 1168451, 1143857, 1155921, 1172212, 1149402, 1148667, 1148666, 1162217,\n", - " 1148335, 1173307, 1164974, 1159655, 1157153, 1157375, 1147711, 1151850,\n", - " 1151852, 1148128, 1148131, 1148141, 1157593, 1149247, 1149246, 1135018,\n", - " 1162106, 1166351, 1166682, 1169444, 1170915, 1150234, 1154151, 1154148,\n", - " 1158176, 1149169, 1172537, 1169772, 1168481, 1143420, 1171297, 1171302,\n", - " 1169618, 1169627, 1153803, 1181502, 1164818, 1177776, 1186314, 1144896,\n", - " 1158030, 1158031, 1161255, 1155262, 1154718, 1157795, 1171623, 1164034,\n", - " 1157122, 1157132, 1158253, 1153898, 1153902, 1178538, 1164564, 1162928,\n", - " 1145626, 1180383, 1180004, 1157483, 1179442, 1149755, 1153601, 1153609,\n", - " 1157761, 1177826, 1177839, 1155890, 1155892, 1180366, 1166981, 1182330,\n", - " 1162443, 1165474, 1171634, 1162253, 1160065, 1164228, 1164231, 1164437,\n", - " 1182337, 1181539, 1154956, 1146161, 1188074, 1156861, 1166783, 1180028,\n", - " 1190097, 1156162, 1178255, 1189414, 1187476, 1168930, 1172174, 1139828,\n", - " 1139831, 1150265, 1150260, 1154812, 1163848, 1156055, 1151977, 1181897,\n", - " 1146395, 1173058, 1188984, 1182885, 1169954, 1169964, 1174498, 1181939,\n", - " 1182060, 1151774, 1193243, 1185870, 1190071, 1178637, 1192508, 1177842,\n", - " 1183371, 1150400, 1156681, 1156672, 1172423, 1172429, 1171953, 1158064,\n", - " 1158070, 1145395, 1167739, 1180256, 1152080, 1178662, 1155962, 1155960,\n", - " 1192639, 1179769, 1169831, 1167471, 1193302, 1157008, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1199736, 1197226, 1197716, 1200096, 1200108, 1198730, 1198731, 1201094,\n", - " 1199282, 1202255, 1198844, 1201577, 1199151, 1201462, 1202119, 1194626,\n", - " 1197777, 1199248, 1201016, 1201660, 1196871, 1196685, 1198180, 1194783,\n", - " 1197464, 1196631, 1195263, 1201992, 1201987, 1195198, 1196031, 1198543,\n", - " 1197697, 1199519, 1194949, 1195888, 1195313, 1195320, 1195325, 1198668,\n", - " 1196171, 1195581, 1198036, 1195982, 1198167, 1196711, 1195148, 1195221,\n", - " 1200761, 1196242, 1197273, 1196109, 1194859, 1195854, 1195039, 1198925,\n", - " 1195541, 1196317, 1197474, 1200037, 1202021, 1199699, 1196272, 1195358,\n", - " 1199339, 1199856, 1196854, 1197676, 1197990, 1199152, 1198404, 1198410,\n", - " 1200748, 1199231, 1201916, 1199744, 1199676, 1201511, 1197609, 1196727,\n", - " 1200887, 1198416, 1198428, 1200018, 1200155, 1198811, 1199555, 1201827,\n", - " 1200570, 1198075, 1198593, 1201156, 1200927, 1194803, 1199712, 1199721,\n", - " 1200526, 1200832, 1197097, 1201842, 1196883, 1199908, 1196779, 1202239,\n", - " 1195876, 1201291, 1198478, 1203263, 1203329, 1199925, 1196966, 1195676,\n", - " 1195664, 1202357, 1200684, 1195421, 1197060, 1197816, 1197822, 1201495,\n", - " 1202269, 1198973, 1199659, 1203102, 1198147, 1198824, 1201475, 1198819,\n", - " 1197593, 1195070, 1201886, 1200298, 1197652, 1196070, 1195165, 1196428],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1199736, 1197226, 1197716, 1200096, 1200108, 1198730, 1198731, 1201094,\n", - " 1199282, 1202255, 1198844, 1201577, 1199151, 1201462, 1202119, 1194626,\n", - " 1197777, 1199248, 1201016, 1201660, 1196871, 1196685, 1198180, 1194783,\n", - " 1197464, 1196631, 1195263, 1201992, 1201987, 1195198, 1196031, 1198543,\n", - " 1197697, 1199519, 1194949, 1195888, 1195313, 1195320, 1195325, 1198668,\n", - " 1196171, 1195581, 1198036, 1195982, 1198167, 1196711, 1195148, 1195221,\n", - " 1200761, 1196242, 1197273, 1196109, 1194859, 1195854, 1195039, 1198925,\n", - " 1195541, 1196317, 1197474, 1200037, 1202021, 1199699, 1196272, 1195358,\n", - " 1199339, 1199856, 1196854, 1197676, 1197990, 1199152, 1198404, 1198410,\n", - " 1200748, 1199231, 1201916, 1199744, 1199676, 1201511, 1197609, 1196727,\n", - " 1200887, 1198416, 1198428, 1200018, 1200155, 1198811, 1199555, 1201827,\n", - " 1200570, 1198075, 1198593, 1201156, 1200927, 1194803, 1199712, 1199721,\n", - " 1200526, 1200832, 1197097, 1201842, 1196883, 1199908, 1196779, 1202239,\n", - " 1195876, 1201291, 1198478, 1203263, 1203329, 1199925, 1196966, 1195676,\n", - " 1195664, 1202357, 1200684, 1195421, 1197060, 1197816, 1197822, 1201495,\n", - " 1202269, 1198973, 1199659, 1203102, 1198147, 1198824, 1201475, 1198819,\n", - " 1197593, 1195070, 1201886, 1200298, 1197652, 1196070, 1195165, 1196428],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 2.1233e-01, -3.8026e-04, 6.2309e-01, ..., 3.9718e-02,\n", - " -1.6966e-03, -4.9782e-03],\n", - " [ 1.3182e-01, 5.1376e-03, 4.6938e-01, ..., 8.5640e-02,\n", - " -1.8856e-03, -3.6787e-03],\n", - " [ 1.6708e-01, -2.5063e-04, 4.8964e-01, ..., 4.9767e-02,\n", - " -1.5467e-03, -3.8202e-03],\n", - " ...,\n", - " [ 1.6708e-01, -2.5063e-04, 4.8964e-01, ..., 4.9767e-02,\n", - " -1.5467e-03, -3.8202e-03],\n", - " [ 2.1433e-01, -4.0738e-04, 6.4991e-01, ..., 3.8742e-02,\n", - " -1.4817e-03, -4.9979e-03],\n", - " [ 2.8776e-01, -7.2570e-04, 8.9012e-01, ..., 3.9653e-02,\n", - " -1.5635e-03, -6.5392e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[-2.9758e-03, 4.5786e-01, 3.1283e-01, ..., -1.2757e-02,\n", - " -1.6495e-02, -3.6652e-03],\n", - " [-3.5328e-03, 1.4354e+00, 1.3283e+00, ..., -4.4362e-03,\n", - " -2.4346e-02, 4.0291e-01],\n", - " [-1.0271e-02, 2.5606e+00, 2.5500e+00, ..., 3.5247e+00,\n", - " -4.9127e-02, 1.9468e+00],\n", - " ...,\n", - " [-1.9518e-02, 1.0882e+00, 1.2694e+00, ..., 1.9455e+00,\n", - " -3.1373e-02, -8.9836e-03],\n", - " [-2.0916e-02, -3.0313e-03, 1.6183e+00, ..., -8.3423e-03,\n", - " -2.1957e-02, -2.9289e-02],\n", - " [-1.0540e-02, 3.5713e+00, 2.1819e+00, ..., 5.2945e+00,\n", - " -5.1425e-02, 2.7360e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-6.5437e-03, 3.2381e-01, 1.5920e-01, ..., 1.0552e+00,\n", - " -3.6306e-03, -7.5148e-03],\n", - " [-1.3952e-03, 2.0921e-01, 4.0854e-02, ..., 1.1131e+00,\n", - " 5.2878e-01, -2.5306e-04],\n", - " [-9.5892e-04, 8.1731e-02, 1.6867e-01, ..., 1.0542e+00,\n", - " 4.0982e-01, -1.3442e-04],\n", - " ...,\n", - " [-4.4752e-04, 2.6525e-02, 1.1317e-01, ..., 1.5614e-01,\n", - " 1.0440e-03, -6.8673e-04],\n", - " [-1.3252e-03, 7.3530e-02, 1.9404e-01, ..., 1.1132e+00,\n", - " 4.0188e-01, -7.3659e-04],\n", - " [-4.4752e-04, 2.6525e-02, 1.1317e-01, ..., 1.5614e-01,\n", - " 1.0440e-03, -6.8673e-04]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-0.0033, 0.5360, 0.0935, ..., -0.0068, 0.2981, 0.4988],\n", - " [-0.0028, 0.4913, 0.0730, ..., -0.0058, 0.2850, 0.3912],\n", - " [-0.0026, 0.5883, 0.1704, ..., -0.0072, 0.3136, 0.5439],\n", - " ...,\n", - " [-0.0041, 0.6299, 0.1819, ..., -0.0073, 0.3395, 0.5601],\n", - " [-0.0030, 0.5251, 0.1257, ..., -0.0078, 0.2593, 0.4566],\n", - " [ 0.2220, 0.6790, 0.2470, ..., -0.0096, 0.3462, -0.0011]],\n", - " device='cuda:0', grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 129, 16, 144, 119, 25, 25, 81, 81, 81, 81, 81, 25,\n", - " 175, 175, 175, 546, 405, 427, 910, 768, 674, 1066, 618, 318,\n", - " 911, 675, 806, 806, 806, 602, 602, 666, 1267, 1267, 902, 1229,\n", - " 1055, 1287, 1287, 984, 1159, 1029, 1029, 1356, 1456, 1027, 1027, 1465,\n", - " 1503, 1058, 1622, 1539, 1539, 1529, 1529, 1487, 1258, 1695, 1695, 1695,\n", - " 1676, 1640, 1878, 1878, 1915, 2118, 2060, 1993, 2060, 2151, 2034, 2123,\n", - " 2123, 2200, 2273, 2398, 2528, 2528, 2408, 2408, 2408, 2408, 2441, 2441,\n", - " 2589, 2560, 2560, 2680, 2680, 3002, 3102, 2678, 2678, 2991, 3012, 3276,\n", - " 3086, 3213, 3257, 3330, 3047, 3318, 3356, 3486, 3486, 3408, 3408, 3408,\n", - " 3408, 3408, 3557, 3557, 3589, 3717, 4047, 3798, 3798, 3929, 4186, 4252,\n", - " 3798, 4120, 4311, 4311, 4015, 4410, 4410, 4364, 4364, 4364, 4394, 4457,\n", - " 4594, 4681, 4808, 4749, 4616, 4796, 4796, 4796, 4892, 4807, 5000, 5046,\n", - " 5145, 5150, 5230, 5257, 5653, 5464, 5543, 5543, 5482, 5415, 5415, 5999,\n", - " 5999, 5566, 5574, 5687, 5859, 5859, 5945, 5812, 5962, 5962, 5925, 6052,\n", - " 5823, 6063, 6076, 6222, 6222, 6222, 6222, 6143, 6512, 6512, 6512, 5871,\n", - " 6043, 6313, 6313, 6188, 6188, 6188, 6279, 6096, 6096, 6660, 6660, 6538,\n", - " 6538, 6534, 6568, 6568, 6568, 6579, 6579, 6576],\n", - " [ 83, 35, 135, 63, 27, 11, 28, 54, 105, 66, 55, 73,\n", - " 124, 73, 69, 79, 47, 103, 8, 88, 25, 41, 52, 79,\n", - " 77, 84, 61, 97, 19, 96, 60, 79, 78, 93, 25, 79,\n", - " 103, 26, 60, 111, 82, 13, 9, 50, 131, 25, 64, 124,\n", - " 126, 76, 65, 27, 24, 46, 85, 25, 110, 23, 98, 75,\n", - " 82, 48, 81, 125, 29, 58, 12, 44, 111, 124, 62, 30,\n", - " 130, 116, 25, 15, 80, 74, 27, 57, 107, 3, 79, 130,\n", - " 6, 123, 132, 133, 41, 21, 38, 11, 40, 122, 56, 112,\n", - " 116, 79, 120, 109, 7, 34, 110, 99, 105, 101, 18, 128,\n", - " 121, 117, 25, 10, 79, 16, 92, 108, 76, 50, 127, 94,\n", - " 100, 123, 46, 85, 119, 67, 110, 102, 27, 24, 42, 25,\n", - " 39, 91, 86, 1, 106, 17, 49, 0, 72, 95, 27, 20,\n", - " 36, 22, 41, 30, 78, 2, 114, 70, 17, 113, 79, 130,\n", - " 43, 50, 32, 1, 61, 8, 39, 118, 129, 85, 5, 33,\n", - " 90, 51, 89, 37, 8, 59, 134, 104, 55, 73, 71, 79,\n", - " 115, 27, 79, 68, 33, 4, 31, 78, 17, 133, 14, 77,\n", - " 53, 125, 45, 87, 25, 82, 76, 84]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[5699, 659, 943, ..., 361, 2969, 4995],\n", - " [ 174, 140, 72, ..., 6811, 6940, 6927]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 65, 50, 27, ..., 7, 25, 83],\n", - " [ 45, 109, 84, ..., 6627, 6575, 6597]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 216, 216, 216, ..., 6926, 6926, 6926],\n", - " [ 243, 305, 79, ..., 16, 409, 556]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 58, 228, 414, ..., 532, 627, 574],\n", - " [ 78, 15, 80, ..., 6893, 6890, 6992]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[5422, 2731, 6846, ..., 5778, 2961, 4939],\n", - " [ 135, 30, 217, ..., 6576, 6641, 6571]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 216, 216, 216, ..., 6926, 6926, 6926],\n", - " [ 789, 1135, 1681, ..., 3128, 3969, 5746]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 119, 119, 119, ..., 6579, 6579, 6579],\n", - " [4978, 5062, 4419, ..., 2380, 1382, 3658]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.003755\n", - "sampling 0.003669\n", - "noi time: 0.000715\n", - "get_vertex_data call: 0.014485\n", - "noi group time: 0.001857\n", - "eoi_group_time: 0.011003\n", - "second half: 0.112429\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 8842, 16691, 24187, ..., 1130642, 1132851, 1120069],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 8842, 16691, 24187, ..., 1130642, 1132851, 1120069],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1230244, 1230575, 1205182, ..., 1937556, 1931115, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1230244, 1230575, 1205182, ..., 1937556, 1931115, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1140282, 1140285, 1135165, 1135723, 1140788, 1141751, 1141758,\n", - " 1136223, 1141251, 1136969, 1143615, 1139808, 1139811, 1137271, 1138930,\n", - " 1150395, 1146647, 1139609, 1142963, 1149216, 1155689, 1143817, 1147483,\n", - " 1141882, 1142881, 1153938, 1135941, 1146656, 1146661, 1148558, 1136742,\n", - " 1147089, 1147095, 1141909, 1137220, 1155014, 1155019, 1139371, 1147211,\n", - " 1136677, 1150329, 1152427, 1134717, 1136261, 1134807, 1134815, 1138126,\n", - " 1134735, 1135367, 1135202, 1134970, 1141036, 1136289, 1134794, 1138504,\n", - " 1137329, 1136178, 1157103, 1137693, 1136617, 1144395, 1137521, 1137529,\n", - " 1137534, 1136716, 1157405, 1136204, 1156159, 1139162, 1135582, 1141086,\n", - " 1155075, 1138514, 1153089, 1153094, 1137953, 1137957, 1137959, 1138590,\n", - " 1158136, 1135499, 1154128, 1145120, 1136982, 1156899, 1156908, 1135522,\n", - " 1135535, 1139684, 1139685, 1138314, 1139874, 1139878, 1157703, 1138436,\n", - " 1138440, 1138451, 1138461, 1154787, 1136594, 1154106, 1158391, 1149328,\n", - " 1156605, 1156606, 1147112, 1142611, 1142615, 1160825, 1135618, 1135625,\n", - " 1137422, 1139846, 1159868, 1139667, 1139673, 1139674, 1138079, 1142249,\n", - " 1134992, 1134778, 1142793, 1139755, 1136730, 1136728, 1140199, 1144410,\n", - " 1153543, 1136067, 1139925, 1138648, 1134891, 1155648, 1140557, 1141992,\n", - " 1152044, 1136051, 1137734, 1147316, 1140901, 1140904, 1134750, 1135549,\n", - " 1141088, 1141099, 1148996, 1149001, 1139889, 1143767, 1154860, 1143704,\n", - " 1139025, 1140003, 1149979, 1146834, 1146847, 1152704, 1141695, 1135861,\n", - " 1136418, 1136426, 1140469, 1142937, 1141223, 1139386, 1141657, 1142160,\n", - " 1136917, 1143675, 1137190, 1140601, 1141156, 1141785, 1139495, 1141609,\n", - " 1144650, 1134985, 1136862, 1147850, 1137074, 1144420, 1142056, 1139276,\n", - " 1139279, 1138472, 1137761, 1137762, 1148872, 1137062, 1138708, 1140100,\n", - " 1140110, 1143107, 1144596, 1157410, 1136871, 1136864, 1141204, 1141209,\n", - " 1144042, 1140885, 1135315, 1135322, 1150906, 1158703, 1147153, 1149193,\n", - " 1141365, 1153068, 1140815, 1149101, 1138288, 1138292, 1138293, 1144279,\n", - " 1143917, 1139510, 1139773, 1139662, 1144998, 1146695, 1135049, 1147050,\n", - " 1147047, 1149876, 1143543, 1143551, 1152976, 1135459, 1135466, 1141925,\n", - " 1146901, 1144242, 1145339, 1141853, 1150689, 1138728, 1140702, 1136891,\n", - " 1134861, 1143851, 1146024, 1150601, 1138085, 1154332, 1141646, 1141585,\n", - " 1149928, 1149933, 1139990, 1150429, 1143883, 1147543, 1147540, 1148763,\n", - " 1147282, 1136160, 1138923, 1157718, 1136836, 1165629, 1139329, 1142159,\n", - " 1143345, 1144615, 1140844, 1144088, 1150761, 1150760, 1146514, 1146516,\n", - " 1146523, 1143007, 1140482, 1143937, 1143807, 1143795, 1146636, 1140361,\n", - " 1140364, 1137990, 1143080, 1168921, 1168927, 1168913, 1144732, 1147984,\n", - " 1147985, 1147992, 1147996, 1144013, 1139249, 1147131, 1147233, 1147241,\n", - " 1148704, 1148475, 1148473, 1147056, 1147061, 1149725, 1147970, 1145012,\n", - " 1147194, 1147198, 1147196, 1158226, 1147880, 1146178, 1149263, 1148940,\n", - " 1151856, 1144514, 1145835, 1152013, 1144203, 1154816, 1147794, 1147796,\n", - " 1151473, 1152022, 1154263, 1135513, 1139914, 1134869, 1148278, 1147016,\n", - " 1147021, 1152804, 1141941, 1141949, 1141193, 1147770, 1146400, 1148288,\n", - " 1137724, 1139096, 1154420, 1148180, 1136251, 1138404, 1157983, 1144110,\n", - " 1146549, 1139938, 1143980, 1143983, 1148204, 1141737, 1141733, 1153124,\n", - " 1153188, 1145104, 1144851, 1143129, 1147447, 1147442, 1135311, 1154183,\n", - " 1148505, 1146571, 1141420, 1152799, 1151350, 1145080, 1149385, 1146261,\n", - " 1146623, 1151692, 1152100, 1152103, 1153026, 1153038, 1150085, 1137746,\n", - " 1146304, 1136410, 1136411, 1152826, 1155337, 1155334, 1157826, 1154633,\n", - " 1151582, 1151573, 1151617, 1151629, 1136131, 1136788, 1152958, 1138979,\n", - " 1152903, 1173495, 1152341, 1146816, 1156831, 1156816, 1153311, 1138281,\n", - " 1152300, 1156007, 1136028, 1156608, 1156621, 1142777, 1143475, 1153915,\n", - " 1150150, 1150164, 1142257, 1148040, 1148041, 1155222, 1158477, 1148628,\n", - " 1158530, 1158540, 1149947, 1157515, 1135698, 1142041, 1157459, 1139225,\n", - " 1135430, 1135434, 1158854, 1156505, 1145191, 1157554, 1150465, 1152738,\n", - " 1150819, 1150830, 1147810, 1158304, 1158306, 1158308, 1155441, 1150130,\n", - " 1154529, 1145771, 1153994, 1156269, 1151379, 1137908, 1140189, 1140186,\n", - " 1152527, 1149324, 1149321, 1151424, 1158096, 1154763, 1155628, 1155630,\n", - " 1155631, 1156563, 1154555, 1158824, 1158829, 1158325, 1154035, 1157001,\n", - " 1153368, 1153363, 1161391, 1154080, 1143189, 1150371, 1157439, 1141620,\n", - " 1155293, 1153786, 1159116, 1159115, 1145694, 1140914, 1134677, 1135601,\n", - " 1145507, 1148149, 1155848, 1146321, 1144451, 1167618, 1140368, 1155884,\n", - " 1157733, 1157740, 1157033, 1144843, 1142466, 1142479, 1155975, 1156957,\n", - " 1158846, 1162538, 1149705, 1149700, 1154600, 1155938, 1153490, 1153503,\n", - " 1136896, 1171171, 1140213, 1158447, 1158444, 1156774, 1156778, 1158285,\n", - " 1158278, 1152458, 1151615, 1156666, 1156488, 1153808, 1156278, 1136640,\n", - " 1136646, 1134757, 1140049, 1158558, 1153827, 1161163, 1165497, 1146113,\n", - " 1146126, 1165778, 1159946, 1138101, 1155871, 1144581, 1161539, 1142658,\n", - " 1157758, 1167346, 1159042, 1159052, 1165838, 1167592, 1153052, 1153045,\n", - " 1164669, 1156235, 1156111, 1167189, 1164559, 1145948, 1145945, 1155476,\n", - " 1151014, 1153514, 1153519, 1146870, 1146873, 1138161, 1164006, 1156795,\n", - " 1149956, 1154590, 1139286, 1166073, 1171518, 1146063, 1158878, 1140641,\n", - " 1140643, 1141867, 1148600, 1148603, 1148607, 1164976, 1143143, 1151872,\n", - " 1141792, 1141800, 1156177, 1156181, 1159032, 1159038, 1169105, 1169108,\n", - " 1152247, 1176878, 1155588, 1151227, 1151228, 1163154, 1153924, 1158405,\n", - " 1170581, 1147830, 1164580, 1161241, 1155054, 1151650, 1156739, 1157955,\n", - " 1153649, 1171040, 1144812, 1162085, 1135567, 1142722, 1142733, 1156297,\n", - " 1156303, 1144058, 1145738, 1155312, 1171687, 1138762, 1144972, 1144973,\n", - " 1143037, 1152624, 1155911, 1139344, 1147723, 1145890, 1145900, 1153520,\n", - " 1153535, 1169538, 1171867, 1167503, 1154076, 1147330, 1147339, 1160030,\n", - " 1145674, 1145675, 1151598, 1149130, 1154922, 1144676, 1166653, 1155169,\n", - " 1150518, 1144346, 1144336, 1157534, 1154668, 1135841, 1152997, 1169154,\n", - " 1169162, 1169163, 1157331, 1157340, 1138136, 1169359, 1147502, 1158159,\n", - " 1171529, 1149688, 1158611, 1158623, 1163282, 1172759, 1172642, 1172289,\n", - " 1147416, 1172486, 1152353, 1168371, 1143170, 1168453, 1168404, 1168059,\n", - " 1149402, 1172838, 1148335, 1168465, 1173307, 1173308, 1154019, 1154027,\n", - " 1152152, 1172787, 1159655, 1178422, 1178102, 1157153, 1147711, 1157593,\n", - " 1170495, 1166827, 1162106, 1168398, 1168604, 1193674, 1146765, 1140326,\n", - " 1172932, 1171614, 1144549, 1177688, 1154148, 1149179, 1170122, 1180603,\n", - " 1186117, 1170371, 1168481, 1156556, 1184740, 1170518, 1171122, 1179715,\n", - " 1189183, 1171407, 1151509, 1179807, 1159914, 1155262, 1154718, 1157792,\n", - " 1157803, 1171629, 1171623, 1157991, 1158249, 1153899, 1153892, 1134651,\n", - " 1162938, 1145626, 1172024, 1149755, 1152279, 1186957, 1158512, 1158520,\n", - " 1179636, 1158379, 1155899, 1157270, 1188461, 1140393, 1170605, 1162253,\n", - " 1159340, 1160078, 1170341, 1147180, 1147182, 1182158, 1170417, 1192748,\n", - " 1156528, 1156539, 1170823, 1139831, 1139837, 1150265, 1154812, 1149668,\n", - " 1183956, 1189685, 1156049, 1156055, 1191518, 1189322, 1191201, 1176054,\n", - " 1166324, 1188535, 1188043, 1181283, 1153733, 1185764, 1152113, 1179006,\n", - " 1169707, 1166838, 1171201, 1193063, 1181848, 1172423, 1183949, 1152080,\n", - " 1155962, 1181259, 1179769, 1192933, 1157012, 1157022, 1161940],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1140282, 1140285, 1135165, 1135723, 1140788, 1141751, 1141758,\n", - " 1136223, 1141251, 1136969, 1143615, 1139808, 1139811, 1137271, 1138930,\n", - " 1150395, 1146647, 1139609, 1142963, 1149216, 1155689, 1143817, 1147483,\n", - " 1141882, 1142881, 1153938, 1135941, 1146656, 1146661, 1148558, 1136742,\n", - " 1147089, 1147095, 1141909, 1137220, 1155014, 1155019, 1139371, 1147211,\n", - " 1136677, 1150329, 1152427, 1134717, 1136261, 1134807, 1134815, 1138126,\n", - " 1134735, 1135367, 1135202, 1134970, 1141036, 1136289, 1134794, 1138504,\n", - " 1137329, 1136178, 1157103, 1137693, 1136617, 1144395, 1137521, 1137529,\n", - " 1137534, 1136716, 1157405, 1136204, 1156159, 1139162, 1135582, 1141086,\n", - " 1155075, 1138514, 1153089, 1153094, 1137953, 1137957, 1137959, 1138590,\n", - " 1158136, 1135499, 1154128, 1145120, 1136982, 1156899, 1156908, 1135522,\n", - " 1135535, 1139684, 1139685, 1138314, 1139874, 1139878, 1157703, 1138436,\n", - " 1138440, 1138451, 1138461, 1154787, 1136594, 1154106, 1158391, 1149328,\n", - " 1156605, 1156606, 1147112, 1142611, 1142615, 1160825, 1135618, 1135625,\n", - " 1137422, 1139846, 1159868, 1139667, 1139673, 1139674, 1138079, 1142249,\n", - " 1134992, 1134778, 1142793, 1139755, 1136730, 1136728, 1140199, 1144410,\n", - " 1153543, 1136067, 1139925, 1138648, 1134891, 1155648, 1140557, 1141992,\n", - " 1152044, 1136051, 1137734, 1147316, 1140901, 1140904, 1134750, 1135549,\n", - " 1141088, 1141099, 1148996, 1149001, 1139889, 1143767, 1154860, 1143704,\n", - " 1139025, 1140003, 1149979, 1146834, 1146847, 1152704, 1141695, 1135861,\n", - " 1136418, 1136426, 1140469, 1142937, 1141223, 1139386, 1141657, 1142160,\n", - " 1136917, 1143675, 1137190, 1140601, 1141156, 1141785, 1139495, 1141609,\n", - " 1144650, 1134985, 1136862, 1147850, 1137074, 1144420, 1142056, 1139276,\n", - " 1139279, 1138472, 1137761, 1137762, 1148872, 1137062, 1138708, 1140100,\n", - " 1140110, 1143107, 1144596, 1157410, 1136871, 1136864, 1141204, 1141209,\n", - " 1144042, 1140885, 1135315, 1135322, 1150906, 1158703, 1147153, 1149193,\n", - " 1141365, 1153068, 1140815, 1149101, 1138288, 1138292, 1138293, 1144279,\n", - " 1143917, 1139510, 1139773, 1139662, 1144998, 1146695, 1135049, 1147050,\n", - " 1147047, 1149876, 1143543, 1143551, 1152976, 1135459, 1135466, 1141925,\n", - " 1146901, 1144242, 1145339, 1141853, 1150689, 1138728, 1140702, 1136891,\n", - " 1134861, 1143851, 1146024, 1150601, 1138085, 1154332, 1141646, 1141585,\n", - " 1149928, 1149933, 1139990, 1150429, 1143883, 1147543, 1147540, 1148763,\n", - " 1147282, 1136160, 1138923, 1157718, 1136836, 1165629, 1139329, 1142159,\n", - " 1143345, 1144615, 1140844, 1144088, 1150761, 1150760, 1146514, 1146516,\n", - " 1146523, 1143007, 1140482, 1143937, 1143807, 1143795, 1146636, 1140361,\n", - " 1140364, 1137990, 1143080, 1168921, 1168927, 1168913, 1144732, 1147984,\n", - " 1147985, 1147992, 1147996, 1144013, 1139249, 1147131, 1147233, 1147241,\n", - " 1148704, 1148475, 1148473, 1147056, 1147061, 1149725, 1147970, 1145012,\n", - " 1147194, 1147198, 1147196, 1158226, 1147880, 1146178, 1149263, 1148940,\n", - " 1151856, 1144514, 1145835, 1152013, 1144203, 1154816, 1147794, 1147796,\n", - " 1151473, 1152022, 1154263, 1135513, 1139914, 1134869, 1148278, 1147016,\n", - " 1147021, 1152804, 1141941, 1141949, 1141193, 1147770, 1146400, 1148288,\n", - " 1137724, 1139096, 1154420, 1148180, 1136251, 1138404, 1157983, 1144110,\n", - " 1146549, 1139938, 1143980, 1143983, 1148204, 1141737, 1141733, 1153124,\n", - " 1153188, 1145104, 1144851, 1143129, 1147447, 1147442, 1135311, 1154183,\n", - " 1148505, 1146571, 1141420, 1152799, 1151350, 1145080, 1149385, 1146261,\n", - " 1146623, 1151692, 1152100, 1152103, 1153026, 1153038, 1150085, 1137746,\n", - " 1146304, 1136410, 1136411, 1152826, 1155337, 1155334, 1157826, 1154633,\n", - " 1151582, 1151573, 1151617, 1151629, 1136131, 1136788, 1152958, 1138979,\n", - " 1152903, 1173495, 1152341, 1146816, 1156831, 1156816, 1153311, 1138281,\n", - " 1152300, 1156007, 1136028, 1156608, 1156621, 1142777, 1143475, 1153915,\n", - " 1150150, 1150164, 1142257, 1148040, 1148041, 1155222, 1158477, 1148628,\n", - " 1158530, 1158540, 1149947, 1157515, 1135698, 1142041, 1157459, 1139225,\n", - " 1135430, 1135434, 1158854, 1156505, 1145191, 1157554, 1150465, 1152738,\n", - " 1150819, 1150830, 1147810, 1158304, 1158306, 1158308, 1155441, 1150130,\n", - " 1154529, 1145771, 1153994, 1156269, 1151379, 1137908, 1140189, 1140186,\n", - " 1152527, 1149324, 1149321, 1151424, 1158096, 1154763, 1155628, 1155630,\n", - " 1155631, 1156563, 1154555, 1158824, 1158829, 1158325, 1154035, 1157001,\n", - " 1153368, 1153363, 1161391, 1154080, 1143189, 1150371, 1157439, 1141620,\n", - " 1155293, 1153786, 1159116, 1159115, 1145694, 1140914, 1134677, 1135601,\n", - " 1145507, 1148149, 1155848, 1146321, 1144451, 1167618, 1140368, 1155884,\n", - " 1157733, 1157740, 1157033, 1144843, 1142466, 1142479, 1155975, 1156957,\n", - " 1158846, 1162538, 1149705, 1149700, 1154600, 1155938, 1153490, 1153503,\n", - " 1136896, 1171171, 1140213, 1158447, 1158444, 1156774, 1156778, 1158285,\n", - " 1158278, 1152458, 1151615, 1156666, 1156488, 1153808, 1156278, 1136640,\n", - " 1136646, 1134757, 1140049, 1158558, 1153827, 1161163, 1165497, 1146113,\n", - " 1146126, 1165778, 1159946, 1138101, 1155871, 1144581, 1161539, 1142658,\n", - " 1157758, 1167346, 1159042, 1159052, 1165838, 1167592, 1153052, 1153045,\n", - " 1164669, 1156235, 1156111, 1167189, 1164559, 1145948, 1145945, 1155476,\n", - " 1151014, 1153514, 1153519, 1146870, 1146873, 1138161, 1164006, 1156795,\n", - " 1149956, 1154590, 1139286, 1166073, 1171518, 1146063, 1158878, 1140641,\n", - " 1140643, 1141867, 1148600, 1148603, 1148607, 1164976, 1143143, 1151872,\n", - " 1141792, 1141800, 1156177, 1156181, 1159032, 1159038, 1169105, 1169108,\n", - " 1152247, 1176878, 1155588, 1151227, 1151228, 1163154, 1153924, 1158405,\n", - " 1170581, 1147830, 1164580, 1161241, 1155054, 1151650, 1156739, 1157955,\n", - " 1153649, 1171040, 1144812, 1162085, 1135567, 1142722, 1142733, 1156297,\n", - " 1156303, 1144058, 1145738, 1155312, 1171687, 1138762, 1144972, 1144973,\n", - " 1143037, 1152624, 1155911, 1139344, 1147723, 1145890, 1145900, 1153520,\n", - " 1153535, 1169538, 1171867, 1167503, 1154076, 1147330, 1147339, 1160030,\n", - " 1145674, 1145675, 1151598, 1149130, 1154922, 1144676, 1166653, 1155169,\n", - " 1150518, 1144346, 1144336, 1157534, 1154668, 1135841, 1152997, 1169154,\n", - " 1169162, 1169163, 1157331, 1157340, 1138136, 1169359, 1147502, 1158159,\n", - " 1171529, 1149688, 1158611, 1158623, 1163282, 1172759, 1172642, 1172289,\n", - " 1147416, 1172486, 1152353, 1168371, 1143170, 1168453, 1168404, 1168059,\n", - " 1149402, 1172838, 1148335, 1168465, 1173307, 1173308, 1154019, 1154027,\n", - " 1152152, 1172787, 1159655, 1178422, 1178102, 1157153, 1147711, 1157593,\n", - " 1170495, 1166827, 1162106, 1168398, 1168604, 1193674, 1146765, 1140326,\n", - " 1172932, 1171614, 1144549, 1177688, 1154148, 1149179, 1170122, 1180603,\n", - " 1186117, 1170371, 1168481, 1156556, 1184740, 1170518, 1171122, 1179715,\n", - " 1189183, 1171407, 1151509, 1179807, 1159914, 1155262, 1154718, 1157792,\n", - " 1157803, 1171629, 1171623, 1157991, 1158249, 1153899, 1153892, 1134651,\n", - " 1162938, 1145626, 1172024, 1149755, 1152279, 1186957, 1158512, 1158520,\n", - " 1179636, 1158379, 1155899, 1157270, 1188461, 1140393, 1170605, 1162253,\n", - " 1159340, 1160078, 1170341, 1147180, 1147182, 1182158, 1170417, 1192748,\n", - " 1156528, 1156539, 1170823, 1139831, 1139837, 1150265, 1154812, 1149668,\n", - " 1183956, 1189685, 1156049, 1156055, 1191518, 1189322, 1191201, 1176054,\n", - " 1166324, 1188535, 1188043, 1181283, 1153733, 1185764, 1152113, 1179006,\n", - " 1169707, 1166838, 1171201, 1193063, 1181848, 1172423, 1183949, 1152080,\n", - " 1155962, 1181259, 1179769, 1192933, 1157012, 1157022, 1161940],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1197841, 1198237, 1198769, 1199424, 1195393, 1199282, 1199293,\n", - " 1202255, 1201577, 1201582, 1194626, 1201016, 1197351, 1202803, 1198557,\n", - " 1194866, 1194783, 1194782, 1197158, 1194649, 1194642, 1195514, 1195263,\n", - " 1196534, 1201989, 1201992, 1194952, 1194882, 1199172, 1199171, 1195740,\n", - " 1198987, 1195313, 1195325, 1196835, 1195988, 1198260, 1195571, 1195970,\n", - " 1198958, 1198163, 1198167, 1198161, 1196711, 1199823, 1195145, 1195148,\n", - " 1195278, 1197140, 1197265, 1197273, 1196109, 1194859, 1196742, 1195841,\n", - " 1195038, 1195039, 1195659, 1202916, 1197253, 1197641, 1200037, 1198273,\n", - " 1198282, 1200949, 1197129, 1197291, 1199185, 1194928, 1199628, 1197676,\n", - " 1197990, 1202457, 1202448, 1200131, 1200866, 1200869, 1198406, 1194795,\n", - " 1198763, 1200060, 1201511, 1196496, 1196498, 1200670, 1199021, 1197601,\n", - " 1201116, 1196727, 1195771, 1195773, 1200894, 1198428, 1198811, 1200774,\n", - " 1201824, 1201827, 1200450, 1200507, 1198066, 1201421, 1202630, 1200991,\n", - " 1201056, 1198485, 1202641, 1201042, 1203350, 1200553, 1200555, 1202138,\n", - " 1199908, 1200194, 1196779, 1201451, 1201442, 1201029, 1202239, 1199976,\n", - " 1197546, 1195885, 1200181, 1201291, 1196761, 1201590, 1202209, 1200388,\n", - " 1198562, 1200784, 1200785, 1199606, 1195438, 1195676, 1195679, 1195664,\n", - " 1200445, 1198929, 1200684, 1198911, 1195415, 1197820, 1197822, 1197821,\n", - " 1202433, 1198299, 1203102, 1201138, 1194730, 1198824, 1197735, 1200437,\n", - " 1199786, 1200465, 1200468, 1195070, 1201886, 1197652, 1195082, 1197039,\n", - " 1194908], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1197841, 1198237, 1198769, 1199424, 1195393, 1199282, 1199293,\n", - " 1202255, 1201577, 1201582, 1194626, 1201016, 1197351, 1202803, 1198557,\n", - " 1194866, 1194783, 1194782, 1197158, 1194649, 1194642, 1195514, 1195263,\n", - " 1196534, 1201989, 1201992, 1194952, 1194882, 1199172, 1199171, 1195740,\n", - " 1198987, 1195313, 1195325, 1196835, 1195988, 1198260, 1195571, 1195970,\n", - " 1198958, 1198163, 1198167, 1198161, 1196711, 1199823, 1195145, 1195148,\n", - " 1195278, 1197140, 1197265, 1197273, 1196109, 1194859, 1196742, 1195841,\n", - " 1195038, 1195039, 1195659, 1202916, 1197253, 1197641, 1200037, 1198273,\n", - " 1198282, 1200949, 1197129, 1197291, 1199185, 1194928, 1199628, 1197676,\n", - " 1197990, 1202457, 1202448, 1200131, 1200866, 1200869, 1198406, 1194795,\n", - " 1198763, 1200060, 1201511, 1196496, 1196498, 1200670, 1199021, 1197601,\n", - " 1201116, 1196727, 1195771, 1195773, 1200894, 1198428, 1198811, 1200774,\n", - " 1201824, 1201827, 1200450, 1200507, 1198066, 1201421, 1202630, 1200991,\n", - " 1201056, 1198485, 1202641, 1201042, 1203350, 1200553, 1200555, 1202138,\n", - " 1199908, 1200194, 1196779, 1201451, 1201442, 1201029, 1202239, 1199976,\n", - " 1197546, 1195885, 1200181, 1201291, 1196761, 1201590, 1202209, 1200388,\n", - " 1198562, 1200784, 1200785, 1199606, 1195438, 1195676, 1195679, 1195664,\n", - " 1200445, 1198929, 1200684, 1198911, 1195415, 1197820, 1197822, 1197821,\n", - " 1202433, 1198299, 1203102, 1201138, 1194730, 1198824, 1197735, 1200437,\n", - " 1199786, 1200465, 1200468, 1195070, 1201886, 1197652, 1195082, 1197039,\n", - " 1194908], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 3.3911e-01, -1.0380e-03, 1.0230e+00, ..., 9.1072e-03,\n", - " -1.3959e-03, -7.7642e-03],\n", - " [ 2.7784e-01, -5.0825e-04, 8.1699e-01, ..., 3.1564e-02,\n", - " -1.7853e-03, -6.3839e-03],\n", - " [ 1.2373e-01, -1.0662e-04, 3.8608e-01, ..., 1.1688e-01,\n", - " -2.3707e-03, -3.5367e-03],\n", - " ...,\n", - " [ 2.4233e-01, -5.4782e-04, 7.2905e-01, ..., 2.7940e-02,\n", - " -1.4443e-03, -5.6577e-03],\n", - " [ 1.4055e-01, -2.4367e-04, 4.7885e-01, ..., 7.0312e-02,\n", - " -1.7223e-03, -4.2647e-03],\n", - " [ 1.4588e-01, 1.5803e-02, 4.7424e-01, ..., 4.6686e-02,\n", - " -1.5845e-03, -3.8815e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[-1.8701e-02, 5.6408e-01, 9.9881e-01, ..., 2.3569e-01,\n", - " -2.1962e-02, -1.5710e-02],\n", - " [-2.4060e-03, 1.0735e+00, -2.7980e-03, ..., 2.9895e-01,\n", - " -1.4745e-02, 2.4370e-01],\n", - " [-9.2513e-03, 5.0768e-01, 3.8939e-01, ..., -1.6073e-02,\n", - " -1.8069e-02, -1.0752e-02],\n", - " ...,\n", - " [-9.7284e-03, 7.9098e-01, 2.1324e+00, ..., 3.6094e-01,\n", - " -2.6096e-02, -5.1338e-03],\n", - " [-4.3123e-02, -2.3011e-02, 3.3809e+00, ..., -2.1503e-02,\n", - " -3.5733e-02, -5.8285e-02],\n", - " [-1.2906e-02, 3.4550e+00, 2.1493e+00, ..., 5.4525e+00,\n", - " -5.2156e-02, 2.7993e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-4.3015e-04, 2.5470e-02, 1.1271e-01, ..., 1.5203e-01,\n", - " 8.2885e-04, -7.0725e-04],\n", - " [-4.7034e-03, 2.6457e-01, 2.0252e-01, ..., 1.1071e+00,\n", - " -1.0905e-04, -4.7399e-03],\n", - " [-3.2202e-03, 1.7131e-01, 6.1445e-02, ..., 1.0744e+00,\n", - " 2.2800e-01, -2.5187e-03],\n", - " ...,\n", - " [-4.3015e-04, 2.5470e-02, 1.1271e-01, ..., 1.5203e-01,\n", - " 8.2885e-04, -7.0725e-04],\n", - " [-4.3015e-04, 2.5470e-02, 1.1271e-01, ..., 1.5203e-01,\n", - " 8.2885e-04, -7.0725e-04],\n", - " [-8.8293e-04, 3.3043e-02, 1.8683e-01, ..., 1.0473e+00,\n", - " 5.4548e-01, 3.9458e-02]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-3.0041e-03, 4.2921e-01, 6.4813e-02, ..., -6.0126e-03,\n", - " 3.0122e-01, 3.2568e-01],\n", - " [-2.1251e-03, 3.8816e-01, 3.4145e-02, ..., -6.7008e-03,\n", - " 3.1761e-01, 2.2978e-01],\n", - " [ 9.3479e-02, 5.4368e-01, 2.0675e-01, ..., -7.6903e-03,\n", - " 3.0528e-01, -1.3595e-03],\n", - " ...,\n", - " [-2.5331e-03, 4.1668e-01, 1.3420e-02, ..., -4.4516e-03,\n", - " 2.3936e-01, 2.2357e-01],\n", - " [-1.5015e-03, 3.6007e-01, -1.5335e-04, ..., -6.8874e-03,\n", - " 3.4390e-01, 7.4107e-02],\n", - " [ 1.0712e-01, 6.3182e-01, 2.2472e-01, ..., -9.7342e-03,\n", - " 4.6627e-01, -6.3621e-04]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 101, 143, 105, 194, 19, 19, 531, 562, 268, 408, 477, 400,\n", - " 686, 383, 506, 305, 402, 496, 350, 487, 365, 686, 686, 352,\n", - " 449, 450, 450, 672, 575, 575, 575, 977, 843, 943, 772, 772,\n", - " 1039, 977, 977, 976, 1009, 1316, 1183, 1085, 1085, 1286, 1263, 1336,\n", - " 1336, 999, 1449, 1449, 1449, 1449, 1449, 1449, 1614, 1614, 1768, 1445,\n", - " 1588, 1637, 1758, 1837, 1742, 1623, 1623, 1835, 1758, 1602, 1817, 1817,\n", - " 1817, 1817, 1624, 1624, 2033, 1891, 1708, 1888, 1891, 1915, 1962, 2052,\n", - " 2052, 2085, 1882, 1924, 1924, 1924, 1924, 1924, 1924, 2173, 2144, 2087,\n", - " 2232, 2155, 2174, 2206, 2336, 2351, 2276, 2329, 2274, 2274, 2150, 2327,\n", - " 2365, 2365, 2448, 2535, 2535, 2535, 2544, 2544, 2502, 2707, 2548, 2515,\n", - " 2594, 2667, 2515, 2515, 2823, 2938, 2938, 2988, 2988, 3275, 2983, 3121,\n", - " 3005, 3275, 3275, 3275, 3275, 3275, 3275, 2830, 2830, 2830, 3172, 3308,\n", - " 3341, 3305, 3429, 3429, 3531, 3587, 3619, 3619, 3870, 3673, 4130, 3793,\n", - " 4108, 4066, 4166, 4273, 4273, 4366, 4239, 4372, 4427, 4239, 4408, 4427,\n", - " 4467, 4462, 4526, 4487, 4516, 4618, 4594, 4585, 4585, 4715, 4715, 4657,\n", - " 4657, 4657, 4657, 4816, 4816, 4639, 4903, 4949, 4979, 5194, 5036, 5388,\n", - " 5230, 5249, 5229, 5336, 5224, 5193, 5274, 5274, 5505, 5593, 5709, 5457,\n", - " 5581, 5528, 5636, 5652, 5541, 5541, 5807, 5769, 5894, 5899, 5847, 5781,\n", - " 5785, 5672, 5793, 6209, 5799, 6040, 5799, 5799, 6143, 6143, 6143, 6120,\n", - " 6120, 6120, 6212, 6212, 6297, 6210, 6210, 6210, 6428, 6038, 6197, 6186,\n", - " 6628, 6493, 6361, 6614, 6580, 6777, 6711, 6563, 6591, 6522, 6421, 6421,\n", - " 6774, 6774, 6467, 6732, 6812, 6812, 6835, 6843, 6738, 6709, 6709, 6764,\n", - " 6764],\n", - " [ 16, 102, 102, 90, 13, 107, 135, 85, 92, 71, 118, 157,\n", - " 38, 26, 2, 6, 89, 138, 128, 25, 97, 75, 52, 123,\n", - " 70, 76, 39, 109, 120, 74, 70, 106, 60, 10, 34, 6,\n", - " 102, 38, 12, 89, 140, 115, 3, 73, 37, 21, 36, 6,\n", - " 128, 95, 129, 50, 26, 157, 133, 57, 93, 63, 55, 97,\n", - " 141, 70, 113, 137, 40, 18, 159, 23, 68, 37, 24, 35,\n", - " 148, 69, 144, 111, 4, 84, 72, 23, 20, 2, 16, 28,\n", - " 22, 33, 36, 89, 17, 47, 0, 9, 94, 142, 8, 126,\n", - " 46, 7, 7, 96, 11, 159, 101, 61, 34, 118, 89, 2,\n", - " 54, 27, 55, 51, 101, 145, 70, 82, 2, 67, 105, 73,\n", - " 122, 19, 139, 37, 160, 150, 108, 99, 27, 132, 1, 118,\n", - " 20, 15, 119, 110, 81, 125, 45, 160, 124, 84, 89, 11,\n", - " 156, 101, 153, 112, 160, 112, 80, 130, 135, 83, 135, 41,\n", - " 101, 131, 33, 6, 58, 136, 9, 64, 98, 154, 118, 138,\n", - " 118, 101, 158, 7, 7, 23, 89, 65, 6, 32, 70, 103,\n", - " 91, 136, 87, 155, 94, 26, 23, 89, 7, 126, 70, 76,\n", - " 5, 59, 8, 10, 146, 41, 111, 44, 49, 30, 31, 53,\n", - " 23, 114, 117, 127, 15, 23, 97, 12, 78, 12, 149, 42,\n", - " 116, 77, 101, 65, 89, 62, 152, 88, 89, 45, 9, 44,\n", - " 111, 66, 134, 143, 43, 11, 89, 56, 151, 129, 86, 89,\n", - " 38, 101, 79, 52, 89, 147, 3, 90, 121, 48, 89, 49,\n", - " 100, 10, 55, 104, 22, 89, 44, 29, 113, 89, 88, 14,\n", - " 3]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 645, 430, 6209, ..., 2327, 328, 3122],\n", - " [ 2, 195, 195, ..., 6106, 6137, 6137]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 2, 138, 44, ..., 101, 26, 6],\n", - " [ 42, 55, 231, ..., 6852, 6643, 6847]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 227, 227, 227, ..., 6209, 6209, 6191],\n", - " [ 54, 169, 318, ..., 788, 296, 66]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 69, 410, 441, ..., 704, 296, 494],\n", - " [ 242, 196, 224, ..., 6091, 6119, 6205]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4119, 1782, 412, ..., 5641, 5492, 5834],\n", - " [ 75, 42, 121, ..., 6762, 6562, 6799]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 227, 227, 227, ..., 6225, 6249, 6249],\n", - " [4319, 4578, 4317, ..., 3988, 530, 444]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 19, 19, 19, ..., 6736, 6736, 6736],\n", - " [ 75, 722, 4359, ..., 5709, 5641, 5456]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006915\n", - "sampling 0.006757\n", - "noi time: 0.002705\n", - "get_vertex_data call: 0.032651\n", - "noi group time: 0.003273\n", - "eoi_group_time: 0.01341\n", - "second half: 0.213161\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 14488, 31145, ..., 1116000, 1128742, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 14488, 31145, ..., 1116000, 1128742, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208576, 1219070, 1203800, ..., 1925027, 1930686, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208576, 1219070, 1203800, ..., 1925027, 1930686, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137435, 1141424, 1136228, 1140285, 1136347, 1137784, 1137791, 1140799,\n", - " 1141756, 1141758, 1137506, 1138335, 1142807, 1139462, 1136969, 1138897,\n", - " 1143615, 1149824, 1137937, 1137947, 1145992, 1138942, 1143372, 1143363,\n", - " 1146640, 1146646, 1139615, 1139966, 1140781, 1150509, 1142964, 1139866,\n", - " 1148584, 1149216, 1149228, 1155686, 1155689, 1143820, 1147473, 1147477,\n", - " 1147483, 1141882, 1153940, 1144636, 1149033, 1149038, 1146995, 1134697,\n", - " 1148346, 1146472, 1136122, 1136125, 1152666, 1152669, 1148546, 1137220,\n", - " 1150555, 1155014, 1147211, 1150329, 1152416, 1134710, 1138742, 1140540,\n", - " 1140542, 1138112, 1138126, 1138356, 1153463, 1134720, 1140020, 1135367,\n", - " 1135202, 1135210, 1140753, 1136289, 1134794, 1137329, 1143068, 1157103,\n", - " 1136619, 1144395, 1157398, 1152376, 1136662, 1137441, 1141083, 1138524,\n", - " 1153099, 1138576, 1145125, 1139684, 1139685, 1138305, 1138319, 1137286,\n", - " 1138440, 1138445, 1138461, 1137920, 1137924, 1136594, 1138702, 1138882,\n", - " 1156603, 1156606, 1147112, 1147119, 1142611, 1135025, 1135359, 1135631,\n", - " 1156141, 1138177, 1138185, 1145843, 1148531, 1148533, 1135769, 1139667,\n", - " 1134992, 1142433, 1135779, 1135782, 1159009, 1144410, 1143625, 1140034,\n", - " 1139933, 1152042, 1152044, 1137734, 1137728, 1134750, 1136993, 1138255,\n", - " 1135549, 1141088, 1141097, 1141098, 1141980, 1135291, 1139632, 1143767,\n", - " 1154860, 1139025, 1139033, 1140003, 1140009, 1146832, 1142499, 1152719,\n", - " 1135860, 1135861, 1135862, 1141223, 1139386, 1136917, 1139730, 1145066,\n", - " 1144237, 1140598, 1140592, 1141161, 1141786, 1139495, 1144937, 1141609,\n", - " 1136848, 1138482, 1142053, 1141821, 1143153, 1138469, 1149111, 1158600,\n", - " 1141479, 1138713, 1138708, 1140110, 1142924, 1142913, 1138423, 1138424,\n", - " 1148263, 1136864, 1140882, 1141399, 1140432, 1144182, 1144179, 1161093,\n", - " 1166711, 1146201, 1139559, 1158698, 1158700, 1147153, 1149186, 1149197,\n", - " 1141365, 1141367, 1141375, 1153068, 1138293, 1144279, 1143917, 1139510,\n", - " 1139653, 1139127, 1140976, 1140990, 1141555, 1147050, 1147047, 1145873,\n", - " 1152976, 1152982, 1135457, 1141925, 1144242, 1137149, 1150692, 1136885,\n", - " 1143643, 1137571, 1137570, 1141380, 1143851, 1136275, 1146024, 1141646,\n", - " 1139990, 1143293, 1143294, 1151124, 1147543, 1147146, 1147282, 1142821,\n", - " 1142816, 1136330, 1149155, 1139417, 1149608, 1143051, 1148406, 1148414,\n", - " 1136161, 1142584, 1136836, 1139329, 1139328, 1141496, 1138235, 1142159,\n", - " 1143345, 1144611, 1140846, 1135876, 1135813, 1150296, 1138013, 1143456,\n", - " 1143007, 1142003, 1143937, 1147574, 1146636, 1140364, 1149582, 1137990,\n", - " 1144219, 1147984, 1147999, 1134902, 1144013, 1139252, 1139255, 1145462,\n", - " 1148704, 1143302, 1142700, 1141327, 1146745, 1146751, 1153701, 1143434,\n", - " 1147056, 1147027, 1145021, 1145009, 1143921, 1147880, 1145237, 1145751,\n", - " 1142377, 1142378, 1148397, 1146178, 1151242, 1148223, 1151182, 1151179,\n", - " 1150438, 1150445, 1149258, 1155005, 1151860, 1144514, 1144526, 1141349,\n", - " 1144202, 1151480, 1152023, 1152024, 1154263, 1145256, 1135516, 1139919,\n", - " 1146723, 1146731, 1140566, 1140402, 1147019, 1158949, 1141949, 1148744,\n", - " 1148448, 1149412, 1147866, 1154420, 1151363, 1136249, 1148720, 1148724,\n", - " 1148729, 1147627, 1149810, 1151941, 1153135, 1153192, 1153188, 1159828,\n", - " 1159837, 1150932, 1150935, 1143092, 1150356, 1155088, 1141012, 1147442,\n", - " 1151906, 1151918, 1148500, 1141420, 1136002, 1147737, 1149376, 1148949,\n", - " 1146966, 1146969, 1146975, 1146967, 1153255, 1146623, 1167276, 1151401,\n", - " 1135688, 1152415, 1152100, 1151729, 1156325, 1153032, 1153038, 1137746,\n", - " 1146304, 1152622, 1140521, 1152819, 1152826, 1154119, 1154123, 1157847,\n", - " 1157839, 1154633, 1151617, 1145278, 1148916, 1152958, 1150613, 1152233,\n", - " 1151309, 1138275, 1138279, 1138281, 1136028, 1158712, 1151187, 1152928,\n", - " 1166850, 1150172, 1148040, 1155202, 1152601, 1145656, 1149794, 1137048,\n", - " 1158473, 1148628, 1158530, 1137458, 1147646, 1142041, 1154377, 1150960,\n", - " 1158860, 1148890, 1158916, 1156500, 1156505, 1157064, 1157069, 1152833,\n", - " 1145191, 1150465, 1135231, 1142216, 1135729, 1135730, 1156629, 1151788,\n", - " 1151777, 1165703, 1156935, 1156940, 1153413, 1147812, 1151469, 1139525,\n", - " 1158306, 1158311, 1151271, 1155441, 1155442, 1155452, 1153359, 1150132,\n", - " 1150136, 1144366, 1145773, 1145606, 1142755, 1142758, 1157642, 1151379,\n", - " 1158639, 1155360, 1156649, 1155122, 1152527, 1157183, 1149320, 1151424,\n", - " 1146920, 1156463, 1155628, 1154555, 1155576, 1158824, 1158325, 1155646,\n", - " 1143254, 1154250, 1154240, 1152307, 1154909, 1143189, 1150371, 1157439,\n", - " 1147916, 1150077, 1155613, 1150805, 1143517, 1157928, 1137167, 1158112,\n", - " 1156764, 1153786, 1137317, 1135601, 1162226, 1178445, 1158670, 1138215,\n", - " 1149145, 1140633, 1140632, 1152220, 1159213, 1156699, 1156692, 1156027,\n", - " 1157735, 1144843, 1142475, 1155975, 1158846, 1156812, 1149700, 1159790,\n", - " 1153491, 1158760, 1158882, 1158886, 1140215, 1157304, 1158815, 1158285,\n", - " 1155246, 1152463, 1151615, 1136487, 1154393, 1152143, 1153808, 1136640,\n", - " 1179174, 1162167, 1147781, 1158547, 1165497, 1146126, 1138110, 1154342,\n", - " 1158006, 1150011, 1155521, 1161539, 1142487, 1142666, 1159071, 1142426,\n", - " 1142427, 1158295, 1158300, 1160563, 1153052, 1171551, 1155769, 1155771,\n", - " 1144158, 1142870, 1163708, 1163711, 1156100, 1142685, 1150046, 1149063,\n", - " 1149070, 1155479, 1153514, 1147300, 1158680, 1138161, 1164006, 1165651,\n", - " 1139782, 1139290, 1166936, 1148771, 1140735, 1146063, 1146356, 1171249,\n", - " 1160189, 1164052, 1170415, 1169493, 1140643, 1148600, 1148603, 1148607,\n", - " 1168081, 1158643, 1158655, 1156177, 1159025, 1159029, 1159032, 1159038,\n", - " 1152247, 1155588, 1160509, 1162552, 1159314, 1156589, 1168426, 1167931,\n", - " 1147393, 1170577, 1146510, 1146509, 1164580, 1152776, 1153201, 1147438,\n", - " 1159386, 1181318, 1156738, 1156739, 1160849, 1153663, 1190200, 1166636,\n", - " 1171040, 1168748, 1144812, 1167253, 1162085, 1168860, 1164750, 1142733,\n", - " 1156303, 1145911, 1166914, 1148683, 1145228, 1167753, 1160232, 1154689,\n", - " 1144972, 1144973, 1166063, 1166053, 1169233, 1165746, 1147357, 1155908,\n", - " 1145900, 1153526, 1168659, 1175240, 1158724, 1154076, 1147338, 1144690,\n", - " 1149122, 1149130, 1171974, 1155170, 1150522, 1156119, 1144336, 1157534,\n", - " 1138378, 1138382, 1190651, 1169157, 1157331, 1138129, 1141051, 1169359,\n", - " 1154364, 1154352, 1158154, 1158611, 1158623, 1149847, 1157385, 1172076,\n", - " 1165903, 1171475, 1147423, 1155494, 1152353, 1170910, 1143858, 1168404,\n", - " 1168413, 1148335, 1177208, 1169273, 1173307, 1145033, 1154027, 1152150,\n", - " 1153755, 1157158, 1157153, 1147697, 1147711, 1148131, 1149247, 1169038,\n", - " 1165120, 1168598, 1193664, 1140326, 1166684, 1150234, 1154148, 1158176,\n", - " 1149169, 1149173, 1183488, 1174194, 1170465, 1181613, 1167657, 1143420,\n", - " 1178344, 1170178, 1169620, 1153803, 1153141, 1171128, 1153628, 1166554,\n", - " 1161255, 1161262, 1155262, 1155105, 1172009, 1157795, 1151488, 1155804,\n", - " 1181928, 1158249, 1153898, 1145626, 1145618, 1189049, 1149753, 1149755,\n", - " 1146252, 1153609, 1153612, 1157772, 1157761, 1155990, 1185327, 1181143,\n", - " 1158512, 1158517, 1155890, 1155899, 1177090, 1162986, 1140399, 1166989,\n", - " 1170632, 1169068, 1162253, 1159341, 1177907, 1182337, 1181469, 1188637,\n", - " 1146161, 1166783, 1147179, 1141516, 1182733, 1168939, 1139831, 1139837,\n", - " 1150265, 1154806, 1154812, 1163848, 1156055, 1170001, 1170000, 1146392,\n", - " 1146394, 1146395, 1194197, 1188232, 1178526, 1168683, 1191340, 1174004,\n", - " 1184464, 1178983, 1171243, 1153729, 1183629, 1162502, 1153585, 1171201,\n", - " 1177368, 1192912, 1183364, 1170128, 1167094, 1161186, 1172423, 1172417,\n", - " 1171953, 1166789, 1145397, 1178135, 1186170, 1152080, 1183147, 1179660,\n", - " 1155959, 1188473, 1191291, 1169833, 1169837, 1167471, 1157017],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137435, 1141424, 1136228, 1140285, 1136347, 1137784, 1137791, 1140799,\n", - " 1141756, 1141758, 1137506, 1138335, 1142807, 1139462, 1136969, 1138897,\n", - " 1143615, 1149824, 1137937, 1137947, 1145992, 1138942, 1143372, 1143363,\n", - " 1146640, 1146646, 1139615, 1139966, 1140781, 1150509, 1142964, 1139866,\n", - " 1148584, 1149216, 1149228, 1155686, 1155689, 1143820, 1147473, 1147477,\n", - " 1147483, 1141882, 1153940, 1144636, 1149033, 1149038, 1146995, 1134697,\n", - " 1148346, 1146472, 1136122, 1136125, 1152666, 1152669, 1148546, 1137220,\n", - " 1150555, 1155014, 1147211, 1150329, 1152416, 1134710, 1138742, 1140540,\n", - " 1140542, 1138112, 1138126, 1138356, 1153463, 1134720, 1140020, 1135367,\n", - " 1135202, 1135210, 1140753, 1136289, 1134794, 1137329, 1143068, 1157103,\n", - " 1136619, 1144395, 1157398, 1152376, 1136662, 1137441, 1141083, 1138524,\n", - " 1153099, 1138576, 1145125, 1139684, 1139685, 1138305, 1138319, 1137286,\n", - " 1138440, 1138445, 1138461, 1137920, 1137924, 1136594, 1138702, 1138882,\n", - " 1156603, 1156606, 1147112, 1147119, 1142611, 1135025, 1135359, 1135631,\n", - " 1156141, 1138177, 1138185, 1145843, 1148531, 1148533, 1135769, 1139667,\n", - " 1134992, 1142433, 1135779, 1135782, 1159009, 1144410, 1143625, 1140034,\n", - " 1139933, 1152042, 1152044, 1137734, 1137728, 1134750, 1136993, 1138255,\n", - " 1135549, 1141088, 1141097, 1141098, 1141980, 1135291, 1139632, 1143767,\n", - " 1154860, 1139025, 1139033, 1140003, 1140009, 1146832, 1142499, 1152719,\n", - " 1135860, 1135861, 1135862, 1141223, 1139386, 1136917, 1139730, 1145066,\n", - " 1144237, 1140598, 1140592, 1141161, 1141786, 1139495, 1144937, 1141609,\n", - " 1136848, 1138482, 1142053, 1141821, 1143153, 1138469, 1149111, 1158600,\n", - " 1141479, 1138713, 1138708, 1140110, 1142924, 1142913, 1138423, 1138424,\n", - " 1148263, 1136864, 1140882, 1141399, 1140432, 1144182, 1144179, 1161093,\n", - " 1166711, 1146201, 1139559, 1158698, 1158700, 1147153, 1149186, 1149197,\n", - " 1141365, 1141367, 1141375, 1153068, 1138293, 1144279, 1143917, 1139510,\n", - " 1139653, 1139127, 1140976, 1140990, 1141555, 1147050, 1147047, 1145873,\n", - " 1152976, 1152982, 1135457, 1141925, 1144242, 1137149, 1150692, 1136885,\n", - " 1143643, 1137571, 1137570, 1141380, 1143851, 1136275, 1146024, 1141646,\n", - " 1139990, 1143293, 1143294, 1151124, 1147543, 1147146, 1147282, 1142821,\n", - " 1142816, 1136330, 1149155, 1139417, 1149608, 1143051, 1148406, 1148414,\n", - " 1136161, 1142584, 1136836, 1139329, 1139328, 1141496, 1138235, 1142159,\n", - " 1143345, 1144611, 1140846, 1135876, 1135813, 1150296, 1138013, 1143456,\n", - " 1143007, 1142003, 1143937, 1147574, 1146636, 1140364, 1149582, 1137990,\n", - " 1144219, 1147984, 1147999, 1134902, 1144013, 1139252, 1139255, 1145462,\n", - " 1148704, 1143302, 1142700, 1141327, 1146745, 1146751, 1153701, 1143434,\n", - " 1147056, 1147027, 1145021, 1145009, 1143921, 1147880, 1145237, 1145751,\n", - " 1142377, 1142378, 1148397, 1146178, 1151242, 1148223, 1151182, 1151179,\n", - " 1150438, 1150445, 1149258, 1155005, 1151860, 1144514, 1144526, 1141349,\n", - " 1144202, 1151480, 1152023, 1152024, 1154263, 1145256, 1135516, 1139919,\n", - " 1146723, 1146731, 1140566, 1140402, 1147019, 1158949, 1141949, 1148744,\n", - " 1148448, 1149412, 1147866, 1154420, 1151363, 1136249, 1148720, 1148724,\n", - " 1148729, 1147627, 1149810, 1151941, 1153135, 1153192, 1153188, 1159828,\n", - " 1159837, 1150932, 1150935, 1143092, 1150356, 1155088, 1141012, 1147442,\n", - " 1151906, 1151918, 1148500, 1141420, 1136002, 1147737, 1149376, 1148949,\n", - " 1146966, 1146969, 1146975, 1146967, 1153255, 1146623, 1167276, 1151401,\n", - " 1135688, 1152415, 1152100, 1151729, 1156325, 1153032, 1153038, 1137746,\n", - " 1146304, 1152622, 1140521, 1152819, 1152826, 1154119, 1154123, 1157847,\n", - " 1157839, 1154633, 1151617, 1145278, 1148916, 1152958, 1150613, 1152233,\n", - " 1151309, 1138275, 1138279, 1138281, 1136028, 1158712, 1151187, 1152928,\n", - " 1166850, 1150172, 1148040, 1155202, 1152601, 1145656, 1149794, 1137048,\n", - " 1158473, 1148628, 1158530, 1137458, 1147646, 1142041, 1154377, 1150960,\n", - " 1158860, 1148890, 1158916, 1156500, 1156505, 1157064, 1157069, 1152833,\n", - " 1145191, 1150465, 1135231, 1142216, 1135729, 1135730, 1156629, 1151788,\n", - " 1151777, 1165703, 1156935, 1156940, 1153413, 1147812, 1151469, 1139525,\n", - " 1158306, 1158311, 1151271, 1155441, 1155442, 1155452, 1153359, 1150132,\n", - " 1150136, 1144366, 1145773, 1145606, 1142755, 1142758, 1157642, 1151379,\n", - " 1158639, 1155360, 1156649, 1155122, 1152527, 1157183, 1149320, 1151424,\n", - " 1146920, 1156463, 1155628, 1154555, 1155576, 1158824, 1158325, 1155646,\n", - " 1143254, 1154250, 1154240, 1152307, 1154909, 1143189, 1150371, 1157439,\n", - " 1147916, 1150077, 1155613, 1150805, 1143517, 1157928, 1137167, 1158112,\n", - " 1156764, 1153786, 1137317, 1135601, 1162226, 1178445, 1158670, 1138215,\n", - " 1149145, 1140633, 1140632, 1152220, 1159213, 1156699, 1156692, 1156027,\n", - " 1157735, 1144843, 1142475, 1155975, 1158846, 1156812, 1149700, 1159790,\n", - " 1153491, 1158760, 1158882, 1158886, 1140215, 1157304, 1158815, 1158285,\n", - " 1155246, 1152463, 1151615, 1136487, 1154393, 1152143, 1153808, 1136640,\n", - " 1179174, 1162167, 1147781, 1158547, 1165497, 1146126, 1138110, 1154342,\n", - " 1158006, 1150011, 1155521, 1161539, 1142487, 1142666, 1159071, 1142426,\n", - " 1142427, 1158295, 1158300, 1160563, 1153052, 1171551, 1155769, 1155771,\n", - " 1144158, 1142870, 1163708, 1163711, 1156100, 1142685, 1150046, 1149063,\n", - " 1149070, 1155479, 1153514, 1147300, 1158680, 1138161, 1164006, 1165651,\n", - " 1139782, 1139290, 1166936, 1148771, 1140735, 1146063, 1146356, 1171249,\n", - " 1160189, 1164052, 1170415, 1169493, 1140643, 1148600, 1148603, 1148607,\n", - " 1168081, 1158643, 1158655, 1156177, 1159025, 1159029, 1159032, 1159038,\n", - " 1152247, 1155588, 1160509, 1162552, 1159314, 1156589, 1168426, 1167931,\n", - " 1147393, 1170577, 1146510, 1146509, 1164580, 1152776, 1153201, 1147438,\n", - " 1159386, 1181318, 1156738, 1156739, 1160849, 1153663, 1190200, 1166636,\n", - " 1171040, 1168748, 1144812, 1167253, 1162085, 1168860, 1164750, 1142733,\n", - " 1156303, 1145911, 1166914, 1148683, 1145228, 1167753, 1160232, 1154689,\n", - " 1144972, 1144973, 1166063, 1166053, 1169233, 1165746, 1147357, 1155908,\n", - " 1145900, 1153526, 1168659, 1175240, 1158724, 1154076, 1147338, 1144690,\n", - " 1149122, 1149130, 1171974, 1155170, 1150522, 1156119, 1144336, 1157534,\n", - " 1138378, 1138382, 1190651, 1169157, 1157331, 1138129, 1141051, 1169359,\n", - " 1154364, 1154352, 1158154, 1158611, 1158623, 1149847, 1157385, 1172076,\n", - " 1165903, 1171475, 1147423, 1155494, 1152353, 1170910, 1143858, 1168404,\n", - " 1168413, 1148335, 1177208, 1169273, 1173307, 1145033, 1154027, 1152150,\n", - " 1153755, 1157158, 1157153, 1147697, 1147711, 1148131, 1149247, 1169038,\n", - " 1165120, 1168598, 1193664, 1140326, 1166684, 1150234, 1154148, 1158176,\n", - " 1149169, 1149173, 1183488, 1174194, 1170465, 1181613, 1167657, 1143420,\n", - " 1178344, 1170178, 1169620, 1153803, 1153141, 1171128, 1153628, 1166554,\n", - " 1161255, 1161262, 1155262, 1155105, 1172009, 1157795, 1151488, 1155804,\n", - " 1181928, 1158249, 1153898, 1145626, 1145618, 1189049, 1149753, 1149755,\n", - " 1146252, 1153609, 1153612, 1157772, 1157761, 1155990, 1185327, 1181143,\n", - " 1158512, 1158517, 1155890, 1155899, 1177090, 1162986, 1140399, 1166989,\n", - " 1170632, 1169068, 1162253, 1159341, 1177907, 1182337, 1181469, 1188637,\n", - " 1146161, 1166783, 1147179, 1141516, 1182733, 1168939, 1139831, 1139837,\n", - " 1150265, 1154806, 1154812, 1163848, 1156055, 1170001, 1170000, 1146392,\n", - " 1146394, 1146395, 1194197, 1188232, 1178526, 1168683, 1191340, 1174004,\n", - " 1184464, 1178983, 1171243, 1153729, 1183629, 1162502, 1153585, 1171201,\n", - " 1177368, 1192912, 1183364, 1170128, 1167094, 1161186, 1172423, 1172417,\n", - " 1171953, 1166789, 1145397, 1178135, 1186170, 1152080, 1183147, 1179660,\n", - " 1155959, 1188473, 1191291, 1169833, 1169837, 1167471, 1157017],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197178, 1199424, 1195394, 1197226, 1197719, 1201094, 1199282, 1198459,\n", - " 1202255, 1197777, 1201016, 1198694, 1196871, 1202804, 1198546, 1198557,\n", - " 1195494, 1196631, 1194649, 1195259, 1195263, 1199135, 1201992, 1196030,\n", - " 1196031, 1201427, 1195888, 1196911, 1199170, 1199171, 1196359, 1196977,\n", - " 1196979, 1197831, 1195325, 1198260, 1195571, 1195265, 1195270, 1195278,\n", - " 1197141, 1197140, 1196109, 1198219, 1195841, 1195850, 1195541, 1202915,\n", - " 1199315, 1197474, 1199352, 1195626, 1196393, 1196283, 1195358, 1198273,\n", - " 1198282, 1196851, 1199628, 1200869, 1200872, 1200404, 1198406, 1195014,\n", - " 1195017, 1199676, 1194795, 1199949, 1200668, 1197970, 1197601, 1197603,\n", - " 1196727, 1196734, 1195773, 1200892, 1200894, 1198425, 1198428, 1199586,\n", - " 1200018, 1199410, 1198811, 1201534, 1201547, 1200450, 1198593, 1202627,\n", - " 1194805, 1198487, 1199539, 1199723, 1201041, 1200363, 1202103, 1196883,\n", - " 1199917, 1200194, 1196779, 1201442, 1197945, 1202239, 1200899, 1200331,\n", - " 1195611, 1201871, 1202209, 1202217, 1196966, 1199606, 1200578, 1195438,\n", - " 1195676, 1195679, 1195664, 1201789, 1195181, 1197496, 1200585, 1200584,\n", - " 1199396, 1198147, 1200003, 1198824, 1197735, 1200437, 1201475, 1199234,\n", - " 1200298, 1200301, 1197648, 1197652, 1197655, 1197335, 1195165, 1196552],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197178, 1199424, 1195394, 1197226, 1197719, 1201094, 1199282, 1198459,\n", - " 1202255, 1197777, 1201016, 1198694, 1196871, 1202804, 1198546, 1198557,\n", - " 1195494, 1196631, 1194649, 1195259, 1195263, 1199135, 1201992, 1196030,\n", - " 1196031, 1201427, 1195888, 1196911, 1199170, 1199171, 1196359, 1196977,\n", - " 1196979, 1197831, 1195325, 1198260, 1195571, 1195265, 1195270, 1195278,\n", - " 1197141, 1197140, 1196109, 1198219, 1195841, 1195850, 1195541, 1202915,\n", - " 1199315, 1197474, 1199352, 1195626, 1196393, 1196283, 1195358, 1198273,\n", - " 1198282, 1196851, 1199628, 1200869, 1200872, 1200404, 1198406, 1195014,\n", - " 1195017, 1199676, 1194795, 1199949, 1200668, 1197970, 1197601, 1197603,\n", - " 1196727, 1196734, 1195773, 1200892, 1200894, 1198425, 1198428, 1199586,\n", - " 1200018, 1199410, 1198811, 1201534, 1201547, 1200450, 1198593, 1202627,\n", - " 1194805, 1198487, 1199539, 1199723, 1201041, 1200363, 1202103, 1196883,\n", - " 1199917, 1200194, 1196779, 1201442, 1197945, 1202239, 1200899, 1200331,\n", - " 1195611, 1201871, 1202209, 1202217, 1196966, 1199606, 1200578, 1195438,\n", - " 1195676, 1195679, 1195664, 1201789, 1195181, 1197496, 1200585, 1200584,\n", - " 1199396, 1198147, 1200003, 1198824, 1197735, 1200437, 1201475, 1199234,\n", - " 1200298, 1200301, 1197648, 1197652, 1197655, 1197335, 1195165, 1196552],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 2.7166e-01, -6.6624e-04, 7.6283e-01, ..., 4.2261e-02,\n", - " -1.6368e-03, -6.4259e-03],\n", - " [ 1.2440e-01, 1.1896e-02, 4.4394e-01, ..., 4.9581e-02,\n", - " -1.6048e-03, -3.6830e-03],\n", - " [ 2.5680e-01, -7.5644e-04, 7.7818e-01, ..., 1.5362e-02,\n", - " -1.4174e-03, -6.2953e-03],\n", - " ...,\n", - " [ 1.3357e-01, -1.3428e-04, 4.4641e-01, ..., 7.9126e-02,\n", - " -2.0698e-03, -3.9609e-03],\n", - " [ 2.4527e-01, -6.1889e-04, 7.8568e-01, ..., 3.5479e-02,\n", - " -1.3998e-03, -6.2447e-03],\n", - " [ 1.0574e-01, 8.1066e-03, 3.4355e-01, ..., 1.1514e-01,\n", - " -2.1978e-03, -3.3640e-03]], device='cuda:0',\n", - " grad_fn=), 'paper': tensor([[ 5.3256e-01, -1.5738e-03, -6.4536e-03, ..., -2.1362e-02,\n", - " -1.6076e-02, 5.4535e-01],\n", - " [-1.6821e-02, -1.8229e-03, 1.3900e+00, ..., -1.3324e-02,\n", - " -1.5903e-02, -2.5575e-02],\n", - " [-1.9902e-02, 8.6717e-01, 7.8586e-01, ..., 1.9996e+00,\n", - " -3.2685e-02, -1.2092e-03],\n", - " ...,\n", - " [-2.4549e-03, 8.0382e-02, -5.2477e-05, ..., -1.2993e-02,\n", - " -1.1811e-02, -8.4573e-04],\n", - " [-2.8461e-05, 1.0928e+00, 4.1688e-01, ..., -1.3034e-02,\n", - " -2.1452e-02, 1.0001e+00],\n", - " [-1.6567e-02, 2.7741e+00, 1.3665e+00, ..., 4.8515e+00,\n", - " -4.6908e-02, 2.1622e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-1.1632e-03, -5.7548e-04, 2.1322e-01, ..., 9.8392e-01,\n", - " 6.5471e-01, 3.7102e-02],\n", - " [-4.5210e-03, 2.0980e-01, -1.9044e-03, ..., 9.0430e-01,\n", - " 2.5834e-01, -2.1857e-03],\n", - " [-1.4966e-03, -6.5163e-04, 1.8839e-01, ..., 9.1722e-01,\n", - " 5.7004e-01, 7.7416e-03],\n", - " ...,\n", - " [-1.0641e-03, 3.3400e-03, 1.5385e-01, ..., 9.2286e-01,\n", - " 6.7033e-01, 4.7099e-02],\n", - " [-4.1291e-04, 2.5003e-02, 1.1413e-01, ..., 1.4594e-01,\n", - " -7.5430e-07, -7.2041e-04],\n", - " [-1.5281e-03, 5.4234e-02, 1.1879e-01, ..., 1.0028e+00,\n", - " 4.4543e-01, -7.9812e-04]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-3.5410e-03, 3.5688e-01, 2.8309e-02, ..., -5.1490e-03,\n", - " 1.7650e-01, 3.0872e-01],\n", - " [-2.6994e-03, 4.7541e-01, 1.1988e-01, ..., -6.4011e-03,\n", - " 3.2744e-01, 3.1050e-01],\n", - " [-2.7097e-03, 2.9853e-01, 2.0284e-02, ..., -4.4888e-03,\n", - " 1.6596e-01, 2.3850e-01],\n", - " ...,\n", - " [-9.4822e-04, 3.8011e-01, 4.0550e-02, ..., -7.0029e-03,\n", - " 3.2242e-01, -3.3939e-04],\n", - " [-2.9459e-03, 4.6030e-01, 1.2337e-01, ..., -6.3149e-03,\n", - " 2.8749e-01, 2.9433e-01],\n", - " [-3.4922e-03, 4.4653e-01, 7.8139e-02, ..., -6.1252e-03,\n", - " 3.2481e-01, 3.4991e-01]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 96, 72, 87, 87, 84, 368, 335, 289, 475, 333, 333, 663,\n", - " 901, 613, 946, 836, 1109, 1053, 1053, 994, 1048, 1048, 924, 1390,\n", - " 1221, 1240, 1057, 1057, 1057, 1405, 1472, 1296, 1457, 1334, 1344, 1442,\n", - " 1238, 1238, 1557, 1557, 1658, 1429, 1429, 1429, 1657, 1657, 1444, 1739,\n", - " 1703, 1709, 1690, 1690, 1917, 1945, 1861, 1908, 1986, 1898, 1858, 1883,\n", - " 2029, 2029, 1838, 2063, 2047, 2400, 2156, 2168, 2238, 2421, 2298, 2298,\n", - " 2337, 2327, 2327, 2327, 2359, 2359, 2359, 2359, 2359, 2324, 2323, 2404,\n", - " 2469, 2506, 2679, 2467, 2467, 2487, 2427, 2950, 2862, 2781, 2781, 2781,\n", - " 3020, 3020, 3020, 2925, 3071, 3071, 3295, 3295, 3014, 3003, 3238, 3082,\n", - " 3202, 3222, 3288, 3162, 3360, 3374, 3138, 3402, 3428, 3406, 3406, 3465,\n", - " 3534, 3548, 3508, 3751, 3638, 3795, 3655, 3655, 3621, 3621, 3678, 3743,\n", - " 3743, 3743, 3743, 3893, 3844, 3844, 3675, 4073, 4180, 4118, 4171, 4173,\n", - " 4239, 4239, 4294, 4316, 4396, 4573, 4617, 4352, 4352, 4555, 4555, 4555,\n", - " 4760, 4709, 4746, 4494, 4979, 4985, 4709, 4709, 5031, 5203, 5101, 5240,\n", - " 5215, 5272, 5257, 5257, 5377, 5452, 5452, 5408, 5542, 5633, 5633, 5521,\n", - " 5588, 5588, 5503, 5389, 5802, 5650, 5850, 5875, 5875, 5875, 5732, 5875,\n", - " 5875, 5875, 5875, 5875, 5999, 6177, 6058, 5969, 6169, 6276, 6276, 6034,\n", - " 6330, 6330],\n", - " [ 56, 95, 27, 38, 66, 64, 34, 6, 72, 58, 77, 77,\n", - " 36, 109, 46, 99, 35, 9, 22, 114, 94, 13, 101, 74,\n", - " 53, 127, 37, 49, 13, 115, 116, 121, 91, 130, 82, 131,\n", - " 17, 47, 131, 106, 12, 84, 112, 125, 78, 1, 94, 30,\n", - " 118, 72, 42, 73, 130, 20, 33, 93, 122, 90, 94, 40,\n", - " 42, 119, 133, 130, 48, 20, 0, 23, 39, 45, 37, 49,\n", - " 17, 71, 101, 80, 70, 79, 52, 78, 116, 7, 82, 22,\n", - " 134, 60, 43, 80, 60, 11, 20, 20, 98, 62, 73, 61,\n", - " 18, 132, 72, 102, 90, 89, 20, 130, 135, 8, 128, 20,\n", - " 50, 85, 104, 129, 110, 20, 117, 6, 20, 71, 101, 91,\n", - " 88, 48, 86, 97, 103, 111, 108, 48, 37, 49, 20, 87,\n", - " 108, 126, 28, 130, 102, 26, 67, 15, 75, 81, 123, 81,\n", - " 4, 93, 20, 20, 54, 29, 10, 37, 22, 71, 101, 60,\n", - " 32, 51, 84, 92, 41, 25, 42, 55, 76, 91, 17, 107,\n", - " 12, 26, 21, 108, 44, 20, 98, 124, 2, 111, 16, 82,\n", - " 34, 22, 31, 69, 120, 3, 24, 65, 68, 8, 105, 57,\n", - " 14, 100, 113, 19, 96, 129, 59, 63, 114, 12, 83, 108,\n", - " 114, 5]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3358, 363, 1034, ..., 6008, 4726, 5860],\n", - " [ 282, 261, 44, ..., 7448, 7369, 7430]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 63, 8, 36, ..., 9, 22, 60],\n", - " [ 66, 47, 170, ..., 6305, 6367, 6332]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 87, 87, 30, ..., 7357, 7357, 7357],\n", - " [ 374, 507, 130, ..., 309, 230, 766]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 389, 469, 695, ..., 280, 398, 704],\n", - " [ 48, 8, 138, ..., 7429, 7459, 7380]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4880, 663, 1893, ..., 7140, 5296, 7464],\n", - " [ 178, 60, 18, ..., 6280, 6359, 6338]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 87, 87, 87, ..., 7357, 7357, 7294],\n", - " [ 777, 765, 1145, ..., 4036, 3903, 2414]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 209, 72, 72, ..., 6276, 6276, 6276],\n", - " [6817, 32, 3336, ..., 5769, 5542, 3670]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006507\n", - "sampling 0.006345\n", - "noi time: 0.002097\n", - "get_vertex_data call: 0.034096\n", - "noi group time: 0.001856\n", - "eoi_group_time: 0.016887\n", - "second half: 0.215198\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27905, 1339, 32616, ..., 1111405, 1133086, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27905, 1339, 32616, ..., 1111405, 1133086, 1119043],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227503, 1210831, 1212861, ..., 1938464, 1937000, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227503, 1210831, 1212861, ..., 1938464, 1937000, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137202, 1137204, 1137212, 1141424, 1136228, 1136237, 1140285, 1135926,\n", - " 1135934, 1135165, 1135167, 1135726, 1137784, 1137791, 1141751, 1141758,\n", - " 1138335, 1140297, 1136969, 1136971, 1141448, 1146803, 1146810, 1138903,\n", - " 1143610, 1149826, 1145370, 1137947, 1138933, 1143372, 1146641, 1139609,\n", - " 1139615, 1145281, 1136950, 1149216, 1149217, 1149228, 1142946, 1142958,\n", - " 1143820, 1147483, 1149283, 1144636, 1149029, 1149038, 1146992, 1146995,\n", - " 1153016, 1134700, 1135940, 1148337, 1146656, 1136742, 1147211, 1150329,\n", - " 1136268, 1138739, 1138742, 1138745, 1137829, 1140537, 1140540, 1140542,\n", - " 1138112, 1138119, 1137254, 1137181, 1149461, 1153456, 1140159, 1134735,\n", - " 1135905, 1140029, 1140947, 1140953, 1135367, 1135202, 1141036, 1134794,\n", - " 1157447, 1143377, 1137329, 1136178, 1157103, 1135333, 1144791, 1144395,\n", - " 1137529, 1137441, 1139161, 1134844, 1141696, 1141702, 1135583, 1141084,\n", - " 1141087, 1136097, 1136101, 1140970, 1140712, 1156342, 1138514, 1138525,\n", - " 1137953, 1158136, 1154132, 1156899, 1139684, 1138314, 1138440, 1138445,\n", - " 1138461, 1138449, 1137493, 1137924, 1158390, 1138846, 1135088, 1135091,\n", - " 1156603, 1156606, 1147112, 1142611, 1135352, 1135359, 1135624, 1148533,\n", - " 1135760, 1135769, 1139667, 1138067, 1136081, 1134992, 1136551, 1148805,\n", - " 1140199, 1158974, 1159009, 1159012, 1141065, 1144406, 1153543, 1140034,\n", - " 1140036, 1137587, 1137592, 1138654, 1141963, 1141966, 1134888, 1146075,\n", - " 1141985, 1152042, 1152044, 1139065, 1137734, 1137741, 1137728, 1134742,\n", - " 1134750, 1138240, 1141088, 1141102, 1148996, 1149001, 1139889, 1139119,\n", - " 1143775, 1154851, 1154857, 1137299, 1143711, 1139025, 1140003, 1140009,\n", - " 1146844, 1142499, 1152709, 1135860, 1141891, 1139386, 1141659, 1136917,\n", - " 1137196, 1137188, 1141156, 1152731, 1141300, 1144650, 1159613, 1134979,\n", - " 1147844, 1147850, 1137074, 1138482, 1141821, 1146796, 1145161, 1140169,\n", - " 1140173, 1139190, 1137057, 1138708, 1142917, 1142913, 1144596, 1142453,\n", - " 1136864, 1135315, 1144182, 1146201, 1158698, 1140501, 1137854, 1147153,\n", - " 1142646, 1149193, 1149197, 1141365, 1151112, 1138293, 1144279, 1139508,\n", - " 1139510, 1139655, 1139127, 1143791, 1140977, 1140990, 1135047, 1143692,\n", - " 1147050, 1147047, 1145873, 1152976, 1152989, 1135471, 1142549, 1142558,\n", - " 1139000, 1141925, 1144242, 1140576, 1140580, 1140581, 1137149, 1150692,\n", - " 1139405, 1137571, 1134861, 1145971, 1145980, 1145974, 1143845, 1136287,\n", - " 1136277, 1146016, 1146024, 1138085, 1139990, 1143283, 1143294, 1147540,\n", - " 1147150, 1148763, 1147282, 1147293, 1149155, 1140337, 1142628, 1142637,\n", - " 1149366, 1139417, 1143051, 1148414, 1157717, 1157720, 1136836, 1136843,\n", - " 1139329, 1139328, 1144957, 1145427, 1158043, 1143345, 1144765, 1140836,\n", - " 1138600, 1135876, 1135813, 1150300, 1138004, 1144376, 1146523, 1138024,\n", - " 1138018, 1143470, 1143471, 1143457, 1143007, 1137703, 1144303, 1144564,\n", - " 1142015, 1147574, 1146631, 1147521, 1140352, 1140364, 1137990, 1148962,\n", - " 1144725, 1144218, 1144222, 1147984, 1147995, 1147999, 1144011, 1139252,\n", - " 1139249, 1147127, 1147131, 1148704, 1148719, 1141827, 1141836, 1146751,\n", - " 1146742, 1152329, 1149722, 1147027, 1139549, 1158226, 1147880, 1154526,\n", - " 1145240, 1145751, 1142369, 1142376, 1142383, 1146159, 1148387, 1151242,\n", - " 1152530, 1152531, 1150438, 1150445, 1149258, 1149777, 1144514, 1144526,\n", - " 1141349, 1141358, 1146884, 1154822, 1147807, 1154263, 1145261, 1134873,\n", - " 1149534, 1148693, 1150127, 1148278, 1147019, 1141949, 1153568, 1153572,\n", - " 1153574, 1148453, 1147653, 1143560, 1143564, 1149412, 1148300, 1147866,\n", - " 1147871, 1154420, 1158794, 1148180, 1136249, 1139721, 1146686, 1148720,\n", - " 1148726, 1144110, 1143983, 1148204, 1153182, 1153124, 1153188, 1145104,\n", - " 1150935, 1144863, 1150356, 1155088, 1155098, 1166968, 1148084, 1148095,\n", - " 1147442, 1151816, 1152581, 1154190, 1150717, 1148510, 1141420, 1141419,\n", - " 1150637, 1145080, 1145086, 1146975, 1146974, 1156402, 1149355, 1146623,\n", - " 1151691, 1151399, 1144476, 1152409, 1152415, 1154051, 1153036, 1137746,\n", - " 1137755, 1146304, 1152622, 1149203, 1151967, 1152826, 1155334, 1154119,\n", - " 1154120, 1154123, 1157839, 1157824, 1152673, 1154633, 1151617, 1151622,\n", - " 1150578, 1150586, 1136131, 1148914, 1148916, 1153387, 1145959, 1143995,\n", - " 1152341, 1153311, 1152297, 1156007, 1136028, 1136026, 1158704, 1156609,\n", - " 1152928, 1151064, 1156399, 1163941, 1142777, 1150150, 1150164, 1149273,\n", - " 1144016, 1148033, 1148035, 1148040, 1154453, 1149300, 1137046, 1137048,\n", - " 1158477, 1148628, 1158530, 1154564, 1142041, 1157227, 1157229, 1157547,\n", - " 1142385, 1158860, 1158857, 1150870, 1150877, 1157064, 1157069, 1139479,\n", - " 1151251, 1151260, 1150465, 1145390, 1152182, 1157909, 1153421, 1147810,\n", - " 1157784, 1139525, 1158306, 1158311, 1155441, 1137969, 1153359, 1150129,\n", - " 1150130, 1144361, 1142755, 1156207, 1156271, 1151379, 1155122, 1155124,\n", - " 1152527, 1149321, 1149320, 1155755, 1151431, 1146920, 1145807, 1156455,\n", - " 1156460, 1156463, 1158096, 1168230, 1155628, 1155631, 1156563, 1136469,\n", - " 1158824, 1148835, 1155646, 1158355, 1143263, 1162396, 1161803, 1154080,\n", - " 1139627, 1139629, 1151317, 1143189, 1153322, 1157439, 1150069, 1150077,\n", - " 1141627, 1157282, 1137152, 1158578, 1158996, 1153786, 1158192, 1137381,\n", - " 1159116, 1145682, 1134682, 1135601, 1135605, 1145507, 1148147, 1158502,\n", - " 1155852, 1158665, 1157684, 1149145, 1149151, 1144463, 1152220, 1152504,\n", - " 1156693, 1167618, 1157735, 1159132, 1159125, 1155971, 1155975, 1156812,\n", - " 1155393, 1155403, 1149696, 1155946, 1155948, 1136896, 1158760, 1158886,\n", - " 1140218, 1158815, 1158438, 1158285, 1152463, 1155302, 1156495, 1156490,\n", - " 1153808, 1157671, 1157675, 1136646, 1144127, 1134762, 1134757, 1162167,\n", - " 1158558, 1156516, 1146123, 1146126, 1168219, 1150011, 1155521, 1161539,\n", - " 1142482, 1142666, 1159042, 1159071, 1159057, 1163267, 1157944, 1157945,\n", - " 1162044, 1153052, 1153045, 1144158, 1138393, 1167189, 1150046, 1150041,\n", - " 1149063, 1149070, 1145948, 1154297, 1153514, 1153519, 1158680, 1146870,\n", - " 1138161, 1164006, 1149956, 1154590, 1139592, 1139290, 1148025, 1166073,\n", - " 1157236, 1171509, 1146063, 1146356, 1165306, 1165309, 1140136, 1140650,\n", - " 1140643, 1148603, 1164979, 1168170, 1144506, 1155821, 1184133, 1158643,\n", - " 1156181, 1159025, 1159029, 1159032, 1152247, 1143729, 1166735, 1160600,\n", - " 1160470, 1155588, 1162552, 1162558, 1151220, 1168426, 1158405, 1144977,\n", - " 1144982, 1153232, 1153239, 1144739, 1152776, 1166881, 1145139, 1141471,\n", - " 1147426, 1157044, 1157047, 1157052, 1156739, 1184097, 1184107, 1144812,\n", - " 1162085, 1135564, 1165714, 1165718, 1156294, 1162613, 1148687, 1167757,\n", - " 1160780, 1155324, 1147672, 1150532, 1144973, 1184037, 1145455, 1165746,\n", - " 1147355, 1152624, 1152626, 1139359, 1145900, 1145902, 1171572, 1152203,\n", - " 1152206, 1143395, 1143402, 1158724, 1158734, 1154076, 1147338, 1151598,\n", - " 1149125, 1167817, 1166653, 1169216, 1169304, 1145326, 1155172, 1166200,\n", - " 1150518, 1156113, 1156119, 1144336, 1157527, 1157534, 1157528, 1154670,\n", - " 1154893, 1154885, 1169162, 1138129, 1141049, 1141043, 1151674, 1149452,\n", - " 1138609, 1158611, 1158062, 1173047, 1149846, 1157384, 1147416, 1169937,\n", - " 1152353, 1155928, 1168055, 1169133, 1173307, 1154025, 1154027, 1154028,\n", - " 1152150, 1164974, 1167857, 1151210, 1157158, 1157153, 1157373, 1157375,\n", - " 1147711, 1151850, 1172961, 1169672, 1181009, 1165121, 1160979, 1172234,\n", - " 1140326, 1166682, 1166684, 1176404, 1181772, 1154148, 1149169, 1149173,\n", - " 1181219, 1143420, 1171302, 1170178, 1169618, 1169627, 1182033, 1153803,\n", - " 1153141, 1153630, 1181065, 1158031, 1178920, 1178922, 1162129, 1155262,\n", - " 1154711, 1157792, 1157803, 1157795, 1177275, 1151488, 1171623, 1157133,\n", - " 1162270, 1153898, 1154497, 1178212, 1178214, 1162403, 1145626, 1156436,\n", - " 1156432, 1186220, 1157486, 1161060, 1161911, 1149755, 1181345, 1163725,\n", - " 1158512, 1158940, 1158374, 1155890, 1155892, 1157266, 1183642, 1140386,\n", - " 1140396, 1168273, 1164788, 1171640, 1168876, 1164231, 1163421, 1176976,\n", - " 1164339, 1166516, 1161819, 1146161, 1172608, 1164130, 1170417, 1170421,\n", - " 1156528, 1139828, 1139831, 1150265, 1164924, 1151286, 1156055, 1146394,\n", - " 1173061, 1173065, 1182370, 1187910, 1188421, 1185976, 1140997, 1182060,\n", - " 1179141, 1181283, 1194082, 1190534, 1178637, 1176740, 1156672, 1158064,\n", - " 1145395, 1155958, 1155959, 1178290, 1187673, 1184966, 1189219, 1179769,\n", - " 1169831, 1192792, 1187536, 1181106, 1157008, 1161940], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137202, 1137204, 1137212, 1141424, 1136228, 1136237, 1140285, 1135926,\n", - " 1135934, 1135165, 1135167, 1135726, 1137784, 1137791, 1141751, 1141758,\n", - " 1138335, 1140297, 1136969, 1136971, 1141448, 1146803, 1146810, 1138903,\n", - " 1143610, 1149826, 1145370, 1137947, 1138933, 1143372, 1146641, 1139609,\n", - " 1139615, 1145281, 1136950, 1149216, 1149217, 1149228, 1142946, 1142958,\n", - " 1143820, 1147483, 1149283, 1144636, 1149029, 1149038, 1146992, 1146995,\n", - " 1153016, 1134700, 1135940, 1148337, 1146656, 1136742, 1147211, 1150329,\n", - " 1136268, 1138739, 1138742, 1138745, 1137829, 1140537, 1140540, 1140542,\n", - " 1138112, 1138119, 1137254, 1137181, 1149461, 1153456, 1140159, 1134735,\n", - " 1135905, 1140029, 1140947, 1140953, 1135367, 1135202, 1141036, 1134794,\n", - " 1157447, 1143377, 1137329, 1136178, 1157103, 1135333, 1144791, 1144395,\n", - " 1137529, 1137441, 1139161, 1134844, 1141696, 1141702, 1135583, 1141084,\n", - " 1141087, 1136097, 1136101, 1140970, 1140712, 1156342, 1138514, 1138525,\n", - " 1137953, 1158136, 1154132, 1156899, 1139684, 1138314, 1138440, 1138445,\n", - " 1138461, 1138449, 1137493, 1137924, 1158390, 1138846, 1135088, 1135091,\n", - " 1156603, 1156606, 1147112, 1142611, 1135352, 1135359, 1135624, 1148533,\n", - " 1135760, 1135769, 1139667, 1138067, 1136081, 1134992, 1136551, 1148805,\n", - " 1140199, 1158974, 1159009, 1159012, 1141065, 1144406, 1153543, 1140034,\n", - " 1140036, 1137587, 1137592, 1138654, 1141963, 1141966, 1134888, 1146075,\n", - " 1141985, 1152042, 1152044, 1139065, 1137734, 1137741, 1137728, 1134742,\n", - " 1134750, 1138240, 1141088, 1141102, 1148996, 1149001, 1139889, 1139119,\n", - " 1143775, 1154851, 1154857, 1137299, 1143711, 1139025, 1140003, 1140009,\n", - " 1146844, 1142499, 1152709, 1135860, 1141891, 1139386, 1141659, 1136917,\n", - " 1137196, 1137188, 1141156, 1152731, 1141300, 1144650, 1159613, 1134979,\n", - " 1147844, 1147850, 1137074, 1138482, 1141821, 1146796, 1145161, 1140169,\n", - " 1140173, 1139190, 1137057, 1138708, 1142917, 1142913, 1144596, 1142453,\n", - " 1136864, 1135315, 1144182, 1146201, 1158698, 1140501, 1137854, 1147153,\n", - " 1142646, 1149193, 1149197, 1141365, 1151112, 1138293, 1144279, 1139508,\n", - " 1139510, 1139655, 1139127, 1143791, 1140977, 1140990, 1135047, 1143692,\n", - " 1147050, 1147047, 1145873, 1152976, 1152989, 1135471, 1142549, 1142558,\n", - " 1139000, 1141925, 1144242, 1140576, 1140580, 1140581, 1137149, 1150692,\n", - " 1139405, 1137571, 1134861, 1145971, 1145980, 1145974, 1143845, 1136287,\n", - " 1136277, 1146016, 1146024, 1138085, 1139990, 1143283, 1143294, 1147540,\n", - " 1147150, 1148763, 1147282, 1147293, 1149155, 1140337, 1142628, 1142637,\n", - " 1149366, 1139417, 1143051, 1148414, 1157717, 1157720, 1136836, 1136843,\n", - " 1139329, 1139328, 1144957, 1145427, 1158043, 1143345, 1144765, 1140836,\n", - " 1138600, 1135876, 1135813, 1150300, 1138004, 1144376, 1146523, 1138024,\n", - " 1138018, 1143470, 1143471, 1143457, 1143007, 1137703, 1144303, 1144564,\n", - " 1142015, 1147574, 1146631, 1147521, 1140352, 1140364, 1137990, 1148962,\n", - " 1144725, 1144218, 1144222, 1147984, 1147995, 1147999, 1144011, 1139252,\n", - " 1139249, 1147127, 1147131, 1148704, 1148719, 1141827, 1141836, 1146751,\n", - " 1146742, 1152329, 1149722, 1147027, 1139549, 1158226, 1147880, 1154526,\n", - " 1145240, 1145751, 1142369, 1142376, 1142383, 1146159, 1148387, 1151242,\n", - " 1152530, 1152531, 1150438, 1150445, 1149258, 1149777, 1144514, 1144526,\n", - " 1141349, 1141358, 1146884, 1154822, 1147807, 1154263, 1145261, 1134873,\n", - " 1149534, 1148693, 1150127, 1148278, 1147019, 1141949, 1153568, 1153572,\n", - " 1153574, 1148453, 1147653, 1143560, 1143564, 1149412, 1148300, 1147866,\n", - " 1147871, 1154420, 1158794, 1148180, 1136249, 1139721, 1146686, 1148720,\n", - " 1148726, 1144110, 1143983, 1148204, 1153182, 1153124, 1153188, 1145104,\n", - " 1150935, 1144863, 1150356, 1155088, 1155098, 1166968, 1148084, 1148095,\n", - " 1147442, 1151816, 1152581, 1154190, 1150717, 1148510, 1141420, 1141419,\n", - " 1150637, 1145080, 1145086, 1146975, 1146974, 1156402, 1149355, 1146623,\n", - " 1151691, 1151399, 1144476, 1152409, 1152415, 1154051, 1153036, 1137746,\n", - " 1137755, 1146304, 1152622, 1149203, 1151967, 1152826, 1155334, 1154119,\n", - " 1154120, 1154123, 1157839, 1157824, 1152673, 1154633, 1151617, 1151622,\n", - " 1150578, 1150586, 1136131, 1148914, 1148916, 1153387, 1145959, 1143995,\n", - " 1152341, 1153311, 1152297, 1156007, 1136028, 1136026, 1158704, 1156609,\n", - " 1152928, 1151064, 1156399, 1163941, 1142777, 1150150, 1150164, 1149273,\n", - " 1144016, 1148033, 1148035, 1148040, 1154453, 1149300, 1137046, 1137048,\n", - " 1158477, 1148628, 1158530, 1154564, 1142041, 1157227, 1157229, 1157547,\n", - " 1142385, 1158860, 1158857, 1150870, 1150877, 1157064, 1157069, 1139479,\n", - " 1151251, 1151260, 1150465, 1145390, 1152182, 1157909, 1153421, 1147810,\n", - " 1157784, 1139525, 1158306, 1158311, 1155441, 1137969, 1153359, 1150129,\n", - " 1150130, 1144361, 1142755, 1156207, 1156271, 1151379, 1155122, 1155124,\n", - " 1152527, 1149321, 1149320, 1155755, 1151431, 1146920, 1145807, 1156455,\n", - " 1156460, 1156463, 1158096, 1168230, 1155628, 1155631, 1156563, 1136469,\n", - " 1158824, 1148835, 1155646, 1158355, 1143263, 1162396, 1161803, 1154080,\n", - " 1139627, 1139629, 1151317, 1143189, 1153322, 1157439, 1150069, 1150077,\n", - " 1141627, 1157282, 1137152, 1158578, 1158996, 1153786, 1158192, 1137381,\n", - " 1159116, 1145682, 1134682, 1135601, 1135605, 1145507, 1148147, 1158502,\n", - " 1155852, 1158665, 1157684, 1149145, 1149151, 1144463, 1152220, 1152504,\n", - " 1156693, 1167618, 1157735, 1159132, 1159125, 1155971, 1155975, 1156812,\n", - " 1155393, 1155403, 1149696, 1155946, 1155948, 1136896, 1158760, 1158886,\n", - " 1140218, 1158815, 1158438, 1158285, 1152463, 1155302, 1156495, 1156490,\n", - " 1153808, 1157671, 1157675, 1136646, 1144127, 1134762, 1134757, 1162167,\n", - " 1158558, 1156516, 1146123, 1146126, 1168219, 1150011, 1155521, 1161539,\n", - " 1142482, 1142666, 1159042, 1159071, 1159057, 1163267, 1157944, 1157945,\n", - " 1162044, 1153052, 1153045, 1144158, 1138393, 1167189, 1150046, 1150041,\n", - " 1149063, 1149070, 1145948, 1154297, 1153514, 1153519, 1158680, 1146870,\n", - " 1138161, 1164006, 1149956, 1154590, 1139592, 1139290, 1148025, 1166073,\n", - " 1157236, 1171509, 1146063, 1146356, 1165306, 1165309, 1140136, 1140650,\n", - " 1140643, 1148603, 1164979, 1168170, 1144506, 1155821, 1184133, 1158643,\n", - " 1156181, 1159025, 1159029, 1159032, 1152247, 1143729, 1166735, 1160600,\n", - " 1160470, 1155588, 1162552, 1162558, 1151220, 1168426, 1158405, 1144977,\n", - " 1144982, 1153232, 1153239, 1144739, 1152776, 1166881, 1145139, 1141471,\n", - " 1147426, 1157044, 1157047, 1157052, 1156739, 1184097, 1184107, 1144812,\n", - " 1162085, 1135564, 1165714, 1165718, 1156294, 1162613, 1148687, 1167757,\n", - " 1160780, 1155324, 1147672, 1150532, 1144973, 1184037, 1145455, 1165746,\n", - " 1147355, 1152624, 1152626, 1139359, 1145900, 1145902, 1171572, 1152203,\n", - " 1152206, 1143395, 1143402, 1158724, 1158734, 1154076, 1147338, 1151598,\n", - " 1149125, 1167817, 1166653, 1169216, 1169304, 1145326, 1155172, 1166200,\n", - " 1150518, 1156113, 1156119, 1144336, 1157527, 1157534, 1157528, 1154670,\n", - " 1154893, 1154885, 1169162, 1138129, 1141049, 1141043, 1151674, 1149452,\n", - " 1138609, 1158611, 1158062, 1173047, 1149846, 1157384, 1147416, 1169937,\n", - " 1152353, 1155928, 1168055, 1169133, 1173307, 1154025, 1154027, 1154028,\n", - " 1152150, 1164974, 1167857, 1151210, 1157158, 1157153, 1157373, 1157375,\n", - " 1147711, 1151850, 1172961, 1169672, 1181009, 1165121, 1160979, 1172234,\n", - " 1140326, 1166682, 1166684, 1176404, 1181772, 1154148, 1149169, 1149173,\n", - " 1181219, 1143420, 1171302, 1170178, 1169618, 1169627, 1182033, 1153803,\n", - " 1153141, 1153630, 1181065, 1158031, 1178920, 1178922, 1162129, 1155262,\n", - " 1154711, 1157792, 1157803, 1157795, 1177275, 1151488, 1171623, 1157133,\n", - " 1162270, 1153898, 1154497, 1178212, 1178214, 1162403, 1145626, 1156436,\n", - " 1156432, 1186220, 1157486, 1161060, 1161911, 1149755, 1181345, 1163725,\n", - " 1158512, 1158940, 1158374, 1155890, 1155892, 1157266, 1183642, 1140386,\n", - " 1140396, 1168273, 1164788, 1171640, 1168876, 1164231, 1163421, 1176976,\n", - " 1164339, 1166516, 1161819, 1146161, 1172608, 1164130, 1170417, 1170421,\n", - " 1156528, 1139828, 1139831, 1150265, 1164924, 1151286, 1156055, 1146394,\n", - " 1173061, 1173065, 1182370, 1187910, 1188421, 1185976, 1140997, 1182060,\n", - " 1179141, 1181283, 1194082, 1190534, 1178637, 1176740, 1156672, 1158064,\n", - " 1145395, 1155958, 1155959, 1178290, 1187673, 1184966, 1189219, 1179769,\n", - " 1169831, 1192792, 1187536, 1181106, 1157008, 1161940], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195697, 1198248, 1197223, 1197717, 1201094, 1199282, 1198459, 1202255,\n", - " 1198844, 1194626, 1200640, 1198697, 1202804, 1198557, 1194866, 1194770,\n", - " 1199043, 1196624, 1195514, 1195263, 1201920, 1198371, 1198543, 1197697,\n", - " 1195477, 1197760, 1194880, 1195888, 1196900, 1195740, 1196359, 1196979,\n", - " 1194753, 1194762, 1195313, 1196837, 1196840, 1196171, 1199104, 1195982,\n", - " 1198643, 1198163, 1198167, 1196704, 1196711, 1196717, 1195270, 1195278,\n", - " 1196247, 1195847, 1195541, 1199998, 1197253, 1197640, 1195353, 1200949,\n", - " 1200959, 1196857, 1198673, 1199685, 1199628, 1197676, 1200076, 1199031,\n", - " 1199676, 1194786, 1201511, 1196496, 1199021, 1197977, 1197601, 1201116,\n", - " 1196727, 1195771, 1195773, 1202618, 1198426, 1200592, 1200621, 1200450,\n", - " 1200570, 1200503, 1199445, 1201156, 1202630, 1200913, 1200918, 1201045,\n", - " 1200515, 1197097, 1197098, 1200194, 1202239, 1199482, 1202338, 1202175,\n", - " 1202707, 1201291, 1195612, 1201862, 1199925, 1198562, 1196960, 1196966,\n", - " 1202876, 1200784, 1200638, 1198521, 1198055, 1196929, 1198929, 1195415,\n", - " 1195181, 1195390, 1200928, 1197060, 1196597, 1197403, 1202269, 1194730,\n", - " 1198147, 1198824, 1197731, 1197735, 1200011, 1198819, 1197035, 1197039,\n", - " 1195165, 1202077, 1200212, 1194909, 1203162], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195697, 1198248, 1197223, 1197717, 1201094, 1199282, 1198459, 1202255,\n", - " 1198844, 1194626, 1200640, 1198697, 1202804, 1198557, 1194866, 1194770,\n", - " 1199043, 1196624, 1195514, 1195263, 1201920, 1198371, 1198543, 1197697,\n", - " 1195477, 1197760, 1194880, 1195888, 1196900, 1195740, 1196359, 1196979,\n", - " 1194753, 1194762, 1195313, 1196837, 1196840, 1196171, 1199104, 1195982,\n", - " 1198643, 1198163, 1198167, 1196704, 1196711, 1196717, 1195270, 1195278,\n", - " 1196247, 1195847, 1195541, 1199998, 1197253, 1197640, 1195353, 1200949,\n", - " 1200959, 1196857, 1198673, 1199685, 1199628, 1197676, 1200076, 1199031,\n", - " 1199676, 1194786, 1201511, 1196496, 1199021, 1197977, 1197601, 1201116,\n", - " 1196727, 1195771, 1195773, 1202618, 1198426, 1200592, 1200621, 1200450,\n", - " 1200570, 1200503, 1199445, 1201156, 1202630, 1200913, 1200918, 1201045,\n", - " 1200515, 1197097, 1197098, 1200194, 1202239, 1199482, 1202338, 1202175,\n", - " 1202707, 1201291, 1195612, 1201862, 1199925, 1198562, 1196960, 1196966,\n", - " 1202876, 1200784, 1200638, 1198521, 1198055, 1196929, 1198929, 1195415,\n", - " 1195181, 1195390, 1200928, 1197060, 1196597, 1197403, 1202269, 1194730,\n", - " 1198147, 1198824, 1197731, 1197735, 1200011, 1198819, 1197035, 1197039,\n", - " 1195165, 1202077, 1200212, 1194909, 1203162], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 0.0453, 0.0482, 0.2678, ..., 0.1532, -0.0024, -0.0032],\n", - " [ 0.1428, 0.0082, 0.5133, ..., 0.0731, -0.0018, -0.0045],\n", - " [ 0.0949, 0.0256, 0.3506, ..., 0.0671, -0.0017, -0.0034],\n", - " ...,\n", - " [ 0.1204, 0.0407, 0.4541, ..., 0.0595, -0.0016, -0.0041],\n", - " [ 0.0757, 0.0484, 0.3641, ..., 0.2160, -0.0029, -0.0040],\n", - " [ 0.1248, 0.0194, 0.4457, ..., 0.1066, -0.0023, -0.0045]],\n", - " device='cuda:0', grad_fn=), 'paper': tensor([[-1.4639e-03, 1.0625e+00, 1.5008e-01, ..., -1.1548e-02,\n", - " -1.9559e-02, 9.2361e-01],\n", - " [-2.5782e-02, -9.8165e-03, 2.9802e+00, ..., -1.9816e-02,\n", - " -3.1097e-02, -2.5937e-02],\n", - " [-1.0813e-02, 6.5394e-03, 8.7543e-01, ..., -1.6299e-02,\n", - " -1.2031e-02, -1.2605e-02],\n", - " ...,\n", - " [-3.6865e-02, -2.2863e-02, 2.8213e+00, ..., -2.2879e-02,\n", - " -2.6286e-02, -4.6575e-02],\n", - " [-2.7987e-02, -1.5483e-02, 2.1136e+00, ..., -1.8442e-02,\n", - " -2.0070e-02, -3.5717e-02],\n", - " [-1.7202e-02, 2.4098e+00, 1.0882e+00, ..., 4.6297e+00,\n", - " -4.7398e-02, 2.3161e+00]], device='cuda:0',\n", - " grad_fn=), 'author': tensor([[-2.7370e-03, 4.9812e-03, 1.7708e-01, ..., 8.2599e-01,\n", - " 4.4203e-01, -2.2168e-03],\n", - " [-5.7435e-03, 3.7850e-01, 1.5536e-01, ..., 5.5095e-01,\n", - " -3.7618e-04, -4.6506e-03],\n", - " [-1.7159e-03, -1.1002e-03, 1.6701e-01, ..., 8.5677e-01,\n", - " 6.4975e-01, -9.2323e-05],\n", - " ...,\n", - " [-1.9188e-03, -2.0249e-03, 2.9004e-01, ..., 9.4466e-01,\n", - " 7.1299e-01, -3.9193e-04],\n", - " [-3.9531e-04, 2.4987e-02, 1.1594e-01, ..., 1.3984e-01,\n", - " -8.4995e-06, -7.4624e-04],\n", - " [-1.9558e-03, -2.6446e-04, 1.1449e-01, ..., 8.0754e-01,\n", - " 5.1516e-01, -5.3495e-04]], device='cuda:0',\n", - " grad_fn=), 'field_of_study': tensor([[-3.9040e-03, 5.7391e-01, 2.1665e-01, ..., -6.1665e-03,\n", - " 2.8876e-01, 4.0922e-01],\n", - " [-3.8663e-03, 3.6621e-01, -4.6521e-05, ..., -3.9042e-03,\n", - " 1.5734e-01, 1.3110e-01],\n", - " [-4.9116e-03, 4.7085e-01, 9.6228e-02, ..., -6.7023e-03,\n", - " 2.4768e-01, 3.6052e-01],\n", - " ...,\n", - " [-3.2979e-03, 3.1037e-01, -4.9520e-05, ..., -5.8226e-03,\n", - " 2.6829e-01, 1.4706e-01],\n", - " [-5.3081e-03, 5.3359e-01, 8.6889e-02, ..., -4.5797e-03,\n", - " 2.2849e-01, 4.2615e-01],\n", - " [ 1.9260e-01, 6.5195e-01, 1.4448e-01, ..., -6.9009e-03,\n", - " 1.9715e-01, -2.2085e-03]], device='cuda:0',\n", - " grad_fn=)} {('author', 'affiliated_with', 'institution'): tensor([[ 126, 43, 179, 41, 41, 139, 127, 128, 125, 73, 282, 594,\n", - " 594, 535, 309, 408, 400, 400, 423, 408, 408, 408, 324, 324,\n", - " 324, 743, 743, 464, 464, 852, 830, 596, 582, 761, 766, 515,\n", - " 857, 772, 648, 805, 467, 909, 743, 620, 1071, 1115, 963, 676,\n", - " 942, 960, 1102, 990, 990, 990, 990, 1565, 1415, 1349, 1372, 1372,\n", - " 1372, 1288, 1288, 1140, 1410, 1324, 1324, 1408, 1257, 978, 978, 978,\n", - " 1065, 1065, 1065, 1367, 1519, 1371, 1209, 1209, 1454, 1454, 1424, 1366,\n", - " 1391, 1432, 1706, 1496, 1510, 1636, 1562, 1673, 1673, 1764, 1746, 1768,\n", - " 1768, 1770, 1861, 2067, 1915, 1854, 2055, 2141, 1949, 1990, 2082, 2205,\n", - " 2205, 2205, 2205, 2345, 2345, 2247, 2627, 2528, 2619, 2652, 2609, 2679,\n", - " 2670, 2670, 2680, 2729, 2855, 2708, 2825, 3102, 2919, 2850, 2850, 2850,\n", - " 3150, 3024, 3161, 3268, 3268, 3323, 3323, 3290, 3317, 3442, 3226, 3226,\n", - " 3401, 3794, 3936, 3954, 3935, 3935, 3993, 4005, 4005, 4005, 4112, 4142,\n", - " 4169, 4169, 4302, 4270, 4392, 4399, 4463, 4463, 4421, 4424, 4515, 4569,\n", - " 4524, 4611, 4611, 4764, 4578, 4829, 4867, 4648, 4811, 4742, 4742, 4742,\n", - " 4626, 4835, 4911, 4859, 4859, 4859, 4859, 4898, 4972, 5035, 4886, 4984,\n", - " 4974, 5193, 5274, 5258, 5249, 5654, 5098, 5305, 5305, 5151, 5151, 5151,\n", - " 5227, 5227, 5550, 5833, 5752, 5795, 5771],\n", - " [ 73, 116, 85, 99, 127, 101, 88, 22, 122, 72, 34, 42,\n", - " 109, 5, 80, 132, 98, 25, 34, 43, 29, 6, 2, 69,\n", - " 78, 132, 56, 77, 60, 70, 3, 10, 5, 5, 64, 66,\n", - " 34, 74, 57, 36, 31, 4, 46, 1, 38, 40, 33, 58,\n", - " 75, 72, 27, 68, 17, 45, 14, 115, 74, 58, 79, 18,\n", - " 9, 66, 5, 76, 66, 100, 120, 72, 14, 0, 113, 28,\n", - " 57, 20, 67, 19, 16, 95, 8, 114, 103, 56, 35, 72,\n", - " 59, 121, 121, 115, 44, 58, 63, 0, 108, 89, 54, 50,\n", - " 34, 89, 124, 39, 0, 76, 26, 76, 131, 112, 76, 27,\n", - " 111, 91, 97, 72, 123, 19, 72, 120, 11, 43, 83, 103,\n", - " 58, 32, 106, 19, 19, 15, 72, 7, 41, 19, 87, 86,\n", - " 92, 26, 121, 72, 105, 110, 66, 22, 51, 102, 103, 5,\n", - " 61, 72, 82, 121, 47, 19, 55, 19, 13, 48, 118, 5,\n", - " 71, 107, 81, 130, 86, 12, 21, 5, 126, 53, 112, 97,\n", - " 72, 72, 125, 72, 52, 72, 5, 93, 5, 104, 117, 37,\n", - " 66, 51, 57, 24, 86, 129, 90, 65, 116, 72, 121, 23,\n", - " 19, 72, 103, 62, 84, 128, 30, 14, 72, 5, 19, 96,\n", - " 119, 72, 72, 49, 94, 97, 51]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 811, 3153, 2048, ..., 7138, 770, 1485],\n", - " [ 125, 90, 43, ..., 7435, 7509, 7509]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 49, 74, 40, ..., 49, 5, 77],\n", - " [ 167, 7, 180, ..., 5859, 5800, 5986]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 32, 32, 107, ..., 7559, 7559, 7509],\n", - " [ 426, 323, 471, ..., 706, 573, 850]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 798, 606, 121, ..., 366, 498, 366],\n", - " [ 289, 145, 323, ..., 7471, 7458, 7371]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[1034, 4767, 1951, ..., 3908, 5405, 3609],\n", - " [ 114, 1, 6, ..., 5698, 5926, 5922]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 32, 32, 309, ..., 7509, 7509, 7509],\n", - " [1036, 1704, 967, ..., 3627, 4125, 2339]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 127, 45, 45, ..., 5895, 5895, 5895],\n", - " [ 880, 5956, 5680, ..., 6341, 6832, 6635]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006555\n", - "sampling 0.006399\n", - "noi time: 0.002057\n", - "get_vertex_data call: 0.036987\n", - "noi group time: 0.003275\n", - "eoi_group_time: 0.016253\n", - "second half: 0.216138\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 16691, 31145, ..., 1118020, 1123990, 1119693],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 16691, 31145, ..., 1118020, 1123990, 1119693],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1221601, 1221045, 1216253, ..., 1934143, 1931113, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1221601, 1221045, 1216253, ..., 1934143, 1931113, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141424, 1140282, 1140284, 1140285, 1136339, 1135926, 1135716, 1140785,\n", - " 1140799, 1141758, 1136156, 1136962, 1136963, 1136969, 1141443, 1146804,\n", - " 1138897, 1139808, 1139811, 1145372, 1145992, 1138931, 1139141, 1143368,\n", - " 1143372, 1143363, 1139243, 1150395, 1146640, 1146644, 1139605, 1139613,\n", - " 1150509, 1145292, 1139866, 1134937, 1136945, 1149216, 1155689, 1143820,\n", - " 1147483, 1135992, 1142881, 1144625, 1135262, 1135947, 1150200, 1152666,\n", - " 1152664, 1139371, 1147202, 1136685, 1134711, 1136266, 1136268, 1134807,\n", - " 1140530, 1138366, 1151520, 1135913, 1140946, 1135367, 1135202, 1141036,\n", - " 1136779, 1134794, 1136512, 1138504, 1137330, 1143069, 1157088, 1144789,\n", - " 1144395, 1137529, 1137534, 1157393, 1152376, 1137441, 1143317, 1136195,\n", - " 1135267, 1156148, 1156159, 1139155, 1134841, 1135968, 1135983, 1141086,\n", - " 1148850, 1140240, 1140970, 1140714, 1138516, 1153096, 1153098, 1137959,\n", - " 1154141, 1137019, 1156899, 1156904, 1156908, 1135522, 1135535, 1157703,\n", - " 1157709, 1138436, 1138440, 1137924, 1137932, 1135135, 1154106, 1158386,\n", - " 1158390, 1149328, 1138847, 1156606, 1147104, 1147112, 1147116, 1142611,\n", - " 1160822, 1145843, 1145853, 1148531, 1135760, 1135769, 1141523, 1139667,\n", - " 1139673, 1134992, 1158961, 1158974, 1139327, 1141070, 1153544, 1140034,\n", - " 1152696, 1136067, 1139929, 1138648, 1141964, 1152042, 1152044, 1139065,\n", - " 1136051, 1135549, 1137890, 1141088, 1141100, 1162946, 1139889, 1145346,\n", - " 1136392, 1154851, 1143711, 1162705, 1143225, 1139025, 1140003, 1135861,\n", - " 1136625, 1139386, 1141657, 1136917, 1139733, 1143666, 1143678, 1144237,\n", - " 1141159, 1136763, 1144650, 1144641, 1136853, 1136862, 1136855, 1139798,\n", - " 1142056, 1153666, 1140161, 1140173, 1158749, 1148864, 1137243, 1138713,\n", - " 1140110, 1142913, 1143111, 1144596, 1136864, 1144041, 1144042, 1135327,\n", - " 1141392, 1137606, 1144868, 1139556, 1139559, 1147153, 1136378, 1136379,\n", - " 1142640, 1141365, 1153069, 1153058, 1151106, 1141664, 1149090, 1149099,\n", - " 1138294, 1144279, 1143907, 1139661, 1140093, 1139127, 1139170, 1139182,\n", - " 1140977, 1140983, 1140990, 1135047, 1147050, 1145873, 1143543, 1143551,\n", - " 1152976, 1152980, 1152988, 1141925, 1146898, 1146901, 1146904, 1144242,\n", - " 1136885, 1143637, 1137570, 1143851, 1142098, 1146024, 1149928, 1139990,\n", - " 1143294, 1151124, 1147150, 1148763, 1147282, 1142816, 1136330, 1149159,\n", - " 1140348, 1142630, 1149366, 1139408, 1148003, 1138915, 1157720, 1146099,\n", - " 1139309, 1139341, 1144778, 1144957, 1143345, 1144619, 1144615, 1137098,\n", - " 1169022, 1150294, 1144375, 1146514, 1146523, 1143465, 1143457, 1137703,\n", - " 1137707, 1144303, 1144568, 1140483, 1140823, 1147574, 1147575, 1143807,\n", - " 1147521, 1140352, 1140360, 1140364, 1140365, 1137998, 1143082, 1144734,\n", - " 1147999, 1146949, 1139252, 1139249, 1147131, 1147235, 1147244, 1148704,\n", - " 1142700, 1141327, 1141827, 1146749, 1147070, 1149722, 1149717, 1145707,\n", - " 1147970, 1145011, 1139549, 1158226, 1158230, 1150452, 1145237, 1145240,\n", - " 1145751, 1146159, 1138632, 1146178, 1146187, 1148217, 1152537, 1151182,\n", - " 1150438, 1150445, 1149791, 1138044, 1146895, 1144203, 1154831, 1147796,\n", - " 1151480, 1151487, 1151473, 1152023, 1152028, 1152031, 1154267, 1151041,\n", - " 1145255, 1147016, 1147019, 1147021, 1147009, 1147023, 1153963, 1141949,\n", - " 1148744, 1137647, 1148463, 1147653, 1143560, 1139088, 1139096, 1139097,\n", - " 1154420, 1139718, 1152494, 1138404, 1141182, 1151557, 1148720, 1148724,\n", - " 1146549, 1149810, 1139940, 1151937, 1148204, 1153188, 1145104, 1159837,\n", - " 1150935, 1152866, 1150356, 1147446, 1152590, 1135307, 1151906, 1150714,\n", - " 1136008, 1151348, 1151351, 1151356, 1147737, 1156402, 1149359, 1153249,\n", - " 1146623, 1164772, 1144476, 1135688, 1152097, 1152100, 1152109, 1153027,\n", - " 1153037, 1153038, 1150094, 1137746, 1146318, 1152623, 1140521, 1136401,\n", - " 1149203, 1152820, 1155337, 1154119, 1155351, 1155358, 1157827, 1151573,\n", - " 1151617, 1151622, 1151629, 1136134, 1153376, 1140932, 1138982, 1152903,\n", - " 1152341, 1158421, 1156826, 1153311, 1138281, 1152300, 1156004, 1156001,\n", - " 1136028, 1158704, 1156608, 1156619, 1156622, 1152928, 1151064, 1156420,\n", - " 1137545, 1150104, 1150164, 1149273, 1142257, 1153691, 1155202, 1154453,\n", - " 1155222, 1145652, 1148628, 1158530, 1158540, 1137458, 1148242, 1148255,\n", - " 1148250, 1159223, 1153083, 1142041, 1157229, 1135439, 1143444, 1158854,\n", - " 1148884, 1156500, 1157064, 1152844, 1152833, 1145187, 1137808, 1157567,\n", - " 1150465, 1135231, 1135740, 1151788, 1150824, 1153413, 1143010, 1158308,\n", - " 1158311, 1151271, 1155441, 1137972, 1162120, 1154529, 1142755, 1156269,\n", - " 1151379, 1137908, 1155122, 1149519, 1155755, 1146913, 1145794, 1145806,\n", - " 1156463, 1168235, 1154763, 1155628, 1155630, 1158486, 1156563, 1154547,\n", - " 1154559, 1136466, 1158564, 1158824, 1153715, 1158335, 1157000, 1156994,\n", - " 1155646, 1153364, 1160958, 1143254, 1143261, 1143257, 1146938, 1161796,\n", - " 1160223, 1154250, 1154240, 1154080, 1164292, 1143189, 1143196, 1153317,\n", - " 1153318, 1157439, 1157928, 1140748, 1157660, 1158124, 1158584, 1158204,\n", - " 1155035, 1137381, 1159116, 1137316, 1140914, 1135601, 1135614, 1145513,\n", - " 1145514, 1148149, 1155848, 1155843, 1157685, 1157684, 1146325, 1149137,\n", - " 1156092, 1155718, 1161450, 1152220, 1152222, 1155434, 1152498, 1140381,\n", - " 1155884, 1157732, 1157735, 1157033, 1155971, 1155975, 1142070, 1156811,\n", - " 1149700, 1163238, 1136896, 1158760, 1158764, 1158882, 1158815, 1158447,\n", - " 1152463, 1156665, 1147599, 1155304, 1153808, 1156284, 1134754, 1140049,\n", - " 1158552, 1151140, 1138099, 1155862, 1158006, 1163170, 1169902, 1135661,\n", - " 1164276, 1164272, 1164277, 1142666, 1150684, 1157751, 1165838, 1153052,\n", - " 1153045, 1155763, 1156107, 1138391, 1138393, 1165234, 1150046, 1155479,\n", - " 1138161, 1164006, 1156787, 1149963, 1163879, 1154578, 1160758, 1146063,\n", - " 1171257, 1171259, 1163455, 1162308, 1164048, 1164061, 1140135, 1148600,\n", - " 1148603, 1143139, 1165047, 1162350, 1156361, 1159025, 1159037, 1168023,\n", - " 1155588, 1164612, 1151227, 1151228, 1138679, 1153924, 1158405, 1144977,\n", - " 1144979, 1149015, 1146500, 1170996, 1141471, 1147427, 1159386, 1156739,\n", - " 1156744, 1150649, 1171040, 1150315, 1144810, 1144812, 1164741, 1164739,\n", - " 1142722, 1156292, 1156293, 1156303, 1165636, 1145743, 1145183, 1163783,\n", - " 1148683, 1145567, 1145228, 1170793, 1143038, 1147355, 1152626, 1139351,\n", - " 1145902, 1153520, 1153534, 1168663, 1158722, 1154076, 1147330, 1147338,\n", - " 1144699, 1150773, 1145502, 1151598, 1149125, 1155172, 1150515, 1144346,\n", - " 1144336, 1157534, 1154670, 1157331, 1141048, 1151664, 1151668, 1169359,\n", - " 1149452, 1149451, 1147491, 1149688, 1158610, 1158623, 1173047, 1172759,\n", - " 1149846, 1157384, 1157383, 1165892, 1171479, 1172488, 1169927, 1148667,\n", - " 1172669, 1173307, 1145033, 1154019, 1164974, 1159652, 1178099, 1157158,\n", - " 1157153, 1172101, 1157372, 1157373, 1147711, 1151850, 1151852, 1148128,\n", - " 1148131, 1147933, 1149237, 1170488, 1169032, 1169037, 1155739, 1181017,\n", - " 1166746, 1140326, 1159100, 1170874, 1154148, 1167520, 1165678, 1184386,\n", - " 1186117, 1169765, 1168481, 1143420, 1171302, 1153805, 1164818, 1171127,\n", - " 1180830, 1163099, 1179807, 1158030, 1161262, 1178505, 1155250, 1154707,\n", - " 1154718, 1157792, 1179164, 1157126, 1157133, 1183106, 1153898, 1153899,\n", - " 1164563, 1162403, 1145626, 1156443, 1178757, 1152276, 1158371, 1155892,\n", - " 1155899, 1162968, 1184317, 1164411, 1160400, 1140393, 1140399, 1164798,\n", - " 1166208, 1164437, 1176976, 1146161, 1170802, 1147182, 1182965, 1184839,\n", - " 1139828, 1139831, 1139837, 1150265, 1163848, 1156049, 1156055, 1190281,\n", - " 1191714, 1190237, 1173058, 1194138, 1156846, 1191018, 1169952, 1169954,\n", - " 1189739, 1192327, 1153733, 1153592, 1171201, 1179321, 1166784, 1185851,\n", - " 1186163, 1186620, 1155959, 1155962, 1185649, 1183807, 1187536, 1189034,\n", - " 1163071, 1169098, 1182401, 1193831], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141424, 1140282, 1140284, 1140285, 1136339, 1135926, 1135716, 1140785,\n", - " 1140799, 1141758, 1136156, 1136962, 1136963, 1136969, 1141443, 1146804,\n", - " 1138897, 1139808, 1139811, 1145372, 1145992, 1138931, 1139141, 1143368,\n", - " 1143372, 1143363, 1139243, 1150395, 1146640, 1146644, 1139605, 1139613,\n", - " 1150509, 1145292, 1139866, 1134937, 1136945, 1149216, 1155689, 1143820,\n", - " 1147483, 1135992, 1142881, 1144625, 1135262, 1135947, 1150200, 1152666,\n", - " 1152664, 1139371, 1147202, 1136685, 1134711, 1136266, 1136268, 1134807,\n", - " 1140530, 1138366, 1151520, 1135913, 1140946, 1135367, 1135202, 1141036,\n", - " 1136779, 1134794, 1136512, 1138504, 1137330, 1143069, 1157088, 1144789,\n", - " 1144395, 1137529, 1137534, 1157393, 1152376, 1137441, 1143317, 1136195,\n", - " 1135267, 1156148, 1156159, 1139155, 1134841, 1135968, 1135983, 1141086,\n", - " 1148850, 1140240, 1140970, 1140714, 1138516, 1153096, 1153098, 1137959,\n", - " 1154141, 1137019, 1156899, 1156904, 1156908, 1135522, 1135535, 1157703,\n", - " 1157709, 1138436, 1138440, 1137924, 1137932, 1135135, 1154106, 1158386,\n", - " 1158390, 1149328, 1138847, 1156606, 1147104, 1147112, 1147116, 1142611,\n", - " 1160822, 1145843, 1145853, 1148531, 1135760, 1135769, 1141523, 1139667,\n", - " 1139673, 1134992, 1158961, 1158974, 1139327, 1141070, 1153544, 1140034,\n", - " 1152696, 1136067, 1139929, 1138648, 1141964, 1152042, 1152044, 1139065,\n", - " 1136051, 1135549, 1137890, 1141088, 1141100, 1162946, 1139889, 1145346,\n", - " 1136392, 1154851, 1143711, 1162705, 1143225, 1139025, 1140003, 1135861,\n", - " 1136625, 1139386, 1141657, 1136917, 1139733, 1143666, 1143678, 1144237,\n", - " 1141159, 1136763, 1144650, 1144641, 1136853, 1136862, 1136855, 1139798,\n", - " 1142056, 1153666, 1140161, 1140173, 1158749, 1148864, 1137243, 1138713,\n", - " 1140110, 1142913, 1143111, 1144596, 1136864, 1144041, 1144042, 1135327,\n", - " 1141392, 1137606, 1144868, 1139556, 1139559, 1147153, 1136378, 1136379,\n", - " 1142640, 1141365, 1153069, 1153058, 1151106, 1141664, 1149090, 1149099,\n", - " 1138294, 1144279, 1143907, 1139661, 1140093, 1139127, 1139170, 1139182,\n", - " 1140977, 1140983, 1140990, 1135047, 1147050, 1145873, 1143543, 1143551,\n", - " 1152976, 1152980, 1152988, 1141925, 1146898, 1146901, 1146904, 1144242,\n", - " 1136885, 1143637, 1137570, 1143851, 1142098, 1146024, 1149928, 1139990,\n", - " 1143294, 1151124, 1147150, 1148763, 1147282, 1142816, 1136330, 1149159,\n", - " 1140348, 1142630, 1149366, 1139408, 1148003, 1138915, 1157720, 1146099,\n", - " 1139309, 1139341, 1144778, 1144957, 1143345, 1144619, 1144615, 1137098,\n", - " 1169022, 1150294, 1144375, 1146514, 1146523, 1143465, 1143457, 1137703,\n", - " 1137707, 1144303, 1144568, 1140483, 1140823, 1147574, 1147575, 1143807,\n", - " 1147521, 1140352, 1140360, 1140364, 1140365, 1137998, 1143082, 1144734,\n", - " 1147999, 1146949, 1139252, 1139249, 1147131, 1147235, 1147244, 1148704,\n", - " 1142700, 1141327, 1141827, 1146749, 1147070, 1149722, 1149717, 1145707,\n", - " 1147970, 1145011, 1139549, 1158226, 1158230, 1150452, 1145237, 1145240,\n", - " 1145751, 1146159, 1138632, 1146178, 1146187, 1148217, 1152537, 1151182,\n", - " 1150438, 1150445, 1149791, 1138044, 1146895, 1144203, 1154831, 1147796,\n", - " 1151480, 1151487, 1151473, 1152023, 1152028, 1152031, 1154267, 1151041,\n", - " 1145255, 1147016, 1147019, 1147021, 1147009, 1147023, 1153963, 1141949,\n", - " 1148744, 1137647, 1148463, 1147653, 1143560, 1139088, 1139096, 1139097,\n", - " 1154420, 1139718, 1152494, 1138404, 1141182, 1151557, 1148720, 1148724,\n", - " 1146549, 1149810, 1139940, 1151937, 1148204, 1153188, 1145104, 1159837,\n", - " 1150935, 1152866, 1150356, 1147446, 1152590, 1135307, 1151906, 1150714,\n", - " 1136008, 1151348, 1151351, 1151356, 1147737, 1156402, 1149359, 1153249,\n", - " 1146623, 1164772, 1144476, 1135688, 1152097, 1152100, 1152109, 1153027,\n", - " 1153037, 1153038, 1150094, 1137746, 1146318, 1152623, 1140521, 1136401,\n", - " 1149203, 1152820, 1155337, 1154119, 1155351, 1155358, 1157827, 1151573,\n", - " 1151617, 1151622, 1151629, 1136134, 1153376, 1140932, 1138982, 1152903,\n", - " 1152341, 1158421, 1156826, 1153311, 1138281, 1152300, 1156004, 1156001,\n", - " 1136028, 1158704, 1156608, 1156619, 1156622, 1152928, 1151064, 1156420,\n", - " 1137545, 1150104, 1150164, 1149273, 1142257, 1153691, 1155202, 1154453,\n", - " 1155222, 1145652, 1148628, 1158530, 1158540, 1137458, 1148242, 1148255,\n", - " 1148250, 1159223, 1153083, 1142041, 1157229, 1135439, 1143444, 1158854,\n", - " 1148884, 1156500, 1157064, 1152844, 1152833, 1145187, 1137808, 1157567,\n", - " 1150465, 1135231, 1135740, 1151788, 1150824, 1153413, 1143010, 1158308,\n", - " 1158311, 1151271, 1155441, 1137972, 1162120, 1154529, 1142755, 1156269,\n", - " 1151379, 1137908, 1155122, 1149519, 1155755, 1146913, 1145794, 1145806,\n", - " 1156463, 1168235, 1154763, 1155628, 1155630, 1158486, 1156563, 1154547,\n", - " 1154559, 1136466, 1158564, 1158824, 1153715, 1158335, 1157000, 1156994,\n", - " 1155646, 1153364, 1160958, 1143254, 1143261, 1143257, 1146938, 1161796,\n", - " 1160223, 1154250, 1154240, 1154080, 1164292, 1143189, 1143196, 1153317,\n", - " 1153318, 1157439, 1157928, 1140748, 1157660, 1158124, 1158584, 1158204,\n", - " 1155035, 1137381, 1159116, 1137316, 1140914, 1135601, 1135614, 1145513,\n", - " 1145514, 1148149, 1155848, 1155843, 1157685, 1157684, 1146325, 1149137,\n", - " 1156092, 1155718, 1161450, 1152220, 1152222, 1155434, 1152498, 1140381,\n", - " 1155884, 1157732, 1157735, 1157033, 1155971, 1155975, 1142070, 1156811,\n", - " 1149700, 1163238, 1136896, 1158760, 1158764, 1158882, 1158815, 1158447,\n", - " 1152463, 1156665, 1147599, 1155304, 1153808, 1156284, 1134754, 1140049,\n", - " 1158552, 1151140, 1138099, 1155862, 1158006, 1163170, 1169902, 1135661,\n", - " 1164276, 1164272, 1164277, 1142666, 1150684, 1157751, 1165838, 1153052,\n", - " 1153045, 1155763, 1156107, 1138391, 1138393, 1165234, 1150046, 1155479,\n", - " 1138161, 1164006, 1156787, 1149963, 1163879, 1154578, 1160758, 1146063,\n", - " 1171257, 1171259, 1163455, 1162308, 1164048, 1164061, 1140135, 1148600,\n", - " 1148603, 1143139, 1165047, 1162350, 1156361, 1159025, 1159037, 1168023,\n", - " 1155588, 1164612, 1151227, 1151228, 1138679, 1153924, 1158405, 1144977,\n", - " 1144979, 1149015, 1146500, 1170996, 1141471, 1147427, 1159386, 1156739,\n", - " 1156744, 1150649, 1171040, 1150315, 1144810, 1144812, 1164741, 1164739,\n", - " 1142722, 1156292, 1156293, 1156303, 1165636, 1145743, 1145183, 1163783,\n", - " 1148683, 1145567, 1145228, 1170793, 1143038, 1147355, 1152626, 1139351,\n", - " 1145902, 1153520, 1153534, 1168663, 1158722, 1154076, 1147330, 1147338,\n", - " 1144699, 1150773, 1145502, 1151598, 1149125, 1155172, 1150515, 1144346,\n", - " 1144336, 1157534, 1154670, 1157331, 1141048, 1151664, 1151668, 1169359,\n", - " 1149452, 1149451, 1147491, 1149688, 1158610, 1158623, 1173047, 1172759,\n", - " 1149846, 1157384, 1157383, 1165892, 1171479, 1172488, 1169927, 1148667,\n", - " 1172669, 1173307, 1145033, 1154019, 1164974, 1159652, 1178099, 1157158,\n", - " 1157153, 1172101, 1157372, 1157373, 1147711, 1151850, 1151852, 1148128,\n", - " 1148131, 1147933, 1149237, 1170488, 1169032, 1169037, 1155739, 1181017,\n", - " 1166746, 1140326, 1159100, 1170874, 1154148, 1167520, 1165678, 1184386,\n", - " 1186117, 1169765, 1168481, 1143420, 1171302, 1153805, 1164818, 1171127,\n", - " 1180830, 1163099, 1179807, 1158030, 1161262, 1178505, 1155250, 1154707,\n", - " 1154718, 1157792, 1179164, 1157126, 1157133, 1183106, 1153898, 1153899,\n", - " 1164563, 1162403, 1145626, 1156443, 1178757, 1152276, 1158371, 1155892,\n", - " 1155899, 1162968, 1184317, 1164411, 1160400, 1140393, 1140399, 1164798,\n", - " 1166208, 1164437, 1176976, 1146161, 1170802, 1147182, 1182965, 1184839,\n", - " 1139828, 1139831, 1139837, 1150265, 1163848, 1156049, 1156055, 1190281,\n", - " 1191714, 1190237, 1173058, 1194138, 1156846, 1191018, 1169952, 1169954,\n", - " 1189739, 1192327, 1153733, 1153592, 1171201, 1179321, 1166784, 1185851,\n", - " 1186163, 1186620, 1155959, 1155962, 1185649, 1183807, 1187536, 1189034,\n", - " 1163071, 1169098, 1182401, 1193831], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1197168, 1198782, 1195697, 1199424, 1195523, 1198248, 1200108, 1201090,\n", - " 1199282, 1198458, 1202255, 1201582, 1194626, 1197359, 1195938, 1198633,\n", - " 1196956, 1198557, 1198180, 1196631, 1194649, 1201992, 1197697, 1199519,\n", - " 1194947, 1194882, 1195888, 1195740, 1194759, 1195325, 1196840, 1195132,\n", - " 1195148, 1195270, 1197141, 1197140, 1200761, 1200765, 1196247, 1197265,\n", - " 1196109, 1194859, 1196747, 1195847, 1198915, 1202017, 1196393, 1198282,\n", - " 1199339, 1199060, 1197286, 1197291, 1199185, 1194928, 1199628, 1197990,\n", - " 1200079, 1199152, 1199038, 1194786, 1201511, 1196498, 1200668, 1197977,\n", - " 1196727, 1195771, 1198811, 1201547, 1197214, 1198066, 1198593, 1202630,\n", - " 1201056, 1194803, 1199712, 1201049, 1200553, 1203071, 1197097, 1197100,\n", - " 1199881, 1200692, 1199976, 1197546, 1195607, 1196761, 1201871, 1202209,\n", - " 1200398, 1200391, 1199606, 1195676, 1195664, 1200445, 1196929, 1198929,\n", - " 1195415, 1195181, 1195386, 1201499, 1196597, 1196605, 1198973, 1200585,\n", - " 1199659, 1199662, 1196380, 1198148, 1198824, 1195070, 1201886, 1198131,\n", - " 1195082, 1195160, 1200208, 1194908, 1201771, 1203162, 1196424, 1197872],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1197168, 1198782, 1195697, 1199424, 1195523, 1198248, 1200108, 1201090,\n", - " 1199282, 1198458, 1202255, 1201582, 1194626, 1197359, 1195938, 1198633,\n", - " 1196956, 1198557, 1198180, 1196631, 1194649, 1201992, 1197697, 1199519,\n", - " 1194947, 1194882, 1195888, 1195740, 1194759, 1195325, 1196840, 1195132,\n", - " 1195148, 1195270, 1197141, 1197140, 1200761, 1200765, 1196247, 1197265,\n", - " 1196109, 1194859, 1196747, 1195847, 1198915, 1202017, 1196393, 1198282,\n", - " 1199339, 1199060, 1197286, 1197291, 1199185, 1194928, 1199628, 1197990,\n", - " 1200079, 1199152, 1199038, 1194786, 1201511, 1196498, 1200668, 1197977,\n", - " 1196727, 1195771, 1198811, 1201547, 1197214, 1198066, 1198593, 1202630,\n", - " 1201056, 1194803, 1199712, 1201049, 1200553, 1203071, 1197097, 1197100,\n", - " 1199881, 1200692, 1199976, 1197546, 1195607, 1196761, 1201871, 1202209,\n", - " 1200398, 1200391, 1199606, 1195676, 1195664, 1200445, 1196929, 1198929,\n", - " 1195415, 1195181, 1195386, 1201499, 1196597, 1196605, 1198973, 1200585,\n", - " 1199659, 1199662, 1196380, 1198148, 1198824, 1195070, 1201886, 1198131,\n", - " 1195082, 1195160, 1200208, 1194908, 1201771, 1203162, 1196424, 1197872],\n", - " device='cuda:0', dtype=torch.int32))\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.00723\n", - "sampling 0.006675\n", - "noi time: 0.001972\n", - "get_vertex_data call: 0.070342\n", - "noi group time: 0.003899\n", - "eoi_group_time: 0.016169\n", - "second half: 0.262156\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 32616, 19416, 23798, ..., 1133445, 1103852, 1103853],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 32616, 19416, 23798, ..., 1133445, 1103852, 1103853],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1227503, 1221053, 1214756, ..., 1929320, 1934173, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1227503, 1221053, 1214756, ..., 1929320, 1934173, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1137204, 1141424, 1140285, 1135926, 1137791, 1140793, 1140799, 1141758,\n", - " 1138335, 1136213, 1136215, 1141251, 1141250, 1136965, 1138897, 1138903,\n", - " 1145370, 1146983, 1137271, 1143372, 1139243, 1139866, 1142958, 1143818,\n", - " 1147473, 1147482, 1147483, 1135992, 1135989, 1144636, 1149038, 1146995,\n", - " 1148546, 1153217, 1147091, 1155014, 1139371, 1147211, 1150329, 1152425,\n", - " 1137829, 1140537, 1138112, 1137254, 1137172, 1153456, 1153463, 1140149,\n", - " 1135367, 1135202, 1154739, 1134970, 1141036, 1134794, 1134797, 1157447,\n", - " 1136518, 1137329, 1136610, 1144395, 1137529, 1137534, 1152376, 1137441,\n", - " 1139161, 1135579, 1155083, 1140240, 1138514, 1153099, 1158136, 1135493,\n", - " 1154132, 1154141, 1156899, 1135522, 1139685, 1137287, 1138440, 1138445,\n", - " 1149328, 1138845, 1135088, 1156606, 1147112, 1142611, 1160821, 1156141,\n", - " 1158984, 1148531, 1135760, 1141532, 1143584, 1136457, 1139673, 1134992,\n", - " 1148805, 1136734, 1158961, 1158974, 1139327, 1139324, 1159012, 1159019,\n", - " 1141058, 1153543, 1152701, 1138148, 1138150, 1142237, 1152044, 1140670,\n", - " 1137734, 1137728, 1147316, 1141088, 1141094, 1141098, 1141102, 1149001,\n", - " 1156875, 1136397, 1143767, 1161974, 1146832, 1142499, 1152709, 1141112,\n", - " 1141224, 1141892, 1143676, 1145061, 1145066, 1144233, 1144941, 1136756,\n", - " 1134979, 1134987, 1137087, 1141821, 1146787, 1146799, 1153672, 1158749,\n", - " 1148867, 1148871, 1139188, 1139190, 1139199, 1137661, 1138424, 1144596,\n", - " 1142455, 1136875, 1141579, 1135322, 1135324, 1144182, 1150906, 1144865,\n", - " 1146201, 1139559, 1138539, 1147153, 1136376, 1141365, 1141367, 1141669,\n", - " 1149093, 1138293, 1153556, 1139510, 1139774, 1139650, 1143779, 1140976,\n", - " 1140979, 1140990, 1141565, 1147050, 1147043, 1135457, 1146901, 1146909,\n", - " 1144243, 1144242, 1145340, 1140580, 1141841, 1150692, 1140690, 1134861,\n", - " 1134849, 1145978, 1144072, 1143851, 1146024, 1146141, 1154323, 1154328,\n", - " 1141642, 1141585, 1142533, 1139990, 1139993, 1143293, 1143294, 1147543,\n", - " 1147540, 1147282, 1142816, 1142822, 1147470, 1142630, 1139417, 1148003,\n", - " 1142586, 1138923, 1157717, 1157718, 1136836, 1146099, 1139301, 1139328,\n", - " 1144778, 1145429, 1145427, 1143345, 1144754, 1144765, 1144615, 1140841,\n", - " 1150294, 1138013, 1150919, 1146514, 1143960, 1138024, 1143456, 1143457,\n", - " 1137707, 1140492, 1143937, 1135454, 1143793, 1147521, 1140364, 1137990,\n", - " 1143080, 1168924, 1148966, 1144219, 1147996, 1147999, 1146949, 1144010,\n", - " 1139252, 1147127, 1147234, 1147244, 1147243, 1148704, 1141836, 1148468,\n", - " 1152328, 1143434, 1149714, 1147025, 1147257, 1147248, 1147971, 1139549,\n", - " 1158226, 1143921, 1147880, 1145240, 1145246, 1145751, 1142370, 1142369,\n", - " 1142376, 1142383, 1146159, 1148394, 1151242, 1152530, 1151179, 1150445,\n", - " 1149258, 1148928, 1148930, 1148826, 1154445, 1144526, 1151986, 1151994,\n", - " 1151480, 1151487, 1151473, 1152027, 1144884, 1145263, 1146723, 1134869,\n", - " 1140402, 1147021, 1158950, 1150736, 1150847, 1150730, 1153575, 1149409,\n", - " 1146412, 1148288, 1147866, 1154420, 1148188, 1136247, 1146676, 1146686,\n", - " 1148724, 1146544, 1139936, 1150057, 1143981, 1153179, 1153124, 1145109,\n", - " 1152974, 1167952, 1150932, 1150935, 1155098, 1141022, 1147442, 1151811,\n", - " 1151816, 1135310, 1151906, 1154183, 1149732, 1141420, 1147737, 1153442,\n", - " 1156413, 1156402, 1146623, 1151403, 1144472, 1135687, 1135688, 1152409,\n", - " 1152415, 1152098, 1153032, 1137746, 1146304, 1152622, 1149203, 1157107,\n", - " 1152819, 1155337, 1154123, 1139577, 1151617, 1150578, 1150588, 1136131,\n", - " 1136134, 1148916, 1152950, 1167157, 1138989, 1152903, 1151299, 1146816,\n", - " 1156816, 1153311, 1138283, 1138279, 1156001, 1158712, 1158704, 1162199,\n", - " 1152928, 1151064, 1151071, 1156399, 1156422, 1137543, 1144016, 1148040,\n", - " 1167419, 1149794, 1149804, 1144663, 1137048, 1148628, 1148637, 1158530,\n", - " 1158540, 1137458, 1154564, 1166145, 1135434, 1143442, 1157547, 1154929,\n", - " 1156505, 1155418, 1151251, 1150465, 1146862, 1146854, 1160262, 1156629,\n", - " 1157912, 1150828, 1156935, 1158311, 1151340, 1155441, 1155514, 1153354,\n", - " 1153359, 1150130, 1162120, 1140865, 1154529, 1154528, 1142758, 1138770,\n", - " 1156271, 1157642, 1151379, 1158639, 1140187, 1156641, 1152527, 1135396,\n", - " 1146919, 1145796, 1156463, 1158096, 1155628, 1154555, 1158824, 1158825,\n", - " 1153715, 1158325, 1148834, 1155646, 1153375, 1154240, 1151890, 1156711,\n", - " 1137359, 1154902, 1154898, 1179427, 1143189, 1160904, 1150371, 1153318,\n", - " 1157439, 1157430, 1157934, 1157929, 1137167, 1137166, 1157653, 1158996,\n", - " 1159001, 1159116, 1145693, 1135601, 1145510, 1158664, 1158665, 1157684,\n", - " 1146321, 1156085, 1152209, 1152220, 1159213, 1155439, 1140368, 1157735,\n", - " 1159130, 1159132, 1159120, 1144843, 1155975, 1158846, 1153491, 1136899,\n", - " 1136905, 1136896, 1158753, 1158882, 1161276, 1157304, 1158285, 1136493,\n", - " 1136494, 1136491, 1159240, 1142745, 1153808, 1136640, 1162164, 1157858,\n", - " 1142178, 1153834, 1138101, 1158006, 1161539, 1171195, 1163456, 1164276,\n", - " 1150674, 1161645, 1159052, 1159070, 1159071, 1159057, 1167477, 1157944,\n", - " 1157946, 1160564, 1153042, 1153045, 1171551, 1159731, 1167707, 1167703,\n", - " 1164873, 1156107, 1138393, 1142681, 1167188, 1162917, 1150046, 1149057,\n", - " 1149063, 1149067, 1155479, 1154295, 1153514, 1171987, 1157600, 1138161,\n", - " 1156787, 1149956, 1149963, 1139790, 1164909, 1154590, 1154578, 1139283,\n", - " 1139290, 1148021, 1148771, 1146063, 1158461, 1165306, 1158868, 1158866,\n", - " 1170415, 1140650, 1140643, 1141857, 1148600, 1164979, 1143139, 1143143,\n", - " 1144509, 1156361, 1158655, 1159025, 1159032, 1159038, 1166286, 1169105,\n", - " 1152247, 1143735, 1164592, 1144320, 1159536, 1151227, 1151220, 1138674,\n", - " 1144977, 1149023, 1153239, 1144739, 1152776, 1153212, 1153201, 1141471,\n", - " 1147438, 1157050, 1156739, 1153663, 1150646, 1144812, 1135567, 1164741,\n", - " 1164750, 1156300, 1144058, 1166137, 1145176, 1160230, 1146035, 1172197,\n", - " 1155324, 1166462, 1150533, 1146444, 1146446, 1147693, 1170502, 1152624,\n", - " 1139351, 1139345, 1145892, 1153534, 1163961, 1163962, 1181040, 1181049,\n", - " 1143395, 1171867, 1169742, 1149560, 1149563, 1158724, 1158722, 1144690,\n", - " 1145664, 1167817, 1144672, 1166640, 1169216, 1149480, 1169296, 1155172,\n", - " 1150512, 1150518, 1156119, 1144336, 1170942, 1157534, 1138383, 1147750,\n", - " 1154670, 1154893, 1154885, 1190645, 1169162, 1157331, 1138129, 1151668,\n", - " 1169359, 1172740, 1158623, 1158054, 1158060, 1174651, 1149847, 1154869,\n", - " 1169941, 1152353, 1168451, 1168907, 1173307, 1152150, 1152151, 1152152,\n", - " 1175375, 1159658, 1157153, 1157371, 1147711, 1148128, 1169904, 1157593,\n", - " 1149247, 1167715, 1179679, 1155739, 1179701, 1140333, 1144550, 1170554,\n", - " 1172063, 1166684, 1177175, 1150234, 1154148, 1169423, 1149169, 1171929,\n", - " 1168481, 1166288, 1153803, 1178171, 1171755, 1179807, 1158031, 1161255,\n", - " 1171773, 1176103, 1157795, 1172546, 1163839, 1157126, 1177318, 1153899,\n", - " 1145626, 1172022, 1163542, 1153609, 1152284, 1165186, 1158774, 1158779,\n", - " 1158512, 1155890, 1155899, 1185508, 1157270, 1140397, 1182327, 1185394,\n", - " 1171594, 1168892, 1165474, 1159341, 1162378, 1162380, 1162480, 1154944,\n", - " 1154957, 1146161, 1182384, 1147179, 1170034, 1180079, 1171443, 1139828,\n", - " 1139831, 1187821, 1164924, 1149668, 1186942, 1156055, 1151978, 1182704,\n", - " 1146395, 1180063, 1172371, 1159083, 1156835, 1182925, 1182544, 1182060,\n", - " 1179403, 1194351, 1194394, 1151774, 1182168, 1169707, 1194290, 1177469,\n", - " 1177852, 1158066, 1179601, 1178667, 1155958, 1155959, 1184514, 1179769,\n", - " 1169831, 1162661, 1188327, 1186391, 1191760, 1181033, 1184981, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1137204, 1141424, 1140285, 1135926, 1137791, 1140793, 1140799, 1141758,\n", - " 1138335, 1136213, 1136215, 1141251, 1141250, 1136965, 1138897, 1138903,\n", - " 1145370, 1146983, 1137271, 1143372, 1139243, 1139866, 1142958, 1143818,\n", - " 1147473, 1147482, 1147483, 1135992, 1135989, 1144636, 1149038, 1146995,\n", - " 1148546, 1153217, 1147091, 1155014, 1139371, 1147211, 1150329, 1152425,\n", - " 1137829, 1140537, 1138112, 1137254, 1137172, 1153456, 1153463, 1140149,\n", - " 1135367, 1135202, 1154739, 1134970, 1141036, 1134794, 1134797, 1157447,\n", - " 1136518, 1137329, 1136610, 1144395, 1137529, 1137534, 1152376, 1137441,\n", - " 1139161, 1135579, 1155083, 1140240, 1138514, 1153099, 1158136, 1135493,\n", - " 1154132, 1154141, 1156899, 1135522, 1139685, 1137287, 1138440, 1138445,\n", - " 1149328, 1138845, 1135088, 1156606, 1147112, 1142611, 1160821, 1156141,\n", - " 1158984, 1148531, 1135760, 1141532, 1143584, 1136457, 1139673, 1134992,\n", - " 1148805, 1136734, 1158961, 1158974, 1139327, 1139324, 1159012, 1159019,\n", - " 1141058, 1153543, 1152701, 1138148, 1138150, 1142237, 1152044, 1140670,\n", - " 1137734, 1137728, 1147316, 1141088, 1141094, 1141098, 1141102, 1149001,\n", - " 1156875, 1136397, 1143767, 1161974, 1146832, 1142499, 1152709, 1141112,\n", - " 1141224, 1141892, 1143676, 1145061, 1145066, 1144233, 1144941, 1136756,\n", - " 1134979, 1134987, 1137087, 1141821, 1146787, 1146799, 1153672, 1158749,\n", - " 1148867, 1148871, 1139188, 1139190, 1139199, 1137661, 1138424, 1144596,\n", - " 1142455, 1136875, 1141579, 1135322, 1135324, 1144182, 1150906, 1144865,\n", - " 1146201, 1139559, 1138539, 1147153, 1136376, 1141365, 1141367, 1141669,\n", - " 1149093, 1138293, 1153556, 1139510, 1139774, 1139650, 1143779, 1140976,\n", - " 1140979, 1140990, 1141565, 1147050, 1147043, 1135457, 1146901, 1146909,\n", - " 1144243, 1144242, 1145340, 1140580, 1141841, 1150692, 1140690, 1134861,\n", - " 1134849, 1145978, 1144072, 1143851, 1146024, 1146141, 1154323, 1154328,\n", - " 1141642, 1141585, 1142533, 1139990, 1139993, 1143293, 1143294, 1147543,\n", - " 1147540, 1147282, 1142816, 1142822, 1147470, 1142630, 1139417, 1148003,\n", - " 1142586, 1138923, 1157717, 1157718, 1136836, 1146099, 1139301, 1139328,\n", - " 1144778, 1145429, 1145427, 1143345, 1144754, 1144765, 1144615, 1140841,\n", - " 1150294, 1138013, 1150919, 1146514, 1143960, 1138024, 1143456, 1143457,\n", - " 1137707, 1140492, 1143937, 1135454, 1143793, 1147521, 1140364, 1137990,\n", - " 1143080, 1168924, 1148966, 1144219, 1147996, 1147999, 1146949, 1144010,\n", - " 1139252, 1147127, 1147234, 1147244, 1147243, 1148704, 1141836, 1148468,\n", - " 1152328, 1143434, 1149714, 1147025, 1147257, 1147248, 1147971, 1139549,\n", - " 1158226, 1143921, 1147880, 1145240, 1145246, 1145751, 1142370, 1142369,\n", - " 1142376, 1142383, 1146159, 1148394, 1151242, 1152530, 1151179, 1150445,\n", - " 1149258, 1148928, 1148930, 1148826, 1154445, 1144526, 1151986, 1151994,\n", - " 1151480, 1151487, 1151473, 1152027, 1144884, 1145263, 1146723, 1134869,\n", - " 1140402, 1147021, 1158950, 1150736, 1150847, 1150730, 1153575, 1149409,\n", - " 1146412, 1148288, 1147866, 1154420, 1148188, 1136247, 1146676, 1146686,\n", - " 1148724, 1146544, 1139936, 1150057, 1143981, 1153179, 1153124, 1145109,\n", - " 1152974, 1167952, 1150932, 1150935, 1155098, 1141022, 1147442, 1151811,\n", - " 1151816, 1135310, 1151906, 1154183, 1149732, 1141420, 1147737, 1153442,\n", - " 1156413, 1156402, 1146623, 1151403, 1144472, 1135687, 1135688, 1152409,\n", - " 1152415, 1152098, 1153032, 1137746, 1146304, 1152622, 1149203, 1157107,\n", - " 1152819, 1155337, 1154123, 1139577, 1151617, 1150578, 1150588, 1136131,\n", - " 1136134, 1148916, 1152950, 1167157, 1138989, 1152903, 1151299, 1146816,\n", - " 1156816, 1153311, 1138283, 1138279, 1156001, 1158712, 1158704, 1162199,\n", - " 1152928, 1151064, 1151071, 1156399, 1156422, 1137543, 1144016, 1148040,\n", - " 1167419, 1149794, 1149804, 1144663, 1137048, 1148628, 1148637, 1158530,\n", - " 1158540, 1137458, 1154564, 1166145, 1135434, 1143442, 1157547, 1154929,\n", - " 1156505, 1155418, 1151251, 1150465, 1146862, 1146854, 1160262, 1156629,\n", - " 1157912, 1150828, 1156935, 1158311, 1151340, 1155441, 1155514, 1153354,\n", - " 1153359, 1150130, 1162120, 1140865, 1154529, 1154528, 1142758, 1138770,\n", - " 1156271, 1157642, 1151379, 1158639, 1140187, 1156641, 1152527, 1135396,\n", - " 1146919, 1145796, 1156463, 1158096, 1155628, 1154555, 1158824, 1158825,\n", - " 1153715, 1158325, 1148834, 1155646, 1153375, 1154240, 1151890, 1156711,\n", - " 1137359, 1154902, 1154898, 1179427, 1143189, 1160904, 1150371, 1153318,\n", - " 1157439, 1157430, 1157934, 1157929, 1137167, 1137166, 1157653, 1158996,\n", - " 1159001, 1159116, 1145693, 1135601, 1145510, 1158664, 1158665, 1157684,\n", - " 1146321, 1156085, 1152209, 1152220, 1159213, 1155439, 1140368, 1157735,\n", - " 1159130, 1159132, 1159120, 1144843, 1155975, 1158846, 1153491, 1136899,\n", - " 1136905, 1136896, 1158753, 1158882, 1161276, 1157304, 1158285, 1136493,\n", - " 1136494, 1136491, 1159240, 1142745, 1153808, 1136640, 1162164, 1157858,\n", - " 1142178, 1153834, 1138101, 1158006, 1161539, 1171195, 1163456, 1164276,\n", - " 1150674, 1161645, 1159052, 1159070, 1159071, 1159057, 1167477, 1157944,\n", - " 1157946, 1160564, 1153042, 1153045, 1171551, 1159731, 1167707, 1167703,\n", - " 1164873, 1156107, 1138393, 1142681, 1167188, 1162917, 1150046, 1149057,\n", - " 1149063, 1149067, 1155479, 1154295, 1153514, 1171987, 1157600, 1138161,\n", - " 1156787, 1149956, 1149963, 1139790, 1164909, 1154590, 1154578, 1139283,\n", - " 1139290, 1148021, 1148771, 1146063, 1158461, 1165306, 1158868, 1158866,\n", - " 1170415, 1140650, 1140643, 1141857, 1148600, 1164979, 1143139, 1143143,\n", - " 1144509, 1156361, 1158655, 1159025, 1159032, 1159038, 1166286, 1169105,\n", - " 1152247, 1143735, 1164592, 1144320, 1159536, 1151227, 1151220, 1138674,\n", - " 1144977, 1149023, 1153239, 1144739, 1152776, 1153212, 1153201, 1141471,\n", - " 1147438, 1157050, 1156739, 1153663, 1150646, 1144812, 1135567, 1164741,\n", - " 1164750, 1156300, 1144058, 1166137, 1145176, 1160230, 1146035, 1172197,\n", - " 1155324, 1166462, 1150533, 1146444, 1146446, 1147693, 1170502, 1152624,\n", - " 1139351, 1139345, 1145892, 1153534, 1163961, 1163962, 1181040, 1181049,\n", - " 1143395, 1171867, 1169742, 1149560, 1149563, 1158724, 1158722, 1144690,\n", - " 1145664, 1167817, 1144672, 1166640, 1169216, 1149480, 1169296, 1155172,\n", - " 1150512, 1150518, 1156119, 1144336, 1170942, 1157534, 1138383, 1147750,\n", - " 1154670, 1154893, 1154885, 1190645, 1169162, 1157331, 1138129, 1151668,\n", - " 1169359, 1172740, 1158623, 1158054, 1158060, 1174651, 1149847, 1154869,\n", - " 1169941, 1152353, 1168451, 1168907, 1173307, 1152150, 1152151, 1152152,\n", - " 1175375, 1159658, 1157153, 1157371, 1147711, 1148128, 1169904, 1157593,\n", - " 1149247, 1167715, 1179679, 1155739, 1179701, 1140333, 1144550, 1170554,\n", - " 1172063, 1166684, 1177175, 1150234, 1154148, 1169423, 1149169, 1171929,\n", - " 1168481, 1166288, 1153803, 1178171, 1171755, 1179807, 1158031, 1161255,\n", - " 1171773, 1176103, 1157795, 1172546, 1163839, 1157126, 1177318, 1153899,\n", - " 1145626, 1172022, 1163542, 1153609, 1152284, 1165186, 1158774, 1158779,\n", - " 1158512, 1155890, 1155899, 1185508, 1157270, 1140397, 1182327, 1185394,\n", - " 1171594, 1168892, 1165474, 1159341, 1162378, 1162380, 1162480, 1154944,\n", - " 1154957, 1146161, 1182384, 1147179, 1170034, 1180079, 1171443, 1139828,\n", - " 1139831, 1187821, 1164924, 1149668, 1186942, 1156055, 1151978, 1182704,\n", - " 1146395, 1180063, 1172371, 1159083, 1156835, 1182925, 1182544, 1182060,\n", - " 1179403, 1194351, 1194394, 1151774, 1182168, 1169707, 1194290, 1177469,\n", - " 1177852, 1158066, 1179601, 1178667, 1155958, 1155959, 1184514, 1179769,\n", - " 1169831, 1162661, 1188327, 1186391, 1191760, 1181033, 1184981, 1157022],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195711, 1199424, 1199282, 1202255, 1198832, 1201577, 1201582, 1199248,\n", - " 1198633, 1198694, 1202804, 1198557, 1195964, 1196672, 1194770, 1197159,\n", - " 1196631, 1194649, 1195514, 1201992, 1196031, 1197709, 1198095, 1194952,\n", - " 1198306, 1199172, 1196334, 1196695, 1196521, 1195325, 1195989, 1198264,\n", - " 1198266, 1198958, 1198649, 1198167, 1196711, 1199810, 1199814, 1195266,\n", - " 1197141, 1198219, 1198207, 1199315, 1197478, 1199711, 1196399, 1199059,\n", - " 1199185, 1197577, 1199628, 1202448, 1200076, 1199154, 1198406, 1198410,\n", - " 1199579, 1199231, 1195018, 1201511, 1196508, 1197601, 1197607, 1201116,\n", - " 1196727, 1195773, 1198428, 1199889, 1198811, 1199555, 1199083, 1199081,\n", - " 1200169, 1199445, 1201156, 1201056, 1199548, 1199546, 1199721, 1200363,\n", - " 1200546, 1200555, 1200558, 1197097, 1197100, 1202138, 1199908, 1202239,\n", - " 1202706, 1200181, 1201291, 1195607, 1201871, 1199925, 1198561, 1196966,\n", - " 1200997, 1195679, 1198929, 1198909, 1198911, 1195415, 1195379, 1197060,\n", - " 1197811, 1197821, 1198973, 1199659, 1196382, 1198148, 1198824, 1197655,\n", - " 1200707, 1195163, 1195165, 1200208], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195711, 1199424, 1199282, 1202255, 1198832, 1201577, 1201582, 1199248,\n", - " 1198633, 1198694, 1202804, 1198557, 1195964, 1196672, 1194770, 1197159,\n", - " 1196631, 1194649, 1195514, 1201992, 1196031, 1197709, 1198095, 1194952,\n", - " 1198306, 1199172, 1196334, 1196695, 1196521, 1195325, 1195989, 1198264,\n", - " 1198266, 1198958, 1198649, 1198167, 1196711, 1199810, 1199814, 1195266,\n", - " 1197141, 1198219, 1198207, 1199315, 1197478, 1199711, 1196399, 1199059,\n", - " 1199185, 1197577, 1199628, 1202448, 1200076, 1199154, 1198406, 1198410,\n", - " 1199579, 1199231, 1195018, 1201511, 1196508, 1197601, 1197607, 1201116,\n", - " 1196727, 1195773, 1198428, 1199889, 1198811, 1199555, 1199083, 1199081,\n", - " 1200169, 1199445, 1201156, 1201056, 1199548, 1199546, 1199721, 1200363,\n", - " 1200546, 1200555, 1200558, 1197097, 1197100, 1202138, 1199908, 1202239,\n", - " 1202706, 1200181, 1201291, 1195607, 1201871, 1199925, 1198561, 1196966,\n", - " 1200997, 1195679, 1198929, 1198909, 1198911, 1195415, 1195379, 1197060,\n", - " 1197811, 1197821, 1198973, 1199659, 1196382, 1198148, 1198824, 1197655,\n", - " 1200707, 1195163, 1195165, 1200208], device='cuda:0',\n", - " dtype=torch.int32))\n", - "{'institution': tensor([[ 1.5165e-01, -1.0807e-04, 6.0061e-01, ..., 6.4994e-02,\n", - " -1.6269e-03, -5.4436e-03],\n", - " [ 2.4182e-01, -4.6688e-04, 7.3825e-01, ..., 5.2007e-02,\n", - " -1.8652e-03, -6.5989e-03],\n", - " [ 1.6239e-01, -1.5363e-04, 5.1102e-01, ..., 8.4086e-02,\n", - " -1.9767e-03, -5.0469e-03],\n", - " ...,\n", - " [ 9.8477e-02, 4.4194e-02, 3.4491e-01, ..., 1.2915e-01,\n", - " -2.2780e-03, -3.7558e-03],\n", - " [ 1.9405e-01, -2.1693e-04, 6.0156e-01, ..., 5.1169e-02,\n", - " -1.8736e-03, -5.6141e-03],\n", - " [ 1.1694e-01, 2.6949e-02, 3.9339e-01, ..., 1.3322e-01,\n", - " -2.2507e-03, -4.4294e-03]], device='cuda:0'), 'paper': tensor([[ 3.7058e-01, 4.1407e-01, -8.5200e-03, ..., -1.6389e-02,\n", - " -1.2135e-02, 7.6760e-01],\n", - " [-8.9008e-03, 9.9939e-02, -1.8568e-03, ..., 1.0625e+00,\n", - " -2.2257e-02, 2.3410e-01],\n", - " [-1.3524e-03, 5.4313e-01, -4.5907e-03, ..., -1.7411e-02,\n", - " -1.1360e-02, 9.3158e-02],\n", - " ...,\n", - " [-1.6478e-02, 1.2052e+00, 3.0788e-01, ..., 2.6896e+00,\n", - " -3.6463e-02, 1.2411e+00],\n", - " [-3.8678e-02, -2.9594e-02, 2.9104e+00, ..., -2.6650e-02,\n", - " -2.7508e-02, -5.0082e-02],\n", - " [-1.8320e-02, 1.8475e+00, 5.2430e-01, ..., 4.1645e+00,\n", - " -4.6237e-02, 2.2040e+00]], device='cuda:0'), 'author': tensor([[-1.6610e-03, -1.3966e-03, 1.8610e-01, ..., 7.3123e-01,\n", - " 7.9330e-01, -9.8350e-05],\n", - " [-1.8633e-03, -1.1534e-03, 1.4655e-01, ..., 6.6658e-01,\n", - " 7.3179e-01, -3.8856e-04],\n", - " [-2.9668e-03, 3.2722e-03, 8.0609e-02, ..., 6.5668e-01,\n", - " 4.9453e-01, -1.8996e-03],\n", - " ...,\n", - " [-4.5682e-03, 2.2211e-01, 4.1830e-02, ..., 5.3569e-01,\n", - " -6.3167e-04, -5.0118e-03],\n", - " [-2.5893e-03, 6.4369e-02, -1.1003e-04, ..., 6.6016e-01,\n", - " 5.0176e-01, -9.5488e-04],\n", - " [-2.5893e-03, 6.4369e-02, -1.1003e-04, ..., 6.6016e-01,\n", - " 5.0176e-01, -9.5488e-04]], device='cuda:0'), 'field_of_study': tensor([[-2.0996e-03, 4.7847e-01, 2.7017e-01, ..., -7.2557e-03,\n", - " 2.6415e-01, 3.1349e-01],\n", - " [-2.6691e-03, 2.6608e-01, 1.2990e-02, ..., -6.1263e-03,\n", - " 1.7172e-01, 1.4969e-01],\n", - " [-2.0586e-04, 4.4132e-01, 1.5863e-01, ..., -7.0684e-03,\n", - " 2.1359e-01, -6.1252e-04],\n", - " ...,\n", - " [-3.5810e-03, 3.7369e-01, 3.9483e-02, ..., -5.5101e-03,\n", - " 2.3744e-01, 2.5848e-01],\n", - " [-3.6294e-03, 4.9518e-01, 1.3042e-01, ..., -5.2468e-03,\n", - " 2.9016e-01, 2.4687e-01],\n", - " [-2.3829e-03, 2.3221e-01, -1.3666e-04, ..., -6.3715e-03,\n", - " 1.7669e-01, 6.9267e-02]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 19, 192, 184, 45, 475, 272, 272, 424, 320, 413, 221, 400,\n", - " 432, 565, 749, 405, 405, 1020, 299, 299, 842, 675, 675, 879,\n", - " 467, 992, 766, 994, 673, 673, 673, 673, 531, 743, 1058, 1058,\n", - " 869, 888, 764, 1135, 1135, 1129, 1225, 1225, 1209, 1209, 1604, 1491,\n", - " 1528, 1689, 1656, 1697, 1697, 1761, 1947, 1710, 1742, 1742, 1965, 1730,\n", - " 1926, 2044, 2094, 1928, 1928, 2057, 1939, 2085, 2159, 2235, 2222, 2222,\n", - " 2167, 2506, 2326, 2441, 2520, 2658, 2658, 2612, 2704, 2704, 2704, 2709,\n", - " 2684, 2756, 2880, 2830, 2830, 3143, 3143, 3007, 3007, 3234, 3072, 3072,\n", - " 3072, 3212, 3175, 3232, 3274, 3402, 3402, 3725, 3580, 3568, 3561, 3772,\n", - " 3535, 3578, 3724, 3724, 3978, 3736, 3766, 3766, 3479, 4021, 4112, 4202,\n", - " 4172, 4188, 4149, 4341, 4520, 4389, 4591, 4591, 4591, 4591, 4591, 4591,\n", - " 4510, 4665, 4677, 4800, 4807, 4750, 4750, 4913, 4818, 4905, 4804, 4984,\n", - " 4863, 5087, 4869, 5137, 5218, 5210, 5137, 5147, 5152, 5198, 5311, 5311,\n", - " 5311, 5455, 5546, 5711, 5711, 5719, 5742, 5624, 5624, 5624, 5515, 5551,\n", - " 5551, 5742, 5742, 5742, 5742, 5976, 5976, 5976, 5955, 6071, 6142],\n", - " [ 67, 36, 82, 2, 104, 55, 51, 25, 104, 35, 112, 96,\n", - " 104, 83, 35, 69, 13, 57, 53, 103, 23, 115, 91, 35,\n", - " 64, 22, 31, 23, 101, 64, 63, 68, 81, 39, 27, 67,\n", - " 90, 33, 15, 73, 61, 57, 100, 35, 64, 94, 19, 107,\n", - " 30, 49, 63, 62, 67, 76, 62, 106, 74, 5, 37, 64,\n", - " 43, 34, 85, 108, 75, 69, 16, 17, 6, 34, 9, 89,\n", - " 112, 15, 64, 42, 35, 11, 86, 23, 11, 72, 113, 47,\n", - " 21, 43, 13, 70, 50, 2, 38, 93, 95, 44, 92, 12,\n", - " 95, 105, 67, 43, 35, 96, 40, 80, 24, 64, 38, 97,\n", - " 65, 3, 114, 52, 29, 97, 95, 66, 69, 32, 64, 87,\n", - " 58, 71, 11, 104, 87, 97, 4, 110, 95, 63, 79, 48,\n", - " 109, 3, 64, 64, 102, 64, 45, 28, 54, 92, 64, 30,\n", - " 26, 104, 18, 111, 101, 20, 78, 0, 62, 41, 84, 88,\n", - " 56, 1, 23, 64, 18, 48, 19, 29, 60, 19, 10, 64,\n", - " 14, 46, 59, 98, 99, 8, 77, 29, 64, 7, 105]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[ 267, 966, 1253, ..., 3507, 379, 4437],\n", - " [ 51, 7, 143, ..., 6123, 6136, 6082]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 63, 104, 21, ..., 94, 31, 31],\n", - " [ 80, 85, 158, ..., 6174, 6149, 6186]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 255, 50, 50, ..., 6136, 6136, 6085],\n", - " [ 355, 396, 401, ..., 251, 261, 209]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 719, 692, 209, ..., 246, 677, 132],\n", - " [ 99, 101, 107, ..., 6200, 6193, 6195]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4025, 2732, 2732, ..., 5367, 5449, 5106],\n", - " [ 29, 36, 53, ..., 6192, 6192, 6130]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 255, 255, 255, ..., 6097, 6097, 6097],\n", - " [1589, 1785, 3559, ..., 242, 414, 760]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 19, 129, 129, ..., 6071, 6142, 6142],\n", - " [1360, 4693, 5256, ..., 4357, 5273, 5100]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.007472\n", - "sampling 0.007311\n", - "noi time: 0.001553\n", - "get_vertex_data call: 0.033114\n", - "noi group time: 0.003476\n", - "eoi_group_time: 0.015424\n", - "second half: 0.222644\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31145, 24187, 32616, ..., 1120069, 1120079, 1120075],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31145, 24187, 32616, ..., 1120069, 1120079, 1120075],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1230244, 1203800, 1230566, ..., 1926876, 1930681, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1230244, 1203800, 1230566, ..., 1926876, 1930681, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1141439, 1136228, 1136238, 1136347, 1135920, 1135926, 1135165, 1135716,\n", - " 1135727, 1141758, 1138335, 1136969, 1141443, 1149826, 1139811, 1145373,\n", - " 1145984, 1137271, 1138938, 1139141, 1143372, 1139241, 1146647, 1139615,\n", - " 1139608, 1142963, 1149216, 1149228, 1143820, 1144637, 1146667, 1136125,\n", - " 1153220, 1141904, 1141911, 1155014, 1155018, 1139365, 1139371, 1152427,\n", - " 1136270, 1140537, 1140540, 1138112, 1137254, 1137180, 1137181, 1140029,\n", - " 1140953, 1135367, 1135202, 1134960, 1141036, 1134794, 1138508, 1137329,\n", - " 1136178, 1137693, 1139215, 1144395, 1136826, 1137441, 1136199, 1136928,\n", - " 1135265, 1156159, 1139161, 1134841, 1141702, 1135579, 1135668, 1156342,\n", - " 1153098, 1137957, 1156965, 1135490, 1135499, 1156899, 1135522, 1138305,\n", - " 1138436, 1138440, 1138461, 1137489, 1157189, 1136594, 1158390, 1149328,\n", - " 1138844, 1138846, 1135088, 1156603, 1156602, 1156606, 1142611, 1135359,\n", - " 1158984, 1148531, 1148533, 1150956, 1137109, 1135760, 1139846, 1136457,\n", - " 1139667, 1142249, 1136081, 1134992, 1142434, 1142786, 1136548, 1152654,\n", - " 1135782, 1142906, 1159019, 1143631, 1143625, 1140034, 1152696, 1136067,\n", - " 1139933, 1138151, 1134881, 1146075, 1140557, 1152044, 1142290, 1137728,\n", - " 1134750, 1135549, 1141088, 1141098, 1162958, 1149000, 1149003, 1143767,\n", - " 1137297, 1143221, 1137670, 1139025, 1139032, 1139033, 1140003, 1149979,\n", - " 1149982, 1146834, 1146847, 1142511, 1141690, 1135861, 1136637, 1141224,\n", - " 1136917, 1139730, 1143675, 1143677, 1145065, 1141786, 1139495, 1134979,\n", - " 1137074, 1141821, 1143167, 1140163, 1139188, 1141475, 1138719, 1144598,\n", - " 1148263, 1136864, 1141579, 1135322, 1135327, 1150906, 1161095, 1146201,\n", - " 1137374, 1138539, 1137852, 1137854, 1147153, 1136376, 1136378, 1142646,\n", - " 1142650, 1141365, 1151112, 1141678, 1139022, 1144279, 1139510, 1139769,\n", - " 1139661, 1140976, 1140983, 1140990, 1143692, 1147050, 1152976, 1141925,\n", - " 1146898, 1144242, 1137149, 1139398, 1143643, 1141382, 1141390, 1145978,\n", - " 1145983, 1145974, 1143845, 1136277, 1146019, 1146024, 1142533, 1149933,\n", - " 1139990, 1143294, 1147540, 1148763, 1147282, 1149162, 1140341, 1142628,\n", - " 1139417, 1139418, 1138923, 1136836, 1139328, 1141490, 1141496, 1138234,\n", - " 1143345, 1144766, 1144753, 1144615, 1145808, 1145816, 1150294, 1150299,\n", - " 1146523, 1143954, 1138018, 1143456, 1140492, 1142000, 1143937, 1143799,\n", - " 1140364, 1137990, 1143080, 1143082, 1168921, 1148969, 1147996, 1147999,\n", - " 1134902, 1134907, 1147131, 1145466, 1148704, 1148468, 1143432, 1139549,\n", - " 1158226, 1143921, 1154526, 1145240, 1145751, 1146159, 1146178, 1148215,\n", - " 1148223, 1148217, 1152530, 1152537, 1150445, 1148940, 1148826, 1149777,\n", - " 1144514, 1145833, 1144203, 1151994, 1151997, 1151480, 1152017, 1152022,\n", - " 1154271, 1154263, 1151041, 1149534, 1147019, 1147021, 1147023, 1153963,\n", - " 1158950, 1141949, 1150736, 1153574, 1151717, 1148608, 1151412, 1154420,\n", - " 1148188, 1139718, 1146676, 1152481, 1138404, 1146544, 1146559, 1149810,\n", - " 1151937, 1143895, 1148204, 1148206, 1153182, 1154203, 1141732, 1154168,\n", - " 1153188, 1145104, 1145111, 1152969, 1148057, 1154962, 1152866, 1144849,\n", - " 1150356, 1148084, 1141016, 1147446, 1151821, 1135307, 1135310, 1150715,\n", - " 1141420, 1151352, 1147737, 1145086, 1148949, 1146969, 1156413, 1149359,\n", - " 1150219, 1146623, 1142982, 1144476, 1146280, 1151729, 1153037, 1137746,\n", - " 1152622, 1155146, 1149203, 1149205, 1155337, 1154119, 1154120, 1154123,\n", - " 1157826, 1154633, 1151573, 1151617, 1151629, 1136788, 1152957, 1145930,\n", - " 1152903, 1151311, 1159699, 1152341, 1146816, 1153302, 1153311, 1146704,\n", - " 1136028, 1136031, 1158704, 1156621, 1151188, 1151064, 1150164, 1142257,\n", - " 1148040, 1154462, 1149300, 1155218, 1160866, 1149794, 1148628, 1158530,\n", - " 1137458, 1142041, 1142047, 1157466, 1157225, 1135434, 1158916, 1154929,\n", - " 1156505, 1157064, 1152833, 1145191, 1145196, 1145187, 1145192, 1137808,\n", - " 1135730, 1152182, 1135634, 1151467, 1158306, 1158308, 1155441, 1153354,\n", - " 1153359, 1150130, 1150131, 1150132, 1150136, 1140868, 1154529, 1154530,\n", - " 1150488, 1157637, 1151379, 1137905, 1156649, 1155122, 1152527, 1157183,\n", - " 1149519, 1153482, 1151424, 1156463, 1154763, 1155628, 1155630, 1154547,\n", - " 1154557, 1154555, 1136466, 1158824, 1158325, 1157000, 1148654, 1143263,\n", - " 1154652, 1162393, 1154250, 1154084, 1154902, 1143189, 1157439, 1155613,\n", - " 1141620, 1150981, 1150987, 1155293, 1143517, 1159618, 1160460, 1158126,\n", - " 1156764, 1158996, 1159001, 1153776, 1185749, 1137381, 1159116, 1177757,\n", - " 1145690, 1140923, 1140914, 1135601, 1145515, 1148148, 1150661, 1158502,\n", - " 1155843, 1158669, 1138215, 1157684, 1152209, 1140370, 1140380, 1157038,\n", - " 1144843, 1142469, 1155975, 1149702, 1154592, 1160163, 1153503, 1185567,\n", - " 1173677, 1140221, 1158815, 1156774, 1156778, 1158285, 1136494, 1156495,\n", - " 1136640, 1140049, 1166429, 1158558, 1153827, 1163814, 1159936, 1138110,\n", - " 1158007, 1155521, 1161539, 1142666, 1157747, 1167359, 1159070, 1165830,\n", - " 1153052, 1153045, 1171551, 1162845, 1155772, 1142878, 1138393, 1150046,\n", - " 1155479, 1151014, 1153519, 1142406, 1138161, 1164006, 1156787, 1149956,\n", - " 1149963, 1139281, 1156983, 1148771, 1146063, 1164055, 1169493, 1140653,\n", - " 1141863, 1148600, 1148603, 1164990, 1168170, 1156352, 1156358, 1141792,\n", - " 1158653, 1159032, 1169104, 1169108, 1166731, 1160600, 1160605, 1146510,\n", - " 1153239, 1167999, 1161240, 1144739, 1144747, 1163527, 1162580, 1153209,\n", - " 1141471, 1151650, 1147426, 1156739, 1157958, 1153663, 1167373, 1161015,\n", - " 1150648, 1163260, 1144812, 1164741, 1148683, 1145228, 1169282, 1147677,\n", - " 1163517, 1144973, 1160720, 1169239, 1145902, 1171570, 1152203, 1143402,\n", - " 1143404, 1149557, 1166661, 1147336, 1147339, 1147338, 1145677, 1192410,\n", - " 1179488, 1145502, 1169298, 1155172, 1165011, 1150518, 1156119, 1145531,\n", - " 1144336, 1147746, 1154670, 1169162, 1169157, 1157331, 1138142, 1154364,\n", - " 1149446, 1147491, 1138609, 1158611, 1158623, 1158060, 1172867, 1157384,\n", - " 1155494, 1160536, 1152354, 1165524, 1168050, 1149402, 1148667, 1182114,\n", - " 1173307, 1169144, 1153755, 1153754, 1167857, 1178422, 1151696, 1157158,\n", - " 1147708, 1147711, 1151850, 1169687, 1135021, 1167712, 1172961, 1181020,\n", - " 1168817, 1146755, 1140326, 1166684, 1170874, 1182131, 1154148, 1149173,\n", - " 1178610, 1186117, 1143279, 1167658, 1143410, 1179243, 1171297, 1153803,\n", - " 1153141, 1164818, 1166554, 1161255, 1162129, 1157792, 1171623, 1155804,\n", - " 1187257, 1158249, 1158253, 1153898, 1145626, 1178776, 1165230, 1170069,\n", - " 1158512, 1158370, 1155892, 1180849, 1179924, 1168273, 1180168, 1169062,\n", - " 1168886, 1160078, 1163422, 1163421, 1164339, 1187176, 1165443, 1146169,\n", - " 1141516, 1172608, 1189414, 1167670, 1184050, 1139828, 1139831, 1150265,\n", - " 1154812, 1163848, 1156055, 1181888, 1172696, 1192884, 1140992, 1140996,\n", - " 1181695, 1159169, 1169786, 1190741, 1178630, 1177617, 1153592, 1181845,\n", - " 1180997, 1180999, 1158070, 1166788, 1180266, 1179738, 1155959, 1194241,\n", - " 1178453, 1182681, 1191422, 1192156, 1172896, 1185356, 1176970, 1192931,\n", - " 1192375, 1191151, 1193834, 1157017, 1161940], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1141439, 1136228, 1136238, 1136347, 1135920, 1135926, 1135165, 1135716,\n", - " 1135727, 1141758, 1138335, 1136969, 1141443, 1149826, 1139811, 1145373,\n", - " 1145984, 1137271, 1138938, 1139141, 1143372, 1139241, 1146647, 1139615,\n", - " 1139608, 1142963, 1149216, 1149228, 1143820, 1144637, 1146667, 1136125,\n", - " 1153220, 1141904, 1141911, 1155014, 1155018, 1139365, 1139371, 1152427,\n", - " 1136270, 1140537, 1140540, 1138112, 1137254, 1137180, 1137181, 1140029,\n", - " 1140953, 1135367, 1135202, 1134960, 1141036, 1134794, 1138508, 1137329,\n", - " 1136178, 1137693, 1139215, 1144395, 1136826, 1137441, 1136199, 1136928,\n", - " 1135265, 1156159, 1139161, 1134841, 1141702, 1135579, 1135668, 1156342,\n", - " 1153098, 1137957, 1156965, 1135490, 1135499, 1156899, 1135522, 1138305,\n", - " 1138436, 1138440, 1138461, 1137489, 1157189, 1136594, 1158390, 1149328,\n", - " 1138844, 1138846, 1135088, 1156603, 1156602, 1156606, 1142611, 1135359,\n", - " 1158984, 1148531, 1148533, 1150956, 1137109, 1135760, 1139846, 1136457,\n", - " 1139667, 1142249, 1136081, 1134992, 1142434, 1142786, 1136548, 1152654,\n", - " 1135782, 1142906, 1159019, 1143631, 1143625, 1140034, 1152696, 1136067,\n", - " 1139933, 1138151, 1134881, 1146075, 1140557, 1152044, 1142290, 1137728,\n", - " 1134750, 1135549, 1141088, 1141098, 1162958, 1149000, 1149003, 1143767,\n", - " 1137297, 1143221, 1137670, 1139025, 1139032, 1139033, 1140003, 1149979,\n", - " 1149982, 1146834, 1146847, 1142511, 1141690, 1135861, 1136637, 1141224,\n", - " 1136917, 1139730, 1143675, 1143677, 1145065, 1141786, 1139495, 1134979,\n", - " 1137074, 1141821, 1143167, 1140163, 1139188, 1141475, 1138719, 1144598,\n", - " 1148263, 1136864, 1141579, 1135322, 1135327, 1150906, 1161095, 1146201,\n", - " 1137374, 1138539, 1137852, 1137854, 1147153, 1136376, 1136378, 1142646,\n", - " 1142650, 1141365, 1151112, 1141678, 1139022, 1144279, 1139510, 1139769,\n", - " 1139661, 1140976, 1140983, 1140990, 1143692, 1147050, 1152976, 1141925,\n", - " 1146898, 1144242, 1137149, 1139398, 1143643, 1141382, 1141390, 1145978,\n", - " 1145983, 1145974, 1143845, 1136277, 1146019, 1146024, 1142533, 1149933,\n", - " 1139990, 1143294, 1147540, 1148763, 1147282, 1149162, 1140341, 1142628,\n", - " 1139417, 1139418, 1138923, 1136836, 1139328, 1141490, 1141496, 1138234,\n", - " 1143345, 1144766, 1144753, 1144615, 1145808, 1145816, 1150294, 1150299,\n", - " 1146523, 1143954, 1138018, 1143456, 1140492, 1142000, 1143937, 1143799,\n", - " 1140364, 1137990, 1143080, 1143082, 1168921, 1148969, 1147996, 1147999,\n", - " 1134902, 1134907, 1147131, 1145466, 1148704, 1148468, 1143432, 1139549,\n", - " 1158226, 1143921, 1154526, 1145240, 1145751, 1146159, 1146178, 1148215,\n", - " 1148223, 1148217, 1152530, 1152537, 1150445, 1148940, 1148826, 1149777,\n", - " 1144514, 1145833, 1144203, 1151994, 1151997, 1151480, 1152017, 1152022,\n", - " 1154271, 1154263, 1151041, 1149534, 1147019, 1147021, 1147023, 1153963,\n", - " 1158950, 1141949, 1150736, 1153574, 1151717, 1148608, 1151412, 1154420,\n", - " 1148188, 1139718, 1146676, 1152481, 1138404, 1146544, 1146559, 1149810,\n", - " 1151937, 1143895, 1148204, 1148206, 1153182, 1154203, 1141732, 1154168,\n", - " 1153188, 1145104, 1145111, 1152969, 1148057, 1154962, 1152866, 1144849,\n", - " 1150356, 1148084, 1141016, 1147446, 1151821, 1135307, 1135310, 1150715,\n", - " 1141420, 1151352, 1147737, 1145086, 1148949, 1146969, 1156413, 1149359,\n", - " 1150219, 1146623, 1142982, 1144476, 1146280, 1151729, 1153037, 1137746,\n", - " 1152622, 1155146, 1149203, 1149205, 1155337, 1154119, 1154120, 1154123,\n", - " 1157826, 1154633, 1151573, 1151617, 1151629, 1136788, 1152957, 1145930,\n", - " 1152903, 1151311, 1159699, 1152341, 1146816, 1153302, 1153311, 1146704,\n", - " 1136028, 1136031, 1158704, 1156621, 1151188, 1151064, 1150164, 1142257,\n", - " 1148040, 1154462, 1149300, 1155218, 1160866, 1149794, 1148628, 1158530,\n", - " 1137458, 1142041, 1142047, 1157466, 1157225, 1135434, 1158916, 1154929,\n", - " 1156505, 1157064, 1152833, 1145191, 1145196, 1145187, 1145192, 1137808,\n", - " 1135730, 1152182, 1135634, 1151467, 1158306, 1158308, 1155441, 1153354,\n", - " 1153359, 1150130, 1150131, 1150132, 1150136, 1140868, 1154529, 1154530,\n", - " 1150488, 1157637, 1151379, 1137905, 1156649, 1155122, 1152527, 1157183,\n", - " 1149519, 1153482, 1151424, 1156463, 1154763, 1155628, 1155630, 1154547,\n", - " 1154557, 1154555, 1136466, 1158824, 1158325, 1157000, 1148654, 1143263,\n", - " 1154652, 1162393, 1154250, 1154084, 1154902, 1143189, 1157439, 1155613,\n", - " 1141620, 1150981, 1150987, 1155293, 1143517, 1159618, 1160460, 1158126,\n", - " 1156764, 1158996, 1159001, 1153776, 1185749, 1137381, 1159116, 1177757,\n", - " 1145690, 1140923, 1140914, 1135601, 1145515, 1148148, 1150661, 1158502,\n", - " 1155843, 1158669, 1138215, 1157684, 1152209, 1140370, 1140380, 1157038,\n", - " 1144843, 1142469, 1155975, 1149702, 1154592, 1160163, 1153503, 1185567,\n", - " 1173677, 1140221, 1158815, 1156774, 1156778, 1158285, 1136494, 1156495,\n", - " 1136640, 1140049, 1166429, 1158558, 1153827, 1163814, 1159936, 1138110,\n", - " 1158007, 1155521, 1161539, 1142666, 1157747, 1167359, 1159070, 1165830,\n", - " 1153052, 1153045, 1171551, 1162845, 1155772, 1142878, 1138393, 1150046,\n", - " 1155479, 1151014, 1153519, 1142406, 1138161, 1164006, 1156787, 1149956,\n", - " 1149963, 1139281, 1156983, 1148771, 1146063, 1164055, 1169493, 1140653,\n", - " 1141863, 1148600, 1148603, 1164990, 1168170, 1156352, 1156358, 1141792,\n", - " 1158653, 1159032, 1169104, 1169108, 1166731, 1160600, 1160605, 1146510,\n", - " 1153239, 1167999, 1161240, 1144739, 1144747, 1163527, 1162580, 1153209,\n", - " 1141471, 1151650, 1147426, 1156739, 1157958, 1153663, 1167373, 1161015,\n", - " 1150648, 1163260, 1144812, 1164741, 1148683, 1145228, 1169282, 1147677,\n", - " 1163517, 1144973, 1160720, 1169239, 1145902, 1171570, 1152203, 1143402,\n", - " 1143404, 1149557, 1166661, 1147336, 1147339, 1147338, 1145677, 1192410,\n", - " 1179488, 1145502, 1169298, 1155172, 1165011, 1150518, 1156119, 1145531,\n", - " 1144336, 1147746, 1154670, 1169162, 1169157, 1157331, 1138142, 1154364,\n", - " 1149446, 1147491, 1138609, 1158611, 1158623, 1158060, 1172867, 1157384,\n", - " 1155494, 1160536, 1152354, 1165524, 1168050, 1149402, 1148667, 1182114,\n", - " 1173307, 1169144, 1153755, 1153754, 1167857, 1178422, 1151696, 1157158,\n", - " 1147708, 1147711, 1151850, 1169687, 1135021, 1167712, 1172961, 1181020,\n", - " 1168817, 1146755, 1140326, 1166684, 1170874, 1182131, 1154148, 1149173,\n", - " 1178610, 1186117, 1143279, 1167658, 1143410, 1179243, 1171297, 1153803,\n", - " 1153141, 1164818, 1166554, 1161255, 1162129, 1157792, 1171623, 1155804,\n", - " 1187257, 1158249, 1158253, 1153898, 1145626, 1178776, 1165230, 1170069,\n", - " 1158512, 1158370, 1155892, 1180849, 1179924, 1168273, 1180168, 1169062,\n", - " 1168886, 1160078, 1163422, 1163421, 1164339, 1187176, 1165443, 1146169,\n", - " 1141516, 1172608, 1189414, 1167670, 1184050, 1139828, 1139831, 1150265,\n", - " 1154812, 1163848, 1156055, 1181888, 1172696, 1192884, 1140992, 1140996,\n", - " 1181695, 1159169, 1169786, 1190741, 1178630, 1177617, 1153592, 1181845,\n", - " 1180997, 1180999, 1158070, 1166788, 1180266, 1179738, 1155959, 1194241,\n", - " 1178453, 1182681, 1191422, 1192156, 1172896, 1185356, 1176970, 1192931,\n", - " 1192375, 1191151, 1193834, 1157017, 1161940], device='cuda:0',\n", - " dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195202, 1196013, 1195334, 1198730, 1201094, 1199282, 1202255, 1201582,\n", - " 1194626, 1199248, 1201018, 1197351, 1198624, 1198694, 1196871, 1194771,\n", - " 1194783, 1194648, 1195511, 1195514, 1195263, 1199135, 1196534, 1201992,\n", - " 1201427, 1198095, 1195462, 1194882, 1195888, 1197856, 1196359, 1196840,\n", - " 1198668, 1195989, 1197792, 1198958, 1199810, 1195148, 1195270, 1195278,\n", - " 1197141, 1196242, 1197367, 1196109, 1196747, 1195850, 1195541, 1199315,\n", - " 1197474, 1199998, 1197640, 1195918, 1196283, 1195351, 1200959, 1199060,\n", - " 1194928, 1197583, 1199628, 1199803, 1197990, 1200869, 1199038, 1198400,\n", - " 1198410, 1194786, 1194795, 1197601, 1196727, 1195773, 1198428, 1200018,\n", - " 1195557, 1198811, 1201534, 1200562, 1195592, 1198075, 1198593, 1201073,\n", - " 1202630, 1199712, 1201045, 1201041, 1200429, 1197095, 1202542, 1199879,\n", - " 1202129, 1201442, 1202239, 1200831, 1200899, 1202338, 1199976, 1202175,\n", - " 1195886, 1201291, 1195607, 1201871, 1200398, 1196966, 1200784, 1199606,\n", - " 1198514, 1203112, 1195676, 1195664, 1202444, 1195421, 1197822, 1197495,\n", - " 1196401, 1196414, 1202269, 1201138, 1197735, 1199786, 1199239, 1195070,\n", - " 1200296], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195202, 1196013, 1195334, 1198730, 1201094, 1199282, 1202255, 1201582,\n", - " 1194626, 1199248, 1201018, 1197351, 1198624, 1198694, 1196871, 1194771,\n", - " 1194783, 1194648, 1195511, 1195514, 1195263, 1199135, 1196534, 1201992,\n", - " 1201427, 1198095, 1195462, 1194882, 1195888, 1197856, 1196359, 1196840,\n", - " 1198668, 1195989, 1197792, 1198958, 1199810, 1195148, 1195270, 1195278,\n", - " 1197141, 1196242, 1197367, 1196109, 1196747, 1195850, 1195541, 1199315,\n", - " 1197474, 1199998, 1197640, 1195918, 1196283, 1195351, 1200959, 1199060,\n", - " 1194928, 1197583, 1199628, 1199803, 1197990, 1200869, 1199038, 1198400,\n", - " 1198410, 1194786, 1194795, 1197601, 1196727, 1195773, 1198428, 1200018,\n", - " 1195557, 1198811, 1201534, 1200562, 1195592, 1198075, 1198593, 1201073,\n", - " 1202630, 1199712, 1201045, 1201041, 1200429, 1197095, 1202542, 1199879,\n", - " 1202129, 1201442, 1202239, 1200831, 1200899, 1202338, 1199976, 1202175,\n", - " 1195886, 1201291, 1195607, 1201871, 1200398, 1196966, 1200784, 1199606,\n", - " 1198514, 1203112, 1195676, 1195664, 1202444, 1195421, 1197822, 1197495,\n", - " 1196401, 1196414, 1202269, 1201138, 1197735, 1199786, 1199239, 1195070,\n", - " 1200296], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 2.2494e-01, -4.5831e-04, 6.9167e-01, ..., 3.5388e-02,\n", - " -1.5813e-03, -6.3550e-03],\n", - " [ 1.7107e-01, -3.7412e-04, 5.8608e-01, ..., 8.1137e-02,\n", - " -1.9950e-03, -5.6650e-03],\n", - " [ 7.9507e-02, 3.5976e-02, 3.1636e-01, ..., 1.0047e-01,\n", - " -1.8538e-03, -3.3111e-03],\n", - " ...,\n", - " [ 8.9036e-02, 6.2271e-03, 4.4660e-01, ..., 8.1944e-02,\n", - " -1.6788e-03, -3.9159e-03],\n", - " [ 2.2494e-01, -4.5831e-04, 6.9167e-01, ..., 3.5388e-02,\n", - " -1.5813e-03, -6.3550e-03],\n", - " [ 2.0175e-01, -2.5799e-04, 6.9888e-01, ..., 6.1692e-02,\n", - " -1.8868e-03, -6.1680e-03]], device='cuda:0'), 'paper': tensor([[-1.0387e-02, 1.3343e+00, 1.3938e+00, ..., 2.2010e+00,\n", - " -3.6062e-02, 1.6627e+00],\n", - " [-1.8378e-02, 7.6057e-01, 1.3901e+00, ..., 2.1897e+00,\n", - " -4.3179e-02, 1.1994e+00],\n", - " [-9.2840e-03, -6.6540e-04, 3.6847e-01, ..., -8.1117e-03,\n", - " -1.1523e-02, -1.0201e-02],\n", - " ...,\n", - " [-7.3474e-03, 1.9820e-01, 2.1896e-01, ..., -1.1084e-02,\n", - " -1.1200e-02, -7.7463e-03],\n", - " [-1.5971e-02, -9.3665e-03, 1.0387e+00, ..., -2.0010e-02,\n", - " -1.8071e-02, -1.9762e-02],\n", - " [-1.8057e-02, 1.8975e+00, 5.9566e-01, ..., 4.2242e+00,\n", - " -4.6930e-02, 2.2974e+00]], device='cuda:0'), 'author': tensor([[-1.9318e-03, -7.0221e-04, 9.0617e-02, ..., 6.4472e-01,\n", - " 6.3339e-01, -1.6793e-04],\n", - " [-1.7207e-03, -1.6533e-03, 1.8539e-01, ..., 7.2686e-01,\n", - " 7.5413e-01, -2.0585e-04],\n", - " [-2.1009e-03, -1.3006e-03, 1.4123e-01, ..., 7.0209e-01,\n", - " 6.9457e-01, -3.0774e-04],\n", - " ...,\n", - " [-2.6196e-03, 3.5211e-02, 9.8183e-03, ..., 7.2821e-01,\n", - " 5.7123e-01, -9.7058e-04],\n", - " [-4.7962e-03, 2.2185e-01, 9.2733e-02, ..., 6.4598e-01,\n", - " 2.4881e-01, -4.6014e-03],\n", - " [-2.4578e-03, -1.7490e-04, 1.1293e-01, ..., 6.7122e-01,\n", - " 5.8866e-01, -8.8825e-04]], device='cuda:0'), 'field_of_study': tensor([[-3.6099e-03, 2.7991e-01, 6.4195e-03, ..., -5.5819e-03,\n", - " 1.5498e-01, 2.7605e-01],\n", - " [-2.9144e-03, 3.5008e-01, 7.1206e-02, ..., -4.0857e-03,\n", - " 1.0100e-01, 2.7946e-01],\n", - " [-3.8821e-03, 4.6168e-01, 1.7196e-01, ..., -5.1690e-03,\n", - " 1.7738e-01, 3.3038e-01],\n", - " ...,\n", - " [-2.1487e-03, 2.9274e-01, 3.4694e-02, ..., -6.4994e-03,\n", - " 1.9610e-01, 1.5080e-01],\n", - " [-1.9693e-03, 2.1946e-01, 1.1300e-03, ..., -7.3527e-03,\n", - " 1.5577e-01, 1.2224e-01],\n", - " [-1.2510e-04, 4.1452e-01, 1.0106e-01, ..., -7.5323e-03,\n", - " 1.7143e-01, -1.4161e-03]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 28, 111, 111, 179, 39, 39, 492, 221, 355, 355, 341, 341,\n", - " 403, 403, 626, 648, 393, 339, 698, 1043, 982, 750, 723, 1115,\n", - " 806, 806, 962, 1006, 985, 859, 923, 923, 1331, 1228, 1331, 1409,\n", - " 1194, 1386, 1413, 1349, 1349, 1372, 1768, 1708, 1657, 1565, 1627, 1591,\n", - " 1381, 1463, 1809, 1619, 1836, 1684, 1959, 1929, 1959, 1959, 1957, 2207,\n", - " 2057, 2173, 2207, 2207, 2207, 2134, 2134, 2295, 2363, 2363, 2363, 2486,\n", - " 2404, 2363, 2363, 2582, 2611, 2850, 2869, 2869, 2798, 2971, 3005, 3195,\n", - " 3009, 3090, 3189, 3387, 3387, 3164, 3259, 3344, 3429, 3423, 3423, 3538,\n", - " 3538, 3551, 3577, 3646, 3514, 3514, 3766, 3713, 3794, 4063, 4063, 4054,\n", - " 4073, 4316, 4316, 4316, 4316, 4154, 4304, 4412, 4366, 4430, 4448, 4584,\n", - " 4638, 4657, 4740, 4835, 5214, 5220, 5220, 4951, 4995, 5072, 5291, 5212,\n", - " 5066, 5342, 5196, 5254, 5306, 5478, 5389, 5389, 5451, 5505, 5922, 5683,\n", - " 5683, 5683, 5796, 5796, 6184, 5947, 6039, 6333, 6226, 6226, 6226, 5998,\n", - " 5998, 5998, 6696, 6639, 6639, 6362, 6362, 6480, 6480, 6681, 6666, 6478,\n", - " 6478, 6713, 6709, 6709, 6709, 6291, 6291, 6291, 6478, 6478, 6647],\n", - " [ 107, 103, 65, 1, 57, 61, 80, 83, 19, 69, 112, 11,\n", - " 20, 102, 86, 49, 2, 99, 68, 10, 89, 112, 112, 29,\n", - " 68, 7, 43, 107, 50, 18, 88, 84, 78, 9, 97, 52,\n", - " 20, 19, 45, 104, 34, 51, 68, 20, 35, 43, 42, 28,\n", - " 77, 40, 19, 24, 83, 68, 66, 95, 5, 93, 19, 47,\n", - " 83, 56, 22, 37, 27, 23, 94, 87, 55, 36, 5, 12,\n", - " 44, 38, 96, 82, 110, 19, 76, 2, 92, 91, 6, 101,\n", - " 100, 16, 17, 90, 15, 20, 116, 72, 114, 83, 62, 105,\n", - " 28, 19, 42, 120, 71, 30, 54, 70, 64, 46, 97, 43,\n", - " 31, 20, 51, 48, 79, 81, 28, 75, 83, 2, 53, 99,\n", - " 68, 8, 68, 58, 26, 2, 108, 41, 63, 117, 117, 6,\n", - " 67, 33, 68, 68, 25, 106, 68, 59, 4, 98, 52, 14,\n", - " 74, 68, 68, 115, 6, 5, 113, 118, 119, 73, 68, 113,\n", - " 13, 85, 109, 3, 68, 21, 68, 68, 7, 68, 115, 117,\n", - " 54, 5, 68, 89, 60, 68, 32, 0, 39, 111, 5]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[1296, 2933, 2190, ..., 2584, 5357, 1042],\n", - " [ 84, 24, 52, ..., 5984, 5994, 5985]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 67, 24, 4, ..., 83, 6, 29],\n", - " [ 67, 49, 25, ..., 6535, 6612, 6455]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 84, 84, 84, ..., 6036, 6000, 6027],\n", - " [ 453, 213, 218, ..., 578, 378, 657]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 260, 478, 503, ..., 240, 232, 390],\n", - " [ 30, 53, 250, ..., 5924, 6015, 6024]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2712, 130, 3171, ..., 2676, 4710, 3399],\n", - " [ 98, 167, 17, ..., 6627, 6636, 6658]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 84, 84, 84, ..., 6051, 6036, 6017],\n", - " [1296, 2729, 3321, ..., 114, 2747, 4562]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 152, 152, 152, ..., 6681, 6713, 6713],\n", - " [2320, 1296, 1534, ..., 2467, 5291, 5759]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006602\n", - "sampling 0.006447\n", - "noi time: 0.001916\n", - "get_vertex_data call: 0.037872\n", - "noi group time: 0.003278\n", - "eoi_group_time: 0.01468\n", - "second half: 0.22817\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 27908, 31145, 21459, ..., 1123985, 1119687, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 27908, 31145, 21459, ..., 1123985, 1119687, 1100728],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1203800, 1228168, 1232115, ..., 1929219, 1930675, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1203800, 1228168, 1232115, ..., 1929219, 1930675, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1137429, 1137204, 1141424, 1136228, 1140282, 1136345, 1135926,\n", - " 1137791, 1140785, 1141756, 1141758, 1141251, 1140297, 1142514, 1136969,\n", - " 1138897, 1149834, 1149836, 1145373, 1138942, 1139241, 1146640, 1146647,\n", - " 1139603, 1142966, 1139866, 1149216, 1142958, 1143820, 1149644, 1147483,\n", - " 1147486, 1142881, 1144636, 1146660, 1146661, 1152666, 1152667, 1138345,\n", - " 1147094, 1139373, 1136685, 1150329, 1134715, 1134806, 1138745, 1140540,\n", - " 1138356, 1151534, 1140149, 1140954, 1135367, 1135202, 1136037, 1141036,\n", - " 1136770, 1134794, 1157443, 1138510, 1137329, 1136178, 1143069, 1157088,\n", - " 1137693, 1144789, 1139215, 1137529, 1137534, 1157395, 1157399, 1157400,\n", - " 1152376, 1137441, 1156159, 1148495, 1148484, 1139161, 1135579, 1135583,\n", - " 1141084, 1136101, 1135664, 1140970, 1140707, 1140712, 1138514, 1153094,\n", - " 1153099, 1154132, 1137008, 1156899, 1139684, 1139685, 1137287, 1138440,\n", - " 1138461, 1138462, 1157190, 1137924, 1156606, 1147112, 1142611, 1138185,\n", - " 1158984, 1145842, 1148531, 1148543, 1137423, 1139849, 1139667, 1139668,\n", - " 1138067, 1134992, 1142788, 1136551, 1152651, 1135786, 1141064, 1141070,\n", - " 1144410, 1153543, 1153544, 1153547, 1139929, 1138646, 1138147, 1155660,\n", - " 1141997, 1152042, 1152044, 1137728, 1137731, 1147317, 1137005, 1135549,\n", - " 1141097, 1141098, 1144128, 1145357, 1142021, 1143224, 1143225, 1140003,\n", - " 1146834, 1152709, 1154467, 1161175, 1141891, 1141902, 1139386, 1136917,\n", - " 1139730, 1143673, 1143676, 1140598, 1141161, 1146462, 1141785, 1141786,\n", - " 1139495, 1136752, 1141609, 1144650, 1159607, 1134986, 1164812, 1137074,\n", - " 1144428, 1138488, 1141821, 1143203, 1149111, 1142713, 1139190, 1138710,\n", - " 1138708, 1140110, 1142917, 1142913, 1137661, 1149772, 1144596, 1136864,\n", - " 1141570, 1141582, 1141398, 1140442, 1144182, 1150910, 1146201, 1137841,\n", - " 1147153, 1141365, 1141664, 1138292, 1144286, 1144279, 1153557, 1143915,\n", - " 1139508, 1139510, 1139769, 1139127, 1145000, 1139171, 1140976, 1140990,\n", - " 1141565, 1147050, 1147047, 1145873, 1152976, 1138992, 1141925, 1144242,\n", - " 1145332, 1141841, 1150696, 1148310, 1140700, 1136885, 1145980, 1143845,\n", - " 1146024, 1138085, 1146140, 1141585, 1149928, 1139990, 1146302, 1143293,\n", - " 1143294, 1151124, 1151125, 1151132, 1150417, 1147541, 1147540, 1148763,\n", - " 1147282, 1147290, 1142816, 1149155, 1142630, 1149365, 1147372, 1148003,\n", - " 1143051, 1136160, 1136167, 1136171, 1144921, 1138922, 1138923, 1138927,\n", - " 1157726, 1136836, 1138229, 1136445, 1142126, 1143345, 1144619, 1144615,\n", - " 1145813, 1140844, 1144083, 1135876, 1150755, 1135813, 1150294, 1144375,\n", - " 1146514, 1146520, 1143957, 1138018, 1143456, 1143470, 1137703, 1140483,\n", - " 1142015, 1143949, 1146590, 1147578, 1147574, 1155700, 1143798, 1146636,\n", - " 1140364, 1149569, 1149572, 1137990, 1143082, 1144725, 1147999, 1146949,\n", - " 1134899, 1139252, 1139249, 1147131, 1148704, 1146745, 1147056, 1147070,\n", - " 1143839, 1147253, 1145011, 1158226, 1158228, 1141137, 1154526, 1145240,\n", - " 1145751, 1148387, 1146178, 1151242, 1148223, 1152530, 1152538, 1151179,\n", - " 1150437, 1150445, 1149258, 1148940, 1148825, 1156468, 1156473, 1149791,\n", - " 1144514, 1144526, 1150350, 1144203, 1151994, 1147807, 1151487, 1152022,\n", - " 1152023, 1134869, 1134873, 1147021, 1147009, 1141949, 1137641, 1143564,\n", - " 1149412, 1148288, 1152068, 1147866, 1154420, 1148180, 1151363, 1136252,\n", - " 1146686, 1138404, 1141182, 1157968, 1151567, 1148720, 1171341, 1144110,\n", - " 1151948, 1166304, 1148204, 1154203, 1154196, 1141740, 1154166, 1153124,\n", - " 1153192, 1148051, 1152866, 1152867, 1152878, 1144853, 1150356, 1155089,\n", - " 1155091, 1143133, 1147442, 1152581, 1135311, 1151908, 1148510, 1146571,\n", - " 1141420, 1152784, 1147737, 1153447, 1149386, 1146975, 1156402, 1150210,\n", - " 1167285, 1146623, 1151691, 1144477, 1152856, 1152097, 1152106, 1146280,\n", - " 1146287, 1153038, 1137746, 1152622, 1140521, 1136410, 1154123, 1157826,\n", - " 1152673, 1154633, 1151617, 1150578, 1150586, 1136785, 1145952, 1138979,\n", - " 1138989, 1138991, 1152903, 1151298, 1152341, 1146816, 1153311, 1138281,\n", - " 1157144, 1156001, 1136028, 1158704, 1152928, 1151064, 1151067, 1156387,\n", - " 1154733, 1154734, 1142777, 1137392, 1160559, 1150164, 1149265, 1149273,\n", - " 1148033, 1148040, 1155202, 1161215, 1154454, 1155226, 1148628, 1158530,\n", - " 1158540, 1148255, 1156064, 1153085, 1154377, 1143451, 1157547, 1142387,\n", - " 1158860, 1156505, 1157058, 1157069, 1155408, 1155412, 1155422, 1152833,\n", - " 1145187, 1137809, 1157558, 1150465, 1135222, 1145387, 1135730, 1152179,\n", - " 1156629, 1135645, 1158308, 1151340, 1155441, 1153359, 1150132, 1153999,\n", - " 1142755, 1142756, 1142765, 1156207, 1156205, 1138775, 1151379, 1155122,\n", - " 1149324, 1151431, 1135398, 1146920, 1156452, 1156463, 1155628, 1156563,\n", - " 1156569, 1155572, 1158566, 1158824, 1148839, 1148834, 1155646, 1153368,\n", - " 1153363, 1153375, 1143263, 1154644, 1160110, 1137359, 1143189, 1150371,\n", - " 1153322, 1144712, 1150805, 1150987, 1157928, 1157933, 1137152, 1158996,\n", - " 1140924, 1134677, 1134674, 1135601, 1135605, 1145515, 1155852, 1157685,\n", - " 1149145, 1159258, 1156085, 1152220, 1155884, 1157033, 1144843, 1144845,\n", - " 1155971, 1155975, 1159957, 1142074, 1135190, 1154600, 1154601, 1159452,\n", - " 1136896, 1158436, 1155237, 1136491, 1156663, 1147586, 1155303, 1156490,\n", - " 1153808, 1136646, 1140049, 1157864, 1142184, 1158545, 1158558, 1153827,\n", - " 1156516, 1146126, 1154340, 1158006, 1168219, 1158256, 1161539, 1165840,\n", - " 1164276, 1142666, 1157747, 1157751, 1159042, 1158301, 1158303, 1157944,\n", - " 1160575, 1153047, 1153052, 1153045, 1162843, 1155769, 1163359, 1153842,\n", - " 1161316, 1163707, 1156107, 1138393, 1165244, 1162926, 1150046, 1149070,\n", - " 1145948, 1153514, 1153519, 1147307, 1147300, 1146876, 1138161, 1138165,\n", - " 1164006, 1156787, 1139593, 1139281, 1148029, 1156983, 1157235, 1157357,\n", - " 1159763, 1146063, 1171257, 1165309, 1140643, 1148600, 1148607, 1143139,\n", - " 1143143, 1155821, 1158653, 1156184, 1159025, 1159032, 1152247, 1160605,\n", - " 1155588, 1151227, 1163163, 1153921, 1153933, 1153934, 1168194, 1144989,\n", - " 1147836, 1167999, 1144739, 1163522, 1141465, 1147426, 1157045, 1149890,\n", - " 1156739, 1157963, 1190200, 1168748, 1168750, 1144812, 1135567, 1164741,\n", - " 1180505, 1180580, 1148675, 1145567, 1145228, 1169295, 1154700, 1166462,\n", - " 1147677, 1138762, 1144972, 1194509, 1148169, 1147694, 1165746, 1152624,\n", - " 1148118, 1139350, 1139351, 1147714, 1145900, 1145902, 1153534, 1151752,\n", - " 1163961, 1152203, 1143407, 1158724, 1158722, 1167503, 1154076, 1147328,\n", - " 1192293, 1167817, 1155170, 1150515, 1150522, 1150525, 1144346, 1144336,\n", - " 1157534, 1138376, 1147751, 1154670, 1135854, 1191396, 1157331, 1138129,\n", - " 1141043, 1151669, 1169359, 1154353, 1154364, 1149452, 1158623, 1173047,\n", - " 1149847, 1172067, 1152353, 1168369, 1165535, 1165533, 1172773, 1155931,\n", - " 1149402, 1172838, 1148325, 1171899, 1165913, 1172670, 1173307, 1152151,\n", - " 1151697, 1174106, 1157158, 1157153, 1168122, 1147711, 1178973, 1151850,\n", - " 1157592, 1157593, 1149247, 1170490, 1170697, 1155738, 1172234, 1177611,\n", - " 1140326, 1171614, 1179555, 1179556, 1150234, 1154151, 1154148, 1158187,\n", - " 1149169, 1149173, 1186117, 1143279, 1168481, 1143410, 1177659, 1171297,\n", - " 1179918, 1181581, 1180822, 1179727, 1172309, 1178926, 1161255, 1176525,\n", - " 1159909, 1175258, 1155116, 1172034, 1171623, 1157078, 1187526, 1180083,\n", - " 1158249, 1153898, 1145626, 1156446, 1172028, 1178757, 1179451, 1161911,\n", - " 1183754, 1149755, 1152274, 1157770, 1157771, 1177837, 1158512, 1158524,\n", - " 1158374, 1158379, 1155890, 1155892, 1155899, 1185514, 1140399, 1162253,\n", - " 1179091, 1166442, 1183481, 1163421, 1164339, 1181339, 1170802, 1147182,\n", - " 1156175, 1186893, 1167669, 1164133, 1168943, 1191536, 1156539, 1190725,\n", - " 1139828, 1139831, 1150265, 1150260, 1154806, 1149668, 1149669, 1149677,\n", - " 1151288, 1149628, 1156055, 1191993, 1189276, 1146392, 1188217, 1188025,\n", - " 1169959, 1169964, 1190246, 1140997, 1183048, 1191661, 1167840, 1151774,\n", - " 1193228, 1189402, 1183629, 1171118, 1182226, 1192666, 1153585, 1184760,\n", - " 1171201, 1178878, 1175349, 1150406, 1156672, 1172124, 1167739, 1178135,\n", - " 1184445, 1155958, 1155959, 1155553, 1191564, 1172896, 1182941, 1192382,\n", - " 1193912], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1137429, 1137204, 1141424, 1136228, 1140282, 1136345, 1135926,\n", - " 1137791, 1140785, 1141756, 1141758, 1141251, 1140297, 1142514, 1136969,\n", - " 1138897, 1149834, 1149836, 1145373, 1138942, 1139241, 1146640, 1146647,\n", - " 1139603, 1142966, 1139866, 1149216, 1142958, 1143820, 1149644, 1147483,\n", - " 1147486, 1142881, 1144636, 1146660, 1146661, 1152666, 1152667, 1138345,\n", - " 1147094, 1139373, 1136685, 1150329, 1134715, 1134806, 1138745, 1140540,\n", - " 1138356, 1151534, 1140149, 1140954, 1135367, 1135202, 1136037, 1141036,\n", - " 1136770, 1134794, 1157443, 1138510, 1137329, 1136178, 1143069, 1157088,\n", - " 1137693, 1144789, 1139215, 1137529, 1137534, 1157395, 1157399, 1157400,\n", - " 1152376, 1137441, 1156159, 1148495, 1148484, 1139161, 1135579, 1135583,\n", - " 1141084, 1136101, 1135664, 1140970, 1140707, 1140712, 1138514, 1153094,\n", - " 1153099, 1154132, 1137008, 1156899, 1139684, 1139685, 1137287, 1138440,\n", - " 1138461, 1138462, 1157190, 1137924, 1156606, 1147112, 1142611, 1138185,\n", - " 1158984, 1145842, 1148531, 1148543, 1137423, 1139849, 1139667, 1139668,\n", - " 1138067, 1134992, 1142788, 1136551, 1152651, 1135786, 1141064, 1141070,\n", - " 1144410, 1153543, 1153544, 1153547, 1139929, 1138646, 1138147, 1155660,\n", - " 1141997, 1152042, 1152044, 1137728, 1137731, 1147317, 1137005, 1135549,\n", - " 1141097, 1141098, 1144128, 1145357, 1142021, 1143224, 1143225, 1140003,\n", - " 1146834, 1152709, 1154467, 1161175, 1141891, 1141902, 1139386, 1136917,\n", - " 1139730, 1143673, 1143676, 1140598, 1141161, 1146462, 1141785, 1141786,\n", - " 1139495, 1136752, 1141609, 1144650, 1159607, 1134986, 1164812, 1137074,\n", - " 1144428, 1138488, 1141821, 1143203, 1149111, 1142713, 1139190, 1138710,\n", - " 1138708, 1140110, 1142917, 1142913, 1137661, 1149772, 1144596, 1136864,\n", - " 1141570, 1141582, 1141398, 1140442, 1144182, 1150910, 1146201, 1137841,\n", - " 1147153, 1141365, 1141664, 1138292, 1144286, 1144279, 1153557, 1143915,\n", - " 1139508, 1139510, 1139769, 1139127, 1145000, 1139171, 1140976, 1140990,\n", - " 1141565, 1147050, 1147047, 1145873, 1152976, 1138992, 1141925, 1144242,\n", - " 1145332, 1141841, 1150696, 1148310, 1140700, 1136885, 1145980, 1143845,\n", - " 1146024, 1138085, 1146140, 1141585, 1149928, 1139990, 1146302, 1143293,\n", - " 1143294, 1151124, 1151125, 1151132, 1150417, 1147541, 1147540, 1148763,\n", - " 1147282, 1147290, 1142816, 1149155, 1142630, 1149365, 1147372, 1148003,\n", - " 1143051, 1136160, 1136167, 1136171, 1144921, 1138922, 1138923, 1138927,\n", - " 1157726, 1136836, 1138229, 1136445, 1142126, 1143345, 1144619, 1144615,\n", - " 1145813, 1140844, 1144083, 1135876, 1150755, 1135813, 1150294, 1144375,\n", - " 1146514, 1146520, 1143957, 1138018, 1143456, 1143470, 1137703, 1140483,\n", - " 1142015, 1143949, 1146590, 1147578, 1147574, 1155700, 1143798, 1146636,\n", - " 1140364, 1149569, 1149572, 1137990, 1143082, 1144725, 1147999, 1146949,\n", - " 1134899, 1139252, 1139249, 1147131, 1148704, 1146745, 1147056, 1147070,\n", - " 1143839, 1147253, 1145011, 1158226, 1158228, 1141137, 1154526, 1145240,\n", - " 1145751, 1148387, 1146178, 1151242, 1148223, 1152530, 1152538, 1151179,\n", - " 1150437, 1150445, 1149258, 1148940, 1148825, 1156468, 1156473, 1149791,\n", - " 1144514, 1144526, 1150350, 1144203, 1151994, 1147807, 1151487, 1152022,\n", - " 1152023, 1134869, 1134873, 1147021, 1147009, 1141949, 1137641, 1143564,\n", - " 1149412, 1148288, 1152068, 1147866, 1154420, 1148180, 1151363, 1136252,\n", - " 1146686, 1138404, 1141182, 1157968, 1151567, 1148720, 1171341, 1144110,\n", - " 1151948, 1166304, 1148204, 1154203, 1154196, 1141740, 1154166, 1153124,\n", - " 1153192, 1148051, 1152866, 1152867, 1152878, 1144853, 1150356, 1155089,\n", - " 1155091, 1143133, 1147442, 1152581, 1135311, 1151908, 1148510, 1146571,\n", - " 1141420, 1152784, 1147737, 1153447, 1149386, 1146975, 1156402, 1150210,\n", - " 1167285, 1146623, 1151691, 1144477, 1152856, 1152097, 1152106, 1146280,\n", - " 1146287, 1153038, 1137746, 1152622, 1140521, 1136410, 1154123, 1157826,\n", - " 1152673, 1154633, 1151617, 1150578, 1150586, 1136785, 1145952, 1138979,\n", - " 1138989, 1138991, 1152903, 1151298, 1152341, 1146816, 1153311, 1138281,\n", - " 1157144, 1156001, 1136028, 1158704, 1152928, 1151064, 1151067, 1156387,\n", - " 1154733, 1154734, 1142777, 1137392, 1160559, 1150164, 1149265, 1149273,\n", - " 1148033, 1148040, 1155202, 1161215, 1154454, 1155226, 1148628, 1158530,\n", - " 1158540, 1148255, 1156064, 1153085, 1154377, 1143451, 1157547, 1142387,\n", - " 1158860, 1156505, 1157058, 1157069, 1155408, 1155412, 1155422, 1152833,\n", - " 1145187, 1137809, 1157558, 1150465, 1135222, 1145387, 1135730, 1152179,\n", - " 1156629, 1135645, 1158308, 1151340, 1155441, 1153359, 1150132, 1153999,\n", - " 1142755, 1142756, 1142765, 1156207, 1156205, 1138775, 1151379, 1155122,\n", - " 1149324, 1151431, 1135398, 1146920, 1156452, 1156463, 1155628, 1156563,\n", - " 1156569, 1155572, 1158566, 1158824, 1148839, 1148834, 1155646, 1153368,\n", - " 1153363, 1153375, 1143263, 1154644, 1160110, 1137359, 1143189, 1150371,\n", - " 1153322, 1144712, 1150805, 1150987, 1157928, 1157933, 1137152, 1158996,\n", - " 1140924, 1134677, 1134674, 1135601, 1135605, 1145515, 1155852, 1157685,\n", - " 1149145, 1159258, 1156085, 1152220, 1155884, 1157033, 1144843, 1144845,\n", - " 1155971, 1155975, 1159957, 1142074, 1135190, 1154600, 1154601, 1159452,\n", - " 1136896, 1158436, 1155237, 1136491, 1156663, 1147586, 1155303, 1156490,\n", - " 1153808, 1136646, 1140049, 1157864, 1142184, 1158545, 1158558, 1153827,\n", - " 1156516, 1146126, 1154340, 1158006, 1168219, 1158256, 1161539, 1165840,\n", - " 1164276, 1142666, 1157747, 1157751, 1159042, 1158301, 1158303, 1157944,\n", - " 1160575, 1153047, 1153052, 1153045, 1162843, 1155769, 1163359, 1153842,\n", - " 1161316, 1163707, 1156107, 1138393, 1165244, 1162926, 1150046, 1149070,\n", - " 1145948, 1153514, 1153519, 1147307, 1147300, 1146876, 1138161, 1138165,\n", - " 1164006, 1156787, 1139593, 1139281, 1148029, 1156983, 1157235, 1157357,\n", - " 1159763, 1146063, 1171257, 1165309, 1140643, 1148600, 1148607, 1143139,\n", - " 1143143, 1155821, 1158653, 1156184, 1159025, 1159032, 1152247, 1160605,\n", - " 1155588, 1151227, 1163163, 1153921, 1153933, 1153934, 1168194, 1144989,\n", - " 1147836, 1167999, 1144739, 1163522, 1141465, 1147426, 1157045, 1149890,\n", - " 1156739, 1157963, 1190200, 1168748, 1168750, 1144812, 1135567, 1164741,\n", - " 1180505, 1180580, 1148675, 1145567, 1145228, 1169295, 1154700, 1166462,\n", - " 1147677, 1138762, 1144972, 1194509, 1148169, 1147694, 1165746, 1152624,\n", - " 1148118, 1139350, 1139351, 1147714, 1145900, 1145902, 1153534, 1151752,\n", - " 1163961, 1152203, 1143407, 1158724, 1158722, 1167503, 1154076, 1147328,\n", - " 1192293, 1167817, 1155170, 1150515, 1150522, 1150525, 1144346, 1144336,\n", - " 1157534, 1138376, 1147751, 1154670, 1135854, 1191396, 1157331, 1138129,\n", - " 1141043, 1151669, 1169359, 1154353, 1154364, 1149452, 1158623, 1173047,\n", - " 1149847, 1172067, 1152353, 1168369, 1165535, 1165533, 1172773, 1155931,\n", - " 1149402, 1172838, 1148325, 1171899, 1165913, 1172670, 1173307, 1152151,\n", - " 1151697, 1174106, 1157158, 1157153, 1168122, 1147711, 1178973, 1151850,\n", - " 1157592, 1157593, 1149247, 1170490, 1170697, 1155738, 1172234, 1177611,\n", - " 1140326, 1171614, 1179555, 1179556, 1150234, 1154151, 1154148, 1158187,\n", - " 1149169, 1149173, 1186117, 1143279, 1168481, 1143410, 1177659, 1171297,\n", - " 1179918, 1181581, 1180822, 1179727, 1172309, 1178926, 1161255, 1176525,\n", - " 1159909, 1175258, 1155116, 1172034, 1171623, 1157078, 1187526, 1180083,\n", - " 1158249, 1153898, 1145626, 1156446, 1172028, 1178757, 1179451, 1161911,\n", - " 1183754, 1149755, 1152274, 1157770, 1157771, 1177837, 1158512, 1158524,\n", - " 1158374, 1158379, 1155890, 1155892, 1155899, 1185514, 1140399, 1162253,\n", - " 1179091, 1166442, 1183481, 1163421, 1164339, 1181339, 1170802, 1147182,\n", - " 1156175, 1186893, 1167669, 1164133, 1168943, 1191536, 1156539, 1190725,\n", - " 1139828, 1139831, 1150265, 1150260, 1154806, 1149668, 1149669, 1149677,\n", - " 1151288, 1149628, 1156055, 1191993, 1189276, 1146392, 1188217, 1188025,\n", - " 1169959, 1169964, 1190246, 1140997, 1183048, 1191661, 1167840, 1151774,\n", - " 1193228, 1189402, 1183629, 1171118, 1182226, 1192666, 1153585, 1184760,\n", - " 1171201, 1178878, 1175349, 1150406, 1156672, 1172124, 1167739, 1178135,\n", - " 1184445, 1155958, 1155959, 1155553, 1191564, 1172896, 1182941, 1192382,\n", - " 1193912], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196013, 1199424, 1199428, 1199439, 1197758, 1198242, 1197716, 1197719,\n", - " 1195860, 1199282, 1198459, 1202255, 1194626, 1197777, 1197791, 1201016,\n", - " 1201660, 1197359, 1198694, 1196871, 1198557, 1194866, 1198180, 1194783,\n", - " 1196624, 1196631, 1194655, 1195511, 1195514, 1198609, 1196539, 1201992,\n", - " 1198542, 1198543, 1197704, 1195459, 1194882, 1195888, 1199171, 1195740,\n", - " 1196977, 1194752, 1194766, 1198980, 1195313, 1196840, 1197803, 1195132,\n", - " 1195581, 1198958, 1199823, 1195265, 1195278, 1197273, 1195541, 1202916,\n", - " 1197191, 1200032, 1196393, 1195353, 1198279, 1200959, 1196851, 1195119,\n", - " 1199628, 1199804, 1197994, 1200872, 1201904, 1194786, 1200060, 1201511,\n", - " 1196498, 1196501, 1201117, 1196727, 1195773, 1198428, 1202995, 1199410,\n", - " 1203185, 1198811, 1198066, 1202630, 1200991, 1200918, 1194803, 1200360,\n", - " 1200526, 1202858, 1200546, 1200310, 1200429, 1199887, 1196889, 1199095,\n", - " 1199908, 1196775, 1201449, 1202239, 1200899, 1200907, 1201291, 1203329,\n", - " 1201590, 1196966, 1200784, 1200785, 1200793, 1194700, 1195676, 1195664,\n", - " 1198929, 1198932, 1195181, 1197821, 1196600, 1203102, 1198824, 1200437,\n", - " 1199782, 1198819, 1200974, 1195070, 1196421, 1203162, 1197872, 1198748],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196013, 1199424, 1199428, 1199439, 1197758, 1198242, 1197716, 1197719,\n", - " 1195860, 1199282, 1198459, 1202255, 1194626, 1197777, 1197791, 1201016,\n", - " 1201660, 1197359, 1198694, 1196871, 1198557, 1194866, 1198180, 1194783,\n", - " 1196624, 1196631, 1194655, 1195511, 1195514, 1198609, 1196539, 1201992,\n", - " 1198542, 1198543, 1197704, 1195459, 1194882, 1195888, 1199171, 1195740,\n", - " 1196977, 1194752, 1194766, 1198980, 1195313, 1196840, 1197803, 1195132,\n", - " 1195581, 1198958, 1199823, 1195265, 1195278, 1197273, 1195541, 1202916,\n", - " 1197191, 1200032, 1196393, 1195353, 1198279, 1200959, 1196851, 1195119,\n", - " 1199628, 1199804, 1197994, 1200872, 1201904, 1194786, 1200060, 1201511,\n", - " 1196498, 1196501, 1201117, 1196727, 1195773, 1198428, 1202995, 1199410,\n", - " 1203185, 1198811, 1198066, 1202630, 1200991, 1200918, 1194803, 1200360,\n", - " 1200526, 1202858, 1200546, 1200310, 1200429, 1199887, 1196889, 1199095,\n", - " 1199908, 1196775, 1201449, 1202239, 1200899, 1200907, 1201291, 1203329,\n", - " 1201590, 1196966, 1200784, 1200785, 1200793, 1194700, 1195676, 1195664,\n", - " 1198929, 1198932, 1195181, 1197821, 1196600, 1203102, 1198824, 1200437,\n", - " 1199782, 1198819, 1200974, 1195070, 1196421, 1203162, 1197872, 1198748],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 2.0295e-01, -2.6315e-04, 6.3367e-01, ..., 5.1249e-02,\n", - " -1.8191e-03, -5.7187e-03],\n", - " [ 1.1266e-01, 2.4195e-02, 4.5116e-01, ..., 5.7056e-02,\n", - " -1.5470e-03, -4.3078e-03],\n", - " [ 2.5245e-01, -6.6378e-04, 7.7956e-01, ..., 4.6005e-02,\n", - " -1.9151e-03, -6.9247e-03],\n", - " ...,\n", - " [ 1.6632e-01, -3.3568e-04, 5.7922e-01, ..., 9.4143e-02,\n", - " -2.0956e-03, -5.4649e-03],\n", - " [ 2.0342e-01, -5.7326e-04, 6.5979e-01, ..., 4.5699e-02,\n", - " -1.7539e-03, -6.1403e-03],\n", - " [ 1.0696e-01, 3.8411e-02, 4.6210e-01, ..., 7.1631e-02,\n", - " -1.7397e-03, -4.3519e-03]], device='cuda:0'), 'paper': tensor([[-0.0187, 0.6922, 1.2590, ..., 2.0749, -0.0419, 1.0072],\n", - " [-0.0222, -0.0076, 1.4989, ..., -0.0159, -0.0128, -0.0273],\n", - " [-0.0203, -0.0091, 1.4630, ..., -0.0197, -0.0154, -0.0239],\n", - " ...,\n", - " [-0.0256, -0.0100, 1.5064, ..., -0.0133, -0.0170, -0.0301],\n", - " [-0.0243, -0.0124, 1.7925, ..., -0.0130, -0.0158, -0.0305],\n", - " [-0.0188, 1.7446, 0.3345, ..., 4.0334, -0.0442, 1.9604]],\n", - " device='cuda:0'), 'author': tensor([[-1.7743e-03, -1.8002e-03, 1.9122e-01, ..., 7.7936e-01,\n", - " 8.1596e-01, 4.2624e-02],\n", - " [-1.6436e-03, -1.9656e-03, 1.3222e-01, ..., 6.4857e-01,\n", - " 6.9259e-01, 2.3386e-02],\n", - " [-4.4463e-03, 6.5022e-02, 1.2543e-01, ..., 7.4145e-01,\n", - " 3.6391e-01, -3.5120e-03],\n", - " ...,\n", - " [-3.4118e-03, 6.7390e-02, 2.0388e-02, ..., 6.3540e-01,\n", - " 3.5757e-01, -1.9072e-03],\n", - " [-1.4440e-03, -2.0262e-03, 1.4634e-01, ..., 6.4731e-01,\n", - " 9.1009e-01, 1.0062e-01],\n", - " [-1.8928e-03, -8.7878e-04, 1.1153e-01, ..., 6.3973e-01,\n", - " 7.0549e-01, -7.6176e-05]], device='cuda:0'), 'field_of_study': tensor([[-2.0392e-03, 2.0876e-01, -8.7024e-05, ..., -6.3489e-03,\n", - " 1.4347e-01, 8.9576e-02],\n", - " [-1.3809e-03, 4.4942e-01, 8.4324e-02, ..., -6.1562e-03,\n", - " 2.1437e-01, 1.0680e-01],\n", - " [-3.5327e-03, 4.6289e-01, 1.5611e-01, ..., -8.0183e-03,\n", - " 2.3045e-01, 3.8027e-01],\n", - " ...,\n", - " [-2.5163e-03, 3.3203e-01, 4.2283e-02, ..., -6.5240e-03,\n", - " 2.1152e-01, 2.6524e-01],\n", - " [-2.8512e-03, 2.7983e-01, 8.8488e-03, ..., -5.5271e-03,\n", - " 2.0392e-01, 1.2672e-01],\n", - " [-3.5931e-03, 2.4484e-01, -4.5189e-04, ..., -5.3625e-03,\n", - " 1.8108e-01, 1.5580e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 45, 110, 172, 25, 194, 185, 75, 75, 4, 4, 228, 422,\n", - " 410, 460, 384, 502, 502, 502, 318, 284, 284, 217, 654, 739,\n", - " 461, 656, 656, 931, 931, 1050, 785, 1050, 994, 975, 1150, 876,\n", - " 1312, 1286, 1331, 1331, 1331, 1448, 1436, 1436, 1312, 1310, 1310, 1436,\n", - " 1375, 1633, 1518, 1365, 1375, 1365, 1549, 1549, 1715, 1705, 1757, 1659,\n", - " 1757, 1757, 1764, 1740, 1780, 1781, 1903, 1823, 1853, 1595, 1859, 1836,\n", - " 1881, 2073, 2049, 1920, 2121, 2121, 2147, 2161, 2163, 2365, 2330, 2245,\n", - " 2423, 2290, 2290, 2438, 2453, 2595, 2595, 2637, 2721, 2998, 2713, 2839,\n", - " 3056, 3056, 2848, 3207, 3174, 3206, 3041, 3229, 3217, 3217, 3217, 3210,\n", - " 3149, 3308, 3308, 3308, 3290, 3316, 3327, 3547, 3595, 3801, 4018, 3645,\n", - " 3833, 3845, 3797, 4019, 3686, 3977, 3932, 4072, 4136, 4092, 4316, 4316,\n", - " 4316, 4316, 4328, 4417, 4666, 4733, 4542, 4542, 4670, 5085, 4987, 4764,\n", - " 4764, 4932, 5103, 5140, 5336, 5440, 5406, 5568, 5459, 5546, 5574, 5383,\n", - " 5383, 5730, 5566, 5366, 5465, 5465, 5465, 5465, 5842, 6013, 5830, 5830,\n", - " 6082, 6116, 6116, 5727, 6105, 6105, 6243, 6362, 5969, 6436, 6380, 6283,\n", - " 6323, 6427, 6427, 6461, 6080, 6080],\n", - " [ 109, 44, 16, 91, 100, 83, 18, 71, 0, 44, 32, 48,\n", - " 75, 125, 126, 66, 120, 107, 15, 74, 99, 81, 19, 64,\n", - " 109, 63, 68, 43, 95, 11, 22, 61, 70, 31, 127, 115,\n", - " 102, 59, 48, 43, 65, 71, 125, 4, 96, 88, 76, 25,\n", - " 6, 51, 7, 29, 56, 8, 71, 9, 25, 106, 75, 20,\n", - " 92, 84, 2, 64, 41, 71, 21, 12, 42, 105, 59, 93,\n", - " 124, 17, 111, 68, 26, 49, 3, 44, 117, 25, 118, 50,\n", - " 99, 48, 51, 97, 3, 5, 28, 82, 34, 99, 59, 3,\n", - " 77, 92, 71, 37, 113, 47, 24, 30, 28, 40, 10, 35,\n", - " 123, 60, 99, 79, 38, 55, 78, 94, 5, 54, 111, 50,\n", - " 88, 121, 114, 98, 123, 1, 30, 23, 78, 78, 80, 87,\n", - " 71, 28, 73, 67, 52, 28, 101, 64, 64, 46, 110, 71,\n", - " 89, 85, 122, 104, 116, 21, 113, 111, 119, 20, 81, 118,\n", - " 115, 53, 33, 75, 72, 69, 86, 14, 112, 13, 75, 106,\n", - " 39, 36, 75, 57, 126, 103, 53, 75, 35, 27, 105, 90,\n", - " 23, 45, 58, 62, 108, 117]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3345, 2900, 1812, ..., 3922, 5033, 6796],\n", - " [ 4, 190, 76, ..., 6951, 6887, 6812]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 3, 98, 79, 98, 79, 74, 59, 25, 117, 98, 79, 35,\n", - " 74, 99, 30, 99, 25, 3, 54, 44, 117, 3, 99, 99,\n", - " 25, 99, 117, 99, 44, 74, 74, 25, 28, 35, 98, 99,\n", - " 79, 99, 99, 59, 44, 28, 99, 3, 44, 44, 123, 123,\n", - " 59, 74, 123, 99, 35, 123, 3, 99, 44, 99, 30, 28,\n", - " 98, 44, 74, 113, 79, 25, 35, 117, 54, 79, 54, 74,\n", - " 54, 25, 59, 79, 54, 99, 20, 35, 74, 3, 79, 44,\n", - " 113, 117, 99, 3, 35, 99, 54, 123, 28, 25, 28, 54,\n", - " 59, 28, 20, 35, 59, 35, 117, 113, 59, 59, 59, 98,\n", - " 25, 99, 54, 30, 25, 28, 25, 3, 28, 117, 79, 98,\n", - " 59, 59, 123, 113, 98, 3, 117, 7, 117, 59, 113, 123,\n", - " 25, 30, 54, 20, 3, 99, 25, 7, 99, 35, 44, 113,\n", - " 25, 7, 35, 25, 74, 3, 35, 99, 44, 113, 30, 3,\n", - " 35, 98, 99, 54, 28, 28, 30, 117, 35, 54, 98, 20,\n", - " 117, 98, 59, 3, 7, 59, 30, 113, 35, 28, 79, 30,\n", - " 7, 59, 98, 113, 7, 28, 20, 79, 59, 20, 117, 79,\n", - " 98, 3, 98, 25, 98, 35, 113, 74, 28, 35, 44, 25,\n", - " 99, 59, 79, 113, 30, 35, 98, 3, 3, 25, 79, 54,\n", - " 117, 7, 113, 25, 117, 74, 98, 117, 30, 28, 79, 20,\n", - " 3, 98, 25, 59, 74, 7, 113, 79, 54, 7, 28, 74,\n", - " 7, 59, 117, 74, 59, 30, 117, 54, 20, 79, 99, 113,\n", - " 117, 20, 3, 44, 54, 74, 74, 7, 99, 99, 74, 74,\n", - " 98, 30, 98, 3, 25, 123, 79, 54, 98, 7, 74, 7,\n", - " 44, 99, 99, 99, 99, 28, 30, 74, 20, 7, 79, 3,\n", - " 54, 20, 99, 7, 117, 74, 20, 7, 3, 54, 20, 54,\n", - " 28, 54, 3, 117, 79, 79, 123, 99, 99, 99, 30, 99,\n", - " 28, 59, 98, 20, 54, 28, 30, 20, 3, 99, 79, 20,\n", - " 113, 113, 59, 99, 30, 99, 99, 54, 99, 74, 25, 117,\n", - " 35, 117, 44, 35, 113, 30, 113, 30, 35, 54, 99, 35,\n", - " 113, 79, 74, 7, 30, 113, 117, 123, 44, 7, 98, 35,\n", - " 20, 28, 28, 99, 7, 99, 20, 117, 99, 7, 123, 123,\n", - " 123, 123, 25, 123, 113, 20, 123, 3, 123, 28, 74, 44,\n", - " 99, 3, 59, 44, 98, 28, 99, 59, 30, 113, 25, 28,\n", - " 113, 28, 44, 20, 20, 99, 98, 99, 123, 44, 30, 30,\n", - " 30, 30, 7, 79, 44, 123, 123, 74, 59, 7, 54, 44,\n", - " 99, 25, 113, 35, 99, 123, 20, 20, 35, 123, 35, 99,\n", - " 54, 20, 113, 123, 44, 30, 7, 44, 7, 44, 123, 44,\n", - " 123, 79, 20, 25, 117, 7],\n", - " [ 40, 180, 94, 125, 20, 5, 211, 15, 111, 116, 6, 67,\n", - " 89, 150, 108, 24, 291, 152, 128, 261, 302, 362, 1031, 283,\n", - " 529, 238, 277, 412, 517, 418, 377, 395, 500, 609, 408, 777,\n", - " 706, 511, 385, 666, 775, 714, 518, 230, 571, 671, 661, 1126,\n", - " 445, 525, 607, 842, 772, 840, 768, 643, 1287, 884, 752, 877,\n", - " 977, 1026, 841, 1037, 1305, 1102, 1236, 1314, 1086, 1289, 1043, 1174,\n", - " 1270, 1008, 1666, 1254, 1405, 1104, 1357, 1051, 1232, 1392, 1346, 1222,\n", - " 1255, 1507, 1342, 1387, 1546, 1425, 1665, 1277, 1548, 1457, 1596, 1799,\n", - " 1602, 1814, 1709, 1440, 1679, 1949, 1807, 1804, 2027, 2033, 1893, 1987,\n", - " 2024, 1892, 2139, 2232, 2022, 2088, 2044, 2060, 2058, 2081, 2099, 2188,\n", - " 2176, 2326, 2254, 1978, 2236, 2140, 2163, 2092, 2233, 2156, 2261, 2381,\n", - " 2116, 2384, 2387, 2276, 2272, 2301, 2335, 2422, 2645, 2454, 2580, 2374,\n", - " 2505, 2562, 2529, 2398, 2462, 2479, 2720, 2555, 2592, 2598, 2516, 2579,\n", - " 2610, 2759, 2647, 2572, 2701, 2624, 2589, 2729, 2879, 2654, 2668, 2752,\n", - " 2683, 2674, 2643, 2785, 2670, 2754, 3191, 2907, 2773, 2957, 2817, 2991,\n", - " 2904, 2832, 2999, 2859, 2927, 2889, 2886, 3003, 2767, 2819, 2872, 2793,\n", - " 2928, 3097, 3001, 3139, 2984, 3058, 2954, 3007, 2934, 3123, 3096, 3208,\n", - " 3167, 3175, 3331, 3106, 3229, 3210, 3081, 3046, 3285, 3238, 3159, 3260,\n", - " 3115, 3181, 3263, 3387, 3292, 3293, 3265, 3408, 3463, 3353, 3418, 3488,\n", - " 3442, 3527, 3548, 3541, 3514, 3367, 3621, 3432, 3504, 3692, 3746, 3582,\n", - " 3963, 3491, 3592, 3701, 3993, 3891, 3534, 4050, 4000, 3949, 3959, 3931,\n", - " 3749, 3810, 3915, 3944, 4008, 4044, 4038, 4025, 4064, 4023, 4067, 4096,\n", - " 4019, 4009, 4070, 4106, 4066, 3925, 4109, 4097, 4101, 4059, 4125, 4100,\n", - " 4107, 4104, 4128, 4119, 4160, 4130, 4139, 4201, 4153, 4108, 4161, 4158,\n", - " 4127, 4179, 4176, 4252, 4147, 4168, 4208, 4210, 4262, 4170, 4248, 4222,\n", - " 4234, 4250, 4256, 4241, 4278, 4200, 4329, 4257, 4266, 4217, 4352, 4239,\n", - " 4314, 4310, 4244, 4398, 4442, 4448, 4671, 4296, 4312, 4540, 4626, 4561,\n", - " 4694, 4638, 4690, 4592, 4685, 4586, 4699, 4878, 4834, 4601, 4717, 4649,\n", - " 4512, 4700, 4797, 4899, 4675, 4698, 4787, 4740, 4848, 4840, 4902, 5053,\n", - " 4936, 5058, 5114, 5123, 4927, 4718, 5118, 4959, 5019, 5112, 5042, 4781,\n", - " 5167, 4997, 5150, 5126, 5163, 5087, 5156, 5031, 5138, 5239, 5107, 5176,\n", - " 5295, 5149, 5282, 5192, 5330, 5317, 5309, 5074, 5224, 5028, 5249, 5273,\n", - " 5190, 5244, 5235, 5221, 5640, 5281, 5307, 5315, 5608, 5583, 5449, 5536,\n", - " 5446, 5285, 5580, 5704, 5466, 5437, 5658, 5982, 5903, 5570, 5767, 5503,\n", - " 5702, 5479, 5555, 5790, 5367, 5813, 5941, 6034, 5762, 5664, 5833, 5587,\n", - " 5936, 5865, 6338, 5675, 5864, 5895, 5773, 5845, 5939, 5824, 6046, 6128,\n", - " 6202, 6256, 6014, 6443, 6147, 6163, 6379, 6274, 6188, 6200, 6378, 6165,\n", - " 6170, 6363, 6343, 6296, 6372, 6423]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 90, 90, 90, ..., 7022, 7022, 7014],\n", - " [ 523, 402, 587, ..., 300, 643, 826]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 806, 435, 610, ..., 74, 300, 610],\n", - " [ 81, 319, 111, ..., 6939, 6858, 6990]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[2791, 335, 2734, ..., 5915, 5915, 6734],\n", - " [ 74, 68, 114, ..., 6438, 6428, 6391]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 72, 189, 189, ..., 7022, 6964, 6915],\n", - " [ 820, 3158, 3598, ..., 732, 3421, 441]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 4, 4, 4, ..., 6380, 6380, 6380],\n", - " [6839, 1736, 193, ..., 3235, 3510, 3883]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.004076\n", - "sampling 0.003994\n", - "noi time: 0.000784\n", - "get_vertex_data call: 0.014139\n", - "noi group time: 0.001846\n", - "eoi_group_time: 0.01088\n", - "second half: 0.113852\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 16699, 1334, 16823, ..., 1120069, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 16699, 1334, 16823, ..., 1120069, 1100728, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1210828, 1224380, 1221051, ..., 1937995, 1925031, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1210828, 1224380, 1221051, ..., 1937995, 1925031, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1136496, 1137212, 1141424, ..., 1182299, 1187642, 1157017],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1136496, 1137212, 1141424, ..., 1182299, 1187642, 1157017],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195697, 1199424, 1198723, 1199282, 1198449, 1198458, 1198844, 1199248,\n", - " 1201016, 1201660, 1197351, 1197359, 1198690, 1202804, 1197516, 1194770,\n", - " 1199053, 1196631, 1195507, 1195263, 1201992, 1198542, 1194882, 1195888,\n", - " 1199171, 1195740, 1196359, 1194752, 1195313, 1195147, 1195221, 1195279,\n", - " 1197140, 1196242, 1197367, 1194859, 1198212, 1196750, 1200037, 1200949,\n", - " 1200959, 1199059, 1197285, 1199185, 1194928, 1197676, 1197994, 1202457,\n", - " 1200872, 1199579, 1199229, 1199231, 1195014, 1199676, 1194786, 1201511,\n", - " 1201507, 1196498, 1196501, 1197970, 1195807, 1197601, 1196727, 1195771,\n", - " 1195773, 1200155, 1198811, 1201534, 1201547, 1201542, 1200570, 1200507,\n", - " 1198593, 1199445, 1201085, 1201156, 1202627, 1202630, 1200991, 1200918,\n", - " 1200553, 1197100, 1203183, 1197040, 1199908, 1196775, 1201442, 1196268,\n", - " 1199482, 1202338, 1202337, 1201291, 1203271, 1196761, 1201796, 1196966,\n", - " 1200784, 1200785, 1199606, 1200627, 1195664, 1198929, 1200684, 1195418,\n", - " 1202752, 1197821, 1196597, 1200585, 1196382, 1198147, 1197735, 1200465,\n", - " 1195066, 1201886, 1198140, 1197035, 1194908, 1203162, 1197872],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195697, 1199424, 1198723, 1199282, 1198449, 1198458, 1198844, 1199248,\n", - " 1201016, 1201660, 1197351, 1197359, 1198690, 1202804, 1197516, 1194770,\n", - " 1199053, 1196631, 1195507, 1195263, 1201992, 1198542, 1194882, 1195888,\n", - " 1199171, 1195740, 1196359, 1194752, 1195313, 1195147, 1195221, 1195279,\n", - " 1197140, 1196242, 1197367, 1194859, 1198212, 1196750, 1200037, 1200949,\n", - " 1200959, 1199059, 1197285, 1199185, 1194928, 1197676, 1197994, 1202457,\n", - " 1200872, 1199579, 1199229, 1199231, 1195014, 1199676, 1194786, 1201511,\n", - " 1201507, 1196498, 1196501, 1197970, 1195807, 1197601, 1196727, 1195771,\n", - " 1195773, 1200155, 1198811, 1201534, 1201547, 1201542, 1200570, 1200507,\n", - " 1198593, 1199445, 1201085, 1201156, 1202627, 1202630, 1200991, 1200918,\n", - " 1200553, 1197100, 1203183, 1197040, 1199908, 1196775, 1201442, 1196268,\n", - " 1199482, 1202338, 1202337, 1201291, 1203271, 1196761, 1201796, 1196966,\n", - " 1200784, 1200785, 1199606, 1200627, 1195664, 1198929, 1200684, 1195418,\n", - " 1202752, 1197821, 1196597, 1200585, 1196382, 1198147, 1197735, 1200465,\n", - " 1195066, 1201886, 1198140, 1197035, 1194908, 1203162, 1197872],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 2.2872e-01, -6.2360e-04, 7.0267e-01, ..., 4.4316e-02,\n", - " -1.7748e-03, -6.4731e-03],\n", - " [ 8.1752e-02, 2.9671e-02, 3.4708e-01, ..., 1.4076e-01,\n", - " -2.4979e-03, -4.0094e-03],\n", - " [ 1.5610e-01, 2.3447e-02, 4.7816e-01, ..., 7.1456e-02,\n", - " -1.8487e-03, -4.6857e-03],\n", - " ...,\n", - " [ 1.6609e-01, -4.4284e-04, 6.4073e-01, ..., 5.3189e-02,\n", - " -1.7556e-03, -5.8004e-03],\n", - " [ 2.3405e-01, -7.7036e-04, 8.4997e-01, ..., 5.4994e-02,\n", - " -1.7380e-03, -7.4031e-03],\n", - " [ 2.3463e-01, -5.6994e-04, 7.2862e-01, ..., 5.3963e-02,\n", - " -1.9683e-03, -6.5206e-03]], device='cuda:0'), 'paper': tensor([[ 1.2611e-01, -7.6916e-03, -2.0369e-03, ..., -2.3203e-02,\n", - " -1.6666e-02, -2.9090e-04],\n", - " [-2.7447e-02, -1.3676e-02, 2.0033e+00, ..., -1.8011e-02,\n", - " -1.6572e-02, -3.4931e-02],\n", - " [ 5.7035e-02, -2.3403e-03, -1.8145e-03, ..., -1.8643e-02,\n", - " -1.1463e-02, 1.0693e-01],\n", - " ...,\n", - " [-1.1697e-02, 1.1462e-01, 1.0396e+00, ..., -1.4720e-02,\n", - " -1.2087e-02, -1.4424e-02],\n", - " [-7.7897e-04, 7.0736e-01, 5.2195e-01, ..., -1.5994e-02,\n", - " -1.8100e-02, 5.8254e-01],\n", - " [-1.8142e-02, 1.8733e+00, 5.4024e-01, ..., 4.1841e+00,\n", - " -4.6371e-02, 2.2322e+00]], device='cuda:0'), 'author': tensor([[-3.8269e-04, 2.3317e-02, 1.1760e-01, ..., 1.3354e-01,\n", - " -7.1061e-06, -7.6010e-04],\n", - " [-4.1062e-03, 1.3863e-01, 1.4408e-01, ..., 6.2711e-01,\n", - " 2.1890e-01, -4.2324e-03],\n", - " [-3.3617e-03, 2.6208e-01, 1.6294e-01, ..., 5.1966e-01,\n", - " 1.0111e-01, -5.7125e-03],\n", - " ...,\n", - " [-1.5184e-03, -1.0536e-03, 1.1737e-01, ..., 7.1951e-01,\n", - " 7.6555e-01, 4.5749e-02],\n", - " [-1.8637e-03, -1.0838e-03, 1.1660e-01, ..., 7.6007e-01,\n", - " 7.1297e-01, 6.7313e-03],\n", - " [-1.8310e-03, -1.5223e-03, 1.6323e-01, ..., 7.2056e-01,\n", - " 7.5853e-01, 2.6599e-02]], device='cuda:0'), 'field_of_study': tensor([[-0.0030, 0.3022, 0.0153, ..., -0.0057, 0.2073, 0.1514],\n", - " [-0.0042, 0.4195, 0.0914, ..., -0.0063, 0.1367, 0.4013],\n", - " [-0.0038, 0.3277, 0.0031, ..., -0.0054, 0.2228, 0.2405],\n", - " ...,\n", - " [-0.0028, 0.3698, 0.0656, ..., -0.0063, 0.2259, 0.3022],\n", - " [-0.0025, 0.3456, 0.0665, ..., -0.0070, 0.2045, 0.2589],\n", - " [-0.0034, 0.3858, 0.0624, ..., -0.0058, 0.1522, 0.3371]],\n", - " device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 200, 74, 74, 214, 26, 207, 144, 65, 65, 65, 65, 65,\n", - " 243, 243, 335, 442, 374, 374, 330, 612, 602, 602, 624, 624,\n", - " 624, 371, 620, 959, 812, 982, 1116, 955, 930, 929, 1039, 978,\n", - " 813, 813, 916, 915, 978, 1168, 1168, 1330, 1077, 1077, 1316, 1316,\n", - " 1333, 1361, 1361, 1427, 1525, 1361, 1361, 1654, 1409, 1675, 1623, 1653,\n", - " 1653, 1796, 1610, 1699, 1694, 1694, 1869, 1919, 2020, 2020, 1931, 1931,\n", - " 1776, 1776, 2003, 1906, 2198, 1918, 2218, 2218, 2197, 2282, 2130, 2334,\n", - " 2313, 2512, 2425, 2237, 2477, 2687, 2515, 2515, 2375, 2430, 2549, 2532,\n", - " 2532, 2530, 2608, 2768, 2634, 2855, 2699, 2749, 3156, 2975, 3158, 3157,\n", - " 3157, 3112, 3204, 3337, 3337, 3301, 3334, 3285, 3687, 3358, 3804, 3484,\n", - " 3727, 3740, 3860, 3894, 3959, 4148, 4288, 4229, 4052, 4052, 4334, 4490,\n", - " 4509, 4597, 4463, 4426, 4638, 4598, 4490, 4490, 4415, 4415, 4655, 4767,\n", - " 4771, 4861, 4835, 4968, 4858, 4858, 4864, 4864, 4914, 4914, 4943, 5110,\n", - " 5110, 5110, 5295, 5295, 5020, 5394, 5479, 5479, 5479, 5572, 5766, 5766,\n", - " 5607, 5803, 5803, 5803, 5715, 5804, 5692, 5773, 5750, 5616, 5606, 5646],\n", - " [ 20, 3, 75, 67, 3, 100, 5, 30, 39, 71, 29, 46,\n", - " 89, 43, 22, 40, 73, 32, 78, 96, 5, 26, 94, 104,\n", - " 69, 37, 113, 110, 44, 76, 25, 52, 10, 14, 16, 104,\n", - " 114, 7, 40, 75, 94, 108, 73, 3, 62, 86, 90, 23,\n", - " 114, 8, 111, 116, 16, 84, 50, 34, 95, 37, 85, 91,\n", - " 92, 62, 100, 68, 98, 15, 106, 68, 112, 61, 53, 17,\n", - " 114, 65, 17, 67, 6, 3, 109, 67, 118, 19, 107, 56,\n", - " 61, 88, 68, 74, 19, 55, 52, 16, 67, 33, 68, 19,\n", - " 60, 67, 68, 40, 38, 51, 16, 103, 27, 97, 114, 1,\n", - " 115, 62, 45, 79, 76, 44, 19, 63, 77, 24, 62, 19,\n", - " 13, 11, 3, 14, 19, 0, 21, 35, 20, 72, 65, 12,\n", - " 82, 109, 81, 42, 85, 3, 87, 116, 18, 9, 25, 2,\n", - " 62, 64, 19, 104, 66, 49, 3, 101, 57, 93, 99, 25,\n", - " 10, 54, 17, 98, 48, 106, 4, 28, 62, 59, 83, 19,\n", - " 105, 80, 55, 36, 117, 53, 102, 47, 41, 58, 31, 70]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3529, 3436, 3585, ..., 8337, 1042, 6002],\n", - " [ 95, 68, 328, ..., 8456, 8314, 8334]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 16, 11, 11, ..., 17, 3, 11],\n", - " [ 8, 212, 163, ..., 5907, 5897, 5901]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 184, 184, 18, ..., 8438, 8438, 8438],\n", - " [ 288, 268, 82, ..., 923, 951, 505]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 319, 721, 162, ..., 559, 652, 505],\n", - " [ 116, 108, 392, ..., 8389, 8436, 8362]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4103, 1114, 736, ..., 8419, 4858, 7008],\n", - " [ 30, 95, 139, ..., 5873, 5892, 5905]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 19, 19, 19, ..., 8305, 8305, 8305],\n", - " [1241, 1307, 1673, ..., 7596, 7444, 6636]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 49, 49, 49, ..., 5883, 5883, 5883],\n", - " [2203, 2877, 4568, ..., 7474, 3871, 3860]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006378\n", - "sampling 0.006219\n", - "noi time: 0.001813\n", - "get_vertex_data call: 0.036191\n", - "noi group time: 0.003575\n", - "eoi_group_time: 0.014924\n", - "second half: 0.228109\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 31145, 24187, 21459, ..., 1100728, 1110069, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 31145, 24187, 21459, ..., 1100728, 1110069, 1117253],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1221602, 1212853, 1231437, ..., 1935113, 1936992, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1221602, 1212853, 1231437, ..., 1935113, 1936992, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1135056, 1140285, 1135926, 1135160, 1135716, 1137784, 1140799, 1141758,\n", - " 1138335, 1136223, 1141263, 1140297, 1142327, 1136969, 1136971, 1141443,\n", - " 1151163, 1143615, 1137946, 1145989, 1137271, 1139241, 1139609, 1139615,\n", - " 1139957, 1150497, 1150506, 1149216, 1155683, 1155689, 1144636, 1144632,\n", - " 1146656, 1146661, 1148546, 1153231, 1141904, 1137220, 1155014, 1139365,\n", - " 1134806, 1138739, 1151545, 1140540, 1138112, 1137171, 1138354, 1140952,\n", - " 1140953, 1135367, 1135202, 1134969, 1141036, 1136768, 1134794, 1138504,\n", - " 1137342, 1137693, 1144786, 1139204, 1144395, 1137529, 1136712, 1157397,\n", - " 1143317, 1156147, 1156159, 1148484, 1139161, 1135583, 1141086, 1135670,\n", - " 1153099, 1138584, 1139684, 1139685, 1138436, 1138440, 1138445, 1138461,\n", - " 1138449, 1158390, 1149328, 1156603, 1156605, 1147112, 1142611, 1135618,\n", - " 1138185, 1145843, 1148531, 1137109, 1135769, 1141533, 1136457, 1139667,\n", - " 1134992, 1142434, 1136551, 1135781, 1139755, 1158974, 1139315, 1141065,\n", - " 1153543, 1153547, 1153548, 1141963, 1141967, 1134891, 1140557, 1152044,\n", - " 1142293, 1137734, 1134750, 1138240, 1141088, 1139889, 1141980, 1154855,\n", - " 1143706, 1143224, 1143225, 1139025, 1152709, 1135860, 1135862, 1154467,\n", - " 1142929, 1141229, 1139386, 1136917, 1137196, 1145066, 1140598, 1141600,\n", - " 1147844, 1137080, 1149425, 1142050, 1143158, 1145152, 1140173, 1140163,\n", - " 1158749, 1138471, 1142713, 1139188, 1139190, 1137237, 1141479, 1137062,\n", - " 1138709, 1140110, 1142913, 1143107, 1144596, 1142453, 1145298, 1140889,\n", - " 1141398, 1144182, 1150906, 1166711, 1137365, 1147153, 1136369, 1142646,\n", - " 1141365, 1141367, 1141375, 1153069, 1141664, 1144277, 1139508, 1139510,\n", - " 1139763, 1138803, 1138815, 1144998, 1140990, 1141560, 1147050, 1143543,\n", - " 1152976, 1152980, 1152982, 1135466, 1138992, 1141925, 1144242, 1136891,\n", - " 1134859, 1141389, 1146005, 1146024, 1141585, 1142533, 1141234, 1141236,\n", - " 1139990, 1147543, 1147548, 1148763, 1147282, 1142816, 1136330, 1142637,\n", - " 1138923, 1157720, 1165626, 1139328, 1139055, 1143345, 1144611, 1140844,\n", - " 1135872, 1135876, 1144310, 1146523, 1146524, 1143456, 1143937, 1143949,\n", - " 1140817, 1146580, 1146636, 1140364, 1143082, 1168914, 1144219, 1147984,\n", - " 1147995, 1147999, 1134902, 1139249, 1147131, 1145467, 1147244, 1148704,\n", - " 1141327, 1146749, 1152328, 1147025, 1147970, 1145017, 1139549, 1158226,\n", - " 1143921, 1154526, 1145237, 1145238, 1145751, 1146178, 1146188, 1148214,\n", - " 1152530, 1156468, 1149791, 1144519, 1150339, 1152013, 1144203, 1151994,\n", - " 1165260, 1147794, 1147799, 1147807, 1145261, 1146723, 1140566, 1150127,\n", - " 1147021, 1147023, 1150745, 1144819, 1148744, 1149991, 1147653, 1149412,\n", - " 1146401, 1148300, 1151412, 1154420, 1154424, 1158794, 1139721, 1146676,\n", - " 1157974, 1171943, 1141743, 1154166, 1153124, 1152915, 1150932, 1150356,\n", - " 1169594, 1155102, 1143121, 1147446, 1147442, 1151816, 1152581, 1150715,\n", - " 1141420, 1146967, 1146623, 1135686, 1154063, 1146280, 1146287, 1156321,\n", - " 1153039, 1150085, 1137746, 1146304, 1152622, 1149203, 1152826, 1155337,\n", - " 1152673, 1151617, 1150578, 1145278, 1136131, 1136134, 1148916, 1145952,\n", - " 1152903, 1146816, 1156826, 1156831, 1153311, 1145581, 1138281, 1152300,\n", - " 1136028, 1158704, 1151184, 1152928, 1155779, 1152888, 1150099, 1150164,\n", - " 1149273, 1153693, 1148033, 1148040, 1145656, 1137048, 1148628, 1158530,\n", - " 1158540, 1154377, 1135430, 1158854, 1157064, 1157069, 1155418, 1152841,\n", - " 1152833, 1145196, 1143491, 1150465, 1146858, 1152179, 1156940, 1147810,\n", - " 1157783, 1139529, 1158308, 1151340, 1155441, 1153359, 1150130, 1150132,\n", - " 1162114, 1154529, 1156913, 1142755, 1156207, 1151379, 1155122, 1152527,\n", - " 1135396, 1135405, 1154763, 1155626, 1155628, 1156563, 1155572, 1136466,\n", - " 1158566, 1158824, 1158325, 1148839, 1153364, 1161391, 1143263, 1146937,\n", - " 1154909, 1143189, 1150371, 1153322, 1155613, 1155281, 1143508, 1157933,\n", - " 1171832, 1158204, 1159119, 1138269, 1145682, 1166187, 1135601, 1148149,\n", - " 1158665, 1158670, 1138208, 1157684, 1152209, 1152220, 1167618, 1167625,\n", - " 1155975, 1161667, 1158841, 1158846, 1156804, 1156811, 1154600, 1166125,\n", - " 1136897, 1136899, 1136896, 1158760, 1140215, 1140221, 1158815, 1156778,\n", - " 1158286, 1151615, 1136480, 1136491, 1154392, 1156665, 1156657, 1147586,\n", - " 1153808, 1136640, 1136646, 1140053, 1142188, 1158558, 1153827, 1151144,\n", - " 1156516, 1146126, 1159943, 1142483, 1142487, 1135661, 1164273, 1142665,\n", - " 1156045, 1159052, 1158295, 1155194, 1157944, 1157945, 1157946, 1153052,\n", - " 1153045, 1184460, 1176071, 1153842, 1161316, 1138393, 1150033, 1150046,\n", - " 1138161, 1164006, 1149956, 1163407, 1163381, 1154590, 1166073, 1148771,\n", - " 1146063, 1162471, 1160178, 1165306, 1140134, 1140650, 1140643, 1148600,\n", - " 1148607, 1168092, 1163019, 1155816, 1141800, 1158643, 1156181, 1156184,\n", - " 1159025, 1159032, 1171373, 1162604, 1169105, 1169108, 1152247, 1143729,\n", - " 1166735, 1158902, 1155588, 1153924, 1158405, 1144977, 1147405, 1149015,\n", - " 1146500, 1153247, 1164580, 1144737, 1168067, 1147426, 1147427, 1157050,\n", - " 1156739, 1150646, 1144812, 1184420, 1162085, 1135553, 1135567, 1165718,\n", - " 1142733, 1144051, 1145729, 1145743, 1145728, 1165944, 1145567, 1154700,\n", - " 1166462, 1147675, 1138762, 1162293, 1162302, 1147694, 1152639, 1152624,\n", - " 1147723, 1147724, 1145900, 1145902, 1151752, 1152203, 1181052, 1158728,\n", - " 1154076, 1159268, 1154922, 1167817, 1167818, 1166645, 1149476, 1145320,\n", - " 1155172, 1154618, 1144346, 1157534, 1154670, 1168447, 1141051, 1151664,\n", - " 1169359, 1138609, 1158623, 1158062, 1173047, 1147423, 1152353, 1149402,\n", - " 1172833, 1148324, 1173307, 1154027, 1152152, 1159658, 1169583, 1157153,\n", - " 1157375, 1147711, 1151850, 1157593, 1140326, 1166682, 1171823, 1180133,\n", - " 1160315, 1154148, 1167531, 1167517, 1149169, 1172537, 1143279, 1168481,\n", - " 1176494, 1170179, 1153803, 1173957, 1185146, 1182651, 1179807, 1161262,\n", - " 1155262, 1177893, 1157792, 1143341, 1171623, 1163224, 1155804, 1178706,\n", - " 1153898, 1153899, 1178218, 1162403, 1145626, 1182624, 1179453, 1184245,\n", - " 1149755, 1146242, 1163053, 1157761, 1187090, 1158940, 1167646, 1158379,\n", - " 1182898, 1185282, 1189634, 1168282, 1166228, 1164231, 1165082, 1161819,\n", - " 1170802, 1181297, 1183008, 1190963, 1156528, 1139831, 1150265, 1190585,\n", - " 1156055, 1191130, 1146392, 1194023, 1149544, 1189630, 1174506, 1140993,\n", - " 1170207, 1194454, 1181413, 1179845, 1190113, 1181284, 1193208, 1171243,\n", - " 1192101, 1193232, 1152113, 1169781, 1162503, 1181824, 1177849, 1172122,\n", - " 1158064, 1186243, 1155962, 1165508, 1176840, 1192670, 1157022, 1161950],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1135056, 1140285, 1135926, 1135160, 1135716, 1137784, 1140799, 1141758,\n", - " 1138335, 1136223, 1141263, 1140297, 1142327, 1136969, 1136971, 1141443,\n", - " 1151163, 1143615, 1137946, 1145989, 1137271, 1139241, 1139609, 1139615,\n", - " 1139957, 1150497, 1150506, 1149216, 1155683, 1155689, 1144636, 1144632,\n", - " 1146656, 1146661, 1148546, 1153231, 1141904, 1137220, 1155014, 1139365,\n", - " 1134806, 1138739, 1151545, 1140540, 1138112, 1137171, 1138354, 1140952,\n", - " 1140953, 1135367, 1135202, 1134969, 1141036, 1136768, 1134794, 1138504,\n", - " 1137342, 1137693, 1144786, 1139204, 1144395, 1137529, 1136712, 1157397,\n", - " 1143317, 1156147, 1156159, 1148484, 1139161, 1135583, 1141086, 1135670,\n", - " 1153099, 1138584, 1139684, 1139685, 1138436, 1138440, 1138445, 1138461,\n", - " 1138449, 1158390, 1149328, 1156603, 1156605, 1147112, 1142611, 1135618,\n", - " 1138185, 1145843, 1148531, 1137109, 1135769, 1141533, 1136457, 1139667,\n", - " 1134992, 1142434, 1136551, 1135781, 1139755, 1158974, 1139315, 1141065,\n", - " 1153543, 1153547, 1153548, 1141963, 1141967, 1134891, 1140557, 1152044,\n", - " 1142293, 1137734, 1134750, 1138240, 1141088, 1139889, 1141980, 1154855,\n", - " 1143706, 1143224, 1143225, 1139025, 1152709, 1135860, 1135862, 1154467,\n", - " 1142929, 1141229, 1139386, 1136917, 1137196, 1145066, 1140598, 1141600,\n", - " 1147844, 1137080, 1149425, 1142050, 1143158, 1145152, 1140173, 1140163,\n", - " 1158749, 1138471, 1142713, 1139188, 1139190, 1137237, 1141479, 1137062,\n", - " 1138709, 1140110, 1142913, 1143107, 1144596, 1142453, 1145298, 1140889,\n", - " 1141398, 1144182, 1150906, 1166711, 1137365, 1147153, 1136369, 1142646,\n", - " 1141365, 1141367, 1141375, 1153069, 1141664, 1144277, 1139508, 1139510,\n", - " 1139763, 1138803, 1138815, 1144998, 1140990, 1141560, 1147050, 1143543,\n", - " 1152976, 1152980, 1152982, 1135466, 1138992, 1141925, 1144242, 1136891,\n", - " 1134859, 1141389, 1146005, 1146024, 1141585, 1142533, 1141234, 1141236,\n", - " 1139990, 1147543, 1147548, 1148763, 1147282, 1142816, 1136330, 1142637,\n", - " 1138923, 1157720, 1165626, 1139328, 1139055, 1143345, 1144611, 1140844,\n", - " 1135872, 1135876, 1144310, 1146523, 1146524, 1143456, 1143937, 1143949,\n", - " 1140817, 1146580, 1146636, 1140364, 1143082, 1168914, 1144219, 1147984,\n", - " 1147995, 1147999, 1134902, 1139249, 1147131, 1145467, 1147244, 1148704,\n", - " 1141327, 1146749, 1152328, 1147025, 1147970, 1145017, 1139549, 1158226,\n", - " 1143921, 1154526, 1145237, 1145238, 1145751, 1146178, 1146188, 1148214,\n", - " 1152530, 1156468, 1149791, 1144519, 1150339, 1152013, 1144203, 1151994,\n", - " 1165260, 1147794, 1147799, 1147807, 1145261, 1146723, 1140566, 1150127,\n", - " 1147021, 1147023, 1150745, 1144819, 1148744, 1149991, 1147653, 1149412,\n", - " 1146401, 1148300, 1151412, 1154420, 1154424, 1158794, 1139721, 1146676,\n", - " 1157974, 1171943, 1141743, 1154166, 1153124, 1152915, 1150932, 1150356,\n", - " 1169594, 1155102, 1143121, 1147446, 1147442, 1151816, 1152581, 1150715,\n", - " 1141420, 1146967, 1146623, 1135686, 1154063, 1146280, 1146287, 1156321,\n", - " 1153039, 1150085, 1137746, 1146304, 1152622, 1149203, 1152826, 1155337,\n", - " 1152673, 1151617, 1150578, 1145278, 1136131, 1136134, 1148916, 1145952,\n", - " 1152903, 1146816, 1156826, 1156831, 1153311, 1145581, 1138281, 1152300,\n", - " 1136028, 1158704, 1151184, 1152928, 1155779, 1152888, 1150099, 1150164,\n", - " 1149273, 1153693, 1148033, 1148040, 1145656, 1137048, 1148628, 1158530,\n", - " 1158540, 1154377, 1135430, 1158854, 1157064, 1157069, 1155418, 1152841,\n", - " 1152833, 1145196, 1143491, 1150465, 1146858, 1152179, 1156940, 1147810,\n", - " 1157783, 1139529, 1158308, 1151340, 1155441, 1153359, 1150130, 1150132,\n", - " 1162114, 1154529, 1156913, 1142755, 1156207, 1151379, 1155122, 1152527,\n", - " 1135396, 1135405, 1154763, 1155626, 1155628, 1156563, 1155572, 1136466,\n", - " 1158566, 1158824, 1158325, 1148839, 1153364, 1161391, 1143263, 1146937,\n", - " 1154909, 1143189, 1150371, 1153322, 1155613, 1155281, 1143508, 1157933,\n", - " 1171832, 1158204, 1159119, 1138269, 1145682, 1166187, 1135601, 1148149,\n", - " 1158665, 1158670, 1138208, 1157684, 1152209, 1152220, 1167618, 1167625,\n", - " 1155975, 1161667, 1158841, 1158846, 1156804, 1156811, 1154600, 1166125,\n", - " 1136897, 1136899, 1136896, 1158760, 1140215, 1140221, 1158815, 1156778,\n", - " 1158286, 1151615, 1136480, 1136491, 1154392, 1156665, 1156657, 1147586,\n", - " 1153808, 1136640, 1136646, 1140053, 1142188, 1158558, 1153827, 1151144,\n", - " 1156516, 1146126, 1159943, 1142483, 1142487, 1135661, 1164273, 1142665,\n", - " 1156045, 1159052, 1158295, 1155194, 1157944, 1157945, 1157946, 1153052,\n", - " 1153045, 1184460, 1176071, 1153842, 1161316, 1138393, 1150033, 1150046,\n", - " 1138161, 1164006, 1149956, 1163407, 1163381, 1154590, 1166073, 1148771,\n", - " 1146063, 1162471, 1160178, 1165306, 1140134, 1140650, 1140643, 1148600,\n", - " 1148607, 1168092, 1163019, 1155816, 1141800, 1158643, 1156181, 1156184,\n", - " 1159025, 1159032, 1171373, 1162604, 1169105, 1169108, 1152247, 1143729,\n", - " 1166735, 1158902, 1155588, 1153924, 1158405, 1144977, 1147405, 1149015,\n", - " 1146500, 1153247, 1164580, 1144737, 1168067, 1147426, 1147427, 1157050,\n", - " 1156739, 1150646, 1144812, 1184420, 1162085, 1135553, 1135567, 1165718,\n", - " 1142733, 1144051, 1145729, 1145743, 1145728, 1165944, 1145567, 1154700,\n", - " 1166462, 1147675, 1138762, 1162293, 1162302, 1147694, 1152639, 1152624,\n", - " 1147723, 1147724, 1145900, 1145902, 1151752, 1152203, 1181052, 1158728,\n", - " 1154076, 1159268, 1154922, 1167817, 1167818, 1166645, 1149476, 1145320,\n", - " 1155172, 1154618, 1144346, 1157534, 1154670, 1168447, 1141051, 1151664,\n", - " 1169359, 1138609, 1158623, 1158062, 1173047, 1147423, 1152353, 1149402,\n", - " 1172833, 1148324, 1173307, 1154027, 1152152, 1159658, 1169583, 1157153,\n", - " 1157375, 1147711, 1151850, 1157593, 1140326, 1166682, 1171823, 1180133,\n", - " 1160315, 1154148, 1167531, 1167517, 1149169, 1172537, 1143279, 1168481,\n", - " 1176494, 1170179, 1153803, 1173957, 1185146, 1182651, 1179807, 1161262,\n", - " 1155262, 1177893, 1157792, 1143341, 1171623, 1163224, 1155804, 1178706,\n", - " 1153898, 1153899, 1178218, 1162403, 1145626, 1182624, 1179453, 1184245,\n", - " 1149755, 1146242, 1163053, 1157761, 1187090, 1158940, 1167646, 1158379,\n", - " 1182898, 1185282, 1189634, 1168282, 1166228, 1164231, 1165082, 1161819,\n", - " 1170802, 1181297, 1183008, 1190963, 1156528, 1139831, 1150265, 1190585,\n", - " 1156055, 1191130, 1146392, 1194023, 1149544, 1189630, 1174506, 1140993,\n", - " 1170207, 1194454, 1181413, 1179845, 1190113, 1181284, 1193208, 1171243,\n", - " 1192101, 1193232, 1152113, 1169781, 1162503, 1181824, 1177849, 1172122,\n", - " 1158064, 1186243, 1155962, 1165508, 1176840, 1192670, 1157022, 1161950],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1195202, 1198769, 1198730, 1199282, 1198449, 1202255, 1198844, 1201577,\n", - " 1201582, 1202119, 1194626, 1194635, 1200644, 1197777, 1201021, 1201660,\n", - " 1197359, 1198624, 1198633, 1196871, 1194770, 1194783, 1194648, 1195093,\n", - " 1195511, 1195263, 1196534, 1201992, 1196031, 1197697, 1195888, 1195895,\n", - " 1202902, 1196334, 1197856, 1196359, 1195325, 1198260, 1196711, 1195265,\n", - " 1195270, 1197136, 1195847, 1195038, 1199315, 1199317, 1197478, 1199344,\n", - " 1200037, 1198280, 1199329, 1199856, 1196851, 1194941, 1199628, 1201636,\n", - " 1199803, 1202457, 1200075, 1200079, 1200869, 1199152, 1199154, 1199038,\n", - " 1200747, 1199231, 1199745, 1199676, 1194786, 1200060, 1197601, 1197609,\n", - " 1196727, 1196734, 1200887, 1198416, 1200155, 1198811, 1201534, 1201824,\n", - " 1201827, 1198791, 1201156, 1200991, 1200918, 1199546, 1201052, 1202502,\n", - " 1202504, 1200546, 1200553, 1200555, 1200429, 1199211, 1200345, 1197095,\n", - " 1197097, 1200194, 1196256, 1202239, 1200899, 1202338, 1202175, 1201291,\n", - " 1195607, 1195611, 1202210, 1199927, 1196966, 1200784, 1200785, 1199606,\n", - " 1198518, 1195676, 1195679, 1200445, 1196929, 1198929, 1195181, 1197822,\n", - " 1201499, 1196601, 1199659, 1203102, 1198824, 1199782, 1198819, 1197593,\n", - " 1200466, 1195070, 1201886, 1197039, 1203162, 1196428, 1198748],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1195202, 1198769, 1198730, 1199282, 1198449, 1202255, 1198844, 1201577,\n", - " 1201582, 1202119, 1194626, 1194635, 1200644, 1197777, 1201021, 1201660,\n", - " 1197359, 1198624, 1198633, 1196871, 1194770, 1194783, 1194648, 1195093,\n", - " 1195511, 1195263, 1196534, 1201992, 1196031, 1197697, 1195888, 1195895,\n", - " 1202902, 1196334, 1197856, 1196359, 1195325, 1198260, 1196711, 1195265,\n", - " 1195270, 1197136, 1195847, 1195038, 1199315, 1199317, 1197478, 1199344,\n", - " 1200037, 1198280, 1199329, 1199856, 1196851, 1194941, 1199628, 1201636,\n", - " 1199803, 1202457, 1200075, 1200079, 1200869, 1199152, 1199154, 1199038,\n", - " 1200747, 1199231, 1199745, 1199676, 1194786, 1200060, 1197601, 1197609,\n", - " 1196727, 1196734, 1200887, 1198416, 1200155, 1198811, 1201534, 1201824,\n", - " 1201827, 1198791, 1201156, 1200991, 1200918, 1199546, 1201052, 1202502,\n", - " 1202504, 1200546, 1200553, 1200555, 1200429, 1199211, 1200345, 1197095,\n", - " 1197097, 1200194, 1196256, 1202239, 1200899, 1202338, 1202175, 1201291,\n", - " 1195607, 1195611, 1202210, 1199927, 1196966, 1200784, 1200785, 1199606,\n", - " 1198518, 1195676, 1195679, 1200445, 1196929, 1198929, 1195181, 1197822,\n", - " 1201499, 1196601, 1199659, 1203102, 1198824, 1199782, 1198819, 1197593,\n", - " 1200466, 1195070, 1201886, 1197039, 1203162, 1196428, 1198748],\n", - " device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 2.3253e-01, -6.5351e-04, 7.3304e-01, ..., 4.9428e-02,\n", - " -1.9091e-03, -6.5881e-03],\n", - " [ 2.2072e-01, -6.3046e-04, 7.0285e-01, ..., 3.8759e-02,\n", - " -1.5769e-03, -6.2202e-03],\n", - " [ 1.8258e-01, 9.7474e-04, 7.5392e-01, ..., 4.3941e-02,\n", - " -1.7978e-03, -6.2586e-03],\n", - " ...,\n", - " [ 1.1577e-01, 2.0742e-02, 3.6352e-01, ..., 9.3612e-02,\n", - " -1.9375e-03, -3.8369e-03],\n", - " [ 1.7710e-01, -2.5514e-04, 6.0513e-01, ..., 7.3668e-02,\n", - " -1.9415e-03, -5.6564e-03],\n", - " [ 9.5569e-02, 3.3699e-02, 4.3957e-01, ..., 5.9256e-02,\n", - " -1.5008e-03, -3.8000e-03]], device='cuda:0'), 'paper': tensor([[-4.3500e-02, -3.1834e-02, 3.5000e+00, ..., -2.9644e-02,\n", - " -3.1351e-02, -5.4716e-02],\n", - " [-8.8109e-03, -4.6297e-03, 6.2154e-01, ..., -1.5045e-02,\n", - " -9.5360e-03, -9.4789e-03],\n", - " [-3.7319e-02, -2.0616e-02, 3.3802e+00, ..., -2.8059e-02,\n", - " -2.3124e-02, -4.5110e-02],\n", - " ...,\n", - " [-1.5067e-02, -2.9230e-03, 1.0464e+00, ..., -1.1238e-02,\n", - " -1.1447e-02, -1.8397e-02],\n", - " [-1.0911e-02, 7.5316e-01, -6.2091e-04, ..., 7.7234e-01,\n", - " -1.5461e-02, -6.7151e-03],\n", - " [-1.8205e-02, 1.8624e+00, 5.2749e-01, ..., 4.1719e+00,\n", - " -4.6287e-02, 2.1984e+00]], device='cuda:0'), 'author': tensor([[-1.5938e-03, -3.1882e-04, -3.7302e-04, ..., 7.3912e-01,\n", - " 6.9646e-01, 5.3718e-02],\n", - " [-1.0941e-03, -1.6240e-03, 1.1404e-01, ..., 6.9065e-01,\n", - " 8.8056e-01, 8.4835e-02],\n", - " [-3.2753e-03, 4.9383e-02, 1.5183e-01, ..., 7.0093e-01,\n", - " 4.0602e-01, -2.7610e-03],\n", - " ...,\n", - " [-1.7135e-03, -1.0271e-03, 9.3868e-02, ..., 6.5958e-01,\n", - " 7.0385e-01, 1.2832e-02],\n", - " [-2.5451e-03, -5.9128e-04, 1.4564e-01, ..., 6.9799e-01,\n", - " 6.3272e-01, -1.6333e-03],\n", - " [-1.3756e-03, -1.4232e-03, 1.1646e-01, ..., 7.2717e-01,\n", - " 8.9109e-01, 6.6553e-02]], device='cuda:0'), 'field_of_study': tensor([[-2.6721e-03, 4.5646e-01, 1.8547e-01, ..., -6.5252e-03,\n", - " 2.5230e-01, 2.5380e-01],\n", - " [ 5.0915e-02, 4.5538e-01, 8.5595e-02, ..., -6.6370e-03,\n", - " 1.9130e-01, -1.7312e-03],\n", - " [-4.3360e-03, 2.7340e-01, -1.1814e-03, ..., -3.0332e-03,\n", - " 1.0805e-01, 2.0243e-01],\n", - " ...,\n", - " [-3.6094e-03, 5.4250e-01, 1.7431e-01, ..., -7.3606e-03,\n", - " 2.4692e-01, 4.3915e-01],\n", - " [-6.9465e-04, 3.2833e-01, 7.5094e-02, ..., -7.0274e-03,\n", - " 1.9670e-01, -3.7031e-04],\n", - " [-2.1501e-03, 2.7483e-01, 2.3073e-02, ..., -6.4782e-03,\n", - " 1.5359e-01, 1.1379e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 133, 4, 121, 4, 4, 152, 75, 190, 23, 76, 453, 453,\n", - " 388, 388, 364, 342, 375, 375, 1004, 595, 881, 685, 851, 688,\n", - " 688, 688, 1008, 1024, 1078, 723, 723, 1176, 1176, 1613, 1208, 1258,\n", - " 1341, 1481, 1465, 1339, 1711, 1711, 1711, 1711, 1567, 1567, 1567, 1567,\n", - " 1811, 1744, 1744, 1880, 1836, 1789, 2144, 2144, 1837, 1837, 1792, 1805,\n", - " 1963, 1731, 1792, 1945, 1887, 2033, 2104, 2108, 2129, 2214, 2251, 2251,\n", - " 2209, 2156, 2156, 2153, 2153, 2496, 2418, 2418, 2418, 2418, 2413, 2666,\n", - " 2704, 2546, 2519, 2535, 2535, 2654, 2699, 2635, 2676, 2676, 2637, 3203,\n", - " 2830, 2723, 2890, 2874, 2874, 3055, 3055, 3202, 3144, 3144, 3312, 3212,\n", - " 3264, 3403, 3610, 3481, 3628, 3775, 3628, 3533, 3798, 3803, 3919, 4193,\n", - " 4249, 4222, 4276, 4276, 4276, 4357, 4332, 4420, 4448, 4496, 4496, 4683,\n", - " 4683, 4734, 4823, 4910, 4857, 5069, 4861, 4970, 5188, 5002, 5144, 5277,\n", - " 5277, 5277, 5277, 5277, 5277, 5193, 5271, 5247, 5211, 5364, 5268, 5287,\n", - " 5573, 5783, 5741, 5741, 5677, 5943, 5583, 6110, 6110, 5958, 5796, 5796,\n", - " 5803, 5803, 6480, 6480, 5893, 5893, 6280, 6109, 6109, 6109, 6109, 6068,\n", - " 6571, 6571, 6366, 6366, 5840, 6298, 6298, 6298, 6298, 6251, 6251, 6420,\n", - " 6494, 6494, 6268, 6268, 6279, 6253, 6253, 6280, 6598, 6515],\n", - " [ 87, 109, 60, 21, 28, 60, 67, 32, 21, 111, 77, 125,\n", - " 112, 58, 72, 68, 88, 14, 70, 54, 72, 117, 45, 51,\n", - " 130, 109, 22, 15, 115, 58, 112, 29, 128, 52, 54, 8,\n", - " 36, 66, 90, 66, 82, 92, 85, 35, 73, 96, 31, 10,\n", - " 77, 77, 130, 83, 94, 38, 50, 120, 57, 37, 58, 44,\n", - " 84, 96, 112, 101, 72, 25, 33, 49, 65, 113, 125, 94,\n", - " 23, 125, 77, 81, 106, 93, 134, 3, 95, 53, 131, 64,\n", - " 86, 47, 116, 45, 25, 30, 42, 56, 11, 72, 80, 97,\n", - " 27, 13, 107, 67, 133, 63, 10, 83, 60, 108, 18, 38,\n", - " 9, 59, 122, 132, 4, 111, 72, 72, 123, 98, 34, 71,\n", - " 132, 93, 94, 77, 125, 99, 26, 10, 112, 105, 61, 72,\n", - " 133, 2, 129, 60, 72, 6, 4, 86, 60, 55, 111, 77,\n", - " 89, 46, 20, 16, 75, 109, 79, 28, 17, 12, 9, 96,\n", - " 48, 8, 72, 119, 40, 0, 127, 62, 100, 102, 91, 7,\n", - " 103, 126, 5, 72, 78, 19, 72, 39, 72, 71, 13, 118,\n", - " 39, 72, 72, 43, 8, 43, 110, 104, 69, 24, 72, 124,\n", - " 41, 121, 72, 111, 74, 72, 114, 1, 67, 76]],\n", - " device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[2246, 663, 367, ..., 1890, 4160, 4738],\n", - " [ 5, 313, 39, ..., 6308, 6385, 6388]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 74, 125, 131, 125, 120, 50, 99, 72, 55, 131, 55, 55,\n", - " 125, 120, 120, 50, 132, 55, 72, 120, 72, 55, 74, 120,\n", - " 99, 55, 132, 131, 50, 132, 132, 120, 63, 50, 120, 131,\n", - " 131, 63, 66, 132, 132, 99, 132, 94, 45, 131, 66, 50,\n", - " 40, 40, 74, 45, 74, 72, 94, 74, 55, 63, 10, 120,\n", - " 50, 55, 99, 93, 66, 94, 74, 120, 10, 99, 55, 45,\n", - " 80, 132, 125, 10, 74, 125, 45, 80, 63, 120, 132, 66,\n", - " 94, 10, 74, 63, 45, 125, 94, 131, 99, 10, 50, 120,\n", - " 131, 94, 10, 80, 63, 40, 125, 94, 74, 120, 66, 66,\n", - " 74, 132, 120, 94, 120, 131, 50, 72, 74, 132, 80, 120,\n", - " 63, 63, 50, 55, 132, 50, 72, 45, 80, 93, 10, 120,\n", - " 74, 45, 131, 55, 99, 55, 63, 80, 50, 94, 94, 63,\n", - " 55, 94, 120, 55, 10, 132, 132, 94, 10, 74, 10, 72,\n", - " 63, 131, 74, 74, 131, 10, 50, 80, 66, 40, 131, 131,\n", - " 94, 55, 40, 45, 72, 131, 66, 94, 99, 99, 50, 50,\n", - " 132, 66, 55, 131, 131, 131, 99, 80, 63, 99, 80, 45,\n", - " 80, 120, 66, 74, 120, 66, 99, 99, 93, 93, 55, 63,\n", - " 93, 40, 120, 55, 66, 45, 72, 80, 74, 80, 94, 93,\n", - " 50, 66, 99, 45, 45, 10, 66, 55, 40, 45, 55, 40,\n", - " 40, 50, 63, 63, 45, 10, 93, 63, 125, 93, 80, 80,\n", - " 94, 63, 45, 10, 99, 99, 94, 99, 125, 66, 10, 93,\n", - " 50, 45, 45, 80, 63, 80, 40, 93, 66, 125, 99, 99,\n", - " 63, 99, 120, 50, 66, 99, 80, 93, 10, 93, 50, 131,\n", - " 80, 132, 99, 80, 93, 93, 10, 55, 50, 55, 99, 94,\n", - " 66, 55, 10, 72, 120, 66, 74, 131, 72, 40, 94, 80,\n", - " 10, 50, 125, 80, 45, 131, 40, 131, 94, 50, 131, 63,\n", - " 66, 125, 45, 66, 40, 45, 120, 72, 63, 72, 40, 40,\n", - " 93, 125, 99, 40, 45, 80, 125, 63, 63, 40, 120, 72,\n", - " 10, 72, 74, 10, 94, 94, 10, 80, 131, 72, 40, 66,\n", - " 72, 72, 40, 55, 132, 94, 94, 74, 45, 66, 72, 80,\n", - " 125, 94, 45, 50, 40, 132, 45, 74, 132, 72, 132, 132,\n", - " 63, 55, 80, 132, 125, 40, 10, 125, 74, 50, 45, 125,\n", - " 125, 125, 125, 72, 72, 40, 72, 63, 132, 74, 10, 99,\n", - " 10, 74, 40, 125, 125, 72, 132, 40, 74, 40, 66, 72,\n", - " 125, 131, 132, 50, 120, 66, 125],\n", - " [ 202, 198, 164, 826, 93, 169, 168, 6, 124, 185, 548, 207,\n", - " 517, 511, 305, 876, 576, 489, 289, 408, 680, 436, 644, 406,\n", - " 600, 748, 777, 561, 573, 877, 605, 830, 818, 937, 805, 919,\n", - " 942, 1164, 1055, 943, 1049, 1076, 1063, 1337, 1092, 1103, 1311, 1115,\n", - " 1238, 1392, 1094, 1139, 1272, 1132, 1325, 1157, 1074, 1266, 1343, 1494,\n", - " 1388, 1263, 1502, 1529, 1625, 1637, 1659, 1608, 1574, 1524, 1511, 1505,\n", - " 1646, 1442, 1628, 1415, 1549, 1603, 1824, 1891, 1803, 1775, 1956, 1829,\n", - " 2080, 1748, 1949, 1726, 2002, 1898, 1808, 2026, 1882, 2035, 2073, 2037,\n", - " 2230, 1969, 2120, 2024, 2085, 2031, 2052, 2059, 1987, 2259, 2038, 2062,\n", - " 2139, 2086, 2287, 2127, 2196, 2234, 2391, 2187, 2240, 2393, 2190, 2029,\n", - " 2431, 2232, 2195, 2138, 2361, 2396, 2266, 2321, 2359, 2496, 2227, 2424,\n", - " 2457, 2403, 2360, 2481, 2434, 2414, 2596, 2436, 2503, 2680, 2452, 2469,\n", - " 2510, 2532, 2556, 2511, 2568, 2549, 2575, 2700, 2688, 2601, 2659, 2540,\n", - " 2560, 2770, 2653, 2662, 2711, 2657, 2718, 2717, 2769, 2767, 2917, 2707,\n", - " 2897, 2794, 2961, 3024, 2818, 3013, 2934, 3143, 2998, 3155, 2942, 2759,\n", - " 3040, 3110, 3161, 2979, 3093, 3028, 3052, 3220, 3222, 3186, 3163, 3260,\n", - " 3227, 3176, 3326, 3404, 3217, 3210, 3281, 3300, 3422, 3254, 3367, 3438,\n", - " 3244, 3502, 3454, 3291, 3450, 3564, 3559, 3634, 3577, 3840, 3707, 3590,\n", - " 3515, 3555, 3778, 3630, 3631, 3928, 3687, 3662, 3885, 3878, 3737, 3917,\n", - " 3895, 3758, 3951, 4146, 3881, 4014, 3829, 3760, 3984, 4126, 3993, 3777,\n", - " 3731, 3823, 3719, 4066, 4196, 4210, 4188, 4163, 4242, 4232, 4212, 4222,\n", - " 4226, 4220, 4209, 4270, 4273, 4228, 4213, 4183, 4223, 4233, 4266, 4221,\n", - " 4219, 4257, 4259, 4288, 4315, 4268, 4291, 4247, 4329, 4307, 4326, 4282,\n", - " 4297, 4334, 4314, 4356, 4368, 4323, 4327, 4308, 4424, 4430, 4371, 4560,\n", - " 4429, 4408, 4460, 4555, 4531, 4386, 4521, 4487, 4486, 4634, 4586, 4370,\n", - " 4469, 4636, 4641, 4660, 4708, 4640, 4564, 4549, 4745, 4716, 4792, 4796,\n", - " 4744, 4723, 4677, 4726, 4739, 4860, 4945, 4901, 4822, 4911, 4828, 4867,\n", - " 5065, 4942, 4983, 4969, 4996, 4826, 5136, 4873, 5017, 5178, 5072, 4903,\n", - " 5122, 5005, 5155, 5249, 5086, 5153, 5141, 5207, 5240, 5081, 4990, 5203,\n", - " 5342, 5461, 5250, 5217, 5252, 5292, 5289, 5387, 5425, 5296, 5239, 5356,\n", - " 5423, 5261, 5315, 5473, 5525, 5708, 5702, 5732, 5648, 5681, 5560, 5671,\n", - " 5540, 5510, 5719, 5704, 5966, 5801, 5853, 5618, 6365, 5947, 5684, 6178,\n", - " 5797, 5865, 6020, 5973, 6499, 5669, 5768, 5820, 6400, 6258, 6460, 6226,\n", - " 6167, 6492, 6351, 6329, 6572, 6281, 6364, 6413, 6452, 6588, 6547, 6564,\n", - " 6446, 6325, 6586, 6288, 6200, 6526, 6546]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 333, 192, 192, ..., 6389, 6389, 6389],\n", - " [ 96, 203, 454, ..., 12, 581, 244]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 182, 472, 570, ..., 239, 307, 570],\n", - " [ 8, 115, 178, ..., 6372, 6313, 6332]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4965, 809, 3525, ..., 1688, 951, 6051],\n", - " [ 213, 35, 120, ..., 6560, 6484, 6517]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 192, 213, 213, ..., 6262, 6262, 6337],\n", - " [2406, 534, 1065, ..., 3785, 1843, 4349]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 75, 75, 75, ..., 6515, 6515, 6515],\n", - " [3848, 3688, 2406, ..., 6318, 6366, 6284]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006834\n", - "sampling 0.006674\n", - "noi time: 0.001976\n", - "get_vertex_data call: 0.037668\n", - "noi group time: 0.003512\n", - "eoi_group_time: 0.016093\n", - "second half: 0.226303\n", - "attr to get: TensorAttr(group_name='author', attr_name='x', index=tensor([ 3117, 31145, 3253, ..., 1120077, 1120075, 1119052],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='author', attr_name='y', index=tensor([ 3117, 31145, 3253, ..., 1120077, 1120075, 1119052],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='x', index=tensor([1208584, 1224370, 1231432, ..., 1929322, 1930682, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='paper', attr_name='y', index=tensor([1208584, 1224370, 1231432, ..., 1929322, 1930682, 1936974],\n", - " device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='x', index=tensor([1135061, 1137204, 1137209, 1141424, 1140282, 1140284, 1136339, 1135726,\n", - " 1141758, 1136223, 1141251, 1141263, 1136969, 1141443, 1138897, 1149831,\n", - " 1149835, 1139811, 1145370, 1146978, 1137947, 1145992, 1145999, 1138928,\n", - " 1138938, 1143372, 1150395, 1146640, 1139615, 1148987, 1150503, 1150509,\n", - " 1149216, 1143820, 1149646, 1147483, 1142881, 1144632, 1149038, 1146998,\n", - " 1135950, 1135111, 1148336, 1146669, 1146472, 1153224, 1137220, 1155014,\n", - " 1155018, 1155019, 1139362, 1139371, 1136683, 1150329, 1146375, 1138745,\n", - " 1140313, 1151546, 1140540, 1140542, 1138112, 1138119, 1149461, 1138366,\n", - " 1140159, 1134720, 1135367, 1135202, 1135890, 1141036, 1136770, 1134794,\n", - " 1136517, 1138504, 1138508, 1136185, 1157103, 1137693, 1144786, 1144395,\n", - " 1137529, 1137534, 1135408, 1157393, 1136942, 1135265, 1156159, 1139161,\n", - " 1135977, 1135583, 1141072, 1141086, 1138524, 1153096, 1137957, 1158136,\n", - " 1158140, 1154132, 1154141, 1137019, 1135522, 1135535, 1138314, 1138436,\n", - " 1138461, 1154784, 1154792, 1136594, 1135121, 1158390, 1138846, 1156606,\n", - " 1142611, 1135623, 1138185, 1137104, 1137109, 1139849, 1141532, 1136457,\n", - " 1139667, 1138069, 1136085, 1134992, 1136554, 1139744, 1139315, 1144410,\n", - " 1139933, 1138148, 1155661, 1140557, 1152042, 1152044, 1139065, 1142302,\n", - " 1137734, 1137728, 1147322, 1134922, 1140901, 1136703, 1141088, 1141098,\n", - " 1149001, 1139898, 1145347, 1141975, 1143767, 1143775, 1139025, 1149968,\n", - " 1146843, 1146844, 1135861, 1135862, 1142929, 1141657, 1136917, 1143667,\n", - " 1160612, 1141161, 1141786, 1152733, 1144650, 1136854, 1142053, 1141810,\n", - " 1141814, 1139275, 1143204, 1140169, 1140170, 1139190, 1141479, 1138708,\n", - " 1142913, 1138423, 1143107, 1144596, 1144598, 1144599, 1148266, 1136866,\n", - " 1136864, 1141579, 1135327, 1137606, 1150906, 1146203, 1158692, 1138539,\n", - " 1141367, 1153058, 1151113, 1149088, 1138288, 1138293, 1144279, 1153556,\n", - " 1143908, 1139508, 1139510, 1140093, 1139122, 1145000, 1145213, 1140619,\n", - " 1140990, 1141560, 1147050, 1145873, 1149878, 1152976, 1135457, 1142556,\n", - " 1163917, 1139452, 1141925, 1146898, 1144242, 1140580, 1150255, 1150692,\n", - " 1139405, 1143636, 1137571, 1134861, 1145983, 1144073, 1146024, 1138085,\n", - " 1154328, 1141585, 1149928, 1141235, 1139990, 1143293, 1143294, 1143886,\n", - " 1147540, 1147150, 1148763, 1147282, 1142816, 1136323, 1149159, 1149161,\n", - " 1147461, 1142637, 1149366, 1148003, 1148010, 1157720, 1136836, 1139329,\n", - " 1141490, 1141496, 1143345, 1144765, 1135874, 1150288, 1138004, 1146523,\n", - " 1143457, 1143007, 1137696, 1137697, 1140483, 1143949, 1135454, 1140824,\n", - " 1140827, 1143799, 1143796, 1147521, 1140361, 1140360, 1140364, 1137990,\n", - " 1143081, 1143080, 1144219, 1147999, 1134902, 1139252, 1147131, 1154495,\n", - " 1148704, 1141825, 1146751, 1146742, 1148476, 1153701, 1152328, 1149714,\n", - " 1149722, 1147025, 1147970, 1158226, 1158235, 1143921, 1154526, 1145240,\n", - " 1145751, 1138626, 1148394, 1146178, 1151242, 1152530, 1150438, 1150445,\n", - " 1149258, 1154438, 1144526, 1150350, 1151997, 1142315, 1152031, 1145255,\n", - " 1146723, 1149530, 1147019, 1147021, 1147009, 1147023, 1152804, 1141937,\n", - " 1141949, 1141278, 1167223, 1153575, 1154982, 1148450, 1147653, 1147654,\n", - " 1146400, 1139096, 1139097, 1151412, 1154420, 1136251, 1139713, 1139716,\n", - " 1139718, 1146682, 1152441, 1157983, 1148724, 1143893, 1148204, 1148101,\n", - " 1153124, 1145104, 1145119, 1150932, 1150935, 1148095, 1147446, 1151816,\n", - " 1152576, 1135311, 1151906, 1154190, 1148498, 1146565, 1141420, 1157203,\n", - " 1150890, 1148949, 1146975, 1149359, 1146623, 1151692, 1135688, 1152097,\n", - " 1146280, 1156325, 1153038, 1137746, 1146307, 1152622, 1140513, 1140527,\n", - " 1136410, 1149203, 1152818, 1154119, 1157835, 1157833, 1154633, 1151573,\n", - " 1151617, 1150586, 1145278, 1136798, 1148916, 1152951, 1152958, 1140459,\n", - " 1145952, 1138989, 1152903, 1151311, 1143995, 1152341, 1153311, 1146704,\n", - " 1145577, 1138281, 1136028, 1136031, 1136026, 1158712, 1158704, 1152928,\n", - " 1155779, 1156399, 1152887, 1154727, 1137545, 1137400, 1137392, 1153907,\n", - " 1150168, 1150164, 1144016, 1148040, 1149304, 1149792, 1137048, 1148628,\n", - " 1158530, 1158540, 1148376, 1137458, 1149943, 1135707, 1135698, 1142041,\n", - " 1166145, 1154381, 1157547, 1154929, 1156505, 1157064, 1157069, 1155412,\n", - " 1150465, 1150475, 1135222, 1151788, 1151777, 1157912, 1135634, 1139529,\n", - " 1158308, 1155441, 1155511, 1150132, 1154530, 1154528, 1156207, 1156205,\n", - " 1151380, 1151379, 1156649, 1155122, 1152519, 1152518, 1149312, 1153478,\n", - " 1155755, 1146913, 1158096, 1155675, 1156563, 1155576, 1158573, 1158824,\n", - " 1158330, 1154033, 1157000, 1148835, 1148838, 1155646, 1153368, 1143263,\n", - " 1154240, 1162190, 1179427, 1143189, 1150371, 1157430, 1157934, 1137152,\n", - " 1157660, 1158126, 1158578, 1158203, 1159116, 1158350, 1137326, 1135601,\n", - " 1135614, 1148148, 1150661, 1155848, 1138215, 1146325, 1149145, 1140633,\n", - " 1156692, 1156693, 1140380, 1140381, 1140374, 1156027, 1163688, 1157033,\n", - " 1144843, 1155975, 1153762, 1158846, 1156811, 1155393, 1153498, 1136896,\n", - " 1171171, 1140215, 1140221, 1158815, 1136494, 1153632, 1156495, 1156490,\n", - " 1156281, 1156272, 1136640, 1179169, 1162167, 1157823, 1158545, 1158006,\n", - " 1144582, 1137554, 1164276, 1159042, 1162055, 1159144, 1142427, 1158295,\n", - " 1157944, 1153052, 1153045, 1164663, 1155763, 1156233, 1156235, 1153841,\n", - " 1163707, 1156098, 1150046, 1149063, 1155476, 1153519, 1147300, 1146870,\n", - " 1138161, 1164006, 1149956, 1149963, 1164909, 1148016, 1148031, 1157236,\n", - " 1140731, 1140735, 1146063, 1166085, 1146356, 1171255, 1160702, 1164048,\n", - " 1165306, 1165309, 1140135, 1170415, 1140641, 1140650, 1140643, 1148600,\n", - " 1148607, 1143143, 1143146, 1155818, 1141800, 1141801, 1156177, 1159029,\n", - " 1159032, 1184734, 1169109, 1152244, 1152247, 1166910, 1168527, 1144737,\n", - " 1144747, 1155046, 1155268, 1165409, 1151650, 1147427, 1147433, 1147438,\n", - " 1157052, 1149896, 1156739, 1157955, 1166591, 1161015, 1150648, 1150315,\n", - " 1168748, 1144810, 1144812, 1165716, 1142733, 1156289, 1145176, 1163783,\n", - " 1145228, 1154689, 1160768, 1170670, 1144973, 1142136, 1143028, 1143025,\n", - " 1152629, 1152624, 1148124, 1145900, 1145902, 1153520, 1151752, 1181040,\n", - " 1143404, 1170985, 1158722, 1154070, 1170740, 1147331, 1145674, 1145665,\n", - " 1151598, 1149130, 1154209, 1150518, 1156118, 1144344, 1144346, 1144336,\n", - " 1157534, 1147746, 1154656, 1154670, 1169154, 1138129, 1138141, 1138142,\n", - " 1151671, 1167883, 1149452, 1158051, 1158062, 1172875, 1157384, 1159851,\n", - " 1160141, 1171475, 1152353, 1166600, 1143859, 1149402, 1148667, 1165904,\n", - " 1173307, 1154027, 1152150, 1159659, 1151696, 1151697, 1162625, 1157158,\n", - " 1157153, 1157373, 1147711, 1151850, 1157593, 1170488, 1135021, 1173132,\n", - " 1173121, 1168825, 1168604, 1160990, 1150234, 1154151, 1154148, 1178642,\n", - " 1170473, 1186117, 1143279, 1143420, 1171303, 1153803, 1153805, 1177155,\n", - " 1144910, 1176258, 1179807, 1161255, 1176675, 1154718, 1154713, 1157792,\n", - " 1157793, 1157795, 1157084, 1158253, 1153898, 1153893, 1161846, 1145626,\n", - " 1186219, 1163538, 1178765, 1149753, 1149755, 1146243, 1181345, 1152279,\n", - " 1157771, 1155990, 1173148, 1190030, 1158940, 1158381, 1155892, 1155899,\n", - " 1157272, 1164413, 1140399, 1188254, 1184529, 1162253, 1182337, 1181547,\n", - " 1163421, 1190156, 1165082, 1156170, 1170034, 1168940, 1139828, 1139831,\n", - " 1150265, 1154812, 1151288, 1156055, 1146392, 1146394, 1149544, 1189352,\n", - " 1191511, 1172696, 1177484, 1162146, 1162151, 1190112, 1151774, 1185761,\n", - " 1169707, 1156676, 1158064, 1158067, 1145395, 1178662, 1155959, 1187846,\n", - " 1183610, 1185603, 1179769, 1179765, 1169837, 1162661, 1194191, 1182852,\n", - " 1161348], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='field_of_study', attr_name='y', index=tensor([1135061, 1137204, 1137209, 1141424, 1140282, 1140284, 1136339, 1135726,\n", - " 1141758, 1136223, 1141251, 1141263, 1136969, 1141443, 1138897, 1149831,\n", - " 1149835, 1139811, 1145370, 1146978, 1137947, 1145992, 1145999, 1138928,\n", - " 1138938, 1143372, 1150395, 1146640, 1139615, 1148987, 1150503, 1150509,\n", - " 1149216, 1143820, 1149646, 1147483, 1142881, 1144632, 1149038, 1146998,\n", - " 1135950, 1135111, 1148336, 1146669, 1146472, 1153224, 1137220, 1155014,\n", - " 1155018, 1155019, 1139362, 1139371, 1136683, 1150329, 1146375, 1138745,\n", - " 1140313, 1151546, 1140540, 1140542, 1138112, 1138119, 1149461, 1138366,\n", - " 1140159, 1134720, 1135367, 1135202, 1135890, 1141036, 1136770, 1134794,\n", - " 1136517, 1138504, 1138508, 1136185, 1157103, 1137693, 1144786, 1144395,\n", - " 1137529, 1137534, 1135408, 1157393, 1136942, 1135265, 1156159, 1139161,\n", - " 1135977, 1135583, 1141072, 1141086, 1138524, 1153096, 1137957, 1158136,\n", - " 1158140, 1154132, 1154141, 1137019, 1135522, 1135535, 1138314, 1138436,\n", - " 1138461, 1154784, 1154792, 1136594, 1135121, 1158390, 1138846, 1156606,\n", - " 1142611, 1135623, 1138185, 1137104, 1137109, 1139849, 1141532, 1136457,\n", - " 1139667, 1138069, 1136085, 1134992, 1136554, 1139744, 1139315, 1144410,\n", - " 1139933, 1138148, 1155661, 1140557, 1152042, 1152044, 1139065, 1142302,\n", - " 1137734, 1137728, 1147322, 1134922, 1140901, 1136703, 1141088, 1141098,\n", - " 1149001, 1139898, 1145347, 1141975, 1143767, 1143775, 1139025, 1149968,\n", - " 1146843, 1146844, 1135861, 1135862, 1142929, 1141657, 1136917, 1143667,\n", - " 1160612, 1141161, 1141786, 1152733, 1144650, 1136854, 1142053, 1141810,\n", - " 1141814, 1139275, 1143204, 1140169, 1140170, 1139190, 1141479, 1138708,\n", - " 1142913, 1138423, 1143107, 1144596, 1144598, 1144599, 1148266, 1136866,\n", - " 1136864, 1141579, 1135327, 1137606, 1150906, 1146203, 1158692, 1138539,\n", - " 1141367, 1153058, 1151113, 1149088, 1138288, 1138293, 1144279, 1153556,\n", - " 1143908, 1139508, 1139510, 1140093, 1139122, 1145000, 1145213, 1140619,\n", - " 1140990, 1141560, 1147050, 1145873, 1149878, 1152976, 1135457, 1142556,\n", - " 1163917, 1139452, 1141925, 1146898, 1144242, 1140580, 1150255, 1150692,\n", - " 1139405, 1143636, 1137571, 1134861, 1145983, 1144073, 1146024, 1138085,\n", - " 1154328, 1141585, 1149928, 1141235, 1139990, 1143293, 1143294, 1143886,\n", - " 1147540, 1147150, 1148763, 1147282, 1142816, 1136323, 1149159, 1149161,\n", - " 1147461, 1142637, 1149366, 1148003, 1148010, 1157720, 1136836, 1139329,\n", - " 1141490, 1141496, 1143345, 1144765, 1135874, 1150288, 1138004, 1146523,\n", - " 1143457, 1143007, 1137696, 1137697, 1140483, 1143949, 1135454, 1140824,\n", - " 1140827, 1143799, 1143796, 1147521, 1140361, 1140360, 1140364, 1137990,\n", - " 1143081, 1143080, 1144219, 1147999, 1134902, 1139252, 1147131, 1154495,\n", - " 1148704, 1141825, 1146751, 1146742, 1148476, 1153701, 1152328, 1149714,\n", - " 1149722, 1147025, 1147970, 1158226, 1158235, 1143921, 1154526, 1145240,\n", - " 1145751, 1138626, 1148394, 1146178, 1151242, 1152530, 1150438, 1150445,\n", - " 1149258, 1154438, 1144526, 1150350, 1151997, 1142315, 1152031, 1145255,\n", - " 1146723, 1149530, 1147019, 1147021, 1147009, 1147023, 1152804, 1141937,\n", - " 1141949, 1141278, 1167223, 1153575, 1154982, 1148450, 1147653, 1147654,\n", - " 1146400, 1139096, 1139097, 1151412, 1154420, 1136251, 1139713, 1139716,\n", - " 1139718, 1146682, 1152441, 1157983, 1148724, 1143893, 1148204, 1148101,\n", - " 1153124, 1145104, 1145119, 1150932, 1150935, 1148095, 1147446, 1151816,\n", - " 1152576, 1135311, 1151906, 1154190, 1148498, 1146565, 1141420, 1157203,\n", - " 1150890, 1148949, 1146975, 1149359, 1146623, 1151692, 1135688, 1152097,\n", - " 1146280, 1156325, 1153038, 1137746, 1146307, 1152622, 1140513, 1140527,\n", - " 1136410, 1149203, 1152818, 1154119, 1157835, 1157833, 1154633, 1151573,\n", - " 1151617, 1150586, 1145278, 1136798, 1148916, 1152951, 1152958, 1140459,\n", - " 1145952, 1138989, 1152903, 1151311, 1143995, 1152341, 1153311, 1146704,\n", - " 1145577, 1138281, 1136028, 1136031, 1136026, 1158712, 1158704, 1152928,\n", - " 1155779, 1156399, 1152887, 1154727, 1137545, 1137400, 1137392, 1153907,\n", - " 1150168, 1150164, 1144016, 1148040, 1149304, 1149792, 1137048, 1148628,\n", - " 1158530, 1158540, 1148376, 1137458, 1149943, 1135707, 1135698, 1142041,\n", - " 1166145, 1154381, 1157547, 1154929, 1156505, 1157064, 1157069, 1155412,\n", - " 1150465, 1150475, 1135222, 1151788, 1151777, 1157912, 1135634, 1139529,\n", - " 1158308, 1155441, 1155511, 1150132, 1154530, 1154528, 1156207, 1156205,\n", - " 1151380, 1151379, 1156649, 1155122, 1152519, 1152518, 1149312, 1153478,\n", - " 1155755, 1146913, 1158096, 1155675, 1156563, 1155576, 1158573, 1158824,\n", - " 1158330, 1154033, 1157000, 1148835, 1148838, 1155646, 1153368, 1143263,\n", - " 1154240, 1162190, 1179427, 1143189, 1150371, 1157430, 1157934, 1137152,\n", - " 1157660, 1158126, 1158578, 1158203, 1159116, 1158350, 1137326, 1135601,\n", - " 1135614, 1148148, 1150661, 1155848, 1138215, 1146325, 1149145, 1140633,\n", - " 1156692, 1156693, 1140380, 1140381, 1140374, 1156027, 1163688, 1157033,\n", - " 1144843, 1155975, 1153762, 1158846, 1156811, 1155393, 1153498, 1136896,\n", - " 1171171, 1140215, 1140221, 1158815, 1136494, 1153632, 1156495, 1156490,\n", - " 1156281, 1156272, 1136640, 1179169, 1162167, 1157823, 1158545, 1158006,\n", - " 1144582, 1137554, 1164276, 1159042, 1162055, 1159144, 1142427, 1158295,\n", - " 1157944, 1153052, 1153045, 1164663, 1155763, 1156233, 1156235, 1153841,\n", - " 1163707, 1156098, 1150046, 1149063, 1155476, 1153519, 1147300, 1146870,\n", - " 1138161, 1164006, 1149956, 1149963, 1164909, 1148016, 1148031, 1157236,\n", - " 1140731, 1140735, 1146063, 1166085, 1146356, 1171255, 1160702, 1164048,\n", - " 1165306, 1165309, 1140135, 1170415, 1140641, 1140650, 1140643, 1148600,\n", - " 1148607, 1143143, 1143146, 1155818, 1141800, 1141801, 1156177, 1159029,\n", - " 1159032, 1184734, 1169109, 1152244, 1152247, 1166910, 1168527, 1144737,\n", - " 1144747, 1155046, 1155268, 1165409, 1151650, 1147427, 1147433, 1147438,\n", - " 1157052, 1149896, 1156739, 1157955, 1166591, 1161015, 1150648, 1150315,\n", - " 1168748, 1144810, 1144812, 1165716, 1142733, 1156289, 1145176, 1163783,\n", - " 1145228, 1154689, 1160768, 1170670, 1144973, 1142136, 1143028, 1143025,\n", - " 1152629, 1152624, 1148124, 1145900, 1145902, 1153520, 1151752, 1181040,\n", - " 1143404, 1170985, 1158722, 1154070, 1170740, 1147331, 1145674, 1145665,\n", - " 1151598, 1149130, 1154209, 1150518, 1156118, 1144344, 1144346, 1144336,\n", - " 1157534, 1147746, 1154656, 1154670, 1169154, 1138129, 1138141, 1138142,\n", - " 1151671, 1167883, 1149452, 1158051, 1158062, 1172875, 1157384, 1159851,\n", - " 1160141, 1171475, 1152353, 1166600, 1143859, 1149402, 1148667, 1165904,\n", - " 1173307, 1154027, 1152150, 1159659, 1151696, 1151697, 1162625, 1157158,\n", - " 1157153, 1157373, 1147711, 1151850, 1157593, 1170488, 1135021, 1173132,\n", - " 1173121, 1168825, 1168604, 1160990, 1150234, 1154151, 1154148, 1178642,\n", - " 1170473, 1186117, 1143279, 1143420, 1171303, 1153803, 1153805, 1177155,\n", - " 1144910, 1176258, 1179807, 1161255, 1176675, 1154718, 1154713, 1157792,\n", - " 1157793, 1157795, 1157084, 1158253, 1153898, 1153893, 1161846, 1145626,\n", - " 1186219, 1163538, 1178765, 1149753, 1149755, 1146243, 1181345, 1152279,\n", - " 1157771, 1155990, 1173148, 1190030, 1158940, 1158381, 1155892, 1155899,\n", - " 1157272, 1164413, 1140399, 1188254, 1184529, 1162253, 1182337, 1181547,\n", - " 1163421, 1190156, 1165082, 1156170, 1170034, 1168940, 1139828, 1139831,\n", - " 1150265, 1154812, 1151288, 1156055, 1146392, 1146394, 1149544, 1189352,\n", - " 1191511, 1172696, 1177484, 1162146, 1162151, 1190112, 1151774, 1185761,\n", - " 1169707, 1156676, 1158064, 1158067, 1145395, 1178662, 1155959, 1187846,\n", - " 1183610, 1185603, 1179769, 1179765, 1169837, 1162661, 1194191, 1182852,\n", - " 1161348], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='x', index=tensor([1196007, 1197175, 1197178, 1195406, 1199736, 1198721, 1198730, 1199835,\n", - " 1199282, 1202255, 1201582, 1199278, 1199248, 1201660, 1198633, 1196956,\n", - " 1198557, 1196685, 1196573, 1194770, 1196631, 1195103, 1195514, 1195263,\n", - " 1196534, 1201992, 1195888, 1196977, 1196517, 1197831, 1195313, 1195325,\n", - " 1196835, 1196840, 1196845, 1198668, 1198367, 1198163, 1196711, 1195265,\n", - " 1195278, 1197141, 1194859, 1198915, 1195541, 1197483, 1196122, 1196283,\n", - " 1199185, 1199624, 1197676, 1197994, 1200131, 1200079, 1199154, 1199231,\n", - " 1195017, 1199676, 1197601, 1197607, 1196727, 1200895, 1198416, 1201547,\n", - " 1200450, 1200501, 1198593, 1201156, 1202630, 1202403, 1200991, 1201056,\n", - " 1194803, 1199551, 1202509, 1200526, 1200553, 1197100, 1200692, 1199908,\n", - " 1196768, 1196779, 1200899, 1195607, 1203329, 1199922, 1198562, 1196966,\n", - " 1200784, 1195435, 1195438, 1198929, 1195415, 1197816, 1194898, 1199659,\n", - " 1203102, 1194730, 1198824, 1197731, 1198819, 1200974, 1200296, 1195082,\n", - " 1203162, 1196428], device='cuda:0', dtype=torch.int32))\n", - "attr to get: TensorAttr(group_name='institution', attr_name='y', index=tensor([1196007, 1197175, 1197178, 1195406, 1199736, 1198721, 1198730, 1199835,\n", - " 1199282, 1202255, 1201582, 1199278, 1199248, 1201660, 1198633, 1196956,\n", - " 1198557, 1196685, 1196573, 1194770, 1196631, 1195103, 1195514, 1195263,\n", - " 1196534, 1201992, 1195888, 1196977, 1196517, 1197831, 1195313, 1195325,\n", - " 1196835, 1196840, 1196845, 1198668, 1198367, 1198163, 1196711, 1195265,\n", - " 1195278, 1197141, 1194859, 1198915, 1195541, 1197483, 1196122, 1196283,\n", - " 1199185, 1199624, 1197676, 1197994, 1200131, 1200079, 1199154, 1199231,\n", - " 1195017, 1199676, 1197601, 1197607, 1196727, 1200895, 1198416, 1201547,\n", - " 1200450, 1200501, 1198593, 1201156, 1202630, 1202403, 1200991, 1201056,\n", - " 1194803, 1199551, 1202509, 1200526, 1200553, 1197100, 1200692, 1199908,\n", - " 1196768, 1196779, 1200899, 1195607, 1203329, 1199922, 1198562, 1196966,\n", - " 1200784, 1195435, 1195438, 1198929, 1195415, 1197816, 1194898, 1199659,\n", - " 1203102, 1194730, 1198824, 1197731, 1198819, 1200974, 1200296, 1195082,\n", - " 1203162, 1196428], device='cuda:0', dtype=torch.int32))\n", - "{'institution': tensor([[ 5.7291e-02, -1.2869e-04, 3.4647e-01, ..., 1.0300e-01,\n", - " -1.9406e-03, -3.5319e-03],\n", - " [ 1.3340e-01, 2.5247e-02, 4.6542e-01, ..., 7.0963e-02,\n", - " -1.8692e-03, -4.5896e-03],\n", - " [ 5.5267e-02, 2.0290e-02, 3.0888e-01, ..., 1.5066e-01,\n", - " -2.4305e-03, -3.6403e-03],\n", - " ...,\n", - " [ 2.2821e-01, -5.5721e-04, 7.1206e-01, ..., 4.1279e-02,\n", - " -1.7090e-03, -6.5596e-03],\n", - " [ 2.3018e-01, -4.9266e-04, 7.2041e-01, ..., 4.6721e-02,\n", - " -1.7555e-03, -6.7408e-03],\n", - " [ 2.0991e-01, -2.1385e-04, 6.3658e-01, ..., 4.5916e-02,\n", - " -1.7579e-03, -5.9250e-03]], device='cuda:0'), 'paper': tensor([[-1.0541e-02, 6.4138e-01, 8.3046e-01, ..., -9.2426e-03,\n", - " -1.7541e-02, -2.9015e-03],\n", - " [-1.5844e-02, 1.0032e+00, 1.4659e+00, ..., 1.2926e+00,\n", - " -3.1954e-02, 4.7940e-01],\n", - " [-3.7226e-02, -1.7005e-02, 3.3686e+00, ..., -2.7191e-02,\n", - " -2.1855e-02, -4.6895e-02],\n", - " ...,\n", - " [-3.7681e-02, -2.5723e-02, 2.7407e+00, ..., -2.3379e-02,\n", - " -2.5427e-02, -4.8666e-02],\n", - " [-3.1961e-02, -1.6067e-02, 2.1420e+00, ..., -1.8103e-02,\n", - " -1.8766e-02, -3.8476e-02],\n", - " [-1.8677e-02, 1.7818e+00, 4.0080e-01, ..., 4.0762e+00,\n", - " -4.5009e-02, 2.0407e+00]], device='cuda:0'), 'author': tensor([[-4.2732e-03, 7.0868e-02, 4.3046e-02, ..., 6.6649e-01,\n", - " 3.5820e-01, -2.3770e-03],\n", - " [-2.5047e-03, -1.5235e-03, 1.2543e-01, ..., 6.9777e-01,\n", - " 6.5724e-01, -2.6846e-04],\n", - " [-3.7062e-03, 6.8603e-02, -1.7438e-03, ..., 6.1091e-01,\n", - " 3.7503e-01, -1.1134e-03],\n", - " ...,\n", - " [-3.2416e-03, 2.1661e-02, 1.0190e-01, ..., 6.8726e-01,\n", - " 4.1579e-01, -2.1869e-03],\n", - " [-2.2077e-03, -4.4668e-04, 9.3046e-02, ..., 6.3299e-01,\n", - " 6.4197e-01, -6.6757e-04],\n", - " [-5.2949e-03, 3.3255e-01, 1.7283e-01, ..., 4.4448e-01,\n", - " -2.3240e-03, -9.1818e-03]], device='cuda:0'), 'field_of_study': tensor([[-5.9642e-03, 4.8120e-01, -2.5504e-03, ..., 2.1211e-01,\n", - " 4.6753e-02, -5.5612e-04],\n", - " [-4.3883e-03, 4.3010e-01, 1.5969e-01, ..., -6.2984e-03,\n", - " 1.8586e-01, 3.8242e-01],\n", - " [-8.8278e-04, 2.7134e-01, 6.8454e-02, ..., -7.8669e-03,\n", - " 1.9287e-01, -8.4108e-05],\n", - " ...,\n", - " [-2.2224e-03, 3.0454e-01, 1.1740e-02, ..., -6.9353e-03,\n", - " 1.9978e-01, 3.6281e-02],\n", - " [-1.7687e-03, 2.6769e-01, 2.6098e-02, ..., -6.5537e-03,\n", - " 2.1864e-01, 4.1320e-03],\n", - " [-3.4409e-03, 2.5210e-01, -7.3100e-05, ..., -6.2525e-03,\n", - " 1.5257e-01, 2.0041e-01]], device='cuda:0')} {('author', 'affiliated_with', 'institution'): tensor([[ 7, 22, 87, 92, 125, 498, 431, 426, 275, 230, 230, 230,\n", - " 230, 230, 713, 713, 713, 585, 546, 623, 713, 713, 713, 790,\n", - " 703, 740, 907, 1108, 1108, 827, 755, 1006, 1037, 1315, 1340, 1304,\n", - " 940, 1347, 1019, 1297, 1421, 1581, 1569, 1427, 1548, 1464, 1559, 1464,\n", - " 1464, 1585, 1518, 1363, 1633, 1633, 1507, 1762, 1905, 1751, 1698, 1652,\n", - " 2002, 2085, 2051, 2129, 2051, 2018, 1939, 2095, 1996, 2122, 2159, 2088,\n", - " 2088, 2229, 2229, 2229, 2276, 2415, 2430, 2430, 2480, 2442, 2482, 2528,\n", - " 2851, 2893, 3152, 2986, 3075, 3184, 3342, 3289, 3349, 3349, 3459, 3646,\n", - " 3702, 3737, 3744, 3893, 3884, 3810, 4111, 4172, 3794, 4096, 4157, 4058,\n", - " 4299, 4234, 4145, 4401, 4391, 4377, 4456, 4512, 4682, 4657, 4783, 4846,\n", - " 4952, 4970, 4898, 4977, 5030, 4891, 4891, 4891, 5327, 5206, 5265, 5245,\n", - " 5245, 5109, 5004, 5248, 5012, 5415, 5642, 5642, 5712, 5545, 5640, 5640,\n", - " 5568, 5568, 5816, 5748, 5527, 5462, 5957, 5957, 5905, 5905, 5978, 6135,\n", - " 6135, 5783, 6046, 6046, 6290, 6242, 6242, 6242, 6477, 6329, 6216, 6477,\n", - " 6400, 6391, 6508, 6337, 6389, 6389, 6557, 6148, 6148, 6437, 6286, 6286,\n", - " 6332],\n", - " [ 77, 39, 47, 86, 0, 5, 87, 60, 9, 102, 3, 90,\n", - " 8, 18, 8, 60, 4, 71, 9, 60, 102, 82, 96, 95,\n", - " 9, 43, 103, 35, 60, 39, 23, 98, 99, 99, 88, 60,\n", - " 20, 99, 33, 15, 57, 61, 100, 46, 23, 84, 29, 12,\n", - " 27, 49, 16, 8, 67, 28, 56, 48, 83, 24, 40, 65,\n", - " 73, 65, 20, 21, 58, 99, 105, 86, 42, 46, 20, 25,\n", - " 31, 63, 66, 92, 16, 2, 87, 50, 89, 2, 1, 23,\n", - " 54, 89, 52, 43, 45, 13, 49, 8, 52, 25, 74, 61,\n", - " 16, 62, 9, 9, 80, 58, 8, 17, 79, 14, 38, 9,\n", - " 73, 73, 89, 44, 20, 32, 46, 43, 13, 49, 49, 25,\n", - " 69, 97, 69, 94, 87, 87, 7, 70, 41, 86, 11, 60,\n", - " 76, 60, 93, 60, 72, 47, 54, 8, 68, 2, 81, 25,\n", - " 71, 9, 36, 91, 64, 104, 60, 48, 27, 75, 16, 44,\n", - " 59, 37, 98, 10, 101, 16, 63, 22, 78, 56, 6, 42,\n", - " 62, 19, 85, 51, 60, 30, 84, 26, 34, 94, 60, 55,\n", - " 53]], device='cuda:0'), ('paper', 'cites_bw', 'paper'): tensor([[3357, 224, 1781, ..., 99, 1606, 1786],\n", - " [ 11, 115, 184, ..., 6246, 6246, 6246]], device='cuda:0'), ('institution', 'affiliated_with_bw', 'author'): tensor([[ 61, 31, 86, ..., 47, 8, 31],\n", - " [ 108, 123, 61, ..., 6546, 6505, 6373]], device='cuda:0'), ('paper', 'has_topic', 'field_of_study'): tensor([[ 151, 99, 99, ..., 6246, 6246, 6246],\n", - " [ 771, 202, 218, ..., 48, 745, 616]], device='cuda:0'), ('field_of_study', 'has_topic_bw', 'paper'): tensor([[ 610, 503, 287, ..., 218, 303, 33],\n", - " [ 75, 271, 347, ..., 6122, 6205, 6189]], device='cuda:0'), ('paper', 'writes_bw', 'author'): tensor([[4212, 1442, 2831, ..., 5543, 5482, 760],\n", - " [ 95, 0, 182, ..., 6426, 6506, 6547]], device='cuda:0'), ('paper', 'cites', 'paper'): tensor([[ 99, 99, 99, ..., 6246, 6246, 6151],\n", - " [ 529, 396, 420, ..., 1786, 513, 4956]], device='cuda:0'), ('author', 'writes', 'paper'): tensor([[ 6, 6, 7, ..., 6506, 6506, 6506],\n", - " [1233, 5617, 904, ..., 5360, 5348, 5479]], device='cuda:0')}\n", - "edge typess: [('author', 'writes', 'paper'), ('paper', 'cites_bw', 'paper'), ('paper', 'writes_bw', 'author'), ('paper', 'cites', 'paper'), ('institution', 'affiliated_with_bw', 'author'), ('field_of_study', 'has_topic_bw', 'paper'), ('author', 'affiliated_with', 'institution'), ('paper', 'has_topic', 'field_of_study')]\n", - "first half 0.006451\n", - "sampling 0.006297\n", - "noi time: 0.001948\n" - ] - }, - { - "ename": "KeyboardInterrupt", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", - "\u001b[1;32m/work/testing/pyg_multi_gpu2.ipynb Cell 14\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 68\u001b[0m \u001b[39mfor\u001b[39;00m epoch \u001b[39min\u001b[39;00m \u001b[39mrange\u001b[39m(\u001b[39m1\u001b[39m, \u001b[39m101\u001b[39m):\n\u001b[1;32m 69\u001b[0m loss \u001b[39m=\u001b[39m train()\n\u001b[0;32m---> 70\u001b[0m train_acc \u001b[39m=\u001b[39m test()\n\u001b[1;32m 71\u001b[0m \u001b[39mprint\u001b[39m(\u001b[39mf\u001b[39m\u001b[39m'\u001b[39m\u001b[39mEpoch: \u001b[39m\u001b[39m{\u001b[39;00mepoch\u001b[39m:\u001b[39;00m\u001b[39m03d\u001b[39m\u001b[39m}\u001b[39;00m\u001b[39m, Loss: \u001b[39m\u001b[39m{\u001b[39;00mloss\u001b[39m:\u001b[39;00m\u001b[39m.4f\u001b[39m\u001b[39m}\u001b[39;00m\u001b[39m, Train: \u001b[39m\u001b[39m{\u001b[39;00mtrain_acc\u001b[39m:\u001b[39;00m\u001b[39m.4f\u001b[39m\u001b[39m}\u001b[39;00m\u001b[39m'\u001b[39m)\n", - "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/torch/autograd/grad_mode.py:27\u001b[0m, in \u001b[0;36m_DecoratorContextManager.__call__..decorate_context\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 24\u001b[0m \u001b[39m@functools\u001b[39m\u001b[39m.\u001b[39mwraps(func)\n\u001b[1;32m 25\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mdecorate_context\u001b[39m(\u001b[39m*\u001b[39margs, \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs):\n\u001b[1;32m 26\u001b[0m \u001b[39mwith\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mclone():\n\u001b[0;32m---> 27\u001b[0m \u001b[39mreturn\u001b[39;00m func(\u001b[39m*\u001b[39;49margs, \u001b[39m*\u001b[39;49m\u001b[39m*\u001b[39;49mkwargs)\n", - "\u001b[1;32m/work/testing/pyg_multi_gpu2.ipynb Cell 14\u001b[0m in \u001b[0;36mtest\u001b[0;34m()\u001b[0m\n\u001b[1;32m 58\u001b[0m acc \u001b[39m=\u001b[39m \u001b[39m0.0\u001b[39m\n\u001b[1;32m 59\u001b[0m \u001b[39mfor\u001b[39;00m _ \u001b[39min\u001b[39;00m \u001b[39mrange\u001b[39m(\u001b[39m2\u001b[39m\u001b[39m*\u001b[39mnum_batches):\n\u001b[0;32m---> 60\u001b[0m data \u001b[39m=\u001b[39m \u001b[39mnext\u001b[39;49m(test_iter)\n\u001b[1;32m 61\u001b[0m pred \u001b[39m=\u001b[39m model(data\u001b[39m.\u001b[39mx_dict, data\u001b[39m.\u001b[39medge_index_dict)\u001b[39m.\u001b[39margmax(dim\u001b[39m=\u001b[39m\u001b[39m-\u001b[39m\u001b[39m1\u001b[39m)\n\u001b[1;32m 64\u001b[0m acc \u001b[39m+\u001b[39m\u001b[39m=\u001b[39m (pred \u001b[39m==\u001b[39m data[\u001b[39m'\u001b[39m\u001b[39mpaper\u001b[39m\u001b[39m'\u001b[39m]\u001b[39m.\u001b[39my)\u001b[39m.\u001b[39msum() \u001b[39m/\u001b[39m \u001b[39mlen\u001b[39m(data[\u001b[39m'\u001b[39m\u001b[39mpaper\u001b[39m\u001b[39m'\u001b[39m])\n", - "File \u001b[0;32m/work/pytorch_geometric/torch_geometric/loader/base.py:36\u001b[0m, in \u001b[0;36mDataLoaderIterator.__next__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 35\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39m__next__\u001b[39m(\u001b[39mself\u001b[39m) \u001b[39m-\u001b[39m\u001b[39m>\u001b[39m Any:\n\u001b[0;32m---> 36\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mtransform_fn(\u001b[39mnext\u001b[39;49m(\u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49miterator))\n", - "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/torch/utils/data/dataloader.py:530\u001b[0m, in \u001b[0;36m_BaseDataLoaderIter.__next__\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 528\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_sampler_iter \u001b[39mis\u001b[39;00m \u001b[39mNone\u001b[39;00m:\n\u001b[1;32m 529\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_reset()\n\u001b[0;32m--> 530\u001b[0m data \u001b[39m=\u001b[39m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_next_data()\n\u001b[1;32m 531\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_num_yielded \u001b[39m+\u001b[39m\u001b[39m=\u001b[39m \u001b[39m1\u001b[39m\n\u001b[1;32m 532\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_dataset_kind \u001b[39m==\u001b[39m _DatasetKind\u001b[39m.\u001b[39mIterable \u001b[39mand\u001b[39;00m \\\n\u001b[1;32m 533\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_IterableDataset_len_called \u001b[39mis\u001b[39;00m \u001b[39mnot\u001b[39;00m \u001b[39mNone\u001b[39;00m \u001b[39mand\u001b[39;00m \\\n\u001b[1;32m 534\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_num_yielded \u001b[39m>\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_IterableDataset_len_called:\n", - "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/torch/utils/data/dataloader.py:570\u001b[0m, in \u001b[0;36m_SingleProcessDataLoaderIter._next_data\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 568\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39m_next_data\u001b[39m(\u001b[39mself\u001b[39m):\n\u001b[1;32m 569\u001b[0m index \u001b[39m=\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_next_index() \u001b[39m# may raise StopIteration\u001b[39;00m\n\u001b[0;32m--> 570\u001b[0m data \u001b[39m=\u001b[39m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_dataset_fetcher\u001b[39m.\u001b[39;49mfetch(index) \u001b[39m# may raise StopIteration\u001b[39;00m\n\u001b[1;32m 571\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_pin_memory:\n\u001b[1;32m 572\u001b[0m data \u001b[39m=\u001b[39m _utils\u001b[39m.\u001b[39mpin_memory\u001b[39m.\u001b[39mpin_memory(data)\n", - "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py:52\u001b[0m, in \u001b[0;36m_MapDatasetFetcher.fetch\u001b[0;34m(self, possibly_batched_index)\u001b[0m\n\u001b[1;32m 50\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[1;32m 51\u001b[0m data \u001b[39m=\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mdataset[possibly_batched_index]\n\u001b[0;32m---> 52\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mcollate_fn(data)\n", - "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/cugraph-22.6.0a0+268.g0bbf2c8b.dirty-py3.9-linux-x86_64.egg/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py:257\u001b[0m, in \u001b[0;36mCuGraphLinkNeighborLoader.collate_fn\u001b[0;34m(self, index)\u001b[0m\n\u001b[1;32m 256\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mcollate_fn\u001b[39m(\u001b[39mself\u001b[39m, index: Union[List[\u001b[39mint\u001b[39m], Tensor]) \u001b[39m-\u001b[39m\u001b[39m>\u001b[39m Any:\n\u001b[0;32m--> 257\u001b[0m out \u001b[39m=\u001b[39m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mneighbor_sampler(index)\n\u001b[1;32m 258\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mfilter_per_worker:\n\u001b[1;32m 259\u001b[0m \u001b[39m# We execute `filter_fn` in the worker process.\u001b[39;00m\n\u001b[1;32m 260\u001b[0m out \u001b[39m=\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mfilter_fn(out)\n", - "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/cugraph-22.6.0a0+268.g0bbf2c8b.dirty-py3.9-linux-x86_64.egg/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py:97\u001b[0m, in \u001b[0;36mCuGraphLinkNeighborSampler.__call__\u001b[0;34m(self, query)\u001b[0m\n\u001b[1;32m 94\u001b[0m query_nodes, reverse \u001b[39m=\u001b[39m query_nodes\u001b[39m.\u001b[39munique(return_inverse\u001b[39m=\u001b[39m\u001b[39mTrue\u001b[39;00m)\n\u001b[1;32m 95\u001b[0m edge_label_index \u001b[39m=\u001b[39m reverse\u001b[39m.\u001b[39mview(\u001b[39m2\u001b[39m, \u001b[39m-\u001b[39m\u001b[39m1\u001b[39m)\n\u001b[0;32m---> 97\u001b[0m out \u001b[39m=\u001b[39m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mgraph_store\u001b[39m.\u001b[39;49mneighbor_sample(\n\u001b[1;32m 98\u001b[0m query_nodes,\n\u001b[1;32m 99\u001b[0m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mnum_neighbors,\n\u001b[1;32m 100\u001b[0m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mreplace,\n\u001b[1;32m 101\u001b[0m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mdirected,\n\u001b[1;32m 102\u001b[0m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49medge_types\n\u001b[1;32m 103\u001b[0m )\n\u001b[1;32m 105\u001b[0m \u001b[39m# Call cuGraph sampler\u001b[39;00m\n\u001b[1;32m 106\u001b[0m \u001b[39mreturn\u001b[39;00m out \u001b[39m+\u001b[39m (edge_label_index, edge_label)\n", - "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/torch/autograd/grad_mode.py:27\u001b[0m, in \u001b[0;36m_DecoratorContextManager.__call__..decorate_context\u001b[0;34m(*args, **kwargs)\u001b[0m\n\u001b[1;32m 24\u001b[0m \u001b[39m@functools\u001b[39m\u001b[39m.\u001b[39mwraps(func)\n\u001b[1;32m 25\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mdecorate_context\u001b[39m(\u001b[39m*\u001b[39margs, \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwargs):\n\u001b[1;32m 26\u001b[0m \u001b[39mwith\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39mclone():\n\u001b[0;32m---> 27\u001b[0m \u001b[39mreturn\u001b[39;00m func(\u001b[39m*\u001b[39;49margs, \u001b[39m*\u001b[39;49m\u001b[39m*\u001b[39;49mkwargs)\n", - "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/cugraph-22.6.0a0+268.g0bbf2c8b.dirty-py3.9-linux-x86_64.egg/cugraph/gnn/pyg_extensions/data/cugraph_store.py:236\u001b[0m, in \u001b[0;36mCuGraphStore.neighbor_sample\u001b[0;34m(self, index, num_neighbors, replace, directed, edge_types)\u001b[0m\n\u001b[1;32m 233\u001b[0m \u001b[39mprint\u001b[39m(\u001b[39m'\u001b[39m\u001b[39mnoi time:\u001b[39m\u001b[39m'\u001b[39m, (noi_end \u001b[39m-\u001b[39m noi_start)\u001b[39m.\u001b[39mtotal_seconds())\n\u001b[1;32m 235\u001b[0m gd_start \u001b[39m=\u001b[39m datetime\u001b[39m.\u001b[39mnow()\n\u001b[0;32m--> 236\u001b[0m noi \u001b[39m=\u001b[39m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m__graph\u001b[39m.\u001b[39;49mget_vertex_data(\n\u001b[1;32m 237\u001b[0m nodes_of_interest\u001b[39m.\u001b[39;49mcompute() \u001b[39mif\u001b[39;49;00m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49mis_mg \u001b[39melse\u001b[39;49;00m nodes_of_interest,\n\u001b[1;32m 238\u001b[0m columns\u001b[39m=\u001b[39;49m[\u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m__graph\u001b[39m.\u001b[39;49mvertex_col_name, \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m__graph\u001b[39m.\u001b[39;49mtype_col_name]\n\u001b[1;32m 239\u001b[0m )\n\u001b[1;32m 241\u001b[0m gd_end \u001b[39m=\u001b[39m datetime\u001b[39m.\u001b[39mnow()\n\u001b[1;32m 242\u001b[0m \u001b[39mprint\u001b[39m(\u001b[39m'\u001b[39m\u001b[39mget_vertex_data call:\u001b[39m\u001b[39m'\u001b[39m, (gd_end \u001b[39m-\u001b[39m gd_start)\u001b[39m.\u001b[39mtotal_seconds())\n", - "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/cugraph-22.6.0a0+268.g0bbf2c8b.dirty-py3.9-linux-x86_64.egg/cugraph/structure/property_graph.py:457\u001b[0m, in \u001b[0;36mEXPERIMENTAL__PropertyGraph.get_vertex_data\u001b[0;34m(self, vertex_ids, types, columns)\u001b[0m\n\u001b[1;32m 452\u001b[0m \u001b[39mif\u001b[39;00m vertex_ids \u001b[39mis\u001b[39;00m \u001b[39mnot\u001b[39;00m \u001b[39mNone\u001b[39;00m:\n\u001b[1;32m 453\u001b[0m df_mask \u001b[39m=\u001b[39m (\n\u001b[1;32m 454\u001b[0m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m__vertex_prop_dataframe[\u001b[39mself\u001b[39m\u001b[39m.\u001b[39mvertex_col_name]\n\u001b[1;32m 455\u001b[0m \u001b[39m.\u001b[39misin(vertex_ids)\n\u001b[1;32m 456\u001b[0m )\n\u001b[0;32m--> 457\u001b[0m df \u001b[39m=\u001b[39m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m__vertex_prop_dataframe\u001b[39m.\u001b[39;49mloc[df_mask]\n\u001b[1;32m 458\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[1;32m 459\u001b[0m df \u001b[39m=\u001b[39m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m__vertex_prop_dataframe\n", - "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/cudf/core/dataframe.py:145\u001b[0m, in \u001b[0;36m_DataFrameIndexer.__getitem__\u001b[0;34m(self, arg)\u001b[0m\n\u001b[1;32m 143\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mnot\u001b[39;00m \u001b[39misinstance\u001b[39m(arg, \u001b[39mtuple\u001b[39m):\n\u001b[1;32m 144\u001b[0m arg \u001b[39m=\u001b[39m (arg, \u001b[39mslice\u001b[39m(\u001b[39mNone\u001b[39;00m))\n\u001b[0;32m--> 145\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_getitem_tuple_arg(arg)\n", - "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/contextlib.py:79\u001b[0m, in \u001b[0;36mContextDecorator.__call__..inner\u001b[0;34m(*args, **kwds)\u001b[0m\n\u001b[1;32m 76\u001b[0m \u001b[39m@wraps\u001b[39m(func)\n\u001b[1;32m 77\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39minner\u001b[39m(\u001b[39m*\u001b[39margs, \u001b[39m*\u001b[39m\u001b[39m*\u001b[39mkwds):\n\u001b[1;32m 78\u001b[0m \u001b[39mwith\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_recreate_cm():\n\u001b[0;32m---> 79\u001b[0m \u001b[39mreturn\u001b[39;00m func(\u001b[39m*\u001b[39;49margs, \u001b[39m*\u001b[39;49m\u001b[39m*\u001b[39;49mkwds)\n", - "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/cudf/core/dataframe.py:285\u001b[0m, in \u001b[0;36m_DataFrameLocIndexer._getitem_tuple_arg\u001b[0;34m(self, arg)\u001b[0m\n\u001b[1;32m 282\u001b[0m tmp_arg \u001b[39m=\u001b[39m (as_column(tmp_arg[\u001b[39m0\u001b[39m]), tmp_arg[\u001b[39m1\u001b[39m])\n\u001b[1;32m 284\u001b[0m \u001b[39mif\u001b[39;00m is_bool_dtype(tmp_arg[\u001b[39m0\u001b[39m]):\n\u001b[0;32m--> 285\u001b[0m df \u001b[39m=\u001b[39m columns_df\u001b[39m.\u001b[39;49m_apply_boolean_mask(tmp_arg[\u001b[39m0\u001b[39;49m])\n\u001b[1;32m 286\u001b[0m \u001b[39melse\u001b[39;00m:\n\u001b[1;32m 287\u001b[0m tmp_col_name \u001b[39m=\u001b[39m \u001b[39mstr\u001b[39m(uuid4())\n", - "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/cudf/core/indexed_frame.py:2546\u001b[0m, in \u001b[0;36mIndexedFrame._apply_boolean_mask\u001b[0;34m(self, boolean_mask)\u001b[0m\n\u001b[1;32m 2542\u001b[0m \u001b[39mif\u001b[39;00m \u001b[39mnot\u001b[39;00m is_bool_dtype(boolean_mask\u001b[39m.\u001b[39mdtype):\n\u001b[1;32m 2543\u001b[0m \u001b[39mraise\u001b[39;00m \u001b[39mValueError\u001b[39;00m(\u001b[39m\"\u001b[39m\u001b[39mboolean_mask is not boolean type.\u001b[39m\u001b[39m\"\u001b[39m)\n\u001b[1;32m 2545\u001b[0m \u001b[39mreturn\u001b[39;00m \u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_from_columns_like_self(\n\u001b[0;32m-> 2546\u001b[0m libcudf\u001b[39m.\u001b[39;49mstream_compaction\u001b[39m.\u001b[39;49mapply_boolean_mask(\n\u001b[1;32m 2547\u001b[0m \u001b[39mlist\u001b[39;49m(\u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_index\u001b[39m.\u001b[39;49m_columns \u001b[39m+\u001b[39;49m \u001b[39mself\u001b[39;49m\u001b[39m.\u001b[39;49m_columns), boolean_mask\n\u001b[1;32m 2548\u001b[0m ),\n\u001b[1;32m 2549\u001b[0m column_names\u001b[39m=\u001b[39m\u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_column_names,\n\u001b[1;32m 2550\u001b[0m index_names\u001b[39m=\u001b[39m\u001b[39mself\u001b[39m\u001b[39m.\u001b[39m_index\u001b[39m.\u001b[39mnames,\n\u001b[1;32m 2551\u001b[0m )\n", - "File \u001b[0;32mstream_compaction.pyx:107\u001b[0m, in \u001b[0;36mcudf._lib.stream_compaction.apply_boolean_mask\u001b[0;34m()\u001b[0m\n", - "File \u001b[0;32mutils.pyx:244\u001b[0m, in \u001b[0;36mcudf._lib.utils.columns_from_unique_ptr\u001b[0;34m()\u001b[0m\n", - "File \u001b[0;32mcolumn.pyx:457\u001b[0m, in \u001b[0;36mcudf._lib.column.Column.from_unique_ptr\u001b[0;34m()\u001b[0m\n", - "File \u001b[0;32mdevice_buffer.pyx:136\u001b[0m, in \u001b[0;36mrmm._lib.device_buffer.DeviceBuffer.c_from_unique_ptr\u001b[0;34m()\u001b[0m\n", - "File \u001b[0;32mdevice_buffer.pyx:96\u001b[0m, in \u001b[0;36mrmm._lib.device_buffer.DeviceBuffer.__cinit__\u001b[0;34m()\u001b[0m\n", - "File \u001b[0;32mmemory_resource.pyx:964\u001b[0m, in \u001b[0;36mrmm._lib.memory_resource.get_current_device_resource\u001b[0;34m()\u001b[0m\n", - "File \u001b[0;32m/opt/conda/envs/rapids/lib/python3.9/site-packages/rmm/_cuda/gpu.py:53\u001b[0m, in \u001b[0;36mgetDevice\u001b[0;34m()\u001b[0m\n\u001b[1;32m 49\u001b[0m \u001b[39mraise\u001b[39;00m CUDARuntimeError(status)\n\u001b[1;32m 50\u001b[0m \u001b[39mreturn\u001b[39;00m version\n\u001b[0;32m---> 53\u001b[0m \u001b[39mdef\u001b[39;00m \u001b[39mgetDevice\u001b[39m():\n\u001b[1;32m 54\u001b[0m \u001b[39m\"\"\"\u001b[39;00m\n\u001b[1;32m 55\u001b[0m \u001b[39m Get the current CUDA device\u001b[39;00m\n\u001b[1;32m 56\u001b[0m \u001b[39m \"\"\"\u001b[39;00m\n\u001b[1;32m 57\u001b[0m status, device \u001b[39m=\u001b[39m cudart\u001b[39m.\u001b[39mcudaGetDevice()\n", - "\u001b[0;31mKeyboardInterrupt\u001b[0m: " - ] - } - ], + "outputs": [], "source": [ "import torch\n", "import torch.nn.functional as F\n", From 8b1ec2d54430d22ad8354dc9af1e9cead74c4629 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Thu, 11 Aug 2022 22:40:36 +0000 Subject: [PATCH 47/71] remove cudf storage --- .../gnn/pyg_extensions/data/cudf_storage.py | 258 ------------------ 1 file changed, 258 deletions(-) delete mode 100644 python/cugraph/cugraph/gnn/pyg_extensions/data/cudf_storage.py diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cudf_storage.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cudf_storage.py deleted file mode 100644 index 21aac69c3ad..00000000000 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cudf_storage.py +++ /dev/null @@ -1,258 +0,0 @@ -from typing import Any, List -from collections.abc import Mapping - -import torch -from torch import Tensor -from torch import device as TorchDevice - -from torch_geometric.data.storage import EdgeStorage, NodeStorage - -import cudf -import cupy - - -class CudfStorage(): - """ - Should be compatible with both cudf and dask_cudf - """ - def __init__( - self, - dataframe: cudf.DataFrame=cudf.DataFrame(), - device: TorchDevice=TorchDevice('cpu'), - parent:Any=None, - reserved_keys:list=[], - cached_keys:list=['x','y'], - **kwargs): - self._data = dataframe - self._parent = parent - self.__device = device - self.__reserved_keys = list(reserved_keys) - self.__cached_keys = list(cached_keys) - self.__x_cupy = None - self.__feature_names=None - - @property - def device(self): - return self.__device - - @property - def _reserved_keys(self): - return self.__reserved_keys - - @property - def _cached_keys(self): - return self.__cached_keys - - @property - def _feature_names(self) -> List[str]: - if self.__feature_names is None: - self.__feature_names = self.__remove_internal_columns(self._data.columns, ['y']) - - return self.__feature_names - - def to(self, to_device: TorchDevice): - return CudfStorage( - self._data, - device=to_device, - parent=self._parent(), - reserved_keys=self.__reserved_keys, - cached_keys=self.__cached_keys - ) - - def __getattr__(self, key:str) -> Any: - if key in self.__dict__: - return self.__dict__[key] - - elif key in self._data: - if ('__' + key) not in self.__dict__: - t = torch.from_dlpack(self._data[key].to_dlpack()) - if self.__device != t.device: - t = t.to(self.__device) - if key in self.__cached_keys: - self.__dict__['__' + key] = t - return t - return self.__dict__['__' + key] - - elif key == 'x': - x = torch.from_dlpack(self._x_cupy.toDlpack()) - if self.__device != x.device: - x = x.to(self.__device) - return x - - raise AttributeError(key) - - def __getitem__(self, key:str) -> Any: - return getattr(self, key) - - @property - def _x_cupy(self) -> cupy.array: - if self.__x_cupy is None: - all_keys = list(self._data.columns) - for k in self.__reserved_keys + ['y']: - if k in list(all_keys): - all_keys.remove(k) - - x_cupy = self._data[all_keys].to_cupy(dtype='float32') - if 'x' in self.__cached_keys: - self.__x_cupy = x_cupy - return x_cupy - else: - return self.__x_cupy - - @property - def shape(self) -> tuple: - return self._data.shape - - @property - def num_features(self) -> int: - feature_count = self.shape[1] - for k in self.__reserved_keys: - if k in list(self._data.columns): - feature_count -= 1 - - return feature_count - - def __remove_internal_columns(self, input_cols, additional_columns_to_remove=[]): - internal_columns = self.__reserved_keys + additional_columns_to_remove - - # Create a list of user-visible columns by removing the internals while - # preserving order - output_cols = list(input_cols) - for col_name in internal_columns: - if col_name in output_cols: - output_cols.remove(col_name) - - return output_cols - - def __repr__(self) -> str: - return f'cudf storage ({self.shape[0]}x{self.shape[1]})' - - -class CudfNodeStorage(CudfStorage, NodeStorage): - def __init__(self, dataframe: cudf.DataFrame, device: TorchDevice=TorchDevice('cpu'), parent:Any=None, vertex_col_name='v', reserved_keys:list=[], key=None, **kwargs): - super().__init__(dataframe=dataframe, device=device, parent=parent, reserved_keys=reserved_keys, **kwargs) - - self.__vertex_col_name = vertex_col_name - self.__key = key - - @property - def _key(self): - return self.__key - - @property - def num_nodes(self): - return self.shape[0] - - @property - def num_node_features(self) -> int: - feature_count = self.num_features - if 'y' in list(self._data.columns): - feature_count -= 1 - return feature_count - - @property - def node_index(self) -> Tensor: - return self[self.__vertex_col_name].to(torch.long) - - def node_feature_names(self) -> List[str]: - return self._feature_names - - def to(self, to_device: TorchDevice): - return CudfNodeStorage( - dataframe=self._data, - device=to_device, - parent=self._parent(), - reserved_keys=self._reserved_keys, - vertex_col_name=self.__vertex_col_name, - key=self.__key, - cached_keys=self._cached_keys - ) - - def keys(self, *args): - key_list = [ - 'num_nodes', - 'num_node_features', - 'node_index', - 'x', - 'y', - ] - - for a in args: - key_list.remove(a) - - return key_list - - @property - def _mapping(self) -> Mapping: - mapping = {} - - for k in self.keys(): - mapping[k] = self[k] - - return mapping - - -class CudfEdgeStorage(CudfStorage, EdgeStorage): - def __init__(self, dataframe: cudf.DataFrame, device: TorchDevice=TorchDevice('cpu'), parent:Any=None, src_col_name='src', dst_col_name='dst', reserved_keys:list=[], key=None, **kwargs): - super().__init__(dataframe=dataframe, device=device, parent=parent, reserved_keys=reserved_keys, **kwargs) - - self.__src_col_name = src_col_name - self.__dst_col_name = dst_col_name - self.__key = key - - @property - def _key(self): - return self.__key - - @property - def num_edges(self): - return self.shape[0] - - @property - def num_edge_features(self) -> int: - return self.num_features - - @property - def edge_index(self) -> Tensor: - src = self[self.__src_col_name].to(torch.long) - dst = self[self.__dst_col_name].to(torch.long) - assert src.shape[0] == dst.shape[0] - - # dst/src are flipped in PyG - return torch.concat([dst,src]).reshape((2,src.shape[0])) - - def edge_feature_names(self) -> List[str]: - return self._feature_names - - def to(self, to_device: TorchDevice): - return CudfEdgeStorage( - dataframe=self._data, - device=to_device, - parent=self._parent(), - reserved_keys=self._reserved_keys, - src_col_name=self.__src_col_name, - dst_col_name=self.__dst_col_name, - key=self.__key, - cached_keys=self._cached_keys - ) - - def keys(self, *args): - key_list = [ - 'num_edges', - 'num_edge_features', - 'edge_index', - ] - - for a in args: - key_list.remove(a) - - return key_list - - @property - def _mapping(self) -> Mapping: - mapping = {} - - for k in self.keys(): - mapping[k] = self[k] - - return mapping From ffb12762dcedb1a70494a438ebb3071427c00bd4 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Tue, 16 Aug 2022 20:09:06 +0000 Subject: [PATCH 48/71] unit tests for sg --- =1.17 | 31 + conda/environments/cugraph_dev_cuda11.5.yml | 1 - .../cugraph/gnn/pyg_extensions/__init__.py | 6 +- .../gnn/pyg_extensions/data/__init__.py | 18 +- .../gnn/pyg_extensions/data/cugraph_store.py | 493 ++++++++++++---- python/cugraph/cugraph/tests/test_egonet.py | 1 + .../cugraph/tests/test_pyg_extensions.py | 535 ++++++++++++++++++ 7 files changed, 959 insertions(+), 126 deletions(-) create mode 100644 =1.17 create mode 100644 python/cugraph/cugraph/tests/test_pyg_extensions.py diff --git a/=1.17 b/=1.17 new file mode 100644 index 00000000000..49ef6c46d46 --- /dev/null +++ b/=1.17 @@ -0,0 +1,31 @@ +Collecting package metadata (current_repodata.json): ...working... done +Solving environment: ...working... done + +## Package Plan ## + + environment location: /opt/conda/envs/rapids + + added / updated specs: + - cub + + +The following packages will be downloaded: + + package | build + ---------------------------|----------------- + cub-1.16.0 | h0800d71_1 256 KB conda-forge + ------------------------------------------------------------ + Total: 256 KB + +The following NEW packages will be INSTALLED: + + cub conda-forge/linux-64::cub-1.16.0-h0800d71_1 + + +Proceed ([y]/n)? + +Downloading and Extracting Packages + cub-1.16.0 | 256 KB | | 0% cub-1.16.0 | 256 KB | 6 | 6% cub-1.16.0 | 256 KB | ########## | 100% +Preparing transaction: ...working... done +Verifying transaction: ...working... done +Executing transaction: ...working... done diff --git a/conda/environments/cugraph_dev_cuda11.5.yml b/conda/environments/cugraph_dev_cuda11.5.yml index 8337e12e5f5..42dae9e7f90 100644 --- a/conda/environments/cugraph_dev_cuda11.5.yml +++ b/conda/environments/cugraph_dev_cuda11.5.yml @@ -13,7 +13,6 @@ dependencies: - libcudf=22.10.* - rmm=22.10.* - librmm=22.10.* -- libraft-headers=22.10.* - pyraft=22.10.* - cuda-python>=11.5,<11.7.1 - dask>=2022.7.1 diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/__init__.py b/python/cugraph/cugraph/gnn/pyg_extensions/__init__.py index 76d5991bb2f..eb3c44b24ac 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/__init__.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/__init__.py @@ -1,5 +1 @@ -from cugraph.gnn.pyg_extensions.data import CuGraphData -from cugraph.gnn.pyg_extensions.data import GaasData -from cugraph.gnn.pyg_extensions.data import TorchTensorGaasGraphDataProxy -from cugraph.gnn.pyg_extensions.loader import CuGraphLinkNeighborLoader -from cugraph.gnn.pyg_extensions.loader import CuGraphNeighborLoader \ No newline at end of file +from cugraph.gnn.pyg_extensions.data import to_pyg diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/__init__.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/__init__.py index 0190a5f8468..8e39d8e7cb6 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/__init__.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/__init__.py @@ -1,9 +1,9 @@ -from cugraph.gnn.pyg_extensions.data.cugraph_store import CuGraphStore -from cugraph.gnn.pyg_extensions.data.cugraph_store import CuGraphFeatureStore -from cugraph.gnn.pyg_extensions.data.cugraph_store import to_pyg -from cugraph.gnn.pyg_extensions.data.cugraph_data import CuGraphData -from cugraph.gnn.pyg_extensions.data.gaas_data import GaasData -from cugraph.gnn.pyg_extensions.data.gaas_storage import TorchTensorGaasGraphDataProxy -from cugraph.gnn.pyg_extensions.data.cudf_storage import CudfNodeStorage -from cugraph.gnn.pyg_extensions.data.cudf_storage import CudfEdgeStorage -from cugraph.gnn.pyg_extensions.data.cudf_storage import CudfStorage +from cugraph.utilities.api_tools import experimental_warning_wrapper + +from cugraph.gnn.pyg_extensions.data.cugraph_store import EXPERIMENTAL__CuGraphStore +from cugraph.gnn.pyg_extensions.data.cugraph_store import EXPERIMENTAL__CuGraphFeatureStore +from cugraph.gnn.pyg_extensions.data.cugraph_store import EXPERIMENTAL__to_pyg + +CuGraphStore = experimental_warning_wrapper(EXPERIMENTAL__CuGraphStore) +CuGraphFeatureStore = experimental_warning_wrapper(EXPERIMENTAL__CuGraphFeatureStore) +to_pyg = experimental_warning_wrapper(EXPERIMENTAL__to_pyg) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py index 6f6cea4e5b9..7a2491ed9a8 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py @@ -1,42 +1,177 @@ -from re import I from cugraph.experimental import PropertyGraph from cugraph.experimental import MGPropertyGraph -from torch_geometric.data.feature_store import ( - FeatureStore, - TensorAttr -) -from torch_geometric.data.graph_store import ( - GraphStore, - EdgeAttr, - EdgeLayout -) - from typing import List, Optional, Tuple, Any -from torch_geometric.typing import ( - FeatureTensorType, - EdgeTensorType -) - -from torch_geometric.loader.utils import edge_type_to_str +from enum import Enum -import torch import cupy import cudf import dask_cudf import cugraph -from datetime import datetime - -def to_pyg(G: PropertyGraph): - return CuGraphFeatureStore(G), CuGraphStore(G) -class CuGraphStore(GraphStore): - def __init__(self, G): +from datetime import datetime +from dataclasses import dataclass + +class EdgeLayout(Enum): + COO = 'coo' + CSC = 'csc' + CSR = 'csr' + + +@dataclass +class CuGraphEdgeAttr: + r"""Defines the attributes of an :obj:`GraphStore` edge.""" + + # The type of the edge + edge_type: Optional[Any] + + # The layout of the edge representation + layout: EdgeLayout + + # Whether the edge index is sorted, by destination node. Useful for + # avoiding sorting costs when performing neighbor sampling, and only + # meaningful for COO (CSC and CSR are sorted by definition) + is_sorted: bool = False + + # The number of nodes in this edge type. If set to None, will attempt to + # infer with the simple heuristic int(self.edge_index.max()) + 1 + size: Optional[Tuple[int, int]] = None + + # NOTE we define __init__ to force-cast layout + def __init__( + self, + edge_type: Optional[Any], + layout: EdgeLayout, + is_sorted: bool = False, + size: Optional[Tuple[int, int]] = None, + ): + self.edge_type = edge_type + self.layout = EdgeLayout(layout) + self.is_sorted = is_sorted + self.size = size + + @classmethod + def cast(cls, *args, **kwargs): + if len(args) == 1 and len(kwargs) == 0: + elem = args[0] + if elem is None: + return None + if isinstance(elem, CuGraphEdgeAttr): + return elem + if isinstance(elem, (tuple, list)): + return cls(*elem) + if isinstance(elem, dict): + return cls(**elem) + return cls(*args, **kwargs) + +def EXPERIMENTAL__to_pyg(G, backend='torch'): + """ + Returns the PyG wrappers for the provided PropertyGraph or + MGPropertyGraph. + + Parameters + ---------- + G : PropertyGraph or MGPropertyGraph + The graph to produce PyG wrappers for. + + Returns + ------- + Tuple (CuGraphFeatureStore, CuGraphStore) + Wrappers for the provided property graph. + """ + return EXPERIMENTAL__CuGraphFeatureStore(G, backend=backend), EXPERIMENTAL__CuGraphStore(G, backend=backend) + +_field_status = Enum("FieldStatus", "UNSET") + +@dataclass +class CuGraphTensorAttr: + r"""Defines the attributes of a class:`FeatureStore` tensor; in particular, + all the parameters necessary to uniquely identify a tensor from the feature + store. + + Note that the order of the attributes is important; this is the order in + which attributes must be provided for indexing calls. Feature store + implementor classes can define a different ordering by overriding + :meth:`TensorAttr.__init__`. + """ + + # The group name that the tensor corresponds to. Defaults to UNSET. + group_name: Optional[str] = _field_status.UNSET + + # The name of the tensor within its group. Defaults to UNSET. + attr_name: Optional[str] = _field_status.UNSET + + # The node indices the rows of the tensor correspond to. Defaults to UNSET. + index: Optional[Any] = _field_status.UNSET + + # Convenience methods ##################################################### + + def is_set(self, key): + r"""Whether an attribute is set in :obj:`TensorAttr`.""" + assert key in self.__dataclass_fields__ + attr = getattr(self, key) + return type(attr) != _field_status or attr != _field_status.UNSET + + def is_fully_specified(self): + r"""Whether the :obj:`TensorAttr` has no unset fields.""" + return all([self.is_set(key) for key in self.__dataclass_fields__]) + + def fully_specify(self): + r"""Sets all :obj:`UNSET` fields to :obj:`None`.""" + for key in self.__dataclass_fields__: + if not self.is_set(key): + setattr(self, key, None) + return self + + def update(self, attr): + r"""Updates an :class:`TensorAttr` with set attributes from another + :class:`TensorAttr`.""" + for key in self.__dataclass_fields__: + if attr.is_set(key): + setattr(self, key, getattr(attr, key)) + + @classmethod + def cast(cls, *args, **kwargs): + if len(args) == 1 and len(kwargs) == 0: + elem = args[0] + if elem is None: + return None + if isinstance(elem, CuGraphTensorAttr): + return elem + if isinstance(elem, (tuple, list)): + return cls(*elem) + if isinstance(elem, dict): + return cls(**elem) + return cls(*args, **kwargs) + +class EXPERIMENTAL__CuGraphStore: + """ + Duck-typed version of PyG's GraphStore. + """ + def __init__(self, G, backend='torch'): """ G : PropertyGraph or MGPropertyGraph The cuGraph property graph where the data is being stored. + backend : The backend that manages tensors (default = 'torch') + Should usually be 'torch' ('torch', 'cupy' supported). """ + + if backend == 'torch': + from torch.utils.dlpack import from_dlpack + from torch import int64 as vertex_type + from torch import float32 as property_type + elif backend == 'cupy': + from cupy import from_dlpack + from cupy import int64 as vertex_type + from cupy import float32 as property_type + else: + raise ValueError(f'Invalid backend {backend}.') + self.backend = backend + self.from_dlpack = from_dlpack + self.vertex_type = vertex_type + self.property_type = property_type + self.__graph = G self.__subgraphs = {} @@ -70,30 +205,33 @@ def __init__(self, G): pyg_edge_type = (src_types[0], edge_type, dst_types[0]) - self.__edge_types_to_attrs[edge_type] = EdgeAttr( + self.__edge_types_to_attrs[edge_type] = CuGraphEdgeAttr( edge_type=pyg_edge_type, layout=EdgeLayout.COO, is_sorted=False, size=len(edges) ) - super().__init__() + self.__dict__['_edge_attr_cls'] = CuGraphEdgeAttr + @property + def _edge_types_to_attrs(self): + return dict(self.__edge_types_to_attrs) + @property def is_mg(self): return isinstance(self.__graph, MGPropertyGraph) - def _put_edge_index(self, edge_index: EdgeTensorType, - edge_attr: EdgeAttr) -> bool: + def put_edge_index(self, edge_index, edge_attr): raise NotImplementedError('Adding indices not supported.') - def get_all_edge_attrs(self) -> List[EdgeAttr]: + def get_all_edge_attrs(self): """ Returns all edge types and indices in this store. """ return self.__edge_types_to_attrs.values() - def _get_edge_index(self, attr: EdgeAttr) -> Optional[EdgeTensorType]: + def _get_edge_index(self, attr): # returns the edge index for particular edge type if attr.layout != EdgeLayout.COO: @@ -127,18 +265,68 @@ def _get_edge_index(self, attr: EdgeAttr) -> Optional[EdgeTensorType]: if self.is_mg: df = df.compute() - src = torch.from_dlpack(df[self.__graph.src_col_name].to_dlpack()).to(torch.long) - dst = torch.from_dlpack(df[self.__graph.dst_col_name].to_dlpack()).to(torch.long) - assert src.shape[0] == dst.shape[0] + src = self.from_dlpack(df[self.__graph.src_col_name].to_dlpack()) + dst = self.from_dlpack(df[self.__graph.dst_col_name].to_dlpack()) + if self.backend == 'torch': + src = src.to(self.vertex_type) + dst = dst.to(self.vertex_type) + elif self.backend == 'cupy': + src = src.astype(self.vertex_type) + dst = dst.astype(self.vertex_type) + else: + raise TypeError(f'Invalid backend type {self.backend}') + + if src.shape[0] != dst.shape[0]: + raise IndexError('src and dst shape do not match!') - # dst/src are flipped in PyG return (src, dst) - - def _subgraph(self, edge_types:Tuple[str]): + + def get_edge_index(self, *args, **kwargs): + r"""Synchronously gets an edge_index tensor from the materialized + graph. + + Args: + **attr(EdgeAttr): the edge attributes. + + Returns: + EdgeTensorType: an edge_index tensor corresonding to the provided + attributes, or None if there is no such tensor. + + Raises: + KeyError: if the edge index corresponding to attr was not found. + """ + + edge_attr = self._edge_attr_cls.cast(*args, **kwargs) + edge_attr.layout = EdgeLayout(edge_attr.layout) + # Override is_sorted for CSC and CSR: + # TODO treat is_sorted specially in this function, where is_sorted=True + # returns an edge index sorted by column. + edge_attr.is_sorted = edge_attr.is_sorted or (edge_attr.layout in [ + EdgeLayout.CSC, EdgeLayout.CSR + ]) + edge_index = self._get_edge_index(edge_attr) + if edge_index is None: + raise KeyError(f"An edge corresponding to '{edge_attr}' was not " + f"found") + return edge_index + + def _subgraph(self, edge_types): """ Returns a subgraph with edges limited to those of a given type + + Parameters + ---------- + edge_types : list of edge types + Directly references the graph's internal edge types. Does + not accept PyG edge type tuples. + + Returns + ------- + The appropriate extracted subgraph. Will extract the subgraph + if it has not already been extracted. + """ - edge_types = tuple(edge_types) + edge_types = tuple(sorted(edge_types)) if edge_types not in self.__subgraphs: query = f'(_TYPE_=="{edge_types[0]}")' @@ -157,14 +345,13 @@ def _subgraph(self, edge_types:Tuple[str]): return self.__subgraphs[edge_types] - @torch.no_grad() def neighbor_sample( self, - index: torch.Tensor, - num_neighbors: torch.Tensor, - replace: bool, - directed: bool, - edge_types: List[Tuple[str]]) -> Any: + index, + num_neighbors, + replace, + directed, + edge_types): start_time = datetime.now() @@ -172,26 +359,10 @@ def neighbor_sample( # FIXME support variable num neighbors per edge type num_neighbors = list(num_neighbors.values())[0] - if not isinstance(index, torch.Tensor): - index = torch.Tensor(index) - if not isinstance(num_neighbors, torch.Tensor): - num_neighbors = torch.Tensor(num_neighbors).to(torch.long) - - if not index.is_cuda: - index = index.cuda() - if num_neighbors.is_cuda: - num_neighbors = num_neighbors.cpu() - - if not index.dtype == torch.int32: - index = index.to(torch.int32) - - if not num_neighbors.dtype == torch.int32: - num_neighbors = num_neighbors.to(torch.int32) - - index = cupy.from_dlpack(index.__dlpack__()) + #FIXME eventually get uniform neighbor sample to accept longs + index = cupy.from_dlpack(index.__dlpack__()) #.astype('int32') # FIXME resolve the directed/undirected issue - #G = self.graph.extract_subgraph(add_edge_data=False, default_edge_weight=1.0, allow_multi_edges=True) G = self._subgraph([et[1] for et in edge_types]) sampling_start = datetime.now() @@ -211,35 +382,17 @@ def neighbor_sample( replace ) - VERBOSE = True - concat_fn = dask_cudf.concat if self.is_mg else cudf.concat - end_time = datetime.now() - td = end_time - start_time - if VERBOSE: - print('first half', td.total_seconds()) - print('sampling', (end_time - sampling_start).total_seconds()) - - start_time = datetime.now() - - noi_start = datetime.now() nodes_of_interest = concat_fn( [sampling_results.destinations, sampling_results.sources] ).unique() - noi_end = datetime.now() - print('noi time:', (noi_end - noi_start).total_seconds()) - gd_start = datetime.now() noi = self.__graph.get_vertex_data( nodes_of_interest.compute() if self.is_mg else nodes_of_interest, columns=[self.__graph.vertex_col_name, self.__graph.type_col_name] ) - gd_end = datetime.now() - print('get_vertex_data call:', (gd_end - gd_start).total_seconds()) - - noi_group_start = datetime.now() noi_types = noi[self.__graph.type_col_name].unique() if len(noi_types) > 1: noi = noi.groupby(self.__graph.type_col_name) @@ -256,18 +409,14 @@ def get_group(self, g): noi_types = noi_types.compute() noi_types = noi_types.to_pandas() - noi_group_end = datetime.now() - print('noi group time:', (noi_group_end - noi_group_start).total_seconds()) - # these should contain the original ids, they will be auto-renumbered noi_groups = {} for t in noi_types: v = noi.get_group(t) if self.is_mg: v = v.compute() - noi_groups[t] = torch.from_dlpack(v[self.__graph.vertex_col_name].to_dlpack()) - - eoi_group_start = datetime.now() + noi_groups[t] = self.from_dlpack(v[self.__graph.vertex_col_name].to_dlpack()) + eoi = cudf.merge( sampling_results, self.__edge_type_lookup_table, @@ -287,9 +436,6 @@ def get_group(self, g): eoi_types = eoi_types.compute() eoi_types = eoi_types.to_pandas() - eoi_group_end = datetime.now() - print('eoi_group_time:', (eoi_group_end - eoi_group_start).total_seconds()) - # PyG expects these to be pre-renumbered; the pre-renumbering must match # the auto-renumbering row_dict = {} @@ -307,7 +453,7 @@ def get_group(self, g): index=cudf.from_dlpack(noi_groups[t_pyg_type[0]].__dlpack__()) ) - src = torch.from_dlpack( + src = self.from_dlpack( src_id_table.loc[sources].to_dlpack() ) row_dict[t_pyg_c_type] = src @@ -317,23 +463,48 @@ def get_group(self, g): {'id':range(len(noi_groups[t_pyg_type[2]]))}, index=cudf.from_dlpack(noi_groups[t_pyg_type[2]].__dlpack__()) ) - dst = torch.from_dlpack( + dst = self.from_dlpack( dst_id_table.loc[destinations].to_dlpack() ) col_dict[t_pyg_c_type] = dst - - end_time = datetime.now() - print('second half:', (end_time - start_time).total_seconds()) #FIXME handle edge ids return (noi_groups, row_dict, col_dict, None) -class CuGraphFeatureStore(FeatureStore): - def __init__(self, G:PropertyGraph, reserved_keys=[]): +class EXPERIMENTAL__CuGraphFeatureStore: + """ + Duck-typed version of PyG's FeatureStore. + """ + def __init__(self, G, reserved_keys=[], backend='torch'): + """ + G : PropertyGraph or MGPropertyGraph where the graph is stored. + reserved_keys : Properties in the graph that are not used for + training (the 'x' attribute will ignore these properties). + backend : The tensor backend (default = 'torch') + Should usually be 'torch' ('torch', 'cupy' supported). + """ + + if backend == 'torch': + from torch.utils.dlpack import from_dlpack + from torch import int64 as vertex_type + from torch import float32 as property_type + elif backend == 'cupy': + from cupy import from_dlpack + from cupy import int64 as vertex_type + from cupy import float32 as property_type + else: + raise ValueError(f'Invalid backend {backend}.') + + self.backend = backend + self.from_dlpack = from_dlpack + self.vertex_type = vertex_type + self.property_type = property_type + self.__graph = G self.__reserved_keys = list(reserved_keys) - super().__init__() + self.__dict__['_tensor_attr_cls'] = CuGraphTensorAttr + #TODO ensure all x properties are float32 type #TODO ensure y is of long type @@ -342,10 +513,10 @@ def __init__(self, G:PropertyGraph, reserved_keys=[]): def is_mg(self): return isinstance(self.__graph, MGPropertyGraph) - def _put_tensor(self, tensor: FeatureTensorType, attr: TensorAttr) -> bool: + def put_tensor(self, tensor, attr): raise NotImplementedError('Adding properties not supported.') - def create_named_tensor(self, attr:TensorAttr, properties:list) -> None: + def create_named_tensor(self, attr, properties): """ Create a named tensor that contains a subset of properties in the graph. @@ -353,7 +524,7 @@ def create_named_tensor(self, attr:TensorAttr, properties:list) -> None: #FIXME implement this to allow props other than x and y raise NotImplementedError('Not yet supported') - def get_all_tensor_attrs(self) -> List[TensorAttr]: + def get_all_tensor_attrs(self): r"""Obtains all tensor attributes stored in this feature store.""" attrs = [] for vertex_type in self.__graph.vertex_types: @@ -362,25 +533,25 @@ def get_all_tensor_attrs(self) -> List[TensorAttr]: #FIXME allow props other than x and y attrs.append( - TensorAttr(vertex_type, 'x') + CuGraphTensorAttr(vertex_type, 'x') ) if 'y' in self.__graph.vertex_property_names: attrs.append( - TensorAttr(vertex_type, 'y') + CuGraphTensorAttr(vertex_type, 'y') ) return attrs - def _get_tensor(self, attr: TensorAttr) -> Optional[FeatureTensorType]: + def _get_tensor(self, attr): if attr.attr_name == 'x': cols = None else: cols = [attr.attr_name] idx = attr.index - if not idx.is_cuda: + if self.backend == 'torch' and not idx.is_cuda: idx = idx.cuda() - idx = cupy.fromDlpack(idx.__dlpack__()) + idx = cupy.from_dlpack(idx.__dlpack__()) if len(self.__graph.vertex_types) == 1: # make sure we don't waste computation if there's only 1 type @@ -413,21 +584,121 @@ def _get_tensor(self, attr: TensorAttr) -> Optional[FeatureTensorType]: df = df.compute() #FIXME handle vertices without properties - output = torch.from_dlpack( + print('printing df!') + print(df) + output = self.from_dlpack( df.fillna(0).to_dlpack() ) # FIXME look up the dtypes for x and other properties - if attr.attr_name == 'x' and output.dtype != torch.float: - output = output.to(torch.float) + if attr.attr_name == 'x' and output.dtype != self.property_type: + if self.backend == 'torch': + output = output.to(self.property_type) + elif self.backend == 'cupy': + output = output.astype(self.property_type) + else: + raise ValueError(f'invalid backend {self.backend}') return output + + def _multi_get_tensor(self, attrs): + return [self._get_tensor(attr) for attr in attrs] + + def multi_get_tensor(self, attrs): + r"""Synchronously obtains a :class:`FeatureTensorType` object from the + feature store for each tensor associated with the attributes in + `attrs`. + + Args: + attrs (List[TensorAttr]): a list of :class:`TensorAttr` attributes + that identify the tensors to get. + + Returns: + List[FeatureTensorType]: a Tensor of the same type as the index for + each attribute. - def _get_tensor_size(self, attr: TensorAttr) -> Tuple: - return self._get_tensor(attr).size() + Raises: + KeyError: if a tensor corresponding to an attr was not found. + ValueError: if any input `TensorAttr` is not fully specified. + """ + attrs = [self._tensor_attr_cls.cast(attr) for attr in attrs] + bad_attrs = [attr for attr in attrs if not attr.is_fully_specified()] + if len(bad_attrs) > 0: + raise ValueError( + f"The input TensorAttr(s) '{bad_attrs}' are not fully " + f"specified. Please fully specify them by specifying all " + f"'UNSET' fields") + + tensors = self._multi_get_tensor(attrs) + + bad_attrs = [attrs[i] for i, v in enumerate(tensors) if v is None] + if len(bad_attrs) > 0: + raise KeyError(f"Tensors corresponding to attributes " + f"'{bad_attrs}' were not found") + + return [ + tensor + for attr, tensor in zip(attrs, tensors) + ] - def _remove_tensor(self, attr: TensorAttr) -> bool: + def get_tensor(self, *args, **kwargs): + r"""Synchronously obtains a :class:`FeatureTensorType` object from the + feature store. Feature store implementors guarantee that the call + :obj:`get_tensor(put_tensor(tensor, attr), attr) = tensor` holds. + + Args: + **attr (TensorAttr): Any relevant tensor attributes that correspond + to the feature tensor. See the :class:`TensorAttr` + documentation for required and optional attributes. It is the + job of implementations of a :class:`FeatureStore` to store this + metadata in a meaningful way that allows for tensor retrieval + from a :class:`TensorAttr` object. + + Returns: + FeatureTensorType: a Tensor of the same type as the index. + + Raises: + KeyError: if the tensor corresponding to attr was not found. + ValueError: if the input `TensorAttr` is not fully specified. + """ + + attr = self._tensor_attr_cls.cast(*args, **kwargs) + if not attr.is_fully_specified(): + raise ValueError(f"The input TensorAttr '{attr}' is not fully " + f"specified. Please fully specify the input by " + f"specifying all 'UNSET' fields.") + + tensor = self._get_tensor(attr) + if tensor is None: + raise KeyError(f"A tensor corresponding to '{attr}' was not found") + return tensor + + def _get_tensor_size(self, attr): + return self._get_tensor(attr).size + + def get_tensor_size(self, *args, **kwargs): + r"""Obtains the size of a tensor given its attributes, or :obj:`None` + if the tensor does not exist.""" + attr = self._tensor_attr_cls.cast(*args, **kwargs) + if not attr.is_set('index'): + attr.index = None + return self._get_tensor_size(attr) + + def _remove_tensor(self, attr): raise NotImplementedError('Removing features not supported') def __len__(self): - return len(self.get_all_tensor_attrs()) \ No newline at end of file + return len(self.get_all_tensor_attrs()) + + +def edge_type_to_str(edge_type): + """ + Converts the PyG (src, type, dst) edge representation into + the equivalent C++ representation. + + edge_type : The PyG (src, type, dst) tuple edge representation + to convert to the C++ representation. + """ + # Since C++ cannot take dictionaries with tuples as key as input, edge type + # triplets need to be converted into single strings. + return edge_type if isinstance(edge_type, str) else '__'.join(edge_type) \ No newline at end of file diff --git a/python/cugraph/cugraph/tests/test_egonet.py b/python/cugraph/cugraph/tests/test_egonet.py index ad434d7e393..52d4a54f7f2 100644 --- a/python/cugraph/cugraph/tests/test_egonet.py +++ b/python/cugraph/cugraph/tests/test_egonet.py @@ -115,3 +115,4 @@ def test_multi_column_ego_graph(graph_file, seed, radius): for i in range(len(edgelist_df_res)): assert ego_cugraph_exp.has_edge(edgelist_df_res["0_src"].iloc[i], edgelist_df_res["0_dst"].iloc[i]) + diff --git a/python/cugraph/cugraph/tests/test_pyg_extensions.py b/python/cugraph/cugraph/tests/test_pyg_extensions.py new file mode 100644 index 00000000000..46557501be7 --- /dev/null +++ b/python/cugraph/cugraph/tests/test_pyg_extensions.py @@ -0,0 +1,535 @@ +import cugraph +from cugraph.experimental import PropertyGraph +from cugraph.gnn.pyg_extensions import to_pyg +from cugraph.gnn.pyg_extensions.data import ( + CuGraphStore, + CuGraphFeatureStore +) +from cugraph.gnn.pyg_extensions.data.cugraph_store import ( + CuGraphTensorAttr, + CuGraphEdgeAttr, + EdgeLayout +) + +import cudf +import cupy + +import pytest + +@pytest.fixture +def basic_property_graph_1(): + pG = PropertyGraph() + pG.add_edge_data( + cudf.DataFrame({ + 'src': [ + 0, + 0, + 1, + 2, + 2, + 3 + ], + 'dst': [ + 1, + 2, + 4, + 3, + 4, + 1 + ] + }), + vertex_col_names=['src', 'dst'] + ) + + pG.add_vertex_data( + cudf.DataFrame({ + 'prop1': [ + 100, + 200, + 300, + 400, + 500 + ], + 'prop2': [ + 5, + 4, + 3, + 2, + 1 + ], + 'id': [ + 0, + 1, + 2, + 3, + 4 + ] + }), + vertex_col_name='id' + ) + + return pG + +@pytest.fixture +def multi_edge_property_graph_1(): + df = cudf.DataFrame({ + 'src': [ + 0, + 0, + 1, + 2, + 2, + 3, + 3, + 1, + 2, + 4 + ], + 'dst': [ + 1, + 2, + 4, + 3, + 3, + 1, + 2, + 4, + 4, + 3 + ], + 'edge_type': [ + 'pig', + 'dog', + 'cat', + 'pig', + 'cat', + 'pig', + 'dog', + 'pig', + 'cat', + 'dog' + ] + }) + + pG = PropertyGraph() + for edge_type in df.edge_type.unique().to_pandas(): + pG.add_edge_data( + df[df.edge_type==edge_type], + vertex_col_names=['src', 'dst'], + type_name=edge_type + ) + + pG.add_vertex_data( + cudf.DataFrame({ + 'prop1': [ + 100, + 200, + 300, + 400, + 500 + ], + 'prop2': [ + 5, + 4, + 3, + 2, + 1 + ], + 'id': [ + 0, + 1, + 2, + 3, + 4 + ] + }), + vertex_col_name='id' + ) + + return pG + +@pytest.fixture +def multi_edge_multi_vertex_property_graph_1(): + df = cudf.DataFrame({ + 'src': [ + 0, + 0, + 1, + 2, + 2, + 3, + 3, + 1, + 2, + 4 + ], + 'dst': [ + 1, + 2, + 4, + 3, + 3, + 1, + 2, + 4, + 4, + 3 + ], + 'edge_type': [ + 'horse', + 'horse', + 'duck', + 'duck', + 'mongoose', + 'cow', + 'cow', + 'mongoose', + 'duck', + 'snake' + ] + }) + + pG = PropertyGraph() + for edge_type in df.edge_type.unique().to_pandas(): + pG.add_edge_data( + df[df.edge_type==edge_type], + vertex_col_names=['src', 'dst'], + type_name=edge_type + ) + + vdf = cudf.DataFrame({ + 'prop1': [ + 100, + 200, + 300, + 400, + 500 + ], + 'prop2': [ + 5, + 4, + 3, + 2, + 1 + ], + 'id': [ + 0, + 1, + 2, + 3, + 4 + ], + 'vertex_type': [ + 'brown', + 'brown', + 'brown', + 'black', + 'black', + ] + }) + + for vertex_type in vdf.vertex_type.unique().to_pandas(): + pG.add_vertex_data( + vdf[vdf.vertex_type==vertex_type].drop('vertex_type', axis=1), + vertex_col_name='id', + type_name=vertex_type + ) + + return pG + +def test_tensor_attr(): + ta = CuGraphTensorAttr( + 'group0', + 'property1' + ) + assert not ta.is_fully_specified() + assert not ta.is_set('index') + + ta.fully_specify() + assert ta.is_fully_specified() + + other_ta = CuGraphTensorAttr( + index=[1, 2, 3] + ) + ta.update(other_ta) + assert ta.index == [1, 2, 3] + + casted_ta1 = CuGraphTensorAttr.cast( + ta + ) + assert casted_ta1 == ta + + casted_ta2 = CuGraphTensorAttr.cast( + index=[1, 2, 3] + ) + assert casted_ta2.index == [1, 2, 3] + assert not casted_ta2.is_fully_specified() + + casted_ta3 = CuGraphTensorAttr.cast( + 'group2', + 'property2', + [1, 2, 3], + ) + assert casted_ta3.group_name == 'group2' + assert casted_ta3.attr_name == 'property2' + assert casted_ta3.index == [1, 2, 3] + + +def test_edge_attr(): + ea = CuGraphEdgeAttr( + 'type0', + EdgeLayout.COO, + False, + 10 + ) + assert ea.edge_type == 'type0' + assert ea.layout == EdgeLayout.COO + assert not ea.is_sorted + assert ea.size == 10 + + ea = CuGraphEdgeAttr( + edge_type='type1', + layout='csr', + is_sorted=True + ) + assert ea.size == None + + ea = CuGraphEdgeAttr.cast( + 'type0', + EdgeLayout.COO, + False, + 10 + ) + assert ea.edge_type == 'type0' + assert ea.layout == EdgeLayout.COO + assert not ea.is_sorted + assert ea.size == 10 + +@pytest.fixture(params=['basic_property_graph_1', 'multi_edge_property_graph_1', 'multi_edge_multi_vertex_property_graph_1']) +def graph(request): + return request.getfixturevalue(request.param) + +def test_get_edge_index(graph): + pG = graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + for edge_type in pG.edge_types: + src, dst = graph_store.get_edge_index( + edge_type=edge_type, + layout='coo', + is_sorted=False + ) + + assert pG.get_num_edges(edge_type) == len(src) + assert pG.get_num_edges(edge_type) == len(dst) + + edge_data = pG.get_edge_data( + types=[edge_type], + columns=[pG.src_col_name, pG.dst_col_name] + ) + edge_df = cudf.DataFrame({ + 'src':src, + 'dst':dst + }) + edge_df['counter'] = 1 + + merged_df = cudf.merge( + edge_data, + edge_df, + left_on=[pG.src_col_name, pG.dst_col_name], + right_on=['src','dst'] + ) + + assert merged_df.counter.sum() == len(src) + + +def test_edge_types(graph): + pG = graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + eta = graph_store._edge_types_to_attrs + assert eta.keys() == pG.edge_types + + for attr_name, attr_repr in eta.items(): + assert pG.get_num_edges(attr_name) == attr_repr.size + assert attr_name == attr_repr.edge_type[1] + + +def test_get_subgraph(graph): + pG = graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + for edge_type in pG.edge_types: + sg = graph_store._subgraph([edge_type]) + assert isinstance(sg, cugraph.Graph) + assert sg.number_of_edges() == pG.get_num_edges(edge_type) + + sg = graph_store._subgraph(pG.edge_types) + assert isinstance(sg, cugraph.Graph) + + # duplicate edges are automatically dropped in from_edgelist + cols = [pG.src_col_name, pG.dst_col_name] + num_edges = pG.get_edge_data( + columns=cols + )[cols].drop_duplicates().shape[0] + assert sg.number_of_edges() == num_edges + + +def test_neighbor_sample(graph): + pG = graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + noi_groups, row_dict, col_dict, _ = graph_store.neighbor_sample( + index=cupy.array([0,1,2,3,4], dtype='int64'), + num_neighbors=[-1], + replace=True, + directed=True, + edge_types=[ + v.edge_type + for v in graph_store._edge_types_to_attrs.values() + ] + ) + + expected_sample = cugraph.uniform_neighbor_sample( + G=pG.extract_subgraph( + default_edge_weight=1.0, + allow_multi_edges=True, + renumber_graph=False, + add_edge_data=False + ), + start_list=cupy.array([0,1,2,3,4], dtype='int64'), + fanout_vals=[-1], + with_replacement=True, + ) + + for node_type, node_ids in noi_groups.items(): + actual_vertex_ids = pG.get_vertex_data( + types=[node_type], + columns=[pG.vertex_col_name] + )[pG.vertex_col_name].to_cupy() + + assert list(node_ids) == list(actual_vertex_ids) + + combined_df = cudf.DataFrame() + for edge_type, row in row_dict.items(): + col = col_dict[edge_type] + df = cudf.DataFrame({pG.src_col_name:row, pG.dst_col_name:col}) + df[pG.type_col_name] = edge_type.replace('__', '') + combined_df = cudf.concat([combined_df, df]) + combined_df = combined_df.reset_index().drop('index', axis=1) + assert combined_df == pG.get_edge_data()[[pG.src_col_name,pG.dst_col_name,pG.type_col_name]] + + +def test_get_tensor(graph): + pG = graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + vertex_types = pG.vertex_types + for vertex_type in vertex_types: + for property_name in pG.vertex_property_names: + if property_name != 'vertex_type': + base_series = pG.get_vertex_data( + types=[vertex_type], + columns=[property_name, pG.vertex_col_name] + ) + + vertex_ids = base_series[pG.vertex_col_name].to_cupy() + base_series = base_series[property_name].to_cupy() + + tsr = feature_store.get_tensor( + vertex_type, + property_name, + vertex_ids + ) + + print(base_series) + print(tsr) + assert list(tsr) == list(base_series) + + +def test_multi_get_tensor(graph): + pG = graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + vertex_types = pG.vertex_types + for vertex_type in vertex_types: + for property_name in pG.vertex_property_names: + if property_name != 'vertex_type': + base_series = pG.get_vertex_data( + types=[vertex_type], + columns=[property_name, pG.vertex_col_name] + ) + + vertex_ids = base_series[pG.vertex_col_name].to_cupy() + base_series = base_series[property_name].to_cupy() + + tsr = feature_store.multi_get_tensor( + [[vertex_type, property_name, vertex_ids]] + ) + assert len(tsr) == 1 + tsr = tsr[0] + + print(base_series) + print(tsr) + assert list(tsr) == list(base_series) + + +def test_get_all_tensor_attrs(graph): + pG = graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + tensor_attrs = [] + for vertex_type in pG.vertex_types: + tensor_attrs.append(CuGraphTensorAttr( + vertex_type, + 'x' + )) + + assert tensor_attrs == feature_store.get_all_tensor_attrs() + +def test_get_tensor_size(graph): + pG = graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + vertex_types = pG.vertex_types + for vertex_type in vertex_types: + for property_name in pG.vertex_property_names: + if property_name != 'vertex_type': + base_series = pG.get_vertex_data( + types=[vertex_type], + columns=[property_name, pG.vertex_col_name] + ) + + vertex_ids = base_series[pG.vertex_col_name].to_cupy() + size = feature_store.get_tensor_size(vertex_type, property_name, vertex_ids) + + assert len(base_series) == size + +def test_get_x(graph): + pG = graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + vertex_types = pG.vertex_types + for vertex_type in vertex_types: + base_df = pG.get_vertex_data( + types=[vertex_type] + ) + + base_x = base_df.drop( + pG.vertex_col_name, axis=1 + ).drop( + pG.type_col_name, axis=1 + ).to_cupy().astype('float32') + + vertex_ids = base_df[pG.vertex_col_name].to_cupy() + + tsr = feature_store.get_tensor( + vertex_type, + 'x', + vertex_ids + ) + + print(base_x) + print(tsr) + for t, b in zip(tsr, base_x): + assert list(t) == list(b) \ No newline at end of file From 1d60e8dcc3fe2c35a93749d709368e01eb50c759 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Tue, 16 Aug 2022 20:09:25 +0000 Subject: [PATCH 49/71] remove garbage file --- =1.17 | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 =1.17 diff --git a/=1.17 b/=1.17 deleted file mode 100644 index 49ef6c46d46..00000000000 --- a/=1.17 +++ /dev/null @@ -1,31 +0,0 @@ -Collecting package metadata (current_repodata.json): ...working... done -Solving environment: ...working... done - -## Package Plan ## - - environment location: /opt/conda/envs/rapids - - added / updated specs: - - cub - - -The following packages will be downloaded: - - package | build - ---------------------------|----------------- - cub-1.16.0 | h0800d71_1 256 KB conda-forge - ------------------------------------------------------------ - Total: 256 KB - -The following NEW packages will be INSTALLED: - - cub conda-forge/linux-64::cub-1.16.0-h0800d71_1 - - -Proceed ([y]/n)? - -Downloading and Extracting Packages - cub-1.16.0 | 256 KB | | 0% cub-1.16.0 | 256 KB | 6 | 6% cub-1.16.0 | 256 KB | ########## | 100% -Preparing transaction: ...working... done -Verifying transaction: ...working... done -Executing transaction: ...working... done From 9198076d5300a02f36f8bbbf2f973affd9350186 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Tue, 16 Aug 2022 20:10:23 +0000 Subject: [PATCH 50/71] revert yaml change --- conda/environments/cugraph_dev_cuda11.5.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/conda/environments/cugraph_dev_cuda11.5.yml b/conda/environments/cugraph_dev_cuda11.5.yml index 42dae9e7f90..8337e12e5f5 100644 --- a/conda/environments/cugraph_dev_cuda11.5.yml +++ b/conda/environments/cugraph_dev_cuda11.5.yml @@ -13,6 +13,7 @@ dependencies: - libcudf=22.10.* - rmm=22.10.* - librmm=22.10.* +- libraft-headers=22.10.* - pyraft=22.10.* - cuda-python>=11.5,<11.7.1 - dask>=2022.7.1 From a0b0ca2cd9d523951eb76cc0e5ae7224b6cf0088 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Tue, 16 Aug 2022 20:11:06 +0000 Subject: [PATCH 51/71] revert egonet change --- python/cugraph/cugraph/tests/test_egonet.py | 1 - 1 file changed, 1 deletion(-) diff --git a/python/cugraph/cugraph/tests/test_egonet.py b/python/cugraph/cugraph/tests/test_egonet.py index 52d4a54f7f2..ad434d7e393 100644 --- a/python/cugraph/cugraph/tests/test_egonet.py +++ b/python/cugraph/cugraph/tests/test_egonet.py @@ -115,4 +115,3 @@ def test_multi_column_ego_graph(graph_file, seed, radius): for i in range(len(edgelist_df_res)): assert ego_cugraph_exp.has_edge(edgelist_df_res["0_src"].iloc[i], edgelist_df_res["0_dst"].iloc[i]) - From 411d1ea3f0ac4820038e936df446d80f4875311e Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Tue, 16 Aug 2022 20:17:44 +0000 Subject: [PATCH 52/71] add experimental warnings to loaders --- .../cugraph/gnn/pyg_extensions/loader/__init__.py | 9 +++++++-- .../pyg_extensions/loader/link_neighbor_loader.py | 12 ++++++------ .../gnn/pyg_extensions/loader/neighbor_loader.py | 8 ++++---- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/loader/__init__.py b/python/cugraph/cugraph/gnn/pyg_extensions/loader/__init__.py index 22855b1ad59..e3a8a6ae499 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/loader/__init__.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/loader/__init__.py @@ -1,2 +1,7 @@ -from cugraph.gnn.pyg_extensions.loader.link_neighbor_loader import CuGraphLinkNeighborLoader -from cugraph.gnn.pyg_extensions.loader.neighbor_loader import CuGraphNeighborLoader \ No newline at end of file +from cugraph.utilities.api_tools import experimental_warning_wrapper + +from cugraph.gnn.pyg_extensions.loader.link_neighbor_loader import EXPERIMENTAL__CuGraphLinkNeighborLoader +from cugraph.gnn.pyg_extensions.loader.neighbor_loader import EXPERIMENTAL__CuGraphNeighborLoader + +CuGraphLinkNeighborLoader = experimental_warning_wrapper(EXPERIMENTAL__CuGraphLinkNeighborLoader) +CuGraphNeighborLoader = experimental_warning_wrapper(EXPERIMENTAL__CuGraphNeighborLoader) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py b/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py index 66fc4b6df97..40d1bc47bd3 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py @@ -1,6 +1,6 @@ from torch_geometric.loader.link_neighbor_loader import Dataset -from cugraph.gnn.pyg_extensions.loader.neighbor_loader import CuGraphNeighborSampler -from cugraph.gnn.pyg_extensions.loader.neighbor_loader import CuGraphNeighborLoader +from cugraph.gnn.pyg_extensions.loader.neighbor_loader import EXPERIMENTAL__CuGraphNeighborSampler +from cugraph.gnn.pyg_extensions.loader.neighbor_loader import EXPERIMENTAL__CuGraphNeighborLoader from typing import Any, Callable, Iterator, List, Optional, Tuple, Union @@ -18,7 +18,7 @@ from torch_geometric.loader.utils import filter_custom_store from torch_geometric.typing import InputEdges, NumNeighbors, OptTensor -class CuGraphLinkNeighborSampler(CuGraphNeighborSampler): +class EXPERIMENTAL__CuGraphLinkNeighborSampler(EXPERIMENTAL__CuGraphNeighborSampler): def __init__( self, data, @@ -105,7 +105,7 @@ def __call__(self, query: List[Tuple[Tensor]]): # Call cuGraph sampler return out + (edge_label_index, edge_label) -class CuGraphLinkNeighborLoader(torch.utils.data.DataLoader): +class EXPERIMENTAL__CuGraphLinkNeighborLoader(torch.utils.data.DataLoader): r"""A link-based data loader derived as an extension of the node-based :class:`torch_geometric.loader.NeighborLoader`. This loader allows for mini-batch training of GNNs on large-scale graphs @@ -192,7 +192,7 @@ def __init__( transform: Callable = None, is_sorted: bool = False, filter_per_worker: bool = False, - neighbor_sampler: Optional[CuGraphLinkNeighborSampler] = None, + neighbor_sampler: Optional[EXPERIMENTAL__CuGraphLinkNeighborSampler] = None, **kwargs, ): # Remove for PyTorch Lightning: @@ -225,7 +225,7 @@ def __init__( data, edge_label_index) if neighbor_sampler is None: - self.neighbor_sampler = CuGraphLinkNeighborSampler( + self.neighbor_sampler = EXPERIMENTAL__CuGraphLinkNeighborSampler( data, num_neighbors, replace, diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/loader/neighbor_loader.py b/python/cugraph/cugraph/gnn/pyg_extensions/loader/neighbor_loader.py index 9685b414f5f..0b100bf15d8 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/loader/neighbor_loader.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/loader/neighbor_loader.py @@ -16,7 +16,7 @@ from torch_geometric.typing import InputNodes, NumNeighbors -class CuGraphNeighborSampler: +class EXPERIMENTAL__CuGraphNeighborSampler: def __init__( self, data: Tuple[FeatureStore, GraphStore], @@ -98,7 +98,7 @@ def __call__(self, index: Union[List[int], Tensor]): return out + (index.numel(), ) -class CuGraphNeighborLoader(torch.utils.data.DataLoader): +class EXPERIMENTAL__CuGraphNeighborLoader(torch.utils.data.DataLoader): r"""A data loader that performs neighbor sampling as introduced in the `"Inductive Representation Learning on Large Graphs" `_ paper. @@ -198,7 +198,7 @@ def __init__( transform: Callable = None, is_sorted: bool = False, filter_per_worker: bool = False, - neighbor_sampler: Optional[CuGraphNeighborSampler] = None, + neighbor_sampler: Optional[EXPERIMENTAL__CuGraphNeighborSampler] = None, **kwargs, ): # Remove for PyTorch Lightning: @@ -224,7 +224,7 @@ def __init__( node_type, input_nodes = get_input_nodes(data, input_nodes) if neighbor_sampler is None: - self.neighbor_sampler = CuGraphNeighborSampler( + self.neighbor_sampler = EXPERIMENTAL__CuGraphNeighborSampler( data, num_neighbors, replace, From 9f568c344f912fdc20d747a69bbb707f7ea1cb8f Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Wed, 17 Aug 2022 16:09:56 +0000 Subject: [PATCH 53/71] test fixes --- .../cugraph/gnn/pyg_extensions/__init__.py | 13 + .../gnn/pyg_extensions/data/cugraph_store.py | 15 +- .../gnn/pyg_extensions/loader/__init__.py | 13 + .../loader/link_neighbor_loader.py | 13 + .../pyg_extensions/loader/neighbor_loader.py | 13 + .../tests/mg/test_mg_pyg_extensions.py | 621 ++++++++++++++++++ .../cugraph/tests/test_pyg_extensions.py | 66 +- 7 files changed, 749 insertions(+), 5 deletions(-) create mode 100644 python/cugraph/cugraph/tests/mg/test_mg_pyg_extensions.py diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/__init__.py b/python/cugraph/cugraph/gnn/pyg_extensions/__init__.py index eb3c44b24ac..7d1d4f288ed 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/__init__.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/__init__.py @@ -1 +1,14 @@ +# Copyright (c) 2019-2022, NVIDIA CORPORATION. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from cugraph.gnn.pyg_extensions.data import to_pyg diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py index 7a2491ed9a8..737f0a2ca96 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py @@ -1,3 +1,16 @@ +# Copyright (c) 2019-2022, NVIDIA CORPORATION. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from cugraph.experimental import PropertyGraph from cugraph.experimental import MGPropertyGraph @@ -338,7 +351,7 @@ def _subgraph(self, edge_types): selection=selection, default_edge_weight=1.0, allow_multi_edges=True, - renumber_graph=False, # FIXME enforce int type + renumber_graph=True, # FIXME enforce int type add_edge_data=False ) self.__subgraphs[edge_types] = sg diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/loader/__init__.py b/python/cugraph/cugraph/gnn/pyg_extensions/loader/__init__.py index e3a8a6ae499..b424549ab16 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/loader/__init__.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/loader/__init__.py @@ -1,3 +1,16 @@ +# Copyright (c) 2019-2022, NVIDIA CORPORATION. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from cugraph.utilities.api_tools import experimental_warning_wrapper from cugraph.gnn.pyg_extensions.loader.link_neighbor_loader import EXPERIMENTAL__CuGraphLinkNeighborLoader diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py b/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py index 40d1bc47bd3..de6b96413a3 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py @@ -1,3 +1,16 @@ +# Copyright (c) 2019-2022, NVIDIA CORPORATION. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from torch_geometric.loader.link_neighbor_loader import Dataset from cugraph.gnn.pyg_extensions.loader.neighbor_loader import EXPERIMENTAL__CuGraphNeighborSampler from cugraph.gnn.pyg_extensions.loader.neighbor_loader import EXPERIMENTAL__CuGraphNeighborLoader diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/loader/neighbor_loader.py b/python/cugraph/cugraph/gnn/pyg_extensions/loader/neighbor_loader.py index 0b100bf15d8..3b14e35a0c5 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/loader/neighbor_loader.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/loader/neighbor_loader.py @@ -1,3 +1,16 @@ +# Copyright (c) 2019-2022, NVIDIA CORPORATION. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from collections.abc import Sequence from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union diff --git a/python/cugraph/cugraph/tests/mg/test_mg_pyg_extensions.py b/python/cugraph/cugraph/tests/mg/test_mg_pyg_extensions.py new file mode 100644 index 00000000000..8da556bb62e --- /dev/null +++ b/python/cugraph/cugraph/tests/mg/test_mg_pyg_extensions.py @@ -0,0 +1,621 @@ +# Copyright (c) 2019-2022, NVIDIA CORPORATION. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import cugraph +from cugraph.experimental import MGPropertyGraph +from cugraph.gnn.pyg_extensions import to_pyg +from cugraph.gnn.pyg_extensions.data import ( + CuGraphStore, + CuGraphFeatureStore +) +from cugraph.gnn.pyg_extensions.data.cugraph_store import ( + CuGraphTensorAttr, + CuGraphEdgeAttr, + EdgeLayout +) + +import cudf +import dask_cudf +import cupy + +import pytest +import re + + +@pytest.fixture(scope="module") +def basic_property_graph_1(dask_client): + pG = MGPropertyGraph() + pG.add_edge_data( + dask_cudf.from_cudf( + cudf.DataFrame({ + 'src': cupy.array([ + 0, + 0, + 1, + 2, + 2, + 3 + ], dtype='int32'), + 'dst': cupy.array([ + 1, + 2, + 4, + 3, + 4, + 1 + ], dtype='int32') + }), + npartitions=2 + ), + vertex_col_names=['src', 'dst'] + ) + + pG.add_vertex_data( + dask_cudf.from_cudf( + cudf.DataFrame({ + 'prop1': [ + 100, + 200, + 300, + 400, + 500 + ], + 'prop2': [ + 5, + 4, + 3, + 2, + 1 + ], + 'id': cupy.array([ + 0, + 1, + 2, + 3, + 4 + ], dtype='int32') + }), + npartitions=2 + ), + vertex_col_name='id' + ) + + return pG + + +@pytest.fixture(scope="module") +def multi_edge_property_graph_1(dask_client): + df = dask_cudf.from_cudf( + cudf.DataFrame({ + 'src': cupy.array([ + 0, + 0, + 1, + 2, + 2, + 3, + 3, + 1, + 2, + 4 + ], dtype='int32'), + 'dst': cupy.array([ + 1, + 2, + 4, + 3, + 3, + 1, + 2, + 4, + 4, + 3 + ], dtype='int32'), + 'edge_type': [ + 'pig', + 'dog', + 'cat', + 'pig', + 'cat', + 'pig', + 'dog', + 'pig', + 'cat', + 'dog' + ] + }), + npartitions=2 + ) + + pG = MGPropertyGraph() + for edge_type in df.edge_type.unique().compute().to_pandas(): + pG.add_edge_data( + df[df.edge_type==edge_type], + vertex_col_names=['src', 'dst'], + type_name=edge_type + ) + + pG.add_vertex_data( + dask_cudf.from_cudf( + cudf.DataFrame({ + 'prop1': [ + 100, + 200, + 300, + 400, + 500 + ], + 'prop2': [ + 5, + 4, + 3, + 2, + 1 + ], + 'id': cupy.array([ + 0, + 1, + 2, + 3, + 4 + ], dtype='int32') + }), + npartitions=2 + ), + vertex_col_name='id' + ) + + return pG + + +@pytest.fixture(scope="module") +def multi_edge_multi_vertex_property_graph_1(dask_client): + df = dask_cudf.from_cudf( + cudf.DataFrame({ + 'src': cupy.array([ + 0, + 0, + 1, + 2, + 2, + 3, + 3, + 1, + 2, + 4 + ], dtype='int32'), + 'dst': cupy.array([ + 1, + 2, + 4, + 3, + 3, + 1, + 2, + 4, + 4, + 3 + ], dtype='int32'), + 'edge_type': [ + 'horse', + 'horse', + 'duck', + 'duck', + 'mongoose', + 'cow', + 'cow', + 'mongoose', + 'duck', + 'snake' + ] + }), + npartitions=2 + ) + + pG = MGPropertyGraph() + for edge_type in df.edge_type.compute().unique().to_pandas(): + pG.add_edge_data( + df[df.edge_type==edge_type], + vertex_col_names=['src', 'dst'], + type_name=edge_type + ) + + vdf = dask_cudf.from_cudf( + cudf.DataFrame({ + 'prop1': [ + 100, + 200, + 300, + 400, + 500 + ], + 'prop2': [ + 5, + 4, + 3, + 2, + 1 + ], + 'id': cupy.array([ + 0, + 1, + 2, + 3, + 4 + ], dtype='int32'), + 'vertex_type': [ + 'brown', + 'brown', + 'brown', + 'black', + 'black', + ] + }), + npartitions=2 + ) + + for vertex_type in vdf.vertex_type.unique().compute().to_pandas(): + pG.add_vertex_data( + vdf[vdf.vertex_type==vertex_type].drop('vertex_type', axis=1), + vertex_col_name='id', + type_name=vertex_type + ) + + return pG + + +def test_tensor_attr(): + ta = CuGraphTensorAttr( + 'group0', + 'property1' + ) + assert not ta.is_fully_specified() + assert not ta.is_set('index') + + ta.fully_specify() + assert ta.is_fully_specified() + + other_ta = CuGraphTensorAttr( + index=[1, 2, 3] + ) + ta.update(other_ta) + assert ta.index == [1, 2, 3] + + casted_ta1 = CuGraphTensorAttr.cast( + ta + ) + assert casted_ta1 == ta + + casted_ta2 = CuGraphTensorAttr.cast( + index=[1, 2, 3] + ) + assert casted_ta2.index == [1, 2, 3] + assert not casted_ta2.is_fully_specified() + + casted_ta3 = CuGraphTensorAttr.cast( + 'group2', + 'property2', + [1, 2, 3], + ) + assert casted_ta3.group_name == 'group2' + assert casted_ta3.attr_name == 'property2' + assert casted_ta3.index == [1, 2, 3] + + +def test_edge_attr(): + ea = CuGraphEdgeAttr( + 'type0', + EdgeLayout.COO, + False, + 10 + ) + assert ea.edge_type == 'type0' + assert ea.layout == EdgeLayout.COO + assert not ea.is_sorted + assert ea.size == 10 + + ea = CuGraphEdgeAttr( + edge_type='type1', + layout='csr', + is_sorted=True + ) + assert ea.size == None + + ea = CuGraphEdgeAttr.cast( + 'type0', + EdgeLayout.COO, + False, + 10 + ) + assert ea.edge_type == 'type0' + assert ea.layout == EdgeLayout.COO + assert not ea.is_sorted + assert ea.size == 10 + + +@pytest.fixture(params=['basic_property_graph_1', 'multi_edge_property_graph_1', 'multi_edge_multi_vertex_property_graph_1']) +def graph(request): + return request.getfixturevalue(request.param) + + +@pytest.fixture(params=['basic_property_graph_1', 'multi_edge_property_graph_1']) +def single_vertex_graph(request): + return request.getfixturevalue(request.param) + + +def test_get_edge_index(graph): + pG = graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + for edge_type in pG.edge_types: + src, dst = graph_store.get_edge_index( + edge_type=edge_type, + layout='coo', + is_sorted=False + ) + + assert pG.get_num_edges(edge_type) == len(src) + assert pG.get_num_edges(edge_type) == len(dst) + + edge_data = pG.get_edge_data( + types=[edge_type], + columns=[pG.src_col_name, pG.dst_col_name] + ) + edge_df = cudf.DataFrame({ + 'src':src, + 'dst':dst + }) + edge_df['counter'] = 1 + + merged_df = cudf.merge( + edge_data, + edge_df, + left_on=[pG.src_col_name, pG.dst_col_name], + right_on=['src','dst'] + ) + + assert merged_df.compute().counter.sum() == len(src) + + +def test_edge_types(graph): + pG = graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + eta = graph_store._edge_types_to_attrs + assert eta.keys() == pG.edge_types + + for attr_name, attr_repr in eta.items(): + assert pG.get_num_edges(attr_name) == attr_repr.size + assert attr_name == attr_repr.edge_type[1] + + +def test_get_subgraph(graph): + pG = graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + for edge_type in pG.edge_types: + sg = graph_store._subgraph([edge_type]) + assert isinstance(sg, cugraph.Graph) + assert sg.number_of_edges() == pG.get_num_edges(edge_type) + + sg = graph_store._subgraph(pG.edge_types) + assert isinstance(sg, cugraph.Graph) + + # duplicate edges are automatically dropped in from_edgelist + cols = [pG.src_col_name, pG.dst_col_name] + num_edges = pG.get_edge_data( + columns=cols + )[cols].drop_duplicates().compute().shape[0] + assert sg.number_of_edges() == num_edges + + +def test_neighbor_sample(single_vertex_graph): + pG = single_vertex_graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + noi_groups, row_dict, col_dict, _ = graph_store.neighbor_sample( + index=cupy.array([0,1,2,3,4], dtype='int32'), + num_neighbors=[-1], + replace=True, + directed=True, + edge_types=[ + v.edge_type + for v in graph_store._edge_types_to_attrs.values() + ] + ) + + expected_sample = cugraph.dask.uniform_neighbor_sample( + input_graph=pG.extract_subgraph( + default_edge_weight=1.0, + allow_multi_edges=True, + renumber_graph=True, + add_edge_data=False + ), + start_list=cudf.Series([0,1,2,3,4], dtype='int32'), + fanout_vals=[-1], + with_replacement=True, + ) + + for node_type, node_ids in noi_groups.items(): + actual_vertex_ids = pG.get_vertex_data( + types=[node_type], + columns=[pG.vertex_col_name] + )[pG.vertex_col_name].compute().to_cupy() + + assert list(node_ids) == list(actual_vertex_ids) + + cols = [pG.src_col_name,pG.dst_col_name,pG.type_col_name] + combined_df = cudf.DataFrame() + for edge_type, row in row_dict.items(): + col = col_dict[edge_type] + df = cudf.DataFrame({pG.src_col_name:row, pG.dst_col_name:col}) + df[pG.type_col_name] = edge_type.replace('__', '') + combined_df = cudf.concat([combined_df, df]) + + base_df = pG.get_edge_data().compute() + base_df = base_df[cols] + base_df = base_df.sort_values(cols) + base_df = base_df.reset_index().drop('index', axis=1) + + numbering = noi_groups[''] + renumber_df = cudf.Series( + range(len(numbering)), + index=numbering + ) + + combined_df[pG.src_col_name] = renumber_df.loc[combined_df[pG.src_col_name]].to_cupy() + combined_df[pG.dst_col_name] = renumber_df.loc[combined_df[pG.dst_col_name]].to_cupy() + combined_df = combined_df.sort_values(cols) + combined_df = combined_df.reset_index().drop('index', axis=1) + + assert combined_df.to_arrow().to_pylist() == base_df.to_arrow().to_pylist() + + +def test_neighbor_sample_multi_vertex(multi_edge_multi_vertex_property_graph_1): + pG = multi_edge_multi_vertex_property_graph_1 + feature_store, graph_store = to_pyg(pG, backend='cupy') + + ex = re.compile(r'[A-z]+__([A-z]+)__[A-z]+') + + noi_groups, row_dict, col_dict, _ = graph_store.neighbor_sample( + index=cupy.array([0,1,2,3,4], dtype='int32'), + num_neighbors=[-1], + replace=True, + directed=True, + edge_types=[ + v.edge_type + for v in graph_store._edge_types_to_attrs.values() + ] + ) + + for pyg_cpp_edge_type, srcs in row_dict.items(): + cugraph_edge_type = ex.match(pyg_cpp_edge_type).groups()[0] + num_edges = len(pG.get_edge_data(types=[cugraph_edge_type]).compute()) + assert num_edges == len(srcs) + + +def test_get_tensor(graph): + pG = graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + vertex_types = pG.vertex_types + for vertex_type in vertex_types: + for property_name in pG.vertex_property_names: + if property_name != 'vertex_type': + base_series = pG.get_vertex_data( + types=[vertex_type], + columns=[property_name, pG.vertex_col_name] + ) + + vertex_ids = base_series[pG.vertex_col_name].compute().to_cupy() + base_series = base_series[property_name].compute().to_cupy() + + tsr = feature_store.get_tensor( + vertex_type, + property_name, + vertex_ids + ) + + print(base_series) + print(tsr) + assert list(tsr) == list(base_series) + + +def test_multi_get_tensor(graph): + pG = graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + vertex_types = pG.vertex_types + for vertex_type in vertex_types: + for property_name in pG.vertex_property_names: + if property_name != 'vertex_type': + base_series = pG.get_vertex_data( + types=[vertex_type], + columns=[property_name, pG.vertex_col_name] + ) + + vertex_ids = base_series[pG.vertex_col_name].compute().to_cupy() + base_series = base_series[property_name].compute().to_cupy() + + tsr = feature_store.multi_get_tensor( + [[vertex_type, property_name, vertex_ids]] + ) + assert len(tsr) == 1 + tsr = tsr[0] + + print(base_series) + print(tsr) + assert list(tsr) == list(base_series) + + +def test_get_all_tensor_attrs(graph): + pG = graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + tensor_attrs = [] + for vertex_type in pG.vertex_types: + tensor_attrs.append(CuGraphTensorAttr( + vertex_type, + 'x' + )) + + assert tensor_attrs == feature_store.get_all_tensor_attrs() + + +def test_get_tensor_size(graph): + pG = graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + vertex_types = pG.vertex_types + for vertex_type in vertex_types: + for property_name in pG.vertex_property_names: + if property_name != 'vertex_type': + base_series = pG.get_vertex_data( + types=[vertex_type], + columns=[property_name, pG.vertex_col_name] + ) + + vertex_ids = base_series[pG.vertex_col_name].compute().to_cupy() + size = feature_store.get_tensor_size(vertex_type, property_name, vertex_ids) + + assert len(base_series) == size + + +def test_get_x(graph): + pG = graph + feature_store, graph_store = to_pyg(pG, backend='cupy') + + vertex_types = pG.vertex_types + for vertex_type in vertex_types: + base_df = pG.get_vertex_data( + types=[vertex_type] + ) + + base_x = base_df.drop( + pG.vertex_col_name, axis=1 + ).drop( + pG.type_col_name, axis=1 + ).compute().to_cupy().astype('float32') + + vertex_ids = base_df[pG.vertex_col_name].compute().to_cupy() + + tsr = feature_store.get_tensor( + vertex_type, + 'x', + vertex_ids + ) + + print(base_x) + print(tsr) + for t, b in zip(tsr, base_x): + assert list(t) == list(b) diff --git a/python/cugraph/cugraph/tests/test_pyg_extensions.py b/python/cugraph/cugraph/tests/test_pyg_extensions.py index 46557501be7..52dc8488039 100644 --- a/python/cugraph/cugraph/tests/test_pyg_extensions.py +++ b/python/cugraph/cugraph/tests/test_pyg_extensions.py @@ -1,3 +1,16 @@ +# Copyright (c) 2019-2022, NVIDIA CORPORATION. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + import cugraph from cugraph.experimental import PropertyGraph from cugraph.gnn.pyg_extensions import to_pyg @@ -15,6 +28,8 @@ import cupy import pytest +import re + @pytest.fixture def basic_property_graph_1(): @@ -70,6 +85,7 @@ def basic_property_graph_1(): return pG + @pytest.fixture def multi_edge_property_graph_1(): df = cudf.DataFrame({ @@ -148,6 +164,7 @@ def multi_edge_property_graph_1(): return pG + @pytest.fixture def multi_edge_multi_vertex_property_graph_1(): df = cudf.DataFrame({ @@ -237,6 +254,7 @@ def multi_edge_multi_vertex_property_graph_1(): return pG + def test_tensor_attr(): ta = CuGraphTensorAttr( 'group0', @@ -305,10 +323,17 @@ def test_edge_attr(): assert not ea.is_sorted assert ea.size == 10 + @pytest.fixture(params=['basic_property_graph_1', 'multi_edge_property_graph_1', 'multi_edge_multi_vertex_property_graph_1']) def graph(request): return request.getfixturevalue(request.param) + +@pytest.fixture(params=['basic_property_graph_1', 'multi_edge_property_graph_1']) +def single_vertex_graph(request): + return request.getfixturevalue(request.param) + + def test_get_edge_index(graph): pG = graph feature_store, graph_store = to_pyg(pG, backend='cupy') @@ -375,8 +400,8 @@ def test_get_subgraph(graph): assert sg.number_of_edges() == num_edges -def test_neighbor_sample(graph): - pG = graph +def test_neighbor_sample(single_vertex_graph): + pG = single_vertex_graph feature_store, graph_store = to_pyg(pG, backend='cupy') noi_groups, row_dict, col_dict, _ = graph_store.neighbor_sample( @@ -410,14 +435,45 @@ def test_neighbor_sample(graph): assert list(node_ids) == list(actual_vertex_ids) + cols = [pG.src_col_name,pG.dst_col_name,pG.type_col_name] combined_df = cudf.DataFrame() for edge_type, row in row_dict.items(): col = col_dict[edge_type] df = cudf.DataFrame({pG.src_col_name:row, pG.dst_col_name:col}) df[pG.type_col_name] = edge_type.replace('__', '') combined_df = cudf.concat([combined_df, df]) + combined_df = combined_df.sort_values(cols) combined_df = combined_df.reset_index().drop('index', axis=1) - assert combined_df == pG.get_edge_data()[[pG.src_col_name,pG.dst_col_name,pG.type_col_name]] + + base_df = pG.get_edge_data() + base_df = base_df[cols] + base_df = base_df.sort_values(cols) + base_df = base_df.reset_index().drop('index', axis=1) + + assert combined_df.to_arrow().to_pylist() == base_df.to_arrow().to_pylist() + + +def test_neighbor_sample_multi_vertex(multi_edge_multi_vertex_property_graph_1): + pG = multi_edge_multi_vertex_property_graph_1 + feature_store, graph_store = to_pyg(pG, backend='cupy') + + ex = re.compile(r'[A-z]+__([A-z]+)__[A-z]+') + + noi_groups, row_dict, col_dict, _ = graph_store.neighbor_sample( + index=cupy.array([0,1,2,3,4], dtype='int64'), + num_neighbors=[-1], + replace=True, + directed=True, + edge_types=[ + v.edge_type + for v in graph_store._edge_types_to_attrs.values() + ] + ) + + for pyg_cpp_edge_type, srcs in row_dict.items(): + cugraph_edge_type = ex.match(pyg_cpp_edge_type).groups()[0] + num_edges = len(pG.get_edge_data(types=[cugraph_edge_type])) + assert num_edges == len(srcs) def test_get_tensor(graph): @@ -487,6 +543,7 @@ def test_get_all_tensor_attrs(graph): assert tensor_attrs == feature_store.get_all_tensor_attrs() + def test_get_tensor_size(graph): pG = graph feature_store, graph_store = to_pyg(pG, backend='cupy') @@ -505,6 +562,7 @@ def test_get_tensor_size(graph): assert len(base_series) == size + def test_get_x(graph): pG = graph feature_store, graph_store = to_pyg(pG, backend='cupy') @@ -532,4 +590,4 @@ def test_get_x(graph): print(base_x) print(tsr) for t, b in zip(tsr, base_x): - assert list(t) == list(b) \ No newline at end of file + assert list(t) == list(b) From 7c1ad11a970ecb25b7f61375d1d8d9b606960be4 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Wed, 17 Aug 2022 16:47:56 +0000 Subject: [PATCH 54/71] fix style --- .../gnn/pyg_extensions/data/__init__.py | 13 ++ .../gnn/pyg_extensions/data/cugraph_store.py | 154 ++++++++++-------- .../loader/link_neighbor_loader.py | 36 ++-- .../pyg_extensions/loader/neighbor_loader.py | 13 +- .../tests/mg/test_mg_pyg_extensions.py | 117 +++++++------ .../cugraph/tests/test_pyg_extensions.py | 93 +++++------ 6 files changed, 237 insertions(+), 189 deletions(-) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/__init__.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/__init__.py index 8e39d8e7cb6..c583097e0aa 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/__init__.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/__init__.py @@ -1,3 +1,16 @@ +# Copyright (c) 2019-2022, NVIDIA CORPORATION. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + from cugraph.utilities.api_tools import experimental_warning_wrapper from cugraph.gnn.pyg_extensions.data.cugraph_store import EXPERIMENTAL__CuGraphStore diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py index 737f0a2ca96..b34ded27709 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py @@ -11,10 +11,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from cugraph.experimental import PropertyGraph from cugraph.experimental import MGPropertyGraph -from typing import List, Optional, Tuple, Any +from typing import Optional, Tuple, Any from enum import Enum import cupy @@ -22,9 +21,9 @@ import dask_cudf import cugraph -from datetime import datetime from dataclasses import dataclass + class EdgeLayout(Enum): COO = 'coo' CSC = 'csc' @@ -62,7 +61,7 @@ def __init__( self.layout = EdgeLayout(layout) self.is_sorted = is_sorted self.size = size - + @classmethod def cast(cls, *args, **kwargs): if len(args) == 1 and len(kwargs) == 0: @@ -77,6 +76,7 @@ def cast(cls, *args, **kwargs): return cls(**elem) return cls(*args, **kwargs) + def EXPERIMENTAL__to_pyg(G, backend='torch'): """ Returns the PyG wrappers for the provided PropertyGraph or @@ -92,10 +92,15 @@ def EXPERIMENTAL__to_pyg(G, backend='torch'): Tuple (CuGraphFeatureStore, CuGraphStore) Wrappers for the provided property graph. """ - return EXPERIMENTAL__CuGraphFeatureStore(G, backend=backend), EXPERIMENTAL__CuGraphStore(G, backend=backend) + return ( + EXPERIMENTAL__CuGraphFeatureStore(G, backend=backend), + EXPERIMENTAL__CuGraphStore(G, backend=backend) + ) + _field_status = Enum("FieldStatus", "UNSET") + @dataclass class CuGraphTensorAttr: r"""Defines the attributes of a class:`FeatureStore` tensor; in particular, @@ -142,7 +147,7 @@ def update(self, attr): for key in self.__dataclass_fields__: if attr.is_set(key): setattr(self, key, getattr(attr, key)) - + @classmethod def cast(cls, *args, **kwargs): if len(args) == 1 and len(kwargs) == 0: @@ -157,6 +162,7 @@ def cast(cls, *args, **kwargs): return cls(**elem) return cls(*args, **kwargs) + class EXPERIMENTAL__CuGraphStore: """ Duck-typed version of PyG's GraphStore. @@ -164,7 +170,7 @@ class EXPERIMENTAL__CuGraphStore: def __init__(self, G, backend='torch'): """ G : PropertyGraph or MGPropertyGraph - The cuGraph property graph where the + The cuGraph property graph where the data is being stored. backend : The backend that manages tensors (default = 'torch') Should usually be 'torch' ('torch', 'cupy' supported). @@ -187,7 +193,7 @@ def __init__(self, G, backend='torch'): self.__graph = G self.__subgraphs = {} - + self.__edge_type_lookup_table = G.get_edge_data( columns=[ G.src_col_name, @@ -206,16 +212,27 @@ def __init__(self, G, backend='torch'): dsts = dsts.compute() srcs = srcs.compute() - dst_types = self.__graph.get_vertex_data(vertex_ids=dsts, columns=['_TYPE_'])._TYPE_.unique() - src_types = self.__graph.get_vertex_data(vertex_ids=srcs, columns=['_TYPE_'])._TYPE_.unique() + dst_types = self.__graph.get_vertex_data( + vertex_ids=dsts, + columns=['_TYPE_'] + )._TYPE_.unique() + + src_types = self.__graph.get_vertex_data( + vertex_ids=srcs, + columns=['_TYPE_'] + )._TYPE_.unique() if self.is_mg: dst_types = dst_types.compute() src_types = src_types.compute() - + + err_string = ( + f'Edge type {edge_type} associated' + 'with multiple src/dst type pairs' + ) if len(dst_types) > 1 or len(src_types) > 1: - raise TypeError(f'Edge type {edge_type} has multiple src/dst type pairs associated with it') - + raise TypeError(err_string) + pyg_edge_type = (src_types[0], edge_type, dst_types[0]) self.__edge_types_to_attrs[edge_type] = CuGraphEdgeAttr( @@ -226,7 +243,7 @@ def __init__(self, G, backend='torch'): ) self.__dict__['_edge_attr_cls'] = CuGraphEdgeAttr - + @property def _edge_types_to_attrs(self): return dict(self.__edge_types_to_attrs) @@ -234,7 +251,7 @@ def _edge_types_to_attrs(self): @property def is_mg(self): return isinstance(self.__graph, MGPropertyGraph) - + def put_edge_index(self, edge_index, edge_attr): raise NotImplementedError('Adding indices not supported.') @@ -243,7 +260,7 @@ def get_all_edge_attrs(self): Returns all edge types and indices in this store. """ return self.__edge_types_to_attrs.values() - + def _get_edge_index(self, attr): # returns the edge index for particular edge type @@ -274,10 +291,10 @@ def _get_edge_index(self, attr): self.__graph.dst_col_name ] ) - + if self.is_mg: df = df.compute() - + src = self.from_dlpack(df[self.__graph.src_col_name].to_dlpack()) dst = self.from_dlpack(df[self.__graph.dst_col_name].to_dlpack()) if self.backend == 'torch': @@ -332,7 +349,7 @@ def _subgraph(self, edge_types): edge_types : list of edge types Directly references the graph's internal edge types. Does not accept PyG edge type tuples. - + Returns ------- The appropriate extracted subgraph. Will extract the subgraph @@ -340,18 +357,19 @@ def _subgraph(self, edge_types): """ edge_types = tuple(sorted(edge_types)) - + if edge_types not in self.__subgraphs: query = f'(_TYPE_=="{edge_types[0]}")' for t in edge_types[1:]: query += f' | (_TYPE_=="{t}")' selection = self.__graph.select_edges(query) + # FIXME enforce int type sg = self.__graph.extract_subgraph( selection=selection, default_edge_weight=1.0, allow_multi_edges=True, - renumber_graph=True, # FIXME enforce int type + renumber_graph=True, add_edge_data=False ) self.__subgraphs[edge_types] = sg @@ -365,33 +383,32 @@ def neighbor_sample( replace, directed, edge_types): - - start_time = datetime.now() - + if isinstance(num_neighbors, dict): # FIXME support variable num neighbors per edge type num_neighbors = list(num_neighbors.values())[0] - #FIXME eventually get uniform neighbor sample to accept longs - index = cupy.from_dlpack(index.__dlpack__()) #.astype('int32') + # FIXME eventually get uniform neighbor sample to accept longs + index = cupy.from_dlpack(index.__dlpack__()) # FIXME resolve the directed/undirected issue G = self._subgraph([et[1] for et in edge_types]) - - sampling_start = datetime.now() + index = cudf.Series(index) if self.is_mg: sampling_results = cugraph.dask.uniform_neighbor_sample( G, index, - list(num_neighbors), # conversion required by cugraph api + # conversion required by cugraph api + list(num_neighbors), replace ) else: sampling_results = cugraph.uniform_neighbor_sample( G, index, - list(num_neighbors), # conversion required by cugraph api + # conversion required by cugraph api + list(num_neighbors), replace ) @@ -428,8 +445,11 @@ def get_group(self, g): v = noi.get_group(t) if self.is_mg: v = v.compute() - noi_groups[t] = self.from_dlpack(v[self.__graph.vertex_col_name].to_dlpack()) - + + noi_groups[t] = self.from_dlpack( + v[self.__graph.vertex_col_name].to_dlpack() + ) + eoi = cudf.merge( sampling_results, self.__edge_type_lookup_table, @@ -444,12 +464,13 @@ def get_group(self, g): ) eoi_types = eoi[self.__graph.type_col_name].unique() eoi = eoi.groupby(self.__graph.type_col_name) - + if self.is_mg: eoi_types = eoi_types.compute() eoi_types = eoi_types.to_pandas() - # PyG expects these to be pre-renumbered; the pre-renumbering must match + # PyG expects these to be pre-renumbered; + # the pre-renumbering must match # the auto-renumbering row_dict = {} col_dict = {} @@ -462,7 +483,7 @@ def get_group(self, g): sources = gr.sources src_id_table = cudf.DataFrame( - {'id':range(len(noi_groups[t_pyg_type[0]]))}, + {'id': range(len(noi_groups[t_pyg_type[0]]))}, index=cudf.from_dlpack(noi_groups[t_pyg_type[0]].__dlpack__()) ) @@ -470,10 +491,10 @@ def get_group(self, g): src_id_table.loc[sources].to_dlpack() ) row_dict[t_pyg_c_type] = src - + destinations = gr.destinations dst_id_table = cudf.DataFrame( - {'id':range(len(noi_groups[t_pyg_type[2]]))}, + {'id': range(len(noi_groups[t_pyg_type[2]]))}, index=cudf.from_dlpack(noi_groups[t_pyg_type[2]].__dlpack__()) ) dst = self.from_dlpack( @@ -481,9 +502,9 @@ def get_group(self, g): ) col_dict[t_pyg_c_type] = dst - #FIXME handle edge ids + # FIXME handle edge ids return (noi_groups, row_dict, col_dict, None) - + class EXPERIMENTAL__CuGraphFeatureStore: """ @@ -508,7 +529,7 @@ def __init__(self, G, reserved_keys=[], backend='torch'): from cupy import float32 as property_type else: raise ValueError(f'Invalid backend {backend}.') - + self.backend = backend self.from_dlpack = from_dlpack self.vertex_type = vertex_type @@ -518,49 +539,48 @@ def __init__(self, G, reserved_keys=[], backend='torch'): self.__reserved_keys = list(reserved_keys) self.__dict__['_tensor_attr_cls'] = CuGraphTensorAttr + # TODO ensure all x properties are float32 type + # TODO ensure y is of long type - #TODO ensure all x properties are float32 type - #TODO ensure y is of long type - @property def is_mg(self): return isinstance(self.__graph, MGPropertyGraph) - + def put_tensor(self, tensor, attr): raise NotImplementedError('Adding properties not supported.') - + def create_named_tensor(self, attr, properties): """ Create a named tensor that contains a subset of properties in the graph. """ - #FIXME implement this to allow props other than x and y + # FIXME implement this to allow props other than x and y raise NotImplementedError('Not yet supported') - + def get_all_tensor_attrs(self): r"""Obtains all tensor attributes stored in this feature store.""" attrs = [] for vertex_type in self.__graph.vertex_types: - #FIXME handle differing properties by type - # once property graph supports it + # FIXME handle differing properties by type + # once property graph supports it - #FIXME allow props other than x and y - attrs.append( + # FIXME allow props other than x and y + attrs.append( CuGraphTensorAttr(vertex_type, 'x') - ) - if 'y' in self.__graph.vertex_property_names: + ) + if 'y' in self.__graph.vertex_property_names: attrs.append( CuGraphTensorAttr(vertex_type, 'y') ) - + return attrs - + def _get_tensor(self, attr): if attr.attr_name == 'x': cols = None else: cols = [attr.attr_name] - + idx = attr.index if self.backend == 'torch' and not idx.is_cuda: idx = idx.cuda() @@ -575,16 +595,16 @@ def _get_tensor(self, attr): ) else: df = self.__graph.get_vertex_data( - vertex_ids=idx, + vertex_ids=idx, types=[attr.group_name], columns=cols ) - #FIXME allow properties other than x and y + # FIXME allow properties other than x and y if attr.attr_name == 'x': if 'y' in df.columns: df = df.drop('y', axis=1) - + idx_cols = [ self.__graph.type_col_name, self.__graph.vertex_col_name @@ -596,9 +616,7 @@ def _get_tensor(self, attr): if self.is_mg: df = df.compute() - #FIXME handle vertices without properties - print('printing df!') - print(df) + # FIXME handle vertices without properties output = self.from_dlpack( df.fillna(0).to_dlpack() ) @@ -613,7 +631,7 @@ def _get_tensor(self, attr): raise ValueError(f'invalid backend {self.backend}') return output - + def _multi_get_tensor(self, attrs): return [self._get_tensor(attr) for attr in attrs] @@ -643,11 +661,11 @@ def multi_get_tensor(self, attrs): f"'UNSET' fields") tensors = self._multi_get_tensor(attrs) - + bad_attrs = [attrs[i] for i, v in enumerate(tensors) if v is None] if len(bad_attrs) > 0: raise KeyError(f"Tensors corresponding to attributes " - f"'{bad_attrs}' were not found") + f"'{bad_attrs}' were not found") return [ tensor @@ -688,7 +706,7 @@ def get_tensor(self, *args, **kwargs): def _get_tensor_size(self, attr): return self._get_tensor(attr).size - + def get_tensor_size(self, *args, **kwargs): r"""Obtains the size of a tensor given its attributes, or :obj:`None` if the tensor does not exist.""" @@ -699,7 +717,7 @@ def get_tensor_size(self, *args, **kwargs): def _remove_tensor(self, attr): raise NotImplementedError('Removing features not supported') - + def __len__(self): return len(self.get_all_tensor_attrs()) @@ -714,4 +732,4 @@ def edge_type_to_str(edge_type): """ # Since C++ cannot take dictionaries with tuples as key as input, edge type # triplets need to be converted into single strings. - return edge_type if isinstance(edge_type, str) else '__'.join(edge_type) \ No newline at end of file + return edge_type if isinstance(edge_type, str) else '__'.join(edge_type) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py b/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py index de6b96413a3..a3d48f2ad2f 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py @@ -12,8 +12,9 @@ # limitations under the License. from torch_geometric.loader.link_neighbor_loader import Dataset -from cugraph.gnn.pyg_extensions.loader.neighbor_loader import EXPERIMENTAL__CuGraphNeighborSampler -from cugraph.gnn.pyg_extensions.loader.neighbor_loader import EXPERIMENTAL__CuGraphNeighborLoader +from cugraph.gnn.pyg_extensions.loader.neighbor_loader import ( + EXPERIMENTAL__CuGraphNeighborSampler +) from typing import Any, Callable, Iterator, List, Optional, Tuple, Union @@ -24,14 +25,15 @@ from torch_geometric.data.feature_store import FeatureStore from torch_geometric.data.graph_store import ( GraphStore, - EdgeAttr, EdgeLayout ) from torch_geometric.loader.base import DataLoaderIterator from torch_geometric.loader.utils import filter_custom_store from torch_geometric.typing import InputEdges, NumNeighbors, OptTensor -class EXPERIMENTAL__CuGraphLinkNeighborSampler(EXPERIMENTAL__CuGraphNeighborSampler): + +class EXPERIMENTAL__CuGraphLinkNeighborSampler( + EXPERIMENTAL__CuGraphNeighborSampler): def __init__( self, data, @@ -106,7 +108,7 @@ def __call__(self, query: List[Tuple[Tensor]]): query_nodes = edge_label_index.view(-1) query_nodes, reverse = query_nodes.unique(return_inverse=True) edge_label_index = reverse.view(2, -1) - + out = self.graph_store.neighbor_sample( query_nodes, self.num_neighbors, @@ -118,6 +120,7 @@ def __call__(self, query: List[Tuple[Tensor]]): # Call cuGraph sampler return out + (edge_label_index, edge_label) + class EXPERIMENTAL__CuGraphLinkNeighborLoader(torch.utils.data.DataLoader): r"""A link-based data loader derived as an extension of the node-based :class:`torch_geometric.loader.NeighborLoader`. @@ -205,7 +208,9 @@ def __init__( transform: Callable = None, is_sorted: bool = False, filter_per_worker: bool = False, - neighbor_sampler: Optional[EXPERIMENTAL__CuGraphLinkNeighborSampler] = None, + neighbor_sampler: Optional[ + EXPERIMENTAL__CuGraphLinkNeighborSampler + ] = None, **kwargs, ): # Remove for PyTorch Lightning: @@ -213,7 +218,7 @@ def __init__( del kwargs['dataset'] if 'collate_fn' in kwargs: del kwargs['collate_fn'] - + if num_src_nodes is not None: raise ValueError('num_src_nodes parameter is not supported!') if num_dst_nodes is not None: @@ -251,14 +256,14 @@ def __init__( super().__init__(Dataset(edge_label_index, edge_label), collate_fn=self.collate_fn, **kwargs) - + def filter_fn(self, out: Any) -> Union[Data, HeteroData]: (node_dict, row_dict, col_dict, edge_dict, edge_label_index, edge_label) = out feature_store, graph_store = self.data - + data = filter_custom_store(feature_store, graph_store, node_dict, - row_dict, col_dict, edge_dict) + row_dict, col_dict, edge_dict) edge_type = self.neighbor_sampler.input_type data[edge_type].edge_label_index = edge_label_index if edge_label is not None: @@ -285,7 +290,7 @@ def __repr__(self) -> str: def get_edge_label_index(data: Tuple[FeatureStore, GraphStore], edge_label_index: InputEdges - ) -> Tuple[Optional[str], Tensor]: + ) -> Tuple[Optional[str], Tensor]: _, graph_store = data # Need the edge index in COO for LinkNeighborLoader: @@ -297,9 +302,10 @@ def _get_edge_index(edge_type): ) return torch.stack((row, col), dim=0) - if isinstance(edge_label_index, str) or isinstance(edge_label_index[0], str): - edge_type = edge_label_index - return edge_type, _get_edge_index(edge_type) + if isinstance(edge_label_index, str): + if isinstance(edge_label_index[0], str): + edge_type = edge_label_index + return edge_type, _get_edge_index(edge_type) assert len(edge_label_index) == 2 edge_type, edge_label_index = edge_label_index @@ -307,4 +313,4 @@ def _get_edge_index(edge_type): if edge_label_index is None: return edge_type, _get_edge_index(edge_type) - return edge_type, edge_label_index \ No newline at end of file + return edge_type, edge_label_index diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/loader/neighbor_loader.py b/python/cugraph/cugraph/gnn/pyg_extensions/loader/neighbor_loader.py index 3b14e35a0c5..96f8fe6aa85 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/loader/neighbor_loader.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/loader/neighbor_loader.py @@ -11,14 +11,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -from collections.abc import Sequence -from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union +from typing import Any, Callable, Iterator, List, Optional, Tuple, Union import torch from torch import Tensor -from torch_geometric.data import Data, HeteroData -from torch_geometric.data.feature_store import FeatureStore, TensorAttr +from torch_geometric.data import HeteroData +from torch_geometric.data.feature_store import FeatureStore from torch_geometric.data.graph_store import GraphStore from torch_geometric.loader.base import DataLoaderIterator from torch_geometric.loader.neighbor_loader import get_input_nodes @@ -211,7 +210,9 @@ def __init__( transform: Callable = None, is_sorted: bool = False, filter_per_worker: bool = False, - neighbor_sampler: Optional[EXPERIMENTAL__CuGraphNeighborSampler] = None, + neighbor_sampler: Optional[ + EXPERIMENTAL__CuGraphNeighborSampler + ] = None, **kwargs, ): # Remove for PyTorch Lightning: @@ -253,7 +254,7 @@ def filter_fn(self, out: Any) -> HeteroData: node_dict, row_dict, col_dict, edge_dict, batch_size = out feature_store, graph_store = self.data data = filter_custom_store(feature_store, graph_store, node_dict, - row_dict, col_dict, edge_dict) + row_dict, col_dict, edge_dict) data[self.neighbor_sampler.input_type].batch_size = batch_size return data if self.transform is None else self.transform(data) diff --git a/python/cugraph/cugraph/tests/mg/test_mg_pyg_extensions.py b/python/cugraph/cugraph/tests/mg/test_mg_pyg_extensions.py index 8da556bb62e..f146250114c 100644 --- a/python/cugraph/cugraph/tests/mg/test_mg_pyg_extensions.py +++ b/python/cugraph/cugraph/tests/mg/test_mg_pyg_extensions.py @@ -14,10 +14,6 @@ import cugraph from cugraph.experimental import MGPropertyGraph from cugraph.gnn.pyg_extensions import to_pyg -from cugraph.gnn.pyg_extensions.data import ( - CuGraphStore, - CuGraphFeatureStore -) from cugraph.gnn.pyg_extensions.data.cugraph_store import ( CuGraphTensorAttr, CuGraphEdgeAttr, @@ -54,7 +50,7 @@ def basic_property_graph_1(dask_client): 4, 1 ], dtype='int32') - }), + }), npartitions=2 ), vertex_col_names=['src', 'dst'] @@ -140,7 +136,7 @@ def multi_edge_property_graph_1(dask_client): pG = MGPropertyGraph() for edge_type in df.edge_type.unique().compute().to_pandas(): pG.add_edge_data( - df[df.edge_type==edge_type], + df[df.edge_type == edge_type], vertex_col_names=['src', 'dst'], type_name=edge_type ) @@ -225,7 +221,7 @@ def multi_edge_multi_vertex_property_graph_1(dask_client): pG = MGPropertyGraph() for edge_type in df.edge_type.compute().unique().to_pandas(): pG.add_edge_data( - df[df.edge_type==edge_type], + df[df.edge_type == edge_type], vertex_col_names=['src', 'dst'], type_name=edge_type ) @@ -265,8 +261,9 @@ def multi_edge_multi_vertex_property_graph_1(dask_client): ) for vertex_type in vdf.vertex_type.unique().compute().to_pandas(): + vd = vdf[vdf.vertex_type == vertex_type].drop('vertex_type', axis=1) pG.add_vertex_data( - vdf[vdf.vertex_type==vertex_type].drop('vertex_type', axis=1), + vd, vertex_col_name='id', type_name=vertex_type ) @@ -301,7 +298,7 @@ def test_tensor_attr(): ) assert casted_ta2.index == [1, 2, 3] assert not casted_ta2.is_fully_specified() - + casted_ta3 = CuGraphTensorAttr.cast( 'group2', 'property2', @@ -329,7 +326,7 @@ def test_edge_attr(): layout='csr', is_sorted=True ) - assert ea.size == None + assert ea.size is None ea = CuGraphEdgeAttr.cast( 'type0', @@ -343,12 +340,20 @@ def test_edge_attr(): assert ea.size == 10 -@pytest.fixture(params=['basic_property_graph_1', 'multi_edge_property_graph_1', 'multi_edge_multi_vertex_property_graph_1']) +@pytest.fixture( + params=[ + 'basic_property_graph_1', + 'multi_edge_property_graph_1', + 'multi_edge_multi_vertex_property_graph_1' + ] +) def graph(request): return request.getfixturevalue(request.param) -@pytest.fixture(params=['basic_property_graph_1', 'multi_edge_property_graph_1']) +@pytest.fixture( + params=['basic_property_graph_1', 'multi_edge_property_graph_1'] +) def single_vertex_graph(request): return request.getfixturevalue(request.param) @@ -363,7 +368,7 @@ def test_get_edge_index(graph): layout='coo', is_sorted=False ) - + assert pG.get_num_edges(edge_type) == len(src) assert pG.get_num_edges(edge_type) == len(dst) @@ -372,8 +377,8 @@ def test_get_edge_index(graph): columns=[pG.src_col_name, pG.dst_col_name] ) edge_df = cudf.DataFrame({ - 'src':src, - 'dst':dst + 'src': src, + 'dst': dst }) edge_df['counter'] = 1 @@ -381,7 +386,7 @@ def test_get_edge_index(graph): edge_data, edge_df, left_on=[pG.src_col_name, pG.dst_col_name], - right_on=['src','dst'] + right_on=['src', 'dst'] ) assert merged_df.compute().counter.sum() == len(src) @@ -410,7 +415,7 @@ def test_get_subgraph(graph): sg = graph_store._subgraph(pG.edge_types) assert isinstance(sg, cugraph.Graph) - + # duplicate edges are automatically dropped in from_edgelist cols = [pG.src_col_name, pG.dst_col_name] num_edges = pG.get_edge_data( @@ -424,7 +429,7 @@ def test_neighbor_sample(single_vertex_graph): feature_store, graph_store = to_pyg(pG, backend='cupy') noi_groups, row_dict, col_dict, _ = graph_store.neighbor_sample( - index=cupy.array([0,1,2,3,4], dtype='int32'), + index=cupy.array([0, 1, 2, 3, 4], dtype='int32'), num_neighbors=[-1], replace=True, directed=True, @@ -434,18 +439,6 @@ def test_neighbor_sample(single_vertex_graph): ] ) - expected_sample = cugraph.dask.uniform_neighbor_sample( - input_graph=pG.extract_subgraph( - default_edge_weight=1.0, - allow_multi_edges=True, - renumber_graph=True, - add_edge_data=False - ), - start_list=cudf.Series([0,1,2,3,4], dtype='int32'), - fanout_vals=[-1], - with_replacement=True, - ) - for node_type, node_ids in noi_groups.items(): actual_vertex_ids = pG.get_vertex_data( types=[node_type], @@ -453,12 +446,12 @@ def test_neighbor_sample(single_vertex_graph): )[pG.vertex_col_name].compute().to_cupy() assert list(node_ids) == list(actual_vertex_ids) - - cols = [pG.src_col_name,pG.dst_col_name,pG.type_col_name] + + cols = [pG.src_col_name, pG.dst_col_name, pG.type_col_name] combined_df = cudf.DataFrame() for edge_type, row in row_dict.items(): col = col_dict[edge_type] - df = cudf.DataFrame({pG.src_col_name:row, pG.dst_col_name:col}) + df = cudf.DataFrame({pG.src_col_name: row, pG.dst_col_name: col}) df[pG.type_col_name] = edge_type.replace('__', '') combined_df = cudf.concat([combined_df, df]) @@ -473,22 +466,27 @@ def test_neighbor_sample(single_vertex_graph): index=numbering ) - combined_df[pG.src_col_name] = renumber_df.loc[combined_df[pG.src_col_name]].to_cupy() - combined_df[pG.dst_col_name] = renumber_df.loc[combined_df[pG.dst_col_name]].to_cupy() + combined_df[pG.src_col_name] = ( + renumber_df.loc[combined_df[pG.src_col_name]].to_cupy() + ) + combined_df[pG.dst_col_name] = ( + renumber_df.loc[combined_df[pG.dst_col_name]].to_cupy() + ) combined_df = combined_df.sort_values(cols) combined_df = combined_df.reset_index().drop('index', axis=1) assert combined_df.to_arrow().to_pylist() == base_df.to_arrow().to_pylist() -def test_neighbor_sample_multi_vertex(multi_edge_multi_vertex_property_graph_1): +def test_neighbor_sample_multi_vertex( + multi_edge_multi_vertex_property_graph_1): pG = multi_edge_multi_vertex_property_graph_1 feature_store, graph_store = to_pyg(pG, backend='cupy') ex = re.compile(r'[A-z]+__([A-z]+)__[A-z]+') noi_groups, row_dict, col_dict, _ = graph_store.neighbor_sample( - index=cupy.array([0,1,2,3,4], dtype='int32'), + index=cupy.array([0, 1, 2, 3, 4], dtype='int32'), num_neighbors=[-1], replace=True, directed=True, @@ -497,7 +495,7 @@ def test_neighbor_sample_multi_vertex(multi_edge_multi_vertex_property_graph_1): for v in graph_store._edge_types_to_attrs.values() ] ) - + for pyg_cpp_edge_type, srcs in row_dict.items(): cugraph_edge_type = ex.match(pyg_cpp_edge_type).groups()[0] num_edges = len(pG.get_edge_data(types=[cugraph_edge_type]).compute()) @@ -516,10 +514,13 @@ def test_get_tensor(graph): types=[vertex_type], columns=[property_name, pG.vertex_col_name] ) - - vertex_ids = base_series[pG.vertex_col_name].compute().to_cupy() - base_series = base_series[property_name].compute().to_cupy() - + + vertex_ids = base_series[pG.vertex_col_name] + vertex_ids = vertex_ids.compute().to_cupy() + + base_series = base_series[property_name] + base_series = base_series.compute().to_cupy() + tsr = feature_store.get_tensor( vertex_type, property_name, @@ -543,15 +544,18 @@ def test_multi_get_tensor(graph): types=[vertex_type], columns=[property_name, pG.vertex_col_name] ) - - vertex_ids = base_series[pG.vertex_col_name].compute().to_cupy() - base_series = base_series[property_name].compute().to_cupy() + + vertex_ids = base_series[pG.vertex_col_name] + vertex_ids = vertex_ids.compute().to_cupy() + + base_series = base_series[property_name] + base_series = base_series.compute().to_cupy() tsr = feature_store.multi_get_tensor( [[vertex_type, property_name, vertex_ids]] ) assert len(tsr) == 1 - tsr = tsr[0] + tsr = tsr[0] print(base_series) print(tsr) @@ -568,7 +572,7 @@ def test_get_all_tensor_attrs(graph): vertex_type, 'x' )) - + assert tensor_attrs == feature_store.get_all_tensor_attrs() @@ -579,14 +583,19 @@ def test_get_tensor_size(graph): vertex_types = pG.vertex_types for vertex_type in vertex_types: for property_name in pG.vertex_property_names: - if property_name != 'vertex_type': + if property_name != 'vertex_type': base_series = pG.get_vertex_data( types=[vertex_type], columns=[property_name, pG.vertex_col_name] ) - - vertex_ids = base_series[pG.vertex_col_name].compute().to_cupy() - size = feature_store.get_tensor_size(vertex_type, property_name, vertex_ids) + + vertex_ids = base_series[pG.vertex_col_name] + vertex_ids = vertex_ids.compute().to_cupy() + size = feature_store.get_tensor_size( + vertex_type, + property_name, + vertex_ids + ) assert len(base_series) == size @@ -600,15 +609,15 @@ def test_get_x(graph): base_df = pG.get_vertex_data( types=[vertex_type] ) - + base_x = base_df.drop( pG.vertex_col_name, axis=1 ).drop( pG.type_col_name, axis=1 ).compute().to_cupy().astype('float32') - + vertex_ids = base_df[pG.vertex_col_name].compute().to_cupy() - + tsr = feature_store.get_tensor( vertex_type, 'x', diff --git a/python/cugraph/cugraph/tests/test_pyg_extensions.py b/python/cugraph/cugraph/tests/test_pyg_extensions.py index 52dc8488039..99ae1e0a132 100644 --- a/python/cugraph/cugraph/tests/test_pyg_extensions.py +++ b/python/cugraph/cugraph/tests/test_pyg_extensions.py @@ -14,10 +14,6 @@ import cugraph from cugraph.experimental import PropertyGraph from cugraph.gnn.pyg_extensions import to_pyg -from cugraph.gnn.pyg_extensions.data import ( - CuGraphStore, - CuGraphFeatureStore -) from cugraph.gnn.pyg_extensions.data.cugraph_store import ( CuGraphTensorAttr, CuGraphEdgeAttr, @@ -130,7 +126,7 @@ def multi_edge_property_graph_1(): pG = PropertyGraph() for edge_type in df.edge_type.unique().to_pandas(): pG.add_edge_data( - df[df.edge_type==edge_type], + df[df.edge_type == edge_type], vertex_col_names=['src', 'dst'], type_name=edge_type ) @@ -209,7 +205,7 @@ def multi_edge_multi_vertex_property_graph_1(): pG = PropertyGraph() for edge_type in df.edge_type.unique().to_pandas(): pG.add_edge_data( - df[df.edge_type==edge_type], + df[df.edge_type == edge_type], vertex_col_names=['src', 'dst'], type_name=edge_type ) @@ -246,8 +242,9 @@ def multi_edge_multi_vertex_property_graph_1(): }) for vertex_type in vdf.vertex_type.unique().to_pandas(): + vd = vdf[vdf.vertex_type == vertex_type].drop('vertex_type', axis=1) pG.add_vertex_data( - vdf[vdf.vertex_type==vertex_type].drop('vertex_type', axis=1), + vd, vertex_col_name='id', type_name=vertex_type ) @@ -282,7 +279,7 @@ def test_tensor_attr(): ) assert casted_ta2.index == [1, 2, 3] assert not casted_ta2.is_fully_specified() - + casted_ta3 = CuGraphTensorAttr.cast( 'group2', 'property2', @@ -310,7 +307,7 @@ def test_edge_attr(): layout='csr', is_sorted=True ) - assert ea.size == None + assert ea.size is None ea = CuGraphEdgeAttr.cast( 'type0', @@ -324,12 +321,23 @@ def test_edge_attr(): assert ea.size == 10 -@pytest.fixture(params=['basic_property_graph_1', 'multi_edge_property_graph_1', 'multi_edge_multi_vertex_property_graph_1']) +@pytest.fixture( + params=[ + 'basic_property_graph_1', + 'multi_edge_property_graph_1', + 'multi_edge_multi_vertex_property_graph_1' + ] +) def graph(request): return request.getfixturevalue(request.param) -@pytest.fixture(params=['basic_property_graph_1', 'multi_edge_property_graph_1']) +@pytest.fixture( + params=[ + 'basic_property_graph_1', + 'multi_edge_property_graph_1' + ] +) def single_vertex_graph(request): return request.getfixturevalue(request.param) @@ -344,7 +352,7 @@ def test_get_edge_index(graph): layout='coo', is_sorted=False ) - + assert pG.get_num_edges(edge_type) == len(src) assert pG.get_num_edges(edge_type) == len(dst) @@ -353,8 +361,8 @@ def test_get_edge_index(graph): columns=[pG.src_col_name, pG.dst_col_name] ) edge_df = cudf.DataFrame({ - 'src':src, - 'dst':dst + 'src': src, + 'dst': dst }) edge_df['counter'] = 1 @@ -362,7 +370,7 @@ def test_get_edge_index(graph): edge_data, edge_df, left_on=[pG.src_col_name, pG.dst_col_name], - right_on=['src','dst'] + right_on=['src', 'dst'] ) assert merged_df.counter.sum() == len(src) @@ -391,7 +399,7 @@ def test_get_subgraph(graph): sg = graph_store._subgraph(pG.edge_types) assert isinstance(sg, cugraph.Graph) - + # duplicate edges are automatically dropped in from_edgelist cols = [pG.src_col_name, pG.dst_col_name] num_edges = pG.get_edge_data( @@ -405,7 +413,7 @@ def test_neighbor_sample(single_vertex_graph): feature_store, graph_store = to_pyg(pG, backend='cupy') noi_groups, row_dict, col_dict, _ = graph_store.neighbor_sample( - index=cupy.array([0,1,2,3,4], dtype='int64'), + index=cupy.array([0, 1, 2, 3, 4], dtype='int64'), num_neighbors=[-1], replace=True, directed=True, @@ -415,18 +423,6 @@ def test_neighbor_sample(single_vertex_graph): ] ) - expected_sample = cugraph.uniform_neighbor_sample( - G=pG.extract_subgraph( - default_edge_weight=1.0, - allow_multi_edges=True, - renumber_graph=False, - add_edge_data=False - ), - start_list=cupy.array([0,1,2,3,4], dtype='int64'), - fanout_vals=[-1], - with_replacement=True, - ) - for node_type, node_ids in noi_groups.items(): actual_vertex_ids = pG.get_vertex_data( types=[node_type], @@ -434,12 +430,12 @@ def test_neighbor_sample(single_vertex_graph): )[pG.vertex_col_name].to_cupy() assert list(node_ids) == list(actual_vertex_ids) - - cols = [pG.src_col_name,pG.dst_col_name,pG.type_col_name] + + cols = [pG.src_col_name, pG.dst_col_name, pG.type_col_name] combined_df = cudf.DataFrame() for edge_type, row in row_dict.items(): col = col_dict[edge_type] - df = cudf.DataFrame({pG.src_col_name:row, pG.dst_col_name:col}) + df = cudf.DataFrame({pG.src_col_name: row, pG.dst_col_name: col}) df[pG.type_col_name] = edge_type.replace('__', '') combined_df = cudf.concat([combined_df, df]) combined_df = combined_df.sort_values(cols) @@ -453,14 +449,15 @@ def test_neighbor_sample(single_vertex_graph): assert combined_df.to_arrow().to_pylist() == base_df.to_arrow().to_pylist() -def test_neighbor_sample_multi_vertex(multi_edge_multi_vertex_property_graph_1): +def test_neighbor_sample_multi_vertex( + multi_edge_multi_vertex_property_graph_1): pG = multi_edge_multi_vertex_property_graph_1 feature_store, graph_store = to_pyg(pG, backend='cupy') ex = re.compile(r'[A-z]+__([A-z]+)__[A-z]+') noi_groups, row_dict, col_dict, _ = graph_store.neighbor_sample( - index=cupy.array([0,1,2,3,4], dtype='int64'), + index=cupy.array([0, 1, 2, 3, 4], dtype='int64'), num_neighbors=[-1], replace=True, directed=True, @@ -469,7 +466,7 @@ def test_neighbor_sample_multi_vertex(multi_edge_multi_vertex_property_graph_1): for v in graph_store._edge_types_to_attrs.values() ] ) - + for pyg_cpp_edge_type, srcs in row_dict.items(): cugraph_edge_type = ex.match(pyg_cpp_edge_type).groups()[0] num_edges = len(pG.get_edge_data(types=[cugraph_edge_type])) @@ -488,10 +485,10 @@ def test_get_tensor(graph): types=[vertex_type], columns=[property_name, pG.vertex_col_name] ) - + vertex_ids = base_series[pG.vertex_col_name].to_cupy() base_series = base_series[property_name].to_cupy() - + tsr = feature_store.get_tensor( vertex_type, property_name, @@ -515,7 +512,7 @@ def test_multi_get_tensor(graph): types=[vertex_type], columns=[property_name, pG.vertex_col_name] ) - + vertex_ids = base_series[pG.vertex_col_name].to_cupy() base_series = base_series[property_name].to_cupy() @@ -523,7 +520,7 @@ def test_multi_get_tensor(graph): [[vertex_type, property_name, vertex_ids]] ) assert len(tsr) == 1 - tsr = tsr[0] + tsr = tsr[0] print(base_series) print(tsr) @@ -540,7 +537,7 @@ def test_get_all_tensor_attrs(graph): vertex_type, 'x' )) - + assert tensor_attrs == feature_store.get_all_tensor_attrs() @@ -551,14 +548,18 @@ def test_get_tensor_size(graph): vertex_types = pG.vertex_types for vertex_type in vertex_types: for property_name in pG.vertex_property_names: - if property_name != 'vertex_type': + if property_name != 'vertex_type': base_series = pG.get_vertex_data( types=[vertex_type], columns=[property_name, pG.vertex_col_name] ) - + vertex_ids = base_series[pG.vertex_col_name].to_cupy() - size = feature_store.get_tensor_size(vertex_type, property_name, vertex_ids) + size = feature_store.get_tensor_size( + vertex_type, + property_name, + vertex_ids + ) assert len(base_series) == size @@ -572,15 +573,15 @@ def test_get_x(graph): base_df = pG.get_vertex_data( types=[vertex_type] ) - + base_x = base_df.drop( pG.vertex_col_name, axis=1 ).drop( pG.type_col_name, axis=1 ).to_cupy().astype('float32') - + vertex_ids = base_df[pG.vertex_col_name].to_cupy() - + tsr = feature_store.get_tensor( vertex_type, 'x', From 5a1a5acf1e154a40b2b82ae90566db4f10d02dac Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Wed, 17 Aug 2022 17:23:24 +0000 Subject: [PATCH 55/71] add the sg sampling fix --- .../sampling/uniform_neighbor_sample.py | 5 ++- ....py => test_mg_uniform_neighbor_sample.py} | 37 ++++++++++++++++++- ...ing.py => test_uniform_neighbor_sample.py} | 31 ++++++++++++++++ 3 files changed, 70 insertions(+), 3 deletions(-) rename python/cugraph/cugraph/tests/mg/{test_mg_neighborhood_sampling.py => test_mg_uniform_neighbor_sample.py} (88%) rename python/cugraph/cugraph/tests/{test_neighborhood_sampling.py => test_uniform_neighbor_sample.py} (91%) diff --git a/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py b/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py index c9ce13de831..9104c1a42e0 100644 --- a/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py +++ b/python/cugraph/cugraph/sampling/uniform_neighbor_sample.py @@ -79,7 +79,10 @@ def uniform_neighbor_sample(G, raise TypeError("fanout_vals must be a list, " f"got: {type(fanout_vals)}") - weight_t = G.edgelist.edgelist_df['weights'].dtype + if 'weights' in G.edgelist.edgelist_df: + weight_t = G.edgelist.edgelist_df['weights'].dtype + else: + weight_t = 'float32' if G.renumbered is True: if isinstance(start_list, cudf.DataFrame): diff --git a/python/cugraph/cugraph/tests/mg/test_mg_neighborhood_sampling.py b/python/cugraph/cugraph/tests/mg/test_mg_uniform_neighbor_sample.py similarity index 88% rename from python/cugraph/cugraph/tests/mg/test_mg_neighborhood_sampling.py rename to python/cugraph/cugraph/tests/mg/test_mg_uniform_neighbor_sample.py index 932b4d20d93..d392085932a 100644 --- a/python/cugraph/cugraph/tests/mg/test_mg_neighborhood_sampling.py +++ b/python/cugraph/cugraph/tests/mg/test_mg_uniform_neighbor_sample.py @@ -98,7 +98,7 @@ def input_combo(request): return parameters -def test_mg_neighborhood_sampling_simple(dask_client, input_combo): +def test_mg_uniform_neighbor_sample_simple(dask_client, input_combo): dg = input_combo["MGGraph"] @@ -160,7 +160,7 @@ def test_mg_neighborhood_sampling_simple(dask_client, input_combo): @pytest.mark.parametrize("directed", IS_DIRECTED) -def test_mg_neighborhood_sampling_tree(dask_client, directed): +def test_mg_uniform_neighbor_sample_tree(dask_client, directed): input_data_path = (utils.RAPIDS_DATASET_ROOT_DIR_PATH / "small_tree.csv").as_posix() @@ -216,3 +216,36 @@ def test_mg_neighborhood_sampling_tree(dask_client, directed): # The vertices in start_list must be a subsets of the vertices # in the result assert set(start_list).issubset(set(result_nbr_vertices)) + + +def test_mg_uniform_neighbor_sample_unweighted(dask_client): + df = cudf.DataFrame({ + 'src': [0, 1, 2, 2, 0, 1, 4, 4], + 'dst': [3, 2, 1, 4, 1, 3, 1, 2] + }) + + df = dask_cudf.from_cudf(df, npartitions=2) + + G = cugraph.Graph() + G.from_dask_cudf_edgelist(df, source='src', destination='dst') + + start_list = cudf.Series([0], dtype="int32") + fanout_vals = [-1] + with_replacement = True + + sampling_results = uniform_neighbor_sample( + G, + start_list, + fanout_vals, + with_replacement + ) + + expected_src = [0, 0] + actual_src = sampling_results.sources + actual_src = actual_src.compute().to_arrow().to_pylist() + assert sorted(actual_src) == sorted(expected_src) + + expected_dst = [3, 1] + actual_dst = sampling_results.destinations + actual_dst = actual_dst.compute().to_arrow().to_pylist() + assert sorted(actual_dst) == sorted(expected_dst) diff --git a/python/cugraph/cugraph/tests/test_neighborhood_sampling.py b/python/cugraph/cugraph/tests/test_uniform_neighbor_sample.py similarity index 91% rename from python/cugraph/cugraph/tests/test_neighborhood_sampling.py rename to python/cugraph/cugraph/tests/test_uniform_neighbor_sample.py index 8eacbb6a14c..b4645d4bacf 100644 --- a/python/cugraph/cugraph/tests/test_neighborhood_sampling.py +++ b/python/cugraph/cugraph/tests/test_uniform_neighbor_sample.py @@ -228,3 +228,34 @@ def test_neighborhood_sampling_tree(directed): assert set( start_list.to_pandas()).issubset(set(result_nbr_vertices.to_pandas())) + + +def test_uniform_neighbor_sample_unweighted(): + df = cudf.DataFrame({ + 'src': [0, 1, 2, 2, 0, 1, 4, 4], + 'dst': [3, 2, 1, 4, 1, 3, 1, 2] + }) + + G = cugraph.Graph() + G.from_cudf_edgelist(df, source='src', destination='dst') + + start_list = cudf.Series([0], dtype="int32") + fanout_vals = [-1] + with_replacement = True + + sampling_results = uniform_neighbor_sample( + G, + start_list, + fanout_vals, + with_replacement + ) + + expected_src = [0, 0] + actual_src = sampling_results.sources + actual_src = actual_src.to_arrow().to_pylist() + assert sorted(actual_src) == sorted(expected_src) + + expected_dst = [3, 1] + actual_dst = sampling_results.destinations + actual_dst = actual_dst.to_arrow().to_pylist() + assert sorted(actual_dst) == sorted(expected_dst) \ No newline at end of file From 6e81cd8d6fec534295ef1e974df0272bf39085a3 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Wed, 17 Aug 2022 17:23:50 +0000 Subject: [PATCH 56/71] rename functions --- python/cugraph/cugraph/tests/test_uniform_neighbor_sample.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/cugraph/cugraph/tests/test_uniform_neighbor_sample.py b/python/cugraph/cugraph/tests/test_uniform_neighbor_sample.py index b4645d4bacf..b19047106f0 100644 --- a/python/cugraph/cugraph/tests/test_uniform_neighbor_sample.py +++ b/python/cugraph/cugraph/tests/test_uniform_neighbor_sample.py @@ -95,7 +95,7 @@ def input_combo(request): return parameters -def test_neighborhood_sampling_simple(input_combo): +def test_uniform_neighbor_sample_simple(input_combo): G = input_combo["Graph"] @@ -168,7 +168,7 @@ def test_neighborhood_sampling_simple(input_combo): @pytest.mark.parametrize("directed", IS_DIRECTED) -def test_neighborhood_sampling_tree(directed): +def test_uniform_neighbor_sample_tree(directed): input_data_path = (utils.RAPIDS_DATASET_ROOT_DIR_PATH / "small_tree.csv").as_posix() From cb086dbb665b488a667e214b424765b0c441df12 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Wed, 17 Aug 2022 18:33:10 +0000 Subject: [PATCH 57/71] style fix --- python/cugraph/cugraph/tests/test_uniform_neighbor_sample.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cugraph/cugraph/tests/test_uniform_neighbor_sample.py b/python/cugraph/cugraph/tests/test_uniform_neighbor_sample.py index b19047106f0..5c326ef2087 100644 --- a/python/cugraph/cugraph/tests/test_uniform_neighbor_sample.py +++ b/python/cugraph/cugraph/tests/test_uniform_neighbor_sample.py @@ -258,4 +258,4 @@ def test_uniform_neighbor_sample_unweighted(): expected_dst = [3, 1] actual_dst = sampling_results.destinations actual_dst = actual_dst.to_arrow().to_pylist() - assert sorted(actual_dst) == sorted(expected_dst) \ No newline at end of file + assert sorted(actual_dst) == sorted(expected_dst) From 736b633b78510c60491426342c799947b00ff5f0 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Wed, 17 Aug 2022 19:16:33 +0000 Subject: [PATCH 58/71] fixes for graph sage remove data files --- .../cugraph/gnn/pyg_extensions/data/cugraph_store.py | 2 ++ .../gnn/pyg_extensions/loader/link_neighbor_loader.py | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py index b34ded27709..80ea7163f64 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py @@ -389,6 +389,8 @@ def neighbor_sample( num_neighbors = list(num_neighbors.values())[0] # FIXME eventually get uniform neighbor sample to accept longs + if self.backend == 'torch' and not index.is_cuda: + index = index.cuda() index = cupy.from_dlpack(index.__dlpack__()) # FIXME resolve the directed/undirected issue diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py b/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py index a3d48f2ad2f..6741ca62e39 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/loader/link_neighbor_loader.py @@ -15,6 +15,9 @@ from cugraph.gnn.pyg_extensions.loader.neighbor_loader import ( EXPERIMENTAL__CuGraphNeighborSampler ) +from cugraph.gnn.pyg_extensions.data.cugraph_store import ( + EdgeLayout +) from typing import Any, Callable, Iterator, List, Optional, Tuple, Union @@ -24,8 +27,7 @@ from torch_geometric.data import Data, HeteroData from torch_geometric.data.feature_store import FeatureStore from torch_geometric.data.graph_store import ( - GraphStore, - EdgeLayout + GraphStore ) from torch_geometric.loader.base import DataLoaderIterator from torch_geometric.loader.utils import filter_custom_store From 855c9fa62d92cdab87ceeb3b65b205f9c54fe9fd Mon Sep 17 00:00:00 2001 From: Alex Barghi <105237337+alexbarghi-nv@users.noreply.github.com> Date: Wed, 24 Aug 2022 13:34:30 -0400 Subject: [PATCH 59/71] Drop __init__ and add __post_init__ to simplify constructor for CuGraphEdgeAttr Co-authored-by: Rick Ratzel <3039903+rlratzel@users.noreply.github.com> --- .../gnn/pyg_extensions/data/cugraph_store.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py index 80ea7163f64..fb232f13a11 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py @@ -49,18 +49,9 @@ class CuGraphEdgeAttr: # infer with the simple heuristic int(self.edge_index.max()) + 1 size: Optional[Tuple[int, int]] = None - # NOTE we define __init__ to force-cast layout - def __init__( - self, - edge_type: Optional[Any], - layout: EdgeLayout, - is_sorted: bool = False, - size: Optional[Tuple[int, int]] = None, - ): - self.edge_type = edge_type - self.layout = EdgeLayout(layout) - self.is_sorted = is_sorted - self.size = size + # NOTE we define __post_init__ to force-cast layout + def __post_init__(self): + self.layout = EdgeLayout(self.layout) @classmethod def cast(cls, *args, **kwargs): From c3292c5e47860cb787091a46bd9638552ea346bd Mon Sep 17 00:00:00 2001 From: Alex Barghi <105237337+alexbarghi-nv@users.noreply.github.com> Date: Wed, 24 Aug 2022 13:34:58 -0400 Subject: [PATCH 60/71] Change assert statement to proper error message. Co-authored-by: Rick Ratzel <3039903+rlratzel@users.noreply.github.com> --- .../cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py index fb232f13a11..373818e8704 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py @@ -117,7 +117,8 @@ class CuGraphTensorAttr: def is_set(self, key): r"""Whether an attribute is set in :obj:`TensorAttr`.""" - assert key in self.__dataclass_fields__ + if key not in self.__dataclass_fields__: + raise KeyError(key) attr = getattr(self, key) return type(attr) != _field_status or attr != _field_status.UNSET From 582ce09c1f7d1856d1e29113b56b6d20e1bb64b2 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Wed, 24 Aug 2022 17:45:22 +0000 Subject: [PATCH 61/71] clean up notebook and disable tests --- notebooks/gnn/pyg_hetero_mag.ipynb | 109 +++++++++++++++++++++++------ 1 file changed, 89 insertions(+), 20 deletions(-) diff --git a/notebooks/gnn/pyg_hetero_mag.ipynb b/notebooks/gnn/pyg_hetero_mag.ipynb index 4c64bb98279..70da7e4b19b 100644 --- a/notebooks/gnn/pyg_hetero_mag.ipynb +++ b/notebooks/gnn/pyg_hetero_mag.ipynb @@ -1,5 +1,22 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# PyG+cuGraph Heterogeneous MAG Example\n", + "# Skip notebook test\n", + "\n", + "### Requires installation of PyG" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Setup" + ] + }, { "cell_type": "code", "execution_count": null, @@ -9,8 +26,14 @@ "import sys\n", "import rmm\n", "\n", - "rmm.reinitialize(pool_allocator=True,initial_pool_size=5e+9, maximum_pool_size=20e+9)\n", - "sys.path += ['/work/pytorch_geometric', '/work/gaas/python']" + "rmm.reinitialize(pool_allocator=True,initial_pool_size=5e+9, maximum_pool_size=20e+9)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Load MAG into CPU Memory" ] }, { @@ -28,6 +51,20 @@ "data = dataset[0]" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Create PropertyGraph from MAG Data" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Partially Load the Vertex Data (just ids)" + ] + }, { "cell_type": "code", "execution_count": null, @@ -57,6 +94,13 @@ "vertex_offsets" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Add the Remaining Node Features" + ] + }, { "cell_type": "code", "execution_count": null, @@ -76,6 +120,13 @@ " pG.add_vertex_data(feature_df, vertex_col_name='id', type_name=node_type)" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Add the Edges" + ] + }, { "cell_type": "code", "execution_count": null, @@ -96,10 +147,18 @@ " if isinstance(pG, MGPropertyGraph):\n", " edge_df = dask_cudf.from_cudf(edge_df, npartitions=2)\n", "\n", + " # Adding backwards edges is currently required in both the cuGraph PG and PyG APIs.\n", " pG.add_edge_data(edge_df, vertex_col_names=['src','dst'], type_name=edge_type)\n", " pG.add_edge_data(edge_df, vertex_col_names=['dst','src'], type_name=f'{edge_type}_bw')" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Add the Target Variable" + ] + }, { "cell_type": "code", "execution_count": null, @@ -115,6 +174,13 @@ "pG.add_vertex_data(y_df, vertex_col_name='id', type_name='paper')" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Construct a Graph Store, Feature Store, and Loaders" + ] + }, { "cell_type": "code", "execution_count": null, @@ -132,7 +198,6 @@ "metadata": {}, "outputs": [], "source": [ - "from torch_geometric.loader import LinkNeighborLoader\n", "from cugraph.gnn.pyg_extensions import CuGraphLinkNeighborLoader\n", "loader = CuGraphLinkNeighborLoader(\n", " data=(feature_store, graph_store),\n", @@ -151,6 +216,13 @@ ")\n" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Create the Network" + ] + }, { "cell_type": "code", "execution_count": null, @@ -173,15 +245,6 @@ "num_classes" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "pG._vertex_prop_dataframe[pG._vertex_prop_dataframe._VERTEX_==1939695]" - ] - }, { "cell_type": "code", "execution_count": null, @@ -252,13 +315,14 @@ "\n", " \n", " acc += (pred == data['paper'].y).sum() / len(data['paper'])\n", - " return acc / (2*num_batches)\n", - "\n", - "\n", - "for epoch in range(1, 101):\n", - " loss = train()\n", - " train_acc = test()\n", - " print(f'Epoch: {epoch:03d}, Loss: {loss:.4f}, Train: {train_acc:.4f}')" + " return acc / (2*num_batches)\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Train the Network" ] }, { @@ -266,7 +330,12 @@ "execution_count": null, "metadata": {}, "outputs": [], - "source": [] + "source": [ + "for epoch in range(1, 101):\n", + " loss = train()\n", + " train_acc = test()\n", + " print(f'Epoch: {epoch:03d}, Loss: {loss:.4f}, Train: {train_acc:.4f}')" + ] } ], "metadata": { From 2049d7955a062f6f566bc4c7ca9dba053b1072f6 Mon Sep 17 00:00:00 2001 From: Alex Barghi <105237337+alexbarghi-nv@users.noreply.github.com> Date: Wed, 24 Aug 2022 13:46:17 -0400 Subject: [PATCH 62/71] remove hardcoded type feature Co-authored-by: Rick Ratzel <3039903+rlratzel@users.noreply.github.com> --- .../cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py index 373818e8704..7f2cdeb1b53 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py @@ -206,8 +206,8 @@ def __init__(self, G, backend='torch'): dst_types = self.__graph.get_vertex_data( vertex_ids=dsts, - columns=['_TYPE_'] - )._TYPE_.unique() + columns=[self.__graph.type_col_name] + )[self.__graph.type_col_name].unique() src_types = self.__graph.get_vertex_data( vertex_ids=srcs, From 3410e9feac58211c65276654dc166f98048fe138 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Wed, 24 Aug 2022 17:49:51 +0000 Subject: [PATCH 63/71] make backend private --- .../gnn/pyg_extensions/data/cugraph_store.py | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py index 373818e8704..32c41b32207 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py @@ -178,7 +178,7 @@ def __init__(self, G, backend='torch'): from cupy import float32 as property_type else: raise ValueError(f'Invalid backend {backend}.') - self.backend = backend + self.__backend = backend self.from_dlpack = from_dlpack self.vertex_type = vertex_type self.property_type = property_type @@ -289,14 +289,13 @@ def _get_edge_index(self, attr): src = self.from_dlpack(df[self.__graph.src_col_name].to_dlpack()) dst = self.from_dlpack(df[self.__graph.dst_col_name].to_dlpack()) - if self.backend == 'torch': + if self.__backend == 'torch': src = src.to(self.vertex_type) dst = dst.to(self.vertex_type) - elif self.backend == 'cupy': + else: + # self.__backend == 'cupy' src = src.astype(self.vertex_type) dst = dst.astype(self.vertex_type) - else: - raise TypeError(f'Invalid backend type {self.backend}') if src.shape[0] != dst.shape[0]: raise IndexError('src and dst shape do not match!') @@ -381,7 +380,7 @@ def neighbor_sample( num_neighbors = list(num_neighbors.values())[0] # FIXME eventually get uniform neighbor sample to accept longs - if self.backend == 'torch' and not index.is_cuda: + if self.__backend == 'torch' and not index.is_cuda: index = index.cuda() index = cupy.from_dlpack(index.__dlpack__()) @@ -524,7 +523,7 @@ def __init__(self, G, reserved_keys=[], backend='torch'): else: raise ValueError(f'Invalid backend {backend}.') - self.backend = backend + self.__backend = backend self.from_dlpack = from_dlpack self.vertex_type = vertex_type self.property_type = property_type @@ -576,7 +575,7 @@ def _get_tensor(self, attr): cols = [attr.attr_name] idx = attr.index - if self.backend == 'torch' and not idx.is_cuda: + if self.__backend == 'torch' and not idx.is_cuda: idx = idx.cuda() idx = cupy.from_dlpack(idx.__dlpack__()) @@ -617,12 +616,11 @@ def _get_tensor(self, attr): # FIXME look up the dtypes for x and other properties if attr.attr_name == 'x' and output.dtype != self.property_type: - if self.backend == 'torch': + if self.__backend == 'torch': output = output.to(self.property_type) - elif self.backend == 'cupy': - output = output.astype(self.property_type) else: - raise ValueError(f'invalid backend {self.backend}') + # self.__backend == 'cupy' + output = output.astype(self.property_type) return output From 93ac58a326914083db3dd8a86134a4e3cd2eb97f Mon Sep 17 00:00:00 2001 From: Alex Barghi <105237337+alexbarghi-nv@users.noreply.github.com> Date: Wed, 24 Aug 2022 13:51:38 -0400 Subject: [PATCH 64/71] simplify uniform_neighbor_sample call Co-authored-by: Rick Ratzel <3039903+rlratzel@users.noreply.github.com> --- .../cugraph/gnn/pyg_extensions/data/cugraph_store.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py index 478e04c29bc..276e2402f4c 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py @@ -389,15 +389,10 @@ def neighbor_sample( index = cudf.Series(index) if self.is_mg: - sampling_results = cugraph.dask.uniform_neighbor_sample( - G, - index, - # conversion required by cugraph api - list(num_neighbors), - replace - ) + uniform_neighbor_sample = cugraph.dask.uniform_neighbor_sample else: - sampling_results = cugraph.uniform_neighbor_sample( + uniform_neighbor_sample = cugraph.uniform_neighbor_sample + sampling_results = uniform_neighbor_sample( G, index, # conversion required by cugraph api From 68bd41082b85dc1d8afbc61f00663b9914f2c221 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Wed, 24 Aug 2022 17:59:23 +0000 Subject: [PATCH 65/71] add additional comments for _get_edge_index --- .../gnn/pyg_extensions/data/cugraph_store.py | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py index 478e04c29bc..f4db1bac218 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py @@ -254,7 +254,26 @@ def get_all_edge_attrs(self): return self.__edge_types_to_attrs.values() def _get_edge_index(self, attr): - # returns the edge index for particular edge type + """ + Returns the edge index in the requested format + (as defined by attr). Currently, only unsorted + COO is supported, which is returned as a (src,dst) + tuple as expected by the PyG API. + + Parameters + ---------- + attr: CuGraphEdgeAttr + The CuGraphEdgeAttr specifying the + desired edge type, layout (i.e. CSR, COO, CSC), and + whether the returned index should be sorted (if COO). + Currently, only unsorted COO is supported. + + Returns + ------- + (src, dst) : Tuple[tensor type] + Tuple of the requested edge index in COO form. + Currently, only COO form is supported. + """ if attr.layout != EdgeLayout.COO: raise TypeError('Only COO direct access is supported!') From 3386ba64fbda4aa867d31d8774763f81d1c407ad Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Wed, 24 Aug 2022 18:03:46 +0000 Subject: [PATCH 66/71] add edge type check for single edge optimized code --- .../gnn/pyg_extensions/data/cugraph_store.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py index daff600fc02..430db67aac5 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py @@ -277,8 +277,18 @@ def _get_edge_index(self, attr): if attr.layout != EdgeLayout.COO: raise TypeError('Only COO direct access is supported!') + + if isinstance(attr.edge_type, str): + edge_type = attr.edge_type + else: + edge_type = attr.edge_type[1] if len(self.__graph.edge_types) == 1: + if self.__graph.edge_types[0] != edge_type: + raise ValueError( + f'Requested edge type {edge_type}' + 'is not present in graph.' + ) df = self.__graph.get_edge_data( edge_ids=None, types=None, @@ -288,11 +298,6 @@ def _get_edge_index(self, attr): ] ) else: - if isinstance(attr.edge_type, str): - edge_type = attr.edge_type - else: - edge_type = attr.edge_type[1] - # FIXME unrestricted edge type names df = self.__graph.get_edge_data( edge_ids=None, From ecbe7f622fdf307f8b0a5db7aadbaf07f7bda779 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Wed, 24 Aug 2022 18:09:31 +0000 Subject: [PATCH 67/71] remove the fake groupby in favor of a future better solution --- .../gnn/pyg_extensions/data/cugraph_store.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py index 430db67aac5..c63cec8b0fb 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py @@ -283,12 +283,15 @@ def _get_edge_index(self, attr): else: edge_type = attr.edge_type[1] + # If there is only one edge type (homogeneous graph) then + # bypass the edge filters for a significant speed improvement. if len(self.__graph.edge_types) == 1: if self.__graph.edge_types[0] != edge_type: raise ValueError( f'Requested edge type {edge_type}' 'is not present in graph.' ) + df = self.__graph.get_edge_data( edge_ids=None, types=None, @@ -436,16 +439,7 @@ def neighbor_sample( ) noi_types = noi[self.__graph.type_col_name].unique() - if len(noi_types) > 1: - noi = noi.groupby(self.__graph.type_col_name) - else: - class FakeGroupBy: - def __init__(self, df): - self.df = df - - def get_group(self, g): - return self.df - noi = FakeGroupBy(noi) + noi = noi.groupby(self.__graph.type_col_name) if self.is_mg: noi_types = noi_types.compute() From 5a5c02dbc2c4539c50210befff75ab824126a5c2 Mon Sep 17 00:00:00 2001 From: Alex Barghi <105237337+alexbarghi-nv@users.noreply.github.com> Date: Wed, 24 Aug 2022 14:11:55 -0400 Subject: [PATCH 68/71] don't access the __dict__ Co-authored-by: Rick Ratzel <3039903+rlratzel@users.noreply.github.com> --- python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py index c63cec8b0fb..2d3de35dd25 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py @@ -234,7 +234,7 @@ def __init__(self, G, backend='torch'): size=len(edges) ) - self.__dict__['_edge_attr_cls'] = CuGraphEdgeAttr + self._edge_attr_cls = CuGraphEdgeAttr @property def _edge_types_to_attrs(self): From e79e1721e9e5313c9362fdaf6b1dc19622012dfd Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Wed, 24 Aug 2022 18:12:47 +0000 Subject: [PATCH 69/71] style fix --- python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py index c63cec8b0fb..e02bdf296f1 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py @@ -277,7 +277,7 @@ def _get_edge_index(self, attr): if attr.layout != EdgeLayout.COO: raise TypeError('Only COO direct access is supported!') - + if isinstance(attr.edge_type, str): edge_type = attr.edge_type else: From ce00bc142c2878275caff37b7a4fe56245783f82 Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Thu, 25 Aug 2022 14:38:01 +0000 Subject: [PATCH 70/71] set to list --- python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py index 0aaf3e26915..a6877464ff2 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py @@ -286,7 +286,7 @@ def _get_edge_index(self, attr): # If there is only one edge type (homogeneous graph) then # bypass the edge filters for a significant speed improvement. if len(self.__graph.edge_types) == 1: - if self.__graph.edge_types[0] != edge_type: + if list(self.__graph.edge_types)[0] != edge_type: raise ValueError( f'Requested edge type {edge_type}' 'is not present in graph.' From cdcfa0dc1cb64e3f92d6493ba8cbde739eb5296c Mon Sep 17 00:00:00 2001 From: Alexandria Barghi Date: Thu, 25 Aug 2022 18:51:32 +0000 Subject: [PATCH 71/71] change to cupy.arange --- .../cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py index a6877464ff2..39805241426 100644 --- a/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py +++ b/python/cugraph/cugraph/gnn/pyg_extensions/data/cugraph_store.py @@ -475,7 +475,7 @@ def neighbor_sample( eoi_types = eoi_types.compute() eoi_types = eoi_types.to_pandas() - # PyG expects these to be pre-renumbered; + # to be pre-renumbered; # the pre-renumbering must match # the auto-renumbering row_dict = {} @@ -500,7 +500,7 @@ def neighbor_sample( destinations = gr.destinations dst_id_table = cudf.DataFrame( - {'id': range(len(noi_groups[t_pyg_type[2]]))}, + {'id': cupy.arange(len(noi_groups[t_pyg_type[2]]))}, index=cudf.from_dlpack(noi_groups[t_pyg_type[2]].__dlpack__()) ) dst = self.from_dlpack(